pax_global_header00006660000000000000000000000064131265030310014504gustar00rootroot0000000000000052 comment=1a5ca5cf483d450821a0a21209773014d374fdde plantuml-1.2017.15/000077500000000000000000000000001312650303100136565ustar00rootroot00000000000000plantuml-1.2017.15/.travis.yml000066400000000000000000000000161312650303100157640ustar00rootroot00000000000000language: javaplantuml-1.2017.15/README.md000066400000000000000000000015131312650303100151350ustar00rootroot00000000000000PlantUML ======== [![Build Status](https://travis-ci.org/plantuml/plantuml.png?branch=master)](https://travis-ci.org/plantuml/plantuml) Generate UML diagram from textual description PlantUML is a component that allows to quickly write : * [Sequence diagram](http://plantuml.com/sequence-diagram), * [Use case diagram](http://plantuml.com/use-case-diagram), * [Class diagram](http://plantuml.com/class-diagram), * [Activity diagram](http://plantuml.com/activity-diagram-beta), * [Component diagram](http://plantuml.com/component-diagram), * [State diagram](http://plantuml.com/state-diagram), * [Object diagram](http://plantuml.com/object-diagram), * [Deployment diagram](http://plantuml.com/deployment-diagram), * [Timing diagram](http://plantuml.com/timing-diagram) To know more about PlantUML, please visit http://plantuml.com/ plantuml-1.2017.15/build.xml000066400000000000000000000045671312650303100155130ustar00rootroot00000000000000 PlantUML Build File plantuml-1.2017.15/pom.xml000066400000000000000000000140721312650303100151770ustar00rootroot00000000000000 4.0.0 net.sourceforge.plantuml plantuml 1.2017.15-SNAPSHOT jar PlantUML PlantUML is a component that allows to quickly write : * sequence diagram, * use case diagram, * class diagram, * activity diagram, * component diagram, * state diagram * object diagram http://plantuml.sourceforge.net org.sonatype.oss oss-parent 5 org.apache.ant ant 1.8.1 provided The GNU General Public License http://www.gnu.org/licenses/gpl.txt repo scm:svn:svn://svn.code.sf.net/p/plantuml/code/trunk scm:svn:https://svn.code.sf.net/p/plantuml/code/trunk svn://svn.code.sf.net/p/plantuml/code/trunk Sourceforge http://sourceforge.net/tracker/?group_id=259736 arnaud.roques Arnaud Roques plantuml@gmail.com doclint-java8-disable [1.8,) -Xdoclint:none ${project.basedir}/src ${project.basedir}/src net/sourceforge/plantuml/version/*.png net/sourceforge/plantuml/openiconic/data/*.txt net/sourceforge/plantuml/openiconic/data/*.svg net/sourceforge/plantuml/fun/*.png sprites/archimate/*.png net/sourceforge/plantuml/dedication/*.png net/sourceforge/plantuml/math/*.js maven-compiler-plugin 2.3.2 1.5 1.5 false maven-source-plugin attach-sources jar maven-javadoc-plugin attach-javadocs jar ${javadoc.opts} maven-jar-plugin net.sourceforge.plantuml.Run maven-release-plugin 2.1 forked-path plantuml-1.2017.15/src/000077500000000000000000000000001312650303100144455ustar00rootroot00000000000000plantuml-1.2017.15/src/com/000077500000000000000000000000001312650303100152235ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/000077500000000000000000000000001312650303100166515ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/acearth/000077500000000000000000000000001312650303100202605ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/acearth/ACearth.java000066400000000000000000000272651312650303100224460ustar00rootroot00000000000000package com.ctreber.acearth; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Random; import com.ctreber.acearth.gui.CanvasACearth; import com.ctreber.acearth.plugins.Plugin; import com.ctreber.acearth.plugins.markers.Marker; import com.ctreber.acearth.plugins.markers.PluginMarkers; import com.ctreber.acearth.projection.Projection; import com.ctreber.acearth.projection.ProjectionCyl; import com.ctreber.acearth.projection.ProjectionMerc; import com.ctreber.acearth.projection.ProjectionOrtho; import com.ctreber.acearth.renderer.Renderer; import com.ctreber.acearth.renderer.RowTypeRendererScanBit; import com.ctreber.acearth.renderer.RowTypeRendererScanDot; import com.ctreber.acearth.scanbit.BitGeneratorMap; import com.ctreber.acearth.scanbit.BitGeneratorMapDefault; import com.ctreber.acearth.scanbit.BitGeneratorMapOrtho; import com.ctreber.acearth.scandot.DotGeneratorLines; import com.ctreber.acearth.scandot.DotGeneratorStars; import com.ctreber.acearth.scandot.ScanDot; import com.ctreber.acearth.scandot.ScanDotGenerator; import com.ctreber.acearth.shader.Shader; import com.ctreber.acearth.shader.ShaderDefault; import com.ctreber.acearth.shader.ShaderFlat; import com.ctreber.acearth.shader.ShaderOrtho; import com.ctreber.acearth.util.Coordinate; import com.ctreber.acearth.util.SunPositionCalculator; import com.ctreber.acearth.util.Toolkit; import com.ctreber.aclib.sort.CTSort; import com.ctreber.aclib.sort.QuickSort; /** *

AC.earth - XEarth for Java *

* *

* The original XEarth was written by Kirk Johnson in July 1993 - thank you for * writing this great little program and making it available for free! * *

* I wanted to extend the program, but not in C. So I created this Java version, * and found the process quite painfull interesting. The * biggest effort went into resolving references between C files and * eliminatiing pointers. * *

License

* *

* AC.earth Copyright (c) 2002 Christian Treber, ct@ctreber.com * *

* AC.earth is based on XEarth by Kirk Johnson * *

* To comply with the XEarth license I include the following text: * *

 * XEarth Copyright (C) 1989, 1990, 1993-1995, 1999 Kirk Lauritz Johnson
 * Parts of the source code are:
 *   Copyright (C) 1989, 1990, 1991 by Jim Frost
 *   Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
 * Permission to use, copy, modify and freely distribute xearth for
 * non-commercial and not-for-profit purposes is hereby granted
 * without fee, provided that both the above copyright notice and this
 * permission notice appear in all copies and in supporting
 * documentation.
 * [Section refering to GIF omitted because it doesn't apply to this version]
 * The author makes no representations about the suitability of this
 * software for any purpose. It is provided "as is" without express or
 * implied warranty.
 * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
 * OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 * 
* *

* The license for this program (AC.earth) is the same as the quoted license * above, with one change: The "copyright notice and permission notice" shall * include the entire text of this section. * * todo Phase 2: Make grid value stuff more meaningful ("every n degrees") todo * Phase 2: Enter fixed time as data and time, not seconds since epoch todo * Phase 2: Compact map data into binary file * *

* © 2002 Christian Treber, ct@ctreber.com * * @author Christian Treber, ct@ctreber.com */ public class ACearth { public static final String VERSION = "1.1"; public static final String BUILD = "22.11.2002 004"; // private static long fsStartTime = 0; private ConfigurationACearth fConf = new ConfigurationACearth(); private long fCurrentTime; private CanvasACearth fCanvas; private Coordinate fViewPos; private double fViewRotation; private List fPlugins; /** *

* Well, the main class. * @param markers */ public ACearth(List markers) { // fsStartTime = System.currentTimeMillis(); fPlugins = new ArrayList(); fPlugins.add(new PluginMarkers(markers)); } public void exportPng(OutputStream os) throws IOException { fCanvas = new CanvasACearth(this, fConf.getInt("imageWidth"), fConf.getInt("imageHeight")); update(); fCanvas.saveToImage(os); } public void update() throws IOException { Projection lProjection = null; Shader lShader = null; BitGeneratorMap lScanner = null; if (fConf.is("projection", "Cylindrical")) { lProjection = new ProjectionCyl(); lScanner = new BitGeneratorMapDefault(lProjection); lShader = new ShaderDefault(); } if (fConf.is("projection", "Mercator")) { lProjection = new ProjectionMerc(); lScanner = new BitGeneratorMapDefault(lProjection); lShader = new ShaderDefault(); } if (fConf.is("projection", "Orthographic")) { lProjection = new ProjectionOrtho(); lScanner = new BitGeneratorMapOrtho(lProjection); lShader = new ShaderOrtho(); } computePositions(); lProjection.setImageWidth(fConf.getInt("imageWidth")); lProjection.setImageHeight(fConf.getInt("imageHeight")); lProjection.setShiftX(fConf.getInt("shiftX")); lProjection.setShiftY(fConf.getInt("shiftY")); lProjection.setViewMagnification(fConf.getDouble("viewMagnification")); lProjection.setViewPos(fViewPos); lProjection.setViewRotation(fViewRotation); lScanner.setImageWidth(fConf.getInt("imageWidth")); lScanner.setImageHeight(fConf.getInt("imageHeight")); lScanner.setMapData(MapDataReader.readMapData()); // Process the map (produces ScanBit-s). lScanner.generateScanBits(); // Process stars and lines (produces ScanDots-s). List lScanDots = new ArrayList(); if (fConf.getBoolean("starsP")) { ScanDotGenerator lGenerator = new DotGeneratorStars(fConf.getInt("imageWidth"), fConf.getInt("imageHeight"), fConf.getDouble("starFrequency"), fConf.getInt("bigStars"), new Random(fCurrentTime)); lGenerator.generateScanDots(); lScanDots.addAll(lGenerator.getScanDots()); } if (fConf.getBoolean("gridP")) { ScanDotGenerator lGenerator = new DotGeneratorLines(lProjection, fConf.getInt("gridDivision"), fConf .getInt("gridPixelDivision")); lGenerator.generateScanDots(); lScanDots.addAll(lGenerator.getScanDots()); } final CTSort lSort = new QuickSort(); ScanDot[] lScanDotsArray = (ScanDot[]) lScanDots.toArray(new ScanDot[0]); lSort.sort(lScanDotsArray); if (!fConf.getBoolean("shadeP")) { lShader = new ShaderFlat(); } lShader.setProjection(lProjection); lShader.setSunPos(fConf.getSunPos()); lShader.setDaySideBrightness(fConf.getInt("daySideBrightness")); lShader.setTerminatorDiscontinuity(fConf.getInt("terminatorDiscontinuity")); lShader.setNightSideBrightness(fConf.getInt("nightSideBrightness")); lShader.init(); Renderer lRenderer = new Renderer(fCanvas); RowTypeRendererScanBit lRowRendererScanBit = new RowTypeRendererScanBit(); lRowRendererScanBit.setScanBits(lScanner.getScanBits()); lRenderer.addRowTypeRenderer(lRowRendererScanBit); RowTypeRendererScanDot lRowRendererScanDot = new RowTypeRendererScanDot(); lRowRendererScanDot.setScanDots(lScanDotsArray); lRenderer.addRowTypeRenderer(lRowRendererScanDot); lRenderer.setShader(lShader); lRenderer.render(); // Apply plugins Iterator lIt = fPlugins.iterator(); while (lIt.hasNext()) { Plugin lPlugin = (Plugin) lIt.next(); lPlugin.setProjection(lProjection); lPlugin.setRenderTarget(fCanvas); lPlugin.setParent(this); lPlugin.render(); } } /** *

* This is repeated when time changes since this influences the position of * Earth. */ private void computePositions() { // Determine time for rendering if (fConf.getInt("fixedTime") == 0) { // No fixed time. // final long lTimePassed = System.currentTimeMillis() - fsStartTime; // fCurrentTime = fsStartTime + (long) (fConf.getDouble("timeWarpFactor") * lTimePassed); fCurrentTime = System.currentTimeMillis(); } else { // Fixed time. fCurrentTime = fConf.getInt("fixedTime") * 1000L; } if (fConf.getBoolean("sunMovesP")) { fConf.setSunPos(SunPositionCalculator.getSunPositionOnEarth(fCurrentTime)); } // Determine viewing position if (fConf.is("viewPositionType", "Fixed")) { fViewPos = fConf.getViewPos(); } else if (fConf.is("viewPositionType", "Sun-relative")) { fViewPos = getSunRelativePosition(); } else if (fConf.is("viewPositionType", "Orbit")) { fViewPos = getOrbitPosition(fCurrentTime); } else if (fConf.is("viewPositionType", "Random")) { fViewPos = getRandomPosition(); } else if (fConf.is("viewPositionType", "Moon")) { fViewPos = SunPositionCalculator.getMoonPositionOnEarth(fCurrentTime); } // for ViewRotGalactic, compute appropriate viewing rotation if (fConf.is("viewRotationType", "Galactic")) { fViewRotation = (Toolkit.degsToRads(fConf.getSunPos().getLat() * Math.sin((fViewPos.getLong() - fConf.getSunPos().getLong())))); } else { fViewRotation = fConf.getDouble("viewRotation"); } } /** *

* Add sun position and position relative to sun, straighten out the result. * * @return Position relativ to sun position as defined by fSunPosRel. */ private Coordinate getSunRelativePosition() { final Coordinate lPos = fConf.getSunPos(); lPos.add(fConf.getSunPosRel()); return lPos; } private Coordinate getOrbitPosition(long pTimeMillis) { double x, y, z; double a, c, s; double t1, t2; /* start at 0 N 0 E */ x = 0; y = 0; z = 1; /* * rotate in about y axis (from z towards x) according to the number of * orbits we've completed */ a = (double) pTimeMillis / (fConf.getDouble("orbitPeriod") * 3600 * 1000) * 2 * Math.PI; c = Math.cos(a); s = Math.sin(a); t1 = c * z - s * x; t2 = s * z + c * x; z = t1; x = t2; /* * rotate about z axis (from x towards y) according to the inclination * of the orbit */ a = Toolkit.degsToRads(fConf.getDouble("orbitInclination")); c = Math.cos(a); s = Math.sin(a); t1 = c * x - s * y; t2 = s * x + c * y; x = t1; y = t2; /* * rotate about y axis (from x towards z) according to the number of * rotations the earth has made */ a = ((double) pTimeMillis / 86400000) * (2 * Math.PI); c = Math.cos(a); s = Math.sin(a); t1 = c * x - s * z; t2 = s * x + c * z; x = t1; z = t2; return new Coordinate(Toolkit.radsToDegs(Math.asin(y)), Toolkit.radsToDegs(Math.atan2(x, z))); } /** *

* Pick a position (lat, lon) at random * * @return A random position. */ private static Coordinate getRandomPosition() { /* select a vector at random */ final double[] pos = new double[3]; double mag = 0; do { for (int i = 0; i < 3; i++) { pos[i] = ((Math.random() * 20000) * 1e-4) - 1; mag += pos[i] * pos[i]; } } while ((mag > 1.0) || (mag < 0.01)); /* normalize the vector */ mag = Math.sqrt(mag); for (int i = 0; i < 3; i++) { pos[i] /= mag; } /* convert to (lat, lon) */ final double s_lat = pos[1]; final double c_lat = Math.sqrt(1 - s_lat * s_lat); final double s_lon = pos[0] / c_lat; final double c_lon = pos[2] / c_lat; return new Coordinate(Math.atan2(s_lat, c_lat) * (180 / Math.PI), Math.atan2(s_lon, c_lon) * (180 / Math.PI)); } // public static long getStartTime() { // return fsStartTime; // } public ConfigurationACearth getConf() { return fConf; } }plantuml-1.2017.15/src/com/ctreber/acearth/Configuration.java000066400000000000000000000045171312650303100237410ustar00rootroot00000000000000package com.ctreber.acearth; import java.util.HashMap; import java.util.Map; import com.ctreber.aclib.gui.MOBoolean; import com.ctreber.aclib.gui.MODouble; import com.ctreber.aclib.gui.MOEnum; import com.ctreber.aclib.gui.MOInteger; import com.ctreber.aclib.gui.MOString; import com.ctreber.aclib.gui.MonitoredObject; /** *

*

* *

* © 2002 Christian Treber, ct@ctreber.com (06.10.2002) *

* * @author Christian Treber, ct@ctreber.com * */ public class Configuration { private Map fValues = new HashMap(); /** *

* Item must be added before it can be set or get. * * @param pID * Item name. * @param pObject * Item value container. */ public void add(String pID, MonitoredObject pObject) { fValues.put(pID, pObject); } public void setString(String pID, String pValue) { ((MOString) fValues.get(pID)).set(pValue); } public void setBoolean(String pID, boolean pValue) { ((MOBoolean) fValues.get(pID)).set(pValue); } public void setInt(String pID, int pValue) { ((MOInteger) fValues.get(pID)).set(pValue); } public void setDouble(String pID, double pValue) { ((MODouble) fValues.get(pID)).set(pValue); } public void setEnum(String pID, Object pValue) { ((MOEnum) fValues.get(pID)).set(pValue); } public String getString(String pID) { return ((MOString) fValues.get(pID)).get(); } public boolean getBoolean(String pID) { return ((MOBoolean) fValues.get(pID)).get(); } public int getInt(String pID) { return ((MOInteger) fValues.get(pID)).get(); } public double getDouble(String pID) { return ((MODouble) fValues.get(pID)).get(); } public boolean is(String pID, Object pValue) { return ((MOEnum) fValues.get(pID)).is(pValue); } public MOBoolean getMOBoolean(String pID) { return (MOBoolean) getMO(pID); } public MOString getMOString(String pID) { return (MOString) getMO(pID); } public MOEnum getMOEnum(String pID) { return (MOEnum) getMO(pID); } public MOInteger getMOInteger(String pID) { return (MOInteger) getMO(pID); } public MODouble getMODouble(String pID) { return (MODouble) getMO(pID); } public MonitoredObject getMO(String pID) { final MonitoredObject lMO = (MonitoredObject) fValues.get(pID); if (lMO == null) { throw new IllegalArgumentException("Unknown conf item '" + pID + "'"); } return lMO; } } plantuml-1.2017.15/src/com/ctreber/acearth/ConfigurationACearth.java000066400000000000000000000127111312650303100251640ustar00rootroot00000000000000package com.ctreber.acearth; import com.ctreber.acearth.util.Coordinate; import com.ctreber.aclib.gui.MOBoolean; import com.ctreber.aclib.gui.MODouble; import com.ctreber.aclib.gui.MOEnum; import com.ctreber.aclib.gui.MOInteger; import com.ctreber.aclib.gui.MOString; import com.ctreber.aclib.gui.MonitoredObject; /** *

* How to avoid writing all the accessors? Code generator that creates derived * class from template class? Configuration items in data structure? *

* *

* © 2002 Christian Treber, ct@ctreber.com (06.10.2002) *

* * @author Christian Treber, ct@ctreber.com * */ public class ConfigurationACearth extends Configuration { private static final int DEFAULT_DIMENSION = 512; public ConfigurationACearth() { final MOEnum lProjection = new MOEnum(); lProjection.addValidValue("Mercator"); lProjection.addValidValue("Orthographic"); lProjection.addValidValue("Cylindrical"); lProjection.set("Orthographic"); add("projection", (MonitoredObject) lProjection); final MOEnum lPositionType = new MOEnum(); lPositionType.addValidValue("Fixed"); lPositionType.addValidValue("Sun-relative"); lPositionType.addValidValue("Orbit"); lPositionType.addValidValue("Random"); lPositionType.addValidValue("Moon"); lPositionType.set("Sun-relative"); add("viewPositionType", lPositionType); final MOEnum lViewRotationType = new MOEnum(); lViewRotationType.addValidValue("North"); lViewRotationType.addValidValue("Galactic"); lViewRotationType.set("North"); add("viewRotationType", lViewRotationType); final MOString lOutputMode = new MOString("gui"); add("outputMode", lOutputMode); // Only relevant if view type is "Fixed"./ final MODouble lViewPosLat = new MODouble(0, -90, +90); add("viewPosLat", lViewPosLat); final MODouble lViewPosLong = new MODouble(0, -180, +180); add("viewPosLong", lViewPosLong); // Only relevant if view type is "Sun-relative". final MODouble lSunPosRelLat = new MODouble(0, -90, +90); add("sunPosRelLat", lSunPosRelLat); final MODouble lSunPosRelLong = new MODouble(0, -180, +180); add("sunPosRelLong", lSunPosRelLong); final MOBoolean lSunMovesP = new MOBoolean(true); add("sunMovesP", lSunMovesP); // Only relevant if sun does not move. final MODouble lSunPosLat = new MODouble(0, -90, +90); add("sunPosLat", lSunPosLat); final MODouble lSunPosLong = new MODouble(0, -180, +180); add("sunPosLong", lSunPosLong); final MODouble lTimeWarpFactor = new MODouble(1.0, 0, Double.MAX_VALUE); add("timeWarpFactor", lTimeWarpFactor); final MOInteger lFixedTime = new MOInteger(0, 0, Integer.MAX_VALUE); add("fixedTime", lFixedTime); final MOInteger lWaitTime = new MOInteger(300, 0, Integer.MAX_VALUE); add("waitTime", lWaitTime); final MODouble lOrbitPeriod = new MODouble(1, 0.0001, Double.MAX_VALUE); add("orbitPeriod", lOrbitPeriod); final MODouble lOrbitInclination = new MODouble(45.0, 0, 90); add("orbitInclination", lOrbitInclination); final MOBoolean lLabelP = new MOBoolean(false); add("labelP", lLabelP); final MOInteger lImageWidth = new MOInteger(DEFAULT_DIMENSION, 0, Integer.MAX_VALUE); add("imageWidth", lImageWidth); final MOInteger lImageHeight = new MOInteger(DEFAULT_DIMENSION, 0, Integer.MAX_VALUE); add("imageHeight", lImageHeight); final MOBoolean lStarsP = new MOBoolean(true); add("starsP", lStarsP); final MODouble lStarFrequency = new MODouble(0.002, 0, Double.MAX_VALUE); add("starFrequency", lStarFrequency); final MOInteger lBigStars = new MOInteger(0, 0, 100); add("bigStars", lBigStars); final MOBoolean lGridP = new MOBoolean(true); add("gridP", lGridP); final MOInteger lGridDivision = new MOInteger(6, 0, Integer.MAX_VALUE); add("gridDivision", lGridDivision); final MOInteger lGridPixelDevision = new MOInteger(15, 0, Integer.MAX_VALUE); add("gridPixelDivision", lGridPixelDevision); final MOInteger lShiftX = new MOInteger(0, 0, Integer.MAX_VALUE); add("shiftX", lShiftX); final MOInteger lShiftY = new MOInteger(0, 0, Integer.MAX_VALUE); add("shiftY", lShiftY); final MODouble lViewMagnification = new MODouble(1.0, 0, Double.MAX_VALUE); add("viewMagnification", lViewMagnification); final MOBoolean lShadeP = new MOBoolean(true); add("shadeP", lShadeP); final MOInteger lDaySideBrightness = new MOInteger(100, 0, 100); add("daySideBrightness", lDaySideBrightness); final MOInteger lNightSideBrightness = new MOInteger(5, 0, 100); add("nightSideBrightness", lNightSideBrightness); final MOInteger lTerminatorDiscontinuity = new MOInteger(1, 0, 100); add("terminatorDiscontinuity", lTerminatorDiscontinuity); final MODouble lViewRotation = new MODouble(0, 0, Double.MAX_VALUE); add("viewRotation", lViewRotation); } public Coordinate getViewPos() { return new Coordinate(getDouble("viewPosLat"), getDouble("viewPosLong")); } public void setViewPos(Coordinate pViewPos) { setDouble("viewPosLat", pViewPos.getLat()); setDouble("viewPosLong", pViewPos.getLong()); } public Coordinate getSunPos() { return new Coordinate(getDouble("sunPosLat"), getDouble("sunPosLong")); } public void setSunPos(Coordinate pSunPos) { setDouble("sunPosLat", pSunPos.getLat()); setDouble("sunPosLong", pSunPos.getLong()); } public Coordinate getSunPosRel() { return new Coordinate(getDouble("sunPosRelLat"), getDouble("sunPosRelLong")); } public void setSunPosRel(Coordinate pSunPosRel) { setDouble("sunPosRelLat", pSunPosRel.getLat()); setDouble("sunPosRelLong", pSunPosRel.getLong()); } } plantuml-1.2017.15/src/com/ctreber/acearth/MapData.java000066400000000000000000010534061312650303100224430ustar00rootroot00000000000000package com.ctreber.acearth; import java.util.ArrayList; import java.util.List; /** *

AC.earth - XEarth for Java *

* *

* The original XEarth was written by Kirk Johnson in July 1993 - thank you for * writing this great little program and making it available for free! * *

* I wanted to extend the program, but not in C. So I created this Java version, * and found the process quite painfull interesting. The * biggest effort went into resolving references between C files and * eliminatiing pointers. * *

License

* *

* AC.earth Copyright (c) 2002 Christian Treber, ct@ctreber.com * *

* AC.earth is based on XEarth by Kirk Johnson * *

* To comply with the XEarth license I include the following text: * *

 * XEarth Copyright (C) 1989, 1990, 1993-1995, 1999 Kirk Lauritz Johnson
 * Parts of the source code are:
 *   Copyright (C) 1989, 1990, 1991 by Jim Frost
 *   Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
 * Permission to use, copy, modify and freely distribute xearth for
 * non-commercial and not-for-profit purposes is hereby granted
 * without fee, provided that both the above copyright notice and this
 * permission notice appear in all copies and in supporting
 * documentation.
 * [Section refering to GIF omitted because it doesn't apply to this version]
 * The author makes no representations about the suitability of this
 * software for any purpose. It is provided "as is" without express or
 * implied warranty.
 * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
 * OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 * LOSS OF USE, d OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 * 
* *

* The license for this program (AC.earth) is the same as the quoted license * above, with one change: The "copyright notice and permission notice" shall * include the entire text of this section. * * todo Phase 2: Make grid value stuff more meaningful ("every n degrees") todo * Phase 2: Enter fixed time as d and time, not seconds since epoch todo * Phase 2: Compact map d into binary file * *

* © 2002 Christian Treber, ct@ctreber.com * * @author Christian Treber, ct@ctreber.com */ public class MapData { private final List d = new ArrayList(); public MapData() { //add("/*0*/"); add("3903,1,13663,15523,21733,"); add("-138,74,34,69,29,-64,-38,19,10,-93,24,41,"); add("-123,2,74,-139,23,68,-93,-54,94,-46,17,16,"); add("33,33,-44,-145,-37,113,-59,-82,92,-117,-44,99,"); add("-83,-79,101,-98,-59,97,-129,1,70,-132,62,30,"); add("-136,30,54,-146,22,63,-120,37,38,-137,40,44,"); add("-132,50,34,-137,27,51,-140,23,54,-141,32,48,"); add("-133,4,62,-123,-34,82,-124,44,28,-95,124,-40,"); add("-134,50,28,-136,-5,65,-143,24,48,-135,51,25,"); add("-151,13,57,-116,80,-5,-70,114,-49,-151,52,28,"); add("-141,44,27,-137,28,36,-151,0,61,-115,-55,84,"); add("-137,-19,66,-113,-59,83,-106,-67,85,-83,-88,91,"); add("-56,-106,92,4,-127,82,57,-127,62,81,-117,47,"); add("4,-126,79,-56,-109,89,-81,-94,88,-111,-65,80,"); add("-137,-19,60,-140,50,16,-129,77,-4,-125,84,-11,"); add("-140,59,9,-141,51,13,-141,46,16,-146,36,22,"); add("-145,24,28,-147,4,41,-146,30,23,-136,66,-3,"); add("-101,105,-39,-69,120,-58,-46,125,-69,-119,79,-19,"); add("-150,23,25,-143,45,7,-135,65,-9,-147,32,16,"); add("-145,29,16,-142,15,24,-138,-36,55,-149,6,29,"); add("-142,46,1,-154,71,-14,-125,38,0,-122,43,-4,"); add("-131,126,-59,-138,25,9,-148,44,-2,-111,93,-43,"); add("-32,122,-79,97,86,-77,111,74,-72,87,91,-80,"); add("55,110,-89,20,109,-83,-52,128,-82,-122,81,-36,"); add("-105,100,-54,-10,122,-89,103,79,-78,66,104,-92,"); add("-18,101,-74,-145,-63,76,-125,-11,32,-59,130,-89,"); add("-132,44,-11,-122,31,-2,-140,-37,51,-116,-63,67,"); add("-123,-52,59,-148,-9,28,-165,-12,33,-130,47,-18,"); add("-137,6,13,-141,-43,50,-141,43,-15,-120,-13,23,"); add("-120,-62,60,-141,-30,36,-134,-48,49,-126,58,-32,"); add("-147,39,-17,-152,5,8,-152,-1,12,-138,-34,35,"); add("-152,-18,23,-141,-6,11,-140,-63,54,-146,-2,7,"); add("-148,-18,19,-152,-10,12,-146,-17,16,-134,-51,40,"); add("-137,-51,39,-122,-67,50,-94,-101,74,-153,-3,1,"); add("-142,-45,31,-141,-36,24,-96,-91,63,-113,-76,51,"); add("-131,-64,42,-148,-12,3,-148,11,-14,-140,28,-26,"); add("-91,63,-49,-167,-51,26,-149,14,-19,-148,-15,0,"); add("-147,-15,0,-141,43,-42,-112,79,-66,-79,97,-77,"); add("-61,80,-64,-177,-45,16,-75,-108,69,-60,-116,77,"); add("-58,-117,76,-67,-115,73,-74,-111,69,-82,-109,65,"); add("-94,-100,58,-130,-71,31,-136,-61,24,-140,-54,17,"); add("-142,-49,13,-136,-61,21,-108,-86,40,-109,-96,47,"); add("-114,-89,40,-67,-108,58,-32,-126,76,-92,-106,52,"); add("-95,-106,50,-65,-120,64,-22,-130,76,-16,-131,77,"); add("18,-106,67,52,-115,78,-47,-130,68,-87,-111,50,"); add("-97,-107,45,-92,-108,45,-107,-102,39,-124,-81,22,"); add("-137,-67,11,-117,-90,27,-110,-101,34,-137,-63,6,"); add("-142,-53,-1,-148,-33,-13,-149,-22,-22,-131,-55,1,"); add("-102,-108,34,-70,-128,52,-73,-122,47,-62,-129,53,"); add("-110,-97,23,-136,-69,2,-130,-68,2,-97,-100,27,"); add("-63,-128,47,-72,-127,45,-68,-126,43,-24,-137,61,"); add("-48,-134,51,-105,-101,20,-115,-97,14,-113,-102,17,"); add("-124,-85,4,-45,-85,27,-86,-166,50,-81,-132,36,"); add("-63,-120,34,-64,-131,39,-91,-126,28,-120,-81,-2,"); add("-82,-125,28,-39,-135,45,-41,-142,46,-36,-139,45,"); add("11,-63,29,88,49,7,55,-128,68,94,-66,54,"); add("72,-129,71,25,-129,57,-35,-131,40,-72,-140,30,"); add("-12,-75,25,57,-175,80,29,-137,57,23,-139,56,"); add("5,-143,51,-9,-144,46,-25,-144,40,-51,-140,32,"); add("-67,-134,24,-71,-130,20,-54,-138,27,-39,-142,32,"); add("-15,-146,40,-39,-140,30,-86,-127,11,-87,-123,9,"); add("-101,-113,1,-125,-80,-16,-35,-55,4,131,-79,62,"); add("79,-115,55,55,-132,52,48,-37,24,80,37,14,"); add("-24,-130,27,5,-132,35,86,-97,49,143,40,32,"); add("151,15,39,139,11,37,23,-12,9,-165,-14,-43,"); add("-150,-15,-39,-124,-71,-18,-137,66,-57,-95,-40,-19,"); add("4,-145,37,-10,-150,33,68,-38,29,109,-29,39,"); add("169,19,45,140,-28,46,108,53,18,32,16,5,"); add("-131,-86,-16,-144,20,-46,-145,-14,-39,-139,0,-41,"); add("-63,-98,4,132,-84,59,105,-1,30,30,-154,43,"); add("141,35,33,23,-19,11,-4,-74,15,145,44,31,"); add("138,22,33,85,-33,31,-198,-69,-40,68,-43,28,"); add("74,-18,24,-111,-109,-7,57,-133,43,67,-24,23,"); add("37,-29,16,51,-69,28,93,5,23,42,-89,29,"); add("50,7,12,-20,-138,21,87,-128,47,146,-64,49,"); add("100,-103,43,114,-63,40,40,-145,35,105,-106,43,"); add("55,-111,32,51,-127,32,3,-125,20,49,-47,19,"); add("-112,-70,-15,99,-97,37,66,-128,34,69,-98,30,"); add("130,-47,35,64,-103,28,124,-117,43,137,-54,36,"); add("123,-81,35,103,-103,34,110,-85,32,132,-68,34,"); add("80,-100,27,164,-73,38,115,-81,30,105,-101,29,"); add("109,-105,30,109,-98,28,107,-112,28,118,-87,27,"); add("130,-70,27,131,-69,26,132,-73,26,140,-50,24,"); add("136,-62,24,144,-33,22,137,60,13,138,61,12,"); add("135,58,12,141,51,12,143,53,11,140,57,10,"); add("154,36,13,144,15,12,80,34,4,221,-11,21,"); add("150,21,10,153,12,10,31,26,0,-186,-21,-12,"); add("-70,16,-7,216,24,15,145,2,10,70,-27,7,"); add("241,-37,18,88,41,1,74,-80,12,215,-66,16,"); add("148,-42,10,139,-66,11,145,61,0,127,75,-3,"); add("152,42,0,142,47,-2,142,46,-2,131,71,-5,"); add("138,62,-5,135,65,-7,139,51,-5,127,55,-7,"); add("-86,84,-8,179,-137,12,126,67,-9,101,104,-12,"); add("145,45,-9,147,33,-7,150,23,-8,151,18,-8,"); add("151,15,-8,152,14,-9,152,2,-8,118,66,-15,"); add("96,-12,-4,194,-39,-9,150,-20,-8,138,-57,-5,"); add("119,-93,1,116,-123,3,104,-60,-4,93,-111,3,"); add("72,-52,-2,-60,-116,16,22,-115,9,66,-152,6,"); add("111,-118,-1,127,-59,-9,123,10,-14,172,14,-20,"); add("81,57,-14,16,106,-11,97,-87,-4,83,20,-12,"); add("13,34,-5,114,-41,-11,107,4,-14,144,-25,-18,"); add("172,14,-25,57,94,-16,10,60,-7,117,-110,-8,"); add("125,-37,-16,93,-200,1,128,-95,-14,128,-3,-20,"); add("103,-40,-15,18,-169,8,77,-131,-5,50,-132,-1,"); add("-31,-147,13,-24,-149,11,-20,-146,10,0,-155,5,"); add("-58,-164,16,-80,-104,16,-38,-144,10,131,-77,-21,"); add("-34,-206,9,-55,-13,9,-78,-47,14,106,-119,-17,"); add("145,-47,-25,-5,-38,1,-148,11,26,-107,24,17,"); add("-17,-219,3,-58,-133,9,-72,-120,10,-86,-22,13,"); add("-68,14,11,81,-166,-15,78,-129,-15,131,-79,-23,"); add("25,-86,-7,-143,111,26,-24,16,5,89,-154,-19,"); add("76,-104,-16,30,-67,-7,110,-201,-26,122,-55,-23,"); add("48,-37,-10,-95,-2,16,116,-113,-26,116,-93,-25,"); add("108,-103,-25,91,-120,-24,103,-106,-26,89,-118,-25,"); add("104,-105,-28,95,-110,-27,110,-104,-30,78,-131,-27,"); add("57,-122,-23,82,-96,-26,50,-176,-27,-13,-142,-11,"); add("102,-132,-36,104,-28,-26,127,73,-21,93,-26,-24,"); add("-201,-68,38,-145,-55,26,65,-176,-34,77,-125,-32,"); add("81,-121,-33,28,-149,-25,49,-142,-31,54,-139,-31,"); add("63,-136,-34,66,-131,-35,13,-141,-25,-66,-116,-2,"); add("-103,-102,7,18,-151,-29,41,-143,-34,36,-135,-32,"); add("49,-132,-35,63,-140,-41,80,-124,-43,39,-130,-35,"); add("20,-148,-34,-29,-145,-23,-11,-149,-29,-32,-147,-24,"); add("-72,-145,-14,-85,-112,-5,-122,-66,14,-122,-104,4,"); add("-63,-130,-16,-105,-105,-2,-74,-124,-13,-34,-157,-32,"); add("-69,-133,-19,-16,-143,-33,-36,-147,-32,-55,-134,-24,"); add("-50,-135,-26,-44,-152,-34,-93,-118,-14,-41,-114,-24,"); add("0,-144,-43,2,-144,-43,-19,-144,-41,-27,-148,-40,"); add("-22,-140,-40,-12,-144,-44,14,-143,-49,61,-126,-55,"); add("56,-127,-56,98,-104,-56,78,-117,-58,64,-122,-58,"); add("51,-130,-58,58,-125,-59,57,-126,-59,67,-119,-60,"); add("36,-136,-61,39,-134,-61,51,-126,-61,67,-120,-64,"); add("69,-117,-64,50,-128,-65,77,-111,-65,74,-113,-66,"); add("50,-126,-66,16,-135,-62,-51,-115,-38,-7,-166,-71,"); add("-8,-132,-57,-15,-140,-60,-13,-136,-59,33,-133,-71,"); add("44,-122,-69,31,-129,-70,-17,-137,-62,0,-135,-66,"); add("-2,-133,-66,18,-132,-71,21,-122,-68,21,-125,-70,"); add("12,-128,-71,19,-130,-74,41,-121,-76,52,-119,-79,"); add("58,-116,-80,84,-100,-79,88,-94,-78,98,-93,-81,"); add("61,-104,-78,59,-112,-82,37,-121,-82,30,-125,-83,"); add("16,-127,-81,24,-125,-83,31,-121,-83,45,-116,-86,"); add("41,-117,-86,51,-113,-88,57,-108,-87,61,-107,-90,"); add("21,-123,-87,-4,-129,-84,-31,-128,-75,-113,-90,-23,"); add("-98,-49,-2,35,-95,-76,20,-75,-58,78,-152,-131,"); add("6,-123,-89,-60,-113,-60,47,-37,-42,134,23,-29,"); add("68,-84,-84,108,-67,-86,80,-84,-90,125,-33,-69,"); add("120,35,-18,134,79,9,151,38,-29,129,19,-35,"); add("138,-2,-56,150,15,-49,131,79,6,134,50,-18,"); add("145,18,-47,117,-26,-69,139,5,-55,142,26,-43,"); add("131,-22,-74,122,-33,-80,139,-17,-76,122,77,1,"); add("139,-10,-74,110,29,-30,112,94,16,135,-5,-70,"); add("135,4,-64,138,53,-30,135,59,-24,131,75,-13,"); add("131,75,-12,129,77,-12,124,90,-1,128,79,-11,"); add("122,91,-1,118,93,2,113,99,8,113,99,7,"); add("126,83,-13,126,80,-15,115,101,4,108,105,10,"); add("101,112,18,98,113,19,95,118,24,103,110,12,"); add("87,122,29,106,111,9,112,98,-4,119,92,-13,"); add("122,70,-31,127,93,-20,85,115,20,83,127,29,"); add("55,132,47,65,130,40,76,128,29,70,131,35,"); add("48,133,49,45,135,51,-9,92,60,-74,102,107,"); add("104,114,-1,117,120,-7,131,81,-40,122,53,-51,"); add("130,55,-55,130,46,-62,131,49,-61,130,49,-63,"); add("128,60,-55,110,95,-25,103,114,-9,70,138,25,"); add("-30,65,57,76,199,53,59,134,28,32,109,34,"); add("26,155,61,42,142,42,-38,14,34,-44,-59,2,"); add("31,186,71,10,140,62,-18,132,76,3,115,53,"); add("15,152,60,-54,105,86,-37,109,76,49,147,32,"); add("20,140,48,3,59,24,117,-35,-97,114,87,-42,"); add("108,102,-32,96,108,-23,120,104,-41,123,58,-66,"); add("95,68,-40,108,117,-32,117,122,-36,72,132,-1,"); add("115,90,-50,109,78,-51,120,74,-63,119,65,-67,"); add("99,59,-54,147,55,-94,106,38,-70,135,57,-87,"); add("102,89,-48,115,73,-66,102,97,-48,86,104,-32,"); add("85,115,-28,98,117,-40,99,115,-41,60,144,0,"); add("42,99,0,42,96,-3,30,174,35,-10,83,36,"); add("-10,101,43,18,182,45,13,138,32,22,135,24,"); add("6,161,44,47,139,1,-9,159,54,25,141,20,"); add("4,141,35,10,153,33,10,126,25,63,149,-15,"); add("25,140,13,-29,151,62,-84,79,90,-85,64,86,"); add("-73,102,85,-2,156,37,-21,134,47,-19,149,47,"); add("-19,119,39,-35,164,61,14,142,16,54,146,-17,"); add("-35,114,49,11,161,18,59,120,-28,44,119,-17,"); add("-78,96,80,-61,118,67,-77,87,75,-36,161,52,"); add("23,148,1,52,143,-24,50,144,-23,41,151,-15,"); add("49,140,-25,92,92,-66,62,139,-37,37,138,-18,"); add("72,152,-47,26,97,-13,71,122,-50,52,152,-33,"); add("18,145,-6,101,86,-81,107,41,-89,71,113,-55,"); add("34,134,-23,127,38,-109,89,107,-74,72,119,-59,"); add("65,140,-53,52,131,-44,71,99,-62,80,121,-71,"); add("70,106,-63,82,114,-75,76,109,-70,75,111,-70,"); add("75,110,-71,75,109,-74,81,101,-79,85,91,-84,"); add("78,102,-78,80,99,-82,85,91,-87,87,85,-89,"); add("91,74,-94,92,69,-97,90,77,-95,89,76,-96,"); add("78,96,-87,69,108,-80,73,103,-84,71,105,-82,"); add("66,112,-80,64,112,-79,66,109,-81,64,110,-82,"); add("61,115,-78,62,112,-81,49,125,-69,40,132,-62,"); add("51,123,-73,53,119,-77,47,126,-71,43,128,-69,"); add("38,132,-64,12,144,-39,20,142,-48,32,134,-61,"); add("42,124,-73,44,123,-75,31,137,-65,11,140,-43,"); add("58,113,-94,38,127,-74,30,129,-66,24,138,-63,"); add("42,119,-80,33,131,-74,-10,152,-29,-2,147,-38,"); add("-10,152,-31,69,73,-106,24,26,-38,-53,40,54,"); add("-13,145,-27,-24,153,-18,-28,142,-10,15,138,-62,"); add("-35,100,10,-105,49,113,-83,-34,112,-46,-113,93,"); add("-75,-66,111,-89,-32,116,-91,-28,117,-82,-53,112,"); add("-93,-32,117,-101,25,108,-98,-13,116,-83,-61,110,"); add("-98,-19,115,-101,15,106,-96,-14,108,-74,-80,104,"); add("-79,-74,105,-87,-57,108,-101,22,101,-113,29,108,"); add("-91,-1,94,-84,-72,105,-85,-65,103,-86,-55,101,"); add("-112,-5,112,-109,12,104,-102,86,77,-96,96,67,"); add("-86,113,52,-74,136,34,-89,95,57,-99,63,75,"); add("-117,-24,116,-43,19,34,87,98,-107,88,66,-102,"); add("77,82,-96,-35,155,-13,-75,117,35,-92,112,52,"); add("-100,62,73,-97,117,53,-86,83,52,-79,138,26,"); add("-97,97,57,-109,73,73,-94,111,46,-86,117,37,"); add("-94,110,44,-121,46,89,-92,89,49,-102,50,70,"); add("-112,33,83,-66,134,8,-86,29,62,-21,-93,50,"); add("-96,161,23,-64,103,15,-85,138,19,-56,143,-7,"); add("-44,144,-19,-46,136,-16,-62,143,-5,-64,135,-2,"); add("-76,133,7,-83,129,14,-79,109,17,-110,64,60,"); add("-100,91,41,-122,107,49,-110,57,61,-78,129,4,"); add("-59,140,-16,-63,146,-17,-32,132,-35,-52,137,-23,"); add("-33,149,-44,-47,136,-28,-56,143,-27,10,76,-44,"); add("-128,195,1,-63,134,-19,-57,131,-24,-120,83,47,"); add("-108,96,31,-111,87,37,-134,73,59,-73,102,0,"); add("-93,125,0,-48,134,-37,-20,153,-68,43,57,-62,"); add("-128,103,35,-123,123,19,-84,121,-9,-82,124,-13,"); add("-91,123,-7,-86,122,-10,-91,122,-9,-96,117,-3,"); add("-91,122,-10,-92,124,-13,-67,126,-30,-68,124,-31,"); add("-88,115,-12,-105,134,-13,-42,105,-39,-113,113,2,"); add("-110,104,6,-106,108,-1,-95,114,-12,-85,119,-24,"); add("-61,127,-45,-109,113,-7,-5,135,-88,49,1,-32,"); add("86,-151,47,88,-107,16,114,-104,-5,80,-117,25,"); add("65,-125,39,116,-100,-12,110,-101,-7,115,-93,-18,"); add("134,-51,-58,42,108,-98,-38,135,-61,8,122,-86,"); add("-7,130,-82,-17,126,-74,10,119,-87,50,-2,-33,"); add("14,-138,84,20,-130,74,25,-132,70,-1,-137,90,"); add("43,-69,16,141,-10,-92,115,-95,-20,98,-116,6,"); add("97,-116,4,94,-115,6,104,-108,-7,100,-114,-2,"); add("94,-115,2,99,-119,1,85,-103,-1,86,-96,-7,"); add("104,-120,-6,97,-117,-3,58,-142,39,51,-108,23,"); add("104,-121,-9,102,-81,-32,121,-53,-64,122,-83,-49,"); add("111,-96,-33,94,-121,-7,87,-129,1,76,-122,6,"); add("68,-99,0,98,-169,11,16,-130,55,19,-142,59,"); add("68,-123,8,49,-139,31,60,-134,18,101,-119,-23,"); add("83,-108,-17,97,-113,-24,110,-56,-65,124,-71,-71,"); add("111,-91,-51,98,-97,-38,86,-115,-20,88,-136,-13,"); add("80,-130,-9,64,-143,8,90,-117,-27,73,-128,-7,"); add("90,-126,-26,106,-94,-54,103,-93,-53,82,-118,-25,"); add("58,-121,-2,102,-128,-40,72,-124,-16,53,-141,8,"); add("41,-148,20,-12,-138,64,40,-140,17,12,-117,33,"); add("97,-176,-26,53,-134,-1,28,-110,13,65,-183,2,"); add("74,-127,-25,29,-144,20,24,-145,25,74,-136,-27,"); add("75,-114,-35,127,-42,-108,105,-7,-100,93,42,-104,"); add("94,34,-103,92,9,-95,64,101,-96,81,71,-105,"); add("62,98,-97,96,35,-111,104,10,-111,104,4,-111,"); add("93,36,-111,90,45,-112,89,46,-113,65,93,-104,"); add("76,71,-111,96,5,-108,94,6,-109,90,45,-118,"); add("46,110,-96,44,108,-93,76,66,-115,80,52,-115,"); add("89,32,-118,84,36,-116,73,67,-115,87,32,-120,"); add("85,34,-121,80,47,-119,70,61,-116,65,68,-113,"); add("63,83,-118,-38,151,-21,3,138,-69,50,93,-110,"); add("72,53,-121,73,52,-121,76,43,-124,78,34,-123,"); add("68,63,-125,69,47,-119,86,6,-123,92,-28,-116,"); add("73,43,-127,10,133,-87,-30,138,-32,27,112,-102,"); add("75,35,-129,79,18,-128,73,30,-126,22,110,-100,"); add("-19,144,-57,15,115,-93,54,64,-124,69,33,-128,"); add("80,10,-133,2,92,-61,-55,140,-5,-51,141,-14,"); add("-17,137,-65,-21,139,-62,8,116,-95,56,-22,-73,"); add("66,-9,-102,-3,146,-99,-3,110,-77,9,114,-100,"); add("31,90,-120,15,102,-103,-7,124,-86,-6,121,-87,"); add("-19,131,-74,-69,85,49,-92,72,98,-86,113,51,"); add("-88,108,57,-85,116,46,-84,92,60,-86,26,120,"); add("-94,38,120,-88,27,117,-94,42,114,-95,53,104,"); add("-96,94,71,-91,110,48,-89,112,42,-81,127,16,"); add("-63,134,-18,-55,135,-33,-63,129,-17,-35,140,-71,"); add("-52,93,-3,-22,-178,188,-23,-89,111,-31,-81,115,"); add("-14,-111,114,-22,-100,113,-38,-91,128,-14,-93,94,"); add("-5,-92,80,-19,-114,115,-59,-61,127,-80,-22,127,"); add("-96,21,114,-89,18,106,-100,6,127,-65,-24,103,"); add("-64,-60,127,-97,15,113,-96,115,39,-70,26,69,"); add("-65,57,41,-26,95,-37,3,161,-123,-50,136,-40,"); add("-70,137,-16,-27,111,-52,-102,122,33,-82,23,85,"); add("-7,-115,97,20,-126,72,18,-129,75,64,-135,22,"); add("9,-77,45,-113,146,31,-93,140,8,-98,105,39,"); add("-90,132,9,-23,84,-37,-31,122,-57,-81,129,-4,"); add("-84,90,30,-110,86,63,-92,67,55,-105,120,27,"); add("-124,79,80,-67,94,2,-102,129,12,-94,130,1,"); add("-90,122,1,-88,113,7,-90,119,1,-95,94,26,"); add("-62,54,23,42,90,-122,-74,158,-54,147,-35,-134,"); add("67,37,-108,6,90,-87,-19,107,-73,55,-45,-23,"); add("112,-93,-47,102,-43,-82,82,50,-141,100,-108,-22,"); add("108,-111,-30,108,-99,-43,85,-130,11,92,-103,-22,"); add("97,-111,-22,82,-131,12,93,-121,-12,100,-103,-37,"); add("101,-51,-85,102,-25,-107,108,-63,-87,106,-94,-58,"); add("89,-88,-41,105,-72,-78,110,-54,-100,100,-94,-55,"); add("94,-33,-101,91,-5,-120,100,-57,-91,92,-32,-103,"); add("48,68,-126,57,50,-127,39,69,-119,56,56,-132,"); add("49,61,-129,83,0,-125,98,-44,-108,79,-89,-38,"); add("83,-141,4,68,-132,15,71,-127,4,94,-116,-41,"); add("101,-37,-127,84,-36,-101,86,-23,-117,79,-2,-127,"); add("89,-42,-109,82,-30,-108,72,8,-130,86,-24,-124,"); add("84,-14,-132,73,-2,-126,91,-52,-112,86,-30,-126,"); add("85,-25,-130,53,13,-111,73,-23,-115,51,29,-124,"); add("37,18,-89,69,19,-152,70,-4,-133,68,5,-141,"); add("32,59,-126,66,6,-143,86,-53,-119,67,-15,-125,"); add("51,34,-146,51,22,-136,61,1,-135,50,25,-140,"); add("53,20,-141,20,17,-67,132,-165,-108,64,-132,8,"); add("78,-36,-142,59,-87,-36,69,-126,-17,82,-136,-38,"); add("70,-92,-62,67,-7,-154,61,-60,-82,52,-32,-93,"); add("17,75,-133,9,-7,-15,4,-112,125,62,-112,-24,"); add("74,-107,-64,77,-73,-112,72,-61,-117,65,-33,-136,"); add("30,42,-131,32,47,-146,39,-4,-103,24,-180,155,"); add("-30,-54,148,-31,-37,130,-49,-18,149,-33,-6,93,"); add("89,-158,-53,73,-92,-89,77,-102,-89,74,-102,-84,"); add("74,-110,-77,72,-96,-92,71,-77,-110,65,-51,-127,"); add("38,23,-139,27,56,-143,17,60,-125,22,64,-145,"); add("-8,94,-95,-34,140,-75,-74,137,55,-40,161,-91,"); add("18,29,-95,54,-38,-120,36,-139,72,52,-115,-11,"); add("41,-10,-118,11,-135,145,66,-140,-30,66,-125,-54,"); add("51,-142,20,31,-133,66,38,-139,50,47,-133,11,"); add("54,-123,-26,54,-119,-33,48,-125,-8,43,-134,15,"); add("53,-149,-4,47,-129,-8,60,-158,-19,53,-138,-25,"); add("50,-137,-17,51,-145,-13,54,-159,-12,35,-108,-4,"); add("59,-160,-35,51,-123,-49,60,-131,-71,47,-113,-50,"); add("54,-157,-34,58,-129,-77,53,-122,-70,39,-100,-44,"); add("44,-137,-28,54,-154,-52,41,-124,-33,36,-139,-4,"); add("48,-169,-26,36,-109,-40,52,-167,-50,45,-130,-56,"); add("48,-119,-81,46,-117,-82,44,-128,-66,41,-123,-60,"); add("41,-147,-44,37,-137,-39,41,-140,-55,36,-126,-51,"); add("28,-99,-42,30,-135,-22,34,-195,-1,29,-109,-48,"); add("35,-111,-67,47,-161,-94,39,-116,-90,40,-98,-112,"); add("39,-50,-139,23,51,-139,15,82,-129,-5,131,-67,"); add("-13,127,-37,4,120,-113,21,47,-142,22,41,-143,"); add("30,-9,-149,5,5,-30,-40,53,161,-26,128,22,"); add("-6,125,-84,-9,129,-72,-2,108,-91,25,-3,-132,"); add("5,62,-91,-29,150,1,-28,148,-7,-38,164,28,"); add("-23,115,1,-29,160,-28,-21,155,-68,-10,107,-78,"); add("-19,133,-65,-27,145,-36,-29,146,-33,-32,122,17,"); add("-28,89,40,-35,149,-13,-45,151,39,-32,147,-39,"); add("-38,128,24,-43,146,21,-34,145,-30,-27,134,-66,"); add("-14,110,-99,16,30,-147,14,-6,-75,1,34,-72,"); add("-26,154,-116,-3,70,-117,24,-12,-144,7,49,-146,"); add("-8,83,-127,-38,140,-30,-32,120,-35,-12,88,-121,"); add("-3,64,-137,-7,76,-139,-18,89,-88,-25,114,-107,"); add("-13,87,-134,-9,70,-133,-26,108,-106,-25,104,-102,"); add("-30,113,-95,-28,101,-68,-28,113,-137,-21,87,-122,"); add("-9,29,-19,-4,-10,94,-34,124,-122,27,-56,-83,"); add("-1,45,-207,-23,87,-134,-13,53,-105,-35,116,-129,"); add("-37,110,-67,-31,89,-47,-61,153,48,-49,129,-38,"); add("-29,92,-116,-9,39,-146,-12,44,-145,-34,95,-113,"); add("-49,127,-48,-29,67,32,62,-145,-77,57,-142,-11,"); add("8,-13,-68,-14,40,-98,-52,133,-70,75,-182,-57,"); add("-12,35,-112,-44,109,-9,33,-76,-139,-48,120,-77,"); add("-21,54,-26,65,-162,-49,-42,106,-96,-59,144,-14,"); add("-1,4,-21,61,-150,-42,33,-82,-72,-48,117,-129,"); add("-48,115,-84,-57,138,37,-53,128,7,-57,134,0,"); add("-44,104,54,-21,49,122,-39,88,132,-26,59,139,"); add("-22,48,48,3,-3,-138,47,-107,-105,34,-78,-126,"); add("4,-12,-148,72,-167,-24,44,-106,-87,15,-43,-144,"); add("-5,4,-156,46,-116,-110,54,-137,-75,48,-121,-40,"); add("56,-142,-41,52,-133,-24,53,-139,-34,45,-123,-74,"); add("9,-27,-38,-22,59,8,54,-149,-71,38,-114,-94,"); add("9,-30,-61,-24,61,-13,48,-135,-53,3,-16,-54,"); add("-16,36,-44,62,-169,-7,0,-8,-58,-17,26,-129,"); add("27,-95,-117,32,-103,-77,45,-136,-47,24,-40,146,"); add("33,-125,-154,-37,96,-55,58,-178,-50,28,-93,-52,"); add("48,-161,-73,39,-130,-51,43,-142,-32,38,-126,-30,"); add("48,-147,26,49,-146,40,47,-148,37,40,-122,44,"); add("44,-147,15,2,-29,-76,-42,117,-105,-17,42,-53,"); add("50,-175,-19,-23,51,-92,33,-122,-32,-32,84,-84,"); add("15,-70,-58,-15,39,-41,26,-110,-54,-39,103,-107,"); add("-43,117,-85,-33,69,-124,-36,88,-93,-24,83,4,"); add("-3,-54,-168,-48,120,-98,-41,123,-30,-44,128,-30,"); add("31,-151,-129,40,-155,-57,14,-85,-92,-2,-35,-92,"); add("56,-180,20,30,-130,-54,37,-146,-32,38,-142,-12,"); add("37,-146,-21,27,-134,-67,33,-147,-32,30,-143,-55,"); add("37,-155,-14,11,-70,-40,-28,99,-27,29,-160,-70,"); add("21,-130,-68,26,-144,-58,29,-148,-37,31,-141,-4,"); add("31,-141,3,33,-158,-10,6,-71,-55,13,-72,-15,"); add("33,-145,19,33,-156,14,36,-130,69,29,-134,26,"); add("26,-148,-14,2,-59,-53,-15,50,-44,39,-168,63,"); add("27,-129,31,34,-153,54,26,-142,18,30,-145,45,"); add("22,-137,11,7,-139,-93,-24,27,-135,5,-134,-93,"); add("-1,-104,-102,-2,-95,-95,3,-152,-107,-7,-70,-96,"); add("7,-124,-52,1,-114,-73,-5,-112,-101,1,-126,-77,"); add("1,-132,-75,11,-156,-28,14,-142,-6,10,-151,-22,"); add("7,-139,-30,-4,-115,-74,12,-146,0,3,-140,-38,"); add("-2,-122,-58,-9,-132,-95,-10,-122,-90,-10,-121,-86,"); add("5,-156,-18,-14,-115,-96,-23,-76,-131,-18,-93,-106,"); add("-24,-88,-128,-27,-66,-136,-22,-98,-112,-27,-72,-129,"); add("-28,-72,-129,-22,-96,-106,-20,-35,-86,-40,49,-157,"); add("-22,21,-88,-26,2,-102,8,154,50,10,136,59,"); add("11,135,65,13,138,78,24,89,116,8,136,63,"); add("-8,153,2,-6,142,11,-5,153,23,-15,144,-22,"); add("-16,146,-19,-9,152,15,1,137,55,5,133,70,"); add("9,123,90,20,85,124,15,100,112,6,121,87,"); add("16,85,115,19,71,126,11,103,109,3,127,88,"); add("19,58,133,31,-16,146,18,68,134,12,80,121,"); add("8,86,105,-2,133,85,-15,41,-55,3,-124,-72,"); add("0,-49,-38,-16,196,57,-14,146,35,-16,147,32,"); add("-2,103,72,-2,124,97,-20,150,21,-12,142,64,"); add("29,-19,151,12,45,117,-18,149,43,-22,146,25,"); add("-28,150,-11,-27,123,-22,-36,141,-59,-35,128,-61,"); add("-34,150,-27,-37,143,-45,-40,134,-67,-38,133,-56,"); add("-36,134,-38,-30,149,21,-36,144,-20,-34,137,-9,"); add("-28,122,7,-37,54,-137,-33,23,-144,-16,-59,-160,"); add("39,-162,-1,37,-146,12,9,-83,-52,-31,-7,-164,"); add("-30,8,-140,-27,-21,-151,-7,-56,-96,-5,-88,-112,"); add("-10,-97,-145,-5,-87,-105,13,-135,-73,-4,-53,-63,"); add("29,-193,-50,21,-154,-43,-36,34,-123,-30,51,-83,"); add("19,-149,-42,27,-125,12,-38,23,-137,-34,-36,-164,"); add("-18,-78,-129,-9,-95,-104,-27,-58,-142,7,-100,-41,"); add("46,-128,86,27,-147,6,26,-152,2,17,-163,-35,"); add("12,-82,-2,-52,57,-162,-42,111,-88,-42,110,-85,"); add("-46,58,-132,-51,62,-140,-25,121,-13,4,123,89,"); add("-1,39,21,-18,-128,-141,-39,-14,-140,-9,147,56,"); add("3,81,64,-30,-77,-152,4,97,73,-40,11,-127,"); add("-6,92,40,-42,114,-68,-40,10,-127,-32,-63,-142,"); add("-59,75,-141,-54,62,-131,-50,90,-97,-53,60,-123,"); add("-58,91,-120,-54,71,-114,-46,100,-72,-41,93,-60,"); add("-37,148,-13,-31,158,14,-30,109,-13,-50,117,-63,"); add("-30,153,20,-15,138,55,-25,124,17,-34,152,15,"); add("-28,158,39,-20,136,50,-22,134,43,-15,136,65,"); add("-26,140,40,0,105,90,3,119,114,-8,120,83,"); add("-7,106,75,14,94,131,14,90,130,7,80,101,"); add("10,118,149,-10,109,83,7,95,122,-2,105,108,"); add("-3,106,110,-15,45,-3,-38,137,29,4,83,113,"); add("1,91,112,-17,130,97,-20,110,68,-57,138,-24,"); add("-54,137,-16,-55,130,-24,-66,120,-76,-58,70,-105,"); add("-72,109,-102,-57,131,-21,-57,108,-48,-36,71,-26,"); add("-45,12,-132,-61,63,-114,-59,95,-65,-72,78,-126,"); add("-46,24,-111,-62,43,-134,-41,48,-62,-34,60,-27,"); add("-14,-62,-118,-10,-97,-149,-36,-22,-129,-64,65,-103,"); add("2,-104,-116,77,-141,52,45,-140,-33,24,-120,-67,"); add("17,-115,-77,-58,-12,-173,-57,124,-22,-18,111,74,"); add("-26,121,63,-73,123,-61,-16,13,-28,-46,17,-105,"); add("-78,58,-139,-50,16,-113,-62,28,-127,-75,77,-107,"); add("-63,51,-103,-62,6,-144,-29,49,-18,-32,-36,-116,"); add("-70,53,-111,-73,78,-93,-56,79,-47,-13,65,38,"); add("-30,-67,-139,-58,161,33,-19,119,82,-75,112,-55,"); add("-2,-33,-39,34,-104,-32,5,-131,-123,-1,-80,-85,"); add("-55,26,-96,-54,54,-65,-40,45,-43,-53,30,-85,"); add("-32,-3,-73,-87,63,-122,-50,-9,-116,-65,19,-116,"); add("-71,17,-130,-80,46,-117,-98,116,-87,-28,51,-6,"); add("-14,31,1,-91,99,-85,-74,32,-114,-103,87,-115,"); add("-79,73,-82,-82,82,-76,-50,91,-8,-13,71,46,"); add("-78,49,-99,-77,5,-139,-82,111,-44,-83,71,-82,"); add("-64,95,-23,-62,48,-66,-44,102,22,-40,-15,-85,"); add("-28,-6,-56,-58,141,35,-39,101,30,46,34,115,"); add("-127,87,-137,-54,85,-10,-56,143,46,-47,-20,-103,"); add("15,-44,-16,-73,105,-22,-90,112,-42,-64,95,-13,"); add("-115,119,-74,-79,122,-6,-41,102,36,-5,21,13,"); add("-83,22,-116,-94,84,-69,-101,50,-113,-20,139,110,"); add("1,35,40,-102,57,-106,-29,101,59,-77,74,-46,"); add("-58,12,-81,-32,114,70,67,-11,98,-159,133,-114,"); add("-20,42,13,50,52,138,8,96,119,63,18,124,"); add("116,-69,116,31,53,113,29,28,82,-126,35,-174,"); add("-93,81,-63,-105,73,-90,-99,59,-93,-86,56,-77,"); add("-34,133,99,25,76,128,10,90,123,40,56,135,"); add("4,74,95,73,9,136,76,5,137,5,99,132,"); add("-36,38,-15,11,-124,-136,-72,8,-113,-84,29,-107,"); add("-24,-78,-135,-62,-21,-130,-51,-42,-133,-70,17,-93,"); add("-12,121,124,7,78,105,-13,101,103,33,74,145,"); add("-62,121,49,-41,121,84,-33,114,91,-36,114,88,"); add("-44,117,81,-44,121,87,19,71,130,38,52,136,"); add("15,79,139,1,59,85,-94,108,-13,-104,105,-34,"); add("-115,101,-56,-91,70,-58,-105,97,-40,-64,75,-3,"); add("-66,-10,-127,-103,105,-21,-82,81,-20,-136,62,-137,"); add("-76,32,-78,-125,58,-119,-47,-24,-109,-91,71,-42,"); add("-94,124,27,58,52,166,74,-12,100,64,25,141,"); add("39,56,147,23,65,135,97,-31,118,88,-61,57,"); add("129,-98,73,102,-82,52,80,-6,131,25,59,137,"); add("-74,118,55,-84,108,19,-38,109,106,59,10,125,"); add("65,14,144,24,51,131,-22,92,115,-74,112,52,"); add("-105,109,-13,-101,67,-74,-37,-43,-143,-102,33,-130,"); add("-65,19,-86,-133,124,-31,-106,97,-22,-106,68,-72,"); add("-105,53,-95,-110,54,-98,-106,87,-34,-134,101,-57,"); add("-102,77,-41,-78,4,-122,-71,-5,-122,0,-91,-149,"); add("60,-97,-60,113,-96,28,108,-82,42,123,-93,52,"); add("88,-91,0,-19,-77,-152,136,-111,47,93,-79,32,"); add("-144,58,-147,-113,62,-85,-115,90,-44,-111,61,-81,"); add("-113,56,-91,-106,46,-91,-97,31,-101,-93,3,-134,"); add("-105,44,-89,-1,-105,-155,-62,-37,-142,-27,-60,-125,"); add("94,-121,-38,106,-109,-4,-1,-61,-85,-7,-28,-51,"); add("120,-40,116,118,-122,0,52,-66,-17,-29,-65,-130,"); add("-35,-59,-128,-109,51,-83,-59,-48,-147,-101,-1,-137,"); add("24,-67,-55,65,-148,-103,37,-87,-62,39,-74,-39,"); add("87,11,130,88,-84,13,26,-142,-142,57,-118,-69,"); add("16,-93,-91,119,-132,1,112,-116,12,74,-115,-36,"); add("25,-109,-94,66,-86,-11,-7,-85,-108,-97,52,-70,"); add("-111,45,-94,-37,-21,-73,-70,78,-3,-81,57,-40,"); add("-112,37,-103,-90,-7,-121,-106,68,-57,-97,-5,-126,"); add("-126,95,-48,-86,98,4,-101,132,28,-28,89,67,"); add("-63,130,74,-78,121,47,-64,123,66,-43,115,85,"); add("-18,107,106,-15,103,109,-2,97,117,-18,104,107,"); add("-29,108,102,-13,98,110,27,76,134,18,79,126,"); add("-3,85,110,-93,116,36,-98,88,-8,-119,65,-63,"); add("-108,31,-97,-125,72,-58,-123,70,-58,-122,86,-33,"); add("-120,63,-62,-97,76,-14,-88,121,59,-57,107,81,"); add("-116,101,0,-118,89,-16,-123,77,-37,-113,40,-77,"); add("-117,100,6,-124,41,-85,-107,85,-3,-127,95,-8,"); add("-61,9,-56,-24,-24,-61,-64,8,-58,50,-110,-99,"); add("-88,-27,-132,-63,-35,-115,-145,38,-102,-118,38,-73,"); add("-132,67,-45,-131,59,-55,-129,67,-41,-130,83,-18,"); add("-121,80,-12,-106,90,18,-121,90,6,-129,72,-29,"); add("-123,89,5,-125,84,-4,-126,85,-1,-132,74,-20,"); add("-129,82,-5,-128,80,-6,-125,85,6,-114,92,27,"); add("-114,91,26,-109,100,45,-119,88,21,-131,79,0,"); add("-116,93,34,-120,89,25,-134,76,-3,-132,74,-3,"); add("-118,84,25,-97,100,66,-71,79,59,-102,100,66,"); add("-105,106,75,-63,93,90,-75,74,54,-61,108,117,"); add("-79,93,83,-110,89,51,-105,100,74,-107,80,43,"); add("-132,75,15,-109,82,47,-36,61,73,-24,76,107,"); add("-79,91,89,19,67,129,-18,21,21,-106,11,-66,"); add("-41,73,92,32,53,118,48,67,155,-14,78,128,"); add("23,66,140,68,17,87,116,-7,88,92,-13,56,"); add("94,-97,-96,121,-86,-49,36,8,46,-84,73,57,"); add("198,-81,31,88,15,107,-139,99,55,-15,57,95,"); add("-48,44,39,132,-65,-1,101,-71,-41,56,19,90,"); add("-109,95,76,-84,83,80,0,44,86,127,-10,101,"); add("86,14,110,30,54,137,-139,80,23,-137,46,-42,"); add("-135,61,-7,-136,58,-12,-136,51,-26,-136,54,-17,"); add("-142,64,0,-143,71,15,-119,71,38,-139,69,17,"); add("-130,52,-6,-149,58,-10,-141,57,-1,-142,57,-2,"); add("-125,55,9,-115,77,66,-138,60,13,-145,46,-19,"); add("-135,63,25,-131,63,30,-145,46,-15,-144,29,-48,"); add("-126,9,-75,-131,2,-89,-103,-2,-78,-145,8,-85,"); add("-73,-25,-101,-59,-25,-91,-125,51,20,-111,-21,-115,"); add("-110,-10,-90,-144,20,-50,-93,-27,-111,-87,54,54,"); add("-145,67,47,-122,0,-72,-96,-31,-117,-70,-24,-85,"); add("-163,1,-89,-50,-59,-140,-12,-32,-67,158,-11,64,"); add("80,-49,-49,-105,-24,-102,-154,32,-21,-130,-6,-79,"); add("-155,53,20,-111,-1,-57,-135,-2,-70,-150,10,-52,"); add("-53,63,93,122,17,89,33,27,67,-87,73,97,"); add("-111,65,72,-127,62,59,-142,49,30,-136,52,41,"); add("-111,67,81,-142,54,45,-96,68,93,-145,51,42,"); add("-138,21,-15,-134,3,-48,-143,18,-19,-112,-14,-72,"); add("-69,-19,-64,-127,17,-11,106,-88,-136,73,-56,-82,"); add("-17,-66,-133,-14,-67,-133,-156,43,26,-129,56,62,"); add("-127,53,61,-121,47,50,-165,41,27,-100,5,-21,"); add("-39,83,150,-67,73,125,-70,56,90,-158,25,6,"); add("-138,1,-37,-115,-32,-97,-19,-22,-49,170,0,48,"); add("129,-52,-68,49,-72,-127,69,-67,-110,37,-63,-111,"); add("81,-63,-95,66,-61,-96,131,-36,-28,169,-43,-28,"); add("150,-47,-39,90,-65,-90,128,-53,-54,120,-61,-71,"); add("138,-48,-39,123,-61,-65,132,-58,-56,91,-73,-96,"); add("134,-71,-75,115,-51,-44,139,-53,-37,119,-52,-43,"); add("159,-20,30,145,-37,-3,85,-30,-17,36,-84,-128,"); add("117,-79,-83,122,-58,-44,106,-49,-36,109,-94,-106,"); add("82,-82,-98,75,-82,-101,65,-85,-107,62,-85,-108,"); add("41,-87,-117,33,-86,-120,30,-89,-123,20,-86,-123,"); add("25,-88,-120,33,-89,-119,32,-90,-118,34,-90,-117,"); add("22,-90,-119,-12,-73,-110,29,-103,-133,32,-93,-116,"); add("50,-95,-109,14,-91,-119,-30,-84,-125,-195,88,36,"); add("-121,70,44,-137,65,33,-119,79,60,-98,87,82,"); add("-56,82,91,-57,83,96,-59,73,80,-205,54,-2,"); add("-151,27,-18,-78,5,-23,-22,101,138,-37,90,117,"); add("-88,84,91,-127,63,47,-135,56,35,-139,6,-38,"); add("-140,1,-47,-134,70,61,5,81,122,17,78,125,"); add("-41,86,117,-89,79,93,-98,75,85,-119,64,62,"); add("-100,19,-1,17,-95,-143,-132,50,38,-20,87,131,"); add("47,56,102,18,68,116,-29,86,130,-106,66,74,"); add("-66,73,102,130,32,94,103,-30,-19,47,77,145,"); add("-70,79,111,-99,71,90,-128,63,68,-114,62,73,"); add("-87,70,95,-55,78,123,-97,68,93,-121,24,7,"); add("-147,9,-24,-105,-31,-85,-80,65,96,-168,46,39,"); add("-100,19,9,53,-101,-168,-37,-29,-61,-127,65,85,"); add("-121,58,77,-134,29,22,-156,25,12,-144,-2,-33,"); add("-137,-3,-32,-103,-67,-138,-35,-62,-117,-94,-9,-32,"); add("-79,89,144,-103,42,58,-147,52,71,-131,39,52,"); add("-94,50,77,-110,45,69,-88,41,63,-145,58,91,"); add("-135,28,39,-149,33,45,-154,42,67,-110,29,47,"); add("-142,33,52,-122,43,75,-88,36,65,-48,26,48,"); add("-79,-44,-90,-151,-18,-40,-139,-29,-58,-91,10,17,"); add("-85,59,112,37,70,137,32,61,121,79,42,84,"); add("57,43,89,16,96,195,36,62,129,70,9,19,"); add("137,40,90,51,50,108,169,-17,-27,36,11,26,"); add("61,36,80,155,-21,-32,83,-6,-5,-231,34,53,"); add("-136,-5,-19,-97,17,29,72,29,68,-155,-33,-80,"); add("-91,-42,-93,-163,-15,-36,-124,23,46,-123,34,71,"); add("-112,47,100,-74,53,114,-24,59,131,77,57,126,"); add("-49,54,121,-99,29,69,-108,-6,-12,54,-64,-146,"); add("-67,-63,-139,-79,-39,-84,-150,6,20,-139,16,41,"); add("-148,-25,-46,-76,-52,-109,-43,-62,-131,-129,-32,-58,"); add("-159,-30,-48,-105,-46,-87,-124,-6,0,-30,8,22,"); add("-73,-24,-43,-57,44,101,39,66,136,-102,62,146,"); add("30,32,67,11,49,105,29,27,57,-151,-27,-39,"); add("-117,24,70,16,27,60,-138,-5,10,-65,55,136,"); add("-33,35,84,122,35,61,121,49,94,115,44,86,"); add("113,41,79,158,6,-6,124,3,-8,183,20,27,"); add("23,-15,-38,-80,-60,-133,-18,-46,-105,10,-32,-75,"); add("86,19,35,82,53,115,21,61,141,16,64,151,"); add("76,33,75,102,59,134,129,33,73,138,35,80,"); add("111,28,63,105,29,69,121,41,101,115,40,102,"); add("82,18,44,870,23,91,110,40,114,77,23,70,"); add("168,28,91,133,20,70,114,30,98,147,9,46,"); add("-90,27,62,141,13,57,73,-15,-30,53,-51,-132,"); add("-19,-34,-96,-41,-51,-145,15,-49,-127,95,-34,-73,"); add("169,5,42,52,49,140,124,28,99,17,53,147,"); add("69,28,93,171,-33,-53,144,4,48,140,8,58,"); add("131,12,67,113,11,64,150,-6,27,138,-14,5,"); add("138,-42,-71,49,-51,-127,60,-54,-127,76,-29,-53,"); add("-71,79,190,-14,52,140,1,50,144,110,25,109,"); add("-28,52,141,-81,43,99,-8,49,144,48,39,136,"); add("93,26,116,113,17,100,135,5,72,150,-3,56,"); add("113,-7,29,162,-13,33,146,-15,25,140,-3,62,"); add("52,28,120,-7,49,156,114,7,87,44,10,60,"); add("14,38,140,41,25,111,-150,31,21,30,35,144,"); add("94,17,120,126,4,94,139,-28,-16,135,-41,-62,"); add("151,-29,-4,25,19,88,-141,35,31,-58,13,9,"); add("14,-26,-86,-127,49,98,155,0,104,71,5,70,"); add("-208,7,-117,-46,10,7,91,20,141,98,13,115,"); add("101,9,110,114,4,102,96,10,117,95,1,79,"); add("109,-40,-76,133,-7,81,117,-41,-68,-35,-14,-89,"); add("120,-42,-66,96,-58,-148,89,0,74,65,10,99,"); add("130,-44,-61,71,-13,15,25,41,188,42,22,129,"); add("122,-11,72,140,-30,16,82,17,155,-11,36,147,"); add("11,19,96,183,-61,-70,112,-43,-66,155,-51,-47,"); add("84,-4,77,16,27,138,-14,31,125,-75,53,155,"); add("-80,36,74,-32,23,74,-15,35,154,-25,35,141,"); add("72,0,99,109,-54,-133,105,-45,-94,50,-21,-34,"); add("-128,64,153,-73,48,147,30,17,135,-15,32,149,"); add("18,21,148,53,10,136,28,19,158,37,11,129,"); add("65,4,136,47,-2,67,-5,36,232,-126,44,76,"); add("38,14,176,36,11,147,59,2,141,104,-14,111,"); add("123,-27,48,138,-42,-32,187,-62,-75,-42,18,54,"); add("-141,44,29,-118,42,81,-131,41,52,-47,24,99,"); add("100,-12,127,-67,31,125,69,-3,154,111,-34,-29,"); add("-3,-9,-99,147,-28,121,100,-20,81,90,-18,85,"); add("77,-8,160,91,-20,75,130,-34,57,-12,7,30,"); add("-147,40,-39,-126,31,-55,-140,35,-59,-92,16,-109,"); add("-133,32,-52,-138,31,-73,-128,32,-25,-139,29,-69,"); add("-131,24,-93,-135,29,-56,-140,29,-51,-155,38,9,"); add("-68,29,120,-52,14,26,-2,-10,-105,-127,37,72,"); add("-73,28,119,-80,32,142,-82,30,140,29,5,136,"); add("51,1,149,91,-14,95,46,-1,124,-187,43,23,"); add("2,10,158,-32,14,112,-177,35,-56,-60,23,186,"); add("83,-11,131,135,-25,77,148,-30,61,135,-30,13,"); add("142,-36,-57,44,-12,-44,21,3,184,63,-11,92,"); add("147,-40,-107,144,-35,15,202,-54,-65,-73,21,54,"); add("-123,32,26,-149,37,6,-32,13,130,106,-21,127,"); add("51,-9,130,-27,8,64,-59,17,91,33,-5,135,"); add("77,-18,95,108,-26,130,55,-13,135,48,-11,147,"); add("66,-18,128,103,-27,104,85,-24,134,147,-41,64,"); add("19,-6,68,15,-5,55,129,-34,-105,26,-8,31,"); add("25,-8,70,136,-36,-112,129,-37,-45,103,-32,103,"); add("80,-25,120,132,-38,-81,21,-7,3,-143,41,91,"); add("-118,37,-84,-104,31,-37,37,-15,193,1,-4,148,"); add("12,-8,152,-17,-1,153,3,-8,154,55,-21,114,"); add("136,-42,33,138,-40,-30,143,-45,34,130,-38,-51,"); add("84,-20,-134,141,-43,-46,99,-28,-115,139,-44,-30,"); add("133,-47,62,126,-43,4,155,-52,-32,141,-50,9,"); add("67,-29,129,-217,78,-48,-91,30,49,147,-56,97,"); add("75,-27,24,-208,74,-46,-143,50,-14,-108,40,-86,"); add("-122,44,-87,-69,19,95,-20,-1,153,-144,42,95,"); add("-91,26,69,-105,27,110,-56,9,142,31,-19,141,"); add("84,-28,24,106,-34,10,-98,21,131,30,-19,134,"); add("148,-48,3,117,-31,-89,78,-17,-117,122,-36,-74,"); add("69,-22,-14,-138,31,215,-60,10,119,-78,16,122,"); add("-115,38,-4,-151,50,-18,-124,44,-71,-124,43,-54,"); add("-144,45,-14,-64,14,67,179,-57,30,125,-44,67,"); add("52,-28,137,63,-31,126,126,-49,95,144,-44,-27,"); add("145,-47,-12,144,-46,-26,122,-48,68,107,-46,95,"); add("131,-53,64,136,-49,11,136,-52,28,89,-28,-48,"); add("36,2,-152,-16,20,-148,86,-19,-130,104,-30,-102,"); add("111,-37,-68,140,-53,-1,120,-48,13,104,-50,107,"); add("129,-49,-15,73,-19,-133,41,-13,-37,-39,1,179,"); add("-129,44,82,-136,57,-40,-129,53,-27,-126,47,10,"); add("-142,50,53,-63,13,112,8,-18,149,45,-31,143,"); add("136,-57,59,142,-53,-20,138,-57,23,102,-50,93,"); add("82,-46,121,126,-59,66,78,-45,115,43,-35,140,"); add("57,-39,119,74,-46,108,-89,19,130,-46,-2,147,"); add("-88,19,119,-113,31,99,-93,46,-59,72,-8,-137,"); add("102,-28,-92,11,18,-161,-96,49,-74,-84,51,-134,"); add("-94,51,-104,-79,46,-124,-107,51,-78,-132,56,-46,"); add("-104,51,-100,-143,47,58,-132,44,48,-138,54,-39,"); add("-127,51,-45,-138,54,-54,-142,53,-26,-121,47,-58,"); add("-126,49,-59,-139,50,-36,-135,41,25,-146,45,24,"); add("-107,44,-100,-115,44,-86,-124,45,-74,-148,49,-40,"); add("-125,31,66,-83,14,108,-48,-1,147,-42,-1,123,"); add("116,-48,130,127,-47,76,124,-46,79,112,-45,93,"); add("74,-39,124,41,-31,146,95,-43,99,120,-41,17,"); add("125,-39,-7,123,-50,70,110,-45,58,111,-53,108,"); add("78,-23,-21,122,-24,-128,143,-52,19,146,-46,-48,"); add("73,-19,-46,128,-61,101,66,-43,127,-160,48,75,"); add("-148,45,55,-120,29,88,-120,29,81,-122,25,107,"); add("-140,42,39,-122,26,88,-106,18,107,-87,7,124,"); add("-101,13,115,-20,-16,122,55,-38,110,148,-51,18,"); add("124,-43,8,82,-56,149,10,-26,114,62,-41,104,"); add("-119,33,37,-113,55,-90,-93,27,22,4,-32,149,"); add("-4,-32,163,-60,-8,131,-85,3,112,-35,-21,147,"); add("41,-47,149,-77,-2,113,-87,20,38,-90,56,-120,"); add("-88,48,-90,-8,17,-64,-53,-20,162,-10,-31,147,"); add("55,-34,69,-14,-15,81,-74,-7,122,-44,-22,144,"); add("-2,-43,171,-14,-29,128,-19,-34,149,-41,-25,138,"); add("26,-38,109,85,-58,111,53,-51,120,-70,-19,143,"); add("-68,2,64,-159,44,17,-135,42,-6,-111,47,-48,"); add("-14,46,-145,77,18,-141,3,26,-96,-128,49,-44,"); add("-150,49,-21,-141,24,57,-100,-4,114,-90,-3,96,"); add("222,-83,76,62,-44,91,74,-55,118,90,-69,142,"); add("142,-41,0,117,-61,82,66,-54,112,64,-59,127,"); add("39,-38,80,-114,24,35,-160,55,-21,-116,7,85,"); add("-21,-50,172,-30,-38,141,-44,-33,136,-18,-44,143,"); add("15,-50,132,125,-58,61,134,-55,39,87,-65,108,"); add("-108,-7,111,-171,30,57,-122,8,76,-161,52,-16,"); add("-157,32,34,-14,-54,156,100,-54,67,150,-56,35,"); add("136,-17,-59,121,-76,104,-62,-35,139,-143,18,62,"); add("-138,38,4,-140,47,-18,-139,20,48,-134,64,-69,"); add("-83,61,-101,-108,57,-75,-77,52,-85,-35,66,-152,"); add("-97,53,-78,-153,45,-17,-139,35,-4,-122,43,-38,"); add("-145,48,-39,-131,50,-55,-35,17,-25,137,-22,-26,"); add("172,-52,33,120,-16,-36,126,-23,-20,163,-31,-28,"); add("144,-22,-41,137,-12,-66,138,-19,-52,141,-23,-41,"); add("122,-3,-88,89,17,-123,62,29,-135,27,39,-143,"); add("-8,50,-143,-36,54,-137,-97,54,-86,-118,58,-80,"); add("-129,45,-36,-124,35,-5,-133,33,4,-164,34,26,"); add("-107,20,20,-188,54,-27,-146,34,0,-150,34,3,"); add("-145,30,10,-127,8,63,-145,14,55,-85,-11,92,"); add("-32,-14,67,-106,45,-73,-137,20,24,-42,26,-57,"); add("73,11,-81,-168,22,37,-53,-27,118,-158,15,48,"); add("-68,-6,58,-88,16,1,-103,34,-50,-68,18,-19,"); add("189,-4,-93,63,34,-146,-88,35,-63,-131,25,-8,"); add("-159,26,8,-61,-27,121,26,-41,118,15,-28,81,"); add("-100,59,-136,-39,43,-117,-48,35,-90,-92,-13,92,"); add("24,-50,148,-47,-22,93,-103,51,-111,-30,-54,187,"); add("-4,-45,141,-43,-10,52,-44,57,-156,-3,55,-172,"); add("-113,9,23,-46,-29,115,-20,-42,140,-51,-43,155,"); add("-8,-37,114,-142,27,-21,-138,10,25,3,-21,63,"); add("99,-27,38,1,-24,71,-133,8,28,-51,-34,119,"); add("20,-39,105,-49,-14,57,-19,63,-172,-63,18,-30,"); add("3,-52,148,-27,-6,29,-81,38,-80,-1,-47,132,"); add("41,-28,66,-100,12,0,-57,-14,60,-78,-50,161,"); add("19,-50,132,-110,-31,118,37,-32,72,121,-13,-3,"); add("-55,-17,61,-119,-5,51,22,-32,75,-8,-30,81,"); add("-128,34,-51,-13,-34,92,-68,-38,115,104,-25,35,"); add("-22,-38,101,-97,-8,46,10,-31,75,96,-15,11,"); add("-150,-26,102,-89,-41,122,-29,-49,124,-5,-59,142,"); add("102,-25,34,-142,-35,113,-11,-42,101,-17,-61,141,"); add("32,-65,140,-65,-49,121,-116,-25,80,-12,-22,49,"); add("74,4,-24,-32,-65,149,-87,-22,64,-107,-19,61,"); add("-74,-53,125,-30,-54,117,-20,-47,102,103,-40,63,"); add("121,38,-100,11,45,-95,83,15,-48,-5,-52,109,"); add("-74,-49,115,-125,-37,99,-78,21,-28,-105,24,-32,"); add("-65,-36,84,-117,-54,126,-12,-43,88,3,-20,39,"); add("-93,17,-21,40,-36,67,-187,32,-38,-68,-35,77,"); add("142,-19,19,44,-6,7,-107,-31,73,-170,5,11,"); add("-38,-29,61,138,-35,51,19,-30,56,-139,30,-41,"); add("-26,-22,45,-79,-18,43,-10,-20,39,-119,5,2,"); add("-73,-15,35,51,-34,60,135,-9,4,88,-13,15,"); add("-204,6,8,-58,-54,107,41,-62,111,-12,-60,111,"); add("165,3,-22,141,9,-30,81,9,-26,121,5,-25,"); add("46,10,-23,-65,-71,137,-113,15,-13,-165,6,8,"); add("-137,-10,31,-71,-39,77,44,-55,96,56,-52,87,"); add("-60,-51,95,76,-8,8,32,-7,9,58,-30,46,"); add("91,74,-140,133,14,-40,-101,-58,115,-116,-74,141,"); add("22,-36,61,36,-9,12,-128,-39,79,-45,-62,111,"); add("96,-4,-3,89,24,-50,69,16,-36,-27,-68,119,"); add("-8,-73,125,52,-14,17,-163,-5,26,-11,-80,133,"); add("113,-56,81,164,-41,48,93,-44,62,120,-27,28,"); add("139,12,-38,114,32,-68,113,56,-108,91,75,-138,"); add("71,50,-95,85,48,-96,129,23,-62,16,79,-137,"); add("-21,60,-100,45,39,-76,43,-102,168,100,-60,85,"); add("86,-42,54,22,-91,149,77,-82,121,102,-39,44,"); add("30,-102,160,52,-68,100,79,-76,105,81,-75,101,"); add("100,-72,92,107,-82,103,-20,-80,129,43,-77,108,"); add("97,-78,95,31,-91,130,152,-23,-2,139,15,-55,"); add("85,37,-78,-46,84,-116,82,66,-121,93,34,-76,"); add("140,2,-42,120,7,-44,27,94,-155,33,71,-122,"); add("-10,85,-133,-17,82,-129,-22,77,-118,-36,75,-113,"); add("0,71,-119,-42,78,-120,-84,51,-62,-18,8,-8,"); add("158,11,-67,92,44,-104,59,43,-94,109,50,-124,"); add("-4,43,-75,-166,-24,98,-135,18,11,-144,30,-10,"); add("-87,17,-4,167,12,-72,119,0,-37,2,31,-55,"); add("149,-74,84,81,29,-78,74,63,-140,-30,63,-103,"); add("-137,64,-72,-118,56,-65,-130,36,-23,-116,42,-42,"); add("-64,75,-122,-41,74,-128,-29,75,-135,10,49,-99,"); add("-15,80,-154,-40,69,-124,76,46,-118,-7,57,-113,"); add("69,41,-108,71,47,-122,85,54,-144,93,36,-111,"); add("75,31,-94,48,61,-151,27,60,-142,7,54,-123,"); add("-98,55,-87,11,62,-146,-33,63,-135,49,45,-126,"); add("-1,19,-44,43,11,-45,45,31,-92,136,-8,-38,"); add("142,2,-68,121,-7,-38,168,-56,59,69,-63,119,"); add("54,-65,129,-102,-29,116,-19,-59,146,-32,-54,138,"); add("-35,-54,138,-50,-50,131,-57,-41,114,-34,-55,135,"); add("-52,-49,125,-61,-30,89,-21,-65,145,24,-66,128,"); add("78,-59,90,58,-76,131,98,-70,104,39,-58,98,"); add("35,-86,155,29,-67,119,95,-70,98,126,-32,10,"); add("161,-43,16,118,-28,2,88,-64,85,11,-26,43,"); add("80,38,-106,156,9,-87,89,28,-93,101,21,-88,"); add("125,31,-120,87,26,-94,91,14,-71,143,6,-86,"); add("115,7,-74,136,12,-97,132,-76,79,140,-29,-19,"); add("134,-20,-36,62,-45,55,-190,9,90,-75,-38,116,"); add("-100,-25,103,-13,-67,136,-131,-8,83,-145,16,45,"); add("-146,21,32,-137,6,55,-107,-24,97,-117,-9,71,"); add("-105,-33,110,-98,-41,117,21,-66,111,73,-68,92,"); add("97,-88,114,158,-25,-26,66,-81,113,35,-79,122,"); add("68,-81,109,16,-74,121,-89,-48,120,-143,29,13,"); add("-109,73,-77,-134,61,-47,-107,36,-17,-124,-37,114,"); add("-48,-64,126,16,-80,128,-34,-71,129,31,-93,141,"); add("30,-73,105,61,-83,110,66,-83,105,74,-87,106,"); add("34,-78,107,-27,-60,104,-107,38,-18,47,87,-152,"); add("-16,52,-75,-34,-119,198,-91,-45,103,-86,-36,85,"); add("-11,-86,133,-87,-52,109,-140,-7,59,-122,57,-43,"); add("-29,57,-75,-218,21,39,-130,-21,74,-112,-40,93,"); add("-111,-38,89,-63,-56,100,-148,-32,88,-129,-25,72,"); add("-126,-32,78,-132,-15,55,-87,9,10,190,-58,34,"); add("-36,-31,53,-140,41,-22,-103,81,-90,-133,38,-21,"); add("-139,51,-42,-94,-4,27,-136,-64,122,-128,-38,80,"); add("-91,-22,48,-108,37,-30,-13,81,-112,-199,13,18,"); add("-104,55,-58,-90,68,-83,-50,40,-48,-25,89,-125,"); add("1,91,-135,42,64,-102,84,60,-105,60,68,-113,"); add("96,51,-97,-95,45,-50,-102,33,-33,-46,108,-159,"); add("68,72,-125,-33,84,-128,-29,28,-39,-132,-44,93,"); add("-66,-71,124,-120,-33,72,-139,-21,54,-71,-78,132,"); add("72,-25,27,91,85,-145,98,9,-30,90,-10,1,"); add("-70,-93,155,-18,-17,29,-92,29,-29,-109,-42,80,"); add("-76,-38,70,13,-54,79,32,-90,131,5,-98,145,"); add("84,-39,46,72,-99,134,40,-83,114,75,-76,97,"); add("-8,-64,92,19,-48,65,63,-79,100,137,-58,59,"); add("59,-44,51,-210,58,-47,-104,-26,52,-25,-83,118,"); add("-102,23,-17,-129,39,-35,-146,-27,55,4,-80,109,"); add("-47,-11,21,-127,39,-37,-147,-12,32,-140,-28,53,"); add("-93,-63,94,-127,-54,83,-74,-49,71,-18,-91,121,"); add("-46,-85,114,-90,-78,108,-68,-65,87,16,-45,57,"); add("47,-36,41,-117,-21,35,128,-38,39,-230,4,9,"); add("-135,-41,59,-128,-49,67,-143,-27,39,-139,-41,56,"); add("-32,-93,115,6,-98,119,-35,-60,72,-123,-64,80,"); add("-144,-29,37,-135,-47,56,-12,-90,106,-152,-52,60,"); add("-149,15,-18,-155,15,-20,-86,84,-100,-162,-7,4,"); add("52,-114,135,32,-91,106,9,-114,130,-161,-25,24,"); add("-133,4,-10,-139,-10,5,-111,74,-90,-151,-18,12,"); add("-136,-26,20,-161,-16,8,-72,-73,77,57,-63,75,"); add("-53,-87,93,137,-50,67,137,-19,29,162,-32,46,"); add("100,-45,55,119,-19,27,91,-75,85,133,-37,45,"); add("-30,-117,125,67,-94,103,85,-65,71,146,-61,67,"); add("44,-104,109,-9,-94,97,103,-89,93,52,-99,101,"); add("23,-57,57,-115,142,-145,-71,-3,2,-22,-109,110,"); add("-19,-107,106,14,-78,78,-40,-136,133,-28,-107,103,"); add("-32,-106,101,-74,-99,92,-138,-42,35,-146,0,-5,"); add("-143,33,-37,-142,-16,8,-151,34,-42,-139,-3,-6,"); add("-172,-22,9,-145,9,-21,-145,24,-35,-138,23,-34,"); add("-148,23,-37,-159,-13,-4,-147,-4,-14,-148,-5,-12,"); add("-141,50,-67,-128,15,-31,-139,-42,21,-62,-79,67,"); add("-211,-45,10,-123,-56,35,-32,-88,78,77,-89,95,"); add("53,-76,79,-2,-93,86,-45,-126,108,-2,-102,92,"); add("2,-115,103,22,-108,99,-27,-115,98,-8,-54,45,"); add("-83,-186,148,-46,-98,76,-66,-108,81,-83,-102,72,"); add("-64,-84,59,-44,-119,91,19,-93,79,126,53,-22,"); add("61,39,-23,-122,-131,87,47,-63,58,109,-10,26,"); add("-38,-152,115,-1,-121,95,-19,-114,86,-49,-117,83,"); add("18,-67,55,169,15,14,153,-25,40,133,6,14,"); add("142,54,-22,157,13,10,84,-19,25,121,-86,80,"); add("70,-67,58,30,-135,104,79,-114,93,127,-64,60,"); add("128,33,-12,92,101,-65,140,50,-25,138,39,-17,"); add("123,56,-33,151,11,3,151,-8,16,148,11,0,"); add("152,-13,18,134,36,-21,159,-4,9,106,95,-67,"); add("69,112,-83,114,78,-56,141,35,-24,133,37,-26,"); add("39,115,-89,58,119,-92,90,88,-69,131,65,-52,"); add("61,86,-69,-122,102,-82,-43,111,-91,13,111,-91,"); add("73,102,-84,87,93,-79,93,91,-77,81,100,-86,"); add("77,60,-52,88,121,-106,134,42,-40,147,33,-32,"); add("144,32,-34,110,76,-70,132,56,-56,124,59,-59,"); add("73,90,-85,0,111,-100,-56,113,-101,-23,112,-102,"); add("34,91,-87,120,73,-76,120,69,-72,103,22,-29,"); add("168,-48,33,114,8,-17,115,-6,-4,128,-73,57,"); add("153,-46,29,141,-6,-10,144,54,-67,82,80,-86,"); add("112,69,-80,121,50,-63,145,31,-49,99,69,-81,"); add("80,84,-95,121,57,-75,149,-25,2,134,-51,28,"); add("136,-50,26,130,-60,35,52,-105,93,70,-99,83,"); add("55,-106,91,69,-75,59,122,-75,47,102,-99,73,"); add("141,-44,13,116,-90,59,127,-69,37,105,-88,57,"); add("126,-83,47,135,-58,22,123,-28,-3,147,-15,-22,"); add("126,-70,33,105,-88,52,132,-70,28,155,-24,-19,"); add("74,-117,83,113,-80,41,135,-26,-15,107,-79,39,"); add("69,-110,75,82,-106,67,60,-114,80,26,-104,80,"); add("-78,-77,86,-23,-114,101,-26,-99,88,115,-56,13,"); add("83,65,-77,68,93,-96,53,91,-91,-1,112,-93,"); add("128,48,-79,49,65,-70,-51,122,-89,-128,78,-28,"); add("-125,71,-24,8,117,-104,39,103,-103,86,76,-94,"); add("104,-33,-2,164,-45,-12,114,-71,26,89,-93,54,"); add("97,12,-43,-10,118,-102,-113,94,-46,-123,78,-31,"); add("-144,57,-5,-133,65,-17,-139,59,-10,-143,42,4,"); add("-142,49,-3,-141,79,-31,14,125,-120,-172,27,24,"); add("-145,1,39,-142,41,0,-124,69,-32,-127,77,-40,"); add("-115,84,-50,-80,101,-77,-62,107,-87,-76,104,-82,"); add("-102,74,-48,-137,65,-31,-133,63,-32,-126,69,-40,"); add("-81,97,-79,-38,109,-101,34,91,-101,-89,117,-101,"); add("60,86,-102,128,30,-60,109,51,-79,144,-3,-31,"); add("37,-68,62,12,-104,106,70,-91,77,105,-36,12,"); add("54,87,-104,82,59,-82,137,-74,40,56,-99,89,"); add("72,-97,79,123,-77,46,1,-51,51,118,-122,90,"); add("134,-72,34,107,-73,41,151,-4,-39,153,-49,1,"); add("130,-72,32,136,-74,30,31,-32,22,-122,21,18,"); add("213,-65,-5,139,-55,9,144,-73,23,103,-35,-1,"); add("148,-91,37,112,-86,43,138,-77,24,-10,-96,95,"); add("35,-112,91,22,-110,94,18,-133,116,33,-91,71,"); add("140,-97,36,114,-81,32,83,-104,62,88,-88,45,"); add("129,-94,34,135,-66,6,69,-40,8,-23,-79,78,"); add("115,-110,50,89,-38,-3,126,-18,-34,159,17,-78,"); add("142,-3,-56,130,-29,-28,119,-85,22,-228,24,75,"); add("-138,50,14,-119,-8,55,-120,-49,88,-42,-110,108,"); add("111,-102,42,122,-103,37,19,-127,96,120,-89,24,"); add("113,33,-72,102,-109,47,63,-49,12,89,76,-98,"); add("119,-92,24,37,13,-26,-57,117,-70,-80,121,-65,"); add("-91,110,-52,25,58,-59,134,-63,-5,47,72,-80,"); add("-121,89,-23,-21,73,-53,144,21,-80,128,-70,4,"); add("87,-9,-31,-51,146,-103,-119,77,-13,-136,65,3,"); add("-121,63,-2,-151,55,16,-61,42,-11,63,83,-100,"); add("-9,85,-71,85,-38,-2,-133,153,-80,-101,103,-51,"); add("-106,100,-46,-27,125,-104,68,49,-73,134,-93,29,"); add("112,-92,36,75,-17,-16,-36,90,-68,134,-79,14,"); add("41,11,-28,-67,96,-59,113,-7,-44,-169,116,-33,"); add("11,66,-66,125,23,-78,96,39,-80,125,5,-63,"); add("105,13,-62,149,-35,-38,149,-29,-43,116,-76,15,"); add("140,11,-79,28,-41,24,-103,-68,116,35,-72,52,"); add("96,112,-154,98,57,-105,75,70,-106,56,82,-109,"); add("128,13,-81,127,12,-79,112,-18,-44,95,62,-113,"); add("-145,71,8,-141,52,25,-122,78,-13,-72,105,-68,"); add("-105,106,-53,-118,86,-27,-5,75,-75,43,77,-102,"); add("-37,120,-108,39,89,-115,102,41,-100,-33,122,-114,"); add("-32,111,-104,-30,100,-95,3,95,-108,22,84,-107,"); add("160,5,-96,-13,108,-117,-43,104,-96,-38,95,-89,"); add("72,25,-71,82,100,-168,27,90,-125,11,88,-114,"); add("111,33,-107,76,31,-85,88,25,-87,-59,90,-76,"); add("-21,26,-20,98,-112,81,108,-71,21,69,-16,-24,"); add("-180,-4,118,-23,-14,31,114,-65,10,158,-67,-16,"); add("132,-5,-78,125,10,-94,134,-33,-47,47,-66,51,"); add("-99,-45,120,-80,-55,119,-12,-79,103,182,-57,-48,"); add("134,-44,-36,78,-102,70,37,-104,100,148,-59,-29,"); add("89,44,-113,40,79,-121,101,33,-110,79,41,-105,"); add("65,56,-115,144,-23,-75,92,32,-108,-42,108,-105,"); add("-159,7,107,-90,-33,108,-132,55,25,-118,90,-29,"); add("-103,98,-51,-28,90,-95,70,20,-75,80,89,-172,"); add("92,41,-119,84,19,-87,107,13,-98,85,61,-144,"); add("62,52,-118,125,7,-107,86,30,-108,72,14,-78,"); add("154,-9,-111,-4,-62,89,-80,-44,124,-41,-57,111,"); add("-114,-27,126,-13,-39,63,115,-63,-7,145,-69,-22,"); add("8,-33,38,-49,-42,94,-32,-19,49,-4,-135,179,"); add("30,-76,74,-119,-11,106,-110,8,72,26,-75,74,"); add("162,-54,-53,120,-86,15,134,-31,-63,127,-64,-19,"); add("133,-52,-41,132,-45,-49,131,-71,-18,131,-76,-11,"); add("128,-82,-5,130,-75,-16,137,-72,-27,125,-50,-44,"); add("131,-43,-60,125,-75,-16,123,-73,-18,94,-109,49,"); add("99,-108,43,72,-113,72,-6,-94,117,-37,-74,120,"); add("-73,-52,124,-70,-54,122,-89,-43,125,-122,14,87,"); add("-132,33,71,-112,-8,101,-98,-33,116,-106,-14,99,"); add("-136,29,75,-115,31,55,-132,22,76,-126,63,27,"); add("-119,4,84,-114,25,57,-133,114,-27,-108,-4,81,"); add("-131,31,60,-111,101,-33,-88,5,57,-112,-20,99,"); add("-128,7,80,-130,7,80,-127,2,81,-101,-39,109,"); add("-106,-35,104,-82,-52,107,-80,-62,115,-85,-56,112,"); add("-46,-79,108,-112,-35,103,-136,22,59,-130,13,63,"); add("-131,-5,82,-136,18,59,-107,-21,81,65,-99,62,"); add("120,-47,-21,86,-22,-27,-177,-28,128,-37,-77,95,"); add("-126,-30,99,-132,3,68,-125,14,53,-140,-26,99,"); add("-120,26,36,-121,-25,86,-74,-77,110,-52,-90,110,"); add("18,-115,97,63,-74,37,134,27,-91,87,-35,-12,"); add("-6,-95,91,120,-127,55,1,-112,100,34,-86,60,"); add("-158,38,45,42,-116,82,178,-55,-41,144,-64,-17,"); add("24,-119,91,90,-110,49,95,-87,25,-4,-78,69,"); add("140,2,-75,128,11,-77,27,-34,14,-66,-60,87,"); add("-90,-34,75,184,-9,-90,135,38,-104,151,-52,-39,"); add("91,-55,-3,109,-105,27,139,-47,-38,111,10,-72,"); add("124,27,-95,56,55,-80,-20,119,-91,42,74,-89,"); add("136,-10,-73,133,-37,-48,139,-57,-36,133,-59,-31,"); add("117,-98,11,130,-69,-22,125,1,-82,110,25,-93,"); add("116,15,-90,91,52,-107,48,96,-119,61,81,-114,"); add("103,26,-94,133,-55,-43,129,-24,-70,42,57,-82,"); add("118,50,-132,58,-114,63,-48,-95,121,81,-123,53,"); add("13,-114,92,40,-113,72,91,-122,41,36,-120,78,"); add("75,-122,50,-4,-99,87,-24,-99,101,12,-122,93,"); add("-4,-114,97,-9,-114,98,1,-113,91,2,-125,97,"); add("1,-114,89,20,-125,83,9,-123,88,-6,-117,93,"); add("-27,-109,100,-52,-94,105,-86,-64,105,-114,-26,95,"); add("-130,-8,92,-97,-4,66,-89,-7,62,-155,22,83,"); add("50,-167,88,34,-111,55,"); add(""); //add("/*1*/"); add("2737,1,-14284,23878,-11217,"); add("-82,-105,-117,-15,25,72,-60,-31,10,-79,-19,62,"); add("9,110,225,-46,-61,-72,-154,-85,22,40,7,-38,"); add("54,-36,-148,1,-47,-99,-122,-119,-90,-97,31,190,"); add("25,-21,-77,-3,-73,-146,-91,-31,55,11,-36,-89,"); add("-159,-97,12,-70,-4,82,-94,2,131,-118,-56,45,"); add("-43,51,167,-40,-46,-43,34,-54,-159,-75,-37,27,"); add("-59,19,122,-93,-16,98,60,99,126,-21,-11,5,"); add("-93,-116,-113,-75,5,120,-18,-24,-28,-75,-101,-104,"); add("-108,-75,1,-89,-3,123,55,85,101,-32,-19,6,"); add("-123,-105,-42,-7,-27,-46,-43,-47,-35,-81,17,159,"); add("-116,-60,49,-40,-57,-60,-105,-66,22,-127,-79,29,"); add("-105,-95,-35,-124,-106,-28,-98,-74,1,-88,-112,-92,"); add("-92,-106,-71,18,-79,-186,29,58,71,40,78,93,"); add("80,93,65,18,-7,-42,-45,-114,-161,40,41,20,"); add("30,80,115,96,95,47,95,26,-94,91,7,-122,"); add("101,19,-114,137,43,-116,-52,-83,-87,-118,-92,-9,"); add("-117,-93,-10,-108,-96,-29,-143,-117,-12,-135,-130,-48,"); add("-50,-79,-75,-157,-56,130,47,-16,-100,-29,-66,-80,"); add("-93,-105,-58,-83,-98,-54,-84,-112,-77,-75,-105,-78,"); add("-91,-115,-68,-70,-99,-70,-81,-109,-68,-79,-107,-67,"); add("-72,-119,-97,-41,-94,-95,-65,-112,-90,-101,-106,-26,"); add("-87,-112,-55,-110,-104,-6,-98,-108,-29,-104,-110,-19,"); add("-75,-117,-75,-84,-126,-70,-25,-76,-80,-75,-126,-82,"); add("-115,-95,27,-115,-90,35,-103,-111,-12,-80,-119,-56,"); add("-97,-117,-25,-103,-98,10,-115,-91,43,-161,-129,59,"); add("-58,-77,-21,-114,-71,74,-7,56,92,-67,27,148,"); add("-90,-7,134,1,-10,-18,84,0,-134,22,-52,-112,"); add("-131,-135,12,72,27,-74,-56,-101,-58,-97,-115,-11,"); add("-110,-72,74,-100,-74,55,-42,-104,-80,-100,-122,-9,"); add("-113,-93,54,-106,-102,31,-103,-87,50,-115,-98,55,"); add("-100,-98,32,-86,-121,-19,-91,-125,-18,-92,-40,104,"); add("-84,-16,124,-85,-18,123,-114,-81,90,-91,-59,81,"); add("-80,-14,125,-100,-90,58,-75,-40,83,-109,-75,98,"); add("-100,-79,80,-101,-100,50,-88,-122,-1,-77,-103,4,"); add("-104,-135,15,-99,-113,37,-104,-118,43,-74,-117,-13,"); add("-98,-106,51,-92,-124,16,-93,-102,52,-101,-150,3,"); add("-74,-80,45,-85,-138,-7,-88,-117,27,-92,-81,86,"); add("-90,-67,101,-91,-76,95,-94,-102,67,-88,-91,72,"); add("-88,-94,70,-71,-130,-14,-61,-137,-44,-62,-124,-21,"); add("22,-4,-54,54,10,-108,83,17,-158,-35,-68,-8,"); add("-90,-85,87,-88,-108,61,-83,-64,101,-84,-69,103,"); add("-95,-84,110,-62,13,159,-81,-98,64,-88,-89,95,"); add("-79,-62,109,-79,-94,70,-115,-182,49,-40,-70,8,"); add("-56,-132,-30,-56,-147,-45,-58,-85,38,-92,-109,97,"); add("-89,-97,105,-69,-68,91,-77,-78,102,-78,-94,87,"); add("-77,-89,95,-74,-86,91,-73,-123,44,-75,-139,31,"); add("-41,7,123,-3,91,124,38,129,60,75,109,-70,"); add("75,120,-54,66,92,-61,83,66,-140,48,13,-114,"); add("74,106,-59,56,136,28,68,124,-18,78,115,-53,"); add("78,123,-40,83,113,-65,70,128,-8,74,133,-10,"); add("74,120,-22,75,71,-94,55,56,-62,78,120,-30,"); add("84,100,-69,88,119,-51,85,86,-87,76,126,-10,"); add("83,133,-13,79,83,-72,96,128,-46,82,80,-79,"); add("92,121,-43,91,103,-61,91,88,-82,90,83,-87,"); add("94,102,-64,81,122,-5,74,130,21,83,131,7,"); add("86,113,-25,72,131,35,103,170,26,-42,-12,72,"); add("-90,-65,101,-91,-42,139,-45,4,109,-93,-93,68,"); add("-88,-49,130,-71,-79,43,-66,-126,-37,-88,-117,29,"); add("-87,-114,34,-86,-133,7,-87,-114,37,-89,-115,45,"); add("-78,-97,45,-90,-131,29,-89,-101,72,-91,-113,60,"); add("-85,-83,93,-88,-111,61,-89,-78,117,-60,-23,123,"); add("-62,-104,9,-85,-141,17,-80,-87,88,-82,-66,126,"); add("-85,-125,47,-58,-24,127,-98,-125,90,-43,-84,-3,"); add("-31,-134,-109,-78,-137,23,-52,0,150,-18,-42,-12,"); add("-34,-42,39,-63,-65,90,-117,-117,174,-58,-89,46,"); add("-45,-70,33,-105,-136,122,-37,-55,33,-72,-83,102,"); add("-71,-86,103,-73,-100,85,-72,-113,67,-73,-107,82,"); add("-68,-107,68,-78,-110,101,-63,-90,83,-67,-112,64,"); add("-64,-137,21,-59,-136,6,-69,-126,60,-67,-105,87,"); add("-57,-153,-18,-21,-129,-108,-53,-103,46,-5,-91,-114,"); add("-25,-98,-42,-62,-133,40,-65,-120,71,-63,-107,87,"); add("-66,-113,89,-52,-66,109,-55,-54,138,-55,-69,119,"); add("-56,-76,116,-58,-103,90,-59,-114,86,-51,-59,131,"); add("-48,-48,134,-45,-43,137,-43,-37,139,-32,-3,142,"); add("-47,-65,124,-54,-103,99,-49,-79,115,-50,-83,118,"); add("-44,-63,129,-41,-47,137,-41,-53,136,-44,-59,143,"); add("-42,-72,116,-33,-27,146,-32,-30,145,-35,-40,142,"); add("-45,-93,116,-43,-58,172,-33,-60,113,-35,-67,116,"); add("-25,-17,150,-27,-27,146,-35,-66,134,-29,-40,149,"); add("-14,9,148,0,52,139,1,54,142,0,51,145,"); add("11,80,128,5,56,134,-7,7,104,-26,-55,123,"); add("-30,-59,172,25,62,-90,-7,-4,85,-32,-82,117,"); add("-35,-95,120,-33,-91,116,-33,-94,112,-43,-128,158,"); add("-22,-72,54,-33,-106,101,-32,-104,104,-30,-96,111,"); add("-27,-92,117,-24,-81,124,-20,-65,134,-12,-33,146,"); add("-1,3,152,-6,-14,149,-13,-53,140,-16,-63,136,"); add("-17,-71,124,-4,-20,157,-8,-44,143,-16,-86,237,"); add("2,3,72,-4,-32,105,5,-2,175,27,99,105,"); add("3,-12,139,-35,-165,74,-8,-14,-108,-21,-95,14,"); add("-16,-90,97,-16,-92,106,-13,-92,128,-18,-108,97,"); add("-21,-122,85,-15,-103,109,-11,-92,117,-12,-98,114,"); add("-25,-149,52,-21,-128,50,-23,-111,-36,-27,-130,-35,"); add("-19,-140,74,-1,-63,128,-5,-97,143,22,71,115,"); add("17,158,-124,7,2,79,-3,-81,127,-16,-132,72,"); add("-7,-90,90,6,-49,148,2,-72,134,-2,-92,118,"); add("-17,-140,51,-24,-136,-28,4,-85,148,17,108,-1,"); add("10,-4,92,-12,-118,54,-7,-129,92,8,23,39,"); add("24,62,114,18,5,136,11,-45,124,18,-43,173,"); add("-3,-104,84,-4,-117,78,30,28,174,-1,-120,95,"); add("-10,-143,56,23,-13,155,31,74,126,32,74,128,"); add("6,141,-78,-2,111,-104,18,127,0,33,54,142,"); add("39,100,135,29,124,58,32,80,105,47,60,198,"); add("4,-59,69,13,-90,141,5,-141,131,23,-19,127,"); add("16,-116,158,-24,23,-131,-39,-129,-98,-13,-148,42,"); add("0,-121,77,6,-115,99,11,-107,115,-4,-121,54,"); add("10,-111,107,-14,-160,19,-15,-129,-3,2,-130,72,"); add("-31,-136,-76,-5,-116,28,-12,-155,12,-7,-162,32,"); add("-14,-141,-11,-15,-186,-2,11,-98,78,-2,-105,25,"); add("-26,-135,-79,-24,-112,-78,-30,-150,-95,-16,-111,-47,"); add("-23,-93,-86,-30,-35,-138,-33,-39,-151,-22,-114,-85,"); add("-4,-170,15,-36,-101,-166,6,-160,53,-17,-111,-74,"); add("-27,-53,-138,-33,-65,-171,-21,-26,-112,-24,-93,-125,"); add("1,-170,15,-4,-145,-17,-14,-124,-84,-18,-110,-108,"); add("4,-151,15,-15,-138,-98,-21,-80,-137,8,-155,32,"); add("2,-150,-16,10,-154,35,-6,-140,-71,7,-91,21,"); add("24,-76,129,28,-94,141,22,97,153,13,20,77,"); add("-5,164,11,3,-13,11,10,-156,22,6,-135,2,"); add("-1,-144,-50,-6,-131,-75,-20,-69,-134,-14,-89,-119,"); add("-15,-91,-122,-8,-112,-98,-8,-113,-101,-4,-122,-85,"); add("10,-152,-16,26,-152,82,12,-139,-4,26,-119,99,"); add("20,-144,37,-9,-86,-115,19,-129,32,29,-83,126,"); add("30,-70,132,30,-70,131,31,-83,122,30,-119,87,"); add("30,-120,86,29,-138,56,30,-135,62,32,-123,80,"); add("35,-102,104,32,-130,70,34,-129,73,31,-145,41,"); add("33,-133,55,35,-126,67,35,-143,52,34,-138,43,"); add("34,-136,49,39,-127,69,40,-127,74,39,-131,62,"); add("35,-144,26,46,-102,113,43,-120,78,39,-154,26,"); add("42,-114,73,47,-116,90,44,-128,64,45,-127,64,"); add("46,-124,66,47,-125,70,32,-162,-34,15,-96,-38,"); add("48,-136,50,50,-120,77,51,-121,72,52,-85,116,"); add("53,-104,93,55,-111,91,50,-94,90,54,-68,124,"); add("54,-71,122,54,-71,118,54,-75,114,59,-82,116,"); add("53,-47,133,55,-66,118,60,-66,129,57,-55,126,"); add("58,-60,126,62,-96,97,62,-79,113,62,-62,126,"); add("61,-93,91,56,-133,35,68,-87,114,65,-89,101,"); add("68,-87,104,68,-103,91,47,-147,-14,53,-143,3,"); add("53,-141,2,58,-139,15,55,-139,6,49,-143,-17,"); add("42,-138,-35,50,-147,-23,58,-138,5,61,-139,10,"); add("44,-134,-32,44,-140,-45,43,-137,-41,49,-141,-37,"); add("47,-137,-36,36,-137,-72,4,-78,-87,62,-138,-4,"); add("62,-111,29,43,-131,-51,56,-141,-31,53,-137,-36,"); add("62,-135,-10,70,-132,13,55,-134,-36,24,-110,-90,"); add("60,-137,-28,66,-138,-14,54,-127,-37,51,-134,-57,"); add("52,-134,-60,44,-117,-56,66,-137,-28,34,-115,-84,"); add("57,-129,-48,59,-132,-46,44,-120,-73,40,-123,-92,"); add("76,-129,1,84,-125,28,71,-130,-20,57,-123,-54,"); add("26,-100,-104,50,-118,-71,75,-131,-20,78,-129,-10,"); add("82,-129,-3,84,-130,0,76,-123,-14,81,-130,-13,"); add("78,-119,-7,63,-121,-55,51,-118,-89,76,-125,-31,"); add("81,-125,-19,43,-108,-100,57,-117,-78,74,-121,-44,"); add("72,-124,-53,64,-118,-69,46,-103,-94,51,-109,-97,"); add("72,-117,-50,55,-110,-92,78,-122,-50,65,-122,-96,"); add("42,-82,-70,87,-130,-52,-11,-41,-145,71,-110,-56,"); add("88,-116,-17,100,-112,30,85,-119,-42,110,-137,-12,"); add("83,-92,18,105,-118,19,87,-110,-27,73,-111,-74,"); add("42,-78,-86,70,-110,-90,89,-116,-50,78,-111,-71,"); add("81,-108,-55,107,-116,5,98,-91,49,47,-47,10,"); add("69,-38,112,-33,70,110,20,15,109,40,7,146,"); add("39,-52,-29,21,-74,-152,88,-69,71,102,-105,9,"); add("-32,12,-66,53,-66,-33,28,-44,-43,94,-112,-47,"); add("75,-89,-41,70,-106,-108,126,-123,13,50,-68,-58,"); add("89,-110,-76,128,-91,118,48,-36,35,74,-96,-84,"); add("22,-62,-139,38,-66,-102,120,-94,70,-19,-6,-83,"); add("92,-105,-67,61,-77,-71,103,-112,-62,-4,21,62,"); add("25,-27,-11,74,-103,-134,-90,77,-19,-51,13,-130,"); add("-21,37,64,-80,80,25,-44,10,-122,44,-71,-113,"); add("41,-65,-111,30,-57,-118,108,-124,-107,-26,30,28,"); add("-11,46,149,33,-26,18,109,-71,111,32,2,123,"); add("146,-121,40,31,-60,-127,123,-103,21,-19,-7,-94,"); add("48,-45,-14,52,-14,131,-16,48,132,35,-25,24,"); add("100,-72,57,2,-6,-18,65,-58,-7,-43,11,-101,"); add("-43,2,-143,-44,18,-81,26,-28,-22,126,-84,98,"); add("86,-86,-53,59,-67,-71,102,-98,-55,133,-113,-8,"); add("-71,88,125,73,-62,-12,133,-103,28,-27,12,-39,"); add("13,-32,-97,94,-71,26,76,-69,-33,-28,-4,-118,"); add("59,-52,-18,106,-64,89,107,-88,-18,-26,53,148,"); add("61,-54,-29,50,-69,-132,110,-78,34,122,-91,11,"); add("92,-73,-12,130,-91,31,-52,53,65,66,-47,7,"); add("-52,53,66,23,7,102,-112,74,-45,38,-13,69,"); add("134,-90,44,89,-78,-45,112,-96,-59,-31,26,10,"); add("-113,88,22,12,-22,-60,2,-18,-69,-59,11,-148,"); add("42,-39,-34,135,-106,-30,21,12,126,27,-17,10,"); add("85,-83,-96,93,-63,20,-42,51,94,-94,85,72,"); add("7,23,125,76,-8,204,2,-26,-102,5,-42,-169,"); add("9,-32,-114,115,-92,-38,123,-74,55,-78,77,97,"); add("-23,34,76,-7,36,136,-20,50,149,82,-53,22,"); add("44,-63,-128,86,-89,-121,-26,22,12,-49,18,-70,"); add("6,-27,-100,132,-79,61,88,-39,99,69,-15,139,"); add("-71,73,99,-116,90,37,-104,92,74,-99,90,83,"); add("5,32,137,1,38,148,-20,47,123,-14,45,125,"); add("95,-22,171,-112,84,9,-125,85,-23,-110,50,-111,"); add("-1,15,51,-48,55,71,-148,108,-12,-55,45,13,"); add("-91,92,75,-78,87,93,-27,69,159,-102,65,-46,"); add("-35,39,38,6,7,38,119,-74,59,7,39,145,"); add("-78,89,88,-121,116,62,-72,75,55,-57,83,110,"); add("-42,75,123,-14,59,137,-12,60,141,-26,71,141,"); add("-86,88,46,-35,49,54,-61,88,101,-106,102,32,"); add("-94,46,-87,-71,11,-132,-100,51,-95,-112,74,-64,"); add("-114,76,-62,-113,99,-4,-86,99,63,-59,91,102,"); add("-56,92,108,-33,77,122,13,41,135,13,50,154,"); add("64,-2,138,-71,86,50,-44,95,131,-71,99,77,"); add("-89,105,50,-103,109,26,-50,96,109,-34,84,116,"); add("19,58,165,-54,43,-20,-122,78,-88,-13,80,145,"); add("91,-47,90,102,-80,41,33,37,145,-76,109,74,"); add("-106,110,11,-67,-7,-152,51,-78,-57,-81,27,-112,"); add("-102,62,-85,-106,89,-36,-85,112,55,-97,108,19,"); add("-104,112,10,-72,119,88,32,6,83,99,-47,112,"); add("96,-45,110,98,-50,100,70,-3,136,57,13,137,"); add("25,48,139,-10,97,164,-71,84,20,-106,119,17,"); add("-69,116,77,-22,75,93,-107,151,65,-80,71,-28,"); add("-100,134,43,73,-19,108,89,-23,125,71,2,135,"); add("67,8,133,61,18,139,59,21,137,60,21,139,"); add("54,30,138,56,27,137,46,40,139,49,38,138,"); add("37,51,136,27,61,134,-22,95,103,-38,107,95,"); add("-5,91,122,-23,103,109,-22,103,110,-48,112,79,"); add("-99,139,38,-86,39,-79,-116,84,-65,-94,116,7,"); add("-35,112,95,-55,108,58,-109,97,-44,-109,73,-75,"); add("-105,60,-90,-107,62,-89,-101,101,-33,-41,95,58,"); add("-75,122,35,-89,122,11,-55,126,71,-28,108,90,"); add("-10,89,92,-87,138,28,20,-14,15,86,-125,-14,"); add("12,-97,-99,32,-109,-85,58,-122,-60,84,-122,-19,"); add("107,-98,46,108,-95,52,83,-34,87,77,5,127,"); add("98,-51,88,106,-66,79,105,-49,97,89,-24,103,"); add("62,42,144,98,-20,117,104,-36,107,68,23,123,"); add("43,86,165,42,31,94,18,89,130,-10,106,107,"); add("-20,110,97,4,95,113,20,86,122,19,88,121,"); add("-6,105,106,-26,118,91,-35,122,83,-14,135,121,"); add("-51,89,26,-45,147,90,-17,105,83,32,78,118,"); add("16,95,113,-14,129,106,-26,123,83,-61,122,38,"); add("42,-16,37,134,-47,122,53,-93,-21,27,-119,-79,"); add("-15,-103,-116,-2,-92,-91,6,-109,-100,-23,-73,-99,"); add("-55,-129,-200,39,25,75,46,69,127,31,84,122,"); add("22,92,117,14,99,113,2,108,105,-1,111,102,"); add("-7,115,97,-24,123,84,-19,123,88,-8,117,95,"); add("5,111,102,13,106,107,27,95,113,43,82,118,"); add("21,114,119,4,99,85,-34,135,71,-55,131,42,"); add("-48,132,50,-33,119,55,-80,153,26,-57,132,36,"); add("-77,147,23,-26,152,83,18,104,96,-83,84,-33,"); add("22,52,63,66,23,90,55,87,123,-8,77,44,"); add("53,100,128,67,63,116,61,84,123,32,97,99,"); add("66,73,118,83,76,136,58,56,97,94,28,114,"); add("101,10,109,51,99,114,61,66,101,101,33,121,"); add("-18,61,19,12,97,70,85,9,89,142,-3,135,"); add("92,-23,75,109,26,118,4,103,64,53,-40,26,"); add("106,-50,70,106,13,105,135,-4,121,36,89,83,"); add("-19,132,57,57,96,104,91,54,110,89,56,108,"); add("8,109,65,-51,142,30,-6,136,66,15,129,79,"); add("45,101,90,54,101,97,10,143,78,26,122,80,"); add("19,122,75,61,99,96,11,134,71,-41,143,31,"); add("-38,144,32,-18,141,47,7,137,65,45,118,87,"); add("69,99,99,-24,139,36,-31,146,34,-4,140,52,"); add("-7,144,50,2,141,56,7,139,57,-12,143,43,"); add("-50,145,12,-40,145,19,-35,154,24,-35,137,19,"); add("-3,147,46,-21,153,33,-42,129,7,-23,129,22,"); add("28,139,65,8,208,68,46,83,61,97,-111,45,"); add("87,20,76,63,112,81,48,122,72,52,121,74,"); add("41,130,66,39,174,76,18,127,46,55,111,70,"); add("62,93,70,67,111,76,94,80,89,88,82,83,"); add("59,118,70,70,109,75,44,143,63,93,85,84,"); add("68,113,72,59,123,66,38,135,53,31,139,47,"); add("24,142,43,19,142,38,-15,166,17,8,111,24,"); add("-25,186,11,-31,118,-3,-35,149,-4,-55,165,-16,"); add("-29,123,-4,-40,145,-9,-46,144,-16,-72,130,-36,"); add("-113,64,-74,-124,19,-87,-121,-17,-90,-123,1,-91,"); add("-112,45,-78,-117,47,-84,-94,97,-60,-111,64,-79,"); add("-94,98,-62,-98,95,-68,-86,113,-57,-90,120,-61,"); add("-99,69,-73,-99,88,-72,-100,83,-74,-103,76,-80,"); add("-113,73,-87,-98,73,-77,-108,42,-88,-118,12,-99,"); add("-115,-23,-100,-115,-17,-100,-105,-27,-95,-117,27,-101,"); add("-118,59,-101,-105,-19,-97,-110,42,-96,-97,69,-86,"); add("-102,62,-90,-110,46,-100,-99,-47,-97,-101,-35,-98,"); add("-144,-109,-146,30,126,37,-70,5,-68,-40,-97,-44,"); add("-29,-148,-39,-81,-122,-89,-4,36,-2,10,141,21,"); add("23,149,32,47,139,54,-84,-1,-82,4,58,8,"); add("38,136,43,-76,114,-69,-80,101,-76,-117,-33,-119,"); add("-63,103,-60,-92,70,-92,-80,35,-80,-91,62,-93,"); add("-80,22,-83,-107,62,-112,-91,64,-95,-96,57,-102,"); add("-92,3,-100,-109,-4,-119,-103,-28,-114,-58,-151,-69,"); add("-40,-110,-48,-31,-140,-40,-71,-3,-80,-78,-95,-94,"); add("-74,-89,-88,-61,-107,-77,-35,-140,-49,-49,-142,-67,"); add("-8,45,-6,27,146,41,-11,182,-3,-108,-34,-129,"); add("-85,58,-97,-100,-67,-124,-82,76,-95,-35,121,-38,"); add("-39,139,-42,-18,138,-18,-35,60,-41,-75,-100,-96,"); add("-72,-75,-92,-89,-73,-116,-81,-77,-106,-90,-15,-115,"); add("-108,19,-141,15,41,22,86,61,114,90,27,116,"); add("54,124,74,29,135,40,46,136,61,54,108,70,"); add("44,138,56,79,87,98,81,81,99,66,113,79,"); add("54,127,64,66,111,77,74,98,87,38,125,41,"); add("-10,148,-18,-71,91,-89,-95,37,-116,-79,135,-104,"); add("-8,130,-18,-29,131,-44,-26,148,-43,-27,146,-45,"); add("-8,150,-25,-12,170,-31,-13,127,-30,-76,142,-112,"); add("-17,-116,-7,-29,21,-40,-33,100,-52,-62,104,-92,"); add("-42,110,-68,-74,78,-106,-59,106,-93,-64,99,-98,"); add("-62,101,-98,-85,40,-118,-83,41,-120,-78,70,-117,"); add("-92,-113,-107,13,75,6,-27,103,-55,-85,32,-124,"); add("-84,27,-123,-92,9,-133,5,-52,17,-12,-14,-15,"); add("-72,37,-110,-84,23,-126,-93,-75,-123,-62,2,-93,"); add("-78,42,-123,-79,22,-125,-86,9,-132,-73,-172,-81,"); add("5,71,-6,11,147,-11,-52,116,-104,-49,62,-89,"); add("-48,105,-98,-54,96,-109,-76,39,-129,-88,-164,-108,"); add("4,91,-13,40,143,32,24,150,3,-30,139,-84,"); add("-38,97,-87,-44,104,-101,-49,91,-107,-75,77,-148,"); add("-49,45,-97,-46,96,-108,-70,41,-135,-72,-32,-118,"); add("-78,7,-140,-62,-56,-95,-93,37,-181,48,34,77,"); add("55,90,71,51,161,41,60,100,74,-5,115,-47,"); add("-58,47,-122,-61,111,-152,-68,-37,-112,-75,67,-165,"); add("-43,-6,-79,-24,130,-97,-84,-17,-155,39,43,60,"); add("-32,126,-112,46,78,58,69,-5,135,113,64,189,"); add("-45,17,-93,-69,17,-138,-69,-5,-131,-72,-8,-139,"); add("-69,-22,-127,-73,-3,-146,-96,-25,-187,55,-46,133,"); add("-45,-34,-77,-78,-48,-142,-59,-65,-96,-58,-56,-98,"); add("-75,-29,-148,-55,34,-134,-65,54,-168,-32,40,-88,"); add("-19,117,-96,-47,41,-126,-62,-2,-141,-61,-9,-138,"); add("-62,-27,-135,-61,-16,-139,-63,-22,-142,-52,18,-139,"); add("-9,126,-86,14,107,-19,-7,131,-88,-34,82,-132,"); add("-45,40,-138,-47,25,-139,-55,1,-146,-5,123,-88,"); add("16,145,-43,-25,62,-110,-54,-104,-83,-14,-134,43,"); add("52,-49,173,-47,-52,-98,-47,-65,-90,-57,-52,-131,"); add("-57,-30,-142,-56,-64,-123,-64,-68,-148,-41,-115,-55,"); add("-17,-148,36,2,-128,81,6,-128,89,-7,-136,51,"); add("-30,-157,-7,-49,-116,-86,-54,-49,-133,-19,85,-101,"); add("-1,110,-64,-7,78,-63,12,153,-47,46,132,68,"); add("50,119,81,43,124,58,16,167,-52,6,94,-42,"); add("-2,123,-85,31,130,12,57,46,143,54,68,114,"); add("55,123,81,5,134,-75,-47,48,-173,-55,-74,-113,"); add("-45,-45,-111,-50,-139,-57,-54,-73,-119,-53,-57,-131,"); add("-53,-86,-113,-53,-88,-111,-47,-29,-139,-41,9,-146,"); add("-38,13,-143,-42,-130,-52,-56,-133,-106,16,67,9,"); add("3,32,-10,-31,46,-148,-42,-55,-114,-50,-104,-112,"); add("-52,-113,-113,-41,-143,-52,-19,-114,8,-35,-159,-27,"); add("-32,-151,-22,-37,-31,-124,-40,-96,-98,-40,-127,-78,"); add("-43,-93,-113,-49,-103,-139,-12,-141,39,-22,-159,8,"); add("-9,38,-65,-2,110,-77,-9,111,-113,-9,99,-111,"); add("-10,92,-110,-5,113,-106,-13,81,-127,-20,55,-141,"); add("-23,35,-141,-27,26,-157,-18,35,-127,-27,18,-160,"); add("-38,-89,-123,-29,-61,-106,-36,-68,-143,-31,-46,-140,"); add("-33,-79,-124,-30,-56,-136,-25,-11,-150,-11,129,-209,"); add("-18,-47,-75,-10,63,-142,9,100,-57,9,124,-89,"); add("-3,84,-129,4,98,-107,6,103,-98,9,118,-105,"); add("13,124,-83,18,133,-63,13,113,-80,23,146,-59,"); add("32,130,58,29,134,2,28,135,-4,30,125,26,"); add("40,177,11,-14,-74,22,3,-8,43,37,164,-3,"); add("32,145,-17,33,147,-10,38,143,23,39,142,37,"); add("40,122,78,37,136,18,31,148,-65,21,67,28,"); add("27,99,5,10,99,-155,-12,15,-146,12,76,-78,"); add("24,96,-28,9,95,-179,-9,-1,-93,5,66,-146,"); add("-17,-17,-142,-16,-12,-151,0,38,-139,-11,-10,-126,"); add("-32,-73,-156,-11,-9,-146,-12,-11,-150,-3,19,-151,"); add("-2,20,-165,0,19,-147,-25,-71,-125,2,20,-131,"); add("3,24,-133,15,62,-139,42,140,100,43,133,129,"); add("22,72,40,43,138,34,42,140,-20,48,151,22,"); add("43,136,8,46,136,47,44,137,-24,14,50,-76,"); add("55,155,85,-22,-70,55,-42,-135,73,9,23,49,"); add("49,140,37,50,141,46,56,160,19,50,140,9,"); add("50,140,17,30,77,27,51,137,29,47,116,83,"); add("43,100,105,50,121,77,51,128,19,46,126,-58,"); add("6,36,-160,-18,-34,-104,4,27,-143,6,31,-179,"); add("-9,-13,-122,-18,-37,-144,-21,-45,-141,-12,-24,-148,"); add("-8,-18,-150,-12,-28,-147,-22,-58,-137,-43,-113,-113,"); add("-43,-114,-41,-53,-142,-13,-54,-145,-2,-43,-119,-51,"); add("-43,-124,-61,-48,-137,-39,-32,-98,-113,-33,-105,-164,"); add("-36,-102,24,-32,-103,-95,4,-2,-173,25,67,-69,"); add("17,31,-155,-13,-58,-173,-7,-37,-107,-6,-41,-144,"); add("10,-12,-243,-9,-41,-66,0,-27,-131,-2,-39,-146,"); add("19,28,-134,47,118,-94,34,68,-128,30,53,-132,"); add("19,9,-162,25,42,-104,57,139,-86,47,106,-93,"); add("51,128,-54,55,140,-41,52,117,-82,51,108,-91,"); add("51,106,-95,54,119,-73,57,128,-55,58,131,-52,"); add("54,117,-60,84,188,-60,-24,-44,43,-84,-179,93,"); add("32,84,12,55,105,-97,59,126,-61,61,138,-22,"); add("56,132,-7,48,130,53,66,154,3,74,176,20,"); add("41,94,3,62,147,27,59,138,27,57,135,40,"); add("57,134,44,52,127,63,48,122,78,57,131,52,"); add("62,122,-17,71,128,-61,61,115,-30,76,142,-28,"); add("57,119,33,60,92,-89,-4,9,63,26,73,95,"); add("70,131,-8,14,37,42,38,92,91,22,60,88,"); add("38,100,131,50,107,79,-22,-10,147,-7,13,127,"); add("16,45,85,19,57,138,46,104,119,52,110,114,"); add("67,114,-21,31,64,62,-45,-65,87,-29,-52,-1,"); add("-7,-11,9,23,59,139,15,46,156,47,90,50,"); add("-19,-29,49,-19,-14,167,-15,-11,148,-36,-51,137,"); add("-26,-34,144,18,42,151,29,58,109,-35,-56,127,"); add("-35,-54,123,-47,-82,59,-37,-64,38,-21,-34,138,"); add("27,52,132,-19,-33,138,59,107,66,-4,-8,122,"); add("-36,-65,121,-50,-92,117,29,48,103,48,89,-112,"); add("37,67,-134,50,88,26,57,98,77,19,35,-58,"); add("15,27,-100,7,12,-104,5,9,-168,62,107,47,"); add("-17,-29,140,-24,-42,142,36,59,133,25,39,160,"); add("-5,-14,129,3,-1,151,55,86,135,-59,-104,74,"); add("-22,-40,38,36,51,147,31,44,116,9,8,77,"); add("-4,-21,146,15,8,176,-28,-60,109,-19,-57,201,"); add("-40,-78,59,-56,-108,86,9,-11,173,31,35,121,"); add("51,67,131,43,55,117,-12,-48,149,-39,-90,112,"); add("-49,-103,94,-46,-103,105,-29,-79,124,-42,-96,96,"); add("-58,-113,33,-83,-148,-12,-71,-123,-31,-71,-133,-2,"); add("14,12,58,12,1,91,-86,-149,-59,-47,-98,37,"); add("-59,-132,72,-14,-61,125,-49,-123,104,-39,-86,28,"); add("-61,-140,60,-42,-107,77,-15,-74,144,-44,-116,79,"); add("-50,-129,75,-10,-53,94,38,26,158,44,67,73,"); add("69,133,26,64,111,58,72,142,7,72,141,8,"); add("66,132,-4,58,125,-42,43,109,-75,66,145,-60,"); add("56,125,-64,53,121,-71,56,124,-68,66,135,-51,"); add("7,0,40,-46,-102,64,-66,-128,24,-26,-56,23,"); add("98,190,-32,58,122,-57,51,118,-89,52,114,-78,"); add("59,122,-68,62,125,-62,65,124,-47,69,129,-43,"); add("68,125,-44,92,158,-25,60,92,29,77,119,30,"); add("76,112,42,73,99,67,83,110,86,72,114,-11,"); add("4,-5,45,24,21,68,50,49,105,78,83,137,"); add("58,59,108,70,79,99,81,101,73,81,102,63,"); add("81,95,85,70,68,124,37,11,140,63,60,99,"); add("81,100,56,91,97,107,61,68,56,48,25,134,"); add("95,69,193,4,59,-161,23,9,69,72,89,35,"); add("26,85,-155,10,9,15,30,-9,154,18,-25,150,"); add("84,79,104,87,109,25,-33,-15,-88,14,31,-36,"); add("5,41,-103,1,40,-121,5,23,-51,63,28,174,"); add("40,11,129,42,54,3,60,94,-46,8,-2,39,"); add("-75,-117,58,-81,-138,88,20,29,-8,66,113,-76,"); add("75,118,-55,74,121,-75,-19,24,-155,29,76,-125,"); add("18,79,-187,13,-4,70,-9,-71,196,65,112,-92,"); add("13,-9,81,59,64,36,32,76,-114,75,146,-180,"); add("-24,-52,77,-36,-88,143,67,69,48,43,90,-123,"); add("14,63,-154,21,64,-133,118,139,20,-74,-92,5,"); add("-31,-74,127,-15,-71,175,81,117,-57,56,69,1,"); add("106,135,-25,68,85,-11,73,76,39,94,73,131,"); add("-38,-49,13,-104,-106,-57,-91,-108,-7,-47,-74,60,"); add("-60,-68,-20,-42,-81,99,-28,-56,70,-62,-95,57,"); add("-86,-105,-8,-131,-160,-16,64,62,63,78,79,59,"); add("100,112,37,100,108,51,97,105,43,72,99,-36,"); add("74,120,-100,77,113,-67,76,113,-78,90,93,38,"); add("55,46,61,-148,-151,-74,-47,-93,123,-30,-85,157,"); add("99,85,98,85,80,61,153,155,70,40,40,20,"); add("97,112,-3,58,86,-66,73,91,-27,159,166,33,"); add("-81,-96,19,19,6,50,90,69,92,83,50,125,"); add("70,38,117,60,12,154,52,11,133,60,12,147,"); add("131,119,60,17,-21,107,62,13,146,43,-7,138,"); add("91,70,72,40,42,-1,-92,-53,-116,55,100,-113,"); add("57,110,-139,115,106,35,65,82,-46,115,115,8,"); add("121,104,49,104,88,41,110,78,84,48,34,38,"); add("28,8,55,75,30,116,92,65,64,121,108,21,"); add("-3,-30,74,62,26,88,54,3,128,80,39,94,"); add("85,37,110,109,74,71,80,94,-52,28,9,44,"); add("40,-16,131,126,64,129,30,-8,88,93,38,113,"); add("105,56,94,107,52,103,121,107,-2,-8,-35,69,"); add("-4,-29,60,-178,-122,-86,32,-15,103,66,1,136,"); add("72,-9,167,-38,-22,-26,-130,-69,-107,-7,37,-101,"); add("-67,-14,-107,-103,-53,-97,-159,-94,-120,-65,-45,-35,"); add("-104,-60,-89,-103,-95,-3,-96,-103,31,-41,-79,93,"); add("-20,-77,136,82,32,106,95,49,95,108,74,63,"); add("123,90,55,82,63,30,99,72,40,23,-25,104,"); add("83,40,80,102,39,117,93,25,125,92,42,89,"); add("112,46,113,93,39,89,123,44,134,22,57,-80,"); add("36,85,-115,-20,43,-130,-30,11,-80,-105,-46,-100,"); add("-28,22,-100,-64,26,-185,-34,27,-132,22,71,-121,"); add("5,51,-111,-17,47,-147,80,110,-104,68,88,-76,"); add("40,80,-117,134,108,12,123,104,-5,2,40,-99,"); add("-108,-42,-127,5,41,-96,1,50,-135,-47,24,-171,"); add("32,19,19,79,21,123,42,-12,125,33,-26,144,"); add("110,50,102,112,65,68,120,67,74,82,95,-79,"); add("61,82,-89,-11,45,-144,-43,18,-144,-67,-4,-134,"); add("-74,-13,-131,-89,-30,-116,-99,-42,-108,-94,-38,-113,"); add("-98,-44,-106,-98,-45,-106,-106,-58,-90,-103,-55,-93,"); add("-115,-73,-74,-112,-73,-67,-116,-83,-49,-113,-78,-60,"); add("-114,-82,-55,-109,-72,-76,-115,-56,-147,53,45,6,"); add("104,65,88,121,91,47,108,69,75,117,83,57,"); add("113,98,-9,16,57,-140,-26,43,-219,24,-2,74,"); add("16,-31,148,12,-36,152,108,62,91,118,86,38,"); add("114,76,55,131,77,94,84,41,79,92,39,110,"); add("86,27,124,120,92,10,113,81,18,139,79,87,"); add("77,33,78,70,13,120,81,13,143,58,-5,138,"); add("69,4,136,63,-2,137,60,-6,137,64,-1,130,"); add("75,7,127,56,-9,131,52,-32,181,44,-3,90,"); add("99,20,130,74,5,119,76,7,118,108,46,75,"); add("134,72,56,129,65,61,115,75,12,132,71,48,"); add("99,24,105,124,40,102,81,4,118,91,21,92,"); add("132,64,53,120,49,69,144,82,24,74,85,-86,"); add("-14,53,-143,67,20,52,87,76,-48,80,68,-44,"); add("97,75,-36,35,76,-132,-21,48,-149,-156,-38,-144,"); add("95,70,-28,64,77,-97,-12,40,-122,-80,5,-142,"); add("-12,-31,64,-30,-11,-21,-110,-27,-105,-127,-59,-55,"); add("-107,-47,-55,-128,-45,-96,-125,-59,-58,19,24,-33,"); add("54,97,-171,53,-13,131,118,50,66,101,22,112,"); add("171,62,118,-98,-11,-134,70,22,59,106,27,102,"); add("107,39,73,154,49,114,21,60,-124,-52,22,-141,"); add("-43,27,-143,33,72,-146,-152,-58,-96,79,48,0,"); add("14,40,-88,-94,-11,-134,100,83,-66,71,76,-100,"); add("-11,39,-135,24,62,-148,29,65,-150,72,74,-101,"); add("53,75,-145,-13,-19,41,59,2,103,160,82,31,"); add("37,63,-137,26,63,-161,85,41,23,94,82,-98,"); add("21,40,-98,-49,12,-135,53,25,16,92,54,-15,"); add("-52,10,-138,17,20,-37,156,74,39,59,61,-107,"); add("-28,16,-117,60,38,-23,63,57,-88,69,57,-77,"); add("102,83,-118,8,24,-79,20,20,-37,74,49,-46,"); add("-111,-42,-64,-130,-69,5,-146,-88,43,-99,-48,-22,"); add("-96,-58,25,-49,-28,7,-95,-41,-49,-150,-98,59,"); add("34,27,-29,17,41,-129,-147,-71,-48,-110,-42,-86,"); add("-152,-73,-58,50,47,-75,79,60,-67,-57,-21,-49,"); add("-132,-76,3,-160,-61,-146,61,26,47,109,43,88,"); add("143,85,-13,94,70,-73,37,50,-133,-63,-7,-132,"); add("-117,-40,-128,87,51,-3,81,32,66,111,70,-42,"); add("100,74,-88,118,74,-45,15,33,-126,-36,14,-172,"); add("9,0,27,45,-2,137,84,29,79,128,82,-65,"); add("129,69,-4,125,66,-7,-63,-16,-85,20,36,-138,"); add("-29,12,-144,-2,26,-156,89,63,-95,66,48,-86,"); add("60,51,-121,40,35,-94,67,52,-111,57,50,-139,"); add("-47,-6,-120,-118,-44,-117,1,20,-137,-44,-5,-136,"); add("38,40,-163,14,25,-149,-28,2,-138,-115,-48,-100,"); add("-134,-70,10,-122,-72,69,-90,-59,99,-141,-75,4,"); add("-126,-64,-36,-75,-48,63,-110,-70,73,-136,-81,52,"); add("-81,-55,72,-147,-81,-18,-117,-61,-47,-106,-58,-32,"); add("-127,-65,-71,-116,-66,-23,-72,-51,68,-61,-54,134,"); add("-54,-51,138,-72,-60,117,-96,-71,91,-106,-77,75,"); add("-114,-80,62,-121,-83,40,-123,-83,30,-125,-83,17,"); add("-126,-79,-24,-132,-77,-69,-106,-62,-54,-111,-61,-90,"); add("-99,-53,-99,-91,-47,-109,-81,-39,-122,-100,-48,-164,"); add("-81,-59,24,-107,-89,97,-75,-63,74,-113,-87,43,"); add("-105,-79,29,-130,-103,48,-103,-85,61,-109,-89,55,"); add("-102,-90,84,-111,-81,-25,-113,-76,-66,-171,-140,51,"); add("34,42,-103,-4,11,-101,-114,-81,-55,-149,-133,97,"); add("41,43,-63,60,64,-122,0,21,-147,-105,-68,-124,"); add("22,18,1,111,76,92,111,92,-45,79,75,-102,"); add("54,56,-120,40,49,-163,60,45,13,107,92,-91,"); add("85,75,-103,103,81,-53,114,83,17,117,88,-23,"); add("118,88,-25,97,77,-75,128,91,-1,128,88,17,"); add("117,86,-53,10,22,-157,2,16,-180,1,7,-79,"); add("-1,10,-152,-23,-6,-149,-67,-37,-156,60,41,10,"); add("92,69,-93,64,49,-125,36,31,-144,43,35,-143,"); add("34,29,-159,75,53,-86,104,71,-92,74,51,-124,"); add("85,58,-119,40,28,-137,36,24,-147,65,42,-134,"); add("50,31,-135,-11,-8,-147,-44,-31,-140,-40,-31,-200,"); add("110,72,10,124,78,-12,123,77,-49,127,78,-27,"); add("121,74,-43,146,88,-45,51,26,-131,-32,-25,-132,"); add("-139,-87,-39,9,5,-11,128,80,28,67,38,-60,"); add("112,63,-78,124,75,31,127,75,-3,138,80,10,"); add("121,72,33,140,80,26,111,66,70,123,71,80,"); add("121,68,47,114,65,51,111,62,99,85,47,51,"); add("101,56,71,11,7,65,95,51,27,48,27,106,"); add("63,33,-10,60,31,34,-13,-4,161,65,34,141,"); add("106,55,41,105,52,-52,72,35,-130,37,15,-168,"); add("83,39,-90,46,19,-161,79,36,-75,3,3,49,"); add("-79,-35,130,-59,-26,161,-35,-15,131,-59,-27,128,"); add("18,9,136,118,59,92,101,49,32,-31,-15,113,"); add("-16,-9,126,50,23,132,103,48,78,127,60,65,"); add("110,50,64,141,65,60,77,38,-96,-2,1,-144,"); add("15,9,-154,78,37,-114,106,48,-94,68,30,-131,"); add("19,8,-167,23,11,24,-25,-11,189,7,3,112,"); add("-100,-45,171,-61,-29,68,-89,-42,116,12,2,157,"); add("103,45,94,121,53,77,128,54,77,159,73,-115,"); add("60,22,148,-61,-30,111,-42,-24,145,-3,-7,123,"); add("39,15,46,131,61,-85,138,64,-138,-35,-19,110,"); add("-59,-28,68,-116,-54,85,46,14,109,93,34,114,"); add("115,45,65,101,37,94,152,62,24,119,52,-55,"); add("96,45,-107,135,57,-57,109,48,-81,56,19,54,"); add("66,19,122,134,54,-47,120,45,14,79,37,-138,"); add("77,36,-149,41,13,45,50,19,-23,-6,5,-150,"); add("45,22,-146,-22,-2,-170,-101,-37,-34,-127,-47,19,"); add("-127,-52,103,-127,-48,-19,-89,-31,-100,-148,-58,-11,"); add("-144,-57,-30,-122,-47,-64,-175,-71,-30,-117,-46,-126,"); add("87,38,-89,112,48,-94,131,54,-56,153,61,26,"); add("91,35,63,141,56,-31,116,46,-79,111,43,-130,"); add("-81,-30,-107,-154,-60,-23,-162,-63,-72,76,30,-75,"); add("143,55,4,196,75,-91,86,33,78,71,26,-98,"); add("11,3,-102,54,18,-147,88,33,26,157,58,68,"); add("116,41,-5,120,42,-55,125,42,-76,158,55,8,"); add("128,42,-55,132,41,-112,70,22,-75,23,5,-78,"); add("-125,-45,-117,-114,-39,-27,-76,-30,-127,-123,-43,-32,"); add("-160,-53,55,-110,-42,-70,-136,-49,-22,-142,-49,71,"); add("-89,-29,108,-55,-16,124,-71,-22,150,-83,-30,38,"); add("-1,-1,-34,33,11,-33,-107,-42,-58,-131,-52,-69,"); add("13,8,119,-132,-49,48,-96,-40,-84,-108,-46,-91,"); add("-57,-27,-143,-83,-37,-88,-125,-51,2,-141,-57,24,"); add("-144,-61,-14,-41,-22,-92,-95,-41,-26,114,46,-52,"); add("38,22,135,113,45,-60,128,49,-80,118,50,32,"); add("181,75,49,-20,-12,-96,69,26,-27,132,44,-152,"); add("-31,-18,-122,-48,-23,-73,-149,-58,36,-19,0,130,"); add("-129,-50,41,33,6,-131,146,54,-83,-67,-29,-38,"); add("-30,-20,-127,59,15,-137,23,-3,-164,-13,-16,-141,"); add("43,5,-140,94,26,-126,115,37,-94,38,-1,-166,"); add("125,41,-72,115,37,-70,142,54,6,102,28,-92,"); add("-15,-22,-149,-12,-22,-150,-12,-22,-146,-138,-61,-71,"); add("-43,0,128,6,19,144,20,29,187,-75,-34,-47,"); add("-42,-28,-104,-9,-26,-190,-108,-52,-82,-154,-60,4,"); add("-152,-59,7,-108,-50,-50,-174,-79,-54,68,23,-40,"); add("184,68,-58,50,31,85,182,65,-57,38,5,-74,"); add("139,47,-49,119,35,-77,39,0,-111,-4,-24,-154,"); add("32,-10,-145,36,-10,-149,68,5,-132,84,9,-131,"); add("127,25,-132,114,57,88,-14,17,135,47,32,91,"); add("142,47,-23,132,37,-62,108,14,-139,21,-11,-110,"); add("87,11,-105,116,20,-113,132,32,-67,113,19,-100,"); add("112,18,-99,140,36,-44,131,29,-67,98,8,-115,"); add("38,-12,-122,-82,-53,-131,62,-7,-132,142,57,68,"); add("135,54,59,40,1,-51,-82,-50,-118,-89,-53,-125,"); add("79,1,-103,147,43,-6,135,49,40,141,48,36,"); add("170,45,-16,-69,-36,-77,-55,-47,-138,-9,-37,-150,"); add("72,-6,-117,20,-29,-143,-66,-60,-170,86,24,-3,"); add("53,-18,-131,2,-32,-129,-63,-49,-118,24,-19,-101,"); add("70,46,101,12,39,137,16,42,151,-49,20,136,"); add("-25,24,126,33,63,227,99,7,-88,13,-32,-147,"); add("44,-32,-180,30,-15,-95,-5,-39,-151,40,-27,-142,"); add("-4,-41,-153,-110,-55,-92,45,5,-27,85,-6,-106,"); add("108,11,-66,125,10,-82,138,21,-55,174,38,-24,"); add("120,27,-11,156,35,-11,117,9,-67,135,8,-83,"); add("135,22,-30,145,30,-9,152,26,-26,105,-5,-96,"); add("100,-12,-111,136,17,-37,146,17,-43,124,1,-78,"); add("151,20,-27,140,19,-26,147,16,-33,124,-6,-91,"); add("115,-6,-86,160,20,-20,122,46,82,136,16,-18,"); add("124,-13,-100,161,35,35,87,-29,-131,55,33,77,"); add("139,42,76,73,-25,-112,42,-38,-138,104,-20,-104,"); add("133,-3,-61,49,-34,-123,-41,-40,-104,66,16,23,"); add("106,-15,-82,140,-26,-125,66,-15,-64,37,-42,-134,"); add("27,-46,-138,-11,-53,-145,41,-44,-135,89,-34,-116,"); add("135,-12,-71,148,-3,-46,47,-29,-88,20,-60,-161,"); add("-50,-23,-49,-136,-35,-57,-140,-33,-47,-120,-35,-57,"); add("-138,-47,-79,-81,-56,-117,-109,-36,-56,-160,-3,41,"); add("-158,-18,6,-68,-67,-143,-117,-6,24,-158,-13,25,"); add("67,-29,-95,140,17,-7,205,63,88,-60,-34,-63,"); add("-179,-70,-111,42,-48,-129,145,-3,-55,141,6,-29,"); add("156,23,8,29,73,166,142,5,-28,107,-28,-95,"); add("87,-40,-119,70,-21,-65,127,-24,-87,96,-37,-107,"); add("105,-32,-96,-20,-34,-73,-192,-36,-37,-147,-15,0,"); add("62,-27,-73,-50,-46,-90,-64,-47,-89,-113,-45,-70,"); add("-151,-17,3,-124,0,32,-127,18,75,-194,-8,39,"); add("-100,-17,-8,-68,13,51,-91,47,133,-117,28,102,"); add("-108,-23,-15,39,-62,-152,-86,-54,-89,-79,-64,-112,"); add("-34,-63,-124,72,-46,-124,159,-3,-57,77,-31,-90,"); add("67,-50,-124,141,-12,-69,124,38,43,80,-39,-102,"); add("26,-74,-158,-43,-63,-113,109,-12,-55,55,-60,-133,"); add("8,-75,-147,46,-53,-112,-48,-53,-89,-123,-74,-110,"); add("-57,27,66,-61,60,130,-4,-8,-14,37,-64,-132,"); add("-77,-54,-81,-137,-36,-30,-162,9,65,-61,-42,-61,"); add("114,-19,-69,160,46,41,86,-61,-135,-67,-54,-82,"); add("-129,-49,-55,-129,-67,-84,-119,-42,-42,-138,10,60,"); add("-116,33,95,-4,65,119,-34,91,179,6,-43,-82,"); add("-48,-58,-91,-90,-77,-112,-97,-71,-96,-11,-72,-125,"); add("-53,-59,-87,-43,-35,-47,-17,-85,-143,-102,-12,14,"); add("-72,49,109,-131,44,123,-147,-31,-2,-112,-4,34,"); add("-197,-92,-87,4,87,151,-95,49,126,19,-17,-38,"); add("-77,-73,-99,-120,5,56,-104,35,105,-63,53,124,"); add("-10,-6,-7,-5,-72,-129,51,-64,-135,-57,-80,-116,"); add("13,-75,-135,-69,-96,-137,-6,-24,-38,106,-35,-103,"); add("67,-57,-122,33,-94,-169,82,-34,-87,89,-37,-93,"); add("96,-49,-115,63,-62,-121,-41,-96,-137,86,-23,-66,"); add("130,44,24,125,-16,-67,99,-44,-102,83,-75,-141,"); add("42,-58,-101,91,-40,-88,36,-71,-117,-44,19,42,"); add("-137,27,82,-127,-2,37,-57,52,97,-37,84,141,"); add("-93,-22,-3,-141,5,56,-90,27,74,-97,52,116,"); add("-101,-20,6,-32,19,41,-73,40,90,-127,49,126,"); add("-43,45,90,26,63,92,-86,40,98,-96,48,119,"); add("-95,41,107,-79,44,109,-10,69,120,-50,62,128,"); add("-69,42,103,-74,48,118,-71,56,132,-91,31,97,"); add("-19,54,106,-31,67,136,-69,61,148,75,55,64,"); add("165,34,-18,13,77,137,-48,65,147,-67,31,93,"); add("-58,46,119,90,73,96,-41,10,41,-47,57,138,"); add("-36,64,148,-17,59,129,-75,42,126,-82,38,126,"); add("-160,31,156,12,-41,-93,-177,-73,-50,89,-3,-57,"); add("138,10,-58,88,-34,-121,46,-49,-124,-61,-78,-125,"); add("1,-67,-133,-8,-72,-138,-147,-34,14,-19,-46,-80,"); add("77,-45,-127,-100,-39,-21,-108,17,91,-81,72,186,"); add("-63,18,70,-43,51,126,-61,51,138,-149,-7,76,"); add("-28,56,131,21,67,125,69,16,-9,34,13,6,"); add("47,46,67,24,56,103,-37,49,128,-27,-27,-40,"); add("-92,-20,15,-102,4,73,-89,33,130,-12,-27,-52,"); add("-111,-57,-49,-142,-41,8,-133,-53,-22,-87,46,159,"); add("-48,-46,-65,-135,-53,-18,-131,-41,5,-130,1,98,"); add("-109,11,107,-130,-9,78,-177,-14,109,-103,-45,-18,"); add("-140,-29,51,-106,6,100,-39,52,151,-118,-16,62,"); add("9,-26,-65,11,-46,-113,-103,-54,-34,-114,-32,27,"); add("-154,-41,44,-142,-49,18,-163,-73,-16,-109,-48,-5,"); add("-176,-51,49,-66,10,85,-13,38,99,130,56,2,"); add("129,43,-24,29,28,35,-139,-21,84,-80,-15,43,"); add("-154,-101,-82,-135,-44,34,-15,25,71,115,79,68,"); add("160,107,91,75,63,75,-35,-16,-4,-117,-76,-63,"); add("-115,-66,-40,-141,-81,-45,-143,-15,110,-116,-71,-46,"); add("-136,-59,6,-127,-79,-49,-82,-67,-64,-65,-50,-45,"); add("-143,-56,26,-148,-70,1,-106,-61,-19,-197,-86,23,"); add("-38,-63,-98,-99,-108,-127,-11,37,93,-37,63,181,"); add("-104,-51,5,-113,-78,-43,-131,-99,-69,-39,-48,-61,"); add("-90,-69,-46,-52,22,110,36,78,129,79,77,80,"); add("94,82,74,23,21,21,-131,-106,-85,-88,-89,-96,"); add("-22,4,35,76,92,117,-38,-8,26,-83,-108,-141,"); add("-18,-45,-80,-56,-75,-99,-85,-68,-47,60,12,-44,"); add("-75,-60,-42,-128,-21,106,-14,-35,-56,-7,-46,-91,"); add("-126,-71,-1,-154,-77,21,2,45,95,18,77,144,"); add("-56,-15,36,-91,-90,-80,-163,-46,103,49,9,-42,"); add("118,28,-87,-8,-31,-56,-136,-78,3,-154,-87,7,"); add(""); //add("/*2*/"); add("855,1,10146,-28113,2593,"); add("-64,-14,99,-80,-18,106,-94,-21,118,-117,-32,89,"); add("-142,-49,-9,-125,-42,5,-128,-35,72,-151,-47,23,"); add("-146,-50,-18,-133,-46,-35,-151,-45,14,-129,-32,74,"); add("-134,-34,54,-100,-18,108,15,23,153,86,38,101,"); add("166,53,22,114,38,26,140,39,-36,135,37,-51,"); add("143,47,6,145,55,58,-124,-32,67,28,23,110,"); add("85,41,95,148,50,1,46,0,-116,126,38,-40,"); add("98,45,85,98,27,-54,87,31,0,117,48,45,"); add("135,50,10,123,45,-4,105,53,98,140,63,69,"); add("-39,1,110,-64,-4,137,-33,10,148,-42,7,144,"); add("-39,9,148,-38,12,148,-37,11,146,-28,16,148,"); add("-87,-10,120,-70,-3,117,-42,15,156,-32,15,133,"); add("-44,13,141,-80,-2,130,-5,24,117,-7,29,148,"); add("-32,21,143,-35,21,147,87,40,36,96,40,22,"); add("-19,30,156,11,38,140,31,47,141,-43,21,144,"); add("-83,3,129,-86,1,122,-113,-13,102,-111,-11,104,"); add("-142,-38,40,-137,-36,41,-138,-35,40,-116,-59,-74,"); add("-56,-54,-130,-62,-27,-26,-49,23,143,-52,19,131,"); add("-144,-27,65,-26,-48,-141,-89,-34,-22,-138,-28,50,"); add("-92,-1,101,74,51,99,-49,22,131,-127,-50,-42,"); add("-141,-33,32,-124,-13,80,-149,-37,17,-130,-15,74,"); add("-132,-14,77,-147,-42,-9,-144,-26,44,-143,-29,27,"); add("-147,-33,15,-138,-38,-14,-110,-61,-115,-105,-49,-84,"); add("-193,-49,-13,38,41,110,-101,-31,-25,-72,23,133,"); add("127,47,62,-51,10,74,-161,-49,-43,-33,28,117,"); add("43,40,100,-56,30,138,-19,42,146,36,53,142,"); add("-86,16,108,-145,-37,-16,-97,-52,-97,-128,-51,-76,"); add("-146,-38,-26,-149,-29,-1,-148,-30,-2,-141,-7,60,"); add("-141,-10,48,-149,-24,8,-150,-20,19,-141,-7,49,"); add("-150,-18,18,-147,-14,28,-149,-16,19,-149,-15,22,"); add("-142,-3,50,-112,19,105,-133,6,71,-116,18,96,"); add("-112,20,101,-125,15,86,-121,16,87,-159,-19,-3,"); add("-150,-19,-10,-151,-12,6,-135,9,64,-132,4,44,"); add("-156,-14,-3,-118,-35,-73,-114,-37,-85,-153,4,42,"); add("-88,34,115,-81,37,121,-112,32,108,-35,-26,-68,"); add("-76,-33,-82,-115,38,126,-117,-31,-73,-110,-34,-83,"); add("-152,-6,-1,-152,-7,-6,-147,-13,-25,-145,-16,-37,"); add("-144,-16,-40,-132,-26,-70,-139,-21,-59,-109,-33,-97,"); add("-99,-36,-108,-90,36,108,-127,-5,-17,-96,20,55,"); add("-117,5,9,-147,-8,-32,-150,-1,-14,-149,-14,-56,"); add("-83,28,76,58,42,129,-20,42,118,-126,-13,-49,"); add("-86,-37,-120,-54,-44,-136,15,-53,-156,-135,-21,-85,"); add("-82,49,137,-70,46,126,-119,36,88,-81,-19,-70,"); add("-22,-46,-143,-69,-43,-144,-140,38,89,-43,-33,-110,"); add("114,-37,-91,71,-44,-122,-30,-42,-140,-71,-35,-129,"); add("-97,-29,-116,-138,-9,-65,23,-25,-77,-7,-32,-110,"); add("-136,-7,-58,-104,-24,-113,-14,-51,-183,21,-28,-96,"); add("58,-21,-58,132,9,68,127,15,86,27,-28,-92,"); add("-97,-23,-110,-67,-30,-130,-79,-27,-125,-47,-32,-134,"); add("-5,-37,-148,-31,-33,-141,48,-40,-150,-136,-10,-84,"); add("-104,-10,-83,-111,-10,-85,-125,-4,-66,-120,-8,-87,"); add("-117,-10,-97,-90,-20,-132,-69,-16,-107,-93,-15,-121,"); add("-67,-21,-132,-38,-25,-144,-55,-21,-141,-31,-25,-148,"); add("-77,-16,-131,-27,-24,-147,3,-27,-149,4,-26,-149,"); add("22,-28,-148,55,-29,-137,103,-29,-106,150,-18,-6,"); add("145,-20,-31,134,-7,46,80,13,129,78,14,128,"); add("132,10,135,16,-14,-76,-32,-21,-147,4,-26,-155,"); add("162,-21,-42,93,-24,-108,-32,-18,-138,-96,-10,-124,"); add("-65,-13,-134,-90,-9,-122,-69,-11,-134,-79,-9,-128,"); add("-44,-14,-146,-57,-11,-139,-22,-15,-147,59,-21,-143,"); add("-61,-7,-129,-124,4,-86,-90,-3,-120,-57,-6,-139,"); add("-36,-9,-146,-21,-10,-149,30,-15,-148,71,-17,-133,"); add("75,-19,-163,-105,10,-3,-134,19,54,-145,14,-43,"); add("-144,14,-52,-142,14,-50,-140,15,-54,-141,16,-55,"); add("-136,15,-68,-124,13,-86,-100,9,-114,-115,13,-97,"); add("-126,16,-86,-144,21,-33,-145,22,-49,-126,14,-211,"); add("10,2,103,-62,16,132,-128,25,66,-141,24,-30,"); add("-57,5,-132,-39,2,-151,107,-22,-83,-36,5,-47,"); add("-142,25,-56,-109,18,-94,-147,29,-31,-156,30,-34,"); add("-31,9,92,136,-26,79,112,-19,99,54,-6,141,"); add("-19,9,150,-108,25,85,-133,25,-57,-88,13,-124,"); add("-107,18,-129,-114,24,14,24,-1,120,84,-12,129,"); add("60,-7,138,77,-9,129,83,-11,124,-50,19,144,"); add("-119,31,98,-114,19,-79,-47,1,-148,-123,22,-77,"); add("-136,28,-54,-143,30,-42,-142,31,-37,-139,32,-11,"); add("-116,34,108,60,-8,127,139,-31,32,129,-26,64,"); add("70,-8,134,61,-5,139,61,-3,139,54,-1,147,"); add("-91,30,115,-36,19,136,-3,14,148,5,14,152,"); add("-21,19,148,-30,23,145,-30,23,149,-106,31,50,"); add("-96,33,86,-112,41,116,95,-17,48,-6,13,93,"); add("-117,39,85,-90,36,105,-94,32,62,-40,17,51,"); add("-61,31,110,-130,30,-29,-131,37,18,66,-4,97,"); add("25,9,103,-109,39,70,-156,39,-21,-120,26,-45,"); add("-54,31,103,-124,41,45,-115,11,-148,-38,20,61,"); add("29,15,151,-109,31,-3,-62,25,43,-64,36,103,"); add("-146,51,42,-111,23,-65,-72,33,67,-134,39,-15,"); add("-96,44,80,-156,50,-3,-129,54,68,-134,41,-21,"); add("-134,39,-38,-150,60,54,-117,42,3,-27,36,152,"); add("-53,11,-44,-6,-26,-159,113,-44,-30,-20,-4,-58,"); add("-82,9,-121,-125,48,21,-84,50,117,-82,22,-47,"); add("-147,63,50,-120,52,44,-39,38,132,-100,56,97,"); add("-23,41,177,-118,61,82,-71,52,123,202,-60,96,"); add("-114,60,80,93,-7,139,20,19,131,-21,39,142,"); add("-73,14,-67,-18,-25,-152,-142,44,-57,-88,65,143,"); add("-97,45,31,-51,46,113,-18,42,157,-42,48,133,"); add("-38,47,138,18,29,150,86,-9,108,-40,35,75,"); add("-97,66,102,-47,52,129,-2,40,151,56,18,152,"); add("-95,59,72,-85,8,-104,-7,-35,-144,-28,-30,-156,"); add("25,-48,-147,-15,-25,-128,-24,-22,-132,-5,-34,-151,"); add("73,-59,-120,23,-40,-133,3,-39,-169,21,-33,-111,"); add("38,-44,-131,-54,-9,-152,126,-67,-76,70,-43,-69,"); add("53,-45,-120,47,-38,-98,1,-24,-130,48,-43,-128,"); add("75,-51,-119,85,-50,-97,50,-39,-115,16,-28,-131,"); add("145,-69,-78,92,-14,130,81,-38,-46,92,-49,-90,"); add("135,-55,-30,105,-50,-76,120,-56,-82,123,-40,17,"); add("101,-51,-102,-31,-10,-145,-5,-15,-118,144,-53,-23,"); add("127,-51,-60,141,-46,15,142,-48,-7,141,-48,-20,"); add("139,-48,-27,129,-49,-68,142,-47,-20,144,-43,2,"); add("134,-47,-55,118,-43,-65,95,-41,-118,48,-30,-133,"); add("40,-27,-148,9,-19,-150,-25,-8,-148,2,-15,-146,"); add("-5,-12,-156,31,-21,-145,-2,-12,-152,-15,-7,-143,"); add("9,-13,-157,-86,24,-2,-77,18,-69,16,-15,-167,"); add("-97,25,-49,-131,35,-68,-99,24,-107,55,-20,-57,"); add("93,-30,-67,129,-40,-49,84,-29,-95,-35,5,-125,"); add("-80,19,-128,-38,7,-140,-68,16,-139,-184,54,-42,"); add("30,-11,-109,-23,5,-131,-40,10,-134,-186,56,-83,"); add("112,-34,-78,70,-22,-118,55,-16,-134,-40,13,-157,"); add("4,1,-147,49,-12,-139,-6,5,-150,40,-7,-148,"); add("4,4,-147,-49,20,-153,-49,20,-120,42,-5,-148,"); add("39,-4,-144,28,1,-165,-30,17,-116,-70,28,-110,"); add("110,-29,-54,130,-44,72,26,-16,138,-25,-2,147,"); add("-13,-5,153,70,-28,142,78,-20,-44,36,-3,-147,"); add("-24,16,-149,53,-7,-129,110,-37,77,57,-23,124,"); add("143,-44,74,27,-14,135,126,-36,32,75,-23,68,"); add("98,-29,76,82,-17,-108,28,0,-145,-68,25,-127,"); add("24,4,-161,49,-4,-144,86,-13,-128,107,-19,-105,"); add("27,5,-144,-12,15,-154,84,-6,-166,-127,38,-63,"); add("-148,36,15,-143,44,-72,-19,20,-144,109,-26,-31,"); add("136,-40,54,109,-23,-50,-14,17,-123,-89,31,-83,"); add("-123,39,-67,-87,35,-107,77,-9,-97,155,-46,54,"); add("104,-16,-88,94,-9,-114,8,18,-157,92,-13,-73,"); add("110,-17,-77,101,-8,-114,95,-6,-120,67,5,-135,"); add("95,-5,-114,65,6,-140,81,3,-128,85,1,-126,"); add("109,-7,-101,130,-14,-76,103,-3,-108,79,6,-131,"); add("87,5,-123,129,-10,-87,18,26,-156,96,3,-108,"); add("151,-19,-53,144,-31,23,139,-14,-57,133,-6,-84,"); add("146,-32,31,140,-18,-24,118,0,-95,127,-12,-39,"); add("156,-16,-38,134,-22,14,143,-10,-54,81,-45,165,"); add("104,3,-81,78,19,-143,165,-22,5,-30,-18,107,"); add("-130,3,66,-57,-19,133,6,-28,137,79,-26,81,"); add("97,-32,107,88,0,-61,160,-18,-5,141,-19,14,"); add("98,-1,-51,42,24,-149,104,4,-76,77,5,-66,"); add("52,22,-135,113,9,-95,125,-16,19,118,4,-70,"); add("89,-27,97,77,-31,117,41,-30,136,-72,-25,156,"); add("-144,6,35,-121,-2,69,69,-30,124,161,-14,3,"); add("37,-21,100,-45,-22,142,-92,-12,117,-82,-13,121,"); add("-60,-18,139,-79,-13,131,-69,-14,132,-35,-19,147,"); add("27,-24,148,60,-25,134,135,-21,64,138,-19,55,"); add("133,-23,87,126,-7,-24,71,13,-132,96,8,-112,"); add("117,6,-96,151,-12,12,-16,-15,116,-64,-16,145,"); add("86,-21,123,23,-21,148,-22,-17,154,7,-18,148,"); add("106,-18,108,92,-18,118,66,-18,136,75,-16,129,"); add("56,-16,137,9,-14,151,-32,-11,148,-72,-7,133,"); add("-86,-6,126,-84,-4,126,-14,-8,133,123,-8,18,"); add("89,4,-130,125,1,-97,157,-11,62,114,1,-81,"); add("157,-2,-36,120,3,-96,85,8,-121,92,8,-118,"); add("75,8,-118,108,9,-118,128,6,-80,153,1,-24,"); add("123,5,-53,115,10,-101,132,8,-74,135,9,-67,"); add("113,8,-67,85,13,-99,153,6,-28,38,8,-63,"); add("45,16,-122,89,13,-90,109,16,-106,112,15,-84,"); add("81,16,-100,104,20,-116,151,21,-102,20,22,-149,"); add("111,19,-87,53,22,-133,53,22,-123,132,8,1,"); add("71,16,-73,-64,23,-163,42,23,-122,-1,27,-158,"); add("66,27,-132,-52,19,-120,-108,12,-98,-88,18,-123,"); add("-106,12,-92,-181,0,-44,53,12,-52,133,30,-117,"); add("100,13,-34,82,37,-157,82,20,-73,63,33,-132,"); add("115,28,-95,35,21,-85,31,32,-130,61,37,-142,"); add("27,33,-132,16,32,-130,62,36,-128,76,39,-130,"); add("-76,23,-114,-33,36,-149,-108,11,-73,-26,28,-111,"); add("74,41,-132,-110,13,-76,9,25,-88,-85,32,-135,"); add("-90,31,-127,-103,-6,-2,-99,8,-46,-25,40,-142,"); add("-56,34,-126,-32,47,-159,9,45,-144,40,39,-116,"); add("-74,30,-107,-14,40,-127,106,39,-102,153,10,-1,"); add("126,33,-75,143,33,-68,84,42,-106,163,15,-9,"); add("136,8,12,146,15,-9,154,12,8,123,-13,73,"); add("140,35,-61,147,12,11,142,13,8,142,26,-26,"); add("106,40,-77,132,38,-62,143,29,-28,135,34,-44,"); add("194,36,-27,97,-12,78,124,-4,64,150,16,23,"); add("159,37,-31,46,48,-115,156,45,-53,-15,-36,94,"); add("-26,-53,138,147,11,43,118,0,64,138,-8,98,"); add("120,71,-143,138,11,45,145,21,23,146,6,68,"); add("113,50,-75,115,32,-22,87,-32,148,71,25,-26,"); add("148,46,-37,171,21,52,60,55,-120,84,45,-71,"); add("112,-11,108,134,20,40,147,29,20,107,-15,126,"); add("147,32,16,131,8,82,130,11,73,131,16,60,"); add("141,21,56,125,8,85,139,21,58,133,18,65,"); add("111,2,99,144,26,57,153,29,56,87,53,-79,"); add("72,62,-121,120,61,-70,123,47,-21,79,-2,88,"); add("-86,-65,114,-106,-63,88,-125,-59,59,-42,-50,118,"); add("131,12,99,76,-14,129,81,-11,124,87,-7,121,"); add("105,3,111,32,-30,145,-31,-50,141,-74,-56,114,"); add("-40,-47,127,112,11,101,121,18,85,137,36,41,"); add("131,62,-66,141,35,58,25,-32,158,-43,-49,136,"); add("95,18,63,95,12,88,17,-29,150,74,7,81,"); add("119,18,111,27,-25,152,17,-25,144,64,-7,141,"); add("44,-14,140,73,-1,140,52,-8,136,110,21,107,"); add("140,49,19,136,45,44,78,7,125,25,-20,159,"); add("129,47,22,139,49,40,139,48,50,59,4,115,"); add("7,-23,148,32,-11,148,-6,-27,148,-101,-55,90,"); add("-76,-48,104,-17,-28,144,16,-18,175,104,29,94,"); add("124,40,85,58,5,144,73,15,129,78,17,127,"); add("88,23,124,82,22,122,59,11,135,67,15,133,"); add("30,-1,147,-6,-17,148,-18,-20,147,-90,-49,114,"); add("-65,-38,129,-105,-54,130,66,23,86,82,28,102,"); add("-29,-22,162,43,11,136,-8,-12,155,9,-3,157,"); add("54,18,141,-20,-14,150,30,9,148,-2,-4,155,"); add("38,14,144,0,-2,154,-38,-17,145,-30,-13,146,"); add("-13,-5,165,118,51,49,159,71,70,-58,-25,54,"); add("-147,-64,16,-117,-49,76,-86,-35,120,-43,-14,142,"); add("-63,-23,129,-10,1,153,-12,1,149,-21,-2,150,"); add("-87,-30,128,-7,4,134,-138,-53,64,-79,-30,35,"); add("-98,-32,115,-59,-15,138,-81,-23,127,-102,-32,104,"); add("-125,-43,76,-134,-48,36,-137,-54,-19,-115,-37,69,"); add("-97,-26,116,-95,-26,95,"); add(""); //add("/*3*/"); add("533,1,14413,-10720,-24028,"); add("106,64,35,41,145,-39,45,121,-25,118,62,45,"); add("108,59,42,130,65,53,121,63,49,125,156,13,"); add("105,16,61,116,68,46,134,43,70,123,76,50,"); add("78,121,2,37,136,-31,102,110,25,28,136,-35,"); add("3,139,-52,41,137,-25,71,135,-3,71,132,-1,"); add("106,109,33,94,119,21,23,137,-33,49,144,-17,"); add("50,142,-13,38,151,-25,25,132,-27,44,100,-1,"); add("117,83,55,114,84,53,77,128,14,100,11,68,"); add("77,-59,74,102,-33,85,81,128,19,59,137,0,"); add("45,141,-9,21,141,-27,40,147,-13,49,131,-2,"); add("55,141,2,99,120,41,12,152,-33,97,77,53,"); add("59,144,7,26,145,-17,59,151,8,83,100,39,"); add("77,-10,61,69,-98,78,-3,-158,37,16,-145,50,"); add("6,-150,44,28,-68,40,47,-117,69,-62,-183,3,"); add("25,-97,47,27,-119,56,-34,-144,17,30,-138,66,"); add("-8,-148,39,-63,-137,-5,-3,-148,45,-37,-145,19,"); add("-51,-146,9,10,-137,56,16,-141,62,-6,-146,48,"); add("-18,-141,38,10,-146,62,22,-132,68,43,-119,81,"); add("8,-136,60,28,-124,73,85,-76,100,103,-39,102,"); add("114,21,87,118,63,73,114,73,68,103,83,54,"); add("74,129,12,119,59,79,116,34,89,116,41,87,"); add("107,90,60,96,110,43,112,66,76,109,71,73,"); add("114,56,83,102,33,84,106,93,64,98,100,55,"); add("101,89,63,107,85,72,105,76,74,45,130,-4,"); add("-39,126,-84,-51,115,-92,-23,126,-65,10,141,-39,"); add("49,132,2,-28,103,-60,-91,36,-100,-74,6,-72,"); add("-3,145,-49,-37,155,-83,-53,99,-80,74,82,45,"); add("87,113,49,72,-11,71,12,-108,44,35,-107,66,"); add("67,112,31,62,10,57,48,21,40,-31,120,-66,"); add("19,34,9,75,-92,100,92,-81,115,82,-8,84,"); add("109,97,80,90,-10,94,116,25,110,106,78,87,"); add("85,40,76,101,-2,107,98,47,89,108,136,75,"); add("93,-18,105,101,107,79,72,-5,80,45,4,49,"); add("66,-13,77,-92,-105,-70,-116,-3,-126,-80,-112,-54,"); add("-41,-175,10,55,-93,89,75,5,80,98,-28,118,"); add("99,-9,114,116,57,113,75,-20,92,46,-138,98,"); add("60,6,68,39,-81,73,60,-72,95,43,-109,90,"); add("-49,-156,-2,56,-99,103,50,-71,86,-4,-133,46,"); add("44,-94,90,23,-141,85,-100,-116,-74,-87,-100,-64,"); add("17,-35,35,10,-127,65,48,36,43,92,-10,115,"); add("51,51,42,103,56,103,109,16,130,28,-100,78,"); add("18,-163,94,41,49,31,15,153,-49,18,117,-26,"); add("99,103,83,78,114,53,90,103,74,89,65,90,"); add("76,53,79,62,-14,88,19,-118,75,56,19,66,"); add("49,-39,84,65,59,63,17,-34,39,-23,-173,43,"); add("60,-55,107,55,99,32,14,-38,36,32,-76,79,"); add("49,-70,100,-47,-125,-9,-20,-79,9,80,18,105,"); add("-21,-130,32,56,-2,81,36,-42,73,46,-97,113,"); add("-68,-135,-32,-26,-92,9,12,-100,68,-109,-64,-125,"); add("17,-12,31,88,5,126,85,45,101,98,10,141,"); add("33,-89,96,-10,-72,24,-108,-124,-95,-9,-120,52,"); add("7,-166,103,59,52,60,73,129,39,75,139,38,"); add("64,131,26,40,8,56,10,-123,85,35,-95,108,"); add("38,-102,118,-6,-132,67,-46,-141,11,-57,-137,-9,"); add("-32,-109,18,35,-92,112,37,-91,117,7,-117,86,"); add("-8,-141,79,7,-120,92,25,-100,109,43,-74,123,"); add("53,-57,130,57,-51,132,67,-25,134,61,-36,133,"); add("69,-2,122,76,10,129,24,-97,116,41,-63,123,"); add("68,-18,141,49,-44,126,26,-88,117,52,-38,132,"); add("78,18,135,79,17,141,39,-36,107,37,-65,131,"); add("30,-62,114,22,-89,124,18,-91,117,14,-95,118,"); add("40,-60,139,40,-50,134,15,-97,124,-18,-110,68,"); add("-10,-135,113,59,79,51,69,184,-27,23,-36,85,"); add("-27,-131,71,-24,-129,79,-54,-125,5,-65,-137,-2,"); add("-50,-138,32,-25,-122,75,-19,-121,89,-40,-134,59,"); add("-56,-139,28,-80,-120,-45,-70,-128,-14,-80,-119,-43,"); add("-82,-123,-40,-83,-118,-49,-75,-119,-27,-53,-167,84,"); add("100,105,97,60,81,39,98,141,53,-23,-83,47,"); add("-79,-124,-31,-87,-103,-72,-57,-134,37,63,50,81,"); add("103,130,75,-27,-77,34,-85,-107,-64,-87,-106,-64,"); add("-85,-114,-49,-85,-119,-40,-82,-127,-22,-63,-133,29,"); add("-81,-128,-14,-89,-107,-59,-88,-115,-41,-79,-124,-8,"); add("-93,-112,-54,-84,-127,-12,-67,-131,32,-71,-133,28,"); add("-77,-127,10,-81,-128,3,-90,-122,-21,-92,-115,-32,"); add("-91,-119,-25,-94,-115,-31,-85,-125,-1,-77,-137,40,"); add("-92,-172,59,-23,-67,51,-85,-127,14,-63,-112,36,"); add("-33,-122,120,50,-14,128,8,-34,69,-75,-127,40,"); add("-100,-130,-6,-84,-36,-120,-97,-70,-91,-105,-98,-61,"); add("-98,-58,-109,-69,-40,-76,-88,-26,-136,-69,0,-135,"); add("-85,-22,-130,-62,9,-131,-36,52,-145,4,92,-127,"); add("-10,81,-134,-54,23,-132,-42,37,-127,30,113,-104,"); add("-19,73,-132,-69,10,-132,-67,12,-130,-64,23,-138,"); add("-69,12,-130,-82,-5,-128,-97,-18,-133,-83,-38,-84,"); add("-62,26,-130,-73,16,-134,-92,-30,-104,-67,39,-149,"); add("-2,101,-125,22,108,-95,31,118,-93,-30,71,-126,"); add("-69,31,-135,-37,68,-130,-46,59,-131,-44,61,-128,"); add("-40,68,-130,-79,17,-126,-101,-20,-116,-90,2,-122,"); add("-82,15,-124,-66,41,-128,-72,36,-130,-66,44,-129,"); add("-59,54,-129,-54,61,-126,-77,32,-128,-88,16,-122,"); add("-91,12,-122,-94,8,-120,-101,-6,-112,-94,8,-117,"); add("-78,34,-120,-119,-51,-88,-117,-66,-71,-117,-80,-56,"); add("-104,-26,-91,-87,18,-111,-122,-68,-68,-121,-27,-104,"); add("-86,2,-92,-126,-117,-26,-112,-44,-74,-38,-120,71,"); add("-98,-130,20,-129,-42,-92,-107,-99,-16,-85,-115,23,"); add("-124,-98,-31,-87,-113,21,-80,-156,70,-62,-71,9,"); add("-173,-72,-100,30,103,-70,-25,85,-105,-8,117,-118,"); add("-31,90,-114,-65,81,-136,-70,41,-102,-11,108,-108,"); add("11,117,-95,-39,91,-115,36,126,-78,-31,-5,-23,"); add("-84,-123,30,-33,-105,63,-57,-130,65,4,-102,94,"); add("11,-104,105,-21,-114,85,-51,-122,66,-60,-146,83,"); add("84,-30,106,5,-114,113,-106,3,-101,-105,24,-119,"); add("-2,109,-105,33,121,-83,13,141,-119,-96,-66,-25,"); add("-122,-121,3,-61,-111,49,-43,-125,79,3,-137,133,"); add("-119,-18,-87,-85,45,-119,-83,53,-122,-35,-85,51,"); add("-7,-50,41,-116,-89,-16,-71,-54,-8,227,159,44,"); add("-34,-26,-6,-122,-85,-24,-113,-99,-1,-100,-112,23,"); add("-87,-116,39,-22,-117,95,-75,-117,53,-127,-103,-3,"); add("-114,-89,-7,-114,-97,4,-128,-46,-59,-127,-32,-70,"); add("-138,-91,-19,-80,19,-83,-136,-18,-88,-123,-15,-80,"); add("-134,-63,-39,-134,-55,-47,-135,-49,-51,-89,37,-102,"); add("-50,81,-118,-69,69,-117,-36,76,-99,-50,97,-129,"); add("-109,-60,-18,27,-110,124,-68,-50,1,-74,71,-120,"); add("-83,-61,1,-118,-90,6,-118,-72,-10,-166,-79,-35,"); add("33,81,-56,-45,52,-80,-106,31,-99,-54,89,-120,"); add("-53,84,-113,-65,76,-112,-91,53,-107,-114,29,-96,"); add("-127,5,-82,-132,6,-85,-118,12,-81,-75,78,-114,"); add("-42,85,-100,49,106,-64,45,112,-72,8,121,-99,"); add("16,118,-92,34,114,-76,-2,118,-100,-22,114,-106,"); add("-32,107,-105,-28,83,-82,18,123,-89,15,102,-72,"); add("-23,126,-112,-27,98,-90,16,148,-104,-36,111,-104,"); add("-29,92,-85,-33,108,-97,-98,84,-113,-57,79,-88,"); add("-55,94,-96,26,127,-77,-46,113,-103,-21,121,-94,"); add("3,124,-84,5,131,-85,52,127,-59,3,127,-83,"); add("-8,125,-85,-2,126,-83,9,129,-78,18,131,-73,"); add("-17,125,-87,-17,124,-85,46,131,-57,49,127,-52,"); add("73,127,-39,73,123,-36,98,120,-20,37,121,-51,"); add("26,144,-69,42,129,-52,37,130,-53,35,153,-67,"); add("94,112,-12,39,138,-54,130,95,16,83,115,-18,"); add("94,105,-6,121,87,19,92,135,-20,126,100,16,"); add("107,31,42,122,95,19,132,110,18,78,104,-8,"); add("52,139,-39,13,134,-58,91,140,-16,131,17,66,"); add("131,106,25,24,-114,68,87,14,43,94,98,9,"); add("73,136,-21,48,153,-43,78,105,-2,70,133,-19,"); add(""); //add("/*4*/"); add("521,1,-7056,27453,9826,"); add("48,26,-40,102,-3,82,129,39,-21,109,39,-34,"); add("149,63,-76,128,57,-78,109,51,-74,115,37,-34,"); add("155,37,-8,74,53,-109,30,53,-140,34,5,8,"); add("16,-47,150,31,-29,102,147,9,62,99,17,11,"); add("87,16,4,95,1,51,162,24,19,128,16,22,"); add("150,20,22,150,21,14,147,40,-44,112,37,-54,"); add("138,36,-40,141,35,-40,136,40,-59,124,28,-26,"); add("101,31,-51,-186,8,-106,-101,20,-105,-103,19,-105,"); add("-143,-14,-27,-148,-10,-40,-143,-34,32,-74,15,-85,"); add("215,32,9,77,25,-38,-169,-3,-78,-107,8,-83,"); add("-49,5,-41,160,34,-24,89,49,-114,72,13,-3,"); add("104,-15,104,144,20,5,117,36,-60,-34,35,-133,"); add("-138,6,-87,-100,9,-84,-26,2,-22,106,27,-34,"); add("-46,31,-131,9,15,-50,67,-33,153,51,-38,155,"); add("115,-8,83,73,-31,138,68,-22,102,-7,-50,156,"); add("-23,-48,143,63,-35,135,127,12,17,55,24,-51,"); add("83,-28,119,58,46,-118,28,48,-137,40,54,-155,"); add("-28,28,-103,19,24,-71,-62,10,-58,48,38,-104,"); add("-81,31,-138,-60,27,-121,-117,-1,-50,-49,-1,-21,"); add("156,41,-69,-66,30,-137,-147,-11,-32,-25,17,-76,"); add("183,8,61,84,29,-64,-116,16,-113,-119,-4,-45,"); add("77,37,-102,147,-12,121,151,36,-63,12,32,-114,"); add("100,-13,92,106,9,16,105,-20,118,-3,-3,10,"); add("-130,-1,-53,79,-42,189,132,10,16,121,14,-3,"); add("106,20,-32,35,40,-131,-138,11,-95,-50,-21,57,"); add("10,46,-169,69,37,-110,76,18,-43,138,-12,102,"); add("87,-21,110,101,33,-87,-53,19,-95,-114,12,-87,"); add("12,41,-158,-85,7,-59,152,22,-32,-85,29,-153,"); add("15,11,-41,84,-23,129,122,-16,112,95,37,-117,"); add("21,34,-136,-87,20,-116,-75,5,-50,179,24,-36,"); add("-114,10,-86,-64,32,-167,41,27,-107,139,16,-18,"); add("125,9,5,132,-15,116,94,23,-70,-19,32,-157,"); add("-106,8,-74,-49,18,-107,81,19,-60,78,3,13,"); add("-125,21,-150,-109,-17,43,95,44,-183,83,32,-133,"); add("61,27,-122,133,24,-80,108,28,-115,38,30,-154,"); add("110,20,-81,127,17,-55,-21,16,-102,-151,-11,11,"); add("-62,-7,23,131,29,-132,152,-1,58,123,15,-53,"); add("-21,16,-106,-143,-1,-43,-83,3,-50,228,12,1,"); add("155,6,10,102,20,-101,124,18,-90,107,21,-118,"); add("-44,18,-138,-120,9,-92,-151,-8,10,-119,-20,108,"); add("-142,0,-54,-144,-19,79,-121,-20,92,-119,-20,86,"); add("-67,-9,34,143,31,-154,100,21,-98,96,22,-124,"); add("58,22,-139,-64,9,-94,-117,-19,93,-141,-15,49,"); add("-96,-5,-11,191,29,-131,-90,8,-108,-158,-5,-43,"); add("-133,-6,-26,-88,-3,-36,207,24,-69,163,2,76,"); add("131,-2,79,148,8,6,140,11,-31,71,17,-112,"); add("-85,10,-124,-73,5,-72,0,13,-123,-135,-1,-55,"); add("-129,-1,-65,-138,-7,-14,-103,-3,-43,161,11,-4,"); add("140,4,45,135,0,78,110,11,-52,-95,9,-131,"); add("-94,6,-119,-143,-1,-77,-135,-4,-55,-94,-4,-21,"); add("-93,-10,28,-41,-13,106,-121,-11,22,-31,17,-204,"); add("-68,2,-87,-140,-11,-12,-69,-8,23,94,-3,118,"); add("85,-4,125,-5,-13,134,-42,-6,17,-30,11,-134,"); add("-79,8,-159,-81,-8,3,-33,-17,156,-47,-12,77,"); add("-162,-23,72,-64,-5,-20,28,18,-155,0,14,-147,"); add("4,14,-151,-96,-8,-23,-86,-20,128,-92,-17,74,"); add("-60,-11,44,-16,16,-196,-135,-16,6,192,35,-159,"); add("-33,5,-106,-101,-6,-76,-153,-13,-66,-100,-22,129,"); add("-62,-18,139,-13,-2,1,47,17,-149,52,17,-141,"); add("-120,-10,-67,-128,-23,88,-156,-23,29,-96,-6,-97,"); add("-75,-11,9,-161,-17,-91,-135,-17,-46,-158,-24,-9,"); add("-66,-19,118,82,4,124,20,1,35,-159,-26,8,"); add("-131,-27,69,-149,-26,5,-115,-15,-68,-79,-5,-112,"); add("-136,-20,-71,-132,-18,-97,-92,-11,-104,-134,-22,-57,"); add("-126,-27,35,-85,-27,146,3,-8,117,-31,-12,78,"); add("-78,-22,78,72,6,114,84,7,125,27,-2,88,"); add("-125,-28,30,-53,2,-158,-83,-15,-23,37,-8,187,"); add("-6,-3,18,-45,4,-159,-37,4,-148,-69,-4,-134,"); add("-122,-27,3,-14,-11,103,23,2,47,-56,-24,133,"); add("-16,-10,74,-160,-31,-52,-68,-28,146,2,-15,161,"); add("38,5,36,82,20,-10,39,-2,103,14,-6,92,"); add("100,14,75,91,6,131,28,-10,139,4,-17,155,"); add("-15,-22,150,-14,-21,139,-64,-30,120,-86,-26,53,"); add("-80,-37,132,-46,-34,162,-75,-38,138,-88,-29,54,"); add("-74,-22,30,-46,-35,152,-96,-36,80,-86,-47,153,"); add("-106,-40,80,-72,-45,154,-114,-39,58,-87,-20,-17,"); add("-31,-22,74,-100,-39,73,-184,-50,-1,-85,-46,120,"); add("47,-12,127,129,32,18,96,30,-20,135,52,-87,"); add("58,25,-52,-84,-59,192,-29,-33,130,30,-7,72,"); add("-124,-33,1,72,1,88,-94,-29,17,21,-3,40,"); add("-42,-19,38,4,-18,88,-59,-44,134,-73,-40,89,"); add("-68,-28,39,-40,22,-146,2,33,-152,-53,15,-141,"); add("-78,5,-131,-105,-33,17,-23,-37,147,48,-17,142,"); add("-9,-35,153,54,-16,137,72,1,89,28,-16,102,"); add("-118,-44,46,-91,-40,58,-86,-48,95,-70,-32,47,"); add("-128,-40,7,-97,-41,45,-118,-10,-108,-108,-16,-70,"); add("-100,-36,16,94,-8,155,118,26,45,30,-3,48,"); add("-88,-50,90,-5,-29,108,-83,20,-181,-61,13,-130,"); add("-50,4,-82,-53,-5,-51,-41,-34,87,-148,-38,-42,"); add("-56,-34,64,161,41,50,129,23,72,36,-12,94,"); add("100,1,123,7,-9,41,-86,-24,-11,37,-16,107,"); add("-82,-3,-89,-56,15,-129,-59,16,-141,-96,-15,-64,"); add("-170,-44,-50,-53,-35,69,117,12,110,106,9,101,"); add("71,-8,121,15,-30,131,6,-3,21,-63,14,-130,"); add("-40,21,-135,-110,-11,-99,-118,-16,-95,-78,-29,14,"); add("-1,-26,101,63,-15,139,-126,-37,-22,-51,-34,62,"); add("-122,-20,-87,-65,-49,103,145,31,74,142,41,32,"); add("143,44,17,143,37,37,121,19,78,-6,-8,22,"); add("-106,-25,-34,-154,-31,-77,-146,-44,-22,-143,-39,-39,"); add("-139,-40,-33,-62,-35,48,85,-1,116,53,0,68,"); add("-184,-35,-112,-17,-28,83,-15,-32,96,130,28,64,"); add("136,29,71,24,-11,68,-165,-25,-119,-135,-42,-24,"); add("-69,-39,52,-100,-73,125,28,-5,54,51,8,36,"); add("-181,-67,0,-74,-63,122,195,74,-5,104,26,40,"); add("119,64,-69,-31,-71,201,-58,-63,136,-23,-15,23,"); add("1,55,-181,-66,-27,10,-35,-28,52,-152,-42,-51,"); add("-76,-18,-34,133,15,117,47,-3,66,-180,-32,-116,"); add("-70,-33,20,3,-16,55,-107,-47,18,47,-7,82,"); add("12,-6,35,-83,-41,28,22,-12,65,-73,-36,24,"); add("25,-30,122,-38,-42,84,60,16,22,-98,-49,33,"); add("-130,-83,94,19,-34,122,-13,-35,90,-21,-28,56,"); add("54,7,40,-92,-51,43,58,10,37,-98,-67,77,"); add("57,-17,114,-21,-11,7,-77,-40,22,13,-34,109,"); add("37,-10,67,-72,-48,51,-35,-37,59,92,13,67,"); add("126,5,125,142,35,58,116,22,61,41,-17,87,"); add("-146,-56,-6,60,-3,69,-97,-55,42,59,0,61,"); add("-3,-18,43,63,-2,65,-120,-76,71,103,34,18,"); add("-126,-76,63,185,44,72,79,-31,151,88,23,29,"); add("4,50,-116,-5,45,-116,126,-9,141,57,37,-37,"); add("21,43,-83,112,43,-3,-39,21,-88,74,12,38,"); add("12,9,-12,33,17,-10,8,15,-29,95,37,-6,"); add("19,27,-49,73,31,-12,4,15,-35,104,47,-23,"); add("84,70,-102,40,56,-109,58,66,-120,125,26,48,"); add("101,24,26,42,40,-68,85,33,-10,57,40,-58,"); add("43,2,32,57,10,24,76,29,-11,-12,32,-96,"); add("127,17,64,44,59,-121,-19,47,-146,170,32,60,"); add("62,78,-163,57,57,-112,113,7,77,114,33,3,"); add("98,67,-107,127,23,38,118,1,92,107,28,6,"); add("82,50,-75,128,61,-78,76,16,15,-11,-28,72,"); add("-127,-57,64,89,-12,100,147,19,57,106,16,32,"); add(""); //add("/*5*/"); add("321,1,-10216,27876,4312,"); add("-33,-1,-76,72,20,45,-2,15,-106,-14,19,-164,"); add("39,12,16,27,27,-123,65,8,111,85,31,-9,"); add("8,22,-136,71,20,39,8,15,-85,28,3,48,"); add("4,-19,148,36,-10,148,91,34,-10,5,22,-145,"); add("-23,12,-142,-74,2,-199,39,5,60,101,19,116,"); add("97,15,136,111,41,-23,83,46,-134,-80,-19,-64,"); add("-122,-34,-49,-149,-37,-113,40,14,2,175,50,71,"); add("-13,9,-102,-138,-39,-64,31,12,-10,122,36,43,"); add("129,29,115,102,31,16,46,35,-157,-87,-11,-138,"); add("-56,-6,-113,-222,-73,-11,83,30,-16,-1,8,-72,"); add("42,15,-13,111,28,86,158,51,1,-51,-7,-85,"); add("-141,-30,-150,119,40,-9,109,25,97,130,48,-48,"); add("40,27,-149,-81,-18,-74,-180,-53,-52,108,42,-72,"); add("-67,-16,-56,21,9,-21,157,48,17,-26,-2,-67,"); add("-175,-51,-57,83,31,-45,72,26,-34,127,32,93,"); add("78,33,-99,-164,-42,-116,93,29,7,-46,-7,-95,"); add("29,9,1,98,22,110,124,39,-10,36,22,-141,"); add("38,22,-136,-15,5,-146,-116,-29,-96,-131,-52,162,"); add("-2,9,-138,-168,-59,92,30,17,-111,82,29,-61,"); add("58,25,-106,-53,-14,-52,-97,-26,-78,108,38,-70,"); add("84,26,-3,138,41,41,138,44,-54,109,37,-90,"); add("137,43,-56,61,23,-112,-40,-7,-144,-129,-34,-103,"); add("-72,-18,-120,-116,-36,59,-11,0,-126,-95,-32,94,"); add("12,7,-103,-111,-33,-55,-128,-42,81,-118,-41,121,"); add("9,6,-99,-97,-29,-88,-120,-41,52,-76,-28,121,"); add("-132,-45,25,-156,-52,-3,31,11,-43,-48,-11,-205,"); add("55,18,52,82,24,128,114,40,-67,113,40,-102,"); add("130,44,-64,145,46,-1,132,43,-41,135,42,-15,"); add("136,40,48,138,41,56,119,33,92,89,26,-38,"); add("6,5,-152,-47,-11,-143,-92,-26,-117,-137,-39,-88,"); add("-116,-35,-60,-150,-46,-31,-133,-41,-51,-142,-45,-12,"); add("-118,-39,-20,-147,-48,5,-147,-49,3,-69,-23,127,"); add("-17,-7,159,-97,-35,131,-30,-9,-143,16,7,-160,"); add("-128,-44,2,-123,-44,84,-87,-32,123,5,0,128,"); add("48,15,108,-26,-10,41,-121,-45,61,-16,-9,122,"); add("4,-3,150,-18,-12,161,16,-1,147,-33,-20,163,"); add("142,56,-94,-32,-16,89,-94,-43,172,87,35,-57,"); add("33,8,63,-16,-15,156,-31,-20,134,77,20,120,"); add("224,86,-107,-50,-25,106,-45,-24,121,-143,-57,81,"); add("-4,-6,52,-12,-10,76,-63,-30,87,-88,-41,97,"); add("-89,-44,123,-97,-26,-101,-126,-48,6,104,26,133,"); add("61,11,121,-78,-35,67,-48,-33,136,-7,-9,59,"); add("-98,-47,90,-40,-27,104,-124,-58,86,-110,-55,90,"); add("-119,-57,82,-121,-47,-10,-139,-52,-35,-26,-26,124,"); add("28,-11,166,165,60,53,-23,-27,123,-19,-27,133,"); add("-49,-40,137,-121,-51,7,-58,0,-158,-127,-38,-102,"); add("72,37,-48,110,57,-83,22,29,-151,-29,8,-149,"); add("-73,-16,-111,-128,-46,-65,-134,-47,-73,-106,-57,89,"); add("-119,-68,133,-79,-22,-93,-88,-24,-123,-86,-20,-158,"); add("-74,-40,60,-104,-51,36,15,11,-34,105,55,-70,"); add("40,33,-139,8,24,-185,-97,-38,-54,-122,-47,-84,"); add("-136,-60,-25,-121,-62,56,-57,-38,119,-8,-19,140,"); add("53,12,112,102,35,117,51,13,85,22,-10,161,"); add("136,69,-54,9,0,39,-73,-51,134,57,9,131,"); add("-80,-45,58,-83,-53,109,-76,-54,126,-40,-37,125,"); add("-10,-27,141,-118,-50,-33,-83,-49,60,-26,-39,160,"); add("-43,-39,111,5,-29,182,-3,-24,125,-70,-55,117,"); add("-21,-37,139,21,-21,160,19,-20,146,3,-29,150,"); add("9,-29,158,108,53,-2,74,56,-98,77,62,-118,"); add("33,42,-131,48,52,-147,29,36,-118,66,56,-133,"); add("81,63,-139,58,14,68,-45,-49,153,69,32,-2,"); add("5,-4,34,-65,-58,148,-52,-49,128,35,12,22,"); add("6,0,13,-36,-43,131,3,-27,132,-51,-50,126,"); add("48,17,25,94,46,-11,111,64,-64,148,89,-103,"); add("-51,-52,135,106,52,-17,93,65,-109,46,40,-98,"); add("104,66,-102,60,44,-88,59,48,-118,7,33,-157,"); add("61,47,-111,96,62,-119,45,40,-122,45,33,-83,"); add("124,73,-132,-1,-12,72,-14,-25,114,85,32,18,"); add("104,68,-154,13,-7,76,64,28,-15,60,14,63,"); add("-60,-47,133,21,-19,153,-70,-34,34,1,-17,94,"); add("169,50,93,-76,-32,11,-140,-45,-62,-77,-48,87,"); add("-46,-28,50,-52,-44,112,-24,-34,123,-24,-34,117,"); add("48,9,49,121,63,-59,141,74,-81,41,-4,97,"); add("74,22,40,108,55,-61,56,6,82,71,52,-120,"); add("92,12,116,74,35,-30,82,28,15,84,54,-109,"); add("-55,-3,-90,-92,-25,-50,27,17,-35,-66,-7,-93,"); add("27,15,-25,168,65,-10,-77,-16,-67,-89,-7,-146,"); add("62,29,-26,97,33,19,105,56,-96,-22,11,-108,"); add("61,32,-54,-91,-27,-41,30,18,-40,-51,-10,-57,"); add("79,38,-48,-64,-18,-37,23,20,-72,30,34,-145,"); add(""); //add("/*6*/"); add("232,1,18592,-4797,-23051,"); add("-106,15,-88,-120,-24,-91,-119,8,-94,-118,7,-93,"); add("-120,-52,-82,-108,20,-87,-97,76,-88,-109,63,-95,"); add("10,142,-19,95,107,50,118,58,78,117,25,84,"); add("129,55,90,-36,0,-28,-107,-30,-77,-120,-9,-89,"); add("-118,13,-91,-134,35,-107,36,120,6,-13,12,-11,"); add("-146,-1,-108,61,204,10,-49,-33,-30,-119,-65,-75,"); add("-99,38,-78,-75,44,-61,-122,-40,-80,-111,-70,-66,"); add("-120,-44,-76,-131,-23,-86,-92,-37,-57,-116,-80,-64,"); add("-78,-127,-30,-86,-126,-34,-63,-120,-20,-133,-100,-68,"); add("-47,-112,-9,-98,-97,-45,-110,-83,-54,-81,-130,-25,"); add("-117,-86,-56,-123,-29,-71,-124,-22,-72,-145,-4,-88,"); add("-117,-41,-63,-131,-11,-75,-123,-34,-66,-185,-57,-96,"); add("-47,-75,-11,-128,-41,-65,-123,32,-77,40,107,0,"); add("-100,58,-68,45,25,20,127,31,66,127,50,61,"); add("118,67,55,-31,116,-41,72,59,30,131,18,74,"); add("117,87,52,6,176,-30,138,9,81,129,-9,80,"); add("77,116,25,78,118,27,64,119,19,56,148,9,"); add("114,75,59,107,85,53,93,102,44,110,89,56,"); add("63,156,17,62,136,21,-86,71,-66,-129,-7,-82,"); add("-135,30,-90,-20,131,-30,76,119,32,95,108,47,"); add("124,25,76,123,42,74,116,64,69,117,74,68,"); add("122,39,77,132,36,85,29,140,4,8,153,-11,"); add("81,116,43,89,110,51,116,51,75,100,96,62,"); add("100,82,63,95,92,60,126,13,89,114,54,78,"); add("104,83,70,107,77,73,122,28,89,119,30,88,"); add("117,44,86,115,52,84,111,58,82,111,59,84,"); add("110,66,82,109,62,83,115,26,92,106,29,84,"); add("116,62,92,108,32,88,115,2,96,110,49,91,"); add("106,67,87,105,65,88,107,57,90,101,75,86,"); add("109,46,94,104,60,91,102,33,91,102,-62,96,"); add("99,-71,94,20,-114,24,54,-82,54,102,-52,98,"); add("111,0,105,59,-109,62,65,-115,69,63,-110,69,"); add("63,-114,69,76,-102,82,93,-48,96,111,34,107,"); add("62,101,55,41,106,33,51,178,40,49,-74,54,"); add("47,53,45,60,125,53,28,146,21,13,151,6,"); add("-26,132,-32,-7,147,-13,49,159,46,26,101,24,"); add("100,19,104,106,7,112,93,80,97,94,61,99,"); add("99,46,107,103,0,112,92,-59,102,79,-95,89,"); add("102,-47,116,95,-44,108,27,-144,35,66,-107,79,"); add("-26,-80,-28,-89,10,-101,-113,-40,-126,-79,-43,-87,"); add("-25,-126,-21,-48,-117,-49,-96,-86,-100,-104,-7,-113,"); add("-103,-7,-111,-104,22,-113,-109,-1,-114,-95,41,-103,"); add("-39,-73,-36,47,-135,57,106,-18,112,49,35,51,"); add("92,22,96,70,-108,81,83,-45,93,94,29,101,"); add("111,-45,126,-51,-80,-51,-99,-57,-104,-78,-112,-76,"); add("-68,-98,-65,17,-122,30,-25,-150,-12,-85,-55,-86,"); add("-90,52,-101,-34,127,-48,-36,147,-52,-73,194,-92,"); add("21,-74,27,-15,-191,2,-79,-92,-74,-104,-65,-102,"); add("-102,-37,-100,-121,16,-124,34,-53,39,-61,-124,-48,"); add("-100,-76,-92,-105,-15,-103,-110,-21,-105,-106,-32,-100,"); add("-102,-61,-90,-104,-53,-94,-108,-63,-94,-102,-25,-93,"); add("-101,-45,-88,-111,-79,-92,-100,-81,-81,-87,-94,-67,"); add("-89,-135,-61,-38,-138,-15,-47,-141,-22,-114,-156,-77,"); add("-40,-83,-22,-121,-73,-93,17,-1,14,130,-9,115,"); add("-146,-136,-105,90,-8,80,-9,-55,1,-90,-119,-58,"); add("-3,-143,23,17,-176,48,-104,50,-100,-46,-39,-32,"); add("-109,-13,-91,-167,68,-154,-25,-111,0,-104,-104,-67,"); add("-94,-101,-59,-84,-116,-46,-96,-102,-57,"); add(""); //add("/*7*/"); add("154,1,26493,2257,-13893,"); add("-76,-31,-149,-74,37,-134,-66,79,-108,57,125,126,"); add("-2,122,18,-70,10,-127,-71,7,-130,-74,49,-125,"); add("-55,104,-77,43,75,91,54,35,105,57,73,117,"); add("53,89,117,73,-38,129,-4,82,10,35,49,76,"); add("65,-40,116,5,32,15,-31,140,-26,-9,133,15,"); add("53,62,116,26,133,85,38,28,81,59,-90,93,"); add("25,88,73,47,-149,54,56,-117,82,48,-93,74,"); add("42,-130,54,50,-135,71,65,-82,116,50,-45,94,"); add("7,-114,-9,4,-113,-15,66,-64,125,45,19,101,"); add("66,-38,135,57,-93,104,62,-52,127,54,-50,112,"); add("33,-153,44,46,-120,83,52,-101,102,42,-120,79,"); add("45,-118,87,46,-102,92,58,-44,133,58,-36,134,"); add("57,-37,135,57,-22,139,54,-54,127,26,-133,49,"); add("25,-75,56,18,-121,35,29,-156,57,6,-124,5,"); add("-9,-102,-29,81,61,215,46,78,129,40,25,111,"); add("57,3,156,39,94,117,26,50,77,42,-95,109,"); add("33,-121,83,9,-151,16,29,-118,75,13,-155,32,"); add("-4,-158,-18,-19,-112,-56,-28,-126,-82,14,-146,40,"); add("-12,-145,-30,-32,-83,-88,-10,-97,-26,-50,-35,-138,"); add("-38,-109,-101,-29,-130,-70,7,-157,32,-8,-110,-14,"); add("-22,-139,-46,-22,-167,-40,-8,-126,-4,-26,-111,-54,"); add("-57,-16,-152,-43,-3,-113,-56,-11,-142,-51,28,-136,"); add("-43,22,-113,-17,22,-44,-20,-161,-27,-26,-159,-42,"); add("-61,77,-162,-61,-39,-142,-50,59,-128,-32,100,-89,"); add("-26,34,-66,-52,-93,-110,-56,-29,-123,-35,-99,-66,"); add("-53,64,-130,-44,15,-99,-56,-73,-114,-34,-133,-54,"); add("-13,-154,-5,-33,-74,-59,-56,70,-131,-55,59,-128,"); add("-58,55,-130,-56,67,-126,-38,95,-92,-27,130,-73,"); add("4,111,-6,-20,68,-47,-22,171,-65,-39,115,-88,"); add("28,83,49,20,62,35,10,163,7,-47,142,-102,"); add("-36,123,-79,-12,41,-25,-60,19,-119,-48,126,-100,"); add("-59,63,-115,-4,145,-12,19,146,35,-8,159,-15,"); add("-17,144,-31,-32,136,-60,-51,96,-94,-20,76,-35,"); add("-5,39,-8,-65,-89,-125,-68,-15,-126,-73,10,-133,"); add("-26,105,-43,53,108,101,61,93,116,55,87,108,"); add("53,95,104,32,132,70,-50,137,-83,32,133,71,"); add("38,140,87,23,98,55,49,127,109,6,116,26,"); add("20,83,51,-86,28,-162,-47,53,-82,38,99,86,"); add("20,88,52,"); add(""); //add("/*8*/"); add("165,1,-3761,29749,925,"); add("105,16,-88,20,5,-115,-80,-9,-37,-29,-3,-31,"); add("-47,-4,-80,-110,-14,-41,-136,-19,81,-100,-17,132,"); add("1,1,-30,72,13,-169,33,6,-71,95,14,-116,"); add("-71,-8,-70,-163,-23,48,0,1,-106,9,2,-129,"); add("-147,-21,-153,-110,-16,31,-7,-1,135,-53,-8,-61,"); add("-122,-19,-35,-63,-10,95,83,11,213,-84,-12,-44,"); add("-61,-9,-181,-128,-21,73,71,11,96,120,18,87,"); add("71,9,180,-31,-5,-34,-70,-9,-133,-142,-22,-76,"); add("-76,-13,72,82,11,161,14,1,95,-8,-5,121,"); add("111,15,104,152,24,26,154,20,94,-47,-7,-9,"); add("-156,-22,-41,-25,-8,124,-41,-6,-17,-91,-11,-125,"); add("-40,-8,50,-29,-4,-16,-67,-7,-129,-78,-9,-150,"); add("-110,-19,4,-113,-22,102,-96,-21,116,-46,-7,-35,"); add("58,13,-93,118,23,-94,104,20,-112,24,7,-151,"); add("-68,-11,-87,-130,-23,56,-120,-22,56,-114,-23,91,"); add("-158,-31,75,-82,-16,16,15,-2,197,-113,-21,-44,"); add("25,8,-118,19,7,-151,-71,-13,-140,-128,-25,-53,"); add("-165,-34,-4,8,0,136,119,23,111,-68,-14,33,"); add("-86,-18,2,-119,-25,-28,-119,-27,44,-30,-9,120,"); add("205,42,85,-71,-15,8,-158,-33,-60,-80,-16,-72,"); add("15,6,-141,110,26,-69,106,24,-103,-43,-8,-138,"); add("-141,-31,34,-114,-26,87,-72,-16,-23,-46,-10,-142,"); add("-126,-28,-99,-150,-36,4,32,7,90,-57,-14,93,"); add("15,2,148,-64,-18,122,50,10,115,89,18,123,"); add("30,3,144,-27,-10,120,-120,-32,101,30,2,119,"); add("126,25,109,91,18,84,144,33,-15,-11,3,-107,"); add("91,23,-68,12,8,-124,0,6,-162,115,26,-25,"); add("-3,-2,51,-49,-16,139,46,4,146,133,26,68,"); add("161,36,-43,69,8,150,100,19,16,75,13,51,"); add("97,23,-71,60,8,68,132,27,-12,35,13,-141,"); add("-62,-5,-151,42,10,-41,84,13,67,50,5,82,"); add("-5,-8,156,61,14,-56,-16,6,-192,78,13,33,"); add("36,0,138,75,7,128,133,27,-61,21,0,70,"); add("44,-1,150,152,29,-54,167,24,52,92,10,74,"); add("145,21,23,139,18,43,150,19,39,151,18,47,"); add("11,7,-78,-117,-10,-95,-148,-15,-126,48,7,13,"); add("141,14,96,37,12,-110,20,0,43,101,6,127,"); add("105,9,88,154,15,60,145,17,13,77,17,-129,"); add("66,14,-106,21,9,-121,-130,-8,-126,76,8,5,"); add("41,9,-86,-23,5,-159,-33,-1,-85,-109,-11,-52,"); add("25,6,-75,8,5,-139,-90,-10,-11,-124,-18,83,"); add(""); //add("/*9*/"); add("141,-1,-21883,20471,1436,"); add("65,72,-30,87,96,-65,100,105,-11,107,111,-3,"); add("102,102,54,109,109,17,92,90,60,101,90,127,"); add("-65,-68,57,36,31,57,109,106,20,79,70,98,"); add("111,104,51,-8,-21,150,-38,-50,135,-36,-49,136,"); add("-43,-57,130,-92,-95,31,-111,-115,37,-111,-111,-3,"); add("-90,-84,-66,-92,-84,-97,-97,-100,-2,16,3,123,"); add("93,86,76,54,39,143,-62,-78,107,-99,-108,41,"); add("-99,-110,38,-57,-72,90,77,63,126,93,86,74,"); add("105,111,-16,107,112,-13,106,102,39,99,89,73,"); add("106,107,-9,100,116,-107,24,10,84,-82,-96,103,"); add("-64,-76,75,-8,-30,135,-15,-42,160,116,101,83,"); add("60,64,-21,94,106,-86,61,78,-109,63,76,-93,"); add("73,86,-101,3,26,-151,0,22,-151,9,29,-154,"); add("2,22,-155,-15,3,-139,-8,9,-146,7,24,-151,"); add("28,40,-138,43,54,-139,91,89,-30,73,74,-77,"); add("119,111,-7,88,89,-104,118,108,-11,24,31,-124,"); add("-13,-1,-150,60,61,-116,100,93,-69,110,101,-66,"); add("28,31,-127,-2,5,-150,26,30,-153,34,34,-165,"); add("-125,-107,-95,-72,-60,-133,-3,0,-117,-97,-86,-61,"); add("-81,-72,-89,-64,-57,-131,-43,-39,-140,-43,-40,-140,"); add("-67,-63,-120,-81,-77,-105,-74,-71,-112,-82,-81,-130,"); add("-45,-39,74,36,37,155,35,36,139,-75,-70,33,"); add("-34,-31,69,-4,-3,150,54,51,132,31,29,142,"); add("51,45,135,68,61,144,-91,-86,86,-2,-5,78,"); add("4,-1,145,-62,-61,110,-67,-69,114,-13,-20,160,"); add("38,29,127,56,45,132,16,4,152,38,22,175,"); add("-80,-81,76,-9,-21,153,-37,-46,111,-91,-95,80,"); add("-42,-32,-78,-24,-11,-141,0,11,-124,24,35,-148,"); add("-54,-41,-140,-27,-15,-151,-85,-77,-108,9,12,-37,"); add("14,18,-89,-17,-13,-76,-97,-91,-71,-97,-92,-70,"); add("-97,-94,-70,-126,-123,-92,37,32,153,-110,-113,18,"); add("-105,-107,-20,-102,-103,-53,-103,-107,-10,-100,-104,-41,"); add("-103,-108,0,-99,-109,34,-103,-112,0,-102,-112,13,"); add("-90,-102,61,-85,-99,76,-3,-10,140,58,57,128,"); add("87,91,82,94,99,65,100,107,35,102,110,3,"); add(""); //add("/*10*/"); add("132,1,25827,-2922,-14981,"); add("-63,23,-112,19,140,5,21,141,11,-16,138,-50,"); add("13,153,-1,15,150,2,6,149,-11,-3,144,-22,"); add("16,158,7,42,141,56,-44,112,-86,-60,83,-109,"); add("-75,-8,-126,-28,-102,-36,-4,-168,10,29,-144,65,"); add("-51,-124,-70,-63,-96,-91,-77,-86,-116,-10,-125,1,"); add("4,-160,31,-56,-106,-75,-92,-2,-147,-29,144,-68,"); add("-75,45,-127,-81,15,-127,-33,114,-68,61,79,85,"); add("42,105,52,77,107,108,-6,149,-27,-10,119,-28,"); add("50,128,66,63,116,89,43,135,59,58,105,86,"); add("82,146,124,-61,9,-101,-61,102,-105,-75,53,-123,"); add("-69,72,-112,-53,112,-89,-48,117,-79,-64,75,-102,"); add("-81,-47,-121,-42,124,-68,69,87,103,89,-54,137,"); add("55,-52,87,80,8,126,72,-53,115,74,-45,120,"); add("77,43,124,66,-102,111,43,-122,76,61,-53,103,"); add("75,38,125,38,141,57,63,82,104,52,115,88,"); add("20,146,31,1,150,0,-27,141,-45,-44,124,-75,"); add("-68,67,-115,-74,-34,-125,-76,-10,-127,-81,22,-133,"); add("-73,11,-119,-75,-29,-121,-79,18,-125,-87,6,-138,"); add("-72,-3,-112,-84,-17,-131,-72,-76,-110,-85,-8,-128,"); add("-84,18,-126,-83,27,-122,-79,62,-115,-46,119,-65,"); add("-62,111,-87,-57,114,-77,-48,140,-63,17,126,30,"); add("71,-46,100,74,-113,101,46,-90,63,68,-92,97,"); add("80,-71,115,82,-11,122,81,24,124,77,22,118,"); add("83,-36,125,78,45,123,79,29,125,80,20,129,"); add("77,10,124,72,58,119,63,41,105,81,33,135,"); add("38,-108,60,49,-123,78,73,5,124,53,-60,89,"); add("42,-121,70,42,-135,71,20,-165,34,-5,-129,-7,"); add("-5,-218,-5,50,-60,89,37,-137,69,31,-131,61,"); add("-2,-151,4,-6,-157,-1,35,-133,73,10,-147,30,"); add("52,-105,103,11,-115,32,-4,-145,7,-35,-179,-41,"); add("-67,-3,-120,-71,-23,-124,-23,-150,-21,-35,-129,-43,"); add("-10,-165,6,8,-149,38,1,-148,26,17,-139,57,"); add("-25,-158,-14,-61,-75,-93,-72,30,-132,"); add(""); //add("/*11*/"); add("133,1,29737,2888,-2716,"); add("9,-113,-12,8,-138,-52,6,-140,-72,-2,-106,-100,"); add("-2,-111,-113,-5,-99,-114,-5,-101,-110,-4,-106,-109,"); add("-16,-34,-151,-6,-108,-107,-4,-123,-92,-4,-124,-82,"); add("-10,-97,-118,1,-147,-41,-1,-134,-54,-18,-43,-138,"); add("-15,-85,-133,-17,-73,-129,-13,-126,-116,-1,-136,-24,"); add("-5,-142,-55,-5,-144,-46,-5,-143,-50,-6,-154,-42,"); add("-20,-65,-126,-23,-73,-133,-11,-130,-64,-16,-117,-89,"); add("-18,-115,-96,-18,-122,-91,-10,-146,-42,-19,-126,-84,"); add("-15,-136,-61,-19,-130,-78,-8,-149,-12,-19,-137,-69,"); add("-25,-105,-103,-24,-111,-94,-22,-131,-73,-26,-107,-100,"); add("-31,-88,-120,-31,-93,-119,-21,-139,-52,-30,-107,-102,"); add("-33,-90,-116,-33,-98,-110,-35,-84,-122,-34,-94,-108,"); add("-38,-70,-134,-36,-100,-107,-31,-118,-80,-38,-108,-108,"); add("-50,-131,-143,11,129,-8,-21,16,-85,-51,-87,-158,"); add("-12,85,-78,-28,-11,-98,-44,-106,-121,-14,86,-78,"); add("11,150,-16,9,150,-19,11,150,-8,11,150,-5,"); add("19,146,27,-2,156,-48,19,137,34,-6,148,-55,"); add("-10,124,-58,31,104,87,28,122,77,29,133,80,"); add("43,39,151,41,13,150,34,-129,151,1,99,-15,"); add("-14,144,-74,34,85,116,16,106,50,12,151,27,"); add("9,148,24,24,72,85,40,15,160,31,36,124,"); add("31,99,122,-1,135,-10,6,103,22,-5,70,-21,"); add("-27,80,-116,-8,134,-29,24,93,101,33,40,138,"); add("30,-79,128,48,-65,208,-16,34,-70,-32,86,-138,"); add("11,125,52,32,29,145,28,59,129,17,117,89,"); add("8,142,49,21,102,112,25,64,128,25,57,130,"); add("7,141,61,19,104,114,22,-104,94,17,33,97,"); add("19,84,121,14,168,114,17,44,107,0,140,42,"); add("12,110,102,17,81,126,13,95,116,16,79,127,"); add("17,69,139,9,106,103,17,75,150,-6,95,13,"); add("3,124,86,0,119,72,3,113,91,7,106,117,"); add("19,1,150,14,39,141,19,-8,148,18,-11,149,"); add("13,33,146,5,87,123,5,77,128,14,7,148,"); add(""); //add("/*12*/"); add("129,-1,17606,18970,15171,"); add("-13,-69,100,24,-118,119,79,-124,60,75,-119,57,"); add("88,-117,38,105,-103,1,120,-58,-71,115,-15,-117,"); add("107,-39,-82,114,-100,-19,119,-75,-55,119,-64,-69,"); add("111,-41,-90,109,-28,-102,103,-17,-111,72,31,-131,"); add("75,26,-129,69,33,-132,71,28,-131,83,13,-127,"); add("26,2,-40,-103,181,-91,-89,118,-32,-85,121,-42,"); add("-65,119,-69,-79,119,-52,-55,115,-80,-90,101,-15,"); add("-97,78,26,-117,33,112,-71,83,-19,27,21,-65,"); add("43,18,-83,-112,123,-21,-104,-5,146,-111,83,31,"); add("-87,114,-44,-49,113,-96,-21,93,-105,128,-44,-107,"); add("73,-19,-72,88,-33,-72,52,40,-132,35,56,-132,"); add("-61,93,-54,-129,77,65,-119,82,41,-103,112,-27,"); add("-111,101,-2,-98,4,127,-60,-33,129,37,-112,118,"); add("76,-104,52,43,-80,60,-175,159,-1,-94,108,-37,"); add("-68,104,-66,-36,102,-106,-71,91,-44,-136,52,97,"); add("-108,31,93,-127,86,30,-99,45,57,-105,116,-45,"); add("-116,93,3,-111,99,-15,-114,71,31,-118,47,69,"); add("-37,83,-81,105,-3,-124,117,-34,-92,23,30,-75,"); add("-173,114,35,-11,82,-119,-5,84,-127,73,16,-120,"); add("99,0,-126,103,-17,-107,50,18,-95,-136,110,-8,"); add("-28,92,-120,-61,101,-93,-100,104,-49,-77,98,-69,"); add("-117,55,57,-84,-14,134,-69,-10,106,-112,43,68,"); add("-117,32,91,-63,-37,142,-40,-45,124,-33,-54,130,"); add("-51,-57,155,-69,-21,116,16,-82,112,-33,-62,136,"); add("6,-73,108,-68,-55,161,-91,-26,142,-28,-31,78,"); add("65,-125,116,26,-99,118,-5,-63,97,3,-96,136,"); add("113,-74,-14,126,-73,-31,128,-109,16,69,-71,25,"); add("101,-143,90,74,-109,72,117,-96,4,112,-93,3,"); add("122,-91,-11,116,-97,3,118,-79,-27,124,-87,-23,"); add("119,-92,-12,104,-107,22,117,-94,-11,115,-91,-14,"); add("122,-32,-100,119,-63,-59,6,-38,42,-102,-1,123,"); add("-37,-76,143,51,-113,87,48,-116,92,70,-87,27,"); add(""); //add("/*13*/"); add("124,1,19067,-11237,20253,"); add("-33,-122,-37,-29,-151,-59,-10,-135,-68,31,-113,-96,"); add("-3,-132,-75,-21,-117,-50,-58,-142,-31,-39,-139,-48,"); add("-8,-125,-70,25,-112,-96,-3,-132,-82,61,-101,-125,"); add("57,-50,-88,90,-39,-116,62,-82,-117,98,-12,-107,"); add("113,52,-80,114,71,-69,115,51,-85,112,14,-108,"); add("112,48,-86,99,84,-50,84,137,2,78,132,5,"); add("79,128,-2,81,128,-4,66,137,16,73,133,6,"); add("68,135,11,59,138,20,67,136,10,71,133,3,"); add("77,128,-9,71,135,1,69,135,2,65,138,8,"); add("63,138,7,66,137,4,74,132,-11,62,123,-2,"); add("67,148,4,69,134,-8,66,137,-2,71,133,-13,"); add("70,134,-12,64,138,-4,50,138,11,55,142,6,"); add("15,140,50,55,141,4,81,114,-42,53,86,-22,"); add("56,154,5,10,135,49,5,138,55,14,146,47,"); add("79,50,-71,13,-135,-75,51,-82,-97,83,123,-46,"); add("60,141,-11,13,136,44,-18,131,76,3,142,54,"); add("22,147,34,18,146,35,14,147,40,-2,145,57,"); add("-2,136,52,-8,136,58,-47,91,89,-15,145,67,"); add("-63,151,124,-75,-67,64,-95,-104,75,-2,-149,-48,"); add("-41,-140,-2,-54,-146,9,-100,-65,91,-94,-118,63,"); add("-71,56,100,-64,-50,53,-14,-217,-65,-54,-64,35,"); add("-33,-189,-35,-79,-71,59,-81,-136,36,-8,95,45,"); add("-59,-48,45,-115,-224,35,-47,52,72,-109,-77,85,"); add("-93,-85,64,-42,-128,-9,-26,-34,14,-77,54,103,"); add("-96,-1,98,-95,-83,64,-107,-29,96,-115,-54,94,"); add("-101,-38,85,-108,-40,91,-38,-156,-28,-71,-134,14,"); add("-84,-126,28,-80,-121,25,-45,-139,-18,-10,-135,-50,"); add("-26,-143,-40,-12,-139,-52,16,-129,-77,-24,-134,-40,"); add("6,-139,-73,2,-130,-66,-41,-141,-31,-45,-126,-20,"); add("-86,-125,20,-83,-112,23,-94,-127,23,-69,-137,-6,"); add("-101,-89,49,-79,-92,25,-68,-146,-15,"); add(""); //add("/*14*/"); add("122,1,14146,19873,-17463,"); add("104,-90,-18,-83,-22,-92,35,-96,-78,124,-19,79,"); add("34,103,143,90,-59,8,110,-101,-22,114,-79,6,"); add("38,-117,-98,122,-132,-43,-14,-100,-120,73,-117,-66,"); add("97,-107,-32,92,-115,-44,111,-100,-11,100,-112,-31,"); add("95,-109,-32,129,-66,43,117,-85,15,108,-105,-13,"); add("122,-84,22,126,-56,55,128,-50,65,124,-60,52,"); add("109,-21,80,-26,124,104,-148,120,-13,56,19,71,"); add("123,-63,49,59,-112,-61,78,-122,-52,112,-100,3,"); add("123,-89,27,116,-101,10,61,-129,-71,121,-80,37,"); add("112,-15,95,39,56,95,115,1,116,111,-11,102,"); add("120,-40,81,112,-13,103,119,3,127,79,17,103,"); add("127,-51,83,113,-91,28,118,-84,42,118,-83,43,"); add("122,-71,62,115,-81,46,105,-30,89,100,-76,36,"); add("25,-102,-77,-105,-3,-123,-105,13,-106,-64,-64,-135,"); add("-67,52,-22,-93,123,22,-79,-2,-89,-140,23,-128,"); add("-81,13,-73,-106,51,-61,-130,25,-112,-119,61,-63,"); add("-113,41,-75,-90,-25,-115,-91,-16,-107,-52,-37,-88,"); add("133,-120,16,74,-125,-45,2,-108,-101,-17,-89,-99,"); add("-88,-30,-115,-106,89,-20,-124,123,-4,-101,92,-11,"); add("-128,42,-82,-65,56,-8,45,91,128,-73,118,44,"); add("-75,-7,-77,-47,-80,-121,-48,-27,-69,-113,7,-97,"); add("-123,-9,-120,-108,79,-23,-159,95,-51,5,-137,-123,"); add("-122,86,-27,-72,118,46,-148,21,-106,-146,127,-5,"); add("41,-97,-56,72,-134,-63,-73,11,-52,-131,69,-45,"); add("-89,124,40,-123,82,-26,-54,64,16,6,109,107,"); add("-49,118,71,-87,119,44,-104,108,19,-96,105,23,"); add("-69,120,62,-46,118,80,-34,117,89,-106,120,36,"); add("-113,25,-66,-58,35,-10,-57,106,63,-108,106,23,"); add("-116,100,11,-90,116,51,-50,111,78,-30,116,99,"); add("-18,105,98,26,93,122,-20,107,102,-61,115,79,"); add("-36,99,82,"); add(""); //add("/*15*/"); add("125,1,-1369,25599,15582,"); add("-20,-57,92,-68,-54,82,2,-61,99,-37,-16,22,"); add("-100,-31,38,-10,-85,134,26,-58,95,-46,-77,115,"); add("-69,-80,116,34,-51,81,137,48,-60,11,-18,29,"); add("-57,-58,82,-68,-102,148,-8,-72,106,-43,-121,173,"); add("63,41,-53,40,81,-116,76,85,-120,50,-47,75,"); add("20,-62,93,45,-78,120,-71,-85,116,-66,-81,111,"); add("56,-59,90,165,12,-4,137,10,-5,179,39,-45,"); add("-9,-27,39,-83,-86,117,38,-81,116,105,-49,74,"); add("34,-64,90,-22,-82,111,-3,-101,137,-99,-17,17,"); add("-155,-4,-5,-140,-41,46,-127,-85,103,77,-13,24,"); add("88,-67,94,-29,-83,107,-108,-65,76,-141,-42,42,"); add("-111,-69,79,75,-53,75,202,7,6,82,-38,55,"); add("115,-27,42,136,-25,40,204,73,-82,-53,-57,69,"); add("-93,-72,86,-150,-12,6,-157,0,-10,-113,-56,61,"); add("-88,-76,87,-105,-74,82,-96,-71,78,-147,-70,71,"); add("56,-32,44,112,17,-11,108,55,-57,163,21,-12,"); add("143,-28,44,105,50,-54,71,78,-90,165,19,-14,"); add("136,-37,50,150,25,-23,162,43,-49,127,8,-6,"); add("109,-13,17,169,11,-12,154,-12,15,143,34,-43,"); add("126,40,-51,112,90,-113,-210,52,-62,51,85,-108,"); add("113,70,-92,97,61,-79,47,88,-116,0,90,-117,"); add("-95,69,-88,-143,26,-32,-149,-21,30,-109,7,-8,"); add("53,94,-126,-68,83,-110,-171,63,-86,117,-4,5,"); add("-23,73,-99,-29,82,-113,-91,80,-113,-134,48,-69,"); add("-81,47,-67,-50,85,-123,-36,83,-120,-40,84,-123,"); add("-91,65,-98,-114,49,-77,-131,10,-21,-170,-1,-8,"); add("40,14,-19,158,50,-66,-58,48,-74,3,15,-24,"); add("128,39,-52,79,68,-101,63,78,-116,60,76,-117,"); add("10,69,-108,-137,20,-37,-150,3,-12,-151,2,-11,"); add("-198,-25,27,48,56,-86,63,67,-102,116,55,-81,"); add("73,86,-136,-130,13,-29,-172,-18,17,-125,4,-17,"); add(""); //add("/*16*/"); add("107,1,-8155,28629,-3723,"); add("43,22,74,114,43,87,145,42,14,39,-6,-131,"); add("-6,-21,-148,-12,-24,-151,-31,-28,-139,-45,-33,-139,"); add("-123,-45,-76,-72,-40,-127,-132,-55,-107,-93,-12,98,"); add("-74,-20,6,-81,-15,60,-49,9,155,-49,7,153,"); add("-17,-12,-53,-6,-18,-105,12,-19,-152,17,-19,-152,"); add("-76,-38,-93,-155,-41,44,-84,-7,118,-71,-3,126,"); add("-63,2,143,-30,12,149,-75,-6,125,-103,-19,106,"); add("-136,-31,101,-16,-15,-73,31,-7,-125,82,8,-136,"); add("74,5,-129,44,-8,-146,35,-12,-147,24,-16,-149,"); add("-75,-40,-97,-153,-48,19,-124,-37,26,-124,-25,98,"); add("-70,-3,130,-87,-6,156,-108,-36,9,-131,-53,-43,"); add("-145,-48,26,-55,1,138,-46,7,166,-26,8,121,"); add("-37,7,149,-13,15,152,41,34,148,-9,14,143,"); add("35,29,142,108,52,114,-85,-25,61,-85,-21,96,"); add("-99,-27,92,-83,-19,116,-72,-14,140,-20,5,146,"); add("75,42,168,150,55,-9,-25,-22,-156,57,21,0,"); add("115,40,-23,5,9,95,60,32,128,-63,-12,140,"); add("52,26,98,134,46,-35,97,27,-97,155,43,-139,"); add("47,9,-88,125,37,-72,145,44,-49,139,50,50,"); add("140,47,24,142,44,-22,144,45,1,147,45,5,"); add("142,44,11,142,40,-31,131,32,-77,69,7,-136,"); add("-56,-26,-110,-156,-49,-36,-143,-44,-18,-138,-44,-21,"); add("-157,-48,5,-91,-36,-72,53,10,-68,141,45,13,"); add("149,46,9,140,43,3,135,34,-52,119,26,-86,"); add("-104,-33,-24,-118,-38,-32,3,-15,-141,-15,-17,-108,"); add("21,4,-18,108,45,108,134,33,-41,111,19,-114,"); add("-69,-37,-145,-15,-19,-114,"); add(""); //add("/*17*/"); add("87,1,-27734,11163,2489,"); add("19,13,151,8,-8,114,41,66,143,46,87,101,"); add("23,15,150,38,58,119,51,92,110,48,75,125,"); add("23,8,151,18,-5,151,6,-45,174,-52,-82,-123,"); add("-24,-76,54,7,-30,134,17,-24,175,11,-4,84,"); add("6,-40,142,33,17,158,-21,-103,125,-4,-70,140,"); add("15,-33,154,8,-44,138,29,4,148,30,2,146,"); add("-31,-125,96,-43,-133,48,-13,-95,115,-1,-71,127,"); add("28,-12,151,33,-11,167,-25,-118,92,-62,-109,-91,"); add("-74,-129,-116,17,-35,132,34,9,138,41,21,144,"); add("40,10,150,39,11,143,33,-10,147,25,-31,147,"); add("56,28,174,28,1,102,54,47,133,73,59,183,"); add("6,95,-110,5,98,-119,-18,56,-147,-34,13,-147,"); add("-26,37,-156,35,105,-27,-16,51,-142,-12,48,-123,"); add("-27,26,-158,-10,45,-116,2,88,-143,-4,36,-84,"); add("21,121,-126,-13,-44,25,-7,-7,-22,-7,70,-162,"); add("6,72,-113,2,72,-129,-1,62,-134,-11,32,-121,"); add("-30,7,-168,-3,53,-136,23,103,-108,13,79,-121,"); add("-15,27,-150,-4,57,-164,-12,16,-116,-19,16,-168,"); add("-24,-5,-136,-8,24,-127,-17,10,-152,-24,-7,-150,"); add("-40,-51,-137,-30,-23,-156,-24,-20,-131,-39,-54,-141,"); add("-37,-48,-143,-37,-57,-129,-54,-104,-106,-60,-143,-8,"); add("-25,-50,-49,-33,-45,-160,"); add(""); //add("/*18*/"); add("90,1,-15425,23492,10498,"); add("-58,1,-87,-121,-46,-78,-123,-67,-36,-115,-76,-3,"); add("-150,-98,-10,-111,-74,-9,-121,-91,15,-123,-90,8,"); add("-140,-124,52,-108,-53,-58,-57,-91,109,-74,-19,-79,"); add("-202,-127,-49,-95,-37,-76,59,-35,174,-100,-68,-17,"); add("-123,-69,-56,-124,-80,-33,-59,-94,103,93,5,144,"); add("92,25,97,70,-9,131,68,-15,139,65,-15,129,"); add("77,6,109,128,39,115,109,47,69,-18,-33,37,"); add("-91,-67,-3,22,-20,72,98,36,73,82,22,76,"); add("29,-15,71,-129,-75,-42,-126,-83,-24,-120,-48,-86,"); add("-25,-57,73,105,25,106,117,75,26,167,94,60,"); add("55,14,53,138,110,-15,49,4,59,-67,-110,114,"); add("-92,-81,24,-126,-104,16,10,-33,73,137,84,35,"); add("2,-23,44,-76,-97,73,64,-24,128,138,100,5,"); add("95,91,-35,139,135,-62,-112,-42,-70,7,42,-68,"); add("168,143,-38,-94,-29,-72,-151,-107,-5,9,60,-100,"); add("90,96,-57,109,58,39,166,93,46,-59,6,-90,"); add("-109,-28,-94,50,45,-17,31,65,-82,110,82,-11,"); add("122,87,-4,-28,62,-160,-90,-9,-107,-88,-16,-91,"); add("-105,-24,-103,-11,43,-103,-60,20,-130,24,49,-67,"); add("143,89,25,-21,50,-137,-98,-37,-69,-144,-84,-36,"); add("14,29,-42,109,90,-28,142,98,3,114,74,10,"); add("124,88,-10,127,75,23,36,67,-95,60,35,11,"); add("112,50,53,"); add(""); //add("/*19*/"); add("80,1,1236,-19143,-23066,"); add("4,78,-64,-62,100,-85,-134,51,-49,-152,-25,15,"); add("-51,9,-9,-6,134,-109,-98,76,-64,-52,106,-86,"); add("-10,119,-94,-47,131,-104,132,74,-53,141,-39,35,"); add("96,-86,71,153,-52,48,130,28,-16,140,50,-31,"); add("184,72,-44,56,78,-56,49,121,-89,49,124,-90,"); add("106,96,-64,26,-76,59,-28,-145,107,111,52,-31,"); add("185,68,-34,34,89,-64,6,109,-81,60,113,-78,"); add("86,128,-85,-13,95,-70,101,119,-75,101,59,-31,"); add("124,67,-35,156,44,-13,120,51,-21,106,128,-77,"); add("17,-60,44,-97,-101,58,-37,-121,81,-126,-90,50,"); add("-22,-105,73,-98,-107,66,-161,-157,98,46,101,-70,"); add("-19,-20,13,-150,-66,33,-21,-114,83,18,-66,51,"); add("-79,-123,84,-127,-26,8,17,-62,48,-18,-95,71,"); add("-63,-151,111,6,-115,90,33,-74,61,33,-132,109,"); add("18,-117,95,106,-71,68,134,-48,53,68,-90,81,"); add("-95,-89,64,-140,-46,24,-125,-73,48,-147,-47,27,"); add("-111,-103,77,4,-80,69,30,-117,102,69,-104,96,"); add("78,-95,91,-65,-52,40,-140,-75,54,-125,9,-18,"); add("-117,69,-70,-87,88,-83,-64,99,-91,-71,102,-93,"); add("-83,99,-89,-74,93,-83,-53,144,-123,"); add(""); //add("/*20*/"); add("78,1,24076,9507,-15164,"); add("72,-75,68,83,5,136,48,63,117,50,69,127,"); add("79,-2,131,85,-69,98,67,-149,17,60,-142,10,"); add("52,-139,2,27,-144,-44,40,-147,-23,64,-144,24,"); add("35,-135,-20,25,-149,-43,59,-44,76,45,108,140,"); add("61,-134,28,0,-120,-68,28,-143,-33,12,-137,-55,"); add("20,-151,-45,-23,-78,-82,-26,-143,-118,-68,139,-44,"); add("-67,-35,-130,24,-122,-21,90,-111,95,35,-131,-5,"); add("-23,-58,-67,-46,-79,-116,-75,-39,-142,-69,93,-69,"); add("-87,51,-117,-59,-72,-129,-41,-96,-108,-47,-146,-139,"); add("-34,112,-4,-4,168,69,-58,-22,-101,-27,-107,-90,"); add("-54,-93,-123,-9,-131,-71,-31,-83,-82,-93,-54,-162,"); add("-1,-132,-55,-55,5,-80,-40,175,12,68,60,126,"); add("0,101,43,28,143,103,-85,78,-93,13,73,52,"); add("75,54,137,65,-48,78,35,93,96,45,111,120,"); add("71,12,116,83,-91,88,54,-93,43,68,62,137,"); add("8,122,73,-16,158,51,-19,113,25,3,134,74,"); add("-11,130,50,-77,145,-48,-38,135,11,-128,111,-146,"); add("-35,5,-54,-60,122,-28,-72,141,-35,-64,134,-25,"); add("-26,135,36,23,98,92,-11,145,69,-46,146,16,"); add("-67,132,-25,"); add(""); //add("/*21*/"); add("83,1,2308,-19901,-22330,"); add("-8,114,-102,37,64,-52,88,-4,12,15,49,-40,"); add("143,-68,75,129,-20,33,58,130,-108,117,79,-53,"); add("13,52,-44,159,-88,97,48,-95,90,-6,-118,104,"); add("58,-104,101,115,-73,82,56,-86,87,28,-109,103,"); add("-44,-49,39,-48,15,-21,137,-79,94,23,-106,102,"); add("64,-21,31,128,-64,81,82,-62,72,125,-95,113,"); add("111,-64,83,114,-43,62,54,-65,75,180,-33,68,"); add("104,-70,91,75,-72,87,52,-95,106,89,-78,99,"); add("92,-69,91,5,-84,88,28,-42,50,48,-41,54,"); add("4,-88,93,43,-78,93,-69,-50,36,-151,-62,32,"); add("-151,13,-47,-142,-55,28,-128,-40,15,-81,-36,22,"); add("-166,-20,-10,-139,5,-32,-122,48,-75,-90,81,-102,"); add("-75,81,-98,-121,75,-99,-19,93,-100,-36,101,-109,"); add("-26,116,-123,95,51,-36,-142,51,-74,-6,106,-106,"); add("64,76,-66,-8,10,-11,-117,26,-43,-130,40,-58,"); add("-86,73,-83,130,90,-69,113,80,-60,71,52,-39,"); add("-183,-124,91,-130,-69,48,-122,-15,-2,-89,-14,2,"); add("-131,22,-38,101,77,-61,147,37,-17,75,28,-16,"); add("-148,29,-47,47,27,-20,-128,29,-44,-120,64,-75,"); add("-75,86,-89,-59,105,-105,-82,82,-84,-50,84,-81,"); add("-93,114,-114,49,50,-39,"); add(""); //add("/*22*/"); add("75,1,27917,-4121,-10180,"); add("-55,-66,-125,-56,-60,-126,-57,-37,-134,-56,-23,-138,"); add("-57,-18,-139,-57,-16,-138,-52,10,-134,-62,-21,-142,"); add("-61,-38,-134,-55,13,-137,-48,51,-133,-62,-38,-130,"); add("-64,-61,-123,-62,-52,-121,-63,-24,-134,-50,5,-112,"); add("41,208,16,8,151,-34,46,99,69,64,39,130,"); add("58,-28,139,58,-13,139,55,6,125,62,60,126,"); add("35,106,46,37,122,49,42,130,59,62,14,144,"); add("57,36,129,58,46,132,53,31,124,56,17,137,"); add("49,109,92,42,-55,128,5,-142,61,33,-69,114,"); add("52,21,133,54,10,146,53,21,139,49,-6,144,"); add("49,22,134,52,36,139,37,135,61,50,96,115,"); add("46,11,137,45,32,130,49,64,129,44,70,117,"); add("32,-31,117,40,-15,136,44,24,140,45,29,144,"); add("27,-48,110,-1,-141,51,9,-110,80,19,-109,115,"); add("9,-45,53,-52,-16,-181,-41,3,-146,-48,-63,-137,"); add("-36,-68,-93,-17,-140,4,-49,-31,-150,-46,-12,-146,"); add("-49,-24,-145,-48,-52,-130,-49,-60,-128,-51,-35,-140,"); add("-46,9,-142,-41,48,-142,-48,-18,-133,-52,-9,-148,"); add("-52,-31,-132,-42,-26,-108,"); add(""); //add("/*23*/"); add("73,1,11139,23963,-14202,"); add("89,-95,-89,96,-86,-67,88,-87,-74,62,-93,-103,"); add("27,-75,-102,-2,-91,-146,41,-93,-115,103,-92,-64,"); add("82,-97,-84,49,-95,-108,72,-97,-91,71,-97,-90,"); add("86,-97,-78,85,-98,-77,102,-97,-62,46,-94,-100,"); add("21,-93,-116,65,-102,-94,106,-97,-53,82,-103,-79,"); add("46,-100,-102,94,-101,-63,99,-102,-60,50,-103,-98,"); add("-12,-80,-115,-153,136,60,-137,87,12,-101,-27,-114,"); add("-59,-43,-100,5,-82,-103,-106,161,132,58,36,92,"); add("-16,109,132,-15,93,115,18,72,113,-37,101,112,"); add("-80,99,76,-103,98,60,-102,95,58,-98,96,63,"); add("-108,86,43,-123,40,-33,-120,-28,-129,-46,-66,-128,"); add("-22,-79,-126,-11,-17,-32,10,103,152,-23,94,117,"); add("-41,96,110,-32,94,113,-21,90,119,-28,91,115,"); add("-49,95,107,-44,93,110,-39,90,110,-28,92,123,"); add("-42,94,116,-47,86,103,-77,88,84,-61,43,25,"); add("-122,144,145,-50,96,124,-25,80,115,-34,76,105,"); add("-87,97,101,32,59,126,80,-38,-4,18,-93,-149,"); add("66,-71,-71,143,-69,-8,122,-18,64,55,-58,-55,"); add(""); //add("/*24*/"); add("68,1,24092,5088,-17137,"); add("14,-98,-10,-5,-145,-48,33,-140,7,93,-40,121,"); add("96,-9,134,49,-171,25,57,-37,72,72,-13,102,"); add("56,-137,47,123,-90,158,-21,70,-12,-5,154,32,"); add("54,76,103,63,-11,91,88,-70,116,54,-134,47,"); add("83,-56,112,82,-37,119,74,-87,95,36,-142,21,"); add("41,-143,30,42,-141,33,-57,-49,-101,-54,145,-53,"); add("-54,139,-51,-58,116,-63,-56,-80,-107,-75,2,-114,"); add("-74,-50,-126,-60,146,-55,-78,-17,-121,-65,-72,-115,"); add("-30,-130,-74,58,-132,56,28,-144,10,-1,-148,-32,"); add("-21,-132,-58,-60,-86,-105,-70,-71,-115,-78,-52,-121,"); add("-71,72,-88,-25,-40,-43,3,-135,-19,-55,-11,-80,"); add("-62,126,-66,-30,143,-15,18,145,53,41,111,80,"); add("-43,155,-30,-89,144,-92,-48,-107,-90,-25,-135,-62,"); add("-6,-187,-45,-28,47,-29,-26,172,-2,-61,91,-64,"); add("-61,132,-55,-17,146,9,25,128,63,-10,163,25,"); add("4,129,36,30,118,71,-41,143,-19,15,171,66,"); add("51,99,98,43,85,85,56,91,104,"); add(""); //add("/*25*/"); add("68,1,-3077,27485,11624,"); add("-135,-30,35,-65,39,-111,-105,10,-54,-99,-64,121,"); add("-154,-21,2,-120,1,-38,-66,-57,110,-20,0,-4,"); add("-33,53,-136,-80,19,-73,-139,-60,93,-102,32,-111,"); add("-81,-55,100,-91,-36,52,-127,-52,72,-35,8,-32,"); add("-7,58,-140,67,56,-108,-25,45,-117,-63,49,-144,"); add("-114,16,-88,21,-24,67,-45,-62,133,-100,18,-85,"); add("-92,-30,34,-25,-40,85,-48,-17,20,-111,-25,13,"); add("-18,-25,52,131,3,50,151,20,17,116,-18,89,"); add("-92,-52,85,59,-27,87,-70,-19,17,-141,-8,-40,"); add("-184,-28,-14,47,-17,60,159,-3,75,33,-37,97,"); add("90,-9,58,-7,-32,70,-65,-57,100,-173,-51,44,"); add("79,-27,92,165,9,44,126,-28,110,44,-40,104,"); add("116,-19,81,130,-23,95,170,15,27,110,36,-41,"); add("101,29,-31,152,19,8,146,34,-28,138,43,-54,"); add("144,30,-24,160,37,-36,77,51,-91,115,46,-73,"); add("38,28,-52,37,37,-73,19,40,-85,-72,46,-121,"); add("-70,39,-109,-20,60,-144,37,49,-104,"); add(""); //add("/*26*/"); add("58,1,-26874,10130,8671,"); add("-30,19,-117,-23,66,-151,-42,6,-144,-51,-24,-138,"); add("-43,-88,-36,31,-48,163,11,-85,140,-45,-130,7,"); add("-25,-118,58,4,-100,125,-32,-83,-7,-62,-49,-143,"); add("-43,6,-149,-37,19,-145,-34,20,-136,-35,25,-152,"); add("-32,27,-147,-55,-103,-67,2,-78,105,18,-88,166,"); add("54,57,120,44,9,138,34,-28,142,40,-11,145,"); add("50,23,132,51,8,154,28,-48,138,-3,-114,107,"); add("-6,-95,79,34,16,85,63,116,69,64,135,53,"); add("68,67,128,18,-60,109,53,-3,152,69,87,106,"); add("54,3,144,53,-1,142,48,-14,141,27,-65,128,"); add("48,29,96,70,121,68,2,113,-98,-17,86,-124,"); add("-46,19,-139,-52,52,-189,58,60,97,-4,42,-55,"); add("-57,-7,-146,0,99,-97,-7,69,-95,-41,28,-142,"); add("-35,39,-140,-28,57,-142,-55,-27,-132,-47,19,-160,"); add("-67,-83,-107,"); add(""); //add("/*27*/"); add("56,1,12962,21402,-16551,"); add("83,-38,16,93,-94,-47,24,-103,-113,56,-107,-91,"); add("92,-105,-58,75,-108,-76,119,-90,-15,74,-104,-67,"); add("76,-102,-64,114,-19,69,123,34,142,74,-101,-62,"); add("123,-89,-5,138,-68,34,93,-120,-65,-16,-90,-120,"); add("45,-102,-82,78,-121,-75,-106,20,-66,-130,85,-8,"); add("-111,-5,-96,-35,58,38,51,73,126,74,50,120,"); add("-52,98,73,-114,32,-57,-59,-67,-127,-156,66,-47,"); add("-124,18,-77,-72,-56,-123,-64,-63,-122,-78,-53,-119,"); add("-108,-43,-130,-113,119,50,-117,97,24,-127,81,-1,"); add("-135,60,-29,-130,-6,-100,-136,31,-61,-222,90,-51,"); add("53,27,67,-12,111,120,-41,101,89,-122,116,52,"); add("50,-4,30,133,-79,0,125,-16,70,73,54,116,"); add("107,29,113,63,62,122,53,69,124,39,77,125,"); add("17,88,122,19,86,122,28,80,125,"); add(""); //add("/*28*/"); add("49,1,-6596,29135,-2761,"); add("64,5,-105,143,26,-49,-45,-23,-137,-7,-11,-80,"); add("-52,-24,-120,-117,-14,109,-4,-7,-48,12,-16,-167,"); add("-112,-12,117,-20,-17,-107,15,-13,-142,-115,-29,-16,"); add("-102,-10,120,-70,-4,110,64,35,178,-97,-24,-2,"); add("-46,4,143,-51,3,152,-58,-16,-15,11,-11,-139,"); add("-6,-17,-145,-41,-26,-149,-146,-33,37,-68,-3,132,"); add("2,16,151,51,28,150,21,17,128,12,17,157,"); add("-43,0,130,-45,0,144,64,25,116,130,38,77,"); add("128,36,64,141,33,-25,-48,-21,-136,56,7,-87,"); add("145,32,-32,156,37,20,155,37,21,5,-7,-104,"); add("-96,-31,-111,-131,-29,5,-136,-35,-40,-164,-37,32,"); add("-15,-13,-109,72,4,-146,157,33,-47,128,29,-12,"); add(""); //add("/*29*/"); add("50,1,-2179,24668,16933,"); add("-94,-47,56,-114,2,-19,-121,-63,74,-71,-57,72,"); add("55,-51,81,-74,-79,100,-74,-24,23,-140,1,-23,"); add("-215,-15,-16,15,-80,115,25,-50,74,-131,-82,90,"); add("69,-50,81,176,-48,94,-77,-77,92,-116,-97,110,"); add("78,-13,30,150,24,-7,-7,-19,24,-155,-21,3,"); add("-117,-60,58,-114,-68,70,-67,-96,113,136,-15,44,"); add("-56,-41,42,101,-3,22,-24,-38,44,40,-22,35,"); add("140,9,12,156,30,-14,130,61,-59,134,30,-19,"); add("124,54,-53,169,33,-22,148,16,-3,87,67,-77,"); add("60,91,-113,54,87,-110,-12,100,-135,4,79,-107,"); add("-34,87,-123,50,59,-77,130,54,-61,66,69,-90,"); add("-38,83,-120,-40,70,-104,-66,70,-108,-232,-9,-14,"); add("-56,48,-76,"); add(""); //add("/*30*/"); add("50,1,-8496,-28645,2696,"); add("6,7,97,49,0,144,24,8,146,-32,25,135,"); add("-71,36,135,-115,45,86,-123,47,78,-138,48,41,"); add("-135,49,46,-138,49,36,-143,49,26,-145,47,-16,"); add("-142,48,4,-141,51,18,-144,51,5,-134,43,-34,"); add("-154,58,22,-65,9,-110,10,-22,-149,67,-40,-132,"); add("140,-51,-5,133,-47,2,131,-52,-59,147,-52,-17,"); add("62,-38,-146,114,-35,26,94,-18,115,144,-49,-11,"); add("-14,-13,-167,-62,6,-134,96,-33,-22,-1,-9,-91,"); add("43,-21,-74,-3,-8,-95,16,-15,-117,27,-18,-104,"); add("129,-41,-1,104,-23,110,-59,29,117,5,7,92,"); add("-49,28,130,53,-10,69,122,-30,76,62,-26,-69,"); add("82,-16,90,54,-17,-7,-33,-5,-145,-65,6,-150,"); add("110,-37,-35,"); add(""); //add("/*31*/"); add("48,1,-16082,-24523,6323,"); add("62,-6,135,71,-10,133,70,-10,134,98,-29,121,"); add("35,19,149,50,7,135,-18,47,120,-72,37,-32,"); add("-70,7,-129,-108,41,-100,-120,59,-71,-114,52,-85,"); add("-119,59,-75,-119,66,-48,-126,76,-37,-158,98,-42,"); add("-90,76,48,-125,77,-41,-60,16,-96,-79,27,-111,"); add("6,-32,-100,10,-53,-177,66,-69,-86,106,-91,-66,"); add("77,-31,92,56,6,173,62,-71,-105,26,-52,-137,"); add("124,-87,-10,104,-47,95,106,-45,107,63,-54,-47,"); add("-33,17,-21,-78,27,-102,-70,21,-104,-120,44,-157,"); add("127,-72,60,-25,-5,-96,-64,3,-173,-15,-21,-138,"); add("61,-36,23,33,3,116,90,-31,126,78,-22,127,"); add("38,8,137,98,-37,112,48,5,145,"); add(""); //add("/*32*/"); add("48,-1,-13245,26217,-6103,"); add("-33,17,145,9,34,134,88,65,92,-23,16,132,"); add("-12,24,141,56,55,134,71,62,134,67,53,99,"); add("20,37,146,-27,10,130,31,23,44,30,2,-71,"); add("45,45,128,43,-2,-129,7,-27,-165,-8,-15,-61,"); add("47,61,209,-28,10,131,-81,-16,134,-34,-3,80,"); add("147,46,-148,50,-2,-145,-7,-31,-150,-67,-54,-119,"); add("-76,-59,-114,-44,-49,-140,20,-21,-151,57,0,-131,"); add("122,46,-65,113,36,-81,117,32,-108,125,38,-90,"); add("10,-8,-59,-144,-53,65,-133,-61,10,-154,-69,24,"); add("-2,-31,-133,-11,-33,-121,-82,-67,-111,-15,-28,-88,"); add("70,3,-126,39,-12,-127,20,0,-39,-135,-43,95,"); add("-98,-23,100,-103,-25,110,-57,2,125,"); add(""); //add("/*33*/"); add("47,1,-6930,29187,-252,"); add("-51,-13,-133,84,20,-8,117,26,-82,65,13,-132,"); add("-2,-5,-157,-116,-27,-23,-134,-30,78,-112,-25,89,"); add("-11,1,173,-70,-16,98,-136,-33,52,-146,-37,22,"); add("-139,-36,-46,-134,-35,28,-161,-44,34,-27,-6,117,"); add("-79,-21,134,90,24,168,-115,-32,93,2,-2,158,"); add("22,5,108,34,6,130,-10,-5,92,109,26,166,"); add("-73,-24,108,-11,-8,138,67,12,154,164,41,55,"); add("91,26,-33,146,35,46,85,27,-99,66,22,-142,"); add("32,14,-143,-39,-5,-156,-64,-13,-131,-91,-20,-132,"); add("-61,-15,-91,53,16,-144,-4,1,-154,36,9,-107,"); add("132,34,-37,32,8,-118,82,20,-41,55,14,123,"); add("133,32,-108,101,24,-60,"); add(""); //add("/*34*/"); add("48,1,1042,29488,5419,"); add("98,-20,87,52,-28,136,48,-30,145,90,-18,74,"); add("119,-22,80,56,21,-116,10,26,-136,46,1,-20,"); add("77,-17,65,58,4,-37,18,-24,117,-127,-21,144,"); add("-84,-16,96,66,-25,107,145,9,-82,87,-4,-10,"); add("-100,-22,137,57,-12,41,-157,-3,54,75,-34,135,"); add("146,-18,44,54,-16,58,120,-27,82,3,44,-197,"); add("-15,34,-151,32,26,-132,-23,34,-158,6,27,-135,"); add("-22,32,-159,62,22,-133,69,16,-114,-170,29,-92,"); add("-124,18,-61,-124,26,-103,-78,29,-141,-134,10,-20,"); add("-23,-23,141,58,-27,135,68,-27,132,-9,-7,38,"); add("-96,31,-142,-74,27,-129,-76,1,11,-52,-14,94,"); add("-74,27,-137,-106,-7,63,-63,-14,94,"); add(""); //add("/*35*/"); add("44,-1,14587,-2200,26122,"); add("18,-53,-14,-39,-136,9,-28,-156,1,7,-151,-19,"); add("52,-138,-43,34,-136,-35,-65,-137,21,28,-129,-31,"); add("52,-143,-48,40,-135,-40,75,-119,-60,98,-83,-68,"); add("86,-101,-64,19,-146,-33,37,-140,-44,83,-113,-67,"); add("-4,-196,-31,100,-60,-69,118,-90,-87,54,91,-17,"); add("-44,128,50,-47,126,49,-53,138,54,-57,134,55,"); add("-15,150,31,-10,135,26,-63,145,57,-85,114,65,"); add("-118,38,73,-68,131,56,69,122,-25,18,132,6,"); add("-48,139,43,18,150,5,-67,130,52,3,147,12,"); add("-9,143,18,-54,138,43,-47,140,37,-31,192,31,"); add("-63,-85,29,-21,-147,1,-15,-153,-4,"); add(""); //add("/*36*/"); add("44,-1,15944,24781,-5628,"); add("93,-52,33,124,-87,-25,126,-79,19,127,-81,15,"); add("127,-78,31,126,-81,22,126,-81,26,115,-62,80,"); add("121,-74,51,111,-60,83,122,-74,64,118,-78,32,"); add("107,-60,81,101,-54,99,119,-77,53,109,-66,77,"); add("84,-39,121,67,-26,127,73,-22,171,52,-52,-63,"); add("-4,-26,-148,-53,14,-135,-74,29,-129,-81,36,-126,"); add("-113,69,-72,-121,88,-11,-87,45,-87,-77,36,-94,"); add("-102,53,-98,-84,33,-122,-109,58,-87,-116,73,-41,"); add("-107,52,-101,-84,68,40,-92,63,-6,-26,-2,-86,"); add("-130,82,-29,-117,83,11,-119,89,37,-124,82,-1,"); add("-123,85,16,-125,86,20,-122,95,65,"); add(""); //add("/*37*/"); add("44,1,6601,28935,4379,"); add("16,-21,118,74,-36,115,54,-21,53,5,-26,150,"); add("77,-36,110,77,-8,-64,63,-35,120,137,-8,-153,"); add("99,-9,-94,-67,34,-105,-78,32,-79,1,17,-112,"); add("-95,35,-77,-28,26,-131,-93,35,-87,-13,23,-140,"); add("-53,31,-142,-50,24,-95,-39,28,-148,-21,25,-161,"); add("-7,20,-157,6,15,-149,-10,18,-150,-12,18,-148,"); add("-31,21,-151,-53,22,-115,-115,35,-98,-143,30,10,"); add("-62,2,131,40,-23,150,77,-27,112,14,-20,162,"); add("-14,-14,160,-51,-2,116,-35,-8,136,20,-18,110,"); add("-6,-21,176,29,-27,157,59,-32,142,15,-21,127,"); add("45,-28,124,126,-39,69,80,-10,-54,"); add(""); //add("/*38*/"); add("42,-1,-10564,27211,-6925,"); add("-102,-15,98,-92,-3,131,66,56,126,44,48,128,"); add("-57,9,136,-104,-63,-95,-54,-66,-186,-40,2,75,"); add("9,41,155,35,51,160,133,62,44,-1,29,132,"); add("-131,-12,184,91,59,109,63,45,100,124,63,73,"); add("24,-12,-107,-3,-29,-133,85,0,-151,111,20,-101,"); add("62,43,91,5,40,175,101,33,-17,61,-4,-125,"); add("29,-22,-150,4,-30,-141,29,-27,-165,44,-16,-138,"); add("31,-22,-139,26,-52,-249,-70,-3,91,-103,-4,137,"); add("-17,20,107,-68,9,145,-127,-29,83,-63,-37,-57,"); add("112,8,-146,-59,-26,-18,-81,-51,-84,-38,-43,-113,"); add("-39,-46,-124,"); add(""); //add("/*39*/"); add("42,-1,15744,-1075,25514,"); add("6,-136,-9,63,-186,-49,95,83,-55,94,90,-55,"); add("119,-70,-79,97,-30,-63,12,-169,-17,55,17,-35,"); add("-7,158,13,95,44,-59,122,-38,-82,132,139,-81,"); add("-154,62,105,36,92,-19,83,111,-51,82,122,-51,"); add("58,107,-36,70,141,-44,14,129,-6,26,143,-16,"); add("116,32,-79,133,71,-91,-25,92,18,-136,-72,93,"); add("-92,61,63,-65,100,44,-74,99,49,-106,9,71,"); add("-92,63,61,-106,-54,69,-100,-66,66,-117,11,75,"); add("-123,-63,78,-116,-49,73,-53,-98,33,-59,-142,36,"); add("-45,-145,26,35,-135,-25,-5,-167,0,-37,-133,19,"); add("-39,-149,18,"); add(""); //add("/*40*/"); add("41,-1,10098,22921,16512,"); add("73,-48,22,138,-59,-3,139,-57,-9,146,-60,-11,"); add("142,-45,-30,126,-12,-66,134,-54,-16,141,-51,-25,"); add("138,-54,-20,147,-37,-50,94,-98,68,58,-99,93,"); add("28,-94,108,-126,-8,97,-117,-8,91,-8,-77,107,"); add("-15,-95,133,-18,-79,114,-148,-47,156,50,10,-45,"); add("121,26,-112,31,60,-98,25,112,-163,21,49,-78,"); add("108,22,-104,142,-26,-64,12,61,-90,-98,100,-65,"); add("-59,95,-88,-67,119,-116,-45,3,27,-138,24,63,"); add("-147,67,8,-111,47,11,-158,44,44,-137,49,23,"); add("-164,88,-15,-109,6,60,-145,39,38,-141,48,21,"); add(""); //add("/*41*/"); add("41,1,13989,-2192,-26448,"); add("86,-38,49,159,11,84,-19,-147,3,-25,-168,2,"); add("103,-47,60,110,-69,67,65,-124,49,84,-90,56,"); add("118,-11,68,123,-16,72,99,59,50,-6,147,-20,"); add("43,4,25,33,-150,35,103,-59,67,125,-26,76,"); add("126,17,72,128,20,76,129,3,77,96,-39,64,"); add("-67,-118,-28,-129,-48,-73,-115,-87,-58,-94,-19,-54,"); add("-126,-33,-70,-108,-70,-55,-133,3,-77,-126,3,-73,"); add("-125,47,-77,-109,65,-69,-126,46,-76,-104,90,-67,"); add("-74,114,-54,-136,14,-74,-116,80,-71,47,156,9,"); add("-83,70,-51,-84,109,-55,3,156,-13,72,103,29,"); add(""); //add("/*42*/"); add("42,-1,119,4674,29633,"); add("-31,-95,15,-26,-156,24,18,-132,19,-62,-159,23,"); add("-136,104,-15,-64,53,-8,-123,30,-5,-88,126,-20,"); add("-38,71,-11,-139,147,-25,-6,-84,13,-198,-34,1,"); add("59,0,1,140,-44,10,126,-68,12,76,-142,22,"); add("77,-71,11,119,-34,6,90,-119,17,-168,-97,12,"); add("162,-8,2,59,-58,8,85,-120,15,-8,-136,17,"); add("-64,-114,14,-133,-14,1,-143,29,-4,5,-38,4,"); add("141,-66,9,144,-85,10,53,-82,9,12,12,-1,"); add("65,176,-20,5,123,-15,18,141,-17,-3,172,-22,"); add("-15,165,-22,-40,106,-15,22,154,-22,-38,130,-19,"); add("37,142,-22,"); add(""); //add("/*43*/"); add("38,-1,16496,-5129,24527,"); add("30,-143,-51,63,-127,-70,-14,-142,-22,-2,-152,-34,"); add("-16,-147,-24,6,-147,-40,-37,-135,-8,-79,-127,21,"); add("-32,-147,-17,40,-121,-59,23,-149,-56,4,-137,-41,"); add("-17,-147,-30,65,-116,-79,-4,-132,-36,-3,-139,-41,"); add("80,-8,-57,66,36,-35,90,-60,-82,-28,223,88,"); add("-65,92,72,4,149,41,4,148,40,24,146,23,"); add("-14,143,49,31,146,18,82,121,-26,40,144,9,"); add("-26,133,51,-64,103,69,-7,139,38,15,147,24,"); add("-7,146,38,-7,149,37,-52,127,62,-73,108,73,"); add("-84,19,60,"); add(""); //add("/*44*/"); add("38,-1,18721,21147,10116,"); add("-41,87,-107,-98,62,52,-143,106,36,-110,75,41,"); add("-97,105,-49,-39,91,-123,-46,84,-102,-82,96,-61,"); add("-35,-57,189,-109,39,111,-41,-10,94,-11,-64,155,"); add("88,-98,52,-75,4,120,98,-117,73,-45,9,59,"); add("-82,2,132,31,-83,115,63,-100,91,55,-99,103,"); add("60,-102,97,96,-108,48,92,-108,53,108,-100,10,"); add("112,-125,47,61,31,-157,50,-8,-69,81,-13,-111,"); add("107,-67,-56,78,-43,-52,35,42,-143,60,12,-128,"); add("7,52,-114,-103,91,4,-42,103,-130,-71,104,-81,"); add("-14,51,-79,"); add(""); //add("/*45*/"); add("36,1,-7108,28862,-4057,"); add("112,21,-44,141,26,-58,70,-2,-127,59,-8,-140,"); add("41,-15,-162,-132,-43,-72,-146,-39,-28,-93,-43,-120,"); add("-79,-41,-127,-101,-41,-90,-99,-46,-118,-72,-42,-130,"); add("-89,-47,-126,-104,-19,42,-139,-29,46,-140,-32,33,"); add("-141,-45,-27,-129,-30,33,1,29,162,-10,20,126,"); add("-22,20,151,107,46,95,125,53,110,13,24,123,"); add("84,42,122,47,33,137,23,28,147,21,26,147,"); add("19,25,147,47,31,140,148,38,-8,145,33,-34,"); add("143,31,-45,90,7,-118,-2,-20,-139,"); add(""); //add("/*46*/"); add("37,1,-12612,27178,1511,"); add("72,38,-86,51,30,-137,29,20,-140,86,43,-98,"); add("125,58,-54,2,5,-97,-129,-57,-48,-136,-62,-7,"); add("-142,-65,0,-127,-59,-16,-136,-65,-10,-141,-68,27,"); add("-101,-46,-110,-135,-65,-67,-7,-7,122,43,17,161,"); add("-73,-39,70,-138,-70,15,-30,-19,113,92,41,116,"); add("125,59,68,102,44,111,135,64,33,21,3,114,"); add("-78,-46,138,-81,-44,78,-23,-22,149,-10,-16,146,"); add("117,48,114,81,43,-43,56,36,-114,-34,-6,-149,"); add("48,26,-31,141,69,-32,100,54,-100,42,28,-134,"); add(""); //add("/*47*/"); add("37,1,29276,3899,5265,"); add("22,-156,-12,20,-148,-7,25,-149,-40,23,-141,-38,"); add("27,-130,-71,29,-62,-133,23,8,-143,17,59,-142,"); add("16,48,-138,12,78,-134,5,102,-112,-8,137,-61,"); add("-14,147,-29,-24,168,21,-25,121,59,-21,105,46,"); add("-35,154,89,-29,151,46,-24,87,73,-36,155,77,"); add("-27,94,71,-31,125,63,-36,109,111,-35,100,108,"); add("-9,13,37,13,-41,-33,-21,12,111,40,-94,-140,"); add("-21,-21,139,23,-150,12,9,-135,75,20,-154,24,"); add("13,-144,45,8,-106,45,28,-187,-8,12,-81,-7,"); add(""); //add("/*48*/"); add("36,1,23365,142,-18817,"); add("54,94,69,71,84,90,55,106,71,-89,97,-109,"); add("-51,107,-61,5,156,13,85,6,106,83,-108,102,"); add("38,-107,44,63,-122,77,59,53,78,-71,119,-88,"); add("-39,126,-45,12,149,21,2,179,13,60,-35,75,"); add("58,-128,68,26,-140,27,34,-167,38,-33,-127,-46,"); add("-5,-131,-9,-18,-143,-27,-26,-127,-33,5,-151,6,"); add("-42,-120,-55,-55,-125,-68,-98,-123,-122,18,69,21,"); add("51,128,63,35,139,44,20,146,25,-13,161,-16,"); add("-91,11,-115,-90,-33,-115,-90,-48,-113,"); add(""); //add("/*49*/"); add("37,1,12054,-19593,-19257,"); add("58,-35,73,97,-42,105,128,-35,118,76,-28,78,"); add("119,-11,92,139,38,53,138,60,31,139,47,46,"); add("150,29,75,20,-63,80,-55,-105,73,-90,-108,53,"); add("-102,-105,42,-115,-92,20,-144,-146,60,-2,-74,81,"); add("-90,-96,45,-115,-98,31,-136,-92,12,-107,-61,-2,"); add("-121,-47,-28,-125,-31,-47,-44,57,-94,2,89,-98,"); add("-12,104,-125,-58,4,-41,-130,-56,-20,-12,60,-73,"); add("56,106,-82,24,102,-94,-22,103,-124,4,65,-66,"); add("55,112,-84,57,124,-94,51,106,-79,89,97,-43,"); add(""); //add("/*50*/"); add("35,-1,19917,21699,5700,"); add("29,-54,98,74,-89,80,71,-89,81,117,-98,-43,"); add("149,-117,-89,-65,77,-55,-92,102,-55,-66,74,-48,"); add("-63,79,-75,-15,46,-128,-73,99,-122,-7,36,-126,"); add("0,20,-82,55,-15,-153,24,8,-132,59,-21,-154,"); add("38,-6,-140,57,-21,-152,56,-26,-134,24,4,-131,"); add("12,19,-164,-98,108,-91,-24,0,117,13,-42,160,"); add("-47,15,150,-32,3,135,-31,-10,186,-40,10,120,"); add("-62,32,114,-59,24,133,-18,-19,153,-60,19,148,"); add("-14,-23,145,51,-77,121,"); add(""); //add("/*51*/"); add("41,1,-4651,29635,-334,"); add("-52,-9,-74,-147,-23,34,-42,-8,-77,-99,-18,-81,"); add("-123,-20,85,-33,-7,-116,-111,-20,-20,-90,-14,125,"); add("-50,-10,-19,-114,-21,-33,-8,1,154,-26,-4,153,"); add("-56,-10,94,-19,-3,3,-17,-5,-154,-57,-12,-126,"); add("-136,-26,27,-122,-24,97,-135,-27,24,-69,-14,135,"); add("99,21,106,-44,-9,81,29,6,59,132,26,32,"); add("192,38,20,-76,-15,25,68,13,79,90,16,80,"); add("176,33,59,66,14,-123,115,21,-51,121,22,-35,"); add("132,23,-23,-34,-5,-74,72,12,-59,92,16,-81,"); add("130,21,-85,143,23,-50,127,19,-77,-47,-8,-78,"); add(""); //add("/*52*/"); add("36,-1,-17857,23953,-2714,"); add("-69,-60,-74,-114,-77,71,-109,-75,72,-111,-79,56,"); add("-48,-29,82,11,18,91,-92,-64,75,-104,-78,30,"); add("-34,-17,108,-110,-89,-23,-114,-97,-55,-121,-99,-25,"); add("-87,-64,75,84,79,111,148,122,32,97,77,3,"); add("108,81,-59,113,84,-44,119,88,-48,109,83,-14,"); add("127,93,-33,122,88,-40,115,85,-19,118,82,-46,"); add("120,84,-39,117,82,-19,111,82,21,20,10,-41,"); add("-121,-93,-68,-89,-63,17,41,6,-221,-119,-96,-77,"); add("-111,-88,-54,-84,-51,93,-21,-2,111,"); add(""); //add("/*53*/"); add("35,1,18868,16148,-16830,"); add("-118,111,-25,-43,93,43,11,86,96,13,65,80,"); add("-48,105,49,114,-9,121,18,89,111,17,51,71,"); add("110,-37,91,106,-88,33,119,-56,84,104,-67,55,"); add("59,-94,-25,14,-90,-75,31,-109,-72,-118,47,-94,"); add("-89,136,32,1,-144,-144,42,-99,-48,106,-129,-3,"); add("109,-104,29,50,-132,-68,70,-135,-46,-4,-81,-81,"); add("-71,16,-68,-57,139,63,-46,8,-45,42,-135,-77,"); add("28,-89,-51,-151,124,-59,-109,73,-57,-77,126,31,"); add("-77,126,31,-79,109,15,"); add(""); //add("/*54*/"); add("34,-1,-21907,20246,3192,"); add("-62,-57,-63,-62,-48,-135,-75,-66,-110,-9,14,-170,"); add("89,99,-5,37,16,170,72,80,-15,8,22,-95,"); add("-99,-99,-67,-102,-102,-62,-104,-108,-58,-69,-101,179,"); add("-23,-35,65,4,-14,128,45,28,147,34,15,146,"); add("79,69,114,66,51,126,59,41,134,78,57,154,"); add("53,39,99,73,56,121,83,67,108,86,73,96,"); add("96,95,30,-4,7,-52,-61,-36,-142,-38,-12,-144,"); add("-92,-70,-152,-38,-33,-48,-3,24,-148,-11,13,-148,"); add("-54,-35,-133,"); add(""); //add("/*55*/"); add("35,-1,16309,24931,-3533,"); add("24,-3,89,102,-57,80,68,-50,-39,119,-92,-89,"); add("3,-15,-89,113,-84,-51,-16,8,-19,-118,83,21,"); add("-65,59,106,-107,77,39,-82,40,-99,-36,5,-122,"); add("95,-76,-91,106,-81,-69,108,-83,-62,121,-82,-3,"); add("117,-79,4,120,-91,-49,114,-76,25,143,-110,-53,"); add("45,-39,-40,151,-125,-101,-105,68,-46,-62,57,77,"); add("-92,82,95,-114,79,-6,-96,70,18,-103,81,65,"); add("-121,83,-3,-122,84,8,-113,84,57,-102,78,64,"); add("-130,97,79,-13,30,141,"); add(""); //add("/*56*/"); add("34,1,-15019,23246,-11578,"); add("109,18,-104,-8,-59,-108,-129,-62,43,-61,-2,74,"); add("-119,-114,-69,-118,-32,90,-114,-45,62,-120,-54,54,"); add("-76,-47,10,-63,-67,-48,-110,-26,101,-106,-69,10,"); add("-122,-55,61,-65,16,124,-4,20,46,-69,-112,-125,"); add("-155,-65,94,-104,-37,77,-117,-37,99,-52,21,122,"); add("94,83,26,134,97,-1,115,80,-6,112,50,-61,"); add("129,45,-96,120,79,-9,126,83,-9,123,85,1,"); add("117,61,-36,110,26,-100,108,20,-106,110,25,-95,"); add("117,39,-76,"); add(""); //add("/*57*/"); add("31,1,24179,-4896,-17070,"); add("-65,75,-114,-78,42,-120,-77,49,-120,-76,50,-118,"); add("-72,60,-113,-75,58,-116,-73,68,-113,-20,115,-55,"); add("105,9,137,84,-42,122,87,-6,119,85,-18,122,"); add("87,-9,122,82,-28,122,76,-55,122,38,-121,87,"); add("63,-80,112,67,-61,115,75,-44,123,64,-73,116,"); add("48,-105,102,6,-142,53,-20,-122,10,-9,-116,25,"); add("-88,19,-138,-65,66,-119,-79,37,-127,-50,101,-104,"); add("-46,108,-98,-25,98,-65,"); add(""); //add("/*58*/"); add("32,-1,13075,24485,11382,"); add("-40,52,-67,14,58,-144,17,52,-134,58,32,-141,"); add("64,23,-131,84,3,-110,29,56,-168,-70,28,21,"); add("28,-54,92,-76,-21,143,-85,-7,120,-75,-15,123,"); add("-112,2,128,48,-60,76,21,-74,139,51,-82,117,"); add("6,-62,126,108,-94,76,136,-62,-25,95,-80,56,"); add("132,-88,31,-6,-35,77,19,-10,-1,87,45,-194,"); add("-90,24,57,-82,74,-60,-55,107,-160,-47,-20,96,"); add("-93,19,67,-130,74,-7,6,68,-152,"); add(""); //add("/*59*/"); add("29,1,-3768,-29624,2870,"); add("45,4,94,51,8,142,59,8,138,57,8,140,"); add("32,14,147,-48,21,129,-31,19,118,-91,29,135,"); add("-153,28,63,-79,26,117,-175,25,11,-15,23,147,"); add("-106,32,113,-149,24,16,-144,16,-43,-99,-1,-109,"); add("-16,-19,-150,25,-24,-149,63,-27,-134,90,-29,-121,"); add("104,-29,-106,115,-28,-96,77,-26,-128,55,-24,-143,"); add("18,-17,-146,25,-18,-143,94,-24,-118,135,-18,2,"); add(""); //add("/*60*/"); add("30,1,-8205,28819,-1455,"); add("-49,-18,-95,-107,-35,-74,-126,-34,63,-131,-39,-8,"); add("-112,-37,-59,28,1,-121,135,35,-82,-84,-32,-116,"); add("-139,-40,39,-129,-35,72,-87,-21,110,-125,-35,71,"); add("-130,-38,69,-142,-45,39,-90,-25,91,165,60,100,"); add("-39,-7,122,87,34,140,111,37,34,135,43,22,"); add("151,48,-12,99,28,-61,93,23,-132,107,34,45,"); add("114,37,99,118,37,66,92,23,-93,-35,-17,-168,"); add("71,16,-104,"); add(""); //add("/*61*/"); add("29,1,7341,28492,5857,"); add("97,-32,32,101,-8,-91,129,-14,-97,162,-48,17,"); add("98,-50,115,136,-21,-86,121,-12,-115,86,-3,-109,"); add("72,-2,-102,-8,21,-96,-159,39,35,-146,40,12,"); add("-144,44,-24,-140,46,-37,-124,42,-50,-140,56,-98,"); add("-76,35,-88,-83,41,-114,-72,38,-113,-150,34,21,"); add("-99,7,103,-38,-17,146,65,-39,131,10,-25,118,"); add("113,-37,53,95,-48,123,24,-30,120,10,-30,139,"); add(""); //add("/*62*/"); add("29,-1,13904,22523,14121,"); add("-19,93,-130,-23,88,-121,-50,95,-107,-21,87,-123,"); add("-56,98,-110,21,65,-132,94,11,-117,-1,23,-38,"); add("-119,33,67,-106,103,-71,-21,80,-120,-112,91,-46,"); add("-36,86,-118,14,66,-135,29,34,-93,-62,-54,165,"); add("2,-75,134,67,-88,88,98,-84,48,7,-77,128,"); add("102,-95,60,3,-81,136,40,-91,114,25,-96,136,"); add("43,-85,97,37,-90,110,16,-85,122,27,-77,97,"); add(""); //add("/*63*/"); add("28,1,25599,5928,-14475,"); add("33,-94,20,47,-160,19,25,-90,9,54,-136,45,"); add("62,-80,82,68,-111,82,64,-115,73,67,-111,84,"); add("64,-114,80,67,-92,92,70,-85,104,66,-104,89,"); add("83,-190,98,-58,18,-106,-67,77,-103,-69,92,-101,"); add("-62,118,-76,-74,76,-112,-63,115,-76,-50,130,-45,"); add("-49,115,-48,-82,54,-127,-63,120,-70,-85,80,-120,"); add("-20,137,18,-2,140,50,-28,146,8,"); add(""); //add("/*64*/"); add("32,-1,6784,26265,12812,"); add("67,-5,-26,37,57,-138,-28,66,-122,80,12,-69,"); add("61,44,-129,-45,71,-128,-100,88,-136,-27,-50,125,"); add("-98,-3,60,-133,7,57,-138,81,-102,150,-27,-21,"); add("-68,39,-49,-93,73,-111,-118,16,28,-118,39,-26,"); add("-94,67,-101,3,-10,21,80,-70,114,132,-63,72,"); add("51,-75,137,30,-24,37,111,-40,28,127,-51,42,"); add("128,-39,13,-13,-32,75,-26,-49,117,-67,10,14,"); add("-87,2,44,-6,-49,104,157,-56,33,"); add(""); //add("/*65*/"); add("26,1,23238,12726,-14073,"); add("76,-64,69,88,-121,37,88,-105,55,84,-121,34,"); add("85,-121,37,85,-123,38,63,-143,-15,66,-149,-15,"); add("20,-115,-62,24,-144,-78,-22,-86,-109,2,-174,-136,"); add("-72,113,-31,-71,134,-10,-86,111,-53,-84,118,-43,"); add("-72,126,-15,-71,138,0,-69,136,2,-69,134,1,"); add("-84,129,-26,-57,123,16,-79,157,9,20,93,117,"); add("66,-5,101,"); add(""); //add("/*66*/"); add("30,-1,-15626,24491,7484,"); add("-83,-67,46,-114,-88,46,-68,-5,-126,97,105,-140,"); add("-44,-32,12,-109,-104,110,-71,-25,-74,17,58,-157,"); add("56,86,-168,55,54,-62,99,90,-93,-46,-30,1,"); add("-111,-81,30,-107,-95,90,51,32,2,18,-7,67,"); add("-44,-71,143,-29,-57,126,-127,-117,107,61,42,-4,"); add("84,48,25,129,58,89,23,-29,138,54,-12,150,"); add("97,37,80,1,22,-66,-33,14,-112,39,65,-125,"); add("78,80,-95,"); add(""); //add("/*67*/"); add("28,1,5003,28957,-6038,"); add("-142,13,-55,-88,-5,-93,-122,12,-36,6,39,188,"); add("-80,41,141,-68,3,-37,111,-44,-128,-14,-26,-135,"); add("-116,1,-81,-120,35,77,-93,33,90,63,26,174,"); add("99,6,101,23,27,152,62,-3,38,127,-37,-87,"); add("58,-6,16,1,28,142,27,27,171,115,-13,30,"); add("134,-33,-55,109,-32,-70,98,-34,-89,43,-40,-165,"); add("3,-30,-143,-109,2,-89,-95,20,19,"); add(""); //add("/*68*/"); add("26,1,7323,-10567,-27106,"); add("121,94,-3,142,73,11,122,50,15,31,-23,18,"); add("-79,-118,23,-100,-126,21,-116,-102,8,-99,-88,8,"); add("-118,-114,14,-116,-87,5,-129,-67,-7,-133,-64,-7,"); add("-148,-82,-3,-104,-89,11,-126,-59,-5,-162,-43,-21,"); add("-51,84,-47,121,97,-12,115,83,-7,115,86,-8,"); add("145,83,2,105,59,3,128,90,-4,105,115,-18,"); add("106,86,-6,"); add(""); //add("/*69*/"); add("26,-1,-20783,20998,5211,"); add("-67,-40,-109,-67,-36,-125,-76,-30,-203,-20,-37,79,"); add("-61,-46,-71,-3,31,-149,-35,-6,-136,-49,-20,-142,"); add("-48,-19,-142,-60,-36,-128,-82,-63,-113,-105,-93,-75,"); add("-44,-64,90,45,20,138,58,32,135,44,16,144,"); add("25,-6,149,1,-33,149,37,2,157,44,16,125,"); add("87,62,112,80,63,76,114,121,-22,74,80,-27,"); add("100,72,109,"); add(""); //add("/*70*/"); add("27,1,-22450,-137,19899,"); add("-70,14,-79,-99,23,-113,-98,19,-113,-86,-40,-100,"); add("-104,11,-123,-96,32,-113,-97,9,-116,-84,-60,-104,"); add("-22,-179,-28,-32,-108,-41,50,-137,58,-19,-49,-25,"); add("-30,-140,-42,56,-135,63,66,-76,77,47,77,60,"); add("23,0,27,79,-32,94,92,11,109,82,77,100,"); add("97,22,114,89,69,105,33,101,41,70,117,83,"); add("32,144,39,35,156,42,"); add(""); //add("/*71*/"); add("25,1,23559,-1507,-18512,"); add("27,-75,40,43,-174,71,-57,80,-80,-63,-34,-78,"); add("-88,-88,-102,-96,83,-128,-85,-47,-100,-97,-34,-115,"); add("-66,45,-84,-109,-20,-130,-84,-84,-92,-92,-58,-103,"); add("-106,-83,-115,-37,97,-53,50,123,46,60,131,59,"); add("87,78,95,102,9,121,87,54,99,99,35,117,"); add("97,-53,123,84,32,102,97,-3,120,94,-4,119,"); add(""); //add("/*72*/"); add("25,1,25640,-4315,-14965,"); add("31,-45,66,54,-65,113,-15,-155,20,-76,-10,-128,"); add("-74,-2,-127,-82,-20,-132,-78,-42,-117,-79,26,-139,"); add("-74,13,-124,-72,1,-117,-70,50,-127,-81,13,-132,"); add("-77,64,-138,-16,182,-75,15,-33,33,65,-78,123,"); add("50,-80,100,83,61,115,72,4,114,69,-29,120,"); add("79,35,120,80,57,116,85,40,131,72,15,117,"); add(""); //add("/*73*/"); add("25,1,6329,18585,22684,"); add("-107,-21,47,-119,-30,56,-133,-23,54,-136,-32,61,"); add("-142,-5,39,-143,15,24,-151,47,-3,-153,-26,57,"); add("-110,-33,51,-5,-114,92,127,-70,27,147,-37,-4,"); add("135,-68,21,136,-61,15,141,-32,-11,132,-59,13,"); add("114,-83,35,151,-27,-19,56,56,-58,26,118,-100,"); add("-68,102,-61,-5,117,-92,38,106,-95,58,104,-101,"); add(""); //add("/*74*/"); add("26,-1,7748,26705,11261,"); add("129,-68,72,75,-7,-35,137,-55,31,-13,-50,125,"); add("-161,55,-14,49,-48,77,-43,-4,39,-135,66,-60,"); add("2,-12,25,126,-63,59,99,-70,91,122,-60,54,"); add("141,-38,-16,147,-75,66,-108,0,77,30,-27,38,"); add("172,-30,-57,50,41,-128,-18,56,-112,-120,65,-62,"); add("-126,68,-62,-106,65,-74,-69,75,-127,-124,50,-29,"); add("-152,41,9,"); add(""); //add("/*75*/"); add("24,1,14610,-1401,-26164,"); add("-43,-57,-21,-121,-61,-64,-114,-84,-57,-111,-85,-55,"); add("-108,-95,-52,-127,-52,-64,-100,-97,-45,-86,-118,-37,"); add("-64,-137,-22,-14,-151,6,-73,-146,-24,-89,52,-51,"); add("-27,143,-26,41,133,10,95,100,40,117,78,55,"); add("94,100,41,108,104,50,105,90,50,116,72,58,"); add("117,80,58,121,59,63,112,86,57,"); add(""); //add("/*76*/"); add("25,1,26396,-4371,-13570,"); add("27,-28,63,47,-88,120,-11,-160,33,-56,-86,-80,"); add("-64,15,-130,-65,22,-135,-62,42,-131,-63,33,-130,"); add("-48,80,-115,-27,-30,-40,-87,-20,-155,-63,65,-133,"); add("31,142,11,67,-4,122,35,47,51,74,2,136,"); add("69,92,100,70,-21,139,-48,-125,-52,-73,-63,-118,"); add("3,-64,27,69,-13,135,70,102,98,63,32,111,"); add(""); //add("/*77*/"); add("23,1,26582,10216,-9436,"); add("30,-17,65,49,-62,75,75,-102,105,70,-87,108,"); add("50,-116,22,46,-147,-22,35,-144,-49,-19,-79,-135,"); add("-30,-43,-131,-46,-32,-162,-77,83,-132,-44,43,-79,"); add("-77,97,-116,-52,90,-53,-60,147,-15,-92,167,-77,"); add("-58,74,-78,-40,143,40,36,48,144,48,-10,118,"); add("63,-23,148,48,1,132,"); add(""); //add("/*78*/"); add("23,1,-8254,28832,-761,"); add("-97,-27,32,-31,-10,-50,-97,-30,-58,-158,-48,-10,"); add("-145,-44,-22,-132,-40,25,-139,-43,23,-146,-46,14,"); add("-16,-2,144,146,49,85,167,51,-32,34,13,112,"); add("-19,-4,154,118,38,92,128,39,47,135,41,74,"); add("140,41,77,82,23,-61,17,4,-155,43,11,-104,"); add("41,10,-148,-16,-8,-141,"); add(""); //add("/*79*/"); add("24,-1,14884,12125,23053,"); add("-8,-117,67,30,-56,9,26,-101,36,-42,-130,92,"); add("-29,-120,79,-101,-11,69,-108,-19,77,-76,-80,87,"); add("-61,-124,97,-48,-109,82,-33,-127,80,-2,-59,28,"); add("57,166,-112,62,118,-94,74,73,-82,52,104,-83,"); add("117,0,-73,92,82,-99,54,95,-82,72,29,-62,"); add("-24,146,-59,-33,131,-46,-56,133,-33,"); add(""); //add("/*80*/"); add("24,1,-6839,29182,-1275,"); add("-120,-28,3,-163,-38,26,40,6,-75,150,32,-101,"); add("-80,-22,-42,-160,-38,24,-18,-7,-50,-43,-16,-102,"); add("-84,-21,-8,-1,8,163,1,10,202,-56,-17,-58,"); add("-100,-29,-83,-143,-37,2,-35,-4,135,14,11,157,"); add("134,36,49,74,22,69,135,33,-19,158,41,35,"); add("152,36,-3,91,18,-110,41,5,-116,"); add(""); //add("/*81*/"); add("22,1,3600,19765,22280,"); add("-77,-59,64,-106,-70,78,-159,-8,31,-4,-102,89,"); add("93,-99,72,21,-114,94,35,-110,88,-12,-117,100,"); add("13,-132,107,38,-71,53,123,-42,16,95,103,-100,"); add("127,4,-24,82,36,-43,7,116,-98,-1,119,-100,"); add("-19,110,-91,7,106,-91,-6,104,-89,-74,113,-87,"); add("-86,90,-65,"); add(""); //add("/*82*/"); add("22,1,17666,16854,-17432,"); add("58,31,90,67,45,112,127,-40,93,77,-78,4,"); add("118,-56,71,88,35,127,118,-100,28,110,-93,28,"); add("132,-78,69,-25,0,-27,-25,-67,-93,41,-117,-70,"); add("-50,-92,-141,-97,70,-37,-107,106,-14,-97,92,-15,"); add("-122,47,-83,-86,-65,-151,-117,93,-33,-118,80,-43,"); add("-51,74,19,"); add(""); //add("/*83*/"); add("23,-1,5861,26752,12246,"); add("82,-33,32,44,-67,125,76,-64,100,4,-66,137,"); add("-2,-60,126,26,-61,114,56,-72,119,85,-65,91,"); add("113,19,-91,-80,25,-13,-77,59,-82,-48,72,-125,"); add("-16,64,-126,27,80,-182,83,25,-95,1,56,-122,"); add("-73,49,-71,-16,-45,108,-29,-53,127,-52,-5,37,"); add("-15,55,-111,-63,57,-93,"); add(""); //add("/*84*/"); add("21,-1,-14603,25601,-5597,"); add("-10,25,142,72,67,124,9,35,145,-23,16,145,"); add("-38,6,147,-17,20,157,8,28,124,-63,-10,152,"); add("-54,-3,159,20,6,-30,59,11,-131,70,16,-134,"); add("72,16,-137,31,-8,-139,65,22,-75,81,21,-120,"); add("-49,-52,-125,-49,-56,-141,-43,-51,-128,-51,-59,-142,"); add(""); //add("/*85*/"); add("22,1,-5757,29270,-3178,"); add("-36,-18,-100,-68,-28,-130,-59,-28,-136,-54,-28,-139,"); add("-12,-22,-151,-104,-29,-57,-107,-3,153,-77,-12,39,"); add("-63,-5,65,100,36,117,69,31,137,90,32,119,"); add("-54,-10,14,-143,-35,-43,22,18,118,56,27,139,"); add("125,32,58,110,32,92,119,26,24,9,-8,-107,"); add("35,-5,-114,"); add(""); //add("/*86*/"); add("21,-1,20081,22197,2006,"); add("-52,51,-44,-84,68,86,-104,80,129,-69,58,28,"); add("-120,102,37,-73,72,-95,-48,58,-182,-84,68,55,"); add("-110,87,70,-18,8,85,64,-52,-33,78,-55,-118,"); add("78,-70,26,34,-43,145,91,-86,70,115,-101,0,"); add("61,-64,105,67,-57,-30,57,-37,-136,75,-56,-119,"); add(""); //add("/*87*/"); add("20,1,-17819,21913,10114,"); add("-28,11,-73,-142,-94,-50,-103,-82,-6,-124,-90,-31,"); add("-113,-92,-6,-78,-105,82,23,-33,112,76,6,124,"); add("103,33,114,116,67,63,95,87,-16,-56,30,-159,"); add("-112,-81,-27,-102,-84,-3,-35,13,-90,78,74,-17,"); add("142,85,72,90,79,-10,109,95,-13,"); add(""); //add("/*88*/"); add("20,-1,7617,6776,28215,"); add("-100,37,17,-132,61,21,-141,-23,42,-89,78,3,"); add("-96,12,21,-102,53,13,7,147,-39,-119,93,6,"); add("-141,-63,49,40,-153,29,77,-127,13,116,-87,-7,"); add("54,-69,3,16,-124,25,121,-114,-4,95,65,-38,"); add("115,89,-51,119,41,-40,150,29,-48,"); add(""); //add("/*89*/"); add("19,1,10847,17337,21949,"); add("-55,-34,54,-136,-1,68,-125,41,27,-145,19,54,"); add("-134,22,45,-141,-18,79,-130,62,9,-164,26,53,"); add("-47,-61,68,70,-81,33,147,-15,-54,141,-18,-50,"); add("144,-61,-18,126,-37,-30,129,17,-74,133,12,-73,"); add("135,5,-69,64,69,-85,"); add(""); //add("/*90*/"); add("20,1,2092,29573,4591,"); add("-46,-9,79,-90,13,-48,2,-21,135,-89,7,-11,"); add("-133,16,-49,-43,-2,32,-29,-14,96,-26,-16,102,"); add("78,-24,118,217,0,-82,-44,-15,105,58,-18,82,"); add("160,-5,-33,149,-15,25,91,14,-122,30,20,-136,"); add("19,23,-151,-57,26,-134,-157,12,-2,"); add(""); //add("/*91*/"); add("20,-1,-20217,21829,-3845,"); add("-71,-59,41,-110,-106,-18,-100,-95,2,-110,-103,7,"); add("-95,-95,-14,-36,-35,-3,-92,-87,16,-71,-87,-94,"); add("0,-28,-153,-18,-16,10,-98,-75,125,44,47,13,"); add("84,99,88,78,86,54,114,110,-6,97,96,15,"); add("98,90,-25,111,102,-14,116,111,14,"); add(""); //add("/*92*/"); add("18,1,24559,5678,-16267,"); add("45,23,76,82,-17,120,53,-117,40,48,-136,28,"); add("29,-161,-10,79,-73,100,62,-105,63,-13,-129,-61,"); add("-56,-87,-115,-34,-125,-90,-73,6,-110,-35,134,-13,"); add("15,127,61,-34,158,-2,-54,138,-37,-51,138,-32,"); add("-55,139,-37,"); add(""); //add("/*93*/"); add("20,-1,7773,28919,-1814,"); add("-89,16,-118,-83,13,-134,-41,10,2,-8,13,153,"); add("162,-37,87,52,-6,135,18,3,148,-94,31,106,"); add("-54,17,47,200,-56,-53,108,-26,75,31,-8,11,"); add("11,-11,-150,130,-40,-79,27,-11,-54,-161,49,66,"); add("-70,20,5,1,-8,-121,-91,22,-50,"); add(""); //add("/*94*/"); add("19,1,28847,-786,-8199,"); add("14,-81,55,17,10,63,33,-16,120,21,-153,93,"); add("-27,-81,-85,-41,-5,-147,-26,-117,-78,-18,-132,-42,"); add("-24,-120,-62,-43,-55,-138,-40,-73,-123,-13,54,-52,"); add("-1,171,-32,26,67,75,42,57,133,23,143,60,"); add("13,150,26,24,136,69,"); add(""); //add("/*95*/"); add("19,-1,-13526,25075,-9397,"); add("-104,-57,0,-169,-104,-31,-81,-44,5,-119,-56,27,"); add("-136,-62,41,-155,-91,-5,21,21,24,125,71,-5,"); add("135,72,-11,34,50,83,-79,4,130,-78,13,159,"); add("39,17,-17,54,-22,-142,66,-7,-119,128,39,-89,"); add("119,53,-33,130,72,1,"); add(""); //add("/*96*/"); add("20,1,-8960,-28564,-1947,"); add("-4,-7,116,-2,-8,149,17,-15,170,40,-19,128,"); add("-19,-1,158,3,-7,144,-60,14,121,-106,34,-11,"); add("-17,9,-106,-78,25,14,-77,27,-65,101,-30,-68,"); add("12,1,-102,-83,31,-101,76,-21,-60,44,-10,-76,"); add("-10,10,-123,16,4,-148,77,-15,-153,"); add(""); //add("/*97*/"); add("17,-1,17593,2406,24180,"); add("-46,-122,46,-2,-152,15,-14,-147,23,32,-145,-12,"); add("61,-134,-35,60,-128,-35,91,-110,-59,82,-162,-52,"); add("51,105,-43,-51,108,31,-94,101,62,-58,133,34,"); add("-12,155,-3,-12,148,-4,-3,151,-11,-17,154,-2,"); add(""); //add("/*98*/"); add("17,-1,7274,26419,12212,"); add("-30,-53,132,-26,-63,149,90,-55,61,121,-62,59,"); add("112,-69,77,111,-66,68,136,-77,76,45,47,-124,"); add("109,9,-86,69,26,-97,-23,64,-119,-68,73,-111,"); add("-118,65,-65,-148,50,-12,-139,44,-10,-135,48,-21,"); add(""); //add("/*99*/"); add("18,1,-5378,29484,-1323,"); add("7,-3,-94,-75,-18,-97,-134,-22,66,-123,-21,55,"); add("-78,-18,-54,-45,-14,-99,-88,-13,91,-23,2,131,"); add("-90,-13,129,-141,-28,38,-61,-8,119,130,29,54,"); add("147,29,-35,140,28,5,121,21,-86,99,14,-122,"); add("143,25,-49,"); add(""); //add("/*100*/"); add("18,-1,13477,22776,14129,"); add("109,-76,17,41,-79,87,-6,-77,128,-25,-78,145,"); add("21,-91,121,32,-82,95,-81,-30,118,-6,-70,111,"); add("92,-30,-39,85,48,-150,1,51,-78,-51,92,-93,"); add("-5,96,-142,-21,78,-104,-25,85,-108,-32,83,-102,"); add("-120,75,-7,"); add(""); //add("/*101*/"); add("17,1,13832,17499,20061,"); add("-49,-24,54,-87,-54,108,-99,-46,105,-113,-24,96,"); add("-145,5,90,-63,-73,103,-121,-41,111,20,-94,65,"); add("118,-79,-9,138,-22,-72,110,42,-106,81,58,-102,"); add("102,48,-108,-30,92,-58,35,96,-105,73,73,-114,"); add(""); //add("/*102*/"); add("17,1,24192,6529,-16496,"); add("5,-81,-25,-12,-132,-68,-58,-89,-117,-44,-93,-99,"); add("9,-107,-24,11,-90,-17,-48,-108,-106,-117,-38,-177,"); add("-17,120,16,4,156,60,-22,140,20,-18,140,26,"); add("28,112,82,69,65,123,82,-21,109,87,10,130,"); add(""); //add("/*103*/"); add("16,-1,13005,-9227,25411,"); add("89,107,-7,117,91,-28,96,129,-5,124,84,-36,"); add("90,79,-20,135,59,-53,192,71,-80,-94,74,77,"); add("-136,-44,59,-116,-94,30,-130,-64,47,-93,-97,15,"); add("-108,-131,10,-73,-112,-2,-93,-119,5,"); add(""); //add("/*104*/"); add("17,-1,12753,25778,8535,"); add("52,-64,114,99,-58,27,-5,-49,150,9,-5,1,"); add("88,-14,-90,143,-79,19,196,-98,-11,-76,66,-78,"); add("-85,33,34,-159,84,-9,-83,82,-118,-127,73,-28,"); add("-31,59,-134,-108,74,-64,-53,33,-23,131,-100,112,"); add(""); //add("/*105*/"); add("17,-1,-16206,24956,-3814,"); add("36,36,80,46,51,147,74,60,88,97,75,103,"); add("123,82,32,170,122,119,112,64,-32,-8,-16,-86,"); add("-85,-70,-130,-116,-86,-105,-110,-66,20,-171,-113,-32,"); add("-59,-52,-95,72,44,-17,-35,-27,-34,-79,-59,-52,"); add(""); //add("/*106*/"); add("16,1,-27904,9377,5782,"); add("14,-34,121,-8,-99,117,14,-47,134,25,-36,169,"); add("56,65,149,27,-4,118,34,-11,159,32,89,9,"); add("-6,72,-124,-13,58,-137,-16,45,-140,-25,26,-147,"); add("-27,16,-146,-35,-14,-143,-43,-42,-136,"); add(""); //add("/*107*/"); add("16,1,24919,6169,-15523,"); add("-15,-83,-57,15,-144,-32,30,-148,-7,46,-148,19,"); add("27,-152,-11,-30,-15,-54,-79,68,-101,-85,43,-118,"); add("-72,102,-77,-78,95,-86,-59,170,-28,55,27,94,"); add("69,29,118,60,64,119,58,69,119,"); add(""); //add("/*108*/"); add("15,1,25878,-4981,-14336,"); add("-65,-92,-84,-74,-17,-126,-74,-48,-113,-75,-84,-102,"); add("-71,-100,-87,-80,-25,-128,-62,61,-127,26,118,4,"); add("71,113,81,76,61,110,79,105,100,67,7,115,"); add("75,-1,131,72,-13,133,"); add(""); //add("/*109*/"); add("16,1,5450,29486,-929,"); add("-154,29,9,-133,25,53,15,0,102,55,-8,59,"); add("-131,24,83,51,-6,146,117,-19,76,152,-27,86,"); add("46,-9,-54,171,-34,-108,46,-11,-133,67,-16,-143,"); add("2,-5,-140,-115,20,-79,-112,23,66,"); add(""); //add("/*110*/"); add("16,-1,17357,24467,-289,"); add("93,-67,-83,114,-83,-67,118,-86,-7,-13,8,-49,"); add("-63,46,4,-131,96,35,-99,72,119,-113,81,37,"); add("-79,53,-96,-30,19,-139,-102,66,-178,18,-10,75,"); add("61,-39,123,40,-26,142,85,-58,90,"); add(""); //add("/*111*/"); add("16,1,-10217,28170,-1431,"); add("-65,-26,-59,-121,-47,-38,-112,-47,-83,-64,-32,-142,"); add("-103,-35,66,-74,-21,123,-113,-36,147,-52,-14,123,"); add("22,14,136,72,32,111,73,28,-15,127,46,-75,"); add("129,46,-48,120,40,-116,91,30,-63,"); add(""); //add("/*112*/"); add("15,1,29126,7027,-1524,"); add("25,-95,61,35,-144,21,37,-153,29,32,-136,22,"); add("32,-147,-4,36,-156,67,31,-153,-26,-10,34,-50,"); add("-33,155,-14,-35,150,-55,-27,117,-36,-41,183,10,"); add("-27,109,-30,-35,145,-19,"); add(""); //add("/*113*/"); add("15,1,6145,29344,-1095,"); add("-111,18,-111,-53,5,-138,-82,10,-139,-105,16,-86,"); add("-147,32,55,-78,19,94,-45,14,107,69,-11,60,"); add("-161,34,74,151,-26,74,141,-26,15,139,-26,36,"); add("145,-29,16,127,-25,23,"); add(""); //add("/*114*/"); add("15,1,24375,5854,-16479,"); add("40,-64,35,43,-140,16,59,-133,43,58,-133,43,"); add("65,-133,54,43,-126,24,37,-157,9,-33,-4,-52,"); add("-54,137,-39,-51,140,-32,-78,112,-80,-58,111,-51,"); add("-26,150,12,-23,147,17,"); add(""); //add("/*115*/"); add("15,-1,-17689,24006,-3293,"); add("3,-14,-112,-73,-60,-41,-34,-11,101,-70,-38,105,"); add("-89,-57,66,-106,-88,-56,-163,-125,4,-104,-72,56,"); add("44,39,37,120,91,-4,106,86,36,112,90,43,"); add("115,84,-14,93,53,-126,"); add(""); //add("/*116*/"); add("14,1,12744,-2905,-27003,"); add("-5,-145,14,-77,-123,-22,-103,-99,-37,-63,-118,-14,"); add("-67,-122,-15,-128,-69,-50,-133,51,-66,17,147,-12,"); add("107,117,35,104,79,37,99,120,32,86,134,25,"); add("119,58,49,"); add(""); //add("/*117*/"); add("15,1,-12039,24973,-11465,"); add("-64,-40,-18,-136,-75,-18,-97,-85,-81,-115,-86,-58,"); add("-106,-47,12,-128,-64,5,-126,-69,-8,-7,38,87,"); add("99,75,51,156,93,28,61,55,53,130,77,25,"); add("140,57,-26,124,60,-2,"); add(""); //add("/*118*/"); add("14,1,7404,28675,-4785,"); add("-29,-17,-146,-17,-21,-148,7,-29,-149,-45,-11,-123,"); add("-150,53,81,-131,42,51,-114,46,103,-17,24,116,"); add("7,24,148,56,10,138,125,-25,35,146,-55,-111,"); add("129,-30,17,"); add(""); //add("/*119*/"); add("15,1,-18411,21935,8938,"); add("-115,-81,-40,-37,-70,94,-16,-67,130,-6,-58,124,"); add("71,2,136,-17,-59,103,77,18,109,131,91,45,"); add("-20,35,-117,-69,-11,-111,-56,16,-148,-52,11,-130,"); add("18,47,-75,70,90,-75,"); add(""); //add("/*120*/"); add("16,-1,-19925,-10993,19549,"); add("-85,60,-54,-81,131,-10,-95,132,-25,49,44,74,"); add("124,-109,68,104,-49,79,-38,35,-20,-106,137,-32,"); add("-67,38,-48,-111,-16,-125,11,-76,-29,64,-118,1,"); add("29,-126,-41,51,-24,39,100,-47,78,"); add(""); //add("/*121*/"); add("15,-1,-18321,23571,-2957,"); add("-21,-25,-65,-55,-44,-12,-127,-88,93,-93,-71,26,"); add("-105,-81,20,-118,-90,42,-124,-99,20,-24,-4,132,"); add("89,77,41,107,79,-71,90,60,-111,99,80,11,"); add("155,117,-44,66,45,-56,"); add(""); //add("/*122*/"); add("13,1,-17336,22935,8569,"); add("-77,9,-181,-36,-51,65,5,-50,144,-33,-72,123,"); add("11,-49,149,36,-30,146,45,-23,142,99,30,115,"); add("31,78,-136,-4,53,-140,-9,49,-144,-26,36,-146,"); add(""); //add("/*123*/"); add("15,1,18292,-22847,6589,"); add("17,51,129,65,27,-88,38,6,-87,81,84,64,"); add("-109,-44,152,4,37,115,-16,21,109,75,88,88,"); add("-100,-69,39,-92,-89,-47,-125,-112,-40,46,6,-100,"); add("56,0,-148,7,-22,-92,"); add(""); //add("/*124*/"); add("14,1,25183,6987,-14730,"); add("-19,-68,-66,-34,-107,-106,-1,-140,-65,-8,-124,-68,"); add("-18,-137,-89,-55,-30,-104,-61,102,-57,-40,142,-5,"); add("-29,159,24,18,114,80,56,74,126,63,25,117,"); add("76,10,133,"); add(""); //add("/*125*/"); add("14,1,-8316,28793,1345,"); add("-112,-33,14,-106,-36,84,-119,-39,70,-83,-31,115,"); add("70,13,135,41,3,142,12,-7,156,99,28,19,"); add("108,39,-100,95,35,-109,42,21,-148,-30,0,-150,"); add("16,13,-150,"); add(""); //add("/*126*/"); add("14,1,-20941,-20602,6087,"); add("-57,78,65,-69,88,56,-96,95,-13,-76,82,8,"); add("-54,95,123,-116,124,1,-64,28,-127,47,-74,-79,"); add("82,-108,-69,97,-111,-29,98,-114,-42,84,-109,-75,"); add("86,-65,78,"); add(""); //add("/*127*/"); add("13,1,-4213,-29615,2279,"); add("-54,18,127,-113,24,97,-128,26,79,-138,28,72,"); add("-56,2,-82,112,-27,-103,78,-21,-118,-45,-5,-145,"); add("-127,9,-160,135,-23,-23,80,-3,125,149,-19,48,"); add(""); //add("/*128*/"); add("17,1,-7190,25393,-14265,"); add("78,-15,-66,-8,-71,-121,96,22,-9,103,-22,-88,"); add("-16,-69,-112,-123,-86,-89,-29,14,39,-51,17,54,"); add("-61,-48,-53,-53,22,65,-54,65,139,-68,50,122,"); add("-82,20,78,25,62,96,104,44,25,88,20,-10,"); add(""); //add("/*129*/"); add("14,-1,-19493,22341,-4569,"); add("21,-10,-138,-18,-17,-9,-18,15,150,-41,-7,140,"); add("-104,-82,48,-110,-85,68,-76,-41,140,-11,27,201,"); add("24,10,-64,19,-10,-144,124,90,-106,57,33,-93,"); add("103,79,-54,"); add(""); //add("/*130*/"); add("14,1,631,-8774,-28681,"); add("-95,52,-18,-113,74,-25,-126,-17,4,-218,65,-21,"); add("120,-18,6,3,62,-18,-151,163,-49,118,8,-2,"); add("126,-59,18,142,-43,15,136,-62,21,142,-64,22,"); add("-23,-89,26,"); add(""); //add("/*131*/"); add("14,1,19698,-3856,-22297,"); add("66,-19,63,94,-67,96,59,-115,73,41,-133,62,"); add("33,-144,58,-56,-44,-42,-112,1,-101,-112,-2,-100,"); add("-88,89,-95,-79,93,-87,-35,136,-55,18,126,-7,"); add("109,85,80,"); add(""); //add("/*132*/"); add("13,1,-11506,10377,-25689,"); add("-24,-106,-32,45,-133,-73,-57,-146,-31,-32,-145,-41,"); add("-112,-83,18,-96,90,78,-114,58,75,-114,81,84,"); add("67,117,15,89,117,5,131,76,-30,133,55,-38,"); add(""); //add("/*133*/"); add("13,1,3573,20459,21649,"); add("-18,-82,80,-121,-55,70,-106,-79,91,11,-107,96,"); add("42,-113,97,64,-95,76,145,-61,32,58,98,-98,"); add("18,114,-107,15,110,-103,-40,114,-99,-24,107,-96,"); add(""); //add("/*134*/"); add("14,1,-13127,24311,-11689,"); add("32,-36,-111,-20,-65,-111,-11,-39,-67,119,108,88,"); add("119,35,-57,12,-41,-96,-113,-93,-66,-148,-83,-6,"); add("-78,-59,-31,-99,-15,79,15,71,124,81,88,89,"); add("49,83,116,"); add(""); //add("/*135*/"); add("14,-1,-27102,-7955,10108,"); add("-41,40,-76,7,-121,-79,2,-95,-72,50,-76,73,"); add("60,-59,116,54,-99,63,49,14,140,58,-112,59,"); add("41,30,130,-56,115,-52,-55,104,-59,-68,105,-94,"); add("-62,98,-88,"); add(""); //add("/*136*/"); add("13,1,24282,5951,-16583,"); add("1,-130,-43,-12,-124,-61,-62,-64,-112,21,-145,-17,"); add("-12,-193,-80,-75,62,-87,-38,114,-17,22,137,75,"); add("-22,152,20,1,137,49,74,1,106,62,51,109,"); add(""); //add("/*137*/"); add("12,1,-26265,9394,11041,"); add("-25,-130,52,61,-10,151,61,0,140,56,-11,136,"); add("72,36,134,82,129,80,-33,84,-143,-47,8,-112,"); add("-59,12,-145,-60,2,-141,-63,-12,-136,"); add(""); //add("/*138*/"); add("13,1,959,-9398,-28474,"); add("-96,40,-16,-137,30,-14,-46,96,-32,46,137,-43,"); add("120,104,-29,106,43,-11,165,-34,17,122,-55,22,"); add("71,-116,41,34,-132,44,-128,-70,17,-150,-39,7,"); add(""); //add("/*139*/"); add("13,-1,14782,-8096,24818,"); add("69,-20,-48,119,-33,-82,133,23,-74,129,-1,-79,"); add("130,19,-76,172,44,-94,-52,24,41,-129,-22,74,"); add("-124,-10,75,-135,-5,81,-127,-25,69,-127,11,80,"); add(""); //add("/*140*/"); add("13,1,-18588,-22992,5084,"); add("-30,41,75,-96,84,27,-117,108,51,-121,106,23,"); add("-116,92,-23,16,-39,-112,126,-112,-27,33,-57,-133,"); add("146,-119,7,-60,76,116,53,-45,-2,114,-97,-23,"); add(""); //add("/*141*/"); add("13,1,10930,21399,-17962,"); add("112,-57,2,131,-9,69,89,-43,5,131,-71,-1,"); add("148,-86,-8,121,-90,-27,-34,-14,-38,-131,74,3,"); add("-134,81,9,-140,53,-25,-138,61,-13,-155,53,-32,"); add(""); //add("/*142*/"); add("13,-1,2123,5909,29336,"); add("91,-78,9,130,-73,4,65,-131,20,-85,-112,28,"); add("-40,-133,28,50,-162,25,34,36,-9,28,139,-28,"); add("10,135,-25,8,152,-30,-103,116,-14,-132,66,-4,"); add(""); //add("/*143*/"); add("14,-1,-17261,24337,-3127,"); add("-106,-81,-41,-97,-73,-25,-70,-67,-119,-103,-69,48,"); add("-89,-51,111,-27,0,147,30,31,74,43,21,-85,"); add("52,29,-72,125,88,-25,82,75,129,15,1,-77,"); add("94,67,-2,"); add(""); //add("/*144*/"); add("15,-1,-17925,23424,5478,"); add("-56,-22,-89,-109,-64,-90,-96,-63,-50,-158,-128,15,"); add("-122,-105,33,71,48,36,88,74,-14,119,86,31,"); add("133,87,74,-67,-52,0,43,22,48,109,65,81,"); add("5,10,-29,16,17,-20,"); add(""); //add("/*145*/"); add("12,1,-11151,25532,-11125,"); add("-96,-60,-40,-113,-85,-80,-154,-96,-60,-89,-84,-95,"); add("-39,41,132,43,56,79,187,120,81,-121,-59,-10,"); add("37,33,37,135,73,29,132,34,-56,"); add(""); //add("/*146*/"); add("13,1,-8245,28241,5871,"); add("-116,-48,68,-111,-45,51,-55,-33,79,67,-11,142,"); add("-65,-18,-4,-34,-28,75,111,13,96,134,24,67,"); add("120,43,-35,8,38,-156,32,40,-143,-27,24,-145,"); add(""); //add("/*147*/"); add("12,-1,-29258,6281,2126,"); add("-23,-98,-32,-27,-136,29,-23,-141,72,-7,-82,123,"); add("3,-46,145,8,-25,154,25,105,42,17,119,-83,"); add("14,113,-102,8,88,-123,9,85,-120,"); add(""); //add("/*148*/"); add("12,-1,15271,556,25816,"); add("72,107,-45,84,120,-53,109,74,-69,73,123,-48,"); add("14,199,-17,-60,-36,38,-94,-101,61,-101,-90,64,"); add("-93,-105,59,-79,-120,50,19,-120,-8,"); add(""); //add("/*149*/"); add("13,1,4573,29647,-405,"); add("107,-16,122,127,-20,41,164,-26,40,74,-13,16,"); add("63,-11,-54,48,-10,-152,-74,11,-130,-85,12,-108,"); add("-165,28,-1,-109,18,26,-117,20,93,-78,13,54,"); add(""); //add("/*150*/"); add("12,-1,9509,25746,12114,"); add("-81,-25,114,107,-45,12,57,-63,87,-150,26,61,"); add("42,-29,28,151,-65,19,165,-64,1,86,3,-73,"); add("-2,67,-137,-128,58,-19,-139,62,-20,"); add(""); //add("/*151*/"); add("12,1,10885,-3987,-27670,"); add("-99,-113,-22,-113,-91,-30,-130,-74,-39,-127,-67,-37,"); add("-158,-91,-44,-8,63,-13,108,109,23,122,81,33,"); add("131,59,41,117,91,32,119,64,37,"); add(""); //add("/*152*/"); add("12,1,-10784,27846,2885,"); add("31,19,-71,-6,13,-150,-84,-23,-112,-140,-51,-40,"); add("-139,-55,-1,-127,-56,54,-43,-30,122,55,9,143,"); add("106,32,100,140,55,3,133,57,-42,"); add(""); //add("/*153*/"); add("12,-1,-20095,-16594,14860,"); add("-15,59,46,-47,134,85,5,91,106,32,39,83,"); add("57,25,102,-93,188,76,-37,-61,-113,-25,-95,-134,"); add("8,-95,-92,-9,-95,-115,80,-131,-38,"); add(""); //add("/*154*/"); add("12,-1,-19229,22976,-1545,"); add("-67,-58,-11,-88,-82,-108,-97,-85,-32,-80,-76,-92,"); add("-72,-59,30,-25,-11,149,79,79,162,92,71,-119,"); add("3,12,140,91,76,-35,97,78,-55,"); add(""); //add("/*155*/"); add("11,1,-1931,-29525,-4956,"); add("-34,25,-132,27,24,-147,46,23,-144,42,24,-147,"); add("128,1,-45,118,-27,110,37,-28,139,-44,-23,143,"); add("-82,-17,128,-119,-8,89,"); add(""); //add("/*156*/"); add("11,1,-7314,-28817,-4011,"); add("38,10,-135,63,4,-137,36,13,-147,80,3,-145,"); add("86,-36,93,124,-44,90,31,-23,107,-108,11,103,"); add("-109,12,101,-119,17,85,"); add(""); //add("/*157*/"); add("14,1,-10998,25512,-11321,"); add("41,-28,-103,-54,-61,-84,-107,-71,-54,-129,-62,-11,"); add("25,48,82,-20,9,39,-150,-48,44,17,44,79,"); add("187,57,-60,-74,-12,49,7,37,75,121,34,-43,"); add("45,4,-36,"); add(""); //add("/*158*/"); add("11,1,-29990,-14,-784,"); add("-1,-139,84,-1,-155,84,4,-105,-129,1,-108,22,"); add("-3,-4,154,-4,87,124,0,134,-44,0,128,-68,"); add("1,125,-75,2,107,-82,"); add(""); //add("/*159*/"); add("11,1,24220,-1670,-17623,"); add("-21,-142,-16,-68,-99,-83,-84,-67,-106,-86,-7,-115,"); add("-81,59,-114,-40,112,-64,55,102,63,79,92,96,"); add("91,14,122,90,-31,124,"); add(""); //add("/*160*/"); add("11,1,140,28342,-9835,"); add("-148,16,46,-147,-2,-5,-152,14,45,-96,34,103,"); add("101,41,118,139,17,48,150,-6,-21,122,-29,-85,"); add("100,-38,-111,8,-41,-120,"); add(""); //add("/*161*/"); add("11,1,9134,18840,21486,"); add("134,-66,0,126,-91,25,135,-54,-13,113,-67,8,"); add("137,-82,8,-43,62,-34,-97,100,-42,-91,95,-42,"); add("-150,40,31,-124,74,-11,"); add(""); //add("/*162*/"); add("11,1,-21516,19701,6996,"); add("-54,-7,-149,-52,-18,-114,-56,-12,-145,-50,-13,-130,"); add("-118,-89,-128,6,-28,106,77,37,149,69,26,145,"); add("65,33,115,82,47,123,"); add(""); //add("/*163*/"); add("12,1,-2471,26742,-13370,"); add("-106,37,95,62,32,52,133,23,22,113,42,66,"); add("158,-1,-29,145,13,5,63,-27,-64,-93,-46,-80,"); add("-176,5,39,-113,-29,-42,-113,-42,-63,"); add(""); //add("/*164*/"); add("12,1,-10150,-24537,13962,"); add("-10,36,55,-102,82,68,-147,64,4,-127,49,-11,"); add("-133,22,-63,-142,13,-86,47,-28,-11,123,-35,34,"); add("144,-49,22,137,-52,12,136,-74,-31,"); add(""); //add("/*165*/"); add("12,1,-15831,-23712,9333,"); add("11,39,120,12,45,131,33,43,159,29,38,136,"); add("-72,62,33,-54,0,-87,-65,29,-36,-103,35,-86,"); add("60,-92,-122,18,-56,-109,34,-70,-119,"); add(""); //add("/*166*/"); add("11,-1,-26860,12885,-3537,"); add("-22,-68,-78,-64,-142,-24,-55,-120,-9,-54,-128,-42,"); add("-98,-217,-5,28,66,16,59,138,29,57,135,39,"); add("57,134,44,56,133,53,"); add(""); //add("/*167*/"); add("10,-1,21555,20350,4610,"); add("-13,-13,117,-23,-10,147,-11,-25,149,15,-65,193,"); add("89,-66,-109,59,-32,-128,32,3,-154,-26,61,-143,"); add("-71,111,-150,"); add(""); //add("/*168*/"); add("12,1,25080,-2304,-16299,"); add("36,-91,68,1,-152,24,5,-145,32,28,-138,68,"); add("-28,-123,-22,-47,63,-85,-54,77,-96,14,96,4,"); add("34,84,39,-33,137,-73,5,129,-10,"); add(""); //add("/*169*/"); add("11,1,-5147,-29506,1706,"); add("36,-1,84,-95,24,126,-104,26,108,-85,24,125,"); add("-103,29,129,-55,5,-80,41,-19,-145,56,-20,-140,"); add("89,-24,-121,131,-27,-73,"); add(""); //add("/*170*/"); add("11,1,3601,24897,16346,"); add("-94,-65,119,-106,-2,25,-143,-42,91,31,-83,117,"); add("72,-63,79,161,-49,38,88,35,-69,12,73,-110,"); add("37,67,-109,-8,83,-124,"); add(""); //add("/*171*/"); add("12,1,-16031,-24558,6319,"); add("-29,-8,-108,-28,-23,-166,19,-42,-123,130,-68,69,"); add("-58,46,37,5,16,79,101,-54,43,132,-49,140,"); add("-115,70,-13,-118,58,-72,14,12,83,"); add(""); //add("/*172*/"); add("11,1,4179,29039,-6267,"); add("73,-37,-121,-54,-26,-151,-57,-23,-136,-114,-7,-103,"); add("-154,15,-24,-87,34,96,96,17,131,92,8,92,"); add("101,10,108,59,10,82,"); add(""); //add("/*173*/"); add("11,1,7225,28615,-5385,"); add("-150,30,-40,-139,24,-51,-152,36,-3,-23,32,144,"); add("-4,26,134,100,-10,76,124,-44,-80,137,-42,-45,"); add("123,-46,-80,49,-24,-60,"); add(""); //add("/*174*/"); add("10,1,27028,-4267,-12299,"); add("-47,-101,-69,-68,-50,-128,-76,-143,-112,-39,74,-109,"); add("-42,100,-123,53,124,69,69,41,132,55,-48,134,"); add("67,29,136,"); add(""); //add("/*175*/"); add("11,-1,17469,24240,2693,"); add("-28,25,-38,-83,72,-130,-50,50,-130,-52,49,-133,"); add("-57,55,-170,-37,23,45,59,-55,143,73,-63,123,"); add("51,-50,127,70,-63,122,"); add(""); //add("/*176*/"); add("11,1,9832,-4353,-28007,"); add("-12,-95,11,-32,-144,12,-59,-142,3,-104,-107,-18,"); add("-134,-122,-24,-2,72,-13,44,125,-7,81,123,7,"); add("60,126,0,75,131,5,"); add(""); //add("/*177*/"); add("11,-1,3662,25807,14853,"); add("-135,2,28,-21,-77,138,-117,-27,73,-24,-53,95,"); add("13,-75,123,53,-20,22,115,39,-92,129,32,-84,"); add("65,57,-113,-8,65,-110,"); add(""); //add("/*178*/"); add("10,1,-6841,-28848,-4579,"); add("-89,40,-117,11,19,-132,-44,36,-150,0,26,-145,"); add("120,-16,-75,82,-38,102,0,-25,145,26,-31,146,"); add("-18,-20,148,"); add(""); //add("/*179*/"); add("10,1,10303,-4850,-27755,"); add("-3,-110,18,-87,-118,-10,-139,-39,-44,-145,-16,-49,"); add("-168,-5,-59,51,128,-5,128,85,30,144,11,50,"); add("127,49,38,"); add(""); //add("/*180*/"); add("11,1,27435,-3603,-11592,"); add("23,-70,78,-36,-77,-61,-56,-11,-129,-70,-5,-160,"); add("-45,48,-118,-47,48,-121,14,73,10,61,-2,139,"); add("60,0,137,60,1,140,"); add(""); //add("/*181*/"); add("11,-1,-19573,-21914,6055,"); add("-41,72,126,-22,58,133,28,17,146,73,-23,140,"); add("-46,47,21,-91,40,-142,13,-52,-136,-19,-29,-159,"); add("7,-23,-56,76,-90,-80,"); add(""); //add("/*182*/"); add("10,1,-16090,-23678,8971,"); add("67,-15,80,5,55,152,3,53,138,-68,112,164,"); add("-100,20,-121,-81,-5,-154,100,-81,-30,55,-62,-63,"); add("-13,-40,-128,"); add(""); //add("/*183*/"); add("10,1,-7427,29059,-664,"); add("-79,-23,-102,-94,-27,-62,-135,-36,-21,-102,-25,98,"); add("-81,-19,122,31,12,139,154,41,18,142,38,-17,"); add("130,32,-78,"); add(""); //add("/*184*/"); add("10,1,22146,-6178,-19271,"); add("-60,73,-92,-58,116,-102,55,130,23,75,-34,95,"); add("107,-20,130,99,39,103,19,-78,46,-68,-127,-39,"); add("-96,-82,-86,"); add(""); //add("/*185*/"); add("11,-1,13300,25127,9578,"); add("29,41,-150,-7,56,-141,23,35,-126,-131,89,-57,"); add("-40,16,13,126,-92,70,-14,-37,123,9,-49,120,"); add("-29,-40,146,39,-43,58,"); add(""); //add("/*186*/"); add("10,-1,11562,21630,17276,"); add("116,-40,-28,140,-47,-37,107,-42,-21,214,-140,24,"); add("-64,64,-33,-121,92,-31,-136,91,-20,-132,38,42,"); add("-104,7,62,"); add(""); //add("/*187*/"); add("10,1,-25792,5633,14249,"); add("-43,-12,-74,-78,-55,-120,-19,-181,35,-89,-108,-124,"); add("22,-32,53,73,1,134,79,31,133,37,137,15,"); add("34,178,-7,"); add(""); //add("/*188*/"); add("10,1,-11381,25287,-11447,"); add("56,-2,-59,-84,-68,-68,-114,-80,-60,-126,-71,-28,"); add("-165,-107,-62,31,58,91,86,77,80,112,81,64,"); add("118,75,46,"); add(""); //add("/*189*/"); add("11,-1,-17257,23572,6821,"); add("-79,-32,-89,-16,23,-121,-53,-38,-4,-103,-94,61,"); add("-62,-78,109,-89,-94,93,16,8,12,124,83,35,"); add("113,76,31,108,92,-44,"); add(""); //add("/*190*/"); add("9,1,21029,-858,-21378,"); add("-82,-38,-80,-104,-45,-99,-108,-41,-101,-166,25,-159,"); add("75,53,68,106,28,100,109,16,104,108,13,105,"); add(""); //add("/*191*/"); add("9,-1,16710,18554,16629,"); add("40,-81,51,77,-100,31,90,-117,38,114,-123,18,"); add("63,61,-130,-74,118,-54,-114,76,32,-75,122,-59,"); add(""); //add("/*192*/"); add("10,1,-26154,13570,5641,"); add("12,-36,142,-22,-92,112,-38,-97,53,-91,-175,-11,"); add("33,46,40,70,120,43,37,119,-105,21,92,-118,"); add("-14,33,-142,"); add(""); //add("/*193*/"); add("10,1,-10691,-27735,4062,"); add("89,-25,58,-53,43,153,-92,50,88,-103,49,54,"); add("-119,59,77,-44,12,-36,69,-48,-127,98,-54,-100,"); add("91,-52,-105,"); add(""); //add("/*194*/"); add("9,1,5294,28803,-6509,"); add("141,-38,-53,58,-14,-13,-125,-7,-132,-82,-14,-124,"); add("-128,1,-92,-86,43,117,12,33,151,77,15,126,"); add(""); //add("/*195*/"); add("10,1,-13366,24028,-12001,"); add("65,-24,-120,-58,-49,-32,-118,-69,-5,-122,-71,-3,"); add("-204,-95,43,57,44,22,133,68,-16,108,81,37,"); add("61,66,65,"); add(""); //add("/*196*/"); add("9,1,-13524,26719,1794,"); add("-49,-16,-141,-59,-24,-103,-129,-63,-57,-127,-69,46,"); add("11,-3,148,97,43,109,110,51,85,128,63,31,"); add(""); //add("/*197*/"); add("10,-1,-19280,22118,-6250,"); add("3,37,124,-25,20,152,-29,10,132,-36,9,154,"); add("72,66,13,-1,-41,-155,5,-30,-131,31,-11,-139,"); add("-4,-39,-126,"); add(""); //add("/*198*/"); add("9,1,-5809,29420,-843,"); add("-132,-27,-12,-164,-32,56,-135,-28,15,-23,-2,88,"); add("83,20,143,154,33,14,113,21,-95,112,20,-106,"); add(""); //add("/*199*/"); add("10,-1,-2866,4214,29564,"); add("-77,-108,8,-26,-121,14,-26,-158,18,141,-133,31,"); add("54,162,-16,-71,-12,-5,-48,38,-10,28,155,-18,"); add("20,115,-14,"); add(""); //add("/*200*/"); add("9,1,16380,-17659,-17885,"); add("-77,86,-154,103,64,31,97,45,45,96,-26,114,"); add("95,-32,121,-11,-89,78,-111,-41,-64,-107,11,-109,"); add(""); //add("/*201*/"); add("8,1,2405,29362,5664,"); add("-161,-1,74,55,-28,117,40,-40,180,167,-13,-2,"); add("108,5,-68,27,32,-171,-115,17,-38,"); add(""); //add("/*202*/"); add("10,-1,15812,18669,17362,"); add("62,-1,-56,121,-24,-85,101,-18,-76,-52,103,-62,"); add("26,105,-142,-85,18,62,-29,-52,84,-107,-11,112,"); add("-38,-69,109,"); add(""); //add("/*203*/"); add("9,-1,-22192,18429,-8241,"); add("-24,-51,-48,-42,-105,-120,-45,-95,-83,3,-94,-206,"); add("-31,-5,68,-7,65,158,63,115,82,45,106,111,"); add(""); //add("/*204*/"); add("9,1,11904,-3476,-27317,"); add("-52,-83,-12,-106,-103,-32,-102,-113,-28,-187,-67,-70,"); add("48,72,10,85,121,20,114,88,37,122,81,42,"); add(""); //add("/*205*/"); add("9,1,29712,544,-4112,"); add("13,98,108,12,125,117,18,-20,133,2,-58,5,"); add("-9,-130,-90,-10,-97,-91,-13,-138,-111,-12,92,-79,"); add(""); //add("/*206*/"); add("9,1,9469,-5342,-27961,"); add("-76,-64,-13,-89,-111,-8,-123,-76,-26,-193,-36,-55,"); add("20,109,-15,111,75,21,140,40,38,133,73,30,"); add(""); //add("/*207*/"); add("9,1,-4851,24586,-16492,"); add("112,-15,-56,112,-35,-83,77,-73,-128,-49,-63,-78,"); add("-117,34,82,-120,28,75,-155,20,75,46,45,53,"); add(""); //add("/*208*/"); add("9,1,24496,6480,-16061,"); add("42,-192,-12,-66,29,-89,-56,-72,-113,-60,-98,-126,"); add("-32,66,-23,30,120,90,46,90,104,59,71,119,"); add(""); //add("/*209*/"); add("9,1,-5809,29356,-2119,"); add("25,-3,-102,10,-9,-147,-56,-22,-131,-154,-34,-30,"); add("-109,-15,91,2,14,160,131,31,59,80,23,86,"); add(""); //add("/*210*/"); add("9,-1,28373,6866,-6918,"); add("16,-102,-31,-1,-97,-101,-9,-80,-107,-21,-107,-180,"); add("-10,66,19,7,96,117,-9,131,86,7,89,112,"); add(""); //add("/*211*/"); add("9,1,6654,-7693,-28223,"); add("85,43,9,-37,-186,42,-30,-149,34,-106,-88,0,"); add("-146,59,-50,24,144,-35,100,82,0,88,19,15,"); add(""); //add("/*212*/"); add("9,1,23496,6501,17484,"); add("57,-56,-56,91,-46,-107,87,15,-125,87,76,-150,"); add("-52,72,45,-85,13,113,-84,-4,117,-82,-11,114,"); add(""); //add("/*213*/"); add("9,-1,-6643,25925,-13555,"); add("69,0,-34,128,-11,-84,105,-27,-99,109,-26,-98,"); add("-71,-55,-69,-126,21,96,-97,28,97,-76,47,126,"); add(""); //add("/*214*/"); add("9,1,-7497,28006,-7711,"); add("-100,-11,58,-138,-24,49,27,14,24,77,47,98,"); add("45,58,175,104,24,-16,36,-35,-168,12,-31,-128,"); add(""); //add("/*215*/"); add("9,-1,-20663,19947,-8671,"); add("-9,-40,-67,-99,-111,-19,-110,-98,41,-117,-97,63,"); add("8,54,105,53,64,15,102,73,-80,114,93,-60,"); add(""); //add("/*216*/"); add("9,1,4747,25258,15476,"); add("-15,-47,81,-25,-76,129,-32,-73,126,23,-91,137,"); add("39,12,-30,3,79,-126,12,80,-131,10,77,-128,"); add(""); //add("/*217*/"); add("8,1,8037,27999,7173,"); add("126,-37,4,70,13,-132,-8,42,-161,-67,37,-70,"); add("-146,35,28,-97,4,97,30,-44,140,"); add(""); //add("/*218*/"); add("8,1,-8206,28777,-2132,"); add("89,20,-69,43,0,-147,-75,-30,-114,-146,-37,57,"); add("-176,-46,61,49,22,105,122,42,81,"); add(""); //add("/*219*/"); add("8,1,26623,-4311,-13138,"); add("27,-94,85,6,-161,68,-36,-68,-50,-84,-1,-169,"); add("-19,104,-74,-3,147,-55,61,86,94,"); add(""); //add("/*220*/"); add("9,-1,-19193,23050,547,"); add("-3,0,-116,-126,-104,-79,-91,-76,-9,-51,-45,93,"); add("-32,-30,123,62,50,72,131,111,3,92,79,-39,"); add(""); //add("/*221*/"); add("9,-1,-21968,17844,-9950,"); add("-52,-145,-144,-65,-32,87,-53,11,139,-99,-72,94,"); add("6,11,5,105,80,-92,45,-8,-115,86,123,27,"); add(""); //add("/*222*/"); add("8,1,-9395,-28397,2317,"); add("-3,14,145,-6,15,151,-50,30,144,-103,31,-45,"); add("14,-17,-132,18,-21,-163,44,-26,-140,"); add(""); //add("/*223*/"); add("8,1,-23532,-559,18600,"); add("-51,-140,-71,78,10,100,72,112,94,44,111,58,"); add("-18,153,-19,-74,-18,-94,-47,-129,-61,"); add(""); //add("/*224*/"); add("8,1,29597,-880,-4821,"); add("11,119,49,14,132,63,15,122,85,18,-57,120,"); add("-6,-139,-20,-16,-129,-81,-21,-93,-116,"); add(""); //add("/*225*/"); add("8,1,-4242,28374,8769,"); add("-111,-19,10,-148,-19,-16,-174,-48,66,87,-11,80,"); add("150,10,44,156,20,13,59,45,-115,"); add(""); //add("/*226*/"); add("8,-1,23521,18132,-4238,"); add("22,2,127,85,-98,57,62,-96,-62,2,-37,-146,"); add("-18,-15,-158,-76,95,-24,-53,98,119,"); add(""); //add("/*227*/"); add("9,-1,-12721,26335,-6680,"); add("101,34,-59,-12,-37,-121,21,-30,-150,97,11,-132,"); add("-22,-9,4,-87,-9,120,-32,24,149,-30,19,133,"); add(""); //add("/*228*/"); add("8,1,28556,-1354,-9094,"); add("4,-123,32,-10,-153,-7,-42,-14,-129,-41,-5,-126,"); add("-13,145,-64,30,120,73,44,44,129,"); add(""); //add("/*229*/"); add("9,-1,-13304,26737,-2855,"); add("-76,-34,35,-77,-28,107,23,22,102,145,75,25,"); add("91,53,92,49,18,-63,-12,-18,-126,-95,-61,-143,"); add(""); //add("/*230*/"); add("9,1,-4166,24261,-17148,"); add("79,-11,-35,76,-52,-91,33,-64,-96,128,-60,-112,"); add("-52,-17,-11,-135,41,86,-105,58,105,-31,69,105,"); add(""); //add("/*231*/"); add("10,-1,22208,16310,-11865,"); add("-45,2,-82,-109,78,-95,-87,149,46,91,-49,101,"); add("52,-108,-53,29,8,64,39,3,77,28,-4,47,"); add("-22,-51,-112,"); add(""); //add("/*232*/"); add("8,-1,18389,23461,-3379,"); add("78,-58,17,126,-102,-8,148,-120,-6,-26,11,-72,"); add("-120,91,-34,-120,92,-23,-123,105,59,"); add(""); //add("/*233*/"); add("9,-1,-12115,27105,4305,"); add("73,39,-40,98,61,-114,58,51,-174,-77,-33,0,"); add("-134,-60,2,-95,-52,66,69,14,109,8,-12,101,"); add(""); //add("/*234*/"); add("9,1,22705,-5,-19608,"); add("49,-19,57,108,-56,126,-44,-88,-51,-88,25,-103,"); add("-59,-15,-68,-104,-20,-119,-6,99,-7,89,57,101,"); add(""); //add("/*235*/"); add("9,-1,-21304,20829,-3509,"); add("-61,-67,-28,-89,-92,7,-93,-82,84,-97,-83,115,"); add("17,17,-6,85,72,-102,93,83,-81,88,91,-4,"); add(""); //add("/*236*/"); add("8,1,21301,-2864,-20930,"); add("49,-109,66,-5,-141,14,-17,-126,3,-108,-60,-101,"); add("-16,142,-38,0,130,-20,43,142,24,"); add(""); //add("/*237*/"); add("8,1,-3541,26084,-14390,"); add("91,-16,-52,143,-42,-108,-84,-54,-78,-183,-37,-22,"); add("-110,17,58,-27,44,86,84,68,100,"); add(""); //add("/*238*/"); add("9,1,-17503,-23888,4794,"); add("98,-63,45,73,-33,99,90,-40,118,83,-41,84,"); add("-47,33,-2,-82,42,-75,-89,41,-118,-87,42,-97,"); add(""); //add("/*239*/"); add("8,1,-20659,21543,3021,"); add("-20,-9,-74,-10,14,-179,-30,-5,-194,-34,-42,74,"); add("-22,-39,146,-6,-28,161,69,56,82,"); add(""); //add("/*240*/"); add("8,1,24748,-885,-16934,"); add("0,-113,6,-74,-41,-105,-86,34,-125,-97,38,-141,"); add("31,56,41,88,29,123,87,22,125,"); add(""); //add("/*241*/"); add("8,1,22276,-3747,-19742,"); add("48,-106,75,49,-132,82,14,-106,39,-61,-71,-56,"); add("-56,105,-85,-48,125,-80,7,156,-22,"); add(""); //add("/*242*/"); add("10,1,-16881,-24201,5419,"); add("-73,37,-65,-75,32,-95,-64,29,-74,60,-59,-77,"); add("117,-85,-15,9,15,101,70,-48,1,35,-8,76,"); add("-39,49,98,"); add(""); //add("/*243*/"); add("8,1,-26588,12735,5561,"); add("-52,-110,-1,-64,-123,-29,-32,-112,98,26,1,117,"); add("60,110,43,41,123,-81,39,119,-83,"); add(""); //add("/*244*/"); add("8,-1,15516,21285,-14359,"); add("23,35,76,93,9,115,97,-78,-10,65,-106,-84,"); add("1,-79,-116,-126,63,-47,-117,100,21,"); add(""); //add("/*245*/"); add("8,1,7216,28601,-5469,"); add("-30,-19,-138,2,-31,-152,-102,13,-61,-63,39,115,"); add("40,19,146,74,4,118,101,-17,42,"); add(""); //add("/*246*/"); add("8,1,3833,29553,3454,"); add("2,11,-94,-34,18,-128,11,16,-167,-129,16,5,"); add("28,-19,150,-9,-15,145,51,-17,88,"); add(""); //add("/*247*/"); add("8,1,8843,28172,5303,"); add("87,-18,-50,96,-15,-85,-82,41,-80,-143,38,39,"); add("-156,43,31,-1,-21,116,113,-45,51,"); add(""); //add("/*248*/"); add("7,1,21050,-381,-21372,"); add("-94,-69,-91,-60,-120,-55,-138,-33,-132,42,113,37,"); add("87,98,82,100,30,97,"); add(""); //add("/*249*/"); add("7,-1,3999,25672,14999,"); add("-52,-42,85,-37,-69,127,-3,-123,204,68,48,-97,"); add("34,74,-133,7,66,-113,"); add(""); //add("/*250*/"); add("8,1,-26361,12892,6235,"); add("1,-67,145,-25,-108,108,-66,-133,-7,7,-5,35,"); add("64,140,-9,25,106,-109,6,79,-137,"); add(""); //add("/*251*/"); add("7,1,5148,25410,15094,"); add("-78,-27,72,-48,-71,134,82,-126,180,79,41,-93,"); add("22,67,-118,-13,83,-135,"); add(""); //add("/*252*/"); add("7,1,24083,-4111,-17411,"); add("-86,-14,-114,-93,-6,-126,-79,82,-125,26,70,20,"); add("82,-15,114,86,-24,122,"); add(""); //add("/*253*/"); add("8,1,12234,-12996,-24113,"); add("-13,134,-78,-26,127,-81,41,134,-49,38,-2,21,"); add("7,-140,76,11,-113,66,-8,-133,66,"); add(""); //add("/*254*/"); add("7,1,1263,19267,22961,"); add("-88,-22,23,-158,-114,102,113,-77,58,145,-30,17,"); add("99,111,-97,-85,84,-65,"); add(""); //add("/*255*/"); add("7,1,24383,5280,-16661,"); add("76,-40,99,82,-101,90,0,-112,-34,-83,-22,-130,"); add("-94,69,-117,-28,126,-2,"); add(""); //add("/*256*/"); add("7,1,-3500,28664,8132,"); add("-101,3,-56,-87,-33,79,32,-31,122,146,-35,183,"); add("74,35,-91,-25,38,-140,"); add(""); //add("/*257*/"); add("8,-1,10996,25265,11864,"); add("114,-70,44,116,-82,64,52,-26,5,-116,97,-94,"); add("-74,86,-116,-38,46,-62,-72,-30,131,"); add(""); //add("/*258*/"); add("7,1,-8489,-28676,2368,"); add("-45,2,-135,100,-37,-107,135,-40,-4,125,-27,112,"); add("-82,28,67,-130,43,60,"); add(""); //add("/*259*/"); add("7,1,-8544,-28708,1696,"); add("-64,29,149,-100,35,82,-99,28,-39,-66,10,-166,"); add("105,-33,-17,131,-44,-61,"); add(""); //add("/*260*/"); add("7,1,-13684,26583,2464,"); add("-102,-45,-76,-137,-72,-1,-98,-61,98,57,23,82,"); add("129,64,34,127,69,-25,"); add(""); //add("/*261*/"); add("7,1,-26462,13710,-3429,"); add("-39,-77,-11,-70,-135,9,-110,-205,50,42,81,-8,"); add("70,130,-33,70,134,-11,"); add(""); //add("/*262*/"); add("8,1,25177,-2424,-16132,"); add("51,-55,88,15,-120,43,7,-149,35,-50,-56,-68,"); add("-40,47,-72,-13,136,-42,-1,134,-23,"); add(""); //add("/*263*/"); add("7,1,-3593,28752,7771,"); add("-130,-26,38,52,-25,114,199,4,74,-100,25,-133,"); add("94,-2,50,-8,17,-66,"); add(""); //add("/*264*/"); add("7,-1,18992,23204,-949,"); add("50,-38,79,76,-60,101,116,-98,-56,11,-14,-132,"); add("-109,85,-121,-102,88,82,"); add(""); //add("/*265*/"); add("8,-1,16204,715,25237,"); add("81,6,-52,141,-44,-91,9,71,-7,57,116,-41,"); add("-71,-2,46,-126,-45,84,-122,-29,79,"); add(""); //add("/*266*/"); add("7,1,11947,21012,-17769,"); add("90,-72,-26,194,-154,-48,-100,47,-12,-129,85,11,"); add("-141,54,-30,6,35,45,"); add(""); //add("/*267*/"); add("8,1,-16323,24985,3054,"); add("-64,-37,-40,-137,-88,-25,45,14,127,106,64,47,"); add("-94,-61,-2,45,28,14,119,78,0,"); add(""); //add("/*268*/"); add("8,-1,7459,26926,10924,"); add("54,-44,73,122,-54,47,141,-87,112,-11,22,-44,"); add("-44,63,-124,-40,29,-43,-140,56,-39,"); add(""); //add("/*269*/"); add("7,1,4421,25599,-15005,"); add("-163,57,51,-149,43,31,21,58,107,177,-45,-28,"); add("85,-78,-109,70,-35,-40,"); add(""); //add("/*270*/"); add("7,1,-3740,24124,-17437,"); add("101,-6,-30,60,-71,-110,103,-102,-159,-74,7,24,"); add("-92,67,110,-103,58,101,"); add(""); //add("/*271*/"); add("7,-1,1630,23899,18060,"); add("-7,-73,97,26,-79,102,152,4,-20,36,74,-101,"); add("-85,82,-100,-54,59,-73,"); add(""); //add("/*272*/"); add("8,-1,17320,22752,-9075,"); add("98,-58,42,126,-77,52,92,-86,-38,-16,-14,-65,"); add("-118,74,-44,-114,64,-61,-33,40,37,"); add(""); //add("/*273*/"); add("7,1,6068,25608,14403,"); add("-109,-11,63,-81,-45,113,88,-96,131,38,13,-37,"); add("76,40,-102,88,57,-137,"); add(""); //add("/*274*/"); add("7,-1,17827,6043,23359,"); add("31,69,-41,30,130,-58,-71,130,20,-122,-25,100,"); add("-17,-150,53,104,-86,-57,"); add(""); //add("/*275*/"); add("7,1,1364,-29308,-6258,"); add("-135,6,-59,24,23,-99,160,6,5,116,9,-12,"); add("-36,-41,177,-50,-18,77,"); add(""); //add("/*276*/"); add("7,-1,-18191,-23193,5583,"); add("-74,68,39,-13,62,212,-55,22,-91,-92,34,-161,"); add("66,-58,-18,115,-88,14,"); add(""); //add("/*277*/"); add("7,1,-5480,29422,-2079,"); add("-34,-15,-115,-39,-20,-165,-65,-8,54,-52,0,129,"); add("-26,6,157,144,28,11,"); add(""); //add("/*278*/"); add("7,1,-26312,13467,5132,"); add("-14,-64,92,38,20,140,63,44,193,-5,18,-68,"); add("-32,5,-167,-49,-50,-118,"); add(""); //add("/*279*/"); add("7,1,22241,13603,14842,"); add("-48,6,67,-63,-46,135,-55,-108,176,47,-5,-64,"); add("67,36,-130,39,71,-123,"); add(""); //add("/*280*/"); add("7,-1,-10783,26096,-10136,"); add("-73,-35,-11,-140,-53,13,-193,-93,-27,52,35,34,"); add("133,61,9,143,53,-17,"); add(""); //add("/*281*/"); add("7,1,29783,1256,-3378,"); add("4,68,62,9,88,122,11,87,149,6,-96,12,"); add("-11,-65,-136,-11,-87,-135,"); add(""); //add("/*282*/"); add("6,1,-17758,24025,2727,"); add("-29,-6,-136,-87,-59,-52,-36,-45,161,-5,-25,188,"); add("115,91,-49,"); add(""); //add("/*283*/"); add("7,-1,-23952,18049,730,"); add("-55,-75,42,-87,-119,38,-109,-148,28,35,46,27,"); add("86,118,-37,85,116,-45,"); add(""); //add("/*284*/"); add("7,-1,-1959,8253,28776,"); add("-85,-33,3,-109,-82,16,-4,-124,34,54,-81,27,"); add("-38,210,-62,109,71,-12,"); add(""); //add("/*285*/"); add("7,1,24446,-969,-17363,"); add("-58,-41,-79,-90,6,-125,-105,28,-146,25,31,33,"); add("90,3,124,90,-3,125,"); add(""); //add("/*286*/"); add("8,1,2887,27868,10725,"); add("80,24,-85,93,20,-77,7,53,-145,-59,-21,75,"); add("-54,25,-53,-39,-26,81,-25,-45,125,"); add(""); //add("/*287*/"); add("7,1,21419,-3233,-20756,"); add("-24,-119,-5,12,-123,32,-51,-112,-33,-75,85,-91,"); add("2,117,-17,84,108,68,"); add(""); //add("/*288*/"); add("8,1,20078,-7369,-21038,"); add("-57,-7,-51,-117,-24,-103,-4,61,-24,22,130,-24,"); add("47,74,19,75,-19,78,19,-139,65,"); add(""); //add("/*289*/"); add("7,1,10608,21446,-18098,"); add("-155,71,-6,-130,74,14,-41,49,34,179,-75,14,"); add("129,-71,-9,65,-54,-26,"); add(""); //add("/*290*/"); add("7,1,16151,-1050,-25260,"); add("73,-1,47,122,24,78,149,-61,101,-61,-44,-39,"); add("-138,-12,-89,-119,62,-80,"); add(""); //add("/*291*/"); add("7,1,6256,-8530,-28073,"); add("-89,-10,-17,-70,70,-36,128,113,-6,110,109,-7,"); add("42,-69,29,-89,-109,12,"); add(""); //add("/*292*/"); add("7,1,21026,13541,-16569,"); add("85,-69,51,75,-69,41,109,-154,15,-55,43,-35,"); add("-94,98,-42,-107,95,-60,"); add(""); //add("/*293*/"); add("8,-1,-18859,-22602,5789,"); add("106,-54,128,-49,49,33,-140,115,-9,47,-48,-33,"); add("-95,67,-50,48,-51,-39,45,-53,-57,"); add(""); //add("/*294*/"); add("7,-1,13656,23661,12396,"); add("32,42,-116,-54,77,-89,-37,92,-139,-18,-4,28,"); add("39,-82,118,30,-82,124,"); add(""); //add("/*295*/"); add("6,1,8006,23007,-17510,"); add("-151,56,6,-121,86,60,17,53,78,158,-90,-50,"); add("129,-58,-17,"); add(""); //add("/*296*/"); add("6,1,3087,24735,16693,"); add("-183,-19,61,72,-85,112,104,-38,36,118,33,-70,"); add("-33,81,-113,"); add(""); //add("/*297*/"); add("8,1,-12618,24857,-11088,"); add("2,-45,-102,-53,-74,-102,-86,-31,27,-39,-19,5,"); add("-60,-22,19,43,77,120,114,79,46,"); add(""); //add("/*298*/"); add("7,1,-11749,25130,-11421,"); add("-35,-49,-71,-110,-76,-53,-90,-82,-83,-13,29,76,"); add("66,77,98,79,60,49,"); add(""); //add("/*299*/"); add("6,1,25018,-660,-16543,"); add("66,-4,101,79,41,119,27,-147,48,-86,-7,-132,"); add("-78,19,-120,"); add(""); //add("/*300*/"); add("6,1,-15854,-24577,6681,"); add("-80,25,-102,-66,-1,-162,84,-61,-26,86,-28,105,"); add("62,-4,134,"); add(""); //add("/*301*/"); add("7,-1,-17115,24557,-2011,"); add("-4,-10,-84,-33,-36,-146,-32,-36,-148,-29,-18,28,"); add("31,35,137,43,41,129,"); add(""); //add("/*302*/"); add("6,1,11398,-4172,-27435,"); add("70,-114,47,-117,-58,-40,-136,-105,-39,19,127,-12,"); add("86,103,19,"); add(""); //add("/*303*/"); add("6,1,-7436,14318,25292,"); add("-138,-58,-8,-83,-61,10,93,-96,81,117,106,-25,"); add("98,110,-33,"); add(""); //add("/*304*/"); add("6,1,23814,-745,-18231,"); add("5,-93,11,-74,-60,-93,-123,36,-160,55,113,66,"); add("88,29,112,"); add(""); //add("/*305*/"); add("6,1,-1698,25570,15597,"); add("-88,-23,28,-115,-50,69,-31,-88,138,120,34,-41,"); add("93,65,-95,"); add(""); //add("/*306*/"); add("6,1,-11912,25153,-11200,"); add("122,17,-91,-65,-58,-60,-143,-93,-55,-30,42,124,"); add("22,55,98,"); add(""); //add("/*307*/"); add("7,-1,-20089,-9689,20064,"); add("-66,89,-24,-76,153,-4,-18,-81,-56,69,-127,9,"); add("0,-83,-41,39,-9,36,"); add(""); //add("/*308*/"); add("6,-1,22251,15516,-12811,"); add("-4,-87,-113,-86,26,-115,-20,54,30,-35,135,102,"); add("72,-15,105,"); add(""); //add("/*309*/"); add("6,1,-6458,14255,25595,"); add("-96,-106,34,-5,-26,13,156,64,4,89,105,-36,"); add("-32,97,-62,"); add(""); //add("/*310*/"); add("6,1,24489,-4261,-16797,"); add("-10,-92,9,-89,-34,-121,-92,55,-144,55,71,59,"); add("88,1,127,"); add(""); //add("/*311*/"); add("6,1,-3316,28682,8146,"); add("-99,13,-88,-180,-9,-46,35,-13,63,114,-17,109,"); add("104,-4,57,"); add(""); //add("/*312*/"); add("6,1,23528,1053,-18582,"); add("-67,39,-83,-53,129,-59,31,123,48,82,-81,98,"); add("24,-132,22,"); add(""); //add("/*313*/"); add("6,1,-6353,29317,-386,"); add("14,2,-107,-3,-4,-150,-118,-26,-18,-33,-4,162,"); add("41,10,114,"); add(""); //add("/*314*/"); add("6,1,23124,-10704,15834,"); add("-88,-20,114,-37,-123,-29,45,-75,-117,87,56,-90,"); add("11,96,50,"); add(""); //add("/*315*/"); add("6,1,-10965,-27064,6879,"); add("25,16,101,-67,56,109,-142,44,-53,-20,-23,-122,"); add("130,-66,-46,"); add(""); //add("/*316*/"); add("6,-1,4917,27988,9617,"); add("96,-21,12,87,14,-86,-36,72,-196,-54,-7,52,"); add("-60,-39,146,"); add(""); //add("/*317*/"); add("6,1,-11542,-27125,5570,"); add("69,-16,65,6,36,182,-109,54,35,-56,5,-86,"); add("48,-47,-128,"); add(""); //add("/*318*/"); add("6,1,22858,-880,-19409,"); add("54,-24,64,110,-68,135,-61,-87,-69,-99,7,-118,"); add("-23,91,-31,"); add(""); //add("/*319*/"); add("6,1,-27648,11150,3354,"); add("-39,-102,17,-24,-74,43,36,42,159,49,126,-16,"); add("5,55,-140,"); add(""); //add("/*320*/"); add("6,1,4612,1962,29578,"); add("-94,-31,17,-91,-132,22,33,-105,1,110,57,-20,"); add("72,140,-20,"); add(""); //add("/*321*/"); add("6,1,-1839,23767,-18214,"); add("43,-51,-70,184,-58,-92,-78,-8,-5,-124,19,37,"); add("-76,60,86,"); add(""); //add("/*322*/"); add("6,1,-26596,11995,6985,"); add("-39,-139,86,-29,-85,33,2,-50,90,31,136,-108,"); add("38,127,-73,"); add(""); //add("/*323*/"); add("6,1,23795,-164,-18269,"); add("46,-55,61,-29,-158,-37,-96,-53,-122,18,74,22,"); add("25,130,30,"); add(""); //add("/*324*/"); add("6,-1,-22867,-15404,11824,"); add("41,24,111,-8,76,82,-82,57,-84,-53,-42,-157,"); add("49,-85,-16,"); add(""); //add("/*325*/"); add("6,1,11693,24510,-12748,"); add("-64,-20,-97,-125,88,56,42,40,114,136,-64,1,"); add("67,-45,-25,"); add(""); //add("/*326*/"); add("6,1,-11168,-26833,7435,"); add("18,20,99,82,1,123,-42,34,56,-107,16,-99,"); add("-14,-37,-154,"); add(""); //add("/*327*/"); add("6,1,-13936,24051,-11284,"); add("-74,-76,-70,-60,-62,-58,-96,-32,54,16,53,90,"); add("118,80,24,"); add(""); //add("/*328*/"); add("6,1,29225,434,-6762,"); add("18,61,82,30,61,138,16,-62,70,-16,-81,-79,"); add("-37,-17,-167,"); add(""); //add("/*329*/"); add("5,1,-3608,-29413,4678,"); add("-92,6,-37,-199,3,-144,96,-6,43,125,-3,78,"); add(""); //add("/*330*/"); add("5,1,27658,11617,-322,"); add("34,-81,36,84,-207,-52,-36,85,-79,-53,132,33,"); add(""); //add("/*331*/"); add("5,1,-2705,-28959,7352,"); add("-24,22,78,-115,57,175,-66,-24,-114,139,-38,-97,"); add(""); //add("/*332*/"); add("5,-1,-15874,23873,-8837,"); add("-68,-40,15,-221,-126,61,94,56,-19,128,75,-31,"); add(""); //add("/*333*/"); add("5,1,-22981,137,19284,"); add("-96,-29,-116,4,-81,5,107,-35,129,62,114,74,"); add(""); //add("/*334*/"); add("6,1,-7340,25545,-13913,"); add("87,9,-28,74,-38,-109,-2,-50,-89,-113,4,66,"); add("-83,37,110,"); add(""); //add("/*335*/"); add("5,1,1932,28169,-10137,"); add("142,19,82,88,-34,-77,-105,-34,-118,-115,11,8,"); add(""); //add("/*336*/"); add("5,1,-2239,29202,6500,"); add("-27,-20,78,-46,-58,238,41,25,-94,42,36,-144,"); add(""); //add("/*337*/"); add("5,-1,-24505,2604,17110,"); add("-50,-99,-58,-20,-122,-12,90,19,128,35,129,31,"); add(""); //add("/*338*/"); add("6,1,-20336,-21189,6121,"); add("-11,37,90,-61,85,91,-79,63,-47,19,-48,-101,"); add("71,-85,-53,"); add(""); //add("/*339*/"); add("4,1,4254,3683,-29468,"); add("320,25,52,-163,-16,-27,-105,-40,-21,"); add(""); //add("/*340*/"); add("5,1,4284,29586,2515,"); add("59,0,-105,-86,24,-147,-98,6,99,20,-12,112,"); add(""); //add("/*341*/"); add("5,1,-26886,10733,7871,"); add("29,-12,114,85,100,149,-24,16,-99,-51,-28,-135,"); add(""); //add("/*342*/"); add("5,1,-13498,24234,-11425,"); add("-105,-65,-12,-169,-85,22,68,62,51,135,68,-19,"); add(""); //add("/*343*/"); add("6,-1,22043,16210,-12301,"); add("-56,32,-58,-70,134,52,64,2,117,-33,-4,-66,"); add("48,-85,-26,"); add(""); //add("/*344*/"); add("5,1,22450,-6144,-18928,"); add("-111,30,-140,55,152,16,59,16,65,15,-137,61,"); add(""); //add("/*345*/"); add("5,1,20013,16577,-14989,"); add("52,-6,63,140,-83,97,-48,-44,-114,-124,73,-85,"); add(""); //add("/*346*/"); add("5,1,8227,28696,2972,"); add("-15,23,-188,-99,29,-5,-66,8,107,111,-40,86,"); add(""); //add("/*347*/"); add("5,1,-6380,29120,-3367,"); add("-28,-18,-102,-113,-43,-141,-18,11,124,101,37,117,"); add(""); //add("/*348*/"); add("5,1,23793,-10289,15101,"); add("-94,-116,68,-13,-97,-48,94,56,-108,39,97,6,"); add(""); //add("/*349*/"); add("5,1,18853,-3180,23118,"); add("48,-117,-55,67,16,-53,-36,157,51,-37,80,41,"); add(""); //add("/*350*/"); add("5,1,-2898,29718,2905,"); add("106,19,-87,-6,15,-174,-95,-14,55,-20,-16,149,"); add(""); //add("/*351*/"); add("5,1,4133,24673,-16558,"); add("22,-39,-52,-49,-76,-124,-81,-28,-61,43,111,173,"); add(""); //add("/*352*/"); add("5,1,-17359,23518,6748,"); add("-106,-60,-61,-67,-75,87,88,36,99,82,64,-9,"); add(""); //add("/*353*/"); add("5,1,24745,-5658,-15990,"); add("-70,25,-116,-48,118,-113,42,17,57,54,-81,111,"); add(""); //add("/*354*/"); add("5,1,-6134,29314,-1752,"); add("-118,-26,-10,-166,-33,39,76,20,58,144,29,-27,"); add(""); //add("/*355*/"); add("5,-1,-18455,-22892,5946,"); add("-81,50,-58,-89,38,-136,53,-53,-39,76,-27,138,"); add(""); //add("/*356*/"); add("5,1,7506,28869,-3200,"); add("-114,35,46,63,-2,141,110,-29,-5,21,-19,-124,"); add(""); //add("/*357*/"); add("5,1,-19149,-22531,5067,"); add("-69,67,39,-156,123,-52,66,-66,-41,108,-86,30,"); add(""); //add("/*358*/"); add("4,1,-11154,10714,-25706,"); add("-86,-136,-19,-138,16,67,39,94,22,"); add(""); //add("/*359*/"); add("5,1,-11977,-26541,7220,"); add("35,14,107,21,37,167,-80,16,-72,-11,-35,-141,"); add(""); //add("/*360*/"); add("5,-1,12975,18669,19573,"); add("11,61,-65,-125,125,-37,-62,-53,91,109,-97,21,"); add(""); //add("/*361*/"); add("5,1,-10778,27815,3183,"); add("3,14,-112,-37,-4,-95,-103,-47,69,52,2,161,"); add(""); //add("/*362*/"); add("5,1,5802,24352,16532,"); add("54,21,-49,116,84,-168,-73,-13,47,-91,-61,122,"); add(""); //add("/*363*/"); add("5,1,10271,19027,20796,"); add("-105,-43,91,86,-57,9,138,-37,-34,-25,72,-53,"); add(""); //add("/*364*/"); add("5,1,-3812,-7158,-28883,"); add("-111,23,9,13,124,-32,177,-2,-23,-12,-93,24,"); add(""); //add("/*365*/"); add("5,-1,-26344,13706,4261,"); add("-48,-69,-76,-47,-96,15,4,-31,122,74,139,13,"); add(""); //add("/*366*/"); add("4,1,4332,-21849,-20096,"); add("26,-143,162,-151,20,-55,29,71,-71,"); add(""); //add("/*367*/"); add("5,1,11385,17811,21287,"); add("-72,-41,73,-16,-121,108,94,11,-58,28,107,-104,"); add(""); //add("/*368*/"); add("5,1,-25127,12810,-10224,"); add("-25,-70,-26,-55,-132,-27,-31,-66,-6,84,203,43,"); add(""); //add("/*369*/"); add("5,1,12061,-19379,-19468,"); add("5,59,-55,129,111,-29,57,-24,58,-99,-108,46,"); add(""); //add("/*370*/"); add("5,1,14601,-4888,-25747,"); add("-33,-105,1,-141,-47,-70,-24,67,-26,108,73,46,"); add(""); //add("/*371*/"); add("5,1,3182,28027,10215,"); add("85,25,-94,-63,50,-119,-84,-20,80,0,-45,125,"); add(""); //add("/*372*/"); add("5,1,24760,-13205,-10611,"); add("48,83,9,95,156,31,-11,-49,34,-80,-123,-34,"); add(""); //add("/*373*/"); add("5,1,22676,-468,-19636,"); add("56,-46,66,-18,-132,-18,-76,-21,-86,-5,159,-11,"); add(""); //add("/*374*/"); add("5,1,-8077,26065,-12464,"); add("24,-25,-69,23,-83,-185,-55,7,48,-13,63,140,"); add(""); //add("/*375*/"); add("5,1,-16783,-24152,5918,"); add("73,-71,-85,118,-89,-31,-30,39,75,-98,81,53,"); add(""); //add("/*376*/"); add("5,1,3471,29597,3461,"); add("97,-6,-45,40,14,-168,-80,10,-3,-41,-11,138,"); add(""); //add("/*377*/"); add("5,1,-23913,14805,-10440,"); add("-45,-76,-3,-118,-129,90,31,66,22,92,106,-63,"); add(""); //add("/*378*/"); add("5,1,-13537,24149,-11558,"); add("-78,-47,-6,-155,-73,31,19,38,57,133,62,-27,"); add(""); //add("/*379*/"); add("5,1,25723,-3019,-15140,"); add("2,-81,20,-24,-199,1,-13,55,-33,15,150,-7,"); add(""); //add("/*380*/"); add("5,1,18791,-8648,-21728,"); add("-47,28,-51,-101,94,-124,74,33,50,73,-79,94,"); add(""); //add("/*381*/"); add("5,1,-8993,-28620,-183,"); add("89,-27,-50,148,-46,22,-1,0,52,-139,43,28,"); add(""); //add("/*382*/"); add("5,1,-8768,-28641,-1673,"); add("23,-13,95,-32,2,151,-70,24,-46,16,3,-153,"); add(""); //add("/*383*/"); add("5,-1,16062,838,25324,"); add("49,20,-32,167,83,-110,-83,-10,54,-116,-55,76,"); add(""); //add("/*384*/"); add("5,1,-26157,14015,4405,"); add("-30,-67,29,-77,-171,83,22,47,-18,57,127,-58,"); add(""); //add("/*385*/"); add("5,1,21813,15801,-13211,"); add("-2,-58,-71,-52,-66,-164,-11,47,39,26,72,126,"); add(""); //add("/*386*/"); add("5,-1,-19641,22184,4702,"); add("-76,-56,-55,-110,-117,85,52,40,29,78,83,-59,"); add(""); //add("/*387*/"); add("5,1,15005,-1299,-25945,"); add("-59,-53,-32,-124,-41,-69,-8,102,-9,133,23,75,"); add(""); //add("/*388*/"); add("5,1,-10453,11094,-25839,"); add("67,-43,-46,-1,-102,-42,-151,-27,49,32,108,33,"); add(""); //add("/*389*/"); add("5,1,-26735,12315,5795,"); add("-46,-82,-39,-37,-127,97,35,47,62,40,120,-67,"); add(""); //add("/*390*/"); add("5,-1,-16802,23231,-8833,"); add("-19,-44,-78,-139,-124,-58,33,33,22,101,96,58,"); add(""); //add("/*391*/"); add("5,1,14422,-5109,-25805,"); add("-79,-114,-21,-125,-36,-62,57,63,19,112,85,45,"); add(""); //add("/*392*/"); add("5,1,10064,-5982,-27621,"); add("-68,-60,-12,-159,-76,-40,16,47,-5,131,70,32,"); add(""); //add("/*393*/"); add("5,1,24783,-4317,-16345,"); add("6,-74,28,-42,-75,-43,-68,125,-136,56,14,81,"); add(""); //add("/*394*/"); add("5,1,-13180,26791,2922,"); add("52,32,-58,2,16,-147,-90,-46,20,-26,-27,133,"); add(""); //add("/*395*/"); add("4,1,-1749,25344,15957,"); add("-94,-46,62,119,-78,137,-3,58,-93,"); add(""); //add("/*396*/"); add("5,1,-26328,14008,-3259,"); add("-27,-66,-62,-66,-147,-86,14,34,27,52,118,77,"); add(""); //add("/*397*/"); add("4,1,24089,7261,-16340,"); add("48,-182,-10,-71,8,-101,-20,136,32,"); add(""); //add("/*398*/"); add("4,1,-7194,13999,25540,"); add("129,4,33,19,128,-65,-131,-13,-29,"); add(""); //add("/*399*/"); add("5,-1,-24613,17122,1025,"); add("-3,-11,108,-31,-55,138,11,15,3,31,54,-135,"); add(""); //add("/*400*/"); add("5,1,20152,-5943,21414,"); add("-22,-105,-8,22,-119,-55,45,37,-32,-6,160,52,"); add(""); //add("/*401*/"); add("5,1,-1915,23677,-18322,"); add("-91,-20,-17,-173,3,23,42,15,15,142,5,-9,"); add(""); //add("/*402*/"); add("5,1,-23760,17289,6048,"); add("47,40,67,89,121,3,20,27,-4,-112,-147,-13,"); add(""); //add("/*403*/"); add("5,1,-14558,23775,-11081,"); add("15,-31,-86,-12,-74,-142,-40,-5,41,4,69,142,"); add(""); //add("/*404*/"); add("5,1,-12479,24643,-11704,"); add("-55,-50,-48,-152,-89,-22,17,26,36,120,74,27,"); add(""); //add("/*405*/"); add("4,1,5264,29534,-120,"); add("82,-15,-121,-123,21,-60,-42,9,160,"); add(""); //add("/*406*/"); add("5,1,13262,-5908,-26253,"); add("-65,-72,-16,-137,-56,-56,7,54,-9,131,60,52,"); add(""); //add("/*407*/"); add("4,1,-20288,22087,756,"); add("19,19,-81,-118,-104,-125,29,23,110,"); add(""); //add("/*408*/"); add("5,1,19086,-2847,22970,"); add("38,55,-25,26,149,-4,-46,33,42,-22,-149,1,"); add(""); //add("/*409*/"); add("4,1,-2873,28899,7523,"); add("-133,-13,0,14,-30,117,144,12,10,"); add(""); //add("/*410*/"); add("5,1,15596,18597,-17633,"); add("67,-43,14,89,-115,-41,-45,-18,-58,-66,96,41,"); add(""); //add("/*411*/"); add("5,-1,-28925,7951,348,"); add("9,27,78,35,121,116,-1,-1,-35,-24,-79,-152,"); add(""); //add("/*412*/"); add("5,-1,9541,23385,16190,"); add("-2,-50,73,79,-109,108,19,19,-38,-53,97,-107,"); add(""); //add("/*413*/"); add("5,1,29210,473,-6823,"); add("15,77,72,31,35,138,-2,-56,-13,-30,-68,-138,"); add(""); //add("/*414*/"); add("5,1,-25829,15180,1561,"); add("-4,2,-86,-23,-24,-175,1,0,31,20,19,148,"); add(""); //add("/*415*/"); add("5,1,-20000,22355,530,"); add("-25,-22,-75,-69,-59,-143,-15,-14,47,64,55,123,"); add(""); //add("/*416*/"); add("4,1,-444,-28368,9750,"); add("52,35,103,-161,22,54,22,-47,-132,"); add(""); //add("/*417*/"); add("4,1,2286,29384,5600,"); add("-108,22,-73,-64,-19,124,98,-19,59,"); add(""); //add("/*418*/"); add("4,1,-9750,11346,-26004,"); add("114,-63,-70,-93,-91,-4,-88,65,60,"); add(""); //add("/*419*/"); add("4,1,29357,1075,-6086,"); add("26,-12,125,3,-133,-7,-25,20,-118,"); add(""); //add("/*420*/"); add("5,1,-4180,-7285,-28800,"); add("-96,6,12,12,67,-18,173,35,-34,-21,-79,23,"); add(""); //add("/*421*/"); add("4,1,21812,-2819,-20403,"); add("43,-216,77,-30,61,-41,-39,132,-60,"); add(""); //add("/*422*/"); add("4,1,-6475,29293,-129,"); add("-137,-31,54,34,8,102,130,29,-57,"); add(""); //add("/*423*/"); add("4,1,-9851,-28219,2574,"); add("-20,18,125,-123,38,-61,54,-29,-113,"); add(""); //add("/*424*/"); add("4,1,6163,-10670,-27353,"); add("84,30,8,-8,-122,46,-130,-35,-16,"); add(""); //add("/*425*/"); add("5,1,24033,10600,14493,"); add("-1,-61,47,-4,-116,90,29,-16,-37,-1,119,-84,"); add(""); //add("/*426*/"); add("4,1,-10404,28061,2080,"); add("-168,-58,-65,15,0,83,149,52,44,"); add(""); //add("/*427*/"); add("4,-1,-6287,25435,-14613,"); add("-175,-65,-37,-33,20,50,109,54,46,"); add(""); //add("/*428*/"); add("4,1,3313,24533,16946,"); add("72,-54,64,137,8,-41,-83,49,-52,"); add(""); //add("/*429*/"); add("5,1,-17749,22168,9672,"); add("-55,-22,-51,-134,-84,-55,35,14,33,110,69,45,"); add(""); //add("/*430*/"); add("4,1,-24211,14614,-10014,"); add("-45,-101,-37,-61,-44,84,77,151,33,"); add(""); //add("/*431*/"); add("5,1,6168,20534,20984,"); add("78,-19,-5,155,-9,-37,-14,11,-7,-148,19,25,"); add(""); //add("/*432*/"); add("4,1,25249,3517,-15816,"); add("54,-55,75,-32,-104,-73,-61,98,-77,"); add(""); //add("/*433*/"); add("5,1,24510,6812,-15901,"); add("-3,-70,-35,-47,-99,-113,-7,16,-4,32,110,94,"); add(""); //add("/*434*/"); add("4,1,8900,28579,2013,"); add("-28,18,-145,-98,29,17,48,-23,129,"); add(""); //add("/*435*/"); add("4,1,-19110,-22514,5287,"); add("-134,112,-16,34,-47,-73,77,-68,-7,"); add(""); //add("/*436*/"); add("4,1,-26431,12476,6763,"); add("-53,-173,112,21,25,32,28,120,-106,"); add(""); //add("/*437*/"); add("4,1,-6923,29146,-1603,"); add("-11,-10,-135,-86,-21,-1,12,12,153,"); add(""); //add("/*438*/"); add("4,1,-7322,29032,-1885,"); add("-93,-29,-71,-84,-16,84,116,34,54,"); add(""); //add("/*439*/"); add("4,1,3874,29626,2697,"); add("158,-14,-71,-62,11,-39,-140,12,75,"); add(""); //add("/*440*/"); add("5,-1,-20399,-10562,19296,"); add("-47,54,-21,-103,82,-64,4,-32,-13,72,-61,43,"); add(""); //add("/*441*/"); add("4,1,-12040,-26645,6714,"); add("91,-7,132,-57,34,35,-79,-3,-151,"); add(""); //add("/*442*/"); add("4,1,-8141,28851,-1154,"); add("-44,-19,-149,-67,-18,19,46,19,149,"); add(""); //add("/*443*/"); add("4,1,-26611,11542,7659,"); add("-88,-157,-73,26,23,58,70,125,54,"); add(""); //add("/*444*/"); add("4,1,-25420,7629,13987,"); add("24,-119,108,39,84,24,-21,80,-81,"); add(""); //add("/*445*/"); add("4,1,-361,26098,14791,"); add("-10,-64,111,54,-28,50,26,82,-142,"); add(""); //add("/*446*/"); add("4,1,-10298,18382,21356,"); add("130,-27,85,49,46,-16,-147,13,-81,"); add(""); //add("/*447*/"); add("4,1,-6714,29188,-1727,"); add("-94,-24,-29,-73,-10,108,114,26,-7,"); add(""); //add("/*448*/"); add("4,1,-14486,-9145,-24628,"); add("-107,-23,72,0,72,-27,104,40,-76,"); add(""); //add("/*449*/"); add("3,1,-12116,27417,1220,"); add("-145,-70,134,73,33,-17,"); add(""); //add("/*450*/"); add("4,1,12149,-27337,-2254,"); add("-8,3,-82,91,46,-59,-14,-19,153,"); add(""); //add("/*451*/"); add("3,1,4304,29609,2188,"); add("-48,20,-185,-38,-3,124,"); add(""); //add("/*452*/"); add("4,1,-12276,24972,-11211,"); add("-4,-43,-90,-130,-57,15,74,60,50,"); add(""); //add("/*453*/"); add("4,1,3993,24360,17048,"); add("106,2,-27,-55,80,-102,-56,-28,53,"); add(""); //add("/*454*/"); add("4,1,4361,29555,2736,"); add("-38,14,-91,-116,16,2,75,-20,101,"); add(""); //add("/*455*/"); add("4,1,-18479,-23127,4866,"); add("-52,67,118,-61,35,-66,59,-62,-71,"); add(""); //add("/*456*/"); add("4,-1,2259,21690,20602,"); add("163,40,-61,-51,30,-26,-119,-48,64,"); add(""); //add("/*457*/"); add("4,1,20331,14288,-16807,"); add("113,-62,84,2,-51,-41,-116,87,-67,"); add(""); //add("/*458*/"); add("4,1,-16786,-24244,5517,"); add("-13,-14,-98,115,-77,10,-36,41,70,"); add(""); //add("/*459*/"); add("4,1,-1657,25010,16486,"); add("-107,31,-59,-27,-59,86,106,-9,25,"); add(""); //add("/*460*/"); add("4,1,-1331,-20857,-21523,"); add("-32,87,-81,12,31,-31,94,-42,35,"); add(""); //add("/*461*/"); add("3,1,-26552,5728,12735,"); add("86,-10,182,-41,30,-98,"); add(""); //add("/*462*/"); add("3,1,-11118,27856,637,"); add("-170,-68,5,82,32,63,"); add(""); //add("/*463*/"); add("4,1,2831,-28218,9783,"); add("42,27,67,-99,15,70,-19,-40,-108,"); add(""); //add("/*464*/"); add("3,1,23950,2362,-17911,"); add("20,-179,4,-44,82,-49,"); add(""); //add("/*465*/"); add("3,1,29304,688,-6390,"); add("3,-151,3,-18,18,-82,"); add(""); //add("/*466*/"); add("3,1,-9197,-28136,4878,"); add("-159,68,85,75,-37,-64,"); add(""); //add("/*467*/"); add("4,1,-10259,28140,1705,"); add("-56,-25,63,62,17,101,34,17,-76,"); add(""); //add("/*468*/"); add("3,1,29280,766,-6487,"); add("34,42,158,-23,-96,-116,"); add(""); //add("/*469*/"); add("4,1,6865,26520,12229,"); add("-38,-15,54,43,-56,96,50,31,-93,"); add(""); //add("/*470*/"); add("3,1,13499,-19327,-18554,"); add("45,135,-107,13,-80,93,"); add(""); //add("/*471*/"); add("3,-1,16732,5918,24187,"); add("-123,131,53,50,-84,-14,"); add(""); //add("/*472*/"); add("3,1,13670,-4696,-26288,"); add("-146,-71,-63,60,85,15,"); add(""); //add("/*473*/"); add("3,1,2313,23926,-17950,"); add("-161,-16,-41,80,47,72,"); add(""); //add("/*474*/"); add("3,1,3781,28274,9290,"); add("93,34,-146,-91,-6,58,"); add(""); //add("/*475*/"); add("3,1,25584,3122,-15352,"); add("-85,-26,-147,17,59,39,"); add(""); //add("/*476*/"); add("3,1,29702,3744,-1936,"); add("17,-153,-35,-15,89,-55,"); add(""); //add("/*477*/"); add("3,1,24789,6574,-15566,"); add("65,-169,34,-52,102,-40,"); add(""); //add("/*478*/"); add("3,-1,-29247,6430,1802,"); add("-11,-85,122,17,72,23,"); add(""); //add("/*479*/"); add("3,1,-6095,14636,25468,"); add("-135,-95,22,97,7,20,"); add(""); //add("/*480*/"); add("3,1,-10821,10826,-25801,"); add("-167,-23,61,65,41,-11,"); add(""); //add("/*481*/"); add("3,1,29023,590,-7570,"); add("34,-5,129,-19,-95,-79,"); add(""); //add("/*482*/"); add("3,1,23976,5439,-17192,"); add("39,-177,-1,-33,87,-18,"); add(""); //add("/*483*/"); add("4,1,5247,29038,-5412,"); add("-99,36,100,26,0,28,97,-32,-81,"); add(""); //add("/*484*/"); add("4,1,-18202,-23335,4919,"); add("15,5,73,-62,62,68,2,-22,-100,"); add(""); //add("/*485*/"); add("3,1,5756,-9056,-28015,"); add("57,-84,39,-130,-10,-23,"); add(""); //add("/*486*/"); add("3,1,-11472,-27071,5962,"); add("-89,67,132,14,-25,-86,"); add(""); //add("/*487*/"); add("3,1,-12893,26395,6088,"); add("-47,3,-113,-50,-50,112,"); add(""); //add("/*488*/"); add("3,1,5886,-8242,-28239,"); add("26,166,-42,24,-67,24,"); add(""); //add("/*489*/"); add("4,1,8245,18657,21999,"); add("-25,-59,59,73,-66,28,2,70,-60,"); add(""); //add("/*490*/"); add("3,1,5232,21275,20494,"); add("58,-123,112,-13,69,-68,"); add(""); //add("/*491*/"); add("4,1,-16253,-24546,5776,"); add("-9,-21,-120,76,-43,33,-12,23,62,"); add(""); //add("/*492*/"); add("3,-1,9502,25942,11694,"); add("165,-65,8,-75,35,-15,"); add(""); //add("/*493*/"); add("3,1,-12159,27406,1045,"); add("-141,-66,59,88,39,12,"); add(""); //add("/*494*/"); add("3,1,5425,21100,20624,"); add("135,-94,60,-70,58,-40,"); add(""); //add("/*495*/"); add("3,-1,3389,22127,19973,"); add("-144,69,-53,28,-42,42,"); add(""); //add("/*496*/"); add("3,1,-29998,-271,-211,"); add("1,-103,-27,-1,44,124,"); add(""); //add("/*497*/"); add("3,1,-6646,3953,28986,"); add("154,-35,40,-66,64,-23,"); add(""); //add("/*498*/"); add("3,1,17776,-4397,-23763,"); add("-125,-94,-76,59,61,33,"); add(""); //add("/*499*/"); add("3,1,15919,-2901,-25262,"); add("-86,-113,-41,2,103,-10,"); add(""); //add("/*500*/"); add("3,1,10276,18702,21087,"); add("34,-115,84,49,48,-65,"); add(""); //add("/*501*/"); add("3,1,-27182,9729,8156,"); add("24,-63,152,0,71,-83,"); add(""); //add("/*502*/"); add("3,1,-5062,29557,-877,"); add("-151,-26,15,102,19,47,"); add(""); //add("/*503*/"); add("3,1,5323,-9639,-27906,"); add("94,-7,20,-115,-91,10,"); add(""); //add("/*504*/"); add("3,1,9566,21962,-18060,"); add("80,-60,-30,-146,87,28,"); add(""); //add("/*505*/"); add("3,1,7782,19198,21700,"); add("98,-114,65,-23,74,-57,"); add(""); //add("/*506*/"); add("3,1,-25374,8277,13699,"); add("37,132,-12,-48,-43,-63,"); add(""); //add("/*507*/"); add("3,1,-21077,21320,1096,"); add("-106,-101,-82,53,50,70,"); add(""); //add("/*508*/"); add("3,1,24281,-1036,-17589,"); add("-21,-166,-18,-1,96,-8,"); add(""); //add("/*509*/"); add("3,1,-22788,37,19512,"); add("-85,-52,-100,83,-20,97,"); add(""); //add("/*510*/"); add("3,1,5240,28832,-6422,"); add("-69,36,103,119,-31,-39,"); add(""); //add("/*511*/"); add("3,1,-7468,-28825,-3652,"); add("127,-23,-73,-26,-5,83,"); add(""); //add("/*512*/"); add("3,1,24788,6981,-15389,"); add("-28,-91,-85,-27,111,6,"); add(""); //add("/*513*/"); add("3,1,-23208,-6,19010,"); add("-80,-82,-98,74,14,91,"); add(""); //add("/*514*/"); add("3,1,-2403,29024,7200,"); add("6,-38,153,37,26,-90,"); add(""); //add("/*515*/"); add("3,1,-8354,27070,9869,"); add("31,63,-147,-39,-31,53,"); add(""); //add("/*516*/"); add("3,1,25819,2792,-15019,"); add("68,-90,100,-56,16,-93,"); add(""); //add("/*517*/"); add("3,1,-13037,26839,3117,"); add("36,33,-139,-71,-42,72,"); add(""); //add("/*518*/"); add("3,1,19424,15377,-16920,"); add("93,-132,-12,-64,64,-15,"); add(""); //add("/*519*/"); add("3,1,25368,-2667,-15790,"); add("-16,-138,-3,-25,82,-54,"); add(""); //add("/*520*/"); add("3,1,-27385,6432,10424,"); add("17,-117,116,-6,67,-55,"); add(""); //add("/*521*/"); add("3,1,-16689,-24298,5573,"); add("100,-55,59,-44,42,51,"); add(""); //add("/*522*/"); add("3,1,7818,28361,5876,"); add("-144,51,-56,68,-29,50,"); add(""); //add("/*523*/"); add("3,1,-1083,23630,-18452,"); add("50,-78,-102,-92,30,44,"); add(""); //add("/*524*/"); add("3,1,25414,6393,-14604,"); add("-41,-106,-116,11,70,48,"); add(""); //add("/*525*/"); add("3,1,-11631,906,-27639,"); add("120,91,-47,-49,-80,18,"); add(""); //add("/*526*/"); add("3,1,3474,212,29797,"); add("-59,-123,8,98,50,-12,"); add(""); //add("/*527*/"); add("3,1,2829,27930,10580,"); add("17,48,-134,-69,-20,73,"); add(""); //add("/*528*/"); add("3,1,-18229,-23261,5161,"); add("-120,85,-43,79,-65,-12,"); add(""); //add("/*529*/"); add("3,1,1852,23822,18140,"); add("-125,-44,70,101,2,-12,"); add(""); //add("/*530*/"); add("3,1,17469,17022,-17466,"); add("116,-106,12,-62,33,-30,"); add(""); //add("/*531*/"); add("3,1,-13668,26130,5512,"); add("-117,-58,-16,61,16,79,"); add(""); //add("/*532*/"); add("3,1,-16825,22385,-10761,"); add("-69,-60,-18,116,107,41,"); add(""); //add("/*533*/"); add("3,1,-17801,-23670,4779,"); add("-107,95,71,39,-40,-52,"); add(""); //add("/*534*/"); add("3,-1,-16972,24643,-2166,"); add("-50,-47,-138,-6,3,78,"); add(""); //add("/*535*/"); add("3,1,-29510,-1408,5213,"); add("-15,-102,-117,12,23,79,"); add(""); //add("/*536*/"); add("3,1,-8023,14394,25068,"); add("-68,34,-40,15,-116,71,"); add(""); //add("/*537*/"); add("3,1,18663,8080,22054,"); add("-75,93,30,-31,-36,39,"); add(""); //add("/*538*/"); add("3,1,20234,-5953,-21335,"); add("-49,130,-81,31,-57,45,"); add(""); //add("/*539*/"); add("3,1,9465,-4873,-28048,"); add("-62,-145,5,10,86,-12,"); add(""); //add("/*540*/"); add("3,1,11849,-3988,-27271,"); add("-79,-106,-18,-3,100,-16,"); add(""); //add("/*541*/"); add("3,1,19173,8661,21387,"); add("61,-39,-39,-116,87,69,"); add(""); //add("/*542*/"); add("3,1,-25383,8079,13799,"); add("-8,-129,61,32,94,5,"); add(""); //add("/*543*/"); add("3,1,-947,23612,-18482,"); add("119,-50,-69,-79,-3,0,"); add(""); //add("/*544*/"); add("3,1,-20303,-21276,5923,"); add("-76,41,-110,64,-56,18,"); add(""); //add("/*545*/"); add("3,1,-3266,29707,2611,"); add("37,16,-138,-65,-11,47,"); add(""); //add("/*546*/"); add("3,1,29437,5643,-1268,"); add("24,-114,44,-6,9,-82,"); add(""); //add("/*547*/"); add("3,1,5941,-8348,-28196,"); add("33,-77,30,-118,6,-27,"); add(""); //add("/*548*/"); add("3,1,8674,28665,1747,"); add("63,-15,-64,-102,33,-41,"); add(""); //add("/*549*/"); add("3,1,12119,-27290,-2892,"); add("132,54,46,-68,-33,16,"); add(""); //add("/*550*/"); add("3,1,16774,7079,-23844,"); add("82,-124,22,-73,54,-36,"); add(""); //add("/*551*/"); add("3,1,20757,13260,17126,"); add("63,-128,22,-13,88,-51,"); add(""); //add("/*552*/"); add("3,1,-23106,319,19132,"); add("-14,-153,-16,23,75,27,"); add(""); //add("/*553*/"); add("3,1,28708,8390,-2334,"); add("41,-117,87,-18,41,-74,"); add(""); //add("/*554*/"); add("3,-1,-17143,22854,-9157,"); add("-56,-49,-15,111,102,47,"); add(""); //add("/*555*/"); add("3,1,24593,-4420,-16602,"); add("-58,81,-108,42,-1,63,"); add(""); //add("/*556*/"); add("3,1,-5670,29343,-2618,"); add("-124,-24,0,70,19,69,"); add(""); //add("/*557*/"); add("3,1,29384,4265,-4286,"); add("19,-142,-11,-16,73,-41,"); add(""); //add("/*558*/"); add("3,-1,-26493,13413,-4266,"); add("73,129,-48,-41,-79,9,"); add(""); //add("/*559*/"); add("3,1,-12215,8751,25965,"); add("50,90,-6,-110,-43,-38,"); add(""); //add("/*560*/"); add("3,1,942,-9821,-28331,"); add("-127,40,-18,18,36,-12,"); add(""); //add("/*561*/"); add("3,1,5791,-10962,-27318,"); add("72,-41,31,-101,-56,1,"); add(""); //add("/*562*/"); add("3,1,-16110,-24557,6118,"); add("-55,1,-140,52,-15,77,"); add(""); //add("/*563*/"); add("3,1,24603,7780,-15303,"); add("19,-130,-35,-41,81,-25,"); add(""); //add("/*564*/"); add("3,1,-11587,7787,26554,"); add("-77,78,-57,3,-100,31,"); add(""); //add("/*565*/"); add("3,-1,-16566,24953,-1701,"); add("-34,-32,-139,-15,-5,72,"); add(""); //add("/*566*/"); add("3,1,-10538,27951,2769,"); add("-113,-50,71,82,32,-2,"); add(""); //add("/*567*/"); add("3,1,-26227,14265,-2946,"); add("-29,-81,-126,8,32,76,"); add(""); //add("/*568*/"); add("3,1,-29996,-410,275,"); add("1,-64,-4,0,96,102,"); add(""); //add("/*569*/"); add("3,1,-1328,24397,17407,"); add("-88,-68,88,79,22,-24,"); add(""); //add("/*570*/"); add("3,1,28640,5411,-7103,"); add("16,-124,-30,-25,81,-41,"); add(""); //add("/*571*/"); add("3,1,2879,27986,10415,"); add("44,45,-133,-48,-14,52,"); add(""); //add("/*572*/"); add("3,1,-10402,-26170,10341,"); add("-140,40,-40,64,-24,4,"); add(""); //add("/*573*/"); add("3,1,-10281,28087,2329,"); add("-106,-42,34,78,24,50,"); add(""); //add("/*574*/"); add("3,1,2742,27846,10820,"); add("85,35,-111,-70,-7,34,"); add(""); //add("/*575*/"); add("3,1,-3438,-29243,-5748,"); add("43,20,-125,29,-18,76,"); add(""); //add("/*576*/"); add("3,1,-26723,12841,4584,"); add("-66,-110,-80,29,43,47,"); add(""); //add("/*577*/"); add("3,1,-1401,24087,17828,"); add("-1,-60,81,89,26,-28,"); add(""); //add("/*578*/"); add("3,1,5935,-7944,-28314,"); add("15,145,-37,11,-47,15,"); add(""); //add("/*579*/"); add("3,1,22691,-404,-19620,"); add("90,-40,105,-74,0,-86,"); add(""); //add("/*580*/"); add("3,1,-615,23609,-18500,"); add("-27,-62,-78,-73,25,34,"); add(""); //add("/*581*/"); add("3,1,-7610,27327,9765,"); add("86,9,39,11,34,-85,"); add(""); //add("/*582*/"); add("3,1,3275,28106,9967,"); add("66,34,-120,-66,-8,46,"); add(""); //add("/*583*/"); add("3,1,-1798,26125,-14637,"); add("-125,-47,-69,60,25,37,"); add(""); //add("/*584*/"); add("3,1,3404,28154,9786,"); add("16,34,-104,-83,-3,38,"); add(""); //add("/*585*/"); add("3,1,-19236,-22431,5182,"); add("-95,81,-4,41,-48,-59,"); add(""); //add("/*586*/"); add("3,1,16386,-1104,25106,"); add("-73,82,50,-24,-52,14,"); add(""); //add("/*587*/"); add("3,1,19553,-4260,-22350,"); add("63,-51,65,-69,-44,-52,"); add(""); //add("/*588*/"); add("3,1,-22905,18425,5990,"); add("96,104,47,-33,-35,-18,"); add(""); //add("/*589*/"); add("3,1,-12241,25010,-11164,"); add("-117,-70,-28,42,42,46,"); add(""); //add("/*590*/"); add("3,1,-6089,-28902,-5253,"); add("34,14,-117,43,-22,71,"); add(""); //add("/*591*/"); add("3,1,14736,-4824,-25682,"); add("-43,-106,-5,-40,63,-34,"); add(""); //add("/*592*/"); add("3,1,19044,17073,-15679,"); add("94,-108,-3,-64,54,-19,"); add(""); //add("/*593*/"); add("3,1,-16277,25021,3001,"); add("-102,-58,-78,32,15,59,"); add(""); //add("/*594*/"); add("3,1,3248,24619,16833,"); add("-38,-76,118,31,32,-52,"); add(""); //add("/*595*/"); add("3,1,-19337,-22287,5420,"); add("18,15,122,-54,25,-89,"); add(""); //add("/*596*/"); add("3,1,3510,24558,16869,"); add("47,-68,89,36,36,-59,"); add(""); //add("/*597*/"); add("3,1,-6842,29209,-35,"); add("-123,-29,15,65,16,45,"); add(""); //add("/*598*/"); add("3,1,-15937,22907,-11013,"); add("-119,-62,44,55,39,1,"); add(""); //add("/*599*/"); add("3,1,27779,11315,-526,"); add("-49,121,-23,9,-22,44,"); add(""); //add("/*600*/"); add("3,1,-12034,25103,-11183,"); add("-63,-58,-60,-41,5,55,"); add(""); //add("/*601*/"); add("3,1,11603,-4113,-27358,"); add("-14,-103,10,-64,53,-35,"); add(""); //add("/*602*/"); add("3,1,12813,-2626,-26999,"); add("-4,-132,12,-36,71,-25,"); add(""); //add("/*603*/"); add("3,1,-25308,8431,13728,"); add("38,-43,95,1,89,-52,"); add(""); //add("/*604*/"); add("3,1,-25475,7114,14157,"); add("31,120,-5,-42,-62,-45,"); add(""); //add("/*605*/"); add("3,1,13199,-12085,-24077,"); add("70,108,-16,5,-60,32,"); add(""); //add("/*606*/"); add("3,1,-14219,23894,-11265,"); add("-85,-85,-73,26,40,52,"); add(""); //add("/*607*/"); add("3,1,4551,-23163,-18514,"); add("29,-77,104,-49,25,-44,"); add(""); //add("/*608*/"); add("3,1,5199,-9999,-27803,"); add("75,10,11,-79,-92,18,"); add(""); //add("/*609*/"); add("3,1,-3465,-29255,-5667,"); add("-50,-13,95,-26,22,-95,"); add(""); //add("/*610*/"); add("3,1,20448,-6320,21022,"); add("74,-52,-87,-11,63,29,"); add(""); //add("/*611*/"); add("3,1,-11210,-27380,4968,"); add("-67,47,106,7,-15,-70,"); add(""); //add("/*612*/"); add("3,1,-7114,29104,-1523,"); add("-31,-14,-125,-26,-3,61,"); add(""); //add("/*613*/"); add("3,1,11126,17559,21631,"); add("8,-111,86,4,44,-38,"); add(""); //add("/*614*/"); add("3,-1,-17516,22482,-9368,"); add("-37,-44,-36,77,91,75,"); add(""); //add("/*615*/"); add("3,1,23571,-1939,-18457,"); add("-68,34,-90,37,41,43,"); add(""); //add("/*616*/"); add("3,1,-6394,-28910,-4832,"); add("-27,25,-112,68,-24,51,"); add(""); //add("/*617*/"); add("3,1,5794,26057,13692,"); add("-56,-45,108,58,8,-38,"); add(""); //add("/*618*/"); add("3,1,-23934,17129,5813,"); add("-32,-36,-30,79,85,78,"); add(""); //add("/*619*/"); add("3,1,-23357,-76,18827,"); add("-56,-97,-71,41,25,52,"); add(""); //add("/*620*/"); add("3,1,7231,-5628,-28566,"); add("-117,22,-34,64,34,9,"); add(""); //add("/*621*/"); add("3,-1,8011,-2165,28829,"); add("-86,-20,23,42,-72,-17,"); add(""); //add("/*622*/"); add("3,1,-17637,-23714,5158,"); add("-108,70,-51,50,-34,13,"); add(""); //add("/*623*/"); add("3,1,21913,-8820,18494,"); add("66,118,-23,-34,-46,20,"); add(""); //add("/*624*/"); add("3,1,9869,19293,20746,"); add("-85,-38,75,55,-24,-4,"); add(""); //add("/*625*/"); add("3,1,22899,-4077,-18947,"); add("-26,-86,-13,-37,52,-57,"); add(""); //add("/*626*/"); add("3,1,-14038,23901,-11476,"); add("-107,-72,-17,35,39,38,"); add(""); //add("/*627*/"); add("3,1,4353,24653,16531,"); add("69,-61,72,12,41,-63,"); add(""); //add("/*628*/"); add("3,1,-18051,-23470,4832,"); add("-30,48,118,-10,-6,-67,"); add(""); //add("/*629*/"); add("3,1,28220,10019,-1806,"); add("23,-82,-83,-25,72,3,"); add(""); //add("/*630*/"); add("3,1,-20490,-21140,5764,"); add("-5,32,100,-44,19,-85,"); add(""); //add("/*631*/"); add("3,1,3983,28240,9309,"); add("12,35,-113,-52,-6,40,"); add(""); //add("/*632*/"); add("3,1,-18699,-22936,4930,"); add("-91,67,-33,37,-37,-36,"); add(""); //add("/*633*/"); add("3,1,627,18932,23264,"); add("-84,-62,52,85,7,-8,"); add(""); //add("/*634*/"); add("3,1,19354,14991,17340,"); add("50,-98,28,14,46,-55,"); add(""); //add("/*635*/"); add("3,1,-28747,8411,1693,"); add("22,50,121,-5,-4,-59,"); add(""); //add("/*636*/"); add("3,1,-8901,26791,10151,"); add("-2,39,-105,-41,-14,0,"); add(""); //add("/*637*/"); add("3,1,-1847,24835,16728,"); add("-27,-53,75,84,19,-19,"); add(""); //add("/*638*/"); add("3,1,-10396,25971,10836,"); add("84,12,51,-45,21,-93,"); add(""); //add("/*639*/"); add("3,1,-1746,26561,13836,"); add("46,-54,110,4,27,-50,"); add(""); //add("/*640*/"); add("3,-1,-16548,24985,-1391,"); add("30,12,-123,-40,-23,44,"); add(""); //add("/*641*/"); add("3,1,-23092,1143,19117,"); add("-29,-97,-30,49,20,58,"); add(""); //add("/*642*/"); add("3,-1,-9616,27575,-6867,"); add("-86,-18,48,81,35,28,"); add(""); //add("/*643*/"); add("3,1,37,-8773,-28689,"); add("-83,89,-27,70,-24,8,"); add(""); //add("/*644*/"); add("3,1,-5877,24660,-16042,"); add("29,-63,-107,-41,19,43,"); add(""); //add("/*645*/"); add("3,1,-7063,29124,1383,"); add("-106,-24,-46,12,1,50,"); add(""); //add("/*646*/"); add("3,1,9491,-28294,3062,"); add("88,35,49,-28,-5,40,"); add(""); //add("/*647*/"); add("3,1,-10563,28011,-1955,"); add("-92,-37,-31,2,5,62,"); add(""); //add("/*648*/"); add("3,1,-23006,339,19251,"); add("-51,-80,-59,52,6,61,"); add(""); //add("/*649*/"); add("3,-1,24368,17193,-3258,"); add("40,-67,-52,-54,71,-25,"); add(""); //add("/*650*/"); add("3,1,-8017,28176,6466,"); add("-87,-36,52,72,15,24,"); add(""); //add("/*651*/"); add("3,1,-26550,11424,8038,"); add("29,-20,121,-1,36,-53,"); add(""); //add("/*652*/"); add("3,1,28996,6412,-4254,"); add("-29,112,-31,13,-29,48,"); add(""); //add("/*653*/"); add("3,1,-11839,8554,26204,"); add("61,27,19,-107,18,-54,"); add(""); //add("/*654*/"); add("3,1,-20098,-21617,5362,"); add("-31,53,101,-18,2,-58,"); add(""); //add("/*655*/"); add("3,1,21155,4033,-20886,"); add("40,-117,19,-35,34,-29,"); add(""); //add("/*656*/"); add("3,1,5515,20897,20806,"); add("103,-68,41,-37,35,-25,"); add(""); //add("/*657*/"); add("3,1,-29988,-222,-832,"); add("-2,50,61,3,22,-100,"); add(""); //add("/*658*/"); add("3,1,5034,26084,13938,"); add("21,-49,84,54,10,-38,"); add(""); //add("/*659*/"); add("3,1,1691,19298,22907,"); add("-89,3,4,81,-54,40,"); add(""); //add("/*660*/"); add("3,1,2119,26865,13182,"); add("-116,-3,25,58,-16,24,"); add(""); //add("/*661*/"); add("3,1,10789,18377,21116,"); add("-103,-6,58,62,-29,-7,"); add(""); //add("/*662*/"); add("3,1,-11870,-26301,8207,"); add("27,19,101,-65,14,-51,"); add(""); //add("/*663*/"); add("3,1,-18344,-23246,4807,"); add("-84,74,38,27,-34,-58,"); add(""); //add("/*664*/"); add("3,1,-11295,25251,-11610,"); add("-65,-58,-63,-15,21,60,"); add(""); //add("/*665*/"); add("3,1,6300,20443,21033,"); add("123,-14,-23,-36,19,-8,"); add(""); //add("/*666*/"); add("3,1,29102,725,-7249,"); add("27,3,111,-11,-45,-52,"); add(""); //add("/*667*/"); add("3,1,-29997,-152,-412,"); add("-1,22,82,1,52,-85,"); add(""); //add("/*668*/"); add("3,1,-28040,10545,1595,"); add("-32,-71,-94,4,4,55,"); add(""); //add("/*669*/"); add("3,1,11026,18001,21316,"); add("-97,-31,76,47,1,-24,"); add(""); //add("/*670*/"); add("3,1,24332,1794,-17457,"); add("32,101,56,1,-69,-6,"); add(""); //add("/*671*/"); add("3,1,4781,16690,24466,"); add("-96,20,5,32,-59,34,"); add(""); //add("/*672*/"); add("3,1,21656,-5891,-19908,"); add("21,116,-11,16,-38,28,"); add(""); //add("/*673*/"); add("3,1,-19012,-22658,5013,"); add("-83,57,-54,41,-38,-15,"); add(""); //add("/*674*/"); add("3,-1,-25345,15903,2173,"); add("-67,-106,-3,15,21,14,"); add(""); //add("/*675*/"); add("3,1,22404,-4219,-19500,"); add("44,-78,68,-52,23,-66,"); add(""); //add("/*676*/"); add("3,1,-10163,28146,2130,"); add("-89,-29,-52,21,3,69,"); add(""); //add("/*677*/"); add("3,1,-725,25703,15454,"); add("-107,19,-37,23,-25,44,"); add(""); //add("/*678*/"); add("3,1,25446,6214,-14625,"); add("2,-95,-36,-28,38,-33,"); add(""); //add("/*679*/"); add("3,1,-18014,-23519,4728,"); add("-68,67,75,12,-18,-46,"); add(""); //add("/*680*/"); add("3,1,8350,18419,22159,"); add("86,-67,23,-8,45,-34,"); add(""); //add("/*681*/"); add("3,1,-16265,24998,3250,"); add("-89,-55,-27,11,2,45,"); add(""); //add("/*682*/"); add("3,1,-29435,3954,4235,"); add("-7,-102,43,10,58,20,"); add(""); //add("/*683*/"); add("3,1,14345,-4396,-25979,"); add("-2,-120,20,-17,45,-17,"); add(""); //add("/*684*/"); add("3,1,-20159,-21497,5615,"); add("-47,63,68,-11,-7,-64,"); add(""); //add("/*685*/"); add("3,1,17291,-23956,5209,"); add("-23,-40,-109,33,32,41,"); add(""); //add("/*686*/"); add("3,1,6171,20591,20926,"); add("108,-24,-8,-25,33,-25,"); add(""); //add("/*687*/"); add("3,1,-8736,-28700,-52,"); add("-34,11,92,-38,11,-52,"); add(""); //add("/*688*/"); add("3,1,-5134,25663,-14664,"); add("63,-34,-82,-50,-7,5,"); add(""); //add("/*689*/"); add("3,1,23474,-4238,-18194,"); add("-71,-46,-80,21,43,16,"); add(""); //add("/*690*/"); add("3,1,-12945,26676,4562,"); add("4,17,-91,-51,-38,80,"); add(""); //add("/*691*/"); add("3,1,11880,-13958,-23749,"); add("-2,99,-60,27,-28,31,"); add(""); //add("/*692*/"); add("3,1,9893,18457,21482,"); add("67,-72,30,17,31,-34,"); add(""); //add("/*693*/"); add("3,1,-14530,23658,-11366,"); add("-35,-60,-80,-23,11,53,"); add(""); //add("/*694*/"); add("3,1,-17616,-23753,5046,"); add("-93,61,-37,33,-27,-10,"); add(""); //add("/*695*/"); add("3,1,25086,-5507,-15503,"); add("-51,11,-86,23,44,21,"); add(""); //add("/*696*/"); add("3,1,-15610,-24492,7515,"); add("-12,-16,-78,52,-2,101,"); add(""); //add("/*697*/"); add("3,1,-15472,22928,-11615,"); add("-58,-51,-24,-15,24,68,"); add(""); //add("/*698*/"); add("3,1,-12165,24913,-11461,"); add("34,-28,-96,-48,-12,24,"); add(""); //add("/*699*/"); add("3,1,5310,21296,20452,"); add("21,-66,64,46,12,-25,"); add(""); //add("/*700*/"); add("3,-1,17800,23716,-4555,"); add("58,-61,-85,-31,27,21,"); add(""); //add("/*701*/"); add("3,1,18987,-4163,22851,"); add("56,89,-31,-54,-31,40,"); add(""); //add("/*702*/"); add("3,1,-13833,24181,-11133,"); add("4,-47,-107,-21,7,43,"); add(""); //add("/*703*/"); add("3,1,6651,29245,-700,"); add("50,-11,4,-96,20,-60,"); add(""); //add("/*704*/"); add("3,1,-25607,5901,14473,"); add("-58,-52,-82,27,-3,49,"); add(""); //add("/*705*/"); add("3,1,-19397,-22308,5108,"); add("1,25,114,-14,3,-42,"); add(""); //add("/*706*/"); add("3,1,-23259,-297,18946,"); add("-53,-60,-67,39,-10,48,"); add(""); //add("/*707*/"); add("3,1,-13405,24297,-11400,"); add("11,-34,-86,-50,-16,26,"); add(""); //add("/*708*/"); add("3,1,25842,-4398,-14590,"); add("-3,-99,25,-21,27,-45,"); add(""); //add("/*709*/"); add("3,1,-25303,12454,-10231,"); add("-57,-52,78,24,41,-8,"); add(""); //add("/*710*/"); add("3,1,-8255,26088,-12300,"); add("82,-6,-67,-56,-15,5,"); add(""); //add("/*711*/"); add("3,1,6152,-8008,-28249,"); add("-89,40,-31,63,17,9,"); add(""); //add("/*712*/"); add("3,1,-25934,14888,2405,"); add("-36,-47,-101,8,8,37,"); add(""); //add("/*713*/"); add("3,1,-6774,29199,-1229,"); add("-15,-8,-109,-22,-3,41,"); add(""); //add("/*714*/"); add("3,1,-1560,24786,16830,"); add("-10,-53,77,53,17,-21,"); add(""); //add("/*715*/"); add("3,-1,-21338,21065,-960,"); add("-45,-41,97,19,19,-19,"); add(""); //add("/*716*/"); add("3,1,-5625,24695,-16078,"); add("11,-41,-67,-64,-5,15,"); add(""); //add("/*717*/"); add("3,1,-26663,12045,6635,"); add("-9,-70,90,11,38,-27,"); add(""); //add("/*718*/"); add("3,1,-27183,11286,5804,"); add("-3,-54,92,15,44,-17,"); add(""); //add("/*719*/"); add("3,1,-20085,-21491,5891,"); add("-63,66,28,2,-16,-51,"); add(""); //add("/*720*/"); add("3,1,11920,-13784,-23831,"); add("22,98,-45,15,-28,23,"); add(""); //add("/*721*/"); add("3,1,-19179,-22536,4928,"); add("-34,47,83,-13,-1,-57,"); add(""); //add("/*722*/"); add("3,1,-355,23212,19002,"); add("-92,11,-15,20,-33,40,"); add(""); //add("/*723*/"); add("3,1,10541,18339,21273,"); add("-78,-33,68,42,-8,-15,"); add(""); //add("/*724*/"); add("3,1,-14382,25139,7820,"); add("-90,-56,16,38,15,21,"); add(""); //add("/*725*/"); add("3,1,-17775,-23685,4805,"); add("-61,60,70,10,-16,-41,"); add(""); //add("/*726*/"); add("3,1,15192,-711,-25859,"); add("-36,-88,-18,-22,47,-15,"); add(""); //add("/*727*/"); add("3,1,-25173,6788,14841,"); add("3,81,-33,-30,-45,-31,"); add(""); //add("/*728*/"); add("3,1,23886,-136,-18151,"); add("33,-60,45,-38,-20,-50,"); add(""); //add("/*729*/"); add("3,1,-17001,21978,11312,"); add("-63,-71,42,24,10,16,"); add(""); //add("/*730*/"); add("3,1,11428,-4389,-27389,"); add("22,-99,25,-34,23,-17,"); add(""); //add("/*731*/"); add("3,1,-14644,23549,-11447,"); add("-47,-58,-57,-17,11,44,"); add(""); //add("/*732*/"); add("3,1,20716,-6655,20653,"); add("26,-20,-32,-11,92,40,"); add(""); //add("/*733*/"); add("3,1,-27252,6392,10793,"); add("0,-79,45,16,25,26,"); add(""); //add("/*734*/"); add("3,1,8257,18817,21858,"); add("-26,-56,57,41,-17,-1,"); add(""); //add("/*735*/"); add("3,1,17728,-4370,-23804,"); add("-69,-43,-43,-2,40,-9,"); add(""); //add("/*736*/"); add("3,1,7081,29143,-744,"); add("46,-10,33,-16,1,-93,"); add(""); //add("/*737*/"); add("3,1,20340,-6075,-21198,"); add("-58,54,-71,24,-5,24,"); add(""); //add("/*738*/"); add("3,1,-10500,-27772,4297,"); add("13,7,78,-57,18,-24,"); add(""); //add("/*739*/"); add("3,1,-21551,16797,-12387,"); add("-61,-25,74,20,27,1,"); add(""); //add("/*740*/"); add("3,1,-23937,14156,-11253,"); add("40,42,-32,-29,-72,-28,"); add(""); //add("/*741*/"); add("3,1,2497,24497,17137,"); add("31,52,-79,-35,-7,14,"); add(""); //add("/*742*/"); add("3,1,21770,-2150,-20529,"); add("-61,-66,-57,14,28,12,"); add(""); //add("/*743*/"); add("3,1,-10876,-27085,6937,"); add("24,15,94,-38,8,-29,"); add(""); //add("/*744*/"); add("3,1,-26625,11639,7461,"); add("-2,-58,82,13,34,-9,"); add(""); //add("/*745*/"); add("3,-1,-25621,14760,-5070,"); add("-8,16,87,27,22,-74,"); add(""); //add("/*746*/"); add("3,1,-16344,22674,-10897,"); add("-89,-53,23,21,14,-3,"); add(""); //add("/*747*/"); add("3,1,-15599,23126,-11040,"); add("-60,-53,-25,-14,9,38,"); add(""); //add("/*748*/"); add("3,1,2618,27824,10908,"); add("49,19,-60,-43,11,-19,"); add(""); //add("/*749*/"); add("3,-1,13838,15180,21865,"); add("70,-66,2,3,22,-18,"); add(""); //add("/*750*/"); add("3,1,29104,5954,-4186,"); add("-25,89,-43,9,-21,32,"); add(""); //add("/*751*/"); add("3,-1,-17298,24161,-4125,"); add("-9,-22,-94,-19,-8,36,"); add(""); //add("/*752*/"); add("3,1,7494,29029,1081,"); add("29,-6,-36,-80,21,-19,"); add(""); //add("/*753*/"); add("3,-1,-19537,-11007,19928,"); add("-32,64,4,-30,8,-25,"); add(""); //add("/*754*/"); add("3,1,-18953,-22734,4895,"); add("-43,49,59,-8,-4,-50,"); add(""); //add("/*755*/"); add("3,1,13593,-5535,-26165,"); add("-86,-27,-39,14,23,3,"); add(""); //add("/*756*/"); add("3,-1,-19136,21815,-7612,"); add("-73,-60,14,6,12,19,"); add(""); //add("/*757*/"); add("3,1,-24002,17079,5677,"); add("-28,-7,-99,6,1,24,"); add(""); //add("/*758*/"); add("3,1,-26057,14705,-2194,"); add("-28,-61,-74,6,16,44,"); add(""); //add("/*759*/"); add("3,1,-25874,9131,12130,"); add("37,-3,82,4,26,-11,"); add(""); //add("/*760*/"); add("3,-1,-22516,16997,-10205,"); add("-66,-59,49,14,16,-6,"); add(""); //add("/*761*/"); add("3,1,15992,-257,25381,"); add("-2,95,2,-18,-43,11,"); add(""); //add("/*762*/"); add("3,1,-8284,26137,-12175,"); add("54,-16,-71,-23,-10,-5,"); add(""); //add("/*763*/"); add("3,1,-20414,-21222,5734,"); add("10,12,81,-31,24,-22,"); add(""); //add("/*764*/"); add("3,1,-15647,23076,-11075,"); add("-62,-58,-33,0,15,30,"); add(""); //add("/*765*/"); add("3,1,-28391,9662,-763,"); add("-10,-37,-88,-2,-1,37,"); add(""); //add("/*766*/"); add("3,1,23132,6353,18016,"); add("60,-29,-68,-13,23,9,"); add(""); //add("/*767*/"); add("3,-1,-24613,16950,2623,"); add("-44,-58,-39,16,15,55,"); add(""); //add("/*768*/"); add("3,-1,10870,-14991,23603,"); add("35,-65,-58,7,21,11,"); add(""); //add("/*769*/"); add("3,1,-27204,11625,4977,"); add("-5,-47,82,5,20,-16,"); add(""); //add("/*770*/"); add("3,1,-26269,14142,-3158,"); add("-28,-66,-58,-1,3,22,"); add(""); //add("/*771*/"); add("3,1,2537,27833,10903,"); add("-20,-29,79,23,2,-9,"); add(""); //add("/*772*/"); add("3,1,-27160,11434,5619,"); add("0,-35,71,12,28,5,"); add(""); //add("/*773*/"); add("3,1,29168,5584,-4248,"); add("-10,72,27,7,-18,25,"); add(""); //add("/*774*/"); add("3,1,29735,1076,-3832,"); add("3,68,47,2,-31,8,"); add(""); //add("/*775*/"); add("3,-1,-1224,25269,16124,"); add("-57,-36,52,10,1,0,"); add(""); //add("/*776*/"); add("3,1,-28530,9221,1000,"); add("22,64,44,0,1,-17,"); add(""); add("0,"); } private void add(String s) { d.add(s); } public List getLines() { return d; } }plantuml-1.2017.15/src/com/ctreber/acearth/MapDataReader.java000066400000000000000000000065341312650303100235650ustar00rootroot00000000000000package com.ctreber.acearth; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.StringTokenizer; import com.ctreber.acearth.util.Point3D; import com.ctreber.acearth.util.Polygon; /** * The map data file is a big array of short (16-bit) ints, as follows: - it is * a sequence of closed curves - the first value in a curve is the number of * points in the curve - the second value in a curve indicates land/water (1 or * -1, respectively) - this is followed by an [x,y,z] triple that indicates a * point on the unit sphere (each of x, y, and z has been scaled by 30000), * where the x axis points "to the right" (towards 0 N 90 E), the y axis points * "up" (towards the north pole), and the z axis points "out of the screen" * (towards 0 N 0 E). this is the starting point of the curve. - this is * followed by (one less than the number of points in the curve) triples * [dx,dy,dz]; the [x,y,z] triple for each successive point in the curve is * obtained by adding [dx,dy,dz] onto the previous [x,y,z] values. - the curves * are [must be!] non-self-intersecting and traced in a counter-clockwise * direction * * the curves are sampled at a (roughly) a 20 mile resolution. * *

* © 2002 Christian Treber, ct@ctreber.com * * @author Christian Treber, ct@ctreber.com * */ public class MapDataReader { /** Point value scale (devide value by this number). */ private static final double MAP_DATA_SCALE = 30000.0; private static List fData; private static List fPolygons; private static int fIndex; /** *

* Read map data. * * @param pFileName * Map data file name. * @return Array of map polygons. * @throws IOException */ public static Polygon[] readMapData() throws IOException { final List lines = new MapData().getLines(); fData = new ArrayList(); for (Iterator it = lines.iterator(); it.hasNext(); ) { String lLine = (String) it.next(); if (lLine.indexOf("/*") != -1) { // Filter out comments. continue; } StringTokenizer lST = new StringTokenizer(lLine, ", "); while (lST.hasMoreTokens()) { String lToken = lST.nextToken(); final Integer lValue = new Integer(lToken); fData.add(lValue); } } fPolygons = new ArrayList(); fIndex = 0; while (getValue(fIndex) != 0) { processCurve(); } return (Polygon[]) fPolygons.toArray(new Polygon[0]); } private static void processCurve() { final int lNPoint = getValue(fIndex++); final int lType = getValue(fIndex++); final Point3D[] lPoints = new Point3D[lNPoint]; final Point3D lPoint3D = new Point3D(getValue(fIndex++) / MAP_DATA_SCALE, getValue(fIndex++) / MAP_DATA_SCALE, getValue(fIndex++) / MAP_DATA_SCALE); lPoints[0] = lPoint3D; for (int i = 1; i < lNPoint; i++) { lPoints[i] = new Point3D(lPoints[i - 1].getX() + getValue(fIndex++) / MAP_DATA_SCALE, lPoints[i - 1].getY() + getValue(fIndex++) / MAP_DATA_SCALE, lPoints[i - 1].getZ() + getValue(fIndex++) / MAP_DATA_SCALE); } final Polygon lPolygon = new Polygon(lType, lPoints); fPolygons.add(lPolygon); } /** *

* Get value of raw data at specified point. * * @param pIndex * Index of value. * @return Value of raw data at specified point. */ private static int getValue(int pIndex) { return ((Integer) fData.get(pIndex)).intValue(); } } plantuml-1.2017.15/src/com/ctreber/acearth/gui/000077500000000000000000000000001312650303100210445ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/acearth/gui/CanvasACearth.java000066400000000000000000000006511312650303100243540ustar00rootroot00000000000000package com.ctreber.acearth.gui; import com.ctreber.acearth.ACearth; /** *

* Adds some mouse magic to the normal PixelCanvas. *

* *

* © 2002 Christian Treber, ct@ctreber.com (Nov 8, 2002) *

* * @author Christian Treber, ct@ctreber.com * */ public class CanvasACearth extends PixelCanvas { public CanvasACearth(ACearth pParent, int pWidth, int pHeight) { super(pWidth, pHeight); } } plantuml-1.2017.15/src/com/ctreber/acearth/gui/PixelCanvas.java000066400000000000000000000031771312650303100241340ustar00rootroot00000000000000package com.ctreber.acearth.gui; import java.awt.Color; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.io.OutputStream; import javax.imageio.ImageIO; import com.ctreber.acearth.renderer.RenderTarget; /** *

* Swing compatible drawing surface for images and graphics. * *

* © 2002 Christian Treber, ct@ctreber.com * * @author Christian Treber, ct@ctreber.com * */ public class PixelCanvas implements RenderTarget { final private int fImageWidth; final private int fImageHeight; final private BufferedImage fEarthImage2; /** *

* Construct a canvas of the specified size. * * @param pWidth * Width * @param pHeight * Height */ public PixelCanvas(int pWidth, int pHeight) { fImageWidth = pWidth; fImageHeight = pHeight; fEarthImage2 = new BufferedImage(fImageWidth, fImageHeight, BufferedImage.TYPE_INT_RGB); } public Graphics2D getGraphics2D() { return fEarthImage2.createGraphics(); } public void setPixel(int pX, int pY, int pA, int pR, int pG, int pB) { setPixel(pX, pY, new Color(pR, pG, pB, pA)); } public void setPixel(int pX, int pY, Color pColor) { fEarthImage2.setRGB(pX, pY, pColor.getRGB()); } public int getImageWidth() { return fImageWidth; } public int getImageHeight() { return fImageHeight; } public boolean saveToImage(String pFileName, String pFormat) throws IOException { return ImageIO.write(fEarthImage2, pFormat, new File(pFileName)); } public void saveToImage(OutputStream os) throws IOException { ImageIO.write(fEarthImage2, "png", os); } } plantuml-1.2017.15/src/com/ctreber/acearth/plugins/000077500000000000000000000000001312650303100217415ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/acearth/plugins/Plugin.java000066400000000000000000000017151312650303100240460ustar00rootroot00000000000000package com.ctreber.acearth.plugins; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import com.ctreber.acearth.ACearth; import com.ctreber.acearth.gui.PixelCanvas; import com.ctreber.acearth.projection.Projection; /** *

* *

© 2002 Christian Treber, ct@ctreber.com (Nov 6, 2002)

* @author Christian Treber, ct@ctreber.com * */ abstract public class Plugin implements ActionListener { protected ACearth fParent; protected boolean fActiveP = true; protected Projection fProjection; protected PixelCanvas fRenderTarget; public void actionPerformed(ActionEvent e) { } abstract public boolean hasGUIP(); abstract public void render(); public void setProjection(Projection pProjection) { fProjection = pProjection; } public void setRenderTarget(PixelCanvas pRenderTarget) { fRenderTarget = pRenderTarget; } public void setParent(ACearth pParent) { fParent = pParent; } } plantuml-1.2017.15/src/com/ctreber/acearth/plugins/markers/000077500000000000000000000000001312650303100234055ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/acearth/plugins/markers/Marker.java000066400000000000000000000120311312650303100254660ustar00rootroot00000000000000package com.ctreber.acearth.plugins.markers; import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import java.util.List; import com.ctreber.acearth.gui.PixelCanvas; import com.ctreber.acearth.projection.Projection; import com.ctreber.acearth.projection.ProjectionOrtho; import com.ctreber.acearth.util.Coordinate; import com.ctreber.acearth.util.Point2D; import com.ctreber.acearth.util.Point3D; import com.ctreber.acearth.util.StringParser; /** *

* Marks a location on the globe. * *

* © 2002 Christian Treber, ct@ctreber.com * * @author Christian Treber, ct@ctreber.com * */ public class Marker { private static final int MARKER_SIZE = 4; // types of marker label alignment private static final int MarkerAlignDefault = 0; private static final int MarkerAlignLeft = 1; private static final int MarkerAlignRight = 2; private static final int MarkerAlignAbove = 3; private static final int MarkerAlignBelow = 4; private Marker(Coordinate pCoordinate, String pLabel, int pAlign) { fCoordinate = pCoordinate; fLabel = pLabel; fAlign = pAlign; } private Coordinate fCoordinate; private String fLabel; private int fAlign; // private static List fMarkers; /* * builtin_marker_data[] contains the "built-in" marker data that is * compiled into AC.earth. (My apologies for misspellings, omissions of your * favorite location, or geographic inaccuracies. This is primarily just a * pile of data that I had handy instead of an attempt to provide a sample * that is "globally correct" in some sense.) */ // public static List loadMarkerFile(String pFileName) throws IOException { // fMarkers = new ArrayList(); // // final LineNumberReader lReader = new LineNumberReader(new // FileReader(pFileName)); // String lLine; // while ((lLine = lReader.readLine()) != null) { // processLine(lLine); // } // // lReader.close(); // // return fMarkers; // } // // private static void processLine(String pLine) { // final int lPos = pLine.indexOf('#'); // if (lPos != -1) { // // Remove comment // pLine = pLine.substring(0, lPos); // } // // final Marker lMarkerInfo = createFromLine(pLine); // if (lMarkerInfo != null) { // fMarkers.add(lMarkerInfo); // } // } private static Marker createFromLine(String pLine) { final List lWords = StringParser.parse(pLine); final double lLat = Double.parseDouble((String) lWords.get(0)); final double lLong = Double.parseDouble((String) lWords.get(1)); final String lLabel = (String) lWords.get(2); int lAlign = MarkerAlignDefault; if (lWords.size() >= 4) { String lAlignString = (String) lWords.get(3); if (lAlignString.equalsIgnoreCase("left")) { lAlign = MarkerAlignLeft; } if (lAlignString.equalsIgnoreCase("right")) { lAlign = MarkerAlignRight; } if (lAlignString.equalsIgnoreCase("above")) { lAlign = MarkerAlignAbove; } if (lAlignString.equalsIgnoreCase("below")) { lAlign = MarkerAlignBelow; } } final Coordinate lPos = new Coordinate(lLat, lLong); if (!lPos.check()) { // ACearth.logError("latitude must be between -90 and 90, and // longitude must be between -180 and 180"); return null; } return new Marker(lPos, lLabel, lAlign); } public String toString() { return fLabel + " (" + fCoordinate + "), align: " + fAlign; } // --Recycle Bin START (10/28/02 2:24 PM): // public String getLabel() // { // return fLabel; // } // --Recycle Bin STOP (10/28/02 2:24 PM) // --Recycle Bin START (10/28/02 2:24 PM): // public int getAlign() // { // return fAlign; // } // --Recycle Bin STOP (10/28/02 2:24 PM) // --Recycle Bin START (10/28/02 2:24 PM): // public Coordinate getLocation() // { // return fCoordinate; // } // --Recycle Bin STOP (10/28/02 2:24 PM) public void render(PixelCanvas pCanvas, Projection pProjection) { final Point3D lPos = pProjection.rotate(fCoordinate.getPoint3D()); if ((pProjection instanceof ProjectionOrtho) && (lPos.getZ() <= 0)) { // Back side of the Earth. // Insight: We don't need to check if the marker is visible in other // projections because they always show the whole earth - and all // markers! return; } Point2D lPoint = pProjection.finalize(pProjection.project2D(lPos)); final int lX = (int) lPoint.getX(); final int lY = (int) lPoint.getY(); // Draw a circle Graphics2D g2d = pCanvas.getGraphics2D(); g2d.setColor(Color.red); // pCanvas.drawCircle(lX, lY, MARKER_SIZE); g2d.drawOval(lX, lY, MARKER_SIZE, MARKER_SIZE); if (fLabel != null) { switch (fAlign) { case Marker.MarkerAlignLeft: break; case Marker.MarkerAlignRight: case Marker.MarkerAlignDefault: // pCanvas.drawText(lX + MARKER_SIZE, lY + 4, fLabel); // fRenderTarget.setTextFont(fRenderTarget.getTextFont().deriveFont(9.0f)); g2d.setFont(new Font("", Font.PLAIN, 9)); g2d.drawString(fLabel, lX + MARKER_SIZE + 1, lY + 2); break; case Marker.MarkerAlignAbove: break; case Marker.MarkerAlignBelow: break; } } } public static Marker loadMarkerFile(String line) { return createFromLine(line); } } plantuml-1.2017.15/src/com/ctreber/acearth/plugins/markers/PluginMarkers.java000066400000000000000000000026731312650303100270430ustar00rootroot00000000000000package com.ctreber.acearth.plugins.markers; import java.util.Iterator; import java.util.List; import com.ctreber.acearth.plugins.Plugin; /** *

* Renders markers to the render target. a *

* © 2002 Christian Treber, ct@ctreber.com * * @author Christian Treber, ct@ctreber.com * */ public class PluginMarkers extends Plugin { private List fMarkers; // private String fMarkerFileName = ACearth.getHomeDir() + // "markersDefault.txt"; public PluginMarkers(List markers) { // ACearth.indent("AC.earth Markers plug-in"); // // ACearth.log("Reading markers"); // // if(fMarkerFileName == null) // { // throw new RuntimeException("Marker file name not set"); // } // try // { // fMarkers = Marker.loadMarkerFile(fMarkerFileName); // } catch(IOException e) // { // ACearth.logError("Marker file not found"); // return; // } fMarkers = markers; // ACearth.outdent(); } public boolean hasGUIP() { return false; } public void render() { if (!fActiveP) { return; } // fRenderTarget.setTextFont(fRenderTarget.getTextFont().deriveFont(9.0f)); Iterator lIt = fMarkers.iterator(); while (lIt.hasNext()) { Marker lMarker = (Marker) lIt.next(); lMarker.render(fRenderTarget, fProjection); } } // public void setMarkerFileName(String pMarkerFileName) // { // fMarkerFileName = pMarkerFileName; // } public String toString() { return "AC.earth Markers plug-in"; } } plantuml-1.2017.15/src/com/ctreber/acearth/projection/000077500000000000000000000000001312650303100224345ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/acearth/projection/Projection.java000066400000000000000000000153231312650303100254170ustar00rootroot00000000000000package com.ctreber.acearth.projection; import com.ctreber.acearth.util.Coordinate; import com.ctreber.acearth.util.Point2D; import com.ctreber.acearth.util.Point3D; import com.ctreber.acearth.util.Toolkit; /** *

A projection for a globe on a flat surface (must be subclassed). * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ abstract public class Projection { // Target information int fImageHeight; int fImageWidth; private double fXOffset; private double fYOffset; //Viewing information private int fShiftX; private int fShiftY; double fScale; private Coordinate fViewPos; /**

In rads */ private double fViewRotation; double fViewMagnification; //Transformation matrix parameters */ private double fCosLat; private double fSinLat; private double fCosLon; private double fSinLon; private double fCosRot; private double fSinRot; /** *

Initialize transform parameters, set offset to center of image * (plus shifts), set scale */ public void initTransformTable() { // Set transformation parameters fCosLat = Math.cos(Toolkit.degsToRads(fViewPos.getLat())); fSinLat = Math.sin(Toolkit.degsToRads(fViewPos.getLat())); fCosLon = Math.cos(Toolkit.degsToRads(fViewPos.getLong())); fSinLon = Math.sin(Toolkit.degsToRads(fViewPos.getLong())); fCosRot = Math.cos(Toolkit.degsToRads(fViewRotation)); fSinRot = Math.sin(Toolkit.degsToRads(fViewRotation)); fXOffset = (double)fImageWidth / 2 + fShiftX; fYOffset = (double)fImageHeight / 2 + fShiftY; setScale(); } abstract protected void setScale(); /** *

Project 3D point on y axis. */ abstract public double projectY(double pY); abstract public double inverseProjectY(double pY); /** *

Project 3D point on x axis. */ abstract protected double projectX(double pX, double pZ); abstract public double inverseProjectX(double pX); public abstract boolean isVisible(Point3D pPoint); public boolean isWithinImage(Point2D pPoint) { return (pPoint.getX() >= 0) && (pPoint.getX() < fImageWidth) && (pPoint.getY() >= 0) && (pPoint.getY() < fImageHeight); } /** *

Translate screen point into coordinate on Earth. * * @param pX * @param pY * @return */ abstract public Coordinate getLocation(int pX, int pY); /** *

Imagine view the globe, N is up, S is down, and N0E0 is in the center. * x is right/left, y is up/down, and z is front/rear. * *

Map points are located on the surface of a unit sphere (diameter = 1). * Latitude is the angle between x and y or z and y. Longitude is the angle * between x and z. * *

Why? The way we choose our global coordinate system, longitude circles * (latidude variable) always have the same size while the size of * latidude circles (longitude variable) depends on the latitude. * * @param pPoint * @return */ public Point2D project2D(Point3D pPoint) { return new Point2D(projectX(pPoint.getX(), pPoint.getZ()), projectY(pPoint.getY())); } public Point2D finalize(Point2D pPoint) { return new Point2D(finalizeX(pPoint.getX()), finalizeY(pPoint.getY())); } /** *

Since the final mapping is relative to the center of the image * -PI and PI get mapped to the left and right border respectively. * But see ProjectionOrtho.setScale(). */ public double finalizeX(double pX) { return fXOffset + fScale * pX; } /** *

Since the final mapping is relative to the center of the image * -PI and PI get mapped to the bottom and top border respectively. * But see ProjectionOrtho.setScale(). */ public double finalizeY(double pY) { return fYOffset - fScale * pY; } /** *

Transform screen to image coordinates. */ public double inverseFinalizeX(double x) { return (x - fXOffset) / fScale; } /** *

Transform screen to image coordinates. */ public double inverseFinalizeY(double y) { return (fYOffset - y) / fScale; } /** *

Rotate the point according to the current rotation of Earth. */ public Point3D rotate(Point3D pPoint) { double lX = pPoint.getX(); double lY = pPoint.getY(); double lZ = pPoint.getZ(); // Do NOT inline vars - it does not work (just inline _t_ for a try). double _c_ = fCosLon; double _s_ = fSinLon; double _t_ = _c_ * lX - _s_ * lZ; lZ = _s_ * lX + _c_ * lZ; lX = _t_; _c_ = fCosLat; _s_ = fSinLat; _t_ = (_c_ * lY) - (_s_ * lZ); lZ = (_s_ * lY) + (_c_ * lZ); lY = _t_; _c_ = fCosRot; _s_ = fSinRot; _t_ = (_c_ * lX) - (_s_ * lY); lY = (_s_ * lX) + (_c_ * lY); lX = _t_; return new Point3D(lX, lY, lZ); } public Point3D rotateReverse(Point3D pPoint) { // Set transformation parameters final double fCosLat = Math.cos(Toolkit.degsToRads(-fViewPos.getLat())); final double fSinLat = Math.sin(Toolkit.degsToRads(-fViewPos.getLat())); final double fCosLon = Math.cos(Toolkit.degsToRads(-fViewPos.getLong())); final double fSinLon = Math.sin(Toolkit.degsToRads(-fViewPos.getLong())); final double fCosRot = Math.cos(Toolkit.degsToRads(-fViewRotation)); final double fSinRot = Math.sin(Toolkit.degsToRads(-fViewRotation)); double lX = pPoint.getX(); double lY = pPoint.getY(); double lZ = pPoint.getZ(); // Do NOT inline vars - it does not work (just inline lTmp for a try). double lCosFac; double lSinFac; double lTmp; // Note that the order of the three rotation had to be reversed as well. lCosFac = fCosRot; lSinFac = fSinRot; lTmp = (lCosFac * lX) - (lSinFac * lY); lY = (lSinFac * lX) + (lCosFac * lY); lX = lTmp; lCosFac = fCosLat; lSinFac = fSinLat; lTmp = (lCosFac * lY) - (lSinFac * lZ); lZ = (lSinFac * lY) + (lCosFac * lZ); lY = lTmp; lCosFac = fCosLon; lSinFac = fSinLon; lTmp = (lCosFac * lX) - (lSinFac * lZ); lZ = (lSinFac * lX) + (lCosFac * lZ); lX = lTmp; return new Point3D(lX, lY, lZ); } public double getScale() { return fScale; } public Coordinate getViewPos() { return fViewPos; } public void setViewMagnification(double pViewMagnification) { fViewMagnification = pViewMagnification; setScale(); } public void setViewPos(Coordinate pViewPos) { fViewPos = pViewPos; } public void setShiftX(int pX) { fShiftX = pX; } public void setShiftY(int pY) { fShiftY = pY; } public void setViewRotation(double pViewRotation) { fViewRotation = pViewRotation; } public void setImageWidth(int pImageWidth) { fImageWidth = pImageWidth; } public void setImageHeight(int pImageHeight) { fImageHeight = pImageHeight; } } plantuml-1.2017.15/src/com/ctreber/acearth/projection/ProjectionCyl.java000066400000000000000000000031411312650303100260620ustar00rootroot00000000000000package com.ctreber.acearth.projection; import com.ctreber.acearth.util.Coordinate; import com.ctreber.acearth.util.Point3D; /** *

Cylindrical projection. Show Earth flatly spread out on rectangle. * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class ProjectionCyl extends Projection { /** *

All of Earth is visible. * * @param pPoint * @return */ public boolean isVisible(Point3D pPoint) { return true; } public Coordinate getLocation(int pX, int pY) { final Coordinate lRaw = new Coordinate(Math.atan(inverseFinalizeY(pY)), inverseFinalizeX(pX)); return rotateReverse(lRaw.getPoint3DRads()).getCoordinate(); } /** *

The scale is set so that a value of * 2PI gets mapped to the full image width times the magnification. * But see ProjectionOrtho.setScale(). */ protected void setScale() { // Makes 2PI come out as full image width fScale = fViewMagnification * fImageWidth / (2 * Math.PI); } /** * @return Longitude (-PI to PI), linearly on x axis. */ public double projectX(double pX, double pZ) { return Math.atan2(pX, pZ); } public double inverseProjectX(double pX) { return Math.sin(pX); } /** * @return Latitude (-PI/2 to PI/2), projected from center of Earth on * y axis with a linear scale. */ public double projectY(double pY) { return (pY >= 0.9999999999) ? 1e6 : (pY <= -0.9999999999) ? -1e6 : Math.tan(Math.asin(pY)); } public double inverseProjectY(double y) { return Math.sin(Math.atan(y)); } } plantuml-1.2017.15/src/com/ctreber/acearth/projection/ProjectionMerc.java000066400000000000000000000033161312650303100262250ustar00rootroot00000000000000package com.ctreber.acearth.projection; import com.ctreber.acearth.util.Coordinate; import com.ctreber.acearth.util.Point3D; /** *

Mercator projection. Show Earth flatly spread out on rectangle. * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class ProjectionMerc extends Projection { /** *

All of Earth is visible. * * @param pPoint * @return */ public boolean isVisible(Point3D pPoint) { return true; } public Coordinate getLocation(int pX, int pY) { final Coordinate lRaw = new Coordinate( 2 * (Math.atan(Math.exp(inverseFinalizeY(pY))) - Math.PI / 4), inverseFinalizeX(pX)); return rotateReverse(lRaw.getPoint3DRads()).getCoordinate(); } /** *

The scale is set so that a value of * 2PI gets mapped to the full image width times the magnification. * But see ProjectionOrtho.setScale(). */ protected void setScale() { // Makes 2PI come out as full image width fScale = fViewMagnification * fImageWidth / (2 * Math.PI); } /** * @return Longitude (-PI to PI), linearly on x axis. */ public double projectX(double pX, double pZ) { return Math.atan2(pX, pZ); } public double inverseProjectX(double pX) { return Math.sin(pX); } /** * @return Latitude (-PI/2 to PI/2), projected from center of Earth on * y axis with a twist and a log scale. */ public double projectY(double pY) { return (pY >= 0.9999999999) ? 1e6 : (pY <= -0.9999999999) ? -1e6 : Math.log(Math.tan(Math.asin(pY) / 2 + Math.PI / 4)); } public double inverseProjectY(double y) { return Math.sin(2 * (Math.atan(Math.exp(y)) - Math.PI / 4)); } } plantuml-1.2017.15/src/com/ctreber/acearth/projection/ProjectionOrtho.java000066400000000000000000000026411312650303100264320ustar00rootroot00000000000000package com.ctreber.acearth.projection; import com.ctreber.acearth.util.Coordinate; import com.ctreber.acearth.util.Point3D; /** *

Orthographic projection (show Earth as a ball). * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class ProjectionOrtho extends Projection { /** *

All of Earth is visible. * * @param pPoint * @return */ public boolean isVisible(Point3D pPoint) { return pPoint.getZ() >= 0; } public Coordinate getLocation(int pX, int pY) { final double lX = inverseFinalizeX(pX); final double lY = inverseFinalizeY(pY); final double lZ = Math.sqrt(1 - lX * lX - lY * lY); final Point3D lP = new Point3D(lX, lY, lZ); return rotateReverse(lP).getCoordinate(); } /** * @return Longitude, not in rad but from -1 to 1. */ public double projectX(double pX, double pZ) { return pX; } public double inverseProjectX(double pX) { return pX; } /** * @return Latitude, not in rad but from -1 to 1. */ public double projectY(double pY) { return pY; } public double inverseProjectY(double pY) { return pY; } /** *

The scale is not from -PI to PI but from -1 to 1 in this case * (the range of x, y, z of the points). */ protected void setScale() { fScale = Math.min(fImageHeight, fImageWidth) * fViewMagnification * 0.99 / 2; } } plantuml-1.2017.15/src/com/ctreber/acearth/renderer/000077500000000000000000000000001312650303100220665ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/acearth/renderer/RenderTarget.java000066400000000000000000000006341312650303100253220ustar00rootroot00000000000000package com.ctreber.acearth.renderer; import java.awt.Color; /** *

. * *

* © 2002 Christian Treber, ct@ctreber.com * * @author Christian Treber, ct@ctreber.com * */ public interface RenderTarget { public void setPixel(int pX, int pY, int pA, int pR, int pG, int pB); public void setPixel(int pX, int pY, Color pColor); public int getImageWidth(); public int getImageHeight(); } plantuml-1.2017.15/src/com/ctreber/acearth/renderer/Renderer.java000066400000000000000000000043501312650303100245010ustar00rootroot00000000000000package com.ctreber.acearth.renderer; import java.awt.Color; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import com.ctreber.acearth.shader.Shader; /** *

* Uses defined RowTypeRenderers and Shader to render to render target. * *

* © 2002 Christian Treber, ct@ctreber.com * * @author Christian Treber, ct@ctreber.com * */ public class Renderer { private Shader fShader; private RenderTarget fRenderTarget; private List fRowTypeRenderers = new ArrayList(); public Renderer(RenderTarget pRenderTarget) { fRenderTarget = pRenderTarget; } public void render() { final Iterator lIt = fRowTypeRenderers.iterator(); while (lIt.hasNext()) { RowTypeRenderer lRowRenderer = (RowTypeRenderer) lIt.next(); lRowRenderer.startNewRun(); } renderRows(); } private void renderRows() { for (int lRowNo = 0; lRowNo < fRenderTarget.getImageHeight(); lRowNo++) { int[] lPixelTypes = getPixelTypes(lRowNo); renderRow(lRowNo, lPixelTypes); } } /** *

* Get pixel types for whole row from all registered RowRenderers. * * @param pRowNo * Row number. * @return Pixel types for row. */ private int[] getPixelTypes(int pRowNo) { // Create the types array final int[] lPixelTypes = new int[fRenderTarget.getImageWidth()]; final Iterator lIt = fRowTypeRenderers.iterator(); while (lIt.hasNext()) { RowTypeRenderer lRowRenderer = (RowTypeRenderer) lIt.next(); lRowRenderer.getPixelTypes(pRowNo, lPixelTypes); } return lPixelTypes; } /** *

* With help of Shader, render pixel types to actual colored pixels. * * @param pRowNo * @param pPixelTypes */ private void renderRow(int pRowNo, int[] pPixelTypes) { // For each pixel in row, render it. final Color[] lPixelColors = fShader.getShadedColors(pRowNo, pPixelTypes); for (int lColNo = 0; lColNo < fRenderTarget.getImageWidth(); lColNo++) { fRenderTarget.setPixel(lColNo, pRowNo, lPixelColors[lColNo]); } } public void setShader(Shader pShader) { fShader = pShader; } public void setRenderTarget(RenderTarget pRenderTarget) { fRenderTarget = pRenderTarget; } public void addRowTypeRenderer(RowTypeRenderer pRowRenderer) { fRowTypeRenderers.add(pRowRenderer); } } plantuml-1.2017.15/src/com/ctreber/acearth/renderer/RowTypeRenderer.java000066400000000000000000000012041312650303100260260ustar00rootroot00000000000000package com.ctreber.acearth.renderer; /** *

Renders a row of pixel types.

* *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

* @author Christian Treber, ct@ctreber.com * */ public interface RowTypeRenderer { /** *

Each time when rendering an image, call startNewRun() first. */ public void startNewRun(); /** *

Set pixel type for specified row number. Note some pixel types * might be already set. The renderer can build on this information * or overwrite it. * * @param pRowNo * @param pPixelTypes */ public void getPixelTypes(int pRowNo, final int[] pPixelTypes); } plantuml-1.2017.15/src/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java000066400000000000000000000044651312650303100273060ustar00rootroot00000000000000package com.ctreber.acearth.renderer; import com.ctreber.acearth.scanbit.BitGeneratorMap; import com.ctreber.acearth.scanbit.ScanBit; /** *

Renders a row of ScanBits to pixel types.

* *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

* @author Christian Treber, ct@ctreber.com * */ public class RowTypeRendererScanBit implements RowTypeRenderer { private int fScanBitIndex; private ScanBit[] fScanBits; private final int[] fScanToPixelType = new int[256]; public void startNewRun() { fScanBitIndex = 0; generateScanToPixelTypeTable(); } public void getPixelTypes(int pRowNo, int[] pPixelTypes) { // For all ScanBits in specified row... while((fScanBitIndex < fScanBits.length) && (fScanBits[fScanBitIndex].getY() == pRowNo)) { for(int i = fScanBits[fScanBitIndex].getlXFrom(); i <= fScanBits[fScanBitIndex].getXTo(); i++) { /** * This is weird... why summing up the types? Note the row stays the * same, but it possibly gets paved over a couple of times (There * might be ScanBits painting on the same pixels). * * The polygons specify -1 as water and 1 as land. * The type table says space is 0, Water is 1 to 64, Land is 65+. * * The outline paints the whole world as water (64). Adding a * land pixel (1) creates a value of 65 (land). Adding a water * pixel (-1) changes this back to 64 (water). */ pPixelTypes[i] += fScanBits[fScanBitIndex].getType(); } fScanBitIndex++; } // Translate generateScanBits values into pixels types. for(int lCol = 0; lCol < pPixelTypes.length; lCol++) { pPixelTypes[lCol] = fScanToPixelType[pPixelTypes[lCol] & 0xff]; } } private void generateScanToPixelTypeTable() { for(int i = 0; i < 256; i++) { if(i == 0) { // 0 is Space. fScanToPixelType[i] = BitGeneratorMap.PixTypeSpace; } else if(i > 64) { // Above 64 it's land. fScanToPixelType[i] = BitGeneratorMap.PixTypeLand; } else { // From 1 to 64 incl. it's water fScanToPixelType[i] = BitGeneratorMap.PixTypeWater; } } } public void setScanBits(ScanBit[] pScanBits) { fScanBits = pScanBits; } } plantuml-1.2017.15/src/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java000066400000000000000000000030311312650303100273020ustar00rootroot00000000000000package com.ctreber.acearth.renderer; import com.ctreber.acearth.scanbit.BitGeneratorMap; import com.ctreber.acearth.scandot.ScanDot; /** *

Renders a row of ScanDots to pixel types.

* *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

* @author Christian Treber, ct@ctreber.com * */ public class RowTypeRendererScanDot implements RowTypeRenderer { private int fScanDotIndex; private ScanDot[] fScanDots; public void startNewRun() { fScanDotIndex = 0; } public void getPixelTypes(int pRowNo, int[] pPixelTypes) { // For all ScanDots in specified row... while((fScanDotIndex < fScanDots.length) && (fScanDots[fScanDotIndex].getY() == pRowNo)) { ScanDot lDot = fScanDots[fScanDotIndex]; if(lDot.getType() == ScanDot.DotTypeStar) { if(pPixelTypes[lDot.getX()] == BitGeneratorMap.PixTypeSpace) { // Stars get only painted on Space. pPixelTypes[lDot.getX()] = BitGeneratorMap.PixTypeStar; } } else { // The only other type for a dot (so far) is "grid". switch(pPixelTypes[lDot.getX()]) { case BitGeneratorMap.PixTypeLand: pPixelTypes[lDot.getX()] = BitGeneratorMap.PixTypeGridLand; break; case BitGeneratorMap.PixTypeWater: pPixelTypes[lDot.getX()] = BitGeneratorMap.PixTypeGridWater; break; } } fScanDotIndex++; } } public void setScanDots(ScanDot[] pScanDots) { fScanDots = pScanDots; } } plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/000077500000000000000000000000001312650303100217035ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/BitGeneratorMap.java000066400000000000000000000073251312650303100256000ustar00rootroot00000000000000package com.ctreber.acearth.scanbit; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import com.ctreber.acearth.projection.Projection; import com.ctreber.acearth.util.EdgeCrossing; import com.ctreber.acearth.util.Point2D; import com.ctreber.acearth.util.Point3D; import com.ctreber.acearth.util.Polygon; import com.ctreber.aclib.sort.CTSort; import com.ctreber.aclib.sort.QuickSort; /** *

* A BitGeneratorMap scans a map into ScanBits. * *

* © 2002 Christian Treber, ct@ctreber.com * * @author Christian Treber, ct@ctreber.com * */ public abstract class BitGeneratorMap extends ScanBitGenerator { // Types of pixels. public static final int PixTypeSpace = 0; public static final int PixTypeLand = 1; public static final int PixTypeWater = 2; public static final int PixTypeStar = 3; public static final int PixTypeGridLand = 4; public static final int PixTypeGridWater = 5; // Parameters influencing generateScanBits buffer genertion. private Polygon[] fMapData; Projection fProjection; private List fScanbitsVector = new ArrayList(); // Created by scanPolygon List fEdgeCrossings; abstract protected ScanBuf scanOutline(); abstract protected void handleCrossings(ScanBuf pScanBuf, EdgeCrossing[] pEdgeCrossings); abstract protected Comparator getEdgeXingComparator(); abstract protected void scanPolygon(ScanBuf pScanBuf, Point3D[] pPoints3D, Point2D[] pPoints2D, int pIndex); public BitGeneratorMap(Projection pProjection) { fProjection = pProjection; } /** *

* Create outline for the map, scan all polygons. */ public void generateScanBits() { // Prepare data. fScanbitsVector = new ArrayList(); fProjection.setImageWidth(fImageWidth); fProjection.setImageHeight(fImageHeight); fProjection.initTransformTable(); // Trace outling and polygons. final ScanBuf lScanBuf = scanOutline(); fScanbitsVector.addAll(lScanBuf.getScanbits(64)); scanPolygons(); // Dress results. final CTSort lSort = new QuickSort(); fScanBitsArray = (ScanBit[]) fScanbitsVector.toArray(new ScanBit[0]); lSort.sort(fScanBitsArray); } private void scanPolygons() { for (int lPolyNo = 0; lPolyNo < fMapData.length; lPolyNo++) { Polygon lPolygon = fMapData[lPolyNo]; Point3D[] lPoints3D = new Point3D[lPolygon.getSize()]; Point2D[] lPoints2D = new Point2D[lPolygon.getSize()]; transformPolygonPoints(lPolygon, lPoints3D, lPoints2D); // For all points in polygon... fEdgeCrossings = new ArrayList(); ScanBuf lScanBuf = new ScanBuf(fImageHeight, fImageWidth); for (int i = 0; i < lPoints2D.length; i++) { scanPolygon(lScanBuf, lPoints3D, lPoints2D, i); } if (fEdgeCrossings.size() > 0) { // Edge crossings have been generated, deal with them. final EdgeCrossing[] xings = (EdgeCrossing[]) fEdgeCrossings.toArray(new EdgeCrossing[0]); final CTSort lSort = new QuickSort(); lSort.sort(xings, getEdgeXingComparator()); handleCrossings(lScanBuf, xings); } if (lScanBuf.containsPoints()) { // Scan lines have been generated, transform them into ScanBit. fScanbitsVector.addAll(lScanBuf.getScanbits(lPolygon.getType())); } } } /** * The transformation rotates 3D and projects 2D points from it */ private void transformPolygonPoints(Polygon pPolygon, Point3D[] pPoints3D, Point2D[] pPoints2D) { for (int i = 0; i < pPolygon.getPoints().length; i++) { Point3D lPoint = pPolygon.getPoints()[i]; Point3D lPointRotated = fProjection.rotate(lPoint); pPoints3D[i] = lPointRotated; pPoints2D[i] = fProjection.project2D(lPointRotated); } } public void setMapData(Polygon[] pMapData) { fMapData = pMapData; } protected void addEdgeXing(EdgeCrossing pEdgeXing) { fEdgeCrossings.add(pEdgeXing); } } plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java000066400000000000000000000152041312650303100271000ustar00rootroot00000000000000package com.ctreber.acearth.scanbit; import java.util.Comparator; import com.ctreber.acearth.projection.Projection; import com.ctreber.acearth.util.EdgeCrossing; import com.ctreber.acearth.util.Point2D; import com.ctreber.acearth.util.Point3D; /** *

Map scanner for mercator and cylindrical projections. * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class BitGeneratorMapDefault extends BitGeneratorMap { public BitGeneratorMapDefault(Projection pProjection) { super(pProjection); } protected Comparator getEdgeXingComparator() { return new EdgeXingComparator(); } /** * Seems to: walk along outline of projected area. */ protected ScanBuf scanOutline() { final ScanBuf lScanBuf = new ScanBuf(fImageHeight, fImageWidth); final double lLeft = fProjection.finalizeX(-Math.PI); final double lRight = fProjection.finalizeX(Math.PI); // Will be adjusted to fit height. final double lTop = fProjection.finalizeY(1e6); final double lBottom = fProjection.finalizeY(-1e6); // Top lScanBuf.addLine(lRight, lTop, lLeft, lTop); // Left lScanBuf.addLine(lLeft, lTop, lLeft, lBottom); // Bottom lScanBuf.addLine(lLeft, lBottom, lRight, lBottom); // Right lScanBuf.addLine(lRight, lBottom, lRight, lTop); return lScanBuf; } /** *

Look at 2 neighboring points in polygon and find edge crossings - * edge of the globe?! Edge of image? */ protected void scanPolygon(ScanBuf pScanBuf, Point3D[] pPoints3D, Point2D[] pPoints2D, int pIndex) { final Point2D lCurr = pPoints2D[pIndex]; final int lIndexPrev = pIndex - 1 >= 0 ? pIndex - 1 : pPoints2D.length - 1; final Point2D lPrev = pPoints2D[lIndexPrev]; double dx = lCurr.getX() - lPrev.getX(); if(Math.abs(dx) <= Math.PI) { // Perimeter not crossed. pScanBuf.addLine( fProjection.finalizeX(lPrev.getX()), fProjection.finalizeY(lPrev.getY()), fProjection.finalizeX(lCurr.getX()), fProjection.finalizeY(lCurr.getY())); return; } // Perimeter crossed, we need to wrap the line around the edge. int lAngle; double mx; double my = getYMidPoint(pPoints3D[lIndexPrev], pPoints3D[pIndex]); if(dx > 0) { // Curve runs right mx = -Math.PI; lAngle = 2; } else { mx = Math.PI; lAngle = 0; } // From previous point to edge... pScanBuf.addLine( fProjection.finalizeX(lPrev.getX()), fProjection.finalizeY(lPrev.getY()), fProjection.finalizeX(mx), fProjection.finalizeY(my)); addEdgeXing(new EdgeCrossing(EdgeCrossing.XingTypeExit, pIndex, mx, my, lAngle)); if(dx > 0) { mx = Math.PI; lAngle = 0; } else { mx = -Math.PI; lAngle = 2; } // ...and from edge to current point. pScanBuf.addLine( fProjection.finalizeX(mx), fProjection.finalizeY(my), fProjection.finalizeX(lCurr.getX()), fProjection.finalizeY(lCurr.getY())); addEdgeXing(new EdgeCrossing(EdgeCrossing.XingTypeEntry, pIndex, mx, my, lAngle)); } /** *

My educated guess is that the mid point between the current and * the previous point is calculated, and - kind of - y of that point * is returned. */ private double getYMidPoint(Point3D pPrev, Point3D pCurr) { double lY; final double lZ; if(pCurr.getX() != 0) { // if xPrev is twice xCurr, ratio is 2 double ratio = (pPrev.getX() / pCurr.getX()); lY = pPrev.getY() - ratio * pCurr.getY(); lZ = pPrev.getZ() - ratio * pCurr.getZ(); } else { lY = pCurr.getY(); lZ = pCurr.getZ(); } final double lDistance = Math.sqrt((lY * lY) + (lZ * lZ)); lY *= ((lZ > 0) ? -1 : 1) / lDistance; return fProjection.projectY(lY); } /** *

Side effect: Creates ScanBuf lines. */ protected void handleCrossings(ScanBuf pScanBuf, EdgeCrossing[] xings) { EdgeCrossing from; EdgeCrossing to; int lStart; if(xings[0].getType() == EdgeCrossing.XingTypeExit) { lStart = 0; } else { // Type "entry". from = xings[xings.length - 1]; to = xings[0]; addEdgeToScanbuf(pScanBuf, from, to); lStart = 1; } for(int i = lStart; i < xings.length - 1; i += 2) { from = xings[i]; to = xings[i + 1]; addEdgeToScanbuf(pScanBuf, from, to); } } /** *

For handleCrossing(). Side effect: Creates ScanBuf lines. * * @param pScanBuf * @param from * @param to */ private void addEdgeToScanbuf(ScanBuf pScanBuf, EdgeCrossing from, EdgeCrossing to) { int lAngleFrom = (int)from.getAngle(); double lXFrom = fProjection.finalizeX(from.getX()); double lYFrom = fProjection.finalizeY(from.getY()); // Step around in 90 degree increments until target angle is reached while(lAngleFrom != (int)to.getAngle()) { int lAngleNew = 0; double lXNew = 0; double lYNew = 0; switch(lAngleFrom) { case 0: // Top right lXNew = fProjection.finalizeX(Math.PI); lYNew = fProjection.finalizeY(1e6); lAngleNew = 1; break; case 1: // Top left lXNew = fProjection.finalizeX(-Math.PI); lYNew = fProjection.finalizeY(1e6); lAngleNew = 2; break; case 2: // Bottom left lXNew = fProjection.finalizeX(-Math.PI); lYNew = fProjection.finalizeY(-1e6); lAngleNew = 3; break; case 3: // Bottom right lXNew = fProjection.finalizeX(Math.PI); lYNew = fProjection.finalizeY(-1e6); lAngleNew = 0; break; } pScanBuf.addLine(lXFrom, lYFrom, lXNew, lYNew); lAngleFrom = lAngleNew; lXFrom = lXNew; lYFrom = lYNew; } // ...and from last to final. pScanBuf.addLine(lXFrom, lYFrom, fProjection.finalizeX(to.getX()), fProjection.finalizeY(to.getY())); } private static class EdgeXingComparator implements Comparator { public int compare(Object o1, Object o2) { final EdgeCrossing a = (EdgeCrossing)o1; final EdgeCrossing b = (EdgeCrossing)o2; if(a.getAngle() < b.getAngle()) { return -1; } if(a.getAngle() > b.getAngle()) { return 1; } // Angles are equal. if(a.getAngle() == 0) { return (a.getY() < b.getY()) ? -1 : (a.getY() > b.getY()) ? 1 : 0; } if(a.getAngle() == 2) { return (a.getY() > b.getY()) ? -1 : (a.getY() < b.getY()) ? 1 : 0; } throw new RuntimeException("No result"); } } } plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java000066400000000000000000000114711312650303100266110ustar00rootroot00000000000000package com.ctreber.acearth.scanbit; import java.util.Comparator; import com.ctreber.acearth.projection.Projection; import com.ctreber.acearth.util.EdgeCrossing; import com.ctreber.acearth.util.Point2D; import com.ctreber.acearth.util.Point3D; /** *

Map scanner for orthographic projection. * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class BitGeneratorMapOrtho extends BitGeneratorMap { public BitGeneratorMapOrtho(Projection pProjection) { super(pProjection); } protected Comparator getEdgeXingComparator() { return new EdgeCrossingComparator(); } protected ScanBuf scanOutline() { final ScanBuf lScanBuf = new ScanBuf(fImageHeight, fImageWidth); addArcToScanbuf(lScanBuf, 1.0, 0.0, 0.0, 1.0, 0.0, 2 * Math.PI); return lScanBuf; } private void addArcToScanbuf(ScanBuf pScanBuf, double pXFrom, double pYFrom, double pAngleFrom, double pXTo, double pYTo, double pAngleTo) { double step = 1 / fProjection.getScale() * 10; if(step > 0.05) { step = 0.05; } final int lAngleFrom = (int)Math.ceil(pAngleFrom / step); final int lAngleTo = (int)Math.floor(pAngleTo / step); double prev_x = fProjection.finalizeX(pXFrom); double prev_y = fProjection.finalizeY(pYFrom); double curr_x; double curr_y; if(lAngleFrom <= lAngleTo) { double c_step = Math.cos(step); double s_step = Math.sin(step); double angle = lAngleFrom * step; double arc_x = Math.cos(angle); double arc_y = Math.sin(angle); for(int i = lAngleFrom; i <= lAngleTo; i++) { curr_x = fProjection.finalizeX(arc_x); curr_y = fProjection.finalizeY(arc_y); pScanBuf.addLine(prev_x, prev_y, curr_x, curr_y); /* instead of repeatedly calling cos() and sin() to get the next * values for arc_x and arc_y, simply rotate the existing values */ double tmp = (c_step * arc_x) - (s_step * arc_y); arc_y = (s_step * arc_x) + (c_step * arc_y); arc_x = tmp; prev_x = curr_x; prev_y = curr_y; } } curr_x = fProjection.finalizeX(pXTo); curr_y = fProjection.finalizeY(pYTo); pScanBuf.addLine(prev_x, prev_y, curr_x, curr_y); } protected void scanPolygon(ScanBuf pScanBuf, Point3D[] pPoints3D, Point2D[] pPoints2D, int pIndex) { Point3D extra; Point3D lCurr = pPoints3D[pIndex]; final int lIndexPrev = pIndex - 1 >= 0 ? pIndex - 1 : pPoints2D.length - 1; Point3D lPrev = pPoints3D[lIndexPrev]; if(lPrev.getZ() <= 0) { if(lCurr.getZ() <= 0) { return; } // Previous point not visible, but current one is: horizon crossed. extra = findEdgeCrossing(lPrev, lCurr); addEdgeXing(new EdgeCrossing(EdgeCrossing.XingTypeEntry, pIndex, extra.getX(), extra.getY(), Math.atan2(extra.getY(), extra.getX()))); lPrev = extra; } else { if(lCurr.getZ() <= 0) { // Previous point visible, but current is not: horizon crossed. extra = findEdgeCrossing(lPrev, lCurr); addEdgeXing(new EdgeCrossing(EdgeCrossing.XingTypeExit, pIndex, extra.getX(), extra.getY(), Math.atan2(extra.getY(), extra.getX()))); lCurr = extra; } } pScanBuf.addLine( fProjection.finalizeX(lPrev.getX()), fProjection.finalizeY(lPrev.getY()), fProjection.finalizeX(lCurr.getX()), fProjection.finalizeY(lCurr.getY())); } private Point3D findEdgeCrossing(Point3D pPrev, Point3D pCurr) { double tmp = pCurr.getZ() / (pCurr.getZ() - pPrev.getZ()); final double r0 = pCurr.getX() - tmp * (pCurr.getX() - pPrev.getX()); final double r1 = pCurr.getY() - tmp * (pCurr.getY() - pPrev.getY()); tmp = Math.sqrt((r0 * r0) + (r1 * r1)); return new Point3D(r0 / tmp, r1 / tmp, 0); } protected void handleCrossings(ScanBuf pScanBuf, EdgeCrossing[] xings) { EdgeCrossing from; EdgeCrossing to; int lStart; if(xings[0].getType() == EdgeCrossing.XingTypeExit) { lStart = 0; } else { from = xings[xings.length - 1]; to = xings[0]; addArcToScanbuf(pScanBuf, from.getX(), from.getY(), from.getAngle(), to.getX(), to.getY(), to.getAngle() + 2 * Math.PI); lStart = 1; } for(int i = lStart; i < xings.length - 1; i += 2) { from = xings[i]; to = xings[i + 1]; addArcToScanbuf(pScanBuf, from.getX(), from.getY(), from.getAngle(), to.getX(), to.getY(), to.getAngle()); } } private static class EdgeCrossingComparator implements Comparator { public int compare(Object o1, Object o2) { final EdgeCrossing a = (EdgeCrossing)o1; final EdgeCrossing b = (EdgeCrossing)o2; return (a.getAngle() < b.getAngle()) ? -1 : (a.getAngle() > b.getAngle()) ? 1 : 0; } } } plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/ScanBit.java000066400000000000000000000021021312650303100240640ustar00rootroot00000000000000package com.ctreber.acearth.scanbit; /** *

Instruction to paint points xFrom to xTo on line y. * *

What I don't understand: why do values get summed to determine the * pixel type? * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class ScanBit implements Comparable { private int fY; private int lXFrom; private int fXTo; private int fType; public ScanBit(int pY, int pLoX, int pHiX, int pType) { fY = pY; lXFrom = pLoX; fXTo = pHiX; fType = pType; } public int compareTo(Object o) { if(o instanceof ScanBit) { ScanBit lOther = (ScanBit)o; return (fY > lOther.fY) ? 1 : (fY < lOther.fY) ? -1 : 0; } throw new IllegalArgumentException("Can't compare with " + o.getClass()); } public int getY() { return fY; } public int getlXFrom() { return lXFrom; } public int getXTo() { return fXTo; } /** *

See values for * @see com.ctreber.acearth.util.Polygon */ public int getType() { return fType; } } plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/ScanBitGenerator.java000066400000000000000000000011551312650303100257420ustar00rootroot00000000000000package com.ctreber.acearth.scanbit; /** *

A ScanBitGenerator produces ScanBits.

* *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

* @author Christian Treber, ct@ctreber.com * */ abstract public class ScanBitGenerator { int fImageHeight; int fImageWidth; protected ScanBit[] fScanBitsArray; abstract public void generateScanBits(); public void setImageHeight(int pImageHeight) { fImageHeight = pImageHeight; } public void setImageWidth(int pImageWidth) { fImageWidth = pImageWidth; } public ScanBit[] getScanBits() { return fScanBitsArray; } } plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/ScanBuf.java000066400000000000000000000114011312650303100240640ustar00rootroot00000000000000package com.ctreber.acearth.scanbit; import java.util.ArrayList; import java.util.List; import com.ctreber.aclib.sort.CTSort; import com.ctreber.aclib.sort.QuickSort; /** *

For each line, the scanbuffer (= a raster divice) records the points hit * I.e., line 5 (y=5) contains the values 2, 6, 40, and 46 (these line have * been crossed). The values always come as pairs because we're dealing with * polygons, which have a left and a right side which consists of a line. * The points in between two values painted as filled. * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ class ScanBuf { private List[] fScanbuf; private int fLineMin; private int fLineMax; private final int fLines; private final int fPoints; private boolean fScanBufsAdded; /** *

Create a list for each line. * * @param pLines Number of lines aka screen height. * @param pPoints Number of points per line aka screen width. */ public ScanBuf(int pLines, int pPoints) { fLines = pLines; fPoints = pPoints; fLineMin = Integer.MAX_VALUE; fLineMax = Integer.MIN_VALUE; fScanBufsAdded = false; fScanbuf = new ArrayList[fLines]; for(int i = 0; i < fScanbuf.length; i++) { fScanbuf[i] = new ArrayList(); } } /** *

Add a line to the generateScanBits buffer. */ public void addLine(double pXFrom, double pYFrom, double pXTo, double pYTo) { int lYFrom; int lYTo; // Do some rounding (but not in the way we expect it), limit values if(pYFrom < pYTo) { // Round lYFrom (but .5 is handled oddly) // 1.5001 - 2.5 -> 1.0001 - 2.0 -> 2 lYFrom = (int)Math.ceil(pYFrom - 0.5); // Round lYTo, substract 1 // 1.5 - 2.4999 -> 1.0 - 1.9999 -> 1 lYTo = (int)Math.floor(pYTo - 0.5); /** * I don't know if this is intended, but in Java 3 == 3.001 is false * (the left arg is converted to double), so the expr is true only when * pYTo - 0.5 is exactly lYTo */ if(lYTo == pYTo - 0.5) { lYTo--; } } else { lYFrom = (int)Math.ceil(pYTo - 0.5); lYTo = (int)Math.floor(pYFrom - 0.5); if(lYTo == pYFrom - 0.5) { lYTo--; } } // Limit y to size of image if(lYFrom < 0) { lYFrom = 0; } if(lYTo >= fLines) { lYTo = fLines - 1; } if(lYFrom > lYTo) { // No lines crossed. return; } // Note min/max settings so far if(lYFrom < fLineMin) { fLineMin = lYFrom; } if(lYTo > fLineMax) { fLineMax = lYTo; } // todo Curious: What happens if yFrom and yTo are equal? Shit? Or can't they be? double lDx = (pXTo - pXFrom) / (pYTo - pYFrom); double lX = pXFrom + lDx * ((lYFrom + 0.5) - pYFrom); // Record the x value for every line (y). for(int lLineNo = lYFrom; lLineNo <= lYTo; lLineNo++) { fScanbuf[lLineNo].add(new Double(lX)); lX += lDx; } fScanBufsAdded = true; } public boolean containsPoints() { return fScanBufsAdded; } /** *

For each line, for each x value pair in line, create one ScanBit. */ public List getScanbits(int pCurveType) { final List fScanBits = new ArrayList(); // For each generateScanBits line containing points for(int lLineNo = fLineMin; lLineNo <= fLineMax; lLineNo++) { // Sort so that lowest x values come first. Double[] lScanLine = (Double[])fScanbuf[lLineNo].toArray(new Double[0]); CTSort lSort = new QuickSort(); lSort.sort(lScanLine); // The length will be divisible by 2 because we render closed polyons, // so every generateScanBits line is crossed twice (left and right edge of polygon, // no intersections allowed!). for(int n = 0; n < lScanLine.length; n += 2) { // Round lLineFrom (but .5 is handled oddly) // 1.5001 - 2.5 -> 1.0001 - 2.0 -> 2 int lXLo = (int)Math.ceil(lScanLine[n].doubleValue() - 0.5); // Round lLineTo, substract 1 // 1.5 - 2.4999 -> 1.0 - 1.9999 -> 1 int lXHi = (int)Math.floor(lScanLine[n + 1].doubleValue() - 0.5); // Limit low and high x to image dimensions if(lXLo < 0) { lXLo = 0; } if(lXHi >= fPoints) { lXHi = fPoints - 1; } if(lXLo <= lXHi) { /** * Shouldn't that always be true since we sorted? "Yes", BUT the * rounding might create lo 3.6 -> 4.0 and hi 3.7 -> 3.0 */ fScanBits.add(new ScanBit(lLineNo, lXLo, lXHi, pCurveType)); } } } return fScanBits; } public int getYMax() { return fLineMax; } public int getYMin() { return fLineMin; } } plantuml-1.2017.15/src/com/ctreber/acearth/scandot/000077500000000000000000000000001312650303100217135ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/acearth/scandot/DotGeneratorLines.java000066400000000000000000000037141312650303100261530ustar00rootroot00000000000000package com.ctreber.acearth.scandot; import com.ctreber.acearth.projection.Projection; import com.ctreber.acearth.util.Coordinate; import com.ctreber.acearth.util.Point2D; import com.ctreber.acearth.util.Point3D; /** *

Generate latitude and longitude grid as dots. * *

Refactored 08.11.2002 * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class DotGeneratorLines extends ScanDotGenerator { private Projection fProjection; private int fLineDivider; private int fPointDivider; private static final double PI = Math.PI; private static final double TWOPI = 2 * PI; private static final double HALFPI = PI / 2; public DotGeneratorLines(Projection pProjection, int pLineDevider, int pPointDivider) { fProjection = pProjection; fLineDivider = pLineDevider; fPointDivider = pPointDivider; } /** *

Paint grid. */ public void generateScanDots() { double lLonStep = TWOPI / (fLineDivider * 4); double lLatStep = PI / (fLineDivider * 2 * fPointDivider); for(double lLon = -PI; lLon <= PI; lLon += lLonStep) { for(double lLat = -HALFPI; lLat <= HALFPI; lLat += lLatStep) { transformAndAddDot(new Coordinate(lLat, lLon)); } } lLatStep = TWOPI / (fLineDivider * 4); lLonStep = PI / (fLineDivider * 2 * fPointDivider); for(double lLat = -HALFPI; lLat <= HALFPI; lLat += lLatStep) { for(double lLon = -PI; lLon <= PI; lLon += lLonStep) { transformAndAddDot(new Coordinate(lLat, lLon)); } } } private void transformAndAddDot(Coordinate pPos) { final Point3D lPointRotated = fProjection.rotate(pPos.getPoint3DRads()); if(fProjection.isVisible(lPointRotated)) { Point2D lPoint = fProjection.finalize(fProjection.project2D(lPointRotated)); if(fProjection.isWithinImage(lPoint)) { fDots.add(new ScanDot(ScanDot.DotTypeGrid, lPoint)); } } } } plantuml-1.2017.15/src/com/ctreber/acearth/scandot/DotGeneratorStars.java000066400000000000000000000025511312650303100261730ustar00rootroot00000000000000package com.ctreber.acearth.scandot; import java.util.Random; /** *

Generate random stars as dots. * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class DotGeneratorStars extends ScanDotGenerator { private final int fImageWidth; private final int fImageHeight; private int fBigStars; private double fStarFrequency; private final Random lRandom; public DotGeneratorStars(int pWidth, int pHeight, double pStarFrequency, int pBigStars, Random rnd) { lRandom = rnd; fImageWidth = pWidth; fImageHeight = pHeight; fStarFrequency = pStarFrequency; fBigStars = pBigStars; } public void generateScanDots() { // Make sure stars don't jump around between updates. // final Random lRandom = new Random(ACearth.getStartTime()); final int lStarsMax = (int)(fImageWidth * fImageHeight * fStarFrequency); for(int i = 0; i < lStarsMax; i++) { // "-1" to leave space for big stars. int x = (int)(lRandom.nextDouble() * (fImageWidth - 1)); int y = (int)(lRandom.nextDouble() * fImageHeight); fDots.add(new ScanDot(ScanDot.DotTypeStar, x, y)); // A big star is just two pixels wide. if((fBigStars != 0) && (Math.random() * 100 < fBigStars)) { fDots.add(new ScanDot(ScanDot.DotTypeStar, x + 1, y)); } } } } plantuml-1.2017.15/src/com/ctreber/acearth/scandot/ScanDot.java000066400000000000000000000021731312650303100241140ustar00rootroot00000000000000package com.ctreber.acearth.scandot; import com.ctreber.acearth.util.Point2D; /** *

A single scandot (opposed to a Polygon). * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class ScanDot implements Comparable { // types of dots public static final int DotTypeStar = 0; public static final int DotTypeGrid = 1; private int fX; private int fY; private int fType; public ScanDot(int pType, int pX, int pY) { fType = pType; fX = pX; fY = pY; } public ScanDot(int pType, Point2D pPoint) { fType = pType; fX = (int)pPoint.getX(); fY = (int)pPoint.getY(); } public int compareTo(Object o) { if(o instanceof ScanDot) { ScanDot lOther = (ScanDot)o; return fY > lOther.fY ? 1 : (fY < lOther.fY ? -1 : 0); } throw new IllegalArgumentException("Can't compare to " + o.getClass()); } public int getType() { return fType; } public int getX() { return fX; } public int getY() { return fY; } public String toString() { return fX + ", " + fY + ": " + fType; } } plantuml-1.2017.15/src/com/ctreber/acearth/scandot/ScanDotGenerator.java000066400000000000000000000007341312650303100257640ustar00rootroot00000000000000package com.ctreber.acearth.scandot; import java.util.ArrayList; import java.util.List; /** *

A ScanDotGenerator produces ScanDots. * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ abstract public class ScanDotGenerator { List fDots = new ArrayList(); /** *

Generate whatever dots are generated. */ abstract public void generateScanDots(); public List getScanDots() { return fDots; } } plantuml-1.2017.15/src/com/ctreber/acearth/shader/000077500000000000000000000000001312650303100215265ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/acearth/shader/Shader.java000066400000000000000000000071271312650303100236060ustar00rootroot00000000000000package com.ctreber.acearth.shader; import java.awt.Color; import com.ctreber.acearth.projection.Projection; import com.ctreber.acearth.scanbit.BitGeneratorMap; import com.ctreber.acearth.util.Coordinate; import com.ctreber.acearth.util.Point3D; /** *

A shader computes Colors for a row of pixel types, depending * on lighting parameters.

* *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

* @author Christian Treber, ct@ctreber.com * */ abstract public class Shader { private static final Color COLOR_SPACE = Color.black; private static final Color COLOR_STAR = Color.white; private static final Color COLOR_WATER = Color.blue; private static final Color COLOR_LAND = Color.green; // Brown //static final Color COLOR_LAND = new Color(255, 136, 25); private static final Color COLOR_GRID_LAND = Color.white; // Bright blue private static final Color COLOR_GRID_WATER = new Color(128, 128, 255); /**

Needed to calculate lighting vectors. */ Projection fProjection; // Stuff below only needed when shading. private Coordinate fSunPos; private double fNightSideBrightness; private double fDaySideBrightness; private double fTerminatorDiscontinuity; private double fDaySideValueBase; private double fDaySideValueRange; Point3D fLightVector; abstract public Color[] getShadedColors(int pRowNo, int[] pRowTypes); public void init() { // Precompute shading parameters. I personally find the terminator // stuff is obscure and might as well be left out. final double tmp = fTerminatorDiscontinuity / 100; // 100%: day, 0%: night fDaySideValueBase = (int)(tmp * fDaySideBrightness + (1 - tmp) * fNightSideBrightness); fDaySideValueRange = fDaySideBrightness - fDaySideValueBase; fLightVector = fProjection.rotate(fSunPos.getPoint3D()); } Color getShadedColorForType(int pType, double pSunValue) { double lBrightness; if(pSunValue < 0) { // The sun is below the horizon. lBrightness = fNightSideBrightness / 100; } else { // The sun is above the horizon. The brightness will range from // the base to the maximum value. lBrightness = (fDaySideValueBase + pSunValue * fDaySideValueRange) / 100; } if(lBrightness > 1.0) { lBrightness = 1.0; } switch(pType) { case BitGeneratorMap.PixTypeSpace: return COLOR_SPACE; case BitGeneratorMap.PixTypeStar: return COLOR_STAR; case BitGeneratorMap.PixTypeGridLand: return shade(COLOR_GRID_LAND, lBrightness); case BitGeneratorMap.PixTypeGridWater: return shade(COLOR_GRID_WATER, lBrightness); case BitGeneratorMap.PixTypeLand: return shade(COLOR_LAND, lBrightness); case BitGeneratorMap.PixTypeWater: return shade(COLOR_WATER, lBrightness); } return null; } private static Color shade(Color pColor, double pBrightness) { return new Color((int)(pColor.getRed() * pBrightness), (int)(pColor.getGreen() * pBrightness), (int)(pColor.getBlue() * pBrightness)); } public void setProjection(Projection pProjection) { fProjection = pProjection; } public void setSunPos(Coordinate pSunPos) { fSunPos = pSunPos; } public void setDaySideBrightness(double pDaySideBrightness) { fDaySideBrightness = pDaySideBrightness; } public void setNightSideBrightness(double pNightSideBrightness) { fNightSideBrightness = pNightSideBrightness; } public void setTerminatorDiscontinuity(double pTerminatorDiscontinuity) { fTerminatorDiscontinuity = pTerminatorDiscontinuity; } } plantuml-1.2017.15/src/com/ctreber/acearth/shader/ShaderDefault.java000066400000000000000000000037141312650303100251110ustar00rootroot00000000000000package com.ctreber.acearth.shader; import java.awt.Color; /** *

Shader for projections which display the whole surface.

* *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

* @author Christian Treber, ct@ctreber.com * */ public class ShaderDefault extends Shader { public Color[] getShadedColors(int pRowNo, int[] pRowTypes) { final double y = fProjection.inverseProjectY(fProjection.inverseFinalizeY(pRowNo)); // conceptually, on each iteration of the i loop, we want: // // x = Math.sin(INV_XPROJECT(i)) * sqrt(1 - (y*y)); // z = cos(INV_XPROJECT(i)) * sqrt(1 - (y*y)); // // computing this directly is rather expensive, however, so we only // compute the first (i=0) pair of values directly; all other pairs // (i>0) are obtained through successive rotations of the original // pair (by inv_proj_scale radians). // // compute initial (x, z) values double tmp = Math.sqrt(1 - (y * y)); double x = Math.sin(fProjection.inverseFinalizeX(0)) * tmp; double z = Math.cos(fProjection.inverseFinalizeX(0)) * tmp; // compute rotation coefficients used // to find subsequent (x, z) values tmp = 1 / fProjection.getScale(); final double sin_theta = Math.sin(tmp); final double cos_theta = Math.cos(tmp); // save a little computation in the inner loop final double lYBySunVectorY = y * fLightVector.getY(); // use i_lim to encourage compilers to register loop limit final Color[] lColors = new Color[pRowTypes.length]; for(int lColNo = 0; lColNo < pRowTypes.length; lColNo++) { double lSunValue = (x * fLightVector.getX()) + lYBySunVectorY + (z * fLightVector.getZ()); lColors[lColNo] = getShadedColorForType(pRowTypes[lColNo], lSunValue); // compute next (x, z) values via 2-d rotation tmp = (cos_theta * z) - (sin_theta * x); x = (sin_theta * z) + (cos_theta * x); z = tmp; } return lColors; } } plantuml-1.2017.15/src/com/ctreber/acearth/shader/ShaderFlat.java000066400000000000000000000010511312650303100244030ustar00rootroot00000000000000package com.ctreber.acearth.shader; import java.awt.Color; /** *

Flat shader (does not care for Projection).

* *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

* @author Christian Treber, ct@ctreber.com * */ public class ShaderFlat extends Shader { public Color[] getShadedColors(int pRowNo, int[] pRowTypes) { final Color[] lColors = new Color[pRowTypes.length]; for(int i = 0; i < pRowTypes.length; i++) { lColors[i] = getShadedColorForType(pRowTypes[i], 1.0); } return lColors; } } plantuml-1.2017.15/src/com/ctreber/acearth/shader/ShaderOrtho.java000066400000000000000000000025731312650303100246220ustar00rootroot00000000000000package com.ctreber.acearth.shader; import java.awt.Color; /** *

Shader for the orthographic projection.

* *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

* @author Christian Treber, ct@ctreber.com * */ public class ShaderOrtho extends Shader { private static double[] fXValues; public Color[] getShadedColors(int pRowNo, int[] pRowTypes) { if(pRowNo == 0) { fXValues = computeXValues(pRowTypes.length); } final double y = fProjection.inverseProjectY(fProjection.inverseFinalizeY(pRowNo)); final double tmp = 1 - (y * y); final double lYBySunVectorY = y * fLightVector.getY(); final Color[] lColors = new Color[pRowTypes.length]; for(int lColNo = 0; lColNo < pRowTypes.length; lColNo++) { double x = fXValues[lColNo]; double z = Math.sqrt(tmp - (x * x)); double lSunValue = (x * fLightVector.getX()) + lYBySunVectorY + (z * fLightVector.getZ()); lColors[lColNo] = getShadedColorForType(pRowTypes[lColNo], lSunValue); } return lColors; } /** * * @return X value for each column in image. */ private double[] computeXValues(int pWidth) { final double[] lTable = new double[pWidth]; for(int lColNo = 0; lColNo < pWidth; lColNo++) { lTable[lColNo] = fProjection.inverseProjectX(fProjection.inverseFinalizeX(lColNo)); } return lTable; } } plantuml-1.2017.15/src/com/ctreber/acearth/util/000077500000000000000000000000001312650303100212355ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/acearth/util/Coordinate.java000066400000000000000000000064631312650303100242000ustar00rootroot00000000000000package com.ctreber.acearth.util; import java.io.IOException; import java.io.Writer; /** *

* Latitude and longitude coordinate. Can be used as declination and right * ascension as well. * *

* © 2002 Christian Treber, ct@ctreber.com * * @author Christian Treber, ct@ctreber.com * */ public class Coordinate { /* * MeanObliquity gives the mean obliquity of the earth's axis at epoch * 1990.0 (computed as 23.440592 degrees according to the method given in * duffett-smith, section 27) */ private static final double MEAN_OBLIQUITY = 23.440592 * Toolkit.TWOPI / 360; // Or DE private double fLat; // Or RA private double fLong; public Coordinate() { } /** *

* Construct a location specfied by two angles. Your choice if in degrees or * rads, but keep track! * * @param pLong * Longitude or RA * @param pLat * Latitude or DE */ public Coordinate(double pLat, double pLong) { fLat = pLat; fLong = pLong; } public void renderAsXML(Writer writer) throws IOException { writer.write("\n"); writer.write(" " + fLat + "\n"); writer.write(" " + fLong + "\n"); writer.write("\n"); } public Point3D getPoint3D() { final double lLatRad = Toolkit.degsToRads(fLat); final double lLongRad = Toolkit.degsToRads(fLong); final double lX = Math.cos(lLatRad) * Math.sin(lLongRad); final double lY = Math.sin(lLatRad); final double lZ = Math.cos(lLatRad) * Math.cos(lLongRad); return new Point3D(lX, lY, lZ); } /** *

* Assumes coordinate is not in degrees but rads. * * @return */ public Point3D getPoint3DRads() { final double lX = Math.cos(fLat) * Math.sin(fLong); final double lY = Math.sin(fLat); final double lZ = Math.cos(fLat) * Math.cos(fLong); return new Point3D(lX, lY, lZ); } /** *

* Convert from ecliptic to equatorial coordinates (after duffett-smith, * section 27) */ public Coordinate eclipticToEquatorial() { final double sin_e = Math.sin(MEAN_OBLIQUITY); final double cos_e = Math.cos(MEAN_OBLIQUITY); final double lRA = Math.atan2(Math.sin(fLong) * cos_e - Math.tan(fLat) * sin_e, Math.cos(fLong)); final double lDE = Math.asin(Math.sin(fLat) * cos_e + Math.cos(fLat) * sin_e * Math.sin(fLong)); return new Coordinate(lDE, lRA); } /** *

* Add position to this position, make sure coordinates are valid. */ public void add(Coordinate lOther) { fLat += lOther.fLat; fLong += lOther.fLong; wrap(); } /** *

* Warp coordinates exceeding valid values. Happens when latitudes and * longitudes are added or substracted. */ public void wrap() { if (fLat > 90) { fLat = 180 - fLat; fLong += 180; } else if (fLat < -90) { fLat = -180 - fLat; fLong += 180; } if (fLong > 180) { do { fLong -= 360; } while (fLong > 180); } else if (fLong < -180) { do { fLong += 360; } while (fLong < -180); } } public double getLat() { return fLat; } public double getDE() { return fLat; } public double getLong() { return fLong; } public double getRA() { return fLong; } public boolean check() { return (-90 <= fLat) && (fLat <= 90) && (-180 <= fLong) && (fLong <= 180); } public String toString() { return "lat: " + fLat + ", long: " + fLong; } } plantuml-1.2017.15/src/com/ctreber/acearth/util/EdgeCrossing.java000066400000000000000000000017321312650303100244570ustar00rootroot00000000000000package com.ctreber.acearth.util; /** *

Holds information about a line crossing "the edge of Earth". * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class EdgeCrossing { public static final int XingTypeEntry = 0; public static final int XingTypeExit = 1; private int fType; private int fIndex; private double fX; private double fY; private double fAngle; public EdgeCrossing(int pType, int pIndex, double pX, double pY, double pAngle) { fType = pType; fX = pX; fY = pY; fAngle = pAngle; fIndex = pIndex; } public String toString() { return fType + ": " + fX + ", " + fY + ", " + fAngle + " (" + fIndex + ")"; } public int getType() { return fType; } public double getX() { return fX; } public double getY() { return fY; } public double getAngle() { return fAngle; } public int getIndex() { return fIndex; } } plantuml-1.2017.15/src/com/ctreber/acearth/util/Point2D.java000066400000000000000000000007461312650303100233660ustar00rootroot00000000000000package com.ctreber.acearth.util; /** *

A point in a 2 axis space. * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class Point2D { private double fX; private double fY; public Point2D(double pX, double pY) { fX = pX; fY = pY; } public double getX() { return fX; } public double getY() { return fY; } public String toString() { return "x: " + fX + ", y: " + fY; } } plantuml-1.2017.15/src/com/ctreber/acearth/util/Point3D.java000066400000000000000000000013521312650303100233610ustar00rootroot00000000000000package com.ctreber.acearth.util; /** *

A point in a 2 axis space. * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class Point3D { private double fX; private double fY; private double fZ; public Point3D(double pX, double pY, double pZ) { fX = pX; fY = pY; fZ = pZ; } public double getX() { return fX; } public double getY() { return fY; } public double getZ() { return fZ; } public String toString() { return "x: " + fX + ", y: " + fY + ", z: " + fZ; } public Coordinate getCoordinate() { return new Coordinate(Toolkit.radsToDegs(Math.asin(fY)), Toolkit.radsToDegs(Math.atan2(fX, fZ))); } } plantuml-1.2017.15/src/com/ctreber/acearth/util/Polygon.java000066400000000000000000000014041312650303100235260ustar00rootroot00000000000000package com.ctreber.acearth.util; /** *

A polygon in a 3 axis space. * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class Polygon { public static final int LAND = 1; public static final int WATER = -1; private int fType; private Point3D[] fPoints; public Polygon(int pType, Point3D[] pPoints) { fType = pType; fPoints = pPoints; } public int getType() { return fType; } public Point3D[] getPoints() { return fPoints; } public Point3D getPoint(int pIndex) { return fPoints[pIndex]; } public int getSize() { return fPoints.length; } public String toString() { return "Type " + fType + ", " + fPoints.length + " points"; } } plantuml-1.2017.15/src/com/ctreber/acearth/util/StringParser.java000066400000000000000000000047741312650303100245370ustar00rootroot00000000000000package com.ctreber.acearth.util; import java.util.ArrayList; import java.util.List; /** *

Cuts a string in words separated by white space. Quotes and square * brackets are recognized (that is, white space within is ignored). * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class StringParser { public static List parse(String pLine) { final List lSections = new ArrayList(); // True if within word. boolean lInSectionP = false; // Current char char lChar; // Wait for this character before switching back to normal parsing. char lSeparator = ' '; // Part count. int lSectionNo = 0; // Part start position int lSectionStart = 0; // Part end position int lSectionEnd = 0; final int lLen = pLine.length(); for(int lCharNo = 0; lCharNo <= lLen; lCharNo++) { if(lCharNo < lLen) { lChar = pLine.charAt(lCharNo); } else { // This is a fictional last character. lChar = ' '; } if(lInSectionP) { // In section. Termination is by space or specific separator. if((lChar != ' ') || (lSeparator != ' ')) { // It's not a space, or it is a space, but we wait for a special separator. if(lChar == lSeparator) { // We waited for this separator. Switch back to normal parsing. lSeparator = ' '; lSectionEnd = lCharNo - 1; } else { lSectionEnd = lCharNo; } } else { // Section has ended (with a space). lSections.add(pLine.substring(lSectionStart, lSectionEnd + 1)); lSectionNo++; lInSectionP = false; } } else { // Not in a section, skipping white space. if(lChar != ' ') { // No white space: a section has started. if(lChar == '"') { // Special parsing "string" lSeparator = '"'; lSectionStart = lCharNo + 1; } else if(lChar == '[') { // Special parsing "square brackets" lSeparator = ']'; lSectionStart = lCharNo + 1; } else { // Use normal parsing. lSeparator = ' '; lSectionEnd = lSectionStart = lCharNo; } lInSectionP = true; } else { // More void... } } } return lSections; } } plantuml-1.2017.15/src/com/ctreber/acearth/util/SunPositionCalculator.java000066400000000000000000000175441312650303100264170ustar00rootroot00000000000000package com.ctreber.acearth.util; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; /** *

Calculates the position of the point on Earth which is directly * below the sun or the moon. * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class SunPositionCalculator { /* * the epoch upon which these astronomical calculations are based is * 1990 january 0.0, 631065600 seconds since the beginning of the * "unix epoch" (00:00:00 GMT, Jan. 1, 1970) * * given a number of seconds since the start of the unix epoch, * daysSinceEpoch() computes the number of days since the start of the * astronomical epoch (1990 january 0.0) */ private static final long EPOCH_START = 631065600000l; /* * assuming the apparent orbit of the sun about the earth is circular, * the rate at which the orbit progresses is given by RadsPerDay -- * TWOPI radians per orbit divided by 365.242191 days per year: */ private static final double RADS_PER_DAY = Toolkit.TWOPI / 365.242191; /* * details of sun's apparent orbit at epoch 1990.0 (after * duffett-smith, table 6, section 46) * * Epsilon_g (ecliptic longitude at epoch 1990.0) 279.403303 degrees * OmegaBar_g (ecliptic longitude of perigee) 282.768422 degrees * Eccentricity (eccentricity of orbit) 0.016713 */ private static final double EPSILON_G = Toolkit.degsToRads(279.403303); private static final double OMEGA_BAR_G = Toolkit.degsToRads(282.768422); private static final double ECCENTRICITY = 0.016713; /* * Lunar parameters, epoch January 0, 1990.0 */ private static final double MOON_MEAN_LONGITUDE = Toolkit.degsToRads(318.351648); private static final double MOON_MEAN_LONGITUDE_PERIGEE = Toolkit.degsToRads(36.340410); private static final double MOON_MEAN_LONGITUDE_NODE = Toolkit.degsToRads(318.510107); private static final double MOON_INCLINATION = Toolkit.degsToRads(5.145396); private static final double SIDERAL_MONTH = 27.3217; /** *

Calculate the position of the mean sun: where the sun would * be if the earth's orbit were circular instead of ellipictal. * *

Verified. * * @param pDays days since ephemeris epoch */ private static double getMeanSunLongitude(double pDays) { double N, M; N = RADS_PER_DAY * pDays; N = Toolkit.fmod(N, 0, Toolkit.TWOPI); if(N < 0) { N += Toolkit.TWOPI; } M = N + EPSILON_G - OMEGA_BAR_G; if(M < 0) { M += Toolkit.TWOPI; } return M; } /** *

Compute ecliptic longitude of sun (in radians) * (after duffett-smith, section 47) * *

Verified. * * @param pMillis Milliseconds since unix epoch */ private static double getSunEclipticLongitude(long pMillis) { final double lDays = daysSinceEpoch(pMillis); final double M_sun = getMeanSunLongitude(lDays); final double E = doKepler(M_sun); final double v = 2 * Math.atan(Math.sqrt((1 + ECCENTRICITY) / (1 - ECCENTRICITY)) * Math.tan(E / 2)); return (v + OMEGA_BAR_G); } static double daysSinceEpoch(long pMillis) { return (double)(pMillis - EPOCH_START) / 24 / 3600 / 1000; } /** * solve Kepler's equation via Newton's method * (after duffett-smith, section 47) * *

Verified. */ private static double doKepler(double M) { double E; double lDelta; E = M; while(true) { lDelta = E - ECCENTRICITY * Math.sin(E) - M; if(Math.abs(lDelta) <= 1e-10) { break; } E -= lDelta / (1 - ECCENTRICITY * Math.cos(E)); } return E; } /** *

computing julian dates (assuming gregorian calendar, thus this is * only valid for dates of 1582 oct 15 or later) * (after duffett-smith, section 4) * *

Verified. * * @param pYear year (e.g. 19xx) * @param pMonth month (jan=1, feb=2, ...) * @param pDay day of month */ private static double getJulianDate(int pYear, int pMonth, int pDay) { if((pMonth == 1) || (pMonth == 2)) { pYear -= 1; pMonth += 12; } final int A = pYear / 100; final int B = 2 - A + (A / 4); final int C = (int)(365.25 * pYear); final int D = (int)(30.6001 * (pMonth + 1)); return B + C + D + pDay + 1720994.5; } /** *

compute greenwich mean sidereal time (getGST) corresponding to a given * number of milliseconds since the unix epoch * (after duffett-smith, section 12) * *

Verified. */ private static double getGST(long pMillis) { final Calendar lCal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); lCal.setTime(new Date(pMillis)); final double lJulianDate = getJulianDate(lCal.get(Calendar.YEAR), lCal.get(Calendar.MONTH) + 1, lCal.get(Calendar.DAY_OF_MONTH)); final double T = (lJulianDate - 2451545) / 36525; double T0 = ((T + 2.5862e-5) * T + 2400.051336) * T + 6.697374558; T0 = Toolkit.fmod(T0, 0, 24.0); if(T0 < 0) { T0 += 24; } final double UT = lCal.get(Calendar.HOUR_OF_DAY) + (lCal.get(Calendar.MINUTE) + lCal.get(Calendar.SECOND) / 60.0) / 60.0; T0 += UT * 1.002737909; T0 = Toolkit.fmod(T0, 0, 24.0); if(T0 < 0) { T0 += 24; } return T0; } /** *

Given a particular time (expressed in milliseconds since the unix * epoch), compute position on the earth (lat, lon) such that sun is * directly overhead. * *

Verified. * * @param pMillis seconds since unix epoch * */ public static Coordinate getSunPositionOnEarth(long pMillis) { final Coordinate lSunPosEc = new Coordinate(0.0, getSunEclipticLongitude(pMillis)); final Coordinate lSunPosEq = lSunPosEc.eclipticToEquatorial(); final double lRA = Toolkit.limitRads(lSunPosEq.getRA() - (Toolkit.TWOPI / 24) * getGST(pMillis)); return new Coordinate(Toolkit.radsToDegs(lSunPosEq.getDE()), Toolkit.radsToDegs(lRA)); } /** *

Given a particular time (expressed in milliseconds since the unix * epoch), compute position on the earth (lat, lon) such that the * moon is directly overhead. * * Based on duffett-smith **2nd ed** section 61; combines some steps * into single expressions to reduce the number of extra variables. * *

Verified. */ public static Coordinate getMoonPositionOnEarth(long pMillis) { final double lDays = daysSinceEpoch(pMillis); double lSunLongEc = getSunEclipticLongitude(pMillis); final double Ms = getMeanSunLongitude(lDays); double L = Toolkit.limitRads(Toolkit.fmod(lDays / SIDERAL_MONTH, 0, 1.0) * Toolkit.TWOPI + MOON_MEAN_LONGITUDE); double Mm = Toolkit.limitRads(L - Toolkit.degsToRads(0.1114041 * lDays) - MOON_MEAN_LONGITUDE_PERIGEE); double N = Toolkit.limitRads(MOON_MEAN_LONGITUDE_NODE - Toolkit.degsToRads(0.0529539 * lDays)); final double Ev = Toolkit.degsToRads(1.2739) * Math.sin(2.0 * (L - lSunLongEc) - Mm); final double Ae = Toolkit.degsToRads(0.1858) * Math.sin(Ms); Mm += Ev - Ae - Toolkit.degsToRads(0.37) * Math.sin(Ms); final double Ec = Toolkit.degsToRads(6.2886) * Math.sin(Mm); L += Ev + Ec - Ae + Toolkit.degsToRads(0.214) * Math.sin(2.0 * Mm); L += Toolkit.degsToRads(0.6583) * Math.sin(2.0 * (L - lSunLongEc)); N -= Toolkit.degsToRads(0.16) * Math.sin(Ms); L -= N; lSunLongEc = Toolkit.limitRads((Math.abs(Math.cos(L)) < 1e-12) ? (N + Math.sin(L) * Math.cos(MOON_INCLINATION) * Math.PI / 2) : (N + Math.atan2(Math.sin(L) * Math.cos(MOON_INCLINATION), Math.cos(L)))); final double lSunLatEc = Math.asin(Math.sin(L) * Math.sin(MOON_INCLINATION)); final Coordinate lSunPosEq = new Coordinate(lSunLatEc, lSunLongEc).eclipticToEquatorial(); final double lRA = Toolkit.limitRads(lSunPosEq.getRA() - (Toolkit.TWOPI / 24) * getGST(pMillis)); return new Coordinate(Toolkit.radsToDegs(lSunPosEq.getDE()), Toolkit.radsToDegs(lRA)); } } plantuml-1.2017.15/src/com/ctreber/acearth/util/Toolkit.java000066400000000000000000000055101312650303100235260ustar00rootroot00000000000000package com.ctreber.acearth.util; import java.util.HashSet; import java.util.StringTokenizer; /** *

Some tools. * *

© 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class Toolkit { public static final double TWOPI = Math.PI * 2; public static final double PI = Math.PI; public static final double HALFPI = Math.PI / 2; private static final HashSet fsNoCap; static { fsNoCap = new HashSet(); fsNoCap.add("a"); fsNoCap.add("as"); fsNoCap.add("to"); fsNoCap.add("of"); fsNoCap.add("the"); fsNoCap.add("off"); fsNoCap.add("and"); fsNoCap.add("mid"); } public static double degsToRads(double pDegrees) { return pDegrees * TWOPI / 360; } public static double radsToDegs(double pRadians) { return pRadians * 360 / TWOPI; } /** * Force an angular value into the range [-PI, +PI] */ public static double limitRads(double x) { return fmod(x, -Math.PI, Math.PI); } /** *

Verified. */ public static double fmod(double pValue, double pMod) { while(pValue < 0) { pValue += pMod; } while(pValue > pMod) { pValue -= pMod; } return pValue; } /** *

Examples: min -2, max 2: range 4 * *

*/ public static double fmod(double pValue, double pMinValue, double pMaxValue) { final double lRange = pMaxValue - pMinValue; int lFact = (int)((pValue - pMinValue) / lRange); if(pValue < pMinValue) { lFact--; } return pValue - lFact * lRange; } /** *

Capitalize String. Uppercase words smaller/equal than 3 chars, * lowercase defined exceptions. Capitalize within word after '.' and '-'. * Capitalize all others. */ public static String intelligentCapitalize(String pText) { boolean lDoCap = false; final StringTokenizer lST = new StringTokenizer(pText, ".- ", true); final StringBuffer lSB = new StringBuffer(50); while(lST.hasMoreTokens()) { String lWord = lST.nextToken(); if(lWord.equals(".") || lWord.equals("-")) { lDoCap = true; lSB.append(lWord); continue; } if(lWord.equals(" ")) { lDoCap = false; lSB.append(lWord); continue; } if(lDoCap || (lWord.length() > 3)) { lSB.append(Character.toUpperCase(lWord.charAt(0))); lSB.append(lWord.substring(1).toLowerCase()); } else { if(fsNoCap.contains(lWord.toLowerCase())) { lSB.append(lWord.toLowerCase()); } else { lSB.append(lWord.toUpperCase()); } } } return lSB.toString(); } } plantuml-1.2017.15/src/com/ctreber/aclib/000077500000000000000000000000001312650303100177235ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/aclib/gui/000077500000000000000000000000001312650303100205075ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOBoolean.java000066400000000000000000000010271312650303100231650ustar00rootroot00000000000000package com.ctreber.aclib.gui; /** *

* *

© 2002 Christian Treber, ct@ctreber.com

* @author Christian Treber, ct@ctreber.com * */ public class MOBoolean extends MonitoredObject { private boolean fBoolean; public MOBoolean() { } public MOBoolean(boolean pBoolean) { fBoolean = pBoolean; } public void set(boolean pValue) { fBoolean = pValue; fireValueChanged(); } public boolean get() { return fBoolean; } public boolean checkRange() { return true; } } plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOChangeListener.java000066400000000000000000000004751312650303100245070ustar00rootroot00000000000000package com.ctreber.aclib.gui; /** *

Implemented by classes interetested in MonitoredObject values changes.

* *

© 2002 Christian Treber, ct@ctreber.com

* @author Christian Treber, ct@ctreber.com * */ public interface MOChangeListener { public void valueChanged(MonitoredObject pObject); } plantuml-1.2017.15/src/com/ctreber/aclib/gui/MODouble.java000066400000000000000000000024531312650303100230240ustar00rootroot00000000000000package com.ctreber.aclib.gui; /** *

* *

© 2002 Christian Treber, ct@ctreber.com

* @author Christian Treber, ct@ctreber.com * */ public class MODouble extends MonitoredObject { private double fDouble; private boolean fCheckRange = false; private double fMin; private double fMax; public MODouble() { } public MODouble(double pDouble) { fDouble = pDouble; } public MODouble(double pDouble, double pMin, double pMax) { fMin = pMin; fMax = pMax; fCheckRange = true; set(pDouble); } public void set(double pDouble) { if(!checkRange(pDouble)) { throw new IllegalArgumentException("Argument '" + pDouble + "' out of range [" + niceFormat(fMin) + "; " + niceFormat(fMax) + "]"); } fDouble = pDouble; fireValueChanged(); } private static String niceFormat(double pDouble) { if(pDouble == Double.MAX_VALUE) { return "Infinity"; } if(pDouble == Double.MIN_VALUE) { return "-Infinity"; } return Double.toString(pDouble); } public double get() { return fDouble; } private boolean checkRange(double pDouble) { return !fCheckRange || (fMin <= pDouble) && (pDouble <= fMax); } public boolean checkRange() { return checkRange(fDouble); } } plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOEnum.java000066400000000000000000000026231312650303100225150ustar00rootroot00000000000000package com.ctreber.aclib.gui; import java.util.HashSet; /** *

* Monitored enumeration value. *

* *

* © 2002 Christian Treber, ct@ctreber.com *

* * @author Christian Treber, ct@ctreber.com * */ public class MOEnum extends MonitoredObject { private HashSet fValidValues = new HashSet(); /** *

* null if no value selected */ private Object fValue; public void addValidValue(Object pValue) { fValidValues.add(pValue); } public void set(Object pValue) { if (pValue != null) { checkValue(pValue); } fValue = pValue; fireValueChanged(); } public Object get() { return fValue; } public boolean is(Object pObject) { checkValue(pObject); return this.equals(pObject); } public int hashCode() { if (fValue == null) { return 0; } return fValue.hashCode(); } private void checkValue(Object pValue) { if (!fValidValues.contains(pValue)) { throw new IllegalArgumentException("Illegal enum value '" + pValue + "'"); } } public boolean equals(Object obj) { if (obj instanceof MOEnum) { MOEnum lOther = (MOEnum) obj; if (fValue == null) { return lOther.fValue == null; } return fValue.equals(lOther.fValue); } if (fValue == null) { return obj.equals(null); } return fValue.equals(obj); } public HashSet getValidValues() { return fValidValues; } public boolean checkRange() { return true; } } plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOInteger.java000066400000000000000000000024451312650303100232100ustar00rootroot00000000000000package com.ctreber.aclib.gui; /** *

* *

© 2002 Christian Treber, ct@ctreber.com

* @author Christian Treber, ct@ctreber.com * */ public class MOInteger extends MonitoredObject { private int fInteger; private boolean fCheckRange = false; private int fMin; private int fMax; public MOInteger() { } public MOInteger(int pInteger) { fInteger = pInteger; } public MOInteger(int pInteger, int pMin, int pMax) { fMin = pMin; fMax = pMax; fCheckRange = true; set(pInteger); } public void set(int pInteger) { if(!checkRange(pInteger)) { throw new IllegalArgumentException("Argument '" + pInteger + "' out of range [" + niceFormat(fMin) + "; " + niceFormat(fMax) + "]"); } fInteger = pInteger; fireValueChanged(); } private static String niceFormat(int pInteger) { if(pInteger == Integer.MAX_VALUE) { return "Infinity"; } if(pInteger == Integer.MIN_VALUE) { return "-Infinity"; } return Integer.toString(pInteger); } public int get() { return fInteger; } private boolean checkRange(int pInteger) { return !fCheckRange || (fMin <= pInteger) && (pInteger <= fMax); } public boolean checkRange() { return checkRange(fInteger); } } plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOString.java000066400000000000000000000007611312650303100230600ustar00rootroot00000000000000package com.ctreber.aclib.gui; /** *

* *

© 2002 Christian Treber, ct@ctreber.com

* @author Christian Treber, ct@ctreber.com * */ public class MOString extends MonitoredObject { private String fString; public MOString(String pString) { fString = pString; } public void set(String pString) { fString = pString; fireValueChanged(); } public String get() { return fString; } public boolean checkRange() { return true; } } plantuml-1.2017.15/src/com/ctreber/aclib/gui/MonitoredObject.java000066400000000000000000000016311312650303100244420ustar00rootroot00000000000000package com.ctreber.aclib.gui; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** *

*

* *

* © 2002 Christian Treber, ct@ctreber.com *

* * @author Christian Treber, ct@ctreber.com * */ abstract public class MonitoredObject { private List fListeners = new ArrayList(); public void addChangeListener(MOChangeListener pListener) { fListeners.add(pListener); } public void removeChangeListener(MOChangeListener pListener) { fListeners.remove(pListener); } void fireValueChanged() { final Iterator lIt = fListeners.iterator(); while (lIt.hasNext()) { MOChangeListener lListener = (MOChangeListener) lIt.next(); lListener.valueChanged(this); } } /** *

* Check value agains (possibly defined) constraints. * * @return True if value is within range or range is not checked. */ abstract public boolean checkRange(); } plantuml-1.2017.15/src/com/ctreber/aclib/sort/000077500000000000000000000000001312650303100207125ustar00rootroot00000000000000plantuml-1.2017.15/src/com/ctreber/aclib/sort/CTSort.java000066400000000000000000000006321312650303100227340ustar00rootroot00000000000000package com.ctreber.aclib.sort; import java.util.Comparator; /** *

Teehee - found that Comparator allready exists. * * © 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ abstract public class CTSort { public void sort(Object[] items) { sort(items, new DefaultComparator()); } abstract public void sort(Object[] items, Comparator comparator); } plantuml-1.2017.15/src/com/ctreber/aclib/sort/DefaultComparator.java000066400000000000000000000007071312650303100251750ustar00rootroot00000000000000package com.ctreber.aclib.sort; import java.util.Comparator; /** *

Implements a default Comparator based on Comparable and a ascending * sort order. Requires that the two objects are Comparable. * * © 2002 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com * */ public class DefaultComparator implements Comparator { public int compare(Object o1, Object o2) { return ((Comparable)o1).compareTo(o2); } } plantuml-1.2017.15/src/com/ctreber/aclib/sort/QuickSort.java000066400000000000000000000036241312650303100235060ustar00rootroot00000000000000package com.ctreber.aclib.sort; import java.util.Comparator; /** * © 2001 Christian Treber, ct@ctreber.com * @author Christian Treber, ct@ctreber.com */ public class QuickSort extends CTSort { public void sort(Object[] items, Comparator comparator) { if(items.length <= 1) { // Nothing to sort t all or only one element. return; } qsort(items, comparator, 0, items.length - 1); insertionSort(items, comparator, 0, items.length - 1); } private void qsort(Object[] items, Comparator comparator, int l, int r) { final int M = 4; int i; int j; Object v; if((r - l) > M) { i = (r + l) / 2; if(comparator.compare(items[l], items[i]) > 0) { swap(items, l, i); } if(comparator.compare(items[l], items[r]) > 0) { swap(items, l, r); } if(comparator.compare(items[i], items[r]) > 0) { swap(items, i, r); } j = r - 1; swap(items, i, j); i = l; v = items[j]; while(true) { while(comparator.compare(items[++i], v) < 0) { } while(comparator.compare(items[--j], v) > 0) { } if(j < i) { break; } swap(items, i, j); } swap(items, i, r - 1); qsort(items, comparator, l, j); qsort(items, comparator, i + 1, r); } } private static void swap(Object[] items, int i, int j) { final Object tmp; tmp = items[i]; items[i] = items[j]; items[j] = tmp; } private static void insertionSort(Object[] items, Comparator comparator, int lo0, int hi0) { int i; int j; Object v; for(i = lo0 + 1; i <= hi0; i++) { v = items[i]; j = i; while((j > lo0) && (comparator.compare(items[j - 1], v) > 0)) { items[j] = items[j - 1]; j--; } items[j] = v; } } } plantuml-1.2017.15/src/com/google/000077500000000000000000000000001312650303100164775ustar00rootroot00000000000000plantuml-1.2017.15/src/com/google/zxing/000077500000000000000000000000001312650303100176365ustar00rootroot00000000000000plantuml-1.2017.15/src/com/google/zxing/BarcodeFormat.java000066400000000000000000000057751312650303100232270ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing; import java.util.Hashtable; /** * Enumerates barcode formats known to this package. * * @author Sean Owen */ public final class BarcodeFormat { // No, we can't use an enum here. J2ME doesn't support it. private static final Hashtable VALUES = new Hashtable(); /** QR Code 2D barcode format. */ public static final BarcodeFormat QR_CODE = new BarcodeFormat("QR_CODE"); /** Data Matrix 2D barcode format. */ public static final BarcodeFormat DATA_MATRIX = new BarcodeFormat("DATA_MATRIX"); /** UPC-E 1D format. */ public static final BarcodeFormat UPC_E = new BarcodeFormat("UPC_E"); /** UPC-A 1D format. */ public static final BarcodeFormat UPC_A = new BarcodeFormat("UPC_A"); /** EAN-8 1D format. */ public static final BarcodeFormat EAN_8 = new BarcodeFormat("EAN_8"); /** EAN-13 1D format. */ public static final BarcodeFormat EAN_13 = new BarcodeFormat("EAN_13"); /** UPC/EAN extension format. Not a stand-alone format. */ public static final BarcodeFormat UPC_EAN_EXTENSION = new BarcodeFormat("UPC_EAN_EXTENSION"); /** Code 128 1D format. */ public static final BarcodeFormat CODE_128 = new BarcodeFormat("CODE_128"); /** Code 39 1D format. */ public static final BarcodeFormat CODE_39 = new BarcodeFormat("CODE_39"); /** Code 93 1D format. */ public static final BarcodeFormat CODE_93 = new BarcodeFormat("CODE_93"); /** CODABAR 1D format. */ public static final BarcodeFormat CODABAR = new BarcodeFormat("CODABAR"); /** ITF (Interleaved Two of Five) 1D format. */ public static final BarcodeFormat ITF = new BarcodeFormat("ITF"); /** RSS 14 */ public static final BarcodeFormat RSS14 = new BarcodeFormat("RSS14"); /** PDF417 format. */ public static final BarcodeFormat PDF417 = new BarcodeFormat("PDF417"); /** RSS EXPANDED */ public static final BarcodeFormat RSS_EXPANDED = new BarcodeFormat("RSS_EXPANDED"); private final String name; private BarcodeFormat(String name) { this.name = name; VALUES.put(name, this); } public String getName() { return name; } public String toString() { return name; } public static BarcodeFormat valueOf(String name) { if (name == null || name.length() == 0) { throw new IllegalArgumentException(); } BarcodeFormat format = (BarcodeFormat) VALUES.get(name); if (format == null) { throw new IllegalArgumentException(); } return format; } } plantuml-1.2017.15/src/com/google/zxing/ChecksumException.java000066400000000000000000000020511312650303100241200ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing; /** * Thrown when a barcode was successfully detected and decoded, but * was not returned because its checksum feature failed. * * @author Sean Owen */ public final class ChecksumException extends ReaderException { private static final ChecksumException instance = new ChecksumException(); private ChecksumException() { // do nothing } public static ChecksumException getChecksumInstance() { return instance; } }plantuml-1.2017.15/src/com/google/zxing/DecodeHintType.java000066400000000000000000000052521312650303100233550ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing; import java.io.Reader; /** * Encapsulates a type of hint that a caller may pass to a barcode reader to help it * more quickly or accurately decode it. It is up to implementations to decide what, * if anything, to do with the information that is supplied. * * @author Sean Owen * @author dswitkin@google.com (Daniel Switkin) * @see Reader#decode(BinaryBitmap,java.util.Hashtable) */ public final class DecodeHintType { // No, we can't use an enum here. J2ME doesn't support it. /** * Unspecified, application-specific hint. Maps to an unspecified {@link Object}. */ public static final DecodeHintType OTHER = new DecodeHintType(); /** * Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; * use {@link Boolean#TRUE}. */ public static final DecodeHintType PURE_BARCODE = new DecodeHintType(); /** * Image is known to be of one of a few possible formats. * Maps to a {@link java.util.Vector} of {@link BarcodeFormat}s. */ public static final DecodeHintType POSSIBLE_FORMATS = new DecodeHintType(); /** * Spend more time to try to find a barcode; optimize for accuracy, not speed. * Doesn't matter what it maps to; use {@link Boolean#TRUE}. */ public static final DecodeHintType TRY_HARDER = new DecodeHintType(); /** * Specifies what character encoding to use when decoding, where applicable (type String) */ public static final DecodeHintType CHARACTER_SET = new DecodeHintType(); /** * Allowed lengths of encoded data -- reject anything else. Maps to an int[]. */ public static final DecodeHintType ALLOWED_LENGTHS = new DecodeHintType(); /** * Assume Code 39 codes employ a check digit. Maps to {@link Boolean}. */ public static final DecodeHintType ASSUME_CODE_39_CHECK_DIGIT = new DecodeHintType(); /** * The caller needs to be notified via callback when a possible {@link ResultPoint} * is found. Maps to a {@link ResultPointCallback}. */ public static final DecodeHintType NEED_RESULT_POINT_CALLBACK = new DecodeHintType(); private DecodeHintType() { } } plantuml-1.2017.15/src/com/google/zxing/EncodeHintType.java000066400000000000000000000022511312650303100233630ustar00rootroot00000000000000/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing; /** * These are a set of hints that you may pass to Writers to specify their behavior. * * @author dswitkin@google.com (Daniel Switkin) */ public final class EncodeHintType { /** * Specifies what degree of error correction to use, for example in QR Codes (type Integer). */ public static final EncodeHintType ERROR_CORRECTION = new EncodeHintType(); /** * Specifies what character encoding to use where applicable (type String) */ public static final EncodeHintType CHARACTER_SET = new EncodeHintType(); private EncodeHintType() { } } plantuml-1.2017.15/src/com/google/zxing/FormatException.java000066400000000000000000000021251312650303100236100ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing; /** * Thrown when a barcode was successfully detected, but some aspect of * the content did not conform to the barcode's format rules. This could have * been due to a mis-detection. * * @author Sean Owen */ public final class FormatException extends ReaderException { private static final FormatException instance = new FormatException(); private FormatException() { // do nothing } public static FormatException getFormatInstance() { return instance; } }plantuml-1.2017.15/src/com/google/zxing/NotFoundException.java000066400000000000000000000020461312650303100241160ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing; /** * Thrown when a barcode was not found in the image. It might have been * partially detected but could not be confirmed. * * @author Sean Owen */ public final class NotFoundException extends ReaderException { private static final NotFoundException instance = new NotFoundException(); private NotFoundException() { // do nothing } public static NotFoundException getNotFoundInstance() { return instance; } }plantuml-1.2017.15/src/com/google/zxing/ReaderException.java000066400000000000000000000072451312650303100235720ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing; /** * The general exception class throw when something goes wrong during decoding of a barcode. * This includes, but is not limited to, failing checksums / error correction algorithms, being * unable to locate finder timing patterns, and so on. * * @author Sean Owen */ public abstract class ReaderException extends Exception { // TODO: Currently we throw up to 400 ReaderExceptions while scanning a single 240x240 image before // rejecting it. This involves a lot of overhead and memory allocation, and affects both performance // and latency on continuous scan clients. In the future, we should change all the decoders not to // throw exceptions for routine events, like not finding a barcode on a given row. Instead, we // should return error codes back to the callers, and simply delete this class. In the mean time, I // have altered this class to be as lightweight as possible, by ignoring the exception string, and // by disabling the generation of stack traces, which is especially time consuming. These are just // temporary measures, pending the big cleanup. //private static final ReaderException instance = new ReaderException(); // EXCEPTION TRACKING SUPPORT // Identifies who is throwing exceptions and how often. To use: // // 1. Uncomment these lines and the code below which uses them. // 2. Uncomment the two corresponding lines in j2se/CommandLineRunner.decode() // 3. Change core to build as Java 1.5 temporarily // private static int exceptionCount = 0; // private static Map throwers = new HashMap(32); ReaderException() { // do nothing } //public static ReaderException getInstance() { // Exception e = new Exception(); // // Take the stack frame before this one. // StackTraceElement stack = e.getStackTrace()[1]; // String key = stack.getClassName() + "." + stack.getMethodName() + "(), line " + // stack.getLineNumber(); // if (throwers.containsKey(key)) { // Integer value = throwers.get(key); // value++; // throwers.put(key, value); // } else { // throwers.put(key, 1); // } // exceptionCount++; //return instance; //} // public static int getExceptionCountAndReset() { // int temp = exceptionCount; // exceptionCount = 0; // return temp; // } // // public static String getThrowersAndReset() { // StringBuilder builder = new StringBuilder(1024); // Object[] keys = throwers.keySet().toArray(); // for (int x = 0; x < keys.length; x++) { // String key = (String) keys[x]; // Integer value = throwers.get(key); // builder.append(key); // builder.append(": "); // builder.append(value); // builder.append("\n"); // } // throwers.clear(); // return builder.toString(); // } // Prevent stack traces from being taken // srowen says: huh, my IDE is saying this is not an override. native methods can't be overridden? // This, at least, does not hurt. Because we use a singleton pattern here, it doesn't matter anyhow. public final Throwable fillInStackTrace() { return null; } } plantuml-1.2017.15/src/com/google/zxing/ResultPoint.java000066400000000000000000000073551312650303100230030ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing; /** *

Encapsulates a point of interest in an image containing a barcode. Typically, this * would be the location of a finder pattern or the corner of the barcode, for example.

* * @author Sean Owen */ public class ResultPoint { private final float x; private final float y; public ResultPoint(float x, float y) { this.x = x; this.y = y; } public final float getX() { return x; } public final float getY() { return y; } public boolean equals(Object other) { if (other instanceof ResultPoint) { ResultPoint otherPoint = (ResultPoint) other; return x == otherPoint.x && y == otherPoint.y; } return false; } public int hashCode() { return 31 * Float.floatToIntBits(x) + Float.floatToIntBits(y); } public String toString() { StringBuffer result = new StringBuffer(25); result.append('('); result.append(x); result.append(','); result.append(y); result.append(')'); return result.toString(); } /** *

Orders an array of three ResultPoints in an order [A,B,C] such that AB < AC and * BC < AC and the angle between BC and BA is less than 180 degrees. */ public static void orderBestPatterns(ResultPoint[] patterns) { // Find distances between pattern centers float zeroOneDistance = distance(patterns[0], patterns[1]); float oneTwoDistance = distance(patterns[1], patterns[2]); float zeroTwoDistance = distance(patterns[0], patterns[2]); ResultPoint pointA, pointB, pointC; // Assume one closest to other two is B; A and C will just be guesses at first if (oneTwoDistance >= zeroOneDistance && oneTwoDistance >= zeroTwoDistance) { pointB = patterns[0]; pointA = patterns[1]; pointC = patterns[2]; } else if (zeroTwoDistance >= oneTwoDistance && zeroTwoDistance >= zeroOneDistance) { pointB = patterns[1]; pointA = patterns[0]; pointC = patterns[2]; } else { pointB = patterns[2]; pointA = patterns[0]; pointC = patterns[1]; } // Use cross product to figure out whether A and C are correct or flipped. // This asks whether BC x BA has a positive z component, which is the arrangement // we want for A, B, C. If it's negative, then we've got it flipped around and // should swap A and C. if (crossProductZ(pointA, pointB, pointC) < 0.0f) { ResultPoint temp = pointA; pointA = pointC; pointC = temp; } patterns[0] = pointA; patterns[1] = pointB; patterns[2] = pointC; } /** * @return distance between two points */ public static float distance(ResultPoint pattern1, ResultPoint pattern2) { float xDiff = pattern1.getX() - pattern2.getX(); float yDiff = pattern1.getY() - pattern2.getY(); return (float) Math.sqrt((double) (xDiff * xDiff + yDiff * yDiff)); } /** * Returns the z component of the cross product between vectors BC and BA. */ private static float crossProductZ(ResultPoint pointA, ResultPoint pointB, ResultPoint pointC) { float bX = pointB.x; float bY = pointB.y; return ((pointC.x - bX) * (pointA.y - bY)) - ((pointC.y - bY) * (pointA.x - bX)); } } plantuml-1.2017.15/src/com/google/zxing/Writer.java000066400000000000000000000034451312650303100217630ustar00rootroot00000000000000/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing; import java.util.Hashtable; import com.google.zxing.common.BitMatrix; /** * The base class for all objects which encode/generate a barcode image. * * @author dswitkin@google.com (Daniel Switkin) */ public interface Writer { /** * Encode a barcode using the default settings. * * @param contents The contents to encode in the barcode * @param format The barcode format to generate * @param width The preferred width in pixels * @param height The preferred height in pixels * @return The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) */ BitMatrix encode(String contents, BarcodeFormat format, int multiple) throws WriterException; /** * * @param contents The contents to encode in the barcode * @param format The barcode format to generate * @param width The preferred width in pixels * @param height The preferred height in pixels * @param hints Additional parameters to supply to the encoder * @return The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) */ BitMatrix encode(String contents, BarcodeFormat format, int multiple, Hashtable hints) throws WriterException; } plantuml-1.2017.15/src/com/google/zxing/WriterException.java000066400000000000000000000017261312650303100236420ustar00rootroot00000000000000/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing; /** * A base class which covers the range of exceptions which may occur when encoding a barcode using * the Writer framework. * * @author dswitkin@google.com (Daniel Switkin) */ public final class WriterException extends Exception { public WriterException() { super(); } public WriterException(String message) { super(message); } } plantuml-1.2017.15/src/com/google/zxing/client/000077500000000000000000000000001312650303100211145ustar00rootroot00000000000000plantuml-1.2017.15/src/com/google/zxing/client/j2se/000077500000000000000000000000001312650303100217575ustar00rootroot00000000000000plantuml-1.2017.15/src/com/google/zxing/client/j2se/MatrixToImageWriter.java000066400000000000000000000044571312650303100265430ustar00rootroot00000000000000/* * Copyright 2009 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.client.j2se; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.io.OutputStream; import javax.imageio.ImageIO; import com.google.zxing.common.BitMatrix; /** * Writes a {@link BitMatrix} to {@link BufferedImage}, * file or stream. Provided here instead of core since it depends on * Java SE libraries. * * @author Sean Owen */ public final class MatrixToImageWriter { private static final int BLACK = 0xFF000000; private static final int WHITE = 0xFFFFFFFF; private MatrixToImageWriter() {} /** * Renders a {@link BitMatrix} as an image, where "false" bits are rendered * as white, and "true" bits are rendered as black. */ public static BufferedImage toBufferedImage(BitMatrix matrix) { int width = matrix.getWidth(); int height = matrix.getHeight(); BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { image.setRGB(x, y, matrix.get(x, y) ? BLACK : WHITE); } } return image; } /** * Writes a {@link BitMatrix} to a file. * * @see #toBufferedImage(BitMatrix) */ public static void writeToFile(BitMatrix matrix, String format, File file) throws IOException { BufferedImage image = toBufferedImage(matrix); ImageIO.write(image, format, file); } /** * Writes a {@link BitMatrix} to a stream. * * @see #toBufferedImage(BitMatrix) */ public static void writeToStream(BitMatrix matrix, String format, OutputStream stream) throws IOException { BufferedImage image = toBufferedImage(matrix); ImageIO.write(image, format, stream); } } plantuml-1.2017.15/src/com/google/zxing/common/000077500000000000000000000000001312650303100211265ustar00rootroot00000000000000plantuml-1.2017.15/src/com/google/zxing/common/BitArray.java000066400000000000000000000152741312650303100235170ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.common; /** *

A simple, fast array of bits, represented compactly by an array of ints internally.

* * @author Sean Owen */ public final class BitArray { // TODO: I have changed these members to be public so ProGuard can inline get() and set(). Ideally // they'd be private and we'd use the -allowaccessmodification flag, but Dalvik rejects the // resulting binary at runtime on Android. If we find a solution to this, these should be changed // back to private. public int[] bits; public int size; public BitArray() { this.size = 0; this.bits = new int[1]; } public BitArray(int size) { this.size = size; this.bits = makeArray(size); } public int getSize() { return size; } public int getSizeInBytes() { return (size + 7) >> 3; } private void ensureCapacity(int size) { if (size > bits.length << 5) { int[] newBits = makeArray(size); System.arraycopy(bits, 0, newBits, 0, bits.length); this.bits = newBits; } } /** * @param i bit to get * @return true iff bit i is set */ public boolean get(int i) { return (bits[i >> 5] & (1 << (i & 0x1F))) != 0; } /** * Sets bit i. * * @param i bit to set */ public void set(int i) { bits[i >> 5] |= 1 << (i & 0x1F); } /** * Flips bit i. * * @param i bit to set */ public void flip(int i) { bits[i >> 5] ^= 1 << (i & 0x1F); } /** * Sets a block of 32 bits, starting at bit i. * * @param i first bit to set * @param newBits the new value of the next 32 bits. Note again that the least-significant bit * corresponds to bit i, the next-least-significant to i+1, and so on. */ public void setBulk(int i, int newBits) { bits[i >> 5] = newBits; } /** * Clears all bits (sets to false). */ public void clear() { int max = bits.length; for (int i = 0; i < max; i++) { bits[i] = 0; } } /** * Efficient method to check if a range of bits is set, or not set. * * @param start start of range, inclusive. * @param end end of range, exclusive * @param value if true, checks that bits in range are set, otherwise checks that they are not set * @return true iff all bits are set or not set in range, according to value argument * @throws IllegalArgumentException if end is less than or equal to start */ public boolean isRange(int start, int end, boolean value) { if (end < start) { throw new IllegalArgumentException(); } if (end == start) { return true; // empty range matches } end--; // will be easier to treat this as the last actually set bit -- inclusive int firstInt = start >> 5; int lastInt = end >> 5; for (int i = firstInt; i <= lastInt; i++) { int firstBit = i > firstInt ? 0 : start & 0x1F; int lastBit = i < lastInt ? 31 : end & 0x1F; int mask; if (firstBit == 0 && lastBit == 31) { mask = -1; } else { mask = 0; for (int j = firstBit; j <= lastBit; j++) { mask |= 1 << j; } } // Return false if we're looking for 1s and the masked bits[i] isn't all 1s (that is, // equals the mask, or we're looking for 0s and the masked portion is not all 0s if ((bits[i] & mask) != (value ? mask : 0)) { return false; } } return true; } public void appendBit(boolean bit) { ensureCapacity(size + 1); if (bit) { bits[size >> 5] |= (1 << (size & 0x1F)); } size++; } /** * Appends the least-significant bits, from value, in order from most-significant to * least-significant. For example, appending 6 bits from 0x000001E will append the bits * 0, 1, 1, 1, 1, 0 in that order. */ public void appendBits(int value, int numBits) { if (numBits < 0 || numBits > 32) { throw new IllegalArgumentException("Num bits must be between 0 and 32"); } ensureCapacity(size + numBits); for (int numBitsLeft = numBits; numBitsLeft > 0; numBitsLeft--) { appendBit(((value >> (numBitsLeft - 1)) & 0x01) == 1); } } public void appendBitArray(BitArray other) { int otherSize = other.getSize(); ensureCapacity(size + otherSize); for (int i = 0; i < otherSize; i++) { appendBit(other.get(i)); } } public void xor(BitArray other) { if (bits.length != other.bits.length) { throw new IllegalArgumentException("Sizes don't match"); } for (int i = 0; i < bits.length; i++) { // The last byte could be incomplete (i.e. not have 8 bits in // it) but there is no problem since 0 XOR 0 == 0. bits[i] ^= other.bits[i]; } } /** * * @param bitOffset first bit to start writing * @param array array to write into. Bytes are written most-significant byte first. This is the opposite * of the internal representation, which is exposed by {@link #getBitArray()} * @param offset position in array to start writing * @param numBytes how many bytes to write */ public void toBytes(int bitOffset, byte[] array, int offset, int numBytes) { for (int i = 0; i < numBytes; i++) { int theByte = 0; for (int j = 0; j < 8; j++) { if (get(bitOffset)) { theByte |= 1 << (7 - j); } bitOffset++; } array[offset + i] = (byte) theByte; } } /** * @return underlying array of ints. The first element holds the first 32 bits, and the least * significant bit is bit 0. */ public int[] getBitArray() { return bits; } /** * Reverses all bits in the array. */ public void reverse() { int[] newBits = new int[bits.length]; int size = this.size; for (int i = 0; i < size; i++) { if (get(size - i - 1)) { newBits[i >> 5] |= 1 << (i & 0x1F); } } bits = newBits; } private static int[] makeArray(int size) { return new int[(size + 31) >> 5]; } public String toString() { StringBuffer result = new StringBuffer(size); for (int i = 0; i < size; i++) { if ((i & 0x07) == 0) { result.append(' '); } result.append(get(i) ? 'X' : '.'); } return result.toString(); } }plantuml-1.2017.15/src/com/google/zxing/common/BitMatrix.java000066400000000000000000000145421312650303100237020ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.common; /** *

Represents a 2D matrix of bits. In function arguments below, and throughout the common * module, x is the column position, and y is the row position. The ordering is always x, y. * The origin is at the top-left.

* *

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins * with a new int. This is done intentionally so that we can copy out a row into a BitArray very * efficiently.

* *

The ordering of bits is row-major. Within each int, the least significant bits are used first, * meaning they represent lower x values. This is compatible with BitArray's implementation.

* * @author Sean Owen * @author dswitkin@google.com (Daniel Switkin) */ public final class BitMatrix { // TODO: Just like BitArray, these need to be public so ProGuard can inline them. public final int width; public final int height; public final int rowSize; public final int[] bits; // A helper to construct a square matrix. public BitMatrix(int dimension) { this(dimension, dimension); } public BitMatrix(int width, int height) { if (width < 1 || height < 1) { throw new IllegalArgumentException("Both dimensions must be greater than 0"); } this.width = width; this.height = height; this.rowSize = (width + 31) >> 5; bits = new int[rowSize * height]; } /** *

Gets the requested bit, where true means black.

* * @param x The horizontal component (i.e. which column) * @param y The vertical component (i.e. which row) * @return value of given bit in matrix */ public boolean get(int x, int y) { int offset = y * rowSize + (x >> 5); return ((bits[offset] >>> (x & 0x1f)) & 1) != 0; } /** *

Sets the given bit to true.

* * @param x The horizontal component (i.e. which column) * @param y The vertical component (i.e. which row) */ public void set(int x, int y) { int offset = y * rowSize + (x >> 5); bits[offset] |= 1 << (x & 0x1f); } /** *

Flips the given bit.

* * @param x The horizontal component (i.e. which column) * @param y The vertical component (i.e. which row) */ public void flip(int x, int y) { int offset = y * rowSize + (x >> 5); bits[offset] ^= 1 << (x & 0x1f); } /** * Clears all bits (sets to false). */ public void clear() { int max = bits.length; for (int i = 0; i < max; i++) { bits[i] = 0; } } /** *

Sets a square region of the bit matrix to true.

* * @param left The horizontal position to begin at (inclusive) * @param top The vertical position to begin at (inclusive) * @param width The width of the region * @param height The height of the region */ public void setRegion(int left, int top, int width, int height) { if (top < 0 || left < 0) { throw new IllegalArgumentException("Left and top must be nonnegative"); } if (height < 1 || width < 1) { throw new IllegalArgumentException("Height and width must be at least 1"); } int right = left + width; int bottom = top + height; if (bottom > this.height || right > this.width) { throw new IllegalArgumentException("The region must fit inside the matrix"); } for (int y = top; y < bottom; y++) { int offset = y * rowSize; for (int x = left; x < right; x++) { bits[offset + (x >> 5)] |= 1 << (x & 0x1f); } } } /** * A fast method to retrieve one row of data from the matrix as a BitArray. * * @param y The row to retrieve * @param row An optional caller-allocated BitArray, will be allocated if null or too small * @return The resulting BitArray - this reference should always be used even when passing * your own row */ public BitArray getRow(int y, BitArray row) { if (row == null || row.getSize() < width) { row = new BitArray(width); } int offset = y * rowSize; for (int x = 0; x < rowSize; x++) { row.setBulk(x << 5, bits[offset + x]); } return row; } /** * This is useful in detecting a corner of a 'pure' barcode. * * @return {x,y} coordinate of top-left-most 1 bit, or null if it is all white */ public int[] getTopLeftOnBit() { int bitsOffset = 0; while (bitsOffset < bits.length && bits[bitsOffset] == 0) { bitsOffset++; } if (bitsOffset == bits.length) { return null; } int y = bitsOffset / rowSize; int x = (bitsOffset % rowSize) << 5; int theBits = bits[bitsOffset]; int bit = 0; while ((theBits << (31-bit)) == 0) { bit++; } x += bit; return new int[] {x, y}; } /** * @return The width of the matrix */ public int getWidth() { return width; } /** * @return The height of the matrix */ public int getHeight() { return height; } public boolean equals(Object o) { if (!(o instanceof BitMatrix)) { return false; } BitMatrix other = (BitMatrix) o; if (width != other.width || height != other.height || rowSize != other.rowSize || bits.length != other.bits.length) { return false; } for (int i = 0; i < bits.length; i++) { if (bits[i] != other.bits[i]) { return false; } } return true; } public int hashCode() { int hash = width; hash = 31 * hash + width; hash = 31 * hash + height; hash = 31 * hash + rowSize; for (int i = 0; i < bits.length; i++) { hash = 31 * hash + bits[i]; } return hash; } public String toString() { StringBuffer result = new StringBuffer(height * (width + 1)); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { result.append(get(x, y) ? "X " : " "); } result.append('\n'); } return result.toString(); } } plantuml-1.2017.15/src/com/google/zxing/common/BitSource.java000066400000000000000000000054741312650303100237020ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.common; /** *

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the * number of bits read is not often a multiple of 8.

* *

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array * it passed in, in which case all bets are off.

* * @author Sean Owen */ public final class BitSource { private final byte[] bytes; private int byteOffset; private int bitOffset; /** * @param bytes bytes from which this will read bits. Bits will be read from the first byte first. * Bits are read within a byte from most-significant to least-significant bit. */ public BitSource(byte[] bytes) { this.bytes = bytes; } /** * @param numBits number of bits to read * @return int representing the bits read. The bits will appear as the least-significant * bits of the int * @throws IllegalArgumentException if numBits isn't in [1,32] */ public int readBits(int numBits) { if (numBits < 1 || numBits > 32) { throw new IllegalArgumentException(); } int result = 0; // First, read remainder from current byte if (bitOffset > 0) { int bitsLeft = 8 - bitOffset; int toRead = numBits < bitsLeft ? numBits : bitsLeft; int bitsToNotRead = bitsLeft - toRead; int mask = (0xFF >> (8 - toRead)) << bitsToNotRead; result = (bytes[byteOffset] & mask) >> bitsToNotRead; numBits -= toRead; bitOffset += toRead; if (bitOffset == 8) { bitOffset = 0; byteOffset++; } } // Next read whole bytes if (numBits > 0) { while (numBits >= 8) { result = (result << 8) | (bytes[byteOffset] & 0xFF); byteOffset++; numBits -= 8; } // Finally read a partial byte if (numBits > 0) { int bitsToNotRead = 8 - numBits; int mask = (0xFF >> bitsToNotRead) << bitsToNotRead; result = (result << numBits) | ((bytes[byteOffset] & mask) >> bitsToNotRead); bitOffset += numBits; } } return result; } /** * @return number of bits that can be read successfully */ public int available() { return 8 * (bytes.length - byteOffset) - bitOffset; } } plantuml-1.2017.15/src/com/google/zxing/common/CharacterSetECI.java000066400000000000000000000070431312650303100246660ustar00rootroot00000000000000/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.common; import java.util.Hashtable; /** * Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 * of ISO 18004. * * @author Sean Owen */ public final class CharacterSetECI extends ECI { private static Hashtable VALUE_TO_ECI; private static Hashtable NAME_TO_ECI; private static void initialize() { VALUE_TO_ECI = new Hashtable(29); NAME_TO_ECI = new Hashtable(29); // TODO figure out if these values are even right! addCharacterSet(0, "Cp437"); addCharacterSet(1, new String[] {"ISO8859_1", "ISO-8859-1"}); addCharacterSet(2, "Cp437"); addCharacterSet(3, new String[] {"ISO8859_1", "ISO-8859-1"}); addCharacterSet(4, "ISO8859_2"); addCharacterSet(5, "ISO8859_3"); addCharacterSet(6, "ISO8859_4"); addCharacterSet(7, "ISO8859_5"); addCharacterSet(8, "ISO8859_6"); addCharacterSet(9, "ISO8859_7"); addCharacterSet(10, "ISO8859_8"); addCharacterSet(11, "ISO8859_9"); addCharacterSet(12, "ISO8859_10"); addCharacterSet(13, "ISO8859_11"); addCharacterSet(15, "ISO8859_13"); addCharacterSet(16, "ISO8859_14"); addCharacterSet(17, "ISO8859_15"); addCharacterSet(18, "ISO8859_16"); addCharacterSet(20, new String[] {"SJIS", "Shift_JIS"}); } private final String encodingName; private CharacterSetECI(int value, String encodingName) { super(value); this.encodingName = encodingName; } public String getEncodingName() { return encodingName; } private static void addCharacterSet(int value, String encodingName) { CharacterSetECI eci = new CharacterSetECI(value, encodingName); VALUE_TO_ECI.put(new Integer(value), eci); // can't use valueOf NAME_TO_ECI.put(encodingName, eci); } private static void addCharacterSet(int value, String[] encodingNames) { CharacterSetECI eci = new CharacterSetECI(value, encodingNames[0]); VALUE_TO_ECI.put(new Integer(value), eci); // can't use valueOf for (int i = 0; i < encodingNames.length; i++) { NAME_TO_ECI.put(encodingNames[i], eci); } } /** * @param value character set ECI value * @return {@link CharacterSetECI} representing ECI of given value, or null if it is legal but * unsupported * @throws IllegalArgumentException if ECI value is invalid */ public static CharacterSetECI getCharacterSetECIByValue(int value) { if (VALUE_TO_ECI == null) { initialize(); } if (value < 0 || value >= 900) { throw new IllegalArgumentException("Bad ECI value: " + value); } return (CharacterSetECI) VALUE_TO_ECI.get(new Integer(value)); } /** * @param name character set ECI encoding name * @return {@link CharacterSetECI} representing ECI for character encoding, or null if it is legal * but unsupported */ public static CharacterSetECI getCharacterSetECIByName(String name) { if (NAME_TO_ECI == null) { initialize(); } return (CharacterSetECI) NAME_TO_ECI.get(name); } }plantuml-1.2017.15/src/com/google/zxing/common/DecoderResult.java000066400000000000000000000033011312650303100245320ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.common; import java.util.Vector; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; /** *

Encapsulates the result of decoding a matrix of bits. This typically * applies to 2D barcode formats. For now it contains the raw bytes obtained, * as well as a String interpretation of those bytes, if applicable.

* * @author Sean Owen */ public final class DecoderResult { private final byte[] rawBytes; private final String text; private final Vector byteSegments; private final ErrorCorrectionLevel ecLevel; public DecoderResult(byte[] rawBytes, String text, Vector byteSegments, ErrorCorrectionLevel ecLevel) { if (rawBytes == null && text == null) { throw new IllegalArgumentException(); } this.rawBytes = rawBytes; this.text = text; this.byteSegments = byteSegments; this.ecLevel = ecLevel; } public byte[] getRawBytes() { return rawBytes; } public String getText() { return text; } public Vector getByteSegments() { return byteSegments; } public ErrorCorrectionLevel getECLevel() { return ecLevel; } }plantuml-1.2017.15/src/com/google/zxing/common/DetectorResult.java000066400000000000000000000024531312650303100247450ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.common; import com.google.zxing.ResultPoint; /** *

Encapsulates the result of detecting a barcode in an image. This includes the raw * matrix of black/white pixels corresponding to the barcode, and possibly points of interest * in the image, like the location of finder patterns or corners of the barcode in the image.

* * @author Sean Owen */ public final class DetectorResult { private final BitMatrix bits; private final ResultPoint[] points; public DetectorResult(BitMatrix bits, ResultPoint[] points) { this.bits = bits; this.points = points; } public BitMatrix getBits() { return bits; } public ResultPoint[] getPoints() { return points; } }plantuml-1.2017.15/src/com/google/zxing/common/ECI.java000066400000000000000000000026611312650303100223760ustar00rootroot00000000000000/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.common; /** * Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" * 5.3 of ISO 18004. * * @author Sean Owen */ public abstract class ECI { private final int value; ECI(int value) { this.value = value; } public int getValue() { return value; } /** * @param value ECI value * @return {@link ECI} representing ECI of given value, or null if it is legal but unsupported * @throws IllegalArgumentException if ECI value is invalid */ public static ECI getECIByValue(int value) { if (value < 0 || value > 999999) { throw new IllegalArgumentException("Bad ECI value: " + value); } if (value < 900) { // Character set ECIs use 000000 - 000899 return CharacterSetECI.getCharacterSetECIByValue(value); } return null; } } plantuml-1.2017.15/src/com/google/zxing/common/StringUtils.java000066400000000000000000000160201312650303100242570ustar00rootroot00000000000000/* * Copyright (C) 2010 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.common; import java.util.Hashtable; import com.google.zxing.DecodeHintType; /** * Common string-related functions. * * @author Sean Owen */ public final class StringUtils { private static final String PLATFORM_DEFAULT_ENCODING = System.getProperty("file.encoding"); public static final String SHIFT_JIS = "SJIS"; private static final String EUC_JP = "EUC_JP"; private static final String UTF8 = "UTF8"; private static final String ISO88591 = "ISO8859_1"; private static final boolean ASSUME_SHIFT_JIS = SHIFT_JIS.equalsIgnoreCase(PLATFORM_DEFAULT_ENCODING) || EUC_JP.equalsIgnoreCase(PLATFORM_DEFAULT_ENCODING); private StringUtils() {} /** * @param bytes bytes encoding a string, whose encoding should be guessed * @param hints decode hints if applicable * @return name of guessed encoding; at the moment will only guess one of: * {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform * default encoding if none of these can possibly be correct */ public static String guessEncoding(byte[] bytes, Hashtable hints) { if (hints != null) { String characterSet = (String) hints.get(DecodeHintType.CHARACTER_SET); if (characterSet != null) { return characterSet; } } // Does it start with the UTF-8 byte order mark? then guess it's UTF-8 if (bytes.length > 3 && bytes[0] == (byte) 0xEF && bytes[1] == (byte) 0xBB && bytes[2] == (byte) 0xBF) { return UTF8; } // For now, merely tries to distinguish ISO-8859-1, UTF-8 and Shift_JIS, // which should be by far the most common encodings. ISO-8859-1 // should not have bytes in the 0x80 - 0x9F range, while Shift_JIS // uses this as a first byte of a two-byte character. If we see this // followed by a valid second byte in Shift_JIS, assume it is Shift_JIS. // If we see something else in that second byte, we'll make the risky guess // that it's UTF-8. int length = bytes.length; boolean canBeISO88591 = true; boolean canBeShiftJIS = true; boolean canBeUTF8 = true; int utf8BytesLeft = 0; int maybeDoubleByteCount = 0; int maybeSingleByteKatakanaCount = 0; boolean sawLatin1Supplement = false; boolean sawUTF8Start = false; boolean lastWasPossibleDoubleByteStart = false; for (int i = 0; i < length && (canBeISO88591 || canBeShiftJIS || canBeUTF8); i++) { int value = bytes[i] & 0xFF; // UTF-8 stuff if (value >= 0x80 && value <= 0xBF) { if (utf8BytesLeft > 0) { utf8BytesLeft--; } } else { if (utf8BytesLeft > 0) { canBeUTF8 = false; } if (value >= 0xC0 && value <= 0xFD) { sawUTF8Start = true; int valueCopy = value; while ((valueCopy & 0x40) != 0) { utf8BytesLeft++; valueCopy <<= 1; } } } // ISO-8859-1 stuff if ((value == 0xC2 || value == 0xC3) && i < length - 1) { // This is really a poor hack. The slightly more exotic characters people might want to put in // a QR Code, by which I mean the Latin-1 supplement characters (e.g. u-umlaut) have encodings // that start with 0xC2 followed by [0xA0,0xBF], or start with 0xC3 followed by [0x80,0xBF]. int nextValue = bytes[i + 1] & 0xFF; if (nextValue <= 0xBF && ((value == 0xC2 && nextValue >= 0xA0) || (value == 0xC3 && nextValue >= 0x80))) { sawLatin1Supplement = true; } } if (value >= 0x7F && value <= 0x9F) { canBeISO88591 = false; } // Shift_JIS stuff if (value >= 0xA1 && value <= 0xDF) { // count the number of characters that might be a Shift_JIS single-byte Katakana character if (!lastWasPossibleDoubleByteStart) { maybeSingleByteKatakanaCount++; } } if (!lastWasPossibleDoubleByteStart && ((value >= 0xF0 && value <= 0xFF) || value == 0x80 || value == 0xA0)) { canBeShiftJIS = false; } if (((value >= 0x81 && value <= 0x9F) || (value >= 0xE0 && value <= 0xEF))) { // These start double-byte characters in Shift_JIS. Let's see if it's followed by a valid // second byte. if (lastWasPossibleDoubleByteStart) { // If we just checked this and the last byte for being a valid double-byte // char, don't check starting on this byte. If this and the last byte // formed a valid pair, then this shouldn't be checked to see if it starts // a double byte pair of course. lastWasPossibleDoubleByteStart = false; } else { // ... otherwise do check to see if this plus the next byte form a valid // double byte pair encoding a character. lastWasPossibleDoubleByteStart = true; if (i >= bytes.length - 1) { canBeShiftJIS = false; } else { int nextValue = bytes[i + 1] & 0xFF; if (nextValue < 0x40 || nextValue > 0xFC) { canBeShiftJIS = false; } else { maybeDoubleByteCount++; } // There is some conflicting information out there about which bytes can follow which in // double-byte Shift_JIS characters. The rule above seems to be the one that matches practice. } } } else { lastWasPossibleDoubleByteStart = false; } } if (utf8BytesLeft > 0) { canBeUTF8 = false; } // Easy -- if assuming Shift_JIS and no evidence it can't be, done if (canBeShiftJIS && ASSUME_SHIFT_JIS) { return SHIFT_JIS; } if (canBeUTF8 && sawUTF8Start) { return UTF8; } // Distinguishing Shift_JIS and ISO-8859-1 can be a little tough. The crude heuristic is: // - If we saw // - at least 3 bytes that starts a double-byte value (bytes that are rare in ISO-8859-1), or // - over 5% of bytes could be single-byte Katakana (also rare in ISO-8859-1), // - and, saw no sequences that are invalid in Shift_JIS, then we conclude Shift_JIS if (canBeShiftJIS && (maybeDoubleByteCount >= 3 || 20 * maybeSingleByteKatakanaCount > length)) { return SHIFT_JIS; } // Otherwise, we default to ISO-8859-1 unless we know it can't be if (!sawLatin1Supplement && canBeISO88591) { return ISO88591; } // Otherwise, we take a wild guess with platform encoding return PLATFORM_DEFAULT_ENCODING; } } plantuml-1.2017.15/src/com/google/zxing/common/reedsolomon/000077500000000000000000000000001312650303100234545ustar00rootroot00000000000000plantuml-1.2017.15/src/com/google/zxing/common/reedsolomon/GF256.java000066400000000000000000000072111312650303100250510ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.common.reedsolomon; /** *

This class contains utility methods for performing mathematical operations over * the Galois Field GF(256). Operations use a given primitive polynomial in calculations.

* *

Throughout this package, elements of GF(256) are represented as an int * for convenience and speed (but at the cost of memory). * Only the bottom 8 bits are really used.

* * @author Sean Owen */ public final class GF256 { public static final GF256 QR_CODE_FIELD = new GF256(0x011D); // x^8 + x^4 + x^3 + x^2 + 1 public static final GF256 DATA_MATRIX_FIELD = new GF256(0x012D); // x^8 + x^5 + x^3 + x^2 + 1 private final int[] expTable; private final int[] logTable; private final GF256Poly zero; private final GF256Poly one; /** * Create a representation of GF(256) using the given primitive polynomial. * * @param primitive irreducible polynomial whose coefficients are represented by * the bits of an int, where the least-significant bit represents the constant * coefficient */ private GF256(int primitive) { expTable = new int[256]; logTable = new int[256]; int x = 1; for (int i = 0; i < 256; i++) { expTable[i] = x; x <<= 1; // x = x * 2; we're assuming the generator alpha is 2 if (x >= 0x100) { x ^= primitive; } } for (int i = 0; i < 255; i++) { logTable[expTable[i]] = i; } // logTable[0] == 0 but this should never be used zero = new GF256Poly(this, new int[]{0}); one = new GF256Poly(this, new int[]{1}); } GF256Poly getZero() { return zero; } GF256Poly getOne() { return one; } /** * @return the monomial representing coefficient * x^degree */ GF256Poly buildMonomial(int degree, int coefficient) { if (degree < 0) { throw new IllegalArgumentException(); } if (coefficient == 0) { return zero; } int[] coefficients = new int[degree + 1]; coefficients[0] = coefficient; return new GF256Poly(this, coefficients); } /** * Implements both addition and subtraction -- they are the same in GF(256). * * @return sum/difference of a and b */ static int addOrSubtract(int a, int b) { return a ^ b; } /** * @return 2 to the power of a in GF(256) */ int exp(int a) { return expTable[a]; } /** * @return base 2 log of a in GF(256) */ int log(int a) { if (a == 0) { throw new IllegalArgumentException(); } return logTable[a]; } /** * @return multiplicative inverse of a */ int inverse(int a) { if (a == 0) { throw new ArithmeticException(); } return expTable[255 - logTable[a]]; } /** * @param a * @param b * @return product of a and b in GF(256) */ int multiply(int a, int b) { if (a == 0 || b == 0) { return 0; } int logSum = logTable[a] + logTable[b]; // index is a sped-up alternative to logSum % 255 since sum // is in [0,510]. Thanks to jmsachs for the idea return expTable[(logSum & 0xFF) + (logSum >>> 8)]; } } plantuml-1.2017.15/src/com/google/zxing/common/reedsolomon/GF256Poly.java000066400000000000000000000201441312650303100257150ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.common.reedsolomon; /** *

Represents a polynomial whose coefficients are elements of GF(256). * Instances of this class are immutable.

* *

Much credit is due to William Rucklidge since portions of this code are an indirect * port of his C++ Reed-Solomon implementation.

* * @author Sean Owen */ final class GF256Poly { private final GF256 field; private final int[] coefficients; /** * @param field the {@link GF256} instance representing the field to use * to perform computations * @param coefficients coefficients as ints representing elements of GF(256), arranged * from most significant (highest-power term) coefficient to least significant * @throws IllegalArgumentException if argument is null or empty, * or if leading coefficient is 0 and this is not a * constant polynomial (that is, it is not the monomial "0") */ GF256Poly(GF256 field, int[] coefficients) { if (coefficients == null || coefficients.length == 0) { throw new IllegalArgumentException(); } this.field = field; int coefficientsLength = coefficients.length; if (coefficientsLength > 1 && coefficients[0] == 0) { // Leading term must be non-zero for anything except the constant polynomial "0" int firstNonZero = 1; while (firstNonZero < coefficientsLength && coefficients[firstNonZero] == 0) { firstNonZero++; } if (firstNonZero == coefficientsLength) { this.coefficients = field.getZero().coefficients; } else { this.coefficients = new int[coefficientsLength - firstNonZero]; System.arraycopy(coefficients, firstNonZero, this.coefficients, 0, this.coefficients.length); } } else { this.coefficients = coefficients; } } int[] getCoefficients() { return coefficients; } /** * @return degree of this polynomial */ int getDegree() { return coefficients.length - 1; } /** * @return true iff this polynomial is the monomial "0" */ boolean isZero() { return coefficients[0] == 0; } /** * @return coefficient of x^degree term in this polynomial */ int getCoefficient(int degree) { return coefficients[coefficients.length - 1 - degree]; } /** * @return evaluation of this polynomial at a given point */ int evaluateAt(int a) { if (a == 0) { // Just return the x^0 coefficient return getCoefficient(0); } int size = coefficients.length; if (a == 1) { // Just the sum of the coefficients int result = 0; for (int i = 0; i < size; i++) { result = GF256.addOrSubtract(result, coefficients[i]); } return result; } int result = coefficients[0]; for (int i = 1; i < size; i++) { result = GF256.addOrSubtract(field.multiply(a, result), coefficients[i]); } return result; } GF256Poly addOrSubtract(GF256Poly other) { if (!field.equals(other.field)) { throw new IllegalArgumentException("GF256Polys do not have same GF256 field"); } if (isZero()) { return other; } if (other.isZero()) { return this; } int[] smallerCoefficients = this.coefficients; int[] largerCoefficients = other.coefficients; if (smallerCoefficients.length > largerCoefficients.length) { int[] temp = smallerCoefficients; smallerCoefficients = largerCoefficients; largerCoefficients = temp; } int[] sumDiff = new int[largerCoefficients.length]; int lengthDiff = largerCoefficients.length - smallerCoefficients.length; // Copy high-order terms only found in higher-degree polynomial's coefficients System.arraycopy(largerCoefficients, 0, sumDiff, 0, lengthDiff); for (int i = lengthDiff; i < largerCoefficients.length; i++) { sumDiff[i] = GF256.addOrSubtract(smallerCoefficients[i - lengthDiff], largerCoefficients[i]); } return new GF256Poly(field, sumDiff); } GF256Poly multiply(GF256Poly other) { if (!field.equals(other.field)) { throw new IllegalArgumentException("GF256Polys do not have same GF256 field"); } if (isZero() || other.isZero()) { return field.getZero(); } int[] aCoefficients = this.coefficients; int aLength = aCoefficients.length; int[] bCoefficients = other.coefficients; int bLength = bCoefficients.length; int[] product = new int[aLength + bLength - 1]; for (int i = 0; i < aLength; i++) { int aCoeff = aCoefficients[i]; for (int j = 0; j < bLength; j++) { product[i + j] = GF256.addOrSubtract(product[i + j], field.multiply(aCoeff, bCoefficients[j])); } } return new GF256Poly(field, product); } GF256Poly multiply(int scalar) { if (scalar == 0) { return field.getZero(); } if (scalar == 1) { return this; } int size = coefficients.length; int[] product = new int[size]; for (int i = 0; i < size; i++) { product[i] = field.multiply(coefficients[i], scalar); } return new GF256Poly(field, product); } GF256Poly multiplyByMonomial(int degree, int coefficient) { if (degree < 0) { throw new IllegalArgumentException(); } if (coefficient == 0) { return field.getZero(); } int size = coefficients.length; int[] product = new int[size + degree]; for (int i = 0; i < size; i++) { product[i] = field.multiply(coefficients[i], coefficient); } return new GF256Poly(field, product); } GF256Poly[] divide(GF256Poly other) { if (!field.equals(other.field)) { throw new IllegalArgumentException("GF256Polys do not have same GF256 field"); } if (other.isZero()) { throw new IllegalArgumentException("Divide by 0"); } GF256Poly quotient = field.getZero(); GF256Poly remainder = this; int denominatorLeadingTerm = other.getCoefficient(other.getDegree()); int inverseDenominatorLeadingTerm = field.inverse(denominatorLeadingTerm); while (remainder.getDegree() >= other.getDegree() && !remainder.isZero()) { int degreeDifference = remainder.getDegree() - other.getDegree(); int scale = field.multiply(remainder.getCoefficient(remainder.getDegree()), inverseDenominatorLeadingTerm); GF256Poly term = other.multiplyByMonomial(degreeDifference, scale); GF256Poly iterationQuotient = field.buildMonomial(degreeDifference, scale); quotient = quotient.addOrSubtract(iterationQuotient); remainder = remainder.addOrSubtract(term); } return new GF256Poly[] { quotient, remainder }; } public String toString() { StringBuffer result = new StringBuffer(8 * getDegree()); for (int degree = getDegree(); degree >= 0; degree--) { int coefficient = getCoefficient(degree); if (coefficient != 0) { if (coefficient < 0) { result.append(" - "); coefficient = -coefficient; } else { if (result.length() > 0) { result.append(" + "); } } if (degree == 0 || coefficient != 1) { int alphaPower = field.log(coefficient); if (alphaPower == 0) { result.append('1'); } else if (alphaPower == 1) { result.append('a'); } else { result.append("a^"); result.append(alphaPower); } } if (degree != 0) { if (degree == 1) { result.append('x'); } else { result.append("x^"); result.append(degree); } } } } return result.toString(); } } plantuml-1.2017.15/src/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java000066400000000000000000000052461312650303100300540ustar00rootroot00000000000000/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.common.reedsolomon; import java.util.Vector; /** *

Implements Reed-Solomon enbcoding, as the name implies.

* * @author Sean Owen * @author William Rucklidge */ public final class ReedSolomonEncoder { private final GF256 field; private final Vector cachedGenerators; public ReedSolomonEncoder(GF256 field) { if (!GF256.QR_CODE_FIELD.equals(field)) { throw new IllegalArgumentException("Only QR Code is supported at this time"); } this.field = field; this.cachedGenerators = new Vector(); cachedGenerators.addElement(new GF256Poly(field, new int[] { 1 })); } private GF256Poly buildGenerator(int degree) { if (degree >= cachedGenerators.size()) { GF256Poly lastGenerator = (GF256Poly) cachedGenerators.elementAt(cachedGenerators.size() - 1); for (int d = cachedGenerators.size(); d <= degree; d++) { GF256Poly nextGenerator = lastGenerator.multiply(new GF256Poly(field, new int[] { 1, field.exp(d - 1) })); cachedGenerators.addElement(nextGenerator); lastGenerator = nextGenerator; } } return (GF256Poly) cachedGenerators.elementAt(degree); } public void encode(int[] toEncode, int ecBytes) { if (ecBytes == 0) { throw new IllegalArgumentException("No error correction bytes"); } int dataBytes = toEncode.length - ecBytes; if (dataBytes <= 0) { throw new IllegalArgumentException("No data bytes provided"); } GF256Poly generator = buildGenerator(ecBytes); int[] infoCoefficients = new int[dataBytes]; System.arraycopy(toEncode, 0, infoCoefficients, 0, dataBytes); GF256Poly info = new GF256Poly(field, infoCoefficients); info = info.multiplyByMonomial(ecBytes, 1); GF256Poly remainder = info.divide(generator)[1]; int[] coefficients = remainder.getCoefficients(); int numZeroCoefficients = ecBytes - coefficients.length; for (int i = 0; i < numZeroCoefficients; i++) { toEncode[dataBytes + i] = 0; } System.arraycopy(coefficients, 0, toEncode, dataBytes + numZeroCoefficients, coefficients.length); } } plantuml-1.2017.15/src/com/google/zxing/common/reedsolomon/ReedSolomonException.java000066400000000000000000000016521312650303100304300ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.common.reedsolomon; /** *

Thrown when an exception occurs during Reed-Solomon decoding, such as when * there are too many errors to correct.

* * @author Sean Owen */ public final class ReedSolomonException extends Exception { public ReedSolomonException(String message) { super(message); } }plantuml-1.2017.15/src/com/google/zxing/datamatrix/000077500000000000000000000000001312650303100217745ustar00rootroot00000000000000plantuml-1.2017.15/src/com/google/zxing/datamatrix/decoder/000077500000000000000000000000001312650303100234015ustar00rootroot00000000000000plantuml-1.2017.15/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java000066400000000000000000000350701312650303100273310ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.datamatrix.decoder; import com.google.zxing.FormatException; import com.google.zxing.common.BitMatrix; /** * @author bbrown@google.com (Brian Brown) */ final class BitMatrixParser { private final BitMatrix mappingBitMatrix; private final BitMatrix readMappingMatrix; private final Version version; /** * @param bitMatrix {@link BitMatrix} to parse * @throws FormatException if dimension is < 10 or > 144 or not 0 mod 2 */ BitMatrixParser(BitMatrix bitMatrix) throws FormatException { int dimension = bitMatrix.getHeight(); if (dimension < 10 || dimension > 144 || (dimension & 0x01) != 0) { throw FormatException.getFormatInstance(); } version = readVersion(bitMatrix); this.mappingBitMatrix = extractDataRegion(bitMatrix); // TODO(bbrown): Make this work for rectangular symbols this.readMappingMatrix = new BitMatrix(this.mappingBitMatrix.getHeight()); } /** *

Creates the version object based on the dimension of the original bit matrix from * the datamatrix code.

* *

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

* * @param bitMatrix Original {@link BitMatrix} including alignment patterns * @return {@link Version} encapsulating the Data Matrix Code's "version" * @throws FormatException if the dimensions of the mapping matrix are not valid * Data Matrix dimensions. */ Version readVersion(BitMatrix bitMatrix) throws FormatException { if (version != null) { return version; } // TODO(bbrown): make this work for rectangular dimensions as well. int numRows = bitMatrix.getHeight(); int numColumns = numRows; return Version.getVersionForDimensions(numRows, numColumns); } /** *

Reads the bits in the {@link BitMatrix} representing the mapping matrix (No alignment patterns) * in the correct order in order to reconstitute the codewords bytes contained within the * Data Matrix Code.

* * @return bytes encoded within the Data Matrix Code * @throws FormatException if the exact number of bytes expected is not read */ byte[] readCodewords() throws FormatException { byte[] result = new byte[version.getTotalCodewords()]; int resultOffset = 0; int row = 4; int column = 0; // TODO(bbrown): Data Matrix can be rectangular, assuming square for now int numRows = mappingBitMatrix.getHeight(); int numColumns = numRows; boolean corner1Read = false; boolean corner2Read = false; boolean corner3Read = false; boolean corner4Read = false; // Read all of the codewords do { // Check the four corner cases if ((row == numRows) && (column == 0) && !corner1Read) { result[resultOffset++] = (byte) readCorner1(numRows, numColumns); row -= 2; column +=2; corner1Read = true; } else if ((row == numRows-2) && (column == 0) && ((numColumns & 0x03) != 0) && !corner2Read) { result[resultOffset++] = (byte) readCorner2(numRows, numColumns); row -= 2; column +=2; corner2Read = true; } else if ((row == numRows+4) && (column == 2) && ((numColumns & 0x07) == 0) && !corner3Read) { result[resultOffset++] = (byte) readCorner3(numRows, numColumns); row -= 2; column +=2; corner3Read = true; } else if ((row == numRows-2) && (column == 0) && ((numColumns & 0x07) == 4) && !corner4Read) { result[resultOffset++] = (byte) readCorner4(numRows, numColumns); row -= 2; column +=2; corner4Read = true; } else { // Sweep upward diagonally to the right do { if ((row < numRows) && (column >= 0) && !readMappingMatrix.get(column, row)) { result[resultOffset++] = (byte) readUtah(row, column, numRows, numColumns); } row -= 2; column +=2; } while ((row >= 0) && (column < numColumns)); row += 1; column +=3; // Sweep downward diagonally to the left do { if ((row >= 0) && (column < numColumns) && !readMappingMatrix.get(column, row)) { result[resultOffset++] = (byte) readUtah(row, column, numRows, numColumns); } row += 2; column -=2; } while ((row < numRows) && (column >= 0)); row += 3; column +=1; } } while ((row < numRows) || (column < numColumns)); if (resultOffset != version.getTotalCodewords()) { throw FormatException.getFormatInstance(); } return result; } /** *

Reads a bit of the mapping matrix accounting for boundary wrapping.

* * @param row Row to read in the mapping matrix * @param column Column to read in the mapping matrix * @param numRows Number of rows in the mapping matrix * @param numColumns Number of columns in the mapping matrix * @return value of the given bit in the mapping matrix */ boolean readModule(int row, int column, int numRows, int numColumns) { // Adjust the row and column indices based on boundary wrapping if (row < 0) { row += numRows; column += 4 - ((numRows + 4) & 0x07); } if (column < 0) { column += numColumns; row += 4 - ((numColumns + 4) & 0x07); } readMappingMatrix.set(column, row); return mappingBitMatrix.get(column, row); } /** *

Reads the 8 bits of the standard Utah-shaped pattern.

* *

See ISO 16022:2006, 5.8.1 Figure 6

* * @param row Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern * @param column Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern * @param numRows Number of rows in the mapping matrix * @param numColumns Number of columns in the mapping matrix * @return byte from the utah shape */ int readUtah(int row, int column, int numRows, int numColumns) { int currentByte = 0; if (readModule(row - 2, column - 2, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(row - 2, column - 1, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(row - 1, column - 2, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(row - 1, column - 1, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(row - 1, column, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(row, column - 2, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(row, column - 1, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(row, column, numRows, numColumns)) { currentByte |= 1; } return currentByte; } /** *

Reads the 8 bits of the special corner condition 1.

* *

See ISO 16022:2006, Figure F.3

* * @param numRows Number of rows in the mapping matrix * @param numColumns Number of columns in the mapping matrix * @return byte from the Corner condition 1 */ int readCorner1(int numRows, int numColumns) { int currentByte = 0; if (readModule(numRows - 1, 0, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(numRows - 1, 1, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(numRows - 1, 2, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(0, numColumns - 2, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(0, numColumns - 1, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(1, numColumns - 1, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(2, numColumns - 1, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(3, numColumns - 1, numRows, numColumns)) { currentByte |= 1; } return currentByte; } /** *

Reads the 8 bits of the special corner condition 2.

* *

See ISO 16022:2006, Figure F.4

* * @param numRows Number of rows in the mapping matrix * @param numColumns Number of columns in the mapping matrix * @return byte from the Corner condition 2 */ int readCorner2(int numRows, int numColumns) { int currentByte = 0; if (readModule(numRows - 3, 0, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(numRows - 2, 0, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(numRows - 1, 0, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(0, numColumns - 4, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(0, numColumns - 3, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(0, numColumns - 2, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(0, numColumns - 1, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(1, numColumns - 1, numRows, numColumns)) { currentByte |= 1; } return currentByte; } /** *

Reads the 8 bits of the special corner condition 3.

* *

See ISO 16022:2006, Figure F.5

* * @param numRows Number of rows in the mapping matrix * @param numColumns Number of columns in the mapping matrix * @return byte from the Corner condition 3 */ int readCorner3(int numRows, int numColumns) { int currentByte = 0; if (readModule(numRows - 1, 0, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(numRows - 1, numColumns - 1, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(0, numColumns - 3, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(0, numColumns - 2, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(0, numColumns - 1, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(1, numColumns - 3, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(1, numColumns - 2, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(1, numColumns - 1, numRows, numColumns)) { currentByte |= 1; } return currentByte; } /** *

Reads the 8 bits of the special corner condition 4.

* *

See ISO 16022:2006, Figure F.6

* * @param numRows Number of rows in the mapping matrix * @param numColumns Number of columns in the mapping matrix * @return byte from the Corner condition 4 */ int readCorner4(int numRows, int numColumns) { int currentByte = 0; if (readModule(numRows - 3, 0, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(numRows - 2, 0, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(numRows - 1, 0, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(0, numColumns - 2, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(0, numColumns - 1, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(1, numColumns - 1, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(2, numColumns - 1, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(3, numColumns - 1, numRows, numColumns)) { currentByte |= 1; } return currentByte; } /** *

Extracts the data region from a {@link BitMatrix} that contains * alignment patterns.

* * @param bitMatrix Original {@link BitMatrix} with alignment patterns * @return BitMatrix that has the alignment patterns removed */ BitMatrix extractDataRegion(BitMatrix bitMatrix) { int symbolSizeRows = version.getSymbolSizeRows(); int symbolSizeColumns = version.getSymbolSizeColumns(); // TODO(bbrown): Make this work with rectangular codes if (bitMatrix.getHeight() != symbolSizeRows) { throw new IllegalArgumentException("Dimension of bitMarix must match the version size"); } int dataRegionSizeRows = version.getDataRegionSizeRows(); int dataRegionSizeColumns = version.getDataRegionSizeColumns(); int numDataRegionsRow = symbolSizeRows / dataRegionSizeRows; int numDataRegionsColumn = symbolSizeColumns / dataRegionSizeColumns; int sizeDataRegionRow = numDataRegionsRow * dataRegionSizeRows; //int sizeDataRegionColumn = numDataRegionsColumn * dataRegionSizeColumns; // TODO(bbrown): Make this work with rectangular codes BitMatrix bitMatrixWithoutAlignment = new BitMatrix(sizeDataRegionRow); for (int dataRegionRow = 0; dataRegionRow < numDataRegionsRow; ++dataRegionRow) { int dataRegionRowOffset = dataRegionRow * dataRegionSizeRows; for (int dataRegionColumn = 0; dataRegionColumn < numDataRegionsColumn; ++dataRegionColumn) { int dataRegionColumnOffset = dataRegionColumn * dataRegionSizeColumns; for (int i = 0; i < dataRegionSizeRows; ++i) { int readRowOffset = dataRegionRow * (dataRegionSizeRows + 2) + 1 + i; int writeRowOffset = dataRegionRowOffset + i; for (int j = 0; j < dataRegionSizeColumns; ++j) { int readColumnOffset = dataRegionColumn * (dataRegionSizeColumns + 2) + 1 + j; if (bitMatrix.get(readColumnOffset, readRowOffset)) { int writeColumnOffset = dataRegionColumnOffset + j; bitMatrixWithoutAlignment.set(writeColumnOffset, writeRowOffset); } } } } } return bitMatrixWithoutAlignment; } }plantuml-1.2017.15/src/com/google/zxing/datamatrix/decoder/DataBlock.java000066400000000000000000000110451312650303100260710ustar00rootroot00000000000000/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.datamatrix.decoder; /** *

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into * multiple blocks, each of which is a unit of data and error-correction codewords. Each * is represented by an instance of this class.

* * @author bbrown@google.com (Brian Brown) */ final class DataBlock { private final int numDataCodewords; private final byte[] codewords; private DataBlock(int numDataCodewords, byte[] codewords) { this.numDataCodewords = numDataCodewords; this.codewords = codewords; } /** *

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. * That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This * method will separate the data into original blocks.

* * @param rawCodewords bytes as read directly from the Data Matrix Code * @param version version of the Data Matrix Code * @return {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the * Data Matrix Code */ static DataBlock[] getDataBlocks(byte[] rawCodewords, Version version) { // Figure out the number and size of data blocks used by this version Version.ECBlocks ecBlocks = version.getECBlocks(); // First count the total number of data blocks int totalBlocks = 0; Version.ECB[] ecBlockArray = ecBlocks.getECBlocks(); for (int i = 0; i < ecBlockArray.length; i++) { totalBlocks += ecBlockArray[i].getCount(); } // Now establish DataBlocks of the appropriate size and number of data codewords DataBlock[] result = new DataBlock[totalBlocks]; int numResultBlocks = 0; for (int j = 0; j < ecBlockArray.length; j++) { Version.ECB ecBlock = ecBlockArray[j]; for (int i = 0; i < ecBlock.getCount(); i++) { int numDataCodewords = ecBlock.getDataCodewords(); int numBlockCodewords = ecBlocks.getECCodewords() + numDataCodewords; result[numResultBlocks++] = new DataBlock(numDataCodewords, new byte[numBlockCodewords]); } } // All blocks have the same amount of data, except that the last n // (where n may be 0) have 1 less byte. Figure out where these start. // TODO(bbrown): There is only one case where there is a difference for Data Matrix for size 144 int longerBlocksTotalCodewords = result[0].codewords.length; //int shorterBlocksTotalCodewords = longerBlocksTotalCodewords - 1; int longerBlocksNumDataCodewords = longerBlocksTotalCodewords - ecBlocks.getECCodewords(); int shorterBlocksNumDataCodewords = longerBlocksNumDataCodewords - 1; // The last elements of result may be 1 element shorter for 144 matrix // first fill out as many elements as all of them have minus 1 int rawCodewordsOffset = 0; for (int i = 0; i < shorterBlocksNumDataCodewords; i++) { for (int j = 0; j < numResultBlocks; j++) { result[j].codewords[i] = rawCodewords[rawCodewordsOffset++]; } } // Fill out the last data block in the longer ones boolean specialVersion = version.getVersionNumber() == 24; int numLongerBlocks = specialVersion ? 8 : numResultBlocks; for (int j = 0; j < numLongerBlocks; j++) { result[j].codewords[longerBlocksNumDataCodewords - 1] = rawCodewords[rawCodewordsOffset++]; } // Now add in error correction blocks int max = result[0].codewords.length; for (int i = longerBlocksNumDataCodewords; i < max; i++) { for (int j = 0; j < numResultBlocks; j++) { int iOffset = (specialVersion && j > 7) ? i - 1 : i; result[j].codewords[iOffset] = rawCodewords[rawCodewordsOffset++]; } } if (rawCodewordsOffset != rawCodewords.length) { throw new IllegalArgumentException(); } return result; } int getNumDataCodewords() { return numDataCodewords; } byte[] getCodewords() { return codewords; } } plantuml-1.2017.15/src/com/google/zxing/datamatrix/decoder/Version.java000066400000000000000000000174431312650303100257020ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.datamatrix.decoder; import com.google.zxing.FormatException; /** * The Version object encapsulates attributes about a particular * size Data Matrix Code. * * @author bbrown@google.com (Brian Brown) */ public final class Version { private static final Version[] VERSIONS = buildVersions(); private final int versionNumber; private final int symbolSizeRows; private final int symbolSizeColumns; private final int dataRegionSizeRows; private final int dataRegionSizeColumns; private final ECBlocks ecBlocks; private final int totalCodewords; private Version(int versionNumber, int symbolSizeRows, int symbolSizeColumns, int dataRegionSizeRows, int dataRegionSizeColumns, ECBlocks ecBlocks) { this.versionNumber = versionNumber; this.symbolSizeRows = symbolSizeRows; this.symbolSizeColumns = symbolSizeColumns; this.dataRegionSizeRows = dataRegionSizeRows; this.dataRegionSizeColumns = dataRegionSizeColumns; this.ecBlocks = ecBlocks; // Calculate the total number of codewords int total = 0; int ecCodewords = ecBlocks.getECCodewords(); ECB[] ecbArray = ecBlocks.getECBlocks(); for (int i = 0; i < ecbArray.length; i++) { ECB ecBlock = ecbArray[i]; total += ecBlock.getCount() * (ecBlock.getDataCodewords() + ecCodewords); } this.totalCodewords = total; } public int getVersionNumber() { return versionNumber; } public int getSymbolSizeRows() { return symbolSizeRows; } public int getSymbolSizeColumns() { return symbolSizeColumns; } public int getDataRegionSizeRows() { return dataRegionSizeRows; } public int getDataRegionSizeColumns() { return dataRegionSizeColumns; } public int getTotalCodewords() { return totalCodewords; } ECBlocks getECBlocks() { return ecBlocks; } /** *

Deduces version information from Data Matrix dimensions.

* * @param numRows Number of rows in modules * @param numColumns Number of columns in modules * @return {@link Version} for a Data Matrix Code of those dimensions * @throws FormatException if dimensions do correspond to a valid Data Matrix size */ public static Version getVersionForDimensions(int numRows, int numColumns) throws FormatException { if ((numRows & 0x01) != 0 || (numColumns & 0x01) != 0) { throw FormatException.getFormatInstance(); } // TODO(bbrown): This is doing a linear search through the array of versions. // If we interleave the rectangular versions with the square versions we could // do a binary search. int numVersions = VERSIONS.length; for (int i = 0; i < numVersions; ++i){ Version version = VERSIONS[i]; if (version.symbolSizeRows == numRows && version.symbolSizeColumns == numColumns) { return version; } } throw FormatException.getFormatInstance(); } /** *

Encapsulates a set of error-correction blocks in one symbol version. Most versions will * use blocks of differing sizes within one version, so, this encapsulates the parameters for * each set of blocks. It also holds the number of error-correction codewords per block since it * will be the same across all blocks within one version.

*/ static final class ECBlocks { private final int ecCodewords; private final ECB[] ecBlocks; private ECBlocks(int ecCodewords, ECB ecBlocks) { this.ecCodewords = ecCodewords; this.ecBlocks = new ECB[] { ecBlocks }; } private ECBlocks(int ecCodewords, ECB ecBlocks1, ECB ecBlocks2) { this.ecCodewords = ecCodewords; this.ecBlocks = new ECB[] { ecBlocks1, ecBlocks2 }; } int getECCodewords() { return ecCodewords; } ECB[] getECBlocks() { return ecBlocks; } } /** *

Encapsualtes the parameters for one error-correction block in one symbol version. * This includes the number of data codewords, and the number of times a block with these * parameters is used consecutively in the Data Matrix code version's format.

*/ static final class ECB { private final int count; private final int dataCodewords; private ECB(int count, int dataCodewords) { this.count = count; this.dataCodewords = dataCodewords; } int getCount() { return count; } int getDataCodewords() { return dataCodewords; } } public String toString() { return String.valueOf(versionNumber); } /** * See ISO 16022:2006 5.5.1 Table 7 */ private static Version[] buildVersions() { return new Version[]{ new Version(1, 10, 10, 8, 8, new ECBlocks(5, new ECB(1, 3))), new Version(2, 12, 12, 10, 10, new ECBlocks(7, new ECB(1, 5))), new Version(3, 14, 14, 12, 12, new ECBlocks(10, new ECB(1, 8))), new Version(4, 16, 16, 14, 14, new ECBlocks(12, new ECB(1, 12))), new Version(5, 18, 18, 16, 16, new ECBlocks(14, new ECB(1, 18))), new Version(6, 20, 20, 18, 18, new ECBlocks(18, new ECB(1, 22))), new Version(7, 22, 22, 20, 20, new ECBlocks(20, new ECB(1, 30))), new Version(8, 24, 24, 22, 22, new ECBlocks(24, new ECB(1, 36))), new Version(9, 26, 26, 24, 24, new ECBlocks(28, new ECB(1, 44))), new Version(10, 32, 32, 14, 14, new ECBlocks(36, new ECB(1, 62))), new Version(11, 36, 36, 16, 16, new ECBlocks(42, new ECB(1, 86))), new Version(12, 40, 40, 18, 18, new ECBlocks(48, new ECB(1, 114))), new Version(13, 44, 44, 20, 20, new ECBlocks(56, new ECB(1, 144))), new Version(14, 48, 48, 22, 22, new ECBlocks(68, new ECB(1, 174))), new Version(15, 52, 52, 24, 24, new ECBlocks(42, new ECB(2, 102))), new Version(16, 64, 64, 14, 14, new ECBlocks(56, new ECB(2, 140))), new Version(17, 72, 72, 16, 16, new ECBlocks(36, new ECB(4, 92))), new Version(18, 80, 80, 18, 18, new ECBlocks(48, new ECB(4, 114))), new Version(19, 88, 88, 20, 20, new ECBlocks(56, new ECB(4, 144))), new Version(20, 96, 96, 22, 22, new ECBlocks(68, new ECB(4, 174))), new Version(21, 104, 104, 24, 24, new ECBlocks(56, new ECB(6, 136))), new Version(22, 120, 120, 18, 18, new ECBlocks(68, new ECB(6, 175))), new Version(23, 132, 132, 20, 20, new ECBlocks(62, new ECB(8, 163))), new Version(24, 144, 144, 22, 22, new ECBlocks(62, new ECB(8, 156), new ECB(2, 155))), new Version(25, 8, 18, 6, 16, new ECBlocks(7, new ECB(1, 5))), new Version(26, 8, 32, 6, 14, new ECBlocks(11, new ECB(1, 10))), new Version(27, 12, 26, 10, 24, new ECBlocks(14, new ECB(1, 16))), new Version(28, 12, 36, 10, 16, new ECBlocks(18, new ECB(1, 22))), new Version(29, 16, 36, 10, 16, new ECBlocks(24, new ECB(1, 32))), new Version(30, 16, 48, 14, 22, new ECBlocks(28, new ECB(1, 49))) }; } } plantuml-1.2017.15/src/com/google/zxing/qrcode/000077500000000000000000000000001312650303100211135ustar00rootroot00000000000000plantuml-1.2017.15/src/com/google/zxing/qrcode/QRCodeWriter.java000066400000000000000000000073771312650303100243060ustar00rootroot00000000000000/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.qrcode; import java.util.Hashtable; import com.google.zxing.BarcodeFormat; import com.google.zxing.EncodeHintType; import com.google.zxing.Writer; import com.google.zxing.WriterException; import com.google.zxing.common.BitMatrix; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; import com.google.zxing.qrcode.encoder.ByteMatrix; import com.google.zxing.qrcode.encoder.Encoder; import com.google.zxing.qrcode.encoder.QRCode; /** * This object renders a QR Code as a BitMatrix 2D array of greyscale values. * * @author dswitkin@google.com (Daniel Switkin) */ public final class QRCodeWriter implements Writer { private static final int QUIET_ZONE_SIZE = 4; public BitMatrix encode(String contents, BarcodeFormat format, int multiple) throws WriterException { return encode(contents, format, multiple, null); } public BitMatrix encode(String contents, BarcodeFormat format, int multiple, Hashtable hints) throws WriterException { if (contents == null || contents.length() == 0) { throw new IllegalArgumentException("Found empty contents"); } if (format != BarcodeFormat.QR_CODE) { throw new IllegalArgumentException("Can only encode QR_CODE, but got " + format); } ErrorCorrectionLevel errorCorrectionLevel = ErrorCorrectionLevel.L; if (hints != null) { ErrorCorrectionLevel requestedECLevel = (ErrorCorrectionLevel) hints.get(EncodeHintType.ERROR_CORRECTION); if (requestedECLevel != null) { errorCorrectionLevel = requestedECLevel; } } QRCode code = new QRCode(); Encoder.encode(contents, errorCorrectionLevel, hints, code); return renderResult(code, multiple); } // Note that the input matrix uses 0 == white, 1 == black, while the output // matrix uses // 0 == black, 255 == white (i.e. an 8 bit greyscale bitmap). private static BitMatrix renderResult(QRCode code, int multiple) { ByteMatrix input = code.getMatrix(); int inputWidth = input.getWidth(); int inputHeight = input.getHeight(); int qrWidth = inputWidth + (QUIET_ZONE_SIZE << 1); int qrHeight = inputHeight + (QUIET_ZONE_SIZE << 1); // int outputWidth = Math.max(width, qrWidth); // int outputHeight = Math.max(height, qrHeight); // int multiple = Math.min(outputWidth / qrWidth, outputHeight / // qrHeight); // Padding includes both the quiet zone and the extra white pixels to // accommodate the requested // dimensions. For example, if input is 25x25 the QR will be 33x33 // including the quiet zone. // If the requested size is 200x160, the multiple will be 4, for a QR of // 132x132. These will // handle all the padding from 100x100 (the actual QR) up to 200x160. int leftPadding = QUIET_ZONE_SIZE * multiple; int topPadding = QUIET_ZONE_SIZE * multiple; BitMatrix output = new BitMatrix(qrWidth * multiple, qrHeight * multiple); for (int inputY = 0, outputY = topPadding; inputY < inputHeight; inputY++, outputY += multiple) { // Write the contents of this row of the barcode for (int inputX = 0, outputX = leftPadding; inputX < inputWidth; inputX++, outputX += multiple) { if (input.get(inputX, inputY) == 1) { output.setRegion(outputX, outputY, multiple, multiple); } } } return output; } } plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/000077500000000000000000000000001312650303100225205ustar00rootroot00000000000000plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/BitMatrixParser.java000066400000000000000000000152431312650303100264500ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.qrcode.decoder; import com.google.zxing.FormatException; import com.google.zxing.common.BitMatrix; /** * @author Sean Owen */ final class BitMatrixParser { private final BitMatrix bitMatrix; private Version parsedVersion; private FormatInformation parsedFormatInfo; /** * @param bitMatrix {@link BitMatrix} to parse * @throws FormatException if dimension is not >= 21 and 1 mod 4 */ BitMatrixParser(BitMatrix bitMatrix) throws FormatException { int dimension = bitMatrix.getHeight(); if (dimension < 21 || (dimension & 0x03) != 1) { throw FormatException.getFormatInstance(); } this.bitMatrix = bitMatrix; } /** *

Reads format information from one of its two locations within the QR Code.

* * @return {@link FormatInformation} encapsulating the QR Code's format info * @throws FormatException if both format information locations cannot be parsed as * the valid encoding of format information */ FormatInformation readFormatInformation() throws FormatException { if (parsedFormatInfo != null) { return parsedFormatInfo; } // Read top-left format info bits int formatInfoBits1 = 0; for (int i = 0; i < 6; i++) { formatInfoBits1 = copyBit(i, 8, formatInfoBits1); } // .. and skip a bit in the timing pattern ... formatInfoBits1 = copyBit(7, 8, formatInfoBits1); formatInfoBits1 = copyBit(8, 8, formatInfoBits1); formatInfoBits1 = copyBit(8, 7, formatInfoBits1); // .. and skip a bit in the timing pattern ... for (int j = 5; j >= 0; j--) { formatInfoBits1 = copyBit(8, j, formatInfoBits1); } // Read the top-right/bottom-left pattern too int dimension = bitMatrix.getHeight(); int formatInfoBits2 = 0; int iMin = dimension - 8; for (int i = dimension - 1; i >= iMin; i--) { formatInfoBits2 = copyBit(i, 8, formatInfoBits2); } for (int j = dimension - 7; j < dimension; j++) { formatInfoBits2 = copyBit(8, j, formatInfoBits2); } parsedFormatInfo = FormatInformation.decodeFormatInformation(formatInfoBits1, formatInfoBits2); if (parsedFormatInfo != null) { return parsedFormatInfo; } throw FormatException.getFormatInstance(); } /** *

Reads version information from one of its two locations within the QR Code.

* * @return {@link Version} encapsulating the QR Code's version * @throws FormatException if both version information locations cannot be parsed as * the valid encoding of version information */ Version readVersion() throws FormatException { if (parsedVersion != null) { return parsedVersion; } int dimension = bitMatrix.getHeight(); int provisionalVersion = (dimension - 17) >> 2; if (provisionalVersion <= 6) { return Version.getVersionForNumber(provisionalVersion); } // Read top-right version info: 3 wide by 6 tall int versionBits = 0; int ijMin = dimension - 11; for (int j = 5; j >= 0; j--) { for (int i = dimension - 9; i >= ijMin; i--) { versionBits = copyBit(i, j, versionBits); } } parsedVersion = Version.decodeVersionInformation(versionBits); if (parsedVersion != null && parsedVersion.getDimensionForVersion() == dimension) { return parsedVersion; } // Hmm, failed. Try bottom left: 6 wide by 3 tall versionBits = 0; for (int i = 5; i >= 0; i--) { for (int j = dimension - 9; j >= ijMin; j--) { versionBits = copyBit(i, j, versionBits); } } parsedVersion = Version.decodeVersionInformation(versionBits); if (parsedVersion != null && parsedVersion.getDimensionForVersion() == dimension) { return parsedVersion; } throw FormatException.getFormatInstance(); } private int copyBit(int i, int j, int versionBits) { return bitMatrix.get(i, j) ? (versionBits << 1) | 0x1 : versionBits << 1; } /** *

Reads the bits in the {@link BitMatrix} representing the finder pattern in the * correct order in order to reconstitute the codewords bytes contained within the * QR Code.

* * @return bytes encoded within the QR Code * @throws FormatException if the exact number of bytes expected is not read */ byte[] readCodewords() throws FormatException { FormatInformation formatInfo = readFormatInformation(); Version version = readVersion(); // Get the data mask for the format used in this QR Code. This will exclude // some bits from reading as we wind through the bit matrix. DataMask dataMask = DataMask.forReference((int) formatInfo.getDataMask()); int dimension = bitMatrix.getHeight(); dataMask.unmaskBitMatrix(bitMatrix, dimension); BitMatrix functionPattern = version.buildFunctionPattern(); boolean readingUp = true; byte[] result = new byte[version.getTotalCodewords()]; int resultOffset = 0; int currentByte = 0; int bitsRead = 0; // Read columns in pairs, from right to left for (int j = dimension - 1; j > 0; j -= 2) { if (j == 6) { // Skip whole column with vertical alignment pattern; // saves time and makes the other code proceed more cleanly j--; } // Read alternatingly from bottom to top then top to bottom for (int count = 0; count < dimension; count++) { int i = readingUp ? dimension - 1 - count : count; for (int col = 0; col < 2; col++) { // Ignore bits covered by the function pattern if (!functionPattern.get(j - col, i)) { // Read a bit bitsRead++; currentByte <<= 1; if (bitMatrix.get(j - col, i)) { currentByte |= 1; } // If we've made a whole byte, save it off if (bitsRead == 8) { result[resultOffset++] = (byte) currentByte; bitsRead = 0; currentByte = 0; } } } } readingUp ^= true; // readingUp = !readingUp; // switch directions } if (resultOffset != version.getTotalCodewords()) { throw FormatException.getFormatInstance(); } return result; } }plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/DataBlock.java000066400000000000000000000110541312650303100252100ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.qrcode.decoder; /** *

Encapsulates a block of data within a QR Code. QR Codes may split their data into * multiple blocks, each of which is a unit of data and error-correction codewords. Each * is represented by an instance of this class.

* * @author Sean Owen */ final class DataBlock { private final int numDataCodewords; private final byte[] codewords; private DataBlock(int numDataCodewords, byte[] codewords) { this.numDataCodewords = numDataCodewords; this.codewords = codewords; } /** *

When QR Codes use multiple data blocks, they are actually interleaved. * That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This * method will separate the data into original blocks.

* * @param rawCodewords bytes as read directly from the QR Code * @param version version of the QR Code * @param ecLevel error-correction level of the QR Code * @return {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the * QR Code */ static DataBlock[] getDataBlocks(byte[] rawCodewords, Version version, ErrorCorrectionLevel ecLevel) { if (rawCodewords.length != version.getTotalCodewords()) { throw new IllegalArgumentException(); } // Figure out the number and size of data blocks used by this version and // error correction level Version.ECBlocks ecBlocks = version.getECBlocksForLevel(ecLevel); // First count the total number of data blocks int totalBlocks = 0; Version.ECB[] ecBlockArray = ecBlocks.getECBlocks(); for (int i = 0; i < ecBlockArray.length; i++) { totalBlocks += ecBlockArray[i].getCount(); } // Now establish DataBlocks of the appropriate size and number of data codewords DataBlock[] result = new DataBlock[totalBlocks]; int numResultBlocks = 0; for (int j = 0; j < ecBlockArray.length; j++) { Version.ECB ecBlock = ecBlockArray[j]; for (int i = 0; i < ecBlock.getCount(); i++) { int numDataCodewords = ecBlock.getDataCodewords(); int numBlockCodewords = ecBlocks.getECCodewordsPerBlock() + numDataCodewords; result[numResultBlocks++] = new DataBlock(numDataCodewords, new byte[numBlockCodewords]); } } // All blocks have the same amount of data, except that the last n // (where n may be 0) have 1 more byte. Figure out where these start. int shorterBlocksTotalCodewords = result[0].codewords.length; int longerBlocksStartAt = result.length - 1; while (longerBlocksStartAt >= 0) { int numCodewords = result[longerBlocksStartAt].codewords.length; if (numCodewords == shorterBlocksTotalCodewords) { break; } longerBlocksStartAt--; } longerBlocksStartAt++; int shorterBlocksNumDataCodewords = shorterBlocksTotalCodewords - ecBlocks.getECCodewordsPerBlock(); // The last elements of result may be 1 element longer; // first fill out as many elements as all of them have int rawCodewordsOffset = 0; for (int i = 0; i < shorterBlocksNumDataCodewords; i++) { for (int j = 0; j < numResultBlocks; j++) { result[j].codewords[i] = rawCodewords[rawCodewordsOffset++]; } } // Fill out the last data block in the longer ones for (int j = longerBlocksStartAt; j < numResultBlocks; j++) { result[j].codewords[shorterBlocksNumDataCodewords] = rawCodewords[rawCodewordsOffset++]; } // Now add in error correction blocks int max = result[0].codewords.length; for (int i = shorterBlocksNumDataCodewords; i < max; i++) { for (int j = 0; j < numResultBlocks; j++) { int iOffset = j < longerBlocksStartAt ? i : i + 1; result[j].codewords[iOffset] = rawCodewords[rawCodewordsOffset++]; } } return result; } int getNumDataCodewords() { return numDataCodewords; } byte[] getCodewords() { return codewords; } } plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/DataMask.java000066400000000000000000000102721312650303100250520ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.qrcode.decoder; import com.google.zxing.common.BitMatrix; /** *

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations * of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, * including areas used for finder patterns, timing patterns, etc. These areas should be unused * after the point they are unmasked anyway.

* *

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position * and j is row position. In fact, as the text says, i is row position and j is column position.

* * @author Sean Owen */ abstract class DataMask { /** * See ISO 18004:2006 6.8.1 */ private static final DataMask[] DATA_MASKS = { new DataMask000(), new DataMask001(), new DataMask010(), new DataMask011(), new DataMask100(), new DataMask101(), new DataMask110(), new DataMask111(), }; private DataMask() { } /** *

Implementations of this method reverse the data masking process applied to a QR Code and * make its bits ready to read.

* * @param bits representation of QR Code bits * @param dimension dimension of QR Code, represented by bits, being unmasked */ final void unmaskBitMatrix(BitMatrix bits, int dimension) { for (int i = 0; i < dimension; i++) { for (int j = 0; j < dimension; j++) { if (isMasked(i, j)) { bits.flip(j, i); } } } } abstract boolean isMasked(int i, int j); /** * @param reference a value between 0 and 7 indicating one of the eight possible * data mask patterns a QR Code may use * @return {@link DataMask} encapsulating the data mask pattern */ static DataMask forReference(int reference) { if (reference < 0 || reference > 7) { throw new IllegalArgumentException(); } return DATA_MASKS[reference]; } /** * 000: mask bits for which (x + y) mod 2 == 0 */ private static class DataMask000 extends DataMask { boolean isMasked(int i, int j) { return ((i + j) & 0x01) == 0; } } /** * 001: mask bits for which x mod 2 == 0 */ private static class DataMask001 extends DataMask { boolean isMasked(int i, int j) { return (i & 0x01) == 0; } } /** * 010: mask bits for which y mod 3 == 0 */ private static class DataMask010 extends DataMask { boolean isMasked(int i, int j) { return j % 3 == 0; } } /** * 011: mask bits for which (x + y) mod 3 == 0 */ private static class DataMask011 extends DataMask { boolean isMasked(int i, int j) { return (i + j) % 3 == 0; } } /** * 100: mask bits for which (x/2 + y/3) mod 2 == 0 */ private static class DataMask100 extends DataMask { boolean isMasked(int i, int j) { return (((i >>> 1) + (j /3)) & 0x01) == 0; } } /** * 101: mask bits for which xy mod 2 + xy mod 3 == 0 */ private static class DataMask101 extends DataMask { boolean isMasked(int i, int j) { int temp = i * j; return (temp & 0x01) + (temp % 3) == 0; } } /** * 110: mask bits for which (xy mod 2 + xy mod 3) mod 2 == 0 */ private static class DataMask110 extends DataMask { boolean isMasked(int i, int j) { int temp = i * j; return (((temp & 0x01) + (temp % 3)) & 0x01) == 0; } } /** * 111: mask bits for which ((x+y)mod 2 + xy mod 3) mod 2 == 0 */ private static class DataMask111 extends DataMask { boolean isMasked(int i, int j) { return ((((i + j) & 0x01) + ((i * j) % 3)) & 0x01) == 0; } } } plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java000066400000000000000000000043541312650303100275020ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.qrcode.decoder; /** *

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels * defined by the QR code standard.

* * @author Sean Owen */ public final class ErrorCorrectionLevel { // No, we can't use an enum here. J2ME doesn't support it. /** * L = ~7% correction */ public static final ErrorCorrectionLevel L = new ErrorCorrectionLevel(0, 0x01, "L"); /** * M = ~15% correction */ public static final ErrorCorrectionLevel M = new ErrorCorrectionLevel(1, 0x00, "M"); /** * Q = ~25% correction */ public static final ErrorCorrectionLevel Q = new ErrorCorrectionLevel(2, 0x03, "Q"); /** * H = ~30% correction */ public static final ErrorCorrectionLevel H = new ErrorCorrectionLevel(3, 0x02, "H"); private static final ErrorCorrectionLevel[] FOR_BITS = {M, L, H, Q}; private final int ordinal; private final int bits; private final String name; private ErrorCorrectionLevel(int ordinal, int bits, String name) { this.ordinal = ordinal; this.bits = bits; this.name = name; } public int ordinal() { return ordinal; } public int getBits() { return bits; } public String getName() { return name; } public String toString() { return name; } /** * @param bits int containing the two bits encoding a QR Code's error correction level * @return {@link ErrorCorrectionLevel} representing the encoded error correction level */ public static ErrorCorrectionLevel forBits(int bits) { if (bits < 0 || bits >= FOR_BITS.length) { throw new IllegalArgumentException(); } return FOR_BITS[bits]; } } plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/FormatInformation.java000066400000000000000000000127341312650303100270300ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.qrcode.decoder; /** *

Encapsulates a QR Code's format information, including the data mask used and * error correction level.

* * @author Sean Owen * @see DataMask * @see ErrorCorrectionLevel */ final class FormatInformation { private static final int FORMAT_INFO_MASK_QR = 0x5412; /** * See ISO 18004:2006, Annex C, Table C.1 */ private static final int[][] FORMAT_INFO_DECODE_LOOKUP = { {0x5412, 0x00}, {0x5125, 0x01}, {0x5E7C, 0x02}, {0x5B4B, 0x03}, {0x45F9, 0x04}, {0x40CE, 0x05}, {0x4F97, 0x06}, {0x4AA0, 0x07}, {0x77C4, 0x08}, {0x72F3, 0x09}, {0x7DAA, 0x0A}, {0x789D, 0x0B}, {0x662F, 0x0C}, {0x6318, 0x0D}, {0x6C41, 0x0E}, {0x6976, 0x0F}, {0x1689, 0x10}, {0x13BE, 0x11}, {0x1CE7, 0x12}, {0x19D0, 0x13}, {0x0762, 0x14}, {0x0255, 0x15}, {0x0D0C, 0x16}, {0x083B, 0x17}, {0x355F, 0x18}, {0x3068, 0x19}, {0x3F31, 0x1A}, {0x3A06, 0x1B}, {0x24B4, 0x1C}, {0x2183, 0x1D}, {0x2EDA, 0x1E}, {0x2BED, 0x1F}, }; /** * Offset i holds the number of 1 bits in the binary representation of i */ private static final int[] BITS_SET_IN_HALF_BYTE = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4}; private final ErrorCorrectionLevel errorCorrectionLevel; private final byte dataMask; private FormatInformation(int formatInfo) { // Bits 3,4 errorCorrectionLevel = ErrorCorrectionLevel.forBits((formatInfo >> 3) & 0x03); // Bottom 3 bits dataMask = (byte) (formatInfo & 0x07); } static int numBitsDiffering(int a, int b) { a ^= b; // a now has a 1 bit exactly where its bit differs with b's // Count bits set quickly with a series of lookups: return BITS_SET_IN_HALF_BYTE[a & 0x0F] + BITS_SET_IN_HALF_BYTE[(a >>> 4 & 0x0F)] + BITS_SET_IN_HALF_BYTE[(a >>> 8 & 0x0F)] + BITS_SET_IN_HALF_BYTE[(a >>> 12 & 0x0F)] + BITS_SET_IN_HALF_BYTE[(a >>> 16 & 0x0F)] + BITS_SET_IN_HALF_BYTE[(a >>> 20 & 0x0F)] + BITS_SET_IN_HALF_BYTE[(a >>> 24 & 0x0F)] + BITS_SET_IN_HALF_BYTE[(a >>> 28 & 0x0F)]; } /** * @param maskedFormatInfo1 format info indicator, with mask still applied * @param maskedFormatInfo2 second copy of same info; both are checked at the same time * to establish best match * @return information about the format it specifies, or null * if doesn't seem to match any known pattern */ static FormatInformation decodeFormatInformation(int maskedFormatInfo1, int maskedFormatInfo2) { FormatInformation formatInfo = doDecodeFormatInformation(maskedFormatInfo1, maskedFormatInfo2); if (formatInfo != null) { return formatInfo; } // Should return null, but, some QR codes apparently // do not mask this info. Try again by actually masking the pattern // first return doDecodeFormatInformation(maskedFormatInfo1 ^ FORMAT_INFO_MASK_QR, maskedFormatInfo2 ^ FORMAT_INFO_MASK_QR); } private static FormatInformation doDecodeFormatInformation(int maskedFormatInfo1, int maskedFormatInfo2) { // Find the int in FORMAT_INFO_DECODE_LOOKUP with fewest bits differing int bestDifference = Integer.MAX_VALUE; int bestFormatInfo = 0; for (int i = 0; i < FORMAT_INFO_DECODE_LOOKUP.length; i++) { int[] decodeInfo = FORMAT_INFO_DECODE_LOOKUP[i]; int targetInfo = decodeInfo[0]; if (targetInfo == maskedFormatInfo1 || targetInfo == maskedFormatInfo2) { // Found an exact match return new FormatInformation(decodeInfo[1]); } int bitsDifference = numBitsDiffering(maskedFormatInfo1, targetInfo); if (bitsDifference < bestDifference) { bestFormatInfo = decodeInfo[1]; bestDifference = bitsDifference; } if (maskedFormatInfo1 != maskedFormatInfo2) { // also try the other option bitsDifference = numBitsDiffering(maskedFormatInfo2, targetInfo); if (bitsDifference < bestDifference) { bestFormatInfo = decodeInfo[1]; bestDifference = bitsDifference; } } } // Hamming distance of the 32 masked codes is 7, by construction, so <= 3 bits // differing means we found a match if (bestDifference <= 3) { return new FormatInformation(bestFormatInfo); } return null; } ErrorCorrectionLevel getErrorCorrectionLevel() { return errorCorrectionLevel; } byte getDataMask() { return dataMask; } public int hashCode() { return (errorCorrectionLevel.ordinal() << 3) | (int) dataMask; } public boolean equals(Object o) { if (!(o instanceof FormatInformation)) { return false; } FormatInformation other = (FormatInformation) o; return this.errorCorrectionLevel == other.errorCorrectionLevel && this.dataMask == other.dataMask; } } plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/Mode.java000066400000000000000000000070511312650303100242520ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.qrcode.decoder; /** *

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which * data can be encoded to bits in the QR code standard.

* * @author Sean Owen */ public final class Mode { // No, we can't use an enum here. J2ME doesn't support it. public static final Mode TERMINATOR = new Mode(new int[]{0, 0, 0}, 0x00, "TERMINATOR"); // Not really a mode... public static final Mode NUMERIC = new Mode(new int[]{10, 12, 14}, 0x01, "NUMERIC"); public static final Mode ALPHANUMERIC = new Mode(new int[]{9, 11, 13}, 0x02, "ALPHANUMERIC"); public static final Mode STRUCTURED_APPEND = new Mode(new int[]{0, 0, 0}, 0x03, "STRUCTURED_APPEND"); // Not supported public static final Mode BYTE = new Mode(new int[]{8, 16, 16}, 0x04, "BYTE"); public static final Mode ECI = new Mode(null, 0x07, "ECI"); // character counts don't apply public static final Mode KANJI = new Mode(new int[]{8, 10, 12}, 0x08, "KANJI"); public static final Mode FNC1_FIRST_POSITION = new Mode(null, 0x05, "FNC1_FIRST_POSITION"); public static final Mode FNC1_SECOND_POSITION = new Mode(null, 0x09, "FNC1_SECOND_POSITION"); private final int[] characterCountBitsForVersions; private final int bits; private final String name; private Mode(int[] characterCountBitsForVersions, int bits, String name) { this.characterCountBitsForVersions = characterCountBitsForVersions; this.bits = bits; this.name = name; } /** * @param bits four bits encoding a QR Code data mode * @return {@link Mode} encoded by these bits * @throws IllegalArgumentException if bits do not correspond to a known mode */ public static Mode forBits(int bits) { switch (bits) { case 0x0: return TERMINATOR; case 0x1: return NUMERIC; case 0x2: return ALPHANUMERIC; case 0x3: return STRUCTURED_APPEND; case 0x4: return BYTE; case 0x5: return FNC1_FIRST_POSITION; case 0x7: return ECI; case 0x8: return KANJI; case 0x9: return FNC1_SECOND_POSITION; default: throw new IllegalArgumentException(); } } /** * @param version version in question * @return number of bits used, in this QR Code symbol {@link Version}, to encode the * count of characters that will follow encoded in this {@link Mode} */ public int getCharacterCountBits(Version version) { if (characterCountBitsForVersions == null) { throw new IllegalArgumentException("Character count doesn't apply to this mode"); } int number = version.getVersionNumber(); int offset; if (number <= 9) { offset = 0; } else if (number <= 26) { offset = 1; } else { offset = 2; } return characterCountBitsForVersions[offset]; } public int getBits() { return bits; } public String getName() { return name; } public String toString() { return name; } } plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/Version.java000066400000000000000000000523171312650303100250200ustar00rootroot00000000000000/* * Copyright 2007 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.qrcode.decoder; import com.google.zxing.FormatException; import com.google.zxing.common.BitMatrix; /** * See ISO 18004:2006 Annex D * * @author Sean Owen */ public final class Version { /** * See ISO 18004:2006 Annex D. * Element i represents the raw version bits that specify version i + 7 */ private static final int[] VERSION_DECODE_INFO = { 0x07C94, 0x085BC, 0x09A99, 0x0A4D3, 0x0BBF6, 0x0C762, 0x0D847, 0x0E60D, 0x0F928, 0x10B78, 0x1145D, 0x12A17, 0x13532, 0x149A6, 0x15683, 0x168C9, 0x177EC, 0x18EC4, 0x191E1, 0x1AFAB, 0x1B08E, 0x1CC1A, 0x1D33F, 0x1ED75, 0x1F250, 0x209D5, 0x216F0, 0x228BA, 0x2379F, 0x24B0B, 0x2542E, 0x26A64, 0x27541, 0x28C69 }; private static final Version[] VERSIONS = buildVersions(); private final int versionNumber; private final int[] alignmentPatternCenters; private final ECBlocks[] ecBlocks; private final int totalCodewords; private Version(int versionNumber, int[] alignmentPatternCenters, ECBlocks ecBlocks1, ECBlocks ecBlocks2, ECBlocks ecBlocks3, ECBlocks ecBlocks4) { this.versionNumber = versionNumber; this.alignmentPatternCenters = alignmentPatternCenters; this.ecBlocks = new ECBlocks[]{ecBlocks1, ecBlocks2, ecBlocks3, ecBlocks4}; int total = 0; int ecCodewords = ecBlocks1.getECCodewordsPerBlock(); ECB[] ecbArray = ecBlocks1.getECBlocks(); for (int i = 0; i < ecbArray.length; i++) { ECB ecBlock = ecbArray[i]; total += ecBlock.getCount() * (ecBlock.getDataCodewords() + ecCodewords); } this.totalCodewords = total; } public int getVersionNumber() { return versionNumber; } public int[] getAlignmentPatternCenters() { return alignmentPatternCenters; } public int getTotalCodewords() { return totalCodewords; } public int getDimensionForVersion() { return 17 + 4 * versionNumber; } public ECBlocks getECBlocksForLevel(ErrorCorrectionLevel ecLevel) { return ecBlocks[ecLevel.ordinal()]; } /** *

Deduces version information purely from QR Code dimensions.

* * @param dimension dimension in modules * @return {@link Version} for a QR Code of that dimension * @throws FormatException if dimension is not 1 mod 4 */ public static Version getProvisionalVersionForDimension(int dimension) throws FormatException { if (dimension % 4 != 1) { throw FormatException.getFormatInstance(); } try { return getVersionForNumber((dimension - 17) >> 2); } catch (IllegalArgumentException iae) { throw FormatException.getFormatInstance(); } } public static Version getVersionForNumber(int versionNumber) { if (versionNumber < 1 || versionNumber > 40) { throw new IllegalArgumentException(); } return VERSIONS[versionNumber - 1]; } static Version decodeVersionInformation(int versionBits) { int bestDifference = Integer.MAX_VALUE; int bestVersion = 0; for (int i = 0; i < VERSION_DECODE_INFO.length; i++) { int targetVersion = VERSION_DECODE_INFO[i]; // Do the version info bits match exactly? done. if (targetVersion == versionBits) { return getVersionForNumber(i + 7); } // Otherwise see if this is the closest to a real version info bit string // we have seen so far int bitsDifference = FormatInformation.numBitsDiffering(versionBits, targetVersion); if (bitsDifference < bestDifference) { bestVersion = i + 7; bestDifference = bitsDifference; } } // We can tolerate up to 3 bits of error since no two version info codewords will // differ in less than 8 bits. if (bestDifference <= 3) { return getVersionForNumber(bestVersion); } // If we didn't find a close enough match, fail return null; } /** * See ISO 18004:2006 Annex E */ BitMatrix buildFunctionPattern() { int dimension = getDimensionForVersion(); BitMatrix bitMatrix = new BitMatrix(dimension); // Top left finder pattern + separator + format bitMatrix.setRegion(0, 0, 9, 9); // Top right finder pattern + separator + format bitMatrix.setRegion(dimension - 8, 0, 8, 9); // Bottom left finder pattern + separator + format bitMatrix.setRegion(0, dimension - 8, 9, 8); // Alignment patterns int max = alignmentPatternCenters.length; for (int x = 0; x < max; x++) { int i = alignmentPatternCenters[x] - 2; for (int y = 0; y < max; y++) { if ((x == 0 && (y == 0 || y == max - 1)) || (x == max - 1 && y == 0)) { // No alignment patterns near the three finder paterns continue; } bitMatrix.setRegion(alignmentPatternCenters[y] - 2, i, 5, 5); } } // Vertical timing pattern bitMatrix.setRegion(6, 9, 1, dimension - 17); // Horizontal timing pattern bitMatrix.setRegion(9, 6, dimension - 17, 1); if (versionNumber > 6) { // Version info, top right bitMatrix.setRegion(dimension - 11, 0, 3, 6); // Version info, bottom left bitMatrix.setRegion(0, dimension - 11, 6, 3); } return bitMatrix; } /** *

Encapsulates a set of error-correction blocks in one symbol version. Most versions will * use blocks of differing sizes within one version, so, this encapsulates the parameters for * each set of blocks. It also holds the number of error-correction codewords per block since it * will be the same across all blocks within one version.

*/ public static final class ECBlocks { private final int ecCodewordsPerBlock; private final ECB[] ecBlocks; ECBlocks(int ecCodewordsPerBlock, ECB ecBlocks) { this.ecCodewordsPerBlock = ecCodewordsPerBlock; this.ecBlocks = new ECB[]{ecBlocks}; } ECBlocks(int ecCodewordsPerBlock, ECB ecBlocks1, ECB ecBlocks2) { this.ecCodewordsPerBlock = ecCodewordsPerBlock; this.ecBlocks = new ECB[]{ecBlocks1, ecBlocks2}; } public int getECCodewordsPerBlock() { return ecCodewordsPerBlock; } public int getNumBlocks() { int total = 0; for (int i = 0; i < ecBlocks.length; i++) { total += ecBlocks[i].getCount(); } return total; } public int getTotalECCodewords() { return ecCodewordsPerBlock * getNumBlocks(); } public ECB[] getECBlocks() { return ecBlocks; } } /** *

Encapsualtes the parameters for one error-correction block in one symbol version. * This includes the number of data codewords, and the number of times a block with these * parameters is used consecutively in the QR code version's format.

*/ public static final class ECB { private final int count; private final int dataCodewords; ECB(int count, int dataCodewords) { this.count = count; this.dataCodewords = dataCodewords; } public int getCount() { return count; } public int getDataCodewords() { return dataCodewords; } } public String toString() { return String.valueOf(versionNumber); } /** * See ISO 18004:2006 6.5.1 Table 9 */ private static Version[] buildVersions() { return new Version[]{ new Version(1, new int[]{}, new ECBlocks(7, new ECB(1, 19)), new ECBlocks(10, new ECB(1, 16)), new ECBlocks(13, new ECB(1, 13)), new ECBlocks(17, new ECB(1, 9))), new Version(2, new int[]{6, 18}, new ECBlocks(10, new ECB(1, 34)), new ECBlocks(16, new ECB(1, 28)), new ECBlocks(22, new ECB(1, 22)), new ECBlocks(28, new ECB(1, 16))), new Version(3, new int[]{6, 22}, new ECBlocks(15, new ECB(1, 55)), new ECBlocks(26, new ECB(1, 44)), new ECBlocks(18, new ECB(2, 17)), new ECBlocks(22, new ECB(2, 13))), new Version(4, new int[]{6, 26}, new ECBlocks(20, new ECB(1, 80)), new ECBlocks(18, new ECB(2, 32)), new ECBlocks(26, new ECB(2, 24)), new ECBlocks(16, new ECB(4, 9))), new Version(5, new int[]{6, 30}, new ECBlocks(26, new ECB(1, 108)), new ECBlocks(24, new ECB(2, 43)), new ECBlocks(18, new ECB(2, 15), new ECB(2, 16)), new ECBlocks(22, new ECB(2, 11), new ECB(2, 12))), new Version(6, new int[]{6, 34}, new ECBlocks(18, new ECB(2, 68)), new ECBlocks(16, new ECB(4, 27)), new ECBlocks(24, new ECB(4, 19)), new ECBlocks(28, new ECB(4, 15))), new Version(7, new int[]{6, 22, 38}, new ECBlocks(20, new ECB(2, 78)), new ECBlocks(18, new ECB(4, 31)), new ECBlocks(18, new ECB(2, 14), new ECB(4, 15)), new ECBlocks(26, new ECB(4, 13), new ECB(1, 14))), new Version(8, new int[]{6, 24, 42}, new ECBlocks(24, new ECB(2, 97)), new ECBlocks(22, new ECB(2, 38), new ECB(2, 39)), new ECBlocks(22, new ECB(4, 18), new ECB(2, 19)), new ECBlocks(26, new ECB(4, 14), new ECB(2, 15))), new Version(9, new int[]{6, 26, 46}, new ECBlocks(30, new ECB(2, 116)), new ECBlocks(22, new ECB(3, 36), new ECB(2, 37)), new ECBlocks(20, new ECB(4, 16), new ECB(4, 17)), new ECBlocks(24, new ECB(4, 12), new ECB(4, 13))), new Version(10, new int[]{6, 28, 50}, new ECBlocks(18, new ECB(2, 68), new ECB(2, 69)), new ECBlocks(26, new ECB(4, 43), new ECB(1, 44)), new ECBlocks(24, new ECB(6, 19), new ECB(2, 20)), new ECBlocks(28, new ECB(6, 15), new ECB(2, 16))), new Version(11, new int[]{6, 30, 54}, new ECBlocks(20, new ECB(4, 81)), new ECBlocks(30, new ECB(1, 50), new ECB(4, 51)), new ECBlocks(28, new ECB(4, 22), new ECB(4, 23)), new ECBlocks(24, new ECB(3, 12), new ECB(8, 13))), new Version(12, new int[]{6, 32, 58}, new ECBlocks(24, new ECB(2, 92), new ECB(2, 93)), new ECBlocks(22, new ECB(6, 36), new ECB(2, 37)), new ECBlocks(26, new ECB(4, 20), new ECB(6, 21)), new ECBlocks(28, new ECB(7, 14), new ECB(4, 15))), new Version(13, new int[]{6, 34, 62}, new ECBlocks(26, new ECB(4, 107)), new ECBlocks(22, new ECB(8, 37), new ECB(1, 38)), new ECBlocks(24, new ECB(8, 20), new ECB(4, 21)), new ECBlocks(22, new ECB(12, 11), new ECB(4, 12))), new Version(14, new int[]{6, 26, 46, 66}, new ECBlocks(30, new ECB(3, 115), new ECB(1, 116)), new ECBlocks(24, new ECB(4, 40), new ECB(5, 41)), new ECBlocks(20, new ECB(11, 16), new ECB(5, 17)), new ECBlocks(24, new ECB(11, 12), new ECB(5, 13))), new Version(15, new int[]{6, 26, 48, 70}, new ECBlocks(22, new ECB(5, 87), new ECB(1, 88)), new ECBlocks(24, new ECB(5, 41), new ECB(5, 42)), new ECBlocks(30, new ECB(5, 24), new ECB(7, 25)), new ECBlocks(24, new ECB(11, 12), new ECB(7, 13))), new Version(16, new int[]{6, 26, 50, 74}, new ECBlocks(24, new ECB(5, 98), new ECB(1, 99)), new ECBlocks(28, new ECB(7, 45), new ECB(3, 46)), new ECBlocks(24, new ECB(15, 19), new ECB(2, 20)), new ECBlocks(30, new ECB(3, 15), new ECB(13, 16))), new Version(17, new int[]{6, 30, 54, 78}, new ECBlocks(28, new ECB(1, 107), new ECB(5, 108)), new ECBlocks(28, new ECB(10, 46), new ECB(1, 47)), new ECBlocks(28, new ECB(1, 22), new ECB(15, 23)), new ECBlocks(28, new ECB(2, 14), new ECB(17, 15))), new Version(18, new int[]{6, 30, 56, 82}, new ECBlocks(30, new ECB(5, 120), new ECB(1, 121)), new ECBlocks(26, new ECB(9, 43), new ECB(4, 44)), new ECBlocks(28, new ECB(17, 22), new ECB(1, 23)), new ECBlocks(28, new ECB(2, 14), new ECB(19, 15))), new Version(19, new int[]{6, 30, 58, 86}, new ECBlocks(28, new ECB(3, 113), new ECB(4, 114)), new ECBlocks(26, new ECB(3, 44), new ECB(11, 45)), new ECBlocks(26, new ECB(17, 21), new ECB(4, 22)), new ECBlocks(26, new ECB(9, 13), new ECB(16, 14))), new Version(20, new int[]{6, 34, 62, 90}, new ECBlocks(28, new ECB(3, 107), new ECB(5, 108)), new ECBlocks(26, new ECB(3, 41), new ECB(13, 42)), new ECBlocks(30, new ECB(15, 24), new ECB(5, 25)), new ECBlocks(28, new ECB(15, 15), new ECB(10, 16))), new Version(21, new int[]{6, 28, 50, 72, 94}, new ECBlocks(28, new ECB(4, 116), new ECB(4, 117)), new ECBlocks(26, new ECB(17, 42)), new ECBlocks(28, new ECB(17, 22), new ECB(6, 23)), new ECBlocks(30, new ECB(19, 16), new ECB(6, 17))), new Version(22, new int[]{6, 26, 50, 74, 98}, new ECBlocks(28, new ECB(2, 111), new ECB(7, 112)), new ECBlocks(28, new ECB(17, 46)), new ECBlocks(30, new ECB(7, 24), new ECB(16, 25)), new ECBlocks(24, new ECB(34, 13))), new Version(23, new int[]{6, 30, 54, 78, 102}, new ECBlocks(30, new ECB(4, 121), new ECB(5, 122)), new ECBlocks(28, new ECB(4, 47), new ECB(14, 48)), new ECBlocks(30, new ECB(11, 24), new ECB(14, 25)), new ECBlocks(30, new ECB(16, 15), new ECB(14, 16))), new Version(24, new int[]{6, 28, 54, 80, 106}, new ECBlocks(30, new ECB(6, 117), new ECB(4, 118)), new ECBlocks(28, new ECB(6, 45), new ECB(14, 46)), new ECBlocks(30, new ECB(11, 24), new ECB(16, 25)), new ECBlocks(30, new ECB(30, 16), new ECB(2, 17))), new Version(25, new int[]{6, 32, 58, 84, 110}, new ECBlocks(26, new ECB(8, 106), new ECB(4, 107)), new ECBlocks(28, new ECB(8, 47), new ECB(13, 48)), new ECBlocks(30, new ECB(7, 24), new ECB(22, 25)), new ECBlocks(30, new ECB(22, 15), new ECB(13, 16))), new Version(26, new int[]{6, 30, 58, 86, 114}, new ECBlocks(28, new ECB(10, 114), new ECB(2, 115)), new ECBlocks(28, new ECB(19, 46), new ECB(4, 47)), new ECBlocks(28, new ECB(28, 22), new ECB(6, 23)), new ECBlocks(30, new ECB(33, 16), new ECB(4, 17))), new Version(27, new int[]{6, 34, 62, 90, 118}, new ECBlocks(30, new ECB(8, 122), new ECB(4, 123)), new ECBlocks(28, new ECB(22, 45), new ECB(3, 46)), new ECBlocks(30, new ECB(8, 23), new ECB(26, 24)), new ECBlocks(30, new ECB(12, 15), new ECB(28, 16))), new Version(28, new int[]{6, 26, 50, 74, 98, 122}, new ECBlocks(30, new ECB(3, 117), new ECB(10, 118)), new ECBlocks(28, new ECB(3, 45), new ECB(23, 46)), new ECBlocks(30, new ECB(4, 24), new ECB(31, 25)), new ECBlocks(30, new ECB(11, 15), new ECB(31, 16))), new Version(29, new int[]{6, 30, 54, 78, 102, 126}, new ECBlocks(30, new ECB(7, 116), new ECB(7, 117)), new ECBlocks(28, new ECB(21, 45), new ECB(7, 46)), new ECBlocks(30, new ECB(1, 23), new ECB(37, 24)), new ECBlocks(30, new ECB(19, 15), new ECB(26, 16))), new Version(30, new int[]{6, 26, 52, 78, 104, 130}, new ECBlocks(30, new ECB(5, 115), new ECB(10, 116)), new ECBlocks(28, new ECB(19, 47), new ECB(10, 48)), new ECBlocks(30, new ECB(15, 24), new ECB(25, 25)), new ECBlocks(30, new ECB(23, 15), new ECB(25, 16))), new Version(31, new int[]{6, 30, 56, 82, 108, 134}, new ECBlocks(30, new ECB(13, 115), new ECB(3, 116)), new ECBlocks(28, new ECB(2, 46), new ECB(29, 47)), new ECBlocks(30, new ECB(42, 24), new ECB(1, 25)), new ECBlocks(30, new ECB(23, 15), new ECB(28, 16))), new Version(32, new int[]{6, 34, 60, 86, 112, 138}, new ECBlocks(30, new ECB(17, 115)), new ECBlocks(28, new ECB(10, 46), new ECB(23, 47)), new ECBlocks(30, new ECB(10, 24), new ECB(35, 25)), new ECBlocks(30, new ECB(19, 15), new ECB(35, 16))), new Version(33, new int[]{6, 30, 58, 86, 114, 142}, new ECBlocks(30, new ECB(17, 115), new ECB(1, 116)), new ECBlocks(28, new ECB(14, 46), new ECB(21, 47)), new ECBlocks(30, new ECB(29, 24), new ECB(19, 25)), new ECBlocks(30, new ECB(11, 15), new ECB(46, 16))), new Version(34, new int[]{6, 34, 62, 90, 118, 146}, new ECBlocks(30, new ECB(13, 115), new ECB(6, 116)), new ECBlocks(28, new ECB(14, 46), new ECB(23, 47)), new ECBlocks(30, new ECB(44, 24), new ECB(7, 25)), new ECBlocks(30, new ECB(59, 16), new ECB(1, 17))), new Version(35, new int[]{6, 30, 54, 78, 102, 126, 150}, new ECBlocks(30, new ECB(12, 121), new ECB(7, 122)), new ECBlocks(28, new ECB(12, 47), new ECB(26, 48)), new ECBlocks(30, new ECB(39, 24), new ECB(14, 25)), new ECBlocks(30, new ECB(22, 15), new ECB(41, 16))), new Version(36, new int[]{6, 24, 50, 76, 102, 128, 154}, new ECBlocks(30, new ECB(6, 121), new ECB(14, 122)), new ECBlocks(28, new ECB(6, 47), new ECB(34, 48)), new ECBlocks(30, new ECB(46, 24), new ECB(10, 25)), new ECBlocks(30, new ECB(2, 15), new ECB(64, 16))), new Version(37, new int[]{6, 28, 54, 80, 106, 132, 158}, new ECBlocks(30, new ECB(17, 122), new ECB(4, 123)), new ECBlocks(28, new ECB(29, 46), new ECB(14, 47)), new ECBlocks(30, new ECB(49, 24), new ECB(10, 25)), new ECBlocks(30, new ECB(24, 15), new ECB(46, 16))), new Version(38, new int[]{6, 32, 58, 84, 110, 136, 162}, new ECBlocks(30, new ECB(4, 122), new ECB(18, 123)), new ECBlocks(28, new ECB(13, 46), new ECB(32, 47)), new ECBlocks(30, new ECB(48, 24), new ECB(14, 25)), new ECBlocks(30, new ECB(42, 15), new ECB(32, 16))), new Version(39, new int[]{6, 26, 54, 82, 110, 138, 166}, new ECBlocks(30, new ECB(20, 117), new ECB(4, 118)), new ECBlocks(28, new ECB(40, 47), new ECB(7, 48)), new ECBlocks(30, new ECB(43, 24), new ECB(22, 25)), new ECBlocks(30, new ECB(10, 15), new ECB(67, 16))), new Version(40, new int[]{6, 30, 58, 86, 114, 142, 170}, new ECBlocks(30, new ECB(19, 118), new ECB(6, 119)), new ECBlocks(28, new ECB(18, 47), new ECB(31, 48)), new ECBlocks(30, new ECB(34, 24), new ECB(34, 25)), new ECBlocks(30, new ECB(20, 15), new ECB(61, 16))) }; } } plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/000077500000000000000000000000001312650303100225325ustar00rootroot00000000000000plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/BlockPair.java000066400000000000000000000017641312650303100252530ustar00rootroot00000000000000/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.qrcode.encoder; final class BlockPair { private final byte[] dataBytes; private final byte[] errorCorrectionBytes; BlockPair(byte[] data, byte[] errorCorrection) { dataBytes = data; errorCorrectionBytes = errorCorrection; } public byte[] getDataBytes() { return dataBytes; } public byte[] getErrorCorrectionBytes() { return errorCorrectionBytes; } } plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/ByteMatrix.java000066400000000000000000000046031312650303100254700ustar00rootroot00000000000000/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.qrcode.encoder; /** * A class which wraps a 2D array of bytes. The default usage is signed. If you want to use it as a * unsigned container, it's up to you to do byteValue & 0xff at each location. * * JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned * -1, 0, and 1, I'm going to use less memory and go with bytes. * * @author dswitkin@google.com (Daniel Switkin) */ public final class ByteMatrix { private final byte[][] bytes; private final int width; private final int height; public ByteMatrix(int width, int height) { bytes = new byte[height][width]; this.width = width; this.height = height; } public int getHeight() { return height; } public int getWidth() { return width; } public byte get(int x, int y) { return bytes[y][x]; } public byte[][] getArray() { return bytes; } public void set(int x, int y, byte value) { bytes[y][x] = value; } public void set(int x, int y, int value) { bytes[y][x] = (byte) value; } public void set(int x, int y, boolean value) { bytes[y][x] = (byte) (value ? 1 : 0); } public void clear(byte value) { for (int y = 0; y < height; ++y) { for (int x = 0; x < width; ++x) { bytes[y][x] = value; } } } public String toString() { StringBuffer result = new StringBuffer(2 * width * height + 2); for (int y = 0; y < height; ++y) { for (int x = 0; x < width; ++x) { switch (bytes[y][x]) { case 0: result.append(" 0"); break; case 1: result.append(" 1"); break; default: result.append(" "); break; } } result.append('\n'); } return result.toString(); } } plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/Encoder.java000066400000000000000000000507751312650303100247720ustar00rootroot00000000000000/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.qrcode.encoder; import java.io.UnsupportedEncodingException; import java.util.Hashtable; import java.util.Vector; import com.google.zxing.EncodeHintType; import com.google.zxing.WriterException; import com.google.zxing.common.BitArray; import com.google.zxing.common.CharacterSetECI; import com.google.zxing.common.ECI; import com.google.zxing.common.reedsolomon.GF256; import com.google.zxing.common.reedsolomon.ReedSolomonEncoder; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; import com.google.zxing.qrcode.decoder.Mode; import com.google.zxing.qrcode.decoder.Version; /** * @author satorux@google.com (Satoru Takabayashi) - creator * @author dswitkin@google.com (Daniel Switkin) - ported from C++ */ public final class Encoder { // The original table is defined in the table 5 of JISX0510:2004 (p.19). private static final int[] ALPHANUMERIC_TABLE = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0x00-0x0f -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0x10-0x1f 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, // 0x20-0x2f 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, // 0x30-0x3f -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // 0x40-0x4f 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, // 0x50-0x5f }; static final String DEFAULT_BYTE_MODE_ENCODING = "ISO-8859-1"; private Encoder() { } // The mask penalty calculation is complicated. See Table 21 of JISX0510:2004 (p.45) for details. // Basically it applies four rules and summate all penalties. private static int calculateMaskPenalty(ByteMatrix matrix) { int penalty = 0; penalty += MaskUtil.applyMaskPenaltyRule1(matrix); penalty += MaskUtil.applyMaskPenaltyRule2(matrix); penalty += MaskUtil.applyMaskPenaltyRule3(matrix); penalty += MaskUtil.applyMaskPenaltyRule4(matrix); return penalty; } /** * Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen * internally by chooseMode(). On success, store the result in "qrCode". * * We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for * "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very * strong error correction for this purpose. * * Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() * with which clients can specify the encoding mode. For now, we don't need the functionality. */ public static void encode(String content, ErrorCorrectionLevel ecLevel, QRCode qrCode) throws WriterException { encode(content, ecLevel, null, qrCode); } public static void encode(String content, ErrorCorrectionLevel ecLevel, Hashtable hints, QRCode qrCode) throws WriterException { String encoding = hints == null ? null : (String) hints.get(EncodeHintType.CHARACTER_SET); if (encoding == null) { encoding = DEFAULT_BYTE_MODE_ENCODING; } // Step 1: Choose the mode (encoding). Mode mode = chooseMode(content, encoding); // Step 2: Append "bytes" into "dataBits" in appropriate encoding. BitArray dataBits = new BitArray(); appendBytes(content, mode, dataBits, encoding); // Step 3: Initialize QR code that can contain "dataBits". int numInputBytes = dataBits.getSizeInBytes(); initQRCode(numInputBytes, ecLevel, mode, qrCode); // Step 4: Build another bit vector that contains header and data. BitArray headerAndDataBits = new BitArray(); // Step 4.5: Append ECI message if applicable if (mode == Mode.BYTE && !DEFAULT_BYTE_MODE_ENCODING.equals(encoding)) { CharacterSetECI eci = CharacterSetECI.getCharacterSetECIByName(encoding); if (eci != null) { appendECI(eci, headerAndDataBits); } } appendModeInfo(mode, headerAndDataBits); int numLetters = mode.equals(Mode.BYTE) ? dataBits.getSizeInBytes() : content.length(); appendLengthInfo(numLetters, qrCode.getVersion(), mode, headerAndDataBits); headerAndDataBits.appendBitArray(dataBits); // Step 5: Terminate the bits properly. terminateBits(qrCode.getNumDataBytes(), headerAndDataBits); // Step 6: Interleave data bits with error correction code. BitArray finalBits = new BitArray(); interleaveWithECBytes(headerAndDataBits, qrCode.getNumTotalBytes(), qrCode.getNumDataBytes(), qrCode.getNumRSBlocks(), finalBits); // Step 7: Choose the mask pattern and set to "qrCode". ByteMatrix matrix = new ByteMatrix(qrCode.getMatrixWidth(), qrCode.getMatrixWidth()); qrCode.setMaskPattern(chooseMaskPattern(finalBits, qrCode.getECLevel(), qrCode.getVersion(), matrix)); // Step 8. Build the matrix and set it to "qrCode". MatrixUtil.buildMatrix(finalBits, qrCode.getECLevel(), qrCode.getVersion(), qrCode.getMaskPattern(), matrix); qrCode.setMatrix(matrix); // Step 9. Make sure we have a valid QR Code. if (!qrCode.isValid()) { throw new WriterException("Invalid QR code: " + qrCode.toString()); } } /** * @return the code point of the table used in alphanumeric mode or * -1 if there is no corresponding code in the table. */ static int getAlphanumericCode(int code) { if (code < ALPHANUMERIC_TABLE.length) { return ALPHANUMERIC_TABLE[code]; } return -1; } public static Mode chooseMode(String content) { return chooseMode(content, null); } /** * Choose the best mode by examining the content. Note that 'encoding' is used as a hint; * if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. */ public static Mode chooseMode(String content, String encoding) { if ("Shift_JIS".equals(encoding)) { // Choose Kanji mode if all input are double-byte characters return isOnlyDoubleByteKanji(content) ? Mode.KANJI : Mode.BYTE; } boolean hasNumeric = false; boolean hasAlphanumeric = false; for (int i = 0; i < content.length(); ++i) { char c = content.charAt(i); if (c >= '0' && c <= '9') { hasNumeric = true; } else if (getAlphanumericCode(c) != -1) { hasAlphanumeric = true; } else { return Mode.BYTE; } } if (hasAlphanumeric) { return Mode.ALPHANUMERIC; } else if (hasNumeric) { return Mode.NUMERIC; } return Mode.BYTE; } private static boolean isOnlyDoubleByteKanji(String content) { byte[] bytes; try { bytes = content.getBytes("Shift_JIS"); } catch (UnsupportedEncodingException uee) { return false; } int length = bytes.length; if (length % 2 != 0) { return false; } for (int i = 0; i < length; i += 2) { int byte1 = bytes[i] & 0xFF; if ((byte1 < 0x81 || byte1 > 0x9F) && (byte1 < 0xE0 || byte1 > 0xEB)) { return false; } } return true; } private static int chooseMaskPattern(BitArray bits, ErrorCorrectionLevel ecLevel, int version, ByteMatrix matrix) throws WriterException { int minPenalty = Integer.MAX_VALUE; // Lower penalty is better. int bestMaskPattern = -1; // We try all mask patterns to choose the best one. for (int maskPattern = 0; maskPattern < QRCode.NUM_MASK_PATTERNS; maskPattern++) { MatrixUtil.buildMatrix(bits, ecLevel, version, maskPattern, matrix); int penalty = calculateMaskPenalty(matrix); if (penalty < minPenalty) { minPenalty = penalty; bestMaskPattern = maskPattern; } } return bestMaskPattern; } /** * Initialize "qrCode" according to "numInputBytes", "ecLevel", and "mode". On success, * modify "qrCode". */ private static void initQRCode(int numInputBytes, ErrorCorrectionLevel ecLevel, Mode mode, QRCode qrCode) throws WriterException { qrCode.setECLevel(ecLevel); qrCode.setMode(mode); // In the following comments, we use numbers of Version 7-H. for (int versionNum = 1; versionNum <= 40; versionNum++) { Version version = Version.getVersionForNumber(versionNum); // numBytes = 196 int numBytes = version.getTotalCodewords(); // getNumECBytes = 130 Version.ECBlocks ecBlocks = version.getECBlocksForLevel(ecLevel); int numEcBytes = ecBlocks.getTotalECCodewords(); // getNumRSBlocks = 5 int numRSBlocks = ecBlocks.getNumBlocks(); // getNumDataBytes = 196 - 130 = 66 int numDataBytes = numBytes - numEcBytes; // We want to choose the smallest version which can contain data of "numInputBytes" + some // extra bits for the header (mode info and length info). The header can be three bytes // (precisely 4 + 16 bits) at most. Hence we do +3 here. if (numDataBytes >= numInputBytes + 3) { // Yay, we found the proper rs block info! qrCode.setVersion(versionNum); qrCode.setNumTotalBytes(numBytes); qrCode.setNumDataBytes(numDataBytes); qrCode.setNumRSBlocks(numRSBlocks); // getNumECBytes = 196 - 66 = 130 qrCode.setNumECBytes(numEcBytes); // matrix width = 21 + 6 * 4 = 45 qrCode.setMatrixWidth(version.getDimensionForVersion()); return; } } throw new WriterException("Cannot find proper rs block info (input data too big?)"); } /** * Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). */ static void terminateBits(int numDataBytes, BitArray bits) throws WriterException { int capacity = numDataBytes << 3; if (bits.getSize() > capacity) { throw new WriterException("data bits cannot fit in the QR Code" + bits.getSize() + " > " + capacity); } for (int i = 0; i < 4 && bits.getSize() < capacity; ++i) { bits.appendBit(false); } // Append termination bits. See 8.4.8 of JISX0510:2004 (p.24) for details. // If the last byte isn't 8-bit aligned, we'll add padding bits. int numBitsInLastByte = bits.getSize() & 0x07; if (numBitsInLastByte > 0) { for (int i = numBitsInLastByte; i < 8; i++) { bits.appendBit(false); } } // If we have more space, we'll fill the space with padding patterns defined in 8.4.9 (p.24). int numPaddingBytes = numDataBytes - bits.getSizeInBytes(); for (int i = 0; i < numPaddingBytes; ++i) { bits.appendBits(((i & 0x01) == 0) ? 0xEC : 0x11, 8); } if (bits.getSize() != capacity) { throw new WriterException("Bits size does not equal capacity"); } } /** * Get number of data bytes and number of error correction bytes for block id "blockID". Store * the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of * JISX0510:2004 (p.30) */ static void getNumDataBytesAndNumECBytesForBlockID(int numTotalBytes, int numDataBytes, int numRSBlocks, int blockID, int[] numDataBytesInBlock, int[] numECBytesInBlock) throws WriterException { if (blockID >= numRSBlocks) { throw new WriterException("Block ID too large"); } // numRsBlocksInGroup2 = 196 % 5 = 1 int numRsBlocksInGroup2 = numTotalBytes % numRSBlocks; // numRsBlocksInGroup1 = 5 - 1 = 4 int numRsBlocksInGroup1 = numRSBlocks - numRsBlocksInGroup2; // numTotalBytesInGroup1 = 196 / 5 = 39 int numTotalBytesInGroup1 = numTotalBytes / numRSBlocks; // numTotalBytesInGroup2 = 39 + 1 = 40 int numTotalBytesInGroup2 = numTotalBytesInGroup1 + 1; // numDataBytesInGroup1 = 66 / 5 = 13 int numDataBytesInGroup1 = numDataBytes / numRSBlocks; // numDataBytesInGroup2 = 13 + 1 = 14 int numDataBytesInGroup2 = numDataBytesInGroup1 + 1; // numEcBytesInGroup1 = 39 - 13 = 26 int numEcBytesInGroup1 = numTotalBytesInGroup1 - numDataBytesInGroup1; // numEcBytesInGroup2 = 40 - 14 = 26 int numEcBytesInGroup2 = numTotalBytesInGroup2 - numDataBytesInGroup2; // Sanity checks. // 26 = 26 if (numEcBytesInGroup1 != numEcBytesInGroup2) { throw new WriterException("EC bytes mismatch"); } // 5 = 4 + 1. if (numRSBlocks != numRsBlocksInGroup1 + numRsBlocksInGroup2) { throw new WriterException("RS blocks mismatch"); } // 196 = (13 + 26) * 4 + (14 + 26) * 1 if (numTotalBytes != ((numDataBytesInGroup1 + numEcBytesInGroup1) * numRsBlocksInGroup1) + ((numDataBytesInGroup2 + numEcBytesInGroup2) * numRsBlocksInGroup2)) { throw new WriterException("Total bytes mismatch"); } if (blockID < numRsBlocksInGroup1) { numDataBytesInBlock[0] = numDataBytesInGroup1; numECBytesInBlock[0] = numEcBytesInGroup1; } else { numDataBytesInBlock[0] = numDataBytesInGroup2; numECBytesInBlock[0] = numEcBytesInGroup2; } } /** * Interleave "bits" with corresponding error correction bytes. On success, store the result in * "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. */ static void interleaveWithECBytes(BitArray bits, int numTotalBytes, int numDataBytes, int numRSBlocks, BitArray result) throws WriterException { // "bits" must have "getNumDataBytes" bytes of data. if (bits.getSizeInBytes() != numDataBytes) { throw new WriterException("Number of bits and data bytes does not match"); } // Step 1. Divide data bytes into blocks and generate error correction bytes for them. We'll // store the divided data bytes blocks and error correction bytes blocks into "blocks". int dataBytesOffset = 0; int maxNumDataBytes = 0; int maxNumEcBytes = 0; // Since, we know the number of reedsolmon blocks, we can initialize the vector with the number. Vector blocks = new Vector(numRSBlocks); for (int i = 0; i < numRSBlocks; ++i) { int[] numDataBytesInBlock = new int[1]; int[] numEcBytesInBlock = new int[1]; getNumDataBytesAndNumECBytesForBlockID( numTotalBytes, numDataBytes, numRSBlocks, i, numDataBytesInBlock, numEcBytesInBlock); int size = numDataBytesInBlock[0]; byte[] dataBytes = new byte[size]; bits.toBytes(8*dataBytesOffset, dataBytes, 0, size); byte[] ecBytes = generateECBytes(dataBytes, numEcBytesInBlock[0]); blocks.addElement(new BlockPair(dataBytes, ecBytes)); maxNumDataBytes = Math.max(maxNumDataBytes, size); maxNumEcBytes = Math.max(maxNumEcBytes, ecBytes.length); dataBytesOffset += numDataBytesInBlock[0]; } if (numDataBytes != dataBytesOffset) { throw new WriterException("Data bytes does not match offset"); } // First, place data blocks. for (int i = 0; i < maxNumDataBytes; ++i) { for (int j = 0; j < blocks.size(); ++j) { byte[] dataBytes = ((BlockPair) blocks.elementAt(j)).getDataBytes(); if (i < dataBytes.length) { result.appendBits(dataBytes[i], 8); } } } // Then, place error correction blocks. for (int i = 0; i < maxNumEcBytes; ++i) { for (int j = 0; j < blocks.size(); ++j) { byte[] ecBytes = ((BlockPair) blocks.elementAt(j)).getErrorCorrectionBytes(); if (i < ecBytes.length) { result.appendBits(ecBytes[i], 8); } } } if (numTotalBytes != result.getSizeInBytes()) { // Should be same. throw new WriterException("Interleaving error: " + numTotalBytes + " and " + result.getSizeInBytes() + " differ."); } } static byte[] generateECBytes(byte[] dataBytes, int numEcBytesInBlock) { int numDataBytes = dataBytes.length; int[] toEncode = new int[numDataBytes + numEcBytesInBlock]; for (int i = 0; i < numDataBytes; i++) { toEncode[i] = dataBytes[i] & 0xFF; } new ReedSolomonEncoder(GF256.QR_CODE_FIELD).encode(toEncode, numEcBytesInBlock); byte[] ecBytes = new byte[numEcBytesInBlock]; for (int i = 0; i < numEcBytesInBlock; i++) { ecBytes[i] = (byte) toEncode[numDataBytes + i]; } return ecBytes; } /** * Append mode info. On success, store the result in "bits". */ static void appendModeInfo(Mode mode, BitArray bits) { bits.appendBits(mode.getBits(), 4); } /** * Append length info. On success, store the result in "bits". */ static void appendLengthInfo(int numLetters, int version, Mode mode, BitArray bits) throws WriterException { int numBits = mode.getCharacterCountBits(Version.getVersionForNumber(version)); if (numLetters > ((1 << numBits) - 1)) { throw new WriterException(numLetters + "is bigger than" + ((1 << numBits) - 1)); } bits.appendBits(numLetters, numBits); } /** * Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". */ static void appendBytes(String content, Mode mode, BitArray bits, String encoding) throws WriterException { if (mode.equals(Mode.NUMERIC)) { appendNumericBytes(content, bits); } else if (mode.equals(Mode.ALPHANUMERIC)) { appendAlphanumericBytes(content, bits); } else if (mode.equals(Mode.BYTE)) { append8BitBytes(content, bits, encoding); } else if (mode.equals(Mode.KANJI)) { appendKanjiBytes(content, bits); } else { throw new WriterException("Invalid mode: " + mode); } } static void appendNumericBytes(String content, BitArray bits) { int length = content.length(); int i = 0; while (i < length) { int num1 = content.charAt(i) - '0'; if (i + 2 < length) { // Encode three numeric letters in ten bits. int num2 = content.charAt(i + 1) - '0'; int num3 = content.charAt(i + 2) - '0'; bits.appendBits(num1 * 100 + num2 * 10 + num3, 10); i += 3; } else if (i + 1 < length) { // Encode two numeric letters in seven bits. int num2 = content.charAt(i + 1) - '0'; bits.appendBits(num1 * 10 + num2, 7); i += 2; } else { // Encode one numeric letter in four bits. bits.appendBits(num1, 4); i++; } } } static void appendAlphanumericBytes(String content, BitArray bits) throws WriterException { int length = content.length(); int i = 0; while (i < length) { int code1 = getAlphanumericCode(content.charAt(i)); if (code1 == -1) { throw new WriterException(); } if (i + 1 < length) { int code2 = getAlphanumericCode(content.charAt(i + 1)); if (code2 == -1) { throw new WriterException(); } // Encode two alphanumeric letters in 11 bits. bits.appendBits(code1 * 45 + code2, 11); i += 2; } else { // Encode one alphanumeric letter in six bits. bits.appendBits(code1, 6); i++; } } } static void append8BitBytes(String content, BitArray bits, String encoding) throws WriterException { byte[] bytes; try { bytes = content.getBytes(encoding); } catch (UnsupportedEncodingException uee) { throw new WriterException(uee.toString()); } for (int i = 0; i < bytes.length; ++i) { bits.appendBits(bytes[i], 8); } } static void appendKanjiBytes(String content, BitArray bits) throws WriterException { byte[] bytes; try { bytes = content.getBytes("Shift_JIS"); } catch (UnsupportedEncodingException uee) { throw new WriterException(uee.toString()); } int length = bytes.length; for (int i = 0; i < length; i += 2) { int byte1 = bytes[i] & 0xFF; int byte2 = bytes[i + 1] & 0xFF; int code = (byte1 << 8) | byte2; int subtracted = -1; if (code >= 0x8140 && code <= 0x9ffc) { subtracted = code - 0x8140; } else if (code >= 0xe040 && code <= 0xebbf) { subtracted = code - 0xc140; } if (subtracted == -1) { throw new WriterException("Invalid byte sequence"); } int encoded = ((subtracted >> 8) * 0xc0) + (subtracted & 0xff); bits.appendBits(encoded, 13); } } private static void appendECI(ECI eci, BitArray bits) { bits.appendBits(Mode.ECI.getBits(), 4); // This is correct for values up to 127, which is all we need now. bits.appendBits(eci.getValue(), 8); } } plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/MaskUtil.java000066400000000000000000000165111312650303100251320ustar00rootroot00000000000000/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.qrcode.encoder; /** * @author satorux@google.com (Satoru Takabayashi) - creator * @author dswitkin@google.com (Daniel Switkin) - ported from C++ */ public final class MaskUtil { private MaskUtil() { // do nothing } // Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and // give penalty to them. Example: 00000 or 11111. public static int applyMaskPenaltyRule1(ByteMatrix matrix) { return applyMaskPenaltyRule1Internal(matrix, true) + applyMaskPenaltyRule1Internal(matrix, false); } // Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give // penalty to them. public static int applyMaskPenaltyRule2(ByteMatrix matrix) { int penalty = 0; byte[][] array = matrix.getArray(); int width = matrix.getWidth(); int height = matrix.getHeight(); for (int y = 0; y < height - 1; ++y) { for (int x = 0; x < width - 1; ++x) { int value = array[y][x]; if (value == array[y][x + 1] && value == array[y + 1][x] && value == array[y + 1][x + 1]) { penalty += 3; } } } return penalty; } // Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or // 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give // penalties twice (i.e. 40 * 2). public static int applyMaskPenaltyRule3(ByteMatrix matrix) { int penalty = 0; byte[][] array = matrix.getArray(); int width = matrix.getWidth(); int height = matrix.getHeight(); for (int y = 0; y < height; ++y) { for (int x = 0; x < width; ++x) { // Tried to simplify following conditions but failed. if (x + 6 < width && array[y][x] == 1 && array[y][x + 1] == 0 && array[y][x + 2] == 1 && array[y][x + 3] == 1 && array[y][x + 4] == 1 && array[y][x + 5] == 0 && array[y][x + 6] == 1 && ((x + 10 < width && array[y][x + 7] == 0 && array[y][x + 8] == 0 && array[y][x + 9] == 0 && array[y][x + 10] == 0) || (x - 4 >= 0 && array[y][x - 1] == 0 && array[y][x - 2] == 0 && array[y][x - 3] == 0 && array[y][x - 4] == 0))) { penalty += 40; } if (y + 6 < height && array[y][x] == 1 && array[y + 1][x] == 0 && array[y + 2][x] == 1 && array[y + 3][x] == 1 && array[y + 4][x] == 1 && array[y + 5][x] == 0 && array[y + 6][x] == 1 && ((y + 10 < height && array[y + 7][x] == 0 && array[y + 8][x] == 0 && array[y + 9][x] == 0 && array[y + 10][x] == 0) || (y - 4 >= 0 && array[y - 1][x] == 0 && array[y - 2][x] == 0 && array[y - 3][x] == 0 && array[y - 4][x] == 0))) { penalty += 40; } } } return penalty; } // Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give // penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. Examples: // - 0% => 100 // - 40% => 20 // - 45% => 10 // - 50% => 0 // - 55% => 10 // - 55% => 20 // - 100% => 100 public static int applyMaskPenaltyRule4(ByteMatrix matrix) { int numDarkCells = 0; byte[][] array = matrix.getArray(); int width = matrix.getWidth(); int height = matrix.getHeight(); for (int y = 0; y < height; ++y) { for (int x = 0; x < width; ++x) { if (array[y][x] == 1) { numDarkCells += 1; } } } int numTotalCells = matrix.getHeight() * matrix.getWidth(); double darkRatio = (double) numDarkCells / numTotalCells; return Math.abs((int) (darkRatio * 100 - 50)) / 5 * 10; } // Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask // pattern conditions. public static boolean getDataMaskBit(int maskPattern, int x, int y) { if (!QRCode.isValidMaskPattern(maskPattern)) { throw new IllegalArgumentException("Invalid mask pattern"); } int intermediate, temp; switch (maskPattern) { case 0: intermediate = (y + x) & 0x1; break; case 1: intermediate = y & 0x1; break; case 2: intermediate = x % 3; break; case 3: intermediate = (y + x) % 3; break; case 4: intermediate = ((y >>> 1) + (x / 3)) & 0x1; break; case 5: temp = y * x; intermediate = (temp & 0x1) + (temp % 3); break; case 6: temp = y * x; intermediate = (((temp & 0x1) + (temp % 3)) & 0x1); break; case 7: temp = y * x; intermediate = (((temp % 3) + ((y + x) & 0x1)) & 0x1); break; default: throw new IllegalArgumentException("Invalid mask pattern: " + maskPattern); } return intermediate == 0; } // Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both // vertical and horizontal orders respectively. private static int applyMaskPenaltyRule1Internal(ByteMatrix matrix, boolean isHorizontal) { int penalty = 0; int numSameBitCells = 0; int prevBit = -1; // Horizontal mode: // for (int i = 0; i < matrix.height(); ++i) { // for (int j = 0; j < matrix.width(); ++j) { // int bit = matrix.get(i, j); // Vertical mode: // for (int i = 0; i < matrix.width(); ++i) { // for (int j = 0; j < matrix.height(); ++j) { // int bit = matrix.get(j, i); int iLimit = isHorizontal ? matrix.getHeight() : matrix.getWidth(); int jLimit = isHorizontal ? matrix.getWidth() : matrix.getHeight(); byte[][] array = matrix.getArray(); for (int i = 0; i < iLimit; ++i) { for (int j = 0; j < jLimit; ++j) { int bit = isHorizontal ? array[i][j] : array[j][i]; if (bit == prevBit) { numSameBitCells += 1; // Found five repetitive cells with the same color (bit). // We'll give penalty of 3. if (numSameBitCells == 5) { penalty += 3; } else if (numSameBitCells > 5) { // After five repetitive cells, we'll add the penalty one // by one. penalty += 1; } } else { numSameBitCells = 1; // Include the cell itself. prevBit = bit; } } numSameBitCells = 0; // Clear at each row/column. } return penalty; } } plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/MatrixUtil.java000066400000000000000000000471741312650303100255140ustar00rootroot00000000000000/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.qrcode.encoder; import com.google.zxing.WriterException; import com.google.zxing.common.BitArray; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; /** * @author satorux@google.com (Satoru Takabayashi) - creator * @author dswitkin@google.com (Daniel Switkin) - ported from C++ */ public final class MatrixUtil { private MatrixUtil() { // do nothing } private static final int[][] POSITION_DETECTION_PATTERN = { {1, 1, 1, 1, 1, 1, 1}, {1, 0, 0, 0, 0, 0, 1}, {1, 0, 1, 1, 1, 0, 1}, {1, 0, 1, 1, 1, 0, 1}, {1, 0, 1, 1, 1, 0, 1}, {1, 0, 0, 0, 0, 0, 1}, {1, 1, 1, 1, 1, 1, 1}, }; private static final int[][] HORIZONTAL_SEPARATION_PATTERN = { {0, 0, 0, 0, 0, 0, 0, 0}, }; private static final int[][] VERTICAL_SEPARATION_PATTERN = { {0}, {0}, {0}, {0}, {0}, {0}, {0}, }; private static final int[][] POSITION_ADJUSTMENT_PATTERN = { {1, 1, 1, 1, 1}, {1, 0, 0, 0, 1}, {1, 0, 1, 0, 1}, {1, 0, 0, 0, 1}, {1, 1, 1, 1, 1}, }; // From Appendix E. Table 1, JIS0510X:2004 (p 71). The table was double-checked by komatsu. private static final int[][] POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE = { {-1, -1, -1, -1, -1, -1, -1}, // Version 1 { 6, 18, -1, -1, -1, -1, -1}, // Version 2 { 6, 22, -1, -1, -1, -1, -1}, // Version 3 { 6, 26, -1, -1, -1, -1, -1}, // Version 4 { 6, 30, -1, -1, -1, -1, -1}, // Version 5 { 6, 34, -1, -1, -1, -1, -1}, // Version 6 { 6, 22, 38, -1, -1, -1, -1}, // Version 7 { 6, 24, 42, -1, -1, -1, -1}, // Version 8 { 6, 26, 46, -1, -1, -1, -1}, // Version 9 { 6, 28, 50, -1, -1, -1, -1}, // Version 10 { 6, 30, 54, -1, -1, -1, -1}, // Version 11 { 6, 32, 58, -1, -1, -1, -1}, // Version 12 { 6, 34, 62, -1, -1, -1, -1}, // Version 13 { 6, 26, 46, 66, -1, -1, -1}, // Version 14 { 6, 26, 48, 70, -1, -1, -1}, // Version 15 { 6, 26, 50, 74, -1, -1, -1}, // Version 16 { 6, 30, 54, 78, -1, -1, -1}, // Version 17 { 6, 30, 56, 82, -1, -1, -1}, // Version 18 { 6, 30, 58, 86, -1, -1, -1}, // Version 19 { 6, 34, 62, 90, -1, -1, -1}, // Version 20 { 6, 28, 50, 72, 94, -1, -1}, // Version 21 { 6, 26, 50, 74, 98, -1, -1}, // Version 22 { 6, 30, 54, 78, 102, -1, -1}, // Version 23 { 6, 28, 54, 80, 106, -1, -1}, // Version 24 { 6, 32, 58, 84, 110, -1, -1}, // Version 25 { 6, 30, 58, 86, 114, -1, -1}, // Version 26 { 6, 34, 62, 90, 118, -1, -1}, // Version 27 { 6, 26, 50, 74, 98, 122, -1}, // Version 28 { 6, 30, 54, 78, 102, 126, -1}, // Version 29 { 6, 26, 52, 78, 104, 130, -1}, // Version 30 { 6, 30, 56, 82, 108, 134, -1}, // Version 31 { 6, 34, 60, 86, 112, 138, -1}, // Version 32 { 6, 30, 58, 86, 114, 142, -1}, // Version 33 { 6, 34, 62, 90, 118, 146, -1}, // Version 34 { 6, 30, 54, 78, 102, 126, 150}, // Version 35 { 6, 24, 50, 76, 102, 128, 154}, // Version 36 { 6, 28, 54, 80, 106, 132, 158}, // Version 37 { 6, 32, 58, 84, 110, 136, 162}, // Version 38 { 6, 26, 54, 82, 110, 138, 166}, // Version 39 { 6, 30, 58, 86, 114, 142, 170}, // Version 40 }; // Type info cells at the left top corner. private static final int[][] TYPE_INFO_COORDINATES = { {8, 0}, {8, 1}, {8, 2}, {8, 3}, {8, 4}, {8, 5}, {8, 7}, {8, 8}, {7, 8}, {5, 8}, {4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}, }; // From Appendix D in JISX0510:2004 (p. 67) private static final int VERSION_INFO_POLY = 0x1f25; // 1 1111 0010 0101 // From Appendix C in JISX0510:2004 (p.65). private static final int TYPE_INFO_POLY = 0x537; private static final int TYPE_INFO_MASK_PATTERN = 0x5412; // Set all cells to -1. -1 means that the cell is empty (not set yet). // // JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding // with the ByteMatrix initialized all to zero. public static void clearMatrix(ByteMatrix matrix) { matrix.clear((byte) -1); } // Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On // success, store the result in "matrix" and return true. public static void buildMatrix(BitArray dataBits, ErrorCorrectionLevel ecLevel, int version, int maskPattern, ByteMatrix matrix) throws WriterException { clearMatrix(matrix); embedBasicPatterns(version, matrix); // Type information appear with any version. embedTypeInfo(ecLevel, maskPattern, matrix); // Version info appear if version >= 7. maybeEmbedVersionInfo(version, matrix); // Data should be embedded at end. embedDataBits(dataBits, maskPattern, matrix); } // Embed basic patterns. On success, modify the matrix and return true. // The basic patterns are: // - Position detection patterns // - Timing patterns // - Dark dot at the left bottom corner // - Position adjustment patterns, if need be public static void embedBasicPatterns(int version, ByteMatrix matrix) throws WriterException { // Let's get started with embedding big squares at corners. embedPositionDetectionPatternsAndSeparators(matrix); // Then, embed the dark dot at the left bottom corner. embedDarkDotAtLeftBottomCorner(matrix); // Position adjustment patterns appear if version >= 2. maybeEmbedPositionAdjustmentPatterns(version, matrix); // Timing patterns should be embedded after position adj. patterns. embedTimingPatterns(matrix); } // Embed type information. On success, modify the matrix. public static void embedTypeInfo(ErrorCorrectionLevel ecLevel, int maskPattern, ByteMatrix matrix) throws WriterException { BitArray typeInfoBits = new BitArray(); makeTypeInfoBits(ecLevel, maskPattern, typeInfoBits); for (int i = 0; i < typeInfoBits.getSize(); ++i) { // Place bits in LSB to MSB order. LSB (least significant bit) is the last value in // "typeInfoBits". boolean bit = typeInfoBits.get(typeInfoBits.getSize() - 1 - i); // Type info bits at the left top corner. See 8.9 of JISX0510:2004 (p.46). int x1 = TYPE_INFO_COORDINATES[i][0]; int y1 = TYPE_INFO_COORDINATES[i][1]; matrix.set(x1, y1, bit); if (i < 8) { // Right top corner. int x2 = matrix.getWidth() - i - 1; int y2 = 8; matrix.set(x2, y2, bit); } else { // Left bottom corner. int x2 = 8; int y2 = matrix.getHeight() - 7 + (i - 8); matrix.set(x2, y2, bit); } } } // Embed version information if need be. On success, modify the matrix and return true. // See 8.10 of JISX0510:2004 (p.47) for how to embed version information. public static void maybeEmbedVersionInfo(int version, ByteMatrix matrix) throws WriterException { if (version < 7) { // Version info is necessary if version >= 7. return; // Don't need version info. } BitArray versionInfoBits = new BitArray(); makeVersionInfoBits(version, versionInfoBits); int bitIndex = 6 * 3 - 1; // It will decrease from 17 to 0. for (int i = 0; i < 6; ++i) { for (int j = 0; j < 3; ++j) { // Place bits in LSB (least significant bit) to MSB order. boolean bit = versionInfoBits.get(bitIndex); bitIndex--; // Left bottom corner. matrix.set(i, matrix.getHeight() - 11 + j, bit); // Right bottom corner. matrix.set(matrix.getHeight() - 11 + j, i, bit); } } } // Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. // For debugging purposes, it skips masking process if "getMaskPattern" is -1. // See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. public static void embedDataBits(BitArray dataBits, int maskPattern, ByteMatrix matrix) throws WriterException { int bitIndex = 0; int direction = -1; // Start from the right bottom cell. int x = matrix.getWidth() - 1; int y = matrix.getHeight() - 1; while (x > 0) { // Skip the vertical timing pattern. if (x == 6) { x -= 1; } while (y >= 0 && y < matrix.getHeight()) { for (int i = 0; i < 2; ++i) { int xx = x - i; // Skip the cell if it's not empty. if (!isEmpty(matrix.get(xx, y))) { continue; } boolean bit; if (bitIndex < dataBits.getSize()) { bit = dataBits.get(bitIndex); ++bitIndex; } else { // Padding bit. If there is no bit left, we'll fill the left cells with 0, as described // in 8.4.9 of JISX0510:2004 (p. 24). bit = false; } // Skip masking if mask_pattern is -1. if (maskPattern != -1) { if (MaskUtil.getDataMaskBit(maskPattern, xx, y)) { bit = !bit; } } matrix.set(xx, y, bit); } y += direction; } direction = -direction; // Reverse the direction. y += direction; x -= 2; // Move to the left. } // All bits should be consumed. if (bitIndex != dataBits.getSize()) { throw new WriterException("Not all bits consumed: " + bitIndex + '/' + dataBits.getSize()); } } // Return the position of the most significant bit set (to one) in the "value". The most // significant bit is position 32. If there is no bit set, return 0. Examples: // - findMSBSet(0) => 0 // - findMSBSet(1) => 1 // - findMSBSet(255) => 8 public static int findMSBSet(int value) { int numDigits = 0; while (value != 0) { value >>>= 1; ++numDigits; } return numDigits; } // Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH // code is used for encoding type information and version information. // Example: Calculation of version information of 7. // f(x) is created from 7. // - 7 = 000111 in 6 bits // - f(x) = x^2 + x^1 + x^0 // g(x) is given by the standard (p. 67) // - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 // Multiply f(x) by x^(18 - 6) // - f'(x) = f(x) * x^(18 - 6) // - f'(x) = x^14 + x^13 + x^12 // Calculate the remainder of f'(x) / g(x) // x^2 // __________________________________________________ // g(x) )x^14 + x^13 + x^12 // x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 // -------------------------------------------------- // x^11 + x^10 + x^7 + x^4 + x^2 // // The remainder is x^11 + x^10 + x^7 + x^4 + x^2 // Encode it in binary: 110010010100 // The return value is 0xc94 (1100 1001 0100) // // Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit // operations. We don't care if cofficients are positive or negative. public static int calculateBCHCode(int value, int poly) { // If poly is "1 1111 0010 0101" (version info poly), msbSetInPoly is 13. We'll subtract 1 // from 13 to make it 12. int msbSetInPoly = findMSBSet(poly); value <<= msbSetInPoly - 1; // Do the division business using exclusive-or operations. while (findMSBSet(value) >= msbSetInPoly) { value ^= poly << (findMSBSet(value) - msbSetInPoly); } // Now the "value" is the remainder (i.e. the BCH code) return value; } // Make bit vector of type information. On success, store the result in "bits" and return true. // Encode error correction level and mask pattern. See 8.9 of // JISX0510:2004 (p.45) for details. public static void makeTypeInfoBits(ErrorCorrectionLevel ecLevel, int maskPattern, BitArray bits) throws WriterException { if (!QRCode.isValidMaskPattern(maskPattern)) { throw new WriterException("Invalid mask pattern"); } int typeInfo = (ecLevel.getBits() << 3) | maskPattern; bits.appendBits(typeInfo, 5); int bchCode = calculateBCHCode(typeInfo, TYPE_INFO_POLY); bits.appendBits(bchCode, 10); BitArray maskBits = new BitArray(); maskBits.appendBits(TYPE_INFO_MASK_PATTERN, 15); bits.xor(maskBits); if (bits.getSize() != 15) { // Just in case. throw new WriterException("should not happen but we got: " + bits.getSize()); } } // Make bit vector of version information. On success, store the result in "bits" and return true. // See 8.10 of JISX0510:2004 (p.45) for details. public static void makeVersionInfoBits(int version, BitArray bits) throws WriterException { bits.appendBits(version, 6); int bchCode = calculateBCHCode(version, VERSION_INFO_POLY); bits.appendBits(bchCode, 12); if (bits.getSize() != 18) { // Just in case. throw new WriterException("should not happen but we got: " + bits.getSize()); } } // Check if "value" is empty. private static boolean isEmpty(int value) { return value == -1; } // Check if "value" is valid. private static boolean isValidValue(int value) { return (value == -1 || // Empty. value == 0 || // Light (white). value == 1); // Dark (black). } private static void embedTimingPatterns(ByteMatrix matrix) throws WriterException { // -8 is for skipping position detection patterns (size 7), and two horizontal/vertical // separation patterns (size 1). Thus, 8 = 7 + 1. for (int i = 8; i < matrix.getWidth() - 8; ++i) { int bit = (i + 1) % 2; // Horizontal line. if (!isValidValue(matrix.get(i, 6))) { throw new WriterException(); } if (isEmpty(matrix.get(i, 6))) { matrix.set(i, 6, bit); } // Vertical line. if (!isValidValue(matrix.get(6, i))) { throw new WriterException(); } if (isEmpty(matrix.get(6, i))) { matrix.set(6, i, bit); } } } // Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) private static void embedDarkDotAtLeftBottomCorner(ByteMatrix matrix) throws WriterException { if (matrix.get(8, matrix.getHeight() - 8) == 0) { throw new WriterException(); } matrix.set(8, matrix.getHeight() - 8, 1); } private static void embedHorizontalSeparationPattern(int xStart, int yStart, ByteMatrix matrix) throws WriterException { // We know the width and height. if (HORIZONTAL_SEPARATION_PATTERN[0].length != 8 || HORIZONTAL_SEPARATION_PATTERN.length != 1) { throw new WriterException("Bad horizontal separation pattern"); } for (int x = 0; x < 8; ++x) { if (!isEmpty(matrix.get(xStart + x, yStart))) { throw new WriterException(); } matrix.set(xStart + x, yStart, HORIZONTAL_SEPARATION_PATTERN[0][x]); } } private static void embedVerticalSeparationPattern(int xStart, int yStart, ByteMatrix matrix) throws WriterException { // We know the width and height. if (VERTICAL_SEPARATION_PATTERN[0].length != 1 || VERTICAL_SEPARATION_PATTERN.length != 7) { throw new WriterException("Bad vertical separation pattern"); } for (int y = 0; y < 7; ++y) { if (!isEmpty(matrix.get(xStart, yStart + y))) { throw new WriterException(); } matrix.set(xStart, yStart + y, VERTICAL_SEPARATION_PATTERN[y][0]); } } // Note that we cannot unify the function with embedPositionDetectionPattern() despite they are // almost identical, since we cannot write a function that takes 2D arrays in different sizes in // C/C++. We should live with the fact. private static void embedPositionAdjustmentPattern(int xStart, int yStart, ByteMatrix matrix) throws WriterException { // We know the width and height. if (POSITION_ADJUSTMENT_PATTERN[0].length != 5 || POSITION_ADJUSTMENT_PATTERN.length != 5) { throw new WriterException("Bad position adjustment"); } for (int y = 0; y < 5; ++y) { for (int x = 0; x < 5; ++x) { if (!isEmpty(matrix.get(xStart + x, yStart + y))) { throw new WriterException(); } matrix.set(xStart + x, yStart + y, POSITION_ADJUSTMENT_PATTERN[y][x]); } } } private static void embedPositionDetectionPattern(int xStart, int yStart, ByteMatrix matrix) throws WriterException { // We know the width and height. if (POSITION_DETECTION_PATTERN[0].length != 7 || POSITION_DETECTION_PATTERN.length != 7) { throw new WriterException("Bad position detection pattern"); } for (int y = 0; y < 7; ++y) { for (int x = 0; x < 7; ++x) { if (!isEmpty(matrix.get(xStart + x, yStart + y))) { throw new WriterException(); } matrix.set(xStart + x, yStart + y, POSITION_DETECTION_PATTERN[y][x]); } } } // Embed position detection patterns and surrounding vertical/horizontal separators. private static void embedPositionDetectionPatternsAndSeparators(ByteMatrix matrix) throws WriterException { // Embed three big squares at corners. int pdpWidth = POSITION_DETECTION_PATTERN[0].length; // Left top corner. embedPositionDetectionPattern(0, 0, matrix); // Right top corner. embedPositionDetectionPattern(matrix.getWidth() - pdpWidth, 0, matrix); // Left bottom corner. embedPositionDetectionPattern(0, matrix.getWidth() - pdpWidth, matrix); // Embed horizontal separation patterns around the squares. int hspWidth = HORIZONTAL_SEPARATION_PATTERN[0].length; // Left top corner. embedHorizontalSeparationPattern(0, hspWidth - 1, matrix); // Right top corner. embedHorizontalSeparationPattern(matrix.getWidth() - hspWidth, hspWidth - 1, matrix); // Left bottom corner. embedHorizontalSeparationPattern(0, matrix.getWidth() - hspWidth, matrix); // Embed vertical separation patterns around the squares. int vspSize = VERTICAL_SEPARATION_PATTERN.length; // Left top corner. embedVerticalSeparationPattern(vspSize, 0, matrix); // Right top corner. embedVerticalSeparationPattern(matrix.getHeight() - vspSize - 1, 0, matrix); // Left bottom corner. embedVerticalSeparationPattern(vspSize, matrix.getHeight() - vspSize, matrix); } // Embed position adjustment patterns if need be. private static void maybeEmbedPositionAdjustmentPatterns(int version, ByteMatrix matrix) throws WriterException { if (version < 2) { // The patterns appear if version >= 2 return; } int index = version - 1; int[] coordinates = POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[index]; int numCoordinates = POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[index].length; for (int i = 0; i < numCoordinates; ++i) { for (int j = 0; j < numCoordinates; ++j) { int y = coordinates[i]; int x = coordinates[j]; if (x == -1 || y == -1) { continue; } // If the cell is unset, we embed the position adjustment pattern here. if (isEmpty(matrix.get(x, y))) { // -2 is necessary since the x/y coordinates point to the center of the pattern, not the // left top corner. embedPositionAdjustmentPattern(x - 2, y - 2, matrix); } } } } } plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/QRCode.java000066400000000000000000000144161312650303100245200ustar00rootroot00000000000000/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.zxing.qrcode.encoder; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; import com.google.zxing.qrcode.decoder.Mode; /** * @author satorux@google.com (Satoru Takabayashi) - creator * @author dswitkin@google.com (Daniel Switkin) - ported from C++ */ public final class QRCode { public static final int NUM_MASK_PATTERNS = 8; private Mode mode; private ErrorCorrectionLevel ecLevel; private int version; private int matrixWidth; private int maskPattern; private int numTotalBytes; private int numDataBytes; private int numECBytes; private int numRSBlocks; private ByteMatrix matrix; public QRCode() { mode = null; ecLevel = null; version = -1; matrixWidth = -1; maskPattern = -1; numTotalBytes = -1; numDataBytes = -1; numECBytes = -1; numRSBlocks = -1; matrix = null; } // Mode of the QR Code. public Mode getMode() { return mode; } // Error correction level of the QR Code. public ErrorCorrectionLevel getECLevel() { return ecLevel; } // Version of the QR Code. The bigger size, the bigger version. public int getVersion() { return version; } // ByteMatrix width of the QR Code. public int getMatrixWidth() { return matrixWidth; } // Mask pattern of the QR Code. public int getMaskPattern() { return maskPattern; } // Number of total bytes in the QR Code. public int getNumTotalBytes() { return numTotalBytes; } // Number of data bytes in the QR Code. public int getNumDataBytes() { return numDataBytes; } // Number of error correction bytes in the QR Code. public int getNumECBytes() { return numECBytes; } // Number of Reedsolomon blocks in the QR Code. public int getNumRSBlocks() { return numRSBlocks; } // ByteMatrix data of the QR Code. public ByteMatrix getMatrix() { return matrix; } // Return the value of the module (cell) pointed by "x" and "y" in the matrix of the QR Code. They // call cells in the matrix "modules". 1 represents a black cell, and 0 represents a white cell. public int at(int x, int y) { // The value must be zero or one. int value = matrix.get(x, y); if (!(value == 0 || value == 1)) { // this is really like an assert... not sure what better exception to use? throw new RuntimeException("Bad value"); } return value; } // Checks all the member variables are set properly. Returns true on success. Otherwise, returns // false. public boolean isValid() { return // First check if all version are not uninitialized. mode != null && ecLevel != null && version != -1 && matrixWidth != -1 && maskPattern != -1 && numTotalBytes != -1 && numDataBytes != -1 && numECBytes != -1 && numRSBlocks != -1 && // Then check them in other ways.. isValidMaskPattern(maskPattern) && numTotalBytes == numDataBytes + numECBytes && // ByteMatrix stuff. matrix != null && matrixWidth == matrix.getWidth() && // See 7.3.1 of JISX0510:2004 (p.5). matrix.getWidth() == matrix.getHeight(); // Must be square. } // Return debug String. public String toString() { StringBuffer result = new StringBuffer(200); result.append("<<\n"); result.append(" mode: "); result.append(mode); result.append("\n ecLevel: "); result.append(ecLevel); result.append("\n version: "); result.append(version); result.append("\n matrixWidth: "); result.append(matrixWidth); result.append("\n maskPattern: "); result.append(maskPattern); result.append("\n numTotalBytes: "); result.append(numTotalBytes); result.append("\n numDataBytes: "); result.append(numDataBytes); result.append("\n numECBytes: "); result.append(numECBytes); result.append("\n numRSBlocks: "); result.append(numRSBlocks); if (matrix == null) { result.append("\n matrix: null\n"); } else { result.append("\n matrix:\n"); result.append(matrix.toString()); } result.append(">>\n"); return result.toString(); } public void setMode(Mode value) { mode = value; } public void setECLevel(ErrorCorrectionLevel value) { ecLevel = value; } public void setVersion(int value) { version = value; } public void setMatrixWidth(int value) { matrixWidth = value; } public void setMaskPattern(int value) { maskPattern = value; } public void setNumTotalBytes(int value) { numTotalBytes = value; } public void setNumDataBytes(int value) { numDataBytes = value; } public void setNumECBytes(int value) { numECBytes = value; } public void setNumRSBlocks(int value) { numRSBlocks = value; } // This takes ownership of the 2D array. public void setMatrix(ByteMatrix value) { matrix = value; } // Check if "mask_pattern" is valid. public static boolean isValidMaskPattern(int maskPattern) { return maskPattern >= 0 && maskPattern < NUM_MASK_PATTERNS; } // Return true if the all values in the matrix are binary numbers. // // JAVAPORT: This is going to be super expensive and unnecessary, we should not call this in // production. I'm leaving it because it may be useful for testing. It should be removed entirely // if ByteMatrix is changed never to contain a -1. /* private static boolean EverythingIsBinary(final ByteMatrix matrix) { for (int y = 0; y < matrix.height(); ++y) { for (int x = 0; x < matrix.width(); ++x) { int value = matrix.get(y, x); if (!(value == 0 || value == 1)) { // Found non zero/one value. return false; } } } return true; } */ } plantuml-1.2017.15/src/doc-files/000077500000000000000000000000001312650303100163125ustar00rootroot00000000000000plantuml-1.2017.15/src/doc-files/umls.html000066400000000000000000000022631312650303100201630ustar00rootroot00000000000000 @startuml img1.png title foo2 component PlantUML @enduml plantuml-1.2017.15/src/gen/000077500000000000000000000000001312650303100152165ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/lib/000077500000000000000000000000001312650303100157645ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/lib/cdt/000077500000000000000000000000001312650303100165365ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/lib/cdt/dtclose__c.java000066400000000000000000000121521312650303100215000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static smetana.core.Macro.UNSUPPORTED; public class dtclose__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 7ggbhlblmrfr1wq1k20npwyxb // int dtclose(register Dt_t* dt) public static Object dtclose(Object... arg) { UNSUPPORTED("5o7j3hhxxjdvmz0k3eg98i8in"); // int dtclose(register Dt_t* dt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2fi55lg37rcjprso1i0385cj5"); // Dtdisc_t *disc; UNSUPPORTED("pz52m7579heh6vdbqc3dt84v"); // int ev = 0; UNSUPPORTED("3iyrv07qx7n0s211y8m7mopsz"); // if(!dt || dt->nview > 0 ) /* can't close if being viewed */ UNSUPPORTED("b0epxudfxjm8kichhaautm2qi"); // return -1; UNSUPPORTED("9y2zao3al22pjv2p480p4klcc"); // /* announce the close event to see if we should continue */ UNSUPPORTED("70rampeezpyz05ynxa49umbrz"); // disc = dt->disc; UNSUPPORTED("8gsk9kzxnlwgo3aceze9c6gl7"); // if(disc->eventf && UNSUPPORTED("ho436wfj1mjidd6obd19mhll"); // (ev = (*disc->eventf)(dt,2,((void*)0),disc)) < 0) UNSUPPORTED("b0epxudfxjm8kichhaautm2qi"); // return -1; UNSUPPORTED("66fqrcqd57dw3fzb30i176w0r"); // if(dt->view) /* turn off viewing */ UNSUPPORTED("1xbo7gf92fmqmu2tzpfeuc0wk"); // dtview(dt,((Dt_t*)0)); UNSUPPORTED("9vl9psbe52rphrxhc41erj2qd"); // if(ev == 0) /* release all allocated data */ UNSUPPORTED("8fubw8ssxlx99qjv7n52cf3ru"); // { (void)(*(dt->meth->searchf))(dt,((void*)0),0000100); UNSUPPORTED("5rbpcw29jwi3l66b11are2xd5"); // if(dtsize(dt) > 0) UNSUPPORTED("896vcxnvc07fbkh09vojp66fv"); // return -1; UNSUPPORTED("8po7fioot1issl5obmk5hqndd"); // if(dt->data->ntab > 0) UNSUPPORTED("4ugmcpi8vkb013vuo4wykn0a3"); // (*dt->memoryf)(dt,(void*)dt->data->hh._htab,0,disc); UNSUPPORTED("1bguaull3m0kl140obilq4ucp"); // (*dt->memoryf)(dt,(void*)dt->data,0,disc); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4wjw4hx0hptydzyvkohwgzoo"); // if(dt->type == 0) UNSUPPORTED("9jx9g23tuicm5x7f5cvznr3rt"); // free((void*)dt); UNSUPPORTED("4r6n1aai6737i36g78f9z4apm"); // else if(ev == 0 && dt->type == 1) UNSUPPORTED("6wqxv1f7tzvjk0lwmqdrcq8la"); // (*dt->memoryf)(dt, (void*)dt, 0, disc); UNSUPPORTED("oxrmf64nqi0a580iiczqkmky"); // if(disc->eventf) UNSUPPORTED("8bce06bdd64ypwb17ddloqzu8"); // (void)(*disc->eventf)(dt, 6, ((void*)0), disc); UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cdt/dtdisc__c.java000066400000000000000000000203141312650303100213140ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static smetana.core.JUtils.function; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import h.Dtsearch_f; import h._dt_s; import h._dtdisc_s; import h._dtlink_s; import smetana.core.CString; public class dtdisc__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 507t9jcy6v9twvl30rs9i2nwi // static void* dtmemory(Dt_t* dt,void* addr,size_t size,Dtdisc_t* disc) public static Object dtmemory(Object... arg) { UNSUPPORTED("18b3dn3pevbf7ajed6fftvnzk"); // static void* dtmemory(Dt_t* dt,void* addr,size_t size,Dtdisc_t* disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cmb0rxzo3c2wr18j0upjz9iml"); // if(addr) UNSUPPORTED("bn1cyxafod2777wzl55qh14xq"); // { if(size == 0) UNSUPPORTED("15j5ccp5owse1ebc5ljhbzg59"); // { free(addr); UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("9ed8imo9cbvwtwe92qmavoqko"); // else return realloc(addr,size); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ew5p7pzg1fmdih1t3u25rqz6y"); // else return size > 0 ? malloc(size) : ((void*)0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 axpvuswclmi9bx3qtlh4quyah // Dtdisc_t* dtdisc(Dt_t* dt, Dtdisc_t* disc, int type) public static _dtdisc_s dtdisc(_dt_s dt, _dtdisc_s disc, int type) { ENTERING("axpvuswclmi9bx3qtlh4quyah","dtdisc"); try { Dtsearch_f searchf; _dtlink_s r, t; CString k; _dtdisc_s old; if(N(old = (_dtdisc_s) dt.getPtr("disc")) ) /* initialization call from dtopen() */ { dt.setPtr("disc", disc); if(N(dt.setPtr("memoryf", disc.getPtr("memoryf") ))) dt.setPtr("memoryf", function(dtdisc__c.class, "dtmemory")); return disc; } if(N(disc)) /* only want to know current discipline */ return old; UNSUPPORTED("6htlkpaqff61iwmsg1be47uci"); // searchf = dt->meth->searchf; UNSUPPORTED("ckjxpmega2z5oju8xk72wsy0q"); // ((dt->data->type&010000) ? dtrestore(dt,((Dtlink_t*)0)) : 0); UNSUPPORTED("34klfi71a7k7iqdrvezqetdjg"); // if(old->eventf && (*old->eventf)(dt,3,(void*)disc,old) < 0) UNSUPPORTED("1cft3x8zrdzefdb93v3f1tuo7"); // return ((Dtdisc_t*)0); UNSUPPORTED("4e4gm32ypcbtlzkym7sh79rrd"); // dt->disc = disc; UNSUPPORTED("6nr96is5y2ct55pupgycwbjmt"); // if(!(dt->memoryf = disc->memoryf) ) UNSUPPORTED("1prh3v6ko1v9w39hgk7wiknjc"); // dt->memoryf = dtmemory; UNSUPPORTED("epetks7tchxd027a5fogh5s8y"); // if(dt->data->type&(0000040|0000100|0000020)) UNSUPPORTED("e2tzh95k1lvjl6wbtpwizam8q"); // goto done; UNSUPPORTED("9z4k8xq4t2p909fvi8gusmmww"); // else if(dt->data->type&0000002) UNSUPPORTED("3q5nyguq8mgdfwmm0yrzq2br8"); // { if(type&0000002) UNSUPPORTED("93q6zqzlgfz2qd0yl6koyw99c"); // goto done; UNSUPPORTED("6d1rfacssm8768oz9fu5o66t8"); // else goto dt_renew; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("eu35368wm4jf6yedwkayoycx4"); // else if(dt->data->type&(0000001|0000002)) UNSUPPORTED("8xmm1djjds55s86jodixkp72u"); // { if((type&0000002) && (type&0000001)) UNSUPPORTED("93q6zqzlgfz2qd0yl6koyw99c"); // goto done; UNSUPPORTED("6d1rfacssm8768oz9fu5o66t8"); // else goto dt_renew; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1ww5saiqcss2tdx5nts4rxpou"); // else /*if(dt->data->type&(DT_OSET|DT_OBAG))*/ UNSUPPORTED("4582pmh67cgbsphrw05tf0hmm"); // { if(type&0000001) UNSUPPORTED("93q6zqzlgfz2qd0yl6koyw99c"); // goto done; UNSUPPORTED("8njey2jaa662w29s8zcqbjln5"); // dt_renew: UNSUPPORTED("assw6t0chu41lwws2ysqi4fgi"); // r = dtflatten(dt); UNSUPPORTED("1rry7yjzos90pgbf3li2qpa18"); // dt->data->type &= ~010000; UNSUPPORTED("6vkn7padspfbtju9g5b65b34w"); // dt->data->here = ((Dtlink_t*)0); UNSUPPORTED("2jfi30wa60xp7iqlk9yyf4k5j"); // dt->data->size = 0; UNSUPPORTED("1i3oayy7gy36lar9kfhuq6rur"); // if(dt->data->type&(0000001|0000002)) UNSUPPORTED("ay51d19gimt3gpqjact2t0ypm"); // { register Dtlink_t **s, **ends; UNSUPPORTED("5p6g054kk7snvpwuxudelseir"); // ends = (s = dt->data->hh._htab) + dt->data->ntab; UNSUPPORTED("3zu1r6orkvmsvbjbzqqx9wedr"); // while(s < ends) UNSUPPORTED("9wq8eycc78fg8sqi6bjce4q7f"); // *s++ = ((Dtlink_t*)0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3rfhc462a0qx53yecw933hkk8"); // /* reinsert them */ UNSUPPORTED("ctmfjzioo5q7mzsmb6rf9mxoy"); // while(r) UNSUPPORTED("9qxb0eqp3ujnnuum1bggqarjh"); // { t = r->right; UNSUPPORTED("ddltpk94i08fyy6x03ozyc7s1"); // if(!(type&0000002)) /* new hash value */ UNSUPPORTED("8mj2vd7idro90tjnvl6b9trnc"); // { k = (char*)(disc->link < 0 ? ((Dthold_t*)(r))->obj : (void*)((char*)(r) - disc->link) ); UNSUPPORTED("1dvo2602az1wcigxx20czskv9"); // k = (void*)(disc->size < 0 ? *((char**)((char*)((void*)k)+disc->key)) : ((char*)((void*)k)+disc->key)); UNSUPPORTED("269t5qi8m2ujfjvmbqvyjvr1s"); // r->hl._hash = (disc->hashf ? (*disc->hashf)(dt,k,disc) : dtstrhash(0,k,disc->size) ); UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("2e2tx3ch32oxo5y01bflgbf2h"); // (void)(*searchf)(dt,(void*)r,0000040); UNSUPPORTED("8tob14cb9u9q0mnud0wovaioi"); // r = t; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cerydbb7i6l7c4pgeygvwoqk2"); // done: UNSUPPORTED("bi0p581nen18ypj0ey48s6ete"); // return old; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("axpvuswclmi9bx3qtlh4quyah","dtdisc"); } } } plantuml-1.2017.15/src/gen/lib/cdt/dtextract__c.java000066400000000000000000000100501312650303100220400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h._dt_s; import h._dtlink_s; public class dtextract__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 ar89jjwhuitmbhut1o3ft3zpb // Dtlink_t* dtextract(register Dt_t* dt) public static _dtlink_s dtextract(_dt_s dt) { ENTERING("ar89jjwhuitmbhut1o3ft3zpb","dtextract"); try { _dtlink_s list = null; _dtlink_s s[], ends[]; if((dt.getPtr("data").getInt("type")&(0000004|0000010) )!=0) list = (_dtlink_s) dt.getPtr("data").getPtr("here"); else if((dt.getPtr("data").getInt("type")&(0000001|0000002))!=0) { UNSUPPORTED("list = dtflatten(dt)"); UNSUPPORTED("8i2mufw9f604gvj48u8nbdazp"); // for(ends = (s = dt->data->hh._htab) + dt->data->ntab; s < ends; ++s) UNSUPPORTED("4sml4zdr938yth6x815jt1dlm"); // *s = ((Dtlink_t*)0); } else /*if(dt->data->type&(DT_LIST|DT_STACK|DT_QUEUE))*/ { list = (_dtlink_s) dt.getPtr("data").getPtr("hh").getPtr("_head"); dt.getPtr("data").getPtr("hh").setPtr("_head", null); } dt.getPtr("data").setInt("type", dt.getPtr("data").getInt("type") & ~010000); dt.getPtr("data").setInt("size", 0); dt.getPtr("data").setPtr("here", null); return list; } finally { LEAVING("ar89jjwhuitmbhut1o3ft3zpb","dtextract"); } } } plantuml-1.2017.15/src/gen/lib/cdt/dtflatten__c.java000066400000000000000000000131231312650303100220270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static smetana.core.Macro.UNSUPPORTED; public class dtflatten__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 5zkzkycgp4e90pajuq4tczdbu // Dtlink_t* dtflatten(Dt_t* dt) public static Object dtflatten(Object... arg) { UNSUPPORTED("1u9gaaespn5nsfpluy23yon7s"); // Dtlink_t* dtflatten(Dt_t* dt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("82qvflv3akadrlktyouix927i"); // register Dtlink_t *t, *r, *list, *last, **s, **ends; UNSUPPORTED("3ku8njvyle1rle6f9ipn7rggg"); // /* already flattened */ UNSUPPORTED("88rit68bon46m42ei6oby73oo"); // if(dt->data->type&010000 ) UNSUPPORTED("d43szif4rveu1dyhv72xv101u"); // return dt->data->here; UNSUPPORTED("1se1h7w1gasp0ag8tisjl5pox"); // list = last = ((Dtlink_t*)0); UNSUPPORTED("32ow9kmsxf47y1h17vyj3ef11"); // if(dt->data->type&(0000001|0000002)) UNSUPPORTED("9tn2ho5yddz96m6l7hzk1m1v7"); // { for(ends = (s = dt->data->hh._htab) + dt->data->ntab; s < ends; ++s) UNSUPPORTED("5n6odtt738etawc5nprf2q25r"); // { if((t = *s) ) UNSUPPORTED("7bsf06vm0raykokk6wn5303yf"); // { if(last) UNSUPPORTED("9albzpygbxkhbrb2e3af7z7b9"); // last->right = t; UNSUPPORTED("3flwmlcisbdjifpiw5azq841e"); // else list = last = t; UNSUPPORTED("1pn5heoey2lil0muuixlrz154"); // while(last->right) UNSUPPORTED("14t2izprf2nq8tnxy4yre0zso"); // last = last->right; UNSUPPORTED("bgkf4krgjdc0kzlz7de3kbj2u"); // *s = last; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2lqxby7q5n5w5w5uuujup7o8a"); // else if(dt->data->type&(0000020|0000040|0000100) ) UNSUPPORTED("13uczemwz6rongidozoryhb8e"); // list = dt->data->hh._head; UNSUPPORTED("6amw1s4wntui27fzf3qls02u5"); // else if((r = dt->data->here) ) /*if(dt->data->type&(DT_OSET|DT_OBAG))*/ UNSUPPORTED("solulu57qiizpqhr11tmch0h"); // { while((t = r->hl._left) ) UNSUPPORTED("em247yaxylt9wh0lfmqk531iy"); // (((r)->hl._left = (t)->right, (t)->right = (r)), (r) = (t)); UNSUPPORTED("6ggr0z59qqyosbseo6wdmvkc3"); // for(list = last = r, r = r->right; r; last = r, r = r->right) UNSUPPORTED("2jldxtvoid7uy4yqdouts2ysu"); // { if((t = r->hl._left) ) UNSUPPORTED("ecb7vosojs9ov68ty9m0hzegp"); // { do (((r)->hl._left = (t)->right, (t)->right = (r)), (r) = (t)); UNSUPPORTED("f2e7di1g7bvt88336jnz0ogd5"); // while((t = r->hl._left) ); UNSUPPORTED("dol9o0lco748q0ap9l7afdbcs"); // last->right = r; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e880ypqj4mv8ru940eyjo5ene"); // dt->data->here = list; UNSUPPORTED("8hv4u1n328awal8yfoqykdhxi"); // dt->data->type |= 010000; UNSUPPORTED("bq8fdnp0ptlj82raupu7egafd"); // return list; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cdt/dthash__c.java000066400000000000000000000601631312650303100213230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static smetana.core.Macro.UNSUPPORTED; public class dthash__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 7akctm4caciv9haxdk4zlrwu2 // static void dthtab(Dt_t* dt) public static Object dthtab(Object... arg) { UNSUPPORTED("2d2m2vzj4zvzgd4r2zn2s1kqn"); // static void dthtab(Dt_t* dt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dmm9rj1e4gzk6xftk0ezcsact"); // register Dtlink_t *t, *r, *p, **s, **hs, **is, **olds; UNSUPPORTED("54n8pasotrjhynrhaueagwuhz"); // int n, k; UNSUPPORTED("axpkyw9uz8rvnmklligok2e2f"); // if(dt->data->minp > 0 && dt->data->ntab > 0) /* fixed table size */ UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("2eqdiqvcsxis68sccmci5sslk"); // dt->data->minp = 0; UNSUPPORTED("74tln6sb3yrn1nfwgllf1vfj1"); // n = dt->data->ntab; UNSUPPORTED("6bgqjnz4t47feeoy1br9ew29p"); // if(dt->disc && dt->disc->eventf && UNSUPPORTED("cr75vmjji1xsei24agv44wqxh"); // (*dt->disc->eventf)(dt, 7, &n, dt->disc) > 0 ) UNSUPPORTED("4jwe6txgxjvpban5zstx09mx8"); // { if(n < 0) /* fix table size */ UNSUPPORTED("7chn136gsjv69n13yovn16f3b"); // { dt->data->minp = 1; UNSUPPORTED("4dlk72qfzjf2r39ukyq7yzfyp"); // if(dt->data->ntab > 0 ) UNSUPPORTED("49xixhkg85008801z87qmxkgl"); // return; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7yuj23uvw15fcmez2o1pzkjrl"); // else /* set a particular size */ UNSUPPORTED("14rrn3w4adtaiolijjyulmjsn"); // { for(k = 2; k < n; k *= 2) UNSUPPORTED("8c0hnggfgcchqp0vr4bwobm4t"); // ; UNSUPPORTED("dvmpnz9ncerzmb5v8gidr7eis"); // n = k; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("932vaq51fbf5l8i420kesqfg0"); // else n = 0; UNSUPPORTED("bh1ire4hwludcleecmxv0smag"); // /* compute new table size */ UNSUPPORTED("abhbgzrg4q5z2vkoed72su98y"); // if(n <= 0) UNSUPPORTED("dab3gyaa9l6c1zsdv75gwesrh"); // { if((n = dt->data->ntab) == 0) UNSUPPORTED("4021uenum9y6sgeuboex8d0on"); // n = (256); UNSUPPORTED("c1uorlajtkwlvx1a2h6ajr0bp"); // while(dt->data->size > ((n) << 1)) UNSUPPORTED("99wvpps4p28ykwrtq32whiwrd"); // n = ((n) << 1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("b2ppghcwec8d3i5y20q5cibn2"); // if(n == dt->data->ntab) UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("ui70t5x7lzm4cg4q5hqswo74"); // /* allocate new table */ UNSUPPORTED("710t2p2pi32z07r1o6a8imf9j"); // olds = dt->data->ntab == 0 ? ((Dtlink_t**)0) : dt->data->hh._htab; UNSUPPORTED("400z1yutimeajug4gd8t0opt6"); // if(!(s = (Dtlink_t**)(*dt->memoryf)(dt,olds,n*sizeof(Dtlink_t*),dt->disc)) ) UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("a4y1edr0vk9beqab7n7td6s29"); // olds = s + dt->data->ntab; UNSUPPORTED("2rycm855gyv5lww7scwom17j3"); // dt->data->hh._htab = s; UNSUPPORTED("duhcyhub67fpfsay0dkflcxt6"); // dt->data->ntab = n; UNSUPPORTED("7ksrj2u284dwkngf2km9jg4xj"); // /* rehash elements */ UNSUPPORTED("1hz692vbawik1ma02xl4o6i21"); // for(hs = s+n-1; hs >= olds; --hs) UNSUPPORTED("s5sbwingw26r7aehxbc0ii4z"); // *hs = ((Dtlink_t*)0); UNSUPPORTED("9ymwe2szhthzd4w5m4zv4jag6"); // for(hs = s; hs < olds; ++hs) UNSUPPORTED("clyaoquug0nyscqmgfstnd3um"); // { for(p = ((Dtlink_t*)0), t = *hs; t; t = r) UNSUPPORTED("ccbd2da5hrf94txyeadl64rj4"); // { r = t->right; UNSUPPORTED("84b31s29uevgnrutqi5beo35a"); // if((is = s + ((t->hl._hash)&((n)-1))) == hs) UNSUPPORTED("59zqwaqjkez5xrkcft9rm1ddg"); // p = t; UNSUPPORTED("9cm22gi5ztcly2xp8i8bnnrq0"); // else /* move to a new chain */ UNSUPPORTED("apvgwu04dgxcsjo6z3uw5k0mn"); // { if(p) UNSUPPORTED("boivlg1vuin099locovgrmxuy"); // p->right = r; UNSUPPORTED("340ftcld884g4rid6m0z4sco1"); // else *hs = r; UNSUPPORTED("8tchzpmze0ll3y75ehijf6rye"); // t->right = *is; *is = t; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 78zfgu6jzim09d5xvj1qs9bk0 // static void* dthash(Dt_t* dt, register void* obj, int type) public static Object dthash(Object... arg) { UNSUPPORTED("95hr4hrc6nbqqdqdce5tg8l5p"); // static void* dthash(Dt_t* dt, register void* obj, int type) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dfpfp02iblqj4mzvjx0fueyhf"); // register Dtlink_t *t, *r, *p; UNSUPPORTED("283qljx9jxfsqlak87k7jg5ny"); // register void *k, *key; UNSUPPORTED("59o4ibfersjospolmfoujpzrx"); // register unsigned int hsh; UNSUPPORTED("660kbsr1gj2c3whxtgelujyj1"); // register int lk, sz, ky; UNSUPPORTED("d7uh8kuvwiwc4dkgh3xeqa7o"); // register Dtcompar_f cmpf; UNSUPPORTED("boylfimuhvbo4nqzby3ew5tld"); // register Dtdisc_t* disc; UNSUPPORTED("9sfwn5sp00p82cc2ivzw480ta"); // register Dtlink_t **s, **ends; UNSUPPORTED("ckjxpmega2z5oju8xk72wsy0q"); // ((dt->data->type&010000) ? dtrestore(dt,((Dtlink_t*)0)) : 0); UNSUPPORTED("5ggzdi5wqxinikmv0anb4peay"); // /* initialize discipline data */ UNSUPPORTED("a9vwj28gsu58hp4ocpvno985d"); // disc = dt->disc; (ky = disc->key, sz = disc->size, lk = disc->link, cmpf = disc->comparf); UNSUPPORTED("dpg99ryukgexcc5n31wdbvraz"); // dt->type &= ~0100000; UNSUPPORTED("e4rxlgclvydwuznpw7rk0rksa"); // if(!obj) UNSUPPORTED("8htaux93kinbjvm9ooz891eng"); // { if(type&(0000010|0000020)) UNSUPPORTED("6hku2pc4tqgui5evf317yqvfm"); // goto end_walk; UNSUPPORTED("1v2lqr5htt1euj04jfa98gjdv"); // if(dt->data->size <= 0 || !(type&(0000100|0000200|0000400)) ) UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0); UNSUPPORTED("24ilchev6xpf5y6z34hqa9glk"); // ends = (s = dt->data->hh._htab) + dt->data->ntab; UNSUPPORTED("92nrnv2rh044z4gtldl61vus0"); // if(type&0000100) UNSUPPORTED("dhfqwls50q72zxh2fxlvobk33"); // { /* clean out all objects */ UNSUPPORTED("5vi45e0h8c9ymrwgqotzsu9t1"); // for(; s < ends; ++s) UNSUPPORTED("6pj3i74r6sowp2uu910mr4yg"); // { t = *s; UNSUPPORTED("6155l1hofhfyspasyb3ahizbd"); // *s = ((Dtlink_t*)0); UNSUPPORTED("9jtw72qjx20vdh59dfe1phhyr"); // if(!disc->freef && disc->link >= 0) UNSUPPORTED("6cgu609p2i9fp9atj1fw3s5cy"); // continue; UNSUPPORTED("4y5ojoi4p0ic91exb1rfs9s86"); // while(t) UNSUPPORTED("amls96qnaqczr04p9eg8uyu6l"); // { r = t->right; UNSUPPORTED("9la822tbyggyiqojilsi237uo"); // if(disc->freef) UNSUPPORTED("3idn1ydm0vaxkb4b0mv2tez2s"); // (*disc->freef)(dt,(lk < 0 ? ((Dthold_t*)(t))->obj : (void*)((char*)(t) - lk) ),disc); UNSUPPORTED("7hdvwe89xp5vg9m4l8lpmgvap"); // if(disc->link < 0) UNSUPPORTED("6km3uqqb8gzn7n83vngsax7up"); // (*dt->memoryf)(dt,(void*)t,0,disc); UNSUPPORTED("3fq4aglnc1p3fjid7sxse643h"); // t = r; UNSUPPORTED("cysnuxd51taci3hbg5lifz8ce"); // } UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("3joovo5f92ue2fnvked57dbbi"); // dt->data->here = ((Dtlink_t*)0); UNSUPPORTED("196oh3ma81y2lao0qwcvuwvga"); // dt->data->size = 0; UNSUPPORTED("8kl1r7cphdbs40t2grhkyhall"); // dt->data->loop = 0; UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("9sifrmemn97t14u5b9ib87dh3"); // else /* computing the first/last object */ UNSUPPORTED("2oievk2z0s9n8fqc9ug1sbb6p"); // { t = ((Dtlink_t*)0); UNSUPPORTED("ems59hbo02yf35j3szsgvnu3p"); // while(s < ends && !t ) UNSUPPORTED("6smbnv0v11g3t6zcnn0gw1cb1"); // t = (type&0000400) ? *--ends : *s++; UNSUPPORTED("7kk99glk5rm9xs40c8htgo3k"); // if(t && (type&0000400)) UNSUPPORTED("40b46zexoifo1zv4zz3pqip7m"); // for(; t->right; t = t->right) UNSUPPORTED("6f76030mwgybzczalesd54a9q"); // ; UNSUPPORTED("194sa4x6u6hxxh2wes9ola1wt"); // dt->data->loop += 1; UNSUPPORTED("cqadxs0pgykzd2tkrn18wef8"); // dt->data->here = t; UNSUPPORTED("2txpn83o34o6qwamy2wb7757o"); // return t ? (lk < 0 ? ((Dthold_t*)(t))->obj : (void*)((char*)(t) - lk) ) : ((void*)0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7klmk5043gbxzy2n25b5d1dz6"); // /* allow apps to delete an object "actually" in the dictionary */ UNSUPPORTED("dt29n4tw5mutzyr4fm34jru8t"); // if(dt->meth->type == 0000002 && (type&(0000002|0010000)) ) UNSUPPORTED("7sbjzi3lqgrnk2dukj4saoqhr"); // { if(!(*(((Dt_t*)(dt))->searchf))((dt),(void*)(obj),0000004) ) UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0); UNSUPPORTED("eq489drc6t4nw9jr6scwaf47r"); // s = dt->data->hh._htab + ((dt->data->here->hl._hash)&((dt->data->ntab)-1)); UNSUPPORTED("716ly4m21se00kv1jixe0abvv"); // r = ((Dtlink_t*)0); UNSUPPORTED("ee5wwcf1ozo1pwrw5cqvta4ye"); // for(p = ((Dtlink_t*)0), t = *s; t; p = t, t = t->right) UNSUPPORTED("8s0kw91pqx35e9cb8bnmjfpxd"); // { if((lk < 0 ? ((Dthold_t*)(t))->obj : (void*)((char*)(t) - lk) ) == obj) /* delete this specific object */ UNSUPPORTED("cazdlksn7swkecr1zwj7u20e7"); // goto do_delete; UNSUPPORTED("9zezhzqukdf30pddcygujrvm4"); // if(t == dt->data->here) UNSUPPORTED("e8vu7jceswis3y29jjwhq9ng9"); // r = p; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("eqykdmanwamw75kiyy2znwojp"); // /* delete some matching object */ UNSUPPORTED("3jvj5fms81a41732hc1ygnn8l"); // p = r; t = dt->data->here; UNSUPPORTED("8a5ic396b1zd3ypknh2ni33pl"); // goto do_delete; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ctx8452ml6zkglwpzkrei4r8p"); // if(type&(0001000|0000004|0000001|0004000) ) UNSUPPORTED("dow6c5q06mynnixn0dg629l8s"); // { key = (type&0001000) ? obj : (void*)(sz < 0 ? *((char**)((char*)(obj)+ky)) : ((char*)(obj)+ky)); UNSUPPORTED("ki4jtqbenojcbm9xo3cw0acj"); // hsh = (disc->hashf ? (*disc->hashf)(dt,key,disc) : dtstrhash(0,key,sz) ); UNSUPPORTED("5qfstwhbyczhb45awkns4w6s2"); // goto do_search; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("17mzyz618jog9kxscctj849qn"); // else if(type&(0000040|0002000) ) UNSUPPORTED("a1tr8ku0sxlizc02em1xpti9m"); // { r = (Dtlink_t*)obj; UNSUPPORTED("5z333zdlm5fisvkd28wdk08lb"); // obj = (lk < 0 ? ((Dthold_t*)(r))->obj : (void*)((char*)(r) - lk) ); UNSUPPORTED("4mu735y1gatwqfcwvw32kyv4b"); // key = (void*)(sz < 0 ? *((char**)((char*)(obj)+ky)) : ((char*)(obj)+ky)); UNSUPPORTED("9nsf0jvmpu3ekpif3tgtn9bfj"); // hsh = r->hl._hash; UNSUPPORTED("5qfstwhbyczhb45awkns4w6s2"); // goto do_search; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6demt9oump237iqswn7lymci2"); // else /*if(type&(DT_DELETE|DT_DETACH|DT_NEXT|DT_PREV))*/ UNSUPPORTED("8ftvpvpaincodxzo3trgtpjw6"); // { if((t = dt->data->here) && (lk < 0 ? ((Dthold_t*)(t))->obj : (void*)((char*)(t) - lk) ) == obj) UNSUPPORTED("9081zc00zn4etyvhw0gwp2pr1"); // { hsh = t->hl._hash; UNSUPPORTED("q62hm6hsn7w01e8d040wd36q"); // s = dt->data->hh._htab + ((hsh)&((dt->data->ntab)-1)); UNSUPPORTED("bq7yqk7ac7ar48epr0ntxlu34"); // p = ((Dtlink_t*)0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("9e1xg9ecdgp2asux0oagyok6z"); // { key = (void*)(sz < 0 ? *((char**)((char*)(obj)+ky)) : ((char*)(obj)+ky)); UNSUPPORTED("7iiuizt4e3k2puwkokgnwk9fl"); // hsh = (disc->hashf ? (*disc->hashf)(dt,key,disc) : dtstrhash(0,key,sz) ); UNSUPPORTED("2w8sqwcszvntntnfpandwatxf"); // do_search: UNSUPPORTED("904ox6qqmbvtgeqaalo2krcxq"); // t = dt->data->ntab <= 0 ? ((Dtlink_t*)0) : UNSUPPORTED("anysrymqqdewimlodxh4vnnf0"); // *(s = dt->data->hh._htab + ((hsh)&((dt->data->ntab)-1))); UNSUPPORTED("1urtk6yxjydqmp6auwlxz1mry"); // for(p = ((Dtlink_t*)0); t; p = t, t = t->right) UNSUPPORTED("a94c3oi4jicbke9656azbdmxw"); // { if(hsh == t->hl._hash) UNSUPPORTED("aba8e4nanbm4v7i73vtichn3a"); // { k = (lk < 0 ? ((Dthold_t*)(t))->obj : (void*)((char*)(t) - lk) ); k = (void*)(sz < 0 ? *((char**)((char*)(k)+ky)) : ((char*)(k)+ky)); UNSUPPORTED("6q8ct40por7odz1fi4kqawhu6"); // if((cmpf ? (*cmpf)(dt,key,k,disc) : (sz <= 0 ? strcmp(key,k) : memcmp(key,k,sz)) ) == 0) UNSUPPORTED("3s0v3cbomg51jgxsi6nrpjbab"); // break; UNSUPPORTED("cysnuxd51taci3hbg5lifz8ce"); // } UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("12o3l2uuqwkn6zu5n9ag5b6tv"); // if(t) /* found matching object */ UNSUPPORTED("b2cn93r7r83xjuylu9s3s7srd"); // dt->type |= 0100000; UNSUPPORTED("a99qjy1ylbnckiqdhzekz7iaj"); // if(type&(0001000|0000004|0002000)) UNSUPPORTED("afvq5mw03wvx0n3mvvbrqldkw"); // { if(!t) UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0); UNSUPPORTED("4lorj98ma2upixa5rr5xwzij7"); // if(p && (dt->data->type&0000001) && dt->data->loop <= 0) UNSUPPORTED("e12cfa3i62c3w5e93s2snz2io"); // { /* move-to-front heuristic */ UNSUPPORTED("3rwbnud1fhq4g3dgtggb8ivmp"); // p->right = t->right; UNSUPPORTED("7w9vk40tp93lbthf68mymuvl7"); // t->right = *s; UNSUPPORTED("47dhsbny95udoaz2m518jipnd"); // *s = t; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3yx8gco1u2rbh7pp98bmhshcv"); // dt->data->here = t; UNSUPPORTED("38zm3lu1kmess9k4fq9vw7307"); // return (lk < 0 ? ((Dthold_t*)(t))->obj : (void*)((char*)(t) - lk) ); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5s9uhnjsikxyxacq0a5avxqlu"); // else if(type&(0000001|0004000)) UNSUPPORTED("m0dd3fl2j1h8l4v5qcbx8pe3"); // { if(t && (dt->data->type&0000001) ) UNSUPPORTED("2gqu6oymjvcnv26ghvpj8uw8q"); // { dt->data->here = t; UNSUPPORTED("7y3981d1t51r85enkkeisu5o"); // return (lk < 0 ? ((Dthold_t*)(t))->obj : (void*)((char*)(t) - lk) ); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("by4sdf3z0t5wzasnh0mn7qynq"); // if(disc->makef && (type&0000001) && UNSUPPORTED("819jcvpr9y2bgzfligpibwpw3"); // !(obj = (*disc->makef)(dt,obj,disc)) ) UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0); UNSUPPORTED("293ajmk1i2zgdsq0l7383qwh3"); // if(lk >= 0) UNSUPPORTED("3zy0ha2od6p4le2e9q0z8fp5t"); // r = ((Dtlink_t*)((char*)(obj) + lk) ); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("98qmqsabqfk3u0p0lk7ea0p5t"); // { r = (Dtlink_t*)(*dt->memoryf) UNSUPPORTED("2t8zht6j7v4lkeafea2xf5hyg"); // (dt,((void*)0),sizeof(Dthold_t),disc); UNSUPPORTED("cd514pac1r4g4n22vahs1hysz"); // if(r) UNSUPPORTED("9t49z1jdnrgb6bhq6nkkue1ic"); // ((Dthold_t*)r)->obj = obj; UNSUPPORTED("cqgi8f4d37bqva8z6bx5rvn7w"); // else UNSUPPORTED("1v509jpumhakfypnj2ti3gu5c"); // { if(disc->makef && disc->freef && (type&0000001)) UNSUPPORTED("9mpf4sqfgdx785iln3tc53xtk"); // (*disc->freef)(dt,obj,disc); UNSUPPORTED("aa9atfxr38jo3q71l1xw0bq6k"); // return ((void*)0); UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("s0qtzqe9ppt5wefo9x8w939l"); // r->hl._hash = hsh; UNSUPPORTED("3bloaq1kau0kxrhfjsbw3ww7t"); // /* insert object */ UNSUPPORTED("94p1b6yx4z1w4h646vfezwz82"); // do_insert: UNSUPPORTED("nkb78kwk99oj3n3899azwlch"); // if((dt->data->size += 1) > ((dt->data->ntab) << 1) && dt->data->loop <= 0 ) UNSUPPORTED("9airb3ddrtasz9ic8vmjmmb3d"); // dthtab(dt); UNSUPPORTED("atoexyb2y1uyfcvz9fsj28sgk"); // if(dt->data->ntab == 0) UNSUPPORTED("dod3zpy4g6u8jgmxup50qqys9"); // { dt->data->size -= 1; UNSUPPORTED("bzc6n7f7vqj21bnxsl91xkwby"); // if(disc->freef && (type&0000001)) UNSUPPORTED("6tpn7nvqe9d7xas7x5oayr89e"); // (*disc->freef)(dt,obj,disc); UNSUPPORTED("4jky808nj7nqoi0xqghkq71hu"); // if(disc->link < 0) UNSUPPORTED("7c6rtwyp4m40lrj88mpgnpb21"); // (*disc->memoryf)(dt,(void*)r,0,disc); UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("4vk743730me6fvf2qfsyeksur"); // s = dt->data->hh._htab + ((hsh)&((dt->data->ntab)-1)); UNSUPPORTED("xlqibqplgtj358b7ra1xzef6"); // if(t) UNSUPPORTED("7o4qhqtysg0296gjwygjc528s"); // { r->right = t->right; UNSUPPORTED("dkl4v64gxr1lec2474603kdmj"); // t->right = r; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("bzix5h9vod9ss1htxqdqpq1de"); // { r->right = *s; UNSUPPORTED("4ihgxtxxn05e6la642e1lt0de"); // *s = r; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7nqs3a1rtwdoaksqwklk6h9mr"); // dt->data->here = r; UNSUPPORTED("62u47ehg5sw7ibh04rvqqdaws"); // return obj; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5k3wkmt1521n2igrbw361wdxw"); // else if(type&0000010) UNSUPPORTED("9he18g2ou1k5oep0depme6a0l"); // { if(t && !(p = t->right) ) UNSUPPORTED("dda3cpvj9gd3ckayd4vtx06jw"); // { for(ends = dt->data->hh._htab+dt->data->ntab, s += 1; s < ends; ++s) UNSUPPORTED("2f8x3x8q9d4l3zxkrdo3tgqug"); // if((p = *s) ) UNSUPPORTED("6ioth986rfbv208dp59shjy15"); // break; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6fbjgrqdc634wlamdggxuyx1y"); // goto done_adj; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("eeak67ajn02aq4hfkpb1houzf"); // else if(type&0000020) UNSUPPORTED("83v3fyui557cjpsucdnk29bcy"); // { if(t && !p) UNSUPPORTED("19279rks7tm3qlocyny8mcg8s"); // { if((p = *s) != t) UNSUPPORTED("9bho5o6g8z5l0obq611t4vwmt"); // { while(p->right != t) UNSUPPORTED("3vlcvd5o5mws86v5elocljl8c"); // p = p->right; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("cqgi8f4d37bqva8z6bx5rvn7w"); // else UNSUPPORTED("2l2cjmve22qwyzxs3nemslsrm"); // { p = ((Dtlink_t*)0); UNSUPPORTED("7x0y3os4rhu1qmyy6cyigcbxn"); // for(s -= 1, ends = dt->data->hh._htab; s >= ends; --s) UNSUPPORTED("2qzit70v2wvo0hfwhzxndjyet"); // { if((p = *s) ) UNSUPPORTED("9cd19hzlnsuko7qjdica4avwk"); // { while(p->right) UNSUPPORTED("cz431qj39zg4imh6mbgcczxqs"); // p = p->right; UNSUPPORTED("3s0v3cbomg51jgxsi6nrpjbab"); // break; UNSUPPORTED("7qewsve9tto7ge11dkittrbpg"); // } UNSUPPORTED("cysnuxd51taci3hbg5lifz8ce"); // } UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7h31eyrxx5hm6w9t1georb00j"); // done_adj: UNSUPPORTED("706rjqsb7a7mnl0viqsd8nsuq"); // if(!(dt->data->here = p) ) UNSUPPORTED("e2m9axtrsvwabp4prolti6gfx"); // { end_walk: UNSUPPORTED("8mrt3rbp7uw89ql159auu6mmj"); // if((dt->data->loop -= 1) < 0) UNSUPPORTED("c7fwpv4db3vo9qpsu295z0oxy"); // dt->data->loop = 0; UNSUPPORTED("7zu532dfsu93magh8miv6p5k7"); // if(dt->data->size > ((dt->data->ntab) << 1) && dt->data->loop <= 0) UNSUPPORTED("9ev3kbmw9lx3kf7go6zdr7joo"); // dthtab(dt); UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("3y0vfsjtwsjvd3iwojbfm5b7p"); // { dt->data->type |= 020000; UNSUPPORTED("1lts79855usdqaw6d8govltbd"); // return (lk < 0 ? ((Dthold_t*)(p))->obj : (void*)((char*)(p) - lk) ); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9z9fbich950cta699a2c3p0as"); // else if(type&0000040) UNSUPPORTED("bupkrulrc2t9aibwzcu7vup7w"); // { if(!t || (dt->data->type&0000002) ) UNSUPPORTED("1xk47swi87x8a68r3ieehnit6"); // goto do_insert; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("9lkixvm4kipsvy4n793m09ss3"); // { if(disc->freef) UNSUPPORTED("6tpn7nvqe9d7xas7x5oayr89e"); // (*disc->freef)(dt,obj,disc); UNSUPPORTED("4jky808nj7nqoi0xqghkq71hu"); // if(disc->link < 0) UNSUPPORTED("9jdzpj2hhktj69wgcvdr063s"); // (*dt->memoryf)(dt,(void*)r,0,disc); UNSUPPORTED("2txpn83o34o6qwamy2wb7757o"); // return t ? (lk < 0 ? ((Dthold_t*)(t))->obj : (void*)((char*)(t) - lk) ) : ((void*)0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3mg6hhndwfct91qjn7bg6gadw"); // else /*if(type&(DT_DELETE|DT_DETACH))*/ UNSUPPORTED("aqnn8gxdjwjn8bj1jmn893w4c"); // { /* take an element out of the dictionary */ UNSUPPORTED("3lpfu6n28scyhfqq2c0zpty59"); // do_delete: UNSUPPORTED("22j08xpxd771hlal238zomv7l"); // if(!t) UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0); UNSUPPORTED("1wcdapl55tiv1q3u4xsoltmsb"); // else if(p) UNSUPPORTED("3rwbnud1fhq4g3dgtggb8ivmp"); // p->right = t->right; UNSUPPORTED("blm4o9icjcy4qqrndqfpqqskz"); // else if((p = *s) == t) UNSUPPORTED("4it0csugmcnk8ky4nutyv355f"); // p = *s = t->right; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("ab3bg0ss7wkmrlthm6d2cwuau"); // { while(p->right != t) UNSUPPORTED("27m25gnbutgbfo7ek5u2t0l5w"); // p = p->right; UNSUPPORTED("3rwbnud1fhq4g3dgtggb8ivmp"); // p->right = t->right; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("hy98ituujoflafzec4f3ggok"); // obj = (lk < 0 ? ((Dthold_t*)(t))->obj : (void*)((char*)(t) - lk) ); UNSUPPORTED("bhx4ntuz9q54vz0qyvxhuu0vd"); // dt->data->size -= 1; UNSUPPORTED("c8l936qbhd0ofjozm9bngu6sg"); // dt->data->here = p; UNSUPPORTED("e1emcft87tamqtb3x6zxbes7w"); // if(disc->freef && (type&0000002)) UNSUPPORTED("e4inyabba5878wlc02vhj5bos"); // (*disc->freef)(dt,obj,disc); UNSUPPORTED("azvf369rtz6gyaywwhk7fgjk2"); // if(disc->link < 0) UNSUPPORTED("3tov74p8twbpi30dtilg9m6my"); // (*dt->memoryf)(dt,(void*)t,0,disc); UNSUPPORTED("62u47ehg5sw7ibh04rvqqdaws"); // return obj; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 4n0vhm7fg6h57qkecnis5gtj3 // static Dtmethod_t _Dtset = //1 9sqlu54dfqsrwxxtvmwmq2jpg // static Dtmethod_t _Dtbag = //1 879dwfn818v9vidj17x5zmfgb // Dtmethod_t* Dtset = &_Dtset //1 5m11g50hbrc4sn2ajk23ydg4l // Dtmethod_t* Dtbag = &_Dtbag //1 9e6zvz6pkjqohy0uo1p257pj6 // Dtmethod_t _Dthash = //1 bagavrxgzbv4by8jydwtj88mn // Dtmethod_t* Dthash = &_Dthash } plantuml-1.2017.15/src/gen/lib/cdt/dtlist__c.java000066400000000000000000000344221312650303100213520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static smetana.core.Macro.UNSUPPORTED; public class dtlist__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 dyc3bu1thij9v7t35zhwd5nsq // static void* dtlist(register Dt_t* dt, register void* obj, register int type) public static Object dtlist(Object... arg) { UNSUPPORTED("2zck894ixnu9hdr876kp5kkil"); // static void* dtlist(register Dt_t* dt, register void* obj, register int type) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("660kbsr1gj2c3whxtgelujyj1"); // register int lk, sz, ky; UNSUPPORTED("d7uh8kuvwiwc4dkgh3xeqa7o"); // register Dtcompar_f cmpf; UNSUPPORTED("boylfimuhvbo4nqzby3ew5tld"); // register Dtdisc_t* disc; UNSUPPORTED("3wo04u3bwxjm2adizil0k6dlz"); // register Dtlink_t *r, *t; UNSUPPORTED("323rs06etsryh0uezhkjtbd04"); // register void *key, *k; UNSUPPORTED("ckjxpmega2z5oju8xk72wsy0q"); // ((dt->data->type&010000) ? dtrestore(dt,((Dtlink_t*)0)) : 0); UNSUPPORTED("a9vwj28gsu58hp4ocpvno985d"); // disc = dt->disc; (ky = disc->key, sz = disc->size, lk = disc->link, cmpf = disc->comparf); UNSUPPORTED("dpg99ryukgexcc5n31wdbvraz"); // dt->type &= ~0100000; UNSUPPORTED("e4rxlgclvydwuznpw7rk0rksa"); // if(!obj) UNSUPPORTED("9vsb4m488mn6r0xd65c3b0ngc"); // { if(type&(0000400|0000200) ) UNSUPPORTED("34qzq70onioczf5s82mjobdhc"); // { if((r = dt->data->hh._head) ) UNSUPPORTED("a1ikx5viqbw7iuszqxrdkfa5j"); // { if(type&0000400) UNSUPPORTED("aiwt2i7u6w149zbfq2c4f66g9"); // r = r->hl._left; UNSUPPORTED("c1wfwlzje3qf7cn9yrd58r8km"); // dt->data->here = r; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("1ccr1wu363pwoqxfhz7hj4sho"); // return r ? (lk < 0 ? ((Dthold_t*)(r))->obj : (void*)((char*)(r) - lk) ) : ((void*)0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("71r0p0szovteqd7xetljof9k9"); // else if(type&(0000002|0010000)) UNSUPPORTED("rrsc72yw16kb4a9padzlgblh"); // { if((dt->data->type&(0000020|0000200)) || !(r = dt->data->hh._head)) UNSUPPORTED("aa9atfxr38jo3q71l1xw0bq6k"); // return ((void*)0); UNSUPPORTED("4btdyuasa2zps0lqshubsiulz"); // else goto dt_delete; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("bg2msoyh5n8nbv3jrv98xl6jr"); // else if(type&0000100) UNSUPPORTED("8ema02xdl88j1cg663kqjjmoy"); // { if(disc->freef || disc->link < 0) UNSUPPORTED("8yt6l4wvynb2dh7majp6twtg0"); // { for(r = dt->data->hh._head; r; r = t) UNSUPPORTED("5hywksyjo83f15ogrt3lyqs9e"); // { t = r->right; UNSUPPORTED("9la822tbyggyiqojilsi237uo"); // if(disc->freef) UNSUPPORTED("eglki07oisy1jcm5hyv0ot6so"); // (*disc->freef)(dt,(lk < 0 ? ((Dthold_t*)(r))->obj : (void*)((char*)(r) - lk) ),disc); UNSUPPORTED("7hdvwe89xp5vg9m4l8lpmgvap"); // if(disc->link < 0) UNSUPPORTED("dy8c0o748cjxxm1qbvkm09kh7"); // (*dt->memoryf)(dt,(void*)r,0,disc); UNSUPPORTED("cysnuxd51taci3hbg5lifz8ce"); // } UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("340j9mmtga6x1r9zokywny8a5"); // dt->data->hh._head = dt->data->here = ((Dtlink_t*)0); UNSUPPORTED("196oh3ma81y2lao0qwcvuwvga"); // dt->data->size = 0; UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("buskbis6zqn7fgycezsnmb765"); // else return ((void*)0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("17p4kgmskj2wc3ay0ttkyyj16"); // if(type&(0000001|0004000)) UNSUPPORTED("69mih5ilj4h72bp4vqpelae3s"); // { if(disc->makef && (type&0000001) && UNSUPPORTED("819jcvpr9y2bgzfligpibwpw3"); // !(obj = (*disc->makef)(dt,obj,disc)) ) UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0); UNSUPPORTED("293ajmk1i2zgdsq0l7383qwh3"); // if(lk >= 0) UNSUPPORTED("3zy0ha2od6p4le2e9q0z8fp5t"); // r = ((Dtlink_t*)((char*)(obj) + lk) ); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("98qmqsabqfk3u0p0lk7ea0p5t"); // { r = (Dtlink_t*)(*dt->memoryf) UNSUPPORTED("2t8zht6j7v4lkeafea2xf5hyg"); // (dt,((void*)0),sizeof(Dthold_t),disc); UNSUPPORTED("cd514pac1r4g4n22vahs1hysz"); // if(r) UNSUPPORTED("9t49z1jdnrgb6bhq6nkkue1ic"); // ((Dthold_t*)r)->obj = obj; UNSUPPORTED("cqgi8f4d37bqva8z6bx5rvn7w"); // else UNSUPPORTED("1v509jpumhakfypnj2ti3gu5c"); // { if(disc->makef && disc->freef && (type&0000001)) UNSUPPORTED("9mpf4sqfgdx785iln3tc53xtk"); // (*disc->freef)(dt,obj,disc); UNSUPPORTED("aa9atfxr38jo3q71l1xw0bq6k"); // return ((void*)0); UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("9xarci6m8xoxbhm19aicfu6op"); // if(dt->data->type&0000200) UNSUPPORTED("4oa8mskcvinqc3ghe4qb3z2dn"); // { if(type&0020000) UNSUPPORTED("6x0vnmjxngk10oi72383wrqdf"); // goto dt_queue; UNSUPPORTED("2nk49e7v4apz4sgkwea1rocq3"); // else goto dt_stack; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d772otym2gfcniiga03pmsruf"); // else if(dt->data->type&0000020) UNSUPPORTED("4oa8mskcvinqc3ghe4qb3z2dn"); // { if(type&0020000) UNSUPPORTED("4ojwnzwt744lvh40g1sz5nks1"); // { if(!(t = dt->data->here) || !t->right) UNSUPPORTED("e3u46nsizxj0zzm1yuz6mkm5t"); // goto dt_queue; UNSUPPORTED("90e3icond38fe55d3t9mohnek"); // r->right = t->right; UNSUPPORTED("esezu2zro83gvkxdm9xhz9ogd"); // r->right->hl._left = r; UNSUPPORTED("2221i8wr1imn1ch4agvlotbvu"); // r->hl._left = t; UNSUPPORTED("bdrsml91tltn4duaj0fics6nd"); // r->hl._left->right = r; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("cqgi8f4d37bqva8z6bx5rvn7w"); // else UNSUPPORTED("2k0cdvd207renm6g59nxxjqs8"); // { if(!(t = dt->data->here) || t == dt->data->hh._head) UNSUPPORTED("8b34roshgo8gwffhg9ma3gsi5"); // goto dt_stack; UNSUPPORTED("8g4y8anmfv0cidynh11kl3g24"); // r->hl._left = t->hl._left; UNSUPPORTED("bdrsml91tltn4duaj0fics6nd"); // r->hl._left->right = r; UNSUPPORTED("bpwbkzd8dztbberjy54bqwr9r"); // r->right = t; UNSUPPORTED("esezu2zro83gvkxdm9xhz9ogd"); // r->right->hl._left = r; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("22wam4b54ielgtcvtdx3fxy3r"); // else if(dt->data->type&0000040) UNSUPPORTED("7eyhwlknuhbf62yfdojjgchdk"); // { dt_stack: UNSUPPORTED("4ikujhrb5r2ufyhi6857ek42v"); // r->right = t = dt->data->hh._head; UNSUPPORTED("9onfbw0e4egk5q69g1khqbzd"); // if(t) UNSUPPORTED("35wihezut0mc3f7nshp29ate5"); // { r->hl._left = t->hl._left; UNSUPPORTED("638235mxuepku23w4hxkl3ep6"); // t->hl._left = r; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("2du87rzew8rt0830ob1tnqxo6"); // else r->hl._left = r; UNSUPPORTED("7u6umzefjt96rok3qemy1f717"); // dt->data->hh._head = r; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("5tttas5l0qfvco787vns2uan4"); // else /* if(dt->data->type&DT_QUEUE) */ UNSUPPORTED("ew3f4m8ld77ai8s7ndfdee9v4"); // { dt_queue: UNSUPPORTED("1aeq93f540gclms5vcjs7rg6a"); // if((t = dt->data->hh._head) ) UNSUPPORTED("4pksv1ru7zqlljrja5f514o1j"); // { t->hl._left->right = r; UNSUPPORTED("8g4y8anmfv0cidynh11kl3g24"); // r->hl._left = t->hl._left; UNSUPPORTED("638235mxuepku23w4hxkl3ep6"); // t->hl._left = r; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("cqgi8f4d37bqva8z6bx5rvn7w"); // else UNSUPPORTED("4rj7250ci10tq7lo05uezv8w4"); // { dt->data->hh._head = r; UNSUPPORTED("dg1qkalat0zmys95gxdc4j24o"); // r->hl._left = r; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("my81njr3zdj3gj3b86jcc8o3"); // r->right = ((Dtlink_t*)0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("4p7dqfnzg979k37w3hvqbjhbq"); // if(dt->data->size >= 0) UNSUPPORTED("1ot5ghc6sf3uiepe9suupzcy4"); // dt->data->size += 1; UNSUPPORTED("7nqs3a1rtwdoaksqwklk6h9mr"); // dt->data->here = r; UNSUPPORTED("6q9hi4nb5yoxs4rcb8mon9vdb"); // return (lk < 0 ? ((Dthold_t*)(r))->obj : (void*)((char*)(r) - lk) ); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("69r6haab9votyq47nu1m8m9mo"); // if((type&0001000) || !(r = dt->data->here) || (lk < 0 ? ((Dthold_t*)(r))->obj : (void*)((char*)(r) - lk) ) != obj) UNSUPPORTED("dow6c5q06mynnixn0dg629l8s"); // { key = (type&0001000) ? obj : (void*)(sz < 0 ? *((char**)((char*)(obj)+ky)) : ((char*)(obj)+ky)); UNSUPPORTED("5o1yjgbu0qjlg99lqs1h06iyv"); // for(r = dt->data->hh._head; r; r = r->right) UNSUPPORTED("9d15odjmf2hxhhdsf9s2up2fd"); // { k = (lk < 0 ? ((Dthold_t*)(r))->obj : (void*)((char*)(r) - lk) ); k = (void*)(sz < 0 ? *((char**)((char*)(k)+ky)) : ((char*)(k)+ky)); UNSUPPORTED("dnok81nrhi3pajt355zkqm76w"); // if((cmpf ? (*cmpf)(dt,key,k,disc) : (sz <= 0 ? strcmp(key,k) : memcmp(key,k,sz)) ) == 0) UNSUPPORTED("1dhrv6aj5eq8ntuvb7qbs8aot"); // break; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("be1db0r6fggnry37s9bjem8so"); // if(!r) UNSUPPORTED("5p6q7ip4om6y4nrsjz07ua456"); // return ((void*)0); UNSUPPORTED("esjg4ndwtf9ryvxfle5f1awdw"); // dt->type |= 0100000; UNSUPPORTED("2ptdjk4ijgvrjv9sjqrx5b08n"); // if(type&(0000002|0010000)) UNSUPPORTED("83b3sp1f1vvsa2w5nqdh831ux"); // { dt_delete: UNSUPPORTED("3ohzd40a39b2h609ckmcpsxvw"); // if(r->right) UNSUPPORTED("2p8p0mpv6dnqncm0ewg9gtn53"); // r->right->hl._left = r->hl._left; UNSUPPORTED("2ankbgvq7yr3z93tl1xnbfgpr"); // if(r == (t = dt->data->hh._head) ) UNSUPPORTED("8ee45f3kh06ajncucnq4d4zn3"); // { dt->data->hh._head = r->right; UNSUPPORTED("58dd1wmd3q6hu7jmyttutbtjp"); // if(dt->data->hh._head) UNSUPPORTED("24pdk7685q5i3eyip2b52xc1a"); // dt->data->hh._head->hl._left = t->hl._left; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("uo5j3uk44ezbi34a4lez0vko"); // { r->hl._left->right = r->right; UNSUPPORTED("122rcml8ecn8royyv655mfxp7"); // if(r == t->hl._left) UNSUPPORTED("crlanj0wz66t4lpcauaoonqsc"); // t->hl._left = r->hl._left; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("2550dhcfkngbylvb1phmq8ebq"); // dt->data->here = r == dt->data->here ? r->right : ((Dtlink_t*)0); UNSUPPORTED("bhx4ntuz9q54vz0qyvxhuu0vd"); // dt->data->size -= 1; UNSUPPORTED("5z333zdlm5fisvkd28wdk08lb"); // obj = (lk < 0 ? ((Dthold_t*)(r))->obj : (void*)((char*)(r) - lk) ); UNSUPPORTED("e1emcft87tamqtb3x6zxbes7w"); // if(disc->freef && (type&0000002)) UNSUPPORTED("e4inyabba5878wlc02vhj5bos"); // (*disc->freef)(dt,obj,disc); UNSUPPORTED("azvf369rtz6gyaywwhk7fgjk2"); // if(disc->link < 0) UNSUPPORTED("16tb09hfz1sv26gfi60t8ji16"); // (*dt->memoryf)(dt,(void*)r,0,disc); UNSUPPORTED("62u47ehg5sw7ibh04rvqqdaws"); // return obj; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5k3wkmt1521n2igrbw361wdxw"); // else if(type&0000010) UNSUPPORTED("4zcwolmq8zlneya8ew49t1qc4"); // r = r->right; UNSUPPORTED("eeak67ajn02aq4hfkpb1houzf"); // else if(type&0000020) UNSUPPORTED("80ghi58dnl87w9e87qt2lw3jn"); // r = r == dt->data->hh._head ? ((Dtlink_t*)0) : r->hl._left; UNSUPPORTED("1osns9frhkriafbjyob0sbz8z"); // dt->data->here = r; UNSUPPORTED("cij46y936bg1ikv3ztksloy91"); // return r ? (lk < 0 ? ((Dthold_t*)(r))->obj : (void*)((char*)(r) - lk) ) : ((void*)0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 9hopil17a8eg1agt37070u73q // Dtmethod_t _Dtlist = //1 1fxnvjagcf621oxjj3ciypwfy // Dtmethod_t _Dtdeque = //1 40f33oiu7l21l1jxw9wfoux8f // Dtmethod_t _Dtstack = //1 14hp9ggjclgs43wn0uwmfw77d // Dtmethod_t _Dtqueue = //1 b1q50g67csjki72iuef5of8zy // Dtmethod_t* Dtlist = &_Dtlist //1 62b2csa6dv66okdkjb7evy47o // Dtmethod_t* Dtdeque = &_Dtdeque //1 4e88n3c3ml5i5mf3oqr7si856 // Dtmethod_t* Dtstack = &_Dtstack //1 zroiycxvakotau1jgb16sjzz // Dtmethod_t* Dtqueue = &_Dtqueue } plantuml-1.2017.15/src/gen/lib/cdt/dtmethod__c.java000066400000000000000000000174221312650303100216600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static smetana.core.Macro.UNSUPPORTED; public class dtmethod__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 5y8zard8q0t7wd1fznlyiu0is // Dtmethod_t* dtmethod(Dt_t* dt, Dtmethod_t* meth) public static Object dtmethod(Object... arg) { UNSUPPORTED("3km1xhxqsi1kc6xhl15kcri1f"); // Dtmethod_t* dtmethod(Dt_t* dt, Dtmethod_t* meth) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bf4mmzf6u2tqotgqbd6k8eqp0"); // register Dtlink_t *list, *r; UNSUPPORTED("ab9fv18fhjzwp3wngyyqarrns"); // register Dtdisc_t* disc = dt->disc; UNSUPPORTED("crjx4y1aesvbz4wkqg5642nj4"); // register Dtmethod_t* oldmeth = dt->meth; UNSUPPORTED("5c6whtsf2a3glrlh1kczzpqe9"); // if(!meth || meth->type == oldmeth->type) UNSUPPORTED("8ttmhoaftdijn5bkmfimd9x7"); // return oldmeth; UNSUPPORTED("8gsk9kzxnlwgo3aceze9c6gl7"); // if(disc->eventf && UNSUPPORTED("fwq3340fa0pnag7j0f4o7wzm"); // (*disc->eventf)(dt,4,(void*)meth,disc) < 0) UNSUPPORTED("2igwwp2cx3n29p50m7m8ioyv2"); // return ((Dtmethod_t*)0); UNSUPPORTED("2eqdiqvcsxis68sccmci5sslk"); // dt->data->minp = 0; UNSUPPORTED("3lnvvw51l9ruzql33ygokb3l9"); // /* get the list of elements */ UNSUPPORTED("458eivbagnsewjl8xhw519qcg"); // list = dtflatten(dt); UNSUPPORTED("9qekjyedz55m5wna2o1oggk12"); // if(dt->data->type&(0000020|0000040|0000100) ) UNSUPPORTED("3v40gkacc2m6me0zor7nhpjmw"); // dt->data->hh._head = ((Dtlink_t*)0); UNSUPPORTED("9l8vi2w86i0txe17utistljqu"); // else if(dt->data->type&(0000001|0000002) ) UNSUPPORTED("hysmhouy1ud6hsdj0cubiudt"); // { if(dt->data->ntab > 0) UNSUPPORTED("4ugmcpi8vkb013vuo4wykn0a3"); // (*dt->memoryf)(dt,(void*)dt->data->hh._htab,0,disc); UNSUPPORTED("daqygvp6d794yl5eu8d06g3gi"); // dt->data->ntab = 0; UNSUPPORTED("1wghucytlosmvwxh9hs06gqnv"); // dt->data->hh._htab = ((Dtlink_t**)0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bl1pmhqf3x1in1wvwhq1v00u2"); // dt->data->here = ((Dtlink_t*)0); UNSUPPORTED("762s6dooy1oj4wiqk2j8mtcs7"); // dt->data->type = (dt->data->type&~(0000377|010000)) | meth->type; UNSUPPORTED("62j00tqtfsxxmirwb05ur7z0t"); // dt->meth = meth; UNSUPPORTED("3hek07go1qr5flyhweyvb88hh"); // if(dt->searchf == oldmeth->searchf) UNSUPPORTED("7d7hyoujq87agx8focnjapazd"); // dt->searchf = meth->searchf; UNSUPPORTED("c0iupu78ptdjv7tkp4fp5eoem"); // if(meth->type&(0000020|0000040|0000100) ) UNSUPPORTED("10dxbmrp9w60lb4wyi4c6ze8a"); // { if(!(oldmeth->type&(0000020|0000040|0000100)) ) UNSUPPORTED("c6eshgqlcm9am6oih7mqy27cx"); // { if((r = list) ) UNSUPPORTED("cxw84g4fps5l02s4epfyl6n2r"); // { register Dtlink_t* t; UNSUPPORTED("et4fiw7yaciidg54t59if0gz"); // for(t = r->right; t; r = t, t = t->right ) UNSUPPORTED("6y5abi7x957jjhe2rscd9ufjx"); // t->hl._left = r; UNSUPPORTED("8nfo3btdkjap25oecr3r2t9zz"); // list->hl._left = r; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7duc1evkuyrgnx1k6sqnyoc1e"); // dt->data->hh._head = list; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("99xc5unqmtom8dp50z8en6k79"); // else if(meth->type&(0000004|0000010)) UNSUPPORTED("dejooawjmch41k0n8wz35280p"); // { dt->data->size = 0; UNSUPPORTED("dzuwpmnfrpq395y1ou6zll3u2"); // while(list) UNSUPPORTED("4b3ko2bznm8f1y9qeju4acfua"); // { r = list->right; UNSUPPORTED("bdgaa5aljhk83mgc5oupnofue"); // (*meth->searchf)(dt,(void*)list,0000040); UNSUPPORTED("eoujol9u634bcw14kwkb2lm5x"); // list = r; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5i0ckqkt3yzykzquvm6nd08wf"); // else if(!((meth->type&0000002) && (oldmeth->type&0000001)) ) UNSUPPORTED("34wwvljvfvcvyh3obzyhgmnpo"); // { int rehash; UNSUPPORTED("6akycohy5byonwsy0g7a3l1nk"); // if((meth->type&(0000001|0000002)) && !(oldmeth->type&(0000001|0000002))) UNSUPPORTED("4o1gcrc4m2r1348akifhsvudt"); // rehash = 1; UNSUPPORTED("1byx9oyi0ig37sdx42lv59xv"); // else rehash = 0; UNSUPPORTED("4zu0hy7teh1cxc74ifeho8ej3"); // dt->data->size = dt->data->loop = 0; UNSUPPORTED("dzuwpmnfrpq395y1ou6zll3u2"); // while(list) UNSUPPORTED("4b3ko2bznm8f1y9qeju4acfua"); // { r = list->right; UNSUPPORTED("20x8nlwk3x08qy0vwwzj6qtad"); // if(rehash) UNSUPPORTED("30b8etf9nx2grv2w7rsytmgxk"); // { register void* key = (disc->link < 0 ? ((Dthold_t*)(list))->obj : (void*)((char*)(list) - disc->link) ); UNSUPPORTED("8h5rhllokrgydtbfodokfa8tk"); // key = (void*)(disc->size < 0 ? *((char**)((char*)(key)+disc->key)) : ((char*)(key)+disc->key)); UNSUPPORTED("t4uwrmevpnx4doh1anexa33y"); // list->hl._hash = (disc->hashf ? (*disc->hashf)(dt,key,disc) : dtstrhash(0,key,disc->size) ); UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("9dj4v9f2xppzoxbumhwauuzk6"); // (void)(*meth->searchf)(dt,(void*)list,0000040); UNSUPPORTED("eoujol9u634bcw14kwkb2lm5x"); // list = r; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("37bs415tc2fi47jgdzwr9kyeu"); // return oldmeth; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cdt/dtopen__c.java000066400000000000000000000123421312650303100213350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static gen.lib.cdt.dtdisc__c.dtdisc; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.N; import h._dt_s; import h._dtdata_s; import h._dtdisc_s; import h._dtmethod_s; import smetana.core.Memory; public class dtopen__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 emxrtwweklud1b14cstc9z3bb // static char* Version = //3 34nbfbdgwe34hb4vmfr5p6kbh // Dt_t* dtopen(Dtdisc_t* disc, Dtmethod_t* meth) public static _dt_s dtopen(_dtdisc_s disc, _dtmethod_s meth) { ENTERING("34nbfbdgwe34hb4vmfr5p6kbh","dtopen"); try { _dt_s dt = null; int e; _dtdata_s data; if(N(disc) || N(meth)) return null; /* allocate space for dictionary */ if(N(dt = (_dt_s) Memory.malloc(_dt_s.class))) return null; // /* initialize all absolutely private data */ dt.setPtr("searchf", null); dt.setPtr("meth", null); dt.setPtr("disc", null); dtdisc(dt,disc,0); dt.setInt("type", 0); dt.setInt("nview", 0); dt.setPtr("view", null); dt.setPtr("walk", null); dt.setPtr("user", null); if(disc.getPtr("eventf")!=null) { /* if shared/persistent dictionary, get existing data */ throw new UnsupportedOperationException(); // data = ((Dtdata_t*)0); // if((e = (*disc->eventf)(dt,1,(void*)(&data),disc)) < 0) // goto err_open; // else if(e > 0) // { if(data) // { if(data->type&meth->type) // goto done; // else goto err_open; // } // if(!disc->memoryf) // goto err_open; // free((void*)dt); // if(!(dt = (*disc->memoryf)(0, 0, sizeof(Dt_t), disc)) ) // return ((Dt_t*)0); // dt->searchf = ((Dtsearch_f)0); // dt->meth = ((Dtmethod_t*)0); // dt->disc = ((Dtdisc_t*)0); // dtdisc(dt,disc,0); // dt->type = 1; // dt->nview = 0; // dt->view = dt->walk = ((Dt_t*)0); // } } /* allocate sharable data */ if(N(data = (_dtdata_s) (dt.call("memoryf", dt,null,sizeof(_dtdata_s.class),disc)) )) { err_open: Memory.free(dt); return (null); } data.setInt("type", meth.getInt("type")); data.setPtr("here", null); data.setPtr("hh._htab", null); data.setInt("ntab", 0); data.setInt("size", 0); data.setInt("loop", 0); data.setInt("minp", 0); //done: dt.setPtr("data", data); dt.setPtr("searchf", meth.getPtr("searchf")); dt.setPtr("meth", meth); if(disc.getPtr("eventf")!=null) throw new UnsupportedOperationException(); // (*disc->eventf)(dt, 5, (void*)dt, disc); return dt; } finally { LEAVING("34nbfbdgwe34hb4vmfr5p6kbh","dtopen"); } } } plantuml-1.2017.15/src/gen/lib/cdt/dtrenew__c.java000066400000000000000000000140421312650303100215130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static smetana.core.Macro.UNSUPPORTED; public class dtrenew__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 dpntyaoee84n51hi5hei3meki // void* dtrenew(Dt_t* dt, register void* obj) public static Object dtrenew(Object... arg) { UNSUPPORTED("c1icavxc4bdl41jaglud7ov9y"); // void* dtrenew(Dt_t* dt, register void* obj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("75g1y88zfpqk2mdy0p3bzcp5u"); // register void* key; UNSUPPORTED("7hzc11j4z5915otom5ec9sc1p"); // register Dtlink_t *e, *t, **s; UNSUPPORTED("ab9fv18fhjzwp3wngyyqarrns"); // register Dtdisc_t* disc = dt->disc; UNSUPPORTED("ckjxpmega2z5oju8xk72wsy0q"); // ((dt->data->type&010000) ? dtrestore(dt,((Dtlink_t*)0)) : 0); UNSUPPORTED("afazqxuj3nf5t37agp5loypap"); // if(!(e = dt->data->here) || (disc->link < 0 ? ((Dthold_t*)(e))->obj : (void*)((char*)(e) - disc->link) ) != obj) UNSUPPORTED("5p6q7ip4om6y4nrsjz07ua456"); // return ((void*)0); UNSUPPORTED("epetks7tchxd027a5fogh5s8y"); // if(dt->data->type&(0000040|0000100|0000020)) UNSUPPORTED("62u47ehg5sw7ibh04rvqqdaws"); // return obj; UNSUPPORTED("d0a3msvhdhl5w8ezkp8afz1ay"); // else if(dt->data->type&(0000004|0000010) ) UNSUPPORTED("6nk9lof9sqibzqlvn7z3v0adk"); // { if(!e->right ) /* make left child the new root */ UNSUPPORTED("ca72p6wo0wlrje8mc1clzkgd"); // dt->data->here = e->hl._left; UNSUPPORTED("9kvzz8qhw1tc87iizefkx7jux"); // else /* make right child the new root */ UNSUPPORTED("bw0zxd3ks2tqu4oa88193x30s"); // { dt->data->here = e->right; UNSUPPORTED("7xxvhxwnjmtln4k5iqxwas7gy"); // /* merge left subtree to right subtree */ UNSUPPORTED("b5hfkdgjlasjtdi2d8j9cnsfl"); // if(e->hl._left) UNSUPPORTED("7qj77o9upzr06q7w290ppiijf"); // { for(t = e->right; t->hl._left; t = t->hl._left) UNSUPPORTED("6f76030mwgybzczalesd54a9q"); // ; UNSUPPORTED("31m2jyxntk5bvmxrlz7e1060n"); // t->hl._left = e->hl._left; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9jvkhuwh0wij26qmyu1sft73s"); // else /*if(dt->data->type&(DT_SET|DT_BAG))*/ UNSUPPORTED("av4lr5g8w88ulq2cwdubl498l"); // { s = dt->data->hh._htab + ((e->hl._hash)&((dt->data->ntab)-1)); UNSUPPORTED("blraorobd8eq0hg3b3w3uxkwt"); // if((t = *s) == e) UNSUPPORTED("6bxfg7yydrmhsw5oysk7cxytq"); // *s = e->right; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("z3sto7b7d7g3tgy1pobqnftq"); // { for(; t->right != e; t = t->right) UNSUPPORTED("8c0hnggfgcchqp0vr4bwobm4t"); // ; UNSUPPORTED("2bmnk8u0o0gw61p068qqsvd35"); // t->right = e->right; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7i9supotcfsya189dptbk9mg6"); // key = (void*)(disc->size < 0 ? *((char**)((char*)(obj)+disc->key)) : ((char*)(obj)+disc->key)); UNSUPPORTED("6k8ldpnvi2limcrix2xyqga8a"); // e->hl._hash = (disc->hashf ? (*disc->hashf)(dt,key,disc) : dtstrhash(0,key,disc->size) ); UNSUPPORTED("6vkn7padspfbtju9g5b65b34w"); // dt->data->here = ((Dtlink_t*)0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("zjdphdwef22jifi7kl4wial9"); // dt->data->size -= 1; UNSUPPORTED("27sbkwn3jowh7b7zt5tzb2v4q"); // return (*dt->meth->searchf)(dt,(void*)e,0000040) ? obj : ((void*)0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cdt/dtrestore__c.java000066400000000000000000000127321312650303100220620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import h.Dtsearch_f; import h._dt_s; import h._dtlink_s; public class dtrestore__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 8dfut8799tvg4tjvn2yz48d7h // int dtrestore(register Dt_t* dt, register Dtlink_t* list) public static int dtrestore(_dt_s dt, _dtlink_s list) { ENTERING("8dfut8799tvg4tjvn2yz48d7h","dtrestore"); try { _dtlink_s t; //Dtlink_t **s, **ends; int type; Dtsearch_f searchf = (Dtsearch_f) dt.getPtr("meth").getPtr("searchf"); type = dt.getPtr("data").getInt("type")&010000; if(N(list)) /* restoring a flattened dictionary */ { if(N(type)) return -1; list = (_dtlink_s) dt.getPtr("data").getPtr("here"); } else /* restoring an extracted list of elements */ { if(dt.getPtr("data").getInt("size") != 0) return -1; type = 0; } dt.getPtr("data").setInt("type", dt.getPtr("data").getInt("type") & ~010000); if((dt.getPtr("data").getInt("type")&(0000001|0000002))!=0) { //dt->data->here = ((Dtlink_t*)0); UNSUPPORTED("4xawc48hce5sov89n8h4j7xw0"); // if(type) /* restoring a flattened dictionary */ UNSUPPORTED("3yrjmgus9a9415ocrrtj1e733"); // { for(ends = (s = dt->data->hh._htab) + dt->data->ntab; s < ends; ++s) UNSUPPORTED("7s6h8lg0p1wwil85e1p2msogy"); // { if((t = *s) ) UNSUPPORTED("2j3e40zcb5znwl73hbk12t6va"); // { *s = list; UNSUPPORTED("ef469bao0q1pw0jwv7pmoly31"); // list = t->right; UNSUPPORTED("29gliugc08l5pj89nfqoctwqi"); // t->right = ((Dtlink_t*)0); UNSUPPORTED("cysnuxd51taci3hbg5lifz8ce"); // } UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("dri3t8bbbtcxexw436q0kqnxd"); // else /* restoring an extracted list of elements */ UNSUPPORTED("efiynrcqevfta9kp0bfbujmn5"); // { dt->data->size = 0; UNSUPPORTED("afqkqg6k8jxzgjyj7tb6kw1fc"); // while(list) UNSUPPORTED("4rgxhjb5r159n4fh7vilshms9"); // { t = list->right; UNSUPPORTED("6fq6k0xv0ofue3nmsm3tcbmxc"); // (*searchf)(dt,(void*)list,0000040); UNSUPPORTED("8dsqgg8k8zwg5ae8ltd5xs9yc"); // list = t; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } } else { if((dt.getPtr("data").getInt("type")&(0000004|0000010))!=0) dt.getPtr("data").setPtr("here", list); else /*if(dt->data->type&(DT_LIST|DT_STACK|DT_QUEUE))*/ {UNSUPPORTED("79wu0m7edfdq02msgoqkzb32"); // { dt->data->here = ((Dtlink_t*)0); UNSUPPORTED("c8q10nh3f6o4rjxtacmbgjxqj"); // dt->data->hh._head = list; } if(N(type)) dt.getPtr("data").setInt("size", -1); } return 0; } finally { LEAVING("8dfut8799tvg4tjvn2yz48d7h","dtrestore"); } } } plantuml-1.2017.15/src/gen/lib/cdt/dtsize__c.java000066400000000000000000000103201312650303100213400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static gen.lib.cdt.dtrestore__c.dtrestore; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import h._dt_s; import h._dtlink_s; public class dtsize__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 6j49zum5hqto1t7fyrz8qjv1u // static int treecount(register Dtlink_t* e) public static int treecount(_dtlink_s e) { ENTERING("6j49zum5hqto1t7fyrz8qjv1u","treecount"); try { return e!=null ? treecount((_dtlink_s) e.getPtr("hl._left")) + treecount((_dtlink_s) e.getPtr("right")) + 1 : 0; } finally { LEAVING("6j49zum5hqto1t7fyrz8qjv1u","treecount"); } } //3 bci0ea1fa7egf4aads6gdgvsq // int dtsize(Dt_t* dt) public static int dtsize_(_dt_s dt) { ENTERING("bci0ea1fa7egf4aads6gdgvsq","dtsize"); try { _dtlink_s t; int size; if (((dt.getPtr("data").getInt("type")&010000)!=0)) dtrestore(dt,null); if(dt.getPtr("data").getInt("size") < 0) /* !(dt->data->type&(DT_SET|DT_BAG)) */ { if((dt.getPtr("data").getInt("type")&(0000004|0000010))!=0) dt.getPtr("data").setInt("size", treecount((_dtlink_s) dt.getPtr("data").getPtr("here"))); else if((dt.getPtr("data").getInt("type")&(0000020|0000040|0000100))!=0) { size=0; for(t = (_dtlink_s) dt.getPtr("data").getPtr("hh").getPtr("_head"); t!=null; t = (_dtlink_s) t.getPtr("right")) size += 1; dt.getPtr("data").setInt("size", size); } } return dt.getPtr("data").getInt("size"); } finally { LEAVING("bci0ea1fa7egf4aads6gdgvsq","dtsize"); } } } plantuml-1.2017.15/src/gen/lib/cdt/dtstat__c.java000066400000000000000000000205701312650303100213510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static smetana.core.Macro.UNSUPPORTED; public class dtstat__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 91c7rdavgvzhuigvve5ibdpn0 // static void dttstat(Dtstat_t* ds, Dtlink_t* root, int depth, int* level) public static Object dttstat(Object... arg) { UNSUPPORTED("96759a5l0ygg0om48m2a6t0ng"); // static void dttstat(Dtstat_t* ds, Dtlink_t* root, int depth, int* level) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("56ka5rmkoppf3hruu8g6m0xja"); // if(root->hl._left) UNSUPPORTED("cid9xp3s0qj3aabaka0l9zv7t"); // dttstat(ds,root->hl._left,depth+1,level); UNSUPPORTED("9s9ahe7p2w6fq5emj7g8wbjfr"); // if(root->right) UNSUPPORTED("87cqywe08opun9vcdypm5sngz"); // dttstat(ds,root->right,depth+1,level); UNSUPPORTED("1cpnp52f4qqoepwe6x0k1xfba"); // if(depth > ds->dt_n) UNSUPPORTED("7ufge640ert57jo7j225ab7pe"); // ds->dt_n = depth; UNSUPPORTED("3pj5kfo9kjuutf0og8g2j8geg"); // if(level) UNSUPPORTED("9gine8rpyhyyk5yrtmvl56o2p"); // level[depth] += 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a8o5okh4tw99gnboco3s2dmxd // static void dthstat(register Dtdata_t* data, Dtstat_t* ds, register int* count) public static Object dthstat(Object... arg) { UNSUPPORTED("48ylybwp2yevlr561pyv3jui"); // static void dthstat(register Dtdata_t* data, Dtstat_t* ds, register int* count) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bqowb8dyq0iy0kow4ic3v69rm"); // register Dtlink_t* t; UNSUPPORTED("1kv2h7mwh5yurbekfwfiewdhy"); // register int n, h; UNSUPPORTED("286ioif0j041zmjzncvg5xoll"); // for(h = data->ntab-1; h >= 0; --h) UNSUPPORTED("3q5ha8vx2tajjl4ufu2w0no4p"); // { n = 0; UNSUPPORTED("csnxwylxkitnmc1zga3njlqgd"); // for(t = data->hh._htab[h]; t; t = t->right) UNSUPPORTED("90p2oslbn5buyc5k0tkflj50d"); // n += 1; UNSUPPORTED("1pfuj1amofbpxyeubend5yxr5"); // if(count) UNSUPPORTED("5nwitx1rnfie4jd6ny8ssadzg"); // count[n] += 1; UNSUPPORTED("3w8in45yqqsl7kb6o0suodbq0"); // else if(n > 0) UNSUPPORTED("ck4u5h04gsnndyuthxg9kuixs"); // { ds->dt_n += 1; UNSUPPORTED("487tl3ivbjnaxewh91pw7xeuh"); // if(n > ds->dt_max) UNSUPPORTED("arga2k65qq28lxquyhcmmii6p"); // ds->dt_max = n; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1kbkj84h5jc45cmi7lzd45dp // int dtstat(register Dt_t* dt, Dtstat_t* ds, int all) public static Object dtstat(Object... arg) { UNSUPPORTED("ao2i3bpekp72m9gi7y5ckz4rk"); // int dtstat(register Dt_t* dt, Dtstat_t* ds, int all) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("44m1eek6bje0mjqjlsecsorod"); // register int i; UNSUPPORTED("26pvlo4hyfclsuk4h43qetsjw"); // static int *Count, Size; UNSUPPORTED("ckjxpmega2z5oju8xk72wsy0q"); // ((dt->data->type&010000) ? dtrestore(dt,((Dtlink_t*)0)) : 0); UNSUPPORTED("ec11eijzw85083qye8hp5eex0"); // ds->dt_n = ds->dt_max = 0; UNSUPPORTED("3tdmcypiwfwu1pn4i6zzf500z"); // ds->dt_count = ((int*)0); UNSUPPORTED("azymim1m9qe68uhp1mftu7fe1"); // ds->dt_size = dtsize(dt); UNSUPPORTED("av3q24lmuasi6ojxa3wldv6ta"); // ds->dt_meth = dt->data->type&0000377; UNSUPPORTED("7wb0sc472yga8vixhnog657ny"); // if(!all) UNSUPPORTED("5izxoao5ryte71964f8yjfd5y"); // return 0; UNSUPPORTED("32ow9kmsxf47y1h17vyj3ef11"); // if(dt->data->type&(0000001|0000002)) UNSUPPORTED("3h1ytwsfcbphbuuhvj29vqlpn"); // { dthstat(dt->data,ds,((int*)0)); UNSUPPORTED("cg0ykqnfk3ou03i5e9ykd3m5n"); // if(ds->dt_max+1 > Size) UNSUPPORTED("4ebwk82nv6oujn3zi64gvqqr7"); // { if(Size > 0) UNSUPPORTED("4dxxr85kxn2tyyzxi82w0iqak"); // free(Count); UNSUPPORTED("3a6ksysaw3s4hfdjvet2q2qxc"); // if(!(Count = (int*)malloc((ds->dt_max+1)*sizeof(int))) ) UNSUPPORTED("6pxdbvdu6loxn1ex6nm9i93gb"); // return -1; UNSUPPORTED("13xjtjclxu8ornn37l48jz2rv"); // Size = ds->dt_max+1; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("36u41cy59sloyiha209o4m5qy"); // for(i = ds->dt_max; i >= 0; --i) UNSUPPORTED("8aibp56k7f0yagfchektytbwy"); // Count[i] = 0; UNSUPPORTED("b5vi0pdbdr81ex0fk7lepptgm"); // dthstat(dt->data,ds,Count); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("av63gjdiqp6xi9w4vjwqpn5oo"); // else if(dt->data->type&(0000004|0000010)) UNSUPPORTED("bld1jk0owgrtf4hcqqhwoccpy"); // { if(dt->data->here) UNSUPPORTED("31bytekoo4eleuggsetk4m6de"); // { dttstat(ds,dt->data->here,0,((int*)0)); UNSUPPORTED("7hz6680zzj4qr9s3dm6v435sk"); // if(ds->dt_n+1 > Size) UNSUPPORTED("aq4shezrsmlv37xas7p8ho5sg"); // { if(Size > 0) UNSUPPORTED("3y929awdu2jrmw3aer6dqygxb"); // free(Count); UNSUPPORTED("ex3430euevoine0wgb82be0rc"); // if(!(Count = (int*)malloc((ds->dt_n+1)*sizeof(int))) ) UNSUPPORTED("9qiuahtnvh744qet6fj8wk596"); // return -1; UNSUPPORTED("e80mtvhrb447fuzvxw7tmlk79"); // Size = ds->dt_n+1; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("ce7lqmqeaeqmtpznl57wppd5n"); // for(i = ds->dt_n; i >= 0; --i) UNSUPPORTED("6j9e4nc2e8eecvywkpfm2ut9m"); // Count[i] = 0; UNSUPPORTED("7vm7v7g848394ourjpirftcq7"); // dttstat(ds,dt->data->here,0,Count); UNSUPPORTED("ce7lqmqeaeqmtpznl57wppd5n"); // for(i = ds->dt_n; i >= 0; --i) UNSUPPORTED("2t8ajn7ynd4ll8m6rug9gxbsx"); // if(Count[i] > ds->dt_max) UNSUPPORTED("8d36wfd4xwyzw0stap7i7dv8y"); // ds->dt_max = Count[i]; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cdj1cmsf0q45eayjhj4n0zpsn"); // ds->dt_count = Count; UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cdt/dtstrhash__c.java000066400000000000000000000104061312650303100220470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static smetana.core.Macro.UNSUPPORTED; public class dtstrhash__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 ilmfiy3q8awgqo01v4p6sxqo // unsigned int dtstrhash(register unsigned int h, void* args, register int n) public static Object dtstrhash(Object... arg) { UNSUPPORTED("2yykq92jf12qpgr2zziajbyzl"); // unsigned int dtstrhash(register unsigned int h, void* args, register int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5c17vk53xaiwjbt9ov98wzeer"); // register unsigned char* s = (unsigned char*)args; UNSUPPORTED("abhbgzrg4q5z2vkoed72su98y"); // if(n <= 0) UNSUPPORTED("25f9vqwrb3gtkdnfnn6tdi2sp"); // { for(; *s != 0; s += s[1] ? 2 : 1) UNSUPPORTED("27ugkho4hqjs3cxg13l52hssq"); // h = (h + (s[0]<<8) + s[1])*17109811; UNSUPPORTED("5b7raoyujdiyvk5amytm2iv8d"); // n = s - (unsigned char*)args; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("dr62hl39yt7u8lxzywzmph1wz"); // { register unsigned char* ends; UNSUPPORTED("4ytefr16blz6pxv5xh9f0u9v0"); // for(ends = s+n-1; s < ends; s += 2) UNSUPPORTED("27ugkho4hqjs3cxg13l52hssq"); // h = (h + (s[0]<<8) + s[1])*17109811; UNSUPPORTED("9luve3tuqafeir04r2fr5d20m"); // if(s <= ends) UNSUPPORTED("2hbqyzsyz69z1twg3his8qw03"); // h = (h + (s[0]<<8))*17109811; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2eaqcc4p1u1dwzxk8syb0lnws"); // return (h+n)*17109811; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cdt/dttree__c.java000066400000000000000000000432011312650303100213310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static gen.lib.cdt.dtrestore__c.dtrestore; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtils.strcmp; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import static smetana.core.Macro.UNSUPPORTED_INT; import h.Dtcompar_f; import h._dt_s; import h._dtdisc_s; import h._dthold_s; import h._dtlink_s; import smetana.core.CFunction; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.__ptr__; import smetana.core.__struct__; public class dttree__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 abqfzg1d1vkzk51225tcdlik5 // static void* dttree(Dt_t* dt, void* obj, int type) static class no_root extends RuntimeException {} static class has_root extends RuntimeException {} static class do_search extends RuntimeException {} static class dt_delete extends RuntimeException {} static class dt_insert extends RuntimeException {} static class dt_next extends RuntimeException {} public static Object dttree(_dt_s dt, __ptr__ obj, int type) { ENTERING("abqfzg1d1vkzk51225tcdlik5","dttree"); try { _dtlink_s root, t; int cmp, lk, sz, ky; _dtlink_s l, r, me=null; final __struct__<_dtlink_s> link = JUtils.from(_dtlink_s.class); Object o, k, key = null; int n, minp; //, turn[(sizeof(size_t)*8 - 2)]; Dtcompar_f cmpf; _dtdisc_s disc; if (((dt.getPtr("data").getInt("type")) & 010000) !=0) { dtrestore(dt,null); } disc = (_dtdisc_s) dt.getPtr("disc"); ky = disc.getInt("key"); sz = disc.getInt("size"); lk = disc.getInt("link"); cmpf = (Dtcompar_f) disc.getPtr("comparf"); dt.setInt("type", dt.getInt("type")&~0100000); root = (_dtlink_s) dt.getPtr("data").getPtr("here"); if(N(obj)) { if(N(root) || N(type&(0000100|0000200|0000400)) ) return null; if((type&0000100)!=0) /* delete all objects */ { throw new UnsupportedOperationException(); // if(disc->freef || disc->link < 0) // { do // { while((t = root->hl._left) ) // (((root)->hl._left = (t)->right, (t)->right = (root)), (root) = (t)); // t = root->right; // if(disc->freef) // (*disc->freef)(dt,(lk < 0 ? ((Dthold_t*)(root))->obj : (void*)((char*)(root) - lk) ),disc); // if(disc->link < 0) // (*dt->memoryf)(dt,(void*)root,0,disc); // } while((root = t) ); // } // dt->data->size = 0; // dt->data->here = ((Dtlink_t*)0); // return ((void*)0); } else /* computing largest/smallest element */ { if((type&0000400)!=0) { while((t = (_dtlink_s) root.getPtr("right"))!=null ) { root.setPtr("right", t.getPtr("hl._left")); t.setPtr("hl._left", root); root = t; } } else /* type&DT_FIRST */ { while((t = (_dtlink_s) root.getPtr("hl._left"))!=null ) { root.setPtr("hl._left", t.getPtr("right")); t.setPtr("right", root); root = t; } } dt.getPtr("data").setPtr("here", root); return (lk < 0 ? root.castTo(_dthold_s.class).getPtr("obj") : root.addVirtualBytes(-lk) ); } } /* note that link.right is LEFT tree and link.left is RIGHT tree */ l = r = link.amp(); /* allow apps to delete an object "actually" in the dictionary */ try { if(dt.getPtr("meth").getInt("type") == 0000010 && ((type&(0000002|0010000))!=0) ) { throw new UnsupportedOperationException(); // { key = (void*)(sz < 0 ? *((char**)((char*)(obj)+ky)) : ((char*)(obj)+ky)); // for(o = (*(((Dt_t*)(dt))->searchf))((dt),(void*)(obj),0000004); o; o = (*(((Dt_t*)(dt))->searchf))((dt),(void*)(o),0000010) ) // { k = (void*)(sz < 0 ? *((char**)((char*)(o)+ky)) : ((char*)(o)+ky)); // if((cmpf ? (*cmpf)(dt,key,k,disc) : (sz <= 0 ? strcmp(key,k) : memcmp(key,k,sz)) ) != 0) // break; // if(o == obj) // { root = dt->data->here; // l->right = root->hl._left; // r->hl._left = root->right; // goto dt_delete; // } // } } try { if(((type&(0001000|0000004|0000001|0004000))!=0)) { key = ((type&0001000)!=0) ? obj : (sz < 0 ? ((__ptr__)obj).addVirtualBytes(ky) : ((__ptr__)obj).addVirtualBytes(ky)); if(root!=null) throw new do_search(); } else if((type&0000040)!=0) { throw new UnsupportedOperationException(); // { me = (Dtlink_t*)obj; // obj = (lk < 0 ? ((Dthold_t*)(me))->obj : (void*)((char*)(me) - lk) ); // key = (void*)(sz < 0 ? *((char**)((char*)(obj)+ky)) : ((char*)(obj)+ky)); // if(root) // goto do_search; } else if(root!=null && (lk < 0 ? (root.castTo(_dthold_s.class).getPtr("obj")!=null): NEQ(root.addVirtualBytes(-lk), obj))) { key = (sz < 0 ? ((__ptr__)obj).addVirtualBytes(ky) : ((__ptr__)obj).addVirtualBytes(ky)); throw new do_search(); } } catch (do_search do_search) { // do_search: if(dt.getPtr("meth").getInt("type") == 0000004 && (minp = dt.getPtr("data").getInt("minp")) != 0 && (type&(0001000|0000004))!=0) { /* simple search, note that minp should be even */ // for(t = root, n = 0; n < minp; ++n) // { k = (lk < 0 ? ((Dthold_t*)(t))->obj : (void*)((char*)(t) - lk) ); k = (void*)(sz < 0 ? *((char**)((char*)(k)+ky)) : ((char*)(k)+ky)); // if((cmp = (cmpf ? (*cmpf)(dt,key,k,disc) : (sz <= 0 ? strcmp(key,k) : memcmp(key,k,sz)) )) == 0) // return (lk < 0 ? ((Dthold_t*)(t))->obj : (void*)((char*)(t) - lk) ); // else // { turn[n] = cmp; // if(!(t = cmp < 0 ? t->hl._left : t->right) ) // return ((void*)0); // } // } // /* exceed search length, top-down splay now */ // for(n = 0; n < minp; n += 2) // { if(turn[n] < 0) // { t = root->hl._left; // if(turn[n+1] < 0) // { ((root)->hl._left = (t)->right, (t)->right = (root)); // ((r) = (r)->hl._left = (t) ); // root = t->hl._left; // } // else // { ((l) = (l)->right = (t) ); // ((r) = (r)->hl._left = (root) ); // root = t->right; // } // } // else // { t = root->right; // if(turn[n+1] > 0) // { ((root)->right = (t)->hl._left, (t)->hl._left = (root)); // ((l) = (l)->right = (t) ); // root = t->right; // } // else // { ((r) = (r)->hl._left = (t) ); // ((l) = (l)->right = (root) ); // root = t->hl._left; // } // } // } throw new UnsupportedOperationException("do_search1"); } while(true) { k = lk < 0 ? root.castTo(_dthold_s.class).getPtr("obj") : root.addVirtualBytes(-lk); k = sz < 0 ? ((__ptr__)k).addVirtualBytes(ky) : ((__ptr__)k).addVirtualBytes(ky); if((cmp = (cmpf!=null ? (Integer)((CFunction)cmpf).exe(dt,key,k,disc) : (sz <= 0 ? strcmp((CString)key,(CString)k) : UNSUPPORTED_INT("memcmp(key,k,sz))") ))) == 0) break; else if(cmp < 0) { if((t = (_dtlink_s) root.getPtr("hl._left"))!=null ) { k = lk < 0 ? t.castTo(_dthold_s.class).getPtr("obj") : t.addVirtualBytes(-lk); k = sz < 0 ? ((__ptr__)k).addVirtualBytes(ky) : ((__ptr__)k).addVirtualBytes(ky); if((cmp = (cmpf!=null ? (Integer)((CFunction)cmpf).exe(dt,key,k,disc) : (sz <= 0 ? strcmp((CString)key,(CString)k) : UNSUPPORTED_INT("memcmp(key,k,sz))") ))) < 0) { root.setPtr("hl._left", t.getPtr("right")); t.setPtr("right", root); r.setPtr("hl._left", t); r = t; if(N(root = (_dtlink_s) t.getPtr("hl._left")) ) break; } else if(cmp == 0) { r.setPtr("hl._left", root); r = root; root = t; break; } else /* if(cmp > 0) */ { l.setPtr("right", t); l = t; r.setPtr("hl._left", root); r = root; if(N(root = (_dtlink_s) t.getPtr("right")) ) break; } } else { r.setPtr("hl._left", root); r = root; root = null; break; } } else /* if(cmp > 0) */ { if ((t = (_dtlink_s) root.getPtr("right"))!=null ) { k = (lk < 0 ? t.castTo(_dthold_s.class).getPtr("obj") : t.addVirtualBytes(-lk) ); k = sz < 0 ? ((__ptr__)k).addVirtualBytes(ky) : ((__ptr__)k).addVirtualBytes(ky); if((cmp = (cmpf!=null ? (Integer)((CFunction)cmpf).exe(dt,key,k,disc) : (sz <= 0 ? strcmp((CString)key,(CString)k) : UNSUPPORTED_INT("memcmp(key,k,sz))") ))) > 0) { root.setPtr("right", t.getPtr("hl._left")); t.setPtr("hl._left", root); l.setPtr("right", t); l = t; if(N(root = (_dtlink_s) t.getPtr("right") )) break; } else if(cmp == 0) { l.setPtr("right", root); l = root; root = t; break; } else /* if(cmp < 0) */ { r.setPtr("hl._left", t); r = t; l.setPtr("right", root); l = root; if(N(root = (_dtlink_s) t.getPtr("hl._left") )) break; } } else { l.setPtr("right", root); l = root; root = null; break; } } } } if(root!=null) { /* found it, now isolate it */ dt.setInt("type", dt.getInt("type") | 0100000); l.setPtr("right", root.getPtr("hl._left")); r.setPtr("hl._left", root.getPtr("right")); if((type&(0000004|0001000))!=0) { /*has_root:*/ throw new has_root(); } else if((type&0000010)!=0) { root.setPtr("hl._left", link.getPtr("right")); root.setPtr("right", null); link.setPtr("right", root); //dt_next: if((root = (_dtlink_s) link.getPtr("hl._left"))!=null ) { while((t = (_dtlink_s) root.getPtr("hl._left"))!=null ) { root.setPtr("hl._left", t.getPtr("right")); t.setPtr("right", root); root = t; } link.setPtr("hl._left", root.getPtr("right")); throw new has_root(); } else throw new no_root(); } else if((type&0000020)!=0) { throw new UnsupportedOperationException(); // { root->right = link.hl._left; // root->hl._left = ((Dtlink_t*)0); // link.hl._left = root; // dt_prev: // if((root = link.right) ) // { while((t = root->right) ) // (((root)->right = (t)->hl._left, (t)->hl._left = (root)), (root) = (t)); // link.right = root->hl._left; // goto has_root; // } // else goto no_root; } else if((type&(0000002|0010000))!=0) { throw new UnsupportedOperationException(); // { /* taking an object out of the dictionary */ // dt_delete: // obj = (lk < 0 ? ((Dthold_t*)(root))->obj : (void*)((char*)(root) - lk) ); // if(disc->freef && (type&0000002)) // (*disc->freef)(dt,obj,disc); // if(disc->link < 0) // (*dt->memoryf)(dt,(void*)root,0,disc); // if((dt->data->size -= 1) < 0) // dt->data->size = -1; // goto no_root; } else if((type&(0000001|0004000))!=0) { if((dt.getPtr("meth").getInt("type")&0000004)!=0) throw new has_root(); else throw new UnsupportedOperationException(); // { root->hl._left = ((Dtlink_t*)0); // root->right = link.hl._left; // link.hl._left = root; // goto dt_insert; // } } else if((type&0000040)!=0) /* a duplicate */ { throw new UnsupportedOperationException(); // { if(dt->meth->type&0000004) // { if(disc->freef) // (*disc->freef)(dt,obj,disc); // if(disc->link < 0) // (*dt->memoryf)(dt,(void*)me,0,disc); // } // else // { me->hl._left = ((Dtlink_t*)0); // me->right = link.hl._left; // link.hl._left = me; // dt->data->size += 1; // } // goto has_root; } } else { /* not found, finish up LEFT and RIGHT trees */ r.setPtr("hl._left", null); l.setPtr("right", null); if((type&0000010)!=0) { //goto dt_next: if((root = (_dtlink_s) link.getPtr("hl._left"))!=null ) { while((t = (_dtlink_s) root.getPtr("hl._left"))!=null ) { root.setPtr("hl._left", t.getPtr("right")); t.setPtr("right", root); root = t; } link.setPtr("hl._left", root.getPtr("right")); throw new has_root(); } else throw new no_root(); } else if((type&0000020)!=0) throw new UnsupportedOperationException("goto dt_prev"); else if((type&(0000004|0001000))!=0) { throw new no_root(); } else if((type&(0000001|0004000))!=0) { /*dt_insert:*/ if(disc.getPtr("makef")!=null && (type&0000001)!=0) obj = (__ptr__) disc.call("makef", dt,obj,disc); if(obj!=null) { if(lk >= 0) root = (_dtlink_s) ((__ptr__)obj.addVirtualBytes(lk)).castTo(_dtlink_s.class); else { root = (_dtlink_s)(dt.call("memoryf", dt,null,sizeof(_dthold_s.class),disc)); if(root!=null) root.castTo(_dthold_s.class).setPtr("obj", obj); else if(disc.getPtr("makef")!=null && disc.getPtr("freef")!=null && ((type&0000001))!=0) UNSUPPORTED("(*disc->freef)(dt,obj,disc);"); } } if(root!=null) { if(dt.getPtr("data").getInt("size") >= 0) dt.getPtr("data").setInt("size", dt.getPtr("data").getInt("size")+1 ); throw new has_root(); } else throw new UnsupportedOperationException("goto no_root"); } else if((type&0000040)!=0) { root = me; dt.getPtr("data").setInt("size", dt.getPtr("data").getInt("size")+1 ); throw new UnsupportedOperationException("goto has_root"); } else /*if(type&DT_DELETE)*/ { obj = null; throw new UnsupportedOperationException("goto no_root"); } // throw new UnsupportedOperationException(); } // return ((void*)0); } catch (has_root has_root) { root = (_dtlink_s) root.castTo(_dtlink_s.class); root.setPtr("hl._left", link.getPtr("right")); root.setPtr("right", link.getPtr("hl._left")); if((dt.getPtr("meth").getInt("type")&0000010)!=0 && (type&(0000004|0001000))!=0 ) { //key = (lk < 0 ? ((Dthold_t*)(root))->obj : (void*)((char*)(root) - lk) ); key = (void*)(sz < 0 ? *((char**)((char*)(key)+ky)) : ((char*)(key)+ky)); throw new UnsupportedOperationException(); // while((t = root->hl._left) ) // { /* find max of left subtree */ // while((r = t->right) ) // (((t)->right = (r)->hl._left, (r)->hl._left = (t)), (t) = (r)); // root->hl._left = t; // /* now see if it's in the same group */ // k = (lk < 0 ? ((Dthold_t*)(t))->obj : (void*)((char*)(t) - lk) ); k = (void*)(sz < 0 ? *((char**)((char*)(k)+ky)) : ((char*)(k)+ky)); // if((cmpf ? (*cmpf)(dt,key,k,disc) : (sz <= 0 ? strcmp(key,k) : memcmp(key,k,sz)) ) != 0) // break; // (((root)->hl._left = (t)->right, (t)->right = (root)), (root) = (t)); // } } dt.getPtr("data").setPtr("here", root); return (lk < 0 ? root.castTo(_dthold_s.class).getPtr("obj") : root.addVirtualBytes(-lk)); } catch (no_root no_root) { while((t = (_dtlink_s) r.getPtr("hl._left"))!=null) r = t; r.setPtr("hl._left", link.getPtr("right")); dt.getPtr("data").setPtr("here", link.getPtr("hl._left")); return (type&0000002)!=0 ? obj : null; } throw new UnsupportedOperationException(); } finally { LEAVING("abqfzg1d1vkzk51225tcdlik5","dttree"); } } //1 9g22bw0wprm2n836sva9a545j // static Dtmethod_t _Dtoset = //1 6lntjtw57dbb52lukeu9qbjm0 // static Dtmethod_t _Dtobag = //1 23jnfpje5fw0aejl101d0mofi // Dtmethod_t* Dtoset = &_Dtoset //1 b8q5rjkvf93u0f27esfu3h9ay // Dtmethod_t* Dtobag = &_Dtobag //1 5kf1n1yhdy9ojgc0mc3pyowaz // Dtmethod_t _Dttree = /*public static final __struct__<_dtmethod_s> _Dttree = JUtils.from(_dtmethod_s.class); static { _Dttree.setPtr("searchf", function(dttree__c.class, "dttree")); _Dttree.setInt("type", 0000004); }*/ //1 bvfgwxg0ik8j0au3xhv5ear7h // Dtmethod_t* Dtorder = &_Dttree //1 avyrqfvu00yyj95dihtoiwmao // Dtmethod_t* Dttree = &_Dttree //public static _dtmethod_s Dttree = _Dttree.amp(); } plantuml-1.2017.15/src/gen/lib/cdt/dttreeset__c.java000066400000000000000000000127311312650303100220510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static smetana.core.Macro.UNSUPPORTED; public class dttreeset__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 wsyenh3pav82eqg8t6irqmpa // static Dtlink_t* treebalance(Dtlink_t* list, int size) public static Object treebalance(Object... arg) { UNSUPPORTED("9upl561wy34u2kgottk3knhw7"); // static Dtlink_t* treebalance(Dtlink_t* list, int size) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e3svy3s8lap0wa9dpy4q3ppie"); // int n; UNSUPPORTED("4euymk8i174zc1zk143wb5qlq"); // Dtlink_t *l, *mid; UNSUPPORTED("8hf6osd37j483sgahmda5xn1j"); // if(size <= 2) UNSUPPORTED("4fl66qhxrdfm7i88fvwjalk6v"); // return list; UNSUPPORTED("7cjc57w4211pyb7xn4u5mv2p3"); // for(l = list, n = size/2 - 1; n > 0; n -= 1) UNSUPPORTED("dcdhqqjy6kk46tsxs923vyy6k"); // l = l->right; UNSUPPORTED("y7f7c2k7x27uc6ph132zknhi"); // mid = l->right; l->right = ((Dtlink_t*)0); UNSUPPORTED("6z99uyzu8i3gvzeo5lrxnw4vo"); // mid->hl._left = treebalance(list, (n = size/2) ); UNSUPPORTED("7pvd4214bcxozaimgklaq3qif"); // mid->right = treebalance(mid->right, size - (n + 1)); UNSUPPORTED("7zdak9tmoe5cam875dr3zz3wn"); // return mid; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7iha6xdoo376u861k6wv8c5pr // int dttreeset(Dt_t* dt, int minp, int balance) public static Object dttreeset(Object... arg) { UNSUPPORTED("3t7ugtrfg37d90rb22ee962hg"); // int dttreeset(Dt_t* dt, int minp, int balance) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dtghok0zzu4g8fnpx91sx0xav"); // int size; UNSUPPORTED("4mt1ak6xs18a3xe6dccf6hf3m"); // if(dt->meth->type != 0000004) UNSUPPORTED("b0epxudfxjm8kichhaautm2qi"); // return -1; UNSUPPORTED("e1eh9pmpa4fopxse0olzgtcum"); // size = dtsize(dt); UNSUPPORTED("aafwg5rqya20bgn3vhz3t2iqb"); // if(minp < 0) UNSUPPORTED("9ox4x4zosos0jeacd6v18u8ak"); // { for(minp = 0; minp < (sizeof(size_t)*8 - 2); ++minp) UNSUPPORTED("4a30x5e8menohy668n1iozj52"); // if((1 << minp) >= size) UNSUPPORTED("1dhrv6aj5eq8ntuvb7qbs8aot"); // break; UNSUPPORTED("7v4oowgea39cogwcgkt7np8iv"); // if(minp <= (sizeof(size_t)*8 - 2)-4) /* use log(size) + 4 */ UNSUPPORTED("aahg7tgohnhh704ric6b2h83i"); // minp += 4; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("80ideyp40y4dgch5lhho631ig"); // if((dt->data->minp = minp + (minp%2)) > (sizeof(size_t)*8 - 2)) UNSUPPORTED("c19ehve53a2rtc95cfpgwc2ua"); // dt->data->minp = (sizeof(size_t)*8 - 2); UNSUPPORTED("s52ssf9x1ga1f1e63jhd0caj"); // if(balance) UNSUPPORTED("3nozetyxtt4d04pcxdwbatake"); // dt->data->here = treebalance(dtflatten(dt), size); UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cdt/dtview__c.java000066400000000000000000000211431312650303100213450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static gen.lib.cdt.dtrestore__c.dtrestore; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.function; import static smetana.core.JUtils.strcmp; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import static smetana.core.Macro.UNSUPPORTED_INT; import h.Dtcompar_f; import h._dt_s; import smetana.core.CFunction; import smetana.core.CString; import smetana.core.__ptr__; public class dtview__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 6spidg45w8teb64726drdswaa // static void* dtvsearch(Dt_t* dt, register void* obj, register int type) public static __ptr__ dtvsearch(_dt_s dt, __ptr__ obj, int type) { ENTERING("6spidg45w8teb64726drdswaa","dtvsearch"); try { _dt_s d, p; __ptr__ o=null, n, ok, nk; int cmp, lk, sz, ky; Dtcompar_f cmpf; /* these operations only happen at the top level */ if ((type&(0000001|0000002|0000100|0000040))!=0) return (__ptr__) dt.getPtr("meth").call("searchf", dt, obj, type); if(((type&(0001000|0000004))!=0) || /* order sets first/last done below */ (((type&(0000200|0000400))!=0) && N(dt.getPtr("meth").getInt("type")&(0000010|0000004)) ) ) { for(d = dt; d!=null; d = (_dt_s) d.getPtr("view")) if((o = (__ptr__) d.getPtr("meth").call("searchf", d,obj,type))!=null ) break; dt.setPtr("walk", d); return o; } if((dt.getPtr("meth").getInt("type") & (0000010|0000004) )!=0) { if(N(type & (0000200|0000400|0000010|0000020)) ) return null; n = nk = null; p = null; for(d = dt; d!=null; d = (_dt_s) d.getPtr("view")) { if(N(o = (__ptr__) d.getPtr("meth").call("searchf", d, obj, type) )) continue; ky = d.getPtr("disc").getInt("key"); sz = d.getPtr("disc").getInt("size"); lk = d.getPtr("disc").getInt("link"); cmpf = (Dtcompar_f) d.getPtr("disc").getPtr("comparf"); ok = (__ptr__) (sz < 0 ? ((__ptr__)o).addVirtualBytes(ky) : ((__ptr__)o).addVirtualBytes(ky)); if(n!=null) /* get the right one among all dictionaries */ { cmp = (cmpf!=null ? (Integer)((CFunction)cmpf).exe(d,ok,nk,d.getPtr("disc")) : (sz <= 0 ? strcmp((CString)ok,(CString)nk) : UNSUPPORTED_INT("memcmp(ok,nk,sz)")) ); if(((type & (0000010|0000200))!=0 && cmp < 0) || ((type & (0000020|0000400))!=0 && cmp > 0) ) UNSUPPORTED("5o3u9aaanyd9yh74sjfkkofmo"); // goto a_dj; } else /* looks good for now */ { a_dj: p = d; n = o; nk = ok; } } dt.setPtr("walk", p); return n; } /* non-ordered methods */ UNSUPPORTED("36qdhpbcwst6tc1gvwcyvg91u"); // if(!(type & (0000010|0000020)) ) UNSUPPORTED("5p6q7ip4om6y4nrsjz07ua456"); // return ((void*)0); UNSUPPORTED("bx84jj9durkqzcrq4l9h1b0za"); // if(!dt->walk || obj != (dt->walk->disc->link < 0 ? ((Dthold_t*)(dt->walk->data->here))->obj : (void*)((char*)(dt->walk->data->here) - dt->walk->disc->link) ) ) UNSUPPORTED("eh58afn12udc5q8yzr25advls"); // { for(d = dt; d; d = d->view) UNSUPPORTED("de5yx4s0nsbgshd9seabcy2g9"); // if((o = (*(d->meth->searchf))(d, obj, 0000004)) ) UNSUPPORTED("1dhrv6aj5eq8ntuvb7qbs8aot"); // break; UNSUPPORTED("66mzv36wy2mflr2u2a5pwa2vg"); // dt->walk = d; UNSUPPORTED("d4pllgr7b2ohssrhtxxtd1fbb"); // if(!(obj = o) ) UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6he3c07r1xjfepuku37yav920"); // for(d = dt->walk, obj = (*d->meth->searchf)(d, obj, type);; ) UNSUPPORTED("d7hiatjof3gfyx3ab27oq4d74"); // { while(obj) /* keep moving until finding an uncovered object */ UNSUPPORTED("44tdztkynd140cqbaafbbxvqn"); // { for(p = dt; ; p = p->view) UNSUPPORTED("72t51pabtpfsnn4qrcjvd6gkb"); // { if(p == d) /* adjacent object is uncovered */ UNSUPPORTED("4an2jpd7xs9lm1jlfrbualsrv"); // return obj; UNSUPPORTED("bndt77eukkw8dnhl8sce4ts3d"); // if((*(p->meth->searchf))(p, obj, 0000004) ) UNSUPPORTED("6ioth986rfbv208dp59shjy15"); // break; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("5bx9ax8tembk4pweu41m5yw43"); // obj = (*d->meth->searchf)(d, obj, type); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3diupilxwbi5nroolxiy7e8b0"); // if(!(d = dt->walk = d->view) ) /* move on to next dictionary */ UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0); UNSUPPORTED("esje2igec9cwwteta36lbrdvc"); // else if(type&0000010) UNSUPPORTED("aeh2pn8gp2xj4lehv52n4hp6b"); // obj = (*(d->meth->searchf))(d,((void*)0),0000200); UNSUPPORTED("1lfqka4p8e7w15b16wquy0vjx"); // else obj = (*(d->meth->searchf))(d,((void*)0),0000400); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("6spidg45w8teb64726drdswaa","dtvsearch"); } } //3 dfryioch2xz35w8nq6lxbk5kh // Dt_t* dtview(register Dt_t* dt, register Dt_t* view) public static _dt_s dtview(_dt_s dt, _dt_s view) { ENTERING("dfryioch2xz35w8nq6lxbk5kh","dtview"); try { _dt_s d; if ((dt.getPtr("data").getInt("type")&010000)!=0) dtrestore(dt,null); if(view!=null) { if ((view.getPtr("data").getInt("type")&010000)!=0) dtrestore(view,null); if(NEQ(view.getPtr("meth"), dt.getPtr("meth"))) /* must use the same method */ UNSUPPORTED("return null;"); } /* make sure there won't be a cycle */ for(d = view; d!=null; d = (_dt_s)d.getPtr("view")) if(EQ(d, dt)) return null; /* no more viewing lower dictionary */ if((d = (_dt_s)dt.getPtr("view"))!=null ) d.setInt("nview", d.getInt("nview")-1); dt.setPtr("walk", null); dt.setPtr("view", null); if(N(view)) { dt.setPtr("searchf", dt.getPtr("meth").getPtr("searchf")); return d; } /* ok */ dt.setPtr("view", view); dt.setPtr("searchf", function(dtview__c.class, "dtvsearch")); view.setInt("nview", view.getInt("nview")+1 ); return view; } finally { LEAVING("dfryioch2xz35w8nq6lxbk5kh","dtview"); } } } plantuml-1.2017.15/src/gen/lib/cdt/dtwalk__c.java000066400000000000000000000102101312650303100213220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cdt; import static smetana.core.Macro.UNSUPPORTED; public class dtwalk__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 8kcykvee64o5kutyoj5s6zlcd // int dtwalk(register Dt_t* dt, int (*userf)(Dt_t*, void*, void*), void* data) public static Object dtwalk(Object... arg) { UNSUPPORTED("b9srn3cj7cbdmgpkg7efd84gy"); // int dtwalk(register Dt_t* dt, int (*userf)(Dt_t*, void*, void*), void* data) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c1mo2va6tje36x5zdz4skrhr3"); // register void *obj, *next; UNSUPPORTED("38agwqn7uf7ph0hgh9rs1zj6o"); // register Dt_t* walk; UNSUPPORTED("f1idx4dy7rsiossb8rzdg9ytc"); // register int rv; UNSUPPORTED("5uhtyadbiw0no45jeogtdm8j1"); // for(obj = (*(((Dt_t*)(dt))->searchf))((dt),(void*)(0),0000200); obj; ) UNSUPPORTED("1yvxoworxpkhllf50ue62yykm"); // { if(!(walk = dt->walk) ) UNSUPPORTED("286hyyd6m1nj8sr0io04dorkh"); // walk = dt; UNSUPPORTED("e5vmvi9xteysydic3lz65s9ma"); // next = (*(((Dt_t*)(dt))->searchf))((dt),(void*)(obj),0000010); UNSUPPORTED("2wrbbpzkv9yaatkgjr87xt1z0"); // if((rv = (*userf)(walk, obj, data )) < 0) UNSUPPORTED("9loxyjy5zd52164vd43hrbwd2"); // return rv; UNSUPPORTED("c1ws7w4pwcfmyhsj7v1nsaiam"); // obj = next; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/000077500000000000000000000000001312650303100172305ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/lib/cgraph/agerror__c.java000066400000000000000000000343311312650303100222010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static smetana.core.Macro.UNSUPPORTED; public class agerror__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //1 461g755qnm9wvxv8jui6a24t // static agerrlevel_t agerrno //1 e5usqd9mv6o7qtqhzn1ooq8f7 // static agerrlevel_t agerrlevel = AGWARN //1 65wyo1e2rqlpvn8cmykslgkdk // static int agmaxerr //1 cyxwkk5enwxhnbcphn28qfacp // static long aglast //1 5rorjmu2xqe7cz2swf6rpoim7 // static FILE *agerrout //1 bh4ymcg6wung4rp51y2goh1d4 // static agusererrf usererrf //3 4629q3lk91auv6a511v0x4vlz // agusererrf agseterrf (agusererrf newf) public static Object agseterrf(Object... arg) { UNSUPPORTED("8jzbxfdt0lvxx1g5lts7oux6h"); // agusererrf UNSUPPORTED("7ncs6gpd4ul7ye0ebi5sdte6g"); // agseterrf (agusererrf newf) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e1odaj7t2d733eovc749xtxoz"); // agusererrf oldf = usererrf; UNSUPPORTED("c1j7e26jj1cw14qzyy94k59pg"); // usererrf = newf; UNSUPPORTED("3ecn7hsti915o9tbvklji7c1a"); // return oldf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e5jdgza2l5zc0kupfteq5aukb // agerrlevel_t agseterr(agerrlevel_t lvl) public static Object agseterr(Object... arg) { UNSUPPORTED("1jwdh9fku47yepwmadw9neu42"); // agerrlevel_t agseterr(agerrlevel_t lvl) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8wc85fvp4ue7rkh584kznlnga"); // agerrlevel_t oldv = agerrlevel; UNSUPPORTED("76wyk73unc469eyq5uv58o9r5"); // agerrlevel = lvl; UNSUPPORTED("bzei33ohmcbm4iyavn26ua9io"); // return oldv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 603i8wgwc04zi1eda5oxbfu3t // char *aglasterr() public static Object aglasterr(Object... arg) { UNSUPPORTED("7sb3l26vza0sr80wy19whq07s"); // char *aglasterr() UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4kj8gevgj79zghoenj66c47jd"); // long endpos; UNSUPPORTED("3k6eefo2ppnicc6mmsp8y2wtd"); // long len; UNSUPPORTED("6ik3p99apk5rihypipg0uxu8i"); // char *buf; UNSUPPORTED("5hxnce09gegtlijkrkjld0w6i"); // if (!agerrout) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("6rc2guy7n7l2kfuv44bitbkr9"); // fflush(agerrout); UNSUPPORTED("8nylts7ocqt9195btb9qnb915"); // endpos = ftell(agerrout); UNSUPPORTED("5i545onvth9wso94ub314pe4o"); // len = endpos - aglast; UNSUPPORTED("50nts7uovqys70g293t0b5amj"); // buf = (char*)malloc(len + 1); UNSUPPORTED("5tkqcw5p1pfzida9gmkbjsc5g"); // fseek(agerrout, aglast, SEEK_SET); UNSUPPORTED("474haq9m7a4n7kqe7paej6qbi"); // fread(buf, sizeof(char), len, agerrout); UNSUPPORTED("3w01p3l63zt07scumxz12foyc"); // buf[len] = '\0'; UNSUPPORTED("7ik9s8s97py1jire6mujjn05a"); // fseek(agerrout, endpos, SEEK_SET); UNSUPPORTED("5jfpogdyby101eyuw2dhtb5cg"); // return buf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8nu6iilhr8fc6ltddy6ukbeav // static void userout (agerrlevel_t level, const char *fmt, va_list args) public static Object userout(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("a92ywlsdaen90yka53m479wkl"); // userout (agerrlevel_t level, const char *fmt, va_list args) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("xo6m9cruoz5kdd6mzt4sfknp"); // static char* buf; UNSUPPORTED("bptaq1iwtcs1mly3uja15t0j1"); // static int bufsz = 1024; UNSUPPORTED("d3z5r251dmhlyub2gj2x1w46q"); // char* np; UNSUPPORTED("5jiiwgyq1pv7khw5ygfo33wmr"); // int n; UNSUPPORTED("cjyiejw67ffjjsk60tgeebvif"); // if (!buf) { UNSUPPORTED("40oxx4fb70iotl4q5l9cft8qb"); // buf = (char*)malloc(bufsz); UNSUPPORTED("1qmkdostw44gpi19vfg7p7n4j"); // if (!buf) { UNSUPPORTED("91m823gnagh03x83drfk3mo8m"); // fputs("userout: could not allocate memory\n", stderr ); UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6t1zqtkodps5c0ip5z9m4ys5c"); // if (level != AGPREV) { UNSUPPORTED("986dz74hfht24rg9hgakv8o54"); // usererrf ((level == AGERR) ? "Error" : "Warning"); UNSUPPORTED("auhftu1jph1rzzhrtj7f3pnou"); // usererrf (": "); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5ya9apu1bgpt462vp1v11qhyg"); // while (1) { UNSUPPORTED("4ybihr3u2ey4klcf9a6u65435"); // n = vsnprintf(buf, bufsz, fmt, args); UNSUPPORTED("qqfwwqxfm9i6sfc0lugd66nf"); // if ((n > -1) && (n < bufsz)) { UNSUPPORTED("4tqvj0fhss0ek9tp1adme5vk9"); // usererrf (buf); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dnk7v6jvu1uasfcyydkzf1jz2"); // bufsz = ((bufsz*2)>(n+1)?(bufsz*2):(n+1)); UNSUPPORTED("bbchby3jmfv3jbe401wrjuxzt"); // if ((np = (char*)realloc(buf, bufsz)) == NULL) { UNSUPPORTED("91m823gnagh03x83drfk3mo8m"); // fputs("userout: could not allocate memory\n", stderr ); UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("46b127jugogkjrjxb2n977bmx"); // va_end(args); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bg9mt0ayklk7lbw3v07dtfigf // static int agerr_va(agerrlevel_t level, const char *fmt, va_list args) public static Object agerr_va(Object... arg) { UNSUPPORTED("863t2xdlf52lqifpg4efkawgu"); // static int agerr_va(agerrlevel_t level, const char *fmt, va_list args) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eyawtts92lihkxvbr369hkd5y"); // agerrlevel_t lvl; UNSUPPORTED("6lzzzfyhdb5tirbg1ccf9a5m3"); // /* Use previous error level if continuation message; UNSUPPORTED("czykt0ac8rrwoqsh6nt389fu3"); // * Convert AGMAX to AGERROR; UNSUPPORTED("4f8vlc80ixgxk5xc2y425pevt"); // * else use input level UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("9u6tfrdzyinkomy2qh16oj4d2"); // lvl = (level == AGPREV ? agerrno : (level == AGMAX) ? AGERR : level); UNSUPPORTED("ah9u8brmn3qarkrtj9yx70p41"); // /* store this error level */ UNSUPPORTED("9e0amfta5xoupadiuupa6cuk7"); // agerrno = lvl; UNSUPPORTED("bwyv65veemjr0y9un4vygtwxb"); // agmaxerr = ((agmaxerr)>(agerrno)?(agmaxerr):(agerrno)); UNSUPPORTED("8s6ysspbpufy37chp503snd3k"); // /* We report all messages whose level is bigger than the user set agerrlevel UNSUPPORTED("4e7jp3qf7pzapc314u0v666ze"); // * Setting agerrlevel to AGMAX turns off immediate error reporting. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("588lzo1simvq8koio5n8dzesh"); // if (lvl >= agerrlevel) { UNSUPPORTED("d201l1bxazbzd0nlukhvkxtcs"); // if (usererrf) UNSUPPORTED("3go4zq0x8ul8ywoga0jkifagx"); // userout (level, fmt, args); UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("19tsxpp6yrcfw8o24jbkr1vi2"); // if (level != AGPREV) UNSUPPORTED("bl903wgo0kk135i25d7zw09r6"); // fprintf(stderr, "%s: ", (level == AGERR) ? "Error" : "Warning"); UNSUPPORTED("6ua1mju1v7qfokep4q7orohn"); // vfprintf(stderr, fmt, args); UNSUPPORTED("8egqb590juz3lqxaevjssja42"); // va_end(args); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("alerbgdhkd2yzpj6s9lljgxfs"); // if (!agerrout) { UNSUPPORTED("ekzfh0kvyswlemi42n42ohs2g"); // agerrout = tmpfile(); UNSUPPORTED("5zhg56z3tqisbs9qbue0mopri"); // if (!agerrout) UNSUPPORTED("btmwubugs9vkexo4yb7a5nqel"); // return 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5ceb5u5voh8555yqssrjmx6gr"); // if (level != AGPREV) UNSUPPORTED("a0zpkl87k498gutehuvchd3nh"); // aglast = ftell(agerrout); UNSUPPORTED("85nv28rgbwdyknpacqqgv44mo"); // vfprintf(agerrout, fmt, args); UNSUPPORTED("46b127jugogkjrjxb2n977bmx"); // va_end(args); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 f1dcuhccwam2p309jxc9b2r0t // int agerr(agerrlevel_t level, const char *fmt, ...) public static Object agerr(Object... arg) { UNSUPPORTED("ducszxizpq2a6cql4p9bb47a0"); // int agerr(agerrlevel_t level, const char *fmt, ...) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e0w8vmmpk3wfxblsmz0uoazgs"); // va_list args; UNSUPPORTED("4k15snpcm2gg90dw68lllbtzl"); // va_start(args, fmt); UNSUPPORTED("13n0ghn77wo5crn8kvxkrhzbu"); // return agerr_va(level, fmt, args); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7e34h9jajkjs3ho44gntjj2j7 // void agerrorf(const char *fmt, ...) public static Object agerrorf(Object... arg) { UNSUPPORTED("6x8x6k3hp05ros0ch1hlv6581"); // void agerrorf(const char *fmt, ...) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e0w8vmmpk3wfxblsmz0uoazgs"); // va_list args; UNSUPPORTED("4k15snpcm2gg90dw68lllbtzl"); // va_start(args, fmt); UNSUPPORTED("30oktqf2os0275j4d3su6q4l"); // agerr_va(AGERR, fmt, args); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 gpzdsjhtcu403ei3vn2ux3bm // void agwarningf(const char *fmt, ...) public static Object agwarningf(Object... arg) { UNSUPPORTED("715xbkxnriyga0q1ic2xuml6n"); // void agwarningf(const char *fmt, ...) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e0w8vmmpk3wfxblsmz0uoazgs"); // va_list args; UNSUPPORTED("4k15snpcm2gg90dw68lllbtzl"); // va_start(args, fmt); UNSUPPORTED("dc1ifhst6g6drubm0t70yjtv"); // agerr_va(AGWARN, fmt, args); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6by0h6d4uor86q4dcd9xjw31m // int agerrors() public static Object agerrors(Object... arg) { UNSUPPORTED("92pi4jdtb8fnjjy0lzzbtg1so"); // int agerrors() { return agmaxerr; } throw new UnsupportedOperationException(); } //3 aj45yt9ph7b1gdx6hqrt0zr2s // int agreseterrors() public static Object agreseterrors(Object... arg) { UNSUPPORTED("dw5u39aul656iwk9wm0luqblz"); // int agreseterrors() UNSUPPORTED("yo7buicdiu29rv5vxhas0v3s"); // { UNSUPPORTED("48ud8ypoh34wmhdfdct9ihz28"); // int rc = agmaxerr; UNSUPPORTED("8qk2j9d2ppvfm7m5c7elh2hv1"); // agmaxerr = 0; UNSUPPORTED("3jqypku7gzo7r35oqqr8iwfss"); // return rc; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/agxbuf__c.java000066400000000000000000000163101312650303100220110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static smetana.core.Macro.UNSUPPORTED; public class agxbuf__c { //3 688cb39nv214oqldmhd8roirz // void agxbinit(agxbuf * xb, unsigned int hint, unsigned char *init) public static Object agxbinit(Object... arg) { UNSUPPORTED("4l5fskgdbcbqssdclb6lwckwe"); // void agxbinit(agxbuf * xb, unsigned int hint, unsigned char *init) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3ctz7esjgupftv01eshc2dhx2"); // if (init) { UNSUPPORTED("7ccqm4ipez0mmdk6bv50shi8z"); // xb->buf = init; UNSUPPORTED("bgb2e1tveztx6w0nuo6t6kxbd"); // xb->dyna = 0; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("49jhfm9yw3megswomc4gzzgd7"); // if (hint == 0) UNSUPPORTED("5h1ggxg5ypn75rue18vgizp12"); // hint = BUFSIZ; UNSUPPORTED("bwuph2kus95n04yy45ff0ygwg"); // xb->dyna = 1; UNSUPPORTED("rowpmdm8bmtos5w0uxjinsts"); // xb->buf = (unsigned char*)malloc((hint)*sizeof(unsigned char)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1vqjbr0qaxnp1tks2ilwqgn3g"); // xb->eptr = xb->buf + hint; UNSUPPORTED("dtbxbzhkw05lut0ozk9a49lw6"); // xb->ptr = xb->buf; UNSUPPORTED("5ymin98xo0ermvpyhsuo8xwim"); // *xb->ptr = '\0'; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 lu77u8ojbx0os3eapudi7k0e // int agxbmore(agxbuf * xb, unsigned int ssz) public static Object agxbmore(Object... arg) { UNSUPPORTED("1zbuuoy42nrbwgmz0kzwxatml"); // int agxbmore(agxbuf * xb, unsigned int ssz) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ayzlme0ebe3j87lpz076cg2vq"); // int cnt; /* current no. of characters in buffer */ UNSUPPORTED("71r9w1f25l9h79jodjer7my8a"); // int size; /* current buffer size */ UNSUPPORTED("2bckq0rejaf94iovglem6hqko"); // int nsize; /* new buffer size */ UNSUPPORTED("dmokvf86b5kj3srnwwbr7ebmc"); // unsigned char *nbuf; /* new buffer */ UNSUPPORTED("347vqdgen21gpinnet4lkk7gk"); // size = xb->eptr - xb->buf; UNSUPPORTED("49rolm7orqt4aw3uud529g4qc"); // nsize = 2 * size; UNSUPPORTED("svb97awsbpziy0qhoaq68u7b"); // if (size + (int)ssz > nsize) UNSUPPORTED("7ykdy1xuvrmibubukfxhfmz91"); // nsize = size + ssz; UNSUPPORTED("bfinudkdiev8mwo6udbayoaex"); // cnt = xb->ptr - xb->buf; UNSUPPORTED("4cmq49lu7qhmui59rl36qd6fr"); // if (xb->dyna) { UNSUPPORTED("8vf8arbygb0610hkc403uiror"); // nbuf = realloc(xb->buf, nsize); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("3sajbfvh0ecfy6mdfwrwrojl6"); // nbuf = (unsigned char*)malloc((nsize)*sizeof(unsigned char)); UNSUPPORTED("do1ts7n0vopj00hs85yw95qjx"); // memcpy(nbuf, xb->buf, cnt); UNSUPPORTED("bwuph2kus95n04yy45ff0ygwg"); // xb->dyna = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5a5gutjqda6fhdylt7vi64g71"); // xb->buf = nbuf; UNSUPPORTED("dodqzfdb41641741187lm9aci"); // xb->ptr = xb->buf + cnt; UNSUPPORTED("e45cf41wsuzfjfi2my7jn7odp"); // xb->eptr = xb->buf + nsize; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7q04bdt3el30gta4bdtl0cr8s // int agxbput_n(agxbuf * xb, const char *s, unsigned int ssz) public static Object agxbput_n(Object... arg) { UNSUPPORTED("xj5zv8tlevqufi7kllkj6uu1"); // int agxbput_n(agxbuf * xb, const char *s, unsigned int ssz) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6q0wy2t9qi11079j0wyuhsmiw"); // if (xb->ptr + ssz > xb->eptr) UNSUPPORTED("82p9dlopf5tuzmyy5454sv4mm"); // agxbmore(xb, ssz); UNSUPPORTED("9tvk5ztcu9lg2u40sfmevitl2"); // memcpy(xb->ptr, s, ssz); UNSUPPORTED("2wy6om6o92zevnnevl5v0pr0c"); // xb->ptr += ssz; UNSUPPORTED("dzondrrxi2pe7xy72r0jstd20"); // return ssz; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 12y895mwxr60srt40guuma6j5 // int agxbput(agxbuf * xb, const char *s) public static Object agxbput(Object... arg) { UNSUPPORTED("3oqw629wj8yulgtvwwlxn8iyi"); // int agxbput(agxbuf * xb, const char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dmstj6pqesin7a4ufrtut65t5"); // unsigned int ssz = strlen(s); UNSUPPORTED("7i8gvckml5cbfmuhw2pjs8czl"); // return agxbput_n(xb, s, ssz); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2zlar00xk0a2nnqcmjb587kvc // void agxbfree(agxbuf * xb) public static Object agxbfree(Object... arg) { UNSUPPORTED("3zwjoplc2wp6x7lb2b5g59pl8"); // void agxbfree(agxbuf * xb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("da8gv3dgf6bnks54n9mnlgzxk"); // if (xb->dyna) UNSUPPORTED("62irfu7vrq2ewolixn0ksp5f6"); // free(xb->buf); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cn9iiltxtts5ijjpixwt2uziu // int agxbpop(agxbuf * xb) public static Object agxbpop(Object... arg) { UNSUPPORTED("1hje4ns6ul7cj52y9n9wlgkkc"); // int agxbpop(agxbuf * xb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c; UNSUPPORTED("a6gx1f2k9r1jreuxvg1n7jpiw"); // if (xb->ptr > xb->buf) { UNSUPPORTED("asuii09e2jl1px5timbisq3sx"); // c = *xb->ptr--; UNSUPPORTED("7q6l09k0u87z31e0nmv2lwr94"); // return c; UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/apply__c.java000066400000000000000000000200401312650303100216550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static gen.lib.cgraph.subg__c.agfstsubg; import static gen.lib.cgraph.subg__c.agnxtsubg; import static smetana.core.JUtils.function; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGINEDGE; import static smetana.core.Macro.AGNODE; import static smetana.core.Macro.AGOUTEDGE; import static smetana.core.Macro.AGRAPH; import static smetana.core.Macro.AGTYPE; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import h.Agobj_s; import h.Agraph_s; import smetana.core.CFunction; import smetana.core.__ptr__; public class apply__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //3 dups4iqoegzha9tq6pupoim08 // static Agobj_t *subnode_search(Agraph_t * sub, Agobj_t * n) public static Object subnode_search(Object... arg) { UNSUPPORTED("pxacbw8fd49n7yuf74ww3m4o"); // static Agobj_t *subnode_search(Agraph_t * sub, Agobj_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5h609thtbczs8d02vo4tkt5av"); // if (agraphof(n) == sub) UNSUPPORTED("bp96fem54xcxrw16cmnlpell9"); // return n; UNSUPPORTED("bdb4i0co0gl0r87nhwlfqsbah"); // return (Agobj_t *) agsubnode(sub, (Agnode_t *) n, (0)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1qi7zit7howdl3n270k4whbgh // static Agobj_t *subedge_search(Agraph_t * sub, Agobj_t * e) public static Object subedge_search(Object... arg) { UNSUPPORTED("4hoc59s32d3n083o2rhe085zx"); // static Agobj_t *subedge_search(Agraph_t * sub, Agobj_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3y411cm763tnv8mvrigf8pg8y"); // if (agraphof(e) == sub) UNSUPPORTED("8ihpc010r3nccyfagedpc4nlv"); // return e; UNSUPPORTED("bha9r1zngfg6nmzgqmku0ji52"); // return (Agobj_t *) agsubedge(sub, (Agedge_t *) e, (0)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 95y4aknoddh42lieikrb72vxw // static Agobj_t *subgraph_search(Agraph_t * sub, Agobj_t * g) public static Agobj_s subgraph_search(Agraph_s sub, Agobj_s g) { ENTERING("95y4aknoddh42lieikrb72vxw","subgraph_search"); try { return (Agobj_s) sub.castTo(Agobj_s.class); } finally { LEAVING("95y4aknoddh42lieikrb72vxw","subgraph_search"); } } //3 8s9l15wqucf1glmbeb6fmya8e // static void rec_apply(Agraph_t * g, Agobj_t * obj, agobjfn_t fn, void *arg, agobjsearchfn_t objsearch, int preorder) public static void rec_apply(Agraph_s g, Agobj_s obj, CFunction fn, __ptr__ arg, CFunction objsearch, boolean preorder) { ENTERING("8s9l15wqucf1glmbeb6fmya8e","rec_apply"); try { Agraph_s sub; Agobj_s subobj; if (preorder) fn.exe(g, obj, arg); for (sub = agfstsubg(g); sub!=null; sub = agnxtsubg(sub)) { if ((subobj = (Agobj_s) objsearch.exe(sub, obj))!=null) rec_apply(sub, subobj, fn, arg, objsearch, preorder); } if (N(preorder)) fn.exe(g, obj, arg); } finally { LEAVING("8s9l15wqucf1glmbeb6fmya8e","rec_apply"); } } //3 9hqql178zpl8iudlf6sgnv7aj // int agapply(Agraph_t * g, Agobj_t * obj, agobjfn_t fn, void *arg, int preorder) public static int agapply(Agraph_s g, Agobj_s obj, CFunction fn, __ptr__ arg, boolean preorder) { ENTERING("9hqql178zpl8iudlf6sgnv7aj","agapply"); try { Agobj_s subobj; CFunction objsearch=null; switch (AGTYPE(obj)) { case AGRAPH: objsearch = function(apply__c.class, "subgraph_search"); break; case AGNODE: UNSUPPORTED("arkoj4niyfqe213zut6szzeji"); // objsearch = subnode_search; break; case AGOUTEDGE: case AGINEDGE: UNSUPPORTED("3h8kzrrsobdp839772gupdrbf"); // objsearch = subedge_search; break; default: UNSUPPORTED("2pc67byzirrkhe1cmdoguh6i1"); // agerr(AGERR, "agapply: unknown object type %d\n", AGTYPE(obj)); UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; break; } if ((subobj = (Agobj_s) objsearch.exe(g, obj))!=null) { rec_apply(g, subobj, fn, arg, objsearch, preorder); return 0; } else UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("9hqql178zpl8iudlf6sgnv7aj","agapply"); } } } plantuml-1.2017.15/src/gen/lib/cgraph/attr__c.java000066400000000000000000000776041312650303100215240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static gen.lib.cdt.dtsize__c.dtsize_; import static gen.lib.cdt.dtview__c.dtview; import static gen.lib.cgraph.apply__c.agapply; import static gen.lib.cgraph.edge__c.agfstout; import static gen.lib.cgraph.edge__c.agnxtout; import static gen.lib.cgraph.graph__c.agopen; import static gen.lib.cgraph.mem__c.agalloc; import static gen.lib.cgraph.node__c.agfstnode; import static gen.lib.cgraph.node__c.agnxtnode; import static gen.lib.cgraph.obj__c.agmethod_upd; import static gen.lib.cgraph.obj__c.agraphof; import static gen.lib.cgraph.obj__c.agroot; import static gen.lib.cgraph.rec__c.agbindrec; import static gen.lib.cgraph.rec__c.aggetrec; import static gen.lib.cgraph.refstr__c.agstrdup; import static gen.lib.cgraph.refstr__c.agstrfree; import static gen.lib.cgraph.subg__c.agparent; import static gen.lib.cgraph.utils__c.agdtopen; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.function; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGEDGE; import static smetana.core.Macro.AGINEDGE; import static smetana.core.Macro.AGNODE; import static smetana.core.Macro.AGOUTEDGE; import static smetana.core.Macro.AGRAPH; import static smetana.core.Macro.AGTYPE; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import h.Agattr_s; import h.Agdatadict_s; import h.Agedge_s; import h.Agnode_s; import h.Agobj_s; import h.Agraph_s; import h.Agrec_s; import h.Agsym_s; import h.ST_Agdesc_s; import h.ST_Agtag_s; import h._dt_s; import h._dtdisc_s; import smetana.core.CString; import smetana.core.Memory; import smetana.core.Z; import smetana.core.__ptr__; public class attr__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //1 cwbgwzo8cprw4eobs3iji59dp // Dtdisc_t AgDataDictDisc = /*static public final __struct__<_dtdisc_s> AgDataDictDisc = JUtils.from(_dtdisc_s.class); static { AgDataDictDisc.setInt("key", OFFSET.create(Agsym_s.class, "name").toInt()); AgDataDictDisc.setInt("size", -1); AgDataDictDisc.setInt("link", OFFSET.create(Agsym_s.class, "link").toInt()); AgDataDictDisc.setPtr("makef", null); AgDataDictDisc.setPtr("freef", function(attr__c.class, "freesym")); AgDataDictDisc.setPtr("comparf", null); AgDataDictDisc.setPtr("hashf", null); }*/ //1 67blfrj9x850g8ccpo9qjer2 // static char DataDictName[] = public final static CString DataDictName = new CString("_AG_datadict"); //1 1qn6s7dwoq08ugdjnmsvdgj6u // static Agdesc_t ProtoDesc = /*static final public __struct__ ProtoDesc = JUtils.from(Agdesc_s.class); static { ProtoDesc.setInt("directed", 1); ProtoDesc.setInt("strict", 0); ProtoDesc.setInt("no_loop", 1); ProtoDesc.setInt("maingraph", 0); ProtoDesc.setInt("flatlock", 1); ProtoDesc.setInt("no_write", 1); }*/ //1 30ftenxl879wmnziizunr5vt1 // static Agraph_t *ProtoGraph //static public Agraph_s ProtoGraph; //3 4bm10isw1qq1eqcse8afbxee3 // Agdatadict_t *agdatadict(Agraph_t * g, int cflag) public static Agdatadict_s agdatadict(Agraph_s g, boolean cflag) { ENTERING("4bm10isw1qq1eqcse8afbxee3","agdatadict"); try { Agdatadict_s rv; rv = (Agdatadict_s) aggetrec(g, DataDictName, false).castTo(Agdatadict_s.class); if (rv!=null || N(cflag)) return rv; init_all_attrs(g); rv = (Agdatadict_s) aggetrec(g, DataDictName, false).castTo(Agdatadict_s.class); return rv; } finally { LEAVING("4bm10isw1qq1eqcse8afbxee3","agdatadict"); } } //3 2b2cg0am9e1lwc0nqikl2wczb // Dict_t *agdictof(Agraph_t * g, int kind) public static _dt_s agdictof(Agraph_s g, int kind) { ENTERING("2b2cg0am9e1lwc0nqikl2wczb","agdictof"); try { Agdatadict_s dd; _dt_s dict; dd = agdatadict(g, false); if (dd!=null) switch (kind) { case AGRAPH: dict = (_dt_s) dd.getPtr("dict.g"); break; case AGNODE: dict = (_dt_s) dd.getPtr("dict.n"); break; case AGINEDGE: case AGOUTEDGE: dict = (_dt_s) dd.getPtr("dict.e"); break; default: System.err.println("agdictof: unknown kind "+ kind); dict = null; throw new UnsupportedOperationException(); } else dict = null; return dict; } finally { LEAVING("2b2cg0am9e1lwc0nqikl2wczb","agdictof"); } } //3 dbhw2q2jfsz9qwawchy0hxj4i // Agsym_t *agnewsym(Agraph_t * g, char *name, char *value, int id, int kind) public static Agsym_s agnewsym(Agraph_s g, CString name, CString value, int id, int kind) { ENTERING("dbhw2q2jfsz9qwawchy0hxj4i","agnewsym"); try { Agsym_s sym; sym = (Agsym_s) agalloc(g, sizeof(Agsym_s.class)); sym.setInt("kind", kind); sym.setPtr("name", agstrdup(g, name)); sym.setPtr("defval", agstrdup(g, value)); sym.setInt("id", id); return sym; } finally { LEAVING("dbhw2q2jfsz9qwawchy0hxj4i","agnewsym"); } } //3 5s4tpjeh3jwf722izjq6cm6rq // static void agcopydict(Dict_t * src, Dict_t * dest, Agraph_t * g, int kind) public static Object agcopydict(Object... arg) { UNSUPPORTED("5x2q9spbx7y0k6l59z6oy8cuc"); // static void agcopydict(Dict_t * src, Dict_t * dest, Agraph_t * g, int kind) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1y11aotql5lts9njnreyq9t6r"); // Agsym_t *sym, *newsym; UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("5wsq1ipnwwy8yumrluztmye7f"); // for (sym = (Agsym_t *) (*(((Dt_t*)(src))->searchf))((src),(void*)(0),0000200); sym; UNSUPPORTED("aqq7o7hh4nwqvvtcdqetmidkg"); // sym = (Agsym_t *) (*(((Dt_t*)(src))->searchf))((src),(void*)(sym),0000010)) { UNSUPPORTED("2astc0oxlvew45mitrflnx0ar"); // newsym = agnewsym(g, sym->name, sym->defval, sym->id, kind); UNSUPPORTED("36os9hvg0e59rrhe68di2b5r3"); // newsym->print = sym->print; UNSUPPORTED("77sre49xpjwlyjqhek659u3tq"); // newsym->fixed = sym->fixed; UNSUPPORTED("3rc58hrkem2xey59d9ptss1sx"); // (*(((Dt_t*)(dest))->searchf))((dest),(void*)(newsym),0000001); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 alb1d5x6huba3q44ms1wt0rr5 // static Agdatadict_t *agmakedatadict(Agraph_t * g) public static Agdatadict_s agmakedatadict(Agraph_s g) { ENTERING("alb1d5x6huba3q44ms1wt0rr5","agmakedatadict"); try { Agraph_s par; Agdatadict_s parent_dd, dd; dd = (Agdatadict_s) agbindrec(g, DataDictName, sizeof(Agdatadict_s.class), false).castTo(Agdatadict_s.class); dd.setPtr("dict.n", agdtopen(g, Z.z().AgDataDictDisc.amp(), Z.z().Dttree)); dd.setPtr("dict.e", agdtopen(g, Z.z().AgDataDictDisc.amp(),Z.z(). Dttree)); dd.setPtr("dict.g", agdtopen(g, Z.z().AgDataDictDisc.amp(), Z.z().Dttree)); if ((par = agparent(g))!=null) { parent_dd = agdatadict(par, false); dtview((_dt_s)dd.getPtr("dict.n"), (_dt_s)parent_dd.getPtr("dict.n")); dtview((_dt_s)dd.getPtr("dict.e"), (_dt_s)parent_dd.getPtr("dict.e")); dtview((_dt_s)dd.getPtr("dict.g"), (_dt_s)parent_dd.getPtr("dict.g")); } else { if (Z.z().ProtoGraph!=null && NEQ(g, Z.z().ProtoGraph)) { /* it's not ok to dtview here for several reasons. the proto graph could change, and the sym indices don't match */ parent_dd = agdatadict(Z.z().ProtoGraph, false); agcopydict(parent_dd.getPtr("dict.n"), dd.getPtr("dict.n"), g, AGNODE); agcopydict(parent_dd.getPtr("dict.e"), dd.getPtr("dict.e"), g, AGEDGE); agcopydict(parent_dd.getPtr("dict.g"), dd.getPtr("dict.g"), g, AGRAPH); } } return dd; } finally { LEAVING("alb1d5x6huba3q44ms1wt0rr5","agmakedatadict"); } } //3 50wfzq5wy8wc7vuyvs3mrx5ct // Agsym_t *agdictsym(Dict_t * dict, char *name) public static Agsym_s agdictsym(_dt_s dict, CString name) { ENTERING("50wfzq5wy8wc7vuyvs3mrx5ct","agdictsym"); try { Agsym_s key = (Agsym_s) Memory.malloc(Agsym_s.class); key.setPtr("name", name); return (Agsym_s) dict.call("searchf", (dict),key,0000004); } finally { LEAVING("50wfzq5wy8wc7vuyvs3mrx5ct","agdictsym"); } } //3 4wy4ggu70d7harhix8xnh5w4l // Agsym_t *aglocaldictsym(Dict_t * dict, char *name) public static Agsym_s aglocaldictsym(_dt_s dict, CString name) { ENTERING("4wy4ggu70d7harhix8xnh5w4l","aglocaldictsym"); try { Agsym_s rv; _dt_s view; view = dtview(dict, null); rv = agdictsym(dict, name); dtview(dict, view); return rv; } finally { LEAVING("4wy4ggu70d7harhix8xnh5w4l","aglocaldictsym"); } } //3 8hy9sl3zmwobwm960jz466ufe // Agsym_t *agattrsym(void *obj, char *name) public static Agsym_s agattrsym(__ptr__ obj, CString name) { ENTERING("8hy9sl3zmwobwm960jz466ufe","agattrsym"); try { Agattr_s data; Agsym_s rv; CString arg = name; data = agattrrec(obj.castTo(Agobj_s.class)); if (data!=null) rv = agdictsym((_dt_s)data.getPtr("dict"), arg); else rv = null; return rv; } finally { LEAVING("8hy9sl3zmwobwm960jz466ufe","agattrsym"); } } //1 covyqfvabl7igx9g5rvlhgngz // char *AgDataRecName = public final static CString AgDataRecName = new CString("_AG_strdata"); //3 6az8xu0sgu1d6abu0xfpd89hi // static int topdictsize(Agobj_t * obj) public static int topdictsize(Agobj_s obj) { ENTERING("6az8xu0sgu1d6abu0xfpd89hi","topdictsize"); try { _dt_s d; d = agdictof(agroot(agraphof(obj)), AGTYPE(obj)); return d!=null ? dtsize_(d) : 0; } finally { LEAVING("6az8xu0sgu1d6abu0xfpd89hi","topdictsize"); } } //3 3wjrlyjdlz8k9nfxenxsfiqmj // static Agrec_t *agmakeattrs(Agraph_t * context, void *obj) public static Agrec_s agmakeattrs(Agraph_s context, __ptr__ obj) { ENTERING("3wjrlyjdlz8k9nfxenxsfiqmj","agmakeattrs"); try { int sz; Agattr_s rec; Agsym_s sym; _dt_s datadict; rec = (Agattr_s) agbindrec(obj, AgDataRecName, sizeof(Agattr_s.class), false).castTo(Agattr_s.class); datadict = agdictof(context, AGTYPE(obj)); if (rec.getPtr("dict") == null) { rec.setPtr("dict", agdictof(agroot(context), AGTYPE(obj))); /* don't malloc(0) */ sz = topdictsize((Agobj_s) obj); if (sz < 4) sz = 4; rec.setPtr("str", agalloc(agraphof(obj), sizeof("char*", sz))); /* doesn't call agxset() so no obj-modified callbacks occur */ for (sym = (Agsym_s) ((__ptr__)datadict.call("searchf", datadict,null,0000200)); sym!=null; sym = (Agsym_s) ((__ptr__)datadict.call("searchf", datadict,sym,0000010))) rec.getArrayOfCString("str").plus(sym.getInt("id")).setCString( agstrdup(agraphof(obj), sym.getCString("defval"))); } else { } return (Agrec_s) rec; } finally { LEAVING("3wjrlyjdlz8k9nfxenxsfiqmj","agmakeattrs"); } } //3 50md6kgbmmjiwsq00tdvtqrom // static void freeattr(Agobj_t * obj, Agattr_t * attr) public static Object freeattr(Object... arg) { UNSUPPORTED("b7w7ts75503jg2pb69wdgviy6"); // static void freeattr(Agobj_t * obj, Agattr_t * attr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("22kc1nt4b0bllq26fmw8ytgp2"); // int i, sz; UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("8pfuk9ua4x9bh68zk1kzwc5t9"); // g = agraphof(obj); UNSUPPORTED("65sc7rva5ncw0awo92jglve6w"); // sz = topdictsize(obj); UNSUPPORTED("cl9683xent4h3vyf21r0ct6a1"); // for (i = 0; i < sz; i++) UNSUPPORTED("4so817anjuwmq6rj2hjrk4wlx"); // agstrfree(g, attr->str[i]); UNSUPPORTED("5t1oinkxblld9xyoaz469i6dz"); // agfree(g, attr->str); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6b3c2syvj23lbf7kz0aal8vmc // static void freesym(Dict_t * d, void * obj, Dtdisc_t * disc) public static void freesym(_dt_s d, Object obj, _dtdisc_s disc) { ENTERING("6b3c2syvj23lbf7kz0aal8vmc","freesym"); try { UNSUPPORTED("bf9av4xbx61835st3og3wfqr8"); // static void freesym(Dict_t * d, void * obj, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("av59ae8c4mws46sf5dumz1k0s"); // Agsym_t *sym; UNSUPPORTED("6z29omss9ay00bqf6xael7t6t"); // (void) d; UNSUPPORTED("3wnut6i7v07q7n0fa538dyp7a"); // sym = (Agsym_t *) obj; UNSUPPORTED("8l8wg6vltx6d7vc9dzqb6n3wi"); // (void) disc; UNSUPPORTED("aka2fcwk9snppcvd59dzewx38"); // agstrfree(Ag_G_global, sym->name); UNSUPPORTED("89enhovojps3wt6zo6s4xqlu7"); // agstrfree(Ag_G_global, sym->defval); UNSUPPORTED("2ttw1xr5hp7fxq8w5bofu7cg9"); // agfree(Ag_G_global, sym); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("6b3c2syvj23lbf7kz0aal8vmc","freesym"); } } //3 13sfx74lme08ur04vkrqta25j // Agattr_t *agattrrec(void *obj) public static Agattr_s agattrrec(__ptr__ obj) { ENTERING("13sfx74lme08ur04vkrqta25j","agattrrec"); try { return (Agattr_s) aggetrec(obj, AgDataRecName, false).castTo(Agattr_s.class); } finally { LEAVING("13sfx74lme08ur04vkrqta25j","agattrrec"); } } //3 2io7b26wq70e7kwdlzsh6bw7f // static void addattr(Agraph_t * g, Agobj_t * obj, Agsym_t * sym) public static void addattr(Agraph_s g, Agobj_s obj, Agsym_s sym) { ENTERING("2io7b26wq70e7kwdlzsh6bw7f","addattr"); try { Agattr_s attr; attr = (Agattr_s) agattrrec(obj); if (sym.getInt("id") >= 4) attr.setPtr("str", (__ptr__) g.getPtr("clos").getPtr("disc").getPtr("mem").call("resize", g.getPtr("clos").getPtr("state").getPtr("mem"), attr.getPtr("str"), sizeof("char*", sym.getInt("id")), sizeof("char*", sym.getInt("id") + 1))); attr.getArrayOfCString("str").plus(sym.getInt("id")).setCString(agstrdup(g, sym.getCString("defval"))); /* agmethod_upd(g,obj,sym); JCE and GN didn't like this. */ } finally { LEAVING("2io7b26wq70e7kwdlzsh6bw7f","addattr"); } } //3 a3qr8ug1rkxp6ocieyp41ly3o // static Agsym_t *setattr(Agraph_t * g, int kind, char *name, char *value) public static Agsym_s setattr(Agraph_s g, int kind, CString name, CString value) { ENTERING("a3qr8ug1rkxp6ocieyp41ly3o","setattr"); try { Agdatadict_s dd; _dt_s ldict, rdict; Agsym_s lsym, psym, rsym, rv; Agraph_s root; Agnode_s n; Agedge_s e; root = agroot(g); dd = agdatadict(g, (N(0))); /* force initialization of string attributes */ ldict = agdictof(g, kind); lsym = aglocaldictsym(ldict, name); if (lsym!=null) { /* update old local definiton */ agstrfree(g, lsym.getCString("defval")); lsym.setPtr("defval", agstrdup(g, value)); rv = lsym; } else { psym = agdictsym(ldict, name); /* search with viewpath up to root */ if (psym!=null) { /* new local definition */ lsym = agnewsym(g, name, value, psym.getInt("id"), kind); ldict.castTo(_dt_s.class).call("searchf",ldict,lsym,0000001); rv = lsym; } else { /* new global definition */ rdict = agdictof(root, kind); rsym = agnewsym(g, name, value, dtsize_(rdict), kind); rdict.castTo(_dt_s.class).call("searchf",rdict,rsym,0000001); switch (kind) { case AGRAPH: agapply(root, (Agobj_s) root.castTo(Agobj_s.class), function(attr__c.class, "addattr"), rsym, (N(0))); break; case AGNODE: for (n = agfstnode(root); n!=null; n = agnxtnode(root, n)) addattr(g, (Agobj_s) n.castTo(Agobj_s.class), rsym); break; case AGINEDGE: case AGOUTEDGE: for (n = agfstnode(root); n!=null; n = agnxtnode(root, n)) for (e = agfstout(root, n); e!=null; e = agnxtout(root, e)) addattr(g, (Agobj_s) e.castTo(Agobj_s.class), rsym); break; } rv = rsym; } } if (rv!=null && (kind == 0)) agxset(g, rv, value); agmethod_upd(g, g, rv); /* JCE and GN wanted this */ return rv; } finally { LEAVING("a3qr8ug1rkxp6ocieyp41ly3o","setattr"); } } //3 8f80aahwb8cqc2t9592v47ttd // static Agsym_t *getattr(Agraph_t * g, int kind, char *name) public static Agsym_s getattr(Agraph_s g, int kind, CString name) { ENTERING("8f80aahwb8cqc2t9592v47ttd","getattr"); try { Agsym_s rv = null; _dt_s dict; dict = agdictof(g, kind); if (dict!=null) rv = agdictsym(dict, name); /* viewpath up to root */ return rv; } finally { LEAVING("8f80aahwb8cqc2t9592v47ttd","getattr"); } } //3 blr3drm2hxuzwd6gpeeb84yyg // Agsym_t *agattr(Agraph_t * g, int kind, char *name, char *value) public static Agsym_s agattr(Agraph_s g, int kind, CString name, CString value) { ENTERING("blr3drm2hxuzwd6gpeeb84yyg","agattr"); try { Agsym_s rv; if (g == null) { if (Z.z().ProtoGraph == null) Z.z().ProtoGraph = agopen(null, Z.z().ProtoDesc.copy(), null); g = Z.z().ProtoGraph; } if (value!=null) rv = setattr(g, kind, name, value); else rv = getattr(g, kind, name); return rv; } finally { LEAVING("blr3drm2hxuzwd6gpeeb84yyg","agattr"); } } //3 9medmidrd61ljmzlswpxwuxjm // Agsym_t *agnxtattr(Agraph_t * g, int kind, Agsym_t * attr) public static Object agnxtattr(Object... arg) { UNSUPPORTED("1nquny99ik5rdqpdzl1efzzw5"); // Agsym_t *agnxtattr(Agraph_t * g, int kind, Agsym_t * attr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("l4y6zpshfefue2m18wlswfkp"); // Dict_t *d; UNSUPPORTED("ekzntpxwtsedcg8uzmlsfbb5h"); // Agsym_t *rv; UNSUPPORTED("786h6jfmnfzp39fkdwa7fzz71"); // if ((d = agdictof(g, kind))) { UNSUPPORTED("4ftgdafqwlor792t6qye23xle"); // if (attr) UNSUPPORTED("ealluogofs9ig6hmoveplut40"); // rv = (Agsym_t *) (*(((Dt_t*)(d))->searchf))((d),(void*)(attr),0000010); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("8yv728l38cvhrasbkgvce3bsb"); // rv = (Agsym_t *) (*(((Dt_t*)(d))->searchf))((d),(void*)(0),0000200); UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("40zoypg37zonwb7nuewxdti29"); // rv = 0; UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ex2qtmuwz0o2e5svkujdbux78 // void agraphattr_init(Agraph_t * g) public static void agraphattr_init(Agraph_s g) { ENTERING("ex2qtmuwz0o2e5svkujdbux78","agraphattr_init"); try { /* Agdatadict_t *dd; */ /* Agrec_t *attr; */ Agraph_s context; ((ST_Agdesc_s)g.getStruct("desc")).has_attrs = 1; /* dd = */ agmakedatadict(g); if (N(context = agparent(g))) context = g; /* attr = */ agmakeattrs(context, g); } finally { LEAVING("ex2qtmuwz0o2e5svkujdbux78","agraphattr_init"); } } //3 ccqww3yvujvy82bw6i1m0rv96 // int agraphattr_delete(Agraph_t * g) public static Object agraphattr_delete(Object... arg) { UNSUPPORTED("4chc6o30l6nehselkvpo4xtao"); // int agraphattr_delete(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eq0gq1d7pmvj94j5nxbexze8p"); // Agdatadict_t *dd; UNSUPPORTED("4e7iq4f4pk0x2v3zvdc2tdbd1"); // Agattr_t *attr; UNSUPPORTED("6qvjz1ziwr3nwocahqvfzw14t"); // Ag_G_global = g; UNSUPPORTED("4t3qv06n62hquaihi33zqc8bi"); // if ((attr = agattrrec(g))) { UNSUPPORTED("31flnlx452d07y9bjvvk0nygk"); // freeattr((Agobj_t *) g, attr); UNSUPPORTED("ag6tzein6gkpxcarnafbxws91"); // agdelrec(g, attr->h.name); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4p9dsuje96h48qnpgn0m02aij"); // if ((dd = agdatadict(g, (0)))) { UNSUPPORTED("6ubrug572yhktadcj02muyr5e"); // if (agdtclose(g, dd->dict.n)) return 1; UNSUPPORTED("3msb0eqyxef8ye31vjnzxbkh6"); // if (agdtclose(g, dd->dict.e)) return 1; UNSUPPORTED("597gu9wfswglr8tbdrbqpr27p"); // if (agdtclose(g, dd->dict.g)) return 1; UNSUPPORTED("dhn07bfi40opq2qmakfkosz77"); // agdelrec(g, dd->h.name); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2pp4ot3pqy71jpfvu3g398y4y // void agnodeattr_init(Agraph_t * g, Agnode_t * n) public static void agnodeattr_init(Agraph_s g, Agnode_s n) { ENTERING("2pp4ot3pqy71jpfvu3g398y4y","agnodeattr_init"); try { Agattr_s data; data = (Agattr_s) agattrrec(n); if ((N(data)) || (N(data.getPtr("dict")))) agmakeattrs(g, n); } finally { LEAVING("2pp4ot3pqy71jpfvu3g398y4y","agnodeattr_init"); } } //3 7fbhjqpb2w17ahde2ie2l22n5 // void agnodeattr_delete(Agnode_t * n) public static Object agnodeattr_delete(Object... arg) { UNSUPPORTED("72jlvkhc0kqxzf6infgwjj96n"); // void agnodeattr_delete(Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cxk0x5bmjhvgv8b1uv960lx4"); // Agattr_t *rec; UNSUPPORTED("96w8m9uhl8904g83fqzl5a0fl"); // if ((rec = agattrrec(n))) { UNSUPPORTED("34er8hi05mpmz6cld4lt2pzyd"); // freeattr((Agobj_t *) n, rec); UNSUPPORTED("3vr5ktefaene3xr7wprole0q4"); // agdelrec(n, AgDataRecName); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ckfzmnxfi0jiiayxmq38giw0r // void agedgeattr_init(Agraph_t * g, Agedge_t * e) public static void agedgeattr_init(Agraph_s g, Agedge_s e) { ENTERING("ckfzmnxfi0jiiayxmq38giw0r","agedgeattr_init"); try { Agattr_s data; data = agattrrec(e); if ((N(data)) || (N(data.getPtr("dict")))) agmakeattrs(g, e); } finally { LEAVING("ckfzmnxfi0jiiayxmq38giw0r","agedgeattr_init"); } } //3 3cm42f5o83187rwf4l7j7ie1k // void agedgeattr_delete(Agedge_t * e) public static Object agedgeattr_delete(Object... arg) { UNSUPPORTED("97nvxy8b8p4rmo31kk1qkusns"); // void agedgeattr_delete(Agedge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cxk0x5bmjhvgv8b1uv960lx4"); // Agattr_t *rec; UNSUPPORTED("5n6u4cfiymhx4a88tj9vpz5z8"); // if ((rec = agattrrec(e))) { UNSUPPORTED("1ct1lua1igkf5stpj1vcd2z0h"); // freeattr((Agobj_t *) e, rec); UNSUPPORTED("67nly1q6jgpe4ozoidte7zl4v"); // agdelrec(e, AgDataRecName); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eydjyhexv5jr6vi7uhk0cgphv // char *agget(void *obj, char *name) public static CString agget(__ptr__ obj, CString name) { ENTERING("eydjyhexv5jr6vi7uhk0cgphv","agget"); try { Agsym_s sym; Agattr_s data; CString rv = null; sym = agattrsym(obj, name); if (sym == null) rv = null; /* note was "", but this provides more info */ else { data = agattrrec(obj.castTo(Agobj_s.class)); rv = data.getArrayOfCString("str").plus(sym.getInt("id")).getCString(); } return rv; } finally { LEAVING("eydjyhexv5jr6vi7uhk0cgphv","agget"); } } //3 9h5oymhfkp6k34zl0fonn10k9 // char *agxget(void *obj, Agsym_t * sym) public static CString agxget(__ptr__ obj, Agsym_s sym) { ENTERING("9h5oymhfkp6k34zl0fonn10k9","agxget"); try { Agattr_s data; CString rv; data = agattrrec(obj.castTo(Agobj_s.class)); rv = data.getArrayOfCString("str").plus(sym.getInt("id")).getCString(); return rv; } finally { LEAVING("9h5oymhfkp6k34zl0fonn10k9","agxget"); } } //3 alc2i3vy4lm57qoc7qn69ppgr // int agset(void *obj, char *name, char *value) public static Object agset(Object... arg) { UNSUPPORTED("dw46ysqbvbb1syq3h2su8khpt"); // int agset(void *obj, char *name, char *value) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("av59ae8c4mws46sf5dumz1k0s"); // Agsym_t *sym; UNSUPPORTED("ecz4e03zumggc8tfymqvirexq"); // int rv; UNSUPPORTED("a5zpawq5lfz2h4k7xzaf5qtcl"); // sym = agattrsym(obj, name); UNSUPPORTED("4htetkykqre1tnc0i1ksxdqmx"); // if (sym == ((Agsym_t*)0)) UNSUPPORTED("71xur63dbv1df4fp5xw1bru2i"); // rv = -1; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("932tqrc73k3hieetx14jtfgk0"); // rv = agxset(obj, sym, value); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4q8xvstvl6fbijhucfd1endxc // int agxset(void *obj, Agsym_t * sym, char *value) public static int agxset(__ptr__ obj, Agsym_s sym, CString value) { ENTERING("4q8xvstvl6fbijhucfd1endxc","agxset"); try { Agraph_s g; Agobj_s hdr; Agattr_s data; Agsym_s lsym; g = agraphof(obj); hdr = (Agobj_s) obj.castTo(Agobj_s.class); data = agattrrec(hdr); agstrfree(g, data.getArrayOfCString("str").plus(sym.getInt("id")).getCString()); data.getArrayOfCString("str").plus(sym.getInt("id")).setCString(agstrdup(g, value)); if (((ST_Agtag_s)hdr.getStruct("tag")).objtype == AGRAPH) { /* also update dict default */ _dt_s dict; dict = (_dt_s) agdatadict(g, false).getPtr("dict.g"); if ((lsym = aglocaldictsym(dict, sym.getCString("name")))!=null) { agstrfree(g, lsym.getCString("defval")); lsym.setPtr("defval", agstrdup(g, value)); } else { lsym = agnewsym(g, sym.getCString("name"), value, sym.getInt("id"), AGTYPE(hdr)); dict.call("searchf", dict, lsym, 0000001); } } agmethod_upd(g, obj, sym); return 0; } finally { LEAVING("4q8xvstvl6fbijhucfd1endxc","agxset"); } } //3 9b7vn95cin8o7mb2f21exh1qr // int agsafeset(void *obj, char *name, char *value, char *def) public static int agsafeset(__ptr__ obj, CString name, CString value, CString def) { ENTERING("9b7vn95cin8o7mb2f21exh1qr","agsafeset"); try { Agsym_s a; a = agattr(agraphof(obj), AGTYPE(obj), name, null); if (N(a)) a = agattr(agraphof(obj), AGTYPE(obj), name, def); return agxset(obj, a, value); } finally { LEAVING("9b7vn95cin8o7mb2f21exh1qr","agsafeset"); } } //3 6gjlgo4s6r0bu7gjazfee6qv8 // static void init_all_attrs(Agraph_t * g) public static Object init_all_attrs(Object... arg) { UNSUPPORTED("bir8xur87cl8inhyrgimkboqq"); // static void init_all_attrs(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2hs0004nnparj6tt7elslt4zj"); // Agraph_t *root; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("bnybowlbrgjx7x160vaxt6eok"); // root = agroot(g); UNSUPPORTED("et7b6czk7vef12o9ct0zlil6b"); // agapply(root, (Agobj_t *) root, (agobjfn_t) agraphattr_init, UNSUPPORTED("a1lzdxitcghqk0l63zsudijhj"); // ((Agdisc_t *)0), (!(0))); UNSUPPORTED("8uyptmsbxy8cnb2yc5e1zjy93"); // for (n = agfstnode(root); n; n = agnxtnode(root, n)) { UNSUPPORTED("149yfxxc7rsqn6goirepjpcf2"); // agnodeattr_init(g, n); UNSUPPORTED("1qcg6rx46tkna823mgf1786us"); // for (e = agfstout(root, n); e; e = agnxtout(root, e)) { UNSUPPORTED("555dsk5o3bvij5uz01q0cs74w"); // agedgeattr_init(g, e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2fmwbgdlz116bdnivfr2gbst7 // int agcopyattr(void *oldobj, void *newobj) public static Object agcopyattr(Object... arg) { UNSUPPORTED("9hxxxad2s159e1mpaqdq32p1j"); // int agcopyattr(void *oldobj, void *newobj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("av59ae8c4mws46sf5dumz1k0s"); // Agsym_t *sym; UNSUPPORTED("e0it3jbt5zhk1nsy4jog99dpu"); // Agsym_t *newsym; UNSUPPORTED("6bpbm2s85uk2e5o6cm49boc4w"); // char* val; UNSUPPORTED("85pgv5dfzc1lewmaoiherq9nf"); // char* nval; UNSUPPORTED("4lyqrf8bj8y0fbafzxuae0xqa"); // int r = 1; UNSUPPORTED("enr7x1oa4c50ne66ts6hvz0dx"); // g = agraphof(oldobj); UNSUPPORTED("6qj4ytcakj7t70xil9hxyy5c9"); // if (AGTYPE(oldobj) != AGTYPE(newobj)) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("5btwvtgpjz0hx5y9ouikwsrc4"); // sym = 0; UNSUPPORTED("886wv340pnju68k6aejj7o3x0"); // while ((sym = agnxtattr(g, AGTYPE(oldobj), sym))) { UNSUPPORTED("cino0o0155s1h3gsr2l2uz7z"); // newsym = agattrsym(newobj, sym->name); UNSUPPORTED("daq5urcl5ihipluxk5sf4ccdx"); // if (!newsym) UNSUPPORTED("btmwubugs9vkexo4yb7a5nqel"); // return 1; UNSUPPORTED("aao8dsiq1evom55a3f4w4rha3"); // val = agxget(oldobj, sym); UNSUPPORTED("a078bakz1z0utl11856f4vk7w"); // r = agxset(newobj, newsym, val); UNSUPPORTED("cpxrqzz637g381bs344b2sj0u"); // /* FIX(?): Each graph has its own string cache, so a whole new refstr is possibly UNSUPPORTED("d41ayxc51x2hyvj9eo15qmgun"); // * allocated. If the original was an html string, make sure the new one is as well. UNSUPPORTED("3kp67yo7cfslm3l0o4e5cdnd8"); // * If cgraph goes to single string table, this can be removed. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("ez0g3o1tj7ommhxsolcr2gsr"); // if (aghtmlstr (val)) { UNSUPPORTED("do57srwwkvwu30y5dd2pr6tkp"); // nval = agxget (newobj, newsym); UNSUPPORTED("9nzu0ckgyrqklwagcbye9wtx9"); // agmarkhtmlstr (nval); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/cmpnd__c.java000066400000000000000000000643351312650303100216500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static smetana.core.Macro.UNSUPPORTED; public class cmpnd__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //1 6sk0fkh49yyiz78kjyeyji8kc // static char Descriptor_id[] = //3 4rwqki94tjjugk2oy6kmp9538 // static save_stack_t *save_stack_of(Agedge_t * e, Agnode_t * node_being_saved) public static Object save_stack_of(Object... arg) { UNSUPPORTED("dwtd4ghruns6yb5wivsktmicy"); // static save_stack_t *save_stack_of(Agedge_t * e, UNSUPPORTED("8r63y462x0ogz32e14ocmtc7z"); // Agnode_t * node_being_saved) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("6ghvyg27wq05jvjsvouudi50c"); // Agcmpedge_t *edgerec; UNSUPPORTED("b1mh0xog6n5vpukibyv7u250j"); // edgerec = UNSUPPORTED("4adx48ujfm4pgwe84r22aveam"); // (Agcmpedge_t *) agbindrec(e, Descriptor_id, sizeof(*edgerec), UNSUPPORTED("68qk8aanfr03birvp6in33tmn"); // (0)); UNSUPPORTED("4wdjl8d0e9alxikx2venvybyt"); // if (node_being_saved == AGHEAD(e)) UNSUPPORTED("5or0zebpgtvozlmal8j2q1ymh"); // i = 0; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("ab64ie0vu9mgaoae2os5qcjjc"); // i = 1; UNSUPPORTED("aa7o5hl19ogzcf6gfenmnp78g"); // return &(edgerec->stack[i]); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bsses08e1nxxzo7v1nz6e5md6 // static void stackpush(save_stack_t * stk, Agnode_t * from, Agnode_t * to) public static Object stackpush(Object... arg) { UNSUPPORTED("lk08htngq4befknew1gfxoa9"); // static void stackpush(save_stack_t * stk, Agnode_t * from, Agnode_t * to) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("vdr4szogxxo3ysb964je8fqr"); // int i, osize, nsize; UNSUPPORTED("w0ejuypc1xk0nguosbcbgjs7"); // osize = (stk->stacksize) * sizeof(stk->mem); UNSUPPORTED("69vqrnfe69qiqljcpvbqzjhrt"); // i = stk->stacksize++; UNSUPPORTED("bp2iadkg384j7lqq7aojwgfdb"); // nsize = (stk->stacksize) * sizeof(stk->mem); UNSUPPORTED("8hkinct5qb2wnkfquvrbe5w5n"); // stk->mem = agrealloc(agraphof(from), stk->mem, osize, nsize); UNSUPPORTED("ede5rkve4x0iqpkclios2jmi6"); // stk->mem[i].from = from; UNSUPPORTED("1273u57z8yxvq24utrwrv8xau"); // stk->mem[i].to = to; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3bdssdhs8qmao1r28n4x05wla // static save_e_t stacktop(save_stack_t * stk) public static Object stacktop(Object... arg) { UNSUPPORTED("3oi8j1tra0jhtoedy30z1dceg"); // static save_e_t stacktop(save_stack_t * stk) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ceexozbsr12777awy1hzvd6ye"); // save_e_t rv; UNSUPPORTED("4i89irm9nu2qq9e5my0oyqw92"); // if (stk->stacksize > 0) UNSUPPORTED("muntii5uysvchbl8serzwm6q"); // rv = stk->mem[stk->stacksize - 1]; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("7iqu564wmk0151evpn81bi4al"); // rv.from = rv.to = ((Agnode_t*)0); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 egn9apfhc7c3wd684jp5des9n // static save_e_t stackpop(save_stack_t * stk) public static Object stackpop(Object... arg) { UNSUPPORTED("6bswtdhkkqef505cf56ngupax"); // static save_e_t stackpop(save_stack_t * stk) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ceexozbsr12777awy1hzvd6ye"); // save_e_t rv; UNSUPPORTED("dq2r0ep189x1fmzlkrupwz7su"); // rv = stacktop(stk); UNSUPPORTED("4i89irm9nu2qq9e5my0oyqw92"); // if (stk->stacksize > 0) UNSUPPORTED("a754migqjxf0orir9je0hpzru"); // stk->stacksize--; UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 19fmhewiyatxc021gdknul20f // static void splice(Agobj_t * obj, void *arg) public static Object splice(Object... arg) { UNSUPPORTED("7wcsyoha9usni3nl1ai3tc3o7"); // static void splice(Agobj_t * obj, void *arg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("ukg32u37iiyg1hjpo3dju9dq"); // Agedge_t *e, *opp; UNSUPPORTED("dlkppm92zbj77gjcpefjxfgd8"); // Agnode_t *target, *t, *h; UNSUPPORTED("eub815wyz9gy5rrouxzf2o1g1"); // Agedge_t **dict_of_del, **dict_of_ins, **dict_of_relabel; UNSUPPORTED("4dutqsf49i6w169yrt0ikwdso"); // Agsplice_arg_t *spl; UNSUPPORTED("8g1zmagr94kv2f6q5qxprrtqf"); // e = (Agedge_t *) obj; UNSUPPORTED("dmucqaij4o1u2fxfg43y5j4ow"); // g = agraphof(e); UNSUPPORTED("5webprz21nzifr3m5zwnqxx6m"); // t = AGTAIL(e); UNSUPPORTED("ax8363bkxphvbre4n21ewb568"); // h = AGHEAD(e); UNSUPPORTED("884w4fs279f033u4kxa8xious"); // opp = AGOPP(e); UNSUPPORTED("bpxhfa46ntshzd0vqkqeoby5s"); // spl = arg; UNSUPPORTED("6m7avwuqg2ht4f1aihu7uemex"); // target = spl->target; UNSUPPORTED("2hpfw7zzxdd4qgijc1r9yjv1j"); // /* set e to variant side, opp to invariant */ UNSUPPORTED("5kqugw221oxim0s4luf2bbx60"); // if ((e->node == h) != spl->head_side) { UNSUPPORTED("8ulbtgatav4cex07ca2vunsq7"); // Agedge_t *t = e; UNSUPPORTED("5z8q89g66clummdq5apxn1lhf"); // e = opp; UNSUPPORTED("aj4xhgtcpcpsmtrs5shi25qly"); // opp = t; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dck6ar35hgorgugfjnx6bdi4h"); // if (spl->head_side) { UNSUPPORTED("7n0bzvgpc2xrp8zucytk2ub8z"); // dict_of_relabel = &(t->out); UNSUPPORTED("exrixiraze7t936j9gozi1i6"); // dict_of_del = &(h->in); UNSUPPORTED("cs1b4s5rzgvma08gnlw4kyi8a"); // dict_of_ins = &(target->in); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("9e37n1vt84uzrvxns8gkkpjrk"); // dict_of_relabel = &(h->in); UNSUPPORTED("dni9pi1ymdj2dx3kpudxdvex7"); // dict_of_del = &(t->out); UNSUPPORTED("3gw0vo5ns6u7r6c78h5i3fz8k"); // dict_of_ins = &(target->out); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("37tcvzpvyyi059h8kb294u1pw"); // agdeledgeimage(g, dict_of_del, opp); UNSUPPORTED("sbztl4163kwplex2051tj6kv"); // agdeledgeimage(g, dict_of_relabel, e); UNSUPPORTED("du0ylmc796qj4u7fpfcs9h29b"); // e->node = target; UNSUPPORTED("9frvpqh10msxmvvwlkkmplmnb"); // aginsedgeimage(g, dict_of_ins, opp); UNSUPPORTED("dqp4p3m2uqtll7k5qy0xfc5sn"); // aginsedgeimage(g, dict_of_relabel, e); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5j5g1wthbifddy3p9spuns8yr // int agsplice(Agedge_t * e, Agnode_t * target) public static Object agsplice(Object... arg) { UNSUPPORTED("axfzz9idalyza2vcuc3lxpm6"); // int agsplice(Agedge_t * e, Agnode_t * target) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4ybt6tm56tubmbuve8lp6rxhh"); // Agnode_t *t, *h; UNSUPPORTED("bdxq0k3myan9ze5fn881cmpd1"); // Agraph_t *g, *root; UNSUPPORTED("bil8jirl3ujy07bddvn7fu2tj"); // Agsplice_arg_t splice_arg; UNSUPPORTED("7tj8suoel784v4amwdbw5vgo0"); // if ((e == ((Agedge_t*)0)) || (e->node == target)) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("dmucqaij4o1u2fxfg43y5j4ow"); // g = agraphof(e); UNSUPPORTED("5webprz21nzifr3m5zwnqxx6m"); // t = AGTAIL(e); UNSUPPORTED("ax8363bkxphvbre4n21ewb568"); // h = AGHEAD(e); UNSUPPORTED("dki2ntsgjodo47i5gijolwk9l"); // splice_arg.head_side = (e->node == h); UNSUPPORTED("5c8hd46y7z4m71nncma6imi91"); // splice_arg.target = target; UNSUPPORTED("bnybowlbrgjx7x160vaxt6eok"); // root = agroot(g); UNSUPPORTED("dezciasi2v303hk1sw0x8sdgu"); // agapply(root, (Agobj_t *) e, splice, &splice_arg, (!(0))); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1tlq3bzvd3l8vgfzqblufnrbl // Agnode_t *agcmpnode(Agraph_t * g, char *name) public static Object agcmpnode(Object... arg) { UNSUPPORTED("512bqm8afn34qet92ucsr48py"); // Agnode_t *agcmpnode(Agraph_t * g, char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("c3tourf5k7groqyh71yjd5xec"); // Agraph_t *subg; UNSUPPORTED("65blkwcubnuk73fdazfmejbit"); // n = agnode(g, name, (!(0))); UNSUPPORTED("9tklhmm0c204xvppkor6fa27j"); // subg = agsubg(g, name); UNSUPPORTED("3f30xv09zuxursa8mirbicrop"); // if (n && g && agassociate(n, subg)) UNSUPPORTED("bp96fem54xcxrw16cmnlpell9"); // return n; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("afujljwagn2n2w7aqkq94dyud"); // return ((Agnode_t*)0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 55kt0ymvf8xwytjl27ldl9w47 // int agassociate(Agnode_t * n, Agraph_t * sub) public static Object agassociate(Object... arg) { UNSUPPORTED("4sypdgvq8ag9maceg6t7ybgh2"); // int agassociate(Agnode_t * n, Agraph_t * sub) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7f909qn3eh0n5jhwbdss7xsl7"); // Agcmpnode_t *noderec; UNSUPPORTED("7jdwhjw5hagvavcg0s7mzyvtw"); // Agcmpgraph_t *graphrec; UNSUPPORTED("a2s3hoak57qxwo7p26uwtl6tw"); // if (agsubnode(sub, n, (0))) UNSUPPORTED("5ul223252n4s0i9q8gmv7sqkr"); // return -1; /* avoid cycles */ UNSUPPORTED("2n0hbg501gaoso2zqjoe2w7m1"); // noderec = agbindrec(n, Descriptor_id, sizeof(*noderec), (0)); UNSUPPORTED("28wqx7jtqdh2nga91wmk9v4pp"); // graphrec = agbindrec(sub, Descriptor_id, sizeof(*graphrec), (0)); UNSUPPORTED("yhgoyzhuwjezwcawsm4ky6zq"); // if (noderec->subg || graphrec->node) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("5m09ilomtgcifokk2saj5p7n6"); // noderec->subg = sub; UNSUPPORTED("284nqmn0r6jg3l13sp1j66tdn"); // graphrec->node = n; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b07pin7xj9eofda53ydvki64l // static void delete_outside_subg(Agraph_t * g, Agnode_t * node, Agraph_t * subg) public static Object delete_outside_subg(Object... arg) { UNSUPPORTED("kry3yfo20dytuxfnf38kcsam"); // static void delete_outside_subg(Agraph_t * g, Agnode_t * node, UNSUPPORTED("5y3h6zj5vt2f7wcth5pip26cj"); // Agraph_t * subg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6g19oav62phxzmj2to9fq3v1x"); // Agraph_t *s, **subglist; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("7jdwhjw5hagvavcg0s7mzyvtw"); // Agcmpgraph_t *graphrec; UNSUPPORTED("l4y6zpshfefue2m18wlswfkp"); // Dict_t *d; UNSUPPORTED("7e89xw954lv4akbipty68ohbe"); // if ((g != subg) && (n = agsubnode(g, (Agnode_t *) node, (0)))) { UNSUPPORTED("1rogfljh6p2ad5nst1eypwpyi"); // (*(((Dt_t*)(g->n_dict))->searchf))((g->n_dict),(void*)(n),0000002); UNSUPPORTED("abe30iy9w3d0dl2w6a5lsop8v"); // graphrec = agbindrec(g, Descriptor_id, sizeof(*graphrec), (0)); UNSUPPORTED("f2oroo8l1jg4844ju7u0qqrvl"); // if ((d = graphrec->hidden_node_set) == ((Dict_t *)0)) { UNSUPPORTED("exx0k792od5v3lta50a7cc7ex"); // /* use name disc. to permit search for hidden node by name */ UNSUPPORTED("evqbx12s6gejd2x4ot3qp9mom"); // d = graphrec->hidden_node_set UNSUPPORTED("6sphuxp1saeruucoielhncdwi"); // = agdtopen(g, &Ag_node_name_disc, Dttree); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dc351e9qkjba5ljcn70ir8wok"); // (*(((Dt_t*)(d))->searchf))((d),(void*)(n),0000001); UNSUPPORTED("b6earq4vdf6hkqbiof5ld8o0f"); // subglist = agsubglist(g); UNSUPPORTED("1z7syfzy448v3csnwess0czr6"); // while ((s = *subglist++)) UNSUPPORTED("nec2jxb9w7x6umx24yslrcmt"); // delete_outside_subg(s, node, subg); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ayp78uwr34sz0qhg1h8t95kwv // int aghide(Agnode_t * cmpnode) public static Object aghide(Object... arg) { UNSUPPORTED("1g3pfblqoo1dgglsxstj9742s"); // int aghide(Agnode_t * cmpnode) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7f909qn3eh0n5jhwbdss7xsl7"); // Agcmpnode_t *noderec; UNSUPPORTED("b60qtrkk2j4xw71fl5cofd2cf"); // Agraph_t *g, *subg, *root; UNSUPPORTED("emedv9iv9jzdkfi9un2n7u1qd"); // Agnode_t *n, *nn, *rootn; UNSUPPORTED("52m1c5blj9go84x3gvfinhsxk"); // Agedge_t *e, *opp, *f; UNSUPPORTED("ckh341j07p4zctbd8z88pmxjs"); // g = agraphof(cmpnode); UNSUPPORTED("6gex4hni6g4u0xtyjv48g3qo"); // /* skip operation if node is not compound, or hidden */ UNSUPPORTED("ase6k94o0exmeya2beg8xxyrd"); // if (agcmpgraph_of(cmpnode) == ((Agraph_t*)0)) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("1ngod2ph1meu972df8l6bc2b"); // noderec = (Agcmpnode_t *) aggetrec(cmpnode, Descriptor_id, (0)); UNSUPPORTED("4j153btiyrft10pvhp9s4o13l"); // subg = noderec->subg; UNSUPPORTED("bnybowlbrgjx7x160vaxt6eok"); // root = agroot(g); UNSUPPORTED("f2t4kmp1tlgz90kx88edbc1s8"); // /* make sure caller hasn't put a node "inside itself" */ UNSUPPORTED("d02v8hdosfh8948mx4a51khy4"); // if ((n = agsubnode(subg, cmpnode, (0)))) UNSUPPORTED("1kkhrgl1v3ojgulkhv2iho34m"); // agdelnode(n); UNSUPPORTED("aj0mf64ekwjmvyu6kqgvi66vl"); // /* remap edges by splicing and saving previous endpt */ UNSUPPORTED("58gpvx001o2jm2wb0zi9ykxhx"); // for (n = agfstnode(subg); n; n = agnxtnode(n)) { UNSUPPORTED("bdm41ygxu6ed5nfinjtmybqji"); // rootn = agsubnode(root, n, (0)); UNSUPPORTED("4q5u96f55k4ohv094om4hfom3"); // for (e = agfstedge(rootn); e; e = f) { UNSUPPORTED("c3p50uvstq31yp3nng2ig715m"); // f = agnxtedge(e, rootn); UNSUPPORTED("bkc2enueo6t9l7kv1jolsetmh"); // if (agsubedge(subg, e, (0))) UNSUPPORTED("2hw2snx42pro7p7hsy05vln4r"); // continue; /* an internal edge */ UNSUPPORTED("adb1bm65bqje5izc3vk2789io"); // opp = AGOPP(e); UNSUPPORTED("32kek6wlljhat9b0vfgu2j7vi"); // stackpush(save_stack_of(e, rootn), rootn, cmpnode); UNSUPPORTED("2qzlo72387x84q858f0813gkb"); // agsplice(opp, cmpnode); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("f415ngsv513d31vpdchhs95kb"); // /* hide nodes by deleting from the parent set. what if they also UNSUPPORTED("obzrdh816obcnhiv63ncejfj"); // belong to a sibling subg? weird. possible bug. */ UNSUPPORTED("4bd0uibjrx5ci9pbm9aoki6f5"); // for (n = agfstnode(subg); n; n = nn) { UNSUPPORTED("4l4330kwixp6e6vgyiy54ys17"); // nn = agnxtnode(n); UNSUPPORTED("kb51l7sewmn750p94rd43kg6"); // delete_outside_subg(root, n, subg); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("394ntxheuereknfzn3ztogs6r"); // /* hide subgraph is easy */ UNSUPPORTED("257s639mo6gp7eaozszsh1o7w"); // agdelsubg(agparent(subg), subg); UNSUPPORTED("6abloarv1gy1qzd7xxpla0dyf"); // noderec->collapsed = (!(0)); UNSUPPORTED("4kztab9wrg1e4rhrix10drw0d"); // g->desc.has_cmpnd = (!(0)); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1gb6h0a1ld4kfxblxauozwl1n // static void insert_outside_subg(Agraph_t * g, Agnode_t * node, Agraph_t * subg) public static Object insert_outside_subg(Object... arg) { UNSUPPORTED("76ij8hacl890v9sivg40zvbig"); // static void insert_outside_subg(Agraph_t * g, Agnode_t * node, UNSUPPORTED("5y3h6zj5vt2f7wcth5pip26cj"); // Agraph_t * subg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6g19oav62phxzmj2to9fq3v1x"); // Agraph_t *s, **subglist; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("7jdwhjw5hagvavcg0s7mzyvtw"); // Agcmpgraph_t *graphrec; UNSUPPORTED("ckdhxacpy31hkxoiusj63w0s0"); // if ((g != subg) UNSUPPORTED("8swye54gpwwju751wheaso218"); // && ((n = agsubnode(g, (Agnode_t *) node, (0))) == ((Agnode_t*)0))) { UNSUPPORTED("dmahb56s8q8b4hcc3f5pvwham"); // graphrec = (Agcmpgraph_t *) aggetrec(g, Descriptor_id, (0)); UNSUPPORTED("lxl9n15bjuho7s84h5mnrfjh"); // if (graphrec UNSUPPORTED("2rld3bcrvvoa3aqorq9on3kof"); // && UNSUPPORTED("336e61s13ex1sqjdcjpvk13qs"); // ((n = (Agnode_t *) (*(((Dt_t*)(graphrec->hidden_node_set))->searchf))((graphrec->hidden_node_set),(void*)(node),0000004)))) UNSUPPORTED("2ermrtom5lyizwkjyyw8ubiij"); // (*(((Dt_t*)(g->n_dict))->searchf))((g->n_dict),(void*)(n),0000001); UNSUPPORTED("b6earq4vdf6hkqbiof5ld8o0f"); // subglist = agsubglist(g); UNSUPPORTED("1z7syfzy448v3csnwess0czr6"); // while ((s = *subglist++)) UNSUPPORTED("nec2jxb9w7x6umx24yslrcmt"); // delete_outside_subg(s, node, subg); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6lc402jyd31q9vuhqstq3cipf // int agexpose(Agnode_t * cmpnode) public static Object agexpose(Object... arg) { UNSUPPORTED("9apmbol4kwi7nzggmvu74lu8"); // int agexpose(Agnode_t * cmpnode) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7f909qn3eh0n5jhwbdss7xsl7"); // Agcmpnode_t *noderec; UNSUPPORTED("6ghvyg27wq05jvjsvouudi50c"); // Agcmpedge_t *edgerec; UNSUPPORTED("b60qtrkk2j4xw71fl5cofd2cf"); // Agraph_t *g, *subg, *root; UNSUPPORTED("don2z7bcidp3vh6u93uqylp6n"); // Agnode_t *n, *rootcmp; UNSUPPORTED("109gqpvjmuv5lwcih97x4uwqa"); // Agedge_t *e, *f; UNSUPPORTED("ac4ommdery6vqxemsczpw45pd"); // save_stack_t *stk; UNSUPPORTED("8lv2gwgeyznnvkn2sc4qtmsgg"); // save_e_t sav; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("ckh341j07p4zctbd8z88pmxjs"); // g = agraphof(cmpnode); UNSUPPORTED("cn5g532viw6fnn9qwqgjrg8ut"); // /* skip if this is not a collapsed subgraph */ UNSUPPORTED("1ngod2ph1meu972df8l6bc2b"); // noderec = (Agcmpnode_t *) aggetrec(cmpnode, Descriptor_id, (0)); UNSUPPORTED("bqsicd41l9yomlip35oj8xesq"); // if ((noderec == ((Agcmpnode_t *)0) || NOT(noderec->collapsed))) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("euy8jfjxkm1u0yrzwson87j19"); // /* undo aghide (above) in reverse order. first, expose subgraph */ UNSUPPORTED("4j153btiyrft10pvhp9s4o13l"); // subg = noderec->subg; UNSUPPORTED("1sf8vp9dtnivh92y8rh0t1z25"); // agsubgrec_insert(agsubgrec(agparent(subg)), subg); UNSUPPORTED("98brku3wzqlj4ollbjtvk6fa5"); // /* re-insert nodes */ UNSUPPORTED("7nd099zwv098gk9rg5mpujtqi"); // for (n = agfstnode(subg); n; n = agnxtnode(n)) UNSUPPORTED("40fhgczx2v7xf4fj52ixa2ae1"); // insert_outside_subg(g, n, subg); UNSUPPORTED("q9tdqkpe3ypf3sokv2e9iunf"); // /* re-splice the affected edges */ UNSUPPORTED("bnybowlbrgjx7x160vaxt6eok"); // root = agroot(g); UNSUPPORTED("lbob6dh3k9ofz0eq54n0bfrf"); // rootcmp = agsubnode(root, cmpnode, (0)); UNSUPPORTED("6q870w22sh62rr3c3z713a08c"); // for (e = agfstedge(rootcmp); e; e = f) { UNSUPPORTED("4rk367peiayey75qn4p83rld9"); // f = agnxtedge(e, rootcmp); UNSUPPORTED("azqu6v7o6ogppzcpc7r4j32te"); // if ((edgerec = (Agcmpedge_t *) aggetrec(e, Descriptor_id, (0)))) { UNSUPPORTED("7q2kavn0hyciyjodmijsm5t72"); // /* anything interesting on either stack? */ UNSUPPORTED("49iuc4atzdynskzobe6v2v6by"); // for (i = 0; i < 2; i++) { UNSUPPORTED("cst8yfaj50yiqi2c79ylx8ipu"); // stk = &(edgerec->stack[i]); UNSUPPORTED("2jssfbw5q1ezanoj77xitfozx"); // sav = stacktop(stk); UNSUPPORTED("8ws9njxg0op6x2fecfio25com"); // if (sav.to && (AGID(sav.to) == AGID(cmpnode))) { UNSUPPORTED("ck3uwtfxhqv714xrb3sros513"); // if (e->node != sav.to) UNSUPPORTED("50lxrd15vtq2bqijmn3bb0s3d"); // e = AGOPP(e); UNSUPPORTED("4xrkvbkbiluczhf7ohqwe2f7j"); // agsplice(e, sav.from); UNSUPPORTED("a2z237r7jaraa3h9fcoipnsoq"); // stackpop(stk); UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6lipw6f0pqk6r03nvkb5cjdbq"); // noderec->collapsed = (0); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aduq2oedmk7tixfq937xsx8uk // Agraph_t *agcmpgraph_of(Agnode_t * n) public static Object agcmpgraph_of(Object... arg) { UNSUPPORTED("96w163plg7m5fs459ya5s4eyr"); // Agraph_t *agcmpgraph_of(Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7f909qn3eh0n5jhwbdss7xsl7"); // Agcmpnode_t *noderec; UNSUPPORTED("bsxlpjgnoko6pxkt2w15vzjoc"); // noderec = (Agcmpnode_t *) aggetrec(n, Descriptor_id, (0)); UNSUPPORTED("6xdbpq5pdwgfgmaekbtp5fvq2"); // if (noderec && NOT(noderec->collapsed)) UNSUPPORTED("euroyfixydmzdwgwiv0f2pihb"); // return noderec->subg; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("3jgcplzgc47d97c1hv6u71tpg"); // return ((Agraph_t*)0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5hzjwc4e1cfmit7v903028piu // Agnode_t *agcmpnode_of(Agraph_t * g) public static Object agcmpnode_of(Object... arg) { UNSUPPORTED("exxk55w9iak7ur9634a45037a"); // Agnode_t *agcmpnode_of(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7jdwhjw5hagvavcg0s7mzyvtw"); // Agcmpgraph_t *graphrec; UNSUPPORTED("9vifxckhgfio5f5ba0xie8roh"); // graphrec = (Agcmpgraph_t *) aggetrec(g, Descriptor_id, (0)); UNSUPPORTED("aixy4qcuhk04x6qoq3y286w8k"); // if (graphrec) UNSUPPORTED("b6qkfex5h0152pzytdftlh9sb"); // return graphrec->node; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("afujljwagn2n2w7aqkq94dyud"); // return ((Agnode_t*)0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2yirbmqshfrzkjrbay3m6j4ep // Agnode_t *agfindhidden(Agraph_t * g, char *name) public static Object agfindhidden(Object... arg) { UNSUPPORTED("8cv8z2j9nan9aew6qpjmibk2t"); // Agnode_t *agfindhidden(Agraph_t * g, char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7jdwhjw5hagvavcg0s7mzyvtw"); // Agcmpgraph_t *graphrec; UNSUPPORTED("6ccnq25sjyc3hlxdu7hxx8lic"); // Agnode_t key; UNSUPPORTED("9vifxckhgfio5f5ba0xie8roh"); // graphrec = (Agcmpgraph_t *) aggetrec(g, Descriptor_id, (0)); UNSUPPORTED("anxj4l9dauyidns1gvnaacw6t"); // if (graphrec) { UNSUPPORTED("81vu48ydx08zss09rzp8ctgir"); // key.name = name; UNSUPPORTED("2hneo0tj9jekolndce4nhpax2"); // return (Agnode_t *) (*(((Dt_t*)(graphrec->hidden_node_set))->searchf))((graphrec->hidden_node_set),(void*)(&key),0000004); UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("afujljwagn2n2w7aqkq94dyud"); // return ((Agnode_t*)0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/edge__c.java000066400000000000000000000707601312650303100214520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static gen.lib.cdt.dtextract__c.dtextract; import static gen.lib.cdt.dtrestore__c.dtrestore; import static gen.lib.cgraph.attr__c.AgDataRecName; import static gen.lib.cgraph.attr__c.agedgeattr_init; import static gen.lib.cgraph.graph__c.agisstrict; import static gen.lib.cgraph.graph__c.agisundirected; import static gen.lib.cgraph.graph__c.agnextseq; import static gen.lib.cgraph.id__c.agmapnametoid; import static gen.lib.cgraph.id__c.agregister; import static gen.lib.cgraph.mem__c.agalloc; import static gen.lib.cgraph.node__c.agsubnode; import static gen.lib.cgraph.obj__c.agmethod_init; import static gen.lib.cgraph.obj__c.agroot; import static gen.lib.cgraph.rec__c.agbindrec; import static gen.lib.cgraph.subg__c.agparent; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGEDGE; import static smetana.core.Macro.AGHEAD; import static smetana.core.Macro.AGID; import static smetana.core.Macro.AGINEDGE; import static smetana.core.Macro.AGMKIN; import static smetana.core.Macro.AGMKOUT; import static smetana.core.Macro.AGOPP; import static smetana.core.Macro.AGOUTEDGE; import static smetana.core.Macro.AGSEQ; import static smetana.core.Macro.AGTAG; import static smetana.core.Macro.AGTAIL; import static smetana.core.Macro.AGTYPE; import static smetana.core.Macro.N; import static smetana.core.Macro.NOT; import static smetana.core.Macro.UNSUPPORTED; import h.Agattr_s; import h.Agedge_s; import h.Agedgepair_s; import h.Agnode_s; import h.Agraph_s; import h.Agsubnode_s; import h.Agtag_s; import h.ST_Agdesc_s; import h.ST_Agtag_s; import h._dt_s; import h._dtdisc_s; import h._dtlink_s; import smetana.core.ACCESS; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Memory; import smetana.core.STARSTAR; import smetana.core.Z; import smetana.core.__ptr__; import smetana.core.__struct__; public class edge__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //1 cee3kc2m61ml4f8le5ueoyrjb // static Agtag_t Tag //private final static __struct__ Tag = JUtils.from(Agtag_s.class); //3 9vamtktowqtk4955i546z9obw // Agedge_t *agfstout(Agraph_t * g, Agnode_t * n) public static Agedge_s agfstout(Agraph_s g, Agnode_s n) { ENTERING("9vamtktowqtk4955i546z9obw","agfstout"); try { Agsubnode_s sn; Agedge_s e = null; sn = agsubrep(g, n); if (sn!=null) { dtrestore((_dt_s)g.getPtr("e_seq"), (_dtlink_s)sn.getPtr("out_seq")); e = (Agedge_s) g.getPtr("e_seq").castTo(_dt_s.class).call("searchf", g.getPtr("e_seq"),null,0000200); sn.setPtr("out_seq", dtextract((_dt_s)g.getPtr("e_seq"))); } return e; } finally { LEAVING("9vamtktowqtk4955i546z9obw","agfstout"); } } //3 1qh7mgqwomkdqvczauv4ex1lu // Agedge_t *agnxtout(Agraph_t * g, Agedge_t * e) public static Agedge_s agnxtout(Agraph_s g, Agedge_s e) { ENTERING("1qh7mgqwomkdqvczauv4ex1lu","agnxtout"); try { Agnode_s n; Agsubnode_s sn; Agedge_s f = null; n = AGTAIL(e); sn = agsubrep(g, n); if (sn!=null) { dtrestore((_dt_s)g.getPtr("e_seq"), (_dtlink_s)sn.getPtr("out_seq")); f = (Agedge_s) g.getPtr("e_seq").castTo(_dt_s.class).call("searchf", g.getPtr("e_seq"),e,0000010); sn.setPtr("out_seq", dtextract((_dt_s)g.getPtr("e_seq"))); } return f; } finally { LEAVING("1qh7mgqwomkdqvczauv4ex1lu","agnxtout"); } } //3 c60qt3ycq0xweabgtqt16xe93 // Agedge_t *agfstin(Agraph_t * g, Agnode_t * n) public static Agedge_s agfstin(Agraph_s g, Agnode_s n) { ENTERING("c60qt3ycq0xweabgtqt16xe93","agfstin"); try { Agsubnode_s sn; Agedge_s e = null; sn = agsubrep(g, n); if (sn!=null) { dtrestore((_dt_s)g.getPtr("e_seq"), (_dtlink_s)sn.getPtr("in_seq")); e = (Agedge_s) g.getPtr("e_seq").castTo(_dt_s.class).call("searchf", g.getPtr("e_seq"),null,0000200); sn.setPtr("in_seq", dtextract((_dt_s)g.getPtr("e_seq"))); } return e; } finally { LEAVING("c60qt3ycq0xweabgtqt16xe93","agfstin"); } } //3 f2af4x97mqn16npd6alsw7avs // Agedge_t *agnxtin(Agraph_t * g, Agedge_t * e) public static Agedge_s agnxtin(Agraph_s g, Agedge_s e) { ENTERING("f2af4x97mqn16npd6alsw7avs","agnxtin"); try { Agnode_s n; Agsubnode_s sn; Agedge_s f = null; n = AGHEAD(e); sn = agsubrep(g, n); if (sn!=null) { dtrestore((_dt_s)g.getPtr("e_seq"), (_dtlink_s)sn.getPtr("in_seq")); f = (Agedge_s) g.getPtr("e_seq").castTo(_dt_s.class).call("searchf", g.getPtr("e_seq"),e,0000010); sn.setPtr("in_seq", dtextract((_dt_s)g.getPtr("e_seq"))); } return f; } finally { LEAVING("f2af4x97mqn16npd6alsw7avs","agnxtin"); } } //3 6nwyo5bklramr0d093aa1h25o // Agedge_t *agfstedge(Agraph_t * g, Agnode_t * n) public static Agedge_s agfstedge(Agraph_s g, Agnode_s n) { ENTERING("6nwyo5bklramr0d093aa1h25o","agfstedge"); try { Agedge_s rv; rv = agfstout(g, n); if (rv == null) rv = agfstin(g, n); return rv; } finally { LEAVING("6nwyo5bklramr0d093aa1h25o","agfstedge"); } } //3 8zy2u6gsi2xzv2ffv8o4v4uvf // Agedge_t *agnxtedge(Agraph_t * g, Agedge_t * e, Agnode_t * n) public static Agedge_s agnxtedge(Agraph_s g, Agedge_s e, Agnode_s n) { ENTERING("8zy2u6gsi2xzv2ffv8o4v4uvf","agnxtedge"); try { Agedge_s rv; if (AGTYPE(e) == AGOUTEDGE) { rv = agnxtout(g, e); if (rv == null) { do { rv = N(rv) ? agfstin(g, n) : agnxtin(g,rv); } while (rv!=null && EQ(rv.getPtr("node"), n)); } } else { do { rv = agnxtin(g, e); /* so that we only see each edge once, */ e = rv; } while (rv!=null && EQ(rv.getPtr("node"), n)); /* ignore loops as in-edges */ } return rv; } finally { LEAVING("8zy2u6gsi2xzv2ffv8o4v4uvf","agnxtedge"); } } //3 c175o6j61jqmfnl4o1g1h1mie // static Agedge_t *agfindedge_by_key(Agraph_t * g, Agnode_t * t, Agnode_t * h, Agtag_t key) public static Agedge_s agfindedge_by_key(Agraph_s g, Agnode_s t, Agnode_s h, final __struct__ key) { // WARNING!! STRUCT return agfindedge_by_key_w_(g, t, h, key.copy()); } private static Agedge_s agfindedge_by_key_w_(Agraph_s g, Agnode_s t, Agnode_s h, final __struct__ key) { ENTERING("c175o6j61jqmfnl4o1g1h1mie","agfindedge_by_key"); try { Agedge_s e, template = (Agedge_s) Memory.malloc(Agedge_s.class); Agsubnode_s sn; if ((t == null) || (h == null)) return null; template.getStruct("base").setStruct("tag", key); template.setPtr("node", t); /* guess that fan-in < fan-out */ sn = agsubrep(g, h); if (N(sn)) e = null; else { dtrestore((_dt_s)g.getPtr("e_id"), (_dtlink_s)sn.getPtr("in_id")); e = (Agedge_s) ((__ptr__)g.getPtr("e_id").castTo(_dt_s.class).call("searchf", g.getPtr("e_id"),template,0000004)); if (e!=null) e = (Agedge_s) e.castTo(Agedge_s.class); sn.setPtr("in_id", dtextract((_dt_s)g.getPtr("e_id"))); } return e; } finally { LEAVING("c175o6j61jqmfnl4o1g1h1mie","agfindedge_by_key"); } } //3 7ph1egysh0yp1kxmrerg5v40e // static Agedge_t *agfindedge_by_id(Agraph_t * g, Agnode_t * t, Agnode_t * h, unsigned long id) public static Object agfindedge_by_id(Object... arg) { UNSUPPORTED("ec9zslg8lac601i0b25y7zwto"); // static Agedge_t *agfindedge_by_id(Agraph_t * g, Agnode_t * t, Agnode_t * h, UNSUPPORTED("3aq1nzyk7buuizn5in1tizrxw"); // unsigned long id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e1mtghvcaueacf53mmdm4tfy0"); // Agtag_t tag; UNSUPPORTED("9sao87j2usq1a87o75iju8s5b"); // tag = Tag; UNSUPPORTED("8ftb0g8ykm4jkjpro0pcai75y"); // tag.objtype = AGEDGE; UNSUPPORTED("4dwsgoqnwiy82putqjt97dagp"); // tag.id = id; UNSUPPORTED("57t26f9vd4vltjvoz5m7lo5lf"); // return agfindedge_by_key(g, t, h, tag); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b32ssm6ex1pdz1b3nt4fwlhul // Agsubnode_t *agsubrep(Agraph_t * g, Agnode_t * n) public static Agsubnode_s agsubrep(Agraph_s g, Agnode_s n) { ENTERING("b32ssm6ex1pdz1b3nt4fwlhul","agsubrep"); try { Agsubnode_s sn; final __struct__ template = JUtils.from(Agsubnode_s.class); if (EQ(g, n.getPtr("root"))) sn = (Agsubnode_s) n.getStruct("mainsub").amp(); else { template.setPtr("node", n); sn = (Agsubnode_s) g.getPtr("n_id").castTo(_dt_s.class).call("searchf", g.getPtr("n_id"), template.amp(), 0000004); } return sn; } finally { LEAVING("b32ssm6ex1pdz1b3nt4fwlhul","agsubrep"); } } //3 6u0niow33w9gva780waluva4n // static void ins(Dict_t * d, Dtlink_t ** set, Agedge_t * e) public static void ins(_dt_s d, STARSTAR<_dtlink_s> set, Agedge_s e) { ENTERING("6u0niow33w9gva780waluva4n","ins"); try { dtrestore(d, set.getMe()); d.call("searchf", d,e,0000001); set.setMe(dtextract(d)); } finally { LEAVING("6u0niow33w9gva780waluva4n","ins"); } } //3 2h2dtr49b6fcn440sc4xrseg3 // static void del(Dict_t * d, Dtlink_t ** set, Agedge_t * e) public static Object del(Object... arg) { UNSUPPORTED("5lvsvkq5t8c8pj03debt0mwal"); // static void del(Dict_t * d, Dtlink_t ** set, Agedge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("atawgqln44t2lhf2j4q1dsw80"); // void *x; UNSUPPORTED("c1wraxzkcgmquqsiuypvr56tj"); // dtrestore(d, *set); UNSUPPORTED("9e6qtst4eze5ps8ukq79d6zf8"); // x = (*(((Dt_t*)(d))->searchf))((d),(void*)(e),0000002); UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("dgfo5c0o8ftxxwmcq8kxe7ht8"); // *set = dtextract(d); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8kizmg7gziussfgx8zs3qvkfw // static void installedge(Agraph_t * g, Agedge_t * e) public static void installedge(Agraph_s g, Agedge_s e) { ENTERING("8kizmg7gziussfgx8zs3qvkfw","installedge"); try { Agnode_s t, h; Agedge_s out, in; Agsubnode_s sn; out = AGMKOUT(e); in = AGMKIN(e); t = agtail(e); h = aghead(e); while (g!=null) { if (agfindedge_by_key(g, t, h, AGTAG(e))!=null) break; sn = agsubrep(g, t); final Agsubnode_s sn1 = sn; ins((_dt_s)g.getPtr("e_seq"), STARSTAR.amp(new ACCESS<_dtlink_s>() { public _dtlink_s get() { return (_dtlink_s) sn1.getPtr("out_seq"); } public void set(_dtlink_s obj) { sn1.setPtr("out_seq", obj); }}) , (Agedge_s)out); ins((_dt_s)g.getPtr("e_id"), STARSTAR.amp(new ACCESS<_dtlink_s>() { public _dtlink_s get() { return (_dtlink_s) sn1.getPtr("out_id"); } public void set(_dtlink_s obj) { sn1.setPtr("out_id", obj); }}) , (Agedge_s)out); sn = agsubrep(g, h); final Agsubnode_s sn2 = sn; ins((_dt_s)g.getPtr("e_seq"), STARSTAR.amp(new ACCESS<_dtlink_s>() { public _dtlink_s get() { return (_dtlink_s) sn2.getPtr("in_seq"); } public void set(_dtlink_s obj) { sn2.setPtr("in_seq", obj); }}) , (Agedge_s)in); ins((_dt_s)g.getPtr("e_id"), STARSTAR.amp(new ACCESS<_dtlink_s>() { public _dtlink_s get() { return (_dtlink_s) sn2.getPtr("in_id"); } public void set(_dtlink_s obj) { sn2.setPtr("in_id", obj); }}) , (Agedge_s)in); g = agparent(g); } } finally { LEAVING("8kizmg7gziussfgx8zs3qvkfw","installedge"); } } //3 2vtt6zb0n3oru23okvw4pxasg // static void subedge(Agraph_t * g, Agedge_t * e) public static Object subedge(Object... arg) { UNSUPPORTED("1qslen16fp6w3yse2y311vtsf"); // static void subedge(Agraph_t * g, Agedge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3rvuc9rdxdwmvq3dtwv2hqwjo"); // installedge(g, e); UNSUPPORTED("4d70e4y79ekvafnx88hgwdrna"); // /* might an init method call be needed here? */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4rzjui6oo0k009o64bxwgjmvq // static Agedge_t *newedge(Agraph_t * g, Agnode_t * t, Agnode_t * h, unsigned long id) public static Agedge_s newedge(Agraph_s g, Agnode_s t, Agnode_s h, int id) { ENTERING("4rzjui6oo0k009o64bxwgjmvq","newedge"); try { Agedgepair_s e2; Agedge_s in, out; int seq; agsubnode(g,t,(N(0))); agsubnode(g,h,(N(0))); e2 = (Agedgepair_s) agalloc(g, sizeof(Agedgepair_s.class)); in = (Agedge_s) e2.getStruct("in").amp(); out = (Agedge_s) e2.getStruct("out").amp(); seq = agnextseq(g, AGEDGE); AGTYPE(in, AGINEDGE); AGTYPE(out, AGOUTEDGE); AGID(out, id); AGID(in, id); AGSEQ(in, seq); AGSEQ(out, seq); in.setPtr("node", t); out.setPtr("node", h); installedge(g, out); if (((ST_Agdesc_s)g.getStruct("desc")).has_attrs!=0) { agbindrec(out, AgDataRecName, sizeof(Agattr_s.class), false); agedgeattr_init(g, out); } agmethod_init(g, out); return out; } finally { LEAVING("4rzjui6oo0k009o64bxwgjmvq","newedge"); } } //3 1ufxhg5xnmll1pe5339477823 // static int ok_to_make_edge(Agraph_t * g, Agnode_t * t, Agnode_t * h) public static boolean ok_to_make_edge(Agraph_s g, Agnode_s t, Agnode_s h) { ENTERING("1ufxhg5xnmll1pe5339477823","ok_to_make_edge"); try { final __struct__ key = JUtils.from(Agtag_s.class); /* protect against self, multi-edges in strict graphs */ if (agisstrict(g)) { if (g.getPtr("desc").getBoolean("no_loop") && (EQ(t, h))) /* simple graphs */ return false; key.___(Z.z().Tag); key.setInt("objtype", 0); /* wild card */ if (agfindedge_by_key(g, t, h, key)!=null) return false; } return (N(0)); } finally { LEAVING("1ufxhg5xnmll1pe5339477823","ok_to_make_edge"); } } //3 75ua3fc3lvhnwftacueslv8e5 // Agedge_t *agidedge(Agraph_t * g, Agnode_t * t, Agnode_t * h, unsigned long id, int cflag) public static Object agidedge(Object... arg) { UNSUPPORTED("5pslnv27wv1h507npa2zxh90y"); // Agedge_t *agidedge(Agraph_t * g, Agnode_t * t, Agnode_t * h, UNSUPPORTED("e28xnrj58aci1fn3kunzmqxbv"); // unsigned long id, int cflag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2hs0004nnparj6tt7elslt4zj"); // Agraph_t *root; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("1v1wyp9m83obk7jvlhzzmbwqb"); // e = agfindedge_by_id(g, t, h, id); UNSUPPORTED("1gxwr1hr3zd8rrmnl1zq34xju"); // if ((e == ((Agedge_t*)0)) && agisundirected(g)) UNSUPPORTED("7jnnbxt6l29uby71ap2ioa94q"); // e = agfindedge_by_id(g, h, t, id); UNSUPPORTED("2m5yl6487z3nh60gz8x9otg16"); // if ((e == ((Agedge_t*)0)) && cflag && ok_to_make_edge(g, t, h)) { UNSUPPORTED("7zol2448bccu90sqoxkvnbuif"); // root = agroot(g); UNSUPPORTED("e9viv3tnfxask57of0bhahbev"); // if ((g != root) && ((e = agfindedge_by_id(root, t, h, id)))) { UNSUPPORTED("7u9o1s6uopqwva82fgnfbgr03"); // subedge(g, e); /* old */ UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("3nwzv8q6jwjadczk10hhrt14f"); // if (agallocid(g, AGEDGE, id)) { UNSUPPORTED("2zklsds1y3vegvq9xgmx9ayyn"); // e = newedge(g, t, h, id); /* new */ UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2bswif6w6ot01ynlvkimntfly"); // return e; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4361pvzr3ozft2ov0fgx6t8bo // Agedge_t *agedge(Agraph_t * g, Agnode_t * t, Agnode_t * h, char *name, int cflag) public static Agedge_s agedge(Agraph_s g, Agnode_s t, Agnode_s h, CString name, boolean cflag) { ENTERING("4361pvzr3ozft2ov0fgx6t8bo","agedge"); try { Agedge_s e; int id[] = new int[1]; int have_id; have_id = agmapnametoid(g, AGEDGE, name, id, false); if (have_id!=0 || ((name == null) && ((NOT(cflag)) || agisstrict(g)))) { /* probe for pre-existing edge */ final ST_Agtag_s key = new ST_Agtag_s(); key.___(Z.z().Tag); if (have_id!=0) { key.id = id[0]; key.objtype = AGEDGE; } else { key.id = 0; key.objtype = 0; } /* might already exist locally */ e = agfindedge_by_key(g, t, h, key); if ((e == null && agisundirected(g))) e = agfindedge_by_key(g, h, t, key); if (e!=null) return e; if (cflag) { e = agfindedge_by_key(agroot(g), t, h, key); if ((e == null) && agisundirected(g)) e = agfindedge_by_key(agroot(g), h, t, key); if (e!=null) { subedge(g,e); return e; } } } if (cflag && ok_to_make_edge(g, t, h) && (agmapnametoid(g, AGEDGE, name, id, (N(0))))!=0) { /* reserve id */ e = newedge(g, t, h, id[0]); agregister(g, AGEDGE, e); /* register new object in external namespace */ } else e = null; return e; } finally { LEAVING("4361pvzr3ozft2ov0fgx6t8bo","agedge"); } } //3 bbzly9og4lr1fza64fjk04djp // void agdeledgeimage(Agraph_t * g, Agedge_t * e, void *ignored) public static Object agdeledgeimage(Object... arg) { UNSUPPORTED("7gzvhvwj0z152fzg3h94s4wa3"); // void agdeledgeimage(Agraph_t * g, Agedge_t * e, void *ignored) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("50fokbemxzgivcd3b6k3miqqn"); // Agedge_t *in, *out; UNSUPPORTED("4ybt6tm56tubmbuve8lp6rxhh"); // Agnode_t *t, *h; UNSUPPORTED("2llbfi4jrmre7cyhu90pgcm72"); // Agsubnode_t *sn; UNSUPPORTED("4pgl4pn1cad2whf242bntmjre"); // (void) ignored; UNSUPPORTED("65tqa3if9hwq2yshaaiw31i7p"); // if (AGTYPE(e) == AGINEDGE) { UNSUPPORTED("7awcpvsw7kw84dndmnqoe7jml"); // in = e; UNSUPPORTED("d4vc8t57wygctu4vl9tau8a6a"); // out = AGIN2OUT(e); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("54k8hnomk4mrwatjixro9a1yr"); // out = e; UNSUPPORTED("7qnm0e5czl4a8gcj7f5vo98h"); // in = AGOUT2IN(e); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("uc5fexr8h438pt7usvlh0ul3"); // t = in->node; UNSUPPORTED("9a1uo5zmwfnuphv9st2w2b7hh"); // h = out->node; UNSUPPORTED("dpshsqc8cs6ucoq4t0hnuxws6"); // sn = agsubrep(g, t); UNSUPPORTED("a1kpx292l61dmu7eqdcm7fd51"); // del(g->e_seq, &sn->out_seq, out); UNSUPPORTED("3xx2m5a0qzz8zcz61qn8mw44q"); // del(g->e_id, &sn->out_id, out); UNSUPPORTED("e1vy7p3xj8dfi23jli55il082"); // sn = agsubrep(g, h); UNSUPPORTED("dtt5k4axitnc0rvaop78flltt"); // del(g->e_seq, &sn->in_seq, in); UNSUPPORTED("3w1dtrerdp5ojxgix55ysgcd3"); // del(g->e_id, &sn->in_id, in); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5l2v1bqchqfkinhpae4ip3yvz // int agdeledge(Agraph_t * g, Agedge_t * e) public static Object agdeledge(Object... arg) { UNSUPPORTED("a87xum130tyatez3ic2nbxnna"); // int agdeledge(Agraph_t * g, Agedge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9tj8yk1m099w6420vq9obwqv6"); // e = AGMKOUT(e); UNSUPPORTED("58hfnwh2g7pubdk6wexuvksuo"); // if (agfindedge_by_key(g, agtail(e), aghead(e), AGTAG(e)) == ((Agedge_t*)0)) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("ackx3cor82a94trjk4owh3083"); // if (g == agroot(g)) { UNSUPPORTED("5247bml3o0pwzg9fc9q1xhhnc"); // if (g->desc.has_attrs) UNSUPPORTED("4lf7sorcdbqef4eadxah45x08"); // agedgeattr_delete(e); UNSUPPORTED("dpp3uqwrwe9geok1zmxonosd3"); // agmethod_delete(g, e); UNSUPPORTED("6kvbonl2aylsja52uh6deu14c"); // agrecclose((Agobj_t *) e); UNSUPPORTED("dnmywe26u2d1rmgozlfonjw94"); // agfreeid(g, AGEDGE, AGID(e)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6ox33bv05arfuz70cp795jqlg"); // if (agapply (g, (Agobj_t *) e, (agobjfn_t) agdeledgeimage, ((Agedge_t*)0), (0)) == 0) { UNSUPPORTED("6tlwlx478gb1clm2fykihi2zk"); // if (g == agroot(g)) UNSUPPORTED("ebin71xd0muor7ysk74hizhw3"); // agfree(g, e); UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 30v8z3tlda81fbqbkzx6m9fkn // Agedge_t *agsubedge(Agraph_t * g, Agedge_t * e, int cflag) public static Agedge_s agsubedge(Agraph_s g, Agedge_s e, boolean cflag) { ENTERING("30v8z3tlda81fbqbkzx6m9fkn","agsubedge"); try { Agnode_s t, h; Agedge_s rv; rv = null; t = agsubnode(g, AGTAIL(e), cflag); h = agsubnode(g, AGHEAD(e), cflag); if (t!=null && h!=null) { rv = agfindedge_by_key(g, t, h, AGTAG(e)); if (cflag && (rv == null)) { installedge(g, e); rv = e; } if (rv!=null && (AGTYPE(rv) != AGTYPE(e))) rv = AGOPP(rv); } return rv; } finally { LEAVING("30v8z3tlda81fbqbkzx6m9fkn","agsubedge"); } } //3 avk47eh26r45qk2dtoipwiqvz // int agedgeidcmpf(Dict_t * d, void *arg_e0, void *arg_e1, Dtdisc_t * disc) public static int agedgeidcmpf(_dt_s d, __ptr__ arg_e0, __ptr__ arg_e1, _dtdisc_s disc) { ENTERING("avk47eh26r45qk2dtoipwiqvz","agedgeidcmpf"); try { int v; Agedge_s e0, e1; e0 = (Agedge_s) arg_e0; e1 = (Agedge_s) arg_e1; v = AGID(e0.getPtr("node")) - AGID(e1.getPtr("node")); if (v == 0) { /* same node */ if ((AGTYPE(e0) == 0) || (AGTYPE(e1) == 0)) v = 0; else v = AGID(e0) - AGID(e1); } return ((v==0)?0:(v<0?-1:1)); } finally { LEAVING("avk47eh26r45qk2dtoipwiqvz","agedgeidcmpf"); } } //3 b6jhzc16xvrknu4e7jp6zx0ue // int agedgeseqcmpf(Dict_t * d, void *arg_e0, void *arg_e1, Dtdisc_t * disc) public static int agedgeseqcmpf(_dt_s d, __ptr__ arg_e0, __ptr__ arg_e1, _dtdisc_s disc) { ENTERING("b6jhzc16xvrknu4e7jp6zx0ue","agedgeseqcmpf"); try { int v; Agedge_s e0, e1; e0 = (Agedge_s) arg_e0; e1 = (Agedge_s) arg_e1; if (NEQ(e0.getPtr("node"), e1.getPtr("node"))) v = AGSEQ(e0.getPtr("node")) - AGSEQ(e1.getPtr("node")); else v = (AGSEQ(e0) - AGSEQ(e1)); return ((v==0)?0:(v<0?-1:1)); } finally { LEAVING("b6jhzc16xvrknu4e7jp6zx0ue","agedgeseqcmpf"); } } //1 d058zqckpiqls71p4vkuxe87o // Dtdisc_t Ag_mainedge_seq_disc = /*static final public __struct__<_dtdisc_s> Ag_mainedge_seq_disc = JUtils.from(_dtdisc_s.class); static { Ag_mainedge_seq_disc.setInt("key", 0); Ag_mainedge_seq_disc.setInt("size", 0); Ag_mainedge_seq_disc.setInt("link", OFFSET.create(Agedge_s.class, "seq_link").toInt()); // seq_link is the third field in Agedge_t Ag_mainedge_seq_disc.setPtr("makef", null); Ag_mainedge_seq_disc.setPtr("freef", null); Ag_mainedge_seq_disc.setPtr("comparf", function(edge__c.class, "agedgeseqcmpf")); Ag_mainedge_seq_disc.setPtr("hashf", null); Ag_mainedge_seq_disc.setPtr("memoryf", function(utils__c.class, "agdictobjmem")); Ag_mainedge_seq_disc.setPtr("eventf", null); }*/ //1 7n5e8w5zjp9b4oeecyvyl96il // Dtdisc_t Ag_subedge_seq_disc = /*static public final __struct__<_dtdisc_s> Ag_subedge_seq_disc = JUtils.from(_dtdisc_s.class); static { Ag_subedge_seq_disc.setInt("key", 0); Ag_subedge_seq_disc.setInt("size", 0); Ag_subedge_seq_disc.setInt("link", -1); Ag_subedge_seq_disc.setPtr("makef", null); Ag_subedge_seq_disc.setPtr("freef", null); Ag_subedge_seq_disc.setPtr("comparf", function(edge__c.class, "agedgeseqcmpf")); Ag_subedge_seq_disc.setPtr("hashf", null); Ag_subedge_seq_disc.setPtr("memoryf", function(utils__c.class, "agdictobjmem")); Ag_subedge_seq_disc.setPtr("eventf", null); }*/ //1 7grv8f2wvpg0db2pn1g7r5abv // Dtdisc_t Ag_mainedge_id_disc = /*static final public __struct__<_dtdisc_s> Ag_mainedge_id_disc = JUtils.from(_dtdisc_s.class); static { Ag_mainedge_id_disc.setInt("key", 0); Ag_mainedge_id_disc.setInt("size", 0); Ag_mainedge_id_disc.setInt("link", OFFSET.create(Agedge_s.class, "id_link").toInt()); // id_link is the second field in Agedge_t Ag_mainedge_id_disc.setPtr("makef", null); Ag_mainedge_id_disc.setPtr("freef", null); Ag_mainedge_id_disc.setPtr("comparf", function(edge__c.class, "agedgeidcmpf")); Ag_mainedge_id_disc.setPtr("hashf", null); Ag_mainedge_id_disc.setPtr("memoryf", function(utils__c.class, "agdictobjmem")); Ag_mainedge_id_disc.setPtr("eventf", null); }*/ //1 9u0ic8u2hrwlmlqalv37s053f // Dtdisc_t Ag_subedge_id_disc = /*static public final __struct__<_dtdisc_s> Ag_subedge_id_disc = JUtils.from(_dtdisc_s.class); static { Ag_subedge_id_disc.setInt("key", 0); Ag_subedge_id_disc.setInt("size", 0); Ag_subedge_id_disc.setInt("link", -1); Ag_subedge_id_disc.setPtr("makef", null); Ag_subedge_id_disc.setPtr("freef", null); Ag_subedge_id_disc.setPtr("comparf", function(edge__c.class, "agedgeidcmpf")); Ag_subedge_id_disc.setPtr("hashf", null); Ag_subedge_id_disc.setPtr("memoryf", function(utils__c.class, "agdictobjmem")); Ag_subedge_id_disc.setPtr("eventf", null); }*/ //3 ceexs6t1q4jxwz6h0g8fszxp4 // Agnode_t *agtail(Agedge_t * e) public static Agnode_s agtail(Agedge_s e) { ENTERING("ceexs6t1q4jxwz6h0g8fszxp4","agtail"); try { return AGTAIL(e); } finally { LEAVING("ceexs6t1q4jxwz6h0g8fszxp4","agtail"); } } //3 3tj9gj3dvrpox6grrdd3rftd8 // Agnode_t *aghead(Agedge_t * e) public static Agnode_s aghead(__ptr__ e) { ENTERING("3tj9gj3dvrpox6grrdd3rftd8","aghead"); try { return AGHEAD((Agedge_s) e); } finally { LEAVING("3tj9gj3dvrpox6grrdd3rftd8","aghead"); } } //3 15e6s5bh5hey2u79yoebir59w // Agedge_t *agopp(Agedge_t * e) public static Agedge_s agopp(__ptr__ e) { ENTERING("15e6s5bh5hey2u79yoebir59w","agopp"); try { return AGOPP((Agedge_s) e); } finally { LEAVING("15e6s5bh5hey2u79yoebir59w","agopp"); } } } plantuml-1.2017.15/src/gen/lib/cgraph/flatten__c.java000066400000000000000000000170251312650303100221760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static smetana.core.Macro.UNSUPPORTED; public class flatten__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //3 69ucljsqnzi8rzbvuqpjp4hfx // static void agflatten_elist(Dict_t * d, Dtlink_t ** lptr, int flag) public static Object agflatten_elist(Object... arg) { UNSUPPORTED("bpx3af0xjz85367rnoh2ipdrn"); // static void agflatten_elist(Dict_t * d, Dtlink_t ** lptr, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4ksyblegh2kh8j0mzdddj80zr"); // dtrestore(d, *lptr); UNSUPPORTED("ctwl7b6yxhzl4sj91zup9at33"); // dtmethod(d, flag? Dtlist : Dtoset); UNSUPPORTED("du4za15ppq4ntkttytf8tpzkk"); // *lptr = dtextract(d); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c4syafe2mgpp13hj8vel7hdwh // void agflatten_edges(Agraph_t * g, Agnode_t * n, int flag) public static Object agflatten_edges(Object... arg) { UNSUPPORTED("4ttg1k6ryqoueza8gtu0qesmc"); // void agflatten_edges(Agraph_t * g, Agnode_t * n, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2llbfi4jrmre7cyhu90pgcm72"); // Agsubnode_t *sn; UNSUPPORTED("2g1n9rzdmt5pucspjmto1jwvn"); // Dtlink_t **tmp; UNSUPPORTED("1wwtmjdvl73j75h8fp92i9yk5"); // sn = agsubrep(g,n); UNSUPPORTED("cvsy8oi25qamrmokl6dumfc2n"); // tmp = &(sn->out_seq); /* avoiding - "dereferencing type-punned pointer will break strict-aliasing rules" */ UNSUPPORTED("9robj8jesxzc7bpyw78z8i80l"); // agflatten_elist(g->e_seq, tmp, flag); UNSUPPORTED("7no705grsz21vady4u118n7tz"); // tmp = &(sn->in_seq); UNSUPPORTED("9robj8jesxzc7bpyw78z8i80l"); // agflatten_elist(g->e_seq, tmp, flag); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aswf367vm4ypgb50vecx6oy0e // void agflatten(Agraph_t * g, int flag) public static Object agflatten(Object... arg) { UNSUPPORTED("epc3qpwcrvpagpod79vqkiktz"); // void agflatten(Agraph_t * g, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("6cb8mzhjyrkhua0olueodre85"); // if (flag) { UNSUPPORTED("3kgshdurj1k3861cmk0j6459q"); // if (g->desc.flatlock == (0)) { UNSUPPORTED("biacx609ekjlj7vzv20kr0twk"); // dtmethod(g->n_seq,Dtlist); UNSUPPORTED("feknc9jq0v1n93q583pigog"); // for (n = agfstnode(g); n; n = agnxtnode(g,n)) UNSUPPORTED("4ufjmlytpm2l2msb8zuxor8s2"); // agflatten_edges(g, n, flag); UNSUPPORTED("1r4fzaa446otf0jautzt92b4r"); // g->desc.flatlock = (!(0)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("bacueyt9l2eudlsl4z5n0t9l7"); // if (g->desc.flatlock) { UNSUPPORTED("b0wcdyp5hit8sc1jbi4asmalp"); // dtmethod(g->n_seq,Dtoset); UNSUPPORTED("feknc9jq0v1n93q583pigog"); // for (n = agfstnode(g); n; n = agnxtnode(g,n)) UNSUPPORTED("4ufjmlytpm2l2msb8zuxor8s2"); // agflatten_edges(g, n, flag); UNSUPPORTED("1mvsjktpob2pzvo0s5wp5hbl0"); // g->desc.flatlock = (0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 602i6cqy4kebb7g16m580nxsd // void agnotflat(Agraph_t * g) public static Object agnotflat(Object... arg) { UNSUPPORTED("cu099fjwopup8fb0dz3ob3yui"); // void agnotflat(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1whie4ln05zs17jprvbhgrw0o"); // if (g->desc.flatlock) UNSUPPORTED("bsprgtbeyh48e6897xrl9q004"); // agerr(AGERR, "flat lock broken"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/graph__c.java000066400000000000000000000522121312650303100216370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static gen.lib.cdt.dtextract__c.dtextract; import static gen.lib.cdt.dtrestore__c.dtrestore; import static gen.lib.cdt.dtsize__c.dtsize_; import static gen.lib.cgraph.attr__c.agraphattr_init; import static gen.lib.cgraph.edge__c.agsubrep; import static gen.lib.cgraph.id__c.agmapnametoid; import static gen.lib.cgraph.id__c.agregister; import static gen.lib.cgraph.node__c.agfstnode; import static gen.lib.cgraph.node__c.agnxtnode; import static gen.lib.cgraph.obj__c.agmethod_init; import static gen.lib.cgraph.obj__c.agroot; import static gen.lib.cgraph.subg__c.agparent; import static gen.lib.cgraph.utils__c.agdtopen; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGID; import static smetana.core.Macro.AGRAPH; import static smetana.core.Macro.AGSEQ; import static smetana.core.Macro.AGTYPE; import static smetana.core.Macro.ASINT; import static smetana.core.Macro.N; import static smetana.core.Macro.NOT; import static smetana.core.Macro.UNSUPPORTED; import h.Agclos_s; import h.Agdesc_s; import h.Agdisc_s; import h.Agmemdisc_s; import h.Agnode_s; import h.Agraph_s; import h.Agsubnode_s; import h.ST_Agdesc_s; import h._dt_s; import h._dtdisc_s; import h._dtlink_s; import smetana.core.ACCESS; import smetana.core.CString; import smetana.core.STARSTAR; import smetana.core.Z; import smetana.core.__ptr__; import smetana.core.__struct__; public class graph__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 ix101dcoysqmkv8bgsxsq8u1 // Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //1 ewderv8bx65jlxf61iw8en77s // const char AgraphVersion[] = //3 bb2bu9iyqx0u6xx44l282vmch // static Agclos_t *agclos(Agdisc_t * proto) public static Agclos_s agclos(Agdisc_s proto) { ENTERING("bb2bu9iyqx0u6xx44l282vmch","agclos"); try { Agmemdisc_s memdisc; __ptr__ memclosure; Agclos_s rv; /* establish an allocation arena */ memdisc = (Agmemdisc_s) ((proto != null && proto.getPtr("mem") != null) ? proto.getPtr("mem") : Z.z().AgMemDisc.amp()); memclosure = (__ptr__) memdisc.call("open", proto); rv = (Agclos_s) memdisc.call("alloc", memclosure, sizeof(Agclos_s.class)); rv.getStruct("disc").setPtr("mem", memdisc); rv.getStruct("state").setPtr("mem", memclosure); rv.getStruct("disc").setPtr("id", ((proto != null && proto.getPtr("id") != null) ? proto.getPtr("id") : Z.z().AgIdDisc.amp())); rv.getStruct("disc").setPtr("io", ((proto != null && proto.getPtr("io") != null) ? proto.getPtr("io") : Z.z().AgIdDisc.amp())); rv.setBoolean("callbacks_enabled", (N(0))); return rv; } finally { LEAVING("bb2bu9iyqx0u6xx44l282vmch","agclos"); } } //3 d5yqn56yii8cdoahswt4n6bug // Agraph_t *agopen(char *name, Agdesc_t desc, Agdisc_t * arg_disc) public static Agraph_s agopen(CString name, final __struct__ desc, Agdisc_s arg_disc) { // WARNING!! STRUCT return agopen_w_(name, desc.copy(), arg_disc); } private static Agraph_s agopen_w_(CString name, final __struct__ desc, Agdisc_s arg_disc) { ENTERING("d5yqn56yii8cdoahswt4n6bug","agopen"); try { Agraph_s g; Agclos_s clos; int gid[] = new int[1]; clos = agclos(arg_disc); g = (Agraph_s) clos.getStruct("disc").getPtr("mem").call("alloc", clos.getStruct("state").getPtr("mem"), sizeof(Agraph_s.class)); AGTYPE(g, AGRAPH); g.setPtr("clos", clos); g.setStruct("desc", desc); ((ST_Agdesc_s)g.getStruct("desc")).maingraph = ASINT((N(0))); g.setPtr("root", g); g.getPtr("clos").getStruct("state").setPtr("id", (__ptr__) g.getPtr("clos").getStruct("disc").getPtr("id").call("open", g, arg_disc)); if (agmapnametoid(g, AGRAPH, name, gid, (N(0)))!=0) AGID(g, gid[0]); // /* else AGID(g) = 0 because we have no alternatives */ g = agopen1(g); agregister(g, AGRAPH, g); return g; } finally { LEAVING("d5yqn56yii8cdoahswt4n6bug","agopen"); } } //3 8jyhwfdfm0a877qfz8cjlb8rk // Agraph_t *agopen1(Agraph_t * g) public static Agraph_s agopen1(Agraph_s g) { ENTERING("8jyhwfdfm0a877qfz8cjlb8rk","agopen1"); try { Agraph_s par; g.setPtr("n_seq", agdtopen(g, Z.z().Ag_subnode_seq_disc.amp(), Z.z().Dttree)); g.setPtr("n_id", agdtopen(g, Z.z().Ag_subnode_id_disc.amp(), Z.z().Dttree)); g.setPtr("e_seq", agdtopen(g, EQ(g, agroot(g))? Z.z().Ag_mainedge_seq_disc.amp() : Z.z().Ag_subedge_seq_disc.amp(), Z.z().Dttree)); g.setPtr("e_id", agdtopen(g, EQ(g, agroot(g))? Z.z().Ag_mainedge_id_disc.amp() : Z.z().Ag_subedge_id_disc.amp(), Z.z().Dttree)); g.setPtr("g_dict", agdtopen(g, Z.z().Ag_subgraph_id_disc.amp(), Z.z().Dttree)); par = agparent(g); if (par!=null) { AGSEQ(g, agnextseq(par, AGRAPH)); par.getPtr("g_dict").call("searchf", par.getPtr("g_dict"),g,0000001); } /* else AGSEQ=0 */ if (N(par) || ((ST_Agdesc_s)par.getStruct("desc")).has_attrs!=0) agraphattr_init(g); agmethod_init(g, g); return g; } finally { LEAVING("8jyhwfdfm0a877qfz8cjlb8rk","agopen1"); } } //3 dmhavsadfjootm2o8lnwizndm // int agclose(Agraph_t * g) public static Object agclose(Object... arg) { UNSUPPORTED("afwvyph6n53ckvxm8d8h7mfb8"); // int agclose(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bf3nmka0aaoswb2zwm0qee15o"); // Agraph_t *subg, *next_subg, *par; UNSUPPORTED("7qo66ph77ke8gsbowf6kwqjff"); // Agnode_t *n, *next_n; UNSUPPORTED("d7yov7q4cj5xaglc5czdcnix5"); // par = agparent(g); UNSUPPORTED("1u7cs2kb7x42iwswgskdrpk5m"); // if ((par == ((Agraph_t*)0)) && (((g)->clos->disc.mem)->close)) { UNSUPPORTED("6yjypc20njwrfp5bsnjhiiabf"); // /* free entire heap */ UNSUPPORTED("cmba0hmq318rx9h0jefkyen70"); // agmethod_delete(g, g); /* invoke user callbacks */ UNSUPPORTED("dbiair9ce3vkfb8s9l08pfx6w"); // agfreeid(g, AGRAPH, AGID(g)); UNSUPPORTED("2bdjy9rtybb0v767umxcnz6rs"); // ((g)->clos->disc.mem)->close(((g)->clos->state.mem)); /* whoosh */ UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2hk83bjq106e9rdcpxqbv9nnl"); // for (subg = agfstsubg(g); subg; subg = next_subg) { UNSUPPORTED("608ihpc2s8xb39yo654s19zxd"); // next_subg = agnxtsubg(subg); UNSUPPORTED("3noc43t4fqi4gollim1ygyuqh"); // agclose(subg); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6r3mocyf2tlkysyu64nxw0u9h"); // for (n = agfstnode(g); n; n = next_n) { UNSUPPORTED("3d2h3vjjw6x8w1joyvc3qlruy"); // next_n = agnxtnode(g, n); UNSUPPORTED("3xjgsp211uvaug1aa3mvpdlnc"); // agdelnode(g, n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1ia10h9dh09qjfarfdjx452gf"); // aginternalmapclose(g); UNSUPPORTED("ddezjv0si4sjtexy5kqfwqg9n"); // agmethod_delete(g, g); UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("5d72jwytwy7gvtmqynj5ndpyr"); // if (agdtclose(g, g->n_id)) return -1; UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("324yaisi4aejlbofpo08bx36u"); // if (agdtclose(g, g->n_seq)) return -1; UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("34xteu7bflgwy03788khpb2gb"); // if (agdtclose(g, g->e_id)) return -1; UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("6bwledkxe6algose4ob82o61"); // if (agdtclose(g, g->e_seq)) return -1; UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("d7yg3wo8tmofx0anjr742k191"); // if (agdtclose(g, g->g_dict)) return -1; UNSUPPORTED("l0tanhlxt2jokflxnd061z3y"); // if (g->desc.has_attrs) UNSUPPORTED("9jhznqh28rajdovcc58834278"); // if (agraphattr_delete(g)) return -1; UNSUPPORTED("a5y6rvdlz9o09pphxz38sbtna"); // agrecclose((Agobj_t *) g); UNSUPPORTED("crfg36z5yetflihtijtubwo8y"); // agfreeid(g, AGRAPH, AGID(g)); UNSUPPORTED("et9lswrohfsxngrn2xcefry4q"); // if (par) { UNSUPPORTED("dzboxj0ijphtqrm463tpbvkhx"); // agdelsubg(par, g); UNSUPPORTED("e7v29f5dzfhzrj9v4shzbcywi"); // agfree(par, g); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("5y8tww8901b1ro7bgu6r58vgr"); // Agmemdisc_t *memdisc; UNSUPPORTED("6ozvxgrg2q3sua4w4cnwun2hd"); // void *memclos, *clos; UNSUPPORTED("9i0i3wyt8alu21zy4mtvxxhj7"); // while (g->clos->cb) UNSUPPORTED("1y6k38rbnyl26lquznq5kass6"); // agpopdisc(g, g->clos->cb->f); UNSUPPORTED("8qcjv2uq7ztij51cy8b5r7yqr"); // ((g)->clos->disc.id)->close(((g)->clos->state.id)); UNSUPPORTED("px95fp6paiia8ts33pk4tph1"); // if (agstrclose(g)) return -1; UNSUPPORTED("2kp9gdc0xn3li7ibgz4x4lnmz"); // memdisc = ((g)->clos->disc.mem); UNSUPPORTED("8lo1wjoiak85adsa9fwxo62zl"); // memclos = ((g)->clos->state.mem); UNSUPPORTED("8n6pjmho9f28hof6v2v1lruyo"); // clos = g->clos; UNSUPPORTED("ets9jwr303m5yl6eqowve1loh"); // (memdisc->free) (memclos, g); UNSUPPORTED("d0v33cnucd6c13avcqkwy4wzc"); // (memdisc->free) (memclos, clos); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 axmdmml95l55vlp1vqmh0v5sn // unsigned long agnextseq(Agraph_t * g, int objtype) public static int agnextseq(Agraph_s g, int objtype) { ENTERING("axmdmml95l55vlp1vqmh0v5sn","agnextseq"); try { int tmp = g.getPtr("clos").getArrayOfInteger("seq").plus(objtype).getInt(); tmp++; g.getPtr("clos").getArrayOfInteger("seq").plus(objtype).setInt(tmp); return tmp; } finally { LEAVING("axmdmml95l55vlp1vqmh0v5sn","agnextseq"); } } //3 688euygrkbl10cveflgwalo2n // int agnnodes(Agraph_t * g) public static int agnnodes(Agraph_s g) { ENTERING("688euygrkbl10cveflgwalo2n","agnnodes"); try { return dtsize_((_dt_s)g.getPtr("n_id")); } finally { LEAVING("688euygrkbl10cveflgwalo2n","agnnodes"); } } //3 8zjne7uv8rfpmbv5t96zhnr4u // int agnedges(Agraph_t * g) public static int agnedges(Agraph_s g) { ENTERING("8zjne7uv8rfpmbv5t96zhnr4u","agnedges"); try { Agnode_s n; int rv = 0; for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) rv += agdegree(g, n, (false), (N(0))); /* must use OUT to get self-arcs */ return rv; } finally { LEAVING("8zjne7uv8rfpmbv5t96zhnr4u","agnedges"); } } //3 e1ndua2eo29tb0z93wrmamm3g // int agnsubg(Agraph_t * g) public static Object agnsubg(Object... arg) { UNSUPPORTED("5auwvgl2zekzvzu6p5413tqd0"); // int agnsubg(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("18u3kziious357fry7i0r4kg2"); // return dtsize(g->g_dict); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 blvn1w3v0icnucu5m5xvbrba1 // int agisdirected(Agraph_t * g) public static boolean agisdirected(Agraph_s g) { ENTERING("blvn1w3v0icnucu5m5xvbrba1","agisdirected"); try { return ((ST_Agdesc_s)g.getStruct("desc")).directed!=0; } finally { LEAVING("blvn1w3v0icnucu5m5xvbrba1","agisdirected"); } } //3 8thgds4eioot64flko26m8ns0 // int agisundirected(Agraph_t * g) public static boolean agisundirected(Agraph_s g) { ENTERING("8thgds4eioot64flko26m8ns0","agisundirected"); try { return (NOT(agisdirected(g))); } finally { LEAVING("8thgds4eioot64flko26m8ns0","agisundirected"); } } //3 9qgdebmdfrcfjm394bg59a7y5 // int agisstrict(Agraph_t * g) public static boolean agisstrict(Agraph_s g) { ENTERING("9qgdebmdfrcfjm394bg59a7y5","agisstrict"); try { return ((ST_Agdesc_s)g.getStruct("desc")).strict!=0; } finally { LEAVING("9qgdebmdfrcfjm394bg59a7y5","agisstrict"); } } //3 4zw0onm78e3x5anx7snfpe40m // int agissimple(Agraph_t * g) public static Object agissimple(Object... arg) { UNSUPPORTED("5khld3f380yzb9kztjfa00b7t"); // int agissimple(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9u553zzb7in07zdd55sdea2an"); // return (g->desc.strict && g->desc.no_loop); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 abaldeo2ie6zi60cazxp7rv47 // static int cnt(Dict_t * d, Dtlink_t ** set) public static int cnt(_dt_s d, STARSTAR<_dtlink_s> set) { ENTERING("abaldeo2ie6zi60cazxp7rv47","cnt"); try { int rv; dtrestore(d, set.getMe()); rv = dtsize_(d); set.setMe(dtextract(d)); return rv; } finally { LEAVING("abaldeo2ie6zi60cazxp7rv47","cnt"); } } //3 crupee5rve7q7m335ngnqsb39 // int agcountuniqedges(Agraph_t * g, Agnode_t * n, int want_in, int want_out) public static Object agcountuniqedges(Object... arg) { UNSUPPORTED("47c9iab9p596xa2xrkcgmepw0"); // int agcountuniqedges(Agraph_t * g, Agnode_t * n, int want_in, int want_out) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("2llbfi4jrmre7cyhu90pgcm72"); // Agsubnode_t *sn; UNSUPPORTED("en7ch189nkys76f42mlo1s5zz"); // int rv = 0; UNSUPPORTED("b0wzl2qtz6anq1dhlxtmvwvgn"); // sn = agsubrep(g, n); UNSUPPORTED("e0cr7vhmu27121z5m8qtchlwn"); // if (want_out) rv = cnt(g->e_seq,&(sn->out_seq)); UNSUPPORTED("4gu3qg6aqwexl6ysrfrqko4z8"); // if (want_in) { UNSUPPORTED("3r5t38hbcwvc5hpus6062r7ic"); // if (!want_out) rv += cnt(g->e_seq,&(sn->in_seq)); /* cheap */ UNSUPPORTED("6p5yaaxfj7183iw2v0uuruh56"); // else { /* less cheap */ UNSUPPORTED("7jxxmlwkqih7nv6yrum6qhfe0"); // for (e = agfstin(g, n); e; e = agnxtin(g, e)) UNSUPPORTED("73lyxs2pp1e0s95qdz9vgc5iy"); // if (e->node != n) rv++; /* don't double count loops */ UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2bz40qf0qo7pd6er1ut25gthp // int agdegree(Agraph_t * g, Agnode_t * n, int want_in, int want_out) public static int agdegree(Agraph_s g, Agnode_s n, boolean want_in, boolean want_out) { ENTERING("2bz40qf0qo7pd6er1ut25gthp","agdegree"); try { Agsubnode_s sn; int rv = 0; sn = agsubrep(g, n); final Agsubnode_s sn1 = sn; if (sn!=null) { if (want_out) rv += cnt((_dt_s)g.getPtr("e_seq"), STARSTAR.amp(new ACCESS<_dtlink_s>() { public _dtlink_s get() { return (_dtlink_s) sn1.getPtr("out_seq"); } public void set(_dtlink_s obj) { sn1.setPtr("out_seq", obj); }}) ); if (want_in) rv += cnt((_dt_s)g.getPtr("e_seq"), STARSTAR.amp(new ACCESS<_dtlink_s>() { public _dtlink_s get() { return (_dtlink_s) sn1.getPtr("in_seq"); } public void set(_dtlink_s obj) { sn1.setPtr("in_seq", obj); }}) ); } return rv; } finally { LEAVING("2bz40qf0qo7pd6er1ut25gthp","agdegree"); } } //3 dhbtfzzp8n5yygqmhmluo9bxl // int agraphidcmpf(Dict_t * d, void *arg0, void *arg1, Dtdisc_t * disc) public static int agraphidcmpf(_dt_s d, __ptr__ arg0, __ptr__ arg1, _dtdisc_s disc) { ENTERING("dhbtfzzp8n5yygqmhmluo9bxl","agraphidcmpf"); try { int v; Agraph_s sg0, sg1; sg0 = (Agraph_s) arg0; sg1 = (Agraph_s) arg1; v = (AGID(sg0) - AGID(sg1)); return ((v==0)?0:(v<0?-1:1)); } finally { LEAVING("dhbtfzzp8n5yygqmhmluo9bxl","agraphidcmpf"); } } //3 llkcwaxuse8jc2ri7r9n6t0c // int agraphseqcmpf(Dict_t * d, void *arg0, void *arg1, Dtdisc_t * disc) public static Object agraphseqcmpf(Object... arg) { UNSUPPORTED("97lu4ei4gjam66ku5pz8dn7il"); // int agraphseqcmpf(Dict_t * d, void *arg0, void *arg1, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ccl2joincnprtk47hwmpz1o7n"); // long v; UNSUPPORTED("73bfha5x7xhgp9p6wxa9jap6j"); // Agraph_t *sg0, *sg1; UNSUPPORTED("e8rx1ahgpoym3u3v0jgarn58y"); // sg0 = (Agraph_t *) arg0; UNSUPPORTED("bc6x70wml3jh4l4ana92njtid"); // sg1 = (Agraph_t *) arg1; UNSUPPORTED("4afy6g5l0jng6m6l3abdyuk80"); // v = (AGSEQ(sg0) - AGSEQ(sg1)); UNSUPPORTED("2tgj1svqq4v5mqo7525nw7icj"); // return ((v==0)?0:(v<0?-1:1)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 cqgilvgau98cgaulohsii8vx4 // Dtdisc_t Ag_subgraph_id_disc = /*static final public __struct__<_dtdisc_s> Ag_subgraph_id_disc = JUtils.from(_dtdisc_s.class); static { Ag_subgraph_id_disc.setInt("key", 0); Ag_subgraph_id_disc.setInt("size", 0); Ag_subgraph_id_disc.setInt("link", OFFSET.create(Agraph_s.class, "link").toInt()); // link is the third field in Agraph_t Ag_subgraph_id_disc.setPtr("makef", null); Ag_subgraph_id_disc.setPtr("freef", null); Ag_subgraph_id_disc.setPtr("comparf", function(graph__c.class, "agraphidcmpf")); Ag_subgraph_id_disc.setPtr("hashf", null); Ag_subgraph_id_disc.setPtr("memoryf", function(utils__c.class, "agdictobjmem")); Ag_subgraph_id_disc.setPtr("eventf", null); }*/ //1 98aldesvg4i0qxoidbuanebv7 // Agdesc_t Agdirected = /*static final public __struct__ Agdirected = JUtils.from(Agdesc_s.class); static { Agdirected.setInt("directed", 1); Agdirected.setInt("strict", 0); Agdirected.setInt("no_loop", 0); Agdirected.setInt("maingraph", 1); }*/ //1 4fbe4dfrxvwi5l1l4rb30s9o8 // Agdesc_t Agstrictdirected = //1 5rysra3mrm6tscdrjbg5rhyuu // Agdesc_t Agundirected = //1 2x0008zd99c6pdbwdqnv7yjcz // Agdesc_t Agstrictundirected = //1 biws2qqe0e0xqmwdmfuvdopo3 // Agdisc_t AgDefaultDisc = //3 4rhqd5bl4tiypdakk2hhpsj7s // void scndump(Agraph_t *g, char *file) public static Object scndump(Object... arg) { UNSUPPORTED("7e937yycgb0eiorckxpq4qqwo"); // void scndump(Agraph_t *g, char *file) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("38goe38ctv7d6jktnwysyagy8"); // FILE * f = fopen(file,"w"); UNSUPPORTED("7luati80gyuf0ex40qi3bjkkp"); // if (f) {agwrite(g,f); fclose(f);} UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/id__c.java000066400000000000000000000300421312650303100211270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static gen.lib.cgraph.imap__c.aginternalmapinsert; import static gen.lib.cgraph.imap__c.aginternalmaplookup; import static gen.lib.cgraph.imap__c.aginternalmapprint; import static gen.lib.cgraph.obj__c.agraphof; import static gen.lib.cgraph.refstr__c.agstrbind; import static gen.lib.cgraph.refstr__c.agstrdup; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGEDGE; import static smetana.core.Macro.AGID; import static smetana.core.Macro.AGTYPE; import static smetana.core.Macro.ASINT; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import h.Agdisc_s; import h.Agobj_s; import h.Agraph_s; import smetana.core.CString; import smetana.core.Memory; import smetana.core.Z; import smetana.core.__ptr__; public class id__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //3 a0a2zxsu8n019hzm1rwf1jc7f // static void *idopen(Agraph_t * g, Agdisc_t* disc) public static Object idopen(Agraph_s g, Agdisc_s disc) { ENTERING("a0a2zxsu8n019hzm1rwf1jc7f","idopen"); try { return g; } finally { LEAVING("a0a2zxsu8n019hzm1rwf1jc7f","idopen"); } } //3 lsl0c1gejls1wv04ga6xy2cf // static long idmap(void *state, int objtype, char *str, unsigned long *id, int createflag) //static int ctr = 1; public static int idmap(Object state, int objtype, CString str, int id[], boolean createflag) { ENTERING("lsl0c1gejls1wv04ga6xy2cf","idmap"); try { CString s; if (str!=null) { Agraph_s g; g = (Agraph_s) state; if (createflag) s = agstrdup(g, str); else s = agstrbind(g, str); id[0] = Memory.identityHashCode(s); } else { id[0] = Z.z().ctr; Z.z().ctr += 2; } return ASINT(N(0)); } finally { LEAVING("lsl0c1gejls1wv04ga6xy2cf","idmap"); } } //3 8ynmf2fueegi7vjejal3ri1ax // static long idalloc(void *state, int objtype, unsigned long request) public static Object idalloc(Object... arg) { UNSUPPORTED("1z2o91qjhxg0zcs8vgzyl9bf1"); // static long idalloc(void *state, int objtype, unsigned long request) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2s0qc9g3dasd7eqa3rhtlxrae"); // (void) state; UNSUPPORTED("x0ltcg0hfp8jlgbjde43bdwj"); // (void) objtype; UNSUPPORTED("6xs9bwnce34njm5w424uwon6d"); // (void) request; UNSUPPORTED("297p5iu8oro94tdg9v29bbgiw"); // return (0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5fsdlq8w38bfd7gtwz1z8arad // static void idfree(void *state, int objtype, unsigned long id) public static Object idfree(Object... arg) { UNSUPPORTED("adq5fviqjzpkxrjt37qxo1ywh"); // static void idfree(void *state, int objtype, unsigned long id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("x0ltcg0hfp8jlgbjde43bdwj"); // (void) objtype; UNSUPPORTED("e3dd233viwus8xrkad68a1qhr"); // if (id % 2 == 0) UNSUPPORTED("69x6bjndheh46syz632mlu192"); // agstrfree((Agraph_t *) state, (char *) id); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8143j507ej7uqqjzw5i32xej5 // static char *idprint(void *state, int objtype, unsigned long id) public static CString idprint(__ptr__ state, int objtype, int id) { ENTERING("8143j507ej7uqqjzw5i32xej5","idprint"); try { if (id % 2 == 0) return (CString) Memory.fromIdentityHashCode(id); else return null; } finally { LEAVING("8143j507ej7uqqjzw5i32xej5","idprint"); } } //3 44seyu1scoubb1wsuhwlghwyz // static void idclose(void *state) public static Object idclose(Object... arg) { UNSUPPORTED("18oh21h7t6fg06ozg64u87nyu"); // static void idclose(void *state) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2s0qc9g3dasd7eqa3rhtlxrae"); // (void) state; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5bjqo0ihl0x25vaspoiehmwzk // static void idregister(void *state, int objtype, void *obj) public static void idregister(Object state, int objtype, Object obj) { ENTERING("5bjqo0ihl0x25vaspoiehmwzk","idregister"); try { } finally { LEAVING("5bjqo0ihl0x25vaspoiehmwzk","idregister"); } } //1 cxrk51474ugltvklkcvp3v2ly // Agiddisc_t AgIdDisc = /*public final static __struct__ AgIdDisc = JUtils.from(Agiddisc_s.class); static { AgIdDisc.setPtr("open", function(id__c.class, "idopen")); AgIdDisc.setPtr("map", function(id__c.class, "idmap")); AgIdDisc.setPtr("alloc", function(id__c.class, "idalloc")); AgIdDisc.setPtr("free", function(id__c.class, "idfree")); AgIdDisc.setPtr("print", function(id__c.class, "idprint")); AgIdDisc.setPtr("close", function(id__c.class, "idclose")); AgIdDisc.setPtr("idregister", function(id__c.class, "idregister")); }*/ //3 aq30wwcj4ugatsgx0zdtdmeed // int agmapnametoid(Agraph_t * g, int objtype, char *str, unsigned long *result, int createflag) public static int agmapnametoid(Agraph_s g, int objtype, CString str, int result[], boolean createflag) { ENTERING("aq30wwcj4ugatsgx0zdtdmeed","agmapnametoid"); try { int rv; if (str!=null && (str.charAt(0) != '%')) { rv = (Integer) g.getPtr("clos").getStruct("disc").getPtr("id").call("map", g.getPtr("clos").getStruct("state").getPtr("id"), objtype, str, result, createflag); if (rv!=0) return rv; } /* either an internal ID, or disc. can't map strings */ if (str!=null) { rv = aginternalmaplookup(g, objtype, str, result); if (rv!=0) return rv; } else rv = 0; if (createflag) { /* get a new anonymous ID, and store in the internal map */ rv = (Integer) g.getPtr("clos").getStruct("disc").getPtr("id").call("map", g.getPtr("clos").getStruct("state").getPtr("id"), objtype, null, result, createflag); if (rv!=0 && str!=null) aginternalmapinsert(g, objtype, str, result[0]); } return rv; } finally { LEAVING("aq30wwcj4ugatsgx0zdtdmeed","agmapnametoid"); } } //3 dwufsd296z6lfmtm7fp4e3tk7 // int agallocid(Agraph_t * g, int objtype, unsigned long request) public static Object agallocid(Object... arg) { UNSUPPORTED("5i7l75ugdm5j5c4xtqqk9atdd"); // int agallocid(Agraph_t * g, int objtype, unsigned long request) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dlf21dkccrftu3zc0t5amuwu4"); // return ((g)->clos->disc.id)->alloc(((g)->clos->state.id), objtype, request); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cfub4osftc8djs88cq592feu3 // void agfreeid(Agraph_t * g, int objtype, unsigned long id) public static Object agfreeid(Object... arg) { UNSUPPORTED("4hpxv4j7rcvj3lrbvu2e0hus4"); // void agfreeid(Agraph_t * g, int objtype, unsigned long id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3s1vo79t7lt6fm1bimxdpbqj"); // (void) aginternalmapdelete(g, objtype, id); UNSUPPORTED("dm45ri059viqxsb08rmvo60y1"); // (((g)->clos->disc.id)->free) (((g)->clos->state.id), objtype, id); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cctsybrl54fy799aynfej4iiy // char *agnameof(void *obj) // private static char buf[32]; public static CString agnameof(__ptr__ obj) { ENTERING("cctsybrl54fy799aynfej4iiy","agnameof"); try { Agraph_s g; CString rv; /* perform internal lookup first */ g = agraphof(obj); if ((rv = aginternalmapprint(g, AGTYPE(obj), AGID(obj)))!=null) return rv; if (g.getPtr("clos").getStruct("disc").getPtr("id").getPtr("print")!=null) { if ((rv = (CString) g.getPtr("clos").getStruct("disc").getPtr("id").call("print", g.getPtr("clos").getStruct("state").getPtr("id"), AGTYPE(obj), AGID(obj)))!=null) return rv; } if (AGTYPE(obj) != AGEDGE) { rv = new CString("%"+obj.castTo(Agobj_s.class).getStruct("tag").getInt("id")); } else rv = null; return rv; } finally { LEAVING("cctsybrl54fy799aynfej4iiy","agnameof"); } } //3 emt63ldde99jnwe2vvjal9kt9 // void agregister(Agraph_t * g, int objtype, void *obj) public static void agregister(Agraph_s g, int objtype, Object obj) { ENTERING("emt63ldde99jnwe2vvjal9kt9","agregister"); try { g.getPtr("clos").getStruct("disc").getPtr("id").call("idregister", g.getPtr("clos").getStruct("state").getPtr("id"), objtype, obj); } finally { LEAVING("emt63ldde99jnwe2vvjal9kt9","agregister"); } } } plantuml-1.2017.15/src/gen/lib/cgraph/imap__c.java000066400000000000000000000360331312650303100214670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGEDGE; import static smetana.core.Macro.AGINEDGE; import static smetana.core.Macro.UNSUPPORTED; import h.Agraph_s; import h.IMapEntry_t; import h._dt_s; import smetana.core.CString; import smetana.core.Memory; public class imap__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //3 79n6elfqk1vw36hmv7bxlrb0v // static int idcmpf(Dict_t * d, void *arg_p0, void *arg_p1, Dtdisc_t * disc) public static Object idcmpf(Object... arg) { UNSUPPORTED("1r7psgafk53qtogr4ft1z3lze"); // static int idcmpf(Dict_t * d, void *arg_p0, void *arg_p1, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4ntp67b3zenb7lwin6la68y9g"); // IMapEntry_t *p0, *p1; UNSUPPORTED("6z29omss9ay00bqf6xael7t6t"); // (void) d; UNSUPPORTED("44n3fpcv1bzssspskdg8kbbz4"); // p0 = arg_p0; UNSUPPORTED("4tgwqnnain0i2lv7it6su8k8q"); // p1 = arg_p1; UNSUPPORTED("8l8wg6vltx6d7vc9dzqb6n3wi"); // (void) disc; UNSUPPORTED("49gg5v29upcoktnre7tua6o3j"); // return (p0->id - p1->id); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aadw62b6y0d22xf4720pzdiyz // static int namecmpf(Dict_t * d, void *arg_p0, void *arg_p1, Dtdisc_t * disc) public static Object namecmpf(Object... arg) { UNSUPPORTED("7ouzah61jyng2a8u8dfdxeekw"); // static int namecmpf(Dict_t * d, void *arg_p0, void *arg_p1, UNSUPPORTED("3hfqv3wxw19wel6xzpj1kbshb"); // Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4ntp67b3zenb7lwin6la68y9g"); // IMapEntry_t *p0, *p1; UNSUPPORTED("6z29omss9ay00bqf6xael7t6t"); // (void) d; UNSUPPORTED("44n3fpcv1bzssspskdg8kbbz4"); // p0 = arg_p0; UNSUPPORTED("4tgwqnnain0i2lv7it6su8k8q"); // p1 = arg_p1; UNSUPPORTED("8l8wg6vltx6d7vc9dzqb6n3wi"); // (void) disc; UNSUPPORTED("eb7z4ayiwked6cpuntm496002"); // return (p0->str - p1->str); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 cvijg1ekkl36sildxxf28vhug // static Dtdisc_t LookupByName = //1 dkzjlpsv4zk993r3iyo7msr8n // static Dtdisc_t LookupById = //3 mx2krtbgfhcihopw9rw8kcv3 // int aginternalmaplookup(Agraph_t * g, int objtype, char *str, unsigned long *result) public static int aginternalmaplookup(Agraph_s g, int objtype, CString str, int result[]) { ENTERING("mx2krtbgfhcihopw9rw8kcv3","aginternalmaplookup"); try { UNSUPPORTED("9xuzgjxqveawe6v2n4x48r93l"); // int aginternalmaplookup(Agraph_t * g, int objtype, char *str, UNSUPPORTED("a9jw0mphzrt0q739cxcgk2hxw"); // unsigned long *result) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("l4y6zpshfefue2m18wlswfkp"); // Dict_t *d; UNSUPPORTED("6ich6qfkkifpsux1v4vgzhiyb"); // IMapEntry_t *sym, template; UNSUPPORTED("4uffdlbjda8w15jyto7gd77bw"); // char *search_str; UNSUPPORTED("84sccu12ven74lipf2dljgik4"); // if (objtype == AGINEDGE) UNSUPPORTED("5q9qhv35w1rsuiuzqkwgshm3p"); // objtype = AGEDGE; UNSUPPORTED("drm2n6i20x3uimml5ooxm9u25"); // if ((d = g->clos->lookup_by_name[objtype])) { UNSUPPORTED("9ysphludc93c139uov8ximaj2"); // if ((search_str = agstrbind(g, str))) { UNSUPPORTED("73apfmwxngxpf2twqiokd75ph"); // template.str = search_str; UNSUPPORTED("1r11yngj3z66q9h8k7rx0ifra"); // sym = (IMapEntry_t *) (*(((Dt_t*)(d))->searchf))((d),(void*)(&template),0000004); UNSUPPORTED("8watgmdse1o9uhfuhoexemnl2"); // if (sym) { UNSUPPORTED("68xn6zrkilfqqsosou3z2ym7o"); // *result = sym->id; UNSUPPORTED("a1a1uhff21noh1htwzn6yp831"); // return (!(0)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("297p5iu8oro94tdg9v29bbgiw"); // return (0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("mx2krtbgfhcihopw9rw8kcv3","aginternalmaplookup"); } } //3 ce8fo5gya95enhgssezqs3vav // void aginternalmapinsert(Agraph_t * g, int objtype, char *str, unsigned long id) public static Object aginternalmapinsert(Object... arg) { UNSUPPORTED("bk4ucrzua03gr9lak6zfm3orp"); // void aginternalmapinsert(Agraph_t * g, int objtype, char *str, UNSUPPORTED("18mfx819yhg1vg5xkrfjr96x2"); // unsigned long id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bh4b0zdn246m225u6zmdk75zs"); // IMapEntry_t *ent; UNSUPPORTED("84hwqfygghmcbo2exzo01t93o"); // Dict_t *d_name_to_id, *d_id_to_name; UNSUPPORTED("7wtz0h3ahdkrul4dbb0b7y0l4"); // ent = ((IMapEntry_t*)(agalloc(g,sizeof(IMapEntry_t)))); UNSUPPORTED("6nwwse4s1ba0m9jfptthwwjbj"); // ent->id = id; UNSUPPORTED("d8vvc9mhtu43xfmzodcja9bu9"); // ent->str = agstrdup(g, str); UNSUPPORTED("84sccu12ven74lipf2dljgik4"); // if (objtype == AGINEDGE) UNSUPPORTED("5q9qhv35w1rsuiuzqkwgshm3p"); // objtype = AGEDGE; UNSUPPORTED("cdo42je1dwhjo7hka7tk4bu20"); // if ((d_name_to_id = g->clos->lookup_by_name[objtype]) == ((Dict_t *)0)) UNSUPPORTED("7tkuaa0dee3i2mkwj7ba9bmyj"); // d_name_to_id = g->clos->lookup_by_name[objtype] = UNSUPPORTED("5em5y2jcl61223aawnzfqj4a0"); // agdtopen(g, &LookupByName, Dttree); UNSUPPORTED("4x4ql6no5kg3qbek3o45fn7nx"); // if ((d_id_to_name = g->clos->lookup_by_id[objtype]) == ((Dict_t *)0)) UNSUPPORTED("7tmtjlukhbvxyxkd08ijr2m47"); // d_id_to_name = g->clos->lookup_by_id[objtype] = UNSUPPORTED("bnhc1g7rce6un1du4m54v8m5r"); // agdtopen(g, &LookupById, Dttree); UNSUPPORTED("1y4a6gz63nnj0k1ip32krystr"); // (*(((Dt_t*)(d_name_to_id))->searchf))((d_name_to_id),(void*)(ent),0000001); UNSUPPORTED("6d4vd73oyoit1sj5kt1otroy9"); // (*(((Dt_t*)(d_id_to_name))->searchf))((d_id_to_name),(void*)(ent),0000001); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3r16pkjiksv8i7o961ltxyge6 // static IMapEntry_t *find_isym(Agraph_t * g, int objtype, unsigned long id) public static IMapEntry_t find_isym(Agraph_s g, int objtype, int id) { ENTERING("3r16pkjiksv8i7o961ltxyge6","find_isym"); try { _dt_s d; IMapEntry_t isym, itemplate = (IMapEntry_t) Memory.malloc(IMapEntry_t.class); if (objtype == AGINEDGE) objtype = AGEDGE; if ((d = (_dt_s) g.getPtr("clos").getArrayOfPtr("lookup_by_id").plus(objtype).getPtr())!=null) { itemplate.setInt("id", id); isym = (IMapEntry_t) UNSUPPORTED("(IMapEntry_t *) (*(((Dt_t*)(d))->searchf))((d),(void*)(&itemplate),0000004)"); } else isym = null; return isym; } finally { LEAVING("3r16pkjiksv8i7o961ltxyge6","find_isym"); } } //3 foe6bvtujfevsc0f3m8aqln8 // char *aginternalmapprint(Agraph_t * g, int objtype, unsigned long id) public static CString aginternalmapprint(Agraph_s g, int objtype, int id) { ENTERING("foe6bvtujfevsc0f3m8aqln8","aginternalmapprint"); try { IMapEntry_t isym; if ((isym = find_isym(g, objtype, id))!=null) return isym.getCString("str"); return null; } finally { LEAVING("foe6bvtujfevsc0f3m8aqln8","aginternalmapprint"); } } //3 5tlg05avf32knqysibbic9jou // int aginternalmapdelete(Agraph_t * g, int objtype, unsigned long id) public static Object aginternalmapdelete(Object... arg) { UNSUPPORTED("19jjvbvuhgwuct5d89a9klzdn"); // int aginternalmapdelete(Agraph_t * g, int objtype, unsigned long id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4s0k0w2gqymjv4rw9e0p94o4e"); // IMapEntry_t *isym; UNSUPPORTED("84sccu12ven74lipf2dljgik4"); // if (objtype == AGINEDGE) UNSUPPORTED("5q9qhv35w1rsuiuzqkwgshm3p"); // objtype = AGEDGE; UNSUPPORTED("60rw9rftet6cvrlc5sv6cdvzo"); // if ((isym = find_isym(g, objtype, id))) { UNSUPPORTED("6nag2b59botfmnvg4y14s6nez"); // (*(((Dt_t*)(g->clos->lookup_by_name[objtype]))->searchf))((g->clos->lookup_by_name[objtype]),(void*)(isym),0000002); UNSUPPORTED("dsg36gwsles2ud2bgcuw50yi3"); // (*(((Dt_t*)(g->clos->lookup_by_id[objtype]))->searchf))((g->clos->lookup_by_id[objtype]),(void*)(isym),0000002); UNSUPPORTED("avjuzl03gu3mel3wyty6geq69"); // agstrfree(g, isym->str); UNSUPPORTED("6pld2z1bhfc2yevvzc4kxx508"); // agfree(g, isym); UNSUPPORTED("3adr32h5e1fehu4g7j2u24asz"); // return (!(0)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("297p5iu8oro94tdg9v29bbgiw"); // return (0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2wanqmzppni4zd3mlb6pkou1k // void aginternalmapclearlocalnames(Agraph_t * g) public static Object aginternalmapclearlocalnames(Object... arg) { UNSUPPORTED("bkfxi88xlzuzwi4a9iqo8pn28"); // void aginternalmapclearlocalnames(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("9lx77yi3grxo0pchpg8wba5f6"); // IMapEntry_t *sym, *nxt; UNSUPPORTED("1y1imymtcoka6zqsrmg5hocbt"); // Dict_t **d_name; UNSUPPORTED("1lwdd78io6jcv1vyvj9qa9xwd"); // /* Dict_t **d_id; */ UNSUPPORTED("6qvjz1ziwr3nwocahqvfzw14t"); // Ag_G_global = g; UNSUPPORTED("e68mfs18sqlfouc92k24w2fz7"); // d_name = g->clos->lookup_by_name; UNSUPPORTED("1upc73ikk3g0k2b325lrtornr"); // /* d_id = g->clos->lookup_by_id; */ UNSUPPORTED("11oml6vi9s4la6fgcck9ta2y8"); // for (i = 0; i < 3; i++) { UNSUPPORTED("6h2zc4egoha1kvb86bjeoan7b"); // if (d_name[i]) { UNSUPPORTED("252siiega2i0vhnempk3jj5gq"); // for (sym = (*(((Dt_t*)(d_name[i]))->searchf))((d_name[i]),(void*)(0),0000200); sym; sym = nxt) { UNSUPPORTED("9a5rzjs7wyb31qrzau41skcch"); // nxt = (*(((Dt_t*)(d_name[i]))->searchf))((d_name[i]),(void*)(sym),0000010); UNSUPPORTED("620abwca2qrecak9ujprv3erj"); // if (sym->str[0] == '%') UNSUPPORTED("2ys9vkqvwbp3l4dlnzxecpufu"); // aginternalmapdelete(g, i, sym->id); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 exx9lnei1gnd60cuddc52z7i9 // static void closeit(Dict_t ** d) public static Object closeit(Object... arg) { UNSUPPORTED("dg5p1tjrd085naw1mo4ichi6q"); // static void closeit(Dict_t ** d) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("11oml6vi9s4la6fgcck9ta2y8"); // for (i = 0; i < 3; i++) { UNSUPPORTED("dx4pjim9y4f2jtcu836j38fq8"); // if (d[i]) { UNSUPPORTED("2zjj5fsuyj57whze7pm4bef4e"); // dtclose(d[i]); UNSUPPORTED("5z84h9gs3klhayayencls3cd3"); // d[i] = ((Dict_t *)0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5dw1m5wgietdxy22txx0l20ph // void aginternalmapclose(Agraph_t * g) public static Object aginternalmapclose(Object... arg) { UNSUPPORTED("bdxp6h1xs4z2wt83fv2a3w0y2"); // void aginternalmapclose(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6qvjz1ziwr3nwocahqvfzw14t"); // Ag_G_global = g; UNSUPPORTED("9mn11z09mil44jhvfaju1n7i5"); // closeit(g->clos->lookup_by_name); UNSUPPORTED("74lp49loz9ng7u2mjovdv1wd5"); // closeit(g->clos->lookup_by_id); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/io__c.java000066400000000000000000000220731312650303100211470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static smetana.core.Macro.UNSUPPORTED; public class io__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //3 b0a8zjzqjkvaiqw5i1y82wmzl // static int iofread(void *chan, char *buf, int bufsize) public static Object iofread(Object... arg) { UNSUPPORTED("bmcd2lihkoyncyz2t8p1ilwhr"); // static int iofread(void *chan, char *buf, int bufsize) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("26gbavw0p5ppjkmaget64xm52"); // if (fgets(buf, bufsize, (FILE*)chan)) UNSUPPORTED("5o3cqxldbu1xnd5mgvbj1qy3s"); // return strlen(buf); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("eutkjban02p11hojrf12g0st9"); // /* return read(fileno((FILE *) chan), buf, bufsize); */ UNSUPPORTED("9xshhqhkyhgj8lsjfl6myd036"); // /* return fread(buf, 1, bufsize, (FILE*)chan); */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 91y9tcvbxti1ic9nine083re2 // static int ioputstr(void *chan, const char *str) public static Object ioputstr(Object... arg) { UNSUPPORTED("2inl53c1xtplxmq6bmhva91ld"); // static int ioputstr(void *chan, const char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4jzhyye95tludl3z1b0hqg16y"); // return fputs(str, (FILE *) chan); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 atp6gxqi8j9nz39ry13puhwck // static int ioflush(void *chan) public static Object ioflush(Object... arg) { UNSUPPORTED("elxcueeu6temiev9ncf78kvoq"); // static int ioflush(void *chan) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8803glp5cz89v6gvc897n9kjs"); // return fflush((FILE *) chan); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 2qjm4okqgeuarw1i5krezrxiq // Agiodisc_t AgIoDisc = //3 b6znej4isyhxv8vcdyjnnhlpu // static int memiofread(void *chan, char *buf, int bufsize) public static Object memiofread(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("cvqc79yfz9kp49vi5uimqh4jl"); // memiofread(void *chan, char *buf, int bufsize) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("d66gzmbwgtbpy6ofjgqa41k5z"); // const char *ptr; UNSUPPORTED("7qpxboqf01dwsthlblwmt7abt"); // char *optr; UNSUPPORTED("wrvu9u7a8j6i6y6552zncxfk"); // char c; UNSUPPORTED("apjzivxhs9d0uxff51eym3g5y"); // int l; UNSUPPORTED("chj5f26gtak38l7rsif9tg2ef"); // rdr_t *s; UNSUPPORTED("chvo71lh9m3y44gq6waktkbh9"); // if (bufsize == 0) return 0; UNSUPPORTED("44j7d8p5naz440e73iup8jpiw"); // s = (rdr_t *) chan; UNSUPPORTED("dod41gsjapxzma7a71g52qjyv"); // if (s->cur >= s->len) UNSUPPORTED("egywkvzo2t847qnathqnanvcj"); // return 0; UNSUPPORTED("5fb3yrbuopnj8web61578myje"); // l = 0; UNSUPPORTED("4wkgx9rod3b8e1pxs5zhmavgr"); // ptr = s->data + s->cur; UNSUPPORTED("3mp6u4df68hahvdziio4exbae"); // optr = buf; UNSUPPORTED("lavqvwvsy9irf1laq0kebdbe"); // /* We know we have at least one character */ UNSUPPORTED("d9o980efrtbwu0i78c437f5bo"); // c = *ptr++; UNSUPPORTED("53kc41p479auwcycfsbhw8xix"); // do { UNSUPPORTED("22g9b5gxmlzveusouzcsxmazx"); // *optr++ = c; UNSUPPORTED("5xjaxhd59ghk4wid321bwwtu"); // l++; UNSUPPORTED("bghzvix8cn8psfx1zg00ral21"); // /* continue if c is not newline, we have space in buffer, UNSUPPORTED("ewvfix29v48zrdfokvs94fg22"); // * and next character is non-null (we are working with UNSUPPORTED("2tcf5k4so7geiwyrcd857b0kd"); // * null-terminated strings. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("4fyi2jay0vaa7egiypve395lt"); // } while ((c != '\n') && (l < bufsize) && (c = *ptr++)); UNSUPPORTED("20veathk82tfin58bt3ybegax"); // s->cur += l; UNSUPPORTED("bx6jd8tbmxxxpdfz7u9rtlds"); // return l; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 a56p4nhhkzxgzqx4hqbsff5hf // static Agiodisc_t memIoDisc = //3 7hpggznawe61je0f77vzdulun // Agraph_t *agmemread(const char *cp) public static Object agmemread(Object... arg) { UNSUPPORTED("8gnhy5r408vxior7h2ddxp3ea"); // Agraph_t *agmemread(const char *cp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c9h1fo1uvas6uw1a8qaapnln6"); // Agraph_t* g; UNSUPPORTED("dv8xv53262iml39dlwafnq6yt"); // rdr_t rdr; UNSUPPORTED("act2n9l38mora4yp0ugd1sls4"); // Agdisc_t disc; UNSUPPORTED("x8365fstttag0j2sqo0x3z5k"); // memIoDisc.putstr = AgIoDisc.putstr; UNSUPPORTED("4kd68cbbycb36shew6gwdjehp"); // memIoDisc.flush = AgIoDisc.flush; UNSUPPORTED("asg6rxpzyrml0xjz6cw88nqdh"); // rdr.data = cp; UNSUPPORTED("ctbbb0s3tmdhmku71n493w07s"); // rdr.len = strlen(cp); UNSUPPORTED("3q856gggmhurx21iopk4q87dy"); // rdr.cur = 0; UNSUPPORTED("ar2u0bmktm68f4m00re7e6fl"); // disc.mem = &AgMemDisc; UNSUPPORTED("5m3cyfe6krwfilumr36kzfzx6"); // disc.id = &AgIdDisc; UNSUPPORTED("7pv4zby7sodjfrg6kryf7uwzt"); // disc.io = &memIoDisc; UNSUPPORTED("ewezfoxsntzvfqh08khv37zt7"); // g = agread (&rdr, &disc); UNSUPPORTED("2syri7q5tc0jyvwq8ecyfo3vr"); // return g; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/main__c.java000066400000000000000000000123101312650303100214550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static smetana.core.Macro.UNSUPPORTED; public class main__c { //3 6odliptr9wa623cqopkvk2jli // static void my_ins(Agraph_t * g, Agobj_t * obj, void *context) public static Object my_ins(Object... arg) { UNSUPPORTED("c7iv5iry7vbk7hni09hhaowd5"); // static void my_ins(Agraph_t * g, Agobj_t * obj, void *context) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("a9l6doo688qv3rdvch9hmibgq"); // if (AGTYPE(obj) == AGNODE) { UNSUPPORTED("d450vypq8xi24vzde0qbtu2r8"); // n = (Agnode_t *) obj; UNSUPPORTED("2gpi6t9bnp5hdft0cecv3iune"); // fprintf(stderr, "%s initialized with label %s\n", agnameof(n), UNSUPPORTED("1p5eazfn0cyfxuxjea9lnir1w"); // agget(n, "label")); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 712rrmbvh64z403qurukiza4t // static Agcbdisc_t mydisc = //3 bvktrg27hkm4awzgaxie82v5n // main(int argc, char **argv) public static Object main(Object... arg) { UNSUPPORTED("2vxu1fvoegqfch6u8yop5e3yd"); // main(int argc, char **argv) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9rw11eamkbc6vjzz8oon7h5or"); // Agraph_t *g, *prev; UNSUPPORTED("ecwk3deuub77ow53wzobyi1um"); // int dostat; UNSUPPORTED("ay3nlfl1osekrj2sqshobe5at"); // if (argc > 1) UNSUPPORTED("ckyyp5xta8o4677c6fu181fx7"); // dostat = atoi(argv[1]); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("cl0t34fw12lib2l4xzfg1a37y"); // dostat = 0; UNSUPPORTED("ct1ab9xijd5ig91peu6a6mt9k"); // prev = agopen("some_name", Agdirected, NIL(Agdisc_t *)); UNSUPPORTED("e0xgjn1wccsmsi4ek4d7a2qei"); // agcallbacks(prev, FALSE); UNSUPPORTED("7c3x2xl11ikgliugx67a51w0d"); // agpushdisc(prev, &mydisc, NIL(void *)); UNSUPPORTED("bngzo05d6auu02ybcab17exp"); // while (g = agconcat(prev, stdin, NIL(Agdisc_t *))) { UNSUPPORTED("69r6skguykum6b262jtd67j6e"); // /*do_it(g, dostat); */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c49oayps7r0q8498dhp8trru4"); // /*agwrite(prev,stdout); */ UNSUPPORTED("a9cya29glvbdxdy722npvubi1"); // fprintf(stderr, "ready to go, computer fans\n"); UNSUPPORTED("c2ap65hg9mbsyttiia9s186mf"); // agcallbacks(prev, TRUE); UNSUPPORTED("b0t9qgq0y5pre95c9o03imotq"); // agclose(prev); UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bhswp7qq6w162hh6ho3csmea3 // static void prstats(Agraph_t * g, int verbose) public static Object prstats(Object... arg) { UNSUPPORTED("5szlwllz47f72n6dum53fsuvt"); // static void prstats(Agraph_t * g, int verbose) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5aj3p757f0uumfpssnoqimpjp // static void do_it(Agraph_t * g, int dostat) public static Object do_it(Object... arg) { UNSUPPORTED("cq0p9fgngzp1ynr7fuablhs5i"); // static void do_it(Agraph_t * g, int dostat) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9w53fmba5tercyxnm4fnbyshd"); // agwrite(g, stdout); UNSUPPORTED("25junfxb4dqovzjqy48puogi1"); // if (dostat) UNSUPPORTED("542sekyz7qr0nvvoorslw1nkq"); // prstats(g, dostat > 1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/mem__c.java000066400000000000000000000214561312650303100213220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.Agdisc_s; import h.Agraph_s; import smetana.core.__ptr__; import smetana.core.size_t; public class mem__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //3 akq0jgwdspf75ypeatgcnfn8w // static void *memopen(Agdisc_t* disc) public static Object memopen(Agdisc_s disc) { ENTERING("akq0jgwdspf75ypeatgcnfn8w","memopen"); try { return null; } finally { LEAVING("akq0jgwdspf75ypeatgcnfn8w","memopen"); } } //3 9mtjrx0vjzwuecjwpxylr9tag // static void *memalloc(void *heap, size_t request) public static __ptr__ memalloc(__ptr__ heap, size_t request) { ENTERING("9mtjrx0vjzwuecjwpxylr9tag","memalloc"); try { __ptr__ rv; rv = (__ptr__) request.malloc(); return rv; } finally { LEAVING("9mtjrx0vjzwuecjwpxylr9tag","memalloc"); } } //3 18v2hhjculhnb3b7fc4tx3yjw // static void *memresize(void *heap, void *ptr, size_t oldsize, size_t request) public static Object memresize(Object... arg) { UNSUPPORTED("1s6udii0nias7f8g4vimpkefh"); // static void *memresize(void *heap, void *ptr, size_t oldsize, UNSUPPORTED("8zs6530gai5ogf503wd0333qh"); // size_t request) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5ccnu5m92hidffpixzo964tna"); // void *rv; UNSUPPORTED("74rq74mh7lnfr9i3qmwsbx2hd"); // (void) heap; UNSUPPORTED("ebomd3babnm180zhyrfeg59wi"); // rv = realloc(ptr, request); UNSUPPORTED("bzgpl0js1bzsovafg9g24v4ya"); // if (request > oldsize) UNSUPPORTED("9cjvc6kya9bwic7bue6mcj8yf"); // memset((char *) rv + oldsize, 0, request - oldsize); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c320bstcg5nctel3onh2pserl // static void memfree(void *heap, void *ptr) public static Object memfree(Object... arg) { UNSUPPORTED("5yxdf2sc5xnic9d5j24m0a7yf"); // static void memfree(void *heap, void *ptr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("74rq74mh7lnfr9i3qmwsbx2hd"); // (void) heap; UNSUPPORTED("f0evk2zajcoprskea22bm18e8"); // free(ptr); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 1cni5q244gsprpvtjsq7gs17m // Agmemdisc_t AgMemDisc = /*public static final __struct__ AgMemDisc = JUtils.from(Agmemdisc_s.class); static { AgMemDisc.setPtr("open", function(mem__c.class, "memopen")); AgMemDisc.setPtr("alloc", function(mem__c.class, "memalloc")); AgMemDisc.setPtr("resize", function(mem__c.class, "memresize")); AgMemDisc.setPtr("free", function(mem__c.class, "memfree")); AgMemDisc.setPtr("close", null); }*/ //3 7newv1hmzvt4vtttc9cxdxfpn // void *agalloc(Agraph_t * g, size_t size) public static __ptr__ agalloc(Agraph_s g, size_t size) { ENTERING("7newv1hmzvt4vtttc9cxdxfpn","agalloc"); try { __ptr__ mem; mem = (__ptr__) g.getPtr("clos").getStruct("disc").getPtr("mem").call("alloc", g.getPtr("clos").getStruct("state").getPtr("mem"), size); if (mem == null) System.err.println("memory allocation failure"); return mem; } finally { LEAVING("7newv1hmzvt4vtttc9cxdxfpn","agalloc"); } } //3 55lm0cse6lsgqblx6puxpjs3j // void *agrealloc(Agraph_t * g, void *ptr, size_t oldsize, size_t size) public static Object agrealloc(Object... arg) { UNSUPPORTED("910gd4otiivsz2zpsiwlsy00v"); // void *agrealloc(Agraph_t * g, void *ptr, size_t oldsize, size_t size) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("11l1m9u5ne2xf2nff6278od59"); // void *mem; UNSUPPORTED("b9ag6d7eml860kbycrkuz14b7"); // if (size > 0) { UNSUPPORTED("zjrd9sttelcubi228vbizqq0"); // if (ptr == 0) UNSUPPORTED("vr97hnk6c4k8muqake3c3c46"); // mem = agalloc(g, size); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("2n0yfzx569kr1oinsronhmsus"); // mem = UNSUPPORTED("agphdu4vmb8hu0s57ry4i4axp"); // ((g)->clos->disc.mem)->resize(((g)->clos->state.mem), ptr, oldsize, size); UNSUPPORTED("60qvwgrubred6pojjs425ctzr"); // if (mem == ((void *)0)) UNSUPPORTED("9vomh5w83j5mf3src00h8g8g0"); // agerr(AGERR,"memory re-allocation failure"); UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("6jbj3fx0j7m0vyvwn0za7bxle"); // mem = ((void *)0); UNSUPPORTED("a5guhlttwqpai3dhdhdx6shnu"); // return mem; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5cy6dl95ayyuzq0m35179g1a1 // void agfree(Agraph_t * g, void *ptr) public static Object agfree(Object... arg) { UNSUPPORTED("4i7lm2j8h5unocyz6c4isbh2f"); // void agfree(Agraph_t * g, void *ptr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("72fdcloikkmdo51qrcdovcy5v"); // if (ptr) UNSUPPORTED("efvuftmcvfsswtq39k8vdrgmd"); // (((g)->clos->disc.mem)->free) (((g)->clos->state.mem), ptr); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/node__c.java000066400000000000000000000570571312650303100214770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static gen.lib.cdt.dtsize__c.dtsize_; import static gen.lib.cgraph.attr__c.AgDataRecName; import static gen.lib.cgraph.attr__c.agnodeattr_init; import static gen.lib.cgraph.edge__c.agsubrep; import static gen.lib.cgraph.graph__c.agnextseq; import static gen.lib.cgraph.id__c.agmapnametoid; import static gen.lib.cgraph.id__c.agregister; import static gen.lib.cgraph.mem__c.agalloc; import static gen.lib.cgraph.obj__c.agmethod_init; import static gen.lib.cgraph.obj__c.agroot; import static gen.lib.cgraph.rec__c.agbindrec; import static gen.lib.cgraph.subg__c.agparent; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.LOG2; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGID; import static smetana.core.Macro.AGNODE; import static smetana.core.Macro.AGSEQ; import static smetana.core.Macro.AGTYPE; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import h.Agattr_s; import h.Agnode_s; import h.Agraph_s; import h.Agsubnode_s; import h.ST_Agdesc_s; import h.ST_Agtag_s; import h._dt_s; import h._dtdisc_s; import smetana.core.CString; import smetana.core.Z; import smetana.core.__ptr__; public class node__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //3 4w89du6uel405pm3vxsr3ayxt // Agnode_t *agfindnode_by_id(Agraph_t * g, unsigned long id) //private static __struct__ template = JUtils.from(Agsubnode_s.class); //private static __struct__ dummy = JUtils.from(Agnode_s.class); public static Agnode_s agfindnode_by_id(Agraph_s g, int id) { ENTERING("4w89du6uel405pm3vxsr3ayxt","agfindnode_by_id"); try { Agsubnode_s sn; ((ST_Agtag_s)Z.z().dummy.getStruct("base").getStruct("tag")).id = id; Z.z().template.setPtr("node", Z.z().dummy.amp()); sn = (Agsubnode_s) (g.getPtr("n_id").call("searchf", g.getPtr("n_id"), Z.z().template.amp(),0000004)); return (Agnode_s) (sn!=null ? sn.getPtr("node") : null); } finally { LEAVING("4w89du6uel405pm3vxsr3ayxt","agfindnode_by_id"); } } //3 1ibow5tsw9y9hfbt65y10nw0r // Agnode_t *agfindnode_by_name(Agraph_t * g, char *name) public static Object agfindnode_by_name(Object... arg) { UNSUPPORTED("jjckyz5rvj2kpvd0vw02o8yj"); // Agnode_t *agfindnode_by_name(Agraph_t * g, char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5v0qr6wzw47z083l6jupv94gw"); // unsigned long id; UNSUPPORTED("7xzjyxv5eprg0vhj8q61h9d84"); // if (agmapnametoid(g, AGNODE, name, &id, (0))) UNSUPPORTED("5rhbsviec1b9h1qedfo3hrgt0"); // return agfindnode_by_id(g, id); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("afujljwagn2n2w7aqkq94dyud"); // return ((Agnode_t*)0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 55wopi2gd93zpmycxoywlxm0y // Agnode_t *agfstnode(Agraph_t * g) public static Agnode_s agfstnode(Agraph_s g) { ENTERING("55wopi2gd93zpmycxoywlxm0y","agfstnode"); try { Agsubnode_s sn; sn = (Agsubnode_s) g.getPtr("n_seq").castTo(_dt_s.class).call("searchf", g.getPtr("n_seq"),null,0000200); return sn!=null ? (Agnode_s) sn.getPtr("node") : null; } finally { LEAVING("55wopi2gd93zpmycxoywlxm0y","agfstnode"); } } //3 bek79ccvjys1j9q404i3y6oh8 // Agnode_t *agnxtnode(Agraph_t * g, Agnode_t * n) public static int NB = 0; public static Agnode_s agnxtnode(Agraph_s g, Agnode_s n) { ENTERING("bek79ccvjys1j9q404i3y6oh8","agnxtnode"); try { //ZOOTO if (NB==0) { //StructureDefinition.from(IMapEntry_t.class); } NB++; LOG2("NB="+NB); Agsubnode_s sn; sn = agsubrep(g, n); LOG2("sn1="+sn); if (sn!=null) sn = (Agsubnode_s) g.getPtr("n_seq").castTo(_dt_s.class).call("searchf", g.getPtr("n_seq"),sn,0000010); LOG2("sn2="+sn); final __ptr__ result = sn!=null ? sn.getPtr("node") : null; LOG2("result="+result); return (Agnode_s) result; } finally { LEAVING("bek79ccvjys1j9q404i3y6oh8","agnxtnode"); } } //3 17tu6ipvtgbjfrggkvyz3nasf // Agnode_t *aglstnode(Agraph_t * g) public static Object aglstnode(Object... arg) { UNSUPPORTED("4lnse8d2e11zapjwbkulyywtz"); // Agnode_t *aglstnode(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2llbfi4jrmre7cyhu90pgcm72"); // Agsubnode_t *sn; UNSUPPORTED("37449tqynatc8j0u8sohjqujf"); // sn = (Agsubnode_t *) (*(((Dt_t*)(g->n_seq))->searchf))((g->n_seq),(void*)(0),0000400); UNSUPPORTED("b550764xq8bvu8hoqv0fe2noi"); // return sn ? sn->node : ((Agnode_t*)0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3qloij26jbl7m0ftyb0ouesq4 // Agnode_t *agprvnode(Agraph_t * g, Agnode_t * n) public static Object agprvnode(Object... arg) { UNSUPPORTED("8ichcmu1fmaap5w9hqfiohi13"); // Agnode_t *agprvnode(Agraph_t * g, Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2llbfi4jrmre7cyhu90pgcm72"); // Agsubnode_t *sn; UNSUPPORTED("b0wzl2qtz6anq1dhlxtmvwvgn"); // sn = agsubrep(g, n); UNSUPPORTED("8efe1mjxltxjuin6v0msyzwfb"); // if (sn) sn = ((Agsubnode_t *) (*(((Dt_t*)(g->n_seq))->searchf))((g->n_seq),(void*)(sn),0000020)); UNSUPPORTED("b550764xq8bvu8hoqv0fe2noi"); // return sn ? sn->node : ((Agnode_t*)0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dzb7m0p5xsngvtyr8zs912og4 // static Agnode_t *newnode(Agraph_t * g, unsigned long id, unsigned long seq) public static Agnode_s newnode(Agraph_s g, int id, int seq) { ENTERING("dzb7m0p5xsngvtyr8zs912og4","newnode"); try { Agnode_s n; n = (Agnode_s) ((__ptr__)agalloc(g, sizeof(Agnode_s.class))).castTo(Agnode_s.class); AGTYPE(n, AGNODE); AGID(n, id); AGSEQ(n, seq); n.setPtr("root", agroot(g)); if (((ST_Agdesc_s)agroot(g).getStruct("desc")).has_attrs!=0) agbindrec(n, AgDataRecName, sizeof(Agattr_s.class), false); /* nodeattr_init and method_init will be called later, from the * subgraph where the node was actually created, but first it has * to be installed in all the (sub)graphs up to root. */ return n; } finally { LEAVING("dzb7m0p5xsngvtyr8zs912og4","newnode"); } } //3 4m26dpgaiw44hcleugjy71eus // static void installnode(Agraph_t * g, Agnode_t * n) public static void installnode(Agraph_s g, Agnode_s n) { ENTERING("4m26dpgaiw44hcleugjy71eus","installnode"); try { Agsubnode_s sn; int osize; osize = dtsize_((_dt_s)g.getPtr("n_id")); if (EQ(g, agroot(g))) sn = (Agsubnode_s) n.getStruct("mainsub").amp().castTo(Agsubnode_s.class); else sn = (Agsubnode_s) ((__ptr__)agalloc(g, sizeof(Agsubnode_s.class))).castTo(Agsubnode_s.class); sn.setPtr("node", n); g.getPtr("n_id").call("searchf", g.getPtr("n_id"),sn,0000001); g.getPtr("n_seq").call("searchf", g.getPtr("n_seq"),sn,0000001); } finally { LEAVING("4m26dpgaiw44hcleugjy71eus","installnode"); } } //3 3mfxjcaeepn8nitirs3yoqaed // static void installnodetoroot(Agraph_t * g, Agnode_t * n) public static void installnodetoroot(Agraph_s g, Agnode_s n) { ENTERING("3mfxjcaeepn8nitirs3yoqaed","installnodetoroot"); try { Agraph_s par; installnode(g, n); if ((par = agparent(g))!=null) installnodetoroot(par, n); } finally { LEAVING("3mfxjcaeepn8nitirs3yoqaed","installnodetoroot"); } } //3 85bb9mezhsgtzar3kqz95mq1 // static void initnode(Agraph_t * g, Agnode_t * n) public static void initnode(Agraph_s g, Agnode_s n) { ENTERING("85bb9mezhsgtzar3kqz95mq1","initnode"); try { if (((ST_Agdesc_s)agroot(g).getStruct("desc")).has_attrs!=0) agnodeattr_init(g,n); agmethod_init(g, n); } finally { LEAVING("85bb9mezhsgtzar3kqz95mq1","initnode"); } } //3 1m6sl9df2yaolmufyq5i577a3 // Agnode_t *agidnode(Agraph_t * g, unsigned long id, int cflag) public static Agnode_s agidnode(Agraph_s g, int id, int cflag) { ENTERING("1m6sl9df2yaolmufyq5i577a3","agidnode"); try { Agraph_s root; Agnode_s n; n = agfindnode_by_id(g, id); if ((n == null) && cflag!=0) { UNSUPPORTED("7zol2448bccu90sqoxkvnbuif"); // root = agroot(g); UNSUPPORTED("1zcb29h7sxm7axw8qeuz9f38w"); // if ((g != root) && ((n = agfindnode_by_id(root, id)))) /*old */ UNSUPPORTED("9fusma9293koujpr79eyfhxn6"); // agsubnode(g, n, (!(0))); /* insert locally */ UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("5pefvv55zys4ya7lgh0v8595s"); // if (agallocid(g, AGNODE, id)) { /* new */ UNSUPPORTED("dfn6cx0kwd44mv0ntbzf3p463"); // n = newnode(g, id, agnextseq(g, AGNODE)); UNSUPPORTED("6qcjp92a88ggl3ea7mxel9cn"); // installnodetoroot(g, n); UNSUPPORTED("45uf6o7ubd9hy5s65g0f0bbgj"); // initnode(g, n); UNSUPPORTED("afk9bpom7x393euamnvwwkx6b"); // } else UNSUPPORTED("5l8briolxhuic5avv0112aj90"); // n = ((Agnode_t*)0); /* allocid for new node failed */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } } /* else return probe result */ return n; } finally { LEAVING("1m6sl9df2yaolmufyq5i577a3","agidnode"); } } //3 4yh1h1cwoitzb1t8869b79e3g // Agnode_t *agnode(Agraph_t * g, char *name, int cflag) public static Agnode_s agnode(Agraph_s g, CString name, boolean cflag) { ENTERING("4yh1h1cwoitzb1t8869b79e3g","agnode"); try { Agraph_s root; Agnode_s n; int id[] = new int[1]; root = agroot(g); /* probe for existing node */ if (agmapnametoid(g, AGNODE, name, id, false)!=0) { if ((n = agfindnode_by_id(g, id[0]))!=null) return n; /* might already exist globally, but need to insert locally */ if (cflag && NEQ(g, root) && ((n = agfindnode_by_id(root, id[0])))!=null) { return agsubnode(g, n, (N(0))); } } if (cflag && agmapnametoid(g, AGNODE, name, id, (N(0)))!=0) { /* reserve id */ n = newnode(g, id[0], agnextseq(g, AGNODE)); installnodetoroot(g, n); initnode(g, n); agregister(g, AGNODE, n); /* register in external namespace */ return n; } return null; } finally { LEAVING("4yh1h1cwoitzb1t8869b79e3g","agnode"); } } //3 acahmq5kvzn3o31mluqgw7q9p // void agdelnodeimage(Agraph_t * g, Agnode_t * n, void *ignored) public static Object agdelnodeimage(Object... arg) { UNSUPPORTED("elm2o1y1nn2deregqtwfd0fm"); // void agdelnodeimage(Agraph_t * g, Agnode_t * n, void *ignored) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("109gqpvjmuv5lwcih97x4uwqa"); // Agedge_t *e, *f; UNSUPPORTED("2v9cpnwjfya0wz9qq2q8rqx02"); // static Agsubnode_t template; UNSUPPORTED("8cy87pxkco1cies0ck9zpn66"); // template.node = n; UNSUPPORTED("4pgl4pn1cad2whf242bntmjre"); // (void) ignored; UNSUPPORTED("8dskgcobu9u3m4ejmwjq00r5m"); // for (e = agfstedge(g, n); e; e = f) { UNSUPPORTED("8tmx79zo3pcrz4238v132mjqg"); // f = agnxtedge(g, e, n); UNSUPPORTED("ezikicsrlgi4g2anmg80iyxy5"); // agdeledgeimage(g, e, 0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5x2emh00yohuaush1f65cqnx3"); // /* If the following lines are switched, switch the discpline using UNSUPPORTED("35l6nf11aakz6sn2g7wfh60xr"); // * free_subnode below. UNSUPPORTED("5xkmfp82pyue09k1egerh5ezz"); // */ UNSUPPORTED("a3umom4df7zkjo9g37dn0xnnl"); // (*(((Dt_t*)(g->n_id))->searchf))((g->n_id),(void*)(&template),0000002); UNSUPPORTED("enu2k7akluqzw4eos6263usdr"); // (*(((Dt_t*)(g->n_seq))->searchf))((g->n_seq),(void*)(&template),0000002); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d7hac3hpizqk8mmx6oxiv6d3q // int agdelnode(Agraph_t * g, Agnode_t * n) public static Object agdelnode(Object... arg) { UNSUPPORTED("5vrhjcls5tltlk3dn4ssxzusq"); // int agdelnode(Agraph_t * g, Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("109gqpvjmuv5lwcih97x4uwqa"); // Agedge_t *e, *f; UNSUPPORTED("3ly27irmwairjdexym3up87uk"); // if (!agfindnode_by_id(g, AGID(n))) UNSUPPORTED("a1gf07w8a7uwaryezfqx6en21"); // return -1; /* bad arg */ UNSUPPORTED("ackx3cor82a94trjk4owh3083"); // if (g == agroot(g)) { UNSUPPORTED("7n4rwpvryjg5anpy2d43bthxh"); // for (e = agfstedge(g, n); e; e = f) { UNSUPPORTED("98oagw83x0w96uuzccetdi9ws"); // f = agnxtedge(g, e, n); UNSUPPORTED("7m6mvhicrmgkuyrwkvblruld0"); // agdeledge(g, e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5247bml3o0pwzg9fc9q1xhhnc"); // if (g->desc.has_attrs) UNSUPPORTED("d4mqrcccn3toqvhii6rjrrwwu"); // agnodeattr_delete(n); UNSUPPORTED("7zcf3kp28b1wgy3i2on67h98u"); // agmethod_delete(g, n); UNSUPPORTED("eqkdptzmrk2vxj9fe3y4eb24l"); // agrecclose((Agobj_t *) n); UNSUPPORTED("d6jhz9spbq2ywt2efhyikkcdi"); // agfreeid(g, AGNODE, AGID(n)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("86yxjnabv1fuv7zhtuhgex4gx"); // if (agapply (g, (Agobj_t *) n, (agobjfn_t) agdelnodeimage, ((Agnode_t*)0), (0)) == 0) { UNSUPPORTED("6tlwlx478gb1clm2fykihi2zk"); // if (g == agroot(g)) UNSUPPORTED("d4sehv0200tcylmbpt9pqc7h1"); // agfree(g, n); UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dytehp1u14cb4j9zsmlesojkq // static void dict_relabel(Agnode_t * n, void *arg) public static Object dict_relabel(Object... arg) { UNSUPPORTED("44mem1e9kck28s208xgn5g04k"); // static void dict_relabel(Agnode_t * n, void *arg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("8hr8p3jy96bfcwujkauwdvd92"); // unsigned long new_id; UNSUPPORTED("38tgkes5dhr4oloxpg73baq10"); // g = agraphof(n); UNSUPPORTED("5jv37sfftjuyu9m95lz2avmjk"); // new_id = *(unsigned long *) arg; UNSUPPORTED("90u0hwihh4q8uosu25ewbzhox"); // (*(((Dt_t*)(g->n_id))->searchf))((g->n_id),(void*)(n),0000002); /* wrong, should be subrep */ UNSUPPORTED("9d38am0gg0kj6jhq5tri5ac34"); // AGID(n) = new_id; UNSUPPORTED("3qkq6d6yv4tvsurangttsbn0z"); // (*(((Dt_t*)(g->n_id))->searchf))((g->n_id),(void*)(n),0000001); /* also wrong */ UNSUPPORTED("dwcdffxfxvt11kvrq2e8l9dg9"); // /* because all the subgraphs share the same node now, this UNSUPPORTED("8sf7kiafqj2eexpzvr30nmsle"); // now requires a separate deletion and insertion phase */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a29io0pb5tx5bwevwjtr1hg1r // int agrelabel_node(Agnode_t * n, char *newname) public static Object agrelabel_node(Object... arg) { UNSUPPORTED("838qr3zz1vpfb75cfio36192j"); // int agrelabel_node(Agnode_t * n, char *newname) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("8hr8p3jy96bfcwujkauwdvd92"); // unsigned long new_id; UNSUPPORTED("5c0nzsud433f31yaxkbl4z4gs"); // g = agroot(agraphof(n)); UNSUPPORTED("1vy801jhp4mbvo2tujvg565wz"); // if (agfindnode_by_name(g, newname)) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("3swbd27n6ds70cn294m0ef8f5"); // if (agmapnametoid(g, AGNODE, newname, &new_id, (!(0)))) { UNSUPPORTED("5xgainykf6klfsmk4014aw0e2"); // if (agfindnode_by_id(agroot(g), new_id) == ((Agnode_t*)0)) { UNSUPPORTED("5rjwy8imxqiwj9ia955vyoh9l"); // agfreeid(g, AGNODE, AGID(n)); UNSUPPORTED("asbts6liah2fjm74ps7do0e1m"); // agapply(g, (Agobj_t *) n, (agobjfn_t) dict_relabel, UNSUPPORTED("9trirys0q5ojk3sb1jgw8tmdf"); // (void *) &new_id, (0)); UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("7w7v3j2z1voanzyg3oghk1o2t"); // agfreeid(g, AGNODE, new_id); /* couldn't use it after all */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("eaoz5g3p9152utcqjz5d2fgdf"); // /* obj* is unchanged, so no need to re agregister() */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8azkpi8o0wzdufa90lw8hpt6q"); // return -1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d5farp22buvesyi4pydjam4g2 // Agnode_t *agsubnode(Agraph_t * g, Agnode_t * n0, int cflag) public static Agnode_s agsubnode(Agraph_s g, Agnode_s n0, boolean cflag) { ENTERING("d5farp22buvesyi4pydjam4g2","agsubnode"); try { Agraph_s par; Agnode_s n; if (NEQ(agroot(g), n0.getPtr("root"))) return null; n = agfindnode_by_id(g, AGID(n0)); if ((n == null) && cflag) { if ((par = agparent(g))!=null) { n = agsubnode(par, n0, cflag); installnode(g, n); /* no callback for existing node insertion in subgraph (?) */ } /* else impossible that doesn't belong to */ } /* else lookup succeeded */ return n; } finally { LEAVING("d5farp22buvesyi4pydjam4g2","agsubnode"); } } //3 awwiazixy9c76hvyxlkvvb3vo // int agsubnodeidcmpf(Dict_t * d, void *arg0, void *arg1, Dtdisc_t * disc) public static int agsubnodeidcmpf(_dt_s d, __ptr__ arg0, __ptr__ arg1, _dtdisc_s disc) { ENTERING("awwiazixy9c76hvyxlkvvb3vo","agsubnodeidcmpf"); try { int v; Agsubnode_s sn0, sn1; sn0 = (Agsubnode_s) arg0.castTo(Agsubnode_s.class); sn1 = (Agsubnode_s) arg1.castTo(Agsubnode_s.class); v = (AGID(sn0.getPtr("node")) - AGID(sn1.getPtr("node"))); return ((v==0)?0:(v<0?-1:1)); } finally { LEAVING("awwiazixy9c76hvyxlkvvb3vo","agsubnodeidcmpf"); } } //3 41fjseux0nxzpr0aq7igym9ux // int agsubnodeseqcmpf(Dict_t * d, void *arg0, void *arg1, Dtdisc_t * disc) public static int agsubnodeseqcmpf(_dt_s d, __ptr__ arg0, __ptr__ arg1, _dtdisc_s disc) { ENTERING("41fjseux0nxzpr0aq7igym9ux","agsubnodeseqcmpf"); try { Agsubnode_s sn0, sn1; int v; sn0 = (Agsubnode_s) arg0.castTo(Agsubnode_s.class); sn1 = (Agsubnode_s) arg1.castTo(Agsubnode_s.class); v = (AGSEQ(sn0.getPtr("node")) - AGSEQ(sn1.getPtr("node"))); return ((v==0)?0:(v<0?-1:1)); } finally { LEAVING("41fjseux0nxzpr0aq7igym9ux","agsubnodeseqcmpf"); } } //3 a7tb3b1kvq6ykrxzhbaduvg9r // static void free_subnode (Dt_t* d, Agsubnode_t* sn, Dtdisc_t * disc) public static Object free_subnode(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("9e4h6d4hxsvsnaiuubzlmccsm"); // free_subnode (Dt_t* d, Agsubnode_t* sn, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eiac02o593gy0a55vv1w8mkmi"); // if (!AGSNMAIN(sn)) UNSUPPORTED("263bmzd9ilyyeb9w34squ7iw8"); // agfree (sn->node->root, sn); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 us7d1n3fefkf0qyr6thv1sai // Dtdisc_t Ag_subnode_id_disc = /*public static final __struct__<_dtdisc_s> Ag_subnode_id_disc = JUtils.from(_dtdisc_s.class); static { Ag_subnode_id_disc.setInt("key", 0); Ag_subnode_id_disc.setInt("size", 0); Ag_subnode_id_disc.setInt("link", OFFSET.create(Agsubnode_s.class, "id_link").toInt()); // id_link is the second field in Agsubnode_t Ag_subnode_id_disc.setPtr("makef", null); Ag_subnode_id_disc.setPtr("freef", null); Ag_subnode_id_disc.setPtr("comparf", function(node__c.class, "agsubnodeidcmpf")); Ag_subnode_id_disc.setPtr("hashf", null); Ag_subnode_id_disc.setPtr("memoryf", function(utils__c.class, "agdictobjmem")); Ag_subnode_id_disc.setPtr("eventf", null); }*/ //1 3gqjvodjfsv6wz1tk75zy19p9 // Dtdisc_t Ag_subnode_seq_disc = /*public static final __struct__<_dtdisc_s> Ag_subnode_seq_disc = JUtils.from(_dtdisc_s.class); static { Ag_subnode_seq_disc.setInt("key", 0); Ag_subnode_seq_disc.setInt("size", 0); Ag_subnode_seq_disc.setInt("link", OFFSET.create(Agsubnode_s.class, "seq_link").toInt()); // link is the first field in Agsubnode_t Ag_subnode_seq_disc.setPtr("makef", null); Ag_subnode_seq_disc.setPtr("freef", function(node__c.class, "free_subnode")); Ag_subnode_seq_disc.setPtr("comparf", function(node__c.class, "agsubnodeseqcmpf")); Ag_subnode_seq_disc.setPtr("hashf", null); Ag_subnode_seq_disc.setPtr("memoryf", function(utils__c.class, "agdictobjmem")); Ag_subnode_seq_disc.setPtr("eventf", null); }*/ } plantuml-1.2017.15/src/gen/lib/cgraph/obj__c.java000066400000000000000000000477571312650303100213320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static gen.lib.cgraph.edge__c.agsubedge; import static gen.lib.cgraph.node__c.agidnode; import static gen.lib.cgraph.pend__c.agrecord_callback; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGID; import static smetana.core.Macro.AGINEDGE; import static smetana.core.Macro.AGNODE; import static smetana.core.Macro.AGOUTEDGE; import static smetana.core.Macro.AGRAPH; import static smetana.core.Macro.AGTYPE; import static smetana.core.Macro.UNSUPPORTED; import h.Agcbstack_s; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.Agsym_s; import h.agobjfn_t; import h.agobjupdfn_t; import smetana.core.__ptr__; public class obj__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //3 6wm1l0y857iajfoa6ywpotkld // int agdelete(Agraph_t * g, void *obj) public static Object agdelete(Object... arg) { UNSUPPORTED("26js2ch8px4mwz3gqvjehanq1"); // int agdelete(Agraph_t * g, void *obj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9w2ooy12wluvhcufehln1sob3"); // if ((AGTYPE((Agobj_t *) obj) == AGRAPH) && (g != agparent(obj))) { UNSUPPORTED("8iap36ny5lwbj2qog193slebp"); // agerr(AGERR, "agdelete on wrong graph"); UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bldax4f6o5yyujcnonbszc0kv"); // switch (AGTYPE((Agobj_t *) obj)) { UNSUPPORTED("6x7ztvlgv763oeop84udp1egg"); // case AGNODE: UNSUPPORTED("4fefei0lku9f461nifc1j9d6j"); // return agdelnode(g, obj); UNSUPPORTED("c9o8hr6x8n5dty1y3eej1fept"); // case AGINEDGE: UNSUPPORTED("a6ls4lkgjoheqwo2e7yqt9zz8"); // case AGOUTEDGE: UNSUPPORTED("5g9ficurorxyixy3ipj7d410l"); // return agdeledge(g, obj); UNSUPPORTED("eyna33dobiebmtd0nihpgura4"); // case AGRAPH: UNSUPPORTED("bbhf83j2cbqobo0q3vhbqmjnt"); // return agclose(obj); UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("23wxcrpaiuw9ahrx92r6h8z42"); // agerr(AGERR, "agdelete on bad object"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6z6pjcdqmwle9axtu8m7zzsbc"); // return 0; /* not reached */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 beny4i1ucvryk03o1m3x4mo1o // int agrename(Agobj_t * obj, char *newname) public static Object agrename(Object... arg) { UNSUPPORTED("7b62oxoln2q7p4wdewli878zt"); // int agrename(Agobj_t * obj, char *newname) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("cjioztm3ayr9deoc1btg630su"); // unsigned long old_id, new_id; UNSUPPORTED("3kwdmn4ezymvab9oercol2gfj"); // switch (AGTYPE(obj)) { UNSUPPORTED("eyna33dobiebmtd0nihpgura4"); // case AGRAPH: UNSUPPORTED("6bhsf6u3syvq4i1b3afpo0tcl"); // old_id = AGID(obj); UNSUPPORTED("46q8c52lbrpze2lfwf32dvmxs"); // g = agraphof(obj); UNSUPPORTED("erenne373dge3axb6rjm1fe2n"); // /* can we reserve the id corresponding to newname? */ UNSUPPORTED("daa8h6fs7x6psvrayyh4ajdxx"); // if (agmapnametoid(agroot(g), AGTYPE(obj), newname, UNSUPPORTED("6eajcdkt2sqkuzinzzpg892gl"); // &new_id, (0)) == 0) UNSUPPORTED("aivfd7ajlfz8o8oi68d4u5s5z"); // return -1; UNSUPPORTED("d0w95irsvkkzxory1vu3oibja"); // if (new_id == old_id) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("daa8h6fs7x6psvrayyh4ajdxx"); // if (agmapnametoid(agroot(g), AGTYPE(obj), newname, UNSUPPORTED("4nvglmcaimqliy54ir51j81yx"); // &new_id, (!(0))) == 0) UNSUPPORTED("aivfd7ajlfz8o8oi68d4u5s5z"); // return -1; UNSUPPORTED("eaoz5g3p9152utcqjz5d2fgdf"); // /* obj* is unchanged, so no need to re agregister() */ UNSUPPORTED("6vyma7idxllhf3a3xbklkk7kv"); // if (agparent(g) && agidsubg(agparent(g), new_id, 0)) UNSUPPORTED("aivfd7ajlfz8o8oi68d4u5s5z"); // return -1; UNSUPPORTED("192p8yjash0gcaukx3zukgl4h"); // agfreeid(g, AGRAPH, old_id); UNSUPPORTED("beefe1mg4aug53iqxfnua8enw"); // AGID(g) = new_id; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6x7ztvlgv763oeop84udp1egg"); // case AGNODE: UNSUPPORTED("73cww6u88cevoi6i0y8rfti15"); // return agrelabel_node((Agnode_t *) obj, newname); UNSUPPORTED("bh5gwywn5664iko5vqzvd45x4"); // agrename(obj, newname); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("c9o8hr6x8n5dty1y3eej1fept"); // case AGINEDGE: UNSUPPORTED("a6ls4lkgjoheqwo2e7yqt9zz8"); // case AGOUTEDGE: UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c4ft3rxx9au29a2ns2nhod4dn // void agmethod_init(Agraph_t * g, void *obj) public static void agmethod_init(Agraph_s g, __ptr__ obj) { ENTERING("c4ft3rxx9au29a2ns2nhod4dn","agmethod_init"); try { if (g.getPtr("clos").getBoolean("callbacks_enabled")) aginitcb(g, obj, (Agcbstack_s) g.getPtr("clos").getPtr("cb")); else agrecord_callback(g, obj, 100, null); } finally { LEAVING("c4ft3rxx9au29a2ns2nhod4dn","agmethod_init"); } } //3 eobcsheti70b9gzoi3z968zev // void aginitcb(Agraph_t * g, void *obj, Agcbstack_t * cbstack) public static void aginitcb(Agraph_s g, __ptr__ obj, Agcbstack_s cbstack) { ENTERING("eobcsheti70b9gzoi3z968zev","aginitcb"); try { agobjfn_t fn; if (cbstack == null) return; UNSUPPORTED("cv6tr3wc0y2e3s7hrj040fbgz"); // aginitcb(g, obj, cbstack->prev); UNSUPPORTED("ugu810574xlbrchajuiqvlbj"); // fn = ((agobjfn_t)0); UNSUPPORTED("afk5q8b9fd4sednpczh6r1eg9"); // switch (((((Agobj_t*)(obj))->tag).objtype)) { UNSUPPORTED("70xjc0sbkjvexfar5luzibcgf"); // case 0: UNSUPPORTED("33rj0o79bxra63omicn33shh1"); // fn = cbstack->f->graph.ins; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("d0gk15gzj4wz8nv54zbr285hm"); // case 1: UNSUPPORTED("43opp5hvwaad6urofp737fx95"); // fn = cbstack->f->node.ins; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("4u5xz2u3urj13y0aw30fdyup5"); // case 2: UNSUPPORTED("7k5xv2n0vdcq7e1h7c511n2vt"); // fn = cbstack->f->edge.ins; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b9a2u7luojz68ys0qfhdssxc5"); // if (fn) UNSUPPORTED("d6swsvu9o2h2ajgawq3fidg54"); // fn(g, obj, cbstack->state); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("eobcsheti70b9gzoi3z968zev","aginitcb"); } } //3 29p743rx2pw81slkoaayfeael // void agmethod_upd(Agraph_t * g, void *obj, Agsym_t * sym) public static void agmethod_upd(Agraph_s g, __ptr__ obj, Agsym_s sym) { ENTERING("29p743rx2pw81slkoaayfeael","agmethod_upd"); try { if (g.getPtr("clos").getBoolean("callbacks_enabled")) agupdcb(g, obj, sym, (Agcbstack_s) g.getPtr("clos").getPtr("cb")); else agrecord_callback(g, obj, 101, sym); } finally { LEAVING("29p743rx2pw81slkoaayfeael","agmethod_upd"); } } //3 8t9rkcpdvmxph6krjvfmz3s51 // void agupdcb(Agraph_t * g, void *obj, Agsym_t * sym, Agcbstack_t * cbstack) public static void agupdcb(Agraph_s g, __ptr__ obj, Agsym_s sym, Agcbstack_s cbstack) { ENTERING("8t9rkcpdvmxph6krjvfmz3s51","agupdcb"); try { agobjupdfn_t fn; if (cbstack == null) return; UNSUPPORTED("7xps60r7235mbe5tshsk48gqu"); // agupdcb(g, obj, sym, cbstack->prev); UNSUPPORTED("coxarw2y9j5pc184wun1hzqh4"); // fn = ((agobjupdfn_t)0); UNSUPPORTED("afk5q8b9fd4sednpczh6r1eg9"); // switch (((((Agobj_t*)(obj))->tag).objtype)) { UNSUPPORTED("70xjc0sbkjvexfar5luzibcgf"); // case 0: UNSUPPORTED("edztg04z181ml2fb23vg86p4"); // fn = cbstack->f->graph.mod; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("d0gk15gzj4wz8nv54zbr285hm"); // case 1: UNSUPPORTED("dt0aez1qarpjppkqak7liv45r"); // fn = cbstack->f->node.mod; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("4u5xz2u3urj13y0aw30fdyup5"); // case 2: UNSUPPORTED("dw5h49n9x5t8rmlgpk6lvanem"); // fn = cbstack->f->edge.mod; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b9a2u7luojz68ys0qfhdssxc5"); // if (fn) UNSUPPORTED("ecckhw6badvki2tacvj1ch4bu"); // fn(g, obj, cbstack->state, sym); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("8t9rkcpdvmxph6krjvfmz3s51","agupdcb"); } } //3 ejz0zke1kl32wjhs6y52llib0 // void agmethod_delete(Agraph_t * g, void *obj) public static Object agmethod_delete(Object... arg) { UNSUPPORTED("6y7r2ytsjwcyj4if496cwdjjp"); // void agmethod_delete(Agraph_t * g, void *obj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4rvy8xnzxoccnwfcit2isk96h"); // if (g->clos->callbacks_enabled) UNSUPPORTED("ado8gbbdmkf8owwnknnthuzq0"); // agdelcb(g, obj, g->clos->cb); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("do5egp79i4bb6mod85t9nr77i"); // agrecord_callback(g, obj, 102, ((Agsym_t*)0)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 78ludy47c4yx2luf78lkk42z8 // void agdelcb(Agraph_t * g, void *obj, Agcbstack_t * cbstack) public static Object agdelcb(Object... arg) { UNSUPPORTED("1r4i928dlzzl0gpzpersr9rt7"); // void agdelcb(Agraph_t * g, void *obj, Agcbstack_t * cbstack) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f58pg7odheiwpqukdszo4ojxe"); // agobjfn_t fn; UNSUPPORTED("evtudqllt7mv38ny577gwtz4q"); // if (cbstack == ((Agcbstack_t *)0)) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("49guj1vkw5luz54hl17unr7cg"); // agdelcb(g, obj, cbstack->prev); UNSUPPORTED("ugu810574xlbrchajuiqvlbj"); // fn = ((agobjfn_t)0); UNSUPPORTED("3kwdmn4ezymvab9oercol2gfj"); // switch (AGTYPE(obj)) { UNSUPPORTED("eyna33dobiebmtd0nihpgura4"); // case AGRAPH: UNSUPPORTED("dmw30r6pv5ptb6ffpgbo1hom8"); // fn = cbstack->f->graph.del; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6x7ztvlgv763oeop84udp1egg"); // case AGNODE: UNSUPPORTED("c7rd727688cteu7m0deevr0c1"); // fn = cbstack->f->node.del; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("2dqikmmb6ag0anvbzo5tybf1r"); // case AGEDGE: UNSUPPORTED("ht500g7ljjhniqaq4c7hp6zm"); // fn = cbstack->f->edge.del; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b9a2u7luojz68ys0qfhdssxc5"); // if (fn) UNSUPPORTED("d6swsvu9o2h2ajgawq3fidg54"); // fn(g, obj, cbstack->state); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 53858x47ifwq7ldf9ukvpdc5r // Agraph_t *agroot(void* obj) public static Agraph_s agroot(__ptr__ obj) { ENTERING("53858x47ifwq7ldf9ukvpdc5r","agroot"); try { switch (AGTYPE(obj)) { case AGINEDGE: case AGOUTEDGE: return (Agraph_s) obj.castTo(Agedge_s.class).getPtr("node").getPtr("root"); case AGNODE: return (Agraph_s) obj.castTo(Agnode_s.class).getPtr("root"); case AGRAPH: return (Agraph_s) obj.castTo(Agraph_s.class).getPtr("root"); default: /* actually can't occur if only 2 bit tags */ System.err.println("agroot of a bad object"); return null; } } finally { LEAVING("53858x47ifwq7ldf9ukvpdc5r","agroot"); } } //3 brxx6qho8cw09dg7o27lc7c6z // Agraph_t *agraphof(void *obj) public static Agraph_s agraphof(__ptr__ obj) { ENTERING("brxx6qho8cw09dg7o27lc7c6z","agraphof"); try { switch (AGTYPE(obj)) { case AGINEDGE: case AGOUTEDGE: return (Agraph_s) obj.castTo(Agedge_s.class).getPtr("node").getPtr("root").castTo(Agraph_s.class); case AGNODE: return (Agraph_s) obj.castTo(Agnode_s.class).getPtr("root").castTo(Agraph_s.class); case AGRAPH: return (Agraph_s) obj.castTo(Agraph_s.class); default: /* actually can't occur if only 2 bit tags */ System.err.println("agraphof a bad object"); return null; } } finally { LEAVING("brxx6qho8cw09dg7o27lc7c6z","agraphof"); } } //3 69nqqbr1rod9mgh62okni1oad // void agpushdisc(Agraph_t * g, Agcbdisc_t * cbd, void *state) public static Object agpushdisc(Object... arg) { UNSUPPORTED("cjczq9f29j6pc2upzc84528li"); // void agpushdisc(Agraph_t * g, Agcbdisc_t * cbd, void *state) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1zz0va4dgarmwtr54f41ny6ep"); // Agcbstack_t *stack_ent; UNSUPPORTED("e78wtj8j0f1j2pj8qkxr6rmah"); // stack_ent = ((Agcbstack_t*)(agalloc(g,sizeof(Agcbstack_t)))); UNSUPPORTED("l45frjjz3xaewezkndogwwdl"); // stack_ent->f = cbd; UNSUPPORTED("a7fydebz14wgtgsdgcbk47xbh"); // stack_ent->state = state; UNSUPPORTED("3m8erap924ma44o2eehvy06g9"); // stack_ent->prev = g->clos->cb; UNSUPPORTED("5y8aaijkgasby7ijmcat25ch7"); // g->clos->cb = stack_ent; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2v86foeia3dqpw9r50vioh1g1 // int agpopdisc(Agraph_t * g, Agcbdisc_t * cbd) public static Object agpopdisc(Object... arg) { UNSUPPORTED("779wduvcdcw9g5ldu82jdwlr0"); // int agpopdisc(Agraph_t * g, Agcbdisc_t * cbd) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1zz0va4dgarmwtr54f41ny6ep"); // Agcbstack_t *stack_ent; UNSUPPORTED("3ytu4cno18uw06z7dh1w52rxb"); // stack_ent = g->clos->cb; UNSUPPORTED("811oimiu4ldzfuv78w6eictam"); // if (stack_ent) { UNSUPPORTED("csgw4fukha77kldy7blppfigk"); // if (stack_ent->f == cbd) UNSUPPORTED("9ijeaaarq6dcl8wjmum8mpkdl"); // g->clos->cb = stack_ent->prev; UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("36abb5zemj483qnasuoyx3cm8"); // while (stack_ent && (stack_ent->prev->f != cbd)) UNSUPPORTED("d88q78r1snlry24g7fv6r1s6l"); // stack_ent = stack_ent->prev; UNSUPPORTED("2fiyg59a40jxjgiy8ukb4pl8q"); // if (stack_ent && stack_ent->prev) UNSUPPORTED("eyr2q7dj98xk08fwf7mna4oab"); // stack_ent->prev = stack_ent->prev->prev; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("b04xm15d95y51ybg4xjc6ldgb"); // if (stack_ent) { UNSUPPORTED("8fbzjhtu9d5u96240285dcdh5"); // agfree(g, stack_ent); UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8azkpi8o0wzdufa90lw8hpt6q"); // return -1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a6xpy2adrht1nhb4hi85ex02s // void *aggetuserptr(Agraph_t * g, Agcbdisc_t * cbd) public static Object aggetuserptr(Object... arg) { UNSUPPORTED("73eofxl7fdezesezfrckc4bgx"); // void *aggetuserptr(Agraph_t * g, Agcbdisc_t * cbd) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1zz0va4dgarmwtr54f41ny6ep"); // Agcbstack_t *stack_ent; UNSUPPORTED("2yjmkfk0h1wnw98ga8d0tz93x"); // for (stack_ent = g->clos->cb; stack_ent; stack_ent = stack_ent->prev) UNSUPPORTED("csgw4fukha77kldy7blppfigk"); // if (stack_ent->f == cbd) UNSUPPORTED("6cih8jl2vq8k0dbeiwp44mpgs"); // return stack_ent->state; UNSUPPORTED("3fyiqswglr6w96ojb2huillz0"); // return ((void *)0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 91ej8cxcc0kzgkg2yk3pdiifs // int agcontains(Agraph_t* g, void* obj) public static boolean agcontains(Agraph_s g, __ptr__ obj) { ENTERING("91ej8cxcc0kzgkg2yk3pdiifs","agcontains"); try { Agraph_s subg; if (NEQ(agroot(g), agroot(obj))) return false; switch (AGTYPE(obj)) { case AGRAPH: UNSUPPORTED("5fyr1r26q15uog4pl9eo2iohc"); // subg = (Agraph_t *) obj; UNSUPPORTED("8vxyvy38lzpbd83cu26nejaan"); // do { UNSUPPORTED("dqlpdwxfm3o0e4atzaam04f9m"); // if (subg == g) return 1; UNSUPPORTED("4oqg7vqjjx3n3761fp7f2xld9"); // } while ((subg = agparent (subg))); UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; case AGNODE: return (agidnode(g, AGID(obj), 0) != null); default: return (agsubedge(g, (Agedge_s) obj, false) != null); } } finally { LEAVING("91ej8cxcc0kzgkg2yk3pdiifs","agcontains"); } } //3 bbe1e9wqmcr8dz9pswpxff0fr // int agobjkind(void *arg) public static int agobjkind(__ptr__ arg) { ENTERING("bbe1e9wqmcr8dz9pswpxff0fr","agobjkind"); try { return AGTYPE(arg); } finally { LEAVING("bbe1e9wqmcr8dz9pswpxff0fr","agobjkind"); } } } plantuml-1.2017.15/src/gen/lib/cgraph/pend__c.java000066400000000000000000000526751312650303100215010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static smetana.core.Macro.UNSUPPORTED; public class pend__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //1 bj2qizrlot8l7g39wf35fgzl0 // static char DRName[] = //3 byhbwh2n3ga4l1qwnurcynxym // static void free_symlist(pending_cb_t * pcb) public static Object free_symlist(Object... arg) { UNSUPPORTED("3ghvg7ys2fzlmdd0nfqzopisv"); // static void free_symlist(pending_cb_t * pcb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9bftq5sqxua9mxfb8hmhxzg2q"); // symlist_t *s, *t; UNSUPPORTED("d46bm1zp2r99pr5sekx09iv0i"); // for (s = pcb->symlist; s; s = t) { UNSUPPORTED("4jrxgo85m58bkfh3hxfk13uos"); // t = s->link; UNSUPPORTED("72av5d8v9cfk2h37srkqv1uat"); // agfree(pcb->g, s); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1x8gmra18kgia8023n42trx6s // static void freef(Dict_t * dict, void *ptr, Dtdisc_t * disc) public static Object freef(Object... arg) { UNSUPPORTED("ctg6vmef59dajuf3reb8gedms"); // static void freef(Dict_t * dict, void *ptr, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7h0bo0mbb4u8n1kgtx80jowvh"); // pending_cb_t *pcb; UNSUPPORTED("nzl57bfl5onx7q9ge19n2k9i"); // (void) dict; UNSUPPORTED("8l8wg6vltx6d7vc9dzqb6n3wi"); // (void) disc; UNSUPPORTED("djuag49lm4jgx0aqda2sd65a1"); // pcb = ptr; UNSUPPORTED("62a5d439fs66zkm53lsemzmq8"); // free_symlist(pcb); UNSUPPORTED("2zg02hc6tgna447luar3ns180"); // agfree(pcb->g, pcb); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 x0a4r5rzqmzzzm9o3p61nvtr // static Dtdisc_t Disc = //3 cvwttyefig4x3yibqx8zu9rpg // static Dict_t *dictof(pendingset_t * ds, Agobj_t * obj, int kind) public static Object dictof(Object... arg) { UNSUPPORTED("9138xlja2ni7mmvi0cd4temyb"); // static Dict_t *dictof(pendingset_t * ds, Agobj_t * obj, int kind) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eqjiveikrw2zx745yiiyht6vw"); // Dict_t **dict_ref = ((Dict_t **)0); UNSUPPORTED("b4w701cfbvm8763b1ev8g1ex7"); // dict_ref = 0; UNSUPPORTED("3kwdmn4ezymvab9oercol2gfj"); // switch (AGTYPE(obj)) { UNSUPPORTED("eyna33dobiebmtd0nihpgura4"); // case AGRAPH: UNSUPPORTED("9ty5l2g646lrkxz43tcnhcsk8"); // switch (kind) { UNSUPPORTED("810zm8iq00e0qe3ufq37krysb"); // case 100: UNSUPPORTED("2hwqeumfwxs1e0upar3vbq4nc"); // dict_ref = &(ds->ins.g); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("bngxmwnk2d1645cpp43uwhtl6"); // case 101: UNSUPPORTED("1q1ztoxzgyzwgr4jcwhuslpsw"); // dict_ref = &(ds->mod.g); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("2apxm1u469oyhhgobmwbfoleb"); // case 102: UNSUPPORTED("8baz75germhhy9zanv3jproia"); // dict_ref = &(ds->del.g); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6x7ztvlgv763oeop84udp1egg"); // case AGNODE: UNSUPPORTED("9ty5l2g646lrkxz43tcnhcsk8"); // switch (kind) { UNSUPPORTED("810zm8iq00e0qe3ufq37krysb"); // case 100: UNSUPPORTED("ak9q47vro9e3hyi3b48m6oayw"); // dict_ref = &(ds->ins.n); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("bngxmwnk2d1645cpp43uwhtl6"); // case 101: UNSUPPORTED("6s9z1yizct0zn7ogttlk7ulgl"); // dict_ref = &(ds->mod.n); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("2apxm1u469oyhhgobmwbfoleb"); // case 102: UNSUPPORTED("8srlv0pjbuwg9piqb76f6ckgg"); // dict_ref = &(ds->del.n); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("2dqikmmb6ag0anvbzo5tybf1r"); // case AGEDGE: UNSUPPORTED("9ty5l2g646lrkxz43tcnhcsk8"); // switch (kind) { UNSUPPORTED("810zm8iq00e0qe3ufq37krysb"); // case 100: UNSUPPORTED("33s6jomznpvcrcdm623n28bfj"); // dict_ref = &(ds->ins.e); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("bngxmwnk2d1645cpp43uwhtl6"); // case 101: UNSUPPORTED("1xjaty06eacmjpx6128a9zehr"); // dict_ref = &(ds->mod.e); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("2apxm1u469oyhhgobmwbfoleb"); // case 102: UNSUPPORTED("bwwv85v1novxf8cb8fb5db9ca"); // dict_ref = &(ds->del.e); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5823wtehbd6fnifcjphi991ku"); // if (dict_ref == 0) UNSUPPORTED("d603rhqrsr824tmeeh3ka13ay"); // agerr(AGERR, "pend dictof a bad object"); UNSUPPORTED("mfln6dqp0s7q0ge06fgytl5e"); // if (*dict_ref == ((Dict_t *)0)) UNSUPPORTED("7xhphlz4zrlp0grcf6qhyhbs9"); // *dict_ref = agdtopen(agraphof(obj), &Disc, Dttree); UNSUPPORTED("u3n3bhd98nuoggmwzgri71gl"); // return *dict_ref; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9u07pj11z97vzx0rdu35dy5b6 // static unsigned long genkey(Agobj_t * obj) public static Object genkey(Object... arg) { UNSUPPORTED("6wrgawykukpwhj0d0ha4mzab4"); // static unsigned long genkey(Agobj_t * obj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjfznj5lzu9m7zqyasnsrwbf2"); // return obj->tag.id; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d1eeyb9xae1m5jodp0tq4maaw // static pending_cb_t *lookup(Dict_t * dict, Agobj_t * obj) public static Object lookup(Object... arg) { UNSUPPORTED("94gs9x3we2rbx577uw4x9elm2"); // static pending_cb_t *lookup(Dict_t * dict, Agobj_t * obj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ax1ryj3kmzi5zm6783ja9ih6x"); // pending_cb_t key, *rv; UNSUPPORTED("544ezj0y7pdit8iverci40kga"); // key.key = genkey(obj); UNSUPPORTED("18llpwj4oe5hlfhtvsvgs3jhs"); // rv = (pending_cb_t *) (*(((Dt_t*)(dict))->searchf))((dict),(void*)(&key),0000004); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 f35guneihrs1ux86uvf6heyj6 // static void record_sym(Agobj_t * obj, pending_cb_t * handle, Agsym_t * optsym) public static Object record_sym(Object... arg) { UNSUPPORTED("bl646bfryeajicgd7718m70ed"); // static void record_sym(Agobj_t * obj, pending_cb_t * handle, UNSUPPORTED("amek1l9br0si8a9jvgv8v9jkb"); // Agsym_t * optsym) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6bzyvowe7bryc6qdmgi370qn7"); // symlist_t *sym, *nsym, *psym; UNSUPPORTED("ctsjwn3br9xwmmxp1cj8a1xna"); // psym = ((symlist_t *)0); UNSUPPORTED("6ev04nyvxz485q6jxxp3kcdw4"); // for (sym = handle->symlist; sym; psym = sym, sym = sym->link) { UNSUPPORTED("1lpm2d7z85os1n26xf8u21n8v"); // if (sym->sym == optsym) UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("8gekjn0vgy99mxgi05y3qlbyu"); // if (sym == ((symlist_t *)0)) { UNSUPPORTED("36okqfroya4wcmu1x0sj9mrb1"); // nsym = agalloc(agraphof(obj), sizeof(symlist_t)); UNSUPPORTED("9vb4tlfn94icfq124umj7h911"); // nsym->sym = optsym; UNSUPPORTED("dspsfdiz9pa70d0vxohcf78zh"); // if (psym) UNSUPPORTED("1iisscyro6w5nimneyxg2nkc1"); // psym->link = nsym; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("arj8etqo9ydjttbgwlyuzw1so"); // handle->symlist = nsym; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1jnrk8qfwrllk59230ucju7zi"); // /* else we already have a callback registered */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bjiqwdwumf3dnt54kft0r6k0d // static pending_cb_t *insert(Dict_t * dict, Agraph_t * g, Agobj_t * obj, Agsym_t * optsym) public static Object insert(Object... arg) { UNSUPPORTED("ckcre9wwmah3rfq66mljy5lh"); // static pending_cb_t *insert(Dict_t * dict, Agraph_t * g, Agobj_t * obj, UNSUPPORTED("a2kv73jmjelhmpqkjs8m1xjhw"); // Agsym_t * optsym) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3e5oj67wvvqnpkv5irik2w6v7"); // pending_cb_t *handle; UNSUPPORTED("29wguik0zbbb7k4ia4e4kfyf0"); // handle = agalloc(agraphof(obj), sizeof(pending_cb_t)); UNSUPPORTED("eez1cohkjcwwmfkyjvquaox4j"); // handle->obj = obj; UNSUPPORTED("cg45tb5zuauhpymb2endkpc8b"); // handle->key = genkey(obj); UNSUPPORTED("5hw81md0srbu4w1mw7zzd228n"); // handle->g = g; UNSUPPORTED("3435d1m4kdvqjqisp1szhzggt"); // if (optsym) { UNSUPPORTED("3vhegt7tveybev1z9qn912d8h"); // handle->symlist = UNSUPPORTED("58fxzmz6790e5kheou6gwbjuy"); // (symlist_t *) agalloc(handle->g, sizeof(symlist_t)); UNSUPPORTED("4wf4lv7owe4aqtbj66fyecrd9"); // handle->symlist->sym = optsym; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("50g9bd087vz9ymko5m8ahciu7"); // (*(((Dt_t*)(dict))->searchf))((dict),(void*)(handle),0000001); UNSUPPORTED("22ih9lygwn3tv1nppqxyjuzr3"); // return handle; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6xukd3ssn86gjgbed1tgfj2d3 // static void purge(Dict_t * dict, Agobj_t * obj) public static Object purge(Object... arg) { UNSUPPORTED("5e5swvwz1c1vwauwkpqhyba29"); // static void purge(Dict_t * dict, Agobj_t * obj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3e5oj67wvvqnpkv5irik2w6v7"); // pending_cb_t *handle; UNSUPPORTED("5ukc6nwtmlh7xz8dd5ydc0w2d"); // if ((handle = lookup(dict, obj))) { UNSUPPORTED("yc3nu6vucdrte81w14a2gsy6"); // (*(((Dt_t*)(dict))->searchf))((dict),(void*)(handle),0000002); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 77vpxparxzmm27mmm1mqs0m0y // void agrecord_callback(Agraph_t * g, Agobj_t * obj, int kind, Agsym_t * optsym) public static Object agrecord_callback(Object... arg) { UNSUPPORTED("8kh7tdu40e0f5hui0hcx3ojw"); // void agrecord_callback(Agraph_t * g, Agobj_t * obj, int kind, UNSUPPORTED("amek1l9br0si8a9jvgv8v9jkb"); // Agsym_t * optsym) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("33vdvvs3uqbdtg7b1fuiy1r22"); // pendingset_t *pending; UNSUPPORTED("do2ldsjj56m49f95rq76qxpq8"); // Dict_t *dict; UNSUPPORTED("3e5oj67wvvqnpkv5irik2w6v7"); // pending_cb_t *handle; UNSUPPORTED("ers4ys5zwhwnecpeo7f50pdlk"); // pending = UNSUPPORTED("clm1anc67pw03dsc0fl3qb7p0"); // (pendingset_t *) agbindrec(g, DRName, sizeof(pendingset_t), (0)); UNSUPPORTED("elb9jvgldg2htymh7c74smj7o"); // switch (kind) { UNSUPPORTED("e19luzlumlv4ceyibjghgitjk"); // case 100: UNSUPPORTED("bt8qt5d94yexozgdbv5sspmm4"); // ; UNSUPPORTED("bt8qt5d94yexozgdbv5sspmm4"); // ; UNSUPPORTED("bh8r0ah5bdhy9b8fguergxls8"); // dict = dictof(pending, obj, 100); UNSUPPORTED("8w10gh957jzwdh6u4cu779pov"); // handle = lookup(dict, obj); UNSUPPORTED("3niic65nul5y025zfu6sofbvs"); // if (handle == 0) UNSUPPORTED("3dk7uy243d9xxq8o4v964pmlw"); // handle = insert(dict, g, obj, optsym); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8q5omndta1qpcentw63h413zf"); // case 101: UNSUPPORTED("16zt5ri5is42floscnatxr9y0"); // if (lookup(dictof(pending, obj, 100), obj)) UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("7fgyme1271lzkag7zfllc0tew"); // if (lookup(dictof(pending, obj, 102), obj)) UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("b8ce64b0yiy7uu0nuusdpn8mm"); // dict = dictof(pending, obj, 101); UNSUPPORTED("8w10gh957jzwdh6u4cu779pov"); // handle = lookup(dict, obj); UNSUPPORTED("3niic65nul5y025zfu6sofbvs"); // if (handle == 0) UNSUPPORTED("3dk7uy243d9xxq8o4v964pmlw"); // handle = insert(dict, g, obj, optsym); UNSUPPORTED("a0edh2s4u2bcccyz9l2ipltzh"); // record_sym(obj, handle, optsym); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("e1sxtr2029u6bg4eodqye5nam"); // case 102: UNSUPPORTED("3xn39mhl4qgpevnmfeihn3yfl"); // purge(dictof(pending, obj, 100), obj); UNSUPPORTED("ay7yim5iyu0h1rmxxq1j0yiew"); // purge(dictof(pending, obj, 101), obj); UNSUPPORTED("eva458xjr00pr4dd58xrsr3wo"); // dict = dictof(pending, obj, 102); UNSUPPORTED("8w10gh957jzwdh6u4cu779pov"); // handle = lookup(dict, obj); UNSUPPORTED("3niic65nul5y025zfu6sofbvs"); // if (handle == 0) UNSUPPORTED("3dk7uy243d9xxq8o4v964pmlw"); // handle = insert(dict, g, obj, optsym); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("75q0u8gexnc6ds09pnl8xopt8"); // agerr(AGERR,"agrecord_callback of a bad object"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 74sr5sunzimzs4dop6e56ylqr // static void cb(Dict_t * dict, int callback_kind) public static Object cb(Object... arg) { UNSUPPORTED("8z1461yc2ld1pp01ko4qua5ob"); // static void cb(Dict_t * dict, int callback_kind) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7h0bo0mbb4u8n1kgtx80jowvh"); // pending_cb_t *pcb; UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("9b8mh1w2dngpzgm1scb1wfpye"); // symlist_t *psym; UNSUPPORTED("15pj3yh4siiqcsheonjvz1mx8"); // Agcbstack_t *stack; UNSUPPORTED("bp0izcgie71mfs126puvdrlbx"); // if (dict) UNSUPPORTED("ej98wudw2r9gkiyfxn9xxigrt"); // while ((pcb = (pending_cb_t *) (*(((Dt_t*)(dict))->searchf))((dict),(void*)(0),0000200))) { UNSUPPORTED("ayk3fo7kzma7tc03v9cwyeywf"); // g = pcb->g; UNSUPPORTED("2erj8yjubziu78llrxii8x4yg"); // stack = g->clos->cb; UNSUPPORTED("e2iafleiimg0ngh48vlbjxt23"); // switch (callback_kind) { UNSUPPORTED("y95xe2zitvsk8mj6351b8flm"); // case 100: UNSUPPORTED("3jiyh0mmbmn3uhj3908tbpie0"); // aginitcb(g, pcb->obj, stack); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("24arz42murckghjk31a75ogis"); // case 101: UNSUPPORTED("blbqsjlrg598r1c76k0texydb"); // for (psym = pcb->symlist; psym; psym = psym->link) UNSUPPORTED("dgcqq6caargha2kk43yjiaj5m"); // agupdcb(g, pcb->obj, psym->sym, stack); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("bhzbbcptdhj38ktjb1z72wms"); // case 102: UNSUPPORTED("dhguembbxuyq68vjvlcqwdunu"); // agdelcb(g, pcb->obj, stack); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("1cpmxba68c8jjtr1ixpbt2u0m"); // (*(((Dt_t*)(dict))->searchf))((dict),(void*)(pcb),0000002); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e7sb9ozah1m8hcgr0r26yztet // static void agrelease_callbacks(Agraph_t * g) public static Object agrelease_callbacks(Object... arg) { UNSUPPORTED("6nqqqrpb95kihyqznxyew5ax6"); // static void agrelease_callbacks(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("33vdvvs3uqbdtg7b1fuiy1r22"); // pendingset_t *pending; UNSUPPORTED("109uv6don6ixsje9elqwf9qsc"); // if (NOT(g->clos->callbacks_enabled)) { UNSUPPORTED("chkm1ywwa767f299jp5hf2czq"); // g->clos->callbacks_enabled = (!(0)); UNSUPPORTED("5nn4qm7qly2eoqt2nhd0qp1ax"); // pending = UNSUPPORTED("52ejby4ynlmeb6idvqokzv2vz"); // (pendingset_t *) agbindrec(g, DRName, sizeof(pendingset_t), UNSUPPORTED("vul4crxzo1grmvirrvyll0rn"); // (0)); UNSUPPORTED("ndlj5c2crpsdx40llb9kpwpd"); // /* this destroys objects in the opposite of their order of creation */ UNSUPPORTED("6eurcgx2i2nlon27osmls3rmf"); // cb(pending->ins.g, 100); UNSUPPORTED("f3h4fhpy0i0o57b8gan6wviec"); // cb(pending->ins.n, 100); UNSUPPORTED("896p1o8puht55ta71to18bnvt"); // cb(pending->ins.e, 100); UNSUPPORTED("3yjst8zxgjiz3m39d11jhdexq"); // cb(pending->mod.g, 101); UNSUPPORTED("c0nntfbln34a6kp05jv42mc4g"); // cb(pending->mod.n, 101); UNSUPPORTED("cgqeodbnfbdjj8jt2zu78u0s3"); // cb(pending->mod.e, 101); UNSUPPORTED("9q2lzuakve6bzn35qu41h2l5m"); // cb(pending->del.e, 102); UNSUPPORTED("36f1ppow3wgi52nohrx3663mo"); // cb(pending->del.n, 102); UNSUPPORTED("n1f5rekeo8jd5m5ld7nhw6q"); // cb(pending->del.g, 102); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8uhdzlydn56607gimdrofjtex // int agcallbacks(Agraph_t * g, int flag) public static Object agcallbacks(Object... arg) { UNSUPPORTED("6grr09xacc6khqaw6ho0nky79"); // int agcallbacks(Agraph_t * g, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("27jtm5gi92jvwfaaa1sctuyo"); // if (flag && NOT(g->clos->callbacks_enabled)) UNSUPPORTED("4d5l812q1evpgwdyqtg3thjc6"); // agrelease_callbacks(g); UNSUPPORTED("9h26u2rih6iwnene5rc4w674d"); // if (g->clos->callbacks_enabled) { UNSUPPORTED("1asmx0paikb7t6pd74mg7iux5"); // g->clos->callbacks_enabled = flag; UNSUPPORTED("3adr32h5e1fehu4g7j2u24asz"); // return (!(0)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2sr3ea519cwyuna7gtykf3u03"); // g->clos->callbacks_enabled = flag; UNSUPPORTED("297p5iu8oro94tdg9v29bbgiw"); // return (0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/rec__c.java000066400000000000000000000431121312650303100213060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static gen.lib.cgraph.edge__c.agopp; import static gen.lib.cgraph.mem__c.agalloc; import static gen.lib.cgraph.obj__c.agraphof; import static gen.lib.cgraph.refstr__c.agstrdup; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.strcmp; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGDATA; import static smetana.core.Macro.AGINEDGE; import static smetana.core.Macro.AGNODE; import static smetana.core.Macro.AGOUTEDGE; import static smetana.core.Macro.AGRAPH; import static smetana.core.Macro.AGTYPE; import static smetana.core.Macro.ASINT; import static smetana.core.Macro.N; import static smetana.core.Macro.NOT; import static smetana.core.Macro.UNSUPPORTED; import h.Agedge_s; import h.Agobj_s; import h.Agraph_s; import h.Agrec_s; import h.ST_Agdesc_s; import h.ST_Agtag_s; import smetana.core.CString; import smetana.core.__ptr__; import smetana.core.size_t; public class rec__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //3 62z9z5vraa2as0c9t108j9xaf // static void set_data(Agobj_t * obj, Agrec_t * data, int mtflock) public static void set_data(Agobj_s obj, Agrec_s data, int mtflock) { ENTERING("62z9z5vraa2as0c9t108j9xaf","set_data"); try { Agedge_s e; obj.setPtr("data", data); ((ST_Agtag_s)obj.getStruct("tag")).mtflock = mtflock; if ((AGTYPE(obj) == AGINEDGE) || (AGTYPE(obj) == AGOUTEDGE)) { e = (Agedge_s) agopp(obj.castTo(Agedge_s.class)); AGDATA(e, data); ((ST_Agtag_s)e.getStruct("base").getStruct("tag")).mtflock = mtflock; } } finally { LEAVING("62z9z5vraa2as0c9t108j9xaf","set_data"); } } //3 7p2ne3oknmyclvsw4lh3axtd8 // Agrec_t *aggetrec(void *obj, char *name, int mtf) public static Agrec_s aggetrec(__ptr__ obj, CString name, boolean mtf) { ENTERING("7p2ne3oknmyclvsw4lh3axtd8","aggetrec"); try { Agobj_s hdr; Agrec_s d, first; hdr = (Agobj_s) obj.castTo(Agobj_s.class); first = d = (Agrec_s) hdr.getPtr("data"); while (d!=null) { if (N(strcmp(name,d.getCString("name")))) break; d = (Agrec_s) d.getPtr("next"); if (EQ(d, first)) { d = null; break; } } if (d!=null) { if (((ST_Agtag_s)hdr.getStruct("tag")).mtflock!=0) { if (mtf && NEQ(hdr.getPtr("data"), d)) System.err.println("move to front lock inconsistency"); } else { if (NEQ(d, first) || (mtf != ((((ST_Agtag_s)hdr.getStruct("tag")).mtflock)!=0))) set_data(hdr, d, ASINT(mtf)); /* Always optimize */ } } return d; } finally { LEAVING("7p2ne3oknmyclvsw4lh3axtd8","aggetrec"); } } //3 7sk4k5ipm2jnd244556g1kr6 // static void objputrec(Agraph_t * g, Agobj_t * obj, void *arg) public static void objputrec(Agraph_s g, Agobj_s obj, Object arg) { ENTERING("7sk4k5ipm2jnd244556g1kr6","objputrec"); try { Agrec_s firstrec, newrec; newrec = (Agrec_s) arg; firstrec = (Agrec_s) obj.getPtr("data"); if (firstrec == null) newrec.setPtr("next", newrec); /* 0 elts */ else { if (EQ(firstrec.getPtr("next"), firstrec)) { firstrec.setPtr("next", newrec); /* 1 elt */ newrec.setPtr("next", firstrec); } else { newrec.setPtr("next", firstrec.getPtr("next")); firstrec.setPtr("next", newrec); } } if (NOT(((ST_Agtag_s)obj.getStruct("tag")).mtflock)) set_data(obj, newrec, (0)); } finally { LEAVING("7sk4k5ipm2jnd244556g1kr6","objputrec"); } } //3 dmh5i83l15mnn1pnu6f5dfv8l // void *agbindrec(void *arg_obj, char *recname, unsigned int recsize, int mtf) public static __ptr__ agbindrec(__ptr__ arg_obj, CString recname, size_t recsize, boolean mtf) { ENTERING("dmh5i83l15mnn1pnu6f5dfv8l","agbindrec"); try { Agraph_s g; Agobj_s obj; Agrec_s rec; obj = (Agobj_s) arg_obj.castTo(Agobj_s.class); g = agraphof(obj); rec = aggetrec(obj, recname, false); if ((rec == null && recsize.isStrictPositive())) { rec = (Agrec_s) ((__ptr__)agalloc(g, recsize)).castTo(Agrec_s.class); // rec = (Agrec_s) Memory.malloc(Agrec_s.class); rec.setPtr("name", agstrdup(g, recname)); switch (((ST_Agtag_s)obj.getStruct("tag")).objtype) { case AGRAPH: objputrec(g, obj, rec); break; case AGNODE: objputrec(g, obj, rec); break; case AGINEDGE: case AGOUTEDGE: objputrec(g, obj, rec); break; } } if (mtf) aggetrec(arg_obj, recname, (N(0))); return rec; } finally { LEAVING("dmh5i83l15mnn1pnu6f5dfv8l","agbindrec"); } } //3 7wkmd0z867cfhifu5sx3f9qk0 // static void objdelrec(Agraph_t * g, Agobj_t * obj, void *arg_rec) public static Object objdelrec(Object... arg) { UNSUPPORTED("50zcyap75kyq5dged87b27eux"); // static void objdelrec(Agraph_t * g, Agobj_t * obj, void *arg_rec) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("emb5aoborhmx7xgff2s0f32r7"); // Agrec_t *rec = (Agrec_t *) arg_rec, *newrec; UNSUPPORTED("a3ypwtn30jl38mmwqqe7cncxj"); // if (obj->data == rec) { UNSUPPORTED("69qy6kkaiflhbig0kizfx2tti"); // if (rec->next == rec) UNSUPPORTED("xd727mslmxprqxq2rm02c5d8"); // newrec = ((Agrec_t *)0); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("6w6e40pynrhr4cg19g4qnwmeg"); // newrec = rec->next; UNSUPPORTED("boyfn5td5ma9qwuqx4rb00zxn"); // set_data(obj, newrec, (0)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lrcdtq3amx34ixpjad1kj9w1 // static void listdelrec(Agobj_t * obj, Agrec_t * rec) public static Object listdelrec(Object... arg) { UNSUPPORTED("5vg9c18o4hibwg5a9p47ad9i"); // static void listdelrec(Agobj_t * obj, Agrec_t * rec) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8e7x54av78ukk2gkru2uv7n5t"); // Agrec_t *prev; UNSUPPORTED("acnbs96yxc5n81gdoim603six"); // prev = obj->data; UNSUPPORTED("j2ssgapam83gwl5s62grl1fg"); // while (prev->next != rec) { UNSUPPORTED("4l4pl9wqsuoczyfdlvmzj1gli"); // prev = prev->next; UNSUPPORTED("bt8qt5d94yexozgdbv5sspmm4"); // ; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1uagqrrdyb18p3s9qlqg8jwjj"); // /* following is a harmless no-op if the list is trivial */ UNSUPPORTED("erdqdxkn41xuppe0chxcrx73"); // prev->next = rec->next; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dr7dc2ebvb106hcsaxz6elhu9 // int agdelrec(void *arg_obj, char *name) public static Object agdelrec(Object... arg) { UNSUPPORTED("8scieaa3q398qeq2uv44asga1"); // int agdelrec(void *arg_obj, char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("14h5et4t79wqu2qo8divf5tkt"); // Agobj_t *obj; UNSUPPORTED("146agbqco6st2hn1ajcek08r6"); // Agrec_t *rec; UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("ami3me63drun9ofwwmxainjy5"); // obj = (Agobj_t *) arg_obj; UNSUPPORTED("8pfuk9ua4x9bh68zk1kzwc5t9"); // g = agraphof(obj); UNSUPPORTED("dhmaidfkewgpedp1d73ef9yx5"); // rec = aggetrec(obj, name, (0)); UNSUPPORTED("epwrmjxhdofey6itrewqzilu0"); // if (rec) { UNSUPPORTED("q964zfpibwk1nuufmhbvhvz1"); // listdelrec(obj, rec); /* zap it from the circular list */ UNSUPPORTED("bxainz8fp03zcbgxzia4t1ta2"); // switch (obj->tag.objtype) { /* refresh any stale pointers */ UNSUPPORTED("9t6es77h0301xk4n035emz6o"); // case AGRAPH: UNSUPPORTED("39koq493kdonzfnv7y451gzku"); // objdelrec(g, obj, rec); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4ih7nalu307xv8wvdpmgy537r"); // case AGNODE: UNSUPPORTED("f0mphr0n2ielt8cpkw0djd9s9"); // case AGINEDGE: UNSUPPORTED("3zbev1w97o9vgmm1ifhakk5g6"); // case AGOUTEDGE: UNSUPPORTED("9ixqdoo4u64vgpl11kitdhiwj"); // agapply(agroot(g), obj, objdelrec, rec, (0)); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("b0419fuh4e7iigkr04vrhwoqw"); // agstrfree(g, rec->name); UNSUPPORTED("9w293r9fg650cqzb27hlm4gm6"); // agfree(g, rec); UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 61hbvi8qf9sf7fp8zpov061px // static void simple_delrec(Agraph_t * g, Agobj_t * obj, void *rec_name) public static Object simple_delrec(Object... arg) { UNSUPPORTED("7jivm8vgxrik7o19yqyy4iuoj"); // static void simple_delrec(Agraph_t * g, Agobj_t * obj, void *rec_name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3lu3vc6o8prg1gr2vk05e0eko"); // agdelrec(obj, rec_name); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e1pnypxtha6b6f6gdnys37746 // void aginit(Agraph_t * g, int kind, char *rec_name, int arg_rec_size, int mtf) public static Object aginit(Object... arg) { UNSUPPORTED("2pn3c5mfp7ik08786jysv3lbs"); // void aginit(Agraph_t * g, int kind, char *rec_name, int arg_rec_size, int mtf) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("8a4qjwfuqqw6rztukk1hbffvl"); // Agraph_t *s; UNSUPPORTED("abzwllf3yvcaghy0hkur9oxfd"); // int rec_size; UNSUPPORTED("5vb74w15wh9g0ykij86iwtxeb"); // int recur; /* if recursive on subgraphs */ UNSUPPORTED("4nlgepehelmt97qydjqp7ecah"); // if (arg_rec_size < 0) {recur = 1; rec_size = -arg_rec_size;} UNSUPPORTED("bevbs1i4v9cvng7nnrs2yqiku"); // else {recur = 0; rec_size= arg_rec_size;} UNSUPPORTED("elb9jvgldg2htymh7c74smj7o"); // switch (kind) { UNSUPPORTED("eyna33dobiebmtd0nihpgura4"); // case AGRAPH: UNSUPPORTED("9k3pxutrp61xdp73x92pxsv8j"); // agbindrec(g, rec_name, rec_size, mtf); UNSUPPORTED("ufmow0oztf5sdbx36wf4v0e5"); // if (recur) UNSUPPORTED("4oknzxynn26rak0dbvijyz5t"); // for (s = agfstsubg(g); s; s = agnxtsubg(s)) UNSUPPORTED("3hu696w8d3t3l7tygoq4twr4x"); // aginit(s,kind,rec_name,arg_rec_size,mtf); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6x7ztvlgv763oeop84udp1egg"); // case AGNODE: UNSUPPORTED("a6ls4lkgjoheqwo2e7yqt9zz8"); // case AGOUTEDGE: UNSUPPORTED("c9o8hr6x8n5dty1y3eej1fept"); // case AGINEDGE: UNSUPPORTED("eg21iwn9eqyjsoisl58nl8i36"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("2kxod9hw7p0o5crbt6xh2gcwy"); // if (kind == AGNODE) UNSUPPORTED("7lbtjiuf91mfv1rfh26gr9rnf"); // agbindrec(n, rec_name, rec_size, mtf); UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("5qry6mw56jhkh965gr6si5sjz"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) UNSUPPORTED("3isk98kl2hyz50xh5nk9e79ur"); // agbindrec(e, rec_name, rec_size, mtf); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d8dlatsnpytjohjptji50kek2 // void agclean(Agraph_t * g, int kind, char *rec_name) public static Object agclean(Object... arg) { UNSUPPORTED("2u4lls7xvbemdliclfn1jjlv3"); // void agclean(Agraph_t * g, int kind, char *rec_name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("elb9jvgldg2htymh7c74smj7o"); // switch (kind) { UNSUPPORTED("eyna33dobiebmtd0nihpgura4"); // case AGRAPH: UNSUPPORTED("p5rnonv5qza6uss4lurbzcru"); // agapply(g, (Agobj_t *) g, simple_delrec, rec_name, (!(0))); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6x7ztvlgv763oeop84udp1egg"); // case AGNODE: UNSUPPORTED("a6ls4lkgjoheqwo2e7yqt9zz8"); // case AGOUTEDGE: UNSUPPORTED("c9o8hr6x8n5dty1y3eej1fept"); // case AGINEDGE: UNSUPPORTED("eg21iwn9eqyjsoisl58nl8i36"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("2kxod9hw7p0o5crbt6xh2gcwy"); // if (kind == AGNODE) UNSUPPORTED("an2xd4k44p94rcg7ynge2g1nq"); // agdelrec(n, rec_name); UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("5qry6mw56jhkh965gr6si5sjz"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) UNSUPPORTED("7k5tz238egfs4u82cpy7lk8dn"); // agdelrec(e, rec_name); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1s9p443oxpnfk2w28k6bgn1y0 // void agrecclose(Agobj_t * obj) public static Object agrecclose(Object... arg) { UNSUPPORTED("f28etp6uks02tqgelaos87f96"); // void agrecclose(Agobj_t * obj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("4d3axgxxzgvvs9r07npfgyqqs"); // Agrec_t *rec, *nrec; UNSUPPORTED("8pfuk9ua4x9bh68zk1kzwc5t9"); // g = agraphof(obj); UNSUPPORTED("7mfrjfyuzo92p41ycl0k8l0ux"); // if ((rec = obj->data)) { UNSUPPORTED("8vxyvy38lzpbd83cu26nejaan"); // do { UNSUPPORTED("ezzhxi7n4n97pmh7g0zo4wprj"); // nrec = rec->next; UNSUPPORTED("e1l0oyl4p7njuyrgfuf1nph9b"); // agstrfree(g, rec->name); UNSUPPORTED("3yrrykwn17vvbliut3f5a174w"); // agfree(g, rec); UNSUPPORTED("66id2vgqklsr5nz9a84lor5eb"); // rec = nrec; UNSUPPORTED("aqvgta0a2vlgkvf7yvufyzvt5"); // } while (rec != obj->data); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2ila9b4kx11rvt5yy16n3myks"); // obj->data = ((Agrec_t *)0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/refstr__c.java000066400000000000000000000305201312650303100220410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static gen.lib.cgraph.mem__c.agalloc; import static gen.lib.cgraph.utils__c.agdtdelete; import static gen.lib.cgraph.utils__c.agdtopen; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.Agraph_s; import h._dt_s; import h.refstr_t; import smetana.core.ACCESS; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.OFFSET; import smetana.core.STARSTAR; import smetana.core.Z; import smetana.core.__struct__; import smetana.core.size_t; public class refstr__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //1 8bj6ivnd4go7wt4pvzqgk8mlr // static unsigned long HTML_BIT //static public int HTML_BIT; //1 dqn77l82bfu071bv703e77jmg // static unsigned long CNT_BITS //static public int CNT_BITS; //1 boyxdmkhstn4i64pqf6sv1mi7 // static Dtdisc_t Refstrdisc = /*static public final __struct__<_dtdisc_s> Refstrdisc = JUtils.from(_dtdisc_s.class); static { Refstrdisc.setInt("key", OFFSET.create(refstr_t.class, "s").toInt()); // *s is the third field in refstr_t Refstrdisc.setInt("size", -1); Refstrdisc.setInt("link", 0); Refstrdisc.setPtr("makef", null); Refstrdisc.setPtr("freef", function(utils__c.class, "agdictobjfree")); Refstrdisc.setPtr("comparf", null); Refstrdisc.setPtr("hashf", null); Refstrdisc.setPtr("memoryf", function(utils__c.class, "agdictobjmem")); Refstrdisc.setPtr("eventf", null); }*/ //1 2e0tdcdyjc9zq54xt1nzgwvn3 // static Dict_t *Refdict_default //static public _dt_s Refdict_default; //3 f1nwss2xoaub1hyord232ugoj // static Dict_t *refdict(Agraph_t * g) public static _dt_s refdict(final Agraph_s g) { ENTERING("f1nwss2xoaub1hyord232ugoj","refdict"); try { STARSTAR<_dt_s> dictref; if (g != null) dictref = STARSTAR.amp(new ACCESS<_dt_s>() { public _dt_s get() { return (_dt_s) g.getPtr("clos").getPtr("strdict"); } public void set(_dt_s obj) { g.getPtr("clos").setPtr("strdict", obj); } }); else dictref = STARSTAR.amp(new ACCESS<_dt_s>() { public _dt_s get() { return Z.z().Refdict_default; } public void set(_dt_s obj) { Z.z().Refdict_default = obj; } }); if (dictref.getMe() == null) { dictref.setMe(agdtopen(g, Z.z().Refstrdisc.amp(), Z.z().Dttree)); } Z.z().HTML_BIT = 1 << 31; Z.z().CNT_BITS = ~Z.z().HTML_BIT; return dictref.getMe(); } finally { LEAVING("f1nwss2xoaub1hyord232ugoj","refdict"); } } //3 9aajykl8nuymg60zukycquawa // int agstrclose(Agraph_t * g) public static Object agstrclose(Object... arg) { UNSUPPORTED("c2l353zz5jt7jlmbhjbbt3m7v"); // int agstrclose(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("208rcf0f70q2wxwsa6po42oqq"); // return agdtclose(g, refdict(g)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9ts4wqhw2xafdv3tlcilneewq // static refstr_t *refsymbind(Dict_t * strdict, char *s) public static refstr_t refsymbind(_dt_s strdict, CString s) { ENTERING("9ts4wqhw2xafdv3tlcilneewq","refsymbind"); try { final __struct__ key = JUtils.from(refstr_t.class); refstr_t r; // key.setPtr("s", s.duplicate()); key.setPtr("s", s); r = (refstr_t) strdict.call("searchf", strdict, key.amp(), 0000004); return r; } finally { LEAVING("9ts4wqhw2xafdv3tlcilneewq","refsymbind"); } } //3 1scntgo71z7c2v15zapiyw59w // static char *refstrbind(Dict_t * strdict, char *s) public static CString refstrbind(_dt_s strdict, CString s) { ENTERING("1scntgo71z7c2v15zapiyw59w","refstrbind"); try { refstr_t r; r = refsymbind(strdict, s); if (r!=null) return r.getCString("s"); else return null; } finally { LEAVING("1scntgo71z7c2v15zapiyw59w","refstrbind"); } } //3 bb8aqjshw3ecae2lsmhigd0mc // char *agstrbind(Agraph_t * g, char *s) public static CString agstrbind(Agraph_s g, CString s) { ENTERING("bb8aqjshw3ecae2lsmhigd0mc","agstrbind"); try { return refstrbind(refdict(g), s); } finally { LEAVING("bb8aqjshw3ecae2lsmhigd0mc","agstrbind"); } } //3 86oznromwhn9qeym0k7pih73q // char *agstrdup(Agraph_t * g, char *s) public static CString agstrdup(Agraph_s g, CString s) { ENTERING("86oznromwhn9qeym0k7pih73q","agstrdup"); try { refstr_t r; _dt_s strdict; size_t sz; if (s == null) return null; strdict = refdict(g); r = (refstr_t) refsymbind(strdict, s); if (r!=null) r = (refstr_t) r.castTo(refstr_t.class); if (r!=null) r.setInt("refcnt", r.getInt("refcnt")+1); else { sz = sizeof(refstr_t.class).plus(s.length()); if (g!=null) r = (refstr_t) agalloc(g, sz); else r = (refstr_t) sz.malloc(); r.setInt("refcnt", 1); r.setPtr("s", s.duplicate()); // strcpy(r->store, s); // r->s = r->store; strdict.call("searchf", strdict,r,0000001); } return r.getCString("s"); } finally { LEAVING("86oznromwhn9qeym0k7pih73q","agstrdup"); } } //3 1ovgpnv6r8ru6iz51ic91zzal // char *agstrdup_html(Agraph_t * g, char *s) public static Object agstrdup_html(Object... arg) { UNSUPPORTED("6679vrn0j0vkzernsn2rlottw"); // char *agstrdup_html(Agraph_t * g, char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1uvxutp09oluiacpgn0f76bgu"); // refstr_t *r; UNSUPPORTED("czgqod5ni1s5av81qa3n0ghgr"); // Dict_t *strdict; UNSUPPORTED("55x2wgzchv0157f4g74693oaq"); // size_t sz; UNSUPPORTED("a5abfeqtsa4i5x739edpwuxin"); // if (s == ((char *)0)) UNSUPPORTED("xp8okoaicybpovkenntpd857"); // return ((char *)0); UNSUPPORTED("bo3fdoot7ldevx250qweitj6z"); // strdict = refdict(g); UNSUPPORTED("12vt0u4w3q0jht9f9vsaybntn"); // r = refsymbind(strdict, s); UNSUPPORTED("67y4tszu7dmeves31gr9ydmpi"); // if (r) UNSUPPORTED("5gybhadmtbc77f5wf9adyemj7"); // r->refcnt++; UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("9llv1u64vbj6q8loctnrowtm5"); // sz = sizeof(refstr_t) + strlen(s); UNSUPPORTED("7tmc6a514rv2k24wg5o8qpvyp"); // if (g) UNSUPPORTED("asjj8bj1b02f70rfr41ayipxy"); // r = (refstr_t *) agalloc(g, sz); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("bp5rr6mkh94826cbgdwglvpk9"); // r = (refstr_t *) malloc(sz); UNSUPPORTED("6sl9ejza97inawt8uprd120h6"); // r->refcnt = 1 | HTML_BIT; UNSUPPORTED("dadamob0ot3fpofdm1ey34srj"); // strcpy(r->store, s); UNSUPPORTED("1cyhds1lm0ee8rtp7k7h5cqfw"); // r->s = r->store; UNSUPPORTED("b2zaf5uj8gofpyc40hl0ziymh"); // (*(((Dt_t*)(strdict))->searchf))((strdict),(void*)(r),0000001); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("lxjgfic7zk869xczsgazw3sx"); // return r->s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 enhn1ajfo86a19dgm4b8lduz7 // int agstrfree(Agraph_t * g, char *s) public static int agstrfree(Agraph_s g, CString s) { ENTERING("enhn1ajfo86a19dgm4b8lduz7","agstrfree"); try { refstr_t r; _dt_s strdict; if (s == null) return -1; strdict = refdict(g); r = refsymbind(strdict, s); if (r!=null) r = (refstr_t) r.castTo(refstr_t.class); if (r!=null && (EQ(r.getPtr("s"), s))) { r.setInt("refcnt", r.getInt("refcnt")-1); if ((r.getInt("refcnt")!=0 && Z.z().CNT_BITS!=0) == false) { agdtdelete(g, strdict, r); /* if (g) agfree(g,r); else free(r); */ } } if (r == null) return -1; return 0; } finally { LEAVING("enhn1ajfo86a19dgm4b8lduz7","agstrfree"); } } //3 3em4wzjnpajd5d3igb90l3rml // int aghtmlstr(char *s) public static int aghtmlstr(CString s) { ENTERING("3em4wzjnpajd5d3igb90l3rml","aghtmlstr"); try { refstr_t key; if (s == null) return 0; key = (refstr_t) s.addVirtualBytes(-OFFSET.create(refstr_t.class, "s").toInt()); return (key.getInt("refcnt") & Z.z().HTML_BIT); } finally { LEAVING("3em4wzjnpajd5d3igb90l3rml","aghtmlstr"); } } //3 ap2ebebypq6vmwle0hicv6tmj // void agmarkhtmlstr(char *s) public static Object agmarkhtmlstr(Object... arg) { UNSUPPORTED("8oc24oz62ej815sjwuwuj9bmt"); // void agmarkhtmlstr(char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("164ww6fcxh6v2wmxj0v8aqviy"); // refstr_t *key; UNSUPPORTED("8quozj18vjguewxdpv9w14yjn"); // if (s == NULL) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("9cmt4vbkm95fqftevdqyfvslr"); // key = (refstr_t *) (s - ((int)(&(((refstr_t*)0)->store[0])))); UNSUPPORTED("68mcf5kr6xw538zkdk8b50aeb"); // key->refcnt |= HTML_BIT; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/scan__c.java000066400000000000000000002650541312650303100214740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static smetana.core.Macro.UNSUPPORTED; public class scan__c { //1 9u1ttuisot4jd2hvnp85ay56g // typedef signed char flex_int8_t //1 wvexxj8vbty6kaj0saqbx6ts // typedef short int flex_int16_t //1 hwqrvan7avqujsfxav228c11 // typedef int flex_int32_t //1 7lla3uunolf6lxmj92jrtn42g // typedef unsigned char flex_uint8_t //1 f9lv61viy2nrstz0unqh9sqh // typedef unsigned short int flex_uint16_t //1 amgh831s9403je2b1fbipav6b // typedef unsigned int flex_uint32_t //1 o1gyrcpeise6ulid46rm843i // typedef size_t aag_size_t //1 1f24j2fvxxvkjnlu5zfmsrb3y // extern aag_size_t aagleng //1 bn8sus4ks1cb72itw8xzz1flz // extern FILE *aagin, *aagout //1 3hxi4rnlmjyc30okmpb31jq2x // static size_t aag_buffer_stack_top = 0 //1 cvdgf98m8wxs77dykhlbh8cee // static size_t aag_buffer_stack_max = 0 //1 f2vs4coshydmjcysvmam9xyqe // static YY_BUFFER_STATE * aag_buffer_stack = 0 //1 e1hf3tomaeg9eyupoxlsqppd8 // static char aag_hold_char //1 3yvf3qfwm5w59tkhanhadp0sc // static aag_size_t aag_n_chars //1 bjftnvag2m5zx3ut0gxhbm1yp // aag_size_t aagleng //1 3qr2iyg8mnjvp20zhsfc7zhll // static char *aag_c_buf_p = (char *) 0 //1 7p8qmci0084z5p538lompqcgl // static int aag_init = 0 //1 aqkdngbj0xlr01bnkezay6hpw // static int aag_start = 0 //1 by6x4qfu7ct1epyt34gtk0c68 // static int aag_did_buffer_switch_on_eof //1 9dv61b9prrpqjbdic1p73cmii // typedef unsigned char YY_CHAR //1 u29aw8w233elgi1t0d69a2tp // FILE *aagin = (FILE *) 0, *aagout = (FILE *) 0 //1 6yqm263qjbxbombyqn8htwe9h // typedef int aag_state_type //1 4jmbvml2ky2nnj8z2fttiwlpj // extern int aaglineno //1 8hrt3xlca3e6jbiammiyc4vny // int aaglineno = 1 //1 4cxmiga6ltifuposa502y9yyt // extern char *aagtext //1 7xtkfznh5z71t9bxwa8l65woe // static flex_int16_t aag_accept[93] = //1 681ycgqijl2pdx86pv93mlmpl // static flex_int32_t aag_ec[256] = //1 bc0sgnek7ow53q48q3951dxf7 // static flex_int32_t aag_meta[49] = //1 2kiqxti33weulohzuygr5c60p // static flex_int16_t aag_base[105] = //1 2dk0cchyur4w0ynnbcpumq3df // static flex_int16_t aag_def[105] = //1 5cx77li3gho8yavxa8ny5ydy8 // static flex_int16_t aag_nxt[279] = //1 84mqlrbyvesev1wun43vo6rt5 // static flex_int16_t aag_chk[279] = //1 baro9b24r2upjoluxg072zqan // static aag_state_type aag_last_accepting_state //1 51sd6p9r881rurh2cn0gr95sb // static char *aag_last_accepting_cpos //1 4j2pfnbqhihe02dxjobjg2x8s // extern int aag_flex_debug //1 693kz0rs1kqe9rnq983sul9xf // int aag_flex_debug = 0 //1 d9rx7y8pk05fhn4zb20edan8k // char *aagtext //1 bv6npyi314kx5c073l8ghs1md // extern YYSTYPE aaglval //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //1 ulfzla7f173z9e7hy51d7yxc // static int line_num = 1 //1 7k271geg3zfbftdupjdh78yl0 // static int html_nest = 0 //1 91mp0doens27fx1oso66rsrpm // static char* InputFile //1 a00t38gjjcwqriw9cdxo4tdnd // static Agdisc_t *Disc //1 1by6tdr1jakvfvcghn57hto4l // static void *Ifile //1 8kv7ct8l9pvdr999inffhfd8u // static int graphType //3 1oj4owfzrg4azkuildy8ykqr9 // void agreadline(int n) public static Object agreadline(Object... arg) { UNSUPPORTED("dsihmt5ebg62c8jribqmgy0dy"); // void agreadline(int n) { line_num = n; } throw new UnsupportedOperationException(); } //3 bf0ltyw37l11aswamj8q178wi // void agsetfile(char* f) public static Object agsetfile(Object... arg) { UNSUPPORTED("1efvmz7xvqmxk6ohmzmamgezx"); // void agsetfile(char* f) { InputFile = f; line_num = 1; } throw new UnsupportedOperationException(); } //3 3r1v6x85pa9sbewoebj1wpjuu // void aglexinit(Agdisc_t *disc, void *ifile) public static Object aglexinit(Object... arg) { UNSUPPORTED("3744yvxht2vnrh2n60myij0q3"); // void aglexinit(Agdisc_t *disc, void *ifile) { Disc = disc; Ifile = ifile; graphType = 0;} throw new UnsupportedOperationException(); } //1 cry2o4y2edn77xmsht3kg427n // static char *Sbuf,*Sptr,*Send //3 ci1omlit75xbk0j3loutg4m5g // static void beginstr(void) public static Object beginstr(Object... arg) { UNSUPPORTED("dstkjoto15vp16xvlg2k09goi"); // static void beginstr(void) { UNSUPPORTED("5hieqyyy30hbesj8bpug2z9z6"); // if (Sbuf == ((char*)0)) { UNSUPPORTED("f5fqw4u40t2nwvcuv9jeqgbke"); // Sbuf = malloc(BUFSIZ); UNSUPPORTED("4yebcf7ybwlpgm7xoldjbszda"); // Send = Sbuf + BUFSIZ; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5wr6chsypocfjuceerl9mehc4"); // Sptr = Sbuf; UNSUPPORTED("ea2z7xk1luy674u284ddudw1d"); // *Sptr = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 81ls7ujxrb181svnc5awggx7n // static void addstr(char *src) public static Object addstr(Object... arg) { UNSUPPORTED("703gu6b5q51kg4f4w94snc2mn"); // static void addstr(char *src) { UNSUPPORTED("3fj8t64rrnh5407ihxrbavnt6"); // char c; UNSUPPORTED("4emlk2lo8cq6d5o6x461cxzwk"); // if (Sptr > Sbuf) Sptr--; UNSUPPORTED("8vxyvy38lzpbd83cu26nejaan"); // do { UNSUPPORTED("a1hhl0r379voikvndx346jxit"); // do {c = *Sptr++ = *src++;} while (c && (Sptr < Send)); UNSUPPORTED("bl9hlux3ebu4o7860s2zpg075"); // if (c) { UNSUPPORTED("aadej261od7yk1xcs21hauykh"); // long sz = Send - Sbuf; UNSUPPORTED("41atfjolp70p7f8qnft3of30k"); // long off = Sptr - Sbuf; UNSUPPORTED("6x6pgn87tnew1za637nkcb3i3"); // sz *= 2; UNSUPPORTED("ecyedutxo51rut0aixzmx564t"); // Sbuf = (char*)realloc(Sbuf,sz); UNSUPPORTED("8rxtl0zns7it9buqlqqsy5odx"); // Send = Sbuf + sz; UNSUPPORTED("9z7xq6bkmghj8n6042m7mpmh3"); // Sptr = Sbuf + off; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("5k2u7k1fsiidv6ulonq76qhp0"); // } while (c); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2rmqzhh7aovtupqfrlts8pa2m // static void endstr(void) public static Object endstr(Object... arg) { UNSUPPORTED("2sracqywd1qg2l7v5nmpvufkp"); // static void endstr(void) { UNSUPPORTED("err7e2gsasgf22nnv8bahct4d"); // aaglval.str = (char*)agstrdup(Ag_G_global,Sbuf); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4t56dhvw52uu822nlaokivf85 // static void endstr_html(void) public static Object endstr_html(Object... arg) { UNSUPPORTED("dnnpz2205l3ln51f1bs93btf9"); // static void endstr_html(void) { UNSUPPORTED("ajzrml1ygau4ao515bwvwgn19"); // aaglval.str = (char*)agstrdup_html(Ag_G_global,Sbuf); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9nr6wfm5bmxh70x9saeavz26m // static void storeFileName (char* fname, int len) public static Object storeFileName(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("cvgvah1jrmrhswwg3rel7x5y0"); // storeFileName (char* fname, int len) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e0zq971pun9bqnupgu74poc4u"); // static int cnt; UNSUPPORTED("xo6m9cruoz5kdd6mzt4sfknp"); // static char* buf; UNSUPPORTED("do2te9of2v96mc8oassrb7p3b"); // if (len > cnt) { UNSUPPORTED("6isxquud3a1wratug7k94a4ty"); // if (cnt) buf = (char*)realloc (buf, len+1); UNSUPPORTED("aalmsa4r595p8tuhd928kue7f"); // else buf = (char*)malloc (len+1); UNSUPPORTED("9hhg0szrtn6m33mvdggzdcuiq"); // cnt = len; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4ynhuu395gho3v61nn58lpsp5"); // strcpy (buf, fname); UNSUPPORTED("bg9is2c95vtwie9h8nu78y9h7"); // InputFile = buf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bj9zjg1k93tugikci6pdacgv8 // static void ppDirective (void) public static Object ppDirective(Object... arg) { UNSUPPORTED("amadyb8blecbhpmr03nv1yysj"); // static void ppDirective (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("93ptrxmj16kch68r5qfjvzje8"); // int r, cnt, lineno; UNSUPPORTED("aqjwq3fk7zmi0i48c6b3bdyn1"); // char buf[2]; UNSUPPORTED("bykuhm42gpf1y2m3xfegj7yq7"); // char* s = aagtext + 1; /* skip initial # */ UNSUPPORTED("v2kt5w01rvjcncga1nfw16vb"); // if (strncmp(s, "line", 4) == 0) s += 4; UNSUPPORTED("cjbpu12dvz9bbaaqizld5hgzw"); // r = sscanf(s, "%d %1[\"]%n", &lineno, buf, &cnt); UNSUPPORTED("79e2kex2zkmaojwz921wv40lb"); // if (r > 0) { /* got line number */ UNSUPPORTED("7j9u1nik3c9m3dfr3ss7u99x7"); // line_num = lineno - 1; UNSUPPORTED("a3cc7hmrfiu20uienzp34trtf"); // if (r > 1) { /* saw quote */ UNSUPPORTED("ege4ds3wwlaw1lf0dmx6icmdu"); // char* p = s + cnt; UNSUPPORTED("dy69m5exgjkhw4x2c1j201u5h"); // char* e = p; UNSUPPORTED("akosnsiu9reyhhy9cuyst4u77"); // while (*e && (*e != '"')) e++; UNSUPPORTED("chjva8sotwhp8p0plibzdgt64"); // if (e != p) { UNSUPPORTED("aywlmkpo8in8o5sf37gh7f5o1"); // *e = '\0'; UNSUPPORTED("m9wyrcnvgtzuy3jb5ssyfv91"); // storeFileName (p, e-p); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7fcnmcd19oiyoyaqr7swnx68s // static int chkNum(void) public static Object chkNum(Object... arg) { UNSUPPORTED("q1tlhq1m7q8bylnobldsy8ul"); // static int chkNum(void) { UNSUPPORTED("5xen5v195vyw2zxeos5j4b39u"); // unsigned char c = (unsigned char)aagtext[aagleng-1]; /* last character */ UNSUPPORTED("3lxhbtax9md6unlnsezpjckih"); // if (!isdigit(c) && (c != '.')) { /* c is letter */ UNSUPPORTED("brcmgy65t9y4nm8afackgego3"); // unsigned char xbuf[BUFSIZ]; UNSUPPORTED("8c7x8di5w36ib05qan9z4sl9"); // char buf[BUFSIZ]; UNSUPPORTED("hj3ykx7uaskz9wtccgck8sd6"); // agxbuf xb; UNSUPPORTED("z3843we5vh08lkokocrbxs3e"); // char* fname; UNSUPPORTED("91vq8e011oh7gfgr5bsdo0uoc"); // if (InputFile) UNSUPPORTED("ar7gd5cmdmsozck6dve30u1kc"); // fname = InputFile; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("db3k9j2cu5b3ge53iwoykkaq0"); // fname = "input"; UNSUPPORTED("b2caeimugashizzvpcmbplmp4"); // agxbinit(&xb, BUFSIZ, xbuf); UNSUPPORTED("a2p6g2wxux9rba1tjs2ao7o4o"); // agxbput(&xb,"syntax ambiguity - badly delimited number '"); UNSUPPORTED("1vnop1r6tqrq55n2ab9xcytok"); // agxbput(&xb,aagtext); UNSUPPORTED("2q8daprlj1cl42ze3qlof04a5"); // sprintf(buf,"' in line %d of ", line_num); UNSUPPORTED("3wik853jrdht1hsor80i947ue"); // agxbput(&xb,buf); UNSUPPORTED("36dtrq18d65mdg4ntho7dt2ai"); // agxbput(&xb,fname); UNSUPPORTED("97sgg79xuvu6p1ug1xnmk3egp"); // agxbput(&xb, " splits into two tokens\n"); UNSUPPORTED("98hehf3lz7dyyrzh10pbcvcz8"); // agerr(AGWARN,(((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf))); UNSUPPORTED("52frst03mcbsuu6bmnqs962qm"); // agxbfree(&xb); UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("895k5gbyc2kla939upm8m5u76"); // else return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e5pbkh72mgktxf6bfh0n4gt4 // int aaglex (void) public static Object aaglex(Object... arg) { UNSUPPORTED("pdpjzk6673jkdk1hkeeb2q3a"); // int aaglex (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eyp458tyziuc5smdf8nmisuv0"); // register aag_state_type aag_current_state; UNSUPPORTED("1kcumm40wtgnrwt1lso5lhyim"); // register char *aag_cp, *aag_bp; UNSUPPORTED("epg1tabdb42f9reda2apnb1ms"); // register int aag_act; UNSUPPORTED("8tmid58vn70oblu8ujz1zwswf"); // if ( !(aag_init) ) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("f5bqtt61q9thk5qd1hbwq8iiu"); // (aag_init) = 1; UNSUPPORTED("3koasm308op0tigliblj62e1f"); // if ( ! (aag_start) ) UNSUPPORTED("638agduqknpmfdxz829km27pq"); // (aag_start) = 1; /* first start state */ UNSUPPORTED("5c3m4g98uud1ri4whmpyqmqod"); // if ( ! aagin ) UNSUPPORTED("43slr3lwfniyoyj6xlp230lbh"); // aagin = stdin; UNSUPPORTED("8vznga5m9rzjv7al9ph5m5sp4"); // if ( ! aagout ) UNSUPPORTED("cr8xey1tr55u690uwh7ojmavf"); // aagout = stdout; UNSUPPORTED("6a7g05a63b5vlbmwml9fqm6js"); // if ( ! ( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL) ) { UNSUPPORTED("5k310rk7sd9685w7i0mxhvh7b"); // aagensure_buffer_stack (); UNSUPPORTED("4bwrw2sf366bkgndfaoky57j3"); // (aag_buffer_stack)[(aag_buffer_stack_top)] = UNSUPPORTED("648rwigd13o83ylenne327tpo"); // aag_create_buffer(aagin,16384 ); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("5vdfn4vw8baq4bh6qaiza5ces"); // aag_load_buffer_state( ); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("64w7kx5jkbrgxchxynb9z68sl"); // while ( 1 ) /* loops until end-of-file is reached */ UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("19a62hiie1pmtcddghe0bqc4p"); // aag_cp = (aag_c_buf_p); UNSUPPORTED("3dylne08x28cpv7rgbl9342u9"); // /* Support of aagtext. */ UNSUPPORTED("a4qna0rrphiukyt2cx9xxl4uq"); // *aag_cp = (aag_hold_char); UNSUPPORTED("cqe8nsxx8zip9neqzuass52k7"); // /* aag_bp points to the position in aag_ch_buf of the start of UNSUPPORTED("2hkvmkbfi5k14h6ad5el1ypm4"); // * the current run. UNSUPPORTED("edw1ss2r31mqgsvca2gowi52v"); // */ UNSUPPORTED("2uu83ztfrm2rf4gilr4ndnado"); // aag_bp = aag_cp; UNSUPPORTED("1cgpurhged2awokk4s92iw776"); // aag_current_state = (aag_start); UNSUPPORTED("22smyx4x537664ve7600il5k2"); // aag_current_state += ((aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol); UNSUPPORTED("8n4v70w7yvxxi7wyk8h2ozq69"); // aag_match: UNSUPPORTED("9ksbpucly3ydjrripsbhxyhi6"); // do UNSUPPORTED("2mdt9jdl3qwktdzlvb0pw8fgo"); // { UNSUPPORTED("b017ngi9yoexu0ag8as3kxifu"); // register YY_CHAR aag_c = aag_ec[((unsigned int) (unsigned char) *aag_cp)]; UNSUPPORTED("f0f13rvrp28ugo7n953ww9exm"); // if ( aag_accept[aag_current_state] ) UNSUPPORTED("4pcl1pdojya6hzq73u51kpoch"); // { UNSUPPORTED("2zkjl87i9j14qd0yy84gkxn8w"); // (aag_last_accepting_state) = aag_current_state; UNSUPPORTED("63j2j6c74f6tpdddpw68w7j5g"); // (aag_last_accepting_cpos) = aag_cp; UNSUPPORTED("cysnuxd51taci3hbg5lifz8ce"); // } UNSUPPORTED("2463jdtdj5v0b3g8cve6lltug"); // while ( aag_chk[aag_base[aag_current_state] + aag_c] != aag_current_state ) UNSUPPORTED("4pcl1pdojya6hzq73u51kpoch"); // { UNSUPPORTED("324rw4kwwcob6154aq4iylx2c"); // aag_current_state = (int) aag_def[aag_current_state]; UNSUPPORTED("2lcc1u06ym2da8plsplb66cfx"); // if ( aag_current_state >= 93 ) UNSUPPORTED("w51fl0acyotorjuhgem7gi4c"); // aag_c = aag_meta[(unsigned int) aag_c]; UNSUPPORTED("cysnuxd51taci3hbg5lifz8ce"); // } UNSUPPORTED("5id6x27gn8fz38xu0wfi9oiot"); // aag_current_state = aag_nxt[aag_base[aag_current_state] + (unsigned int) aag_c]; UNSUPPORTED("66elpafqoofzev7x22bewbr2c"); // ++aag_cp; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6cbq6ckkfsopkhgz7xgomi8ai"); // while ( aag_base[aag_current_state] != 230 ); UNSUPPORTED("9m6gq3wy7dxf2989ifsn5cm9t"); // aag_find_action: UNSUPPORTED("6dd3zbwpg5nll3gotac8xs0jk"); // aag_act = aag_accept[aag_current_state]; UNSUPPORTED("3uvb9f03g7dp9se542b3fch97"); // if ( aag_act == 0 ) UNSUPPORTED("9vnsdr0cb64wib7xchxmeffe1"); // { /* have to back up */ UNSUPPORTED("5jmzc2p8ihqh3pl8yk426jjs8"); // aag_cp = (aag_last_accepting_cpos); UNSUPPORTED("4bqktwvoql4rinftb1wb6bwux"); // aag_current_state = (aag_last_accepting_state); UNSUPPORTED("913oa8bs5aedunutrp23qi71j"); // aag_act = aag_accept[aag_current_state]; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("7z2vv0d273lknczgkvpqne3ly"); // (aagtext) = aag_bp; aagleng = (size_t) (aag_cp - aag_bp); (aag_hold_char) = *aag_cp; *aag_cp = '\0'; (aag_c_buf_p) = aag_cp;; UNSUPPORTED("apsw22y8tao100sq9bz9d48v1"); // do_action: /* This label is used only to access EOF actions. */ UNSUPPORTED("8el9cnpl89mu1fuzqhwwf5qxk"); // switch ( aag_act ) UNSUPPORTED("dco2y6y1hd2mnc3n7yoiq7qru"); // { /* beginning of action switch */ UNSUPPORTED("66t1xamwgf1zbtor3asfj4mlj"); // case 0: /* must back up */ UNSUPPORTED("8y7kg3jmm0mxlcmreiqklvczm"); // /* undo the effects of YY_DO_BEFORE_ACTION */ UNSUPPORTED("edfoo8bmsxnzpivnh86hp8g4j"); // *aag_cp = (aag_hold_char); UNSUPPORTED("5jmzc2p8ihqh3pl8yk426jjs8"); // aag_cp = (aag_last_accepting_cpos); UNSUPPORTED("4bqktwvoql4rinftb1wb6bwux"); // aag_current_state = (aag_last_accepting_state); UNSUPPORTED("2t20blf7b2e9uh29x86jqn0uu"); // goto aag_find_action; UNSUPPORTED("4et457vtxvdfcniwgvkmgg27m"); // case 1: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("e9sweqn31kfcpevqzc35so2x7"); // return(EOF); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("ni2wdzcw22kpb7r5rbiir6um"); // case 2: UNSUPPORTED("8fsfk45iz6r1xpxwqpgh87zzc"); // /* rule 2 can match eol */ UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("1om5gjxjxp5p6gu6fqz2e1z4d"); // line_num++; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("29xaavsx8kmwlhodww81f29mi"); // case 3: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("jx9vmge6p0hhmb643cbkitrm"); // (aag_start) = 1 + 2 *(1); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9cpt0kyqy9di8h2cd6iika4bw"); // case 4: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("8vr3x5prkq9bx5x7yv4sasjrd"); // /* eat anything not a '*' */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("c7mpoiwvhax172146g6phlprw"); // case 5: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("dij0hf9wozgcp2ki3m2kifoig"); // /* eat up '*'s not followed by '/'s */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9k5fookwzuytueisvyyz0caqk"); // case 6: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("3wg696bpwfs7vhwcw7iif6yt6"); // (aag_start) = 1 + 2 *(0); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("2q7wq83jxx2tqprtgvfd30b2i"); // case 7: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("6xambzauc9qg5hiyrjp9cv94v"); // /* ignore C++-style comments */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("kmgl4qg4fe9op81j902qtcn6"); // case 8: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("6c3vej4do0hnpt0ddel7ijipo"); // ppDirective (); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3qm4f4fp7kvh4l1xcdwlzcdom"); // case 9: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("e3h3y3usy8rlcha932xyo8bb7"); // /* ignore shell-like comments */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9b848ct8iyxow7s4as982amzi"); // case 10: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("a2zmhocyae95g5xo9bfaljr7k"); // /* ignore whitespace */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("947tafpsnhhss094u71s9ubk9"); // case 11: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("87jhtwvxnhipza9f1s895uull"); // /* ignore BOM */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("2l2qmr4rskdcgekd3oqxqj7f2"); // case 12: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("5ps7dxq4k1qcbyiigtbvitzij"); // return(259); /* see tokens in agcanonstr */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("4b055gsjgrpcvywbk7up4fg5l"); // case 13: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("1l0aw0zsqx2vbkr3zneykykxd"); // return(260); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8njscivqvdlk4vdfnqdcn9p48"); // case 14: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("eilvuennhlsv84ebtaqqz00iw"); // if (!graphType) graphType = 258; return(258); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("72drdinb4kuj1ahx4pw5lzm0v"); // case 15: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("s9a7uspzll6isipj7m07vk6h"); // if (!graphType) graphType = 261; return(261); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("556y3hjg8xc217kgz7oded7kt"); // case 16: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("3yeeq5bkp5kiybo6jn3eyjs2o"); // return(263); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("2gqru8meihkhpbhyd7jcdcsob"); // case 17: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("1avovk9rb0j1co3gabz86001b"); // return(262); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("cxgy20vpnrsxhz5ksw5ht4pww"); // case 18: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("3jmo6uhihr6ouy9u6117d2797"); // if (graphType == 261) return(264); else return('-'); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("alztpmrrh7gk4sd7fc990467l"); // case 19: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("e6ipohsip8k8qzqpgc992rx8c"); // if (graphType == 258) return(264); else return('-'); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6k7gr42ju1rb53hcb5rqnquyu"); // case 20: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("9nt30eaqhmml8uiohjf1h5hdb"); // { aaglval.str = (char*)agstrdup(Ag_G_global,aagtext); return(267); } UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6in850eoepou96lnb2c2t1mpb"); // case 21: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("b15ywfomgq02hcjkw9ampx24y"); // { if (chkNum()) do { int aagless_macro_arg = (aagleng-1); ; *aag_cp = (aag_hold_char); (aag_c_buf_p) = aag_cp = aag_bp + aagless_macro_arg - 0; (aagtext) = aag_bp; aagleng = (size_t) (aag_cp - aag_bp); (aag_hold_char) = *aag_cp; *aag_cp = '\0'; (aag_c_buf_p) = aag_cp;; } while ( 0 ); aaglval.str = (char*)agstrdup(Ag_G_global,aagtext); return(267); } UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("cl2w7n3yx4n622lafbt0bwfz1"); // case 22: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("ees73wgk7mwg9zrh612sgsvy1"); // (aag_start) = 1 + 2 *(2); beginstr(); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("27zayxvq2pc68g5ar0432yw9t"); // case 23: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("c5xf7sj3w7fr0pqstn18tj413"); // (aag_start) = 1 + 2 *(0); endstr(); return (268); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6z3m8132yn8zgtthzycjgz78x"); // case 24: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("8h6g770m5l5g215hhlrt2hx9n"); // addstr ("\""); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("952jh9bx0tpblu7shq5rrwpq2"); // case 25: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("8modtlsmam68shpdmcz87uq8h"); // addstr ("\\\\"); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("52vnyui9jklyykligf30zeaai"); // case 26: UNSUPPORTED("4i9tx8f8c3v6bspkwavhtwano"); // /* rule 26 can match eol */ UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("a8vlwazdypu664ivx6wi8rko2"); // line_num++; /* ignore escaped newlines */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("5n1mokd7dgwogbhb2jas6mb00"); // case 27: UNSUPPORTED("61heacv6izappfw5yjlcp4so4"); // /* rule 27 can match eol */ UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("3mzcrqnslnbq9vtv1zu9sule8"); // addstr(aagtext); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6gczfeucbsq4yjto6hu1ofs42"); // case 28: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("6g9v7q7xrlzfufvlruovef42p"); // (aag_start) = 1 + 2 *(3); html_nest = 1; beginstr(); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("f16p1igprp064qa5n56o1m2wc"); // case 29: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("f3otz7hfp3792v4zck6dvnmo3"); // html_nest--; if (html_nest) addstr(aagtext); else {(aag_start) = 1 + 2 *(0); endstr_html(); return (268);} UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("72s0wtcj4jofeozc8iz5zbhxl"); // case 30: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("aw1td26c2oe06ysc6u6vj8koz"); // html_nest++; addstr(aagtext); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6xefk8kdpp7y1m3tbc0tpw8wa"); // case 31: UNSUPPORTED("7x4ipn0el32pfjyg76p0z4oz8"); // /* rule 31 can match eol */ UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("9xv0goh9ck9y3mkaftbg7vmfd"); // addstr(aagtext); line_num++; /* add newlines */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9m9x22bqi8pwhtev4msso0yze"); // case 32: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("3mzcrqnslnbq9vtv1zu9sule8"); // addstr(aagtext); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("18v1y33kqilsfbxil4b3yna75"); // case 33: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("92pt2p1sqtdccyfawj6shkj14"); // return (aagtext[0]); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("7rr77fryfl2ub6miww7jg5y4o"); // case 34: UNSUPPORTED("cbtwhhcbw0kd10g8r34kiet35"); // if ( aagleng > 0 ) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (aagtext[aagleng - 1] == '\n'); UNSUPPORTED("6bhj3owfzoyf3s0aoqazgzy0q"); // do { if (fwrite( aagtext, aagleng, 1, aagout )) {} } while (0); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("82mqzfrl2p6jfpf29nu6fgxdb"); // case (35 + 0 + 1): UNSUPPORTED("bqr4ckfep54whmo4876vkmecz"); // case (35 + 1 + 1): UNSUPPORTED("1w19dr4ubkia25sdjfzomurdz"); // case (35 + 2 + 1): UNSUPPORTED("byni6m925rj3a4njua63prne"); // case (35 + 3 + 1): UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("3effkdcc9bi9b7aubu1yn7krl"); // case 35: UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("av9evic7ammi9pcxoqac9s8fe"); // /* Amount of text matched not including the EOB char. */ UNSUPPORTED("1jjcl1pqge71gvb9dki5a07ws"); // int aag_amount_of_matched_text = (int) (aag_cp - (aagtext)) - 1; UNSUPPORTED("7pvmj2k0z8lp6jgvv2n65nbps"); // /* Undo the effects of YY_DO_BEFORE_ACTION. */ UNSUPPORTED("a4qna0rrphiukyt2cx9xxl4uq"); // *aag_cp = (aag_hold_char); UNSUPPORTED("ap1b7l55ctbh41rm7yh9a6jyo"); // if ( (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_buffer_status == 0 ) UNSUPPORTED("2mdt9jdl3qwktdzlvb0pw8fgo"); // { UNSUPPORTED("1ukrm4fttw7velp3gbz6awwne"); // /* We're scanning a new file or input source. It's UNSUPPORTED("ejpa48tia006kybs45czjbtse"); // * possible that this happened because the user UNSUPPORTED("76e3nzz08z4fey19zqzdguph"); // * just pointed aagin at a new source and called UNSUPPORTED("cqa8ospx14bmafy4npvtjj0k2"); // * aaglex(). If so, then we have to assure UNSUPPORTED("e858my77taiun73kz47m00tta"); // * consistency between YY_CURRENT_BUFFER and our UNSUPPORTED("8ythbpqr0qrfn0wl55uih2gds"); // * globals. Here is the right place to do so, because UNSUPPORTED("3kdgw6xhyuplwsqtw1ya1pyns"); // * this is the first action (other than possibly a UNSUPPORTED("8fy43ztshuc3bfbwy19xac2zl"); // * back-up) that will match for the new input source. UNSUPPORTED("2y9k3dfnj3qua970vsvm0b9xt"); // */ UNSUPPORTED("mdr9dqcs82gxgeyb3oe50yvc"); // (aag_n_chars) = (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_n_chars; UNSUPPORTED("d7htwvsxyqjdvoqbre0141fdc"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_input_file = aagin; UNSUPPORTED("2pqrlmsv489oepynhx1ctfsrd"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_buffer_status = 1; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("ard8111msvx7284l35jzmp5y9"); // /* Note that here we test for aag_c_buf_p "<=" to the position UNSUPPORTED("97ogb9i5xevnklykvrvxtsi97"); // * of the first EOB in the buffer, since aag_c_buf_p will UNSUPPORTED("19jo527lj5j210hqmlrquzim5"); // * already have been incremented past the NUL character UNSUPPORTED("2vscb9s7ubtgam0r7riyi9532"); // * (since all states make transitions on EOB to the UNSUPPORTED("2mc3sssivepynss4pdzupko6m"); // * end-of-buffer state). Contrast this with the test UNSUPPORTED("7gdu59sqyc5wdahkc2f0kmu3k"); // * in input(). UNSUPPORTED("edw1ss2r31mqgsvca2gowi52v"); // */ UNSUPPORTED("eqvop36r3g0w8y5r7s6o3eupd"); // if ( (aag_c_buf_p) <= &(aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf[(aag_n_chars)] ) UNSUPPORTED("9clhogjc9o5uemyhl9hx7vs38"); // { /* This was really a NUL. */ UNSUPPORTED("136dyc2eryl7aywuv0ri6zazd"); // aag_state_type aag_next_state; UNSUPPORTED("ip2pkbcvc5wty9nphzk8ahqi"); // (aag_c_buf_p) = (aagtext) + aag_amount_of_matched_text; UNSUPPORTED("dnttuw20ekafhnv84tucwwbw6"); // aag_current_state = aag_get_previous_state( ); UNSUPPORTED("19i5bou5dpnrvnljd6c0zi7cs"); // /* Okay, we're now positioned to make the NUL UNSUPPORTED("1zps4d1dwhg8g1u1jcscs77fp"); // * transition. We couldn't have UNSUPPORTED("7lnrxsnfwfae9shztjlz5d2sj"); // * aag_get_previous_state() go ahead and do it UNSUPPORTED("uvmaxaik4hf1hih46fejzlqo"); // * for us because it doesn't know how to deal UNSUPPORTED("a3itb2gth3y61hczkkazgkqen"); // * with the possibility of jamming (and we don't UNSUPPORTED("bsa6425l53922413u37n1by7w"); // * want to build jamming into it because then it UNSUPPORTED("cs6ggz4s573xazs4k8oj0wacf"); // * will run more slowly). UNSUPPORTED("2y9k3dfnj3qua970vsvm0b9xt"); // */ UNSUPPORTED("6wfb6gr9sqw5321of6whv6g1n"); // aag_next_state = aag_try_NUL_trans( aag_current_state ); UNSUPPORTED("47exoq6ktpu2z6qqmsrgjw8mn"); // aag_bp = (aagtext) + 0; UNSUPPORTED("1z20nxzgjchfpg43kk6p2rxmb"); // if ( aag_next_state ) UNSUPPORTED("4pcl1pdojya6hzq73u51kpoch"); // { UNSUPPORTED("2f7302gvw3z5l0tvki3jgnl0q"); // /* Consume the NUL. */ UNSUPPORTED("ewxmr5ocyniqq9kqdwnbryo5i"); // aag_cp = ++(aag_c_buf_p); UNSUPPORTED("b2y561rlv42sr2t5b8ebldk2s"); // aag_current_state = aag_next_state; UNSUPPORTED("ba9wj7om5zk7mol03zxpekt7j"); // goto aag_match; UNSUPPORTED("cysnuxd51taci3hbg5lifz8ce"); // } UNSUPPORTED("cqgi8f4d37bqva8z6bx5rvn7w"); // else UNSUPPORTED("4pcl1pdojya6hzq73u51kpoch"); // { UNSUPPORTED("3nanwdupbkgohlzpjzoaukbr4"); // aag_cp = (aag_c_buf_p); UNSUPPORTED("9l6wm3vx0rph8i8h7m4dcq34x"); // goto aag_find_action; UNSUPPORTED("cysnuxd51taci3hbg5lifz8ce"); // } UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("db3yodgf9sh6cnz3cf8qizzbr"); // else switch ( aag_get_next_buffer( ) ) UNSUPPORTED("2mdt9jdl3qwktdzlvb0pw8fgo"); // { UNSUPPORTED("4yd30eh9icuxnqotseihb7l4w"); // case 1: UNSUPPORTED("4pcl1pdojya6hzq73u51kpoch"); // { UNSUPPORTED("e4pcfhdqidvl3xfh8flankk0m"); // (aag_did_buffer_switch_on_eof) = 0; UNSUPPORTED("8cpkysq4c2ufhdv2uclyjax2l"); // if ( aagwrap( ) ) UNSUPPORTED("e928s13otj5jhz855y8um3tz8"); // { UNSUPPORTED("5pvlvgzt9geyx90w8yok6qskk"); // /* Note: because we've taken care in UNSUPPORTED("f2ael09dm75ew3qvb39e8dmqo"); // * aag_get_next_buffer() to have set up UNSUPPORTED("azoxfeu7zbmcqm822xexak7a9"); // * aagtext, we can now set up UNSUPPORTED("6n6tnxe89kixgxdvdyu3kderg"); // * aag_c_buf_p so that if some total UNSUPPORTED("v9iirt1qdivb9mokpz8betax"); // * hoser (like flex itself) wants to UNSUPPORTED("e6du46l70usukl02zbir6z3i6"); // * call the scanner after we return the UNSUPPORTED("5xnn62l1dvx5zzamkjgowqgz0"); // * YY_NULL, it'll still work - another UNSUPPORTED("5huja6w3dtx1wyo3didu5x71b"); // * YY_NULL will get returned. UNSUPPORTED("2y9jwnvnhklvpvmeawdnqm8i2"); // */ UNSUPPORTED("f3eyysgcmabvn5tt38wvn6vpj"); // (aag_c_buf_p) = (aagtext) + 0; UNSUPPORTED("b38vk2yl7yd3ccilu78zpdbdw"); // aag_act = (35 + (((aag_start) - 1) / 2) + 1); UNSUPPORTED("1kklaudkj34oc41ju7jowskat"); // goto do_action; UNSUPPORTED("7qewsve9tto7ge11dkittrbpg"); // } UNSUPPORTED("5dmwgqu6vf5e7mr3pnblxlzbr"); // else UNSUPPORTED("e928s13otj5jhz855y8um3tz8"); // { UNSUPPORTED("9igctqd1bmlpq7mo4bt3sj8c3"); // if ( ! (aag_did_buffer_switch_on_eof) ) UNSUPPORTED("apt6qnupr74oq1rmuhce124oq"); // aagrestart(aagin ); UNSUPPORTED("7qewsve9tto7ge11dkittrbpg"); // } UNSUPPORTED("1dhrv6aj5eq8ntuvb7qbs8aot"); // break; UNSUPPORTED("cysnuxd51taci3hbg5lifz8ce"); // } UNSUPPORTED("5hg15npsnnf19eml2makv9mgf"); // case 0: UNSUPPORTED("5igou3g3x4fk7tev76iwuz4eu"); // (aag_c_buf_p) = UNSUPPORTED("8z7l3eh0oo09flvmepzomf8p5"); // (aagtext) + aag_amount_of_matched_text; UNSUPPORTED("1aotx4d0a8ouhfouerkr911ty"); // aag_current_state = aag_get_previous_state( ); UNSUPPORTED("3nanwdupbkgohlzpjzoaukbr4"); // aag_cp = (aag_c_buf_p); UNSUPPORTED("ak6tf6umjq968y5h6qwp3ceo3"); // aag_bp = (aagtext) + 0; UNSUPPORTED("ba9wj7om5zk7mol03zxpekt7j"); // goto aag_match; UNSUPPORTED("ewxk0u6la5xyi9w9bnvvvi27w"); // case 2: UNSUPPORTED("5igou3g3x4fk7tev76iwuz4eu"); // (aag_c_buf_p) = UNSUPPORTED("5818biabe0znc0ppmei5vo5wo"); // &(aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf[(aag_n_chars)]; UNSUPPORTED("1aotx4d0a8ouhfouerkr911ty"); // aag_current_state = aag_get_previous_state( ); UNSUPPORTED("3nanwdupbkgohlzpjzoaukbr4"); // aag_cp = (aag_c_buf_p); UNSUPPORTED("ak6tf6umjq968y5h6qwp3ceo3"); // aag_bp = (aagtext) + 0; UNSUPPORTED("9l6wm3vx0rph8i8h7m4dcq34x"); // goto aag_find_action; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("7tfrjvpj21qv1411du5f3lm34"); // aag_fatal_error( UNSUPPORTED("ybsxsjxulyne6r7b32vyqqa4"); // "fatal flex scanner internal error--no action found" ); UNSUPPORTED("b7lvqabjq0uf837l088tlw8kv"); // } /* end of action switch */ UNSUPPORTED("thqyr6hhv3rcohnninr3k5q3"); // } /* end of scanning one token */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1bk2c3ez7bpnqxz6emq8dv629 // static int aag_get_next_buffer (void) public static Object aag_get_next_buffer(Object... arg) { UNSUPPORTED("bntfc8vc6ws60twpz2ksf3ytd"); // static int aag_get_next_buffer (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7ebw6rt1a8gwit3l70juuhrut"); // register char *dest = (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf; UNSUPPORTED("ep8exp77z0cdsbzoahv0n7pga"); // register char *source = (aagtext); UNSUPPORTED("85flzwsp2wkcuz6e6p5ey0ja4"); // register int number_to_move, i; UNSUPPORTED("aipx13znfwyxln9k8crlo39qe"); // int ret_val; UNSUPPORTED("ft3hwcdb787h4u0eu9f0gq84"); // if ( (aag_c_buf_p) > &(aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf[(aag_n_chars) + 1] ) UNSUPPORTED("7tfrjvpj21qv1411du5f3lm34"); // aag_fatal_error( UNSUPPORTED("cqw5y0axbe6zpejdhw2kz5g37"); // "fatal flex scanner internal error--end of buffer missed" ); UNSUPPORTED("79gs3w7jltoyaahske4enadi5"); // if ( (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_fill_buffer == 0 ) UNSUPPORTED("6m10jh2mrvdgrq5kcutyjfag5"); // { /* Don't try to fill the buffer, so this is an EOF. */ UNSUPPORTED("e47658a035mlx7e7nkbpn43e6"); // if ( (aag_c_buf_p) - (aagtext) - 0 == 1 ) UNSUPPORTED("2mdt9jdl3qwktdzlvb0pw8fgo"); // { UNSUPPORTED("edz3vn43zclgv62mlqerwztul"); // /* We matched a single character, the EOB, so UNSUPPORTED("ddn9y5tn3j329gcb6g4qzn5bo"); // * treat this as a final EOF. UNSUPPORTED("2y9k3dfnj3qua970vsvm0b9xt"); // */ UNSUPPORTED("2gvt66h1ue0vdx0rjg7066zj5"); // return 1; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("2mdt9jdl3qwktdzlvb0pw8fgo"); // { UNSUPPORTED("6p4qje014bli5jooxuv9gplax"); // /* We matched some text prior to the EOB, first UNSUPPORTED("2zgir7cl8vs3jtvgsypy2cprv"); // * process it. UNSUPPORTED("2y9k3dfnj3qua970vsvm0b9xt"); // */ UNSUPPORTED("56avbgath9pkm0tr5vgc38blj"); // return 2; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("5iv5436jldi3r5zxc6cyesgt3"); // /* Try to read more data. */ UNSUPPORTED("5gu7qax0c1v1a4pmunre2gpfc"); // /* First move last chars to start of buffer. */ UNSUPPORTED("6c80q0czxg343aiz9kirv4lcf"); // number_to_move = (int) ((aag_c_buf_p) - (aagtext)) - 1; UNSUPPORTED("ez6g2p84bd6n5fvmtci3lp5ey"); // for ( i = 0; i < number_to_move; ++i ) UNSUPPORTED("14sjmc97aajazt787to7n4w8q"); // *(dest++) = *(source++); UNSUPPORTED("9y3826ahw934er4dx6vzgbb98"); // if ( (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_buffer_status == 2 ) UNSUPPORTED("7v17eedbak69z08pul9m1ee0h"); // /* don't do the read, it's not guaranteed to return an EOF, UNSUPPORTED("3tpu3we8b13sqp1mg1w6oosky"); // * just force an EOF UNSUPPORTED("edw1ss2r31mqgsvca2gowi52v"); // */ UNSUPPORTED("816mxs5qse46gpfyinnbmuelu"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_n_chars = (aag_n_chars) = 0; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("7411ae9sfh5a5sue0c5a6t9jd"); // aag_size_t num_to_read = UNSUPPORTED("7p2gso32w93qf8mfa7c19dd4i"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_buf_size - number_to_move - 1; UNSUPPORTED("2lab0ejz2s9lpjigij4sy0k1h"); // while ( num_to_read <= 0 ) UNSUPPORTED("5vqkxz0eyslb5vps9nth5smdi"); // { /* Not enough room in the buffer - grow it. */ UNSUPPORTED("cb56koc4u4bh5car10xu0dn6z"); // /* just a shorter name for the current buffer */ UNSUPPORTED("57z8rr3zk0z9khsbhykuxu8f7"); // YY_BUFFER_STATE b = (aag_buffer_stack)[(aag_buffer_stack_top)]; UNSUPPORTED("73xg397okl0zo8gynw4zng1ke"); // int aag_c_buf_p_offset = UNSUPPORTED("1219lzhygrtpy6if4axt26e6q"); // (int) ((aag_c_buf_p) - b->aag_ch_buf); UNSUPPORTED("cruwi0gg9f33wqllvt84m81o"); // if ( b->aag_is_our_buffer ) UNSUPPORTED("4pcl1pdojya6hzq73u51kpoch"); // { UNSUPPORTED("5yo2d2rl188byncy10yrgxzqd"); // aag_size_t new_size = b->aag_buf_size * 2; UNSUPPORTED("cw9ef12ijn3ivaqxpw82amgng"); // if ( new_size <= 0 ) UNSUPPORTED("cvj6plivf0ytolhdcjfmykskk"); // b->aag_buf_size += b->aag_buf_size / 8; UNSUPPORTED("5dmwgqu6vf5e7mr3pnblxlzbr"); // else UNSUPPORTED("ebs3qp1orzgn5dkmp3ywh6rl5"); // b->aag_buf_size *= 2; UNSUPPORTED("t0cgbfvq2iycyesyp42ox2vd"); // b->aag_ch_buf = (char *) UNSUPPORTED("29w5kmsm7hhw6cok9tpv7juql"); // /* Include room in for 2 EOB chars. */ UNSUPPORTED("3ckiwiugcrriz4h2tefqpz24s"); // aagrealloc((void *) b->aag_ch_buf,b->aag_buf_size + 2 ); UNSUPPORTED("cysnuxd51taci3hbg5lifz8ce"); // } UNSUPPORTED("cqgi8f4d37bqva8z6bx5rvn7w"); // else UNSUPPORTED("d073t5yhzx1z93fa1qs3qig1i"); // /* Can't grow it, we don't own it. */ UNSUPPORTED("3buju5gen0sfqxk4qcf32ym1b"); // b->aag_ch_buf = 0; UNSUPPORTED("c8x2050nl0s3jf5j0rjmlwb6i"); // if ( ! b->aag_ch_buf ) UNSUPPORTED("3pnzyfuwgj63ox03srpnrx671"); // aag_fatal_error( UNSUPPORTED("ddwv9qwbvjhwo8ogidsc3pkcx"); // "fatal error - scanner input buffer overflow" ); UNSUPPORTED("23uwqhddabh2z0u142dlwaqgg"); // (aag_c_buf_p) = &b->aag_ch_buf[aag_c_buf_p_offset]; UNSUPPORTED("3v3z6b3hxykqsnkm34v5vt5rr"); // num_to_read = (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_buf_size - UNSUPPORTED("5jdefmguv6za2qdk3aqk98yot"); // number_to_move - 1; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("4svgtot6766l3a8qotzee9wvw"); // if ( num_to_read > 8192 ) UNSUPPORTED("1msizybwtesl5m6srryjf8r50"); // num_to_read = 8192; UNSUPPORTED("9hh9s07ydq4w9w37dlrlncmbt"); // /* Read in more data. */ UNSUPPORTED("6g59dwr892s73mmz5s1084rpw"); // if (( UNSUPPORTED("28bayw02ppqcuffpcnzwuat5f"); // (aag_n_chars) = Disc->io->afread(Ifile, (&(aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf[number_to_move]), num_to_read)) < 0) aag_fatal_error( "input in flex scanner failed" ); UNSUPPORTED("2uvf85bz227zpcsxn55l3cvsw"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_n_chars = (aag_n_chars); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("ah0h9w907nopolcfy6oyiwctm"); // if ( (aag_n_chars) == 0 ) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("2e0812f9qysrs1efjy2brmdet"); // if ( number_to_move == 0 ) UNSUPPORTED("2mdt9jdl3qwktdzlvb0pw8fgo"); // { UNSUPPORTED("ecuksii2a411xyljnmuh7c8io"); // ret_val = 1; UNSUPPORTED("du8qw8rchee4hl3blu07sw364"); // aagrestart(aagin ); UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("2mdt9jdl3qwktdzlvb0pw8fgo"); // { UNSUPPORTED("cnfvjf35p8z6jfgiaezhf7jnk"); // ret_val = 2; UNSUPPORTED("2dy4yjkq71w7t5m682j0cm1do"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_buffer_status = UNSUPPORTED("8dhl80gn8b27c7954rwx13hpd"); // 2; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("2tlz7d1xig0tr630niwla9240"); // ret_val = 0; UNSUPPORTED("cej0ij8gde9cqmlkewlcgbm5t"); // if ((aag_size_t) ((aag_n_chars) + number_to_move) > (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_buf_size) { UNSUPPORTED("8xt9rijm997e0dmpqnxn4tsce"); // /* Extend the array by 50%, plus the number we really need. */ UNSUPPORTED("eoh92xe0ah4y9oioxbsfttwsl"); // aag_size_t new_size = (aag_n_chars) + number_to_move + ((aag_n_chars) >> 1); UNSUPPORTED("cbqw1w6erw5da9h1syi4c81rq"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf = (char *) aagrealloc((void *) (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf,new_size ); UNSUPPORTED("2w92ms8mfyj9c5vtlxgacptui"); // if ( ! (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf ) UNSUPPORTED("bpvihnydln2vsx5j33w8sq0gq"); // aag_fatal_error( "out of dynamic memory in aag_get_next_buffer()" ); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6pgwguxop58ea3opnzwrkudrv"); // (aag_n_chars) += number_to_move; UNSUPPORTED("8k7xb1uamjt1og4y1mbhrq5le"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf[(aag_n_chars)] = 0; UNSUPPORTED("dng2s9q40h2aln7hzu7fa508"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf[(aag_n_chars) + 1] = 0; UNSUPPORTED("9zeakom5x40jklkzebzu09ooq"); // (aagtext) = &(aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf[0]; UNSUPPORTED("c5segzlua9r3zhvzijt0rr81e"); // return ret_val; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dge0pk480ox74sfkkc1y9j2az // static aag_state_type aag_get_previous_state (void) public static Object aag_get_previous_state(Object... arg) { UNSUPPORTED("2f7ywxbd41kv0w35fr0s3gwtv"); // static aag_state_type aag_get_previous_state (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eyp458tyziuc5smdf8nmisuv0"); // register aag_state_type aag_current_state; UNSUPPORTED("8uf0gbbm46tqgc4hioxy8vjiz"); // register char *aag_cp; UNSUPPORTED("bieja928rkcqrr592kae9apln"); // aag_current_state = (aag_start); UNSUPPORTED("jczmn8egwv4b13o2oyfr7nrl"); // aag_current_state += ((aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol); UNSUPPORTED("9b7y7lw6mfst8xpmeih019ad"); // for ( aag_cp = (aagtext) + 0; aag_cp < (aag_c_buf_p); ++aag_cp ) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("7qllmw83ohozx15rcagotofz5"); // register YY_CHAR aag_c = (*aag_cp ? aag_ec[((unsigned int) (unsigned char) *aag_cp)] : 1); UNSUPPORTED("313py7stvip1doqr47qqt0la0"); // if ( aag_accept[aag_current_state] ) UNSUPPORTED("2mdt9jdl3qwktdzlvb0pw8fgo"); // { UNSUPPORTED("e7sxeyap3mdy720wtkcdplou5"); // (aag_last_accepting_state) = aag_current_state; UNSUPPORTED("8qjgsamzeoh109vb22f604x7t"); // (aag_last_accepting_cpos) = aag_cp; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("4h466p7keybrkr5v3giksps4p"); // while ( aag_chk[aag_base[aag_current_state] + aag_c] != aag_current_state ) UNSUPPORTED("2mdt9jdl3qwktdzlvb0pw8fgo"); // { UNSUPPORTED("aajkf5dqhvqmw3f9n7p38pj6r"); // aag_current_state = (int) aag_def[aag_current_state]; UNSUPPORTED("9yopsiwk4yoadiay9h9cv9ehi"); // if ( aag_current_state >= 93 ) UNSUPPORTED("7vv9ddmvdeq6bgnhu9nrcnxvm"); // aag_c = aag_meta[(unsigned int) aag_c]; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("51p9ejc6sf5qknsjvtayasozy"); // aag_current_state = aag_nxt[aag_base[aag_current_state] + (unsigned int) aag_c]; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("byo2sznczq4ymhtli73pm3udl"); // return aag_current_state; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1bqrp6l15lwke1ldr6rocxdac // static aag_state_type aag_try_NUL_trans (aag_state_type aag_current_state ) public static Object aag_try_NUL_trans(Object... arg) { UNSUPPORTED("1c5zau9pxlkse3pyxct71b9b6"); // static aag_state_type aag_try_NUL_trans (aag_state_type aag_current_state ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5cttrvxgf8tj171oltic9kuxk"); // register int aag_is_jam; UNSUPPORTED("607lnmo0y2p5f2uu142fznvum"); // register char *aag_cp = (aag_c_buf_p); UNSUPPORTED("dom9fqyl48xmfjoext3bee9m3"); // register YY_CHAR aag_c = 1; UNSUPPORTED("31kqmiupr0r27efmb8f7imz5i"); // if ( aag_accept[aag_current_state] ) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("dgv7pz2zpo0js8rtzn1ni3x7v"); // (aag_last_accepting_state) = aag_current_state; UNSUPPORTED("7p069a7s6dmsdw8ysdduj38wm"); // (aag_last_accepting_cpos) = aag_cp; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("m4dsqto0nhwwx0m59nbspfk1"); // while ( aag_chk[aag_base[aag_current_state] + aag_c] != aag_current_state ) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("85khbtsksdmgyqrfzhgdys0g3"); // aag_current_state = (int) aag_def[aag_current_state]; UNSUPPORTED("9a13x8h85yf4gv3bob5ag8x9f"); // if ( aag_current_state >= 93 ) UNSUPPORTED("e1mfyn6wjy9wyaq80y0xgwjhr"); // aag_c = aag_meta[(unsigned int) aag_c]; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("14xmpnv4kpg47d1zmttc99fz0"); // aag_current_state = aag_nxt[aag_base[aag_current_state] + (unsigned int) aag_c]; UNSUPPORTED("13un885faeok3sujcnk8wsrm3"); // aag_is_jam = (aag_current_state == 92); UNSUPPORTED("6l9txnev1x47auh1g4bpko864"); // return aag_is_jam ? 0 : aag_current_state; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 kz1k3qeyyshqirx2726nc2lb // static void aagunput (int c, register char * aag_bp ) public static Object aagunput(Object... arg) { UNSUPPORTED("6qb36grs4pj0ke1dlwgx370i1"); // static void aagunput (int c, register char * aag_bp ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8uf0gbbm46tqgc4hioxy8vjiz"); // register char *aag_cp; UNSUPPORTED("3rlqat2geccfwfzu8sgn63j61"); // aag_cp = (aag_c_buf_p); UNSUPPORTED("9oaabjtrdlssvq6fvlwffi1f2"); // /* undo effects of setting up aagtext */ UNSUPPORTED("11cebwack73ecjllyd3vaefq4"); // *aag_cp = (aag_hold_char); UNSUPPORTED("3mir5tgsoqs63hlvlewrogbvr"); // if ( aag_cp < (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf + 2 ) UNSUPPORTED("14vg05mqua5r457g6eyrugk5q"); // { /* need to shift things up to make room */ UNSUPPORTED("1ec7aezzerjgwgwx53i84wstu"); // /* +2 for EOB chars. */ UNSUPPORTED("b87cedaxmgerhw9uxiuys7af3"); // register aag_size_t number_to_move = (aag_n_chars) + 2; UNSUPPORTED("7c3v153qetipljsaewu70fefp"); // register char *dest = &(aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf[ UNSUPPORTED("bj56edmxlh2xzs98iz0i5xcah"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_buf_size + 2]; UNSUPPORTED("dqsiggiv5ytfmlvfbgfomuzkx"); // register char *source = UNSUPPORTED("2n82mug2j3rzge4uc8kl6gemy"); // &(aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf[number_to_move]; UNSUPPORTED("997on72fary1gmvda0adob8e2"); // while ( source > (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf ) UNSUPPORTED("4o5m6d8nlzgd7ivcwrah26ssf"); // *--dest = *--source; UNSUPPORTED("7fav6sgyuoyymce07cmiwfgrl"); // aag_cp += (int) (dest - source); UNSUPPORTED("4hwl1p0ol7p3jlw8t1v4iy3dm"); // aag_bp += (int) (dest - source); UNSUPPORTED("8ggnn11a3zgylsepvdmi403jw"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_n_chars = UNSUPPORTED("c12ay56bgt5zgecfp6csc78py"); // (aag_n_chars) = (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_buf_size; UNSUPPORTED("9qwx52jdmrqtblu9k27dw2n5j"); // if ( aag_cp < (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf + 2 ) UNSUPPORTED("2l6f8vs2equ9c6umygyh46k17"); // aag_fatal_error( "flex scanner push-back overflow" ); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("1pzi72hhrtp5tjgv7agsfcrnf"); // *--aag_cp = (char) c; UNSUPPORTED("dq0ryg1dmq4j646ibu68d5b64"); // (aagtext) = aag_bp; UNSUPPORTED("ee6jtq1rwjxor1054gu7uvbkq"); // (aag_hold_char) = *aag_cp; UNSUPPORTED("8toiq63heg2dnnwc1uzhvahm9"); // (aag_c_buf_p) = aag_cp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 23mhytvy8ivrz8bn5qfjy7jm5 // static int input (void) public static Object input(Object... arg) { UNSUPPORTED("8vrkofm3h8bcnpmtcw7xt22kr"); // static int input (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bf60xh4vwy9e0mvwv89b3f8cu"); // int c; UNSUPPORTED("f2j3r93ldwabmgkvopbu8ke69"); // *(aag_c_buf_p) = (aag_hold_char); UNSUPPORTED("c8eyfnv59jx8hpsjk089mtwrr"); // if ( *(aag_c_buf_p) == 0 ) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("b32kgmqpglza1bwirwnd6tlkl"); // /* aag_c_buf_p now points to the character we want to return. UNSUPPORTED("1hq4yhwl0fx75o15jngw0ihb9"); // * If this occurs *before* the EOB characters, then it's a UNSUPPORTED("f0bzc3s2oxed7pb8q34p648qy"); // * valid NUL; if not, then we've hit the end of the buffer. UNSUPPORTED("edw1ss2r31mqgsvca2gowi52v"); // */ UNSUPPORTED("ery3od70l5wa0sz5nqawbvems"); // if ( (aag_c_buf_p) < &(aag_buffer_stack)[(aag_buffer_stack_top)]->aag_ch_buf[(aag_n_chars)] ) UNSUPPORTED("32h5pb0mkqm4y03b8eybnh4mp"); // /* This was really a NUL. */ UNSUPPORTED("5n4fw7opgc3vyuqhdl9s5erhg"); // *(aag_c_buf_p) = '\0'; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("7jppcthnpiitb724w59fg08vn"); // { /* need more input */ UNSUPPORTED("4kiy5u9c2j6xbnjs99ouhtt50"); // aag_size_t offset = (aag_c_buf_p) - (aagtext); UNSUPPORTED("f0eo1b9yirx22lyq6rll7v2ly"); // ++(aag_c_buf_p); UNSUPPORTED("aexb0uyz5zg1fozkicu5sbmg8"); // switch ( aag_get_next_buffer( ) ) UNSUPPORTED("4pcl1pdojya6hzq73u51kpoch"); // { UNSUPPORTED("zs8i523h032f7caqsscettcf"); // case 2: UNSUPPORTED("wwb9heihlmibsfsk93ug6kah"); // /* This happens because aag_g_n_b() UNSUPPORTED("cay0jfu5p5z0uf8v7zaxuhqv3"); // * sees that we've accumulated a UNSUPPORTED("5nb4ylc94zsre9qm9tqb913kk"); // * token and flags that we need to UNSUPPORTED("bu1eyl05r0dcoh5bvhilyf33w"); // * try matching the token before UNSUPPORTED("e920mo2stwad3a7t16p9c67i2"); // * proceeding. But for input(), UNSUPPORTED("arhq65ae9riiq10uwiv7kyrw9"); // * there's no matching to consider. UNSUPPORTED("3gkh77x2y5ieqqohy07a19d72"); // * So convert the EOB_ACT_LAST_MATCH UNSUPPORTED("bi4v3ylk18fw58gaxmlii0vgt"); // * to EOB_ACT_END_OF_FILE. UNSUPPORTED("2y9jwnvnhklvpvmeawdnqm8i2"); // */ UNSUPPORTED("9pds58wgqhghti0xhbd56ey3"); // /* Reset buffer status. */ UNSUPPORTED("e604jkju2d2uxstj1rcgnpwzf"); // aagrestart(aagin ); UNSUPPORTED("3p8lrx0z9pmfvk0ung8t0k5gw"); // /*FALLTHROUGH*/ UNSUPPORTED("55sc5kjxx194qbywunw6ie4tq"); // case 1: UNSUPPORTED("e928s13otj5jhz855y8um3tz8"); // { UNSUPPORTED("8vgbl2qps52inifu5y46ybcb3"); // if ( aagwrap( ) ) UNSUPPORTED("beelx35ltrjy6zawc0jvwlmdy"); // return EOF; UNSUPPORTED("9igctqd1bmlpq7mo4bt3sj8c3"); // if ( ! (aag_did_buffer_switch_on_eof) ) UNSUPPORTED("apt6qnupr74oq1rmuhce124oq"); // aagrestart(aagin ); UNSUPPORTED("77mnxqllv81bh7cvexbu27yd0"); // return input(); UNSUPPORTED("7qewsve9tto7ge11dkittrbpg"); // } UNSUPPORTED("ch7zw859io5htnhxq7j7g62v"); // case 0: UNSUPPORTED("asfd0yomhggpw8xczfs2rcq0r"); // (aag_c_buf_p) = (aagtext) + offset; UNSUPPORTED("6ioth986rfbv208dp59shjy15"); // break; UNSUPPORTED("cysnuxd51taci3hbg5lifz8ce"); // } UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("eq7rg75ncqkmice90l768lltk"); // c = *(unsigned char *) (aag_c_buf_p); /* cast for 8-bit char's */ UNSUPPORTED("2pzbicuaj8qxlozp4jb49ela9"); // *(aag_c_buf_p) = '\0'; /* preserve aagtext */ UNSUPPORTED("63aemjzvkjbuuwy5niv1p8ems"); // (aag_hold_char) = *++(aag_c_buf_p); UNSUPPORTED("7mz0nhmwr7rhmhe4726mxy930"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_at_bol = (c == '\n'); UNSUPPORTED("7q6l09k0u87z31e0nmv2lwr94"); // return c; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b91gjad0l9xznwagmx7tqnomu // void aagrestart (FILE * input_file ) public static Object aagrestart(Object... arg) { UNSUPPORTED("a7s7ae3oh1mpb0t6l6gwghp8t"); // void aagrestart (FILE * input_file ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4cjxiuze5n97ut49tnlx7f0xu"); // if ( ! ( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL) ){ UNSUPPORTED("50o2qy0tkzxph6w8v4gybs11"); // aagensure_buffer_stack (); UNSUPPORTED("4uzesnnzwv3eg6zjha19j70aj"); // (aag_buffer_stack)[(aag_buffer_stack_top)] = UNSUPPORTED("cdlpme9zcovn7oia109nftsnu"); // aag_create_buffer(aagin,16384 ); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("b96548w382ibaotlsxjpmslh2"); // aag_init_buffer(( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL),input_file ); UNSUPPORTED("a4b2f8asd493ruq5ci95a6m81"); // aag_load_buffer_state( ); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 418kp3955qaorltr2gp3n7hr3 // void aag_switch_to_buffer (YY_BUFFER_STATE new_buffer ) public static Object aag_switch_to_buffer(Object... arg) { UNSUPPORTED("7s07x3nube8908f082kwgj234"); // void aag_switch_to_buffer (YY_BUFFER_STATE new_buffer ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9t2da7w0dy6ecggk3f3lrrzln"); // /* TODO. We should be able to replace this entire function body UNSUPPORTED("6khfrwvr9ws4yzopxjkiwe8l"); // * with UNSUPPORTED("9rsuoxcu7gx52b6otrhhwtbp7"); // * aagpop_buffer_state(); UNSUPPORTED("eocuxrrwbo1wfytacznzt7kdp"); // * aagpush_buffer_state(new_buffer); UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("agzt1ivnppc6nqqlyw5uo8amy"); // aagensure_buffer_stack (); UNSUPPORTED("2t3t5pfo25q325w207ho598um"); // if ( ( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL) == new_buffer ) UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("aqaux0xumrbi1suoc6u75bn9h"); // if ( ( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL) ) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("hjirhak021dywcjxs66ukoqh"); // /* Flush out information for old buffer. */ UNSUPPORTED("cbtw5voc0x2dgb1nir3oodu4h"); // *(aag_c_buf_p) = (aag_hold_char); UNSUPPORTED("1lg74bgprfb93mb6yie4nebk2"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_buf_pos = (aag_c_buf_p); UNSUPPORTED("2uvf85bz227zpcsxn55l3cvsw"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_n_chars = (aag_n_chars); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("8zeem234b4537a5t9ii8mjp5e"); // (aag_buffer_stack)[(aag_buffer_stack_top)] = new_buffer; UNSUPPORTED("a4b2f8asd493ruq5ci95a6m81"); // aag_load_buffer_state( ); UNSUPPORTED("azal5032o9c7tkzm8qk3rv7np"); // /* We don't actually know whether we did this switch during UNSUPPORTED("3zs2zt7i904jm2iq5o5xye4ud"); // * EOF (aagwrap()) processing, but the only time this flag UNSUPPORTED("1msm0c25dbdvj3ng1fyovpk1a"); // * is looked at is after aagwrap() is called, so it's safe UNSUPPORTED("bxcz3h8s1o9spx7fi7mo2v5t8"); // * to go ahead and always set it. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("8hdw1gealimged5gkvfrv62pl"); // (aag_did_buffer_switch_on_eof) = 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2n1quqa5b6mm0p65k3ewgjdll // static void aag_load_buffer_state (void) public static Object aag_load_buffer_state(Object... arg) { UNSUPPORTED("m33qzmtmg0y53g5pbnlx9mmy"); // static void aag_load_buffer_state (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9thlshhzkqrol5z7lpkm8f7wd"); // (aag_n_chars) = (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_n_chars; UNSUPPORTED("6cc5nb0zuwi0rv2esfs7inl4"); // (aagtext) = (aag_c_buf_p) = (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_buf_pos; UNSUPPORTED("a93nq970fiu3j1tyhej3qvj4g"); // aagin = (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_input_file; UNSUPPORTED("exnttys65gikok2rjt0w4ruaq"); // (aag_hold_char) = *(aag_c_buf_p); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bz2sdl6duvmrjgptg3i8pek7d // YY_BUFFER_STATE aag_create_buffer (FILE * file, int size ) public static Object aag_create_buffer(Object... arg) { UNSUPPORTED("9a1gw2xo54z6vxuqswldwr5vh"); // YY_BUFFER_STATE aag_create_buffer (FILE * file, int size ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("17fp4sigd3bnfjdj56aiskloz"); // YY_BUFFER_STATE b; UNSUPPORTED("7mrf0i5kql5xndjgllkbconxd"); // b = (YY_BUFFER_STATE) aagalloc(sizeof( struct aag_buffer_state ) ); UNSUPPORTED("6dbppvcge8q0qzkzswhskafq0"); // if ( ! b ) UNSUPPORTED("2f1vsk88rl2oqimdpnpm8sbvq"); // aag_fatal_error( "out of dynamic memory in aag_create_buffer()" ); UNSUPPORTED("2l43p529tfo79vh9xkwoo3hfy"); // b->aag_buf_size = size; UNSUPPORTED("ldv2j51bh7c79f2rsjvhe820"); // /* aag_ch_buf has to be 2 characters longer than the size given because UNSUPPORTED("8mnlk977roejchmemdihfilf7"); // * we need to put in 2 end-of-buffer characters. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("31zfpac9sot6bus0zxh28dkzl"); // b->aag_ch_buf = (char *) aagalloc(b->aag_buf_size + 2 ); UNSUPPORTED("8ht37kqb7ryerqc8kd1kxxdkf"); // if ( ! b->aag_ch_buf ) UNSUPPORTED("2f1vsk88rl2oqimdpnpm8sbvq"); // aag_fatal_error( "out of dynamic memory in aag_create_buffer()" ); UNSUPPORTED("89nlcck0onq0z5nju1h6dihhw"); // b->aag_is_our_buffer = 1; UNSUPPORTED("3fyqvxxu8l41l1e6xbgis2d1u"); // aag_init_buffer(b,file ); UNSUPPORTED("1lucb0x0v3ldgueqifh95nl1u"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cvxw0l0ojnracqk5o3c07vf4m // void aag_delete_buffer (YY_BUFFER_STATE b ) public static Object aag_delete_buffer(Object... arg) { UNSUPPORTED("bpqurydddo1eg834j6t2mywht"); // void aag_delete_buffer (YY_BUFFER_STATE b ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6dbppvcge8q0qzkzswhskafq0"); // if ( ! b ) UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("94idskdictwqhs2ac1rj9d7r6"); // if ( b == ( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL) ) /* Not sure if we should pop here. */ UNSUPPORTED("4zc83wd4y6h4wy7o1wv0p4tp8"); // (aag_buffer_stack)[(aag_buffer_stack_top)] = (YY_BUFFER_STATE) 0; UNSUPPORTED("ak41c36nk6zr2evsd18682lgj"); // if ( b->aag_is_our_buffer ) UNSUPPORTED("3432oq780g8u0ny62vr5d09pe"); // aagfree((void *) b->aag_ch_buf ); UNSUPPORTED("6lktqk4nw3nqopq8oknapaczq"); // aagfree((void *) b ); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8z0ws8ykdt2m53k269y0s3uau // static void aag_init_buffer (YY_BUFFER_STATE b, FILE * file ) public static Object aag_init_buffer(Object... arg) { UNSUPPORTED("7j4p3tv8442q9xyfpqokcny92"); // static void aag_init_buffer (YY_BUFFER_STATE b, FILE * file ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("283psyjlfno8q88uy4cq6jwz9"); // int oerrno = errno; UNSUPPORTED("e2pfyytd28ykmms2nr0ew4cqn"); // aag_flush_buffer(b ); UNSUPPORTED("25q4tcfugzmy3edj76t2c5ih3"); // b->aag_input_file = file; UNSUPPORTED("ahv8zvzf22w9n5ep104x6va7"); // b->aag_fill_buffer = 1; UNSUPPORTED("2hy7ism50yh61htolfxci8esf"); // /* If b is the current buffer, then aag_init_buffer was _probably_ UNSUPPORTED("19txf0i7d5sz9risud1w8vrig"); // * called from aagrestart() or through aag_get_next_buffer. UNSUPPORTED("7lzjjm1jn1acrxrh1eyxcev5r"); // * In that case, we don't want to reset the lineno or column. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("4r35eb6ury607b1mzssz9on3l"); // if (b != ( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL)){ UNSUPPORTED("dzo34o77efru78xpifgs7z17e"); // b->aag_bs_lineno = 1; UNSUPPORTED("95t1fosxhhfjmawjuui0dixyv"); // b->aag_bs_column = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a2a0czceeuuuggzlak63rtqdm"); // b->aag_is_interactive = file ? (0 > 0) : 0; UNSUPPORTED("72x3uklh05naqgu261srbg39y"); // errno = oerrno; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 euu43g3i43888wantq0lgdqe8 // void aag_flush_buffer (YY_BUFFER_STATE b ) public static Object aag_flush_buffer(Object... arg) { UNSUPPORTED("5rlwsfuuevgt6j59owhk0vsyc"); // void aag_flush_buffer (YY_BUFFER_STATE b ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3dq1hii77jc6u73twyfvwl3a9"); // if ( ! b ) UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("6cbsupelvfb558shx2yb0yvcm"); // b->aag_n_chars = 0; UNSUPPORTED("3v8ttgsv16fumgfkgzlch3q2f"); // /* We always need two end-of-buffer characters. The first causes UNSUPPORTED("3yrb5f5ki8bec2r96pcs01d39"); // * a transition to the end-of-buffer state. The second causes UNSUPPORTED("67kt17e65snnq433p7xw2ooew"); // * a jam in that state. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("4w5064pru48ayz24yik2t9wma"); // b->aag_ch_buf[0] = 0; UNSUPPORTED("838e325iarhiw21926btrglcx"); // b->aag_ch_buf[1] = 0; UNSUPPORTED("8dzmx2vrua5b75y3ujfdhou5n"); // b->aag_buf_pos = &b->aag_ch_buf[0]; UNSUPPORTED("czoo07g9uc4a29dyf1qk4v765"); // b->aag_at_bol = 1; UNSUPPORTED("2hqsp77qbwwdprmfq4hf8u4uu"); // b->aag_buffer_status = 0; UNSUPPORTED("etbmfw4pqxcunac5so844cqju"); // if ( b == ( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL) ) UNSUPPORTED("5vdfn4vw8baq4bh6qaiza5ces"); // aag_load_buffer_state( ); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 19g3ujgwn6wfrv2pvydtxr75 // void aagpush_buffer_state (YY_BUFFER_STATE new_buffer ) public static Object aagpush_buffer_state(Object... arg) { UNSUPPORTED("7dnx37wzyytlwuntjzywbpjrz"); // void aagpush_buffer_state (YY_BUFFER_STATE new_buffer ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cyx0t99hvvlwtgheo3d1slkbf"); // if (new_buffer == NULL) UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("8qtcqfmnpmz9w58dyr1fap6hz"); // aagensure_buffer_stack(); UNSUPPORTED("aoawljluu5zfqg5fymr0tnk1b"); // /* This block is copied from aag_switch_to_buffer. */ UNSUPPORTED("aqaux0xumrbi1suoc6u75bn9h"); // if ( ( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL) ) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("hjirhak021dywcjxs66ukoqh"); // /* Flush out information for old buffer. */ UNSUPPORTED("cbtw5voc0x2dgb1nir3oodu4h"); // *(aag_c_buf_p) = (aag_hold_char); UNSUPPORTED("1lg74bgprfb93mb6yie4nebk2"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_buf_pos = (aag_c_buf_p); UNSUPPORTED("2uvf85bz227zpcsxn55l3cvsw"); // (aag_buffer_stack)[(aag_buffer_stack_top)]->aag_n_chars = (aag_n_chars); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("eilb2lnorspm9kmjezs2hxn6q"); // /* Only push if top exists. Otherwise, replace top. */ UNSUPPORTED("ecdndvrvbw37q3nfvqrhf4fie"); // if (( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL)) UNSUPPORTED("9qfx6cgnnxlimtsgx31ehy9b1"); // (aag_buffer_stack_top)++; UNSUPPORTED("8zeem234b4537a5t9ii8mjp5e"); // (aag_buffer_stack)[(aag_buffer_stack_top)] = new_buffer; UNSUPPORTED("ekjsdu753i856myudmzi333d1"); // /* copied from aag_switch_to_buffer. */ UNSUPPORTED("a4b2f8asd493ruq5ci95a6m81"); // aag_load_buffer_state( ); UNSUPPORTED("8hdw1gealimged5gkvfrv62pl"); // (aag_did_buffer_switch_on_eof) = 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 27b1vcsegbixqbqjzrwamdpcn // void aagpop_buffer_state (void) public static Object aagpop_buffer_state(Object... arg) { UNSUPPORTED("aho9q6pa29mrtlxb4s78qp3od"); // void aagpop_buffer_state (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("duicdoe269odnnlbpzbnz3h81"); // if (!( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL)) UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("5umm8ltd4b6a51xpblbqy8qks"); // aag_delete_buffer(( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL) ); UNSUPPORTED("chiisjorqoelih8jlfxzlaf2i"); // (aag_buffer_stack)[(aag_buffer_stack_top)] = NULL; UNSUPPORTED("8swzz3wyezeggvlkr1py1q29l"); // if ((aag_buffer_stack_top) > 0) UNSUPPORTED("61uxz7tnjcvsal7zy3z8slfps"); // --(aag_buffer_stack_top); UNSUPPORTED("cnx6esgchi9pvf0hgjtmjt435"); // if (( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL)) { UNSUPPORTED("5vdfn4vw8baq4bh6qaiza5ces"); // aag_load_buffer_state( ); UNSUPPORTED("9szgmfl0nm285xgd2r9vfx5xo"); // (aag_did_buffer_switch_on_eof) = 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1iyph8hj357vj714inph32tcl // static void aagensure_buffer_stack (void) public static Object aagensure_buffer_stack(Object... arg) { UNSUPPORTED("3sdjpuqouzn047v1nnvh67d1l"); // static void aagensure_buffer_stack (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a2hcrxfa6lo4empmzpuqcivi1"); // aag_size_t num_to_alloc; UNSUPPORTED("29cci2yfdmiw9anfb27tuqtz7"); // if (!(aag_buffer_stack)) { UNSUPPORTED("d1qyxv4ky4vyqiqajtnkwoqjk"); // /* First allocation is just for 2 elements, since we don't know if this UNSUPPORTED("1ejcjlgelylmli8wh7uj2fq2f"); // * scanner will even need a stack. We use 2 instead of 1 to avoid an UNSUPPORTED("4obpjr8hh2hqvqqjkrokd638y"); // * immediate realloc on the next call. UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ UNSUPPORTED("4ewxpgeg2iqq5hl0bwkybovkc"); // num_to_alloc = 1; UNSUPPORTED("9ju5ond0u4zrfz0v8p0j01l3y"); // (aag_buffer_stack) = (struct aag_buffer_state**)aagalloc UNSUPPORTED("8oezffgujlxcgxnb9h4o3lxjv"); // (num_to_alloc * sizeof(struct aag_buffer_state*) UNSUPPORTED("9tah2dk3dzghm88w1iv765ug1"); // ); UNSUPPORTED("10l1leyl9wq6ubkuu0h8trd75"); // if ( ! (aag_buffer_stack) ) UNSUPPORTED("eayag7q8kugt9vndqw2b8geiq"); // aag_fatal_error( "out of dynamic memory in aagensure_buffer_stack()" ); UNSUPPORTED("68gh3oqf36qrvfl7oyy3bvkv7"); // memset((aag_buffer_stack), 0, num_to_alloc * sizeof(struct aag_buffer_state*)); UNSUPPORTED("e8i8xuvufgmwrgzewq07k0lhh"); // (aag_buffer_stack_max) = num_to_alloc; UNSUPPORTED("8juns3p4niqfeqfuqfaux3np7"); // (aag_buffer_stack_top) = 0; UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2h8rn6lifnrrpjvtqrzspppaj"); // if ((aag_buffer_stack_top) >= ((aag_buffer_stack_max)) - 1){ UNSUPPORTED("16vxkn1s1f3fzkucpkffvkyqo"); // /* Increase the buffer to prepare for a possible push. */ UNSUPPORTED("b4ih8ipe8yvjlfyuadrh03d7f"); // int grow_size = 8 /* arbitrary grow size */; UNSUPPORTED("aa1un5vm8egsjsou4l4iegl3k"); // num_to_alloc = (aag_buffer_stack_max) + grow_size; UNSUPPORTED("3ucjxe5tj3edok5k5y3anw2p7"); // (aag_buffer_stack) = (struct aag_buffer_state**)aagrealloc UNSUPPORTED("2orrmpxhoj5k2nlwrh09qw04q"); // ((aag_buffer_stack), UNSUPPORTED("cvog4q9qv8mf3yugscs36y940"); // num_to_alloc * sizeof(struct aag_buffer_state*) UNSUPPORTED("9tah2dk3dzghm88w1iv765ug1"); // ); UNSUPPORTED("10l1leyl9wq6ubkuu0h8trd75"); // if ( ! (aag_buffer_stack) ) UNSUPPORTED("eayag7q8kugt9vndqw2b8geiq"); // aag_fatal_error( "out of dynamic memory in aagensure_buffer_stack()" ); UNSUPPORTED("4ak2m3t1ocbdxila5qx1volyf"); // /* zero only the new slots.*/ UNSUPPORTED("c9lnuv46scld9i8iqxdhatczy"); // memset((aag_buffer_stack) + (aag_buffer_stack_max), 0, grow_size * sizeof(struct aag_buffer_state*)); UNSUPPORTED("e8i8xuvufgmwrgzewq07k0lhh"); // (aag_buffer_stack_max) = num_to_alloc; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7yvjra4z1kimbp0xfvzml1ge1 // YY_BUFFER_STATE aag_scan_buffer (char * base, aag_size_t size ) public static Object aag_scan_buffer(Object... arg) { UNSUPPORTED("34agdjyirk3pcfm9jjwp8i13w"); // YY_BUFFER_STATE aag_scan_buffer (char * base, aag_size_t size ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("17fp4sigd3bnfjdj56aiskloz"); // YY_BUFFER_STATE b; UNSUPPORTED("evnj0omz1k4vp0xmr9r940ds6"); // if ( size < 2 || UNSUPPORTED("15qfhapzt12li01fk2db08sw0"); // base[size-2] != 0 || UNSUPPORTED("dn5vk4urvf83ftd9ls9br9h2v"); // base[size-1] != 0 ) UNSUPPORTED("76i2nlud0sudn1zbabaw51s52"); // /* They forgot to leave room for the EOB's. */ UNSUPPORTED("5izxoao5ryte71964f8yjfd5y"); // return 0; UNSUPPORTED("7mrf0i5kql5xndjgllkbconxd"); // b = (YY_BUFFER_STATE) aagalloc(sizeof( struct aag_buffer_state ) ); UNSUPPORTED("6dbppvcge8q0qzkzswhskafq0"); // if ( ! b ) UNSUPPORTED("9gd4cfygbf0kpa082mi8835a"); // aag_fatal_error( "out of dynamic memory in aag_scan_buffer()" ); UNSUPPORTED("4qmg246x23u74iwerx0zeh3us"); // b->aag_buf_size = size - 2; /* "- 2" to take care of EOB's */ UNSUPPORTED("1t390e7pfxygoif7wdie89mbt"); // b->aag_buf_pos = b->aag_ch_buf = base; UNSUPPORTED("92ame1l1vygta5t7yseme0tia"); // b->aag_is_our_buffer = 0; UNSUPPORTED("h4z4d3puygko4no5q08f4hbm"); // b->aag_input_file = 0; UNSUPPORTED("bv8nrei55lbwkqnotxx27pdpx"); // b->aag_n_chars = b->aag_buf_size; UNSUPPORTED("eqixc09ymq4dt5vet05b0kmzn"); // b->aag_is_interactive = 0; UNSUPPORTED("czoo07g9uc4a29dyf1qk4v765"); // b->aag_at_bol = 1; UNSUPPORTED("qf6o823cw74j6w2me3vz7fbd"); // b->aag_fill_buffer = 0; UNSUPPORTED("2hqsp77qbwwdprmfq4hf8u4uu"); // b->aag_buffer_status = 0; UNSUPPORTED("5hfi9p5415gw6c2x685w0q1bo"); // aag_switch_to_buffer(b ); UNSUPPORTED("1lucb0x0v3ldgueqifh95nl1u"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 43izorque2e7plck393cc6hsz // YY_BUFFER_STATE aag_scan_string ( char * aagstr ) public static Object aag_scan_string(Object... arg) { UNSUPPORTED("9bpq4eoai3kbg3afd97p0nyyj"); // YY_BUFFER_STATE aag_scan_string ( char * aagstr ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8sx87o9hndvp7qaq52vqiceh2"); // return aag_scan_bytes(aagstr,strlen(aagstr) ); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 74bdwb6md7bl3lpynnjoca8pm // YY_BUFFER_STATE aag_scan_bytes ( char * aagbytes, aag_size_t _aagbytes_len ) public static Object aag_scan_bytes(Object... arg) { UNSUPPORTED("22n9ywf6bno4e1ogc0rfnzt43"); // YY_BUFFER_STATE aag_scan_bytes ( char * aagbytes, aag_size_t _aagbytes_len ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("17fp4sigd3bnfjdj56aiskloz"); // YY_BUFFER_STATE b; UNSUPPORTED("alvm7g1yun5lnprwn379yva7g"); // char *buf; UNSUPPORTED("242h7r83bv7vrscfynwyu1p2d"); // aag_size_t n; UNSUPPORTED("bbuxsg26kpzb2fl660hjri9l8"); // int i; UNSUPPORTED("30v8r32hksc2dvfl6gbcks7xd"); // /* Get memory for full buffer, including space for trailing EOB's. */ UNSUPPORTED("b0eubmj9g20tq7qvpocaf0s6w"); // n = _aagbytes_len + 2; UNSUPPORTED("19lotil2m9zts56o7dzyu021m"); // buf = (char *) aagalloc(n ); UNSUPPORTED("15nhevd3f9fycwuhg9fkjkzew"); // if ( ! buf ) UNSUPPORTED("80ioy58udfahif5lhgwzdmmp5"); // aag_fatal_error( "out of dynamic memory in aag_scan_bytes()" ); UNSUPPORTED("5060qt15bitq5p5umkzkhjmh6"); // for ( i = 0; i < _aagbytes_len; ++i ) UNSUPPORTED("d2qdodjt00avfah797qbnvz90"); // buf[i] = aagbytes[i]; UNSUPPORTED("5taf7ek5t6s14vsooqe1sc5hr"); // buf[_aagbytes_len] = buf[_aagbytes_len+1] = 0; UNSUPPORTED("e5ykpyc09qgxxltuktf9u0bqk"); // b = aag_scan_buffer(buf,n ); UNSUPPORTED("6dbppvcge8q0qzkzswhskafq0"); // if ( ! b ) UNSUPPORTED("bi5lxu32oapwjy99as9jbkgrn"); // aag_fatal_error( "bad buffer in aag_scan_bytes()" ); UNSUPPORTED("b7eqyxz30wpigc4f2ut33z6gp"); // /* It's okay to grow etc. this buffer, and we should throw it UNSUPPORTED("6lvmstg7t0bn7rk9ihku6ovfb"); // * away when we're done. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("89nlcck0onq0z5nju1h6dihhw"); // b->aag_is_our_buffer = 1; UNSUPPORTED("1lucb0x0v3ldgueqifh95nl1u"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ar1fz1d00siup070hcy6exvpz // static void aag_fatal_error ( char* msg ) public static Object aag_fatal_error(Object... arg) { UNSUPPORTED("cv6qbndhb3hcgxfakqgoab5dx"); // static void aag_fatal_error ( char* msg ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4i3ty8mkp0kgkuxhdvanh87il"); // (void) fprintf( stderr, "%s\n", msg ); UNSUPPORTED("d969dknbq2w52sen88bpqqyia"); // exit( 2 ); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ak2o99rit6h1dzbfugt87rz4l // int aagget_lineno (void) public static Object aagget_lineno(Object... arg) { UNSUPPORTED("64s6gh6lrs0ga7y5j8aphzsa6"); // int aagget_lineno (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9zr5r3tszhbirce9zhk3n5ai0"); // return aaglineno; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c4xsc4x2etna327n4r43l0src // FILE *aagget_in (void) public static Object aagget_in(Object... arg) { UNSUPPORTED("4uts7eli4y8zgttbczqktzi41"); // FILE *aagget_in (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("deaehhzsl649vtwlwgu42i0zh"); // return aagin; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4werkxqgsv51e1huizt8jy900 // FILE *aagget_out (void) public static Object aagget_out(Object... arg) { UNSUPPORTED("2t24qlethc17kk7k367jup5g7"); // FILE *aagget_out (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("csjzuqxz2wypw8a9z0qffv20n"); // return aagout; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c930io2oqys6cwcw6hokf74af // aag_size_t aagget_leng (void) public static Object aagget_leng(Object... arg) { UNSUPPORTED("4vayu55eo4kfs8mo20fxch8dg"); // aag_size_t aagget_leng (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cv0dvs0mx1m7a9dtk81itn95s"); // return aagleng; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 elqro7uvtzkdgrd0axaati5dn // char *aagget_text (void) public static Object aagget_text(Object... arg) { UNSUPPORTED("u3fnt7o1fu5m0mf5jq7k196a"); // char *aagget_text (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4dv5045xmckixqhwcwxil44on"); // return aagtext; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ddyawmdmhp4bhddv0ycwtja18 // void aagset_lineno (int line_number ) public static Object aagset_lineno(Object... arg) { UNSUPPORTED("42mnbz5hirksqibxvq5ihajy5"); // void aagset_lineno (int line_number ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9s3oxto8c1qvwbmzdtdcnpqjy"); // aaglineno = line_number; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 rnmvgky3jm4cqnymq9s4bzig // void aagset_in (FILE * in_str ) public static Object aagset_in(Object... arg) { UNSUPPORTED("cixzcd1qs551hgk5cdud9swy1"); // void aagset_in (FILE * in_str ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("emvj6vmdj6xmhu581eaheijq7"); // aagin = in_str ; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bho3hef6ijshlmjirs3pp56ov // void aagset_out (FILE * out_str ) public static Object aagset_out(Object... arg) { UNSUPPORTED("cnivj2d0k3i5uxijj3x5cwwse"); // void aagset_out (FILE * out_str ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("401q11i1f4d60b46mam5pre9z"); // aagout = out_str ; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 43ss154kldgxk2nhdusc1m4rz // int aagget_debug (void) public static Object aagget_debug(Object... arg) { UNSUPPORTED("c9hk96h0qduz10qw4i5zsu12w"); // int aagget_debug (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("385w3hg608zj4jjuf8tg9i7an"); // return aag_flex_debug; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ccfhizqhlcd8o5g92d987s2m2 // void aagset_debug (int bdebug ) public static Object aagset_debug(Object... arg) { UNSUPPORTED("wx4hkxwknbvqstpbtb6zpxai"); // void aagset_debug (int bdebug ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("27afey5konvu5bxqp4wcqn2tu"); // aag_flex_debug = bdebug ; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5fcbavnjmbu31asyzd62fwq2d // static int aag_init_globals (void) public static Object aag_init_globals(Object... arg) { UNSUPPORTED("1cdheakmv5siut1ebpy3mw4nu"); // static int aag_init_globals (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1xj50i13vmjo77csr6vph8z8"); // /* Initialization is the same as for the non-reentrant scanner. UNSUPPORTED("4cx9tvq2hyum5hmwpun673um0"); // * This function is called from aaglex_destroy(), so don't allocate here. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("3x534nljp47scdxqi9fziljco"); // (aag_buffer_stack) = 0; UNSUPPORTED("17ou7g5dk08wv5ooyxz1v46ex"); // (aag_buffer_stack_top) = 0; UNSUPPORTED("a7agbnu1gspv8u452j128zaxe"); // (aag_buffer_stack_max) = 0; UNSUPPORTED("bn3ms6bxvilydm8vcmnp6ivm0"); // (aag_c_buf_p) = (char *) 0; UNSUPPORTED("ethyoawtkhblcvh3igz42ly3e"); // (aag_init) = 0; UNSUPPORTED("93c767mz9fmakdujebshet3o2"); // (aag_start) = 0; UNSUPPORTED("ap09jdvi6qhty3oy8384rf4qp"); // /* Defined in main.c */ UNSUPPORTED("7gieya1i3nuf9e7qf1cqfxol6"); // aagin = (FILE *) 0; UNSUPPORTED("9gstdkjqjhxee0r7jfjtrubra"); // aagout = (FILE *) 0; UNSUPPORTED("c28frl808v2sjzfzht2t71ttm"); // /* For future reference: Set errno on error, since we are called by UNSUPPORTED("94kvnvpdkv83e3y9mfu0qmy05"); // * aaglex_init() UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b88yq5tilv62doe0lqk0odlu8 // int aaglex_destroy (void) public static Object aaglex_destroy(Object... arg) { UNSUPPORTED("bzhkd6vhm4xizgdkxnz37txnh"); // int aaglex_destroy (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("diwcb2ihx1juuwosf3k0481mv"); // /* Pop the buffer stack, destroying each element. */ UNSUPPORTED("acw6kp40ss9wyuyw6lol5krx3"); // while(( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL)){ UNSUPPORTED("7w1cda4u82m87wa7sgr0kfm66"); // aag_delete_buffer(( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL) ); UNSUPPORTED("7rirfywzjobe7phulakj8z10v"); // (aag_buffer_stack)[(aag_buffer_stack_top)] = NULL; UNSUPPORTED("3vbgo0m5jfgfztdlczk1jwjhh"); // aagpop_buffer_state(); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8d0cqr6vek3pcj3q1jrp69ztu"); // /* Destroy the stack itself. */ UNSUPPORTED("6x89ih7uy7e52aqm8jik9xasb"); // aagfree((aag_buffer_stack) ); UNSUPPORTED("e8xu1gticwk30w7sx8o2d3b4q"); // (aag_buffer_stack) = NULL; UNSUPPORTED("fd67jflm4li5f28rl4da3pk9"); // /* Reset the globals. This is important in a non-reentrant scanner so the next time UNSUPPORTED("1sxmjk3yd72dpwsfc1p9l9l2q"); // * aaglex() is called, initialization will occur. */ UNSUPPORTED("2nkg94pzgw99t3ck0cpkdy863"); // aag_init_globals( ); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c8en52xb7jekcv34dmaqouq5x // void *aagalloc (aag_size_t size ) public static Object aagalloc(Object... arg) { UNSUPPORTED("8ojxikfh5gpuanc8ijbcbcr9g"); // void *aagalloc (aag_size_t size ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5mk7bdo0ve6cs9c230lail7a0"); // return (void *) malloc( size ); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5hlwjmuqfpjsqydhktwpbidq2 // void *aagrealloc (void * ptr, aag_size_t size ) public static Object aagrealloc(Object... arg) { UNSUPPORTED("cyz4ldrm5jj00yg11pg1vc1g1"); // void *aagrealloc (void * ptr, aag_size_t size ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eeh9042j0ixp46lnhsy7ltbwc"); // /* The cast to (char *) in the following accommodates both UNSUPPORTED("883fkonn9uuzw08gkor0kmjnd"); // * implementations that use char* generic pointers, and those UNSUPPORTED("625my5yaczozrs8ku83650a76"); // * that use void* generic pointers. It works with the latter UNSUPPORTED("9a6dm13b8ly2weeidoqgznp2n"); // * because both ANSI C and C++ allow castless assignment from UNSUPPORTED("64dthpqhwbo8jw99mmijor8ux"); // * any pointer type to void*, and deal with argument conversions UNSUPPORTED("esoja9b810qbkf294xt3x46ee"); // * as though doing an assignment. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("cqnxm4zyvx1dauh2o6z9730r8"); // return (void *) realloc( (char *) ptr, size ); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dt3z1styelhok5vdef4znud0x // void aagfree (void * ptr ) public static Object aagfree(Object... arg) { UNSUPPORTED("33a9his43erc77yrkij7w4xak"); // void aagfree (void * ptr ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cr6th4uf2lbww89txkvo11nd5"); // free( (char *) ptr ); /* see aagrealloc() for (char *) cast */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b7djg5vf8k7q1bmscjoxbdi7m // void aagerror(char *str) public static Object aagerror(Object... arg) { UNSUPPORTED("72z931gdsqdectne9thcxcwaj"); // void aagerror(char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7vppjgkszsish3wz8km4ji5dj"); // unsigned char xbuf[BUFSIZ]; UNSUPPORTED("cd0m7hmn0ny9nvoy0lokrb7kz"); // char buf[BUFSIZ]; UNSUPPORTED("hj3ykx7uaskz9wtccgck8sd6"); // agxbuf xb; UNSUPPORTED("b2caeimugashizzvpcmbplmp4"); // agxbinit(&xb, BUFSIZ, xbuf); UNSUPPORTED("ldl8hfy8qw7n0rdphytov4fn"); // if (InputFile) { UNSUPPORTED("2qs5xwre2g8sars69d8m08x08"); // agxbput (&xb, InputFile); UNSUPPORTED("132aiak11mkk6gmiwzo5l43pk"); // agxbput (&xb, ": "); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("38pmo3t0g10m68xnnf0j2fpnz"); // agxbput (&xb, str); UNSUPPORTED("atzckg28vuna91ob4jsdhoecg"); // sprintf(buf," in line %d near '", line_num); UNSUPPORTED("tg4fmt4hpkhycayadp2io5ol"); // agxbput (&xb, buf); UNSUPPORTED("ef5bvnzwzqhm8eqarlw1kn1su"); // agxbput (&xb, aagtext); UNSUPPORTED("6yh0js07kc5h380u3b3hdgptb"); // agxbput (&xb,"'\n"); UNSUPPORTED("4xsav8esfuiohyr7u0xketqw7"); // agerr(AGERR,(((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf))); UNSUPPORTED("52frst03mcbsuu6bmnqs962qm"); // agxbfree(&xb); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d7y223uahk83hp7is4nahwefj // void aglexeof() public static Object aglexeof(Object... arg) { UNSUPPORTED("9h2m1giehawxuk7dgr9dsfvl4"); // void aglexeof() { aagunput( '@', (aagtext) ); } throw new UnsupportedOperationException(); } //3 3ufv8can0vbou4fqbz8jayves // void aglexbad() public static Object aglexbad(Object... arg) { UNSUPPORTED("bf2kdrql8l9oten5fku6ysi2n"); // void aglexbad() { aag_flush_buffer(( (aag_buffer_stack) ? (aag_buffer_stack)[(aag_buffer_stack_top)] : NULL) ); } throw new UnsupportedOperationException(); } //3 8mvwigk3z82cg7dw50v9tpfaw // int aagwrap(void) public static Object aagwrap(Object... arg) { UNSUPPORTED("9prn9oo8emos6tvglwqc6ejj9"); // int aagwrap(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/subg__c.java000066400000000000000000000217531312650303100215040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static gen.lib.cgraph.graph__c.agopen1; import static gen.lib.cgraph.id__c.agmapnametoid; import static gen.lib.cgraph.id__c.agregister; import static gen.lib.cgraph.mem__c.agalloc; import static gen.lib.cgraph.utils__c.agdtdisc; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGID; import static smetana.core.Macro.AGRAPH; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import h.Agraph_s; import h.ST_Agdesc_s; import h._dt_s; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Z; import smetana.core.__ptr__; import smetana.core.__struct__; public class subg__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //3 11ezyrsjsotjz9b3cyvb4ie8p // static Agraph_t *agfindsubg_by_id(Agraph_t * g, unsigned long id) public static Agraph_s agfindsubg_by_id(Agraph_s g, int id) { ENTERING("11ezyrsjsotjz9b3cyvb4ie8p","agfindsubg_by_id"); try { final __struct__ template = JUtils.from(Agraph_s.class); agdtdisc(g, (_dt_s) g.getPtr("g_dict"), Z.z().Ag_subgraph_id_disc.amp()); AGID(template.amp(), id); return (Agraph_s) g.getPtr("g_dict").castTo(_dt_s.class).call("searchf", g.getPtr("g_dict"), template.amp(), 0000004); } finally { LEAVING("11ezyrsjsotjz9b3cyvb4ie8p","agfindsubg_by_id"); } } //3 44saycxbfbr9lou0itlyewkb4 // static Agraph_t *localsubg(Agraph_t * g, unsigned long id) public static Agraph_s localsubg(Agraph_s g, int id) { ENTERING("44saycxbfbr9lou0itlyewkb4","localsubg"); try { Agraph_s subg; subg = agfindsubg_by_id(g, id); if (subg!=null) return subg; subg = (Agraph_s) agalloc(g, sizeof(Agraph_s.class)); subg.setPtr("clos", g.getPtr("clos")); subg.setStruct("desc", g.getStruct("desc")); ((ST_Agdesc_s)subg.getStruct("desc")).maingraph = 0; subg.setPtr("parent", g); subg.setPtr("root", g.getPtr("root")); AGID(subg, id); return agopen1(subg); } finally { LEAVING("44saycxbfbr9lou0itlyewkb4","localsubg"); } } //3 6wqxmivgp34bobzqacmsj7lcv // Agraph_t *agidsubg(Agraph_t * g, unsigned long id, int cflag) public static Object agidsubg(Object... arg) { UNSUPPORTED("9vhen1flll6k35g72uuroky0z"); // Agraph_t *agidsubg(Agraph_t * g, unsigned long id, int cflag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c3tourf5k7groqyh71yjd5xec"); // Agraph_t *subg; UNSUPPORTED("elpselocwvpfk3o27nejqo6dl"); // subg = agfindsubg_by_id(g, id); UNSUPPORTED("cf9t4fxh9z5rmv58441ne0ysa"); // if ((subg == ((Agraph_t*)0)) && cflag && agallocid(g, AGRAPH, id)) UNSUPPORTED("ecrqdk8b7debftn6d8bbmh0s4"); // subg = localsubg(g, id); UNSUPPORTED("17jmp11l2jzc1v9qpaqkzkauj"); // return subg; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a24jd4r2sdyb4lb2hyababrda // Agraph_t *agsubg(Agraph_t * g, char *name, int cflag) public static Agraph_s agsubg(Agraph_s g, CString name, boolean cflag) { ENTERING("a24jd4r2sdyb4lb2hyababrda","agsubg"); try { int id[] = new int[]{0}; Agraph_s subg; if (name!=null && agmapnametoid(g, AGRAPH, name, id, false)!=0) { /* might already exist */ if ((subg = agfindsubg_by_id(g, id[0]))!=null) return subg; } if (cflag && agmapnametoid(g, AGRAPH, name, id, (N(false)))!=0) { /* reserve id */ subg = localsubg(g, id[0]); agregister(g, AGRAPH, subg); return subg; } return null; } finally { LEAVING("a24jd4r2sdyb4lb2hyababrda","agsubg"); } } //3 51eksrs0lhkgohunejlpwyc4k // Agraph_t *agfstsubg(Agraph_t * g) public static Agraph_s agfstsubg(Agraph_s g) { ENTERING("51eksrs0lhkgohunejlpwyc4k","agfstsubg"); try { __ptr__ tmp = (__ptr__)g.getPtr("g_dict").castTo(_dt_s.class).call("searchf", g.getPtr("g_dict"),null,0000200); if (tmp!=null) tmp = tmp.castTo(Agraph_s.class); return (Agraph_s) tmp; } finally { LEAVING("51eksrs0lhkgohunejlpwyc4k","agfstsubg"); } } //3 85c1qisrein0tzm2regoe61t // Agraph_t *agnxtsubg(Agraph_t * subg) public static Agraph_s agnxtsubg(Agraph_s subg) { ENTERING("85c1qisrein0tzm2regoe61t","agnxtsubg"); try { Agraph_s g; g = agparent(subg); return g!=null ? (Agraph_s) g.getPtr("g_dict").castTo(_dt_s.class).call("searchf", g.getPtr("g_dict"), subg, 0000010) : null; } finally { LEAVING("85c1qisrein0tzm2regoe61t","agnxtsubg"); } } //3 7kbp6j03hd7u6nnlivi0vt3ja // Agraph_t *agparent(Agraph_t * g) public static Agraph_s agparent(Agraph_s g) { ENTERING("7kbp6j03hd7u6nnlivi0vt3ja","agparent"); try { return (Agraph_s) g.getPtr("parent"); } finally { LEAVING("7kbp6j03hd7u6nnlivi0vt3ja","agparent"); } } //3 37trxrsv69a3pl08f5awwj3tq // long agdelsubg(Agraph_t * g, Agraph_t * subg) public static Object agdelsubg(Object... arg) { UNSUPPORTED("bjcimcpi0qag1hc37no67mct5"); // long agdelsubg(Agraph_t * g, Agraph_t * subg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dugmh24ptzgxuj3204p7n39m4"); // return (long) (*(((Dt_t*)(g->g_dict))->searchf))((g->g_dict),(void*)(subg),0000002); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/tester__c.java000066400000000000000000000105311312650303100220420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static smetana.core.Macro.UNSUPPORTED; public class tester__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //3 bxrg42k0b2ondd8e9hxlvgnya // main() public static Object main(Object... arg) { UNSUPPORTED("dvtfwizbjxjdd2zwzte0922xf"); // main() UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("av59ae8c4mws46sf5dumz1k0s"); // Agsym_t *sym; UNSUPPORTED("eocf25luzhwv5bxjexjp351gh"); // char *val; UNSUPPORTED("b1b89mh4epi9v1kfzij5iivjf"); // while (g = agread(stdin, ((Agdisc_t *)0))) { UNSUPPORTED("714pzi0d5ewfa33fhbvig3c1a"); // sym = agattr(g, AGRAPH, "nonsense", "junk"); UNSUPPORTED("5irwa2ja5che2vhws1r19cora"); // fprintf(stderr,"sym = %x, %s\n", sym, sym? sym->defval : "(none)"); UNSUPPORTED("b6ynbll4ohfq5rtria3hxrrc"); // agwrite(g, stdout); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/cgraph/utils__c.java000066400000000000000000000223041312650303100216750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static gen.lib.cdt.dtdisc__c.dtdisc; import static gen.lib.cdt.dtopen__c.dtopen; import static gen.lib.cgraph.mem__c.agalloc; import static gen.lib.cgraph.mem__c.agfree; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.function; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.Agraph_s; import h.Dtmemory_f; import h._dt_s; import h._dtdisc_s; import h._dtmethod_s; import smetana.core.Memory; import smetana.core.Z; import smetana.core.size_t; import smetana.core.amiga.StarStruct; public class utils__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //1 2xwmpggwpggfyyfj0vuw3pmfg // static Agraph_t *Ag_dictop_G //static public Agraph_s Ag_dictop_G; //3 7dkudp41c9byhicatk2sxtxqk // void *agdictobjmem(Dict_t * dict, void * p, size_t size, Dtdisc_t * disc) public static Object agdictobjmem(_dt_s dict, Object p, size_t size, _dtdisc_s disc) { ENTERING("7dkudp41c9byhicatk2sxtxqk","agdictobjmem"); try { Agraph_s g; g = Z.z().Ag_dictop_G; if (g!=null) { if (p!=null) agfree(g, p); else return agalloc(g, size); } else { if (p!=null) Memory.free(p); else return size.malloc(); } return null; } finally { LEAVING("7dkudp41c9byhicatk2sxtxqk","agdictobjmem"); } } //3 5xdfwxth4q1dm3180qzuf51sn // void agdictobjfree(Dict_t * dict, void * p, Dtdisc_t * disc) public static Object agdictobjfree(Object... arg) { UNSUPPORTED("bsemnw6m2qx5a4hk13xep80nh"); // void agdictobjfree(Dict_t * dict, void * p, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("nzl57bfl5onx7q9ge19n2k9i"); // (void) dict; UNSUPPORTED("8l8wg6vltx6d7vc9dzqb6n3wi"); // (void) disc; UNSUPPORTED("ah8bddgh4pyntvi4o9xx91fkm"); // g = Ag_dictop_G; UNSUPPORTED("5skdegxoz3mwfvm59pbtvqtiq"); // if (g) UNSUPPORTED("akbizhd9c9w4syt1qpirn7xjy"); // agfree(g, p); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("cy5x5dma0v4hiepir7lrfuo17"); // free(p); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 48ox0bg1qmasrer8np51uwsyk // Dict_t *agdtopen(Agraph_t * g, Dtdisc_t * disc, Dtmethod_t * method) public static _dt_s agdtopen(Agraph_s g, StarStruct disc, _dtmethod_s method) { ENTERING("48ox0bg1qmasrer8np51uwsyk","agdtopen"); try { Dtmemory_f memf; _dt_s d; memf = (Dtmemory_f) disc.getPtr("memoryf"); disc.setPtr("memoryf", function(utils__c.class, "agdictobjmem")); Z.z().Ag_dictop_G = g; d = dtopen(disc, method); disc.setPtr("memoryf", memf); Z.z().Ag_dictop_G = null; return d; } finally { LEAVING("48ox0bg1qmasrer8np51uwsyk","agdtopen"); } } //3 6pbz2fsmebq8iy7if4way3ct2 // long agdtdelete(Agraph_t * g, Dict_t * dict, void *obj) public static Object agdtdelete(Object... arg) { UNSUPPORTED("216ju3s3n4ltlcsntcuo0fg5p"); // long agdtdelete(Agraph_t * g, Dict_t * dict, void *obj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("id2cse8d1e37coxkbocjgjt4"); // Ag_dictop_G = g; UNSUPPORTED("1ii7n9w3quq15wnwynuuwg395"); // return (long) (*(((Dt_t*)(dict))->searchf))((dict),(void*)(obj),0000002); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8a6i39x23joa467bqbo4b25ng // int agobjfinalize(void * obj) public static Object agobjfinalize(Object... arg) { UNSUPPORTED("74745f6w9shsg8hps5dn9cunv"); // int agobjfinalize(void * obj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dnx10u35ynobkoiuo7v5k2u49"); // agfree(Ag_dictop_G, obj); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4x6nykawwls34vi6jc9gk1y29 // int agdtclose(Agraph_t * g, Dict_t * dict) public static Object agdtclose(Object... arg) { UNSUPPORTED("8snkovnbu003p9w5cgbn12c73"); // int agdtclose(Agraph_t * g, Dict_t * dict) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ac1z24z48td8pa6zl9az4bqpd"); // Dtmemory_f memf; UNSUPPORTED("cawsyfy3xa5ktlemxuyyhd376"); // Dtdisc_t *disc; UNSUPPORTED("95hw7dddoneu0z8zzcnb1uslv"); // disc = dtdisc(dict, ((Dtdisc_t *)0), 0); UNSUPPORTED("9grut2uf2ma1mtzeq2sfg7p3f"); // memf = disc->memoryf; UNSUPPORTED("1jsr5jo041ushyjrdwyazntu7"); // disc->memoryf = agdictobjmem; UNSUPPORTED("id2cse8d1e37coxkbocjgjt4"); // Ag_dictop_G = g; UNSUPPORTED("32zal75ij4wrh56hfv01bu7as"); // if (dtclose(dict)) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("9qqgn587jlvxto7mbtmfh3o00"); // disc->memoryf = memf; UNSUPPORTED("dgvsuq3309uz08ww03zstdg8g"); // Ag_dictop_G = ((Agraph_t*)0); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cym72wvu6zffc0vzoa93zha8 // void agdtdisc(Agraph_t * g, Dict_t * dict, Dtdisc_t * disc) public static void agdtdisc(Agraph_s g, _dt_s dict, _dtdisc_s disc) { ENTERING("cym72wvu6zffc0vzoa93zha8","agdtdisc"); try { if (disc!=null && NEQ(dtdisc(dict, null, 0), disc)) { dtdisc(dict, disc, 0); } /* else unchanged, disc is same as old disc */ } finally { LEAVING("cym72wvu6zffc0vzoa93zha8","agdtdisc"); } } } plantuml-1.2017.15/src/gen/lib/cgraph/write__c.java000066400000000000000000001457721312650303100217060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.cgraph; import static smetana.core.Macro.UNSUPPORTED; public class write__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6ayavpu39aihwyojkx093pcy3 // extern Agraph_t *Ag_G_global //1 871mxtg9l6ffpxdl9kniwusf7 // extern char *AgDataRecName //1 c0o2kmml0tn6hftuwo0u4shwd // extern Dtdisc_t Ag_subnode_id_disc //1 8k15pyu256unm2kpd9zf5pf7k // extern Dtdisc_t Ag_subnode_seq_disc //1 e3d820y06gpeusn6atgmj8bzd // extern Dtdisc_t Ag_mainedge_id_disc //1 cbr0772spix9h1aw7h5v7dv9j // extern Dtdisc_t Ag_subedge_id_disc //1 akd0c3v0j7m2npxcb9acit1fa // extern Dtdisc_t Ag_mainedge_seq_disc //1 12d8la07351ww7vwfzucjst8m // extern Dtdisc_t Ag_subedge_seq_disc //1 29eokk7v88e62g8o6lizmo967 // extern Dtdisc_t Ag_subgraph_id_disc //1 4xd9cbgy6hk5g6nhjcbpzkx14 // extern Agcbdisc_t AgAttrdisc //1 6cdl8rg0og4o8zcy4mkimizp1 // typedef void iochan_t //3 btji1owz81k2d77wfwt916p37 // static int ioput(Agraph_t * g, iochan_t * ofile, char *str) public static Object ioput(Object... arg) { UNSUPPORTED("9aaodmphwoa7or45852lcbtet"); // static int ioput(Agraph_t * g, iochan_t * ofile, char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f6biqyaknm3x2ue94tm9v84z"); // return ((g)->clos->disc.io)->putstr(ofile, str); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 98m6w41nluqnfg2vjsmgrp28l // static int Level //1 bvu8ayfef3c7pct1w3xg18vx3 // static int Max_outputline = 128 //1 1hd2b7p1aumg2dlcjxipts28a // static unsigned char Attrs_not_written_flag //1 bospb4vypikeakekqc06hvqc2 // static Agsym_t *Tailport, *Headport //3 alc947m7qhu6bnfokb9fxhwhb // static int indent(Agraph_t * g, iochan_t * ofile) public static Object indent(Object... arg) { UNSUPPORTED("40912tixu4uq4phusbevely94"); // static int indent(Agraph_t * g, iochan_t * ofile) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("452nzs4v8pata1dhjmqfyw26a"); // for (i = Level; i > 0; i--) UNSUPPORTED("cp0y2nic2hoy2snz5nbe40sue"); // {if ((ioput(g, ofile, "\t")) == EOF) return EOF;}; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aquh9vkpmogoajxkl7kq8pukp // static int strcasecmp(const char *s1, const char *s2) public static Object strcasecmp(Object... arg) { UNSUPPORTED("55i7mwlbxqd1zslhu44ix4gza"); // static int strcasecmp(const char *s1, const char *s2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9470qtwtv37oof0w731kh9mcd"); // while ((*s1 != '\0') UNSUPPORTED("7tdf84gz2hakxs756j3v0w4iv"); // && (tolower(*(unsigned char *) s1) == UNSUPPORTED("co97u0db3a8mz1pp77hkxq0h3"); // tolower(*(unsigned char *) s2))) { UNSUPPORTED("2hh1h5gydepd3ut3g43bzn51g"); // s1++; UNSUPPORTED("7x8zh0pm8zj83pbc2d812jz90"); // s2++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1jrt0skm3a5djo3vfej4kwffc"); // return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2ojpbtgz2c08fy2xlrhgbhcy4 // static char *_agstrcanon(char *arg, char *buf) public static Object _agstrcanon(Object... arg) { UNSUPPORTED("5ahyn8mq6pzmkxszxeuiey91e"); // static char *_agstrcanon(char *arg, char *buf) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9uldk42hjnckjndgz1sd6utof"); // char *s, *p; UNSUPPORTED("54eg86g95y7q6jevr2tq6ehrg"); // unsigned char uc; UNSUPPORTED("3n6j4vooz01bauxf0x735587g"); // int cnt = 0, dotcnt = 0; UNSUPPORTED("53cl57zz7angk2fz9q8i9936z"); // int needs_quotes = (0); UNSUPPORTED("2wr9q842ohxj2ycucqna9tlrq"); // int maybe_num; UNSUPPORTED("byb61zbgjorc2zybgctqz7ndl"); // int backslash_pending = (0); UNSUPPORTED("7nrc43frlcod90tqudlokiltw"); // static const char *tokenlist[] /* must agree with scan.l */ UNSUPPORTED("2z6417vrkzwojo65uicgj0ld5"); // = { "node", "edge", "strict", "graph", "digraph", "subgraph", UNSUPPORTED("6e42116ruyo5sfksdjqb7k691"); // ((char *)0) UNSUPPORTED("9u8qqu9tw95qjbv3cxv3hj4bd"); // }; UNSUPPORTED("c20r5olc3ceq2odrmolb37lhs"); // const char **tok; UNSUPPORTED("6hksaocbqg9tyniwys30i5f6"); // if (((arg == 0) || (arg)[0] == '\0')) UNSUPPORTED("bq8taui3sha21pp8m30j2waho"); // return "\"\""; UNSUPPORTED("br1i8hfkomohyoahqijch1ldi"); // s = arg; UNSUPPORTED("dpfzdhkfq6u86uv5f9lnqfbpq"); // p = buf; UNSUPPORTED("1xpnr5tufh6i8r19kq97wxx28"); // *p++ = '\"'; UNSUPPORTED("8rbzvwd6z91kkb5pape5tgg3q"); // uc = *(unsigned char *) s++; UNSUPPORTED("eoo27x446n9ubl76pznj5nu00"); // maybe_num = isdigit(uc) || (uc == '.') || (uc == '-'); UNSUPPORTED("281h1z55fo8i52vhjqmzge30m"); // while (uc) { UNSUPPORTED("7va7b0kw6l67cbr9jsef9o8jm"); // if (uc == '\"') { UNSUPPORTED("ety3lnffj2pnokl02nxfy3qjv"); // *p++ = '\\'; UNSUPPORTED("4xlo42dy0r02v5tuaxfr8oo7a"); // needs_quotes = (!(0)); UNSUPPORTED("8nzcpbtoi924xzu8ze3z6dbft"); // } UNSUPPORTED("boo8lxly4fx140xmtb994j62j"); // else if (maybe_num) { UNSUPPORTED("byw5stodlmd743wbq8w0lp6e5"); // if (uc == '-') { UNSUPPORTED("ch6epb3d0o3y71kr8cf0cr778"); // if (cnt) { UNSUPPORTED("92uh7detqycxvk4j84os7jjrx"); // maybe_num = (0); UNSUPPORTED("1zi6cnn21vajv2p9guz4u0eyr"); // needs_quotes = (!(0)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("80niwic42cqbazv2vfmpokfiz"); // else if (uc == '.') { UNSUPPORTED("7wa32rmgq2t0s8q2vygfs0on9"); // if (dotcnt++) { UNSUPPORTED("92uh7detqycxvk4j84os7jjrx"); // maybe_num = (0); UNSUPPORTED("1zi6cnn21vajv2p9guz4u0eyr"); // needs_quotes = (!(0)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("2w4vdk52vdon2nuo203y11zio"); // else if (!isdigit(uc)) { UNSUPPORTED("8ewnu9yn4sp7izb230lq2qwol"); // maybe_num = (0); UNSUPPORTED("15rsfjpgyg6utb04u8l4x3f4c"); // needs_quotes = (!(0)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("52w60ewi6p3skhhun8zvy7g7t"); // else if (!((isalnum(uc)) || ((uc) == '_') || (!isascii(uc)))) UNSUPPORTED("4xlo42dy0r02v5tuaxfr8oo7a"); // needs_quotes = (!(0)); UNSUPPORTED("8vqehnf3u9tp0a4iixzlqns4k"); // *p++ = (char) uc; UNSUPPORTED("5k76wlk3o6m3cuykuhkxtyhgf"); // uc = *(unsigned char *) s++; UNSUPPORTED("1szm63athnlkprt3pv29pjc6z"); // cnt++; UNSUPPORTED("7ludbekw5fkwt5axvcwd0ihll"); // /* If breaking long strings into multiple lines, only allow breaks after a non-id char, not a backslash, where the next char is an UNSUPPORTED("1w1e1pcok5v4q2kgyz2wuk53m"); // * id char. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("eq5hwet5rfzygnaktrq6o4j3d"); // if (Max_outputline) { UNSUPPORTED("755u0yc4wr61hznjhzfrfko48"); // if (uc && backslash_pending && !((isalnum(p[-1]) || ((p[-1]) == '.') || ((p[-1]) == '-') || !isascii(p[-1])) || (p[-1] == '\\')) && (isalnum(uc) || ((uc) == '.') || ((uc) == '-') || !isascii(uc))) { UNSUPPORTED("cl1ikibcqt1ygqbum3xi5bk79"); // *p++ = '\\'; UNSUPPORTED("cnwc77tzwdfyrgdp1t6g4m6xi"); // *p++ = '\n'; UNSUPPORTED("3ako06kvsu28ggk2b9rs5pz48"); // needs_quotes = (!(0)); UNSUPPORTED("a2igyeujb49rhtvgheg64bogt"); // backslash_pending = (0); UNSUPPORTED("ay9m9sdx7o92emcp6gjb31h4a"); // cnt = 0; UNSUPPORTED("88eck934lobkga6adny14gqe2"); // } else if (uc && (cnt >= Max_outputline)) { UNSUPPORTED("3v26gypvwqprroryvbtfyvl7u"); // if (!((isalnum(p[-1]) || ((p[-1]) == '.') || ((p[-1]) == '-') || !isascii(p[-1])) || (p[-1] == '\\')) && (isalnum(uc) || ((uc) == '.') || ((uc) == '-') || !isascii(uc))) { UNSUPPORTED("2a68wg6lba8oqhlul1evol2fj"); // *p++ = '\\'; UNSUPPORTED("eyabtn4npcdoiho34u0vupwki"); // *p++ = '\n'; UNSUPPORTED("clp3otxrl7w6cem7ww35rbw9f"); // needs_quotes = (!(0)); UNSUPPORTED("4k7ukmo931f6gpk5q245qc7dz"); // cnt = 0; UNSUPPORTED("ajrvpjgla5ygjcpzcymd6016y"); // } else { UNSUPPORTED("5mo9vqlb40kc1is2oibapcqj3"); // backslash_pending = (!(0)); UNSUPPORTED("4nbucwlhcfvw7r0uycyy9qc5l"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1xpnr5tufh6i8r19kq97wxx28"); // *p++ = '\"'; UNSUPPORTED("2t1d66kwn86kqh0i665hqw6cl"); // *p = '\0'; UNSUPPORTED("6bzvicgwyrevlzo30bikj1qv"); // if (needs_quotes || ((cnt == 1) && ((*arg == '.') || (*arg == '-')))) UNSUPPORTED("60rrsbs3bgak2rhurj1kw71av"); // return buf; UNSUPPORTED("70snqwmjpiy8fb85i8p82n7j8"); // /* Use quotes to protect tokens (example, a node named "node") */ UNSUPPORTED("2d7m0n84k3kvilcrfc581k3m6"); // /* It would be great if it were easier to use flex here. */ UNSUPPORTED("5yik6wlbtybgi55kf4vxe7bx"); // for (tok = tokenlist; *tok; tok++) UNSUPPORTED("7896yl4xbftaovjgrkv4xtxot"); // if (!strcasecmp(*tok, arg)) UNSUPPORTED("1fjzdj317ee1mtxirudje5tbt"); // return buf; UNSUPPORTED("2ima76y69crfh98d13kjftpwm"); // return arg; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 10ev68p7aeqzm8tqvi1j5g6c0 // static char *agcanonhtmlstr(char *arg, char *buf) public static Object agcanonhtmlstr(Object... arg) { UNSUPPORTED("8u1d8u9bl7jguved1qmtwv38g"); // static char *agcanonhtmlstr(char *arg, char *buf) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9uldk42hjnckjndgz1sd6utof"); // char *s, *p; UNSUPPORTED("br1i8hfkomohyoahqijch1ldi"); // s = arg; UNSUPPORTED("dpfzdhkfq6u86uv5f9lnqfbpq"); // p = buf; UNSUPPORTED("es744ndlvsi3inn0ehkueww59"); // *p++ = '<'; UNSUPPORTED("5rofh7oao8cih2ztkjkacpzpm"); // while (*s) UNSUPPORTED("8e6st6hhl4yfs7qub4b87bkm0"); // *p++ = *s++; UNSUPPORTED("5bbyh5dbvs12qykhja5su1xyb"); // *p++ = '>'; UNSUPPORTED("2t1d66kwn86kqh0i665hqw6cl"); // *p = '\0'; UNSUPPORTED("5jfpogdyby101eyuw2dhtb5cg"); // return buf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5el4k6xor36xwe2zw5pbxwvxg // char *agstrcanon(char *arg, char *buf) public static Object agstrcanon(Object... arg) { UNSUPPORTED("2eugjkuvwod6onqy9kfs2rzsm"); // char *agstrcanon(char *arg, char *buf) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2weabf7fj63ctkhrx0t8zthrb"); // if (aghtmlstr(arg)) UNSUPPORTED("9iyrui5feoircaa0tm6yvyegj"); // return agcanonhtmlstr(arg, buf); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("4td6knrzidkire6uqf2ev1u8w"); // return _agstrcanon(arg, buf); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9ykg6r8cft6m1eqz84ptrhkkm // static char *getoutputbuffer(char *str) public static Object getoutputbuffer(Object... arg) { UNSUPPORTED("561sswbojerghf2xu4dg5bt1s"); // static char *getoutputbuffer(char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("zfr61ahp8m2301a6i0zw5oys"); // static char *rv; UNSUPPORTED("24n1fkl62ovew6wndvdgst75s"); // static int len; UNSUPPORTED("azsy6o1769l9s9lw7qvcr8zld"); // int req; UNSUPPORTED("bcaz0e6faadnkk9q7r31ox2uv"); // req = ((2 * strlen(str) + 2)>(BUFSIZ)?(2 * strlen(str) + 2):(BUFSIZ)); UNSUPPORTED("9u4b3k1a4ejkmpk16dd3q6h49"); // if (req > len) { UNSUPPORTED("3530976sh2i9fg23975vrw161"); // if (rv) UNSUPPORTED("523zs48zoju9q6xlk50eptn16"); // rv = realloc(rv, req); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("7kox9x8pkq2f0khjm3jy4bbwp"); // rv = malloc(req); UNSUPPORTED("7vego0iiluodex426985pztf0"); // len = req; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ewe36i40rrl3fpv7w0ryw05ni // char *agcanonStr(char *str) public static Object agcanonStr(Object... arg) { UNSUPPORTED("eyq4o9s8y123aetgpoe3yv8vb"); // char *agcanonStr(char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f4vpef7vd5wmhxtl2q4x9j290"); // return agstrcanon(str, getoutputbuffer(str)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dkk9fge4n0ji352t2bmtqxgcq // char *agcanon(char *str, int html) public static Object agcanon(Object... arg) { UNSUPPORTED("6rhv4om26ccgv3sf274hlssrb"); // char *agcanon(char *str, int html) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cd1a0xw1om8gnmntf662c4ta"); // char* buf = getoutputbuffer(str); UNSUPPORTED("13sqoi4hswov0j5sorbvjalue"); // if (html) UNSUPPORTED("71wx9wy7wm7l1ofewrs36twa4"); // return agcanonhtmlstr(str, buf); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("2gdx5yodu3th7xbdmdm7k5hw0"); // return _agstrcanon(str, buf); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c3jnf1oiv9b8aheuv9llnqtg // static int _write_canonstr(Agraph_t * g, iochan_t * ofile, char *str, int chk) public static Object _write_canonstr(Object... arg) { UNSUPPORTED("zr1y2wf05ldfglo6vrypd4d7"); // static int _write_canonstr(Agraph_t * g, iochan_t * ofile, char *str, UNSUPPORTED("6jsqaz0aadg586twc1a3xkgp4"); // int chk) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2f8bmob0vz6yu5pd99cq577kg"); // if (chk) UNSUPPORTED("byq8fiy8jzdslxiaf8z70lrfu"); // str = agcanonStr(str); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("eqcm90rf7s86jz2vlvlu3wo94"); // str = _agstrcanon(str, getoutputbuffer(str)); UNSUPPORTED("3a92mnynygrlxzyr67es6ff7w"); // return ioput(g, ofile, str); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wklmg8c4xwrlh8zj8mzsqqgy // static int write_canonstr(Agraph_t * g, iochan_t * ofile, char *str) public static Object write_canonstr(Object... arg) { UNSUPPORTED("9s58htjsqxlqmo523tjez4v1v"); // static int write_canonstr(Agraph_t * g, iochan_t * ofile, char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ao6n16fxplk35wuikk9lm5zsx"); // return _write_canonstr(g, ofile, str, (!(0))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 y99h25djxm7t672axpq6s9so // static int write_dict(Agraph_t * g, iochan_t * ofile, char *name, Dict_t * dict, int top) public static Object write_dict(Object... arg) { UNSUPPORTED("2hsbtmft7fp9pqzt27syqpe99"); // static int write_dict(Agraph_t * g, iochan_t * ofile, char *name, UNSUPPORTED("cbjl3cpko6q4cka2s9mb8kbhs"); // Dict_t * dict, int top) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("behjm5bjsenezpg3f7cncvteu"); // int cnt = 0; UNSUPPORTED("51l8b50tqomi0gritl94e51v7"); // Dict_t *view; UNSUPPORTED("d173c80zt5jm4yd6ok8338o1x"); // Agsym_t *sym, *psym; UNSUPPORTED("9x367lbtuypg6bts6evclmc2w"); // if (!top) UNSUPPORTED("e1i7a6hfs0ejqoyb25zzrfqta"); // view = dtview(dict, ((Dict_t *)0)); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("5te3ph3q5wvma3d2s5lw15mte"); // view = 0; UNSUPPORTED("2sbfwpbl8pxucyovu38d8v0rd"); // for (sym = (Agsym_t *) (*(((Dt_t*)(dict))->searchf))((dict),(void*)(0),0000200); sym; UNSUPPORTED("4h5k9o906c9hqrjv889octnef"); // sym = (Agsym_t *) (*(((Dt_t*)(dict))->searchf))((dict),(void*)(sym),0000010)) { UNSUPPORTED("avha7r5me5k7qy01jm6ejjvn6"); // if (((sym->defval == 0) || (sym->defval)[0] == '\0') && !sym->print) { /* try to skip empty str (default) */ UNSUPPORTED("cgjccnmi11urn78eb1tpbqbay"); // if (view == ((Dict_t *)0)) UNSUPPORTED("bcbhr2jloy4m2wcwkwqv35wki"); // continue; /* no parent */ UNSUPPORTED("w57oejn8kxfcqhajcavmo1dq"); // psym = (Agsym_t *) (*(((Dt_t*)(view))->searchf))((view),(void*)(sym),0000004); UNSUPPORTED("9h1gyp9h3qbn1qj5fva3bn3xf"); // ; UNSUPPORTED("40fpwl1wqislxo0xgi8qgkqb9"); // if (((psym->defval == 0) || (psym->defval)[0] == '\0') && psym->print) UNSUPPORTED("3soi5dlurq6giqt0kic48ak6j"); // continue; /* also empty in parent */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5drtib7guih41r51l0f4akjwx"); // if (cnt++ == 0) { UNSUPPORTED("7qym8pnati72j923z80ihv0tx"); // {if ((indent(g, ofile)) == EOF) return EOF;}; UNSUPPORTED("91e6m2zyz414vtug4jlpigewp"); // {if ((ioput(g, ofile, name)) == EOF) return EOF;}; UNSUPPORTED("2sydxv2pzbrpeo9em23ycry8f"); // {if ((ioput(g, ofile, " [")) == EOF) return EOF;}; UNSUPPORTED("3ye74etl8i6jh415zncm5xbim"); // Level++; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("82k1j53lomse95wqgrzvbetri"); // {if ((ioput(g, ofile, ",\n")) == EOF) return EOF;}; UNSUPPORTED("7qym8pnati72j923z80ihv0tx"); // {if ((indent(g, ofile)) == EOF) return EOF;}; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("82qplhcz1dry5ubqktjt15d6r"); // {if ((write_canonstr(g, ofile, sym->name)) == EOF) return EOF;}; UNSUPPORTED("6ex6hk4ixb3yj1adbanpmz0dj"); // {if ((ioput(g, ofile, "=")) == EOF) return EOF;}; UNSUPPORTED("ap40fv2u1o0jybevdc42ino23"); // {if ((write_canonstr(g, ofile, sym->defval)) == EOF) return EOF;}; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3edmnqy3ok6qglbgwxmakkngx"); // if (cnt > 0) { UNSUPPORTED("17ejasz912kqtejldaozqxa0y"); // Level--; UNSUPPORTED("dcosmode4wc3bkdk46pmafk3k"); // if (cnt > 1) { UNSUPPORTED("tsypfw2ouyjuo1o6idz4hyur"); // {if ((ioput(g, ofile, "\n")) == EOF) return EOF;}; UNSUPPORTED("7qym8pnati72j923z80ihv0tx"); // {if ((indent(g, ofile)) == EOF) return EOF;}; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2p7hprd3pg5l28a3i4dl93swy"); // {if ((ioput(g, ofile, "];\n")) == EOF) return EOF;}; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9x367lbtuypg6bts6evclmc2w"); // if (!top) UNSUPPORTED("33ixxp63qe4r2prla9az18o5"); // dtview(dict, view); /* restore previous view */ UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aul5zu4oj0o9yrzdmyk88qt2s // static int write_dicts(Agraph_t * g, iochan_t * ofile, int top) public static Object write_dicts(Object... arg) { UNSUPPORTED("9za417mkt9iven86uu3v8o7tr"); // static int write_dicts(Agraph_t * g, iochan_t * ofile, int top) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("as84an41e1m52e76l3k6541ik"); // Agdatadict_t *def; UNSUPPORTED("4mlv0t6g3bl1stjs6qxrdoxc4"); // if ((def = agdatadict(g, (0)))) { UNSUPPORTED("16qe57vlv8koos7hnsvji0tcb"); // {if ((write_dict(g, ofile, "graph", def->dict.g, top)) == EOF) return EOF;}; UNSUPPORTED("ddwzxi0rpkb52u0w6d1r77skm"); // {if ((write_dict(g, ofile, "node", def->dict.n, top)) == EOF) return EOF;}; UNSUPPORTED("1fi4yw89hspw1v0on1017ioyg"); // {if ((write_dict(g, ofile, "edge", def->dict.e, top)) == EOF) return EOF;}; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cg729l895pi0qnmlxnjytf8pd // static int write_hdr(Agraph_t * g, iochan_t * ofile, int top) public static Object write_hdr(Object... arg) { UNSUPPORTED("bv82284a2i51n13utave7gi65"); // static int write_hdr(Agraph_t * g, iochan_t * ofile, int top) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5tmjn44cq2g0o6a4eim9n4r41"); // char *name, *sep, *kind, *strict; UNSUPPORTED("2o2xukvz5nqsn8ucmx0ibzi7u"); // int root = 0; UNSUPPORTED("defp72d837w5grmr10ijl40sc"); // Attrs_not_written_flag = AGATTRWF(g); UNSUPPORTED("8rxqqli6dshrniwafycl2x50i"); // strict = ""; UNSUPPORTED("1dsqqvt6epu2867o19gd1w7e1"); // if (NOT(top) && agparent(g)) UNSUPPORTED("8rffe0xay7r01yrp1zqkh1l0p"); // kind = "sub"; UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("6digseocbrizgs0l1xdyetpd1"); // root = 1; UNSUPPORTED("3l4f565mguh1h41c30y87hhcu"); // if (g->desc.directed) UNSUPPORTED("e88vmmq10gtrhyxfiisp4c5n6"); // kind = "di"; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("477n1bidkrk4b8hcikwd601ww"); // kind = ""; UNSUPPORTED("k23gu3jbsh35eolp8cxy1von"); // if (agisstrict(g)) UNSUPPORTED("coedgh6jpr1nsmmodeufhccd5"); // strict = "strict "; UNSUPPORTED("120w7pql0m6xxhshb1hu9xr83"); // Tailport = agattr(g, AGEDGE, "tailport", ((char *)0)); UNSUPPORTED("31kmh5iv8cqwsc5169jcje4m5"); // Headport = agattr(g, AGEDGE, "headport", ((char *)0)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b1au7bgi7piu07obja3u404tt"); // name = agnameof(g); UNSUPPORTED("y39797izv2dtp714gzmbjmt2"); // sep = " "; UNSUPPORTED("deq0wlkdzgn0dsup6s8crdptk"); // if (!name || name[0] == '%') UNSUPPORTED("bngxzmad7ha2neojmucdgq2f"); // sep = name = ""; UNSUPPORTED("2upjlgu52bgdstwlj5g27peod"); // {if ((indent(g, ofile)) == EOF) return EOF;}; UNSUPPORTED("5x4jedwac3kvbjptwajbktmx9"); // {if ((ioput(g, ofile, strict)) == EOF) return EOF;}; UNSUPPORTED("7gibcx01sloiz2efkhytt8gx4"); // /* output "graph" only for root graphs or graphs with names */ UNSUPPORTED("6qy1c4safapm1tb5wyodbw52d"); // if (*name || root) { UNSUPPORTED("2g43v7zyxobg6xrwdex1ad5fw"); // {if ((ioput(g, ofile, kind)) == EOF) return EOF;}; UNSUPPORTED("48tfev7pi5eibapsnaibi6q4"); // {if ((ioput(g, ofile, "graph ")) == EOF) return EOF;}; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c6idt0yj6nq2ckloubbnilhq6"); // if (name[0]) UNSUPPORTED("3kefg3n38sd1r4iu21fkfdpf5"); // {if ((write_canonstr(g, ofile, name)) == EOF) return EOF;}; UNSUPPORTED("67g1mzlw40lif93mafscbv4vi"); // {if ((ioput(g, ofile, sep)) == EOF) return EOF;}; UNSUPPORTED("e0s5onmgtm3tlfd56y1rf4m6i"); // {if ((ioput(g, ofile, "{\n")) == EOF) return EOF;}; UNSUPPORTED("9brxtep7biyoqds0hj0atawrp"); // Level++; UNSUPPORTED("bd93m59b1ncaay038o5563pwq"); // {if ((write_dicts(g, ofile, top)) == EOF) return EOF;}; UNSUPPORTED("utp8mj7yh7s1sb68xrde8b8"); // AGATTRWF(g) = (!(0)); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3ledn06tna47mr73hhkiydl5l // static int write_trl(Agraph_t * g, iochan_t * ofile) public static Object write_trl(Object... arg) { UNSUPPORTED("b4cjvzzfv0u8yh5ym5v2dmx2e"); // static int write_trl(Agraph_t * g, iochan_t * ofile) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2q3myz3ctrvxg2tezy4xtlm09"); // (void) g; UNSUPPORTED("b3oxdten2n4i8m918fdxsp1hh"); // Level--; UNSUPPORTED("2upjlgu52bgdstwlj5g27peod"); // {if ((indent(g, ofile)) == EOF) return EOF;}; UNSUPPORTED("836o18jp9on1g7j6kfal2t1wd"); // {if ((ioput(g, ofile, "}\n")) == EOF) return EOF;}; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eyh488kxcrbg6le1efk7a3xpu // static int irrelevant_subgraph(Agraph_t * g) public static Object irrelevant_subgraph(Object... arg) { UNSUPPORTED("4oyi2kt79cxmi0rtl1m5q6g6h"); // static int irrelevant_subgraph(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("fv6rlb2tzb6zbyr7t72uclhx"); // int i, n; UNSUPPORTED("cx0vt87bfp7pjiaw2jb68u1v7"); // Agattr_t *sdata, *pdata, *rdata; UNSUPPORTED("eq0gq1d7pmvj94j5nxbexze8p"); // Agdatadict_t *dd; UNSUPPORTED("8i0d7frxcvvmzhidle0zin9i0"); // char *name; UNSUPPORTED("b1au7bgi7piu07obja3u404tt"); // name = agnameof(g); UNSUPPORTED("c6ldem2asmpu0kxd9k0v9b52m"); // if (name && name[0] != '%') UNSUPPORTED("e6i1m837bi402fjvy87uxgyf"); // return (0); UNSUPPORTED("1p7l4il64r01z920qe41c1z6l"); // if ((sdata = agattrrec(g)) && (pdata = agattrrec(agparent(g)))) { UNSUPPORTED("4qk4wnxqgrsapkliulr94azku"); // rdata = agattrrec(agroot(g)); UNSUPPORTED("dxmershxq961ha7vc4m5cr62k"); // n = dtsize(rdata->dict); UNSUPPORTED("2865bsxs4j68vooz1yohtvgy"); // for (i = 0; i < n; i++) UNSUPPORTED("29ws3fuj2ixpal7w4giqlkeoc"); // if (sdata->str[i] && pdata->str[i] UNSUPPORTED("cek78fcyqh122xyfndqd7s7cc"); // && strcmp(sdata->str[i], pdata->str[i])) UNSUPPORTED("dpizbhlbpjwomse6dgvnrhaih"); // return (0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3rxguujcd6li5w0c4w1p79et1"); // dd = agdatadict(g, (0)); UNSUPPORTED("3tczoyxz5wlg8a4g3uhvrmm5o"); // if (!dd) UNSUPPORTED("3adr32h5e1fehu4g7j2u24asz"); // return (!(0)); UNSUPPORTED("22w1xj2fgexar3yp1jw8lz583"); // if ((dtsize(dd->dict.n) > 0) || (dtsize(dd->dict.e) > 0)) UNSUPPORTED("e6i1m837bi402fjvy87uxgyf"); // return (0); UNSUPPORTED("4si0cf97a5sfd9ozuunds9goz"); // return (!(0)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ck85o9cm7ekqx3c2l0adsac5s // int node_in_subg(Agraph_t * g, Agnode_t * n) public static Object node_in_subg(Object... arg) { UNSUPPORTED("lttsft2kddk4usoa58k8snym"); // int node_in_subg(Agraph_t * g, Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c3tourf5k7groqyh71yjd5xec"); // Agraph_t *subg; UNSUPPORTED("92vjk6rjnnnji7bcczz51lwfx"); // for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) { UNSUPPORTED("7y0e3lnda08y951e0taazdpb3"); // if (irrelevant_subgraph(subg)) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("b64f4gc73opgpeltlgyojoq15"); // if (agsubnode(subg, n, (0))) UNSUPPORTED("euj7k5raviuazd8jahwobe0r3"); // return (!(0)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("297p5iu8oro94tdg9v29bbgiw"); // return (0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ksojc2a5losovfniqlzgt1vt // static int has_no_edges(Agraph_t * g, Agnode_t * n) public static Object has_no_edges(Object... arg) { UNSUPPORTED("64vkuv5tpo1b1viokvi658vrb"); // static int has_no_edges(Agraph_t * g, Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("awbxq19f7u7jetepurmyrq5mv"); // return ((agfstin(g, n) == ((Agedge_t *)0)) UNSUPPORTED("enl87hoolfbxysnsww72soosi"); // && (agfstout(g, n) == ((Agedge_t *)0))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2iad3x6pf4ovvofoylnqwe2wc // static int has_no_predecessor_below(Agraph_t * g, Agnode_t * n, unsigned long val) public static Object has_no_predecessor_below(Object... arg) { UNSUPPORTED("7lbmpmt9voddi7i14szyn3qmm"); // static int has_no_predecessor_below(Agraph_t * g, Agnode_t * n, UNSUPPORTED("1fr81p8hxc1nvf0lvodnf29px"); // unsigned long val) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("38wcnqjivdjylzj9ulbjvi1e1"); // if (AGSEQ(n) < val) UNSUPPORTED("e6i1m837bi402fjvy87uxgyf"); // return (0); UNSUPPORTED("ac765q9popbptusjymwzret5y"); // for (e = agfstin(g, n); e; e = agnxtin(g, e)) UNSUPPORTED("dzqw274wu2nx03reilr9l7j5y"); // if (AGSEQ(e->node) < val) UNSUPPORTED("8tnlb2txucdutal7665h0v68g"); // return (0); UNSUPPORTED("4si0cf97a5sfd9ozuunds9goz"); // return (!(0)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 tn031eypwz2gs5143bxpsnuu // static int not_default_attrs(Agraph_t * g, Agnode_t * n) public static Object not_default_attrs(Object... arg) { UNSUPPORTED("emqc8yarfq0dgf06cnadhmpy7"); // static int not_default_attrs(Agraph_t * g, Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bbzey600kwgvkyquhmgo33kda"); // Agattr_t *data; UNSUPPORTED("av59ae8c4mws46sf5dumz1k0s"); // Agsym_t *sym; UNSUPPORTED("2q3myz3ctrvxg2tezy4xtlm09"); // (void) g; UNSUPPORTED("9j51hcoecext2qm6zhr7sj0oz"); // if ((data = agattrrec(n))) { UNSUPPORTED("coc462aobf6quvrhpcpnjpdrn"); // for (sym = (Agsym_t *) (*(((Dt_t*)(data->dict))->searchf))((data->dict),(void*)(0),0000200); sym; UNSUPPORTED("amu8ypy9stk8vb4g601x25kpb"); // sym = (Agsym_t *) (*(((Dt_t*)(data->dict))->searchf))((data->dict),(void*)(sym),0000010)) { UNSUPPORTED("8wug16wgeteq8od3sraaujwnx"); // if (data->str[sym->id] != sym->defval) UNSUPPORTED("a1a1uhff21noh1htwzn6yp831"); // return (!(0)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("297p5iu8oro94tdg9v29bbgiw"); // return (0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3hudq21u19r8v940lhosa07zk // static int write_subgs(Agraph_t * g, iochan_t * ofile) public static Object write_subgs(Object... arg) { UNSUPPORTED("81exc454cwr51dk4iq3g3so7e"); // static int write_subgs(Agraph_t * g, iochan_t * ofile) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c3tourf5k7groqyh71yjd5xec"); // Agraph_t *subg; UNSUPPORTED("92vjk6rjnnnji7bcczz51lwfx"); // for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) { UNSUPPORTED("b5hukzaylqhk3l4u8ewu9m7bz"); // if (irrelevant_subgraph(subg)) { UNSUPPORTED("br6dtjggd74cdyd97thtidtrh"); // write_subgs(subg, ofile); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("1ckh4rmjqkc7rc1701bz33i77"); // {if ((write_hdr(subg, ofile, (0))) == EOF) return EOF;}; UNSUPPORTED("35agz39gubwvzxnxqoyttjyov"); // {if ((write_body(subg, ofile)) == EOF) return EOF;}; UNSUPPORTED("6eshqt45zq6jp769b50pfyvlg"); // {if ((write_trl(subg, ofile)) == EOF) return EOF;}; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 61m4d49ffhloytgknml3f3wr9 // static int write_edge_name(Agedge_t * e, iochan_t * ofile, int terminate) public static Object write_edge_name(Object... arg) { UNSUPPORTED("7653rldgp23j0jh9w5u24afy9"); // static int write_edge_name(Agedge_t * e, iochan_t * ofile, int terminate) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ecz4e03zumggc8tfymqvirexq"); // int rv; UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("egwh1ccpd1lrz94020eszo4mm"); // p = agnameof(e); UNSUPPORTED("dmucqaij4o1u2fxfg43y5j4ow"); // g = agraphof(e); UNSUPPORTED("bq8birldnzbfylw4cnes3ptj5"); // if (NOT(((p == 0) || (p)[0] == '\0'))) { UNSUPPORTED("5kbp8i958xdwwdrsh3bodyol6"); // {if ((ioput(g, ofile, " [key=")) == EOF) return EOF;}; UNSUPPORTED("awv07dimzjjfdzdt11o3pq77k"); // {if ((write_canonstr(g, ofile, p)) == EOF) return EOF;}; UNSUPPORTED("d1a8tpm0uunsuvxjpppo8iww6"); // if (terminate) UNSUPPORTED("cjtrrjw2cx48bap924touvqbx"); // {if ((ioput(g, ofile, "]")) == EOF) return EOF;}; UNSUPPORTED("e1ueu04zlv0zdyfii20b8r0rk"); // rv = (!(0)); UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("f5bn92wqqc6u64vmryax7oqh4"); // rv = (0); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 29knq7812qkc7yve3ynqs319m // static int write_nondefault_attrs(void *obj, iochan_t * ofile, Dict_t * defdict) public static Object write_nondefault_attrs(Object... arg) { UNSUPPORTED("2eq8u2i8o96r7kj3kvvpk8pp8"); // static int write_nondefault_attrs(void *obj, iochan_t * ofile, UNSUPPORTED("f427jfb8dxus2g2a3h2u8o5xu"); // Dict_t * defdict) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bbzey600kwgvkyquhmgo33kda"); // Agattr_t *data; UNSUPPORTED("av59ae8c4mws46sf5dumz1k0s"); // Agsym_t *sym; UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("behjm5bjsenezpg3f7cncvteu"); // int cnt = 0; UNSUPPORTED("ecz4e03zumggc8tfymqvirexq"); // int rv; UNSUPPORTED("eg7ostyrb6k3w76d6frhjsxao"); // if ((AGTYPE(obj) == AGINEDGE) || (AGTYPE(obj) == AGOUTEDGE)) { UNSUPPORTED("b55iou6m33m4dht1xfevf1l4a"); // {if ((rv = write_edge_name(obj, ofile, (0))) == EOF) return EOF;}; UNSUPPORTED("3530976sh2i9fg23975vrw161"); // if (rv) UNSUPPORTED("7hl03wjg5yryhvbe4ar0i0b8g"); // cnt++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2jm7yr9s1ma9qprxon3kn34hs"); // data = agattrrec(obj); UNSUPPORTED("8pfuk9ua4x9bh68zk1kzwc5t9"); // g = agraphof(obj); UNSUPPORTED("ck70ilm5r0hsin65zhsuhqvr8"); // if (data) UNSUPPORTED("2xgrljvi8tbcibpvd93e3y4wu"); // for (sym = (Agsym_t *) (*(((Dt_t*)(defdict))->searchf))((defdict),(void*)(0),0000200); sym; UNSUPPORTED("5iyprqxhu5o7vb2hvqsg29102"); // sym = (Agsym_t *) (*(((Dt_t*)(defdict))->searchf))((defdict),(void*)(sym),0000010)) { UNSUPPORTED("1277c7kjmziau8c0dpsgenzrx"); // if ((AGTYPE(obj) == AGINEDGE) || (AGTYPE(obj) == AGOUTEDGE)) { UNSUPPORTED("1sexsl72k6x8a89gyzml82202"); // if (Tailport && (sym->id == Tailport->id)) UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue; UNSUPPORTED("e5ubbne6czhxg5l70lp73v2qy"); // if (Headport && (sym->id == Headport->id)) UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("an1qa2d9iqrp3xzh32hq5m7wo"); // if (data->str[sym->id] != sym->defval) { UNSUPPORTED("4xhq9pg814p2c5b2fffoiv6h9"); // if (cnt++ == 0) { UNSUPPORTED("34h2pyawnomoq99i31tmiadll"); // {if ((indent(g, ofile)) == EOF) return EOF;}; UNSUPPORTED("edwv0jnia03ljoa7nei9zz0de"); // {if ((ioput(g, ofile, " [")) == EOF) return EOF;}; UNSUPPORTED("cyr36a84f56xloi9axapn4x0l"); // Level++; UNSUPPORTED("a47jqpic91ky93e1ohxv590l5"); // } else { UNSUPPORTED("dm4dxqtiqxuaqodlpd06p0iu2"); // {if ((ioput(g, ofile, ",\n")) == EOF) return EOF;}; UNSUPPORTED("34h2pyawnomoq99i31tmiadll"); // {if ((indent(g, ofile)) == EOF) return EOF;}; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("ewb7dhzx8h311btm514wxqh5d"); // {if ((write_canonstr(g, ofile, sym->name)) == EOF) return EOF;}; UNSUPPORTED("e5geka21ka5gvgmjo8gyb2vul"); // {if ((ioput(g, ofile, "=")) == EOF) return EOF;}; UNSUPPORTED("66a4xw8npqjv8xk4jka0g2xsm"); // {if ((write_canonstr(g, ofile, data->str[sym->id])) == EOF) return EOF;}; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3edmnqy3ok6qglbgwxmakkngx"); // if (cnt > 0) { UNSUPPORTED("35d94qq9wy75h3y8r2eov436"); // {if ((ioput(g, ofile, "]")) == EOF) return EOF;}; UNSUPPORTED("17ejasz912kqtejldaozqxa0y"); // Level--; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("au1zt5ka3uvb2gtbnxfc6dp8m"); // AGATTRWF((Agobj_t *) obj) = (!(0)); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cxw4svv83nd76h7g9n4wtvyhe // static int write_nodename(Agnode_t * n, iochan_t * ofile) public static Object write_nodename(Object... arg) { UNSUPPORTED("cpgq7yh759xl1zrvqft4831wz"); // static int write_nodename(Agnode_t * n, iochan_t * ofile) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2p565zvorxx52bxl6qo7p76e"); // char *name, buf[20]; UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("a4xof3tnbquhro6rrhmnuqoli"); // name = agnameof(n); UNSUPPORTED("38tgkes5dhr4oloxpg73baq10"); // g = agraphof(n); UNSUPPORTED("30nxp5k7c6mdth5ymcpz1oxob"); // if (name) { UNSUPPORTED("3kefg3n38sd1r4iu21fkfdpf5"); // {if ((write_canonstr(g, ofile, name)) == EOF) return EOF;}; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("ezpeldusu1c6rg1a2nm7scden"); // sprintf(buf, "_%ld_SUSPECT", AGID(n)); /* could be deadly wrong */ UNSUPPORTED("bryntb9dnhodyku7ylgr1cie9"); // {if ((ioput(g, ofile, buf)) == EOF) return EOF;}; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 evmg0r67fn4l8l3ivojk7rt0g // static int attrs_written(void *obj) public static Object attrs_written(Object... arg) { UNSUPPORTED("7psl0ji9q989ywpylalpurvqy"); // static int attrs_written(void *obj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ae64q3xp4s7ek7gaqaekhyrbv"); // return (AGATTRWF((Agobj_t *) obj)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2m70lxskcmbyg6wdxe5r6ai1e // static int write_node(Agnode_t * n, iochan_t * ofile, Dict_t * d) public static Object write_node(Object... arg) { UNSUPPORTED("cqa550o688iknrhl43di42f58"); // static int write_node(Agnode_t * n, iochan_t * ofile, Dict_t * d) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("38tgkes5dhr4oloxpg73baq10"); // g = agraphof(n); UNSUPPORTED("2upjlgu52bgdstwlj5g27peod"); // {if ((indent(g, ofile)) == EOF) return EOF;}; UNSUPPORTED("ad6u6q90muje77m4c2w3g4vnp"); // {if ((write_nodename(n, ofile)) == EOF) return EOF;}; UNSUPPORTED("188f2l06cxx44bobai7uck0n3"); // if (NOT(attrs_written(n))) UNSUPPORTED("604ofy6n5gra880spsr7pttzu"); // {if ((write_nondefault_attrs(n, ofile, d)) == EOF) return EOF;}; UNSUPPORTED("36fggxzk0yp5o9iu0wl66dbg4"); // return ioput(g, ofile, ";\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 f14lr3pcw3fr38egphpz5nnu4 // static int write_node_test(Agraph_t * g, Agnode_t * n, unsigned long pred_id) public static Object write_node_test(Object... arg) { UNSUPPORTED("5dzvb8cmg948ujvvba4qgoohs"); // static int write_node_test(Agraph_t * g, Agnode_t * n, UNSUPPORTED("5wtydk3j3fgnkmg8zhzz67wtx"); // unsigned long pred_id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4iai1f8jf6nldihij6j7geznt"); // if (NOT(node_in_subg(g, n)) && has_no_predecessor_below(g, n, pred_id)) { UNSUPPORTED("6r86ld6632dwt68hrrxl7r69n"); // if (has_no_edges(g, n) || not_default_attrs(g, n)) UNSUPPORTED("euj7k5raviuazd8jahwobe0r3"); // return (!(0)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("297p5iu8oro94tdg9v29bbgiw"); // return (0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5zf7u1r6hz67tt7a3231b6prh // static int write_port(Agedge_t * e, iochan_t * ofile, Agsym_t * port) public static Object write_port(Object... arg) { UNSUPPORTED("4xje10w5oamectfsdzliliyqw"); // static int write_port(Agedge_t * e, iochan_t * ofile, Agsym_t * port) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eocf25luzhwv5bxjexjp351gh"); // char *val; UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("8rqevc1hrm1ne2lnxwvj4fv4c"); // if (!port) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("dmucqaij4o1u2fxfg43y5j4ow"); // g = agraphof(e); UNSUPPORTED("831dn8v157veiodzq2v8241lf"); // val = agxget(e, port); UNSUPPORTED("4suzircl51e85yp915bz7v4qu"); // if (val[0] == '\0') UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("1p5n9iv2fv2lzf7o45j51tgxp"); // {if ((ioput(g, ofile, ":")) == EOF) return EOF;}; UNSUPPORTED("3iqdx5w9ghlst037y7bcvz6wf"); // if (aghtmlstr(val)) { UNSUPPORTED("56u7ilzcb1yhhwozqmp6hleat"); // {if ((write_canonstr(g, ofile, val)) == EOF) return EOF;}; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("252d0vgl5lh8pgtnfcmeu89tc"); // char *s = strchr(val, ':'); UNSUPPORTED("dmtz739k0mm5ehrx59272alpr"); // if (s) { UNSUPPORTED("ezrforbrab3hidaupv18faqcb"); // *s = '\0'; UNSUPPORTED("akn31o7bkj0ssrdx07xi5mm43"); // {if ((_write_canonstr(g, ofile, val, (0))) == EOF) return EOF;}; UNSUPPORTED("81xvkbzakdflnij10q44u5uoe"); // {if ((ioput(g, ofile, ":")) == EOF) return EOF;}; UNSUPPORTED("4fp9nlo79i4xv1dnsitfjarsm"); // {if ((_write_canonstr(g, ofile, s + 1, (0))) == EOF) return EOF;}; UNSUPPORTED("94ybugc52d4387gg45p7y33hs"); // *s = ':'; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("akn31o7bkj0ssrdx07xi5mm43"); // {if ((_write_canonstr(g, ofile, val, (0))) == EOF) return EOF;}; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4ldk2wgnwzswqi3af43tel24y // static int write_edge_test(Agraph_t * g, Agedge_t * e) public static Object write_edge_test(Object... arg) { UNSUPPORTED("9yp7jgxf5ed1bvk0sw51xbkbo"); // static int write_edge_test(Agraph_t * g, Agedge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c3tourf5k7groqyh71yjd5xec"); // Agraph_t *subg; UNSUPPORTED("9qltiz4q6ds2g8b7awgcytymv"); // /* can use agedge() because we subverted the dict compar_f */ UNSUPPORTED("92vjk6rjnnnji7bcczz51lwfx"); // for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) { UNSUPPORTED("7y0e3lnda08y951e0taazdpb3"); // if (irrelevant_subgraph(subg)) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("eg7qrpri7skg2hr3nvvadkdyd"); // if (agsubedge(subg, e, (0))) UNSUPPORTED("8tnlb2txucdutal7665h0v68g"); // return (0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4si0cf97a5sfd9ozuunds9goz"); // return (!(0)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 achkvduksnhmlem44ia61tdpm // static int write_edge(Agedge_t * e, iochan_t * ofile, Dict_t * d) public static Object write_edge(Object... arg) { UNSUPPORTED("35w5n554uravyh0k7gmn73zup"); // static int write_edge(Agedge_t * e, iochan_t * ofile, Dict_t * d) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4ybt6tm56tubmbuve8lp6rxhh"); // Agnode_t *t, *h; UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("5webprz21nzifr3m5zwnqxx6m"); // t = AGTAIL(e); UNSUPPORTED("ax8363bkxphvbre4n21ewb568"); // h = AGHEAD(e); UNSUPPORTED("8qt01zznk6z8nu3spriyiry81"); // g = agraphof(t); UNSUPPORTED("2upjlgu52bgdstwlj5g27peod"); // {if ((indent(g, ofile)) == EOF) return EOF;}; UNSUPPORTED("2gxk9z53sl9dr4ozmgyl6vn6j"); // {if ((write_nodename(t, ofile)) == EOF) return EOF;}; UNSUPPORTED("71dxqgydbyqut1trdx63djy04"); // {if ((write_port(e, ofile, Tailport)) == EOF) return EOF;}; UNSUPPORTED("edsdju74g486xwykrjecfdz9t"); // {if ((ioput(g, ofile,(agisdirected(agraphof(t)) ? " -> " : " -- "))) == EOF) return EOF;}; UNSUPPORTED("cg68mtym2rtcpt6dl9cgou9ty"); // {if ((write_nodename(h, ofile)) == EOF) return EOF;}; UNSUPPORTED("9yj27gqf0jtykmnnuyntescvp"); // {if ((write_port(e, ofile, Headport)) == EOF) return EOF;}; UNSUPPORTED("1v1o17ud9bvt5cbsexej1x6lb"); // if (NOT(attrs_written(e))) { UNSUPPORTED("ddestrlasmplu0lkczahiwnio"); // {if ((write_nondefault_attrs(e, ofile, d)) == EOF) return EOF;}; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("197ftan7rtv20qonq7s9jvp8n"); // {if ((write_edge_name(e, ofile, (!(0)))) == EOF) return EOF;}; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("36fggxzk0yp5o9iu0wl66dbg4"); // return ioput(g, ofile, ";\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 uu07lrf43gcxm3lfka71pyvs // static int write_body(Agraph_t * g, iochan_t * ofile) public static Object write_body(Object... arg) { UNSUPPORTED("24udwe07nmfa7mly8u6t458cy"); // static int write_body(Agraph_t * g, iochan_t * ofile) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6vso73lw5lxv6m32fli4evzoo"); // Agnode_t *n, *prev; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("eq0gq1d7pmvj94j5nxbexze8p"); // Agdatadict_t *dd; UNSUPPORTED("ecc7weo8sqce4hc8zhangqyxh"); // /* int has_attr; */ UNSUPPORTED("1qkoefgefzcbae9lcfldryhcu"); // /* has_attr = (agattrrec(g) != NIL(Agattr_t*)); */ UNSUPPORTED("epct28o6e8jijggk3kdf7at2d"); // {if ((write_subgs(g, ofile)) == EOF) return EOF;}; UNSUPPORTED("avn5z8qt3zn87v0tr4t43aptm"); // dd = agdatadict(agroot(g), (0)); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("5o93nkpvajmx0eouvhi1py3a3"); // if (write_node_test(g, n, AGSEQ(n))) UNSUPPORTED("bnzzfj5rb2fb7l96rnoscoyzt"); // {if ((write_node(n, ofile, dd ? dd->dict.n : 0)) == EOF) return EOF;}; UNSUPPORTED("9z3wosnod2eza62eqd598gf15"); // prev = n; UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("4rv2a1j1w99ox9vwkb58qcndm"); // if ((prev != aghead(e)) UNSUPPORTED("6pm10qlp4eognb60xcbf4a2tx"); // && write_node_test(g, aghead(e), AGSEQ(n))) { UNSUPPORTED("as20nn69z1udd99ioxq1m2410"); // {if ((write_node(aghead(e), ofile, dd ? dd->dict.n : 0)) == EOF) return EOF;}; UNSUPPORTED("4hmon4o3z87811qet9gh6wspf"); // prev = aghead(e); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("a9y45p58h8680rmry84kep0k7"); // if (write_edge_test(g, e)) UNSUPPORTED("6yl3in89h59zpkbs0vjdo9g5e"); // {if ((write_edge(e, ofile, dd ? dd->dict.e : 0)) == EOF) return EOF;}; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6qzik6sn6t699oya0mtmc09kj // static void set_attrwf(Agraph_t * g, int toplevel, int value) public static Object set_attrwf(Object... arg) { UNSUPPORTED("8qq9xih8ju452kzwi2vfuflx1"); // static void set_attrwf(Agraph_t * g, int toplevel, int value) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c3tourf5k7groqyh71yjd5xec"); // Agraph_t *subg; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("24t3hnv9bwzu54ytirjoo9ll0"); // AGATTRWF(g) = value; UNSUPPORTED("92vjk6rjnnnji7bcczz51lwfx"); // for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) { UNSUPPORTED("37kcx814prucmw0dgtx90gys3"); // set_attrwf(subg, (0), value); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5r7vuplpj8az4hdy8stn9opja"); // if (toplevel) { UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("8wb9syhcd6ckmrfo4kkh1dg6o"); // AGATTRWF(n) = value; UNSUPPORTED("8wpryg13apwpccvklympyeyqu"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) UNSUPPORTED("cb595c0e5qk8td22sve3vdd9y"); // AGATTRWF(e) = value; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9bptgx2xn1o2lmf9b3bmbjcx8 // int agwrite(Agraph_t * g, void *ofile) public static Object agwrite(Object... arg) { UNSUPPORTED("354j237921gksw95lxhfou3c9"); // int agwrite(Agraph_t * g, void *ofile) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("yiuh599p05f2mpu2e3pesu2o"); // char* s; UNSUPPORTED("dwe86466ugstemepdfk8yzphz"); // int len; UNSUPPORTED("w1wwvddvl612b2n4mm48vyzg"); // Level = 0; /* re-initialize tab level */ UNSUPPORTED("c1kw4u0tftoc897fbywyem5cx"); // if ((s = agget(g, "linelength")) && isdigit(*s)) { UNSUPPORTED("3osc4y4ixfivmttpwtzh5gqse"); // len = (int)strtol(s, (char **)NULL, 10); UNSUPPORTED("4rqc2dbtsiwkva90qvgd404ve"); // if ((len == 0) || (len >= 60)) UNSUPPORTED("72a6c8cf7tnb2ookwzttqa88n"); // Max_outputline = len; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4sbvvs8w0qt626w12i77zjorp"); // set_attrwf(g, (!(0)), (0)); UNSUPPORTED("auyox07z514kd3x5fgcna10dd"); // {if ((write_hdr(g, ofile, (!(0)))) == EOF) return EOF;}; UNSUPPORTED("75p7mwy716aorog189xdsukra"); // {if ((write_body(g, ofile)) == EOF) return EOF;}; UNSUPPORTED("dfeqp09vdcut9uyrm908or81q"); // {if ((write_trl(g, ofile)) == EOF) return EOF;}; UNSUPPORTED("b4rn0yi1ogpc3e78wrtt5jj15"); // Max_outputline = 128; UNSUPPORTED("cbe60vdps5mrbfuocxpwxzu78"); // return ((g)->clos->disc.io)->flush(ofile); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/circogen/000077500000000000000000000000001312650303100175555ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/lib/circogen/block__c.java000066400000000000000000000612571312650303100221660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.circogen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class block__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9rei645fnqv344obz0uoyex48 // void initBlocklist(blocklist_t * bl) public static Object initBlocklist(Object... arg) { UNSUPPORTED("b9lm66dbqkkvj11gjv6ixtzes"); // void initBlocklist(blocklist_t * bl) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2gv0rd5g51qywarjewujgg0wg"); // bl->first = NULL; UNSUPPORTED("84wobegtjib75n6tzvjh44yz9"); // bl->last = NULL; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 19tlf8geba4mmtvfraapj2ihq // block_t *mkBlock(Agraph_t * g) public static Object mkBlock(Object... arg) { UNSUPPORTED("8aht5e0uzry2hgrx8j3t91t3h"); // block_t *mkBlock(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ep27cw0fr6yzvjsr2jjkjlec8"); // block_t *sn; UNSUPPORTED("7qyv71ou47lailu4hr5ivx7pn"); // sn = (block_t*)zmalloc(sizeof(block_t)); UNSUPPORTED("a78jj8s3uefgn1qrwuo3dk1zg"); // initBlocklist(&sn->children); UNSUPPORTED("72hz711fvb7wvjonk9a8za7wr"); // sn->sub_graph = g; UNSUPPORTED("axh3xbpigakp8kvk0zxytmhrh"); // return sn; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4cy6ndql7d5hrpt7o1mzu72g7 // void freeBlock(block_t * sp) public static Object freeBlock(Object... arg) { UNSUPPORTED("by27j04uml21wxjfx84pwdxft"); // void freeBlock(block_t * sp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bw55qe8krzotin01mfy1csyex"); // if (!sp) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("bgl6boip2qg0jeqpb0xul7zq5"); // freeNodelist(sp->circle_list); UNSUPPORTED("714y8kgak1wm462uo9bbws9cm"); // free(sp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2ojqv7jnuux6c4p8esq8xxgc7 // int blockSize(block_t * sp) public static Object blockSize(Object... arg) { UNSUPPORTED("9zpg2zz1n9vha7oq1jtt6zg1b"); // int blockSize(block_t * sp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4ovedot78vu5tzh694k36bu2s"); // return agnnodes (sp->sub_graph); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c76mkedayihrzuhirkmh8frs0 // void appendBlock(blocklist_t * bl, block_t * bp) public static Object appendBlock(Object... arg) { UNSUPPORTED("3kzcmknh3043exfd3rg9qnauu"); // void appendBlock(blocklist_t * bl, block_t * bp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bo0d60j50f7vu1x1mgrblwzhi"); // bp->next = NULL; UNSUPPORTED("3xp3wpcmexyum8m1gq428okg1"); // if (bl->last) { UNSUPPORTED("b4rchxhfigzjnd0zk6fj6fds0"); // bl->last->next = bp; UNSUPPORTED("3pxhbtenmm4l9t5c1rzo8xlq2"); // bl->last = bp; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("8q5ii2me9kwiu5wq2zivlj783"); // bl->first = bp; UNSUPPORTED("3pxhbtenmm4l9t5c1rzo8xlq2"); // bl->last = bp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4s05y1elv7zc7nryp7pos16tc // void insertBlock(blocklist_t * bl, block_t * bp) public static Object insertBlock(Object... arg) { UNSUPPORTED("2nghwj079h9g08aglo2lda8nw"); // void insertBlock(blocklist_t * bl, block_t * bp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5yixtdzq6t0fq3duxif5nnf6k"); // if (bl->first) { UNSUPPORTED("9qazclvxrbi2ldc49nj6mxplk"); // bp->next = bl->first; UNSUPPORTED("8q5ii2me9kwiu5wq2zivlj783"); // bl->first = bp; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("8q5ii2me9kwiu5wq2zivlj783"); // bl->first = bp; UNSUPPORTED("3pxhbtenmm4l9t5c1rzo8xlq2"); // bl->last = bp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/circogen/blockpath__c.java000066400000000000000000001741361312650303100230440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.circogen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class blockpath__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 e0c6o8stnbe78j48z75ksdz7r // typedef Dt_t edgelist //1 39duc9sgnnz7xqy8c1hhno72b // typedef Dt_t nodeset_t //1 7j7kswbhzemhda2b85gqybnya // typedef Dt_t deglist_t //3 1xvwimo7h6xxwr3nk7628z91s // static Agraph_t *clone_graph(Agraph_t * ing, Agraph_t ** xg) public static Object clone_graph(Object... arg) { UNSUPPORTED("34rwtfj0jl6bt8tx92beev5es"); // static Agraph_t *clone_graph(Agraph_t * ing, Agraph_t ** xg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6wqyctm7ejmgwmi9b1flcldk3"); // Agraph_t *clone; UNSUPPORTED("5xvxmd998k2ijhl36ekqvj047"); // Agraph_t *xclone; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("5symvkivg72wbeqivuz9ryc6v"); // Agnode_t *xn; UNSUPPORTED("cpd7gqx32iybmzyawrjcefiz4"); // Agnode_t *xh; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("das87gvl5xaq7y7ewtx5trkws"); // Agedge_t *xe; UNSUPPORTED("drj328bbj3dx7pr601ewryc7l"); // char gname[128]; UNSUPPORTED("dprz24km2yzgmc5ejmr97z3t"); // static int id = 0; UNSUPPORTED("3uv05i6otc22zt0czdcyol8c4"); // sprintf(gname, "_clone_%d", id++); UNSUPPORTED("2tckewjgb2ez5dfcjpkgpmycc"); // clone = agsubg(ing, gname,1); UNSUPPORTED("ef32h8iori24zal5sdv464o4d"); // agbindrec(clone, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); //node custom data UNSUPPORTED("3uv05i6otc22zt0czdcyol8c4"); // sprintf(gname, "_clone_%d", id++); UNSUPPORTED("61zzjvyr1c2df7ivceck1gill"); // xclone = agopen(gname, ing->desc,((Agdisc_t *)0)); UNSUPPORTED("9q61eb8nam9w8rcvj6541f4i1"); // for (n = agfstnode(ing); n; n = agnxtnode(ing, n)) { UNSUPPORTED("bd9reyxulshw9zgpuyvynufwr"); // agsubnode(clone,n,1); UNSUPPORTED("dnawynwzg0deirz2ezhwax64z"); // xn = agnode(xclone, agnameof(n),1); UNSUPPORTED("cpyo6x44eksqi66ug3agz7etm"); // agbindrec(xn, "Agnodeinfo_t", sizeof(Agnodeinfo_t), NOT(0)); //node custom data UNSUPPORTED("7dnug9uxi7ddoghyrm8rbz45f"); // (((cdata*)(ND_alg(n)))->u.clone) = xn; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9q61eb8nam9w8rcvj6541f4i1"); // for (n = agfstnode(ing); n; n = agnxtnode(ing, n)) { UNSUPPORTED("6std6zvo31kvt5tyxhzwncfoa"); // xn = (((cdata*)(ND_alg(n)))->u.clone); UNSUPPORTED("5mv803jds3a1llgeb7lp12hym"); // for (e = agfstout(ing, n); e; e = agnxtout(ing, e)) { UNSUPPORTED("f49wwvqnjs7d8fc9cm90sgbv4"); // agsubedge(clone,e,1); UNSUPPORTED("7grev3hqtou9mx6g02xvz0b0v"); // xh = (((cdata*)(ND_alg(aghead(e))))->u.clone); UNSUPPORTED("am4vpp5kcl3e6rciv4xntyr5b"); // xe = agedge(xclone, xn, xh, NULL, 1); UNSUPPORTED("apc6204gnibhddglh7n3y9qo2"); // agbindrec(xe, "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0)); //node custom data UNSUPPORTED("f56tf6qn2kusvulydoii7h2er"); // (ED_to_orig(xe)) = e; UNSUPPORTED("9ayqbb28l0qyxfhjwx1asjn8z"); // (ND_order(xn)) += 1; UNSUPPORTED("8uaatcogu6qcrp89p9733ne5l"); // (ND_order(xh)) += 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5sw6xgh0vs7xf7cty92581cew"); // *xg = xclone; UNSUPPORTED("ahsxnrtj709jyhggtyh45qhez"); // return clone; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4js7mtzis5vqcin2nnzmzp3z6 // static deglist_t *getList(Agraph_t * g) public static Object getList(Object... arg) { UNSUPPORTED("a2dgfuc79lf165ux7e468ykof"); // static deglist_t *getList(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("81bp1ufbinisb1i9is0fn5koz"); // deglist_t *dl = mkDeglist(); UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("1h4udrr1gk5uezae7l4x9e4c5"); // insertDeglist(dl, n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cm8qrfhqoqzqx9qfxzg3ti8r7"); // return dl; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4ighdv8te0lys3rchzw8aymm0 // static void find_pair_edges(Agraph_t * g, Agnode_t * n, Agraph_t * outg) public static Object find_pair_edges(Object... arg) { UNSUPPORTED("xutw9e2nplvs3q4gfvk7xn29"); // static void find_pair_edges(Agraph_t * g, Agnode_t * n, Agraph_t * outg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjfpfavygvfxjo8jce5nz48ic"); // Agnode_t **neighbors_with; UNSUPPORTED("88isz9fycrsmab3txj9tib205"); // Agnode_t **neighbors_without; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("1bl759aws53yjk3xg9shiogx5"); // Agedge_t *ep; UNSUPPORTED("3t0ulygac81ueh0xjr391hyrh"); // Agedge_t *ex; UNSUPPORTED("4rip97cgvbcrlgycxl0wajpuh"); // Agnode_t *n1; UNSUPPORTED("5ozeh48rt3sdc5ufi9nv6yx88"); // Agnode_t *n2; UNSUPPORTED("amd7is8j6qvef26sc483rjbsr"); // int has_pair_edge; UNSUPPORTED("1wmjkf3r3rua2n9n6v1glz64z"); // int diff; UNSUPPORTED("d1i7jcsqu99gvxf2fe251lvl6"); // int has_pair_count = 0; UNSUPPORTED("36m9lheffujrzgna7hs9i3oa8"); // int no_pair_count = 0; UNSUPPORTED("1l486qszpb5d3sqdm06kutpur"); // int node_degree; UNSUPPORTED("dod8opyy7guv4i3ux4lcxsn7e"); // int edge_cnt = 0; UNSUPPORTED("cl7dqwmcfqwhf0n719zq4i2k1"); // node_degree = (ND_order(n)); UNSUPPORTED("vetjk9jrsga9ojup5vx2t4ni"); // neighbors_with = (Agnode_t **)gmalloc((node_degree)*sizeof(Agnode_t *)); UNSUPPORTED("4to2767qvlj3zg70yj3ahf9cz"); // neighbors_without = (Agnode_t **)gmalloc((node_degree)*sizeof(Agnode_t *)); UNSUPPORTED("dcuhjbsiioawp6zspvonwd4px"); // for (e = agfstedge(g, n); e; e = agnxtedge(g, e, n)) { UNSUPPORTED("b5elzpoploj144houo511jga7"); // n1 = aghead(e); UNSUPPORTED("1qpu7mh7kzjg30a060o39exdr"); // if (n1 == n) UNSUPPORTED("mgr12zup6vvs740u6t01s0ay"); // n1 = agtail(e); UNSUPPORTED("8o80wphccqc90ul9j5h8s4ilr"); // has_pair_edge = 0; UNSUPPORTED("5b98jlpc20lv99xoeybrxpm1w"); // for (ep = agfstedge(g, n); ep; ep = agnxtedge(g, ep, n)) { UNSUPPORTED("7jumz67ra7zkgh5bzs6ipvjbz"); // if (ep == e) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("7h0r1z7b1tcde4wytwxyigz8d"); // n2 = aghead(ep); UNSUPPORTED("1ejwt6n5a5fy0nqpmbu2yvzcz"); // if (n2 == n) UNSUPPORTED("7brsmwx9usebj9aic30rgi992"); // n2 = agtail(ep); UNSUPPORTED("1w90pq659kpysd8cqbnw3qcx8"); // ex = (agedge(g,n1,n2,NULL,0)); UNSUPPORTED("bg0v15q62qx908cnod0vhp94"); // if (ex) { UNSUPPORTED("3jxs7icfff5r9a8w80frrl2qd"); // has_pair_edge = 1; UNSUPPORTED("f11zryvghlrmh8ao6y8enailu"); // if (n1 < n2) { /* count edge only once */ UNSUPPORTED("esb0m4s9o67n9ql98u27i29a6"); // edge_cnt++; UNSUPPORTED("c2qsyou5a2mxsrqyfw0pd15f0"); // if ((ED_to_orig(ex))) { UNSUPPORTED("3o5uqynsriitatedjwd5jqyqp"); // agdelete(outg, (ED_to_orig(ex))); UNSUPPORTED("drj8qjyjkeeedlfyurwkzkhxl"); // (ED_to_orig(ex)) = 0; /* delete only once */ UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7vcnaipx3tekqorsaz8eb1adj"); // if (has_pair_edge) { UNSUPPORTED("cnm2l3yft4vyot34be8t1q709"); // neighbors_with[has_pair_count] = n1; UNSUPPORTED("bwqyt0dssk1c4fftol3ez81mj"); // has_pair_count++; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("dbgef1y9toqosqz2hc3fqgtaf"); // neighbors_without[no_pair_count] = n1; UNSUPPORTED("9kjm44g5pimn301rv05u1mq9x"); // no_pair_count++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("689peqrlgcq6sxh3v1rsyxtgs"); // diff = node_degree - 1 - edge_cnt; UNSUPPORTED("e7wveq1bjq0k8h3zn94l5i8wb"); // if (diff > 0) { UNSUPPORTED("absiuplqv7ngv5nns8wt419fq"); // int mark; UNSUPPORTED("6c2a0fq6cdv6n7jis6xvac1ix"); // Agnode_t *hp; UNSUPPORTED("3r7e5ngdy1yhhp156zdz404vn"); // Agnode_t *tp; UNSUPPORTED("9o448o0hfz9079rtymm3fd0qy"); // if (diff < no_pair_count) { UNSUPPORTED("55303709crow86p7bnbxlxz61"); // for (mark = 0; mark < no_pair_count; mark += 2) { UNSUPPORTED("9a6n9k96dfza7terjf4n1yxio"); // if ((mark + 1) >= no_pair_count) UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("62vzr4kpbt7zxzw5m06i9vxf0"); // tp = neighbors_without[mark]; UNSUPPORTED("573djj9aqjout7yn9acz0msc0"); // hp = neighbors_without[mark + 1]; UNSUPPORTED("4a0i5ng3bn2o81uk4awkwo3s4"); // agbindrec(agedge(g, tp, hp, NULL, 1), "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0)); // edge custom data UNSUPPORTED("bt7cn3xkr1gbum4zzewtaecm9"); // (ND_order(tp))++; UNSUPPORTED("4paqhnx66ihnlgeeho4uccezz"); // (ND_order(hp))++; UNSUPPORTED("82nc9dwhc9qf2yqko8gvwyuu4"); // diff--; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("cvy8xzqnrho2kumg5d8mekg34"); // mark = 2; UNSUPPORTED("39clbhwbr48385uif3r3jyo5j"); // while (diff > 0) { UNSUPPORTED("9ibgjjztevco43v870eobnqn6"); // tp = neighbors_without[0]; UNSUPPORTED("dogedkqmkviq59unc5qb15zog"); // hp = neighbors_without[mark]; UNSUPPORTED("4a0i5ng3bn2o81uk4awkwo3s4"); // agbindrec(agedge(g, tp, hp, NULL, 1), "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0)); // edge custom data UNSUPPORTED("bt7cn3xkr1gbum4zzewtaecm9"); // (ND_order(tp))++; UNSUPPORTED("4paqhnx66ihnlgeeho4uccezz"); // (ND_order(hp))++; UNSUPPORTED("bvi3mrdatiowhbq318wj7t5jy"); // mark++; UNSUPPORTED("82nc9dwhc9qf2yqko8gvwyuu4"); // diff--; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cvk2tpu5s7mpszng4o7z4uevw"); // else if (diff == no_pair_count) { UNSUPPORTED("2karo0elfxneqcwst1zdznso5"); // tp = neighbors_with[0]; UNSUPPORTED("8p4qikbfm03s7g4w8yxf4tlrs"); // for (mark = 0; mark < no_pair_count; mark++) { UNSUPPORTED("dogedkqmkviq59unc5qb15zog"); // hp = neighbors_without[mark]; UNSUPPORTED("bx4itrrvtmxvzfputf73rj8fm"); // agbindrec(agedge(g, tp, hp, NULL, 1), "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0)); //node custom data UNSUPPORTED("bt7cn3xkr1gbum4zzewtaecm9"); // (ND_order(tp))++; UNSUPPORTED("4paqhnx66ihnlgeeho4uccezz"); // (ND_order(hp))++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7vjoj31lznmgyarxml1sy7ox6"); // free(neighbors_without); UNSUPPORTED("bbg4ogpuvzv576iu3onqmhju1"); // free(neighbors_with); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5hjb2e85ks2yxpsv09neo671u // static Agraph_t *remove_pair_edges(Agraph_t * ing) public static Object remove_pair_edges(Object... arg) { UNSUPPORTED("8b98j875ieeuxpp3w5kzn2kf8"); // static Agraph_t *remove_pair_edges(Agraph_t * ing) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9is4trbhw01oz0cmsbdblvcoa"); // int counter = 0; UNSUPPORTED("e8p66xu6d28z50k31k7r0ruv9"); // int nodeCount; UNSUPPORTED("5760jwtqnhv40s4dp7zpbd2p4"); // Agraph_t *outg; UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("dtvy3v63j8ttw75a8ta8pgszu"); // deglist_t *dl; UNSUPPORTED("18nnhw7fdpv524qt7ylfos296"); // Agnode_t *currnode, *adjNode; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("8jwp8mwo7ot7xsf8ns9gs8a2o"); // outg = clone_graph(ing, &g); UNSUPPORTED("64x7lmip056ro44hpphewu94p"); // nodeCount = agnnodes(g); UNSUPPORTED("5dt7of1fqql5p3otsieom2p1f"); // dl = getList(g); UNSUPPORTED("10dayw0vczrle8e7lkndoebt"); // while (counter < (nodeCount - 3)) { UNSUPPORTED("9ishx77nbvjt46s5fl4jhslpf"); // currnode = firstDeglist(dl); UNSUPPORTED("55km83y6i071gl9xqtr1hzju0"); // /* Remove all adjacent nodes since they have to be reinserted */ UNSUPPORTED("3cj7ssv3hhlsw7e1ot96wtq0q"); // for (e = agfstedge(g, currnode); e; e = agnxtedge(g, e, currnode)) { UNSUPPORTED("8fnm18xabfb23euirw5rfmhe3"); // adjNode = aghead(e); UNSUPPORTED("91oh79rmhzowurysvijqznpkk"); // if (currnode == adjNode) UNSUPPORTED("4ti4gb4lwa7plyg7vl4b59d4e"); // adjNode = agtail(e); UNSUPPORTED("8dn8j57dc5w84dbdxh2hk6czn"); // removeDeglist(dl, adjNode); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("gt3415hgzp0g16aajzn7it2y"); // find_pair_edges(g, currnode, outg); UNSUPPORTED("3cj7ssv3hhlsw7e1ot96wtq0q"); // for (e = agfstedge(g, currnode); e; e = agnxtedge(g, e, currnode)) { UNSUPPORTED("8fnm18xabfb23euirw5rfmhe3"); // adjNode = aghead(e); UNSUPPORTED("91oh79rmhzowurysvijqznpkk"); // if (currnode == adjNode) UNSUPPORTED("4ti4gb4lwa7plyg7vl4b59d4e"); // adjNode = agtail(e); UNSUPPORTED("1ulrtmmbe2o7nyyx5fgxbyrre"); // (ND_order(adjNode))--; UNSUPPORTED("810sb6lz7qgr9nrycusvbbzy7"); // insertDeglist(dl, adjNode); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9ksf1vajgaan07p41p29c1mvj"); // agdelete(g, currnode); UNSUPPORTED("3a9goefb48roao7azhg25lwv4"); // counter++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ego3r1tvwrpv2hie8y9p8vq4z"); // agclose(g); UNSUPPORTED("bzbcdfu9fycm2qy7dza17pulf"); // freeDeglist(dl); UNSUPPORTED("64agnrsd2jyuqnb8ubm8yf939"); // return outg; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 f1mdq67yllxhx8tkbelbjdkx9 // static void measure_distance(Agnode_t * n, Agnode_t * ancestor, int dist, Agnode_t * change) public static Object measure_distance(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("8bbskd8aene9q6w9pz2qp13fw"); // measure_distance(Agnode_t * n, Agnode_t * ancestor, int dist, UNSUPPORTED("4ohwv9g736ydr0cd2dmuu9bum"); // Agnode_t * change) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("emwevwo0p4unmb6sn0ik4yzap"); // Agnode_t *parent; UNSUPPORTED("66rs5wnllik0lwwbe8fw7ktxa"); // parent = (((cdata*)(ND_alg(ancestor)))->u.t.tparent); UNSUPPORTED("dguki3hdfa1kq44yaqn98boh9"); // if (parent == NULL) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("aw8pnfl1tsuoaueckf9mofohg"); // dist++; UNSUPPORTED("4i7mu83mb8n3077hqvv3ztsqg"); // /* check parent to see if it has other leaf paths at greater distance UNSUPPORTED("61w8f47fwkx6oxr422266x9u6"); // than the context node. UNSUPPORTED("c79vqc2pd4tar610rh20wk0q5"); // set the path/distance of the leaf at this ancestor node */ UNSUPPORTED("785w0j47h9kkeks4zohm8bn8u"); // if ((((cdata*)(ND_alg(parent)))->u.t.fdist) == 0) { UNSUPPORTED("odqvjb27zbo8g38ir4tbv4fb"); // (((cdata*)(ND_alg(parent)))->u.t.first) = n; UNSUPPORTED("8yb1877mq891cnion52w856az"); // (((cdata*)(ND_alg(parent)))->u.t.fdist) = dist; UNSUPPORTED("22n84nx5zmde2aqnfq4rkhcdn"); // } else if (dist > (((cdata*)(ND_alg(parent)))->u.t.fdist)) { UNSUPPORTED("4t78u0dg9i2tf1588vsd87wpu"); // if ((((cdata*)(ND_alg(parent)))->u.t.first) != change) { UNSUPPORTED("5brmbajf5fq9nvllfcqjjfmsw"); // if (!(((cdata*)(ND_alg(parent)))->u.t.sdist) || ((((cdata*)(ND_alg(parent)))->u.t.second) != change)) UNSUPPORTED("2jyqy7n3lrsgubqscmb7p3if4"); // change = (((cdata*)(ND_alg(parent)))->u.t.first); UNSUPPORTED("19u1abvwe4vrvq0hldkrldf65"); // (((cdata*)(ND_alg(parent)))->u.t.second) = (((cdata*)(ND_alg(parent)))->u.t.first); UNSUPPORTED("aej3ymuuarfdfevbrbkxsfs1r"); // (((cdata*)(ND_alg(parent)))->u.t.sdist) = (((cdata*)(ND_alg(parent)))->u.t.fdist); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("odqvjb27zbo8g38ir4tbv4fb"); // (((cdata*)(ND_alg(parent)))->u.t.first) = n; UNSUPPORTED("8yb1877mq891cnion52w856az"); // (((cdata*)(ND_alg(parent)))->u.t.fdist) = dist; UNSUPPORTED("23tiyp1zz7p7yeapfjpvg3kru"); // } else if (dist > (((cdata*)(ND_alg(parent)))->u.t.sdist)) { UNSUPPORTED("dkbinvu0a5a7l1l2e0mfen5ls"); // (((cdata*)(ND_alg(parent)))->u.t.second) = n; UNSUPPORTED("dg7zogxpcg388yqyb1xdvk4hg"); // (((cdata*)(ND_alg(parent)))->u.t.sdist) = dist; UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("9t7irrcz950cxvnzf5xsilkuy"); // measure_distance(n, parent, dist, change); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eqsv2jiguz68m8clhpypd2wtj // static nodelist_t *find_longest_path(Agraph_t * tree) public static Object find_longest_path(Object... arg) { UNSUPPORTED("cvtvy1400pesjx53tcmkjoh24"); // static nodelist_t *find_longest_path(Agraph_t * tree) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("2gvulcn94hbghghj84i0jx84k"); // Agnode_t *common = 0; UNSUPPORTED("dg27rmepe42fviq2zsoc4nkom"); // nodelist_t *path; UNSUPPORTED("38pqlxd7dn2wdk3ivibma2s8r"); // nodelist_t *endPath; UNSUPPORTED("eszd2jki841w9l43vjkv77qqy"); // int maxlength = 0; UNSUPPORTED("5dswuhpbodc6rdro2smwpjlyd"); // int length; UNSUPPORTED("6ze037lpldk361f6h3fwxbmkj"); // if (agnnodes(tree) == 1) { UNSUPPORTED("5m0qc9a8hm3bdq1i2t3g0uze7"); // path = mkNodelist(); UNSUPPORTED("c0er3d8ikj00bi6ecdbilrjzd"); // n = agfstnode(tree); UNSUPPORTED("4b4d97qgj2naf7ialtoh01zog"); // appendNodelist(path, NULL, n); UNSUPPORTED("ebb0c3immayb4hoajawmwxzn6"); // ((((cdata*)(ND_alg(n)))->flags) |= (1 << 4)); UNSUPPORTED("57hqjupepq3w3p8tudecyd91y"); // return path; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("f40r7vp17jnh4w34jf4kknwxu"); // for (n = agfstnode(tree); n; n = agnxtnode(tree, n)) { UNSUPPORTED("8ggnunqhr4uo65x8fdxbsdrgr"); // int count = 0; UNSUPPORTED("7crzab0780ludywzjqq7jn68u"); // for (e = agfstedge(tree, n); e; e = agnxtedge(tree, e, n)) { UNSUPPORTED("fn6rrzmrb2yold6j6aofg94n"); // count++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("axvvybks5kjv50jof4glc5akw"); // if (count == 1) UNSUPPORTED("bqeso1gnv2nbf93k6kixny15c"); // measure_distance(n, n, 0, NULL); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7l8pfb0panv7kyxnbai3r40l7"); // /* find the branch node rooted at the longest path */ UNSUPPORTED("f40r7vp17jnh4w34jf4kknwxu"); // for (n = agfstnode(tree); n; n = agnxtnode(tree, n)) { UNSUPPORTED("2v4h1qs75txn0u2ka5u5ohm4d"); // length = (((cdata*)(ND_alg(n)))->u.t.fdist) + (((cdata*)(ND_alg(n)))->u.t.sdist); UNSUPPORTED("2k2m053n227krxq80hshcvbvq"); // if (length > maxlength) { UNSUPPORTED("22ivj50dgjwft18kf35pc3hcx"); // common = n; UNSUPPORTED("bl2c5mti2q66mk9q5zpkzvjhe"); // maxlength = length; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7l4sdilvn1glxjwba09dqlh9j"); // path = mkNodelist(); UNSUPPORTED("18k7q52nyp8v37a82vwl7dqgf"); // for (n = (((cdata*)(ND_alg(common)))->u.t.first); n != common; n = (((cdata*)(ND_alg(n)))->u.t.tparent)) { UNSUPPORTED("4b4d97qgj2naf7ialtoh01zog"); // appendNodelist(path, NULL, n); UNSUPPORTED("ebb0c3immayb4hoajawmwxzn6"); // ((((cdata*)(ND_alg(n)))->flags) |= (1 << 4)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5bqpx04m3ulqgnjp1uq7v5ecg"); // appendNodelist(path, NULL, common); UNSUPPORTED("9ogv29igutj106iwd8snrg4gp"); // ((((cdata*)(ND_alg(common)))->flags) |= (1 << 4)); UNSUPPORTED("5ai3t063tci7wwvpelyzozkpe"); // if ((((cdata*)(ND_alg(common)))->u.t.sdist)) { /* 2nd path might be empty */ UNSUPPORTED("8gamehelsfvfqu8t3lhw7metk"); // endPath = mkNodelist(); UNSUPPORTED("4ixka9e2f1yaiwrmd9b3ulkwu"); // for (n = (((cdata*)(ND_alg(common)))->u.t.second); n != common; n = (((cdata*)(ND_alg(n)))->u.t.tparent)) { UNSUPPORTED("4l3pddu5c5tyn2hdllc5xc2b1"); // appendNodelist(endPath, NULL, n); UNSUPPORTED("9ouwvpziziaylyfco5gvxgpe3"); // ((((cdata*)(ND_alg(n)))->flags) |= (1 << 4)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2zxzzdmj6wlilg54h807crbbi"); // reverseAppend(path, endPath); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1funi6zh0ilqaehngcqcvj4dv"); // return path; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7mnudtov3ojyhnxn1jmz3zhy7 // static void dfs(Agraph_t * g, Agnode_t * n, Agraph_t * tree) public static Object dfs(Object... arg) { UNSUPPORTED("131fnq97ij23iofee00tmleze"); // static void dfs(Agraph_t * g, Agnode_t * n, Agraph_t * tree) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("aegubuefai4rt9vz61w182wop"); // Agnode_t *neighbor; UNSUPPORTED("9t479vqa2ymwishrpzy1a1ro6"); // ((((cdata*)(ND_alg(n)))->flags) |= (1 << 0)); UNSUPPORTED("dcuhjbsiioawp6zspvonwd4px"); // for (e = agfstedge(g, n); e; e = agnxtedge(g, e, n)) { UNSUPPORTED("7ieiz3se1f6o9p9zcbu79zl12"); // neighbor = aghead(e); UNSUPPORTED("10sn3zchzf9d7ht2lrm0m7huu"); // if (neighbor == n) UNSUPPORTED("chnngfe1cxsk6niy46axanm5v"); // neighbor = agtail(e); UNSUPPORTED("5hlnwdwlnvscyeo34qyip2v04"); // if (!((((cdata*)(ND_alg(neighbor)))->flags)&(1 << 0))) { UNSUPPORTED("bs25m8xsm63lovekwfeuy1bq8"); // /* add the edge to the dfs tree */ UNSUPPORTED("o3dylpltii5m67nljeyu79xm"); // agsubedge(tree,e,1); UNSUPPORTED("6e7qpwatv0gehp3jq2n5jl0tn"); // (((cdata*)(ND_alg(neighbor)))->u.t.tparent) = n; UNSUPPORTED("5hf02fnyz7e82bsdi008hkcs4"); // dfs(g, neighbor, tree); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8m28w7pi7rv4oxv0akl2s4az4 // static Agraph_t *spanning_tree(Agraph_t * g) public static Object spanning_tree(Object... arg) { UNSUPPORTED("49a0lsjfstrgxkgmha9h4b27r"); // static Agraph_t *spanning_tree(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("459mwrl3t5jnf7fnwppgzog9d"); // Agraph_t *tree; UNSUPPORTED("drj328bbj3dx7pr601ewryc7l"); // char gname[128]; UNSUPPORTED("dprz24km2yzgmc5ejmr97z3t"); // static int id = 0; UNSUPPORTED("60igk923ldbzwccf0dq02uvh2"); // sprintf(gname, "_span_%d", id++); UNSUPPORTED("243c86rza8src132jwe71acdq"); // tree = agsubg(g, gname,1); UNSUPPORTED("2140hiqxo5gioobsxbknkia87"); // agbindrec(tree, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); //node custom data UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("eo79kblqdj7n8c48gyaykzvaa"); // agsubnode(tree,n,1); UNSUPPORTED("cbjv030bk1i7bitcc7c2hcuhb"); // (((cdata*)(ND_alg(n)))->u.t.fdist) = 0; UNSUPPORTED("5xyp50h8arj9da80smy22ih62"); // (((cdata*)(ND_alg(n)))->u.t.sdist) = 0; UNSUPPORTED("6ug5kj6ku8simq7gccmq34p9w"); // ((((cdata*)(ND_alg(n)))->flags) &= ~(1 << 0)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("654jrg7u4lpnw39673anaxy05"); // if (!((((cdata*)(ND_alg(n)))->flags)&(1 << 0))) { UNSUPPORTED("9ixtcl048f5htxwcmjhqj4xh8"); // (((cdata*)(ND_alg(n)))->u.t.tparent) = NULL; UNSUPPORTED("ch25czkmw7witaw8m0zxu2v4o"); // dfs(g, n, tree); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("48tgunsw0gvmwerbb89baomqt"); // return tree; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c94mjtmn1vruvrupmwtvtj4j4 // static void block_graph(Agraph_t * g, block_t * sn) public static Object block_graph(Object... arg) { UNSUPPORTED("2qk0mibp8cprk47gh0021zl53"); // static void block_graph(Agraph_t * g, block_t * sn) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("4ugp2tyzj8gbyoj1ntbji8gqt"); // Agraph_t *subg = sn->sub_graph; UNSUPPORTED("6ewipai3bqonhmh4h826lvwyi"); // for (n = agfstnode(subg); n; n = agnxtnode(subg, n)) { UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("485bmhmjlr2huu0f4p5z6v2bk"); // if ((((cdata*)(ND_alg(aghead(e))))->block) == sn) UNSUPPORTED("22qf444fgbfmeou84fua1gs3l"); // agsubedge(subg,e,1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1e0vzs6lzgjx91tory442op41 // static int count_all_crossings(nodelist_t * list, Agraph_t * subg) public static Object count_all_crossings(Object... arg) { UNSUPPORTED("airx5so2nky74856ss97mvrrt"); // static int count_all_crossings(nodelist_t * list, Agraph_t * subg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7rutwn578nyaydek3ukuywh1x"); // nodelistitem_t *item; UNSUPPORTED("75tzt0fyavt0p83sz3v3pv7ed"); // edgelist *openEdgeList = init_edgelist(); UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("8tcbm5letf43s691urfrbn7w6"); // int crossings = 0; UNSUPPORTED("18m42y34puuy1otsup09u8l8g"); // int order = 1; UNSUPPORTED("6ewipai3bqonhmh4h826lvwyi"); // for (n = agfstnode(subg); n; n = agnxtnode(subg, n)) { UNSUPPORTED("20f1gy1u7m87t833twh2u9vy3"); // for (e = agfstout(subg, n); e; e = agnxtout(subg, e)) { UNSUPPORTED("6931gsvidrt039x6qh2vy768v"); // (((edata*)(ED_alg(e)))->order) = 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7z11gxrpvg2nqkuzrh0ss0vif"); // for (item = list->first; item; item = item->next) { UNSUPPORTED("efcirwqi1qo67gxv4hcey7ume"); // n = item->curr; UNSUPPORTED("8tiv7x7n2v8qov6f670pejv6m"); // for (e = agfstedge(subg, n); e; e = agnxtedge(subg, e, n)) { UNSUPPORTED("5it9zyfqa6jar9yxfa7flt92h"); // if ((((edata*)(ED_alg(e)))->order) > 0) { UNSUPPORTED("as78wt71mg4et2ds447kzrari"); // edgelistitem *eitem; UNSUPPORTED("dcbcc8dw9uhlkriq96iod65ph"); // Agedge_t *ep; UNSUPPORTED("dzgptt1cuu3tail6gke0ndad6"); // for (eitem = (edgelistitem *) (*(((Dt_t*)(openEdgeList))->searchf))((openEdgeList),(void*)(0),0000200); eitem; UNSUPPORTED("98jfvxmfcjwgpd61jl7puqr2m"); // eitem = UNSUPPORTED("79wv8os0486c6l3lc0j8lvezr"); // (edgelistitem *) (*(((Dt_t*)(openEdgeList))->searchf))((openEdgeList),(void*)(eitem),0000010)) { UNSUPPORTED("5xrki1xzikku31wkllhqpaewd"); // ep = eitem->edge; UNSUPPORTED("dw9gk92vuk9xc3r8steqe6zs"); // if ((((edata*)(ED_alg(ep)))->order) > (((edata*)(ED_alg(e)))->order)) { UNSUPPORTED("1bphd7niyj38txw9c488jyjz2"); // if ((aghead(ep) != n) && (agtail(ep) != n)) UNSUPPORTED("2di6ygf4a96q7nwxhskkgrw8o"); // crossings++; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("eaez2tc8zrg7hyuiqyz4f8m7o"); // remove_edge(openEdgeList, e); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8tiv7x7n2v8qov6f670pejv6m"); // for (e = agfstedge(subg, n); e; e = agnxtedge(subg, e, n)) { UNSUPPORTED("91uh6sqsfh1qb0fg04rbrdaw9"); // if ((((edata*)(ED_alg(e)))->order) == 0) { UNSUPPORTED("a6gzwtrnqvryer9ydo0merz8a"); // (((edata*)(ED_alg(e)))->order) = order; UNSUPPORTED("ebh9kjfm4r3twmi100svfaoh8"); // add_edge(openEdgeList, e); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("eldw55y2gptsekyygj243zo2m"); // order++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3nvvwjw6i1covfxr77dz0lce2"); // free_edgelist(openEdgeList); UNSUPPORTED("100wla4cww7zywuyk2fohr3xg"); // return crossings; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8czdf1x63rnqxr498fl5mu2ii // static nodelist_t *reduce(nodelist_t * list, Agraph_t * subg, int *cnt) public static Object reduce(Object... arg) { UNSUPPORTED("cwpahrifd5wwpp1k3y6amf8q3"); // static nodelist_t *reduce(nodelist_t * list, Agraph_t * subg, int *cnt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6s78t7dpqpe72my2zxxdxlk1h"); // Agnode_t *curnode; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("aegubuefai4rt9vz61w182wop"); // Agnode_t *neighbor; UNSUPPORTED("eedmn1ulafp58zfalsbio69js"); // nodelist_t *listCopy; UNSUPPORTED("668vzrztg8r3431ajfmw3g02k"); // int crossings, j, newCrossings; UNSUPPORTED("77tuxfetkuwk0qecejqda566j"); // crossings = *cnt; UNSUPPORTED("7sled3cai213z4mjtz6ouzbab"); // for (curnode = agfstnode(subg); curnode; UNSUPPORTED("d1i3acz6unvgbwiv7odkyn4wn"); // curnode = agnxtnode(subg, curnode)) { UNSUPPORTED("2ynmbuh1d6pql6jrbzrrc4u9n"); // /* move curnode next to its neighbors */ UNSUPPORTED("7clmrie9c4nqk5v2egaacn1q6"); // for (e = agfstedge(subg, curnode); e; UNSUPPORTED("6nv3yyms6hkbtvpxr2osh2nll"); // e = agnxtedge(subg, e, curnode)) { UNSUPPORTED("chnngfe1cxsk6niy46axanm5v"); // neighbor = agtail(e); UNSUPPORTED("bu9rxi8b2cnjazzdzuotyfg4j"); // if (neighbor == curnode) UNSUPPORTED("99x2l2tyimliely71mzavabu"); // neighbor = aghead(e); UNSUPPORTED("ezup66bu66yfirmt20hqkgdxe"); // for (j = 0; j < 2; j++) { UNSUPPORTED("a8tgrohpgihnjc2kpijobpjd1"); // listCopy = cloneNodelist(list); UNSUPPORTED("1fxi4o6li1nl6wrgdan7ub49p"); // insertNodelist(list, curnode, neighbor, j); UNSUPPORTED("ews1nvni0evsjd0c1j15xp9zw"); // newCrossings = count_all_crossings(list, subg); UNSUPPORTED("329woztg53uqbx6ynh0vq40vs"); // if (newCrossings < crossings) { UNSUPPORTED("87xah9ucvidkmqksxjgiqcm3q"); // crossings = newCrossings; UNSUPPORTED("2axy8hr9pzd6olc68yx47v36"); // freeNodelist(listCopy); UNSUPPORTED("4gw33f013xiqh23y4qxvn3d9h"); // if (crossings == 0) { UNSUPPORTED("8pq2na3ntepyrxjom3nm4b3nz"); // *cnt = 0; UNSUPPORTED("22k9gq4saeqd1dqkjlw3n81uk"); // return list; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("a47jqpic91ky93e1ohxv590l5"); // } else { UNSUPPORTED("b7novmb8rx70k61bo5m0uyau9"); // freeNodelist(list); UNSUPPORTED("1n0q6ik5o2dkkj2n6rt2faeot"); // list = listCopy; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c7m8r79si1ex35hc16xd82hd1"); // *cnt = crossings; UNSUPPORTED("1a5vgaasp2bunvu19mvepzcny"); // return list; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9pjrmh6pnvpbc5tpxbuxkfy2r // static nodelist_t *reduce_edge_crossings(nodelist_t * list, Agraph_t * subg) public static Object reduce_edge_crossings(Object... arg) { UNSUPPORTED("4eoehi8akkxbp2fncwis0hbk9"); // static nodelist_t *reduce_edge_crossings(nodelist_t * list, UNSUPPORTED("a935m1m335lnnl5kbpomckdgf"); // Agraph_t * subg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4wtqpy4n4ubxgx32v15tr9cqw"); // int i, crossings, origCrossings; UNSUPPORTED("dvodtoselzbs0hwbpat0xpnrd"); // crossings = count_all_crossings(list, subg); UNSUPPORTED("94ljjdd4lnd7p8oredbxp5h5p"); // if (crossings == 0) UNSUPPORTED("bq8fdnp0ptlj82raupu7egafd"); // return list; UNSUPPORTED("b4ra1tmfi8msxf5pk7ni6rtaa"); // for (i = 0; i < 10; i++) { UNSUPPORTED("7gnrez23ntedxdkmy4bq1nc6d"); // origCrossings = crossings; UNSUPPORTED("6v1zixxec41vfsswu9of6ak6d"); // list = reduce(list, subg, &crossings); UNSUPPORTED("6ver0nli3zk4pk2adhcaj69lt"); // /* return if no crossings or no improvement */ UNSUPPORTED("6b6zmsryvxnodnsb1ara9ezv"); // if ((origCrossings == crossings) || (crossings == 0)) UNSUPPORTED("85qxcaovlw0aattglmv16j1y7"); // return list; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1a5vgaasp2bunvu19mvepzcny"); // return list; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bq29c0uv67b29jesxdkwou7vq // static double largest_nodesize(nodelist_t * list) public static Object largest_nodesize(Object... arg) { UNSUPPORTED("5nov6rgtb1xfsmsmb95ao36jk"); // static double largest_nodesize(nodelist_t * list) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("7rutwn578nyaydek3ukuywh1x"); // nodelistitem_t *item; UNSUPPORTED("ebs0cu7vx1ovmzfmeirn0fbhf"); // double size = 0; UNSUPPORTED("7z11gxrpvg2nqkuzrh0ss0vif"); // for (item = list->first; item; item = item->next) { UNSUPPORTED("8fe3jo12mqb510koyhz1o4n53"); // n = (((cdata*)(ND_alg(item->curr)))->orig.np); UNSUPPORTED("e94z9yc4z98po6ttj9s4gwqz5"); // if (ND_width(n) > size) UNSUPPORTED("96gl9rmd2kc102alxqwkzh8s0"); // size = ND_width(n); UNSUPPORTED("1l6zldehr4bas1tjrpw0wcsmq"); // if (ND_height(n) > size) UNSUPPORTED("7wntc07s618ezkj2tlys82dsa"); // size = ND_height(n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5fnyq1zql95vx5xiysa7fj12a"); // return size; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 atxva7f7s47kevximw8nohn83 // static void place_node(Agraph_t * g, Agnode_t * n, nodelist_t * list) public static Object place_node(Object... arg) { UNSUPPORTED("dhsmb0fpwrhqfh202b2ya1gwh"); // static void place_node(Agraph_t * g, Agnode_t * n, nodelist_t * list) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("3ti66vwo4a7z0ey7qyc17pwgo"); // int placed = 0; UNSUPPORTED("1fhup2mc58329xom46x9ipqad"); // nodelist_t *neighbors = mkNodelist(); UNSUPPORTED("6eda300y216s8bk6efunzvd7"); // nodelistitem_t *one, *two; UNSUPPORTED("2661ch6g78x3kmtmtuvwn9iaz"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("ez1oh51m2jyugwrdxtszxncb4"); // appendNodelist(neighbors, NULL, aghead(e)); UNSUPPORTED("7xblqjuc3wznadzt37mhdn0yb"); // ((((cdata*)(ND_alg(aghead(e))))->flags) |= (1 << 5)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2wj6c20getix97noebmsx1104"); // for (e = agfstin(g, n); e; e = agnxtin(g, e)) { UNSUPPORTED("6e5d3quxydepzsdu1v6kcx2j9"); // appendNodelist(neighbors, NULL, agtail(e)); UNSUPPORTED("cj2b2sk2xjph79ytokb0nz7d0"); // ((((cdata*)(ND_alg(agtail(e))))->flags) |= (1 << 5)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dws0zbnsy0q6wdujac277jx6h"); // /* Look for 2 neighbors consecutive on list */ UNSUPPORTED("8c4xb1cup0eb4w7ugvbb9rsa2"); // if (sizeNodelist(neighbors) >= 2) { UNSUPPORTED("2r6ksypefukzqje5z1h080n8b"); // for (one = list->first; one; one = one->next) { UNSUPPORTED("4w6hanltkox8go11fcpkpd6d0"); // if (one == list->last) UNSUPPORTED("7dt4hu5pt1so36wg9em25i168"); // two = list->first; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("5mucr596k75huswetgb21xfts"); // two = one->next; UNSUPPORTED("5mrohdkphuegwpog81zep3bqj"); // if (((((cdata*)(ND_alg(one->curr)))->flags)&(1 << 5)) && ((((cdata*)(ND_alg(two->curr)))->flags)&(1 << 5))) { UNSUPPORTED("86tczettzqkp9amjuq87cibsm"); // appendNodelist(list, one, n); UNSUPPORTED("3dzlfoy5eqgugcdfbjv8zcby3"); // placed = 1; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("eolyswl0kan2g1oro7sf7dlkn"); // /* Find any neighbor on list */ UNSUPPORTED("q5re8099dbf0x4lcbhbbu6ng"); // if (!placed && sizeNodelist(neighbors) > 0) { UNSUPPORTED("2r6ksypefukzqje5z1h080n8b"); // for (one = list->first; one; one = one->next) { UNSUPPORTED("5j3184idhwlfzuj756zdlclzz"); // if (((((cdata*)(ND_alg(one->curr)))->flags)&(1 << 5))) { UNSUPPORTED("86tczettzqkp9amjuq87cibsm"); // appendNodelist(list, one, n); UNSUPPORTED("3dzlfoy5eqgugcdfbjv8zcby3"); // placed = 1; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1h9104vucwa2i8aqw5aerzyow"); // if (!placed) UNSUPPORTED("7qo2n4ze0g7p9t1ogpzc3ipn4"); // appendNodelist(list, NULL, n); UNSUPPORTED("b1lpwkx7e649c7mmzzhfojcs"); // for (one = neighbors->first; one; one = one->next) UNSUPPORTED("b93htz7wxsh0vfriyv1cwa1ki"); // ((((cdata*)(ND_alg(one->curr)))->flags) &= ~(1 << 5)); UNSUPPORTED("1hifaw0fi3lsxfsxqus9q0vtu"); // freeNodelist(neighbors); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cawey01ormyor7v954u5hzfey // static void place_residual_nodes(Agraph_t * g, nodelist_t * list) public static Object place_residual_nodes(Object... arg) { UNSUPPORTED("en0wlzq4qk95xb32n6ux616st"); // static void place_residual_nodes(Agraph_t * g, nodelist_t * list) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("1cdeb2efvxae5126go3nmrsg7"); // if (!((((cdata*)(ND_alg(n)))->flags)&(1 << 4))) UNSUPPORTED("3g36s5b3dv73yw7ewv2beed0p"); // place_node(g, n, list); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aaehk4efk1kdkult25czfr4ly // nodelist_t *layout_block(Agraph_t * g, block_t * sn, double min_dist) public static Object layout_block(Object... arg) { UNSUPPORTED("96wogy71y5hq6ao91l2959nwg"); // nodelist_t *layout_block(Agraph_t * g, block_t * sn, double min_dist) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("1vbnjb5ennjmd3jgr0h5lxr78"); // Agraph_t *copyG, *tree, *subg; UNSUPPORTED("d7uu3k4m5ty17ck42vok0b2qd"); // nodelist_t *longest_path; UNSUPPORTED("7rutwn578nyaydek3ukuywh1x"); // nodelistitem_t *item; UNSUPPORTED("9bb4tfjgt05vo41vrsxihxynh"); // int N, k; UNSUPPORTED("1rtt9wypz4gfn7xr2fks2hthp"); // double theta, radius, largest_node; UNSUPPORTED("6ie9wugmj8v1zqz6a4swgy8tn"); // largest_node = 0; UNSUPPORTED("3upuwem5kn6f9b3audmgcehul"); // subg = sn->sub_graph; UNSUPPORTED("bw1u4xso3sa81szwkx88hb6jg"); // block_graph(g, sn); /* add induced edges */ UNSUPPORTED("7quou2xsgqtingzpaf869lf5f"); // copyG = remove_pair_edges(subg); UNSUPPORTED("aiom675n9jcj1o0uvhoqgj5ad"); // tree = spanning_tree(copyG); UNSUPPORTED("2ffqmdckwluvmr4fnf9g1p0a4"); // longest_path = find_longest_path(tree); UNSUPPORTED("2kg4ot07s5c1lk6jzjrem2peu"); // place_residual_nodes(subg, longest_path); UNSUPPORTED("eohec8mb17ceh55fu499v3hfa"); // /* at this point, longest_path is a list of all nodes in the block */ UNSUPPORTED("59rqtug86xn3t38nbu2xx4qa2"); // /* apply crossing reduction algorithms here */ UNSUPPORTED("cxqtiq1ujinlka2jg1ebmr139"); // longest_path = reduce_edge_crossings(longest_path, subg); UNSUPPORTED("2j5mmz9425dcuw67yt2t8nne8"); // N = sizeNodelist(longest_path); UNSUPPORTED("d93qp1f2d17eorifwlmvp90xx"); // largest_node = largest_nodesize(longest_path); UNSUPPORTED("a1h2h6hb6wvbkjonsfvviiqzj"); // /* N*(min_dist+largest_node) is roughly circumference of required circle */ UNSUPPORTED("9iy5h9dm1zsjym6pfl3ylkqgd"); // if (N == 1) UNSUPPORTED("btfv6mxo9yikaacwq3g24z3cb"); // radius = 0; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("a4f2hf2gkxar44781l8iwiv3k"); // radius = (N * (min_dist + largest_node)) / (2 * M_PI); UNSUPPORTED("4w3iss4zp4bwtbkgqj0wmdyhv"); // for (item = longest_path->first; item; item = item->next) { UNSUPPORTED("efcirwqi1qo67gxv4hcey7ume"); // n = item->curr; UNSUPPORTED("6zg1ud5tzcw5bdxchosqyeiqs"); // if (((((cdata*)(ND_alg(n)))->flags)&(1 << 3))) { UNSUPPORTED("dg2tng58imdzt1293k60wzrvj"); // /* QUESTION: Why is only one parent realigned? */ UNSUPPORTED("36jp3lyg0cx6apbu4x762ea9w"); // realignNodelist(longest_path, item); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("33k2b5luc10vdywklbylqhsd2"); // k = 0; UNSUPPORTED("4w3iss4zp4bwtbkgqj0wmdyhv"); // for (item = longest_path->first; item; item = item->next) { UNSUPPORTED("efcirwqi1qo67gxv4hcey7ume"); // n = item->curr; UNSUPPORTED("81lsao9ntz07i5qaabbrxid0z"); // (((cdata*)(ND_alg(n)))->u.f.pos) = k; UNSUPPORTED("6fh5b7a1jd505ta311zo8ujvb"); // (((cdata*)(ND_alg(n)))->u.f.psi) = 0.0; UNSUPPORTED("5f6s0v8wt6wm6q2v5hc7c4r0t"); // theta = k * ((2.0 * M_PI) / N); UNSUPPORTED("sfsmtqrcc76jfzjcnubbxneg"); // ND_pos(n)[0] = radius * cos(theta); UNSUPPORTED("5f4xmzw5upv6bc05yh7gvu438"); // ND_pos(n)[1] = radius * sin(theta); UNSUPPORTED("9zq7xtwq5cysffia17vtbbt9u"); // k++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9iy5h9dm1zsjym6pfl3ylkqgd"); // if (N == 1) UNSUPPORTED("6htkya60ij0v64lsrq2wfi94n"); // sn->radius = largest_node / 2; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("2r0eguj5fxa438xij0sf1innn"); // sn->radius = radius; UNSUPPORTED("a4yy4msg8gf1nhbmov5b7lv9w"); // sn->rad0 = sn->radius; UNSUPPORTED("4kh2nel2kgvoqc4k1f7loko7a"); // /* initialize parent pos */ UNSUPPORTED("9a2zxkibosjbtbvdsel5mg35z"); // sn->parent_pos = -1; UNSUPPORTED("d5071btcahcfirgj180l4iemf"); // agclose(copyG); UNSUPPORTED("c190sceo0yb33l7x7924nrxqf"); // return longest_path; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/circogen/blocktree__c.java000066400000000000000000001055071312650303100230430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.circogen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class blocktree__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6ne46ggmvh7e9kgb4qr6mgghz // static void addNode(block_t * bp, Agnode_t * n) public static Object addNode(Object... arg) { UNSUPPORTED("5fdextpuo92ltskzutccn1w3c"); // static void addNode(block_t * bp, Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("608kwe7sw71zktjgckbl7m132"); // agsubnode(bp->sub_graph, n,1); UNSUPPORTED("dffy2ydqahbtvoy8dze2i5dlh"); // (((cdata*)(ND_alg(n)))->block) = bp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9nkxqs5j4cz6n4smpxnzf7of3 // static Agraph_t *makeBlockGraph(Agraph_t * g, circ_state * state) public static Object makeBlockGraph(Object... arg) { UNSUPPORTED("8ogugxg0mlrykven1dyll85id"); // static Agraph_t *makeBlockGraph(Agraph_t * g, circ_state * state) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("78gq1jdufena2r9rigvse5178"); // char name[128]; UNSUPPORTED("c3tourf5k7groqyh71yjd5xec"); // Agraph_t *subg; UNSUPPORTED("ep00xn89fpirmsx2551j54utc"); // sprintf(name, "_block_%d", state->blockCount++); UNSUPPORTED("6kliff60l8s46s6kyw9368wgr"); // subg = agsubg(g, name,1); UNSUPPORTED("8zyh2vdcxj8wuinpcbzo3huem"); // agbindrec(subg, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); //node custom data UNSUPPORTED("17jmp11l2jzc1v9qpaqkzkauj"); // return subg; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1u9vc7us642ioh6z6mmvho9g1 // static block_t *makeBlock(Agraph_t * g, circ_state * state) public static Object makeBlock(Object... arg) { UNSUPPORTED("b3jgqti5i1lplht0jdz9jh7lw"); // static block_t *makeBlock(Agraph_t * g, circ_state * state) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("22k5mxqow9wcl5tj1dd6fzevq"); // Agraph_t *subg = makeBlockGraph(g, state); UNSUPPORTED("1tq2co4mjsd8njnuq9fdtfklv"); // block_t *bp = mkBlock(subg); UNSUPPORTED("bgo7070e5cs998w6zp1ma85ad"); // return bp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1go7wdt4hei24xynw7ja3qypq // static void push (estack* s, Agedge_t* e) public static Object push(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("vn3gavzznx35o0dk5unn8jy"); // push (estack* s, Agedge_t* e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("uik83qgtmxor295psahfjlp3"); // (((edata*)(ED_alg(e)))->next) = s->top; UNSUPPORTED("pehl52zn5cecaq6tcryq0x2q"); // s->top = e; UNSUPPORTED("2c0ljksb11ygrfdzsey9kinf0"); // s->sz += 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 an818082xt6tg4sjkaragfihw // static Agedge_t* pop (estack* s) public static Object pop(Object... arg) { UNSUPPORTED("6brdr8wx9pidlrz4g71hamlqp"); // static Agedge_t* UNSUPPORTED("dxpg1bn6k36l5op477n9l4hbd"); // pop (estack* s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dbyzosemqb0ppxbcjl1jjf1qh"); // Agedge_t *top = s->top; UNSUPPORTED("7vzatp8nd0zuhbh0cegy6voub"); // if (top) { UNSUPPORTED("cwpy7cbgmqoffiq6cukx7c31w"); // assert(s->sz > 0); UNSUPPORTED("83l03yivh32p027nc80nu1btm"); // s->top = (((edata*)(ED_alg(top)))->next); UNSUPPORTED("6p5s6spq9gzbxvr8bqua8bv0t"); // s->sz -= 1; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("2g1czwq8qs1hp7515i11qbn75"); // assert(0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3bqe70q9zr1iec0o5964x3po6"); // return top; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2me26r3sdk182f52iux8yh3l7 // static void dfs(Agraph_t * g, Agnode_t * u, circ_state * state, int isRoot, estack* stk) public static Object dfs(Object... arg) { UNSUPPORTED("c369mcpdwbw752z2jekex2hf7"); // static void dfs(Agraph_t * g, Agnode_t * u, circ_state * state, int isRoot, estack* stk) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("c21enf3w0nz9vfmu0omf2pasm"); // Agnode_t *v; UNSUPPORTED("5wnipxqjqmsnr2uwvqwr2cu0"); // (((cdata*)(ND_alg(u)))->u.bc.low_val) = (((cdata*)(ND_alg(u)))->u.bc.val) = state->orderCount++; UNSUPPORTED("9s7k6ldzdus38t62lpr55000"); // for (e = agfstedge(g, u); e; e = agnxtedge(g, e, u)) { UNSUPPORTED("9cgusihkv0qycon7x1n4kz95b"); // v = aghead (e); UNSUPPORTED("drfwkbbxrkoogg8hhauehkh6"); // if (v == u) { UNSUPPORTED("2mnwbfqb7ood0nr3wms28k5id"); // v = agtail(e); UNSUPPORTED("cm1em5jid5u0xgj8alt9a9m1q"); // if (!(((edata*)(ED_alg(e)))->order)) (((edata*)(ED_alg(e)))->order) = -1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("9yyjp4p6zziu01suj7lssvi4k"); // if (!(((edata*)(ED_alg(e)))->order)) (((edata*)(ED_alg(e)))->order) = 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1r6lgg40sanlh8qfeyzt2sz1b"); // if ((((cdata*)(ND_alg(v)))->u.bc.val) == 0) { /* Since VAL(root) == 0, it gets treated as artificial cut point */ UNSUPPORTED("4ku4mtdtf8eu7dsik5e9l8w3f"); // (((cdata*)(ND_alg(v)))->parent) = u; UNSUPPORTED("40l3w6fxdqk7jcoe1f20py27u"); // push(stk, e); UNSUPPORTED("3q2wnl77y6o7s10ol3v0f2ee5"); // dfs(g, v, state, 0, stk); UNSUPPORTED("2s7ggn90po89x6892u3aw0d4c"); // (((cdata*)(ND_alg(u)))->u.bc.low_val) = MIN((((cdata*)(ND_alg(u)))->u.bc.low_val), (((cdata*)(ND_alg(v)))->u.bc.low_val)); UNSUPPORTED("dx8clvdw9l98h159fafict51k"); // if ((((cdata*)(ND_alg(v)))->u.bc.low_val) >= (((cdata*)(ND_alg(u)))->u.bc.val)) { /* u is an articulation point */ UNSUPPORTED("5fzvk8a3ck85ucnadckwql1vs"); // block_t *block = NULL; UNSUPPORTED("5oeglenbq34ox5mkdigd64g9z"); // Agnode_t *np; UNSUPPORTED("dcbcc8dw9uhlkriq96iod65ph"); // Agedge_t *ep; UNSUPPORTED("88rfsizqhsisyh0d9rb1bv3bt"); // do { UNSUPPORTED("392s3l6pl2ed4023q8op6jta4"); // ep = pop(stk); UNSUPPORTED("dflbezxz2r72pws6xe7vvbbbh"); // if ((((edata*)(ED_alg(ep)))->order) == 1) UNSUPPORTED("pl5n2urlg4z2upqje2ljhk2w"); // np = aghead (ep); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("72io0nz3p9udd43iejoiyedth"); // np = agtail (ep); UNSUPPORTED("c6rvwexx0of5c130rdze64xbc"); // if (!(((cdata*)(ND_alg(np)))->block)) { UNSUPPORTED("a0zitz4spvxd1oupdy1s7hd5l"); // if (!block) UNSUPPORTED("8lv6xtno3xs8wl26y200ykmex"); // block = makeBlock(g, state); UNSUPPORTED("602huydeg5ve96m3x0h98lh4a"); // addNode(block, np); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("dzj2mkoa2s6esucxuunkyzcrz"); // } while (ep != e); UNSUPPORTED("106jvi4gem7gfnn40a3g1xo1y"); // if (block) { /* If block != NULL, it's not empty */ UNSUPPORTED("aqtlj8skhmf9wz5f0n1nccj58"); // if (!(((cdata*)(ND_alg(u)))->block) && blockSize (block) > 1) UNSUPPORTED("8e36nltg9tsh13ysaeu9b3xwu"); // addNode(block, u); UNSUPPORTED("ajhtu8lfrochg83cml0idqsn4"); // if (isRoot && ((((cdata*)(ND_alg(u)))->block) == block)) UNSUPPORTED("a9m6isxgegq9aeczp21cyz0qr"); // insertBlock(&state->bl, block); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("erqsgjie1p79zl2lhqatnh57p"); // appendBlock(&state->bl, block); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("5xrstrqht5cg3izffsi86009l"); // } else if ((((cdata*)(ND_alg(u)))->parent) != v) { UNSUPPORTED("c5ymhzniwwix5kjf5r9mi1udq"); // (((cdata*)(ND_alg(u)))->u.bc.low_val) = MIN((((cdata*)(ND_alg(u)))->u.bc.low_val), (((cdata*)(ND_alg(v)))->u.bc.val)); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bl92cdt5jy9ajznr76qvu5u3z"); // if (isRoot && !(((cdata*)(ND_alg(u)))->block)) { UNSUPPORTED("9wut2nvkbil7m9gdvk263xzdx"); // block_t *block = makeBlock(g, state); UNSUPPORTED("8btookv5587dfffitdmx3k35k"); // addNode(block, u); UNSUPPORTED("896yvdgaq76sb5yqbe0x4l9tl"); // insertBlock(&state->bl, block); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c7mojhpcwyo755u6jowwxzwdn // static void find_blocks(Agraph_t * g, circ_state * state) public static Object find_blocks(Object... arg) { UNSUPPORTED("ylya6ldy3006k2mvsc0kjr3i"); // static void find_blocks(Agraph_t * g, circ_state * state) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("9ogt1rgyy3nv83to4x8129yq0"); // Agnode_t *root = NULL; UNSUPPORTED("apccihmjvnjfb2gngozexu0pv"); // estack stk; UNSUPPORTED("5c5jw8s53v4xxzd0hjnb1c0xf"); // /* check to see if there is a node which is set to be the root UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("73e7ycmqgzyurfw36etvb6lok"); // if (state->rootname) { UNSUPPORTED("50guz4u3cqnirdo6vskc81u0h"); // root = (agnode(g,state->rootname,0)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2yfzfscmhgfvx7xei8m2i134n"); // if (!root && state->N_root) { UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("boqoqrnqkywxjnumpgm25jeol"); // if (late_bool((((cdata*)(ND_alg(n)))->orig.np), state->N_root, 0)) { UNSUPPORTED("e5p9z4gtbl2rf8vks9hna8fj7"); // root = n; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("anefy71k1qdwcre9fss1qww47"); // if (!root) UNSUPPORTED("8wx5h49bfrzew5ioem57hqaku"); // root = agfstnode(g); UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); // if (Verbose) UNSUPPORTED("6ld2y2hao9s1lkkrmddsf5i8i"); // fprintf (stderr, "root = %s\n", agnameof(root)); UNSUPPORTED("7qjtonl2321drh5v9ho2mcs9h"); // stk.sz = 0; UNSUPPORTED("bh76cnkyano23y7meefmksn9m"); // stk.top = NULL; UNSUPPORTED("5yfanzsqlioq7gn97vklmkamp"); // dfs(g, root, state, 1, &stk); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cjsr6alm5iy3bs8riqc06wcks // block_t *createBlocktree(Agraph_t * g, circ_state * state) public static Object createBlocktree(Object... arg) { UNSUPPORTED("e06kufbnk6wkhrm3pt4te6xnt"); // block_t *createBlocktree(Agraph_t * g, circ_state * state) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c1e61umpnq91loowv2uiik4ij"); // block_t *bp; UNSUPPORTED("cl9j9gn2okzgv6lp648zd7gjg"); // block_t *next; UNSUPPORTED("7u378ih9lwpzdxqjnl915ozy"); // block_t *root; UNSUPPORTED("985nf8jew0zg19ydmlmarwyl1"); // int min; UNSUPPORTED("zsxs5umsbj18bnqc6lktrohg"); // /* int ordercnt; */ UNSUPPORTED("998lr64x35apz58m02j3ku5n1"); // find_blocks(g, state); UNSUPPORTED("byp6901xynik3rsv9cr4fhhsv"); // bp = state->bl.first; /* if root chosen, will be first */ UNSUPPORTED("af5dizr8shg0fwpm9h3uph2pq"); // /* Otherwise, just pick first as root */ UNSUPPORTED("e5u2k2ay64u871sbka0jicz44"); // root = bp; UNSUPPORTED("1p9o9fak3l29yccpv66xc6yiw"); // /* Find node with minimum VAL value to find parent block */ UNSUPPORTED("52d43l3k0o0pazixrgafonsg"); // /* FIX: Should be some way to avoid search below. */ UNSUPPORTED("be7cej3k68m2hyi0ovumc1afl"); // /* ordercnt = state->orderCount; */ UNSUPPORTED("7k318sxybq0zhrputecbfg773"); // for (bp = bp->next; bp; bp = next) { UNSUPPORTED("360sjyc5tpijfr34t8o87o2p5"); // Agnode_t *n; UNSUPPORTED("cqe5tbsvdcln5fenokkx487qu"); // Agnode_t *parent; UNSUPPORTED("d6lk7cmcvuqr4qs5dfwu706sb"); // Agnode_t *child; UNSUPPORTED("7lymfnepa38jojaj5zjskbznj"); // Agraph_t *subg = bp->sub_graph; UNSUPPORTED("a2kougw7r3jfbz7ze8s6kazbe"); // child = n = agfstnode(subg); UNSUPPORTED("cmhxq8ncnq4anh500ypets4ue"); // min = (((cdata*)(ND_alg(n)))->u.bc.val); UNSUPPORTED("c6tks2zg6v1n8ax6rce1jpvg"); // parent = (((cdata*)(ND_alg(n)))->parent); UNSUPPORTED("oxkynlrnba518ft6x49g0nhx"); // for (n = agnxtnode(subg, n); n; n = agnxtnode(subg, n)) { UNSUPPORTED("dn9g5gc8h36vuedkojddpsk1l"); // if ((((cdata*)(ND_alg(n)))->u.bc.val) < min) { UNSUPPORTED("4jiqex4vrb3h22p1a535twbv4"); // child = n; UNSUPPORTED("6swxk3a2yzffi6kodqi79dmf0"); // min = (((cdata*)(ND_alg(n)))->u.bc.val); UNSUPPORTED("b5q946bvy2ot5dgds0b9jm3xn"); // parent = (((cdata*)(ND_alg(n)))->parent); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("armnjsiv39eeb8c1hmgwdskyi"); // ((((cdata*)(ND_alg(parent)))->flags) |= (1 << 3)); UNSUPPORTED("4mqskxttlknlm6gm81bf3wrj8"); // ((bp)->child) = child; UNSUPPORTED("c6ysaq17vofi62cdypownjyzj"); // next = bp->next; /* save next since list insertion destroys it */ UNSUPPORTED("5k4ysbm441casqb6cw2ew8119"); // appendBlock(&((((cdata*)(ND_alg(parent)))->block)->children), bp); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("58xx7i0kix9651uhj6fri63gs"); // initBlocklist(&state->bl); /* zero out list */ UNSUPPORTED("4hzlvk8t0qcn15wg6988vwra9"); // return root; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bq25y50izaq05n3onmen588ni // void freeBlocktree(block_t * bp) public static Object freeBlocktree(Object... arg) { UNSUPPORTED("1bc9hggj8zqlk9aydw3i3xvy4"); // void freeBlocktree(block_t * bp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dnimuukbrqydy7hshg1fgcjip"); // block_t *child; UNSUPPORTED("cl9j9gn2okzgv6lp648zd7gjg"); // block_t *next; UNSUPPORTED("7r4rd1zknlb7o2vbqkbejbkrc"); // for (child = bp->children.first; child; child = next) { UNSUPPORTED("4vzo0f6h7upy5ozou8hnsqvsl"); // next = child->next; UNSUPPORTED("aumnv9uavdnj9vgt5yjii95y0"); // freeBlocktree(child); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("16olnzzj2c8vf954tvar2hnen"); // freeBlock(bp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/circogen/circpos__c.java000066400000000000000000001314461312650303100225340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.circogen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class circpos__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cmpzgqstlf9awa8ui3b11frt // static double getRotation(block_t * sn, Agraph_t * g, double x, double y, double theta) public static Object getRotation(Object... arg) { UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double UNSUPPORTED("ehfx7xgiq9xn598nzs9ob1vqi"); // getRotation(block_t * sn, Agraph_t * g, double x, double y, double theta) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8ut1w6qb3edbl3hod5x18e2np"); // double mindist2; UNSUPPORTED("c3tourf5k7groqyh71yjd5xec"); // Agraph_t *subg; UNSUPPORTED("egtkt6veeq1obtp8hbipv6zon"); // /* Agedge_t* e; */ UNSUPPORTED("7rg8w1sc9llk8kb9rh887zduv"); // Agnode_t *n, *closest_node, *neighbor; UNSUPPORTED("e1slwj7xzo1j4uaft8p1ctzy9"); // nodelist_t *list; UNSUPPORTED("q9993yde5bqm2h0x8p5xgb2i"); // double len2, newX, newY; UNSUPPORTED("e64oflkl2z9gx00h2zb17dt3r"); // int count; UNSUPPORTED("3upuwem5kn6f9b3audmgcehul"); // subg = sn->sub_graph; UNSUPPORTED("ek0r6cxzyv5ro7byggfuuddz7"); // list = sn->circle_list; UNSUPPORTED("ep1jr1n7qskeuwa1gkr496u3n"); // if (sn->parent_pos >= 0) { UNSUPPORTED("3mx4t7u3i2vxwqc19wkhvtmwb"); // theta += M_PI - sn->parent_pos; UNSUPPORTED("1jbpmsvfitefuxb4jyp6k1vgb"); // if (theta < 0) UNSUPPORTED("bhxmsrgs0qu2rni1bt9331brp"); // theta += 2 * M_PI; UNSUPPORTED("d3ynhdpzzr674aqqwfmf0asp"); // return theta; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("addsn42febvq5fyfi20wz7f9m"); // count = sizeNodelist(list); UNSUPPORTED("6bjurf9k81q5hn7xavxrgthoi"); // if (count == 2) { UNSUPPORTED("4u3h25c7y4bqrl34zj8c2s19i"); // return (theta - M_PI / 2.0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ds5icqf0zn1hzeo64qpp89ni7"); // /* Find node in block connected to block's parent */ UNSUPPORTED("4p0l2zbyxkjyv4vnyoc1lj8sc"); // neighbor = ((sn)->child); UNSUPPORTED("d1891z4wlxsylmbz0r6ruevst"); // newX = ND_pos(neighbor)[0] + x; UNSUPPORTED("bck3af1j77nrs3hvtwhi6mlkv"); // newY = ND_pos(neighbor)[1] + y; UNSUPPORTED("ebh5hoiqk7yz0ztscg8hnxbo7"); // mindist2 = LEN2(newX, newY); /* save sqrts by using sqr of dist to find min */ UNSUPPORTED("2qjkfcus0tlgqcapg2tkwnpng"); // closest_node = neighbor; UNSUPPORTED("6ewipai3bqonhmh4h826lvwyi"); // for (n = agfstnode(subg); n; n = agnxtnode(subg, n)) { UNSUPPORTED("71ky04w3ye5z6znqu7n71vl0v"); // if (n == neighbor) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("1mwv5wk5wak4p4jrtylf6pca4"); // newX = ND_pos(n)[0] + x; UNSUPPORTED("1456cp7oqq1bug1q4fhzsqhgg"); // newY = ND_pos(n)[1] + y; UNSUPPORTED("apnl2pxadxv9i0xc2ykubdrho"); // len2 = LEN2(newX, newY); UNSUPPORTED("9ycebbjahmt9g4g87v7409dcv"); // if (len2 < mindist2) { UNSUPPORTED("4ep8vufoq8au3w7qibolk95mn"); // mindist2 = len2; UNSUPPORTED("4tzwzg7wxbgffsxb7lnrbfxrg"); // closest_node = n; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e6cndx8m1cxstvpu8i8lsq64m"); // /* if((neighbor != closest_node) && !ISPARENT(neighbor)) { */ UNSUPPORTED("4ce2cpltl3g9gelwnak2hybsb"); // if (neighbor != closest_node) { UNSUPPORTED("bjieu83v9ahhyxd1buoprxtcz"); // double rho = sn->rad0; UNSUPPORTED("79u7d4lrnqw8upa324kmc6ebc"); // double r = sn->radius - rho; UNSUPPORTED("1t2r0x7jllycm17vx91vz9f6p"); // double n_x = ND_pos(neighbor)[0]; UNSUPPORTED("d5b57fo06ypzhhu6h5pf3a4s7"); // if ((((sn)->flags)&(1 << 0)) && (-r < n_x)) { UNSUPPORTED("29wv3jfqbk7lqmos79ml5hcww"); // double R = LEN(x, y); UNSUPPORTED("7qr92iktscz1c93a1hh5ifx50"); // double n_y = ND_pos(neighbor)[1]; UNSUPPORTED("d9r83dnsjcdjmrc1aozjg691m"); // double phi = atan2(n_y, n_x + r); UNSUPPORTED("3to3yvt3nms5fsewdv9vyivmp"); // double l = r - rho / (cos(phi)); UNSUPPORTED("6pe515ww8zls6t9zcvlh6ipjf"); // theta += M_PI / 2.0 - phi - asin((l / R) * (cos(phi))); UNSUPPORTED("9elbnqbhc8v2ox6bzgxk1gxfp"); // } else { /* Origin still at center of this block */ UNSUPPORTED("78w1zetbzjtive7xf4lki9jq1"); // double phi = atan2(ND_pos(neighbor)[1], ND_pos(neighbor)[0]); UNSUPPORTED("609cgj27e69s8dmo8glg3ajzs"); // theta += M_PI - phi - (((cdata*)(ND_alg(neighbor)))->u.f.psi); UNSUPPORTED("9q8038i79c1g9pk2o23hl7nqi"); // if (theta > 2 * M_PI) UNSUPPORTED("59nb5ql4n0d2osxi8brq9b9dj"); // theta -= 2 * M_PI; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("7b399a6b9nnep504azdykuqob"); // theta = 0; UNSUPPORTED("3t6rhlr39eef1gr8tqabhir2d"); // return theta; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 gs9ma7p0wh81t6pgpfsi1mu6 // static void applyDelta(block_t * sn, double x, double y, double rotate) public static Object applyDelta(Object... arg) { UNSUPPORTED("4gp3cxkdringd7h6oo0dg4g4v"); // static void applyDelta(block_t * sn, double x, double y, double rotate) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dnimuukbrqydy7hshg1fgcjip"); // block_t *child; UNSUPPORTED("c3tourf5k7groqyh71yjd5xec"); // Agraph_t *subg; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("3upuwem5kn6f9b3audmgcehul"); // subg = sn->sub_graph; UNSUPPORTED("6ewipai3bqonhmh4h826lvwyi"); // for (n = agfstnode(subg); n; n = agnxtnode(subg, n)) { UNSUPPORTED("c7nledx3js6xh39qgrc3j4j18"); // double X, Y; UNSUPPORTED("2m9mua77b7vokkrlp2age37c1"); // if (rotate != 0) { UNSUPPORTED("dnhg8ifhp8l8ttdzgvfjethmc"); // double tmpX, tmpY; UNSUPPORTED("1li4s29cv6mlwnsy1hfdo298h"); // double cosR, sinR; UNSUPPORTED("2hxaiccs9coowwxkb6lhhn4kb"); // tmpX = ND_pos(n)[0]; UNSUPPORTED("5sbylnb9ov5k0hsv902247jj4"); // tmpY = ND_pos(n)[1]; UNSUPPORTED("bbflbxuecw2twvqqkmo71b4oo"); // cosR = cos(rotate); UNSUPPORTED("9p9h1xtk984siasj5wglqc78w"); // sinR = sin(rotate); UNSUPPORTED("1j77mc8cp1tw63rxfp8wi7yfa"); // X = tmpX * cosR - tmpY * sinR; UNSUPPORTED("eo679za5hyr3fod5d1tyrmktf"); // Y = tmpX * sinR + tmpY * cosR; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("5rgfb3sb3s9da7ukh7w8460yu"); // X = ND_pos(n)[0]; UNSUPPORTED("7hhsgdhs0xss97a35uycoc77h"); // Y = ND_pos(n)[1]; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2ibts74izihvl7plps72sd77z"); // /* translate */ UNSUPPORTED("7ufxtczkukt6jq6dwezehykdu"); // ND_pos(n)[0] = X + x; UNSUPPORTED("5j8ptjhth0fmqnlfgcp07j0kp"); // ND_pos(n)[1] = Y + y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5q8iyg8qadpdv4xsyt8pbaafd"); // for (child = sn->children.first; child; child = child->next) UNSUPPORTED("6tfiliuoxmw3nwxjmqspkhrmw"); // applyDelta(child, x, y, rotate); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dkl7hvx97dgz0mz1n3waj9wxy // static double getInfo (posinfo_t* pi, posstate * stp, double min_dist) public static Object getInfo(Object... arg) { UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double UNSUPPORTED("840ltlj3x7buqo1tz0ufzb0q1"); // getInfo (posinfo_t* pi, posstate * stp, double min_dist) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dnimuukbrqydy7hshg1fgcjip"); // block_t *child; UNSUPPORTED("5vgu39qaeyddsky8nzh69a1cs"); // double maxRadius = 0; /* Max. radius of children */ UNSUPPORTED("a8pqaixk20tomle987jcvpjgr"); // double diameter = 0; /* sum of child diameters */ UNSUPPORTED("a4pd76gzm03ukmko7rpk50rxz"); // int childCount = 0; UNSUPPORTED("5jz1jehvl3s4wz5ghc6zrake1"); // for (child = stp->cp; child; child = child->next) { UNSUPPORTED("61fqoj6svhfxxjz8q16q08wol"); // if ((((child)->child)? (((cdata*)(ND_alg(((child)->child))))->parent) : 0) == pi->n) { UNSUPPORTED("17lb6oohjc36ieu38qsv0lska"); // childCount++; UNSUPPORTED("1j7z4ghl8sdcb5gj02suro8ru"); // if (maxRadius < child->radius) { UNSUPPORTED("dcj0ypnuwkf4wldd9j0wzynze"); // maxRadius = child->radius; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5cb305yot8ml7rimh6zfg9fe2"); // diameter += 2 * child->radius + min_dist; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("76l6vcvzq0ezifuroltqyaajc"); // pi->diameter = diameter; UNSUPPORTED("8ln0onaw2pyj3ubj0v4dn5bks"); // pi->childCount = childCount; UNSUPPORTED("66i09znv8qgbsd8lktrlnhlht"); // pi->minRadius = stp->radius + min_dist + maxRadius; UNSUPPORTED("b30825a9409z4f6wp159mgquy"); // pi->maxRadius = maxRadius; UNSUPPORTED("aruhcgr64df62b73mgxm10bjv"); // return maxRadius; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1n9ypbho9o6l5h94s3xw065pc // static void setInfo (posinfo_t* p0, posinfo_t* p1, double delta) public static Object setInfo(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("5pammq1crwk6lp3uxho5gb8wo"); // setInfo (posinfo_t* p0, posinfo_t* p1, double delta) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("73hafrp1gwi626l02wei36tg2"); // double t = (p0->diameter*p1->minRadius) + (p1->diameter*p0->minRadius); UNSUPPORTED("4kmowfkoj6kbw5buu9vl93z4j"); // t /= 2*delta*p0->minRadius*p1->minRadius; UNSUPPORTED("l8bh6n5jn0o9gdujjrj6uv4d"); // if (t < 1) UNSUPPORTED("2t7ets0lvfbfx07z5w658psx6"); // t = 1; UNSUPPORTED("2uk6hulg3s481xzedfv74gvjv"); // if (t > p0->scale) UNSUPPORTED("5xsoxjokv9bzcry8ueg81tgfi"); // p0->scale = t; UNSUPPORTED("aasj9alkqxjb213qiijqolzdi"); // if (t > p1->scale) UNSUPPORTED("2dnhdfxe24p2769g5nzx8e114"); // p1->scale = t; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3hwx5f8xljw9aw6ahmlxzwd5 // static void positionChildren (Agraph_t* g, posinfo_t* pi, posstate * stp, int length, double min_dist) public static Object positionChildren(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("1i00gkii027wmdfk5vmixheyv"); // positionChildren (Agraph_t* g, posinfo_t* pi, posstate * stp, int length, double min_dist) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dnimuukbrqydy7hshg1fgcjip"); // block_t *child; UNSUPPORTED("2h28ngm52bopvhkktsqrsjuft"); // double childAngle, childRadius, incidentAngle; UNSUPPORTED("6vkkhyp5yqx03cxcvjgzreyvg"); // double mindistAngle, rotateAngle, midAngle; UNSUPPORTED("czazrrlmm4rvdzz6txkva79cj"); // int midChild, cnt = 0; UNSUPPORTED("4rvlw7dclng4zb33jxph77mm3"); // double snRadius = stp->subtreeR; /* max subtree radius */ UNSUPPORTED("9zpk9ku3vjqfnb0uc5io2w4d0"); // double firstAngle = stp->firstAngle; UNSUPPORTED("9ckqittdyp855n6lrgajg89lo"); // double lastAngle = stp->lastAngle; UNSUPPORTED("5fhwtiypa1ch4e6i1bqst7bnk"); // double d, deltaX, deltaY; UNSUPPORTED("17ihywepb60o3clfx7kh1juae"); // childRadius = pi->scale * pi->minRadius; UNSUPPORTED("3bgnzdbzgpt26xgjqlxo3zrw4"); // if (length == 1) { UNSUPPORTED("1bmsz9xxns8k870t2xt3pk3lv"); // childAngle = 0; UNSUPPORTED("bcdjefa6xvlkdm5fwvxpwfq74"); // d = pi->diameter/(2*M_PI); UNSUPPORTED("4s560bphn0f8s4ap4kdv75sf7"); // childRadius = MAX(childRadius, d); UNSUPPORTED("7cz14k84zv34v3u19m7zbd07n"); // d = 2*M_PI*childRadius - pi->diameter; UNSUPPORTED("cts1w4s3ihwu230dhm01amlgz"); // if (d > 0) UNSUPPORTED("6pty4l2yj4aihv0e7tio7zm8z"); // min_dist += d/pi->childCount; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("47pymrkdiujlqzk1n6kf5cqqi"); // childAngle = pi->theta - pi->diameter/(2 * childRadius); UNSUPPORTED("5jb40zn7lo9j5bftqp4efb4xe"); // if ((childRadius + pi->maxRadius) > snRadius) UNSUPPORTED("4o3mkhn9l2d1zweohu5gak0lq"); // snRadius = childRadius + pi->maxRadius; UNSUPPORTED("albxxl7eiza84jfbelnz7np50"); // mindistAngle = min_dist / childRadius; UNSUPPORTED("l5aya5nm5hnerh8jjksx3lqz"); // midChild = (pi->childCount + 1) / 2; UNSUPPORTED("5jz1jehvl3s4wz5ghc6zrake1"); // for (child = stp->cp; child; child = child->next) { UNSUPPORTED("5y748gqz7osqt1a345ioimm0e"); // if ((((child)->child)? (((cdata*)(ND_alg(((child)->child))))->parent) : 0) != pi->n) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("77uduyi6k655bzus5bii32rj"); // if (sizeNodelist(child->circle_list) <= 0) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("9npzenhjwahb1tub0weflymow"); // incidentAngle = child->radius / childRadius; UNSUPPORTED("c69jvmzrevph74caisfpf79mn"); // if (length == 1) { UNSUPPORTED("btx47bd050say49ybxbfxxrx8"); // if (childAngle != 0) { UNSUPPORTED("11n2y6kkv4rca0be56oa4yuwy"); // if (pi->childCount == 2) UNSUPPORTED("a9ogeli9lgxver8dtpvq26r1s"); // childAngle = M_PI; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("e3rf09rej790utv5odsi7sirm"); // childAngle += incidentAngle; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("bnmngdaagaced9g37k4iectpn"); // if (firstAngle < 0) UNSUPPORTED("bsx8hf00tkq0m0i9os2gv7hne"); // firstAngle = childAngle; UNSUPPORTED("8llapzv34igunous8dfu6ic8p"); // lastAngle = childAngle; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("26covu77lvuzprfh5pc35c6m7"); // if (pi->childCount == 1) { UNSUPPORTED("ds80vzgun3b3octlz0lofd9qz"); // childAngle = pi->theta; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("2qps72ppptkpmaonwjx89t8ti"); // childAngle += incidentAngle + mindistAngle / 2; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4xx1ubdla04bj1c1nkji47ycn"); // deltaX = childRadius * cos(childAngle); UNSUPPORTED("4q41infzh177ycry5n376xyo"); // deltaY = childRadius * sin(childAngle); UNSUPPORTED("59lpvl8d38879wlvcrxj3i3ok"); // /* first apply the delta to the immediate child and see if we need UNSUPPORTED("cbr9evjzrxqa89gdj6lugvuut"); // * to rotate it for better edge link UNSUPPORTED("ae0iqjg4062ccpw6kxq0jktan"); // * should return the theta value if there was a rotation else zero UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("d3t3vti6mue4xaw6rg9dwck94"); // rotateAngle = getRotation(child, g, deltaX, deltaY, childAngle); UNSUPPORTED("a79u8uaekxm40c65ezudsd5u6"); // applyDelta(child, deltaX, deltaY, rotateAngle); UNSUPPORTED("c69jvmzrevph74caisfpf79mn"); // if (length == 1) { UNSUPPORTED("aw0pdp4pepihfz8q083ilj9cy"); // childAngle += incidentAngle + mindistAngle; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("cb8bk29jo8zc6bh1xx9p06lnc"); // childAngle += incidentAngle + mindistAngle / 2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1szm63athnlkprt3pv29pjc6z"); // cnt++; UNSUPPORTED("962p120sk6jb00rm75uryy0nv"); // if (cnt == midChild) UNSUPPORTED("9kvtjmj7u050tx0m6yiax5wvz"); // midAngle = childAngle; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4e8ao1xf7cnvtb07wtsyvxvbx"); // if ((length > 1) && (pi->n == stp->neighbor)) { UNSUPPORTED("5hpo1zarnam66vyjyrst5vfut"); // (((cdata*)(ND_alg(pi->n)))->u.f.psi) = midAngle; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("70x4gfo9wip2xi3nkekxl3pd9"); // stp->subtreeR = snRadius; UNSUPPORTED("26dtlxr2hlpcs2smx34sg8u84"); // stp->firstAngle = firstAngle; UNSUPPORTED("e1bjfx85nmchm67a1wftqkeqt"); // stp->lastAngle = lastAngle; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 183knc853hg2lewtrjxjwbad // static double position(Agraph_t * g, int childCount, int length, nodelist_t * path, block_t * sn, double min_dist) public static Object position(Object... arg) { UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double UNSUPPORTED("22vnfrl02muhf1spl5hz0w23t"); // position(Agraph_t * g, int childCount, int length, nodelist_t * path, UNSUPPORTED("c1t6ifcshh5aolq58u6d8zzpj"); // block_t * sn, double min_dist) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7rutwn578nyaydek3ukuywh1x"); // nodelistitem_t *item; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("6ucakys2cw7jiv28161pyriv1"); // posstate state; UNSUPPORTED("8k85245qpent3wzgi4bryorr3"); // int i, counter = 0; UNSUPPORTED("a695nieoct28fopsesdpcnge"); // double maxRadius = 0.0; UNSUPPORTED("92mb8jdyxj5379bf15u10ncne"); // double angle; UNSUPPORTED("39lrh4yp65e7bz2yxmw4eykrf"); // double theta = 0.0; UNSUPPORTED("23og2wsnt900of8nebhax9oyf"); // posinfo_t* parents = (posinfo_t*)zmalloc((childCount)*sizeof(posinfo_t)); UNSUPPORTED("bzqraac2wnk8t66hw56y468nc"); // int num_parents = 0; UNSUPPORTED("z72pagx4ayrk2yqmotbjuefr"); // posinfo_t* next; UNSUPPORTED("eeemcjy0m28y6uo1k67ow85aw"); // posinfo_t* curr; UNSUPPORTED("c9q6ir4wu73b7lv68ilvxy3x7"); // double delta; UNSUPPORTED("6yffdiw932i5rt81vhl78p4my"); // state.cp = sn->children.first; UNSUPPORTED("2i8rbg0cq017n4ujwzb6ehb70"); // state.subtreeR = sn->radius; UNSUPPORTED("3zq6dyqtdab8t8om06kbqxsf7"); // state.radius = sn->radius; UNSUPPORTED("2oqyqn73k762frqgxysfgwdvx"); // state.neighbor = ((sn)->child); UNSUPPORTED("5v4yfu1mewcqtr1iitiv2k5zs"); // state.nodeAngle = 2 * M_PI / length; UNSUPPORTED("6f204wxzonpgn67h24efbeg87"); // state.firstAngle = -1; UNSUPPORTED("dua53rud195i1fza5gx41y8wl"); // state.lastAngle = -1; UNSUPPORTED("5dgjj6y6q8lzpoow2gga1vw08"); // for (item = path->first; item; item = item->next) { UNSUPPORTED("efcirwqi1qo67gxv4hcey7ume"); // n = item->curr; UNSUPPORTED("94qpgyg00z0hr00d8pd3z1ayb"); // theta = counter * state.nodeAngle; UNSUPPORTED("3a9goefb48roao7azhg25lwv4"); // counter++; UNSUPPORTED("6zg1ud5tzcw5bdxchosqyeiqs"); // if (((((cdata*)(ND_alg(n)))->flags)&(1 << 3))) { UNSUPPORTED("2d3h31rypli1to22ks3625yb3"); // parents[num_parents].n = n; UNSUPPORTED("3w4m6651a3two5vpclinusgxz"); // parents[num_parents].theta = theta; UNSUPPORTED("a969k09an1c03o3fchyxzdknw"); // maxRadius = getInfo (parents+num_parents, &state, min_dist); UNSUPPORTED("nfniu0ma9kcpj4iftil7vxzo"); // num_parents++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("19ff6lx469ojx0kd8qng7xnm2"); // if (num_parents == 1) UNSUPPORTED("ebbpim2wuh8zmq8eb2hy0rwa4"); // parents->scale = 1.0; UNSUPPORTED("7nq76o6ilylvrnthd9saci3dm"); // else if (num_parents == 2) { UNSUPPORTED("97x4yhfbu7p7ax1wjgypyzvs2"); // curr = parents; UNSUPPORTED("cxlahkp8nrxsqxjo1h4m6luwj"); // next = parents+1; UNSUPPORTED("318uuok3kzhklbp2qy5oz5isd"); // delta = next->theta - curr->theta; UNSUPPORTED("dl7kx2da6bpzv7t95mctx0k4b"); // if (delta > M_PI) UNSUPPORTED("8w966007ytd8humlh8ld5n3y"); // delta = 2*M_PI - delta; UNSUPPORTED("42eevkdrj77smcpbkbycptbr9"); // setInfo (curr, next, delta); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("97x4yhfbu7p7ax1wjgypyzvs2"); // curr = parents; UNSUPPORTED("5pdqtasaquwj0buhiaa5kl3lu"); // for (i = 0; i < num_parents; i++) { UNSUPPORTED("o2ar05chdjxtjoiic51moxxo"); // if (i+1 == num_parents) { UNSUPPORTED("9wiicb729io2751z1cqj3za3w"); // next = parents; UNSUPPORTED("8w39fyrm0xi8av27kkb2ox9iq"); // delta = next->theta - curr->theta + 2*M_PI; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("2wgrvn9lpnb1glq51snvhrlpn"); // next = curr+1; UNSUPPORTED("6rnd98sxn37mywfmwpgmz5jys"); // delta = next->theta - curr->theta; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("3wodlygye92vfolc4yek541q5"); // setInfo (curr, next, delta); UNSUPPORTED("f09krbnpkp0dj7clpnfofxhs3"); // curr++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6s78kskfp8mah4jsgthr07vz5"); // for (i = 0; i < num_parents; i++) { UNSUPPORTED("3qghhc5maci1337vzb8zb1d23"); // positionChildren (g, parents + i, &state, length, min_dist); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2zf1tuimr6i6xmj6st44n1y6d"); // free (parents); UNSUPPORTED("6ehx9nw398bee4byzgr4hyvrj"); // /* If block has only 1 child, to save space, we coalesce it with the UNSUPPORTED("158fhk9tz4932mk3kgob0majr"); // * child. Instead of having final radius sn->radius + max child radius, UNSUPPORTED("st1dl3d0qufd92ksixbfqrs8"); // * we have half that. However, the origin of the block is no longer in UNSUPPORTED("82bqem29c6dlp0g32cggclhpj"); // * the center of the block, so we cannot do a simple rotation to get UNSUPPORTED("aq0f42fl4631zdfwv7noubqpf"); // * the neighbor node next to the parent block in getRotate. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("bbfns218ckyof9zhxovat1856"); // if (childCount == 1) { UNSUPPORTED("9totzf6n9ceszh8mm3tllioma"); // applyDelta(sn, -(maxRadius + min_dist / 2), 0, 0); UNSUPPORTED("7xw3jatz27ecvuvr8ndmzpri2"); // sn->radius += min_dist / 2 + maxRadius; UNSUPPORTED("djn1r9ekdaplctm3dmv4s86hq"); // (((sn)->flags) |= (1 << 0)); UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("2z11j34mh7ho6yeonjtcuftyk"); // sn->radius = state.subtreeR; UNSUPPORTED("2634lkpplyldiomou50vs8ne8"); // angle = (state.firstAngle + state.lastAngle) / 2.0 - M_PI; UNSUPPORTED("62ygf2gmqakbkjtv70bqh5q3i"); // return angle; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a87t2i8cdtwy70eh2fop0pu68 // static void doBlock(Agraph_t * g, block_t * sn, double min_dist) public static Object doBlock(Object... arg) { UNSUPPORTED("5nry31kqija8llhs67tppjguq"); // static void doBlock(Agraph_t * g, block_t * sn, double min_dist) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dnimuukbrqydy7hshg1fgcjip"); // block_t *child; UNSUPPORTED("d7uu3k4m5ty17ck42vok0b2qd"); // nodelist_t *longest_path; UNSUPPORTED("akedsyjeha5i5pifvmpx754fx"); // int childCount, length; UNSUPPORTED("csnfgux07j8xroe4dfr5ydmww"); // double centerAngle = M_PI; UNSUPPORTED("5czwx5ja6vchkqqf3nj1dbplo"); // /* layout child subtrees */ UNSUPPORTED("6fmp43rz8qxcnka1ixy8ofy4o"); // childCount = 0; UNSUPPORTED("2ucdzk00biyj5tphlncfr7de8"); // for (child = sn->children.first; child; child = child->next) { UNSUPPORTED("cqqmq5uo5abmk8d0omydy8qfe"); // doBlock(g, child, min_dist); UNSUPPORTED("ckf9u9keyanpnzokxxvtxisu8"); // childCount++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("f5dfmshylzxahkpt6bypg8gdf"); // /* layout this block */ UNSUPPORTED("96pbgoge9aguwe0pojeb6478b"); // longest_path = layout_block(g, sn, min_dist); UNSUPPORTED("9j0wpzijxf3wv4nwyk56labpn"); // sn->circle_list = longest_path; UNSUPPORTED("2px8ljbfc4yhbhbv2i3n5kjvc"); // length = sizeNodelist(longest_path); /* path contains everything in block */ UNSUPPORTED("epc8pxjomwsgtpc3cie7d8jp9"); // /* attach children */ UNSUPPORTED("4abtrzavmj7jx497pijua7lit"); // if (childCount > 0) UNSUPPORTED("3px8jprdntkfoay5evmj3utqc"); // centerAngle = UNSUPPORTED("byo5mpsyssgtbxmb1x5yu3hcy"); // position(g, childCount, length, longest_path, sn, min_dist); UNSUPPORTED("16uagx1awpuxh25qk8lwdiewh"); // if ((length == 1) && ((((sn)->child)? (((cdata*)(ND_alg(((sn)->child))))->parent) : 0))) { UNSUPPORTED("9nmeqvmukyg4yokpki9xdf3vj"); // sn->parent_pos = centerAngle; UNSUPPORTED("d8izngkerf5zyrx3iwt0zqq3f"); // if (sn->parent_pos < 0) UNSUPPORTED("7ex0u65w20yvu6ejq0eph4w2j"); // sn->parent_pos += 2 * M_PI; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 chxnkeyek1c0y3nf5nzcr860m // void circPos(Agraph_t * g, block_t * sn, circ_state * state) public static Object circPos(Object... arg) { UNSUPPORTED("7kmetdiv7luwpajiej493xalo"); // void circPos(Agraph_t * g, block_t * sn, circ_state * state) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e4qh6uup89pjepp99d1dehhh"); // doBlock(g, sn, state->min_dist); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/circogen/circular__c.java000066400000000000000000000642051312650303100226740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.circogen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class circular__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 brutblu0x5wghdgucrt52smjm // static void initGraphAttrs(Agraph_t * g, circ_state * state) public static Object initGraphAttrs(Object... arg) { UNSUPPORTED("mevh06n4q12f6qlyrvz3w4g0"); // static void initGraphAttrs(Agraph_t * g, circ_state * state) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3z24ttdbl5xv131ksj7fa1bos"); // static Agraph_t *rootg; UNSUPPORTED("2sxz0ovw0gl9wk9npfs6dv3ef"); // static attrsym_t *N_artpos; UNSUPPORTED("armrshxy92azyhnq4ajdo80ng"); // static attrsym_t *N_root; UNSUPPORTED("1aahky7zclwyujyy33hntydc6"); // static attrsym_t *G_mindist; UNSUPPORTED("cjkaslolwvv9zm99ol4025xwn"); // static char *rootname; UNSUPPORTED("btcm26tl3qvd0mpw8v6ehj7fl"); // Agraph_t *rg; UNSUPPORTED("75g5xnaflgg4p8k1558jb4iwe"); // node_t *n = agfstnode(g); UNSUPPORTED("8sbtilif75x33dpu4ndtghvpb"); // rg = agraphof((((cdata*)(ND_alg(n)))->orig.np)); UNSUPPORTED("1b78iugl2igpzf6u74oi1e79p"); // if (rg != rootg) { /* new root graph */ UNSUPPORTED("94t7yb92h6bvdimz86ehh9rj"); // state->blockCount = 0; UNSUPPORTED("9pibd50hsa8xrddgalqpzemqq"); // rootg = rg; UNSUPPORTED("dw7jwke69sqerh0l2h4j1irbs"); // G_mindist = agattr(rootg,AGRAPH, "mindist", NULL); UNSUPPORTED("248jckj3fduzazffdm0ezhdgo"); // N_artpos = agattr(rootg,AGNODE, "articulation_pos", NULL); UNSUPPORTED("60so4xhc3ssfm3o0ub5d6e6nf"); // N_root = agattr(rootg,AGNODE, "root", NULL); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("f0rizk4nvevdxrxdceh5l8gb8"); // rootname = agget(rootg, "root"); UNSUPPORTED("5qqotagszvhwnqyx2q40b4xh1"); // initBlocklist(&state->bl); UNSUPPORTED("bpjxyfqoeiyunzjxeqp945vfx"); // state->orderCount = 1; UNSUPPORTED("5r1nzq4zm4l0jc5gao2cxf41k"); // state->min_dist = late_double(rootg, G_mindist, 1.0, 0.0); UNSUPPORTED("d19x5ja0lnq2fpohjymq0r6h4"); // state->N_artpos = N_artpos; UNSUPPORTED("23qn4w90tp8ja02yccctbqsq3"); // state->N_root = N_root; UNSUPPORTED("1mmya9odnwx31zrehpl1jpsy1"); // state->rootname = rootname; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7576syipts6h49ytv0bxjqihr // static void cleanup(block_t * root, circ_state * sp) public static Object cleanup(Object... arg) { UNSUPPORTED("797dl0jvi1n3233d8o4uyei2b"); // static void cleanup(block_t * root, circ_state * sp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("gazjytqmjmd1urhxt9548d55"); // freeBlocktree(root); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 boxxvmmqhsqas56onmc5f3zwe // static block_t* createOneBlock(Agraph_t * g, circ_state * state) public static Object createOneBlock(Object... arg) { UNSUPPORTED("59ge1w6bvjt3yigegnr06qnl8"); // static block_t* UNSUPPORTED("9xvo8aqpz8luw2fq3dl28uijm"); // createOneBlock(Agraph_t * g, circ_state * state) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c3tourf5k7groqyh71yjd5xec"); // Agraph_t *subg; UNSUPPORTED("78gq1jdufena2r9rigvse5178"); // char name[128]; UNSUPPORTED("c1e61umpnq91loowv2uiik4ij"); // block_t *bp; UNSUPPORTED("ci2zh69w6nhi0q816i1ixuy9k"); // Agnode_t* n; UNSUPPORTED("ep00xn89fpirmsx2551j54utc"); // sprintf(name, "_block_%d", state->blockCount++); UNSUPPORTED("8hrghpozt8br3ds7ltyndkky6"); // subg = agsubg(g, name, 1); UNSUPPORTED("dkw9ioytrkmgvbpp3g41plz2w"); // bp = mkBlock(subg); UNSUPPORTED("7wq24g054kmx3aw25vk5ksj4"); // for (n = agfstnode(g); n; n = agnxtnode(g,n)) { UNSUPPORTED("e3s0e6n0tn5oo7ufsgmpz2da4"); // agsubnode(bp->sub_graph, n, 1); UNSUPPORTED("5w85v39q14iajt0jgg03tk3a9"); // (((cdata*)(ND_alg(n)))->block) = bp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bgo7070e5cs998w6zp1ma85ad"); // return bp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8uhw81t1ved37tzd71k710amg // void circularLayout(Agraph_t * g, Agraph_t* realg) public static Object circularLayout(Object... arg) { UNSUPPORTED("b9ydomdo0508iyd0x2pfye9lz"); // void circularLayout(Agraph_t * g, Agraph_t* realg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7u378ih9lwpzdxqjnl915ozy"); // block_t *root; UNSUPPORTED("d75hzxqbv87poc5kfhal0xyck"); // static circ_state state; UNSUPPORTED("c9dpf2d6r2iz9o45zgyidbebh"); // if (agnnodes(g) == 1) { UNSUPPORTED("6ki4i8xt1mzl7q9z88kubd4yj"); // Agnode_t *n = agfstnode(g); UNSUPPORTED("1if9tmldy50vvy2r6q47ljlzr"); // ND_pos(n)[0] = 0; UNSUPPORTED("dl1koje47ohkw3rirkqubr4ha"); // ND_pos(n)[1] = 0; UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("15iqjzyyusn71pklqiaym0leo"); // initGraphAttrs(g, &state); UNSUPPORTED("guyydelm9krftn3qex06vuuh"); // if (mapbool(agget(realg, "oneblock"))) UNSUPPORTED("2lhfurdnccdltspt0boh4e1r1"); // root = createOneBlock(g, &state); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("8b2zub4wcpg8aqduu4g2d0vye"); // root = createBlocktree(g, &state); UNSUPPORTED("4snxxj405ai3to5yun84phl1o"); // circPos(g, root, &state); UNSUPPORTED("9nk75yy4i467l0g7z9wrmspqk"); // cleanup(root, &state); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/circogen/circularinit__c.java000066400000000000000000001105051312650303100235530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.circogen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class circularinit__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 exy2l03ceq9zw4vf01bbd4d3o // typedef unsigned int packval_t //3 5zqkuy8tub9dafvyyyiaizp7g // static void circular_init_edge(edge_t * e) public static Object circular_init_edge(Object... arg) { UNSUPPORTED("81a6u66j0hogvfd05waxp3tg4"); // static void circular_init_edge(edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9egiculslq6sjkjl1r3i2xhyw"); // agbindrec(e, "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0)); //node custom data UNSUPPORTED("dwvquwksg1mxo6dxl7r7gaxpe"); // common_init_edge(e); UNSUPPORTED("6asvm3mgvrgkcyl9tgnl3h63l"); // ED_factor(e) = late_double(e, E_weight, 1.0, 0.0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4ng3mbiynzux1wvgsup4kxys4 // static void circular_init_node_edge(graph_t * g) public static Object circular_init_node_edge(Object... arg) { UNSUPPORTED("9znhhxthl2danllds1rjgalwy"); // static void circular_init_node_edge(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("7s165b75za7edl3pgyc01kxis"); // int i = 0; UNSUPPORTED("3v6tdz74pwvplr74f6twrd5el"); // ndata* alg = (ndata*)zmalloc((agnnodes(g))*sizeof(ndata)); UNSUPPORTED("6v4vv0lnaxuk2fjdmt9we0u5a"); // GD_neato_nlist(g) = (node_t **)zmalloc((agnnodes(g) + 1)*sizeof(node_t *)); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("1jlbav97feq4ldstpk1olcq1v"); // neato_init_node(n); UNSUPPORTED("duvqfgu1th3wcqujatvqygq4q"); // ND_alg(n) = alg + i; UNSUPPORTED("db7iioqpe7jfqzku8slbbyrqx"); // GD_neato_nlist(g)[i++] = n; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("9nauxuqfe7l71ry6spo3zx7sv"); // circular_init_edge(e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ed4m1q5pf8w4vmugtmdtyswf5 // void circo_init_graph(graph_t * g) public static Object circo_init_graph(Object... arg) { UNSUPPORTED("clgz3no8an7z04vs9z66h54i5"); // void circo_init_graph(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6vmhwvwf0v01vufgz8qcmh7jb"); // setEdgeType (g, (1 << 1)); UNSUPPORTED("6l9t0fr5noj4qmjm4d97s1yg"); // /* GD_ndim(g) = late_int(g,agfindattr(g,"dim"),2,2); */ UNSUPPORTED("dewv2jeq4al6xed6mstt62s4"); // Ndim = GD_ndim(g) = 2; /* The algorithm only makes sense in 2D */ UNSUPPORTED("do50yggt3kfryy3rl36hav9ex"); // circular_init_node_edge(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6oaqcf3sa5k7zbraca82kld7x // static node_t *makeDerivedNode(graph_t * dg, char *name, int isNode, void *orig) public static Object makeDerivedNode(Object... arg) { UNSUPPORTED("30m11dka21d62sohxvn94zyzs"); // static node_t *makeDerivedNode(graph_t * dg, char *name, int isNode, UNSUPPORTED("cp1d6p3arstdrks87m40zwgfb"); // void *orig) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("73d7bkrhzxc6l2mp8q3dm11jk"); // node_t *n = agnode(dg, name,1); UNSUPPORTED("dv6sz213l2u9hnm297p0rddyc"); // agbindrec(n, "Agnodeinfo_t", sizeof(Agnodeinfo_t), NOT(0)); //node custom data UNSUPPORTED("a3k4jc1wdwonrnd37opgktsjs"); // ND_alg(n) = (void *) (cdata*)zmalloc(sizeof(cdata)); UNSUPPORTED("4j672890oi8yw0qwb24k82gwl"); // if (isNode) { UNSUPPORTED("7r7bg9zjwf1z4qmhfna2gszb6"); // ND_pos(n) = (double*)zmalloc((Ndim)*sizeof(double)); UNSUPPORTED("1cgm8oljhf1418e7rcmln1b3f"); // ND_lw(n) = ND_lw((node_t *) orig); UNSUPPORTED("1015mjuidbqu2as0i5ttigd8z"); // ND_rw(n) = ND_rw((node_t *) orig); UNSUPPORTED("6wd4a54nsu1mu9kautswdhkqv"); // ND_ht(n) = ND_ht((node_t *) orig); UNSUPPORTED("3y9rgbfji9tz3o3njt36tin5w"); // (((cdata*)(ND_alg(n)))->orig.np) = (node_t *) orig; UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("9mivzy7020945qzvi116o7mqd"); // (((cdata*)(ND_alg(n)))->orig.g) = (graph_t *) orig; UNSUPPORTED("69hc24ic55i66g8tf2ne42327"); // return n; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 47innmyoq6u3g1towfnldiw7q // Agraph_t **circomps(Agraph_t * g, int *cnt) public static Object circomps(Object... arg) { UNSUPPORTED("88dug57az6beipl0x6lgbi4be"); // Agraph_t **circomps(Agraph_t * g, int *cnt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bgwb4n61b6v6hggxzjxkzyyhh"); // int c_cnt; UNSUPPORTED("8i0oxshyd0x2idt42lftg3zjx"); // Agraph_t **ccs; UNSUPPORTED("4irto8d9ngepfwouz32g86zl6"); // Agraph_t *dg; UNSUPPORTED("bbeocxhxeybyz66p85ymkw21p"); // Agnode_t *n, *v, *dt, *dh; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("5qsdev7ikmpmm9zepv8ye0zy6"); // Agraph_t *sg; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("1bl759aws53yjk3xg9shiogx5"); // Agedge_t *ep; UNSUPPORTED("79qovd7yt2ksk0181m08pcblr"); // Agnode_t *p; UNSUPPORTED("b90zsijnwtlivim554qwqm0ix"); // dg = agopen("derived", Agstrictundirected,((Agdisc_t *)0)); UNSUPPORTED("21avs22bxicrobqqehf2myfbe"); // agbindrec (dg, "info", sizeof(Agraphinfo_t), NOT(0)); UNSUPPORTED("bjc2oies1s6gsu3oimfh0p2vw"); // GD_alg(g) = dg; /* store derived graph for closing later */ UNSUPPORTED("7lrfd3npcqkgakq00km2isrez"); // for (v = agfstnode(g); v; v = agnxtnode(g, v)) { UNSUPPORTED("66d9cjc3c19rkl1xo5q75eyy3"); // if ((((ndata*)(ND_alg(v)))->dnode)) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("3xd9di7e0pn5j3ab12plbfwdg"); // n = makeDerivedNode(dg, agnameof(v), 1, v); UNSUPPORTED("60ya0ytt4vev09o5aku73jahr"); // (((ndata*)(ND_alg(v)))->dnode) = n; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7lrfd3npcqkgakq00km2isrez"); // for (v = agfstnode(g); v; v = agnxtnode(g, v)) { UNSUPPORTED("erx1nf1775jonr4w5wft0hvdu"); // for (e = agfstout(g, v); e; e = agnxtout(g, e)) { UNSUPPORTED("3t1pr150rt35qfaq27r1zbv4p"); // dt = (((ndata*)(ND_alg(agtail(e))))->dnode); UNSUPPORTED("e6mfovkd5y5ejfzgrd5ejbxyq"); // dh = (((ndata*)(ND_alg(aghead(e))))->dnode); UNSUPPORTED("etnv2n1zrsnrvqk0iw4k56m3k"); // if (dt != dh) { UNSUPPORTED("4e8oaa3hyozzg07trkzctvpjg"); // agbindrec(agedge(dg, dt, dh, NULL, 1), "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0)); //node custom data UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bdwcg056rr8f0gjq6j88p2x7n"); // ccs = ccomps(dg, &c_cnt, 0); UNSUPPORTED("5jibz6gpp5kod6l57ny3ty3r1"); // /* replace block nodes with block contents */ UNSUPPORTED("m6vxwfbuj0amz3vibr3v29ej"); // for (i = 0; i < c_cnt; i++) { UNSUPPORTED("6u96xrwleb6z11oid6j69lgbg"); // sg = ccs[i]; UNSUPPORTED("87tnwfub3vnyzczex6ea2030o"); // /* add edges: since sg is a union of components, all edges UNSUPPORTED("c3jorj497dblwgp23ztqrl4w3"); // * of any node should be added, except loops. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("8ndqdk4p1i3jl54ffpn01qpf0"); // for (n = agfstnode(sg); n; n = agnxtnode(sg, n)) { UNSUPPORTED("2xz1i48q3s732gi3b9voxo5x5"); // p = (((cdata*)(ND_alg(n)))->orig.np); UNSUPPORTED("8kf4pg1a2oonwlfycu9ekh7kk"); // for (e = agfstout(g, p); e; e = agnxtout(g, e)) { UNSUPPORTED("3gd7lc1v93xd4xermby6u1r65"); // /* n = DNODE(agtail(e)); by construction since agtail(e) == p */ UNSUPPORTED("eurm7o0ur76a0r8d1mvhnyuxn"); // dh = (((ndata*)(ND_alg(aghead(e))))->dnode); UNSUPPORTED("cajrzypw29s0vxy9q2wb63pb5"); // if (n != dh) { UNSUPPORTED("wxztz2ihmtaq7a3tnh877wtn"); // ep = agedge(dg, n, dh, NULL, 1); UNSUPPORTED("cyrt7a79zj3qpozi5u03e9rha"); // agbindrec(ep, "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0)); //node custom data UNSUPPORTED("3nbvxqmkpczy87gapoiflcm7h"); // agsubedge(sg,ep,1); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6sp7lph2mvxrohj6vtfkicdim"); // /* Finally, add edge data to edges */ UNSUPPORTED("914a8cae80n1ri1fpea93utu7"); // for (n = agfstnode(dg); n; n = agnxtnode(dg, n)) { UNSUPPORTED("1rw5ca354jxnf4pzpzmqok202"); // for (e = agfstout(dg, n); e; e = agnxtout(dg, e)) { UNSUPPORTED("7w6qk0tqimtm4cv1my0ck9qvr"); // ED_alg(e) = (edata*)zmalloc(sizeof(edata)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4e70xntp9dn0j9tedf99r36kd"); // *cnt = c_cnt; UNSUPPORTED("d077t46km2flvzhvfy5b9ld5u"); // return ccs; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8tkw52jrm3q5gjxend5f4k65u // static void closeDerivedGraph(graph_t * g) public static Object closeDerivedGraph(Object... arg) { UNSUPPORTED("6rwrdoon90p8fi9j654lwxnlv"); // static void closeDerivedGraph(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("dyaixncu6fj64t6jwaub8p2i5"); // free(ED_alg(e)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("54ofz7viqgqwlis5n9xqmuu5h"); // free(ND_alg(n)); UNSUPPORTED("2nmtwczdx0jgyqpwa58dcregg"); // free(ND_pos(n)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ego3r1tvwrpv2hie8y9p8vq4z"); // agclose(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dpkh3zgzyq6fbp9ioeeobtmuf // static void copyPosns(graph_t * g) public static Object copyPosns(Object... arg) { UNSUPPORTED("85yp63ze7p9x92x7hu9n8g2i5"); // static void copyPosns(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("aigogf44ojtcesuy4xs7inqbn"); // node_t *v; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("ew59jdm9lyvhthz1t6xrxvtxb"); // v = (((cdata*)(ND_alg(n)))->orig.np); UNSUPPORTED("1yrksj0nsa8xiq23zugddcfu0"); // ND_pos(v)[0] = ND_pos(n)[0]; UNSUPPORTED("4oe7lgzfrw1944cz1lgdilxgk"); // ND_pos(v)[1] = ND_pos(n)[1]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2c199pi91nr7mh3acdkqmldz // void circoLayout(Agraph_t * g) public static Object circoLayout(Object... arg) { UNSUPPORTED("9fhl98askfr5pey0tdt2q7595"); // void circoLayout(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8i0oxshyd0x2idt42lftg3zjx"); // Agraph_t **ccs; UNSUPPORTED("5qsdev7ikmpmm9zepv8ye0zy6"); // Agraph_t *sg; UNSUPPORTED("bkb0ghck7vt2m0xdwrl4k3xsw"); // int ncc; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("9ejwyvcq1foytw59mxl3482uc"); // if (agnnodes(g)) { UNSUPPORTED("5claujskttaa3ofagihoocs0"); // ccs = circomps(g, &ncc); UNSUPPORTED("edukq9g8egufczs6ja3h99k6a"); // if (ncc == 1) { UNSUPPORTED("5culj7o9syz5p697akumt6yuo"); // circularLayout(ccs[0], g); UNSUPPORTED("45bp9uwmk8jhe2621hwavtn3u"); // copyPosns(ccs[0]); UNSUPPORTED("dr2tfyal8xy7z5fd0tf0ewyl7"); // adjustNodes(g); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("4b10vmvqnqosanuvuht0ftet9"); // Agraph_t *dg = ccs[0]->root; UNSUPPORTED("83e9l49h8gnb0np8c6kq3m4uv"); // pack_info pinfo; UNSUPPORTED("7jf67vp6muqkvku6lzkv5jp7e"); // getPackInfo(g, l_node, 8, &pinfo); UNSUPPORTED("3rfcnwowz3h58n92j7igzwap0"); // for (i = 0; i < ncc; i++) { UNSUPPORTED("6n1wgj9rnpi5u0c1f6mo7hvdr"); // sg = ccs[i]; UNSUPPORTED("6bvrmd6fk9hdhoya1rhrdttvh"); // circularLayout(sg, g); UNSUPPORTED("8wmpmd9fii5i7bt0z2xxzqqws"); // adjustNodes(sg); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("85ss84hamlz7rmyoghxnfvtfx"); // /* FIX: splines have not been calculated for dg UNSUPPORTED("46z2ex51d85utlwyty1u4gva7"); // * To use, either do splines in dg and copy to g, or UNSUPPORTED("2ienyma5vtgjvnjw1bzj078ue"); // * construct components of g from ccs and use that in packing. UNSUPPORTED("20m1lc1moer8x00tx9ceto0iw"); // */ UNSUPPORTED("dyd2ouvfyiz2rwx8lvicc5dfx"); // packSubgraphs(ncc, ccs, dg, &pinfo); UNSUPPORTED("6j69ahhob9se73yezbxmtj1kw"); // for (i = 0; i < ncc; i++) UNSUPPORTED("187gxizgv5cq2o0jxwkmjjh6h"); // copyPosns(ccs[i]); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5eru5cerydhchm7ojmgdlkv9y"); // free(ccs); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3ei94sqys69psr637fpltuail // void circo_layout(Agraph_t * g) public static Object circo_layout(Object... arg) { UNSUPPORTED("26zulk7sh7ulle9t1br08yku4"); // void circo_layout(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3o29ookoifg8un22eqmpv1dji"); // if (agnnodes(g) == 0) return; UNSUPPORTED("crts7mlr0gno5bv400gffajrh"); // circo_init_graph(g); UNSUPPORTED("3n1vj06ggjmp8hz1d20mk2y6p"); // circoLayout(g); UNSUPPORTED("b9ppl4mqx1v2uc46b1spxyavl"); // /* Release ND_alg as we need to reuse it during edge routing */ UNSUPPORTED("13jrnqbzc7n4ujm1kc140syrh"); // free(ND_alg(agfstnode(g))); UNSUPPORTED("5cj9wu1kpmvlmkgf7a52qkdhe"); // spline_edges(g); UNSUPPORTED("4mt9sefpw760d2ucfonntrzd5"); // dotneato_postprocess(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b296om49teiekj6lwox3v4ych // void circo_cleanup(graph_t * g) public static Object circo_cleanup(Object... arg) { UNSUPPORTED("2000uj9hmwompnjqlkhmdf51y"); // void circo_cleanup(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("42x5vqk9aw9a2ld3duvpmp7u9"); // n = agfstnode(g); UNSUPPORTED("1dhb4juzl1nov6lfw5m04nrjm"); // if (n == NULL) UNSUPPORTED("5fyrd330hpw6jlkkbj1hbwwrx"); // return; /* g is empty */ UNSUPPORTED("f45nj0vg9pqonlpelxgxia20d"); // closeDerivedGraph((graph_t*)GD_alg(g)); /* delete derived graph */ UNSUPPORTED("d5kco5u1uhmm9tbu87zidddbe"); // /* free (ND_alg(n)); */ UNSUPPORTED("5vwclwrj7d6gxp9jc712gfxeo"); // for (; n; n = agnxtnode(g, n)) { UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("5otoqd7o1zz8ni50urywr7yjy"); // gv_cleanup_edge(e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ec2wg4tpq1npq2mtdbc154ylh"); // gv_cleanup_node(n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dxp41biia9zas5nfacx5m4vhp"); // free(GD_neato_nlist(g)); UNSUPPORTED("58o9b8zmlqcq96deeorllidce"); // if (g != agroot(g)) UNSUPPORTED("3339e6k6eajhv2r0c4wedzjx7"); // agclean (g,AGRAPH,"Agraphinfo_t"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/circogen/deglist__c.java000066400000000000000000000667311312650303100225310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.circogen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class deglist__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 7j7kswbhzemhda2b85gqybnya // typedef Dt_t deglist_t //3 6jjh5wxnkdktgwiietsjulw6z // static degitem *mkItem(Dt_t * d, degitem * obj, Dtdisc_t * disc) public static Object mkItem(Object... arg) { UNSUPPORTED("34l3cr7o0s36r6np2mo81nf28"); // static degitem *mkItem(Dt_t * d, degitem * obj, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("70m8szenrqelm5jiezi74rafb"); // degitem *ap = (degitem*)gmalloc(sizeof(degitem)); UNSUPPORTED("4ouv9h9vqevqnrhkan5tlj097"); // ap->np = NULL; UNSUPPORTED("271cqt1d7zvpcjyeqcy8l9eun"); // ap->deg = obj->deg; UNSUPPORTED("b8cimfvcp1vea97hyfr4m9nix"); // return ap; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dxc5b2nwkbljd2ajty06o3jsb // static void freeItem(Dt_t * d, degitem * obj, Dtdisc_t * disc) public static Object freeItem(Object... arg) { UNSUPPORTED("bdbhhqyr54fvrnkfl9uvtqwwr"); // static void freeItem(Dt_t * d, degitem * obj, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8are8jqzwfj87yj4tkaohi3tf"); // free(obj); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 63kiupllvljfbvo3a449loqbj // static int cmpDegree(Dt_t * d, int *key1, int *key2, Dtdisc_t * disc) public static Object cmpDegree(Object... arg) { UNSUPPORTED("5c5veztcj8p7w17adgwu5lm2w"); // static int cmpDegree(Dt_t * d, int *key1, int *key2, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cgd49hnc586jvde6n28xo4kbs"); // if (*key1 < *key2) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("9l1k6re48q3fnj1wo008zixlf"); // else if (*key1 > *key2) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 19ddabks48tw9coeb5b7qhsc8 // static Dtdisc_t nodeDisc = //3 8s93atp6fs5gev3r499v2zshm // deglist_t *mkDeglist(void) public static Object mkDeglist(Object... arg) { UNSUPPORTED("4b6n6j1dlfujg6k83xdu9ngrt"); // deglist_t *mkDeglist(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2frmh5mz12cekzldrd7afbeb4"); // deglist_t *s = dtopen(&nodeDisc, Dtoset); UNSUPPORTED("3y6wj3ntgmr1qkdpm7wp1dsch"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 583rk1k9h9793rue8tv6fay4g // void freeDeglist(deglist_t * s) public static Object freeDeglist(Object... arg) { UNSUPPORTED("ckni1tor84ydnmlnmg6twknr1"); // void freeDeglist(deglist_t * s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1eacawmrzl4lhcatl49wx5ig5"); // dtclose(s); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8ab3eesjs8stuegu0nvbyzepc // void insertDeglist(deglist_t * ns, Agnode_t * n) public static Object insertDeglist(Object... arg) { UNSUPPORTED("64f8u0ha3z0utn16h0x5vfec0"); // void insertDeglist(deglist_t * ns, Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bqnel5obbh4bl3zf0omgdos4n"); // degitem key; UNSUPPORTED("eeebhkpkvwktepj7rwhq5doyn"); // degitem *kp; UNSUPPORTED("78a3fqbduf77elveak3a5mlzy"); // key.deg = (ND_order(n)); UNSUPPORTED("b796ihupd560f2wp258m0hns6"); // kp = (*(((Dt_t*)(ns))->searchf))((ns),(void*)(&key),0000001); UNSUPPORTED("8qnzzx284czktidqetzzx8zn2"); // ND_next(n) = kp->np; UNSUPPORTED("611u8u1k5yndthyjbbn8n4vom"); // kp->np = n; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 196qf9oo7v4q0vpkmh0offqml // void removeDeglist(deglist_t * list, Agnode_t * n) public static Object removeDeglist(Object... arg) { UNSUPPORTED("7teewdwi0ri4goei9djjltz9k"); // void removeDeglist(deglist_t * list, Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bqnel5obbh4bl3zf0omgdos4n"); // degitem key; UNSUPPORTED("erd6k9k70zu76g38b4bw40qgc"); // degitem *ip; UNSUPPORTED("4dnqwjhhs92m1h2q7ld3cpbxw"); // Agnode_t *np; UNSUPPORTED("1ru9ims6hmw013lfo33nqoovf"); // Agnode_t *prev; UNSUPPORTED("78a3fqbduf77elveak3a5mlzy"); // key.deg = (ND_order(n)); UNSUPPORTED("epr624cob4pobua20tuitepp"); // ip = (degitem *) (*(((Dt_t*)(list))->searchf))((list),(void*)(&key),0000004); UNSUPPORTED("9olui43gl7h3h1fmw7zn66imq"); // assert(ip); UNSUPPORTED("7efmqfndjamyl7n0z6r5wfzl4"); // if (ip->np == n) { UNSUPPORTED("ajf2a1kwtqzgaf0ttc2nkdlo2"); // ip->np = ND_next(n); UNSUPPORTED("3aucho1nw67puvtklsyv092ds"); // if (ip->np == NULL) UNSUPPORTED("cqy11coo93d3bsdiwq7ud9fuo"); // (*(((Dt_t*)(list))->searchf))((list),(void*)(ip),0000002); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("52mt95m4116s9iwqfb25s4pav"); // prev = ip->np; UNSUPPORTED("4sz2f5szhalvcqtkmhiik0vx9"); // np = ND_next(prev); UNSUPPORTED("4n2kwfilkk67likl0qzeycxvd"); // while (np && (np != n)) { UNSUPPORTED("bo6pv2ttquzlqms4raesbt03g"); // prev = np; UNSUPPORTED("5d6ye4vskzqqtwv623y3ih813"); // np = ND_next(np); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5ezdne9bvwnh3wos769j8wiia"); // if (np) UNSUPPORTED("1g10xvvi5utvhj60qc2xdojj1"); // ND_next(prev) = ND_next(np); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6anrbidvt56pez6p6gbqpydt3 // Agnode_t *firstDeglist(deglist_t * list) public static Object firstDeglist(Object... arg) { UNSUPPORTED("e0sl2agzlockom7cxoo51qw1r"); // Agnode_t *firstDeglist(deglist_t * list) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("erd6k9k70zu76g38b4bw40qgc"); // degitem *ip; UNSUPPORTED("4dnqwjhhs92m1h2q7ld3cpbxw"); // Agnode_t *np; UNSUPPORTED("8i6t915t48u87p7rtir1632oz"); // ip = (degitem *) (*(((Dt_t*)(list))->searchf))((list),(void*)(0),0000200); UNSUPPORTED("bct0h7obrwmyxyjpdlga0lo14"); // if (ip) { UNSUPPORTED("78029h2ysex4tgn2j6yc9n606"); // np = ip->np; UNSUPPORTED("dga7wwrm8t8ae9u45xa81skdx"); // ip->np = ND_next(np); UNSUPPORTED("3aucho1nw67puvtklsyv092ds"); // if (ip->np == NULL) UNSUPPORTED("cqy11coo93d3bsdiwq7ud9fuo"); // (*(((Dt_t*)(list))->searchf))((list),(void*)(ip),0000002); UNSUPPORTED("17ijaw8uvtaqajyt5gz56c0bl"); // return np; UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/circogen/edgelist__c.java000066400000000000000000000627031312650303100226710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.circogen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class edgelist__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 e0c6o8stnbe78j48z75ksdz7r // typedef Dt_t edgelist //3 c48pu7sje0r78t2wzd4wriou1 // static edgelistitem *mkItem(Dt_t * d, edgelistitem * obj, Dtdisc_t * disc) public static Object mkItem(Object... arg) { UNSUPPORTED("8pmb3scayujj5o5eo9kju7s41"); // static edgelistitem *mkItem(Dt_t * d, edgelistitem * obj, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8ecewest645ms26bpisstjmbk"); // edgelistitem *ap = (edgelistitem*)gmalloc(sizeof(edgelistitem)); UNSUPPORTED("52bu9pkvky17tuwkbe7qqix6r"); // ap->edge = obj->edge; UNSUPPORTED("b8cimfvcp1vea97hyfr4m9nix"); // return ap; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5ju6nwkzfj1kw0o19m27zgi3k // static void freeItem(Dt_t * d, edgelistitem * obj, Dtdisc_t * disc) public static Object freeItem(Object... arg) { UNSUPPORTED("3u61y9byumq89etvp23c3riam"); // static void freeItem(Dt_t * d, edgelistitem * obj, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8are8jqzwfj87yj4tkaohi3tf"); // free(obj); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6cpvzyjpob8pd1xlv3ttghxux // static int cmpItem(Dt_t * d, Agedge_t ** key1, Agedge_t ** key2, Dtdisc_t * disc) public static Object cmpItem(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("ajqv8acrh7u8vbw2juulsum5d"); // cmpItem(Dt_t * d, Agedge_t ** key1, Agedge_t ** key2, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7utf654gwt7egdzz3hm89nlxl"); // if (*key1 > *key2) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("6upfe9100usb1lfxsl7la30s7"); // else if (*key1 < *key2) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 en30luofpod7z27w0aj4r8enb // static Dtdisc_t ELDisc = //3 7fca27qkh2mdzf81nmexrpiqr // edgelist *init_edgelist() public static Object init_edgelist(Object... arg) { UNSUPPORTED("yy5ggz6clx2c2onc8xl22qfk"); // edgelist *init_edgelist() UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cfid3mmhj2rdurvanznm8otj3"); // edgelist *list = dtopen(&ELDisc, Dtoset); UNSUPPORTED("1a5vgaasp2bunvu19mvepzcny"); // return list; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a9ttx4x4j9nv42ye6uynivjyd // void free_edgelist(edgelist * list) public static Object free_edgelist(Object... arg) { UNSUPPORTED("3yal0ro8r8xufkq7jtgbrga2v"); // void free_edgelist(edgelist * list) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aa4i2v07wlx8w47e0lf34c4wz"); // dtclose(list); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 19dxubfb11w2vtknmrufxxlxs // void add_edge(edgelist * list, Agedge_t * e) public static Object add_edge(Object... arg) { UNSUPPORTED("9qznefcg03z35rgwce6d2xz50"); // void add_edge(edgelist * list, Agedge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5mz4ehypkf3qcceorma37u4o3"); // edgelistitem temp; UNSUPPORTED("9ux5w93i4ironqiyms86u2lmg"); // temp.edge = e; UNSUPPORTED("52s02sgijqd90o3eaje0m3ymi"); // (*(((Dt_t*)(list))->searchf))((list),(void*)(&temp),0000001); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9dw7otsax5p3wgco3ezmr6p5u // void remove_edge(edgelist * list, Agedge_t * e) public static Object remove_edge(Object... arg) { UNSUPPORTED("bce0vyzq6ak6qdqruxc8c31h7"); // void remove_edge(edgelist * list, Agedge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5mz4ehypkf3qcceorma37u4o3"); // edgelistitem temp; UNSUPPORTED("9ux5w93i4ironqiyms86u2lmg"); // temp.edge = e; UNSUPPORTED("3gjvpmqetnm6nonhtfkdatcmn"); // (*(((Dt_t*)(list))->searchf))((list),(void*)(&temp),0000002); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7e8iajy59wdlj5qbl2szrnj87 // int size_edgelist(edgelist * list) public static Object size_edgelist(Object... arg) { UNSUPPORTED("ovhqdnpxyvdbmwdqi76epfly"); // int size_edgelist(edgelist * list) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a0c7a03jtehhu1ndk4myhpzma"); // return dtsize(list); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/circogen/nodelist__c.java000066400000000000000000001044761312650303100227160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.circogen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class nodelist__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dtvicq2fjah66wz933ioh4bh2 // static nodelistitem_t *init_nodelistitem(Agnode_t * n) public static Object init_nodelistitem(Object... arg) { UNSUPPORTED("cppsm8li6xhe2nfca5h9hc35s"); // static nodelistitem_t *init_nodelistitem(Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a81qmm3v9xj9l8nrqdopeg5x1"); // nodelistitem_t *p = (nodelistitem_t*)zmalloc(sizeof(nodelistitem_t)); UNSUPPORTED("dgfcptwn9m7o8i9r1b9xvngzy"); // p->curr = n; UNSUPPORTED("91xduilalb406jjyw2g1i07th"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dy4cfo30aqhqfs9ohp0qrn7fu // nodelist_t *mkNodelist() public static Object mkNodelist(Object... arg) { UNSUPPORTED("czt31m4nlpmyzl2714h6vy9wu"); // nodelist_t *mkNodelist() UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8b2hcjxxfs3fupuecrnixuljm"); // nodelist_t *list = (nodelist_t*)zmalloc(sizeof(nodelist_t)); UNSUPPORTED("1a5vgaasp2bunvu19mvepzcny"); // return list; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ani6po8xj4sxqbhdawzmq8251 // void freeNodelist(nodelist_t * list) public static Object freeNodelist(Object... arg) { UNSUPPORTED("dfgd45o6wb4a2i7993nhfbpvg"); // void freeNodelist(nodelist_t * list) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("pa3zri6e03r37li0yvmybpg4"); // nodelistitem_t *temp; UNSUPPORTED("c6bl1xv56sveza6epjosbv1oj"); // nodelistitem_t *next; UNSUPPORTED("35qymiuzsxbel5wazqnch2eqy"); // if (!list) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("cq9fd6hdrk5i2d37kpjha3qrq"); // for (temp = list->first; temp; temp = next) { UNSUPPORTED("dkag6uuiaeylf8agl944h05pb"); // next = temp->next; UNSUPPORTED("ahlgfjly01f5ug0y9pa2ajm6i"); // free(temp); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("77gdlnaiah901ax125wm0qh80"); // free(list); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bzpmqsej7l7xiqisk32bw2zm8 // void appendNodelist(nodelist_t * list, nodelistitem_t * one, Agnode_t * n) public static Object appendNodelist(Object... arg) { UNSUPPORTED("8yvpsepddhtbarkxefc50dm1h"); // void appendNodelist(nodelist_t * list, nodelistitem_t * one, Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4iranqg9epblrgj1bzf4x4xbv"); // nodelistitem_t *np = init_nodelistitem(n); UNSUPPORTED("3khggq4ry681ql90ves4iwmto"); // list->sz++; UNSUPPORTED("cgb1s2cixxv6xguzmcfhke7dj"); // if (!one) UNSUPPORTED("ii36llbqruzbw1jtya2ee80y"); // one = list->last; UNSUPPORTED("2lje4v7acqxe7g8zjwc2sqica"); // if (one == list->last) { UNSUPPORTED("6o2129m3tutp76nyfcwp605xq"); // if (one) UNSUPPORTED("76hhn52ngdrr2tjdvcbh751r"); // one->next = np; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("7jm6wxh1nz1zzdnbe6acf2bwu"); // list->first = np; UNSUPPORTED("7gfo2ikm6jikpp4r8zdshyabs"); // np->prev = one; UNSUPPORTED("1xr19fxblzroful8ndn0u83zq"); // np->next = NULL; UNSUPPORTED("24wk90ztjjugjmfnnklcx35hx"); // list->last = np; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("drtfyjrp7u51ma7hu4owbox4y"); // nodelistitem_t *temp = one->next; UNSUPPORTED("189hobyq8t73opjr6qzhjp8iz"); // one->next = np; UNSUPPORTED("7gfo2ikm6jikpp4r8zdshyabs"); // np->prev = one; UNSUPPORTED("19s0nm1mqdyd4k94v7574crf1"); // temp->prev = np; UNSUPPORTED("adyo2r5ry9iybnj962fi9s2lx"); // np->next = temp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ctsccyqeaa9wecrwozla2ksu1 // nodelist_t *reverseNodelist(nodelist_t * list) public static Object reverseNodelist(Object... arg) { UNSUPPORTED("6g1dv3qe875isiu5iwy67xcox"); // nodelist_t *reverseNodelist(nodelist_t * list) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("pa3zri6e03r37li0yvmybpg4"); // nodelistitem_t *temp; UNSUPPORTED("5nxbag6j6mm7x1s5lcxx4yduv"); // nodelistitem_t *p; UNSUPPORTED("dgmoklrjltys555ns5u1guhlc"); // for (p = list->first; p; p = p->prev) { UNSUPPORTED("13rcpao1mnwjyegxg4am7xcfk"); // temp = p->next; UNSUPPORTED("cpbjg01gslnulx45hhu9laqkq"); // p->next = p->prev; UNSUPPORTED("oky4e50byjbs4i1b2ryzxldd"); // p->prev = temp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("86r2uoo76jcwz7tegpylhu6hj"); // temp = list->last; UNSUPPORTED("qsi5a1a5iu7ucnu30kwcdlyq"); // list->last = list->first; UNSUPPORTED("4jyx9h2dzuqwc2lw74af56n8q"); // list->first = temp; UNSUPPORTED("1a5vgaasp2bunvu19mvepzcny"); // return list; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 af9x62teargqqy8dz9adaj72s // void realignNodelist(nodelist_t * list, nodelistitem_t * np) public static Object realignNodelist(Object... arg) { UNSUPPORTED("1tadjwwe46zric2aoph7y61gs"); // void realignNodelist(nodelist_t * list, nodelistitem_t * np) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("pa3zri6e03r37li0yvmybpg4"); // nodelistitem_t *temp; UNSUPPORTED("b0lfbtcbms9p2h7g8ps8ssz4k"); // nodelistitem_t *prev; UNSUPPORTED("5blj9eu4g4s75yfeqzyik4z8w"); // if (np == list->first) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("9pbvnj7ksi5hm9yp64vshl4n2"); // temp = list->first; UNSUPPORTED("9xeibemdh2ufq2ugwmdbkdfc8"); // prev = np->prev; UNSUPPORTED("emjbf0ldol95uuq5s5ewx07pa"); // list->first = np; UNSUPPORTED("9m9ukxgb5qeidz5dbtl9rtxyn"); // np->prev = NULL; UNSUPPORTED("ddjypr6ls3rjoapphnj80yk8j"); // list->last->next = temp; UNSUPPORTED("8n6y5ljrux6tk4ois15gwc3ud"); // temp->prev = list->last; UNSUPPORTED("5ta19ur7mycgypllf3zhq2f7t"); // list->last = prev; UNSUPPORTED("6xwhww8e9rdm0um5baaabdyw2"); // prev->next = NULL; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bknx0j43q6gqf020gmb5mk2g3 // nodelist_t *cloneNodelist(nodelist_t * list) public static Object cloneNodelist(Object... arg) { UNSUPPORTED("chwajviesvyazqfya8zcqw9pa"); // nodelist_t *cloneNodelist(nodelist_t * list) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("49lh14x9cdmmo85yn8bljp09o"); // nodelist_t *newlist = mkNodelist(); UNSUPPORTED("pa3zri6e03r37li0yvmybpg4"); // nodelistitem_t *temp; UNSUPPORTED("5csialohxa4l0l6lraa54rmd4"); // nodelistitem_t *prev = 0; UNSUPPORTED("45mgdorn59qcesu3x01ksl67c"); // for (temp = list->first; temp; temp = temp->next) { UNSUPPORTED("ggy4iialzsdom3scvl3ix7vn"); // appendNodelist(newlist, prev, temp->curr); UNSUPPORTED("6xavzw9y8t22iaihjhb327nyz"); // prev = newlist->last; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7e0gcw4mhuz5knrmxh84mikwr"); // return newlist; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9st8dsjp6370v1ctv6tc4q47 // void insertNodelist(nodelist_t * list, Agnode_t * cn, Agnode_t * neighbor, int pos) public static Object insertNodelist(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("2lza3k61gsci4pfghoqrm2apj"); // insertNodelist(nodelist_t * list, Agnode_t * cn, Agnode_t * neighbor, UNSUPPORTED("9969ggdyyy9qaur8aysp582wn"); // int pos) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("pa3zri6e03r37li0yvmybpg4"); // nodelistitem_t *temp; UNSUPPORTED("b0lfbtcbms9p2h7g8ps8ssz4k"); // nodelistitem_t *prev; UNSUPPORTED("c6bl1xv56sveza6epjosbv1oj"); // nodelistitem_t *next; UNSUPPORTED("6w96lik5dx405g2u9ld3a945i"); // nodelistitem_t *actual = 0; UNSUPPORTED("45mgdorn59qcesu3x01ksl67c"); // for (temp = list->first; temp; temp = temp->next) { UNSUPPORTED("c7rv3ap37bgop5z5dny0hewms"); // if (temp->curr == cn) { UNSUPPORTED("5qyuo5c4mgehfy3ggqlhubahi"); // actual = temp; UNSUPPORTED("lmiaqjil1ebd2s0own6tv1g3"); // prev = actual->prev; UNSUPPORTED("e11p9bzk9vmkzp6ioie4ym9be"); // next = actual->next; UNSUPPORTED("7itpb16oyinejl2bkuba1jo8b"); // if (prev) /* not first */ UNSUPPORTED("97nmcjqjguhnn2yp36k9lnavv"); // prev->next = next; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("2q3wh8f7xp879s4g1ksfxwau5"); // list->first = next; UNSUPPORTED("1l5eba0k2sfypru0g3jfpbaam"); // if (next) /* not last */ UNSUPPORTED("4ybg9mys8i2ml9jsa8xmj62c5"); // next->prev = prev; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("dorc8lvahip1l8che0g88yyzw"); // list->last = prev; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bx05lgxs331md9fie0wesuvap"); // assert(actual); UNSUPPORTED("9pg1u5lrva4tjoa207r87y7uu"); // prev = NULL; UNSUPPORTED("45mgdorn59qcesu3x01ksl67c"); // for (temp = list->first; temp; temp = temp->next) { UNSUPPORTED("66w0tvg4s2lxiscws77pv2vjz"); // if (temp->curr == neighbor) { UNSUPPORTED("9fhgx695e7k9wnez4245dfdsb"); // if (pos == 0) { UNSUPPORTED("9oeoke5lzd4ljfeh4g7nqbruq"); // if (temp == list->first) { UNSUPPORTED("2bui4chbceam8ff4fjcvzygkf"); // list->first = actual; UNSUPPORTED("6hto5cvdur2emyfneplidb71m"); // actual->next = temp; UNSUPPORTED("81jvm012c1ipk41dfemx9ewuf"); // actual->prev = NULL; UNSUPPORTED("ddmhucj8hk31d4s1w9omtylrz"); // temp->prev = actual; UNSUPPORTED("46hqh1l8dmimisi2nr03ntomn"); // return; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("elrbl0s6gcjiksecuyv4cwlrw"); // prev->next = actual; UNSUPPORTED("33ng2zf79ee91w58r5kpq90gt"); // actual->prev = prev; UNSUPPORTED("cc0to99z5maq2xnjhudfr5o70"); // actual->next = temp; UNSUPPORTED("8abdi4757pva6bgf2i8xlx185"); // temp->prev = actual; UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("ccdv56be5vthenta387vrn1qr"); // if (temp == list->last) { UNSUPPORTED("48aigcr040halrvm3i4d0krx9"); // list->last = actual; UNSUPPORTED("49xd4a7j75bfcwd3lfr2r75ud"); // actual->next = NULL; UNSUPPORTED("bir7bd59frh7n7n26s0f9q1x3"); // actual->prev = temp; UNSUPPORTED("3w4qk4r0u8s7lzijxjot851ef"); // temp->next = actual; UNSUPPORTED("46hqh1l8dmimisi2nr03ntomn"); // return; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("4bi759cy3ujnnd0eiv920n5v0"); // actual->prev = temp; UNSUPPORTED("bh2fcn9ayoiebx80yo7p43d1i"); // actual->next = temp->next; UNSUPPORTED("c99hxdonxolbe50cscuoi2y00"); // temp->next->prev = actual; UNSUPPORTED("35b7fo9lcqnhoglg99yc2kpd0"); // temp->next = actual; UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("45r3mykwgd2rl2mbaem3fhd09"); // prev = temp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3acdwz7swl5xiaa4deeffslb2 // int sizeNodelist(nodelist_t * list) public static Object sizeNodelist(Object... arg) { UNSUPPORTED("az6xj0b4g7rrv5wk4ienryz07"); // int sizeNodelist(nodelist_t * list) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("30o3t71m1veta2ztp8qeny0jg"); // return list->sz; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7vwgwolpyeakgeadjc38vro7u // int node_position(nodelist_t * list, Agnode_t * n) public static Object node_position(Object... arg) { UNSUPPORTED("49384gvfui8kk87uo1hvm6jus"); // int node_position(nodelist_t * list, Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("chetbysouusnjyid1ehspawij"); // return (((cdata*)(ND_alg(n)))->u.f.pos); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d6risaxfqb2wnfu7t64z2qlhv // static void concatNodelist(nodelist_t * l1, nodelist_t * l2) public static Object concatNodelist(Object... arg) { UNSUPPORTED("crqjl1cf4fhimn7a2kq8j7ktq"); // static void concatNodelist(nodelist_t * l1, nodelist_t * l2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("23s2d45xl329cxf5vszbyqum2"); // if (l2->first) { UNSUPPORTED("94su581vwu985fxc3b3fsn0db"); // if (l2->first) { UNSUPPORTED("1ynd953ypkhiqrl4nheca01f0"); // l1->last->next = l2->first; UNSUPPORTED("8isrj1p6vyp0ibaeneexjpr3k"); // l2->first->prev = l1->last; UNSUPPORTED("lrue5uyjqn248q4hn96a2tyr"); // l1->last = l2->last; UNSUPPORTED("3hgnhs33erfrulx6incku34ma"); // l1->sz += l2->sz; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("9zzlp61k5udwshnz984m6k1za"); // *l1 = *l2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bp2bbcnbcxxxpxg843u1hyonh // void reverseAppend(nodelist_t * l1, nodelist_t * l2) public static Object reverseAppend(Object... arg) { UNSUPPORTED("wj6n5ch1rmqne3qxotl515tp"); // void reverseAppend(nodelist_t * l1, nodelist_t * l2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f2kglvjqspzbssrc0t5gqounl"); // l2 = reverseNodelist(l2); UNSUPPORTED("crnlco3s0jlkrli5fzm8s9rny"); // concatNodelist(l1, l2); UNSUPPORTED("e3lo2nmmrc9efrwoifxg3z4bp"); // free(l2); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/circogen/nodeset__c.java000066400000000000000000000653061312650303100225340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.circogen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class nodeset__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 39duc9sgnnz7xqy8c1hhno72b // typedef Dt_t nodeset_t //3 62459jnnxbav2c5hcep7v85nb // static nsitem_t *mkItem(Dt_t * d, nsitem_t * obj, Dtdisc_t * disc) public static Object mkItem(Object... arg) { UNSUPPORTED("bsbgshly9fnfkjkq1j8wzgf6v"); // static nsitem_t *mkItem(Dt_t * d, nsitem_t * obj, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4dsr793q1dbnq4jof60oe0a1x"); // nsitem_t *ap = (nsitem_t*)gmalloc(sizeof(nsitem_t)); UNSUPPORTED("2a3snjof794fbvtns64g1oydj"); // ap->np = obj->np; UNSUPPORTED("b8cimfvcp1vea97hyfr4m9nix"); // return ap; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c5n5x0ad5kdzzfdcyn4jk60uk // static void freeItem(Dt_t * d, nsitem_t * obj, Dtdisc_t * disc) public static Object freeItem(Object... arg) { UNSUPPORTED("4ynix280v14ql47zkf5nhsqjo"); // static void freeItem(Dt_t * d, nsitem_t * obj, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8are8jqzwfj87yj4tkaohi3tf"); // free(obj); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 75pqi5jto64y7vf5woibc7we7 // static int cmpItem(Dt_t * d, Agnode_t ** key1, Agnode_t ** key2, Dtdisc_t * disc) public static Object cmpItem(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("23scptyfqg3min3jegzkmsba5"); // cmpItem(Dt_t * d, Agnode_t ** key1, Agnode_t ** key2, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7utf654gwt7egdzz3hm89nlxl"); // if (*key1 > *key2) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("6upfe9100usb1lfxsl7la30s7"); // else if (*key1 < *key2) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 54whed6ufxjlmpxj9tx6zqlbx // static Dtdisc_t nodeDisc = //3 450ov2obe7vcg7jy4mdrs1kq6 // nodeset_t *mkNodeset() public static Object mkNodeset(Object... arg) { UNSUPPORTED("2zeou2lmth8zxf98spohfevn9"); // nodeset_t *mkNodeset() UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7w5u5wrm21t7ngnd9pe778h25"); // nodeset_t *s = dtopen(&nodeDisc, Dtoset); UNSUPPORTED("3y6wj3ntgmr1qkdpm7wp1dsch"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clbr7gnx6ka3lhe7su6lm9txj // void freeNodeset(nodeset_t * s) public static Object freeNodeset(Object... arg) { UNSUPPORTED("grtt180bkqajtt8903kd4w3w"); // void freeNodeset(nodeset_t * s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2tsp1c0clxcfselstsr54hnrg"); // if (s != NULL) UNSUPPORTED("8ozn8claiw8jsksr2w5j0028i"); // dtclose(s); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4ruhmyhymnmhpz0b78gk3dya // void clearNodeset(nodeset_t * s) public static Object clearNodeset(Object... arg) { UNSUPPORTED("5af7s6p6nj71jacraqx9oerps"); // void clearNodeset(nodeset_t * s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8idvqx73jm5c6q3x6qk0uuv33"); // (*(((Dt_t*)(s))->searchf))((s),(void*)(0),0000100); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c5x2cnob455a31zsm30tmlmqc // void insertNodeset(nodeset_t * ns, Agnode_t * n) public static Object insertNodeset(Object... arg) { UNSUPPORTED("dctuhmh9290ltkzbol4v2c181"); // void insertNodeset(nodeset_t * ns, Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b6eq7i5dup9xp7pea447e40j4"); // nsitem_t key; UNSUPPORTED("4sacr2xzpt0z7lm5tpdtj5o2e"); // key.np = n; UNSUPPORTED("adp8kv3cgemc8cu7fohblmj0f"); // (*(((Dt_t*)(ns))->searchf))((ns),(void*)(&key),0000001); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e0ghryzmt0b0d3blwtyi1t6is // void removeNodeset(nodeset_t * ns, Agnode_t * n) public static Object removeNodeset(Object... arg) { UNSUPPORTED("7vkqkt69zioljaapauhoi7zxt"); // void removeNodeset(nodeset_t * ns, Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b6eq7i5dup9xp7pea447e40j4"); // nsitem_t key; UNSUPPORTED("4sacr2xzpt0z7lm5tpdtj5o2e"); // key.np = n; UNSUPPORTED("4ncqgz69861d8ismpkbjmad92"); // (*(((Dt_t*)(ns))->searchf))((ns),(void*)(&key),0000002); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 q9vubw6u2jkstxm4emkzpxtu // int sizeNodeset(nodeset_t * ns) public static Object sizeNodeset(Object... arg) { UNSUPPORTED("2a1aiss2f5k7z2sowpoo65ojd"); // int sizeNodeset(nodeset_t * ns) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7xkm2ev66k4ilje9ec4lpq6ad"); // return dtsize(ns); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5os2x3unmsneajs4xd4i1jkxp // void printNodeset(nodeset_t * ns) public static Object printNodeset(Object... arg) { UNSUPPORTED("a8uozjs0q7y2pa14d9yqrbk6s"); // void printNodeset(nodeset_t * ns) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9ha1577re7zue762z6qi4xtgd"); // nsitem_t *ip; UNSUPPORTED("1nnn5fn3otojyadjlfyivf1bo"); // for (ip = (nsitem_t *) (*(((Dt_t*)(ns))->searchf))((ns),(void*)(0),0000200); ip; UNSUPPORTED("dote9fxh3agqvjxns586ln04c"); // ip = (nsitem_t *) (*(((Dt_t*)(ns))->searchf))((ns),(void*)(ip),0000010)) { UNSUPPORTED("9qkbnrn10w82tq2g5boqlixvv"); // fprintf(stderr, "%s", agnameof(ip->np)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c95k2u5egba0bgdcr1c8inc4e"); // fputs("\n", stderr); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/000077500000000000000000000000001312650303100172545ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/lib/common/args__c.java000066400000000000000000001077211312650303100215240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class args__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4bf9buvykusqzi4629qwmbd2x // static int neato_extra_args(GVC_t *gvc, int argc, char** argv) public static Object neato_extra_args(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("esa1s702otdlr6702fn7wstuz"); // neato_extra_args(GVC_t *gvc, int argc, char** argv) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("vchrmawq91kb0ii45yhrwq9"); // char** p = argv+1; UNSUPPORTED("29u9nk1nrupcw2j8c7qe5glz7"); // int i; UNSUPPORTED("dqwks39qtsnmvslaj3igd3y27"); // char* arg; UNSUPPORTED("b153u7kyw153reyniefayrq6n"); // int cnt = 1; UNSUPPORTED("dm1yusgl0wehpupm0jpt4whpr"); // for (i = 1; i < argc; i++) { UNSUPPORTED("7yfqt2sdvyf0czltsldtzxf02"); // arg = argv[i]; UNSUPPORTED("78ho9iw8bl94i74str8zdbor8"); // if (arg && *arg == '-') { UNSUPPORTED("52y2apnsdpil1r7ibzx11pfwq"); // switch (arg[1]) { UNSUPPORTED("1xmmmvijo8yqys8w1l7equ9bh"); // case 'x' : Reduce = NOT(0); break; UNSUPPORTED("np1uxcrfeypdcuwqmi7i4srq"); // case 'n': UNSUPPORTED("9sjpw2ts0x0qu27cc7xgcoc36"); // if (arg[2]) { UNSUPPORTED("c45q8u35p73iqi4c2x1tt50s7"); // Nop = atoi(arg+2); UNSUPPORTED("e7kh2ktytt7wqgsocz9cktts3"); // if (Nop <= 0) { UNSUPPORTED("1yk7tr54pd4zonqofo51220c5"); // agerr (AGERR, "Invalid parameter \"%s\" for -n flag\n", arg+2); UNSUPPORTED("d48xlsgsi8ksecguxhnr5gpr6"); // dotneato_usage (1); UNSUPPORTED("aivfd7ajlfz8o8oi68d4u5s5z"); // return -1; UNSUPPORTED("4v3ujrl58y59e7pqk0ke5t564"); // } UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("296pjg5wdjsxjiyr8ajjrb5er"); // else Nop = 1; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("63dmlsq766n7ojce42s6jvgyv"); // default : UNSUPPORTED("77mslev6fngkh87g2jkd6j87j"); // cnt++; UNSUPPORTED("6fllt9icceu2ygmiz84j3ls10"); // if (*p != arg) *p = arg; UNSUPPORTED("5ms90gds9d7jyok5oqzrumfjz"); // p++; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("dquo3qofk56ds5xl95lhvcthf"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("cqtmxcio96sfpr9cmw4ukg3op"); // cnt++; UNSUPPORTED("5436ztz7fh7w1wa56xdldkwxj"); // if (*p != arg) *p = arg; UNSUPPORTED("broludtxg204vlgctqigehzxi"); // p++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("23w7qifugn1eere89tsewk6tp"); // *p = 0; UNSUPPORTED("aux4g6wms30ow0s96grtfcsba"); // return cnt; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8p7j205ggerm803oa23gkc2g8 // static int memtest_extra_args(GVC_t *gvc, int argc, char** argv) public static Object memtest_extra_args(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("7do955i8h8cmq6xw2d40dfrcs"); // memtest_extra_args(GVC_t *gvc, int argc, char** argv) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("vchrmawq91kb0ii45yhrwq9"); // char** p = argv+1; UNSUPPORTED("29u9nk1nrupcw2j8c7qe5glz7"); // int i; UNSUPPORTED("dqwks39qtsnmvslaj3igd3y27"); // char* arg; UNSUPPORTED("b153u7kyw153reyniefayrq6n"); // int cnt = 1; UNSUPPORTED("dm1yusgl0wehpupm0jpt4whpr"); // for (i = 1; i < argc; i++) { UNSUPPORTED("7yfqt2sdvyf0czltsldtzxf02"); // arg = argv[i]; UNSUPPORTED("78ho9iw8bl94i74str8zdbor8"); // if (arg && *arg == '-') { UNSUPPORTED("52y2apnsdpil1r7ibzx11pfwq"); // switch (arg[1]) { UNSUPPORTED("9zx51b0tqpm98tv6whinwsaf4"); // case 'm' : UNSUPPORTED("9sjpw2ts0x0qu27cc7xgcoc36"); // if (arg[2]) { UNSUPPORTED("bk5spyi1l39jkjsb3vbxzm3zv"); // MemTest = atoi(arg+2); UNSUPPORTED("3xb2rjjaiqbjuir0amd6fb25g"); // if (MemTest <= 0) { UNSUPPORTED("a1lgwp8e8pwhm57ony6wojcxk"); // agerr (AGERR, "Invalid parameter \"%s\" for -m flag\n", arg+2); UNSUPPORTED("d48xlsgsi8ksecguxhnr5gpr6"); // dotneato_usage (1); UNSUPPORTED("aivfd7ajlfz8o8oi68d4u5s5z"); // return -1; UNSUPPORTED("4v3ujrl58y59e7pqk0ke5t564"); // } UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("9fb91rfixm2s211ep1iptout"); // else MemTest = -1; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("63dmlsq766n7ojce42s6jvgyv"); // default : UNSUPPORTED("77mslev6fngkh87g2jkd6j87j"); // cnt++; UNSUPPORTED("6fllt9icceu2ygmiz84j3ls10"); // if (*p != arg) *p = arg; UNSUPPORTED("5ms90gds9d7jyok5oqzrumfjz"); // p++; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("dquo3qofk56ds5xl95lhvcthf"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("cqtmxcio96sfpr9cmw4ukg3op"); // cnt++; UNSUPPORTED("5436ztz7fh7w1wa56xdldkwxj"); // if (*p != arg) *p = arg; UNSUPPORTED("broludtxg204vlgctqigehzxi"); // p++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("23w7qifugn1eere89tsewk6tp"); // *p = 0; UNSUPPORTED("aux4g6wms30ow0s96grtfcsba"); // return cnt; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5vvap3kfi3ewk4onfchidrfmz // static int config_extra_args(GVC_t *gvc, int argc, char** argv) public static Object config_extra_args(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("36f9jhc4e06p98qfdd1h9db62"); // config_extra_args(GVC_t *gvc, int argc, char** argv) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("vchrmawq91kb0ii45yhrwq9"); // char** p = argv+1; UNSUPPORTED("29u9nk1nrupcw2j8c7qe5glz7"); // int i; UNSUPPORTED("dqwks39qtsnmvslaj3igd3y27"); // char* arg; UNSUPPORTED("b153u7kyw153reyniefayrq6n"); // int cnt = 1; UNSUPPORTED("dm1yusgl0wehpupm0jpt4whpr"); // for (i = 1; i < argc; i++) { UNSUPPORTED("7yfqt2sdvyf0czltsldtzxf02"); // arg = argv[i]; UNSUPPORTED("78ho9iw8bl94i74str8zdbor8"); // if (arg && *arg == '-') { UNSUPPORTED("52y2apnsdpil1r7ibzx11pfwq"); // switch (arg[1]) { UNSUPPORTED("8hve8n5micl5wbpbe4s6tx91r"); // case 'v': UNSUPPORTED("1i5rkr1j6m4qjh4p7ccv160tb"); // gvc->common.verbose = 1; UNSUPPORTED("braofjgdk57w4vybhk2d5lf74"); // if (isdigit(arg[2])) UNSUPPORTED("eh4a9je8p9cc5237lmw5bge42"); // gvc->common.verbose = atoi(&arg[2]); UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("w7w6iggiak86ob87592vfsc6"); // case 'O' : UNSUPPORTED("dy3as4a2z79xr2yy9ruo7pvgr"); // gvc->common.auto_outfile_names = NOT(0); UNSUPPORTED("5tzm1n3i8u3c1oms5ri2fiqbt"); // break; UNSUPPORTED("28vj8fdgz2qg6391cwrl0oz21"); // case 'c' : UNSUPPORTED("63ui3zhby8bmj2wg0fn2q96xj"); // gvc->common.config = NOT(0); UNSUPPORTED("5tzm1n3i8u3c1oms5ri2fiqbt"); // break; UNSUPPORTED("63dmlsq766n7ojce42s6jvgyv"); // default : UNSUPPORTED("77mslev6fngkh87g2jkd6j87j"); // cnt++; UNSUPPORTED("6fllt9icceu2ygmiz84j3ls10"); // if (*p != arg) *p = arg; UNSUPPORTED("5ms90gds9d7jyok5oqzrumfjz"); // p++; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("dquo3qofk56ds5xl95lhvcthf"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("cqtmxcio96sfpr9cmw4ukg3op"); // cnt++; UNSUPPORTED("5436ztz7fh7w1wa56xdldkwxj"); // if (*p != arg) *p = arg; UNSUPPORTED("broludtxg204vlgctqigehzxi"); // p++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("23w7qifugn1eere89tsewk6tp"); // *p = 0; UNSUPPORTED("aux4g6wms30ow0s96grtfcsba"); // return cnt; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 f1dd7gkq4wmnxg8hs236lk99y // static int setDouble (double* v, char* arg) public static Object setDouble(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("de23ht5iyfmjr52eufndqvviw"); // setDouble (double* v, char* arg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1vp9ctqomm1prbzfcw3iekjae"); // char* p; UNSUPPORTED("2di4na9yg012kjr64hp3x0c0f"); // double d; UNSUPPORTED("5chu16helmcmihc2ulr2kxgzr"); // d = strtod(arg,&p); UNSUPPORTED("1sa25jtazj7gwvr1kvphkc3dh"); // if (p == arg) { UNSUPPORTED("a23t2j8ukgpd3n7ubqpa5gccj"); // agerr (AGERR, "bad value in flag -L%s - ignored\n", arg-1); UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("9vlugsd3snak94gf05cwvnrr2"); // *v = d; UNSUPPORTED("bid671dovx1rdiquw5vm3fttj"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4gmf2emr89qdx3aqmaplne0k // static int setInt (int* v, char* arg) public static Object setInt(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("1ia068nvginu2yhs188oo991p"); // setInt (int* v, char* arg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1vp9ctqomm1prbzfcw3iekjae"); // char* p; UNSUPPORTED("63myvfqx2n5qchb2xsnadn2t3"); // int i; UNSUPPORTED("6tenu6ts0talbe25gqrp1boie"); // i = (int)strtol(arg,&p,10); UNSUPPORTED("1sa25jtazj7gwvr1kvphkc3dh"); // if (p == arg) { UNSUPPORTED("a23t2j8ukgpd3n7ubqpa5gccj"); // agerr (AGERR, "bad value in flag -L%s - ignored\n", arg-1); UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("3zdv2wxd4wuyb443w3ewc4tud"); // *v = i; UNSUPPORTED("bid671dovx1rdiquw5vm3fttj"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6150ojro4hufw87jc6pvq95dd // static int setFDPAttr (char* arg) public static Object setFDPAttr(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("bjhn85lnzdoq1133w83naducd"); // setFDPAttr (char* arg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("adal17qy2p2c2udfjdup5jcd8"); // switch (*arg++) { UNSUPPORTED("ewho1c3gx6n1smztwz6delx7f"); // case 'g' : UNSUPPORTED("16d1qggixmwdtn8d7fhnwln0u"); // fdp_parms->useGrid = 0; UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("2fn9v8i1hgalj7sq7q8huppke"); // case 'O' : UNSUPPORTED("8hzafgbup3w08h2m9b6005vp2"); // fdp_parms->useNew = 0; UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("ehgiqxt9i5d239qrzougvanzh"); // case 'n' : UNSUPPORTED("5v7kadf0khrmtx1dldq0rpi98"); // if (setInt (&fdp_parms->numIters, arg)) return 1; UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("2d40s862frst4por3szi6iowz"); // case 'U' : UNSUPPORTED("8b2suxlh89glat5kihpuepbzn"); // if (setInt (&fdp_parms->unscaled, arg)) return 1; UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("7dcx28zgefkzakfiqddjd4twc"); // case 'C' : UNSUPPORTED("2552dgdsp464ukyu0ul3iu8rr"); // if (setDouble (&fdp_parms->C, arg)) return 1; UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("3sutcnfx01z7382cib3gkfhht"); // case 'T' : UNSUPPORTED("45zugi5wky945tib5vhd1x21y"); // if (*arg == '*') { UNSUPPORTED("6iuiou1xlsam1m2a03r5hrp07"); // if (setDouble (&fdp_parms->Tfact, arg+1)) return 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("4kdlxsp3dqepnmerxanmtbvdi"); // if (setDouble (&fdp_parms->T0, arg)) return 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("ao6hmye4t5tgve7qeyo667z6m"); // default : UNSUPPORTED("bcdblpxa0h1d0z47irwzxw9p5"); // agerr (AGWARN, "unknown flag -L%s - ignored\n", arg-1); UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("bid671dovx1rdiquw5vm3fttj"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3vun3scvr1a4wzvyc881vq03y // static int fdp_extra_args (GVC_t *gvc, int argc, char** argv) public static Object fdp_extra_args(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("2mn97djxh0musn36mr9yc0fsu"); // fdp_extra_args (GVC_t *gvc, int argc, char** argv) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("vchrmawq91kb0ii45yhrwq9"); // char** p = argv+1; UNSUPPORTED("29u9nk1nrupcw2j8c7qe5glz7"); // int i; UNSUPPORTED("dqwks39qtsnmvslaj3igd3y27"); // char* arg; UNSUPPORTED("b153u7kyw153reyniefayrq6n"); // int cnt = 1; UNSUPPORTED("dm1yusgl0wehpupm0jpt4whpr"); // for (i = 1; i < argc; i++) { UNSUPPORTED("7yfqt2sdvyf0czltsldtzxf02"); // arg = argv[i]; UNSUPPORTED("ef9qwa3dgutydp4p7luyr2bc6"); // if (arg && (*arg == '-') && (*(arg+1) == 'L')) { UNSUPPORTED("5kylq06joc45h90diw5jw7ltf"); // if (setFDPAttr (arg+2)) { UNSUPPORTED("3336x5ydlp3mcvrtiyxeh97kg"); // dotneato_usage(1); UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("dquo3qofk56ds5xl95lhvcthf"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("cqtmxcio96sfpr9cmw4ukg3op"); // cnt++; UNSUPPORTED("5436ztz7fh7w1wa56xdldkwxj"); // if (*p != arg) *p = arg; UNSUPPORTED("broludtxg204vlgctqigehzxi"); // p++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("23w7qifugn1eere89tsewk6tp"); // *p = 0; UNSUPPORTED("aux4g6wms30ow0s96grtfcsba"); // return cnt; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5xe1appewv62gtmkzdjzib7mr // int gvParseArgs(GVC_t *gvc, int argc, char** argv) public static Object gvParseArgs(Object... arg) { UNSUPPORTED("9wm868oq7vnqwr4h9g3qwpp70"); // int gvParseArgs(GVC_t *gvc, int argc, char** argv) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ecz4e03zumggc8tfymqvirexq"); // int rv; UNSUPPORTED("1adiibcyzt5tbvoqh5dcoed4x"); // if ((argc = neato_extra_args(gvc, argc, argv)) < 0) UNSUPPORTED("9ha9lxje55wyq89xmlikm85qw"); // return (1-argc); UNSUPPORTED("9khladgfiv87rrhd2orifedvf"); // if ((argc = fdp_extra_args(gvc, argc, argv)) < 0) UNSUPPORTED("9ha9lxje55wyq89xmlikm85qw"); // return (1-argc); UNSUPPORTED("bw180d61ya05twg120nytatvc"); // if ((argc = memtest_extra_args(gvc, argc, argv)) < 0) UNSUPPORTED("9ha9lxje55wyq89xmlikm85qw"); // return (1-argc); UNSUPPORTED("3ardghom15gc1fi8iffbnxvo8"); // if ((argc = config_extra_args(gvc, argc, argv)) < 0) UNSUPPORTED("9ha9lxje55wyq89xmlikm85qw"); // return (1-argc); UNSUPPORTED("7ch594ljf53kf7khsyl2f7fd5"); // if ((rv = dotneato_args_initialize(gvc, argc, argv))) UNSUPPORTED("cs1ejkx9cw658cl8cagdzqrzm"); // return rv; UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); // if (Verbose) UNSUPPORTED("8xq126b3a0ygzs1b8d52hvvhm"); // gvplugin_write_status(gvc); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/arrows__c.java000066400000000000000000001772411312650303100221110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static gen.lib.cgraph.attr__c.agxget; import static gen.lib.cgraph.graph__c.agisdirected; import static gen.lib.cgraph.obj__c.agraphof; import static gen.lib.common.splines__c.bezier_clip; import static gen.lib.common.utils__c.late_double; import static smetana.core.JUtils.LOG2; import static smetana.core.JUtils.function; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.DIST2; import static smetana.core.Macro.ED_conc_opp_flag; import static smetana.core.Macro.NOT; import static smetana.core.Macro.UNSUPPORTED; import h.Agedge_s; import h.arrowdir_t; import h.bezier; import h.boxf; import h.inside_t; import h.pointf; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.MutableDouble; import smetana.core.Z; import smetana.core.__array_of_struct__; import smetana.core.__ptr__; import smetana.core.__struct__; public class arrows__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 8g6b12c9lhliz7wt1b4g6ol4q // static arrowdir_t Arrowdirs[] = //1 bh7utclfhqwp6bpy5c8g693wa // static arrowname_t Arrowsynonyms[] = /*private static final __array_of_struct__ Arrowsynonyms = __array_of_struct__.malloc(arrowname_t.class, 1); static { Arrowsynonyms.plus(0).setStruct(create_arrowname_t(null, 0)); }*/ //1 5yb25qm8n3hiqb86lalpa6q5n // static arrowname_t Arrowmods[] = /*private static final __array_of_struct__ Arrowmods = __array_of_struct__.malloc(arrowname_t.class, 1); static { Arrowmods.plus(0).setStruct(create_arrowname_t(null, 0)); }*/ //1 e8dhqbfo267go86knqiqq0dnv // static arrowname_t Arrownames[] = /*private static final __array_of_struct__ Arrownames = __array_of_struct__.malloc(arrowname_t.class, 3); static { Arrownames.plus(0).setStruct(create_arrowname_t("normal", 1)); Arrownames.plus(1).setStruct(create_arrowname_t("none", 8)); Arrownames.plus(2).setStruct(create_arrowname_t(null, 0)); } private final static __struct__ create_arrowname_t(String name, int type) { final __struct__ result = JUtils.from(arrowname_t.class); result.setCString("name", name==null?null:new CString(name)); result.setInt("type", type); return result; }*/ //1 dnirq5m2r8c2mep5o1m3cdn6d // static arrowtype_t Arrowtypes[] = /*private static final __array_of_struct__ Arrowtypes = __array_of_struct__.malloc(arrowtype_t.class, 9); static { Arrowtypes.plus(0).setStruct(createArrowtypes(1, 1.0, function(arrows__c.class, "arrow_type_normal"))); Arrowtypes.plus(1).setStruct(createArrowtypes(2, 1.0, function(arrows__c.class, "arrow_type_crow"))); Arrowtypes.plus(2).setStruct(createArrowtypes(3, 0.5, function(arrows__c.class, "arrow_type_tee"))); Arrowtypes.plus(3).setStruct(createArrowtypes(4, 1.0, function(arrows__c.class, "arrow_type_box"))); Arrowtypes.plus(4).setStruct(createArrowtypes(5, 1.2, function(arrows__c.class, "arrow_type_diamond"))); Arrowtypes.plus(5).setStruct(createArrowtypes(6, 0.8, function(arrows__c.class, "arrow_type_dot"))); Arrowtypes.plus(6).setStruct(createArrowtypes(7, 1.0, function(arrows__c.class, "arrow_type_curve"))); Arrowtypes.plus(7).setStruct(createArrowtypes(8, 0.5, function(arrows__c.class, "arrow_type_gap"))); Arrowtypes.plus(8).setStruct(createArrowtypes(0, 0.0, null)); } private final static __struct__ createArrowtypes(int type, double lenfact, CFunction function) { final __struct__ result = JUtils.from(arrowtype_t.class); result.setInt("type", type); result.setDouble("lenfact", lenfact); result.setPtr("gen", function); return result; }*/ //3 3apnay8wumntfkvud64ov7fcf // static char *arrow_match_name_frag(char *name, arrowname_t * arrownames, int *flag) public static CString arrow_match_name_frag(CString name, __array_of_struct__ arrownames, int flag[]) { ENTERING("3apnay8wumntfkvud64ov7fcf","arrow_match_name_frag"); try { UNSUPPORTED("cw8t22aa6zs16jqowqjjkzywg"); // static char *arrow_match_name_frag(char *name, arrowname_t * arrownames, int *flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ij5y28mkncrjeiqcpshx0eb6"); // arrowname_t *arrowname; UNSUPPORTED("1tn1krtup6qe1swed3vb7rsyl"); // int namelen = 0; UNSUPPORTED("c0vrdgjia18jvvw01f49sovz5"); // char *rest = name; UNSUPPORTED("ecwk85uixpdt1xvlwr1rw58a4"); // for (arrowname = arrownames; arrowname->name; arrowname++) { UNSUPPORTED("9h58czuqvp8q45izpqt7dzgi6"); // namelen = strlen(arrowname->name); UNSUPPORTED("9fd8hjdir8m00yuhi9anrrnos"); // if (strncmp(name, arrowname->name, namelen) == 0) { UNSUPPORTED("ag3b2jixanemgvefu1c01mp6u"); // *flag |= arrowname->type; UNSUPPORTED("1h43j4ja8m8uxuvay0jg33ukm"); // rest += namelen; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bbweh79ihpurvsz097xab3u5k"); // return rest; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("3apnay8wumntfkvud64ov7fcf","arrow_match_name_frag"); } } //3 b669zec8aznq4obnil98j5lby // static char *arrow_match_shape(char *name, int *flag) public static CString arrow_match_shape(CString name, int flag[]) { ENTERING("b669zec8aznq4obnil98j5lby","arrow_match_shape"); try { CString next, rest; int f[] = new int[] {0}; rest = arrow_match_name_frag(name, Z.z().Arrowsynonyms, f); UNSUPPORTED("304yfmlt3qwn4zydpx1hgmf5o"); // if (rest == name) { UNSUPPORTED("8vxyvy38lzpbd83cu26nejaan"); // do { UNSUPPORTED("do0zgfzipmk0sgv0q0u14es1c"); // next = rest; UNSUPPORTED("csdu3mgjv4ya6xqk2bisko4gp"); // rest = arrow_match_name_frag(next, Arrowmods, &f); UNSUPPORTED("17cxbrtqid90xrrl75cvyvhs5"); // } while (next != rest); UNSUPPORTED("9u4q5zwdkpdava55p9xyg8xph"); // rest = arrow_match_name_frag(rest, Arrownames, &f); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("98pvjlaju0ufz56v1jcwyelw6"); // if (f && !(f & ((1 << 4) - 1))) UNSUPPORTED("2mly07gipiope02mgflzcie3e"); // f |= 1; UNSUPPORTED("48w47t8z0k3lb7rxdlbd6n7p9"); // *flag |= f; UNSUPPORTED("bbweh79ihpurvsz097xab3u5k"); // return rest; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("b669zec8aznq4obnil98j5lby","arrow_match_shape"); } } //3 2pveqb5qcgfxcqp410ub942eg // static void arrow_match_name(char *name, int *flag) public static void arrow_match_name(CString name, int flag[]) { ENTERING("2pveqb5qcgfxcqp410ub942eg","arrow_match_name"); try { CString rest = name; CString next; int i, f; flag[0] = 0; LOG2("Skipping arrow_match_name"); } finally { LEAVING("2pveqb5qcgfxcqp410ub942eg","arrow_match_name"); } } //3 2szgwtfieaw58pea2ohjyu8ea // void arrow_flags(Agedge_t * e, int *sflag, int *eflag) public static void arrow_flags(Agedge_s e, int sflag[], int eflag[]) { ENTERING("2szgwtfieaw58pea2ohjyu8ea","arrow_flags"); try { CString attr; arrowdir_t arrowdir; sflag[0] = (0); eflag[0] = agisdirected(agraphof(e)) ? 1 : (0); if (Z.z().E_dir!=null && ((attr = agxget(e, Z.z().E_dir))).charAt(0)!='\0') { UNSUPPORTED("em7x45v09orjeey5u06gf9b4s"); // for (arrowdir = Arrowdirs; arrowdir->dir; arrowdir++) { UNSUPPORTED("dhaookuw0a1xqmh07lldcvlgi"); // if ((*(attr)==*(arrowdir->dir)&&!strcmp(attr,arrowdir->dir))) { UNSUPPORTED("1d32qbc447n7nmmvedj3bnhr4"); // *sflag = arrowdir->sflag; UNSUPPORTED("4bwlkonvn34iwi5ea1o8zov3o"); // *eflag = arrowdir->eflag; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } } if (Z.z().E_arrowhead!=null && (eflag[0] == 1) && ((attr = agxget(e,Z.z(). E_arrowhead))).charAt(0)!='\0') arrow_match_name(attr, eflag); if (Z.z().E_arrowtail!=null && (sflag[0] == 1) && ((attr = agxget(e, Z.z().E_arrowtail))).charAt(0)!='\0') arrow_match_name(attr, sflag); if (ED_conc_opp_flag(e)) { UNSUPPORTED("1p2usipxeqlorwroqo37t3yfy"); // edge_t *f; UNSUPPORTED("6ne3pu2bnhx6tyx81t4td4up6"); // int s0, e0; UNSUPPORTED("8vccx8sm1c228dqm7l1jm2hfs"); // /* pick up arrowhead of opposing edge */ UNSUPPORTED("cu21qrxyz93ly7l96af2gcsle"); // f = (agedge(agraphof(aghead(e)),aghead(e),agtail(e),NULL,0)); UNSUPPORTED("9u6scg3h7baww90tcykvjhajo"); // arrow_flags(f, &s0, &e0); UNSUPPORTED("157il4mnbenpon7knxfdb4fwb"); // *eflag = *eflag | s0; UNSUPPORTED("7wucod5xwp24vblpcbjbmmcq1"); // *sflag = *sflag | e0; } } finally { LEAVING("2szgwtfieaw58pea2ohjyu8ea","arrow_flags"); } } //3 1yk5wl46i7rlzcern0tefd24s // double arrow_length(edge_t * e, int flag) public static double arrow_length(Agedge_s e, int flag) { ENTERING("1yk5wl46i7rlzcern0tefd24s","arrow_length"); try { __ptr__ arrowtype; double lenfact = 0.0; int f, i; for (i = 0; i < 4; i++) { /* we don't simply index with flag because arrowtypes are not necessarily sorted */ f = (flag >> (i * 8)) & ((1 << 4) - 1); for (arrowtype = Z.z().Arrowtypes.asPtr(); arrowtype.getPtr("gen")!=null; arrowtype=arrowtype.plus(1)) { if (f == arrowtype.getInt("type")) { lenfact += arrowtype.getDouble("lenfact"); break; } } } /* The original was missing the factor E_arrowsz, but I believe it should be here for correct arrow clipping */ return 10. * lenfact * late_double(e, Z.z().E_arrowsz, 1.0, 0.0); } finally { LEAVING("1yk5wl46i7rlzcern0tefd24s","arrow_length"); } } //3 7ymcsnwqkr1crisrga0kezh1f // static boolean inside(inside_t * inside_context, pointf p) public static boolean inside(inside_t inside_context, final __struct__ p) { // WARNING!! STRUCT return inside_w_(inside_context, p.copy()); } private static boolean inside_w_(inside_t inside_context, final __struct__ p) { ENTERING("7ymcsnwqkr1crisrga0kezh1f","inside"); try { return DIST2(p, inside_context.getPtr("a.p").plus(0).getPtr()) <= inside_context.getPtr("a.r").getDouble(); } finally { LEAVING("7ymcsnwqkr1crisrga0kezh1f","inside"); } } //3 9eellwhg4gsa2pdszpeqihs2d // int arrowEndClip(edge_t* e, pointf * ps, int startp, int endp, bezier * spl, int eflag) public static int arrowEndClip(Agedge_s e, __ptr__ ps, int startp, int endp, bezier spl, int eflag) { ENTERING("9eellwhg4gsa2pdszpeqihs2d","arrowEndClip"); try { final __struct__ inside_context = JUtils.from(inside_t.class); final __array_of_struct__ sp = __array_of_struct__.malloc(pointf.class, 4); double elen; MutableDouble elen2 = new MutableDouble(0); elen = arrow_length(e, eflag); elen2.setValue(elen * elen); spl.setInt("eflag", eflag); spl.setStruct("ep", ps.plus(endp + 3).getStruct()); if (endp > startp && DIST2(ps.plus(endp).getPtr(), ps.plus(endp + 3).getPtr()) < elen2.getValue()) { endp -= 3; } sp.plus(3).setStruct(ps.plus(endp).getStruct()); sp.plus(2).setStruct(ps.plus(endp+1).getStruct()); sp.plus(1).setStruct(ps.plus(endp+2).getStruct()); sp.plus(0).setStruct(spl.getStruct("ep")); /* ensure endpoint starts inside */ inside_context.setPtr("a.p", sp.plus(0).asPtr()); inside_context.setPtr("a.r", elen2.amp()); bezier_clip(inside_context.amp(), function(arrows__c.class, "inside"), sp, NOT(false)); ps.plus(endp).setStruct(sp.plus(3).getStruct()); ps.plus(endp+1).setStruct(sp.plus(2).getStruct()); ps.plus(endp+2).setStruct(sp.plus(1).getStruct()); ps.plus(endp+3).setStruct(sp.plus(0).getStruct()); return endp; } finally { LEAVING("9eellwhg4gsa2pdszpeqihs2d","arrowEndClip"); } } //3 q7y4oxn0paexbgynmtg2zmiv // int arrowStartClip(edge_t* e, pointf * ps, int startp, int endp, bezier * spl, int sflag) public static int arrowStartClip(Agedge_s e, __ptr__ ps, int startp, int endp, bezier spl, int sflag) { ENTERING("q7y4oxn0paexbgynmtg2zmiv","arrowStartClip"); try { final __struct__ inside_context = JUtils.from(inside_t.class); final __array_of_struct__ sp = __array_of_struct__.malloc(pointf.class, 4); double slen; MutableDouble slen2 = new MutableDouble(0); slen = arrow_length(e, sflag); slen2.setValue(slen * slen); spl.setInt("sflag", sflag); spl.setStruct("sp", ps.plus(startp).getStruct()); if (endp > startp && DIST2(ps.plus(startp).getPtr(), ps.plus(startp + 3).getPtr()) < slen2.getValue()) { startp += 3; } sp.plus(0).setStruct(ps.plus(startp+3).getStruct()); sp.plus(1).setStruct(ps.plus(startp+2).getStruct()); sp.plus(2).setStruct(ps.plus(startp+1).getStruct()); sp.plus(3).setStruct(spl.getStruct("sp")); /* ensure endpoint starts inside */ inside_context.setPtr("a.p", sp.plus(3).asPtr()); inside_context.setPtr("a.r", slen2.amp()); bezier_clip(inside_context.amp(), function(arrows__c.class, "inside"), sp, false); ps.plus(startp).setStruct(sp.plus(3).getStruct()); ps.plus(startp+1).setStruct(sp.plus(2).getStruct()); ps.plus(startp+2).setStruct(sp.plus(1).getStruct()); ps.plus(startp+3).setStruct(sp.plus(0).getStruct()); return startp; } finally { LEAVING("9eellwhg4gsa2pdszpeqihs2d","arrowEndClip"); } } //3 5i0vg914q5v5dzz5vo7rg9omc // void arrowOrthoClip(edge_t* e, pointf* ps, int startp, int endp, bezier* spl, int sflag, int eflag) public static Object arrowOrthoClip(Object... arg) { UNSUPPORTED("5cmga0193q90gs5y2r0l9ekgq"); // void arrowOrthoClip(edge_t* e, pointf* ps, int startp, int endp, bezier* spl, int sflag, int eflag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("y7yudkjc31udfiam6z6lkpyz"); // pointf p, q, r, s, t; UNSUPPORTED("3kkc3p6yj8romhqyooa86wcf7"); // double d, tlen, hlen, maxd; UNSUPPORTED("c69aoxg5blb5c27rwb7uvguna"); // if (sflag && eflag && (endp == startp)) { /* handle special case of two arrows on a single segment */ UNSUPPORTED("eb6qp4f6c1liqz5gv8yr4nt2u"); // p = ps[endp]; UNSUPPORTED("ecphms6syi9sh7jtisdvhb8hr"); // q = ps[endp+3]; UNSUPPORTED("2pzsi9r63yv2o8qeounzv6cny"); // tlen = arrow_length (e, sflag); UNSUPPORTED("f4d86okjchj0qyg2roq13hufh"); // hlen = arrow_length (e, eflag); UNSUPPORTED("3sbhjktcu1u1avngc5ej62mw4"); // d = DIST(p, q); UNSUPPORTED("bsdcbs5e8tkm1802lidu0jtw8"); // if (hlen + tlen >= d) { UNSUPPORTED("8gpoj60hh2teibwc83s0ii79w"); // hlen = tlen = d/3.0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6xtkcedj7la7fqplc0unqj0wx"); // if (p.y == q.y) { /* horz segment */ UNSUPPORTED("9n0q5j1nqa19z0zoz3mpmwpdv"); // s.y = t.y = p.y; UNSUPPORTED("c2tle7mztwggexoad4drqjw0a"); // if (p.x < q.x) { UNSUPPORTED("183kgzstrmgynznfkfj0jl3df"); // t.x = q.x - hlen; UNSUPPORTED("7cugpgpm4lyr66kkhauqj5qvy"); // s.x = p.x + tlen; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("a8lrkw50xbjo3ntsv0r1mz5i9"); // t.x = q.x + hlen; UNSUPPORTED("37zp6lexzsbm2vomf22x7i5r"); // s.x = p.x - tlen; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4l6yfu81669thfh19tmcn44pu"); // else { /* vert segment */ UNSUPPORTED("bc0n1oxhmb3wgphgm1w4n9dz1"); // s.x = t.x = p.x; UNSUPPORTED("d2pzq44lkkxam6rx01xnozquf"); // if (p.y < q.y) { UNSUPPORTED("5k5qyffqi7gacnu4jwl6efngx"); // t.y = q.y - hlen; UNSUPPORTED("7ppaznbfc8awmm6e9d9qzw4ms"); // s.y = p.y + tlen; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("8ohhvcqa5v7oor1gbpznb6faq"); // t.y = q.y + hlen; UNSUPPORTED("4j6guu6e5ddqobe77kt7sbmjq"); // s.y = p.y - tlen; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("a4d4fgiq4l3sbeb9ud8dowkby"); // ps[endp] = ps[endp + 1] = s; UNSUPPORTED("db740uoo9pfyknnmi2yx0glgb"); // ps[endp + 2] = ps[endp + 3] = t; UNSUPPORTED("ewajj4utlr95mfmaswtc9yeiv"); // spl->eflag = eflag, spl->ep = p; UNSUPPORTED("9bgf1pn9yx1vlolgcjos2emsl"); // spl->sflag = sflag, spl->sp = q; UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5zse8mf1iyqtzzlq2txqcym6x"); // if (eflag) { UNSUPPORTED("bpf9snlwegftq8d78l9hsz76b"); // hlen = arrow_length(e, eflag); UNSUPPORTED("eb6qp4f6c1liqz5gv8yr4nt2u"); // p = ps[endp]; UNSUPPORTED("ecphms6syi9sh7jtisdvhb8hr"); // q = ps[endp+3]; UNSUPPORTED("3sbhjktcu1u1avngc5ej62mw4"); // d = DIST(p, q); UNSUPPORTED("9b0ae4jocdkvqt8r3iw39yf5d"); // maxd = 0.9*d; UNSUPPORTED("bwzkrhk431iwhs6c467tb0yh9"); // if (hlen >= maxd) { /* arrow too long */ UNSUPPORTED("23uwvl5a8msik1u1crb262nqj"); // hlen = maxd; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6xtkcedj7la7fqplc0unqj0wx"); // if (p.y == q.y) { /* horz segment */ UNSUPPORTED("a851ewci39wssny4nn99f4nmr"); // r.y = p.y; UNSUPPORTED("a2dyb0em7hwd4qdx1u0tuc8pl"); // if (p.x < q.x) r.x = q.x - hlen; UNSUPPORTED("90ksto8lyojedi0p77l4zm7x"); // else r.x = q.x + hlen; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4l6yfu81669thfh19tmcn44pu"); // else { /* vert segment */ UNSUPPORTED("4rh9lai2dcsutwg48bb2qljyg"); // r.x = p.x; UNSUPPORTED("6gnp9tso58zn1rn4j7jv3i1y0"); // if (p.y < q.y) r.y = q.y - hlen; UNSUPPORTED("3wd6fw8km4tp6a1p9ijk343ih"); // else r.y = q.y + hlen; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bxxlk6noh1kzyi93fptcz29j4"); // ps[endp + 1] = p; UNSUPPORTED("d3kionq4ycqr87orc5vkdnse0"); // ps[endp + 2] = ps[endp + 3] = r; UNSUPPORTED("4uwxjmxybnuriwua5xoo17bfa"); // spl->eflag = eflag; UNSUPPORTED("25oo9o1uy5fisoodt43sio6zx"); // spl->ep = q; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3297fx8lk8bjyg998l9ujeeph"); // if (sflag) { UNSUPPORTED("5slqgq5wsgplyy9uj9mg5pkrc"); // tlen = arrow_length(e, sflag); UNSUPPORTED("ayxhimnpo6p08kshlux75qpcu"); // p = ps[startp]; UNSUPPORTED("2ydx1urmjnn1tgx6ffzsvwimx"); // q = ps[startp+3]; UNSUPPORTED("3sbhjktcu1u1avngc5ej62mw4"); // d = DIST(p, q); UNSUPPORTED("9b0ae4jocdkvqt8r3iw39yf5d"); // maxd = 0.9*d; UNSUPPORTED("1uya1cfbkj8b6j38zbvdxmgrq"); // if (tlen >= maxd) { /* arrow too long */ UNSUPPORTED("3ydle9u127f7saxiibosc2lxs"); // tlen = maxd; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6xtkcedj7la7fqplc0unqj0wx"); // if (p.y == q.y) { /* horz segment */ UNSUPPORTED("a851ewci39wssny4nn99f4nmr"); // r.y = p.y; UNSUPPORTED("7xq2f46jfu6rsd83fqyr71z26"); // if (p.x < q.x) r.x = p.x + tlen; UNSUPPORTED("8gtrjqabiq8x8jl0j2eveiugg"); // else r.x = p.x - tlen; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4l6yfu81669thfh19tmcn44pu"); // else { /* vert segment */ UNSUPPORTED("4rh9lai2dcsutwg48bb2qljyg"); // r.x = p.x; UNSUPPORTED("es4i2rg7sahthpreieu5hcwl7"); // if (p.y < q.y) r.y = p.y + tlen; UNSUPPORTED("26o5nwhklplaxveikjpxzxoom"); // else r.y = p.y - tlen; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5pnx91gtz1gahdprf0syc4yk5"); // ps[startp] = ps[startp + 1] = r; UNSUPPORTED("3e3iux8uecaf6eu2s9q46clr5"); // ps[startp + 2] = q; UNSUPPORTED("bmeeipd0o72kslox40628z9gj"); // spl->sflag = sflag; UNSUPPORTED("dwq656v3u8zmbqdetlo0wmyeb"); // spl->sp = p; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b7nm38od2nxotpyzxg0ychqdb // static void arrow_type_normal(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) public static Object arrow_type_normal(Object... arg) { UNSUPPORTED("bk3aihjbdtkitpdvvtmzbt2zu"); // static void arrow_type_normal(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4z3ehq6q8ofvyjy4r4mrg86cl"); // pointf q, v, a[5]; UNSUPPORTED("5qr741c2e1pdivv0bbjcr6cik"); // double arrowwidth; UNSUPPORTED("9gahmv6psjnccqesq7xt6q6hx"); // arrowwidth = 0.35; UNSUPPORTED("bih7b1ef9lfxy4uy4o07ae3bk"); // if (penwidth > 4) UNSUPPORTED("o3yn0730zlzconddqarivq05"); // arrowwidth *= penwidth / 4; UNSUPPORTED("949z3586m713okvlu1ymyw1us"); // v.x = -u.y * arrowwidth; UNSUPPORTED("c8xqr3hfd006yf1uuh47ndi71"); // v.y = u.x * arrowwidth; UNSUPPORTED("eh1wtktxp1goqc7akjgyqf00j"); // q.x = p.x + u.x; UNSUPPORTED("3op9xoxcy2m0v7q790ta7f9hl"); // q.y = p.y + u.y; UNSUPPORTED("eh6fh3kco3kvywuta8d8yb5v0"); // if (flag & (1<<(4+1))) { UNSUPPORTED("3by9fwhdnq30ll5nt8qbfwx0p"); // a[0] = a[4] = p; UNSUPPORTED("4ut2bmvsgdsemxiv8urham7m3"); // a[1].x = p.x - v.x; UNSUPPORTED("asa1ffrrxd6dkzm1sdamgofuu"); // a[1].y = p.y - v.y; UNSUPPORTED("60oc061ln68pvrg7zp8s3ncog"); // a[2] = q; UNSUPPORTED("591i8kbz6r8bskar4gy0vpsus"); // a[3].x = p.x + v.x; UNSUPPORTED("7i9sj4qz5f52w1wiz47bo6dv2"); // a[3].y = p.y + v.y; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("6ofxgqmmh2ikk8818bf8aw2mw"); // a[0] = a[4] = q; UNSUPPORTED("4l3g4pagkn0dto3bwi2e0bukd"); // a[1].x = q.x - v.x; UNSUPPORTED("9wv7w8vdiedhkfehzqwyyv897"); // a[1].y = q.y - v.y; UNSUPPORTED("d0mui3zxt1cx6mx5wfax35iah"); // a[2] = p; UNSUPPORTED("b5arwmpck5jtms8g1zgnojj5o"); // a[3].x = q.x + v.x; UNSUPPORTED("3viyneb6qkp0alwghd7mo06cc"); // a[3].y = q.y + v.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3kac8n2z06u2z5pqkm7c4z4nl"); // if (flag & (1<<(4+2))) UNSUPPORTED("52punwd4fhhq1arhez8cuwvam"); // gvrender_polygon(job, a, 3, !(flag & (1<<(4+0)))); UNSUPPORTED("9i420px3t1z2sosclutiev22e"); // else if (flag & (1<<(4+3))) UNSUPPORTED("gu9pg6c0d0uzlztdiq2o96zh"); // gvrender_polygon(job, &a[2], 3, !(flag & (1<<(4+0)))); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("7c6e70h4efa2wpa155lfy3er5"); // gvrender_polygon(job, &a[1], 3, !(flag & (1<<(4+0)))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b6y46a44yguy7zuhgxukxnq79 // static void arrow_type_crow(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) public static Object arrow_type_crow(Object... arg) { UNSUPPORTED("6rtaogz992ixfhc4qfzpl9pw8"); // static void arrow_type_crow(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1hutab8l2bf18ywdh16qls7ix"); // pointf m, q, v, w, a[9]; UNSUPPORTED("9riilhm03el22oazbpvsntuyd"); // double arrowwidth, shaftwidth; UNSUPPORTED("3pjnxs55moxekjdkzcgmes60h"); // arrowwidth = 0.45; UNSUPPORTED("7k8ulzafyheqq2wcj2ued1mll"); // if (penwidth > (4 * arrowsize) && (flag & (1<<(4+1)))) UNSUPPORTED("85aamjzbblwnk2bp9jvnetpmf"); // arrowwidth *= penwidth / (4 * arrowsize); UNSUPPORTED("ykk0490b4cs8a1v9gpqx95we"); // shaftwidth = 0; UNSUPPORTED("61i60vknj2akb0ojgfdcnjjyh"); // if (penwidth > 1 && (flag & (1<<(4+1)))) UNSUPPORTED("ak0a6438e5b0b2nu2wl572f6d"); // shaftwidth = 0.05 * (penwidth - 1) / arrowsize; /* arrowsize to cancel the arrowsize term already in u */ UNSUPPORTED("949z3586m713okvlu1ymyw1us"); // v.x = -u.y * arrowwidth; UNSUPPORTED("c8xqr3hfd006yf1uuh47ndi71"); // v.y = u.x * arrowwidth; UNSUPPORTED("56jq7ic46net8ort3ve4st2tw"); // w.x = -u.y * shaftwidth; UNSUPPORTED("ampfe31k0mn8vsflzy5cx4lgv"); // w.y = u.x * shaftwidth; UNSUPPORTED("eh1wtktxp1goqc7akjgyqf00j"); // q.x = p.x + u.x; UNSUPPORTED("3op9xoxcy2m0v7q790ta7f9hl"); // q.y = p.y + u.y; UNSUPPORTED("cfk5fnc73y4ey68iwqxlsr7u9"); // m.x = p.x + u.x * 0.5; UNSUPPORTED("2mtpxqz0h7jsb7bmao9g1vkar"); // m.y = p.y + u.y * 0.5; UNSUPPORTED("5rymactsr9099qy69qf1bkwdr"); // if (flag & (1<<(4+1))) { /* vee */ UNSUPPORTED("4s8pxkc9kbvhabi2gbpxic5sm"); // a[0] = a[8] = p; UNSUPPORTED("4l3g4pagkn0dto3bwi2e0bukd"); // a[1].x = q.x - v.x; UNSUPPORTED("9wv7w8vdiedhkfehzqwyyv897"); // a[1].y = q.y - v.y; UNSUPPORTED("6rqmfaf4g98cg0t1qaax08e69"); // a[2].x = m.x - w.x; UNSUPPORTED("1nwyu905ao88kvq8pgnfwerf5"); // a[2].y = m.y - w.y; UNSUPPORTED("9z1frd2w5h9zvfo4pszqlzp30"); // a[3].x = q.x - w.x; UNSUPPORTED("1s86b9xef6phy3gt70ojgn6ip"); // a[3].y = q.y - w.y; UNSUPPORTED("4zd6xleeq5n1l2zznquvnlw7v"); // a[4] = q; UNSUPPORTED("2wb1104b1x08j7tecfcwk25uj"); // a[5].x = q.x + w.x; UNSUPPORTED("6tq7rnp0h0p9xtxibo13g8v3t"); // a[5].y = q.y + w.y; UNSUPPORTED("7byonl28yipw4lk1syuuj51it"); // a[6].x = m.x + w.x; UNSUPPORTED("lwb6vnlr2dq5ysijij21wbgl"); // a[6].y = m.y + w.y; UNSUPPORTED("eh4rkk1h3ciybh0u0hgehkdxx"); // a[7].x = q.x + v.x; UNSUPPORTED("bxhyoes561jf42tw73tjj33sj"); // a[7].y = q.y + v.y; UNSUPPORTED("54abbljqrd361peswxjtohjg0"); // } else { /* crow */ UNSUPPORTED("5i9r1mehhwkkn8ojo8csm0piw"); // a[0] = a[8] = q; UNSUPPORTED("4ut2bmvsgdsemxiv8urham7m3"); // a[1].x = p.x - v.x; UNSUPPORTED("asa1ffrrxd6dkzm1sdamgofuu"); // a[1].y = p.y - v.y; UNSUPPORTED("6rqmfaf4g98cg0t1qaax08e69"); // a[2].x = m.x - w.x; UNSUPPORTED("1nwyu905ao88kvq8pgnfwerf5"); // a[2].y = m.y - w.y; UNSUPPORTED("5yhpyznqsxb2ga5si6phvakqg"); // a[3].x = p.x; UNSUPPORTED("3eko75yr046fkm2yulawhw236"); // a[3].y = p.y; UNSUPPORTED("7nofpsbtwg78gooeo8makz5bb"); // a[4] = p; UNSUPPORTED("dl1jq9xglce6cfpe03mzu3p22"); // a[5].x = p.x; UNSUPPORTED("8kqrguezr1d2awpazfz88cw5"); // a[5].y = p.y; UNSUPPORTED("7byonl28yipw4lk1syuuj51it"); // a[6].x = m.x + w.x; UNSUPPORTED("lwb6vnlr2dq5ysijij21wbgl"); // a[6].y = m.y + w.y; UNSUPPORTED("egqlf021ldci9s31jrpk2m1pk"); // a[7].x = p.x + v.x; UNSUPPORTED("60b7k5jzqw1ndaxnese0cnx2t"); // a[7].y = p.y + v.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3kac8n2z06u2z5pqkm7c4z4nl"); // if (flag & (1<<(4+2))) UNSUPPORTED("8vyuq79k664wims1n1ltnudbt"); // gvrender_polygon(job, a, 6, 1); UNSUPPORTED("9i420px3t1z2sosclutiev22e"); // else if (flag & (1<<(4+3))) UNSUPPORTED("ap1vbm2kxsjtcp3pezwq2jwln"); // gvrender_polygon(job, &a[3], 6, 1); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("d0npn4cmn6nd0ytaww7u7ghrw"); // gvrender_polygon(job, a, 9, 1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e8w54seijyii7km6zl3sivjpu // static void arrow_type_gap(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) public static Object arrow_type_gap(Object... arg) { UNSUPPORTED("anlswsxb36i1znu2805bu47t2"); // static void arrow_type_gap(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("brf7jajkh244o41ekaw2tyora"); // pointf q, a[2]; UNSUPPORTED("eh1wtktxp1goqc7akjgyqf00j"); // q.x = p.x + u.x; UNSUPPORTED("3op9xoxcy2m0v7q790ta7f9hl"); // q.y = p.y + u.y; UNSUPPORTED("dhfgavaa2js7qt2ciwujmmrpv"); // a[0] = p; UNSUPPORTED("7b2bztb06255tydz21zauq8qq"); // a[1] = q; UNSUPPORTED("9hbag2bcttyxj9vas0kvof5qp"); // gvrender_polyline(job, a, 2); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eg7sgk8umcqfthbo1t0plohbt // static void arrow_type_tee(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) public static Object arrow_type_tee(Object... arg) { UNSUPPORTED("9u6pwrzl9t5i0kfvnwn7uufrp"); // static void arrow_type_tee(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1hwyzphi1ihi2lx3engtta1qa"); // pointf m, n, q, v, a[4]; UNSUPPORTED("e8sltpxlu9ln6k3zn49u46zau"); // v.x = -u.y; UNSUPPORTED("1wxxf464go09wrecpyo3y2k25"); // v.y = u.x; UNSUPPORTED("eh1wtktxp1goqc7akjgyqf00j"); // q.x = p.x + u.x; UNSUPPORTED("3op9xoxcy2m0v7q790ta7f9hl"); // q.y = p.y + u.y; UNSUPPORTED("61cj5vg96f8j145swk5v2nz5a"); // m.x = p.x + u.x * 0.2; UNSUPPORTED("25zmgst5hb9ya664up64k51tt"); // m.y = p.y + u.y * 0.2; UNSUPPORTED("9wrt18toae33nd3tmifyahyt8"); // n.x = p.x + u.x * 0.6; UNSUPPORTED("1151hzer2rx55qz715on0gexs"); // n.y = p.y + u.y * 0.6; UNSUPPORTED("4ihm8x9khys2bcoivyqzf4dth"); // a[0].x = m.x + v.x; UNSUPPORTED("941h30wfi9u1c17vhabko438l"); // a[0].y = m.y + v.y; UNSUPPORTED("7qtkiyjyg6pzhhoyslv8pmp1q"); // a[1].x = m.x - v.x; UNSUPPORTED("24iwwf6paxfgux41w93obhwp4"); // a[1].y = m.y - v.y; UNSUPPORTED("314g2i9mvbz4um5y7oiyuldvw"); // a[2].x = n.x - v.x; UNSUPPORTED("7ebhg7671hxu0useo7ewi26kn"); // a[2].y = n.y - v.y; UNSUPPORTED("8mc60oc3vsykq69a5zb6h72u4"); // a[3].x = n.x + v.x; UNSUPPORTED("6q0rldgbg1rfr4skqzq0v099f"); // a[3].y = n.y + v.y; UNSUPPORTED("9u73bl75ej5xy9pe46nac6ih5"); // if (flag & (1<<(4+2))) { UNSUPPORTED("6omh7vjmab159riw0fejjpwk0"); // a[0] = m; UNSUPPORTED("3w139dwzvrzrghf5w8hox1qen"); // a[3] = n; UNSUPPORTED("2u9qb4zvcio06wzd2nb3bjrs4"); // } else if (flag & (1<<(4+3))) { UNSUPPORTED("7g1lyxw6yo0ycv1l688mehedr"); // a[1] = m; UNSUPPORTED("72r460jtb2id4k8ri9sdwuqy4"); // a[2] = n; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("15b4dosag4vcx31fnicxczw81"); // gvrender_polygon(job, a, 4, 1); UNSUPPORTED("dhfgavaa2js7qt2ciwujmmrpv"); // a[0] = p; UNSUPPORTED("7b2bztb06255tydz21zauq8qq"); // a[1] = q; UNSUPPORTED("9hbag2bcttyxj9vas0kvof5qp"); // gvrender_polyline(job, a, 2); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3hdgy0baje1akb7fjw9yovjwz // static void arrow_type_box(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) public static Object arrow_type_box(Object... arg) { UNSUPPORTED("4u7yj9rhqxdonlyd5taprxs28"); // static void arrow_type_box(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5lmvyh791uemv9zn9qfakp4qb"); // pointf m, q, v, a[4]; UNSUPPORTED("ep2toe83b4kkoeb00wqwru73t"); // v.x = -u.y * 0.4; UNSUPPORTED("8c686kltb5ewlt4qkf7ljmmc8"); // v.y = u.x * 0.4; UNSUPPORTED("66oe3r3caie8ddr9mgkqkk0r3"); // m.x = p.x + u.x * 0.8; UNSUPPORTED("1mowxzv768r12lzc4blbkl873"); // m.y = p.y + u.y * 0.8; UNSUPPORTED("eh1wtktxp1goqc7akjgyqf00j"); // q.x = p.x + u.x; UNSUPPORTED("3op9xoxcy2m0v7q790ta7f9hl"); // q.y = p.y + u.y; UNSUPPORTED("apz7b1n6lnsr7u47d661qkf7r"); // a[0].x = p.x + v.x; UNSUPPORTED("eqdvtg0j9avxbrpfozktn2358"); // a[0].y = p.y + v.y; UNSUPPORTED("f0vjjdkq6txr0nrc7xjvcxpa9"); // a[1].x = p.x - v.x; UNSUPPORTED("4e5dina8t36xvh3bfr8y98a9m"); // a[1].y = p.y - v.y; UNSUPPORTED("4npxatuz83si51hcyaeshl3x3"); // a[2].x = m.x - v.x; UNSUPPORTED("br2saagm87ysykkosh9e0xjab"); // a[2].y = m.y - v.y; UNSUPPORTED("8kb1ee4fjdywi21l0xydfefb4"); // a[3].x = m.x + v.x; UNSUPPORTED("coalhyxqy4kj07zi50yoc48fy"); // a[3].y = m.y + v.y; UNSUPPORTED("9u73bl75ej5xy9pe46nac6ih5"); // if (flag & (1<<(4+2))) { UNSUPPORTED("5fbtaluh9dcnwehl25ff3obkc"); // a[0] = p; UNSUPPORTED("9bjq8dynp7r5d7sbwtodjucxc"); // a[3] = m; UNSUPPORTED("2u9qb4zvcio06wzd2nb3bjrs4"); // } else if (flag & (1<<(4+3))) { UNSUPPORTED("e2cqpiig8ac96q5ovh3nyr7t1"); // a[1] = p; UNSUPPORTED("4uekqgdzqn4bhxlllod39w27b"); // a[2] = m; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7y7z0oxvzng5clk605r3p4zz8"); // gvrender_polygon(job, a, 4, !(flag & (1<<(4+0)))); UNSUPPORTED("1p9lzfwbik1778u5gdeqpxm31"); // a[0] = m; UNSUPPORTED("7b2bztb06255tydz21zauq8qq"); // a[1] = q; UNSUPPORTED("9hbag2bcttyxj9vas0kvof5qp"); // gvrender_polyline(job, a, 2); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 equc1q4r6wcoe2pwwnk2u01og // static void arrow_type_diamond(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) public static Object arrow_type_diamond(Object... arg) { UNSUPPORTED("4wg2b1eyit9ve72uqrds41jk2"); // static void arrow_type_diamond(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7ww1c4ncz55av20zgtif7choz"); // pointf q, r, v, a[5]; UNSUPPORTED("1xsjvcsxdwie2v666ry6ihghq"); // v.x = -u.y / 3.; UNSUPPORTED("9xea2lahdijfjgz0skow4ps5m"); // v.y = u.x / 3.; UNSUPPORTED("4p3vbsracdkwmi6dly3odymvb"); // r.x = p.x + u.x / 2.; UNSUPPORTED("7y5j7ecroy4fci5jzh6mk2sl9"); // r.y = p.y + u.y / 2.; UNSUPPORTED("eh1wtktxp1goqc7akjgyqf00j"); // q.x = p.x + u.x; UNSUPPORTED("3op9xoxcy2m0v7q790ta7f9hl"); // q.y = p.y + u.y; UNSUPPORTED("8n36qnwzpe2hugs30s3am1zsg"); // a[0] = a[4] = q; UNSUPPORTED("e97x8nztsokegzu9u2tgwssgi"); // a[1].x = r.x + v.x; UNSUPPORTED("3yv64xfvqgiyturtkz9pnkbtd"); // a[1].y = r.y + v.y; UNSUPPORTED("3isw1pofpfafh53xdqo1gmbrr"); // a[2] = p; UNSUPPORTED("655732redrvi9o3a3dyjh90af"); // a[3].x = r.x - v.x; UNSUPPORTED("55u2biopicz70n81k5ml5lzjp"); // a[3].y = r.y - v.y; UNSUPPORTED("3kac8n2z06u2z5pqkm7c4z4nl"); // if (flag & (1<<(4+2))) UNSUPPORTED("gu9pg6c0d0uzlztdiq2o96zh"); // gvrender_polygon(job, &a[2], 3, !(flag & (1<<(4+0)))); UNSUPPORTED("9i420px3t1z2sosclutiev22e"); // else if (flag & (1<<(4+3))) UNSUPPORTED("52punwd4fhhq1arhez8cuwvam"); // gvrender_polygon(job, a, 3, !(flag & (1<<(4+0)))); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("6qac6zmwtg6rwpmn73fq6poje"); // gvrender_polygon(job, a, 4, !(flag & (1<<(4+0)))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dxl50r7ooipvtkyjb0sleittd // static void arrow_type_dot(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) public static Object arrow_type_dot(Object... arg) { UNSUPPORTED("bsrxktb5cvoy4qewxrb3z3ht"); // static void arrow_type_dot(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e077smjlsfuq1ptdwqpn7lcf0"); // double r; UNSUPPORTED("c1555k4n8zggr5m5nozuhequ8"); // pointf AF[2]; UNSUPPORTED("9nadrv289g5ravobyhu05u9or"); // r = sqrt(u.x * u.x + u.y * u.y) / 2.; UNSUPPORTED("bxxvjt8g03vytuyx531n55b1g"); // AF[0].x = p.x + u.x / 2. - r; UNSUPPORTED("8lbe9l6h0hqnth5j5skwrhxx1"); // AF[0].y = p.y + u.y / 2. - r; UNSUPPORTED("1krebba2swwkp12jt15xqkjqd"); // AF[1].x = p.x + u.x / 2. + r; UNSUPPORTED("btubzlppo1x1284g7zu99lk03"); // AF[1].y = p.y + u.y / 2. + r; UNSUPPORTED("7mu57g14vmt1bdc523s4wiy22"); // gvrender_ellipse(job, AF, 2, !(flag & (1<<(4+0)))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5oioemwdl3g1maj3ikzleo0nm // static void arrow_type_curve(GVJ_t* job, pointf p, pointf u, double arrowsize, double penwidth, int flag) public static Object arrow_type_curve(Object... arg) { UNSUPPORTED("2rt93fe18qb092yomrw5l6mko"); // static void arrow_type_curve(GVJ_t* job, pointf p, pointf u, double arrowsize, double penwidth, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7127v6bnaxe4g216ue7fn3fyp"); // double arrowwidth = penwidth > 4 ? 0.5 * penwidth / 4 : 0.5; UNSUPPORTED("euvu8ayo5swdxux8kyjmrywr5"); // pointf q, v, w; UNSUPPORTED("9jc1l9d43c00gutvyto6snss3"); // pointf AF[4], a[2]; UNSUPPORTED("eh1wtktxp1goqc7akjgyqf00j"); // q.x = p.x + u.x; UNSUPPORTED("4qmtmdrrceo9h0mka0fkj5xci"); // q.y = p.y + u.y; UNSUPPORTED("bvibgke8hnjr9rlyzfdumk5w"); // v.x = -u.y * arrowwidth; UNSUPPORTED("c8xqr3hfd006yf1uuh47ndi71"); // v.y = u.x * arrowwidth; UNSUPPORTED("duqsnax25spvj38rnd9v32b4d"); // w.x = v.y; // same direction as u, same magnitude as v. UNSUPPORTED("4srsifkr8qc1viu2xijhnt66s"); // w.y = -v.x; UNSUPPORTED("dhfgavaa2js7qt2ciwujmmrpv"); // a[0] = p; UNSUPPORTED("7b2bztb06255tydz21zauq8qq"); // a[1] = q; UNSUPPORTED("11fvrbnzwbuar9l5gc9wurbor"); // AF[0].x = p.x + v.x + w.x; UNSUPPORTED("34xjxb9aaiworzwsfodegww0g"); // AF[0].y = p.y + v.y + w.y; UNSUPPORTED("73ax76wsls8wr2c86mm6umxkl"); // AF[3].x = p.x - v.x + w.x; UNSUPPORTED("7q0ly8njmscobyx3v5u7xb59c"); // AF[3].y = p.y - v.y + w.y; UNSUPPORTED("9qmj4a7f67dltmu1pte8pzqox"); // AF[1].x = p.x + 0.95 * v.x + w.x - w.x * 4.0 / 3.0; UNSUPPORTED("5spg9wtj9dwqh43yhk0dqfija"); // AF[1].y = AF[0].y - w.y * 4.0 / 3.0; UNSUPPORTED("ab3yikrvtlncw10ivdxvr4a52"); // AF[2].x = p.x - 0.95 * v.x + w.x - w.x * 4.0 / 3.0; UNSUPPORTED("45ok1xa7ia1ugs2o8ediwmd5p"); // AF[2].y = AF[3].y - w.y * 4.0 / 3.0; UNSUPPORTED("9hbag2bcttyxj9vas0kvof5qp"); // gvrender_polyline(job, a, 2); UNSUPPORTED("3kac8n2z06u2z5pqkm7c4z4nl"); // if (flag & (1<<(4+2))) UNSUPPORTED("58oum3y30wqa0bofgze20unn7"); // Bezier(AF, 3, 0.5, NULL, AF); UNSUPPORTED("9i420px3t1z2sosclutiev22e"); // else if (flag & (1<<(4+3))) UNSUPPORTED("8dngt8wih972oouawx4wska6k"); // Bezier(AF, 3, 0.5, AF, NULL); UNSUPPORTED("78tsqk66ihei67oy2ptr6t6f3"); // gvrender_beziercurve(job, AF, sizeof(AF) / sizeof(pointf), 0, 0, 0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ruebmb0rzoin79tmkp4o357x // static pointf arrow_gen_type(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) public static Object arrow_gen_type(Object... arg) { UNSUPPORTED("6eekmrou08qiz0zielzyhyn4g"); // static pointf arrow_gen_type(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9rrbht5x8qg377l1khejt2as2"); // int f; UNSUPPORTED("aed0rb6bb02eluj3o0ugcfqv9"); // arrowtype_t *arrowtype; UNSUPPORTED("ml2ttdehp7agi83yijbgk49r"); // f = flag & ((1 << 4) - 1); UNSUPPORTED("f036frj7aawxz98ctbodsj666"); // for (arrowtype = Arrowtypes; arrowtype->type; arrowtype++) { UNSUPPORTED("6qf8zxk5crelbhxfi42gd00l3"); // if (f == arrowtype->type) { UNSUPPORTED("epoo24e6zcp2uaje5ukce1yvh"); // u.x *= arrowtype->lenfact * arrowsize; UNSUPPORTED("bcfjvd5s3jub6wo9roe0xmn0g"); // u.y *= arrowtype->lenfact * arrowsize; UNSUPPORTED("5wc1a7bb8k1d528kxw2uchm7c"); // (arrowtype->gen) (job, p, u, arrowsize, penwidth, flag); UNSUPPORTED("3wwns14fz356e6p4s8byp3d6i"); // p.x = p.x + u.x; UNSUPPORTED("3rzld1v7nkscibpukz3bdox3v"); // p.y = p.y + u.y; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("91xduilalb406jjyw2g1i07th"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2u4vcl57jl62dmf8fy80ioppm // boxf arrow_bb(pointf p, pointf u, double arrowsize, int flag) public static Object arrow_bb(Object... arg) { UNSUPPORTED("67tfc7x1j056na7s6itymoeol"); // boxf arrow_bb(pointf p, pointf u, double arrowsize, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2fvgbj82ham8m0frx5hn9dyi"); // double s; UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("94ds3z1i0vt5rbv13ja90fdfp"); // double ax,ay,bx,by,cx,cy,dx,dy; UNSUPPORTED("6r1gp4hfea5imwnuiyfuxzh6k"); // double ux2, uy2; UNSUPPORTED("d5vh8if7unojun6hmulj4il7u"); // /* generate arrowhead vector */ UNSUPPORTED("5yc3jb0utnnay4x88h644puhz"); // u.x -= p.x; UNSUPPORTED("egh8lzpdfrza6k11lopupxykp"); // u.y -= p.y; UNSUPPORTED("bh7ueu6dokefdmej3xz79c7ty"); // /* the EPSILONs are to keep this stable as length of u approaches 0.0 */ UNSUPPORTED("3oao4fejxee2cop1fhd4m8tae"); // s = 10. * arrowsize / (sqrt(u.x * u.x + u.y * u.y) + .0001); UNSUPPORTED("8qxmhdlg9d49yg9gxkjw043"); // u.x += (u.x >= 0.0) ? .0001 : -.0001; UNSUPPORTED("4vxtvwh3x5b3i33sdyppe3trq"); // u.y += (u.y >= 0.0) ? .0001 : -.0001; UNSUPPORTED("bwi3f8xk8t2nbzy5tjtgeewjl"); // u.x *= s; UNSUPPORTED("do56zsbrbn95ovnoqu6zzjjmw"); // u.y *= s; UNSUPPORTED("alix1e6k9ywov3xxcwxcgo1hh"); // /* compute all 4 corners of rotated arrowhead bounding box */ UNSUPPORTED("9bdmzamsx8jasbcfy2mk0v7yt"); // ux2 = u.x / 2.; UNSUPPORTED("3k8htwk7cas9gfe4j797zk3b"); // uy2 = u.y / 2.; UNSUPPORTED("ar2s2pmmxun5v6p0d4mlij1ro"); // ax = p.x - uy2; UNSUPPORTED("d9cpq1pbscjxjhkyi57s76o4r"); // ay = p.y - ux2; UNSUPPORTED("7m3bdjur8btdn3q1dzd4o751s"); // bx = p.x + uy2; UNSUPPORTED("bhn3rg0stek17iytsy7bgbwqw"); // by = p.y + ux2; UNSUPPORTED("ai8hjx4uwhzow4nolep1478xn"); // cx = ax + u.x; UNSUPPORTED("15l0cqg7njm4ebimncczi9uho"); // cy = ay + u.y; UNSUPPORTED("29117dcz6pcm4ibiebo4cemeh"); // dx = bx + u.x; UNSUPPORTED("7s3y5imd0u3woy1d0q58g1wlh"); // dy = by + u.y; UNSUPPORTED("7lzozmdnkd5c06cyxy2skrar5"); // /* compute a right bb */ UNSUPPORTED("4shnxc3z5z4wj3l0pl7tml625"); // bb.UR.x = MAX(ax, MAX(bx, MAX(cx, dx))); UNSUPPORTED("2igw3asrvk13qlfbw4sgn7vxt"); // bb.UR.y = MAX(ay, MAX(by, MAX(cy, dy))); UNSUPPORTED("7fz9fiabx9i87t8t6bgjeso5a"); // bb.LL.x = MIN(ax, MIN(bx, MIN(cx, dx))); UNSUPPORTED("c6v20rdx0lfdvypx8l4tomnri"); // bb.LL.y = MIN(ay, MIN(by, MIN(cy, dy))); UNSUPPORTED("5v5hh30squmit8o2i5hs25eig"); // return bb; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8ss8m9a0p5v0yx2oqggh0rx57 // void arrow_gen(GVJ_t * job, emit_state_t emit_state, pointf p, pointf u, double arrowsize, double penwidth, int flag) public static Object arrow_gen(Object... arg) { UNSUPPORTED("ag73i6wbc5lb0d46ul40euyur"); // void arrow_gen(GVJ_t * job, emit_state_t emit_state, pointf p, pointf u, double arrowsize, double penwidth, int flag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("2fvgbj82ham8m0frx5hn9dyi"); // double s; UNSUPPORTED("66oipfshtfj4imr4j2x2drib0"); // int i, f; UNSUPPORTED("ecr1y7qy0ikxkidkdfvwv88ir"); // emit_state_t old_emit_state; UNSUPPORTED("c3lqudp40feg72zp97ngqkww9"); // old_emit_state = obj->emit_state; UNSUPPORTED("3ook7gsw0rr7b6uwm9f5a5dtx"); // obj->emit_state = emit_state; UNSUPPORTED("exvy7jlggpvu1zhz08fo1jbvi"); // /* Dotted and dashed styles on the arrowhead are ugly (dds) */ UNSUPPORTED("em34eidklzv0dobtybvgz9gwu"); // /* linewidth needs to be reset */ UNSUPPORTED("4g8oyutwebzej18aaiz74zb9k"); // gvrender_set_style(job, job->gvc->defaultlinestyle); UNSUPPORTED("eertb1vvqryb308a1uuff8s0"); // gvrender_set_penwidth(job, penwidth); UNSUPPORTED("d5vh8if7unojun6hmulj4il7u"); // /* generate arrowhead vector */ UNSUPPORTED("5yc3jb0utnnay4x88h644puhz"); // u.x -= p.x; UNSUPPORTED("egh8lzpdfrza6k11lopupxykp"); // u.y -= p.y; UNSUPPORTED("bh7ueu6dokefdmej3xz79c7ty"); // /* the EPSILONs are to keep this stable as length of u approaches 0.0 */ UNSUPPORTED("9s182w6wdwxo0pwu9hljlyofe"); // s = 10. / (sqrt(u.x * u.x + u.y * u.y) + .0001); UNSUPPORTED("8qxmhdlg9d49yg9gxkjw043"); // u.x += (u.x >= 0.0) ? .0001 : -.0001; UNSUPPORTED("4vxtvwh3x5b3i33sdyppe3trq"); // u.y += (u.y >= 0.0) ? .0001 : -.0001; UNSUPPORTED("bwi3f8xk8t2nbzy5tjtgeewjl"); // u.x *= s; UNSUPPORTED("do56zsbrbn95ovnoqu6zzjjmw"); // u.y *= s; UNSUPPORTED("3zei0bi63grn37qiuxn09n7hz"); // /* the first arrow head - closest to node */ UNSUPPORTED("a2n8aqfq0cqpx8elstmfn9oq6"); // for (i = 0; i < 4; i++) { UNSUPPORTED("8sgyt5ym5jt73oknb4tdj2zpl"); // f = (flag >> (i * 8)) & ((1 << 8) - 1); UNSUPPORTED("5vg3retgvi5ekir9xbw8j4zoq"); // if (f == (0)) UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("biq7xz2uj7ksjrqn6tqr9glzj"); // p = arrow_gen_type(job, p, u, arrowsize, penwidth, f); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b1bkq4eyrmepbxyb3qiuhi8b8"); // obj->emit_state = old_emit_state; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/colxlate__c.java000066400000000000000000001063701312650303100224020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.Macro.UNSUPPORTED; public class colxlate__c { //1 9jk9ukwctyqdsan5lm6845y0i // static hsvrgbacolor_t color_lib[] = //1 48s1hew37k508i0ge3vcsxs69 // static char* colorscheme //3 7m77ow39f9cx65se44asa35dr // static void hsv2rgb(double h, double s, double v, double *r, double *g, double *b) public static Object hsv2rgb(Object... arg) { UNSUPPORTED("bimj2bwogufgm8nwcyse0gmpq"); // static void hsv2rgb(double h, double s, double v, UNSUPPORTED("95mlswcykd5as5wr8jbkfhz4f"); // double *r, double *g, double *b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("zxlsmu6cv48cbb2gz66otml0"); // double f, p, q, t; UNSUPPORTED("8c67ztx4rycxh4gu2wweri33c"); // if (s <= 0.0) { /* achromatic */ UNSUPPORTED("94xhdyetsqaie6jerahy5j021"); // *r = v; UNSUPPORTED("9yacceicho3snok9td1kmsz9n"); // *g = v; UNSUPPORTED("8ocel5g2qz8h3vz6bplc9bqe1"); // *b = v; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("6yid2gjsrd4a5mnmskepuy6us"); // if (h >= 1.0) UNSUPPORTED("6n63uw6udor92ej9zr5x3cno3"); // h = 0.0; UNSUPPORTED("3i7f8yorkl1thq29uhkr8b1uu"); // h = 6.0 * h; UNSUPPORTED("12owlv8yrft4tfobrzyrgicux"); // i = (int) h; UNSUPPORTED("5u8p6i1s1982n1h0xpp8k1pro"); // f = h - (double) i; UNSUPPORTED("ajuk9rgsixt6bj32ar7rcc0y7"); // p = v * (1 - s); UNSUPPORTED("707y9q1bx5bjn1lvry15sl54u"); // q = v * (1 - (s * f)); UNSUPPORTED("jfjlwylasccbjb8xviddgimf"); // t = v * (1 - (s * (1 - f))); UNSUPPORTED("9bo1itj979wxduxtvlcn8uetb"); // switch (i) { UNSUPPORTED("46lzlkypfilrge90rkaiveuyb"); // case 0: UNSUPPORTED("3i88n1gcazf1gz2x4pkhnw9so"); // *r = v; UNSUPPORTED("bc8k4esl3g1mon6lhrh3ekj1w"); // *g = t; UNSUPPORTED("7yrzwjb1vtg9vfwd29ab2xh4d"); // *b = p; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("2o83im06dulx11wjpy469gkoa"); // case 1: UNSUPPORTED("1487j2wuhsnecg3oa9zmz8ykw"); // *r = q; UNSUPPORTED("1ynaxhs8cckpg37mv7f9id75r"); // *g = v; UNSUPPORTED("7yrzwjb1vtg9vfwd29ab2xh4d"); // *b = p; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("b8vgbvwzllfs4lrqmmqyr1spk"); // case 2: UNSUPPORTED("251n6pj3iysy48k21h1sj93lb"); // *r = p; UNSUPPORTED("1ynaxhs8cckpg37mv7f9id75r"); // *g = v; UNSUPPORTED("bdpl9tlkwe79rgxap4jt30wsz"); // *b = t; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1640m8as34e90xhvvtl877cmo"); // case 3: UNSUPPORTED("251n6pj3iysy48k21h1sj93lb"); // *r = p; UNSUPPORTED("nsh415cf187nepn41pky0qp2"); // *g = q; UNSUPPORTED("6p2xjajb6ttv9mqfeunzd9eil"); // *b = v; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("495y0cnvj5vci19wsufg88rrq"); // case 4: UNSUPPORTED("9fwms7ny5s08rx7kz1uyk22di"); // *r = t; UNSUPPORTED("d9mdl8v0dmc06nxrlfveytbxc"); // *g = p; UNSUPPORTED("6p2xjajb6ttv9mqfeunzd9eil"); // *b = v; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1wjv2f7dql1ddky1us3a7q5jq"); // case 5: UNSUPPORTED("3i88n1gcazf1gz2x4pkhnw9so"); // *r = v; UNSUPPORTED("d9mdl8v0dmc06nxrlfveytbxc"); // *g = p; UNSUPPORTED("85qonu4zwiaxex0rz7lnk8erp"); // *b = q; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dujzfvldmjwflku9wihupdxnv // static void rgb2hsv(double r, double g, double b, double *h, double *s, double *v) public static Object rgb2hsv(Object... arg) { UNSUPPORTED("c10593ciqiaa4rupftmpdu18r"); // static void rgb2hsv(double r, double g, double b, UNSUPPORTED("e4aaxkxcwspiazmche1j75xdt"); // double *h, double *s, double *v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("440ugp6g625kjfyqr3kq3jrya"); // double rgbmin, rgbmax; UNSUPPORTED("4zaqiduai9l3ps6u0ild4xiok"); // double rc, bc, gc; UNSUPPORTED("cii4xmgmg0i6aidwdo4k8lvrg"); // double ht = 0.0, st = 0.0; UNSUPPORTED("29eodvfgvnx0ikz7xtmlydoyb"); // rgbmin = MIN(r, MIN(g, b)); UNSUPPORTED("2q0rmom8c6ik02h6h0nuybjln"); // rgbmax = MAX(r, MAX(g, b)); UNSUPPORTED("1a9pi00vrpfpynvcdzxg33yji"); // if (rgbmax > 0.0) UNSUPPORTED("38gq7n4g3llpkn0d8h2ncfn4a"); // st = (rgbmax - rgbmin) / rgbmax; UNSUPPORTED("e92j0hzan753sveeu1kuwt73a"); // if (st > 0.0) { UNSUPPORTED("8yt1g8tezilw0yagtf68gd4qn"); // rc = (rgbmax - r) / (rgbmax - rgbmin); UNSUPPORTED("8h7ff4ogst5zbmyxcuu263r3l"); // gc = (rgbmax - g) / (rgbmax - rgbmin); UNSUPPORTED("5sstg8pw8w9jswa78mg2lp3o1"); // bc = (rgbmax - b) / (rgbmax - rgbmin); UNSUPPORTED("7qtihe7rt5ub2gdmz6y337qie"); // if (r == rgbmax) UNSUPPORTED("9f8cswgb2rpdygjlxjh2iulgq"); // ht = bc - gc; UNSUPPORTED("5m7yr50934hcucttwck4tl2o9"); // else if (g == rgbmax) UNSUPPORTED("brfmtodakxaatp88cgebeetdl"); // ht = 2 + rc - bc; UNSUPPORTED("7x8fw9oqxkymp3jp9hvfvoh7o"); // else if (b == rgbmax) UNSUPPORTED("5ev3v0kjv7x08a9yplztn6wa2"); // ht = 4 + gc - rc; UNSUPPORTED("aasi665vfkuijj147w3r3jb8b"); // ht = ht * 60.0; UNSUPPORTED("1wreejtyubn67ne2tfig9anp0"); // if (ht < 0.0) UNSUPPORTED("2cxp7z4dkecyj870xw6hya2rj"); // ht += 360.0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7970jq9aylmwywthy9p42i5fy"); // *h = ht / 360.0; UNSUPPORTED("6couzbc17vserykjutgcv7bau"); // *v = rgbmax; UNSUPPORTED("218fn8tnzsp40gkh5om1ut3qy"); // *s = st; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9dul807684jurxmxyyg1zyure // static void rgb2cmyk(double r, double g, double b, double *c, double *m, double *y, double *k) public static Object rgb2cmyk(Object... arg) { UNSUPPORTED("352h951qbn47q4ctnzbrevu5m"); // static void rgb2cmyk(double r, double g, double b, double *c, double *m, UNSUPPORTED("plznbj7ka6vfot5ko2iqa8gb"); // double *y, double *k) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("mlwnha0hbx9pl1rufkohkksk"); // *c = 1.0 - r; UNSUPPORTED("40r81y2k11kyitt5p234zhr70"); // *m = 1.0 - g; UNSUPPORTED("ds3bnptxye9sd8n9a6gnfbrf4"); // *y = 1.0 - b; UNSUPPORTED("562ybodfaiqpazgnghrz8vu3h"); // *k = *c < *m ? *c : *m; UNSUPPORTED("4agh1yjrfmwb2sia0cnj5q0j1"); // *k = *y < *k ? *y : *k; UNSUPPORTED("9tw36bdsk4la16ly056swg45a"); // *c -= *k; UNSUPPORTED("63fae2kzb2jh1n6rs66cvwviz"); // *m -= *k; UNSUPPORTED("bdgp8lodki7wk4jv9ml43a0zd"); // *y -= *k; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4yhpwysfqkk00mf4cyx28mzrl // static int colorcmpf(const void *p0, const void *p1) public static Object colorcmpf(Object... arg) { UNSUPPORTED("vnbeb7jqvgxfst4woiz27q00"); // static int colorcmpf(const void *p0, const void *p1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("anwjd7uy4hi0y3rmpq55acgx0"); // return strcasecmp(((hsvrgbacolor_t *) p0)->name, ((hsvrgbacolor_t *) p1)->name); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ax75qqr4my2r9ct8dbjvvjtx6 // char *canontoken(char *str) public static Object canontoken(Object... arg) { UNSUPPORTED("1629zjdfy374s0osuesihd243"); // char *canontoken(char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2v53bu6z6q950ej04e355vyf7"); // static unsigned char *canon; UNSUPPORTED("7bza0dswpz5oeunov6e43mgnz"); // static int allocated; UNSUPPORTED("8j8ixiwexrxoe86i1a876qdje"); // unsigned char c, *p, *q; UNSUPPORTED("dwe86466ugstemepdfk8yzphz"); // int len; UNSUPPORTED("1zhw3nw03w7084dt7cn5ig222"); // p = (unsigned char *) str; UNSUPPORTED("8vgrid9zcfh2t3gzsci2uvqde"); // len = strlen(str); UNSUPPORTED("6kgkyoeg9m2xhq784cr9r710f"); // if (len >= allocated) { UNSUPPORTED("choxsv8xq99cuoyy5rg3o3ufx"); // allocated = len + 1 + 10; UNSUPPORTED("ccnla80pbvf8pmi4mw346hsq"); // canon = grealloc(canon, allocated); UNSUPPORTED("evp8j7r652aqkdwzrhv80ufny"); // if (!canon) UNSUPPORTED("7t3fvwp9cv90qu5bdjdglcgtk"); // return NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("53qdbi352d1p2q9140cbko0cz"); // q = (unsigned char *) canon; UNSUPPORTED("5idssb31ihz3min8hoscutczg"); // while ((c = *p++)) { UNSUPPORTED("6oxkjdt12xal6ds7edudbei57"); // /* if (isalnum(c) == FALSE) */ UNSUPPORTED("9aswll10socwk83z1vt2t2vu5"); // /* continue; */ UNSUPPORTED("4ne58tc0bo4i4oz5o4b4jme6v"); // if (isupper(c)) UNSUPPORTED("815fsuia4alqab5oi8bf1fe1u"); // c = tolower(c); UNSUPPORTED("6ibj8xkzlbep7pg079j68cmn5"); // *q++ = c; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5i5738mywatxkhk4v46m08ovk"); // *q = '\0'; UNSUPPORTED("6nni1hupcgk2q8q167p2yra2t"); // return (char*)canon; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5vgbyvdcctqnygkqbcvf8gqkn // static char* fullColor (char* prefix, char* str) public static Object fullColor(Object... arg) { UNSUPPORTED("6jzwle4t7n644wac4w3ptbzmk"); // static char* fullColor (char* prefix, char* str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("424m1v4nzzlsabaud5t50dky9"); // static char *fulls; UNSUPPORTED("7bza0dswpz5oeunov6e43mgnz"); // static int allocated; UNSUPPORTED("5tzyrmochxttq8ah54w2vyt0t"); // int len = strlen (prefix) + strlen (str) + 3; UNSUPPORTED("6kgkyoeg9m2xhq784cr9r710f"); // if (len >= allocated) { UNSUPPORTED("5nfq8ajs2tcl63yizz227j6hh"); // allocated = len + 10; UNSUPPORTED("ahqyb9ue6f8my0dze9s8q9uqt"); // fulls = grealloc(fulls, allocated); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("f07r4c1sjki0te2vto68bc7d5"); // sprintf (fulls, "/%s/%s", prefix, str); UNSUPPORTED("585wlsg0zojpqdlnosc7sdtor"); // return fulls; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7fjoenpad8y11os28cr4ephqh // static char* resolveColor (char* str) public static Object resolveColor(Object... arg) { UNSUPPORTED("7m0ujhxnmed6v558yry5p4sic"); // static char* resolveColor (char* str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("yiuh599p05f2mpu2e3pesu2o"); // char* s; UNSUPPORTED("a7quapa33ocs19moe9pa284em"); // char* ss; /* second slash */ UNSUPPORTED("8rgzc2l3qs5gokf0lfbwmmhs3"); // char* c2; /* second char */ UNSUPPORTED("7ucbnwh0ljbustpvbj9f1fn8t"); // if ((*str == 'b') || !strncmp(str+1,"lack",4)) return str; UNSUPPORTED("a0xs3pzeccr79t7yxu1vm2r8u"); // if ((*str == 'w') || !strncmp(str+1,"hite",4)) return str; UNSUPPORTED("d8l6cky1r79llb12wx586fh0i"); // if ((*str == 'l') || !strncmp(str+1,"ightgrey",8)) return str; UNSUPPORTED("68g0vl4sfqxaix0eokby77miu"); // if (*str == '/') { /* if begins with '/' */ UNSUPPORTED("1thcre099akc701ud9cuvpzq9"); // c2 = str+1; UNSUPPORTED("8u609q2j81o8ca2nq875feu9l"); // if ((ss = strchr(c2, '/'))) { /* if has second '/' */ UNSUPPORTED("96qq76vindtvvu8py6ok6rsr8"); // if (*c2 == '/') { /* if second '/' is second character */ UNSUPPORTED("6ob87wfl5ntacrexwpvwr2quj"); // /* Do not compare against final '/' */ UNSUPPORTED("5o4dygmz7fi9rfd6gjdpg4y4o"); // if (((colorscheme) && *(colorscheme) && strncasecmp("X11/", colorscheme, ((sizeof("X11/")-1)/sizeof(char))-1))) UNSUPPORTED("bwvwh0rl4f7dxumtom7tf2aa0"); // s = fullColor (colorscheme, c2+1); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("6w0zpynuopuao5in4a5tgvx5f"); // s = c2+1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("3q14jpw2hoz4iitdnw1u99dd1"); // else if (strncasecmp("X11/", c2, ((sizeof("X11/")-1)/sizeof(char)))) s = str; UNSUPPORTED("7dtq56iupgwvfj9k3shmy1wkp"); // else s = ss + 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1rqtbmq74rzsr87zc33fdw705"); // else s = c2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("62rg8f7qxc5hu0156fliwf3ag"); // else if (((colorscheme) && *(colorscheme) && strncasecmp("X11/", colorscheme, ((sizeof("X11/")-1)/sizeof(char))-1))) s = fullColor (colorscheme, str); UNSUPPORTED("33x0otv2ficwuhmdfoii6co2s"); // else s = str; UNSUPPORTED("f133bzwue6od0ojktddh20n9o"); // return canontoken(s); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2zuzgeyimjdnf5mv3x8t0ki77 // int colorxlate(char *str, gvcolor_t * color, color_type_t target_type) public static Object colorxlate(Object... arg) { UNSUPPORTED("ehzhqf0ynhngejezvvyifodzu"); // int colorxlate(char *str, gvcolor_t * color, color_type_t target_type) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8dd4kyqg8a18xkqxxrnm0kpsx"); // static hsvrgbacolor_t *last; UNSUPPORTED("2v53bu6z6q950ej04e355vyf7"); // static unsigned char *canon; UNSUPPORTED("7bza0dswpz5oeunov6e43mgnz"); // static int allocated; UNSUPPORTED("31egkhuhw9vzm6yjeq3o989rg"); // unsigned char *p, *q; UNSUPPORTED("2pxbjw6strjq1x0l4vcvhnzrd"); // hsvrgbacolor_t fake; UNSUPPORTED("10sir32iwi5l2jyfgp65pihto"); // unsigned char c; UNSUPPORTED("f2swz3fpapldgb0ehjrn24ye6"); // double H, S, V, A, R, G, B; UNSUPPORTED("e82iuugluc7yqcpf1hzdj9t0b"); // double C, M, Y, K; UNSUPPORTED("5fmu1gaywyplm6yn24ng702iy"); // unsigned int r, g, b, a; UNSUPPORTED("2w4c2wk59z31rlianeffya4b7"); // int len, rc; UNSUPPORTED("3xampp1xmjli0ebd8k04oflkz"); // color->type = target_type; UNSUPPORTED("z00zvrgs8voqmzcegfqnd3mj"); // rc = 0; UNSUPPORTED("aa2xm983i87wm9yrret50wu7z"); // for (; *str == ' '; str++); /* skip over any leading whitespace */ UNSUPPORTED("1zhw3nw03w7084dt7cn5ig222"); // p = (unsigned char *) str; UNSUPPORTED("6ylglimpylokiuqholp7kc8f1"); // /* test for rgb value such as: "#ff0000" UNSUPPORTED("1hhw7mmcd7hy3tga5c2cy4uj1"); // or rgba value such as "#ff000080" */ UNSUPPORTED("dlrbi3u8m2m8y76z33sps4wba"); // a = 255; /* default alpha channel value=opaque in case not supplied */ UNSUPPORTED("5z0a0j45mhkka5aqm9y0dmg2"); // if ((*p == '#') UNSUPPORTED("aycrro09nwns8jn23jakn4e31"); // && (sscanf((char *) p, "#%2x%2x%2x%2x", &r, &g, &b, &a) >= 3)) { UNSUPPORTED("cqoqa6pnbr8t180lly83arzbf"); // switch (target_type) { UNSUPPORTED("8x2g67uo65ux7na4wn8yr2hoi"); // case HSVA_DOUBLE: UNSUPPORTED("dpkd6jyfsackl5xx7qm7yc3ju"); // R = (double) r / 255.0; UNSUPPORTED("cepcltt67wcchzsr6s990ntkq"); // G = (double) g / 255.0; UNSUPPORTED("4ntwadqpbmdf0t4d0ua8tquxu"); // B = (double) b / 255.0; UNSUPPORTED("c5xrk3b0ql8xij7ug0lc3j511"); // A = (double) a / 255.0; UNSUPPORTED("7p8xgh8y8u9gfp2723esq8nhr"); // rgb2hsv(R, G, B, &H, &S, &V); UNSUPPORTED("3c6fimz05io2h7r45jqm5akmd"); // color->u.HSVA[0] = H; UNSUPPORTED("dvkaok4qjui5j7he8uyb7cjkk"); // color->u.HSVA[1] = S; UNSUPPORTED("esjtk662lb2dnrfl7t3r19b07"); // color->u.HSVA[2] = V; UNSUPPORTED("a8ptt1hl64brvfj57jiv380y2"); // color->u.HSVA[3] = A; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4qyq5lb20pb6flw57yam37kot"); // case RGBA_BYTE: UNSUPPORTED("9fiju79nf1q6i93juztjnip4z"); // color->u.rgba[0] = r; UNSUPPORTED("1tmbx7r5acrevkd0wcmtzec6i"); // color->u.rgba[1] = g; UNSUPPORTED("5tqv0dfpaz9wlvpf33sd44mnj"); // color->u.rgba[2] = b; UNSUPPORTED("4ubswipncx92gv5jqv7v4n7un"); // color->u.rgba[3] = a; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("b18nw968wk9mdxeq4ho72d8xp"); // case CMYK_BYTE: UNSUPPORTED("dpkd6jyfsackl5xx7qm7yc3ju"); // R = (double) r / 255.0; UNSUPPORTED("cepcltt67wcchzsr6s990ntkq"); // G = (double) g / 255.0; UNSUPPORTED("4ntwadqpbmdf0t4d0ua8tquxu"); // B = (double) b / 255.0; UNSUPPORTED("7tttv6awjz9muyxywh3cs8h1a"); // rgb2cmyk(R, G, B, &C, &M, &Y, &K); UNSUPPORTED("c0b76suwtky43nbsirv28wize"); // color->u.cmyk[0] = (int) C *255; UNSUPPORTED("5yg3z9bc07yyfs901cvlx7p6b"); // color->u.cmyk[1] = (int) M *255; UNSUPPORTED("5rh4naug8vgufalo3q2odxixd"); // color->u.cmyk[2] = (int) Y *255; UNSUPPORTED("2ijzabu50uo431fzaevemaq3p"); // color->u.cmyk[3] = (int) K *255; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("3hhhktkxv13skdg8qtbqfccvb"); // case RGBA_WORD: UNSUPPORTED("bsssysiehopm4fcx00c71nb0u"); // color->u.rrggbbaa[0] = r * 65535 / 255; UNSUPPORTED("bc6z6ydxkwnxduq905k7ry0gj"); // color->u.rrggbbaa[1] = g * 65535 / 255; UNSUPPORTED("1u2tjaly9mqdx06awvx8fw8c4"); // color->u.rrggbbaa[2] = b * 65535 / 255; UNSUPPORTED("86f7yk4nr72y7ayyrc6e57135"); // color->u.rrggbbaa[3] = a * 65535 / 255; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1ap6qfmpr0qmmroo04n4v2y6p"); // case RGBA_DOUBLE: UNSUPPORTED("ammm9vmhuq93wsdacjqvvo546"); // color->u.RGBA[0] = (double) r / 255.0; UNSUPPORTED("5x5jz0u21i8uemni5rpvge5oa"); // color->u.RGBA[1] = (double) g / 255.0; UNSUPPORTED("9nfyug5ab9pqtaa0fxrdd2v8a"); // color->u.RGBA[2] = (double) b / 255.0; UNSUPPORTED("eyrh1tnmpdj4ybancy56dmmml"); // color->u.RGBA[3] = (double) a / 255.0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("3963t7kz3wj9jmr4b42bh0ikz"); // case COLOR_STRING: UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("8efm2ybg3ifrezi2q4fb03p57"); // case COLOR_INDEX: UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("eitnhp9lhv04qoq5fn35tp7p2"); // return rc; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e75g686bfy9mqu1k87in9vv1r"); // /* test for hsv value such as: ".6,.5,.3" */ UNSUPPORTED("e2k96empw2ygjnzfrqjpvgffr"); // if (((c = *p) == '.') || isdigit(c)) { UNSUPPORTED("3zq9jhiq7l7htzl88zmc4a0b2"); // len = strlen((char*)p); UNSUPPORTED("28up8t9arwfar8xkch24atnae"); // if (len >= allocated) { UNSUPPORTED("ddmhu29n34mvpbug20e7gfrpp"); // allocated = len + 1 + 10; UNSUPPORTED("c8rgido7c9hwk057p1nwflu9h"); // canon = grealloc(canon, allocated); UNSUPPORTED("3soihimxufqqtgztcecr5lan"); // if (! canon) { UNSUPPORTED("47umle9mvhgi9vy7toebc2zvw"); // rc = -1; UNSUPPORTED("cgwgihktqarc0n7hll268tdb4"); // return rc; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("d1cbfh7ze9z7h7rh3jxl96c8x"); // q = canon; UNSUPPORTED("6uczw0au913vi88zvveu2h0tl"); // while ((c = *p++)) { UNSUPPORTED("f0m7phmob63hrmzhuvohg5wet"); // if (c == ',') UNSUPPORTED("ael7ld07kdrxvpb8xj12l8vij"); // c = ' '; UNSUPPORTED("a1naxqdqse0i1gltpcxpqtfp9"); // *q++ = c; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cxlp7boqg1gqp4ii26w29519a"); // *q = '\0'; UNSUPPORTED("2ppiwy4oes1lkaol4e2nknf9c"); // if (sscanf((char *) canon, "%lf%lf%lf", &H, &S, &V) == 3) { UNSUPPORTED("2c8rcf5yaysr8fqa5ap1asp9j"); // /* clip to reasonable values */ UNSUPPORTED("4tzrqsjvx05il761enljel6n6"); // H = MAX(MIN(H, 1.0), 0.0); UNSUPPORTED("dqjpxih9a58hiwicuciw06vr4"); // S = MAX(MIN(S, 1.0), 0.0); UNSUPPORTED("2za1jxsv0x24f8jimgjfpvj15"); // V = MAX(MIN(V, 1.0), 0.0); UNSUPPORTED("7tcobltkij2n43sx05o9n6kug"); // switch (target_type) { UNSUPPORTED("3waht38mgt9ux3yz4zl4g1g4k"); // case HSVA_DOUBLE: UNSUPPORTED("nuwdoqw88otrz2ssylnbnhnh"); // color->u.HSVA[0] = H; UNSUPPORTED("f2w3ia24h1oa09rc6ewthuc5i"); // color->u.HSVA[1] = S; UNSUPPORTED("605q0z46ca4sxxsb3vb0rvj5o"); // color->u.HSVA[2] = V; UNSUPPORTED("6zqfqqrvuik71peygm447hc76"); // color->u.HSVA[3] = 1.0; /* opaque */ UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6ulscgeog9ank5opws5gczv7f"); // case RGBA_BYTE: UNSUPPORTED("99gjspcfmqpjeen6w12y4grb9"); // hsv2rgb(H, S, V, &R, &G, &B); UNSUPPORTED("bwjh16cq6yjwoe2p22hgy0pum"); // color->u.rgba[0] = (int) (R * 255); UNSUPPORTED("7pi61v8ugyyvumjdeyhcs1bzc"); // color->u.rgba[1] = (int) (G * 255); UNSUPPORTED("5ydlbqv65443sqvn73lcaww78"); // color->u.rgba[2] = (int) (B * 255); UNSUPPORTED("7thq3k4slxcy7ycv1gx28o9h0"); // color->u.rgba[3] = 255; /* opaque */ UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("1nx06r4czcqlfs4lqegi34ddz"); // case CMYK_BYTE: UNSUPPORTED("99gjspcfmqpjeen6w12y4grb9"); // hsv2rgb(H, S, V, &R, &G, &B); UNSUPPORTED("2bxuxozonvzepjt6utzrrqfdu"); // rgb2cmyk(R, G, B, &C, &M, &Y, &K); UNSUPPORTED("ehoij0dm9c7xnl5za53e9joub"); // color->u.cmyk[0] = (int) C *255; UNSUPPORTED("3kk069yq96yvqh7cbytq1oe9p"); // color->u.cmyk[1] = (int) M *255; UNSUPPORTED("pnh92bvbr8g0ovs0svdb0ety"); // color->u.cmyk[2] = (int) Y *255; UNSUPPORTED("8j6drpob4qn1tzqv46ezm2qta"); // color->u.cmyk[3] = (int) K *255; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("40ebfdiui5ixqhgg7n6ycmk1d"); // case RGBA_WORD: UNSUPPORTED("99gjspcfmqpjeen6w12y4grb9"); // hsv2rgb(H, S, V, &R, &G, &B); UNSUPPORTED("bqjm1u4dd0c7dgjivlp4lunfx"); // color->u.rrggbbaa[0] = (int) (R * 65535); UNSUPPORTED("7qa6nwupc5p5tzjy2j3sbpw84"); // color->u.rrggbbaa[1] = (int) (G * 65535); UNSUPPORTED("9upp88q1d7krwt03zdr7f2dp1"); // color->u.rrggbbaa[2] = (int) (B * 65535); UNSUPPORTED("v5ww88r64fhyefive8jpwod1"); // color->u.rrggbbaa[3] = 65535; /* opaque */ UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("f20hyopi99mh64hgvbob3629i"); // case RGBA_DOUBLE: UNSUPPORTED("99gjspcfmqpjeen6w12y4grb9"); // hsv2rgb(H, S, V, &R, &G, &B); UNSUPPORTED("6jkogp2xmtjsirkkt4gq0qk9g"); // color->u.RGBA[0] = R; UNSUPPORTED("9k4pjgp3uz7nshtjln3fy9auu"); // color->u.RGBA[1] = G; UNSUPPORTED("7y5ue1vo9dkn36t07st57ckmh"); // color->u.RGBA[2] = B; UNSUPPORTED("afan1dakanjzco4n2c6rjrxw1"); // color->u.RGBA[3] = 1.0; /* opaque */ UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("yi2ftsdqvd62kvijtv49ciof"); // case COLOR_STRING: UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("bptas91kxl67utozz0z9ksslp"); // case COLOR_INDEX: UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("boigxj79k0wl3vix6mrtksbik"); // return rc; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("akwwtrxikvsg54ppqaouiraja"); // /* test for known color name (generic, not renderer specific known names) */ UNSUPPORTED("bniidu3c7uw4j4gnlrw1sml7b"); // fake.name = resolveColor(str); UNSUPPORTED("a3ffcy8id0r4fealybty3ncv2"); // if (!fake.name) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("nlfkt4ol3t13u9upjdrx7dnl"); // if ((last == NULL) UNSUPPORTED("dcjahkpgs4yy496ikzaozniuw"); // || (last->name[0] != fake.name[0]) UNSUPPORTED("4nyn87tawoh9ejder70ax0di4"); // || (strcmp(last->name, fake.name))) { UNSUPPORTED("c8e30ys418x2wrqsniggk3h2u"); // last = (hsvrgbacolor_t *) bsearch((void *) &fake, UNSUPPORTED("13zn2zu4jxknhl31gd5np1hq9"); // (void *) color_lib, UNSUPPORTED("csk5c5fpsg633xn59o6ekp7kw"); // sizeof(color_lib) / UNSUPPORTED("326muvlkda3aeejlqnmab0unj"); // sizeof(hsvrgbacolor_t), sizeof(fake), UNSUPPORTED("92scws4jkdku0225nkuwyg3en"); // colorcmpf); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7wyv7w4rv25zss2ym7p8di9e"); // if (last != NULL) { UNSUPPORTED("cqoqa6pnbr8t180lly83arzbf"); // switch (target_type) { UNSUPPORTED("8x2g67uo65ux7na4wn8yr2hoi"); // case HSVA_DOUBLE: UNSUPPORTED("1p412ag7t6o00ebns760u1buq"); // color->u.HSVA[0] = ((double) last->h) / 255.0; UNSUPPORTED("3u2uzmxb21wo3n5ofhxvsos1j"); // color->u.HSVA[1] = ((double) last->s) / 255.0; UNSUPPORTED("1f7avk3ldrvt4iqyousfpakfa"); // color->u.HSVA[2] = ((double) last->v) / 255.0; UNSUPPORTED("9cutkzl8ytljfv3pdlcwwuo39"); // color->u.HSVA[3] = ((double) last->a) / 255.0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4qyq5lb20pb6flw57yam37kot"); // case RGBA_BYTE: UNSUPPORTED("euv8extiyg9ojwarxbdg173x0"); // color->u.rgba[0] = last->r; UNSUPPORTED("ew13r0uorvrr11af042y87wox"); // color->u.rgba[1] = last->g; UNSUPPORTED("ama3ynaxltjqwoy88w1z0aarf"); // color->u.rgba[2] = last->b; UNSUPPORTED("1chs0ktvl6et5zijblcp8qlnr"); // color->u.rgba[3] = last->a; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("b18nw968wk9mdxeq4ho72d8xp"); // case CMYK_BYTE: UNSUPPORTED("yiknpgciig2uwoai0h23rlk8"); // R = (last->r) / 255.0; UNSUPPORTED("xlpnj1maqomtvccdwcrsa06q"); // G = (last->g) / 255.0; UNSUPPORTED("956if091oxzp9zfflftahx9vj"); // B = (last->b) / 255.0; UNSUPPORTED("7tttv6awjz9muyxywh3cs8h1a"); // rgb2cmyk(R, G, B, &C, &M, &Y, &K); UNSUPPORTED("dq3d8fxtdbd8vmi1ctrbouqys"); // color->u.cmyk[0] = (int) C * 255; UNSUPPORTED("1v32c1lsmzvu5i9ciubbfzgj8"); // color->u.cmyk[1] = (int) M * 255; UNSUPPORTED("8ilbscdq894a1u0mxx9qehekv"); // color->u.cmyk[2] = (int) Y * 255; UNSUPPORTED("4p9d1nzs3tw96wxlefrt3dbum"); // color->u.cmyk[3] = (int) K * 255; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("3hhhktkxv13skdg8qtbqfccvb"); // case RGBA_WORD: UNSUPPORTED("2chrmq478c0dkbx2vtuzkttt3"); // color->u.rrggbbaa[0] = last->r * 65535 / 255; UNSUPPORTED("elxida3hf2w5648hreja3h77h"); // color->u.rrggbbaa[1] = last->g * 65535 / 255; UNSUPPORTED("7vfbr6rrlg6254zzkf6ezthyz"); // color->u.rrggbbaa[2] = last->b * 65535 / 255; UNSUPPORTED("9d0ijf90chv5xiy3wyak6svth"); // color->u.rrggbbaa[3] = last->a * 65535 / 255; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1ap6qfmpr0qmmroo04n4v2y6p"); // case RGBA_DOUBLE: UNSUPPORTED("c8i3r57st2or1lb0p5zmpjbel"); // color->u.RGBA[0] = last->r / 255.0; UNSUPPORTED("bad4ojyrfigi4mmom4cehxisg"); // color->u.RGBA[1] = last->g / 255.0; UNSUPPORTED("e69nmcysppzvuafruou5z51pw"); // color->u.RGBA[2] = last->b / 255.0; UNSUPPORTED("5x4y6hddq6bkpbfumqlnf287x"); // color->u.RGBA[3] = last->a / 255.0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("3963t7kz3wj9jmr4b42bh0ikz"); // case COLOR_STRING: UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("8efm2ybg3ifrezi2q4fb03p57"); // case COLOR_INDEX: UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("eitnhp9lhv04qoq5fn35tp7p2"); // return rc; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c2rphnmj3qjo7esjrr8lrf9n8"); // /* if we're still here then we failed to find a valid color spec */ UNSUPPORTED("7g304hflsebasgkwe7p0ogfcf"); // rc = 1; UNSUPPORTED("7g1g78rlfxhrdbth346b6va3v"); // switch (target_type) { UNSUPPORTED("3xh9pvlzl0se6kai61hpvztb0"); // case HSVA_DOUBLE: UNSUPPORTED("77m5r1fi548i2a3r9s6x0gsce"); // color->u.HSVA[0] = color->u.HSVA[1] = color->u.HSVA[2] = 0.0; UNSUPPORTED("8r2m62v2wseqye77wjj1iuzx5"); // color->u.HSVA[3] = 1.0; /* opaque */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1ke9k1couoeb4od2nwibgg0xu"); // case RGBA_BYTE: UNSUPPORTED("3f06oe6h7bl42mxja847kojce"); // color->u.rgba[0] = color->u.rgba[1] = color->u.rgba[2] = 0; UNSUPPORTED("epcd3n4y8gy400i35b2dx3dfz"); // color->u.rgba[3] = 255; /* opaque */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3setnlgc8vsi8j9jzph3w3tgw"); // case CMYK_BYTE: UNSUPPORTED("8moqdtdmwf0umamz8fe6mppyd"); // color->u.cmyk[0] = UNSUPPORTED("66cowglrsnm9ygf0ojc1i0tka"); // color->u.cmyk[1] = color->u.cmyk[2] = color->u.cmyk[3] = 0; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1gc399p944szfhhd18p1c2zde"); // case RGBA_WORD: UNSUPPORTED("a7056wzw9fyolfdizijjxbrnr"); // color->u.rrggbbaa[0] = color->u.rrggbbaa[1] = color->u.rrggbbaa[2] = 0; UNSUPPORTED("4e0n7dmb7rj5h0oatmxqc3lv2"); // color->u.rrggbbaa[3] = 65535; /* opaque */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("ix5z8u4vldva0mpwk1hnmx3s"); // case RGBA_DOUBLE: UNSUPPORTED("a86aiakru49t2tk7tg5y7ym3h"); // color->u.RGBA[0] = color->u.RGBA[1] = color->u.RGBA[2] = 0.0; UNSUPPORTED("ck9hrfq4njkslj58o9vzim5wf"); // color->u.RGBA[3] = 1.0; /* opaque */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8d4tzwdd3f608e3jl4lzyugu0"); // case COLOR_STRING: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("aa8lnx1ghmaq1qg4pxuhfpz9d"); // case COLOR_INDEX: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5bc9k4vsl6g7wejc5xefc5964"); // return rc; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6xt07sam57leaegn555zem71x // static void rgba_wordToByte (int* rrggbbaa, unsigned char* rgba) public static Object rgba_wordToByte(Object... arg) { UNSUPPORTED("bao9ostouhscklw6g4sr9d1ca"); // static void rgba_wordToByte (int* rrggbbaa, unsigned char* rgba) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("a2n8aqfq0cqpx8elstmfn9oq6"); // for (i = 0; i < 4; i++) { UNSUPPORTED("56z2bopl8zqqjgty1iei0mdz8"); // rgba[i] = rrggbbaa[i] * 255 / 65535; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6yolsjak65tidlbndbkdir4zi // static void rgba_dblToByte (double* RGBA, unsigned char* rgba) public static Object rgba_dblToByte(Object... arg) { UNSUPPORTED("44ty1s8y3t609jxlz3dhwo8up"); // static void rgba_dblToByte (double* RGBA, unsigned char* rgba) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("a2n8aqfq0cqpx8elstmfn9oq6"); // for (i = 0; i < 4; i++) { UNSUPPORTED("7top6cd4psdex6hfkw4d92a5z"); // rgba[i] = (unsigned char)(RGBA[i] * 255); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4u0xx0imm7gw6d27a58wt7uhd // int colorCvt(gvcolor_t *ocolor, gvcolor_t *ncolor) public static Object colorCvt(Object... arg) { UNSUPPORTED("crf94filr3nvamikn2fv9l283"); // int colorCvt(gvcolor_t *ocolor, gvcolor_t *ncolor) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1bh3yj957he6yv2dkeg4pzwdk"); // int rc; UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("yiuh599p05f2mpu2e3pesu2o"); // char* s; UNSUPPORTED("7n0bnxi86o1eioqyouz3afqm6"); // unsigned char rgba[4]; UNSUPPORTED("4rev51u4r7578qsqtboqis36t"); // if (ocolor->type == ncolor->type) { UNSUPPORTED("b5cexskqcmrvkru1pwloy29ap"); // memcpy (&ncolor->u, &ocolor->u, sizeof(ocolor->u)); UNSUPPORTED("awjmnc3xe191yrjoav96x4t6i"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("29yartnlkg78jtqss7wvr2ukx"); // s = buf; UNSUPPORTED("bprjantrlt6985c2t92ljx17q"); // switch (ocolor->type) { UNSUPPORTED("85pg3jiffmuxf208m722qskve"); // case HSVA_DOUBLE : UNSUPPORTED("b61kxubde7agaa67lf3047gw9"); // sprintf (buf, "%.03f %.03f %.03f %.03f", UNSUPPORTED("ecz167vvi43rqv3i1be6y9d44"); // ocolor->u.HSVA[0], ocolor->u.HSVA[1], ocolor->u.HSVA[2], ocolor->u.HSVA[3]); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dxegdbspzy9czkr6nd5x8poe1"); // case RGBA_BYTE : UNSUPPORTED("bdfv0m39061r7mieslqyunk37"); // sprintf (buf, "#%02x%02x%02x%02x", UNSUPPORTED("eavvghusqadvoi5m9t899gywv"); // ocolor->u.rgba[0], ocolor->u.rgba[1], ocolor->u.rgba[2], ocolor->u.rgba[3]); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1gc399p944szfhhd18p1c2zde"); // case RGBA_WORD: UNSUPPORTED("ahox2to99gp3ku632fit5yh2w"); // rgba_wordToByte (ocolor->u.rrggbbaa, rgba); UNSUPPORTED("dvj2lr88uw99nw4a2fsu74quo"); // sprintf (buf, "#%02x%02x%02x%02x", rgba[0], rgba[1], rgba[2], rgba[3]); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("ix5z8u4vldva0mpwk1hnmx3s"); // case RGBA_DOUBLE: UNSUPPORTED("a04b7du8qje7yf4tbvp5yadym"); // rgba_dblToByte (ocolor->u.RGBA, rgba); UNSUPPORTED("dvj2lr88uw99nw4a2fsu74quo"); // sprintf (buf, "#%02x%02x%02x%02x", rgba[0], rgba[1], rgba[2], rgba[3]); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8d4tzwdd3f608e3jl4lzyugu0"); // case COLOR_STRING: UNSUPPORTED("e7srlpjuk0ycck3ei9y4xotvg"); // s = ocolor->u.string; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8p4y43r1r9vccmnk4h3h083v9"); // case CMYK_BYTE : UNSUPPORTED("1z040zrivaz8vtuh8w8a4mqsn"); // /* agerr (AGWARN, "Input color type 'CMYK_BYTE' not supported for conversion\n"); */ UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("aa8lnx1ghmaq1qg4pxuhfpz9d"); // case COLOR_INDEX: UNSUPPORTED("99jz8sfo7x4ocdi773b6ja0za"); // /* agerr (AGWARN, "Input color type 'COLOR_INDEX' not supported for conversion\n"); */ UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("dxk2qiq2wg8ckisq3kx3k8wd"); // /* agerr (AGWARN, "Unknown input color type value '%u'\n", ncolor->type); */ UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("eq82slwrwm0pcpqius7pgtlrn"); // rc = colorxlate (s, ncolor, ncolor->type); UNSUPPORTED("5bc9k4vsl6g7wejc5xefc5964"); // return rc; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 idov6ir1ql05vewhvosl6zmm // void setColorScheme (char* s) public static Object setColorScheme(Object... arg) { UNSUPPORTED("aae50vjirjpwewp57f09nxgqi"); // void setColorScheme (char* s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9d6vms1yygd86dcdp61pb75o5"); // colorscheme = s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/ellipse__c.java000066400000000000000000001334251312650303100222250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class ellipse__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8vtqch9vmg15ugkvb5kjl1qj0 // static void computeFoci(ellipse_t * ep) public static Object computeFoci(Object... arg) { UNSUPPORTED("5bcbitmdppffwahp7nmlbi83r"); // static void computeFoci(ellipse_t * ep) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eid8kqvkuydr459fnsfbtpyc3"); // double d = sqrt(ep->a * ep->a - ep->b * ep->b); UNSUPPORTED("eeaywijqk4uxvw19tkbgu253m"); // double dx = d * ep->cosTheta; UNSUPPORTED("7vyd4ve72btbkfo43shwx7kau"); // double dy = d * ep->sinTheta; UNSUPPORTED("br7a9whx0v42l4kzkaa11t9pa"); // ep->xF1 = ep->cx - dx; UNSUPPORTED("dnp04v8l7mdx3jxxtc3sec415"); // ep->yF1 = ep->cy - dy; UNSUPPORTED("9hptigk23rnp3v4o7v1c9xvmx"); // ep->xF2 = ep->cx + dx; UNSUPPORTED("e94dmwui1l6ntq9ng55xax8sz"); // ep->yF2 = ep->cy + dy; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dbew322vv0bgrg4pymgszeaae // static void computeEndPoints(ellipse_t * ep) public static Object computeEndPoints(Object... arg) { UNSUPPORTED("rteaacx2szzim69sc25f66sp"); // static void computeEndPoints(ellipse_t * ep) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("852vsfhje4mvzn5rx2n6haj3a"); // double aCosEta1 = ep->a * cos(ep->eta1); UNSUPPORTED("5vmwuoxk5n6ypgduysu1dh0kp"); // double bSinEta1 = ep->b * sin(ep->eta1); UNSUPPORTED("4ezeyj8mjzl0ud7yld078fcyn"); // double aCosEta2 = ep->a * cos(ep->eta2); UNSUPPORTED("5opkvasd5uqsvfp6dk3070nav"); // double bSinEta2 = ep->b * sin(ep->eta2); UNSUPPORTED("8epdhhsfs576m8gn5ouli23am"); // // start point UNSUPPORTED("auzwiyyj4hsb2eboae8lyqlmr"); // ep->x1 = ep->cx + aCosEta1 * ep->cosTheta - bSinEta1 * ep->sinTheta; UNSUPPORTED("2fkvvtpflc1gcev5x50ukgmni"); // ep->y1 = ep->cy + aCosEta1 * ep->sinTheta + bSinEta1 * ep->cosTheta; UNSUPPORTED("3t5jjvo0n6xmvf92fj004j0hs"); // // end point UNSUPPORTED("ejinp3zk9hy2cymz06oocdlyj"); // ep->x2 = ep->cx + aCosEta2 * ep->cosTheta - bSinEta2 * ep->sinTheta; UNSUPPORTED("dpv02upzejm2ish3bydlsyc1z"); // ep->y2 = ep->cy + aCosEta2 * ep->sinTheta + bSinEta2 * ep->cosTheta; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 f3ru0t0ysk3xq8fbxnr5ujcol // static void computeBounds(ellipse_t * ep) public static Object computeBounds(Object... arg) { UNSUPPORTED("9u1yf6gyi3s9qsowre67k9cox"); // static void computeBounds(ellipse_t * ep) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1jhf3o4xhvl4fndu7fi826pia"); // double bOnA = ep->b / ep->a; UNSUPPORTED("bee7zzfdd190fvfubd4fs5b6l"); // double etaXMin, etaXMax, etaYMin, etaYMax; UNSUPPORTED("5afe3vaihk6e4p8x6gy8qfhcr"); // if (abs(ep->sinTheta) < 0.1) { UNSUPPORTED("b44ulenttvb6b1j69bgmz2dyb"); // double tanTheta = ep->sinTheta / ep->cosTheta; UNSUPPORTED("8i8hnf634d0hep4k8kabadrxc"); // if (ep->cosTheta < 0) { UNSUPPORTED("4b1t0o4s7kq4i1undk0da0jcz"); // etaXMin = -atan(tanTheta * bOnA); UNSUPPORTED("b7jmwu8pdrcw664uippx0c5la"); // etaXMax = etaXMin + M_PI; UNSUPPORTED("edthlj4laeqv2dvsbdo0ujj77"); // etaYMin = 0.5 * M_PI - atan(tanTheta / bOnA); UNSUPPORTED("9uxxapjhe1pfj97wusc80hs82"); // etaYMax = etaYMin + M_PI; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("5xmqdjsimutfhanihqci92yoj"); // etaXMax = -atan(tanTheta * bOnA); UNSUPPORTED("k1fpex84n120tc9umch4dd0n"); // etaXMin = etaXMax - M_PI; UNSUPPORTED("2i5a5rw4qsc8scf27aedttnj5"); // etaYMax = 0.5 * M_PI - atan(tanTheta / bOnA); UNSUPPORTED("2414bgwj0n3olrl7u8abdy7hm"); // etaYMin = etaYMax - M_PI; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("dnl9l5tyykjo0dn6xjrbhnfaz"); // double invTanTheta = ep->cosTheta / ep->sinTheta; UNSUPPORTED("n4to8nhj56e7uztxuu78u0sv"); // if (ep->sinTheta < 0) { UNSUPPORTED("e9iw0rwef6vz2hztrrbzy3v6k"); // etaXMax = 0.5 * M_PI + atan(invTanTheta / bOnA); UNSUPPORTED("k1fpex84n120tc9umch4dd0n"); // etaXMin = etaXMax - M_PI; UNSUPPORTED("1cy9nyh492abntcky0ue533o7"); // etaYMin = atan(invTanTheta * bOnA); UNSUPPORTED("9uxxapjhe1pfj97wusc80hs82"); // etaYMax = etaYMin + M_PI; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("ckx1q1okd2zthayurvcirb8w3"); // etaXMin = 0.5 * M_PI + atan(invTanTheta / bOnA); UNSUPPORTED("b7jmwu8pdrcw664uippx0c5la"); // etaXMax = etaXMin + M_PI; UNSUPPORTED("1sqp1jtgyx1b6flh58samo02q"); // etaYMax = atan(invTanTheta * bOnA); UNSUPPORTED("2414bgwj0n3olrl7u8abdy7hm"); // etaYMin = etaYMax - M_PI; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7ltffkplh3lj7prv6bon5ei7e"); // etaXMin -= ((2*M_PI) * floor((etaXMin - ep->eta1) / (2*M_PI))); UNSUPPORTED("ady72sy3azf76ixh9cxjttc56"); // etaYMin -= ((2*M_PI) * floor((etaYMin - ep->eta1) / (2*M_PI))); UNSUPPORTED("9c6vacohw6o4p1e7voqrkz6n6"); // etaXMax -= ((2*M_PI) * floor((etaXMax - ep->eta1) / (2*M_PI))); UNSUPPORTED("cwmxqy86krxnxsomsoybaspuc"); // etaYMax -= ((2*M_PI) * floor((etaYMax - ep->eta1) / (2*M_PI))); UNSUPPORTED("dij74k8lt7yzvn6n6xmfq75n8"); // ep->xLeft = (etaXMin <= ep->eta2) UNSUPPORTED("1ukn2pq6zv8y6a9fgougih6wt"); // ? (ep->cx + ep->a * cos(etaXMin) * ep->cosTheta - UNSUPPORTED("aa4t9o7jjo8u8eqipf4kbzcq0"); // ep->b * sin(etaXMin) * ep->sinTheta) UNSUPPORTED("3zjfvhmp6k0k6v7hdfkdlto1q"); // : MIN(ep->x1, ep->x2); UNSUPPORTED("atkfn6kpphewnxtsynnmvfeel"); // ep->yUp = (etaYMin <= ep->eta2) UNSUPPORTED("58sfpd21ohh829mr07sxluba8"); // ? (ep->cy + ep->a * cos(etaYMin) * ep->sinTheta + UNSUPPORTED("exo6jd6mgq4ngv2kzclxi72p7"); // ep->b * sin(etaYMin) * ep->cosTheta) UNSUPPORTED("3h3l4h9ad373p847bxm8pti3o"); // : MIN(ep->y1, ep->y2); UNSUPPORTED("6y80nhe43fd7avmd01vjaydxv"); // ep->width = ((etaXMax <= ep->eta2) UNSUPPORTED("9rbb1o9htcoqa6f7h6yld63s8"); // ? (ep->cx + ep->a * cos(etaXMax) * ep->cosTheta - UNSUPPORTED("9abeby5gfh0jqgx8dk98hr2fc"); // ep->b * sin(etaXMax) * ep->sinTheta) UNSUPPORTED("bhv1vywv9qd5ca6t99xgkzk17"); // : MAX(ep->x1, ep->x2)) - ep->xLeft; UNSUPPORTED("2exid5xh3kknda3ysp93l9d3s"); // ep->height = ((etaYMax <= ep->eta2) UNSUPPORTED("1wxk3315oh6f0xk0syz7qugv"); // ? (ep->cy + ep->a * cos(etaYMax) * ep->sinTheta + UNSUPPORTED("1y457377scnua66r6tsljyj7u"); // ep->b * sin(etaYMax) * ep->cosTheta) UNSUPPORTED("8imiuzth6v80tk5lgs51w60jr"); // : MAX(ep->y1, ep->y2)) - ep->yUp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6ux66xrlzxo48ong9gml2cqz6 // static void initEllipse(ellipse_t * ep, double cx, double cy, double a, double b, double theta, double lambda1, double lambda2) public static Object initEllipse(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("4qt5lx5lec9tzx3nexn72e2p0"); // initEllipse(ellipse_t * ep, double cx, double cy, double a, double b, UNSUPPORTED("4fozc01yvrouj1drvzdcxx8tz"); // double theta, double lambda1, double lambda2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("90mx2sux5frp9aptmc8h9ye7y"); // ep->cx = cx; UNSUPPORTED("52hr1pca3zdv84xe26bd4fgng"); // ep->cy = cy; UNSUPPORTED("2aclnqswxw7pae437ifnxl13f"); // ep->a = a; UNSUPPORTED("36t2inuf67b2oiq7lep7z0zsh"); // ep->b = b; UNSUPPORTED("76yrwughjo484aczhkqz91f8c"); // ep->theta = theta; UNSUPPORTED("3lkrt052c6yilscp9h7qbjesg"); // ep->eta1 = atan2(sin(lambda1) / b, cos(lambda1) / a); UNSUPPORTED("b583gqgxa482v3bdcaa3hmw6q"); // ep->eta2 = atan2(sin(lambda2) / b, cos(lambda2) / a); UNSUPPORTED("cyam280f24o4coz4q6l0avz1t"); // ep->cosTheta = cos(theta); UNSUPPORTED("a0l008pmkvmqfo8fhm5sr77zm"); // ep->sinTheta = sin(theta); UNSUPPORTED("75g4xmc5yynuwuvgw4zi23c2l"); // // make sure we have eta1 <= eta2 <= eta1 + 2*PI UNSUPPORTED("1kto59za5qccggp3qkrmli3lb"); // ep->eta2 -= (2*M_PI) * floor((ep->eta2 - ep->eta1) / (2*M_PI)); UNSUPPORTED("4hr1qdifrsqwsjgm5wxg8i4zo"); // // the preceding correction fails if we have exactly eta2 - eta1 = 2*PI UNSUPPORTED("2f6g4qg6bii7atjcpo9cpc4kg"); // // it reduces the interval to zero length UNSUPPORTED("1ezgfy2ndbltclwxwp8oojvm"); // if ((lambda2 - lambda1 > M_PI) && (ep->eta2 - ep->eta1 < M_PI)) { UNSUPPORTED("bynickn53la7xh8nqg3h8i1w"); // ep->eta2 += (2*M_PI); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cccwh34t2pmjflf3kvq62r2x7"); // computeFoci(ep); UNSUPPORTED("wwi2rzhppnx0345v75k7kshh"); // computeEndPoints(ep); UNSUPPORTED("7i38ish6k60higbgoc0t6zryh"); // computeBounds(ep); UNSUPPORTED("8fv18ee53q0sd6joolf3c8tjf"); // /* Flatness parameters */ UNSUPPORTED("5xixk4yhld5skmu6j7lpzrkg5"); // ep->f = (ep->a - ep->b) / ep->a; UNSUPPORTED("6dycpzwekx4x3ruzple8snldz"); // ep->e2 = ep->f * (2.0 - ep->f); UNSUPPORTED("adhmukdd7ygvxewqssb73dt59"); // ep->g = 1.0 - ep->f; UNSUPPORTED("1e4mn2c02ynfoqykfwkqf80y7"); // ep->g2 = ep->g * ep->g; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 modnvis05b2ap40fth36fsbx // typedef double erray_t[2][4][4] //1 c28e3zyflxpxh5u2y5l9lxth7 // static erray_t coeffs2Low = //1 8xpyyldrcpysiemcf8n5fzkce // static erray_t coeffs2High = //1 8srrrv3xnjrk83hlma25mqog0 // static double safety2[] = //1 c8as7txd6r6suzmt2cdon5boo // static erray_t coeffs3Low = //1 5530t4mftd6n4c3wvqkmwe6pb // static erray_t coeffs3High = //1 4jjyqprhu52o35a0x8um9rzbj // static double safety3[] = //3 f45byv8jwcavrwa02m57bsq2f // static double estimateError(ellipse_t * ep, int degree, double etaA, double etaB) public static Object estimateError(Object... arg) { UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double UNSUPPORTED("81pe9jboqg99odbe4gatii9o5"); // estimateError(ellipse_t * ep, int degree, double etaA, double etaB) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4nqjmzm78sbspzbbvh83l1wqj"); // double c0, c1, eta = 0.5 * (etaA + etaB); UNSUPPORTED("ei3ryx6a8qmb3j08w0r38fm5m"); // if (degree < 2) { UNSUPPORTED("bafgj5541k02iovom9pghd35i"); // // start point UNSUPPORTED("al3j4ybn9xey3d8hxfovxes0r"); // double aCosEtaA = ep->a * cos(etaA); UNSUPPORTED("6j0wqgniqhykqlxzy5nfjkcht"); // double bSinEtaA = ep->b * sin(etaA); UNSUPPORTED("5v68bplm2zxmrq1941oy9c0he"); // double xA = UNSUPPORTED("7hlnzbhb4vu0s8m3iekr9hs7i"); // ep->cx + aCosEtaA * ep->cosTheta - bSinEtaA * ep->sinTheta; UNSUPPORTED("bakm3osn3jh0yvyhjtb8auiqf"); // double yA = UNSUPPORTED("25tfmxpd3xeq7idm8hg6smumu"); // ep->cy + aCosEtaA * ep->sinTheta + bSinEtaA * ep->cosTheta; UNSUPPORTED("57vo4lo58ualncbhe0g66qqxo"); // // end point UNSUPPORTED("e1lvbiz37gwq3w3lsbwmywejy"); // double aCosEtaB = ep->a * cos(etaB); UNSUPPORTED("6g4xkqaa3vkriejl85k6d6ip8"); // double bSinEtaB = ep->b * sin(etaB); UNSUPPORTED("5b70fbxrii2h834flkxu129e3"); // double xB = UNSUPPORTED("ctwnvvfffsf081yo227cp2slu"); // ep->cx + aCosEtaB * ep->cosTheta - bSinEtaB * ep->sinTheta; UNSUPPORTED("74m124l1fdd7igt4ja3mvquo1"); // double yB = UNSUPPORTED("efdfyhsh3wk8cpsn3nrf1ib7m"); // ep->cy + aCosEtaB * ep->sinTheta + bSinEtaB * ep->cosTheta; UNSUPPORTED("d6dlj9oid3ny4l1nt34bpj05b"); // // maximal error point UNSUPPORTED("9mm8mdhifxed86jq3pangsa8k"); // double aCosEta = ep->a * cos(eta); UNSUPPORTED("4rv2z0s2o3hox4otx4uyxx16r"); // double bSinEta = ep->b * sin(eta); UNSUPPORTED("53v1o3w0oa8nltejmlnlem1c8"); // double x = UNSUPPORTED("ddk8om4owxtmb9qebyops2xgx"); // ep->cx + aCosEta * ep->cosTheta - bSinEta * ep->sinTheta; UNSUPPORTED("d6e8tgeqiqg1hn73iswv050l5"); // double y = UNSUPPORTED("6jzcvmj8xlc2s6kq5pn8zgiq1"); // ep->cy + aCosEta * ep->sinTheta + bSinEta * ep->cosTheta; UNSUPPORTED("7shptv1gfgw2txdkiohaew5qu"); // double dx = xB - xA; UNSUPPORTED("7q4tonxuivpv3r60br713u8cw"); // double dy = yB - yA; UNSUPPORTED("7dxwccoxgtghiyyg2nbgngdrt"); // return abs(x * dy - y * dx + xB * yA - xA * yB) UNSUPPORTED("6ttfnx9a8ob4ukzb7oecubvg9"); // / sqrt(dx * dx + dy * dy); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("2y5n6pky28slb57ykhvtcp62n"); // double x = ep->b / ep->a; UNSUPPORTED("2csh64kflwrp07e3dwv9oz03t"); // double dEta = etaB - etaA; UNSUPPORTED("et9z35jbfy808p3b42ps137cy"); // double cos2 = cos(2 * eta); UNSUPPORTED("asyn8y03tdpjngvspmbkqth8c"); // double cos4 = cos(4 * eta); UNSUPPORTED("dbgklearxausxvblrhmwm69km"); // double cos6 = cos(6 * eta); UNSUPPORTED("a58pvybppvlmnbdyx45xdpyzw"); // // select the right coefficient's set according to degree and b/a UNSUPPORTED("2258kkvkn5md3tcdny03b96k2"); // double (*coeffs)[4][4]; UNSUPPORTED("1ukfunkznhy5tkck4go86qhv9"); // double *safety; UNSUPPORTED("1o8yyd7ow42gdsrc8ewk6le6n"); // if (degree == 2) { UNSUPPORTED("41zkkw49rrvzklq1eqh9s2s9r"); // coeffs = (x < 0.25) ? coeffs2Low : coeffs2High; UNSUPPORTED("cg5jc2ey7bz90ddwt40jqnapb"); // safety = safety2; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("9rtt3vwq0rhvfakl2i8tdk8be"); // coeffs = (x < 0.25) ? coeffs3Low : coeffs3High; UNSUPPORTED("egps64f0a68wnh3q6fx4p2ysy"); // safety = safety3; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("eml5k8qxnrchzpqnm01ruuwqo"); // c0 = ((x * (x * coeffs[0][0][0] + coeffs[0][0][1]) + coeffs[0][0][2]) / (x + coeffs[0][0][3])) UNSUPPORTED("cqxpgi4zr6bvyfr0o4mp6rd5s"); // + cos2 * ((x * (x * coeffs[0][1][0] + coeffs[0][1][1]) + coeffs[0][1][2]) / (x + coeffs[0][1][3])) UNSUPPORTED("b2eaiaddcuwhzq50t4gatlzww"); // + cos4 * ((x * (x * coeffs[0][2][0] + coeffs[0][2][1]) + coeffs[0][2][2]) / (x + coeffs[0][2][3])) UNSUPPORTED("3d527fertf5i60a5fk29pct9d"); // + cos6 * ((x * (x * coeffs[0][3][0] + coeffs[0][3][1]) + coeffs[0][3][2]) / (x + coeffs[0][3][3])); UNSUPPORTED("c6s11bu0ckntk4q6dyit2jxic"); // c1 = ((x * (x * coeffs[1][0][0] + coeffs[1][0][1]) + coeffs[1][0][2]) / (x + coeffs[1][0][3])) UNSUPPORTED("f3pfupz6exjm23p6vys39euar"); // + cos2 * ((x * (x * coeffs[1][1][0] + coeffs[1][1][1]) + coeffs[1][1][2]) / (x + coeffs[1][1][3])) UNSUPPORTED("bgs8cv8obm3ryyjj229tlmswm"); // + cos4 * ((x * (x * coeffs[1][2][0] + coeffs[1][2][1]) + coeffs[1][2][2]) / (x + coeffs[1][2][3])) UNSUPPORTED("azmk1qgarnulp3giuvas37jno"); // + cos6 * ((x * (x * coeffs[1][3][0] + coeffs[1][3][1]) + coeffs[1][3][2]) / (x + coeffs[1][3][3])); UNSUPPORTED("1ky4r4vl6t393yk9kbgw7bh2x"); // return ((x * (x * safety[0] + safety[1]) + safety[2]) / (x + safety[3])) * ep->a * exp(c0 + c1 * dEta); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 70xw8j1k8uyzbal94r6eojd9y // static int bufsize //3 6ob4t12ro0s6l779gciak3bch // static void moveTo(Ppolyline_t * path, double x, double y) public static Object moveTo(Object... arg) { UNSUPPORTED("1hy4wd0k1zued4le59e0n2zc2"); // static void moveTo(Ppolyline_t * path, double x, double y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3wse6f3637ka6m9l7uw8u00zs"); // bufsize = 100; UNSUPPORTED("36x1yvktu0m3dauxwru23h4he"); // path->ps = (pointf*)zmalloc((bufsize)*sizeof(pointf)); UNSUPPORTED("3jdc8ww9wt3jm2on3wzk2iicp"); // path->ps[0].x = x; UNSUPPORTED("2ott6971tzqm0pgv2ntsp6xmq"); // path->ps[0].y = y; UNSUPPORTED("blxf8yf4uhyfflf4s704tdny4"); // path->pn = 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 92tacqag0enwgnsai827dzvj // static void curveTo(Ppolyline_t * path, double x1, double y1, double x2, double y2, double x3, double y3) public static Object curveTo(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("8wpj32rf7vxw5vksq9xbd723q"); // curveTo(Ppolyline_t * path, double x1, double y1, UNSUPPORTED("d9cxkpd6vb2ake96idw50f8p4"); // double x2, double y2, double x3, double y3) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3ffriosb52yi4g0r0rfskyuh2"); // if (path->pn + 3 >= bufsize) { UNSUPPORTED("89opqpdbhaunecn3x2fhgoqi1"); // bufsize *= 2; UNSUPPORTED("el037gz5k64eu70ci3r4jz1fg"); // path->ps = realloc(path->ps, bufsize * sizeof(pointf)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cnq0jqrsqam2tzexsj9ljdacb"); // path->ps[path->pn].x = x1; UNSUPPORTED("eb422k88tthew61m5cvgev4zm"); // path->ps[path->pn++].y = y1; UNSUPPORTED("7tynfe9ozr1hbls4dy97cydmg"); // path->ps[path->pn].x = x2; UNSUPPORTED("5n2xvadiyrbz2jru3tqre1yia"); // path->ps[path->pn++].y = y2; UNSUPPORTED("9sdwwiwapq125zwfw36v6hq0n"); // path->ps[path->pn].x = x3; UNSUPPORTED("3dhx7b3v7gj0wtqehfwnjh7ql"); // path->ps[path->pn++].y = y3; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5wgj2c7ammc2srsk18ybblucr // static void lineTo(Ppolyline_t * path, double x, double y) public static Object lineTo(Object... arg) { UNSUPPORTED("4788edx5cz2g1llvg7gdrhgkb"); // static void lineTo(Ppolyline_t * path, double x, double y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7bwr2izdyqrsr0jge28mgc6h7"); // pointf curp = path->ps[path->pn - 1]; UNSUPPORTED("6uibs0390x3y4023ll8jz3mtf"); // curveTo(path, curp.x, curp.y, x, y, x, y); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4si3gfp3na9r1cx2rppxmqocc // static void endPath(Ppolyline_t * path, boolean close) public static Object endPath(Object... arg) { UNSUPPORTED("a3i3545ftylhs0w17yipx92xr"); // static void endPath(Ppolyline_t * path, boolean close) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("125u8ocmya1ui6f2vy92ys41c"); // if (close) { UNSUPPORTED("3djonfjd3xbwxbodqwx1skugw"); // pointf p0 = path->ps[0]; UNSUPPORTED("71o5tbu2chebztr0guygypx2z"); // lineTo(path, p0.x, p0.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("encppe3huv4mp2ji9ia8we1rf"); // path->ps = realloc(path->ps, path->pn * sizeof(pointf)); UNSUPPORTED("dq633y7scsa3qogdlcv98ujt4"); // bufsize = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b76b8i1fllarol9vjfahw6uya // static Ppolyline_t *genEllipticPath(ellipse_t * ep, int degree, double threshold, boolean isSlice) public static Object genEllipticPath(Object... arg) { UNSUPPORTED("91sbkwh00nzifuk95ozdary4"); // static Ppolyline_t *genEllipticPath(ellipse_t * ep, int degree, UNSUPPORTED("1jho2qfx5zatpnhywq7fypo"); // double threshold, boolean isSlice) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aowovz5r9m2dfhwxk2moegfwg"); // double dEta; UNSUPPORTED("cbeyotgoz8sj8w1p2ma1po8yg"); // double etaB; UNSUPPORTED("31to79oaw2rkhf29ccrl20mj2"); // double cosEtaB; UNSUPPORTED("b8gcx58tzmh72ms4ssnot545i"); // double sinEtaB; UNSUPPORTED("4eacqyzdlewxnmaedlule7mx8"); // double aCosEtaB; UNSUPPORTED("8oztmyi1wky7n2k1gjxw5k2kf"); // double bSinEtaB; UNSUPPORTED("1kstfc0e2hdfd15g9e9uvr53g"); // double aSinEtaB; UNSUPPORTED("9rgvt9yas8ku0zhgttge30k3x"); // double bCosEtaB; UNSUPPORTED("dpyf0oqvxn4itklm9k5eo1fif"); // double xB; UNSUPPORTED("di8gcqpn4bf80nprjr1q526q4"); // double yB; UNSUPPORTED("89sledhxl1y6gptmb75g76trn"); // double xBDot; UNSUPPORTED("aau6f1pgrltq35uj7q9zcuevw"); // double yBDot; UNSUPPORTED("6wfj8onzmd4ihhh62dqfmqpbx"); // double t; UNSUPPORTED("7y0h5n9q9sdwej5muoboxjtl8"); // double alpha; UNSUPPORTED("6gfec3zgd4i523lz512hts9ly"); // Ppolyline_t *path = (Ppolyline_t*)zmalloc(sizeof(Ppolyline_t)); UNSUPPORTED("dh1qpynvja9ozx3mmd9xuy10i"); // // find the number of Bezier curves needed UNSUPPORTED("ar4ns635419133da91e2k1etc"); // boolean found = 0; UNSUPPORTED("8w8z8tst3x20ezyvmfejrucxb"); // int i, n = 1; UNSUPPORTED("41b6xd1eatvjppvf8h03krn8u"); // while ((!found) && (n < 1024)) { UNSUPPORTED("f2apscs44h7zvtbyq6zuf5leb"); // double dEta = (ep->eta2 - ep->eta1) / n; UNSUPPORTED("z2j1gwsh2yqpq6i9hqsygpn7"); // if (dEta <= 0.5 * M_PI) { UNSUPPORTED("5ypdcm9cz1l4o6qvyhn7lusyw"); // double etaB = ep->eta1; UNSUPPORTED("3rhtrb7nj3d17mymh37964wkq"); // found = NOT(0); UNSUPPORTED("dmx4u8plzqizvbw217h1c18v0"); // for (i = 0; found && (i < n); ++i) { UNSUPPORTED("1owrp5mnc0asdgluskbl1mc2t"); // double etaA = etaB; UNSUPPORTED("cpmqpv752wy651vgw5t9u64dp"); // etaB += dEta; UNSUPPORTED("abj2hmy07ynfglx6g7zr1f6ne"); // found = UNSUPPORTED("6vs1fqoounnf8ofyr68pb75xn"); // (estimateError(ep, degree, etaA, etaB) <= threshold); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9ei4d4anf86nhrp9dfszb6ff5"); // n = n << 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8glirgejroxk9jsnn8oejt27z"); // dEta = (ep->eta2 - ep->eta1) / n; UNSUPPORTED("394kiqtci2payvw1njliknrih"); // etaB = ep->eta1; UNSUPPORTED("2ve4a5xpd6fkmbne0apabjwlq"); // cosEtaB = cos(etaB); UNSUPPORTED("1rbfssozfn3y0rahc86urmbxz"); // sinEtaB = sin(etaB); UNSUPPORTED("81sh0z0xif6urj4v0h9absql5"); // aCosEtaB = ep->a * cosEtaB; UNSUPPORTED("7odi6naflbbvvowb3vp5gtyhd"); // bSinEtaB = ep->b * sinEtaB; UNSUPPORTED("7luv4wv6c1jfj68avkop12sdz"); // aSinEtaB = ep->a * sinEtaB; UNSUPPORTED("jebv6n0pxm00athds44rw762"); // bCosEtaB = ep->b * cosEtaB; UNSUPPORTED("aaqx8hl76xuq6qx64odpwxjsy"); // xB = ep->cx + aCosEtaB * ep->cosTheta - bSinEtaB * ep->sinTheta; UNSUPPORTED("a7epwiprisvk7hatwz29e81vn"); // yB = ep->cy + aCosEtaB * ep->sinTheta + bSinEtaB * ep->cosTheta; UNSUPPORTED("cx4qajzc2uxg7xihh8j3ydlmd"); // xBDot = -aSinEtaB * ep->cosTheta - bCosEtaB * ep->sinTheta; UNSUPPORTED("f2a8vdqh1dkv7gnwr4536d6af"); // yBDot = -aSinEtaB * ep->sinTheta + bCosEtaB * ep->cosTheta; UNSUPPORTED("7pkr7zujmkk8j0xh1n1ivj8i1"); // if (isSlice) { UNSUPPORTED("csdxg3xqeagn92mcrjyq40r5c"); // moveTo(path, ep->cx, ep->cy); UNSUPPORTED("1fqyscfa9fwuf5n2rhjn4nvuj"); // lineTo(path, xB, yB); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("6htku7y9bbpib1fzlig3k9ial"); // moveTo(path, xB, yB); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8oqm5tqho5p9xkljdyubg0zur"); // t = tan(0.5 * dEta); UNSUPPORTED("97rqqc2zbf5t0if1dkm0j3um1"); // alpha = sin(dEta) * (sqrt(4 + 3 * t * t) - 1) / 3; UNSUPPORTED("8hfre4wnsmu5vg8bloua9pt0x"); // for (i = 0; i < n; ++i) { UNSUPPORTED("1f7sp0cdfz66t9m125f6bwj0a"); // double xA = xB; UNSUPPORTED("3qungfyrl8d4zazdrtnoqi7bj"); // double yA = yB; UNSUPPORTED("djs8dfefd0tw9q6sty5q9kb6x"); // double xADot = xBDot; UNSUPPORTED("5s7fznr9wo7tb01tnkzy3a9x0"); // double yADot = yBDot; UNSUPPORTED("9zmdugqhtonbk2uax4r1smfp0"); // etaB += dEta; UNSUPPORTED("40atcaschllkhc48gvgcctqqx"); // cosEtaB = cos(etaB); UNSUPPORTED("3wk53wrbggqm9bldp0x0imauu"); // sinEtaB = sin(etaB); UNSUPPORTED("cgtssyu17hyr1izu0kd9zqyb2"); // aCosEtaB = ep->a * cosEtaB; UNSUPPORTED("5w40g6uq2np9av26cpdk9i9b4"); // bSinEtaB = ep->b * sinEtaB; UNSUPPORTED("3b4sjubnmli66nlqf5q3q3719"); // aSinEtaB = ep->a * sinEtaB; UNSUPPORTED("7nqyo2i7o0i5814kpz1t8fvkf"); // bCosEtaB = ep->b * cosEtaB; UNSUPPORTED("orxom0ksatjcwil29m8c8xpr"); // xB = ep->cx + aCosEtaB * ep->cosTheta - bSinEtaB * ep->sinTheta; UNSUPPORTED("9y4re0bc7gs6ezwo6dc6qq99n"); // yB = ep->cy + aCosEtaB * ep->sinTheta + bSinEtaB * ep->cosTheta; UNSUPPORTED("7m8ftuaslxmui9i3e48skp9jg"); // xBDot = -aSinEtaB * ep->cosTheta - bCosEtaB * ep->sinTheta; UNSUPPORTED("8m21k2haq7dcptayx554yipuh"); // yBDot = -aSinEtaB * ep->sinTheta + bCosEtaB * ep->cosTheta; UNSUPPORTED("1mkkhdqaw4q68ikbcimj4nnhm"); // if (degree == 1) { UNSUPPORTED("4y2q0gdsegz0qgrxygnze69gy"); // lineTo(path, xB, yB); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("8szp6o6pmribq5pnz7f822m68"); // curveTo(path, (xA + alpha * xADot), (yA + alpha * yADot), UNSUPPORTED("e24ni1b4ssyrj0fchznzlca7f"); // (xB - alpha * xBDot), (yB - alpha * yBDot), xB, yB); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("drbttufba5uy7q29k27vn86q2"); // endPath(path, isSlice); UNSUPPORTED("1funi6zh0ilqaehngcqcvj4dv"); // return path; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ee3uvbiaoz1oj4yogh3160ow8 // Ppolyline_t *ellipticWedge(pointf ctr, double xsemi, double ysemi, double angle0, double angle1) public static Object ellipticWedge(Object... arg) { UNSUPPORTED("451xfygtsc86bfhvc33x9gzww"); // Ppolyline_t *ellipticWedge(pointf ctr, double xsemi, double ysemi, UNSUPPORTED("578jtluj0t4iz6w97uoncr9mi"); // double angle0, double angle1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b1pam4t64t0vpc7cazx2uxqpw"); // ellipse_t ell; UNSUPPORTED("8b9keoeetrhid6hvr0lbl3p9l"); // Ppolyline_t *pp; UNSUPPORTED("wm5wmb9qw0libmt58lrk9ql5"); // initEllipse(&ell, ctr.x, ctr.y, xsemi, ysemi, 0, angle0, angle1); UNSUPPORTED("18dpm0f93alpm6wn3gvtr5a18"); // pp = genEllipticPath(&ell, 3, 0.00001, 1); UNSUPPORTED("7etsvryh248syh0l6ag8lcsi2"); // return pp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/emit__c.java000066400000000000000000011036521312650303100215260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static gen.lib.cgraph.attr__c.agget; import static gen.lib.common.geom__c.ptToLine2; import static gen.lib.common.utils__c.Bezier; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import h.Agraph_s; import h.boxf; import h.pointf; import h.xdot; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.__array_of_struct__; import smetana.core.__ptr__; import smetana.core.__struct__; public class emit__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7udip7yo3ddkp9ocjftokpm9y // void* init_xdot (Agraph_t* g) public static __ptr__ init_xdot(Agraph_s g) { ENTERING("7udip7yo3ddkp9ocjftokpm9y","init_xdot"); try { CString p; xdot xd = null; if (N((p = agget(g, new CString("_background")))!=null && p.charAt(0)!='\0')) { if (N((p = agget(g, new CString("_draw_")))!=null && p.charAt(0)!='\0')) { return null; } } UNSUPPORTED("16fu50ud9qppkwxzdy0nde3lm"); // xd = parseXDotF (p, NULL, sizeof (exdot_op)); UNSUPPORTED("1x2xrqe9on9i2dlb07gj02n65"); // if (!xd) { UNSUPPORTED("b4emzm37tsv7edlai0fhwoul1"); // agerr(AGWARN, "Could not parse \"_background\" attribute in graph %s\n", agnameof(g)); UNSUPPORTED("72v3r8ey2hvh1o9qskrji8im4"); // agerr(AGPREV, " \"%s\"\n", p); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("jujeh27uxxeyas8n09tnlnbu"); // return xd; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("7udip7yo3ddkp9ocjftokpm9y","init_xdot"); } } //1 2mlc0h4j6tfwqvwqa6hyvz4o5 // static char *defaultlinestyle[3] = //3 7d00uua41zvsvxe77gttfnmy // obj_state_t* push_obj_state(GVJ_t *job) public static Object push_obj_state(Object... arg) { UNSUPPORTED("epyu2q1m9hozws9k2sjri40sa"); // obj_state_t* push_obj_state(GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e468kl46d9gv50x67guzl3gvx"); // obj_state_t *obj, *parent; UNSUPPORTED("4iwsnw8sdl14e952mea0vbirj"); // if (! (obj = zmalloc(sizeof(obj_state_t)))) UNSUPPORTED("ehd3dhcaq9t6u9bppvv8uk9pq"); // agerr(AGERR, "no memory from zmalloc()\n"); UNSUPPORTED("4sj5l7lrob40gejr8efmsh7jd"); // parent = obj->parent = job->obj; UNSUPPORTED("cymxgixtrn3cty2dfm0f5n993"); // job->obj = obj; UNSUPPORTED("2yxuvhwao8vnwsdql2towwn8a"); // if (parent) { UNSUPPORTED("at60efb0o2t6r5j89rkvnvmmz"); // obj->pencolor = parent->pencolor; /* default styles to parent's style */ UNSUPPORTED("2i4ng2pvtum10vrqr1k5jmdhy"); // obj->fillcolor = parent->fillcolor; UNSUPPORTED("er3gsvbhtbl0f2njgt05z1ula"); // obj->pen = parent->pen; UNSUPPORTED("e20x3563jh67vt1lll5yvztoa"); // obj->fill = parent->fill; UNSUPPORTED("1vf36pbannt87rqhdedfp9tzg"); // obj->penwidth = parent->penwidth; UNSUPPORTED("bm8svjgexuo58jrlla94c7lmf"); // obj->gradient_angle = parent->gradient_angle; UNSUPPORTED("96a2xfansfphgn02ik2pzbgsk"); // obj->stopcolor = parent->stopcolor; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("2hztnghjdrq4iblkkiw28e6lp"); // /* obj->pencolor = NULL */ UNSUPPORTED("f1vt7k6jpnvkr3l5hnrufbo7n"); // /* obj->fillcolor = NULL */ UNSUPPORTED("1d8vwhh78wsjnjv3b66v7k71f"); // obj->pen = PEN_SOLID; UNSUPPORTED("327rx5pyklem7b31hdikywlqb"); // obj->fill = FILL_NONE; UNSUPPORTED("8jey9s92w1zm7gze74a8q4dp6"); // obj->penwidth = 1.; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5ps6tm8zierqwp3ptuy9ntbwr"); // return obj; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 fky2di67il17v6esshx73u77 // void pop_obj_state(GVJ_t *job) public static Object pop_obj_state(Object... arg) { UNSUPPORTED("b5pcmjz1yx45rkkn6ihfese3y"); // void pop_obj_state(GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("cvrjqjl5r3cwa1izxxgzgzrap"); // assert(obj); UNSUPPORTED("1ngdn0iitk41tdtce8t4ip3nx"); // free(obj->id); UNSUPPORTED("4di6e9e0vvr37qbzgje4ludyv"); // free(obj->url); UNSUPPORTED("11bs83ywfvb5bc5pmq26xjbe1"); // free(obj->labelurl); UNSUPPORTED("4iclkuumd2z23hcz3vtlmij9v"); // free(obj->tailurl); UNSUPPORTED("7w1xqpnr4u8nds6opogcbvnya"); // free(obj->headurl); UNSUPPORTED("b8dl0ih21bsnryi1pxe5tgqjp"); // free(obj->tooltip); UNSUPPORTED("9l3frodyf6j4nlcj24te5nrwp"); // free(obj->labeltooltip); UNSUPPORTED("tl0hkuk7y0kr8oegohd0xg83"); // free(obj->tailtooltip); UNSUPPORTED("8td9te5re4sfu60jumgh7qvpd"); // free(obj->headtooltip); UNSUPPORTED("azi0jshcues9wq2154bdnsfdu"); // free(obj->target); UNSUPPORTED("1bv7lwtfb303gq0pr61b5ie5e"); // free(obj->labeltarget); UNSUPPORTED("36xt1x2kwfa0fj8scj17o65hk"); // free(obj->tailtarget); UNSUPPORTED("eikpmw4wrmt4519cz2ixxv4hn"); // free(obj->headtarget); UNSUPPORTED("5g6xu70y47jbf9u1izz9d7lqm"); // free(obj->url_map_p); UNSUPPORTED("9d3byqiz2l6m12o73jh9el0av"); // free(obj->url_bsplinemap_p); UNSUPPORTED("e2337piojwep89s9v6hvret9f"); // free(obj->url_bsplinemap_n); UNSUPPORTED("36q9rct12zy148w6hckc97kcj"); // job->obj = obj->parent; UNSUPPORTED("8are8jqzwfj87yj4tkaohi3tf"); // free(obj); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 z4e7tnt40d3c4kv5u7cyhl9x // int initMapData (GVJ_t* job, char* lbl, char* url, char* tooltip, char* target, char *id, void* gobj) public static Object initMapData(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("1r7179s3ntgv42pdh8lf7ri6p"); // initMapData (GVJ_t* job, char* lbl, char* url, char* tooltip, char* target, char *id, UNSUPPORTED("us8je5vaodb65uh2al1w1c3h"); // void* gobj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("12bpksga44s9sfl7x8xn2rt2k"); // int flags = job->flags; UNSUPPORTED("5x4jq493dtdcx7z85qo0l2vwm"); // int assigned = 0; UNSUPPORTED("9c0gci8o1tk34epj1ssmue4dx"); // if ((flags & (1<<15)) && lbl) UNSUPPORTED("6hfoiuvpq4uvwmw4pxqqcjro6"); // obj->label = lbl; UNSUPPORTED("ekhzvq8l2u2frs2tl01cuf71s"); // if (flags & (1<<16)) { UNSUPPORTED("5u6uuo67mo3c4f2ojvfudltt5"); // obj->id = strdup_and_subst_obj(id, gobj); UNSUPPORTED("rss1781s9o1r7w5npkmc0bmg"); // if (url && url[0]) { UNSUPPORTED("1sruesngpnjzqoec5jwxwxwj8"); // obj->url = strdup_and_subst_obj(url, gobj); UNSUPPORTED("e9av6ob52m06dxds7d0uontab"); // assigned = 1; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ep9t9tvrtouwjd7pulp378fzi"); // if (flags & (1<<22)) { UNSUPPORTED("ccrueeib4dlvmyrlpzxl572jv"); // if (tooltip && tooltip[0]) { UNSUPPORTED("96zad8kmhopk7wo5xdyxacpl0"); // obj->tooltip = strdup_and_subst_obj(tooltip, gobj); UNSUPPORTED("3fiobhu1ragr2f099ghsonx1h"); // obj->explicit_tooltip = NOT(0); UNSUPPORTED("e9av6ob52m06dxds7d0uontab"); // assigned = 1; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("a3azuqia2enebzovqhpnhquvj"); // else if (obj->label) { UNSUPPORTED("2l7dzbw9rqphv63paqq8wvbrc"); // obj->tooltip = strdup(obj->label); UNSUPPORTED("e9av6ob52m06dxds7d0uontab"); // assigned = 1; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4lne2bv62nrpmlhj27vxjy1f6"); // if ((flags & (1<<23)) && target && target[0]) { UNSUPPORTED("ebgucy53hwmcaz1m04q7dolf4"); // obj->target = strdup_and_subst_obj(target, gobj); UNSUPPORTED("3wreyz9de84yyv079xk4ujkv3"); // assigned = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2zpk6us1pyyltxkpge8hnuyn2"); // return assigned; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d74beympg4wulmk8p6lh8daql // static void layerPagePrefix (GVJ_t* job, agxbuf* xb) public static Object layerPagePrefix(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("6djudoziuh8bcxd8oxm1qch58"); // layerPagePrefix (GVJ_t* job, agxbuf* xb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8gm1i2tpkqevee6guh43vbzjg"); // char buf[128]; /* large enough for 2 decimal 64-bit ints and "page_," */ UNSUPPORTED("cxr89wmz3j80aqc8410masvdn"); // if (job->layerNum > 1 && (job->flags & (1<<6))) { UNSUPPORTED("bmg9rcy7b1x6gh95ojpwla6i8"); // agxbput (xb, job->gvc->layerIDs[job->layerNum]); UNSUPPORTED("7eax6z8h47h2x1xxyqr1tkluc"); // ((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)'_'))); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("age7jtxi8adhl9jz4ne7xdp80"); // if ((job->pagesArrayElem.x > 0) || (job->pagesArrayElem.x > 0)) { UNSUPPORTED("cnwkbrftohdks7u707na56420"); // sprintf (buf, "page%d,%d_", job->pagesArrayElem.x, job->pagesArrayElem.y); UNSUPPORTED("2i6wv75y4aki5i8plhbvy276v"); // agxbput (xb, buf); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3uk5ht4qhgq91m46lw7xtdx8q // char* getObjId (GVJ_t* job, void* obj, agxbuf* xb) public static Object getObjId(Object... arg) { UNSUPPORTED("cqm25rponse4rsi686sbn1lo0"); // char* UNSUPPORTED("cxy7pg7aplrpxxilr17uxmir1"); // getObjId (GVJ_t* job, void* obj, agxbuf* xb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e7icadj7xe1r3gypdnhaaqh0z"); // char* id; UNSUPPORTED("c34mxcvhpn9flzo7mx3jta9v6"); // graph_t* root = job->gvc->g; UNSUPPORTED("4vz75ugb6dvgui5r4b3vha9w5"); // char* gid = GD_drawing(root)->id; UNSUPPORTED("b6fudxfj7yzgmij9ar0axs3cs"); // long idnum; UNSUPPORTED("1y49dkdztswfqp8gc2fsgsfjt"); // char* pfx; UNSUPPORTED("42dnqesv46qi3oy4hhv4xtngt"); // char buf[64]; /* large enough for a decimal 64-bit int */ UNSUPPORTED("eyzyn1uwtp0eb367awnyqsnu9"); // layerPagePrefix (job, xb); UNSUPPORTED("4ivnihqhlqxt5urta85bj8cvo"); // id = agget(obj, "id"); UNSUPPORTED("b5lnfc5x2s74jwjfi17neykdl"); // if (id && (*id != '\0')) { UNSUPPORTED("h8d3b8qgeb1asgpckee022dh"); // agxbput (xb, id); UNSUPPORTED("7q3mbxgjfr96cttjsdev54twj"); // return (((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)'\0'))),(char*)((xb)->ptr = (xb)->buf)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("442w4uruys9gula2urpooqejy"); // if ((obj != root) && gid) { UNSUPPORTED("b58nurhwbw66quisr070n2wi8"); // agxbput (xb, gid); UNSUPPORTED("7eax6z8h47h2x1xxyqr1tkluc"); // ((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)'_'))); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("91broiy562bqiwualvjbh1l0s"); // switch (agobjkind(obj)) { UNSUPPORTED("eyna33dobiebmtd0nihpgura4"); // case AGRAPH: UNSUPPORTED("250ofmvxldcwzahtn4zl83wcq"); // idnum = AGSEQ(obj); UNSUPPORTED("7ivrapxz56e3axqq0wlp2c84o"); // if (root == obj) UNSUPPORTED("8i5eqmk1n84h3oisk8qmr80fk"); // pfx = "graph"; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("eghyuptvw5kbqlkky78xkyqch"); // pfx = "clust"; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6x7ztvlgv763oeop84udp1egg"); // case AGNODE: UNSUPPORTED("dioszphfdf02j4mzkk1orixil"); // idnum = AGSEQ((Agnode_t*)obj); UNSUPPORTED("24c6tv0vcpu7u1sf37b5vd6bn"); // pfx = "node"; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("2dqikmmb6ag0anvbzo5tybf1r"); // case AGEDGE: UNSUPPORTED("88j50o42ltjx7x5kljmhtaimc"); // idnum = AGSEQ((Agedge_t*)obj); UNSUPPORTED("8dj6qoxln9rok8xeaycmhigg3"); // pfx = "edge"; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("doz63noywyk8negzqyp5wtn7y"); // agxbput (xb, pfx); UNSUPPORTED("9arliqoqxm070wy9ayr807ydh"); // sprintf (buf, "%ld", idnum); UNSUPPORTED("4nzvose05k5ompo6nn67jyf82"); // agxbput (xb, buf); UNSUPPORTED("ersrvcvo8qkfouomz222hiih7"); // return (((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)'\0'))),(char*)((xb)->ptr = (xb)->buf)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dcom8r4kkrsi0tbps20sjm7rl // static void initObjMapData (GVJ_t* job, textlabel_t *lab, void* gobj) public static Object initObjMapData(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("ezkgjtfltwmwf154o793aps7z"); // initObjMapData (GVJ_t* job, textlabel_t *lab, void* gobj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4m1ejpxv77loq6ojxpmbi77gc"); // char* lbl; UNSUPPORTED("dr7hyuwqwq1d5pbc066tdwb5g"); // char* url = agget(gobj, "href"); UNSUPPORTED("9eonbfqft5myxd7s5xqwvv974"); // char* tooltip = agget(gobj, "tooltip"); UNSUPPORTED("5tk1r0qbghssa155we7canz54"); // char* target = agget(gobj, "target"); UNSUPPORTED("e7icadj7xe1r3gypdnhaaqh0z"); // char* id; UNSUPPORTED("h0or3v13348vfl22jqz895yc"); // unsigned char buf[128]; UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("ci65k77x1b3nq6luu69s87oup"); // agxbinit(&xb, 128, buf); UNSUPPORTED("e1z56ssmce7u8j50hn74nzs06"); // if (lab) lbl = lab->text; UNSUPPORTED("bw2gbd060avck8ivr43eed32t"); // else lbl = NULL; UNSUPPORTED("9kl6bihhj6lqk5907u9vx0svh"); // if (!url || !*url) /* try URL as an alias for href */ UNSUPPORTED("5x0bbp126wunx54k3b5z6kqiv"); // url = agget(gobj, "URL"); UNSUPPORTED("5n6h8udz66glqsnvzl6q0ax4d"); // id = getObjId (job, gobj, &xb); UNSUPPORTED("5eb4m9ppzio68im6rq3z9owdi"); // initMapData (job, lbl, url, tooltip, target, id, gobj); UNSUPPORTED("1at5m9ctjn3ukv5gqtfswik02"); // agxbfree(&xb); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 hjkaeebrodvjebhg1hpg9z5e // static void map_point(GVJ_t *job, pointf pf) public static Object map_point(Object... arg) { UNSUPPORTED("8blzxhihaqxozyztu9fj7nshg"); // static void map_point(GVJ_t *job, pointf pf) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("12bpksga44s9sfl7x8xn2rt2k"); // int flags = job->flags; UNSUPPORTED("aukx8c3dz83p6cpnh0fhhnqo8"); // pointf *p; UNSUPPORTED("6ic0ku7wr32jsf5j0pwkrzq8j"); // if (flags & ((1<<16) | (1<<22))) { UNSUPPORTED("68o2j7ic39aasjk49deprnnhh"); // if (flags & (1<<17)) { UNSUPPORTED("69ud33lfpzxun6ls6bpequzo8"); // obj->url_map_shape = MAP_RECTANGLE; UNSUPPORTED("d7uo4fiq8is4wmoeklxb9lrhm"); // obj->url_map_n = 2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("5k8t4lz63jq26u2xqeoskhen7"); // obj->url_map_shape = MAP_POLYGON; UNSUPPORTED("ah8hfbgy2ofsubklkazu04w4d"); // obj->url_map_n = 4; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9wnyoic97gd28arr56l0i8iy3"); // free(obj->url_map_p); UNSUPPORTED("ec0oubjt8fhapkogfpg8s7y13"); // obj->url_map_p = p = (pointf*)zmalloc((obj->url_map_n)*sizeof(pointf)); UNSUPPORTED("d7tqa8sc5yn0805hga1a0lhy2"); // (p[0].x = pf.x - 3, p[0].y = pf.y - 3, p[1].x = pf.x + 3, p[1].y = pf.y + 3); UNSUPPORTED("cnadzqqicrskcdzko360llcg5"); // if (! (flags & (1<<13))) UNSUPPORTED("9626u9a6bmyb4pqydfy9oe48w"); // gvrender_ptf_A(job, p, p, 2); UNSUPPORTED("3qt79u8muuulxatmo48vjk6r3"); // if (! (flags & (1<<17))) UNSUPPORTED("e0f10b7obog3b7z2tra14ajtx"); // rect2poly(p); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dlyzfsrfmu4fl7l50uzdvu3mc // static char **checkClusterStyle(graph_t* sg, int *flagp) public static Object checkClusterStyle(Object... arg) { UNSUPPORTED("4fe1xtiblsit7upcg8o8vn11n"); // static char **checkClusterStyle(graph_t* sg, int *flagp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("byo308l1rmve5rmx8wt32juux"); // char *style; UNSUPPORTED("1m69eum6fcxl62kbxksis88or"); // char **pstyle = 0; UNSUPPORTED("1y4qclfm9xrlqe6oi5k512dih"); // int istyle = 0; UNSUPPORTED("c77cb1sgh5mlnuscrdp9pxwm8"); // if (((style = agget(sg, "style")) != 0) && style[0]) { UNSUPPORTED("h7xdp8l98vgmu8dkibee5kcm"); // char **pp; UNSUPPORTED("9uleufnyvtzwmq2wbcnmeyp3a"); // char **qp; UNSUPPORTED("1ys4x1uj0hoyf2yuvrmddwh9i"); // char *p; UNSUPPORTED("6akvfrhnmmgier60pl8bkt42r"); // pp = pstyle = parse_style(style); UNSUPPORTED("9vj0v0tutidnb2hxprdosjm39"); // while ((p = *pp)) { UNSUPPORTED("e3mpm8potxtvjdd42cnwhluxl"); // if (strcmp(p, "filled") == 0) { UNSUPPORTED("5uu1d9grveb0bmsov10mqrtj3"); // istyle |= (1 << 0); UNSUPPORTED("5lcmi10wuwp3fyn36cloc29y3"); // pp++; UNSUPPORTED("5fxeuc5zc3643ly5dyson06s5"); // }else if (strcmp(p, "radial") == 0) { UNSUPPORTED("a3fnxu8lgm7c35op5nmoe8xj6"); // istyle |= ((1 << 0) | (1 << 1)); UNSUPPORTED("9bo1rem63xdcqaveddsqb89y"); // qp = pp; /* remove rounded from list passed to renderer */ UNSUPPORTED("21y8hlxutle9votbe86f2hfpl"); // do { UNSUPPORTED("7ca407ksqxmxkuny8m7gr1rzj"); // qp++; UNSUPPORTED("7jb3shp3mthw99uh3iir44z47"); // *(qp-1) = *qp; UNSUPPORTED("1ujv3j8mb7i0c6nzdfgy27w4s"); // } while (*qp); UNSUPPORTED("9wcwovvjpprmy66u5cc2hpy3i"); // }else if (strcmp(p, "striped") == 0) { UNSUPPORTED("6tcwivyh9w6pmh1ys8hf9m48o"); // istyle |= (1 << 6); UNSUPPORTED("9bo1rem63xdcqaveddsqb89y"); // qp = pp; /* remove rounded from list passed to renderer */ UNSUPPORTED("21y8hlxutle9votbe86f2hfpl"); // do { UNSUPPORTED("7ca407ksqxmxkuny8m7gr1rzj"); // qp++; UNSUPPORTED("7jb3shp3mthw99uh3iir44z47"); // *(qp-1) = *qp; UNSUPPORTED("1ujv3j8mb7i0c6nzdfgy27w4s"); // } while (*qp); UNSUPPORTED("agd1qpujy8ioolsnjhmz0zapr"); // }else if (strcmp(p, "rounded") == 0) { UNSUPPORTED("dtj2r1tvn8fuoefvhmbg7k8es"); // istyle |= (1 << 2); UNSUPPORTED("9bo1rem63xdcqaveddsqb89y"); // qp = pp; /* remove rounded from list passed to renderer */ UNSUPPORTED("21y8hlxutle9votbe86f2hfpl"); // do { UNSUPPORTED("7ca407ksqxmxkuny8m7gr1rzj"); // qp++; UNSUPPORTED("7jb3shp3mthw99uh3iir44z47"); // *(qp-1) = *qp; UNSUPPORTED("1ujv3j8mb7i0c6nzdfgy27w4s"); // } while (*qp); UNSUPPORTED("7z03qzrkm0iobzqhlwp87ljr2"); // } else pp++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8wc6gkmat3lo0h81wd7xv879k"); // *flagp = istyle; UNSUPPORTED("iuoxnbeo1cwfgz97k92ylegx"); // return pstyle; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9iqjkcr5mukm81hrbwh0ea6fl // static void freeSegs (colorsegs_t* segs) public static Object freeSegs(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("464xlb3ygxv6p9mg54yjog4xx"); // freeSegs (colorsegs_t* segs) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("byogskcr9egmgq0x5kmqvwi4v"); // free (segs->base); UNSUPPORTED("70o1qrp2ik2rtbnfye965jlti"); // free (segs->segs); UNSUPPORTED("864f5ylvxgoy5rwmwl4pstg2p"); // free (segs); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 97btw75unjbstma95wtq0zatf // static double getSegLen (char* s) public static Object getSegLen(Object... arg) { UNSUPPORTED("9xupxgb2zpj09jpcf9avjwewg"); // static double getSegLen (char* s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2xm53iv3ul2vyq7751jovt7yv"); // char* p = strchr (s, ';'); UNSUPPORTED("bkz9mqmemp1ljxdwdbu8xv3e9"); // char* endp; UNSUPPORTED("9gol5nm38e942ve1ebl1cjtlv"); // double v; UNSUPPORTED("e5uuzflrromc49aac8g763pcj"); // if (!p) { UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ad4vrj0twr5jijvunb1bz9koj"); // *p++ = '\0'; UNSUPPORTED("8hxu46s395rpsel8pqxzl9ana"); // v = strtod (p, &endp); UNSUPPORTED("bog16vtrt7asrtd5qswrdityh"); // if (endp != p) { /* scanned something */ UNSUPPORTED("rqt6x5hv72afst4yu8og4eh1"); // if (v >= 0) UNSUPPORTED("b9t6ne0njxrwqqcdw8t4lt7kt"); // return v; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8azkpi8o0wzdufa90lw8hpt6q"); // return -1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8zfj6ri8h66qg7vjb6r0gtwl5 // static int parseSegs (char* clrs, int nseg, colorsegs_t** psegs) public static Object parseSegs(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("apdtd2ytdipe6mbcrtuzg8me3"); // parseSegs (char* clrs, int nseg, colorsegs_t** psegs) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b2p5bomt1ebfvkood2varaauq"); // colorsegs_t* segs = (colorsegs_t*)zmalloc(sizeof(colorsegs_t)); UNSUPPORTED("8zv1ffgik05z2fcc41di32sn8"); // colorseg_t* s; UNSUPPORTED("elj0n3kcg90w49mdluubv8bns"); // char* colors = strdup (clrs); UNSUPPORTED("3tsetuywdzi8crkdp7yfkzgs0"); // char* color; UNSUPPORTED("c4mq9v0j066932j65m2kds553"); // int cnum = 0; UNSUPPORTED("5wbs6wytrjo8k4jbvke5n0u42"); // double v, left = 1; UNSUPPORTED("4tnoq3emby6jh6mtizghjicok"); // static int doWarn = 1; UNSUPPORTED("a8vxj66zhdcnifeyd5g50smwk"); // int i, rval = 0; UNSUPPORTED("a4px33i4moqe8ybwatz0g8k6"); // char* p; UNSUPPORTED("axv64lmdgc8l7wrse4f2uje2c"); // if (nseg == 0) { UNSUPPORTED("9kkvl2096j2mcfgl88zxrg3mt"); // nseg = 1; UNSUPPORTED("1p0odq4xbiiyk9zulrtgh78p7"); // /* need to know how many colors separated by ':' */ UNSUPPORTED("8lwg5726u0argoi40r0o86mvp"); // for (p = colors; *p; p++) { UNSUPPORTED("1rfsopgavnlzprt3drtcsj0x4"); // if (*p == ':') nseg++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9bp5sal0vgfug2x1wf511qs7f"); // segs->base = colors; UNSUPPORTED("2ivkw78cp3krrv7689cye5s78"); // segs->segs = s = (colorseg_t*)zmalloc((nseg+1)*sizeof(colorseg_t)); UNSUPPORTED("4szmily3ea0fmu6uuro6gu156"); // for (color = strtok(colors, ":"); color; color = strtok(0, ":")) { UNSUPPORTED("4004f4k7a6sfsgb610fgbmu5w"); // if ((v = getSegLen (color)) >= 0) { UNSUPPORTED("azbip4rt1t97r5xu2s3fylz3y"); // double del = v - left; UNSUPPORTED("8h66ar8vsn5btqcntrimnkktm"); // if (del > 0) { UNSUPPORTED("ed89ssfw3aoze3hsxopkgecse"); // if (doWarn && !(((del) < 1E-5) && ((del) > -1E-5))) { UNSUPPORTED("bteqpt6c6yz7o7d5dbmof10wj"); // agerr (AGWARN, "Total size > 1 in \"%s\" color spec ", clrs); UNSUPPORTED("24grm1ux24glgzb3vunz0hgk2"); // doWarn = 0; UNSUPPORTED("7uujii1ibtc8h2vtmdczkb97f"); // rval = 3; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("c5j07yi4nl2nzq8fjmkv7tsby"); // v = left; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("733sj1rtrkdhnykyrn3z1muzd"); // left -= v; UNSUPPORTED("7dvqls8r4achyytx9jb4ce5nd"); // if (v > 0) s[cnum].hasFraction = NOT(0); UNSUPPORTED("3jt663rt945dkhqkl1rv5w95u"); // if (*color) s[cnum].color = color; UNSUPPORTED("c1mbrfego3c40gci714lbozdu"); // s[cnum++].t = v; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("7qqjev9ey61berllhtqdtio5j"); // if (doWarn) { UNSUPPORTED("1uclwqp3vls9evizalhsqup1f"); // agerr (AGERR, "Illegal length value in \"%s\" color attribute ", clrs); UNSUPPORTED("ccs8p4eo4ehywnii033x2xz3k"); // doWarn = 0; UNSUPPORTED("4o9eycynbr1xrbs7xu7wqkoqo"); // rval = 2; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5spew51c4hokx3tvptq38hoif"); // else rval = 1; UNSUPPORTED("723lxfi188696x4nsqtjqibuc"); // freeSegs (segs); UNSUPPORTED("4sm28tt9yujgmryycwcj3ozcs"); // return rval; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dcahiv0k45nuszddfmx52qvsl"); // if ((((left) < 1E-5) && ((left) > -1E-5))) { UNSUPPORTED("546rex5xh4grberu1heou0wg1"); // left = 0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8wynr3ctvgfgo13bcha3yofvl"); // /* distribute remaining into slot with t == 0; if none, add to last */ UNSUPPORTED("az8pyhrjnf2hzlv8tkhg72zw6"); // if (left > 0) { UNSUPPORTED("dutfiykx9omnitayjorbg1vx2"); // /* count zero segments */ UNSUPPORTED("49ujuxia41bf3tqa9jq7skubi"); // nseg = 0; UNSUPPORTED("7wc6473fldnm8onr6x54aoknb"); // for (i = 0; i < cnum; i++) { UNSUPPORTED("hw7c0mgetn36f6qtikru7dxh"); // if (s[i].t == 0) nseg++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e5xpvo7h1n57u6ajux2emdsjl"); // if (nseg > 0) { UNSUPPORTED("b9220xzm85t055qqrbe3x2o91"); // double delta = left/nseg; UNSUPPORTED("2tpczuw50n6atxp3ugll97g2l"); // for (i = 0; i < cnum; i++) { UNSUPPORTED("datujg26m1qe4v9viophnfqmk"); // if (s[i].t == 0) s[i].t = delta; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("cpvqe6ppslph7n78gdtd33ll2"); // s[cnum-1].t += left; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bzphdbk9lv18c2kha9yj9p9bq"); // /* Make sure last positive segment is followed by a sentinel. */ UNSUPPORTED("dnru0y416hypltckpasyalvi1"); // nseg = 0; UNSUPPORTED("8es1vpe9qvsc5j4mi98x0h6ml"); // for (i = cnum-1; i >= 0; i--) { UNSUPPORTED("8eg8vanptayonxgtj46f8qo4h"); // if (s[i].t > 0) break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("63bgrye6x8o4p2w5u6ix8cfnh"); // s[i+1].color = NULL; UNSUPPORTED("cg9otruqfz0hiw1to7o5dbvz2"); // segs->numc = i+1; UNSUPPORTED("9evut88r5b01zyynad10pnqj6"); // *psegs = segs; UNSUPPORTED("bhpm3hntm4gkn66ozolahaqhb"); // return rval; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5mu8biu5ww33wd5ieraclh88z // int wedgedEllipse (GVJ_t* job, pointf * pf, char* clrs) public static Object wedgedEllipse(Object... arg) { UNSUPPORTED("7zkpme13g8rxxwloxvpvvnbcw"); // int UNSUPPORTED("aa0ojv015bm44zwcwqav8hg79"); // wedgedEllipse (GVJ_t* job, pointf * pf, char* clrs) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8z3a2qjysx0m326m5qjy91tnu"); // colorsegs_t* segs; UNSUPPORTED("8zv1ffgik05z2fcc41di32sn8"); // colorseg_t* s; UNSUPPORTED("ecz4e03zumggc8tfymqvirexq"); // int rv; UNSUPPORTED("8vpvinya0zfrnowhlphkyccd5"); // double save_penwidth = job->obj->penwidth; UNSUPPORTED("1nq1fbyjqq72b0sc2bulz00rw"); // pointf ctr, semi; UNSUPPORTED("qw8wtu53e7k1aubdv962neuz"); // Ppolyline_t* pp; UNSUPPORTED("ecf4tlsg5qocdf5cl3xt0usir"); // double angle0, angle1; UNSUPPORTED("7w32bzfgk50pyvzfs7qaxoi1e"); // rv = parseSegs (clrs, 0, &segs); UNSUPPORTED("45tn760kszitmijgc00zjux63"); // if ((rv == 1) || (rv == 2)) return rv; UNSUPPORTED("5a05hfj5quc4ubw4bd0bbtjoq"); // ctr.x = (pf[0].x + pf[1].x) / 2.; UNSUPPORTED("65mz1z9ktoe9whfa6lwcmvscf"); // ctr.y = (pf[0].y + pf[1].y) / 2.; UNSUPPORTED("8ji2e4xqar7owxkedpin2m8ez"); // semi.x = pf[1].x - ctr.x; UNSUPPORTED("92ipp30q5f40j3d2wqk9xu4od"); // semi.y = pf[1].y - ctr.y; UNSUPPORTED("2qlp0rgdgbozdtvtuwqp37pa4"); // if (save_penwidth > 0.5) UNSUPPORTED("hmdk2acbhhzqbukut4pqgz2q"); // gvrender_set_penwidth(job, 0.5); UNSUPPORTED("dddsxf9cjjlgn8v2snkxl6e1z"); // angle0 = 0; UNSUPPORTED("9lw73gbrcdxipj1j1b1kpyvfc"); // for (s = segs->segs; s->color; s++) { UNSUPPORTED("8wmjgptzcrcqkza35tcf7btrq"); // if (s->t == 0) continue; UNSUPPORTED("40pn9i6e6b8aw6gvfysg075ae"); // gvrender_set_fillcolor (job, (s->color?s->color:"black")); UNSUPPORTED("4vzp246p162a5yt5k0d62gcz6"); // if (s[1].color == NULL) UNSUPPORTED("9647s4q9zvdoqktuh274a9y3e"); // angle1 = 2*M_PI; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("caiwb8g1acalpp0esm3dy0be2"); // angle1 = angle0 + 2*M_PI*(s->t); UNSUPPORTED("9ll9d8jthp2hl8sh52a8h2dgp"); // pp = ellipticWedge (ctr, semi.x, semi.y, angle0, angle1); UNSUPPORTED("7arx1xvmroi48xi8occ15h0qj"); // gvrender_beziercurve(job, pp->ps, pp->pn, 0, 0, 1); UNSUPPORTED("dtpeo119iz3e8pf4sty2eypec"); // angle0 = angle1; UNSUPPORTED("bku6jthxqindqm1lycet3lgq1"); // freePath (pp); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2qlp0rgdgbozdtvtuwqp37pa4"); // if (save_penwidth > 0.5) UNSUPPORTED("efgc8uu9zhn5gek92wvnw2cqt"); // gvrender_set_penwidth(job, save_penwidth); UNSUPPORTED("dwbftn5fib1yir7gshhy14cup"); // freeSegs (segs); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1lx9cef1wqmf2k66twye6mf9g // int stripedBox (GVJ_t * job, pointf* AF, char* clrs, int rotate) public static Object stripedBox(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("ekv2bika3f3ammx903i7szf5x"); // stripedBox (GVJ_t * job, pointf* AF, char* clrs, int rotate) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8z3a2qjysx0m326m5qjy91tnu"); // colorsegs_t* segs; UNSUPPORTED("8zv1ffgik05z2fcc41di32sn8"); // colorseg_t* s; UNSUPPORTED("ecz4e03zumggc8tfymqvirexq"); // int rv; UNSUPPORTED("cvn5016us8gcyjc73vgd06clq"); // double xdelta; UNSUPPORTED("d8sp6cfkpfyndzmid92shiq50"); // pointf pts[4]; UNSUPPORTED("aqsj4hnm1mckt6pv4pqok37cv"); // double lastx; UNSUPPORTED("8vpvinya0zfrnowhlphkyccd5"); // double save_penwidth = job->obj->penwidth; UNSUPPORTED("7w32bzfgk50pyvzfs7qaxoi1e"); // rv = parseSegs (clrs, 0, &segs); UNSUPPORTED("45tn760kszitmijgc00zjux63"); // if ((rv == 1) || (rv == 2)) return rv; UNSUPPORTED("csirqgn1exx47m56awd7suhlq"); // if (rotate) { UNSUPPORTED("6yvxg6bp1ape4nmefxjyjjhti"); // pts[0] = AF[2]; UNSUPPORTED("7x2bhgf39q42g2fhxk0vfkxxk"); // pts[1] = AF[3]; UNSUPPORTED("f179v6qur6kketo9cy3lotml7"); // pts[2] = AF[0]; UNSUPPORTED("b1kk11zisn7fvypwmt593hdwp"); // pts[3] = AF[1]; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("eolhyp22bac440ap3o96c3mqz"); // pts[0] = AF[0]; UNSUPPORTED("7bgongoew7lrxnvqed64y1aq5"); // pts[1] = AF[1]; UNSUPPORTED("dsj2jtc38wd64ffe18qloaybe"); // pts[2] = AF[2]; UNSUPPORTED("w8lcp07u15ugb9pbyz628ux6"); // pts[3] = AF[3]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8cka942q7qvwsisxeamy9xfgs"); // lastx = pts[1].x; UNSUPPORTED("el6wjonhvfaekmhry0o1xncfi"); // xdelta = (pts[1].x - pts[0].x); UNSUPPORTED("m16l42bmexhmji8xy54ow3ac"); // pts[1].x = pts[2].x = pts[0].x; UNSUPPORTED("2qlp0rgdgbozdtvtuwqp37pa4"); // if (save_penwidth > 0.5) UNSUPPORTED("hmdk2acbhhzqbukut4pqgz2q"); // gvrender_set_penwidth(job, 0.5); UNSUPPORTED("9lw73gbrcdxipj1j1b1kpyvfc"); // for (s = segs->segs; s->color; s++) { UNSUPPORTED("8wmjgptzcrcqkza35tcf7btrq"); // if (s->t == 0) continue; UNSUPPORTED("40pn9i6e6b8aw6gvfysg075ae"); // gvrender_set_fillcolor (job, (s->color?s->color:"black")); UNSUPPORTED("3r3zv42eo8ubdity1juxhmhh4"); // /* gvrender_polygon(job, pts, 4, FILL | NO_POLY); */ UNSUPPORTED("4vzp246p162a5yt5k0d62gcz6"); // if (s[1].color == NULL) UNSUPPORTED("9zsrpebctk9utmb3xexrrnn5n"); // pts[1].x = pts[2].x = lastx; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("cnyxri62od5y8ghnijv4z9wsb"); // pts[1].x = pts[2].x = pts[0].x + xdelta*(s->t); UNSUPPORTED("7s4cl2nfmsmuphbzuu24n43gk"); // gvrender_polygon(job, pts, 4, 1); UNSUPPORTED("8g6jo6gn7rt47zmjtrbh705qi"); // pts[0].x = pts[3].x = pts[1].x; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2qlp0rgdgbozdtvtuwqp37pa4"); // if (save_penwidth > 0.5) UNSUPPORTED("efgc8uu9zhn5gek92wvnw2cqt"); // gvrender_set_penwidth(job, save_penwidth); UNSUPPORTED("dwbftn5fib1yir7gshhy14cup"); // freeSegs (segs); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a4ze3nkth5n070iajraile73b // void emit_map_rect(GVJ_t *job, boxf b) public static Object emit_map_rect(Object... arg) { UNSUPPORTED("co9kbfer4pfzrsg32xzdxnu2u"); // void emit_map_rect(GVJ_t *job, boxf b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("12bpksga44s9sfl7x8xn2rt2k"); // int flags = job->flags; UNSUPPORTED("aukx8c3dz83p6cpnh0fhhnqo8"); // pointf *p; UNSUPPORTED("6ic0ku7wr32jsf5j0pwkrzq8j"); // if (flags & ((1<<16) | (1<<22))) { UNSUPPORTED("68o2j7ic39aasjk49deprnnhh"); // if (flags & (1<<17)) { UNSUPPORTED("69ud33lfpzxun6ls6bpequzo8"); // obj->url_map_shape = MAP_RECTANGLE; UNSUPPORTED("d7uo4fiq8is4wmoeklxb9lrhm"); // obj->url_map_n = 2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("5k8t4lz63jq26u2xqeoskhen7"); // obj->url_map_shape = MAP_POLYGON; UNSUPPORTED("ah8hfbgy2ofsubklkazu04w4d"); // obj->url_map_n = 4; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9wnyoic97gd28arr56l0i8iy3"); // free(obj->url_map_p); UNSUPPORTED("ec0oubjt8fhapkogfpg8s7y13"); // obj->url_map_p = p = (pointf*)zmalloc((obj->url_map_n)*sizeof(pointf)); UNSUPPORTED("67z1fedypeeyro29m0t5h6cii"); // p[0] = b.LL; UNSUPPORTED("dskfal9yhsof4338w6yry9mve"); // p[1] = b.UR; UNSUPPORTED("cnadzqqicrskcdzko360llcg5"); // if (! (flags & (1<<13))) UNSUPPORTED("9626u9a6bmyb4pqydfy9oe48w"); // gvrender_ptf_A(job, p, p, 2); UNSUPPORTED("3qt79u8muuulxatmo48vjk6r3"); // if (! (flags & (1<<17))) UNSUPPORTED("e0f10b7obog3b7z2tra14ajtx"); // rect2poly(p); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3ai5lu5hhd5fuikmo022v1jm0 // static void map_label(GVJ_t *job, textlabel_t *lab) public static Object map_label(Object... arg) { UNSUPPORTED("c4rnzzthoq9f8agcrqudi4mz"); // static void map_label(GVJ_t *job, textlabel_t *lab) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("12bpksga44s9sfl7x8xn2rt2k"); // int flags = job->flags; UNSUPPORTED("aukx8c3dz83p6cpnh0fhhnqo8"); // pointf *p; UNSUPPORTED("6ic0ku7wr32jsf5j0pwkrzq8j"); // if (flags & ((1<<16) | (1<<22))) { UNSUPPORTED("68o2j7ic39aasjk49deprnnhh"); // if (flags & (1<<17)) { UNSUPPORTED("69ud33lfpzxun6ls6bpequzo8"); // obj->url_map_shape = MAP_RECTANGLE; UNSUPPORTED("d7uo4fiq8is4wmoeklxb9lrhm"); // obj->url_map_n = 2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("5k8t4lz63jq26u2xqeoskhen7"); // obj->url_map_shape = MAP_POLYGON; UNSUPPORTED("ah8hfbgy2ofsubklkazu04w4d"); // obj->url_map_n = 4; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9wnyoic97gd28arr56l0i8iy3"); // free(obj->url_map_p); UNSUPPORTED("ec0oubjt8fhapkogfpg8s7y13"); // obj->url_map_p = p = (pointf*)zmalloc((obj->url_map_n)*sizeof(pointf)); UNSUPPORTED("pv2pug94o7tyi304mtm18jaw"); // (p[0].x = lab->pos.x - lab->dimen.x / 2., p[0].y = lab->pos.y - lab->dimen.y / 2., p[1].x = lab->pos.x + lab->dimen.x / 2., p[1].y = lab->pos.y + lab->dimen.y / 2.); UNSUPPORTED("cnadzqqicrskcdzko360llcg5"); // if (! (flags & (1<<13))) UNSUPPORTED("9626u9a6bmyb4pqydfy9oe48w"); // gvrender_ptf_A(job, p, p, 2); UNSUPPORTED("3qt79u8muuulxatmo48vjk6r3"); // if (! (flags & (1<<17))) UNSUPPORTED("e0f10b7obog3b7z2tra14ajtx"); // rect2poly(p); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9hfoy16yb9l36g778lx6o4loa // static boolean isRect(polygon_t * p) public static Object isRect(Object... arg) { UNSUPPORTED("9boj1p1495tsl7kbb9os62euc"); // static boolean isRect(polygon_t * p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("jq836u6s0o7a40yevy0sjlhv"); // return (p->sides == 4 && (ROUND(p->orientation) % 90) == 0 UNSUPPORTED("2pp49cjtsontnjugs7vlomdvi"); // && p->distortion == 0.0 && p->skew == 0.0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 drf7d6idpinqx579kloyv3tjf // static int ifFilled(node_t * n) public static Object ifFilled(Object... arg) { UNSUPPORTED("576n3ll5ycnzfrne5a0vg4kmb"); // static int ifFilled(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ezo17twsxmg7baw2hkcmffhbr"); // char *style, *p, **pp; UNSUPPORTED("9lfwryf4m8bo4travw1edcxtr"); // int r = 0; UNSUPPORTED("8pjk3xuss8ew2p7e7t0djo8qp"); // style = late_nnstring(n, N_style, ""); UNSUPPORTED("4ouo3ttcnk1yyzsz5wrt88zw"); // if (style[0]) { UNSUPPORTED("a7llauzxp1up7djc1wq1dnfco"); // pp = parse_style(style); UNSUPPORTED("307dibrb4o6rniseaep5vofol"); // while ((p = *pp)) { UNSUPPORTED("36yyrnflvlp1fqax3117d8a7o"); // if (strcmp(p, "filled") == 0) UNSUPPORTED("dxmd648tdx5y1devieu0sclw"); // r = 1; UNSUPPORTED("8dkwt30u4binxrx5y6sqggg8i"); // pp++; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3sh9756i5zm4vgebijiohr21q // static pointf *pEllipse(double a, double b, int np) public static Object pEllipse(Object... arg) { UNSUPPORTED("81ja3n1hoznf26wc2vhvhl9fj"); // static pointf *pEllipse(double a, double b, int np) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("39lrh4yp65e7bz2yxmw4eykrf"); // double theta = 0.0; UNSUPPORTED("eyglfufrpugwrnbykbifud876"); // double deltheta = 2 * M_PI / np; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("2rkzhui0essisp5zlw44vx4j9"); // pointf *ps; UNSUPPORTED("9plpwtwefveugoac2qi9x6chi"); // ps = (pointf*)zmalloc((np)*sizeof(pointf)); UNSUPPORTED("8sd8edat3oeyfbnetgt6bwa6l"); // for (i = 0; i < np; i++) { UNSUPPORTED("78zadymnp5kv296ust519rwwy"); // ps[i].x = a * cos(theta); UNSUPPORTED("7aqmygicj0weq2ez2gpdasxzj"); // ps[i].y = b * sin(theta); UNSUPPORTED("4tksxfn79hejj7dk9u7587tdx"); // theta += deltheta; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b0dfwpxhogdrp9mwkzc8oa9vt"); // return ps; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7nqmdkcnal35ollpstkk707t8 // static int check_control_points(pointf *cp) public static boolean check_control_points(__ptr__ cp) { ENTERING("7nqmdkcnal35ollpstkk707t8","check_control_points"); try { double dis1 = ptToLine2 (cp.plus(0).getStruct(), cp.plus(3).getStruct(), cp.plus(1).getStruct()); double dis2 = ptToLine2 (cp.plus(0).getStruct(), cp.plus(3).getStruct(), cp.plus(2).getStruct()); if (dis1 < 2.0*2.0 && dis2 < 2.0*2.0) return true; else return false; } finally { LEAVING("7nqmdkcnal35ollpstkk707t8","check_control_points"); } } //3 5wldemr88fdxl6101ugewclw9 // void update_bb_bz(boxf *bb, pointf *cp) public static void update_bb_bz(__ptr__ bb, __array_of_struct__ cp) { ENTERING("5wldemr88fdxl6101ugewclw9","update_bb_bz"); try { /* if any control point of the segment is outside the bounding box */ if (cp.plus(0).getDouble("x") > bb.getStruct("UR").getDouble("x") || cp.plus(0).getDouble("x") < bb.getStruct("LL").getDouble("x") || cp.plus(0).getDouble("y") > bb.getStruct("UR").getDouble("y") || cp.plus(0).getDouble("y") < bb.getStruct("LL").getDouble("y") || cp.plus(1).getDouble("x") > bb.getStruct("UR").getDouble("x") || cp.plus(1).getDouble("x") < bb.getStruct("LL").getDouble("x") || cp.plus(1).getDouble("y") > bb.getStruct("UR").getDouble("y") || cp.plus(1).getDouble("y") < bb.getStruct("LL").getDouble("y") || cp.plus(2).getDouble("x") > bb.getStruct("UR").getDouble("x") || cp.plus(2).getDouble("x") < bb.getStruct("LL").getDouble("x") || cp.plus(2).getDouble("y") > bb.getStruct("UR").getDouble("y") || cp.plus(2).getDouble("y") < bb.getStruct("LL").getDouble("y") || cp.plus(3).getDouble("x") > bb.getStruct("UR").getDouble("x") || cp.plus(3).getDouble("x") < bb.getStruct("LL").getDouble("x") || cp.plus(3).getDouble("y") > bb.getStruct("UR").getDouble("y") || cp.plus(3).getDouble("y") < bb.getStruct("LL").getDouble("y")) { /* if the segment is sufficiently refined */ if (check_control_points(cp.asPtr())) { int i; /* expand the bounding box */ for (i = 0; i < 4; i++) { if (cp.plus(i).getDouble("x") > bb.getStruct("UR").getDouble("x")) bb.getStruct("UR").setDouble("x", cp.plus(i).getDouble("x")); else if (cp.plus(i).getDouble("x") < bb.getStruct("LL").getDouble("x")) bb.getStruct("LL").setDouble("x", cp.plus(i).getDouble("x")); if (cp.plus(i).getDouble("y") > bb.getStruct("UR").getDouble("y")) bb.getStruct("UR").setDouble("y", cp.plus(i).getDouble("y")); else if (cp.plus(i).getDouble("y") < bb.getStruct("LL").getDouble("y")) bb.getStruct("LL").setDouble("y", cp.plus(i).getDouble("y")); } } else { /* else refine the segment */ final __array_of_struct__ left = __array_of_struct__.malloc(pointf.class, 4); final __array_of_struct__ right = __array_of_struct__.malloc(pointf.class, 4); Bezier (cp, 3, 0.5, left.asPtr(), right.asPtr()); update_bb_bz(bb, left); update_bb_bz(bb, right); } } } finally { LEAVING("5wldemr88fdxl6101ugewclw9","update_bb_bz"); } } //3 5inp24tkswwr4gef832cfsh04 // static segitem_t* appendSeg (pointf p, segitem_t* lp) public static Object appendSeg(Object... arg) { UNSUPPORTED("9ox1lgfkkrjj3l9g1jpe0gs04"); // static segitem_t* appendSeg (pointf p, segitem_t* lp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bk3628thwysou5cfzrxarcqte"); // segitem_t* s = (segitem_t*)gmalloc(sizeof(segitem_t)); UNSUPPORTED("3tnumckwljivhxj7b6mdf24d6"); // {(s)->next = 0; (s)->p = p;}; UNSUPPORTED("46ylfb4pi0znpxitzsije2mhw"); // lp->next = s; UNSUPPORTED("3y6wj3ntgmr1qkdpm7wp1dsch"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4n0kvrpdwpl0e1imvz963aa1o // static void map_bspline_poly(pointf **pbs_p, int **pbs_n, int *pbs_poly_n, int n, pointf* p1, pointf* p2) public static Object map_bspline_poly(Object... arg) { UNSUPPORTED("1r3l20vlipm0x1r2dprvygc9i"); // static void map_bspline_poly(pointf **pbs_p, int **pbs_n, int *pbs_poly_n, int n, pointf* p1, pointf* p2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("30xnf4zdgb1ykf89oqbuo4l2a"); // int i = 0, nump = 0, last = 2*n-1; UNSUPPORTED("f06mx73hq0m616fggpl7pm6l0"); // for ( ; i < *pbs_poly_n; i++) UNSUPPORTED("9bq6z8tgn463c2b2b1ujzzu64"); // nump += (*pbs_n)[i]; UNSUPPORTED("6xsx7pggjnc2umqgysrjf2o7f"); // (*pbs_poly_n)++; UNSUPPORTED("cavf92uaf58wsqimp1tktt9u5"); // *pbs_n = grealloc(*pbs_n, (*pbs_poly_n) * sizeof(int)); UNSUPPORTED("9v28ohj2y5y341vn7mh44qo8"); // (*pbs_n)[i] = 2*n; UNSUPPORTED("8uvz87etb5208kleb7ehkzyfc"); // *pbs_p = grealloc(*pbs_p, (nump + 2*n) * sizeof(pointf)); UNSUPPORTED("1vi49g48u2rc9v88yhabta0yw"); // for (i = 0; i < n; i++) { UNSUPPORTED("6hab7v9b2nr1fy1es1y7q8vhn"); // (*pbs_p)[nump+i] = p1[i]; UNSUPPORTED("2qtwscm7pv5eahjzljn3gwez3"); // (*pbs_p)[nump+last-i] = p2[i]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7vktvjafa2lmwlaxsy0nbulut // static segitem_t* approx_bezier (pointf *cp, segitem_t* lp) public static Object approx_bezier(Object... arg) { UNSUPPORTED("al673209lz1hskkt7drx6qaib"); // static segitem_t* approx_bezier (pointf *cp, segitem_t* lp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9460wahmu30hhy9lbmjxls3ju"); // pointf left[4], right[4]; UNSUPPORTED("eomhceyowlehxg33yuxfclcdz"); // if (check_control_points(cp)) { UNSUPPORTED("czol56efilyo93ev9cxz3ytyo"); // if (((lp)->next == (segitem_t*)1)) {(lp)->next = 0; (lp)->p = cp[0];}; UNSUPPORTED("1358cb4a22h5h06oy1a6j08sq"); // lp = appendSeg (cp[3], lp); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("9czjzt923nh9t1r0ofwg1uiqi"); // Bezier (cp, 3, 0.5, left, right); UNSUPPORTED("b0liuqott07bzgsycyywz3wgi"); // lp = approx_bezier (left, lp); UNSUPPORTED("3fohjex9x5u6w5e9ivere17uz"); // lp = approx_bezier (right, lp); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("22f0z0bsq8tczqmt8rdxhmye9"); // return lp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3nlf0dmvl0qwc88vhsi69eo85 // static double bisect (pointf pp, pointf cp, pointf np) public static Object bisect(Object... arg) { UNSUPPORTED("8h36arb302hy4bmfyuq5lvq4d"); // static double bisect (pointf pp, pointf cp, pointf np) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8kh11h44zj580voonfm37tko9"); // double ang, theta, phi; UNSUPPORTED("85xsvegtkipyc8fvrmffpt7on"); // theta = atan2(np.y - cp.y,np.x - cp.x); UNSUPPORTED("c3wm3ceipv4mlnttlnfmsnx9c"); // phi = atan2(pp.y - cp.y,pp.x - cp.x); UNSUPPORTED("b0ntn6nfptzm2qbjo2ls49i1c"); // ang = theta - phi; UNSUPPORTED("4li40ysz6584mc8iejchar0ej"); // if (ang > 0) ang -= 2*M_PI; UNSUPPORTED("col2agnktr81l4ybzpnuvni0b"); // return (phi + ang/2.0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 45zvw50w2tfskogjqa2wzlmhg // static void mkSegPts (segitem_t* prv, segitem_t* cur, segitem_t* nxt, pointf* p1, pointf* p2, double w2) public static Object mkSegPts(Object... arg) { UNSUPPORTED("5hv5nomfe90vtds8hxhox7yej"); // static void mkSegPts (segitem_t* prv, segitem_t* cur, segitem_t* nxt, UNSUPPORTED("78rchge0ctod4mkpq2fslrh0s"); // pointf* p1, pointf* p2, double w2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("egh0kbv4tt7cyg4y0jqpw892u"); // pointf cp, pp, np; UNSUPPORTED("biw1k2scxl82ky4h2e5gzzz3w"); // double theta, delx, dely; UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("1uw3lcxgjre9mhnye9n5mc3nq"); // cp = cur->p; UNSUPPORTED("8oyy7q664cu8y31s5gm98jaok"); // /* if prv or nxt are NULL, use the one given to create a collinear UNSUPPORTED("7cujcl5h2n20wpsmy96ce8y1t"); // * prv or nxt. This could be more efficiently done with special case code, UNSUPPORTED("90m6pb4mxn7bdssm66d6ex652"); // * but this way is more uniform. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("4m73973c5to6aicgd30f6yzaf"); // if (prv) { UNSUPPORTED("c1rauhosdsgiv6485akroiljy"); // pp = prv->p; UNSUPPORTED("ethb044vg7vhe5m2lhq81kab3"); // if (nxt) UNSUPPORTED("5svwwfzkdun5jxqdn4mouh5n6"); // np = nxt->p; UNSUPPORTED("3jir07ymknf0hmb9pv9x4dr3o"); // else { UNSUPPORTED("b6z52jimoq1wmtvxf8qjyx889"); // np.x = 2*cp.x - pp.x; UNSUPPORTED("7plg4dt2urchak7x50b0qhyz2"); // np.y = 2*cp.y - pp.y; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("8hw6aqovl83yx8u0xlbnkcbw2"); // np = nxt->p; UNSUPPORTED("a6vni7nsbr4l53ceg9tyv09i8"); // pp.x = 2*cp.x - np.x; UNSUPPORTED("9r62maaemrr57dm3tdh7fuva6"); // pp.y = 2*cp.y - np.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3ktptkz1bjdklvgym7woyu60x"); // theta = bisect(pp,cp,np); UNSUPPORTED("a4adtr9lu9kofe8mqolr4fg4r"); // delx = w2*cos(theta); UNSUPPORTED("4uljbij5lrj26jqovnqnbkzxc"); // dely = w2*sin(theta); UNSUPPORTED("6r23zes3ngn7ela6z0elabnsq"); // p.x = cp.x + delx; UNSUPPORTED("4uzttmp6bugdo2qudn1xrr8fj"); // p.y = cp.y + dely; UNSUPPORTED("bntn382sm9mnloab7gci08f64"); // *p1 = p; UNSUPPORTED("92rv8dekgpna6e0qh7la8kyg0"); // p.x = cp.x - delx; UNSUPPORTED("2czgguvp48sudmjwiuoanrvbq"); // p.y = cp.y - dely; UNSUPPORTED("823jqic6za2w9bn6bxd5sfovp"); // *p2 = p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3xmhrtq5g7trpp4u40xr0b8y2 // static void map_output_bspline (pointf **pbs, int **pbs_n, int *pbs_poly_n, bezier* bp, double w2) public static Object map_output_bspline(Object... arg) { UNSUPPORTED("6lvrwl802yfwlo7kfixgg5nez"); // static void map_output_bspline (pointf **pbs, int **pbs_n, int *pbs_poly_n, bezier* bp, double w2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("460a9s2we7gle00rxon2fthvv"); // segitem_t* segl = (segitem_t*)gmalloc(sizeof(segitem_t)); UNSUPPORTED("7jg00n3u4jk162hmdo63f64lo"); // segitem_t* segp = segl; UNSUPPORTED("b8pna82nkq66ot9l709idym2o"); // segitem_t* segprev; UNSUPPORTED("agsgwjn5iwlfedcqbv8ckm57"); // segitem_t* segnext; UNSUPPORTED("8kw0juwrrjw2z97umyrg0g1qd"); // int nc, j, k, cnt; UNSUPPORTED("8d1z0mjgb910nvnha97hjtek8"); // pointf pts[4], pt1[50], pt2[50]; UNSUPPORTED("asm74enhle0g30mwnz8t1buui"); // ((segl)->next = (segitem_t*)1); UNSUPPORTED("2adno2mo8kzsvrdtc21rhj4v5"); // nc = (bp->size - 1)/3; /* nc is number of bezier curves */ UNSUPPORTED("7swib3bakj4z6ubjcayxfitj6"); // for (j = 0; j < nc; j++) { UNSUPPORTED("95y530ux2hdmxrhr3nyzp3g9t"); // for (k = 0; k < 4; k++) { UNSUPPORTED("c9uvgse79w32172gjma953aq2"); // pts[k] = bp->list[3*j + k]; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("5sy2c7piyke76572zgaizewud"); // segp = approx_bezier (pts, segp); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6ivsqczanxvoll90ol5rf9nwj"); // segp = segl; UNSUPPORTED("7934mrgiu0ms3qybvycy3cgay"); // segprev = 0; UNSUPPORTED("3wtn792c3ql5yhn77alu6r5d8"); // cnt = 0; UNSUPPORTED("2aqvc301awlepsejrafp4yyc6"); // while (segp) { UNSUPPORTED("3aw5thxio3mh4yvrwep3op3cb"); // segnext = segp->next; UNSUPPORTED("4ov54jbry4z74fejjwuepxe84"); // mkSegPts (segprev, segp, segnext, pt1+cnt, pt2+cnt, w2); UNSUPPORTED("77mslev6fngkh87g2jkd6j87j"); // cnt++; UNSUPPORTED("2r5ivfdgqpq5a6nyot9hijti3"); // if ((segnext == NULL) || (cnt == 50)) { UNSUPPORTED("8upks3wb9w2i7a6fib6tg86so"); // map_bspline_poly (pbs, pbs_n, pbs_poly_n, cnt, pt1, pt2); UNSUPPORTED("br4bzacgnowkbgloqwj6hi6xi"); // pt1[0] = pt1[cnt-1]; UNSUPPORTED("1a82ke2ad8rgjec4c9c58r8nz"); // pt2[0] = pt2[cnt-1]; UNSUPPORTED("5n5phg49hlzthwyjtssepk4pr"); // cnt = 1; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("3m3komtzmujd239y2dgskiyj6"); // segprev = segp; UNSUPPORTED("7gox3cmouztk9pgbp4kyi21n3"); // segp = segnext; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("f3da2ac9kdmfwv0pfno2zrouc"); // /* free segl */ UNSUPPORTED("5h71fr0i2yoyjffmruxsjp21z"); // while (segl) { UNSUPPORTED("diwidyhfydftnczhbvpa03d1"); // segp = segl->next; UNSUPPORTED("n2x8n88pew5ot3r4s1zgnqw9"); // free (segl); UNSUPPORTED("9facw1k96gpqu3xnm2hjb1d2c"); // segl = segp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9xju3of8zy5f2mk0f6vd6kxoi // static boolean is_natural_number(char *sstr) public static Object is_natural_number(Object... arg) { UNSUPPORTED("9rhheqjcnai59q1k0d8y9jynt"); // static boolean is_natural_number(char *sstr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1dlob9vbxvn4cj6g0rosu94jd"); // unsigned char *str = (unsigned char *) sstr; UNSUPPORTED("alw7hro2r95xcs6yzutcluxtm"); // while (*str) UNSUPPORTED("9m3itcf8i2mq6xorvv3zdwhh"); // if (NOT(isdigit(*str++))) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("8fwlqtemsmckleh6946lyd8mw"); // return NOT(0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4udru8pf61208dtuf22zzmmqd // static int layer_index(GVC_t *gvc, char *str, int all) public static Object layer_index(Object... arg) { UNSUPPORTED("3lxm6mluhtqpfsa9nzkd3apqi"); // static int layer_index(GVC_t *gvc, char *str, int all) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3ak6myanfllb9z1xz4e6c0nhf"); // /* GVJ_t *job = gvc->job; */ UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("ddtbvyocaoyzuds5nmnsodhqb"); // if ((*(str)==*("all")&&!strcmp(str,"all"))) UNSUPPORTED("8duf2go7r0jiqw3wnkiqbol4r"); // return all; UNSUPPORTED("8ztkkwz0e702fr9np4y6o4kuu"); // if (is_natural_number(str)) UNSUPPORTED("34uc4omjjar6x7rskk72va3j6"); // return atoi(str); UNSUPPORTED("1s842n3ke9usoirca1dwsrrzx"); // if (gvc->layerIDs) UNSUPPORTED("cpogmg64n6exvblx87d1pmwfo"); // for (i = 1; i <= gvc->numLayers; i++) UNSUPPORTED("939rzzi8dp0sws71xjv2n1d66"); // if ((*(str)==*(gvc->layerIDs[i])&&!strcmp(str,gvc->layerIDs[i]))) UNSUPPORTED("b9e4nv60rh6o1ai85uu0ougv"); // return i; UNSUPPORTED("8azkpi8o0wzdufa90lw8hpt6q"); // return -1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a8rdk6dogn52h5grbbxfoq34z // static boolean selectedLayer(GVC_t *gvc, int layerNum, int numLayers, char *spec) public static Object selectedLayer(Object... arg) { UNSUPPORTED("eri18s9ivcrynir2bpx4jnw8g"); // static boolean selectedLayer(GVC_t *gvc, int layerNum, int numLayers, char *spec) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("15uc40a82mi1mztghnyvoy460"); // int n0, n1; UNSUPPORTED("h0or3v13348vfl22jqz895yc"); // unsigned char buf[128]; UNSUPPORTED("2zdui2eukxklqn2ig8nh0bw1t"); // char *w0, *w1; UNSUPPORTED("ccg75yolmilezu48nio7ksbf9"); // char *buf_part_p = NULL, *buf_p = NULL, *cur, *part_in_p; UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("9h6icoq4cc2e2ibff10l3xrob"); // boolean rval = 0; UNSUPPORTED("ci65k77x1b3nq6luu69s87oup"); // agxbinit(&xb, 128, buf); UNSUPPORTED("bhiyk7f25o6jysgsxycaf5vbo"); // agxbput(&xb, spec); UNSUPPORTED("aww221dmkj4h9x0qmlvai6bun"); // part_in_p = (((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf)); UNSUPPORTED("8o0g4i9g8jc2qoljztsf5l69"); // /* Thanks to Matteo Nastasi for this extended code. */ UNSUPPORTED("5wc9kd553mqdmeqrzv5u3kuyv"); // while ((rval == 0) && (cur = strtok_r(part_in_p, gvc->layerListDelims, &buf_part_p))) { UNSUPPORTED("5mvzc9us20jr0bcopdypz0mfo"); // w1 = w0 = strtok_r (cur, gvc->layerDelims, &buf_p); UNSUPPORTED("snrpgbkmqz2ba186d24cmfnx"); // if (w0) UNSUPPORTED("bx1n828umga5916irui1tb7cx"); // w1 = strtok_r (NULL, gvc->layerDelims, &buf_p); UNSUPPORTED("crroc3un37wt9d0omuvaq8gca"); // switch ((w0 != NULL) + (w1 != NULL)) { UNSUPPORTED("46lzlkypfilrge90rkaiveuyb"); // case 0: UNSUPPORTED("1y7jah5hullcu9snkfa1oy1f2"); // rval = 0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("2o83im06dulx11wjpy469gkoa"); // case 1: UNSUPPORTED("1jygz6h6idqhtvh7bqd78fhy2"); // n0 = layer_index(gvc, w0, layerNum); UNSUPPORTED("c8zzp13vx1yth31xuqj1661c8"); // rval = (n0 == layerNum); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("b8vgbvwzllfs4lrqmmqyr1spk"); // case 2: UNSUPPORTED("9y7cribaclzkutrf9lusdgb73"); // n0 = layer_index(gvc, w0, 0); UNSUPPORTED("45uxr9q1d74dbhay2ugv205w0"); // n1 = layer_index(gvc, w1, numLayers); UNSUPPORTED("2gcf1ylvtukspepmlgp37irq5"); // if ((n0 >= 0) || (n1 >= 0)) { UNSUPPORTED("ad3pm1secuibs7iqrobtxw2is"); // if (n0 > n1) { UNSUPPORTED("en01k6v1n32c2swyx0elf6pcg"); // int t = n0; UNSUPPORTED("2bjyjz9cvls6hyytpcmbkgmcs"); // n0 = n1; UNSUPPORTED("bpseot9l807jidv28yid809wm"); // n1 = t; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("cer1dt8c42dt0eigzkalgg0u4"); // rval = BETWEEN(n0, layerNum, n1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("59btplbumo93hp7myb8mvi5ee"); // part_in_p = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1at5m9ctjn3ukv5gqtfswik02"); // agxbfree(&xb); UNSUPPORTED("bhpm3hntm4gkn66ozolahaqhb"); // return rval; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2zlzcril6uiesf8z9zo8bvfyz // static boolean selectedlayer(GVJ_t *job, char *spec) public static Object selectedlayer(Object... arg) { UNSUPPORTED("3nzphmy08w2y4a3yntr24xw0p"); // static boolean selectedlayer(GVJ_t *job, char *spec) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("any52sc1hzc52gsl6k37qteok"); // return selectedLayer (job->gvc, job->layerNum, job->numLayers, spec); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8elt2ktgbiurz9gdlvgjpr8mp // static int* parse_layerselect(GVC_t *gvc, graph_t * g, char *p) public static Object parse_layerselect(Object... arg) { UNSUPPORTED("6lvivuwtc6e4wjgguepfq8nud"); // static int* parse_layerselect(GVC_t *gvc, graph_t * g, char *p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ezxtli9973z4een4uoj2cfsho"); // int* laylist = (int*)gmalloc((gvc->numLayers+2)*sizeof(int)); UNSUPPORTED("b5a93beg34iiqtnufv9wanh2r"); // int i, cnt = 0; UNSUPPORTED("c2uuo0qyuykgxql7fsz1al9h4"); // for (i = 1; i <=gvc->numLayers; i++) { UNSUPPORTED("7u51wobeze34in0qy7cnjmqv5"); // if (selectedLayer (gvc, i, gvc->numLayers, p)) { UNSUPPORTED("b5ymvvr45fvj1wbcdyoe57nnd"); // laylist[++cnt] = i; UNSUPPORTED("8nzcpbtoi924xzu8ze3z6dbft"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("77njmf3w9m7xk714hk5o8hjv5"); // if (cnt) { UNSUPPORTED("f3878e9jng3sa7ipt8cmlofqs"); // laylist[0] = cnt; UNSUPPORTED("a3k7ll5ie5r0j4h3t4tefex3b"); // laylist[cnt+1] = gvc->numLayers+1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("c0ejg4cn6ao9jn7vtsuqug4gl"); // agerr(AGWARN, "The layerselect attribute \"%s\" does not match any layer specifed by the layers attribute - ignored.\n", p); UNSUPPORTED("f3878e9jng3sa7ipt8cmlofqs"); // laylist[0] = cnt; UNSUPPORTED("8skx11npk6vn3hbxvcuxklf6v"); // free (laylist); UNSUPPORTED("45iwrgdr374i74cf8em6uwfmx"); // laylist = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("30gwy84osotlzmeicu7kfluyp"); // return laylist; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4kiahfclenuf921uyxg4lzlbs // static int parse_layers(GVC_t *gvc, graph_t * g, char *p) public static Object parse_layers(Object... arg) { UNSUPPORTED("1spuppzfx1me4g279wfftgu5n"); // static int parse_layers(GVC_t *gvc, graph_t * g, char *p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7v0207mxa8hqzexz49lscukl8"); // int ntok; UNSUPPORTED("eqt7m58ywry2anaa5wpii01ri"); // char *tok; UNSUPPORTED("bpt627vzs0r1tzo7jgpyjdssp"); // int sz; UNSUPPORTED("2v5nye0hqxoem0cn4n22cgcov"); // gvc->layerDelims = agget(g, "layersep"); UNSUPPORTED("2gnxlhqmvfrjzjd75hm5mx6em"); // if (!gvc->layerDelims) UNSUPPORTED("aia1lj9r0sseuxbuefdo14bao"); // gvc->layerDelims = ":\t "; UNSUPPORTED("6b9c2dn4yffcjru8dxyzsu37e"); // gvc->layerListDelims = agget(g, "layerlistsep"); UNSUPPORTED("7wf2w4t3x9ak3skyqq8y1okhb"); // if (!gvc->layerListDelims) UNSUPPORTED("563hs3cgmcdcqb6l4rrpv75ek"); // gvc->layerListDelims = ","; UNSUPPORTED("8r1h2mlb2u87klqp21y9ilhie"); // if ((tok = strpbrk (gvc->layerDelims, gvc->layerListDelims))) { /* conflict in delimiter strings */ UNSUPPORTED("q0y5qqfvuie4x5nbuh4ltwml"); // agerr(AGWARN, "The character \'%c\' appears in both the layersep and layerlistsep attributes - layerlistsep ignored.\n", *tok); UNSUPPORTED("5yy5l7k4jffs33fkk86gnxx1y"); // gvc->layerListDelims = ""; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c4wye11e21cuxetha8fjaezcj"); // ntok = 0; UNSUPPORTED("1gxcbnw3tixp11pk9jkijirao"); // sz = 0; UNSUPPORTED("2ejr8g3scrhv7fxwj1tno13zd"); // gvc->layers = strdup(p); UNSUPPORTED("6q7eqo62kv90x2ch8rce2nhwq"); // for (tok = strtok(gvc->layers, gvc->layerDelims); tok; UNSUPPORTED("577hr51xn1w20008653y51w8j"); // tok = strtok(NULL, gvc->layerDelims)) { UNSUPPORTED("7gwdsxgme4t8qinotj0dxsvcw"); // ntok++; UNSUPPORTED("2ffbgwipxpwoyr4fd0k4ha0nq"); // if (ntok > sz) { UNSUPPORTED("d3yzx9720tr2kq7hefgjdkrp6"); // sz += 128; UNSUPPORTED("32u0qx8yeqxu4r0bk3enhqi0n"); // gvc->layerIDs = ALLOC(sz, gvc->layerIDs, char *); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("3q96x283efzk6afscurxeve1h"); // gvc->layerIDs[ntok] = tok; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b0n1l1dvbn6aov6g3xvi2i0ur"); // if (ntok) { UNSUPPORTED("epu81n9xme9sxje3laz6szujx"); // gvc->layerIDs = RALLOC(ntok + 2, gvc->layerIDs, char *); /* shrink to minimum size */ UNSUPPORTED("yd1fq95zbahnl8ztvhpjb71k"); // gvc->layerIDs[0] = NULL; UNSUPPORTED("557694uxqmnbvy9qb7t1armld"); // gvc->layerIDs[ntok + 1] = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c4f8xkcsh8jpj7admwanbez66"); // return ntok; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4gyjzihgl8che7plolivfm89h // static int chkOrder(graph_t * g) public static Object chkOrder(Object... arg) { UNSUPPORTED("9jzoupo86al5szoppdb9ug4jm"); // static int chkOrder(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7g8u2dbeh9st5st5kp6oshdu5"); // char *p = agget(g, "outputorder"); UNSUPPORTED("3cvmixd2u1g2d9l03kuxyyxxw"); // if (p) { UNSUPPORTED("a88zp39raphu4mpw0pi8oq1hi"); // char c = *p; UNSUPPORTED("a11i71rfjtl0mxznvr2rsxg4r"); // if ((c == 'n') && !strcmp(p + 1, "odesfirst")) UNSUPPORTED("d6qsecgbj60rq8xaef9umqge9"); // return (1<<0); UNSUPPORTED("a5f5xut0kypunfkizx4yu77ae"); // if ((c == 'e') && !strcmp(p + 1, "dgesfirst")) UNSUPPORTED("9boy87u68njstsw43wxf5urh9"); // return (1<<4); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 33hjwrwudmjobd5yhbvu86jxz // static void init_layering(GVC_t * gvc, graph_t * g) public static Object init_layering(Object... arg) { UNSUPPORTED("7iqktnxyjnxn51eeuuy0oh1uz"); // static void init_layering(GVC_t * gvc, graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("76nok3eiyr33qf4ecv69ujxn6"); // char *str; UNSUPPORTED("avab4390fpb68yais5eijodkt"); // /* free layer strings and pointers from previous graph */ UNSUPPORTED("8zsh0fgdj4ri6w73fr47391cy"); // if (gvc->layers) { UNSUPPORTED("6zw20p1kbgu9ycram23hk8ece"); // free(gvc->layers); UNSUPPORTED("a012u6bc7d55ctuf92taryny"); // gvc->layers = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("42i2j3ry654uexmr231uhaqw8"); // if (gvc->layerIDs) { UNSUPPORTED("5x7zl391qtijlzmv7wg3my1uh"); // free(gvc->layerIDs); UNSUPPORTED("b4z8eoj6aem9v33o3snekjt37"); // gvc->layerIDs = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1zd3la1zp34vbtw6eiyojzrxi"); // if (gvc->layerlist) { UNSUPPORTED("c2onv8y2o0rubycnv6cvmfgxx"); // free(gvc->layerlist); UNSUPPORTED("1ovwh9w5ny7xovqo71y582jpw"); // gvc->layerlist = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("efigtm6w6713gs6f8j1kdon3p"); // if ((str = agget(g, "layers")) != 0) { UNSUPPORTED("vdhfuyl28ln9lsrhizcu26ri"); // gvc->numLayers = parse_layers(gvc, g, str); UNSUPPORTED("2zl1bqc97q5o2qjpkdo7svkrj"); // if (((str = agget(g, "layerselect")) != 0) && *str) { UNSUPPORTED("428c4zbkpplv4awwcg3ne3q2i"); // gvc->layerlist = parse_layerselect(gvc, g, str); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("b4z8eoj6aem9v33o3snekjt37"); // gvc->layerIDs = NULL; UNSUPPORTED("d1k0kld2zrm4eln7qp4kx6yaz"); // gvc->numLayers = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3edoapk4bnc3rsmt3huwoqf9g // static int numPhysicalLayers (GVJ_t *job) public static Object numPhysicalLayers(Object... arg) { UNSUPPORTED("5zoarmqyf1m3t67nl5xahrslu"); // static int numPhysicalLayers (GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bzx9zh3zx8kyugkbdhlk4qzte"); // if (job->gvc->layerlist) { UNSUPPORTED("60ik4am7yzmctb72j26n5lr2q"); // return job->gvc->layerlist[0]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("1aeayu3ipqii7ienwaw2fclmc"); // return job->numLayers; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cpiumi39pczm8e5154f9udcco // static void firstlayer(GVJ_t *job, int** listp) public static Object firstlayer(Object... arg) { UNSUPPORTED("5e25vrbqvnj3q41zkb05shjgt"); // static void firstlayer(GVJ_t *job, int** listp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("90n549z2ovp2q6sbcp8ovmgl5"); // job->numLayers = job->gvc->numLayers; UNSUPPORTED("bzx9zh3zx8kyugkbdhlk4qzte"); // if (job->gvc->layerlist) { UNSUPPORTED("2fuv307u38d5mdk8l04r6u4wq"); // int *list = job->gvc->layerlist; UNSUPPORTED("y80sygu21ondz3a4lzihqypj"); // int cnt = *list++; UNSUPPORTED("5pz4cc2cq395z3znk5opultm2"); // if ((cnt > 1) && (! (job->flags & (1<<6)))) { UNSUPPORTED("4gruo7b3gf61r0fw9j6awgase"); // agerr(AGWARN, "layers not supported in %s output\n", UNSUPPORTED("6aw3ie76clejxz6q2120b63i8"); // job->output_langname); UNSUPPORTED("edlmftq4sdx2y0m6ghban11vo"); // list[1] = job->numLayers + 1; /* only one layer printed */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("397jrexm8oa7doqg2bmttotgy"); // job->layerNum = *list++; UNSUPPORTED("74506hoopc6w4pd2tieyyk052"); // *listp = list; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("9njkqrmknfdjv143rey9fn21b"); // if ((job->numLayers > 1) UNSUPPORTED("b6082dq1axeyie3r2u3gmt90y"); // && (! (job->flags & (1<<6)))) { UNSUPPORTED("4gruo7b3gf61r0fw9j6awgase"); // agerr(AGWARN, "layers not supported in %s output\n", UNSUPPORTED("6aw3ie76clejxz6q2120b63i8"); // job->output_langname); UNSUPPORTED("7aldo2ccuxu5nz7wrjpi2kgbk"); // job->numLayers = 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8fsuke0q52rma3v3dzl4r7nxl"); // job->layerNum = 1; UNSUPPORTED("8by4zer0vztykds6f7wo09dxl"); // *listp = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b445mlh9alsqmydjwlh3lzsnz // static boolean validlayer(GVJ_t *job) public static Object validlayer(Object... arg) { UNSUPPORTED("bfi9hniz5k2qe0dadeqq4ki5b"); // static boolean validlayer(GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("45m14336nzkr3zwmroo7wwmop"); // return (job->layerNum <= job->numLayers); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3y21gcvzhj6vn9gl9g6gag119 // static void nextlayer(GVJ_t *job, int** listp) public static Object nextlayer(Object... arg) { UNSUPPORTED("28yugcvd6qow68yasmq967pbn"); // static void nextlayer(GVJ_t *job, int** listp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("20yv9az4kpafd26nxc9kj1ggt"); // int *list = *listp; UNSUPPORTED("essmww0ueu4ulfn9wjtq7m4vl"); // if (list) { UNSUPPORTED("397jrexm8oa7doqg2bmttotgy"); // job->layerNum = *list++; UNSUPPORTED("74506hoopc6w4pd2tieyyk052"); // *listp = list; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("2xz0u3jthtaln82mr50e5afw8"); // job->layerNum++; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dpqjdl72ma03lvh522bej00pf // static point pagecode(GVJ_t *job, char c) public static Object pagecode(Object... arg) { UNSUPPORTED("858jif62sg7t8bfj0q5dgi77b"); // static point pagecode(GVJ_t *job, char c) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e5r3mj8btrkw973m7l0rritko"); // point rv; UNSUPPORTED("b2ritu2u2kl5u66e81tvv21f8"); // rv.x = rv.y = 0; UNSUPPORTED("8amt8fmqdipygnxirowfbawox"); // switch (c) { UNSUPPORTED("2s6hwvc7utwke7l45suhmumhk"); // case 'T': UNSUPPORTED("13gd95p7284sp2kf1rup3gssg"); // job->pagesArrayFirst.y = job->pagesArraySize.y - 1; UNSUPPORTED("6nseewwep98wlkw901fwmkkr4"); // rv.y = -1; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9nbe45sgjnq9pebqfddm57j34"); // case 'B': UNSUPPORTED("8wyp8gbxgnri6agdl2zv0nzbv"); // rv.y = 1; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("92wd4259ggzetbnn56kh75cap"); // case 'L': UNSUPPORTED("9zlyi4rkx1oa6app1mk6zdqs1"); // rv.x = 1; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9rqaici2t4gmxgbc4jjbi5147"); // case 'R': UNSUPPORTED("d4nni7llszxdo8f1w0qosk8n2"); // job->pagesArrayFirst.x = job->pagesArraySize.x - 1; UNSUPPORTED("92r9rc8z07ot90pz7kfoilce8"); // rv.x = -1; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wn2yfi2l0bfzlw5fyeeunug7 // static void init_job_pagination(GVJ_t * job, graph_t *g) public static Object init_job_pagination(Object... arg) { UNSUPPORTED("3i2vk6s34y6kty29dnciiqr2i"); // static void init_job_pagination(GVJ_t * job, graph_t *g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eyew5ay5wwktz4fysz0b78ugv"); // GVC_t *gvc = job->gvc; UNSUPPORTED("1p9i7j8ykvafmept9v326ki38"); // pointf pageSize; /* page size for the graph - points*/ UNSUPPORTED("cbreumvyopnc8jb823f3fg490"); // pointf imageSize; /* image size on one page of the graph - points */ UNSUPPORTED("bvl8rq7rhjfofyjexcv6ath9j"); // pointf margin; /* margin for a page of the graph - points */ UNSUPPORTED("dlxve5gfi5a0trnjntul0l7vt"); // pointf centering = {0.0, 0.0}; /* centering offset - points */ UNSUPPORTED("7wipi75cu71j2ubfdid86r3mz"); // /* unpaginated image size - in points - in graph orientation */ UNSUPPORTED("4hd3j07l34jpp34kggybuv7g7"); // imageSize = job->view; UNSUPPORTED("euhifkui6pusftx1ts79yvw64"); // /* rotate imageSize to page orientation */ UNSUPPORTED("eoj2n5u9aqzo40fe4thgnio4v"); // if (job->rotation) UNSUPPORTED("5bktmmmrdanogwscr9akvqvgp"); // imageSize = exch_xyf(imageSize); UNSUPPORTED("cj9bqu9dsr79jfgtfgxyw1bt7"); // /* margin - in points - in page orientation */ UNSUPPORTED("2prr8ugshi1wh3b0uqq1rytbq"); // margin = job->margin; UNSUPPORTED("e0syewo5shkbuvckfgxahgawk"); // /* determine pagination */ UNSUPPORTED("3ben86oxo4b9mvbfear0uaa5k"); // if (gvc->graph_sets_pageSize && (job->flags & (1<<5))) { UNSUPPORTED("e9k3pfk8bwgj68mf5plbws00a"); // /* page was set by user */ UNSUPPORTED("26ouotfw5qjqy45epxvh85q2a"); // /* determine size of page for image */ UNSUPPORTED("cmeyghelvujbqypzncob2k347"); // pageSize.x = gvc->pageSize.x - 2 * margin.x; UNSUPPORTED("4hhbnhebhvdvguv07gl1exqzr"); // pageSize.y = gvc->pageSize.y - 2 * margin.y; UNSUPPORTED("7dzf9uvb5ahp4ja7cchy16e9q"); // if (pageSize.x < .0001) UNSUPPORTED("8qfk6mlrxuxel1fxryn3xxsw7"); // job->pagesArraySize.x = 1; UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("39zkkuuxu0d1bo4xiaa6rvio1"); // job->pagesArraySize.x = (int)(imageSize.x / pageSize.x); UNSUPPORTED("crpbptuooqpagkwwoovfr87ze"); // if ((imageSize.x - (job->pagesArraySize.x * pageSize.x)) > .0001) UNSUPPORTED("fvkmj6z0flmool752kj3ezui"); // job->pagesArraySize.x++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("aeqvjc584z1k3o3btf1z27yi"); // if (pageSize.y < .0001) UNSUPPORTED("9i2hzfup3uawsgs8xz84cvm3u"); // job->pagesArraySize.y = 1; UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("eu05pk9cbv4r7teo48863rut5"); // job->pagesArraySize.y = (int)(imageSize.y / pageSize.y); UNSUPPORTED("9ec6tcamvhf35mwg760yp31tj"); // if ((imageSize.y - (job->pagesArraySize.y * pageSize.y)) > .0001) UNSUPPORTED("2ptmkss0hqmoiaitn5hc03ccy"); // job->pagesArraySize.y++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dz4mq3t7i81irfy7jpgoo8slq"); // job->numPages = job->pagesArraySize.x * job->pagesArraySize.y; UNSUPPORTED("8umi1sn4x93betwy7p6c2ceqk"); // /* find the drawable size in points */ UNSUPPORTED("eei96a8vzvruyjbss0f6i4qe9"); // imageSize.x = MIN(imageSize.x, pageSize.x); UNSUPPORTED("a7bw5k7czo7ubsb5x8785vxd7"); // imageSize.y = MIN(imageSize.y, pageSize.y); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("226xpnvf8rs1n0r4ei8klybwz"); // /* page not set by user, use default from renderer */ UNSUPPORTED("916om7kp0deyvh2ghmt7tmt47"); // if (job->render.features) { UNSUPPORTED("21jloev0l8fed4itydbq5py3k"); // pageSize.x = job->device.features->default_pagesize.x - 2*margin.x; UNSUPPORTED("6c84lafv8rataik7pt8umib2"); // if (pageSize.x < 0.) UNSUPPORTED("86x0hskgajl1rvbco28b3ftih"); // pageSize.x = 0.; UNSUPPORTED("bvs3ijknux4wq8q8oh2adxyyp"); // pageSize.y = job->device.features->default_pagesize.y - 2*margin.y; UNSUPPORTED("5ff2kpbbm9iear9jk4p33l1eu"); // if (pageSize.y < 0.) UNSUPPORTED("nnszo3g5yfwbcgr1rfyh9htr"); // pageSize.y = 0.; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("7flj6fib45vcdli5dtp5hzydu"); // pageSize.x = pageSize.y = 0.; UNSUPPORTED("563r9ecafak4g1eplsnjkqdi3"); // job->pagesArraySize.x = job->pagesArraySize.y = job->numPages = 1; UNSUPPORTED("2ey4w19bytoq2sls78pheoku7"); // if (pageSize.x < imageSize.x) UNSUPPORTED("15499m2w5qjd6yd4xa4ixhvjr"); // pageSize.x = imageSize.x; UNSUPPORTED("austii7xnr5g8y2fjg8l6gl3"); // if (pageSize.y < imageSize.y) UNSUPPORTED("bblz8gxp9uoak4lx31ok0b8b8"); // pageSize.y = imageSize.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bbafhwu8tnhlc6acwajgx43vy"); // /* initial window size */ UNSUPPORTED("8362vxhywm5vjg5yy2rukot0l"); // //fprintf(stderr,"page=%g,%g dpi=%g,%g zoom=%g\n", pageSize.x, pageSize.y, job->dpi.x, job->dpi.y, job->zoom); UNSUPPORTED("9ov3mqr5woomu5pa3ijim18bp"); // job->width = ROUND((pageSize.x + 2*margin.x) * job->dpi.x / 72); UNSUPPORTED("dtc0guw406xkcekddmamm5rae"); // job->height = ROUND((pageSize.y + 2*margin.y) * job->dpi.y / 72); UNSUPPORTED("7osvdh761zt2s8mi855ch8az8"); // /* set up pagedir */ UNSUPPORTED("1cf5m3zu5ms9hd5uutq68nzfr"); // job->pagesArrayMajor.x = job->pagesArrayMajor.y UNSUPPORTED("cuhzmvcf28hg8mxfw6jzahyz1"); // = job->pagesArrayMinor.x = job->pagesArrayMinor.y = 0; UNSUPPORTED("910btb676tbzhf5zag3qt6p6y"); // job->pagesArrayFirst.x = job->pagesArrayFirst.y = 0; UNSUPPORTED("58i27py4gadbh4uynztkillbo"); // job->pagesArrayMajor = pagecode(job, gvc->pagedir[0]); UNSUPPORTED("4g3yxj64kn7kau45efo78icdp"); // job->pagesArrayMinor = pagecode(job, gvc->pagedir[1]); UNSUPPORTED("crjkqjf6ujmxl2713vrq1mowh"); // if ((abs(job->pagesArrayMajor.x + job->pagesArrayMinor.x) != 1) UNSUPPORTED("8xuyb2svr5wn3bsnke50x9egf"); // || (abs(job->pagesArrayMajor.y + job->pagesArrayMinor.y) != 1)) { UNSUPPORTED("rupytferkko4y32b1y4nvfda"); // job->pagesArrayMajor = pagecode(job, 'B'); UNSUPPORTED("3oh81o2dhshk0cwkh0se96nqd"); // job->pagesArrayMinor = pagecode(job, 'L'); UNSUPPORTED("6fm493t81wrciw7a1qwrwwv2v"); // agerr(AGWARN, "pagedir=%s ignored\n", gvc->pagedir); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("csilklooo31ve0sxcvlk6sz50"); // /* determine page box including centering */ UNSUPPORTED("alu1x0je9svo1m9vsro4jt661"); // if (GD_drawing(g)->centered) { UNSUPPORTED("bd1di5q520ro9gdu3luri6uqw"); // if (pageSize.x > imageSize.x) UNSUPPORTED("by6kyuqhzuke68yh4d1zsgjl8"); // centering.x = (pageSize.x - imageSize.x) / 2; UNSUPPORTED("245d5xe3ls4raq0ru2opv9bjk"); // if (pageSize.y > imageSize.y) UNSUPPORTED("entb38itr4f1eoghh2si1k2yc"); // centering.y = (pageSize.y - imageSize.y) / 2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2jawgno03mhhf060l1l58y85o"); // /* rotate back into graph orientation */ UNSUPPORTED("3h1yo631e2fq69mxwoggya716"); // if (job->rotation) { UNSUPPORTED("5bktmmmrdanogwscr9akvqvgp"); // imageSize = exch_xyf(imageSize); UNSUPPORTED("cdvkc3n17wltx1ckd9ctxu40"); // pageSize = exch_xyf(pageSize); UNSUPPORTED("aoommvrw3wcdqhpe1d9z2nrbr"); // margin = exch_xyf(margin); UNSUPPORTED("am7xuokdmqu2xn6gmw3imq4ys"); // centering = exch_xyf(centering); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("452t79mqvs76inxtds258lmwc"); // /* canvas area, centered if necessary */ UNSUPPORTED("egq8epmn2ww7uiikth9xfqyg2"); // job->canvasBox.LL.x = margin.x + centering.x; UNSUPPORTED("317995ucd58ato9cs7ssy4kw5"); // job->canvasBox.LL.y = margin.y + centering.y; UNSUPPORTED("9dlme2kqph7etv96uch6et43x"); // job->canvasBox.UR.x = margin.x + centering.x + imageSize.x; UNSUPPORTED("5eznso0zqq6thx7ifejpl7egg"); // job->canvasBox.UR.y = margin.y + centering.y + imageSize.y; UNSUPPORTED("ejrxa302gsbb1mtk617yev4ma"); // /* size of one page in graph units */ UNSUPPORTED("2ktn14lo6mijabcu413qkefxe"); // job->pageSize.x = imageSize.x / job->zoom; UNSUPPORTED("mo56q7xk3qwgskgf05s41bku"); // job->pageSize.y = imageSize.y / job->zoom; UNSUPPORTED("b5mgup3twbezb6h3b77frrr32"); // /* pageBoundingBox in device units and page orientation */ UNSUPPORTED("wgrjodb4gag4o6bbqdxsct4f"); // job->pageBoundingBox.LL.x = ROUND(job->canvasBox.LL.x * job->dpi.x / 72); UNSUPPORTED("4ibgme5rpasxyxnxfo9nx0uej"); // job->pageBoundingBox.LL.y = ROUND(job->canvasBox.LL.y * job->dpi.y / 72); UNSUPPORTED("23f72iko8ym45z6o2v06lmrf8"); // job->pageBoundingBox.UR.x = ROUND(job->canvasBox.UR.x * job->dpi.x / 72); UNSUPPORTED("cazmki1n27pnpo1rf83qc35cv"); // job->pageBoundingBox.UR.y = ROUND(job->canvasBox.UR.y * job->dpi.y / 72); UNSUPPORTED("3h1yo631e2fq69mxwoggya716"); // if (job->rotation) { UNSUPPORTED("effd896sgn6sehp6jdoqfo5bu"); // job->pageBoundingBox.LL = exch_xy(job->pageBoundingBox.LL); UNSUPPORTED("e6umepvfyiglcz7y9070vqcw1"); // job->pageBoundingBox.UR = exch_xy(job->pageBoundingBox.UR); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 18839plafofp0mij32iifl4kw // static void firstpage(GVJ_t *job) public static Object firstpage(Object... arg) { UNSUPPORTED("54ikst765kaurqs5qbxgw62pi"); // static void firstpage(GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("d5tvlsaovhs5xq1fsq2ff13ea"); // job->pagesArrayElem = job->pagesArrayFirst; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1oosdfui4w6wrmjyrea5q0q5j // static boolean validpage(GVJ_t *job) public static Object validpage(Object... arg) { UNSUPPORTED("5hdqj8s4dsinb9hoj6ra36f9w"); // static boolean validpage(GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6s658komj0oc3gl02m6w1a5cl"); // return ((job->pagesArrayElem.x >= 0) UNSUPPORTED("i8aw94fegecco4s00otz3bb0"); // && (job->pagesArrayElem.x < job->pagesArraySize.x) UNSUPPORTED("61clso3i8seexlw62qjygdpkc"); // && (job->pagesArrayElem.y >= 0) UNSUPPORTED("aude4er9wxhdfvjg0cm8qe53l"); // && (job->pagesArrayElem.y < job->pagesArraySize.y)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9xha5eg5k3mbziq2ptbw1gyyk // static void nextpage(GVJ_t *job) public static Object nextpage(Object... arg) { UNSUPPORTED("3zzzr5yvj7mho7ylmluju8zzv"); // static void nextpage(GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("90v54lwwxx1bsav5znrj48tkj"); // job->pagesArrayElem = add_point(job->pagesArrayElem, job->pagesArrayMinor); UNSUPPORTED("9lqhnwlrk62cxcln9uq0024y0"); // if (validpage(job) == 0) { UNSUPPORTED("2mcnl5q2zavzvatv4bugp5g6v"); // if (job->pagesArrayMajor.y) UNSUPPORTED("53fqbcbkex674c100tfx744f6"); // job->pagesArrayElem.x = job->pagesArrayFirst.x; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("503luvfr4rh4kt3ktfo48tii4"); // job->pagesArrayElem.y = job->pagesArrayFirst.y; UNSUPPORTED("a179fxb17hjyc52yjgeshme15"); // job->pagesArrayElem = add_point(job->pagesArrayElem, job->pagesArrayMajor); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a7du41byqeco4ri9ytgrmrv91 // static boolean write_edge_test(Agraph_t * g, Agedge_t * e) public static Object write_edge_test(Object... arg) { UNSUPPORTED("9rfens9tggchdklhfwa4kaqlu"); // static boolean write_edge_test(Agraph_t * g, Agedge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5qsdev7ikmpmm9zepv8ye0zy6"); // Agraph_t *sg; UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c; UNSUPPORTED("99d9j6m0161wdv2tu4wbf3ifi"); // for (c = 1; c <= GD_n_cluster(g); c++) { UNSUPPORTED("cuf43q4kl3kqgyuuxdqve1mqt"); // sg = GD_clust(g)[c]; UNSUPPORTED("72iyzot8hjs1ni2lzvvc2ibn2"); // if (agcontains(sg, e)) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8fwlqtemsmckleh6946lyd8mw"); // return NOT(0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 blr202hbxs2lw3k393qohaw2i // static boolean write_node_test(Agraph_t * g, Agnode_t * n) public static Object write_node_test(Object... arg) { UNSUPPORTED("9xuxw9sbimnioecqbuwnav0qp"); // static boolean write_node_test(Agraph_t * g, Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5qsdev7ikmpmm9zepv8ye0zy6"); // Agraph_t *sg; UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c; UNSUPPORTED("99d9j6m0161wdv2tu4wbf3ifi"); // for (c = 1; c <= GD_n_cluster(g); c++) { UNSUPPORTED("cuf43q4kl3kqgyuuxdqve1mqt"); // sg = GD_clust(g)[c]; UNSUPPORTED("4mgclp1plbdi4oudwrp9t4oh2"); // if (agcontains(sg, n)) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8fwlqtemsmckleh6946lyd8mw"); // return NOT(0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3w1wzp6uh4yl5o7brxcuf9ip6 // static pointf* copyPts (pointf* pts, int* ptsize, xdot_point* inpts, int numpts) public static Object copyPts(Object... arg) { UNSUPPORTED("1wmmoe7m5528rl69n3zrnxhrg"); // static pointf* UNSUPPORTED("7bm15tetrusr4tjv45g1l12mm"); // copyPts (pointf* pts, int* ptsize, xdot_point* inpts, int numpts) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9a0g5x0xovxojrvkasvwowcw5"); // int i, sz = *ptsize; UNSUPPORTED("a9llhmmnr8bimltlwtihii1cr"); // if (numpts > sz) { UNSUPPORTED("3z4f2367ql9ea8y2br7xxotsn"); // sz = MAX(2*sz, numpts); UNSUPPORTED("20m3u8zv7b0bef39rhk9o4ft5"); // pts = RALLOC(sz, pts, pointf); UNSUPPORTED("klakg17zs75ckw23eh65hsxj"); // *ptsize = sz; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5alxr1b92wrqvkbrhhkibw4n0"); // for (i = 0; i < numpts; i++) { UNSUPPORTED("23z0p3o7uw6iisz8rz93fmju8"); // pts[i].x = inpts[i].x; UNSUPPORTED("1otoj1bflw7ets1aqhi7x3gv7"); // pts[i].y = inpts[i].y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b7gk8q1reftzri269holggnig"); // return pts; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2ho96kyoz7afiqvpkgzje2q17 // static void emit_xdot (GVJ_t * job, xdot* xd) public static Object emit_xdot(Object... arg) { UNSUPPORTED("dx3xx20717wqwhmrxmr2vve4w"); // static void emit_xdot (GVJ_t * job, xdot* xd) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2p6ji7mn6c9yb2wjrxpfdi2a7"); // int image_warn = 1; UNSUPPORTED("4fdllwmvxpz1l1wbhs4x0nd8h"); // int ptsize = 1000; UNSUPPORTED("14sqwaw2nua8zxlzi03vrp99n"); // pointf* pts = (pointf*)gmalloc((1000)*sizeof(pointf)); UNSUPPORTED("6h54fnrtmztsxuhsa6imjz1a7"); // exdot_op* op; UNSUPPORTED("fliif79u3s8wl3il1sr4xy7m"); // int i, angle; UNSUPPORTED("a0vsnu7j685g9wawdylnp9ack"); // char** styles = 0; UNSUPPORTED("610stn97kmwddhnpeizvxmri2"); // int filled = 1; UNSUPPORTED("9go5curik6dnbejv5o2pj8ve2"); // op = (exdot_op*)(xd->ops); UNSUPPORTED("dvwaxn9xbj2jw2hjwvvs0tj3z"); // for (i = 0; i < xd->cnt; i++) { UNSUPPORTED("ab1ajnetstzss8ksa66rwdtze"); // switch (op->op.kind) { UNSUPPORTED("1texeok1es39lsgo5wdppbco2"); // case xd_filled_ellipse : UNSUPPORTED("effcskuftros0sla2ltem13mh"); // case xd_unfilled_ellipse : UNSUPPORTED("9oxng5yti9jzjlhlee8ivkduh"); // if (boxf_overlap(op->bb, job->clip)) { UNSUPPORTED("eh7zpmojvvc2ava7e01p17wy3"); // pts[0].x = op->op.u.ellipse.x - op->op.u.ellipse.w; UNSUPPORTED("6buxv3e1hyjli0lwoxxp24v0a"); // pts[0].y = op->op.u.ellipse.y - op->op.u.ellipse.h; UNSUPPORTED("7zuf0gmhnqw8pehovb01ajiff"); // pts[1].x = op->op.u.ellipse.w; UNSUPPORTED("8jfm3tgnfah6oxs36u6auntxy"); // pts[1].y = op->op.u.ellipse.h; UNSUPPORTED("9qjmukp231ben11immdj4r1tz"); // gvrender_ellipse(job, pts, 2, (op->op.kind == xd_filled_ellipse?filled:0)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("40fjmoej0qk9hwneja77jlo2y"); // case xd_filled_polygon : UNSUPPORTED("6uw61r6bh4tiicbj46yxr9t4k"); // case xd_unfilled_polygon : UNSUPPORTED("9oxng5yti9jzjlhlee8ivkduh"); // if (boxf_overlap(op->bb, job->clip)) { UNSUPPORTED("e8xah2ix2nhclr9bifa3tcc8x"); // pts = copyPts (pts, &ptsize, op->op.u.polygon.pts, op->op.u.polygon.cnt); UNSUPPORTED("40c49lgnwfti09qhawe9qm3f7"); // gvrender_polygon(job, pts, op->op.u.polygon.cnt, (op->op.kind == xd_filled_polygon?filled:0)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4eu4a2drbgdgq6xb3lnl3hn9y"); // case xd_filled_bezier : UNSUPPORTED("bn514k7swi4s6uclqqke583n8"); // case xd_unfilled_bezier : UNSUPPORTED("9oxng5yti9jzjlhlee8ivkduh"); // if (boxf_overlap(op->bb, job->clip)) { UNSUPPORTED("2g406s0cpa1h7r9vudzsxwz3b"); // pts = copyPts (pts, &ptsize, op->op.u.bezier.pts, op->op.u.bezier.cnt); UNSUPPORTED("3kzwg9cpwabfnvuyfvvt0e4c9"); // gvrender_beziercurve(job, pts, op->op.u.bezier.cnt, 0, 0, (op->op.kind == xd_filled_bezier?filled:0)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1l7ha9akoh6yew2v54hvu3del"); // case xd_polyline : UNSUPPORTED("9oxng5yti9jzjlhlee8ivkduh"); // if (boxf_overlap(op->bb, job->clip)) { UNSUPPORTED("75vwkjetu3vs2efqgkquomhey"); // pts = copyPts (pts, &ptsize, op->op.u.polyline.pts, op->op.u.polyline.cnt); UNSUPPORTED("2kirl6fra7pbqwmtc9b9rav42"); // gvrender_polyline(job, pts, op->op.u.polyline.cnt); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("60mg8gze602593bf2vddicza0"); // case xd_text : UNSUPPORTED("9oxng5yti9jzjlhlee8ivkduh"); // if (boxf_overlap(op->bb, job->clip)) { UNSUPPORTED("djw3lr9bvuzdg88p1b61ibm23"); // pts[0].x = op->op.u.text.x; UNSUPPORTED("405lw9ptftz28hgpp0qcf6ggg"); // pts[0].y = op->op.u.text.y; UNSUPPORTED("8uwiw0r7tra0g01788ktwkt8t"); // gvrender_textspan(job, pts[0], op->span); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("298qj2a6o0kxeatu0jgvoi784"); // case xd_fill_color : UNSUPPORTED("3zv13wowl159snnsunkxkjtug"); // gvrender_set_fillcolor(job, op->op.u.color); UNSUPPORTED("7ek7aftv8z293izx886r01oqm"); // filled = 1; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("qwcu5b23c4g1dkhz5kg9foza"); // case xd_pen_color : UNSUPPORTED("1zlhprkxd9efydpc2r24kd7fa"); // gvrender_set_pencolor(job, op->op.u.color); UNSUPPORTED("7ek7aftv8z293izx886r01oqm"); // filled = 1; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("8yhndo0ghuwhbavc33g7v21ni"); // case xd_grad_fill_color : UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("briow60sq6ay4k0slv0k1e0ai"); // char* clr0; UNSUPPORTED("1d5jtx9oz042hr4a21vm9wd8s"); // char* clr1; UNSUPPORTED("9tmq69gqblhx0uj3ylye71gdm"); // float frac; UNSUPPORTED("3qtmddjw3ecnb2jfielq996dh"); // if (op->op.u.grad_color.type == xd_radial) { UNSUPPORTED("7wjddh54icciyrvc03tmou0k6"); // xdot_radial_grad* p = &op->op.u.grad_color.u.ring; UNSUPPORTED("82vevzieh8c8a5vw0c3537ysr"); // clr0 = p->stops[0].color; UNSUPPORTED("25x3dhc524e69l7m63fm0botd"); // clr1 = p->stops[1].color; UNSUPPORTED("2yubqrr4rmb6wyok8zz3d4l4b"); // frac = p->stops[1].frac; UNSUPPORTED("c7ot1hnnumwoi4dv6bz51rr86"); // if ((p->x1 == p->x0) && (p->y1 == p->y0)) UNSUPPORTED("2wcz57lhb7pd9xqu6a16n149a"); // angle = 0; UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("o9ps6kmfn10hdy083p2fd3as"); // angle = (int)(180.0*acos((p->x0 - p->x1)/p->r0)/M_PI); UNSUPPORTED("34ytjoiyf9fnxnng5a51xtnj9"); // gvrender_set_fillcolor(job, clr0); UNSUPPORTED("7ynfnu592qnwkfm90qrka6a4n"); // gvrender_set_gradient_vals(job, clr1, angle, frac); UNSUPPORTED("5jf506rwz9snq4d6ozpjvg3yg"); // filled = 3; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("828t3nqv5ns5qvt2e0glyg2ju"); // xdot_linear_grad* p = &op->op.u.grad_color.u.ling; UNSUPPORTED("82vevzieh8c8a5vw0c3537ysr"); // clr0 = p->stops[0].color; UNSUPPORTED("25x3dhc524e69l7m63fm0botd"); // clr1 = p->stops[1].color; UNSUPPORTED("2yubqrr4rmb6wyok8zz3d4l4b"); // frac = p->stops[1].frac; UNSUPPORTED("3w9y8g31d63rmvl7ccv0624ye"); // angle = (int)(180.0*atan2(p->y1-p->y0,p->x1-p->x0)/M_PI); UNSUPPORTED("34ytjoiyf9fnxnng5a51xtnj9"); // gvrender_set_fillcolor(job, clr0); UNSUPPORTED("7ynfnu592qnwkfm90qrka6a4n"); // gvrender_set_gradient_vals(job, clr1, angle, frac); UNSUPPORTED("7bikp52v1ey2yil3rybx6nris"); // filled = 2; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("6qu5ytxcjfat0eg64bep0kksy"); // case xd_grad_pen_color : UNSUPPORTED("as7jx69a7p4gq2bo9ij43797s"); // agerr (AGWARN, "gradient pen colors not yet supported.\n"); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("56n5nfs2z21zo7ac9z2ehf12l"); // case xd_font : UNSUPPORTED("94uhdsl49d2gyeyqzafatdww3"); // /* fontsize and fontname already encoded via xdotBB */ UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("60cspx7wpewmlz0ykd29ul27c"); // case xd_style : UNSUPPORTED("2du13zy7ki13r60g7zvb6kuz1"); // styles = parse_style (op->op.u.style); UNSUPPORTED("a5m3xgb63z0xz7nf5eez363f2"); // gvrender_set_style (job, styles); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("2kiqf0asbojt8x24lr5eykca1"); // case xd_fontchar : UNSUPPORTED("37zacnm7f82nfay9tbqkaay4d"); // /* font characteristics already encoded via xdotBB */ UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("91w60vqrbkqvk3q82pdoxz0y"); // case xd_image : UNSUPPORTED("6f7cw2kz0kg3lxhd6cgr661hm"); // if (image_warn) { UNSUPPORTED("euk5nzqu0sjv93t5ys3lhhx1q"); // agerr(AGWARN, "Images unsupported in \"background\" attribute\n"); UNSUPPORTED("6omlto7p0ejzb4vi9rt3vyuck"); // image_warn = 0; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("42f106i435avz0oneb0fhe81f"); // op++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7jkrbr4tf42xe3tv9gb8ao7iu"); // if (styles) UNSUPPORTED("aw7zhlkbn1bg9h9hrlr9by8ty"); // gvrender_set_style(job, job->gvc->defaultlinestyle); UNSUPPORTED("1yomvtf3njcprecdmp7eq33o7"); // free (pts); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3adhe426gweys0vj89xk7l5qs // static void emit_background(GVJ_t * job, graph_t *g) public static Object emit_background(Object... arg) { UNSUPPORTED("4gpum3t892n8i9y337zhppgqh"); // static void emit_background(GVJ_t * job, graph_t *g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5f36lqh4hk3q6qlni9dobv8ye"); // xdot* xd; UNSUPPORTED("76nok3eiyr33qf4ecv69ujxn6"); // char *str; UNSUPPORTED("4qfeabztp0a8uifsz5h2qj0xm"); // int dfltColor; UNSUPPORTED("5c5y7z63yavk2nbvb55um8ob0"); // /* if no bgcolor specified - first assume default of "white" */ UNSUPPORTED("eupo0q6569myn401db6vre9x9"); // if (! ((str = agget(g, "bgcolor")) && str[0])) { UNSUPPORTED("aje4jzb3skm6bryubgu0u8aoo"); // str = "white"; UNSUPPORTED("3myfxeslr7cfs3cawa74sviw2"); // dfltColor = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("c3z9eq4yq4ibi29ne1aux9u1a"); // dfltColor = 0; UNSUPPORTED("72j9cwumrsza4qx1rwsxe0rxg"); // /* if device has no truecolor support, change "transparent" to "white" */ UNSUPPORTED("ati9yt7rkd3v77g6nvlpbc3wa"); // if (! (job->flags & (1<<8)) && ((*(str)==*("transparent")&&!strcmp(str,"transparent")))) { UNSUPPORTED("aje4jzb3skm6bryubgu0u8aoo"); // str = "white"; UNSUPPORTED("3myfxeslr7cfs3cawa74sviw2"); // dfltColor = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bvjta4pe1bd0an3zb3gm4m9ug"); // /* except for "transparent" on truecolor, or default "white" on (assumed) white paper, paint background */ UNSUPPORTED("aj6etszuv7t3orniarovw9oui"); // if (!( ((job->flags & (1<<8)) && (*(str)==*("transparent")&&!strcmp(str,"transparent"))) UNSUPPORTED("ysgvhk2xw5my7hpp0pyhsyhv"); // || ((job->flags & (1<<25)) && dfltColor))) { UNSUPPORTED("qsl046aw7731cpj2cdrs5l2u"); // char* clrs[2]; UNSUPPORTED("4xv0cmpfa4sol0pqmfumr0rnm"); // float frac; UNSUPPORTED("3oqdtywao9635lj8pbh00gww9"); // if ((findStopColor (str, clrs, &frac))) { UNSUPPORTED("3vfwc36a7qaby9xcub7abdnrw"); // int filled, istyle = 0; UNSUPPORTED("5m1l4f0yk2x1r9n00p7xoarhk"); // gvrender_set_fillcolor(job, clrs[0]); UNSUPPORTED("ca8n6otn7zx4kgpo3p43opznn"); // gvrender_set_pencolor(job, "transparent"); UNSUPPORTED("4xxqxkr63rp33ynfp8093ce5j"); // checkClusterStyle(g, &istyle); UNSUPPORTED("850qgpdnne96gxnh244hf2rh2"); // if (clrs[1]) UNSUPPORTED("2i2pjytalbtpm2nu5e4l391tt"); // gvrender_set_gradient_vals(job,clrs[1],late_int(g,G_gradientangle,0,0), frac); UNSUPPORTED("f3qa0cv737ikcre1vpqlkukio"); // else UNSUPPORTED("cqldfd2kxstrxcsu8vov72204"); // gvrender_set_gradient_vals(job,"black",late_int(g,G_gradientangle,0,0), frac); UNSUPPORTED("4z7nxcqujj30hxs47niv7ng5z"); // if (istyle & (1 << 1)) UNSUPPORTED("s4xfcz4il9k9jw0w0dh9lzpj"); // filled = 3; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("1ijl60mqfpjns1tss115yw4zp"); // filled = 2; UNSUPPORTED("shtvpixd4zg9junin51ss0n6"); // gvrender_box(job, job->clip, filled); UNSUPPORTED("tddizbp6oh1hmfmmbyetc39q"); // free (clrs[0]); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("75elz449frogpglpfecpb7n35"); // gvrender_set_fillcolor(job, str); UNSUPPORTED("aa64pbbtgdbmq07oeeb6b6xd6"); // gvrender_set_pencolor(job, "transparent"); UNSUPPORTED("em1ymq2htxwlplauvapkn96jg"); // gvrender_box(job, job->clip, 1); /* filled */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b3w7cbaupdjkjv8mlqprw6bgy"); // if ((xd = (xdot*)GD_drawing(g)->xdots)) UNSUPPORTED("91v0ozby5hp08jwxac38nv9eq"); // emit_xdot (job, xd); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 500xb8otehz86mqouvbmd0ri4 // static void setup_page(GVJ_t * job, graph_t * g) public static Object setup_page(Object... arg) { UNSUPPORTED("eie6fiea6odhb16j5p69i17ps"); // static void setup_page(GVJ_t * job, graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e8udyft1fkl49dzp8kuvsscja"); // point pagesArrayElem = job->pagesArrayElem, pagesArraySize = job->pagesArraySize; UNSUPPORTED("3h1yo631e2fq69mxwoggya716"); // if (job->rotation) { UNSUPPORTED("4m3552gi4z6716erhvg0mybdi"); // pagesArrayElem = exch_xy(pagesArrayElem); UNSUPPORTED("5n79xja43o2fzgv2jpwlowx9e"); // pagesArraySize = exch_xy(pagesArraySize); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3ezjo786mtpn6j3zv1sixv5yx"); // /* establish current box in graph units */ UNSUPPORTED("2wdi0jzr6koh59dq2o5wm7rdk"); // job->pageBox.LL.x = pagesArrayElem.x * job->pageSize.x - job->pad.x; UNSUPPORTED("8tjzkjxgopydb6bnmjxzwrdza"); // job->pageBox.LL.y = pagesArrayElem.y * job->pageSize.y - job->pad.y; UNSUPPORTED("su2b0thzhhuzkggkmn3o5olo"); // job->pageBox.UR.x = job->pageBox.LL.x + job->pageSize.x; UNSUPPORTED("3lljoqtt3qxcnasqtqf3ibj8v"); // job->pageBox.UR.y = job->pageBox.LL.y + job->pageSize.y; UNSUPPORTED("6i1o1mvszl64iabuc4wxhwwsz"); // /* maximum boundingBox in device units and page orientation */ UNSUPPORTED("51aihik1hbq97o8c6qesdchi2"); // if (job->common->viewNum == 0) UNSUPPORTED("1hl3w4ojiqaffaut1cbitfui3"); // job->boundingBox = job->pageBoundingBox; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("67qpim1lm8zwmdptcomxyx9zh"); // EXPANDBB(job->boundingBox, job->pageBoundingBox); UNSUPPORTED("dutcpy0okvnjgc0dspbfidfls"); // if (job->flags & (1<<7)) { UNSUPPORTED("2xekg55ov733mt60q1dwo2uau"); // job->clip.LL.x = job->focus.x - job->view.x / 2.; UNSUPPORTED("elawyto1cl29eu55o90i97mwe"); // job->clip.LL.y = job->focus.y - job->view.y / 2.; UNSUPPORTED("cvsh3xbateu7iuus29faim1ib"); // job->clip.UR.x = job->focus.x + job->view.x / 2.; UNSUPPORTED("2dms1ogbgw3r7bq8cz5sikfnm"); // job->clip.UR.y = job->focus.y + job->view.y / 2.; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("axdbapte9nha7r33skc7m9qp8"); // job->clip.LL.x = job->focus.x + job->pageSize.x * (pagesArrayElem.x - pagesArraySize.x / 2.); UNSUPPORTED("9y9ky161dftrmlq4zybikd3wo"); // job->clip.LL.y = job->focus.y + job->pageSize.y * (pagesArrayElem.y - pagesArraySize.y / 2.); UNSUPPORTED("28rqxotpw4u5xyb8k5ntx5sv3"); // job->clip.UR.x = job->clip.LL.x + job->pageSize.x; UNSUPPORTED("1yvnjmifai53mslfxbm113t6z"); // job->clip.UR.y = job->clip.LL.y + job->pageSize.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6dd6oqrwhbhk7mqj8blieol8a"); // /* CAUTION - job->translation was difficult to get right. */ UNSUPPORTED("ati7mqxwmn8u4o5lrx82875b7"); // /* Test with and without assymetric margins, e.g: -Gmargin="1,0" */ UNSUPPORTED("3h1yo631e2fq69mxwoggya716"); // if (job->rotation) { UNSUPPORTED("64qd8daar2r794nip6jt8u6r1"); // job->translation.y = - job->clip.UR.y - job->canvasBox.LL.y / job->zoom; UNSUPPORTED("4356s4xto6awx7cij60pg6lvm"); // if ((job->flags & (1<<12)) || (Y_invert)) UNSUPPORTED("9rso607ag8rokfb0keaj3dw8i"); // job->translation.x = - job->clip.UR.x - job->canvasBox.LL.x / job->zoom; UNSUPPORTED("35nw1pbiz2p3s6qwlam5eoo3m"); // else UNSUPPORTED("6nzlh7e28djtn3tuh7wyazl0f"); // job->translation.x = - job->clip.LL.x + job->canvasBox.LL.x / job->zoom; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("9ndd3yrf6pi0yzyq6qhvwvkmb"); // /* pre unscale margins to keep them constant under scaling */ UNSUPPORTED("71450l3ur3gaikd8hf09vaisy"); // job->translation.x = - job->clip.LL.x + job->canvasBox.LL.x / job->zoom; UNSUPPORTED("4356s4xto6awx7cij60pg6lvm"); // if ((job->flags & (1<<12)) || (Y_invert)) UNSUPPORTED("e3i6pyd8cgpyxqdji6ikxfolc"); // job->translation.y = - job->clip.UR.y - job->canvasBox.LL.y / job->zoom; UNSUPPORTED("35nw1pbiz2p3s6qwlam5eoo3m"); // else UNSUPPORTED("8bfteitivddvt9tazhk9smelv"); // job->translation.y = - job->clip.LL.y + job->canvasBox.LL.y / job->zoom; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 as589o2efx45izm3wp7enyaht // static boolean node_in_layer(GVJ_t *job, graph_t * g, node_t * n) public static Object node_in_layer(Object... arg) { UNSUPPORTED("9qfpqdz7l9i14k8tt5niso9hr"); // static boolean node_in_layer(GVJ_t *job, graph_t * g, node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4np0l1afjcabfu4lj2slo7u1h"); // char *pn, *pe; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("br25a8xf14d9pszeecj99a422"); // if (job->numLayers <= 1) UNSUPPORTED("bp2y18pqq5n09006utwifdyxo"); // return NOT(0); UNSUPPORTED("6b110nazp4kekcjo0cggixji8"); // pn = late_string(n, N_layer, ""); UNSUPPORTED("3jdetxpc61my2m5ouwwlafmya"); // if (selectedlayer(job, pn)) UNSUPPORTED("bp2y18pqq5n09006utwifdyxo"); // return NOT(0); UNSUPPORTED("1472k1aiajh8fdwws76p0peui"); // if (pn[0]) UNSUPPORTED("974jvy6bjjit5aunmg1ofk323"); // return 0; /* Only check edges if pn = "" */ UNSUPPORTED("6iiceie8alt1qdir25ryu1f6k"); // if ((e = agfstedge(g, n)) == NULL) UNSUPPORTED("bp2y18pqq5n09006utwifdyxo"); // return NOT(0); UNSUPPORTED("dcuhjbsiioawp6zspvonwd4px"); // for (e = agfstedge(g, n); e; e = agnxtedge(g, e, n)) { UNSUPPORTED("82x79oibcq3pjyv631qc1tlg0"); // pe = late_string(e, E_layer, ""); UNSUPPORTED("820bc3hf82s7cw6chnw5c4nbq"); // if ((pe[0] == '\0') || selectedlayer(job, pe)) UNSUPPORTED("9qhn9m3123s8n6wwxjfo8awlm"); // return NOT(0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1u0s2ppd3ul08n4e2gdaryyy8 // static boolean edge_in_layer(GVJ_t *job, graph_t * g, edge_t * e) public static Object edge_in_layer(Object... arg) { UNSUPPORTED("313onxwqkhkgi36hzjkauyb42"); // static boolean edge_in_layer(GVJ_t *job, graph_t * g, edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("utbq83gb14i5eml17vr8pcid"); // char *pe, *pn; UNSUPPORTED("6iv4xusq3ncisurzdtlt8lhe9"); // int cnt; UNSUPPORTED("br25a8xf14d9pszeecj99a422"); // if (job->numLayers <= 1) UNSUPPORTED("bp2y18pqq5n09006utwifdyxo"); // return NOT(0); UNSUPPORTED("6x2v74zlvitlrgkn17942vcgh"); // pe = late_string(e, E_layer, ""); UNSUPPORTED("3ywt8di993vozrwwnup6dpwyy"); // if (selectedlayer(job, pe)) UNSUPPORTED("bp2y18pqq5n09006utwifdyxo"); // return NOT(0); UNSUPPORTED("1qtr20a3naoc1fyck8og7mmrh"); // if (pe[0]) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("6b357rcrnr0ds1kjupqbpaa3e"); // for (cnt = 0; cnt < 2; cnt++) { UNSUPPORTED("b8bas27843d09g6jaaawthl8w"); // pn = late_string(cnt < 1 ? agtail(e) : aghead(e), N_layer, ""); UNSUPPORTED("jsx6qbuduuwph63wgsoiqgvq"); // if ((pn[0] == '\0') || selectedlayer(job, pn)) UNSUPPORTED("9qhn9m3123s8n6wwxjfo8awlm"); // return NOT(0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dyo8zdve7djszp87cuf0xuoet // static boolean clust_in_layer(GVJ_t *job, graph_t * sg) public static Object clust_in_layer(Object... arg) { UNSUPPORTED("4e36i94sm4m9tfa4ajm22cim8"); // static boolean clust_in_layer(GVJ_t *job, graph_t * sg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b9rg1zyq2dr4mvb3afpkekhnt"); // char *pg; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("br25a8xf14d9pszeecj99a422"); // if (job->numLayers <= 1) UNSUPPORTED("bp2y18pqq5n09006utwifdyxo"); // return NOT(0); UNSUPPORTED("20qd9xj97lsoon2qf56l64qxd"); // pg = late_string(sg, agattr(sg, AGRAPH, "layer", 0), ""); UNSUPPORTED("658zavk95iaxd3u1jryh7rbqc"); // if (selectedlayer(job, pg)) UNSUPPORTED("bp2y18pqq5n09006utwifdyxo"); // return NOT(0); UNSUPPORTED("82stl7dpo6yrg2w5a6umx8q9c"); // if (pg[0]) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("bjjx5k3xelkwyvbcb4gwnqq7s"); // for (n = agfstnode(sg); n; n = agnxtnode(sg, n)) UNSUPPORTED("dl5e8i6kxe0n05x40z42vjo3g"); // if (node_in_layer(job, sg, n)) UNSUPPORTED("9qhn9m3123s8n6wwxjfo8awlm"); // return NOT(0); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 75k6tn88w31u4ppw3q70g1jsk // static boolean node_in_box(node_t *n, boxf b) public static Object node_in_box(Object... arg) { UNSUPPORTED("211j77g7ql3frkbpciwlnn9zy"); // static boolean node_in_box(node_t *n, boxf b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("46tealt6sxovbrn80ssq4sa8g"); // return boxf_overlap(ND_bb(n), b); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7j4u56kqr6m677iq36g2aih28 // static void emit_begin_node(GVJ_t * job, node_t * n) public static Object emit_begin_node(Object... arg) { UNSUPPORTED("6oh0hqc0y111peee2y6h3dyp0"); // static void emit_begin_node(GVJ_t * job, node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8lamppsqs7nhiu5v8k1f5jfh2"); // obj_state_t *obj; UNSUPPORTED("12bpksga44s9sfl7x8xn2rt2k"); // int flags = job->flags; UNSUPPORTED("ey6s6opybnefos5fozgk763tu"); // int sides, peripheries, i, j, filled = 0, rect = 0, shape, nump = 0; UNSUPPORTED("cc2tjyw4ovc2cfzpfqu5s7xnr"); // polygon_t *poly = NULL; UNSUPPORTED("1rh8tfsy1jwdlk7jeq8xlypar"); // pointf *vertices, *p = NULL; UNSUPPORTED("avrrxyqlc98q6r2lvs1ku6ptd"); // pointf coord; UNSUPPORTED("8yytudftst76763qgnjebkzhm"); // char *s; UNSUPPORTED("1iexddadjo0w6fdgddatfx40s"); // obj = push_obj_state(job); UNSUPPORTED("7o8x3n4tonxrhr3uxintmcd0j"); // obj->type = NODE_OBJTYPE; UNSUPPORTED("otsh0jqjlx2ylharf6sknjc7"); // obj->u.n = n; UNSUPPORTED("heflz2y0siuc5a4qsd7xdy0i"); // obj->emit_state = EMIT_NDRAW; UNSUPPORTED("984vi925q5gu9ti0dn4c6h1pu"); // if (flags & (1<<24)) { UNSUPPORTED("8hn4rzdhnzbbm4vcj7b1o2h8s"); // /* obj->z = late_double(n, N_z, 0.0, -MAXFLOAT); */ UNSUPPORTED("7xl25s8bmvdzfgqceezs4vbv7"); // if (GD_odim(agraphof(n)) >=3) UNSUPPORTED("e9bowj0fth92lpwok5jw7ygmv"); // obj->z = (ROUND((ND_pos(n)[2])*72)); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("7ss0158fo4kqsce5naq3vb9di"); // obj->z = 0.0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("de51o3rsacfia37u3ekmuuyep"); // initObjMapData (job, ND_label(n), n); UNSUPPORTED("8k7npuk2pg2np42cu63aachgc"); // if ((flags & ((1<<16) | (1<<22))) UNSUPPORTED("ap5s8ebp9t1efc4rdd66xi8h2"); // && (obj->url || obj->explicit_tooltip)) { UNSUPPORTED("752pv46veugd2etmozcnfiypa"); // /* checking shape of node */ UNSUPPORTED("5zbsi1lwuz5ursdo00msuv88d"); // shape = shapeOf(n); UNSUPPORTED("7s077dx2lcy2m2jqo0bd1qwbj"); // /* node coordinate */ UNSUPPORTED("2qpk1rnkjskc4vssp5kqy1hob"); // coord = ND_coord(n); UNSUPPORTED("4htxfyxz1smr3utoocizilxu4"); // /* checking if filled style has been set for node */ UNSUPPORTED("5kcgc99yv9rp8w1dcte4rnf51"); // filled = ifFilled(n); UNSUPPORTED("600lgxny2fkn72axw3r34cgqb"); // if (shape == SH_POLY || shape == SH_POINT) { UNSUPPORTED("d5nksf3ih1yt0kg59sfkewlsj"); // poly = (polygon_t *) ND_shape_info(n); UNSUPPORTED("456i8yij35bvszszfonbqz35a"); // /* checking if polygon is regular rectangle */ UNSUPPORTED("4vyy0i6dsllcradhvl2oe51ir"); // if (isRect(poly) && (poly->peripheries || filled)) UNSUPPORTED("3yn5fb3yxthk0g149yritkp9"); // rect = 1; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("5t5nn5iltsyof8cyz3b2gwvdf"); // /* When node has polygon shape and requested output supports polygons UNSUPPORTED("rtnlliq5iwd307fmm56s27kf"); // * we use a polygon to map the clickable region that is a: UNSUPPORTED("awa42ejtbglkhruoiebsfh83c"); // * circle, ellipse, polygon with n side, or point. UNSUPPORTED("4w3ojigi9jyced2btkx1r494k"); // * For regular rectangular shape we have use node's bounding box to map clickable region UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ UNSUPPORTED("1qgrvitr94qu2hi2by8s1ylm1"); // if (poly && !rect && (flags & (1<<19))) { UNSUPPORTED("91fvk4kb7gg5t610zxi308wws"); // if (poly->sides < 3) UNSUPPORTED("f4hqnp8zargnp3vhkbcl094mr"); // sides = 1; UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else UNSUPPORTED("csupw9r57m2dwx6i5f2tu4d86"); // sides = poly->sides; UNSUPPORTED("5q6n2srifirg3tkf0bas934m1"); // if (poly->peripheries < 2) UNSUPPORTED("6panx1vemgvl6wfskrd3m1mww"); // peripheries = 1; UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else UNSUPPORTED("81q50lt0mna1wn04hztqusptn"); // peripheries = poly->peripheries; UNSUPPORTED("2uakxkguw0fhjjx37xg11qtpp"); // vertices = poly->vertices; UNSUPPORTED("dp132vof8gu0b6vv6svot7dp4"); // if ((s = agget(n, "samplepoints"))) UNSUPPORTED("3ditmtyp8gocdq6i8g23oqfk3"); // nump = atoi(s); UNSUPPORTED("9rcwqkr45gajonyf3mylgs54d"); // /* We want at least 4 points. For server-side maps, at most 100 UNSUPPORTED("80gxq7mljih09qbykr2a77hji"); // * points are allowed. To simplify things to fit with the 120 points UNSUPPORTED("95v6tfii1cmgyczmw9snifrz2"); // * used for skewed ellipses, we set the bound at 60. UNSUPPORTED("29edlge3wqyp1gs0vymtr5700"); // */ UNSUPPORTED("24rjq7ktpbelyle5ccux41fbw"); // if ((nump < 4) || (nump > 60)) UNSUPPORTED("8f615e20vka2xve8ihx3czfgz"); // nump = 20; UNSUPPORTED("7o7i7thssuva8pvhyrohuym9s"); // /* use bounding box of text label or node image for mapping UNSUPPORTED("2bw9y6a24gfxnxsqoc4pzu34f"); // * when polygon has no peripheries and node is not filled UNSUPPORTED("29edlge3wqyp1gs0vymtr5700"); // */ UNSUPPORTED("a7oq5da9ov5iuj0nr5evgcaey"); // if (poly->peripheries == 0 && !filled) { UNSUPPORTED("5hkjrhdwgew8q4bjy8hi39y0l"); // obj->url_map_shape = MAP_RECTANGLE; UNSUPPORTED("6z27gxa0h15ax0y7jhl4jqw7u"); // nump = 2; UNSUPPORTED("6y6ve2v6irttd8deh2u0tidty"); // p = (pointf*)zmalloc((nump)*sizeof(pointf)); UNSUPPORTED("586tid4nqbu8z1d3usgwdw8jp"); // (p[0].x = coord.x - ND_lw(n), p[0].y = coord.y - ND_ht(n) / 2.0, p[1].x = coord.x + ND_lw(n), p[1].y = coord.y + ND_ht(n) / 2.0); UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("d4glybpyvbpo9bu6saa4l6bde"); // /* circle or ellipse */ UNSUPPORTED("9d4mrdegox0b1pm5xbfep5uko"); // else if (poly->sides < 3 && poly->skew == 0.0 && poly->distortion == 0.0) { UNSUPPORTED("cdqbx7sifcci71ypvwe0wz7yv"); // if (poly->regular) { UNSUPPORTED("7dlfvykcyhmfeqqtnxuxpu83y"); // obj->url_map_shape = MAP_CIRCLE; UNSUPPORTED("5um56x6io8un90j92meh20cjv"); // nump = 2; /* center of circle and top right corner of bb */ UNSUPPORTED("yoyr2t09q9xi2y3drrvf3xad"); // p = (pointf*)zmalloc((nump)*sizeof(pointf)); UNSUPPORTED("7p1zauucnrwblaitis0khiz1r"); // p[0].x = coord.x; UNSUPPORTED("e6o8x1sj9om9kkeixtn7zklcs"); // p[0].y = coord.y; UNSUPPORTED("60m7eqldm742a0adfcs7kfqcg"); // /* even vertices contain LL corner of bb */ UNSUPPORTED("9758i1qof39xb2yzi57in7oxt"); // /* odd vertices contain UR corner of bb */ UNSUPPORTED("854obam1okv2gd6w4k2r6m9ot"); // p[1].x = coord.x + vertices[2*peripheries - 1].x; UNSUPPORTED("2f7rjskpdx9cpkmm1a048d0oe"); // p[1].y = coord.y + vertices[2*peripheries - 1].y; UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("9amplb4x49w5htb1q19aqmixx"); // else { /* ellipse is treated as polygon */ UNSUPPORTED("7cvkihpbuxq2fiho8en5lxlk5"); // obj->url_map_shape= MAP_POLYGON; UNSUPPORTED("5n0o7h3635rfk8v1ofc24e5vh"); // p = pEllipse((double)(vertices[2*peripheries - 1].x), UNSUPPORTED("68gocmgm77xvuicc7u8i05814"); // (double)(vertices[2*peripheries - 1].y), nump); UNSUPPORTED("34bytcpuln6qgd13en0tbt49q"); // for (i = 0; i < nump; i++) { UNSUPPORTED("7d7wspnuodlkz25ma45nsi6ag"); // p[i].x += coord.x; UNSUPPORTED("75mj4vd1u3ik8porqjoty5tt1"); // p[i].y += coord.y; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("1b3uzl88u778jb7f869wx7xpc"); // /* all other polygonal shape */ UNSUPPORTED("89xddhb2xugz6vr9s2y1n4iko"); // else { UNSUPPORTED("7n9hod7wrkfif1s19ajej7dxw"); // int offset = (peripheries - 1)*(poly->sides); UNSUPPORTED("8mmxiwtk0jn6wb1tdqa1b3w10"); // obj->url_map_shape = MAP_POLYGON; UNSUPPORTED("9f3mabmc7lq7y42eheer04fzl"); // /* distorted or skewed ellipses and circles are polygons with 120 UNSUPPORTED("5xz548f5h9x5kyiwplsm69qf5"); // * sides. For mapping we convert them into polygon with sample sides UNSUPPORTED("316yclqq5365l289qzfq39l6w"); // */ UNSUPPORTED("6tjxq9hxjynudn5fd5eb09jyb"); // if (poly->sides >= nump) { UNSUPPORTED("bdbaovdssj5kkgpsxokx4trlm"); // int delta = poly->sides / nump; UNSUPPORTED("yoyr2t09q9xi2y3drrvf3xad"); // p = (pointf*)zmalloc((nump)*sizeof(pointf)); UNSUPPORTED("c046rwe9l0lp00lemr5p5fxa"); // for (i = 0, j = 0; j < nump; i += delta, j++) { UNSUPPORTED("c1dhcvofcsymhvnczsxmmhr41"); // p[j].x = coord.x + vertices[i + offset].x; UNSUPPORTED("ei7ntnpjxjte5mvwta7em30ll"); // p[j].y = coord.y + vertices[i + offset].y; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("esb1hqr9y2ldyt0mt0w98tg6k"); // } else { UNSUPPORTED("ofg0e43bcmuyf7t2nedsgevg"); // nump = sides; UNSUPPORTED("yoyr2t09q9xi2y3drrvf3xad"); // p = (pointf*)zmalloc((nump)*sizeof(pointf)); UNSUPPORTED("34bytcpuln6qgd13en0tbt49q"); // for (i = 0; i < nump; i++) { UNSUPPORTED("dnojnlwgkx6ddefag0zwo6ds2"); // p[i].x = coord.x + vertices[i + offset].x; UNSUPPORTED("4dblb5sdbisslvfdhwsybgeh"); // p[i].y = coord.y + vertices[i + offset].y; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("3jir07ymknf0hmb9pv9x4dr3o"); // else { UNSUPPORTED("98n8obslcmy8y3s7e6jf9esg2"); // /* we have to use the node's bounding box to map clickable region UNSUPPORTED("50m9f9e7fwiwwh75wjf4clqoj"); // * when requested output format is not capable of polygons. UNSUPPORTED("29edlge3wqyp1gs0vymtr5700"); // */ UNSUPPORTED("dtpqdcuqa1r9h12j3i5ycrvw1"); // obj->url_map_shape = MAP_RECTANGLE; UNSUPPORTED("64g4nd2mma198mwj1rn8lub1x"); // nump = 2; UNSUPPORTED("cfwfzr78yzuxsg39clh917i7v"); // p = (pointf*)zmalloc((nump)*sizeof(pointf)); UNSUPPORTED("odbnll58vskylwajptbzx1ep"); // p[0].x = coord.x - ND_lw(n); UNSUPPORTED("nz1xqz7manrsw4hebsgnykie"); // p[0].y = coord.y - (ND_ht(n) / 2); UNSUPPORTED("40l7iiv57pa37xyblc80nhqjv"); // p[1].x = coord.x + ND_rw(n); UNSUPPORTED("bvo8cz7zx62rjde71khxdb3li"); // p[1].y = coord.y + (ND_ht(n) / 2); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("4lzx178ws3xixysf6d4x8jxs2"); // if (! (flags & (1<<13))) UNSUPPORTED("6vlhqkskkzyjn8cw33u0m8dkp"); // gvrender_ptf_A(job, p, p, nump); UNSUPPORTED("d6dtek5hzc7rtaly67ykeq98d"); // obj->url_map_p = p; UNSUPPORTED("c1ycajl1r4i9caqbpdh9zmyx0"); // obj->url_map_n = nump; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("aemq91z7mpchiy1jqeg9gcaix"); // setColorScheme (agget (n, "colorscheme")); UNSUPPORTED("65nxjiymni4pwghzckh64eskn"); // gvrender_begin_node(job, n); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d9mzxl9say77sxvq7p8x64arq // static void emit_end_node(GVJ_t * job) public static Object emit_end_node(Object... arg) { UNSUPPORTED("2l9v7jqkrub7vxobkquy7asiq"); // static void emit_end_node(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1ibtlropykj9c7r9ibxwqb2mq"); // gvrender_end_node(job); UNSUPPORTED("39iamwq9cd9iv3d2iyiaq8gz9"); // pop_obj_state(job); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 do63wzhzr0kzmjcdc6gjwjnj1 // static void emit_node(GVJ_t * job, node_t * n) public static Object emit_node(Object... arg) { UNSUPPORTED("a610z8g79rvtm3401gis6ckc8"); // static void emit_node(GVJ_t * job, node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eyew5ay5wwktz4fysz0b78ugv"); // GVC_t *gvc = job->gvc; UNSUPPORTED("8yytudftst76763qgnjebkzhm"); // char *s; UNSUPPORTED("byo308l1rmve5rmx8wt32juux"); // char *style; UNSUPPORTED("getfykrvugvlv3wxt5qm5ghl"); // char **styles = 0; UNSUPPORTED("9q7vvjxznd6x0u1t6fgd82byj"); // char **sp; UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("1ox2ru6l44s8f2m2tqkkpb60"); // if (ND_shape(n) /* node has a shape */ UNSUPPORTED("2pbaf4f2fx6en7dizu6y1x508"); // && node_in_layer(job, agraphof(n), n) /* and is in layer */ UNSUPPORTED("bfz19cj6ftdbt8an3chivuz6r"); // && node_in_box(n, job->clip) /* and is in page/view */ UNSUPPORTED("7beo9zmd6okbo2j2mrhh57pg5"); // && (ND_state(n) != gvc->common.viewNum)) /* and not already drawn */ UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("5xnzubm059ragnfr4w9qppbcd"); // ND_state(n) = gvc->common.viewNum; /* mark node as drawn */ UNSUPPORTED("d06edad4blz58hs97kcth9q6u"); // gvrender_comment(job, agnameof(n)); UNSUPPORTED("cagpugtwz1xuxol6c2w44i117"); // s = late_string(n, N_comment, ""); UNSUPPORTED("7oyyy6d3itm6qqhr3p5zu6ded"); // if (s[0]) UNSUPPORTED("8gbf99sx0atz9ku0tfjv4m4o3"); // gvrender_comment(job, s); UNSUPPORTED("9ihgp28ukdi3iied1az7rndhv"); // style = late_string(n, N_style, ""); UNSUPPORTED("12ihr78gv09dxppuorymkgt75"); // if (style[0]) { UNSUPPORTED("32d3t9w0x6lbw2olmibm97mqd"); // styles = parse_style(style); UNSUPPORTED("ai2h90fa4b5ss40yyc0ehvrzd"); // sp = styles; UNSUPPORTED("9v2c8p99l7pj3zqwvtb298adq"); // while ((p = *sp++)) { UNSUPPORTED("xtuts27rjtqvzh4gjkw96ime"); // if ((*(p)==*("invis")&&!strcmp(p,"invis"))) return; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("58q1665qa9481hld1ioe4zwoj"); // emit_begin_node(job, n); UNSUPPORTED("mfw9xokftdmhodm2jpp901c5"); // ND_shape(n)->fns->codefn(job, n); UNSUPPORTED("cncg3snxi0wuz6b1dkj8gz85t"); // if (ND_xlabel(n) && ND_xlabel(n)->set) UNSUPPORTED("67z3k2l4flib7gfhwxaekdsam"); // emit_label(job, EMIT_NLABEL, ND_xlabel(n)); UNSUPPORTED("2jcokqlllmekcinbvegkojl7u"); // emit_end_node(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1690phewavvug1dfq83cwep5d // static pointf computeoffset_p(pointf p, pointf q, double d) public static Object computeoffset_p(Object... arg) { UNSUPPORTED("63wh9kozu453znl0upnphf9mi"); // static pointf computeoffset_p(pointf p, pointf q, double d) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5uemny2bjcvw6dq2uqo1t1xl0"); // pointf res; UNSUPPORTED("cj9v3vgjktw1o09qn9i35u6gl"); // double x = p.x - q.x, y = p.y - q.y; UNSUPPORTED("c619zohl4d6wz9g3kekvpg7d1"); // /* keep d finite as line length approaches 0 */ UNSUPPORTED("5c6u3xrusgxwuo66z5mvimg9m"); // d /= sqrt(x * x + y * y + .0001); UNSUPPORTED("4lo34cbbs51klu8okkvjbbg1u"); // res.x = y * d; UNSUPPORTED("cdsev61yjq1ezm8vyeqy9bskw"); // res.y = -x * d; UNSUPPORTED("cezffb75elgmxmthji4vj0se9"); // return res; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dly15js1s0j0q9xlzznflvp5o // static pointf computeoffset_qr(pointf p, pointf q, pointf r, pointf s, double d) public static Object computeoffset_qr(Object... arg) { UNSUPPORTED("8sdovg67zcg8hbc8uxomazvo7"); // static pointf computeoffset_qr(pointf p, pointf q, pointf r, pointf s, UNSUPPORTED("cw59rrix8ii9c4gpgc087wzod"); // double d) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5uemny2bjcvw6dq2uqo1t1xl0"); // pointf res; UNSUPPORTED("83zpklqoz4hkcpabg6bg1meo4"); // double len; UNSUPPORTED("sk1w1xfer0nznuf4hm21fm98"); // double x = q.x - r.x, y = q.y - r.y; UNSUPPORTED("2c5il9v49cdl4tr8gyt83did1"); // len = sqrt(x * x + y * y); UNSUPPORTED("2ach8qtgjeze9t2249wcwdkat"); // if (len < .0001) { UNSUPPORTED("6lej7y0livho67yeaclv11eqn"); // /* control points are on top of each other UNSUPPORTED("c2tbggffhpyqvaphzbz85js2"); // use slope between endpoints instead */ UNSUPPORTED("ld3z8wtan3gkvuzdn53c58vc"); // x = p.x - s.x, y = p.y - s.y; UNSUPPORTED("7htvz9tvqvjgwskwcyc2urf53"); // /* keep d finite as line length approaches 0 */ UNSUPPORTED("ealmen1ps4qroua1hv1qypt8o"); // len = sqrt(x * x + y * y + .0001); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("p5a5c43qtb7svsztnqiqbvut"); // d /= len; UNSUPPORTED("4lo34cbbs51klu8okkvjbbg1u"); // res.x = y * d; UNSUPPORTED("cdsev61yjq1ezm8vyeqy9bskw"); // res.y = -x * d; UNSUPPORTED("cezffb75elgmxmthji4vj0se9"); // return res; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9jbox5ffqmnuiqxjmiewkjd7v // static void emit_attachment(GVJ_t * job, textlabel_t * lp, splines * spl) public static Object emit_attachment(Object... arg) { UNSUPPORTED("cqsl6q4bc0by6b7m5fjbaz0ff"); // static void emit_attachment(GVJ_t * job, textlabel_t * lp, splines * spl) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("69bvnbgbqrcytrd76lwcg0vka"); // pointf sz, AF[3]; UNSUPPORTED("7f6xhv1pxs09lj5ogjqiqd0jc"); // unsigned char *s; UNSUPPORTED("3asm1mshny9o50slevb5zf6uy"); // for (s = (unsigned char *) (lp->text); *s; s++) { UNSUPPORTED("ndpe342kdaool85s57l4ih7r"); // if (isspace(*s) == 0) UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7w2f0c8cdlaczfa4mtfux75ou"); // if (*s == 0) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("adxqzkeq9mg15dgugx9z222go"); // sz = lp->dimen; UNSUPPORTED("8n9kjtyakr4mqv1td5vrgkb96"); // AF[0] = pointfof(lp->pos.x + sz.x / 2., lp->pos.y - sz.y / 2.); UNSUPPORTED("6kkjo8ld87lpzum3u7wv6yv4b"); // AF[1] = pointfof(AF[0].x - sz.x, AF[0].y); UNSUPPORTED("6ezlaa100st3k35o4mzoczre2"); // AF[2] = dotneato_closest(spl, lp->pos); UNSUPPORTED("aigctuc4kajr8onbk5fmrvh00"); // /* Don't use edge style to draw attachment */ UNSUPPORTED("4g8oyutwebzej18aaiz74zb9k"); // gvrender_set_style(job, job->gvc->defaultlinestyle); UNSUPPORTED("6farm4z5p1r4wzjnb5f1kioin"); // /* Use font color to draw attachment UNSUPPORTED("25anit6qhtt5ef1ewc1h0q577"); // - need something unambiguous in case of multicolored parallel edges UNSUPPORTED("f115hnh0a1ezbinf75vc9r0lg"); // - defaults to black for html-like labels UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("bl5mm7hn2il0n2e623rbq8q5w"); // gvrender_set_pencolor(job, lp->fontcolor); UNSUPPORTED("35prexehk0x6n14ojx7sihunn"); // gvrender_polyline(job, AF, 3); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4g1n8pxbh06t81obycv6rqtxv // static char* default_pencolor(char *pencolor, char *deflt) public static Object default_pencolor(Object... arg) { UNSUPPORTED("4wukcoxynojzor25ps1rby9yw"); // static char* default_pencolor(char *pencolor, char *deflt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8kywmm7f51dmrjngxwvnpsd4o"); // static char *buf; UNSUPPORTED("22dcr6aukx12do9pe4dib69c4"); // static int bufsz; UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("a005u14z35hf8yjnafoaaeqg"); // int len, ncol; UNSUPPORTED("e6y6l26pcnusy834r3jfxyd52"); // ncol = 1; UNSUPPORTED("6zcf9gon91dymhtem9dwap4mh"); // for (p = pencolor; *p; p++) { UNSUPPORTED("2s6gq2wmmin2ab5zt90m5xjep"); // if (*p == ':') UNSUPPORTED("9f19jjr21zaezdxswj6tevd9n"); // ncol++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2134j62fnfo06vfq9fo45gceu"); // len = ncol * (strlen(deflt) + 1); UNSUPPORTED("55qowwh2rcv2v2uu70hde9ct4"); // if (bufsz < len) { UNSUPPORTED("19odu3570teiwv839flm3iezt"); // bufsz = len + 10; UNSUPPORTED("e15ktgr11acljfi5jubpq5sba"); // buf = realloc(buf, bufsz); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3nutbraj7qprn5hvmj8fqtl63"); // strcpy(buf, deflt); UNSUPPORTED("22y7o7tq5wsmfgkczgy0hqxmx"); // while(--ncol) { UNSUPPORTED("9se30dn1tgkm9kisqzl2ojhic"); // strcat(buf, ":"); UNSUPPORTED("68ovea8yallwok9w5wpk46e5m"); // strcat(buf, deflt); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5jfpogdyby101eyuw2dhtb5cg"); // return buf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4idfslavgy1wy953xlflg5ws6 // static double approxLen (pointf* pts) public static Object approxLen(Object... arg) { UNSUPPORTED("6tz6ed7moergtlszt1ajl0p9v"); // static double approxLen (pointf* pts) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3s4rz758a6plk3e82llqp2gg9"); // double d = DIST(pts[0],pts[1]); UNSUPPORTED("9v02me6trkr3y3f94cm9fyk9a"); // d += DIST(pts[1],pts[2]); UNSUPPORTED("8r2j0wkc637k7tyzg3r6uh9iv"); // d += DIST(pts[2],pts[3]); UNSUPPORTED("3r3o80n61nmy2jv0ezi9xg2xp"); // return d; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c24egok0eodx1gogrwwnimllw // static void splitBSpline (bezier* bz, float t, bezier* left, bezier* right) public static Object splitBSpline(Object... arg) { UNSUPPORTED("bzosun8763baoenilgqapqo0v"); // static void splitBSpline (bezier* bz, float t, bezier* left, bezier* right) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dakf3h64dqiulqbamu0w9twdu"); // int i, j, k, cnt = (bz->size - 1)/3; UNSUPPORTED("7lwfrj61cydg2xwok9ruezq5q"); // double* lens; UNSUPPORTED("6xpvacdzhffp9veax0hnyrxsk"); // double last, len, sum; UNSUPPORTED("48n1zwofayobr58hhiz0y5wfp"); // pointf* pts; UNSUPPORTED("89zep3p5j2e5egc7g57ipff0g"); // float r; UNSUPPORTED("6556o7pk7swku5m4ocatctrjt"); // if (cnt == 1) { UNSUPPORTED("e6f8rl0x4aqawbb1f9o0iw15m"); // left->size = 4; UNSUPPORTED("twafm7lir3aq9n2mil73iowf"); // left->list = (pointf*)zmalloc((4)*sizeof(pointf)); UNSUPPORTED("1baicin4fqf7m9f8aohq6veca"); // right->size = 4; UNSUPPORTED("4iwp6vrwtjet80pf2dloisel9"); // right->list = (pointf*)zmalloc((4)*sizeof(pointf)); UNSUPPORTED("cewi4etd9db03yftetga0xkdh"); // Bezier (bz->list, 3, t, left->list, right->list); UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dd6fkzw1fpmv18pgue4xs5bqi"); // lens = (double*)zmalloc((cnt)*sizeof(double)); UNSUPPORTED("a6vxbyim8v2mmrdcey3t2n4r0"); // sum = 0; UNSUPPORTED("6vpzf70qotrvlbnwdne2riv0x"); // pts = bz->list; UNSUPPORTED("1psokm6w9e7qw7fm2g1cayuk7"); // for (i = 0; i < cnt; i++) { UNSUPPORTED("8r4arv0b9go700qz2tm3mm221"); // lens[i] = approxLen (pts); UNSUPPORTED("eoo69513qfc7r4hl1k5c2eiwv"); // sum += lens[i]; UNSUPPORTED("e4542wxbu4szwpfa8e0ra68f2"); // pts += 3; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4ajaxhjxm9owoq0tyl6901zpb"); // len = t*sum; UNSUPPORTED("a6vxbyim8v2mmrdcey3t2n4r0"); // sum = 0; UNSUPPORTED("1psokm6w9e7qw7fm2g1cayuk7"); // for (i = 0; i < cnt; i++) { UNSUPPORTED("eoo69513qfc7r4hl1k5c2eiwv"); // sum += lens[i]; UNSUPPORTED("5boo0t1khz74gcsiopw0n3w2z"); // if (sum >= len) UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("75pszhfxvdcbo780wsjt6bh92"); // left->size = 3*(i+1) + 1; UNSUPPORTED("6dip2t5t8rbleilxa8lj81obn"); // left->list = (pointf*)zmalloc((left->size)*sizeof(pointf)); UNSUPPORTED("5p4l0m9e5xsnuegq2yhv5c3d6"); // right->size = 3*(cnt-i) + 1; UNSUPPORTED("26r2b2ifak9lziwwpho1xrj5x"); // right->list = (pointf*)zmalloc((right->size)*sizeof(pointf)); UNSUPPORTED("3wleiy529fpgcsz1ikho2emvm"); // for (j = 0; j < left->size; j++) UNSUPPORTED("ba9gueiwlmayc8ysz2l1cwcxj"); // left->list[j] = bz->list[j]; UNSUPPORTED("ep0odw2vpvxzya4y8rennmr9k"); // k = j - 4; UNSUPPORTED("e6f27aong4yxk1ijo8d8w0888"); // for (j = 0; j < right->size; j++) UNSUPPORTED("9wqub3rjwa4mbj3s7e2szhas0"); // right->list[j] = bz->list[k++]; UNSUPPORTED("7a9c792hfdlnnk7sj8q4whllc"); // last = lens[i]; UNSUPPORTED("8sjlbix5lxv8ks4no35ryh1ky"); // r = (len - (sum - last))/last; UNSUPPORTED("d2rexqliaoccgx5aaon5n8xad"); // Bezier (bz->list + 3*i, 3, r, left->list + 3*i, right->list); UNSUPPORTED("abtwh44up8wmpmdx48y0s2mc9"); // free (lens); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 emsbbp4kdnhrbf2gca7ikthj5 // static int multicolor (GVJ_t * job, edge_t * e, char** styles, char* colors, int num, double arrowsize, double penwidth) public static Object multicolor(Object... arg) { UNSUPPORTED("dvqr9ynn0c9bn4xfcpie8zyez"); // static int multicolor (GVJ_t * job, edge_t * e, char** styles, char* colors, int num, double arrowsize, double penwidth) UNSUPPORTED("yo7buicdiu29rv5vxhas0v3s"); // { UNSUPPORTED("37thdceezsvepe7tlyfatrbcw"); // bezier bz; UNSUPPORTED("2g6n25q0mmfzs7lbcmb5xqnsw"); // bezier bz0, bz_l, bz_r; UNSUPPORTED("ec8yrss5nd4ir33xtxncbfbx1"); // int i, rv; UNSUPPORTED("8z3a2qjysx0m326m5qjy91tnu"); // colorsegs_t* segs; UNSUPPORTED("8zv1ffgik05z2fcc41di32sn8"); // colorseg_t* s; UNSUPPORTED("491d6vy43b2c5s364tuuj531z"); // char* endcolor; UNSUPPORTED("23904qu3vgmgg4o78f0lbtk03"); // double left; UNSUPPORTED("3wtewf1w0788agxoxikqp6n0a"); // int first; /* first segment with t > 0 */ UNSUPPORTED("5vkb2ckjwqesd3277mqs5of2i"); // rv = parseSegs (colors, num, &segs); UNSUPPORTED("2m7c7iiy39zf5k6eva7052n4u"); // if (rv > 1) { UNSUPPORTED("cfaq63es7s358djxe08cx7kjx"); // Agraph_t* g = agraphof(agtail(e)); UNSUPPORTED("82aqfdoa44vt6zjffu4h6i7tz"); // agerr (AGPREV, "in edge %s%s%s\n", agnameof(agtail(e)), (agisdirected(g)?" -> ":" -- "), agnameof(aghead(e))); UNSUPPORTED("bqes0nkjkdq91khi1ouux7zfv"); // if (rv == 2) UNSUPPORTED("btmwubugs9vkexo4yb7a5nqel"); // return 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("tqrvg9la1h2jgnwa0zql3ck5"); // else if (rv == 1) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("egp4hta3woqfkcxs9fcq2yvuy"); // for (i = 0; i < ED_spl(e)->size; i++) { UNSUPPORTED("cgwd7hfmn0br1bm5fi4gr97b3"); // left = 1; UNSUPPORTED("5ngoqqxxd5huppctrruhxjota"); // bz = ED_spl(e)->list[i]; UNSUPPORTED("3vet6pylmf84jbf0ssb1sifb7"); // first = 1; UNSUPPORTED("d2ic66tp4jlglvga1xy32sk6j"); // for (s = segs->segs; s->color; s++) { UNSUPPORTED("78q8ibx2yffz6m8wihta0ii64"); // if ((((s->t) < 1E-5) && ((s->t) > -1E-5))) continue; UNSUPPORTED("xa07dy2pw68wlizyfp8oymag"); // gvrender_set_pencolor(job, s->color); UNSUPPORTED("56ofcgemtdmz0pup4itjvidtj"); // left -= s->t; UNSUPPORTED("chr2o19f7c3h4ymbaatmy5jae"); // endcolor = s->color; UNSUPPORTED("ay38rk7fywnv41q0742j6585x"); // if (first) { UNSUPPORTED("7ttvwgvz7wpyo71aggs2auiau"); // first = 0; UNSUPPORTED("9rs2pz8j0ynilgapygagbgd89"); // splitBSpline (&bz, s->t, &bz_l, &bz_r); UNSUPPORTED("99cbkfbl5fivdra5eaj0kf8n5"); // gvrender_beziercurve(job, bz_l.list, bz_l.size, 0, 0, 0); UNSUPPORTED("vrjjl72p0ams86w0e3fsnith"); // free (bz_l.list); UNSUPPORTED("48xtw1gzugr4tgwurr50x6d8e"); // if ((((left) < 1E-5) && ((left) > -1E-5))) { UNSUPPORTED("bkk1vblwk5js8005v0nk0jk15"); // free (bz_r.list); UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4mbggres28g1urrdviyjscdh0"); // else if ((((left) < 1E-5) && ((left) > -1E-5))) { UNSUPPORTED("16m5vvsclnhu00mxtqc62jc5q"); // gvrender_beziercurve(job, bz_r.list, bz_r.size, 0, 0, 0); UNSUPPORTED("dukn62ogiycorcn8c4esuwmu1"); // free (bz_r.list); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("2ej2iwx8roed79sbv44tte9sg"); // bz0 = bz_r; UNSUPPORTED("82oq6xp2v59bcqu7z1dbvilyn"); // splitBSpline (&bz0, (s->t)/(left+s->t), &bz_l, &bz_r); UNSUPPORTED("btj36obnij7vfhl4k6li7ixlh"); // free (bz0.list); UNSUPPORTED("99cbkfbl5fivdra5eaj0kf8n5"); // gvrender_beziercurve(job, bz_l.list, bz_l.size, 0, 0, 0); UNSUPPORTED("vrjjl72p0ams86w0e3fsnith"); // free (bz_l.list); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bjb95001z7szmwgcquyyal5ta"); // /* arrow_gen resets the job style (How? FIXME) UNSUPPORTED("eevkw6z2fbi2d7kpx3zp0uuvc"); // * If we have more splines to do, restore the old one. UNSUPPORTED("500s7rroyq30zj2qxhdp4jluo"); // * Use local copy of penwidth to work around reset. UNSUPPORTED("316yclqq5365l289qzfq39l6w"); // */ UNSUPPORTED("2qc36pchob3dha7c8jedwalcn"); // if (bz.sflag) { UNSUPPORTED("b6y3ukuisz1mssdko3l2oa179"); // gvrender_set_pencolor(job, segs->segs->color); UNSUPPORTED("b33lxxzdyehr8v8uwpkcgabuh"); // gvrender_set_fillcolor(job, segs->segs->color); UNSUPPORTED("7l0hrlftphvjrn1f7whgtaofw"); // arrow_gen(job, EMIT_TDRAW, bz.sp, bz.list[0], arrowsize, penwidth, bz.sflag); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("973cbk976xio10xxw9bgkyen2"); // if (bz.eflag) { UNSUPPORTED("7mplmupdwkpendc0q8ocljk18"); // gvrender_set_pencolor(job, endcolor); UNSUPPORTED("ahacu4j8j9b29k2c80wyfedus"); // gvrender_set_fillcolor(job, endcolor); UNSUPPORTED("d89bwaeqinnrhngamz9mrl01r"); // arrow_gen(job, EMIT_HDRAW, bz.ep, bz.list[bz.size - 1], arrowsize, penwidth, bz.eflag); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9zc0fxovb3sw9wibqdnoqamso"); // if ((ED_spl(e)->size>1) && (bz.sflag||bz.eflag) && styles) UNSUPPORTED("1sadq9tjru1s6bzpcgl677k6i"); // gvrender_set_style(job, styles); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("864f5ylvxgoy5rwmwl4pstg2p"); // free (segs); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 13jatehy3n1t03488fq3ek8st // static void free_stroke (stroke_t* sp) public static Object free_stroke(Object... arg) { UNSUPPORTED("ahnzha1pnhrfmdhm9uwi8iuao"); // static void free_stroke (stroke_t* sp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3h9wjmlt6pp3ti25zl9lhmigy"); // if (sp) { UNSUPPORTED("c8uned45gp04il3dvzfnj6g5k"); // free (sp->vertices); UNSUPPORTED("6tcxn9cesyebua29d6q299172"); // free (sp); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5b9ltl2mduk3ua0x8235o922t // static double forfunc (double curlen, double totallen, double initwid) public static Object forfunc(Object... arg) { UNSUPPORTED("3t80v9xj410ss5j0pqnc1zrjp"); // static double forfunc (double curlen, double totallen, double initwid) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7w1a8rqs29lelmnia96oa58f9"); // return ((1 - (curlen/totallen))*initwid/2.0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dsgrrv9hsyak20n1h9x5jvp3f // static double revfunc (double curlen, double totallen, double initwid) public static Object revfunc(Object... arg) { UNSUPPORTED("bld5nqyhkdbuxeay2ll473qr6"); // static double revfunc (double curlen, double totallen, double initwid) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("blt0wpagxakbwm5voqwfqir05"); // return (((curlen/totallen))*initwid/2.0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3evv2ec1hr5uijikij2h26w3t // static double nonefunc (double curlen, double totallen, double initwid) public static Object nonefunc(Object... arg) { UNSUPPORTED("e8e1fgr1nlozsj7m2ijaws2gd"); // static double nonefunc (double curlen, double totallen, double initwid) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2zcusggl2dike7m7cwbckjltr"); // return (initwid/2.0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 333yk8u7vrjjv2pfad3z273ra // static double bothfunc (double curlen, double totallen, double initwid) public static Object bothfunc(Object... arg) { UNSUPPORTED("au7dp9qva7eo751dhmuu29nq9"); // static double bothfunc (double curlen, double totallen, double initwid) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7hpykssamp5naz4fl0qzgklsq"); // double fr = curlen/totallen; UNSUPPORTED("bixgbzdc1rbkvbqmjxn5drr4k"); // if (fr <= 0.5) return (fr*initwid); UNSUPPORTED("1b7ckst75n0s5njx7vvi7w3jw"); // else return ((1-fr)*initwid); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 256panf42dptclohlg3aolfqv // static radfunc_t taperfun (edge_t* e) public static Object taperfun(Object... arg) { UNSUPPORTED("ygkpgli37inuq18f0rtbwcs1"); // static radfunc_t UNSUPPORTED("6r0vilajj0np6wokfkwjl7ykm"); // taperfun (edge_t* e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6ms33tgqoacyvkev0g6t87x2n"); // char* attr; UNSUPPORTED("1un0u4nwlweclzc8w1ydozt5q"); // if (E_dir && ((attr = agxget(e, E_dir)))[0]) { UNSUPPORTED("bslhjzz27pwavlahlu4z4vaei"); // if ((*(attr)==*("forward")&&!strcmp(attr,"forward"))) return forfunc; UNSUPPORTED("eulgmrvzxxnnylptzfoj4ebix"); // if ((*(attr)==*("back")&&!strcmp(attr,"back"))) return revfunc; UNSUPPORTED("7jy0p75av38y41nrehkh8eh5r"); // if ((*(attr)==*("both")&&!strcmp(attr,"both"))) return bothfunc; UNSUPPORTED("15n6mwfm4pg2fpvr7pkllvmcs"); // if ((*(attr)==*("none")&&!strcmp(attr,"none"))) return nonefunc; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bsel6fx8wjsph743urtdg1qfv"); // return (agisdirected(agraphof(aghead(e))) ? forfunc : nonefunc); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7u6cnonl0chpkjro9quo09fyr // static void emit_edge_graphics(GVJ_t * job, edge_t * e, char** styles) public static Object emit_edge_graphics(Object... arg) { UNSUPPORTED("44vrfcbqr2d1szhfncg37jn9c"); // static void emit_edge_graphics(GVJ_t * job, edge_t * e, char** styles) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dyh4es8zja669xh6w704698u1"); // int i, j, cnum, numc = 0, numsemi = 0; UNSUPPORTED("4fd30tht9vca24rbn5qkxxm2h"); // char *color, *pencolor, *fillcolor; UNSUPPORTED("dou14upt5u5f8go87xjj5jdtc"); // char *headcolor, *tailcolor, *lastcolor; UNSUPPORTED("da94242ir0732sz1wjfrstzam"); // char *colors = NULL; UNSUPPORTED("37thdceezsvepe7tlyfatrbcw"); // bezier bz; UNSUPPORTED("3l9st5qdrh657gcmhelkkjwk3"); // splines offspl, tmpspl; UNSUPPORTED("9sg7pim3sh38o6cyrrysxdihv"); // pointf pf0, pf1, pf2 = { 0, 0 }, pf3, *offlist, *tmplist; UNSUPPORTED("20vx89srcsfcjhjnu7dhv2ha0"); // double arrowsize, numc2, penwidth=job->obj->penwidth; UNSUPPORTED("a4px33i4moqe8ybwatz0g8k6"); // char* p; UNSUPPORTED("d7s9yrspa1yd9tdzj22df8zfx"); // boolean tapered = 0; UNSUPPORTED("d7dk8nv783iyi7g16fbyvoswy"); // setColorScheme (agget (e, "colorscheme")); UNSUPPORTED("4pdkymy0wuxj1yn9xqqzp2x4h"); // if (ED_spl(e)) { UNSUPPORTED("kp36oq4bt444kf967o82pd23"); // arrowsize = late_double(e, E_arrowsz, 1.0, 0.0); UNSUPPORTED("47l2wt9sohpfh3winazhczpb4"); // color = late_string(e, E_color, ""); UNSUPPORTED("d2n6qh5kiavdnxsfrc0fqqv4e"); // if (styles) { UNSUPPORTED("54isti54aox6yj0vuk6j86qhs"); // char** sp = styles; UNSUPPORTED("9v2c8p99l7pj3zqwvtb298adq"); // while ((p = *sp++)) { UNSUPPORTED("2ku2emqwvspqz2c6481orcixb"); // if ((*(p)==*("tapered")&&!strcmp(p,"tapered"))) { UNSUPPORTED("adyiyvvw6sowssjqqu2wojmtv"); // tapered = 1; UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1p0odq4xbiiyk9zulrtgh78p7"); // /* need to know how many colors separated by ':' */ UNSUPPORTED("epbhl3zzqty7zxgexbqsijz3t"); // for (p = color; *p; p++) { UNSUPPORTED("1zdp9y9tqsxdxtj8gfy3leixo"); // if (*p == ':') UNSUPPORTED("5iqqlev08y8ukmtx3vha7s7kc"); // numc++; UNSUPPORTED("88xgi4gcg06c70hzvrxc2pij2"); // else if (*p == ';') UNSUPPORTED("ajossrlhthg39idzi4plrieni"); // numsemi++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("f1kfj1lvizljipxfa8m49o34e"); // if (numsemi && numc) { UNSUPPORTED("9vi0u3wh25rzf9qx22ub742q9"); // if (multicolor (job, e, styles, color, numc+1, arrowsize, penwidth)) { UNSUPPORTED("2hm4ng34o2djs8z7qg2ac3c1x"); // color = "black"; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1adkfqmo3ykccvljbvh44veke"); // fillcolor = pencolor = color; UNSUPPORTED("5zjv2jq8jwy0xnngx03rvezxj"); // if (ED_gui_state(e) & (1<<0)) { UNSUPPORTED("e1znbw6oeo9yq3u94bd736qh0"); // pencolor = late_nnstring(e, E_activepencolor, UNSUPPORTED("1g9t8pkrtaf7lucfw4wjhwq1b"); // default_pencolor(pencolor, "#808080")); UNSUPPORTED("2jqwe3bwxzh4ldnv9yft80lr9"); // fillcolor = late_nnstring(e, E_activefillcolor, "#fcfcfc"); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("d3olcb516sc9gnsf00xgo98dd"); // else if (ED_gui_state(e) & (1<<1)) { UNSUPPORTED("6n83olgg54bds3atz6ocdxcgm"); // pencolor = late_nnstring(e, E_selectedpencolor, UNSUPPORTED("bjgr6yow0b74j4um7a2sekd1t"); // default_pencolor(pencolor, "#303030")); UNSUPPORTED("cm8kancv5dyuwquvezp6bfx54"); // fillcolor = late_nnstring(e, E_selectedfillcolor, "#e8e8e8"); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3szmncx89hltlxv3fqrn7abjs"); // else if (ED_gui_state(e) & (1<<3)) { UNSUPPORTED("9pzm0fj2ru19falkosarggftj"); // pencolor = late_nnstring(e, E_deletedpencolor, UNSUPPORTED("1ivzzes2dmdgnv86yk0ffaf2u"); // default_pencolor(pencolor, "#e0e0e0")); UNSUPPORTED("8o3b6zumizq20edhwhmjjtvjf"); // fillcolor = late_nnstring(e, E_deletedfillcolor, "#f0f0f0"); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("59tkofvq26pokzebj54fxmvn"); // else if (ED_gui_state(e) & (1<<2)) { UNSUPPORTED("9ur79rphks1cca1bf289echp6"); // pencolor = late_nnstring(e, E_visitedpencolor, UNSUPPORTED("5c0jkjan0v1lp9rthvuo36q5e"); // default_pencolor(pencolor, "#101010")); UNSUPPORTED("73uog35zh3g1t58z0zbwtmoxh"); // fillcolor = late_nnstring(e, E_visitedfillcolor, "#f8f8f8"); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("70e3lpuncfyeq8ow3o0twrknb"); // fillcolor = late_nnstring(e, E_fillcolor, color); UNSUPPORTED("besdb3lw2v7ps66w9w7tit6bj"); // if (pencolor != color) UNSUPPORTED("4s4clbt0ohbem378iomo2d67o"); // gvrender_set_pencolor(job, pencolor); UNSUPPORTED("ajy8xtlpgl5nu72sbovqnt6fl"); // if (fillcolor != color) UNSUPPORTED("b156qgcfm85r551m3jmzhysy7"); // gvrender_set_fillcolor(job, fillcolor); UNSUPPORTED("eso6mj6u37z0eyzv9bnyclws9"); // color = pencolor; UNSUPPORTED("75fa2ioc5gvzkhqk5qlljrc5k"); // if (tapered) { UNSUPPORTED("d2fgbjxcola63obus1hikp8pg"); // stroke_t* stp; UNSUPPORTED("4fan4tn82jocc40ifj8ouifx4"); // if (*color == '\0') color = "black"; UNSUPPORTED("287ivnme7uzrjofjffd2b728s"); // if (*fillcolor == '\0') fillcolor = "black"; UNSUPPORTED("aa64pbbtgdbmq07oeeb6b6xd6"); // gvrender_set_pencolor(job, "transparent"); UNSUPPORTED("b4ftxmadx3875jpvifjzhsz4d"); // gvrender_set_fillcolor(job, color); UNSUPPORTED("3cdfvg0cegvnb5z8rbltyba5w"); // bz = ED_spl(e)->list[0]; UNSUPPORTED("bstcwq3pyy3ut7b2lsr32fr81"); // stp = taper (&bz, taperfun (e), penwidth, 0, 0); UNSUPPORTED("4b4v79dvjxu6pk3cfm0u6f6ec"); // gvrender_polygon(job, stp->vertices, stp->nvertices, NOT(0)); UNSUPPORTED("chpwwmn3mqyi2bzsp7whr9nd9"); // free_stroke (stp); UNSUPPORTED("2dyaq1mbp4llru6ov9chn9lky"); // gvrender_set_pencolor(job, color); UNSUPPORTED("7tv6l7sws5ownkmdcnfh1bd70"); // if (fillcolor != color) UNSUPPORTED("c8g4zrr9fhcg9l45gm7ut3wkl"); // gvrender_set_fillcolor(job, fillcolor); UNSUPPORTED("4ulz6ze3ok8dfrvqvzfe163do"); // if (bz.sflag) { UNSUPPORTED("3bsc7v0uj4ukdu3q4yku6pyc5"); // arrow_gen(job, EMIT_TDRAW, bz.sp, bz.list[0], arrowsize, penwidth, bz.sflag); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5t5bh9txkzxp6h1lozsf250ww"); // if (bz.eflag) { UNSUPPORTED("dosyp6r5kbys1grl265mqm6d6"); // arrow_gen(job, EMIT_HDRAW, bz.ep, bz.list[bz.size - 1], arrowsize, penwidth, bz.eflag); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3rk5e1uiwm7hzn0bhxpzi5dey"); // /* if more than one color - then generate parallel beziers, one per color */ UNSUPPORTED("arvi3zjcegh42bgtwaulg8wkn"); // else if (numc) { UNSUPPORTED("8eaaczlv3zth4i3rc8kryne45"); // /* calculate and save offset vector spline and initialize first offset spline */ UNSUPPORTED("8a120p6zsfs8ycbql82yqol7p"); // tmpspl.size = offspl.size = ED_spl(e)->size; UNSUPPORTED("e3xuwliq0lpq61lr4e3efh174"); // offspl.list = malloc(sizeof(bezier) * offspl.size); UNSUPPORTED("41o3n44hn71jtdapbdfe0y9si"); // tmpspl.list = malloc(sizeof(bezier) * tmpspl.size); UNSUPPORTED("8pvfophsjdyrye9m6oieixnvf"); // numc2 = (2 + numc) / 2.0; UNSUPPORTED("7wvoxnl3dqatxwcvgzbrvp8lz"); // for (i = 0; i < offspl.size; i++) { UNSUPPORTED("6uzqmcfjwogzxlwn3gsd5jdj"); // bz = ED_spl(e)->list[i]; UNSUPPORTED("4lo2g191z1b9knaq7l6mnn6bh"); // tmpspl.list[i].size = offspl.list[i].size = bz.size; UNSUPPORTED("cc4js3gwy5jel80gaqbo8y129"); // offlist = offspl.list[i].list = malloc(sizeof(pointf) * bz.size); UNSUPPORTED("vf689dmffmji3k8sgjrc525g"); // tmplist = tmpspl.list[i].list = malloc(sizeof(pointf) * bz.size); UNSUPPORTED("6g7ruy3ae9horpmcz5nfjwyvm"); // pf3 = bz.list[0]; UNSUPPORTED("7foyxeolsc28jypsxdwryyo6j"); // for (j = 0; j < bz.size - 1; j += 3) { UNSUPPORTED("du9m49x179tlyjv3kpi4ajyxu"); // pf0 = pf3; UNSUPPORTED("4kiwxmoozlkcz1l62hop75o9g"); // pf1 = bz.list[j + 1]; UNSUPPORTED("euzly3uj0433xtqrcskytd7pi"); // /* calculate perpendicular vectors for each bezier point */ UNSUPPORTED("8dvury325tlnhct9axnqkloml"); // if (j == 0) /* first segment, no previous pf2 */ UNSUPPORTED("eqrlk7aad4crtsnmovu8rx5e6"); // offlist[j] = computeoffset_p(pf0, pf1, 2.0); UNSUPPORTED("ybsy5tjwpggeq6c9pm1r0mvg"); // else /* i.e. pf2 is available from previous segment */ UNSUPPORTED("1x7zjqoo6zzgcjg1fmrin53gg"); // offlist[j] = computeoffset_p(pf2, pf1, 2.0); UNSUPPORTED("31nofnynnq04ixi0v38p12n9p"); // pf2 = bz.list[j + 2]; UNSUPPORTED("w4fsbg1khv9rq1z4zqjr6buj"); // pf3 = bz.list[j + 3]; UNSUPPORTED("5pp5m5z0j3ifb4261labxynia"); // offlist[j + 1] = offlist[j + 2] = UNSUPPORTED("az662ecxsluy2yowrt3q6ek2p"); // computeoffset_qr(pf0, pf1, pf2, pf3, 2.0); UNSUPPORTED("cbwbz3whkfb01jvescyn9k0sv"); // /* initialize tmpspl to outermost position */ UNSUPPORTED("8wlvgs6gmjfrxnf217l61k9gs"); // tmplist[j].x = pf0.x - numc2 * offlist[j].x; UNSUPPORTED("88jzucdv8idpx03j2fewuvg1x"); // tmplist[j].y = pf0.y - numc2 * offlist[j].y; UNSUPPORTED("9xhxpretw3vq1bse37lv4cu0y"); // tmplist[j + 1].x = pf1.x - numc2 * offlist[j + 1].x; UNSUPPORTED("e3usjnf19ii4a29t9rtdtmfqy"); // tmplist[j + 1].y = pf1.y - numc2 * offlist[j + 1].y; UNSUPPORTED("a68d7jpzubul7pz15p6d036t0"); // tmplist[j + 2].x = pf2.x - numc2 * offlist[j + 2].x; UNSUPPORTED("9arrexwrbyqpj4ypwfyhjrtzg"); // tmplist[j + 2].y = pf2.y - numc2 * offlist[j + 2].y; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("ed04mnw0pqbnqfyg4xzrkfzkt"); // /* last segment, no next pf1 */ UNSUPPORTED("gwh8gl1f8r7993j5qtnjb5du"); // offlist[j] = computeoffset_p(pf2, pf3, 2.0); UNSUPPORTED("80gkd0c5b7k80ahlygpim1gmb"); // tmplist[j].x = pf3.x - numc2 * offlist[j].x; UNSUPPORTED("3z599nt08uc3h1yma07b04aj3"); // tmplist[j].y = pf3.y - numc2 * offlist[j].y; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4tu18v3pp0xuim6h8mg6d5acj"); // lastcolor = headcolor = tailcolor = color; UNSUPPORTED("e898dxfr4zmw4omwcbes9a6bp"); // colors = strdup(color); UNSUPPORTED("9c7ud1ls5bwt4gauc6v44g982"); // for (cnum = 0, color = strtok(colors, ":"); color; UNSUPPORTED("9ekqe3cr3rsir3piy9j737nk2"); // cnum++, color = strtok(0, ":")) { UNSUPPORTED("anr2fzsu68eq5ho25s3n57ucq"); // if (!color[0]) UNSUPPORTED("axx7q4yy90hd2qya7l3hppd5c"); // color = "black"; UNSUPPORTED("a2ducrn6b7qjjhh7f81totdqw"); // if (color != lastcolor) { UNSUPPORTED("aabfth40rjblehad0r9zya7ci"); // if (! (ED_gui_state(e) & ((1<<0) | (1<<1)))) { UNSUPPORTED("aa6xnio2sxgn1omogw6y8xyri"); // gvrender_set_pencolor(job, color); UNSUPPORTED("cjpgya31i8in4mlytxcux25xk"); // gvrender_set_fillcolor(job, color); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("e9aurhv58krtw8fa2qx3bd70y"); // lastcolor = color; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("1ngzlxjzccbsg6ucsln5rvfy0"); // if (cnum == 0) UNSUPPORTED("7hmj22ga66vzbca8w3syrk9f7"); // headcolor = tailcolor = color; UNSUPPORTED("4wn5san08kv94kkd7i7afxjhl"); // if (cnum == 1) UNSUPPORTED("7oxd4vlfp5a45womyvouxm6d6"); // tailcolor = color; UNSUPPORTED("d7gdoq0jhg8b4ac0gf5kv9ivo"); // for (i = 0; i < tmpspl.size; i++) { UNSUPPORTED("46p8d4gs7irf8q8np6w0dmvi2"); // tmplist = tmpspl.list[i].list; UNSUPPORTED("ew31zut96cgfu6j038wbwoeuh"); // offlist = offspl.list[i].list; UNSUPPORTED("5aahyg8gv7pvkfk4zigpruzu6"); // for (j = 0; j < tmpspl.list[i].size; j++) { UNSUPPORTED("428mqlpmorpkmzs7314jtfgo1"); // tmplist[j].x += offlist[j].x; UNSUPPORTED("870cggpxew62biyq2myzh1be"); // tmplist[j].y += offlist[j].y; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("1n3ez6dffthnb7zqgi0dc571b"); // gvrender_beziercurve(job, tmplist, tmpspl.list[i].size, UNSUPPORTED("3tvyao2azw8uqezjar4gg12rj"); // 0, 0, 0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4ulz6ze3ok8dfrvqvzfe163do"); // if (bz.sflag) { UNSUPPORTED("cnl2vgj89lj652fz58jzw5fgr"); // if (color != tailcolor) { UNSUPPORTED("61755uq447ue5aaxqvfbryhfo"); // color = tailcolor; UNSUPPORTED("aabfth40rjblehad0r9zya7ci"); // if (! (ED_gui_state(e) & ((1<<0) | (1<<1)))) { UNSUPPORTED("aa6xnio2sxgn1omogw6y8xyri"); // gvrender_set_pencolor(job, color); UNSUPPORTED("cjpgya31i8in4mlytxcux25xk"); // gvrender_set_fillcolor(job, color); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("ankm9epmn1d51qf5040r6fpo3"); // arrow_gen(job, EMIT_TDRAW, bz.sp, bz.list[0], UNSUPPORTED("4o0fkltlgsxx45rvoau5pvp16"); // arrowsize, penwidth, bz.sflag); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5t5bh9txkzxp6h1lozsf250ww"); // if (bz.eflag) { UNSUPPORTED("1bf269kx0rl5v6qpt9cbabezx"); // if (color != headcolor) { UNSUPPORTED("91s08h9fw7wrj8oyt31cgu4or"); // color = headcolor; UNSUPPORTED("aabfth40rjblehad0r9zya7ci"); // if (! (ED_gui_state(e) & ((1<<0) | (1<<1)))) { UNSUPPORTED("aa6xnio2sxgn1omogw6y8xyri"); // gvrender_set_pencolor(job, color); UNSUPPORTED("cjpgya31i8in4mlytxcux25xk"); // gvrender_set_fillcolor(job, color); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("77fdpd135fqcv7jprr2ac2k7b"); // arrow_gen(job, EMIT_HDRAW, bz.ep, bz.list[bz.size - 1], UNSUPPORTED("3umh63h5q3be2s7ix5nvchvxa"); // arrowsize, penwidth, bz.eflag); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ein30zj4hern2nnkuo8pqpwqy"); // free(colors); UNSUPPORTED("7wvoxnl3dqatxwcvgzbrvp8lz"); // for (i = 0; i < offspl.size; i++) { UNSUPPORTED("1wjuw35ysxsboo3rdxm79nmfy"); // free(offspl.list[i].list); UNSUPPORTED("60zkuby9v464su4bc563u74ts"); // free(tmpspl.list[i].list); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ewlz06ozbl7bfb9epkz1ox6mt"); // free(offspl.list); UNSUPPORTED("14byj4mkdb5aaeyd48wnrxku6"); // free(tmpspl.list); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("8gqszi1k0mq14icjh1ot8vg53"); // if (! (ED_gui_state(e) & ((1<<0) | (1<<1)))) { UNSUPPORTED("5czy66vom4jkjwpkobz0tn2kv"); // if (color[0]) { UNSUPPORTED("bd0syu44e3lbokb2mhifc6xzx"); // gvrender_set_pencolor(job, color); UNSUPPORTED("sj6fn2hkr0i5p6gyntb8nbz7"); // gvrender_set_fillcolor(job, fillcolor); UNSUPPORTED("3pv9j4qzifaa1yqzdsrv6crqk"); // } else { UNSUPPORTED("38cb36y8b8k7nyp8ou2ci224"); // gvrender_set_pencolor(job, "black"); UNSUPPORTED("53s7vea1n8kkq2j04kqwf7f57"); // if (fillcolor[0]) UNSUPPORTED("b3wipvue5h9yn4mwq4jdrvbqj"); // gvrender_set_fillcolor(job, fillcolor); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("3gfs0bkmty8cyqpr1hvhleit"); // gvrender_set_fillcolor(job, "black"); UNSUPPORTED("6o67xwzi6pf81mieipn703sxl"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ah9ldbdg46psh3ic9qv1v1w1h"); // for (i = 0; i < ED_spl(e)->size; i++) { UNSUPPORTED("6uzqmcfjwogzxlwn3gsd5jdj"); // bz = ED_spl(e)->list[i]; UNSUPPORTED("4vmmlrhormhci854vjzy3xfp5"); // if (job->flags & (1<<14)) { UNSUPPORTED("3fq5qfvm5itvhminu91gbm0xl"); // gvrender_beziercurve(job, bz.list, bz.size, bz.sflag, bz.eflag, 0); UNSUPPORTED("a47jqpic91ky93e1ohxv590l5"); // } else { UNSUPPORTED("dpf7yejadgyhte1g6i690hdvh"); // gvrender_beziercurve(job, bz.list, bz.size, 0, 0, 0); UNSUPPORTED("1varqft14sst3gy9wlbwfxs2h"); // if (bz.sflag) { UNSUPPORTED("4kjbcxhhyztcuvz6tljmieqnn"); // arrow_gen(job, EMIT_TDRAW, bz.sp, bz.list[0], UNSUPPORTED("4on3hu0dhyuvi03lazibxt3cb"); // arrowsize, penwidth, bz.sflag); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("1rw0tdjfpvfjrqqs2goiovglj"); // if (bz.eflag) { UNSUPPORTED("308rgxf2j9o0sn6ergiflga31"); // arrow_gen(job, EMIT_HDRAW, bz.ep, bz.list[bz.size - 1], UNSUPPORTED("dbyip7sr13mvy3tsoe4o9i19t"); // arrowsize, penwidth, bz.eflag); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6k0z6eroe598hkmkh1ynpnanu"); // if ((ED_spl(e)->size>1) && (bz.sflag||bz.eflag) && styles) UNSUPPORTED("44yezt0mg1ptjxgfbrz8rnq3d"); // gvrender_set_style(job, styles); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8clgbd8hcgw564ispajc9fzmg // static boolean edge_in_box(edge_t *e, boxf b) public static Object edge_in_box(Object... arg) { UNSUPPORTED("4ocf4su3fqdqvh06u5f0hltsn"); // static boolean edge_in_box(edge_t *e, boxf b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6tl9mepc2bett364jduh2q4mf"); // splines *spl; UNSUPPORTED("cqwl7s9yvzr8n5v8svuuv1a1q"); // textlabel_t *lp; UNSUPPORTED("2c3cg84bl0xam4mk6g5f31jj0"); // spl = ED_spl(e); UNSUPPORTED("7hvxias4hzevaqzopdofxqtf7"); // if (spl && boxf_overlap(spl->bb, b)) UNSUPPORTED("anqbm3khxs8r22akkx8kcgbbx"); // return NOT(0); UNSUPPORTED("n9pj1f2ecz41q7q378oisbjt"); // lp = ED_label(e); UNSUPPORTED("26tbjilm0lmi9lsxtc9qh7qr"); // if (lp && overlap_label(lp, b)) UNSUPPORTED("anqbm3khxs8r22akkx8kcgbbx"); // return NOT(0); UNSUPPORTED("16wq7hm2hmp8t60ogm2usvvsu"); // lp = ED_xlabel(e); UNSUPPORTED("erykqbn6tqjiaxzh5ob60z1f1"); // if (lp && lp->set && overlap_label(lp, b)) UNSUPPORTED("anqbm3khxs8r22akkx8kcgbbx"); // return NOT(0); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cbl8pryorx02zjsmvgy70ve3p // static void emit_begin_edge(GVJ_t * job, edge_t * e, char** styles) public static Object emit_begin_edge(Object... arg) { UNSUPPORTED("2ig8s73qzrztk38xr6ky7zb11"); // static void emit_begin_edge(GVJ_t * job, edge_t * e, char** styles) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8lamppsqs7nhiu5v8k1f5jfh2"); // obj_state_t *obj; UNSUPPORTED("12bpksga44s9sfl7x8xn2rt2k"); // int flags = job->flags; UNSUPPORTED("8yytudftst76763qgnjebkzhm"); // char *s; UNSUPPORTED("161c0dnzyd7i9yp8msmk5m4uk"); // textlabel_t *lab = NULL, *tlab = NULL, *hlab = NULL; UNSUPPORTED("5nywj0gapcfc2dmrad685bp6p"); // pointf *pbs = NULL; UNSUPPORTED("cl4bevd50vcwmjkrgq0elpafi"); // int i, nump, *pbs_n = NULL, pbs_poly_n = 0; UNSUPPORTED("3jo16cd9vt1kjc2upgxm9v4ro"); // char* dflt_url = NULL; UNSUPPORTED("c1xlgxbqyzghwddjio1795bot"); // char* dflt_target = NULL; UNSUPPORTED("75w3zx2oz7s1yf7arcxf48heo"); // double penwidth; UNSUPPORTED("1iexddadjo0w6fdgddatfx40s"); // obj = push_obj_state(job); UNSUPPORTED("b89ouigo5gftk9ug9cj99l2ev"); // obj->type = EDGE_OBJTYPE; UNSUPPORTED("8uahr3ivszgqh5671v8617mjq"); // obj->u.e = e; UNSUPPORTED("atedmjmxm7qoeolyi1wi7k1j4"); // obj->emit_state = EMIT_EDRAW; UNSUPPORTED("1db1hibhp0ubguecujfaj8wix"); // /* We handle the edge style and penwidth here because the width UNSUPPORTED("69ewknm6ydrnvfky1fo5ty9my"); // * is needed below for calculating polygonal image maps UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("rrp11kv0zwuznrwfe4ka8ko0"); // if (styles && ED_spl(e)) gvrender_set_style(job, styles); UNSUPPORTED("6vy4pkkhruh7w9iykz7tfgi9g"); // if (E_penwidth && ((s=agxget(e,E_penwidth)) && s[0])) { UNSUPPORTED("bei9v8b4qq66l2v8kmz3bnuwb"); // penwidth = late_double(e, E_penwidth, 1.0, 0.0); UNSUPPORTED("a85jezrt5nu63vkla8bslhzcx"); // gvrender_set_penwidth(job, penwidth); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("984vi925q5gu9ti0dn4c6h1pu"); // if (flags & (1<<24)) { UNSUPPORTED("aaozphuch8tw889utqbq1vdsl"); // /* obj->tail_z = late_double(agtail(e), N_z, 0.0, -1000.0); */ UNSUPPORTED("1qb7gbxecops5b2y4ze6kkb3m"); // /* obj->head_z = late_double(aghead(e), N_z, 0.0, -MAXFLOAT); */ UNSUPPORTED("d9qmjxnu6if6ms7ptj8jv1sou"); // if (GD_odim(agraphof(agtail(e))) >=3) { UNSUPPORTED("apupbk890ov955gpnt1ywdg8x"); // obj->tail_z = (ROUND((ND_pos(agtail(e))[2])*72)); UNSUPPORTED("7l2k0b1xoqey4kaneraonwuox"); // obj->head_z = (ROUND((ND_pos(aghead(e))[2])*72)); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("e5r0sn9g2mp9ns4hrphra5h51"); // obj->tail_z = obj->head_z = 0.0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("23wil4rzu7y2cg0oxiahdthfo"); // if (flags & (1<<15)) { UNSUPPORTED("1vaujzmkgkvzg9r3ws72hd0sn"); // if ((lab = ED_label(e))) UNSUPPORTED("10gcpuuqg5ziec0pp9kyhlbqb"); // obj->label = lab->text; UNSUPPORTED("18olw94kq4sb382d1xowaqmex"); // obj->taillabel = obj->headlabel = obj->xlabel = obj->label; UNSUPPORTED("2hqbgo1ml83utbsvik1j8i2us"); // if ((tlab = ED_xlabel(e))) UNSUPPORTED("4lnx8sli5qlwwkc6jf7fct4rl"); // obj->xlabel = tlab->text; UNSUPPORTED("ach6hnpzids5tf6isfd5kmv6k"); // if ((tlab = ED_tail_label(e))) UNSUPPORTED("e7gzimwa7y8dtdogbme4beiz1"); // obj->taillabel = tlab->text; UNSUPPORTED("9i7k1tgfaw9tmwoxsq3mqygz7"); // if ((hlab = ED_head_label(e))) UNSUPPORTED("dp7pv3xtw76x8tv19cch23xnp"); // obj->headlabel = hlab->text; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ekhzvq8l2u2frs2tl01cuf71s"); // if (flags & (1<<16)) { UNSUPPORTED("8moktqylyfg7421xon31c77cc"); // agxbuf xb; UNSUPPORTED("2m3h7h7zkzx4aix1gvfd54itd"); // unsigned char xbuf[128]; UNSUPPORTED("6dfmabcsvvsbizc4h30vlmcv0"); // agxbinit(&xb, 128, xbuf); UNSUPPORTED("cxt18v48tfjjupb58w42yijkl"); // s = getObjId (job, e, &xb); UNSUPPORTED("20n0stvu1ku0ueoyhntfblzwk"); // obj->id = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("52frst03mcbsuu6bmnqs962qm"); // agxbfree(&xb); UNSUPPORTED("1671vg2ii28nl1884z9by98oj"); // if (((s = agget(e, "href")) && s[0]) || ((s = agget(e, "URL")) && s[0])) UNSUPPORTED("d91p689ronm5sfp1t1zp8a9lg"); // dflt_url = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("14h7yzdms65e8u39cm8u9j09d"); // if (((s = agget(e, "edgehref")) && s[0]) || ((s = agget(e, "edgeURL")) && s[0])) UNSUPPORTED("7tbdqrc1yfgnnqv43758e83ox"); // obj->url = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("95kpmzfgantzkuuqda3257e1w"); // else if (dflt_url) UNSUPPORTED("bpb2jomy0ylc3sny2qpqs5ow0"); // obj->url = strdup(dflt_url); UNSUPPORTED("4px9z3013lzzxp1y25an6kq60"); // if (((s = agget(e, "labelhref")) && s[0]) || ((s = agget(e, "labelURL")) && s[0])) UNSUPPORTED("at75pf09xegtmpfpxuho1ez3a"); // obj->labelurl = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("95kpmzfgantzkuuqda3257e1w"); // else if (dflt_url) UNSUPPORTED("97vequ01i369l44p14efuqvhm"); // obj->labelurl = strdup(dflt_url); UNSUPPORTED("9iu3uo079ib1p40uh1yasbvqm"); // if (((s = agget(e, "tailhref")) && s[0]) || ((s = agget(e, "tailURL")) && s[0])) { UNSUPPORTED("ytymloen95ie2kurds6mbjqg"); // obj->tailurl = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("7hm7tuu8dsjj1pui6g0tc1k6f"); // obj->explicit_tailurl = NOT(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("95kpmzfgantzkuuqda3257e1w"); // else if (dflt_url) UNSUPPORTED("47aatd2rv5gwkpo89wjbtk0h1"); // obj->tailurl = strdup(dflt_url); UNSUPPORTED("7nxel42t6oq08r8gct4rsxf7v"); // if (((s = agget(e, "headhref")) && s[0]) || ((s = agget(e, "headURL")) && s[0])) { UNSUPPORTED("7gtgsooxqvcu6l1puh1h4eo7b"); // obj->headurl = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("asli1axdl9etovuah6pxmmee5"); // obj->explicit_headurl = NOT(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("95kpmzfgantzkuuqda3257e1w"); // else if (dflt_url) UNSUPPORTED("4pmt43kqcvoumkzh5z4w2t1vf"); // obj->headurl = strdup(dflt_url); UNSUPPORTED("3xbu5lb3fe5zgccq9vbjk3kln"); // } UNSUPPORTED("akp8i12zqhzyti5072dctwx4z"); // if (flags & (1<<23)) { UNSUPPORTED("6863y1q9ojbbbx8f4e3vwlen2"); // if ((s = agget(e, "target")) && s[0]) UNSUPPORTED("6e7ucuyioknvvz9i86kctjo8f"); // dflt_target = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("9ybfu42vnta17eg18hledoxk7"); // if ((s = agget(e, "edgetarget")) && s[0]) { UNSUPPORTED("doh5a8birowwtmsp8f8982lle"); // obj->explicit_edgetarget = NOT(0); UNSUPPORTED("4z44bpd7qea5mlut410evqsif"); // obj->target = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ausveuroy93s2sdgviv4p0lcv"); // else if (dflt_target) UNSUPPORTED("a1ke8xqvu9o082268ksexzgny"); // obj->target = strdup(dflt_target); UNSUPPORTED("bpe0irgpt9end7gtltjdokxpy"); // if ((s = agget(e, "labeltarget")) && s[0]) UNSUPPORTED("bzn9htm8cci6c7dde9k91l83s"); // obj->labeltarget = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("ausveuroy93s2sdgviv4p0lcv"); // else if (dflt_target) UNSUPPORTED("ar607cwjyspcv574196uxzkjc"); // obj->labeltarget = strdup(dflt_target); UNSUPPORTED("5rdzxxesadfpf6txv5t01ozuj"); // if ((s = agget(e, "tailtarget")) && s[0]) { UNSUPPORTED("4w54a911j5thxlajsmya0lxqq"); // obj->tailtarget = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("85s8gvyt4vepi64xcje31iek8"); // obj->explicit_tailtarget = NOT(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ausveuroy93s2sdgviv4p0lcv"); // else if (dflt_target) UNSUPPORTED("37o9c6wmbsdgi78jeu7kisvbu"); // obj->tailtarget = strdup(dflt_target); UNSUPPORTED("9h2r9gbx0nfsnhwvo6rkbrx9i"); // if ((s = agget(e, "headtarget")) && s[0]) { UNSUPPORTED("4zxyzeqp8h430tyb6zjdn4sd6"); // obj->explicit_headtarget = NOT(0); UNSUPPORTED("7r8xkvzh66pda9mg5skownrld"); // obj->headtarget = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ausveuroy93s2sdgviv4p0lcv"); // else if (dflt_target) UNSUPPORTED("dr88cbxj5srk1ojowv9swn9pr"); // obj->headtarget = strdup(dflt_target); UNSUPPORTED("3xbu5lb3fe5zgccq9vbjk3kln"); // } UNSUPPORTED("ep9t9tvrtouwjd7pulp378fzi"); // if (flags & (1<<22)) { UNSUPPORTED("8b522c1xkaxbe7orhmgdpw7wo"); // if (((s = agget(e, "tooltip")) && s[0]) || UNSUPPORTED("epyuvpbf4py1ueht2htfx9wrg"); // ((s = agget(e, "edgetooltip")) && s[0])) { UNSUPPORTED("8mqt0zsk0c9lp05pgm5t2c6z7"); // obj->tooltip = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("diwiuhgudo706youzbhxsmajm"); // obj->explicit_tooltip = NOT(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("aqmnkkhtx4an4uhckaewhcgmp"); // else if (obj->label) UNSUPPORTED("4s32lfe96j6y84uateu8as1g0"); // obj->tooltip = strdup(obj->label); UNSUPPORTED("c5kcbti582hfnwvehr32n2va7"); // if ((s = agget(e, "labeltooltip")) && s[0]) { UNSUPPORTED("bhdlgf7cc5ykmujysafzspf2m"); // obj->labeltooltip = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("npeafaiazv07hkrit692subv"); // obj->explicit_labeltooltip = NOT(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("aqmnkkhtx4an4uhckaewhcgmp"); // else if (obj->label) UNSUPPORTED("2hl1g7eri9qv82oy9sfyzt81j"); // obj->labeltooltip = strdup(obj->label); UNSUPPORTED("6voynh2r7ssu3ixda4lxxkair"); // if ((s = agget(e, "tailtooltip")) && s[0]) { UNSUPPORTED("du6ndrua8ofzqrdrl93za73fy"); // obj->tailtooltip = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("c8tog5rk6xyjayycyb3lrvv1z"); // obj->explicit_tailtooltip = NOT(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2ztxqs1s2cxhj4vgiol21jz63"); // else if (obj->taillabel) UNSUPPORTED("8oa1ltfyq9fydfsizol8ewimo"); // obj->tailtooltip = strdup(obj->taillabel); UNSUPPORTED("cl0wrp7bp2cgxks07e64qiuqf"); // if ((s = agget(e, "headtooltip")) && s[0]) { UNSUPPORTED("5phljruko4leqqbs5bppxgsj"); // obj->headtooltip = strdup_and_subst_obj(s, (void*)e); UNSUPPORTED("eq1aukj58yixydy8kpfo7z1yi"); // obj->explicit_headtooltip = NOT(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9roz9l9toa612u73rurlji9l4"); // else if (obj->headlabel) UNSUPPORTED("24l5dbncepggtecq9rngaod0d"); // obj->headtooltip = strdup(obj->headlabel); UNSUPPORTED("3xbu5lb3fe5zgccq9vbjk3kln"); // } UNSUPPORTED("2mg64zxg17fewxae9xmwwaa0m"); // free (dflt_url); UNSUPPORTED("6w5fxao8mlryxwk1mz7ksvbce"); // free (dflt_target); UNSUPPORTED("6ic0ku7wr32jsf5j0pwkrzq8j"); // if (flags & ((1<<16) | (1<<22))) { UNSUPPORTED("5ndyf9os0xxk8bsbjd2c2scjp"); // if (ED_spl(e) && (obj->url || obj->tooltip) && (flags & (1<<19))) { UNSUPPORTED("gq85b3oml4t5u52mslbiohm4"); // int ns; UNSUPPORTED("bapn9032dhdk62b51i2ut3i7t"); // splines *spl; UNSUPPORTED("3wvt6ajtp2z5ux7yhf3i1uu51"); // double w2 = MAX(job->obj->penwidth/2.0,2.0); UNSUPPORTED("74rl229xn6mlrx2uv5gby9xoi"); // spl = ED_spl(e); UNSUPPORTED("borrlfudm59nvnwsmvvccimug"); // ns = spl->size; /* number of splines */ UNSUPPORTED("bwf639msooalzn11a63mrvdh0"); // for (i = 0; i < ns; i++) UNSUPPORTED("9ta5hkbutugjx9htzj3lq1pav"); // map_output_bspline (&pbs, &pbs_n, &pbs_poly_n, spl->list+i, w2); UNSUPPORTED("3l39oh2gmkeoyrfm0yzl8m4d4"); // obj->url_bsplinemap_poly_n = pbs_poly_n; UNSUPPORTED("co64ewdmi3b7x6t2h8cp9hkvg"); // obj->url_bsplinemap_n = pbs_n; UNSUPPORTED("6pz9l8cp367kjl3asc6hiwnpz"); // if (! (flags & (1<<13))) { UNSUPPORTED("9zfwixrcbys3l8gx4ol8980op"); // for ( nump = 0, i = 0; i < pbs_poly_n; i++) UNSUPPORTED("a4l7ie3p7q35rrj0oglmisn5t"); // nump += pbs_n[i]; UNSUPPORTED("7v0e42759wdkgsyz70af06mms"); // gvrender_ptf_A(job, pbs, pbs, nump); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4o2ao6pcwmplab6n21deqwps9"); // obj->url_bsplinemap_p = pbs; UNSUPPORTED("5k8t4lz63jq26u2xqeoskhen7"); // obj->url_map_shape = MAP_POLYGON; UNSUPPORTED("1mpert8m5p683pcg0qyjgzj1"); // obj->url_map_p = pbs; UNSUPPORTED("84gohar4j2iw17h4sy0oehdhy"); // obj->url_map_n = pbs_n[0]; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("22f78nyasgzgcunmxhflea4ug"); // gvrender_begin_edge(job, e); UNSUPPORTED("spdml5d3q3jza61kjh4zxw31"); // if (obj->url || obj->explicit_tooltip) UNSUPPORTED("6e7g66eeo7n8h8mq556pt3xxy"); // gvrender_begin_anchor(job, UNSUPPORTED("av1tl9edbbm94up94c6rfx2tc"); // obj->url, obj->tooltip, obj->target, obj->id); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 29djyajtv7sgp9x7yjc7qzabo // static void emit_edge_label(GVJ_t* job, textlabel_t* lbl, emit_state_t lkind, int explicit, char* url, char* tooltip, char* target, char *id, splines* spl) public static Object emit_edge_label(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("35xyp233i430kqmc9ujvqett4"); // emit_edge_label(GVJ_t* job, textlabel_t* lbl, emit_state_t lkind, int explicit, UNSUPPORTED("en7wsvah9njefedha3fj9icwa"); // char* url, char* tooltip, char* target, char *id, splines* spl) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("12bpksga44s9sfl7x8xn2rt2k"); // int flags = job->flags; UNSUPPORTED("ecr1y7qy0ikxkidkdfvwv88ir"); // emit_state_t old_emit_state; UNSUPPORTED("6w3ygcd4u5ovgqghawjtzd4l8"); // char* newid; UNSUPPORTED("98v0vg88ycqpkpyg1kritbah0"); // char* type; UNSUPPORTED("3sg0pzcyo2xi4xr9utypik0di"); // if ((lbl == NULL) || !(lbl->set)) return; UNSUPPORTED("bt2nnyzwpzxnzhhrsjv03du9j"); // if (id) { /* non-NULL if needed */ UNSUPPORTED("6o6r1v1dpl86m94m7l5omr00u"); // newid = (char*)zmalloc((strlen(id) + sizeof("-headlabel"))*sizeof(char)); UNSUPPORTED("9queigxdufzgkqvtlnulkij8z"); // switch (lkind) { UNSUPPORTED("4dur34ux7rmaxikyxa4xy6mt3"); // case EMIT_ELABEL : UNSUPPORTED("5yejllfmasus697zyh9icg23m"); // type = "label"; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("ckacb8gd8ihcl655tak5p48xx"); // case EMIT_HLABEL : UNSUPPORTED("60jcdu5mykv7nj9c62dt74vbg"); // type = "headlabel"; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("8j00sch2b081jzzzib4soebcu"); // case EMIT_TLABEL : UNSUPPORTED("erdib8kle1lcl2if7uf5rx8xs"); // type = "taillabel"; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5ujjs4gho9mjjupbibyqyplxp"); // default : UNSUPPORTED("9rml26jwxfvc1i0eeqsucqrl7"); // assert (0); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("etlt5rbiatgk1pin7kk30ll2x"); // sprintf (newid, "%s-%s", id, type); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("5qoplxw5vuo9t9b18i6ee7ime"); // newid = NULL; UNSUPPORTED("ekjwoxwz3y39zx2i2q6310l1u"); // old_emit_state = job->obj->emit_state; UNSUPPORTED("d5oaybfzozrw1bnvrdisv5yxc"); // job->obj->emit_state = lkind; UNSUPPORTED("c2j2m5w18gb9vht8elcpe4ce1"); // if ((url || explicit) && !(flags & (1<<2))) { UNSUPPORTED("8as81xybsx2lbhatoq5dfka46"); // map_label(job, lbl); UNSUPPORTED("b1r5s44l517bwmgj4kvnf5pth"); // gvrender_begin_anchor(job, url, tooltip, target, newid); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6n40fbgjky821o8xqbk4ke6js"); // emit_label(job, lkind, lbl); UNSUPPORTED("as20j8imvr5tdwziovn1yy9w9"); // if (spl) emit_attachment(job, lbl, spl); UNSUPPORTED("buoc16exkpqacfj0vige0c8cs"); // if (url || explicit) { UNSUPPORTED("8z7a7lmqaytt0za0fb8kavivm"); // if (flags & (1<<2)) { UNSUPPORTED("7jrzhi6w0txc5ge27adx7n1fg"); // map_label(job, lbl); UNSUPPORTED("5ygb95yq4xmsdotqmdr3vj3v5"); // gvrender_begin_anchor(job, url, tooltip, target, newid); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e3o6yrnsv8lko5fql4f8a9gly"); // gvrender_end_anchor(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4ml3jp9auhgd67u12ys1dysmz"); // if (newid) free (newid); UNSUPPORTED("e0dze8hjyg2dby274irdlx48q"); // job->obj->emit_state = old_emit_state; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 awxicbypnp5lexym1y3ymowey // static void nodeIntersect (GVJ_t * job, pointf p, boolean explicit_iurl, char* iurl, boolean explicit_itooltip, char* itooltip, boolean explicit_itarget, char* itarget) public static Object nodeIntersect(Object... arg) { UNSUPPORTED("cmhcypje3hntq13rzpbnk7ors"); // static void nodeIntersect (GVJ_t * job, pointf p, UNSUPPORTED("3oh5ubi4nhyilnxnj6o43m9jg"); // boolean explicit_iurl, char* iurl, UNSUPPORTED("1l6n135od7wjrab69cp2rq4as"); // boolean explicit_itooltip, char* itooltip, UNSUPPORTED("a9o31jy22twcezb78yp27lex3"); // boolean explicit_itarget, char* itarget) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("a5d87vmbdhktxeng57v2hzdid"); // char* url; UNSUPPORTED("836sn3dd0sjadnx46ehd0ojan"); // char* tooltip; UNSUPPORTED("9zm2viiigdykrikvq2wxotz4t"); // char* target; UNSUPPORTED("5mdh3lx400yozcu82r1yqq8fs"); // boolean explicit; UNSUPPORTED("70p390q4p8ly00fs0tu1ou5lc"); // if (explicit_iurl) url = iurl; UNSUPPORTED("2qo54smwvn3zpz62uwalydr4e"); // else url = obj->url; UNSUPPORTED("elyxsmzru5je5et9mzf7xln9e"); // if (explicit_itooltip) { UNSUPPORTED("bih7mdnro80d1ycl5mduylzjv"); // tooltip = itooltip; UNSUPPORTED("b8xy4j8mzbef8wy4u4f0e928z"); // explicit = NOT(0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3njq6nu65dp353iz31nlymjhr"); // else if (obj->explicit_tooltip) { UNSUPPORTED("bqwxu32cunjm0lxj3oi5zlr4s"); // tooltip = obj->tooltip; UNSUPPORTED("b8xy4j8mzbef8wy4u4f0e928z"); // explicit = NOT(0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("bj1n4exyidlxkszug92q5e8pm"); // explicit = 0; UNSUPPORTED("bih7mdnro80d1ycl5mduylzjv"); // tooltip = itooltip; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("68e6sqdkexks56m61b36z4jam"); // if (explicit_itarget) UNSUPPORTED("ezrw5qg1aplvs9qzwam68j5uq"); // target = itarget; UNSUPPORTED("16b0s2q3bcb5cqp3fd3ga7wor"); // else if (obj->explicit_edgetarget) UNSUPPORTED("e9a53dgfxmu20y35wg7ben6gm"); // target = obj->target; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("ezrw5qg1aplvs9qzwam68j5uq"); // target = itarget; UNSUPPORTED("buoc16exkpqacfj0vige0c8cs"); // if (url || explicit) { UNSUPPORTED("4hpmlshabmpme6e8axio0u6tm"); // map_point(job, p); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ywemz3ws8gm7t2jkezm9zl44 // static void emit_end_edge(GVJ_t * job) public static Object emit_end_edge(Object... arg) { UNSUPPORTED("1dduzu2v1v5eoimgn6wl3pq1s"); // static void emit_end_edge(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("4qb9sxge2bkx34r71ezj0knk2"); // edge_t *e = obj->u.e; UNSUPPORTED("avhbw4mqc8i7mhe1mi06nj1fv"); // int i, nump; UNSUPPORTED("ebrzd2bubs5trqandzsfjpugj"); // if (obj->url || obj->explicit_tooltip) { UNSUPPORTED("e3o6yrnsv8lko5fql4f8a9gly"); // gvrender_end_anchor(job); UNSUPPORTED("dmr093y6wa3ax73y54vvo29lj"); // if (obj->url_bsplinemap_poly_n) { UNSUPPORTED("8j5y8urq29one6yb4kfmzna3f"); // for ( nump = obj->url_bsplinemap_n[0], i = 1; i < obj->url_bsplinemap_poly_n; i++) { UNSUPPORTED("9xsziog2rrr4vw3x27e2ndqjp"); // /* additional polygon maps around remaining bezier pieces */ UNSUPPORTED("5w8ld66x8j20bfg4bhnrzgnno"); // obj->url_map_n = obj->url_bsplinemap_n[i]; UNSUPPORTED("9ka5hm7zu6chhinb1q0vf2z4v"); // obj->url_map_p = &(obj->url_bsplinemap_p[nump]); UNSUPPORTED("5xf0jq48hur62ull7qfz6hvx9"); // gvrender_begin_anchor(job, UNSUPPORTED("blnuziy4xllrn7u5trd1fnls8"); // obj->url, obj->tooltip, obj->target, obj->id); UNSUPPORTED("9komgvtfublw0fuwcn56n60nb"); // gvrender_end_anchor(job); UNSUPPORTED("c9dwtox5h6ixy1w83w397g2kj"); // nump += obj->url_bsplinemap_n[i]; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9pmuzaizzoydjgbkmuor040f6"); // obj->url_map_n = 0; /* null out copy so that it doesn't get freed twice */ UNSUPPORTED("8cqdsgr453qauw78nltd5c4tx"); // obj->url_map_p = NULL; UNSUPPORTED("4pdkymy0wuxj1yn9xqqzp2x4h"); // if (ED_spl(e)) { UNSUPPORTED("9wdrv4uc4c7ssn0qpmxgz5eu1"); // pointf p; UNSUPPORTED("7jumvon0fvx7rozmib9zg46pn"); // bezier bz; UNSUPPORTED("66ycb012574x3aksn28ibhxd5"); // /* process intersection with tail node */ UNSUPPORTED("7waxmjg8e70tet8to37przecd"); // bz = ED_spl(e)->list[0]; UNSUPPORTED("jksehajhc4wys677xg3wbbqp"); // if (bz.sflag) /* Arrow at start of splines */ UNSUPPORTED("kxn3waz2mvbtl0y7qgit84qy"); // p = bz.sp; UNSUPPORTED("7162vc0qtrox86ru0t0edndpq"); // else /* No arrow at start of splines */ UNSUPPORTED("6vhfnfcnxq7pk1ylvgqsbhisf"); // p = bz.list[0]; UNSUPPORTED("3he9xp2xirwwauclzoba24j8h"); // nodeIntersect (job, p, obj->explicit_tailurl, obj->tailurl, UNSUPPORTED("digi7elarmtdncyct8hntl9k6"); // obj->explicit_tailtooltip, obj->tailtooltip, UNSUPPORTED("bjqpxn7ux8x0z0psos6lg97at"); // obj->explicit_tailtarget, obj->tailtarget); UNSUPPORTED("1eo0iyrg7y6hw7gaa6t4rckhw"); // /* process intersection with head node */ UNSUPPORTED("1z1ljfme78h5hs2nhpnh0c1fi"); // bz = ED_spl(e)->list[ED_spl(e)->size - 1]; UNSUPPORTED("eg9okxorf20k4z98ukgoxo3n7"); // if (bz.eflag) /* Arrow at end of splines */ UNSUPPORTED("ehclpn3uuogubck9azlh1vpas"); // p = bz.ep; UNSUPPORTED("9vqsg7ptbtw9uq9csktycrpd1"); // else /* No arrow at end of splines */ UNSUPPORTED("a3eqfcdajd48yebxdzxtmmfoi"); // p = bz.list[bz.size - 1]; UNSUPPORTED("90oe5mif8a78ifcvx4ihiqnap"); // nodeIntersect (job, p, obj->explicit_headurl, obj->headurl, UNSUPPORTED("47gawnzk5qaei40hp6wyzmccl"); // obj->explicit_headtooltip, obj->headtooltip, UNSUPPORTED("eovhrgd0p19e5n9en1fyyikgc"); // obj->explicit_headtarget, obj->headtarget); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3myme3h0w55rj1gxrei3sza4u"); // emit_edge_label(job, ED_label(e), EMIT_ELABEL, UNSUPPORTED("3plv0n79k76me9i1hjgw53uf"); // obj->explicit_labeltooltip, UNSUPPORTED("aaks2xubvv971c3n3lkewm11l"); // obj->labelurl, obj->labeltooltip, obj->labeltarget, obj->id, UNSUPPORTED("agvl7gmqjq08dcsq6in3idrlh"); // ((mapbool(late_string(e, E_decorate, "false")) && ED_spl(e)) ? ED_spl(e) : 0)); UNSUPPORTED("5s1nsti98iov2qpm95devpckw"); // emit_edge_label(job, ED_xlabel(e), EMIT_ELABEL, UNSUPPORTED("3plv0n79k76me9i1hjgw53uf"); // obj->explicit_labeltooltip, UNSUPPORTED("aaks2xubvv971c3n3lkewm11l"); // obj->labelurl, obj->labeltooltip, obj->labeltarget, obj->id, UNSUPPORTED("agvl7gmqjq08dcsq6in3idrlh"); // ((mapbool(late_string(e, E_decorate, "false")) && ED_spl(e)) ? ED_spl(e) : 0)); UNSUPPORTED("du836h1rt0jh9ud6q2syf0ym8"); // emit_edge_label(job, ED_head_label(e), EMIT_HLABEL, UNSUPPORTED("1pdnwlknuz9w3gkir3l8o1yro"); // obj->explicit_headtooltip, UNSUPPORTED("8bd82h05ko2pwessxq68kaxai"); // obj->headurl, obj->headtooltip, obj->headtarget, obj->id, UNSUPPORTED("ai3ojmcrmb5sj7kn23byccggm"); // 0); UNSUPPORTED("bh63wcy1dti8ji145r5ghesje"); // emit_edge_label(job, ED_tail_label(e), EMIT_TLABEL, UNSUPPORTED("9y21fl5ek5f4g5ebjoixzr4gv"); // obj->explicit_tailtooltip, UNSUPPORTED("b1470sa0rpd26d4t30nidwv8"); // obj->tailurl, obj->tailtooltip, obj->tailtarget, obj->id, UNSUPPORTED("ai3ojmcrmb5sj7kn23byccggm"); // 0); UNSUPPORTED("9sm494bjst3m8frvi02esqjkm"); // gvrender_end_edge(job); UNSUPPORTED("39iamwq9cd9iv3d2iyiaq8gz9"); // pop_obj_state(job); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e552br6jk0jigqmq1c9d2x0fy // static void emit_edge(GVJ_t * job, edge_t * e) public static Object emit_edge(Object... arg) { UNSUPPORTED("701wlpnv3kz0k3hxn7zqrhbqx"); // static void emit_edge(GVJ_t * job, edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8yytudftst76763qgnjebkzhm"); // char *s; UNSUPPORTED("byo308l1rmve5rmx8wt32juux"); // char *style; UNSUPPORTED("getfykrvugvlv3wxt5qm5ghl"); // char **styles = 0; UNSUPPORTED("9q7vvjxznd6x0u1t6fgd82byj"); // char **sp; UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("6govt2ekuiy0vzlv3yv2uu723"); // if (edge_in_box(e, job->clip) && edge_in_layer(job, agraphof(aghead(e)), e) ) { UNSUPPORTED("40dvidospika9vlp9ti3h4kbk"); // s = malloc(strlen(agnameof(agtail(e))) + 2 + strlen(agnameof(aghead(e))) + 1); UNSUPPORTED("aanr456304klecsfh7bdhjuqs"); // strcpy(s,agnameof(agtail(e))); UNSUPPORTED("90k8dynebdy5ezb8ysfakj1bq"); // if (agisdirected(agraphof(aghead(e)))) UNSUPPORTED("6t25g7w3win3lim8fgtsen7d0"); // strcat(s,"->"); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("8kwffycoj7ji16shumcvo0z2w"); // strcat(s,"--"); UNSUPPORTED("9qi68sa2442hrlpp7zizf86w2"); // strcat(s,agnameof(aghead(e))); UNSUPPORTED("9tyf9lnhx38ny94z7gx5gkioi"); // gvrender_comment(job, s); UNSUPPORTED("d285xdylp7oj81aar06ulc7kh"); // free(s); UNSUPPORTED("dzzea54yfhrfp3ko6rqi4h8na"); // s = late_string(e, E_comment, ""); UNSUPPORTED("7oyyy6d3itm6qqhr3p5zu6ded"); // if (s[0]) UNSUPPORTED("8gbf99sx0atz9ku0tfjv4m4o3"); // gvrender_comment(job, s); UNSUPPORTED("9ue98xnv5lygucjpcp6ugmkjr"); // style = late_string(e, E_style, ""); UNSUPPORTED("c6nyyirbpagqf6tsr8p6b3xw9"); // /* We shortcircuit drawing an invisible edge because the arrowhead UNSUPPORTED("4oynhdibr581vvritt0c2m0zi"); // * code resets the style to solid, and most of the code generators UNSUPPORTED("b151tzgt2xkvtkf487juwpl32"); // * (except PostScript) won't honor a previous style of invis. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("12ihr78gv09dxppuorymkgt75"); // if (style[0]) { UNSUPPORTED("32d3t9w0x6lbw2olmibm97mqd"); // styles = parse_style(style); UNSUPPORTED("ai2h90fa4b5ss40yyc0ehvrzd"); // sp = styles; UNSUPPORTED("9v2c8p99l7pj3zqwvtb298adq"); // while ((p = *sp++)) { UNSUPPORTED("xtuts27rjtqvzh4gjkw96ime"); // if ((*(p)==*("invis")&&!strcmp(p,"invis"))) return; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9hsqvthyp1sj37t7lu10n1luq"); // emit_begin_edge(job, e, styles); UNSUPPORTED("cchqw8nozlblfh2ekimz3q7ye"); // emit_edge_graphics (job, e, styles); UNSUPPORTED("6fu8546pxs99njakbk5cl5q31"); // emit_end_edge(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 dacilfxr6a3uba0ks0btnjoms // static char adjust[] = //3 crlphx0gbhlhrn2w2jq92mgxq // static void expandBB (boxf* bb, pointf p) public static Object expandBB(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("3lpbo3h0n97pkcx19mleg4zy3"); // expandBB (boxf* bb, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("82qwewr47nk4i4uoe835qwx7m"); // if (p.x > bb->UR.x) UNSUPPORTED("6g9fswlylro0l373mk5r6hrf2"); // bb->UR.x = p.x; UNSUPPORTED("42h6ln67gjb305nianf5cqtwb"); // if (p.x < bb->LL.x) UNSUPPORTED("aecuyren82eu4q6khc57o37fm"); // bb->LL.x = p.x; UNSUPPORTED("5sb5u1ns40tj304k0u2ab1at7"); // if (p.y > bb->UR.y) UNSUPPORTED("759apld02jf160x6shlbl6vh0"); // bb->UR.y = p.y; UNSUPPORTED("6kqd1pni8dvsj92cyx40pg7yq"); // if (p.y < bb->LL.y) UNSUPPORTED("196dcdn12h9rrk3ut2ar5byra"); // bb->LL.y = p.y; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9fdfpbfftpegojteq4f4zkh3t // static boxf ptsBB (xdot_point* inpts, int numpts, boxf* bb) public static Object ptsBB(Object... arg) { UNSUPPORTED("d5qt6s97burjfu5qe0oxyyrmr"); // static boxf UNSUPPORTED("6t79m8rz3g0dlgf125e80z567"); // ptsBB (xdot_point* inpts, int numpts, boxf* bb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1sc1s00b2mxqj9p5pa0w4t375"); // boxf opbb; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("9io5mvwev5td74rtkwnm8o3s2"); // opbb.LL.x = opbb.UR.x = inpts->x; UNSUPPORTED("4cwi4xd54tfe64lw7iegazb8u"); // opbb.LL.y = opbb.UR.y = inpts->y; UNSUPPORTED("79on93mttov53oge4afx7vsuc"); // for (i = 1; i < numpts; i++) { UNSUPPORTED("3ft3l1b2jpm88evrrzvlmn8e1"); // inpts++; UNSUPPORTED("1jkw7uv3v8c3h4n5wz0vz7ug7"); // if (inpts->x < opbb.LL.x) UNSUPPORTED("8heqoomogx0vbm9c6b353nauh"); // opbb.LL.x = inpts->x; UNSUPPORTED("ctlx14otfvxc1g2po12swqr5"); // else if (inpts->x > opbb.UR.x) UNSUPPORTED("cm99tuzk0ha0i27620s0ug6qm"); // opbb.UR.x = inpts->x; UNSUPPORTED("cbdkr3fvabha45e8zix3wm0ra"); // if (inpts->y < opbb.LL.y) UNSUPPORTED("cfi2hy5ra04w2nvwbbeif8iwu"); // opbb.LL.y = inpts->y; UNSUPPORTED("7i89xmuxwx6aon3vbdt6v5whc"); // else if (inpts->y > opbb.UR.y) UNSUPPORTED("7ssr5coatcfnn57zucbgjlgfc"); // opbb.UR.y = inpts->y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("vnhtdhcqg8xtzofq2hgzmd74"); // expandBB (bb, opbb.LL); UNSUPPORTED("17t235kr79n3w5l1c3anpgwt5"); // expandBB (bb, opbb.UR); UNSUPPORTED("cbril871fhn70vo8av8mkgt6q"); // return opbb; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9pymyll8xo6gubyh1lffjkfam // static boxf textBB (double x, double y, textspan_t* span) public static Object textBB(Object... arg) { UNSUPPORTED("d5qt6s97burjfu5qe0oxyyrmr"); // static boxf UNSUPPORTED("ay5ce8utx9ld287zwnwbctqjj"); // textBB (double x, double y, textspan_t* span) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("9uvgf08lwlxzhybxua7r75tev"); // pointf sz = span->size; UNSUPPORTED("bpqxh9mig0sh1gasrlkg6hbph"); // switch (span->just) { UNSUPPORTED("15tf5rbprgr65ucp24e4bba9t"); // case 'l': UNSUPPORTED("3ehk6wetysrhmdleh0z9s6zjz"); // bb.LL.x = x; UNSUPPORTED("c1lsp9mt50b64uby7n2an805t"); // bb.UR.x = bb.LL.x + sz.x; UNSUPPORTED("6qvptoliwn65n1ln7eoo4j8wd"); // break; UNSUPPORTED("37fbny64zwo23oymypyreuldc"); // case 'n': UNSUPPORTED("690ouuxs02oivip5twcvs5b11"); // bb.LL.x = x - sz.x / 2.0; UNSUPPORTED("2btku6pj5fxafqdz3xa85sd93"); // bb.UR.x = x + sz.x / 2.0; UNSUPPORTED("6qvptoliwn65n1ln7eoo4j8wd"); // break; UNSUPPORTED("8pu80wsk8me7q17ensqlviq86"); // case 'r': UNSUPPORTED("9hg1o01u12gavwtqe9xofe38z"); // bb.UR.x = x; UNSUPPORTED("bzx0k97ggr7q3araimvm6f1v7"); // bb.LL.x = bb.UR.x - sz.x; UNSUPPORTED("6qvptoliwn65n1ln7eoo4j8wd"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("197tcjynsl2sn03dwf3g9y12c"); // bb.UR.y = y + span->yoffset_layout; UNSUPPORTED("f2dg8t4khzpqdoaarum9tyuth"); // bb.LL.y = bb.UR.y - sz.y; UNSUPPORTED("5v5hh30squmit8o2i5hs25eig"); // return bb; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 54ihxujpi40cvxm21zvc4yygl // static void freePara (exdot_op* op) public static Object freePara(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("6j7qjd9yj32q85k9t0i4xidev"); // freePara (exdot_op* op) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dexpmz01x7t5bwrxs2ciihvod"); // if (op->op.kind == xd_text) UNSUPPORTED("8pgl92d45zuyooxxmo53bafei"); // free_textspan (op->span, 1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bna6lkyh9mx61k76gw3t0uflo // boxf xdotBB (Agraph_t* g) public static Object xdotBB(Object... arg) { UNSUPPORTED("8wvskez9r3noz1urymuwc4hvt"); // boxf xdotBB (Agraph_t* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("de8em3aa6r4le6z9745lpxlet"); // GVC_t *gvc = GD_gvc(g); UNSUPPORTED("6h54fnrtmztsxuhsa6imjz1a7"); // exdot_op* op; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("c5uzlkl44upygp10do07uxm0g"); // double fontsize = 0.0; UNSUPPORTED("casv8ugezf3t2g5a7mvcr6q7i"); // char* fontname = NULL; UNSUPPORTED("4vfngh2uewkmjri7btdwl43bs"); // pointf pts[2]; UNSUPPORTED("3zlnn621zia9mss7z1ay24myc"); // pointf sz; UNSUPPORTED("226wftslr130qjwxv1q4x2p4f"); // boxf bb0; UNSUPPORTED("2eiur8hkm8tcazpq12w4ikbqo"); // boxf bb = GD_bb(g); UNSUPPORTED("arw8znn5jqfqq2ukyt2s9kcbv"); // xdot* xd = (xdot*)GD_drawing(g)->xdots; UNSUPPORTED("aarb87wzm7tqwo5n1l925d21x"); // textfont_t tf, null_tf = {NULL,NULL,NULL,0.0,0,0}; UNSUPPORTED("8wytjfmy8k9op5hj7s6yf9n3z"); // int fontflags; UNSUPPORTED("eeh0uom1nsj9lpceinvwt6gi3"); // if (!xd) return bb; UNSUPPORTED("46up7fyvuyhtxo8wqaw9zdj3h"); // if ((bb.LL.x == bb.UR.x) && (bb.LL.y == bb.UR.y)) { UNSUPPORTED("5jqc951ribmsybqkbienxqmso"); // bb.LL.x = bb.LL.y = MAXDOUBLE; UNSUPPORTED("71c2mgloraxvejp5ao9v3simg"); // bb.UR.x = bb.UR.y = -MAXDOUBLE; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9go5curik6dnbejv5o2pj8ve2"); // op = (exdot_op*)(xd->ops); UNSUPPORTED("dvwaxn9xbj2jw2hjwvvs0tj3z"); // for (i = 0; i < xd->cnt; i++) { UNSUPPORTED("64ugcfa5jpvzxyig6y6rolvzb"); // tf = null_tf; UNSUPPORTED("ab1ajnetstzss8ksa66rwdtze"); // switch (op->op.kind) { UNSUPPORTED("1texeok1es39lsgo5wdppbco2"); // case xd_filled_ellipse : UNSUPPORTED("effcskuftros0sla2ltem13mh"); // case xd_unfilled_ellipse : UNSUPPORTED("2njikvu7tjbux5fxkdd45103i"); // pts[0].x = op->op.u.ellipse.x - op->op.u.ellipse.w; UNSUPPORTED("9mz7byklb9m0gvc8x9d7ksnr0"); // pts[0].y = op->op.u.ellipse.y - op->op.u.ellipse.h; UNSUPPORTED("90ewlrvkws79qrau49gy8es9l"); // pts[1].x = op->op.u.ellipse.x + op->op.u.ellipse.w; UNSUPPORTED("55l7hlnc89dkhu16ft92xg16q"); // pts[1].y = op->op.u.ellipse.y + op->op.u.ellipse.h; UNSUPPORTED("bneotzphmkyeas6debvmmon8u"); // op->bb.LL = pts[0]; UNSUPPORTED("956syiyurqle8isi3w4ljs7wn"); // op->bb.UR = pts[1]; UNSUPPORTED("7v3sk5uea7pu17t9pnjza0xk7"); // expandBB (&bb, pts[0]); UNSUPPORTED("dqzu6l172pawxz0l88wjbsq5x"); // expandBB (&bb, pts[1]); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("40fjmoej0qk9hwneja77jlo2y"); // case xd_filled_polygon : UNSUPPORTED("6uw61r6bh4tiicbj46yxr9t4k"); // case xd_unfilled_polygon : UNSUPPORTED("9962qomo41y1omsipfqjr24y8"); // op->bb = ptsBB (op->op.u.polygon.pts, op->op.u.polygon.cnt, &bb); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4eu4a2drbgdgq6xb3lnl3hn9y"); // case xd_filled_bezier : UNSUPPORTED("bn514k7swi4s6uclqqke583n8"); // case xd_unfilled_bezier : UNSUPPORTED("9962qomo41y1omsipfqjr24y8"); // op->bb = ptsBB (op->op.u.polygon.pts, op->op.u.polygon.cnt, &bb); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1l7ha9akoh6yew2v54hvu3del"); // case xd_polyline : UNSUPPORTED("9962qomo41y1omsipfqjr24y8"); // op->bb = ptsBB (op->op.u.polygon.pts, op->op.u.polygon.cnt, &bb); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("60mg8gze602593bf2vddicza0"); // case xd_text : UNSUPPORTED("50t9ohqv5008mknnbuwru8tw9"); // op->span = (textspan_t*)zmalloc(sizeof(textspan_t)); UNSUPPORTED("ctpfroyvq8upi1rvu07czeffu"); // op->span->str = strdup (op->op.u.text.text); UNSUPPORTED("clfgmfms6909nfbpqqf7rxx5f"); // op->span->just = adjust [op->op.u.text.align]; UNSUPPORTED("e2rt0ufps1ruahn7aijlrciss"); // tf.name = fontname; UNSUPPORTED("dh77fvkpvbx40iely5t866d6h"); // tf.size = fontsize; UNSUPPORTED("c1ted8bjs12be6jywuonnv0d2"); // tf.flags = fontflags; UNSUPPORTED("73o7k5irrg046co7k0hyc8aay"); // op->span->font = (*(((Dt_t*)(gvc->textfont_dt))->searchf))((gvc->textfont_dt),(void*)(&tf),0000001); UNSUPPORTED("6wqbzii0m490jqa70vqge95ss"); // sz = textspan_size (gvc, op->span); UNSUPPORTED("5fi8b3ht0cjvlehytid1q9v0c"); // bb0 = textBB (op->op.u.text.x, op->op.u.text.y, op->span); UNSUPPORTED("dzc3pvcqhus44n3qpjnche2n1"); // op->bb = bb0; UNSUPPORTED("dqaec6oh9n34envsvaj2cws50"); // expandBB (&bb, bb0.LL); UNSUPPORTED("4lyco5r149007xof0pltbc6yd"); // expandBB (&bb, bb0.UR); UNSUPPORTED("4ancwi87ybxfg7nqplm66fmcb"); // if (!xd->freefunc) UNSUPPORTED("euom952odxbs14o7zgilkcyjm"); // xd->freefunc = (freefunc_t)freePara; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("56n5nfs2z21zo7ac9z2ehf12l"); // case xd_font : UNSUPPORTED("758yjuz5lxvy105kkk178ecqc"); // fontsize = op->op.u.font.size; UNSUPPORTED("b47tnf0bsigh1pwzg0zn6hwmr"); // fontname = op->op.u.font.name; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("2kiqf0asbojt8x24lr5eykca1"); // case xd_fontchar : UNSUPPORTED("c1y0e85yacutsp89zjxoa7i3"); // fontflags = op->op.u.fontchar; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5ujjs4gho9mjjupbibyqyplxp"); // default : UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("42f106i435avz0oneb0fhe81f"); // op++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5v5hh30squmit8o2i5hs25eig"); // return bb; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 85uk85yiir9od6zij92agheo3 // static void init_gvc(GVC_t * gvc, graph_t * g) public static Object init_gvc(Object... arg) { UNSUPPORTED("67101m7ilw6rq5kq50kqyv4jn"); // static void init_gvc(GVC_t * gvc, graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1fbxoul2f22tyxwq8g4cj6bo6"); // double xf, yf; UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("8zmfa30bj4y52yk4nu6fzjg4a"); // gvc->g = g; UNSUPPORTED("ax64rv1jwwzs47pikcnl1j6vv"); // /* margins */ UNSUPPORTED("1b600jcjwmocj6dp4hx8dcbyt"); // gvc->graph_sets_margin = 0; UNSUPPORTED("1w3l4667jn9pi9aaxvt639rye"); // if ((p = agget(g, "margin"))) { UNSUPPORTED("8ii1lpvqnmj77k0q2xjan2dan"); // i = sscanf(p, "%lf,%lf", &xf, &yf); UNSUPPORTED("1e2qc8e42f9ohrllk7q5kbqh9"); // if (i > 0) { UNSUPPORTED("qbpuuttxxcxlbp802q1a4fsu"); // gvc->margin.x = gvc->margin.y = xf * 72; UNSUPPORTED("afqdselz7uxi22z0zlydrzlo1"); // if (i > 1) UNSUPPORTED("7col7tgqabkqwnzsc1m4i7zz3"); // gvc->margin.y = yf * 72; UNSUPPORTED("c3921i2dlk22b1p51jy3q34df"); // gvc->graph_sets_margin = NOT(0); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("733qr7bihsz4jlxdzv0x4v1n3"); // /* pad */ UNSUPPORTED("c4y9dph55ilj94mj5yjbabgqu"); // gvc->graph_sets_pad = 0; UNSUPPORTED("8vka83wlbomztn5m1dom8trfq"); // if ((p = agget(g, "pad"))) { UNSUPPORTED("8ii1lpvqnmj77k0q2xjan2dan"); // i = sscanf(p, "%lf,%lf", &xf, &yf); UNSUPPORTED("1e2qc8e42f9ohrllk7q5kbqh9"); // if (i > 0) { UNSUPPORTED("8vm798xe38aiaugd3y1g2aq1t"); // gvc->pad.x = gvc->pad.y = xf * 72; UNSUPPORTED("afqdselz7uxi22z0zlydrzlo1"); // if (i > 1) UNSUPPORTED("5nz9wezr9fh7hfzwoqgk11zm1"); // gvc->pad.y = yf * 72; UNSUPPORTED("d1m7j39edzq6lp1g0a8lnxyhf"); // gvc->graph_sets_pad = NOT(0); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("96riek1d0o8vwl70xmegernpv"); // /* pagesize */ UNSUPPORTED("298vt0zyw2i76g01fnol84jux"); // gvc->graph_sets_pageSize = 0; UNSUPPORTED("2shc43elsrp70a4k2u220ehox"); // gvc->pageSize = GD_drawing(g)->page; UNSUPPORTED("6evkjzqolfcsrv7tpqsm58o3h"); // if ((GD_drawing(g)->page.x > 0.001) && (GD_drawing(g)->page.y > 0.001)) UNSUPPORTED("fgxbok14dgt3z4b3nscl0p7n"); // gvc->graph_sets_pageSize = NOT(0); UNSUPPORTED("ecjhhm3qqdov34ahw0hdmnb1g"); // /* rotation */ UNSUPPORTED("2cxu41gtx0x2822685tf09ctd"); // if (GD_drawing(g)->landscape) UNSUPPORTED("cva8oucw05hmnqf4l4bk4dgfh"); // gvc->rotation = 90; UNSUPPORTED("4lti1w2qslxj3ihoatmbavsfr"); // else UNSUPPORTED("b4f4qufgjft6e4a4p7mkitiqv"); // gvc->rotation = 0; UNSUPPORTED("e5gxr3o07ghgvc4ucdwpjflcj"); // /* pagedir */ UNSUPPORTED("bb3h91bcfx7by4d3fyhmzdy2b"); // gvc->pagedir = "BL"; UNSUPPORTED("bpcvlnl6cfm6bjjupn4octi5k"); // if ((p = agget(g, "pagedir")) && p[0]) UNSUPPORTED("ajams0xdty7a7uuekgeid69r1"); // gvc->pagedir = p; UNSUPPORTED("e2g5l4w3c1x1gfmugldesjjqd"); // /* bounding box */ UNSUPPORTED("7tzs0wxbqa2wkozgqx08w4bau"); // gvc->bb = GD_bb(g); UNSUPPORTED("5hczsy1j61vmnr84wyz5bikya"); // /* clusters have peripheries */ UNSUPPORTED("clrndk7c262q4i7auu2yxaxbe"); // G_peripheries = (agattr(g,AGRAPH,"peripheries",NULL)); UNSUPPORTED("2kfixvhj3cpd8ixik3psbcfpe"); // G_penwidth = (agattr(g,AGRAPH,"penwidth",NULL)); UNSUPPORTED("2cwp5x6rqs985rs765vqqygae"); // /* default font */ UNSUPPORTED("e7ws06cub67fioowd2qb57bdq"); // gvc->defaultfontname = late_nnstring(NULL, UNSUPPORTED("7bozarsmoudzlhh3sw6pkg1h5"); // N_fontname, "Times-Roman"); UNSUPPORTED("58t4peku7cnyvnai2a20f5879"); // gvc->defaultfontsize = late_double(NULL, UNSUPPORTED("bbm0e0fv8warl1ji3fdc6yt6b"); // N_fontsize, 14.0, 1.0); UNSUPPORTED("5w09u9j3f1qfayfhrgj57ecba"); // /* default line style */ UNSUPPORTED("7qer3idmrdf9t80kv56o3uuss"); // gvc->defaultlinestyle = defaultlinestyle; UNSUPPORTED("4bhwcitlq1486x53gcbhloizr"); // gvc->graphname = agnameof(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9pyz8u3udm2aoyugcsto0kix5 // static void init_job_pad(GVJ_t *job) public static Object init_job_pad(Object... arg) { UNSUPPORTED("agxhh3hamzm2l90mq5ojrmfkv"); // static void init_job_pad(GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eyew5ay5wwktz4fysz0b78ugv"); // GVC_t *gvc = job->gvc; UNSUPPORTED("de4elc7zm79xniuphcxgyvvk9"); // if (gvc->graph_sets_pad) { UNSUPPORTED("aptzesoqv5uqgvgg0mc6kao5e"); // job->pad = gvc->pad; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("aj6nzz9d7a58djho9n52jx8yw"); // switch (job->output_lang) { UNSUPPORTED("b72lffvceole2ir7mpo7p336e"); // case 300: UNSUPPORTED("2j1zpsvat3akpjxygl2b8ttbg"); // job->pad.x = job->pad.y = job->render.features->default_pad; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("3w0qgk20xo9z7unk42folarn1"); // job->pad.x = job->pad.y = 4; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 f2syfb4rj7trco59aj1v5jm7b // static void init_job_margin(GVJ_t *job) public static Object init_job_margin(Object... arg) { UNSUPPORTED("a2o4lfoc2z821pg69j2xraq5h"); // static void init_job_margin(GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eyew5ay5wwktz4fysz0b78ugv"); // GVC_t *gvc = job->gvc; UNSUPPORTED("7jaj0gwqx6io2udyixmrzcc1z"); // if (gvc->graph_sets_margin) { UNSUPPORTED("4snswj683owzbho4jjotw970l"); // job->margin = gvc->margin; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("za5jq2evnfd3fbn96g250vy9"); // /* set default margins depending on format */ UNSUPPORTED("ampzlf94vv6frsr0uc6d017f6"); // switch (job->output_lang) { UNSUPPORTED("aul67kwcbtvgyy4b36yxw76ou"); // case 300: UNSUPPORTED("e4ovq7tj6z354n1fhbnxfzufe"); // job->margin = job->device.features->default_margin; UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("2jhp1005lxz99z1pc9syee424"); // case 2: case 3: case 4: case 22: case 21: case 30: UNSUPPORTED("9mg8oo60qykyf8i35w2raa26p"); // job->margin.x = job->margin.y = 36; UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("p0mt8wznalavjdm44ot4ykl7"); // default: UNSUPPORTED("5l3hvgkkpuhcf4cohs28abhtz"); // job->margin.x = job->margin.y = 0; UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8g64hepne35gexv6ju81tbqc3 // static void init_job_dpi(GVJ_t *job, graph_t *g) public static Object init_job_dpi(Object... arg) { UNSUPPORTED("2p6nt5vob0ei8v7773p5tdecd"); // static void init_job_dpi(GVJ_t *job, graph_t *g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8m7r6h2rw1gx6dc2436egqiay"); // GVJ_t *firstjob = job->gvc->active_jobs; UNSUPPORTED("brb2vqrp3wxbej2f8h8oo3dcq"); // if (GD_drawing(g)->dpi != 0) { UNSUPPORTED("dt9qdoazpes90xzueapuxxspa"); // job->dpi.x = job->dpi.y = (double)(GD_drawing(g)->dpi); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6upj4lbia39c7c7hd9vsvv8b8"); // else if (firstjob && firstjob->device_sets_dpi) { UNSUPPORTED("7mtrejna32wqb64ec8s1hvrgt"); // job->dpi = firstjob->device_dpi; /* some devices set dpi in initialize() */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("za5jq2evnfd3fbn96g250vy9"); // /* set default margins depending on format */ UNSUPPORTED("ampzlf94vv6frsr0uc6d017f6"); // switch (job->output_lang) { UNSUPPORTED("aul67kwcbtvgyy4b36yxw76ou"); // case 300: UNSUPPORTED("azl3hjq4ji3la2pi9cndx1k3e"); // job->dpi = job->device.features->default_dpi; UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("p0mt8wznalavjdm44ot4ykl7"); // default: UNSUPPORTED("7g69tkl1he21l042jkugrqp6o"); // job->dpi.x = job->dpi.y = (double)(DEFAULT_DPI); UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4q75k0eh9opws0n4g4hucx21k // static void init_job_viewport(GVJ_t * job, graph_t * g) public static Object init_job_viewport(Object... arg) { UNSUPPORTED("624efhjg4wk3vw59b77itfyvo"); // static void init_job_viewport(GVJ_t * job, graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eyew5ay5wwktz4fysz0b78ugv"); // GVC_t *gvc = job->gvc; UNSUPPORTED("6i2nacyhq49omlq45m07qui2g"); // pointf LL, UR, size, sz; UNSUPPORTED("du235xtc4birmdt1yr7ce3jpv"); // double X, Y, Z, x, y; UNSUPPORTED("ecz4e03zumggc8tfymqvirexq"); // int rv; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("adc06gp2568j6zfk5jqvbfo2y"); // char *str, *nodename = NULL, *junk = NULL; UNSUPPORTED("cibtljruio32e5gvrl87lh88l"); // UR = gvc->bb.UR; UNSUPPORTED("5vjounfbnwwcy8tbj300r79r2"); // LL = gvc->bb.LL; UNSUPPORTED("50ygg0dkfzxllsg7k6fe56huy"); // job->bb.LL.x = LL.x - job->pad.x; /* job->bb is bb of graph and padding - graph units */ UNSUPPORTED("49aqo5a8zzjcw7blnfu1d31q4"); // job->bb.LL.y = LL.y - job->pad.y; UNSUPPORTED("b3wmaft4mjah5tibmxgrds6eg"); // job->bb.UR.x = UR.x + job->pad.x; UNSUPPORTED("80w280ro0p0cugy34wuqzbsh9"); // job->bb.UR.y = UR.y + job->pad.y; UNSUPPORTED("6w6xt2yb2jn5st0s2quady6io"); // sz.x = job->bb.UR.x - job->bb.LL.x; /* size, including padding - graph units */ UNSUPPORTED("99nzl03ckbymw5ajsxg2lxf5v"); // sz.y = job->bb.UR.y - job->bb.LL.y; UNSUPPORTED("2mgynwyvee3ie46hpl26kqtf2"); // /* determine final drawing size and scale to apply. */ UNSUPPORTED("753yoijk60817tp79pq00vr0m"); // /* N.B. size given by user is not rotated by landscape mode */ UNSUPPORTED("ag04g63wularfd1fbljawhkqj"); // /* start with "natural" size of layout */ UNSUPPORTED("637m663yod0dkbreevp6qk44p"); // Z = 1.0; UNSUPPORTED("c8oufh828idctovprrgjdm0os"); // if (GD_drawing(g)->size.x > 0.001 && GD_drawing(g)->size.y > 0.001) { /* graph size was given by user... */ UNSUPPORTED("bmz1dbirkeldxm62ak0co2qrb"); // size = GD_drawing(g)->size; UNSUPPORTED("6qb7wsi1h19gy3dx25dsrf542"); // if (sz.x == 0) sz.x = size.x; UNSUPPORTED("3o8bk5rxvc9z3ttlp9sr2qn4s"); // if (sz.y == 0) sz.y = size.y; UNSUPPORTED("46ob9e3vmgm08hjtxp6tfvhoz"); // if ((size.x < sz.x) || (size.y < sz.y) /* drawing is too big (in either axis) ... */ UNSUPPORTED("5auolwo9gg1phxl3qsyuubbu1"); // || ((GD_drawing(g)->filled) /* or ratio=filled requested and ... */ UNSUPPORTED("9x8rozkks9tk12it75o6ejh9"); // && (size.x > sz.x) && (size.y > sz.y))) /* drawing is too small (in both axes) ... */ UNSUPPORTED("745ba2myf8zykpw51eip22lxr"); // Z = MIN(size.x/sz.x, size.y/sz.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("62gog7hki8holy1wdxok8ii3s"); // /* default focus, in graph units = center of bb */ UNSUPPORTED("eh4upvvzpvb3b2hlopix62qvx"); // x = (LL.x + UR.x) / 2.; UNSUPPORTED("8mdsmfdv26en9t0wke5lj3yoe"); // y = (LL.y + UR.y) / 2.; UNSUPPORTED("cb0lygghq98c5tsuyl02ecakn"); // /* rotate and scale bb to give default absolute size in points*/ UNSUPPORTED("7y4ysg5hih6aou07wc3jxhb35"); // job->rotation = job->gvc->rotation; UNSUPPORTED("1tcvgfcsior9vxwosbtysfoyl"); // X = sz.x * Z; UNSUPPORTED("7rvjwv9lldh8cdbpwf2e5b4em"); // Y = sz.y * Z; UNSUPPORTED("7mjigzchm03dvse5yty9697ik"); // /* user can override */ UNSUPPORTED("bbb4aunqlxn7ymn473u9tfjh2"); // if ((str = agget(g, "viewport"))) { UNSUPPORTED("70923c97qwh5i4mk8teckxbg"); // nodename = malloc(strlen(str)+1); UNSUPPORTED("axxbey14epctt08bqmg4e4ljx"); // junk = malloc(strlen(str)+1); UNSUPPORTED("4nbqjt16sk1g61qjzmyth3m3y"); // rv = sscanf(str, "%lf,%lf,%lf,\'%[^\']\'", &X, &Y, &Z, nodename); UNSUPPORTED("8azqq8b6xz6pe75pwuu92bkis"); // if (rv == 4) { UNSUPPORTED("6vgu6qnrol7hlgg01x8iopat1"); // n = (agnode(g->root,nodename,0)); UNSUPPORTED("5m395o1mab9my7pgd1wtfpkt4"); // if (n) { UNSUPPORTED("54io2bm3l9lajfo4g3z58eg1t"); // x = ND_coord(n).x; UNSUPPORTED("9woodb3r1ali6shtfkh2rz8h2"); // y = ND_coord(n).y; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("s1rt11h530ot4w6oo53nl5ui"); // rv = sscanf(str, "%lf,%lf,%lf,%[^,]%s", &X, &Y, &Z, nodename, junk); UNSUPPORTED("4kcpjq4bw60ex3z1ewxgr1mjw"); // if (rv == 4) { UNSUPPORTED("874kb6l4r88vgo7isombaflpy"); // n = (agnode(g->root,nodename,0)); UNSUPPORTED("a2kqxh7ugzx0wm2vq2kbx20y7"); // if (n) { UNSUPPORTED("9qhwk8hw3vgr1m1rzg5atx1zk"); // x = ND_coord(n).x; UNSUPPORTED("e4zoymn2c1bi9un0aj7x2plqm"); // y = ND_coord(n).y; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("2s114kzoj9bs4dyo9fxw68w0t"); // rv = sscanf(str, "%lf,%lf,%lf,%lf,%lf", &X, &Y, &Z, &x, &y); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("blr8vtykke5kreaxyos1zlb97"); // free (nodename); UNSUPPORTED("2pd0mx508kg0shcwmffjkyxc4"); // free (junk); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7bmnorp8hdilbzb9xmgr16rs5"); // /* rv is ignored since args retain previous values if not scanned */ UNSUPPORTED("c22q6sbjdy7erjlxyrdanr1x3"); // /* job->view gives port size in graph units, unscaled or rotated UNSUPPORTED("eb5vhw8ufy0hgbridh6g2vao9"); // * job->zoom gives scaling factor. UNSUPPORTED("f4zt60wq4jiuahkpno3xurcl7"); // * job->focus gives the position in the graph of the center of the port UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("asnqk2ep45wun0a0przl141qw"); // job->view.x = X; UNSUPPORTED("98ffy6ki313rluvwb97rnvig9"); // job->view.y = Y; UNSUPPORTED("2lcv08icuvjg8b9dwsdpqqold"); // job->zoom = Z; /* scaling factor */ UNSUPPORTED("3pf2n1wcp8dwhgr0dom3f5c5y"); // job->focus.x = x; UNSUPPORTED("d40e8u3927lyzr1i1eodxb5ip"); // job->focus.y = y; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cixyhqk69srhxgi3264xh8v68 // static void emit_cluster_colors(GVJ_t * job, graph_t * g) public static Object emit_cluster_colors(Object... arg) { UNSUPPORTED("4do3kncw83okg157mdqb1rtct"); // static void emit_cluster_colors(GVJ_t * job, graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5wyi0wasd5kecf6rhsqdjk7v2"); // graph_t *sg; UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c; UNSUPPORTED("76nok3eiyr33qf4ecv69ujxn6"); // char *str; UNSUPPORTED("99d9j6m0161wdv2tu4wbf3ifi"); // for (c = 1; c <= GD_n_cluster(g); c++) { UNSUPPORTED("cuf43q4kl3kqgyuuxdqve1mqt"); // sg = GD_clust(g)[c]; UNSUPPORTED("eior21tu8n3jvwp0uvojvs0f9"); // emit_cluster_colors(job, sg); UNSUPPORTED("9obyty3pjddtipkl1momqv3h5"); // if (((str = agget(sg, "color")) != 0) && str[0]) UNSUPPORTED("6095vphn778u0cj7bwv5weas7"); // gvrender_set_pencolor(job, str); UNSUPPORTED("497nfxb4jva1q66gyzxn4skpv"); // if (((str = agget(sg, "pencolor")) != 0) && str[0]) UNSUPPORTED("6095vphn778u0cj7bwv5weas7"); // gvrender_set_pencolor(job, str); UNSUPPORTED("70ojemxfr6iv12m0fxcxdg0bp"); // if (((str = agget(sg, "bgcolor")) != 0) && str[0]) UNSUPPORTED("6095vphn778u0cj7bwv5weas7"); // gvrender_set_pencolor(job, str); UNSUPPORTED("cdl50xso69xffobr8d9xfkxez"); // if (((str = agget(sg, "fillcolor")) != 0) && str[0]) UNSUPPORTED("1a63r7ud39pu64tbombwke5j6"); // gvrender_set_fillcolor(job, str); UNSUPPORTED("a5y2a7fa23tghirfggvztwunc"); // if (((str = agget(sg, "fontcolor")) != 0) && str[0]) UNSUPPORTED("6095vphn778u0cj7bwv5weas7"); // gvrender_set_pencolor(job, str); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6z2ta8nxn4szbpjidikrdzjd2 // static void emit_colors(GVJ_t * job, graph_t * g) public static Object emit_colors(Object... arg) { UNSUPPORTED("60y3484rmpjm7xlt67j7mdl4"); // static void emit_colors(GVJ_t * job, graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("85i6qyzcmdaf9l7uvotaz8nlu"); // char *str, *colors; UNSUPPORTED("c7ds3utacpnq14lyij0jurwb4"); // gvrender_set_fillcolor(job, "lightgrey"); UNSUPPORTED("1lp6a62t425k9v01z810wrp7b"); // if (((str = agget(g, "bgcolor")) != 0) && str[0]) UNSUPPORTED("34u8f5cr333f4sprskexyebpp"); // gvrender_set_fillcolor(job, str); UNSUPPORTED("56twc8sam9h8hr3clpxijei6p"); // if (((str = agget(g, "fontcolor")) != 0) && str[0]) UNSUPPORTED("6uvs8it1wts6hypu32nx4owck"); // gvrender_set_pencolor(job, str); UNSUPPORTED("bikc4jaduha3tdbl9ci5qcrq5"); // emit_cluster_colors(job, g); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("dnan5xu2dkpu7sl1b03ahndx"); // if (((str = agget(n, "color")) != 0) && str[0]) UNSUPPORTED("6095vphn778u0cj7bwv5weas7"); // gvrender_set_pencolor(job, str); UNSUPPORTED("7zwodk0er4swr49op7lbvckmu"); // if (((str = agget(n, "pencolor")) != 0) && str[0]) UNSUPPORTED("1a63r7ud39pu64tbombwke5j6"); // gvrender_set_fillcolor(job, str); UNSUPPORTED("7jynqpniz3o3a1uxq7wr68b3q"); // if (((str = agget(n, "fillcolor")) != 0) && str[0]) { UNSUPPORTED("2zkeug16gnaam15be1glq0d41"); // if (strchr(str, ':')) { UNSUPPORTED("zgs1bnae9v7jn6nvqwuf2unh"); // colors = strdup(str); UNSUPPORTED("65cuya3pzizp1x4mn7jdufwrd"); // for (str = strtok(colors, ":"); str; UNSUPPORTED("3pjrrvuvl7stxcg84h491n5qg"); // str = strtok(0, ":")) { UNSUPPORTED("bxlc2ohnhd7goi002fh9vwmuf"); // if (str[0]) UNSUPPORTED("a83f0af7up943bqeqb4ktss9t"); // gvrender_set_pencolor(job, str); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("1gvispqysaotaxpswiriasys2"); // free(colors); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("97osvej5vqjmf4a6du709am4f"); // gvrender_set_pencolor(job, str); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("gmm6wp0dtyc0tsmtzu5if62t"); // if (((str = agget(n, "fontcolor")) != 0) && str[0]) UNSUPPORTED("6095vphn778u0cj7bwv5weas7"); // gvrender_set_pencolor(job, str); UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("bcwa1u39hsu389fzlp0d4l21f"); // if (((str = agget(e, "color")) != 0) && str[0]) { UNSUPPORTED("4efctxbb4wq0ep3hzlpkaz7ue"); // if (strchr(str, ':')) { UNSUPPORTED("5vhkpar2tw6xtzhthkurydd1f"); // colors = strdup(str); UNSUPPORTED("aiy80oj5zipifrkb47xkmftsr"); // for (str = strtok(colors, ":"); str; UNSUPPORTED("6krlp42os46gl8wai0xgvb6kw"); // str = strtok(0, ":")) { UNSUPPORTED("cnbqptqtolqfv8ldin52nlvx0"); // if (str[0]) UNSUPPORTED("cogpzraxmtn5x26pbzrmt64ow"); // gvrender_set_pencolor(job, str); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("9eduqn5owyzon5mdfrfajror6"); // free(colors); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("13h4fpjj7vkimtrsq5l5siic1"); // gvrender_set_pencolor(job, str); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("33tragnfqd9eqgqdst6rty8gp"); // if (((str = agget(e, "fontcolor")) != 0) && str[0]) UNSUPPORTED("97osvej5vqjmf4a6du709am4f"); // gvrender_set_pencolor(job, str); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dlue7nzn2pfskq2p54b34b488 // static void emit_view(GVJ_t * job, graph_t * g, int flags) public static Object emit_view(Object... arg) { UNSUPPORTED("5imanth4uju8cetckpnvqvzub"); // static void emit_view(GVJ_t * job, graph_t * g, int flags) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c00osdfe9g1arquj6clfdrh3e"); // GVC_t * gvc = job->gvc; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("csndbis67mjcboadb9c3vccda"); // gvc->common.viewNum++; UNSUPPORTED("586npexnnd5vijp8l2yb7kv6i"); // /* when drawing, lay clusters down before nodes and edges */ UNSUPPORTED("8rgrpr4idg5l73bbih7wy6xuh"); // if (!(flags & (1<<2))) UNSUPPORTED("5gnlxmhx15pwjdqb1bv6lj9q1"); // emit_clusters(job, g, flags); UNSUPPORTED("8odxjg9o1tr8v6pqudnrplweo"); // if (flags & (1<<0)) { UNSUPPORTED("2xnyatu1c43zijt16ke1g4gg9"); // /* output all nodes, then all edges */ UNSUPPORTED("24iil9cfhuxvvzbkepuax0fq8"); // gvrender_begin_nodes(job); UNSUPPORTED("eg21iwn9eqyjsoisl58nl8i36"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("21cc1ilu48o079xze4a4zj021"); // emit_node(job, n); UNSUPPORTED("bwt97v7vxmudd2nrehidk4f20"); // gvrender_end_nodes(job); UNSUPPORTED("3vzktz5re4ifmdiynmy5l85h9"); // gvrender_begin_edges(job); UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("8wpryg13apwpccvklympyeyqu"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) UNSUPPORTED("egbuqrd3oowt73ihe2c07hylx"); // emit_edge(job, e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7pirwyfpglg7wt4glc4zlfvz"); // gvrender_end_edges(job); UNSUPPORTED("aj09npfwn78tl31m397v0s50r"); // } else if (flags & (1<<4)) { UNSUPPORTED("clvp13zubjxry8l8nesv79xjl"); // /* output all edges, then all nodes */ UNSUPPORTED("3vzktz5re4ifmdiynmy5l85h9"); // gvrender_begin_edges(job); UNSUPPORTED("eg21iwn9eqyjsoisl58nl8i36"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("8wpryg13apwpccvklympyeyqu"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) UNSUPPORTED("egbuqrd3oowt73ihe2c07hylx"); // emit_edge(job, e); UNSUPPORTED("7pirwyfpglg7wt4glc4zlfvz"); // gvrender_end_edges(job); UNSUPPORTED("24iil9cfhuxvvzbkepuax0fq8"); // gvrender_begin_nodes(job); UNSUPPORTED("eg21iwn9eqyjsoisl58nl8i36"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("21cc1ilu48o079xze4a4zj021"); // emit_node(job, n); UNSUPPORTED("bwt97v7vxmudd2nrehidk4f20"); // gvrender_end_nodes(job); UNSUPPORTED("3v872xkvak5nthxntrmy679dt"); // } else if (flags & (1<<3)) { UNSUPPORTED("24iil9cfhuxvvzbkepuax0fq8"); // gvrender_begin_nodes(job); UNSUPPORTED("eg21iwn9eqyjsoisl58nl8i36"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("enqvgohrxvf10ccw4y4r96nkf"); // if (write_node_test(g, n)) UNSUPPORTED("1bzj2os22s6b3tf899bpkde6t"); // emit_node(job, n); UNSUPPORTED("bwt97v7vxmudd2nrehidk4f20"); // gvrender_end_nodes(job); UNSUPPORTED("3vzktz5re4ifmdiynmy5l85h9"); // gvrender_begin_edges(job); UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("7yvyv13me3s32qvq3gfbyt283"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("2fgkqy3hjpj9eo76nnctdhelj"); // if (write_edge_test(g, e)) UNSUPPORTED("auj2mo2tz3uf10zjkza14e82k"); // emit_edge(job, e); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7pirwyfpglg7wt4glc4zlfvz"); // gvrender_end_edges(job); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("2638u64adcw68h4iekta3woqj"); // /* output in breadth first graph walk order */ UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("21cc1ilu48o079xze4a4zj021"); // emit_node(job, n); UNSUPPORTED("7yvyv13me3s32qvq3gfbyt283"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("6a94yfoszisanhlfhbgaagm7b"); // emit_node(job, aghead(e)); UNSUPPORTED("egbuqrd3oowt73ihe2c07hylx"); // emit_edge(job, e); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1rit427sa8udvzo3k42t9iha0"); // /* when mapping, detect events on clusters after nodes and edges */ UNSUPPORTED("1nky1gj4525b4130zqg4jg6ah"); // if (flags & (1<<2)) UNSUPPORTED("5gnlxmhx15pwjdqb1bv6lj9q1"); // emit_clusters(job, g, flags); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dk8gj6u142q8vgup6ar9ruysc // static void emit_begin_graph(GVJ_t * job, graph_t * g) public static Object emit_begin_graph(Object... arg) { UNSUPPORTED("5njsnfg1w96wtvkzxnnx79oze"); // static void emit_begin_graph(GVJ_t * job, graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8lamppsqs7nhiu5v8k1f5jfh2"); // obj_state_t *obj; UNSUPPORTED("1iexddadjo0w6fdgddatfx40s"); // obj = push_obj_state(job); UNSUPPORTED("7ihakbkozgh3iuzyjmmhyh6k3"); // obj->type = ROOTGRAPH_OBJTYPE; UNSUPPORTED("9ud9itr2e77p4owess7q8718d"); // obj->u.g = g; UNSUPPORTED("5pf0fco1plw3oedj6uzq7uimr"); // obj->emit_state = EMIT_GDRAW; UNSUPPORTED("bg4pso3sflig43odlnhxv7hak"); // initObjMapData (job, GD_label(g), g); UNSUPPORTED("e44aso60solubotswg1yr8un"); // gvrender_begin_graph(job, g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3nhn5596nwxutoyrm6tsxwvbd // static void emit_end_graph(GVJ_t * job, graph_t * g) public static Object emit_end_graph(Object... arg) { UNSUPPORTED("e5oluojkvyfuqdu97u95cqg3w"); // static void emit_end_graph(GVJ_t * job, graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1n9wfd0yho4z5950kfzq1f6y5"); // gvrender_end_graph(job); UNSUPPORTED("39iamwq9cd9iv3d2iyiaq8gz9"); // pop_obj_state(job); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9to165vrtas68afpbjdprx2vd // static void emit_page(GVJ_t * job, graph_t * g) public static Object emit_page(Object... arg) { UNSUPPORTED("di1dvfa15xs9rx182756djgqg"); // static void emit_page(GVJ_t * job, graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("6662g2itnb2i3tqvhvnkpfe2f"); // int nump = 0, flags = job->flags; UNSUPPORTED("1ikkkd5pukqwffmu5mtak47js"); // textlabel_t *lab; UNSUPPORTED("wv6e6kkgh4jw93f4dlmoozok"); // pointf *p = NULL; UNSUPPORTED("6xn8wrm21858wn8m5cu76e7k6"); // char* saveid; UNSUPPORTED("h0or3v13348vfl22jqz895yc"); // unsigned char buf[128]; UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("c4vh2q9zpipty999dty5nvmpm"); // /* For the first page, we can use the values generated in emit_begin_graph. UNSUPPORTED("2rctyueh35ne2pj7qe3nbgj64"); // * For multiple pages, we need to generate a new id. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("1p2sfiuz204i105cwxgsww1g7"); // if ((((job)->layerNum>1)||((job)->pagesArrayElem.x > 0)||((job)->pagesArrayElem.x > 0))) { UNSUPPORTED("el1z2krv8hoorc5c7vjsxw7yn"); // agxbinit(&xb, 128, buf); UNSUPPORTED("288ufw5rels1yxspvgtsyk3ve"); // saveid = obj->id; UNSUPPORTED("dly1rpg3t74a0cgwq5m4vdfir"); // layerPagePrefix (job, &xb); UNSUPPORTED("9vff0t827i9c1drbwcuxv66vl"); // agxbput (&xb, saveid); UNSUPPORTED("7fsfc9wkigjp8e60ca77krp4q"); // obj->id = (((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("5cjdy9xrlft2fd3m8c4wfxvn0"); // saveid = NULL; UNSUPPORTED("3glknrzusaw84wts2i8rbn2cq"); // setColorScheme (agget (g, "colorscheme")); UNSUPPORTED("7n40v0iw6f6evriibhioqu7ts"); // setup_page(job, g); UNSUPPORTED("8xm4n85i531jwobi44phtf4ir"); // gvrender_begin_page(job); UNSUPPORTED("e7x5ptqcyrjeve73rf3hjhuhn"); // gvrender_set_pencolor(job, "black"); UNSUPPORTED("c7ds3utacpnq14lyij0jurwb4"); // gvrender_set_fillcolor(job, "lightgrey"); UNSUPPORTED("8k7npuk2pg2np42cu63aachgc"); // if ((flags & ((1<<16) | (1<<22))) UNSUPPORTED("cjxb7soy84ukfc9btgpgb20qv"); // && (obj->url || obj->explicit_tooltip)) { UNSUPPORTED("bdk6hu2yhmni45qx7umzxcygk"); // if (flags & ((1<<17) | (1<<19))) { UNSUPPORTED("9cwsuo4ejz94kt28xa30z24o4"); // if (flags & (1<<17)) { UNSUPPORTED("4rlzy2etw4nk635bj5t9ru8p8"); // obj->url_map_shape = MAP_RECTANGLE; UNSUPPORTED("c4ypp4cr8076ye8m20un6b1r0"); // nump = 2; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("ei9dbrwfxqj4zzq5goyjrp35m"); // obj->url_map_shape = MAP_POLYGON; UNSUPPORTED("bc2bgfqrx6wr17fw3ipheaxt3"); // nump = 4; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("1ubuo1fytrqcvpt7d5d82uhus"); // p = (pointf*)zmalloc((nump)*sizeof(pointf)); UNSUPPORTED("7mbkf7uj9kru8y0p4vqwvqcuz"); // p[0] = job->pageBox.LL; UNSUPPORTED("6r0id695rza6fkyms76whk4iv"); // p[1] = job->pageBox.UR; UNSUPPORTED("bt5khrnbcnl2rast8s6f5hsb3"); // if (! (flags & ((1<<17)))) UNSUPPORTED("32e1sy1ya6lb3qmnvfchmljx6"); // rect2poly(p); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cnadzqqicrskcdzko360llcg5"); // if (! (flags & (1<<13))) UNSUPPORTED("8bpnq0a8qri3cve2qymb5tdyk"); // gvrender_ptf_A(job, p, p, nump); UNSUPPORTED("e4cpy14h8m2l16mjqadzsk89g"); // obj->url_map_p = p; UNSUPPORTED("evxoqe3dfgjf7bsm11ipkr8uc"); // obj->url_map_n = nump; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6le9aolkoakj39i518xz8m4mp"); // if ((flags & (1<<15)) && ((lab = GD_label(g)))) UNSUPPORTED("ear31tm0c4wpfnpcaoecqkfs3"); // /* do graph label on every page and rely on clipping to show it on the right one(s) */ UNSUPPORTED("1sy2sk1asrfkgl0880y6kmloo"); // obj->label = lab->text; UNSUPPORTED("5r6tugfy15ojg2zla1xfnbmfc"); // /* If EMIT_CLUSTERS_LAST is set, we assume any URL or tooltip UNSUPPORTED("33ajxgdgcy9ya7o2qo3545kjz"); // * attached to the root graph is emitted either in begin_page UNSUPPORTED("8oq67ru65jsrltrbkpicoq60r"); // * or end_page of renderer. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("b465fu7r28ccnhoa0uvk6txhm"); // if (!(flags & (1<<2)) && (obj->url || obj->explicit_tooltip)) { UNSUPPORTED("874x9mgt9apdota54iarnz9v1"); // emit_map_rect(job, job->clip); UNSUPPORTED("5dgsg5nmc05yy1ape6ses927z"); // gvrender_begin_anchor(job, obj->url, obj->tooltip, obj->target, obj->id); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4h1kjxw1u80nnonna7i2zuoec"); // /* if (numPhysicalLayers(job) == 1) */ UNSUPPORTED("2vh3blbhjrzadv1wr6ru210tj"); // emit_background(job, g); UNSUPPORTED("aplr7sm051i57jygcfj6gigoh"); // if (GD_label(g)) UNSUPPORTED("ett9sr8mbs57jfjk6eqf66ood"); // emit_label(job, EMIT_GLABEL, GD_label(g)); UNSUPPORTED("abgvf32lk9jxduwyafzp9fn6r"); // if (!(flags & (1<<2)) && (obj->url || obj->explicit_tooltip)) UNSUPPORTED("e3o6yrnsv8lko5fql4f8a9gly"); // gvrender_end_anchor(job); UNSUPPORTED("ckjdhy2wwekw6raq99m9r1wwe"); // emit_view(job,g,flags); UNSUPPORTED("90q0ssftdvmcofopllyikqw70"); // gvrender_end_page(job); UNSUPPORTED("ba2uwvbdk3mubgsfak0882ay6"); // if (saveid) { UNSUPPORTED("52frst03mcbsuu6bmnqs962qm"); // agxbfree(&xb); UNSUPPORTED("9z28bgnq8rla75dmcugnyi4ql"); // obj->id = saveid; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 87nutd480deekxln7o14or4vo // void emit_graph(GVJ_t * job, graph_t * g) public static Object emit_graph(Object... arg) { UNSUPPORTED("3bmd2hvgnq1fcmgpxtam9hsx0"); // void emit_graph(GVJ_t * job, graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("8yytudftst76763qgnjebkzhm"); // char *s; UNSUPPORTED("12bpksga44s9sfl7x8xn2rt2k"); // int flags = job->flags; UNSUPPORTED("9q16e0ya19gm18zkyq7str796"); // int* lp; UNSUPPORTED("3aho54lnlpjyvy4ud87k3xnt1"); // /* device dpi is now known */ UNSUPPORTED("drdz8zf1napfd9649xa2vvoui"); // job->scale.x = job->zoom * job->dpi.x / 72; UNSUPPORTED("esbjlmqb7gaaf3pfsa89lgev"); // job->scale.y = job->zoom * job->dpi.y / 72; UNSUPPORTED("ag4tx55kpqxgiqh97rx32q22l"); // job->devscale.x = job->dpi.x / 72; UNSUPPORTED("7t3liq77ckb4jbxzzkuvpenqu"); // job->devscale.y = job->dpi.y / 72; UNSUPPORTED("d3hdv8k8yieahljfu3qt853ud"); // if ((job->flags & (1<<12)) || (Y_invert)) UNSUPPORTED("dhkndrjvudfzh9rih1bg17gz3"); // job->devscale.y *= -1; UNSUPPORTED("7q82xx3mn6mih80ewhar8lg0g"); // /* compute current view in graph units */ UNSUPPORTED("3h1yo631e2fq69mxwoggya716"); // if (job->rotation) { UNSUPPORTED("b9r25eu40lq0rhgqpis89rji8"); // job->view.y = job->width / job->scale.y; UNSUPPORTED("6a6udj0vxgy2ylquj5qgi0v5y"); // job->view.x = job->height / job->scale.x; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("6v8ftcsv837e27gwxszngvin2"); // job->view.x = job->width / job->scale.x; UNSUPPORTED("49fsot485en3t7beaufx5qicy"); // job->view.y = job->height / job->scale.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("du7kz5k6s1p26hnk6fqj746mu"); // s = late_string(g, agattr(g, AGRAPH, "comment", 0), ""); UNSUPPORTED("5td7tli30j1zl1fgvmy30blpa"); // gvrender_comment(job, s); UNSUPPORTED("b6bxtnfqf846y3t3131e0p4d0"); // job->layerNum = 0; UNSUPPORTED("7ky2s7fpgwjuqrftlhyowbq7q"); // emit_begin_graph(job, g); UNSUPPORTED("9saz20f1su2m7mwo82xf6hqc7"); // if (flags & (1<<1)) UNSUPPORTED("5ay1uey9mpe77501hacs5cu3c"); // emit_colors(job,g); UNSUPPORTED("f36txx1tdgu50b4nkh20skis"); // /* reset node state */ UNSUPPORTED("16hw9gw0dz2w7mrtba0eoqrdi"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("9jg6tdwrn007w9odzq2qc6zdy"); // ND_state(n) = 0; UNSUPPORTED("1xhln25szyh2h4t7ccsprle9"); // /* iterate layers */ UNSUPPORTED("4nvgbfw6y1185pj4e8h7daw79"); // for (firstlayer(job,&lp); validlayer(job); nextlayer(job,&lp)) { UNSUPPORTED("bn0m6u9dix50gpbajrfezpgua"); // if (numPhysicalLayers (job) > 1) UNSUPPORTED("35ib30gs09z3uwjvjoju5mpm2"); // gvrender_begin_layer(job); UNSUPPORTED("3b9ro4joid217f74xv0vx23ox"); // /* iterate pages */ UNSUPPORTED("5h2vy2qmsot0bw099k6zh72gd"); // for (firstpage(job); validpage(job); nextpage(job)) UNSUPPORTED("f0wsoynbdz170hyw1cg27wfte"); // emit_page(job, g); UNSUPPORTED("bn0m6u9dix50gpbajrfezpgua"); // if (numPhysicalLayers (job) > 1) UNSUPPORTED("2v3s6ab0rugrq7jsmzwh0cop0"); // gvrender_end_layer(job); UNSUPPORTED("3xbu5lb3fe5zgccq9vbjk3kln"); // } UNSUPPORTED("580k35rndifpvngdh5ih6za8j"); // emit_end_graph(job, g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8drr2f8zs3soqc2sosnio8pzh // static void free_string_entry(Dict_t * dict, char *key, Dtdisc_t * disc) public static Object free_string_entry(Object... arg) { UNSUPPORTED("5fw7dopfefym7l730mi9nupmb"); // static void free_string_entry(Dict_t * dict, char *key, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3a76j29jy9as91ppatk4njqfj"); // free(key); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 bh276mpp135v0h4xcw5xq7dw0 // static Dict_t *strings //1 b145hfewfupd0yod069hevlar // static Dtdisc_t stringdict = //3 2akcqhxfjsryfaxqftz8ogp65 // int emit_once(char *str) public static Object emit_once(Object... arg) { UNSUPPORTED("av9vowc3noulfodcy4y75cigq"); // int emit_once(char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9o1ba2pupi4m7jhoaypqirzvz"); // if (strings == 0) UNSUPPORTED("oaii1lps6xe7x781clc5iody"); // strings = dtopen(&stringdict, Dtoset); UNSUPPORTED("a42qo364e33vq6xbaw4vwmfzy"); // if (!(*(((Dt_t*)(strings))->searchf))((strings),(void*)(str),0000004)) { UNSUPPORTED("a012inr2a6x936i3bmmkqbemf"); // (*(((Dt_t*)(strings))->searchf))((strings),(void*)(strdup(str)),0000001); UNSUPPORTED("bp2y18pqq5n09006utwifdyxo"); // return NOT(0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 13d7ot7fdy4wdgkjwthvwzm4e // void emit_once_reset(void) public static Object emit_once_reset(Object... arg) { UNSUPPORTED("7ssgqzgkp5093mqxhkhuxum69"); // void emit_once_reset(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("92fsshcviqb93ohg6shu769vw"); // if (strings) { UNSUPPORTED("czsk7hllpj8z00253zg9zwhd7"); // dtclose(strings); UNSUPPORTED("eolwadtu14y3m949xmkvfm351"); // strings = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 elzykz6y67nj4wkw8ujszlav6 // static void emit_begin_cluster(GVJ_t * job, Agraph_t * sg) public static Object emit_begin_cluster(Object... arg) { UNSUPPORTED("5hucwlu4giv8cmas625we7f9h"); // static void emit_begin_cluster(GVJ_t * job, Agraph_t * sg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8lamppsqs7nhiu5v8k1f5jfh2"); // obj_state_t *obj; UNSUPPORTED("1iexddadjo0w6fdgddatfx40s"); // obj = push_obj_state(job); UNSUPPORTED("n4boka8crqg5xqjpjbgcxln8"); // obj->type = CLUSTER_OBJTYPE; UNSUPPORTED("4xukb2axnj1vamt817cyruv0g"); // obj->u.sg = sg; UNSUPPORTED("7by2ra75cr7w394dpq9nmc5ft"); // obj->emit_state = EMIT_CDRAW; UNSUPPORTED("bl6tgzo7jj7jcpgtgg48l2agv"); // initObjMapData (job, GD_label(sg), sg); UNSUPPORTED("85xekl5v59s8nwopb1oyrehis"); // gvrender_begin_cluster(job, sg); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 djiumpyzkrvkc510ygwc0qw82 // static void emit_end_cluster(GVJ_t * job, Agraph_t * g) public static Object emit_end_cluster(Object... arg) { UNSUPPORTED("9dxd1b11ibgf7uvh7mf5mvzye"); // static void emit_end_cluster(GVJ_t * job, Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9k80dolt6qs55o0oinc7mvk7k"); // gvrender_end_cluster(job, g); UNSUPPORTED("39iamwq9cd9iv3d2iyiaq8gz9"); // pop_obj_state(job); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 560z6epwa1xr2jys0av7hf7e5 // void emit_clusters(GVJ_t * job, Agraph_t * g, int flags) public static Object emit_clusters(Object... arg) { UNSUPPORTED("9xh1f0u1yb9m8ypftvkh8ix4c"); // void emit_clusters(GVJ_t * job, Agraph_t * g, int flags) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("18uvc5sri0zzjmzue0wwo1z3j"); // int doPerim, c, istyle, filled; UNSUPPORTED("en6q26cyrg17g6yd6el73b3ns"); // pointf AF[4]; UNSUPPORTED("w9bbn26rmq9dc8ihryhse3pi"); // char *color, *fillcolor, *pencolor, **style, *s; UNSUPPORTED("5wyi0wasd5kecf6rhsqdjk7v2"); // graph_t *sg; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("8lamppsqs7nhiu5v8k1f5jfh2"); // obj_state_t *obj; UNSUPPORTED("1ikkkd5pukqwffmu5mtak47js"); // textlabel_t *lab; UNSUPPORTED("eqepzr79q5src0e30wgplnm07"); // int doAnchor; UNSUPPORTED("75w3zx2oz7s1yf7arcxf48heo"); // double penwidth; UNSUPPORTED("bhtcyodd9jiazat6sqhp9pm4x"); // char* clrs[2]; UNSUPPORTED("99d9j6m0161wdv2tu4wbf3ifi"); // for (c = 1; c <= GD_n_cluster(g); c++) { UNSUPPORTED("cuf43q4kl3kqgyuuxdqve1mqt"); // sg = GD_clust(g)[c]; UNSUPPORTED("75ua4s360ejy0ad5556y7rxc6"); // if (clust_in_layer(job, sg) == 0) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("cf5aumm9peswnfjdghtniv57i"); // /* when mapping, detect events on clusters after sub_clusters */ UNSUPPORTED("7pfc87mgoy8xnsdd8w3r44gt4"); // if (flags & (1<<2)) UNSUPPORTED("8zezqxx7s7218o1z84t9283i1"); // emit_clusters(job, sg, flags); UNSUPPORTED("4griuzh66dk49to2z4vg4n58t"); // emit_begin_cluster(job, sg); UNSUPPORTED("4afw3f56zovkl91einsaznlr1"); // obj = job->obj; UNSUPPORTED("8njvdvq4f4flv48y83eoo9guh"); // doAnchor = (obj->url || obj->explicit_tooltip); UNSUPPORTED("88mnm1u4w0ntiz5kynm02mfri"); // setColorScheme (agget (sg, "colorscheme")); UNSUPPORTED("eazs637wvmi4mg6rzyohl77bn"); // if (doAnchor && !(flags & (1<<2))) { UNSUPPORTED("4brof5tmiwuq5x63jh8whfeo0"); // emit_map_rect(job, GD_bb(sg)); UNSUPPORTED("96wz4onwo8hv1dre15npyoncl"); // gvrender_begin_anchor(job, obj->url, obj->tooltip, obj->target, obj->id); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("arpfq2ay8oyluwsz8s1wp6tp4"); // filled = 0; UNSUPPORTED("7z8t2n0ov011yh7grn6tj8xl2"); // istyle = 0; UNSUPPORTED("e1llbio24o8st183k6ivn3x0p"); // if ((style = checkClusterStyle(sg, &istyle))) { UNSUPPORTED("5ijzig29e4ve6o6tmpypjijfc"); // gvrender_set_style(job, style); UNSUPPORTED("1jumnpbkw6xmpcroil8k5o5m8"); // if (istyle & (1 << 0)) UNSUPPORTED("6w06em6l23suofe15du0wq9hb"); // filled = 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("17irg4x9jsg1ae0ueg2w7tyws"); // fillcolor = pencolor = 0; UNSUPPORTED("5erty8ili3cu3xxgovmr7jyzp"); // if (GD_gui_state(sg) & (1<<0)) { UNSUPPORTED("5ikpu0qi6d121h4pgoxr837nf"); // pencolor = late_nnstring(sg, G_activepencolor, "#808080"); UNSUPPORTED("4k5huj86rwz99dqspibchklqc"); // fillcolor = late_nnstring(sg, G_activefillcolor, "#fcfcfc"); UNSUPPORTED("5op945vn3c1cyxwov5p8rj33t"); // filled = NOT(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("76bnhukou8byzgwwws7ab8b0k"); // else if (GD_gui_state(sg) & (1<<1)) { UNSUPPORTED("3twy3v6vi0eeadoc4u1zlxb45"); // pencolor = late_nnstring(sg, G_activepencolor, "#303030"); UNSUPPORTED("1osuzkag4yl1jf1yqr8to7q1x"); // fillcolor = late_nnstring(sg, G_activefillcolor, "#e8e8e8"); UNSUPPORTED("5op945vn3c1cyxwov5p8rj33t"); // filled = NOT(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("er04c856pdifd7e1lw1c2jtba"); // else if (GD_gui_state(sg) & (1<<3)) { UNSUPPORTED("8kgp6s9d1pkgammp2cqy0lgz4"); // pencolor = late_nnstring(sg, G_deletedpencolor, "#e0e0e0"); UNSUPPORTED("50zeczr79uvycx2cumnhd1tjx"); // fillcolor = late_nnstring(sg, G_deletedfillcolor, "#f0f0f0"); UNSUPPORTED("5op945vn3c1cyxwov5p8rj33t"); // filled = NOT(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6ziqrkwt111lwfmj2h8pp9244"); // else if (GD_gui_state(sg) & (1<<2)) { UNSUPPORTED("5zrylqp2iq3cuxz4lzc0545c3"); // pencolor = late_nnstring(sg, G_visitedpencolor, "#101010"); UNSUPPORTED("2ehq3py2ixs9yy4hteia4zne7"); // fillcolor = late_nnstring(sg, G_visitedfillcolor, "#f8f8f8"); UNSUPPORTED("5op945vn3c1cyxwov5p8rj33t"); // filled = NOT(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("8ame1huznbi4b3mfey57xdith"); // if (((color = agget(sg, "color")) != 0) && color[0]) UNSUPPORTED("122n5atq0kvxnd5tgprr5fu8m"); // fillcolor = pencolor = color; UNSUPPORTED("1zymwwt3solqac47a89h9z0im"); // if (((color = agget(sg, "pencolor")) != 0) && color[0]) UNSUPPORTED("17hxm349yg7jla8miv14hwpgd"); // pencolor = color; UNSUPPORTED("dlm2m16no4yo0v65zm3r6q273"); // if (((color = agget(sg, "fillcolor")) != 0) && color[0]) UNSUPPORTED("4mfyuvfftu02jnxjtms8u89df"); // fillcolor = color; UNSUPPORTED("ee02x4g8qa44xw1iktx466luf"); // /* bgcolor is supported for backward compatability UNSUPPORTED("921qzbfipmjh6nvtnq08xm284"); // if fill is set, fillcolor trumps bgcolor, so UNSUPPORTED("tzyfjffroigby20366m64xps"); // don't bother checking. UNSUPPORTED("3wmft8410e1kee6p60k7wx3aa"); // if gradient is set fillcolor trumps bgcolor UNSUPPORTED("29edlge3wqyp1gs0vymtr5700"); // */ UNSUPPORTED("dzc0yotcol1cuthw3y39cexc6"); // if ((!filled || !fillcolor) && ((color = agget(sg, "bgcolor")) != 0) && color[0]) { UNSUPPORTED("4mfyuvfftu02jnxjtms8u89df"); // fillcolor = color; UNSUPPORTED("1obncd6x9bei9fl89du99yv6z"); // filled = 1; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4onosby3tz5zsis6f7400lgv0"); // if (!pencolor) pencolor = "black"; UNSUPPORTED("5eg5vn1y14wludgfck0xaq3b9"); // if (!fillcolor) fillcolor = "lightgrey"; UNSUPPORTED("1xf5m2okbj7owt77vc19vmf8r"); // clrs[0] = NULL; UNSUPPORTED("2atgu691bmn6h9jvk8lve5qzc"); // if (filled) { UNSUPPORTED("1ldzvmymblz8y4a6idvyxoj5t"); // float frac; UNSUPPORTED("5dnga3gh00f4sv4fk1n2iqdgu"); // if (findStopColor (fillcolor, clrs, &frac)) { UNSUPPORTED("12wjuz2zq45txyp39hhco78xu"); // gvrender_set_fillcolor(job, clrs[0]); UNSUPPORTED("5o23oun5dlazsaicyjj530pp"); // if (clrs[1]) UNSUPPORTED("a7gdknkeqzyql1xn5aou1tu3u"); // gvrender_set_gradient_vals(job,clrs[1],late_int(sg,G_gradientangle,0,0), frac); UNSUPPORTED("5v31mz0fdr0su096gqov41vyn"); // else UNSUPPORTED("bs5b6w27pwn1xz2vkqcvhvw13"); // gvrender_set_gradient_vals(job,"black",late_int(sg,G_gradientangle,0,0), frac); UNSUPPORTED("7m5m0tkcf8zs343oe1dddsxz6"); // if (istyle & (1 << 1)) UNSUPPORTED("5jf506rwz9snq4d6ozpjvg3yg"); // filled = 3; UNSUPPORTED("7rknc7r0egcn3cw68mrvgow3v"); // else UNSUPPORTED("7bikp52v1ey2yil3rybx6nris"); // filled = 2; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("es2lu1zhy5wdeml1v1kmrcix3"); // gvrender_set_fillcolor(job, fillcolor); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6j0eo47d00ez70necc0iot40d"); // if (G_penwidth && ((s=agxget(sg,G_penwidth)) && s[0])) { UNSUPPORTED("6wycyviq3z90tulx4rjwg7sw"); // penwidth = late_double(sg, G_penwidth, 1.0, 0.0); UNSUPPORTED("7mn8zfxwz2kendg9ewcomj2tv"); // gvrender_set_penwidth(job, penwidth); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4z3pjxp0yl5bmzgwdor3xvrv7"); // if (istyle & (1 << 2)) { UNSUPPORTED("mp3otb18t8y3o4bchg5z2idp"); // if ((doPerim = late_int(sg, G_peripheries, 1, 0)) || filled) { UNSUPPORTED("8si227ium48spncryy7frwynh"); // AF[0] = GD_bb(sg).LL; UNSUPPORTED("d45bxs36if3jklht2eq00pcr3"); // AF[2] = GD_bb(sg).UR; UNSUPPORTED("7pt3ynvpv9wcldm9uyl4hs9ud"); // AF[1].x = AF[2].x; UNSUPPORTED("busa4gdiebsow4m6i91pei9dk"); // AF[1].y = AF[0].y; UNSUPPORTED("6zog1wdj92i5gy18x1tgo7l8k"); // AF[3].x = AF[0].x; UNSUPPORTED("56s58onhzgnly5ggdvt1nlqnr"); // AF[3].y = AF[2].y; UNSUPPORTED("4jwde8ij6mapmpzufmz71uw3e"); // if (doPerim) UNSUPPORTED("7xogzuqvqci68vd0h8mw3g3hc"); // gvrender_set_pencolor(job, pencolor); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("3eca1kfk7d0usysqe2g25s9dt"); // gvrender_set_pencolor(job, "transparent"); UNSUPPORTED("ayr41ncx6835i1t6cvbbocmjt"); // round_corners(job, AF, 4, istyle, filled); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9yi0sfy5jinx301z6euefq1gx"); // else if (istyle & (1 << 6)) { UNSUPPORTED("ax8y1utessq4dsj8ao6g7j2gw"); // int rv; UNSUPPORTED("4hludau9a2am1tjk0xhlnxfwy"); // AF[0] = GD_bb(sg).LL; UNSUPPORTED("4k77pmee44hsr6plcoi20dqdh"); // AF[2] = GD_bb(sg).UR; UNSUPPORTED("94xw5t69k3x4bncfo418rzk41"); // AF[1].x = AF[2].x; UNSUPPORTED("2wgbau6oi3x84fa5vbjpl4tys"); // AF[1].y = AF[0].y; UNSUPPORTED("drztvrhevx0zqyqw37lqbywwv"); // AF[3].x = AF[0].x; UNSUPPORTED("47fk1ddlzlenv8temw9o74dkm"); // AF[3].y = AF[2].y; UNSUPPORTED("d53rklwtw1a8c0ucfyief5w1w"); // if (late_int(sg, G_peripheries, 1, 0) == 0) UNSUPPORTED("63hseiu22ctgv9gdekam65t07"); // gvrender_set_pencolor(job, "transparent"); UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("1wbjeln7h70lig2gl98kt8rf5"); // gvrender_set_pencolor(job, pencolor); UNSUPPORTED("97vrs1f2jac8rfh3rnv1du0r7"); // rv = stripedBox (job, AF, fillcolor, 0); UNSUPPORTED("26uxy1rkzvmsisagoc5g7f9qc"); // if (rv > 1) UNSUPPORTED("8b71lckf2t9xe9fslu15tp484"); // agerr (AGPREV, "in cluster %s\n", agnameof(sg)); UNSUPPORTED("cahw6lsgg8xmfslugv8wqwbhc"); // gvrender_box(job, GD_bb(sg), 0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("dgmim3t3r6y21whczevrqvhn1"); // if (late_int(sg, G_peripheries, 1, 0)) { UNSUPPORTED("1wbjeln7h70lig2gl98kt8rf5"); // gvrender_set_pencolor(job, pencolor); UNSUPPORTED("8lraxifxzs9ffrnk8a0ckeesw"); // gvrender_box(job, GD_bb(sg), filled); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("7a977zitdpktoxwn8rbjif9ux"); // else if (filled) { UNSUPPORTED("63hseiu22ctgv9gdekam65t07"); // gvrender_set_pencolor(job, "transparent"); UNSUPPORTED("8lraxifxzs9ffrnk8a0ckeesw"); // gvrender_box(job, GD_bb(sg), filled); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1j4mx2l2nl1oo3makbr3eyoxc"); // free (clrs[0]); UNSUPPORTED("ecowjd4zwo4ew6jeu9evjiij9"); // if ((lab = GD_label(sg))) UNSUPPORTED("2rvfkljzair3c2v8un739u8j"); // emit_label(job, EMIT_CLABEL, lab); UNSUPPORTED("7lbjljjzqr08zoe4tepd81ci0"); // if (doAnchor) { UNSUPPORTED("33sr8o6eyia8xv39c3ax3i9lq"); // if (flags & (1<<2)) { UNSUPPORTED("7fheoklw2kecmkg0cc6gap5f4"); // emit_map_rect(job, GD_bb(sg)); UNSUPPORTED("b2xca1s1bd7tkr1vo1weazvq1"); // gvrender_begin_anchor(job, obj->url, obj->tooltip, obj->target, obj->id); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("dtwdqlhxsk4vpro8m02pot0co"); // gvrender_end_anchor(job); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("aayivxn33okuwnvn0iqa4066x"); // if (flags & (1<<3)) { UNSUPPORTED("7pdiogu941nic4o67h7upbhm4"); // for (n = agfstnode(sg); n; n = agnxtnode(sg, n)) { UNSUPPORTED("1bzj2os22s6b3tf899bpkde6t"); // emit_node(job, n); UNSUPPORTED("cvwdbwresv9dldcthcbnyp9kk"); // for (e = agfstout(sg, n); e; e = agnxtout(sg, e)) UNSUPPORTED("auj2mo2tz3uf10zjkza14e82k"); // emit_edge(job, e); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cv3hy45odqvlvwcjdyr6spm3h"); // emit_end_cluster(job, g); UNSUPPORTED("40fwf06hlkuo7isg6mip8g7el"); // /* when drawing, lay down clusters before sub_clusters */ UNSUPPORTED("3i5ezqfabmzliv96rwzf0rp37"); // if (!(flags & (1<<2))) UNSUPPORTED("8zezqxx7s7218o1z84t9283i1"); // emit_clusters(job, sg, flags); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c4mtnyvuir2cais09r4vk4xwa // static boolean is_style_delim(int c) public static Object is_style_delim(Object... arg) { UNSUPPORTED("8mez49lbay1n6ghwk9q96arp5"); // static boolean is_style_delim(int c) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8amt8fmqdipygnxirowfbawox"); // switch (c) { UNSUPPORTED("71si918orgtw88hf3ef5zmsur"); // case '(': UNSUPPORTED("6w345tkzwww6jqwaqdi7yww9s"); // case ')': UNSUPPORTED("d7tc6f9496ufckp546jd19usk"); // case ',': UNSUPPORTED("1luutzji7osg8esr8b5j2cmsr"); // case '\0': UNSUPPORTED("bp2y18pqq5n09006utwifdyxo"); // return NOT(0); UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ciz01t6xlpxu9dny1f4zwb45n // static int style_token(char **s, agxbuf * xb) public static Object style_token(Object... arg) { UNSUPPORTED("28oqkocgew358xzz1ws4vsuz4"); // static int style_token(char **s, agxbuf * xb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8m3k758dcwwz4y8dqzc62remf"); // char *p = *s; UNSUPPORTED("eyxuxcumfs3lh2yyd55uy6v7w"); // int token, rc; UNSUPPORTED("wrvu9u7a8j6i6y6552zncxfk"); // char c; UNSUPPORTED("e5ufot6klnpqffix37q98elea"); // while (*p && (isspace(*p) || (*p == ','))) UNSUPPORTED("2wdgcrx402aszs54rq2kh9txd"); // p++; UNSUPPORTED("ajkn8nsofzadrqa5lz0j3dil2"); // switch (*p) { UNSUPPORTED("1luutzji7osg8esr8b5j2cmsr"); // case '\0': UNSUPPORTED("dmnwmwojsxusa7q5qt23h5zmg"); // token = 0; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("71si918orgtw88hf3ef5zmsur"); // case '(': UNSUPPORTED("6w345tkzwww6jqwaqdi7yww9s"); // case ')': UNSUPPORTED("eksinwup1v6a3d98byb38snby"); // token = *p++; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("4cdl2v54v6i2dni2p09haa90i"); // token = 1; UNSUPPORTED("chgfiktm89qx6plbkcedgxntv"); // while (!is_style_delim(c = *p)) { UNSUPPORTED("44fjmben1pin1nau1r4s4b1jc"); // rc = ((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)c))); UNSUPPORTED("847zwwso12sey42b59zepembc"); // p++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3kblfzc6j01qhc67wzeuk2oam"); // *s = p; UNSUPPORTED("dzxpp1eh4dn7ckzehm8pbp5r5"); // return token; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 5rjzz2a1wogd5wh9oa5o1fofa // static unsigned char outbuf[128] //1 adi2polpq88o43a9ixp81gazu // static agxbuf ps_xb //3 31nqh76a91ewgfgc421tjgnxd // char **parse_style(char *s) public static Object parse_style(Object... arg) { UNSUPPORTED("e5cy7r0xn364flrgake76xt8i"); // char **parse_style(char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3vpphojcmf2gtvenbux84m8z9"); // static char *parse[64]; UNSUPPORTED("3gkp456k9uixnbt0hgaw7oeep"); // static boolean is_first = NOT(0); UNSUPPORTED("ap64a3u5ezb8lo8thseajc887"); // int fun = 0; UNSUPPORTED("ci8semxrw11syu6su3skyfkoa"); // boolean in_parens = 0; UNSUPPORTED("h0or3v13348vfl22jqz895yc"); // unsigned char buf[128]; UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c; UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("ew6jw9dmd6hait9mgj7ouhmmr"); // if (is_first) { UNSUPPORTED("4m5jd5elxj32gsmed58fjnfcr"); // agxbinit(&ps_xb, 128, outbuf); UNSUPPORTED("43wu8jjb66y01a3hlgjrjryh1"); // is_first = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ci65k77x1b3nq6luu69s87oup"); // agxbinit(&xb, 128, buf); UNSUPPORTED("7qb9c0pzh9hqyptqv00luagac"); // p = s; UNSUPPORTED("f242flcqmvdk48iozm6utnd21"); // while ((c = style_token(&p, &xb)) != 0) { UNSUPPORTED("7rk995hpmaqbbasmi40mqg0yw"); // switch (c) { UNSUPPORTED("ej3xfo9vi5946bx4zdvzne2rq"); // case '(': UNSUPPORTED("apbqdu2kbx5fo2pqipxe7a1dq"); // if (in_parens) { UNSUPPORTED("5gru9bi76isvm0xludlszwnh1"); // agerr(AGERR, "nesting not allowed in style: %s\n", s); UNSUPPORTED("2zjdsh2kepmo5yfkli65ofxe1"); // parse[0] = (char *) 0; UNSUPPORTED("97nzy67m5eyfd9a6d1montbam"); // agxbfree(&xb); UNSUPPORTED("6c4u745gvkt06ky00z0po4obm"); // return parse; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("iod77t2iafvqv6ivwpk389b4"); // in_parens = NOT(0); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("6740d5ahrznermt1b0z9i00yc"); // case ')': UNSUPPORTED("83ahjzhawu24k7hgmo221pz3k"); // if (in_parens == 0) { UNSUPPORTED("9ymlk0ikhvtvhj6ke4b2tooxg"); // agerr(AGERR, "unmatched ')' in style: %s\n", s); UNSUPPORTED("2zjdsh2kepmo5yfkli65ofxe1"); // parse[0] = (char *) 0; UNSUPPORTED("97nzy67m5eyfd9a6d1montbam"); // agxbfree(&xb); UNSUPPORTED("6c4u745gvkt06ky00z0po4obm"); // return parse; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("9yik55atrk3v32zihswkxoepa"); // in_parens = 0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("83ahjzhawu24k7hgmo221pz3k"); // if (in_parens == 0) { UNSUPPORTED("197h1mowju7n7bgy7wx0jpyyp"); // if (fun == 64 - 1) { UNSUPPORTED("47cw8s3z99bcrten2c3js5q7u"); // agerr(AGWARN, "truncating style '%s'\n", s); UNSUPPORTED("2pxlo0tqwhg51d3v8r33x5vlm"); // parse[fun] = (char *) 0; UNSUPPORTED("pjkyn5638fsqi3xazu3sd2ce"); // agxbfree(&xb); UNSUPPORTED("dedftzivffm91rj6yyibb1jrh"); // return parse; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("4h5li2e1ckwp4ztkl6ur4hjvr"); // ((((&ps_xb)->ptr >= (&ps_xb)->eptr) ? agxbmore(&ps_xb,1) : 0), (int)(*(&ps_xb)->ptr++ = ((unsigned char)'\0'))); /* terminate previous */ UNSUPPORTED("czp2gx1ewvuil58eqg7muqbp3"); // parse[fun++] = ((char*)((&ps_xb)->ptr)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ex1k1y0wj1bw5fju2ynw8wztq"); // agxbput(&ps_xb, (((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf))); UNSUPPORTED("8rvrgugqqjus18zwf0flkmyg5"); // ((((&ps_xb)->ptr >= (&ps_xb)->eptr) ? agxbmore(&ps_xb,1) : 0), (int)(*(&ps_xb)->ptr++ = ((unsigned char)'\0'))); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("eh4399dy51qz9v5k46j7u7f0b"); // if (in_parens) { UNSUPPORTED("a9afc2y8uauucn25hpjrq0oxx"); // agerr(AGERR, "unmatched '(' in style: %s\n", s); UNSUPPORTED("dtv4q4ijbxgbp2d77nklhf35w"); // parse[0] = (char *) 0; UNSUPPORTED("52frst03mcbsuu6bmnqs962qm"); // agxbfree(&xb); UNSUPPORTED("415n1ugoxgttbkl3ewfv6oqts"); // return parse; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ajac1de3cpgvymee2hqm7cqi2"); // parse[fun] = (char *) 0; UNSUPPORTED("1at5m9ctjn3ukv5gqtfswik02"); // agxbfree(&xb); UNSUPPORTED("9tjoh4elqwg3obcqij1u484gf"); // (void)(((((&ps_xb)->ptr >= (&ps_xb)->eptr) ? agxbmore(&ps_xb,1) : 0), (int)(*(&ps_xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&ps_xb)->ptr = (&ps_xb)->buf)); /* adds final '\0' to buffer */ UNSUPPORTED("be22l01ejxdw3x933qiz2eaon"); // return parse; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ck3omsgy3q0zlazix8r2dmufz // static boxf bezier_bb(bezier bz) public static Object bezier_bb(Object... arg) { UNSUPPORTED("4x8to7ipsnszk7hvp8b6us95m"); // static boxf bezier_bb(bezier bz) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("b4p0empvxghe2amctuezw2fj3"); // pointf p, p1, p2; UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("du76etbklizf0ujj6epooc4u3"); // assert(bz.size > 0); UNSUPPORTED("ch7u0adkg05jhr4w0rc7h1fhk"); // assert(bz.size % 3 == 1); UNSUPPORTED("1ecqftepbszmmeix7g8yerzho"); // bb.LL = bb.UR = bz.list[0]; UNSUPPORTED("67q9vbylk5li7nl6u0g87ew09"); // for (i = 1; i < bz.size;) { UNSUPPORTED("6lezptnqjziit71m8utngn9ec"); // /* take mid-point between two control points for bb calculation */ UNSUPPORTED("bcrmrqurd18pu7bb549lkj2zm"); // p1=bz.list[i]; UNSUPPORTED("chd2f5z6rt19lbaye25ej7q6j"); // i++; UNSUPPORTED("f1w8uf97bnvwem92r7cka4vh2"); // p2=bz.list[i]; UNSUPPORTED("chd2f5z6rt19lbaye25ej7q6j"); // i++; UNSUPPORTED("djwxlpeud1dn44xcrj6ndqzur"); // p.x = ( p1.x + p2.x ) / 2; UNSUPPORTED("626yu2abpm7sgxs2a6ojagloa"); // p.y = ( p1.y + p2.y ) / 2; UNSUPPORTED("a7j5rlajnoe7gj2d4vp29dlq3"); // EXPANDBP(bb,p); UNSUPPORTED("bg1txe7hn8ps3rf82tirvfik0"); // p=bz.list[i]; UNSUPPORTED("a7j5rlajnoe7gj2d4vp29dlq3"); // EXPANDBP(bb,p); UNSUPPORTED("chd2f5z6rt19lbaye25ej7q6j"); // i++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5v5hh30squmit8o2i5hs25eig"); // return bb; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 mmp96ytye8ub6txmw93m4vel // static void init_splines_bb(splines *spl) public static Object init_splines_bb(Object... arg) { UNSUPPORTED("c3y3jo1ro3rw4jxe8wllr42wd"); // static void init_splines_bb(splines *spl) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("37thdceezsvepe7tlyfatrbcw"); // bezier bz; UNSUPPORTED("dljqqka7giae8b01dcwrse8yc"); // boxf bb, b; UNSUPPORTED("e0qqavuetiwg28hno3n4emxw0"); // assert(spl->size > 0); UNSUPPORTED("2hacb9fdt2n4mkiveluxkiu2e"); // bz = spl->list[0]; UNSUPPORTED("3dpg7yydfzt8n9mt7n873m4bx"); // bb = bezier_bb(bz); UNSUPPORTED("4z4l1zu33m72iirxmuhdg36iw"); // for (i = 0; i < spl->size; i++) { UNSUPPORTED("1e2qc8e42f9ohrllk7q5kbqh9"); // if (i > 0) { UNSUPPORTED("75bvkqcdmtm8cgnu9vvehmsjq"); // bz = spl->list[i]; UNSUPPORTED("7r4akm44y65pzpvui9670oihh"); // b = bezier_bb(bz); UNSUPPORTED("3vlk6ne4cz4fhhm5a6o0buaiy"); // EXPANDBB(bb, b); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("5uvyqkv0zlq1pvknbc0xbocwu"); // if (bz.sflag) { UNSUPPORTED("8ee2v0q9etbnezmd0792omuyg"); // b = arrow_bb(bz.sp, bz.list[0], 1, bz.sflag); UNSUPPORTED("3vlk6ne4cz4fhhm5a6o0buaiy"); // EXPANDBB(bb, b); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("d2m398qqli1zbrdk57sgrhwjf"); // if (bz.eflag) { UNSUPPORTED("w3y4iuwxuffqu27zjsr7v6zs"); // b = arrow_bb(bz.ep, bz.list[bz.size - 1], 1, bz.eflag); UNSUPPORTED("3vlk6ne4cz4fhhm5a6o0buaiy"); // EXPANDBB(bb, b); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2mlym7h1a7wx8a5v8uwfgt2ve"); // spl->bb = bb; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 56w9yqsde88lk1salsdo9zhek // static void init_bb_edge(edge_t *e) public static Object init_bb_edge(Object... arg) { UNSUPPORTED("czoe4mrvfnlkgkf9dd5gswdun"); // static void init_bb_edge(edge_t *e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6tl9mepc2bett364jduh2q4mf"); // splines *spl; UNSUPPORTED("2c3cg84bl0xam4mk6g5f31jj0"); // spl = ED_spl(e); UNSUPPORTED("cnmg8m65mfhsyyzyck7jhyf0v"); // if (spl) UNSUPPORTED("5vuo8sxknwrhunmoccygtuuvr"); // init_splines_bb(spl); UNSUPPORTED("2o9ao5unxwbngk1qd0p8whpeg"); // // lp = ED_label(e); UNSUPPORTED("9g4o5rsb2iu810alwb470phyr"); // // if (lp) UNSUPPORTED("3h79hsuz9ndp04mum4ile2v9k"); // // {} UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ciznhkb6ca1q6pevo943ekme0 // static void init_bb_node(graph_t *g, node_t *n) public static Object init_bb_node(Object... arg) { UNSUPPORTED("9eic9chg3e24i3qt1eqh1kglr"); // static void init_bb_node(graph_t *g, node_t *n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("a20p0a7nmewnhy041mtj2osk3"); // ND_bb(n).LL.x = ND_coord(n).x - ND_lw(n); UNSUPPORTED("c2n18y1ykeeclakw3paasxuvw"); // ND_bb(n).LL.y = ND_coord(n).y - ND_ht(n) / 2.; UNSUPPORTED("cd1j2q3oehrg8vdh5mc2y15n3"); // ND_bb(n).UR.x = ND_coord(n).x + ND_rw(n); UNSUPPORTED("dtlwzpd98hya2ssejmz7kfy75"); // ND_bb(n).UR.y = ND_coord(n).y + ND_ht(n) / 2.; UNSUPPORTED("azojsmj2w5kkwset562797bbz"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) UNSUPPORTED("7ubpqzgmjcyyknlapquyjzh46"); // init_bb_edge(e); UNSUPPORTED("a9q4nnyheflcgogy9pvb7zhe9"); // /* IDEA - could also save in the node the bb of the node and UNSUPPORTED("ap39xkzymz5jtyyjrlh4oh7jz"); // all of its outedges, then the scan time would be proportional UNSUPPORTED("p6lfyicqm841ng07jzfz6erf"); // to just the number of nodes for many graphs. UNSUPPORTED("7is89igk57j6xxcbdvbmswq98"); // Wouldn't work so well if the edges are sprawling all over the place UNSUPPORTED("2x1b3m9zalxzp45ojidztaq43"); // because then the boxes would overlap a lot and require more tests, UNSUPPORTED("18qw5xpzps91vgn0jsv7bjzi0"); // but perhaps that wouldn't add much to the cost before trying individual UNSUPPORTED("43p4cwx9g5a9grh509zne19l"); // nodes and edges. */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 rpxf4np5e0zbdxhp8wqxwjru // static void init_bb(graph_t *g) public static Object init_bb(Object... arg) { UNSUPPORTED("4c9b9a1jd95zvo8rew7l4rdw2"); // static void init_bb(graph_t *g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("16hw9gw0dz2w7mrtba0eoqrdi"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("85uc0svzwbkhdrn713tjitqh5"); // init_bb_node(g, n); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 5cwzfc0p4amr0ryx8p6dllo42 // extern gvevent_key_binding_t gvevent_key_binding[] //1 d1twtwndjbh6p8fkxukwz6gh8 // extern int gvevent_key_binding_size //1 7w0woib3eaxzhaeksz12t3814 // extern gvdevice_callbacks_t gvdevice_callbacks //3 31vgctm6ydke1b6e0s06x85og // void gv_fixLocale (int set) public static void gv_fixLocale(int set) { ENTERING("31vgctm6ydke1b6e0s06x85og","gv_fixLocale"); try { // System.out.println("SKIPPING gv_fixLocale"); } finally { LEAVING("31vgctm6ydke1b6e0s06x85og","gv_fixLocale"); } } //3 9elgfx2mwaal8mp8yu4i8x55g // int gvRenderJobs (GVC_t * gvc, graph_t * g) public static Object gvRenderJobs(Object... arg) { UNSUPPORTED("al6r85bl2757m64h0be99kb2v"); // int gvRenderJobs (GVC_t * gvc, graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8hzx29jh0v2eh3jdrvrguy5mn"); // static GVJ_t *prevjob; UNSUPPORTED("88ctjz58veqptrabz1ddnfvaf"); // GVJ_t *job, *firstjob; UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); // if (Verbose) UNSUPPORTED("aaarjibm8djv3koq2y6u4m044"); // start_timer(); UNSUPPORTED("c2dyme9nsswgb9qb96oh2m08s"); // if (!(agbindrec(g, "Agraphinfo_t", 0, NOT(0)) && GD_drawing(g))) { UNSUPPORTED("aix30bpzzydybozpwmqe2bf25"); // agerr (AGERR, "Layout was not done. Missing layout plugins? \n"); UNSUPPORTED("881fnyqz9k0o6nu5p5pf6n7ka"); // if (Verbose) fprintf(stderr,"gvRenderJobs %s: %.2f secs.\n", agnameof(g), elapsed_sec()); UNSUPPORTED("f3a98gxettwtewduvje9y3524"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8tzaifmwoislyhju3smc3zukv"); // init_bb(g); UNSUPPORTED("83mub13eiupttlu3d4j5lvj5p"); // init_gvc(gvc, g); UNSUPPORTED("1qo78wc1zt5cptfpywfwemtjj"); // init_layering(gvc, g); UNSUPPORTED("98b2uqnwq3rgamma244bsbrt1"); // gv_fixLocale (1); UNSUPPORTED("52t975anlz3qwnjcfxc5ok1at"); // for (job = gvjobs_first(gvc); job; job = gvjobs_next(gvc)) { UNSUPPORTED("6hzx763hhvpbtsvjf8aud3axf"); // if (gvc->gvg) { UNSUPPORTED("ckzfglt7a4q9ca1ek9xm04vf5"); // job->input_filename = gvc->gvg->input_filename; UNSUPPORTED("5gsifqa9895ltjbs6fiwkoqup"); // job->graph_index = gvc->gvg->graph_index; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("bv62u1zxiszyu0z7y97u4p0sq"); // job->input_filename = NULL; UNSUPPORTED("84w8f8lfynhieu4ce6k6q0f7o"); // job->graph_index = 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("752jskfqikhifji0h9luxjt5p"); // job->common = &(gvc->common); UNSUPPORTED("2k3vzw6p3k1ruqmf5ckjkq8ss"); // job->layout_type = gvc->layout.type; UNSUPPORTED("5j4wuo1sqs572ms6xud4w1vnj"); // job->keybindings = gvevent_key_binding; UNSUPPORTED("3ev58alw9vec8e3ekuvfalsiw"); // job->numkeys = gvevent_key_binding_size; UNSUPPORTED("5e56auki36a9c8a9jxaig2dtn"); // if (!GD_drawing(g)) { UNSUPPORTED("7p3ojgx61zomxbqv96sv65491"); // agerr (AGERR, "layout was not done\n"); UNSUPPORTED("1li5h7sm29md39a6rbj983auz"); // gv_fixLocale (0); UNSUPPORTED("1i6w37q3xx7w76ft9lu49wl53"); // if (Verbose) fprintf(stderr,"gvRenderJobs %s: %.2f secs.\n", agnameof(g), elapsed_sec()); UNSUPPORTED("aivfd7ajlfz8o8oi68d4u5s5z"); // return -1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("xa3la9zayp2j503lislwf8bw"); // job->output_lang = gvrender_select(job, job->output_langname); UNSUPPORTED("8mhtshj21zmdehr49crz92ubk"); // if (job->output_lang == 999) { UNSUPPORTED("74iiov8kfwdwwftrvbuhx0uar"); // agerr (AGERR, "renderer for %s is unavailable\n", job->output_langname); UNSUPPORTED("1li5h7sm29md39a6rbj983auz"); // gv_fixLocale (0); UNSUPPORTED("1i6w37q3xx7w76ft9lu49wl53"); // if (Verbose) fprintf(stderr,"gvRenderJobs %s: %.2f secs.\n", agnameof(g), elapsed_sec()); UNSUPPORTED("62ko03w39aomt1h9y758mag0k"); // return -1; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("ampzlf94vv6frsr0uc6d017f6"); // switch (job->output_lang) { UNSUPPORTED("14mysa63mq9rkffdt98zlyxsl"); // case 21: UNSUPPORTED("apkae0nhyzfihcum8kdea13xc"); // /* output sorted, i.e. all nodes then all edges */ UNSUPPORTED("ci29ynt7cueaf8jqpqstm7gm7"); // job->flags |= (1<<0); UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("ph1r5pdbnaj90pytg37mdsoy"); // case 24: UNSUPPORTED("70rmrtuyb914znb7mrak6xhuk"); // /* output in preorder traversal of the graph */ UNSUPPORTED("cc3065soln8us3k43ovq935gw"); // job->flags |= (1<<3) UNSUPPORTED("c5oeo2n9siifh7xp8im8oy9i6"); // | (1<<9); UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("p0mt8wznalavjdm44ot4ykl7"); // default: UNSUPPORTED("d8cu5xolc31bwzqz3dmt12i74"); // job->flags |= chkOrder(g); UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("3yuatt6c28xj5dvgsxflopn9c"); // /* if we already have an active job list and the device doesn't support mutiple output files, or we are about to write to a different output device */ UNSUPPORTED("b6or2ku9xlp5adhzyfj6ggg74"); // firstjob = gvc->active_jobs; UNSUPPORTED("kkqmd3s54yqyxuy9ujfd6bp8"); // if (firstjob) { UNSUPPORTED("bkayjk7mhfk0z1prvegopn9f2"); // if (! (firstjob->flags & (1<<5)) UNSUPPORTED("7rq6o3m7v5g2jxfc61r9529oz"); // || (strcmp(job->output_langname,firstjob->output_langname))) { UNSUPPORTED("9ciig60i0ebtgpx2rjem515x2"); // gvrender_end_job(firstjob); UNSUPPORTED("6qee6pctu0pao210s569zuhhx"); // gvc->active_jobs = NULL; /* clear active list */ UNSUPPORTED("6rrb76y5gxl4tyyy39ju8vsqh"); // gvc->common.viewNum = 0; UNSUPPORTED("237aavazed82p3dahdkyqne7v"); // prevjob = NULL; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("3jir07ymknf0hmb9pv9x4dr3o"); // else { UNSUPPORTED("21ah75bxrqgvsk8az3ejvz9xm"); // prevjob = NULL; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("eq1quwlwab222bf12rqzylabz"); // if (prevjob) { UNSUPPORTED("7lbeby5mwfpebpi6oat7oziry"); // prevjob->next_active = job; /* insert job in active list */ UNSUPPORTED("92fdsdu2rxr0mo9vqr7xw6ivn"); // job->output_file = prevjob->output_file; /* FIXME - this is dumb ! */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("a3ph0rnir8dxbkuydjfk32hyf"); // if (gvrender_begin_job(job)) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("dhzmccdky20j8px8fj86coz1s"); // gvc->active_jobs = job; /* first job of new list */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ec054g5x4n09tjvekoarr5lj2"); // job->next_active = NULL; /* terminate active list */ UNSUPPORTED("a3g0lqkbu5x3tp31mzdb9z1a1"); // job->callbacks = &gvdevice_callbacks; UNSUPPORTED("91r9tszzf49cistgb3dx6c5cv"); // init_job_pad(job); UNSUPPORTED("1b3piu56i8aqmewokmp76n4ov"); // init_job_margin(job); UNSUPPORTED("c30lbf0gqt0nfgjngfkbrkh1u"); // init_job_dpi(job, g); UNSUPPORTED("6719w8ckdbr5o57x6eoomwwqf"); // init_job_viewport(job, g); UNSUPPORTED("12oknjh0if0kwauc10p58ooj6"); // init_job_pagination(job, g); UNSUPPORTED("dhiros11nue53w4sfjg764f66"); // if (! (job->flags & (1<<7))) { UNSUPPORTED("au82zdbwbf11c4dhp3j9goiuj"); // emit_graph(job, g); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7wrg45h3f9gl77k72io059dov"); // /* the last job, after all input graphs are processed, UNSUPPORTED("b2u8zjdvgah99yawh4ppdgfxk"); // * is finalized from gvFinalize() UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ UNSUPPORTED("9g4mahhmb798zgagmhs69g7o5"); // prevjob = job; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bkwnwkliqxeb0zv9leq3mcdrx"); // gv_fixLocale (0); UNSUPPORTED("et6g7m7r8rj6f8qhvpz93lqxs"); // if (Verbose) fprintf(stderr,"gvRenderJobs %s: %.2f secs.\n", agnameof(g), elapsed_sec()); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a3vxhyyu69l0qyuv5lmbs3mhh // boolean findStopColor (char* colorlist, char* clrs[2], float* frac) public static Object findStopColor(Object... arg) { UNSUPPORTED("4an2je0tp9mryy4qaly9pg51w"); // boolean findStopColor (char* colorlist, char* clrs[2], float* frac) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8z3a2qjysx0m326m5qjy91tnu"); // colorsegs_t* segs; UNSUPPORTED("ecz4e03zumggc8tfymqvirexq"); // int rv; UNSUPPORTED("5h68n5d5dxbzm77fsc9jacogv"); // rv = parseSegs (colorlist, 0, &segs); UNSUPPORTED("dtjj3ng1i6w3ypa53dix5k2bp"); // if (rv || (segs->numc < 2) || (segs->segs[0].color == NULL)) { UNSUPPORTED("1xf5m2okbj7owt77vc19vmf8r"); // clrs[0] = NULL; UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2y5g21fon514qpa8eaqvqil0b"); // if (segs->numc > 2) UNSUPPORTED("8r2xfo7zhrx0y02i0g0nmmb8v"); // agerr (AGWARN, "More than 2 colors specified for a gradient - ignoring remaining\n"); UNSUPPORTED("9qa66u5mlsn5qyltb3mz8tv6x"); // clrs[0] = (char*)gmalloc((strlen(colorlist)+1)*sizeof(char)); UNSUPPORTED("6wkfmz13gix78yhxfl4wu387t"); // strcpy (clrs[0], segs->segs[0].color); UNSUPPORTED("346qdfuvl40mzq9b0c1jmxrph"); // if (segs->segs[1].color) { UNSUPPORTED("17tzhs6hjalzhgf9x6bjt9a21"); // clrs[1] = clrs[0] + (strlen(clrs[0])+1); UNSUPPORTED("78iakjpvgfjfvohpfjme8wm3p"); // strcpy (clrs[1], segs->segs[1].color); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("8adbeboqco76ee1xfw2yotsrc"); // clrs[1] = NULL; UNSUPPORTED("6srhlc05d53hy25ewfxz9k5zg"); // if (segs->segs[0].hasFraction) UNSUPPORTED("6b4phzvf6fhvg9dib574qa5zl"); // *frac = segs->segs[0].t; UNSUPPORTED("95s3rw3vuxb43fouesg4994w9"); // else if (segs->segs[1].hasFraction) UNSUPPORTED("9vkv3aohcusc7x3qflm8ode9m"); // *frac = 1 - segs->segs[1].t; UNSUPPORTED("4lti1w2qslxj3ihoatmbavsfr"); // else UNSUPPORTED("dgf6ly3jfdezgto7fetu7v2nj"); // *frac = 0; UNSUPPORTED("dwbftn5fib1yir7gshhy14cup"); // freeSegs (segs); UNSUPPORTED("8fwlqtemsmckleh6946lyd8mw"); // return NOT(0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/geom__c.java000066400000000000000000001131001312650303100215030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class geom__c { //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 an3osr8wbab08w759hwbbqhm9 // box mkbox(point p, point q) public static Object mkbox(Object... arg) { UNSUPPORTED("ehmvylmllzguxcdpk8dz6hwdr"); // box mkbox(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dmq8mehh6aeppnudj702vldy4"); // box r; UNSUPPORTED("56irj1ii7mntnpbge097ptnng"); // if (p.x < q.x) { UNSUPPORTED("b8tp7wn90qjwecr4yhm0dif1i"); // r.LL.x = p.x; UNSUPPORTED("2tgz3b5tfwtlyh39flhnyaipw"); // r.UR.x = q.x; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("6jbrv8d8fjois445uwa6y61uz"); // r.LL.x = q.x; UNSUPPORTED("crijm4pj4imiocb7jzikn2xj5"); // r.UR.x = p.x; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("92wx79b4ryvutf9j0365jonq"); // if (p.y < q.y) { UNSUPPORTED("9oisw44o8np9dsov1namsahq2"); // r.LL.y = p.y; UNSUPPORTED("dq93klswmrh70fos28v81um3n"); // r.UR.y = q.y; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("aveby33ojiwj4tjoar3jn215s"); // r.LL.y = q.y; UNSUPPORTED("4sjpslco78l4c28t6hrci8g8v"); // r.UR.y = p.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2c7s1wgyibdpn3cqrdci4mqwj // boxf mkboxf(pointf p, pointf q) public static Object mkboxf(Object... arg) { UNSUPPORTED("6axbrwdhhyfo8coxq5s27j6ph"); // boxf mkboxf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c8ehlu3p9fgdawb34kesn3k9m"); // boxf r; UNSUPPORTED("56irj1ii7mntnpbge097ptnng"); // if (p.x < q.x) { UNSUPPORTED("b8tp7wn90qjwecr4yhm0dif1i"); // r.LL.x = p.x; UNSUPPORTED("2tgz3b5tfwtlyh39flhnyaipw"); // r.UR.x = q.x; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("6jbrv8d8fjois445uwa6y61uz"); // r.LL.x = q.x; UNSUPPORTED("crijm4pj4imiocb7jzikn2xj5"); // r.UR.x = p.x; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("92wx79b4ryvutf9j0365jonq"); // if (p.y < q.y) { UNSUPPORTED("9oisw44o8np9dsov1namsahq2"); // r.LL.y = p.y; UNSUPPORTED("dq93klswmrh70fos28v81um3n"); // r.UR.y = q.y; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("aveby33ojiwj4tjoar3jn215s"); // r.LL.y = q.y; UNSUPPORTED("4sjpslco78l4c28t6hrci8g8v"); // r.UR.y = p.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 29pnbvw6n2yoezie6xudgnrrc // int lineToBox(pointf p, pointf q, boxf b) public static Object lineToBox(Object... arg) { UNSUPPORTED("4yjnf6y95sbc4ugjerul6vk9m"); // int lineToBox(pointf p, pointf q, boxf b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("48cwacl32769puml63lq5tx4b"); // int inside1, inside2; UNSUPPORTED("9gsgfs2guis9c3c3oi57mxpq2"); // /* UNSUPPORTED("b5pw9v7zbg2sz0vvg6onzk3hw"); // * First check the two points individually to see whether they UNSUPPORTED("caais2dj0scdtrf20ixk47dfa"); // * are inside the rectangle or not. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("cq0b826r85o6zz8ne0szl8yyk"); // inside1 = (p.x >= b.LL.x) && (p.x <= b.UR.x) UNSUPPORTED("1gflq8j7hbpz9170ekhci7yn8"); // && (p.y >= b.LL.y) && (p.y <= b.UR.y); UNSUPPORTED("bhzozbp5l936vg1gyqwuk4dx6"); // inside2 = (q.x >= b.LL.x) && (q.x <= b.UR.x) UNSUPPORTED("ct5vd0ytj5rjcrp2gpt8pkonc"); // && (q.y >= b.LL.y) && (q.y <= b.UR.y); UNSUPPORTED("ehkoqnyo9hihgs7jeo4qoysve"); // if (inside1 != inside2) { UNSUPPORTED("egywkvzo2t847qnathqnanvcj"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bmhand7n0jwpq7eue899h1p1f"); // if (inside1 & inside2) { UNSUPPORTED("3ywpya2w1bf4n909xcgre9wyy"); // return 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9gsgfs2guis9c3c3oi57mxpq2"); // /* UNSUPPORTED("4nkuw4roujcsqvbd2p9xdxitb"); // * Both points are outside the rectangle, but still need to check UNSUPPORTED("aminyyg03u6tufsuefljc9ckh"); // * for intersections between the line and the rectangle. Horizontal UNSUPPORTED("6l0cqsf2f98o3thcqrs8isnnk"); // * and vertical lines are particularly easy, so handle them UNSUPPORTED("7q484vtovilvh9k2g9clt86ne"); // * separately. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("2hgj2jk4zufho793ru5xo96qn"); // if (p.x == q.x) { UNSUPPORTED("ap75hs54mf8uwlaksz3dq3q89"); // /* UNSUPPORTED("aw25rbwlb76hcmi7i0a4hkroq"); // * Vertical line. UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ UNSUPPORTED("5x1j3sw3kiwvrlq7iovu7p1zg"); // if (((p.y >= b.LL.y) ^ (q.y >= b.LL.y)) UNSUPPORTED("8z5rdz2i2k4vnxh41xau7lqox"); // && (p.x >= b.LL.x) UNSUPPORTED("8sa26clzml2fktszuyohhq96s"); // && (p.x <= b.UR.x)) { UNSUPPORTED("7opo20y2y6rg5i89ocvk6qi3c"); // return 0; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("aypua15gtzlgyfgij2zgi2fy3"); // } else if (p.y == q.y) { UNSUPPORTED("ap75hs54mf8uwlaksz3dq3q89"); // /* UNSUPPORTED("cuvbkbznqopg3ock0vwua52e"); // * Horizontal line. UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ UNSUPPORTED("cr98tmonigesw5kgv445eaagx"); // if (((p.x >= b.LL.x) ^ (q.x >= b.LL.x)) UNSUPPORTED("7moqrnwj9gzn15xyb4n1h71nz"); // && (p.y >= b.LL.y) UNSUPPORTED("adozfrtcv9rz4ut26t65aqjmp"); // && (p.y <= b.UR.y)) { UNSUPPORTED("7opo20y2y6rg5i89ocvk6qi3c"); // return 0; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("3dx5qy44ca9k65rrlunknc4jr"); // double m, x, y, low, high; UNSUPPORTED("ap75hs54mf8uwlaksz3dq3q89"); // /* UNSUPPORTED("17rosazxzae3vpa7evezmoc18"); // * Diagonal line. Compute slope of line and use UNSUPPORTED("38f61i9iz6jnzq3tqj3l15io"); // * for intersection checks against each of the UNSUPPORTED("24s7erxhfmz9equ6bz65nd452"); // * sides of the rectangle: left, right, bottom, top. UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ UNSUPPORTED("30gqvlvlxk2fyms9obiav5eld"); // m = (q.y - p.y)/(q.x - p.x); UNSUPPORTED("bydrxw4l4bbi1q3tpzpouyb05"); // if (p.x < q.x) { UNSUPPORTED("3vk3thjtlk0eg13l7tpn464hf"); // low = p.x; high = q.x; UNSUPPORTED("7g575y36b78djy0o00izqx7eq"); // } else { UNSUPPORTED("9kxzbc22yz2m5undmp2d8iv7i"); // low = q.x; high = p.x; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("ap75hs54mf8uwlaksz3dq3q89"); // /* UNSUPPORTED("8iz5exp7hmnagqdgln48v9h3c"); // * Left edge. UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ UNSUPPORTED("1kvmnzix9327sc1lr8oldfwfa"); // y = p.y + (b.LL.x - p.x)*m; UNSUPPORTED("6mt68el60h3098f84p9qof9cp"); // if ((b.LL.x >= low) && (b.LL.x <= high) UNSUPPORTED("7fuiowax7i86a2628diixw0kg"); // && (y >= b.LL.y) && (y <= b.UR.y)) { UNSUPPORTED("7opo20y2y6rg5i89ocvk6qi3c"); // return 0; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("ap75hs54mf8uwlaksz3dq3q89"); // /* UNSUPPORTED("cqsjfoaczly4orr3aoyk6a3kn"); // * Right edge. UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ UNSUPPORTED("8ix32dk9v0hahcbsbusuf1rvs"); // y += (b.UR.x - b.LL.x)*m; UNSUPPORTED("brui2iilj0qz4n9w80cckznor"); // if ((y >= b.LL.y) && (y <= b.UR.y) UNSUPPORTED("9lghx6zht8yyj8oo7vd3urxb0"); // && (b.UR.x >= low) && (b.UR.x <= high)) { UNSUPPORTED("7opo20y2y6rg5i89ocvk6qi3c"); // return 0; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("ap75hs54mf8uwlaksz3dq3q89"); // /* UNSUPPORTED("9k6j1wl5s3bvhlivy6qc3xt6b"); // * Bottom edge. UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ UNSUPPORTED("32eo9bh3jk75sopl737la1xiu"); // if (p.y < q.y) { UNSUPPORTED("dpom6twg5z6ngi160zl4sbdfy"); // low = p.y; high = q.y; UNSUPPORTED("7g575y36b78djy0o00izqx7eq"); // } else { UNSUPPORTED("9n0a69t2iof5xbu1u5knw8v5e"); // low = q.y; high = p.y; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("balzrwlwsv6rnon3m0ey2ftly"); // x = p.x + (b.LL.y - p.y)/m; UNSUPPORTED("d93289lj2vrieguknwyq7vizz"); // if ((x >= b.LL.x) && (x <= b.UR.x) UNSUPPORTED("2pou8in6puryywhwltwlqmbvw"); // && (b.LL.y >= low) && (b.LL.y <= high)) { UNSUPPORTED("7opo20y2y6rg5i89ocvk6qi3c"); // return 0; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("ap75hs54mf8uwlaksz3dq3q89"); // /* UNSUPPORTED("95agizrp9b5p1dhdv0pxg6eh7"); // * Top edge. UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ UNSUPPORTED("725knfzo8czrv30p686pkacn"); // x += (b.UR.y - b.LL.y)/m; UNSUPPORTED("d93289lj2vrieguknwyq7vizz"); // if ((x >= b.LL.x) && (x <= b.UR.x) UNSUPPORTED("6olkmrl6prxmetzy935itn4zw"); // && (b.UR.y >= low) && (b.UR.y <= high)) { UNSUPPORTED("7opo20y2y6rg5i89ocvk6qi3c"); // return 0; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8azkpi8o0wzdufa90lw8hpt6q"); // return -1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1r7uvomrrc3o0z8d9ompm1ig4 // void rect2poly(pointf *p) public static Object rect2poly(Object... arg) { UNSUPPORTED("4upujvzyed550abavjj8vlza1"); // void rect2poly(pointf *p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("jjuy9fch36k2y85yrqsb31r0"); // p[3].x = p[2].x = p[1].x; UNSUPPORTED("9meelngzsr1xhvzldh1ry9iww"); // p[2].y = p[1].y; UNSUPPORTED("adltawlh6me0hjx77x5jo35mr"); // p[3].y = p[0].y; UNSUPPORTED("3ben3eqfn8zv3650vloyu3dk"); // p[1].x = p[0].x; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3aiyj7urv33rvps5ds204tciu // static pointf rotatepf(pointf p, int cwrot) public static __struct__ rotatepf(final __struct__ p, int cwrot) { // WARNING!! STRUCT return rotatepf_w_(p.copy(), cwrot).copy(); } private static __struct__ rotatepf_w_(final __struct__ p, int cwrot) { ENTERING("3aiyj7urv33rvps5ds204tciu","rotatepf"); try { UNSUPPORTED("adzi0wztceimu4ni3aonznmq7"); // static pointf rotatepf(pointf p, int cwrot) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bvmbf4zjo22hbkaarrfpdlocf"); // static double sina, cosa; UNSUPPORTED("2q61ok3mvkrnszcasq86sa47u"); // static int last_cwrot; UNSUPPORTED("7lh87lvufqsd73q9difg0omei"); // pointf P; UNSUPPORTED("apr20mshcgdjbln509cnpuysv"); // /* cosa is initially wrong for a cwrot of 0 UNSUPPORTED("7chgrmqliof6d9xytud69tz1u"); // * this caching only works because we are never called for 0 rotations */ UNSUPPORTED("bbm4jlwljjo7wmvr5ma5c3ybf"); // if (cwrot != last_cwrot) { UNSUPPORTED("djdw08yi87cxa9gld79itcxte"); // sincos(cwrot / (2 * M_PI), &sina, &cosa); UNSUPPORTED("1p92a46pieij11gut3g3w5c8a"); // last_cwrot = cwrot; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5ebfpnhj3mdplyf7cdm05fvqt"); // P.x = p.x * cosa - p.y * sina; UNSUPPORTED("87v4w9w5q8h1qv8g0mktgna71"); // P.y = p.y * cosa + p.x * sina; UNSUPPORTED("57gdhsck3pq8wsbtv00wvc7ca"); // return P; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("3aiyj7urv33rvps5ds204tciu","rotatepf"); } } //3 tytryqs1gqpghjdmwwvf1klb // static point rotatep(point p, int cwrot) public static Object rotatep(Object... arg) { UNSUPPORTED("5e2i6bk41qflr7y85q1osu5ts"); // static point rotatep(point p, int cwrot) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("14au2rwic77e6h8riridc0ukd"); // pointf pf; UNSUPPORTED("5ec0bowt1l7dbrl26kdbij7m1"); // P2PF(p, pf); UNSUPPORTED("37ova7qixpohr8qiao9sckb10"); // pf = rotatepf(pf, cwrot); UNSUPPORTED("4z58o606xwke1d8wfsxob59px"); // PF2P(pf, p); UNSUPPORTED("91xduilalb406jjyw2g1i07th"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 66bs8dyk14129mi4jhjnm40yf // point cwrotatep(point p, int cwrot) public static Object cwrotatep(Object... arg) { UNSUPPORTED("bjpc8zmw5o75ij41axaonr91n"); // point cwrotatep(point p, int cwrot) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("do61zekb7jneykkag5k2ihoru"); // int x = p.x, y = p.y; UNSUPPORTED("2dtbcjay37z9xis3sikr2uqvd"); // switch (cwrot) { UNSUPPORTED("70xjc0sbkjvexfar5luzibcgf"); // case 0: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1q74ra1plwbzbg77dmxva7rl5"); // case 90: UNSUPPORTED("volj3587rzrhhe2x9l5tcqoe"); // p.x = y; UNSUPPORTED("duim642efpe7clezuqpyzpw5y"); // p.y = -x; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("17fu4k5xy8d72f5mch8cg6aga"); // case 180: UNSUPPORTED("20gmg6188e8c58dfpcwshs68q"); // p.x = x; UNSUPPORTED("c7p7spy43wsvu86ax82p9jeni"); // p.y = -y; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("cltc0ksnwf3uugjgybaifa7r7"); // case 270: UNSUPPORTED("volj3587rzrhhe2x9l5tcqoe"); // p.x = y; UNSUPPORTED("enc0wozuspuqe0erlieadffeb"); // p.y = x; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("o9oafab685xqeq9zr7gudl0e"); // if (cwrot < 0) UNSUPPORTED("aaqg3ryvg9knt1q47x4gwtt5x"); // return ccwrotatep(p, -cwrot); UNSUPPORTED("1ehwxt44pkimc4wg1udnhmlw6"); // if (cwrot > 360) UNSUPPORTED("aq1nthhp1dp65k4mktxyqz4bq"); // return cwrotatep(p, cwrot%360); UNSUPPORTED("56r9i8o5t3hhzow2yhfx4zilm"); // return rotatep(p, cwrot); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("91xduilalb406jjyw2g1i07th"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5q8h2tm3jifiasn423wrm0y60 // pointf cwrotatepf(pointf p, int cwrot) public static __struct__ cwrotatepf(final __struct__ p, int cwrot) { // WARNING!! STRUCT return cwrotatepf_w_(p.copy(), cwrot).copy(); } private static __struct__ cwrotatepf_w_(final __struct__ p, int cwrot) { ENTERING("5q8h2tm3jifiasn423wrm0y60","cwrotatepf"); try { double x = p.getDouble("x"), y = p.getDouble("y"); switch (cwrot) { case 0: break; case 90: p.setDouble("x", y); p.setDouble("y", -x); break; case 180: p.setDouble("x", x); p.setDouble("y", -y); break; case 270: p.setDouble("x", y); p.setDouble("y", x); break; default: if (cwrot < 0) return ccwrotatepf(p, -cwrot); if (cwrot > 360) return cwrotatepf(p, cwrot%360); return rotatepf(p, cwrot); } return p; } finally { LEAVING("5q8h2tm3jifiasn423wrm0y60","cwrotatepf"); } } //3 8v4jp36jzoo7itgk1f2139cvz // point ccwrotatep(point p, int ccwrot) public static Object ccwrotatep(Object... arg) { UNSUPPORTED("4netvfi1o450fu9936ptrychj"); // point ccwrotatep(point p, int ccwrot) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("do61zekb7jneykkag5k2ihoru"); // int x = p.x, y = p.y; UNSUPPORTED("9hd3h63ctysf7ploj23tblup2"); // switch (ccwrot) { UNSUPPORTED("70xjc0sbkjvexfar5luzibcgf"); // case 0: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1q74ra1plwbzbg77dmxva7rl5"); // case 90: UNSUPPORTED("avktqxvqjaqt2xlnq4ykbvlca"); // p.x = -y; UNSUPPORTED("enc0wozuspuqe0erlieadffeb"); // p.y = x; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("17fu4k5xy8d72f5mch8cg6aga"); // case 180: UNSUPPORTED("20gmg6188e8c58dfpcwshs68q"); // p.x = x; UNSUPPORTED("c7p7spy43wsvu86ax82p9jeni"); // p.y = -y; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("cltc0ksnwf3uugjgybaifa7r7"); // case 270: UNSUPPORTED("volj3587rzrhhe2x9l5tcqoe"); // p.x = y; UNSUPPORTED("enc0wozuspuqe0erlieadffeb"); // p.y = x; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("225zfbgifuf05a2ndoo6eqxeu"); // if (ccwrot < 0) UNSUPPORTED("bdxv7ie6ag4u5y8py9bg2v6s2"); // return cwrotatep(p, -ccwrot); UNSUPPORTED("2po0nwnam6kgn9hmqm0ls262w"); // if (ccwrot > 360) UNSUPPORTED("87ycp7fzgeye35jy3hylox5it"); // return ccwrotatep(p, ccwrot%360); UNSUPPORTED("9umyw4cv019twbecwlsnwom3k"); // return rotatep(p, 360-ccwrot); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("91xduilalb406jjyw2g1i07th"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6np74e9pfmv8uek8irqru2tma // pointf ccwrotatepf(pointf p, int ccwrot) public static __struct__ ccwrotatepf(final __struct__ p, int ccwrot) { // WARNING!! STRUCT return ccwrotatepf_w_(p.copy(), ccwrot).copy(); } private static __struct__ ccwrotatepf_w_(final __struct__ p, int ccwrot) { ENTERING("6np74e9pfmv8uek8irqru2tma","ccwrotatepf"); try { double x = p.getDouble("x"), y = p.getDouble("y"); switch (ccwrot) { case 0: break; case 90: p.setDouble("x", -y); p.setDouble("y", x); break; case 180: p.setDouble("x", x); p.setDouble("y", -y); break; case 270: p.setDouble("x", y); p.setDouble("y", x); break; default: if (ccwrot < 0) return cwrotatepf(p, -ccwrot); if (ccwrot > 360) return ccwrotatepf(p, ccwrot%360); return rotatepf(p, 360-ccwrot); } return p; } finally { LEAVING("6np74e9pfmv8uek8irqru2tma","ccwrotatepf"); } } //3 5vf3yrj3pdre7b1b7c8sq4vnr // inline box flip_rec_box(box b, point p) public static Object flip_rec_box(Object... arg) { UNSUPPORTED("azqv2nylg3fv81xe2h7obme6h"); // inline box flip_rec_box(box b, point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dmq8mehh6aeppnudj702vldy4"); // box r; UNSUPPORTED("byo3wh0htpthg3nhm3o3s8zw"); // /* flip box */ UNSUPPORTED("d66qgllk8bjsehblbq26efncl"); // r.UR.x = b.UR.y; UNSUPPORTED("cd003wygnwu6zjz9ybxkxzek4"); // r.UR.y = b.UR.x; UNSUPPORTED("2ervqmsvgmknymzl5zimfcpf9"); // r.LL.x = b.LL.y; UNSUPPORTED("671k71gzkmwyp06lvvfh3boi"); // r.LL.y = b.LL.x; UNSUPPORTED("39nfxvqw1vl7uhpu80ul20w83"); // /* move box */ UNSUPPORTED("ck4g4elw7icvjii70m8950473"); // r.LL.x += p.x; UNSUPPORTED("dy93dfzolo2ajmmszxsj5ywgb"); // r.LL.y += p.y; UNSUPPORTED("e5m7ftc0fuuqjs4x8ubrmrw2r"); // r.UR.x += p.x; UNSUPPORTED("7jezgbyhc86h5l890v0f8i1l9"); // r.UR.y += p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 10berg5l071upv3r6ei5ri6h6 // boxf flip_rec_boxf(boxf b, pointf p) public static Object flip_rec_boxf(Object... arg) { UNSUPPORTED("7lxs02hyh7jlorkakwwex7np1"); // boxf flip_rec_boxf(boxf b, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c8ehlu3p9fgdawb34kesn3k9m"); // boxf r; UNSUPPORTED("byo3wh0htpthg3nhm3o3s8zw"); // /* flip box */ UNSUPPORTED("d66qgllk8bjsehblbq26efncl"); // r.UR.x = b.UR.y; UNSUPPORTED("cd003wygnwu6zjz9ybxkxzek4"); // r.UR.y = b.UR.x; UNSUPPORTED("2ervqmsvgmknymzl5zimfcpf9"); // r.LL.x = b.LL.y; UNSUPPORTED("671k71gzkmwyp06lvvfh3boi"); // r.LL.y = b.LL.x; UNSUPPORTED("39nfxvqw1vl7uhpu80ul20w83"); // /* move box */ UNSUPPORTED("ck4g4elw7icvjii70m8950473"); // r.LL.x += p.x; UNSUPPORTED("dy93dfzolo2ajmmszxsj5ywgb"); // r.LL.y += p.y; UNSUPPORTED("e5m7ftc0fuuqjs4x8ubrmrw2r"); // r.UR.x += p.x; UNSUPPORTED("7jezgbyhc86h5l890v0f8i1l9"); // r.UR.y += p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 90k9l4o3khu3dw0fzkrcd97nk // double ptToLine2 (pointf a, pointf b, pointf p) public static double ptToLine2(final __struct__ a, final __struct__ b, final __struct__ p) { // WARNING!! STRUCT return ptToLine2_w_(a.copy(), b.copy(), p.copy()); } private static double ptToLine2_w_(final __struct__ a, final __struct__ b, final __struct__ p) { ENTERING("90k9l4o3khu3dw0fzkrcd97nk","ptToLine2"); try { double dx = b.getDouble("x")-a.getDouble("x"); double dy = b.getDouble("y")-a.getDouble("y"); double a2 = (p.getDouble("y")-a.getDouble("y"))*dx - (p.getDouble("x")-a.getDouble("x"))*dy; a2 *= a2; /* square - ensures that it is positive */ if (a2 < 0.0000000001) return 0.; /* avoid 0/0 problems */ return a2 / (dx*dx + dy*dy); } finally { LEAVING("90k9l4o3khu3dw0fzkrcd97nk","ptToLine2"); } } //3 7a3ftw4ubky8oz0e6sd4diag1 // int line_intersect (pointf a, pointf b, pointf c, pointf d, pointf* p) public static Object line_intersect(Object... arg) { UNSUPPORTED("4owj0m9g05vi1yxcownz0rtry"); // int line_intersect (pointf a, pointf b, pointf c, pointf d, pointf* p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5kh3p8pi4ouhb71qxt1wc19p4"); // pointf mv = sub_pointf(b,a); UNSUPPORTED("4qjn6j13besul6kp2zbryihnw"); // pointf lv = sub_pointf(d,c); UNSUPPORTED("cp5xvl6z479t3k1iqlafo0tu5"); // pointf ln = perp (lv); UNSUPPORTED("e6xr6qn23vmjveolqf2by1ynk"); // double lc = -(ln.x*c.x+ln.y*c.y); UNSUPPORTED("ez3o3rbsr12u6yt8icumd4ct"); // double dt = (ln.x*mv.x+ln.y*mv.y); UNSUPPORTED("c13p9pc06v96fokdr0tm36rec"); // if (fabs(dt) < 0.0000000001) return 0; UNSUPPORTED("4rkov8dzjqgoc0f65iwx9dri2"); // *p = sub_pointf(a,scale(((ln.x*a.x+ln.y*a.y)+lc)/dt,mv)); UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/globals__c.java000066400000000000000000000545011312650303100222100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class globals__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 6pkjavryvebqjuyjhek60afqj // char *Version //1 4drdys7bskk2cueq8s6qb7eto // char **Files //1 bhrdya4stvrxa0l8963qovxmi // const char **Lib //1 2ezgd8wkwz8fmkkw0hk2otnrz // char *CmdName //1 2v6m6l2yo7eku550m6hxli8c8 // char *specificFlags //1 awq7ni0redh6rz6ilo4t4k62o // char *specificItems //1 exkqovmg52ql69m6vncixyigy // char *Gvfilepath //1 dd9opdcegfmq3rkixwdexs90k // char *Gvimagepath //1 7cg2iv16zd5h875ayx62km2vf // unsigned char Verbose //1 zcxetd7svxzv5nmz0ncwk8mh // unsigned char Reduce //1 bn4y6ft05azakvtq0c601ga3l // int MemTest //1 22gjkfacjcojc18xwmaunw76g // char *HTTPServerEnVar //1 c9ooecge1w0qqy63jfgdhge5s // char *Output_file_name //1 ao0n1aashx9im0j6hzrwzj55u // int graphviz_errors //1 46w1bc9d9npxs3g0jd2gx6s95 // int Nop //1 36kts2p3evdros7j9k3eclgxv // double PSinputscale //1 532bzsjuqoqami999ou2pmaq6 // int Syntax_errors //1 2x2um6qmkcz7gpyoqqj2l9jwy // int Show_cnt //1 5z30otnosd5pxd6uswlcrrzi2 // char** Show_boxes //public static __ptr__ Show_boxes; //1 7kh1b1hb8sgfejwe0xa7d1378 // int CL_type //public static int CL_type; //1 7imn4w8fk3s1xiy6ye90w5yol // unsigned char Concentrate //public static boolean Concentrate; //1 5414a549tjctlyvuevpkj5qt1 // double Epsilon //1 q89qhgiomoxa5boua8ek4cs2 // int MaxIter //public static int MaxIter; //1 d7xxwjqfremj8rr7hsmo79v9d // int Ndim //1 88g6dq0g60jxisg0dob75bk5k // int State //public static int State; //1 ch9sqslzjrwv5b12wm84h970e // int EdgeLabelsDone //public static int EdgeLabelsDone; //1 455ctbozyoirantjv5xayvljb // double Initial_dist //public static double Initial_dist; //1 e4d9vb6lk7u18ctg6yzkpxag5 // double Damping //1 6335tgq6qxylgetmmpc2e9bbz // int Y_invert //1 9wywn3kzko1e5mbu5ck3fc5dn // int GvExitOnUsage //1 1cu961lsbh4pljvkidn8yp3h1 // Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin /*public static Agsym_s G_activepencolor, G_activefillcolor, G_selectedpencolor, G_selectedfillcolor, G_visitedpencolor, G_visitedfillcolor, G_deletedpencolor, G_deletedfillcolor, G_ordering, G_peripheries, G_penwidth, G_gradientangle, G_margin;*/ //1 2ee18foi20na4ktcw3ry70rm2 // Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle /*public static Agsym_s N_height, N_width, N_shape, N_color, N_fillcolor, N_activepencolor, N_activefillcolor, N_selectedpencolor, N_selectedfillcolor, N_visitedpencolor, N_visitedfillcolor, N_deletedpencolor, N_deletedfillcolor, N_fontsize, N_fontname, N_fontcolor, N_margin, N_label, N_xlabel, N_nojustify, N_style, N_showboxes, N_sides, N_peripheries, N_ordering, N_orientation, N_skew, N_distortion, N_fixed, N_imagescale, N_layer, N_group, N_comment, N_vertices, N_z, N_penwidth, N_gradientangle;*/ //1 2f3mchregmkoy4vgf28lgzewb // Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth /*public static Agsym_s E_weight, E_minlen, E_color, E_fillcolor, E_activepencolor, E_activefillcolor, E_selectedpencolor, E_selectedfillcolor, E_visitedpencolor, E_visitedfillcolor, E_deletedpencolor, E_deletedfillcolor, E_fontsize, E_fontname, E_fontcolor, E_label, E_xlabel, E_dir, E_style, E_decorate, E_showboxes, E_arrowsz, E_constr, E_layer, E_comment, E_label_float, E_samehead, E_sametail, E_arrowhead, E_arrowtail, E_headlabel, E_taillabel, E_labelfontsize, E_labelfontname, E_labelfontcolor, E_labeldistance, E_labelangle, E_tailclip, E_headclip, E_penwidth;*/ //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 8prhbu9fgu6m5aoh8hf6aa1qs // static fdpParms_t fdpParms = } plantuml-1.2017.15/src/gen/lib/common/htmllex__c.java000066400000000000000000000611161312650303100222420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class htmllex__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 dit6nudlsu8gsbu1nk0oaxmdv // extern YYSTYPE htmllval //1 ctaad2j8j92aany1c5u31r96g // static lexstate_t state //3 at9wtxmnn6uekh9z0bnvaelbv // static void error_context(void) public static Object error_context(Object... arg) { UNSUPPORTED("cx5zza1ddvju8vmzhht03lza6"); // static void error_context(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5f4h574c1s5z49uhju6bmx5vr"); // ((void)((state.xb)->ptr = (state.xb)->buf)); UNSUPPORTED("4wqtvj52mff2pw11q12rin4m0"); // if (state.prevtoklen > 0) UNSUPPORTED("4u5n5k7lgxwe2dh9ovxpm23o8"); // agxbput_n(state.xb, state.prevtok, state.prevtoklen); UNSUPPORTED("y8xx6fpf1j1yq8h7la9wbyp8"); // agxbput_n(state.xb, state.currtok, state.currtoklen); UNSUPPORTED("5l8je00dlv54928zapcnt9jb0"); // agerr(AGPREV, "... %s ...\n", (((((state.xb)->ptr >= (state.xb)->eptr) ? agxbmore(state.xb,1) : 0), (int)(*(state.xb)->ptr++ = ((unsigned char)'\0'))),(char*)((state.xb)->ptr = (state.xb)->buf))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4vowas5s5v4g6e7b8astgvsjs // void htmlerror(const char *msg) public static Object htmlerror(Object... arg) { UNSUPPORTED("als3jhirmetfoh7i5p2cbmutv"); // void htmlerror(const char *msg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("d4oil1r2n6f3x3s6g8r3xbtwe"); // if (state.error) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("d80x93emrbwlp0eqir6ima591"); // state.error = 1; UNSUPPORTED("arzfndu6ayj2visamjxs5fqz6"); // agerr(AGERR, "%s in line %d \n", msg, htmllineno()); UNSUPPORTED("ebdaw1lrgj2dwb8f9tcasee8x"); // error_context(); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 acp0i0e64pv3nc7z77ptqite1 // int initHTMLlexer(char *src, agxbuf * xb, htmlenv_t *env) public static Object initHTMLlexer(Object... arg) { UNSUPPORTED("4i6718j9jsjffgdkpazutgd58"); // int initHTMLlexer(char *src, agxbuf * xb, htmlenv_t *env) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a9gcauqk56pv3a5jlrmhocx0a"); // static int first; UNSUPPORTED("6jv1hndh306bllc4vtjxwv29l"); // if (!first) { UNSUPPORTED("f4xbgk3zxynlsuq7zpu0hjwel"); // agerr(AGWARN, UNSUPPORTED("ddcod81qjobkbp6gcngsxbwf2"); // "Not built with libexpat. Table formatting is not available.\n"); UNSUPPORTED("ax6eds48op7ub9xodm5h3ebg5"); // first++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6j28jjnvvj3r3i0jw57pfj41t // int clearHTMLlexer() public static Object clearHTMLlexer(Object... arg) { UNSUPPORTED("goib464b6rhiny54h2khc2a5"); // int clearHTMLlexer() UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aav473cirf0vmolwfs6qs5p69 // int htmllineno() public static Object htmllineno(Object... arg) { UNSUPPORTED("b27iw62asjebg2b5q4idjofiz"); // int htmllineno() UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bb6thnnh2h00iqcq5duqwkcvh // int htmllex() public static Object htmllex(Object... arg) { UNSUPPORTED("783uwka8img15zvofu54p0fbh"); // int htmllex() UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e2bh1okvaw9i2fmjvndb6niu9"); // return EOF; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/htmlparse__c.java000066400000000000000000002517661312650303100226000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class htmlparse__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 z596gpwi24gl7hh3seyp0gck // static void free_ritem(Dt_t* d, pitem* p,Dtdisc_t* ds) public static Object free_ritem(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("d1sfyoxiqpnl52w8y4ogbcpx4"); // free_ritem(Dt_t* d, pitem* p,Dtdisc_t* ds) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("79kn2ug4yy0rtx86eqx7hzfas"); // dtclose (p->u.rp); UNSUPPORTED("9e923y5yzq38a869awae5o4pq"); // free (p); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 agf3jzkrkzu95vturq4ruirl1 // static void free_item(Dt_t* d, void* p,Dtdisc_t* ds) public static Object free_item(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("aeylv2tqn9jclpx81wzo8jna8"); // free_item(Dt_t* d, void* p,Dtdisc_t* ds) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9e923y5yzq38a869awae5o4pq"); // free (p); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 53er8pztmugi7aaoo8w6xwmtt // static void cleanTbl (htmltbl_t* tp) public static Object cleanTbl(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("ejt6odqhq24f0w764y6ycw02q"); // cleanTbl (htmltbl_t* tp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7krxj3oaa24is3so7hqc97yq4"); // dtclose (tp->u.p.rows); UNSUPPORTED("dkrc2ghxhhre60fr65tyau4h"); // free_html_data (&tp->data); UNSUPPORTED("b5ddb7yg0q1g3is7zdyamegtz"); // free (tp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5fdbv5ru77dtss1pgwxt2dviz // static void cleanCell (htmlcell_t* cp) public static Object cleanCell(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("a2mzu2huku49nng3e0xjq7gly"); // cleanCell (htmlcell_t* cp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("77li1v44m9m2t09yybvetr1j7"); // if (cp->child.kind == 1) cleanTbl (cp->child.u.tbl); UNSUPPORTED("e9frm74dt3zpfwmvcjt6d7rsp"); // else if (cp->child.kind == 2) free_html_text (cp->child.u.txt); UNSUPPORTED("8o091oqx5kx7i4vunqj2rbe3w"); // free_html_data (&cp->data); UNSUPPORTED("4pvswhooboe78ehkkgcubcohg"); // free (cp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8ipdkk14qkzxks3qfhcg430xd // static void free_citem(Dt_t* d, pitem* p,Dtdisc_t* ds) public static Object free_citem(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("bixe5avd0uejldfgeyicnxgak"); // free_citem(Dt_t* d, pitem* p,Dtdisc_t* ds) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8mlg640v3o1fdr5uj9sn6po9s"); // cleanCell (p->u.cp); UNSUPPORTED("9e923y5yzq38a869awae5o4pq"); // free (p); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 8syn2cu0jbf04go8pm5edutfo // static Dtdisc_t rowDisc = //1 94uru1gihainl2dp1ajf4c2nb // static Dtdisc_t cellDisc = //3 4vewb2db7impvcvf47z3wia3j // static void free_fitem(Dt_t* d, fitem* p, Dtdisc_t* ds) public static Object free_fitem(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("26gmt3uykv7jwzz4zsuhzmh6c"); // free_fitem(Dt_t* d, fitem* p, Dtdisc_t* ds) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("arsp2i9gms37oc65b9ios89et"); // if (p->ti.str) UNSUPPORTED("3k6lgmit4vxwd69i0exjcet4e"); // free (p->ti.str); UNSUPPORTED("ap7e4kfupx34ac9hq9kl5x48o"); // free (p); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 49a1cavr0uwsfiywr4vlx1j9a // static void free_fspan(Dt_t* d, fspan* p, Dtdisc_t* ds) public static Object free_fspan(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("8jhubbnlsdmf8fbpmzgat0ym2"); // free_fspan(Dt_t* d, fspan* p, Dtdisc_t* ds) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("329j7icm39s2sase5gxu6gc03"); // textspan_t* ti; UNSUPPORTED("42eg0b6eo5j9iu80p1uw4zid7"); // if (p->lp.nitems) { UNSUPPORTED("bbuxsg26kpzb2fl660hjri9l8"); // int i; UNSUPPORTED("f4tcwn4c6523y5ixkmiplt4hy"); // ti = p->lp.items; UNSUPPORTED("a82cuuzhevdwszh5on4eme3j6"); // for (i = 0; i < p->lp.nitems; i++) { UNSUPPORTED("1o53httu5a3mbs45forifv3v"); // if (ti->str) free (ti->str); UNSUPPORTED("6f0wl1s431kpd69mmcufrgwpw"); // ti++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ck90yu0z5f11dxw03hkkrq95f"); // free (p->lp.items); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ap7e4kfupx34ac9hq9kl5x48o"); // free (p); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 1np2sacxaatzjpdyuxmr0k1f1 // static Dtdisc_t fstrDisc = //1 1isgrjiedau6lket9pvwj1cxy // static Dtdisc_t fspanDisc = //3 5mdfgv2hdexhdfc83v70ruckg // static void appendFItemList (agxbuf *ag) public static Object appendFItemList(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("3bn87tz9mrrkcgn2ilvrticxw"); // appendFItemList (agxbuf *ag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("doxwot367nm4unbmqvlyra7iq"); // fitem *fi = (fitem*)zmalloc(sizeof(fitem)); UNSUPPORTED("4lvo94ar3s2v4g4pkc1ms9lwy"); // fi->ti.str = strdup((((((ag)->ptr >= (ag)->eptr) ? agxbmore(ag,1) : 0), (int)(*(ag)->ptr++ = ((unsigned char)'\0'))),(char*)((ag)->ptr = (ag)->buf))); UNSUPPORTED("91z0oz4x1kngfnfwxn4cltgws"); // fi->ti.font = HTMLstate.fontstack->cfont; UNSUPPORTED("3ywp027tx29yvpgfvcnwxudxh"); // (*(((Dt_t*)(HTMLstate.fitemList))->searchf))((HTMLstate.fitemList),(void*)(fi),0000001); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4famoxxlv0pr1b2fcrf0jgu7s // static void appendFLineList (int v) public static Object appendFLineList(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("1azzbwypafe22124r30oc4gda"); // appendFLineList (int v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6iv4xusq3ncisurzdtlt8lhe9"); // int cnt; UNSUPPORTED("9zu5mdi1r78uwa3vbpf61c95d"); // fspan *ln = (fspan*)zmalloc(sizeof(fspan)); UNSUPPORTED("6k4lwsneas5kj0gght5yl0cwz"); // fitem *fi; UNSUPPORTED("6g93m1mz5i3cvqsrtk0010zx7"); // Dt_t *ilist = HTMLstate.fitemList; UNSUPPORTED("755rwhfp43ntyoieyof0bydox"); // cnt = dtsize(ilist); UNSUPPORTED("egxqlj0drkytzofn16fw10t2k"); // ln->lp.just = v; UNSUPPORTED("77njmf3w9m7xk714hk5o8hjv5"); // if (cnt) { UNSUPPORTED("6pui6q7pmbuh77j3mwflu6dh5"); // int i = 0; UNSUPPORTED("364dv1yyznq3ttfgmlficsnjl"); // ln->lp.nitems = cnt; UNSUPPORTED("8svd1o5xg6z1ni5xqndfxjfoa"); // ln->lp.items = (textspan_t*)zmalloc((cnt)*sizeof(textspan_t)); UNSUPPORTED("7jn3x6w0gczpwy9ly59swpxo0"); // fi = (fitem*)dtflatten(ilist); UNSUPPORTED("6mm1jtagzhgt1uvafv3xsnrps"); // for (; fi; fi = (fitem*)(((Dtlink_t*)((Dtlink_t*)fi))->right)) { UNSUPPORTED("4ubyu68yegzu2jnk1iubu6ior"); // /* NOTE: When fitemList is closed, it uses free_item, which only frees the container, UNSUPPORTED("dhebr74wsajvoittzd8u8d2f9"); // * not the contents, so this copy is safe. UNSUPPORTED("edw1ss2r31mqgsvca2gowi52v"); // */ UNSUPPORTED("e9w5vyh1n133n13q9qyjy9ozt"); // ln->lp.items[i] = fi->ti; UNSUPPORTED("1lo0ackow66iudrq1gb15y3ry"); // i++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("988zd9b8qbjkr2ruagx1lba6j"); // ln->lp.items = (textspan_t*)zmalloc(sizeof(textspan_t)); UNSUPPORTED("7olg12o4clx3ucbt1ovdkecgj"); // ln->lp.nitems = 1; UNSUPPORTED("9s20ql63zxmctegw4085j3fmx"); // ln->lp.items[0].str = strdup(""); UNSUPPORTED("2p1lktdlp9q8kh7c1ujxogs61"); // ln->lp.items[0].font = HTMLstate.fontstack->cfont; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("53hyx9r3svmvy8o9fi8qr4mzm"); // (*(((Dt_t*)(ilist))->searchf))((ilist),(void*)(0),0000100); UNSUPPORTED("8n0i45x1qnicbsjl3t906vaa8"); // (*(((Dt_t*)(HTMLstate.fspanList))->searchf))((HTMLstate.fspanList),(void*)(ln),0000001); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 az5nhw9enic3fddz8gnedxcju // static htmltxt_t* mkText(void) public static Object mkText(Object... arg) { UNSUPPORTED("ey6kc3f9ltt691wqrfmypaozl"); // static htmltxt_t* UNSUPPORTED("cjs0uzhgqb2fc7756tzv0vojf"); // mkText(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6iv4xusq3ncisurzdtlt8lhe9"); // int cnt; UNSUPPORTED("3moicc1bb7tuz64d74jgr044"); // Dt_t * ispan = HTMLstate.fspanList; UNSUPPORTED("243kqn4v9kdemlqwu2dhg6pdy"); // fspan *fl ; UNSUPPORTED("e188sj25s1ko32xdk40qd877e"); // htmltxt_t *hft = (htmltxt_t*)zmalloc(sizeof(htmltxt_t)); UNSUPPORTED("ag6dt4kjzoulw1j0mhwbokdid"); // if (dtsize (HTMLstate.fitemList)) UNSUPPORTED("5madleux7wg2vumi9pl1bdv8s"); // appendFLineList (0); UNSUPPORTED("ykhei8t74adzsrnktxe4u6wc"); // cnt = dtsize(ispan); UNSUPPORTED("57eezqowalifcx3ocgmtz5gmp"); // hft->nspans = cnt; UNSUPPORTED("77njmf3w9m7xk714hk5o8hjv5"); // if (cnt) { UNSUPPORTED("87wlv7rom7negdjfub75atom0"); // int i = 0; UNSUPPORTED("btg64tgzrm3tsx7w2cjgtkt5g"); // hft->spans = (htextspan_t*)zmalloc((cnt)*sizeof(htextspan_t)); UNSUPPORTED("2yjlc0huszsbrp4p6mljwnqez"); // for(fl=(fspan *)(*(((Dt_t*)(ispan))->searchf))((ispan),(void*)(0),0000200); fl; fl=(fspan *)(*(((Dt_t*)(ispan))->searchf))((ispan),(void*)(fl),0000010)) { UNSUPPORTED("o7nqqo5invz9fssk2z7yxvdk"); // hft->spans[i] = fl->lp; UNSUPPORTED("5at77pazhse3utac5y67rfrpg"); // i++; UNSUPPORTED("klxoy56t7b20wxnwqm0qoofz"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ewiox4giau2t8uc31b4m8cbos"); // (*(((Dt_t*)(ispan))->searchf))((ispan),(void*)(0),0000100); UNSUPPORTED("dnp8w4len77c0t9hp9b2j5nye"); // return hft; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 23wdl6n60rq8jhsrdhgamjwls // static pitem* lastRow (void) public static Object lastRow(Object... arg) { UNSUPPORTED("d6gug3eud9z5l6tlnca1w8use"); // static pitem* lastRow (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7yjzj8jcniwi23ahtmhu8f7cp"); // htmltbl_t* tbl = HTMLstate.tblstack; UNSUPPORTED("f25khljxvq2epkwsa4mgzdc5v"); // pitem* sp = (*(((Dt_t*)(tbl->u.p.rows))->searchf))((tbl->u.p.rows),(void*)(0),0000400); UNSUPPORTED("1nblb3mrq7wrxkm06v7yvyin"); // return sp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8t79v9x9xl9lbtpdi34ff3phe // static pitem* addRow (void) public static Object addRow(Object... arg) { UNSUPPORTED("743f44ql6wbf8utttlgok2tms"); // static pitem* addRow (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("76ds0mb9gofz9vcw348tw74pq"); // Dt_t* dp = dtopen(&cellDisc, Dtqueue); UNSUPPORTED("7yjzj8jcniwi23ahtmhu8f7cp"); // htmltbl_t* tbl = HTMLstate.tblstack; UNSUPPORTED("6zaqqicaaq9xlvykkckhmxbyy"); // pitem* sp = (pitem*)zmalloc(sizeof(pitem)); UNSUPPORTED("aqkc4euu97i25dyyrncpttmit"); // sp->u.rp = dp; UNSUPPORTED("3fun70bheg258bgk09490w0sh"); // if (tbl->flags & 2) UNSUPPORTED("dmgfwq598sxflnnqkc7ad1b32"); // sp->ruled = 1; UNSUPPORTED("2g348nq1krudex6ifjgv27wyg"); // (*(((Dt_t*)(tbl->u.p.rows))->searchf))((tbl->u.p.rows),(void*)(sp),0000001); UNSUPPORTED("1nblb3mrq7wrxkm06v7yvyin"); // return sp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bdjjvqfdlg0yrp580jpv43hw4 // static void setCell (htmlcell_t* cp, void* obj, int kind) public static Object setCell(Object... arg) { UNSUPPORTED("a6ymak98eyh09432vmvpogipt"); // static void setCell (htmlcell_t* cp, void* obj, int kind) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6zaqqicaaq9xlvykkckhmxbyy"); // pitem* sp = (pitem*)zmalloc(sizeof(pitem)); UNSUPPORTED("7yjzj8jcniwi23ahtmhu8f7cp"); // htmltbl_t* tbl = HTMLstate.tblstack; UNSUPPORTED("qw6vdwg3yid1pdaz0qrjppaj"); // pitem* rp = (pitem*)(*(((Dt_t*)(tbl->u.p.rows))->searchf))((tbl->u.p.rows),(void*)(0),0000400); UNSUPPORTED("d6k77mp03y46jligheanx94dg"); // Dt_t* row = rp->u.rp; UNSUPPORTED("e9s2ni07poro3gct8f1ya0l7a"); // sp->u.cp = cp; UNSUPPORTED("2ajp3r1vfd0xl0s07q51tgkhd"); // (*(((Dt_t*)(row))->searchf))((row),(void*)(sp),0000001); UNSUPPORTED("73ausrcgminfktwghjhuctrdc"); // cp->child.kind = kind; UNSUPPORTED("8ianzmahfvf64a86twwxp86jp"); // if (tbl->flags & 1) UNSUPPORTED("dpw9bdo34u2djuw3g3a6rsn0z"); // cp->ruled = 1; UNSUPPORTED("a2drbo5m3cl97fd4khnnp0x1x"); // if(kind == 2) UNSUPPORTED("g98aqixq093hbgc60377v9xj"); // cp->child.u.txt = (htmltxt_t*)obj; UNSUPPORTED("7m1dgczjy0huec6a30h9cbkf"); // else if (kind == 3) UNSUPPORTED("6v92mg93bq298eauy1s1dn2kv"); // cp->child.u.img = (htmlimg_t*)obj; UNSUPPORTED("8983svt6g1kt3l45bd6ju9mw6"); // else UNSUPPORTED("5mgc55pb51xtqrskdy6lupjj9"); // cp->child.u.tbl = (htmltbl_t*)obj; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 86xg3md174m9d0hdj7lm1r8h8 // static htmllabel_t* mkLabel (void* obj, int kind) public static Object mkLabel(Object... arg) { UNSUPPORTED("68olevx5qr27d1plva3kh6e5d"); // static htmllabel_t* mkLabel (void* obj, int kind) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8ke9r2q8imfs4uovjyrc0m582"); // htmllabel_t* lp = (htmllabel_t*)zmalloc(sizeof(htmllabel_t)); UNSUPPORTED("43clk7pdhozybye425c5vxbqs"); // lp->kind = kind; UNSUPPORTED("59s9lao6qui2fmj9eef4wmr0l"); // if (kind == 2) UNSUPPORTED("11pai3t9lnogky3p7m0vpbty"); // lp->u.txt = (htmltxt_t*)obj; UNSUPPORTED("8983svt6g1kt3l45bd6ju9mw6"); // else UNSUPPORTED("8ag7q576emt2v7de68p7zi1vg"); // lp->u.tbl = (htmltbl_t*)obj; UNSUPPORTED("75meu722lubo2wmb1bahwmv1u"); // return lp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cidlq4a037zcw1viv3yj5dm3o // static void freeFontstack(void) public static Object freeFontstack(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("5n6hadg2nnxbykkls8yuljrux"); // freeFontstack(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7j1n1whz7ns8m658dgt3rf7m6"); // sfont_t* s; UNSUPPORTED("45fzuya14aqi3ydx2mx7qy7li"); // sfont_t* next; UNSUPPORTED("820gi48ql7mjvm02zqrlrk2j0"); // for (s = HTMLstate.fontstack; (next = s->pfont); s = next) { UNSUPPORTED("d285xdylp7oj81aar06ulc7kh"); // free(s); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ewyzfsvy1gms3jg0repa41hey // static void cleanup (void) public static Object cleanup(Object... arg) { UNSUPPORTED("4udlidhjhh186l60tnwrndods"); // static void cleanup (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("61xcnqsgba2hv68f84p8whcvy"); // htmltbl_t* tp = HTMLstate.tblstack; UNSUPPORTED("ej2qxu72gf97u4o99kg06l2bl"); // htmltbl_t* next; UNSUPPORTED("bzbpzh7k9m3nsya6a8e0qzuns"); // if (HTMLstate.lbl) { UNSUPPORTED("3we2rhjt0mgfjgbczne6cjhxh"); // free_html_label (HTMLstate.lbl,1); UNSUPPORTED("7kxmztohe6skbt7owagd4nyjj"); // HTMLstate.lbl = NULL; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("d33vybg2nal9pqyqnsooy2a3e"); // cellDisc.freef = (Dtfree_f)free_citem; UNSUPPORTED("bep9lbei2j0r4rjc1dkx7zkzd"); // while (tp) { UNSUPPORTED("9t026l68ed6imumb8ij7yhzh5"); // next = tp->u.p.prev; UNSUPPORTED("8f6vdwgdm8fjshmxo6ei6l4x9"); // cleanTbl (tp); UNSUPPORTED("314eojl0ohy55hom5nx2fwyfi"); // tp = next; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("caxitvipeydnmdgworfislzhs"); // cellDisc.freef = (Dtfree_f)free_item; UNSUPPORTED("dlpulny8fqkx25ms5nmppj3vz"); // fstrDisc.freef = (Dtfree_f)free_fitem; UNSUPPORTED("33zrdedw85v7v1x9nbd1ckxoa"); // (*(((Dt_t*)(HTMLstate.fitemList))->searchf))((HTMLstate.fitemList),(void*)(0),0000100); UNSUPPORTED("3869gecvlcnxgmpwhtwhrjm0d"); // fstrDisc.freef = (Dtfree_f)free_item; UNSUPPORTED("7odzhifod2x35wc5tbi6ix4be"); // fspanDisc.freef = (Dtfree_f)free_fspan; UNSUPPORTED("ba01mdd5f4vk5utis9ha5e30"); // (*(((Dt_t*)(HTMLstate.fspanList))->searchf))((HTMLstate.fspanList),(void*)(0),0000100); UNSUPPORTED("eav0sd07lj1ql28b4mb7w2uaf"); // fspanDisc.freef = (Dtfree_f)free_item; UNSUPPORTED("98nbz0do2np8v147v1gegnrbi"); // freeFontstack(); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8bl8i4l3vq6849ak8bwey6mzk // static int nonSpace (char* s) public static Object nonSpace(Object... arg) { UNSUPPORTED("48jbmcx7d591k3p9ro9ty0m3g"); // static int nonSpace (char* s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8jg9j6uvh89uy3p6606fh8a2w"); // char c; UNSUPPORTED("efa7ei8mz8h7lvxh5wqq5wc33"); // while ((c = *s++)) { UNSUPPORTED("9sludt6qrbcf6zk9hm3gysufj"); // if (c != ' ') return 1; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("bid671dovx1rdiquw5vm3fttj"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 87ios5hi5757k5miu6wlrum5w // static void pushFont (textfont_t *fp) public static Object pushFont(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("a9n2aesdy1bywbrbze7gmkn17"); // pushFont (textfont_t *fp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("691ytrxzc6cij5vazhtnuoy0n"); // sfont_t *ft = (sfont_t*)zmalloc(sizeof(sfont_t)); UNSUPPORTED("31e675d7cp5uavv6vydzkii0t"); // textfont_t* curfont = HTMLstate.fontstack->cfont; UNSUPPORTED("18b0yq7hsh4rq27jpn4mqwq34"); // textfont_t f = *fp; UNSUPPORTED("e31ng2kblbzn273ypcnmjro76"); // if (curfont) { UNSUPPORTED("2tpx9chys0c52v4xe4hacak69"); // if (!f.color && curfont->color) UNSUPPORTED("1n368po1sgerkqtzfsd32203n"); // f.color = curfont->color; UNSUPPORTED("ak5bw2q3nrfw2txz5a14sq6ha"); // if ((f.size < 0.0) && (curfont->size >= 0.0)) UNSUPPORTED("aimplrk4u9egypl4ejx0x9b8d"); // f.size = curfont->size; UNSUPPORTED("4660knpp4fazggl9yqsfxdr1e"); // if (!f.name && curfont->name) UNSUPPORTED("e43b7fxbbvqjlwtsywbv167k"); // f.name = curfont->name; UNSUPPORTED("d41lsjow2yoew5l40lj5se1wt"); // if (curfont->flags) UNSUPPORTED("2c7fsvh63forfjfugu4grsiiq"); // f.flags |= curfont->flags; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5jm1g08zslbh1e16seen6jgis"); // ft->cfont = (*(((Dt_t*)(HTMLstate.gvc->textfont_dt))->searchf))((HTMLstate.gvc->textfont_dt),(void*)(&f),0000001); UNSUPPORTED("3ptdxuzgcqapdr5xju6zt62cj"); // ft->pfont = HTMLstate.fontstack; UNSUPPORTED("3mdpaak1y5sxe2o2upjzfpy1e"); // HTMLstate.fontstack = ft; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9p42c6b9fpbzacsbf6pelg18i // static void popFont (void) public static Object popFont(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("hvm5yavuo5ntqsxkc2wna9oi"); // popFont (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5ab6yk7kzqxbhn54ye5aovrb0"); // sfont_t* curfont = HTMLstate.fontstack; UNSUPPORTED("3enh12gz0ie5d7arcrnm4g0ck"); // sfont_t* prevfont = curfont->pfont; UNSUPPORTED("7lf7opedggfvxwj1hqhdb9wfr"); // free (curfont); UNSUPPORTED("5ono575lrg0e9hs3qnjqspxg1"); // HTMLstate.fontstack = prevfont; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 dit6nudlsu8gsbu1nk0oaxmdv // extern YYSTYPE htmllval //1 x1gckyomih68oczs7yvmm3h5 // typedef unsigned char htmltype_uint8 //1 31jz3v9hejkp1rmq8mz0o5w47 // typedef short int htmltype_int8 //1 dpd60mlqyvzm22gkckal3qm7v // typedef unsigned short int htmltype_uint16 //1 dcdckw2y7pzkg53vllmegf4rq // typedef short int htmltype_int16 //1 9jdkbskvde5424jxt2dovm2rl // static const htmltype_uint8 htmltranslate[] = //1 2cl550jmnu3b16nwlqov00hw4 // static const htmltype_uint8 htmlr1[] = //1 6avpc7f6w1kv4uj7k9dc6qbvk // static const htmltype_uint8 htmlr2[] = //1 bpc8qqltftv1euiiz1zgki9nk // static const htmltype_uint8 htmldefact[] = //1 a0c9rr2ke8fawmhjvlibt4drp // static const htmltype_int8 htmldefgoto[] = //1 4ejlmzv42imv4ti54zwtoi31x // static const htmltype_int16 htmlpact[] = //1 4l47s5oz92y80p13c7zq77zvu // static const htmltype_int16 htmlpgoto[] = //1 4919zi7ri51whrqbp6bdfs056 // static const htmltype_int8 htmltable[] = //1 9jk1ohz4jxvdrwn1nsszaiu5y // static const htmltype_int8 htmlcheck[] = //1 e7nz3wy38vdelp0l9owm0wpm7 // static const htmltype_uint8 htmlstos[] = //3 efmks9lkxb4y34urxsqx4bs0 // static void htmldestruct (htmlmsg, htmltype, htmlvaluep) const char *htmlmsg public static Object htmldestruct(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("bfzx4tu82rlmwjppehpr1dqu5"); // htmldestruct (htmlmsg, htmltype, htmlvaluep) UNSUPPORTED("3awpkepa46g6buzdmvnec62v"); // const char *htmlmsg; UNSUPPORTED("7ihfhmwdck9c8mh20noq9z7fh"); // int htmltype; UNSUPPORTED("7d7rrr5zwtdnq8k1a9amkko57"); // YYSTYPE *htmlvaluep; UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9yf7lyfc618lbtjkyl2j86rtw"); // ((void) (htmlvaluep)); UNSUPPORTED("eaa8zribdcfr2vai4hp1pq1ua"); // if (!htmlmsg) UNSUPPORTED("25hpdqk09mvipn2py35e3lrmo"); // htmlmsg = "Deleting"; UNSUPPORTED("3nswekisilyfverb25pazm044"); // ; UNSUPPORTED("a3t3q76da1if05y02v50rpwqp"); // switch (htmltype) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("5vhsnixpf0pg2oz10ps2valyn"); // default: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 4oas2ko3fiqnt2h6t9oqu7wis // int htmlchar //1 dlvwi3aalg35jpb4xc64zpawu // YYSTYPE htmllval //1 7unt62uxeuyzgt50yuio39e4x // int htmlnerrs //3 c3v0uk0nmo3q2j3wobf6794sb // int htmlparse () public static Object htmlparse(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("1h4o50xtpcoa3y6zlpkkxk6ib"); // htmlparse () UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("62tk7c59ipergrlj1fduk0pdq"); // int htmlstate; UNSUPPORTED("9s1gvm4tg9jub4ua9d2z36uh"); // /* Number of tokens to shift before error messages enabled. */ UNSUPPORTED("35ezit38p47de8cupukz8db82"); // int htmlerrstatus; UNSUPPORTED("9ok1ifmve6y93u5i4275oxt1d"); // /* The stacks and their tools: UNSUPPORTED("bjeksbrfz8mqrkf0xy0wey64n"); // `htmlss': related to states. UNSUPPORTED("eld0t4ac0f0b0ic4l4rcsuiko"); // `htmlvs': related to semantic values. UNSUPPORTED("676c5582nxmrsmksg7dbypi2c"); // Refer to the stacks through separate pointers, to allow htmloverflow UNSUPPORTED("e8cfmvs5ozsrhl6v1u6mp3dw0"); // to reallocate them elsewhere. */ UNSUPPORTED("e0svr3ez9dsitn8x3e0ix2b6q"); // /* The state stack. */ UNSUPPORTED("dvsf2vaphifgcuy1elvib1zlh"); // htmltype_int16 htmlssa[200]; UNSUPPORTED("4dkqe7g2vzqf61fnma038bjlw"); // htmltype_int16 *htmlss; UNSUPPORTED("a1wlw53pguerjrw8d6gbuzs26"); // htmltype_int16 *htmlssp; UNSUPPORTED("3a5u4tdfyqrq2c72j4bf9ukca"); // /* The semantic value stack. */ UNSUPPORTED("4ufi2gs6chfc5vcrtl6p22i7w"); // YYSTYPE htmlvsa[200]; UNSUPPORTED("8o4i7pjkbavihzu0xwqdbe5jv"); // YYSTYPE *htmlvs; UNSUPPORTED("1k08c7vp1rk1e0fzde7qyb2yj"); // YYSTYPE *htmlvsp; UNSUPPORTED("bmzoj1sonj419ogzmu3k755r6"); // unsigned int htmlstacksize; UNSUPPORTED("c9d8i9an5qkgkxgokdmp3e9bz"); // int htmln; UNSUPPORTED("dn7s6wgv7lmh8pevqv91ju2ss"); // int htmlresult; UNSUPPORTED("15mkyt2y35y6b3kw61tcv89hz"); // /* Lookahead token as an internal (translated) token number. */ UNSUPPORTED("dbkl61t5ab3xhpe115qrsljzb"); // int htmltoken; UNSUPPORTED("8e8sr2gy45snswwlopuywd4"); // /* The variables used to return semantic value and location from the UNSUPPORTED("d4q0w76h1grh0723v2ors4nxs"); // action routines. */ UNSUPPORTED("70fy0dn2jgxihiqdid66zwr1b"); // YYSTYPE htmlval; UNSUPPORTED("8s5ggdw8hglgk87czklidx1pl"); // /* The number of symbols on the RHS of the reduced rule. UNSUPPORTED("d7da55fsvudhvjfgejvxp4301"); // Keep to zero when no symbol should be popped. */ UNSUPPORTED("pby8i05gnio1tx7xl02phkkl"); // int htmllen = 0; UNSUPPORTED("aa9z6jaxqu9w870phjets5pqw"); // htmltoken = 0; UNSUPPORTED("4entxav72jvsoxqih63oyh85r"); // htmlss = htmlssa; UNSUPPORTED("ey6y39100zis36iu8ek1maq16"); // htmlvs = htmlvsa; UNSUPPORTED("ewmf53srdqssmd5l6u21dfa1c"); // htmlstacksize = 200; UNSUPPORTED("3nswekisilyfverb25pazm044"); // ; UNSUPPORTED("10i7gkv6rg0m7qpxuazy9xffi"); // htmlstate = 0; UNSUPPORTED("1rk2q02feqw4cthy5e57fmf2g"); // htmlerrstatus = 0; UNSUPPORTED("8id8dfn6laac87otcxbnhm1jn"); // htmlnerrs = 0; UNSUPPORTED("3jqhe6ta2bm9bcf4w2963okw2"); // htmlchar = (-2); /* Cause a token to be read. */ UNSUPPORTED("f0kbtpk40bbe7m53uwx0eezp4"); // /* Initialize stack pointers. UNSUPPORTED("d8dtor5u60ag1mqqgil372nvk"); // Waste one element of value and location stack UNSUPPORTED("7ev6rqep9cwoby6w6f1tx2osc"); // so that they stay on the same level as the state stack. UNSUPPORTED("yd2jbvtitsi6j7lrxgzvchcv"); // The wasted elements are never initialized. */ UNSUPPORTED("6epp6cmp94tukdce0ud6qfip4"); // htmlssp = htmlss; UNSUPPORTED("c6zy9hd78gy2pq3pr04gfndcn"); // htmlvsp = htmlvs; UNSUPPORTED("etd1ecxo5luu7rsmrk7qz72gt"); // goto htmlsetstate; UNSUPPORTED("4flvn46w2728mhozqf9kuosm2"); // /*------------------------------------------------------------. UNSUPPORTED("29nubdcfg783k6bp12tzf7kdf"); // | htmlnewstate -- Push a new state, which is found in htmlstate. | UNSUPPORTED("a6znfp1d4ixngc79hwpyrw4wp"); // `------------------------------------------------------------*/ UNSUPPORTED("2qqobrlmofilzusvouyjyss5x"); // htmlnewstate: UNSUPPORTED("ej0agaz4g5pjpstralb0dkmdd"); // /* In all cases, when you get here, the value and location stacks UNSUPPORTED("7wmq2lqpn4jmj4m6nxe2ndmc5"); // have just been pushed. So pushing a state here evens the stacks. */ UNSUPPORTED("2751c39cr4rnrxg5n7m7nx7ys"); // htmlssp++; UNSUPPORTED("c5u6emamg5qcrwzdqjnb9onrx"); // htmlsetstate: UNSUPPORTED("d92pzu0fz5qfvyngtbuxmvd23"); // *htmlssp = htmlstate; UNSUPPORTED("6qm7nvqgi9468k5d6roxibegt"); // if (htmlss + htmlstacksize - 1 <= htmlssp) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("548pbbpfwcnj355codzyz202a"); // /* Get the current used size of the three stacks, in elements. */ UNSUPPORTED("dbjpb0ohfl5tqwx8j7iw7uz3m"); // unsigned int htmlsize = htmlssp - htmlss + 1; UNSUPPORTED("74tyblyhdau9tp40uzltqv3x7"); // /* Extend the stack our own way. */ UNSUPPORTED("26ytwmih7ma6cd4zk56mzubfl"); // if (10000 <= htmlstacksize) UNSUPPORTED("4mlk7t4o51xr98x3ba6uvbr5q"); // goto htmlexhaustedlab; UNSUPPORTED("87gqai73rnzhld59bjv3egqcl"); // htmlstacksize *= 2; UNSUPPORTED("ag1eorudzykaegt7mm2znnosf"); // if (10000 < htmlstacksize) UNSUPPORTED("c1vtabr3qz2or3uxoxp86czk9"); // htmlstacksize = 10000; UNSUPPORTED("cdsm9962a8k19vkufzg36hzc8"); // { UNSUPPORTED("6g01e75skxcki12flc6g01l89"); // htmltype_int16 *htmlss1 = htmlss; UNSUPPORTED("73qjl9g5kukkejwoiw0mv9894"); // union htmlalloc *htmlptr = UNSUPPORTED("pbab6t68kdfgwefi6c9gspq3"); // (union htmlalloc *) malloc (((htmlstacksize) * (sizeof (htmltype_int16) + sizeof (YYSTYPE)) + (sizeof (union htmlalloc) - 1))); UNSUPPORTED("4k5xl2qqq4d9ec7ks949npzkp"); // if (! htmlptr) UNSUPPORTED("9mqexdn4dvy83xq3gxn5hndcz"); // goto htmlexhaustedlab; UNSUPPORTED("3olfd74fb5aw885uvogcexnem"); // do { unsigned int htmlnewbytes; do { unsigned int htmli; for (htmli = 0; htmli < (htmlsize); htmli++) (&htmlptr->htmlss_alloc)[htmli] = (htmlss)[htmli]; } while ((0)); htmlss = &htmlptr->htmlss_alloc; htmlnewbytes = htmlstacksize * sizeof (*htmlss) + (sizeof (union htmlalloc) - 1); htmlptr += htmlnewbytes / sizeof (*htmlptr); } while ((0)); UNSUPPORTED("c0r80gc3ijlybyzvg7pxfqwmy"); // do { unsigned int htmlnewbytes; do { unsigned int htmli; for (htmli = 0; htmli < (htmlsize); htmli++) (&htmlptr->htmlvs_alloc)[htmli] = (htmlvs)[htmli]; } while ((0)); htmlvs = &htmlptr->htmlvs_alloc; htmlnewbytes = htmlstacksize * sizeof (*htmlvs) + (sizeof (union htmlalloc) - 1); htmlptr += htmlnewbytes / sizeof (*htmlptr); } while ((0)); UNSUPPORTED("a97chludrb34tylpbf69vt7wb"); // if (htmlss1 != htmlssa) UNSUPPORTED("7l4qx4ob4oyi2etdctrfdz2l3"); // free (htmlss1); UNSUPPORTED("dquo3qofk56ds5xl95lhvcthf"); // } UNSUPPORTED("es0c860ynkr022bk0tez2ise2"); // htmlssp = htmlss + htmlsize - 1; UNSUPPORTED("as9a97car6r3cgh7bctalzygu"); // htmlvsp = htmlvs + htmlsize - 1; UNSUPPORTED("3ejmh10g3kyn79v59obt4uwve"); // ; UNSUPPORTED("3eh7dcvg7k912klwk1971dzea"); // if (htmlss + htmlstacksize - 1 <= htmlssp) UNSUPPORTED("94rnqtiux3wthf9kn8utqcskz"); // goto htmlabortlab; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3nswekisilyfverb25pazm044"); // ; UNSUPPORTED("7ozhm9yo9yzwlyprtcubuyigx"); // if (htmlstate == 31) UNSUPPORTED("9u8ogsnknxr9ql3vkxgz8smsi"); // goto htmlacceptlab; UNSUPPORTED("coc3qaztrdssrpqadyzkhd3gn"); // goto htmlbackup; UNSUPPORTED("1js0t0ytcx8ywvz9tsx2kc95p"); // /*-----------. UNSUPPORTED("94huiatz1cws1vr5blejpzj8g"); // | htmlbackup. | UNSUPPORTED("dbmfwil8k8aqwvx0qac9r5n48"); // `-----------*/ UNSUPPORTED("3qq8lyp9d9glw5yd7xzch9nmv"); // htmlbackup: UNSUPPORTED("6yzm6oy5bmq3akecjcji6mxyb"); // /* Do appropriate processing given the current state. Read a UNSUPPORTED("3plrzglhiw3koxy90giytgoee"); // lookahead token if we need one and don't already have one. */ UNSUPPORTED("cbfd87dteogvv9rjyncz9jnkm"); // /* First try to decide what to do without reference to lookahead token. */ UNSUPPORTED("2a8s7ntnrbmo2gis2pg6txdu2"); // htmln = htmlpact[htmlstate]; UNSUPPORTED("clx73uhvg9uu1dy9qe0wyoqpi"); // if (((htmln) == (-82))) UNSUPPORTED("2cusegm507dcmw0w3d9n5ob5j"); // goto htmldefault; UNSUPPORTED("46jyau3ggxbt5nfv3rhpd6lxc"); // /* Not known => get a lookahead token if don't already have one. */ UNSUPPORTED("bax3bsy3o04vppl5jub837tlx"); // /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ UNSUPPORTED("aw1x1j7hwaqgxlp75kehavz9q"); // if (htmlchar == (-2)) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("3ejmh10g3kyn79v59obt4uwve"); // ; UNSUPPORTED("90hryp89jjpc8no7mk4wb10hl"); // htmlchar = htmllex (); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6ket57yvgnkwbczbudkyb2fya"); // if (htmlchar <= 0) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("ews12pthol75novd8hp8fkl1x"); // htmlchar = htmltoken = 0; UNSUPPORTED("3ejmh10g3kyn79v59obt4uwve"); // ; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8983svt6g1kt3l45bd6ju9mw6"); // else UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("84q66xdmm7egi73lpjcjdjc6q"); // htmltoken = ((unsigned int) (htmlchar) <= 295 ? htmltranslate[htmlchar] : 2); UNSUPPORTED("3ejmh10g3kyn79v59obt4uwve"); // ; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7lmyp30l6y4v0glydzcrxhs2d"); // /* If the proper action on seeing token YYTOKEN is to reduce or to UNSUPPORTED("b7crt9is4hw3fqusq1xx9sf6a"); // detect an error, take that action. */ UNSUPPORTED("34kbd1x8w690annnj75215h09"); // htmln += htmltoken; UNSUPPORTED("4halvyf2vhn5q7h9e0sbv873s"); // if (htmln < 0 || 271 < htmln || htmlcheck[htmln] != htmltoken) UNSUPPORTED("2cusegm507dcmw0w3d9n5ob5j"); // goto htmldefault; UNSUPPORTED("boi726ocp9qojc0h6nhl9vsgp"); // htmln = htmltable[htmln]; UNSUPPORTED("b8cb3dlwkrcfxu649zxqohgvj"); // if (htmln <= 0) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("6mbeksrzh2gawgu5dkavj2est"); // if ((0)) UNSUPPORTED("4jg5atq0i4ew7z1g0djuzcy4n"); // goto htmlerrlab; UNSUPPORTED("88vjtb0kxfe4xg663gi8xjqth"); // htmln = -htmln; UNSUPPORTED("2qstfr7r0p3taeabl0j0yypeg"); // goto htmlreduce; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6m1h8vs57mr1pqnti7d1p21zm"); // /* Count tokens shifted since error; after three, turn off error UNSUPPORTED("71k349r438nfbibdaenrctckz"); // status. */ UNSUPPORTED("1ba7u5rrozxksvv7ue2ygoh"); // if (htmlerrstatus) UNSUPPORTED("93m3v5anc75abn6e089zd23lt"); // htmlerrstatus--; UNSUPPORTED("bg4fkvjteodqrz0juw1viqqjp"); // /* Shift the lookahead token. */ UNSUPPORTED("3nswekisilyfverb25pazm044"); // ; UNSUPPORTED("vmreafe95a9c5qif2txdddol"); // /* Discard the shifted token. */ UNSUPPORTED("c82uun4vuxwvsul28tm7jaekj"); // htmlchar = (-2); UNSUPPORTED("c7lyo4hbtrr9qa5r64z6spufb"); // htmlstate = htmln; UNSUPPORTED("769m6xe129uc5szy8zzxdhv2d"); // *++htmlvsp = htmllval; UNSUPPORTED("c663h0k0l1p8coybbax2cprhf"); // goto htmlnewstate; UNSUPPORTED("52wvjbtwrbu5hxceg6pcdel69"); // /*-----------------------------------------------------------. UNSUPPORTED("550agztbn4434mdivyv3u31ln"); // | htmldefault -- do the default action for the current state. | UNSUPPORTED("9hhkvyvbwlemtn3h1klxkqvhu"); // `-----------------------------------------------------------*/ UNSUPPORTED("dzkwny6bi2obnn3s2dp222uk5"); // htmldefault: UNSUPPORTED("b62gttk3vojz09hayw8tsgo3p"); // htmln = htmldefact[htmlstate]; UNSUPPORTED("7c7of9tjvujfa23zjkakkk86m"); // if (htmln == 0) UNSUPPORTED("4f3e6k654d2f7nkzlnujkv6uc"); // goto htmlerrlab; UNSUPPORTED("27qnktnicd3ya3e45nfofxekt"); // goto htmlreduce; UNSUPPORTED("e719ikbjilezocbt4m9kwl59z"); // /*-----------------------------. UNSUPPORTED("3tqmfg13qgkifqble8aw065q3"); // | htmlreduce -- Do a reduction. | UNSUPPORTED("22xw21uiel1yqgh9ekbbt357t"); // `-----------------------------*/ UNSUPPORTED("95xespimrldho8donazj10f0z"); // htmlreduce: UNSUPPORTED("29gq1qaploduu7kkt1k3b8m6r"); // /* htmln is the number of a rule to reduce with. */ UNSUPPORTED("a3n0mugy5xbdrpk8ds15iciis"); // htmllen = htmlr2[htmln]; UNSUPPORTED("1xow6gk24a2ai9mxr7uo7ja67"); // /* If YYLEN is nonzero, implement the default value of the action: UNSUPPORTED("2hk39ofhzlvc0dwqdyy9u0vqb"); // `$$ = $1'. UNSUPPORTED("z0dyb7fx7wbongcqyjgkdi93"); // Otherwise, the following line sets YYVAL to garbage. UNSUPPORTED("9bj8xv378tepxxvoutf7s2jey"); // This behavior is undocumented and Bison UNSUPPORTED("cxdh1gg9j5jy0oknt01shgx43"); // users should not rely upon it. Assigning to YYVAL UNSUPPORTED("d2ax79vvmf62r51efz5v31h1f"); // unconditionally makes the parser a bit smaller, and it avoids a UNSUPPORTED("jctvjfbzk1f2q35vsx7olb4"); // GCC warning that YYVAL may be used uninitialized. */ UNSUPPORTED("4kzxdrpbfkmonox1vcw5eyja4"); // htmlval = htmlvsp[1-htmllen]; UNSUPPORTED("3nswekisilyfverb25pazm044"); // ; UNSUPPORTED("7lkql8chv38sgwh4qwbqrilbz"); // switch (htmln) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("7ywtj1dc9qm2wgh1sjqw8bog0"); // case 2: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("ah2zs0v0qqh6joibphexpozf2"); // { HTMLstate.lbl = mkLabel((htmlvsp[(2) - (3)].txt),2); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("4b2fuxeeiy5560zrwr84bw997"); // case 3: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("7b0edu0ae5neykrk7cf5ssskw"); // { HTMLstate.lbl = mkLabel((htmlvsp[(2) - (3)].tbl),1); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("9o9wpnyoqhlymcmbfbx4eoii3"); // case 4: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("1n3nvtp3qye71m9tv8pcveann"); // { cleanup(); goto htmlabortlab; } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("2l9i1e6ufz8i61ksw5x2douj"); // case 5: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("dhskox2sfaf7vqe01zwc52xch"); // { (htmlval.txt) = mkText(); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("aq0mcxx5aqy1tk410oeaicrz"); // case 8: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("8z66z0w2o50jn2ov9ttch7d4n"); // { appendFItemList(HTMLstate.str);} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("3fjp05wa4on3vfha31n5uf9c3"); // case 9: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("9v7p9jjwfci70d78n6ydhduyj"); // {appendFLineList((htmlvsp[(1) - (1)].i));} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("4wkftacr8qkkw7lq6winsirev"); // case 18: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("cia0qey5tfi2758qzo75k4r1a"); // { pushFont ((htmlvsp[(1) - (1)].font)); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("btnbf68hd81l8x43edgngqkn4"); // case 19: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("90nfzt90tr98p02wpfyghsiu"); // { popFont (); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("6b3z3u3dqncd4foiz9f4il304"); // case 20: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("e8qczq73ljl23tuukg4vd1swz"); // {pushFont((htmlvsp[(1) - (1)].font));} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("epqpoh4lzr1gr3b0h7lv6suoj"); // case 21: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("1f2vasoxz080ueipaaxp22ppm"); // {popFont();} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("9f8ykijwy76c3vifbbpux0n4y"); // case 22: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("e8qczq73ljl23tuukg4vd1swz"); // {pushFont((htmlvsp[(1) - (1)].font));} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("csxcbt7njg0z17ocb9bzv53w9"); // case 23: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("1f2vasoxz080ueipaaxp22ppm"); // {popFont();} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("90jn0veof2gkokrhklmj2yng4"); // case 24: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("e8qczq73ljl23tuukg4vd1swz"); // {pushFont((htmlvsp[(1) - (1)].font));} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("a1zicssxikyxg7770ja6oi1qo"); // case 25: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("1f2vasoxz080ueipaaxp22ppm"); // {popFont();} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("91777erp91zdakf2rq4nhm80d"); // case 26: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("e8qczq73ljl23tuukg4vd1swz"); // {pushFont((htmlvsp[(1) - (1)].font));} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("10s9wf75pcu4xgky3vzfov0rr"); // case 27: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("1f2vasoxz080ueipaaxp22ppm"); // {popFont();} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("1pcg7jpxjlrxymtxnqe2n0omu"); // case 28: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("e8qczq73ljl23tuukg4vd1swz"); // {pushFont((htmlvsp[(1) - (1)].font));} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("2y6jol0ugwkre8ty8azrihcw8"); // case 29: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("1f2vasoxz080ueipaaxp22ppm"); // {popFont();} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("3n69l4nxtlpullf9g4klblcml"); // case 30: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("e8qczq73ljl23tuukg4vd1swz"); // {pushFont((htmlvsp[(1) - (1)].font));} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("2z2j2xsio9grsk7azwojofq1a"); // case 31: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("1f2vasoxz080ueipaaxp22ppm"); // {popFont();} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("dgjfss93xjj8va3zpzsmwsc7s"); // case 32: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("e8qczq73ljl23tuukg4vd1swz"); // {pushFont((htmlvsp[(1) - (1)].font));} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("9y3ycu2dl1ja9jadl9mg7jk67"); // case 33: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("1f2vasoxz080ueipaaxp22ppm"); // {popFont();} UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("esz4cbak5l686zq9r9zbi7yx5"); // case 34: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("3yzzoqblzdwwpw1wlgq3f1f04"); // { (htmlval.i) = (htmlvsp[(1) - (2)].i); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("eestp885g0ixxylrl2yz4l4jk"); // case 35: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("dnna54cmdi58ik8c0goecex1s"); // { (htmlval.i) = (htmlvsp[(1) - (1)].i); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("av4z5qte05unsmsl8oy2jw5wh"); // case 38: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("37vabglvl5ih3c2yuds3fywqz"); // { UNSUPPORTED("ewpf9i8j025kajqhi528c19ql"); // if (nonSpace((((((HTMLstate.str)->ptr >= (HTMLstate.str)->eptr) ? agxbmore(HTMLstate.str,1) : 0), (int)(*(HTMLstate.str)->ptr++ = ((unsigned char)'\0'))),(char*)((HTMLstate.str)->ptr = (HTMLstate.str)->buf)))) { UNSUPPORTED("338qdumt8habcjmp30xbzvrkz"); // htmlerror ("Syntax error: non-space string used before "); UNSUPPORTED("9r57lrawwpl0gg3it2vn6ob9b"); // cleanup(); goto htmlabortlab; UNSUPPORTED("4v3ujrl58y59e7pqk0ke5t564"); // } UNSUPPORTED("590uk3khb9z1ux8u67qoyo5pm"); // (htmlvsp[(2) - (2)].tbl)->u.p.prev = HTMLstate.tblstack; UNSUPPORTED("9mypcdq2tul8wnq3jy3vrwzqk"); // (htmlvsp[(2) - (2)].tbl)->u.p.rows = dtopen(&rowDisc, Dtqueue); UNSUPPORTED("4pl4jraa22oxy62260ktc2w1n"); // HTMLstate.tblstack = (htmlvsp[(2) - (2)].tbl); UNSUPPORTED("464k8vyd8pje5qwl5tx0u9bzb"); // (htmlvsp[(2) - (2)].tbl)->font = HTMLstate.fontstack->cfont; UNSUPPORTED("eqcw1dykacq06vtk7ccf8uozu"); // (htmlval.tbl) = (htmlvsp[(2) - (2)].tbl); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("clipffhxj206f2zoz5tskxfso"); // case 39: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("ewpf9i8j025kajqhi528c19ql"); // if (nonSpace((((((HTMLstate.str)->ptr >= (HTMLstate.str)->eptr) ? agxbmore(HTMLstate.str,1) : 0), (int)(*(HTMLstate.str)->ptr++ = ((unsigned char)'\0'))),(char*)((HTMLstate.str)->ptr = (HTMLstate.str)->buf)))) { UNSUPPORTED("et5u9t37wg1ho6shuajarku6o"); // htmlerror ("Syntax error: non-space string used after
"); UNSUPPORTED("9r57lrawwpl0gg3it2vn6ob9b"); // cleanup(); goto htmlabortlab; UNSUPPORTED("4v3ujrl58y59e7pqk0ke5t564"); // } UNSUPPORTED("cngbw12mm3b00wmxzcb5kuivk"); // (htmlval.tbl) = HTMLstate.tblstack; UNSUPPORTED("186brzy420t3w4it4fgx6ijl8"); // HTMLstate.tblstack = HTMLstate.tblstack->u.p.prev; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("508xojiq76e68ysea7ccx0988"); // case 40: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("1961lax54v153ekh91m0fix4j"); // { (htmlval.tbl) = (htmlvsp[(1) - (1)].tbl); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("707q21176uh540icjdkmho8lp"); // case 41: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("2c7tp5g9gnd46lw9atbzj9g8l"); // { (htmlval.tbl)=(htmlvsp[(2) - (3)].tbl); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("afkusc5gt7341vg6q20kyt3r0"); // case 42: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("2c7tp5g9gnd46lw9atbzj9g8l"); // { (htmlval.tbl)=(htmlvsp[(2) - (3)].tbl); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("aw1w7mfmqa9ga8wr6x4u6nbju"); // case 43: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("2c7tp5g9gnd46lw9atbzj9g8l"); // { (htmlval.tbl)=(htmlvsp[(2) - (3)].tbl); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("alyqwgnskt6d6wilhbz1voo06"); // case 44: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("2c7tp5g9gnd46lw9atbzj9g8l"); // { (htmlval.tbl)=(htmlvsp[(2) - (3)].tbl); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("23po4ixywlwb8futv80yuc377"); // case 45: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("2c7tp5g9gnd46lw9atbzj9g8l"); // { (htmlval.tbl)=(htmlvsp[(2) - (3)].tbl); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("co51vw9d73gymlc8231s1jobg"); // case 48: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("7vnv5jx3hrknt46g99ujh9d1n"); // { (htmlval.p) = (htmlvsp[(1) - (1)].p); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("3gd6s52j3cevgz1ud9ys8mmpu"); // case 49: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("8u2opo0hv8qogogtryacsweg2"); // { (htmlval.p) = (htmlvsp[(2) - (2)].p); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("4hiji17koy9b0nvi4qcb7f0yn"); // case 50: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("bf8q1jk3octcdukgfu0ape1wu"); // { (htmlvsp[(1) - (3)].p)->ruled = 1; (htmlval.p) = (htmlvsp[(3) - (3)].p); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("605ei0ilu3nz1gtra52oi7mz3"); // case 51: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("2yogfcs5uhf5ebch8wotuiuoc"); // { addRow (); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("9qbtgt2eyxxuukc88ljehppv1"); // case 52: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("1a7rveoo2qzi2o7uoju1l5rhh"); // { (htmlval.p) = lastRow(); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("a5l2sixwhiv4x59rzexutoo1"); // case 53: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("byhxvkifsh7vwq5dl6e5h8ion"); // { (htmlval.cell) = (htmlvsp[(1) - (1)].cell); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("d9qqg2poxec5i2gk2tlzjceze"); // case 54: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("d18xjbl64b86qw7e2yoqcg1q5"); // { (htmlval.cell) = (htmlvsp[(2) - (2)].cell); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("19bjcrzc7duy98u3gs54bkn75"); // case 55: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("a3ug5yuidqw370oyrodag12om"); // { (htmlvsp[(1) - (3)].cell)->ruled |= 1; (htmlval.cell) = (htmlvsp[(3) - (3)].cell); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("67uutyij1gj1990fya85n5ky9"); // case 56: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("2mr5xhydq1atn13mwhmbrfbgw"); // { setCell((htmlvsp[(1) - (2)].cell),(htmlvsp[(2) - (2)].tbl),1); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("959w7yr2dhhobu7nk3tnemg3n"); // case 57: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("8cwbrevgxb23kwvd1ktbrj7gf"); // { (htmlval.cell) = (htmlvsp[(1) - (4)].cell); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("p7d04q56jydruu4g4mkcl0sv"); // case 58: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("5m72e6wtneamm6ebfhy92hpah"); // { setCell((htmlvsp[(1) - (2)].cell),(htmlvsp[(2) - (2)].txt),2); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("2e8vk62ndof1wckppsf3h1s08"); // case 59: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("8cwbrevgxb23kwvd1ktbrj7gf"); // { (htmlval.cell) = (htmlvsp[(1) - (4)].cell); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("datyn4rldj3j181mig7lm4p15"); // case 60: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("b3utjfd3rmn2f9h6i25w1py22"); // { setCell((htmlvsp[(1) - (2)].cell),(htmlvsp[(2) - (2)].img),3); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("arwsoeo1a8oc675m9cdqjutkj"); // case 61: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("8cwbrevgxb23kwvd1ktbrj7gf"); // { (htmlval.cell) = (htmlvsp[(1) - (4)].cell); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("dvs3metp9y50zqp24wirfa2mt"); // case 62: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("b8wwv09322ks29oox9p4ixlbf"); // { setCell((htmlvsp[(1) - (1)].cell),mkText(),2); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("bumsxvl14bzsf1d8ynzopdhvp"); // case 63: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("6orbcijshpuell53yiuig421k"); // { (htmlval.cell) = (htmlvsp[(1) - (3)].cell); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("cif7nn92zrlfslvnv5c4lpoku"); // case 64: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("c96y3n361innrbk53th9a7qkk"); // { (htmlval.img) = (htmlvsp[(1) - (2)].img); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("dxemu7derx72r4fpo6fzfantn"); // case 65: UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("97oa6k8kz5ke4v3eaknzgmh4g"); // { (htmlval.img) = (htmlvsp[(1) - (1)].img); } UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("8sch3zvqi27y4ab9h9s76ge3l"); // /* Line 1787 of yacc.c */ UNSUPPORTED("dlej2d1ppih1bnw53vhocc61k"); // default: break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("iekbchkdfqskjw9ynyxgcn9a"); // /* User semantic actions sometimes alter htmlchar, and that requires UNSUPPORTED("5c46um0ycteiasc0knv5w1vvj"); // that htmltoken be updated with the new translation. We take the UNSUPPORTED("8ggwt6kwgt9e58xuflmz2mjt3"); // approach of translating immediately before every use of htmltoken. UNSUPPORTED("5egmt4bmrda5rwmq0fxaut100"); // One alternative is translating here after every semantic action, UNSUPPORTED("cbfgp6r4p0aww4ln7e4wjq5rg"); // but that translation would be missed if the semantic action invokes UNSUPPORTED("88rydnmcc693ix76nkm304dsp"); // YYABORT, YYACCEPT, or YYERROR immediately after altering htmlchar or UNSUPPORTED("c4u72wy240sife8xvhjcdf3y"); // if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an UNSUPPORTED("9oqy8bmho7vno5ewpwljpvk7k"); // incorrect destructor might then be invoked immediately. In the UNSUPPORTED("2dm4du9w60sge1uyx4vrwgtuv"); // case of YYERROR or YYBACKUP, subsequent parser actions might lead UNSUPPORTED("55ajnkklldzargdu2v7xxw8jh"); // to an incorrect destructor call or verbose syntax error message UNSUPPORTED("2w6gaiusmvs9119tusfj7wmgn"); // before the lookahead is translated. */ UNSUPPORTED("3nswekisilyfverb25pazm044"); // ; UNSUPPORTED("c7j4t24hd7cwzrmx18y9iqwdh"); // (htmlvsp -= (htmllen), htmlssp -= (htmllen)); UNSUPPORTED("bz286e9y9g0xdwt8742rmztvj"); // htmllen = 0; UNSUPPORTED("3nswekisilyfverb25pazm044"); // ; UNSUPPORTED("5lqsu0sbtbs4inng6cq54owp8"); // *++htmlvsp = htmlval; UNSUPPORTED("8zf4hex7pjvkzs6628u0usoop"); // /* Now `shift' the result of the reduction. Determine what state UNSUPPORTED("9p956m8qfuj78tnsyhxtvs3t4"); // that goes to, based on the state we popped back to and the rule UNSUPPORTED("2sr0m6m0qte5wg0zclc83vtln"); // number reduced by. */ UNSUPPORTED("8jz2j9zmtqrogcli2jzhbbwi6"); // htmln = htmlr1[htmln]; UNSUPPORTED("5ixiqahnqkjv8q3m3of6vehl7"); // htmlstate = htmlpgoto[htmln - 41] + *htmlssp; UNSUPPORTED("76jgop7fzcft7svaac9elxf5b"); // if (0 <= htmlstate && htmlstate <= 271 && htmlcheck[htmlstate] == *htmlssp) UNSUPPORTED("cyell8crufho8sj526w9dpa9r"); // htmlstate = htmltable[htmlstate]; UNSUPPORTED("8983svt6g1kt3l45bd6ju9mw6"); // else UNSUPPORTED("ax3i51ewdb6vli0xfxfpo74le"); // htmlstate = htmldefgoto[htmln - 41]; UNSUPPORTED("c663h0k0l1p8coybbax2cprhf"); // goto htmlnewstate; UNSUPPORTED("brpyacmu3j2c5b5b57c44c6xg"); // /*------------------------------------. UNSUPPORTED("1rjyusg55pk61pcfnxvsb0040"); // | htmlerrlab -- here on detecting error | UNSUPPORTED("46kmo9tkqrq2trhedjhrmq5iu"); // `------------------------------------*/ UNSUPPORTED("9d517ijj31l5l3ckzxd4p2znp"); // htmlerrlab: UNSUPPORTED("6pctfudiscetk242w9vfsytui"); // /* Make sure we have latest lookahead translation. See comments at UNSUPPORTED("9z8lh3976ui2i6adwx4bu8xtu"); // user semantic actions for why this is necessary. */ UNSUPPORTED("6z736i64t6r2qzs9milgcdk1g"); // htmltoken = htmlchar == (-2) ? (-2) : ((unsigned int) (htmlchar) <= 295 ? htmltranslate[htmlchar] : 2); UNSUPPORTED("4yyok9q9sqmbmxchbquk9rz3a"); // /* If not already recovering from an error, report this error. */ UNSUPPORTED("bm2loeytnip4ktaxldi733h6m"); // if (!htmlerrstatus) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("buq37ww7nuj62jmmib12r1mwh"); // ++htmlnerrs; UNSUPPORTED("1bpzuhw3denyecvhx8asdu461"); // htmlerror ("syntax error"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8rogseo26ujq8xs4gggbm7cuw"); // if (htmlerrstatus == 3) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("3jyg22xuaw01ib5n6y8iv3xxr"); // /* If just tried and failed to reuse lookahead token after an UNSUPPORTED("4zj2myg3clgam20xdvt28usk8"); // error, discard it. */ UNSUPPORTED("882e32a616vrj74bwf7wci72l"); // if (htmlchar <= 0) UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("ps0ydhmk8cvulxq94uiebnl3"); // /* Return failure if at end of input. */ UNSUPPORTED("5vfha8pnevahcje16j3nanluo"); // if (htmlchar == 0) UNSUPPORTED("bexuvhp9bbor4sm4tq9c3mqvk"); // goto htmlabortlab; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e2koj2xocq76awegpydpyu62m"); // else UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("6ckiucqebiz712rdwog4hsrrz"); // htmldestruct ("Error: discarding", UNSUPPORTED("csou9g15a99mvw0r7cibdqx9h"); // htmltoken, &htmllval); UNSUPPORTED("ch9nagg8nbc7qnffa8prfjqye"); // htmlchar = (-2); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cngu0btwjacz5b793e8yvi9m1"); // /* Else will try to reuse lookahead token after shifting the error UNSUPPORTED("38vbb7wijegv8on4kj8r2jh3w"); // token. */ UNSUPPORTED("7t9hql86y7nqz2u0lmuofwnz4"); // goto htmlerrlab1; UNSUPPORTED("6iskxmjpvgrnnac6655f5jk67"); // /*---------------------------------------------------. UNSUPPORTED("iicgdcdwq0m5nosdiw4izj9x"); // | htmlerrorlab -- error raised explicitly by YYERROR. | UNSUPPORTED("6a0f8547ydra66tf81ssie9pn"); // `---------------------------------------------------*/ UNSUPPORTED("4i1l4p9hiar4ig5bquwi2jihf"); // htmlerrorlab: UNSUPPORTED("skx5cc7fpyqelhc1lbzwq6gy"); // /* Pacify compilers like GCC when the user code never invokes UNSUPPORTED("4s75galk93le3pveqhpirxulu"); // YYERROR and the label htmlerrorlab therefore never appears in user UNSUPPORTED("2cx96j1h5f1sf0pyotl6w1g31"); // code. */ UNSUPPORTED("9850ib9fy0bgpnxd1mv3rhcl0"); // if (/*CONSTCOND*/ 0) UNSUPPORTED("6zy3m571kj87u92stfjt6opl3"); // goto htmlerrorlab; UNSUPPORTED("2lhgt1uq3z8cnzed8w920d1og"); // /* Do not reclaim the symbols of the rule which action triggered UNSUPPORTED("2qdujvpg7me3yjqefsbmb4nbl"); // this YYERROR. */ UNSUPPORTED("c7j4t24hd7cwzrmx18y9iqwdh"); // (htmlvsp -= (htmllen), htmlssp -= (htmllen)); UNSUPPORTED("bz286e9y9g0xdwt8742rmztvj"); // htmllen = 0; UNSUPPORTED("3nswekisilyfverb25pazm044"); // ; UNSUPPORTED("89np8b0s1ct55jyloknqnd5r6"); // htmlstate = *htmlssp; UNSUPPORTED("7t9hql86y7nqz2u0lmuofwnz4"); // goto htmlerrlab1; UNSUPPORTED("a9uzsnursnm07o2p12lh2sbdg"); // /*-------------------------------------------------------------. UNSUPPORTED("c2s6c3wducdfls67fw5la9uzw"); // | htmlerrlab1 -- common code for both syntax error and YYERROR. | UNSUPPORTED("cinw8ra05yfs6jshwnk7uer8g"); // `-------------------------------------------------------------*/ UNSUPPORTED("4u5v2gjw6xdqaimmd8xxnmmqa"); // htmlerrlab1: UNSUPPORTED("7tra7n5eph1rqkaplx9bx803l"); // htmlerrstatus = 3; /* Each real token shifted decrements this. */ UNSUPPORTED("9qdgu2bhbvj6h80iki9hjhpcx"); // for (;;) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("2za6u6avash54xctdnji0f1q2"); // htmln = htmlpact[htmlstate]; UNSUPPORTED("3yz8nkid1zwkst8vh75hu2n12"); // if (!((htmln) == (-82))) UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("bwuzd1yyx0imm45e3al50jbm2"); // htmln += 1; UNSUPPORTED("b5yucqnz3ohmoz0ut07sm2sx0"); // if (0 <= htmln && htmln <= 271 && htmlcheck[htmln] == 1) UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("doitq6ha9cmmgsv7lbwhrs4lm"); // htmln = htmltable[htmln]; UNSUPPORTED("dxhfg17ims4zjdry4ffy00aku"); // if (0 < htmln) UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1nekbbuf2scf8o8o56p3e2btr"); // /* Pop the current state because it cannot handle the error token. */ UNSUPPORTED("b49suxrb4nncpcv26snr0z7pt"); // if (htmlssp == htmlss) UNSUPPORTED("94rnqtiux3wthf9kn8utqcskz"); // goto htmlabortlab; UNSUPPORTED("bigm8tcgr6vlffs6ikfevaeat"); // htmldestruct ("Error: popping", UNSUPPORTED("9bvdkhmexgs1n9hkxlus6cea0"); // htmlstos[htmlstate], htmlvsp); UNSUPPORTED("4qs0elpwd25wpw12cajvuatqb"); // (htmlvsp -= (1), htmlssp -= (1)); UNSUPPORTED("76dfl5dad6j40axb12pf4cyti"); // htmlstate = *htmlssp; UNSUPPORTED("3ejmh10g3kyn79v59obt4uwve"); // ; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("769m6xe129uc5szy8zzxdhv2d"); // *++htmlvsp = htmllval; UNSUPPORTED("1bunp144fpibi7v7rbgn16l6l"); // /* Shift the error token. */ UNSUPPORTED("3nswekisilyfverb25pazm044"); // ; UNSUPPORTED("c7lyo4hbtrr9qa5r64z6spufb"); // htmlstate = htmln; UNSUPPORTED("c663h0k0l1p8coybbax2cprhf"); // goto htmlnewstate; UNSUPPORTED("179qxptpyl5068065s1ai8g3c"); // /*-------------------------------------. UNSUPPORTED("8ml03sx2gxmgapptl0loa0yye"); // | htmlacceptlab -- YYACCEPT comes here. | UNSUPPORTED("2bvn7c0u1oq31d3b0uk6m3tdy"); // `-------------------------------------*/ UNSUPPORTED("atjzjvu9d92ok6w3boxja3e1s"); // htmlacceptlab: UNSUPPORTED("3jjyvn1odcad6auhoq4bs11j3"); // htmlresult = 0; UNSUPPORTED("9l6jd9stt5ybckzpzyis66nmb"); // goto htmlreturn; UNSUPPORTED("8p4f508auqnz4koon32xrgqkm"); // /*-----------------------------------. UNSUPPORTED("3loqszdjbzlidofdd2axlddqg"); // | htmlabortlab -- YYABORT comes here. | UNSUPPORTED("6p3zuxhtllqujwb6275y1iuol"); // `-----------------------------------*/ UNSUPPORTED("3aouexcwnytfsdj42oyaca2da"); // htmlabortlab: UNSUPPORTED("6i8l4mmmlpggft688iduidz1m"); // htmlresult = 1; UNSUPPORTED("9l6jd9stt5ybckzpzyis66nmb"); // goto htmlreturn; UNSUPPORTED("1visspreqlkrsxbrmmtajzyi0"); // /*-------------------------------------------------. UNSUPPORTED("qpcyk6y55l4vluz5g8ufy011"); // | htmlexhaustedlab -- memory exhaustion comes here. | UNSUPPORTED("3zfwm8se9uqcr4uczanjlo4wx"); // `-------------------------------------------------*/ UNSUPPORTED("aokx2t39kso6px6fmlx7ft34g"); // htmlexhaustedlab: UNSUPPORTED("2rkna5fdak8uri7drj0qu3z5g"); // htmlerror ("memory exhausted"); UNSUPPORTED("8vl21z2phgo2cog42ylxbihos"); // htmlresult = 2; UNSUPPORTED("50117q88lfg743xhieoyg9dtb"); // /* Fall through. */ UNSUPPORTED("dmu8m1pnyblrdchdqxgxnu8yy"); // htmlreturn: UNSUPPORTED("3m562h7x44v05dctlef9nhmxp"); // if (htmlchar != (-2)) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("1yvk3imqcd71tq0dg520dalwv"); // /* Make sure we have latest lookahead translation. See comments at UNSUPPORTED("8f533hh53bahoyrmc8vumq0er"); // user semantic actions for why this is necessary. */ UNSUPPORTED("84q66xdmm7egi73lpjcjdjc6q"); // htmltoken = ((unsigned int) (htmlchar) <= 295 ? htmltranslate[htmlchar] : 2); UNSUPPORTED("3i0moae9oscbnik305696hlos"); // htmldestruct ("Cleanup: discarding lookahead", UNSUPPORTED("e214juwntghvieivfzd3pn7cd"); // htmltoken, &htmllval); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2lhgt1uq3z8cnzed8w920d1og"); // /* Do not reclaim the symbols of the rule which action triggered UNSUPPORTED("brvt6wka5tijolvbute9f9vjy"); // this YYABORT or YYACCEPT. */ UNSUPPORTED("c7j4t24hd7cwzrmx18y9iqwdh"); // (htmlvsp -= (htmllen), htmlssp -= (htmllen)); UNSUPPORTED("3nswekisilyfverb25pazm044"); // ; UNSUPPORTED("3g1bs2oo8txf91nhyrmaprez8"); // while (htmlssp != htmlss) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("d8meoblon1ra750w3rbqlgfje"); // htmldestruct ("Cleanup: popping", UNSUPPORTED("4laubaxw8wx30tmj1hvzp0itg"); // htmlstos[*htmlssp], htmlvsp); UNSUPPORTED("4qs0elpwd25wpw12cajvuatqb"); // (htmlvsp -= (1), htmlssp -= (1)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dfgvzh0l75rqigf8pgwy3u4m2"); // if (htmlss != htmlssa) UNSUPPORTED("7z1yjgom1lw6z0yfz75xfclpw"); // free (htmlss); UNSUPPORTED("96m641qde7y8nrj81kip0kdli"); // /* Make sure YYID is used. */ UNSUPPORTED("4c04yxhxjxnejng4nlpmarh0c"); // return (htmlresult); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dagfnuu2rb04nuow8simrvqdg // htmllabel_t* parseHTML (char* txt, int* warn, htmlenv_t *env) public static Object parseHTML(Object... arg) { UNSUPPORTED("226x3zxbn3f7kzhqucskm0uoq"); // htmllabel_t* UNSUPPORTED("8cvtnulc9n3wdvcnyz42lwhzy"); // parseHTML (char* txt, int* warn, htmlenv_t *env) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("63meyud67rookn7jurut0266j"); // unsigned char buf[128]; UNSUPPORTED("5kki2fqr7sc6h70wuy48nmwoz"); // agxbuf str; UNSUPPORTED("151zh677cirxjroyz07ylg4qu"); // htmllabel_t* l; UNSUPPORTED("ip3d7wcpkp2cvqvcytoydu0c"); // sfont_t dfltf; UNSUPPORTED("bnowsob1rpic47r9qahesp5z9"); // dfltf.cfont = NULL; UNSUPPORTED("1qchcbo1e5aphcn9agydjwpur"); // dfltf.pfont = NULL; UNSUPPORTED("bf7yeekp5lae3g14li808nkom"); // HTMLstate.fontstack = &dfltf; UNSUPPORTED("97wdd3n2my59w2bi1alxtx7gl"); // HTMLstate.tblstack = 0; UNSUPPORTED("5942cc6lkx6yzhwmdaojw2kg4"); // HTMLstate.lbl = 0; UNSUPPORTED("3fpf8hxu4jf37tofuik9m4l1i"); // HTMLstate.gvc = GD_gvc(env->g); UNSUPPORTED("avdl29glu77okugd20p4ev32l"); // HTMLstate.fitemList = dtopen(&fstrDisc, Dtqueue); UNSUPPORTED("e2bulyqtlb1ygl39ntnk15fgp"); // HTMLstate.fspanList = dtopen(&fspanDisc, Dtqueue); UNSUPPORTED("67g016u4kj6rhoy4ltearmu5f"); // agxbinit (&str, 128, buf); UNSUPPORTED("6qe9sv6fwllra61m6ze3qcdml"); // HTMLstate.str = &str; UNSUPPORTED("79h006ssg3lcsf0nzr3jmeear"); // if (initHTMLlexer (txt, &str, env)) {/* failed: no libexpat - give up */ UNSUPPORTED("cf2n9mlnm2nlhfvofhkylf8lu"); // *warn = 2; UNSUPPORTED("8vl68pdd939xriomclc4lhjbd"); // l = NULL; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("e3wc96h4r8zbmwy1sdt30ax31"); // else { UNSUPPORTED("21cpjvbw10v3tqxxuaw7ebs17"); // htmlparse(); UNSUPPORTED("1ts3x58vf766fgbehwhtqjre6"); // *warn = clearHTMLlexer (); UNSUPPORTED("41cqw8kpgh69hd6d7ljh2vi8x"); // l = HTMLstate.lbl; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("4slkyw4zzk5uohd8pvfbzzogm"); // dtclose (HTMLstate.fitemList); UNSUPPORTED("79tfoea2y63wx0wpq88o2sgx1"); // dtclose (HTMLstate.fspanList); UNSUPPORTED("9w2nanryjis49dz84vnpnvcdb"); // HTMLstate.fitemList = NULL; UNSUPPORTED("83u1p988zjx0anlxa62ac2704"); // HTMLstate.fspanList = NULL; UNSUPPORTED("2z66fvlnqunk5hsw63l7pvdb0"); // HTMLstate.fontstack = NULL; UNSUPPORTED("3pycv6y7tnm4uu44fp7ut5yma"); // agxbfree (&str); UNSUPPORTED("29x14oexykxrkgq9s3x6kssi1"); // return l; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/htmltable__c.java000066400000000000000000004304531312650303100225450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import h.textlabel_t; import smetana.core.JUtils; import smetana.core.__ptr__; import smetana.core.__struct__; public class htmltable__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 6ddu6mrp88g3kun2w1gg8ck8t // typedef Dict_t PointSet //1 6t1gwljnc5qkhgkp9oc8y7lhm // typedef Dict_t PointMap //3 4ch470ajf5jjpt0x06pdydd7h // static void pushFontInfo(htmlenv_t * env, textfont_t * fp, textfont_t * savp) public static Object pushFontInfo(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("ayvhpxjw4xcz87pueo2oq06m6"); // pushFontInfo(htmlenv_t * env, textfont_t * fp, textfont_t * savp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9sjgc0h79snkoxdl6iqyjo8u9"); // if (env->finfo.name) { UNSUPPORTED("dk15v13kyf3r8nmxnm74hvp8i"); // if (fp->name) { UNSUPPORTED("ehqqe914nrvdph3vl9gj2ncex"); // savp->name = env->finfo.name; UNSUPPORTED("bt7cngsy9d4toqz7dp31pfqxt"); // env->finfo.name = fp->name; UNSUPPORTED("6to1esmb8qfrhzgtr7jdqleja"); // } else UNSUPPORTED("8peszenokq4ldq1kavowttnkf"); // savp->name = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6w9j6oix2xgb9a97st9tghy29"); // if (env->finfo.color) { UNSUPPORTED("9vra7mcop0lkhg45mujqtnwrg"); // if (fp->color) { UNSUPPORTED("c1py0t0pe23z6aehfyftvxsv0"); // savp->color = env->finfo.color; UNSUPPORTED("ccv0cwzt7o51dys55krsirwia"); // env->finfo.color = fp->color; UNSUPPORTED("6to1esmb8qfrhzgtr7jdqleja"); // } else UNSUPPORTED("6xl4fcz83qtp4etoqtkq51emh"); // savp->color = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e14wtviiw2ahsqfas8e848746"); // if (env->finfo.size >= 0) { UNSUPPORTED("45vo5n3q0mqya54l2s79pgvj6"); // if (fp->size >= 0) { UNSUPPORTED("22vfedi6d9vlihfa03jjob4h4"); // savp->size = env->finfo.size; UNSUPPORTED("bmbq750lqsmtv7a8fj890v9y7"); // env->finfo.size = fp->size; UNSUPPORTED("6to1esmb8qfrhzgtr7jdqleja"); // } else UNSUPPORTED("cchc0ryp37ojo1vgumfsd3abt"); // savp->size = -1.0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eiqsenv0wvs25ylb29oq7hypz // static void popFontInfo(htmlenv_t * env, textfont_t * savp) public static Object popFontInfo(Object... arg) { UNSUPPORTED("1cgn1czuwy1nx4ugy78281irz"); // static void popFontInfo(htmlenv_t * env, textfont_t * savp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6jxnyv4xgyxo0tbyynuv0i6cl"); // if (savp->name) UNSUPPORTED("bu9rkh2xzcxhe9iq28iwvbrkf"); // env->finfo.name = savp->name; UNSUPPORTED("e8o69ol1utirumjuxd1xbcege"); // if (savp->color) UNSUPPORTED("81p6dbb5wa9nwy3nva46jh89f"); // env->finfo.color = savp->color; UNSUPPORTED("8bhlu8bun66gqt3rurt7enkg3"); // if (savp->size >= 0.0) UNSUPPORTED("b1us0jzw6cgn6mrvtl9dkugsy"); // env->finfo.size = savp->size; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2fq7cq3v0wodc2zkdz2nrycbr // static void emit_htextspans(GVJ_t * job, int nspans, htextspan_t * spans, pointf p, double halfwidth_x, textfont_t finfo, boxf b, int simple) public static Object emit_htextspans(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("1wdbin7u1ntostduoa76bdjzz"); // emit_htextspans(GVJ_t * job, int nspans, htextspan_t * spans, pointf p, UNSUPPORTED("crmamnha0rqm8otefy73aptor"); // double halfwidth_x, textfont_t finfo, boxf b, int simple) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dzpsknrwv8qkqq20hjnjpjn68"); // int i, j; UNSUPPORTED("cx9j6xm3jqky3tevy8fneodbe"); // double center_x, left_x, right_x; UNSUPPORTED("7mkw69p8oqa8nlbwb8ud7usiw"); // textspan_t tl; UNSUPPORTED("bj8z0bc2axhhlncbixwp8jh0k"); // textfont_t tf; UNSUPPORTED("3j24sqlnqeaub8hy7zt3lb0b1"); // pointf p_ = { 0.0, 0.0 }; UNSUPPORTED("4r4excvnla9rwlduw55712ow7"); // textspan_t *ti; UNSUPPORTED("45fuq5dh6hs7iztxl5d5wx37f"); // center_x = p.x; UNSUPPORTED("awdpbxohoxsjwiqbanelrauu5"); // left_x = center_x - halfwidth_x; UNSUPPORTED("2hdxhi7odrzpzo04esbm37v42"); // right_x = center_x + halfwidth_x; UNSUPPORTED("d4ev395hthktbjl2ahd7e2wg3"); // /* Initial p is in center of text block; set initial baseline UNSUPPORTED("c67x0nb4cdc1jd4lei5i6nkpx"); // * to top of text block. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("36qa3yr9jm38tawq7w7cx38f9"); // p_.y = p.y + (b.UR.y - b.LL.y) / 2.0; UNSUPPORTED("e1k5mxxhf85gb4u78i302a3ob"); // gvrender_begin_label(job, LABEL_HTML); UNSUPPORTED("c0fuxrmn5hd32tpvw3tpbfy1j"); // for (i = 0; i < nspans; i++) { UNSUPPORTED("8e1nf4mptpu0w5h0f0pzslp6i"); // /* set p.x to leftmost point where the line of text begins */ UNSUPPORTED("19cjwh3w8uwxkcc1xewxtlrop"); // switch (spans[i].just) { UNSUPPORTED("bwy7mh2nb7lz950r20rfilwa4"); // case 'l': UNSUPPORTED("cneergejdojt6gzdoaegxje2p"); // p.x = left_x; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("43ds1cyu29ex66kcjszrcu3mp"); // case 'r': UNSUPPORTED("5x1x2my0jb267e130r4g3kxkq"); // p.x = right_x - spans[i].size; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("f187wptsr73liavtlyoyfovp3"); // case 'n': UNSUPPORTED("66i0a4cbpiqi767bvpzxbjug8"); // p.x = center_x - spans[i].size / 2.0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("aoauejhf6amiurl8cnxru1ruw"); // p_.y -= spans[i].lfsize; /* move to current base line */ UNSUPPORTED("bboaqj628pafi3a0id11gblz"); // ti = spans[i].items; UNSUPPORTED("89pj2bp7x59kxmu9db5k5r9ak"); // for (j = 0; j < spans[i].nitems; j++) { UNSUPPORTED("79pjoi9gupgh1xxtw8ad2gqbv"); // if (ti->font && (ti->font->size > 0)) UNSUPPORTED("6m5sswirwqdnz21zquuj5zemo"); // tf.size = ti->font->size; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("b6lew4k4yh0wfhu7awnjagl63"); // tf.size = finfo.size; UNSUPPORTED("euz91acve0hfy7vofqzv9x881"); // if (ti->font && ti->font->name) UNSUPPORTED("4rfi5an335hkjocd9qof6om2i"); // tf.name = ti->font->name; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("5jcfm7sme1hrdhi04daitbjn9"); // tf.name = finfo.name; UNSUPPORTED("93rk4z6u29nrjzs6j59cs9g4c"); // if (ti->font && ti->font->color) UNSUPPORTED("4w5su152lwqcs6pqj0vph6yhb"); // tf.color = ti->font->color; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("4chspc128mj9l48k9izj3jj6k"); // tf.color = finfo.color; UNSUPPORTED("b9upj0j4iwn0hc005x57k9lxv"); // if (ti->font && ti->font->flags) UNSUPPORTED("b1kz7cxn462c0p6uh8wqj5h8q"); // tf.flags = ti->font->flags; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("c4jea3ke17m0h4331njj2k2wx"); // tf.flags = 0; UNSUPPORTED("8bthw263veuty3iyu3crlyw1m"); // gvrender_set_pencolor(job, tf.color); UNSUPPORTED("e01avz1xuoq9qiajo0anysuq8"); // tl.str = ti->str; UNSUPPORTED("5auykppls49tqnslmibzvq4bs"); // tl.font = &tf; UNSUPPORTED("6csphn5s1ekloz0qqs37knb2"); // tl.yoffset_layout = ti->yoffset_layout; UNSUPPORTED("dsssg5z0nhgclrz1kmcwg84yo"); // if (simple) UNSUPPORTED("660bhxe4zz7qsewdrxxxq9rpg"); // tl.yoffset_centerline = ti->yoffset_centerline; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("bnkdcy6ld9idfpsv8xxvcjdcp"); // tl.yoffset_centerline = 1; UNSUPPORTED("5bj0vlsotfzhyheox1fswybcf"); // tl.font->postscript_alias = ti->font->postscript_alias; UNSUPPORTED("7u3pwcreicp16w0et8ov8ve9v"); // tl.layout = ti->layout; UNSUPPORTED("7dv9mw75h7jmg0f6nhr971okd"); // tl.size.x = ti->size.x; UNSUPPORTED("3vrfk5tpus8rwo5ielpg386bu"); // tl.size.y = spans[i].lfsize; UNSUPPORTED("5014ra1gvrg8ufbmgeym1519n"); // tl.just = 'l'; UNSUPPORTED("bgdzyuoc4xuqzp85ndg7nqmz7"); // p_.x = p.x; UNSUPPORTED("ej1ntvnalv2xauqnm54xcud3m"); // gvrender_textspan(job, p_, &tl); UNSUPPORTED("akh89iduqao9ewsextmw0j1k5"); // p.x += ti->size.x; UNSUPPORTED("6f0wl1s431kpd69mmcufrgwpw"); // ti++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8bm7lzosnhuf0od7i4hkgzovo"); // gvrender_end_label(job); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dpcnkhm24fk5jwfpzzhm5fgn3 // static void emit_html_txt(GVJ_t * job, htmltxt_t * tp, htmlenv_t * env) public static Object emit_html_txt(Object... arg) { UNSUPPORTED("e9atbpbtc2d7k8q5qw64ovfdm"); // static void emit_html_txt(GVJ_t * job, htmltxt_t * tp, htmlenv_t * env) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5grmy02do060obsxdgtm2158r"); // double halfwidth_x; UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("71u0rnrd0pn6urf5ttv39ec5d"); // /* make sure that there is something to do */ UNSUPPORTED("45pxfl6xss9na9vadmromym7f"); // if (tp->nspans < 1) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("990xn02syyupmtffblgyodfu"); // halfwidth_x = ((double) (tp->box.UR.x - tp->box.LL.x)) / 2.0; UNSUPPORTED("dzen0zgkt4ajf73ku622dzt75"); // p.x = env->pos.x + ((double) (tp->box.UR.x + tp->box.LL.x)) / 2.0; UNSUPPORTED("cqd2avduya271k8nsgqe31wzb"); // p.y = env->pos.y + ((double) (tp->box.UR.y + tp->box.LL.y)) / 2.0; UNSUPPORTED("cmb209051thdhuw14z92t5pg2"); // emit_htextspans(job, tp->nspans, tp->spans, p, halfwidth_x, env->finfo, UNSUPPORTED("aagcz98jjnjahy9q5q1j8btyu"); // tp->box, tp->simple); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8aivux1hsy4ynfzwf908d9425 // static void doSide(GVJ_t * job, pointf p, double wd, double ht) public static Object doSide(Object... arg) { UNSUPPORTED("9hbmtms12cm5dzi4mtc03tbex"); // static void doSide(GVJ_t * job, pointf p, double wd, double ht) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bzz7vodjegzgwxp8jzgkq3uti"); // boxf BF; UNSUPPORTED("d9jvfh9fdslw1hjnuw45s09in"); // BF.LL = p; UNSUPPORTED("cyabosmx7t8bqjgd2wmiqsstl"); // BF.UR.x = p.x + wd; UNSUPPORTED("e4tvmn1m0pjoxcl392rrve02d"); // BF.UR.y = p.y + ht; UNSUPPORTED("4gyhh56ucxddr3vef8kyw6f6k"); // gvrender_box(job, BF, 1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3ae4al308do9z1u91clqx27yk // static pointf *mkPts(pointf * AF, boxf b, int border) public static Object mkPts(Object... arg) { UNSUPPORTED("3dw1rz353bav9gjp9j2wnqzwx"); // static pointf *mkPts(pointf * AF, boxf b, int border) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("d4edkjzgg44rvd8pp5xjyhzai"); // AF[0] = b.LL; UNSUPPORTED("68ikexa38d2r5rd9uca10xt4m"); // AF[2] = b.UR; UNSUPPORTED("9u0prsjt76stjycb217a8o1bj"); // if (border > 1) { UNSUPPORTED("9k2v9nw55xh01tivgsr2kmmte"); // double delta = ((double) border) / 2.0; UNSUPPORTED("bdf6c01tajuh0h91fiwbb0k1j"); // AF[0].x += delta; UNSUPPORTED("dogdijfoxebrp2s2qalb4p7ed"); // AF[0].y += delta; UNSUPPORTED("2bmhwj6sof1gc51bp2hc32gue"); // AF[2].x -= delta; UNSUPPORTED("6qwuc8i7npd5lvjk1bj6ntobh"); // AF[2].y -= delta; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("etsgw4ns6exvyfrm7lykdb8pt"); // AF[1].x = AF[2].x; UNSUPPORTED("a2250pkc00wvt8bx8azxq1ug0"); // AF[1].y = AF[0].y; UNSUPPORTED("46of2qdtkfe90ju4owrlotmla"); // AF[3].x = AF[0].x; UNSUPPORTED("ag7v00g9v99sbihn90o3uf6k8"); // AF[3].y = AF[2].y; UNSUPPORTED("1mnc0qamisdd62ud5dfotjxss"); // return AF; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dce0frvo5rjv19prf2almjrsc // static void doBorder(GVJ_t * job, htmldata_t * dp, boxf b) public static Object doBorder(Object... arg) { UNSUPPORTED("52hc3ya0fz8yu9photik0cqpq"); // static void doBorder(GVJ_t * job, htmldata_t * dp, boxf b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bka1u02qeykfmysbaty8fagdo"); // pointf AF[6]; UNSUPPORTED("eaoui6hnrqm4zv0hyd8ch71l2"); // char *sptr[2]; UNSUPPORTED("bivhiv8d8rddwv3gp5ojwoe17"); // char *color = (dp->pencolor ? dp->pencolor : "black"); UNSUPPORTED("brrv66ebgw3j8alwdo84y5j91"); // unsigned short sides; UNSUPPORTED("47mxcz4gh3xivg50vcji1zkle"); // gvrender_set_pencolor(job, color); UNSUPPORTED("9gil9x2la7lnb1r6x47w6z1dn"); // if ((dp->style & ((1 << 8) | (1 << 7)))) { UNSUPPORTED("18t2lq7oi0ioc076pwveiyylm"); // sptr[0] = sptr[1] = NULL; UNSUPPORTED("c7j90iecewfaj3ikxvkgxqntq"); // if (dp->style & (1 << 8)) UNSUPPORTED("1arimccfm8dfvo8sn3uqaei56"); // sptr[0] = "dashed"; UNSUPPORTED("cvdetmxt01f8k7qfrpr09ucb0"); // else if (dp->style & (1 << 7)) UNSUPPORTED("etfi1fkvua8koyo0oeczvr5pv"); // sptr[0] = "dotted"; UNSUPPORTED("3gjhmgbb1mgyvfg9i5tk9yqk9"); // gvrender_set_style(job, sptr); UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("aw7zhlkbn1bg9h9hrlr9by8ty"); // gvrender_set_style(job, job->gvc->defaultlinestyle); UNSUPPORTED("4syhycpnromleuxorrgr402ue"); // gvrender_set_penwidth(job, dp->border); UNSUPPORTED("binjmuc3gaivlw02tzkhqurz4"); // if (dp->style & (1 << 2)) UNSUPPORTED("cr5wvmcp1hcrciq849nro6bau"); // round_corners(job, mkPts(AF, b, dp->border), 4, (1 << 2), 0); UNSUPPORTED("a5bzyy70j86zl3d51aomliw7t"); // else if ((sides = (dp->flags & ((1 << 10)|(1 << 11)|(1 << 12)|(1 << 13))))) { UNSUPPORTED("elvrl0ugvmy5wdaudhp8q0x1f"); // mkPts (AF+1, b, dp->border); /* AF[1-4] has LL=SW,SW,UR=NE,NW */ UNSUPPORTED("dv871y4rc4uesm2yj93050e04"); // switch (sides) { UNSUPPORTED("b418lqrq8nhtc8fmj08z0uhjc"); // case (1 << 13) : UNSUPPORTED("f0j6147rgvvdq9babhvzkx3v3"); // gvrender_polyline(job, AF+1, 2); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("adguwi89t3xlfadiq7zxmc0fr"); // case (1 << 12) : UNSUPPORTED("fft8g5x7554aunjp9t27mqx6"); // gvrender_polyline(job, AF+2, 2); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("vodid4dz4eaok1lar4yr7hmu"); // case (1 << 11) : UNSUPPORTED("ciwgc00o3ddbgflc4wx7zikl8"); // gvrender_polyline(job, AF+3, 2); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("ca75h85p6k2ude0ubwr1a58zj"); // case (1 << 10) : UNSUPPORTED("akfl3n1qd20stpahy8hxjgljy"); // AF[0] = AF[4]; UNSUPPORTED("9nhrbbkzn6ygl91paz8e19asp"); // gvrender_polyline(job, AF, 2); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("3w9wsi8bbk6288yv6b4pfspvc"); // case (1 << 13)|(1 << 12) : UNSUPPORTED("a47r7oga8tq4em0kognbm6qx9"); // gvrender_polyline(job, AF+1, 3); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("d1dja30kjmmxufddn0l47b4mc"); // case (1 << 12)|(1 << 11) : UNSUPPORTED("1hy7xzwfjhch0o3gvki6nvzo5"); // gvrender_polyline(job, AF+2, 3); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5hmsp6qllnohzdwzocnmtyhfy"); // case (1 << 11)|(1 << 10) : UNSUPPORTED("bsi9lo2bt8tmx13kqphteuvyv"); // AF[5] = AF[1]; UNSUPPORTED("d75yfdk8rhx81oojmrlj4thq9"); // gvrender_polyline(job, AF+3, 3); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("tqroh08i78z3756on4h6kwbm"); // case (1 << 10)|(1 << 13) : UNSUPPORTED("akfl3n1qd20stpahy8hxjgljy"); // AF[0] = AF[4]; UNSUPPORTED("dlx7644q57yvur2sse9b5gbwi"); // gvrender_polyline(job, AF, 3); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("7qtekc57ncwbe0ibfc28oyh24"); // case (1 << 13)|(1 << 12)|(1 << 11) : UNSUPPORTED("dga4asln6akuwoc9lmy1jdeuw"); // gvrender_polyline(job, AF+1, 4); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5vr6eapb6fws5d0o0q1246sg6"); // case (1 << 12)|(1 << 11)|(1 << 10) : UNSUPPORTED("bsi9lo2bt8tmx13kqphteuvyv"); // AF[5] = AF[1]; UNSUPPORTED("6u5k821gfdh25a6rtw7r9o98b"); // gvrender_polyline(job, AF+2, 4); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("3ujcup82mwhoml2883i0ql8p9"); // case (1 << 11)|(1 << 10)|(1 << 13) : UNSUPPORTED("bsi9lo2bt8tmx13kqphteuvyv"); // AF[5] = AF[1]; UNSUPPORTED("1vmvdrs0ui0vizmb4k9klzyqh"); // AF[6] = AF[2]; UNSUPPORTED("8rtorgtkayhnqu9yhdpwuomr7"); // gvrender_polyline(job, AF+3, 4); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("epx02rqvb1inqo2wug164vihk"); // case (1 << 10)|(1 << 13)|(1 << 12) : UNSUPPORTED("akfl3n1qd20stpahy8hxjgljy"); // AF[0] = AF[4]; UNSUPPORTED("14xhaf4bz1keg87bpnoalfth2"); // gvrender_polyline(job, AF, 4); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("6cxzwe83jxubrfavr8bjd6jqd"); // case (1 << 11)|(1 << 13) : UNSUPPORTED("f0j6147rgvvdq9babhvzkx3v3"); // gvrender_polyline(job, AF+1, 2); UNSUPPORTED("ciwgc00o3ddbgflc4wx7zikl8"); // gvrender_polyline(job, AF+3, 2); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("20222itint1dfutqfthxmy0fu"); // case (1 << 10)|(1 << 12) : UNSUPPORTED("akfl3n1qd20stpahy8hxjgljy"); // AF[0] = AF[4]; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("ea0o8v6n00qqc2pf2da8mfehy"); // if (dp->border > 1) { UNSUPPORTED("8c46gz8xuuenxi35l0effpt7"); // double delta = ((double) dp->border) / 2.0; UNSUPPORTED("9hlzluzk9kn86vrozs2sasmnn"); // b.LL.x += delta; UNSUPPORTED("4ytgf1a0tyaylau0eeisj8rm8"); // b.LL.y += delta; UNSUPPORTED("557s3yvdqlk7j0fd392ho7vbm"); // b.UR.x -= delta; UNSUPPORTED("nio7shto4xl0i52cv1e7l3ro"); // b.UR.y -= delta; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3oyvs93iyanf46imnfq2ris4r"); // gvrender_box(job, b, 0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3sn3xxwciwsnysgpxkk25bbu3 // static int setFill(GVJ_t * job, char *color, int angle, int style, char *clrs[2]) public static Object setFill(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("arvrzi4iwxk807sj8rrhzk9hn"); // setFill(GVJ_t * job, char *color, int angle, int style, char *clrs[2]) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3ml0gugucwlbwt5mbcdlymm8b"); // int filled; UNSUPPORTED("c1fbv1vbw987h17be6s51zft4"); // float frac; UNSUPPORTED("45rrefspa8b28sxxgm2is02kq"); // if (findStopColor(color, clrs, &frac)) { UNSUPPORTED("btot0jrrd4byob85hrpdvj41t"); // gvrender_set_fillcolor(job, clrs[0]); UNSUPPORTED("1jiuua6jebyguapuvhefyhdji"); // if (clrs[1]) UNSUPPORTED("4io9gt2degxn4spb11kpchiaw"); // gvrender_set_gradient_vals(job, clrs[1], angle, frac); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("5mogvfll6q8umk9i37mhlkt7m"); // gvrender_set_gradient_vals(job, "black", angle, frac); UNSUPPORTED("ebsxmacu2gext8rz06fbgojnb"); // if (style & (1 << 1)) UNSUPPORTED("ajo4gtldjfin7wqcfsueasd6u"); // filled = 3; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("92j6l6cj3uzbc2rojubnolpiq"); // filled = 2; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("8jkw84z9v2sgxja8neagg70yn"); // gvrender_set_fillcolor(job, color); UNSUPPORTED("wgi1jlomdsgec9gfae0fj8md"); // filled = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("buetng4l8583m1m13dhcxke3g"); // gvrender_set_pencolor(job, "transparent"); UNSUPPORTED("6p2dbpbafmtoar1mvn7fsavoy"); // return filled; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 27rny3qpw3j6r42b1s34uyl25 // static int initAnchor(GVJ_t * job, htmlenv_t * env, htmldata_t * data, boxf b, htmlmap_data_t * save, int closePrev) public static Object initAnchor(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("8oquq7zad174i5s01j6hzxatt"); // initAnchor(GVJ_t * job, htmlenv_t * env, htmldata_t * data, boxf b, UNSUPPORTED("88g72cs505wdz4y6qimsa8y1c"); // htmlmap_data_t * save, int closePrev) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("500ymf94p2papk2ytrz9nj5x7"); // int changed; UNSUPPORTED("dronm56qc8dhvagqi0x0khih8"); // char *id; UNSUPPORTED("8rujt60yyvytjyfto1qa8z94p"); // static int anchorId; UNSUPPORTED("4bzwqkmomkxfmljrfhduzmtrs"); // int internalId = 0; UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("4gk0vs9kob345ti7s9pxhm3f5"); // char intbuf[30]; /* hold 64-bit decimal integer */ UNSUPPORTED("h0or3v13348vfl22jqz895yc"); // unsigned char buf[128]; UNSUPPORTED("2wl17wf6lpprwq14nqkl3j1k7"); // save->url = obj->url; UNSUPPORTED("emcdtw6askrkn9t86vapt5rr8"); // save->tooltip = obj->tooltip; UNSUPPORTED("1rt6accl7yg1ie6kat68ejvfm"); // save->target = obj->target; UNSUPPORTED("6hbk4r0d0ri01g9pzilu6gltl"); // save->id = obj->id; UNSUPPORTED("a33136jt3dxu76pyfkgpxa7kv"); // save->explicit_tooltip = obj->explicit_tooltip; UNSUPPORTED("actqp0zv95dft5dthjbvnwc7b"); // id = data->id; UNSUPPORTED("7pvpn352cuq3v9r0633som3w7"); // if (!id || !*id) { /* no external id, so use the internal one */ UNSUPPORTED("el1z2krv8hoorc5c7vjsxw7yn"); // agxbinit(&xb, 128, buf); UNSUPPORTED("6cf0b0m48l6jloznb9lpt032g"); // if (!env->objid) { UNSUPPORTED("5akl6s47a4zv2waqo5py31ybb"); // env->objid = strdup(getObjId(job, obj->u.n, &xb)); UNSUPPORTED("57it9hg0sjcy1n7658baw0dw"); // env->objid_set = 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dxdwkcwuosj9fmhjxlh8k6117"); // agxbput(&xb, env->objid); UNSUPPORTED("altkpafun07s08rrvi0axy8w2"); // sprintf(intbuf, "_%d", anchorId++); UNSUPPORTED("8fxx4xfv51pqm8opelh5kviyy"); // agxbput(&xb, intbuf); UNSUPPORTED("2yaeafkratzyu6wvhwzdafnle"); // id = (((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf)); UNSUPPORTED("9xzpefvqd6cn68r0em10mnlaf"); // internalId = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bny3kvzd21zrb2fv51dh6vp57"); // changed = UNSUPPORTED("3qgg5qoivh60416otam1l29ni"); // initMapData(job, NULL, data->href, data->title, data->target, id, UNSUPPORTED("5wtoz6nfrxfpi8rko85wbjpdg"); // obj->u.g); UNSUPPORTED("57q03cer71cgr283csvafhpmi"); // if (internalId) UNSUPPORTED("52frst03mcbsuu6bmnqs962qm"); // agxbfree(&xb); UNSUPPORTED("20w7d59r1l0c34y8izq32fd0e"); // if (changed) { UNSUPPORTED("40u2h01cve93h09wdngc9v2xr"); // if (closePrev && (save->url || save->explicit_tooltip)) UNSUPPORTED("dtwdqlhxsk4vpro8m02pot0co"); // gvrender_end_anchor(job); UNSUPPORTED("5kiy870zrsfdm18u60b2qdstn"); // if (obj->url || obj->explicit_tooltip) { UNSUPPORTED("965ahzs7vr7qs12j0s1m4eev5"); // emit_map_rect(job, b); UNSUPPORTED("12436nj34of615tb94t3cw2h0"); // gvrender_begin_anchor(job, UNSUPPORTED("2rwb38hipr5rxkwxfdzzwkdmy"); // obj->url, obj->tooltip, obj->target, UNSUPPORTED("4x188hxybttaubn1tt4tf710k"); // obj->id); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("d7ura79gme5dbnqgva7yvjtmk"); // return changed; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ah2sn0gm8xfyu3faoljt1whui // static void endAnchor(GVJ_t * job, htmlmap_data_t * save, int openPrev) public static Object endAnchor(Object... arg) { UNSUPPORTED("eiujc2cdqb4ubx9bzhrbgkr0d"); // static void endAnchor(GVJ_t * job, htmlmap_data_t * save, int openPrev) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("spdml5d3q3jza61kjh4zxw31"); // if (obj->url || obj->explicit_tooltip) UNSUPPORTED("e3o6yrnsv8lko5fql4f8a9gly"); // gvrender_end_anchor(job); UNSUPPORTED("8fzstdzz2sjbbmabm5yv8lm6f"); // if(obj->url != save->url) {free(obj->url); obj->url = save->url;}; UNSUPPORTED("equg7aq6w951t0g9hyjm03cfx"); // if(obj->tooltip != save->tooltip) {free(obj->tooltip); obj->tooltip = save->tooltip;}; UNSUPPORTED("2y9evx2wu20y4zezgwj96ekck"); // if(obj->target != save->target) {free(obj->target); obj->target = save->target;}; UNSUPPORTED("79i4o9yiwyvti1rpmqbhnuk4h"); // if(obj->id != save->id) {free(obj->id); obj->id = save->id;}; UNSUPPORTED("2zkwjxipgs1w6encwrwypxhqn"); // obj->explicit_tooltip = save->explicit_tooltip; UNSUPPORTED("497o6k3vv69n2kyxjrzbjoges"); // if (openPrev && (obj->url || obj->explicit_tooltip)) UNSUPPORTED("6e7g66eeo7n8h8mq556pt3xxy"); // gvrender_begin_anchor(job, UNSUPPORTED("8g7o4dsbwgp9ggtiktgt2m41t"); // obj->url, obj->tooltip, obj->target, UNSUPPORTED("c8tk2e711ojwsnar0y39a73cf"); // obj->id); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 75if0l45ti15rgx7p5f0f1xy1 // static void emit_html_rules(GVJ_t * job, htmlcell_t * cp, htmlenv_t * env, char *color, htmlcell_t* nextc) public static Object emit_html_rules(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("7k8576uq5xrhmrpgtayxldmst"); // emit_html_rules(GVJ_t * job, htmlcell_t * cp, htmlenv_t * env, char *color, htmlcell_t* nextc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dsaekwh74gtjixmtzev2nsp4l"); // pointf rule_pt; UNSUPPORTED("c7vrup19iax6yjbwasb982a16"); // double rule_length; UNSUPPORTED("2uhttu43wce24zfysxl83fxv"); // unsigned char base; UNSUPPORTED("96jja5vo8t36z1sflrj0x8vi4"); // boxf pts = cp->data.box; UNSUPPORTED("1inwrhhir5qtddjy60bnbfaft"); // pointf pos = env->pos; UNSUPPORTED("safdto74hbmxy1bx51npyt80"); // if (!color) UNSUPPORTED("ehe6g5s4foni0psldwx2ikwnq"); // color = "black"; UNSUPPORTED("ba58kdrkh9glwbjy7j4i2b1ot"); // gvrender_set_fillcolor(job, color); UNSUPPORTED("47mxcz4gh3xivg50vcji1zkle"); // gvrender_set_pencolor(job, color); UNSUPPORTED("25x16taqru10db3c03lv2frmd"); // pts = cp->data.box; UNSUPPORTED("970xro1x23dmefkex4vsgzo87"); // pts.LL.x += pos.x; UNSUPPORTED("b2fjdw9a9zxpb6bex19mnsi7p"); // pts.UR.x += pos.x; UNSUPPORTED("4psuod2tpmculqarprgy08klq"); // pts.LL.y += pos.y; UNSUPPORTED("7ritccw0fl1mnkt7zcus4wc3t"); // pts.UR.y += pos.y; UNSUPPORTED("7byu0ep15pzlkbdmg8vxvnhwz"); // //Determine vertical line coordinate and length UNSUPPORTED("8wvxs6dnzjzzky8qrtdrc8yak"); // if ((cp->ruled & 1) && (cp->col + cp->cspan < cp->parent->cc)) { UNSUPPORTED("brzkv0bcmu5apwj6lrdrvdx6f"); // if (cp->row == 0) { // first row UNSUPPORTED("5ygh915zztqud2g0j0qtuxim6"); // // extend to center of table border and add half cell spacing UNSUPPORTED("eh9k3fhettdy9qynvsyhrhjnc"); // base = cp->parent->data.border + cp->parent->data.space / 2; UNSUPPORTED("7nke4g7i0aytgilfgl7ct3mt1"); // rule_pt.y = pts.LL.y - cp->parent->data.space / 2; UNSUPPORTED("1dttgmxu2mzw1rc8nq0myyag6"); // } else if (cp->row + cp->rspan == cp->parent->rc) { // bottom row UNSUPPORTED("5ygh915zztqud2g0j0qtuxim6"); // // extend to center of table border and add half cell spacing UNSUPPORTED("eh9k3fhettdy9qynvsyhrhjnc"); // base = cp->parent->data.border + cp->parent->data.space / 2; UNSUPPORTED("6bo6v2q3t7x2l6lukf9ztb982"); // rule_pt.y = pts.LL.y - cp->parent->data.space / 2 - base; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("8o30az75fgnltomih0tsaedht"); // base = 0; UNSUPPORTED("7nke4g7i0aytgilfgl7ct3mt1"); // rule_pt.y = pts.LL.y - cp->parent->data.space / 2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3by23fc6milbzv6mf6yp2h6ua"); // rule_pt.x = pts.UR.x + cp->parent->data.space / 2; UNSUPPORTED("alyqi5ei1m1qmdmj1g8vg6n8q"); // rule_length = base + pts.UR.y - pts.LL.y + cp->parent->data.space; UNSUPPORTED("78sk2ct6bk7jwj2mmpuwarmvw"); // doSide(job, rule_pt, 0, rule_length); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e0g5sglrgymots3xetcoiq4cv"); // //Determine the horizontal coordinate and length UNSUPPORTED("cudao13pgjtpyth3sik1bfwxn"); // if ((cp->ruled & 2) && (cp->row + cp->rspan < cp->parent->rc)) { UNSUPPORTED("7b0ks1nwek4bq76npdbwp0qlx"); // if (cp->col == 0) { // first column UNSUPPORTED("5ygh915zztqud2g0j0qtuxim6"); // // extend to center of table border and add half cell spacing UNSUPPORTED("eh9k3fhettdy9qynvsyhrhjnc"); // base = cp->parent->data.border + cp->parent->data.space / 2; UNSUPPORTED("7s5fmlmnp3ro8rplc48up32jh"); // rule_pt.x = pts.LL.x - base - cp->parent->data.space / 2; UNSUPPORTED("d84du087kda0rvywg60dgylyg"); // if (cp->col + cp->cspan == cp->parent->cc) // also last column UNSUPPORTED("44yz3hcq70udyoyffhkq7ldpi"); // base *= 2; UNSUPPORTED("2iq4jft6fpdkskyapkzpio00c"); // /* incomplete row of cells; extend line to end */ UNSUPPORTED("kptimmjzk2nl60rrdxqh5t1b"); // else if (nextc && (nextc->row != cp->row)) { UNSUPPORTED("c62o1jotsnbk8sjzrgfg7q35s"); // base += (cp->parent->data.box.UR.x + pos.x) - (pts.UR.x + cp->parent->data.space / 2); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6vgh1uythbalqd5m71q3gr1il"); // } else if (cp->col + cp->cspan == cp->parent->cc) { // last column UNSUPPORTED("5ygh915zztqud2g0j0qtuxim6"); // // extend to center of table border and add half cell spacing UNSUPPORTED("eh9k3fhettdy9qynvsyhrhjnc"); // base = cp->parent->data.border + cp->parent->data.space / 2; UNSUPPORTED("24kcyntk7yf6w7bfuni8lrl4"); // rule_pt.x = pts.LL.x - cp->parent->data.space / 2; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("8o30az75fgnltomih0tsaedht"); // base = 0; UNSUPPORTED("24kcyntk7yf6w7bfuni8lrl4"); // rule_pt.x = pts.LL.x - cp->parent->data.space / 2; UNSUPPORTED("2iq4jft6fpdkskyapkzpio00c"); // /* incomplete row of cells; extend line to end */ UNSUPPORTED("bl8g0enq4c0odtx7h2pxbhq7l"); // if (nextc && (nextc->row != cp->row)) { UNSUPPORTED("c62o1jotsnbk8sjzrgfg7q35s"); // base += (cp->parent->data.box.UR.x + pos.x) - (pts.UR.x + cp->parent->data.space / 2); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("a16drwk9w8puysojv02wjyy70"); // rule_pt.y = pts.LL.y - cp->parent->data.space / 2; UNSUPPORTED("6e7yz3gbd8pyzk8ajd6n0uyze"); // rule_length = base + pts.UR.x - pts.LL.x + cp->parent->data.space; UNSUPPORTED("7na99jxymwc946gqpz6cisv7w"); // doSide(job, rule_pt, rule_length, 0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 26zfaec64xs5h6zhbfqva70tp // static void emit_html_tbl(GVJ_t * job, htmltbl_t * tbl, htmlenv_t * env) public static Object emit_html_tbl(Object... arg) { UNSUPPORTED("ni0mji8xwi6vyoc0i92fspkz"); // static void emit_html_tbl(GVJ_t * job, htmltbl_t * tbl, htmlenv_t * env) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eh0o4a2mhf75hmedici0y7vjm"); // boxf pts = tbl->data.box; UNSUPPORTED("1inwrhhir5qtddjy60bnbfaft"); // pointf pos = env->pos; UNSUPPORTED("f5l5qsm1xxo2fnsp38chcf009"); // htmlcell_t **cells = tbl->u.n.cells; UNSUPPORTED("7hxwbqi0ato9k2b4nzpp7uw3a"); // htmlcell_t *cp; UNSUPPORTED("c8p7i7oozhr11poil2ax0mjdh"); // static textfont_t savef; UNSUPPORTED("bq5er65wlottydwze8xwtg1h8"); // htmlmap_data_t saved; UNSUPPORTED("9vo2dpf5d55fy577acu1mj2tl"); // int anchor; /* if true, we need to undo anchor settings. */ UNSUPPORTED("a6neawb1l9iwhlxyqeylmtibj"); // int doAnchor = (tbl->data.href || tbl->data.target); UNSUPPORTED("en6q26cyrg17g6yd6el73b3ns"); // pointf AF[4]; UNSUPPORTED("acdkiuky8vkjaqqynxn9e052i"); // if (tbl->font) UNSUPPORTED("84z3c9pimg6qaq5qubuumky79"); // pushFontInfo(env, tbl->font, &savef); UNSUPPORTED("970xro1x23dmefkex4vsgzo87"); // pts.LL.x += pos.x; UNSUPPORTED("b2fjdw9a9zxpb6bex19mnsi7p"); // pts.UR.x += pos.x; UNSUPPORTED("4psuod2tpmculqarprgy08klq"); // pts.LL.y += pos.y; UNSUPPORTED("7ritccw0fl1mnkt7zcus4wc3t"); // pts.UR.y += pos.y; UNSUPPORTED("f3x83tha6dbjv8et188fbkgv0"); // if (doAnchor && !(job->flags & (1<<2))) UNSUPPORTED("eu3jff1gbyq1xntsjrbfjonso"); // anchor = initAnchor(job, env, &tbl->data, pts, &saved, 1); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("xon7ajllko0vvswhzsgmednw"); // anchor = 0; UNSUPPORTED("dvrnei7g4il5it0wohet6xnf6"); // if (!(tbl->data.style & (1 << 5))) { UNSUPPORTED("ecfz3q6oeloqz1k3bt4anr2so"); // /* Fill first */ UNSUPPORTED("49uj7uuo9i7yhd6t4dvf0gdpu"); // if (tbl->data.bgcolor) { UNSUPPORTED("b0tr7jsjw3kgi4yn1hhyfobdl"); // char *clrs[2]; UNSUPPORTED("a153tdlqtl2xw7njhvpt043g0"); // int filled = UNSUPPORTED("cm0x1gxytxrgtzsh3ge94uinf"); // setFill(job, tbl->data.bgcolor, tbl->data.gradientangle, UNSUPPORTED("4d69xnxzol7epr6mdsj8zysu0"); // tbl->data.style, clrs); UNSUPPORTED("c2iwbxo1co1ewyyccihrcfvmx"); // if (tbl->data.style & (1 << 2)) { UNSUPPORTED("1w38undy36it7wj8962by2l6f"); // round_corners(job, mkPts(AF, pts, tbl->data.border), 4, UNSUPPORTED("696pg1sjw1u5lbale66nm3vbk"); // (1 << 2), filled); UNSUPPORTED("afk9bpom7x393euamnvwwkx6b"); // } else UNSUPPORTED("78v3zjdcsy6x51hs6krs94y97"); // gvrender_box(job, pts, filled); UNSUPPORTED("9b960wuid1g0sjsnq1ssdlupg"); // free(clrs[0]); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1mmt73zvtvn2nghxnfnxtc0kz"); // while (*cells) { UNSUPPORTED("44aes03vbpouog4dgqqltikcg"); // emit_html_cell(job, *cells, env); UNSUPPORTED("dmjx9beoeijjbajf48o2tid3"); // cells++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7cx9d9bes58uqm95nr7dv7i3o"); // /* Draw table rules and border. UNSUPPORTED("657qfjgczf11baij6c45ccza1"); // * Draw after cells so we can draw over any fill. UNSUPPORTED("5xszoc3r0xxyklzrzy04teljz"); // * At present, we set the penwidth to 1 for rules until we provide the calculations to take UNSUPPORTED("5qj39gsiwu4famovm3ia6z93"); // * into account wider rules. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("q289jp9oo0zjlhjdsrgtzcza"); // cells = tbl->u.n.cells; UNSUPPORTED("b7dznfykmm4m5amplksw2hugq"); // gvrender_set_penwidth(job, 1.0); UNSUPPORTED("4dy3q3g9m3eng3vpzdn1x7zm0"); // while ((cp = *cells++)) { UNSUPPORTED("ee52kdy81klqq7cmjmjinz2h8"); // if (cp->ruled) UNSUPPORTED("4y97t5dc09eyhzjbaj4skq10t"); // emit_html_rules(job, cp, env, tbl->data.pencolor, *cells); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("94klyg9yeplgiz4vceng5lz4l"); // if (tbl->data.border) UNSUPPORTED("d8qeuyglru3eejyrmh48uuvhw"); // doBorder(job, &tbl->data, pts); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2wq341pf2s0q76y7y29dpvhyv"); // if (anchor) UNSUPPORTED("d5c2xq1sacfxrx17n6tmzv0su"); // endAnchor(job, &saved, 1); UNSUPPORTED("8t96ufc0yimks592h7dgt7fgc"); // if (doAnchor && (job->flags & (1<<2))) { UNSUPPORTED("6tyc47helx3fqyuqe3kiiqg1v"); // if (initAnchor(job, env, &tbl->data, pts, &saved, 0)) UNSUPPORTED("96ubcu0fxunhzdlteep62gaqn"); // endAnchor(job, &saved, 0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("acdkiuky8vkjaqqynxn9e052i"); // if (tbl->font) UNSUPPORTED("aqz3bhc3ot0j0okxcmu0ic2r"); // popFontInfo(env, &savef); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 92q18yuuh3uq9twxcmz0wqvwv // static void emit_html_img(GVJ_t * job, htmlimg_t * cp, htmlenv_t * env) public static Object emit_html_img(Object... arg) { UNSUPPORTED("6mdos47goc2mvm0icpzihjr9p"); // static void emit_html_img(GVJ_t * job, htmlimg_t * cp, htmlenv_t * env) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ctvmenh2xwttzvzv2mrj2pizl"); // pointf A[4]; UNSUPPORTED("95f2fzk7cq8awu76ojroabjlp"); // boxf bb = cp->box; UNSUPPORTED("b0zlo29j4cz4islrycyp9yh5t"); // char *scale; UNSUPPORTED("dshffz34w11b0wa4g9flan4v8"); // bb.LL.x += env->pos.x; UNSUPPORTED("92entkh719bz8q8w8bngwhriq"); // bb.LL.y += env->pos.y; UNSUPPORTED("1b2f3qtk4yp6vuk0c9heken47"); // bb.UR.x += env->pos.x; UNSUPPORTED("6ceef7urui4dup1053b74emoq"); // bb.UR.y += env->pos.y; UNSUPPORTED("bs113h0iq49pk03iqb8k3335s"); // A[0] = bb.UR; UNSUPPORTED("85ic0v7v8u5fxw4u3alxwioql"); // A[2] = bb.LL; UNSUPPORTED("ey5qp8hbyjjhg367b72imurix"); // A[1].x = A[2].x; UNSUPPORTED("3z9cu0j5nm76l5yv8u7hy57r4"); // A[1].y = A[0].y; UNSUPPORTED("2dgs8ab0mnywmi602emidh5fb"); // A[3].x = A[0].x; UNSUPPORTED("34wjmru8jm4j6bnmr0zpacz05"); // A[3].y = A[2].y; UNSUPPORTED("cvvp26byccjdjur8vyj2na0gg"); // if (cp->scale) UNSUPPORTED("70nzi2ugyepaipmmqyrb9e7z6"); // scale = cp->scale; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("3pgplheeamhfaf1nrope24u0j"); // scale = env->imgscale; UNSUPPORTED("a3l15kztb6svcikvleaqkcd5"); // assert(cp->src); UNSUPPORTED("xegpl263i0dts5vximsivicf"); // assert(cp->src[0]); UNSUPPORTED("41m8g0lte7tdgb8n0lp2n93xh"); // gvrender_usershape(job, cp->src, A, 4, NOT(0), scale); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2yyg33cwscbca36c9p9ls9gmb // static void emit_html_cell(GVJ_t * job, htmlcell_t * cp, htmlenv_t * env) public static Object emit_html_cell(Object... arg) { UNSUPPORTED("czikvsl8tr4dfiv0ulisikbe7"); // static void emit_html_cell(GVJ_t * job, htmlcell_t * cp, htmlenv_t * env) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bq5er65wlottydwze8xwtg1h8"); // htmlmap_data_t saved; UNSUPPORTED("96jja5vo8t36z1sflrj0x8vi4"); // boxf pts = cp->data.box; UNSUPPORTED("1inwrhhir5qtddjy60bnbfaft"); // pointf pos = env->pos; UNSUPPORTED("3wt0qjlqdo7dj9y9mkgqmzcl7"); // int inAnchor, doAnchor = (cp->data.href || cp->data.target); UNSUPPORTED("en6q26cyrg17g6yd6el73b3ns"); // pointf AF[4]; UNSUPPORTED("970xro1x23dmefkex4vsgzo87"); // pts.LL.x += pos.x; UNSUPPORTED("b2fjdw9a9zxpb6bex19mnsi7p"); // pts.UR.x += pos.x; UNSUPPORTED("4psuod2tpmculqarprgy08klq"); // pts.LL.y += pos.y; UNSUPPORTED("7ritccw0fl1mnkt7zcus4wc3t"); // pts.UR.y += pos.y; UNSUPPORTED("f3x83tha6dbjv8et188fbkgv0"); // if (doAnchor && !(job->flags & (1<<2))) UNSUPPORTED("1kdpibhzgmx8gpycns42won0r"); // inAnchor = initAnchor(job, env, &cp->data, pts, &saved, 1); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("f045ekukc7ij51txyyak08m68"); // inAnchor = 0; UNSUPPORTED("33scttptilyx6theysesc9hip"); // if (!(cp->data.style & (1 << 5))) { UNSUPPORTED("6ml4s15hyx0kjl4ttsgulxmsu"); // if (cp->data.bgcolor) { UNSUPPORTED("b0tr7jsjw3kgi4yn1hhyfobdl"); // char *clrs[2]; UNSUPPORTED("a153tdlqtl2xw7njhvpt043g0"); // int filled = UNSUPPORTED("bggyewy5jsq8xs6p6uqmwz8yo"); // setFill(job, cp->data.bgcolor, cp->data.gradientangle, UNSUPPORTED("le3x5plb2e92puqisbimymik"); // cp->data.style, clrs); UNSUPPORTED("wor7z65hono519ti6np00g10"); // if (cp->data.style & (1 << 2)) { UNSUPPORTED("1pv247t0tpabjh2167wkpeki9"); // round_corners(job, mkPts(AF, pts, cp->data.border), 4, UNSUPPORTED("696pg1sjw1u5lbale66nm3vbk"); // (1 << 2), filled); UNSUPPORTED("afk9bpom7x393euamnvwwkx6b"); // } else UNSUPPORTED("78v3zjdcsy6x51hs6krs94y97"); // gvrender_box(job, pts, filled); UNSUPPORTED("9b960wuid1g0sjsnq1ssdlupg"); // free(clrs[0]); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cnstcgxihlyyk8wmy1qbr98iy"); // if (cp->data.border) UNSUPPORTED("5ykjzrgfwm9e7lzqomfwnkscl"); // doBorder(job, &cp->data, pts); UNSUPPORTED("3juggmzxcmifv5024m0f0qxqg"); // if (cp->child.kind == 1) UNSUPPORTED("agfo0e6jmuvx19adgs0pvpefw"); // emit_html_tbl(job, cp->child.u.tbl, env); UNSUPPORTED("bo3wy073jgs1e3sue7tnvsotj"); // else if (cp->child.kind == 3) UNSUPPORTED("7q20ab255li6w6fnfu54yjdlh"); // emit_html_img(job, cp->child.u.img, env); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("7cmlz1ub801m6gzdyohkkjoy2"); // emit_html_txt(job, cp->child.u.txt, env); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("75xsmmeykk7ez8sw11jbre3zy"); // if (inAnchor) UNSUPPORTED("d5c2xq1sacfxrx17n6tmzv0su"); // endAnchor(job, &saved, 1); UNSUPPORTED("8t96ufc0yimks592h7dgt7fgc"); // if (doAnchor && (job->flags & (1<<2))) { UNSUPPORTED("anfrwbjdhelhkcp08dbui2mu0"); // if (initAnchor(job, env, &cp->data, pts, &saved, 0)) UNSUPPORTED("96ubcu0fxunhzdlteep62gaqn"); // endAnchor(job, &saved, 0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wy0mqtzrkhcvbguv66mv2zrn // static void allocObj(GVJ_t * job) public static Object allocObj(Object... arg) { UNSUPPORTED("bn0p5no9j7nwlzitfiys1fijz"); // static void allocObj(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8lamppsqs7nhiu5v8k1f5jfh2"); // obj_state_t *obj; UNSUPPORTED("nhwvta7sb3wcvdnmw01rma9o"); // obj_state_t *parent; UNSUPPORTED("1iexddadjo0w6fdgddatfx40s"); // obj = push_obj_state(job); UNSUPPORTED("1ewmspxangaopf94n1rw1y14i"); // parent = obj->parent; UNSUPPORTED("dhamf5corzrp7m86t9hfp30yj"); // obj->type = parent->type; UNSUPPORTED("404l3gn9kccmjaza33x5h3fzz"); // obj->emit_state = parent->emit_state; UNSUPPORTED("4yzc1zw17q6yo4xboi9z52as8"); // switch (obj->type) { UNSUPPORTED("6p9myrtihahet32sl09ru0heu"); // case NODE_OBJTYPE: UNSUPPORTED("dbd51k17w8t0ddwpy5bg5vp42"); // obj->u.n = parent->u.n; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("7smigc57825a1zb9xuxq3ql18"); // case ROOTGRAPH_OBJTYPE: UNSUPPORTED("my43ctqu2yizbfvanbbsradk"); // obj->u.g = parent->u.g; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3lga3h3kjrn75p6p4giv4q2yv"); // case CLUSTER_OBJTYPE: UNSUPPORTED("8jbc50a4r8xfcwi2db156a1xu"); // obj->u.sg = parent->u.sg; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("4vi5wvx6iqb199sct0s663mpj"); // case EDGE_OBJTYPE: UNSUPPORTED("8jz6uzkwckygawqhoixwcsusc"); // obj->u.e = parent->u.e; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5yci1onvhmtz0gdj686x4qhkw"); // obj->url = parent->url; UNSUPPORTED("4pc3bnqpmihfqis6v1sqaqva9"); // obj->tooltip = parent->tooltip; UNSUPPORTED("6n4o3yegj2vn63hl72840caz7"); // obj->target = parent->target; UNSUPPORTED("5t9m8zfnmlz9az08312o1zk30"); // obj->explicit_tooltip = parent->explicit_tooltip; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3mabixy4ji5v1l1l5q9om0x4y // static void freeObj(GVJ_t * job) public static Object freeObj(Object... arg) { UNSUPPORTED("9xbg7byr2iikj3spqxioe890s"); // static void freeObj(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("cid25b1n5mughekwf1rgz4sdl"); // obj->url = NULL; UNSUPPORTED("37fra7odhf1aaqmgt6u3jkocg"); // obj->tooltip = NULL; UNSUPPORTED("55gjprw91c8dy1u8h7a2n56dt"); // obj->target = NULL; UNSUPPORTED("6jzimjzizo9d0rqik05zn9ux8"); // obj->id = NULL; UNSUPPORTED("39iamwq9cd9iv3d2iyiaq8gz9"); // pop_obj_state(job); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ddm4xxn8hy635ldbmntgizzkh // static double heightOfLbl (htmllabel_t * lp) public static Object heightOfLbl(Object... arg) { UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double UNSUPPORTED("3cec4m7dvd9a2d7cmauwa0wl3"); // heightOfLbl (htmllabel_t * lp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5uxlck4fsq9eog3czplkal9tn"); // double sz = 0.0; UNSUPPORTED("em9mokioy59mljk7qnevn287u"); // switch (lp->kind) { UNSUPPORTED("d0gk15gzj4wz8nv54zbr285hm"); // case 1: UNSUPPORTED("58kb2v4y1iig58dpphr8kp1kp"); // sz = lp->u.tbl->data.box.UR.y - lp->u.tbl->data.box.LL.y; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("33l7a58zp8vj6fuliwdkk2nkn"); // case 3: UNSUPPORTED("69uxpw91jshir9eiltd7y4vzb"); // sz = lp->u.img->box.UR.y - lp->u.img->box.LL.y; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("4u5xz2u3urj13y0aw30fdyup5"); // case 2: UNSUPPORTED("8fvcxjngtixii4s32tymkerbc"); // sz = lp->u.txt->box.UR.y - lp->u.txt->box.LL.y; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ban3s2canux7qwxava1n2e4v2"); // return sz; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9kxusredw550222rw4tuvj6tw // void emit_html_label(GVJ_t * job, htmllabel_t * lp, textlabel_t * tp) public static Object emit_html_label(Object... arg) { UNSUPPORTED("827ar9bsah6y44hkc2l0x2yyj"); // void emit_html_label(GVJ_t * job, htmllabel_t * lp, textlabel_t * tp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3safvfkd3g1jswoj457mw482u"); // htmlenv_t env; UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("7oqkrsdoq858mhdu3qru3k7q5"); // allocObj(job); UNSUPPORTED("93ubxlhijuwcy92rptpniqoj2"); // p = tp->pos; UNSUPPORTED("ebm5wrhicnk2k8g6idvbvr6x8"); // switch (tp->valign) { UNSUPPORTED("c66d69vmpko3goomc3npvjhy3"); // case 't': UNSUPPORTED("2zsr5cioxxui011zsf2jrxla5"); // p.y = tp->pos.y + (tp->space.y - heightOfLbl(lp))/ 2.0 - 1; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5coaag9ev3fzc0jtpkjkfvhd2"); // case 'b': UNSUPPORTED("b7lduijv2mnk1hrx74v3wsi8y"); // p.y = tp->pos.y - (tp->space.y - heightOfLbl(lp))/ 2.0 - 1; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("8jmef3sfg06sme4q6t23ms8i7"); // default: UNSUPPORTED("3rnvr25kgs8f2wgve2amfmo22"); // /* no-op */ UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("19gcxobv20tvbfloknhb6uv0t"); // env.pos = p; UNSUPPORTED("6ldhuqhlhimfvexg4vyan5brp"); // env.finfo.color = tp->fontcolor; UNSUPPORTED("1ntqemdt0h1gim0fvyt92xnkf"); // env.finfo.name = tp->fontname; UNSUPPORTED("czy6ynncgdz7e32r0wn409mjh"); // env.finfo.size = tp->fontsize; UNSUPPORTED("bvrkxii1nme9b46mvoq9pr24w"); // env.imgscale = agget(job->obj->u.n, "imagescale"); UNSUPPORTED("5was42a52ej882alb3wh25b3g"); // env.objid = job->obj->id; UNSUPPORTED("lz4ny06l3w8df6ndpeertex"); // env.objid_set = 0; UNSUPPORTED("b9ewr9ofzes5k2n2ej3dxjxm3"); // if ((env.imgscale == NULL) || (env.imgscale[0] == '\0')) UNSUPPORTED("dfkmgn7rcfrfhimdh301afmip"); // env.imgscale = "false"; UNSUPPORTED("a7snh64jgwowaf459e8c4yo2a"); // if (lp->kind == 1) { UNSUPPORTED("2lg29o5disaqe0730aa70fsdg"); // htmltbl_t *tbl = lp->u.tbl; UNSUPPORTED("ddp6q4j4nc83pmloaupfxvl7"); // /* set basic graphics context */ UNSUPPORTED("2bejqzroco2e9apsokolfefxd"); // /* Need to override line style set by node. */ UNSUPPORTED("aw7zhlkbn1bg9h9hrlr9by8ty"); // gvrender_set_style(job, job->gvc->defaultlinestyle); UNSUPPORTED("ez6y0qhrd59suvmeebxxapgmw"); // if (tbl->data.pencolor) UNSUPPORTED("1fd3huwog3ibg9g5x5dvq1pre"); // gvrender_set_pencolor(job, tbl->data.pencolor); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("51nbay7blmakvnciy2wquowf1"); // gvrender_set_pencolor(job, "black"); UNSUPPORTED("cdb6g3vx7n1tb1g8upgk63v1x"); // emit_html_tbl(job, tbl, &env); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("aizb92w6okzokdzxdvwem5fjg"); // emit_html_txt(job, lp->u.txt, &env); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("atvr5zqtoe1gvgjfl08vqvanb"); // if (env.objid_set) UNSUPPORTED("22aw68k0gw59cu3vfvu7qk30h"); // free(env.objid); UNSUPPORTED("ecsopdkgrrlklu3ztuzi0m6tx"); // freeObj(job); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bzoc2l4jkwpjnu8uhijkh7jqn // void free_html_data(htmldata_t * dp) public static Object free_html_data(Object... arg) { UNSUPPORTED("dqo3q5rjr3xogz5zf2ttohimm"); // void free_html_data(htmldata_t * dp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8y5nvjzidhbl04fcvvosnh2cq"); // free(dp->href); UNSUPPORTED("z3n0xp5izrwm47idnam7jblz"); // free(dp->port); UNSUPPORTED("67vccrz53cuxcv9z9e22223h8"); // free(dp->target); UNSUPPORTED("6tnzfvbp1p6j44w1dl24ran0q"); // free(dp->id); UNSUPPORTED("1ip1vyptthz69upq114tljq62"); // free(dp->title); UNSUPPORTED("a6ugsu920ej21e6itf84tu9cb"); // free(dp->bgcolor); UNSUPPORTED("9f39dxcdfgaz57ugym4ad8gsr"); // free(dp->pencolor); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4250mxcggii14uzmucxqskd4h // void free_html_text(htmltxt_t * t) public static Object free_html_text(Object... arg) { UNSUPPORTED("a32qj5cyojlxov1ntqwnextyt"); // void free_html_text(htmltxt_t * t) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("54t9ueqlp5jhflgur5q1rnvcy"); // htextspan_t *tl; UNSUPPORTED("4r4excvnla9rwlduw55712ow7"); // textspan_t *ti; UNSUPPORTED("dzpsknrwv8qkqq20hjnjpjn68"); // int i, j; UNSUPPORTED("5argi21if75rbjrs1eyhsuhnz"); // if (!t) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("6ydq8nzmraitjy5yz749x91cs"); // tl = t->spans; UNSUPPORTED("6npcr5e7p97tnnlypb9oqrms2"); // for (i = 0; i < t->nspans; i++) { UNSUPPORTED("1vhu3rza67dase6bsxrym4uin"); // ti = tl->items; UNSUPPORTED("56cjtbt7j7pf7kp3q6wau7u3h"); // for (j = 0; j < tl->nitems; j++) { UNSUPPORTED("2deo2tc186a4sb3pu417hmd3a"); // if (ti->str) UNSUPPORTED("72bxoexh2wbe3czgn40mzmfuk"); // free(ti->str); UNSUPPORTED("77cx2m775gkfqsmyx3neyu6g"); // if (ti->layout && ti->free_layout) UNSUPPORTED("204a53a6qznb93ud39narh2om"); // ti->free_layout(ti->layout); UNSUPPORTED("6f0wl1s431kpd69mmcufrgwpw"); // ti++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("p4j973vosg77way5mbvo1ehp"); // tl++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("aelvrrzvf2kj5t8l44djt9spw"); // if (t->spans) UNSUPPORTED("7kcx5fl3gf4dbufoz3qi141x5"); // free(t->spans); UNSUPPORTED("21sb47r4zqvovwo1ttkh8ql49"); // free(t); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1ag0y1j2z1j2lll9sqzo80ds5 // void free_html_img(htmlimg_t * ip) public static Object free_html_img(Object... arg) { UNSUPPORTED("ct5oxr3idkvuopfdine5us5pk"); // void free_html_img(htmlimg_t * ip) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8jcxwqtd2up96dxw0yrcql1ii"); // free(ip->src); UNSUPPORTED("8c4j24iy781tlk3vbgkeh7b0v"); // free(ip); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8zewpo49ed6tnn0j5hunzms6n // static void free_html_cell(htmlcell_t * cp) public static Object free_html_cell(Object... arg) { UNSUPPORTED("3lsa1e19d2sb3u7wxcf0q6drn"); // static void free_html_cell(htmlcell_t * cp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2anyxy6xbkv0nhv1oijffmuj8"); // free_html_label(&cp->child, 0); UNSUPPORTED("1yict2c0zx2hlabmjbwq0595w"); // free_html_data(&cp->data); UNSUPPORTED("b92mco4tx3q32bgicibdv7yjn"); // free(cp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4ajotfuuo16w4bnu75faio9aw // static void free_html_tbl(htmltbl_t * tbl) public static Object free_html_tbl(Object... arg) { UNSUPPORTED("b80jiab9bv3an4keu3a1itd63"); // static void free_html_tbl(htmltbl_t * tbl) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dvv43a5s6gakrufdzk2xbsdh1"); // htmlcell_t **cells; UNSUPPORTED("8v942or5ma3j9izbbfa3v9jcw"); // if (tbl->rc == -1) { UNSUPPORTED("7cvujz50mnqwdoqey7bjcgvl4"); // dtclose(tbl->u.p.rows); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("q289jp9oo0zjlhjdsrgtzcza"); // cells = tbl->u.n.cells; UNSUPPORTED("cysh14mq0hcnng0iruek7l81d"); // free(tbl->heights); UNSUPPORTED("3bg8e6k3pauiwm4tsze59f04o"); // free(tbl->widths); UNSUPPORTED("1mmt73zvtvn2nghxnfnxtc0kz"); // while (*cells) { UNSUPPORTED("ahv3jghkwzkq1o8sjrm9x0u"); // free_html_cell(*cells); UNSUPPORTED("dmjx9beoeijjbajf48o2tid3"); // cells++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1nklfe6js9jl7wyg0evhvyxfn"); // free(tbl->u.n.cells); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5snkzektoabkm8psx5i1zwj1a"); // free_html_data(&tbl->data); UNSUPPORTED("1vdg4wr4ao9szbdo7awvbthnv"); // free(tbl); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4jhvo7ir2kbb8ephhue06iewo // void free_html_label(htmllabel_t * lp, int root) public static Object free_html_label(Object... arg) { UNSUPPORTED("px6brhgrrpzjieaugbuctqyk"); // void free_html_label(htmllabel_t * lp, int root) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f2d8uwg4ovq9ypi8u1ko3kav6"); // if (lp->kind == 1) UNSUPPORTED("4njkoolh4hwk3tjfhhl4u311n"); // free_html_tbl(lp->u.tbl); UNSUPPORTED("qsuubfg7ephplydfaondbf7e"); // else if (lp->kind == 3) UNSUPPORTED("8lpcn9ohbxfqha73u52buzrbv"); // free_html_img(lp->u.img); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("nvah0tt1wc9cs5qosxj9m760"); // free_html_text(lp->u.txt); UNSUPPORTED("dqseu01ng2nnpewmpp95sm688"); // if (root) UNSUPPORTED("b8jdnilib79yb0fpw3xckwmi2"); // free(lp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5c34vls2f3ixvg8t5410ax0db // static htmldata_t *portToCell(htmlcell_t * cp, char *id) public static Object portToCell(Object... arg) { UNSUPPORTED("9jvs5orxfd5qdafa6ji4ui0xq"); // static htmldata_t *portToCell(htmlcell_t * cp, char *id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bgibs5jyhxno9axl91okrdtmp"); // htmldata_t *rv; UNSUPPORTED("6wwtj22p5d8kf1vxm6kz89sa0"); // if (cp->data.port && (strcasecmp(cp->data.port, id) == 0)) UNSUPPORTED("91xw2foc7qhxl5qtetg92darg"); // rv = &cp->data; UNSUPPORTED("532so049m9rwv6q34gbsn5922"); // else if (cp->child.kind == 1) UNSUPPORTED("81xv65uhrgyuos0h75imdpnw6"); // rv = portToTbl(cp->child.u.tbl, id); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("52b2tnzwipbuygdvyeyxg1lij"); // rv = NULL; UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6xsutw08hlknw0tpar5xs0i21 // static htmldata_t *portToTbl(htmltbl_t * tp, char *id) public static Object portToTbl(Object... arg) { UNSUPPORTED("e551f60lz4x2wuvcjjin4gw93"); // static htmldata_t *portToTbl(htmltbl_t * tp, char *id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bgibs5jyhxno9axl91okrdtmp"); // htmldata_t *rv; UNSUPPORTED("dvv43a5s6gakrufdzk2xbsdh1"); // htmlcell_t **cells; UNSUPPORTED("7hxwbqi0ato9k2b4nzpp7uw3a"); // htmlcell_t *cp; UNSUPPORTED("73gxyfkn146pw3twnpimo98gx"); // if (tp->data.port && (strcasecmp(tp->data.port, id) == 0)) UNSUPPORTED("dpbyxk6ui3u1kx64lm556ay6j"); // rv = &tp->data; UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("52b2tnzwipbuygdvyeyxg1lij"); // rv = NULL; UNSUPPORTED("38b5jofj445wn2c558bpt1075"); // cells = tp->u.n.cells; UNSUPPORTED("4dy3q3g9m3eng3vpzdn1x7zm0"); // while ((cp = *cells++)) { UNSUPPORTED("1om5sn0zpyk7ajkfcripgaueb"); // if ((rv = portToCell(cp, id))) UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9uxvepjmnfsmf2vy6czz4hgkq // boxf *html_port(node_t * n, char *pname, int *sides) public static Object html_port(Object... arg) { UNSUPPORTED("b42ganybwd4banjp31wuq2juv"); // boxf *html_port(node_t * n, char *pname, int *sides) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjoetrcwy2ns2t1sx1w9nlyiw"); // htmldata_t *tp; UNSUPPORTED("7w3zjklk3hfz7iikzn0ljroxx"); // htmllabel_t *lbl = ND_label(n)->u.html; UNSUPPORTED("aydqqzhyziv7lgf18ih236m1d"); // boxf *rv = NULL; UNSUPPORTED("bxxfl0a5dpbgktosi79rwsvee"); // if (lbl->kind == 2) UNSUPPORTED("11hwqop4xebvtcskop4uhpp01"); // return NULL; UNSUPPORTED("avhthu8guhst319hhy3gzojcv"); // tp = portToTbl(lbl->u.tbl, pname); UNSUPPORTED("7hdtys3akqmtbw7kbkm786zc"); // if (tp) { UNSUPPORTED("bu515ksy06cwdblsq7802i1ex"); // rv = &tp->box; UNSUPPORTED("1ah6txqnf2ldpui2wwgjncilp"); // *sides = tp->sides; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 73uo7f1blvl7rkz3l1k3z9l6g // int html_path(node_t * n, port * p, int side, boxf * rv, int *k) public static Object html_path(Object... arg) { UNSUPPORTED("f3mv81w2m6lobd446eh7pz18h"); // int html_path(node_t * n, port * p, int side, boxf * rv, int *k) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9ipfcmt80ki80d60bv5414jkq // static int size_html_txt(GVC_t *gvc, htmltxt_t * ftxt, htmlenv_t * env) public static Object size_html_txt(Object... arg) { UNSUPPORTED("d2km41hnc3ukssi3t1z0xv6mk"); // static int size_html_txt(GVC_t *gvc, htmltxt_t * ftxt, htmlenv_t * env) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("enucywxrrro23vyn8ydzoliy6"); // double xsize = 0.0; /* width of text block */ UNSUPPORTED("7dg32psdksxmt8fd0gorumk1h"); // double ysize = 0.0; /* height of text block */ UNSUPPORTED("9l6vfw13niud6alhiqi4uhwin"); // double lsize; /* height of current line */ UNSUPPORTED("dkipd1a21c1fzqdf1csy7okss"); // double mxfsize = 0.0; /* max. font size for the current line */ UNSUPPORTED("7mc3jifq4fjkreg0m7pi96tdf"); // double curbline = 0.0; /* dist. of current base line from top */ UNSUPPORTED("3zlnn621zia9mss7z1ay24myc"); // pointf sz; UNSUPPORTED("dzpsknrwv8qkqq20hjnjpjn68"); // int i, j; UNSUPPORTED("3v9r060xsqi6l9jiy85s1s7x4"); // double width; UNSUPPORTED("afpbxgz63hnj24xiizysaql1x"); // textspan_t lp; UNSUPPORTED("5abu3maiexjxxoig1g2wyd31a"); // textfont_t tf = {NULL,NULL,NULL,0.0,0,0}; UNSUPPORTED("5talng91mi09bja09a1tv4dxl"); // double maxoffset, mxysize; UNSUPPORTED("c0qbc8ly0mwekyzvw96ckqgpt"); // int simple = 1; /* one item per span, same font size/face, no flags */ UNSUPPORTED("9103ua5swh6vaeuhaogzkqtk6"); // double prev_fsize = -1; UNSUPPORTED("b8rr6ma0a6r840xw8og46ayow"); // char* prev_fname = NULL; UNSUPPORTED("7roi5t8l55rt8fze3i4uwenso"); // for (i = 0; i < ftxt->nspans; i++) { UNSUPPORTED("3b11n95lmlcps125gzrpuhd60"); // if (ftxt->spans[i].nitems > 1) { UNSUPPORTED("2ufhyole2xrujdr0y5f3dapya"); // simple = 0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cm9qwoqfamvcyfvlr30d1nr1s"); // if (ftxt->spans[i].items[0].font) { UNSUPPORTED("ecmjgaovdkhit3tnckxg4v0y"); // if (ftxt->spans[i].items[0].font->flags) { UNSUPPORTED("aecxhqz0c4vwc078325h5ljrt"); // simple = 0; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("49gocrv6srqo4yv635dma1shh"); // if (ftxt->spans[i].items[0].font->size > 0) UNSUPPORTED("91yvqdmg0u2smgfzakc1p9dnk"); // tf.size = ftxt->spans[i].items[0].font->size; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("awkvukgqu0eammzy2rura0l1y"); // tf.size = env->finfo.size; UNSUPPORTED("rbvih6otx8lotsuu944eju4q"); // if (ftxt->spans[i].items[0].font->name) UNSUPPORTED("5cqcm2kyaa5urbz64j71aqq7o"); // tf.name = ftxt->spans[i].items[0].font->name; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("34123u1eshd6obe9mldzjt1r"); // tf.name = env->finfo.name; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("eiweww00wuhewrvjrctiiqmiu"); // tf.size = env->finfo.size; UNSUPPORTED("847ge9b9nnqjog5lqgkml19aw"); // tf.name = env->finfo.name; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3xpqh1q6f1vll4kmk1gukc63b"); // if (prev_fsize == -1) UNSUPPORTED("ena1833cax4c34kotbdwvak1w"); // prev_fsize = tf.size; UNSUPPORTED("9gjeg14gc64m5qqla00fmz25m"); // else if (tf.size != prev_fsize) { UNSUPPORTED("2ufhyole2xrujdr0y5f3dapya"); // simple = 0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("by2xnz0o3ry8q2v9nbzg6hwyp"); // if (prev_fname == NULL) UNSUPPORTED("dnep357finkc976a48n5pwi87"); // prev_fname = tf.name; UNSUPPORTED("3psnb2eu2dg8uhj5w0870elb9"); // else if (strcmp(tf.name,prev_fname)) { UNSUPPORTED("2ufhyole2xrujdr0y5f3dapya"); // simple = 0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("adewtwe2se314ad82rrfbxesn"); // ftxt->simple = simple; UNSUPPORTED("7roi5t8l55rt8fze3i4uwenso"); // for (i = 0; i < ftxt->nspans; i++) { UNSUPPORTED("9a0avbfjwenvg2d47qtbuweua"); // width = 0; UNSUPPORTED("ef1hr3ewvs5nmkhfvc1gzb601"); // mxysize = maxoffset = mxfsize = 0; UNSUPPORTED("a8mqt4e5j3hdjdhews2hyprzx"); // for (j = 0; j < ftxt->spans[i].nitems; j++) { UNSUPPORTED("2q7qg0luja620dal3icll3y1u"); // lp.str = UNSUPPORTED("7wkvclr4amgbwidu7am4n4e9"); // strdup_and_subst_obj(ftxt->spans[i].items[j].str, UNSUPPORTED("7gc1i4xy06rr13mkrm064alwg"); // env->obj); UNSUPPORTED("es1uhegi53zlginv3fn377ttk"); // if (ftxt->spans[i].items[j].font) { UNSUPPORTED("17j1uniuegk5u051dn25pw3gq"); // if (ftxt->spans[i].items[j].font->flags) UNSUPPORTED("efpnh435bdcd1n2kezs5ktvzy"); // tf.flags = ftxt->spans[i].items[j].font->flags; UNSUPPORTED("6j7143szr4h1b06ypdvgtzej8"); // else if (env->finfo.flags > 0) UNSUPPORTED("6c0bi1u8w68y8po1xfwuza6zj"); // tf.flags = env->finfo.flags; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("36yrkbq7bp25lf1dz2mplj4cr"); // tf.flags = 0; UNSUPPORTED("391164cwoz9v397x9u8rkjhk9"); // if (ftxt->spans[i].items[j].font->size > 0) UNSUPPORTED("85ubstqj5l4yw6iqfb5u9q59k"); // tf.size = ftxt->spans[i].items[j].font->size; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("89nphq4w74dlj3z8c7bthttp6"); // tf.size = env->finfo.size; UNSUPPORTED("3qtgtzijdke73w4qdtw1vodsc"); // if (ftxt->spans[i].items[j].font->name) UNSUPPORTED("d1kpg0d61zktgy8fllqpl6r04"); // tf.name = ftxt->spans[i].items[j].font->name; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("8equhc9vu57xbon3reu2t9s9d"); // tf.name = env->finfo.name; UNSUPPORTED("5rlflpehqczriol571hddwbft"); // if (ftxt->spans[i].items[j].font->color) UNSUPPORTED("ld97oa2r4mvkqigz9a2d4glz"); // tf.color = ftxt->spans[i].items[j].font->color; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("dtu7lsz1utlh40uq649hvgf4c"); // tf.color = env->finfo.color; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("awkvukgqu0eammzy2rura0l1y"); // tf.size = env->finfo.size; UNSUPPORTED("34123u1eshd6obe9mldzjt1r"); // tf.name = env->finfo.name; UNSUPPORTED("8n92kg5u3m10wsr6jm62eg61h"); // tf.color = env->finfo.color; UNSUPPORTED("b8gve1m5o0h09srrlc52qno68"); // tf.flags = env->finfo.flags; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6pujfv7mkl0ts8acvvhf7j68l"); // lp.font = (*(((Dt_t*)(gvc->textfont_dt))->searchf))((gvc->textfont_dt),(void*)(&tf),0000001); UNSUPPORTED("8i186h7avjprd8q600uev4dk1"); // sz = textspan_size(gvc, &lp); UNSUPPORTED("7sve52bt0sg994yujeqnj1ee7"); // free(ftxt->spans[i].items[j].str); UNSUPPORTED("7n5xxqc7bf785b3vg6wkyq0jv"); // ftxt->spans[i].items[j].str = lp.str; UNSUPPORTED("45hl6as36hx999jz2k9g10ydj"); // ftxt->spans[i].items[j].size.x = sz.x; UNSUPPORTED("1abxhbvjvo1u1ttvi1p342jus"); // ftxt->spans[i].items[j].yoffset_layout = lp.yoffset_layout; UNSUPPORTED("6g3vck94x70rwugsm0aoabrqb"); // ftxt->spans[i].items[j].yoffset_centerline = lp.yoffset_centerline; UNSUPPORTED("54axi70lqceno3tc3rz1ehng2"); // ftxt->spans[i].items[j].font = lp.font; UNSUPPORTED("7jhou5j13sjleso6feiatoaoc"); // ftxt->spans[i].items[j].layout = lp.layout; UNSUPPORTED("3pw936hxlpcr69shtp6sgowsa"); // ftxt->spans[i].items[j].free_layout = lp.free_layout; UNSUPPORTED("9oopx30hvgm8ftp8r0nn4e8bj"); // width += sz.x; UNSUPPORTED("518m1khvmder7vqvp0hldjgbh"); // mxfsize = MAX(tf.size, mxfsize); UNSUPPORTED("exovf1xn9ctmplyx33mja1vrz"); // mxysize = MAX(sz.y, mxysize); UNSUPPORTED("7f5yprewzsb1w8754ep93fkas"); // maxoffset = MAX(lp.yoffset_centerline, maxoffset); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ezt62wz8fz2o3ynaz4cj9e2zi"); // /* lsize = mxfsize * LINESPACING; */ UNSUPPORTED("30psssu8agnd1086emgoq0j0b"); // ftxt->spans[i].size = width; UNSUPPORTED("2pdquaaidownb36jtsp0198oi"); // /* ysize - curbline is the distance from the previous UNSUPPORTED("d2q7magpdfwbuals4dhm82b59"); // * baseline to the bottom of the previous line. UNSUPPORTED("3wys2nt4su7dijofyuoxp9pmy"); // * Then, in the current line, we set the baseline to UNSUPPORTED("axlmhbsh0mbomfxq2r02eaesx"); // * be 5/6 of the max. font size. Thus, lfsize gives the UNSUPPORTED("c57kku7dcto56eurjfru5mcfl"); // * distance from the previous baseline to the new one. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("8b6b6ts1hmhvfeducque2k20f"); // /* ftxt->spans[i].lfsize = 5*mxfsize/6 + ysize - curbline; */ UNSUPPORTED("8e7c80dt5illziz5bnck5nft"); // if (simple) { UNSUPPORTED("1lgfxabhycl91meyft2sugowo"); // lsize = mxysize; UNSUPPORTED("50npm85hpqd4x3w4xtik1u0u5"); // if (i == 0) UNSUPPORTED("b6293djsci1slar86ugvgwtkr"); // ftxt->spans[i].lfsize = mxfsize; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("1exk3htppob7dv9g9hc0l1pzv"); // ftxt->spans[i].lfsize = mxysize; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("avcy589gnqhgyyp2tux4tls9s"); // lsize = mxfsize; UNSUPPORTED("50npm85hpqd4x3w4xtik1u0u5"); // if (i == 0) UNSUPPORTED("5bq15etm4r7y0cnxjp7qvi3cw"); // ftxt->spans[i].lfsize = mxfsize - maxoffset; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("1afl0nxukpasbalw1t7k9kxsg"); // ftxt->spans[i].lfsize = mxfsize + ysize - curbline - maxoffset; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c88f3q21nlbmz7y64utrma2z"); // curbline += ftxt->spans[i].lfsize; UNSUPPORTED("2ga6jsghpcuynpdx3txf2nqhe"); // xsize = MAX(width, xsize); UNSUPPORTED("73jrgxmapbnlleqehfcmycu3s"); // ysize += lsize; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3fj51aqjdetus99zq60mg1ypb"); // ftxt->box.UR.x = xsize; UNSUPPORTED("8cfp3ggtw6g1e0uqqcx26jefm"); // if (ftxt->nspans == 1) UNSUPPORTED("7tvnz7crdx3mw7m6vcs6oxgva"); // ftxt->box.UR.y = mxysize; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("bcedf5nxsnwkift6t9h41s2ui"); // ftxt->box.UR.y = ysize; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 du4alvh2eyanoeurjmm7ne2s4 // static int size_html_img(htmlimg_t * img, htmlenv_t * env) public static Object size_html_img(Object... arg) { UNSUPPORTED("6r0cp3mjbmapso0uy6kf5q4ec"); // static int size_html_img(htmlimg_t * img, htmlenv_t * env) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("ecz4e03zumggc8tfymqvirexq"); // int rv; UNSUPPORTED("akqyk09dlbng8gurbyg17dnc1"); // b.LL.x = b.LL.y = 0; UNSUPPORTED("2k247zgqlchbw2dvvvh6zzimq"); // b.UR = gvusershape_size(env->g, img->src); UNSUPPORTED("d94e3v5u12wnsanl2dvvtj03y"); // if ((b.UR.x == -1) && (b.UR.y == -1)) { UNSUPPORTED("885b2fn5ijjlk16dudzm5udhi"); // rv = 1; UNSUPPORTED("7750x6ix0c448pufsv2h39l23"); // b.UR.x = b.UR.y = 0; UNSUPPORTED("7j1wmlsuz5bc945ul66p0h5vd"); // agerr(AGERR, "No or improper image file=\"%s\"\n", img->src); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("40zoypg37zonwb7nuewxdti29"); // rv = 0; UNSUPPORTED("4fgus4ctyrpzvzutk2t3sbnjz"); // GD_has_images(env->g) = NOT(0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("d21fe9xn70gegafov7uebg3qb"); // B2BF(b, img->box); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9orvnos51tdgi1w930vz5ilu1 // static int size_html_cell(graph_t * g, htmlcell_t * cp, htmltbl_t * parent, htmlenv_t * env) public static Object size_html_cell(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("et2mfady8pt9b8i3f4edn6s70"); // size_html_cell(graph_t * g, htmlcell_t * cp, htmltbl_t * parent, UNSUPPORTED("7rsvpji8pk71yfh6vlnrcw0gr"); // htmlenv_t * env) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ecz4e03zumggc8tfymqvirexq"); // int rv; UNSUPPORTED("52iqo1icikig1r6cfl67l4jdi"); // pointf sz, child_sz; UNSUPPORTED("15vcjwivk85sj24txzc1mf1gj"); // int margin; UNSUPPORTED("etselr2dt8ar5gvmwaoxy6y5l"); // cp->parent = parent; UNSUPPORTED("50dv6t5z0wyku6dllqff1iv27"); // if (!(cp->data.flags & (1 << 6))) { UNSUPPORTED("97fl9muv1jfeao4gxqpymm13j"); // if (parent->data.flags & (1 << 6)) UNSUPPORTED("5u116ukt7yjaroekwqs54hjrk"); // cp->data.pad = parent->data.pad; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("41ktgcwfypets5u32iewdvbeb"); // cp->data.pad = 2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("699bf6m7xqdahtsehkvxitqyt"); // if (!(cp->data.flags & (1 << 5))) { UNSUPPORTED("5xc4uyj2wyxyxasjffnwwva8t"); // if (parent->cb >= 0) UNSUPPORTED("c5vnaur3t856lfk08as21f2du"); // cp->data.border = parent->cb; UNSUPPORTED("ezmlqin03d78ffwtn6wcl8jgz"); // else if (parent->data.flags & (1 << 5)) UNSUPPORTED("3vpuhzaojqfvz1oqrfjpcdal5"); // cp->data.border = parent->data.border; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("8crqygmgfeul39h4ks24fgbl4"); // cp->data.border = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6vkx3zam2bwthfmvig3p2y9ec"); // if (cp->child.kind == 1) { UNSUPPORTED("cmmw9z4fxqb6lsmxh9enkp17a"); // rv = size_html_tbl(g, cp->child.u.tbl, cp, env); UNSUPPORTED("ao9dinb2mbsuqheodockffton"); // child_sz = cp->child.u.tbl->data.box.UR; UNSUPPORTED("1gp8mj8w7s5i6ye7jneczpoai"); // } else if (cp->child.kind == 3) { UNSUPPORTED("3wrpfz7xtwqio3b0z1g3v5o8n"); // rv = size_html_img(cp->child.u.img, env); UNSUPPORTED("ao7i7b9oc9kp6hmh3zjj58lnt"); // child_sz = cp->child.u.img->box.UR; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("dqcevwpj4uv0dm7et9vvi4981"); // rv = size_html_txt(GD_gvc(g), cp->child.u.txt, env); UNSUPPORTED("e0lg9mfl5jfnx6zq8wzjhjug3"); // child_sz = cp->child.u.txt->box.UR; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("78xu81zxcltf94ml0dgxdv0ct"); // margin = 2 * (cp->data.pad + cp->data.border); UNSUPPORTED("axd51bzv8hdpm5cqsmdqchgwm"); // sz.x = child_sz.x + margin; UNSUPPORTED("8tle7dmp7rihl4xa46c1vsytu"); // sz.y = child_sz.y + margin; UNSUPPORTED("rt15k2ok7a3v6ib8d9ajshvb"); // if (cp->data.flags & 1) { UNSUPPORTED("d3zk61sb768arhaezyareldiy"); // if (cp->data.width && cp->data.height) { UNSUPPORTED("ei7d0i8pzwjupmet76ttu9k3y"); // if (((cp->data.width < sz.x) || (cp->data.height < sz.y)) && (cp->child.kind != 3)) { UNSUPPORTED("2v16k5fx5lxcwu61pv8f5xjc6"); // agerr(AGWARN, "cell size too small for content\n"); UNSUPPORTED("en0rarvkx5srsxnlqpf6ja1us"); // rv = 1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("2e7vq0c1ngiofwke5k8mpm586"); // sz.x = sz.y = 0; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("cw5grwj6gbj94jcztvnp2ooyj"); // agerr(AGWARN, UNSUPPORTED("1sn048qvhhtpv5ruvi1ek7cu9"); // "fixed cell size with unspecified width or height\n"); UNSUPPORTED("eldwzm3uyfs9zu1roub5a2uqi"); // rv = 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5r8hvlq4fuk8vn3yje9c0m0uu"); // cp->data.box.UR.x = MAX(sz.x, cp->data.width); UNSUPPORTED("d9o6hnda0ppqxexsj3b2jf56k"); // cp->data.box.UR.y = MAX(sz.y, cp->data.height); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2srxlzkxe960nczu4z5nrauej // static int findCol(PointSet * ps, int row, int col, htmlcell_t * cellp) public static Object findCol(Object... arg) { UNSUPPORTED("vy7n771o40h01dyj8qyye2he"); // static int findCol(PointSet * ps, int row, int col, htmlcell_t * cellp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("atyysowmqcj69416bvut6yxfq"); // int notFound = 1; UNSUPPORTED("1rqrfmkus9ne1c7zkm53hh6iw"); // int lastc; UNSUPPORTED("3pkra937htjqd1n85qf314kwy"); // int i, j, c; UNSUPPORTED("akx52eziuhdorahyk116rhftc"); // int end = cellp->cspan - 1; UNSUPPORTED("e36dcwthblpabui3v722ntlke"); // while (notFound) { UNSUPPORTED("4derp9qd9dg8zrdjzsg8bi2xv"); // lastc = col + end; UNSUPPORTED("4fmilhappg4ntixu8kj2rc6nz"); // for (c = lastc; c >= col; c--) { UNSUPPORTED("92vp8hruf9vv0l1khyphftjg3"); // if (isInPS(ps, c, row)) UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("156e8skr86gdus2rqg2tdz9yf"); // if (c >= col) /* conflict : try column after */ UNSUPPORTED("c9hnrokfu25736l6eoik4urbr"); // col = c + 1; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("ba024nbnjj22rx1iicy8uxxkt"); // notFound = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("38eo2dncsprcse2x4i75p3yjy"); // for (j = col; j < col + cellp->cspan; j++) { UNSUPPORTED("6rk7stb6bm4hsbl9zhf1oswa6"); // for (i = row; i < row + cellp->rspan; i++) { UNSUPPORTED("69i3bt6zrjdg92p2f8yk762bz"); // addPS(ps, j, i); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("eyeu27jykzh29hth7lx38hgxm"); // return col; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1apchhkdbk0wgxmptldlqordv // static int processTbl(graph_t * g, htmltbl_t * tbl, htmlenv_t * env) public static Object processTbl(Object... arg) { UNSUPPORTED("bcwb87d1whfft3xydpjn96tqy"); // static int processTbl(graph_t * g, htmltbl_t * tbl, htmlenv_t * env) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("128n741ndr3z3b941iiig8vm7"); // pitem *rp; UNSUPPORTED("1lyxohypr7xtypbox8n2liqkw"); // pitem *cp; UNSUPPORTED("8zh8zqcxqo5o3m6nfh4qqjtqd"); // Dt_t *cdict; UNSUPPORTED("ak7qc3htpxsunavl58wf3ykp7"); // int r, c, cnt; UNSUPPORTED("bvyiajn0xy1nahb1h31ol0aum"); // htmlcell_t *cellp; UNSUPPORTED("dvv43a5s6gakrufdzk2xbsdh1"); // htmlcell_t **cells; UNSUPPORTED("msjtkjhws4l03dje06ts0ej2"); // Dt_t *rows = tbl->u.p.rows; UNSUPPORTED("en7ch189nkys76f42mlo1s5zz"); // int rv = 0; UNSUPPORTED("1h87ik53wg9l6htch3tj9mdpk"); // int n_rows = 0; UNSUPPORTED("aqunzhkejhxkiklw6o7tpj5an"); // int n_cols = 0; UNSUPPORTED("41peclvejrri7877ir3zgwcxj"); // PointSet *ps = newPS(); UNSUPPORTED("7xz7xonr4rynms8yk9dka1c1c"); // Dt_t *is = openIntSet(); UNSUPPORTED("62kokzledbm3nvmfhsjw06ngh"); // rp = (pitem *) dtflatten(rows); UNSUPPORTED("3wtn792c3ql5yhn77alu6r5d8"); // cnt = 0; UNSUPPORTED("dfy198s0balu93ez4di7muow9"); // r = 0; UNSUPPORTED("as2bzplymgjxm7ebvzv9qlluc"); // while (rp) { UNSUPPORTED("6alsowu6a5tm4rvox9kha1gce"); // cdict = rp->u.rp; UNSUPPORTED("cjjz9vegbwfwp7vphaszleumu"); // cp = (pitem *) dtflatten(cdict); UNSUPPORTED("4dkgvugqegweb72s3vindd7mm"); // while (cp) { UNSUPPORTED("jtct9ua5y8186svpuv23kp7p"); // cellp = cp->u.cp; UNSUPPORTED("7hl03wjg5yryhvbe4ar0i0b8g"); // cnt++; UNSUPPORTED("dqg1emepjmbtjkxtwpgir4aog"); // cp = (pitem *) (((Dtlink_t*)((Dtlink_t *) cp))->right); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("68wat35fq8rxh3ahmgb0osdrf"); // if (rp->ruled) { UNSUPPORTED("da9vcofurrebillaayamdrvld"); // addIntSet(is, r + 1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2v1rjsx8pivqutio6f2cyr2wy"); // rp = (pitem *) (((Dtlink_t*)((Dtlink_t *) rp))->right); UNSUPPORTED("4termxikckg62elr2s0j5gur5"); // r++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7zm6t55676a2m6csol3hxgep5"); // cells = tbl->u.n.cells = (htmlcell_t **)zmalloc((cnt + 1)*sizeof(htmlcell_t *)); UNSUPPORTED("62kokzledbm3nvmfhsjw06ngh"); // rp = (pitem *) dtflatten(rows); UNSUPPORTED("dfy198s0balu93ez4di7muow9"); // r = 0; UNSUPPORTED("as2bzplymgjxm7ebvzv9qlluc"); // while (rp) { UNSUPPORTED("6alsowu6a5tm4rvox9kha1gce"); // cdict = rp->u.rp; UNSUPPORTED("cjjz9vegbwfwp7vphaszleumu"); // cp = (pitem *) dtflatten(cdict); UNSUPPORTED("1k960hbt4mxjx2nga87rqvluh"); // c = 0; UNSUPPORTED("4dkgvugqegweb72s3vindd7mm"); // while (cp) { UNSUPPORTED("jtct9ua5y8186svpuv23kp7p"); // cellp = cp->u.cp; UNSUPPORTED("dfp4lwqkqwtwqravyevqkitl1"); // *cells++ = cellp; UNSUPPORTED("9ugieksnm2bl2n9cwne2e38ox"); // rv |= size_html_cell(g, cellp, tbl, env); UNSUPPORTED("c03wghmv71v8fgtr029ddiyvb"); // c = findCol(ps, r, c, cellp); UNSUPPORTED("9jr1vjqqownfst01hpmblabwd"); // cellp->row = r; UNSUPPORTED("6v3t8u08fnrim0j9p1m1sps2m"); // cellp->col = c; UNSUPPORTED("6peyajy1b4ou6csrom7hvx3k"); // c += cellp->cspan; UNSUPPORTED("5vkigdl3r09507utmar6214g2"); // n_cols = MAX(c, n_cols); UNSUPPORTED("32x1t87vbkfkmabhkgz9976m5"); // n_rows = MAX(r + cellp->rspan, n_rows); UNSUPPORTED("57xvc7zjof6trsl5gj1y6yxve"); // if (inIntSet(is, r + cellp->rspan)) UNSUPPORTED("6rfn2x9963tk19dqchzngwyd"); // cellp->ruled |= 2; UNSUPPORTED("dqg1emepjmbtjkxtwpgir4aog"); // cp = (pitem *) (((Dtlink_t*)((Dtlink_t *) cp))->right); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2v1rjsx8pivqutio6f2cyr2wy"); // rp = (pitem *) (((Dtlink_t*)((Dtlink_t *) rp))->right); UNSUPPORTED("4termxikckg62elr2s0j5gur5"); // r++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9gx68fjgz9ifzyvg8ai41r2c7"); // tbl->rc = n_rows; UNSUPPORTED("5wmtjbrsn5w7d9mfonxxl5rex"); // tbl->cc = n_cols; UNSUPPORTED("5rgp5ftqrficnrim8srbzbcda"); // dtclose(rows); UNSUPPORTED("2hhzg76es68ebqvfzxjp27o2a"); // dtclose(is); UNSUPPORTED("dg5ijmmysdxc2qm5j58u0zr8i"); // freePS(ps); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bftk6pbrbqkhwivjh0o2e4xmn // void sizeLinearArray(htmltbl_t * tbl) public static Object sizeLinearArray(Object... arg) { UNSUPPORTED("wzpmfhhszovxq93ydvsztetp"); // void sizeLinearArray(htmltbl_t * tbl) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7hxwbqi0ato9k2b4nzpp7uw3a"); // htmlcell_t *cp; UNSUPPORTED("dvv43a5s6gakrufdzk2xbsdh1"); // htmlcell_t **cells; UNSUPPORTED("a5e2rpf4z46wl32fel7sngtht"); // int wd, ht, i, x, y; UNSUPPORTED("bekwtc6rvpxxj0nw9htqo33xq"); // tbl->heights = (int*)zmalloc((tbl->rc + 1)*sizeof(int)); UNSUPPORTED("4nsdljbbmltaxyxhbkgez5juv"); // tbl->widths = (int*)zmalloc((tbl->cc + 1)*sizeof(int)); UNSUPPORTED("4yfdx4j85y1bzrkfrbeq3rnj6"); // for (cells = tbl->u.n.cells; *cells; cells++) { UNSUPPORTED("bf3l7aqwurk08ip8lin8au4oe"); // cp = *cells; UNSUPPORTED("dmn24k5ytrxxuntvcr8vns6tt"); // if (cp->rspan == 1) UNSUPPORTED("9k4vh2dstnvhzcg67gnc2u0hc"); // ht = cp->data.box.UR.y; UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("6rutzpzliee7qswgmtnii20jt"); // ht = (((cp->data.box.UR.y) - ((tbl->data.space)-1)*((cp->rspan)-1)) / (cp->rspan)); UNSUPPORTED("9tyo1nx8qfdmx87ivzhetk171"); // ht = MAX(ht, 1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7b6n5ydweyv46ezj3frs3lfg8"); // if (cp->cspan == 1) UNSUPPORTED("1cw4kfk6l8gvrnkuc1q6j2f6w"); // wd = cp->data.box.UR.x; UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("ctj4xice3u59j761qz48su8d2"); // wd = (((cp->data.box.UR.x) - ((tbl->data.space)-1)*((cp->cspan)-1)) / (cp->cspan)); UNSUPPORTED("bis5z8qaes014qjil2z9bc3yt"); // wd = MAX(wd, 1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cj4rszdnftxulj5j4ofvc86uq"); // for (i = cp->row; i < cp->row + cp->rspan; i++) { UNSUPPORTED("9ha3mpnu8g0xi2pqwnvqhlzsq"); // y = tbl->heights[i]; UNSUPPORTED("4hz0jj81f7ed1qmvkhq81jqs1"); // tbl->heights[i] = MAX(y, ht); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5zv1xp0ve74t81kdl39w242c0"); // for (i = cp->col; i < cp->col + cp->cspan; i++) { UNSUPPORTED("ex7pzeip1t4jvbqqy0rx9esqq"); // x = tbl->widths[i]; UNSUPPORTED("29fd6hhyg0mnezt3mgdi6ezvx"); // tbl->widths[i] = MAX(x, wd); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 9u21vrho83xozf1mugcyz8al8 // static char *nnames[] = //3 4i4kof2mbmyuy7554t99luv2d // char *nToName(int c) public static Object nToName(Object... arg) { UNSUPPORTED("152ni25tykk6b46aztxh05dt0"); // char *nToName(int c) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("escxhdgvfkgvry6gz920y3v60"); // static char name[100]; UNSUPPORTED("a6nlvtzc7976215aud08npjv6"); // if (c < sizeof(nnames) / sizeof(char *)) UNSUPPORTED("240zhg319p6154exv92iyohag"); // return nnames[c]; UNSUPPORTED("2chdmawkug9stfqe4qstajlgf"); // sprintf(name, "%d", c); UNSUPPORTED("d8c692wl5ut9pklgbb0o4igud"); // return name; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1bmoyklwxydje1kcgu3nwsnvl // static void closeGraphs(graph_t * rowg, graph_t * colg) public static Object closeGraphs(Object... arg) { UNSUPPORTED("5bqv0gm8rycgunk4roh5kfd71"); // static void closeGraphs(graph_t * rowg, graph_t * colg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("16whpdxt4g151a019tn55jeo1"); // for (n = GD_nlist(colg); n; n = ND_next(n)) { UNSUPPORTED("6uowedfybay0zqxujx4izx5eb"); // free_list(ND_in(n)); UNSUPPORTED("9ma0k3ktcua915egahxrgo1f"); // free_list(ND_out(n)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ewsu4butq0z77lshmz2vye0ij"); // agclose(rowg); UNSUPPORTED("18xxbtcxgsqom0dvtu2y9osv5"); // agclose(colg); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a1pb8vo051kce2vw0blclqlh7 // static void checkChain(graph_t * g) public static Object checkChain(Object... arg) { UNSUPPORTED("7b9ue77v0ds2jxp1wmflsxiqi"); // static void checkChain(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1sul2kifdj17kxdwdagt5uhx0"); // node_t *t; UNSUPPORTED("35dj5rc61rye1ulocvhco6987"); // node_t *h; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("6i65dyohrxfpnbw3znq9e4hxi"); // t = GD_nlist(g); UNSUPPORTED("6jgcyxjliiep5hu0src4icwsh"); // for (h = ND_next(t); h; h = ND_next(h)) { UNSUPPORTED("1kq1nqm0i5t35dko9cviktd9e"); // if (!(agedge(g,t,h,NULL,0))) { UNSUPPORTED("28qblrynck0phu482ss4sftwy"); // e = agedge(g, t, h, NULL, 1); UNSUPPORTED("bk18w1br4j7n3sw0vx7z7dho0"); // agbindrec(e, "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0)); UNSUPPORTED("dpbzsnqt42s889q1m7w0zurwg"); // ED_minlen(e) = 0; UNSUPPORTED("12z7onvdo58ujwat9vwz7pu68"); // elist_append(e, ND_out(t)); UNSUPPORTED("er5zn9v0t89u2bvp152gkcdub"); // elist_append(e, ND_in(h)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("xo3px3hijp17toszrxjhzc30"); // t = h; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5t5lovn25afcqbdxm2c69199o // static void checkEdge (graph_t* g, node_t* t, node_t* h, int sz) public static Object checkEdge(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("36q9ktek22tbigm7zmxlp9p7l"); // checkEdge (graph_t* g, node_t* t, node_t* h, int sz) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("81kodm2cts9uf9w37cp7qzp6p"); // edge_t* e; UNSUPPORTED("8qkxrsrb72iksyrj5au48hgr"); // e = (agedge(g,t,h,NULL,0)); UNSUPPORTED("eveunyp9nozvcp5ktz2kz6zyq"); // if (e) UNSUPPORTED("ef61cpvlu3fjobunnte2wliht"); // ED_minlen(e) = MAX(ED_minlen(e), sz); UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("da8fjridlwi8lgf9bv6mifuwm"); // e = agedge(g, t, h, NULL, 1); UNSUPPORTED("406k6e0j28h0czhe1mdish7vy"); // agbindrec(e, "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0)); UNSUPPORTED("dcfkl6td76thzb0wdxafrukj5"); // ED_minlen(e) = sz; UNSUPPORTED("5evqa618mv70sukx6s3ahhq75"); // elist_append(e, ND_out(t)); UNSUPPORTED("cvd7i7492o2yve3svqc40ltot"); // elist_append(e, ND_in(h)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ae7dclkuh27vau8tjkxw8clhl // void makeGraphs(htmltbl_t * tbl, graph_t * rowg, graph_t * colg) public static Object makeGraphs(Object... arg) { UNSUPPORTED("4cuju09ekofovn0fc2bbo50uw"); // void makeGraphs(htmltbl_t * tbl, graph_t * rowg, graph_t * colg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7hxwbqi0ato9k2b4nzpp7uw3a"); // htmlcell_t *cp; UNSUPPORTED("dvv43a5s6gakrufdzk2xbsdh1"); // htmlcell_t **cells; UNSUPPORTED("1sul2kifdj17kxdwdagt5uhx0"); // node_t *t; UNSUPPORTED("b55eoe9gg0u440hnl6vuw0g3s"); // node_t *lastn; UNSUPPORTED("35dj5rc61rye1ulocvhco6987"); // node_t *h; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("58o4wu841vkglm3tl8mc9urvu"); // lastn = NULL; UNSUPPORTED("2agp2sozteqj056j34uh5gz6h"); // for (i = 0; i <= tbl->cc; i++) { UNSUPPORTED("4nm4kztncxgnqxvbaebfbbqak"); // t = agnode(colg, nToName(i), 1); UNSUPPORTED("9l63nm03ta49n83wax0vthiof"); // agbindrec(t, "Agnodeinfo_t", sizeof(Agnodeinfo_t), NOT(0)); UNSUPPORTED("94oupz5r7tj8hnhras7jssnay"); // alloc_elist(tbl->rc, ND_in(t)); UNSUPPORTED("57yrln8a69t0p1dzxk3rha53k"); // alloc_elist(tbl->rc, ND_out(t)); UNSUPPORTED("d60g65zb8jbubbmomitpsgzpr"); // if (lastn) { UNSUPPORTED("cowtfloqsbrmejpce7x6ulj5k"); // ND_next(lastn) = t; UNSUPPORTED("18byrlv6ie9y9nm16dl41cxdb"); // lastn = t; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("rgfby4l7dq8t8nwonk6eqvjc"); // lastn = GD_nlist(colg) = t; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("58o4wu841vkglm3tl8mc9urvu"); // lastn = NULL; UNSUPPORTED("de5kizyloe4kak5mszz3l0xcc"); // for (i = 0; i <= tbl->rc; i++) { UNSUPPORTED("el8vcb38542oa4q3m86rx8r4x"); // t = agnode(rowg, nToName(i), 1); UNSUPPORTED("9l63nm03ta49n83wax0vthiof"); // agbindrec(t, "Agnodeinfo_t", sizeof(Agnodeinfo_t), NOT(0)); UNSUPPORTED("as7afux025j9za91lkpbdhlh5"); // alloc_elist(tbl->cc, ND_in(t)); UNSUPPORTED("45owhrvnuizmz3gn6jhwt9r56"); // alloc_elist(tbl->cc, ND_out(t)); UNSUPPORTED("d60g65zb8jbubbmomitpsgzpr"); // if (lastn) { UNSUPPORTED("cowtfloqsbrmejpce7x6ulj5k"); // ND_next(lastn) = t; UNSUPPORTED("18byrlv6ie9y9nm16dl41cxdb"); // lastn = t; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("9j9ll3uhnqlomsgvhwsft59wk"); // lastn = GD_nlist(rowg) = t; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4yfdx4j85y1bzrkfrbeq3rnj6"); // for (cells = tbl->u.n.cells; *cells; cells++) { UNSUPPORTED("bf3l7aqwurk08ip8lin8au4oe"); // cp = *cells; UNSUPPORTED("83k3qjf3v9w5l7hot4gvvs5tg"); // t = (agnode(colg,nToName(cp->col),0)); UNSUPPORTED("8msa1ozfck8y5yhzco44z0t57"); // h = (agnode(colg,nToName(cp->col + cp->cspan),0)); UNSUPPORTED("d2ar26j7okhoc8twhebaivofx"); // checkEdge (colg, t, h, cp->data.box.UR.x); UNSUPPORTED("2fjen8suku1q3xxa0wpl7qsum"); // t = (agnode(rowg,nToName(cp->row),0)); UNSUPPORTED("ab72awoppza0d4tajke9xm71i"); // h = (agnode(rowg,nToName(cp->row + cp->rspan),0)); UNSUPPORTED("bk0s0xc8k56b9bngk7g2fka0h"); // checkEdge (rowg, t, h, cp->data.box.UR.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ewn6zn4glhuedc96496ald1le"); // /* Make sure that 0 <= 1 <= 2 ...k. This implies graph connected. */ UNSUPPORTED("f3o274adxf294p08bi4ou6m88"); // checkChain(colg); UNSUPPORTED("f0anhfqyvokbtq82twub44rfd"); // checkChain(rowg); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a9vkjdktfvq94s8grq0awt8ub // void setSizes(htmltbl_t * tbl, graph_t * rowg, graph_t * colg) public static Object setSizes(Object... arg) { UNSUPPORTED("bc7wgvmmd3yu8683xxfd3rr22"); // void setSizes(htmltbl_t * tbl, graph_t * rowg, graph_t * colg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("cxeyepn0z8rncl6hiyrwynbyx"); // int prev; UNSUPPORTED("487cx7jg9iu9612dcxp78o34u"); // prev = 0; UNSUPPORTED("18rgdpari4z097h1tz4p819fw"); // n = GD_nlist(rowg); UNSUPPORTED("eh1qj3mz402dapyyftetof05a"); // for (i = 0, n = ND_next(n); n; i++, n = ND_next(n)) { UNSUPPORTED("6sv14u0krll6ugupjjwvlhq4i"); // tbl->heights[i] = ND_rank(n) - prev; UNSUPPORTED("bop9lix1a74ulob2lpqj26zbk"); // prev = ND_rank(n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("487cx7jg9iu9612dcxp78o34u"); // prev = 0; UNSUPPORTED("215usl8ir632272pnexw4dw4a"); // n = GD_nlist(colg); UNSUPPORTED("eh1qj3mz402dapyyftetof05a"); // for (i = 0, n = ND_next(n); n; i++, n = ND_next(n)) { UNSUPPORTED("34z16bayffb7l3v3fp9cinerm"); // tbl->widths[i] = ND_rank(n) - prev; UNSUPPORTED("bop9lix1a74ulob2lpqj26zbk"); // prev = ND_rank(n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 36o03axw6h4de6jf7hlsg2grd // void sizeArray(htmltbl_t * tbl) public static Object sizeArray(Object... arg) { UNSUPPORTED("6x0xk9xg9vpp8xksw96k56u1"); // void sizeArray(htmltbl_t * tbl) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cn62n4eqyzjttfj22n5lrfl94"); // graph_t *rowg; UNSUPPORTED("d25ssxgycdgg1h0reqweu0635"); // graph_t *colg; UNSUPPORTED("15ufobi6lqylcwgadhiinn2rz"); // Agdesc_t dir = Agstrictdirected; UNSUPPORTED("6icqhfpwgw7mwn7angx2lbml1"); // /* Do the 1D cases by hand */ UNSUPPORTED("e1201jpt70fpsisqjq01rqu7n"); // if ((tbl->rc == 1) || (tbl->cc == 1)) { UNSUPPORTED("5pno6zbafoxa39p36kwwp4lmk"); // sizeLinearArray(tbl); UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bekwtc6rvpxxj0nw9htqo33xq"); // tbl->heights = (int*)zmalloc((tbl->rc + 1)*sizeof(int)); UNSUPPORTED("4nsdljbbmltaxyxhbkgez5juv"); // tbl->widths = (int*)zmalloc((tbl->cc + 1)*sizeof(int)); UNSUPPORTED("b9tkqx6gz53htzewwyyunp4xv"); // rowg = agopen("rowg", dir, ((Agdisc_t *)0)); UNSUPPORTED("dxt1otd0tqcp5injzpanxfax9"); // colg = agopen("colg", dir, ((Agdisc_t *)0)); UNSUPPORTED("8y0btg7sstprwcixsvlq2u7pp"); // /* Only need GD_nlist */ UNSUPPORTED("4uxsihlxll09wgjvybxovj9ow"); // agbindrec(rowg, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); // graph custom data UNSUPPORTED("594rtgd3ghu2cgzys2c4to6gc"); // agbindrec(colg, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); // graph custom data UNSUPPORTED("19x1bc8oad4optcepeckwzlka"); // makeGraphs(tbl, rowg, colg); UNSUPPORTED("cm8coej8iti64rim71s3j4tci"); // rank(rowg, 2, INT_MAX); UNSUPPORTED("dy7erzggbu109z2phnbysu6rx"); // rank(colg, 2, INT_MAX); UNSUPPORTED("be3iwtvdfxp4lpy85s26mqx99"); // setSizes(tbl, rowg, colg); UNSUPPORTED("e8ruqi1ny26tfctbxq1drpu93"); // closeGraphs(rowg, colg); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7mf9slzi6j1xx8znqkck81ojd // static void pos_html_img(htmlimg_t * cp, boxf pos) public static Object pos_html_img(Object... arg) { UNSUPPORTED("42a4fvfkhhzdh65t6v4i6n43b"); // static void pos_html_img(htmlimg_t * cp, boxf pos) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eyv24evuojy17nni8sbxg9yjh"); // cp->box = pos; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dcraeyvk2uoj97sgfptvvusa // static void pos_html_txt(htmltxt_t * ftxt, char c) public static Object pos_html_txt(Object... arg) { UNSUPPORTED("d7eeur03fxeyzb04yunpr831c"); // static void pos_html_txt(htmltxt_t * ftxt, char c) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("7roi5t8l55rt8fze3i4uwenso"); // for (i = 0; i < ftxt->nspans; i++) { UNSUPPORTED("6md8m4m6htfbyunk0q6nq2ho0"); // if (ftxt->spans[i].just == 0) /* unset */ UNSUPPORTED("3fqcf49h3ukywkyt02l4oplgw"); // ftxt->spans[i].just = c; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d1yiur9m8nrpdphq90db17c2b // static void pos_html_cell(htmlcell_t * cp, boxf pos, int sides) public static Object pos_html_cell(Object... arg) { UNSUPPORTED("cuis36gztoi76fhtvhwcv6uws"); // static void pos_html_cell(htmlcell_t * cp, boxf pos, int sides) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4t6qmhslpzsy9xw7kwpjf6jjo"); // double delx, dely; UNSUPPORTED("7ta9u8m4r7uq9owgmallfkj99"); // pointf oldsz; UNSUPPORTED("ev57csu787p48tg5f6m2j68su"); // boxf cbox; UNSUPPORTED("dqt4eshfaosfj7fb420g7lgy9"); // if (!cp->data.pencolor && cp->parent->data.pencolor) UNSUPPORTED("2yqmgdi5dxbbo8fqhbtpgme67"); // cp->data.pencolor = strdup(cp->parent->data.pencolor); UNSUPPORTED("6sseaydo6trvcsx0fbgjviv8v"); // /* If fixed, align cell */ UNSUPPORTED("rt15k2ok7a3v6ib8d9ajshvb"); // if (cp->data.flags & 1) { UNSUPPORTED("a32hmns6yj0aa2v1i19x5eqtt"); // oldsz = cp->data.box.UR; UNSUPPORTED("egdv4monwtqnbi06p6drygg4z"); // delx = (pos.UR.x - pos.LL.x) - oldsz.x; UNSUPPORTED("9gp0eb13t5b03zxfm7jonlmdx"); // if (delx > 0) { UNSUPPORTED("3r69mn1s8ji4l2u8uhm0cxr6t"); // switch (cp->data.flags & ((1 << 1) | (1 << 2))) { UNSUPPORTED("ah0nq9sdtr8muczczi3af7qvz"); // case (1 << 2): UNSUPPORTED("83i011ns40yww4lbpzice4qdg"); // pos.UR.x = pos.LL.x + oldsz.x; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("747eovbx269l26fe7h49mrryq"); // case (1 << 1): UNSUPPORTED("4jpvmjllp38cvz2lghv1jeh7g"); // pos.UR.x += delx; UNSUPPORTED("x3gt3vyam3oix3tzq7wdjj1w"); // pos.LL.x += delx; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("bt2g0yhsy3c7keqyftf3c98ut"); // default: UNSUPPORTED("8vlipw77fzji9xypyn2xql291"); // pos.LL.x += delx / 2; UNSUPPORTED("4izjifozyt8d031p91havf8j7"); // pos.UR.x -= delx / 2; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("63zme66vlc7atntu89wou5ww3"); // dely = (pos.UR.y - pos.LL.y) - oldsz.y; UNSUPPORTED("csdkkh6bxwsn8205tirhbvcpe"); // if (dely > 0) { UNSUPPORTED("dw4mvc0k0we5bzttm13ekyak4"); // switch (cp->data.flags & ((1 << 3) | (1 << 4))) { UNSUPPORTED("6jzmehpko1ipx7h1trdpk0p30"); // case (1 << 4): UNSUPPORTED("4np4td12i62sxy6mxtzoee6vk"); // pos.UR.y = pos.LL.y + oldsz.y; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("cambocbzqpbhx0e06nxo1mg7f"); // case (1 << 3): UNSUPPORTED("71lpvi5k10xkuwslbh5f2m1oo"); // pos.UR.y += dely; UNSUPPORTED("3n7t5wynk9p0hsnkp28tq5doy"); // pos.LL.y += dely; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("bt2g0yhsy3c7keqyftf3c98ut"); // default: UNSUPPORTED("68mslo2af2kz87uf4ymb6mndu"); // pos.LL.y += dely / 2; UNSUPPORTED("et4apglclz3ejdqt6gum16gwo"); // pos.UR.y -= dely / 2; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bcuhn7spylvj4zlz2wnqy6kfn"); // cp->data.box = pos; UNSUPPORTED("4kypvfdtl6j3y635aa3lfbmx7"); // cp->data.sides = sides; UNSUPPORTED("6sg1893zgnf1mlxm40ambwc00"); // /* set up child's position */ UNSUPPORTED("3zenzqy8fsqyj0zxt9d6qx1mp"); // cbox.LL.x = pos.LL.x + cp->data.border + cp->data.pad; UNSUPPORTED("10zcbjdvv4pdzlcgw07sjisno"); // cbox.LL.y = pos.LL.y + cp->data.border + cp->data.pad; UNSUPPORTED("4ucwlwg94jvv26o6yfn7lbkg8"); // cbox.UR.x = pos.UR.x - cp->data.border - cp->data.pad; UNSUPPORTED("ba3o9fhq7mz6gml28ulxwfs05"); // cbox.UR.y = pos.UR.y - cp->data.border - cp->data.pad; UNSUPPORTED("6vkx3zam2bwthfmvig3p2y9ec"); // if (cp->child.kind == 1) { UNSUPPORTED("8z1yl25z03ecz8t2asagt5z3s"); // pos_html_tbl(cp->child.u.tbl, cbox, sides); UNSUPPORTED("1gp8mj8w7s5i6ye7jneczpoai"); // } else if (cp->child.kind == 3) { UNSUPPORTED("6qnl14334tx10x6pxokuy076z"); // /* Note that alignment trumps scaling */ UNSUPPORTED("8d7v007kipxh9v68s46nbcdv1"); // oldsz = cp->child.u.img->box.UR; UNSUPPORTED("cz5nuauq57ebdd8zqrhce67wo"); // delx = (cbox.UR.x - cbox.LL.x) - oldsz.x; UNSUPPORTED("9gp0eb13t5b03zxfm7jonlmdx"); // if (delx > 0) { UNSUPPORTED("3r69mn1s8ji4l2u8uhm0cxr6t"); // switch (cp->data.flags & ((1 << 1) | (1 << 2))) { UNSUPPORTED("ah0nq9sdtr8muczczi3af7qvz"); // case (1 << 2): UNSUPPORTED("eatno2hf9cwb72ksr51x04r17"); // cbox.UR.x -= delx; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("747eovbx269l26fe7h49mrryq"); // case (1 << 1): UNSUPPORTED("6vnpw6y824ljczdg04lurdyrm"); // cbox.LL.x += delx; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2jhqhx6imw3gaobpzssepu61q"); // dely = (cbox.UR.y - cbox.LL.y) - oldsz.y; UNSUPPORTED("csdkkh6bxwsn8205tirhbvcpe"); // if (dely > 0) { UNSUPPORTED("dw4mvc0k0we5bzttm13ekyak4"); // switch (cp->data.flags & ((1 << 3) | (1 << 4))) { UNSUPPORTED("6jzmehpko1ipx7h1trdpk0p30"); // case (1 << 4): UNSUPPORTED("5jgoh3mgbu69dug17ua5isxoi"); // cbox.UR.y -= dely; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("cambocbzqpbhx0e06nxo1mg7f"); // case (1 << 3): UNSUPPORTED("57wn9a7501luud0umd9n9whoh"); // cbox.LL.y += dely; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3q6pd6cdpl6kixk14otk5vcf7"); // pos_html_img(cp->child.u.img, cbox); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("vswlsa4ve8nrp47dvksveahx"); // char dfltalign; UNSUPPORTED("dpza5c1mjk4tmba251ti6ysol"); // int af; UNSUPPORTED("7qzrnbja04lm9p3qsyxgc6g5j"); // oldsz = cp->child.u.txt->box.UR; UNSUPPORTED("cz5nuauq57ebdd8zqrhce67wo"); // delx = (cbox.UR.x - cbox.LL.x) - oldsz.x; UNSUPPORTED("knv2w2aryy2x77uf3yn2sv3j"); // /* If the cell is larger than the text block and alignment is UNSUPPORTED("eisx3o6ofwn34uxbpdqcjyney"); // * done at textblock level, the text box is shrunk accordingly. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("6byh14oe2h4qfjl9hz4tugk6r"); // if ((delx > 0) UNSUPPORTED("34g3b2a63ruwu7osizmpbjsp0"); // && ((af = (cp->data.flags & ((1 << 1) | (1 << 2)))) != ((1 << 1) | (1 << 2)))) { UNSUPPORTED("9aru1lheqv2fxnmx880bgla59"); // switch (af) { UNSUPPORTED("ah0nq9sdtr8muczczi3af7qvz"); // case (1 << 2): UNSUPPORTED("eatno2hf9cwb72ksr51x04r17"); // cbox.UR.x -= delx; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("747eovbx269l26fe7h49mrryq"); // case (1 << 1): UNSUPPORTED("6vnpw6y824ljczdg04lurdyrm"); // cbox.LL.x += delx; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("bt2g0yhsy3c7keqyftf3c98ut"); // default: UNSUPPORTED("f00tr0gmqqbmhz7kx3uh7ousg"); // cbox.LL.x += delx / 2; UNSUPPORTED("4gfwxxvuf3cx1weq1d1frc2wl"); // cbox.UR.x -= delx / 2; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2jhqhx6imw3gaobpzssepu61q"); // dely = (cbox.UR.y - cbox.LL.y) - oldsz.y; UNSUPPORTED("csdkkh6bxwsn8205tirhbvcpe"); // if (dely > 0) { UNSUPPORTED("dw4mvc0k0we5bzttm13ekyak4"); // switch (cp->data.flags & ((1 << 3) | (1 << 4))) { UNSUPPORTED("6jzmehpko1ipx7h1trdpk0p30"); // case (1 << 4): UNSUPPORTED("5jgoh3mgbu69dug17ua5isxoi"); // cbox.UR.y -= dely; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("cambocbzqpbhx0e06nxo1mg7f"); // case (1 << 3): UNSUPPORTED("57wn9a7501luud0umd9n9whoh"); // cbox.LL.y += dely; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("bt2g0yhsy3c7keqyftf3c98ut"); // default: UNSUPPORTED("559886ixmsxdovurzx7ufouxh"); // cbox.LL.y += dely / 2; UNSUPPORTED("b7j9nu9h7q7ojpdvc7jgs7jea"); // cbox.UR.y -= dely / 2; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8ffppec21dum3vzx3hfbt7lym"); // cp->child.u.txt->box = cbox; UNSUPPORTED("f09i8w6xb3kiyteft7pwk1xzb"); // /* Set default text alignment UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("a2xny99nsqrutrygrab6nqs31"); // switch (cp->data.flags & ((1 << 8) | (1 << 9))) { UNSUPPORTED("2fnkb2fn4fw82h0p8wfth2m7v"); // case (1 << 9): UNSUPPORTED("4mfmqenjdv6zp3zcq403u25u9"); // dfltalign = 'l'; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("517hwzab4532op6cula0gwpm8"); // case (1 << 8): UNSUPPORTED("9vpxaqao79gblr14g02sgam28"); // dfltalign = 'r'; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("ah7zjs7j3dr5o24wj8uwo17le"); // dfltalign = 'n'; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("61v88smrsyhegr9t51l74hs8a"); // pos_html_txt(cp->child.u.txt, dfltalign); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 56p5uk86725l2wvm0o2ai4e0c // static void pos_html_tbl(htmltbl_t * tbl, boxf pos, int sides) public static Object pos_html_tbl(Object... arg) { UNSUPPORTED("4zsl8ii4walezca0spg3jkpml"); // static void pos_html_tbl(htmltbl_t * tbl, boxf pos, int sides) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("yc43os1rqvk4w7h7u8r7xz7h"); // int x, y, delx, dely, oldsz; UNSUPPORTED("991fd779czwvhnsmgq2pvm7ke"); // int i, extra, plus; UNSUPPORTED("f5l5qsm1xxo2fnsp38chcf009"); // htmlcell_t **cells = tbl->u.n.cells; UNSUPPORTED("7hxwbqi0ato9k2b4nzpp7uw3a"); // htmlcell_t *cp; UNSUPPORTED("ev57csu787p48tg5f6m2j68su"); // boxf cbox; UNSUPPORTED("6wnsz74zxajfmm5w7fhshr5pm"); // if (tbl->u.n.parent && tbl->u.n.parent->data.pencolor UNSUPPORTED("6om051bhvm5bnya5dhsn8703l"); // && !tbl->data.pencolor) UNSUPPORTED("5t6k39jm45y79fncj958p0bi8"); // tbl->data.pencolor = strdup(tbl->u.n.parent->data.pencolor); UNSUPPORTED("64r2e0x9tjiqy4dwte0s2na53"); // oldsz = tbl->data.box.UR.x; UNSUPPORTED("b16keoeaghlhrly1fj1hcg66v"); // delx = (pos.UR.x - pos.LL.x) - oldsz; UNSUPPORTED("72mwrduegc6kyaovkpxmb3kla"); // assert(delx >= 0); UNSUPPORTED("b7vyqk2h86e5papeolvznvgur"); // oldsz = tbl->data.box.UR.y; UNSUPPORTED("7es5w7nkeut9imevty43zebi7"); // dely = (pos.UR.y - pos.LL.y) - oldsz; UNSUPPORTED("64mp20lb1sxfzoo97aplsdqpe"); // assert(dely >= 0); UNSUPPORTED("1di54gxfw70161ro4warptkj0"); // /* If fixed, align box */ UNSUPPORTED("h8silx20zxdo590p0rov9ilq"); // if (tbl->data.flags & 1) { UNSUPPORTED("9gp0eb13t5b03zxfm7jonlmdx"); // if (delx > 0) { UNSUPPORTED("enbwpz97yg5uci0y2vk50vsrq"); // switch (tbl->data.flags & ((1 << 1) | (1 << 2))) { UNSUPPORTED("ah0nq9sdtr8muczczi3af7qvz"); // case (1 << 2): UNSUPPORTED("epvqni6app7v9oeo39v7x6cs3"); // pos.UR.x = pos.LL.x + oldsz; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("747eovbx269l26fe7h49mrryq"); // case (1 << 1): UNSUPPORTED("4jpvmjllp38cvz2lghv1jeh7g"); // pos.UR.x += delx; UNSUPPORTED("x3gt3vyam3oix3tzq7wdjj1w"); // pos.LL.x += delx; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("bt2g0yhsy3c7keqyftf3c98ut"); // default: UNSUPPORTED("8vlipw77fzji9xypyn2xql291"); // pos.LL.x += delx / 2; UNSUPPORTED("4izjifozyt8d031p91havf8j7"); // pos.UR.x -= delx / 2; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("3bdvthk8h2crnn2jh7zusg9ce"); // delx = 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("csdkkh6bxwsn8205tirhbvcpe"); // if (dely > 0) { UNSUPPORTED("5h05tgdwuuueg6humeamv2m4i"); // switch (tbl->data.flags & ((1 << 3) | (1 << 4))) { UNSUPPORTED("6jzmehpko1ipx7h1trdpk0p30"); // case (1 << 4): UNSUPPORTED("eqhk1t2beqs3e09mbczosx9yu"); // pos.UR.y = pos.LL.y + oldsz; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("cambocbzqpbhx0e06nxo1mg7f"); // case (1 << 3): UNSUPPORTED("71lpvi5k10xkuwslbh5f2m1oo"); // pos.UR.y += dely; UNSUPPORTED("3n7t5wynk9p0hsnkp28tq5doy"); // pos.LL.y += dely; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("bt2g0yhsy3c7keqyftf3c98ut"); // default: UNSUPPORTED("68mslo2af2kz87uf4ymb6mndu"); // pos.LL.y += dely / 2; UNSUPPORTED("et4apglclz3ejdqt6gum16gwo"); // pos.UR.y -= dely / 2; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("bt8navfmhl654g1jvozod782j"); // dely = 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7u5b2kpz91rbkr413ch2km1qt"); // /* change sizes to start positions and distribute extra space */ UNSUPPORTED("e880xjt0fjapp1i3em12vo6ab"); // x = pos.LL.x + tbl->data.border + tbl->data.space; UNSUPPORTED("eqmnnkt14mzvhoo12hvofnpd5"); // extra = delx / (tbl->cc); UNSUPPORTED("3npyn5xhrv2h2rxdgixocbn58"); // plus = ROUND(delx - extra * (tbl->cc)); UNSUPPORTED("2agp2sozteqj056j34uh5gz6h"); // for (i = 0; i <= tbl->cc; i++) { UNSUPPORTED("6fyimcy0tdwoyn7j7pb684c72"); // delx = tbl->widths[i] + extra + (i < plus ? 1 : 0); UNSUPPORTED("97y6durgj4r30emmb9d2yx1cw"); // tbl->widths[i] = x; UNSUPPORTED("dvorntmdq8f156td307w9egcy"); // x += delx + tbl->data.space; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("d3ntu3z75c4yumuw66kr4hxlh"); // y = pos.UR.y - tbl->data.border - tbl->data.space; UNSUPPORTED("76tlpyfponp3ivujktbgvryaa"); // extra = dely / (tbl->rc); UNSUPPORTED("3rcirxo66iwzw7ljilqek9e0q"); // plus = ROUND(dely - extra * (tbl->rc)); UNSUPPORTED("de5kizyloe4kak5mszz3l0xcc"); // for (i = 0; i <= tbl->rc; i++) { UNSUPPORTED("97fi1o2q93uolzwjy5s06qfet"); // dely = tbl->heights[i] + extra + (i < plus ? 1 : 0); UNSUPPORTED("a481x2l1z3awwfj3yjtlgo88g"); // tbl->heights[i] = y; UNSUPPORTED("i2i2disny8527o3tlqgm1kn9"); // y -= dely + tbl->data.space; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ofnf2f1u94pvf4hj17rsqy8d"); // while ((cp = *cells++)) { UNSUPPORTED("c6mp42cwufjo544kh1xqg3ww9"); // int mask = 0; UNSUPPORTED("6s6izyatmponzopy22eomuw6h"); // if (sides) { UNSUPPORTED("ci2mmci593huj1u1l8312bdxg"); // if (cp->col == 0) UNSUPPORTED("180z92dzsuptolgccbq2ebbm6"); // mask |= (1<<3); UNSUPPORTED("3pn8116p5yexg0iuscpp22kg7"); // if (cp->row == 0) UNSUPPORTED("600kbwzj1j1m8zj0j1bsqz8aa"); // mask |= (1<<2); UNSUPPORTED("1ocnx9dbreuq1v9sb7rlnyekt"); // if (cp->col + cp->cspan == tbl->cc) UNSUPPORTED("ab5f180dbgmvm86u6ej0a0jfu"); // mask |= (1<<1); UNSUPPORTED("9o38jdsg3hkisw2im16ocf8ej"); // if (cp->row + cp->rspan == tbl->rc) UNSUPPORTED("emscnh9p0d93pn26zla3grib6"); // mask |= (1<<0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("50z4y0q2sjuqyus2lgqe83g4l"); // cbox.LL.x = tbl->widths[cp->col]; UNSUPPORTED("1oxnl88grlnsav4w1261c886s"); // cbox.UR.x = tbl->widths[cp->col + cp->cspan] - tbl->data.space; UNSUPPORTED("5e7tlmesz6ywa1ov91ebohlax"); // cbox.UR.y = tbl->heights[cp->row]; UNSUPPORTED("dgxtr9iempeg8h3l9v1fxopmp"); // cbox.LL.y = tbl->heights[cp->row + cp->rspan] + tbl->data.space; UNSUPPORTED("24owfprr6bd2njcyxgx4n1l4n"); // pos_html_cell(cp, cbox, sides & mask); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c1h7iwd75xplbhdyaewh93lxg"); // tbl->data.sides = sides; UNSUPPORTED("5fiqu8vepruovlpc2s45hcbu6"); // tbl->data.box = pos; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ja3w9brzk1n88r7xtda60x5j // static int size_html_tbl(graph_t * g, htmltbl_t * tbl, htmlcell_t * parent, htmlenv_t * env) public static Object size_html_tbl(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("c04xwvrthgk497pc2tqnlr7ox"); // size_html_tbl(graph_t * g, htmltbl_t * tbl, htmlcell_t * parent, UNSUPPORTED("cvqu4srmmyhyi1msstywhtscs"); // htmlenv_t * env) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("efb2u4spxejn7tmmpds8w5bmt"); // int i, wd, ht; UNSUPPORTED("en7ch189nkys76f42mlo1s5zz"); // int rv = 0; UNSUPPORTED("c8p7i7oozhr11poil2ax0mjdh"); // static textfont_t savef; UNSUPPORTED("acdkiuky8vkjaqqynxn9e052i"); // if (tbl->font) UNSUPPORTED("84z3c9pimg6qaq5qubuumky79"); // pushFontInfo(env, tbl->font, &savef); UNSUPPORTED("dozw5sbnv2526rxmb4d7no3mc"); // tbl->u.n.parent = parent; UNSUPPORTED("bzaspovipgb81zg0rn2hg9ws6"); // rv = processTbl(g, tbl, env); UNSUPPORTED("gb2gnkhq9ukpb04d2xn5yp57"); // /* Set up border and spacing */ UNSUPPORTED("bb6uw1cmb2eiw4w2nge4ktccr"); // if (!(tbl->data.flags & (1 << 7))) { UNSUPPORTED("692iudqfxxx63vzwd6b5jic1t"); // tbl->data.space = 2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8uvipaj8smh3qtdjva5dwzj3n"); // if (!(tbl->data.flags & (1 << 5))) { UNSUPPORTED("5atgjs0l2cpz8rdfpnufzi70j"); // tbl->data.border = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cc10jfcra7z436uyielyuazm5"); // sizeArray(tbl); UNSUPPORTED("d4ybybc32onajd96ca1mn638f"); // wd = (tbl->cc + 1) * tbl->data.space + 2 * tbl->data.border; UNSUPPORTED("8f66i2di95mrekp3i2a073p3k"); // ht = (tbl->rc + 1) * tbl->data.space + 2 * tbl->data.border; UNSUPPORTED("6zsxjcsdyiqzx29iho3kvce3b"); // for (i = 0; i < tbl->cc; i++) UNSUPPORTED("3cc98nrmqfil716ohn18oza3c"); // wd += tbl->widths[i]; UNSUPPORTED("10mwat8ui5nidzzhlgg5yty7r"); // for (i = 0; i < tbl->rc; i++) UNSUPPORTED("6yoveejihcnddlhvh5p4tq23h"); // ht += tbl->heights[i]; UNSUPPORTED("h8silx20zxdo590p0rov9ilq"); // if (tbl->data.flags & 1) { UNSUPPORTED("eh0xx08g3zcuo0cuk6dhpz9hz"); // if (tbl->data.width && tbl->data.height) { UNSUPPORTED("qc19pzjtzrlwlr2z5mlazlw3"); // if ((tbl->data.width < wd) || (tbl->data.height < ht)) { UNSUPPORTED("auq0b1s64wg6gf5s6wd4zv6s6"); // agerr(AGWARN, "table size too small for content\n"); UNSUPPORTED("en0rarvkx5srsxnlqpf6ja1us"); // rv = 1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6s22a7y0lgf1nt0wz0g1ysrzb"); // wd = ht = 0; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("cw5grwj6gbj94jcztvnp2ooyj"); // agerr(AGWARN, UNSUPPORTED("ef1ic85u7lira3uhp5mbc1v84"); // "fixed table size with unspecified width or height\n"); UNSUPPORTED("eldwzm3uyfs9zu1roub5a2uqi"); // rv = 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("caz4xnmfghxiwpo8wk2zeu3a4"); // tbl->data.box.UR.x = MAX(wd, tbl->data.width); UNSUPPORTED("9acb4ze4b4pn33aevyxfyqozw"); // tbl->data.box.UR.y = MAX(ht, tbl->data.height); UNSUPPORTED("acdkiuky8vkjaqqynxn9e052i"); // if (tbl->font) UNSUPPORTED("aqz3bhc3ot0j0okxcmu0ic2r"); // popFontInfo(env, &savef); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7sxjij9pnf0bhnnb7wl4nofo1 // static char *nameOf(void *obj, agxbuf * xb) public static Object nameOf(Object... arg) { UNSUPPORTED("btnlhy87chzxs16mxvfpsif78"); // static char *nameOf(void *obj, agxbuf * xb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1bl759aws53yjk3xg9shiogx5"); // Agedge_t *ep; UNSUPPORTED("91broiy562bqiwualvjbh1l0s"); // switch (agobjkind(obj)) { UNSUPPORTED("eyna33dobiebmtd0nihpgura4"); // case AGRAPH: UNSUPPORTED("8cgnhfyyaj25ten1tobjzy3cj"); // agxbput(xb, agnameof(((Agraph_t *) obj))); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6x7ztvlgv763oeop84udp1egg"); // case AGNODE: UNSUPPORTED("cctji3p8t7zmokmktgqtbprtn"); // agxbput(xb, agnameof(((Agnode_t *) obj))); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("2dqikmmb6ag0anvbzo5tybf1r"); // case AGEDGE: UNSUPPORTED("2ad512bjuifndlyd0zp0no4as"); // ep = (Agedge_t *) obj; UNSUPPORTED("awux6oj7dq7r586y9rfsec5pl"); // agxbput(xb, agnameof(agtail(ep))); UNSUPPORTED("3klfzjun0e36uku5f8mijrupz"); // agxbput(xb, agnameof(aghead(ep))); UNSUPPORTED("abmgbuhki8erjgnnm5jbld3u0"); // if (agisdirected(agraphof(aghead(ep)))) UNSUPPORTED("c83vr6d2i396r9l0hibwix946"); // agxbput(xb, "->"); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("4dvlp54lhuqxiob0e9rb75y78"); // agxbput(xb, "--"); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ersrvcvo8qkfouomz222hiih7"); // return (((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)'\0'))),(char*)((xb)->ptr = (xb)->buf)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eu0n8w5rlasw0veo8k5b77529 // static char *getPenColor(void *obj) public static Object getPenColor(Object... arg) { UNSUPPORTED("cfi7ftrhnkn3lm0wv2x0r18rz"); // static char *getPenColor(void *obj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("76nok3eiyr33qf4ecv69ujxn6"); // char *str; UNSUPPORTED("29hppwsf0dbsgg7vod6zm63bi"); // if (((str = agget(obj, "pencolor")) != 0) && str[0]) UNSUPPORTED("dep483bycw0fobgm198jw5423"); // return str; UNSUPPORTED("edcd5eo1mutwxn0thhhi6st3g"); // else if (((str = agget(obj, "color")) != 0) && str[0]) UNSUPPORTED("dep483bycw0fobgm198jw5423"); // return str; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("11hwqop4xebvtcskop4uhpp01"); // return NULL; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 39z2hrj2uwkezxobreqxpgb10 // int make_html_label(void *obj, textlabel_t * lp) public static int make_html_label(__ptr__ obj, textlabel_t lp) { ENTERING("39z2hrj2uwkezxobreqxpgb10","make_html_label"); try { UNSUPPORTED("3s2xr5n4swgcjctfsv6qg00p1"); // int make_html_label(void *obj, textlabel_t * lp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ecz4e03zumggc8tfymqvirexq"); // int rv; UNSUPPORTED("eilnlejf229enq1lj62vjv9co"); // double wd2, ht2; UNSUPPORTED("5t3pges1wg6mfbkjboi2joxvz"); // boxf box; UNSUPPORTED("djl3ek9tn11htu3vj4zglczzz"); // graph_t *g; UNSUPPORTED("1u1794803wctqmezrle9e40fh"); // htmllabel_t *lbl; UNSUPPORTED("3safvfkd3g1jswoj457mw482u"); // htmlenv_t env; UNSUPPORTED("8yytudftst76763qgnjebkzhm"); // char *s; UNSUPPORTED("1czan75f1vggpdp24d7zdiuk3"); // env.obj = obj; UNSUPPORTED("91broiy562bqiwualvjbh1l0s"); // switch (agobjkind(obj)) { UNSUPPORTED("eyna33dobiebmtd0nihpgura4"); // case AGRAPH: UNSUPPORTED("e6ugdl34d8yqtquk3xq8g5njr"); // env.g = ((Agraph_t *) obj)->root; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6x7ztvlgv763oeop84udp1egg"); // case AGNODE: UNSUPPORTED("9ldb5ezpi13ytd46d7a2jfsjt"); // env.g = agraphof(((Agnode_t *) obj)); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("2dqikmmb6ag0anvbzo5tybf1r"); // case AGEDGE: UNSUPPORTED("b3fnj3g5kryrunurhwtu14s58"); // env.g = agraphof(aghead(((Agedge_t *) obj))); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b3ml4dxxt48s1jb4tjmh3kcl"); // g = env.g->root; UNSUPPORTED("a849v049i9w8qoy93ki11k5uu"); // env.finfo.size = lp->fontsize; UNSUPPORTED("a1hmvx29drpq62yc0z1hnt94v"); // env.finfo.name = lp->fontname; UNSUPPORTED("bp1xlac8f55plurlc7r8zlhe1"); // env.finfo.color = lp->fontcolor; UNSUPPORTED("1zhbcd4p01yiidkt2nre243ud"); // env.finfo.flags = 0; UNSUPPORTED("59lntj5hyamn5m48dx76egibr"); // lbl = parseHTML(lp->text, &rv, &env); UNSUPPORTED("5x7tz7hiemlbixjq7oneb217t"); // if (!lbl) { UNSUPPORTED("40w3xqmz5l9wriaza3oix426k"); // /* Parse of label failed; revert to simple text label */ UNSUPPORTED("8moktqylyfg7421xon31c77cc"); // agxbuf xb; UNSUPPORTED("ej6qvho3zo1ppee5osn05sznr"); // unsigned char buf[128]; UNSUPPORTED("el1z2krv8hoorc5c7vjsxw7yn"); // agxbinit(&xb, 128, buf); UNSUPPORTED("ex7p8f1fzbxmluxcv7b1klvqj"); // lp->html = 0; UNSUPPORTED("bw17wplsvct5mo251vy3dsdnd"); // lp->text = strdup(nameOf(obj, &xb)); UNSUPPORTED("84zi029i2je3v9lclasqbzzz6"); // switch (lp->charset) { UNSUPPORTED("2o83im06dulx11wjpy469gkoa"); // case 1: UNSUPPORTED("2x8axrtn44h0bxv8taty1g4um"); // s = latin1ToUTF8(lp->text); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("6s5lm4gzged3go962bmlj7ali"); // default: /* UTF8 */ UNSUPPORTED("ae0fj5kvhvwo125n05075dey0"); // s = htmlEntityUTF8(lp->text, env.g); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8o33n1cjfbc5pomhjq05mf70g"); // free(lp->text); UNSUPPORTED("dggo2tcwybfitlkszeokmmkif"); // lp->text = s; UNSUPPORTED("6kbijqcef4n75vn0elzyhlp1s"); // make_simple_label(GD_gvc(g), lp); UNSUPPORTED("52frst03mcbsuu6bmnqs962qm"); // agxbfree(&xb); UNSUPPORTED("cs1ejkx9cw658cl8cagdzqrzm"); // return rv; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5iviolw5wpvd60kgvpshry9yr"); // if (lbl->kind == 1) { UNSUPPORTED("bngn7k03zqxfuyqrg5jrn8bey"); // if (!lbl->u.tbl->data.pencolor && getPenColor(obj)) UNSUPPORTED("dotxa79u2y19du2t3cy26ikyr"); // lbl->u.tbl->data.pencolor = strdup(getPenColor(obj)); UNSUPPORTED("4f3k9n37gn0t77n0n8w2jri95"); // rv |= size_html_tbl(g, lbl->u.tbl, NULL, &env); UNSUPPORTED("9uru4l1xhqaont8awi4p0sjkj"); // wd2 = (lbl->u.tbl->data.box.UR.x) / 2; UNSUPPORTED("47cjxxvben4j3g6i0n57razql"); // ht2 = (lbl->u.tbl->data.box.UR.y) / 2; UNSUPPORTED("dbeae1e9945z3x32hpr57lcsy"); // box = boxfof(-wd2, -ht2, wd2, ht2); UNSUPPORTED("esx73kvkhml43ids93kjyxtjl"); // pos_html_tbl(lbl->u.tbl, box, (1<<0) | (1<<1) | (1<<2) | (1<<3)); UNSUPPORTED("1pymoi8bdocpvglitsvkl1ht0"); // lp->dimen.x = box.UR.x - box.LL.x; UNSUPPORTED("37qvpfma16f9jhg8vmapgqes9"); // lp->dimen.y = box.UR.y - box.LL.y; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("4c4f4evqzm79omegn0iiwh0xm"); // rv |= size_html_txt(GD_gvc(g), lbl->u.txt, &env); UNSUPPORTED("5p7gjzkkk108kyqqi0dcaub03"); // wd2 = lbl->u.txt->box.UR.x / 2; UNSUPPORTED("2h33453c8784yvjdqab9rhpnb"); // ht2 = lbl->u.txt->box.UR.y / 2; UNSUPPORTED("dbeae1e9945z3x32hpr57lcsy"); // box = boxfof(-wd2, -ht2, wd2, ht2); UNSUPPORTED("bm3p3ihso4c60iy15wod75c9c"); // lbl->u.txt->box = box; UNSUPPORTED("1pymoi8bdocpvglitsvkl1ht0"); // lp->dimen.x = box.UR.x - box.LL.x; UNSUPPORTED("37qvpfma16f9jhg8vmapgqes9"); // lp->dimen.y = box.UR.y - box.LL.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5a4597d2vy3oenspwdojc7p42"); // lp->u.html = lbl; UNSUPPORTED("75khj23dwtyoqpo3pddh0y5lm"); // /* If the label is a table, replace label text because this may UNSUPPORTED("r04wjcozjf8bj9wdy4arsdy1"); // * be used for the title and alt fields in image maps. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("5iviolw5wpvd60kgvpshry9yr"); // if (lbl->kind == 1) { UNSUPPORTED("8o33n1cjfbc5pomhjq05mf70g"); // free(lp->text); UNSUPPORTED("40luql1elu7ug4ne43b0l4bh4"); // lp->text = strdup(""); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("39z2hrj2uwkezxobreqxpgb10","make_html_label"); } } } plantuml-1.2017.15/src/gen/lib/common/input__c.java000066400000000000000000002117301312650303100217230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static gen.lib.cgraph.attr__c.agattr; import static gen.lib.cgraph.attr__c.agget; import static gen.lib.cgraph.obj__c.agroot; import static gen.lib.cgraph.refstr__c.aghtmlstr; import static gen.lib.common.emit__c.init_xdot; import static gen.lib.common.labels__c.make_label; import static gen.lib.common.labels__c.strdup_and_subst_obj; import static gen.lib.common.memory__c.zmalloc; import static gen.lib.common.utils__c.late_double; import static gen.lib.common.utils__c.late_int; import static gen.lib.common.utils__c.late_nnstring; import static gen.lib.common.utils__c.late_string; import static gen.lib.common.utils__c.mapbool; import static gen.lib.common.utils__c.maptoken; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.atof; import static smetana.core.JUtils.atoi; import static smetana.core.JUtils.enumAsInt; import static smetana.core.JUtils.getenv; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtils.strstr; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGEDGE; import static smetana.core.Macro.AGNODE; import static smetana.core.Macro.AGRAPH; import static smetana.core.Macro.GD_border; import static smetana.core.Macro.GD_charset; import static smetana.core.Macro.GD_drawing; import static smetana.core.Macro.GD_exact_ranksep; import static smetana.core.Macro.GD_flip; import static smetana.core.Macro.GD_fontnames; import static smetana.core.Macro.GD_has_labels; import static smetana.core.Macro.GD_label; import static smetana.core.Macro.GD_label_pos; import static smetana.core.Macro.GD_nodesep; import static smetana.core.Macro.GD_rankdir2; import static smetana.core.Macro.GD_ranksep; import static smetana.core.Macro.GD_showboxes; import static smetana.core.Macro.N; import static smetana.core.Macro.ROUND; import static smetana.core.Macro.UNSUPPORTED; import h.Agraph_s; import h.boxf; import h.fontname_kind; import h.layout_t; import h.pointf; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Z; import smetana.core.__struct__; public class input__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 1fi3wib3hc7ibek0vfrpx9k3i // static char *usageFmt = //1 cpzagrot2j4620xbm08g3qbaz // static char *genericItems = //1 ej8f5pc6itbjzywbvv9r7pgog // static char *neatoFlags = //1 6zygu4f39vz4q5m4oiz64om5v // static char *neatoItems = //1 a5i7jzdqfacw4bequdriv6cb9 // static char *fdpFlags = //1 9hrf5y45qp9kii44glcd4nx6e // static char *fdpItems = //1 bw7swzrd97c859k69vhbo6xui // static char *memtestFlags = //1 dlf2hcbhlyk0xi7y4hhyxdjlg // static char *memtestItems = //1 bfkjkg4j8ncjq3fbcfon7ce1a // static char *configFlags = //1 cwsgle0ax1dh0i4rb6c4n90s8 // static char *configItems = //3 18dk9rr2jwvw2k0pwd01u1rp // int dotneato_usage(int exval) public static Object dotneato_usage(Object... arg) { UNSUPPORTED("cjfxortgnqo3ho8cb4mse3bjk"); // int dotneato_usage(int exval) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9qo38fqtykhj9o5wf9n2mmvf9"); // FILE *outs; UNSUPPORTED("6p2t5f6k16pthcnlxnvr8fxp2"); // if (exval > 0) UNSUPPORTED("ajsyw6vt4yc7jws9my3dfqw55"); // outs = stderr; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("9ymsocy1jyvql8lvl7z9v3x1d"); // outs = stdout; UNSUPPORTED("eo2ztyy17mz06ptqvcj5azpza"); // fprintf(outs, usageFmt, CmdName); UNSUPPORTED("1nhpls9sffy8jo9sa7638u515"); // fputs(neatoFlags, outs); UNSUPPORTED("578fe6racfp402cmjp3xuomor"); // fputs(fdpFlags, outs); UNSUPPORTED("a3xdyyuyrv70igk8e8z4415gn"); // fputs(memtestFlags, outs); UNSUPPORTED("59cqs6545cogaa8zbv9x1fep0"); // fputs(configFlags, outs); UNSUPPORTED("9qmx2r5uawon9q2snigjcita"); // fputs(genericItems, outs); UNSUPPORTED("18sodiqes6jpcc8fj1vlkj6bd"); // fputs(neatoItems, outs); UNSUPPORTED("boxkj32094gcugdk6u9p1hppc"); // fputs(fdpItems, outs); UNSUPPORTED("4yygtzneqsdphtbnhfta2lge0"); // fputs(memtestItems, outs); UNSUPPORTED("8ywutcqn5x3zpugo58b72ualq"); // fputs(configItems, outs); UNSUPPORTED("3rabv7gfkqu0ag8x2rjiyrjbr"); // if (GvExitOnUsage && (exval >= 0)) UNSUPPORTED("1swto2i8s568mypddkno5wez1"); // exit(exval); UNSUPPORTED("3jphahsl7jw3c1c1u71vs8dj3"); // return (exval+1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9s68av3h3ph5gjla9e2d3220t // static char *getFlagOpt(int argc, char **argv, int *idx) public static Object getFlagOpt(Object... arg) { UNSUPPORTED("7i2co2mk6i4v2e5zed6cohfi0"); // static char *getFlagOpt(int argc, char **argv, int *idx) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0vo8zzyjurgsxynujp3wbwn3"); // int i = *idx; UNSUPPORTED("9ldayvulqiau72gm4iigedbe"); // char *arg = argv[i]; UNSUPPORTED("1ii197c2ypmbtq6b4c6xrmqre"); // if (arg[2]) UNSUPPORTED("85bk7kest90gpgv6qhqqam6od"); // return arg + 2; UNSUPPORTED("62vtkmbmceearvwa1gge24udl"); // if (i < argc - 1) { UNSUPPORTED("chd2f5z6rt19lbaye25ej7q6j"); // i++; UNSUPPORTED("dbe1l1xge33op9cemtc13bsld"); // arg = argv[i]; UNSUPPORTED("e7t6j4nall86kdxxvxopr6hl7"); // if (*arg && (*arg != '-')) { UNSUPPORTED("a1qi3k2o6tudikh6zg6qxb32v"); // *idx = i; UNSUPPORTED("aegbvj6xoqbt16mud86st36ex"); // return arg; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2dx6lb6fkeqxispmv7w0bgsat // static char* dotneato_basename (char* path) public static Object dotneato_basename(Object... arg) { UNSUPPORTED("58z62a4pwz8fb1fqzgemmk2v"); // static char* dotneato_basename (char* path) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("60anbhq8j280g1jvxqcu76t4v"); // char* ret; UNSUPPORTED("cmcyg2bmd7exlb7oegpilnua8"); // char* s = path; UNSUPPORTED("7oz55r1w75doc5wm9wdr5ud7c"); // if (*s == '\0') return path; /* empty string */ UNSUPPORTED("48at50ffoqbw40aae7qlp0vus"); // while (*s) s++; s--; UNSUPPORTED("tbim4ak38lvnw1gb72gj4hnh"); // /* skip over trailing slashes, nulling out as we go */ UNSUPPORTED("clj6wpwuuq0wl5g7f67hqvvfc"); // while ((s > path) && ((*s == '/') || (*s == '\\'))) UNSUPPORTED("f59muao0hgreza561qmmnlzum"); // *s-- = '\0'; UNSUPPORTED("18c1lv0flxz0ts64xlwuviv33"); // if (s == path) ret = path; UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("4x9t5rl1kdp5nac9tewdf9x2n"); // while ((s > path) && ((*s != '/') && (*s != '\\'))) s--; UNSUPPORTED("953u2wmr3tzfpiq8m06fdvhn5"); // if ((*s == '/') || (*s == '\\')) ret = s+1; UNSUPPORTED("5dwayhic40dcurqedqxv1q7mj"); // else ret = path; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("f3b7mj138albdr4lodyomke0z"); // return ret; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ez0qfar6yuf01ivvqrnev06fv // static void use_library(GVC_t *gvc, const char *name) public static Object use_library(Object... arg) { UNSUPPORTED("cjicty7s03euuxnpum74nrt6f"); // static void use_library(GVC_t *gvc, const char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8h89r8rhn7udjmeo8y259899y"); // static int cnt = 0; UNSUPPORTED("30nxp5k7c6mdth5ymcpz1oxob"); // if (name) { UNSUPPORTED("dwg0l3nktjnwky7m5lipngiot"); // Lib = ALLOC(cnt + 2, Lib, const char *); UNSUPPORTED("axgfffz8lebk44oe1y1djiu6p"); // Lib[cnt++] = name; UNSUPPORTED("3c388gk5lojcaen61m94i3x0w"); // Lib[cnt] = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("comriuhmiu8kq7sayutlxoqbq"); // gvc->common.lib = Lib; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dlfidqx2agrk43ikmxgzw9kgp // static void global_def(agxbuf* xb, char *dcl, int kind, attrsym_t * ((*dclfun) (Agraph_t *, int kind, char *, char *)) ) public static Object global_def(Object... arg) { UNSUPPORTED("zydu58d3g8obsevu9l8zo05i"); // static void global_def(agxbuf* xb, char *dcl, int kind, UNSUPPORTED("zj9p9fdfpp3hwme7atl3cug3"); // attrsym_t * ((*dclfun) (Agraph_t *, int kind, char *, char *)) ) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("c6ykztqlvb01grrqat3q7f8hg"); // char *rhs = "true"; UNSUPPORTED("7c3pfnvbbbnijw9cg9xkyyatm"); // attrsym_t *sym; UNSUPPORTED("1qmhad0yyiddc207b8z5rm70x"); // if ((p = strchr(dcl, '='))) { UNSUPPORTED("5s96z976xk7iglr5vvuad1dsb"); // agxbput_n (xb, dcl, p-dcl); UNSUPPORTED("dbw9pn8xmpdqi11uffv4r6gxq"); // rhs = p+1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("dv0ywo1nopy8xc9d9kfbn0hgz"); // agxbput (xb, dcl); UNSUPPORTED("dhedzhv3dnzrq7ytgiqff11ku"); // sym = dclfun(NULL, kind, (((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)'\0'))),(char*)((xb)->ptr = (xb)->buf)), rhs); UNSUPPORTED("6o4s3a3c3rae5ltba8nvab5px"); // sym->fixed = 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5qvhl3c476hpwnik5r2ee5pin // static int gvg_init(GVC_t *gvc, graph_t *g, char *fn, int gidx) public static Object gvg_init(Object... arg) { UNSUPPORTED("69zdfufo90wdjvfvsw59lz5n3"); // static int gvg_init(GVC_t *gvc, graph_t *g, char *fn, int gidx) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c55ofvf49idlhjsnnxfqjpi9s"); // GVG_t *gvg; UNSUPPORTED("1nqr81udw639pz7enx2hfhtn5"); // gvg = zmalloc(sizeof(GVG_t)); UNSUPPORTED("wpylwsmjyiuxs9f8x3srqmfs"); // if (!gvc->gvgs) UNSUPPORTED("9y22l2dxq6artoaqqeeczdq1x"); // gvc->gvgs = gvg; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("2nndq73tw0aaltr2i1ajvsspn"); // gvc->gvg->next = gvg; UNSUPPORTED("e9w6optlcophkwjmfin7kyi1i"); // gvc->gvg = gvg; UNSUPPORTED("eish9dbcdxs6v4dh4sgg6uzjj"); // gvg->gvc = gvc; UNSUPPORTED("27sxrps4axrp5fbl0qnenmif3"); // gvg->g = g; UNSUPPORTED("5q4sypoeu8fbwv3a2p6qsnq73"); // gvg->input_filename = fn; UNSUPPORTED("1wh5jhwi3fb70nrl37aoz6lhj"); // gvg->graph_index = gidx; UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 6k1gxkaeteh3v4108asx0nu9q // static graph_t *P_graph //3 2zkpt5r5hmvqy31vbxai8aoww // graph_t *gvPluginsGraph(GVC_t *gvc) public static Object gvPluginsGraph(Object... arg) { UNSUPPORTED("aq8xsrhhkbt250zdmff189jej"); // graph_t *gvPluginsGraph(GVC_t *gvc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eoghsuji192if07hz2zmt1geg"); // gvg_init(gvc, P_graph, "", 0); UNSUPPORTED("5qryvsjfdmb52s891tbejpwi3"); // return P_graph; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a4vyp310q1ezn1wiiqbhjazfi // int dotneato_args_initialize(GVC_t * gvc, int argc, char **argv) public static Object dotneato_args_initialize(Object... arg) { UNSUPPORTED("3an9kpb8l897hglulndwlyhmk"); // int dotneato_args_initialize(GVC_t * gvc, int argc, char **argv) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("exs7yxl18noutslfdhd65grcd"); // char c, *rest, *layout; UNSUPPORTED("d28hrwkttitp7p3zkyur6josm"); // const char *val; UNSUPPORTED("e4nq5nxc3t4f7sn9hms693ro5"); // int i, v, nfiles; UNSUPPORTED("h0or3v13348vfl22jqz895yc"); // unsigned char buf[128]; UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("djkz3f3ke85c3ihtck61wzehd"); // int Kflag = 0; UNSUPPORTED("e36z5l2h47e3sm6az444bpmte"); // /* establish if we are running in a CGI environment */ UNSUPPORTED("39kpbo7t3xw42psbqxwyosbtg"); // HTTPServerEnVar = getenv("SERVER_NAME"); UNSUPPORTED("bjgrdu955j26h6boths39zysy"); // /* establish Gvfilepath, if any */ UNSUPPORTED("9u1u08bh9yk3m8qjesa9h35o3"); // Gvfilepath = getenv("GV_FILE_PATH"); UNSUPPORTED("byzhjcmd87bu2q2ifs8d2zqmx"); // gvc->common.cmdname = dotneato_basename(argv[0]); UNSUPPORTED("6t7yoiijwsc45jhh2ycc1zvqn"); // if (gvc->common.verbose) { UNSUPPORTED("5jlgk53d79be5z8yrpqk31i41"); // fprintf(stderr, "%s - %s version %s (%s)\n", UNSUPPORTED("a3fdnva5eaynygwl01w4i14vu"); // gvc->common.cmdname, gvc->common.info[0], UNSUPPORTED("4cr6o6cpwligpzuiy9go86dtk"); // gvc->common.info[1], gvc->common.info[2]); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ebjtmwuwx6vwhxaswhb2j4mfm"); // /* configure for available plugins */ UNSUPPORTED("7y1a5ferpdpuzp8lj2nreef7e"); // /* needs to know if "dot -c" is set (gvc->common.config) */ UNSUPPORTED("1915n665xv0fno6lfzaikw5ml"); // /* must happen before trying to select any plugins */ UNSUPPORTED("b2umkw2rzz1ig1cngfiht4fmx"); // if (gvc->common.config) { UNSUPPORTED("d3di2hukfdei22j9nlhb4lr4i"); // gvconfig(gvc, gvc->common.config); UNSUPPORTED("ew35v5jfro4z9mn5cwzl5e0ha"); // exit (0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9gg8gbp3jei0upfnr0b5i6fur"); // /* feed the globals */ UNSUPPORTED("36hh3435f786qyybpu0o87zjv"); // Verbose = gvc->common.verbose; UNSUPPORTED("es2j9l0phjktwgdz1y2435lnm"); // CmdName = gvc->common.cmdname; UNSUPPORTED("dhvbz69j0rmligcrm9974041x"); // nfiles = 0; UNSUPPORTED("d1jh4myxvrwmm9xcl79yh24g1"); // for (i = 1; i < argc; i++) UNSUPPORTED("32x1kvhg66oubz0hakj6dvxg1"); // if (argv[i] && argv[i][0] != '-') UNSUPPORTED("5pk2vvpyoy1qbkfwm0d3cqpip"); // nfiles++; UNSUPPORTED("d4gb5xxnp2a9dqmzsisy3d2x5"); // gvc->input_filenames = (char **)zmalloc((nfiles + 1)*sizeof(char *)); UNSUPPORTED("dhvbz69j0rmligcrm9974041x"); // nfiles = 0; UNSUPPORTED("ci65k77x1b3nq6luu69s87oup"); // agxbinit(&xb, 128, buf); UNSUPPORTED("9fp588sbdt939tsh4lldsi78p"); // for (i = 1; i < argc; i++) { UNSUPPORTED("71ydjmz8tdkhga4y130hpfzd7"); // if (argv[i] && argv[i][0] == '-') { UNSUPPORTED("a2i31gh8f8d1uzwvazthtdjhl"); // rest = &(argv[i][2]); UNSUPPORTED("akiijvdhiis6rte3uan48lkio"); // switch (c = argv[i][1]) { UNSUPPORTED("cnw3cn0y6fyfmhrj9i6zrj7yt"); // case 'G': UNSUPPORTED("cyapeoqsbt759mwufn37a0j3w"); // if (*rest) UNSUPPORTED("37iemzdcou8tf7mb850gmys6k"); // global_def(&xb, rest, AGRAPH, agattr); UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("d10434bczuxvbju6r580xu4i3"); // fprintf(stderr, "Missing argument for -G flag\n"); UNSUPPORTED("3j6l9hq73a342kljq6expow6m"); // return (dotneato_usage(1)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("3za1kdrr0abcgx59eek9sst25"); // case 'N': UNSUPPORTED("cyapeoqsbt759mwufn37a0j3w"); // if (*rest) UNSUPPORTED("22su7vu663f22bni5gx0jkxq9"); // global_def(&xb, rest, AGNODE,agattr); UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("14g4xc09ropngbhfr31tffeii"); // fprintf(stderr, "Missing argument for -N flag\n"); UNSUPPORTED("3j6l9hq73a342kljq6expow6m"); // return (dotneato_usage(1)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("30903uov1ouylqet6qkn3k0rw"); // case 'E': UNSUPPORTED("cyapeoqsbt759mwufn37a0j3w"); // if (*rest) UNSUPPORTED("b73i9nd8mv1m5tjqoqs0xawyw"); // global_def(&xb, rest, AGEDGE,agattr); UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("6utrckluwkoaluhpksl5aa52s"); // fprintf(stderr, "Missing argument for -E flag\n"); UNSUPPORTED("3j6l9hq73a342kljq6expow6m"); // return (dotneato_usage(1)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("1ve8bjgk9dfpf0eremg7h6xzz"); // case 'T': UNSUPPORTED("8xdr8a6r0v0ddt027euqcwvue"); // val = getFlagOpt(argc, argv, &i); UNSUPPORTED("3w8hn108291bjaa11z3v4j97d"); // if (!val) { UNSUPPORTED("cd45xgksaxjl5u63gikj5qcyu"); // fprintf(stderr, "Missing argument for -T flag\n"); UNSUPPORTED("3j6l9hq73a342kljq6expow6m"); // return (dotneato_usage(1)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("72i7z40rqqngolv7pgnr45kl3"); // v = gvjobs_output_langname(gvc, val); UNSUPPORTED("9cs6zbfun0bg9dhunbu1dwnox"); // if (!v) { UNSUPPORTED("7ohbl1a39cg7xkg3hactpw7w3"); // fprintf(stderr, "Format: \"%s\" not recognized. Use one of:%s\n", UNSUPPORTED("f2p3vxh49izcvsl9jvtkf6q3o"); // val, gvplugin_list(gvc, API_device, val)); UNSUPPORTED("910dtu59610pevhvj5yhrqcm4"); // if (GvExitOnUsage) exit(1); UNSUPPORTED("7uqiarbyt9mx4hwdla4nbhj8p"); // return(2); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("8e0kz1b9axy6hx29fg32k1asu"); // case 'K': UNSUPPORTED("8xdr8a6r0v0ddt027euqcwvue"); // val = getFlagOpt(argc, argv, &i); UNSUPPORTED("3w8hn108291bjaa11z3v4j97d"); // if (!val) { UNSUPPORTED("4387cb0sfakxesew55rctdheb"); // fprintf(stderr, "Missing argument for -K flag\n"); UNSUPPORTED("2ns70sizijh2h7z83rt81fqfk"); // return (dotneato_usage(1)); UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("13d5md8v926ivibrbmgaktksx"); // v = gvlayout_select(gvc, val); UNSUPPORTED("4pu52xhc37cufgh16nc8pjoa2"); // if (v == 999) { UNSUPPORTED("8uoslbuyiw8828cnsd28ys8oh"); // fprintf(stderr, "There is no layout engine support for \"%s\"\n", val); UNSUPPORTED("em4qxiev3phf1bnbh6vx4zjp9"); // if ((*(val)==*("dot")&&!strcmp(val,"dot"))) { UNSUPPORTED("e46yvd7c19nfgratz9j0sg9d0"); // fprintf(stderr, "Perhaps \"dot -c\" needs to be run (with installer's privileges) to register the plugins?\n"); UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("cphaexi33y32dnefwtu3jsom4"); // else { UNSUPPORTED("d3cg95zim5q97685u5v0sxrhv"); // fprintf(stderr, "Use one of:%s\n", UNSUPPORTED("7ced84fhzz8sv21ptj4yf5b3p"); // gvplugin_list(gvc, API_layout, val)); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("910dtu59610pevhvj5yhrqcm4"); // if (GvExitOnUsage) exit(1); UNSUPPORTED("7uqiarbyt9mx4hwdla4nbhj8p"); // return(2); UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("8c0wmxuda35p1as4i2fh9yoti"); // Kflag = 1; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("5gsxsxc1w5fdmgnphelmjuqql"); // case 'P': UNSUPPORTED("91ohbqvqagns01k8geznhjm7k"); // P_graph = gvplugin_graph(gvc); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("cxe7ytf67rip7dewog9rnbqqq"); // case 'V': UNSUPPORTED("61p8yjtqxyg8jhsx9xyqa39my"); // fprintf(stderr, "%s - %s version %s (%s)\n", UNSUPPORTED("chg3zu0nmmc2hpkc8a0cx08er"); // gvc->common.cmdname, gvc->common.info[0], UNSUPPORTED("b9v3iookta64ex67ies4j4zva"); // gvc->common.info[1], gvc->common.info[2]); UNSUPPORTED("2hk3eyce9u1ys3e3ycfmrtq9n"); // if (GvExitOnUsage) exit(0); UNSUPPORTED("b9uibzxx0tu796r6pqyspuc8u"); // return (1); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("8et213nsqt44k6e0d06mh32mg"); // case 'l': UNSUPPORTED("8xdr8a6r0v0ddt027euqcwvue"); // val = getFlagOpt(argc, argv, &i); UNSUPPORTED("3w8hn108291bjaa11z3v4j97d"); // if (!val) { UNSUPPORTED("3l9adyncbqlq4cr0dn291j8ms"); // fprintf(stderr, "Missing argument for -l flag\n"); UNSUPPORTED("3j6l9hq73a342kljq6expow6m"); // return (dotneato_usage(1)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("a3ei53c2mnxhfpt33rezp6ll1"); // use_library(gvc, val); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t4c4wqag0c9inoine0vc6rzh"); // case 'o': UNSUPPORTED("8xdr8a6r0v0ddt027euqcwvue"); // val = getFlagOpt(argc, argv, &i); UNSUPPORTED("cgclbrsy2pcq9nt94cnmi4l1n"); // if (! gvc->common.auto_outfile_names) UNSUPPORTED("6l1o8s3lihedxdhlhkt8bacw5"); // gvjobs_output_filename(gvc, val); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("3gzpswryl53n5xaxcbut8piyh"); // case 'q': UNSUPPORTED("55tn4eqemjloic8o06vd4n3nc"); // if (*rest) { UNSUPPORTED("5j8v456fg3eazoh4x59s440ph"); // v = atoi(rest); UNSUPPORTED("ee277mlx9bo22lecmdsnie12n"); // if (v <= 0) { UNSUPPORTED("3iwc3dzplzj2jkbze5cd6zfh9"); // fprintf(stderr, UNSUPPORTED("6w3cyan5p5sb01pzz7n8i45h6"); // "Invalid parameter \"%s\" for -q flag - ignored\n", UNSUPPORTED("77gwizewn0zj87535pi2g735m"); // rest); UNSUPPORTED("2ndpjzfiv49aqobcgbi5tftoi"); // } else if (v == 1) UNSUPPORTED("b4xb9n0clcaf5h0njzxmd6t8u"); // agseterr(AGERR); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("eb2xug8syn6gd6cd1ms784rt0"); // agseterr(AGMAX); UNSUPPORTED("738mi6h8ef0itznt34ngxe25o"); // } else UNSUPPORTED("cyu314astki71lyhi8jonkon1"); // agseterr(AGERR); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("9laca56e8dr2klwt5asm5s92v"); // case 's': UNSUPPORTED("55tn4eqemjloic8o06vd4n3nc"); // if (*rest) { UNSUPPORTED("7p5xijseyywlgq947on87fbfy"); // PSinputscale = atof(rest); UNSUPPORTED("te6xrfczv0b2rmmfw7n419bj"); // if (PSinputscale < 0) { UNSUPPORTED("3iwc3dzplzj2jkbze5cd6zfh9"); // fprintf(stderr, UNSUPPORTED("298zr2x6bn7osz168zt1qsgbn"); // "Invalid parameter \"%s\" for -s flag\n", UNSUPPORTED("77gwizewn0zj87535pi2g735m"); // rest); UNSUPPORTED("788fqd2nm2s7cyhjye34lwaho"); // return (dotneato_usage(1)); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("e99bugzc8p62vi8asjsx3jnat"); // else if (PSinputscale == 0) UNSUPPORTED("ca5magegib4z3wn2wbj91xdz5"); // PSinputscale = 72; UNSUPPORTED("738mi6h8ef0itznt34ngxe25o"); // } else UNSUPPORTED("cdz7sxlinpy8lsv4kjrrzvmlb"); // PSinputscale = 72; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("551eo7ey20lfrotadzc8xx636"); // case 'x': UNSUPPORTED("ciou2ugu3ekwr7d8dtcmo8bqd"); // Reduce = NOT(0); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6hwwmvxwrrrsv7qs0y53et76n"); // case 'y': UNSUPPORTED("71s7bg2w58aqtjmpwed4525kz"); // Y_invert = NOT(0); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("eqbveikc3czxh4drpev1uzhla"); // case '?': UNSUPPORTED("5tdq5fsx232bmgvcnkjmwox6c"); // return (dotneato_usage(0)); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("bt2g0yhsy3c7keqyftf3c98ut"); // default: UNSUPPORTED("ex8ddsq0de4n302ieh93s4nrw"); // agerr(AGERR, "%s: option -%c unrecognized\n\n", gvc->common.cmdname, UNSUPPORTED("4fgwtijdvmyysu4tcsnigf36q"); // c); UNSUPPORTED("5mxnk6d8u3qj69z7yzqkphjgw"); // return (dotneato_usage(1)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ezl09f02n0cfigsaeyqsejcm0"); // } else if (argv[i]) UNSUPPORTED("ez69zldbihwem8y9yr9rmi9gt"); // gvc->input_filenames[nfiles++] = argv[i]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9ocnzhe59r19odwgtedwnydm"); // agxbfree (&xb); UNSUPPORTED("56kll2bx8jbmqba2kk0pxvefe"); // /* if no -K, use cmd name to set layout type */ UNSUPPORTED("dy5okspyylmag8l3ke6of2fps"); // if (!Kflag) { UNSUPPORTED("18vaoqlkvxjkxccqkm1cxljuo"); // layout = gvc->common.cmdname; UNSUPPORTED("bshj1mtaoepm94oi9afocf8ou"); // if ((*(layout)==*("dot_static")&&!strcmp(layout,"dot_static")) UNSUPPORTED("64dtzt25t15e7uoo50r0rsefx"); // || (*(layout)==*("dot_builtins")&&!strcmp(layout,"dot_builtins")) UNSUPPORTED("klg5jjw0m71w4m5shlxzhfjy"); // || (*(layout)==*("lt-dot")&&!strcmp(layout,"lt-dot")) UNSUPPORTED("42tigt1aywc44r9j37x5jq0ib"); // || (*(layout)==*("lt-dot_builtins")&&!strcmp(layout,"lt-dot_builtins")) UNSUPPORTED("56pxlfwd1wodkyuswmf36lmwr"); // || (*(layout)==*("")&&!strcmp(layout,"")) /* when run as a process from Gvedit on Windows */ UNSUPPORTED("awdmf39ch8hkgicc7jwv9s67r"); // ) UNSUPPORTED("80rf3qgk59flt06kvnzepp9kt"); // layout = "dot"; UNSUPPORTED("e3pxmvk611turzkqpddzqql3e"); // i = gvlayout_select(gvc, layout); UNSUPPORTED("cbslslfvt4zqfxukzdqeu902c"); // if (i == 999) { UNSUPPORTED("2h041d156jcuzdn0h3t1kxz6b"); // fprintf(stderr, "There is no layout engine support for \"%s\"\n", layout); UNSUPPORTED("6xr0y24n28bl6fmb7hwi2d6yh"); // if ((*(layout)==*("dot")&&!strcmp(layout,"dot"))) UNSUPPORTED("a9b0u4vno2ovyayhgdz2qi2l0"); // fprintf(stderr, "Perhaps \"dot -c\" needs to be run (with installer's privileges) to register the plugins?\n"); UNSUPPORTED("f3qa0cv737ikcre1vpqlkukio"); // else UNSUPPORTED("3oqrxaejbit2ag4yv1f8std7v"); // fprintf(stderr, "Use one of:%s\n", gvplugin_list(gvc, API_layout, "")); UNSUPPORTED("cziimyez7l7opmyxtz7i258x"); // if (GvExitOnUsage) exit(1); UNSUPPORTED("8u2416o82oso1w72bexmapn9v"); // return(2); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e8n0c84rizzjhmsff49m2fynz"); // /* if no -Txxx, then set default format */ UNSUPPORTED("5atdq1nn8pklea2e61l8ekie"); // if (!gvc->jobs || !gvc->jobs->output_langname) { UNSUPPORTED("ejs6fyeynpj73y8zhc2xjcvrc"); // v = gvjobs_output_langname(gvc, "dot"); UNSUPPORTED("6lpp7llfms4w364wz03qdlrnl"); // if (!v) { UNSUPPORTED("5di5qeuntrt4eii2azt25l076"); // // assert(v); /* "dot" should always be available as an output format */ UNSUPPORTED("18zn34qcs4vsdhhh831gn9vc9"); // fprintf(stderr, UNSUPPORTED("5rhyltg4walgso272exe4gdqz"); // "Unable to find even the default \"-Tdot\" renderer. Has the config\nfile been generated by running \"dot -c\" with installer's priviledges?\n"); UNSUPPORTED("3r5dyo5vxrzten0rhlmlmhe8v"); // return(2); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1i3ejmrslphirq6u7onu2i3cr"); // /* set persistent attributes here (if not already set from command line options) */ UNSUPPORTED("et68lvyh6row6cmvnxmw4nuvj"); // if (!agattr(NULL, AGNODE, "label", 0)) UNSUPPORTED("74v5uwoisv6m2lnnjv33219om"); // agattr(NULL, AGNODE, "label", "\\N"); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 72no6ayfvjinlnupyn5jlmayg // static boolean getdoubles2ptf(graph_t * g, char *name, pointf * result) public static boolean getdoubles2ptf(Agraph_s g, CString name, pointf result) { ENTERING("72no6ayfvjinlnupyn5jlmayg","getdoubles2ptf"); try { CString p; int i; double xf, yf; char c = '\0'; boolean rv = false; if ((p = agget(g, name))!=null) { UNSUPPORTED("21b2kes0vrizyai71yj9e2os3"); // i = sscanf(p, "%lf,%lf%c", &xf, &yf, &c); UNSUPPORTED("9wua6uiybfvqd70huuo0yatcf"); // if ((i > 1) && (xf > 0) && (yf > 0)) { UNSUPPORTED("8z2huopqt4m1rvfcd7vqatka4"); // result->x = ((((xf)*72>=0)?(int)((xf)*72 + .5):(int)((xf)*72 - .5))); UNSUPPORTED("cil4j0n3iq35gr2pfewi2qawz"); // result->y = ((((yf)*72>=0)?(int)((yf)*72 + .5):(int)((yf)*72 - .5))); UNSUPPORTED("9qnr8qmbz7pf3mmpebux0p08m"); // if (c == '!') UNSUPPORTED("dqyb6drzg8ig5ecb31fq5c1d4"); // rv = (!(0)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("8wtaqjit9awt7xd08vuifknry"); // c = '\0'; UNSUPPORTED("705372l4htjtcvnq97l7i54g8"); // i = sscanf(p, "%lf%c", &xf, &c); UNSUPPORTED("4n9k1twwfmxyet8tokr7xnktj"); // if ((i > 0) && (xf > 0)) { UNSUPPORTED("8ui53rmpq7ao1p4yin0xqzszj"); // result->y = result->x = ((((xf)*72>=0)?(int)((xf)*72 + .5):(int)((xf)*72 - .5))); UNSUPPORTED("1rflva1x66uhyqxr5zbpcsgnh"); // if (c == '!') rv = (!(0)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } } return rv; } finally { LEAVING("72no6ayfvjinlnupyn5jlmayg","getdoubles2ptf"); } } //3 1xg46gdvtsko1yrtm6mg4tsxy // void getdouble(graph_t * g, char *name, double *result) public static Object getdouble(Object... arg) { UNSUPPORTED("5gfb0pnjet6us7l51d48x25aq"); // void getdouble(graph_t * g, char *name, double *result) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("jnku6gn089m43hq5hndzrxzn"); // double f; UNSUPPORTED("bifb8kht3vkytb74qbof9vpob"); // if ((p = agget(g, name))) { UNSUPPORTED("4r30fz6hpqhfj44lip5cndh1m"); // if (sscanf(p, "%lf", &f) >= 1) UNSUPPORTED("jepdvpsjq4757gzwaplghh4j"); // *result = f; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7c1tanyo6vwej9cqo0rkiv6sv // graph_t *gvNextInputGraph(GVC_t *gvc) public static Object gvNextInputGraph(Object... arg) { UNSUPPORTED("a6jdteesa5ifdtthxxsohrlh2"); // graph_t *gvNextInputGraph(GVC_t *gvc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ccvkc7reh332l10k91bjvksnm"); // graph_t *g = NULL; UNSUPPORTED("5dpauyujvamkm0ay3pfh999y3"); // static char *fn; UNSUPPORTED("46orciiuryyogkvndndbawo06"); // static FILE *fp; UNSUPPORTED("82yfc13etao3sz5hqypnt56oq"); // static FILE *oldfp; UNSUPPORTED("1c51f3lle32l3xcfnkzig5ett"); // static int fidx, gidx; UNSUPPORTED("6i509d0s1nqxjr873r5dz7gv5"); // while (!g) { UNSUPPORTED("56tws2uz7mqhxwswpbpf94b5c"); // if (!fp) { UNSUPPORTED("6d4ms2m7wzcyf2eofwsoz7jzu"); // if (!(fn = gvc->input_filenames[0])) { UNSUPPORTED("eec7y1e55sjjkrx06jmtoyrz1"); // if (fidx++ == 0) UNSUPPORTED("sln8j5e1981v4p6fvxyy4jjq"); // fp = stdin; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("btttznywgnyh5niqc16ebuucw"); // while ((fn = gvc->input_filenames[fidx++]) && !(fp = fopen(fn, "r"))) { UNSUPPORTED("4futxtc5kgl4i6bw6j1xhws4s"); // agerr(AGERR, "%s: can't open %s\n", gvc->common.cmdname, fn); UNSUPPORTED("o7u2b38bnefhf1l58zkel4i3"); // graphviz_errors++; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("74qpksqxqa1hxoxfw5ugamyww"); // if (fp == NULL) UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("2euu5u83dzpauthvjfy4vlcxg"); // if (oldfp != fp) { UNSUPPORTED("cdwz1axrp68a13bwv1la3a736"); // agsetfile(fn ? fn : ""); UNSUPPORTED("36hhlg0nbd0exjvtbe0fc5gj6"); // oldfp = fp; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("b1s6sspge1n2c2b0yukawa8jw"); // g = agread(fp,((Agdisc_t*)0)); UNSUPPORTED("wx1q1tyb5r9oziojtpc4vd1n"); // if (g) { UNSUPPORTED("8r806yndx1ticudcknc3r1sp2"); // gvg_init(gvc, g, fn, gidx++); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7oaqgqiffegej6sz73ow4cwtw"); // if (fp != stdin) UNSUPPORTED("caiflnlhuyqft76qr8gx91bf3"); // fclose (fp); UNSUPPORTED("7y7knbs9950t3udidyrln8lmp"); // fp = NULL; UNSUPPORTED("ecnsdkjxzhqh68kkz6fpbez04"); // gidx = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2syri7q5tc0jyvwq8ecyfo3vr"); // return g; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9t08dr2ks9qz1pyfz99awla6x // static int findCharset (graph_t * g) public static int findCharset(Agraph_s g) { ENTERING("9t08dr2ks9qz1pyfz99awla6x","findCharset"); try { return 0; } finally { LEAVING("9t08dr2ks9qz1pyfz99awla6x","findCharset"); } } //3 3bnmjpvynh1j9oh2p2vi0vh2m // static void setRatio(graph_t * g) public static void setRatio(Agraph_s g) { ENTERING("3bnmjpvynh1j9oh2p2vi0vh2m","setRatio"); try { CString p; char c; double ratio; if ((p = agget(g, new CString("ratio")))!=null && ((c = p.charAt(0))!='\0')) { UNSUPPORTED("7rk995hpmaqbbasmi40mqg0yw"); // switch (c) { UNSUPPORTED("2v5u3irq50r1n2ccuna0y09lk"); // case 'a': UNSUPPORTED("3jv8xrrloj92axkpkgolzwgo6"); // if ((*(p)==*("auto")&&!strcmp(p,"auto"))) UNSUPPORTED("8bdbsrt9sk4hnj3wm6z100qm"); // (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->drawing)->ratio_kind = R_AUTO; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("f3lyz2cejs6yn5fyckhn7ba1"); // case 'c': UNSUPPORTED("1v3jyjziibgnha1glbymorwg1"); // if ((*(p)==*("compress")&&!strcmp(p,"compress"))) UNSUPPORTED("coprfqf41n6byzz3nfneke6a"); // (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->drawing)->ratio_kind = R_COMPRESS; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("2fzjr952o6hmcz3ad5arl2n8d"); // case 'e': UNSUPPORTED("5s06nikh994hgncpwni2p4rwq"); // if ((*(p)==*("expand")&&!strcmp(p,"expand"))) UNSUPPORTED("eanijnkdjj1f6q7su4gmmijpj"); // (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->drawing)->ratio_kind = R_EXPAND; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("8jntw084f69528np3kisw5ioc"); // case 'f': UNSUPPORTED("105p0jwfnsptmrweig5mhpkn9"); // if ((*(p)==*("fill")&&!strcmp(p,"fill"))) UNSUPPORTED("eknfh3axjhorf2rfb914hdgbd"); // (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->drawing)->ratio_kind = R_FILL; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("e4fr8djxwn615yr0rj46vtdbd"); // ratio = atof(p); UNSUPPORTED("43a0ik2dkpg3y58orisgkn32q"); // if (ratio > 0.0) { UNSUPPORTED("azv56xi8njootl2n9l5bm1udc"); // (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->drawing)->ratio_kind = R_VALUE; UNSUPPORTED("ch5o67mezsw0v6iwxylb98myn"); // (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->drawing)->ratio = ratio; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } } } finally { LEAVING("3bnmjpvynh1j9oh2p2vi0vh2m","setRatio"); } } //3 8gzdr3oil2d0e2o7m84wsszfg // void graph_init(graph_t * g, boolean use_rankdir) static CString rankname[] = new CString[] { new CString("local"), new CString("global"), new CString("none"), null }; static int rankcode[] = { 100, 101, 102, 100 }; static CString fontnamenames[] = new CString[] {new CString("gd"),new CString("ps"),new CString("svg"), null}; static int fontnamecodes[] = {enumAsInt(fontname_kind.class, "NATIVEFONTS"),enumAsInt(fontname_kind.class, "PSFONTS"), enumAsInt(fontname_kind.class, "SVGFONTS"),-1}; public static void graph_init(Agraph_s g, boolean use_rankdir) { ENTERING("8gzdr3oil2d0e2o7m84wsszfg","graph_init"); try { CString p; double xf; int rankdir; GD_drawing(g, zmalloc(sizeof(layout_t.class))); /* set this up fairly early in case any string sizes are needed */ if ((p = agget(g, new CString("fontpath")))!=null || (p = getenv(new CString("DOTFONTPATH")))!=null) { UNSUPPORTED("81bz3jcukzyotxiqgrlhn9cbq"); // /* overide GDFONTPATH in local environment if dot UNSUPPORTED("6jgl7atk1m9yeam4auh127azw"); // * wants its own */ UNSUPPORTED("dyk0vc64gdzy1uwvsc2jqnjdw"); // static char *buf = 0; UNSUPPORTED("8dywgree8jdjmj2ll2whbekhe"); // buf = grealloc(buf, strlen("GDFONTPATH=") + strlen(p) + 1); UNSUPPORTED("d9ej6bo2s49vpstu3pql6tkrx"); // strcpy(buf, "GDFONTPATH="); UNSUPPORTED("1s2jcd2h3eok7j6pclv20gyi2"); // strcat(buf, p); UNSUPPORTED("abkxekvux4nramryfw2e8vcru"); // putenv(buf); } GD_charset(g, findCharset (g)); /*if (!HTTPServerEnVar) { Gvimagepath = agget (g, "imagepath"); if (!Gvimagepath) Gvimagepath = Gvfilepath; }*/ GD_drawing(g).setDouble("quantum", late_double(g, (agattr(g,AGRAPH,new CString("quantum"),null)), 0.0, 0.0)); /* setting rankdir=LR is only defined in dot, * but having it set causes shape code and others to use it. * The result is confused output, so we turn it off unless requested. * This effective rankdir is stored in the bottom 2 bits of g->u.rankdir. * Sometimes, the code really needs the graph's rankdir, e.g., neato -n * with record shapes, so we store the real rankdir in the next 2 bits. */ rankdir = 0; if ((p = agget(g, new CString("rankdir")))!=null) { UNSUPPORTED("sp7zcza7w0dn7t66aj8rf4wn"); // if ((*(p)==*("LR")&&!strcmp(p,"LR"))) UNSUPPORTED("bjd2vk1jssqehllmgnqv601qd"); // rankdir = 1; UNSUPPORTED("ry8itlrmblmuegdwk1iu1t0x"); // else if ((*(p)==*("BT")&&!strcmp(p,"BT"))) UNSUPPORTED("5hno0xn18yt443qg815w3c2s2"); // rankdir = 2; UNSUPPORTED("aal39mi047mhafrsrxoutcffk"); // else if ((*(p)==*("RL")&&!strcmp(p,"RL"))) UNSUPPORTED("7vlda224wrgcdhr0ts3mndh5q"); // rankdir = 3; } if (use_rankdir) GD_rankdir2(g, (rankdir << 2) | rankdir); else GD_rankdir2(g, (rankdir << 2)); xf = late_double(g, (agattr(g,AGRAPH,new CString("nodesep"),null)), 0.25, 0.02); GD_nodesep(g, (ROUND((xf)*72))); p = late_string(g, (agattr(g,AGRAPH,new CString("ranksep"),null)), null); if (p!=null) { UNSUPPORTED("c3p25g4289dxlei062z4eflss"); // if (sscanf(p, "%lf", &xf) == 0) UNSUPPORTED("570vljex12zx5dkwi7mqa9knw"); // xf = 0.5; UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("p882lodfwy5v48rwbxvg5s9i"); // if (xf < 0.02) UNSUPPORTED("dhhbmqv6n01j1eeyy7fpus1xw"); // xf = 0.02; if (strstr(p, new CString("equally"))!=null) GD_exact_ranksep(g, 1); } else xf = 0.5; GD_ranksep(g, (ROUND((xf)*72))); GD_showboxes(g, late_int(g, (agattr(g,AGRAPH,new CString("showboxes"),null)), 0, 0)); p = late_string(g, (agattr(g,AGRAPH,new CString("fontnames"),null)), null); GD_fontnames(g, maptoken(p, fontnamenames, fontnamecodes)); setRatio(g); GD_drawing(g).setBoolean("filled", getdoubles2ptf(g, new CString("size"), (pointf) GD_drawing(g).getStruct("size").amp())); getdoubles2ptf(g, new CString("page"), GD_drawing(g).getStruct("page").amp()); GD_drawing(g).setBoolean("centered", mapbool(agget(g, new CString("center")))); if ((p = agget(g, new CString("rotate")))!=null) GD_drawing(g).setBoolean("landscape", (atoi(p) == 90)); else if ((p = agget(g, new CString("orientation")))!=null) GD_drawing(g).setBoolean("landscape", ((p.charAt(0) == 'l') || (p.charAt(0) == 'L'))); else if ((p = agget(g, new CString("landscape")))!=null) GD_drawing(g).setBoolean("landscape", mapbool(p)); p = agget(g, new CString("clusterrank")); Z.z().CL_type = maptoken(p, rankname, rankcode); p = agget(g, new CString("concentrate")); Z.z().Concentrate = mapbool(p); Z.z().State = 0; Z.z().EdgeLabelsDone = 0; GD_drawing(g).setDouble("dpi", 0.0); if (((p = agget(g, new CString("dpi")))!=null && p.charAt(0)!='\0') || ((p = agget(g, new CString("resolution")))!=null && p.charAt(0)!='\0')) GD_drawing(g).setDouble("dpi", atof(p)); do_graph_label(g); Z.z().Initial_dist = (1.0e+37); Z.z().G_ordering = (agattr(g,AGRAPH,new CString("ordering"),null)); Z.z().G_gradientangle = (agattr(g,AGRAPH,new CString("gradientangle"),null)); Z.z().G_margin = (agattr(g,AGRAPH,new CString("margin"),null)); /* initialize nodes */ Z.z().N_height = (agattr(g,AGNODE,new CString("height"),null)); Z.z().N_width = (agattr(g,AGNODE,new CString("width"),null)); Z.z().N_shape = (agattr(g,AGNODE,new CString("shape"),null)); Z.z().N_color = (agattr(g,AGNODE,new CString("color"),null)); Z.z().N_fillcolor = (agattr(g,AGNODE,new CString("fillcolor"),null)); Z.z().N_style = (agattr(g,AGNODE,new CString("style"),null)); Z.z().N_fontsize = (agattr(g,AGNODE,new CString("fontsize"),null)); Z.z().N_fontname = (agattr(g,AGNODE,new CString("fontname"),null)); Z.z().N_fontcolor = (agattr(g,AGNODE,new CString("fontcolor"),null)); Z.z().N_label = (agattr(g,AGNODE,new CString("label"),null)); if (N(Z.z().N_label)) Z.z().N_label = agattr(g, AGNODE, new CString("label"), new CString("\\N")); Z.z().N_xlabel = (agattr(g,AGNODE,new CString("xlabel"),null)); Z.z().N_showboxes = (agattr(g,AGNODE,new CString("showboxes"),null)); Z.z().N_penwidth = (agattr(g,AGNODE,new CString("penwidth"),null)); Z.z().N_ordering = (agattr(g,AGNODE,new CString("ordering"),null)); Z.z().N_margin = (agattr(g,AGNODE,new CString("margin"),null)); /* attribs for polygon shapes */ Z.z().N_sides = (agattr(g,AGNODE,new CString("sides"),null)); Z.z().N_peripheries = (agattr(g,AGNODE,new CString("peripheries"),null)); Z.z().N_skew = (agattr(g,AGNODE,new CString("skew"),null)); Z.z().N_orientation = (agattr(g,AGNODE,new CString("orientation"),null)); Z.z().N_distortion = (agattr(g,AGNODE,new CString("distortion"),null)); Z.z().N_fixed = (agattr(g,AGNODE,new CString("fixedsize"),null)); Z.z().N_imagescale = (agattr(g,AGNODE,new CString("imagescale"),null)); Z.z().N_nojustify = (agattr(g,AGNODE,new CString("nojustify"),null)); Z.z().N_layer = (agattr(g,AGNODE,new CString("layer"),null)); Z.z().N_group = (agattr(g,AGNODE,new CString("group"),null)); Z.z().N_comment = (agattr(g,AGNODE,new CString("comment"),null)); Z.z().N_vertices = (agattr(g,AGNODE,new CString("vertices"),null)); Z.z().N_z = (agattr(g,AGNODE,new CString("z"),null)); Z.z().N_gradientangle = (agattr(g,AGNODE,new CString("gradientangle"),null)); /* initialize edges */ Z.z().E_weight = (agattr(g,AGEDGE,new CString("weight"),null)); Z.z().E_color = (agattr(g,AGEDGE,new CString("color"),null)); Z.z().E_fillcolor = (agattr(g,AGEDGE,new CString("fillcolor"),null)); Z.z().E_fontsize = (agattr(g,AGEDGE,new CString("fontsize"),null)); Z.z().E_fontname = (agattr(g,AGEDGE,new CString("fontname"),null)); Z.z().E_fontcolor = (agattr(g,AGEDGE,new CString("fontcolor"),null)); Z.z().E_label = (agattr(g,AGEDGE,new CString("label"),null)); Z.z().E_xlabel = (agattr(g,AGEDGE,new CString("xlabel"),null)); Z.z().E_label_float = (agattr(g,AGEDGE,new CString("labelfloat"),null)); /* vladimir */ Z.z().E_dir = (agattr(g,AGEDGE,new CString("dir"),null)); Z.z().E_arrowhead = (agattr(g,AGEDGE,new CString("arrowhead"),null)); Z.z().E_arrowtail = (agattr(g,AGEDGE,new CString("arrowtail"),null)); Z.z().E_headlabel = (agattr(g,AGEDGE,new CString("headlabel"),null)); Z.z().E_taillabel = (agattr(g,AGEDGE,new CString("taillabel"),null)); Z.z().E_labelfontsize = (agattr(g,AGEDGE,new CString("labelfontsize"),null)); Z.z().E_labelfontname = (agattr(g,AGEDGE,new CString("labelfontname"),null)); Z.z().E_labelfontcolor = (agattr(g,AGEDGE,new CString("labelfontcolor"),null)); Z.z().E_labeldistance = (agattr(g,AGEDGE,new CString("labeldistance"),null)); Z.z().E_labelangle = (agattr(g,AGEDGE,new CString("labelangle"),null)); /* end vladimir */ Z.z().E_minlen = (agattr(g,AGEDGE,new CString("minlen"),null)); Z.z().E_showboxes = (agattr(g,AGEDGE,new CString("showboxes"),null)); Z.z().E_style = (agattr(g,AGEDGE,new CString("style"),null)); Z.z().E_decorate = (agattr(g,AGEDGE,new CString("decorate"),null)); Z.z().E_arrowsz = (agattr(g,AGEDGE,new CString("arrowsize"),null)); Z.z().E_constr = (agattr(g,AGEDGE,new CString("constraint"),null)); Z.z().E_layer = (agattr(g,AGEDGE,new CString("layer"),null)); Z.z().E_comment = (agattr(g,AGEDGE,new CString("comment"),null)); Z.z().E_tailclip = (agattr(g,AGEDGE,new CString("tailclip"),null)); Z.z().E_headclip = (agattr(g,AGEDGE,new CString("headclip"),null)); Z.z().E_penwidth = (agattr(g,AGEDGE,new CString("penwidth"),null)); /* background */ GD_drawing(g).setPtr("xdots", init_xdot (g)); /* initialize id, if any */ if ((p = agget(g, new CString("id")))!=null && p.charAt(0)!='\0') GD_drawing(g).setPtr("id", strdup_and_subst_obj(p, g)); } finally { LEAVING("8gzdr3oil2d0e2o7m84wsszfg","graph_init"); } } //3 46ypwxxdurpwoq7ee0nagnyuw // void graph_cleanup(graph_t *g) public static Object graph_cleanup(Object... arg) { UNSUPPORTED("30nwbe5cpmxhh80h8xa9akr9z"); // void graph_cleanup(graph_t *g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dnom8brm7mdyz49mlyew1yfx4"); // if (GD_drawing(g) && GD_drawing(g)->xdots) UNSUPPORTED("cbn0kehrijve4p68esddyi4cm"); // freeXDot ((xdot*)GD_drawing(g)->xdots); UNSUPPORTED("4wfyhel6dchugc6m03gzcaqqx"); // if (GD_drawing(g) && GD_drawing(g)->id) UNSUPPORTED("3uhbrv39ml1lee2b5i24tnmp2"); // free (GD_drawing(g)->id); UNSUPPORTED("vcg73wzydblsuguqzall9cv4"); // free(GD_drawing(g)); UNSUPPORTED("1ia1a125sivdblphtrgblo6nr"); // GD_drawing(g) = NULL; UNSUPPORTED("amdwcc4txs1rjdj436t6qt2k4"); // free_label(GD_label(g)); UNSUPPORTED("8jf0pz51pmyvkml9d1jqhncju"); // //FIX HERE , STILL SHALLOW UNSUPPORTED("32tijapsyiumwfmjqrf8j6d41"); // //memset(&(g->u), 0, sizeof(Agraphinfo_t)); UNSUPPORTED("7e4eo7ldxaf48s2v3paft8j2c"); // agclean(g, AGRAPH,"Agraphinfo_t"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7rzv30lub416sffko0du3o6sx // char* charsetToStr (int c) public static Object charsetToStr(Object... arg) { UNSUPPORTED("cqm25rponse4rsi686sbn1lo0"); // char* UNSUPPORTED("b1ttom615vlztws5drinv8k4i"); // charsetToStr (int c) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cypok90bpbt6z74ak3nu63g1m"); // char* s; UNSUPPORTED("239qe3atroys6jen2eufic7ex"); // switch (c) { UNSUPPORTED("1nhgtydm95uz0oftevo3oly8e"); // case 0 : UNSUPPORTED("2nidjssyf3n7w7cygka1k20t7"); // s = "UTF-8"; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6152devym3begeqtwle6okwtn"); // case 1 : UNSUPPORTED("ct1k13idag6941hvbi9y2bzt3"); // s = "ISO-8859-1"; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("brmutjgcyjq57ggmjk11na8lu"); // case 2 : UNSUPPORTED("5irze7y061rfoysvsbc01net8"); // s = "BIG-5"; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("cjimoqzt0qz3wos8m9h7g3hmh"); // default : UNSUPPORTED("816pcwbgdg9rau7jfcj6xpoel"); // agerr(AGERR, "Unsupported charset value %d\n", c); UNSUPPORTED("2nidjssyf3n7w7cygka1k20t7"); // s = "UTF-8"; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("67k63k77j3kjabivb0i8hxrwd"); // } UNSUPPORTED("dyq366cow9q7c8bh5jns3dlqo"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5vks1zdadu5vjinaivs0j2bkb // void do_graph_label(graph_t * sg) public static void do_graph_label(Agraph_s sg) { ENTERING("5vks1zdadu5vjinaivs0j2bkb","do_graph_label"); try { CString str, pos, just; int pos_ix; /* it would be nice to allow multiple graph labels in the future */ if ((str = agget(sg, new CString("label")))!=null && (str.charAt(0) != '\0')) { char pos_flag=0; final __struct__ dimen = JUtils.from(pointf.class); GD_has_labels(sg.getPtr("root"), GD_has_labels(sg.getPtr("root")) | (1 << 3)); GD_label(sg, make_label(sg, str, (aghtmlstr(str)!=0 ? (1 << 1) : (0 << 1)), late_double(sg, (agattr(sg,AGRAPH,new CString("fontsize"),null)), 14.0, 1.0), late_nnstring(sg, (agattr(sg,AGRAPH,new CString("fontname"),null)), new CString("Times-Roman")), late_nnstring(sg, (agattr(sg,AGRAPH,new CString("fontcolor"),null)), new CString("black")))); /* set label position */ pos = agget(sg, new CString("labelloc")); if (NEQ(sg, agroot(sg))) { if (pos!=null && (pos.charAt(0) == 'b')) pos_flag = 0; else pos_flag = 1; } else { UNSUPPORTED("601b6yrqr391vnfpa74d7fec7"); // if (pos && (pos[0] == 't')) UNSUPPORTED("bxai2kktsidvda3696ctyk63c"); // pos_flag = 1; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("6m5sy5ew8izdy8i10zb5o2dvu"); // pos_flag = 0; } just = agget(sg, new CString("labeljust")); if (just!=null) { UNSUPPORTED("3gxohpfqzahytaf7f9apn58az"); // if (just[0] == 'l') UNSUPPORTED("ch7sydr4cg29o8ky9fbk5vnlg"); // pos_flag |= 2; UNSUPPORTED("336to8kpmovx00pexhhenz74b"); // else if (just[0] == 'r') UNSUPPORTED("evu9w6pw3kkh7z8w7t4rx4qxc"); // pos_flag |= 4; } GD_label_pos(sg, pos_flag); if (EQ(sg, agroot(sg))) return; /* Set border information for cluster labels to allow space */ dimen.___(GD_label(sg).getStruct("dimen")); dimen.setDouble("x", dimen.getDouble("x") + 4*4); dimen.setDouble("y", dimen.getDouble("y") + 2*4); if (N(GD_flip(agroot(sg)))) { if ((GD_label_pos(sg) & 1)!=0) pos_ix = 2; else pos_ix = 0; GD_border(sg).plus(pos_ix).setStruct(dimen); } else { /* when rotated, the labels will be restored to TOP or BOTTOM */ UNSUPPORTED("cabz6xbjdvz5vmjulzrhlxh48"); // if ((((Agraphinfo_t*)(((Agobj_t*)(sg))->data))->label_pos) & 1) UNSUPPORTED("dx7v6663o9o0x1j5r8z4wumxb"); // pos_ix = 1; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("97dtv6k7yw1qvfzgs65cj2v0l"); // pos_ix = 3; UNSUPPORTED("21iuie8b11x65je8vampstgt6"); // (((Agraphinfo_t*)(((Agobj_t*)(sg))->data))->border)[pos_ix].x = dimen.y; UNSUPPORTED("8cawl3kik853hkvgm39y34urs"); // (((Agraphinfo_t*)(((Agobj_t*)(sg))->data))->border)[pos_ix].y = dimen.x; } } } finally { LEAVING("5vks1zdadu5vjinaivs0j2bkb","do_graph_label"); } } } plantuml-1.2017.15/src/gen/lib/common/intset__c.java000066400000000000000000000143661312650303100221000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.Macro.UNSUPPORTED; public class intset__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //3 8qgr88nich230f7xchwdzz29a // static void* mkIntItem(Dt_t* d,intitem* obj,Dtdisc_t* disc) public static Object mkIntItem(Object... arg) { UNSUPPORTED("8fbx43f8g4rod2yqfdymsxdnx"); // static void* UNSUPPORTED("a10lzkc4r102m2qlk5imsvovv"); // mkIntItem(Dt_t* d,intitem* obj,Dtdisc_t* disc) UNSUPPORTED("yo7buicdiu29rv5vxhas0v3s"); // { UNSUPPORTED("ekjuvztgs19rbqj0v3lmfo01q"); // intitem* np = (intitem*)zmalloc(sizeof(intitem)); UNSUPPORTED("506xq20ierdh2vdh0oxwa7m8v"); // np->id = obj->id; UNSUPPORTED("184diuw6jvuoeak7fkbqm6fr6"); // return (void*)np; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bh6e5ln10dj2wbs1o7bpt00i8 // static void freeIntItem(Dt_t* d,intitem* obj,Dtdisc_t* disc) public static Object freeIntItem(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("criv4pqv4650sbunujgt3rbya"); // freeIntItem(Dt_t* d,intitem* obj,Dtdisc_t* disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4neq75mnpa0cym29pxiizrkz3"); // free (obj); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 47m5dtm8t3vpv956ejy5w6th9 // static int cmpid(Dt_t* d, int* key1, int* key2, Dtdisc_t* disc) public static Object cmpid(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("1si01iycmvt6w5p4npvowvekx"); // cmpid(Dt_t* d, int* key1, int* key2, Dtdisc_t* disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1cu94gjng90rrt7xtp42ifr1"); // if (*key1 > *key2) return 1; UNSUPPORTED("3h1tdtwyfqaqhne2o7pz8yq9h"); // else if (*key1 < *key2) return -1; UNSUPPORTED("7lrkjjj5lce2uf86c1y9o9yoa"); // else return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 8lrju563ta1xqsy4xixotjo3l // static Dtdisc_t intSetDisc = //3 2xsz5eza9h7l039872rv37hsv // Dt_t* openIntSet (void) public static Object openIntSet(Object... arg) { UNSUPPORTED("96gezykql110n8xkno0gtdrmq"); // Dt_t* UNSUPPORTED("68yvszwdppo58pmasvi3gqm0a"); // openIntSet (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bjd7jaxyhis3c4zl58948rs5w"); // return dtopen(&intSetDisc,Dtoset); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 djjwoeky7tlyxdg2zx3x4pdib // void addIntSet (Dt_t* is, int v) public static Object addIntSet(Object... arg) { UNSUPPORTED("347dderd02mvlozoheqo4ejwo"); // void UNSUPPORTED("uq3ewaypmpqc0nyc6mp0osz6"); // addIntSet (Dt_t* is, int v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2rjvy9cij6zo2nowb4w37hnjt"); // intitem obj; UNSUPPORTED("5ne3fj3dr6iouu1y3bnx3lcd7"); // obj.id = v; UNSUPPORTED("2ugf3ujkfn9ofv5ykvcsvr6m5"); // (*(((Dt_t*)(is))->searchf))((is),(void*)(&obj),0000001); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7w5km9pct0qd0skzhgxezhr2x // int inIntSet (Dt_t* is, int v) public static Object inIntSet(Object... arg) { UNSUPPORTED("7zkpme13g8rxxwloxvpvvnbcw"); // int UNSUPPORTED("cg6pm0yggmopx83usksgtt395"); // inIntSet (Dt_t* is, int v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eckrym421t3ug9lj77hzalv1a"); // return ((*(((Dt_t*)(is))->searchf))((is),(void*)(&v),0001000) != 0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/labels__c.java000066400000000000000000001431731312650303100220330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.graph__c.agisdirected; import static gen.lib.cgraph.id__c.agnameof; import static gen.lib.cgraph.obj__c.agobjkind; import static gen.lib.cgraph.obj__c.agraphof; import static gen.lib.cgraph.obj__c.agroot; import static gen.lib.common.htmltable__c.make_html_label; import static gen.lib.common.memory__c.gmalloc; import static gen.lib.common.utils__c.htmlEntityUTF8; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.strlen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGEDGE; import static smetana.core.Macro.AGNODE; import static smetana.core.Macro.AGRAPH; import static smetana.core.Macro.ED_head_port; import static smetana.core.Macro.ED_label; import static smetana.core.Macro.ED_tail_port; import static smetana.core.Macro.GD_label; import static smetana.core.Macro.MAX; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import static smetana.core.Macro.ZALLOC; import static smetana.core.Macro.agtail; import static smetana.core.Macro.hackInitDimensionFromLabel; import h.Agedge_s; import h.Agnode_s; import h.Agnodeinfo_t; import h.Agobj_s; import h.Agraph_s; import h.Agraphinfo_t; import h.GVC_s; import h.ST_pointf; import h.ST_port; import h.boxf; import h.pointf; import h.textlabel_t; import h.textspan_t; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Memory; import smetana.core.Z; import smetana.core.__ptr__; import smetana.core.__struct__; public class labels__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wkeqik2dt7ecr64ej6ltbnvb // static void storeline(GVC_t *gvc, textlabel_t *lp, char *line, char terminator) //private static __struct__ tf = JUtils.from(textfont_t.class); public static void storeline(GVC_s gvc, textlabel_t lp, CString line, char terminator) { ENTERING("4wkeqik2dt7ecr64ej6ltbnvb","storeline"); try { final __struct__ size = JUtils.from(pointf.class); __ptr__ span = null; int oldsz = lp.getInt("u.txt.nspans") + 1; lp.setPtr("u.txt.span", ZALLOC(oldsz + 1, lp.getPtr("u.txt.span"), textspan_t.class, oldsz)); span = lp.getPtr("u.txt.span").plus(lp.getInt("u.txt.nspans")); span.setPtr("str", line); span.setInt("just", terminator); if (line!=null && line.charAt(0)!='\0') { Z.z().tf.setPtr("name", lp.getPtr("fontname")); Z.z().tf.setDouble("size", lp.getDouble("fontsize")); // WE CHEAT ((ST_pointf) size).x = 0.0; ((ST_pointf) size).y = (int)(lp.getDouble("fontsize") * 1.20); hackInitDimensionFromLabel(size, line.getContent()); ((ST_pointf) span.getStruct("size")).y = (int)size.getDouble("y"); } else { System.err.println("YOU SHOULD NOT SEE THAT"); ((ST_pointf) size).x = 0.0; ((ST_pointf) size).y = (int)(lp.getDouble("fontsize") * 1.20); span.getStruct("size").setDouble("y", (int)(lp.getDouble("fontsize") * 1.20)); } lp.setInt("u.txt.nspans", lp.getInt("u.txt.nspans") + 1); /* width = max line width */ ((ST_pointf) lp.getStruct("dimen")).x = MAX(lp.getStruct("dimen").getDouble("x"), size.getDouble("x")); /* accumulate height */ ((ST_pointf) lp.getStruct("dimen")).y = lp.getStruct("dimen").getDouble("y") + size.getDouble("y"); } finally { LEAVING("4wkeqik2dt7ecr64ej6ltbnvb","storeline"); } } //3 22ar72ye93a8ntj8pagnt5b5k // void make_simple_label(GVC_t * gvc, textlabel_t * lp) public static void make_simple_label(GVC_s gvc, textlabel_t lp) { ENTERING("22ar72ye93a8ntj8pagnt5b5k","make_simple_label"); try { char c; CString p, line, lineptr, str = lp.getCString("text"); char bytee = 0x00; ((ST_pointf) lp.getStruct("dimen")).x = 0.0; ((ST_pointf) lp.getStruct("dimen")).y = 0.0; if (str.charAt(0) == '\0') return; line = lineptr = null; p = str; line = lineptr = gmalloc((strlen(p) + 1)); line.setCharAt(0, '\0'); while ((c = p.charAt(0))!='\0') { p = p.plus(1); bytee = c; /* wingraphviz allows a combination of ascii and big-5. The latter * is a two-byte encoding, with the first byte in 0xA1-0xFE, and * the second in 0x40-0x7e or 0xa1-0xfe. We assume that the input * is well-formed, but check that we don't go past the ending '\0'. */ if ((lp.getInt("charset") == 2) && 0xA1 <= bytee && bytee <= 0xFE) { UNSUPPORTED("6la63t1mnqv30shyyp3yfroxb"); // *lineptr++ = c; UNSUPPORTED("ebmmarxykvf76hmfmjuk0ssjz"); // c = *p++; UNSUPPORTED("6la63t1mnqv30shyyp3yfroxb"); // *lineptr++ = c; UNSUPPORTED("1kri3b36twfj4t7bvjbrt6dhs"); // if (!c) /* NB. Protect against unexpected string end here */ UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; } else { if (c == '\\') { switch (p.charAt(0)) { case 'n': case 'l': case 'r': lineptr.setCharAt(0, '\0'); lineptr = lineptr.plus(1); storeline(gvc, lp, line, p.charAt(0)); line = lineptr; break; default: lineptr.setCharAt(0, p.charAt(0)); lineptr = lineptr.plus(1); } if (p.charAt(0)!='\0') p = p.plus(1); /* tcldot can enter real linend characters */ } else if (c == '\n') { lineptr.setCharAt(0, '\0'); lineptr = lineptr.plus(1); storeline(gvc, lp, line, 'n'); line = lineptr; } else { lineptr.setCharAt(0, c); lineptr = lineptr.plus(1); } } } if (NEQ(line, lineptr)) { lineptr.setCharAt(0, '\0'); lineptr = lineptr.plus(1); storeline(gvc, lp, line, 'n'); } lp.setStruct("space", lp.getStruct("dimen")); } finally { LEAVING("22ar72ye93a8ntj8pagnt5b5k","make_simple_label"); } } //3 ecq5lydlrjrlaz8o6vm6svc8i // textlabel_t *make_label(void *obj, char *str, int kind, double fontsize, char *fontname, char *fontcolor) public static textlabel_t make_label(__ptr__ obj, CString str, int kind, double fontsize, CString fontname, CString fontcolor) { ENTERING("ecq5lydlrjrlaz8o6vm6svc8i","make_label"); try { textlabel_t rv = (textlabel_t) Memory.malloc(textlabel_t.class); Agraph_s g = null, sg = null; Agnode_s n = null; Agedge_s e = null; CString s = null; switch (agobjkind(obj)) { case AGRAPH: sg = (Agraph_s)obj; g = (Agraph_s) sg.getPtr("root"); break; case AGNODE: n = (Agnode_s)obj.castTo(Agnode_s.class); g = agroot(agraphof(n)); break; case AGEDGE: e = (Agedge_s)obj.castTo(Agedge_s.class); g = agroot(agraphof(aghead(e))); break; } rv.setPtr("fontname", fontname); rv.setPtr("fontcolor", fontcolor); rv.setDouble("fontsize", fontsize); rv.setInt("charset", g.castTo(Agobj_s.class).getPtr("data").castTo(Agraphinfo_t.class).getInt("charset")); if ((kind & (2 << 1))!=0) { rv.setPtr("text", str.strdup()); if ((kind & (1 << 1))!=0) { rv.setBoolean("html", (N(0))); } } else if (kind == (1 << 1)) { rv.setPtr("text", str.strdup()); rv.setBoolean("html", N(0)); if (make_html_label(obj, rv)!=0) { switch (agobjkind(obj)) { case AGRAPH: UNSUPPORTED("agerr(AGPREV, in label of graph %s\n,agnameof(sg));"); break; case AGNODE: UNSUPPORTED("agerr(AGPREV, in label of node %s\n, agnameof(n));"); break; case AGEDGE: UNSUPPORTED("agerr(AGPREV, in label of edge %s %s %s\n,"); // agnameof(((((((Agobj_t*)(e))->tag).objtype) == 3? (e): ((e)+1))->node)), agisdirected(g)?"->":"--", agnameof(((((((Agobj_t*)(e))->tag).objtype) == 2? (e): ((e)-1))->node))); break; } } } else { //assert(kind == (0 << 1)); /* This call just processes the graph object based escape sequences. The formatting escape * sequences (\n, \l, \r) are processed in make_simple_label. That call also replaces \\ with \. */ rv.setPtr("text", strdup_and_subst_obj0(str, obj, 0)); switch (rv.getInt("charset")) { case 1: UNSUPPORTED("s = latin1ToUTF8(rv->text);"); break; default: /* UTF8 */ s = htmlEntityUTF8(rv.getCString("text"), g); break; } Memory.free(rv.getPtr("text")); rv.setPtr("text", s); make_simple_label((GVC_s) g.castTo(Agobj_s.class).getPtr("data").castTo(Agraphinfo_t.class).getPtr("gvc"), rv); } return rv; } finally { LEAVING("ecq5lydlrjrlaz8o6vm6svc8i","make_label"); } } //3 1qv9kl0wi0snf1xtrb6vo2yiu // void free_textspan(textspan_t * tl, int cnt) public static Object free_textspan(Object... arg) { UNSUPPORTED("eh9j8hhtolluyaegv937nnpys"); // void free_textspan(textspan_t * tl, int cnt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("4iuvdwfqjfqyk7dpy1s8mgw2o"); // textspan_t* tlp = tl; UNSUPPORTED("1f70128zxfm2jtz3ebwavc3nc"); // if (!tl) return; UNSUPPORTED("3r70mdmcurt4csiwolv9n6mmh"); // for (i = 0; i < cnt; i++) { UNSUPPORTED("anxpl4mk65alvdjja9pn97kro"); // if ((i == 0) && tlp->str) UNSUPPORTED("1fhpzk3z0aliuuzuovdmsmp7d"); // free(tlp->str); UNSUPPORTED("b0d4wly929yfs331ilovdcqjo"); // if (tlp->layout && tlp->free_layout) UNSUPPORTED("40xyvfopujwdcztwx5vs27p5d"); // tlp->free_layout (tlp->layout); UNSUPPORTED("72ldhje939sa8dg5ttywkmwa6"); // tlp++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4pi9nz7hlvy0eo98r6tzd0oy"); // free(tl); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2palqnlr5u0ssnag1bp5tq510 // void free_label(textlabel_t * p) public static Object free_label(Object... arg) { UNSUPPORTED("7fgqv20ow9mktpealn2ueqf9i"); // void free_label(textlabel_t * p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3cvmixd2u1g2d9l03kuxyyxxw"); // if (p) { UNSUPPORTED("26ktwrszmdk4inac0pxe7mudg"); // free(p->text); UNSUPPORTED("6sxnt2ovvq1ihlz4odqepnnln"); // if (p->html) { UNSUPPORTED("8p452npbufapts0rm8ff82xfu"); // if (p->u.html) free_html_label(p->u.html, 1); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("ghxtimeg851hu16krg2dnb14"); // free_textspan(p->u.txt.span, p->u.txt.nspans); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cy5x5dma0v4hiepir7lrfuo17"); // free(p); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a0gse5mgpw0xhsmu4lwellfdq // void emit_label(GVJ_t * job, emit_state_t emit_state, textlabel_t * lp) public static Object emit_label(Object... arg) { UNSUPPORTED("2bspalmq4q86q66b0sehcnui"); // void emit_label(GVJ_t * job, emit_state_t emit_state, textlabel_t * lp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("ecr1y7qy0ikxkidkdfvwv88ir"); // emit_state_t old_emit_state; UNSUPPORTED("c3lqudp40feg72zp97ngqkww9"); // old_emit_state = obj->emit_state; UNSUPPORTED("3ook7gsw0rr7b6uwm9f5a5dtx"); // obj->emit_state = emit_state; UNSUPPORTED("17ejiipjo2ljqtqe4rkpx6b15"); // if (lp->html) { UNSUPPORTED("8jyhluz8a51w5y5qalhlrpgnp"); // emit_html_label(job, lp->u.html, lp); UNSUPPORTED("2rghcn1n5g9f29wxd8nqhub0p"); // obj->emit_state = old_emit_state; UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("71u0rnrd0pn6urf5ttv39ec5d"); // /* make sure that there is something to do */ UNSUPPORTED("c4lzcn6qndbrx4u9kybwfk11l"); // if (lp->u.txt.nspans < 1) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("2qj4sjf5amdyhvqsi47mei07v"); // gvrender_begin_label(job, LABEL_PLAIN); UNSUPPORTED("bl5mm7hn2il0n2e623rbq8q5w"); // gvrender_set_pencolor(job, lp->fontcolor); UNSUPPORTED("8a1fbspdbpecd6k8uj7bse1cx"); // /* position for first span */ UNSUPPORTED("f433l06cgmbaiibsv9a9tjun8"); // switch (lp->valign) { UNSUPPORTED("c66d69vmpko3goomc3npvjhy3"); // case 't': UNSUPPORTED("63ukdafw48pf9seqbe8vedft9"); // p.y = lp->pos.y + lp->space.y / 2.0 - lp->fontsize; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5coaag9ev3fzc0jtpkjkfvhd2"); // case 'b': UNSUPPORTED("eodoiejpigubj8in93lnnc05d"); // p.y = lp->pos.y - lp->space.y / 2.0 + lp->dimen.y - lp->fontsize; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("f3lyz2cejs6yn5fyckhn7ba1"); // case 'c': UNSUPPORTED("8jmef3sfg06sme4q6t23ms8i7"); // default: UNSUPPORTED("bicy4u16zheftiukscavoqq3c"); // p.y = lp->pos.y + lp->dimen.y / 2.0 - lp->fontsize; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8mg9hiit60q1ve98yormydem5"); // for (i = 0; i < lp->u.txt.nspans; i++) { UNSUPPORTED("aq0sxux77sg7whxt7hslkske3"); // switch (lp->u.txt.span[i].just) { UNSUPPORTED("bwy7mh2nb7lz950r20rfilwa4"); // case 'l': UNSUPPORTED("ds60aoxxlta1y3r5wuo09mzzp"); // p.x = lp->pos.x - lp->space.x / 2.0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("43ds1cyu29ex66kcjszrcu3mp"); // case 'r': UNSUPPORTED("1103h1zfvqia1xelrw919hw2p"); // p.x = lp->pos.x + lp->space.x / 2.0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("f187wptsr73liavtlyoyfovp3"); // case 'n': UNSUPPORTED("7tkhws043t1k3ra1n1191ld2m"); // p.x = lp->pos.x; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("a00q6gh3dlg3gdt95e6rt129n"); // gvrender_textspan(job, p, &(lp->u.txt.span[i])); UNSUPPORTED("dczp8jeltzgwb21pyxgxyrasy"); // /* UL position for next span */ UNSUPPORTED("33byiwlc3a1j2oeyyqf04jpoo"); // p.y -= lp->u.txt.span[i].size.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8bm7lzosnhuf0od7i4hkgzovo"); // gvrender_end_label(job); UNSUPPORTED("b1bkq4eyrmepbxyb3qiuhi8b8"); // obj->emit_state = old_emit_state; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ajohywvjbrvkc7zca2uew6ghm // static char *strdup_and_subst_obj0 (char *str, void *obj, int escBackslash) public static CString strdup_and_subst_obj0(CString str, __ptr__ obj, int escBackslash) { ENTERING("ajohywvjbrvkc7zca2uew6ghm","strdup_and_subst_obj0"); try { char c; CString s, p, t, newstr; CString tp_str = new CString(""), hp_str = new CString(""); CString g_str = new CString("\\G"), n_str = new CString("\\N"), e_str = new CString("\\E"), h_str = new CString("\\H"), t_str = new CString("\\T"), l_str = new CString("\\L"); int g_len = 2, n_len = 2, e_len = 2, h_len = 2, t_len = 2, l_len = 2, tp_len = 0, hp_len = 0; int newlen = 0; int isEdge = 0; textlabel_t tl; final ST_port pt = new ST_port(); /* prepare substitution strings */ switch (agobjkind(obj)) { case AGRAPH: g_str = agnameof((Agraph_s)obj); g_len = strlen(g_str); tl = GD_label((Agraph_s)obj); if (tl!=null) { l_str = tl.getCString("text"); if (str!=null) l_len = strlen(l_str); } break; case AGNODE: g_str = agnameof(agraphof(obj.castTo(Agnode_s.class))); g_len = strlen(g_str); n_str = agnameof(obj.castTo(Agnode_s.class)); n_len = strlen(n_str); tl = (textlabel_t) obj.castTo(Agnode_s.class).castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).getPtr("label"); if (tl!=null) { l_str = tl.getCString("text"); if (str!=null) l_len = strlen(l_str); } break; case AGEDGE: isEdge = 1; g_str = agnameof(agroot(agraphof(agtail((obj.castTo(Agedge_s.class)))))); g_len = strlen(g_str); t_str = agnameof(agtail((obj.castTo(Agedge_s.class)))); t_len = strlen(t_str); pt.___(ED_tail_port(obj.castTo(Agedge_s.class))); if ((tp_str = pt.name)!=null) tp_len = strlen(tp_str); h_str = agnameof(aghead((obj.castTo(Agedge_s.class)))); h_len = strlen(h_str); pt.___(ED_head_port(obj.castTo(Agedge_s.class))); if ((hp_str = pt.name)!=null) hp_len = strlen(hp_str); h_len = strlen(h_str); tl = ED_label(obj.castTo(Agedge_s.class)); if (tl!=null) { UNSUPPORTED("88b430s6vk0irhr2k7x9crz9l"); // l_str = tl->text; UNSUPPORTED("5hjl5oveu3muui5b0fffh0dz2"); // if (str) l_len = strlen(l_str); } if (agisdirected(agroot(agraphof(agtail((obj.castTo(Agedge_s.class))))))) e_str = new CString("->"); else e_str = new CString("--"); e_len = t_len + (tp_len!=0?tp_len+1:0) + 2 + h_len + (hp_len!=0?hp_len+1:0); break; } /* two passes over str. * * first pass prepares substitution strings and computes * total length for newstring required from malloc. */ for (s = str; ;) { c = s.charAt(0); s = s.plus(1); if (c=='\0') break; if (c == '\\') { c = s.charAt(0); s = s.plus(1); switch (c) { case 'G': newlen += g_len; break; case 'N': newlen += n_len; break; case 'E': newlen += e_len; break; case 'H': newlen += h_len; break; case 'T': newlen += t_len; break; case 'L': newlen += l_len; break; case '\\': if (escBackslash!=0) { newlen += 1; break; } /* Fall through */ default: /* leave other escape sequences unmodified, e.g. \n \l \r */ newlen += 2; } } else { newlen++; } } /* allocate new string */ newstr = gmalloc(newlen + 1); /* second pass over str assembles new string */ p = newstr; for (s = str; ;) { c = s.charAt(0); s = s.plus(1); if (c=='\0') break; if (c == '\\') { c = s.charAt(0); s = s.plus(1); switch (c) { case 'G': UNSUPPORTED("for (t = g_str; (*p = *t++); p++);"); break; case 'N': for (t = n_str; ; ) { p.setCharAt(0, t.charAt(0)); t = t.plus(1); if (p.charAt(0)=='\0') break; p = p.plus(1); } break; case 'E': UNSUPPORTED("if (isEdge) {"); /* for (t = t_str; (*p = *t++); p++); if (tp_len) { *p++ = ':'; for (t = tp_str; (*p = *t++); p++); } for (t = e_str; (*p = *t++); p++); for (t = h_str; (*p = *t++); p++); if (hp_len) { *p++ = ':'; for (t = hp_str; (*p = *t++); p++); } }*/ break; case 'T': UNSUPPORTED("for (t = t_str; (*p = *t++); p++);"); break; case 'H': UNSUPPORTED("for (t = h_str; (*p = *t++); p++);"); break; case 'L': UNSUPPORTED("for (t = l_str; (*p = *t++); p++);"); break; case '\\': UNSUPPORTED("if (escBackslash) {"); /* *p++ = '\\'; break; }*/ /* Fall through */ default: /* leave other escape sequences unmodified, e.g. \n \l \r */ p.setCharAt(0, '\\'); p = p.plus(1); p.setCharAt(0, c); p = p.plus(1); break; } } else { p.setCharAt(0, c); p = p.plus(1); } } p.setCharAt(0, '\0'); p = p.plus(1); return newstr; } finally { LEAVING("ajohywvjbrvkc7zca2uew6ghm","strdup_and_subst_obj0"); } } //3 af2a0cdl8ld7bbq0qu0rt1d8z // char *strdup_and_subst_obj(char *str, void *obj) public static CString strdup_and_subst_obj(CString str, __ptr__ obj) { ENTERING("af2a0cdl8ld7bbq0qu0rt1d8z","strdup_and_subst_obj"); try { UNSUPPORTED("7eeocxzl6qhtvcv7gnh73o7d1"); // char *strdup_and_subst_obj(char *str, void *obj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("67419rdrhawe7vudn882sohkd"); // return strdup_and_subst_obj0 (str, obj, 1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("af2a0cdl8ld7bbq0qu0rt1d8z","strdup_and_subst_obj"); } } //3 bevzgi4opmmgxwksl1lssepxc // static int xml_isentity(char *s) public static Object xml_isentity(Object... arg) { UNSUPPORTED("ddxpdim5n11qvep9b61kpijae"); // static int xml_isentity(char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7309b02hjekdyss2l1jlfa3o5"); // s++; /* already known to be '&' */ UNSUPPORTED("ee1xg58k0yj6mgak36f7bqx4z"); // if (*s == '#') { UNSUPPORTED("1fe0kohehgdxhenrepo7ymdcw"); // s++; UNSUPPORTED("autyof60ysqv0zxvcovs8ol1o"); // if (*s == 'x' || *s == 'X') { UNSUPPORTED("8dqpp2f04tbhgnmk4gjjb8dga"); // s++; UNSUPPORTED("7z8kjrmcms9gfhq10a65dbjog"); // while ((*s >= '0' && *s <= '9') UNSUPPORTED("cvyao8709l4lhttkvu9hcnvne"); // || (*s >= 'a' && *s <= 'f') UNSUPPORTED("5q6n6p2xf3gohuffw81ur8vhb"); // || (*s >= 'A' && *s <= 'F')) UNSUPPORTED("zybbca41b450wccgr0kkur00"); // s++; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("1hg41j8n8b0uz0lmqlqcy30so"); // while (*s >= '0' && *s <= '9') UNSUPPORTED("zybbca41b450wccgr0kkur00"); // s++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("8h0cru3h3jveaqc5sgyq4rk71"); // while ((*s >= 'a' && *s <= 'z') UNSUPPORTED("31bir978ftxj7zjleb3mr1bei"); // || (*s >= 'A' && *s <= 'Z')) UNSUPPORTED("8dqpp2f04tbhgnmk4gjjb8dga"); // s++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9hcbv4ydnt8trlfaz870sjsyh"); // if (*s == ';') UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 57faqt3qjliznr0tkqn1ebjgk // char *xml_string(char *s) public static Object xml_string(Object... arg) { UNSUPPORTED("bnxc0qd7mqxuf0ayp7tmgh9i0"); // char *xml_string(char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1ufug0n20nuue5zidl5g8283p"); // return xml_string0 (s, 0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2ukbjx5sti6tulvxdrftanx4p // char *xml_string0(char *s, boolean raw) public static Object xml_string0(Object... arg) { UNSUPPORTED("c15krv3c4yexqimy1thaiy4zm"); // char *xml_string0(char *s, boolean raw) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("210phh7av8ei8ajjmpptx96m6"); // static char *buf = NULL; UNSUPPORTED("6fpm1wk8mz0hofn15361g6nzn"); // static int bufsize = 0; UNSUPPORTED("1q9p9mppsiolvz4xyp1xfe8s2"); // char *p, *sub, *prev = NULL; UNSUPPORTED("9ee5mdh9hsw491mz8n88ey33d"); // int len, pos = 0; UNSUPPORTED("cjyiejw67ffjjsk60tgeebvif"); // if (!buf) { UNSUPPORTED("4xkxdnucjd4ldoikgelnsa7c9"); // bufsize = 64; UNSUPPORTED("9pvgystp8nwvblycum3rps3tz"); // buf = gmalloc(bufsize); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dpfzdhkfq6u86uv5f9lnqfbpq"); // p = buf; UNSUPPORTED("e8ng575h9ts71v7d04mtpxyr5"); // while (s && *s) { UNSUPPORTED("85svsyrkaau2681m7ya7tygx6"); // if (pos > (bufsize - 8)) { UNSUPPORTED("aa09fjtytqkag416h6457rmkr"); // bufsize *= 2; UNSUPPORTED("3vu2n3g10rrkdmia0oyndfj4s"); // buf = grealloc(buf, bufsize); UNSUPPORTED("cz6j3s7zlvrbs83g3e42o83z7"); // p = buf + pos; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("97iud4axotxlk7ywlijb75m3d"); // /* escape '&' only if not part of a legal entity sequence */ UNSUPPORTED("4x9tn37kkejgziq8i1mkuzm2l"); // if (*s == '&' && (raw || !(xml_isentity(s)))) { UNSUPPORTED("cac1jzftgtiz1fvztpxrb5pzr"); // sub = "&"; UNSUPPORTED("17g0bn2jwfuvdxn93z9lsronr"); // len = 5; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7e1vaedh6l0yfegrgw9donb9e"); // /* '<' '>' are safe to substitute even if string is already UTF-8 coded UNSUPPORTED("2hspzajrej6p5fmxtp3xo33mw"); // * since UTF-8 strings won't contain '<' or '>' */ UNSUPPORTED("3xg4wo6utmvnlgyvg8ciz4tey"); // else if (*s == '<') { UNSUPPORTED("13qv1mf2mabbasi5mgrjsqs3n"); // sub = "<"; UNSUPPORTED("cn6mu8yh8covbdy1zkhq7256"); // len = 4; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("art2agkl4px2ncm5gmygaoi4v"); // else if (*s == '>') { UNSUPPORTED("dbkjqbduusn4tza1p3ng8iuyi"); // sub = ">"; UNSUPPORTED("cn6mu8yh8covbdy1zkhq7256"); // len = 4; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("aundz2f5ze9pcxo1dksgg0zxi"); // else if (*s == '-') { /* can't be used in xml comment strings */ UNSUPPORTED("37g3n162xpdox7os6l6tphpwc"); // sub = "-"; UNSUPPORTED("17g0bn2jwfuvdxn93z9lsronr"); // len = 5; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1lvkv9camdmveih40gwylsnw6"); // else if (*s == ' ' && prev && *prev == ' ') { UNSUPPORTED("b0atdb6d1uzal5s04csjvyq30"); // /* substitute 2nd and subsequent spaces with required_spaces */ UNSUPPORTED("72g8c8ott8fvqjni8tir0plf7"); // sub = " "; /* inkscape doesn't recognise   */ UNSUPPORTED("axaethtisavqkan2dx7laigpw"); // len = 6; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9e32cag083iuoabhlvpcldsa8"); // else if (*s == '"') { UNSUPPORTED("4w7kby1vesehrcs7zpowfb0q6"); // sub = """; UNSUPPORTED("axaethtisavqkan2dx7laigpw"); // len = 6; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("akz9vs5rt6crj61e0batgdi09"); // else if (*s == '\'') { UNSUPPORTED("6ohptq6v6vjhjivmjf7d5auoz"); // sub = "'"; UNSUPPORTED("17g0bn2jwfuvdxn93z9lsronr"); // len = 5; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("adxr80w3fzxvf4gxvbuo78rm5"); // sub = s; UNSUPPORTED("ct414lk8my1pywj7ypk05e6d"); // len = 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("25ryz7f7izh8r6792860c1d0y"); // while (len--) { UNSUPPORTED("byu93mjyl867v3xyy1fb9pw9"); // *p++ = *sub++; UNSUPPORTED("27349aw1zezm0lpez1jn3pcw4"); // pos++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5j7yubj14qnrajv5mpkfylpk3"); // prev = s; UNSUPPORTED("1fe0kohehgdxhenrepo7ymdcw"); // s++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2t1d66kwn86kqh0i665hqw6cl"); // *p = '\0'; UNSUPPORTED("5jfpogdyby101eyuw2dhtb5cg"); // return buf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d3mybo5t72cpoks3gfdfynkjw // char *xml_url_string(char *s) public static Object xml_url_string(Object... arg) { UNSUPPORTED("9u7qpiphyo8n8zc8n1071b67e"); // char *xml_url_string(char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("210phh7av8ei8ajjmpptx96m6"); // static char *buf = NULL; UNSUPPORTED("6fpm1wk8mz0hofn15361g6nzn"); // static int bufsize = 0; UNSUPPORTED("47g093jarn346ptid7u4d7e7m"); // char *p, *sub; UNSUPPORTED("9ee5mdh9hsw491mz8n88ey33d"); // int len, pos = 0; UNSUPPORTED("cjyiejw67ffjjsk60tgeebvif"); // if (!buf) { UNSUPPORTED("4xkxdnucjd4ldoikgelnsa7c9"); // bufsize = 64; UNSUPPORTED("9pvgystp8nwvblycum3rps3tz"); // buf = gmalloc(bufsize); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dpfzdhkfq6u86uv5f9lnqfbpq"); // p = buf; UNSUPPORTED("e8ng575h9ts71v7d04mtpxyr5"); // while (s && *s) { UNSUPPORTED("85svsyrkaau2681m7ya7tygx6"); // if (pos > (bufsize - 8)) { UNSUPPORTED("aa09fjtytqkag416h6457rmkr"); // bufsize *= 2; UNSUPPORTED("3vu2n3g10rrkdmia0oyndfj4s"); // buf = grealloc(buf, bufsize); UNSUPPORTED("cz6j3s7zlvrbs83g3e42o83z7"); // p = buf + pos; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("97iud4axotxlk7ywlijb75m3d"); // /* escape '&' only if not part of a legal entity sequence */ UNSUPPORTED("2ulqzjhkp81o1cpur4y62jck9"); // if (*s == '&' && !(xml_isentity(s))) { UNSUPPORTED("cac1jzftgtiz1fvztpxrb5pzr"); // sub = "&"; UNSUPPORTED("17g0bn2jwfuvdxn93z9lsronr"); // len = 5; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7e1vaedh6l0yfegrgw9donb9e"); // /* '<' '>' are safe to substitute even if string is already UTF-8 coded UNSUPPORTED("2hspzajrej6p5fmxtp3xo33mw"); // * since UTF-8 strings won't contain '<' or '>' */ UNSUPPORTED("3xg4wo6utmvnlgyvg8ciz4tey"); // else if (*s == '<') { UNSUPPORTED("13qv1mf2mabbasi5mgrjsqs3n"); // sub = "<"; UNSUPPORTED("cn6mu8yh8covbdy1zkhq7256"); // len = 4; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("art2agkl4px2ncm5gmygaoi4v"); // else if (*s == '>') { UNSUPPORTED("dbkjqbduusn4tza1p3ng8iuyi"); // sub = ">"; UNSUPPORTED("cn6mu8yh8covbdy1zkhq7256"); // len = 4; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9e32cag083iuoabhlvpcldsa8"); // else if (*s == '"') { UNSUPPORTED("4w7kby1vesehrcs7zpowfb0q6"); // sub = """; UNSUPPORTED("axaethtisavqkan2dx7laigpw"); // len = 6; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("akz9vs5rt6crj61e0batgdi09"); // else if (*s == '\'') { UNSUPPORTED("6ohptq6v6vjhjivmjf7d5auoz"); // sub = "'"; UNSUPPORTED("17g0bn2jwfuvdxn93z9lsronr"); // len = 5; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("adxr80w3fzxvf4gxvbuo78rm5"); // sub = s; UNSUPPORTED("ct414lk8my1pywj7ypk05e6d"); // len = 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("25ryz7f7izh8r6792860c1d0y"); // while (len--) { UNSUPPORTED("byu93mjyl867v3xyy1fb9pw9"); // *p++ = *sub++; UNSUPPORTED("27349aw1zezm0lpez1jn3pcw4"); // pos++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1fe0kohehgdxhenrepo7ymdcw"); // s++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2t1d66kwn86kqh0i665hqw6cl"); // *p = '\0'; UNSUPPORTED("5jfpogdyby101eyuw2dhtb5cg"); // return buf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/memory__c.java000066400000000000000000000103311312650303100220660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.JUtils.memset; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import smetana.core.CString; import smetana.core.__ptr__; import smetana.core.size_t; public class memory__c { //3 6hfkgng9qf75cucpojc4r8x6w // void *zmalloc(size_t nbytes) public static __ptr__ zmalloc(size_t nbytes) { ENTERING("6hfkgng9qf75cucpojc4r8x6w","zmalloc"); try { __ptr__ rv; if (nbytes.isZero()) return null; rv = gmalloc(nbytes); memset(rv, 0, nbytes); return rv; } finally { LEAVING("6hfkgng9qf75cucpojc4r8x6w","zmalloc"); } } //3 dn6c3bthm7yuhtrxx3o2je19z // void *zrealloc(void *ptr, size_t size, size_t elt, size_t osize) public static Object zrealloc(Object... arg) { UNSUPPORTED("50do65rl7k8poomk5tdkjw6k2"); // void *zrealloc(void *ptr, size_t size, size_t elt, size_t osize) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2esc94j9py77lfd4f23nk7w5x"); // void *p = realloc(ptr, size * elt); UNSUPPORTED("e13q5hvkbkekp23xt0oxo1nsb"); // if (p == NULL && size) { UNSUPPORTED("4t1y5iinm4310lkpvbal1spve"); // fprintf(stderr, "out of memory\n"); UNSUPPORTED("68kasxgknec72r19lohbk6n3q"); // return p; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2wr2qtb30ktteuohi1vgzxugz"); // if (osize < size) UNSUPPORTED("egt7kitgze0mw7g867jd7p6cq"); // memset((char *) p + (osize * elt), '\0', (size - osize) * elt); UNSUPPORTED("91xduilalb406jjyw2g1i07th"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4mfikqpmxyxrke46i5xakatmc // void *gmalloc(size_t nbytes) public static CString gmalloc(int nbytes) { return new CString(nbytes); } public static __ptr__ gmalloc(size_t nbytes) { ENTERING("4mfikqpmxyxrke46i5xakatmc","gmalloc"); try { __ptr__ rv; if (nbytes.isZero()) return null; rv = (__ptr__) nbytes.malloc(); if (rv == null) { System.err.println("out of memory"); } return rv; } finally { LEAVING("4mfikqpmxyxrke46i5xakatmc","gmalloc"); } } //3 1ed55yig6d18nhtbyqlf37jik // void *grealloc(void *ptr, size_t size) public static __ptr__ grealloc(__ptr__ ptr, size_t size) { ENTERING("1ed55yig6d18nhtbyqlf37jik","grealloc"); try { __ptr__ p = (__ptr__) size.realloc(ptr); return p; } finally { LEAVING("1ed55yig6d18nhtbyqlf37jik","grealloc"); } } } plantuml-1.2017.15/src/gen/lib/common/ns__c.java000066400000000000000000001402601312650303100212030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static gen.lib.cgraph.attr__c.agget; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.common.memory__c.zmalloc; import static gen.lib.common.utils__c.dequeue; import static gen.lib.common.utils__c.enqueue; import static gen.lib.common.utils__c.free_queue; import static gen.lib.common.utils__c.new_queue; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.atoi; import static smetana.core.JUtils.setjmp; import static smetana.core.JUtils.size_t_array_of_integer; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.ALLOC_empty; import static smetana.core.Macro.ED_cutvalue; import static smetana.core.Macro.ED_minlen; import static smetana.core.Macro.ED_tree_index; import static smetana.core.Macro.ED_weight; import static smetana.core.Macro.GD_nlist; import static smetana.core.Macro.INT_MAX; import static smetana.core.Macro.MAX; import static smetana.core.Macro.MIN; import static smetana.core.Macro.N; import static smetana.core.Macro.ND_in; import static smetana.core.Macro.ND_lim; import static smetana.core.Macro.ND_low; import static smetana.core.Macro.ND_mark; import static smetana.core.Macro.ND_next; import static smetana.core.Macro.ND_node_type; import static smetana.core.Macro.ND_out; import static smetana.core.Macro.ND_par; import static smetana.core.Macro.ND_priority; import static smetana.core.Macro.ND_rank; import static smetana.core.Macro.ND_tree_in; import static smetana.core.Macro.ND_tree_out; import static smetana.core.Macro.NOT; import static smetana.core.Macro.SEQ; import static smetana.core.Macro.SLACK; import static smetana.core.Macro.TREE_EDGE; import static smetana.core.Macro.UNSUPPORTED; import static smetana.core.Macro.free_list; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.boxf; import h.nodequeue; import h.pointf; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Memory; import smetana.core.Z; import smetana.core.__ptr__; import smetana.core.__struct__; import smetana.core.jmp_buf; public class ns__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 540u5gu9i0x1wzoxqqx5n2vwp // static jmp_buf jbuf private static jmp_buf jbuf = new jmp_buf(); //1 5kbimjtsi4ulxiyk2w1brj6py // static graph_t *G //private static Agraph_s G; //1 608xz3ruk6qq4bs1sagl9fuav // static int N_nodes, N_edges //private static int N_nodes, N_edges; //1 cfz1upsuq7ct75nfqmyg925bo // static int Minrank, Maxrank //static private int Minrank, Maxrank; //1 1xxb2cip20ls1938be1sgpc8s // static int S_i //private static int S_i; //1 2ahnzxrqoz8eoicu88g9jzic7 // static int Search_size //private static int Search_size; //1 3t9aql1n1eclyvy7p2nwyacor // static nlist_t Tree_node //private static final __struct__ Tree_node = JUtils.from(nlist_t.class); //1 11b7xeg0x1f09v305mxwvgbhs // static elist Tree_edge //private static final __struct__ Tree_edge = JUtils.from(elist.class); //3 6au5htcaxhw0blmx5c48v03u0 // static void add_tree_edge(edge_t * e) public static void add_tree_edge(Agedge_s e) { ENTERING("6au5htcaxhw0blmx5c48v03u0","add_tree_edge"); try { Agnode_s n; if (TREE_EDGE(e)) { UNSUPPORTED("cq4nqjjxvb0dtdfy4c7pwpqai"); // agerr(AGERR, "add_tree_edge: missing tree edge\n"); UNSUPPORTED("6fzmgjpkhmnx0a2cnt0q0rceg"); // longjmp (jbuf, 1); } ED_tree_index(e, Z.z().Tree_edge.size); Z.z().Tree_edge.setInList(Z.z().Tree_edge.size, e); Z.z().Tree_edge.size = 1+ Z.z().Tree_edge.size; if (ND_mark(agtail(e)) == 0) { Z.z().Tree_node.setInList(Z.z().Tree_node.size, agtail(e)); Z.z().Tree_node.size = 1+ Z.z().Tree_node.size; } if (ND_mark(aghead(e)) == 0) { Z.z().Tree_node.setInList(Z.z().Tree_node.size, aghead(e)); Z.z().Tree_node.size = 1+ Z.z().Tree_node.size; } n = agtail(e); ND_mark(n, 1); ND_tree_out(n).setInList(ND_tree_out(n).size, e); ND_tree_out(n).size = 1+ND_tree_out(n).size; ND_tree_out(n).setInList(ND_tree_out(n).size, null); if (ND_out(n).getFromList(ND_tree_out(n).size - 1) == null) { UNSUPPORTED("9src34zgmgy8yvdzfs1ozlh0w"); // agerr(AGERR, "add_tree_edge: empty outedge list\n"); UNSUPPORTED("6fzmgjpkhmnx0a2cnt0q0rceg"); // longjmp (jbuf, 1); } n = aghead(e); ND_mark(n, 1); ND_tree_in(n).setInList(ND_tree_in(n).size, e); ND_tree_in(n).size = 1+ND_tree_in(n).size; ND_tree_in(n).setInList(ND_tree_in(n).size, null); if (ND_in(n).getFromList(ND_tree_in(n).size - 1) == null) { UNSUPPORTED("f0uri98pv606g2qjpy9k385cy"); // agerr(AGERR, "add_tree_edge: empty inedge list\n"); UNSUPPORTED("6fzmgjpkhmnx0a2cnt0q0rceg"); // longjmp (jbuf, 1); } } finally { LEAVING("6au5htcaxhw0blmx5c48v03u0","add_tree_edge"); } } //3 9b7b78pmafynmvffztrqnlxtn // static void exchange_tree_edges(edge_t * e, edge_t * f) public static void exchange_tree_edges(Agedge_s e, Agedge_s f) { ENTERING("9b7b78pmafynmvffztrqnlxtn","exchange_tree_edges"); try { int i, j; Agnode_s n; ED_tree_index(f, ED_tree_index(e)); Z.z().Tree_edge.setInList(ED_tree_index(e), f); ED_tree_index(e, -1); n = agtail(e); ND_tree_out(n).size = ND_tree_out(n).size -1; i = ND_tree_out(n).size; for (j = 0; j <= i; j++) if (EQ(ND_tree_out(n).getFromList(j), e)) break; ND_tree_out(n).setInList(j, ND_tree_out(n).getFromList(i)); ND_tree_out(n).setInList(i, null); n = aghead(e); ND_tree_in(n).size = ND_tree_in(n).size -1; i = ND_tree_in(n).size; for (j = 0; j <= i; j++) if (EQ(ND_tree_in(n).getFromList(j), e)) break; ND_tree_in(n).setInList(j, ND_tree_in(n).getFromList(i)); ND_tree_in(n).setInList(i, null); n = agtail(f); ND_tree_out(n).setInList(ND_tree_out(n).size, f); ND_tree_out(n).size = ND_tree_out(n).size +1; ND_tree_out(n).setInList(ND_tree_out(n).size, null); n = aghead(f); ND_tree_in(n).setInList(ND_tree_in(n).size, f); ND_tree_in(n).size = ND_tree_in(n).size +1; ND_tree_in(n).setInList(ND_tree_in(n).size, null); } finally { LEAVING("9b7b78pmafynmvffztrqnlxtn","exchange_tree_edges"); } } //3 dbxco6m0mabzhsqfo3pb8nctk // static void init_rank(void) public static void init_rank() { ENTERING("dbxco6m0mabzhsqfo3pb8nctk","init_rank"); try { int i, ctr; nodequeue Q; Agnode_s v; Agedge_s e; Q = new_queue(Z.z().N_nodes); ctr = 0; for (v = GD_nlist(Z.z().G_ns); v!=null; v = ND_next(v)) { if (ND_priority(v) == 0) enqueue(Q, v); } while ((v = dequeue(Q))!=null) { ND_rank(v, 0); ctr++; for (i = 0; (e = (Agedge_s) ND_in(v).getFromList(i))!=null; i++) ND_rank(v, MAX(ND_rank(v), ND_rank(agtail(e)) + ED_minlen(e))); for (i = 0; (e = (Agedge_s) ND_out(v).getFromList(i))!=null; i++) { ND_priority(aghead(e), ND_priority(aghead(e)) -1 ); if ((ND_priority(aghead(e))) <= 0) enqueue(Q, aghead(e)); } } if (ctr != Z.z().N_nodes) { UNSUPPORTED("7sgp99x1l3hzfks5wykxa87gf"); // agerr(AGERR, "trouble in init_rank\n"); UNSUPPORTED("bwwunxmw4kgz6qntbn6xp0cur"); // for (v = (((Agraphinfo_t*)(((Agobj_t*)(G))->data))->nlist); v; v = (((Agnodeinfo_t*)(((Agobj_t*)(v))->data))->next)) UNSUPPORTED("3dk132mz1u2pf0tla64kl6hv0"); // if ((((Agnodeinfo_t*)(((Agobj_t*)(v))->data))->priority)) UNSUPPORTED("916bi45h6sjvte1rgig12b1v2"); // agerr(AGPREV, "\t%s %d\n", agnameof(v), (((Agnodeinfo_t*)(((Agobj_t*)(v))->data))->priority)); } free_queue(Q); } finally { LEAVING("dbxco6m0mabzhsqfo3pb8nctk","init_rank"); } } //3 bj7ux5kz8ls2lnfh0ix6i00b9 // static node_t *incident(edge_t * e) public static Agnode_s incident(Agedge_s e) { ENTERING("bj7ux5kz8ls2lnfh0ix6i00b9","incident"); try { if (ND_mark(agtail(e))!=0) { if (ND_mark(aghead(e)) == 0) return agtail(e); } else { if (ND_mark(aghead(e))!=0) return aghead(e); } return null; } finally { LEAVING("bj7ux5kz8ls2lnfh0ix6i00b9","incident"); } } //3 4i9tcvid2iql874c6k70s9aqm // static edge_t *leave_edge(void) public static Agedge_s leave_edge() { ENTERING("4i9tcvid2iql874c6k70s9aqm","leave_edge"); try { Agedge_s f, rv = null; int j, cnt = 0; j = Z.z().S_i; while (Z.z().S_i < Z.z().Tree_edge.size) { if (ED_cutvalue(f = (Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i)) < 0) { if (rv!=null) { if (ED_cutvalue(rv) > ED_cutvalue(f)) rv = f; } else rv = (Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i); if (++cnt >= Z.z().Search_size) return rv; } Z.z().S_i++; } if (j > 0) { Z.z().S_i = 0; while (Z.z().S_i < j) { if (ED_cutvalue(f = (Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i)) < 0) { if (rv!=null) { if (ED_cutvalue(rv) > ED_cutvalue(f)) rv = f; } else rv = (Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i); if (++cnt >= Z.z().Search_size) return rv; } Z.z().S_i++; } } return rv; } finally { LEAVING("4i9tcvid2iql874c6k70s9aqm","leave_edge"); } } //1 3wm7ej298st1xk7rbhbtnbk64 // static edge_t *Enter //private static Agedge_s Enter; //1 dx9f0e947f5kjhc2eftn43t90 // static int Low, Lim, Slack //private static int Low, Lim, Slack; //3 10lkpr4y40luvy2idlozfiva3 // static void dfs_enter_outedge(node_t * v) public static void dfs_enter_outedge(Agnode_s v) { ENTERING("10lkpr4y40luvy2idlozfiva3","dfs_enter_outedge"); try { int i, slack; Agedge_s e; for (i = 0; (e = (Agedge_s) ND_out(v).getFromList(i))!=null; i++) { if (TREE_EDGE(e) == false) { if (N(SEQ(Z.z().Low, ND_lim(aghead(e)), Z.z().Lim))) { slack = SLACK(e); if ((slack < Z.z().Slack) || (Z.z().Enter == null)) { Z.z().Enter = e; Z.z().Slack = slack; } } } else if (ND_lim(aghead(e)) < ND_lim(v)) dfs_enter_outedge(aghead(e)); } for (i = 0; (e = (Agedge_s) ND_tree_in(v).getFromList(i))!=null && (Z.z().Slack > 0); i++) if (ND_lim(agtail(e)) < ND_lim(v)) dfs_enter_outedge(agtail(e)); } finally { LEAVING("10lkpr4y40luvy2idlozfiva3","dfs_enter_outedge"); } } //3 2z9nii6380p8qlql8nznzgvof // static void dfs_enter_inedge(node_t * v) public static void dfs_enter_inedge(Agnode_s v) { ENTERING("2z9nii6380p8qlql8nznzgvof","dfs_enter_inedge"); try { int i, slack; Agedge_s e; for (i = 0; (e = (Agedge_s) ND_in(v).getFromList(i))!=null; i++) { if (TREE_EDGE(e) == false) { if (N(SEQ(Z.z().Low, ND_lim(agtail(e)), Z.z().Lim))) { slack = SLACK(e); if ((slack < Z.z().Slack) || (Z.z().Enter == null)) { Z.z().Enter = e; Z.z().Slack = slack; } } } else if (ND_lim(agtail(e)) < ND_lim(v)) dfs_enter_inedge(agtail(e)); } for (i = 0; (e = (Agedge_s) ND_tree_out(v).getFromList(i))!=null && (Z.z().Slack > 0); i++) if (ND_lim(aghead(e)) < ND_lim(v)) dfs_enter_inedge(aghead(e)); } finally { LEAVING("2z9nii6380p8qlql8nznzgvof","dfs_enter_inedge"); } } //3 aeu2po1o1rvibmafk0k8dw0fh // static edge_t *enter_edge(edge_t * e) public static Agedge_s enter_edge(Agedge_s e) { ENTERING("aeu2po1o1rvibmafk0k8dw0fh","enter_edge"); try { Agnode_s v; int outsearch; /* v is the down node */ if (ND_lim(agtail(e)) < ND_lim(aghead(e))) { v = agtail(e); outsearch = 0; } else { v = aghead(e); outsearch = 1; } Z.z().Enter = null; Z.z().Slack = INT_MAX; Z.z().Low = ND_low(v); Z.z().Lim = ND_lim(v); if (outsearch!=0) dfs_enter_outedge(v); else dfs_enter_inedge(v); return Z.z().Enter; } finally { LEAVING("aeu2po1o1rvibmafk0k8dw0fh","enter_edge"); } } //3 1gvyafmercq92v3lg6gb33cbt // static int treesearch(node_t * v) public static boolean treesearch(Agnode_s v) { ENTERING("1gvyafmercq92v3lg6gb33cbt","treesearch"); try { int i; Agedge_s e; for (i = 0; (e = (Agedge_s) ND_out(v).getFromList(i))!=null; i++) { if ((ND_mark(aghead(e)) == 0) && (SLACK(e) == 0)) { add_tree_edge(e); if ((Z.z().Tree_edge.size == Z.z().N_nodes - 1) || treesearch(aghead(e))) return NOT(0); } } for (i = 0; (e = (Agedge_s) ND_in(v).getFromList(i))!=null; i++) { if ((ND_mark(agtail(e)) == 0) && (SLACK(e) == 0)) { add_tree_edge(e); if ((Z.z().Tree_edge.size == Z.z().N_nodes - 1) || treesearch(agtail(e))) return NOT(0); } } return false; } finally { LEAVING("1gvyafmercq92v3lg6gb33cbt","treesearch"); } } //3 c98bj1u8j43cdezeczn33mec0 // static int tight_tree(void) public static int tight_tree() { ENTERING("c98bj1u8j43cdezeczn33mec0","tight_tree"); try { int i; Agnode_s n; for (n = GD_nlist(Z.z().G_ns); n!=null; n = ND_next(n)) { ND_mark(n, 0); ND_tree_in(n).setInList(0, null); ND_tree_out(n).setInList(0, null); ND_tree_in(n).size = 0; ND_tree_out(n).size = 0; } for (i = 0; i < Z.z().Tree_edge.size; i++) ED_tree_index(Z.z().Tree_edge.getFromList(i), -1); Z.z().Tree_node.size = 0; Z.z().Tree_edge.size = 0; for (n = GD_nlist(Z.z().G_ns); n!=null && (Z.z().Tree_edge.size == 0); n = ND_next(n)) treesearch(n); return Z.z().Tree_node.size; } finally { LEAVING("c98bj1u8j43cdezeczn33mec0","tight_tree"); } } //3 10o7oe8d097fx7swmpqd4tf0h // static void init_cutvalues(void) public static void init_cutvalues() { ENTERING("10o7oe8d097fx7swmpqd4tf0h","init_cutvalues"); try { dfs_range(GD_nlist(Z.z().G_ns), null, 1); dfs_cutval(GD_nlist(Z.z().G_ns), null); } finally { LEAVING("10o7oe8d097fx7swmpqd4tf0h","init_cutvalues"); } } //3 756raqohoxdeiddqbyr37h7ig // static int feasible_tree(void) public static int feasible_tree() { ENTERING("756raqohoxdeiddqbyr37h7ig","feasible_tree"); try { int i, delta; Agnode_s n; Agedge_s e, f; if (Z.z().N_nodes <= 1) return 0; while (tight_tree() < Z.z().N_nodes) { e = null; for (n = GD_nlist(Z.z().G_ns); n!=null; n = ND_next(n)) { for (i = 0; (f = (Agedge_s) ND_out(n).getFromList(i))!=null; i++) { if ((TREE_EDGE(f) == false) && incident(f)!=null && ((e == null) || (SLACK(f) < SLACK (e)))) e = f; } } if (e!=null) { delta = SLACK(e); if (delta!=0) { if (EQ(incident(e), aghead(e))) delta = -delta; for (i = 0; i < Z.z().Tree_node.size; i++) ND_rank(Z.z().Tree_node.getFromList(i), ND_rank(Z.z().Tree_node.getFromList(i)) + delta); } } else { return 1; } } init_cutvalues(); return 0; } finally { LEAVING("756raqohoxdeiddqbyr37h7ig","feasible_tree"); } } //3 49un8m43odrf89cedvin3wz3r // static node_t *treeupdate(node_t * v, node_t * w, int cutvalue, int dir) public static Agnode_s treeupdate(Agnode_s v, Agnode_s w, int cutvalue, boolean dir) { ENTERING("49un8m43odrf89cedvin3wz3r","treeupdate"); try { Agedge_s e; boolean d; while (N(SEQ(ND_low(v), ND_lim(w), ND_lim(v)))) { e = (Agedge_s) ND_par(v); if (EQ(v, agtail(e))) d = dir; else d = NOT(dir); if (d) ED_cutvalue(e, ED_cutvalue(e) + cutvalue); else ED_cutvalue(e, ED_cutvalue(e) - cutvalue); if (ND_lim(agtail(e)) > ND_lim(aghead(e))) v = agtail(e); else v = aghead(e); } return v; } finally { LEAVING("49un8m43odrf89cedvin3wz3r","treeupdate"); } } //3 e66n8gern1fejjsn8nefypo0g // static void rerank(node_t * v, int delta) public static void rerank(Agnode_s v, int delta) { ENTERING("e66n8gern1fejjsn8nefypo0g","rerank"); try { int i; Agedge_s e; ND_rank(v, ND_rank(v) - delta); for (i = 0; (e = (Agedge_s) ND_tree_out(v).getFromList(i))!=null; i++) if (NEQ(e, ND_par(v))) rerank(aghead(e), delta); for (i = 0; (e = (Agedge_s) ND_tree_in(v).getFromList(i))!=null; i++) if (NEQ(e, ND_par(v))) rerank(agtail(e), delta); } finally { LEAVING("e66n8gern1fejjsn8nefypo0g","rerank"); } } //3 xww1p8bentf1qk7mgfhi1q6m // static void update(edge_t * e, edge_t * f) public static void update(Agedge_s e, Agedge_s f) { ENTERING("xww1p8bentf1qk7mgfhi1q6m","update"); try { int cutvalue, delta; Agnode_s lca; delta = SLACK(f); /* "for (v = in nodes in tail side of e) do ND_rank(v) -= delta;" */ if (delta > 0) { int s; s = ND_tree_in(agtail(e)).size + ND_tree_out(agtail(e)).size; if (s == 1) rerank(agtail(e), delta); else { s = ND_tree_in(aghead(e)).size + ND_tree_out(aghead(e)).size; if (s == 1) rerank(aghead(e), -delta); else { if (ND_lim(agtail(e)) < ND_lim(aghead(e))) rerank(agtail(e), delta); else rerank(aghead(e), -delta); } } } cutvalue = ED_cutvalue(e); lca = treeupdate(agtail(f), aghead(f), cutvalue, true); if (NEQ(treeupdate(aghead(f), agtail(f), cutvalue, false), lca)) { UNSUPPORTED("f2l4c6yhnwnfer3vrasf55fio"); // agerr(AGERR, "update: mismatched lca in treeupdates\n"); UNSUPPORTED("6fzmgjpkhmnx0a2cnt0q0rceg"); // longjmp (jbuf, 1); } ED_cutvalue(f, -cutvalue); ED_cutvalue(e, 0); exchange_tree_edges(e, f); dfs_range(lca, ND_par(lca), ND_low(lca)); } finally { LEAVING("xww1p8bentf1qk7mgfhi1q6m","update"); } } //3 3yw7w42hz7af67d6qse3b2172 // static void scan_and_normalize(void) public static void scan_and_normalize() { ENTERING("3yw7w42hz7af67d6qse3b2172","scan_and_normalize"); try { Agnode_s n; Z.z().Minrank = Integer.MAX_VALUE; Z.z().Maxrank = -Integer.MAX_VALUE; for (n = GD_nlist(Z.z().G_ns); n!=null; n = ND_next(n)) { if (ND_node_type(n) == 0) { Z.z().Minrank = MIN(Z.z().Minrank, ND_rank(n)); Z.z().Maxrank = MAX(Z.z().Maxrank, ND_rank(n)); } } if (Z.z().Minrank != 0) { for (n = GD_nlist(Z.z().G_ns); n!=null; n = ND_next(n)) ND_rank(n, ND_rank(n) - Z.z().Minrank); Z.z().Maxrank -= Z.z().Minrank; Z.z().Minrank = 0; } } finally { LEAVING("3yw7w42hz7af67d6qse3b2172","scan_and_normalize"); } } //3 7eg6zti36nbg4tqyo8yunh86r // static void freeTreeList (graph_t* g) public static void freeTreeList(Agraph_s g) { ENTERING("7eg6zti36nbg4tqyo8yunh86r","freeTreeList"); try { Agnode_s n; for (n = GD_nlist(Z.z().G_ns); n!=null; n = ND_next(n)) { free_list(ND_tree_in(n)); free_list(ND_tree_out(n)); ND_mark(n, 0); } } finally { LEAVING("7eg6zti36nbg4tqyo8yunh86r","freeTreeList"); } } //3 9gx8p7md3v3mzp640xdjj814a // static void LR_balance(void) public static void LR_balance() { ENTERING("9gx8p7md3v3mzp640xdjj814a","LR_balance"); try { int i, delta; Agedge_s e, f; for (i = 0; i < Z.z().Tree_edge.size; i++) { e = (Agedge_s) Z.z().Tree_edge.getFromList(i); if (ED_cutvalue(e) == 0) { f = enter_edge(e); if (f == null) continue; delta = SLACK(f); if (delta <= 1) continue; if (ND_lim(agtail(e)) < ND_lim(aghead(e))) rerank(agtail(e), delta / 2); else rerank(aghead(e), -delta / 2); } } freeTreeList (Z.z().G_ns); } finally { LEAVING("9gx8p7md3v3mzp640xdjj814a","LR_balance"); } } //3 5c01jnao2ubmy4l0vi5jol0jz // static void TB_balance(void) public static void TB_balance() { ENTERING("5c01jnao2ubmy4l0vi5jol0jz","TB_balance"); try { Agnode_s n; Agedge_s e; int i, low, high, choice; __ptr__ nrank; int inweight, outweight; scan_and_normalize(); /* find nodes that are not tight and move to less populated ranks */ nrank = zmalloc(size_t_array_of_integer(Z.z().Maxrank + 1)); for (i = 0; i <= Z.z().Maxrank; i++) nrank.plus(i).setInt(0); for (n = GD_nlist(Z.z().G_ns); n!=null; n = ND_next(n)) if (ND_node_type(n) == 0) nrank.plus(ND_rank(n)).setInt(1+nrank.plus(ND_rank(n)).getInt()); for (n = GD_nlist(Z.z().G_ns); n!=null; n = ND_next(n)) { if (ND_node_type(n) != 0) continue; inweight = outweight = 0; low = 0; high = Z.z().Maxrank; for (i = 0; (e = (Agedge_s) ND_in(n).getFromList(i))!=null; i++) { inweight += ED_weight(e); low = MAX(low, ND_rank(agtail(e)) + ED_minlen(e)); } for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++) { outweight += ED_weight(e); high = MIN(high, ND_rank(aghead(e)) - ED_minlen(e)); } if (low < 0) low = 0; /* vnodes can have ranks < 0 */ if (inweight == outweight) { choice = low; for (i = low + 1; i <= high; i++) if (nrank.plus(i).getInt() < nrank.plus(choice).getInt()) choice = i; nrank.plus(ND_rank(n)).setInt(nrank.plus(ND_rank(n)).getInt()-1); nrank.plus(choice).setInt(nrank.plus(choice).getInt()+1); ND_rank(n, choice); } free_list(ND_tree_in(n)); free_list(ND_tree_out(n)); ND_mark(n, 0); } Memory.free(nrank); } finally { LEAVING("5c01jnao2ubmy4l0vi5jol0jz","TB_balance"); } } //3 37hg5w7ywmyljdiebgp5ltl22 // static int init_graph(graph_t * g) public static int init_graph(Agraph_s g) { ENTERING("37hg5w7ywmyljdiebgp5ltl22","init_graph"); try { int i, feasible; Agnode_s n; Agedge_s e; Z.z().G_ns = g; Z.z().N_nodes = Z.z().N_edges = Z.z().S_i = 0; for (n = GD_nlist(g); n!=null; n = ND_next(n)) { ND_mark(n, 0); Z.z().N_nodes++; for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++) Z.z().N_edges++; } Z.z().Tree_node.reallocEmpty(Z.z().N_nodes, Agnode_s.class); Z.z().Tree_node.size = 0; // Z.z().Tree_edge.setPtr("list", ALLOC_empty(Z.z().N_nodes, Z.z().Tree_edge.getPtr("list"), Agedge_s.class)); Z.z().Tree_edge.realloc(Z.z().N_nodes); Z.z().Tree_edge.size = 0; feasible = 1; for (n = GD_nlist(g); n!=null; n = ND_next(n)) { ND_priority(n, 0); for (i = 0; (e = (Agedge_s) ND_in(n).getFromList(i))!=null; i++) { ND_priority(n, 1+ND_priority(n)); ED_cutvalue(e, 0); ED_tree_index(e, -1); if (feasible!=0 && (ND_rank(aghead(e)) - ND_rank(agtail(e)) < ED_minlen(e))) feasible = 0; } // ND_tree_in(n).setPtr("list", zmalloc(sizeof(Agedge_s.class, i+1)));; ND_tree_in(n).mallocEmpty(Agedge_s.class, i+1); ND_tree_in(n).size = 0; for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++); // ND_tree_out(n).setPtr("list", zmalloc(sizeof(Agedge_s.class, i+1))); ND_tree_out(n).mallocEmpty(Agedge_s.class, i+1); ND_tree_out(n).size = 0; } return feasible; } finally { LEAVING("37hg5w7ywmyljdiebgp5ltl22","init_graph"); } } //3 4jv545ixndzfz0hmy2ck1kvre // static void graphSize (graph_t * g, int* nn, int* ne) public static Object graphSize(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("d95292hibn08mh6rbguy3zeib"); // graphSize (graph_t * g, int* nn, int* ne) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4i46dhl8eqbh29vq1vn3ipo70"); // int i, nnodes, nedges; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("359m8vuzzte7zl5lru7vf4bga"); // nnodes = nedges = 0; UNSUPPORTED("8g62mxpap4eeua2lkn9a1iosi"); // for (n = GD_nlist(g); n; n = ND_next(n)) { UNSUPPORTED("a5hcy2vbfyq09svspfdvsreu1"); // nnodes++; UNSUPPORTED("az80xiplaqv1i8gmq2feyyrea"); // for (i = 0; (e = ND_out(n).list[i]); i++) { UNSUPPORTED("1sy3rnb8qjw3nmyka290izgi2"); // nedges++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("h7rj9k6bm1iatjqeqmhlinoi"); // *nn = nnodes; UNSUPPORTED("7whkfg1zlimqk163vbj7cgxmt"); // *ne = nedges; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5n0ipwzhr8urlx0fsdzr02gwq // int rank2(graph_t * g, int balance, int maxiter, int search_size) public static int rank2(Agraph_s g, int balance, int maxiter, int search_size) { ENTERING("5n0ipwzhr8urlx0fsdzr02gwq","rank2"); try { int iter = 0, feasible; CString ns = new CString("network simplex: "); Agedge_s e, f; /*if (Verbose) { int nn, ne; graphSize (g, &nn, &ne); fprintf(stderr, "%s %d nodes %d edges maxiter=%d balance=%d\n", ns, nn, ne, maxiter, balance); start_timer(); }*/ feasible = init_graph(g); if (N(feasible)) init_rank(); if (maxiter <= 0) { freeTreeList (g); return 1; } if (search_size >= 0) Z.z().Search_size = search_size; else Z.z().Search_size = 30; if (setjmp (jbuf)!=0) { return 2; } if (feasible_tree()!=0) { freeTreeList (g); return 1; } while ((e = leave_edge())!=null) { f = enter_edge(e); update(e, f); iter++; /*if (Verbose && (iter % 100 == 0)) { if (iter % 1000 == 100) fputs(ns, stderr); fprintf(stderr, "%d ", iter); if (iter % 1000 == 0) fputc('\n', stderr); }*/ if (iter >= maxiter) break; } switch (balance) { case 1: TB_balance(); break; case 2: LR_balance(); break; default: scan_and_normalize(); freeTreeList (Z.z().G_ns); break; } /*if (Verbose) { if (iter >= 100) fputc('\n', stderr); fprintf(stderr, "%s%d nodes %d edges %d iter %.2f sec\n", ns, N_nodes, N_edges, iter, elapsed_sec()); }*/ return 0; } finally { LEAVING("5n0ipwzhr8urlx0fsdzr02gwq","rank2"); } } //3 aqly8eniwjr5bmh4hzwc7ftdr // int rank(graph_t * g, int balance, int maxiter) public static int rank(Agraph_s g, int balance, int maxiter) { ENTERING("aqly8eniwjr5bmh4hzwc7ftdr","rank"); try { CString s; int search_size; if ((s = agget(g, new CString("searchsize")))!=null) search_size = atoi(s); else search_size = 30; return rank2 (g, balance, maxiter, search_size); } finally { LEAVING("aqly8eniwjr5bmh4hzwc7ftdr","rank"); } } //3 2q59mz8qtn0biifbezb8uxz17 // static void x_cutval(edge_t * f) public static void x_cutval(Agedge_s f) { ENTERING("2q59mz8qtn0biifbezb8uxz17","x_cutval"); try { Agnode_s v=null; Agedge_s e; int i, sum, dir=0; /* set v to the node on the side of the edge already searched */ if (EQ(ND_par(agtail(f)), f)) { v = agtail(f); dir = 1; } else { v = aghead(f); dir = -1; } sum = 0; for (i = 0; (e = (Agedge_s) ND_out(v).getFromList(i))!=null; i++) sum += x_val(e, v, dir); for (i = 0; (e = (Agedge_s) ND_in(v).getFromList(i))!=null; i++) sum += x_val(e, v, dir); ED_cutvalue(f, sum); } finally { LEAVING("2q59mz8qtn0biifbezb8uxz17","x_cutval"); } } //3 bfeafmsmmnblgizs37qj03dy4 // static int x_val(edge_t * e, node_t * v, int dir) public static int x_val(Agedge_s e, Agnode_s v, int dir) { ENTERING("bfeafmsmmnblgizs37qj03dy4","x_val"); try { Agnode_s other; int d=0, rv=0, f=0; if (EQ(agtail(e), v)) other = aghead(e); else other = agtail(e); if (N(SEQ(ND_low(v), ND_lim(other), ND_lim(v)))) { f = 1; rv = ED_weight(e); } else { f = 0; if (TREE_EDGE(e)) rv = ED_cutvalue(e); else rv = 0; rv -= ED_weight(e); } if (dir > 0) { if (EQ(aghead(e), v)) d = 1; else d = -1; } else { if (EQ(agtail(e), v)) d = 1; else d = -1; } if (f!=0) d = -d; if (d < 0) rv = -rv; return rv; } finally { LEAVING("bfeafmsmmnblgizs37qj03dy4","x_val"); } } //3 ah65iqmwa5j0qwotm6amhijlg // static void dfs_cutval(node_t * v, edge_t * par) public static void dfs_cutval(Agnode_s v, Agedge_s par) { ENTERING("ah65iqmwa5j0qwotm6amhijlg","dfs_cutval"); try { int i; Agedge_s e; for (i = 0; (e = (Agedge_s) ND_tree_out(v).getFromList(i))!=null; i++) if (NEQ(e, par)) dfs_cutval(aghead(e), e); for (i = 0; (e = (Agedge_s) ND_tree_in(v).getFromList(i))!=null; i++) if (NEQ(e, par)) dfs_cutval(agtail(e), e); if (par!=null) x_cutval(par); } finally { LEAVING("ah65iqmwa5j0qwotm6amhijlg","dfs_cutval"); } } //3 cgqr48qol9p8bsqjnryo5z5x9 // static int dfs_range(node_t * v, edge_t * par, int low) public static int dfs_range(Agnode_s v, Agedge_s par, int low) { ENTERING("cgqr48qol9p8bsqjnryo5z5x9","dfs_range"); try { Agedge_s e; int i, lim; lim = low; ND_par(v, par); ND_low(v, low); for (i = 0; (e = (Agedge_s) ND_tree_out(v).getFromList(i))!=null; i++) if (NEQ(e, par)) lim = dfs_range(aghead(e), e, lim); for (i = 0; (e = (Agedge_s) ND_tree_in(v).getFromList(i))!=null; i++) if (NEQ(e, par)) lim = dfs_range(agtail(e), e, lim); ND_lim(v, lim); return lim + 1; } finally { LEAVING("cgqr48qol9p8bsqjnryo5z5x9","dfs_range"); } } } plantuml-1.2017.15/src/gen/lib/common/output__c.java000066400000000000000000001434561312650303100221350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class output__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 6fht53r5vzphmiooo5i9tvna9 // static double Y_off //1 6zlbkxk2nq08jt795gq9ylw7b // static double YF_off //3 6h1oa4cqlakv57l757pixrllu // double yDir (double y) public static Object yDir(Object... arg) { UNSUPPORTED("6yqj3kh80kduseti1t125vxuc"); // double yDir (double y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8dqz2vehx0qw9ow1q34nm29nb"); // return (Y_invert ? (Y_off - (y)) : (y)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8glhmjpf7wu0b4bp6y2morhz // static void agputs (const char* s, FILE* fp) public static Object agputs(Object... arg) { UNSUPPORTED("2a91abhqe9wp7lrhw42vdaf1t"); // static void agputs (const char* s, FILE* fp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3mvbsdv6kemosmi4kus10991w"); // putstr ((void*)fp, s); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 50ytxsn25x33pshc5fn6ndouu // static void agputc (int c, FILE* fp) public static Object agputc(Object... arg) { UNSUPPORTED("8t0e702psmmmcu9eumim4z6nv"); // static void agputc (int c, FILE* fp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("elhrx0tw5ggrn0s926ez829fp"); // static char buf[2] = {'\0','\0'}; UNSUPPORTED("5q4ts22itevk0jgej86bk287q"); // buf[0] = c; UNSUPPORTED("1p712omj2u85bemanjlhqmp39"); // putstr ((void*)fp, buf); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5lwr96qxai3q3ibx4jq2zaup4 // static void printstring(FILE * f, char *prefix, char *s) public static Object printstring(Object... arg) { UNSUPPORTED("cik5crknq1i3soa6udpuqs2jj"); // static void printstring(FILE * f, char *prefix, char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bx340tmzxfvnhjtjm8jcaxmo0"); // if (prefix) agputs(prefix, f); UNSUPPORTED("4dll3tdy69cqavyx6p1b4l9ax"); // agputs(s, f); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2bf9grhepqg3zfznzubbvqbeo // static void printint(FILE * f, char *prefix, int i) public static Object printint(Object... arg) { UNSUPPORTED("2j78a77iawzomftkz5vfkk99i"); // static void printint(FILE * f, char *prefix, int i) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("bx340tmzxfvnhjtjm8jcaxmo0"); // if (prefix) agputs(prefix, f); UNSUPPORTED("b4yrjxb6cecjl46x4jru1w1fi"); // sprintf(buf, "%d", i); UNSUPPORTED("a5120ceak9qt7h6sb0i9w5vj6"); // agputs(buf, f); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5z9gdq5h2uz6ip7nfhbyyjr47 // static void printdouble(FILE * f, char *prefix, double v) public static Object printdouble(Object... arg) { UNSUPPORTED("eigy0k9sb1hxjty7q0c09assn"); // static void printdouble(FILE * f, char *prefix, double v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("bx340tmzxfvnhjtjm8jcaxmo0"); // if (prefix) agputs(prefix, f); UNSUPPORTED("d38ey896kq41o4hdfsq730yyd"); // sprintf(buf, "%.5g", v); UNSUPPORTED("a5120ceak9qt7h6sb0i9w5vj6"); // agputs(buf, f); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dp0rs7pmn008udrkxxzndzajl // static void printpoint(FILE * f, pointf p) public static Object printpoint(Object... arg) { UNSUPPORTED("awvsuil2ah983t3h0v8en269i"); // static void printpoint(FILE * f, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7xc1oqq7npbfq2b1fzdokzikx"); // printdouble(f, " ", ((p.x)/(double)72)); UNSUPPORTED("6m59r4dotfk08t504y9tsmn5l"); // printdouble(f, " ", (((Y_invert ? (Y_off - (p.y)) : (p.y)))/(double)72)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1kbb9mmakvku7oedntokmdkdi // static void setYInvert(graph_t * g) public static Object setYInvert(Object... arg) { UNSUPPORTED("9qgrdiddkaomo4blvr5n4nffz"); // static void setYInvert(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3vpqrdc1a9x0cpu6f285x2tt3"); // if (Y_invert) { UNSUPPORTED("63lwvwdop4l87voa68fhlmdjq"); // Y_off = GD_bb(g).UR.y + GD_bb(g).LL.y; UNSUPPORTED("3z0tyi45vfaknot68fqyh82n"); // YF_off = ((Y_off)/(double)72); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 96and4g1ndnop0onysx5zohv8 // static char* canon (graph_t *g, char* s) public static Object canon(Object... arg) { UNSUPPORTED("b2eljuhn8sztgwuvk8cdgra33"); // static char* canon (graph_t *g, char* s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6grmh3i7q3dnveytjypxz660c"); // char* ns = agstrdup (g, s); UNSUPPORTED("1g4ujy6wgffnvmdyjrxe9w16n"); // char* cs = agcanonStr (ns); UNSUPPORTED("7146wdsszjqtusr3eogc94t1k"); // agstrfree (g, ns); UNSUPPORTED("cretu2n9zumqk83qpefveu0xm"); // return cs; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 erttiiytj1tj82ue7ewps4owz // static void writenodeandport(FILE * f, node_t * node, char *port) public static Object writenodeandport(Object... arg) { UNSUPPORTED("19qgj5kq0g1bujwdmxqlqtdlf"); // static void writenodeandport(FILE * f, node_t * node, char *port) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8i0d7frxcvvmzhidle0zin9i0"); // char *name; UNSUPPORTED("bmexy4wyucb3s61unxu1dv3rn"); // if ((ND_clustnode(node))) UNSUPPORTED("ebfq6fe0pwr0nbcw74qy0bsss"); // name = canon (agraphof(node), strchr(agnameof(node), ':') + 1); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("3umgsilmw23rwau73f3rlsjib"); // name = agcanonStr (agnameof(node)); UNSUPPORTED("d7ho98n42axo4lwhbros9kdm4"); // printstring(f, " ", name); /* slimey i know */ UNSUPPORTED("aobyifp8chh1zjvcfesub92n2"); // if (port && *port) UNSUPPORTED("9mjure2a47p3h1hulg3wn472r"); // printstring(f, ":", agcanonStr(port)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 548gbl5wlu8wpv6qrjjup6ti8 // void write_plain(GVJ_t * job, graph_t * g, FILE * f, boolean extend) public static Object write_plain(Object... arg) { UNSUPPORTED("3yohfo4t24sd4qgzv5o9jkjm4"); // void write_plain(GVJ_t * job, graph_t * g, FILE * f, boolean extend) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3que9ebpwn6xzziq2r9kq8ej9"); // int i, j, splinePoints; UNSUPPORTED("9spwl0nkgvqarpeweybacgonl"); // char *tport, *hport; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("37thdceezsvepe7tlyfatrbcw"); // bezier bz; UNSUPPORTED("2e0v7u9pfngzg11mt4kn3oudg"); // pointf pt; UNSUPPORTED("53spxurt3zrnwf6pj327788fv"); // char *lbl; UNSUPPORTED("3o5wtshjp5pfng25jcteup81j"); // char* fillcolor; UNSUPPORTED("130ux09wwwjsdsw49ki9wtf3n"); // putstr = g->clos->disc.io->putstr; UNSUPPORTED("d11pm6hxnfq5bb4nemjm82p43"); // // setup_graph(job, g); UNSUPPORTED("5k2g8l6h3qnzvhvq2dv1vn9sp"); // setYInvert(g); UNSUPPORTED("8oq1mul1uckavj0ybvoq2z7qi"); // pt = GD_bb(g).UR; UNSUPPORTED("5uqef2ramb4yi5rrnnaj4nmt"); // printdouble(f, "graph ", job->zoom); UNSUPPORTED("406shi1bpvi8ou1c1xwbdr884"); // printdouble(f, " ", ((pt.x)/(double)72)); UNSUPPORTED("5w5k71mnu6g98coxywamcfa8w"); // printdouble(f, " ", ((pt.y)/(double)72)); UNSUPPORTED("86ub4gpyej70m2eadepsbjm4t"); // agputc('\n', f); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("asncxe57lbdnm0wz55z5gsfyj"); // if ((ND_clustnode(n))) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("6ozgckb41ca6in9yzfq0crm2n"); // printstring(f, "node ", agcanonStr(agnameof(n))); UNSUPPORTED("ak0dknblcmy335eejoys3sed4"); // printpoint(f, ND_coord(n)); UNSUPPORTED("24wnni5tzo854h07k5nvx5gol"); // if (ND_label(n)->html) /* if html, get original text */ UNSUPPORTED("5v7xkqxikaisplm5ikh8r3nqt"); // lbl = agcanonStr (agxget(n, N_label)); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("4lp7ulk03cbfd74fntdhnjhwg"); // lbl = canon(agraphof(n),ND_label(n)->text); UNSUPPORTED("3qq8s43vgjtmmqm2nhgw8ckkh"); // printdouble(f, " ", ND_width(n)); UNSUPPORTED("1svrzqjfltl2z2zvq408sgp5i"); // printdouble(f, " ", ND_height(n)); UNSUPPORTED("dh1tm9c3mtoa85b2jswjy232b"); // printstring(f, " ", lbl); UNSUPPORTED("bbu711e99pf0awdc7walk1ash"); // printstring(f, " ", late_nnstring(n, N_style, "solid")); UNSUPPORTED("juoayk4fo9jnav4twks4lvdq"); // printstring(f, " ", ND_shape(n)->name); UNSUPPORTED("6vys4r600tnxruabjtc9ip8zc"); // printstring(f, " ", late_nnstring(n, N_color, "black")); UNSUPPORTED("9tfl41t0hcme4402ao005o4iw"); // fillcolor = late_nnstring(n, N_fillcolor, ""); UNSUPPORTED("8v7mu8czvxvalrzjt7rxk5wqt"); // if (fillcolor[0] == '\0') UNSUPPORTED("18cs50exnxhaoxg4rcq419d97"); // fillcolor = late_nnstring(n, N_color, "lightgrey"); UNSUPPORTED("1h3b7zm1rxpldq3b8yqiqymxm"); // printstring(f, " ", fillcolor); UNSUPPORTED("542qodky9o008e1zwnwm02oqu"); // agputc('\n', f); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("58nzhwg3jqygtpq3rebmvyc74"); // if (extend) { //assuming these two attrs have already been created by cgraph UNSUPPORTED("bdavy44dbcv1nyx41nbekylxj"); // if (!(tport = agget(e,"tailport"))) UNSUPPORTED("5340j92gan9stk3ve1c8tyffl"); // tport = ""; UNSUPPORTED("dui85dciz396tx1nm2tcenn8"); // if (!(hport = agget(e,"headport"))) UNSUPPORTED("66s3ixxwgu8j8jwtftmlmibsz"); // hport = ""; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("6lz4jsb3wjydmerovhij4cm45"); // tport = hport = ""; UNSUPPORTED("ciwbgm5llkn8yvebgo9ajni15"); // if (ED_spl(e)) { UNSUPPORTED("1ym7rnjyps0joztbpork4cmr0"); // splinePoints = 0; UNSUPPORTED("4ztb8xx60n4c30nzfp9xvzmi7"); // for (i = 0; i < ED_spl(e)->size; i++) { UNSUPPORTED("5r589l7f0762txb9jmcsnc4jh"); // bz = ED_spl(e)->list[i]; UNSUPPORTED("18zoydx6d28ahubjejtbowoay"); // splinePoints += bz.size; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("90igxdd8rew6udb0eyy1v09s4"); // printstring(f, NULL, "edge"); UNSUPPORTED("arznc8bj79lvgeb1ia4cex1dx"); // writenodeandport(f, agtail(e), tport); UNSUPPORTED("ddt8ixkkxnk5qtpv5quwjfn51"); // writenodeandport(f, aghead(e), hport); UNSUPPORTED("1joybg6h6uyx9yt6bxl9x93t0"); // printint(f, " ", splinePoints); UNSUPPORTED("4ztb8xx60n4c30nzfp9xvzmi7"); // for (i = 0; i < ED_spl(e)->size; i++) { UNSUPPORTED("5r589l7f0762txb9jmcsnc4jh"); // bz = ED_spl(e)->list[i]; UNSUPPORTED("a7ii1okn4acj9rrk02w1rtb5z"); // for (j = 0; j < bz.size; j++) UNSUPPORTED("dpc36d8cbwevs4a5kq50i1lc5"); // printpoint(f, bz.list[j]); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("8riu8zwrbqd66hl5vmy38w8wg"); // if (ED_label(e)) { UNSUPPORTED("co3kc4ees6plaqoyba4tib1ip"); // printstring(f, " ", canon(agraphof(agtail(e)),ED_label(e)->text)); UNSUPPORTED("5kqr2febrlj5731izptqm18dw"); // printpoint(f, ED_label(e)->pos); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6uv06ib11o1ih20o8ysxbxfi2"); // printstring(f, " ", late_nnstring(e, E_style, "solid")); UNSUPPORTED("p1ltgy42ln94e7td5cvqrzx"); // printstring(f, " ", late_nnstring(e, E_color, "black")); UNSUPPORTED("c0e150hwkub1iizmy6t6nhudh"); // agputc('\n', f); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c0wakh4sbgim9485buwdo1tl7"); // agputs("stop\n", f); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bd30kzlzww40ie6bgv51u6rk2 // static void set_record_rects(node_t * n, field_t * f, agxbuf * xb) public static Object set_record_rects(Object... arg) { UNSUPPORTED("4fmlf7jouscb1i4dw9b8fjypg"); // static void set_record_rects(node_t * n, field_t * f, agxbuf * xb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("ke8k3zlei9bz4cmrgv0t1ehz"); // if (f->n_flds == 0) { UNSUPPORTED("4qqwiqivbgrdzykqks6ne39uw"); // sprintf(buf, "%.5g,%.5g,%.5g,%.5g ", UNSUPPORTED("efsdpymwdfstqkzpg0uig902a"); // f->b.LL.x + ND_coord(n).x, UNSUPPORTED("6nvqcxczj7xtk46jnheoe3ugv"); // (Y_invert ? (Y_off - (f->b.LL.y + ND_coord(n).y)) : (f->b.LL.y + ND_coord(n).y)), UNSUPPORTED("2tgp65u179umpruiu4k20wo19"); // f->b.UR.x + ND_coord(n).x, UNSUPPORTED("34hwm9aoefcnkiey7t9s8x49g"); // (Y_invert ? (Y_off - (f->b.UR.y + ND_coord(n).y)) : (f->b.UR.y + ND_coord(n).y))); UNSUPPORTED("9ydwa2m63t3zy7qefxyronhnl"); // agxbput(xb, buf); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dnmh8bux7478sxj4ohw363vu8"); // for (i = 0; i < f->n_flds; i++) UNSUPPORTED("e2ys5uqyitl4018cltkyggevy"); // set_record_rects(n, f->fld[i], xb); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6y17ntp4jpt8vwwnlnjk268c3 // static void rec_attach_bb(graph_t * g, Agsym_t* bbsym, Agsym_t* lpsym, Agsym_t* lwsym, Agsym_t* lhsym) public static Object rec_attach_bb(Object... arg) { UNSUPPORTED("bivwdl6eiggv4njxg1280ro7s"); // static void rec_attach_bb(graph_t * g, Agsym_t* bbsym, Agsym_t* lpsym, Agsym_t* lwsym, Agsym_t* lhsym) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c; UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("2e0v7u9pfngzg11mt4kn3oudg"); // pointf pt; UNSUPPORTED("24lsaiss5p2l0eirgj2ai7xov"); // sprintf(buf, "%.5g,%.5g,%.5g,%.5g", GD_bb(g).LL.x, (Y_invert ? (Y_off - (GD_bb(g).LL.y)) : (GD_bb(g).LL.y)), UNSUPPORTED("8lsgjczd21sic1jbmzpui8cli"); // GD_bb(g).UR.x, (Y_invert ? (Y_off - (GD_bb(g).UR.y)) : (GD_bb(g).UR.y))); UNSUPPORTED("eny81csz71xjufztxhsg5a6vx"); // agxset(g, bbsym, buf); UNSUPPORTED("2wg259ve9d8rmxrgc6a8qd062"); // if (GD_label(g) && GD_label(g)->text[0]) { UNSUPPORTED("1m6bzr76atb9qs06n0g0bh7uc"); // pt = GD_label(g)->pos; UNSUPPORTED("6ajni604em6ax0fnds16ut28y"); // sprintf(buf, "%.5g,%.5g", pt.x, (Y_invert ? (Y_off - (pt.y)) : (pt.y))); UNSUPPORTED("5v5526f3x4jluohwqosaju0n7"); // agxset(g, lpsym, buf); UNSUPPORTED("5d2mg3o3jiz34mw8gf7ghjtud"); // pt = GD_label(g)->dimen; UNSUPPORTED("ebphmma02ajsj8c8y56220tc4"); // sprintf(buf, "%.2f", ((pt.x)/(double)72)); UNSUPPORTED("7153in9qcbkx5yvss4ovz899p"); // agxset (g, lwsym, buf); UNSUPPORTED("7xdpkqi3qd6pzfrxfpijuknae"); // sprintf(buf, "%.2f", ((pt.y)/(double)72)); UNSUPPORTED("aljvhjz27jmi14eg7l9p5af9u"); // agxset (g, lhsym, buf); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7z5fb6iyowsosn1hiz7opeoc6"); // for (c = 1; c <= GD_n_cluster(g); c++) UNSUPPORTED("dj0tj5vp5j7qurrz1bz75onyn"); // rec_attach_bb(GD_clust(g)[c], bbsym, lpsym, lwsym, lhsym); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9ja9vrwgmu7gq2ibxrroufg0i // void attach_attrs_and_arrows(graph_t* g, int* sp, int* ep) public static Object attach_attrs_and_arrows(Object... arg) { UNSUPPORTED("dnwn7idv047g47auyd9t9tvuu"); // void attach_attrs_and_arrows(graph_t* g, int* sp, int* ep) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ejbijsranjcsnebzqxgyniqmz"); // int e_arrows; /* graph has edges with end arrows */ UNSUPPORTED("d0xvc0uxedqt1upohbmcb1rxs"); // int s_arrows; /* graph has edges with start arrows */ UNSUPPORTED("dur3qp0989unhastq7adb67mm"); // int i, j, sides; UNSUPPORTED("8eqangdf1cya20k8l0pp5w6su"); // char buf[BUFSIZ]; /* Used only for small strings */ UNSUPPORTED("budqh0fjozcvw16kcfx9sau4o"); // unsigned char xbuffer[BUFSIZ]; /* Initial buffer for xb */ UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("bz0wmxtnzgka3zfovkbr7eozh"); // pointf ptf; UNSUPPORTED("bybp83bn7n2u6zbmxear1cz69"); // int dim3 = (GD_odim(g) >= 3); UNSUPPORTED("5k8cu60h53vpsotqw8cw6umck"); // Agsym_t* bbsym; UNSUPPORTED("bkbrhs9zyg2w478q8lbw7f0of"); // Agsym_t* lpsym; UNSUPPORTED("eai0rzppsmlzofk8gj75egcsx"); // Agsym_t* lwsym; UNSUPPORTED("c49j8t4h9n74p2h3imevghwgn"); // Agsym_t* lhsym; UNSUPPORTED("98b2uqnwq3rgamma244bsbrt1"); // gv_fixLocale (1); UNSUPPORTED("egwk53dbwqu1xswckndghrarj"); // e_arrows = s_arrows = 0; UNSUPPORTED("5k2g8l6h3qnzvhvq2dv1vn9sp"); // setYInvert(g); UNSUPPORTED("adti9zonvsoivju16of3xz2q1"); // agxbinit(&xb, BUFSIZ, xbuffer); UNSUPPORTED("4ikmwcydxd882urz65fh3odpf"); // safe_dcl(g, AGNODE, "pos", ""); UNSUPPORTED("1iwfu26cywaj02j8z5bso1glz"); // safe_dcl(g, AGNODE, "rects", ""); UNSUPPORTED("78np9dkmdvqba2olja9z7q52s"); // N_width = safe_dcl(g, AGNODE, "width", ""); UNSUPPORTED("781nwp1bndg5p2l0xhwogf1kv"); // N_height = safe_dcl(g, AGNODE, "height", ""); UNSUPPORTED("1grqx09xno74g0wdhra79ri49"); // safe_dcl(g, AGEDGE, "pos", ""); UNSUPPORTED("1z88oj214hkmshhtbjm9xb42b"); // if (GD_has_labels(g) & (1 << 4)) UNSUPPORTED("dftebq916itbaiobbsm7in3b3"); // safe_dcl(g, AGNODE, "xlp", ""); UNSUPPORTED("7d2dbjegkxavs980oua02l4ah"); // if (GD_has_labels(g) & (1 << 0)) UNSUPPORTED("9y62hmnfjg8pzstf8cf4fakp0"); // safe_dcl(g, AGEDGE, "lp", ""); UNSUPPORTED("aze047ifm9owcmyx71hsysdbc"); // if (GD_has_labels(g) & (1 << 5)) UNSUPPORTED("1zxunscbrzj8wm46zil76zlwp"); // safe_dcl(g, AGEDGE, "xlp", ""); UNSUPPORTED("9o41hpfnkkzxiqf6wmsulmacd"); // if (GD_has_labels(g) & (1 << 1)) UNSUPPORTED("akcqnrmeblk7fqxx6s2kz8adq"); // safe_dcl(g, AGEDGE, "head_lp", ""); UNSUPPORTED("cpnv97fkn07xq4zk0ujfs1ae5"); // if (GD_has_labels(g) & (1 << 2)) UNSUPPORTED("e3ddjafxmc4ecqmfz1c1h8pv3"); // safe_dcl(g, AGEDGE, "tail_lp", ""); UNSUPPORTED("3us71eou09pz1u9rz5m97f67t"); // if (GD_has_labels(g) & (1 << 3)) { UNSUPPORTED("50y83cd8joo9jld4oec1oglt0"); // lpsym = safe_dcl(g, AGRAPH, "lp", ""); UNSUPPORTED("bgud8t0dyysjpbmkgyi94zxec"); // lwsym = safe_dcl(g, AGRAPH, "lwidth", ""); UNSUPPORTED("20crancrkqhzwdqrmfab94oqs"); // lhsym = safe_dcl(g, AGRAPH, "lheight", ""); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6jbkl41xrfn9w5ev89lpfg1pf"); // bbsym = safe_dcl(g, AGRAPH, "bb", ""); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("3rf6ovz8idsnou2upedl0ugl4"); // if (dim3) { UNSUPPORTED("bgir6fgzucxltcpf123wxwa16"); // int k; UNSUPPORTED("5xf6shry4shqq37eqql1o7w0j"); // sprintf(buf, "%.5g,%.5g,%.5g", ND_coord(n).x, (Y_invert ? (Y_off - (ND_coord(n).y)) : (ND_coord(n).y)), 72*(ND_pos(n)[2])); UNSUPPORTED("6yihpqct3gh8dwu4mgetlg4hf"); // agxbput (&xb, buf); UNSUPPORTED("1imggzivuz8js4ab1wrwl598j"); // for (k = 3; k < GD_odim(g); k++) { UNSUPPORTED("5xfk3smfs37332xzr4zfie36z"); // sprintf(buf, ",%.5g", 72*(ND_pos(n)[k])); UNSUPPORTED("4w8zs2s0ndr19sged28fehnw"); // agxbput (&xb, buf); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("8nz5m2e5luayh47sthdw4jq7j"); // agset(n, "pos", (((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf))); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("brk9q6earum14zd1ygm3dqfyw"); // sprintf(buf, "%.5g,%.5g", ND_coord(n).x, (Y_invert ? (Y_off - (ND_coord(n).y)) : (ND_coord(n).y))); UNSUPPORTED("bbvxas0gcanqusf356ij0hdvv"); // agset(n, "pos", buf); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6vtdv0hwpck48rye7jgri3tey"); // sprintf(buf, "%.5g", ((ND_ht(n))/(double)72)); UNSUPPORTED("4xnatleaw6b1v9rrhz7k2s0x1"); // agxset(n, N_height, buf); UNSUPPORTED("77f3vv1tid826v62dudsmsee3"); // sprintf(buf, "%.5g", ((ND_lw(n) + ND_rw(n))/(double)72)); UNSUPPORTED("eyn81ub2dd36w000iwjiyrzrm"); // agxset(n, N_width, buf); UNSUPPORTED("1nfehzcu9dg4m0zqniggw0myh"); // if (ND_xlabel(n) && ND_xlabel(n)->set) { UNSUPPORTED("7ipswwekn8d70bxb6rug5y4hp"); // ptf = ND_xlabel(n)->pos; UNSUPPORTED("exegykphdodrspivicojucpbx"); // sprintf(buf, "%.5g,%.5g", ptf.x, (Y_invert ? (Y_off - (ptf.y)) : (ptf.y))); UNSUPPORTED("6zn9qfmyz9e7jg5cufudayxsc"); // agset(n, "xlp", buf); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("89kxkqxo5vgsnfp6dko6p6pog"); // if (strcmp(ND_shape(n)->name, "record") == 0) { UNSUPPORTED("ejjebp83rjnqais1mqq9v944o"); // set_record_rects(n, ND_shape_info(n), &xb); UNSUPPORTED("327ru6n1g104bv1jnlnil773m"); // agxbpop(&xb); /* get rid of last space */ UNSUPPORTED("22w4oia21mibvk38zr3dfutl"); // agset(n, "rects", (((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf))); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("hxnnyu0oel8vd9mag9h7xmqr"); // polygon_t *poly; UNSUPPORTED("a8amhiqvlp5s6vz8p4u2amapy"); // int i; UNSUPPORTED("di0sjpsaryzeog9lls9lo103j"); // if (N_vertices && isPolygon(n)) { UNSUPPORTED("1v0bedqdwts4r8i95bff8tjiw"); // poly = (polygon_t *) ND_shape_info(n); UNSUPPORTED("78f4jae5n959qkejff8eqbt10"); // sides = poly->sides; UNSUPPORTED("1ze2rhuc1ziuqtevmv36n7vg9"); // if (sides < 3) { UNSUPPORTED("b2wk16e1kkfimvcygieesvsi4"); // char *p = agget(n, "samplepoints"); UNSUPPORTED("7b41u5yplmu71fqi9va5filc3"); // if (p) UNSUPPORTED("9h2cka87unr4odf1v9m3riq9v"); // sides = atoi(p); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("159b2xvx2h490z3tb5r4kje9y"); // sides = 8; UNSUPPORTED("1nfexxm8zy4evpai9tvs8c29l"); // if (sides < 3) UNSUPPORTED("159b2xvx2h490z3tb5r4kje9y"); // sides = 8; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d0kx8fo90t25wy56mlmoj0upk"); // for (i = 0; i < sides; i++) { UNSUPPORTED("cb2w7wn5flzqkjy48yvxhf4i5"); // if (i > 0) UNSUPPORTED("ewzkk0b8qrzmah4ugls1nfqc4"); // ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)' '))); UNSUPPORTED("5zto6w00vkhhrctnf1e12kxzn"); // if (poly->sides >= 3) UNSUPPORTED("c5pttvar58bq9ozx95isk3zun"); // sprintf(buf, "%.5g %.5g", UNSUPPORTED("7nrde57g93yxd1fodhhr5dsa9"); // ((poly->vertices[i].x)/(double)72), UNSUPPORTED("ezyj9fkj618u9xhabzvtqwnme"); // (Y_invert ? (YF_off - (((poly->vertices[i].y)/(double)72))) : (((poly->vertices[i].y)/(double)72)))); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("c5pttvar58bq9ozx95isk3zun"); // sprintf(buf, "%.5g %.5g", UNSUPPORTED("92k6jkwawod7323cznpljnpr3"); // ND_width(n) / 2.0 * cos(i / (double) sides * M_PI * 2.0), UNSUPPORTED("adbjbhrbctg9kcmql1lnvxs7x"); // (Y_invert ? (YF_off - (ND_height(n) / 2.0 * sin(i /(double) sides * M_PI * 2.0))) : (ND_height(n) / 2.0 * sin(i /(double) sides * M_PI * 2.0)))); UNSUPPORTED("847q0ijh2jwoemzpqx3klzxya"); // agxbput(&xb, buf); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d0a4ljicq1ojcw1wkomut8ra3"); // agxset(n, N_vertices, (((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf))); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dq5fyvh8jd3qwgkppctvawmyz"); // if (State >= 1) { UNSUPPORTED("7yvyv13me3s32qvq3gfbyt283"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("84ix82wd8yx6m7f33pv0dvvie"); // if (ED_edge_type(e) == 6) UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue; UNSUPPORTED("76eoblp6hmutlj66fdb7b2es5"); // if (ED_spl(e) == NULL) UNSUPPORTED("8jvroo3mv0ny58gw5bxk345tu"); // continue; /* reported in postproc */ UNSUPPORTED("4ztb8xx60n4c30nzfp9xvzmi7"); // for (i = 0; i < ED_spl(e)->size; i++) { UNSUPPORTED("cb2w7wn5flzqkjy48yvxhf4i5"); // if (i > 0) UNSUPPORTED("f4jr2zjbfcrfi2i7m4klvpw19"); // ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)';'))); UNSUPPORTED("a4zikpd9ktj3rhtfgg7ur40h0"); // if (ED_spl(e)->list[i].sflag) { UNSUPPORTED("70hchi65xabvumigsszopretx"); // s_arrows = 1; UNSUPPORTED("7gl3coqupwm4eqee125qyj8ms"); // sprintf(buf, "s,%.5g,%.5g ", UNSUPPORTED("5vd53qn2sgcgm7igurohj8dpb"); // ED_spl(e)->list[i].sp.x, UNSUPPORTED("eyjso0d41ic749scoinp7q07f"); // (Y_invert ? (Y_off - (ED_spl(e)->list[i].sp.y)) : (ED_spl(e)->list[i].sp.y))); UNSUPPORTED("cnxo8k6a1zwn0s8ej64ag7gqb"); // agxbput(&xb, buf); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("525ym2s1yq555hhu8ig5jifbt"); // if (ED_spl(e)->list[i].eflag) { UNSUPPORTED("71ej0gajnah1tyqgc0ki81ef9"); // e_arrows = 1; UNSUPPORTED("9ad3jmqcigh7o1fgcmnsl60xz"); // sprintf(buf, "e,%.5g,%.5g ", UNSUPPORTED("107equizdxqqcykrel89pwnq7"); // ED_spl(e)->list[i].ep.x, UNSUPPORTED("6d2ixeiy3c29vamcc7tacvs3q"); // (Y_invert ? (Y_off - (ED_spl(e)->list[i].ep.y)) : (ED_spl(e)->list[i].ep.y))); UNSUPPORTED("cnxo8k6a1zwn0s8ej64ag7gqb"); // agxbput(&xb, buf); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("8apmnssx9axhnduv4rn7s925z"); // for (j = 0; j < ED_spl(e)->list[i].size; j++) { UNSUPPORTED("ecu1j70aegy6iur2yzsftmopq"); // if (j > 0) UNSUPPORTED("2r8deh8peb8qp7sbtrayoe9q6"); // ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)' '))); UNSUPPORTED("mpf9z7gpsd10qo0ays0lnghj"); // ptf = ED_spl(e)->list[i].list[j]; UNSUPPORTED("860g9wpq0occds1fws2qlhyf4"); // sprintf(buf, "%.5g,%.5g", ptf.x, (Y_invert ? (Y_off - (ptf.y)) : (ptf.y))); UNSUPPORTED("cnxo8k6a1zwn0s8ej64ag7gqb"); // agxbput(&xb, buf); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("96y4g6ydvjlmvi0265z8mdcav"); // agset(e, "pos", (((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf))); UNSUPPORTED("4s9k2d3zuxs0dor6s8h3gd6sj"); // if (ED_label(e)) { UNSUPPORTED("cjay1b2t98rmvjxrg50ofzaux"); // ptf = ED_label(e)->pos; UNSUPPORTED("2siw49n03h4pngznho2rjguds"); // sprintf(buf, "%.5g,%.5g", ptf.x, (Y_invert ? (Y_off - (ptf.y)) : (ptf.y))); UNSUPPORTED("apqtb2u056i3lf8ej7kmn3pis"); // agset(e, "lp", buf); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("b5ek5jn2c08qdmj3g8ed1wlvt"); // if (ED_xlabel(e) && ED_xlabel(e)->set) { UNSUPPORTED("32q9vbxljv1m2bcqs6hj2chos"); // ptf = ED_xlabel(e)->pos; UNSUPPORTED("2siw49n03h4pngznho2rjguds"); // sprintf(buf, "%.5g,%.5g", ptf.x, (Y_invert ? (Y_off - (ptf.y)) : (ptf.y))); UNSUPPORTED("5t3wfvr67hjnnnl7av3ydzfph"); // agset(e, "xlp", buf); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("8wb1kqodj9fqeq551yk3u8p09"); // if (ED_head_label(e)) { UNSUPPORTED("ayetvnkbpknd8tbnnxn8epqyr"); // ptf = ED_head_label(e)->pos; UNSUPPORTED("2siw49n03h4pngznho2rjguds"); // sprintf(buf, "%.5g,%.5g", ptf.x, (Y_invert ? (Y_off - (ptf.y)) : (ptf.y))); UNSUPPORTED("5679klilm2npeej7dtn4dxnfs"); // agset(e, "head_lp", buf); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7uo1i3pejmbd3fy8lytwyn8ub"); // if (ED_tail_label(e)) { UNSUPPORTED("9va9jaogd0l19cackxua13pob"); // ptf = ED_tail_label(e)->pos; UNSUPPORTED("2siw49n03h4pngznho2rjguds"); // sprintf(buf, "%.5g,%.5g", ptf.x, (Y_invert ? (Y_off - (ptf.y)) : (ptf.y))); UNSUPPORTED("2w6oh9jygs6jvv2vdda2jehpv"); // agset(e, "tail_lp", buf); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("apxmgxxwi65xd0ekyq3uq8jm7"); // rec_attach_bb(g, bbsym, lpsym, lwsym, lhsym); UNSUPPORTED("1at5m9ctjn3ukv5gqtfswik02"); // agxbfree(&xb); UNSUPPORTED("83ij4r5fzyhegi7bmu2gr8zut"); // if ((GD_flags(g) & 1)) UNSUPPORTED("c0oytwtlqucfw4t4mx524912"); // undoClusterEdges(g); UNSUPPORTED("a3kuneojcjx19vx76ucm594d1"); // *sp = s_arrows; UNSUPPORTED("5hf7szhpgvj1w0auvkgf3v1c3"); // *ep = e_arrows; UNSUPPORTED("bkwnwkliqxeb0zv9leq3mcdrx"); // gv_fixLocale (0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8vpe9ri22zhcgg6000ndr6ax2 // void attach_attrs(graph_t * g) public static Object attach_attrs(Object... arg) { UNSUPPORTED("51i23bz4lg6vdwfy1gfo3i8ui"); // void attach_attrs(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5hko5pg9q9xxal26qceow3e3r"); // int e, s; UNSUPPORTED("e0m1rbhl4fbpkkat4thb7fh3e"); // attach_attrs_and_arrows (g, &s, &e); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/pointset__c.java000066400000000000000000001016301312650303100224260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class pointset__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 6ddu6mrp88g3kun2w1gg8ck8t // typedef Dict_t PointSet //1 6t1gwljnc5qkhgkp9oc8y7lhm // typedef Dict_t PointMap //3 5u1whw7d6cpovx8f4xjmn3q6t // static pair *mkPair(point p) public static Object mkPair(Object... arg) { UNSUPPORTED("8774qe16oxygrbtltm1w8cupy"); // static pair *mkPair(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("949qczzi45w42hb4lf3jx1dac"); // pair *pp; UNSUPPORTED("1ijxfz8npazi18v9qr3bmsi26"); // pp = (pair*)zmalloc(sizeof(pair)); UNSUPPORTED("c6161ivk5k6aom7cjh0vxhilw"); // pp->id = p; UNSUPPORTED("7etsvryh248syh0l6ag8lcsi2"); // return pp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d62tsa65whwfps52l2x4w0gcb // static void freePair(Dt_t * d, pair* pp, Dtdisc_t * disc) public static Object freePair(Object... arg) { UNSUPPORTED("eqa1cxq331w4xa024fugqiivr"); // static void freePair(Dt_t * d, pair* pp, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c67zoo5sy2bsk6yv6ge8pkiqd"); // free (pp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6yfilil8pl8qgowenug9tjamy // static int cmppair(Dt_t * d, point * key1, point * key2, Dtdisc_t * disc) public static Object cmppair(Object... arg) { UNSUPPORTED("271uorrb28yvn44o8bok8s67k"); // static int cmppair(Dt_t * d, point * key1, point * key2, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("abkab041775ecn23z9ztbxe8"); // if (key1->x > key2->x) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("1od3mcl1r6qkz58queqlqsqpf"); // else if (key1->x < key2->x) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("9t8b67k30mtg92rtfjppxdiqp"); // else if (key1->y > key2->y) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("ez745dtgncmak5md2emlylbyf"); // else if (key1->y < key2->y) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 243qu49nd4znemfi9dovzqnnf // static Dtdisc_t intPairDisc = //3 9ocn9xjre9dbuxzr4rimpmdyu // PointSet *newPS(void) public static Object newPS(Object... arg) { UNSUPPORTED("2ml9ujrnhdzca443cb0fyqi3a"); // PointSet *newPS(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4qfk5483zwj8sh8bd61gnkw90"); // return (dtopen(&intPairDisc, Dtoset)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 29w0qfptg5fcqe7pa9ysxxf24 // void freePS(PointSet * ps) public static Object freePS(Object... arg) { UNSUPPORTED("71shzndr8ybq7rfcz3bynfzeo"); // void freePS(PointSet * ps) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2n41ueuz6jf5hzwovomkvnu9e"); // dtclose(ps); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 26czecxd19r4jts5801e0p3yc // void insertPS(PointSet * ps, point pt) public static Object insertPS(Object... arg) { UNSUPPORTED("4kpo3ahry423trlfw0gnl85ci"); // void insertPS(PointSet * ps, point pt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5nz7va2hisdu765559aff39g1"); // (*(((Dt_t*)(ps))->searchf))((ps),(void*)(mkPair(pt)),0000001); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 51pe8vz30p5qyolmqe83g2qp4 // void addPS(PointSet * ps, int x, int y) public static Object addPS(Object... arg) { UNSUPPORTED("22800higm8gm7pzqh3d7l1e2x"); // void addPS(PointSet * ps, int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("tkw5izt69wl0695g5qfi9sug"); // point pt; UNSUPPORTED("4x5drjd0ygppv2k94igpp68s2"); // pt.x = x; UNSUPPORTED("e8848u2pml7agv3q6uepcvysp"); // pt.y = y; UNSUPPORTED("5nz7va2hisdu765559aff39g1"); // (*(((Dt_t*)(ps))->searchf))((ps),(void*)(mkPair(pt)),0000001); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9wqik179vnp2mvf748gomlz2e // int inPS(PointSet * ps, point pt) public static Object inPS(Object... arg) { UNSUPPORTED("5hbcg2znnaj54e6noysf3bjkd"); // int inPS(PointSet * ps, point pt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1fnwnz6zqrixdpfmd5wf4hbj"); // pair p; UNSUPPORTED("cfcpmjsvjh9kkbol5hagtik3w"); // p.id = pt; UNSUPPORTED("5le2jlc1ullqn6yncxrgtjuzn"); // return (((*(((Dt_t*)(ps))->searchf))((ps),(void*)(&p),0000004)) ? 1 : 0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 evzua6crsnsens9sqn79g9870 // int isInPS(PointSet * ps, int x, int y) public static Object isInPS(Object... arg) { UNSUPPORTED("9y52o7s1azdpjw0ir8bdiwrbi"); // int isInPS(PointSet * ps, int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1fnwnz6zqrixdpfmd5wf4hbj"); // pair p; UNSUPPORTED("52ncbg9utggt2faggxp64yv9b"); // p.id.x = x; UNSUPPORTED("toamtyw5y1n24o6f8bhjebdy"); // p.id.y = y; UNSUPPORTED("5le2jlc1ullqn6yncxrgtjuzn"); // return (((*(((Dt_t*)(ps))->searchf))((ps),(void*)(&p),0000004)) ? 1 : 0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3ge6wmj43n8wltcu9mvdgbi8e // int sizeOf(PointSet * ps) public static Object sizeOf(Object... arg) { UNSUPPORTED("2hufnw5gxr78twqy79iwbk5qi"); // int sizeOf(PointSet * ps) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("fud5wl6c5377lz88jk8tl6df"); // return dtsize(ps); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aeabbplwi8b2jltr3hvo2u8fb // point *pointsOf(PointSet * ps) public static Object pointsOf(Object... arg) { UNSUPPORTED("5j2nt4yoll5o04ukqeothfm7e"); // point *pointsOf(PointSet * ps) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("xvfbbvpdrw2pj8y5iunrhdpx"); // int n = dtsize(ps); UNSUPPORTED("66nhf1xm3n33tb1a1afyoiz72"); // point *pts = (point*)zmalloc((n)*sizeof(point)); UNSUPPORTED("1mayx1pkq8tvo6q1tohbs7h0g"); // pair *p; UNSUPPORTED("dgxbjvgw9qxehkxtda1tet15c"); // point *pp = pts; UNSUPPORTED("bopn0x0e9kwopvngvt1ggj0bj"); // for (p = (pair *) dtflatten(ps); p; UNSUPPORTED("cltw13cfus3lhfrqbub1nj9ww"); // p = (pair *) (((Dtlink_t*)((Dtlink_t *) p))->right)) { UNSUPPORTED("es42e0byxv0h2addzvnno11dr"); // *pp++ = p->id; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b7gk8q1reftzri269holggnig"); // return pts; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2zdq8hmprgvlbkb09tw060z4j // static mpair *mkMPair(Dt_t * d, mpair * obj, MPairDisc * disc) public static Object mkMPair(Object... arg) { UNSUPPORTED("8od4qepxjbrd0npy2p4n525sz"); // static mpair *mkMPair(Dt_t * d, mpair * obj, MPairDisc * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a7ax19rlpmk0gq5o135ekyj2v"); // mpair *ap; UNSUPPORTED("8i0h2wv8nzchq7me2yzoi2rr5"); // if (disc->flist) { UNSUPPORTED("871yli6br2bisjn57hntpk5yv"); // ap = disc->flist; UNSUPPORTED("e0e4d714en0fts1w9blmyus01"); // disc->flist = (mpair *) (ap->link.right); UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("8bghtazkctx5rd8x5dq7ct6kh"); // ap = (mpair*)gmalloc(sizeof(mpair)); UNSUPPORTED("awhqwbhvta5lu28gdja4ksrif"); // ap->id = obj->id; UNSUPPORTED("8yz7tznfa5mz9e10s49okhrqq"); // ap->v = obj->v; UNSUPPORTED("b8cimfvcp1vea97hyfr4m9nix"); // return ap; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4acokeswbf1tb04pl4x0e7a2 // static void freeMPair(Dt_t * d, mpair * ap, MPairDisc * disc) public static Object freeMPair(Object... arg) { UNSUPPORTED("234rcu0vknevmhn0uh86si0tf"); // static void freeMPair(Dt_t * d, mpair * ap, MPairDisc * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8f3y7fxkt4aacm3xtya6wj1qr"); // ap->link.right = (Dtlink_t *) (disc->flist); UNSUPPORTED("8kjj5z628cqd2mpt0nfjhua8i"); // disc->flist = ap; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 clfs1fabh7ggsvjwcvqnajr0u // static Dtdisc_t intMPairDisc = //3 5j9qyf3v639puci6eatfrwzbf // PointMap *newPM(void) public static Object newPM(Object... arg) { UNSUPPORTED("55sisdyi5acf47jzlgf66tpl3"); // PointMap *newPM(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ph32cws293ik0oys5o4ueitl"); // MPairDisc *dp = (MPairDisc*)gmalloc(sizeof(MPairDisc)); UNSUPPORTED("cfbg00sb8qjccviqalrgp0k65"); // dp->disc = intMPairDisc; UNSUPPORTED("90um1p64u4fyns1gneihfsdq2"); // dp->flist = 0; UNSUPPORTED("7uvu2bzpmwxljh7nt92ruvcol"); // return (dtopen(&(dp->disc), Dtoset)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dv0ah723569ocd3e8mnooplao // void clearPM(PointMap * ps) public static Object clearPM(Object... arg) { UNSUPPORTED("2r2uzvpk2gdjomc1z43diai2d"); // void clearPM(PointMap * ps) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dllfzfavloye8gtk0xaf8dkeo"); // (*(((Dt_t*)(ps))->searchf))((ps),(void*)(0),0000100); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5yylsqhjsyk8492nxg8eobgti // void freePM(PointMap * ps) public static Object freePM(Object... arg) { UNSUPPORTED("3d86luffldotezrdyszgzw3l7"); // void freePM(PointMap * ps) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6oeyeh6rkvtb5yfmicbm755jy"); // MPairDisc *dp = (MPairDisc *) (ps->disc); UNSUPPORTED("176wj0v35v3l53swpcwby8zuu"); // mpair *p; UNSUPPORTED("9u5hxm3hr0dfus7fhehuqdp2f"); // mpair *next; UNSUPPORTED("2n41ueuz6jf5hzwovomkvnu9e"); // dtclose(ps); UNSUPPORTED("dsb15bo7g6d9d1e8fhj2mur10"); // for (p = dp->flist; p; p = next) { UNSUPPORTED("df45pyg1n8tee551mx3v6677q"); // next = (mpair *) (p->link.right); UNSUPPORTED("cy5x5dma0v4hiepir7lrfuo17"); // free(p); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("78g8evdxoh4d3gncvp2jcafxm"); // free(dp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6g6s614i42e0o2y63uuxg1eti // int updatePM(PointMap * pm, int x, int y, int v) public static Object updatePM(Object... arg) { UNSUPPORTED("wqd0pwasc8h44kp424gjsy0l"); // int updatePM(PointMap * pm, int x, int y, int v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("176wj0v35v3l53swpcwby8zuu"); // mpair *p; UNSUPPORTED("1p95im01jnitld3s790sv5fnx"); // mpair dummy; UNSUPPORTED("aqvur770zqpckwsqkcelmntsw"); // int old; UNSUPPORTED("12hvr7ilrqa35kjntuwgshfnx"); // dummy.id.x = x; UNSUPPORTED("1nursujxr7qsg0kgumb48rv91"); // dummy.id.y = y; UNSUPPORTED("lrm57wmjqy47ubrh2aaj8zyj"); // dummy.v = v; UNSUPPORTED("2v0q67ylfpp0lz69ee8po35uh"); // p = (*(((Dt_t*)(pm))->searchf))((pm),(void*)(&dummy),0000001); UNSUPPORTED("2cvqyi58pru3tbg96x36qrw6u"); // old = p->v; UNSUPPORTED("5eou6l5nll8srjedmdlpnyxk6"); // p->v = v; UNSUPPORTED("1h4i0djjoipq1eaw0s2g163jp"); // return old; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 edyucrjzf4bhg6ob6rbj6omrk // int insertPM(PointMap * pm, int x, int y, int v) public static Object insertPM(Object... arg) { UNSUPPORTED("27rtedlaes5upd9o92eg8lsx6"); // int insertPM(PointMap * pm, int x, int y, int v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("176wj0v35v3l53swpcwby8zuu"); // mpair *p; UNSUPPORTED("1p95im01jnitld3s790sv5fnx"); // mpair dummy; UNSUPPORTED("12hvr7ilrqa35kjntuwgshfnx"); // dummy.id.x = x; UNSUPPORTED("1nursujxr7qsg0kgumb48rv91"); // dummy.id.y = y; UNSUPPORTED("lrm57wmjqy47ubrh2aaj8zyj"); // dummy.v = v; UNSUPPORTED("2v0q67ylfpp0lz69ee8po35uh"); // p = (*(((Dt_t*)(pm))->searchf))((pm),(void*)(&dummy),0000001); UNSUPPORTED("1qvo8bdep1ocakhfxstvnkdmy"); // return p->v; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/postproc__c.java000066400000000000000000001717721312650303100224500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static gen.lib.cgraph.edge__c.agfstout; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agnxtout; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.cgraph.id__c.agnameof; import static gen.lib.cgraph.node__c.agfstnode; import static gen.lib.cgraph.node__c.agnxtnode; import static gen.lib.cgraph.obj__c.agroot; import static gen.lib.common.geom__c.ccwrotatepf; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.ED_edge_type; import static smetana.core.Macro.ED_head_label; import static smetana.core.Macro.ED_label; import static smetana.core.Macro.ED_spl; import static smetana.core.Macro.ED_tail_label; import static smetana.core.Macro.ED_xlabel; import static smetana.core.Macro.GD_bb; import static smetana.core.Macro.GD_border; import static smetana.core.Macro.GD_clust; import static smetana.core.Macro.GD_flags; import static smetana.core.Macro.GD_flip; import static smetana.core.Macro.GD_has_labels; import static smetana.core.Macro.GD_label; import static smetana.core.Macro.GD_label_pos; import static smetana.core.Macro.GD_n_cluster; import static smetana.core.Macro.GD_rankdir; import static smetana.core.Macro.N; import static smetana.core.Macro.ND_coord; import static smetana.core.Macro.ND_xlabel; import static smetana.core.Macro.NOT; import static smetana.core.Macro.UNSUPPORTED; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.Agsym_s; import h.ST_boxf; import h.bezier; import h.boxf; import h.label_params_t; import h.object_t; import h.pointf; import h.textlabel_t; import h.xlabel_t; import smetana.core.JUtils; import smetana.core.Z; import smetana.core.__struct__; public class postproc__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 1b0s7t28jl5ftrxccb8fsopp4 // static int Rankdir //private static int Rankdir; //1 3oo1lt5jtd6kuqjr6qqlnkutt // static boolean Flip //private static boolean Flip; //1 ejooa1m5uoq0ue852wtuerpy // static pointf Offset //private final static __struct__ Offset = JUtils.from(pointf.class); //3 dajapw16wus3rwimkrk5ihi2b // static pointf map_point(pointf p) public static __struct__ map_point(final __struct__ p) { // WARNING!! STRUCT return map_point_w_(p.copy()).copy(); } private static __struct__ map_point_w_(final __struct__ p) { ENTERING("dajapw16wus3rwimkrk5ihi2b","map_point"); try { p.___(ccwrotatepf(p, Z.z().Rankdir * 90)); p.setDouble("x", p.getDouble("x") - Z.z().Offset.getDouble("x")); p.setDouble("y", p.getDouble("y") - Z.z().Offset.getDouble("y")); return p; } finally { LEAVING("dajapw16wus3rwimkrk5ihi2b","map_point"); } } //3 bvq3vvonvotn47mfe5zsvchie // static void map_edge(edge_t * e) public static void map_edge(Agedge_s e) { ENTERING("bvq3vvonvotn47mfe5zsvchie","map_edge"); try { int j, k; final __struct__ bz = JUtils.from(bezier.class); if (ED_spl(e) == null) { if ((Z.z().Concentrate == false) && (ED_edge_type(e) != 6)) System.err.println("lost %s %s edge\n"+ agnameof(agtail(e))+ agnameof(aghead(e))); return; } for (j = 0; j < ED_spl(e).getInt("size"); j++) { bz.___(ED_spl(e).getArrayOfPtr("list").plus(j).getStruct()); for (k = 0; k < bz.getInt("size"); k++) { bz.getArrayOfPtr("list").plus(k).setStruct(map_point(bz.getArrayOfPtr("list").plus(k).getStruct())); } if (bz.getBoolean("sflag")) UNSUPPORTED("7894dgzvk2um2w1a5ph2r0bcc"); // ED_spl(e)->list[j].sp = map_point(ED_spl(e)->list[j].sp); if (bz.getBoolean("eflag")) { ED_spl(e).getArrayOfPtr("list").plus(j).getStruct("ep").___(map_point(ED_spl(e).getArrayOfPtr("list").plus(j).getStruct("ep"))); } } if (ED_label(e)!=null) ED_label(e).getStruct("pos").___(map_point(ED_label(e).getStruct("pos"))); if (ED_xlabel(e)!=null) UNSUPPORTED("al3tnq9zjjqeq1ll7qdxyu3ja"); // ED_xlabel(e)->pos = map_point(ED_xlabel(e)->pos); /* vladimir */ if (ED_head_label(e)!=null) UNSUPPORTED("6ntujaf13k6emf6cuf7ox8ath"); // ED_head_label(e)->pos = map_point(ED_head_label(e)->pos); if (ED_tail_label(e)!=null) UNSUPPORTED("2is3ug7jbugrkl9bu6nfnz2lt"); // ED_tail_label(e)->pos = map_point(ED_tail_label(e)->pos); } finally { LEAVING("bvq3vvonvotn47mfe5zsvchie","map_edge"); } } //3 a3hf82rxsojxbunj6p8a6bkse // void translate_bb(graph_t * g, int rankdir) public static void translate_bb(Agraph_s g, int rankdir) { ENTERING("a3hf82rxsojxbunj6p8a6bkse","translate_bb"); try { int c; final ST_boxf bb = new ST_boxf(), new_bb = new ST_boxf(); bb.___(GD_bb(g)); if (rankdir == 1 || rankdir == 2) { UNSUPPORTED("d4wrtj0h7lkb0e0vernd9czq9"); // new_bb.LL = map_point(pointfof(bb.LL.x, bb.UR.y)); UNSUPPORTED("crysiae5zxc69cj3v2ygfs8xn"); // new_bb.UR = map_point(pointfof(bb.UR.x, bb.LL.y)); } else { new_bb.LL.___(map_point(pointfof(bb.LL.x, bb.LL.y))); new_bb.UR.___(map_point(pointfof(bb.UR.x, bb.UR.y))); } GD_bb(g).___(new_bb); if (GD_label(g)!=null) { GD_label(g).setStruct("pos", map_point(GD_label(g).getStruct("pos"))); } for (c = 1; c <= GD_n_cluster(g); c++) translate_bb((Agraph_s) GD_clust(g).plus(c).getPtr(), rankdir); } finally { LEAVING("a3hf82rxsojxbunj6p8a6bkse","translate_bb"); } } //3 h4i5qxnd7hlrew919abswd13 // static void translate_drawing(graph_t * g) public static void translate_drawing(Agraph_s g) { ENTERING("h4i5qxnd7hlrew919abswd13","translate_drawing"); try { Agnode_s v; Agedge_s e; boolean shift = (Z.z().Offset.getDouble("x")!=0.0 || Z.z().Offset.getDouble("y")!=0.0); if (N(shift) && N(Z.z().Rankdir)) return; for (v = agfstnode(g); v!=null; v = agnxtnode(g, v)) { if (Z.z().Rankdir!=0) UNSUPPORTED("e0j848r4j1j7sojfht5gwikvi"); // gv_nodesize(v, 0); ND_coord(v).___(map_point(ND_coord(v))); if (ND_xlabel(v)!=null) UNSUPPORTED("3fy0l7w2v24hzrvlpstpknwl7"); // ND_xlabel(v)->pos = map_point(ND_xlabel(v)->pos); if (Z.z().State == 1) for (e = agfstout(g, v); e!=null; e = agnxtout(g, e)) map_edge(e); } translate_bb(g, GD_rankdir(g)); } finally { LEAVING("h4i5qxnd7hlrew919abswd13","translate_drawing"); } } //3 52s5qfdn5zxeyuodfq8tgxwaa // static void place_root_label(graph_t * g, pointf d) public static Object place_root_label(Object... arg) { UNSUPPORTED("8m0j9ogp2h20aphxjuxn7copg"); // static void place_root_label(graph_t * g, pointf d) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("2gqofhemdqlul2pxjvuyly8gr"); // if (GD_label_pos(g) & 4) { UNSUPPORTED("5y20n2wgxe7hnzxnkg9144bhl"); // p.x = GD_bb(g).UR.x - d.x / 2; UNSUPPORTED("2892hrfudeikl7o70w4nofhny"); // } else if (GD_label_pos(g) & 2) { UNSUPPORTED("2wafl9f5ytdr13m270aknhkub"); // p.x = GD_bb(g).LL.x + d.x / 2; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("aktxwmc3uefegw0cs334i9dw8"); // p.x = (GD_bb(g).LL.x + GD_bb(g).UR.x) / 2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dpev8t1rdycpdnwjscmowsvaf"); // if (GD_label_pos(g) & 1) { UNSUPPORTED("1d6n5uhjoy1y3mfj3ddrdt6rc"); // p.y = GD_bb(g).UR.y - d.y / 2; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("d6z40q4ju0vq45te2z2prcsua"); // p.y = GD_bb(g).LL.y + d.y / 2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dgs75zvkk4komxfg61cia1t82"); // GD_label(g)->pos = p; UNSUPPORTED("8dkewv20cdne73egfv2tn37lb"); // GD_label(g)->set = NOT(0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2i713kmewjct2igf3lwm80462 // static pointf centerPt (xlabel_t* xlp) public static Object centerPt(Object... arg) { UNSUPPORTED("2zzd7mrm2u540dwuyzehozffj"); // static pointf UNSUPPORTED("1pd2hqj3zbktacr9dt2vdvkgr"); // centerPt (xlabel_t* xlp) { UNSUPPORTED("3f7r93jimpwvyc6atnkppttgl"); // pointf p; UNSUPPORTED("6jtpe3khjpc9oogxx6kerapem"); // p = xlp->pos; UNSUPPORTED("7rsewd63gsf3h9d5aj5v7x66c"); // p.x += (xlp->sz.x)/2.0; UNSUPPORTED("3c70xgshcb3nvyi64kr041yjz"); // p.y += (xlp->sz.y)/2.0; UNSUPPORTED("bft6601q2uop0mu5y59jg4c81"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2ozwtuocg4cz5ghqemmche3vt // static int printData (object_t* objs, int n_objs, xlabel_t* lbls, int n_lbls, label_params_t* params) public static Object printData(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("ckiu0galpa1852h3cty8ba6r7"); // printData (object_t* objs, int n_objs, xlabel_t* lbls, int n_lbls, UNSUPPORTED("dzs60ka6anviw625w47fdcq2z"); // label_params_t* params) { UNSUPPORTED("327a0i7b6rqjqj8wdl0h29mnc"); // int i; UNSUPPORTED("2v2z0ng0lije7nd5xnnwpvhsk"); // xlabel_t* xp; UNSUPPORTED("8b4vu28i0jzto8xj8y5xidmfi"); // fprintf (stderr, "%d objs %d xlabels force=%d bb=(%.02f,%.02f) (%.02f,%.02f)\n", UNSUPPORTED("4brfvoc74eb0wrjbv0jim84br"); // n_objs, n_lbls, params->force, params->bb.LL.x, params->bb.LL.y, UNSUPPORTED("bg9iybxqjpzhrq7ake4qd022a"); // params->bb.UR.x, params->bb.UR.y); UNSUPPORTED("cqr6z8w761iogdatyx6tujxrj"); // if (Verbose < 2) return 0; UNSUPPORTED("3k661zowi8f52at88thx4gq3c"); // fprintf(stderr, "objects\n"); UNSUPPORTED("a0du2scf7lcyviw12x1mpntj5"); // for (i = 0; i < n_objs; i++) { UNSUPPORTED("7ljpm4lk7dhgz8jneyiurqcqj"); // xp = objs->lbl; UNSUPPORTED("6synbitl0b8qre39c8hfx9ji7"); // fprintf (stderr, " [%d] (%.02f,%.02f) (%.02f,%.02f) %p \"%s\"\n", UNSUPPORTED("5fncs0x8f05ep5nr4lds4lyfi"); // i, objs->pos.x,objs->pos.y,objs->sz.x,objs->sz.y, objs->lbl, UNSUPPORTED("csy4r7zdyqrnbp3yvfpm66w59"); // (xp?((textlabel_t*)(xp->lbl))->text:"")); UNSUPPORTED("bd3gftycfqozopsoe1ptqueov"); // objs++; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("2kq3xkqpgi5kr4141ab3bukkd"); // fprintf(stderr, "xlabels\n"); UNSUPPORTED("9dzxzlqrz9th6wohjjvd93rtd"); // for (i = 0; i < n_lbls; i++) { UNSUPPORTED("6e093u52b50denwzlx0m7a36a"); // fprintf (stderr, " [%d] %p set %d (%.02f,%.02f) (%.02f,%.02f) %s\n", UNSUPPORTED("bb908gbwccyotc72hfeopef2e"); // i, lbls, lbls->set, lbls->pos.x,lbls->pos.y, lbls->sz.x,lbls->sz.y, ((textlabel_t*)lbls->lbl)->text); UNSUPPORTED("30hn2ulrrh2sxlt3rd89e1nja"); // lbls++; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("bid671dovx1rdiquw5vm3fttj"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 95pnpuiq4khinrz2bqkci9nfg // static pointf edgeTailpoint (Agedge_t* e) public static Object edgeTailpoint(Object... arg) { UNSUPPORTED("2zzd7mrm2u540dwuyzehozffj"); // static pointf UNSUPPORTED("b5i1gh69zn27sn9j8kpmvtbeb"); // edgeTailpoint (Agedge_t* e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6tl9mepc2bett364jduh2q4mf"); // splines *spl; UNSUPPORTED("3hs99atzl1l857khumt6ycmbh"); // bezier *bez; UNSUPPORTED("26m18ntdxgq9wp5vlh2x7auh5"); // if ((spl = getsplinepoints(e)) == NULL) { UNSUPPORTED("9wdrv4uc4c7ssn0qpmxgz5eu1"); // pointf p; UNSUPPORTED("ezy0ey6dn5uqp6peuorn615x6"); // p.x = p.y = 0; UNSUPPORTED("68kasxgknec72r19lohbk6n3q"); // return p; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4djdvk87infum4r43tuhnm5mp"); // bez = &spl->list[0]; UNSUPPORTED("45rq0m21hutb3z6f4npw7ke9f"); // if (bez->sflag) { UNSUPPORTED("9ttezx014gi1oy9xopnihsnac"); // return bez->sp; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("c00cyqleu301qclgim7szyf7"); // return bez->list[0]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 av67wf2xi70ncgl90j1ttrjjs // static pointf edgeHeadpoint (Agedge_t* e) public static Object edgeHeadpoint(Object... arg) { UNSUPPORTED("2zzd7mrm2u540dwuyzehozffj"); // static pointf UNSUPPORTED("ckf4uk77aptax4a60w2nhrdzl"); // edgeHeadpoint (Agedge_t* e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6tl9mepc2bett364jduh2q4mf"); // splines *spl; UNSUPPORTED("3hs99atzl1l857khumt6ycmbh"); // bezier *bez; UNSUPPORTED("26m18ntdxgq9wp5vlh2x7auh5"); // if ((spl = getsplinepoints(e)) == NULL) { UNSUPPORTED("9wdrv4uc4c7ssn0qpmxgz5eu1"); // pointf p; UNSUPPORTED("ezy0ey6dn5uqp6peuorn615x6"); // p.x = p.y = 0; UNSUPPORTED("68kasxgknec72r19lohbk6n3q"); // return p; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("mjw3aaq1rghmemky1iymklp4"); // bez = &spl->list[spl->size - 1]; UNSUPPORTED("5g1i4pbq9il9iba3urs6bxfa0"); // if (bez->eflag) { UNSUPPORTED("5vt6gwb8d8689fuwqbt5uhb12"); // return bez->ep; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("6qzm0hh4pxrspfbvxearcz9z8"); // return bez->list[bez->size - 1]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1ca6fh8ns5bgzfzcz8al4eh4k // static boxf adjustBB (object_t* objp, boxf bb) public static Object adjustBB(Object... arg) { UNSUPPORTED("d5qt6s97burjfu5qe0oxyyrmr"); // static boxf UNSUPPORTED("2gtud943baz3kfj1vqqhjeaj4"); // adjustBB (object_t* objp, boxf bb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1ilrhzyqh05f2u3j3vzg0ys8u"); // pointf ur; UNSUPPORTED("a4qac74i3mtrli231q9zmy8pn"); // /* Adjust bounding box */ UNSUPPORTED("cgmwicrpoafwh8qt3zob8r2ye"); // bb.LL.x = MIN(bb.LL.x, objp->pos.x); UNSUPPORTED("dqb32jehkpiyfzbiwusv0ex1n"); // bb.LL.y = MIN(bb.LL.y, objp->pos.y); UNSUPPORTED("coywjj9bhu737b59inwiumkbc"); // ur.x = objp->pos.x + objp->sz.x; UNSUPPORTED("4zg7x4gv3ox92n323b2vzaq32"); // ur.y = objp->pos.y + objp->sz.y; UNSUPPORTED("p351si3o2tnvdcb1o5i8et1b"); // bb.UR.x = MAX(bb.UR.x, ur.x); UNSUPPORTED("4a11bd6b7vdmcwc7r71y9k37z"); // bb.UR.y = MAX(bb.UR.y, ur.y); UNSUPPORTED("5v5hh30squmit8o2i5hs25eig"); // return bb; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3mefe722uemyoa0czmkkw6hjb // static void addXLabel (textlabel_t* lp, object_t* objp, xlabel_t* xlp, int initObj, pointf pos) public static Object addXLabel(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("as13cbda9pe3uxi34emdcyw49"); // addXLabel (textlabel_t* lp, object_t* objp, xlabel_t* xlp, int initObj, pointf pos) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("47i4tbdfy05npmfnxoa2ljezv"); // if (initObj) { UNSUPPORTED("4brnnjtxt9czl9vlvf1hi62hq"); // objp->sz.x = 0; UNSUPPORTED("8vps14u07wyyud2ryypqvjgog"); // objp->sz.y = 0; UNSUPPORTED("eiw9ykn654ml54rs1bw0lf55b"); // objp->pos = pos; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7e3xcf5dxjm2knry7yygcx3zv"); // if (Flip) { UNSUPPORTED("99tzt7erbvtfsbo0jbdz0lc8m"); // xlp->sz.x = lp->dimen.y; UNSUPPORTED("6v5t3ysaisj27bwc0r9zg3rpd"); // xlp->sz.y = lp->dimen.x; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("3fr3ccpgshd8wywufcfat4rf5"); // xlp->sz = lp->dimen; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("jd8wxj8hvqwupmayd743a386"); // xlp->lbl = lp; UNSUPPORTED("1z3b8kb1emm8lvcqvu8sm8r7j"); // xlp->set = 0; UNSUPPORTED("a1r2pwxgnrpltol41p04axtld"); // objp->lbl = xlp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dwxd5kvlanbcxqfuncjg0ea54 // static boxf addLabelObj (textlabel_t* lp, object_t* objp, boxf bb) public static Object addLabelObj(Object... arg) { UNSUPPORTED("d5qt6s97burjfu5qe0oxyyrmr"); // static boxf UNSUPPORTED("9yg6tco97jfdkxvya77inw8xx"); // addLabelObj (textlabel_t* lp, object_t* objp, boxf bb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7e3xcf5dxjm2knry7yygcx3zv"); // if (Flip) { UNSUPPORTED("6z2yrwq81gtsk3q9c5pofow1x"); // objp->sz.x = lp->dimen.y; UNSUPPORTED("8xsm9kavrekjrsydqe1wh1pu"); // objp->sz.y = lp->dimen.x; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("40zw1ce6j4iw8dzvp9musrk6g"); // objp->sz.x = lp->dimen.x; UNSUPPORTED("3kmv74u3ihq63ptaixci1tlt5"); // objp->sz.y = lp->dimen.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ekb3vmkpcdegpnlbuvebyijm8"); // objp->pos = lp->pos; UNSUPPORTED("6c49iw60twquhten0558iva1c"); // objp->pos.x -= (objp->sz.x) / 2.0; UNSUPPORTED("alrfakfz0nqemd3xl3m9q2gm4"); // objp->pos.y -= (objp->sz.y) / 2.0; UNSUPPORTED("5r3oym45e21gwxn3nsjucxlbi"); // return adjustBB(objp, bb); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b8tjygxnwny5qoiir1mha1d62 // static boxf addNodeObj (node_t* np, object_t* objp, boxf bb) public static Object addNodeObj(Object... arg) { UNSUPPORTED("d5qt6s97burjfu5qe0oxyyrmr"); // static boxf UNSUPPORTED("cdh6qqtv45t605q7je7xomi2j"); // addNodeObj (node_t* np, object_t* objp, boxf bb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7e3xcf5dxjm2knry7yygcx3zv"); // if (Flip) { UNSUPPORTED("1ri5uimcd1z58iix8tp528l1m"); // objp->sz.x = ((ND_height(np))*(double)72); UNSUPPORTED("6r5gwwhz3sjxrssh8yo3v5c3v"); // objp->sz.y = ((ND_width(np))*(double)72); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("6cuxjl9g4nxwyz58c201qdb94"); // objp->sz.x = ((ND_width(np))*(double)72); UNSUPPORTED("e3zk2j9kbexxv2xbsgu3pser6"); // objp->sz.y = ((ND_height(np))*(double)72); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("d6gkdf4gkfagwtb6mkhxxvqrc"); // objp->pos = ND_coord(np); UNSUPPORTED("6c49iw60twquhten0558iva1c"); // objp->pos.x -= (objp->sz.x) / 2.0; UNSUPPORTED("alrfakfz0nqemd3xl3m9q2gm4"); // objp->pos.y -= (objp->sz.y) / 2.0; UNSUPPORTED("5r3oym45e21gwxn3nsjucxlbi"); // return adjustBB(objp, bb); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6kx3lin2ig9o2otk2bqzdvd4t // static cinfo_t addClusterObj (Agraph_t* g, cinfo_t info) public static Object addClusterObj(Object... arg) { UNSUPPORTED("91ncv8p43nko0ygysclvv77j"); // static cinfo_t UNSUPPORTED("bmfjbc1td1mizemu2aa81cyli"); // addClusterObj (Agraph_t* g, cinfo_t info) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c; UNSUPPORTED("7z5fb6iyowsosn1hiz7opeoc6"); // for (c = 1; c <= GD_n_cluster(g); c++) UNSUPPORTED("6o81thi0rqvkah0s4zkn2fcg4"); // info = addClusterObj (GD_clust(g)[c], info); UNSUPPORTED("1ke0hve63v76yb4shi7jfrp6x"); // if ((g != agroot(g)) && (GD_label(g)) && GD_label(g)->set) { UNSUPPORTED("dcgq2zlh4t0m1gno12t6h7ouy"); // object_t* objp = info.objp; UNSUPPORTED("ddz79zm5235krd6smukq1gza0"); // info.bb = addLabelObj (GD_label(g), objp, info.bb); UNSUPPORTED("be25qc3x3muxo4l87ji01t3kd"); // info.objp++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9kt6o7m6t7fgdh41zfez84fmv"); // return info; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2tdbzvdtkwxp75kj0iufsynm5 // static int countClusterLabels (Agraph_t* g) public static Object countClusterLabels(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("6o4fsu24jc0ezulf31fsi9bce"); // countClusterLabels (Agraph_t* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2q4dlnxpy4lj011whzcbyq3xj"); // int c, i = 0; UNSUPPORTED("68odyos1g0n4tbs7c77r0f9wn"); // if ((g != agroot(g)) && (GD_label(g)) && GD_label(g)->set) UNSUPPORTED("chd2f5z6rt19lbaye25ej7q6j"); // i++; UNSUPPORTED("7z5fb6iyowsosn1hiz7opeoc6"); // for (c = 1; c <= GD_n_cluster(g); c++) UNSUPPORTED("adgz5sd2oklf51or5uq3wduuz"); // i += countClusterLabels (GD_clust(g)[c]); UNSUPPORTED("ahwo5hst5k1gyq20ve63ahe81"); // return i; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d4215jd9wukfn6t0iknwzjcof // static void addXLabels(Agraph_t * gp) public static void addXLabels(Agraph_s gp) { ENTERING("d4215jd9wukfn6t0iknwzjcof","addXLabels"); try { Agnode_s np; Agedge_s ep; int cnt, i, n_objs, n_lbls; int n_nlbls = 0; /* # of unset node xlabels */ int n_elbls = 0; /* # of unset edge labels or xlabels */ int n_set_lbls = 0; /* # of set xlabels and edge labels */ int n_clbls = 0; /* # of set cluster labels */ final __struct__ bb = JUtils.from(boxf.class); final __struct__ ur = JUtils.from(pointf.class); textlabel_t lp; final __struct__ params = JUtils.from(label_params_t.class); object_t objs; xlabel_t lbls; object_t objp; xlabel_t xlp; Agsym_s force; int et = (GD_flags(gp) & (7 << 1)); if (N(GD_has_labels(gp) & (1 << 4)) && N(GD_has_labels(gp) & (1 << 5)) && N(GD_has_labels(gp) & (1 << 2)) && N(GD_has_labels(gp) & (1 << 1)) && (N(GD_has_labels(gp) & (1 << 0)) || Z.z().EdgeLabelsDone!=0)) return; UNSUPPORTED("27ppdplfezcqw6rdrkzyrr8yg"); // for (np = agfstnode(gp); np; np = agnxtnode(gp, np)) { UNSUPPORTED("eezvruvdh9ueqsgad8k5xzbqi"); // if (ND_xlabel(np)) { UNSUPPORTED("6oje33bnpp4jv5mclsrrhl005"); // if (ND_xlabel(np)->set) UNSUPPORTED("cfkrw6t4lrs7dfgx86sgrz26"); // n_set_lbls++; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("26eewzzknvqt2nbcrqds5fmti"); // n_nlbls++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("41dpbku41lh3gpb30ds9ex6aa"); // for (ep = agfstout(gp, np); ep; ep = agnxtout(gp, ep)) { UNSUPPORTED("9c5vwy3kfweqsgk827cpj3d6q"); // if (ED_xlabel(ep)) { UNSUPPORTED("appkettxihy2o612jk6fahbnh"); // if (ED_xlabel(ep)->set) UNSUPPORTED("8k2rclvg6eaoph9r2pz4620xq"); // n_set_lbls++; UNSUPPORTED("14y6caappoxe17mogr979qf75"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) UNSUPPORTED("q3t8uxncrxc4n8rtuabtzxya"); // n_elbls++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("1mk50yh8pbs8jzn7h8otaonfd"); // if (ED_head_label(ep)) { UNSUPPORTED("4xstfnjw4gi0ja4inv8o0n8z"); // if (ED_head_label(ep)->set) UNSUPPORTED("8k2rclvg6eaoph9r2pz4620xq"); // n_set_lbls++; UNSUPPORTED("14y6caappoxe17mogr979qf75"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) UNSUPPORTED("q3t8uxncrxc4n8rtuabtzxya"); // n_elbls++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4micw28bcx68bfiqihi9ruani"); // if (ED_tail_label(ep)) { UNSUPPORTED("abwl715n01quq34u2qs1kn9xn"); // if (ED_tail_label(ep)->set) UNSUPPORTED("8k2rclvg6eaoph9r2pz4620xq"); // n_set_lbls++; UNSUPPORTED("14y6caappoxe17mogr979qf75"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) UNSUPPORTED("q3t8uxncrxc4n8rtuabtzxya"); // n_elbls++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("92f340ohb0u21xl6jgpc2hieo"); // if (ED_label(ep)) { UNSUPPORTED("5skvrpmqqjq5cj6a8uiylmjsw"); // if (ED_label(ep)->set) UNSUPPORTED("8k2rclvg6eaoph9r2pz4620xq"); // n_set_lbls++; UNSUPPORTED("14y6caappoxe17mogr979qf75"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) UNSUPPORTED("q3t8uxncrxc4n8rtuabtzxya"); // n_elbls++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2uqg2vrduqxs9hk9hmamj7wlu"); // if (GD_has_labels(gp) & (1 << 3)) UNSUPPORTED("4z3bgexjlrmdrfgpdaajems8q"); // n_clbls = countClusterLabels (gp); UNSUPPORTED("19labxj7f93ljlhkpmrde0zgt"); // /* A label for each unpositioned external label */ UNSUPPORTED("5kla6rwar4q1ig2olguocajn6"); // n_lbls = n_nlbls + n_elbls; UNSUPPORTED("apjqar4agmf5jlfd88kbn4f4d"); // if (n_lbls == 0) return; UNSUPPORTED("4j54hc42lgojcuorb9p42tlr"); // /* An object for each node, each positioned external label, any cluster label, UNSUPPORTED("adxf9gd6tasafb302px9vqgum"); // * and all unset edge labels and xlabels. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("6id92o3db6qu5zuuj8q40n3zn"); // n_objs = agnnodes(gp) + n_set_lbls + n_clbls + n_elbls; UNSUPPORTED("3e10kvi719e134x675xgwi1tj"); // objp = objs = (object_t*)zmalloc((n_objs)*sizeof(object_t)); UNSUPPORTED("6z86cmeenod2nx8ej72n0qotk"); // xlp = lbls = (xlabel_t*)zmalloc((n_lbls)*sizeof(xlabel_t)); UNSUPPORTED("f2nzvg1xnr11v28w2feg923cs"); // bb.LL = pointfof(INT_MAX, INT_MAX); UNSUPPORTED("7tttoj8cnxfqgnq2aagnnav48"); // bb.UR = pointfof(-INT_MAX, -INT_MAX); UNSUPPORTED("27ppdplfezcqw6rdrkzyrr8yg"); // for (np = agfstnode(gp); np; np = agnxtnode(gp, np)) { UNSUPPORTED("38hh82sue091x6ybm9e34wy61"); // bb = addNodeObj (np, objp, bb); UNSUPPORTED("ex5hwora23t1cl8hpjo4uvphm"); // if ((lp = ND_xlabel(np))) { UNSUPPORTED("d5pjy3dwui27jfdz550cy0cln"); // if (lp->set) { UNSUPPORTED("cls7z8l7wi371a4wrec0viqil"); // objp++; UNSUPPORTED("3zy3jhlqyioeyh9mlrspjjgc6"); // bb = addLabelObj (lp, objp, bb); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("2msn58w2dse7pbq2esv7awk4r"); // addXLabel (lp, objp, xlp, 0, ur); UNSUPPORTED("1zpq9rd3nn9kjrmun8ivs9zx5"); // xlp++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bhbvoj12subdn6905juhiubo2"); // objp++; UNSUPPORTED("41dpbku41lh3gpb30ds9ex6aa"); // for (ep = agfstout(gp, np); ep; ep = agnxtout(gp, ep)) { UNSUPPORTED("9zaprre819fwswan5wvid0h6g"); // if ((lp = ED_label(ep))) { UNSUPPORTED("5dapykbxjvnhw0dpi7jfpcazk"); // if (lp->set) { UNSUPPORTED("7rwrlod7lkgin3rnnzy3iw2rw"); // bb = addLabelObj (lp, objp, bb); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("dfnmpe0hri6ksye0gnxssi4zz"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) { UNSUPPORTED("9ffmrymv8cg4h4b3ea97t9qbp"); // addXLabel (lp, objp, xlp, 1, edgeMidpoint(gp, ep)); UNSUPPORTED("808184nt3k6cxj5dsg27yvpvg"); // xlp++; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("3ia66n3hqrwmh3hybkoh6f8wa"); // agerr(AGWARN, "no position for edge with label %s", UNSUPPORTED("9npeksy1st7v005znerttzzzv"); // ED_label(ep)->text); UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d23ocobgp22a33eopdnqe9o4u"); // objp++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("a5mn7dpum21w95ku1l27m9rpk"); // if ((lp = ED_tail_label(ep))) { UNSUPPORTED("5dapykbxjvnhw0dpi7jfpcazk"); // if (lp->set) { UNSUPPORTED("7rwrlod7lkgin3rnnzy3iw2rw"); // bb = addLabelObj (lp, objp, bb); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("dfnmpe0hri6ksye0gnxssi4zz"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) { UNSUPPORTED("bqc6ukxlmt6l3osbpsmqbzutc"); // addXLabel (lp, objp, xlp, 1, edgeTailpoint(ep)); UNSUPPORTED("808184nt3k6cxj5dsg27yvpvg"); // xlp++; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("5ixexxcbcix5hrfl43td7pj4s"); // agerr(AGWARN, "no position for edge with tail label %s", UNSUPPORTED("cf9qaysecgkvv4165la4uu6cb"); // ED_tail_label(ep)->text); UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("cls7z8l7wi371a4wrec0viqil"); // objp++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6rvkuvq5nj7p2za2zqxf74l3c"); // if ((lp = ED_head_label(ep))) { UNSUPPORTED("5dapykbxjvnhw0dpi7jfpcazk"); // if (lp->set) { UNSUPPORTED("7rwrlod7lkgin3rnnzy3iw2rw"); // bb = addLabelObj (lp, objp, bb); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("dfnmpe0hri6ksye0gnxssi4zz"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) { UNSUPPORTED("7gewvtwwzj3unxzrtbqpwduzg"); // addXLabel (lp, objp, xlp, 1, edgeHeadpoint(ep)); UNSUPPORTED("808184nt3k6cxj5dsg27yvpvg"); // xlp++; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("8nrkavpg9ifts9yylhfijn9rp"); // agerr(AGWARN, "no position for edge with head label %s", UNSUPPORTED("a5omwtwd411hsfrc37d8t6m8b"); // ED_head_label(ep)->text); UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("cls7z8l7wi371a4wrec0viqil"); // objp++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("1pb88fhz51khiwboqgii8qayw"); // if ((lp = ED_xlabel(ep))) { UNSUPPORTED("5dapykbxjvnhw0dpi7jfpcazk"); // if (lp->set) { UNSUPPORTED("7rwrlod7lkgin3rnnzy3iw2rw"); // bb = addLabelObj (lp, objp, bb); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("dfnmpe0hri6ksye0gnxssi4zz"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) { UNSUPPORTED("9ffmrymv8cg4h4b3ea97t9qbp"); // addXLabel (lp, objp, xlp, 1, edgeMidpoint(gp, ep)); UNSUPPORTED("808184nt3k6cxj5dsg27yvpvg"); // xlp++; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("dbskad3xgu5oqqhwl1cr9f88g"); // agerr(AGWARN, "no position for edge with xlabel %s", UNSUPPORTED("dtpynjioyrbt2xfca2o46eb0j"); // ED_xlabel(ep)->text); UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("cls7z8l7wi371a4wrec0viqil"); // objp++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5zntyu3vcfnjveucnumrmbjig"); // if (n_clbls) { UNSUPPORTED("48ipxdlv7xlti99g0yhi5zuai"); // cinfo_t info; UNSUPPORTED("7c5iohb8t706p273ae1lxal8r"); // info.bb = bb; UNSUPPORTED("b1474fakrbyw7p5ja42jgv90c"); // info.objp = objp; UNSUPPORTED("6ygw8idplugc5u6w7ro3gakmb"); // info = addClusterObj (gp, info); UNSUPPORTED("1l2cwgzediv4hztjhtm052rl3"); // bb = info.bb; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("79ifzl4zpx3wbd5szboa2x2vb"); // force = (agattr(gp,AGRAPH,"forcelabels",NULL)); UNSUPPORTED("1if7tdbcs4rwvb0polsdlbfh4"); // params.force = late_bool(gp, force, NOT(0)); UNSUPPORTED("2ol916ffwy0e2vxinxn4v4sgt"); // params.bb = bb; UNSUPPORTED("25rb35acbkepp55u3bkjxb1gc"); // placeLabels(objs, n_objs, lbls, n_lbls, ¶ms); UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); // if (Verbose) UNSUPPORTED("4iypau1fdov37qnq2ub6iq5ra"); // printData(objs, n_objs, lbls, n_lbls, ¶ms); UNSUPPORTED("52mefujap7scy273ud7nyj9hn"); // xlp = lbls; UNSUPPORTED("3wtn792c3ql5yhn77alu6r5d8"); // cnt = 0; UNSUPPORTED("30yvif5t111f94y1fs2gd8crq"); // for (i = 0; i < n_lbls; i++) { UNSUPPORTED("w0kpfap6pb5scjkqkgsfira0"); // if (xlp->set) { UNSUPPORTED("7hl03wjg5yryhvbe4ar0i0b8g"); // cnt++; UNSUPPORTED("8xqwhcveb6ivragr1ebkp4pfh"); // lp = (textlabel_t *) (xlp->lbl); UNSUPPORTED("a5h8ktnl3raui7zo5kcjzd2e0"); // lp->set = 1; UNSUPPORTED("4lub8ddx8vt0gove63lajjr4s"); // lp->pos = centerPt(xlp); UNSUPPORTED("d613i6370zjpynl7n5caiorig"); // updateBB (gp, lp); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1966qdxqc520zc0itk8al0xus"); // xlp++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); // if (Verbose) UNSUPPORTED("dy42jv2urndusl1b1jrir300t"); // fprintf (stderr, "%d out of %d labels positioned.\n", cnt, n_lbls); UNSUPPORTED("1jtgut2015ohnwt6qfisxgbs5"); // else if (cnt != n_lbls) UNSUPPORTED("9hqu9h8q1a2xl4ty48ct0fdyp"); // agerr(AGWARN, "%d out of %d exterior labels positioned.\n", cnt, n_lbls); UNSUPPORTED("baez6nmarx9nht65vulvjojic"); // free(objs); UNSUPPORTED("ayak2o9js1lmsa5vuzul2sdxs"); // free(lbls); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("d4215jd9wukfn6t0iknwzjcof","addXLabels"); } } //3 8fc0zxg8y7hec3n4evx3jw6cq // void gv_postprocess(Agraph_t * g, int allowTranslation) public static void gv_postprocess(Agraph_s g, int allowTranslation) { ENTERING("8fc0zxg8y7hec3n4evx3jw6cq","gv_postprocess"); try { double diff; final __struct__ dimen = JUtils.from(pointf.class); Z.z().Rankdir = GD_rankdir(g); Z.z().Flip = GD_flip(g)!=0; /* Handle cluster labels */ if (Z.z().Flip) UNSUPPORTED("4hxky2sp978rmy6018sfmts6m"); // place_flip_graph_label(g); else place_graph_label(g); /* Everything has been placed except the root graph label, if any. * The graph positions have not yet been rotated back if necessary. */ addXLabels(g); /* Add space for graph label if necessary */ if (GD_label(g)!=null && N(GD_label(g).getPtr("set"))) { UNSUPPORTED("crj0py2wme4b5l8apvbxqcmqa"); // dimen = GD_label(g)->dimen; UNSUPPORTED("22jhn709g4c5wh0gb6v40rh19"); // {((dimen).x += 4*4); ((dimen).y += 2*4);}; UNSUPPORTED("9k69y89jybam5elefg45va3ey"); // if (Flip) { UNSUPPORTED("andsvpqa42ef9h5dkn3uyv6tj"); // if (GD_label_pos(g) & 1) { UNSUPPORTED("65ggem18g4zgz2yx552vi2n4v"); // GD_bb(g).UR.x += dimen.y; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("9dm14vohn1tuwqrwprpdywylr"); // GD_bb(g).LL.x -= dimen.y; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("94nnj9ien92542qanqtyo8qzq"); // if (dimen.x > (GD_bb(g).UR.y - GD_bb(g).LL.y)) { UNSUPPORTED("awekuk9gokwsbb49j41hvhqt4"); // diff = dimen.x - (GD_bb(g).UR.y - GD_bb(g).LL.y); UNSUPPORTED("5856jxlve8fb2pennnazjjkij"); // diff = diff / 2.; UNSUPPORTED("3t8m6fustsc50cpggxiadcjax"); // GD_bb(g).LL.y -= diff; UNSUPPORTED("7c25kl7mn9jd5x5x2uflcql86"); // GD_bb(g).UR.y += diff; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("andsvpqa42ef9h5dkn3uyv6tj"); // if (GD_label_pos(g) & 1) { UNSUPPORTED("7x8evhhttjy9mwgcpfpb3l7lm"); // if (Rankdir == 0) UNSUPPORTED("45a42yl5qj83sj5mzdd6k6wcj"); // GD_bb(g).UR.y += dimen.y; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("6i55hrio04eg5ilg5i01jw8vv"); // GD_bb(g).LL.y -= dimen.y; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("7x8evhhttjy9mwgcpfpb3l7lm"); // if (Rankdir == 0) UNSUPPORTED("6i55hrio04eg5ilg5i01jw8vv"); // GD_bb(g).LL.y -= dimen.y; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("45a42yl5qj83sj5mzdd6k6wcj"); // GD_bb(g).UR.y += dimen.y; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("p1mrpzvl0adzwcw3lialn8v3"); // if (dimen.x > (GD_bb(g).UR.x - GD_bb(g).LL.x)) { UNSUPPORTED("3ie0x59qavcqpnvy7kci31lgc"); // diff = dimen.x - (GD_bb(g).UR.x - GD_bb(g).LL.x); UNSUPPORTED("5856jxlve8fb2pennnazjjkij"); // diff = diff / 2.; UNSUPPORTED("anqdsrkl2qs1pqbuivrdz6fnt"); // GD_bb(g).LL.x -= diff; UNSUPPORTED("c0ah0pvnkczqdg5jt0u955wns"); // GD_bb(g).UR.x += diff; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } } if (allowTranslation!=0) { switch (Z.z().Rankdir) { case 0: Z.z().Offset.___(GD_bb(g).LL); break; case 1: UNSUPPORTED("5t3j9lrc86kd5ouaqgzvz3qcm"); // Offset = pointfof(-GD_bb(g).UR.y, GD_bb(g).LL.x); break; case 2: UNSUPPORTED("96ajwnh79ja9g57xmut6dmh9d"); // Offset = pointfof(GD_bb(g).LL.x, -GD_bb(g).UR.y); break; case 3: UNSUPPORTED("3xtu7zkpqq7nsx9oe68oi6ebt"); // Offset = pointfof(GD_bb(g).LL.y, GD_bb(g).LL.x); break; } translate_drawing(g); } if (GD_label(g)!=null && N(GD_label(g).getPtr("set"))) UNSUPPORTED("6dds0zsvqw48u510zcy954fh1"); // place_root_label(g, dimen); if (Z.z().Show_boxes!=null) { UNSUPPORTED("8c7x8di5w36ib05qan9z4sl9"); // char buf[BUFSIZ]; UNSUPPORTED("83qqprhiseoxlwtwi991aag0c"); // if (Flip) UNSUPPORTED("86tova7pv19alt02nlk0d17oj"); // sprintf(buf, "/pathbox {\n /X exch neg %.5g sub def\n /Y exch %.5g sub def\n /x exch neg %.5g sub def\n /y exch %.5g sub def\n newpath x y moveto\n X y lineto\n X Y lineto\n x Y lineto\n closepath stroke\n} def\n", Offset.x, Offset.y, Offset.x, Offset.y); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("79tu9xkxv4v48uko4cxz7v04t"); // sprintf(buf, "/pathbox {\n /Y exch %.5g sub def\n /X exch %.5g sub def\n /y exch %.5g sub def\n /x exch %.5g sub def\n newpath x y moveto\n X y lineto\n X Y lineto\n x Y lineto\n closepath stroke\n } def\n/dbgstart { gsave %.5g %.5g translate } def\n/arrowlength 10 def\n/arrowwidth arrowlength 2 div def\n/arrowhead {\n gsave\n rotate\n currentpoint\n newpath\n moveto\n arrowlength arrowwidth 2 div rlineto\n 0 arrowwidth neg rlineto\n closepath fill\n grestore\n} bind def\n/makearrow {\n currentpoint exch pop sub exch currentpoint pop sub atan\n arrowhead\n} bind def\n/point { newpath 2 0 360 arc fill} def/makevec {\n /Y exch def\n /X exch def\n /y exch def\n /x exch def\n newpath x y moveto\n X Y lineto stroke\n X Y moveto\n x y makearrow\n} def\n", Offset.y, Offset.x, Offset.y, Offset.x, UNSUPPORTED("aow79vde4xjqtwexymr5ocjl6"); // -Offset.x, -Offset.y); UNSUPPORTED("6g3g36v7l0tyfootyy8mzv3t8"); // Show_boxes[0] = strdup(buf); } } finally { LEAVING("8fc0zxg8y7hec3n4evx3jw6cq","gv_postprocess"); } } //3 3qbbvlnq1b06ylgr0yj2slbhm // void dotneato_postprocess(Agraph_t * g) public static void dotneato_postprocess(Agraph_s g) { ENTERING("3qbbvlnq1b06ylgr0yj2slbhm","dotneato_postprocess"); try { gv_postprocess(g, 1); } finally { LEAVING("3qbbvlnq1b06ylgr0yj2slbhm","dotneato_postprocess"); } } //3 ehe7n8wkl4thn86tisjzdotpq // static void place_flip_graph_label(graph_t * g) public static Object place_flip_graph_label(Object... arg) { UNSUPPORTED("3zsjtcmcfxhkmaagi0on4dy20"); // static void place_flip_graph_label(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c; UNSUPPORTED("1wiyv8zjadpaaw6l7rs3o7g1w"); // pointf p, d; UNSUPPORTED("3aye33sd5gwxvun5g9nvgb2py"); // if ((g != agroot(g)) && (GD_label(g)) && !GD_label(g)->set) { UNSUPPORTED("bb9kbz7bijh4xjt97fdn2q90k"); // if (GD_label_pos(g) & 1) { UNSUPPORTED("9fqnrxwwa66oa8qe31y1gf37u"); // d = GD_border(g)[1]; UNSUPPORTED("cgv3bcg9c274cdwxi1y0sja3p"); // p.x = GD_bb(g).UR.x - d.x / 2; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("16roor3488xb2g2wr6oh8dqpx"); // d = GD_border(g)[3]; UNSUPPORTED("7ictv9eqmjvxjii5lqlyw8nu"); // p.x = GD_bb(g).LL.x + d.x / 2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2qpji9cqj2p2czgcug3wvnqpl"); // if (GD_label_pos(g) & 4) { UNSUPPORTED("2xa4n9ca16xpf1kahaycmkl4r"); // p.y = GD_bb(g).LL.y + d.y / 2; UNSUPPORTED("blrmgi2c43f98h1nso1k757hi"); // } else if (GD_label_pos(g) & 2) { UNSUPPORTED("a7anlx7s8s2pqd73q59ep0kpf"); // p.y = GD_bb(g).UR.y - d.y / 2; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("378pj84d79yuezjebpqcchyut"); // p.y = (GD_bb(g).LL.y + GD_bb(g).UR.y) / 2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ptjqgn3loi94u957cup0fi1"); // GD_label(g)->pos = p; UNSUPPORTED("5ezl5j9dxa3ewoj8hxw72wn4n"); // GD_label(g)->set = NOT(0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7z5fb6iyowsosn1hiz7opeoc6"); // for (c = 1; c <= GD_n_cluster(g); c++) UNSUPPORTED("d388zyk4c9le0jg4fcfx0b2"); // place_flip_graph_label(GD_clust(g)[c]); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 72zw1alhd5vd0g6mhum507rvx // void place_graph_label(graph_t * g) public static void place_graph_label(Agraph_s g) { ENTERING("72zw1alhd5vd0g6mhum507rvx","place_graph_label"); try { int c; final __struct__ p = JUtils.from(pointf.class), d = JUtils.from(pointf.class); if (NEQ(g, agroot(g)) && (GD_label(g)!=null) && N(GD_label(g).getInt("set"))) { if ((GD_label_pos(g) & 1)!=0) { d.___(GD_border(g).plus(2).getStruct()); p.setDouble("y", GD_bb(g).UR.y - d.getDouble("y") / 2); } else { UNSUPPORTED("1w38no4welthbwa0i10hei16b"); // d = GD_border(g)[0]; UNSUPPORTED("2xa4n9ca16xpf1kahaycmkl4r"); // p.y = GD_bb(g).LL.y + d.y / 2; } if ((GD_label_pos(g) & 4)!=0) { UNSUPPORTED("cgv3bcg9c274cdwxi1y0sja3p"); // p.x = GD_bb(g).UR.x - d.x / 2; } else if ((GD_label_pos(g) & 2)!=0) { UNSUPPORTED("7ictv9eqmjvxjii5lqlyw8nu"); // p.x = GD_bb(g).LL.x + d.x / 2; } else { p.setDouble("x", (GD_bb(g).LL.x + GD_bb(g).UR.x) / 2); } GD_label(g).setStruct("pos", p); GD_label(g).setBoolean("set", NOT(false)); } for (c = 1; c <= GD_n_cluster(g); c++) place_graph_label((Agraph_s) GD_clust(g).plus(c).getPtr()); } finally { LEAVING("72zw1alhd5vd0g6mhum507rvx","place_graph_label"); } } } plantuml-1.2017.15/src/gen/lib/common/psusershape__c.java000066400000000000000000001151271312650303100231310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class psusershape__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 eryi0zdvu1vdj4z91oqjowr7s // static int N_EPSF_files //1 exwjj9od9856wjk4etv0hx2as // static Dict_t *EPSF_contents //3 29n1xng5iw7sfvv70eq9vuxu8 // static void ps_image_free(Dict_t * dict, usershape_t * p, Dtdisc_t * disc) public static Object ps_image_free(Object... arg) { UNSUPPORTED("5rj4kigk1748pyl3msx43jfns"); // static void ps_image_free(Dict_t * dict, usershape_t * p, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cmkwmwk1rz1nafnyaky92rbn2"); // free(p->data); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 au4inx0gk5hoa20orx5lvhth4 // static Dtdisc_t ImageDictDisc = //3 1uc9lbl2k8ptz750obaoq4owa // static usershape_t *user_init(const char *str) public static Object user_init(Object... arg) { UNSUPPORTED("btjk6ghnhhhpxqzthns1035sv"); // static usershape_t *user_init(const char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7yx4ibv9esrr2z6ts6eh3p9kc"); // char *contents; UNSUPPORTED("18vi5vqd0r4k0kxsl3h3rwa4y"); // char line[BUFSIZ]; UNSUPPORTED("dn2hi0km4q5ldibguffbger1c"); // FILE *fp; UNSUPPORTED("betw6ruf6fq3p0lck4gnts0kj"); // struct stat statbuf; UNSUPPORTED("d2qyre5sgbxena5i9pu0h2xam"); // int saw_bb, must_inline, rc; UNSUPPORTED("5rcgzsa5rlhtyjz964tcthts2"); // int lx, ly, ux, uy; UNSUPPORTED("exneoozy5g8al0a8y6fxb88zv"); // usershape_t *us; UNSUPPORTED("8g3a4ltfhciggja7iwey2aqcl"); // if (!EPSF_contents) UNSUPPORTED("e6hd21gm9apd4gmmy01z57zgf"); // EPSF_contents = dtopen(&ImageDictDisc, Dtoset); UNSUPPORTED("erlko2ce22rjvf7uoy0h8u0v8"); // us = (*(((Dt_t*)(EPSF_contents))->searchf))((EPSF_contents),(void*)(str),0001000); UNSUPPORTED("91avho72bkiuf772dc2a5ix6e"); // if (us) UNSUPPORTED("cw85r4wtmkbzxtvhwpamie4v6"); // return us; UNSUPPORTED("77brc54aeox9dylmsw9nrc9lh"); // if (!(fp = fopen(str, "r"))) { UNSUPPORTED("bksyqnyoym7zpn3ga1d0g0tyf"); // agerr(AGWARN, "couldn't open epsf file %s\n", str); UNSUPPORTED("11hwqop4xebvtcskop4uhpp01"); // return NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5yfoc02nltmsi4pxppdmtqaxe"); // /* try to find size */ UNSUPPORTED("5efqa07nxd5jzvtbp8ow6ak81"); // saw_bb = must_inline = 0; UNSUPPORTED("5zpyz8rwwni5vzipcoh9h5j1s"); // while (fgets(line, sizeof(line), fp)) { UNSUPPORTED("84ei9xnflwzrsv8mcoxyax2jg"); // if (sscanf UNSUPPORTED("wj64hfw12hp6blditicrusxg"); // (line, "%%%%BoundingBox: %d %d %d %d", &lx, &ly, &ux, &uy) == 4) { UNSUPPORTED("d9bzgs0bw96je3fnzudy957xp"); // saw_bb = NOT(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4toi4f2ci00kw02glf22xjylj"); // if ((line[0] != '%') && strstr(line,"read")) must_inline = NOT(0); UNSUPPORTED("2eb5k0vpbigkfqqzv1t6iu11t"); // if (saw_bb && must_inline) break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8p3jjm43yrzygpor71hdkfs1g"); // if (saw_bb) { UNSUPPORTED("4eocsemdgmodxdzjhlhubun1"); // us = (usershape_t*)gmalloc(sizeof(usershape_t)); UNSUPPORTED("5dym7sjpxsgdgav57jvyuohe8"); // us->x = lx; UNSUPPORTED("da04q03gf0w4upkkrsn74w1dc"); // us->y = ly; UNSUPPORTED("2ii7hvliw02uqnhr23i7argb2"); // us->w = ux - lx; UNSUPPORTED("191g18ggraral9b3r928yx2ow"); // us->y = uy - ly; UNSUPPORTED("dop1va2g3wkq8qbie2jsg2l5v"); // us->name = str; UNSUPPORTED("bnlt8sbqy5nvjanbynnzxfgat"); // us->macro_id = N_EPSF_files++; UNSUPPORTED("7c7n8wrq5m5e8eatfo94u2pu9"); // fstat(fileno(fp), &statbuf); UNSUPPORTED("56jn6f4g97pzyo432xeqpcx5d"); // contents = us->data = (char*)gmalloc((statbuf.st_size + 1)*sizeof(char)); UNSUPPORTED("6ppmne13xb7f5x8gvqumpmyiq"); // fseek(fp, 0, SEEK_SET); UNSUPPORTED("21uxu15vxgywtd0a3igl6p80t"); // rc = fread(contents, statbuf.st_size, 1, fp); UNSUPPORTED("6t9w56kgnl604tbbuy1lqdndx"); // contents[statbuf.st_size] = '\0'; UNSUPPORTED("dywmx93gyg3hytqtt3l8d5z2p"); // (*(((Dt_t*)(EPSF_contents))->searchf))((EPSF_contents),(void*)(us),0000001); UNSUPPORTED("d1520lv1wzdo42xmawn5xxkrw"); // us->must_inline = must_inline; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("39sdmjtt29d7vsalbnmv8qv4z"); // agerr(AGWARN, "BoundingBox not found in epsf file %s\n", str); UNSUPPORTED("5kcrfk94jgjyac8443js6gz3j"); // us = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("64ohktjo8rl0tbgujwt2zhips"); // fclose(fp); UNSUPPORTED("2iqrgjc97xskxvw6791yf0sl7"); // return us; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4jtxldcmdfn1er82zhtd5wlri // void epsf_init(node_t * n) public static Object epsf_init(Object... arg) { UNSUPPORTED("7em8y1zyx1snxc7xca5n5th5o"); // void epsf_init(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("31b47kcwg6z2ds4cugdfq5hft"); // epsf_t *desc; UNSUPPORTED("3khvuud3f5gatnp6mor2iup7b"); // const char *str; UNSUPPORTED("exneoozy5g8al0a8y6fxb88zv"); // usershape_t *us; UNSUPPORTED("bftz89757hgmx7ivuna8lc4z6"); // int dx, dy; UNSUPPORTED("678wz7kwotz1a6i79id3poi7x"); // if ((str = safefile(agget(n, "shapefile")))) { UNSUPPORTED("4o6c82f5unsr24rvl75p7p5ek"); // us = user_init(str); UNSUPPORTED("b5eehxrs3a1afyurga0m7yg5z"); // if (!us) UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return; UNSUPPORTED("1llk4yzmxomxce2uecvbxt922"); // dx = us->w; UNSUPPORTED("7xizqe3g4592mv98u21qsg12y"); // dy = us->h; UNSUPPORTED("36n9s8hc2y0ggb7ed2kxv65vd"); // ND_width(n) = ((dx)/(double)72); UNSUPPORTED("9px3qggrf4lv7iustz7y59w1w"); // ND_height(n) = ((dy)/(double)72); UNSUPPORTED("ebl6c4mrti14npk9mjj1qazca"); // ND_shape_info(n) = desc = (epsf_t*)zmalloc(sizeof(epsf_t)); UNSUPPORTED("a9wg4pmg1rx2n6b2s84l80obj"); // desc->macro_id = us->macro_id; UNSUPPORTED("afw8uhw0ehdxj1a69rz0ybq4r"); // desc->offset.x = -us->x - (dx) / 2; UNSUPPORTED("9nm3fw2qmg65tbqome5kujtsz"); // desc->offset.y = -us->y - (dy) / 2; UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("8mplvqa6xkatre0c6wwuh61lk"); // agerr(AGWARN, "shapefile not set or not found for epsf node %s\n", agnameof(n)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5dl04g1rrjvf8547fcq7xwqzt // void epsf_free(node_t * n) public static Object epsf_free(Object... arg) { UNSUPPORTED("5rxuq2v3mq5yi8hvoggnvosw5"); // void epsf_free(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("63ge8bmq3laisshvh9shex6rf"); // if (ND_shape_info(n)) UNSUPPORTED("4tqz4t9dpzad2deeqfzrkmkfw"); // free(ND_shape_info(n)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3k8bgogm645fta5beqiqlgb91 // void cat_libfile(GVJ_t * job, const char **arglib, const char **stdlib) public static Object cat_libfile(Object... arg) { UNSUPPORTED("f2ebumtuigxeossbmwcw7sauq"); // void cat_libfile(GVJ_t * job, const char **arglib, const char **stdlib) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dn2hi0km4q5ldibguffbger1c"); // FILE *fp; UNSUPPORTED("5py5d30vifgyqkijs4037nlps"); // const char **s, *bp, *p, *path; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("bamb0j1bzualb8qewx4zt5dph"); // boolean use_stdlib = NOT(0); UNSUPPORTED("4j7ud7jy9tm90khvzcx3dzkse"); // /* check for empty string to turn off stdlib */ UNSUPPORTED("3j11d6cpp08lgcnsl7g86bdq7"); // if (arglib) { UNSUPPORTED("c52r2tlvayllcewxs8k15s05w"); // for (i = 0; use_stdlib && ((p = arglib[i])); i++) { UNSUPPORTED("927bwpabhr93r5m1t31uoko5y"); // if (*p == '\0') UNSUPPORTED("8gxs50v7w64gzo5zglu3ojguv"); // use_stdlib = 0; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e8ewhnemro5nober1fa75a77b"); // if (use_stdlib) UNSUPPORTED("9osn5uouzsj18nqzp3gaief29"); // for (s = stdlib; *s; s++) { UNSUPPORTED("30lfe4kxbvbtghur73wrl2dav"); // gvputs(job, *s); UNSUPPORTED("5uq09elejy2ot3s8x5d13dxs9"); // gvputs(job, "\n"); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("3j11d6cpp08lgcnsl7g86bdq7"); // if (arglib) { UNSUPPORTED("evqlr64pfisalhednuxyi8se0"); // for (i = 0; (p = arglib[i]) != 0; i++) { UNSUPPORTED("927bwpabhr93r5m1t31uoko5y"); // if (*p == '\0') UNSUPPORTED("ae84fvt6djsw3pvp7g15ypmw7"); // continue; /* ignore empty string */ UNSUPPORTED("7rcba80v613dy9q1k10xxe78v"); // path = safefile(p); /* make sure filename is okay */ UNSUPPORTED("7tatqi6et1nsfzfr542t4r5i8"); // if (!path) { UNSUPPORTED("7y7cgdemfr8h5e077czq19s0p"); // agerr(AGWARN, "can't find library file %s\n", p); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("e100j39k1vq90fggjnce67zd1"); // else if ((fp = fopen(path, "r"))) { UNSUPPORTED("25rk7l5monea7crssvaemqymw"); // while ((bp = Fgets(fp))) UNSUPPORTED("csp26n5hr6bygjv2orlm6xh0s"); // gvputs(job, bp); UNSUPPORTED("ca5a791njn2so4a7dtvrjmcol"); // gvputs(job, "\n"); /* append a newline just in case */ UNSUPPORTED("vg8cxxpc2olmxqemlfw98yhx"); // fclose (fp); UNSUPPORTED("8983k01wuaibmqpm7x4605bp7"); // } else UNSUPPORTED("4ii3y4fdc0rtv5sdyvnq3r19x"); // agerr(AGWARN, "can't open library file %s\n", path); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c8mk88p0edzfsgqm13hpubkxw // void epsf_emit_body(GVJ_t *job, usershape_t *us) public static Object epsf_emit_body(Object... arg) { UNSUPPORTED("8glrt6xt7v3ywzysyvx97glwt"); // void epsf_emit_body(GVJ_t *job, usershape_t *us) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("wrvu9u7a8j6i6y6552zncxfk"); // char c; UNSUPPORTED("d7ketofh63tjf8eb5ztge4c31"); // p = us->data; UNSUPPORTED("9oyx3ukhip4n1koefwntplgmx"); // while (*p) { UNSUPPORTED("9qifncqcc9fx15rxu1muizz0o"); // /* skip %%EOF lines */ UNSUPPORTED("9g4rchc1chbqitmc8bminq7v"); // if ((p[0] == '%') && (p[1] == '%') UNSUPPORTED("bba83ay6zg8fvrsgqrrrcuy8i"); // && (!strncasecmp(&p[2], "EOF", 3) UNSUPPORTED("6chobjvni909a13o053pxk2p0"); // || !strncasecmp(&p[2], "BEGIN", 5) UNSUPPORTED("bzsdn21uu7jb8tzc4tbom7sw5"); // || !strncasecmp(&p[2], "END", 3) UNSUPPORTED("a2ti475ble1zqs3dlsmntwv74"); // || !strncasecmp(&p[2], "TRAILER", 7) UNSUPPORTED("c1tth0cl8ygadmbgsvzkapnoe"); // )) { UNSUPPORTED("9k6m8vuyp3pzjw1gxyk3o58wp"); // /* check for *p since last line might not end in '\n' */ UNSUPPORTED("5be7pghqp1llzh7fl9vgv7pal"); // while ((c = *p) && (c != '\r') && (c != '\n')) p++; UNSUPPORTED("3cka3lnpeg06gmtc079gxlxrv"); // if ((*p == '\r') && (*(p+1) == '\n')) p += 2; UNSUPPORTED("3w319yo1w73iab195sxwuf5e7"); // else if (*p) p++; UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3ynl0b83d0xrdpt5dzpjat21p"); // /* output line */ UNSUPPORTED("47nu285gh2jm87occ1dd24ore"); // while ((c = *p) && (c != '\r') && (c != '\n')) { UNSUPPORTED("exn5b6l9v272pe3lg7iopebqu"); // gvputc(job, c); UNSUPPORTED("847zwwso12sey42b59zepembc"); // p++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("451qyj2kv55zeowl3tn3wbt5"); // if ((*p == '\r') && (*(p+1) == '\n')) p += 2; UNSUPPORTED("4ula5fp4ciaxwkk14htcc2chb"); // else if (*p) p++; UNSUPPORTED("3w0oergh6hreff0gxv1dt2v6e"); // gvputc(job, '\n'); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8y6ghoi95l19nfvv9bb79pg17 // void epsf_define(GVJ_t *job) public static Object epsf_define(Object... arg) { UNSUPPORTED("2jk8j9j4tqkxfac24cs1wm4xs"); // void epsf_define(GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("exneoozy5g8al0a8y6fxb88zv"); // usershape_t *us; UNSUPPORTED("8g3a4ltfhciggja7iwey2aqcl"); // if (!EPSF_contents) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("8nth7emjhetau8szgigivkiwa"); // for (us = (*(((Dt_t*)(EPSF_contents))->searchf))((EPSF_contents),(void*)(0),0000200); us; us = (*(((Dt_t*)(EPSF_contents))->searchf))((EPSF_contents),(void*)(us),0000010)) { UNSUPPORTED("e38lq5b2sg26x3edlqnpmenjf"); // if (us->must_inline) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("74qu08bzz2w50fm1rxcd3nb1t"); // gvprintf(job, "/user_shape_%d {\n", us->macro_id); UNSUPPORTED("bq7b88oc2llin4wuspb9y2k0z"); // gvputs(job, "%%BeginDocument:\n"); UNSUPPORTED("11ii4m89jltj0dk9f2nl812na"); // epsf_emit_body(job, us); UNSUPPORTED("b6zvkgtf4i48itua2znxykfv4"); // gvputs(job, "%%EndDocument\n"); UNSUPPORTED("dys3bmzsjlng5wufay121n4wd"); // gvputs(job, "} bind def\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 egj5vrbfagce8lh8wcotr50p8 // static int charsetOf (char* s) public static Object charsetOf(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("14toksq7jmazxy7jf8hdlx5b3"); // charsetOf (char* s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8mngi3m5lqbt7c8rk7l3o7zpc"); // int r = ASCII; UNSUPPORTED("10sir32iwi5l2jyfgp65pihto"); // unsigned char c; UNSUPPORTED("11zj3p308ttro04hrzowx0vrh"); // while ((c = *(unsigned char*)s++)) { UNSUPPORTED("1efx7dnx6p2hru4jp6nmn5kp1"); // if (c < 0x7F) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("cjeai7vjetgqlhigjsxcurv5u"); // else if ((c & 0xFC) == 0xC0) { UNSUPPORTED("7v9ez1gvzvyjl1ehstexhlqra"); // r = LATIN1; UNSUPPORTED("eqg09536v8dzlzdsxjyjb79qo"); // s++; /* eat second byte */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2ckvuq6gku7vtnk1i5az5fy60"); // else return NONLATIN; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6ov4fplgnlc2vo7ilyz88l8w8 // char *ps_string(char *ins, int chset) public static Object ps_string(Object... arg) { UNSUPPORTED("2z1t9y3faapozbla3ue5fy1r3"); // char *ps_string(char *ins, int chset) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8yytudftst76763qgnjebkzhm"); // char *s; UNSUPPORTED("ejkl9z7itgy7zzscudx1yzdk7"); // char *base; UNSUPPORTED("4hzo4dkkcq5f8wru82rpqmp17"); // static agxbuf xb; UNSUPPORTED("723xhlz03y7lwymzvejjrb04"); // static int warned; UNSUPPORTED("1bh3yj957he6yv2dkeg4pzwdk"); // int rc; UNSUPPORTED("cavaompypndyi1f6hl7z9ye12"); // switch (chset) { UNSUPPORTED("dvojp3uwecylbruvszvkskjbd"); // case 0 : UNSUPPORTED("7hfajxzdnwjbtmf22mtovza97"); // base = ins; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("27pm3a0bv1708o8ux4ss8bqqc"); // case 1 : UNSUPPORTED("5p9v7zj5kv7344gooya44jgcy"); // base = utf8ToLatin1 (ins); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("29hi90x8rlo9f7q3mhj5dg71d"); // default : UNSUPPORTED("3iavam6mfccgfsp7391gt9vsc"); // switch (charsetOf (ins)) { UNSUPPORTED("1ljaophh8mbc5fj06dhv6aksx"); // case ASCII : UNSUPPORTED("cmb43luoxsf5hnzalzy32ksai"); // base = ins; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4ykmujahzvaqa6i24edc4b2v6"); // case LATIN1 : UNSUPPORTED("5w84rks28yw6kxmv2l0zlpjy7"); // base = utf8ToLatin1 (ins); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5l9jao5dunsm59cttffi5i6ch"); // case NONLATIN : UNSUPPORTED("7w3i31pvmof25luqw5a3u9mbt"); // if (!warned) { UNSUPPORTED("2llaay3iauy5ooo60c1u8w9cd"); // agerr (AGWARN, "UTF-8 input uses non-Latin1 characters which cannot be handled by this PostScript driver\n"); UNSUPPORTED("18z1ryrdclcr3megv9497iy3d"); // warned = 1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("cmb43luoxsf5hnzalzy32ksai"); // base = ins; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("cmb43luoxsf5hnzalzy32ksai"); // base = ins; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2ots84hgp26w0o36krtn5sxgy"); // if (xb.buf == NULL) UNSUPPORTED("d25jylh17nodyfod42udvo34l"); // agxbinit (&xb, 0, NULL); UNSUPPORTED("3a8heyybo9l33vt2jyuah4sbg"); // rc = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'('))); UNSUPPORTED("2ldg889rgl2rsu9pf2qjc5fi2"); // s = base; UNSUPPORTED("f387esbkeildkayz3s6urngtw"); // while (*s) { UNSUPPORTED("b9orhgtvsuli8mn7x7lgs093v"); // if ((*s == '(') || (*s == ')') || (*s == '\\')) UNSUPPORTED("pcnzeru18grzobxc0w6l7egr"); // rc = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\\'))); UNSUPPORTED("3753vc4lhmsqbohl9szk717z"); // rc = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)*s++))); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("djzbkthk4ygy41r5ruh1iu8v"); // ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)')'))); UNSUPPORTED("c1g8fk8duz6f3rxq2rhjvyyij"); // if (base != ins) free (base); UNSUPPORTED("8phdgdnv0mzh2zr358vnxae4m"); // s = (((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf)); UNSUPPORTED("3y6wj3ntgmr1qkdpm7wp1dsch"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/routespl__c.java000066400000000000000000001777151312650303100224570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.common.memory__c.gmalloc; import static gen.lib.pathplan.route__c.Proutespline; import static gen.lib.pathplan.shortest__c.Pshortestpath; import static gen.lib.pathplan.util__c.make_polyline; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.cos; import static smetana.core.JUtils.sin; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.ABS; import static smetana.core.Macro.ALLOC; import static smetana.core.Macro.ALLOC_allocated2; import static smetana.core.Macro.ED_edge_type; import static smetana.core.Macro.ED_to_orig; import static smetana.core.Macro.INT_MAX; import static smetana.core.Macro.INT_MIN; import static smetana.core.Macro.MIN; import static smetana.core.Macro.N; import static smetana.core.Macro.NOT; import static smetana.core.Macro.RALLOC; import static smetana.core.Macro.UNSUPPORTED; import h.Agedge_s; import h.Pedge_t; import h.Ppoly_t; import h.ST_boxf; import h.boxf; import h.path; import h.pointf; import smetana.core.JUtils; import smetana.core.Memory; import smetana.core.Z; import smetana.core.__array_of_ptr__; import smetana.core.__array_of_struct__; import smetana.core.__ptr__; import smetana.core.__struct__; public class routespl__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 6fn146yunkq3g30gummlety1l // static int nedges, nboxes //private static int nedges, nboxes; //1 651u86vwr4psbjmrzsbg6zgi5 // static int routeinit //private static int routeinit; //1 bitbif2zv0lxox45wigfzbqcp // static pointf *ps //private static __ptr__ ps; //1 5m31ig8bxuefkdin279ih13kc // static int maxpn //private static int maxpn; //1 4u04uog28vlnmx0azm4y9qvj1 // static Ppoint_t *polypoints //private static __ptr__ polypoints; //1 eoo5tej8soeqa10cqz02mpetw // static int polypointn //private static int polypointn; //1 dr2m01yvkuh5brtywxzvn5tal // static Pedge_t *edges //private static __ptr__ edges; //1 cxjqaauevyqicged5zki42yg7 // static int edgen //private static int edgen; //3 7ebl6qohcfpf1b9ucih5r9qgp // pointf* simpleSplineRoute (pointf tp, pointf hp, Ppoly_t poly, int* n_spl_pts, int polyline) public static pointf simpleSplineRoute(final __struct__ tp, final __struct__ hp, final __struct__ poly, int[] n_spl_pts, boolean polyline) { // WARNING!! STRUCT return simpleSplineRoute_w_(tp.copy(), hp.copy(), poly.copy(), n_spl_pts, polyline); } private static pointf simpleSplineRoute_w_(final __struct__ tp, final __struct__ hp, final __struct__ poly, int[] n_spl_pts, boolean polyline) { ENTERING("7ebl6qohcfpf1b9ucih5r9qgp","simpleSplineRoute"); try { final __struct__ pl = JUtils.from(Ppoly_t.class), spl = JUtils.from(Ppoly_t.class); final __array_of_struct__ eps = __array_of_struct__.malloc(pointf.class, 2); final __array_of_struct__ evs = __array_of_struct__.malloc(pointf.class, 2); int i; eps.plus(0).setDouble("x", tp.getDouble("x")); eps.plus(0).setDouble("y", tp.getDouble("y")); eps.plus(1).setDouble("x", hp.getDouble("x")); eps.plus(1).setDouble("y", hp.getDouble("y")); if (Pshortestpath(poly.amp(), eps, pl.amp()) < 0) return null; if (polyline) make_polyline (pl, spl.amp()); else { if (poly.getInt("pn") > Z.z().edgen) { Z.z().edges = ALLOC(poly.getInt("pn"), Z.z().edges, Pedge_t.class); Z.z().edgen = poly.getInt("pn"); } for (i = 0; i < poly.getInt("pn"); i++) { Z.z().edges.plus(i).setStruct("a", poly.getArrayOfStruct("ps").plus(i).getStruct()); Z.z().edges.plus(i).setStruct("b", poly.getArrayOfStruct("ps").plus((i + 1) % poly.getInt("pn")).getStruct()); } evs.plus(0).setDouble("x", 0); evs.plus(0).setDouble("y", 0); evs.plus(1).setDouble("x", 0); evs.plus(1).setDouble("y", 0); if (Proutespline(Z.z().edges, poly.getInt("pn"), pl, evs.asPtr(), spl.amp()) < 0) return null; } if (mkspacep(spl.getInt("pn"))) return null; for (i = 0; i < spl.getInt("pn"); i++) { Z.z().ps.plus(i).setStruct(spl.getArrayOfPtr("ps").plus(i).getStruct()); } n_spl_pts[0] = spl.getInt("pn"); return (pointf) Z.z().ps; } finally { LEAVING("7ebl6qohcfpf1b9ucih5r9qgp","simpleSplineRoute"); } } //3 bfsrazjf3vkf12stnke48vc8t // int routesplinesinit() public static int routesplinesinit() { ENTERING("bfsrazjf3vkf12stnke48vc8t","routesplinesinit"); try { if (++Z.z().routeinit > 1) return 0; if (N(Z.z().ps = gmalloc(sizeof(pointf.class, 300)))) { UNSUPPORTED("2qoo3na2ur9oh7hmvt6xv1txd"); // agerr(AGERR, "routesplinesinit: cannot allocate ps\n"); UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; } Z.z().maxpn = 300; Z.z().nedges = 0; Z.z().nboxes = 0; /*if (Verbose) start_timer();*/ return 0; } finally { LEAVING("bfsrazjf3vkf12stnke48vc8t","routesplinesinit"); } } //3 55j3tny5cxemrsvrt3m21jxg8 // void routesplinesterm() public static void routesplinesterm() { ENTERING("55j3tny5cxemrsvrt3m21jxg8","routesplinesterm"); try { if (--Z.z().routeinit > 0) return; Memory.free(Z.z().ps); /*if (Verbose) fprintf(stderr, "routesplines: %d edges, %d boxes %.2f sec\n", nedges, nboxes, elapsed_sec());*/ } finally { LEAVING("55j3tny5cxemrsvrt3m21jxg8","routesplinesterm"); } } //3 cu8ssjizw7ileqe9u7tcclq7k // static void limitBoxes (boxf* boxes, int boxn, pointf *pps, int pn, int delta) public static void limitBoxes(__array_of_ptr__ boxes, int boxn, __ptr__ pps, int pn, int delta) { ENTERING("cu8ssjizw7ileqe9u7tcclq7k","limitBoxes"); try { int bi, si, splinepi; double t; final __array_of_struct__ sp = __array_of_struct__.malloc(pointf.class, 4); int num_div = delta * boxn; for (splinepi = 0; splinepi + 3 < pn; splinepi += 3) { for (si = 0; si <= num_div; si++) { t = si / (double)num_div; sp.plus(0).getStruct().___(pps.plus(splinepi).getStruct()); sp.plus(1).getStruct().___(pps.plus(splinepi+1).getStruct()); sp.plus(2).getStruct().___(pps.plus(splinepi+2).getStruct()); sp.plus(3).getStruct().___(pps.plus(splinepi+3).getStruct()); sp.plus(0).setDouble("x", sp.plus(0).getDouble("x") + t * (sp.plus(1).getDouble("x") - sp.plus(0).getDouble("x"))); sp.plus(0).setDouble("y", sp.plus(0).getDouble("y") + t * (sp.plus(1).getDouble("y") - sp.plus(0).getDouble("y"))); sp.plus(1).setDouble("x", sp.plus(1).getDouble("x") + t * (sp.plus(2).getDouble("x") - sp.plus(1).getDouble("x"))); sp.plus(1).setDouble("y", sp.plus(1).getDouble("y") + t * (sp.plus(2).getDouble("y") - sp.plus(1).getDouble("y"))); sp.plus(2).setDouble("x", sp.plus(2).getDouble("x") + t * (sp.plus(3).getDouble("x") - sp.plus(2).getDouble("x"))); sp.plus(2).setDouble("y", sp.plus(2).getDouble("y") + t * (sp.plus(3).getDouble("y") - sp.plus(2).getDouble("y"))); sp.plus(0).setDouble("x", sp.plus(0).getDouble("x") + t * (sp.plus(1).getDouble("x") - sp.plus(0).getDouble("x"))); sp.plus(0).setDouble("y", sp.plus(0).getDouble("y") + t * (sp.plus(1).getDouble("y") - sp.plus(0).getDouble("y"))); sp.plus(1).setDouble("x", sp.plus(1).getDouble("x") + t * (sp.plus(2).getDouble("x") - sp.plus(1).getDouble("x"))); sp.plus(1).setDouble("y", sp.plus(1).getDouble("y") + t * (sp.plus(2).getDouble("y") - sp.plus(1).getDouble("y"))); sp.plus(0).setDouble("x", sp.plus(0).getDouble("x") + t * (sp.plus(1).getDouble("x") - sp.plus(0).getDouble("x"))); sp.plus(0).setDouble("y", sp.plus(0).getDouble("y") + t * (sp.plus(1).getDouble("y") - sp.plus(0).getDouble("y"))); for (bi = 0; bi < boxn; bi++) { /* this tested ok on 64bit machines, but on 32bit we need this FUDGE * or graphs/directed/records.gv fails */ if (sp.plus(0).getDouble("y") <= boxes.plus(bi).getStruct("UR").getDouble("y")+.0001 && sp.plus(0).getDouble("y") >= boxes.plus(bi).getStruct("LL").getDouble("y")-.0001) { if (boxes.plus(bi).getStruct("LL").getDouble("x") > sp.plus(0).getDouble("x")) boxes.plus(bi).getStruct("LL").setDouble("x", sp.plus(0).getDouble("x")); if (boxes.plus(bi).getStruct("UR").getDouble("x") < sp.plus(0).getDouble("x")) boxes.plus(bi).getStruct("UR").setDouble("x", sp.plus(0).getDouble("x")); } } } } } finally { LEAVING("cu8ssjizw7ileqe9u7tcclq7k","limitBoxes"); } } //3 3mcnemqisisnqtd4mr72ej76y // static pointf *_routesplines(path * pp, int *npoints, int polyline) public static __ptr__ _routesplines(path pp, int npoints[], int polyline) { ENTERING("3mcnemqisisnqtd4mr72ej76y","_routesplines"); try { final __struct__ poly = JUtils.from(Ppoly_t.class); final __struct__ pl = JUtils.from(Ppoly_t.class), spl = JUtils.from(Ppoly_t.class); int splinepi; final __array_of_struct__ eps = __array_of_struct__.malloc(pointf.class, 2); final __array_of_struct__ evs = __array_of_struct__.malloc(pointf.class, 2); int edgei, prev, next; int pi=0, bi; __array_of_ptr__ boxes; int boxn; Agedge_s realedge; int flip; int loopcnt, delta = 10; boolean unbounded; Z.z().nedges++; Z.z().nboxes += pp.getInt("nbox"); for (realedge = (Agedge_s) pp.getPtr("data").castTo(Agedge_s.class); realedge!=null && ED_edge_type(realedge) != 0; realedge = ED_to_orig(realedge)); if (N(realedge)) { UNSUPPORTED("agerr(AGERR, _in routesplines, cannot find NORMAL edge"); return null; } boxes = pp.getArrayOfPtr("boxes"); boxn = pp.getInt("nbox"); if (checkpath(boxn, boxes, pp)!=0) return null; if (boxn * 8 > Z.z().polypointn) { Z.z().polypoints = ALLOC_allocated2(boxn * 8, Z.z().polypoints, pointf.class); Z.z().polypointn = boxn * 8; } if ((boxn > 1) && (((ST_boxf)boxes.plus(0).getStruct()).LL.y > ((ST_boxf)boxes.plus(1).getStruct()).LL.y)) { flip = 1; for (bi = 0; bi < boxn; bi++) { double v = ((ST_boxf)boxes.plus(bi).getStruct()).UR.y; ((ST_boxf)boxes.plus(bi).getStruct()).UR.y= -1*((ST_boxf)boxes.plus(bi).getStruct()).LL.y; ((ST_boxf)boxes.plus(bi).getStruct()).LL.y = -v; } } else flip = 0; if (NEQ(agtail(realedge), aghead(realedge))) { /* I assume that the path goes either down only or up - right - down */ for (bi = 0, pi = 0; bi < boxn; bi++) { next = prev = 0; if (bi > 0) prev = (((ST_boxf)boxes.plus(bi).getStruct()).LL.y > ((ST_boxf)boxes.plus(bi-1).getStruct()).LL.y) ? -1 : 1; if (bi < boxn - 1) next = (((ST_boxf)boxes.plus(bi+1).getStruct()).LL.y > ((ST_boxf)boxes.plus(bi).getStruct()).LL.y) ? 1 : -1; if (prev != next) { if (next == -1 || prev == 1) { Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x); Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y); Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x); Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y); } else { Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x); Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y); Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x); Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y); } } else if (prev == 0) { /* single box */ UNSUPPORTED("2bfai79qe7cec0rljrn56jg2f"); // polypoints[pi].x = boxes[bi].LL.x; UNSUPPORTED("cjppvcr7k9pknjrjugccsky56"); // polypoints[pi++].y = boxes[bi].UR.y; UNSUPPORTED("2bfai79qe7cec0rljrn56jg2f"); // polypoints[pi].x = boxes[bi].LL.x; UNSUPPORTED("99xeozpks5v0iza4sv2occuuq"); // polypoints[pi++].y = boxes[bi].LL.y; } else { if (N(prev == -1 && next == -1)) { UNSUPPORTED("cgpvvfb9phbipyhij0cjh1nmi"); // agerr(AGERR, "in routesplines, illegal values of prev %d and next %d, line %d\n", prev, next, 444); UNSUPPORTED("9idk92zg2ysz316lfwzvvvde6"); // return NULL; } } } for (bi = boxn - 1; bi >= 0; bi--) { next = prev = 0; if (bi < boxn - 1) prev = (((ST_boxf)boxes.plus(bi).getStruct()).LL.y > ((ST_boxf)boxes.plus(bi+1).getStruct()).LL.y) ? -1 : 1; if (bi > 0) next = (((ST_boxf)boxes.plus(bi-1).getStruct()).LL.y > ((ST_boxf)boxes.plus(bi).getStruct()).LL.y) ? 1 : -1; if (prev != next) { if (next == -1 || prev == 1 ) { Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x); Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y); Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x); Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y); } else { Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x); Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y); Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x); Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y); } } else if (prev == 0) { /* single box */ UNSUPPORTED("ya84m81ogarx28l99om39lba"); // polypoints[pi].x = boxes[bi].UR.x; UNSUPPORTED("99xeozpks5v0iza4sv2occuuq"); // polypoints[pi++].y = boxes[bi].LL.y; UNSUPPORTED("ya84m81ogarx28l99om39lba"); // polypoints[pi].x = boxes[bi].UR.x; UNSUPPORTED("cjppvcr7k9pknjrjugccsky56"); // polypoints[pi++].y = boxes[bi].UR.y; } else { if (N(prev == -1 && next == -1)) { UNSUPPORTED("87y5d0ts6xdjyx905bha50f3s"); // /* it went badly, e.g. degenerate box in boxlist */ UNSUPPORTED("1qt7hixteu3pt64wk1sqw352a"); // agerr(AGERR, "in routesplines, illegal values of prev %d and next %d, line %d\n", prev, next, 476); UNSUPPORTED("35untdbpd42pt4c74gjbxqx7q"); // return NULL; /* for correctness sake, it's best to just stop */ } Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x); Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y); Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x); Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y); Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x); Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y); Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x); Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y); } } } else { UNSUPPORTED("1izvmtfwbnl5xq4u2x5fdraxp"); // agerr(AGERR, "in routesplines, edge is a loop at %s\n", agnameof(aghead(realedge))); UNSUPPORTED("11hwqop4xebvtcskop4uhpp01"); // return NULL; } if (flip!=0) { int i; for (bi = 0; bi < boxn; bi++) { int v = (int) ((ST_boxf)boxes.plus(bi).getStruct()).UR.y; ((ST_boxf)boxes.plus(bi).getStruct()).UR.y = -1*((ST_boxf)boxes.plus(bi).getStruct()).LL.y; ((ST_boxf)boxes.plus(bi).getStruct()).LL.y = -v; } for (i = 0; i < pi; i++) Z.z().polypoints.plus(i).setDouble("y", -1 * Z.z().polypoints.plus(i).getDouble("y")); } for (bi = 0; bi < boxn; bi++) { ((ST_boxf)boxes.plus(bi).getStruct()).LL.x = INT_MAX; ((ST_boxf)boxes.plus(bi).getStruct()).UR.x = INT_MIN; } poly.setPtr("ps", Z.z().polypoints); poly.setInt("pn", pi); eps.plus(0).getStruct().setDouble("x", pp.getStruct("start").getStruct("p").getDouble("x")); eps.plus(0).getStruct().setDouble("y", pp.getStruct("start").getStruct("p").getDouble("y")); eps.plus(1).getStruct().setDouble("x", pp.getStruct("end").getStruct("p").getDouble("x")); eps.plus(1).getStruct().setDouble("y", pp.getStruct("end").getStruct("p").getDouble("y")); if (Pshortestpath((Ppoly_t) poly.amp(), eps, (Ppoly_t) pl.amp()) < 0) { System.err.println("in routesplines, Pshortestpath failed\n"); return null; } if (polyline!=0) { UNSUPPORTED("48veztc3k9dfw8tqolu7jsktk"); // make_polyline (pl, &spl); } else { if (poly.getInt("pn") > Z.z().edgen) { Z.z().edges = ALLOC_allocated2(poly.getInt("pn"), Z.z().edges, Pedge_t.class); Z.z().edgen = poly.getInt("pn"); } for (edgei = 0; edgei < poly.getInt("pn"); edgei++) { Z.z().edges.plus(edgei).setStruct("a", Z.z().polypoints.plus(edgei).getStruct()); Z.z().edges.plus(edgei).setStruct("b", Z.z().polypoints.plus((edgei + 1) % poly.getInt("pn")).getStruct()); } if (pp.getStruct("start").getBoolean("constrained")) { evs.plus(0).getStruct().setDouble("x", cos(pp.getStruct("start").getDouble("theta"))); evs.plus(0).getStruct().setDouble("y", sin(pp.getStruct("start").getDouble("theta"))); } else { evs.plus(0).getStruct().setDouble("x", 0); evs.plus(0).getStruct().setDouble("y", 0); } if (pp.getStruct("end").getBoolean("constrained")) { evs.plus(1).getStruct().setDouble("x", -cos(pp.getStruct("end").getDouble("theta"))); evs.plus(1).getStruct().setDouble("y", -sin(pp.getStruct("end").getDouble("theta"))); } else { evs.plus(1).getStruct().setDouble("x", 0); evs.plus(1).getStruct().setDouble("y", 0); } if (Proutespline(Z.z().edges, poly.getInt("pn"), pl, evs.asPtr(), spl.amp()) < 0) { UNSUPPORTED("elkeyywrfd4hq75w7toc94rzs"); // agerr(AGERR, "in routesplines, Proutespline failed\n"); UNSUPPORTED("7t3fvwp9cv90qu5bdjdglcgtk"); // return NULL; } } if (mkspacep(spl.getInt("pn"))) UNSUPPORTED("7x5kpcbvg4va887hky7ufm45y"); // return NULL; /* Bailout if no memory left */ for (bi = 0; bi < boxn; bi++) { boxes.plus(bi).getStruct("LL").setDouble("x", INT_MAX); boxes.plus(bi).getStruct("UR").setDouble("x", INT_MIN); } unbounded = NOT(false); for (splinepi = 0; splinepi < spl.getInt("pn"); splinepi++) { Z.z().ps.plus(splinepi).setStruct(spl.getArrayOfPtr("ps").plus(splinepi).getStruct()); } for (loopcnt = 0; unbounded && (loopcnt < 15); loopcnt++) { limitBoxes (boxes, boxn, Z.z().ps, spl.getInt("pn"), delta); /* The following check is necessary because if a box is not very * high, it is possible that the sampling above might miss it. * Therefore, we make the sample finer until all boxes have * valid values. cf. bug 456. Would making sp[] pointfs help? */ for (bi = 0; bi < boxn; bi++) { /* these fp equality tests are used only to detect if the * values have been changed since initialization - ok */ if ((boxes.plus(bi).getStruct("LL").getDouble("x") == INT_MAX) || (boxes.plus(bi).getStruct("UR").getDouble("x") == INT_MIN)) { delta *= 2; /* try again with a finer interval */ if (delta > INT_MAX/boxn) /* in limitBoxes, boxn*delta must fit in an int, so give up */ loopcnt = 15; break; } } if (bi == boxn) unbounded = false; } if (unbounded) { /* Either an extremely short, even degenerate, box, or some failure with the path * planner causing the spline to miss some boxes. In any case, use the shortest path * to bound the boxes. This will probably mean a bad edge, but we avoid an infinite * loop and we can see the bad edge, and even use the showboxes scaffolding. */ final __struct__ polyspl = JUtils.from(Ppoly_t.class); System.err.println("Unable to reclaim box space in spline routing for edge \"%s\" -> \"%s\". Something is probably seriously wrong.\n"); make_polyline (pl, polyspl.amp()); limitBoxes (boxes, boxn, polyspl.getPtr("ps"), polyspl.getInt("pn"), 10); Memory.free (polyspl.getPtr("ps")); } npoints[0] = spl.getInt("pn"); return Z.z().ps; } finally { LEAVING("3mcnemqisisnqtd4mr72ej76y","_routesplines"); } } //3 axqoytp2rpr8crajhkuvns6q9 // pointf *routesplines(path * pp, int *npoints) public static pointf routesplines(path pp, int npoints[]) { ENTERING("axqoytp2rpr8crajhkuvns6q9","routesplines"); try { return (pointf) _routesplines (pp, npoints, 0); } finally { LEAVING("axqoytp2rpr8crajhkuvns6q9","routesplines"); } } //3 2v22s41xitwnnsljk9n01nrcy // pointf *routepolylines(path * pp, int *npoints) public static pointf routepolylines(path pp, int npoints[]) { ENTERING("2v22s41xitwnnsljk9n01nrcy","routepolylines"); try { UNSUPPORTED("1kjkc6bl8zpf8zjcwgbyni9p3"); // pointf *routepolylines(path * pp, int *npoints) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6wf7p4npeom96y0l1v39essmx"); // return _routesplines (pp, npoints, 1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("2v22s41xitwnnsljk9n01nrcy","routepolylines"); } } //3 65qv6x7ghwyt6hey5qd8cgizn // static int overlap(int i0, int i1, int j0, int j1) public static int overlap(double i0, double i1, double j0, double j1) {return overlap((int) i0, (int) i1, (int) j0, (int) j1);} public static int overlap(int i0, int i1, int j0, int j1) { ENTERING("65qv6x7ghwyt6hey5qd8cgizn","overlap"); try { /* i'll bet there's an elegant way to do this */ if (i1 <= j0) return 0; if (i0 >= j1) return 0; if ((j0 <= i0) && (i0 <= j1)) return (j1 - i0); if ((j0 <= i1) && (i1 <= j1)) return (i1 - j0); return MIN(i1 - i0, j1 - j0); } finally { LEAVING("65qv6x7ghwyt6hey5qd8cgizn","overlap"); } } //3 dxqjhiid5f58b9gjxp0v3j97b // static int checkpath(int boxn, boxf* boxes, path* thepath) public static int checkpath(int boxn, __array_of_ptr__ boxes, path thepath) { ENTERING("dxqjhiid5f58b9gjxp0v3j97b","checkpath"); try { boxf ba, bb; int bi, i, errs, l, r, d, u; int xoverlap, yoverlap; /* remove degenerate boxes. */ i = 0; for (bi = 0; bi < boxn; bi++) { if (ABS(((ST_boxf)boxes.plus(bi).getStruct()).LL.y - ((ST_boxf)boxes.plus(bi).getStruct()).UR.y) < .01) continue; if (ABS(((ST_boxf)boxes.plus(bi).getStruct()).LL.x - ((ST_boxf)boxes.plus(bi).getStruct()).UR.x) < .01) continue; if (i != bi) boxes.plus(i).setStruct(boxes.plus(bi).getStruct()); i++; } boxn = i; ba = boxes.plus(0).getStruct().amp(); if (ba.getStruct("LL").getDouble("x") > ba.getStruct("UR").getDouble("x") || ba.getStruct("LL").getDouble("y") > ba.getStruct("UR").getDouble("y")) { UNSUPPORTED("39tznwvf6k5lgj78jp32p0kfl"); // agerr(AGERR, "in checkpath, box 0 has LL coord > UR coord\n"); UNSUPPORTED("evdvb9esh16y8zeoczxhcz7xm"); // printpath(thepath); UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; } for (bi = 0; bi < boxn - 1; bi++) { ba = boxes.plus(bi).getStruct().amp(); bb = boxes.plus(bi + 1).getStruct().amp(); if (bb.getStruct("LL").getDouble("x") > bb.getStruct("UR").getDouble("x") || bb.getStruct("LL").getDouble("y") > bb.getStruct("UR").getDouble("y")) { UNSUPPORTED("c8oodo0ge4n4dglb28fvf610v"); // agerr(AGERR, "in checkpath, box %d has LL coord > UR coord\n", UNSUPPORTED("929pkk2ob1lh7hfe4scuoo5pn"); // bi + 1); UNSUPPORTED("2m9o6g4nneiul4gt8xb9yb9zi"); // printpath(thepath); UNSUPPORTED("btmwubugs9vkexo4yb7a5nqel"); // return 1; } l = (ba.getStruct("UR").getDouble("x") < bb.getStruct("LL").getDouble("x")) ? 1 : 0; r = (ba.getStruct("LL").getDouble("x") > bb.getStruct("UR").getDouble("x")) ? 1 : 0; d = (ba.getStruct("UR").getDouble("y") < bb.getStruct("LL").getDouble("y")) ? 1 : 0; u = (ba.getStruct("LL").getDouble("y") > bb.getStruct("UR").getDouble("y")) ? 1 : 0; errs = l + r + d + u; /*if (errs > 0 && Verbose) { fprintf(stderr, "in checkpath, boxes %d and %d don't touch\n", bi, bi + 1); printpath(thepath); }*/ if (errs > 0) { int xy; if (l == 1) { xy = (int) ba.getStruct("UR").getDouble("x"); ba.getStruct("UR").setDouble("x", bb.getStruct("LL").getDouble("x")); bb.getStruct("LL").setDouble("x", xy); l = 0; } else if (r == 1) { xy = (int)(ba.getStruct("LL").getDouble("x")); ba.getStruct("LL").setDouble("x", bb.getStruct("UR").getDouble("x")); bb.getStruct("UR").setDouble("x", xy); r = 0; } else if (d == 1) UNSUPPORTED("eg1w87s0blk4i583rqumhmv6n"); // xy = ba.getStruct("UR").getDouble("y"), ba.getStruct("UR").getDouble("y") = bb.getStruct("LL").getDouble("y"), bb.getStruct("LL").getDouble("y") = xy, d = 0; else if (u == 1) UNSUPPORTED("5kcd52bwvbxxs0md0enfs100u"); // xy = ba.getStruct("LL").getDouble("y"), ba.getStruct("LL").getDouble("y") = bb.getStruct("UR").getDouble("y"), bb.getStruct("UR").getDouble("y") = xy, u = 0; for (i = 0; i < errs - 1; i++) { UNSUPPORTED("as3p2ldwbg3rbgy64oxx5phar"); // if (l == 1) UNSUPPORTED("efz1z5cfywki1k6q6avldku9z"); // xy = (ba.getStruct("UR").getDouble("x") + bb.getStruct("LL").getDouble("x")) / 2.0 + 0.5, ba.getStruct("UR").getDouble("x") = UNSUPPORTED("6dfh7cf1xptapqd1mcqtxjrxa"); // bb.getStruct("LL").getDouble("x") = xy, l = 0; UNSUPPORTED("ang3qytu77fd5owijwbnmkdav"); // else if (r == 1) UNSUPPORTED("67ehof0qqlk339zgl0sqwfu5r"); // xy = (ba.getStruct("LL").getDouble("x") + bb.getStruct("UR").getDouble("x")) / 2.0 + 0.5, ba.getStruct("LL").getDouble("x") = UNSUPPORTED("llmwvndoq1ne9c62ohtstkwa"); // bb.getStruct("UR").getDouble("x") = xy, r = 0; UNSUPPORTED("3ce9i9asrqbuog7v1tdurqo6e"); // else if (d == 1) UNSUPPORTED("3mibjrb2jtfextkg9ac5k9spl"); // xy = (ba.getStruct("UR").getDouble("y") + bb.getStruct("LL").getDouble("y")) / 2.0 + 0.5, ba.getStruct("UR").getDouble("y") = UNSUPPORTED("bccpbv2n38c5utkfh7msoc2y"); // bb.getStruct("LL").getDouble("y") = xy, d = 0; UNSUPPORTED("7302rnmwdji9n7txquk8k36to"); // else if (u == 1) UNSUPPORTED("9oqpoodvpheztihe63p40guof"); // xy = (ba.getStruct("LL").getDouble("y") + bb.getStruct("UR").getDouble("y")) / 2.0 + 0.5, ba.getStruct("LL").getDouble("y") = UNSUPPORTED("2cnb1bdjh6y26f98vonla73qa"); // bb.getStruct("UR").getDouble("y") = xy, u = 0; } } /* check for overlapping boxes */ xoverlap = overlap(ba.getStruct("LL").getDouble("x"), ba.getStruct("UR").getDouble("x"), bb.getStruct("LL").getDouble("x"), bb.getStruct("UR").getDouble("x")); yoverlap = overlap(ba.getStruct("LL").getDouble("y"), ba.getStruct("UR").getDouble("y"), bb.getStruct("LL").getDouble("y"), bb.getStruct("UR").getDouble("y")); if (xoverlap!=0 && yoverlap!=0) { if (xoverlap < yoverlap) { if (ba.getStruct("UR").getDouble("x") - ba.getStruct("LL").getDouble("x") > bb.getStruct("UR").getDouble("x") - bb.getStruct("LL").getDouble("x")) { /* take space from ba */ UNSUPPORTED("5dqxf3gq05pjtobtnru1g2tuj"); // if (ba.getStruct("UR").getDouble("x") < bb.getStruct("UR").getDouble("x")) UNSUPPORTED("8gz6k803qp9zyw9s459cpp039"); // ba.getStruct("UR").getDouble("x") = bb.getStruct("LL").getDouble("x"); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("5r6ck8hfb1cxywn9go61se9kx"); // ba.getStruct("LL").getDouble("x") = bb.getStruct("UR").getDouble("x"); } else { /* take space from bb */ if (ba.getStruct("UR").getDouble("x") < bb.getStruct("UR").getDouble("x")) bb.getStruct("LL").setDouble("x", ba.getStruct("UR").getDouble("x")); else bb.getStruct("UR").setDouble("x", ba.getStruct("LL").getDouble("x")); } } else { /* symmetric for y coords */ if (ba.getStruct("UR").getDouble("y") - ba.getStruct("LL").getDouble("y") > bb.getStruct("UR").getDouble("y") - bb.getStruct("LL").getDouble("y")) { /* take space from ba */ if (ba.getStruct("UR").getDouble("y") < bb.getStruct("UR").getDouble("y")) ba.getStruct("UR").setDouble("y", bb.getStruct("LL").getDouble("y")); else ba.getStruct("LL").setDouble("y", bb.getStruct("UR").getDouble("y")); } else { /* take space from bb */ if (ba.getStruct("UR").getDouble("y") < bb.getStruct("UR").getDouble("y")) bb.getStruct("LL").setDouble("y", ba.getStruct("UR").getDouble("y")); else bb.getStruct("UR").setDouble("y", ba.getStruct("LL").getDouble("y")); } } } } if (thepath.getStruct("start").getStruct("p").getDouble("x") < ((ST_boxf)boxes.plus(0).getStruct()).LL.x || thepath.getStruct("start").getStruct("p").getDouble("x") > ((ST_boxf)boxes.plus(0).getStruct()).UR.x || thepath.getStruct("start").getStruct("p").getDouble("y") < ((ST_boxf)boxes.plus(0).getStruct()).LL.y || thepath.getStruct("start").getStruct("p").getDouble("y") > ((ST_boxf)boxes.plus(0).getStruct()).UR.y) { /*if (Verbose) { fprintf(stderr, "in checkpath, start port not in first box\n"); printpath(thepath); }*/ if (thepath.getStruct("start").getStruct("p").getDouble("x") < ((ST_boxf)boxes.plus(0).getStruct()).LL.x) thepath.getStruct("start").getStruct("p").setDouble("x", ((ST_boxf)boxes.plus(0).getStruct()).LL.x); if (thepath.getStruct("start").getStruct("p").getDouble("x") > ((ST_boxf)boxes.plus(0).getStruct()).UR.x) thepath.getStruct("start").getStruct("p").setDouble("x", ((ST_boxf)boxes.plus(0).getStruct()).UR.x); if (thepath.getStruct("start").getStruct("p").getDouble("y") < ((ST_boxf)boxes.plus(0).getStruct()).LL.y) thepath.getStruct("start").getStruct("p").setDouble("y", ((ST_boxf)boxes.plus(0).getStruct()).LL.y); if (thepath.getStruct("start").getStruct("p").getDouble("y") > ((ST_boxf)boxes.plus(0).getStruct()).UR.y) thepath.getStruct("start").getStruct("p").setDouble("y", ((ST_boxf)boxes.plus(0).getStruct()).UR.y); } if (thepath.getStruct("end").getStruct("p").getDouble("x") < ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.x || thepath.getStruct("end").getStruct("p").getDouble("x") > ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.x || thepath.getStruct("end").getStruct("p").getDouble("y") < ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.y || thepath.getStruct("end").getStruct("p").getDouble("y") > ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.y) { /*if (Verbose) { fprintf(stderr, "in checkpath, end port not in last box\n"); printpath(thepath); }*/ if (thepath.getStruct("end").getStruct("p").getDouble("x") < ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.x) thepath.getStruct("end").getStruct("p").setDouble("x", ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.x); if (thepath.getStruct("end").getStruct("p").getDouble("x") > ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.x) thepath.getStruct("end").getStruct("p").setDouble("x", ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.x); if (thepath.getStruct("end").getStruct("p").getDouble("y") < ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.y) thepath.getStruct("end").getStruct("p").setDouble("y", ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.y); if (thepath.getStruct("end").getStruct("p").getDouble("y") > ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.y) thepath.getStruct("end").getStruct("p").setDouble("y", ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.y); } return 0; } finally { LEAVING("dxqjhiid5f58b9gjxp0v3j97b","checkpath"); } } //3 de6jvvw786rx88318tuuqywgq // static int mkspacep(int size) public static boolean mkspacep(int size) { ENTERING("de6jvvw786rx88318tuuqywgq","mkspacep"); try { if (size > Z.z().maxpn) { int newmax = Z.z().maxpn + (size / 300 + 1) * 300; Z.z().ps = RALLOC(newmax, Z.z().ps, pointf.class); if (N(Z.z().ps)) { UNSUPPORTED("ds2v91aohji00tc7zmjuc3v6q"); // agerr(AGERR, "cannot re-allocate ps\n"); UNSUPPORTED("btmwubugs9vkexo4yb7a5nqel"); // return 1; } Z.z().maxpn = newmax; } return false; } finally { LEAVING("de6jvvw786rx88318tuuqywgq","mkspacep"); } } //3 eoba7h2vv4nbevb7t3uj8xdxd // static void printpath(path * pp) public static Object printpath(Object... arg) { UNSUPPORTED("baqhg7gu97aw2vlb1lexu7ocs"); // static void printpath(path * pp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8k9loe0uz6grwq8fq5iqfih2c"); // int bi; UNSUPPORTED("hop7xuggqoec7e0p0gpzb5ys"); // fprintf(stderr, "%d boxes:\n", pp->nbox); UNSUPPORTED("fqxwgt6brxm5novm8sey6vp3"); // for (bi = 0; bi < pp->nbox; bi++) UNSUPPORTED("2n85v7ex13a1rhnx63lam2yth"); // fprintf(stderr, "%d (%.5g, %.5g), (%.5g, %.5g)\n", bi, UNSUPPORTED("86zhcjpiy229kbbomcqmj1bvn"); // pp->boxes[bi].LL.x, pp->boxes[bi].LL.y, UNSUPPORTED("dbddokl6i6319f232oqnbecmv"); // pp->boxes[bi].UR.x, pp->boxes[bi].UR.y); UNSUPPORTED("867y6166h7x6yibezm0cb0cf1"); // fprintf(stderr, "start port: (%.5g, %.5g), tangent angle: %.5g, %s\n", UNSUPPORTED("8nze219nhghn1a0uewjfq30xr"); // pp->start.p.x, pp->start.p.y, pp->start.theta, UNSUPPORTED("1apwqgz53812wo2ejjdn8zz3h"); // pp->start.constrained ? "constrained" : "not constrained"); UNSUPPORTED("4i8p7ha6i9bkydbg3i04ssmqj"); // fprintf(stderr, "end port: (%.5g, %.5g), tangent angle: %.5g, %s\n", UNSUPPORTED("32nx4386ouvodf09v0u4emfkv"); // pp->end.p.x, pp->end.p.y, pp->end.theta, UNSUPPORTED("d7cxrqy42haay280fzr1e81ts"); // pp->end.constrained ? "constrained" : "not constrained"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6u7mpvz8gz08jacc16azxm31t // static pointf get_centroid(Agraph_t *g) public static Object get_centroid(Object... arg) { UNSUPPORTED("2zo1gwkn1bj1agy4g8dxcfmh"); // static pointf get_centroid(Agraph_t *g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6reqgncjwgiuo3fb8rkhmtjv1"); // int cnt = 0; UNSUPPORTED("e1s7ys0dbvp12r1vo9cdl7sp0"); // static pointf sum = {0.0, 0.0}; UNSUPPORTED("4nx1l2ustbo0ptupk2ja9ekds"); // static Agraph_t *save; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("f17csexi07fwmif5pkxj2wgr1"); // sum.x = (GD_bb(g).LL.x + GD_bb(g).UR.x) / 2.0; UNSUPPORTED("8hoglhn0m8txbvp8w9fvo5cwt"); // sum.y = (GD_bb(g).LL.y + GD_bb(g).UR.y) / 2.0; UNSUPPORTED("e8d6re0f7zq6d14zby6lxtm85"); // return sum; UNSUPPORTED("5xw9py1u6p24f7e8fju2hsmw0"); // if (save == g) return sum; UNSUPPORTED("a1cvki7btccn0pv2gpusya4pt"); // save = g; UNSUPPORTED("7wq24g054kmx3aw25vk5ksj4"); // for (n = agfstnode(g); n; n = agnxtnode(g,n)) { UNSUPPORTED("7mgmah70c4cze5ed5zlcjfnpj"); // sum.x += ND_pos(n)[0]; UNSUPPORTED("3pk32i8trbg5r4tjfzi0xepsa"); // sum.y += ND_pos(n)[1]; UNSUPPORTED("77mslev6fngkh87g2jkd6j87j"); // cnt++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ci5ydgm2xpqvgw8qn5sz0317w"); // sum.x = sum.x / cnt; UNSUPPORTED("f1ofwhoh52tmotz2jx74ji4h5"); // sum.y = sum.y / cnt; UNSUPPORTED("e8d6re0f7zq6d14zby6lxtm85"); // return sum; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7l11iqopuq2ovl93rxmwkobas // static void bend(pointf spl[4], pointf centroid) public static Object bend(Object... arg) { UNSUPPORTED("4ftn2rr6n4c36dbi9as8t8g5h"); // static void bend(pointf spl[4], pointf centroid) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1xm6245yjmk93iuvvm93e1rci"); // pointf midpt,a; UNSUPPORTED("6zgogm7cuuy7co8hhompfoo5"); // double r; UNSUPPORTED("9lxjpyaeeeq2agdn7fik6kzhs"); // double dist,dx,dy; UNSUPPORTED("5bkk1q959a76y20xt0228j9d7"); // midpt.x = (spl[0].x + spl[3].x)/2.0; UNSUPPORTED("bfx7hrazv0khewy4e1ejp2kyb"); // midpt.y = (spl[0].y + spl[3].y)/2.0; UNSUPPORTED("9ydjah76t018eukiay40izzko"); // dx = (spl[3].x - spl[0].x); UNSUPPORTED("ap0c81vlb8rsjnpumymlnvzrl"); // dy = (spl[3].y - spl[0].y); UNSUPPORTED("dfs4ufukqaz9pf7ey54fbuaco"); // dist = sqrt(dx*dx + dy*dy); UNSUPPORTED("97su53ievky8nzohnw0en0a6e"); // r = dist/5.0; UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("cltgduzxyw56ktxuoeoqt4bkm"); // double vX = centroid.x - midpt.x; UNSUPPORTED("h4thwscp36mqboiugjkim5um"); // double vY = centroid.y - midpt.y; UNSUPPORTED("5q6wpyh72kf9xggy2oc929uc3"); // double magV = sqrt(vX*vX + vY*vY); UNSUPPORTED("1w5d961mnlte15ap13tdi5sv2"); // a.x = midpt.x - vX / magV * r; /* + would be closest point */ UNSUPPORTED("2oxj7hzixzdciej9f8u7xe49o"); // a.y = midpt.y - vY / magV * r; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("645kbqr5zpbe6vj9z3o2x5yrb"); // /* this can be improved */ UNSUPPORTED("72i64plp6g9odwle7ly7wgn4a"); // spl[1].x = spl[2].x = a.x; UNSUPPORTED("at1u1jcu4ulhd191p0rfc9e8j"); // spl[1].y = spl[2].y = a.y; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2erpr561ggowmq2m9465p5kqd // void makeStraightEdge(graph_t * g, edge_t * e, int et, splineInfo* sinfo) public static Object makeStraightEdge(Object... arg) { UNSUPPORTED("347dderd02mvlozoheqo4ejwo"); // void UNSUPPORTED("89t1p0jilkexnvk5i1vv1arc0"); // makeStraightEdge(graph_t * g, edge_t * e, int et, splineInfo* sinfo) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7pmvaj5a5w3pee9zkh22s4jt5"); // edge_t *e0; UNSUPPORTED("821nfzu5iwd6ayryeggj37hj2"); // edge_t** edges; UNSUPPORTED("19s88cb2xh6yjpqg0ip3ovi08"); // edge_t* elist[20]; UNSUPPORTED("5dd4r3fk1fwybt8tvqt4z4ta3"); // int i, e_cnt; UNSUPPORTED("310og4kvqsrlm4vs26zqw8c8p"); // e_cnt = 1; UNSUPPORTED("63kfcznl8sc62h1pj6k83cjn3"); // e0 = e; UNSUPPORTED("1451mr2njzp5m6mj64k6m36tf"); // while ((e0 = ED_to_virt(e0))) e_cnt++; UNSUPPORTED("1qovtxs3b3fa6ztj4wx1ahkf2"); // if (e_cnt <= 20) UNSUPPORTED("bp3rco5i77vkqs7wua0k7dbfo"); // edges = elist; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("8zwb4z35iwpyfy9d9n4b51yvh"); // edges = (edge_t**)zmalloc((e_cnt)*sizeof(edge_t*)); UNSUPPORTED("63kfcznl8sc62h1pj6k83cjn3"); // e0 = e; UNSUPPORTED("tf4qi3e2hsjxi603z57w6hx6"); // for (i = 0; i < e_cnt; i++) { UNSUPPORTED("106t1hs57atf24mgepcp9wwjw"); // edges[i] = e0; UNSUPPORTED("dfdtts0ddwzo6ffy5m1pso8t6"); // e0 = ED_to_virt(e0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("db2lohkib2plgiw7i90nxgkjk"); // makeStraightEdges (g, edges, e_cnt, et, sinfo); UNSUPPORTED("b1xlizpp11lvumjyajfk6mxky"); // if (e_cnt > 20) free (edges); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5ztzq4z6l8uj7cn0d1ke7n87p // void makeStraightEdges(graph_t * g, edge_t** edges, int e_cnt, int et, splineInfo* sinfo) public static Object makeStraightEdges(Object... arg) { UNSUPPORTED("347dderd02mvlozoheqo4ejwo"); // void UNSUPPORTED("ayvyrhydt6lt2z6uvpxyh2nxn"); // makeStraightEdges(graph_t * g, edge_t** edges, int e_cnt, int et, splineInfo* sinfo) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5u4oz0rrd9yradyuzr6qniald"); // pointf dumb[4]; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("8i0kwb8r6a2sj6nuvcy3bg9rx"); // node_t *head; UNSUPPORTED("b6jt41a0u7si76m5i0lookv4x"); // int curved = (et == (2 << 1)); UNSUPPORTED("2qrm9sibdk45g8miaadnlmf0z"); // pointf perp; UNSUPPORTED("e88o7l9ftcoq7m3q7njvm0hjb"); // pointf del; UNSUPPORTED("7pmvaj5a5w3pee9zkh22s4jt5"); // edge_t *e0; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("39f8qp0sf99n5kz67fe1sjnao"); // int i, j, xstep, dx; UNSUPPORTED("5qf9bfxinlwybt6vckmul8n5c"); // double l_perp; UNSUPPORTED("biqd62eqps6szrtk8p8sci92q"); // pointf dumber[4]; UNSUPPORTED("3ircl7kohy2qt6yrj3lysuhor"); // pointf p, q; UNSUPPORTED("b0ek9vxrdn6l0aponkc0ezxof"); // e = edges[0]; UNSUPPORTED("dul1axf6kjslblufm4omk5k32"); // n = agtail(e); UNSUPPORTED("9vcgvjkna4elv9mw682bcl1ry"); // head = aghead(e); UNSUPPORTED("b7iaxy7swt1knhamnyh2kvzlj"); // p = dumb[1] = dumb[0] = add_pointf(ND_coord(n), ED_tail_port(e).p); UNSUPPORTED("di45fpacl09sotabtbtbrk4bw"); // q = dumb[2] = dumb[3] = add_pointf(ND_coord(head), ED_head_port(e).p); UNSUPPORTED("9yh32i6luwgciwhvrfvt8aw1a"); // if ((e_cnt == 1) || Concentrate) { UNSUPPORTED("coqqvdvknesi3rdbg68qcc6vn"); // if (curved) bend(dumb,get_centroid(g)); UNSUPPORTED("ejd1q887zolcoupzctycvs5cv"); // clip_and_install(e, aghead(e), dumb, 4, sinfo); UNSUPPORTED("11s5bteac4942mtfiiy4qbq5t"); // addEdgeLabels(g, e, p, q); UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("63kfcznl8sc62h1pj6k83cjn3"); // e0 = e; UNSUPPORTED("6qz2idcg1avhf5caqig9ewcxv"); // if (APPROXEQPT(dumb[0], dumb[3], MILLIPOINT)) { UNSUPPORTED("738uip25tpsxuc3qvsye90wm7"); // /* degenerate case */ UNSUPPORTED("bq580fqcdybbomvpm4qmh5jtq"); // dumb[1] = dumb[0]; UNSUPPORTED("8u36zhoh7cpf1dv8ky0ngt667"); // dumb[2] = dumb[3]; UNSUPPORTED("bgjd2ldhnogj885m52k0nxe0d"); // del.x = 0; UNSUPPORTED("b1x914d40c33xvbmrjx82p563"); // del.y = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("3ksfb9uz6ssvxevjyvfdhcx15"); // perp.x = dumb[0].y - dumb[3].y; UNSUPPORTED("5qy02hcm7w3srhbws1saebqfk"); // perp.y = dumb[3].x - dumb[0].x; UNSUPPORTED("dkis85cdygy51zdkxp4m6zrfn"); // l_perp = LEN(perp.x, perp.y); UNSUPPORTED("60ix8gm4odvpl4njysex8efr4"); // xstep = GD_nodesep(g->root); UNSUPPORTED("9lo8r2t8xlvkucmcxj6r7zcjc"); // dx = xstep * (e_cnt - 1) / 2; UNSUPPORTED("29kynt0cc7vrimccs1typen4c"); // dumb[1].x = dumb[0].x + (dx * perp.x) / l_perp; UNSUPPORTED("8ffy5d6eokrgqxbbzlr3oeo7w"); // dumb[1].y = dumb[0].y + (dx * perp.y) / l_perp; UNSUPPORTED("5ss1wkhlrlbzhjmgex5g5td0j"); // dumb[2].x = dumb[3].x + (dx * perp.x) / l_perp; UNSUPPORTED("78hu4vl7uqaa2xjxh966lsl2z"); // dumb[2].y = dumb[3].y + (dx * perp.y) / l_perp; UNSUPPORTED("czezd6edgg6prqa40qn4cjk99"); // del.x = -xstep * perp.x / l_perp; UNSUPPORTED("brlhwaq7o7jlirlmbgsluegqc"); // del.y = -xstep * perp.y / l_perp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("tf4qi3e2hsjxi603z57w6hx6"); // for (i = 0; i < e_cnt; i++) { UNSUPPORTED("ezgc9yof65sv59h9bc3xaarqc"); // e0 = edges[i]; UNSUPPORTED("cdinc4vpag193dvamw97pjop"); // if (aghead(e0) == head) { UNSUPPORTED("70bzwaan8xb1eymztyzg8db4z"); // p = dumb[0]; UNSUPPORTED("7s7bzu6vkika1vowxe90pn8jl"); // q = dumb[3]; UNSUPPORTED("xt68cvhca5ecivsf28r6480k"); // for (j = 0; j < 4; j++) { UNSUPPORTED("euip77qbbydsz8d5amnoqz2wp"); // dumber[j] = dumb[j]; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("65qac2gqwej8ehvl0kr0azgoc"); // p = dumb[3]; UNSUPPORTED("1p3ys1kne72eu96ymhhd08ki9"); // q = dumb[0]; UNSUPPORTED("xt68cvhca5ecivsf28r6480k"); // for (j = 0; j < 4; j++) { UNSUPPORTED("cl6iic4z87ms6sxw112uwa8iq"); // dumber[3 - j] = dumb[j]; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("duxo2x55p2xtgyt3bec5dikrr"); // if (et == (3 << 1)) { UNSUPPORTED("3cuaxa5hpxf783bmxnedboxcr"); // Ppoint_t pts[4]; UNSUPPORTED("ey5aedx85s5fe7o31ioqdfot3"); // Ppolyline_t spl, line; UNSUPPORTED("8h359s121i98xp9zlr35vrgo9"); // line.pn = 4; UNSUPPORTED("57e37c2h1b5chgu6si6xi0cp4"); // line.ps = pts; UNSUPPORTED("phcktpjx2242lnn14blec2nu"); // for (j=0; j < 4; j++) { UNSUPPORTED("5tjkl4ul3rus6dd6xt7wfhv9a"); // pts[j] = dumber[j]; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5uszm2xlyusuekyfgopt358b8"); // make_polyline (line, &spl); UNSUPPORTED("4g67nliqr55eodkgwfdxbw87k"); // clip_and_install(e0, aghead(e0), spl.ps, spl.pn, sinfo); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("cs4gj80s0cjsf32zlavo9gg0q"); // clip_and_install(e0, aghead(e0), dumber, 4, sinfo); UNSUPPORTED("9g4169ket42x6bl41jrpu9vvm"); // addEdgeLabels(g, e0, p, q); UNSUPPORTED("8yg135oq3whkc9jbibbmn6v6a"); // dumb[1].x += del.x; UNSUPPORTED("9sw7189ksprjtdn4dlniux8z4"); // dumb[1].y += del.y; UNSUPPORTED("81xmo1my3dst3f72w8v2o3xb6"); // dumb[2].x += del.x; UNSUPPORTED("bba6iln00idzhk4wan9c8n5ja"); // dumb[2].y += del.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/shapes__c.java000066400000000000000000010230151312650303100220450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static gen.lib.cgraph.attr__c.agget; import static gen.lib.cgraph.obj__c.agraphof; import static gen.lib.common.geom__c.ccwrotatepf; import static gen.lib.common.memory__c.zmalloc; import static gen.lib.common.utils__c.late_double; import static gen.lib.common.utils__c.late_int; import static gen.lib.common.utils__c.late_string; import static gen.lib.common.utils__c.mapbool; import static gen.lib.common.utils__c.safefile; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.abs; import static smetana.core.JUtils.atan2; import static smetana.core.JUtils.cos; import static smetana.core.JUtils.enumAsInt; import static smetana.core.JUtils.sin; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtils.sqrt; import static smetana.core.JUtils.strcmp; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.GD_flip; import static smetana.core.Macro.GD_rankdir; import static smetana.core.Macro.INSIDE; import static smetana.core.Macro.MAX; import static smetana.core.Macro.M_PI; import static smetana.core.Macro.N; import static smetana.core.Macro.ND_has_port; import static smetana.core.Macro.ND_height; import static smetana.core.Macro.ND_ht; import static smetana.core.Macro.ND_label; import static smetana.core.Macro.ND_lw; import static smetana.core.Macro.ND_rw; import static smetana.core.Macro.ND_shape; import static smetana.core.Macro.ND_shape_info; import static smetana.core.Macro.ND_width; import static smetana.core.Macro.NOT; import static smetana.core.Macro.RADIANS; import static smetana.core.Macro.ROUND; import static smetana.core.Macro.SQR; import static smetana.core.Macro.SQRT2; import static smetana.core.Macro.UNSUPPORTED; import static smetana.core.Macro.fabs; import static smetana.core.Macro.hypot; import h.Agnode_s; import h.Agnodeinfo_t; import h.Agobj_s; import h.Agraphinfo_t; import h.ST_boxf; import h.ST_pointf; import h.ST_port; import h.boxf; import h.inside_t; import h.point; import h.pointf; import h.polygon_t; import h.port; import h.shape_desc; import h.shape_kind; import smetana.core.CFunctionImpl; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Memory; import smetana.core.Z; import smetana.core.__c__fields; import smetana.core.__ptr__; import smetana.core.__struct__; import smetana.core.amiga.StarArrayOfPtr; public class shapes__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 8h06z4a8bluhfqji3ysnlr3q8 // static port Center = /*private final static __struct__ Center = JUtils.from(port.class); static { Center.getStruct("p").setDouble("x", 0); Center.getStruct("p").setDouble("y", 0); Center.setDouble("theta", -1); Center.setPtr("bp", null); Center.setInt("defined", 0); Center.setInt("constrained", 0); Center.setInt("clip", 1); Center.setInt("dyna", 0); Center.setInt("order", 0); Center.setInt("side", 0); }*/ //1 ankops6rt7vi2sp8uptwl13x8 // static char *point_style[3] = //1 bdp4y4mfwmo49z2gqqtn77uhl // static poly_desc_t star_gen = //1 wr8d5qdzgrixltx1i3jol1p // static polygon_t p_polygon = //1 606ee1uued1p0d2o7h96efu9d // static polygon_t p_ellipse = /*public static final __struct__ p_ellipse = JUtils.from(polygon_t.class); static { p_ellipse.setInt("regular", 0); p_ellipse.setInt("peripheries", 1); p_ellipse.setInt("sides", 1); p_ellipse.setDouble("orientation", 0.); p_ellipse.setDouble("distortion", 0.); p_ellipse.setDouble("skew", 0.); }*/ //1 7tbw5besp7yern6vgsh7q9kop // static polygon_t p_circle = //1 ugo4ltv5o559q27tqn3r5bkl // static polygon_t p_egg = //1 9ftn1ffly0e6ffwzth9q47uz1 // static polygon_t p_triangle = //1 bw9fxu2ppyosdc0fayd10ik29 // static polygon_t p_box = /*public final static __struct__ p_box = JUtils.from(polygon_t.class); static { p_box.setInt("regular", 0); p_box.setInt("peripheries", 1); p_box.setInt("sides", 4); p_box.setDouble("orientation", 0.); p_box.setDouble("distortion", 0.); p_box.setDouble("skew", 0.); }*/ //1 8y2jx4eiuwgzz2taa1yvgkxrr // static polygon_t p_square = //1 cd8ymd9cpth6be42bx9hneg3k // static polygon_t p_plaintext = //1 3rr68w4p4ndvjnd8v8t8kyvof // static polygon_t p_diamond = //1 2vq6zitonpglah4otrj51bc // static polygon_t p_trapezium = //1 1cmprhux7ohd0kvyuccronajx // static polygon_t p_parallelogram = //1 cviu1ws3i3zudpmfyw9qde1g // static polygon_t p_house = //1 a2801adj9tjun8kavpqhec32e // static polygon_t p_pentagon = //1 bqxkc5i7w4qux0yj6fcvk6i3j // static polygon_t p_hexagon = //1 9dfxrmf5irbiyglpnjva9shjs // static polygon_t p_septagon = //1 8dintdmurw1k99hvel0eylkx // static polygon_t p_octagon = //1 u1t73h3kmbe3dl3nesrd3lli // static polygon_t p_note = //1 7rueooxoen3szgjos715fhyug // static polygon_t p_tab = //1 96p5brfwqh960bh90nko57q5y // static polygon_t p_folder = //1 asszwikv8vsd8r82g9g2dpib0 // static polygon_t p_box3d = //1 6svqv9h6e8w1upvle3kvqalpz // static polygon_t p_component = //1 eupkzejle0xh3lxkum31v0cym // static polygon_t p_underline = //1 dhsf0ibx3e26whwyfd0b6vwxe // static polygon_t p_doublecircle = //1 bnqceu0ie276qgntzbxk8rasy // static polygon_t p_invtriangle = //1 b4qh6rkxlk3dhq3za50nz70g9 // static polygon_t p_invtrapezium = //1 6975h7vqnuq4k5wgxu223q48a // static polygon_t p_invhouse = //1 1y504l91pfltem8lf4b9yugmh // static polygon_t p_doubleoctagon = //1 dejwm44vd6au8zngxmnsctb6h // static polygon_t p_tripleoctagon = //1 cm0diez4xczfsq1e49z5xyx9l // static polygon_t p_Mdiamond = //1 apcunukhbaji0umf6h2rajwjk // static polygon_t p_Msquare = //1 4aby821sp86fcw8lihjx1u1t5 // static polygon_t p_Mcircle = //1 8w3de46truvv9a11sqxbzi3gd // static polygon_t p_star = //1 2q69w7roanbt7ldossjvr2zpp // static polygon_t p_promoter = //1 8lsvyuy90dk6sxfcfd1g751u5 // static polygon_t p_cds = //1 73gtceras7h3x5rqur5zh20pm // static polygon_t p_terminator = //1 1ggglfhw5mb7uo3xo8fjy78ly // static polygon_t p_utr = //1 88ze1f92hnc02v5rtzevj6laf // static polygon_t p_insulator = //1 4gnk4h7twwbbkfsm2v2z5kpm3 // static polygon_t p_ribosite = //1 9p4ragp400660i10e7kw35j6h // static polygon_t p_rnastab = //1 cj4q7wai5wonk0e937ggwye7a // static polygon_t p_proteasesite = //1 cyxbjzhf18t5oktxygjnjdzvr // static polygon_t p_proteinstab = //1 9ddzvwdbr4wdohmir5y8a0fvd // static polygon_t p_primersite = //1 9istclblyhg67yp72g9xs9bwg // static polygon_t p_restrictionsite = //1 11kgrzyf2g5uc9sq4sbrd2smb // static polygon_t p_fivepoverhang = //1 6wf3da8bdlf8f8mo2u6czpmh0 // static polygon_t p_threepoverhang = //1 97vug445f04zvds36aoa0xylg // static polygon_t p_noverhang = //1 86ma4kod9amw5w024mnxyhfkj // static polygon_t p_assembly = //1 23k9m2gdw1fj7q7pdlrcsawl2 // static polygon_t p_signature = //1 ab97s73vl8iehclhx49x8wby5 // static polygon_t p_rpromoter = //1 1vm63ixobrd8mt967caec1jb // static polygon_t p_rarrow = //1 7k1qamsg50xfpik4fmzl26vs1 // static polygon_t p_larrow = //1 659vs9ww96a1ojqko4w4ezt71 // static polygon_t p_lpromoter = //1 dkgul6r2xulzqk2twms3pswmy // static shape_functions poly_fns = /*public final static __struct__ poly_fns = JUtils.from(shape_functions.class); static { poly_fns.setPtr("initfn", function(shapes__c.class, "poly_init")); poly_fns.setPtr("freefn", function(shapes__c.class, "poly_free")); poly_fns.setPtr("portfn", function(shapes__c.class, "poly_port")); poly_fns.setPtr("insidefn", function(shapes__c.class, "poly_inside")); poly_fns.setPtr("pboxfn", function(shapes__c.class, "poly_path")); poly_fns.setPtr("codefn", function(shapes__c.class, "poly_gencode")); }*/ //1 10ii4j68l49hzbm38qspv8azn // static shape_functions point_fns = //1 dkmcmdu75stv4q1ti875sba5e // static shape_functions record_fns = //1 4im5kxw9mpwlfxnlet8fn1lbb // static shape_functions epsf_fns = //1 6hffa4ola6av0i6ls8q0b11fp // static shape_functions star_fns = //1 dkylqbkoarh3lf3lwhnbg2k6n // static shape_desc Shapes[] = /*public static shape_desc Shapes[] = { __Shapes__("box", poly_fns.amp(), p_box.amp()), __Shapes__("ellipse", poly_fns.amp(), p_ellipse.amp()), __Shapes__(null, null, null) }; private static shape_desc __Shapes__(String s, shape_functions shape_functions, polygon_t polygon) { shape_desc result = (shape_desc) Memory.malloc(shape_desc.class); result.setPtr("name", s==null?null:new CString(s)); result.setPtr("fns", shape_functions); result.setPtr("polygon", polygon); return result; }*/ //3 a7copj498to9ai2kxtg728mex // static void unrecognized(node_t * n, char *p) public static Object unrecognized(Object... arg) { UNSUPPORTED("b1ov3x4b2q0ypsqw7wt22050l"); // static void unrecognized(node_t * n, char *p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5otcb2ylyazlaj74cmk4zgv4b"); // agerr(AGWARN, "node %s, port %s unrecognized\n", agnameof(n), p); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1nifps8w2xj8fe3s0e934h9oo // static double quant(double val, double q) public static Object quant(Object... arg) { UNSUPPORTED("d05378246jv81jc6hotxpmh7r"); // static double quant(double val, double q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("c1slbwawuf9uwqrj6g1sbwrg8"); // i = val / q; UNSUPPORTED("7erjq82ff3yxvdt20sqrud101"); // if (i * q + .00001 < val) UNSUPPORTED("chd2f5z6rt19lbaye25ej7q6j"); // i++; UNSUPPORTED("8wst82emkqjm2k0x2velpv3yg"); // return i * q; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eb4jyrh981apg1fy13fczexdl // static int same_side(pointf p0, pointf p1, pointf L0, pointf L1) public static boolean same_side(final __struct__ p0, final __struct__ p1, final __struct__ L0, final __struct__ L1) { // WARNING!! STRUCT return same_side_w_(p0.copy(), p1.copy(), L0.copy(), L1.copy()); } private static boolean same_side_w_(final __struct__ p0, final __struct__ p1, final __struct__ L0, final __struct__ L1) { ENTERING("eb4jyrh981apg1fy13fczexdl","same_side"); try { boolean s0, s1; double a, b, c; /* a x + b y = c */ a = -(L1.getDouble("y") - L0.getDouble("y")); b = (L1.getDouble("x") - L0.getDouble("x")); c = a * L0.getDouble("x") + b * L0.getDouble("y"); s0 = (a * p0.getDouble("x") + b * p0.getDouble("y") - c >= 0); s1 = (a * p1.getDouble("x") + b * p1.getDouble("y") - c >= 0); return (s0 == s1); } finally { LEAVING("eb4jyrh981apg1fy13fczexdl","same_side"); } } //3 52h7f4vpu1pj6fqh78wme87uk // static char* penColor(GVJ_t * job, node_t * n) public static Object penColor(Object... arg) { UNSUPPORTED("9y7ivrr4l5s7wx7hbbkjpd2fr"); // static UNSUPPORTED("eghunof84ahzb2mfw01ut6dd0"); // char* penColor(GVJ_t * job, node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5zltq70xm6o2q24ddyqe6noyn"); // char *color; UNSUPPORTED("bxrfaqnhsarmdux9xb7mmda3s"); // color = late_nnstring(n, N_color, ""); UNSUPPORTED("2fh160md1qjnnrenoofa70yeb"); // if (!color[0]) UNSUPPORTED("ehe6g5s4foni0psldwx2ikwnq"); // color = "black"; UNSUPPORTED("47mxcz4gh3xivg50vcji1zkle"); // gvrender_set_pencolor(job, color); UNSUPPORTED("alz5uk378ys9cjg2kl4rkoa4b"); // return color; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7nofo7jo7hj6ehl6tswgfwzif // static char *findFillDflt(node_t * n, char *dflt) public static Object findFillDflt(Object... arg) { UNSUPPORTED("9y7ivrr4l5s7wx7hbbkjpd2fr"); // static UNSUPPORTED("1nwxf9hr4zzdjisa91w1o50qu"); // char *findFillDflt(node_t * n, char *dflt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5zltq70xm6o2q24ddyqe6noyn"); // char *color; UNSUPPORTED("ccgrxng9qnylk5i99hjlnht74"); // color = late_nnstring(n, N_fillcolor, ""); UNSUPPORTED("7c0tonis6b4g7x5vn96sh0eyj"); // if (!color[0]) { UNSUPPORTED("bsd93fqmnbkaqhs33r2qn4gwf"); // /* for backward compatibilty, default fill is same as pen */ UNSUPPORTED("25wuessppk24dv6psp4kvxhr"); // color = late_nnstring(n, N_color, ""); UNSUPPORTED("9bxthpzdy9nuxnf8yj7gaypx6"); // if (!color[0]) { UNSUPPORTED("f32mf5kh8wtwe3dkjadu7hhm8"); // color = dflt; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("alz5uk378ys9cjg2kl4rkoa4b"); // return color; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dkh0fr3loytegfs1lz9qi1sd6 // static char *findFill(node_t * n) public static Object findFill(Object... arg) { UNSUPPORTED("9y7ivrr4l5s7wx7hbbkjpd2fr"); // static UNSUPPORTED("999wldpj7kbc3jf5qrtjs3kac"); // char *findFill(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2s92vukfnygadoexil3zao2b"); // return (findFillDflt(n, "lightgrey")); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b6vz4rofh7tr27tzdul6mqinz // char *findAttrColor(void *obj, attrsym_t *colorattr, char *dflt) public static Object findAttrColor(Object... arg) { UNSUPPORTED("5v9kutabxqrex87ezkjge03mz"); // char *findAttrColor(void *obj, attrsym_t *colorattr, char *dflt){ UNSUPPORTED("5zltq70xm6o2q24ddyqe6noyn"); // char *color; UNSUPPORTED("ec2uw9vki5v50hgtkdhn7xx5a"); // if(colorattr != NULL) UNSUPPORTED("3mxnhdjc8yzcnelc8jqfu1vp9"); // color = late_nnstring(obj, colorattr, dflt); UNSUPPORTED("14ipy30gtp782xdiwpi735st"); // else if(dflt != NULL && dflt[0]) UNSUPPORTED("2xj2lztryr9os0vo3pmwf6f6p"); // color = dflt; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("1s8rhhkx6hn7y21eh14g1douw"); // color = "lightgrey"; UNSUPPORTED("alz5uk378ys9cjg2kl4rkoa4b"); // return color; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arypshfdif4tg03g6bv68e74s // static int isBox (node_t* n) public static Object isBox(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("1fh5whcpicn37jal4or4fzmhe"); // isBox (node_t* n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("599v2ggusx2npjbgg129z2mwn"); // polygon_t *p; UNSUPPORTED("euj05ebp04ciftzza0knizzej"); // if ((p = ND_shape(n)->polygon)) { UNSUPPORTED("6brfvvb4tyn70jzd3jn6c1gwo"); // return (p->sides == 4 && (ROUND(p->orientation) % 90) == 0 && p->distortion == 0. && p->skew == 0.); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ddsagt9m8yt7n8h3nk19jnk2p // static int isEllipse(node_t* n) public static Object isEllipse(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("dj5on95sulam3ulc2tw8duoeq"); // isEllipse(node_t* n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("599v2ggusx2npjbgg129z2mwn"); // polygon_t *p; UNSUPPORTED("euj05ebp04ciftzza0knizzej"); // if ((p = ND_shape(n)->polygon)) { UNSUPPORTED("advye1fx4h5jqr6x6lq6qsjnb"); // return (p->sides <= 2); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e6hjh17xf1s408w7nmf95mnvn // static char **checkStyle(node_t * n, int *flagp) public static Object checkStyle(Object... arg) { UNSUPPORTED("ez47sxvuvz2y431fczf0ih52b"); // static char **checkStyle(node_t * n, int *flagp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("byo308l1rmve5rmx8wt32juux"); // char *style; UNSUPPORTED("1m69eum6fcxl62kbxksis88or"); // char **pstyle = 0; UNSUPPORTED("1y4qclfm9xrlqe6oi5k512dih"); // int istyle = 0; UNSUPPORTED("7b0667dpeiekddi69gpywx92t"); // polygon_t *poly; UNSUPPORTED("8pjk3xuss8ew2p7e7t0djo8qp"); // style = late_nnstring(n, N_style, ""); UNSUPPORTED("4ouo3ttcnk1yyzsz5wrt88zw"); // if (style[0]) { UNSUPPORTED("h7xdp8l98vgmu8dkibee5kcm"); // char **pp; UNSUPPORTED("9uleufnyvtzwmq2wbcnmeyp3a"); // char **qp; UNSUPPORTED("1ys4x1uj0hoyf2yuvrmddwh9i"); // char *p; UNSUPPORTED("6akvfrhnmmgier60pl8bkt42r"); // pp = pstyle = parse_style(style); UNSUPPORTED("9vj0v0tutidnb2hxprdosjm39"); // while ((p = *pp)) { UNSUPPORTED("9e8iza5oo9qnprgvfs80p1cmq"); // if ((*(p)==*("filled")&&!strcmp(p,"filled"))) { UNSUPPORTED("5uu1d9grveb0bmsov10mqrtj3"); // istyle |= (1 << 0); UNSUPPORTED("5lcmi10wuwp3fyn36cloc29y3"); // pp++; UNSUPPORTED("3uvy87owpxhpcjijxbeue7ml9"); // } else if ((*(p)==*("rounded")&&!strcmp(p,"rounded"))) { UNSUPPORTED("dtj2r1tvn8fuoefvhmbg7k8es"); // istyle |= (1 << 2); UNSUPPORTED("8dbdrjhappnkp11tqkg67i250"); // qp = pp; /* remove rounded from list passed to renderer */ UNSUPPORTED("21y8hlxutle9votbe86f2hfpl"); // do { UNSUPPORTED("7ca407ksqxmxkuny8m7gr1rzj"); // qp++; UNSUPPORTED("2dnl06ux4flpusn9o6uoauj6f"); // *(qp - 1) = *qp; UNSUPPORTED("1ujv3j8mb7i0c6nzdfgy27w4s"); // } while (*qp); UNSUPPORTED("3c5cnairumxqyot9agywkupmf"); // } else if ((*(p)==*("diagonals")&&!strcmp(p,"diagonals"))) { UNSUPPORTED("esqbhmned54nx3htomtcxqdvl"); // istyle |= (1 << 3); UNSUPPORTED("36pjs10mstioxkt5rmh4iask6"); // qp = pp; /* remove diagonals from list passed to renderer */ UNSUPPORTED("21y8hlxutle9votbe86f2hfpl"); // do { UNSUPPORTED("7ca407ksqxmxkuny8m7gr1rzj"); // qp++; UNSUPPORTED("2dnl06ux4flpusn9o6uoauj6f"); // *(qp - 1) = *qp; UNSUPPORTED("1ujv3j8mb7i0c6nzdfgy27w4s"); // } while (*qp); UNSUPPORTED("st5o1gk88otja1grsb6lfacw"); // } else if ((*(p)==*("invis")&&!strcmp(p,"invis"))) { UNSUPPORTED("9r65ku75by3pt573pvd9je65n"); // istyle |= (1 << 5); UNSUPPORTED("5lcmi10wuwp3fyn36cloc29y3"); // pp++; UNSUPPORTED("e2fhjqum3y3u10hfayo9loxxn"); // } else if ((*(p)==*("radial")&&!strcmp(p,"radial"))) { UNSUPPORTED("9gjvnf8gjbb6f0zv7dyeerzjy"); // istyle |= ((1 << 1)|(1 << 0)); UNSUPPORTED("cumhwwp133cqb8wq8izofb58h"); // qp = pp; /* remove radial from list passed to renderer */ UNSUPPORTED("21y8hlxutle9votbe86f2hfpl"); // do { UNSUPPORTED("7ca407ksqxmxkuny8m7gr1rzj"); // qp++; UNSUPPORTED("2dnl06ux4flpusn9o6uoauj6f"); // *(qp - 1) = *qp; UNSUPPORTED("1ujv3j8mb7i0c6nzdfgy27w4s"); // } while (*qp); UNSUPPORTED("dnu7ns5prehtumzxvv0s4smtc"); // } else if ((*(p)==*("striped")&&!strcmp(p,"striped")) && isBox(n)) { UNSUPPORTED("2u98nt7rt9sd9aapq55s8ew7h"); // istyle |= (1 << 6); UNSUPPORTED("24ciiasyae2z41bjr8zmt7b2o"); // qp = pp; /* remove striped from list passed to renderer */ UNSUPPORTED("21y8hlxutle9votbe86f2hfpl"); // do { UNSUPPORTED("7ca407ksqxmxkuny8m7gr1rzj"); // qp++; UNSUPPORTED("2dnl06ux4flpusn9o6uoauj6f"); // *(qp - 1) = *qp; UNSUPPORTED("1ujv3j8mb7i0c6nzdfgy27w4s"); // } while (*qp); UNSUPPORTED("eqw80tpippiilbiit1pnwqkdk"); // } else if ((*(p)==*("wedged")&&!strcmp(p,"wedged")) && isEllipse(n)) { UNSUPPORTED("bszmjhb5tngdseiirkqdspwzj"); // istyle |= (1 << 9); UNSUPPORTED("11bhw5dod5c1mltace9v23vvq"); // qp = pp; /* remove wedged from list passed to renderer */ UNSUPPORTED("21y8hlxutle9votbe86f2hfpl"); // do { UNSUPPORTED("7ca407ksqxmxkuny8m7gr1rzj"); // qp++; UNSUPPORTED("2dnl06ux4flpusn9o6uoauj6f"); // *(qp - 1) = *qp; UNSUPPORTED("1ujv3j8mb7i0c6nzdfgy27w4s"); // } while (*qp); UNSUPPORTED("afk9bpom7x393euamnvwwkx6b"); // } else UNSUPPORTED("5lcmi10wuwp3fyn36cloc29y3"); // pp++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a951gj8apiferiznswhme5q28"); // if ((poly = ND_shape(n)->polygon)) UNSUPPORTED("enpv6kdyy99zkq0pgqfvhe4c1"); // istyle |= poly->option; UNSUPPORTED("8wc6gkmat3lo0h81wd7xv879k"); // *flagp = istyle; UNSUPPORTED("iuoxnbeo1cwfgz97k92ylegx"); // return pstyle; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cmfha87baduerx07enpoxpl0i // static int stylenode(GVJ_t * job, node_t * n) public static Object stylenode(Object... arg) { UNSUPPORTED("2zooek35a9pjrcqa212ed7d4d"); // static int stylenode(GVJ_t * job, node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1lh27pielrns99pzh9yww5tc3"); // char **pstyle, *s; UNSUPPORTED("at5a8doos9xnvfmdynzdnj22m"); // int istyle; UNSUPPORTED("75w3zx2oz7s1yf7arcxf48heo"); // double penwidth; UNSUPPORTED("45vqmqwfbzihkp69fkdmro84u"); // if ((pstyle = checkStyle(n, &istyle))) UNSUPPORTED("5ewqs6gfz9r9n25gcsbn054ej"); // gvrender_set_style(job, pstyle); UNSUPPORTED("aajxt23i7arb7fnkpedw53kj3"); // if (N_penwidth && ((s = agxget(n, N_penwidth)) && s[0])) { UNSUPPORTED("9ahr3ul831dw5ggnbkxpjttyu"); // penwidth = late_double(n, N_penwidth, 1.0, 0.0); UNSUPPORTED("a85jezrt5nu63vkla8bslhzcx"); // gvrender_set_penwidth(job, penwidth); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8jt5dmpnjjn7vbyh8jm3z92dd"); // return istyle; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 484y5dade0mh0rhmlpq9sbgyj // static void Mcircle_hack(GVJ_t * job, node_t * n) public static Object Mcircle_hack(Object... arg) { UNSUPPORTED("14yetc0y5dql9a1m4hjimwery"); // static void Mcircle_hack(GVJ_t * job, node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4g01jt8p980itgxzog49s8ur3"); // double x, y; UNSUPPORTED("73immmni8bd7nbea87pqqtsss"); // pointf AF[2], p; UNSUPPORTED("91olkqdwuv079mwgafkjm2pvm"); // y = .7500; UNSUPPORTED("1ij13nw7td2w3yobqltvugja4"); // x = .6614; /* x^2 + y^2 = 1.0 */ UNSUPPORTED("idkjly9lhs1takhai4jmwuyq"); // p.y = y * ND_ht(n) / 2.0; UNSUPPORTED("751pbavi8681zqnswp9rwue5o"); // p.x = ND_rw(n) * x; /* assume node is symmetric */ UNSUPPORTED("7mid2xd4xh4xgdhe907o6g6l4"); // AF[0] = add_pointf(p, ND_coord(n)); UNSUPPORTED("a2250pkc00wvt8bx8azxq1ug0"); // AF[1].y = AF[0].y; UNSUPPORTED("cqt3b70row8txs0n26fb4un7u"); // AF[1].x = AF[0].x - 2 * p.x; UNSUPPORTED("9lgjyllrdl3lrvuyrlz3hkakl"); // gvrender_polyline(job, AF, 2); UNSUPPORTED("fim2su3akeazbrjzelz70baa"); // AF[0].y -= 2 * p.y; UNSUPPORTED("a2250pkc00wvt8bx8azxq1ug0"); // AF[1].y = AF[0].y; UNSUPPORTED("9lgjyllrdl3lrvuyrlz3hkakl"); // gvrender_polyline(job, AF, 2); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ei77gihju88eavrphjd4217d0 // void round_corners(GVJ_t * job, pointf * AF, int sides, int style, int filled) public static Object round_corners(Object... arg) { UNSUPPORTED("4zly0db3w4vfht908qlfjvgr1"); // void round_corners(GVJ_t * job, pointf * AF, int sides, int style, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3z10hnxy3lvnkbnaai7c7ccl"); // pointf *B, C[5], *D, p0, p1; UNSUPPORTED("81yo6al7e3nxtf9ekuqa4n6xc"); // double rbconst, d, dx, dy, t; UNSUPPORTED("b9m8kb2lfopred94uilevubat"); // int i, seg, mode, shape; UNSUPPORTED("48n1zwofayobr58hhiz0y5wfp"); // pointf* pts; UNSUPPORTED("erycpwhkizj18xsodfbapugg"); // shape = style & (127 << 24); UNSUPPORTED("17t8enyxf5yj5x4qmggz27rpj"); // if (style & (1 << 3)) UNSUPPORTED("209ali7eb7s6xpcplnxc1n105"); // mode = (1 << 3); UNSUPPORTED("2jjd9xuwi3k89b2qz48p9qiij"); // else if (style & (127 << 24)) UNSUPPORTED("69pqj1vo4pr13r0r02kyk8rtq"); // mode = shape; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("b3q1yyf621vvgphjqrr5ryare"); // mode = (1 << 2); UNSUPPORTED("6ssyjdjxo2ulqor8iwagn9d2f"); // B = (pointf*)zmalloc((4 * sides + 4)*sizeof(pointf)); UNSUPPORTED("9z3er49pc4h2rxja5r9grdo0h"); // i = 0; UNSUPPORTED("8r6c7fd8ovc5djxlr8ewm50r2"); // /* rbconst is distance offset from a corner of the polygon. UNSUPPORTED("2gs01cac7peva58o5tfygbktx"); // * It should be the same for every corner, and also never UNSUPPORTED("7jv69y6bs582woz54uifrosyf"); // * bigger than one-third the length of a side. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("3y9cq08hyl44nlpgdz8bq9x5y"); // rbconst = 12; UNSUPPORTED("a194n3zgdgtwg7jus6dt8zt8m"); // for (seg = 0; seg < sides; seg++) { UNSUPPORTED("8u84gg4ehm9gt01gwlriapp7p"); // p0 = AF[seg]; UNSUPPORTED("jrhdb2qs0vcycqv19gjkoxpb"); // if (seg < sides - 1) UNSUPPORTED("3a621ve4bfuqz53sahxjnie0n"); // p1 = AF[seg + 1]; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("a2k7gegucha0lsv4ojjyg8bry"); // p1 = AF[0]; UNSUPPORTED("5wygoyf2uskp90f77rq77i4sl"); // dx = p1.x - p0.x; UNSUPPORTED("crmaptew4roh76io36shmz912"); // dy = p1.y - p0.y; UNSUPPORTED("4tigxgedxe60aamdjuhhrwsx4"); // d = sqrt(dx * dx + dy * dy); UNSUPPORTED("corgbpn6r0vxd6q04wn8gq4gq"); // rbconst = MIN(rbconst, d / 3.0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a194n3zgdgtwg7jus6dt8zt8m"); // for (seg = 0; seg < sides; seg++) { UNSUPPORTED("8u84gg4ehm9gt01gwlriapp7p"); // p0 = AF[seg]; UNSUPPORTED("jrhdb2qs0vcycqv19gjkoxpb"); // if (seg < sides - 1) UNSUPPORTED("3a621ve4bfuqz53sahxjnie0n"); // p1 = AF[seg + 1]; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("a2k7gegucha0lsv4ojjyg8bry"); // p1 = AF[0]; UNSUPPORTED("5wygoyf2uskp90f77rq77i4sl"); // dx = p1.x - p0.x; UNSUPPORTED("crmaptew4roh76io36shmz912"); // dy = p1.y - p0.y; UNSUPPORTED("4tigxgedxe60aamdjuhhrwsx4"); // d = sqrt(dx * dx + dy * dy); UNSUPPORTED("4ohox9viufh5hz01z2sjq8eo6"); // t = rbconst / d; UNSUPPORTED("7w7drxi1wvf81230kfb4tx9sf"); // if (shape == (4 << 24) || shape == (5 << 24)) UNSUPPORTED("5xzdqgzfi0wjoiatowdjh64gy"); // t /= 3; UNSUPPORTED("a67ot847ab7bmt4df22rcjqjh"); // else if (shape == (1 << 24)) UNSUPPORTED("7crlw5k29pn4silm51hmqn309"); // t /= 2; UNSUPPORTED("tt3u4mg8fwhys49ftrmyhoo8"); // if (mode != (1 << 2)) UNSUPPORTED("8z8165i54px2guqyp4r3iivm"); // B[i++] = p0; UNSUPPORTED("df5svfeo1imlc8qm6azeqkkmh"); // else UNSUPPORTED("1c0c66imkoa2k4geseydtrlks"); // B[i++] = interpolate_pointf(.5 * t, p0, p1); UNSUPPORTED("3tiws3vikebhgs3g79mlh5s0a"); // B[i++] = interpolate_pointf(t, p0, p1); UNSUPPORTED("ck1de7cjc9kz82t8n4b3kaply"); // B[i++] = interpolate_pointf(1.0 - t, p0, p1); UNSUPPORTED("5ecb0sv32aezfln59kwr7n54j"); // if (mode == (1 << 2)) UNSUPPORTED("4yqnq3vzqlqucce76lf2i48sh"); // B[i++] = interpolate_pointf(1.0 - .5 * t, p0, p1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("456xy9zxbdvxkgw63cphz32yv"); // B[i++] = B[0]; UNSUPPORTED("a3zl8b5gohcvf0aamq9zy3r2z"); // B[i++] = B[1]; UNSUPPORTED("1rw55m45llp1oiu1b664bdtt7"); // B[i++] = B[2]; UNSUPPORTED("1n2j212wuyr8t1oi45d91ta7r"); // switch (mode) { UNSUPPORTED("2buge9zhgso34sq694br4vpn6"); // case (1 << 2): UNSUPPORTED("4zyg1qcp15ft55bhiug326st9"); // pts = (pointf*)gmalloc((6 * sides + 2)*sizeof(pointf)); UNSUPPORTED("5or0zebpgtvozlmal8j2q1ymh"); // i = 0; UNSUPPORTED("2b4hmqn28jyawsresopw3imez"); // for (seg = 0; seg < sides; seg++) { UNSUPPORTED("4dwf576bgn14ur203rpzfmvcj"); // pts[i++] = B[4 * seg]; UNSUPPORTED("bal6cvz4s8gwpl3au15cp6gut"); // pts[i++] = B[4 * seg+1]; UNSUPPORTED("bal6cvz4s8gwpl3au15cp6gut"); // pts[i++] = B[4 * seg+1]; UNSUPPORTED("9qw0jg5a0jzxhnoz56auikdah"); // pts[i++] = B[4 * seg+2]; UNSUPPORTED("9qw0jg5a0jzxhnoz56auikdah"); // pts[i++] = B[4 * seg+2]; UNSUPPORTED("7u491erkgkpheh23pmb7ay6tm"); // pts[i++] = B[4 * seg+3]; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bmzoxzu4zo3s8tlzc1m3x4e1v"); // pts[i++] = pts[0]; UNSUPPORTED("3e5hosajkvxgm8usnlbhxcuir"); // pts[i++] = pts[1]; UNSUPPORTED("93i0re7fzom2m1gwn8dnxcylj"); // gvrender_beziercurve(job, pts+1, i-1, 0, 0, filled); UNSUPPORTED("dgq0qjac3ho7gugxw0mqbv96"); // free (pts); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("14wf8f4gfb2l2ihvry7d2x38l"); // case (1 << 3): UNSUPPORTED("azp5izjs4eyq3uy0ah00hm8n4"); // /* diagonals are weird. rewrite someday. */ UNSUPPORTED("5j9owdiqcj7bt8mcr301dht8q"); // gvrender_polygon(job, AF, sides, filled); UNSUPPORTED("2b4hmqn28jyawsresopw3imez"); // for (seg = 0; seg < sides; seg++) { UNSUPPORTED("9ryfluah120xc0oke5t971wtf"); // C[0] = B[3 * seg + 2]; UNSUPPORTED("cqr6f1xlnm7nng28pnfor5h9b"); // C[1] = B[3 * seg + 4]; UNSUPPORTED("b0gt3f20500y9ckfsqr07bwn9"); // gvrender_polyline(job, C, 2); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9fjpgho6bfz7z8s29gy8e6uoc"); // case (1 << 24): UNSUPPORTED("8wy6a8izye4sz73njhv8j9znc"); // /* Add the cutoff edge. */ UNSUPPORTED("b5f90htb83l32kamg97jm1sux"); // D = (pointf*)zmalloc((sides + 1)*sizeof(pointf)); UNSUPPORTED("aofwnlg1s6y08lf7550rpgt6b"); // for (seg = 1; seg < sides; seg++) UNSUPPORTED("6sqx87841cn900qusanuebotn"); // D[seg] = AF[seg]; UNSUPPORTED("aoly4odhqt3ydqpni1b56wx0a"); // D[0] = B[3 * (sides - 1) + 4]; UNSUPPORTED("dike7lk77zy9w7gw1blk27kjr"); // D[sides] = B[3 * (sides - 1) + 2]; UNSUPPORTED("6u1z6h8gfy4ofbsa9gidwp2v9"); // gvrender_polygon(job, D, sides + 1, filled); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("eoq3dhyls1a02czm0kv7mk15"); // /* Draw the inner edge. */ UNSUPPORTED("b0pvjrkdu25er5c08tx04ycvn"); // seg = sides - 1; UNSUPPORTED("aojv0k5pq5qdtvzl90n7o2z4a"); // C[0] = B[3 * seg + 2]; UNSUPPORTED("ak39zpyk8ew0qkrfdq4o6vulb"); // C[1] = B[3 * seg + 4]; UNSUPPORTED("zasq52jvz91zaqrusqeppioc"); // C[2].x = C[1].x + (C[0].x - B[3 * seg + 3].x); UNSUPPORTED("183xcjzzdjqiylg3dyj2bm9p0"); // C[2].y = C[1].y + (C[0].y - B[3 * seg + 3].y); UNSUPPORTED("1f9f75c5ajnw72fk4rhidjvk9"); // gvrender_polyline(job, C + 1, 2); UNSUPPORTED("frux7sbbz1c07p68288k7bjt"); // C[1] = C[2]; UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("10iw0jyewk2q2w6qy33amd83c"); // case (2 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("11hn7suih6n97ek5ack6vv7ni"); // * Adjust the perimeter for the protrusions. UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("2ke5cay4uy9rpguirhm4wa6h"); // * D[3] +--+ D[2] UNSUPPORTED("4zc493k26lywwhtoilkgc1l7x"); // * | | B[1] UNSUPPORTED("2m2wzvksfyug1w1bxq51fnx8t"); // * B[3] + +----------+--+ AF[0]=B[0]=D[0] UNSUPPORTED("5n95z8suw2ujdfytdrngbd1an"); // * | B[2]=D[1] | UNSUPPORTED("bxixf1yy90einvhfmisdbksm8"); // * B[4] + | UNSUPPORTED("5at9s03omerhkkh28ytchzp8p"); // * | | UNSUPPORTED("9hfhbws20bnfssgim1z95d6c"); // * B[5] + | UNSUPPORTED("at59m33r1w0mw5cp7ympbfal6"); // * +----------------+ UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("5kvv3jvgrdk38xmgwem87tcf9"); // /* Add the tab edges. */ UNSUPPORTED("70701yzl3gbwgttd66404h5y0"); // D = (pointf*)zmalloc((sides + 2)*sizeof(pointf)); UNSUPPORTED("bf9oppknir8tl1n0mty1c2mou"); // D[0] = AF[0]; UNSUPPORTED("c66e72qch46j50w8wi2ex9igr"); // D[1] = B[2]; UNSUPPORTED("500mpct3i9wgs3px8hsgnd7m"); // D[2].x = B[2].x + (B[3].x - B[4].x) / 3; UNSUPPORTED("4mbi2yyoztsb8r3tezo2a6bdn"); // D[2].y = B[2].y + (B[3].y - B[4].y) / 3; UNSUPPORTED("ciue6jcuvx8w3rhusaybjn0js"); // D[3].x = B[3].x + (B[3].x - B[4].x) / 3; UNSUPPORTED("ewjqnbklefpknisen36ov0eor"); // D[3].y = B[3].y + (B[3].y - B[4].y) / 3; UNSUPPORTED("97qpn7goedd7t1yn8vv7l2wta"); // for (seg = 4; seg < sides + 2; seg++) UNSUPPORTED("37s6t8j0ylr7pgcyrb42nnzru"); // D[seg] = AF[seg - 2]; UNSUPPORTED("d4ps5t7sfp45tctsjawfhtbnx"); // gvrender_polygon(job, D, sides + 2, filled); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("eoq3dhyls1a02czm0kv7mk15"); // /* Draw the inner edge. */ UNSUPPORTED("du4dccw5ec6jy7zfkw1ke8w5o"); // C[0] = B[3]; UNSUPPORTED("66sh6zqifln1cd8fag6neksct"); // C[1] = B[2]; UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3ylqzc8858ud3k78im7cnmmcy"); // case (3 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("11hn7suih6n97ek5ack6vv7ni"); // * Adjust the perimeter for the protrusions. UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("8f9cn4lj1t7xhfy5h96toa6z7"); // * D[2] +----+ D[1] UNSUPPORTED("3jbilbyrjvqxazi6ya1u20wl"); // * B[3]= / * D[4] +--+----+ + + AF[0]=B[0]=D[0] UNSUPPORTED("9ef8paf9orf5t71eo10jr5730"); // * | B[2] D[3] B[1]| UNSUPPORTED("bxixf1yy90einvhfmisdbksm8"); // * B[4] + | UNSUPPORTED("5at9s03omerhkkh28ytchzp8p"); // * | | UNSUPPORTED("9hfhbws20bnfssgim1z95d6c"); // * B[5] + | UNSUPPORTED("at59m33r1w0mw5cp7ympbfal6"); // * +----------------+ UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("1eenvw2caym3k7merjrt3657j"); // /* Add the folder edges. */ UNSUPPORTED("exmy2ulb6j7va8q6lm6tnworf"); // D = (pointf*)zmalloc((sides + 3)*sizeof(pointf)); UNSUPPORTED("bf9oppknir8tl1n0mty1c2mou"); // D[0] = AF[0]; UNSUPPORTED("dtt4p6jk6p6dp18x3u65bzmpw"); // D[1].x = AF[0].x - (AF[0].x - B[1].x) / 4; UNSUPPORTED("1md1kmylraqzyaczi97hwwslr"); // D[1].y = AF[0].y + (B[3].y - B[4].y) / 3; UNSUPPORTED("9yn6qa7smu43hw0zjjaqtdtud"); // D[2].x = AF[0].x - 2 * (AF[0].x - B[1].x); UNSUPPORTED("dmuv0ci8g28j2wpq47bkjo7p6"); // D[2].y = D[1].y; UNSUPPORTED("3w8e9xzd5au6dbo2ceoce7ecd"); // D[3].x = AF[0].x - 2.25 * (AF[0].x - B[1].x); UNSUPPORTED("2z54uncfysm85pzpofpflla2n"); // D[3].y = B[3].y; UNSUPPORTED("bppsqpbzfnhxthbppwlvtxlmq"); // D[4].x = B[3].x; UNSUPPORTED("blpuc391svsq7x2xbrue0e7q9"); // D[4].y = B[3].y; UNSUPPORTED("53hurg1p6mqqqgokwg5t04k5u"); // for (seg = 4; seg < sides + 3; seg++) UNSUPPORTED("1v8cof9jpvwyuadpsdaqvu9f6"); // D[seg] = AF[seg - 3]; UNSUPPORTED("66hq5hkfg6ixw5enzwwhsontq"); // gvrender_polygon(job, D, sides + 3, filled); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9zpoxalkfa99z3f69jfqdwd33"); // case (4 << 24): UNSUPPORTED("10wchrvt3c3lld3qfda19dzc2"); // assert(sides == 4); UNSUPPORTED("5jncdktfe0besyw426v5gyk97"); // /* Adjust for the cutoff edges. */ UNSUPPORTED("70701yzl3gbwgttd66404h5y0"); // D = (pointf*)zmalloc((sides + 2)*sizeof(pointf)); UNSUPPORTED("bf9oppknir8tl1n0mty1c2mou"); // D[0] = AF[0]; UNSUPPORTED("c66e72qch46j50w8wi2ex9igr"); // D[1] = B[2]; UNSUPPORTED("34xwb19muwsw7nh47ifxqeinh"); // D[2] = B[4]; UNSUPPORTED("m2dcvmgpwt6s3w1ik1eo8wtz"); // D[3] = AF[2]; UNSUPPORTED("87b41ff5btb6uyil4uwshlxm"); // D[4] = B[8]; UNSUPPORTED("dus787h2fbafocu5jw9x5tvry"); // D[5] = B[10]; UNSUPPORTED("d4ps5t7sfp45tctsjawfhtbnx"); // gvrender_polygon(job, D, sides + 2, filled); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("cbntf28jgu8mfc1hfsmxmxd0a"); // /* Draw the inner vertices. */ UNSUPPORTED("cue3s8g57y8c0yaa1lf26dj0m"); // C[0].x = B[1].x + (B[11].x - B[0].x); UNSUPPORTED("2cmi2wfte2qh9gijl68bakhsb"); // C[0].y = B[1].y + (B[11].y - B[0].y); UNSUPPORTED("dxiovj41sjesdzgvqycs8n69d"); // C[1] = B[4]; UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("9pl28lk4wdwe76r2auimzv3uh"); // C[1] = B[8]; UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("86prrkb6o2eadx8wt21jmkhbv"); // C[1] = B[0]; UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("5kno8ta0hm2ddpbudyyjtro1m"); // case (5 << 24): UNSUPPORTED("10wchrvt3c3lld3qfda19dzc2"); // assert(sides == 4); UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("11hn7suih6n97ek5ack6vv7ni"); // * Adjust the perimeter for the protrusions. UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("buae5rybq9lw4j80le921um4r"); // * D[1] +----------------+ D[0] UNSUPPORTED("5at9s03omerhkkh28ytchzp8p"); // * | | UNSUPPORTED("czyzy0uakecldzx0ct8ivruuq"); // * 3+---+2 | UNSUPPORTED("2xugwq0paym82tfnux69txz9i"); // * | | UNSUPPORTED("4ol1bofwhi5div9o31p9wjtj4"); // * 4+---+5 | UNSUPPORTED("5at9s03omerhkkh28ytchzp8p"); // * | | UNSUPPORTED("5u2sqowe8zkdk3y4bln5j5zhp"); // * 7+---+6 | UNSUPPORTED("2xugwq0paym82tfnux69txz9i"); // * | | UNSUPPORTED("4oztb9whw0lnxt2i3c0fve4bg"); // * 8+---+9 | UNSUPPORTED("5at9s03omerhkkh28ytchzp8p"); // * | | UNSUPPORTED("awyck47phrgtt6emr4jcnw7v8"); // * 10+----------------+ D[11] UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("24ixpw0s6fz9ly7ogkwntlkc5"); // D = (pointf*)zmalloc((sides + 8)*sizeof(pointf)); UNSUPPORTED("bf9oppknir8tl1n0mty1c2mou"); // D[0] = AF[0]; UNSUPPORTED("65vl8eczvd624e78x152zuae8"); // D[1] = AF[1]; UNSUPPORTED("809tuda28xqouetq11u936beb"); // D[2].x = B[3].x + (B[4].x - B[3].x); UNSUPPORTED("cm9zr706ma61pgcr1xawvkeu8"); // D[2].y = B[3].y + (B[4].y - B[3].y); UNSUPPORTED("cwrn6kyomgttqmgbjkzbsfdb6"); // D[3].x = D[2].x + (B[3].x - B[2].x); UNSUPPORTED("2btthvnyzi5zr69hcdxsmzy6b"); // D[3].y = D[2].y + (B[3].y - B[2].y); UNSUPPORTED("j05ovjq3e57jkpjgbgn2a93n"); // D[4].x = D[3].x + (B[4].x - B[3].x); UNSUPPORTED("kp5e1lgz2klpjavxggb5uxtx"); // D[4].y = D[3].y + (B[4].y - B[3].y); UNSUPPORTED("9xz12l85tya02764n9dek9tsj"); // D[5].x = D[4].x + (D[2].x - D[3].x); UNSUPPORTED("3mjb8ks0do270kur1velhlfhg"); // D[5].y = D[4].y + (D[2].y - D[3].y); UNSUPPORTED("amtvzdzubjy4pclq29xzao8nz"); // D[9].x = B[6].x + (B[5].x - B[6].x); UNSUPPORTED("62igzc0qeet9vup11kzlaoi9b"); // D[9].y = B[6].y + (B[5].y - B[6].y); UNSUPPORTED("5ya7ec3f9qo5kmci76122v75u"); // D[8].x = D[9].x + (B[6].x - B[7].x); UNSUPPORTED("eld0yh2bct5ke7mg09giyed8n"); // D[8].y = D[9].y + (B[6].y - B[7].y); UNSUPPORTED("cg32k9flso7918lk33auqxwva"); // D[7].x = D[8].x + (B[5].x - B[6].x); UNSUPPORTED("8dugkdcnkq8sp07se4h7s8cfv"); // D[7].y = D[8].y + (B[5].y - B[6].y); UNSUPPORTED("2e85hrv7fq481gbwdw9hllum1"); // D[6].x = D[7].x + (D[9].x - D[8].x); UNSUPPORTED("7ov0p9nbyd0ax3sgivwszaqv7"); // D[6].y = D[7].y + (D[9].y - D[8].y); UNSUPPORTED("5aoma5n0p035f1aanu4wtjtxs"); // D[10] = AF[2]; UNSUPPORTED("evru57wt3y6nkqeeb7pcra08r"); // D[11] = AF[3]; UNSUPPORTED("ex1blattp3opv6e82reqp2xg3"); // gvrender_polygon(job, D, sides + 8, filled); UNSUPPORTED("2qqdd1xd8qq7chyfugqx34cfn"); // /* Draw the internal vertices. */ UNSUPPORTED("3pw0en5rkazex1cmysfqudqev"); // C[0] = D[2]; UNSUPPORTED("ddq28zei7j5vvk0razqli8xd9"); // C[1].x = D[2].x - (D[3].x - D[2].x); UNSUPPORTED("bahi2ks1geofx4oonmrkc71q3"); // C[1].y = D[2].y - (D[3].y - D[2].y); UNSUPPORTED("1gc8dsojnchx8ehnj224y08tj"); // C[2].x = C[1].x + (D[4].x - D[3].x); UNSUPPORTED("8a1l8vtinne40c8bmzgmpco5d"); // C[2].y = C[1].y + (D[4].y - D[3].y); UNSUPPORTED("ah24wzf48tz9bax9stnbxw3jg"); // C[3] = D[5]; UNSUPPORTED("4vmc7riub70iswxlzm4mg5xlh"); // gvrender_polyline(job, C, 4); UNSUPPORTED("57xyz6r1s5isw5botqrkasfk1"); // C[0] = D[6]; UNSUPPORTED("9e9zf6fuxc8ovfj3jsryqlylv"); // C[1].x = D[6].x - (D[7].x - D[6].x); UNSUPPORTED("bsnau3s4c5hnmmj1shw8ouokg"); // C[1].y = D[6].y - (D[7].y - D[6].y); UNSUPPORTED("ewm5xz38hsb9hh3wxf6j214dp"); // C[2].x = C[1].x + (D[8].x - D[7].x); UNSUPPORTED("bv41aedgjg4w0zc4ccxrl657z"); // C[2].y = C[1].y + (D[8].y - D[7].y); UNSUPPORTED("77p9f8uavqa0bo2uzwrgul8fo"); // C[3] = D[9]; UNSUPPORTED("4vmc7riub70iswxlzm4mg5xlh"); // gvrender_polyline(job, C, 4); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("beokd0nvtuwlde2ahiaxzmwo0"); // case (6 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("ixqwyi3z0ndmfrpmbx8hb747"); // * L-shaped arrow on a center line, scales in the x direction UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("4bfue86t6gftlcgwzff6qshk7"); // * UNSUPPORTED("8udetwc0o6gakybvc61qq6kjd"); // * D[1] | * +----------------+ * | D[0] * | * | / UNSUPPORTED("cp87959b34no4267o38ifrckk"); // * | D[5] / UNSUPPORTED("722lri4xki5u0btwl5flr6qxu"); // * | +-------+ / UNSUPPORTED("8kn1gxbxamlotuexrxky3o76q"); // * | | |/ UNSUPPORTED("dscqqxbpov7i3z8kvqhzn45ew"); // * +--------+ UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("5kvv3jvgrdk38xmgwem87tcf9"); // /* Add the tab edges. */ UNSUPPORTED("dbi6282o67zdvjpioemev8l1g"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2 UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("9f16ni612qewna0ipjhg14bai"); // //the arrow's thickness is (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("azjvg240odj44iv9ekoxye94d"); // //the thickness is subituted with (AF[0].x - AF[1].x)/8 to make it scalable in the y with label length UNSUPPORTED("8y1urr2asyrlu62q42pgcsmhp"); // D = (pointf*)zmalloc((sides + 5)*sizeof(pointf)); UNSUPPORTED("b70z64iz7ervr0w25bypaar6w"); // D[0].x = AF[1].x + (AF[0].x - AF[1].x)/2 + (AF[0].x - AF[1].x)/8; //x_center + width UNSUPPORTED("cflv5tiys03frg7ni6wrlnf54"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)*3/2; //D[4].y + width UNSUPPORTED("8mk9mjo89wwb2k197bo1oci28"); // D[1].x = AF[1].x + (AF[0].x - AF[1].x)/2 - (AF[0].x - AF[1].x)/4; //x_center - 2*width UNSUPPORTED("377dvf6krrmq87z68ekoyk1nr"); // D[1].y = D[0].y; UNSUPPORTED("cnpipkg905bpnnnnoa0lopvzy"); // D[2].x = D[1].x; UNSUPPORTED("301q7fj403dfv6ubg9vwg4ise"); // D[2].y = AF[2].y + (AF[1].y - AF[2].y)/2; //y_center UNSUPPORTED("3zldfbr9i1rzlmv4z7y0pfsui"); // D[3].x = D[2].x + (B[2].x - B[3].x)/2; //D[2].x + width UNSUPPORTED("1c9pkdgt2yqgbrfhtob6o1anm"); // D[3].y = AF[2].y + (AF[1].y - AF[2].y)/2; //y_center UNSUPPORTED("dm1gyw5qetggvcc8zstksyyg2"); // D[4].x = D[3].x; UNSUPPORTED("5om1l6r4v0k3wqbmirwpiyqba"); // D[4].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y); //highest cds point UNSUPPORTED("5452plq9tg8pl7nqgqe17wfok"); // D[5].x = D[0].x; UNSUPPORTED("4nf8s53n53wddx4yf7audzxu1"); // D[5].y = D[4].y; //highest cds point UNSUPPORTED("a6zbxb7jxf9qdy8dvdmo9bql6"); // D[6].x = D[0].x; UNSUPPORTED("5cl1c2plgkvkq7g0rvwvdg7vt"); // D[6].y = D[4].y - (B[3].y-B[4].y)/4; //D[4].y - width/2 UNSUPPORTED("gi12lyfrur4z2lxxndbbbifq"); // D[7].x = D[6].x + (B[2].x - B[3].x); //D[6].x + 2*width UNSUPPORTED("5pkfhqy0ycejkkhrrm5hggks4"); // D[7].y = D[6].y + (B[3].y - B[4].y)/2; //D[6].y + width UNSUPPORTED("cvcvatp3h1huxwxo27xm89hir"); // D[8].x = D[0].x; UNSUPPORTED("61oo13fi0rf1r3bzy45p7mzr"); // D[8].y = D[0].y + (B[3].y - B[4].y)/4;//D[0].y + width/2 UNSUPPORTED("9v8e5z6hrq6fr5p16pg80kc21"); // gvrender_polygon(job, D, sides + 5, filled); UNSUPPORTED("hjs1b12h76k9zk31lumwwf9f"); // /*dsDNA line*/ UNSUPPORTED("dcf6dzx1g3i2ccb6d7iwrzof8"); // C[0].x = AF[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("5pw7rn49ku3rfnvp5lbqoivb7"); // C[1].x = AF[0].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("7vyejosjncamgazhav0j15x5q"); // gvrender_polyline(job, C, 2); UNSUPPORTED("e5j165s4lbb8e75y1ejspv7up"); // free(D); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3pfp7u39hqhl9b4pzx94kdmtp"); // case (7 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("8colhcg9wmqo1rtyzhmaa4ek6"); // * arrow without the protrusions, scales normally UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("4bfue86t6gftlcgwzff6qshk7"); // * UNSUPPORTED("d9imuj2p14rbbmjs7wvofspna"); // * D[1] = AF[1] UNSUPPORTED("4z7qsayd2i6g803t3ab2q4cnr"); // * +----------------+ * | D[0] * | * | / UNSUPPORTED("csz54pl4jc7c08mjs4ll2ud72"); // * | / UNSUPPORTED("c0psno66sh97gcrf8bvy26xm7"); // * +----------------+/ UNSUPPORTED("8zy5cfbfoig4ao910eycpxx1x"); // * D[3] UNSUPPORTED("79f8fxsn2gta6r8d9x9n38rzy"); // * UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("b5f90htb83l32kamg97jm1sux"); // D = (pointf*)zmalloc((sides + 1)*sizeof(pointf)); UNSUPPORTED("3iplasxynfhfozy7oqwqkceet"); // D[0].x = B[1].x; UNSUPPORTED("d1eg8u95ffvpn8cj0t175qe8"); // D[0].y = B[1].y - (B[3].y - B[4].y)/2; UNSUPPORTED("45vton2uqw835epqg2o0j1qee"); // D[1].x = B[3].x; UNSUPPORTED("2so1ozst5cwd02o33408hxi1n"); // D[1].y = B[3].y - (B[3].y - B[4].y)/2; UNSUPPORTED("2y7ipfj9drc5mfgjluf5y6k6p"); // D[2].x = AF[2].x; UNSUPPORTED("bopqgv9t3o6ppbojdunc5qjfl"); // D[2].y = AF[2].y + (B[3].y - B[4].y)/2; UNSUPPORTED("8xoigox3do4ruwo7d6ew3o7af"); // D[3].x = B[1].x; UNSUPPORTED("94cxjx74gts01u98ngcns0j0o"); // D[3].y = AF[2].y + (B[3].y - B[4].y)/2; UNSUPPORTED("dv68lnnw5js80t8w4vzw3er4z"); // D[4].y = AF[0].y - (AF[0].y - AF[3].y)/2; UNSUPPORTED("b5nri6sa2qx33fqvp8xfgckb0"); // D[4].x = AF[0].x; UNSUPPORTED("6u1z6h8gfy4ofbsa9gidwp2v9"); // gvrender_polygon(job, D, sides + 1, filled); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3thdjaa2jp4igqqd3un2gwo6r"); // case (8 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("q99ojp3xn0cfe2yzxdzb5y6l"); // * T-shape, does not scale, always in the center UNSUPPORTED("11dzfjbtxkn4alvdn9s9waab8"); // * UNSUPPORTED("dhhao73bupb3qih7po05x8qcs"); // * UNSUPPORTED("6z84agdr458on26oqsta195b2"); // * D[4] UNSUPPORTED("1w6ol3zmeqn5mywt6a4z6qo41"); // * +----------------+ UNSUPPORTED("9onfqvue4pbpmccmodd1mtx7g"); // * | D[3] UNSUPPORTED("c45nqrjd35z7gq6ei63b1c7yg"); // * | | UNSUPPORTED("4de8jijppluyewmllch44bu23"); // * | | UNSUPPORTED("a3ks7z4s5ja7lvrmq3silkmjl"); // * | D[6] D[1] | UNSUPPORTED("31k91o6maa0q4udou617gn5p5"); // * D[5]+---+ +----+ D[2] UNSUPPORTED("dkhq92412a9i5utfrnc2dhnz"); // * | | UNSUPPORTED("4cml58ti5mwtjgtzmwgiw6900"); // * +-------+ D[0] UNSUPPORTED("4gn10s3n3ms2z2jz5zpxmp5ay"); // */ UNSUPPORTED("dbi6282o67zdvjpioemev8l1g"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2 UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("agoljir79z51apt1tmk0f0sc7"); // //width units are (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("7uqzacf8x5tg89bgh6rziw1s3"); // D = (pointf*)zmalloc((sides + 4)*sizeof(pointf)); UNSUPPORTED("5810col2r6hfkxov4ipmdth4n"); // D[0].x = AF[1].x + (AF[0].x-AF[1].x)/2 + (B[2].x-B[3].x)/4; //x_center + width/2 UNSUPPORTED("db5a23r3dbv1lvqcjuh4j9hwi"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; //y_center UNSUPPORTED("34tp01hd6y8buifqu81fp7kah"); // D[1].x = D[0].x; UNSUPPORTED("53lzmbxoyk9sss54apowy1jcj"); // D[1].y = D[0].y + (B[3].y-B[4].y)/2; UNSUPPORTED("3lc8br5sy3j31bj2kq0vy78xd"); // D[2].x = D[1].x + (B[2].x-B[3].x)/2; UNSUPPORTED("dmuv0ci8g28j2wpq47bkjo7p6"); // D[2].y = D[1].y; UNSUPPORTED("5ihipbue45drjma9vxlpgy615"); // D[3].x = D[2].x; UNSUPPORTED("21mj1uiiddzjovkjk6zsb88pe"); // D[3].y = D[2].y + (B[3].y-B[4].y)/2; UNSUPPORTED("6xkr5j9ysazz1yh6zkpfshldm"); // D[4].x = AF[1].x + (AF[0].x-AF[1].x)/2 - (B[2].x-B[3].x)*3/4; //D[3].y mirrowed across the center UNSUPPORTED("40nf0bg6glqtx5viwakfdv7dw"); // D[4].y = D[3].y; UNSUPPORTED("4ihzpkh7w4ranwnvy0w5gcgnf"); // D[5].x = D[4].x; UNSUPPORTED("d78lk5o8y51l9z7neypp202ok"); // D[5].y = D[2].y; UNSUPPORTED("bu70m5u8xmzjlg97y4dzx2qvn"); // D[6].x = AF[1].x + (AF[0].x-AF[1].x)/2 - (B[2].x-B[3].x)/4; //D[1].x mirrowed across the center UNSUPPORTED("8y0iwlff2lpkouqnvi8duicdw"); // D[6].y = D[1].y; UNSUPPORTED("1dhue1c5y4ho0ct8ks14zgh2q"); // D[7].x = D[6].x; UNSUPPORTED("bmnuosohj6kpaougdrcg1l2ut"); // D[7].y = D[0].y; UNSUPPORTED("519fp4pixwl2w7d4ssm51lram"); // gvrender_polygon(job, D, sides + 4, filled); UNSUPPORTED("hjs1b12h76k9zk31lumwwf9f"); // /*dsDNA line*/ UNSUPPORTED("dcf6dzx1g3i2ccb6d7iwrzof8"); // C[0].x = AF[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("5pw7rn49ku3rfnvp5lbqoivb7"); // C[1].x = AF[0].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("7vyejosjncamgazhav0j15x5q"); // gvrender_polyline(job, C, 2); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3s9ef7jzymofqi316ojrcjxzd"); // case (9 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("dhbze4ofczxyy7yamogd6ti3a"); // * half-octagon with line, does not scale, always in center UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("2q9d6wex3idlomfcu4pkk398x"); // * D[3] UNSUPPORTED("4xh336uvfc358ms133bm0s52b"); // * _____ D[2] UNSUPPORTED("bfk0n04f7r4qzjubnfyu2xh1k"); // * / * / \ D[1] UNSUPPORTED("5psrhywjfkorktkmgorilauv5"); // * | | UNSUPPORTED("3lg9sq0fw542uhjrpospx6jy2"); // * ----------- UNSUPPORTED("3hbh5rz6pydqncnacff0j6bck"); // * D[0] UNSUPPORTED("dfamfnhl22etjpal7hadbncq"); // * UNSUPPORTED("18xb6dplfcolp2jrg1kn8kys7"); // * UNSUPPORTED("6b0g1rzk4g1o9c2we59or2tun"); // * UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("dbi6282o67zdvjpioemev8l1g"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2 UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("agoljir79z51apt1tmk0f0sc7"); // //width units are (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("70701yzl3gbwgttd66404h5y0"); // D = (pointf*)zmalloc((sides + 2)*sizeof(pointf)); UNSUPPORTED("7m6kkbjz3yjj1zf1qc45ktcv7"); // D[0].x = AF[1].x + (AF[0].x-AF[1].x)/2 + (B[2].x-B[3].x)*3/4; //x_center+width UNSUPPORTED("db5a23r3dbv1lvqcjuh4j9hwi"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; //y_center UNSUPPORTED("34tp01hd6y8buifqu81fp7kah"); // D[1].x = D[0].x; UNSUPPORTED("1r3hx6z8u8r8abljwwm9aeskf"); // D[1].y = D[0].y + (B[3].y-B[4].y)/4; //D[0].y+width/2 UNSUPPORTED("4fcwgyabif5z28bihmxf7x4tb"); // D[2].x = AF[1].x + (AF[0].x-AF[1].x)/2 + (B[2].x-B[3].x)/4; //x_center+width/2 UNSUPPORTED("54amw68beuf1he27cp7569llg"); // D[2].y = D[1].y + (B[3].y-B[4].y)/2; //D[1].y+width UNSUPPORTED("54ovwnsyt9kbwtqf47f7c2ch3"); // D[3].x = AF[1].x + (AF[0].x-AF[1].x)/2 - (B[2].x-B[3].x)/4; //D[2].x mirrowed across the center UNSUPPORTED("esx26fefr0mrz7t4p720sf58a"); // D[3].y = D[2].y; UNSUPPORTED("6rpcfql0js4c3hg279dfw3na0"); // D[4].x = AF[1].x + (AF[0].x-AF[1].x)/2 - (B[2].x-B[3].x)*3/4; UNSUPPORTED("2q1cxgb3rckor7bxppmobumh0"); // D[4].y = D[1].y; UNSUPPORTED("4ihzpkh7w4ranwnvy0w5gcgnf"); // D[5].x = D[4].x; UNSUPPORTED("bgu3mbmk36rgraaak3oxce0r8"); // D[5].y = D[0].y; UNSUPPORTED("d4ps5t7sfp45tctsjawfhtbnx"); // gvrender_polygon(job, D, sides + 2, filled); UNSUPPORTED("hjs1b12h76k9zk31lumwwf9f"); // /*dsDNA line*/ UNSUPPORTED("dcf6dzx1g3i2ccb6d7iwrzof8"); // C[0].x = AF[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("5pw7rn49ku3rfnvp5lbqoivb7"); // C[1].x = AF[0].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("7vyejosjncamgazhav0j15x5q"); // gvrender_polyline(job, C, 2); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("api2h9s3b85sv9rd97y8rgtud"); // case (10 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("28rdr11lzywp8e0rmvk2kob5x"); // * half arrow shape, scales in the x-direction UNSUPPORTED("qqfabopc9ur04mms6juzgp3x"); // * D[1] UNSUPPORTED("e46ybyktily44t0b7fyholuq2"); // * | * | * | * ------------ * | * ------------------\ D[0] UNSUPPORTED("c1eovxh5oerfbxr449dk7o87u"); // * UNSUPPORTED("30zs4hbrokoqtcgihv0hj9b3o"); // * -------------------------------- UNSUPPORTED("dhhao73bupb3qih7po05x8qcs"); // * UNSUPPORTED("4gn10s3n3ms2z2jz5zpxmp5ay"); // */ UNSUPPORTED("31z12vlharu09ldqvmirdvp2n"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2; UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("agoljir79z51apt1tmk0f0sc7"); // //width units are (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("azjvg240odj44iv9ekoxye94d"); // //the thickness is subituted with (AF[0].x - AF[1].x)/8 to make it scalable in the y with label length UNSUPPORTED("b5f90htb83l32kamg97jm1sux"); // D = (pointf*)zmalloc((sides + 1)*sizeof(pointf)); UNSUPPORTED("7f72fcloe1t7qscdonrjz8qii"); // D[0].x = AF[1].x + (AF[0].x - AF[1].x)/2 + (B[2].x-B[3].x);//x_center + width*2 UNSUPPORTED("aojkb4cjtphbwmuxkdt5y13al"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)/4;//y_center + 1/2 width UNSUPPORTED("6esajn79a3aj38f6eb3xf9wfj"); // D[1].x = D[0].x - (B[2].x-B[3].x); //x_center UNSUPPORTED("9t3k5f7xx5vksm96d80h9fxwx"); // D[1].y = D[0].y + (B[3].y-B[4].y); UNSUPPORTED("cnpipkg905bpnnnnoa0lopvzy"); // D[2].x = D[1].x; UNSUPPORTED("1ewf0yhdjldw3pxdsfgzwkuuq"); // D[2].y = D[0].y + (B[3].y-B[4].y)/2; UNSUPPORTED("ch7qqmpmawmffg66esm43wmvl"); // D[3].x = AF[1].x + (AF[0].x - AF[1].x)/2 - (AF[0].x - AF[1].x)/4;//x_center - 2*(scalable width) UNSUPPORTED("esx26fefr0mrz7t4p720sf58a"); // D[3].y = D[2].y; UNSUPPORTED("dm1gyw5qetggvcc8zstksyyg2"); // D[4].x = D[3].x; UNSUPPORTED("1fs3e43f2oljbqgl2gtjqo4xn"); // D[4].y = D[0].y; UNSUPPORTED("6u1z6h8gfy4ofbsa9gidwp2v9"); // gvrender_polygon(job, D, sides + 1, filled); UNSUPPORTED("hjs1b12h76k9zk31lumwwf9f"); // /*dsDNA line*/ UNSUPPORTED("dcf6dzx1g3i2ccb6d7iwrzof8"); // C[0].x = AF[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("5pw7rn49ku3rfnvp5lbqoivb7"); // C[1].x = AF[0].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("7vyejosjncamgazhav0j15x5q"); // gvrender_polyline(job, C, 2); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("d3qtw2cyrswp62e4psl3ww6qy"); // case (11 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("asi2pc1274ap2839mbipmof4"); // * zigzag shape, scales in the x-direction (only the middle section) UNSUPPORTED("11dzfjbtxkn4alvdn9s9waab8"); // * UNSUPPORTED("6ng5df4tnn838bpcedbdkwgik"); // * UNSUPPORTED("ebmsq3svyy5vfr02vuesdb7om"); // * ----D[2] UNSUPPORTED("474tiy3ppnarbx3tem6pex5wl"); // * | |________ D[0] UNSUPPORTED("br8aj42mw70mad09j8u79ty50"); // * | |____ UNSUPPORTED("435gbgj841wxffxgc43eficn0"); // * ---------- | UNSUPPORTED("72xs5i64zgn8illkas18bwl77"); // * D[4] --- D[7] UNSUPPORTED("c1eovxh5oerfbxr449dk7o87u"); // * UNSUPPORTED("7ltzne5zulu744fj39ucj4ohf"); // * UNSUPPORTED("dhhao73bupb3qih7po05x8qcs"); // * UNSUPPORTED("4gn10s3n3ms2z2jz5zpxmp5ay"); // */ UNSUPPORTED("31z12vlharu09ldqvmirdvp2n"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2; UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("agoljir79z51apt1tmk0f0sc7"); // //width units are (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("azjvg240odj44iv9ekoxye94d"); // //the thickness is subituted with (AF[0].x - AF[1].x)/8 to make it scalable in the y with label length UNSUPPORTED("7uqzacf8x5tg89bgh6rziw1s3"); // D = (pointf*)zmalloc((sides + 4)*sizeof(pointf)); UNSUPPORTED("8puozbi1qbdhenklno39sad43"); // D[0].x = AF[1].x + (AF[0].x - AF[1].x)/2 + (AF[0].x - AF[1].x)/8 + (B[2].x-B[3].x)/2;//x_center + scalable_width + width UNSUPPORTED("aojkb4cjtphbwmuxkdt5y13al"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)/4;//y_center + 1/2 width UNSUPPORTED("d4aju7h8k010npgrrxffdkebj"); // D[1].x = AF[1].x + (AF[0].x - AF[1].x)/2 - (AF[0].x - AF[1].x)/8; //x_center - width UNSUPPORTED("377dvf6krrmq87z68ekoyk1nr"); // D[1].y = D[0].y; UNSUPPORTED("cnpipkg905bpnnnnoa0lopvzy"); // D[2].x = D[1].x; UNSUPPORTED("crefk31pbp2yilanj44au7qbe"); // D[2].y = D[1].y + (B[3].y-B[4].y)/2; UNSUPPORTED("1gxksvxg269nccy3ki80smka3"); // D[3].x = D[2].x - (B[2].x-B[3].x)/2; //D[2].x - width UNSUPPORTED("esx26fefr0mrz7t4p720sf58a"); // D[3].y = D[2].y; UNSUPPORTED("dm1gyw5qetggvcc8zstksyyg2"); // D[4].x = D[3].x; UNSUPPORTED("7lfc7py2ka8mdt2ptx9nm6vrb"); // D[4].y = AF[2].y + (AF[1].y - AF[2].y)/2 - (B[3].y-B[4].y)/4; //y_center - 1/2(width) UNSUPPORTED("2jcyrcu5t9kbekchzlvw8g996"); // D[5].x = D[0].x - (B[2].x-B[3].x)/2; UNSUPPORTED("9h546osr54mx5910v00kmvmo3"); // D[5].y = D[4].y; UNSUPPORTED("a2qj96305wxo9gce1tujcuecz"); // D[6].x = D[5].x; UNSUPPORTED("4orb58bnb2ascibwd7xd0y4hf"); // D[6].y = D[5].y - (B[3].y-B[4].y)/2; UNSUPPORTED("5hppmiblaazms70xhasaspb22"); // D[7].x = D[0].x; UNSUPPORTED("afqmp4euhvvfkjpszw9u76l4r"); // D[7].y = D[6].y; UNSUPPORTED("519fp4pixwl2w7d4ssm51lram"); // gvrender_polygon(job, D, sides + 4, filled); UNSUPPORTED("2r3im7kh170rpplkwcoi8l6jp"); // /*dsDNA line left half*/ UNSUPPORTED("dcf6dzx1g3i2ccb6d7iwrzof8"); // C[0].x = AF[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("7eokez2yp2825neik2f0yb69s"); // C[1].x = D[4].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("eum17d4kc12w09ka3gn4xnjkl"); // /*dsDNA line right half*/ UNSUPPORTED("3mga7r2ky1w3m12hajx82ljg6"); // C[0].x = D[7].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("5pw7rn49ku3rfnvp5lbqoivb7"); // C[1].x = AF[0].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("bpepkqrqcoslkcywz6fwjoemb"); // gvrender_polyline(job, C, 2); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("303w43enaucmyhixkc1xhs652"); // break; UNSUPPORTED("8xtw70fmxvc3slz5c6ct4iqq"); // case (12 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("bynfyyael4om2fd0roolnhg11"); // * does not scale, on the left side UNSUPPORTED("11dzfjbtxkn4alvdn9s9waab8"); // * UNSUPPORTED("9jluf518ja9nhvnco2qeyyukh"); // * D[3]------D[2] UNSUPPORTED("796ehiftmwg66mguye5i6gdl9"); // * | | UNSUPPORTED("anbjdqkop5jdxo0pqszbmsil0"); // * D[0]------D[1] UNSUPPORTED("3b7cclindb323xc5dyldebt79"); // * ----- ------------ UNSUPPORTED("ekoc25w3kdsjlqotz5zserik"); // * | | UNSUPPORTED("d246t2abb3qcdptpl7t388cet"); // * D[0]--D[1] UNSUPPORTED("c1eovxh5oerfbxr449dk7o87u"); // * UNSUPPORTED("7ltzne5zulu744fj39ucj4ohf"); // * UNSUPPORTED("dhhao73bupb3qih7po05x8qcs"); // * UNSUPPORTED("4gn10s3n3ms2z2jz5zpxmp5ay"); // */ UNSUPPORTED("31z12vlharu09ldqvmirdvp2n"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2; UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("agoljir79z51apt1tmk0f0sc7"); // //width units are (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("azjvg240odj44iv9ekoxye94d"); // //the thickness is subituted with (AF[0].x - AF[1].x)/8 to make it scalable in the y with label length UNSUPPORTED("dk2ovejnwrhnobz5s8tu0j10r"); // D = (pointf*)zmalloc((sides)*sizeof(pointf)); UNSUPPORTED("o7xplnda870crsqrrtxoeovw"); // D[0].x = AF[1].x;//the very left edge UNSUPPORTED("97g2igromxtixmscljv7c9wu6"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)/8;//y_center + 1/4 width UNSUPPORTED("5vjhczya0wmraeexdugfakfz8"); // D[1].x = D[0].x + 2*(B[2].x-B[3].x); UNSUPPORTED("377dvf6krrmq87z68ekoyk1nr"); // D[1].y = D[0].y; UNSUPPORTED("cnpipkg905bpnnnnoa0lopvzy"); // D[2].x = D[1].x; UNSUPPORTED("crefk31pbp2yilanj44au7qbe"); // D[2].y = D[1].y + (B[3].y-B[4].y)/2; UNSUPPORTED("78e3c23lx1btcjbe2srm6rcal"); // D[3].x = D[0].x; UNSUPPORTED("esx26fefr0mrz7t4p720sf58a"); // D[3].y = D[2].y; UNSUPPORTED("d68sdlvrto6k9daq3v4bffw5y"); // gvrender_polygon(job, D, sides, filled); UNSUPPORTED("ekpqju1yk89s6h95eac20r1gq"); // /*second, lower shape*/ UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("dk2ovejnwrhnobz5s8tu0j10r"); // D = (pointf*)zmalloc((sides)*sizeof(pointf)); UNSUPPORTED("bbttbv2k8ll2jqajk92f8cjw5"); // D[0].x = AF[1].x + (B[2].x-B[3].x); UNSUPPORTED("8t3rx5v8pl369i9s1bav2htbd"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 - (B[3].y-B[4].y)*5/8; //y_center - 5/4 width UNSUPPORTED("9pkvrpz0i5eo220nag6ovrbfn"); // D[1].x = D[0].x + (B[2].x-B[3].x); UNSUPPORTED("377dvf6krrmq87z68ekoyk1nr"); // D[1].y = D[0].y; UNSUPPORTED("cnpipkg905bpnnnnoa0lopvzy"); // D[2].x = D[1].x; UNSUPPORTED("crefk31pbp2yilanj44au7qbe"); // D[2].y = D[1].y + (B[3].y-B[4].y)/2; UNSUPPORTED("78e3c23lx1btcjbe2srm6rcal"); // D[3].x = D[0].x; UNSUPPORTED("esx26fefr0mrz7t4p720sf58a"); // D[3].y = D[2].y; UNSUPPORTED("d68sdlvrto6k9daq3v4bffw5y"); // gvrender_polygon(job, D, sides, filled); UNSUPPORTED("eum17d4kc12w09ka3gn4xnjkl"); // /*dsDNA line right half*/ UNSUPPORTED("8uxhxokvb62d8vqgpxrqqprm7"); // C[0].x = D[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("5pw7rn49ku3rfnvp5lbqoivb7"); // C[1].x = AF[0].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("bpepkqrqcoslkcywz6fwjoemb"); // gvrender_polyline(job, C, 2); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("303w43enaucmyhixkc1xhs652"); // break; UNSUPPORTED("5jt28oeq5aqdeuwsfmezn51lt"); // case (13 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("b68kolhfp5nwayr9aru8m8e5c"); // * does not scale, on the right side UNSUPPORTED("11dzfjbtxkn4alvdn9s9waab8"); // * UNSUPPORTED("b3es50hturnmkxnq7e5ol9ain"); // * D[2]------D[1] UNSUPPORTED("f3ui2tnmq3tyd5y0zaxgalibr"); // * | | UNSUPPORTED("8da12absy3kplnjgp306ow2r1"); // *----------D[3]------D[0] UNSUPPORTED("8al119ctyx2l5odyoc6w4up0r"); // * ----- D[1] UNSUPPORTED("ec20mvh529jwauxvcvvcv9hjb"); // * | | UNSUPPORTED("d0q7vfsuc2e3fts98jrfkk3on"); // * D[3]--D[0] UNSUPPORTED("c1eovxh5oerfbxr449dk7o87u"); // * UNSUPPORTED("7ltzne5zulu744fj39ucj4ohf"); // * UNSUPPORTED("dhhao73bupb3qih7po05x8qcs"); // * UNSUPPORTED("4gn10s3n3ms2z2jz5zpxmp5ay"); // */ UNSUPPORTED("31z12vlharu09ldqvmirdvp2n"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2; UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("agoljir79z51apt1tmk0f0sc7"); // //width units are (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("azjvg240odj44iv9ekoxye94d"); // //the thickness is subituted with (AF[0].x - AF[1].x)/8 to make it scalable in the y with label length UNSUPPORTED("dk2ovejnwrhnobz5s8tu0j10r"); // D = (pointf*)zmalloc((sides)*sizeof(pointf)); UNSUPPORTED("7a5jojmk4vack2tnjyo1dnv5c"); // D[0].x = AF[0].x;//the very right edge UNSUPPORTED("97g2igromxtixmscljv7c9wu6"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)/8;//y_center + 1/4 width UNSUPPORTED("34tp01hd6y8buifqu81fp7kah"); // D[1].x = D[0].x; UNSUPPORTED("53lzmbxoyk9sss54apowy1jcj"); // D[1].y = D[0].y + (B[3].y-B[4].y)/2; UNSUPPORTED("5ggtybq4huk2l27co2brcnn7a"); // D[2].x = D[1].x - 2*(B[3].y-B[4].y); UNSUPPORTED("dmuv0ci8g28j2wpq47bkjo7p6"); // D[2].y = D[1].y; UNSUPPORTED("5ihipbue45drjma9vxlpgy615"); // D[3].x = D[2].x; UNSUPPORTED("b9duody7fe2aysvdbb7u2vz0h"); // D[3].y = D[0].y; UNSUPPORTED("d68sdlvrto6k9daq3v4bffw5y"); // gvrender_polygon(job, D, sides, filled); UNSUPPORTED("ekpqju1yk89s6h95eac20r1gq"); // /*second, lower shape*/ UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("dk2ovejnwrhnobz5s8tu0j10r"); // D = (pointf*)zmalloc((sides)*sizeof(pointf)); UNSUPPORTED("1koli020v5df0l9ozg6qbxov9"); // D[0].x = AF[0].x - (B[2].x-B[3].x); UNSUPPORTED("8t3rx5v8pl369i9s1bav2htbd"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 - (B[3].y-B[4].y)*5/8; //y_center - 5/4 width UNSUPPORTED("34tp01hd6y8buifqu81fp7kah"); // D[1].x = D[0].x; UNSUPPORTED("53lzmbxoyk9sss54apowy1jcj"); // D[1].y = D[0].y + (B[3].y-B[4].y)/2; UNSUPPORTED("1tvqu076kbr7qcxd1pporcrlw"); // D[2].x = D[1].x - (B[3].y-B[4].y); UNSUPPORTED("dmuv0ci8g28j2wpq47bkjo7p6"); // D[2].y = D[1].y; UNSUPPORTED("5ihipbue45drjma9vxlpgy615"); // D[3].x = D[2].x; UNSUPPORTED("b9duody7fe2aysvdbb7u2vz0h"); // D[3].y = D[0].y; UNSUPPORTED("d68sdlvrto6k9daq3v4bffw5y"); // gvrender_polygon(job, D, sides, filled); UNSUPPORTED("2r3im7kh170rpplkwcoi8l6jp"); // /*dsDNA line left half*/ UNSUPPORTED("dcf6dzx1g3i2ccb6d7iwrzof8"); // C[0].x = AF[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("ogtpwtelm2m435skybbigshn"); // C[1].x = D[3].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("bpepkqrqcoslkcywz6fwjoemb"); // gvrender_polyline(job, C, 2); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("303w43enaucmyhixkc1xhs652"); // break; UNSUPPORTED("b00adjh71tebnwktqy2c7qen"); // case (14 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("167ktpr6jgq2ir87knm58dnxw"); // * does not scale UNSUPPORTED("11dzfjbtxkn4alvdn9s9waab8"); // * UNSUPPORTED("3llrhwcbgncbf9dwdut8nbop8"); // * D[3]------D[2] D[3]------D[2] UNSUPPORTED("3bkrw2bi9jt34caj90fh17xk"); // * | | | | UNSUPPORTED("e8rezojipvcbc7wl7lkb5gtwm"); // * ---D[0]------D[1] D[0]------D[1]---- UNSUPPORTED("3llrhwcbgncbf9dwdut8nbop8"); // * D[3]------D[2] D[3]------D[2] UNSUPPORTED("dsr5jaoof7rw4c3tkgfx86yor"); // * | | | | UNSUPPORTED("73xc7e0yi8z88q6x4x9s8f50a"); // * D[0]------D[1] D[0]------D[1] UNSUPPORTED("53z8rhlvldkx4ydcoaqfnm4tk"); // * UNSUPPORTED("c1eovxh5oerfbxr449dk7o87u"); // * UNSUPPORTED("7ltzne5zulu744fj39ucj4ohf"); // * UNSUPPORTED("dhhao73bupb3qih7po05x8qcs"); // * UNSUPPORTED("4gn10s3n3ms2z2jz5zpxmp5ay"); // */ UNSUPPORTED("31z12vlharu09ldqvmirdvp2n"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2; UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("agoljir79z51apt1tmk0f0sc7"); // //width units are (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("azjvg240odj44iv9ekoxye94d"); // //the thickness is subituted with (AF[0].x - AF[1].x)/8 to make it scalable in the y with label length UNSUPPORTED("caiifq15qssrojo1lp5kd761t"); // /*upper left rectangle*/ UNSUPPORTED("dk2ovejnwrhnobz5s8tu0j10r"); // D = (pointf*)zmalloc((sides)*sizeof(pointf)); UNSUPPORTED("f2j5si3mjcrfchan7ja10w14r"); // D[0].x = AF[1].x + (AF[0].x - AF[1].x)/2 - (B[2].x-B[3].x)*9/8; //x_center - 2*width - 1/4*width UNSUPPORTED("97g2igromxtixmscljv7c9wu6"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)/8;//y_center + 1/4 width UNSUPPORTED("9pkvrpz0i5eo220nag6ovrbfn"); // D[1].x = D[0].x + (B[2].x-B[3].x); UNSUPPORTED("377dvf6krrmq87z68ekoyk1nr"); // D[1].y = D[0].y; UNSUPPORTED("cnpipkg905bpnnnnoa0lopvzy"); // D[2].x = D[1].x; UNSUPPORTED("crefk31pbp2yilanj44au7qbe"); // D[2].y = D[1].y + (B[3].y-B[4].y)/2; UNSUPPORTED("78e3c23lx1btcjbe2srm6rcal"); // D[3].x = D[0].x; UNSUPPORTED("esx26fefr0mrz7t4p720sf58a"); // D[3].y = D[2].y; UNSUPPORTED("d68sdlvrto6k9daq3v4bffw5y"); // gvrender_polygon(job, D, sides, filled); UNSUPPORTED("c8aakjie0dovvmj2y1cv9pqvi"); // /*lower, left rectangle*/ UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("dk2ovejnwrhnobz5s8tu0j10r"); // D = (pointf*)zmalloc((sides)*sizeof(pointf)); UNSUPPORTED("f2j5si3mjcrfchan7ja10w14r"); // D[0].x = AF[1].x + (AF[0].x - AF[1].x)/2 - (B[2].x-B[3].x)*9/8; //x_center - 2*width - 1/4*width UNSUPPORTED("12qbz2yet5sxyqb1w92s4ndn6"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 - (B[3].y-B[4].y)*5/8;//y_center - width - 1/4 width UNSUPPORTED("9pkvrpz0i5eo220nag6ovrbfn"); // D[1].x = D[0].x + (B[2].x-B[3].x); UNSUPPORTED("377dvf6krrmq87z68ekoyk1nr"); // D[1].y = D[0].y; UNSUPPORTED("cnpipkg905bpnnnnoa0lopvzy"); // D[2].x = D[1].x; UNSUPPORTED("crefk31pbp2yilanj44au7qbe"); // D[2].y = D[1].y + (B[3].y-B[4].y)/2; UNSUPPORTED("78e3c23lx1btcjbe2srm6rcal"); // D[3].x = D[0].x; UNSUPPORTED("esx26fefr0mrz7t4p720sf58a"); // D[3].y = D[2].y; UNSUPPORTED("d68sdlvrto6k9daq3v4bffw5y"); // gvrender_polygon(job, D, sides, filled); UNSUPPORTED("5zdu7hjxl21oye4glrh3qki87"); // /*lower, right rectangle*/ UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("dk2ovejnwrhnobz5s8tu0j10r"); // D = (pointf*)zmalloc((sides)*sizeof(pointf)); UNSUPPORTED("jnnrld5fecpgw2spcpy1owlt"); // D[0].x = AF[1].x + (AF[0].x - AF[1].x)/2 + (B[2].x-B[3].x)/8; //x_center + 1/4*width UNSUPPORTED("12qbz2yet5sxyqb1w92s4ndn6"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 - (B[3].y-B[4].y)*5/8;//y_center - width - 1/4 width UNSUPPORTED("9pkvrpz0i5eo220nag6ovrbfn"); // D[1].x = D[0].x + (B[2].x-B[3].x); UNSUPPORTED("377dvf6krrmq87z68ekoyk1nr"); // D[1].y = D[0].y; UNSUPPORTED("cnpipkg905bpnnnnoa0lopvzy"); // D[2].x = D[1].x; UNSUPPORTED("crefk31pbp2yilanj44au7qbe"); // D[2].y = D[1].y + (B[3].y-B[4].y)/2; UNSUPPORTED("78e3c23lx1btcjbe2srm6rcal"); // D[3].x = D[0].x; UNSUPPORTED("esx26fefr0mrz7t4p720sf58a"); // D[3].y = D[2].y; UNSUPPORTED("d68sdlvrto6k9daq3v4bffw5y"); // gvrender_polygon(job, D, sides, filled); UNSUPPORTED("d6ndnv9bfbxsy039deiideukm"); // /*upper, right rectangle*/ UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("dk2ovejnwrhnobz5s8tu0j10r"); // D = (pointf*)zmalloc((sides)*sizeof(pointf)); UNSUPPORTED("jnnrld5fecpgw2spcpy1owlt"); // D[0].x = AF[1].x + (AF[0].x - AF[1].x)/2 + (B[2].x-B[3].x)/8; //x_center + 1/4*width UNSUPPORTED("8u02sf2xpgku2gvq8y3cyvv3"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)/8;//y_center - width - 1/4 width UNSUPPORTED("9pkvrpz0i5eo220nag6ovrbfn"); // D[1].x = D[0].x + (B[2].x-B[3].x); UNSUPPORTED("377dvf6krrmq87z68ekoyk1nr"); // D[1].y = D[0].y; UNSUPPORTED("cnpipkg905bpnnnnoa0lopvzy"); // D[2].x = D[1].x; UNSUPPORTED("crefk31pbp2yilanj44au7qbe"); // D[2].y = D[1].y + (B[3].y-B[4].y)/2; UNSUPPORTED("78e3c23lx1btcjbe2srm6rcal"); // D[3].x = D[0].x; UNSUPPORTED("esx26fefr0mrz7t4p720sf58a"); // D[3].y = D[2].y; UNSUPPORTED("d68sdlvrto6k9daq3v4bffw5y"); // gvrender_polygon(job, D, sides, filled); UNSUPPORTED("eum17d4kc12w09ka3gn4xnjkl"); // /*dsDNA line right half*/ UNSUPPORTED("8uxhxokvb62d8vqgpxrqqprm7"); // C[0].x = D[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("5pw7rn49ku3rfnvp5lbqoivb7"); // C[1].x = AF[0].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("2r3im7kh170rpplkwcoi8l6jp"); // /*dsDNA line left half*/ UNSUPPORTED("5slbe4qz5t6sovatfjm8ccmcs"); // C[0].x = AF[1].x + (AF[0].x - AF[1].x)/2 - (B[2].x-B[3].x)*9/8; //D[0].x of of the left rectangles UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("der143k1nuqx7trw59k0efgrl"); // C[1].x = AF[1].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("bpepkqrqcoslkcywz6fwjoemb"); // gvrender_polyline(job, C, 2); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("303w43enaucmyhixkc1xhs652"); // break; UNSUPPORTED("14ei614r723mcxpmqhkpr8ijk"); // case (15 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("167ktpr6jgq2ir87knm58dnxw"); // * does not scale UNSUPPORTED("11dzfjbtxkn4alvdn9s9waab8"); // * UNSUPPORTED("4j349xa0inyf0oh36zva5zr7l"); // * D[3]----------D[2] UNSUPPORTED("7b4dzyad9f7brkvbovf9r6hqw"); // * | | UNSUPPORTED("79i3zed3ho3ky8mkm7skk5hwz"); // * D[0]----------D[1] UNSUPPORTED("alv06nc1uxctts8p1qmc51lbk"); // * ---- --------- UNSUPPORTED("4j349xa0inyf0oh36zva5zr7l"); // * D[3]----------D[2] UNSUPPORTED("7b4dzyad9f7brkvbovf9r6hqw"); // * | | UNSUPPORTED("79i3zed3ho3ky8mkm7skk5hwz"); // * D[0]----------D[1] UNSUPPORTED("dhhao73bupb3qih7po05x8qcs"); // * UNSUPPORTED("4gn10s3n3ms2z2jz5zpxmp5ay"); // */ UNSUPPORTED("31z12vlharu09ldqvmirdvp2n"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2; UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("agoljir79z51apt1tmk0f0sc7"); // //width units are (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("azjvg240odj44iv9ekoxye94d"); // //the thickness is subituted with (AF[0].x - AF[1].x)/8 to make it scalable in the y with label length UNSUPPORTED("dk2ovejnwrhnobz5s8tu0j10r"); // D = (pointf*)zmalloc((sides)*sizeof(pointf)); UNSUPPORTED("awwgll9ed6viac317lvwpn71d"); // D[0].x = AF[1].x + (AF[0].x - AF[1].x)/2 - (B[2].x-B[3].x); //x_center - 2*width UNSUPPORTED("97g2igromxtixmscljv7c9wu6"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)/8;//y_center + 1/4 width UNSUPPORTED("5vjhczya0wmraeexdugfakfz8"); // D[1].x = D[0].x + 2*(B[2].x-B[3].x); UNSUPPORTED("377dvf6krrmq87z68ekoyk1nr"); // D[1].y = D[0].y; UNSUPPORTED("cnpipkg905bpnnnnoa0lopvzy"); // D[2].x = D[1].x; UNSUPPORTED("crefk31pbp2yilanj44au7qbe"); // D[2].y = D[1].y + (B[3].y-B[4].y)/2; UNSUPPORTED("78e3c23lx1btcjbe2srm6rcal"); // D[3].x = D[0].x; UNSUPPORTED("esx26fefr0mrz7t4p720sf58a"); // D[3].y = D[2].y; UNSUPPORTED("d68sdlvrto6k9daq3v4bffw5y"); // gvrender_polygon(job, D, sides, filled); UNSUPPORTED("ekpqju1yk89s6h95eac20r1gq"); // /*second, lower shape*/ UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("dk2ovejnwrhnobz5s8tu0j10r"); // D = (pointf*)zmalloc((sides)*sizeof(pointf)); UNSUPPORTED("awwgll9ed6viac317lvwpn71d"); // D[0].x = AF[1].x + (AF[0].x - AF[1].x)/2 - (B[2].x-B[3].x); //x_center - 2*width UNSUPPORTED("12qbz2yet5sxyqb1w92s4ndn6"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 - (B[3].y-B[4].y)*5/8;//y_center - width - 1/4 width UNSUPPORTED("5vjhczya0wmraeexdugfakfz8"); // D[1].x = D[0].x + 2*(B[2].x-B[3].x); UNSUPPORTED("377dvf6krrmq87z68ekoyk1nr"); // D[1].y = D[0].y; UNSUPPORTED("cnpipkg905bpnnnnoa0lopvzy"); // D[2].x = D[1].x; UNSUPPORTED("crefk31pbp2yilanj44au7qbe"); // D[2].y = D[1].y + (B[3].y-B[4].y)/2; UNSUPPORTED("78e3c23lx1btcjbe2srm6rcal"); // D[3].x = D[0].x; UNSUPPORTED("esx26fefr0mrz7t4p720sf58a"); // D[3].y = D[2].y; UNSUPPORTED("d68sdlvrto6k9daq3v4bffw5y"); // gvrender_polygon(job, D, sides, filled); UNSUPPORTED("eum17d4kc12w09ka3gn4xnjkl"); // /*dsDNA line right half*/ UNSUPPORTED("8uxhxokvb62d8vqgpxrqqprm7"); // C[0].x = D[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("5pw7rn49ku3rfnvp5lbqoivb7"); // C[1].x = AF[0].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("2r3im7kh170rpplkwcoi8l6jp"); // /*dsDNA line left half*/ UNSUPPORTED("dcf6dzx1g3i2ccb6d7iwrzof8"); // C[0].x = AF[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("dvcsbjrm41adw6focml1eh8zc"); // C[1].x = D[0].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("303w43enaucmyhixkc1xhs652"); // break; UNSUPPORTED("48w5mwwikj3xri88x1ws7mspe"); // case (16 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("7ltzne5zulu744fj39ucj4ohf"); // * UNSUPPORTED("79o67pgmuajgw0oy68fg9bbvd"); // * UNSUPPORTED("h0rc5xn5b50bnx2xer2z5stp"); // * +--------------+ UNSUPPORTED("ex2ghpokf7935zc3r3j6788pu"); // * | | UNSUPPORTED("25narjhny8esxdam3pqsc62n1"); // * |x | UNSUPPORTED("h0cdk6heuz85qgmbro6tzuqz"); // * |_____________ | UNSUPPORTED("h0rc5xn5b50bnx2xer2z5stp"); // * +--------------+ UNSUPPORTED("4gn10s3n3ms2z2jz5zpxmp5ay"); // */ UNSUPPORTED("31z12vlharu09ldqvmirdvp2n"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2; UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("agoljir79z51apt1tmk0f0sc7"); // //width units are (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("azjvg240odj44iv9ekoxye94d"); // //the thickness is subituted with (AF[0].x - AF[1].x)/8 to make it scalable in the y with label length UNSUPPORTED("dk2ovejnwrhnobz5s8tu0j10r"); // D = (pointf*)zmalloc((sides)*sizeof(pointf)); UNSUPPORTED("8bi8jgvnnbgjoe0rtiovk3kka"); // D[0].x = AF[0].x; UNSUPPORTED("d1eg8u95ffvpn8cj0t175qe8"); // D[0].y = B[1].y - (B[3].y - B[4].y)/2; UNSUPPORTED("45vton2uqw835epqg2o0j1qee"); // D[1].x = B[3].x; UNSUPPORTED("2so1ozst5cwd02o33408hxi1n"); // D[1].y = B[3].y - (B[3].y - B[4].y)/2; UNSUPPORTED("2y7ipfj9drc5mfgjluf5y6k6p"); // D[2].x = AF[2].x; UNSUPPORTED("bopqgv9t3o6ppbojdunc5qjfl"); // D[2].y = AF[2].y + (B[3].y - B[4].y)/2; UNSUPPORTED("7h94vcqfqaq3o7bcei0wollyt"); // D[3].x = AF[0].x; UNSUPPORTED("94cxjx74gts01u98ngcns0j0o"); // D[3].y = AF[2].y + (B[3].y - B[4].y)/2; UNSUPPORTED("d68sdlvrto6k9daq3v4bffw5y"); // gvrender_polygon(job, D, sides, filled); UNSUPPORTED("etbsuecrxy2aywu5r3ylnasws"); // /* "\" of the X*/ UNSUPPORTED("dn2kymbyi2rzk23hu0fvmtheo"); // C[0].x = AF[1].x + (B[2].x-B[3].x)/4; UNSUPPORTED("19k6gzn1ryigjdj1df6gv5pif"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)/8; //y_center + 1/4 width UNSUPPORTED("a0w8w98rrt5pm4y0l5qdfxkow"); // C[1].x = C[0].x + (B[2].x-B[3].x)/4;//C[0].x + width/2 UNSUPPORTED("d2o4uwqoui3s0bmux80abbqmd"); // C[1].y = C[0].y - (B[3].y-B[4].y)/4;//C[0].y - width/2 UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("4ysg2usfft6m36ffns83iwtmd"); // /*"/" of the X*/ UNSUPPORTED("dn2kymbyi2rzk23hu0fvmtheo"); // C[0].x = AF[1].x + (B[2].x-B[3].x)/4; UNSUPPORTED("6pzw020qiqzzlzrh4wycp229t"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 - (B[3].y-B[4].y)/8; //y_center - 1/4 width UNSUPPORTED("a0w8w98rrt5pm4y0l5qdfxkow"); // C[1].x = C[0].x + (B[2].x-B[3].x)/4;//C[0].x + width/2 UNSUPPORTED("66ksrj9hxsvy0vw9c9ocnihdo"); // C[1].y = C[0].y + (B[3].y-B[4].y)/4;//C[0].y + width/2 UNSUPPORTED("3fkc6rtflns56swh4at4mk3m5"); // gvrender_polyline(job, C, 2); UNSUPPORTED("ak4ihrj8sm9s5bbs7ifbiiqgz"); // /*bottom line*/ UNSUPPORTED("dn2kymbyi2rzk23hu0fvmtheo"); // C[0].x = AF[1].x + (B[2].x-B[3].x)/4; UNSUPPORTED("4u65ge9q81w5f8vq91hnk25j0"); // C[0].y = AF[2].y + (B[3].y-B[4].y)*3/4; UNSUPPORTED("3hxysqi93h8rxowvw7regc5gd"); // C[1].x = AF[0].x - (B[2].x-B[3].x)/4; UNSUPPORTED("142esq47csev8pt9cyj31tqm1"); // C[1].y = C[0].y; UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("303w43enaucmyhixkc1xhs652"); // break; UNSUPPORTED("7vbkukru4dk2jdofrvin4riun"); // case (17 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("cn7c2ju32wqc45avu1irffys"); // * double square UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("athofuzkxb9foobkjvbgruits"); // * +-----+ UNSUPPORTED("btl3kzf1m40fjx35r7s13dak8"); // *--| ___ |--- UNSUPPORTED("3bewsg8hd510shli6vxd282t3"); // * | |_| | UNSUPPORTED("athofuzkxb9foobkjvbgruits"); // * +-----+ UNSUPPORTED("6b0g1rzk4g1o9c2we59or2tun"); // * UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("dbi6282o67zdvjpioemev8l1g"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2 UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("agoljir79z51apt1tmk0f0sc7"); // //width units are (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("dk2ovejnwrhnobz5s8tu0j10r"); // D = (pointf*)zmalloc((sides)*sizeof(pointf)); UNSUPPORTED("cwgeibey8unr1moojtfgv2q7x"); // D[0].x = AF[1].x + (AF[0].x - AF[1].x)/2 + (B[2].x-B[3].x)/2; //x_center+width UNSUPPORTED("5q4z1vahwevjgs3lngw7t3ejs"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[2].x-B[3].x)/2; //y_center UNSUPPORTED("34tp01hd6y8buifqu81fp7kah"); // D[1].x = D[0].x; UNSUPPORTED("hdzi6ghb3chmpb4kat6cn5o5"); // D[1].y = AF[2].y + (AF[1].y - AF[2].y)/2 - (B[2].x-B[3].x)/2; //D[0].y- width UNSUPPORTED("c8u2dyot9xat0mx55arvw7g0y"); // D[2].x = AF[1].x + (AF[0].x - AF[1].x)/2 - (B[2].x-B[3].x)/2; //x_center-width UNSUPPORTED("dmuv0ci8g28j2wpq47bkjo7p6"); // D[2].y = D[1].y; UNSUPPORTED("5ihipbue45drjma9vxlpgy615"); // D[3].x = D[2].x; UNSUPPORTED("b9duody7fe2aysvdbb7u2vz0h"); // D[3].y = D[0].y; UNSUPPORTED("d68sdlvrto6k9daq3v4bffw5y"); // gvrender_polygon(job, D, sides, filled); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("alinyx8nih1q4xkxk0zr6ks0g"); // /*outer square line*/ UNSUPPORTED("esoqwn3fruttfk0xaif261aqh"); // C[0].x = AF[1].x + (AF[0].x - AF[1].x)/2 + (B[2].x-B[3].x)*3/4; //x_center+1.5*width UNSUPPORTED("bne0arbunp5lxwkzz28ssqsek"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[2].x-B[3].x)*3/4; //y_center UNSUPPORTED("ec2n0yx6hife8hckl0aiamvcw"); // C[1].x = C[0].x; UNSUPPORTED("9up5g41z0f2g93bts1dsx63o4"); // C[1].y = AF[2].y + (AF[1].y - AF[2].y)/2 - (B[2].x-B[3].x)*3/4; //y_center- 1.5*width UNSUPPORTED("439vzjsgoxct3lgumvqsuq0s1"); // C[2].x = AF[1].x + (AF[0].x - AF[1].x)/2 - (B[2].x-B[3].x)*3/4; //x_center-1.5*width UNSUPPORTED("76tt8cgoymi6trgixufzzkaf0"); // C[2].y = C[1].y; UNSUPPORTED("6tyxrag4xqp6g766cux9cx264"); // C[3].x = C[2].x; UNSUPPORTED("4ho7h0h9c2lk1inv8t3opclga"); // C[3].y = C[0].y; UNSUPPORTED("300ab5adr2vnr421lamy5ct24"); // C[4] = C[0]; UNSUPPORTED("41173djchd1fq40lkht8mrq1m"); // gvrender_polyline(job, C, 5); UNSUPPORTED("eum17d4kc12w09ka3gn4xnjkl"); // /*dsDNA line right half*/ UNSUPPORTED("8wls9in1sb16jer08b5ssunvn"); // C[0].x = AF[1].x + (AF[0].x - AF[1].x)/2 + (B[2].x-B[3].x)*3/4; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("5pw7rn49ku3rfnvp5lbqoivb7"); // C[1].x = AF[0].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("2r3im7kh170rpplkwcoi8l6jp"); // /*dsDNA line left half*/ UNSUPPORTED("dcf6dzx1g3i2ccb6d7iwrzof8"); // C[0].x = AF[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("8hqchqf2s017c644hehhcaxlo"); // C[1].x = AF[1].x + (AF[0].x - AF[1].x)/2 - (B[2].x-B[3].x)*3/4; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("55yooxu10kqgg7dajhsezqkfq"); // case (18 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("46e0z9y77phnj064p0tf5bf94"); // * X with a dashed line on the bottom UNSUPPORTED("rj2e0ukg50e63tpjapabomkh"); // * UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("dlcnxc753jrol481tmux9lswq"); // * X UNSUPPORTED("81manefx32xoejcl5dhw4vc4s"); // * | UNSUPPORTED("cz2kcexrt76ppdvw9mtzwl6l6"); // * ------------ UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("dbi6282o67zdvjpioemev8l1g"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2 UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("agoljir79z51apt1tmk0f0sc7"); // //width units are (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("29c55ze4t4mczxh3x1veeu005"); // D = (pointf*)zmalloc((sides + 12)*sizeof(pointf)); //12-sided x UNSUPPORTED("bfjnm29zjvd3n7do4y87yuimk"); // D[0].x = AF[1].x + (AF[0].x-AF[1].x)/2 + (B[2].x-B[3].x)/4; //x_center+widtht/2 , lower right corner of the x UNSUPPORTED("6fadfx3cd7603xzoiam5zyl67"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)/2; //y_center + width UNSUPPORTED("34tp01hd6y8buifqu81fp7kah"); // D[1].x = D[0].x; UNSUPPORTED("4v3l9q24gxtxrar8btl47zoow"); // D[1].y = D[0].y + (B[3].y-B[4].y)/8; //D[0].y +width/4 UNSUPPORTED("6rgdcvz0zwjdie9l63ipu46l4"); // D[2].x = D[0].x - (B[2].x-B[3].x)/8; //D[0].x- width/4 //right nook of the x UNSUPPORTED("ex033y5oj49zuzra10asffkia"); // D[2].y = D[1].y + (B[3].y-B[4].y)/8; //D[0].y+width/2 or D[1].y+width/4 UNSUPPORTED("78e3c23lx1btcjbe2srm6rcal"); // D[3].x = D[0].x; UNSUPPORTED("1t32ie8e7he01k3ty0s11cjff"); // D[3].y = D[2].y + (B[3].y-B[4].y)/8; //D[2].y + width/4 UNSUPPORTED("bzw7esfwo40sfa8iehrj4pyr8"); // D[4].x = D[0].x; UNSUPPORTED("12jatkjezhxoyrcbj7qw0kzrn"); // D[4].y = D[3].y + (B[3].y-B[4].y)/8; //top right corner of the x UNSUPPORTED("e9ohdk7a5hiy6qw6kdxic8ih0"); // D[5].x = D[2].x; UNSUPPORTED("9h546osr54mx5910v00kmvmo3"); // D[5].y = D[4].y; UNSUPPORTED("926tc948ppa1dj5yf7ltaex6"); // D[6].x = AF[1].x + (AF[0].x - AF[1].x)/2; //x_center UNSUPPORTED("4na1446f7z8re7jmm7p0szkgh"); // D[6].y = D[3].y; //top nook UNSUPPORTED("2iw65hw9js3r2zpvqu9k4s5f3"); // D[7].x = D[6].x - (B[2].x-B[3].x)/8; //D[5] mirrowed across y UNSUPPORTED("cdcewcs3o64fkxoeknvdtdd6h"); // D[7].y = D[5].y; UNSUPPORTED("4gh2f7t5fi2gir99lnocdxmp0"); // D[8].x = D[7].x - (B[2].x-B[3].x)/8;//top left corner UNSUPPORTED("agbg6evpctdfnyu3qhrm0w5ej"); // D[8].y = D[7].y; UNSUPPORTED("ah5kglnqaow2xvlpo51wluq5y"); // D[9].x = D[8].x; UNSUPPORTED("7eul86jxr4ht4r5bn3fgfljdq"); // D[9].y = D[3].y; UNSUPPORTED("dvxukn20gcceywf45rsdlgwjk"); // D[10].x = D[8].x + (B[2].x-B[3].x)/8; UNSUPPORTED("ealz2oalp4aksi0zz739qke65"); // D[10].y = D[2].y; UNSUPPORTED("5pyd0cxb8ujx2mcsu0n68e5xt"); // D[11].x = D[8].x; UNSUPPORTED("7yttvltea377p6nfz3hviflv7"); // D[11].y = D[1].y; UNSUPPORTED("ed3f8qa9fqvj7h3ir97ic1dlc"); // D[12].x = D[8].x; UNSUPPORTED("dg27h65j67kiidrf7m8vrmssw"); // D[12].y = D[0].y; UNSUPPORTED("88b0xpldaxzgp2ib4r60x41bf"); // D[13].x = D[10].x; UNSUPPORTED("ancic9a9poikrwxxwm0350zyt"); // D[13].y = D[12].y; UNSUPPORTED("8to7w6h0h7szl9z3sky187uk"); // D[14].x = D[6].x; //bottom nook UNSUPPORTED("4f8lav87663g2osgtdmm67fax"); // D[14].y = D[1].y; UNSUPPORTED("4srifebhh66qjppjrk5fgx7my"); // D[15].x = D[2].x; UNSUPPORTED("aojyz5q7eulsrjo7xi4v61pas"); // D[15].y = D[0].y; UNSUPPORTED("eec4an2ita1w8buwmp3e0y9ri"); // gvrender_polygon(job, D, sides + 12, filled); UNSUPPORTED("ezhguv4sszgbsjctxn3dkls1d"); // //2-part dash line UNSUPPORTED("6c9mdcqeputx4llge5t3ro9r8"); // /*line below the x, bottom dash*/ UNSUPPORTED("1qnbpwnfgz995h9ijphe5qq4g"); // C[0].x = D[14].x; //x_center UNSUPPORTED("1xkx02f07j9c7v00hsy0c15je"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; //y_center UNSUPPORTED("ec2n0yx6hife8hckl0aiamvcw"); // C[1].x = C[0].x; UNSUPPORTED("deqh8fifsu2we0oawe0cc0oa6"); // C[1].y = C[0].y + (B[3].y-B[4].y)/8; //y_center + 1/4*width UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("3x5sj9iyejrerw6luuq6elt8u"); // /*line below the x, top dash*/ UNSUPPORTED("1qnbpwnfgz995h9ijphe5qq4g"); // C[0].x = D[14].x; //x_center UNSUPPORTED("2ggw25mqydk24dag1i69ct4yg"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)/4; UNSUPPORTED("ec2n0yx6hife8hckl0aiamvcw"); // C[1].x = C[0].x; UNSUPPORTED("e0n5uvucrlja6280zegwvnw5l"); // C[1].y = C[0].y + (B[3].y-B[4].y)/8; UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("hjs1b12h76k9zk31lumwwf9f"); // /*dsDNA line*/ UNSUPPORTED("dcf6dzx1g3i2ccb6d7iwrzof8"); // C[0].x = AF[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("5pw7rn49ku3rfnvp5lbqoivb7"); // C[1].x = AF[0].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("7vyejosjncamgazhav0j15x5q"); // gvrender_polyline(job, C, 2); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("de8hrmjzk9llxqf5n9hseeur"); // case (19 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("67e50jeeiwiw2yyny8x835sxw"); // * hexagon with a dashed line on the bottom UNSUPPORTED("rj2e0ukg50e63tpjapabomkh"); // * UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("d10jdrlg1miyun96p57ha1zcq"); // * O UNSUPPORTED("81manefx32xoejcl5dhw4vc4s"); // * | UNSUPPORTED("cz2kcexrt76ppdvw9mtzwl6l6"); // * ------------ UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("dbi6282o67zdvjpioemev8l1g"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2 UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("agoljir79z51apt1tmk0f0sc7"); // //width units are (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("bce0986uths99en9ujtallv74"); // D = (pointf*)zmalloc((sides + 4)*sizeof(pointf)); //12-sided x UNSUPPORTED("1r0dyice1nwwjxx60euskvs22"); // D[0].x = AF[1].x + (AF[0].x-AF[1].x)/2 + (B[2].x-B[3].x)/8; //x_center+widtht/8 , lower right corner of the hexagon UNSUPPORTED("6fadfx3cd7603xzoiam5zyl67"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)/2; //y_center + width UNSUPPORTED("7vtpwdfs55eauxhtxly0fq9yo"); // D[1].x = D[0].x + (B[2].x-B[3].x)/8; UNSUPPORTED("4v3l9q24gxtxrar8btl47zoow"); // D[1].y = D[0].y + (B[3].y-B[4].y)/8; //D[0].y +width/4 UNSUPPORTED("80iff0mad95x21gnzwaa6r2du"); // D[2].x = D[1].x; //D[0].x- width/4 UNSUPPORTED("e85qlsqp5ec0c39ukmurh01le"); // D[2].y = D[1].y + (B[3].y-B[4].y)/4; //D[1].y+width/2 UNSUPPORTED("78e3c23lx1btcjbe2srm6rcal"); // D[3].x = D[0].x; UNSUPPORTED("1t32ie8e7he01k3ty0s11cjff"); // D[3].y = D[2].y + (B[3].y-B[4].y)/8; //D[2].y + width/4 UNSUPPORTED("8so3hvsavyaik1857ci06i28n"); // D[4].x = D[3].x - (B[2].x-B[3].x)/4; UNSUPPORTED("eplzuryql5ru5fo39zx6qq098"); // D[4].y = D[3].y; //top of the hexagon UNSUPPORTED("85tgwpkocchmr8656hsvvujbk"); // D[5].x = D[4].x - (B[2].x-B[3].x)/8; UNSUPPORTED("d78lk5o8y51l9z7neypp202ok"); // D[5].y = D[2].y; UNSUPPORTED("a2qj96305wxo9gce1tujcuecz"); // D[6].x = D[5].x; UNSUPPORTED("au3tvlkozqb147n50te46l8da"); // D[6].y = D[1].y; //left side UNSUPPORTED("45h8dltyrq4aavcyjz923uke9"); // D[7].x = D[4].x; UNSUPPORTED("3toyc6445kpow5ul101muzie7"); // D[7].y = D[0].y; //bottom UNSUPPORTED("519fp4pixwl2w7d4ssm51lram"); // gvrender_polygon(job, D, sides + 4, filled); UNSUPPORTED("ezhguv4sszgbsjctxn3dkls1d"); // //2-part dash line UNSUPPORTED("6c9mdcqeputx4llge5t3ro9r8"); // /*line below the x, bottom dash*/ UNSUPPORTED("4fj9vuy8q45y638ge1ixleprj"); // C[0].x = AF[1].x + (AF[0].x - AF[1].x)/2; //x_center UNSUPPORTED("1xkx02f07j9c7v00hsy0c15je"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; //y_center UNSUPPORTED("ec2n0yx6hife8hckl0aiamvcw"); // C[1].x = C[0].x; UNSUPPORTED("deqh8fifsu2we0oawe0cc0oa6"); // C[1].y = C[0].y + (B[3].y-B[4].y)/8; //y_center + 1/4*width UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("3x5sj9iyejrerw6luuq6elt8u"); // /*line below the x, top dash*/ UNSUPPORTED("4fj9vuy8q45y638ge1ixleprj"); // C[0].x = AF[1].x + (AF[0].x - AF[1].x)/2; //x_center UNSUPPORTED("2ggw25mqydk24dag1i69ct4yg"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)/4; UNSUPPORTED("ec2n0yx6hife8hckl0aiamvcw"); // C[1].x = C[0].x; UNSUPPORTED("e0n5uvucrlja6280zegwvnw5l"); // C[1].y = C[0].y + (B[3].y-B[4].y)/8; UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("hjs1b12h76k9zk31lumwwf9f"); // /*dsDNA line*/ UNSUPPORTED("dcf6dzx1g3i2ccb6d7iwrzof8"); // C[0].x = AF[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("5pw7rn49ku3rfnvp5lbqoivb7"); // C[1].x = AF[0].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("7vyejosjncamgazhav0j15x5q"); // gvrender_polyline(job, C, 2); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("eezw6z44jruvicwzff6onzjsf"); // case (20 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("4oo44mzmfh78pq3lzqwtmsfz4"); // * X with a solid line on the bottom UNSUPPORTED("rj2e0ukg50e63tpjapabomkh"); // * UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("dlcnxc753jrol481tmux9lswq"); // * X UNSUPPORTED("81manefx32xoejcl5dhw4vc4s"); // * | UNSUPPORTED("cz2kcexrt76ppdvw9mtzwl6l6"); // * ------------ UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("dbi6282o67zdvjpioemev8l1g"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2 UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("agoljir79z51apt1tmk0f0sc7"); // //width units are (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("29c55ze4t4mczxh3x1veeu005"); // D = (pointf*)zmalloc((sides + 12)*sizeof(pointf)); //12-sided x UNSUPPORTED("bfjnm29zjvd3n7do4y87yuimk"); // D[0].x = AF[1].x + (AF[0].x-AF[1].x)/2 + (B[2].x-B[3].x)/4; //x_center+widtht/2 , lower right corner of the x UNSUPPORTED("6fadfx3cd7603xzoiam5zyl67"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)/2; //y_center + width UNSUPPORTED("34tp01hd6y8buifqu81fp7kah"); // D[1].x = D[0].x; UNSUPPORTED("4v3l9q24gxtxrar8btl47zoow"); // D[1].y = D[0].y + (B[3].y-B[4].y)/8; //D[0].y +width/4 UNSUPPORTED("6rgdcvz0zwjdie9l63ipu46l4"); // D[2].x = D[0].x - (B[2].x-B[3].x)/8; //D[0].x- width/4 //right nook of the x UNSUPPORTED("ex033y5oj49zuzra10asffkia"); // D[2].y = D[1].y + (B[3].y-B[4].y)/8; //D[0].y+width/2 or D[1].y+width/4 UNSUPPORTED("78e3c23lx1btcjbe2srm6rcal"); // D[3].x = D[0].x; UNSUPPORTED("1t32ie8e7he01k3ty0s11cjff"); // D[3].y = D[2].y + (B[3].y-B[4].y)/8; //D[2].y + width/4 UNSUPPORTED("bzw7esfwo40sfa8iehrj4pyr8"); // D[4].x = D[0].x; UNSUPPORTED("12jatkjezhxoyrcbj7qw0kzrn"); // D[4].y = D[3].y + (B[3].y-B[4].y)/8; //top right corner of the x UNSUPPORTED("e9ohdk7a5hiy6qw6kdxic8ih0"); // D[5].x = D[2].x; UNSUPPORTED("9h546osr54mx5910v00kmvmo3"); // D[5].y = D[4].y; UNSUPPORTED("926tc948ppa1dj5yf7ltaex6"); // D[6].x = AF[1].x + (AF[0].x - AF[1].x)/2; //x_center UNSUPPORTED("4na1446f7z8re7jmm7p0szkgh"); // D[6].y = D[3].y; //top nook UNSUPPORTED("2iw65hw9js3r2zpvqu9k4s5f3"); // D[7].x = D[6].x - (B[2].x-B[3].x)/8; //D[5] mirrowed across y UNSUPPORTED("cdcewcs3o64fkxoeknvdtdd6h"); // D[7].y = D[5].y; UNSUPPORTED("4gh2f7t5fi2gir99lnocdxmp0"); // D[8].x = D[7].x - (B[2].x-B[3].x)/8;//top left corner UNSUPPORTED("agbg6evpctdfnyu3qhrm0w5ej"); // D[8].y = D[7].y; UNSUPPORTED("ah5kglnqaow2xvlpo51wluq5y"); // D[9].x = D[8].x; UNSUPPORTED("7eul86jxr4ht4r5bn3fgfljdq"); // D[9].y = D[3].y; UNSUPPORTED("dvxukn20gcceywf45rsdlgwjk"); // D[10].x = D[8].x + (B[2].x-B[3].x)/8; UNSUPPORTED("ealz2oalp4aksi0zz739qke65"); // D[10].y = D[2].y; UNSUPPORTED("5pyd0cxb8ujx2mcsu0n68e5xt"); // D[11].x = D[8].x; UNSUPPORTED("7yttvltea377p6nfz3hviflv7"); // D[11].y = D[1].y; UNSUPPORTED("ed3f8qa9fqvj7h3ir97ic1dlc"); // D[12].x = D[8].x; UNSUPPORTED("dg27h65j67kiidrf7m8vrmssw"); // D[12].y = D[0].y; UNSUPPORTED("88b0xpldaxzgp2ib4r60x41bf"); // D[13].x = D[10].x; UNSUPPORTED("ancic9a9poikrwxxwm0350zyt"); // D[13].y = D[12].y; UNSUPPORTED("8to7w6h0h7szl9z3sky187uk"); // D[14].x = D[6].x; //bottom nook UNSUPPORTED("4f8lav87663g2osgtdmm67fax"); // D[14].y = D[1].y; UNSUPPORTED("4srifebhh66qjppjrk5fgx7my"); // D[15].x = D[2].x; UNSUPPORTED("aojyz5q7eulsrjo7xi4v61pas"); // D[15].y = D[0].y; UNSUPPORTED("eec4an2ita1w8buwmp3e0y9ri"); // gvrender_polygon(job, D, sides + 12, filled); UNSUPPORTED("5hl7s3qlipucjwhwahk282sx8"); // /*line below the x*/ UNSUPPORTED("d55sgple6c28z0c52aycup5at"); // C[0] = D[14]; UNSUPPORTED("ec2n0yx6hife8hckl0aiamvcw"); // C[1].x = C[0].x; UNSUPPORTED("4a3l5xe9qdenhns41qoiytki5"); // C[1].y = AF[2].y + (AF[1].y - AF[2].y)/2; //y_center UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("hjs1b12h76k9zk31lumwwf9f"); // /*dsDNA line*/ UNSUPPORTED("dcf6dzx1g3i2ccb6d7iwrzof8"); // C[0].x = AF[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("5pw7rn49ku3rfnvp5lbqoivb7"); // C[1].x = AF[0].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("7vyejosjncamgazhav0j15x5q"); // gvrender_polyline(job, C, 2); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("7ea60jessa65lyhvl39qnzgmi"); // case (21 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("67e50jeeiwiw2yyny8x835sxw"); // * hexagon with a dashed line on the bottom UNSUPPORTED("rj2e0ukg50e63tpjapabomkh"); // * UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("d10jdrlg1miyun96p57ha1zcq"); // * O UNSUPPORTED("81manefx32xoejcl5dhw4vc4s"); // * | UNSUPPORTED("cz2kcexrt76ppdvw9mtzwl6l6"); // * ------------ UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("dbi6282o67zdvjpioemev8l1g"); // //x_center is AF[1].x + (AF[0].x - AF[1].x)/2 UNSUPPORTED("3kvpch1u0mkkh8mvlzphvxdio"); // //y_center is AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("agoljir79z51apt1tmk0f0sc7"); // //width units are (B[2].x-B[3].x)/2 or (B[3].y-B[4].y)/2; UNSUPPORTED("bce0986uths99en9ujtallv74"); // D = (pointf*)zmalloc((sides + 4)*sizeof(pointf)); //12-sided x UNSUPPORTED("1r0dyice1nwwjxx60euskvs22"); // D[0].x = AF[1].x + (AF[0].x-AF[1].x)/2 + (B[2].x-B[3].x)/8; //x_center+widtht/8 , lower right corner of the hexagon UNSUPPORTED("6fadfx3cd7603xzoiam5zyl67"); // D[0].y = AF[2].y + (AF[1].y - AF[2].y)/2 + (B[3].y-B[4].y)/2; //y_center + width UNSUPPORTED("7vtpwdfs55eauxhtxly0fq9yo"); // D[1].x = D[0].x + (B[2].x-B[3].x)/8; UNSUPPORTED("4v3l9q24gxtxrar8btl47zoow"); // D[1].y = D[0].y + (B[3].y-B[4].y)/8; //D[0].y +width/4 UNSUPPORTED("80iff0mad95x21gnzwaa6r2du"); // D[2].x = D[1].x; //D[0].x- width/4 UNSUPPORTED("e85qlsqp5ec0c39ukmurh01le"); // D[2].y = D[1].y + (B[3].y-B[4].y)/4; //D[1].y+width/2 UNSUPPORTED("78e3c23lx1btcjbe2srm6rcal"); // D[3].x = D[0].x; UNSUPPORTED("1t32ie8e7he01k3ty0s11cjff"); // D[3].y = D[2].y + (B[3].y-B[4].y)/8; //D[2].y + width/4 UNSUPPORTED("8so3hvsavyaik1857ci06i28n"); // D[4].x = D[3].x - (B[2].x-B[3].x)/4; UNSUPPORTED("eplzuryql5ru5fo39zx6qq098"); // D[4].y = D[3].y; //top of the hexagon UNSUPPORTED("85tgwpkocchmr8656hsvvujbk"); // D[5].x = D[4].x - (B[2].x-B[3].x)/8; UNSUPPORTED("d78lk5o8y51l9z7neypp202ok"); // D[5].y = D[2].y; UNSUPPORTED("a2qj96305wxo9gce1tujcuecz"); // D[6].x = D[5].x; UNSUPPORTED("au3tvlkozqb147n50te46l8da"); // D[6].y = D[1].y; //left side UNSUPPORTED("45h8dltyrq4aavcyjz923uke9"); // D[7].x = D[4].x; UNSUPPORTED("3toyc6445kpow5ul101muzie7"); // D[7].y = D[0].y; //bottom UNSUPPORTED("519fp4pixwl2w7d4ssm51lram"); // gvrender_polygon(job, D, sides + 4, filled); UNSUPPORTED("5hl7s3qlipucjwhwahk282sx8"); // /*line below the x*/ UNSUPPORTED("axr0pn9n2azga1eiee2sfhf90"); // C[0].x = AF[1].x + (AF[0].x - AF[1].x)/2; UNSUPPORTED("cyy862hp2el6mhfkug2y3f1ca"); // C[0].y = D[0].y; UNSUPPORTED("ec2n0yx6hife8hckl0aiamvcw"); // C[1].x = C[0].x; UNSUPPORTED("4a3l5xe9qdenhns41qoiytki5"); // C[1].y = AF[2].y + (AF[1].y - AF[2].y)/2; //y_center UNSUPPORTED("borq5nu8vs8newp4f3zf2ti2x"); // gvrender_polyline(job, C, 2); UNSUPPORTED("hjs1b12h76k9zk31lumwwf9f"); // /*dsDNA line*/ UNSUPPORTED("dcf6dzx1g3i2ccb6d7iwrzof8"); // C[0].x = AF[1].x; UNSUPPORTED("550o47jm3dqr37h7j0k434zzb"); // C[0].y = AF[2].y + (AF[1].y - AF[2].y)/2; UNSUPPORTED("5pw7rn49ku3rfnvp5lbqoivb7"); // C[1].x = AF[0].x; UNSUPPORTED("e0hztszh4dg3gbas5k24di6x9"); // C[1].y = AF[2].y + (AF[0].y - AF[3].y)/2; UNSUPPORTED("7vyejosjncamgazhav0j15x5q"); // gvrender_polyline(job, C, 2); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("414355qtxrrdrp88lqmu8xuq8"); // break; UNSUPPORTED("i1a2vh2der7lv63hy4pg74j2"); // case (22 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("11hn7suih6n97ek5ack6vv7ni"); // * Adjust the perimeter for the protrusions. UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("4bfue86t6gftlcgwzff6qshk7"); // * UNSUPPORTED("2hxqoj7zl8r8xv6e4z6djhz03"); // * D[1] = AF[1] | * +----------------+ * | D[0] * | * | / UNSUPPORTED("43leeaho94cuu8h6ufftsvw4m"); // * | / UNSUPPORTED("722lri4xki5u0btwl5flr6qxu"); // * | +-------+ / UNSUPPORTED("8kn1gxbxamlotuexrxky3o76q"); // * | | |/ UNSUPPORTED("dscqqxbpov7i3z8kvqhzn45ew"); // * +--------+ UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("5kvv3jvgrdk38xmgwem87tcf9"); // /* Add the tab edges. */ UNSUPPORTED("6t4waazc6b2bir3lb3a09si65"); // D = (pointf*)zmalloc((sides + 5)*sizeof(pointf)); /*5 new points*/ UNSUPPORTED("c6x47uv986ws1wlxw5sjqn6n0"); // D[0].x = B[1].x - (B[2].x - B[3].x)/2; UNSUPPORTED("d1eg8u95ffvpn8cj0t175qe8"); // D[0].y = B[1].y - (B[3].y - B[4].y)/2; UNSUPPORTED("45vton2uqw835epqg2o0j1qee"); // D[1].x = B[3].x; UNSUPPORTED("2so1ozst5cwd02o33408hxi1n"); // D[1].y = B[3].y - (B[3].y - B[4].y)/2; UNSUPPORTED("2y7ipfj9drc5mfgjluf5y6k6p"); // D[2].x = AF[2].x; UNSUPPORTED("bul5ue4x9puypr5rmyrlxz24r"); // D[2].y = AF[2].y; UNSUPPORTED("7p7sbu9cltsgpiplr8l952qz1"); // D[3].x = B[2].x + (B[2].x - B[3].x)/2; UNSUPPORTED("5bb26b07x6ootbr2j1wrams3"); // D[3].y = AF[2].y; UNSUPPORTED("b8bego41qu7w8qkom46we6jth"); // D[4].x = B[2].x + (B[2].x - B[3].x)/2; UNSUPPORTED("6mxx226hjtdwefdnjzy5zlzs5"); // D[4].y = AF[2].y + (B[3].y - B[4].y)/2; UNSUPPORTED("ekx1o9xcvdl245i9hyyocg56v"); // D[5].x = B[1].x - (B[2].x - B[3].x)/2; UNSUPPORTED("d282nefakffro2sjsbh4yuptv"); // D[5].y = AF[2].y + (B[3].y - B[4].y)/2; UNSUPPORTED("55sv0um7zomjrn48wiyob6gxo"); // D[6].x = B[1].x - (B[2].x - B[3].x)/2; UNSUPPORTED("9ubgi9tlkqj3h0i4575ls3ev0"); // D[6].y = AF[3].y; UNSUPPORTED("eg7fjcwjh1jq1riv8kcy7dei0"); // D[7].y = AF[0].y - (AF[0].y - AF[3].y)/2; /*triangle point */ UNSUPPORTED("dwd8nqni0j130xliflvrlc5ty"); // D[7].x = AF[0].x; /*triangle point */ UNSUPPORTED("8pqi0dq2ugizqvkq5c093agrm"); // D[8].y = AF[0].y; UNSUPPORTED("1vws7hcvciczirrj9548bn4f2"); // D[8].x = B[1].x - (B[2].x - B[3].x)/2; UNSUPPORTED("9v8e5z6hrq6fr5p16pg80kc21"); // gvrender_polygon(job, D, sides + 5, filled); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6bkffeiw7fqij7bq5hs7k51hl"); // case (23 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("11hn7suih6n97ek5ack6vv7ni"); // * Adjust the perimeter for the protrusions. UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("4bfue86t6gftlcgwzff6qshk7"); // * UNSUPPORTED("1kf6abx7iat1puo0g8swxlr2j"); // * D[1] = AF[1] | * +----------------+ * | D[0] * | * | / UNSUPPORTED("43leeaho94cuu8h6ufftsvw4m"); // * | / UNSUPPORTED("apyndmlwtw3z8vzadqn20r8hu"); // * +----------------+ / UNSUPPORTED("4teonqvrubwrmkqajn3x92uqz"); // * |/ UNSUPPORTED("79f8fxsn2gta6r8d9x9n38rzy"); // * UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("5kvv3jvgrdk38xmgwem87tcf9"); // /* Add the tab edges. */ UNSUPPORTED("9capq7a8vc2wzqyavbvsqo0js"); // D = (pointf*)zmalloc((sides + 3)*sizeof(pointf)); /*3 new points*/ UNSUPPORTED("c6x47uv986ws1wlxw5sjqn6n0"); // D[0].x = B[1].x - (B[2].x - B[3].x)/2; UNSUPPORTED("d1eg8u95ffvpn8cj0t175qe8"); // D[0].y = B[1].y - (B[3].y - B[4].y)/2; UNSUPPORTED("45vton2uqw835epqg2o0j1qee"); // D[1].x = B[3].x; UNSUPPORTED("2so1ozst5cwd02o33408hxi1n"); // D[1].y = B[3].y - (B[3].y - B[4].y)/2; UNSUPPORTED("2y7ipfj9drc5mfgjluf5y6k6p"); // D[2].x = AF[2].x; UNSUPPORTED("bopqgv9t3o6ppbojdunc5qjfl"); // D[2].y = AF[2].y + (B[3].y - B[4].y)/2; UNSUPPORTED("1q0xgxya7e8fzpb1l2p14fk7g"); // D[3].x = B[1].x - (B[2].x - B[3].x)/2; UNSUPPORTED("94cxjx74gts01u98ngcns0j0o"); // D[3].y = AF[2].y + (B[3].y - B[4].y)/2; UNSUPPORTED("21elcwekxeowj7i0450kbasb4"); // D[4].x = B[1].x - (B[2].x - B[3].x)/2; UNSUPPORTED("8eiljnxcc6es7v531vw3p943t"); // D[4].y = AF[3].y; UNSUPPORTED("av1198agtncjj9dsyfskbhrt"); // D[5].y = AF[0].y - (AF[0].y - AF[3].y)/2;/*triangle point*/ UNSUPPORTED("evuqotctuiu9zd74xdrh07pft"); // D[5].x = AF[0].x; /*triangle point */ UNSUPPORTED("96e1uuucniuu6eztjwb5aua2b"); // D[6].y = AF[0].y; UNSUPPORTED("55sv0um7zomjrn48wiyob6gxo"); // D[6].x = B[1].x - (B[2].x - B[3].x)/2; UNSUPPORTED("66hq5hkfg6ixw5enzwwhsontq"); // gvrender_polygon(job, D, sides + 3, filled); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("bi7entdk2ummrdev9ic5z88zh"); // case (24 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("11hn7suih6n97ek5ack6vv7ni"); // * Adjust the perimeter for the protrusions. UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("4bfue86t6gftlcgwzff6qshk7"); // * UNSUPPORTED("2vf6dvre5x62f4afex2v3wssm"); // * /| UNSUPPORTED("7at1abf1biy3h7owo91fj09sq"); // * / +----------------+ UNSUPPORTED("758ct1qslb1outqo15t8qplkx"); // * / | UNSUPPORTED("8a7qsgirg007q526nvsyh566t"); // * \ | UNSUPPORTED("asz6zd87dnrnppnilt2vmd742"); // * \ +----------------+ UNSUPPORTED("2kg8z59q8qzdxgf73c76yxsbr"); // * \| UNSUPPORTED("79f8fxsn2gta6r8d9x9n38rzy"); // * UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("5kvv3jvgrdk38xmgwem87tcf9"); // /* Add the tab edges. */ UNSUPPORTED("9capq7a8vc2wzqyavbvsqo0js"); // D = (pointf*)zmalloc((sides + 3)*sizeof(pointf)); /*3 new points*/ UNSUPPORTED("8bi8jgvnnbgjoe0rtiovk3kka"); // D[0].x = AF[0].x; UNSUPPORTED("3nnpsf5gr04nj80fm603hxrew"); // D[0].y = AF[0].y - (B[3].y-B[4].y)/2; UNSUPPORTED("equct6fawt1qt33fcaa2vbx6d"); // D[1].x = B[2].x + (B[2].x - B[3].x)/2; UNSUPPORTED("5je1a4102rsjz8djkg50vxsld"); // D[1].y = AF[0].y - (B[3].y-B[4].y)/2;/*D[0].y*/ UNSUPPORTED("604g9voy0i4aesl8z4qkl3yua"); // D[2].x = B[2].x + (B[2].x - B[3].x)/2;/*D[1].x*/ UNSUPPORTED("1ivg7d69vao0ni5v39q7i7ibq"); // D[2].y = B[2].y; UNSUPPORTED("2fmhbcdtkklozhbyqm15zba5v"); // D[3].x = AF[1].x; /*triangle point*/ UNSUPPORTED("eqycx49fc5p5s83bled63dukr"); // D[3].y = AF[1].y - (AF[1].y - AF[2].y)/2; /*triangle point*/ UNSUPPORTED("c8m3lk83ymc1l1swiupvjucow"); // D[4].x = B[2].x + (B[2].x - B[3].x)/2;/*D[1].x*/ UNSUPPORTED("5gvqnechiy5h1orxyla8m94qt"); // D[4].y = AF[2].y; UNSUPPORTED("bx6z8nzgcgr5pc8q8l8tqs1su"); // D[5].y = AF[2].y + (B[3].y-B[4].y)/2; UNSUPPORTED("f4icccql1zjta9sdefq8pvulw"); // D[5].x = B[2].x + (B[2].x - B[3].x)/2;/*D[1].x*/ UNSUPPORTED("29rdh1i6t6ac606dh48ug09fe"); // D[6].y = AF[3].y + (B[3].y - B[4].y)/2; UNSUPPORTED("d1t9t9l13vuttc72cjjt70czg"); // D[6].x = AF[0].x;/*D[0]*/ UNSUPPORTED("66hq5hkfg6ixw5enzwwhsontq"); // gvrender_polygon(job, D, sides + 3, filled); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9uxvjt1cntxds9hia35xi2zrn"); // case (25 << 24): UNSUPPORTED("59hm5rqv13343impaqd8bjv9p"); // /* UNSUPPORTED("11hn7suih6n97ek5ack6vv7ni"); // * Adjust the perimeter for the protrusions. UNSUPPORTED("cmrglhtmovtl6mh8dyeurkeed"); // * UNSUPPORTED("4bfue86t6gftlcgwzff6qshk7"); // * UNSUPPORTED("2vf6dvre5x62f4afex2v3wssm"); // * /| UNSUPPORTED("7at1abf1biy3h7owo91fj09sq"); // * / +----------------+ UNSUPPORTED("di3oj6qvy7yx7ce8epceo9gcl"); // * / D[0] UNSUPPORTED("7qliw4diraiwyyzmhk2fkvkbg"); // * / | UNSUPPORTED("eexvhoejrrctvbe726qrvjb8s"); // * \ | UNSUPPORTED("8a7qsgirg007q526nvsyh566t"); // * \ | UNSUPPORTED("n2k5o28c2p32kiem5mklm8ba"); // * \ +--------+ + UNSUPPORTED("2uh322uvvif8yj3w2dy2rb7na"); // * \| | | UNSUPPORTED("6eycfkuag7hal8zbmntmzcu9e"); // * +-------+ UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("5kvv3jvgrdk38xmgwem87tcf9"); // /* Add the tab edges. */ UNSUPPORTED("421a2mdhv0gef0ua8a8hrh1gr"); // D = (pointf*)zmalloc((sides + 5)*sizeof(pointf)); /*3 new points*/ UNSUPPORTED("8bi8jgvnnbgjoe0rtiovk3kka"); // D[0].x = AF[0].x; UNSUPPORTED("3nnpsf5gr04nj80fm603hxrew"); // D[0].y = AF[0].y - (B[3].y-B[4].y)/2; UNSUPPORTED("equct6fawt1qt33fcaa2vbx6d"); // D[1].x = B[2].x + (B[2].x - B[3].x)/2; UNSUPPORTED("5je1a4102rsjz8djkg50vxsld"); // D[1].y = AF[0].y - (B[3].y-B[4].y)/2;/*D[0].y*/ UNSUPPORTED("604g9voy0i4aesl8z4qkl3yua"); // D[2].x = B[2].x + (B[2].x - B[3].x)/2;/*D[1].x*/ UNSUPPORTED("1ivg7d69vao0ni5v39q7i7ibq"); // D[2].y = B[2].y; UNSUPPORTED("2fmhbcdtkklozhbyqm15zba5v"); // D[3].x = AF[1].x; /*triangle point*/ UNSUPPORTED("eqycx49fc5p5s83bled63dukr"); // D[3].y = AF[1].y - (AF[1].y - AF[2].y)/2; /*triangle point*/ UNSUPPORTED("c8m3lk83ymc1l1swiupvjucow"); // D[4].x = B[2].x + (B[2].x - B[3].x)/2;/*D[1].x*/ UNSUPPORTED("5gvqnechiy5h1orxyla8m94qt"); // D[4].y = AF[2].y; UNSUPPORTED("bx6z8nzgcgr5pc8q8l8tqs1su"); // D[5].y = AF[2].y + (B[3].y-B[4].y)/2; UNSUPPORTED("f4icccql1zjta9sdefq8pvulw"); // D[5].x = B[2].x + (B[2].x - B[3].x)/2;/*D[1].x*/ UNSUPPORTED("29rdh1i6t6ac606dh48ug09fe"); // D[6].y = AF[3].y + (B[3].y - B[4].y)/2; UNSUPPORTED("55sv0um7zomjrn48wiyob6gxo"); // D[6].x = B[1].x - (B[2].x - B[3].x)/2; UNSUPPORTED("46jv04wtkylcmc9s9pv56lr3c"); // D[7].x = B[1].x - (B[2].x - B[3].x)/2;/*D[6].x*/ UNSUPPORTED("7588ab6v6tp8x8bpjy3d79jex"); // D[7].y = AF[3].y; UNSUPPORTED("3jown0xzpispkq8oomn10deyz"); // D[8].x = AF[3].x; UNSUPPORTED("39c46sl6j7nxvcb2pae8rs398"); // D[8].y = AF[3].y; UNSUPPORTED("9v8e5z6hrq6fr5p16pg80kc21"); // gvrender_polygon(job, D, sides + 5, filled); UNSUPPORTED("cgk7heai5pdojykyc6x6f5pzz"); // free(D); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9yor276xqtqe07q4gsz71t5o4"); // free(B); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 acyez4b7guim63q8crmnyi18 // static double userSize(node_t * n) public static Object userSize(Object... arg) { UNSUPPORTED("8yl20lmgb1f7rteptp4jmmd4w"); // static double userSize(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cldfniz1yu2rzamoi5a3tri2q"); // double w, h; UNSUPPORTED("7nla3nwmcqssau6gicpyolcww"); // w = late_double(n, N_width, 0.0, 0.01); UNSUPPORTED("14rygobuxmhem0qjemmp7zwup"); // h = late_double(n, N_height, 0.0, 0.02); UNSUPPORTED("92gsjf70pdi57i20e9rszpm1o"); // return (ROUND((MAX(w, h))*72)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5gahokttzv65lspm84ao1le37 // shape_kind shapeOf(node_t * n) public static int shapeOf(Agnode_s n) { ENTERING("5gahokttzv65lspm84ao1le37","shapeOf"); try { shape_desc sh = (shape_desc) ND_shape(n); CFunctionImpl ifn; //void (*ifn) (node_t *); if (N(sh)) return enumAsInt(shape_kind.class, "SH_UNSET"); ifn = (CFunctionImpl) ND_shape(n).getPtr("fns").getPtr("initfn"); if (ifn.getName().equals("poly_init")) return enumAsInt(shape_kind.class, "SH_POLY"); UNSUPPORTED("251a710sgr57bnrs3uh7ppfpi"); // else if (ifn == record_init) UNSUPPORTED("uubga3e6j1jsmn61hfok2zwk"); // return SH_RECORD; UNSUPPORTED("cpzx2lwu889clk2f1d0k4c9jd"); // else if (ifn == point_init) UNSUPPORTED("f4x4vap21dff1trk1lrzzb8u5"); // return SH_POINT; UNSUPPORTED("alkskrmw3fjn82qi1t2kyi6uh"); // else if (ifn == epsf_init) UNSUPPORTED("5hp3oli47xj0s4fk7yj1dairi"); // return SH_EPSF; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("7if5cqgy6h2m78kwe6gagv7p"); // return SH_UNSET; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("5gahokttzv65lspm84ao1le37","shapeOf"); } } //3 e8riwo21j5t1g1tewsbo39z48 // boolean isPolygon(node_t * n) public static Object isPolygon(Object... arg) { UNSUPPORTED("6tth154tjxb21b1rr8m3w5lbj"); // boolean isPolygon(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9uh2xgxrn4veetmkfkbe9iq7y"); // return (ND_shape(n) && (ND_shape(n)->fns->initfn == poly_init)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a11xv6duihbr3d6gkgo2ye2j5 // static void poly_init(node_t * n) public static void poly_init(Agnode_s n) { ENTERING("a11xv6duihbr3d6gkgo2ye2j5","poly_init"); try { final __struct__ dimen = JUtils.from(pointf.class), min_bb = JUtils.from(pointf.class), bb = JUtils.from(pointf.class); final __struct__ imagesize = JUtils.from(point.class); final __struct__ P = JUtils.from(pointf.class), Q = JUtils.from(pointf.class), R = JUtils.from(pointf.class); __ptr__ vertices = null; CString p, sfile, fxd; double temp, alpha, beta, gamma; double orientation, distortion, skew; double sectorangle, sidelength, skewdist, gdistortion, gskew; double angle, sinx, cosx, xmax=0, ymax=0, scalex, scaley; double width=0, height=0, marginx, marginy, spacex; boolean regular; int peripheries, sides; boolean isBox; int i, j, outp; polygon_t poly = (polygon_t) Memory.malloc(polygon_t.class); regular = ND_shape(n).getPtr("polygon").getBoolean("regular"); peripheries = ND_shape(n).getPtr("polygon").getInt("peripheries"); sides = ND_shape(n).getPtr("polygon").getInt("sides"); orientation = ND_shape(n).getPtr("polygon").getDouble("orientation"); skew = ND_shape(n).getPtr("polygon").getDouble("skew"); distortion = ND_shape(n).getPtr("polygon").getDouble("distortion"); regular |= mapbool(agget(n, new CString("regular"))); /* all calculations in floating point POINTS */ /* make x and y dimensions equal if node is regular * If the user has specified either width or height, use the max. * Else use minimum default value. * If node is not regular, use the current width and height. */ if (regular) { UNSUPPORTED("637wuscax8bj094m73fwq3n00"); // double sz = userSize(n); UNSUPPORTED("6wtpde1bxbwd70jz3vuemuvqe"); // if (sz > 0.0) UNSUPPORTED("c4cn28kuy1f86y4d8rbxy1a4g"); // width = height = sz; UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("mafr2nmpj8xgeranqldzxhtb"); // width = (((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->width); UNSUPPORTED("l2a1m5p66005ftc6gdbosugj"); // height = (((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->height); UNSUPPORTED("61qxt5l8ums7d9os9ungn3rao"); // width = height = ((((((width)<(height)?(width):(height)))*72>=0)?(int)((((width)<(height)?(width):(height)))*72 + .5):(int)((((width)<(height)?(width):(height)))*72 - .5))); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } } else { width = (ROUND((ND_width(n))*72)); height = (ROUND((ND_height(n))*72)); } peripheries = late_int(n, Z.z().N_peripheries, peripheries, 0); orientation += late_double(n, Z.z().N_orientation, 0.0, -360.0); if (sides == 0) { /* not for builtins */ UNSUPPORTED("dd178b113cb8130tl6q70lcp3"); // skew = late_double(n, N_skew, 0.0, -100.0); UNSUPPORTED("cp83hdn3dp0a7rp9bauc3bgki"); // sides = late_int(n, N_sides, 4, 0); UNSUPPORTED("abmuc3vqirf3i48480fj0k14g"); // distortion = late_double(n, N_distortion, 0.0, -100.0); } /* get label dimensions */ dimen.___(ND_label(n).getStruct("dimen")); /* minimal whitespace around label */ if (ROUND(abs(dimen.getDouble("x")))!=0 || ROUND(abs(dimen.getDouble("y")))!=0) { /* padding */ if ((p = agget(n, new CString("margin")))!=null) { UNSUPPORTED("4dlqwm3pklzgz2e777dm56n03"); // marginx = marginy = 0; UNSUPPORTED("r186dwelv54pq63p2yo4czig"); // i = sscanf(p, "%lf,%lf", &marginx, &marginy); UNSUPPORTED("bjp5a2wbzhormf75ov5fumqto"); // if (marginx < 0) UNSUPPORTED("3tsws28ifjzq7ju8xs3ye4x18"); // marginx = 0; UNSUPPORTED("7gfecwqgqof787z8u1mgh7qoj"); // if (marginy < 0) UNSUPPORTED("1xpqznf0i4ljd2b5j81ipsvtg"); // marginy = 0; UNSUPPORTED("1lcx62wzgnn34tk5li0sgoqwm"); // if (i > 0) { UNSUPPORTED("dau1s6m0w92gp7bvqz3f63wnp"); // dimen.x += 2 * ((((marginx)*72>=0)?(int)((marginx)*72 + .5):(int)((marginx)*72 - .5))); UNSUPPORTED("79iqlz01of88ftxysvivw2hgw"); // if (i > 1) UNSUPPORTED("6opppos2hcjet4cn76130ykba"); // dimen.y += 2 * ((((marginy)*72>=0)?(int)((marginy)*72 + .5):(int)((marginy)*72 - .5))); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("8bwwxn4jop0urcsfnygjofg9s"); // dimen.y += 2 * ((((marginx)*72>=0)?(int)((marginx)*72 + .5):(int)((marginx)*72 - .5))); UNSUPPORTED("afk9bpom7x393euamnvwwkx6b"); // } else UNSUPPORTED("87bdwkkwbzyswxnepdd9bj8mb"); // {((dimen).x += 4*4); ((dimen).y += 2*4);}; } else { ((ST_pointf) dimen).x = dimen.getDouble("x") + 4*4; ((ST_pointf) dimen).y = dimen.getDouble("y") + 2*4; }; } spacex = dimen.getDouble("x") - ND_label(n).getStruct("dimen").getDouble("x"); /* quantization */ if ((temp = agraphof(n).castTo(Agobj_s.class).getPtr("data").castTo(Agraphinfo_t.class).getPtr("drawing").getDouble("quantum")) > 0.0) { UNSUPPORTED("3nqb0s5rkwj3igt71vooj8asd"); // temp = ((((temp)*72>=0)?(int)((temp)*72 + .5):(int)((temp)*72 - .5))); UNSUPPORTED("5fxtqwy8liyvnx1yvsou5hb4o"); // dimen.x = quant(dimen.x, temp); UNSUPPORTED("et885f1jcqpske6ip856arouv"); // dimen.y = quant(dimen.y, temp); } imagesize.setInt("x", 0); imagesize.setInt("y", 0); if (ND_shape(n).getBoolean("usershape")) { /* custom requires a shapefile * not custom is an adaptable user shape such as a postscript * function. */ UNSUPPORTED("7jbvoylyb27di8f54ufxj4mbk"); // if ((*((((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->shape)->name)==*("custom")&&!strcmp((((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->shape)->name,"custom"))) { UNSUPPORTED("cnfv2ayyl46ohdl5p4pc75swz"); // sfile = agget(n, "shapefile"); UNSUPPORTED("6llro6gigojo2r8oo6c4k320o"); // imagesize = gvusershape_size(agraphof(n), sfile); UNSUPPORTED("3ngt3ika8ppq3m9vbgf2q5lu1"); // if ((imagesize.x == -1) && (imagesize.y == -1)) { UNSUPPORTED("5l8jenkv77ax02t47zzxyv1k0"); // agerr(AGWARN, UNSUPPORTED("7hgyav5bbs1v4kts1oocozork"); // "No or improper shapefile=\"%s\" for node \"%s\"\n", UNSUPPORTED("34s5a4xy12nydt3idmis4np67"); // (sfile ? sfile : ""), agnameof(n)); UNSUPPORTED("apwtbaz0akr5pg5p6uwcroaan"); // imagesize.x = imagesize.y = 0; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("4xiqgw4br039sl4r32gg5jv6k"); // (((Agraphinfo_t*)(((Agobj_t*)(agraphof(n)))->data))->has_images) = (!(0)); UNSUPPORTED("3nl4wsbxuqlad4tcg8vmg99rx"); // imagesize.x += 2; /* some fixed padding */ UNSUPPORTED("da00oaavfp6fwqwgshhrodz2r"); // imagesize.y += 2; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } } else if ((sfile = agget(n, new CString("image")))!=null && (sfile.charAt(0) != '\0')) { UNSUPPORTED("76t38i30025xohbzg8w9z4pn9"); // imagesize = gvusershape_size(agraphof(n), sfile); UNSUPPORTED("b8spvmvtuxcciaejq8j1xhu5s"); // if ((imagesize.x == -1) && (imagesize.y == -1)) { UNSUPPORTED("cw5grwj6gbj94jcztvnp2ooyj"); // agerr(AGWARN, UNSUPPORTED("68jdsrao22ymfpb8e1rdezyez"); // "No or improper image=\"%s\" for node \"%s\"\n", UNSUPPORTED("5lmxoq1rboqrxrchjf5ubg6w5"); // (sfile ? sfile : ""), agnameof(n)); UNSUPPORTED("7wmzbnczyvj4oocepujtghrka"); // imagesize.x = imagesize.y = 0; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("71mfu0uflnm85dbt8g2oxs9rd"); // (((Agraphinfo_t*)(((Agobj_t*)(agraphof(n)))->data))->has_images) = (!(0)); UNSUPPORTED("286u48muwmjkomlzqufoqm5cw"); // imagesize.x += 2; /* some fixed padding */ UNSUPPORTED("1x57knvrmlciu7odfroo3paso"); // imagesize.y += 2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } } /* initialize node bb to labelsize */ ((ST_pointf) bb).x = ((dimen.getDouble("x"))>(imagesize.getInt("x"))?(dimen.getDouble("x")):(imagesize.getInt("x"))); ((ST_pointf) bb).y = ((dimen.getDouble("y"))>(imagesize.getInt("y"))?(dimen.getDouble("y")):(imagesize.getInt("y"))); /* I don't know how to distort or skew ellipses in postscript */ /* Convert request to a polygon with a large number of sides */ if ((sides <= 2) && ((distortion != 0.) || (skew != 0.))) { sides = 120; } /* extra sizing depends on if label is centered vertically */ p = agget(n, new CString("labelloc")); if (p!=null && (p.charAt(0) == 't' || p.charAt(0) == 'b')) n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).getPtr("label").setInt("valign", p.charAt(0)); else n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).getPtr("label").setInt("valign", 'c'); isBox = (sides == 4 && (((orientation>=0)?(int)(orientation + .5):(int)(orientation - .5)) % 90) == 0 && distortion == 0. && skew == 0.); if (isBox) { /* for regular boxes the fit should be exact */ } else if (n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).getPtr("shape").getPtr("polygon").getPtr("vertices")!=null) { UNSUPPORTED("4adqsyjwqwzs50ggjp57ok6u7"); // poly_desc_t* pd = (poly_desc_t*)(((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->shape)->polygon->vertices; UNSUPPORTED("1fjwgzo5xkijo98ycmzhal8yv"); // bb = pd->size_gen(bb); } else { /* for all other shapes, compute a smallest ellipse * containing bb centered on the origin, and then pad for that. * We assume the ellipse is defined by a scaling up of bb. */ temp = bb.getDouble("y") * 1.41421356237309504880; if (height > temp && (n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).getPtr("label").getInt("valign") == 'c')) { /* if there is height to spare * and the label is centered vertically * then just pad x in proportion to the spare height */ bb.setDouble("x", bb.getDouble("x") * sqrt(1. / (1. - ((bb.getDouble("y") / height) * (bb.getDouble("y") / height))))); } else { bb.setDouble("x", bb.getDouble("x") * 1.41421356237309504880); bb.setDouble("y", temp); } if (sides > 2) { temp = cos(3.14159265358979323846 / sides); bb.setDouble("x", bb.getDouble("x") / temp); bb.setDouble("y", bb.getDouble("y") / temp); /* FIXME - for odd-sided polygons, e.g. triangles, there would be a better fit with some vertical adjustment of the shape */ } } /* at this point, bb is the minimum size of node that can hold the label */ min_bb.___(bb); /* increase node size to width/height if needed */ fxd = late_string(n, Z.z().N_fixed, new CString("false")); if ((fxd.charAt(0) == 's') && (N(strcmp(fxd,new CString("shape"))))) { bb.setDouble("x", width); bb.setDouble("y", height); poly.setInt("option", poly.getInt("option") | (1 << 11)); } else if (mapbool(fxd)) { /* check only label, as images we can scale to fit */ if ((width < (n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).getPtr("label").getDouble("dimen.x")) || (height < (n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).getPtr("label").getDouble("dimen.y"))))) System.err.println( "node '%s', graph '%s' size too small for label\n"); //agnameof(n), agnameof(agraphof(n))); bb.setDouble("x", width); bb.setDouble("y", height); } else { width = MAX(width, bb.getDouble("x")); ((ST_pointf) bb).x = width; height = MAX(height, bb.getDouble("y")); ((ST_pointf) bb).y = height; } /* If regular, make dimensions the same. * Need this to guarantee final node size is regular. */ if (regular) { width = MAX(bb.getDouble("x"), bb.getDouble("y")); height = width; ((ST_pointf) bb).x = width; ((ST_pointf) bb).y = width; } /* Compute space available for label. Provides the justification borders */ if (N(mapbool(late_string(n, Z.z().N_nojustify, new CString("false"))))) { if (isBox) { ((ST_pointf) ND_label(n).getStruct("space")).x = MAX(dimen.getDouble("x"),bb.getDouble("x")) - spacex; } else if (dimen.getDouble("y") < bb.getDouble("y")) { temp = bb.getDouble("x") * sqrt(1.0 - SQR(dimen.getDouble("y")) / SQR(bb.getDouble("y"))); ND_label(n).getStruct("space").setDouble("x", MAX(dimen.getDouble("x"),temp) - spacex); } else ND_label(n).getStruct("space").setDouble("x", dimen.getDouble("x") - spacex); } else { ND_label(n).getStruct("space").setDouble("x", dimen.getDouble("x") - spacex); } if ((poly.getInt("option") & (1 << 11)) == 0) { temp = bb.getDouble("y") - min_bb.getDouble("y"); if (dimen.getDouble("y") < imagesize.getInt("y")) temp += imagesize.getInt("y") - dimen.getDouble("y"); ((ST_pointf) ND_label(n).getStruct("space")).y = dimen.getDouble("y") + temp; } outp = peripheries; if (peripheries < 1) outp = 1; if (sides < 3) { /* ellipses */ sides = 2; vertices = zmalloc(sizeof(pointf.class, outp * sides)); P.setDouble("x", bb.getDouble("x") / 2.); P.setDouble("y", bb.getDouble("y") / 2.); vertices.setDouble("x", -P.getDouble("x")); vertices.setDouble("y", -P.getDouble("y")); vertices.plus(1).setDouble("x", P.getDouble("x")); vertices.plus(1).setDouble("y", P.getDouble("y")); if (peripheries > 1) { UNSUPPORTED("4ofenmfgj7cgyf624qmugcx77"); // for (j = 1, i = 2; j < peripheries; j++) { UNSUPPORTED("458w3r6n3nidn2j2b154phpzt"); // P.x += 4; UNSUPPORTED("24bcrwtjsfswpmtwxnadf0cn1"); // P.y += 4; UNSUPPORTED("byrwdiqkace7e10l3pibk54wg"); // vertices[i].x = -P.x; UNSUPPORTED("bicdgzzy9pdopb03hn9l48yns"); // vertices[i].y = -P.y; UNSUPPORTED("en9fjm2thtauyxn9t7v4j2xgl"); // i++; UNSUPPORTED("2pejlnamuvmi1m7339vzctpnb"); // vertices[i].x = P.x; UNSUPPORTED("dy64x78vvm5nufbuxsn0bi8ng"); // vertices[i].y = P.y; UNSUPPORTED("en9fjm2thtauyxn9t7v4j2xgl"); // i++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6g6b8zsanvqyc953c4jh1j7iy"); // bb.x = 2. * P.x; UNSUPPORTED("b5z0hw4dacenv33xsaex70g8d"); // bb.y = 2. * P.y; } } else { /* * FIXME - this code is wrong - it doesn't work for concave boundaries. * (e.g. "folder" or "promoter") * I don't think it even needs sectorangle, or knowledge of skewed shapes. * (Concepts that only work for convex regular (modulo skew/distort) polygons.) * * I think it only needs to know inside v. outside (by always drawing * boundaries clockwise, say), and the two adjacent segments. * * It needs to find the point where the two lines, parallel to * the current segments, and outside by GAP distance, intersect. */ vertices = zmalloc(sizeof(pointf.class, outp * sides)); if (ND_shape(n).getPtr("polygon").getPtr("vertices")!=null) { UNSUPPORTED("3ghle84ieryaenfnlbzrfv7bw"); // poly_desc_t* pd = (poly_desc_t*)(((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->shape)->polygon->vertices; UNSUPPORTED("227lpcg9dt83m2bm8yshb4djf"); // pd->vertex_gen (vertices, &bb); UNSUPPORTED("cc3jvnwvbhjhro4adeet363yd"); // xmax = bb.x/2; UNSUPPORTED("39rdmp8vl9muqtv7xs1xwtrwk"); // ymax = bb.y/2; } else { sectorangle = 2. * M_PI / sides; sidelength = sin(sectorangle / 2.); skewdist = hypot(fabs(distortion) + fabs(skew), 1.); gdistortion = distortion * SQRT2 / cos(sectorangle / 2.); gskew = skew / 2.; angle = (sectorangle - M_PI) / 2.; sinx = sin(angle); cosx = cos(angle); ((ST_pointf) R).x = .5 * cosx; ((ST_pointf) R).y = .5 * sinx; xmax = ymax = 0.; angle += (M_PI - sectorangle) / 2.; for (i = 0; i < sides; i++) { /*next regular vertex */ angle += sectorangle; sinx = sin(angle); cosx = cos(angle); ((ST_pointf) R).x = R.getDouble("x") + sidelength * cosx; ((ST_pointf) R).y = R.getDouble("y") + sidelength * sinx; /*distort and skew */ ((ST_pointf) P).x = R.getDouble("x") * (skewdist + R.getDouble("y") * gdistortion) + R.getDouble("y") * gskew; ((ST_pointf) P).y = R.getDouble("y"); /*orient P.x,P.y */ alpha = RADIANS(orientation) + atan2(P.getDouble("y"), P.getDouble("x")); sinx = sin(alpha); cosx = cos(alpha); ((ST_pointf) P).y = hypot(P.getDouble("x"), P.getDouble("y")); ((ST_pointf) P).x = P.getDouble("y"); ((ST_pointf) P).x = P.getDouble("x") * cosx; ((ST_pointf) P).y = P.getDouble("y") * sinx; /*scale for label */ ((ST_pointf) P).x = P.getDouble("x") * bb.getDouble("x"); ((ST_pointf) P).y = P.getDouble("y") * bb.getDouble("y"); /*find max for bounding box */ xmax = MAX(fabs(P.getDouble("x")), xmax); ymax = MAX(fabs(P.getDouble("y")), ymax); /* store result in array of points */ vertices.plus(i).setStruct(P); if (isBox) { /* enforce exact symmetry of box */ ((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(1)).getInternalArray().getInternal(0)))).x = -P.getDouble("x"); ((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(1)).getInternalArray().getInternal(0)))).y = P.getDouble("y"); ((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(2)).getInternalArray().getInternal(0)))).x = -P.getDouble("x"); ((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(2)).getInternalArray().getInternal(0)))).y = -P.getDouble("y"); ((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(3)).getInternalArray().getInternal(0)))).x = P.getDouble("x"); ((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(3)).getInternalArray().getInternal(0)))).y = -P.getDouble("y"); break; } } } /* apply minimum dimensions */ xmax *= 2.; ymax *= 2.; ((ST_pointf) bb).x = MAX(width, xmax); ((ST_pointf) bb).y = MAX(height, ymax); scalex = bb.getDouble("x") / xmax; scaley = bb.getDouble("y") / ymax; for (i = 0; i < sides; i++) { P.____(vertices.plus(i)); ((ST_pointf) P).x = P.getDouble("x") * scalex; ((ST_pointf) P).y = P.getDouble("y") * scaley; vertices.plus(i).setStruct(P); } if (peripheries > 1) { UNSUPPORTED("3x6t3unoi91ezbh3iz168cm2t"); // Q = vertices[(sides - 1)]; UNSUPPORTED("8cm8js7jdmpakzujw3wo4h6jk"); // R = vertices[0]; UNSUPPORTED("5zpv8twf25wr8n71ql3lh8ku2"); // beta = atan2(R.y - Q.y, R.x - Q.x); UNSUPPORTED("9mlrumbikcvketd18jx1ox7k7"); // for (i = 0; i < sides; i++) { UNSUPPORTED("gkm8nb6f6ispdzj0ausiv1fe"); // /*for each vertex find the bisector */ UNSUPPORTED("8tp61rvblb9bmqfwgyknlk906"); // P = Q; UNSUPPORTED("1ls3xc8rwvn3763c32mx1wzsd"); // Q = R; UNSUPPORTED("1zrelve2mvbnzah086dkomf6k"); // R = vertices[(i + 1) % sides]; UNSUPPORTED("bgx8ee996r89memnp0ea0b80m"); // alpha = beta; UNSUPPORTED("5p9jzpcd51evtwqyugnwk50vf"); // beta = atan2(R.y - Q.y, R.x - Q.x); UNSUPPORTED("dwskcoivmu9pc5kth75x0ersl"); // gamma = (alpha + 3.14159265358979323846 - beta) / 2.; UNSUPPORTED("cmm5tvlcafe2aso9bkk3kl7of"); // /*find distance along bisector to */ UNSUPPORTED("bebwurfm1a1h1bywf9kf5ueug"); // /*intersection of next periphery */ UNSUPPORTED("1mtgr15b978d0tdunbpj2pkdp"); // temp = 4 / sin(gamma); UNSUPPORTED("28mxt6c4230xruf63s6u415y9"); // /*convert this distance to x and y */ UNSUPPORTED("1fxw0fz2b6iq6p6qy58mx9mwu"); // *&sinx = sin((alpha - gamma)); *&cosx = cos((alpha - gamma)); UNSUPPORTED("8j7vx250v0icumolzos2p5qa8"); // sinx *= temp; UNSUPPORTED("35ed1mrpnziq164g6cg4stt5w"); // cosx *= temp; UNSUPPORTED("eu3ptwi3s2200v4253yk1x69t"); // /*save the vertices of all the */ UNSUPPORTED("7lc5jxgzj6z4lq7sd9y2b6vex"); // /*peripheries at this base vertex */ UNSUPPORTED("86nzalouete6viryy967d5g9u"); // for (j = 1; j < peripheries; j++) { UNSUPPORTED("dautpj9jyj2qwa8jpujdh3436"); // Q.x += cosx; UNSUPPORTED("7p6tl6s20kdual1ysfoxl8wku"); // Q.y += sinx; UNSUPPORTED("1yw9xq85ss81cogn9jrg24ojc"); // vertices[i + j * sides] = Q; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("9mlrumbikcvketd18jx1ox7k7"); // for (i = 0; i < sides; i++) { UNSUPPORTED("aa5s79go4kwos2as72rcsdrxf"); // P = vertices[i + (peripheries - 1) * sides]; UNSUPPORTED("7ee9ageu4efyramsg9jn6klpb"); // bb.x = ((2. * fabs(P.x))>(bb.x)?(2. * fabs(P.x)):(bb.x)); UNSUPPORTED("lklvdmn7xiqbxhpgdeufcvjj"); // bb.y = ((2. * fabs(P.y))>(bb.y)?(2. * fabs(P.y)):(bb.y)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } } } poly.setInt("regular", regular?1:0); poly.setInt("peripheries", peripheries); poly.setInt("sides", sides); poly.setDouble("orientation", orientation); poly.setDouble("skew", skew); poly.setDouble("distortion", distortion); poly.setPtr("vertices", vertices); if ((poly.getInt("option") & (1 << 11))!=0) { /* set width and height to reflect label and shape */ UNSUPPORTED("7kk8oru3b3copylmq3gssx6qx"); // (((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->width) = ((((dimen.x)>(bb.x)?(dimen.x):(bb.x)))/(double)72); UNSUPPORTED("8oouzms2x039fhfcfxm7yc4su"); // (((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->height) = ((((dimen.y)>(bb.y)?(dimen.y):(bb.y)))/(double)72); } else { n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).setDouble("width", ((bb.getDouble("x"))/(double)72)); n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).setDouble("height", ((bb.getDouble("y"))/(double)72)); } n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).setPtr("shape_info", poly); } finally { LEAVING("a11xv6duihbr3d6gkgo2ye2j5","poly_init"); } } //3 63sj12avbdw6e27zf3sedls1r // static void poly_free(node_t * n) public static Object poly_free(Object... arg) { UNSUPPORTED("cfl0ro4734avs9rtdlar7nbg8"); // static void poly_free(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5ha1ng0rlvg0kiui0qhgme4nb"); // polygon_t *p = ND_shape_info(n); UNSUPPORTED("3cvmixd2u1g2d9l03kuxyyxxw"); // if (p) { UNSUPPORTED("3cjbelr7499ch9kn6lbjaz7l7"); // free(p->vertices); UNSUPPORTED("cy5x5dma0v4hiepir7lrfuo17"); // free(p); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 570t4xovyyfqipaikkf63crmk // static boolean poly_inside(inside_t * inside_context, pointf p) //static Agnode_s lastn; /* last node argument */ //static polygon_t poly; //static int last, outp, sides; //static final __struct__ O = JUtils.from(pointf.class); /* point (0,0) */ //static pointf vertex; //static double xsize, ysize, scalex, scaley, box_URx, box_URy; public static boolean poly_inside(inside_t inside_context, final __struct__ p) { // WARNING!! STRUCT return poly_inside_w_(inside_context, p.copy()); } private static boolean poly_inside_w_(inside_t inside_context, final __struct__ p) { ENTERING("570t4xovyyfqipaikkf63crmk","poly_inside"); try { int i, i1, j; boolean s; final ST_pointf P = new ST_pointf(), Q = new ST_pointf(), R = new ST_pointf(); __ptr__ bp = inside_context.getPtr("s.bp"); __ptr__ n = inside_context.getPtr("s.n"); P.___(ccwrotatepf(p, 90 * GD_rankdir(agraphof(n)))); /* Quick test if port rectangle is target */ if (bp!=null) { final ST_boxf bbox = new ST_boxf(); bbox.___(bp.getStruct()); return INSIDE(P, bbox); } if (NEQ(n, Z.z().lastn)) { double n_width = 0, n_height = 0; Z.z().poly = (polygon_t) ND_shape_info(n); Z.z().vertex = (pointf) Z.z().poly.getPtr("vertices"); Z.z().sides = Z.z().poly.getInt("sides"); if ((Z.z().poly.getInt("option") & (1 << 11))!=0) { UNSUPPORTED("18yw1scg4sol8bhyf1vedj9kn"); // boxf bb = polyBB(poly); UNSUPPORTED("7rz7vxyxao0efec2nvd6g19m1"); // n_width = bb.UR.x - bb.LL.x; UNSUPPORTED("4h0k2wroz3xqx1ljokdbaqaad"); // n_height = bb.UR.y - bb.LL.y; UNSUPPORTED("dgykcjw02yoka8uz5b7jdc2ct"); // /* get point and node size adjusted for rankdir=LR */ UNSUPPORTED("75jifr4aucrxp2hvnsrcfunej"); // if (GD_flip(agraphof(n))) { UNSUPPORTED("e53876tm7q1oasuu013njtgx"); // ysize = n_width; UNSUPPORTED("7wnmmcv8dfzi1bdwml4vcxf0w"); // xsize = n_height; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("10ux82vu0kynxilmf6ak7x70q"); // xsize = n_width; UNSUPPORTED("5xao1mdiugxzaq03na34mbl5w"); // ysize = n_height; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } } else { /* get point and node size adjusted for rankdir=LR */ if (GD_flip(agraphof(n))!=0) { UNSUPPORTED("dapvd4c0ggliaqcj08jvao221"); // ysize = ND_lw(n) + ND_rw(n); UNSUPPORTED("8t3g4d9acruono62leh5a8hxh"); // xsize = ND_ht(n); } else { Z.z().xsize = ND_lw(n) + ND_rw(n); Z.z().ysize = ND_ht(n); } n_width = (ROUND((ND_width(n))*72)); n_height = (ROUND((ND_height(n))*72)); } /* scale */ if (Z.z().xsize == 0.0) Z.z().xsize = 1.0; if (Z.z().ysize == 0.0) Z.z().ysize = 1.0; Z.z().scalex = n_width / Z.z().xsize; Z.z().scaley = n_height / Z.z().ysize; Z.z().box_URx = n_width / 2.0; Z.z().box_URy = n_height / 2.0; /* index to outer-periphery */ Z.z().outp = (Z.z().poly.getInt("peripheries") - 1) * Z.z().sides; if (Z.z().outp < 0) Z.z().outp = 0; Z.z().lastn = (Agnode_s) n; } /* scale */ P.setDouble("x", P.getDouble("x") * Z.z().scalex); P.setDouble("y", P.getDouble("y") * Z.z().scaley); /* inside bounding box? */ if ((fabs(P.getDouble("x")) > Z.z().box_URx) || (fabs(P.getDouble("y")) > Z.z().box_URy)) return false; /* ellipses */ if (Z.z().sides <= 2) return (hypot(P.getDouble("x") / Z.z().box_URx, P.getDouble("y") / Z.z().box_URy) < 1.); /* use fast test in case we are converging on a segment */ i = Z.z().last % Z.z().sides; /* in case last left over from larger polygon */ i1 = (i + 1) % Z.z().sides; Q.___(Z.z().vertex.plus(i + Z.z().outp).getStruct()); R.___(Z.z().vertex.plus(i1 + Z.z().outp).getStruct()); if (N(same_side(P, Z.z().O, Q, R))) /* false if outside the segment's face */ return false; /* else inside the segment face... */ if ((s = same_side(P, Q, R, Z.z().O)) && (same_side(P, R, Z.z().O, Q))) /* true if between the segment's sides */ return NOT(0); /* else maybe in another segment */ for (j = 1; j < Z.z().sides; j++) { /* iterate over remaining segments */ if (s) { /* clockwise */ i = i1; i1 = (i + 1) % Z.z().sides; } else { /* counter clockwise */ i1 = i; i = (i + Z.z().sides - 1) % Z.z().sides; } if (N(same_side(P, Z.z().O, Z.z().vertex.plus(i + Z.z().outp).getStruct(), Z.z().vertex.plus(i1 + Z.z().outp).getStruct()))) { /* false if outside any other segment's face */ Z.z().last = i; return false; } } /* inside all segments' faces */ Z.z().last = i; /* in case next edge is to same side */ return NOT(0); } finally { LEAVING("570t4xovyyfqipaikkf63crmk","poly_inside"); } } //3 5mmuhvq40xadw0g9mzlauyztq // static int poly_path(node_t * n, port * p, int side, boxf rv[], int *kptr) public static int poly_path(Agnode_s n, port p, int side, Object rv, Object kptr) { ENTERING("5mmuhvq40xadw0g9mzlauyztq","poly_path"); try { side = 0; if (ND_label(n).getBoolean("html") && ND_has_port(n)) { UNSUPPORTED("67g7bthntnw8syb6zd03ueg84"); // side = html_path(n, p, side, rv, kptr); } return side; } finally { LEAVING("5mmuhvq40xadw0g9mzlauyztq","poly_path"); } } //3 857i3hwbu9mbq4nwur2q7e7er // static int invflip_side(int side, int rankdir) public static Object invflip_side(Object... arg) { UNSUPPORTED("acksa1hz632l0v9ucpm5gmqzk"); // static int invflip_side(int side, int rankdir) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7gnjhunyvxphjgrfh8byey4ch"); // switch (rankdir) { UNSUPPORTED("70xjc0sbkjvexfar5luzibcgf"); // case 0: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("4u5xz2u3urj13y0aw30fdyup5"); // case 2: UNSUPPORTED("o4wjkq58uh9dgs94m2vxettc"); // switch (side) { UNSUPPORTED("a0zo28ne6fq7qm9hko3jwrsie"); // case (1<<2): UNSUPPORTED("asl0z4i3qt99vpfphpr7hpk5"); // side = (1<<0); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5uxczmgv9jelovrky9lyqmqxn"); // case (1<<0): UNSUPPORTED("aj9jgzaslnfuc2iy41yo6577i"); // side = (1<<2); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("d0gk15gzj4wz8nv54zbr285hm"); // case 1: UNSUPPORTED("o4wjkq58uh9dgs94m2vxettc"); // switch (side) { UNSUPPORTED("a0zo28ne6fq7qm9hko3jwrsie"); // case (1<<2): UNSUPPORTED("csyxlzh6yvg14dkwm5h0q8l4e"); // side = (1<<1); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5uxczmgv9jelovrky9lyqmqxn"); // case (1<<0): UNSUPPORTED("6ob9sb98jfamphtvv99f9nny7"); // side = (1<<3); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("3vvicpwbia6xzcxsn2qnkbzq8"); // case (1<<3): UNSUPPORTED("aj9jgzaslnfuc2iy41yo6577i"); // side = (1<<2); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("ad90yo3mu0ffjurb9egult4pi"); // case (1<<1): UNSUPPORTED("asl0z4i3qt99vpfphpr7hpk5"); // side = (1<<0); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("33l7a58zp8vj6fuliwdkk2nkn"); // case 3: UNSUPPORTED("o4wjkq58uh9dgs94m2vxettc"); // switch (side) { UNSUPPORTED("a0zo28ne6fq7qm9hko3jwrsie"); // case (1<<2): UNSUPPORTED("csyxlzh6yvg14dkwm5h0q8l4e"); // side = (1<<1); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5uxczmgv9jelovrky9lyqmqxn"); // case (1<<0): UNSUPPORTED("6ob9sb98jfamphtvv99f9nny7"); // side = (1<<3); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("3vvicpwbia6xzcxsn2qnkbzq8"); // case (1<<3): UNSUPPORTED("asl0z4i3qt99vpfphpr7hpk5"); // side = (1<<0); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("ad90yo3mu0ffjurb9egult4pi"); // case (1<<1): UNSUPPORTED("aj9jgzaslnfuc2iy41yo6577i"); // side = (1<<2); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2nk83e61yc1xqh0sxx13m5l1j"); // return side; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 72pzdmirzds0yer4ks1ooxvic // static double invflip_angle(double angle, int rankdir) public static Object invflip_angle(Object... arg) { UNSUPPORTED("1klgft1h7fhevbm1j1guzv58"); // static double invflip_angle(double angle, int rankdir) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7gnjhunyvxphjgrfh8byey4ch"); // switch (rankdir) { UNSUPPORTED("70xjc0sbkjvexfar5luzibcgf"); // case 0: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("4u5xz2u3urj13y0aw30fdyup5"); // case 2: UNSUPPORTED("e7qgsf2gzf7fv8r5lpdfqp2gp"); // angle *= -1; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("d0gk15gzj4wz8nv54zbr285hm"); // case 1: UNSUPPORTED("b5wrpw5rvhjh7999v3sqqlbo3"); // angle -= M_PI * 0.5; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("33l7a58zp8vj6fuliwdkk2nkn"); // case 3: UNSUPPORTED("536aocvem6ko7h9t50pllxla0"); // if (angle == M_PI) UNSUPPORTED("kxow9q31jmisg5yv60fj9z3g"); // angle = -0.5 * M_PI; UNSUPPORTED("3hy3z7oxc494l61va60rwh9k3"); // else if (angle == M_PI * 0.75) UNSUPPORTED("76t0zkyxc3q2wnpcajih9mf65"); // angle = -0.25 * M_PI; UNSUPPORTED("bd02ns5pweyapa70g9ozio3m4"); // else if (angle == M_PI * 0.5) UNSUPPORTED("a0pp5xd6lligtfp0riunw38t3"); // angle = 0; UNSUPPORTED("8cqf9j5edmb4u2xnd8lkahkht"); // /* clang complains about self assignment of double UNSUPPORTED("205i7xisgiaz1vhn9p93tsw5a"); // else if (angle == M_PI * 0.25) UNSUPPORTED("76g7hlyzy67q9n7p5l89y4gxw"); // angle = angle; UNSUPPORTED("e5xwyhh2l2jm6g9w2ofnktaf6"); // */ UNSUPPORTED("8pqjflzypl5wbdev1h4r6ee0e"); // else if (angle == 0) UNSUPPORTED("3uy8u4gjki2ksohuj3gn6ewkj"); // angle = M_PI * 0.5; UNSUPPORTED("bqlwd51jj33yedz7tuck5hukd"); // else if (angle == M_PI * -0.25) UNSUPPORTED("3s431nqj2tfm95djdmjfjig6h"); // angle = M_PI * 0.75; UNSUPPORTED("tl121swu8uuow1dlzumo1pyi"); // else if (angle == M_PI * -0.5) UNSUPPORTED("aa92obzwij392if7nnjch6dtz"); // angle = M_PI; UNSUPPORTED("8cqf9j5edmb4u2xnd8lkahkht"); // /* clang complains about self assignment of double UNSUPPORTED("2waz5md3krpirny5m7gagynkc"); // else if (angle == M_PI * -0.75) UNSUPPORTED("76g7hlyzy67q9n7p5l89y4gxw"); // angle = angle; UNSUPPORTED("e5xwyhh2l2jm6g9w2ofnktaf6"); // */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("62ygf2gmqakbkjtv70bqh5q3i"); // return angle; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 54t5x4hsq6ie4hn83dix0fi3g // static pointf compassPoint(inside_t * ictxt, double y, double x) public static Object compassPoint(Object... arg) { UNSUPPORTED("1owp098dshhw9x2d86x61ho3n"); // static pointf compassPoint(inside_t * ictxt, double y, double x) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5jw267n0iigspndf3p51uuoyt"); // pointf curve[4]; /* bezier control points for a straight line */ UNSUPPORTED("2ol68djy9gbphj8kdfml5q1ej"); // node_t *n = ictxt->s.n; UNSUPPORTED("f121hhzfkpb97hn84g46lhxdh"); // graph_t* g = agraphof(n); UNSUPPORTED("347leky6wh51yiydoij5od0h2"); // int rd = GD_rankdir(g); UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("saqn1396zzjkeo01vp1tskia"); // p.x = x; UNSUPPORTED("5jdhcgi82gtmvn690v78zmkpe"); // p.y = y; UNSUPPORTED("2imvfuepadgxdlfwq3qmsatju"); // if (rd) UNSUPPORTED("8gcpvoawmbrjuiq80lglpl2bn"); // p = cwrotatepf(p, 90 * rd); UNSUPPORTED("b4ktwkbs8awubvwfgfeqzhlx0"); // curve[0].x = curve[0].y = 0; UNSUPPORTED("dcqc3vt7dwuvg73lixbbwd3dj"); // curve[1] = curve[0]; UNSUPPORTED("ahj7ruzql6g6cm5nvomizsgcz"); // curve[3] = curve[2] = p; UNSUPPORTED("6wkk7v0v7iyai22oyhq16dcno"); // bezier_clip(ictxt, ND_shape(n)->fns->insidefn, curve, 1); UNSUPPORTED("2imvfuepadgxdlfwq3qmsatju"); // if (rd) UNSUPPORTED("ip6d55dog3nmeksqauqb1fyo"); // curve[0] = ccwrotatepf(curve[0], 90 * rd); UNSUPPORTED("7jlv4v811jdfr56u2h3wdxxbm"); // return curve[0]; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4oj0c3dwqqjei7u5u2ik9yyw1 // static int compassPort(node_t * n, boxf * bp, port * pp, char *compass, int sides, inside_t * ictxt) public static Object compassPort(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("axo7c40w8kmff5juyfulc507z"); // compassPort(node_t * n, boxf * bp, port * pp, char *compass, int sides, UNSUPPORTED("8wsp6kb4b5k1nk99rjf8cd50s"); // inside_t * ictxt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("4t6cefa2mlqz8cen3hr5w5o2"); // pointf p, ctr; UNSUPPORTED("en7ch189nkys76f42mlo1s5zz"); // int rv = 0; UNSUPPORTED("39lrh4yp65e7bz2yxmw4eykrf"); // double theta = 0.0; UNSUPPORTED("1whpo0vj6bc0o4y50ozcd6pib"); // boolean constrain = 0; UNSUPPORTED("39rwowaomcdh9hhpbv5vzxqtg"); // boolean dyna = 0; UNSUPPORTED("ekt4uw7awxhup7bp69cd0de32"); // int side = 0; UNSUPPORTED("26uc2ctav83esiworswb0yyqw"); // boolean clip = NOT(0); UNSUPPORTED("8p9hhcu69i2810srbetaxiscj"); // boolean defined; UNSUPPORTED("dw42q4y6we417p9qhmaei6d3f"); // double maxv; /* sufficiently large value outside of range of node */ UNSUPPORTED("8ix20ei8mhm5e1r57koylhxmw"); // if (bp) { UNSUPPORTED("ddqw44b5basd7iv78obd8twlq"); // b = *bp; UNSUPPORTED("bdd8asje3pa2bu5sxtn1lp6vh"); // p = pointfof((b.LL.x + b.UR.x) / 2, (b.LL.y + b.UR.y) / 2); UNSUPPORTED("ap5anvaqlfe3mcudjsohthesw"); // defined = NOT(0); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("dza301uiuu792cezaz0eoyzsr"); // p.x = p.y = 0.; UNSUPPORTED("ek9a7u2yx8w4r9x5k7somxuup"); // if (GD_flip(agraphof(n))) { UNSUPPORTED("e21k9f24vr25zdbgo37m5er48"); // b.UR.x = ND_ht(n) / 2.; UNSUPPORTED("1i4y4dgrig36gh0dq2jn8kde"); // b.LL.x = -b.UR.x; UNSUPPORTED("7luuqd8n7bpffoa8v27jp7tn3"); // b.UR.y = ND_lw(n); UNSUPPORTED("922vazdrkwhoxxy4yw5axu6i7"); // b.LL.y = -b.UR.y; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("dma0yc0pj8g9efl81ud62uh2x"); // b.UR.y = ND_ht(n) / 2.; UNSUPPORTED("922vazdrkwhoxxy4yw5axu6i7"); // b.LL.y = -b.UR.y; UNSUPPORTED("59beisnsabbp6eavnuxrqch2d"); // b.UR.x = ND_lw(n); UNSUPPORTED("1i4y4dgrig36gh0dq2jn8kde"); // b.LL.x = -b.UR.x; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1e1jhd4j2f4wri70ymrc2k0pg"); // defined = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("w2aiqm3p7bifxbzx4tx4mipl"); // maxv = MAX(b.UR.x,b.UR.y); UNSUPPORTED("b8awq55ll3vhs3fjdyqay8kms"); // maxv *= 4.0; UNSUPPORTED("cm85kba38i3sc3kntnc0a8070"); // ctr = p; UNSUPPORTED("e7z3qfzj5jj1f70il8lep0oyu"); // if (compass && *compass) { UNSUPPORTED("72tyr9kgl0hmhdft6u5nwswi3"); // switch (*compass++) { UNSUPPORTED("2fzjr952o6hmcz3ad5arl2n8d"); // case 'e': UNSUPPORTED("caapivv2sv3cdu0rt3fnciovd"); // if (*compass) UNSUPPORTED("en0rarvkx5srsxnlqpf6ja1us"); // rv = 1; UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("3s6xpfbxpp44ou5loxsjfgzqp"); // if (ictxt) UNSUPPORTED("8whok6jl4olniblvibxhrbbre"); // p = compassPoint(ictxt, ctr.y, maxv); UNSUPPORTED("c0op0grmjt3kp22s10twqy66r"); // else UNSUPPORTED("5f4jye7znkk6hbv6lv0l9l0hs"); // p.x = b.UR.x; UNSUPPORTED("8u0aqa3sxpk302o1oqxok6u47"); // theta = 0.0; UNSUPPORTED("8cz8xetupjr38r0y1sfojc387"); // constrain = NOT(0); UNSUPPORTED("bfouf47misaa32ulv25melpbm"); // defined = NOT(0); UNSUPPORTED("9ni9ftlf9oep71byodeubp1sr"); // clip = 0; UNSUPPORTED("4sdfaevi5d5qk596bdiw1t1t5"); // side = sides & (1<<1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("b4quboi30n0afnbpgm9chdttx"); // case 's': UNSUPPORTED("c2y7pxvutf20cxm0z3nfgoc3k"); // p.y = b.LL.y; UNSUPPORTED("b4ce4svfzxg7z2fd1fquu4qmu"); // constrain = NOT(0); UNSUPPORTED("c3sati4oun39vfql5zx4ru6z"); // clip = 0; UNSUPPORTED("bzgzeuh7ihvw4c4eysc3dgpzd"); // switch (*compass) { UNSUPPORTED("6qkxsufvygbc44eq3d6xorgsx"); // case '\0': UNSUPPORTED("9ca4neaxnf1dd0hyuuubj4egq"); // theta = -M_PI * 0.5; UNSUPPORTED("bfouf47misaa32ulv25melpbm"); // defined = NOT(0); UNSUPPORTED("3s6xpfbxpp44ou5loxsjfgzqp"); // if (ictxt) UNSUPPORTED("2iohu3tvlkzx2emq04ycxkhta"); // p = compassPoint(ictxt, -maxv, ctr.x); UNSUPPORTED("c0op0grmjt3kp22s10twqy66r"); // else UNSUPPORTED("3ly2ywet0m7qfki5yj2nz9t87"); // p.x = ctr.x; UNSUPPORTED("yc8wdhrrn5mzbqwxidxp3i2y"); // side = sides & (1<<0); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("mnoev43mr2cyh3zj9yiupqzy"); // case 'e': UNSUPPORTED("avfplp4wadl774qo2yrqn2btg"); // theta = -M_PI * 0.25; UNSUPPORTED("bfouf47misaa32ulv25melpbm"); // defined = NOT(0); UNSUPPORTED("e1jqt6v7gkr0w7anohkdvwzuz"); // if (ictxt) UNSUPPORTED("4qnqhz6577yhq6u9919ve4tjb"); // p = compassPoint(ictxt, -maxv, maxv); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("5f4jye7znkk6hbv6lv0l9l0hs"); // p.x = b.UR.x; UNSUPPORTED("b0weojc8y88qjfkoujifnu9ag"); // side = sides & ((1<<0) | (1<<1)); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("xzkwmazk8r4ms7xbr46l9xyq"); // case 'w': UNSUPPORTED("a6j042vifpt4pgkwczny2dy24"); // theta = -M_PI * 0.75; UNSUPPORTED("bfouf47misaa32ulv25melpbm"); // defined = NOT(0); UNSUPPORTED("e1jqt6v7gkr0w7anohkdvwzuz"); // if (ictxt) UNSUPPORTED("c0hdr34iyaygjxcr6a65hns2g"); // p = compassPoint(ictxt, -maxv, -maxv); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("e2vcgqbz5sfyjwfyadlmm3s7n"); // p.x = b.LL.x; UNSUPPORTED("9yg4wc52hqtj6s3orou0nnbq4"); // side = sides & ((1<<0) | (1<<3)); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("bt2g0yhsy3c7keqyftf3c98ut"); // default: UNSUPPORTED("c8if0ggdrakzyxyn4fwlc8z2j"); // p.y = ctr.y; UNSUPPORTED("30qndpdx39k6rmlgid0k16w53"); // constrain = 0; UNSUPPORTED("2uxoapmd0p84jvg4utlai18nj"); // clip = NOT(0); UNSUPPORTED("en0rarvkx5srsxnlqpf6ja1us"); // rv = 1; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("6f2jab2h8wmbwxojrav1mbs6l"); // case 'w': UNSUPPORTED("caapivv2sv3cdu0rt3fnciovd"); // if (*compass) UNSUPPORTED("en0rarvkx5srsxnlqpf6ja1us"); // rv = 1; UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("3s6xpfbxpp44ou5loxsjfgzqp"); // if (ictxt) UNSUPPORTED("dkdxl90pni5x4m9rsi9l4fkml"); // p = compassPoint(ictxt, ctr.y, -maxv); UNSUPPORTED("c0op0grmjt3kp22s10twqy66r"); // else UNSUPPORTED("e2vcgqbz5sfyjwfyadlmm3s7n"); // p.x = b.LL.x; UNSUPPORTED("4dcpup1eqdwbtlebzv22j3izb"); // theta = M_PI; UNSUPPORTED("8cz8xetupjr38r0y1sfojc387"); // constrain = NOT(0); UNSUPPORTED("bfouf47misaa32ulv25melpbm"); // defined = NOT(0); UNSUPPORTED("9ni9ftlf9oep71byodeubp1sr"); // clip = 0; UNSUPPORTED("3vss3xpo7q52fe0nwev7hyiyj"); // side = sides & (1<<3); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("f187wptsr73liavtlyoyfovp3"); // case 'n': UNSUPPORTED("7gucyzlkpil4bfg1hpst17k3d"); // p.y = b.UR.y; UNSUPPORTED("b4ce4svfzxg7z2fd1fquu4qmu"); // constrain = NOT(0); UNSUPPORTED("c3sati4oun39vfql5zx4ru6z"); // clip = 0; UNSUPPORTED("bzgzeuh7ihvw4c4eysc3dgpzd"); // switch (*compass) { UNSUPPORTED("6qkxsufvygbc44eq3d6xorgsx"); // case '\0': UNSUPPORTED("bfouf47misaa32ulv25melpbm"); // defined = NOT(0); UNSUPPORTED("5w6ijz1qm65stfcc659o09osm"); // theta = M_PI * 0.5; UNSUPPORTED("3s6xpfbxpp44ou5loxsjfgzqp"); // if (ictxt) UNSUPPORTED("6l60lhko2eg8jry5mf4wpknho"); // p = compassPoint(ictxt, maxv, ctr.x); UNSUPPORTED("c0op0grmjt3kp22s10twqy66r"); // else UNSUPPORTED("3ly2ywet0m7qfki5yj2nz9t87"); // p.x = ctr.x; UNSUPPORTED("8cnew4tzzej0j68sucbir8orn"); // side = sides & (1<<2); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("mnoev43mr2cyh3zj9yiupqzy"); // case 'e': UNSUPPORTED("bfouf47misaa32ulv25melpbm"); // defined = NOT(0); UNSUPPORTED("dpfvfzmxj8yxv0s9b2jrvy1dt"); // theta = M_PI * 0.25; UNSUPPORTED("e1jqt6v7gkr0w7anohkdvwzuz"); // if (ictxt) UNSUPPORTED("eaiok8sr9qt2m9t35bj1n33vk"); // p = compassPoint(ictxt, maxv, maxv); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("5f4jye7znkk6hbv6lv0l9l0hs"); // p.x = b.UR.x; UNSUPPORTED("7eo9yj1faco0zq3n56ljnckjl"); // side = sides & ((1<<2) | (1<<1)); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("xzkwmazk8r4ms7xbr46l9xyq"); // case 'w': UNSUPPORTED("bfouf47misaa32ulv25melpbm"); // defined = NOT(0); UNSUPPORTED("b4rydjq1y842ljagzj3esvilf"); // theta = M_PI * 0.75; UNSUPPORTED("e1jqt6v7gkr0w7anohkdvwzuz"); // if (ictxt) UNSUPPORTED("aftpsq12rdaiypy81n10uki6g"); // p = compassPoint(ictxt, maxv, -maxv); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("e2vcgqbz5sfyjwfyadlmm3s7n"); // p.x = b.LL.x; UNSUPPORTED("46gsms8looi57wty5vza2s5el"); // side = sides & ((1<<2) | (1<<3)); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("bt2g0yhsy3c7keqyftf3c98ut"); // default: UNSUPPORTED("c8if0ggdrakzyxyn4fwlc8z2j"); // p.y = ctr.y; UNSUPPORTED("30qndpdx39k6rmlgid0k16w53"); // constrain = 0; UNSUPPORTED("2uxoapmd0p84jvg4utlai18nj"); // clip = NOT(0); UNSUPPORTED("en0rarvkx5srsxnlqpf6ja1us"); // rv = 1; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("8yhowesoplp2da595z8jyojxi"); // case '_': UNSUPPORTED("f5fa3usseyo7pci5g560azmea"); // dyna = NOT(0); UNSUPPORTED("czfzlng8hat0mzzbxb59g5eix"); // side = sides; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("f3lyz2cejs6yn5fyckhn7ba1"); // case 'c': UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("eldwzm3uyfs9zu1roub5a2uqi"); // rv = 1; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3y0o9dwc6l3w452ce3a06atj4"); // p = cwrotatepf(p, 90 * GD_rankdir(agraphof(n))); UNSUPPORTED("bg899fz3cixwumeyw39ytk9ky"); // if (dyna) UNSUPPORTED("c3yy1egy8x5xhv1n80wf30bsp"); // pp->side = side; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("fbhfdhcz7hf8d057jq31086q"); // pp->side = invflip_side(side, GD_rankdir(agraphof(n))); UNSUPPORTED("cx3gmg51rc8so3a5bx6cltryq"); // pp->bp = bp; UNSUPPORTED("epsoufavu8hg3cbvo2ejmmrx0"); // PF2P(p, pp->p); UNSUPPORTED("ami97j8il2yf1ggrixwlm2sga"); // pp->theta = invflip_angle(theta, GD_rankdir(agraphof(n))); UNSUPPORTED("12w9ecxxght79o36ovi8zwdz5"); // if ((p.x == 0) && (p.y == 0)) UNSUPPORTED("ckgevzxmtfz2xxsz34wg7zura"); // pp->order = 256 / 2; UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("eq22ufb5r5rfpsjxc3gie6aon"); // /* compute angle with 0 at north pole, increasing CCW */ UNSUPPORTED("aqoi5i20orce7l827lbn5rpfs"); // double angle = atan2(p.y, p.x) + 1.5 * M_PI; UNSUPPORTED("dfb9u6ghdbpwnspizdx8mrdz3"); // if (angle >= 2 * M_PI) UNSUPPORTED("jxrmr2dbqvl6zf1pboxh2hbn"); // angle -= 2 * M_PI; UNSUPPORTED("7wk803jipbaan1qcm89gw97t0"); // pp->order = (int) ((256 * angle) / (2 * M_PI)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("956p2hx4hma7on3bk77kr5mjg"); // pp->constrained = constrain; UNSUPPORTED("docrlijfgalt2ubkbd5x1aj0g"); // pp->defined = defined; UNSUPPORTED("bmz5fuwc9jp1t2yghe0gppn11"); // pp->clip = clip; UNSUPPORTED("2vslebofw1l11qjpgy2bu0q0g"); // pp->dyna = dyna; UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5k2b9gfpwm2tj3zmzniuz9azt // static port poly_port(node_t * n, char *portname, char *compass) public static __struct__ poly_port(Agnode_s n, CString portname, CString compass) { // WARNING!! STRUCT return poly_port_w_(n, portname, compass).copy(); } private static __struct__ poly_port_w_(Agnode_s n, CString portname, CString compass) { ENTERING("5k2b9gfpwm2tj3zmzniuz9azt","poly_port"); try { final __struct__ rv= JUtils.from(port.class); boxf bp; int sides; /* bitmap of which sides the port lies along */ if (portname.charAt(0) == '\0') return Z.z().Center.copy(); UNSUPPORTED("cm99rhftfe8nq2suzac5fwbgp"); // if (compass == NULL) UNSUPPORTED("238a13tlawcw3bixwliz859y5"); // compass = "_"; UNSUPPORTED("ci2ge3idao9rokpvacvcspaxl"); // sides = (1<<0) | (1<<1) | (1<<2) | (1<<3); UNSUPPORTED("p7u7ou2qrodeed98v2l4kt16"); // if (((((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->label)->html) && (bp = html_port(n, portname, &sides))) { UNSUPPORTED("dl6n43wu7irkeiaxb6wed3388"); // if (compassPort(n, bp, &rv, compass, sides, NULL)) { UNSUPPORTED("cw5grwj6gbj94jcztvnp2ooyj"); // agerr(AGWARN, UNSUPPORTED("en2xpqtprfng8gmc77dzq7klv"); // "node %s, port %s, unrecognized compass point '%s' - ignored\n", UNSUPPORTED("cmo03yl2q1wgn0c1r45y1ay5e"); // agnameof(n), portname, compass); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("dthh3e4ncmo6w9ycaz15zau5"); // inside_t *ictxtp; UNSUPPORTED("2txee0yz6un4eoxopikuvmodk"); // inside_t ictxt; UNSUPPORTED("ffnmnsqi4jd54ewadswjs4c3"); // if (((((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->shape)->polygon == &p_box)) UNSUPPORTED("caeppa7hx6uy3mtmkxxe509c9"); // ictxtp = NULL; UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("17pbmb7rfq2rdapm13ww6pefz"); // ictxt.s.n = n; UNSUPPORTED("etss3zom716xdeasxnytjb8db"); // ictxt.s.bp = NULL; UNSUPPORTED("89cj6b362bd80f627mp67yjh0"); // ictxtp = &ictxt; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5dzg4u1k50dmwpfqatxykvula"); // if (compassPort(n, NULL, &rv, portname, sides, ictxtp)) UNSUPPORTED("9xmgpfnye0xzd72aptv8i0cgl"); // unrecognized(n, portname); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("5k2b9gfpwm2tj3zmzniuz9azt","poly_port"); } } //3 1tks71z165dy9pzfshnjejpx3 // static void poly_gencode(GVJ_t * job, node_t * n) public static Object poly_gencode(Object... arg) { UNSUPPORTED("p0x21cs921921juch0sv0bun"); // static void poly_gencode(GVJ_t * job, node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("7b0667dpeiekddi69gpywx92t"); // polygon_t *poly; UNSUPPORTED("behzd4x7hwrpj60ld9ydd6ldw"); // double xsize, ysize; UNSUPPORTED("avlmoeaaigyvssingomxrvja4"); // int i, j, peripheries, sides, style; UNSUPPORTED("1r39xvspssd187ru2ru0hw25i"); // pointf P, *vertices; UNSUPPORTED("behdcj4jfqh2lxeud7bvr9dxx"); // static pointf *AF; UNSUPPORTED("922k2c5xjbw7vuw4vfhavkll9"); // static int A_size; UNSUPPORTED("e26zsspincyfi747lhus7h41b"); // boolean filled; UNSUPPORTED("343gvjl2hbvjb2nrrtcqqetep"); // boolean usershape_p; UNSUPPORTED("55zxkmqgt42k3bgw1g1del41"); // boolean pfilled; /* true if fill not handled by user shape */ UNSUPPORTED("b80uijjl4g1zjdox5s5vdh8s5"); // char *color, *name; UNSUPPORTED("6ciz320nm1jdjxir808cycx3t"); // int doMap = (obj->url || obj->explicit_tooltip); UNSUPPORTED("7421ua6zgvtho3nwdlh9ypytf"); // char* fillcolor=NULL; UNSUPPORTED("39txqf5jgyh1q10jekeaemag6"); // char* pencolor=NULL; UNSUPPORTED("bhtcyodd9jiazat6sqhp9pm4x"); // char* clrs[2]; UNSUPPORTED("7pfkga2nn8ltabo2ycvjgma6o"); // if (doMap && !(job->flags & (1<<2))) UNSUPPORTED("6e7g66eeo7n8h8mq556pt3xxy"); // gvrender_begin_anchor(job, UNSUPPORTED("8g7o4dsbwgp9ggtiktgt2m41t"); // obj->url, obj->tooltip, obj->target, UNSUPPORTED("c8tk2e711ojwsnar0y39a73cf"); // obj->id); UNSUPPORTED("e8a863hfpkzgw2w09pemrprir"); // poly = (polygon_t *) ND_shape_info(n); UNSUPPORTED("44eync2gzhkt36aljp0pdxlws"); // vertices = poly->vertices; UNSUPPORTED("bt0ymhl3qyi2wkx6awwozl8pm"); // sides = poly->sides; UNSUPPORTED("axi5xtmkixooa3vai8uysr8y1"); // peripheries = poly->peripheries; UNSUPPORTED("3yzb2exxpwntmjik61bia8qin"); // if (A_size < sides) { UNSUPPORTED("6czsf4ed6c2x6qn10dz9vvpc2"); // A_size = sides + 5; UNSUPPORTED("4fxnv89xcha2g2jkqjznbfhtl"); // AF = ALLOC(A_size, AF, pointf); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("65psnpx1lm1txgz684nsf5fy0"); // /* nominal label position in the center of the node */ UNSUPPORTED("1bslo0pyyucx0zmdzt12sei6d"); // ND_label(n)->pos = ND_coord(n); UNSUPPORTED("8pq7sdzx1tcm5jiy7gk6k14ru"); // xsize = (ND_lw(n) + ND_rw(n)) / (ROUND((ND_width(n))*72)); UNSUPPORTED("ebgzy2lbfiijt1acuci7zobbz"); // ysize = ND_ht(n) / (ROUND((ND_height(n))*72)); UNSUPPORTED("6yjfupcwvts03fbmr493ea2ja"); // style = stylenode(job, n); UNSUPPORTED("92hvfvrwzs8dy1vdgk97mu8rm"); // clrs[0] = NULL; UNSUPPORTED("e5t9x8qxknm67g2irjuq09m0n"); // if (ND_gui_state(n) & (1<<0)) { UNSUPPORTED("bmfnw21ksvzdvbf1k6jhpy482"); // pencolor = late_nnstring(n, N_activepencolor, "#808080"); UNSUPPORTED("4m6zwbkh86axvr0iupq8yqbj"); // gvrender_set_pencolor(job, pencolor); UNSUPPORTED("cmymz070zao66wyx1s7tv8pha"); // color = UNSUPPORTED("3kou17p4mmlejrgnb4ubal4y0"); // late_nnstring(n, N_activefillcolor, "#fcfcfc"); UNSUPPORTED("8jkw84z9v2sgxja8neagg70yn"); // gvrender_set_fillcolor(job, color); UNSUPPORTED("wgi1jlomdsgec9gfae0fj8md"); // filled = 1; UNSUPPORTED("9ihvjyvhnzzz36yb9vxt7ds0x"); // } else if (ND_gui_state(n) & (1<<1)) { UNSUPPORTED("aak3ib1vf3cr00erxujx1x1a2"); // pencolor = UNSUPPORTED("1cimazkiwwo2m0abp23m3fnme"); // late_nnstring(n, N_selectedpencolor, "#303030"); UNSUPPORTED("4m6zwbkh86axvr0iupq8yqbj"); // gvrender_set_pencolor(job, pencolor); UNSUPPORTED("cmymz070zao66wyx1s7tv8pha"); // color = UNSUPPORTED("28yl28qxl17kdj778ikor38xk"); // late_nnstring(n, N_selectedfillcolor, UNSUPPORTED("47h1lk49r1o0z3cv330dq6dx"); // "#e8e8e8"); UNSUPPORTED("8jkw84z9v2sgxja8neagg70yn"); // gvrender_set_fillcolor(job, color); UNSUPPORTED("wgi1jlomdsgec9gfae0fj8md"); // filled = 1; UNSUPPORTED("1yfjih723r7l1aal6cgysntu9"); // } else if (ND_gui_state(n) & (1<<3)) { UNSUPPORTED("aak3ib1vf3cr00erxujx1x1a2"); // pencolor = UNSUPPORTED("7ksdqin8o1wm9jzsj3vquwpn4"); // late_nnstring(n, N_deletedpencolor, "#e0e0e0"); UNSUPPORTED("4m6zwbkh86axvr0iupq8yqbj"); // gvrender_set_pencolor(job, pencolor); UNSUPPORTED("cmymz070zao66wyx1s7tv8pha"); // color = UNSUPPORTED("bt3kkty4bxox77ydiwjgsxvdl"); // late_nnstring(n, N_deletedfillcolor, "#f0f0f0"); UNSUPPORTED("8jkw84z9v2sgxja8neagg70yn"); // gvrender_set_fillcolor(job, color); UNSUPPORTED("wgi1jlomdsgec9gfae0fj8md"); // filled = 1; UNSUPPORTED("8zwfuofs5l5a6z3f4rvlihyw2"); // } else if (ND_gui_state(n) & (1<<2)) { UNSUPPORTED("aak3ib1vf3cr00erxujx1x1a2"); // pencolor = UNSUPPORTED("ctvdbytqgb1rzge7ij5ocomx9"); // late_nnstring(n, N_visitedpencolor, "#101010"); UNSUPPORTED("4m6zwbkh86axvr0iupq8yqbj"); // gvrender_set_pencolor(job, pencolor); UNSUPPORTED("cmymz070zao66wyx1s7tv8pha"); // color = UNSUPPORTED("2ffts5ygp2gvce89s4zmac21o"); // late_nnstring(n, N_visitedfillcolor, "#f8f8f8"); UNSUPPORTED("8jkw84z9v2sgxja8neagg70yn"); // gvrender_set_fillcolor(job, color); UNSUPPORTED("wgi1jlomdsgec9gfae0fj8md"); // filled = 1; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("71lsnu3rvb8q4qjlg8ekkueb8"); // if (style & (1 << 0)) { UNSUPPORTED("1ldzvmymblz8y4a6idvyxoj5t"); // float frac; UNSUPPORTED("e039lb3amkbtia1p5xid53g8f"); // fillcolor = findFill (n); UNSUPPORTED("5dnga3gh00f4sv4fk1n2iqdgu"); // if (findStopColor (fillcolor, clrs, &frac)) { UNSUPPORTED("12wjuz2zq45txyp39hhco78xu"); // gvrender_set_fillcolor(job, clrs[0]); UNSUPPORTED("5o23oun5dlazsaicyjj530pp"); // if (clrs[1]) UNSUPPORTED("ct9w73vq2t9wsony60rgp0vuv"); // gvrender_set_gradient_vals(job,clrs[1],late_int(n,N_gradientangle,0,0), frac); UNSUPPORTED("5v31mz0fdr0su096gqov41vyn"); // else UNSUPPORTED("5hcjieyymox6ih0mqxtesfkai"); // gvrender_set_gradient_vals(job,"black",late_int(n,N_gradientangle,0,0), frac); UNSUPPORTED("cu80xxb02iidme5bgb4b9q03o"); // if (style & (1 << 1)) UNSUPPORTED("5jf506rwz9snq4d6ozpjvg3yg"); // filled = 3; UNSUPPORTED("7rknc7r0egcn3cw68mrvgow3v"); // else UNSUPPORTED("7bikp52v1ey2yil3rybx6nris"); // filled = 2; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("es2lu1zhy5wdeml1v1kmrcix3"); // gvrender_set_fillcolor(job, fillcolor); UNSUPPORTED("6w06em6l23suofe15du0wq9hb"); // filled = 1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cbyq6e4yotsw91ihtsbpqk9n"); // else if (style & ((1 << 6)|(1 << 9))) { UNSUPPORTED("e039lb3amkbtia1p5xid53g8f"); // fillcolor = findFill (n); UNSUPPORTED("b39ijeotj91epdulx0zfawqg7"); // /* gvrender_set_fillcolor(job, fillcolor); */ UNSUPPORTED("5op945vn3c1cyxwov5p8rj33t"); // filled = NOT(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("6hyckgrxm2nsg8cw4hffomldu"); // filled = 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7v8vwyf8talmtwk6o9fv16cu7"); // pencolor = penColor(job, n); /* emit pen color */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dzz4jp9gamcvlyn9e3vzfb9m5"); // pfilled = !ND_shape(n)->usershape || (*(ND_shape(n)->name)==*("custom")&&!strcmp(ND_shape(n)->name,"custom")); UNSUPPORTED("867znru6ot29tjqobp8dlbw6z"); // /* if no boundary but filled, set boundary color to transparent */ UNSUPPORTED("42p7y58vqzgaceefog269961h"); // if ((peripheries == 0) && filled && pfilled) { UNSUPPORTED("15ha366z6aj0vmrwy4kws0mqd"); // peripheries = 1; UNSUPPORTED("9h0jwzscq5xyee6v8y9a84z5z"); // gvrender_set_pencolor(job, "transparent"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b5y5lqlrrc44k9t418m98208o"); // /* draw peripheries first */ UNSUPPORTED("3ldxhnwdjmonz5bmmr7t8i5v6"); // for (j = 0; j < peripheries; j++) { UNSUPPORTED("bnlcutimilujroygrsjpbamec"); // for (i = 0; i < sides; i++) { UNSUPPORTED("6jkqzav2wqsdxuy5nalny0l8v"); // P = vertices[i + j * sides]; UNSUPPORTED("7cdu1dtqyaubntomiasv9qnoj"); // AF[i].x = P.x * xsize + ND_coord(n).x; UNSUPPORTED("e40xvnbar4dmi82ewqw5laa59"); // AF[i].y = P.y * ysize + ND_coord(n).y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9dpfyah7h8cjesbm1tagc3qr2"); // if (sides <= 2) { UNSUPPORTED("4iafj5ab7zhphfv75axr98xpm"); // if ((style & (1 << 9)) && (j == 0) && (strchr(fillcolor,':'))) { UNSUPPORTED("brwfdh2hmhcwxahcpjocmax54"); // int rv = wedgedEllipse (job, AF, fillcolor); UNSUPPORTED("4195dkkxygfup9x2hevx5t0kt"); // if (rv > 1) UNSUPPORTED("6d80sdeoci13p59wizsvnilpd"); // agerr (AGPREV, "in node %s\n", agnameof(n)); UNSUPPORTED("3zx9cyeiqls2js359g1ja8px8"); // filled = 0; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("dzwn73f4njl5hkp0qrnncl2ff"); // gvrender_ellipse(job, AF, sides, filled); UNSUPPORTED("chb5tdwhi8a8xmy8ftheo6824"); // if (style & (1 << 3)) { UNSUPPORTED("efwhq15vj62j7hdj6evx064cg"); // Mcircle_hack(job, n); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("aci5r7yyn8mzrv3exe7znstcn"); // } else if (style & (1 << 6)) { UNSUPPORTED("dgwuupvm0kjmgthk4ugim8woz"); // if (j == 0) { UNSUPPORTED("3x4ndf7fx76diabv9nfllk0b5"); // int rv = stripedBox (job, AF, fillcolor, 1); UNSUPPORTED("4195dkkxygfup9x2hevx5t0kt"); // if (rv > 1) UNSUPPORTED("6d80sdeoci13p59wizsvnilpd"); // agerr (AGPREV, "in node %s\n", agnameof(n)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("717qv74rlec63ys8natmmpak9"); // gvrender_polygon(job, AF, sides, 0); UNSUPPORTED("5ueys9z3ukkzz7o4fr6z8tuk0"); // } else if (style & (1 << 10)) { UNSUPPORTED("8ozii45lu97yd30cta30grmf8"); // gvrender_set_pencolor(job, "transparent"); UNSUPPORTED("oe3tziy2rg7shg7dan61ilfq"); // gvrender_polygon(job, AF, sides, filled); UNSUPPORTED("9cgcmdbt8qdrnqnvs86u9cd53"); // gvrender_set_pencolor(job, pencolor); UNSUPPORTED("fft8g5x7554aunjp9t27mqx6"); // gvrender_polyline(job, AF+2, 2); UNSUPPORTED("8t4w6b2lracu2ee6rqqm6r915"); // } else if (((style) & ((1 << 2) | (1 << 3) | (127 << 24)))) { UNSUPPORTED("858fovk41ca06eamq91gjw7tm"); // round_corners(job, AF, sides, style, filled); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("oe3tziy2rg7shg7dan61ilfq"); // gvrender_polygon(job, AF, sides, filled); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1peuavyjb0rqm2z4fzpf2afzm"); // /* fill innermost periphery only */ UNSUPPORTED("arpfq2ay8oyluwsz8s1wp6tp4"); // filled = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("76vwep8b6qm5azc0fy66d98rw"); // usershape_p = 0; UNSUPPORTED("8fhwzyrc8mh95ap0b1g7e9nbq"); // if (ND_shape(n)->usershape) { UNSUPPORTED("2v9mlb5rtcmwqpcth7w27clk5"); // name = ND_shape(n)->name; UNSUPPORTED("ad1u0yih0rcookfy0x1lsev4d"); // if ((*(name)==*("custom")&&!strcmp(name,"custom"))) { UNSUPPORTED("7eg6kesbmod5ryqil85qa0nhh"); // if ((name = agget(n, "shapefile")) && name[0]) UNSUPPORTED("avdrph3m5jvu0m9cldtioxy3f"); // usershape_p = NOT(0); UNSUPPORTED("6to1esmb8qfrhzgtr7jdqleja"); // } else UNSUPPORTED("cmpu4v9yae7spgt5x9vvwycqu"); // usershape_p = NOT(0); UNSUPPORTED("5i5g01dslsnkth7in6u6rbi99"); // } else if ((name = agget(n, "image")) && name[0]) { UNSUPPORTED("e220s4b8iyyeqjgxmlg5pcdrj"); // usershape_p = NOT(0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3btjgija7cfs4jgzrv91fjwpt"); // if (usershape_p) { UNSUPPORTED("9usktstdf8lawthhtrs6s58pm"); // /* get coords of innermost periphery */ UNSUPPORTED("bnlcutimilujroygrsjpbamec"); // for (i = 0; i < sides; i++) { UNSUPPORTED("5dznk69haxedww8ugav5ykrld"); // P = vertices[i]; UNSUPPORTED("7cdu1dtqyaubntomiasv9qnoj"); // AF[i].x = P.x * xsize + ND_coord(n).x; UNSUPPORTED("e40xvnbar4dmi82ewqw5laa59"); // AF[i].y = P.y * ysize + ND_coord(n).y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1xu7you106p030clm45rzsrgc"); // /* lay down fill first */ UNSUPPORTED("3sznkjp2q6eryoqsuxyw523pa"); // if (filled && pfilled) { UNSUPPORTED("dur5g2omz2d8j499p5rr99e0g"); // if (sides <= 2) { UNSUPPORTED("ezipi4mltlppyq0tetpgbb2rn"); // if ((style & (1 << 9)) && (j == 0) && (strchr(fillcolor,':'))) { UNSUPPORTED("an9w62svq9d61trsclgublxs4"); // int rv = wedgedEllipse (job, AF, fillcolor); UNSUPPORTED("4njt8ngwdhm5t0qj38vd4vx26"); // if (rv > 1) UNSUPPORTED("dimjpscq5rjb3aaiz8l8gia45"); // agerr (AGPREV, "in node %s\n", agnameof(n)); UNSUPPORTED("14k7t5gy5xvy3m6y4lllccbyz"); // filled = 0; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("4ey5tpwqvnf3eih51z1ar6wgg"); // gvrender_ellipse(job, AF, sides, filled); UNSUPPORTED("7eygavzyy3od5lurlb1kyvq4q"); // if (style & (1 << 3)) { UNSUPPORTED("53tsr41edfe2tdmq1vs4qmoh6"); // Mcircle_hack(job, n); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("79b2w9yvj1qj97vqjuf6ff9w0"); // } else if (style & (1 << 6)) { UNSUPPORTED("3x4ndf7fx76diabv9nfllk0b5"); // int rv = stripedBox (job, AF, fillcolor, 1); UNSUPPORTED("4195dkkxygfup9x2hevx5t0kt"); // if (rv > 1) UNSUPPORTED("6d80sdeoci13p59wizsvnilpd"); // agerr (AGPREV, "in node %s\n", agnameof(n)); UNSUPPORTED("ctx2lp124btfhy4z6030o2gs"); // gvrender_polygon(job, AF, sides, 0); UNSUPPORTED("89clftmmkfws4k288i4jas2yb"); // } else if (style & ((1 << 2) | (1 << 3))) { UNSUPPORTED("dk9vlsyutilnikpal5kjamo5x"); // round_corners(job, AF, sides, style, filled); UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("azv3esl3n2c27ol5b9dgx7yrz"); // gvrender_polygon(job, AF, sides, filled); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8bp2tc15gonvz3x38es3dcmqm"); // gvrender_usershape(job, name, AF, sides, filled, UNSUPPORTED("4ob0y29flbn0mu1b6or1pikm"); // late_string(n, N_imagescale, "false")); UNSUPPORTED("cyozk4ozoaaqkwqvcr0wuavfb"); // filled = 0; /* with user shapes, we have done the fill if needed */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("59de9ohjmjuxis5h2yvc2zjnx"); // free (clrs[0]); UNSUPPORTED("8r8t0lgzzpigm1odig9a9yg1c"); // emit_label(job, EMIT_NLABEL, ND_label(n)); UNSUPPORTED("amrlpbo0f5svfvv7e9lzhfzj9"); // if (doMap) { UNSUPPORTED("4drs7w0v5mk7ys9aylmo5lnq8"); // if (job->flags & (1<<2)) UNSUPPORTED("12436nj34of615tb94t3cw2h0"); // gvrender_begin_anchor(job, UNSUPPORTED("2rwb38hipr5rxkwxfdzzwkdmy"); // obj->url, obj->tooltip, obj->target, UNSUPPORTED("4x188hxybttaubn1tt4tf710k"); // obj->id); UNSUPPORTED("e3o6yrnsv8lko5fql4f8a9gly"); // gvrender_end_anchor(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4jw571mqhnyucuj7xrwi1h9o5 // static void point_init(node_t * n) public static Object point_init(Object... arg) { UNSUPPORTED("9teib8zo1wrsipfc5j66cuyuy"); // static void point_init(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5r323abe0z0jo5p5exij6a98a"); // polygon_t *poly = (polygon_t*)zmalloc(sizeof(polygon_t)); UNSUPPORTED("6s51isafyf01shjhyf1xybd0g"); // int sides, outp, peripheries = ND_shape(n)->polygon->peripheries; UNSUPPORTED("483po9irjcq4khru9r63df3hc"); // double sz; UNSUPPORTED("1r39xvspssd187ru2ru0hw25i"); // pointf P, *vertices; UNSUPPORTED("dzpsknrwv8qkqq20hjnjpjn68"); // int i, j; UNSUPPORTED("cldfniz1yu2rzamoi5a3tri2q"); // double w, h; UNSUPPORTED("2k44yvy3ib1xjsbz4aoziggm6"); // /* set width and height, and make them equal UNSUPPORTED("2cp3uyfw5ix1x35noly2mr8xl"); // * if user has set weight or height, use it. UNSUPPORTED("bnvp9gvvkfk14zw1xx1fol30y"); // * if both are set, use smallest. UNSUPPORTED("e7wh555e1kr9ygs6v77uuxuek"); // * if neither, use default UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("shqz46obs8iqqm2ty42thbuz"); // w = late_double(n, N_width, MAXDOUBLE, 0.0); UNSUPPORTED("4j74z7hdszhifo9kh4hh1wofy"); // h = late_double(n, N_height, MAXDOUBLE, 0.0); UNSUPPORTED("8fn9glr373p3sq9l96u8rshi5"); // w = MIN(w, h); UNSUPPORTED("ebrgob1ni20nxqse89rw5hipv"); // if ((w == MAXDOUBLE) && (h == MAXDOUBLE)) /* neither defined */ UNSUPPORTED("ax36ksj200y93pvt2rjxvnupc"); // ND_width(n) = ND_height(n) = 0.05; UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("42uohvzx3qdjcdkup3wcj6s6x"); // w = MIN(w, h); UNSUPPORTED("1km16exp8dsurkq6pd730gw3v"); // /* If w == 0, use it; otherwise, make w no less than MIN_POINT due UNSUPPORTED("3ilg8ohbfo44z8h3fnuc0560h"); // * to the restrictions mentioned above. UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ UNSUPPORTED("7lyxf0b1aikm6fzbqhbr8k9oa"); // if (w > 0.0) UNSUPPORTED("dsnyzjlf33z6dnm3ptthdw0y3"); // w = MAX(w,0.0003); UNSUPPORTED("2fz0g7sw4drprgpggwdns197i"); // ND_width(n) = ND_height(n) = w; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("57ect78x8mvtomzg0tyodv7g"); // sz = ND_width(n) * 72; UNSUPPORTED("6s2rmv5dvc38plrfxn2iknbec"); // peripheries = late_int(n, N_peripheries, peripheries, 0); UNSUPPORTED("d8z7y5n3mm6modrbwu1y08k80"); // if (peripheries < 1) UNSUPPORTED("5j2roihkrnhpbzz7w0qxrt1tb"); // outp = 1; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("dt4js26tpr1dccw0n8attbsqv"); // outp = peripheries; UNSUPPORTED("8o3qj0u55iaq7q7uz9bp2btmt"); // sides = 2; UNSUPPORTED("e6zmcz1u6vh44zg5bdfazji16"); // vertices = (pointf*)zmalloc((outp * sides)*sizeof(pointf)); UNSUPPORTED("wog9mbijcqexxahwely1klv"); // P.y = P.x = sz / 2.; UNSUPPORTED("401agb4oue2c5jj69la268pcx"); // vertices[0].x = -P.x; UNSUPPORTED("877hteaqk6t4p1f5at5526w7s"); // vertices[0].y = -P.y; UNSUPPORTED("cjcbbgirujkoa3jg96de4tn4n"); // vertices[1] = P; UNSUPPORTED("e3yma9eluyvh0pqkjh60cdtds"); // if (peripheries > 1) { UNSUPPORTED("9opkd1w4nqz4bwppgnj4nh97x"); // for (j = 1, i = 2; j < peripheries; j++) { UNSUPPORTED("460zn3qymugfa5w8867gevz9q"); // P.x += 4; UNSUPPORTED("esxff06psrm7h7ol9ohlnzcpi"); // P.y += 4; UNSUPPORTED("6iwi6enjzo7fz7swxeospzgor"); // vertices[i].x = -P.x; UNSUPPORTED("7s0s5pcvrfbi2igyjxkzrm6q3"); // vertices[i].y = -P.y; UNSUPPORTED("1lo0ackow66iudrq1gb15y3ry"); // i++; UNSUPPORTED("d1mf936qm1rffrj0h5t3x94ng"); // vertices[i].x = P.x; UNSUPPORTED("eagc6fu5xvv54q8ct60z25dnr"); // vertices[i].y = P.y; UNSUPPORTED("1lo0ackow66iudrq1gb15y3ry"); // i++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2gqt5o1ww7zscvmqs2er3asq5"); // sz = 2. * P.x; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dcm4c8vrwq4xjdw6mnk7jh45a"); // poly->regular = 1; UNSUPPORTED("27nmn21035p035qyz0wzee98a"); // poly->peripheries = peripheries; UNSUPPORTED("auxb6kzl2meihrn96iopky8b2"); // poly->sides = 2; UNSUPPORTED("38u6c2cd5dc1o1vmpzv5kfhok"); // poly->orientation = 0; UNSUPPORTED("1rjh9t0o5cpm795hqnsjkz026"); // poly->skew = 0; UNSUPPORTED("2196taxexoskznznmkkvqvfws"); // poly->distortion = 0; UNSUPPORTED("5lucyy48dtz44fkdhcjrphkjz"); // poly->vertices = vertices; UNSUPPORTED("16k7ddcfff7zeto50vvf4pn7e"); // ND_height(n) = ND_width(n) = ((sz)/(double)72); UNSUPPORTED("43hsn9iilhppt0qo3od9c7rnq"); // ND_shape_info(n) = (void *) poly; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 34yxvhscic4iigcqveaac58ue // static boolean point_inside(inside_t * inside_context, pointf p) public static Object point_inside(Object... arg) { UNSUPPORTED("96ogc5j6ek5rdyjpr6kp1yocz"); // static boolean point_inside(inside_t * inside_context, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4ogz1m3q9xn7z7hiecjp98bmt"); // static node_t *lastn; /* last node argument */ UNSUPPORTED("5l35lijc0ciwjv4q6hr6uiiwb"); // static double radius; UNSUPPORTED("7lh87lvufqsd73q9difg0omei"); // pointf P; UNSUPPORTED("d8oppi8gt9b4eaonkdgb7a54l"); // node_t *n = inside_context->s.n; UNSUPPORTED("823iiqtx9pt0gijqrohrd3zx7"); // P = ccwrotatepf(p, 90 * GD_rankdir(agraphof(n))); UNSUPPORTED("8rl2cn4oxr94675yld5eohkie"); // if (n != lastn) { UNSUPPORTED("b3vl4n360t74xga3kf8kpy77j"); // int outp; UNSUPPORTED("ekuhffxeyunmrbugeqeo525ww"); // polygon_t *poly = (polygon_t *) ND_shape_info(n); UNSUPPORTED("d41xba93s17axh19qsbhg0x8a"); // /* index to outer-periphery */ UNSUPPORTED("8qv90di846fa1tngzoa71d029"); // outp = 2 * (poly->peripheries - 1); UNSUPPORTED("47l17pa0edzmfnlr8ysqs0qh4"); // if (outp < 0) UNSUPPORTED("jyf75douzxhfzxfyrq3kes6e"); // outp = 0; UNSUPPORTED("4dly7702wk6tpv9taxmfj31og"); // radius = poly->vertices[outp + 1].x; UNSUPPORTED("dz5401vppes7iz7b0c6pzkge6"); // lastn = n; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c0dgd06mnotxt3zonxv8qfpsv"); // /* inside bounding box? */ UNSUPPORTED("56idyrf96f39b4a9qfa4aaoar"); // if ((fabs(P.x) > radius) || (fabs(P.y) > radius)) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("1nxamo9gj6oech5spo5v5a16q"); // return (hypot(P.x, P.y) <= radius); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9nmafjnpqf5021bgj7xic6bcv // static void point_gencode(GVJ_t * job, node_t * n) public static Object point_gencode(Object... arg) { UNSUPPORTED("c8zl3q8hj4ggg44eavpqwpcz6"); // static void point_gencode(GVJ_t * job, node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("7b0667dpeiekddi69gpywx92t"); // polygon_t *poly; UNSUPPORTED("6smidc9cn5hmnzglv2o3ha87a"); // int i, j, sides, peripheries, style; UNSUPPORTED("1r39xvspssd187ru2ru0hw25i"); // pointf P, *vertices; UNSUPPORTED("behdcj4jfqh2lxeud7bvr9dxx"); // static pointf *AF; UNSUPPORTED("922k2c5xjbw7vuw4vfhavkll9"); // static int A_size; UNSUPPORTED("e26zsspincyfi747lhus7h41b"); // boolean filled; UNSUPPORTED("5zltq70xm6o2q24ddyqe6noyn"); // char *color; UNSUPPORTED("6ciz320nm1jdjxir808cycx3t"); // int doMap = (obj->url || obj->explicit_tooltip); UNSUPPORTED("7pfkga2nn8ltabo2ycvjgma6o"); // if (doMap && !(job->flags & (1<<2))) UNSUPPORTED("6e7g66eeo7n8h8mq556pt3xxy"); // gvrender_begin_anchor(job, UNSUPPORTED("8g7o4dsbwgp9ggtiktgt2m41t"); // obj->url, obj->tooltip, obj->target, UNSUPPORTED("c8tk2e711ojwsnar0y39a73cf"); // obj->id); UNSUPPORTED("e8a863hfpkzgw2w09pemrprir"); // poly = (polygon_t *) ND_shape_info(n); UNSUPPORTED("44eync2gzhkt36aljp0pdxlws"); // vertices = poly->vertices; UNSUPPORTED("bt0ymhl3qyi2wkx6awwozl8pm"); // sides = poly->sides; UNSUPPORTED("axi5xtmkixooa3vai8uysr8y1"); // peripheries = poly->peripheries; UNSUPPORTED("3yzb2exxpwntmjik61bia8qin"); // if (A_size < sides) { UNSUPPORTED("cbz0nkwec20m1ib1g01fqvu61"); // A_size = sides + 2; UNSUPPORTED("4fxnv89xcha2g2jkqjznbfhtl"); // AF = ALLOC(A_size, AF, pointf); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ba3rlm9loi447hvq9xargrfj5"); // checkStyle(n, &style); UNSUPPORTED("c9p9i9kp0tu95s7r5pe6r726t"); // if (style & (1 << 5)) UNSUPPORTED("3t8beazmvyshgjao810hjqmie"); // gvrender_set_style(job, point_style); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("74zb1tnkmdx8ynmv7c1olqg7e"); // gvrender_set_style(job, &point_style[1]); UNSUPPORTED("e5t9x8qxknm67g2irjuq09m0n"); // if (ND_gui_state(n) & (1<<0)) { UNSUPPORTED("494wbiv03tk48fokerl16r6f4"); // color = late_nnstring(n, N_activepencolor, "#808080"); UNSUPPORTED("9e08s11lexyxn6kite8m0sfty"); // gvrender_set_pencolor(job, color); UNSUPPORTED("cmymz070zao66wyx1s7tv8pha"); // color = UNSUPPORTED("3kou17p4mmlejrgnb4ubal4y0"); // late_nnstring(n, N_activefillcolor, "#fcfcfc"); UNSUPPORTED("8jkw84z9v2sgxja8neagg70yn"); // gvrender_set_fillcolor(job, color); UNSUPPORTED("9ihvjyvhnzzz36yb9vxt7ds0x"); // } else if (ND_gui_state(n) & (1<<1)) { UNSUPPORTED("cmymz070zao66wyx1s7tv8pha"); // color = UNSUPPORTED("1cimazkiwwo2m0abp23m3fnme"); // late_nnstring(n, N_selectedpencolor, "#303030"); UNSUPPORTED("9e08s11lexyxn6kite8m0sfty"); // gvrender_set_pencolor(job, color); UNSUPPORTED("cmymz070zao66wyx1s7tv8pha"); // color = UNSUPPORTED("28yl28qxl17kdj778ikor38xk"); // late_nnstring(n, N_selectedfillcolor, UNSUPPORTED("47h1lk49r1o0z3cv330dq6dx"); // "#e8e8e8"); UNSUPPORTED("8jkw84z9v2sgxja8neagg70yn"); // gvrender_set_fillcolor(job, color); UNSUPPORTED("1yfjih723r7l1aal6cgysntu9"); // } else if (ND_gui_state(n) & (1<<3)) { UNSUPPORTED("cmymz070zao66wyx1s7tv8pha"); // color = UNSUPPORTED("7ksdqin8o1wm9jzsj3vquwpn4"); // late_nnstring(n, N_deletedpencolor, "#e0e0e0"); UNSUPPORTED("9e08s11lexyxn6kite8m0sfty"); // gvrender_set_pencolor(job, color); UNSUPPORTED("cmymz070zao66wyx1s7tv8pha"); // color = UNSUPPORTED("bt3kkty4bxox77ydiwjgsxvdl"); // late_nnstring(n, N_deletedfillcolor, "#f0f0f0"); UNSUPPORTED("8jkw84z9v2sgxja8neagg70yn"); // gvrender_set_fillcolor(job, color); UNSUPPORTED("8zwfuofs5l5a6z3f4rvlihyw2"); // } else if (ND_gui_state(n) & (1<<2)) { UNSUPPORTED("cmymz070zao66wyx1s7tv8pha"); // color = UNSUPPORTED("ctvdbytqgb1rzge7ij5ocomx9"); // late_nnstring(n, N_visitedpencolor, "#101010"); UNSUPPORTED("9e08s11lexyxn6kite8m0sfty"); // gvrender_set_pencolor(job, color); UNSUPPORTED("cmymz070zao66wyx1s7tv8pha"); // color = UNSUPPORTED("2ffts5ygp2gvce89s4zmac21o"); // late_nnstring(n, N_visitedfillcolor, "#f8f8f8"); UNSUPPORTED("8jkw84z9v2sgxja8neagg70yn"); // gvrender_set_fillcolor(job, color); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("cf8q4vce1jpdyg0g44am343kh"); // color = findFillDflt(n, "black"); UNSUPPORTED("552c4dm43883t0wtf5hl0yvwe"); // gvrender_set_fillcolor(job, color); /* emit fill color */ UNSUPPORTED("ep2kgzcflmdfwwmtohgbczks7"); // penColor(job, n); /* emit pen color */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2gwieuk9tzvsileijzb0m497g"); // filled = NOT(0); UNSUPPORTED("1pz5kftjxxzi9lv9u3y1o6rn0"); // /* if no boundary but filled, set boundary color to fill color */ UNSUPPORTED("5mlpxufq3yx495mi8tzel72un"); // if (peripheries == 0) { UNSUPPORTED("15ha366z6aj0vmrwy4kws0mqd"); // peripheries = 1; UNSUPPORTED("2kvd4jaqat0g550t2krwhucr2"); // if (color[0]) UNSUPPORTED("2v5mkqa2bpb5gkm53lbc3a8do"); // gvrender_set_pencolor(job, color); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3ldxhnwdjmonz5bmmr7t8i5v6"); // for (j = 0; j < peripheries; j++) { UNSUPPORTED("bnlcutimilujroygrsjpbamec"); // for (i = 0; i < sides; i++) { UNSUPPORTED("6jkqzav2wqsdxuy5nalny0l8v"); // P = vertices[i + j * sides]; UNSUPPORTED("e8tnxali1kzd83o1vue986ipj"); // AF[i].x = P.x + ND_coord(n).x; UNSUPPORTED("6v07wdm0qkwc0lx20mi2w7w7h"); // AF[i].y = P.y + ND_coord(n).y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("debstz8tichfsgcen5fgx33pj"); // gvrender_ellipse(job, AF, sides, filled); UNSUPPORTED("1peuavyjb0rqm2z4fzpf2afzm"); // /* fill innermost periphery only */ UNSUPPORTED("arpfq2ay8oyluwsz8s1wp6tp4"); // filled = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("amrlpbo0f5svfvv7e9lzhfzj9"); // if (doMap) { UNSUPPORTED("4drs7w0v5mk7ys9aylmo5lnq8"); // if (job->flags & (1<<2)) UNSUPPORTED("12436nj34of615tb94t3cw2h0"); // gvrender_begin_anchor(job, UNSUPPORTED("2rwb38hipr5rxkwxfdzzwkdmy"); // obj->url, obj->tooltip, obj->target, UNSUPPORTED("4x188hxybttaubn1tt4tf710k"); // obj->id); UNSUPPORTED("e3o6yrnsv8lko5fql4f8a9gly"); // gvrender_end_anchor(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 7tslf55o9g8v48j97pdsyich9 // static char *reclblp //3 1dflsvfaih0mcg1gg4n23v1rg // static void free_field(field_t * f) public static Object free_field(Object... arg) { UNSUPPORTED("1w8vqjgpmm3wzxdg86sst9sna"); // static void free_field(field_t * f) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("7zbyipqbl6t75m71to6vrvnmq"); // for (i = 0; i < f->n_flds; i++) { UNSUPPORTED("44t6o1rhsqwprcg98j3zgbzvz"); // free_field(f->fld[i]); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8mpeuez5fwrg7hufhlnvpzpk6"); // free(f->id); UNSUPPORTED("9mo450myxof5j4jin03aqpb9n"); // free_label(f->lp); UNSUPPORTED("6onriqqkoxktq7iqg9iiuw1zo"); // free(f->fld); UNSUPPORTED("a4v6veu7h0jl3a2wwlxwpdsuw"); // free(f); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e9v6g9o3uouhdvy68a5uiisw9 // static field_t *parse_error(field_t * rv, char *port) public static Object parse_error(Object... arg) { UNSUPPORTED("9bgvna5r61dzeu3tfs4uvakqi"); // static field_t *parse_error(field_t * rv, char *port) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4i2f9fbl6g816tgzjosnh9uxp"); // free_field(rv); UNSUPPORTED("d6w5xfrx6ivjrjr01evg54l4o"); // if (port) UNSUPPORTED("11a5y4khavkjgq5ubj4dyaa5p"); // free(port); UNSUPPORTED("o68dp934ebg4cplebgc5hv4v"); // return NULL; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7zxlp1fmrq3zt4fprrtesdbg3 // static field_t *parse_reclbl(node_t * n, int LR, int flag, char *text) public static Object parse_reclbl(Object... arg) { UNSUPPORTED("9v20mrghfq60f2qgsfdn1xxdw"); // static field_t *parse_reclbl(node_t * n, int LR, int flag, char *text) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7ws2qs7cm9wlnskmpn5zahpwz"); // field_t *fp, *rv = (field_t*)zmalloc(sizeof(field_t)); UNSUPPORTED("ebck8ts2eioqv6lvicwad9mj8"); // char *tsp, *psp=NULL, *hstsp, *hspsp=NULL, *sp; UNSUPPORTED("1tf7pz3w8sq5wk926zvu829ep"); // char *tmpport = NULL; UNSUPPORTED("e7a8l4oon3q1mu7hlgf4clu1b"); // int maxf, cnt, mode, wflag, ishardspace, fi; UNSUPPORTED("3jmp83p22dny4oi3sy4awqg1d"); // textlabel_t *lbl = ND_label(n); UNSUPPORTED("9igz1d93visyobl4po13vtvkx"); // fp = NULL; UNSUPPORTED("2amh1z5unfmpprayylcu5gr96"); // for (maxf = 1, cnt = 0, sp = reclblp; *sp; sp++) { UNSUPPORTED("awjvysmspiqruxxa3ttkp4hto"); // if (*sp == '\\') { UNSUPPORTED("c6ujjd37nlex68cg5oii0ds8q"); // sp++; UNSUPPORTED("22vdzj6ye8zw196h8o51k5ol3"); // if (*sp UNSUPPORTED("84ppu6pbdmw18lsn0ryv4v2si"); // && (*sp == '{' || *sp == '}' || *sp == '|' || *sp == '\\')) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dacur0fb8e1qtm4h9105hx3rs"); // if (*sp == '{') UNSUPPORTED("7hl03wjg5yryhvbe4ar0i0b8g"); // cnt++; UNSUPPORTED("yro6chknoj2gs3h8b14wg99v"); // else if (*sp == '}') UNSUPPORTED("4vzj6cjceqbghqhehc5ucl97m"); // cnt--; UNSUPPORTED("e69f7pkphb1u2seq6xkr4kaho"); // else if (*sp == '|' && cnt == 0) UNSUPPORTED("8t45h7yg233z39lxb621fptcg"); // maxf++; UNSUPPORTED("2edcod5le4rwdf79wg0b9o14q"); // if (cnt < 0) UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4ris3hlhijr2gnuhvu238vyni"); // rv->fld = (field_t **)zmalloc((maxf)*sizeof(field_t *)); UNSUPPORTED("avl5mval8jm4w6du3hw9sxc1e"); // rv->LR = LR; UNSUPPORTED("565ypt38g1szuouqlmu74ejq9"); // mode = 0; UNSUPPORTED("8ub4c1i56h9jmytputkewow9k"); // fi = 0; UNSUPPORTED("85ilec7k1i6sdrpb5u8ncfru7"); // hstsp = tsp = text; UNSUPPORTED("1x6ue04deldh5y980p3gm7er1"); // wflag = NOT(0); UNSUPPORTED("58z9686vengy8z9jzrj1jxa13"); // ishardspace = 0; UNSUPPORTED("4edx4759azcbmezyrc5h0tmw"); // while (wflag) { UNSUPPORTED("23je92fa88f4sesva9mh3fk5k"); // if ((*reclblp < ' ') && *reclblp) { /* Ignore non-0 control characters */ UNSUPPORTED("8m8ph0munfeo3anrkr9n5c0o8"); // reclblp++; UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cxp5sujfti7s3yzy5w1hqq6xz"); // switch (*reclblp) { UNSUPPORTED("cfap8yeec19z0ucbudqen8t02"); // case '<': UNSUPPORTED("bb8zo5knwust0d4cwoa87msmw"); // if (mode & (4 | 2)) UNSUPPORTED("7zw1csy7lc9a9gq1nhizs470m"); // return parse_error(rv, tmpport); UNSUPPORTED("2lft1znt6um5sewf4ta8eigdi"); // if (lbl->html) UNSUPPORTED("75bwqdnezjvhazmryfatc4819"); // goto dotext; UNSUPPORTED("5z8248k3ca5miryedahc2wb60"); // mode |= (2 | 16); UNSUPPORTED("8m8ph0munfeo3anrkr9n5c0o8"); // reclblp++; UNSUPPORTED("d1omi22iukq2z2ih6p6w2zy5q"); // hspsp = psp = text; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5suo7424ml3937pmao1lly7tj"); // case '>': UNSUPPORTED("2lft1znt6um5sewf4ta8eigdi"); // if (lbl->html) UNSUPPORTED("75bwqdnezjvhazmryfatc4819"); // goto dotext; UNSUPPORTED("e7t4hd1jo3rbmnlsnt7tbyso7"); // if (!(mode & 16)) UNSUPPORTED("7zw1csy7lc9a9gq1nhizs470m"); // return parse_error(rv, tmpport); UNSUPPORTED("5mkkaq04kcnssm3nv93a82w58"); // if (psp > text + 1 && psp - 1 != hspsp && *(psp - 1) == ' ') UNSUPPORTED("7v2hf4x5nsnlq1l025dplo0vo"); // psp--; UNSUPPORTED("8qt2jpqdy5xvffbwdbwoz25od"); // *psp = '\000'; UNSUPPORTED("jt6w0csqwc7g51zgiaulvv1y"); // tmpport = strdup(text); UNSUPPORTED("v0n557cij70vu46xrnalpnkf"); // mode &= ~16; UNSUPPORTED("8m8ph0munfeo3anrkr9n5c0o8"); // reclblp++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("e1d1tlv81emdkqrj3h7vwega1"); // case '{': UNSUPPORTED("8m8ph0munfeo3anrkr9n5c0o8"); // reclblp++; UNSUPPORTED("171fk0fom3xhcmehn269b68k0"); // if (mode != 0 || !*reclblp) UNSUPPORTED("7zw1csy7lc9a9gq1nhizs470m"); // return parse_error(rv, tmpport); UNSUPPORTED("4f6lpwau75tu63tu957laxmhg"); // mode = 4; UNSUPPORTED("4uchlyreqn6xrcbdv514yikv5"); // if (!(rv->fld[fi++] = parse_reclbl(n, NOT(LR), 0, text))) UNSUPPORTED("7zw1csy7lc9a9gq1nhizs470m"); // return parse_error(rv, tmpport); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5yyz13ef8dtnlysqshj0o345v"); // case '}': UNSUPPORTED("2miq185bwgdi03xsbuf2yo7jg"); // case '|': UNSUPPORTED("dnmucnqmv1b1788zqbo1ra28z"); // case '\000': UNSUPPORTED("9hqo6gl1ko0z6pxo2slbietya"); // if ((!*reclblp && !flag) || (mode & 16)) UNSUPPORTED("7zw1csy7lc9a9gq1nhizs470m"); // return parse_error(rv, tmpport); UNSUPPORTED("190gti87w167l9bzbbuqdaao4"); // if (!(mode & 4)) UNSUPPORTED("l9mhl6lmaxqj7lr1vpp59qcx"); // fp = rv->fld[fi++] = (field_t*)zmalloc(sizeof(field_t)); UNSUPPORTED("6vtiuvpbccho5bvog9tbt6zt7"); // if (tmpport) { UNSUPPORTED("vx76i8n34hlrd473lur8wdmg"); // fp->id = tmpport; UNSUPPORTED("f4uqf89q045ls6scq11ld6jzl"); // tmpport = NULL; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6ogkowbov04jvech8rbmf5h71"); // if (!(mode & (1 | 4))) UNSUPPORTED("eiatbbffa47bl558pxd0v9w1g"); // mode |= 1, *tsp++ = ' '; UNSUPPORTED("3r0hwquezbtg597n0ud6pg0v2"); // if (mode & 1) { UNSUPPORTED("eciju51pa83rngg58rdfhhwlh"); // if (tsp > text + 1 && UNSUPPORTED("144ggmb5thn6bqdp5qsh5q542"); // tsp - 1 != hstsp && *(tsp - 1) == ' ') UNSUPPORTED("4rman9clm35ayjpnaekp2pa4c"); // tsp--; UNSUPPORTED("abhck6fmj383j2xczaz9n0hyc"); // *tsp = '\000'; UNSUPPORTED("b6zzmy9m0a71wiwkokxbmshtj"); // fp->lp = UNSUPPORTED("281g7dyja9pt1j00mw40mvk8h"); // make_label((void *) n, strdup(text), UNSUPPORTED("dwtk6llg07gqdeogzt9phcutg"); // (lbl->html ? (1 << 1) : (0 << 1)), UNSUPPORTED("4c25jiasa72rqemdd9q0fkqfr"); // lbl->fontsize, lbl->fontname, UNSUPPORTED("esi7yfxq7b1t44gjijlfmefkx"); // lbl->fontcolor); UNSUPPORTED("13033k8vmyxsz6v6ehqkz1pjy"); // fp->LR = NOT(0); UNSUPPORTED("3wxuyqcnsxu1lolpwdvh532ta"); // hstsp = tsp = text; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("49kjrnlxdycco3jlkx7a6uhfe"); // if (*reclblp) { UNSUPPORTED("bxo1ji3i5yxlcsgif616qyf9y"); // if (*reclblp == '}') { UNSUPPORTED("dcc90zmv0256yuz6jtriktl8s"); // reclblp++; UNSUPPORTED("emd51x6hgxuinh9oga7wnkrqk"); // rv->n_flds = fi; UNSUPPORTED("7nukzdmlh4mklsedpm903o4cj"); // return rv; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7dcvo4gc0ng3ctuwhrcjfrb41"); // mode = 0; UNSUPPORTED("be6gxzbdtfezsd8u46xrj6xw4"); // reclblp++; UNSUPPORTED("afk9bpom7x393euamnvwwkx6b"); // } else UNSUPPORTED("5iumhr0xqqhxv0zr03nxwhm7o"); // wflag = 0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("a4kmq96jzs4d007vvibjcu25v"); // case '\\': UNSUPPORTED("3vnixbvvmty9ydvf0l1929gle"); // if (*(reclblp + 1)) { UNSUPPORTED("bjtxv6n9c9aqzdkik1c6cqbvy"); // if (((*(reclblp + 1)) == '{' || (*(reclblp + 1)) == '}' || (*(reclblp + 1)) == '|' || (*(reclblp + 1)) == '<' || (*(reclblp + 1)) == '>')) UNSUPPORTED("dcc90zmv0256yuz6jtriktl8s"); // reclblp++; UNSUPPORTED("c8cxvsbs7ae3wdjeflwbk3z6u"); // else if ((*(reclblp + 1) == ' ') && !lbl->html) UNSUPPORTED("djkriuw8khnsxfne1jal3yysz"); // ishardspace = NOT(0), reclblp++; UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("2qwaphvt2yekkogtyqq0omhut"); // *tsp++ = '\\'; UNSUPPORTED("63p7706g22u4h7m9yealimr3g"); // mode |= (8 | 1); UNSUPPORTED("dcc90zmv0256yuz6jtriktl8s"); // reclblp++; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("dg5yg97t3vto8m73vvwj8jnb2"); // /* falling through ... */ UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("2d4vmvpowhgj7h9539m0qrxsy"); // dotext: UNSUPPORTED("5jto4v3wquxhnfa1ubq7jhn9e"); // if ((mode & 4) && *reclblp != ' ') UNSUPPORTED("7zw1csy7lc9a9gq1nhizs470m"); // return parse_error(rv, tmpport); UNSUPPORTED("f5g7ycr0n6dxs6l70ws5qbyha"); // if (!(mode & (8 | 16)) && *reclblp != ' ') UNSUPPORTED("49k9f66mkv4qjn84gy5oo6mfz"); // mode |= (8 | 1); UNSUPPORTED("4ehnscdbdyu6b96qrct40t547"); // if (mode & 8) { UNSUPPORTED("eoigvu52glsps928r04np5k12"); // if (! UNSUPPORTED("9zalai2d852m4eoy15f6bpxgu"); // (*reclblp == ' ' && !ishardspace && *(tsp - 1) == ' ' UNSUPPORTED("ahr3j94flu719g0gxu2i46zwn"); // && !lbl->html)) UNSUPPORTED("c8qpd7i4393s9xlwk5waq8sk3"); // *tsp++ = *reclblp; UNSUPPORTED("c2bifaubj01ag8b39d60p9cbk"); // if (ishardspace) UNSUPPORTED("atuokfvkmomvi6gvwvpbxggoz"); // hstsp = tsp - 1; UNSUPPORTED("blopjrsgbbips57lefdw6bg8b"); // } else if (mode & 16) { UNSUPPORTED("1eoe6a3jwmhnj7vdpgz9q6vsn"); // if (!(*reclblp == ' ' && !ishardspace && UNSUPPORTED("7i865uqx5v3rutzyppio4oztc"); // (psp == text || *(psp - 1) == ' '))) UNSUPPORTED("ccywxarqbhmcmnh8re3pv8j45"); // *psp++ = *reclblp; UNSUPPORTED("c2bifaubj01ag8b39d60p9cbk"); // if (ishardspace) UNSUPPORTED("5u5h7cb6egued2g1q7w8yhb1n"); // hspsp = psp - 1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("8m8ph0munfeo3anrkr9n5c0o8"); // reclblp++; UNSUPPORTED("eikj8pnam53jenwbu8enjrw4r"); // while (*reclblp & 128) UNSUPPORTED("86nc3qdu6nuyt7u67d0kblb9w"); // *tsp++ = *reclblp++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("csdg0jacrzxz21ls0053286t"); // rv->n_flds = fi; UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dwk0rh74bwfd7mky5hg9t1epj // static pointf size_reclbl(node_t * n, field_t * f) public static Object size_reclbl(Object... arg) { UNSUPPORTED("406fn16lbi8yxgg92lsuaglae"); // static pointf size_reclbl(node_t * n, field_t * f) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("mt3ya9zh07mi1ttjb64zhd7m"); // double marginx, marginy; UNSUPPORTED("6ub135100vcy57x6o36uz14be"); // pointf d, d0; UNSUPPORTED("bgjjpl6jaaa122twwwd0vif6x"); // pointf dimen; UNSUPPORTED("cofpjibrqirnx1jqt3qoptoa8"); // if (f->lp) { UNSUPPORTED("96sfr72s46epnfb44t03vqqu2"); // dimen = f->lp->dimen; UNSUPPORTED("bqi7vwb2jmnrrqcdzo1mntnvb"); // /* minimal whitespace around label */ UNSUPPORTED("dhtf2vwrnsx779x9mday279x5"); // if ((dimen.x > 0.0) || (dimen.y > 0.0)) { UNSUPPORTED("2yzf5uec82v14ygrfjcq6ktxp"); // /* padding */ UNSUPPORTED("b8i1qxc1gtg61p1c1szkj2osr"); // if ((p = agget(n, "margin"))) { UNSUPPORTED("bfyy3iw4z9ebf4m89x69tn1eb"); // i = sscanf(p, "%lf,%lf", &marginx, &marginy); UNSUPPORTED("ebo7omz8ev8wu69ub10b4o890"); // if (i > 0) { UNSUPPORTED("efcgckeemzkbxh32pc2qcdv0d"); // dimen.x += 2 * (ROUND((marginx)*72)); UNSUPPORTED("c755n9x3n7022hjjg8hanklib"); // if (i > 1) UNSUPPORTED("2az12nq89f7txcsfmqdj8tly1"); // dimen.y += 2 * (ROUND((marginy)*72)); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("2az12nq89f7txcsfmqdj8tly1"); // dimen.y += 2 * (ROUND((marginy)*72)); UNSUPPORTED("738mi6h8ef0itznt34ngxe25o"); // } else UNSUPPORTED("b12tl2a8tebl71ewuz3jms9jv"); // {((dimen).x += 4*4); ((dimen).y += 2*4);}; UNSUPPORTED("afk9bpom7x393euamnvwwkx6b"); // } else UNSUPPORTED("87bdwkkwbzyswxnepdd9bj8mb"); // {((dimen).x += 4*4); ((dimen).y += 2*4);}; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2ig0j65v03nhlp8gta21y7upj"); // d = dimen; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("3h1vugg28z5an28yxqksy73a1"); // d.x = d.y = 0; UNSUPPORTED("9cjjlq42o712cit9tby1b7l6a"); // for (i = 0; i < f->n_flds; i++) { UNSUPPORTED("1dovx3mi47z2lap7bct0utmvv"); // d0 = size_reclbl(n, f->fld[i]); UNSUPPORTED("xwrnxfxcwmxuxvjpfw1sb7lt"); // if (f->LR) { UNSUPPORTED("2s4lr8xqoy2s4fcc3dy43z546"); // d.x += d0.x; UNSUPPORTED("da9p29dgwktuisirb2i22mw4p"); // d.y = MAX(d.y, d0.y); UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("eey7x226uokoejjsvtccwizqn"); // d.y += d0.y; UNSUPPORTED("cvznbvji1rgs4g8avqaznhmtl"); // d.x = MAX(d.x, d0.x); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("58mlt8qk1oe73v2mcc1mgl8k1"); // f->size = d; UNSUPPORTED("3r3o80n61nmy2jv0ezi9xg2xp"); // return d; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 blo8etwhtlcsld8ox0vryznfw // static void resize_reclbl(field_t * f, pointf sz, int nojustify_p) public static Object resize_reclbl(Object... arg) { UNSUPPORTED("aye44rj1356dmxgwk9gx7pwh2"); // static void resize_reclbl(field_t * f, pointf sz, int nojustify_p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("71jvj7ehg7fq26a2s80qyw5pl"); // int i, amt; UNSUPPORTED("9rbb4p3tnymgkgm61ids5opx5"); // double inc; UNSUPPORTED("4vbedk7s9t1o5o9sll2mj3m4d"); // pointf d; UNSUPPORTED("azi9wyi9dsgwzm61ggr9st546"); // pointf newsz; UNSUPPORTED("1zy316mu1h3i1dwl59s1v5gtd"); // field_t *sf; UNSUPPORTED("4od0ewvxs3wubgnizxmaw95m6"); // /* adjust field */ UNSUPPORTED("2sbunv882wuaeiivap21n2bqb"); // d.x = sz.x - f->size.x; UNSUPPORTED("57mh8iamjlos1vfnth2m4qmgb"); // d.y = sz.y - f->size.y; UNSUPPORTED("b6m22nmidg72njh0uo1z8sndv"); // f->size = sz; UNSUPPORTED("9agycbghiz3e1xpj2702hn30z"); // /* adjust text area */ UNSUPPORTED("c5jen7s7dn54yuakfb7yncb47"); // if (f->lp && !nojustify_p) { UNSUPPORTED("65j1bcx86bkt4yhiu9enb30sv"); // f->lp->space.x += d.x; UNSUPPORTED("2hh4ho34pe678h62y8yhzq6ek"); // f->lp->space.y += d.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("esogsiw5n6l1sk5umv7ky4yi"); // /* adjust children */ UNSUPPORTED("9mofgi5b5ggg6ugo378omtt93"); // if (f->n_flds) { UNSUPPORTED("99h71dz46rnni7lfrxm1wzs87"); // if (f->LR) UNSUPPORTED("3idlilzzcmmfphl3ogxoi0gz"); // inc = d.x / f->n_flds; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("gsh4tsmu1upaadj6oebffxe4"); // inc = d.y / f->n_flds; UNSUPPORTED("9cjjlq42o712cit9tby1b7l6a"); // for (i = 0; i < f->n_flds; i++) { UNSUPPORTED("abiqjigzcxzn37q0cla73adcd"); // sf = f->fld[i]; UNSUPPORTED("cnehjao25jc5jjv5vfumb0qmk"); // amt = ((int) ((i + 1) * inc)) - ((int) (i * inc)); UNSUPPORTED("e5eeg49by0lz43uois7f6e5xt"); // if (f->LR) UNSUPPORTED("bhtvr8j5ek5tt7xm6c9z7hu5r"); // newsz = pointfof(sf->size.x + amt, sz.y); UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("cajand0txpij2kirrkxtjn1ps"); // newsz = pointfof(sz.x, sf->size.y + amt); UNSUPPORTED("aq6om414jdhfaf5204q5mmln4"); // resize_reclbl(sf, newsz, nojustify_p); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ds4v2i9xw0hm4y53ggbt8z2yk // static void pos_reclbl(field_t * f, pointf ul, int sides) public static Object pos_reclbl(Object... arg) { UNSUPPORTED("57l93w5nat2i71wn6e82nj4x9"); // static void pos_reclbl(field_t * f, pointf ul, int sides) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2f3a6lf3ce1tznglhu95xoda0"); // int i, last, mask; UNSUPPORTED("74djpee6zz6hk95hdvulbbjkb"); // f->sides = sides; UNSUPPORTED("2mtubjx0wssvmgcmhx716lypo"); // f->b.LL = pointfof(ul.x, ul.y - f->size.y); UNSUPPORTED("26ciar9flz0wc6r1zk7krxrg1"); // f->b.UR = pointfof(ul.x + f->size.x, ul.y); UNSUPPORTED("6f9cc8k5z3tih73jcgvyqzdy5"); // last = f->n_flds - 1; UNSUPPORTED("d5c2y0xbpfqkrfiwsb6b2q6qr"); // for (i = 0; i <= last; i++) { UNSUPPORTED("6s6izyatmponzopy22eomuw6h"); // if (sides) { UNSUPPORTED("xwrnxfxcwmxuxvjpfw1sb7lt"); // if (f->LR) { UNSUPPORTED("by48lavhlctvmymlkz9qkjvi0"); // if (i == 0) { UNSUPPORTED("4r4jabt98z99ira0e4bpyyktj"); // if (i == last) UNSUPPORTED("rvq6ubzk0rezd88243ailv84"); // mask = (1<<2) | (1<<0) | (1<<1) | (1<<3); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("6tzvg9fxvr7v7qt2yh73xn94n"); // mask = (1<<2) | (1<<0) | (1<<3); UNSUPPORTED("9xksdopde69ktgm9z90l55he9"); // } else if (i == last) UNSUPPORTED("eas1815ent5z97kozcm2qwglp"); // mask = (1<<2) | (1<<0) | (1<<1); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("evm1s2keksyeukfcgn64wt7k6"); // mask = (1<<2) | (1<<0); UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("by48lavhlctvmymlkz9qkjvi0"); // if (i == 0) { UNSUPPORTED("4r4jabt98z99ira0e4bpyyktj"); // if (i == last) UNSUPPORTED("rvq6ubzk0rezd88243ailv84"); // mask = (1<<2) | (1<<0) | (1<<1) | (1<<3); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("2wutifbakw4oqtj4lrjidlytt"); // mask = (1<<2) | (1<<1) | (1<<3); UNSUPPORTED("9xksdopde69ktgm9z90l55he9"); // } else if (i == last) UNSUPPORTED("84g4in93npbh6zty66dclzf8a"); // mask = (1<<3) | (1<<0) | (1<<1); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("ojlsh8buk0hgqhg1p1o1ogxy"); // mask = (1<<3) | (1<<1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6to1esmb8qfrhzgtr7jdqleja"); // } else UNSUPPORTED("cbvih14pp0igaj8ytp83216z6"); // mask = 0; UNSUPPORTED("c310n6zcvshjtf3nn15m858xd"); // pos_reclbl(f->fld[i], ul, sides & mask); UNSUPPORTED("99h71dz46rnni7lfrxm1wzs87"); // if (f->LR) UNSUPPORTED("6o8kbyjjm2bi8zipsgi5lr8ww"); // ul.x = ul.x + f->fld[i]->size.x; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("90vovw2s5lzb6up513xqh9u43"); // ul.y = ul.y - f->fld[i]->size.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 h2lcuthzwljbcjwdeidw1jiv // static void record_init(node_t * n) public static Object record_init(Object... arg) { UNSUPPORTED("8bn5tg52zfoyvwdnvqbw04l70"); // static void record_init(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("86oi3nfc6x87w7aj799p0ypzn"); // field_t *info; UNSUPPORTED("6rttlsij6gno16sto3oqsqa40"); // pointf ul, sz; UNSUPPORTED("9fmah1vlmqynhowqu4v9q2zu0"); // int flip, len; UNSUPPORTED("4ly7xwlmpjgyokyzpns8fjvi0"); // char *textbuf; /* temp buffer for storing labels */ UNSUPPORTED("1klslcqyc6484ub7o51jznyqf"); // int sides = (1<<0) | (1<<1) | (1<<2) | (1<<3); UNSUPPORTED("6jo9tl9gx62fi9j5u1nn0dfzw"); // /* Always use rankdir to determine how records are laid out */ UNSUPPORTED("ez37gg27m14oqygf9tny4whd9"); // flip = NOT(GD_realflip(agraphof(n))); UNSUPPORTED("831ssvyd2gs7q5d7r83p0tckc"); // reclblp = ND_label(n)->text; UNSUPPORTED("b61x6z42kkk6b66dyi8rykpvw"); // len = strlen(reclblp); UNSUPPORTED("17kft1nompfgymd2cpz9p06we"); // /* For some forgotten reason, an empty label is parsed into a space, so UNSUPPORTED("13t238hjobkason0chns2coag"); // * we need at least two bytes in textbuf. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("6k99spqggna26l34pfzpjeotk"); // len = MAX(len, 1); UNSUPPORTED("ey612n2e72vl1gbnw3arjznb5"); // textbuf = (char*)zmalloc((len + 1)*sizeof(char)); UNSUPPORTED("7uzna6j5b36j6wvueakqwtauo"); // if (!(info = parse_reclbl(n, flip, NOT(0), textbuf))) { UNSUPPORTED("7iezaksu9hyxhmv3r4cp4o529"); // agerr(AGERR, "bad label format %s\n", ND_label(n)->text); UNSUPPORTED("8f1id7rqm71svssnxbjo0uwcu"); // reclblp = "\\N"; UNSUPPORTED("2wv3zfqhq53941rwk4vu9p9th"); // info = parse_reclbl(n, flip, NOT(0), textbuf); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9upwq9jn3fup3nwwae3y0vv0q"); // free(textbuf); UNSUPPORTED("31sxwdtqr63gtnpp86jz8pdac"); // size_reclbl(n, info); UNSUPPORTED("434l8ab1hff80o0xz22d91u00"); // sz.x = (ROUND((ND_width(n))*72)); UNSUPPORTED("7qr0k3gmk24mj6toqadcqky22"); // sz.y = (ROUND((ND_height(n))*72)); UNSUPPORTED("6qf3p8rzhkupjmocuje9q4p2q"); // if (mapbool(late_string(n, N_fixed, "false"))) { UNSUPPORTED("8iu51xbtntpdf5sc00g91djym"); // if ((sz.x < info->size.x) || (sz.y < info->size.y)) { UNSUPPORTED("4vs5u30jzsrn6fpjd327xjf7r"); // /* should check that the record really won't fit, e.g., there may be no text. UNSUPPORTED("7k6yytek9nu1ihxix2880667g"); // agerr(AGWARN, "node '%s' size may be too small\n", agnameof(n)); UNSUPPORTED("bnetqzovnscxile7ao44kc0qd"); // */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("9vx9i9jopcbh8v928ih57vgj7"); // sz.x = MAX(info->size.x, sz.x); UNSUPPORTED("evseq8gqlm6aqw269kwgi57xh"); // sz.y = MAX(info->size.y, sz.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c0urxnxgjlnro89b6209kl0zf"); // resize_reclbl(info, sz, mapbool(late_string(n, N_nojustify, "false"))); UNSUPPORTED("2qhtglqv4czw1wzgy8h9w4o3v"); // ul = pointfof(-sz.x / 2., sz.y / 2.); /* FIXME - is this still true: suspected to introduce ronding error - see Kluge below */ UNSUPPORTED("816kf840erjhpdg9bin63xyig"); // pos_reclbl(info, ul, sides); UNSUPPORTED("7rjoo40zh2fd13jllh0j2n1w1"); // ND_width(n) = ((info->size.x)/(double)72); UNSUPPORTED("x5gpmbn3zd3hac5yz2s7trtx"); // ND_height(n) = ((info->size.y + 1)/(double)72); /* Kluge!! +1 to fix rounding diff between layout and rendering UNSUPPORTED("edky8r362p1bpruc2jcs2hyft"); // otherwise we can get -1 coords in output */ UNSUPPORTED("40bol1suut41tvh0xudcyhgpi"); // ND_shape_info(n) = (void *) info; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1lq2tksbz3nzqw9c3xqfs4ymf // static void record_free(node_t * n) public static Object record_free(Object... arg) { UNSUPPORTED("8anx9p03jsmcuhguyzf7q6qe3"); // static void record_free(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aiplewsp8j9h5b1bokpivfnqv"); // field_t *p = ND_shape_info(n); UNSUPPORTED("cn1q1h4lwj1gctn9nim9hdhpt"); // free_field(p); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a005gfg4ujp2d29bpdrtowla0 // static field_t *map_rec_port(field_t * f, char *str) public static Object map_rec_port(Object... arg) { UNSUPPORTED("7m0itp0yyimj2qrw4m7gkucwe"); // static field_t *map_rec_port(field_t * f, char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8vkza1jahjxmu3aujqqwejvh4"); // field_t *rv; UNSUPPORTED("bg1s70jnrhf3ei0qo60unqlly"); // int sub; UNSUPPORTED("2wb1wig5yijs1gwl6gsqsfypb"); // if (f->id && ((*(f->id)==*(str)&&!strcmp(f->id,str)))) UNSUPPORTED("c6qw5ghrclqer15nnzk3dcf9o"); // rv = f; UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("52b2tnzwipbuygdvyeyxg1lij"); // rv = NULL; UNSUPPORTED("2z6jes522cxoquqcehqxkfezp"); // for (sub = 0; sub < f->n_flds; sub++) UNSUPPORTED("2nwfsthm8r2bsdqcq3cs6mwi7"); // if ((rv = map_rec_port(f->fld[sub], str))) UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 chsi0jlfodruvkjj5dlrv5ur3 // static port record_port(node_t * n, char *portname, char *compass) public static Object record_port(Object... arg) { UNSUPPORTED("108iil8l4qbk7n5zy99yzuhna"); // static port record_port(node_t * n, char *portname, char *compass) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("30fmp9xlabtd67je318axlfiy"); // field_t *f; UNSUPPORTED("9nozntsyybg1oi5e3jpibarmk"); // field_t *subf; UNSUPPORTED("9ricxd1wv1am78xxjvd40ki5e"); // port rv; UNSUPPORTED("dezxih515uk47gnmutkm1zuno"); // int sides; /* bitmap of which sides the port lies along */ UNSUPPORTED("8531pl39rpqki88wilp72dh12"); // if (portname[0] == '\0') UNSUPPORTED("ct95magnbje1vlax6sewfa40f"); // return Center; UNSUPPORTED("ci2ge3idao9rokpvacvcspaxl"); // sides = (1<<0) | (1<<1) | (1<<2) | (1<<3); UNSUPPORTED("cm99rhftfe8nq2suzac5fwbgp"); // if (compass == NULL) UNSUPPORTED("238a13tlawcw3bixwliz859y5"); // compass = "_"; UNSUPPORTED("9xovezi85vdgw8han4h0wr87s"); // f = (field_t *) ND_shape_info(n); UNSUPPORTED("9ihnypp6vu95to95ydtnntq0l"); // if ((subf = map_rec_port(f, portname))) { UNSUPPORTED("6fvm5el2zlrng001datkwt7cc"); // if (compassPort(n, &subf->b, &rv, compass, subf->sides, NULL)) { UNSUPPORTED("cw5grwj6gbj94jcztvnp2ooyj"); // agerr(AGWARN, UNSUPPORTED("en2xpqtprfng8gmc77dzq7klv"); // "node %s, port %s, unrecognized compass point '%s' - ignored\n", UNSUPPORTED("cmo03yl2q1wgn0c1r45y1ay5e"); // agnameof(n), portname, compass); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3pocnlftms62i7fn2yjeglilc"); // } else if (compassPort(n, &f->b, &rv, portname, sides, NULL)) { UNSUPPORTED("98h27uayj9wzp3psyqb5feymg"); // unrecognized(n, portname); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1f7b6eq3csywqv96raw75jqxr // static boolean record_inside(inside_t * inside_context, pointf p) public static Object record_inside(Object... arg) { UNSUPPORTED("86kzi0ldxu2wp8jrcz52g23br"); // static boolean record_inside(inside_t * inside_context, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("awt4go86uiz8hw73uxp1kk1pd"); // field_t *fld0; UNSUPPORTED("4rtja2mn137n7wcxryrmo12ko"); // boxf *bp = inside_context->s.bp; UNSUPPORTED("d8oppi8gt9b4eaonkdgb7a54l"); // node_t *n = inside_context->s.n; UNSUPPORTED("dhrqm3z9pldopj98epb4nfoi4"); // boxf bbox; UNSUPPORTED("5a3hmefcpaol32pvsn6wgwi4p"); // /* convert point to node coordinate system */ UNSUPPORTED("7htr4npyn53khcc3o9gi9eew4"); // p = ccwrotatepf(p, 90 * GD_rankdir(agraphof(n))); UNSUPPORTED("57ly3awriopiy2hf7v62cw7ny"); // if (bp == NULL) { UNSUPPORTED("6f802g721m0ev4mztwuama272"); // fld0 = (field_t *) ND_shape_info(n); UNSUPPORTED("blfb7lv2fmwy1z0sax8wmxz17"); // bbox = fld0->b; UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("2punkrny8rmrqvqgluved9xjm"); // bbox = *bp; UNSUPPORTED("ca4t2zns3zehe95rbrig7evej"); // return INSIDE(p, bbox); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3p54k8x2kyueort8kj41qvkty // static int record_path(node_t * n, port * prt, int side, boxf rv[], int *kptr) public static Object record_path(Object... arg) { UNSUPPORTED("98cjokh407kmiyj3ne6z8tugr"); // static int record_path(node_t * n, port * prt, int side, boxf rv[], UNSUPPORTED("5j2zss62xcus5zenfk516rmmp"); // int *kptr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bxj1nynia6lfoufq42q6fbw81"); // int i, ls, rs; UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("86oi3nfc6x87w7aj799p0ypzn"); // field_t *info; UNSUPPORTED("41x42ivkcydor03dmtntfcr2c"); // if (!prt->defined) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("2q24y4tztoqnjrae3pyz4xos1"); // p = prt->p; UNSUPPORTED("qqnxp10edgu1p0nyl4uq7t2m"); // info = (field_t *) ND_shape_info(n); UNSUPPORTED("2ocjia9onk38jkynynvvsx6wy"); // for (i = 0; i < info->n_flds; i++) { UNSUPPORTED("6hin33h1bfc9sf9lszjmqgyev"); // if (!GD_flip(agraphof(n))) { UNSUPPORTED("72j4jh7zoqcwbpm47gdgozled"); // ls = info->fld[i]->b.LL.x; UNSUPPORTED("86sxinhjfgtxnim78cjm8ptup"); // rs = info->fld[i]->b.UR.x; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("dm9w81fxfdqc5bhtaimpbisvl"); // ls = info->fld[i]->b.LL.y; UNSUPPORTED("3sqtp996aa7m19wv9gwkrvav1"); // rs = info->fld[i]->b.UR.y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cc82ixosqyaz38wkysyxdbus1"); // if (BETWEEN(ls, p.x, rs)) { UNSUPPORTED("cmdehzhkvreoa7ge2cf6l81ux"); // /* FIXME: I don't understand this code */ UNSUPPORTED("75jifr4aucrxp2hvnsrcfunej"); // if (GD_flip(agraphof(n))) { UNSUPPORTED("8p9z8b0nypgkzi1b3k7sx0fyz"); // rv[0] = flip_rec_boxf(info->fld[i]->b, ND_coord(n)); UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("b2c88nitm58fxzi8rh5vergvc"); // rv[0].LL.x = ND_coord(n).x + ls; UNSUPPORTED("4ivcuhn3xc40qws7sdw4ai8s5"); // rv[0].LL.y = ND_coord(n).y - (ND_ht(n) / 2); UNSUPPORTED("39yu1w8ymm77xe0plqbb1tlsu"); // rv[0].UR.x = ND_coord(n).x + rs; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("78963top1lc1j91gvr130yzlg"); // rv[0].UR.y = ND_coord(n).y + (ND_ht(n) / 2); UNSUPPORTED("9jd15eqfyfmga3uhuzmoiobm4"); // *kptr = 1; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2nk83e61yc1xqh0sxx13m5l1j"); // return side; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 exqpf0bds3z9eae52fqnqdv4f // static void gen_fields(GVJ_t * job, node_t * n, field_t * f) public static Object gen_fields(Object... arg) { UNSUPPORTED("alxnwxfpkfjmexy2v4wj8txsk"); // static void gen_fields(GVJ_t * job, node_t * n, field_t * f) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("676ly5o6s7hfka2a7xkzfm02t"); // pointf AF[2], coord; UNSUPPORTED("cofpjibrqirnx1jqt3qoptoa8"); // if (f->lp) { UNSUPPORTED("ecjyk9xlxeub85r4qs7onmaab"); // f->lp->pos = add_pointf(mid_pointf(f->b.LL, f->b.UR), ND_coord(n)); UNSUPPORTED("ayphvetcwpb3thkz5bz5xrpdy"); // emit_label(job, EMIT_NLABEL, f->lp); UNSUPPORTED("7wlqawgs50g2g4tdmjv67qq9a"); // penColor(job, n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("80cw1alior8ng7fmhmcmpy9ql"); // coord = ND_coord(n); UNSUPPORTED("7zbyipqbl6t75m71to6vrvnmq"); // for (i = 0; i < f->n_flds; i++) { UNSUPPORTED("72y5kehzju60vd6wi6h7d6r0v"); // if (i > 0) { UNSUPPORTED("xwrnxfxcwmxuxvjpfw1sb7lt"); // if (f->LR) { UNSUPPORTED("31wcrtlrn4wvlomxri9wdvmtj"); // AF[0] = f->fld[i]->b.LL; UNSUPPORTED("27hrv59ztxl0a8b8gttmk2ikp"); // AF[1].x = AF[0].x; UNSUPPORTED("1gqm7vpecmn340v1a2mskym8t"); // AF[1].y = f->fld[i]->b.UR.y; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("e1tqrqwt7bk5snpfcayjcbyzx"); // AF[1] = f->fld[i]->b.UR; UNSUPPORTED("9r6qdvxkhroix64em71xgwldt"); // AF[0].x = f->fld[i]->b.LL.x; UNSUPPORTED("vymaq435j4bsfggfjzzfiugk"); // AF[0].y = AF[1].y; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("9n3sn3rtnfiq76vd0067xvph3"); // AF[0] = add_pointf(AF[0], coord); UNSUPPORTED("1g9pox6kvg6c5nwlvug1i3dav"); // AF[1] = add_pointf(AF[1], coord); UNSUPPORTED("9nhrbbkzn6ygl91paz8e19asp"); // gvrender_polyline(job, AF, 2); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("56fhzogzd9i3iuh44c2jkxoaa"); // gen_fields(job, n, f->fld[i]); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3bum3y2gmowozskwp7e492wm7 // static void record_gencode(GVJ_t * job, node_t * n) public static Object record_gencode(Object... arg) { UNSUPPORTED("cpq4ylwlb0lwi7ibim51gndor"); // static void record_gencode(GVJ_t * job, node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("bzz7vodjegzgwxp8jzgkq3uti"); // boxf BF; UNSUPPORTED("en6q26cyrg17g6yd6el73b3ns"); // pointf AF[4]; UNSUPPORTED("b89hspuulkkzgmrj59tfy2fus"); // int style; UNSUPPORTED("30fmp9xlabtd67je318axlfiy"); // field_t *f; UNSUPPORTED("6ciz320nm1jdjxir808cycx3t"); // int doMap = (obj->url || obj->explicit_tooltip); UNSUPPORTED("3ml0gugucwlbwt5mbcdlymm8b"); // int filled; UNSUPPORTED("bhtcyodd9jiazat6sqhp9pm4x"); // char* clrs[2]; UNSUPPORTED("9xovezi85vdgw8han4h0wr87s"); // f = (field_t *) ND_shape_info(n); UNSUPPORTED("arohpr2hcj50a0nm6wiegz75n"); // BF = f->b; UNSUPPORTED("9dwww64wl2oaucxyyhoa2u5op"); // BF.LL.x += ND_coord(n).x; UNSUPPORTED("eqak8167f3whj617r6180val"); // BF.LL.y += ND_coord(n).y; UNSUPPORTED("3u5f15d4i1cs3igvot9majw8n"); // BF.UR.x += ND_coord(n).x; UNSUPPORTED("18gannqx4rafy1juoif3uog1p"); // BF.UR.y += ND_coord(n).y; UNSUPPORTED("7pfkga2nn8ltabo2ycvjgma6o"); // if (doMap && !(job->flags & (1<<2))) UNSUPPORTED("6e7g66eeo7n8h8mq556pt3xxy"); // gvrender_begin_anchor(job, UNSUPPORTED("8g7o4dsbwgp9ggtiktgt2m41t"); // obj->url, obj->tooltip, obj->target, UNSUPPORTED("c8tk2e711ojwsnar0y39a73cf"); // obj->id); UNSUPPORTED("6yjfupcwvts03fbmr493ea2ja"); // style = stylenode(job, n); UNSUPPORTED("5qxdje5wxqq1c9786htlyohkx"); // penColor(job, n); UNSUPPORTED("92hvfvrwzs8dy1vdgk97mu8rm"); // clrs[0] = NULL; UNSUPPORTED("a0xb2wsthoxt62j0aks4aht13"); // if (style & (1 << 0)) { UNSUPPORTED("64vz86w7mg90duu37ik1bcm8m"); // char* fillcolor = findFill (n); UNSUPPORTED("4xv0cmpfa4sol0pqmfumr0rnm"); // float frac; UNSUPPORTED("dily1m3rwbo5mniq7aneh3qhu"); // if (findStopColor (fillcolor, clrs, &frac)) { UNSUPPORTED("5m1l4f0yk2x1r9n00p7xoarhk"); // gvrender_set_fillcolor(job, clrs[0]); UNSUPPORTED("850qgpdnne96gxnh244hf2rh2"); // if (clrs[1]) UNSUPPORTED("m1ck996y4kjzra9yxa5gif68"); // gvrender_set_gradient_vals(job,clrs[1],late_int(n,N_gradientangle,0,0), frac); UNSUPPORTED("f3qa0cv737ikcre1vpqlkukio"); // else UNSUPPORTED("72n9vguy2n416qggkz5tpz279"); // gvrender_set_gradient_vals(job,"black",late_int(n,N_gradientangle,0,0), frac); UNSUPPORTED("5dn7m0lqq174sxj9ezr6p8anp"); // if (style & (1 << 1)) UNSUPPORTED("s4xfcz4il9k9jw0w0dh9lzpj"); // filled = 3; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("1ijl60mqfpjns1tss115yw4zp"); // filled = 2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("7ek7aftv8z293izx886r01oqm"); // filled = 1; UNSUPPORTED("pufcu1p86jfo891eaibok4yb"); // gvrender_set_fillcolor(job, fillcolor); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("53gluhbrz2oi6qw7sff0fb0hj"); // else filled = 0; UNSUPPORTED("a80jadmfy336hxiquc1baf16m"); // if ((*(ND_shape(n)->name)==*("Mrecord")&&!strcmp(ND_shape(n)->name,"Mrecord"))) UNSUPPORTED("6iazzglp38g7uxmnloiwk5ilq"); // style |= (1 << 2); UNSUPPORTED("gn97uo130dzjs4b5bnhnvlsq"); // if (((style) & ((1 << 2) | (1 << 3) | (127 << 24)))) { UNSUPPORTED("5rrbml0v0bc8c6x2ddgjh75p1"); // AF[0] = BF.LL; UNSUPPORTED("8ctty3poiybj8vyrg3fy6s4ju"); // AF[2] = BF.UR; UNSUPPORTED("bqdx8e632ko1pofmr5b91xpmh"); // AF[1].x = AF[2].x; UNSUPPORTED("7gb7yo735gfv67doxjnyl8av7"); // AF[1].y = AF[0].y; UNSUPPORTED("7w69hwqpw5l9f1rsaolr1ytmx"); // AF[3].x = AF[0].x; UNSUPPORTED("cg5ir4ssc1l9d4x56swq1rw0k"); // AF[3].y = AF[2].y; UNSUPPORTED("7gm0bhmoegfvu3uf7hnwfae67"); // round_corners(job, AF, 4, style, filled); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("5sf771cxqfrvdu2vzl3t1687e"); // gvrender_box(job, BF, filled); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9rksrkk1y26l0lgodpusjgg6r"); // gen_fields(job, n, f); UNSUPPORTED("ovdkxg0m1si7d9k8lawdnq"); // if (clrs[0]) free (clrs[0]); UNSUPPORTED("amrlpbo0f5svfvv7e9lzhfzj9"); // if (doMap) { UNSUPPORTED("4drs7w0v5mk7ys9aylmo5lnq8"); // if (job->flags & (1<<2)) UNSUPPORTED("12436nj34of615tb94t3cw2h0"); // gvrender_begin_anchor(job, UNSUPPORTED("2rwb38hipr5rxkwxfdzzwkdmy"); // obj->url, obj->tooltip, obj->target, UNSUPPORTED("4x188hxybttaubn1tt4tf710k"); // obj->id); UNSUPPORTED("e3o6yrnsv8lko5fql4f8a9gly"); // gvrender_end_anchor(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 7unoy39g6rhro6he8kci7oh4n // static shape_desc **UserShape //1 94927xsjiykujshql95ma97vb // static int N_UserShape //3 35sn43hohjmtc7uvkjrx6u7jt // shape_desc *find_user_shape(const char *name) public static Object find_user_shape(Object... arg) { UNSUPPORTED("dn82ttgu4gvl5nnzl8cu29o63"); // shape_desc *find_user_shape(const char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("757gomzjey403egq882hclnn0"); // if (UserShape) { UNSUPPORTED("30x6ygp0c6pjoq410g7sbl3lv"); // for (i = 0; i < N_UserShape; i++) { UNSUPPORTED("3ka0imewegdrxvt7cdk37mqgj"); // if ((*(UserShape[i]->name)==*(name)&&!strcmp(UserShape[i]->name,name))) UNSUPPORTED("5eh2ibmiqg7qx9z5fvoxfnfyo"); // return UserShape[i]; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("o68dp934ebg4cplebgc5hv4v"); // return NULL; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2eqlcx6fsiu46csoml6irvkib // static shape_desc *user_shape(char *name) public static Object user_shape(Object... arg) { UNSUPPORTED("7omo61zea17p3tb29vnkd0g5k"); // static shape_desc *user_shape(char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("7vbdsnuzb5k7dx9t6iq98bqvu"); // shape_desc *p; UNSUPPORTED("1cmwlrf177nfgj5tr0chf53vd"); // if ((p = find_user_shape(name))) UNSUPPORTED("68kasxgknec72r19lohbk6n3q"); // return p; UNSUPPORTED("61jp6r0u1tz0ytbo0pkbtibih"); // i = N_UserShape++; UNSUPPORTED("8m5c0jxj3trkdqlzd49ch4393"); // UserShape = ALLOC(N_UserShape, UserShape, shape_desc *); UNSUPPORTED("2ho6cxrgsfg5i9qgyksouth00"); // p = UserShape[i] = (shape_desc*)zmalloc(sizeof(shape_desc)); UNSUPPORTED("9mrvf7ijsvjzugxe3889n26wy"); // *p = Shapes[0]; UNSUPPORTED("do2hwp4zw8tlp7jj180uisyrb"); // p->name = strdup(name); UNSUPPORTED("2x9tm5f2pfgyebmuac8jgc2j9"); // if (Lib == NULL && !(*(name)==*("custom")&&!strcmp(name,"custom"))) { UNSUPPORTED("dmfmug44jzfjuimu3j7e9meux"); // agerr(AGWARN, "using %s for unknown shape %s\n", Shapes[0].name, UNSUPPORTED("54012lqhgsbg1obhzpdwdl35o"); // p->name); UNSUPPORTED("e7dpsukvk4pid9w6icote4v1b"); // p->usershape = 0; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("di2ydnxklvyghg80rycxyto6o"); // p->usershape = NOT(0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("91xduilalb406jjyw2g1i07th"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bmt148wdf0a7gslm7hmp043jy // shape_desc *bind_shape(char *name, node_t * np) public static shape_desc bind_shape(CString name, Agnode_s np) { ENTERING("bmt148wdf0a7gslm7hmp043jy","bind_shape"); try { shape_desc rv = null; CString str; str = safefile(agget(np, new CString("shapefile"))); /* If shapefile is defined and not epsf, set shape = custom */ if (str!=null && UNSUPPORTED("!(*(name)==*(\"epsf\")&&!strcmp(name,\"epsf\"))")!=null) name = new CString("custom"); if (N(name.charAt(0)=='c' && N(strcmp(name,new CString("custom"))))) { for (shape_desc ptr : Z.z().Shapes) { if ((N(strcmp(ptr.getCString("name"),name)))) { rv = ptr; break; } } } if (rv == null) UNSUPPORTED("7funuix8h6nhe6fqrjsec3kvk"); // rv = user_shape(name); return rv; } finally { LEAVING("bmt148wdf0a7gslm7hmp043jy","bind_shape"); } } //3 9n2zfdpzi6zgvnhcb3kz7nw1u // static boolean epsf_inside(inside_t * inside_context, pointf p) public static Object epsf_inside(Object... arg) { UNSUPPORTED("cq9kgtgzrb9sazy7y2fpt859x"); // static boolean epsf_inside(inside_t * inside_context, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7lh87lvufqsd73q9difg0omei"); // pointf P; UNSUPPORTED("9ikeydfq03qx7m09iencqsk36"); // double x2; UNSUPPORTED("d8oppi8gt9b4eaonkdgb7a54l"); // node_t *n = inside_context->s.n; UNSUPPORTED("823iiqtx9pt0gijqrohrd3zx7"); // P = ccwrotatepf(p, 90 * GD_rankdir(agraphof(n))); UNSUPPORTED("6uktb6bwhvglg7v3nygillmqx"); // x2 = ND_ht(n) / 2; UNSUPPORTED("3gki5ta81e51de9h4b5nvmoij"); // return ((P.y >= -x2) && (P.y <= x2) && (P.x >= -ND_lw(n)) UNSUPPORTED("3bzok6rkdjzamkk155dcqc8n2"); // && (P.x <= ND_rw(n))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6xv85fky6n2v03mt0dbvpz05e // static void epsf_gencode(GVJ_t * job, node_t * n) public static Object epsf_gencode(Object... arg) { UNSUPPORTED("4mtkoc5bwv0wkraw1xv9ptjlo"); // static void epsf_gencode(GVJ_t * job, node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("31b47kcwg6z2ds4cugdfq5hft"); // epsf_t *desc; UNSUPPORTED("6ciz320nm1jdjxir808cycx3t"); // int doMap = (obj->url || obj->explicit_tooltip); UNSUPPORTED("7wygkmvhwjn2l2fmpw5bj1o6g"); // desc = (epsf_t *) (ND_shape_info(n)); UNSUPPORTED("c98tv4jn3ode5so0mefrwcut7"); // if (!desc) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("7pfkga2nn8ltabo2ycvjgma6o"); // if (doMap && !(job->flags & (1<<2))) UNSUPPORTED("6e7g66eeo7n8h8mq556pt3xxy"); // gvrender_begin_anchor(job, UNSUPPORTED("8g7o4dsbwgp9ggtiktgt2m41t"); // obj->url, obj->tooltip, obj->target, UNSUPPORTED("c8tk2e711ojwsnar0y39a73cf"); // obj->id); UNSUPPORTED("4i1fd7rw5klkjsnyehf6v44a3"); // if (desc) UNSUPPORTED("8yueq6sa0qe98f00ykgedfrzl"); // fprintf(job->output_file, UNSUPPORTED("aqf73hied952lsirjjyf0hfr4"); // "%.5g %.5g translate newpath user_shape_%d\n", UNSUPPORTED("afxenk7cqa80e074cox3d04n5"); // ND_coord(n).x + desc->offset.x, UNSUPPORTED("57mec07ttst0x3aspieywssni"); // ND_coord(n).y + desc->offset.y, desc->macro_id); UNSUPPORTED("1bslo0pyyucx0zmdzt12sei6d"); // ND_label(n)->pos = ND_coord(n); UNSUPPORTED("8r8t0lgzzpigm1odig9a9yg1c"); // emit_label(job, EMIT_NLABEL, ND_label(n)); UNSUPPORTED("amrlpbo0f5svfvv7e9lzhfzj9"); // if (doMap) { UNSUPPORTED("4drs7w0v5mk7ys9aylmo5lnq8"); // if (job->flags & (1<<2)) UNSUPPORTED("12436nj34of615tb94t3cw2h0"); // gvrender_begin_anchor(job, UNSUPPORTED("2rwb38hipr5rxkwxfdzzwkdmy"); // obj->url, obj->tooltip, obj->target, UNSUPPORTED("4x188hxybttaubn1tt4tf710k"); // obj->id); UNSUPPORTED("e3o6yrnsv8lko5fql4f8a9gly"); // gvrender_end_anchor(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d0jsei60yky7c36q8bja8q58d // static pointf star_size (pointf sz0) public static Object star_size(Object... arg) { UNSUPPORTED("6bl2ntfn97yev6qvlwplor61o"); // static pointf star_size (pointf sz0) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3zlnn621zia9mss7z1ay24myc"); // pointf sz; UNSUPPORTED("5u7lf36burm76yokjuxgcd4tn"); // double r0, r, rx, ry; UNSUPPORTED("9ya7hg30u0pmebfvhy4ba5kfp"); // rx = sz0.x/(2*cos((M_PI/10.0))); UNSUPPORTED("y09869s34d94qtdcsuuz4mjy"); // ry = sz0.y/(sin((M_PI/10.0)) + sin((3*(M_PI/10.0)))); UNSUPPORTED("1qn336ppz1ubj5d9vmolmwhfa"); // r0 = MAX(rx,ry); UNSUPPORTED("99spig8n4dowh045zi2u054cf"); // r = (r0*sin((2*(2*(M_PI/10.0))))*cos((2*(M_PI/10.0))))/(cos((M_PI/10.0))*cos((2*(2*(M_PI/10.0))))); UNSUPPORTED("3h9e5okkzg8gzypvpzok96ikc"); // sz.x = 2*r*cos((M_PI/10.0)); UNSUPPORTED("19ba70prhdthsxh7ukqn07tw9"); // sz.y = r*(1 + sin((3*(M_PI/10.0)))); UNSUPPORTED("ban3s2canux7qwxava1n2e4v2"); // return sz; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a7r80ro5nb15ttgfpqwayycmf // static void star_vertices (pointf* vertices, pointf* bb) public static Object star_vertices(Object... arg) { UNSUPPORTED("8p40gvc5ocryzfeoybiuc0tzd"); // static void star_vertices (pointf* vertices, pointf* bb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("6ebg0h9irk3pcisrj710o7d79"); // pointf sz = *bb; UNSUPPORTED("daheewjo1ertfvnwnfdg2fcxr"); // double offset, a, aspect = (1 + sin((3*(M_PI/10.0))))/(2*cos((M_PI/10.0))); UNSUPPORTED("6ir3jujwrh6dpiqug6p2v3ttj"); // double r, r0, theta = (M_PI/10.0); UNSUPPORTED("3dcxsdbybxzvk7jsod9d2ubvm"); // /* Scale up width or height to required aspect ratio */ UNSUPPORTED("o422759cptua4yuo9guk3367"); // a = sz.y/sz.x; UNSUPPORTED("4czf228z5owjh6ew3vh3ugvdv"); // if (a > aspect) { UNSUPPORTED("97gq966jokpf07dc3wv6hgk45"); // sz.x = sz.y/aspect; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7dnql7ghevwkt7vxe0s4wndha"); // else if (a < aspect) { UNSUPPORTED("aeoxa8vdht2x8kc1xojdwlz3j"); // sz.y = sz.x*aspect; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a8zuo1xnr4jnza3araqzl5q43"); // /* for given sz, get radius */ UNSUPPORTED("5j3gmpqii05zcp2ncicxs2si"); // r = sz.x/(2*cos((M_PI/10.0))); UNSUPPORTED("214oro38cddbf9fk06d0m6duf"); // r0 = (r*cos((M_PI/10.0))*cos((2*(2*(M_PI/10.0)))))/(sin((2*(2*(M_PI/10.0))))*cos((2*(M_PI/10.0)))); UNSUPPORTED("4rot7vm0whb5r2oo8ne4pn1j4"); // /* offset is the y shift of circle center from bb center */ UNSUPPORTED("aa1u9d9ckbucmn1eyvyyijwkf"); // offset = (r*(1 - sin((3*(M_PI/10.0)))))/2; UNSUPPORTED("5zsqst1ddsdoai9yogpi1mnfl"); // for (i = 0; i < 10; i += 2) { UNSUPPORTED("dy5yk8kfoxfn3h4wby7vyciqz"); // vertices[i].x = r*cos(theta); UNSUPPORTED("a3uapptgvfngiztwa4vm4pbuu"); // vertices[i].y = r*sin(theta) - offset; UNSUPPORTED("7z0zntmu5ddcj6evxm9imjmv8"); // theta += (2*(M_PI/10.0)); UNSUPPORTED("da5vtvcsngi7wqtllzq8l190t"); // vertices[i+1].x = r0*cos(theta); UNSUPPORTED("9zr96c70zwnim4wjqf6zn7p68"); // vertices[i+1].y = r0*sin(theta) - offset; UNSUPPORTED("7z0zntmu5ddcj6evxm9imjmv8"); // theta += (2*(M_PI/10.0)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("58zowxx0q5742vxn8iad1i1xe"); // *bb = sz; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5sbhhjvptmhgl2v2zc12aemgv // static boolean star_inside(inside_t * inside_context, pointf p) public static Object star_inside(Object... arg) { UNSUPPORTED("2s46vczrfqrysl35qtk55j8dq"); // static boolean star_inside(inside_t * inside_context, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4ogz1m3q9xn7z7hiecjp98bmt"); // static node_t *lastn; /* last node argument */ UNSUPPORTED("ehzu6nig1i3kg2wnd7f7k9j5n"); // static polygon_t *poly; UNSUPPORTED("cy02ifkuodmjjlsu0kxnyjpoh"); // static int outp, sides; UNSUPPORTED("53wr032f7cpvhrjze3ml553bu"); // static pointf *vertex; UNSUPPORTED("c173x9hgi0epjtbq9crz665t6"); // static pointf O; /* point (0,0) */ UNSUPPORTED("4rtja2mn137n7wcxryrmo12ko"); // boxf *bp = inside_context->s.bp; UNSUPPORTED("d8oppi8gt9b4eaonkdgb7a54l"); // node_t *n = inside_context->s.n; UNSUPPORTED("eu67sekaddiid7bjwclyd9lpq"); // pointf P, Q, R; UNSUPPORTED("dk1ablxthh1rqusv958glmv1k"); // int i, outcnt; UNSUPPORTED("823iiqtx9pt0gijqrohrd3zx7"); // P = ccwrotatepf(p, 90 * GD_rankdir(agraphof(n))); UNSUPPORTED("9nc5qvx5xechvyre5wvhjqpjk"); // /* Quick test if port rectangle is target */ UNSUPPORTED("8ix20ei8mhm5e1r57koylhxmw"); // if (bp) { UNSUPPORTED("48wucupbjgeu51wy1djengl4f"); // boxf bbox = *bp; UNSUPPORTED("b87pzpk1bdd2rzscbmza3pxyu"); // return INSIDE(P, bbox); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8rl2cn4oxr94675yld5eohkie"); // if (n != lastn) { UNSUPPORTED("a7zf42vgzubszo05gyqjhr4bb"); // poly = (polygon_t *) ND_shape_info(n); UNSUPPORTED("2y1ov1roe3ma4wlkdj2w8r3sg"); // vertex = poly->vertices; UNSUPPORTED("98ormfm5j66dmbja3sdsx38az"); // sides = poly->sides; UNSUPPORTED("d41xba93s17axh19qsbhg0x8a"); // /* index to outer-periphery */ UNSUPPORTED("bmmroksk9aecg8ik0z1sxpzie"); // outp = (poly->peripheries - 1) * sides; UNSUPPORTED("47l17pa0edzmfnlr8ysqs0qh4"); // if (outp < 0) UNSUPPORTED("jyf75douzxhfzxfyrq3kes6e"); // outp = 0; UNSUPPORTED("dz5401vppes7iz7b0c6pzkge6"); // lastn = n; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4zcxdh0y0cit31t1myzksbyc"); // outcnt = 0; UNSUPPORTED("bs8ipj0v83bijiw6u6kpz14s1"); // for (i = 0; i < sides; i += 2) { UNSUPPORTED("cmwbnui44mpmy3kjz18pxp1cd"); // Q = vertex[i + outp]; UNSUPPORTED("4oudcajkxkcstsh2bvjaheadi"); // R = vertex[((i+4) % sides) + outp]; UNSUPPORTED("b4anc6i6r4xczgkhjcjudktb"); // if (!(same_side(P, O, Q, R))) { UNSUPPORTED("b291xvw4hm8vcmlaoxcl8dj94"); // outcnt++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3mpbcjrh8r4u6u2twxvyqx9v9"); // if (outcnt == 2) { UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8fwlqtemsmckleh6946lyd8mw"); // return NOT(0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 7nso0aprwwsa0je3az7h9nlue // static char *side_port[] = //3 8hx6dn19tost35djnvvnzh92y // static point cvtPt(pointf p, int rankdir) public static Object cvtPt(Object... arg) { UNSUPPORTED("eid0v5e8f2edm1ehyq1d0zgow"); // static point cvtPt(pointf p, int rankdir) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6nl26joj7b7zxkfry5bt8z27d"); // pointf q = { 0, 0 }; UNSUPPORTED("6em4lvgp5tqcu7z93czp75mqr"); // point Q; UNSUPPORTED("7gnjhunyvxphjgrfh8byey4ch"); // switch (rankdir) { UNSUPPORTED("70xjc0sbkjvexfar5luzibcgf"); // case 0: UNSUPPORTED("a3bxar1i984lfbgqyiie54sqq"); // q = p; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("4u5xz2u3urj13y0aw30fdyup5"); // case 2: UNSUPPORTED("drh1t5heo8w8z199n0vydnon7"); // q.x = p.x; UNSUPPORTED("1sp6xbp6wduyl3r6q3ki03lj"); // q.y = -p.y; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("d0gk15gzj4wz8nv54zbr285hm"); // case 1: UNSUPPORTED("aqxuqmimmi2id7ukk2b64x1in"); // q.y = p.x; UNSUPPORTED("djyedvti0u3rb22lyp3mp7i8n"); // q.x = -p.y; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("33l7a58zp8vj6fuliwdkk2nkn"); // case 3: UNSUPPORTED("aqxuqmimmi2id7ukk2b64x1in"); // q.y = p.x; UNSUPPORTED("7d33c84ojx2qc6awisfs88pf5"); // q.x = p.y; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5da6w8o8qgq5rx9tk3asaefvi"); // PF2P(q, Q); UNSUPPORTED("11g52me0fwkpxm5crnv4uqfgr"); // return Q; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cmt4wr13jgcd9ihg14t972aam // static char *closestSide(node_t * n, node_t * other, port * oldport) public static Object closestSide(Object... arg) { UNSUPPORTED("7nx8rmo64f0qpalnfdir13szh"); // static char *closestSide(node_t * n, node_t * other, port * oldport) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("6yudcsapgh1wsfc2gfszyhv9j"); // int rkd = GD_rankdir(agraphof(n)->root); UNSUPPORTED("7f1eg16y5dgh2o3bgeyia19n3"); // point p = { 0, 0 }; UNSUPPORTED("dc41k2vc95rcs2d9fsi2z8wem"); // point pt = cvtPt(ND_coord(n), rkd); UNSUPPORTED("bk9nxen9ygr1a03ygu4cdx4rj"); // point opt = cvtPt(ND_coord(other), rkd); UNSUPPORTED("4oio8elmu3g3k7i9rcsme7msk"); // int sides = oldport->side; UNSUPPORTED("2lc32htm5f42afmf30kcuxspa"); // char *rv = NULL; UNSUPPORTED("5myu0a4ngtwkfxidkfff5h3ci"); // int i, d, mind = 0; UNSUPPORTED("42bedbxabt6b225h992k8rfpa"); // if ((sides == 0) || (sides == ((1<<2) | (1<<0) | (1<<3) | (1<<1)))) UNSUPPORTED("85378rh1rr2g6iscv3ocyh4ky"); // return rv; /* use center */ UNSUPPORTED("9qqot69wqtq8rkizbwz0f4vu"); // if (oldport->bp) { UNSUPPORTED("ckp5i3rvsjcc5f9xk025kpv81"); // b = *oldport->bp; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("ek9a7u2yx8w4r9x5k7somxuup"); // if (GD_flip(agraphof(n))) { UNSUPPORTED("5m0qxjiybs5ei0xyt8rztghk5"); // b.UR.x = ND_ht(n) / 2; UNSUPPORTED("1i4y4dgrig36gh0dq2jn8kde"); // b.LL.x = -b.UR.x; UNSUPPORTED("7luuqd8n7bpffoa8v27jp7tn3"); // b.UR.y = ND_lw(n); UNSUPPORTED("922vazdrkwhoxxy4yw5axu6i7"); // b.LL.y = -b.UR.y; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("2kqd0a7y22hequs0ypjfw2ltw"); // b.UR.y = ND_ht(n) / 2; UNSUPPORTED("922vazdrkwhoxxy4yw5axu6i7"); // b.LL.y = -b.UR.y; UNSUPPORTED("59beisnsabbp6eavnuxrqch2d"); // b.UR.x = ND_lw(n); UNSUPPORTED("1i4y4dgrig36gh0dq2jn8kde"); // b.LL.x = -b.UR.x; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a2n8aqfq0cqpx8elstmfn9oq6"); // for (i = 0; i < 4; i++) { UNSUPPORTED("bs33qxg9liuq4cqnxgjcpo2pp"); // if ((sides & (1 << i)) == 0) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("9bo1itj979wxduxtvlcn8uetb"); // switch (i) { UNSUPPORTED("46lzlkypfilrge90rkaiveuyb"); // case 0: UNSUPPORTED("c2y7pxvutf20cxm0z3nfgoc3k"); // p.y = b.LL.y; UNSUPPORTED("2vekwappcfvbfvrjvig9oqlmp"); // p.x = (b.LL.x + b.UR.x) / 2; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("2o83im06dulx11wjpy469gkoa"); // case 1: UNSUPPORTED("6ertkjhcjyaq08zsm3g294l4b"); // p.x = b.UR.x; UNSUPPORTED("3jxafko9fvkftv1vxjstl9gr5"); // p.y = (b.LL.y + b.UR.y) / 2; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("b8vgbvwzllfs4lrqmmqyr1spk"); // case 2: UNSUPPORTED("7gucyzlkpil4bfg1hpst17k3d"); // p.y = b.UR.y; UNSUPPORTED("2vekwappcfvbfvrjvig9oqlmp"); // p.x = (b.LL.x + b.UR.x) / 2; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1640m8as34e90xhvvtl877cmo"); // case 3: UNSUPPORTED("3hd28hpejkfur36krdelc2enk"); // p.x = b.LL.x; UNSUPPORTED("3jxafko9fvkftv1vxjstl9gr5"); // p.y = (b.LL.y + b.UR.y) / 2; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7lafbtu79v445pj4z8m4brkmm"); // p.x += pt.x; UNSUPPORTED("ef9oyp0p6aqlpy8atlw8pjnj2"); // p.y += pt.y; UNSUPPORTED("q27stk74ksja0hoiobb8mpfg"); // d = DIST2(p, opt); UNSUPPORTED("77inwlax2kjikvjehyh67g2v1"); // if (!rv || (d < mind)) { UNSUPPORTED("e4k01qtlw2t5jf3hpn1bmxivu"); // mind = d; UNSUPPORTED("cghq7r095a9g9ix9m1bfx0niw"); // rv = side_port[i]; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ckbg1dyu9jzx7g0c9dbriez7r // port resolvePort(node_t * n, node_t * other, port * oldport) public static ST_port resolvePort(Agnode_s n, Agnode_s other, port oldport) { // WARNING!! STRUCT return resolvePort_w_(n, other, oldport).copy(); } private static ST_port resolvePort_w_(Agnode_s n, Agnode_s other, port oldport) { ENTERING("ckbg1dyu9jzx7g0c9dbriez7r","resolvePort"); try { UNSUPPORTED("1aa44pvk8su341rug2x5h5h9o"); // port resolvePort(node_t * n, node_t * other, port * oldport) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9ricxd1wv1am78xxjvd40ki5e"); // port rv; UNSUPPORTED("jdbaecwphvo5avabk6l4xiy3"); // char *compass = closestSide(n, other, oldport); UNSUPPORTED("afwu4bhodfj1avn0vvvmp2j5n"); // /* transfer name pointer; all other necessary fields will be regenerated */ UNSUPPORTED("102hdormt85y9xfjr5sy321jr"); // rv.name = oldport->name; UNSUPPORTED("f4v5e5pyzu6udom6g40aku41y"); // compassPort(n, oldport->bp, &rv, compass, oldport->side, NULL); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("ckbg1dyu9jzx7g0c9dbriez7r","resolvePort"); } } //3 9ttd9vkih0mogy1ps3khfjum6 // void resolvePorts(edge_t * e) public static Object resolvePorts(Object... arg) { UNSUPPORTED("ceen1bdr2y10gl9g3stj9dq13"); // void resolvePorts(edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1avf6c49h37pc64khn45b3zla"); // if (ED_tail_port(e).dyna) UNSUPPORTED("bjgkohc8n22pf9yf5anfmfjdl"); // ED_tail_port(e) = UNSUPPORTED("c5phu7zavynmooq4ykt058d6t"); // resolvePort(agtail(e), aghead(e), &ED_tail_port(e)); UNSUPPORTED("56ff4qr7o1xsl73k68f4kjmd1"); // if (ED_head_port(e).dyna) UNSUPPORTED("d4aylrk5xwagx7so633xn35ug"); // ED_head_port(e) = UNSUPPORTED("ctvcevp7oejtitu1hunh3yj02"); // resolvePort(aghead(e), agtail(e), &ED_head_port(e)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/splines__c.java000066400000000000000000002744341312650303100222530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.cgraph.obj__c.agraphof; import static gen.lib.common.arrows__c.arrowEndClip; import static gen.lib.common.arrows__c.arrowStartClip; import static gen.lib.common.arrows__c.arrow_flags; import static gen.lib.common.emit__c.update_bb_bz; import static gen.lib.common.memory__c.zmalloc; import static gen.lib.common.shapes__c.resolvePort; import static gen.lib.common.utils__c.Bezier; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.ABS; import static smetana.core.Macro.ALLOC; import static smetana.core.Macro.APPROXEQPT; import static smetana.core.Macro.ED_edge_type; import static smetana.core.Macro.ED_head_port; import static smetana.core.Macro.ED_label; import static smetana.core.Macro.ED_spl; import static smetana.core.Macro.ED_tail_port; import static smetana.core.Macro.ED_to_orig; import static smetana.core.Macro.GD_bb; import static smetana.core.Macro.GD_flip; import static smetana.core.Macro.MAX; import static smetana.core.Macro.MILLIPOINT; import static smetana.core.Macro.MIN; import static smetana.core.Macro.N; import static smetana.core.Macro.ND_coord; import static smetana.core.Macro.ND_node_type; import static smetana.core.Macro.ND_order; import static smetana.core.Macro.ND_rank; import static smetana.core.Macro.ND_rw; import static smetana.core.Macro.ND_shape; import static smetana.core.Macro.NOT; import static smetana.core.Macro.UNSUPPORTED; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.ST_boxf; import h.ST_pointf; import h.bezier; import h.boxf; import h.inside_t; import h.path; import h.pathend_t; import h.pointf; import h.splineInfo; import h.splines; import h.textlabel_t; import smetana.core.CFunction; import smetana.core.JUtils; import smetana.core.MutableDouble; import smetana.core.__array_of_struct__; import smetana.core.__ptr__; import smetana.core.__struct__; public class splines__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6izm0fbkejw7odmiw4zaw1ycp // static void arrow_clip(edge_t * fe, node_t * hn, pointf * ps, int *startp, int *endp, bezier * spl, splineInfo * info) public static void arrow_clip(Agedge_s fe, Agnode_s hn, __ptr__ ps, int startp[], int endp[], bezier spl, __ptr__ info) { ENTERING("6izm0fbkejw7odmiw4zaw1ycp","arrow_clip"); try { Agedge_s e; int i; boolean j; int sflag[] = new int[]{0}; int eflag[] = new int[]{0}; for (e = fe; ED_to_orig(e)!=null; e = ED_to_orig(e)); if (info.getBoolean("ignoreSwap")) j = false; else j = (Boolean) info.call("swapEnds", e); arrow_flags(e, sflag, eflag); if ((Boolean) info.call("splineMerge", hn)) eflag[0] = 0; if ((Boolean) info.call("splineMerge", agtail(fe))) sflag[0] = 0; /* swap the two ends */ if (j) { i = sflag[0]; sflag[0] = eflag[0]; eflag[0] = i; } if (info.getBoolean("isOrtho")) { UNSUPPORTED("7a3lmojyfh13d6shkviuogx2c"); // if (eflag || sflag) UNSUPPORTED("dzbrwr2ulubtjkbd8j2o4yyov"); // arrowOrthoClip(e, ps, *startp, *endp, spl, sflag, eflag); } else { if (sflag[0]!=0) startp[0] = arrowStartClip(e, ps, startp[0], endp[0], spl, sflag[0]); if (eflag[0]!=0) endp[0] = arrowEndClip(e, ps, startp[0], endp[0], spl, eflag[0]); } } finally { LEAVING("6izm0fbkejw7odmiw4zaw1ycp","arrow_clip"); } } //3 q4t1ywnk3wm1vyh5seoj7xye // void bezier_clip(inside_t * inside_context, boolean(*inside) (inside_t * inside_context, pointf p), pointf * sp, boolean left_inside) public static void bezier_clip(__ptr__ inside_context, __ptr__ inside, __array_of_struct__ sp, boolean left_inside) { ENTERING("q4t1ywnk3wm1vyh5seoj7xye","bezier_clip"); try { final __array_of_struct__ seg = __array_of_struct__.malloc(pointf.class, 4); final __array_of_struct__ best = __array_of_struct__.malloc(pointf.class, 4); final __struct__ pt = JUtils.from(pointf.class), opt = JUtils.from(pointf.class); __ptr__ left, right; final MutableDouble low = new MutableDouble(0), high = new MutableDouble(0); double t; MutableDouble idir, odir; boolean found; int i; if (left_inside) { left = null; right = (pointf) seg.asPtr(); pt.___(sp.plus(0).getStruct()); idir = low; odir = high; } else { left = (pointf) seg.asPtr(); right = null; pt.___(sp.plus(3).getStruct()); idir = high; odir = low; } found = false; low.setValue(0.0); high.setValue(1.0); do { opt.___(pt); t = (high.getValue() + low.getValue()) / 2.0; pt.___(Bezier(sp, 3, t, left, right)); if ((Boolean) ((CFunction)inside).exe(inside_context, pt)) { idir.setValue(t); } else { for (i = 0; i < 4; i++) best.plus(i).setStruct(seg.plus(i).getStruct()); found = NOT(false); odir.setValue(t); } } while (ABS(opt.getDouble("x") - pt.getDouble("x")) > .5 || ABS(opt.getDouble("y") - pt.getDouble("y")) > .5); if (found) for (i = 0; i < 4; i++) sp.plus(i).setStruct(best.plus(i).getStruct()); else for (i = 0; i < 4; i++) sp.plus(i).setStruct(seg.plus(i).getStruct()); } finally { LEAVING("q4t1ywnk3wm1vyh5seoj7xye","bezier_clip"); } } //3 1fjkj1ydhtlf13pqj5r041orq // static void shape_clip0(inside_t * inside_context, node_t * n, pointf curve[4], boolean left_inside) public static void shape_clip0(__ptr__ inside_context, Agnode_s n, __ptr__ curve, boolean left_inside) { ENTERING("1fjkj1ydhtlf13pqj5r041orq","shape_clip0"); try { int i; double save_real_size; final __array_of_struct__ c = __array_of_struct__.malloc(pointf.class, 4); save_real_size = ND_rw(n); for (i = 0; i < 4; i++) { c.plus(i).setDouble("x", curve.plus(i).getDouble("x") - ND_coord(n).getDouble("x")); c.plus(i).setDouble("y", curve.plus(i).getDouble("y") - ND_coord(n).getDouble("y")); } bezier_clip(inside_context, ND_shape(n).getPtr("fns").getPtr("insidefn"), c, left_inside); for (i = 0; i < 4; i++) { curve.plus(i).setDouble("x", c.plus(i).getDouble("x") + ND_coord(n).getDouble("x")); curve.plus(i).setDouble("y", c.plus(i).getDouble("y") + ND_coord(n).getDouble("y")); } ND_rw(n, save_real_size); } finally { LEAVING("1fjkj1ydhtlf13pqj5r041orq","shape_clip0"); } } //3 5m4auahepda0ug3e1o05gm0kf // void shape_clip(node_t * n, pointf curve[4]) public static Object shape_clip(Object... arg) { UNSUPPORTED("14nvh1wyusdizrbkaqswyz6a3"); // void shape_clip(node_t * n, pointf curve[4]) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9htbadryixdqglsfxbj66m3na"); // double save_real_size; UNSUPPORTED("9hp0vh92flvlgoaxmzp4h6uaq"); // boolean left_inside; UNSUPPORTED("a3jcleu2wok75rpalgfjt6tte"); // pointf c; UNSUPPORTED("114lbsab8twbq15luo36j31q2"); // inside_t inside_context; UNSUPPORTED("eua5l3utehs8yu615w4iusufv"); // if (ND_shape(n) == NULL || ND_shape(n)->fns->insidefn == NULL) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("a8yyudcgedtaoi8ey9sje90ph"); // inside_context.s.n = n; UNSUPPORTED("3y9eccm2tmdyx34ew24hitfqq"); // inside_context.s.bp = NULL; UNSUPPORTED("27aelctxo5teujbhkeu9x73hp"); // save_real_size = ND_rw(n); UNSUPPORTED("21zlezol1pqversb7b7rso1hl"); // c.x = curve[0].x - ND_coord(n).x; UNSUPPORTED("dxn2z9gn2x96x83fwcba9bdme"); // c.y = curve[0].y - ND_coord(n).y; UNSUPPORTED("5o23jq82y9dhpry5f9u9umk5d"); // left_inside = ND_shape(n)->fns->insidefn(&inside_context, c); UNSUPPORTED("9q38fqg00ynddr6952dvaz6n3"); // ND_rw(n) = save_real_size; UNSUPPORTED("w5x58kft1tdd1d2ae83yfrej"); // shape_clip0(&inside_context, n, curve, left_inside); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bdirexg1qdtophlh0ofjvsmj7 // bezier *new_spline(edge_t * e, int sz) public static bezier new_spline(Agedge_s e, int sz) { ENTERING("bdirexg1qdtophlh0ofjvsmj7","new_spline"); try { bezier rv; while (ED_edge_type(e) != 0) e = ED_to_orig(e); if (ED_spl(e) == null) ED_spl(e, zmalloc(sizeof(splines.class))); ED_spl(e).setPtr("list", ALLOC(ED_spl(e).getInt("size") + 1, ED_spl(e).getPtr("list"), bezier.class)); rv = (bezier) ED_spl(e).getPtr("list").plus(ED_spl(e).getInt("size")); ED_spl(e).setInt("size", ED_spl(e).getInt("size")+1); rv.setPtr("list", zmalloc(sizeof(pointf.class, sz))); rv.setInt("size", sz); rv.setInt("sflag", 0); rv.setInt("eflag", 0); rv.getStruct("sp").setDouble("x", 0); rv.getStruct("sp").setDouble("y", 0); rv.getStruct("ep").setDouble("x", 0); rv.getStruct("ep").setDouble("y", 0); return rv; } finally { LEAVING("bdirexg1qdtophlh0ofjvsmj7","new_spline"); } } //3 duednxyuvf6xrff752uuv620f // void clip_and_install(edge_t * fe, node_t * hn, pointf * ps, int pn, splineInfo * info) public static void clip_and_install(Agedge_s fe, Agnode_s hn, __ptr__ ps, int pn, __ptr__ info) { ENTERING("duednxyuvf6xrff752uuv620f","clip_and_install"); try { final __struct__ p2 = JUtils.from(pointf.class); bezier newspl; Agnode_s tn; int start[] = new int[] {0}; int end[] = new int[] {0}; int i, clipTail=0, clipHead=0; Agraph_s g; Agedge_s orig; boxf tbox=null, hbox=null; final __struct__ inside_context = JUtils.from(inside_t.class); tn = agtail(fe); g = agraphof(tn); newspl = new_spline(fe, pn); for (orig = fe; ED_edge_type(orig) != 0; orig = ED_to_orig(orig)); /* may be a reversed flat edge */ if (N(info.getBoolean("ignoreSwap")) && (ND_rank(tn) == ND_rank(hn)) && (ND_order(tn) > ND_order(hn))) { Agnode_s tmp; tmp = hn; hn = tn; tn = tmp; } if (EQ(tn, agtail(orig))) { clipTail = ED_tail_port(orig).getInt("clip"); clipHead = ED_head_port(orig).getInt("clip"); tbox = (boxf) ED_tail_port(orig).getPtr("bp"); hbox = (boxf) ED_head_port(orig).getPtr("bp"); } else { /* fe and orig are reversed */ clipTail = ED_head_port(orig).getInt("clip"); clipHead = ED_tail_port(orig).getInt("clip"); hbox = (boxf) ED_tail_port(orig).getPtr("bp"); tbox = (boxf) ED_head_port(orig).getPtr("bp"); } /* spline may be interior to node */ if(clipHead!=0 && ND_shape(tn)!=null && ND_shape(tn).getPtr("fns").getPtr("insidefn")!=null) { inside_context.setPtr("s.n", tn); inside_context.setPtr("s.bp", tbox); for (start[0] = 0; start[0] < pn - 4; start[0] += 3) { p2.setDouble("x", ps.plus(start[0] + 3).getDouble("x") - ND_coord(tn).getDouble("x")); p2.setDouble("y", ps.plus(start[0] + 3).getDouble("y") - ND_coord(tn).getDouble("y")); if (((Boolean)ND_shape(tn).getPtr("fns").call("insidefn", inside_context.amp(), p2)) == false) break; } shape_clip0(inside_context.amp(), tn, ps.plus(start[0]), NOT(false)); } else start[0] = 0; if(clipHead!=0 && ND_shape(hn)!=null && ND_shape(hn).getPtr("fns").getPtr("insidefn")!=null) { inside_context.setPtr("s.n", hn); inside_context.setPtr("s.bp", hbox); for (end[0] = pn - 4; end[0] > 0; end[0] -= 3) { p2.setDouble("x", ps.plus(end[0]).getDouble("x") - ND_coord(hn).getDouble("x")); p2.setDouble("y", ps.plus(end[0]).getDouble("y") - ND_coord(hn).getDouble("y")); if (((Boolean)ND_shape(hn).getPtr("fns").call("insidefn", inside_context.amp(), p2)) == false) break; } shape_clip0(inside_context.amp(), hn, ps.plus(end[0]), false); } else end[0] = pn - 4; for (; start[0] < pn - 4; start[0] += 3) if (N(APPROXEQPT(ps.plus(start[0]).getPtr(), ps.plus(start[0] + 3).getPtr(), MILLIPOINT))) break; for (; end[0] > 0; end[0] -= 3) if (N(APPROXEQPT(ps.plus(end[0]).getPtr(), ps.plus(end[0] + 3).getPtr(), MILLIPOINT))) break; arrow_clip(fe, hn, ps, start, end, newspl, info); for (i = start[0]; i < end[0] + 4; ) { final __array_of_struct__ cp = __array_of_struct__.malloc(pointf.class, 4); newspl.getArrayOfPtr("list").plus(i - start[0]).setStruct(ps.plus(i).getStruct()); cp.plus(0).setStruct(ps.plus(i).getStruct()); i++; if ( i >= end[0] + 4) break; newspl.getArrayOfPtr("list").plus(i - start[0]).setStruct(ps.plus(i).getStruct()); cp.plus(1).setStruct(ps.plus(i).getStruct()); i++; newspl.getArrayOfPtr("list").plus(i - start[0]).setStruct(ps.plus(i).getStruct()); cp.plus(2).setStruct(ps.plus(i).getStruct()); i++; cp.plus(3).setStruct(ps.plus(i).getStruct()); update_bb_bz(GD_bb(g).amp(), cp); } newspl.setInt("size", end[0] - start[0] + 4); } finally { LEAVING("duednxyuvf6xrff752uuv620f","clip_and_install"); } } //3 25ndy15kghfrogsv0b0o0xkgv // static double conc_slope(node_t* n) public static double conc_slope(Agnode_s n) { ENTERING("25ndy15kghfrogsv0b0o0xkgv","conc_slope"); try { UNSUPPORTED("e388y3vtrp8f6spgh9q4wx37w"); // static double UNSUPPORTED("4yxpid2dxvb387487trn1umlw"); // conc_slope(node_t* n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9669xuley9dxylr00ex9kbzg7"); // double s_in, s_out, m_in, m_out; UNSUPPORTED("wfd0ht8utdwwqctf47l4dtrz"); // int cnt_in, cnt_out; UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("apjf2mf9d7qj0eo9o2x5yli2e"); // s_in = s_out = 0.0; UNSUPPORTED("7mc6shwmvz25mz9inwj97lqk6"); // for (cnt_in = 0; (e = ND_in(n).list[cnt_in]); cnt_in++) UNSUPPORTED("cb1h5cx7oxhtdkm5l0k6qrx2z"); // s_in += ND_coord(agtail(e)).x; UNSUPPORTED("hjfqfqmtdqdrp9z80ebrpthm"); // for (cnt_out = 0; (e = ND_out(n).list[cnt_out]); cnt_out++) UNSUPPORTED("2iidrr9ljv8ap9s2g6gj3q1o3"); // s_out += ND_coord(aghead(e)).x; UNSUPPORTED("2yeio9xc9oorju7qqnhilwujx"); // p.x = ND_coord(n).x - (s_in / cnt_in); UNSUPPORTED("87jzl9isj7w9kgyr05inw33s5"); // p.y = ND_coord(n).y - ND_coord(agtail(ND_in(n).list[0])).y; UNSUPPORTED("6y2pc9af2xxdqajbpykvca9eg"); // m_in = atan2(p.y, p.x); UNSUPPORTED("ruwz5svpk33ucfgs4wx0xolm"); // p.x = (s_out / cnt_out) - ND_coord(n).x; UNSUPPORTED("8vif8c37lbo7ww4vwfrcxgpmr"); // p.y = ND_coord(aghead(ND_out(n).list[0])).y - ND_coord(n).y; UNSUPPORTED("ez8z3gbteryfhktbqkwmzhhzs"); // m_out = atan2(p.y, p.x); UNSUPPORTED("ej1ftaglexa47x955elb88yh2"); // return ((m_in + m_out) / 2.0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("25ndy15kghfrogsv0b0o0xkgv","conc_slope"); } } //3 egq4f4tmy1dhyj6jpj92r7xhu // void add_box(path * P, boxf b) public static void add_box(path P, final ST_boxf b) { // WARNING!! STRUCT add_box_w_(P, b.copy()); } private static void add_box_w_(path P, final ST_boxf b) { ENTERING("egq4f4tmy1dhyj6jpj92r7xhu","add_box"); try { if (b.LL.x < b.UR.x && b.LL.y < b.UR.y) { P.getArrayOfPtr("boxes").plus(P.getInt("nbox")).setStruct(b); P.setInt("nbox", P.getInt("nbox")+1); } } finally { LEAVING("egq4f4tmy1dhyj6jpj92r7xhu","add_box"); } } //3 7pc43ifcw5g56449d101qf590 // void beginpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge) public static void beginpath(path P, Agedge_s e, int et, pathend_t endp, boolean merge) { ENTERING("7pc43ifcw5g56449d101qf590","beginpath"); try { int side, mask; Agnode_s n; CFunction pboxfn; n = agtail(e); if (ED_tail_port(e).dyna!=0) ED_tail_port(e, resolvePort(agtail(e), aghead(e), ED_tail_port(e).amp())); if (ND_shape(n)!=null) pboxfn = (CFunction) ND_shape(n).getPtr("fns").getPtr("pboxfn"); else pboxfn = null; P.getStruct("start").setStruct("p", add_pointf(ND_coord(n), ED_tail_port(e).getStruct("p"))); if (merge) { /*P->start.theta = - M_PI / 2; */ P.getStruct("start").setDouble("theta", conc_slope(agtail(e))); P.getStruct("start").setBoolean("constrained", NOT(false)); } else { if (ED_tail_port(e).getBoolean("constrained")) { P.getStruct("start").setDouble("theta", ED_tail_port(e).getDouble("theta")); P.getStruct("start").setBoolean("constrained", NOT(false)); } else P.getStruct("start").setBoolean("constrained", false); } P.setInt("nbox", 0); P.setPtr("data", e); endp.setStruct("np", P.getStruct("start").getStruct("p")); if ((et == 1) && (ND_node_type(n) == 0) && ((side = ED_tail_port(e).side)!=0)) { UNSUPPORTED("a7lrhlfwr0y475aqjk6abhb3b"); // edge_t* orig; UNSUPPORTED("ew7nyfe712nsiphifeztwxfop"); // boxf b0, b = endp->nb; UNSUPPORTED("ait3wtnnvt134z2k87lvhq4ek"); // if (side & (1<<2)) { UNSUPPORTED("1r4lctdj9z1ivlz3uqpcj1yzf"); // endp->sidemask = (1<<2); UNSUPPORTED("arq09sf82lsjuxwfkesprcrcv"); // if (P->start.p.x < ND_coord(n).x) { /* go left */ UNSUPPORTED("bj4z8gwgs6j5fax8k6l3u6mv3"); // b0.LL.x = b.LL.x - 1; UNSUPPORTED("54rmdm0xwy361tjs4aj6cv401"); // /* b0.LL.y = ND_coord(n).y + HT2(n); */ UNSUPPORTED("11ax5pxz4q2uh0nzsrs1qs7ck"); // b0.LL.y = P->start.p.y; UNSUPPORTED("5xsapgq04e1hslq2835500q6k"); // b0.UR.x = b.UR.x; UNSUPPORTED("9ro8mx52kgsoogvlgfubgn4p0"); // b0.UR.y = ND_coord(n).y + (ND_ht(n)/2) + GD_ranksep(agraphof(n))/2; UNSUPPORTED("6p2nw1nh0qwn5ro3dltmd6w6c"); // b.UR.x = ND_coord(n).x - ND_lw(n) - (2-2); UNSUPPORTED("czvxm3loj0won7ye2b3xrfbv4"); // b.UR.y = b0.LL.y; UNSUPPORTED("1f4u492auf4ku7ik170e86iy3"); // b.LL.y = ND_coord(n).y - (ND_ht(n)/2); UNSUPPORTED("w9wsmby4dawn9npux1jrd9gl"); // b.LL.x -= 1; UNSUPPORTED("2f8usay82b128dq0sk4aqzw3h"); // endp->boxes[0] = b0; UNSUPPORTED("2diqdwueoy5oizl5kmbz6uyi8"); // endp->boxes[1] = b; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("7sk0msbospwpwupzwpu8v87qt"); // b0.LL.x = b.LL.x; UNSUPPORTED("11ax5pxz4q2uh0nzsrs1qs7ck"); // b0.LL.y = P->start.p.y; UNSUPPORTED("54rmdm0xwy361tjs4aj6cv401"); // /* b0.LL.y = ND_coord(n).y + HT2(n); */ UNSUPPORTED("4e5ydpfmxn1wuhnp78arn3f9x"); // b0.UR.x = b.UR.x+1; UNSUPPORTED("9ro8mx52kgsoogvlgfubgn4p0"); // b0.UR.y = ND_coord(n).y + (ND_ht(n)/2) + GD_ranksep(agraphof(n))/2; UNSUPPORTED("3f26r03ydc7aq52vcqpgxawgy"); // b.LL.x = ND_coord(n).x + ND_rw(n) + (2-2); UNSUPPORTED("czvxm3loj0won7ye2b3xrfbv4"); // b.UR.y = b0.LL.y; UNSUPPORTED("1f4u492auf4ku7ik170e86iy3"); // b.LL.y = ND_coord(n).y - (ND_ht(n)/2); UNSUPPORTED("bqk56pohk8hpgn91lv4m2zkv0"); // b.UR.x += 1; UNSUPPORTED("2f8usay82b128dq0sk4aqzw3h"); // endp->boxes[0] = b0; UNSUPPORTED("2diqdwueoy5oizl5kmbz6uyi8"); // endp->boxes[1] = b; UNSUPPORTED("196ta4n5nsqizd83y6oo7z8a2"); // } UNSUPPORTED("b7lioq6g7moe5otds46c8hrc"); // P->start.p.y += 1; UNSUPPORTED("4v7mmisc358r5tpq14qp4dx0f"); // endp->boxn = 2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3s4re3z7asydnnotdylt94t1d"); // else if (side & (1<<0)) { UNSUPPORTED("auefgwb39x5hzqqc9b1zgl239"); // endp->sidemask = (1<<0); UNSUPPORTED("ax7mx0s11g0pgcgb8iopcu82a"); // b.UR.y = MAX(b.UR.y,P->start.p.y); UNSUPPORTED("esv3oinoscr6zht0kce49o450"); // endp->boxes[0] = b; UNSUPPORTED("3hptqfzzuz4dlsc8ejk1ynxt9"); // endp->boxn = 1; UNSUPPORTED("8pyl2559euuaxrntsyzj1ve8w"); // P->start.p.y -= 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bn3pwhefgp4zdatx3g60lj0ou"); // else if (side & (1<<3)) { UNSUPPORTED("2lmjkw07sr4x9a3xxrcb3yj07"); // endp->sidemask = (1<<3); UNSUPPORTED("bmdw7h7pzwkfbuzhxnsh4vbsm"); // b.UR.x = P->start.p.x; UNSUPPORTED("c86scga1j3ar95pgqvemnzrui"); // b.LL.y = ND_coord(n).y - (ND_ht(n)/2); UNSUPPORTED("cdhdxsyg42tregieb2l7kz8n"); // b.UR.y = P->start.p.y; UNSUPPORTED("esv3oinoscr6zht0kce49o450"); // endp->boxes[0] = b; UNSUPPORTED("3hptqfzzuz4dlsc8ejk1ynxt9"); // endp->boxn = 1; UNSUPPORTED("celmm9njwdxhpvd56zon98hrr"); // P->start.p.x -= 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("8kgb5ztvt4yv5h0nezr0q6n3z"); // endp->sidemask = (1<<1); UNSUPPORTED("cysdxceleujmu3rckrhibxaqd"); // b.LL.x = P->start.p.x; UNSUPPORTED("c86scga1j3ar95pgqvemnzrui"); // b.LL.y = ND_coord(n).y - (ND_ht(n)/2); UNSUPPORTED("cdhdxsyg42tregieb2l7kz8n"); // b.UR.y = P->start.p.y; UNSUPPORTED("esv3oinoscr6zht0kce49o450"); // endp->boxes[0] = b; UNSUPPORTED("3hptqfzzuz4dlsc8ejk1ynxt9"); // endp->boxn = 1; UNSUPPORTED("1n8o29xgguq4cce4rf04o5rke"); // P->start.p.x += 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4gatpb3u0rq9nikm6rjtejp85"); // for (orig = e; ED_edge_type(orig) != 0; orig = ED_to_orig(orig)); UNSUPPORTED("askl6l2rq6b2bznfxj7ydvz5t"); // if (n == agtail(orig)) UNSUPPORTED("dk49xvmby8949ngdmft4sgrox"); // ED_tail_port(orig).clip = 0; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("2tw6ymudedo6qij3ux424ydsi"); // ED_head_port(orig).clip = 0; UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; } if ((et == 2) && ((side = ED_tail_port(e).side)!=0)) { UNSUPPORTED("ew7nyfe712nsiphifeztwxfop"); // boxf b0, b = endp->nb; UNSUPPORTED("a7lrhlfwr0y475aqjk6abhb3b"); // edge_t* orig; UNSUPPORTED("ait3wtnnvt134z2k87lvhq4ek"); // if (side & (1<<2)) { UNSUPPORTED("d7fd91oymbo1kkxfqhtbe2jky"); // b.LL.y = MIN(b.LL.y,P->start.p.y); UNSUPPORTED("esv3oinoscr6zht0kce49o450"); // endp->boxes[0] = b; UNSUPPORTED("3hptqfzzuz4dlsc8ejk1ynxt9"); // endp->boxn = 1; UNSUPPORTED("b7lioq6g7moe5otds46c8hrc"); // P->start.p.y += 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3s4re3z7asydnnotdylt94t1d"); // else if (side & (1<<0)) { UNSUPPORTED("6h0f9z7wklonn021j8ijd3b8m"); // if (endp->sidemask == (1<<2)) { UNSUPPORTED("7vjialx9rln6cj2y0ni5nc2gi"); // b0.UR.y = ND_coord(n).y - (ND_ht(n)/2); UNSUPPORTED("4e5ydpfmxn1wuhnp78arn3f9x"); // b0.UR.x = b.UR.x+1; UNSUPPORTED("1zpea73m3d4hdldoc5sypz1ag"); // b0.LL.x = P->start.p.x; UNSUPPORTED("esamvv08qn005uqko6caft2u"); // b0.LL.y = b0.UR.y - GD_ranksep(agraphof(n))/2; UNSUPPORTED("3f26r03ydc7aq52vcqpgxawgy"); // b.LL.x = ND_coord(n).x + ND_rw(n) + (2-2); UNSUPPORTED("74mnpbjmyubjppjur4ngy4t5u"); // b.LL.y = b0.UR.y; UNSUPPORTED("a6wnwn2mc878a2wacqkmdefx7"); // b.UR.y = ND_coord(n).y + (ND_ht(n)/2); UNSUPPORTED("bqk56pohk8hpgn91lv4m2zkv0"); // b.UR.x += 1; UNSUPPORTED("2f8usay82b128dq0sk4aqzw3h"); // endp->boxes[0] = b0; UNSUPPORTED("2diqdwueoy5oizl5kmbz6uyi8"); // endp->boxes[1] = b; UNSUPPORTED("93chrd1duv0atudbvr439u7t4"); // endp->boxn = 2; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("8yftboq798vpnzuxkx6yuea18"); // b.UR.y = MAX(b.UR.y,P->start.p.y); UNSUPPORTED("at4jfrag6jtwm7rxu8p4p8d46"); // endp->boxes[0] = b; UNSUPPORTED("ev1muhahxwb1cntbhsb3c9aid"); // endp->boxn = 1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("8pyl2559euuaxrntsyzj1ve8w"); // P->start.p.y -= 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bn3pwhefgp4zdatx3g60lj0ou"); // else if (side & (1<<3)) { UNSUPPORTED("bihp3ojpe2nsmh297nosihedn"); // b.UR.x = P->start.p.x+1; UNSUPPORTED("6h0f9z7wklonn021j8ijd3b8m"); // if (endp->sidemask == (1<<2)) { UNSUPPORTED("a6wnwn2mc878a2wacqkmdefx7"); // b.UR.y = ND_coord(n).y + (ND_ht(n)/2); UNSUPPORTED("afqhibyplfg1fftlkny8jq78t"); // b.LL.y = P->start.p.y-1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("1f4u492auf4ku7ik170e86iy3"); // b.LL.y = ND_coord(n).y - (ND_ht(n)/2); UNSUPPORTED("4no3qn8v4vx6rk2in60hgr8w6"); // b.UR.y = P->start.p.y+1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("esv3oinoscr6zht0kce49o450"); // endp->boxes[0] = b; UNSUPPORTED("3hptqfzzuz4dlsc8ejk1ynxt9"); // endp->boxn = 1; UNSUPPORTED("celmm9njwdxhpvd56zon98hrr"); // P->start.p.x -= 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("cysdxceleujmu3rckrhibxaqd"); // b.LL.x = P->start.p.x; UNSUPPORTED("6h0f9z7wklonn021j8ijd3b8m"); // if (endp->sidemask == (1<<2)) { UNSUPPORTED("a6wnwn2mc878a2wacqkmdefx7"); // b.UR.y = ND_coord(n).y + (ND_ht(n)/2); UNSUPPORTED("5oh26jb6vz012qke7865hz5h7"); // b.LL.y = P->start.p.y; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("1f4u492auf4ku7ik170e86iy3"); // b.LL.y = ND_coord(n).y - (ND_ht(n)/2); UNSUPPORTED("4no3qn8v4vx6rk2in60hgr8w6"); // b.UR.y = P->start.p.y+1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("esv3oinoscr6zht0kce49o450"); // endp->boxes[0] = b; UNSUPPORTED("3hptqfzzuz4dlsc8ejk1ynxt9"); // endp->boxn = 1; UNSUPPORTED("1n8o29xgguq4cce4rf04o5rke"); // P->start.p.x += 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4gatpb3u0rq9nikm6rjtejp85"); // for (orig = e; ED_edge_type(orig) != 0; orig = ED_to_orig(orig)); UNSUPPORTED("askl6l2rq6b2bznfxj7ydvz5t"); // if (n == agtail(orig)) UNSUPPORTED("dk49xvmby8949ngdmft4sgrox"); // ED_tail_port(orig).clip = 0; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("2tw6ymudedo6qij3ux424ydsi"); // ED_head_port(orig).clip = 0; UNSUPPORTED("8jqn3kj2hrrlcifbw3x9sf6qu"); // endp->sidemask = side; UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; } if (et == 1) side = (1<<0); else side = endp.getInt("sidemask"); /* for flat edges */ if (pboxfn!=null && (mask = (Integer) pboxfn.exe(n, ED_tail_port(e).amp(), side, endp.getArrayOfStruct("boxes").plus(0).getStruct().amp(), endp.getInt("boxn")))!=0) UNSUPPORTED("ex9kjvshm19zbu9vqonk1avd8"); // endp->sidemask = mask; else { endp.getArrayOfStruct("boxes").plus(0).setStruct(endp.getStruct("nb")); endp.setInt("boxn", 1); switch (et) { case 8: /* moving the box UR.y by + 1 avoids colinearity between port point and box that confuses Proutespline(). it's a bug in Proutespline() but this is the easiest fix. */ UNSUPPORTED("9rnob8jdqqdjwzanv53yxc47u"); // assert(0); /* at present, we don't use beginpath for selfedges */ UNSUPPORTED("46vb5zg9vm9n0q21g53nj66v3"); // endp->boxes[0].UR.y = P->start.p.y - 1; UNSUPPORTED("auefgwb39x5hzqqc9b1zgl239"); // endp->sidemask = (1<<0); break; case 2: if (endp.getInt("sidemask") == (1<<2)) ((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).LL.y = P.getStruct("start").getStruct("p").getDouble("y"); else ((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).UR.y = P.getStruct("start").getStruct("p").getDouble("y"); break; case 1: ((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).UR.y = P.getStruct("start").getStruct("p").getDouble("y"); endp.setInt("sidemask", (1<<0)); P.getStruct("start").getStruct("p").setDouble("y", P.getStruct("start").getStruct("p").getDouble("y") - 1); break; } } } finally { LEAVING("7pc43ifcw5g56449d101qf590","beginpath"); } } //3 79dr5om55xs3n5lgai1sf58vu // void endpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge) public static void endpath(path P, Agedge_s e, int et, pathend_t endp, boolean merge) { ENTERING("79dr5om55xs3n5lgai1sf58vu","endpath"); try { int side, mask; Agnode_s n; CFunction pboxfn; n = aghead(e); if (ED_head_port(e).getBoolean("dyna")) UNSUPPORTED("9brhx94sjudx3jtzrnwa60x8"); // ED_head_port(e) = resolvePort(aghead(e), agtail(e), &ED_head_port(e)); if (ND_shape(n)!=null) pboxfn = (CFunction) ND_shape(n).getPtr("fns").getPtr("pboxfn"); else pboxfn = null; P.getStruct("end").setStruct("p", add_pointf(ND_coord(n), ED_head_port(e).getStruct("p"))); if (merge) { UNSUPPORTED("cproejwusj67kuugolh6tbkwz"); // /*P->end.theta = M_PI / 2; */ UNSUPPORTED("65vhfvz1d1tub3f85tdsgg2g5"); // P->end.theta = conc_slope(aghead(e)) + M_PI; UNSUPPORTED("du4hwt6pjf3bmkvowssm7b0uo"); // assert(P->end.theta < 2 * M_PI); UNSUPPORTED("2w0c22i5xgcch77xd9jg104nw"); // P->end.constrained = NOT(0); } else { if (ED_head_port(e).getBoolean("constrained")) { P.getStruct("end").setDouble("theta", ED_head_port(e).getDouble("theta")); P.getStruct("end").setInt("constrained", 1); } else P.getStruct("end").setInt("constrained", 0); } endp.setStruct("np", P.getStruct("end").getStruct("p")); if ((et == 1) && (ND_node_type(n) == 0) && ((side = ED_head_port(e).side)!=0)) { UNSUPPORTED("a7lrhlfwr0y475aqjk6abhb3b"); // edge_t* orig; UNSUPPORTED("ew7nyfe712nsiphifeztwxfop"); // boxf b0, b = endp->nb; UNSUPPORTED("ait3wtnnvt134z2k87lvhq4ek"); // if (side & (1<<2)) { UNSUPPORTED("1r4lctdj9z1ivlz3uqpcj1yzf"); // endp->sidemask = (1<<2); UNSUPPORTED("cropv6s2edu614uzt364nepfo"); // b.LL.y = MIN(b.LL.y,P->end.p.y); UNSUPPORTED("esv3oinoscr6zht0kce49o450"); // endp->boxes[0] = b; UNSUPPORTED("3hptqfzzuz4dlsc8ejk1ynxt9"); // endp->boxn = 1; UNSUPPORTED("c91rvfjkunah0qffpuo47eshu"); // P->end.p.y += 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3s4re3z7asydnnotdylt94t1d"); // else if (side & (1<<0)) { UNSUPPORTED("auefgwb39x5hzqqc9b1zgl239"); // endp->sidemask = (1<<0); UNSUPPORTED("4tlqpclu7x0szo1rszndqau0d"); // if (P->end.p.x < ND_coord(n).x) { /* go left */ UNSUPPORTED("80ypgtfgfrgq8j7whkaueouh5"); // b0.LL.x = b.LL.x-1; UNSUPPORTED("4ikkdf5k4ubwp4ou51rth0q41"); // /* b0.UR.y = ND_coord(n).y - HT2(n); */ UNSUPPORTED("baysgwgvs09ywaufn74gq6m0a"); // b0.UR.y = P->end.p.y; UNSUPPORTED("5xsapgq04e1hslq2835500q6k"); // b0.UR.x = b.UR.x; UNSUPPORTED("7ut9yqcephghob5a3yo8af293"); // b0.LL.y = ND_coord(n).y - (ND_ht(n)/2) - GD_ranksep(agraphof(n))/2; UNSUPPORTED("6p2nw1nh0qwn5ro3dltmd6w6c"); // b.UR.x = ND_coord(n).x - ND_lw(n) - (2-2); UNSUPPORTED("74mnpbjmyubjppjur4ngy4t5u"); // b.LL.y = b0.UR.y; UNSUPPORTED("a6wnwn2mc878a2wacqkmdefx7"); // b.UR.y = ND_coord(n).y + (ND_ht(n)/2); UNSUPPORTED("w9wsmby4dawn9npux1jrd9gl"); // b.LL.x -= 1; UNSUPPORTED("2f8usay82b128dq0sk4aqzw3h"); // endp->boxes[0] = b0; UNSUPPORTED("2diqdwueoy5oizl5kmbz6uyi8"); // endp->boxes[1] = b; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("7sk0msbospwpwupzwpu8v87qt"); // b0.LL.x = b.LL.x; UNSUPPORTED("baysgwgvs09ywaufn74gq6m0a"); // b0.UR.y = P->end.p.y; UNSUPPORTED("4ikkdf5k4ubwp4ou51rth0q41"); // /* b0.UR.y = ND_coord(n).y - HT2(n); */ UNSUPPORTED("4e5ydpfmxn1wuhnp78arn3f9x"); // b0.UR.x = b.UR.x+1; UNSUPPORTED("7ut9yqcephghob5a3yo8af293"); // b0.LL.y = ND_coord(n).y - (ND_ht(n)/2) - GD_ranksep(agraphof(n))/2; UNSUPPORTED("3f26r03ydc7aq52vcqpgxawgy"); // b.LL.x = ND_coord(n).x + ND_rw(n) + (2-2); UNSUPPORTED("74mnpbjmyubjppjur4ngy4t5u"); // b.LL.y = b0.UR.y; UNSUPPORTED("a6wnwn2mc878a2wacqkmdefx7"); // b.UR.y = ND_coord(n).y + (ND_ht(n)/2); UNSUPPORTED("bqk56pohk8hpgn91lv4m2zkv0"); // b.UR.x += 1; UNSUPPORTED("2f8usay82b128dq0sk4aqzw3h"); // endp->boxes[0] = b0; UNSUPPORTED("2diqdwueoy5oizl5kmbz6uyi8"); // endp->boxes[1] = b; UNSUPPORTED("196ta4n5nsqizd83y6oo7z8a2"); // } UNSUPPORTED("4v7mmisc358r5tpq14qp4dx0f"); // endp->boxn = 2; UNSUPPORTED("6kjd8mut2dn2xv1k1zr63qp0s"); // P->end.p.y -= 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bn3pwhefgp4zdatx3g60lj0ou"); // else if (side & (1<<3)) { UNSUPPORTED("2lmjkw07sr4x9a3xxrcb3yj07"); // endp->sidemask = (1<<3); UNSUPPORTED("4e2bsroer72trfy5dl5k8f5s8"); // b.UR.x = P->end.p.x; UNSUPPORTED("3rsswd4vcybmrbhoqt0aldqds"); // b.UR.y = ND_coord(n).y + (ND_ht(n)/2); UNSUPPORTED("7m86tfoixpamdnl1ywyaz9uzy"); // b.LL.y = P->end.p.y; UNSUPPORTED("esv3oinoscr6zht0kce49o450"); // endp->boxes[0] = b; UNSUPPORTED("3hptqfzzuz4dlsc8ejk1ynxt9"); // endp->boxn = 1; UNSUPPORTED("5j92wv3nt0b7hnlf3ktengoom"); // P->end.p.x -= 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("8kgb5ztvt4yv5h0nezr0q6n3z"); // endp->sidemask = (1<<1); UNSUPPORTED("2upa323l3o3equsdn1v13nj0q"); // b.LL.x = P->end.p.x; UNSUPPORTED("3rsswd4vcybmrbhoqt0aldqds"); // b.UR.y = ND_coord(n).y + (ND_ht(n)/2); UNSUPPORTED("7m86tfoixpamdnl1ywyaz9uzy"); // b.LL.y = P->end.p.y; UNSUPPORTED("esv3oinoscr6zht0kce49o450"); // endp->boxes[0] = b; UNSUPPORTED("3hptqfzzuz4dlsc8ejk1ynxt9"); // endp->boxn = 1; UNSUPPORTED("44vy3z49e2oo6613r15tcgn8h"); // P->end.p.x += 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4gatpb3u0rq9nikm6rjtejp85"); // for (orig = e; ED_edge_type(orig) != 0; orig = ED_to_orig(orig)); UNSUPPORTED("e8cujr3gqet8mj2n5h5jfogm1"); // if (n == aghead(orig)) UNSUPPORTED("2tw6ymudedo6qij3ux424ydsi"); // ED_head_port(orig).clip = 0; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("dk49xvmby8949ngdmft4sgrox"); // ED_tail_port(orig).clip = 0; UNSUPPORTED("8jqn3kj2hrrlcifbw3x9sf6qu"); // endp->sidemask = side; UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; } if ((et == 2) && ((side = ED_head_port(e).side)!=0)) { UNSUPPORTED("ew7nyfe712nsiphifeztwxfop"); // boxf b0, b = endp->nb; UNSUPPORTED("a7lrhlfwr0y475aqjk6abhb3b"); // edge_t* orig; UNSUPPORTED("ait3wtnnvt134z2k87lvhq4ek"); // if (side & (1<<2)) { UNSUPPORTED("cropv6s2edu614uzt364nepfo"); // b.LL.y = MIN(b.LL.y,P->end.p.y); UNSUPPORTED("esv3oinoscr6zht0kce49o450"); // endp->boxes[0] = b; UNSUPPORTED("3hptqfzzuz4dlsc8ejk1ynxt9"); // endp->boxn = 1; UNSUPPORTED("c91rvfjkunah0qffpuo47eshu"); // P->end.p.y += 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3s4re3z7asydnnotdylt94t1d"); // else if (side & (1<<0)) { UNSUPPORTED("6h0f9z7wklonn021j8ijd3b8m"); // if (endp->sidemask == (1<<2)) { UNSUPPORTED("80ypgtfgfrgq8j7whkaueouh5"); // b0.LL.x = b.LL.x-1; UNSUPPORTED("7vjialx9rln6cj2y0ni5nc2gi"); // b0.UR.y = ND_coord(n).y - (ND_ht(n)/2); UNSUPPORTED("e403abqgqxgss6h01127ebeil"); // b0.UR.x = P->end.p.x; UNSUPPORTED("esamvv08qn005uqko6caft2u"); // b0.LL.y = b0.UR.y - GD_ranksep(agraphof(n))/2; UNSUPPORTED("29fp8dba1xqbt5ire1m3oad6c"); // b.UR.x = ND_coord(n).x - ND_lw(n) - 2; UNSUPPORTED("74mnpbjmyubjppjur4ngy4t5u"); // b.LL.y = b0.UR.y; UNSUPPORTED("a6wnwn2mc878a2wacqkmdefx7"); // b.UR.y = ND_coord(n).y + (ND_ht(n)/2); UNSUPPORTED("w9wsmby4dawn9npux1jrd9gl"); // b.LL.x -= 1; UNSUPPORTED("2f8usay82b128dq0sk4aqzw3h"); // endp->boxes[0] = b0; UNSUPPORTED("2diqdwueoy5oizl5kmbz6uyi8"); // endp->boxes[1] = b; UNSUPPORTED("93chrd1duv0atudbvr439u7t4"); // endp->boxn = 2; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("8yftboq798vpnzuxkx6yuea18"); // b.UR.y = MAX(b.UR.y,P->start.p.y); UNSUPPORTED("at4jfrag6jtwm7rxu8p4p8d46"); // endp->boxes[0] = b; UNSUPPORTED("ev1muhahxwb1cntbhsb3c9aid"); // endp->boxn = 1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6kjd8mut2dn2xv1k1zr63qp0s"); // P->end.p.y -= 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bn3pwhefgp4zdatx3g60lj0ou"); // else if (side & (1<<3)) { UNSUPPORTED("46ayak01kn7y7w3yaoreb6w1l"); // b.UR.x = P->end.p.x+1; UNSUPPORTED("6h0f9z7wklonn021j8ijd3b8m"); // if (endp->sidemask == (1<<2)) { UNSUPPORTED("a6wnwn2mc878a2wacqkmdefx7"); // b.UR.y = ND_coord(n).y + (ND_ht(n)/2); UNSUPPORTED("a3bb90cu4chg4dv4xfsx8r8ek"); // b.LL.y = P->end.p.y-1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("1f4u492auf4ku7ik170e86iy3"); // b.LL.y = ND_coord(n).y - (ND_ht(n)/2); UNSUPPORTED("20q189zumqwpltcod94td3f"); // b.UR.y = P->end.p.y+1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("esv3oinoscr6zht0kce49o450"); // endp->boxes[0] = b; UNSUPPORTED("3hptqfzzuz4dlsc8ejk1ynxt9"); // endp->boxn = 1; UNSUPPORTED("5j92wv3nt0b7hnlf3ktengoom"); // P->end.p.x -= 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("9tx1p6meq5zi4ce5essw11ikg"); // b.LL.x = P->end.p.x-1; UNSUPPORTED("6h0f9z7wklonn021j8ijd3b8m"); // if (endp->sidemask == (1<<2)) { UNSUPPORTED("a6wnwn2mc878a2wacqkmdefx7"); // b.UR.y = ND_coord(n).y + (ND_ht(n)/2); UNSUPPORTED("a3bb90cu4chg4dv4xfsx8r8ek"); // b.LL.y = P->end.p.y-1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("1f4u492auf4ku7ik170e86iy3"); // b.LL.y = ND_coord(n).y - (ND_ht(n)/2); UNSUPPORTED("181rv2y41gamwqbbccj0rnb57"); // b.UR.y = P->end.p.y; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("esv3oinoscr6zht0kce49o450"); // endp->boxes[0] = b; UNSUPPORTED("3hptqfzzuz4dlsc8ejk1ynxt9"); // endp->boxn = 1; UNSUPPORTED("44vy3z49e2oo6613r15tcgn8h"); // P->end.p.x += 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4gatpb3u0rq9nikm6rjtejp85"); // for (orig = e; ED_edge_type(orig) != 0; orig = ED_to_orig(orig)); UNSUPPORTED("e8cujr3gqet8mj2n5h5jfogm1"); // if (n == aghead(orig)) UNSUPPORTED("2tw6ymudedo6qij3ux424ydsi"); // ED_head_port(orig).clip = 0; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("dk49xvmby8949ngdmft4sgrox"); // ED_tail_port(orig).clip = 0; UNSUPPORTED("8jqn3kj2hrrlcifbw3x9sf6qu"); // endp->sidemask = side; UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; } if (et == 1) side = (1<<2); else side = endp.getInt("sidemask"); /* for flat edges */ if (pboxfn!=null && (mask = (Integer) pboxfn.exe(n, ED_head_port(e).amp(), side, endp.getArrayOfStruct("boxes").plus(0).getStruct().amp(), endp.getInt("boxn")))!=0) endp.setInt("sidemask", mask); else { endp.getArrayOfStruct("boxes").plus(0).setStruct(endp.getStruct("nb")); endp.setInt("boxn", 1); switch (et) { case 8: /* offset of -1 is symmetric w.r.t. beginpath() * FIXME: is any of this right? what if self-edge * doesn't connect from BOTTOM to TOP??? */ UNSUPPORTED("bhkhf4i9pvxtxyka4sobszg33"); // assert(0); /* at present, we don't use endpath for selfedges */ UNSUPPORTED("db6vmvnse8bawy8qwct7l24u8"); // endp->boxes[0].LL.y = P->end.p.y + 1; UNSUPPORTED("1r4lctdj9z1ivlz3uqpcj1yzf"); // endp->sidemask = (1<<2); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; case 2: if (endp.getInt("sidemask") == (1<<2)) ((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).LL.y = P.getStruct("end").getStruct("p").getDouble("y"); else ((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).UR.y = P.getStruct("end").getStruct("p").getDouble("y"); break; case 1: ((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).LL.y = P.getStruct("end").getStruct("p").getDouble("y"); endp.setInt("sidemask", (1<<2)); P.getStruct("end").getStruct("p").setDouble("y", P.getStruct("end").getStruct("p").getDouble("y") +1); break; } } } finally { LEAVING("79dr5om55xs3n5lgai1sf58vu","endpath"); } } //3 3g7alj6eirl5b2hlhluiqvaax // static int convert_sides_to_points(int tail_side, int head_side) public static int convert_sides_to_points(int tail_side, int head_side) { int vertices[] = new int[] {12,4,6,2,3,1,9,8}; //the cumulative side value of each node point int i, tail_i, head_i; int pair_a[][] = new int[][] { //array of possible node point pairs {11,12,13,14,15,16,17,18}, {21,22,23,24,25,26,27,28}, {31,32,33,34,35,36,37,38}, {41,42,43,44,45,46,47,48}, {51,52,53,54,55,56,57,58}, {61,62,63,64,65,66,67,68}, {71,72,73,74,75,76,77,78}, {81,82,83,84,85,86,87,88} }; ENTERING("3g7alj6eirl5b2hlhluiqvaax","convert_sides_to_points"); try { tail_i = head_i = -1; for(i=0;i< 8; i++){ if(head_side == vertices[i]){ head_i = i; break; } } for(i=0;i< 8; i++){ if(tail_side == vertices[i]){ tail_i = i; break; } } if( tail_i < 0 || head_i < 0) return 0; else return pair_a[tail_i][head_i]; } finally { LEAVING("3g7alj6eirl5b2hlhluiqvaax","convert_sides_to_points"); } } //3 7l37y1w97mt6n5pd9x5dzgwud // static void selfBottom (edge_t* edges[], int ind, int cnt, double sizex, double stepy, splineInfo* sinfo) public static Object selfBottom(Object... arg) { UNSUPPORTED("5mldqfen59kshqgaknayjc5ox"); // static void selfBottom (edge_t* edges[], int ind, int cnt, UNSUPPORTED("e0472i5ngodtv68y0hdhq1azu"); // double sizex, double stepy, splineInfo* sinfo) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a2vzpy4tpc2fpmuf12nhtfca"); // pointf tp, hp, np; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("2131r3ibxv7drmcz6f2j5d9c2"); // int i, sgn, point_pair; UNSUPPORTED("de1bz9yfc9w49kc4vy1ge2ltd"); // double hy, ty, stepx, dx, dy, width, height; UNSUPPORTED("cutkizwxyuykhmayeb60m22av"); // pointf points[1000]; UNSUPPORTED("79ig2xj5nogd41esx7798m82t"); // int pointn; UNSUPPORTED("e3wy3x07xdsusfbgecfcqg5lj"); // e = edges[ind]; UNSUPPORTED("dul1axf6kjslblufm4omk5k32"); // n = agtail(e); UNSUPPORTED("43yzlf5354g6qlugyzpmr745t"); // stepx = (sizex / 2.) / cnt; UNSUPPORTED("brakcbw9hvzlljogqwzlhgb0v"); // stepx = MAX(stepx,2.); UNSUPPORTED("dko3xt785e372nj0fiocjfas"); // pointn = 0; UNSUPPORTED("dqazhjgevh1spyg3xzwb3bcks"); // np = ND_coord(n); UNSUPPORTED("ehf9o80lfi02no07wz207kyp6"); // tp = ED_tail_port(e).p; UNSUPPORTED("f18822xrptoagri7001gamxwh"); // tp.x += np.x; UNSUPPORTED("pcmp8bdd8677mjvvef7kfh5y"); // tp.y += np.y; UNSUPPORTED("b4mfdkjjk3n78ssy4h80g5lc6"); // hp = ED_head_port(e).p; UNSUPPORTED("e7rhhgc42h5z6kvvnkz6wfn0r"); // hp.x += np.x; UNSUPPORTED("bisu3qji6rw3wu3srdv8vhrxb"); // hp.y += np.y; UNSUPPORTED("2c8kmvidaqx92wd2mq1ys6753"); // if (tp.x >= hp.x) sgn = 1; UNSUPPORTED("cvln1r5ffbp1z1sq0y6ago4og"); // else sgn = -1; UNSUPPORTED("7squuk10wt6xrbp24obpx41bw"); // dy = ND_ht(n)/2., dx = 0.; UNSUPPORTED("7sojr831wk2u8c86xerkjyojd"); // // certain adjustments are required for some point_pairs in order to improve the UNSUPPORTED("byuachd2fjte06s7xwnbmxlcx"); // // display of the edge path between them UNSUPPORTED("eje36stfd9p7ulgo4qk6gjwvx"); // point_pair = convert_sides_to_points(ED_tail_port(e).side,ED_head_port(e).side); UNSUPPORTED("2qmvjd6iwnaqwop679caoaxnn"); // switch(point_pair){ UNSUPPORTED("8c31t4u50f9yjnlb8ii84ts3w"); // case 67: sgn = -sgn; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("5vhsnixpf0pg2oz10ps2valyn"); // default: UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5n29oadzd6emvd2fwjisx6ovk"); // ty = MIN(dy, 3*(tp.y + dy - np.y)); UNSUPPORTED("dly5hufg66dgb6zn5lqcerae1"); // hy = MIN(dy, 3*(hp.y + dy - np.y)); UNSUPPORTED("1psokm6w9e7qw7fm2g1cayuk7"); // for (i = 0; i < cnt; i++) { UNSUPPORTED("a0u9ggni4r8gikqyyxf6wgaa5"); // e = edges[ind++]; UNSUPPORTED("bgymnp4yekw8tzr70cnzzn9ez"); // dy += stepy, ty += stepy, hy += stepy, dx += sgn*stepx; UNSUPPORTED("8tkxpvgpxpilkes33cj73nr8o"); // pointn = 0; UNSUPPORTED("2j93ajzz3i9adm0syj177su98"); // points[pointn++] = tp; UNSUPPORTED("15uyub8ah85dmbdmc0lqgjqb"); // points[pointn++] = pointfof(tp.x + dx, tp.y - ty / 3); UNSUPPORTED("bh0lpazk6gpagl57bydccqkv4"); // points[pointn++] = pointfof(tp.x + dx, np.y - dy); UNSUPPORTED("381vppahpairjja0hahm7lktb"); // points[pointn++] = pointfof((tp.x+hp.x)/2, np.y - dy); UNSUPPORTED("n63wd0j09ndu0hiaxhwx7izb"); // points[pointn++] = pointfof(hp.x - dx, np.y - dy); UNSUPPORTED("dzdgwa3zfedg3kys9pd8mp5qm"); // points[pointn++] = pointfof(hp.x - dx, hp.y - hy / 3); UNSUPPORTED("6t0sueo9zyoccfzqit4c7pvcy"); // points[pointn++] = hp; UNSUPPORTED("6nhnbriaxn7zi0ab1z8bkbzd"); // if (ED_label(e)) { UNSUPPORTED("a7ea1ybpt7lv8fk1pc1outbs5"); // if (GD_flip(agraphof(agtail(e)))) { UNSUPPORTED("7d83ym7h1stime4wbmifcx809"); // width = ED_label(e)->dimen.y; UNSUPPORTED("44m5sni7g3n6fnk6ca57u9dc2"); // height = ED_label(e)->dimen.x; UNSUPPORTED("s8koz5x85ytpnff1o94rlxqy"); // } else { UNSUPPORTED("66vu2joy64r1yrkvp3oolz1ws"); // width = ED_label(e)->dimen.x; UNSUPPORTED("d6bobo1f6gxkxa2fffvmn41g0"); // height = ED_label(e)->dimen.y; UNSUPPORTED("klxoy56t7b20wxnwqm0qoofz"); // } UNSUPPORTED("cot4bdvsbrav4yex2yesffgd9"); // ED_label(e)->pos.y = ND_coord(n).y - dy - height / 2.0; UNSUPPORTED("9wg1yftg90g8jld2m2p5m31ro"); // ED_label(e)->pos.x = ND_coord(n).x; UNSUPPORTED("7efx4yevu8176mmuqjtk4bfss"); // ED_label(e)->set = NOT(0); UNSUPPORTED("13o3f1bpjm731ee8hpa8d3f5y"); // if (height > stepy) UNSUPPORTED("alt1jvhdhimr8iltoxg7dycq1"); // dy += height - stepy; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("5fvid2bi7fy5jv5dyttfprpzj"); // clip_and_install(e, aghead(e), points, pointn, sinfo); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2thwh4ase1jdq8ghhf0oqyql5 // static void selfTop (edge_t* edges[], int ind, int cnt, double sizex, double stepy, splineInfo* sinfo) public static Object selfTop(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("32kq3vfpd1msv3v0nv0uqavzh"); // selfTop (edge_t* edges[], int ind, int cnt, double sizex, double stepy, UNSUPPORTED("2t4o7k97lw32u08cs5j96r7if"); // splineInfo* sinfo) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2131r3ibxv7drmcz6f2j5d9c2"); // int i, sgn, point_pair; UNSUPPORTED("1suoh1r8nnndqo9txafuch8az"); // double hy, ty, stepx, dx, dy, width, height; UNSUPPORTED("7a2vzpy4tpc2fpmuf12nhtfca"); // pointf tp, hp, np; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("cutkizwxyuykhmayeb60m22av"); // pointf points[1000]; UNSUPPORTED("79ig2xj5nogd41esx7798m82t"); // int pointn; UNSUPPORTED("e3wy3x07xdsusfbgecfcqg5lj"); // e = edges[ind]; UNSUPPORTED("dul1axf6kjslblufm4omk5k32"); // n = agtail(e); UNSUPPORTED("43yzlf5354g6qlugyzpmr745t"); // stepx = (sizex / 2.) / cnt; UNSUPPORTED("7199vb689fs8rdn6j40wpw2py"); // stepx = MAX(stepx, 2.); UNSUPPORTED("dko3xt785e372nj0fiocjfas"); // pointn = 0; UNSUPPORTED("dqazhjgevh1spyg3xzwb3bcks"); // np = ND_coord(n); UNSUPPORTED("ehf9o80lfi02no07wz207kyp6"); // tp = ED_tail_port(e).p; UNSUPPORTED("f18822xrptoagri7001gamxwh"); // tp.x += np.x; UNSUPPORTED("pcmp8bdd8677mjvvef7kfh5y"); // tp.y += np.y; UNSUPPORTED("b4mfdkjjk3n78ssy4h80g5lc6"); // hp = ED_head_port(e).p; UNSUPPORTED("e7rhhgc42h5z6kvvnkz6wfn0r"); // hp.x += np.x; UNSUPPORTED("bisu3qji6rw3wu3srdv8vhrxb"); // hp.y += np.y; UNSUPPORTED("2c8kmvidaqx92wd2mq1ys6753"); // if (tp.x >= hp.x) sgn = 1; UNSUPPORTED("cvln1r5ffbp1z1sq0y6ago4og"); // else sgn = -1; UNSUPPORTED("7squuk10wt6xrbp24obpx41bw"); // dy = ND_ht(n)/2., dx = 0.; UNSUPPORTED("7sojr831wk2u8c86xerkjyojd"); // // certain adjustments are required for some point_pairs in order to improve the UNSUPPORTED("byuachd2fjte06s7xwnbmxlcx"); // // display of the edge path between them UNSUPPORTED("eje36stfd9p7ulgo4qk6gjwvx"); // point_pair = convert_sides_to_points(ED_tail_port(e).side,ED_head_port(e).side); UNSUPPORTED("2qmvjd6iwnaqwop679caoaxnn"); // switch(point_pair){ UNSUPPORTED("6mjalqxwnjw8e27c2ioujowul"); // case 15: UNSUPPORTED("5vvzajt4nlp9tr9qagb46uzw0"); // dx = sgn*(ND_rw(n) - (hp.x-np.x) + stepx); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("av3gl91zikst7e3hby657df3z"); // case 38: UNSUPPORTED("d2wzrbnbuinus07v39wtrzg6k"); // dx = sgn*(ND_lw(n)-(np.x-hp.x) + stepx); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("dk2te1ff65z24g7yge6td5w1h"); // case 41: UNSUPPORTED("54zp7hq4t1477ra0toi6nfc3s"); // dx = sgn*(ND_rw(n)-(tp.x-np.x) + stepx); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("eyz8046vmrhfd05uo35ud2o26"); // case 48: UNSUPPORTED("54zp7hq4t1477ra0toi6nfc3s"); // dx = sgn*(ND_rw(n)-(tp.x-np.x) + stepx); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("90hjo1ph35lg8jy4yywzro3nf"); // case 14: UNSUPPORTED("23d0sltghssogk5wk9024lh41"); // case 37: UNSUPPORTED("3dvppfwsy4t6h54uecu5i9hry"); // case 47: UNSUPPORTED("95n009mwo78h9zg1mx5yc3j7l"); // case 51: UNSUPPORTED("8ytmvd73zq9qu5c4ku4jcap4a"); // case 57: UNSUPPORTED("1tbpkq9m2taj7n3fj63cocjyn"); // case 58: UNSUPPORTED("u36w11cbjvnwnr2a9aukmfop"); // dx = sgn*((((ND_lw(n)-(np.x-tp.x)) + (ND_rw(n)-(hp.x-np.x)))/3.)); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("a92kp8x7ej800lliiwzfuobem"); // case 73: UNSUPPORTED("c22dsvqh8h2a9v76t3u9dzyi4"); // dx = sgn*(ND_lw(n)-(np.x-tp.x) + stepx); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("3ijo2dao8lyum56ai3jujbmap"); // case 83: UNSUPPORTED("bjovxk89tmb4rsuvw09nszp4c"); // dx = sgn*(ND_lw(n)-(np.x-tp.x)); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("f4rvirpst5ft3uksqp3okyjcf"); // case 84: UNSUPPORTED("1i3gur9btuj2u5s8ybbgmd87y"); // dx = sgn*((((ND_lw(n)-(np.x-tp.x)) + (ND_rw(n)-(hp.x-np.x)))/2.) + stepx); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("72fiv7451m2qnkzbfjcwv7pgx"); // case 74: UNSUPPORTED("1yel8f4unntut6w7bgdhgsvq1"); // case 75: UNSUPPORTED("93kdallci9a743giye6pd0y0f"); // case 85: UNSUPPORTED("919n1grj4s92nolxlmoqx4qqw"); // dx = sgn*((((ND_lw(n)-(np.x-tp.x)) + (ND_rw(n)-(hp.x-np.x)))/2.) + 2*stepx); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7jtwt2insvwb55tafkqx3boot"); // ty = MIN(dy, 3*(np.y + dy - tp.y)); UNSUPPORTED("7vwwj5yxukw3e1k0twakhhgg3"); // hy = MIN(dy, 3*(np.y + dy - hp.y)); UNSUPPORTED("1psokm6w9e7qw7fm2g1cayuk7"); // for (i = 0; i < cnt; i++) { UNSUPPORTED("a0u9ggni4r8gikqyyxf6wgaa5"); // e = edges[ind++]; UNSUPPORTED("bgymnp4yekw8tzr70cnzzn9ez"); // dy += stepy, ty += stepy, hy += stepy, dx += sgn*stepx; UNSUPPORTED("8tkxpvgpxpilkes33cj73nr8o"); // pointn = 0; UNSUPPORTED("2j93ajzz3i9adm0syj177su98"); // points[pointn++] = tp; UNSUPPORTED("810s5qsu6it4vef0j2l5blqdm"); // points[pointn++] = pointfof(tp.x + dx, tp.y + ty / 3); UNSUPPORTED("r9y9vrfhtcn0ly9mxyipodbo"); // points[pointn++] = pointfof(tp.x + dx, np.y + dy); UNSUPPORTED("576fgxddv6rfxjwqc4ziex02m"); // points[pointn++] = pointfof((tp.x+hp.x)/2, np.y + dy); UNSUPPORTED("7wozarouo08hg5qnrcqmlrzv1"); // points[pointn++] = pointfof(hp.x - dx, np.y + dy); UNSUPPORTED("6z0fdvc1cxk34nwjps2o0vy9e"); // points[pointn++] = pointfof(hp.x - dx, hp.y + hy / 3); UNSUPPORTED("6t0sueo9zyoccfzqit4c7pvcy"); // points[pointn++] = hp; UNSUPPORTED("6nhnbriaxn7zi0ab1z8bkbzd"); // if (ED_label(e)) { UNSUPPORTED("95cz173vhlho6qxwqiafjznd6"); // if (GD_flip(agraphof(agtail(e)))) { UNSUPPORTED("5tq797micincut6x05g6eokxk"); // width = ED_label(e)->dimen.y; UNSUPPORTED("2wpl3ja2mlxynjamnyblux5j"); // height = ED_label(e)->dimen.x; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("5oxmxe34kl5iq4p27e8r7k11y"); // width = ED_label(e)->dimen.x; UNSUPPORTED("4eunm5kqgzuzko60febalr1gg"); // height = ED_label(e)->dimen.y; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("8ygvy3gas9hrwh99z44j4vw14"); // ED_label(e)->pos.y = ND_coord(n).y + dy + height / 2.0; UNSUPPORTED("89l2ovblsu6gnx97clo8ev1yk"); // ED_label(e)->pos.x = ND_coord(n).x; UNSUPPORTED("3tkba5lhpnujfu8lcz8lewsyn"); // ED_label(e)->set = NOT(0); UNSUPPORTED("df1lpvk1x9s2nna4dimpv5ixv"); // if (height > stepy) UNSUPPORTED("anykz2jqihvnza16edujzsmnm"); // dy += height - stepy; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("iyaed8bkc8xb16vcnxvc7d6s"); // clip_and_install(e, aghead(e), points, pointn, sinfo); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b9185t6i77ez1ac587ul8ndnc"); // return; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3sr8gvj4141qql0v12lb89cyt // static void selfRight (edge_t* edges[], int ind, int cnt, double stepx, double sizey, splineInfo* sinfo) public static void selfRight(__ptr__ edges, int ind, int cnt, double stepx, double sizey, splineInfo sinfo) { ENTERING("3sr8gvj4141qql0v12lb89cyt","selfRight"); try { int i, sgn, point_pair; double hx, tx, stepy, dx, dy, width, height; final ST_pointf tp = new ST_pointf(), hp = new ST_pointf(), np = new ST_pointf(); Agnode_s n; Agedge_s e; final __array_of_struct__ points = __array_of_struct__.malloc(pointf.class, 1000); int pointn; e = (Agedge_s) edges.plus(ind).getPtr(); n = agtail(e); stepy = (sizey / 2.) / cnt; stepy = MAX(stepy, 2.); pointn = 0; np.___(ND_coord(n)); tp.___(ED_tail_port(e).getStruct("p")); tp.setDouble("x", tp.getDouble("x") + np.getDouble("x")); tp.setDouble("y", tp.getDouble("y") + np.getDouble("y")); hp.___(ED_head_port(e).getStruct("p")); hp.setDouble("x", hp.getDouble("x") + np.getDouble("x")); hp.setDouble("y", hp.getDouble("y") + np.getDouble("y")); if (tp.getDouble("y") >= hp.getDouble("y")) sgn = 1; else sgn = -1; dx = ND_rw(n); dy = 0; // certain adjustments are required for some point_pairs in order to improve the // display of the edge path between them point_pair = convert_sides_to_points(ED_tail_port(e).side,ED_head_port(e).side); switch(point_pair){ case 32: case 65: if(tp.getDouble("y") == hp.getDouble("y")) sgn = -sgn; break; default: break; } tx = MIN(dx, 3*(np.getDouble("x") + dx - tp.getDouble("x"))); hx = MIN(dx, 3*(np.getDouble("x") + dx - hp.getDouble("x"))); for (i = 0; i < cnt; i++) { e = (Agedge_s) edges.plus(ind++).getPtr(); dx += stepx; tx += stepx; hx += stepx; dy += sgn*stepy; pointn = 0; points.plus(pointn++).setStruct(tp); points.plus(pointn++).setStruct(pointfof(tp.getDouble("x") + tx / 3, tp.getDouble("y") + dy)); points.plus(pointn++).setStruct(pointfof(np.getDouble("x") + dx, tp.getDouble("y") + dy)); points.plus(pointn++).setStruct(pointfof(np.getDouble("x") + dx, (tp.getDouble("y")+hp.getDouble("y"))/2)); points.plus(pointn++).setStruct(pointfof(np.getDouble("x") + dx, hp.getDouble("y") - dy)); points.plus(pointn++).setStruct(pointfof(hp.getDouble("x") + hx / 3, hp.getDouble("y") - dy)); points.plus(pointn++).setStruct(hp); if (ED_label(e)!=null) { if (GD_flip(agraphof(agtail(e)))!=0) { width = ED_label(e).getStruct("dimen").getDouble("y"); height = ED_label(e).getStruct("dimen").getDouble("x"); } else { width = ED_label(e).getStruct("dimen").getDouble("x"); height = ED_label(e).getStruct("dimen").getDouble("y"); } ED_label(e).getStruct("pos").setDouble("x", ND_coord(n).getDouble("x") + dx + width / 2.0); ED_label(e).getStruct("pos").setDouble("y", ND_coord(n).getDouble("y")); ED_label(e).setBoolean("set", NOT(false)); if (width > stepx) dx += width - stepx; } clip_and_install(e, aghead(e), points.asPtr(), pointn, sinfo); } return; } finally { LEAVING("3sr8gvj4141qql0v12lb89cyt","selfRight"); } } //3 pb3pqqgfs6pzscxz9g4ip66b // static void selfLeft (edge_t* edges[], int ind, int cnt, double stepx, double sizey, splineInfo* sinfo) public static Object selfLeft(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("e1xon7wncs6szxkut7r3ylg8a"); // selfLeft (edge_t* edges[], int ind, int cnt, double stepx, double sizey, UNSUPPORTED("304grcrgelbk1tnep5avkaylv"); // splineInfo* sinfo) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5kzmtbtnct9t7sugzyg0t1505"); // int i, sgn,point_pair; UNSUPPORTED("9oe5un4g42lfm6s5sruhajt5n"); // double hx, tx, stepy, dx, dy, width, height; UNSUPPORTED("7a2vzpy4tpc2fpmuf12nhtfca"); // pointf tp, hp, np; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("cutkizwxyuykhmayeb60m22av"); // pointf points[1000]; UNSUPPORTED("79ig2xj5nogd41esx7798m82t"); // int pointn; UNSUPPORTED("e3wy3x07xdsusfbgecfcqg5lj"); // e = edges[ind]; UNSUPPORTED("dul1axf6kjslblufm4omk5k32"); // n = agtail(e); UNSUPPORTED("2biq5cfn3eflyc9vcakp8z40j"); // stepy = (sizey / 2.) / cnt; UNSUPPORTED("ag6m3hxmkt2fwxfbd09gtse84"); // stepy = MAX(stepy,2.); UNSUPPORTED("dko3xt785e372nj0fiocjfas"); // pointn = 0; UNSUPPORTED("dqazhjgevh1spyg3xzwb3bcks"); // np = ND_coord(n); UNSUPPORTED("ehf9o80lfi02no07wz207kyp6"); // tp = ED_tail_port(e).p; UNSUPPORTED("f18822xrptoagri7001gamxwh"); // tp.x += np.x; UNSUPPORTED("pcmp8bdd8677mjvvef7kfh5y"); // tp.y += np.y; UNSUPPORTED("b4mfdkjjk3n78ssy4h80g5lc6"); // hp = ED_head_port(e).p; UNSUPPORTED("e7rhhgc42h5z6kvvnkz6wfn0r"); // hp.x += np.x; UNSUPPORTED("bisu3qji6rw3wu3srdv8vhrxb"); // hp.y += np.y; UNSUPPORTED("9pq7cc11wf5inm1gtl9nubola"); // if (tp.y >= hp.y) sgn = 1; UNSUPPORTED("cvln1r5ffbp1z1sq0y6ago4og"); // else sgn = -1; UNSUPPORTED("5t4m5gzysfvdd5gfy1snezlv1"); // dx = ND_lw(n), dy = 0.; UNSUPPORTED("7sojr831wk2u8c86xerkjyojd"); // // certain adjustments are required for some point_pairs in order to improve the UNSUPPORTED("byuachd2fjte06s7xwnbmxlcx"); // // display of the edge path between them UNSUPPORTED("eje36stfd9p7ulgo4qk6gjwvx"); // point_pair = convert_sides_to_points(ED_tail_port(e).side,ED_head_port(e).side); UNSUPPORTED("2qmvjd6iwnaqwop679caoaxnn"); // switch(point_pair){ UNSUPPORTED("1ztn6qfhzw55cdorxgbs8mvaw"); // case 12: UNSUPPORTED("5nakmzm2t38aw7gowxf3597ny"); // case 67: UNSUPPORTED("bvy8vwcvwtkz9nqaq8173x6bh"); // if(tp.y == hp.y) UNSUPPORTED("cffqbosum7o1l5iposy2evrfl"); // sgn = -sgn; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("5vhsnixpf0pg2oz10ps2valyn"); // default: UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("p2znjsd0rhcqyou2d4tcp4m3"); // tx = MIN(dx, 3*(tp.x + dx - np.x)); UNSUPPORTED("9fc36i8mydvpx5fb9s7oomgg9"); // hx = MIN(dx, 3*(hp.x + dx - np.x)); UNSUPPORTED("1psokm6w9e7qw7fm2g1cayuk7"); // for (i = 0; i < cnt; i++) { UNSUPPORTED("a0u9ggni4r8gikqyyxf6wgaa5"); // e = edges[ind++]; UNSUPPORTED("corxl7j4p1epemy3mlhnxuh7f"); // dx += stepx, tx += stepx, hx += stepx, dy += sgn*stepy; UNSUPPORTED("8tkxpvgpxpilkes33cj73nr8o"); // pointn = 0; UNSUPPORTED("2j93ajzz3i9adm0syj177su98"); // points[pointn++] = tp; UNSUPPORTED("1d3rn5phdxf8hhlmh3b3wp7lh"); // points[pointn++] = pointfof(tp.x - tx / 3, tp.y + dy); UNSUPPORTED("2wxmjkn0pmrslgogz96iftqs0"); // points[pointn++] = pointfof(np.x - dx, tp.y + dy); UNSUPPORTED("clocavnhfvokhhthg9cujkqa0"); // points[pointn++] = pointfof(np.x - dx, (tp.y+hp.y)/2); UNSUPPORTED("6tz9mqs3ff68mo5r1xmq2zyc4"); // points[pointn++] = pointfof(np.x - dx, hp.y - dy); UNSUPPORTED("a6oh2uv36d620c50ery1vvmd7"); // points[pointn++] = pointfof(hp.x - hx / 3, hp.y - dy); UNSUPPORTED("6t0sueo9zyoccfzqit4c7pvcy"); // points[pointn++] = hp; UNSUPPORTED("6nhnbriaxn7zi0ab1z8bkbzd"); // if (ED_label(e)) { UNSUPPORTED("7ewy2tc2zfli5k6dghdnao8tw"); // if (GD_flip(agraphof(agtail(e)))) { UNSUPPORTED("7d83ym7h1stime4wbmifcx809"); // width = ED_label(e)->dimen.y; UNSUPPORTED("44m5sni7g3n6fnk6ca57u9dc2"); // height = ED_label(e)->dimen.x; UNSUPPORTED("s8koz5x85ytpnff1o94rlxqy"); // } else { UNSUPPORTED("66vu2joy64r1yrkvp3oolz1ws"); // width = ED_label(e)->dimen.x; UNSUPPORTED("d6bobo1f6gxkxa2fffvmn41g0"); // height = ED_label(e)->dimen.y; UNSUPPORTED("klxoy56t7b20wxnwqm0qoofz"); // } UNSUPPORTED("e7au5qlazz8i26lvbl9c5k657"); // ED_label(e)->pos.x = ND_coord(n).x - dx - width / 2.0; UNSUPPORTED("dfo4prcp2cafipoufh8bql0id"); // ED_label(e)->pos.y = ND_coord(n).y; UNSUPPORTED("7efx4yevu8176mmuqjtk4bfss"); // ED_label(e)->set = NOT(0); UNSUPPORTED("8ivpntotxg2rgw585hkdgsixh"); // if (width > stepx) UNSUPPORTED("34ujzn0u4l056cgabsn09ncw8"); // dx += width - stepx; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("5fvid2bi7fy5jv5dyttfprpzj"); // clip_and_install(e, aghead(e), points, pointn, sinfo); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 678whq05s481ertx02jloteu3 // int selfRightSpace (edge_t* e) public static int selfRightSpace(Agedge_s e) { ENTERING("678whq05s481ertx02jloteu3","selfRightSpace"); try { int sw=0; double label_width; textlabel_t l = ED_label(e); if ((N(ED_tail_port(e).defined) && N(ED_head_port(e).defined)) || ( N(ED_tail_port(e).side & (1<<3)) && N(ED_head_port(e).side & (1<<3)) && ((ED_tail_port(e).side != ED_head_port(e).side) || (N(ED_tail_port(e).side & ((1<<2)|(1<<0))))) )) { sw = 18; if (l!=null) { label_width = GD_flip(agraphof(aghead(e)))!=0 ? l.getStruct("dimen").getDouble("y") : l.getStruct("dimen").getDouble("x"); sw += label_width; } } else sw = 0; return sw; } finally { LEAVING("678whq05s481ertx02jloteu3","selfRightSpace"); } } //3 bt3fwgprixbc5rceeewozdqr9 // void makeSelfEdge(path * P, edge_t * edges[], int ind, int cnt, double sizex, double sizey, splineInfo * sinfo) public static void makeSelfEdge(path P, __ptr__ edges, int ind, int cnt, double sizex, double sizey, splineInfo sinfo) { ENTERING("bt3fwgprixbc5rceeewozdqr9","makeSelfEdge"); try { Agedge_s e; e = (Agedge_s) edges.plus(ind).getPtr(); /* self edge without ports or * self edge with all ports inside, on the right, or at most 1 on top * and at most 1 on bottom */ if ((N(ED_tail_port(e).defined) && N(ED_head_port(e).defined)) || ( N(ED_tail_port(e).side & (1<<3)) && N(ED_head_port(e).side & (1<<3)) && ((ED_tail_port(e).side != ED_head_port(e).side) || (N(ED_tail_port(e).side & ((1<<2)|(1<<0))))))) { selfRight(edges, ind, cnt, sizex, sizey, sinfo); } /* self edge with port on left side */ else if ((ED_tail_port(e).side & (1<<3))!=0 || (ED_head_port(e).side & (1<<3))!=0) { /* handle L-R specially */ if ((ED_tail_port(e).side & (1<<1))!=0 || (ED_head_port(e).side & (1<<1))!=0) { selfTop(edges, ind, cnt, sizex, sizey, sinfo); } else { selfLeft(edges, ind, cnt, sizex, sizey, sinfo); } } /* self edge with both ports on top side */ else if ((ED_tail_port(e).side & (1<<2))!=0) { selfTop(edges, ind, cnt, sizex, sizey, sinfo); } else if ((ED_tail_port(e).side & (1<<0))!=0) { selfBottom(edges, ind, cnt, sizex, sizey, sinfo); } else assert(false); } finally { LEAVING("bt3fwgprixbc5rceeewozdqr9","makeSelfEdge"); } } //3 9br31owvzkmo6hpgi5o3yqs6u // void makePortLabels(edge_t * e) public static Object makePortLabels(Object... arg) { UNSUPPORTED("7h8uwyqfmkrxlwe199ha5685e"); // void makePortLabels(edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8592v0z3b9lcnaz6kmep9i7fb"); // /* Only use this if labelangle or labeldistance is set for the edge; UNSUPPORTED("60d7j1whu0efnsich22dgcgct"); // * otherwise, handle with external labels. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("exadv83959uk532g2sef35k8d"); // if (!E_labelangle && !E_labeldistance) return; UNSUPPORTED("ex1c7eojs5nx6t10t191xuzvj"); // if (ED_head_label(e) && !ED_head_label(e)->set) { UNSUPPORTED("1hjdl17xghg2aygn0psu0p2oq"); // if (place_portlabel(e, NOT(0))) UNSUPPORTED("3rgc9w83agr2ba9s9muyubzqz"); // updateBB(agraphof(agtail(e)), ED_head_label(e)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("twsg91c027nxls3s64jxn4cy"); // if (ED_tail_label(e) && !ED_tail_label(e)->set) { UNSUPPORTED("bu5i9ibw82s14f8vgd3nz2s46"); // if (place_portlabel(e, 0)) UNSUPPORTED("80z5y1fe03judv18cnzdcbyww"); // updateBB(agraphof(agtail(e)), ED_tail_label(e)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7wyn51o9k6u7joaq9k18boffh // static void endPoints(splines * spl, pointf * p, pointf * q) public static Object endPoints(Object... arg) { UNSUPPORTED("5r4ewx4i6zia04hwqvonnvcg9"); // static void endPoints(splines * spl, pointf * p, pointf * q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("37thdceezsvepe7tlyfatrbcw"); // bezier bz; UNSUPPORTED("2hacb9fdt2n4mkiveluxkiu2e"); // bz = spl->list[0]; UNSUPPORTED("dtt0q54ov71fji9i2ae24aeyc"); // if (bz.sflag) { UNSUPPORTED("4wazlko0bxmzxoobqacij1btk"); // *p = bz.sp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("3gwxodchk1jdid7jbltvxhnaf"); // *p = bz.list[0]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6pj4gaguml8ocln5h92kpqk94"); // bz = spl->list[spl->size - 1]; UNSUPPORTED("4o7tep38o3pxavxbzw15khp2r"); // if (bz.eflag) { UNSUPPORTED("78u9nvs8u7rxturidz5nf8hn4"); // *q = bz.ep; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("3kkyg7t050mn59a1ekp0f0lzj"); // *q = bz.list[bz.size - 1]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4v696uonfsqf7e6iafx99ovoj // static pointf polylineMidpoint (splines* spl, pointf* pp, pointf* pq) public static Object polylineMidpoint(Object... arg) { UNSUPPORTED("2zzd7mrm2u540dwuyzehozffj"); // static pointf UNSUPPORTED("2h8atayvi2acugdlg0pai43ib"); // polylineMidpoint (splines* spl, pointf* pp, pointf* pq) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("37thdceezsvepe7tlyfatrbcw"); // bezier bz; UNSUPPORTED("88fnnm6x9xzbtbojfr24qfqgy"); // int i, j, k; UNSUPPORTED("ejxa966mpm7v3o59230r3vwjz"); // double d, dist = 0; UNSUPPORTED("8nmqlo5bwer36kl8mp1gtz5bf"); // pointf pf, qf, mf; UNSUPPORTED("4z4l1zu33m72iirxmuhdg36iw"); // for (i = 0; i < spl->size; i++) { UNSUPPORTED("ewoeh3d6otc2rgpaxuzwm38x7"); // bz = spl->list[i]; UNSUPPORTED("99as77xwpn23hvyqfywj6oi2g"); // for (j = 0, k=3; k < bz.size; j+=3,k+=3) { UNSUPPORTED("2gecyey0ki14xgfwd8lmdmexb"); // pf = bz.list[j]; UNSUPPORTED("apnzdgopwxw4q1fw7qtnifypo"); // qf = bz.list[k]; UNSUPPORTED("829tfml4q5a7brr6x4nun2cuc"); // dist += DIST(pf, qf); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("em4an03o2ddsawe30b5l50d8k"); // dist /= 2; UNSUPPORTED("4z4l1zu33m72iirxmuhdg36iw"); // for (i = 0; i < spl->size; i++) { UNSUPPORTED("ewoeh3d6otc2rgpaxuzwm38x7"); // bz = spl->list[i]; UNSUPPORTED("99as77xwpn23hvyqfywj6oi2g"); // for (j = 0, k=3; k < bz.size; j+=3,k+=3) { UNSUPPORTED("2gecyey0ki14xgfwd8lmdmexb"); // pf = bz.list[j]; UNSUPPORTED("apnzdgopwxw4q1fw7qtnifypo"); // qf = bz.list[k]; UNSUPPORTED("9efld0l6jtgzu237fqme6vlih"); // d = DIST(pf,qf); UNSUPPORTED("uolmj8tx8ul9z4zxcs6xt03h"); // if (d >= dist) { UNSUPPORTED("5pequ7xrb4otn4nmoo4xzbppn"); // *pp = pf; UNSUPPORTED("6y0c82r8tb4tcxzx62aes05hf"); // *pq = qf; UNSUPPORTED("43wwwo6k1nlge8ou0cyuxjsws"); // mf.x = ((qf.x*dist) + (pf.x*(d-dist)))/d; UNSUPPORTED("7rndnud8ft5vs2kx1fjwhymtm"); // mf.y = ((qf.y*dist) + (pf.y*(d-dist)))/d; UNSUPPORTED("9t6wng08fgzru4uhripezjnkg"); // return mf; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("9pooqnj2v1895ue6jlimhrxgr"); // dist -= d; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8kllckmfkh8837qtc8hwoh74j"); // assert (0); /* should never get here */ UNSUPPORTED("cs6egh6pje9pqxb748vbj2q51"); // return mf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8hpmwzlqbj1nii32zubbe9hru // pointf edgeMidpoint (graph_t* g, edge_t * e) public static Object edgeMidpoint(Object... arg) { UNSUPPORTED("ddgobb6cu0307nl6cc2hm7jak"); // pointf UNSUPPORTED("8ww957bkesrmzkmuchx2pvhb2"); // edgeMidpoint (graph_t* g, edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cx1drb9eui5nioe70lvmlgm79"); // int et = (GD_flags(g) & (7 << 1)); UNSUPPORTED("2auwjymmiryq94uc6spzynrvi"); // pointf d, spf, p, q; UNSUPPORTED("bpo1twbinspgdzr5k3fmntxtg"); // endPoints(ED_spl(e), &p, &q); UNSUPPORTED("4yaabujbmowa3lyxk4205gkpv"); // if (APPROXEQPT(p, q, MILLIPOINT)) { /* degenerate spline */ UNSUPPORTED("7i8m5mpfnv7m9uqxh015zfdaj"); // spf = p; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bpe21xennpxofkh2a8ce70n8r"); // else if ((et == (5 << 1)) || (et == (2 << 1))) { UNSUPPORTED("6frrlsqvrym5x5bivjwo3rkg4"); // d.x = (q.x + p.x) / 2.; UNSUPPORTED("5qa6kgh9e0trsgfkiwhzxtc5n"); // d.y = (p.y + q.y) / 2.; UNSUPPORTED("dn0aho2lzwtnxuk3v45gd81fo"); // spf = dotneato_closest(ED_spl(e), d); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2flg4ooa026ob187pje77te28"); // else { /* ET_PLINE, ET_ORTHO or ET_LINE */ UNSUPPORTED("6he3hi05vusuthrchn4enk7o6"); // spf = polylineMidpoint (ED_spl(e), &p, &q); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("56kh0ww24ygwjntzmm9q6wec3"); // return spf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3msxu7tuq8q3m0sqtthq29flm // void addEdgeLabels(graph_t* g, edge_t * e, pointf rp, pointf rq) public static Object addEdgeLabels(Object... arg) { UNSUPPORTED("ldo41gaevp1jys68pnbguk3z"); // void addEdgeLabels(graph_t* g, edge_t * e, pointf rp, pointf rq) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("as6htoa1c0fv7e0v9a7h98p5h"); // makePortLabels(e); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 54bdrq95zwpwmxf86ln5eom99 // int place_portlabel(edge_t * e, boolean head_p) public static Object place_portlabel(Object... arg) { UNSUPPORTED("bnu1zhg128g969c502d6btzbs"); // int place_portlabel(edge_t * e, boolean head_p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2l3ombz9fng1wmxwdgkjokemn"); // textlabel_t *l; UNSUPPORTED("6tl9mepc2bett364jduh2q4mf"); // splines *spl; UNSUPPORTED("3hs99atzl1l857khumt6ycmbh"); // bezier *bez; UNSUPPORTED("7dsz4anx5o7u9qq3lzzknay2f"); // double dist, angle; UNSUPPORTED("65fz6d9e07e4c95zyum8bt633"); // pointf c[4], pe, pf; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("8l8zbwbivibv6xgq0pxgwvq9n"); // char* la; UNSUPPORTED("e5b3d0nivpt5k8dkz65otlbpz"); // char* ld; UNSUPPORTED("2kp0srstg11z7hyemmxoo4e52"); // if (ED_edge_type(e) == 6) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("chxgak0231km4auc7310y9pk8"); // /* add label here only if labelangle or labeldistance is defined; else, use external label */ UNSUPPORTED("t397yg339z571sgse05vtq1w"); // if ((!E_labelangle || (*(la = agxget(e,E_labelangle)) == '\0')) && UNSUPPORTED("8uvkv1d0qbznkf3xuozvc7qzf"); // (!E_labeldistance || (*(ld = agxget(e,E_labeldistance)) == '\0'))) { UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("tm1vvm5oplen4vv9y7lqo6xf"); // l = head_p ? ED_head_label(e) : ED_tail_label(e); UNSUPPORTED("3gtifp1yui3al397n1i9akefw"); // if ((spl = getsplinepoints(e)) == NULL) return 0; UNSUPPORTED("2ia4wsp0i4dpjelpvoiytkbi7"); // if (!head_p) { UNSUPPORTED("7ahdd5aq924y6mwot89trjyra"); // bez = &spl->list[0]; UNSUPPORTED("efd82pfo3nyqu51w9264hj3kl"); // if (bez->sflag) { UNSUPPORTED("47udgszrx6pdd38kn2sweuhwh"); // pe = bez->sp; UNSUPPORTED("e5nb3zmvz6fp6xqkor9i4yf0"); // pf = bez->list[0]; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("61yxghl3kwjuso7s1p0n7t1n2"); // pe = bez->list[0]; UNSUPPORTED("ced0y25bh0hjo9cnppppf7h2x"); // for (i = 0; i < 4; i++) UNSUPPORTED("1y5d5t4i694a5f0j7ee6a7z2y"); // c[i] = bez->list[i]; UNSUPPORTED("92m7eg16654p0n58cwr883aqa"); // pf = Bezier(c, 3, 0.1, NULL, NULL); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("4s7tr233odbsuhmyc1ksdmnjs"); // bez = &spl->list[spl->size - 1]; UNSUPPORTED("5d2ntg5cm9vsqeat2p88bel1l"); // if (bez->eflag) { UNSUPPORTED("er4lbg8eptuapclxc4o7sqvam"); // pe = bez->ep; UNSUPPORTED("91krm055d5o8geih7ot17sp97"); // pf = bez->list[bez->size - 1]; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("70e7dqxnvd7agtj92eve28u4r"); // pe = bez->list[bez->size - 1]; UNSUPPORTED("ced0y25bh0hjo9cnppppf7h2x"); // for (i = 0; i < 4; i++) UNSUPPORTED("7v8xa8y04nup6v5cwzsdkqs2z"); // c[i] = bez->list[bez->size - 4 + i]; UNSUPPORTED("8pbi2gjbe0mg3ghpfkt7kwpm9"); // pf = Bezier(c, 3, 0.9, NULL, NULL); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("14iusq03pj0vtm5mkr4ny0o1y"); // angle = atan2(pf.y - pe.y, pf.x - pe.x) + UNSUPPORTED("2jyhji8yxpqj21l189dgr1wcz"); // RADIANS(late_double(e, E_labelangle, -25, -180.0)); UNSUPPORTED("5ibf647cm3agxlbdzq27a2sed"); // dist = 10 * late_double(e, E_labeldistance, 1.0, 0.0); UNSUPPORTED("etyjtm4uw7xa47lhonum31o4r"); // l->pos.x = pe.x + dist * cos(angle); UNSUPPORTED("b28y7lmoordi3n69md9mfl7k9"); // l->pos.y = pe.y + dist * sin(angle); UNSUPPORTED("5nziiydj5nf07y5wrg22fpu86"); // l->set = NOT(0); UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2tbz9tbkzx8os72qiyhgnby67 // splines *getsplinepoints(edge_t * e) public static splines getsplinepoints(Agedge_s e) { ENTERING("2tbz9tbkzx8os72qiyhgnby67","getsplinepoints"); try { Agedge_s le; splines sp; for (le = e; N(sp = ED_spl(le)) && ED_edge_type(le) != 0; le = ED_to_orig(le)); if (sp == null) UNSUPPORTED("8oq6gemxrb07hmmw0gtux7os5"); // agerr (AGERR, "getsplinepoints: no spline points available for edge (%s,%s)\n", // UNSUPPORTED("bw49w8tpkv5eblsevof4kelef"); // agnameof(agtail(e)), agnameof(aghead(e))); return sp; } finally { LEAVING("2tbz9tbkzx8os72qiyhgnby67","getsplinepoints"); } } } plantuml-1.2017.15/src/gen/lib/common/strcasecmp__c.java000066400000000000000000000047561312650303100227400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.JUtils.tolower; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import smetana.core.CString; public class strcasecmp__c { //3 22n1uekxezky6gx3cn22ansew // int strcasecmp(const char *s1, const char *s2) public static int strcasecmp(CString s1, CString s2) { ENTERING("22n1uekxezky6gx3cn22ansew","strcasecmp"); try { while ((s1.charAt(0) != '\0') && (tolower(s1.charAt(0)) == tolower(s2.charAt(0)))) { s1=s1.plus(1); s2=s2.plus(1); } return tolower(s1.charAt(0)) - tolower(s2.charAt(0)); } finally { LEAVING("22n1uekxezky6gx3cn22ansew","strcasecmp"); } } } plantuml-1.2017.15/src/gen/lib/common/strncasecmp__c.java000066400000000000000000000061061312650303100231050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.Macro.UNSUPPORTED; public class strncasecmp__c { //3 6fpqvqq5eso7d44vai4lz77jd // int strncasecmp(const char *s1, const char *s2, unsigned int n) public static Object strncasecmp(Object... arg) { UNSUPPORTED("41sf831iel4ggk6nxgerc7lrz"); // int strncasecmp(const char *s1, const char *s2, unsigned int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f0os7tzuki1s9mllsml3zu2fd"); // if (n == 0) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("18ggb7ihy0resf5qhplc7cqol"); // while ((n-- != 0) UNSUPPORTED("7tdf84gz2hakxs756j3v0w4iv"); // && (tolower(*(unsigned char *) s1) == UNSUPPORTED("co97u0db3a8mz1pp77hkxq0h3"); // tolower(*(unsigned char *) s2))) { UNSUPPORTED("2jr0cuzm9i39xecgxx0ih0ez4"); // if (n == 0 || *s1 == '\0' || *s2 == '\0') UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("2hh1h5gydepd3ut3g43bzn51g"); // s1++; UNSUPPORTED("7x8zh0pm8zj83pbc2d812jz90"); // s2++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1jrt0skm3a5djo3vfej4kwffc"); // return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/taper__c.java000066400000000000000000000642501312650303100217020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.Macro.UNSUPPORTED; public class taper__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 ds76bidhz8tjxkw6b8aksdvxr // static double currentmiterlimit = 10.0 //3 37hx3k37anj8r9mjvso4soefw // static void addto (stroke_t* p, double x, double y) public static Object addto(Object... arg) { UNSUPPORTED("cxe7x5zvdqcgljx0c0ct5kj7v"); // static void addto (stroke_t* p, double x, double y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2e0v7u9pfngzg11mt4kn3oudg"); // pointf pt; UNSUPPORTED("dl6r4jnwf9tos614e6dxt54nu"); // if (p->nvertices >= p->flags) { UNSUPPORTED("753dl99rp4kb8muohhjnrooiy"); // p->flags =+ 2000; UNSUPPORTED("8gz00abtr7t59howsf2sghq4e"); // p->vertices = RALLOC(p->flags,p->vertices,pointf); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4x5drjd0ygppv2k94igpp68s2"); // pt.x = x; UNSUPPORTED("e8848u2pml7agv3q6uepcvysp"); // pt.y = y; UNSUPPORTED("8cr9bk6he8smdllk7y3v8zfzg"); // p->vertices[p->nvertices++] = pt; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5rbblyx7l2j8x4skajzxqiwaf // static void arcn (stroke_t* p, double x, double y, double r, double a1, double a2) public static Object arcn(Object... arg) { UNSUPPORTED("3jgc82gtsuvmp7kj1sfwtf5uv"); // static void arcn (stroke_t* p, double x, double y, double r, double a1, double a2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5xztbte7ezj843nawd7bvstet"); // double theta; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("82d861gclxfag8nh96t09jxtt"); // addto (p, x+r*cos(a1), y+r*sin(a1)); UNSUPPORTED("bjdcjivokvek6ql06bw4soztx"); // if (r == 0) return; UNSUPPORTED("4lal8jxrwkulr8zpl5stsxkrt"); // while (a2 > a1) a2 -= 2*3.14159265358979323846; UNSUPPORTED("6jidndwc0ed5nlh89cj2ogu5b"); // theta = a1 - a2; UNSUPPORTED("c9ot8wph8hmrzkm7yuzh7gt8s"); // while (theta > 2*3.14159265358979323846) theta -= 2*3.14159265358979323846; UNSUPPORTED("eaugkmo55m6kizyb3gzzzgsr6"); // theta /= (20-1); UNSUPPORTED("8moo8yolmkvvvfll1yxyb984o"); // for (i = 1; i < 20; i++) UNSUPPORTED("7w1xen1rv3ve6ogqu7z1o825y"); // addto (p, x+r*cos(a1-i*theta), y+r*sin(a1-i*theta)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dw4giwrdkygo30ux7h9vqoni5 // static double myatan (double y, double x) public static Object myatan(Object... arg) { UNSUPPORTED("51twbyur0a3vygc4lht7f3yal"); // static double myatan (double y, double x) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9gol5nm38e942ve1ebl1cjtlv"); // double v; UNSUPPORTED("1z65rccjdrspxqoaj9qq5gs3q"); // if ((x == 0) && (y == 0)) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("adiklywz2pj2zlyyhhy8y244r"); // v = atan2 (y, x); UNSUPPORTED("7jmcb4vgz4sib476up6ourg67"); // if (v >= 0) return v; UNSUPPORTED("9xbltmwvt8lkbkt3dyvsyyrnc"); // else return (v + 2*3.14159265358979323846); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 apxlatl0g1hcl36pozo9rbijz // static double mymod (double original, double modulus) public static Object mymod(Object... arg) { UNSUPPORTED("4lzz822wr9xogvbkxwq2p4djj"); // static double mymod (double original, double modulus) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9gol5nm38e942ve1ebl1cjtlv"); // double v; UNSUPPORTED("7xrcngwvajpif9r69m54w64a2"); // if ((original < 0) || (original >= modulus)) { UNSUPPORTED("6arshdtqlpzcb2x8apa4d2uvk"); // v = -floor(original/modulus); UNSUPPORTED("9tazzesrwxgrdbwb9mkvvptt6"); // return ((v*modulus) + original); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ay7iouy5jqpu5z9qk1zp0duie"); // return original; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3vkg7w3ke5ee59segqqkwid17 // static vararr_t* newArr (void) public static Object newArr(Object... arg) { UNSUPPORTED("6oi8ug46evw6d3gxiiqkxwu30"); // static vararr_t* UNSUPPORTED("4vfh8nqxhykygdmg0ifzha82l"); // newArr (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("417k87o0rksmn0vw9xy6t0rfv"); // vararr_t* arr = (vararr_t*)zmalloc(sizeof(vararr_t)); UNSUPPORTED("ar8weg5zgsytfffj61bksv2nt"); // arr->cnt = 0; UNSUPPORTED("3nl7c4g3pzkgqswnj7h45v3ev"); // arr->sz = 2000; UNSUPPORTED("bfzoantmopqk4byg4d7kmi770"); // arr->pts = (pathpoint*)zmalloc((2000)*sizeof(pathpoint)); UNSUPPORTED("ccsfhshi4ig5z5la1ju1x9cnc"); // return arr; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 emanczpl0fr5cs8t1tgvka2ua // static void insertArr (vararr_t* arr, pointf p, double l) public static Object insertArr(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("8v67nvmyz4yxnupb82f54jk9g"); // insertArr (vararr_t* arr, pointf p, double l) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("kahpad7jk1hodmjj808l7dxq"); // if (arr->cnt >= arr->sz) { UNSUPPORTED("7z6erqvmbkm9sl7i89ix3t8vr"); // arr->sz *= 2; UNSUPPORTED("99tebe4imvyc4desymrfhljd7"); // arr->pts = RALLOC(arr->sz,arr->pts,pathpoint); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("br1mk0jed98vu2xl7x2nbcm7s"); // arr->pts[arr->cnt].x = p.x; UNSUPPORTED("b1mytlmkf0s950zn7gs74k4br"); // arr->pts[arr->cnt].y = p.y; UNSUPPORTED("4f7855jr9oovy4nov96abulma"); // arr->pts[arr->cnt++].lengthsofar = l; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 djrl04e0hnm9z4c9mygp3kdjn // static void fixArr (vararr_t* arr) public static Object fixArr(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("82xx4q98200g4y3mpp3pal2li"); // fixArr (vararr_t* arr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1dn0v5t5wbzicbbr44xf4fr0t"); // if (arr->sz > arr->cnt) UNSUPPORTED("3vugzps0w4i557rlkmjan8p29"); // arr->pts = RALLOC(arr->cnt,arr->pts,pathpoint); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dkncnskx3m00uje3cgv41ijdt // static void freeArr (vararr_t* arr) public static Object freeArr(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("54u81fh95rxlpha3qyk9ehb7c"); // freeArr (vararr_t* arr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("arje9cheuqn10vynbk56ukz3e"); // free (arr->pts); UNSUPPORTED("amydox92cqc7sp8tpkooy0l04"); // free (arr); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2vfkvxso8rdk46al15j439ju // static double l2dist (pointf p0, pointf p1) public static Object l2dist(Object... arg) { UNSUPPORTED("1pz4c8sn3juc1g2fhezjnpmd2"); // static double l2dist (pointf p0, pointf p1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7eagovsf8qdkhnna5ttw91v6f"); // double delx = p0.x - p1.x; UNSUPPORTED("63axa60soz954naurv3tp4093"); // double dely = p0.y - p1.y; UNSUPPORTED("45ran48pxafslteww0nkr0oy9"); // return sqrt(delx*delx + dely*dely); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e8z50dab6k0lk9eru6tpkypvs // static vararr_t* pathtolines (bezier* bez, double initwid) public static Object pathtolines(Object... arg) { UNSUPPORTED("4co20l0j4xlm1zv7bjwz9elqo"); // static vararr_t* pathtolines (bezier* bez, double initwid) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e94cztctbqq9ucd7n67ebdges"); // int i, j, step; UNSUPPORTED("7qswbkiwqvj5o23nxscn2xzu3"); // double seglen, linelen = 0; UNSUPPORTED("35ncr2n01679jn6xdx7lovbxg"); // vararr_t* arr = newArr(); UNSUPPORTED("4rrhn7tnwemc4ar7wq0j96kev"); // pointf p0, p1, V[4]; UNSUPPORTED("amd6cyu1q1eots437g00w8phx"); // int n = bez->size; UNSUPPORTED("8ifezqgmvyo8z6wf0qcatnztd"); // pointf* A = bez->list; UNSUPPORTED("eia2p2xwqw8mqn9dfliiurrr7"); // insertArr (arr, A[0], 0); UNSUPPORTED("5mspz8cilygav1eq04djl7dlf"); // V[3] = A[0]; UNSUPPORTED("3s0blwgctqa0ygs872bnu4kye"); // for (i = 0; i + 3 < n; i += 3) { UNSUPPORTED("76skw6ffgj23bchkntqtrfcq7"); // V[0] = V[3]; UNSUPPORTED("6lhc8cdnbz2nu3rhz57v5dmc1"); // for (j = 1; j <= 3; j++) UNSUPPORTED("37fsp14ok0vo02898upd62lqp"); // V[j] = A[i + j]; UNSUPPORTED("93nos5j5xytqabt45wbg4czil"); // p0 = V[0]; UNSUPPORTED("335n0b4zult6fp5ic3mco2xkw"); // for (step = 1; step <= 20; step++) { UNSUPPORTED("3rli8h9x69lwpiayu0y0gcaoo"); // p1 = Bezier(V, 3, (double) step / 20, (void *)0, (void *)0); UNSUPPORTED("bxa5icduvxvktsbhy894m25nv"); // seglen = l2dist(p0, p1); UNSUPPORTED("ci98ubpynj2u3wr63q30b8ddv"); // /* If initwid is large, this may never happen, so turn off. I assume this is to prevent UNSUPPORTED("197sucveb3ncj66y77a2lmirt"); // * too man points or too small a movement. Perhaps a better test can be made, but for now UNSUPPORTED("6aqlkwuxiu1jk3hcwywqtptfx"); // * we turn it off. UNSUPPORTED("20m1lc1moer8x00tx9ceto0iw"); // */ UNSUPPORTED("ad24rtknwvng9ifrqti3z182a"); // /* if (seglen > initwid/10) { */ UNSUPPORTED("at53x9272ok7viedn52tfmxs9"); // linelen += seglen; UNSUPPORTED("avlslqeh4lqlpuft9gvcskcgl"); // insertArr (arr, p1, linelen); UNSUPPORTED("34uyo5h2d2cr1gy61yie7txem"); // /* } */ UNSUPPORTED("c5vgyvjtvlhaldki4knu2mv25"); // p0 = p1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cqyo311cnd0n23sijmv5k82l1"); // fixArr (arr); UNSUPPORTED("a1fj3h2aqltc9pidvjej8cxlf"); // /* printArr (arr, stderr); */ UNSUPPORTED("ccsfhshi4ig5z5la1ju1x9cnc"); // return arr; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5tozuy492rmd5etcp98dlqt1y // static void drawbevel(double x, double y, double lineout, int forward, double dir, double dir2, int linejoin, stroke_t* p) public static Object drawbevel(Object... arg) { UNSUPPORTED("2qy6fcr5q2i7bkdxvzzwrz570"); // static void drawbevel(double x, double y, double lineout, int forward, double dir, double dir2, int linejoin, stroke_t* p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5kph4zx0cyuidmd7x1cloedsi"); // double a, a1, a2; UNSUPPORTED("d10oqu9tn28o7bzq83fvol955"); // if (forward) { UNSUPPORTED("doysnlmgd1gow0os5wr5dxr0h"); // a1 = dir; UNSUPPORTED("26ao9suwlr5unltg4xdoi9lj8"); // a2 = dir2; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("7vwlht2qk7zqu6kifv69i7bt5"); // a1 = dir2; UNSUPPORTED("1r5bjzpwx8a3ne8vmn2nxcu52"); // a2 = dir; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6iax8tt6lrdck8goujhk00hs5"); // if (linejoin == 1) { UNSUPPORTED("4ecnnr5gsgd13e2t8959l3t4f"); // a = a1 - a2; UNSUPPORTED("3cwtamgprrppba01yard7r24n"); // if (a <= (3.14159265358979323846*(0.1)/180.0)) a += (3.14159265358979323846*(360)/180.0); UNSUPPORTED("3eqjj4tj5gjh8o4bot8pslbjt"); // if (a < (3.14159265358979323846*(180)/180.0)) { UNSUPPORTED("6f4cxd2owe51qjtpf2g2qgqa6"); // a1 = a + a2; UNSUPPORTED("2w6rakjxhdggmu2moctdxufk7"); // arcn (p,x,y,lineout,a1,a2); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("eukl7uoeeewpjnm0z5fnpne38"); // addto(p,x + lineout*cos(a2),x + lineout*sin(a2)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("90zyfikk81hiajwc2bh8qzemz"); // addto(p,x + lineout*cos(a2),x + lineout*sin(a2)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 67jgk3x4cvr5g5sjkktz9hv3p // stroke_t* taper (bezier* bez, radfunc_t radfunc, double initwid, int linejoin, int linecap) public static Object taper(Object... arg) { UNSUPPORTED("92uf8ujxvbmb009ow0y2ylc28"); // stroke_t* taper (bezier* bez, radfunc_t radfunc, double initwid, int linejoin, int linecap) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ebpurc5lht6x0pe8utbovvtkj"); // int i, l, n; UNSUPPORTED("23t8ciiwx0m0urylqh0rdj45f"); // int pathcount, bevel; UNSUPPORTED("aap39s7rrs42rpqb2wnwm1wac"); // double direction=0, direction_2=0; UNSUPPORTED("9m9xu2pqfgvlgbaera9r5bslu"); // vararr_t* arr = pathtolines (bez, initwid); UNSUPPORTED("3zu7p7qd5hfut9413f9nua2hp"); // pathpoint* pathpoints; UNSUPPORTED("8400pubdu8b37sik81zlon17q"); // pathpoint cur_point, last_point, next_point; UNSUPPORTED("e2l5uh8yuami4r4nsytajt49e"); // double x=0, y=0, dist; UNSUPPORTED("z9q8a6k36ts2dcgz6b1uro9f"); // double nx, ny, ndir; UNSUPPORTED("8rityqi74uqjkie4xszf2cz9s"); // double lx, ly, ldir; UNSUPPORTED("exc47riargr44o24fo7dq38pf"); // double lineout=0, linerad=0, linelen=0; UNSUPPORTED("dim9rt5u8affmln2pricl9c4z"); // double theta, phi; UNSUPPORTED("bcjf9eyzp0bx4ace27dfpdpkr"); // stroke_t* p; UNSUPPORTED("d43stoip4tcodq33ekkdc2o2d"); // pathcount = arr->cnt; UNSUPPORTED("3ahpl1jbl65q1xb0s2y138jat"); // pathpoints = arr->pts; UNSUPPORTED("78l26kaqv5ovbmh3w047sqyk4"); // linelen = pathpoints[pathcount-1].lengthsofar; UNSUPPORTED("9uu6i69mrs8oofgu1thnoeh6s"); // /* determine miter and bevel points and directions */ UNSUPPORTED("9p5eqhc57q744jswt4xn49de5"); // for (i = 0; i < pathcount; i++) { UNSUPPORTED("ayjwp7w7mt18negnhgj0sbv59"); // l = mymod(i-1,pathcount); UNSUPPORTED("32kv4nbdjmjk22m6e7utdtur6"); // n = mymod(i+1,pathcount); UNSUPPORTED("6sepicym4lwb144speybi5pdm"); // cur_point = pathpoints[i]; UNSUPPORTED("904onk81tz0s5sep0j6awgdpb"); // x = cur_point.x; UNSUPPORTED("agtncoxbpms9wwt2ie97e47g4"); // y = cur_point.y; UNSUPPORTED("1tbip84gxxj24fbdv8razb8ro"); // dist = cur_point.lengthsofar; UNSUPPORTED("dyj2zbknry7a1x9ebao54p2px"); // next_point = pathpoints[n]; UNSUPPORTED("4q9nd7a8vv14sz57dz10eti4i"); // nx = next_point.x; UNSUPPORTED("34m4u9clc8vse172ui6o7luyc"); // ny = next_point.y; UNSUPPORTED("el8hvvq8ozxy51a09pf45t6lm"); // ndir = myatan (ny-y, nx-x); UNSUPPORTED("bp3rn8j3uu5wtuh39yht2wahr"); // last_point = pathpoints[l]; UNSUPPORTED("31sunwg5bgedjub9bgaudnn2w"); // lx = last_point.x; UNSUPPORTED("byfvt2pin8q8aaf4dw9kmo4f7"); // ly = last_point.y; UNSUPPORTED("21ekhwbbxmjwb10twls4jflzo"); // ldir = myatan (ly-y, lx-x); UNSUPPORTED("939fjejhngctxdmxbb5koezq6"); // bevel = 0; UNSUPPORTED("75eizgg2kuilkz07e5n9331yb"); // direction_2 = 0; UNSUPPORTED("9ibtpydrwwm9mu7z4303ioce6"); // /* effective line radius at this point */ UNSUPPORTED("3b0kp7ld95slxpcdcfrm9g3f9"); // linerad = radfunc(dist, linelen, initwid); UNSUPPORTED("17tfbs98ueshh3kxz0go6y28e"); // if ((i == 0) || (i == pathcount-1)) { UNSUPPORTED("c8k6abykr9kofwd7w2eh7wets"); // lineout = linerad; UNSUPPORTED("1zc3rhfsp70axt1st8ezyeucz"); // if (i == 0) { UNSUPPORTED("xs2p6fe1nq08icjrthobqees"); // direction = ndir + (3.14159265358979323846*(90)/180.0); UNSUPPORTED("6jhf2qmn6za8kr9w3auf58zfz"); // if (linecap == 2) { UNSUPPORTED("7gc6ece8x7l8lvlz5qkpw4jzk"); // x -= cos(ndir)*lineout; UNSUPPORTED("4oclmr8htzwxbgvwqgpotjkm0"); // y -= sin(ndir)*lineout; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("197wgta2k2gjicruujcxk2pxw"); // direction = ldir - (3.14159265358979323846*(90)/180.0); UNSUPPORTED("6jhf2qmn6za8kr9w3auf58zfz"); // if (linecap == 2) { UNSUPPORTED("52z8fu32uav0121o0kglvopfx"); // x -= cos(ldir)*lineout; UNSUPPORTED("740qs0z13dreer6os7d1lx38v"); // y -= sin(ldir)*lineout; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ap3owlr7o0jc1ahvdhqcjdqiq"); // direction_2 = direction; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("3wc8w7ht9a70rdtiofq8deau6"); // theta = ndir-ldir; UNSUPPORTED("bvc7byx1cwqmqnclfhzwox2k1"); // if (theta < 0) { UNSUPPORTED("20oornlkswqxxeufgzx9ax2i3"); // theta += (3.14159265358979323846*(360)/180.0); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("e7t2i7fgzowrk1ntx7cwh49id"); // phi = (3.14159265358979323846*(90)/180.0)-(theta/2); UNSUPPORTED("5dvmkcy9yqb2cc6rgmduj5b1c"); // /* actual distance to junction point */ UNSUPPORTED("8upqw3s8k892ep29pvt7cbki"); // if (cos(phi) == 0) { UNSUPPORTED("937cpmx6ugu8zzrr5aoylcqs6"); // lineout = 0; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("9c90i4xl89nygyndfayv4s29m"); // lineout = linerad/(cos(phi)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("c3j9s1x9zzozcg3mbp65k5itk"); // /* direction to junction point */ UNSUPPORTED("252vewuhexhnz6vj97f65w9zx"); // direction = ndir+(3.14159265358979323846*(90)/180.0)+phi; UNSUPPORTED("eobcnlcqwz1dximq5qhsa3i9s"); // if ((0 != linejoin) || (lineout > currentmiterlimit * linerad)) { UNSUPPORTED("31r3m1070akd0cf4vzq3qfaro"); // bevel = (!(0)); UNSUPPORTED("67w6qhlogp4d7uf18s35pj3wy"); // lineout = linerad; UNSUPPORTED("42maeq9w00m591r12lzegzu8y"); // direction = mymod(ldir-(3.14159265358979323846*(90)/180.0),(3.14159265358979323846*(360)/180.0)); UNSUPPORTED("avrmbklsobjff22asjbr5tgdf"); // direction_2 = mymod(ndir+(3.14159265358979323846*(90)/180.0),(3.14159265358979323846*(360)/180.0)); UNSUPPORTED("asm15sr4a6kydzpud2plsmxs0"); // if (i == pathcount-1) { UNSUPPORTED("eycx11cl9aeikjk5ekwb81go3"); // bevel = 0; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("dax7iiwvwzxlxymfmj1tjdihy"); // direction_2 = direction; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2q8u8grbi0h42y635qyr9v3qc"); // pathpoints[i].x = x; UNSUPPORTED("bhlm48hrfr2mg0if526u3iguo"); // pathpoints[i].y = y; UNSUPPORTED("957rrx269yqwuiikvpvy3ffpm"); // pathpoints[i].lengthsofar = dist; UNSUPPORTED("3helgp0v0pqd09d8ax7jah2mb"); // pathpoints[i].type = 'l'; UNSUPPORTED("3y6rmj5f7rvq2ebwgnvd1fgjq"); // pathpoints[i].dir = direction; UNSUPPORTED("1dvyxwcwbtzahsn4h6caxv445"); // pathpoints[i].lout = lineout; UNSUPPORTED("mmiievlimn4w1lptlh3llroz"); // pathpoints[i].bevel = bevel; UNSUPPORTED("er888lbd8xz64adkkzbqyfwh1"); // pathpoints[i].dir2 = direction_2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ckcfut3hsl9z3mkr48i07xreq"); // /* draw line */ UNSUPPORTED("9r6b4bedc1rhpyql4jb2csd4n"); // p = (stroke_t*)zmalloc(sizeof(stroke_t)); UNSUPPORTED("70i20pyvm032opmt0lw7ygegp"); // /* side 1 */ UNSUPPORTED("9p5eqhc57q744jswt4xn49de5"); // for (i = 0; i < pathcount; i++) { UNSUPPORTED("6sepicym4lwb144speybi5pdm"); // cur_point = pathpoints[i]; UNSUPPORTED("904onk81tz0s5sep0j6awgdpb"); // x = cur_point.x; UNSUPPORTED("agtncoxbpms9wwt2ie97e47g4"); // y = cur_point.y; UNSUPPORTED("3u4hay46briisll392jdya23v"); // direction = cur_point.dir; UNSUPPORTED("1uct0gb7zqtj7385nbdnzyj0c"); // lineout = cur_point.lout; UNSUPPORTED("d9xs9uakpataixjavhuod06ig"); // bevel = cur_point.bevel; UNSUPPORTED("bf8qe3co9ovp0li3u7k7pqr9i"); // direction_2 = cur_point.dir2; UNSUPPORTED("9498bdr7ojnwbc5q4bfmdqha9"); // if (i == 0) { UNSUPPORTED("8qzin254lieocy18s2q55bb07"); // addto(p,x+cos(direction)*lineout,y+sin(direction)*lineout); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("8qzin254lieocy18s2q55bb07"); // addto(p,x+cos(direction)*lineout,y+sin(direction)*lineout); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("euyvq7b75qnuktu6n6n1hvj1i"); // if (bevel) { UNSUPPORTED("bzgn4n0vstnr0nc3pqwub40eo"); // drawbevel (x, y, lineout, (!(0)), direction, direction_2, linejoin, p); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a4jnqx1pmpp8rz85lpaqyfnj9"); // /* end circle as needed */ UNSUPPORTED("7ibh2c9hlo51dzs6o9tk8xhh0"); // if (linecap == 1) { UNSUPPORTED("a8b7151pm774jksu8gm13tsa0"); // arcn (p, x,y,lineout,direction,direction+(3.14159265358979323846*(180)/180.0)); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("8ckgm7yw5o3kj12au3908fqin"); // direction += (3.14159265358979323846*(180)/180.0); UNSUPPORTED("385y1xwu0kh9i0679xwfgdhfi"); // addto(p,x+cos(direction)*lineout,y+sin(direction)*lineout); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1odd6xfcmpix4iwcbi07a3yet"); // /* side 2 */ UNSUPPORTED("9sytul5918tuv13gjz3sxy4x3"); // for (i = pathcount-2; i >= 0; i--) { UNSUPPORTED("6sepicym4lwb144speybi5pdm"); // cur_point = pathpoints[i]; UNSUPPORTED("904onk81tz0s5sep0j6awgdpb"); // x = cur_point.x; UNSUPPORTED("agtncoxbpms9wwt2ie97e47g4"); // y = cur_point.y; UNSUPPORTED("8uvc4rfbx29lnuzfihxx9p2td"); // direction = cur_point.dir + (3.14159265358979323846*(180)/180.0); UNSUPPORTED("1uct0gb7zqtj7385nbdnzyj0c"); // lineout = cur_point.lout; UNSUPPORTED("d9xs9uakpataixjavhuod06ig"); // bevel = cur_point.bevel; UNSUPPORTED("g0kdlqos9c7lovlj90k934dl"); // direction_2 = cur_point.dir2 + (3.14159265358979323846*(180)/180.0); UNSUPPORTED("z8wmez9u4a021s05d5cxi6wa"); // addto(p,x+cos(direction_2)*lineout,y+sin(direction_2)*lineout); UNSUPPORTED("ezt2dhrkjlk2egdubwm3lhef7"); // if (bevel) { UNSUPPORTED("66s1i3eyqfiswvzoblil8b24c"); // drawbevel (x, y, lineout, 0, direction, direction_2, linejoin, p); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2bichl6gosxd9wgzvd6uklrf5"); // /* start circle if needed */ UNSUPPORTED("7ibh2c9hlo51dzs6o9tk8xhh0"); // if (linecap == 1) { UNSUPPORTED("a8b7151pm774jksu8gm13tsa0"); // arcn (p, x,y,lineout,direction,direction+(3.14159265358979323846*(180)/180.0)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("f2o2l2qwk02ukzyk8zpg7ti5k"); // /* closepath (p); */ UNSUPPORTED("aqhe2lewlygs1royfxfz4cso5"); // freeArr (arr); UNSUPPORTED("91xduilalb406jjyw2g1i07th"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5p2ry36pn9erx76ct8agwj29j // static double halffunc (double curlen, double totallen, double initwid) public static Object halffunc(Object... arg) { UNSUPPORTED("9tja24cimn4bxxvgebqx1p7g6"); // static double halffunc (double curlen, double totallen, double initwid) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7w1a8rqs29lelmnia96oa58f9"); // return ((1 - (curlen/totallen))*initwid/2.0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9atumni48eq11oedwpruqobkj // stroke_t* taper0 (bezier* bez, double initwid) public static Object taper0(Object... arg) { UNSUPPORTED("8flvjq0yy9wk9rlpxmqius1l1"); // stroke_t* taper0 (bezier* bez, double initwid) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84s227sd2ewmv1s2g5fisnfux"); // return taper(bez, halffunc, initwid, 0, 0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/textspan__c.java000066400000000000000000000771211312650303100224360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.GVC_s; import h._dt_s; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__ptr__; import smetana.core.__struct__; public class textspan__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 2ij5ud0czexs3gf9qyg15sna0 // static double timesFontWidth[] = //1 15m2jpfaemvlv4wwvfprbkca8 // static double arialFontWidth[] = //1 736czmqcnj402ij7367e13rvf // static double courFontWidth[] = //3 c5mvc1s1l5vtwvqfbwwlzvb2k // static void estimate_textspan_size(textspan_t * span, char **fontpath) public static Object estimate_textspan_size(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("bz0vk28zh43zq01osv1pdbnoy"); // estimate_textspan_size(textspan_t * span, char **fontpath) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7cumpe2owb4p5ob3vhxkxozet"); // double *Fontwidth, fontsize; UNSUPPORTED("8ul52kili9s5z4d2tb4ciq5fk"); // char c, *p, *fpp, *fontname; UNSUPPORTED("gqcoiz3smahq7t9pizb8mu5t"); // fontname = span->font->name; UNSUPPORTED("b4qovx8fo3dz2wxi2ozi00xit"); // fontsize = span->font->size; UNSUPPORTED("7p3v9x3k7k60kgeqnpqm28m2b"); // span->size.x = 0.0; UNSUPPORTED("2hja2plvki9yret53v34jrzuj"); // span->size.y = fontsize * 1.20; UNSUPPORTED("arxrgaeah7bs997uzskiskjn6"); // span->yoffset_layout = 0.0; UNSUPPORTED("80sylfo5oj6eky7rnchp1awln"); // span->yoffset_centerline = 0.1 * fontsize; UNSUPPORTED("122ykarwskperlr1m2dtyh1u6"); // span->layout = NULL; UNSUPPORTED("ci5ep320bpuoad04lihnrl9ox"); // span->free_layout = NULL; UNSUPPORTED("5z317de5yo4y89q75r03ybvs4"); // if (!strncasecmp(fontname, "cour", 4)) { UNSUPPORTED("expuc9yp3ite065nx41vtxc5x"); // fpp = "[internal courier]"; UNSUPPORTED("9k4mto16lsbis6uh6n1ces64u"); // Fontwidth = courFontWidth; UNSUPPORTED("x43p918buqje42n73zkmmq9"); // } else if (!strncasecmp(fontname, "arial", 5) UNSUPPORTED("1w0wpefq5qvjrjlfgpyvtyu1l"); // || !strncasecmp(fontname, "helvetica", 9)) { UNSUPPORTED("46zalgdqorux1vqsw35wr4hug"); // fpp = "[internal arial]"; UNSUPPORTED("aooxzb51suo58rg4jq0yc5efh"); // Fontwidth = arialFontWidth; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("8zxh2mw2ym93g3y0qbuo7b1y2"); // fpp = "[internal times]"; UNSUPPORTED("ba8qp8iosrsts5d8fe3y66vfw"); // Fontwidth = timesFontWidth; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3jp7t7s8b8ho6x5ooevmh14sp"); // if (fontpath) UNSUPPORTED("5mfoy5aawcfowdrruy2p79fox"); // *fontpath = fpp; UNSUPPORTED("bxiz3uoynwbtpj7sczmtlpvwg"); // if ((p = span->str)) { UNSUPPORTED("1d0v6uokvdvo7u0r11gjfdywv"); // while ((c = *p++)) UNSUPPORTED("uulsqewu7tuyaoqlsqrgr6fm"); // span->size.x += Fontwidth[(unsigned char) c]; UNSUPPORTED("ef61tlvpfs09dipj6a0h1rugz"); // /* NOTE: Tables are based on a font of size 1. Need to multiply by UNSUPPORTED("6iewui4j0nakf1x52fizqiwva"); // * fontsize to get appropriate value. UNSUPPORTED("daz6lkpz1mird0mokqvqrv9k6"); // */ UNSUPPORTED("3ueud3s5zgvouyxe67po3p0ez"); // span->size.x *= fontsize; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 8elzy4ma9zrkr1kb4qotvmuvb // static PostscriptAlias postscript_alias[] = //3 2skgvoud1m9bi0twctu87d9w0 // static int fontcmpf(const void *a, const void *b) public static Object fontcmpf(Object... arg) { UNSUPPORTED("cv6ykfir8zyyc5gmbvqflk8az"); // static int fontcmpf(const void *a, const void *b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cwkq5qoprbtbe1sanjmd8nv1j"); // return (strcasecmp(((PostscriptAlias*)a)->name, ((PostscriptAlias*)b)->name)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ch4ydg69bw2im7u9vwmlyqqe6 // static PostscriptAlias* translate_postscript_fontname(char* fontname) public static Object translate_postscript_fontname(Object... arg) { UNSUPPORTED("5uomt2e0iurhuaodxzopllgt6"); // static PostscriptAlias* translate_postscript_fontname(char* fontname) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6jyis2315vduiewgrijlvpdss"); // static PostscriptAlias key; UNSUPPORTED("dsul7ne0n8pgeab5uatmk276y"); // static PostscriptAlias *result; UNSUPPORTED("co97723b0exu2cdgdnzi1ak77"); // if (key.name == NULL || strcasecmp(key.name, fontname)) { UNSUPPORTED("8yilwlv819631lcw5tk9k8iqo"); // key.name = fontname; UNSUPPORTED("buq60ozuorb1j4pw4g4xm8cdq"); // result = (PostscriptAlias *) bsearch((void *) &key, UNSUPPORTED("5jh434yyxpdbk2sru0g10aqx7"); // (void *) postscript_alias, UNSUPPORTED("axfmqs3j7zitn8bx04nej328x"); // sizeof(postscript_alias) / sizeof(PostscriptAlias), UNSUPPORTED("d48qr8ttleon9i6zu2d6lvl27"); // sizeof(PostscriptAlias), UNSUPPORTED("8gxrgdit9jlzc8otezqbsr19o"); // fontcmpf); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e73y2609z2557xahrcvzmcb8e"); // return result; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 n8tcl06mifdn779rzenam44z // pointf textspan_size(GVC_t *gvc, textspan_t * span) public static __struct__ textspan_size(GVC_s gvc, __ptr__ span) { // WARNING!! STRUCT return textspan_size_w_(gvc, span).copy(); } private static __struct__ textspan_size_w_(GVC_s gvc, __ptr__ span) { ENTERING("n8tcl06mifdn779rzenam44z","textspan_size"); try { System.err.println("Warning:textspan_size "+span); span.getStruct("size").setDouble("x", 30); span.getStruct("size").setDouble("y", 20); return span.getStruct("size").copy(); } finally { LEAVING("n8tcl06mifdn779rzenam44z","textspan_size"); } } //3 3bbrz9gqi8j8b5c1fxsnv6txg // static void* textfont_makef(Dt_t* dt, void* obj, Dtdisc_t* disc) public static Object textfont_makef(Object... arg) { UNSUPPORTED("ezwm25dnds89i6n9bz6jxfpyv"); // static void* textfont_makef(Dt_t* dt, void* obj, Dtdisc_t* disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("51vxeragpkjf0vwb07i7dl9x"); // textfont_t *f1 = (textfont_t*)obj; UNSUPPORTED("7j92va3n01tx9nm5lfz6stedq"); // textfont_t *f2 = calloc(1,sizeof(textfont_t)); UNSUPPORTED("5w5r0tig83q9yoy6zhz5o7agc"); // /* key */ UNSUPPORTED("23s5fksqi3wn73kpx2mipfx82"); // if (f1->name) f2->name = strdup(f1->name); UNSUPPORTED("f2zpyj0gm6kd4y0chvzpe3di4"); // if (f1->color) f2->color = strdup(f1->color); UNSUPPORTED("83wzklvzx2pc15wj16qppl4v2"); // f2->flags = f1->flags; UNSUPPORTED("8u1zhn0nsxkxbr1tmt2w8hw1f"); // f2->size = f1->size; UNSUPPORTED("62pprpgc67m2fs16j6p98kin6"); // /* non key */ UNSUPPORTED("cf410wlb1gvcoq8d3oiajaph3"); // f2->postscript_alias = f1->postscript_alias; UNSUPPORTED("9y0cehsmm6fiuv0ibvh9e4gvz"); // return f2; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 p4o48ztsya6bv2xz1m59jzrk // static void textfont_freef(Dt_t* dt, void* obj, Dtdisc_t* disc) public static Object textfont_freef(Object... arg) { UNSUPPORTED("d6z1bfrko1uq2uadgutf42fpr"); // static void textfont_freef(Dt_t* dt, void* obj, Dtdisc_t* disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bx771pipb8kf13oa7ww02nex3"); // textfont_t *f = (textfont_t*)obj; UNSUPPORTED("eymlly2a6yv51q1jufubndg9o"); // if (f->name) free(f->name); UNSUPPORTED("1omkvtjx5x2ef8xensxdm6wt7"); // if (f->color) free(f->color); UNSUPPORTED("a4v6veu7h0jl3a2wwlxwpdsuw"); // free(f); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3xya6188lnt9kg5uwchhya2wt // static int textfont_comparf (Dt_t* dt, void* key1, void* key2, Dtdisc_t* disc) public static Object textfont_comparf(Object... arg) { UNSUPPORTED("9w5158s061nd0o3p6dbh4tnqz"); // static int textfont_comparf (Dt_t* dt, void* key1, void* key2, Dtdisc_t* disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1bh3yj957he6yv2dkeg4pzwdk"); // int rc; UNSUPPORTED("222ejoojlkxc5ocmxue2bgxdy"); // textfont_t *f1 = (textfont_t*)key1, *f2 = (textfont_t*)key2; UNSUPPORTED("87sttldb6hr2mn0ab405d03li"); // if (f1->name || f2->name) { UNSUPPORTED("2bqh121m1japcj8bnsuy6sc8q"); // if (! f1->name) return -1; UNSUPPORTED("86ytzx2x5nrcvurajdkbm95gk"); // if (! f2->name) return 1; UNSUPPORTED("673e3f928tkakxhcajat2h6p0"); // rc = strcmp(f1->name, f2->name); UNSUPPORTED("b9i8cahaxv9md4mvlw484iqeg"); // if (rc) return rc; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7vzuntdto9vcvitx5s7m6zma7"); // if (f1->color || f2->color) { UNSUPPORTED("4tw0lvc7t2cc0000lrb9flurf"); // if (! f1->color) return -1; UNSUPPORTED("7xj68kytc2wzv6iq8ddwkwqlk"); // if (! f2->color) return 1; UNSUPPORTED("bcepjb2zqe0moqakgmofmbpq2"); // rc = strcmp(f1->color, f2->color); UNSUPPORTED("b9i8cahaxv9md4mvlw484iqeg"); // if (rc) return rc; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9gf3266sjn2sm6m3mxf19197l"); // rc = (f1->flags - f2->flags); UNSUPPORTED("9ngqgld29f5nt7h1ffl4s0em4"); // if (rc) return rc; UNSUPPORTED("d3e2n6libjqhx2xs4516lxyrf"); // if (f1->size < f2->size) return -1; UNSUPPORTED("1kww1mevjniiermvdkcyihkqp"); // if (f1->size > f2->size) return 1; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9mfrgcpzz2d9f7nxfgx4nxj2q // Dt_t * textfont_dict_open(GVC_t *gvc) public static _dt_s textfont_dict_open(GVC_s gvc) { ENTERING("9mfrgcpzz2d9f7nxfgx4nxj2q","textfont_dict_open"); try { return null; //UNSUPPORTED("nexd6tbei8przmonjwzag8uf"); // Dt_t * textfont_dict_open(GVC_t *gvc) //UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { //UNSUPPORTED("cdeb412fjgrtibum4qt0yxhc7"); // ( (&(gvc->textfont_disc))->key = (0), (&(gvc->textfont_disc))->size = (sizeof(textfont_t)), (&(gvc->textfont_disc))->link = (-1), (&(gvc->textfont_disc))->makef = (textfont_makef), (&(gvc->textfont_disc))->freef = (textfont_freef), (&(gvc->textfont_disc))->comparf = (textfont_comparf), (&(gvc->textfont_disc))->hashf = (NULL), (&(gvc->textfont_disc))->memoryf = (NULL), (&(gvc->textfont_disc))->eventf = (NULL) ); //UNSUPPORTED("d1t3xr23spgfbbggquvg4nodm"); // gvc->textfont_dt = dtopen(&(gvc->textfont_disc), Dtoset); //UNSUPPORTED("6ynzkfpi9sy9wbln45o4jajhp"); // return gvc->textfont_dt; //UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } } finally { LEAVING("9mfrgcpzz2d9f7nxfgx4nxj2q","textfont_dict_open"); } } //3 5o4jyd0j7s18vl7inlo4o0w99 // void textfont_dict_close(GVC_t *gvc) public static Object textfont_dict_close(Object... arg) { UNSUPPORTED("7uxwdoqc8jmcbexpk4lhvdgg"); // void textfont_dict_close(GVC_t *gvc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dyrkxfb6i5v7i47xoxoe22ykv"); // dtclose(gvc->textfont_dt); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/timing__c.java000066400000000000000000000060041312650303100220470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static smetana.core.Macro.UNSUPPORTED; public class timing__c { //1 9rcpctijr9b8r0p971d3f9t9h // static mytime_t T //3 5651jzaik1he1ffxyznovdahf // void start_timer(void) public static Object start_timer(Object... arg) { UNSUPPORTED("69qokxdamqf1bxhaqbcnpwkw1"); // void start_timer(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ectdmh5it8savad5lltnu8r3w"); // times(&(T)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 11o22f2clw6ou6c0hmn76feu4 // double elapsed_sec(void) public static Object elapsed_sec(Object... arg) { UNSUPPORTED("ap51jenuew5js107vu8srvn3x"); // double elapsed_sec(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8jn78w98k16lwmikzd1lk5qx4"); // mytime_t S; UNSUPPORTED("d7i4mzmfmp4ps6n8cbfzvrlcf"); // double rv; UNSUPPORTED("bh6n36r9g26g7oq07lzcngnm3"); // times(&(S)); UNSUPPORTED("cu10zpf5lls0sjd3425blqug9"); // rv = ((S.tms_utime + S.tms_stime - T.tms_utime - T.tms_stime)/(double)60); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/common/utils__c.java000066400000000000000000004016721312650303100217320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.common; import static gen.lib.cgraph.attr__c.agget; import static gen.lib.cgraph.attr__c.agxget; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.cgraph.obj__c.agraphof; import static gen.lib.cgraph.refstr__c.aghtmlstr; import static gen.lib.common.labels__c.make_label; import static gen.lib.common.memory__c.zmalloc; import static gen.lib.common.shapes__c.bind_shape; import static gen.lib.common.shapes__c.shapeOf; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.LOG2; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.atoi; import static smetana.core.JUtils.enumAsInt; import static smetana.core.JUtils.isdigit; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtils.strchr; import static smetana.core.JUtils.strcmp; import static smetana.core.JUtils.strtod; import static smetana.core.JUtils.strtol; import static smetana.core.JUtils.tolower; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.ED_head_port; import static smetana.core.Macro.ED_label; import static smetana.core.Macro.ED_label_ontop; import static smetana.core.Macro.ED_tail_port; import static smetana.core.Macro.GD_bb; import static smetana.core.Macro.GD_flags; import static smetana.core.Macro.GD_flip; import static smetana.core.Macro.GD_has_labels; import static smetana.core.Macro.N; import static smetana.core.Macro.ND_UF_parent; import static smetana.core.Macro.ND_UF_size; import static smetana.core.Macro.ND_height; import static smetana.core.Macro.ND_ht; import static smetana.core.Macro.ND_id; import static smetana.core.Macro.ND_label; import static smetana.core.Macro.ND_lw; import static smetana.core.Macro.ND_ranktype; import static smetana.core.Macro.ND_rw; import static smetana.core.Macro.ND_shape; import static smetana.core.Macro.ND_showboxes; import static smetana.core.Macro.ND_width; import static smetana.core.Macro.UNSUPPORTED; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.Agsym_s; import h.ST_boxf; import h.ST_port; import h.boxf; import h.fontinfo; import h.nodequeue; import h.pointf; import h.port; import h.shape_kind; import h.textlabel_t; import smetana.core.CFunction; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Memory; import smetana.core.Z; import smetana.core.__array_of_struct__; import smetana.core.__ptr__; import smetana.core.__struct__; public class utils__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c7cptalfn8k75wyfirbnptnav // nodequeue *new_queue(int sz) public static nodequeue new_queue(int sz) { ENTERING("c7cptalfn8k75wyfirbnptnav","new_queue"); try { nodequeue q = (nodequeue)zmalloc(sizeof(nodequeue.class)); if (sz <= 1) sz = 2; final __ptr__ tmp__ = zmalloc(sizeof(Agnode_s.class, sz)); q.setPtr("store", tmp__); q.setPtr("tail", tmp__); q.setPtr("head", tmp__); q.setPtr("limit", tmp__.plus(sz)); return q; } finally { LEAVING("c7cptalfn8k75wyfirbnptnav","new_queue"); } } //3 1uj5nmdvwmuklnpd3v5py547f // void free_queue(nodequeue * q) public static void free_queue(nodequeue q) { ENTERING("1uj5nmdvwmuklnpd3v5py547f","free_queue"); try { Memory.free(q.getPtr("store")); Memory.free(q); } finally { LEAVING("1uj5nmdvwmuklnpd3v5py547f","free_queue"); } } //3 20pwd6i141q3o25lfvrdqytot // void enqueue(nodequeue * q, node_t * n) public static void enqueue(nodequeue q, Agnode_s n) { ENTERING("20pwd6i141q3o25lfvrdqytot","enqueue"); try { q.getArrayOfPtr("tail").plus(0).setPtr(n); q.setPtr("tail", q.getPtr("tail").plus(1)); if (q.getPtr("tail").comparePointer(q.getPtr("limit")) >= 0) q.setPtr("tail", q.getPtr("store")); } finally { LEAVING("20pwd6i141q3o25lfvrdqytot","enqueue"); } } //3 b612nmtf16au96ztbs8pike9r // node_t *dequeue(nodequeue * q) public static Agnode_s dequeue(nodequeue q) { ENTERING("b612nmtf16au96ztbs8pike9r","dequeue"); try { Agnode_s n; if (EQ(q.getPtr("head"), q.getPtr("tail"))) n = null; else { n = (Agnode_s) q.getArrayOfPtr("head").plus(0).getPtr(); q.setPtr("head", q.getPtr("head").plus(1)); if (q.getPtr("head").comparePointer(q.getPtr("limit")) >= 0) q.setPtr("head", q.getPtr("store")); } return n; } finally { LEAVING("b612nmtf16au96ztbs8pike9r","dequeue"); } } //3 6nydxv4f2m7jcfh8ljs0neu0x // int late_int(void *obj, attrsym_t * attr, int def, int low) public static int late_int(__ptr__ obj, Agsym_s attr, int def, int low) { ENTERING("6nydxv4f2m7jcfh8ljs0neu0x","late_int"); try { CString p; CString endp[] = new CString[1]; int rv; if (attr == null) return def; p = agxget(obj,attr); if (N(p) || p.length()==0) return def; rv = strtol (p, endp, 10); if (EQ(p, endp[0])) return def; /* invalid int format */ if (rv < low) return low; else return rv; } finally { LEAVING("6nydxv4f2m7jcfh8ljs0neu0x","late_int"); } } //3 d68314e4f20r79tt0cnmxugme // double late_double(void *obj, attrsym_t * attr, double def, double low) public static double late_double(__ptr__ obj, Agsym_s attr, double def, double low) { ENTERING("d68314e4f20r79tt0cnmxugme","late_double"); try { CString p; CString endp[] = new CString[1]; double rv; if (N(attr) || N(obj)) return def; p = agxget(obj,attr); if (N(p) || p.charAt(0) == '\0') return def; rv = strtod (p, endp); if (p == endp[0]) return def; /* invalid double format */ if (rv < low) return low; else return rv; } finally { LEAVING("d68314e4f20r79tt0cnmxugme","late_double"); } } //3 70otpdqcum1z6ht6udvuxl7r2 // double get_inputscale (graph_t* g) public static Object get_inputscale(Object... arg) { UNSUPPORTED("9ufij3opw003w1a5l59wehdi6"); // double get_inputscale (graph_t* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8ne6p4d5pykwl1d3xk0yg0ipb"); // double d; UNSUPPORTED("c3jy0hsf1pj5mu65gn0341dbk"); // if (PSinputscale > 0) return PSinputscale; /* command line flag prevails */ UNSUPPORTED("1l7wr8a4r1ml3ghihovvwsll0"); // d = late_double(g, (agattr(g,AGRAPH,"inputscale",(void *)0)), -1, 0); UNSUPPORTED("464faf5rk766qz197xbucjy1q"); // if (d == 0) return 72; UNSUPPORTED("34ovcwkctb1p5v0nns43aj54s"); // else return d; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 83xm6yc9q5h1bzufhsnv0v2up // char *late_string(void *obj, attrsym_t * attr, char *def) public static CString late_string(__ptr__ obj, Agsym_s attr, CString def) { ENTERING("83xm6yc9q5h1bzufhsnv0v2up","late_string"); try { if (N(attr) || N(obj)) return def; return agxget(obj, attr); } finally { LEAVING("83xm6yc9q5h1bzufhsnv0v2up","late_string"); } } //3 8oon4q1mrublaru177xfntqgd // char *late_nnstring(void *obj, attrsym_t * attr, char *def) public static CString late_nnstring(__ptr__ obj, Agsym_s attr, CString def) { ENTERING("8oon4q1mrublaru177xfntqgd","late_nnstring"); try { CString rv = late_string(obj, attr, def); if (N(rv) || (rv.charAt(0) == '\0')) rv = def; return rv; } finally { LEAVING("8oon4q1mrublaru177xfntqgd","late_nnstring"); } } //3 87ifze04q7qzigjj1fb9y9by2 // boolean late_bool(void *obj, attrsym_t * attr, int def) public static Object late_bool(Object... arg) { UNSUPPORTED("4p67t5j48pxpmswky3dw3s392"); // boolean late_bool(void *obj, attrsym_t * attr, int def) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("183nee60g5fytepk82gop4u8s"); // if (attr == (void *)0) UNSUPPORTED("1jfc1szr9lzyizq62jp9jz7ah"); // return def; UNSUPPORTED("a0kh1y5n8u59z0xo7mag3zmt6"); // return mapbool(agxget(obj, attr)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aeq0acpkhfv3gd5jx8op4jf18 // node_t *UF_find(node_t * n) public static Agnode_s UF_find(Agnode_s n) { ENTERING("aeq0acpkhfv3gd5jx8op4jf18","UF_find"); try { while (ND_UF_parent(n)!=null && NEQ(ND_UF_parent(n), n)) { if (ND_UF_parent(ND_UF_parent(n))!=null) ND_UF_parent(n, ND_UF_parent(ND_UF_parent(n))); n = ND_UF_parent(n); } return n; } finally { LEAVING("aeq0acpkhfv3gd5jx8op4jf18","UF_find"); } } //3 9ldxwfr4vvijrvfcvs1hvdzrt // node_t *UF_union(node_t * u, node_t * v) public static Agnode_s UF_union(Agnode_s u, Agnode_s v) { ENTERING("9ldxwfr4vvijrvfcvs1hvdzrt","UF_union"); try { if (EQ(u, v)) return u; if (ND_UF_parent(u) == null) { ND_UF_parent(u, u); ND_UF_size(u, 1); } else UNSUPPORTED("35c97tyk6tzw1g527j6rp6xoo"); // u = UF_find(u); if (ND_UF_parent(v) == null) { ND_UF_parent(v, v); ND_UF_size(v, 1); } else v = UF_find(v); if (ND_id(u) > ND_id(v)) { UNSUPPORTED("2igr3ntnkm6svji4pbnjlp54e"); // ND_UF_parent(u) = v; UNSUPPORTED("3lht90i6tvxbr10meir8nvcic"); // ND_UF_size(v) += ND_UF_size(u); } else { ND_UF_parent(v, u); ND_UF_size(u, ND_UF_size(u) + ND_UF_size(v)); v = u; } return v; } finally { LEAVING("9ldxwfr4vvijrvfcvs1hvdzrt","UF_union"); } } //3 3j3pbee3o14ctlm51gqul3y1b // void UF_remove(node_t * u, node_t * v) public static Object UF_remove(Object... arg) { UNSUPPORTED("4mdu14gpibvzmm5t9g0h7oaek"); // void UF_remove(node_t * u, node_t * v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dnvt20f8swe5kyjjj2g4vpx46"); // assert(ND_UF_size(u) == 1); UNSUPPORTED("crtqvbx6u5amvtj4nhuhui0p0"); // ND_UF_parent(u) = u; UNSUPPORTED("4gdqcsr8w5gtc1qbdht2l23g2"); // ND_UF_size(v) -= ND_UF_size(u); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 22k0u1imxyw06k9rizqlfz153 // void UF_singleton(node_t * u) public static void UF_singleton(Agnode_s u) { ENTERING("22k0u1imxyw06k9rizqlfz153","UF_singleton"); try { ND_UF_size(u, 1); ND_UF_parent(u, null); ND_ranktype(u, 0); } finally { LEAVING("22k0u1imxyw06k9rizqlfz153","UF_singleton"); } } //3 e0fn8xuzkdt0q8xoofl6j1txb // void UF_setname(node_t * u, node_t * v) public static void UF_setname(Agnode_s u, Agnode_s v) { ENTERING("e0fn8xuzkdt0q8xoofl6j1txb","UF_setname"); try { assert(EQ(u, UF_find(u))); ND_UF_parent(u, v); ND_UF_size(v, ND_UF_size(v) + ND_UF_size(u)); } finally { LEAVING("e0fn8xuzkdt0q8xoofl6j1txb","UF_setname"); } } //3 31rkmp5c1ie1pfzbkla6b4ag // pointf coord(node_t * n) public static Object coord(Object... arg) { UNSUPPORTED("880b2lkxm37hksgryyrw8qqvj"); // pointf coord(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("evwdz7pwy2u67oqi6hg38wal1"); // r.x = 72 * ND_pos(n)[0]; UNSUPPORTED("1dwnra1p0vsse07037h9fdfgp"); // r.y = 72 * ND_pos(n)[1]; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6p0ey2c2ujk2o7h221p0b4xon // pointf Bezier(pointf * V, int degree, double t, pointf * Left, pointf * Right) public static __struct__ Bezier(__array_of_struct__ V, int degree, double t, __ptr__ Left, __ptr__ Right) { // WARNING!! STRUCT return Bezier_w_(V, degree, t, Left, Right).copy(); } private static __struct__ Bezier_w_(__array_of_struct__ V, int degree, double t, __ptr__ Left, __ptr__ Right) { ENTERING("6p0ey2c2ujk2o7h221p0b4xon","Bezier"); try { int i, j; /* Index variables */ final __array_of_struct__ Vtemp[] = new __array_of_struct__[] { __array_of_struct__.malloc(pointf.class, 5+1), __array_of_struct__.malloc(pointf.class, 5+1), __array_of_struct__.malloc(pointf.class, 5+1), __array_of_struct__.malloc(pointf.class, 5+1), __array_of_struct__.malloc(pointf.class, 5+1), __array_of_struct__.malloc(pointf.class, 5+1) }; /* Copy control points */ for (j = 0; j <= degree; j++) { Vtemp[0].plus(j).setStruct(V.plus(j).getStruct()); } /* Triangle computation */ for (i = 1; i <= degree; i++) { for (j = 0; j <= degree - i; j++) { Vtemp[i].plus(j).setDouble("x", (1.0 - t) * Vtemp[i - 1].plus(j).getDouble("x") + t * Vtemp[i - 1].plus(j + 1).getDouble("x")); Vtemp[i].plus(j).setDouble("y", (1.0 - t) * Vtemp[i - 1].plus(j).getDouble("y") + t * Vtemp[i - 1].plus(j + 1).getDouble("y")); } } if (Left != null) for (j = 0; j <= degree; j++) Left.plus(j).setStruct(Vtemp[j].plus(0).getStruct()); if (Right != null) for (j = 0; j <= degree; j++) Right.plus(j).setStruct(Vtemp[degree - j].plus(j).getStruct()); return (Vtemp[degree].plus(0).getStruct()); } finally { LEAVING("6p0ey2c2ujk2o7h221p0b4xon","Bezier"); } } //3 3ly0ylecb4k9xk5b7ffrlolt9 // char *Fgets(FILE * fp) public static Object Fgets(Object... arg) { UNSUPPORTED("4q07n5lkhirby89lrss95tlri"); // char *Fgets(FILE * fp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f2la3gescrvdrwclkw6jqpel5"); // static int bsize = 0; UNSUPPORTED("8kywmm7f51dmrjngxwvnpsd4o"); // static char *buf; UNSUPPORTED("ecmuo8avgj1iywuapxmibw016"); // char *lp; UNSUPPORTED("dwe86466ugstemepdfk8yzphz"); // int len; UNSUPPORTED("cl8iuel2v9wmaxtyhnvq5trol"); // len = 0; UNSUPPORTED("53kc41p479auwcycfsbhw8xix"); // do { UNSUPPORTED("94pefdj9c9wxznl2ybw0eaxlu"); // if (bsize - len < BUFSIZ) { UNSUPPORTED("3f9vu9nd93ckzyw89aeu7qtpz"); // bsize += BUFSIZ; UNSUPPORTED("6zqvad9bp7g8thltaf4fgbiqe"); // buf = grealloc(buf, bsize); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6javvrure63s3d9t1t1g3jjb3"); // lp = fgets(buf + len, bsize - len, fp); UNSUPPORTED("5s6nvinfb0elfdlq0b4hvn087"); // if (lp == 0) UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("83wm9z0kqu2eg7994ilmkvhsy"); // len += strlen(lp); /* since lp != NULL, len > 0 */ UNSUPPORTED("cpr2w7m7b9d0k3v79b2ed57cv"); // } while (buf[len - 1] != '\n'); UNSUPPORTED("6qgvu9gyei3rz9oa1j4onpev8"); // if (len > 0) UNSUPPORTED("60rrsbs3bgak2rhurj1kw71av"); // return buf; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 24n59f0dfjbrcciik6yp7reuz // static char** mkDirlist (const char* list, int* maxdirlen) public static Object mkDirlist(Object... arg) { UNSUPPORTED("52rxugfl5uyz0px71ixefqszi"); // static char** mkDirlist (const char* list, int* maxdirlen) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("behjm5bjsenezpg3f7cncvteu"); // int cnt = 0; UNSUPPORTED("8b1p8gk30j7o435ywb280jum2"); // char* s = strdup (list); UNSUPPORTED("35u91xpv8pyr56o5nch0azwdl"); // char* dir; UNSUPPORTED("9b5fnnkm94rlgnqwv15ibu46r"); // char** dirs = (void *)0; UNSUPPORTED("2cb6784tzmjr65il4amoj2f6h"); // int maxlen = 0; UNSUPPORTED("bnhqg9audjylbv3i0tj26rrcp"); // for (dir = strtok (s, ":"); dir; dir = strtok ((void *)0, ":")) { UNSUPPORTED("aqf6niag46yhhhj5sccv41hrk"); // dirs = ALLOC (cnt+2,dirs,char*); UNSUPPORTED("f5047pr5l6jv6zl8latgfspry"); // dirs[cnt++] = dir; UNSUPPORTED("13d902xfof2syshtj70d02plc"); // maxlen = MAX(maxlen, strlen (dir)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3qszpnaufz3i0zkcsuaqfcbap"); // dirs[cnt] = (void *)0; UNSUPPORTED("a10ctcqm0sjufygu9dh0cc6aa"); // *maxdirlen = maxlen; UNSUPPORTED("5os9u9oj7fjpbstveie2w0yxq"); // return dirs; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 49gli3uq79rprx3u3opdhcx1m // static char* findPath (char** dirs, int maxdirlen, const char* str) public static Object findPath(Object... arg) { UNSUPPORTED("a5bmudkw4k7jkxvyb8gptf73c"); // static char* findPath (char** dirs, int maxdirlen, const char* str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("93jals27u5ur9t8vy0noookm0"); // static char *safefilename = (void *)0; UNSUPPORTED("bpsbmb5c3iu1rp98h1ouv1rgr"); // char** dp; UNSUPPORTED("81a5ilslogj5wcerq31e8qoh9"); // /* allocate a buffer that we are sure is big enough UNSUPPORTED("a6c5zuexn89b87yrrru9wgnwg"); // * +1 for null character. UNSUPPORTED("eaa4q86pe1s8k4qb4tkhw73zl"); // * +1 for directory separator character. UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ UNSUPPORTED("15klhvefamyul36it624epw39"); // safefilename = realloc(safefilename, (maxdirlen + strlen(str) + 2)); UNSUPPORTED("2zug3hj9q9xtnh9p792zu5xh8"); // for (dp = dirs; *dp; dp++) { UNSUPPORTED("bhh1cl0s26fu2nevbn685qotj"); // sprintf (safefilename, "%s%s%s", *dp, "/", str); UNSUPPORTED("c3hxsxu6vm5rsmcvu94zjfhmz"); // if (access (safefilename, R_OK) == 0) UNSUPPORTED("bvviyr83kx89qfvn2tmv1fj2x"); // return safefilename; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bhge6w48v1uv92wmsde2jqqs0"); // return (void *)0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3xll2b0v9nthwvx9dafq49t8s // const char *safefile(const char *filename) //static boolean onetime = (!(0)); //static char *pathlist = (void *)0; //static int maxdirlen; //static char** dirs; public static CString safefile(CString filename) { ENTERING("3xll2b0v9nthwvx9dafq49t8s","safefile"); try { return null; } finally { LEAVING("3xll2b0v9nthwvx9dafq49t8s","safefile"); } } //3 2ihv17oajyaaaycirwsbgz1m7 // int maptoken(char *p, char **name, int *val) public static int maptoken(CString p, CString name[], int val[]) { ENTERING("2ihv17oajyaaaycirwsbgz1m7","maptoken"); try { int i; CString q; for (i = 0; (q = name[i]) != null; i++) if (p!=null && (N(strcmp(p,q)))) break; return val[i]; } finally { LEAVING("2ihv17oajyaaaycirwsbgz1m7","maptoken"); } } //3 4esyuq2yqdaqoddgfqs24m5m3 // boolean mapBool(char *p, boolean dflt) public static boolean mapBool(CString p, boolean dflt) { ENTERING("4esyuq2yqdaqoddgfqs24m5m3","mapBool"); try { if (N(p) || (p.charAt(0) == '\0')) return dflt; if (N(strcasecmp(p, new CString("false")))) return false; if (N(strcasecmp(p, new CString("no")))) return false; if (N(strcasecmp(p, new CString("true")))) return (N(0)); if (N(strcasecmp(p, new CString("yes")))) return (N(0)); if (isdigit(p.charAt(0))) return atoi(p)!=0; else return dflt; } finally { LEAVING("4esyuq2yqdaqoddgfqs24m5m3","mapBool"); } } //3 ehkvqh6bwf4jw3mj1w5p7a8m8 // boolean mapbool(char *p) public static boolean mapbool(CString p) { ENTERING("ehkvqh6bwf4jw3mj1w5p7a8m8","mapbool"); try { return mapBool (p, false); } finally { LEAVING("ehkvqh6bwf4jw3mj1w5p7a8m8","mapbool"); } } //3 37hgj44s94wf9bmz16he85pgq // pointf dotneato_closest(splines * spl, pointf pt) public static Object dotneato_closest(Object... arg) { UNSUPPORTED("6xi9wmswic1fv76qsqa100zrg"); // pointf dotneato_closest(splines * spl, pointf pt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7vg6345lno41yawbke5qjffjx"); // int i, j, k, besti, bestj; UNSUPPORTED("7tvhpuiv2bp57tuo5a1qrptwi"); // double bestdist2, d2, dlow2, dhigh2; /* squares of distances */ UNSUPPORTED("52bzzd12n2awux2b59j2jqh8x"); // double low, high, t; UNSUPPORTED("1ciwu1ibmcvutr9d4mbq8jjp"); // pointf c[4], pt2; UNSUPPORTED("37thdceezsvepe7tlyfatrbcw"); // bezier bz; UNSUPPORTED("cv0cmfkdyov0ifz46uknfgwaa"); // besti = bestj = -1; UNSUPPORTED("988ajfgcb4de6sx2d5un10g4x"); // bestdist2 = 1e+38; UNSUPPORTED("4z4l1zu33m72iirxmuhdg36iw"); // for (i = 0; i < spl->size; i++) { UNSUPPORTED("ewoeh3d6otc2rgpaxuzwm38x7"); // bz = spl->list[i]; UNSUPPORTED("bdak7kaqfdpo7zuzg9fm7b6sw"); // for (j = 0; j < bz.size; j++) { UNSUPPORTED("wdh4m8cw4why11o5q87r88zj"); // pointf b; UNSUPPORTED("3tf1mdorgslv29e6azr3rzonw"); // b.x = bz.list[j].x; UNSUPPORTED("dxmmss8xn49bbq09iskmvgo1a"); // b.y = bz.list[j].y; UNSUPPORTED("d0o8y6vs1vm9qcfq5oyn2zmb5"); // d2 = DIST2(b, pt); UNSUPPORTED("5x61wak384zfu9waxz4iib38j"); // if ((bestj == -1) || (d2 < bestdist2)) { UNSUPPORTED("cmhf0aasa4t5z81xkhjsih2h3"); // besti = i; UNSUPPORTED("en6tmpmufawtaviu8s9gbiir5"); // bestj = j; UNSUPPORTED("aqecj956cthm5r94jj461cz7"); // bestdist2 = d2; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4o4fen9osijkuva0tyij06dff"); // bz = spl->list[besti]; UNSUPPORTED("cylnfbfm0pqu1um785gk5ox0m"); // /* Pick best Bezier. If bestj is the last point in the B-spline, decrement. UNSUPPORTED("84b6e5g3wx9iisglwjcp5lno1"); // * Then set j to be the first point in the corresponding Bezier by dividing UNSUPPORTED("57jzmu3ed1g4aa00hivvreb3c"); // * then multiplying be 3. Thus, 0,1,2 => 0; 3,4,5 => 3, etc. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("2oqk9suiq102615kp2p6u9pbc"); // if (bestj == bz.size-1) UNSUPPORTED("b8unnlnu1bnnhbs85vgllqltd"); // bestj--; UNSUPPORTED("34l7vean6sci8jd61jcga5t9j"); // j = 3*(bestj / 3); UNSUPPORTED("634ul430au56jfgnuq945ecev"); // for (k = 0; k < 4; k++) { UNSUPPORTED("emeum5x5u6s5wlj9pg5e18mge"); // c[k].x = bz.list[j + k].x; UNSUPPORTED("6fqdkdgvc0jr8pgud3rpf5blk"); // c[k].y = bz.list[j + k].y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("13ldc3scyuiddbvqn7xeazovv"); // low = 0.0; UNSUPPORTED("5diyw4rai5ul7vmjhf654bvc0"); // high = 1.0; UNSUPPORTED("v90htrjkydw3zaf6t3apnl32"); // dlow2 = DIST2(c[0], pt); UNSUPPORTED("5fvcsu2wp47fo7crx2ob0h44u"); // dhigh2 = DIST2(c[3], pt); UNSUPPORTED("53kc41p479auwcycfsbhw8xix"); // do { UNSUPPORTED("14iyya2zn31kcyo2gqfx6u181"); // t = (low + high) / 2.0; UNSUPPORTED("5rti9akx01gql0rz4afihqg0q"); // pt2 = Bezier(c, 3, t, (void *)0, (void *)0); UNSUPPORTED("1mco76xn6x54y3tzfvzeptejl"); // if (fabs(dlow2 - dhigh2) < 1.0) UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("aaurmb2ppl2kefmdaw9njymyt"); // if (fabs(high - low) < .00001) UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("6apa9aoby9j8a0eanbfhy5mn2"); // if (dlow2 < dhigh2) { UNSUPPORTED("6jttyuryfaxa193mme86dqf58"); // high = t; UNSUPPORTED("6avwplrum9i9qi3g9wl6yvz04"); // dhigh2 = DIST2(pt2, pt); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("556vs5i22602clhs1p3htz7vk"); // low = t; UNSUPPORTED("507tgq81szei2ge3miiak4b1v"); // dlow2 = DIST2(pt2, pt); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bisaeb1i484iutawysrspjmfw"); // } while (1); UNSUPPORTED("9v7upfp8kp93skdlnpaz055xv"); // return pt2; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8v6t685mjc3ps5m4i5m7kj5r5 // pointf spline_at_y(splines * spl, double y) public static Object spline_at_y(Object... arg) { UNSUPPORTED("6z59zacy0w6awy33d9vj3ka38"); // pointf spline_at_y(splines * spl, double y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dzpsknrwv8qkqq20hjnjpjn68"); // int i, j; UNSUPPORTED("c7xj151i9l4snnjn7ibtdupr2"); // double low, high, d, t; UNSUPPORTED("10vmrpj8mfz9opwwvwpolaopd"); // pointf c[4], p; UNSUPPORTED("m46gfclfoxui2qhyykvkqk0a"); // static bezier bz; UNSUPPORTED("aqjwfeuociuhtcp9z6qs0chn8"); // /* this caching seems to prevent p.x from getting set from bz.list[0].x UNSUPPORTED("epvvl2xzzwpc4zmue865xosgp"); // - optimizer problem ? */ UNSUPPORTED("b9epibfipw1wsk324v5epkerh"); // for (i = 0; i < spl->size; i++) { UNSUPPORTED("3ykobnao35x0n6r6go2stj9o5"); // bz = spl->list[i]; UNSUPPORTED("clxoycrurqc4oq0d7v2fp7imo"); // if (BETWEEN(bz.list[bz.size - 1].y, y, bz.list[0].y)) UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3en4490pkykfcbc2szvzzx27g"); // if (y > bz.list[0].y) UNSUPPORTED("e1te1nqw2aru9ro9sqdjhhttv"); // p = bz.list[0]; UNSUPPORTED("24izeylrlk4gqqilirqwty8r9"); // else if (y < bz.list[bz.size - 1].y) UNSUPPORTED("5cxp04l4lo39n1p1wsvav460c"); // p = bz.list[bz.size - 1]; UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("cj02uw2oxm47gdexf3z5axxlw"); // for (i = 0; i < bz.size; i += 3) { UNSUPPORTED("djfbmqatbjckruruv8rxs6uav"); // for (j = 0; j < 3; j++) { UNSUPPORTED("5b9ziw2aes1kmllxgwkfpmr7p"); // if ((bz.list[i + j].y <= y) && (y <= bz.list[i + j + 1].y)) UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("amh6xmny0k57y6wqy4ms0zyqe"); // if ((bz.list[i + j].y >= y) && (y >= bz.list[i + j + 1].y)) UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("9fvhco56e60yr7h2c6ceqf1p5"); // if (j < 3) UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("eoqh4atx94pamqo1963pcrq50"); // assert(i < bz.size); UNSUPPORTED("ac0jvph9p2m1i3zdywfxmq4eg"); // for (j = 0; j < 4; j++) { UNSUPPORTED("ajjpb9st186njpdxscd9bmg80"); // c[j].x = bz.list[i + j].x; UNSUPPORTED("2lnyqxk5vopusie575n54x590"); // c[j].y = bz.list[i + j].y; UNSUPPORTED("5n0qrttzwlxb3x8t4ngkjz31j"); // /* make the spline be monotonic in Y, awful but it works for now */ UNSUPPORTED("ath2bi6h6bk6mkwqk00fweao2"); // if ((j > 0) && (c[j].y > c[j - 1].y)) UNSUPPORTED("a6ze9ec2noj595b0aw7s8h7id"); // c[j].y = c[j - 1].y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2zhwm9ypobvcurq5wram1qiil"); // low = 0.0; UNSUPPORTED("2ee14osydbs80okw31an3ngjg"); // high = 1.0; UNSUPPORTED("8vxyvy38lzpbd83cu26nejaan"); // do { UNSUPPORTED("aclx3e6mwmv4x6wtctvdpafcb"); // t = (low + high) / 2.0; UNSUPPORTED("c609yg89bcwhbtz2sjavo4mo0"); // p = Bezier(c, 3, t, (void *)0, (void *)0); UNSUPPORTED("7tmwl314qsfq3dcvb5u9uyknb"); // d = p.y - y; UNSUPPORTED("2b3fbztokpi7ure6eux7qupf8"); // if (ABS(d) <= 1) UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("d8gdi8364l2gqf1f2o8j20nhe"); // if (d < 0) UNSUPPORTED("ckgl1j6wm8pbqhae0gpdab4qk"); // high = t; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("12xca5z3d0sj7sp9cgyqxop4f"); // low = t; UNSUPPORTED("6agdm6388u3r4v7kc6ho2hxhu"); // } while (1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5jdhcgi82gtmvn690v78zmkpe"); // p.y = y; UNSUPPORTED("91xduilalb406jjyw2g1i07th"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4ws2d4r4z8psnleuxber6j3s6 // pointf neato_closest(splines * spl, pointf p) public static Object neato_closest(Object... arg) { UNSUPPORTED("8hg1y8i9xy00n3blyechtqvvh"); // pointf neato_closest(splines * spl, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cickuxw2k5um9ssxcufe5ny0h"); // /* this is a stub so that we can share a common emit.c between dot and neato */ UNSUPPORTED("b5hsyvf8h7g1m8n1qzbi0hrry"); // return spline_at_y(spl, p.y); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 8s6oop1ayag35eusof2rgdb5b // static int Tflag //3 ak4q69g3z2si69q7q6mmtp9qi // void gvToggle(int s) public static Object gvToggle(Object... arg) { UNSUPPORTED("46ptgxtzrw0bu7ggbzxrodqnw"); // void gvToggle(int s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dxdyekcrbykzppszumnvmrogc"); // Tflag = !Tflag; UNSUPPORTED("9zus728u8e05ja3xahcrlzmsr"); // signal(SIGUSR1, gvToggle); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6h6t4myqjvz5d7nv9s4fme7ol // int test_toggle() public static Object test_toggle(Object... arg) { UNSUPPORTED("66b64g196uijyd7jhapf68wvg"); // int test_toggle() UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7op0qt5n8bs6z3ptnpbps1ikb"); // return Tflag; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cr81drt18h5feqzxyh3jb0u49 // void common_init_node(node_t * n) public static void common_init_node(Agnode_s n) { ENTERING("cr81drt18h5feqzxyh3jb0u49","common_init_node"); try { fontinfo fi = (fontinfo) Memory.malloc(fontinfo.class); CString str; ND_width(n, late_double(n, Z.z().N_width, 0.75, 0.01)); ND_height(n, late_double(n, Z.z().N_height, 0.5, 0.02)); ND_shape(n, bind_shape(late_nnstring(n, Z.z().N_shape, new CString("ellipse")), n)); str = agxget(n, Z.z().N_label); fi.setDouble("fontsize", late_double(n, Z.z().N_fontsize, 14.0, 1.0)); fi.setPtr("fontname", late_nnstring(n, Z.z().N_fontname, new CString("Times-Roman"))); fi.setPtr("fontcolor", late_nnstring(n, Z.z().N_fontcolor, new CString("black"))); ND_label(n, make_label(n, str, ((aghtmlstr(str)!=0 ? (1 << 1) : (0 << 1)) | ( (shapeOf(n) == enumAsInt(shape_kind.class, "SH_RECORD")) ? (2 << 1) : (0 << 1))), fi.getDouble("fontsize"), fi.getCString("fontname"), fi.getCString("fontcolor"))); if (Z.z().N_xlabel!=null && (str = agxget(n, Z.z().N_xlabel))!=null && (str.charAt(0)!='\0')) { UNSUPPORTED("4ua9vld76wpovsm1celv2ff6e"); // ND_xlabel(n) = make_label((void*)n, str, (aghtmlstr(str) ? (1 << 1) : (0 << 1)), UNSUPPORTED("b0zm6fkpjlt9jacykbgugjodg"); // fi.fontsize, fi.fontname, fi.fontcolor); UNSUPPORTED("ail0d4qmxj2aqh2q721inwgqu"); // GD_has_labels(agraphof(n)) |= (1 << 4); } ND_showboxes(n, late_int(n, Z.z().N_showboxes, 0, 0)); ND_shape(n).getPtr("fns").call("initfn", n); } finally { LEAVING("cr81drt18h5feqzxyh3jb0u49","common_init_node"); } } //3 d2v8l80y27ue2fag5c0qplah8 // static void initFontEdgeAttr(edge_t * e, struct fontinfo *fi) public static void initFontEdgeAttr(Agedge_s e, fontinfo fi) { ENTERING("d2v8l80y27ue2fag5c0qplah8","initFontEdgeAttr"); try { fi.setDouble("fontsize", late_double(e, Z.z().E_fontsize, 14.0, 1.0)); fi.setPtr("fontname", late_nnstring(e, Z.z().E_fontname, new CString("Times-Roman"))); fi.setPtr("fontcolor", late_nnstring(e, Z.z().E_fontcolor, new CString("black"))); } finally { LEAVING("d2v8l80y27ue2fag5c0qplah8","initFontEdgeAttr"); } } //3 ak3pxrdrq900wymudwnjmbito // static void initFontLabelEdgeAttr(edge_t * e, struct fontinfo *fi, struct fontinfo *lfi) public static Object initFontLabelEdgeAttr(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("64kdcuymwqrq619sxnmgnuyal"); // initFontLabelEdgeAttr(edge_t * e, struct fontinfo *fi, UNSUPPORTED("rd78u02b7ldtc7gt7aw5t8fz"); // struct fontinfo *lfi) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9rkwm6oonv051kf4hnage0877"); // if (!fi->fontname) initFontEdgeAttr(e, fi); UNSUPPORTED("aok5f09eydgwsqtsl0xmmhft"); // lfi->fontsize = late_double(e, E_labelfontsize, fi->fontsize, 1.0); UNSUPPORTED("aviu0lhq8s4ez3n8cil4bwac6"); // lfi->fontname = late_nnstring(e, E_labelfontname, fi->fontname); UNSUPPORTED("75il36n46r24ag5njqgshp8xz"); // lfi->fontcolor = late_nnstring(e, E_labelfontcolor, fi->fontcolor); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bgnk1zwht9rwx6thmly98iofb // static boolean noClip(edge_t *e, attrsym_t* sym) public static boolean noClip(Agedge_s e, Agsym_s sym) { ENTERING("bgnk1zwht9rwx6thmly98iofb","noClip"); try { CString str; boolean rv = false; if (sym!=null) { /* mapbool isn't a good fit, because we want "" to mean true */ str = agxget(e,sym); if (str!=null && str.charAt(0)!='\0') rv = !mapbool(str); else rv = false; } return rv; } finally { LEAVING("bgnk1zwht9rwx6thmly98iofb","noClip"); } } //3 9vnr1bc7p533acazoxbhbfmx3 // static port chkPort (port (*pf)(node_t*, char*, char*), node_t* n, char* s) public static ST_port chkPort(CFunction pf, Agnode_s n, CString s) { // WARNING!! STRUCT return chkPort_w_(pf, n, s).copy(); } private static ST_port chkPort_w_(CFunction pf, Agnode_s n, CString s) { ENTERING("9vnr1bc7p533acazoxbhbfmx3","chkPort"); try { final ST_port pt = new ST_port(); CString cp=null; if(s!=null) cp= strchr(s,':'); if (cp!=null) { UNSUPPORTED("cbuf05ko7kaxq2n9zw35l5v2h"); // *cp = '\0'; UNSUPPORTED("7ofc3q8txvlvus6qwefbnbaxu"); // pt = pf(n, s, cp+1); UNSUPPORTED("971i954brvgqb35cftazlqhon"); // *cp = ':'; UNSUPPORTED("2o9oidtrr5gspl1dh6vnz7mlz"); // pt.name = cp+1; } else pt.___((__struct__) pf.exe(n, s, null)); pt.name = s; return pt; } finally { LEAVING("9vnr1bc7p533acazoxbhbfmx3","chkPort"); } } //3 3aqh64lxwv4da2snfe7fvr45b // int common_init_edge(edge_t * e) public static int common_init_edge(Agedge_s e) { ENTERING("3aqh64lxwv4da2snfe7fvr45b","common_init_edge"); try { CString str; int r = 0; final __struct__ fi = JUtils.from(fontinfo.class); final __struct__ lfi = JUtils.from(fontinfo.class); Agraph_s sg = agraphof(agtail(e)); fi.setPtr("fontname", null); lfi.setPtr("fontname", null); if (Z.z().E_label!=null && (str = agxget(e, Z.z().E_label))!=null && (str.charAt(0)!='\0')) { r = 1; initFontEdgeAttr(e, fi.amp()); ED_label(e, make_label(e, str, (aghtmlstr(str)!=0 ? (1 << 1) : (0 << 1)), fi.getDouble("fontsize"), fi.getCString("fontname"), fi.getCString("fontcolor"))); GD_has_labels(sg, GD_has_labels(sg) | (1 << 0)); ED_label_ontop(e, mapbool(late_string(e, Z.z().E_label_float, new CString("false")))); } if (Z.z().E_xlabel!=null && (str = agxget(e, Z.z().E_xlabel))!=null && (str.charAt(0)!='\0')) { UNSUPPORTED("1j3mhgq7abuh3n19q2jtjddbc"); // if (!fi.fontname) UNSUPPORTED("bmqo2g5g107quod3h31r8iudr"); // initFontEdgeAttr(e, &fi); UNSUPPORTED("3s7kg9x748riuy3tm697s6e8t"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->xlabel) = make_label((void*)e, str, (aghtmlstr(str) ? (1 << 1) : (0 << 1)), UNSUPPORTED("b0zm6fkpjlt9jacykbgugjodg"); // fi.fontsize, fi.fontname, fi.fontcolor); UNSUPPORTED("c078bypfszv0nsvp1nc0x28wx"); // (((Agraphinfo_t*)(((Agobj_t*)(sg))->data))->has_labels) |= (1 << 5); } /* vladimir */ if (Z.z().E_headlabel!=null && (str = agxget(e, Z.z().E_headlabel))!=null && (str.charAt(0)!='\0')) { UNSUPPORTED("cgznvdnh671wl8jq8q3tyhv1r"); // initFontLabelEdgeAttr(e, &fi, &lfi); UNSUPPORTED("6nfh8swason2akjp45hm0o5b0"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->head_label) = make_label((void*)e, str, (aghtmlstr(str) ? (1 << 1) : (0 << 1)), UNSUPPORTED("eu3ztkfva2x87y72tnu7vv4re"); // lfi.fontsize, lfi.fontname, lfi.fontcolor); UNSUPPORTED("axtvdewh7zhtm1diu8c6dprx4"); // (((Agraphinfo_t*)(((Agobj_t*)(sg))->data))->has_labels) |= (1 << 1); } if (Z.z().E_taillabel!=null && (str = agxget(e, Z.z().E_taillabel))!=null && (str.charAt(0)!='\0')) { UNSUPPORTED("6y6e1y496y6j6a6065nfesr8o"); // if (!lfi.fontname) UNSUPPORTED("4w2bicw8rsgyy40x0vhyzzlnm"); // initFontLabelEdgeAttr(e, &fi, &lfi); UNSUPPORTED("ans0pi92t6ou5mworb3ohiqj3"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->tail_label) = make_label((void*)e, str, (aghtmlstr(str) ? (1 << 1) : (0 << 1)), UNSUPPORTED("eu3ztkfva2x87y72tnu7vv4re"); // lfi.fontsize, lfi.fontname, lfi.fontcolor); UNSUPPORTED("50hobbhvpqr6dj302waqr59mu"); // (((Agraphinfo_t*)(((Agobj_t*)(sg))->data))->has_labels) |= (1 << 2); } /* end vladimir */ /* We still accept ports beginning with colons but this is deprecated * That is, we allow tailport = ":abc" as well as the preferred * tailport = "abc". */ str = agget(e, new CString("tailport")); /* libgraph always defines tailport/headport; libcgraph doesn't */ if (N(str)) str = new CString(""); if (str!=null && str.charAt(0)!='\0') UNSUPPORTED("j71lo2acx1ydov0uj7xjjce"); // (((Agnodeinfo_t*)(((Agobj_t*)(((((((Agobj_t*)(e))->tag).objtype) == 3?(e):((e)+1))->node)))->data))->has_port) = (!(0)); ED_tail_port(e, chkPort ((CFunction) ND_shape(agtail(e)).getPtr("fns").getPtr("portfn"), agtail(e), str)); if (noClip(e, Z.z().E_tailclip)) UNSUPPORTED("cg4z67u0dm6h9nrcx8kkalnlt"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->tail_port).clip = 0; str = agget(e, new CString("headport")); /* libgraph always defines tailport/headport; libcgraph doesn't */ if (N(str)) str = new CString(""); if (str!=null && str.charAt(0)!='\0') UNSUPPORTED("542y57dbsosmjvsmdnzon2qb5"); // (((Agnodeinfo_t*)(((Agobj_t*)(((((((Agobj_t*)(e))->tag).objtype) == 2?(e):((e)-1))->node)))->data))->has_port) = (!(0)); ED_head_port(e, chkPort((CFunction) ND_shape(aghead(e)).getPtr("fns").getPtr("portfn"), aghead(e), str)); if (noClip(e, Z.z().E_headclip)) UNSUPPORTED("ayqscz30ekhcje94wh4ib1hcu"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->head_port).clip = 0; return r; } finally { LEAVING("3aqh64lxwv4da2snfe7fvr45b","common_init_edge"); } } //3 3mkqvtbyq9j8ktzil6t7vakg5 // static boxf addLabelBB(boxf bb, textlabel_t * lp, boolean flipxy) public static __struct__ addLabelBB(final ST_boxf bb, textlabel_t lp, boolean flipxy) { // WARNING!! STRUCT return addLabelBB_w_(bb.copy(), lp, flipxy).copy(); } private static __struct__ addLabelBB_w_(final ST_boxf bb, textlabel_t lp, boolean flipxy) { ENTERING("3mkqvtbyq9j8ktzil6t7vakg5","addLabelBB"); try { double width, height; final __struct__ p = JUtils.from(pointf.class); p.___(lp.getStruct("pos")); double min, max; if (flipxy) { height = lp.getStruct("dimen").getDouble("x"); width = lp.getStruct("dimen").getDouble("y"); } else { width = lp.getStruct("dimen").getDouble("x"); height = lp.getStruct("dimen").getDouble("y"); } min = p.getDouble("x") - width / 2.; max = p.getDouble("x") + width / 2.; if (min < bb.LL.x) bb.LL.x = min; if (max > bb.UR.x) bb.UR.x = max; min = p.getDouble("y") - height / 2.; max = p.getDouble("y") + height / 2.; if (min < bb.LL.y) bb.LL.y = min; if (max > bb.UR.y) bb.UR.y = max; return bb; } finally { LEAVING("3mkqvtbyq9j8ktzil6t7vakg5","addLabelBB"); } } //3 abydt85ykexa59r4o9fw9r77o // boxf polyBB (polygon_t* poly) public static Object polyBB(Object... arg) { UNSUPPORTED("eog6k627mwt0j7tauh94xvup8"); // boxf UNSUPPORTED("a4oqb702qwzmhj4ubv8nvwnut"); // polyBB (polygon_t* poly) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9qkiyn1vv2k6crbg8xakskx7r"); // int i, sides = poly->sides; UNSUPPORTED("wqb7ise36l84z7bv4eo0jk8e"); // int peris = MAX(poly->peripheries,1); UNSUPPORTED("f32j3p304siaf3gv4nw2fjxyd"); // pointf* verts = poly->vertices + (peris-1)*sides; UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("b6nw09v79k31a4rwwrm78jena"); // bb.LL = bb.UR = verts[0]; UNSUPPORTED("c3ab28lpww2nrulbu0e7eei8t"); // for (i = 1; i < sides; i++) { UNSUPPORTED("docqulnbkxq1u4xzeygy173ha"); // bb.LL.x = MIN(bb.LL.x,verts[i].x); UNSUPPORTED("162k3p74x02qk563wm0i4f5wy"); // bb.LL.y = MIN(bb.LL.y,verts[i].y); UNSUPPORTED("2puay77reaetlg69b3esmertj"); // bb.UR.x = MAX(bb.UR.x,verts[i].x); UNSUPPORTED("f4uggsyc6kisqh04h7ykmypit"); // bb.UR.y = MAX(bb.UR.y,verts[i].y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5v5hh30squmit8o2i5hs25eig"); // return bb; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bz7kjecium6a7xa39qfobwwnc // void updateBB(graph_t * g, textlabel_t * lp) public static void updateBB(Agraph_s g, textlabel_t lp) { ENTERING("bz7kjecium6a7xa39qfobwwnc","updateBB"); try { GD_bb(g).___(addLabelBB(GD_bb(g), lp, GD_flip(g)!=0)); } finally { LEAVING("bz7kjecium6a7xa39qfobwwnc","updateBB"); } } //3 2dhrilz05n4iopa5go0ir09tq // void compute_bb(graph_t * g) public static Object compute_bb(Object... arg) { UNSUPPORTED("43z8pxvn2vwb16wsrtd6eb4x4"); // void compute_bb(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("84lrde5ocrrgm9zv1ge9e8pwa"); // boxf b, bb; UNSUPPORTED("bzz7vodjegzgwxp8jzgkq3uti"); // boxf BF; UNSUPPORTED("5tn3u3gu9sfzv423lmms9ruht"); // pointf ptf, s2; UNSUPPORTED("dzpsknrwv8qkqq20hjnjpjn68"); // int i, j; UNSUPPORTED("331ilq8vsdj6hvow2dqcknbw9"); // if ((agnnodes(g) == 0) && (GD_n_cluster(g) ==0)) { UNSUPPORTED("6v3sw7pm6nazbrivryo4463ge"); // bb.LL = pointfof(0, 0); UNSUPPORTED("8fv5furomnqnewjrz8lsz5ks5"); // bb.UR = pointfof(0, 0); UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("f2nzvg1xnr11v28w2feg923cs"); // bb.LL = pointfof(INT_MAX, INT_MAX); UNSUPPORTED("7tttoj8cnxfqgnq2aagnnav48"); // bb.UR = pointfof(-INT_MAX, -INT_MAX); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("bp0gyw9zhjswqzd12yj9rxiao"); // ptf = coord(n); UNSUPPORTED("9vcwhl1ztgy395x3g3p27b3vp"); // s2.x = ND_xsize(n) / 2.0; UNSUPPORTED("97s3sp93769x79ow3rretvxt6"); // s2.y = ND_ysize(n) / 2.0; UNSUPPORTED("ecbpdzff34gb4naalyrxe5vzo"); // b.LL = sub_pointf(ptf, s2); UNSUPPORTED("52nsauaebr58m4f8afw1zu6mi"); // b.UR = add_pointf(ptf, s2); UNSUPPORTED("1p5j3as8potjryco1p28zv0ns"); // EXPANDBB(bb,b); UNSUPPORTED("1nfehzcu9dg4m0zqniggw0myh"); // if (ND_xlabel(n) && ND_xlabel(n)->set) { UNSUPPORTED("34rij3kl1x5ia5ytk2qaqgw7i"); // bb = addLabelBB(bb, ND_xlabel(n), GD_flip(g)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("919e52wzxh255quxj0nzwukfl"); // if (ED_spl(e) == 0) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("ah9ldbdg46psh3ic9qv1v1w1h"); // for (i = 0; i < ED_spl(e)->size; i++) { UNSUPPORTED("96deowae58qes8jszwjgwchpi"); // for (j = 0; j < (((Agedgeinfo_t*)AGDATA(e))->spl)->list[i].size; j++) { UNSUPPORTED("bm6ktup8tdejk1tq38xkq18zx"); // ptf = ED_spl(e)->list[i].list[j]; UNSUPPORTED("8xyn6e9qgao43nsgse8ya790b"); // EXPANDBP(bb,ptf); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("bbijzcnlrgsrkf9c3lvyq1j3w"); // if (ED_label(e) && ED_label(e)->set) { UNSUPPORTED("2d569ynk5qigji0zshsuvzop9"); // bb = addLabelBB(bb, ED_label(e), GD_flip(g)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("7l6ztc2uyzzyyw47jkbmwrvpq"); // if (ED_head_label(e) && ED_head_label(e)->set) { UNSUPPORTED("298664pi1qebzix2j1gdtf6rl"); // bb = addLabelBB(bb, ED_head_label(e), GD_flip(g)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("bs3i08itd9j5yeohefoglkqh5"); // if (ED_tail_label(e) && ED_tail_label(e)->set) { UNSUPPORTED("f4hck0g41boxn60os1w41wcok"); // bb = addLabelBB(bb, ED_tail_label(e), GD_flip(g)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ceshtn0f3py2v4gcpqi8gemwj"); // if (ED_xlabel(e) && ED_xlabel(e)->set) { UNSUPPORTED("9ssocbm4ep6gx5dquinuttjh4"); // bb = addLabelBB(bb, ED_xlabel(e), GD_flip(g)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7naa6f8pevjidfr7m41eli6xj"); // for (i = 1; i <= GD_n_cluster(g); i++) { UNSUPPORTED("ayvgjv5zau71cgcmznfyselk7"); // B2BF(GD_bb(GD_clust(g)[i]), BF); UNSUPPORTED("43e6y2c5ngcxuspv36aq0fc8k"); // EXPANDBB(bb,BF); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6rirb177r8kbx1j7f9jeot4rl"); // if (GD_label(g) && GD_label(g)->set) { UNSUPPORTED("8n0mzjgupx6e90manf0a8tmtc"); // bb = addLabelBB(bb, GD_label(g), GD_flip(g)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8pjanfm12ixxbeb7k86g3z5p4"); // GD_bb(g) = bb; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1ihcngl4nnl0l3a4lazjawjak // int is_a_cluster (Agraph_t* g) public static Object is_a_cluster(Object... arg) { UNSUPPORTED("c7v1kpsifryrniar3pr9lj2vb"); // int is_a_cluster (Agraph_t* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ey170unvby4qz57rfy4vs0l9f"); // return ((g == g->root) || (!strncasecmp(agnameof(g), "cluster", 7))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3eb5x8fxszk05rs03aw3w8bal // Agsym_t *setAttr(graph_t * g, void *obj, char *name, char *value, Agsym_t * ap) public static Object setAttr(Object... arg) { UNSUPPORTED("7hwd7388n90vnhk5ry6nk24pv"); // Agsym_t *setAttr(graph_t * g, void *obj, char *name, char *value, UNSUPPORTED("4gdje67ttlpied9791ewdlrd0"); // Agsym_t * ap) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cofg42y3teruvnmgv4yvovh4w"); // if (ap == (void *)0) { UNSUPPORTED("6wt2bbghw1qt1af7ak7o9gfgo"); // switch (agobjkind(obj)) { UNSUPPORTED("9t6es77h0301xk4n035emz6o"); // case AGRAPH: UNSUPPORTED("84ratfisjulkdxpfwy3c9htyz"); // ap = agattr(g, AGRAPH,name, ""); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4ih7nalu307xv8wvdpmgy537r"); // case AGNODE: UNSUPPORTED("71ugdg0a02c8zpt280ynq3cea"); // ap = agattr(g,AGNODE, name, ""); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5lnuird1e17irkx6ami31gay1"); // case AGEDGE: UNSUPPORTED("8xoc5xyqthnaqwgkuofzm1lup"); // ap = agattr(g,AGEDGE, name, ""); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("brfoeqd4pjsygr0tiki0f7wch"); // agxset(obj, ap, value); UNSUPPORTED("b8cimfvcp1vea97hyfr4m9nix"); // return ap; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 68c4u42h1oec8puw4huxzsram // static node_t *clustNode(node_t * n, graph_t * cg, agxbuf * xb, graph_t * clg) public static Object clustNode(Object... arg) { UNSUPPORTED("expuexpqhy52jx8egr4nmadbq"); // static node_t *clustNode(node_t * n, graph_t * cg, agxbuf * xb, UNSUPPORTED("83ctmg1k8dzy4himebqtr1m1y"); // graph_t * clg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cn1mqtf5jsxe76q0gt0zfucwm"); // node_t *cn; UNSUPPORTED("dyafhx3n373qe83tgg0ggtqew"); // static int idx = 0; UNSUPPORTED("f1winj1vhwrg5thteiqcqi29i"); // char num[100]; UNSUPPORTED("5mmb3522ptm4mcf9evx60ajew"); // agxbput(xb, "__"); UNSUPPORTED("e2g1diasmnmoy22hb3tpytznw"); // sprintf(num, "%d", idx++); UNSUPPORTED("2k35glrj7msg2hog9ut7u9nr7"); // agxbput(xb, num); UNSUPPORTED("9jhngs0d5bkz6h4vpq5lnoyga"); // ((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)':'))); UNSUPPORTED("a5rh1qp81ztiwxfywpk0vcapj"); // agxbput(xb, agnameof(cg)); UNSUPPORTED("67zj9gekg6ygql1z3r0ph931y"); // cn = agnode(agroot(cg), (((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)'\0'))),(char*)((xb)->ptr = (xb)->buf)), 1); UNSUPPORTED("1xux6s5s5ce4cl1ihunt2957f"); // agbindrec(cn, "Agnodeinfo_t", sizeof(Agnodeinfo_t), (!(0))); UNSUPPORTED("8pf78abddkqif7nnus196p6w9"); // (ND_clustnode(cn) = (!(0))); UNSUPPORTED("952l8hivvgcu9neihd5oejkne"); // agsubnode(cg,cn,1); UNSUPPORTED("7rpor9cu2a5ytz59ky3yzzf3e"); // //aginsert(cg, cn); UNSUPPORTED("bnwdscnff1ajygbrinebw5tzy"); // agsubnode(clg,n,1); UNSUPPORTED("b4oovl1t2xbj981x521u2wqw9"); // //aginsert(clg, n); UNSUPPORTED("8l8f1yq18trxwvv7v0vnjksyn"); // /* set attributes */ UNSUPPORTED("9xlhovy1a3tm3x50qm5at98wv"); // N_label = setAttr(agraphof(cn), cn, "label", "", N_label); UNSUPPORTED("ejig5v0kmrb3iq04qsqioadrf"); // N_style = setAttr(agraphof(cn), cn, "style", "invis", N_style); UNSUPPORTED("3x5fnrqc7r2ikzr4lb8pn0wc5"); // N_shape = setAttr(agraphof(cn), cn, "shape", "box", N_shape); UNSUPPORTED("a1e5vm1ljhru5haksozb6im5i"); // /* N_width = setAttr (cn->graph, cn, "width", "0.0001", N_width); */ UNSUPPORTED("f03wmos529in1bb9hvup5hhai"); // return cn; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1dr4tu5yewu3tcstfq3jkcfg // static int cmpItem(Dt_t * d, void *p1[], void *p2[], Dtdisc_t * disc) public static Object cmpItem(Object... arg) { UNSUPPORTED("2l8537eo2smrl3yniwkv96fhy"); // static int cmpItem(Dt_t * d, void *p1[], void *p2[], Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6z29omss9ay00bqf6xael7t6t"); // (void) d; UNSUPPORTED("8l8wg6vltx6d7vc9dzqb6n3wi"); // (void) disc; UNSUPPORTED("5dlkskltbjfd7l3iojdmxbfe7"); // if (p1[0] < p2[0]) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("6eiz5nxr8kgzbn75d0p98o9d3"); // else if (p1[0] > p2[0]) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("bbxeh2ijuksbga6h6yu50yytg"); // else if (p1[1] < p2[1]) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("6abzwq2ia723vgf1rf1i65f5d"); // else if (p1[1] > p2[1]) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bsharuh63hyx8gytgj0drcbxn // static void *newItem(Dt_t * d, item * objp, Dtdisc_t * disc) public static Object newItem(Object... arg) { UNSUPPORTED("akr8nubtu1wjzyw77dyu7l818"); // static void *newItem(Dt_t * d, item * objp, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("99a4mnjdm29dtq83hvtof51ni"); // item *newp = (item*)zmalloc(sizeof(item)); UNSUPPORTED("8l8wg6vltx6d7vc9dzqb6n3wi"); // (void) disc; UNSUPPORTED("7o3keent8kekj52p9qb43ethl"); // newp->p[0] = objp->p[0]; UNSUPPORTED("3wxc6pdiqxckjf8y7mwlj0am9"); // newp->p[1] = objp->p[1]; UNSUPPORTED("8gwlx3jj25pxng8pmk9zrtusa"); // newp->t = objp->t; UNSUPPORTED("9fhk60i1gsni0emh9jwo0y1ts"); // newp->h = objp->h; UNSUPPORTED("4enxnv484o23jodrkf81rxdg0"); // return newp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k3952c7spf98nnxwfwnp246t // static void freeItem(Dt_t * d, item * obj, Dtdisc_t * disc) public static Object freeItem(Object... arg) { UNSUPPORTED("8rxgun8stoo6nah2bndbm87b9"); // static void freeItem(Dt_t * d, item * obj, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8are8jqzwfj87yj4tkaohi3tf"); // free(obj); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 3q539ycox1bllayps038bsksa // static Dtdisc_t mapDisc = //3 cmped1c3ho0jglvwjjj6a228t // static edge_t *cloneEdge(edge_t * e, node_t * ct, node_t * ch) public static Object cloneEdge(Object... arg) { UNSUPPORTED("d4tyhi7zzf9xmns1lnu336v3r"); // static edge_t *cloneEdge(edge_t * e, node_t * ct, node_t * ch) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3uzp3aqejf5j0yv2yj4jw5aj"); // graph_t *g = agraphof(ct); UNSUPPORTED("7k2dgu104ye2c3d50mokkgwhz"); // edge_t *ce = agedge(g, ct, ch,(void *)0,1); UNSUPPORTED("1927pqk9hk6k5d7t1k9he6aa9"); // agbindrec(ce, "Agedgeinfo_t", sizeof(Agedgeinfo_t), (!(0))); UNSUPPORTED("a8urs3zuslesi9orp6p4z1i6f"); // agcopyattr(e, ce); UNSUPPORTED("8yr3irjwjiayt2t3izgwmnj9g"); // return ce; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c5a3lmz7tpara4c6bxtihr7m6 // static void insertEdge(Dt_t * map, void *t, void *h, edge_t * e) public static Object insertEdge(Object... arg) { UNSUPPORTED("9k64e2wql9m602qa681rgo7i7"); // static void insertEdge(Dt_t * map, void *t, void *h, edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7lw765nir8wljj9gzis4zqedg"); // item dummy; UNSUPPORTED("8nu1ezwxni2hxz2f9e8v2cbb8"); // dummy.p[0] = t; UNSUPPORTED("bc8q41s8rexxkeopidu04qewp"); // dummy.p[1] = h; UNSUPPORTED("4tdxi6d9w3ukmzktg7xfyiq7q"); // dummy.t = agtail(e); UNSUPPORTED("7382qi1yckci5zkxxyjphhdt1"); // dummy.h = aghead(e); UNSUPPORTED("bdurkecw4pa63pn37lkh7haq3"); // (*(((Dt_t*)(map))->searchf))((map),(void*)(&dummy),0000001); UNSUPPORTED("bb527tszlzw34gp1ih1xn1iar"); // dummy.p[0] = h; UNSUPPORTED("47zbtmrffd896ojei9okz9ed1"); // dummy.p[1] = t; UNSUPPORTED("9vuag0zig6ymzak8fo6r3sda1"); // dummy.t = aghead(e); UNSUPPORTED("6kdaphe8fi7139t83macqveyb"); // dummy.h = agtail(e); UNSUPPORTED("bdurkecw4pa63pn37lkh7haq3"); // (*(((Dt_t*)(map))->searchf))((map),(void*)(&dummy),0000001); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dkpu53gf0kuy7km1pxs1quv6w // static item *mapEdge(Dt_t * map, edge_t * e) public static Object mapEdge(Object... arg) { UNSUPPORTED("8o6iypv3kzhmwkk0ssw2py2yj"); // static item *mapEdge(Dt_t * map, edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2mkazi3rdjs334ce8xp82ihtk"); // void *key[2]; UNSUPPORTED("dhcqq0dsnymbpdjw0w7s03fp"); // key[0] = agtail(e); UNSUPPORTED("djzhgnjk5pxpyo8hhiad0bwfd"); // key[1] = aghead(e); UNSUPPORTED("42lnw96k38ctgmg8vg0dkcazj"); // return (item *) (*(((Dt_t*)(map))->searchf))((map),(void*)(&key),0001000); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 evei1rlt3rpux3ayqs9tyofmw // static void checkCompound(edge_t * e, graph_t * clg, agxbuf * xb, Dt_t * map, Dt_t* cmap) public static Object checkCompound(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("y76yzntmrne9d5t1m4t7ott3"); // checkCompound(edge_t * e, graph_t * clg, agxbuf * xb, Dt_t * map, Dt_t* cmap) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("24xfyvovg3es787o11thrjc92"); // graph_t *tg; UNSUPPORTED("a3ojwgag8ldublzh73whg427o"); // graph_t *hg; UNSUPPORTED("cn1mqtf5jsxe76q0gt0zfucwm"); // node_t *cn; UNSUPPORTED("apkwzmnbl05ohutf7wes9igj2"); // node_t *cn1; UNSUPPORTED("7jj1xtfi4cbw5y6yhlzh0mli4"); // node_t *t = agtail(e); UNSUPPORTED("7sdvsuo2rbo6of75bzleek8qf"); // node_t *h = aghead(e); UNSUPPORTED("2dc0glyu5z80juidpelk52ugz"); // edge_t *ce; UNSUPPORTED("11hik2e4x4z9iutby72hbrzgx"); // item *ip; UNSUPPORTED("dvxbl4pteylrj225li1lb6hx2"); // if ((ND_clustnode(h))) return; UNSUPPORTED("6mxhjii0vool4e7v7ro88ozt"); // tg = (strncmp(agnameof(t),"cluster",7)?(void *)0:findCluster(cmap,agnameof(t))); UNSUPPORTED("9h0q9kw3f1tenf4puz9oi64l"); // hg = (strncmp(agnameof(h),"cluster",7)?(void *)0:findCluster(cmap,agnameof(h))); UNSUPPORTED("h9gulavvyc3ipss9cgex8x3k"); // if (!tg && !hg) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("60xmxr4vqgqctofdynktmr7o1"); // if (tg == hg) { UNSUPPORTED("dr3nbzpzpx0aupm54j364opox"); // agerr(AGWARN, "cluster cycle %s -- %s not supported\n", agnameof(t), UNSUPPORTED("4t2kykme4iu9016m9s14od6yh"); // agnameof(t)); UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5hnveujdt658bi20dkn93pkes"); // ip = mapEdge(map, e); UNSUPPORTED("bct0h7obrwmyxyjpdlga0lo14"); // if (ip) { UNSUPPORTED("6tq7d69sgwkznt9jdlhl5jzdj"); // cloneEdge(e, ip->t, ip->h); UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("85v9wkuzgj377kagk2q32243s"); // if (hg) { UNSUPPORTED("8esnbcsvq7wtwxyn2ds3qnzxr"); // if (tg) { UNSUPPORTED("18jmtdvbt3bs4fj4fu02ry30e"); // if (agcontains(hg, tg)) { UNSUPPORTED("97u64gola1vplk8cvf8wg60bh"); // agerr(AGWARN, "tail cluster %s inside head cluster %s\n", UNSUPPORTED("369r4tljymt875kkmgpkpyt8l"); // agnameof(tg), agnameof(hg)); UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("8o34cjwrgpnrquyxl2o3bb8zk"); // if (agcontains(tg, hg)) { UNSUPPORTED("9cr5cpb8befiu9fovqfiiljjl"); // agerr(AGWARN, "head cluster %s inside tail cluster %s\n", UNSUPPORTED("fxxb0u8d3qtcacdofimmuqac"); // agnameof(hg),agnameof(tg)); UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("71igoahydbe2dr812u1rb188n"); // cn = clustNode(t, tg, xb, clg); UNSUPPORTED("9tutq5zmo2t0l31gwnu2vwrup"); // cn1 = clustNode(h, hg, xb, clg); UNSUPPORTED("3cqe6v0gfzo0dwfrf8ns9l15c"); // ce = cloneEdge(e, cn, cn1); UNSUPPORTED("puotk7g3k7fy9jnp2axq0qqz"); // insertEdge(map, t, h, ce); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("apxu8gru4cebxzthha8fwtfum"); // if (agcontains(hg, t)) { UNSUPPORTED("ch79b4wihrmywtrraz048h29q"); // agerr(AGWARN, "tail node %s inside head cluster %s\n", UNSUPPORTED("c0gja8mg2a5tllq0cl44kobvl"); // agnameof(t), agnameof(hg)); UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("446wbqmos7b2zyj2ps1r6kuhl"); // cn = clustNode(h, hg, xb, clg); UNSUPPORTED("bhxc2l94cwt5l1wth28b2o5pp"); // ce = cloneEdge(e, t, cn); UNSUPPORTED("puotk7g3k7fy9jnp2axq0qqz"); // insertEdge(map, t, h, ce); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("2ps8erulnhdu23ou4uniz2hu6"); // if (agcontains(tg, h)) { UNSUPPORTED("1cjnfqs77zdcnsm0o72f90ksk"); // agerr(AGWARN, "head node %s inside tail cluster %s\n", agnameof(h), UNSUPPORTED("67ucv9k4148ltlnjqhl4rz86a"); // agnameof(tg)); UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2sanft0kxtxdy21i6ukf4c05t"); // cn = clustNode(t, tg, xb, clg); UNSUPPORTED("5fxyznzitqqrmw44h44veynfw"); // ce = cloneEdge(e, cn, h); UNSUPPORTED("c7jpyix9gxyo3vaiavoxyh155"); // insertEdge(map, t, h, ce); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dwutwgt4iv7io73xbnfs967wi // int processClusterEdges(graph_t * g) public static Object processClusterEdges(Object... arg) { UNSUPPORTED("4oyug57mkqcdxkzes2u1byitf"); // int processClusterEdges(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ecz4e03zumggc8tfymqvirexq"); // int rv; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("a9ekq0g92dftp5ha575c6yu2u"); // node_t *nxt; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("c7d686aym108b09btq8wtbaqb"); // graph_t *clg; UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("ae7vbw9q2eczpdja7cbbq50pn"); // Dt_t *map; UNSUPPORTED("6vtk1euczoz6qoydjb6zi2aw7"); // Dt_t *cmap = mkClustMap (g); UNSUPPORTED("h0or3v13348vfl22jqz895yc"); // unsigned char buf[128]; UNSUPPORTED("ez0qg0y6sdmbdyttclx339epy"); // map = dtopen(&mapDisc, Dtoset); UNSUPPORTED("cpyda14dogcucergo5ci8essn"); // clg = agsubg(g, "__clusternodes",1); UNSUPPORTED("7gy5iqkef9rpt221qibtgi0bf"); // agbindrec(clg, "Agraphinfo_t", sizeof(Agraphinfo_t), (!(0))); UNSUPPORTED("ci65k77x1b3nq6luu69s87oup"); // agxbinit(&xb, 128, buf); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("89a8vf7uwx9v2vh8f8epycx86"); // if ((ND_clustnode(n))) continue; UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("7recxsc5i7btnkw1u0i1zrcke"); // checkCompound(e, clg, &xb, map, cmap); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1at5m9ctjn3ukv5gqtfswik02"); // agxbfree(&xb); UNSUPPORTED("b6u4k91yj41tlxefwoh6asd20"); // dtclose(map); UNSUPPORTED("bdsudu527hktokp1kvhusfmoe"); // rv = agnnodes(clg); UNSUPPORTED("22i66qr930abhwgxbm0wq87o9"); // for (n = agfstnode(clg); n; n = nxt) { UNSUPPORTED("f4noczumg69t18r8ssfanvoks"); // nxt = agnxtnode(clg, n); UNSUPPORTED("d2695chnyayerv0xcynrkg7yd"); // agdelete(g, n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("d7dekled5ml4ke75zmk09qqsx"); // agclose(clg); UNSUPPORTED("dgwcr0xmkos3gxsam25rktyub"); // if (rv) UNSUPPORTED("6pk8ar1h2wlfngow4ehgw89jz"); // (GD_flags(g) |= 1); UNSUPPORTED("5gkwwtk0stiam8elj7z38rq47"); // dtclose(cmap); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5kmpn0ajfqqlgj5cw9vpfasej // static node_t *mapN(node_t * n, graph_t * clg) public static Object mapN(Object... arg) { UNSUPPORTED("buha873k6dpip6wp1k6884zn8"); // static node_t *mapN(node_t * n, graph_t * clg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8cudi8s29q4uqmilbu8c75v3p"); // node_t *nn; UNSUPPORTED("8i0d7frxcvvmzhidle0zin9i0"); // char *name; UNSUPPORTED("3mtc40uaa6dfx8pj5lh3cyn1l"); // graph_t *g = agraphof(n); UNSUPPORTED("av59ae8c4mws46sf5dumz1k0s"); // Agsym_t *sym; UNSUPPORTED("bnb5n48z4b233ir0fewnxiecu"); // if (!((ND_clustnode(n)))) UNSUPPORTED("bp96fem54xcxrw16cmnlpell9"); // return n; UNSUPPORTED("412fabs39sm0oyvvs0n9tys7h"); // agsubnode(clg, n, 1); UNSUPPORTED("4qyzymwl4mdlxpdvh64mgshjy"); // name = strchr(agnameof(n), ':'); UNSUPPORTED("265kxn69043hh3vmr1ma8pbpg"); // assert(name); UNSUPPORTED("etbl775rsebn18g7vfu6j5ffu"); // name++; UNSUPPORTED("4y7kt4c0ur5ptmeorwazg3xbz"); // if ((nn = (agnode(g,name,0)))) UNSUPPORTED("7dxo4qnacudla7r7y8669i5pg"); // return nn; UNSUPPORTED("75euvmm5puodd8n68kvjjnyub"); // nn = agnode(g, name, 1); UNSUPPORTED("a510dla8b91um8smr1ik3n40i"); // agbindrec(nn, "Agnodeinfo_t", sizeof(Agnodeinfo_t), (!(0))); UNSUPPORTED("dhxjy107eberr96dmzpl8canc"); // /* Set all attributes to default */ UNSUPPORTED("606mifyx9hb1bpagnmzxrlk9z"); // for (sym = agnxtattr(g, AGNODE, (void *)0); sym; (sym = agnxtattr(g, AGNODE, sym))) { UNSUPPORTED("7rxjvkrh1kkw8g1ntegrpmqly"); // if (agxget(nn, sym) != sym->defval) UNSUPPORTED("bfyji5ohpzlfb4najikk4a9cw"); // agxset(nn, sym, sym->defval); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ey1y9gcof82mu9xr88pebu8s3"); // return nn; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 789ww738n8t5kluf6zeo8zwsj // static void undoCompound(edge_t * e, graph_t * clg) public static Object undoCompound(Object... arg) { UNSUPPORTED("4gm4tyoex45q7hsr07asvlb3v"); // static void undoCompound(edge_t * e, graph_t * clg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7jj1xtfi4cbw5y6yhlzh0mli4"); // node_t *t = agtail(e); UNSUPPORTED("7sdvsuo2rbo6of75bzleek8qf"); // node_t *h = aghead(e); UNSUPPORTED("e43x1qhepqnkibbp8aphz9g47"); // node_t *ntail; UNSUPPORTED("9cji9jzlewigresgaoc0ejw5f"); // node_t *nhead; UNSUPPORTED("uleojnk3a2mlkreb46gqu0hr"); // if (!((ND_clustnode(t)) || (ND_clustnode(h)))) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("55xujazl71m0logk60wzmjvtq"); // ntail = mapN(t, clg); UNSUPPORTED("7g2iurz37ys33fcir84rjj0w0"); // nhead = mapN(h, clg); UNSUPPORTED("9bery3hjtmldzatlddlbzc00j"); // cloneEdge(e, ntail, nhead); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6s7x7ut8o7wrwuw5nfdbknslk // void undoClusterEdges(graph_t * g) public static Object undoClusterEdges(Object... arg) { UNSUPPORTED("xsvmylok7lqoljd2ftvt8eki"); // void undoClusterEdges(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("c7d686aym108b09btq8wtbaqb"); // graph_t *clg; UNSUPPORTED("cpyda14dogcucergo5ci8essn"); // clg = agsubg(g, "__clusternodes",1); UNSUPPORTED("cxzb8zj9uk5xkq6lyiraqyh5o"); // agbindrec(clg, "Agraphinfo_t", sizeof(Agraphinfo_t), (!(0))); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("e133h9i48sw1xkk4miz3q5qw6"); // undoCompound(e, clg); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6fhvmrn719v1oxev0ugv8gead"); // for (n = agfstnode(clg); n; n = agnxtnode(clg, n)) { UNSUPPORTED("d2695chnyayerv0xcynrkg7yd"); // agdelete(g, n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("d7dekled5ml4ke75zmk09qqsx"); // agclose(clg); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dwase854hhoz11vcuphugbij // attrsym_t* safe_dcl(graph_t * g, int obj_kind, char *name, char *def) public static Object safe_dcl(Object... arg) { UNSUPPORTED("850d7lqcvt2dszn9wl9f6zef0"); // attrsym_t* UNSUPPORTED("4dafq6zrc7d2eg2y3pxdhhp6k"); // safe_dcl(graph_t * g, int obj_kind, char *name, char *def) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1z0y79inqwletzkfgolwkh2mm"); // attrsym_t *a = agattr(g,obj_kind,name, (void *)0); UNSUPPORTED("53xvsqb1bmjlv8zo5ey6uznyf"); // if (!a) /* attribute does not exist */ UNSUPPORTED("avuy3kulsc2bvd7gtxiznnkl"); // a = agattr(g,obj_kind,name,def); UNSUPPORTED("3gfohtnqgemf2e1akg4je944a"); // return a; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8vn95uhvbccfyutd9itvpk8vy // static int comp_entities(const void *e1, const void *e2) public static Object comp_entities(Object... arg) { UNSUPPORTED("28uhwy0iibw08ehww04k9s3le"); // static int comp_entities(const void *e1, const void *e2) { UNSUPPORTED("3c7l2zx25w9zqhkqe16urhizu"); // return strcmp(((struct entities_s *)e1)->name, ((struct entities_s *)e2)->name); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7t94y8iigozdjfx36lfzyak08 // char* scanEntity (char* t, agxbuf* xb) public static Object scanEntity(Object... arg) { UNSUPPORTED("bz1schmt8gz4xlf2x79u589jz"); // char* scanEntity (char* t, agxbuf* xb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ecs59z0l3j60cvfc1n8vabb0n"); // char* endp = strchr (t, ';'); UNSUPPORTED("bzu1jieuhoy6jahlnld5cybzk"); // struct entities_s key, *res; UNSUPPORTED("coa0oz6l6jdsodktc0tdnc2cb"); // int len; UNSUPPORTED("90hm5x3gtehrl08u4s3bb5h5s"); // char buf[8+1]; UNSUPPORTED("egvn4me3pgt2km0tpawwhhk2t"); // ((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)'&'))); UNSUPPORTED("981k5uhzqy8u4eweluhu3ajcc"); // if (!endp) return t; UNSUPPORTED("405o5srxruhaurslvb8fxibcs"); // if (((len = endp-t) > 8) || (len < 2)) return t; UNSUPPORTED("1m465yt5bfo53jvd170k1s0uf"); // strncpy (buf, t, len); UNSUPPORTED("3w01p3l63zt07scumxz12foyc"); // buf[len] = '\0'; UNSUPPORTED("22hhi6szy0artz9sx31yn993t"); // key.name = buf; UNSUPPORTED("1p9rtkc428xvwvxqu9ulqllbq"); // res = bsearch(&key, entities, 252, UNSUPPORTED("6ucfe24q86v1s0pnugf94k0o1"); // sizeof(entities[0]), comp_entities); UNSUPPORTED("9degteg0v0woertf357m3p670"); // if (!res) return t; UNSUPPORTED("62f6a0uh98flc5r4sp8ye5una"); // sprintf (buf, "%d", res->value); UNSUPPORTED("9kxympmoesjmhxkjfyrue546g"); // ((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)'#'))); UNSUPPORTED("5q33wkzo42rb2ovinz8n32geq"); // agxbput(xb, buf); UNSUPPORTED("ylj9ttyordcfgahnlqhhobod"); // ((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)';'))); UNSUPPORTED("29skqtq6yonorv6xk81t19v7j"); // return (endp+1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6ol0iqfokq31kpiqngns9cnkm // static int htmlEntity (char** s) public static Object htmlEntity(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("61r6m6shucv4zvnmx9obkeu9e"); // htmlEntity (char** s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("bzu1jieuhoy6jahlnld5cybzk"); // struct entities_s key, *res; UNSUPPORTED("22sdohyy8v7963m1iifyxam9d"); // char entity_name_buf[8+1]; UNSUPPORTED("cha3ynahkzif8mjf2aasyan4p"); // unsigned char* str = *(unsigned char**)s; UNSUPPORTED("6iar0dtf0ozvirclx3rsu5ywk"); // unsigned int byte; UNSUPPORTED("4q8bcbceil82j5ssfuh8q4fhu"); // int i, n = 0; UNSUPPORTED("8xwfccpasv03cb2aijwrkxrt8"); // byte = *str; UNSUPPORTED("f1y8qnn6iohzeg8fx1fsww8wz"); // if (byte == '#') { UNSUPPORTED("47brdazpxh26941mcbd57m5w"); // byte = *(str + 1); UNSUPPORTED("8lhwl4wznsahr1vgtzqnvsgqp"); // if (byte == 'x' || byte == 'X') { UNSUPPORTED("9kdayjiewvd52f72h664pmhy4"); // for (i = 2; i < 8; i++) { UNSUPPORTED("58bvsjm19jatr5xgbuetim3c"); // byte = *(str + i); UNSUPPORTED("7ry0uw9esv0a55bciqzqr7dt0"); // if (byte >= 'A' && byte <= 'F') UNSUPPORTED("efm984116x5zq1dui5ll11r0k"); // byte = byte - 'A' + 10; UNSUPPORTED("30cf1s08yhe1dm0wfrzai7qj9"); // else if (byte >= 'a' && byte <= 'f') UNSUPPORTED("dmoz94y1j59da7u2zxu75l949"); // byte = byte - 'a' + 10; UNSUPPORTED("9sus494ncxh3tbij66aefjaji"); // else if (byte >= '0' && byte <= '9') UNSUPPORTED("70r2dn1krhunm4u7uw43urh5b"); // byte = byte - '0'; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("ai4db41odnnfnokairbrylj2a"); // n = (n * 16) + byte; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("bkj5d6ozqtq7ttrkpmp5p719j"); // for (i = 1; i < 8; i++) { UNSUPPORTED("58bvsjm19jatr5xgbuetim3c"); // byte = *(str + i); UNSUPPORTED("2rd77g61lvh7l0oq5bxbu866w"); // if (byte >= '0' && byte <= '9') UNSUPPORTED("c8u6dbnnbecfd71yts7yps8l8"); // n = (n * 10) + (byte - '0'); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5kruz0luqhpkxlt2rqdj7qe9y"); // if (byte == ';') { UNSUPPORTED("e7p6jds2xupttn34j7k97koje"); // str += i+1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("902oeel2kkuedgae5ujakzjhy"); // n = 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("e63mn7kr8jrvjhx7i9grnwgnq"); // key.name = p = entity_name_buf; UNSUPPORTED("avuwvye3hioreemrm282n46zz"); // for (i = 0; i < 8; i++) { UNSUPPORTED("ax9o0naqvr50ld6sknp2j1b44"); // byte = *(str + i); UNSUPPORTED("ddy91zgs9bt560h592o4j4zww"); // if (byte == '\0') break; UNSUPPORTED("a4ymj4wcljef0f889dm6ypyc6"); // if (byte == ';') { UNSUPPORTED("9hm2gc1ly30ctjxthh7ce9kr4"); // *p++ = '\0'; UNSUPPORTED("3i427o0072j16pqppnwmfigbx"); // res = bsearch(&key, entities, 252, UNSUPPORTED("d4pg41mh9zro8muax20xcn7rt"); // sizeof(entities[0]), *comp_entities); UNSUPPORTED("4b5oorrowb2d761jp0u4kh8n1"); // if (res) { UNSUPPORTED("xetj9qmi9xudhpu0fa8ucl4h"); // n = res->value; UNSUPPORTED("99m08trqtau3p70at3g9nkyj6"); // str += i+1; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("d79b803cv2twmevybf99njur6"); // *p++ = byte; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("84mp0v655u5xocqmax8egxonv"); // *s = (char*)str; UNSUPPORTED("69hc24ic55i66g8tf2ne42327"); // return n; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e3fdq03jg6298zgwjnftvhivy // static unsigned char cvtAndAppend (unsigned char c, agxbuf* xb) public static Object cvtAndAppend(Object... arg) { UNSUPPORTED("at0aua2ntxsp0j1h4yidmr4si"); // static unsigned char UNSUPPORTED("dh6zi66v19z0wdg8u346fccp4"); // cvtAndAppend (unsigned char c, agxbuf* xb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aqjwq3fk7zmi0i48c6b3bdyn1"); // char buf[2]; UNSUPPORTED("yiuh599p05f2mpu2e3pesu2o"); // char* s; UNSUPPORTED("a4px33i4moqe8ybwatz0g8k6"); // char* p; UNSUPPORTED("dwe86466ugstemepdfk8yzphz"); // int len; UNSUPPORTED("5q4ts22itevk0jgej86bk287q"); // buf[0] = c; UNSUPPORTED("nw02pwbnc00xo3a3qlx6r8r9"); // buf[1] = '\0'; UNSUPPORTED("20haqm26n7i0pwyh3s5hhdatk"); // p = s = latin1ToUTF8 (buf); UNSUPPORTED("2xuf8h1bzawprd2j4asj2e8ja"); // len = strlen(s); UNSUPPORTED("3l8ud5i4y8a5dq0mtvlvixp91"); // while (len-- > 1) UNSUPPORTED("6pe2vbb93li7px1jaorf811ph"); // ((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)*p++))); UNSUPPORTED("3rr9o0qklmhj4jn7bft2nr8td"); // c = *p; UNSUPPORTED("f1430a029xzg8cabffg2k9l6j"); // free (s); UNSUPPORTED("bskm24m9z4b23box60oxnymv"); // return c; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9yungx7uxqkmzfh2ub6gs9l48 // char* htmlEntityUTF8 (char* s, graph_t* g) public static CString htmlEntityUTF8(CString s, Agraph_s g) { ENTERING("9yungx7uxqkmzfh2ub6gs9l48","htmlEntityUTF8"); try { LOG2("htmlEntityUTF8 "+s); if (s!=null) return s.duplicate(); UNSUPPORTED("1xtgr84lklglr4gz1i1m3t30"); // char* htmlEntityUTF8 (char* s, graph_t* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a86rc8dlb4bgtjxjhv43cnmup"); // static graph_t* lastg; UNSUPPORTED("1gn88eczuyt54egtiulqe7y7h"); // static boolean warned; UNSUPPORTED("3rzf3h52xn02xrxie111286a0"); // char* ns; UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("esg3s800dx899v69pkng2kavv"); // unsigned char buf[BUFSIZ]; UNSUPPORTED("10sir32iwi5l2jyfgp65pihto"); // unsigned char c; UNSUPPORTED("4urrp9tny84a3cm8ycya896x3"); // unsigned int v; UNSUPPORTED("d5druw9z4e87khtgyeivjngvc"); // int ignored; UNSUPPORTED("4fymyfhfc3ddededhxw7cs671"); // int uc; UNSUPPORTED("d6z43cxggqxq7iq4puyluzkfn"); // int ui; UNSUPPORTED("4pgl4pn1cad2whf242bntmjre"); // (void) ignored; UNSUPPORTED("t65eqheg8dxzi237a648t66j"); // if (lastg != g) { UNSUPPORTED("emyoumradju26mhebq2bewtva"); // lastg = g; UNSUPPORTED("9ys85d2ctjb1a9ra0n11o2a2r"); // warned = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3jwm77zyv02ukrvjv9jppejf7"); // agxbinit(&xb, BUFSIZ, buf); UNSUPPORTED("11zj3p308ttro04hrzowx0vrh"); // while ((c = *(unsigned char*)s++)) { UNSUPPORTED("3xqp191v0egfea0z3ds5p1mjt"); // if (c < 0xC0) UNSUPPORTED("4j200801m87vnfrkblygi6ucj"); // /* UNSUPPORTED("1egwnjpl995mff91kquf9ikvl"); // * Handles properly formed UTF-8 characters between UNSUPPORTED("8rfd02x8qlye0oo8ro9u9g8ya"); // * 0x01 and 0x7F. Also treats \0 and naked trail UNSUPPORTED("49xkviec8w4s3zvlq13991yqh"); // * bytes 0x80 to 0xBF as valid characters representing UNSUPPORTED("bg2026u05g8jo9nm9pr39cknl"); // * themselves. UNSUPPORTED("20m1lc1moer8x00tx9ceto0iw"); // */ UNSUPPORTED("6g3zbtp7zrl9i7jz1if5yi7rj"); // uc = 0; UNSUPPORTED("5ks80mtyizjvlnrh1bwebqrx7"); // else if (c < 0xE0) UNSUPPORTED("2gr59wt9ibszrzwii40dqyd5b"); // uc = 1; UNSUPPORTED("2su1o4swg92stlgi53k4ydm5u"); // else if (c < 0xF0) UNSUPPORTED("c0zrulbhqoupyvbwpwapfpc70"); // uc = 2; UNSUPPORTED("dveaae8p8nhz8gosmtiftudrz"); // else if (c < 0xF8) UNSUPPORTED("a4c1bzq46y652vgwpxsruptth"); // uc = 3; UNSUPPORTED("3jir07ymknf0hmb9pv9x4dr3o"); // else { UNSUPPORTED("ar52jlyh4qqazbcbvntg2wet6"); // uc = -1; UNSUPPORTED("ame11lb7ylv3rp1nhtuq383du"); // if (!warned) { UNSUPPORTED("7acv020k6kt3q8tholp3ex0qa"); // agerr(AGWARN, "UTF8 codes > 4 bytes are not currently supported (graph %s) - treated as Latin-1. Perhaps \"-Gcharset=latin1\" is needed?\n", agnameof(g)); UNSUPPORTED("qr4o1w9xvn1ayc52y0f4c8bh"); // warned = 1; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("ejqmh8ox9uoy02anzqhcxcrro"); // c = cvtAndAppend (c, &xb); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("8n9ts84r09bm29qdb7v2og087"); // if (uc == 0 && c == '&') { UNSUPPORTED("3cziqu94ggcy3m9kpbpdefqgk"); // /* replace html entity sequences like: & UNSUPPORTED("1c1fqb40szvpdlekj4as5qcqq"); // * and: { with their UTF8 equivalents */ UNSUPPORTED("buyl72klnvh12cf4m578joukc"); // v = htmlEntity (&s); UNSUPPORTED("1fj0k3ba7vy9tjmjnc4d4mujb"); // if (v) { UNSUPPORTED("aso1t4v0cars70ngqafalmoeq"); // if (v < 0x7F) /* entity needs 1 byte in UTF8 */ UNSUPPORTED("777bke4pyf77uol5s5d6qk0i6"); // c = v; UNSUPPORTED("4wqu3fuzmckazc7eb1vvoxspn"); // else if (v < 0x07FF) { /* entity needs 2 bytes in UTF8 */ UNSUPPORTED("2b9x6g0k8a00ty06llcyp6cqu"); // ignored = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)(v >> 6) | 0xC0))); UNSUPPORTED("el4sow483b296l5o1hy6oqkzp"); // c = (v & 0x3F) | 0x80; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("163d4s8voz31qrt0e4c8ysn9e"); // else { /* entity needs 3 bytes in UTF8 */ UNSUPPORTED("4tpuwv4i0wslspyymoqhdxsvd"); // ignored = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)(v >> 12) | 0xE0))); UNSUPPORTED("8unuta6ydloexb267kdf96wi"); // ignored = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)((v >> 6) & 0x3F) | 0x80))); UNSUPPORTED("el4sow483b296l5o1hy6oqkzp"); // c = (v & 0x3F) | 0x80; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("atwq5cvh75c4mpqr6f8bepwkd"); // else /* copy n byte UTF8 characters */ UNSUPPORTED("75h3d3pcb66cff2xszmbwxny0"); // for (ui = 0; ui < uc; ++ui) UNSUPPORTED("75m8b2zfuuay6o25xl08y168m"); // if ((*s & 0xC0) == 0x80) { UNSUPPORTED("2bav6kbg19gemwcsyepjeg52u"); // ignored = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)c))); UNSUPPORTED("5kkh713qn8pc4dhd3omuop8qk"); // c = *(unsigned char*)s++; UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("69mmu86j5iw8x34fdfo0k59ff"); // else { UNSUPPORTED("cjh6htddtrrxjuyqzavdlw01o"); // if (!warned) { UNSUPPORTED("8ljhi9erpokpqsnveckujskly"); // agerr(AGWARN, "Invalid %d-byte UTF8 found in input of graph %s - treated as Latin-1. Perhaps \"-Gcharset=latin1\" is needed?\n", uc + 1, agnameof(g)); UNSUPPORTED("8sgutsruuu83a337z05bvytk0"); // warned = 1; UNSUPPORTED("3d2mow5zy6q4vrtc38f78ucgh"); // } UNSUPPORTED("8jh5xw3y1bjy4poswq4h2wk4n"); // c = cvtAndAppend (c, &xb); UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("g2y6e9pld3899aejuqyr2x25"); // } UNSUPPORTED("28mab50dtpxfjz5h216ox1q6w"); // ignored = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)c))); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3g7d9dp3ny3ggno64pwi7nmkg"); // ns = strdup ((((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf))); UNSUPPORTED("1at5m9ctjn3ukv5gqtfswik02"); // agxbfree(&xb); UNSUPPORTED("98aa6ybsfiu5u7r3j6fsv3snz"); // return ns; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("9yungx7uxqkmzfh2ub6gs9l48","htmlEntityUTF8"); } } //3 6spvz5rdt5uhtcpz0ypysuf8j // char* latin1ToUTF8 (char* s) public static Object latin1ToUTF8(Object... arg) { UNSUPPORTED("6k189l7y3kfe03zj65a0hi02l"); // char* latin1ToUTF8 (char* s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3rzf3h52xn02xrxie111286a0"); // char* ns; UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("esg3s800dx899v69pkng2kavv"); // unsigned char buf[BUFSIZ]; UNSUPPORTED("7yeyn4giwkk2r8xfjbwuqwdgq"); // unsigned int v; UNSUPPORTED("d5druw9z4e87khtgyeivjngvc"); // int ignored; UNSUPPORTED("4pgl4pn1cad2whf242bntmjre"); // (void) ignored; UNSUPPORTED("3jwm77zyv02ukrvjv9jppejf7"); // agxbinit(&xb, BUFSIZ, buf); UNSUPPORTED("4z3yoswxkrk1x38246p01ai17"); // /* Values are either a byte (<= 256) or come from htmlEntity, whose UNSUPPORTED("7a461v6k1cu23svait528w042"); // * values are all less than 0x07FF, so we need at most 3 bytes. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("8fjxnjq1i6zgxuaaty7wolmz2"); // while ((v = *(unsigned char*)s++)) { UNSUPPORTED("3tv51fniyuldzqwej04vf24jp"); // if (v == '&') { UNSUPPORTED("ci2g1lymqorgpcbacxprxut4f"); // v = htmlEntity (&s); UNSUPPORTED("cdvw86q5dy4dmwr7iig71kx78"); // if (!v) v = '&'; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("26nwakev47c8vp1v45upgjyp3"); // if (v < 0x7F) UNSUPPORTED("bcv1n4sa19kis6cblb97g8sgx"); // ignored = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)v))); UNSUPPORTED("e97czqogsdpsth2jrh2kufwur"); // else if (v < 0x07FF) { UNSUPPORTED("a5h07gnh3tqz7f4mrbknarch7"); // ignored = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)(v >> 6) | 0xC0))); UNSUPPORTED("9a4rvaow9xmxkoagejrjrt84r"); // ignored = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)(v & 0x3F) | 0x80))); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("9s2nvoskqz83rf7mkroywr1sr"); // ignored = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)(v >> 12) | 0xE0))); UNSUPPORTED("c3mv09jqjhqt1y3zrjw9ox53o"); // ignored = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)((v >> 6) & 0x3F) | 0x80))); UNSUPPORTED("9a4rvaow9xmxkoagejrjrt84r"); // ignored = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)(v & 0x3F) | 0x80))); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3g7d9dp3ny3ggno64pwi7nmkg"); // ns = strdup ((((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf))); UNSUPPORTED("1at5m9ctjn3ukv5gqtfswik02"); // agxbfree(&xb); UNSUPPORTED("98aa6ybsfiu5u7r3j6fsv3snz"); // return ns; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 913nrt0i8mr2gg2mz9qxdqh8o // char* utf8ToLatin1 (char* s) public static Object utf8ToLatin1(Object... arg) { UNSUPPORTED("cqm25rponse4rsi686sbn1lo0"); // char* UNSUPPORTED("8jj111wbaa8z4z3poc1q0t8y5"); // utf8ToLatin1 (char* s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3rzf3h52xn02xrxie111286a0"); // char* ns; UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("esg3s800dx899v69pkng2kavv"); // unsigned char buf[BUFSIZ]; UNSUPPORTED("10sir32iwi5l2jyfgp65pihto"); // unsigned char c; UNSUPPORTED("gmcqqf9woz72oix0r5rjuoto"); // unsigned char outc; UNSUPPORTED("d5druw9z4e87khtgyeivjngvc"); // int ignored; UNSUPPORTED("4pgl4pn1cad2whf242bntmjre"); // (void) ignored; UNSUPPORTED("3jwm77zyv02ukrvjv9jppejf7"); // agxbinit(&xb, BUFSIZ, buf); UNSUPPORTED("11zj3p308ttro04hrzowx0vrh"); // while ((c = *(unsigned char*)s++)) { UNSUPPORTED("dbsfo5gpcng9982vxr7ikbf0i"); // if (c < 0x7F) UNSUPPORTED("28mab50dtpxfjz5h216ox1q6w"); // ignored = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)c))); UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("1ppkx26s53neuwlkgoyl230ya"); // outc = (c & 0x03) << 6; UNSUPPORTED("9d685hmukj0hf94zcu28sy09x"); // c = *(unsigned char*)s++; UNSUPPORTED("55iewluciyo7pfuwv8aez09pb"); // outc = outc | (c & 0x3F); UNSUPPORTED("bb5kgu9v5ko417jskeknpttmq"); // ignored = ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)outc))); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3g7d9dp3ny3ggno64pwi7nmkg"); // ns = strdup ((((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf))); UNSUPPORTED("1at5m9ctjn3ukv5gqtfswik02"); // agxbfree(&xb); UNSUPPORTED("98aa6ybsfiu5u7r3j6fsv3snz"); // return ns; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9bvrwdmh7tm5thehp9lgdr6xd // boolean overlap_node(node_t *n, boxf b) public static Object overlap_node(Object... arg) { UNSUPPORTED("adn6r7oz1h6uvg69bvfoypzf2"); // boolean overlap_node(node_t *n, boxf b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("91ymmlazxnlu6a10ivd58lrnx"); // inside_t ictxt; UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("2n2uez00ytva0jwosdu5d5x7k"); // if (! OVERLAP(b, ND_bb(n))) UNSUPPORTED("egywkvzo2t847qnathqnanvcj"); // return 0; UNSUPPORTED("2grr4abi33fuyx3ex5soymquw"); // /* FIXME - need to do something better about CLOSEENOUGH */ UNSUPPORTED("42wj7lxtvc06e9sfoqihjt9xw"); // p = sub_pointf(ND_coord(n), mid_pointf(b.UR, b.LL)); UNSUPPORTED("22mv67l7z7wr03u30xgx36klq"); // ictxt.s.n = n; UNSUPPORTED("6hiyxv9qcrh42rkfd32ag1cgg"); // ictxt.s.bp = (void *)0; UNSUPPORTED("1hqspal43fzxoaa3kkrp9xcb"); // return ND_shape(n)->fns->insidefn(&ictxt, p); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1iephta6pfgcjwjxaz7n7hg3h // boolean overlap_label(textlabel_t *lp, boxf b) public static Object overlap_label(Object... arg) { UNSUPPORTED("91umgryo5zqgish79s8i949au"); // boolean overlap_label(textlabel_t *lp, boxf b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ddb68hn23b0v9gldt5ym699jm"); // pointf s; UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("b8b14mpt61iyo7ntzox4didg"); // s.x = lp->dimen.x / 2.; UNSUPPORTED("etn8w0yctba3qwmwjypkjuh0b"); // s.y = lp->dimen.y / 2.; UNSUPPORTED("5ezm2f39sm5ob27ufs99ubibn"); // bb.LL = sub_pointf(lp->pos, s); UNSUPPORTED("1o378zsemmdu353iu9zkmnew"); // bb.UR = add_pointf(lp->pos, s); UNSUPPORTED("50ldl8awv60ft3ojv05xoapv8"); // return OVERLAP(b, bb); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1pi7b3b4i7f0w0nru6z6tl31b // static boolean overlap_arrow(pointf p, pointf u, double scale, int flag, boxf b) public static Object overlap_arrow(Object... arg) { UNSUPPORTED("2hwfhh60l88kcz3nw2gniuiic"); // static boolean overlap_arrow(pointf p, pointf u, double scale, int flag, boxf b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("d96dzwqsrlhqx70677lolr70x"); // if (OVERLAP(b, arrow_bb(p, u, scale, flag))) { UNSUPPORTED("6pyod80f1wnsh68enzsnqykcp"); // /* FIXME - check inside arrow shape */ UNSUPPORTED("3adr32h5e1fehu4g7j2u24asz"); // return (!(0)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7ic0hdq8fpa9fby43hy9p96n // static boolean overlap_bezier(bezier bz, boxf b) public static Object overlap_bezier(Object... arg) { UNSUPPORTED("awzwsadmtjnsr4l5ln0gwca6f"); // static boolean overlap_bezier(bezier bz, boxf b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("2qhxg8kfts3rqa4n8y1q8tk3r"); // pointf p, u; UNSUPPORTED("1imabyiof6ysdoof2g58v139w"); // assert(bz.size); UNSUPPORTED("2cz7hdhlhljnbt4ey99pfq3mj"); // u = bz.list[0]; UNSUPPORTED("9mjgetoviljxmz4j3h18bhwv"); // for (i = 1; i < bz.size; i++) { UNSUPPORTED("4nhsr51p4z60folp6yedkan7p"); // p = bz.list[i]; UNSUPPORTED("1q7o633q5ykuwzssixlzk97w1"); // if (lineToBox(p, u, b) != -1) UNSUPPORTED("euj7k5raviuazd8jahwobe0r3"); // return (!(0)); UNSUPPORTED("2zppgvcdlcmvkarerwttpl0cl"); // u = p; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c30ht2dw1jfnc98f1lxaoduea"); // /* check arrows */ UNSUPPORTED("dtt0q54ov71fji9i2ae24aeyc"); // if (bz.sflag) { UNSUPPORTED("6d0os47s8k0liv0ij1c9ifh5h"); // if (overlap_arrow(bz.sp, bz.list[0], 1, bz.sflag, b)) UNSUPPORTED("euj7k5raviuazd8jahwobe0r3"); // return (!(0)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4o7tep38o3pxavxbzw15khp2r"); // if (bz.eflag) { UNSUPPORTED("bxk1lvdajxp9q7k9dzq4jjalp"); // if (overlap_arrow(bz.ep, bz.list[bz.size - 1], 1, bz.eflag, b)) UNSUPPORTED("euj7k5raviuazd8jahwobe0r3"); // return (!(0)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4usdn4gxfza3j6zxmsnoslmsu // boolean overlap_edge(edge_t *e, boxf b) public static Object overlap_edge(Object... arg) { UNSUPPORTED("dfrqxx7kxp0xo56gn56prf49k"); // boolean overlap_edge(edge_t *e, boxf b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("6tl9mepc2bett364jduh2q4mf"); // splines *spl; UNSUPPORTED("cqwl7s9yvzr8n5v8svuuv1a1q"); // textlabel_t *lp; UNSUPPORTED("2c3cg84bl0xam4mk6g5f31jj0"); // spl = ED_spl(e); UNSUPPORTED("7hvxias4hzevaqzopdofxqtf7"); // if (spl && boxf_overlap(spl->bb, b)) UNSUPPORTED("8u449ocpkq8pw6x28ydsauw7k"); // for (i = 0; i < spl->size; i++) UNSUPPORTED("2igld6ya1et1v6v507mv6oou4"); // if (overlap_bezier(spl->list[i], b)) UNSUPPORTED("41w3xzxk3po8alpl4v9kz395f"); // return (!(0)); UNSUPPORTED("n9pj1f2ecz41q7q378oisbjt"); // lp = ED_label(e); UNSUPPORTED("26tbjilm0lmi9lsxtc9qh7qr"); // if (lp && overlap_label(lp, b)) UNSUPPORTED("a3ueikge1f8p4avpat19zoh3a"); // return (!(0)); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ckavkcnz5rcrqs17lleds1uxu // int edgeType (char* s, int dflt) public static int edgeType(CString s, int dflt) { ENTERING("ckavkcnz5rcrqs17lleds1uxu","edgeType"); try { UNSUPPORTED("h9kzapvoxea4esxgom157wc0"); // int edgeType (char* s, int dflt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("26e08yupzx95a4pzp1af0t6og"); // int et; UNSUPPORTED("73z43mn6ha09hbnvzynnbkvqg"); // if (!s || (*s == '\0')) return dflt; UNSUPPORTED("527zd48lq0ay6p16b2whyuafo"); // et = (0 << 1); UNSUPPORTED("1ctayzw7ya308i4wpppul6b9o"); // switch (*s) { UNSUPPORTED("acwxya6p4cjrbqeuf7gymcmx2"); // case '0' : /* false */ UNSUPPORTED("18fcibo027r3vczxrvtju3nah"); // et = (1 << 1); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("no8amccag0mew2zmsprfyekp"); // case '1' : /* true */ UNSUPPORTED("8to0pat5o6zmyuqjfl01xs9xc"); // case '2' : UNSUPPORTED("c7icptpasun232whn2nn5gydx"); // case '3' : UNSUPPORTED("44xov6gwt91mlesh02z3zvxx"); // case '4' : UNSUPPORTED("4dwlps5sjcl550fvks2ibv2fi"); // case '5' : UNSUPPORTED("cr0jhqsceb5y1hcmvtjd1ttgu"); // case '6' : UNSUPPORTED("8jq47j7ezu18niwotmuj92cz3"); // case '7' : UNSUPPORTED("ami8xk8243o5ku0cyeqxoeiut"); // case '8' : UNSUPPORTED("3onv8t8a6v1tmfaz8y7hk9lvv"); // case '9' : UNSUPPORTED("8m599inlx0lbuns9r3iiokwxw"); // et = (5 << 1); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("vwxe2prs0tywhf20ycwdwa8o"); // case 'c' : UNSUPPORTED("e2ux7lqsbmsyyrououuijooiy"); // case 'C' : UNSUPPORTED("8zxim9f3q8qdl919cv1v3jf8e"); // if (!strcasecmp (s+1, "urved")) UNSUPPORTED("azc7d85av8k7f1to3mr59m3mz"); // et = (2 << 1); UNSUPPORTED("b7i0q9ysed6zrjftn8ilgtn0a"); // else if (!strcasecmp (s+1, "ompound")) UNSUPPORTED("aihlhslp3nd26f10vuyjlnb3q"); // et = (6 << 1); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("2ix1d2vw6unhjetclv9vkaw1p"); // case 'f' : UNSUPPORTED("2chzjgs8kmwelk00c6469lpx2"); // case 'F' : UNSUPPORTED("42jngi39nkk27q16s1sa7sftl"); // if (!strcasecmp (s+1, "alse")) UNSUPPORTED("7xut5zuu25vrpn9gt0f3kc5hz"); // et = (1 << 1); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("7ozigs1hjxmhvwgapx2in25cy"); // case 'l' : UNSUPPORTED("c2gttjqnkmx1rnuyjknw7segb"); // case 'L' : UNSUPPORTED("96lnofxeiqa1g3g7s02b86h6z"); // if (!strcasecmp (s+1, "ine")) UNSUPPORTED("7xut5zuu25vrpn9gt0f3kc5hz"); // et = (1 << 1); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("5o5i90c7m363f5yyxamxuzok6"); // case 'n' : UNSUPPORTED("3ttrfea54jmrshv2796w3a9h2"); // case 'N' : UNSUPPORTED("6qibxt06dimtp2r5spwgriorn"); // if (!strcasecmp (s+1, "one")) return et; UNSUPPORTED("bqi51jfycttyx733ls9qw2c18"); // if (!strcasecmp (s+1, "o")) return (1 << 1); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("18t59gw7hrgsezibz7bbm0ng3"); // case 'o' : UNSUPPORTED("4q6jdsek20d4i9sc5ftmm3mdl"); // case 'O' : UNSUPPORTED("8scb0vjws7o3davin33k87o2p"); // if (!strcasecmp (s+1, "rtho")) UNSUPPORTED("48rqxx6odtdnqf676ffe1ll7g"); // et = (4 << 1); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("5cc40qlotkkym6enwcv916835"); // case 'p' : UNSUPPORTED("al1clonjqyw2bo1z0li974ijp"); // case 'P' : UNSUPPORTED("68l1a5153ouil03qaammm1zty"); // if (!strcasecmp (s+1, "olyline")) UNSUPPORTED("5ytop08aei3hhllfd12904hh7"); // et = (3 << 1); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("20wayzvdomwexzhjzj4wojf4d"); // case 's' : UNSUPPORTED("boxft69fzv6rof5elda0zs33z"); // case 'S' : UNSUPPORTED("3qs8m2esm62d50tk701b8m0xz"); // if (!strcasecmp (s+1, "pline")) UNSUPPORTED("5l4kd6c21h4bjm98grnqqwra6"); // et = (5 << 1); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("ce41quxcxpj3oi50zybc75b9r"); // case 't' : UNSUPPORTED("8drchetff3h6zpsu3m08rqi0q"); // case 'T' : UNSUPPORTED("7ln0pymv14hb45h3ypy5955nk"); // if (!strcasecmp (s+1, "rue")) UNSUPPORTED("5l4kd6c21h4bjm98grnqqwra6"); // et = (5 << 1); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3d55ucqxr8xg0otty2j39hkgz"); // case 'y' : UNSUPPORTED("7oihco3xpq1kek2q2dnrfxmcx"); // case 'Y' : UNSUPPORTED("679wmbnx0dakltwkxx2svg5ex"); // if (!strcasecmp (s+1, "es")) UNSUPPORTED("5l4kd6c21h4bjm98grnqqwra6"); // et = (5 << 1); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ckjgbybnvrshn8g32qqpy0ppd"); // if (!et) { UNSUPPORTED("79f40sxqwmzmgk4ktfha59mxf"); // agerr(AGWARN, "Unknown \"splines\" value: \"%s\" - ignored\n", s); UNSUPPORTED("mjiefsvltip3uasxic0uipa9"); // et = dflt; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("68yadra75shcc0tia9wr9acr4"); // return et; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("ckavkcnz5rcrqs17lleds1uxu","edgeType"); } } //3 13cpqbf2ztcjdfz4a6v7nv00u // void setEdgeType (graph_t* g, int dflt) public static void setEdgeType(Agraph_s g, int dflt) { ENTERING("13cpqbf2ztcjdfz4a6v7nv00u","setEdgeType"); try { CString s = agget(g, new CString("splines")); int et; if (N(s)) { et = dflt; } else if (s.charAt(0) == '\0') { et = (0 << 1); } else et = edgeType (s, dflt); GD_flags(g, GD_flags(g) | et); } finally { LEAVING("13cpqbf2ztcjdfz4a6v7nv00u","setEdgeType"); } } //3 azj18si1ncbqf4nggo3u0iudc // void get_gradient_points(pointf * A, pointf * G, int n, float angle, int flags) public static Object get_gradient_points(Object... arg) { UNSUPPORTED("4l4q9435jsq43snp6e2muhph9"); // void get_gradient_points(pointf * A, pointf * G, int n, float angle, int flags) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("28vm7zytm26lbctmzklz8u6q4"); // double rx, ry; UNSUPPORTED("7ab1r7u9bshphtezjbwilzdmk"); // pointf min,max,center; UNSUPPORTED("38fmmbbh3d9td4hgcigqek69h"); // int isRadial = flags & 1; UNSUPPORTED("6do922drsqikinsq2qnkg7i9s"); // int isRHS = flags & 2; UNSUPPORTED("cc4iipfhbkh9s7bgnq075nve2"); // if (n == 2) { UNSUPPORTED("2fbod9hk6xm53a1498zx6wkml"); // rx = A[1].x - A[0].x; UNSUPPORTED("znji09lgzos7bzfy4sn5z6so"); // ry = A[1].y - A[0].y; UNSUPPORTED("4rfhu73bo5qnu4zlhm9409rov"); // min.x = A[0].x - rx; UNSUPPORTED("e7n9ri71momrymdb7nem5dv3i"); // max.x = A[0].x + rx; UNSUPPORTED("5t50nyboj2kmqnva1b3oy3lej"); // min.y = A[0].y - ry; UNSUPPORTED("2pccas4c05y6rl29xqoxu9es1"); // max.y = A[0].y + ry; UNSUPPORTED("5ja432xa5mdtoxr8hjvwurrzk"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("2xg1e592fyexnv8p3cfuhf387"); // min.x = max.x = A[0].x; UNSUPPORTED("ae0uuyalysg56vdqam5vuysda"); // min.y = max.y = A[0].y; UNSUPPORTED("11ja3nzvfl5nh4sczk6fecswp"); // for (i = 0; i < n; i++){ UNSUPPORTED("accly2buq5n3okrrptwc1ejg"); // min.x = MIN(A[i].x,min.x); UNSUPPORTED("5ovf4hu3x4sjij6tz3pru127w"); // min.y = MIN(A[i].y,min.y); UNSUPPORTED("9rhqopfwckc0sw5yyxaqkkxcd"); // max.x = MAX(A[i].x,max.x); UNSUPPORTED("7qzfxgzccflltalu1yvmxzmv9"); // max.y = MAX(A[i].y,max.y); UNSUPPORTED("dquo3qofk56ds5xl95lhvcthf"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("250db9ylxbfvnh9zwkamxovj9"); // center.x = min.x + (max.x - min.x)/2; UNSUPPORTED("485zu25v4z1ve1h6ajqnq4b3f"); // center.y = min.y + (max.y - min.y)/2; UNSUPPORTED("56w11dzx832thi17odfzwz5yl"); // if (isRadial) { UNSUPPORTED("20xmg9sm748etklimkd6243x5"); // double inner_r, outer_r; UNSUPPORTED("5mry6u88h53908rs4hu6henpm"); // outer_r = sqrt((center.x - min.x)*(center.x - min.x) + UNSUPPORTED("9bjr1zixvhgja23zwt2uvkyh4"); // (center.y - min.y)*(center.y - min.y)); UNSUPPORTED("em02v3ahdnobwbukkna301r8e"); // inner_r = outer_r /4.; UNSUPPORTED("bu17v8cb3igywmv0cbn25hlkg"); // if (isRHS) { UNSUPPORTED("cfoc49xh4ohe1lpmz0h45p97f"); // G[0].y = center.y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("20h8j01n1ez8o51xea4v9tr2u"); // G[0].y = -center.y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5pfxs9x6r4mmobo90mjhvy2u2"); // G[0].x = center.x; UNSUPPORTED("8mq1zl94lnuovvotzai3cjvh7"); // G[1].x = inner_r; UNSUPPORTED("bbqmfpxsc6hzfuqmzu5hq1ks2"); // G[1].y = outer_r; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("78bc6w2jovc5xciuazkg4x65m"); // double half_x = max.x - center.x; UNSUPPORTED("by2s59uka1v65wg0w519d9g5s"); // double half_y = max.y - center.y; UNSUPPORTED("bgr3ej4c4109djoqphiiccj8j"); // double sina = sin(angle); UNSUPPORTED("5w9swecikv2aa0cs4z4mft1ew"); // double cosa = cos(angle); UNSUPPORTED("bu17v8cb3igywmv0cbn25hlkg"); // if (isRHS) { UNSUPPORTED("4bj7eyt9p2z0zs62et351z8b7"); // G[0].y = center.y - half_y * sina; UNSUPPORTED("c4p6sses023prnrx3l3pnphpg"); // G[1].y = center.y + half_y * sina; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("awhdug43x0ih3ky3e3ll0lutf"); // G[0].y = -center.y + (max.y - center.y) * sin(angle); UNSUPPORTED("62xeog3j69hyv8qha3n575e6d"); // G[1].y = -center.y - (center.y - min.y) * sin(angle); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("expdhhgumrgtud45srwse0d78"); // G[0].x = center.x - half_x * cosa; UNSUPPORTED("31bwc01mjpx1u8s4htbm6u5ey"); // G[1].x = center.x + half_x * cosa; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 22n1uekxezky6gx3cn22ansew // int strcasecmp(const char *s1, const char *s2) public static int strcasecmp(CString s1, CString s2) { ENTERING("22n1uekxezky6gx3cn22ansew","strcasecmp"); try { while ((s1.charAt(0) != '\0') && (tolower(s1.charAt(0)) == tolower(s2.charAt(0)))) { s1=s1.plus(1); s2=s2.plus(1); } return tolower(s1.charAt(0)) - tolower(s2.charAt(0)); } finally { LEAVING("22n1uekxezky6gx3cn22ansew","strcasecmp"); } } //3 6fpqvqq5eso7d44vai4lz77jd // int strncasecmp(const char *s1, const char *s2, unsigned int n) public static Object strncasecmp(Object... arg) { UNSUPPORTED("41sf831iel4ggk6nxgerc7lrz"); // int strncasecmp(const char *s1, const char *s2, unsigned int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f0os7tzuki1s9mllsml3zu2fd"); // if (n == 0) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("18ggb7ihy0resf5qhplc7cqol"); // while ((n-- != 0) UNSUPPORTED("7tdf84gz2hakxs756j3v0w4iv"); // && (tolower(*(unsigned char *) s1) == UNSUPPORTED("co97u0db3a8mz1pp77hkxq0h3"); // tolower(*(unsigned char *) s2))) { UNSUPPORTED("2jr0cuzm9i39xecgxx0ih0ez4"); // if (n == 0 || *s1 == '\0' || *s2 == '\0') UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("2hh1h5gydepd3ut3g43bzn51g"); // s1++; UNSUPPORTED("7x8zh0pm8zj83pbc2d812jz90"); // s2++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1jrt0skm3a5djo3vfej4kwffc"); // return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 952xm45ro3rezebjyrjins8hi // void gv_free_splines(edge_t * e) public static Object gv_free_splines(Object... arg) { UNSUPPORTED("20npjsygvjocwl1s38vrpf2nb"); // void gv_free_splines(edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("4pdkymy0wuxj1yn9xqqzp2x4h"); // if (ED_spl(e)) { UNSUPPORTED("45jnnlrng64otru7xh43mwqbj"); // for (i = 0; i < ED_spl(e)->size; i++) UNSUPPORTED("aayg4ghew6m2hhtoo2f683101"); // free(ED_spl(e)->list[i].list); UNSUPPORTED("414vktawl0gg37cwl3atku9jm"); // free(ED_spl(e)->list); UNSUPPORTED("dg2iniztq3s88wtzc2oelmxcd"); // free(ED_spl(e)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1ozc9ue0zbqu2i9gg2i5kfxx6"); // ED_spl(e) = (void *)0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4tdxbfozyzm9hv9jau5qpr18r // void gv_cleanup_edge(edge_t * e) public static Object gv_cleanup_edge(Object... arg) { UNSUPPORTED("b1scm8t8tgb3dnua8wogcy076"); // void gv_cleanup_edge(edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("puteitw4ghqbb5aix3nip4fk"); // free (ED_path(e).ps); UNSUPPORTED("dai9db3cozhpqeenab065cnfo"); // gv_free_splines(e); UNSUPPORTED("292fa7prffihy9rqhmv5lsc3f"); // free_label(ED_label(e)); UNSUPPORTED("7l4r0amzt9h9sq0i6sirjn529"); // free_label(ED_xlabel(e)); UNSUPPORTED("4uxpgfln4r8sqyb7odq506b46"); // free_label(ED_head_label(e)); UNSUPPORTED("drx4uk8ssgsg67cvkt9t4u4kd"); // free_label(ED_tail_label(e)); UNSUPPORTED("ab9j2jm37m5q6awql0tn2e5qh"); // /*FIX HERE , shallow cleaning may not be enough here */ UNSUPPORTED("dw3siytye4cixcrzqmb5i07qs"); // agdelrec(e, "Agedgeinfo_t"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c7yb1wfh6sfz3dklp3914m81m // void gv_cleanup_node(node_t * n) public static Object gv_cleanup_node(Object... arg) { UNSUPPORTED("d6dkt4wezkpueb74an06bmm1k"); // void gv_cleanup_node(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6fltl5u4u22i3870pyofjxwdn"); // if (ND_pos(n)) free(ND_pos(n)); UNSUPPORTED("4wkmsp7365vb7u5fqtm2buotu"); // if (ND_shape(n)) UNSUPPORTED("2ae2cnq7s4f15b6d6fp5i6o26"); // ND_shape(n)->fns->freefn(n); UNSUPPORTED("dv63sk5dujcwfkf99o6ponzqm"); // free_label(ND_label(n)); UNSUPPORTED("5or6zu6ycx4zage9ggy1o9it4"); // free_label(ND_xlabel(n)); UNSUPPORTED("ab9j2jm37m5q6awql0tn2e5qh"); // /*FIX HERE , shallow cleaning may not be enough here */ UNSUPPORTED("4tuw9fzcb28wodb3z6f4gkx19"); // agdelrec(n, "Agnodeinfo_t"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 80q488y0eqojtsm7osnfydmo5 // void gv_nodesize(node_t * n, boolean flip) public static void gv_nodesize(Agnode_s n, int flip) { ENTERING("80q488y0eqojtsm7osnfydmo5","gv_nodesize"); try { double w; if (flip!=0) { w = ((ND_height(n))*(double)72); ND_rw(n, w / 2); ND_lw(n, w / 2); ND_ht(n, ((ND_width(n))*(double)72)); } else { w = ((ND_width(n))*(double)72); ND_rw(n, w / 2); ND_lw(n, w / 2); ND_ht(n, ((ND_height(n))*(double)72)); } } finally { LEAVING("80q488y0eqojtsm7osnfydmo5","gv_nodesize"); } } //3 7uxrf3fkz919opkirpd9xtuv // double drand48(void) public static Object drand48(Object... arg) { UNSUPPORTED("6vlwifmfxk6zn6tvonk13jp3i"); // double drand48(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8ne6p4d5pykwl1d3xk0yg0ipb"); // double d; UNSUPPORTED("54tfrbdpedydawj9r47qspj9z"); // d = rand(); UNSUPPORTED("1ljgw8hzttj2a3x36s83rr5be"); // d = d / RAND_MAX; UNSUPPORTED("3r3o80n61nmy2jv0ezi9xg2xp"); // return d; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8lktrcvj65bvhh04y89vecvo2 // static void free_clust (Dt_t* dt, clust_t* clp, Dtdisc_t* disc) public static Object free_clust(Object... arg) { UNSUPPORTED("5hvfjwzuuptbbsu4s4tmqioey"); // static void free_clust (Dt_t* dt, clust_t* clp, Dtdisc_t* disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f496klm2k3ykus5018nsatnwr"); // free (clp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 5kz2qt153vtr25aib7hx2zxma // static Dtdisc_t strDisc = //3 eedsifpflx8hq0boycnhkyhwi // static void fillMap (Agraph_t* g, Dt_t* map) public static Object fillMap(Object... arg) { UNSUPPORTED("4bysjhruz2e3wqk783h9g1lup"); // static void fillMap (Agraph_t* g, Dt_t* map) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("btyorslmplj34yhlb1jx1qpbb"); // Agraph_t* cl; UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c; UNSUPPORTED("yiuh599p05f2mpu2e3pesu2o"); // char* s; UNSUPPORTED("16mpl6p9b2dpo53253q50m3sb"); // clust_t* ip; UNSUPPORTED("99d9j6m0161wdv2tu4wbf3ifi"); // for (c = 1; c <= GD_n_cluster(g); c++) { UNSUPPORTED("2teg6xg4qm17ntpo76fewfpsa"); // cl = GD_clust(g)[c]; UNSUPPORTED("cg72wznei3zdlwj34nrwr1p4d"); // s = agnameof(cl); UNSUPPORTED("1guobssrhsi4q6tl1y3pj2ggr"); // if ((*(((Dt_t*)(map))->searchf))((map),(void*)(s),0001000)) { UNSUPPORTED("dhd8f5xt5vuyyr6x2nb5v7n68"); // agerr(AGWARN, "Two clusters named %s - the second will be ignored\n", s); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("1fldfpmb7y3tka24kxydupd92"); // ip = (clust_t*)zmalloc(sizeof(clust_t)); UNSUPPORTED("2fjoz0gazdhoglv425xw1oq02"); // ip->name = s; UNSUPPORTED("3rtsjkui7fbtpw31kbxrcuq62"); // ip->clp = cl; UNSUPPORTED("9432myi3rgwzkx4n9bneu0s0k"); // (*(((Dt_t*)(map))->searchf))((map),(void*)(ip),0000001); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("alhil57f405k0c1urfqtlldt7"); // fillMap (cl, map); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 82wzptlrwslbvgp3xyj03p9ba // Dt_t* mkClustMap (Agraph_t* g) public static Object mkClustMap(Object... arg) { UNSUPPORTED("1q58ugun4bvkmr2ue91rmuq8"); // Dt_t* mkClustMap (Agraph_t* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f34gp449n6keyz0bhwdxqsd7m"); // Dt_t* map = dtopen (&strDisc, Dtoset); UNSUPPORTED("5wsd9dcx8jqzp5baly29hubma"); // fillMap (g, map); UNSUPPORTED("e0iohuc39sfqukdjj9eddourq"); // return map; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aohw5khae06vhhp2t4cczvcbv // Agraph_t* findCluster (Dt_t* map, char* name) public static Object findCluster(Object... arg) { UNSUPPORTED("6fo3oeygde19o95996mbrkjdk"); // Agraph_t* UNSUPPORTED("43my0gnzq82k0lsp86rb9j31r"); // findCluster (Dt_t* map, char* name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cwq8c9jrtxtalbyxfo1tg66ys"); // clust_t* clp = (*(((Dt_t*)(map))->searchf))((map),(void*)(name),0001000); UNSUPPORTED("7szzt9uu8wexjhhnks6jhega5"); // if (clp) UNSUPPORTED("12yrb65kdfz9bwd2j2l8nqc07"); // return clp->clp; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("45tfw7tcm68298aro2tdiv8pc"); // return (void *)0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7q676xlzj32nbxuf2qlgu9xgc // Agnodeinfo_t* ninf(Agnode_t* n) public static Object ninf(Object... arg) { UNSUPPORTED("e4ol03qir8voknrrta1ulkew3"); // Agnodeinfo_t* ninf(Agnode_t* n) {return (Agnodeinfo_t*)AGDATA(n);} throw new UnsupportedOperationException(); } //3 3gguivz30v6fwn9nun51m5652 // Agraphinfo_t* ginf(Agraph_t* g) public static Object ginf(Object... arg) { UNSUPPORTED("cjr1gck7jmlygsn7321ppbe2o"); // Agraphinfo_t* ginf(Agraph_t* g) {return (Agraphinfo_t*)AGDATA(g);} throw new UnsupportedOperationException(); } //3 5nsm1cj6268trw4hp3gljvk83 // Agedgeinfo_t* einf(Agedge_t* e) public static Object einf(Object... arg) { UNSUPPORTED("3zxj8s1l4qy0pf2wpn6vy5ix3"); // Agedgeinfo_t* einf(Agedge_t* e) {return (Agedgeinfo_t*)AGDATA(e);} throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/dotgen/000077500000000000000000000000001312650303100172445ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/lib/dotgen/acyclic__c.java000066400000000000000000000557131312650303100221720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.dotgen.fastgr__c.delete_fast_edge; import static gen.lib.dotgen.fastgr__c.find_fast_edge; import static gen.lib.dotgen.fastgr__c.merge_oneway; import static gen.lib.dotgen.fastgr__c.virtual_edge; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.GD_comp; import static smetana.core.Macro.GD_nlist; import static smetana.core.Macro.ND_mark; import static smetana.core.Macro.ND_next; import static smetana.core.Macro.ND_onstack; import static smetana.core.Macro.ND_out; import static smetana.core.Macro.UNSUPPORTED; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class acyclic__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9hm902ya6q6bq246ewuh67h38 // void reverse_edge(edge_t * e) public static void reverse_edge(Agedge_s e) { ENTERING("9hm902ya6q6bq246ewuh67h38","reverse_edge"); try { Agedge_s f; delete_fast_edge(e); if ((f = find_fast_edge(aghead(e), agtail(e)))!=null) merge_oneway(e, f); else virtual_edge(aghead(e), agtail(e), e); } finally { LEAVING("9hm902ya6q6bq246ewuh67h38","reverse_edge"); } } //3 e9h7n52fs8rucrug9tr0zebe2 // static void dfs(node_t * n) public static void dfs(Agnode_s n) { ENTERING("e9h7n52fs8rucrug9tr0zebe2","dfs"); try { int i; Agedge_s e; Agnode_s w; if (ND_mark(n)!=0) return; ND_mark(n, 1); ND_onstack(n, 1); for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++) { w = aghead(e); if (ND_onstack(w)) { reverse_edge(e); i--; } else { if (ND_mark(w) == 0) dfs(w); } } ND_onstack(n, 0); } finally { LEAVING("e9h7n52fs8rucrug9tr0zebe2","dfs"); } } //3 1ejgnwd7ek344caegjwg46n6h // void acyclic(graph_t * g) public static void acyclic_(Agraph_s g) { ENTERING("1ejgnwd7ek344caegjwg46n6h","acyclic"); try { int c; Agnode_s n; for (c = 0; c < GD_comp(g).size; c++) { GD_nlist(g, GD_comp(g).getFromList(c)); for (n = GD_nlist(g); n!=null; n = ND_next(n)) ND_mark(n, 0); for (n = GD_nlist(g); n!=null; n = ND_next(n)) dfs(n); } } finally { LEAVING("1ejgnwd7ek344caegjwg46n6h","acyclic"); } } } plantuml-1.2017.15/src/gen/lib/dotgen/aspect__c.java000066400000000000000000001523471312650303100220430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static gen.lib.cgraph.attr__c.agget; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import h.Agraph_s; import h.aspect_t; import h.boxf; import h.pointf; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.__struct__; public class aspect__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 buo6aw1j4uziggaugy984eotj // static nodeGroup_t *nodeGroups //1 8pcclsxg8w461gulo0pvihkjp // static int nNodeGroups = 0 //3 e1ii1fk8ce43zhjwticczdewi // static void computeNodeGroups(graph_t * g) public static Object computeNodeGroups(Object... arg) { UNSUPPORTED("85tw6ni78b2fdpbmcvfkfjj2g"); // static void computeNodeGroups(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("41zdayra08bo7qofh0t0g44tj"); // nodeGroups = (nodeGroup_t*)gmalloc((agnnodes(g))*sizeof(nodeGroup_t)); UNSUPPORTED("751hgbeopd6kx0brs46ydl3nk"); // nNodeGroups = 0; UNSUPPORTED("bhhgxkf7jt2bkoqqybblectmc"); // /* initialize node ids. Id of a node is used as an index to the group. */ UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("c29pxxzew8wpbooylabmstb6k"); // ND_id(n) = -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("856fgjw3c9mfzqbqcelccqz6i"); // if (ND_UF_size(n) == 0) { /* no same ranking constraint */ UNSUPPORTED("995nygsph6blhs7u3roc320vt"); // nodeGroups[nNodeGroups].nodes = (node_t **)zmalloc(sizeof(node_t *)); UNSUPPORTED("yecg6kqqsu0dce5l7yl9nz0v"); // nodeGroups[nNodeGroups].nodes[0] = n; UNSUPPORTED("48boktg0q0ftjks7g2ugmcgr0"); // nodeGroups[nNodeGroups].nNodes = 1; UNSUPPORTED("asru03zwy8elrmkb54ceapyf5"); // nodeGroups[nNodeGroups].width = ND_width(n); UNSUPPORTED("63tq5olg8fmmqnngdsd2m0p7y"); // nodeGroups[nNodeGroups].height = ND_height(n); UNSUPPORTED("2jtn1zrlba2gjw9o8ijqfjd8l"); // ND_id(n) = nNodeGroups; UNSUPPORTED("26stq7kxzhcw4bdbet988ue9u"); // nNodeGroups++; UNSUPPORTED("ek3ylp6qgnzrlvktaorzarkl6"); // } else /* group same ranked nodes */ UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("2xfdbwqwkydzc27ndexkdqpk3"); // node_t *l = UF_find(n); UNSUPPORTED("9k1apjnlyvc0imkojboqq56t"); // if (ND_id(l) > -1) /* leader is already grouped */ UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("1dxpo17pe23wsyc88ervx5x7n"); // int index = ND_id(l); UNSUPPORTED("a3rj9avq06zyyeiex95z1m5qs"); // nodeGroups[index].nodes[nodeGroups[index].nNodes++] = n; UNSUPPORTED("4qloaqbsyg2krphzbyu8l502n"); // nodeGroups[index].width += ND_width(n); UNSUPPORTED("7oxuv0m39o7l9yf15yjhvw804"); // nodeGroups[index].height = UNSUPPORTED("f301cq3rurukx2hdrzu2rvioq"); // (nodeGroups[index].height < UNSUPPORTED("8oi4o7ku7aqcurrfujz4p5qkb"); // ND_height(n)) ? ND_height(n) : nodeGroups[index]. UNSUPPORTED("bkhrhsn74c58qx4h0val1pmjp"); // height; UNSUPPORTED("7me4qfeob3i8uvnfzwktfincy"); // ND_id(n) = index; UNSUPPORTED("d6w1jxu5j3ja7tpl4hcag7fv0"); // } else /* create a new group */ UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("2l80so4pkfhpik5o2c4xb7cff"); // nodeGroups[nNodeGroups].nodes = UNSUPPORTED("3ey9wbuwiu5f6tykjlpo26lhj"); // (node_t **)zmalloc((ND_UF_size(l))*sizeof(node_t *)); UNSUPPORTED("53ell10epajj2omj9xiynycta"); // if (l == n) /* node n is the leader */ UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("7m6pmc4ajzo9gva5pgvtljwf3"); // nodeGroups[nNodeGroups].nodes[0] = l; UNSUPPORTED("1n4ihvxa7g9rlwmex1up2728t"); // nodeGroups[nNodeGroups].nNodes = 1; UNSUPPORTED("a8p3badahan60lefgn5iq9a8c"); // nodeGroups[nNodeGroups].width = ND_width(l); UNSUPPORTED("dcwvaft8b2juhy42freidgc8m"); // nodeGroups[nNodeGroups].height = ND_height(l); UNSUPPORTED("a47jqpic91ky93e1ohxv590l5"); // } else { UNSUPPORTED("7m6pmc4ajzo9gva5pgvtljwf3"); // nodeGroups[nNodeGroups].nodes[0] = l; UNSUPPORTED("2aqign2uu1g30cyam63ohxptd"); // nodeGroups[nNodeGroups].nodes[1] = n; UNSUPPORTED("el4pqstmtl01oio7cmzrq6qtb"); // nodeGroups[nNodeGroups].nNodes = 2; UNSUPPORTED("c1rjyfjlfo2jj62bcy025ukg1"); // nodeGroups[nNodeGroups].width = UNSUPPORTED("a2sytyotqqfithwfaykqmsycp"); // ND_width(l) + ND_width(n); UNSUPPORTED("eiifp86c59tpvht7teuygr2hw"); // nodeGroups[nNodeGroups].height = UNSUPPORTED("7zt5ahh08kx3u1cw8m39031bh"); // (ND_height(l) < UNSUPPORTED("3s43dn8agepaf1zik284rw4iw"); // ND_height(n)) ? ND_height(n) : ND_height(l); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("1z3t7m0t6n4kv8tcm579ais2e"); // ND_id(l) = nNodeGroups; UNSUPPORTED("1r38ircnao62y8uafy4au9p8c"); // ND_id(n) = nNodeGroups; UNSUPPORTED("7yf3wfxeea0vbj0tkmh1sv74w"); // nNodeGroups++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5vqsnuao6a6zpx51lrbvsra7t // int countDummyNodes(graph_t * g) public static Object countDummyNodes(Object... arg) { UNSUPPORTED("51gqqbcx9xe38hsqk7vtw2h74"); // int countDummyNodes(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("551funk1bxiemly3silcqtngw"); // int count = 0; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("33mzsqu0xadl81jos28k8lc70"); // /* Count dummy nodes */ UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("bzrm12ll46b0ey13f7049ny17"); // /* flat edges do not have dummy nodes */ UNSUPPORTED("cyx78ekjs6rwln3461fbzwf7o"); // if (ND_rank(aghead(e)) != ND_rank(agtail(e))) UNSUPPORTED("cb5zuqyn7ijkx5rk10yc6tfrv"); // count += abs(ND_rank(aghead(e)) - ND_rank(agtail(e))) - 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7rr0cazy4menu64k2rf61h98y"); // return count; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 by0sucsgzrupx1vrq0sc82zrb // static layerWidthInfo_t *layerWidthInfo = NULL //1 2g8u71llxsq207y4p1j8kefuc // static int *sortedLayerIndex //1 28et5dpanlo1pz361e1ey0l13 // static int nLayers = 0 //3 ecn38irnr39x1ci0qrksvt2vb // static void computeLayerWidths(graph_t * g) public static Object computeLayerWidths(Object... arg) { UNSUPPORTED("f0yxrj5hl2h30nj0ykado8683"); // static void computeLayerWidths(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("aigogf44ojtcesuy4xs7inqbn"); // node_t *v; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("8o5u7blacrv03sbkd57tsy3ff"); // nLayers = 0; UNSUPPORTED("dojzfz9p7nqclvdb5tee3yl8g"); // /* free previously allocated memory */ UNSUPPORTED("74k79fcsj62zr7jlyzubwv7ld"); // if (layerWidthInfo) { UNSUPPORTED("7c1hsgkci660fl7ovcywsfy7h"); // for (i = 0; i < nNodeGroups; i++) { UNSUPPORTED("4fm2a017gr8w7plpnzbbgdte6"); // if (layerWidthInfo[i].nodeGroupsInLayer) { UNSUPPORTED("1p0hpvyuh05m9zj7iv2byacuu"); // int j; UNSUPPORTED("torjjxsqraaddaop50hfluyq"); // for (j = 0; j < layerWidthInfo[i].nNodeGroupsInLayer; j++) { UNSUPPORTED("5rh2ziady9vvl3275k6sxuawd"); // //if (layerWidthInfo[i].nodeGroupsInLayer[j]) UNSUPPORTED("qfkvchcmb0h3vrvsnu17fj29"); // //free(layerWidthInfo[i].nodeGroupsInLayer[j]); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("9jguo0kg597gyce5y5nj8kf6h"); // free(layerWidthInfo[i].nodeGroupsInLayer); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4vnpv79q6n6p1kg9ndbsmzfds"); // if (layerWidthInfo[i].removed) UNSUPPORTED("2ypdtktf36wfecowcdjfjxbfn"); // free(layerWidthInfo[i].removed); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("aw89cecwa5xnmsohanlvbst8f"); // free(layerWidthInfo); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5xa04vocq8qrzxrvg4if75lnp"); // /* allocate memory UNSUPPORTED("ge7jqooagslmrp81viou5iok"); // * the number of layers can go up to the number of node groups UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("2e016wvwaqoa74u0xllotojs0"); // layerWidthInfo = (layerWidthInfo_t*)zmalloc((nNodeGroups)*sizeof(layerWidthInfo_t)); UNSUPPORTED("7vfjpab2mkl8qvm3ag5psj6hf"); // for (i = 0; i < nNodeGroups; i++) { UNSUPPORTED("1ha5uzjeh0q6s99y9ngi159c"); // layerWidthInfo[i].nodeGroupsInLayer = UNSUPPORTED("1bj8nm95udr98gzajp4k7nmuu"); // (nodeGroup_t **)zmalloc((nNodeGroups)*sizeof(nodeGroup_t *)); UNSUPPORTED("6loyginnjye85c38h5sul660e"); // layerWidthInfo[i].removed = (int*)zmalloc((nNodeGroups)*sizeof(int)); UNSUPPORTED("a16qoyl314d7d9chwymtn019s"); // layerWidthInfo[i].layerNumber = i; UNSUPPORTED("cg2cd89vdfegcllk4lqfvn5h2"); // layerWidthInfo[i].nNodeGroupsInLayer = 0; UNSUPPORTED("5qbgpr6w09rjfbzyrmcge4tt2"); // layerWidthInfo[i].nDummyNodes = 0; UNSUPPORTED("6cn4a2kaj95meb5bwxgi6t0qr"); // layerWidthInfo[i].width = 0.0; UNSUPPORTED("nklu8lmzpq6zswxqna7hbf2"); // layerWidthInfo[i].height = 0.0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("68bkdm53hpxme9qp9j1zxh4if"); // /* Count dummy nodes in the layer */ UNSUPPORTED("16hw9gw0dz2w7mrtba0eoqrdi"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("bgir6fgzucxltcpf123wxwa16"); // int k; UNSUPPORTED("9l0n1phb69gtf3xurnpundse6"); // /* FIX: This loop maybe unnecessary, but removing it and using UNSUPPORTED("7qmve7ja4rala0jzz6b2bf7ee"); // * the commented codes next, gives a segmentation fault. I UNSUPPORTED("6tsb25jdjgeyd8kt16ms1k9qc"); // * forgot the reason why. UNSUPPORTED("29edlge3wqyp1gs0vymtr5700"); // */ UNSUPPORTED("40f532kzdw6xhs33zio76rmo2"); // for (k = ND_rank(agtail(e)) + 1; k < ND_rank(aghead(e)); k++) { UNSUPPORTED("chgb216iqv20trqdzrg86mdmx"); // layerWidthInfo[k].nDummyNodes++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("69qgvs0kkl50uqq9a8psjvv9h"); // /* gather the layer information */ UNSUPPORTED("7vfjpab2mkl8qvm3ag5psj6hf"); // for (i = 0; i < nNodeGroups; i++) { UNSUPPORTED("dh83pjg3c5msf1h1kf0axqdsx"); // v = nodeGroups[i].nodes[0]; UNSUPPORTED("9bi1i3v5pz27x2f1y1abwhdrm"); // if (ND_rank(v) + 1 > nLayers) /* update the number of layers */ UNSUPPORTED("ezub0uc17r32oo1qlkf2gdjds"); // nLayers = ND_rank(v) + 1; UNSUPPORTED("aksirw784lry2qxk8yppa0p4e"); // layerWidthInfo[ND_rank(v)].width += UNSUPPORTED("3szfevpiz60jx1spm5qxs6dd"); // nodeGroups[i].width * 72 + (layerWidthInfo[ND_rank(v)].width > UNSUPPORTED("amrnb3ao1kyyugopgztdru2yy"); // 0) * GD_nodesep(g); UNSUPPORTED("9jz8yn32phtkki2y93ymg6cmh"); // if (layerWidthInfo[ND_rank(v)].height < nodeGroups[i].height * 72) UNSUPPORTED("41gme6wvrco68e7sq80ey8oal"); // layerWidthInfo[ND_rank(v)].height = nodeGroups[i].height * 72; UNSUPPORTED("eglala2xwc9bmolhriirfo56e"); // layerWidthInfo[ND_rank(v)]. UNSUPPORTED("arh0xb14ftp0yfs8ejxzmhjzk"); // nodeGroupsInLayer[layerWidthInfo[ND_rank(v)]. UNSUPPORTED("mdsrd2ju7gexbgpwyclxucy0"); // nNodeGroupsInLayer] = &nodeGroups[i]; UNSUPPORTED("8dv04kyx67hibudzpw8i562vh"); // layerWidthInfo[ND_rank(v)].nNodeGroupsInLayer++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 62on7vg7kkyolc539do3mec4h // static int compFunction(const void *a, const void *b) public static Object compFunction(Object... arg) { UNSUPPORTED("4ocl61j8fqxzk98dh43ldqo7n"); // static int compFunction(const void *a, const void *b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("i2zwxk0ezuvec7grppkqqj67"); // int *ind1 = (int *) a; UNSUPPORTED("2obagarn6xlc7uq4q8fg8pw05"); // int *ind2 = (int *) b; UNSUPPORTED("cy4oapfo680baj6mqy6v64o0d"); // return (layerWidthInfo[*ind2].width > UNSUPPORTED("44d4z7bklr6jymot3f82e2qk"); // layerWidthInfo[*ind1].width) - (layerWidthInfo[*ind2].width < UNSUPPORTED("dol0wgt1zxwmpxius6rn6lf36"); // layerWidthInfo[*ind1].width); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ehhhz69emnjuunlpp23vqc6px // static void sortLayers(graph_t * g) public static Object sortLayers(Object... arg) { UNSUPPORTED("30da20fhd5pcu6ofmw4vzj6xt"); // static void sortLayers(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1djuhyco70xz45va6y1yesa70"); // qsort(sortedLayerIndex, agnnodes(g), sizeof(int), compFunction); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6evdukaqstizjshbr4oanxa73 // static int getOutDegree(nodeGroup_t * ng) public static Object getOutDegree(Object... arg) { UNSUPPORTED("2h5zq3e2klttmcfrs4pg0cst6"); // static int getOutDegree(nodeGroup_t * ng) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b5a93beg34iiqtnufv9wanh2r"); // int i, cnt = 0; UNSUPPORTED("7ur993neb8tctm0gbe60vhpva"); // for (i = 0; i < ng->nNodes; i++) { UNSUPPORTED("3ubjqvl7psu25r3c10ddw54v5"); // node_t *n = ng->nodes[i]; UNSUPPORTED("ak952thd788dbr90m2fvaklyu"); // edge_t *e; UNSUPPORTED("2z8g63ud3byunrtnllsx573mk"); // graph_t *g = agraphof(n); UNSUPPORTED("dar3s057kgujhrxf7no64ofdb"); // /* count outdegree. This loop might be unnecessary. */ UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("7hl03wjg5yryhvbe4ar0i0b8g"); // cnt++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3zkt5kbq3sockq663o3s3ync7"); // return cnt; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 advd4q4a55y9bkee9lm2jlb0b // static int compFunction2(const void *a, const void *b) public static Object compFunction2(Object... arg) { UNSUPPORTED("3ozmsdf5a2dqxtwspwzu5w8yl"); // static int compFunction2(const void *a, const void *b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("751goeklcv2nazn2zynh989rh"); // nodeGroup_t **ind1 = (nodeGroup_t **) a, **ind2 = (nodeGroup_t **) b; UNSUPPORTED("d5t70ah6319tmfn70ddvkq7wr"); // int cnt1 = getOutDegree(*ind1); UNSUPPORTED("8wbvk61eveeuzv86g34s2xbd4"); // int cnt2 = getOutDegree(*ind2); UNSUPPORTED("54loo8ag5vsb7zdxx83v3wegy"); // return (cnt2 < cnt1) - (cnt2 > cnt1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aumg85jl3ptocfpw3ix2pech9 // static void reduceMaxWidth2(graph_t * g) public static Object reduceMaxWidth2(Object... arg) { UNSUPPORTED("6kkeddpljjg8jce0vm3z2zxdy"); // static void reduceMaxWidth2(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("809hvj8mnkno5tj5jlitlzwba"); // int maxLayerIndex; UNSUPPORTED("7krkyrq7vtxesiaw3i63dji4m"); // double nextMaxWidth; UNSUPPORTED("c9w9u59u9ncaoyp4lxxvw7ys3"); // double w = 0; UNSUPPORTED("9x23dbda4cbxrfoy5h5q89sef"); // double targetWidth; UNSUPPORTED("3d8p59v1x246rys9xsoqpko98"); // int fst; UNSUPPORTED("4zuos9b188cv83meg3dw0orp3"); // nodeGroup_t *fstNdGrp; UNSUPPORTED("beehmu1l85sgql2h4wysgoce4"); // int ndem; UNSUPPORTED("884zwztabkph7x61nviw8sjef"); // int p, q; UNSUPPORTED("8t1tccvz58ueg1sf9fyado1vu"); // int limit; UNSUPPORTED("di25ovytf5y19mju57f42pogp"); // int rem; UNSUPPORTED("dcmflthwszqqq5jsozmt9oyfi"); // int rem2; UNSUPPORTED("81h1x4spv5vyw9fipnyfpgcmm"); // /* Find the widest layer. it must have at least 2 nodes. */ UNSUPPORTED("5ad5whcn26kk2tafa6g5hmjgm"); // for (i = 0; i < nLayers; i++) { UNSUPPORTED("367ttm0jqivj6ascugpsq2ihs"); // if (layerWidthInfo[sortedLayerIndex[i]].nNodeGroupsInLayer <= 1) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("1qngg4wjsrt1uwmffwse8e1fm"); // maxLayerIndex = sortedLayerIndex[i]; UNSUPPORTED("mrjkzaja4hn0djdm4njyzwgn"); // /* get the width of the next widest layer */ UNSUPPORTED("bekefegm5r42jf82uhdsw60k2"); // nextMaxWidth = UNSUPPORTED("1s96rlqp02to8be86ahpks4qp"); // (nLayers > UNSUPPORTED("4qkxf4ozs5338fev3ejswyucm"); // i + 1) ? layerWidthInfo[sortedLayerIndex[i + UNSUPPORTED("90jb1nqwt32r76t90h3kukxls"); // 1]].width : 0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("atqfhmyhmoiwees87nqlh9bs2"); // if (i == nLayers) UNSUPPORTED("4wofltgoxyf0kq1ucrvv2sbq9"); // return; /* reduction of layerwidth is not possible. */ UNSUPPORTED("5nqb1rqm56ozkw6w0ysotyy06"); // /* sort the node groups in maxLayerIndex layer by height and UNSUPPORTED("e9gqf91z12tzdilu3jefz85op"); // * then width, nonincreasing UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("3tbh2oua8twhyt14bkhup0v5n"); // qsort(layerWidthInfo[maxLayerIndex].nodeGroupsInLayer, UNSUPPORTED("80ucuxmaxd96o7ozxxno7y18c"); // layerWidthInfo[maxLayerIndex].nNodeGroupsInLayer, UNSUPPORTED("f0wxqmd02xh4xxnox7semmqup"); // sizeof(nodeGroup_t *), compFunction2); UNSUPPORTED("bukry94lbr7k56elmyf5nyna1"); // if (nextMaxWidth <= layerWidthInfo[maxLayerIndex].width / 4 UNSUPPORTED("1dy07qz8nxz4ovvsonpv95h8x"); // || nextMaxWidth >= layerWidthInfo[maxLayerIndex].width * 3 / 4) UNSUPPORTED("4xw4q9anml67xuotpbea3yy1x"); // nextMaxWidth = layerWidthInfo[maxLayerIndex].width / 2; UNSUPPORTED("4vcsswlnmvhk990gonx0dbl53"); // targetWidth = nextMaxWidth; /* layerWidthInfo[maxLayerIndex].width/2; */ UNSUPPORTED("8xl0athl77hag9patwu9qhehu"); // /* now partition the current layer into two or more UNSUPPORTED("c49o3kf9bot8xo1pu9vb9qcsy"); // * layers (determined by the ranking algorithm) UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("3ku48i8nky2n7oji9472v747k"); // fst = 0; UNSUPPORTED("cspv6bcy4ird3pgtk05x2v9x6"); // ndem = 0; UNSUPPORTED("1b8yssh8ruoe077cgcki6zdrt"); // limit = layerWidthInfo[maxLayerIndex].nNodeGroupsInLayer; UNSUPPORTED("2rbxfdjhm2zringpkeerct448"); // rem = 0; UNSUPPORTED("apzuij26xnj5ma4m18z4ai50w"); // rem2 = 0; UNSUPPORTED("dap1pwebtq8maf5s2545nbrp1"); // /* initialize w, the width of the widest layer after partitioning */ UNSUPPORTED("7l2ucqsu9ruv5iie2klh90ahd"); // w = 0; UNSUPPORTED("a7g80jjjbl6srwowqdzxcoqs0"); // for (i = 0; i < limit + rem; i++) { UNSUPPORTED("1ahjq48zq780a0cwvpseutdkn"); // if (layerWidthInfo[maxLayerIndex].removed[i]) { UNSUPPORTED("48so496p8g7nm344prgfhv3r5"); // rem++; UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cg4gj8hzn83y6snfckfbmfo6e"); // if ((w + UNSUPPORTED("dv06i6wtz2bw1qsahmuqs98hl"); // layerWidthInfo[maxLayerIndex].nodeGroupsInLayer[i]->width * UNSUPPORTED("pf67y1fh8hdiylyu2431xmxa"); // 72 + (w > 0) * GD_nodesep(g) <= targetWidth) UNSUPPORTED("bq1bstz8voswqa4fjibespqab"); // || !fst) { UNSUPPORTED("5qq0d479u9d6d2ye5xl80ax0d"); // w += (layerWidthInfo[maxLayerIndex].nodeGroupsInLayer[i])-> UNSUPPORTED("bq93mxk1jp4ou77b72s93zr85"); // width * 72 + (w > 0) * GD_nodesep(g); UNSUPPORTED("366y982g736adlsryzw0c3oek"); // if (!fst) { UNSUPPORTED("9plnm3zvs0636dt0kmoha46l"); // fstNdGrp = UNSUPPORTED("5xiakyfs1gp0y9aasprrrk5mn"); // layerWidthInfo[maxLayerIndex].nodeGroupsInLayer[i]; UNSUPPORTED("bf0q1igp1253yxfg3f1tfel24"); // fst = 1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("3wwlt6ahhurc0ijlwm0bxslur"); // nodeGroup_t *ng = UNSUPPORTED("43fttvx26kc9s70wgpnm3ws2q"); // layerWidthInfo[maxLayerIndex].nodeGroupsInLayer[i]; UNSUPPORTED("kq0gpmkxpiwbektqvym913vy"); // for (p = 0; p < fstNdGrp->nNodes; p++) UNSUPPORTED("7chqat1hgor0xzck89881kmmz"); // for (q = 0; q < ng->nNodes; q++) { UNSUPPORTED("3egbmst2r8790sta0upbaq3kj"); // //printf("Trying to add virtual edge: %s -> %s\n", UNSUPPORTED("dwbnct46v3we663g5l2tmptui"); // // agnameof(fstNdGrp->nodes[p]), agnameof(ng->nodes[q])); UNSUPPORTED("cuqv9sy98rmhdbjpzeex3rg4v"); // /* The following code is for deletion of long virtual edges. UNSUPPORTED("1r2z18tbg612ek9sfb489a6xc"); // * It's no longer used. UNSUPPORTED("e37um01phgd5qy4hrex7cu8bi"); // */ UNSUPPORTED("58a2mmk9lsz9t5yzb8b9f8bkp"); // /* add a new virtual edge */ UNSUPPORTED("6ljuxngn9wk3ftcodzf054yeu"); // edge_t *newVEdge = UNSUPPORTED("844w3zq8p902r572neb30unb6"); // virtual_edge(fstNdGrp->nodes[p], ng->nodes[q], UNSUPPORTED("b955fhzlbikknivthxtzpnugj"); // NULL); UNSUPPORTED("qt1p5nrwd57te4eh2ohjmmta"); // ED_edge_type(newVEdge) = 1; UNSUPPORTED("dsgv48crsux69djskyfkvpq8a"); // ndem++; /* increase number of node demotions */ UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7vqv39l80iv7x6hfdcecytlgy"); // /* the following code updates the layer width information. The UNSUPPORTED("7j2qzieax8k3ao9i9so65vkc1"); // * update is not useful in the current version of the heuristic. UNSUPPORTED("20m1lc1moer8x00tx9ceto0iw"); // */ UNSUPPORTED("8vij5gjt5kh41fekao3vc79ck"); // layerWidthInfo[maxLayerIndex].removed[i] = 1; UNSUPPORTED("czzy9dbc0rmsq8m3o0g5tuamg"); // rem2++; UNSUPPORTED("96jz56riot2d1ri2fufximy6f"); // layerWidthInfo[maxLayerIndex].nNodeGroupsInLayer--; UNSUPPORTED("ahih3boi0hmv6cjfgurjbltxl"); // /* SHOULD BE INCREASED BY THE SUM OF INDEG OF ALL NODES IN GROUP */ UNSUPPORTED("7wh7bhbziqs0nzma76j37hbiz"); // layerWidthInfo[maxLayerIndex].nDummyNodes++; UNSUPPORTED("4zs60km4pkprzvbgtwsdhp5ad"); // layerWidthInfo[maxLayerIndex].width -= UNSUPPORTED("atkdij9n6sv7amu7j5iiofmpb"); // (ng->width * 72 + GD_nodesep(g)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9m17vsomqcrp49v7i892k9wdz // static void applyPacking2(graph_t * g) public static Object applyPacking2(Object... arg) { UNSUPPORTED("a65t347rhgkl70wordiofv3b"); // static void applyPacking2(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("5z9j46ysd1pb5bnq6c90enmrq"); // sortedLayerIndex = (int*)zmalloc((agnnodes(g))*sizeof(int)); UNSUPPORTED("9bb75wlkcadi5zu3bgx60fel0"); // for (i = 0; i < agnnodes(g); i++) { UNSUPPORTED("e9lhr9mahq6qolp5r06dl6rfy"); // sortedLayerIndex[i] = i; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ekdavoqh7w4imu35z1hk4cr27"); // computeLayerWidths(g); UNSUPPORTED("6541sj456n87xc6ssjlvin6lv"); // sortLayers(g); UNSUPPORTED("22r0c4vewes195tok6uvfzjjk"); // reduceMaxWidth2(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b9x4re3dvjn32qyn2twehamcd // void initEdgeTypes(graph_t * g) public static Object initEdgeTypes(Object... arg) { UNSUPPORTED("2syp4meyieisq746m5m1ff921"); // void initEdgeTypes(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("7k5t9s9q7nhmwr9qz8jg12ams"); // int lc; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("z39vglndoyxj54j2z9v64r6q"); // for (lc = 0; lc < ND_in(n).size; lc++) { UNSUPPORTED("agilsevb8bk3ymoczc2ptb24y"); // e = ND_in(n).list[lc]; UNSUPPORTED("21bvtwcu90i27r8cbu2ngifk"); // ED_edge_type(e) = 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9b4z7q5fnvgvi1cs36mimkrqs // static double computeCombiAR(graph_t * g) public static Object computeCombiAR(Object... arg) { UNSUPPORTED("8y99bebjn0nlslisg0u06o7ef"); // static double computeCombiAR(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("gmffj6qikpm7gyjl7ppj2avw"); // int i, maxLayerIndex; UNSUPPORTED("bkqjq8sflq6i69h1q5wtrqdyz"); // double maxW = 0; UNSUPPORTED("d2sh953raugyt16qa6wimemaq"); // double maxH; UNSUPPORTED("3dg5tppzkfs857vo6ykmcnnah"); // double ratio; UNSUPPORTED("ekdavoqh7w4imu35z1hk4cr27"); // computeLayerWidths(g); UNSUPPORTED("btqcp1jn7vzx1obrdwlpao8ei"); // maxH = (nLayers - 1) * GD_ranksep(g); UNSUPPORTED("5ad5whcn26kk2tafa6g5hmjgm"); // for (i = 0; i < nLayers; i++) { UNSUPPORTED("6nkzs7fajji0961pjb259v0fk"); // if (maxW < UNSUPPORTED("5k2g68qxz0ue7tb2a4pdbhu2j"); // layerWidthInfo[i].width + UNSUPPORTED("eoi6tblklq5p0ap1ck08iiqj8"); // layerWidthInfo[i].nDummyNodes * GD_nodesep(g)) { UNSUPPORTED("93grfh5yi1ydy8iyt353uh909"); // maxW = UNSUPPORTED("279i4wi2e4voircoomc1ry8ua"); // layerWidthInfo[i].width + UNSUPPORTED("6xb1rhy6cdjxo2vbpz8nhuvxe"); // layerWidthInfo[i].nDummyNodes * GD_nodesep(g); UNSUPPORTED("92zn37cakfkafc7ginje53mb6"); // maxLayerIndex = i; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cn95qhc4xh1ri1c41fnpwce48"); // maxH += layerWidthInfo[i].height; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9p670kmiu3qqp1vgbn22mq4w9"); // ratio = maxW / maxH; UNSUPPORTED("beyrasxgt5kbbdyzy9nvsaf3i"); // return ratio; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 w58r6lvyglcqidl4qnxr3cm5 // static void zapLayers(graph_t * g) public static Object zapLayers(Object... arg) { UNSUPPORTED("dsto0e5yga5gs3tgtzp4pbffj"); // static void zapLayers(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dzpsknrwv8qkqq20hjnjpjn68"); // int i, j; UNSUPPORTED("7cl1kmap8x457uux62gb4277b"); // int start = 0; UNSUPPORTED("551funk1bxiemly3silcqtngw"); // int count = 0; UNSUPPORTED("90et4gwa94l7wrduohmumf7q6"); // /* the layers are sorted by the layer number. now zap the empty layers */ UNSUPPORTED("5ad5whcn26kk2tafa6g5hmjgm"); // for (i = 0; i < nLayers; i++) { UNSUPPORTED("8oo7ghtfr3xrf5gukymtnn4jk"); // if (layerWidthInfo[i].nNodeGroupsInLayer == 0) { UNSUPPORTED("dgv3r9g8m1rprnlfpxqhfe1z9"); // if (count == 0) UNSUPPORTED("2ksocundgfwgz5agi901h1ng6"); // start = layerWidthInfo[i].layerNumber; UNSUPPORTED("fn6rrzmrb2yold6j6aofg94n"); // count++; UNSUPPORTED("ern96acbmw0trnet16xgt1chp"); // } else if (count && layerWidthInfo[i].layerNumber > start) { UNSUPPORTED("4f4sjt4zqxe5b75pgq7zd079z"); // for (j = 0; j < layerWidthInfo[i].nNodeGroupsInLayer; j++) { UNSUPPORTED("euaoxl3q399fzxn78jpuxbz0m"); // int q; UNSUPPORTED("4y0bw1xrvij26xm6lflig8hph"); // nodeGroup_t *ng = layerWidthInfo[i].nodeGroupsInLayer[j]; UNSUPPORTED("7chqat1hgor0xzck89881kmmz"); // for (q = 0; q < ng->nNodes; q++) { UNSUPPORTED("ez35ky0s0p5r57be9io2lrr10"); // node_t *nd = ng->nodes[q]; UNSUPPORTED("bcfxc7h41rzopvk27c7kreog"); // ND_rank(nd) -= count; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 25p8yyx732fa1dwxany5vkmqv // void rank3(graph_t * g, aspect_t * asp) public static Object rank3(Object... arg) { UNSUPPORTED("ey9g3c61eb7j5dnz3gbhvflt3"); // void rank3(graph_t * g, aspect_t * asp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("752slid56zrpl98vchhyeqpj"); // int iterations = asp->nextIter; UNSUPPORTED("6wfeyz2bw1fm15jb5qg3a79a2"); // double lastAR = MAXDOUBLE; UNSUPPORTED("5bvy7rsy7sf1krbn35gmd888x"); // computeNodeGroups(g); /* groups of UF DS nodes */ UNSUPPORTED("cn5dqgh2amp70r1jzq8d7v75x"); // for (i = 0; (i < iterations) || (iterations == -1); i++) { UNSUPPORTED("42uwgh3dkewf6zkd83xt1wzjd"); // /* initialize all ranks to be 0 */ UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("f429zn3r84ceckfatzshenxzo"); // ND_rank(n) = 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("d7qgdx3iixit5pdzj1yfw5vc8"); // /* need to compute ranking first--- by Network flow */ UNSUPPORTED("1um989w8mqkye2u0q3wbc8dgb"); // rank1(g); UNSUPPORTED("cou59yxqf69o7kpjwdkc0vdth"); // asp->combiAR = computeCombiAR(g); UNSUPPORTED("a0xpyoq74njvdwc9lcvgyfc0p"); // if (Verbose) UNSUPPORTED("5ndbkluuhatxcz2bwngcywbhc"); // fprintf(stderr, "combiAR = %lf\n", asp->combiAR); UNSUPPORTED("53w2avskexaf6hjssoeplgz0o"); // /* Uncomment the following codes, for working with narrow graphs */ UNSUPPORTED("am6dg6wfejg71244n1zzvaed6"); // /* Success or if no improvement */ UNSUPPORTED("7qroolj8ezwbbkwrss9k1q5mc"); // if ((asp->combiAR <= asp->targetAR) || ((iterations == -1) && (lastAR <= asp->combiAR))) { UNSUPPORTED("11dozd7gvruvmd3x164caqmgz"); // asp->prevIterations = asp->curIterations; UNSUPPORTED("bm7zpotfxeku2ydqqsd6twzm6"); // asp->curIterations = i; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7r2hn8bkthpfcf03lu4vnje0f"); // lastAR = asp->combiAR; UNSUPPORTED("9tsz1ho0itczonzjb308rql0m"); // /* Apply the FFDH algorithm to reduce the aspect ratio; */ UNSUPPORTED("7jlj2ab1tf2kzdmzf0f14epg4"); // applyPacking2(g); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9zv64kjrcw7u09t5lm2qsg4fw"); // /* do network flow once again... incorporating the added edges */ UNSUPPORTED("393qo3g8b50gvp5o0tpqh29v1"); // rank1(g); UNSUPPORTED("ekdavoqh7w4imu35z1hk4cr27"); // computeLayerWidths(g); UNSUPPORTED("b1ukbsj4nhxbvn64fx7zbx7sn"); // zapLayers(g); UNSUPPORTED("3b5copquo4t13fbkmtbbkvo8j"); // asp->combiAR = computeCombiAR(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7bn6xhopjjdriiwvcpg9wqy1y // void init_UF_size(graph_t * g) public static Object init_UF_size(Object... arg) { UNSUPPORTED("cqp1rfchvfwon31gknapperjh"); // void init_UF_size(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("16hw9gw0dz2w7mrtba0eoqrdi"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("2jzig41vokvwcy6z0o5dgo7sb"); // ND_UF_size(n) = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5srsfxqlego6qiyj5mm8m4ql2 // aspect_t* setAspect (Agraph_t * g, aspect_t* adata) public static aspect_t setAspect(Agraph_s g, aspect_t adata) { ENTERING("5srsfxqlego6qiyj5mm8m4ql2","setAspect"); try { double rv; CString p; int r, passes = 5; p = agget (g, new CString("aspect")); if (N(p) || UNSUPPORTED("(r = sscanf (p, %lf,%d, &rv, &passes)) <= 0)")==null) { adata.setInt("nextIter", 0); adata.setInt("badGraph", 0); return null; } UNSUPPORTED("bq1l9wqiw8bcls8ptb8o9rhqi"); // agerr (AGWARN, "the aspect attribute has been disabled due to implementation flaws - attribute ignored.\n"); UNSUPPORTED("1hvtnh8r9fb47ewad86tcf0n0"); // adata->nextIter = 0; UNSUPPORTED("xx058mix2zyckbi0esnoc56v"); // adata->badGraph = 0; UNSUPPORTED("o68dp934ebg4cplebgc5hv4v"); // return NULL; UNSUPPORTED("ikxv7u2qba6riujs2unqsitx"); // if (rv < 1.0) rv = 1.0; UNSUPPORTED("acmmvkcaf8bc8wb6kdx9s2d3a"); // else if (rv > 20.0) rv = 20.0; UNSUPPORTED("18wyf3ih8fg4x4s3c006nx8zx"); // adata->targetAR = rv; UNSUPPORTED("2875r01nyy2cpm1c439zwu6tf"); // adata->nextIter = -1; UNSUPPORTED("9ssjc7jsfl2jgw01gwnr3ftal"); // adata->nPasses = passes; UNSUPPORTED("xx058mix2zyckbi0esnoc56v"); // adata->badGraph = 0; UNSUPPORTED("620q0efwdrg8vw3ggwpmxqiwv"); // if (Verbose) UNSUPPORTED("a7heh0decro63skjh8xq4buo7"); // fprintf(stderr, "Target AR = %g\n", adata->targetAR); UNSUPPORTED("b1cn763x4de1h91cdv3d4o3lb"); // return adata; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("5srsfxqlego6qiyj5mm8m4ql2","setAspect"); } } } plantuml-1.2017.15/src/gen/lib/dotgen/class1__c.java000066400000000000000000000612141312650303100217420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static gen.lib.cgraph.attr__c.agxget; import static gen.lib.cgraph.edge__c.agfstout; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agnxtout; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.cgraph.node__c.agfstnode; import static gen.lib.cgraph.node__c.agnxtnode; import static gen.lib.common.utils__c.UF_find; import static gen.lib.common.utils__c.mapbool; import static gen.lib.dotgen.cluster__c.mark_clusters; import static gen.lib.dotgen.fastgr__c.find_fast_edge; import static gen.lib.dotgen.fastgr__c.merge_oneway; import static gen.lib.dotgen.fastgr__c.virtual_edge; import static gen.lib.dotgen.fastgr__c.virtual_node; import static gen.lib.dotgen.position__c.make_aux_edge; import static smetana.core.JUtils.EQ; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.ED_minlen; import static smetana.core.Macro.ED_to_orig; import static smetana.core.Macro.ED_to_virt; import static smetana.core.Macro.ED_weight; import static smetana.core.Macro.GD_leader; import static smetana.core.Macro.ND_clust; import static smetana.core.Macro.ND_node_type; import static smetana.core.Macro.ND_rank; import static smetana.core.Macro.UNSUPPORTED; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.boxf; import h.pointf; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Z; import smetana.core.__struct__; public class class1__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2luyof8ca7ewf9r08z3os3lk7 // int nonconstraint_edge(edge_t * e) public static boolean nonconstraint_edge(Agedge_s e) { ENTERING("2luyof8ca7ewf9r08z3os3lk7","nonconstraint_edge"); try { CString constr; if (Z.z().E_constr!=null && (constr = agxget(e, Z.z().E_constr))!=null) { if (constr.charAt(0)!='\0' && mapbool(constr) == false) return (!(false)); } return false; } finally { LEAVING("2luyof8ca7ewf9r08z3os3lk7","nonconstraint_edge"); } } //3 dpimuv55sylui7jx8fh3ic1qc // static void interclust1(graph_t * g, node_t * t, node_t * h, edge_t * e) public static void interclust1(Agraph_s g, Agnode_s t, Agnode_s h, Agedge_s e) { ENTERING("dpimuv55sylui7jx8fh3ic1qc","interclust1"); try { Agnode_s v, t0, h0; int offset, t_len, h_len, t_rank, h_rank; Agedge_s rt, rh; if (ND_clust(agtail(e))!=null) t_rank = ND_rank(agtail(e)) - ND_rank(GD_leader(ND_clust(agtail(e)))); else t_rank = 0; if (ND_clust(aghead(e))!=null) h_rank = ND_rank(aghead(e)) - ND_rank(GD_leader(ND_clust(aghead(e)))); else h_rank = 0; offset = ED_minlen(e) + t_rank - h_rank; if (offset > 0) { t_len = 0; h_len = offset; } else { t_len = -offset; h_len = 0; } v = virtual_node(g); ND_node_type(v, 2); t0 = UF_find(t); h0 = UF_find(h); rt = make_aux_edge(v, t0, t_len, 10 * ED_weight(e)); rh = make_aux_edge(v, h0, h_len, ED_weight(e)); ED_to_orig(rt, e); ED_to_orig(rh, e); } finally { LEAVING("dpimuv55sylui7jx8fh3ic1qc","interclust1"); } } //3 acy5ct6402jgf0ga5oeeskx5m // void class1(graph_t * g) public static void class1_(Agraph_s g) { ENTERING("acy5ct6402jgf0ga5oeeskx5m","class1"); try { Agnode_s n, t, h; Agedge_s e, rep; mark_clusters(g); for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) { for (e = agfstout(g, n); e!=null; e = agnxtout(g, e)) { /* skip edges already processed */ if (ED_to_virt(e)!=null) continue; /* skip edges that we want to ignore in this phase */ if (nonconstraint_edge(e)) continue; t = UF_find(agtail(e)); h = UF_find(aghead(e)); /* skip self, flat, and intra-cluster edges */ if (EQ(t, h)) continue; /* inter-cluster edges require special treatment */ if (ND_clust(t)!=null || ND_clust(h)!=null) { interclust1(g, agtail(e), aghead(e), e); continue; } if ((rep = find_fast_edge(t, h))!=null) merge_oneway(e, rep); else virtual_edge(t, h, e); } } } finally { LEAVING("acy5ct6402jgf0ga5oeeskx5m","class1"); } } } plantuml-1.2017.15/src/gen/lib/dotgen/class2__c.java000066400000000000000000001003461312650303100217430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static gen.lib.cgraph.edge__c.agedge; import static gen.lib.cgraph.edge__c.agfstout; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agnxtout; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.cgraph.node__c.agfstnode; import static gen.lib.cgraph.node__c.agnxtnode; import static gen.lib.cgraph.obj__c.agroot; import static gen.lib.common.utils__c.UF_find; import static gen.lib.dotgen.cluster__c.build_skeleton; import static gen.lib.dotgen.cluster__c.mark_clusters; import static gen.lib.dotgen.dotinit__c.dot_root; import static gen.lib.dotgen.fastgr__c.fast_node; import static gen.lib.dotgen.fastgr__c.find_fast_edge; import static gen.lib.dotgen.fastgr__c.flat_edge; import static gen.lib.dotgen.fastgr__c.merge_oneway; import static gen.lib.dotgen.fastgr__c.other_edge; import static gen.lib.dotgen.fastgr__c.virtual_edge; import static gen.lib.dotgen.fastgr__c.virtual_node; import static gen.lib.dotgen.mincross__c.virtual_weight; import static gen.lib.dotgen.position__c.ports_eq; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.ALLOC_empty; import static smetana.core.Macro.ED_conc_opp_flag; import static smetana.core.Macro.ED_count; import static smetana.core.Macro.ED_edge_type; import static smetana.core.Macro.ED_label; import static smetana.core.Macro.ED_label_ontop; import static smetana.core.Macro.ED_to_virt; import static smetana.core.Macro.ED_weight; import static smetana.core.Macro.ED_xpenalty; import static smetana.core.Macro.GD_clust; import static smetana.core.Macro.GD_comp; import static smetana.core.Macro.GD_flip; import static smetana.core.Macro.GD_n_cluster; import static smetana.core.Macro.GD_n_nodes; import static smetana.core.Macro.GD_nlist; import static smetana.core.Macro.GD_nodesep; import static smetana.core.Macro.GD_rankleader; import static smetana.core.Macro.MAX; import static smetana.core.Macro.N; import static smetana.core.Macro.ND_clust; import static smetana.core.Macro.ND_ht; import static smetana.core.Macro.ND_label; import static smetana.core.Macro.ND_lw; import static smetana.core.Macro.ND_out; import static smetana.core.Macro.ND_rank; import static smetana.core.Macro.ND_ranktype; import static smetana.core.Macro.ND_rw; import static smetana.core.Macro.ND_weight_class; import static smetana.core.Macro.NOT; import static smetana.core.Macro.UNSUPPORTED; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.Z; import smetana.core.__struct__; public class class2__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2zn7c6ulmwwzaibdxo127jf04 // static node_t* label_vnode(graph_t * g, edge_t * orig) public static Agnode_s label_vnode(Agraph_s g, Agedge_s orig) { ENTERING("2zn7c6ulmwwzaibdxo127jf04","label_vnode"); try { Agnode_s v; final __struct__ dimen = JUtils.from(pointf.class); dimen.___(ED_label(orig).getStruct("dimen")); v = virtual_node(g); ND_label(v, ED_label(orig)); ND_lw(v, GD_nodesep(agroot(v))); if (N(ED_label_ontop(orig))) { if (GD_flip(agroot(g))!=0) { ND_ht(v, dimen.getDouble("x")); ND_rw(v, dimen.getDouble("y")); } else { ND_ht(v, dimen.getDouble("y")); ND_rw(v, dimen.getDouble("x")); } } return v; } finally { LEAVING("2zn7c6ulmwwzaibdxo127jf04","label_vnode"); } } //3 49tji49jdm9uges7v8lf2j2rn // static void incr_width(graph_t * g, node_t * v) public static void incr_width(Agraph_s g, Agnode_s v) { ENTERING("49tji49jdm9uges7v8lf2j2rn","incr_width"); try { int width = GD_nodesep(g) / 2; ND_lw(v, ND_lw(v) + width); ND_rw(v, ND_rw(v) + width); } finally { LEAVING("49tji49jdm9uges7v8lf2j2rn","incr_width"); } } //3 xujihq6vep3ez275shtrbilo // static node_t* plain_vnode(graph_t * g, edge_t * orig) public static Agnode_s plain_vnode(Agraph_s g, Agedge_s orig) { ENTERING("xujihq6vep3ez275shtrbilo","plain_vnode"); try { Agnode_s v; orig = orig; v = virtual_node(g); incr_width(g, v); return v; } finally { LEAVING("xujihq6vep3ez275shtrbilo","plain_vnode"); } } //3 9fmfj1b2jik7skv6ms0657t8r // static node_t* leader_of(graph_t * g, node_t * v) public static Agnode_s leader_of(Agraph_s g, Agnode_s v) { ENTERING("9fmfj1b2jik7skv6ms0657t8r","leader_of"); try { Agraph_s clust; Agnode_s rv; if (ND_ranktype(v) != 7) { /*assert(v == UF_find(v)); could be leaf, so comment out */ rv = UF_find(v); } else { clust = ND_clust(v); rv = (Agnode_s) GD_rankleader(clust).plus(ND_rank(v)).getPtr(); } return rv; } finally { LEAVING("9fmfj1b2jik7skv6ms0657t8r","leader_of"); } } //3 6sbvlvurvkodunw2qt1ug70c2 // static void make_chain(graph_t * g, node_t * from, node_t * to, edge_t * orig) public static void make_chain(Agraph_s g, Agnode_s from, Agnode_s to, Agedge_s orig) { ENTERING("6sbvlvurvkodunw2qt1ug70c2","make_chain"); try { int r, label_rank; Agnode_s u, v=null; Agedge_s e; u = from; if (ED_label(orig)!=null) label_rank = (ND_rank(from) + ND_rank(to)) / 2; else label_rank = -1; //assert(ED_to_virt(orig) == NULL); for (r = ND_rank(from) + 1; r <= ND_rank(to); r++) { if (r < ND_rank(to)) { if (r == label_rank) v = label_vnode(g, orig); else v = plain_vnode(g, orig); ND_rank(v, r); } else v = to; e = virtual_edge(u, v, orig); virtual_weight(e); u = v; } // assert(ED_to_virt(orig) != NULL); } finally { LEAVING("6sbvlvurvkodunw2qt1ug70c2","make_chain"); } } //3 659ld5tcseo3l0hopxb3pf0vv // static void interclrep(graph_t * g, edge_t * e) public static void interclrep(Agraph_s g, Agedge_s e) { ENTERING("659ld5tcseo3l0hopxb3pf0vv","interclrep"); try { Agnode_s t, h; Agedge_s ve; t = leader_of(g, agtail(e)); h = leader_of(g, aghead(e)); if (ND_rank(t) > ND_rank(h)) { Agnode_s t0 = t; t = h; h = t0; } if (NEQ(ND_clust(t), ND_clust(h))) { if ((ve = find_fast_edge(t, h))!=null) { merge_chain(g, e, ve, NOT(false)); return; } if (ND_rank(t) == ND_rank(h)) return; make_chain(g, t, h, e); /* mark as cluster edge */ for (ve = ED_to_virt(e); ve!=null && (ND_rank(aghead(ve)) <= ND_rank(h)); ve = (Agedge_s) ND_out(aghead(ve)).getFromList(0)) ED_edge_type(ve, 5); } /* else ignore intra-cluster edges at this point */ } finally { LEAVING("659ld5tcseo3l0hopxb3pf0vv","interclrep"); } } //3 c0cx00ki1i1kx0bp84e7xjg8d // static int is_cluster_edge(edge_t * e) public static boolean is_cluster_edge(Agedge_s e) { ENTERING("c0cx00ki1i1kx0bp84e7xjg8d","is_cluster_edge"); try { return ((ND_ranktype(agtail(e)) == 7) || (ND_ranktype(aghead(e)) == 7)); } finally { LEAVING("c0cx00ki1i1kx0bp84e7xjg8d","is_cluster_edge"); } } //3 c45973dtaighb3u0auuekcs1y // void merge_chain(graph_t * g, edge_t * e, edge_t * f, int flag) public static void merge_chain(Agraph_s g, Agedge_s e, Agedge_s f, boolean flag) { ENTERING("c45973dtaighb3u0auuekcs1y","merge_chain"); try { Agedge_s rep; int lastrank = MAX(ND_rank(agtail(e)), ND_rank(aghead(e))); //assert(ED_to_virt(e) == NULL); ED_to_virt(e, f); rep = f; do { /* interclust multi-edges are not counted now */ if (flag) ED_count(rep, ED_count(rep) + ED_count(e)); ED_xpenalty(rep, ED_xpenalty(rep) + ED_xpenalty(e)); ED_weight(rep, ED_weight(rep) + ED_weight(e)); if (ND_rank(aghead(rep)) == lastrank) break; incr_width(g, aghead(rep)); rep = (Agedge_s) ND_out(aghead(rep)).getFromList(0); } while (rep!=null); } finally { LEAVING("c45973dtaighb3u0auuekcs1y","merge_chain"); } } //3 bg5r9wlego0d8pv0hr96zt45c // int mergeable(edge_t * e, edge_t * f) public static boolean mergeable(Agedge_s e, Agedge_s f) { ENTERING("bg5r9wlego0d8pv0hr96zt45c","mergeable"); try { if (e!=null && f!=null && EQ(agtail(e), agtail(f)) && EQ(aghead(e), aghead(f)) && EQ(ED_label(e), ED_label(f)) && ports_eq(e, f)) return NOT(false); return false; } finally { LEAVING("bg5r9wlego0d8pv0hr96zt45c","mergeable"); } } //3 d0bxlkysxucmww7t74u9krrgz // void class2(graph_t * g) public static void class2(Agraph_s g) { ENTERING("d0bxlkysxucmww7t74u9krrgz","class2"); try { int c; Agnode_s n, t, h; Agedge_s e, prev, opp; GD_nlist(g, null); GD_n_nodes(g, 0); /* new */ mark_clusters(g); for (c = 1; c <= GD_n_cluster(g); c++) build_skeleton(g, (Agraph_s) GD_clust(g).plus(c).getPtr()); for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) for (e = agfstout(g, n); e!=null; e = agnxtout(g, e)) { if (ND_weight_class(aghead(e)) <= 2) ND_weight_class(aghead(e), ND_weight_class(aghead(e))+1); if (ND_weight_class(agtail(e)) <= 2) ND_weight_class(agtail(e), ND_weight_class(agtail(e))+1); } for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) { if ((ND_clust(n) == null) && (EQ(n, UF_find(n)))) { fast_node(g, n); GD_n_nodes(g, GD_n_nodes(g)+1); } prev = null; for (e = agfstout(g, n); e!=null; e = agnxtout(g, e)) { /* already processed */ if (ED_to_virt(e)!=null) { prev = e; continue; } /* edges involving sub-clusters of g */ if (is_cluster_edge(e)) { /* following is new cluster multi-edge code */ if (mergeable(prev, e)) { if (ED_to_virt(prev)!=null) { merge_chain(g, e, ED_to_virt(prev), false); other_edge(e); } else if (ND_rank(agtail(e)) == ND_rank(aghead(e))) { merge_oneway(e, prev); other_edge(e); } /* else is an intra-cluster edge */ continue; } interclrep(g, e); prev = e; continue; } /* merge multi-edges */ if (prev!=null && EQ(agtail(e), agtail(prev)) && EQ(aghead(e), aghead(prev))) { if (ND_rank(agtail(e)) == ND_rank(aghead(e))) { merge_oneway(e, prev); other_edge(e); continue; } if ((ED_label(e) == null) && (ED_label(prev) == null) && ports_eq(e, prev)) { if (Z.z().Concentrate) ED_edge_type(e, 6); else { merge_chain(g, e, ED_to_virt(prev), NOT(false)); other_edge(e); } continue; } /* parallel edges with different labels fall through here */ } /* self edges */ if (EQ(agtail(e), aghead(e))) { other_edge(e); prev = e; continue; } t = UF_find(agtail(e)); h = UF_find(aghead(e)); /* non-leader leaf nodes */ if (NEQ(agtail(e), t) || NEQ(aghead(e), h)) { /* FIX need to merge stuff */ continue; } /* flat edges */ if (ND_rank(agtail(e)) == ND_rank(aghead(e))) { flat_edge(g, e); prev = e; continue; } /* forward edges */ if (ND_rank(aghead(e)) > ND_rank(agtail(e))) { make_chain(g, agtail(e), aghead(e), e); prev = e; continue; } /* backward edges */ else { /*other_edge(e); */ /* avoid when opp==e in undirected graph */ if ((opp = (agedge(g,aghead(e),agtail(e),null,false)))!=null && NEQ(aghead(opp), aghead(e))) { /* shadows a forward edge */ if (ED_to_virt(opp) == null) make_chain(g, agtail(opp), aghead(opp), opp); if ((ED_label(e) == null) && (ED_label(opp) == null) && ports_eq(e, opp)) { if (Z.z().Concentrate) { ED_edge_type(e, 6); ED_conc_opp_flag(opp, NOT(false)); } else { /* see above. this is getting out of hand */ other_edge(e); merge_chain(g, e, ED_to_virt(opp), NOT(false)); } continue; } } make_chain(g, aghead(e), agtail(e), e); prev = e; } } } /* since decompose() is not called on subgraphs */ if (NEQ(g, dot_root(g))) { GD_comp(g).reallocEmpty(1, Agnode_s.class); GD_comp(g).setInList(0, GD_nlist(g)); } } finally { LEAVING("d0bxlkysxucmww7t74u9krrgz","class2"); } } } plantuml-1.2017.15/src/gen/lib/dotgen/cluster__c.java000066400000000000000000001153071312650303100222400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static gen.lib.cgraph.edge__c.agfstedge; import static gen.lib.cgraph.edge__c.agfstout; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agnxtedge; import static gen.lib.cgraph.edge__c.agnxtout; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.cgraph.node__c.agfstnode; import static gen.lib.cgraph.node__c.agnxtnode; import static gen.lib.cgraph.obj__c.agcontains; import static gen.lib.cgraph.obj__c.agroot; import static gen.lib.common.memory__c.zmalloc; import static gen.lib.common.utils__c.UF_setname; import static gen.lib.common.utils__c.UF_singleton; import static gen.lib.dotgen.class2__c.class2; import static gen.lib.dotgen.class2__c.mergeable; import static gen.lib.dotgen.dotinit__c.dot_root; import static gen.lib.dotgen.fastgr__c.delete_fast_edge; import static gen.lib.dotgen.fastgr__c.delete_fast_node; import static gen.lib.dotgen.fastgr__c.fast_node; import static gen.lib.dotgen.fastgr__c.find_fast_edge; import static gen.lib.dotgen.fastgr__c.find_flat_edge; import static gen.lib.dotgen.fastgr__c.flat_edge; import static gen.lib.dotgen.fastgr__c.merge_oneway; import static gen.lib.dotgen.fastgr__c.other_edge; import static gen.lib.dotgen.fastgr__c.virtual_edge; import static gen.lib.dotgen.fastgr__c.virtual_node; import static gen.lib.dotgen.mincross__c.allocate_ranks; import static gen.lib.dotgen.mincross__c.build_ranks; import static gen.lib.dotgen.mincross__c.enqueue_neighbors; import static gen.lib.dotgen.mincross__c.install_in_rank; import static gen.lib.dotgen.position__c.ports_eq; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.sizeof_starstar_empty; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGMKOUT; import static smetana.core.Macro.ED_count; import static smetana.core.Macro.ED_edge_type; import static smetana.core.Macro.ED_to_virt; import static smetana.core.Macro.ED_xpenalty; import static smetana.core.Macro.GD_clust; import static smetana.core.Macro.GD_comp; import static smetana.core.Macro.GD_expanded; import static smetana.core.Macro.GD_installed; import static smetana.core.Macro.GD_leader; import static smetana.core.Macro.GD_maxrank; import static smetana.core.Macro.GD_minrank; import static smetana.core.Macro.GD_n_cluster; import static smetana.core.Macro.GD_n_nodes; import static smetana.core.Macro.GD_nlist; import static smetana.core.Macro.GD_rank; import static smetana.core.Macro.GD_rankleader; import static smetana.core.Macro.ND_UF_size; import static smetana.core.Macro.ND_clust; import static smetana.core.Macro.ND_in; import static smetana.core.Macro.ND_lw; import static smetana.core.Macro.ND_node_type; import static smetana.core.Macro.ND_order; import static smetana.core.Macro.ND_out; import static smetana.core.Macro.ND_rank; import static smetana.core.Macro.ND_ranktype; import static smetana.core.Macro.ND_rw; import static smetana.core.Macro.NOT; import static smetana.core.Macro.UNSUPPORTED; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.boxf; import h.nodequeue; import h.pointf; import smetana.core.JUtils; import smetana.core.__ptr__; import smetana.core.__struct__; public class cluster__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8bd317q0mykfu6wpr3e4cxmh2 // static node_t* map_interclust_node(node_t * n) public static Agnode_s map_interclust_node(Agnode_s n) { ENTERING("8bd317q0mykfu6wpr3e4cxmh2","map_interclust_node"); try { Agnode_s rv; if ((ND_clust(n) == null) || ( GD_expanded(ND_clust(n))) ) rv = n; else rv = (Agnode_s) GD_rankleader(ND_clust(n)).plus(ND_rank(n)).getPtr(); return rv; } finally { LEAVING("8bd317q0mykfu6wpr3e4cxmh2","map_interclust_node"); } } //3 5ib4nnt2ah5fdd22zs0xds29r // static void make_slots(graph_t * root, int r, int pos, int d) public static void make_slots(Agraph_s root, int r, int pos, int d) { ENTERING("5ib4nnt2ah5fdd22zs0xds29r","make_slots"); try { int i; Agnode_s v; __ptr__ vlist; vlist = GD_rank(root).plus(r).getPtr().getArrayOfPtr("v").asPtr(); if (d <= 0) { for (i = pos - d + 1; i < GD_rank(root).plus(r).getInt("n"); i++) { v = (Agnode_s) vlist.plus(i).getPtr(); ND_order(v, i + d - 1); vlist.plus(ND_order(v)).setPtr(v); } for (i = GD_rank(root).plus(r).getInt("n") + d - 1; i < GD_rank(root).plus(r).getInt("n"); i++) vlist.plus(i).setPtr(null); } else { /*assert(ND_rank(root)[r].n + d - 1 <= ND_rank(root)[r].an);*/ for (i = GD_rank(root).plus(r).getPtr().getInt("n") - 1; i > pos; i--) { v = (Agnode_s) vlist.plus(i).getPtr(); ND_order(v, i + d - 1); vlist.plus(ND_order(v)).setPtr(v); } for (i = pos + 1; i < pos + d; i++) vlist.plus(i).setPtr(null); } GD_rank(root).plus(r).getPtr().setInt("n", GD_rank(root).plus(r).getPtr().getInt("n") + d - 1); } finally { LEAVING("5ib4nnt2ah5fdd22zs0xds29r","make_slots"); } } //3 d4mwxesl56uh9dyttg9cjlq70 // static node_t* clone_vn(graph_t * g, node_t * vn) public static Agnode_s clone_vn(Agraph_s g, Agnode_s vn) { ENTERING("d4mwxesl56uh9dyttg9cjlq70","clone_vn"); try { Agnode_s rv; int r; r = ND_rank(vn); make_slots(g, r, ND_order(vn), 2); rv = virtual_node(g); ND_lw(rv, ND_lw(vn)); ND_rw(rv, ND_rw(vn)); ND_rank(rv, ND_rank(vn)); UNSUPPORTED("adc0qfdhup29vh8qu1cwl5jgj"); // GD_rank(g)[r].v[ND_order(rv)] = rv; UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("d4mwxesl56uh9dyttg9cjlq70","clone_vn"); } } //3 6o86r59v2ujlxqcw7761y6o5b // static void map_path(node_t * from, node_t * to, edge_t * orig, edge_t * ve, int type) public static void map_path(Agnode_s from, Agnode_s to, Agedge_s orig, Agedge_s ve, int type) { ENTERING("6o86r59v2ujlxqcw7761y6o5b","map_path"); try { int r; Agnode_s u, v; Agedge_s e; assert(ND_rank(from) < ND_rank(to)); if (EQ(agtail(ve), from) && EQ(aghead(ve), to)) return; if (ED_count(ve) > 1) { ED_to_virt(orig, null); if (ND_rank(to) - ND_rank(from) == 1) { if ((e = find_fast_edge(from, to))!=null && (ports_eq(orig, e))) { merge_oneway(orig, e); if ((ND_node_type(from) == 0) && (ND_node_type(to) == 0)) other_edge(orig); return; } } u = from; for (r = ND_rank(from); r < ND_rank(to); r++) { if (r < ND_rank(to) - 1) v = clone_vn(dot_root(from), aghead(ve)); else v = to; e = virtual_edge(u, v, orig); ED_edge_type(e, type); u = v; ED_count(ve, ED_count(ve) - 1); ve = (Agedge_s) ND_out(aghead(ve)).getFromList(0); } } else { if (ND_rank(to) - ND_rank(from) == 1) { if ((ve = find_fast_edge(from, to))!=null && (ports_eq(orig, ve))) { /*ED_to_orig(ve) = orig; */ ED_to_virt(orig, ve); ED_edge_type(ve, type); ED_count(ve, ED_count(ve)+1); if ((ND_node_type(from) == 0) && (ND_node_type(to) == 0)) other_edge(orig); } else { ED_to_virt(orig, null); ve = virtual_edge(from, to, orig); ED_edge_type(ve, type); } } if (ND_rank(to) - ND_rank(from) > 1) { e = ve; if (NEQ(agtail(ve), from)) { ED_to_virt(orig, null); e = virtual_edge(from, aghead(ve), orig); ED_to_virt(orig, e); delete_fast_edge(ve); } else e = ve; while (ND_rank(aghead(e)) != ND_rank(to)) e = (Agedge_s) ND_out(aghead(e)).getFromList(0); if (NEQ(aghead(e), to)) { ve = e; e = virtual_edge(agtail(e), to, orig); ED_edge_type(e, type); delete_fast_edge(ve); } } } } finally { LEAVING("6o86r59v2ujlxqcw7761y6o5b","map_path"); } } //3 69xbflgja0gvrsl5xcv7o7dia // static void make_interclust_chain(graph_t * g, node_t * from, node_t * to, edge_t * orig) public static void make_interclust_chain(Agraph_s g, Agnode_s from, Agnode_s to, Agedge_s orig) { ENTERING("69xbflgja0gvrsl5xcv7o7dia","make_interclust_chain"); try { int newtype; Agnode_s u, v; u = map_interclust_node(from); v = map_interclust_node(to); if (EQ(u, from) && EQ(v, to)) newtype = 1; else newtype = 5; map_path(u, v, orig, ED_to_virt(orig), newtype); } finally { LEAVING("69xbflgja0gvrsl5xcv7o7dia","make_interclust_chain"); } } //3 6g2m2y44x66lajznvnon2gubv // void interclexp(graph_t * subg) public static void interclexp(Agraph_s subg) { ENTERING("6g2m2y44x66lajznvnon2gubv","interclexp"); try { Agraph_s g; Agnode_s n; Agedge_s e, prev, next; g = dot_root(subg); for (n = agfstnode(subg); n!=null; n = agnxtnode(subg, n)) { /* N.B. n may be in a sub-cluster of subg */ prev = null; for (e = agfstedge(g, n); e!=null; e = next) { next = agnxtedge(g, e, n); if (agcontains(subg, e)) continue; /* canonicalize edge */ e = AGMKOUT(e); /* short/flat multi edges */ if (mergeable(prev, e)) { if (ND_rank(agtail(e)) == ND_rank(aghead(e))) ED_to_virt(e, prev); else ED_to_virt(e, null); if (ED_to_virt(prev) == null) continue; /* internal edge */ UNSUPPORTED("8d5mw7m9lzlseqbyx8a8mncgs"); // merge_chain(subg, e, ED_to_virt(prev), 0); UNSUPPORTED("87mmnlsj8quzlzg0vxax15kt2"); // safe_other_edge(e); UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; } /* flat edges */ if (ND_rank(agtail(e)) == ND_rank(aghead(e))) { Agedge_s fe; if ((fe = find_flat_edge(agtail(e), aghead(e))) == null) { flat_edge(g, e); prev = e; } else if (NEQ(e, fe)) { UNSUPPORTED("ckfinb4h4twp1ry02y9peyhz"); // safe_other_edge(e); UNSUPPORTED("dg3e0udctqa7xtfynplc7wdpj"); // if (!ED_to_virt(e)) merge_oneway(e, fe); } continue; } /* forward edges */ if (ND_rank(aghead(e)) > ND_rank(agtail(e))) { make_interclust_chain(g, agtail(e), aghead(e), e); prev = e; continue; } /* backward edges */ else { /* I think that make_interclust_chain should create call other_edge(e) anyway if (agcontains(subg,agtail(e)) && agfindedge(g,aghead(e),agtail(e))) other_edge(e); */ make_interclust_chain(g, aghead(e), agtail(e), e); prev = e; } } } } finally { LEAVING("6g2m2y44x66lajznvnon2gubv","interclexp"); } } //3 85nhs7tnmwunw0fsjj1kxao7l // static void merge_ranks(graph_t * subg) public static void merge_ranks(Agraph_s subg) { ENTERING("85nhs7tnmwunw0fsjj1kxao7l","merge_ranks"); try { int i, d, r, pos, ipos; Agnode_s v; Agraph_s root; root = dot_root(subg); if (GD_minrank(subg) > 0) GD_rank(root).plus(GD_minrank(subg) - 1).getPtr().setInt("valid", 0); for (r = GD_minrank(subg); r <= GD_maxrank(subg); r++) { d = GD_rank(subg).plus(r).getPtr().getInt("n"); ipos = pos = ND_order(GD_rankleader(subg).plus(r).getPtr()); make_slots(root, r, pos, d); for (i = 0; i < GD_rank(subg).plus(r).getPtr().getInt("n"); i++) { v = (Agnode_s) GD_rank(subg).plus(r).getArrayOfPtr("v").plus(i).getPtr(); GD_rank(root).plus(r).getArrayOfPtr("v").plus(pos).setPtr(v); ND_order(v, pos++); /* real nodes automatically have v->root = root graph */ if (ND_node_type(v) == 1) v.setPtr("root", agroot(root)); delete_fast_node(subg, v); fast_node(root, v); GD_n_nodes(root, GD_n_nodes(root)+1); } GD_rank(subg).plus(r).getPtr().setPtr("v", GD_rank(root).plus(r).getPtr().getPtr("v").plus(ipos)); GD_rank(root).plus(r).getPtr().setInt("valid", 0); } if (r < GD_maxrank(root)) GD_rank(root).plus(r).getPtr().setInt("valid", 0); GD_expanded(subg, NOT(false)); } finally { LEAVING("85nhs7tnmwunw0fsjj1kxao7l","merge_ranks"); } } //3 c9p7dm16i13qktnh95os0sv58 // static void remove_rankleaders(graph_t * g) public static void remove_rankleaders(Agraph_s g) { ENTERING("c9p7dm16i13qktnh95os0sv58","remove_rankleaders"); try { int r; Agnode_s v; Agedge_s e; for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { v = (Agnode_s) GD_rankleader(g).plus(r).getPtr(); /* remove the entire chain */ while ((e = (Agedge_s) ND_out(v).getFromList(0))!=null) delete_fast_edge(e); while ((e = (Agedge_s) ND_in(v).getFromList(0))!=null) delete_fast_edge(e); delete_fast_node(dot_root(g), v); GD_rankleader(g).plus(r).setPtr(null); } } finally { LEAVING("c9p7dm16i13qktnh95os0sv58","remove_rankleaders"); } } //3 ecrplg8hsyl484f9kxc5xp0go // void expand_cluster(graph_t * subg) public static void expand_cluster(Agraph_s subg) { ENTERING("ecrplg8hsyl484f9kxc5xp0go","expand_cluster"); try { /* build internal structure of the cluster */ class2(subg); GD_comp(subg).size = 1; // GD_comp(subg).getArrayOfPtr("list").plus(0).setPtr(GD_nlist(subg)); GD_comp(subg).setInList(0, GD_nlist(subg)); allocate_ranks(subg); build_ranks(subg, 0); merge_ranks(subg); /* build external structure of the cluster */ interclexp(subg); remove_rankleaders(subg); } finally { LEAVING("ecrplg8hsyl484f9kxc5xp0go","expand_cluster"); } } //3 cxuirggihlap2iv2khmb1w5l5 // void mark_clusters(graph_t * g) public static void mark_clusters(Agraph_s g) { ENTERING("cxuirggihlap2iv2khmb1w5l5","mark_clusters"); try { int c; Agnode_s n, nn=null, vn; Agedge_s orig, e; Agraph_s clust; /* remove sub-clusters below this level */ for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) { if (ND_ranktype(n) == 7) UF_singleton(n); ND_clust(n, null); } for (c = 1; c <= GD_n_cluster(g); c++) { clust = (Agraph_s) GD_clust(g).plus(c).getPtr(); for (n = agfstnode(clust); n!=null; n = nn) { nn = agnxtnode(clust,n); if (ND_ranktype(n) != 0) { UNSUPPORTED("5l8jenkv77ax02t47zzxyv1k0"); // agerr(AGWARN, UNSUPPORTED("2ipl4umxgijawr7756ysp9hhd"); // "%s was already in a rankset, deleted from cluster %s\n", UNSUPPORTED("7r0ulsiau9cygesawzzjnpt5j"); // agnameof(n), agnameof(g)); UNSUPPORTED("4zqc8357rwnd9xe7zaoqooqv3"); // agdelete(clust,n); UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; } UF_setname(n, GD_leader(clust)); ND_clust(n, clust); ND_ranktype(n, 7); /* here we mark the vnodes of edges in the cluster */ for (orig = agfstout(clust, n); orig!=null; orig = agnxtout(clust, orig)) { if ((e = ED_to_virt(orig))!=null) { while (e!=null && ND_node_type(vn =aghead(e)) == 1) { ND_clust(vn, clust); e = (Agedge_s) ND_out(aghead(e)).getFromList(0); /* trouble if concentrators and clusters are mixed */ } } } } } } finally { LEAVING("cxuirggihlap2iv2khmb1w5l5","mark_clusters"); } } //3 bwrw5u0gi2rgah1cn9h0glpse // void build_skeleton(graph_t * g, graph_t * subg) public static void build_skeleton(Agraph_s g, Agraph_s subg) { ENTERING("bwrw5u0gi2rgah1cn9h0glpse","build_skeleton"); try { int r; Agnode_s v, prev, rl; Agedge_s e; prev = null; GD_rankleader(subg, zmalloc(sizeof_starstar_empty(Agnode_s.class, GD_maxrank(subg) + 2))); for (r = GD_minrank(subg); r <= GD_maxrank(subg); r++) { v = virtual_node(g); GD_rankleader(subg).plus(r).setPtr(v); ND_rank(v, r); ND_ranktype(v, 7); ND_clust(v, subg); if (prev!=null) { e = virtual_edge(prev, v, null); ED_xpenalty(e, ED_xpenalty(e) * 1000); } prev = v; } /* set the counts on virtual edges of the cluster skeleton */ for (v = agfstnode(subg); v!=null; v = agnxtnode(subg, v)) { rl = (Agnode_s) GD_rankleader(subg).plus(ND_rank(v)).getPtr(); ND_UF_size(rl, ND_UF_size(rl)+1); for (e = agfstout(subg, v); e!=null; e = agnxtout(subg, e)) { for (r = ND_rank(agtail(e)); r < ND_rank(aghead(e)); r++) { ED_count(ND_out(rl).getFromList(0), ED_count(ND_out(rl).getFromList(0))+1); } } } for (r = GD_minrank(subg); r <= GD_maxrank(subg); r++) { rl = (Agnode_s) GD_rankleader(subg).plus(r).getPtr(); if (ND_UF_size(rl) > 1) ND_UF_size(rl, ND_UF_size(rl)-1); } } finally { LEAVING("bwrw5u0gi2rgah1cn9h0glpse","build_skeleton"); } } //3 75yt3xwcwnxipi827t1r8zcmn // void install_cluster(graph_t * g, node_t * n, int pass, nodequeue * q) public static void install_cluster(Agraph_s g, Agnode_s n, int pass, nodequeue q) { ENTERING("75yt3xwcwnxipi827t1r8zcmn","install_cluster"); try { int r; Agraph_s clust; clust = ND_clust(n); if (GD_installed(clust) != pass + 1) { for (r = GD_minrank(clust); r <= GD_maxrank(clust); r++) install_in_rank(g, (Agnode_s) GD_rankleader(clust).plus(r).getPtr()); for (r = GD_minrank(clust); r <= GD_maxrank(clust); r++) enqueue_neighbors(q, (Agnode_s) GD_rankleader(clust).plus(r).getPtr(), pass); GD_installed(clust, pass + 1); } } finally { LEAVING("75yt3xwcwnxipi827t1r8zcmn","install_cluster"); } } //3 4muksvb3ec03mt6cvaqpb5c7a // void mark_lowclusters(Agraph_t * root) public static void mark_lowclusters(Agraph_s root) { ENTERING("4muksvb3ec03mt6cvaqpb5c7a","mark_lowclusters"); try { Agnode_s n, vn; Agedge_s orig, e; /* first, zap any previous cluster labelings */ for (n = agfstnode(root); n!=null; n = agnxtnode(root, n)) { ND_clust(n, null); for (orig = agfstout(root, n); orig!=null; orig = agnxtout(root, orig)) { if ((e = ED_to_virt(orig))!=null) { while (e!=null && (ND_node_type(vn = aghead(e))) == 1) { ND_clust(vn, null); e = (Agedge_s) ND_out(aghead(e)).getFromList(0); } } } } /* do the recursion */ mark_lowcluster_basic(root); } finally { LEAVING("4muksvb3ec03mt6cvaqpb5c7a","mark_lowclusters"); } } //3 48j6fdymvkcgeh4wde060ctac // static void mark_lowcluster_basic(Agraph_t * g) public static void mark_lowcluster_basic(Agraph_s g) { ENTERING("48j6fdymvkcgeh4wde060ctac","mark_lowcluster_basic"); try { Agraph_s clust; Agnode_s n, vn; Agedge_s orig, e; int c; for (c = 1; c <= GD_n_cluster(g); c++) { clust = (Agraph_s) GD_clust(g).plus(c).getPtr(); mark_lowcluster_basic(clust); } /* see what belongs to this graph that wasn't already marked */ for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) { if (ND_clust(n) == null) ND_clust(n, g); for (orig = agfstout(g, n); orig!=null; orig = agnxtout(g, orig)) { if ((e = ED_to_virt(orig))!=null) { while (e!=null && (ND_node_type(vn = aghead(e))) == 1) { if (ND_clust(vn) == null) ND_clust(vn, g); e = (Agedge_s) ND_out(aghead(e)).getFromList(0); } } } } } finally { LEAVING("48j6fdymvkcgeh4wde060ctac","mark_lowcluster_basic"); } } } plantuml-1.2017.15/src/gen/lib/dotgen/compound__c.java000066400000000000000000001431601312650303100224010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class compound__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 389gsvrjy9cfa7ie5c9sr5rvi // static char *pf2s(pointf p, char *buf) public static Object pf2s(Object... arg) { UNSUPPORTED("d7e1ecldlwckmebycqwdif5qi"); // static char *pf2s(pointf p, char *buf) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9nq1kahe848q44s51s8b249jw"); // sprintf(buf, "(%.5g,%.5g)", p.x, p.y); UNSUPPORTED("5jfpogdyby101eyuw2dhtb5cg"); // return buf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aaeedfeqjstij7teh2arwur0s // static pointf boxIntersectf(pointf pp, pointf cp, boxf * bp) public static Object boxIntersectf(Object... arg) { UNSUPPORTED("9lbfcrf6tg3qq2hoi74tj6jil"); // static pointf boxIntersectf(pointf pp, pointf cp, boxf * bp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e7e629d656z5m5408o06swiy3"); // pointf ipp; UNSUPPORTED("77e5d834qbjgxa5m8msxj0b22"); // double ppx = pp.x; UNSUPPORTED("5zf0pogb3f4f5faatrew5itus"); // double ppy = pp.y; UNSUPPORTED("etdvp5w4bmvc3hfjv6xsbqhgl"); // double cpx = cp.x; UNSUPPORTED("dzvbcgu397soy9gv5p7bqez7e"); // double cpy = cp.y; UNSUPPORTED("dzq83vvwl259k7394rpz3ahw4"); // pointf ll; UNSUPPORTED("1ilrhzyqh05f2u3j3vzg0ys8u"); // pointf ur; UNSUPPORTED("82ter8mdp5dwyq284t271kkq2"); // ll = bp->LL; UNSUPPORTED("cjf1mmtyv7enn9aid7eveqj3m"); // ur = bp->UR; UNSUPPORTED("hrb7x7coec3ls1f3tbzbv1i4"); // if (cp.x < ll.x) { UNSUPPORTED("bz02pree35ok6h7ne2b9078gr"); // ipp.x = ll.x; UNSUPPORTED("79t0kzkjgtsgnwjzk2423w61c"); // ipp.y = pp.y + (int) ((ipp.x - ppx) * (ppy - cpy) / (ppx - cpx)); UNSUPPORTED("5zwh31a86akovenbej0w7yjlq"); // if (ipp.y >= ll.y && ipp.y <= ur.y) UNSUPPORTED("6klahfi7ib1my989uyt3r3fns"); // return ipp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("92dqlio3tyb7oqz8rrk4u1i39"); // if (cp.x > ur.x) { UNSUPPORTED("ct5wv2h1epcow92rfyyuvo9x8"); // ipp.x = ur.x; UNSUPPORTED("79t0kzkjgtsgnwjzk2423w61c"); // ipp.y = pp.y + (int) ((ipp.x - ppx) * (ppy - cpy) / (ppx - cpx)); UNSUPPORTED("5zwh31a86akovenbej0w7yjlq"); // if (ipp.y >= ll.y && ipp.y <= ur.y) UNSUPPORTED("6klahfi7ib1my989uyt3r3fns"); // return ipp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("d1vpfkzy4othi356ddvouf1du"); // if (cp.y < ll.y) { UNSUPPORTED("645jp0y7ad6zmpqv1ujuwv7d2"); // ipp.y = ll.y; UNSUPPORTED("6xy4qjwbmyv2lmoecg9lz44m1"); // ipp.x = pp.x + (int) ((ipp.y - ppy) * (ppx - cpx) / (ppy - cpy)); UNSUPPORTED("6or7iqvva2wcjp65woe9ywn9j"); // if (ipp.x >= ll.x && ipp.x <= ur.x) UNSUPPORTED("6klahfi7ib1my989uyt3r3fns"); // return ipp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("22uv9kfz9ohd3u69nktr9fsko"); // if (cp.y > ur.y) { UNSUPPORTED("7fbze74dhzwnj80vwncttjoza"); // ipp.y = ur.y; UNSUPPORTED("6xy4qjwbmyv2lmoecg9lz44m1"); // ipp.x = pp.x + (int) ((ipp.y - ppy) * (ppx - cpx) / (ppy - cpy)); UNSUPPORTED("6or7iqvva2wcjp65woe9ywn9j"); // if (ipp.x >= ll.x && ipp.x <= ur.x) UNSUPPORTED("6klahfi7ib1my989uyt3r3fns"); // return ipp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2brtdhuqnq3wbu0y4vha1lxe1"); // /* failure */ UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("8lid84pwtuybl3mg15z7f9v8n"); // char ppbuf[100], cpbuf[100], llbuf[100], urbuf[100]; UNSUPPORTED("8utponegpfhxi3ifoaet3w22u"); // agerr(AGERR, UNSUPPORTED("4e7yhbghqnz3l8o03xenxz6qk"); // "segment [%s,%s] does not intersect box ll=%s,ur=%s\n", UNSUPPORTED("a7epvdx0qf9ql74dqkbz43vak"); // pf2s(pp, ppbuf), pf2s(cp, cpbuf), UNSUPPORTED("e9otl0bm92qbvbxwfd4euftxb"); // pf2s(ll, llbuf), pf2s(ur, urbuf)); UNSUPPORTED("2g1czwq8qs1hp7515i11qbn75"); // assert(0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2eteshlf6etzhvieru9a3d7hl"); // return ipp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cdgb9eokkhoxckam633l1qm6t // static int inBoxf(pointf p, boxf * bb) public static Object inBoxf(Object... arg) { UNSUPPORTED("18frdpfl5gpq5be170xxu7ypk"); // static int inBoxf(pointf p, boxf * bb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("62grwq3ychthd06kd0dma6nl4"); // return INSIDE(p, *bb); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7i49mbvuj9tvhyjtdrhyomfd2 // static graph_t *getCluster(graph_t * g, char *cluster_name, Dt_t* map) public static Object getCluster(Object... arg) { UNSUPPORTED("b3i6y8ykkxx0imig66aitm32p"); // static graph_t *getCluster(graph_t * g, char *cluster_name, Dt_t* map) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a9vu6hocyi7htsqyh6phlzeil"); // Agraph_t* sg; UNSUPPORTED("bdri6gk80s45bza4efp7hp3io"); // if (!cluster_name || (*cluster_name == '\0')) UNSUPPORTED("11hwqop4xebvtcskop4uhpp01"); // return NULL; UNSUPPORTED("e7qf9buhacu05os7k2mmh66cv"); // sg = findCluster (map, cluster_name); UNSUPPORTED("2cbce9349ulperyph2yxmob79"); // if (sg == NULL) { UNSUPPORTED("d4c9bmlrq8gy5z6b7aj0hh95m"); // agerr(AGWARN, "cluster named %s not found\n", cluster_name); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1jw141gg4omv8r72xcbl5ln0o"); // return sg; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1shblnlks0zlz7s6h6l9az96k // static int countVertCross(pointf * pts, double xcoord) public static Object countVertCross(Object... arg) { UNSUPPORTED("3fh5r6lqrzpzitfo6fg3mbhr9"); // static int countVertCross(pointf * pts, double xcoord) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("84e683m9cp16ljzwmonvu6h5o"); // int sign, old_sign; UNSUPPORTED("3m0xdv3clh5kt5r24q2nq8qy3"); // int num_crossings = 0; UNSUPPORTED("anrpp1ijmhz0zvudygqnuhuxg"); // sign = CMP(pts[0].x, xcoord); UNSUPPORTED("cn59uvgfsp852xd4juwg253ab"); // if (sign == 0) UNSUPPORTED("31x1ju7msb5pxljz8c9cdfxi2"); // num_crossings++; UNSUPPORTED("46jnsuhm7tq2klfsjamf7jrpa"); // for (i = 1; i <= 3; i++) { UNSUPPORTED("863qxcme12wfzx1clw4ehqelq"); // old_sign = sign; UNSUPPORTED("pfykk7uimn1p9y4mh0gs58ft"); // sign = CMP(pts[i].x, xcoord); UNSUPPORTED("34hhymaa1fodp7eoxwo7qev6v"); // if ((sign != old_sign) && (old_sign != 0)) UNSUPPORTED("dsc9eps2jqbca8n4oaud2b223"); // num_crossings++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ahpb1md0lwtdwqxgalm3b4rqa"); // return num_crossings; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 65jkpfhzlwld3rg4ggrojwo0t // static int countHorzCross(pointf * pts, double ycoord) public static Object countHorzCross(Object... arg) { UNSUPPORTED("de9l7dbf21io84d7j6fr2g2bk"); // static int countHorzCross(pointf * pts, double ycoord) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("84e683m9cp16ljzwmonvu6h5o"); // int sign, old_sign; UNSUPPORTED("3m0xdv3clh5kt5r24q2nq8qy3"); // int num_crossings = 0; UNSUPPORTED("1jpgvdmmizse7xc7bwhb6fowk"); // sign = CMP(pts[0].y, ycoord); UNSUPPORTED("cn59uvgfsp852xd4juwg253ab"); // if (sign == 0) UNSUPPORTED("31x1ju7msb5pxljz8c9cdfxi2"); // num_crossings++; UNSUPPORTED("46jnsuhm7tq2klfsjamf7jrpa"); // for (i = 1; i <= 3; i++) { UNSUPPORTED("863qxcme12wfzx1clw4ehqelq"); // old_sign = sign; UNSUPPORTED("e1b5xplhock9z22bd4pd2dqlq"); // sign = CMP(pts[i].y, ycoord); UNSUPPORTED("34hhymaa1fodp7eoxwo7qev6v"); // if ((sign != old_sign) && (old_sign != 0)) UNSUPPORTED("dsc9eps2jqbca8n4oaud2b223"); // num_crossings++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ahpb1md0lwtdwqxgalm3b4rqa"); // return num_crossings; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aih397ad5qkovyx9x0wr21h54 // static double findVertical(pointf * pts, double tmin, double tmax, double xcoord, double ymin, double ymax) public static Object findVertical(Object... arg) { UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double UNSUPPORTED("85kaoubr5lh52fmxz21tc0c1j"); // findVertical(pointf * pts, double tmin, double tmax, UNSUPPORTED("6qy8dlo2xl5uszko7s7dlvxw7"); // double xcoord, double ymin, double ymax) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("15equnrdjvp7z6hnykwsq855q"); // pointf Left[4]; UNSUPPORTED("czk4lot3uqdf06o5ws37gsxwv"); // pointf Right[4]; UNSUPPORTED("6wfj8onzmd4ihhh62dqfmqpbx"); // double t; UNSUPPORTED("78xh7rd4kkol7tca0ou5rsl2l"); // int no_cross = countVertCross(pts, xcoord); UNSUPPORTED("d7u308dr2xy07ijwz1hdhhmfx"); // if (no_cross == 0) UNSUPPORTED("6etr2h2322v9ragqutm759yas"); // return -1.0; UNSUPPORTED("ad9m8nxf0mcmhf2djox688ldn"); // /* if 1 crossing and on the line x == xcoord (within 1 point) */ UNSUPPORTED("4acg9xblgk4ucgodvaih6xrxj"); // if ((no_cross == 1) && (ROUND(pts[3].x) == ROUND(xcoord))) { UNSUPPORTED("bf7x4u2r8ux51e40gclwa1a1a"); // if ((ymin <= pts[3].y) && (pts[3].y <= ymax)) { UNSUPPORTED("bygqzclvo91ia8pdfxgwt277e"); // return tmax; UNSUPPORTED("6to1esmb8qfrhzgtr7jdqleja"); // } else UNSUPPORTED("ap55zco1042e8hct3w86akeke"); // return -1.0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9d4ocidcx0valemm3vzi00avm"); // /* split the Bezier into halves, trying the first half first. */ UNSUPPORTED("605jhx0qvq7rusredvjldyy4c"); // Bezier(pts, 3, 0.5, Left, Right); UNSUPPORTED("6cwj26bp1l7s2las5a7m77tku"); // t = findVertical(Left, tmin, (tmin + tmax) / 2.0, xcoord, ymin, ymax); UNSUPPORTED("1j0wovs9fkx43ukygc0u69s5g"); // if (t >= 0.0) UNSUPPORTED("d78ai9c2o2d3q4femq5es1anw"); // return t; UNSUPPORTED("9d6bwwzbxp9fm5m208jh9i8vu"); // return findVertical(Right, (tmin + tmax) / 2.0, tmax, xcoord, ymin, UNSUPPORTED("cd6vwnucsms9wzpeqb5nxh0ky"); // ymax); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ekvbbd4zvuxrho7sitbt8ql7s // static double findHorizontal(pointf * pts, double tmin, double tmax, double ycoord, double xmin, double xmax) public static Object findHorizontal(Object... arg) { UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double UNSUPPORTED("78h62jx38l5t5fm5l5pcmhbsf"); // findHorizontal(pointf * pts, double tmin, double tmax, UNSUPPORTED("710x71u5311vcqfimkbvzi83a"); // double ycoord, double xmin, double xmax) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("15equnrdjvp7z6hnykwsq855q"); // pointf Left[4]; UNSUPPORTED("czk4lot3uqdf06o5ws37gsxwv"); // pointf Right[4]; UNSUPPORTED("6wfj8onzmd4ihhh62dqfmqpbx"); // double t; UNSUPPORTED("4954qgan4jixgvt69g1ajjdpo"); // int no_cross = countHorzCross(pts, ycoord); UNSUPPORTED("d7u308dr2xy07ijwz1hdhhmfx"); // if (no_cross == 0) UNSUPPORTED("6etr2h2322v9ragqutm759yas"); // return -1.0; UNSUPPORTED("epscxk2oek6v8c25l06qg49ym"); // /* if 1 crossing and on the line y == ycoord (within 1 point) */ UNSUPPORTED("bwwz4x8fjy78hz5xaadjtuwte"); // if ((no_cross == 1) && (ROUND(pts[3].y) == ROUND(ycoord))) { UNSUPPORTED("8mh80lea0b69k078vehmxhy3"); // if ((xmin <= pts[3].x) && (pts[3].x <= xmax)) { UNSUPPORTED("bygqzclvo91ia8pdfxgwt277e"); // return tmax; UNSUPPORTED("6to1esmb8qfrhzgtr7jdqleja"); // } else UNSUPPORTED("ap55zco1042e8hct3w86akeke"); // return -1.0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9d4ocidcx0valemm3vzi00avm"); // /* split the Bezier into halves, trying the first half first. */ UNSUPPORTED("605jhx0qvq7rusredvjldyy4c"); // Bezier(pts, 3, 0.5, Left, Right); UNSUPPORTED("83enazrwlypz7ni9b8bftyxs3"); // t = findHorizontal(Left, tmin, (tmin + tmax) / 2.0, ycoord, xmin, UNSUPPORTED("669ctf1reahp9td1amg1zq5u"); // xmax); UNSUPPORTED("1j0wovs9fkx43ukygc0u69s5g"); // if (t >= 0.0) UNSUPPORTED("d78ai9c2o2d3q4femq5es1anw"); // return t; UNSUPPORTED("7yh5k9v3lj4qwcasd986zd88c"); // return findHorizontal(Right, (tmin + tmax) / 2.0, tmax, ycoord, xmin, UNSUPPORTED("qt8mgej4qnelxqtwoy8dt0jt"); // xmax); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 f35390txedsmk9p0bb7lc0glh // static int splineIntersectf(pointf * pts, boxf * bb) public static Object splineIntersectf(Object... arg) { UNSUPPORTED("5skcahu2z7i5of3rceeyk3dja"); // static int splineIntersectf(pointf * pts, boxf * bb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4x99qvp4a3bmbyxtp16ajfnsk"); // double tmin = 2.0; UNSUPPORTED("6wfj8onzmd4ihhh62dqfmqpbx"); // double t; UNSUPPORTED("9g866elzsedx9foz9yjhoiou1"); // pointf origpts[4]; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("a2n8aqfq0cqpx8elstmfn9oq6"); // for (i = 0; i < 4; i++) { UNSUPPORTED("4zou1qx7inlvcv0miqk04wcab"); // origpts[i] = pts[i]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6vm6zifwonvzwuelxtslbue2"); // t = findVertical(pts, 0.0, 1.0, bb->LL.x, bb->LL.y, bb->UR.y); UNSUPPORTED("9zvtsolyyf2ytpv8pj4a8n5iu"); // if ((t >= 0) && (t < tmin)) { UNSUPPORTED("8w1khrdoc5zw1yk6j1a8drqse"); // Bezier(origpts, 3, t, pts, NULL); UNSUPPORTED("5ml6bcuw1xgfn7f3dyox7iwrv"); // tmin = t; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("981p5dxcykkvx91604334lab3"); // t = findVertical(pts, 0.0, MIN(1.0, tmin), bb->UR.x, bb->LL.y, UNSUPPORTED("1of63c5vskctycz57r6s1aop5"); // bb->UR.y); UNSUPPORTED("9zvtsolyyf2ytpv8pj4a8n5iu"); // if ((t >= 0) && (t < tmin)) { UNSUPPORTED("8w1khrdoc5zw1yk6j1a8drqse"); // Bezier(origpts, 3, t, pts, NULL); UNSUPPORTED("5ml6bcuw1xgfn7f3dyox7iwrv"); // tmin = t; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7a2rh5vrty9usl73kwlat7axz"); // t = findHorizontal(pts, 0.0, MIN(1.0, tmin), bb->LL.y, bb->LL.x, UNSUPPORTED("de5psijf8qtaea4iaibltvfli"); // bb->UR.x); UNSUPPORTED("9zvtsolyyf2ytpv8pj4a8n5iu"); // if ((t >= 0) && (t < tmin)) { UNSUPPORTED("8w1khrdoc5zw1yk6j1a8drqse"); // Bezier(origpts, 3, t, pts, NULL); UNSUPPORTED("5ml6bcuw1xgfn7f3dyox7iwrv"); // tmin = t; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8j6y4x6maqneer7is54dvjrg8"); // t = findHorizontal(pts, 0.0, MIN(1.0, tmin), bb->UR.y, bb->LL.x, UNSUPPORTED("de5psijf8qtaea4iaibltvfli"); // bb->UR.x); UNSUPPORTED("9zvtsolyyf2ytpv8pj4a8n5iu"); // if ((t >= 0) && (t < tmin)) { UNSUPPORTED("8w1khrdoc5zw1yk6j1a8drqse"); // Bezier(origpts, 3, t, pts, NULL); UNSUPPORTED("5ml6bcuw1xgfn7f3dyox7iwrv"); // tmin = t; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5yrkc1uiqwozz2tsxyo3vpj6n"); // if (tmin < 2.0) { UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cqg91aue3soclnawequqcxspl // static void makeCompoundEdge(graph_t * g, edge_t * e, Dt_t* clustMap) public static Object makeCompoundEdge(Object... arg) { UNSUPPORTED("94ok4vzwibg79sh9bgw127ynj"); // static void makeCompoundEdge(graph_t * g, edge_t * e, Dt_t* clustMap) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("d8yeygt41ba5jbyj4rz2bs7jh"); // graph_t *lh; /* cluster containing head */ UNSUPPORTED("ckcdimdpkin3lhakg1rjgopmi"); // graph_t *lt; /* cluster containing tail */ UNSUPPORTED("em6swtpn9fdaqlt4w0ye5p7db"); // bezier *bez; /* original Bezier for e */ UNSUPPORTED("2nh8wbaihnp137k4pc9xuzwhg"); // bezier *nbez; /* new Bezier for e */ UNSUPPORTED("1tw709ct510b9s636x7nkqfkr"); // int starti = 0, endi = 0; /* index of first and last control point */ UNSUPPORTED("8i0kwb8r6a2sj6nuvcy3bg9rx"); // node_t *head; UNSUPPORTED("abn0n8lzvb24ju9mrqm4oqu8"); // node_t *tail; UNSUPPORTED("v5k4w91mrx94yjcdoytcu9oh"); // boxf *bb; UNSUPPORTED("dzpsknrwv8qkqq20hjnjpjn68"); // int i, j; UNSUPPORTED("cav0e7ncloqss0hsvc4fyfi7s"); // int size; UNSUPPORTED("d8sp6cfkpfyndzmid92shiq50"); // pointf pts[4]; UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("a1awknurkwnitpucodqwmcybo"); // int fixed; UNSUPPORTED("eg8l6bf528m9rxpz19s67zunk"); // /* find head and tail target clusters, if defined */ UNSUPPORTED("cv6tt9aup4gcbgqhx1nq22k1c"); // lh = getCluster(g, agget(e, "lhead"), clustMap); UNSUPPORTED("1c1flydze3375acsjsk9q3kp"); // lt = getCluster(g, agget(e, "ltail"), clustMap); UNSUPPORTED("c0uthnj5r46is8vqpjh6vftc8"); // if (!lt && !lh) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("7r9z58ji5z8h9c59lp0npnrgu"); // if (!ED_spl(e)) return; UNSUPPORTED("d5zyxsdhnmpgj9r2eeuoe24qd"); // /* at present, we only handle single spline case */ UNSUPPORTED("9y41ojbiongk0r6fdtq1my3t1"); // if (ED_spl(e)->size > 1) { UNSUPPORTED("2bykd7j98lcwoewshvpja61l3"); // agerr(AGWARN, "%s -> %s: spline size > 1 not supported\n", UNSUPPORTED("1wah0q9mwnexbe0myh4pe78ks"); // agnameof(agtail(e)), agnameof(aghead(e))); UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9zp3bsvuco9me48ea4fiy6acl"); // bez = ED_spl(e)->list; UNSUPPORTED("1mwkc047hik3rfvg9nirzx1eu"); // size = bez->size; UNSUPPORTED("9vcgvjkna4elv9mw682bcl1ry"); // head = aghead(e); UNSUPPORTED("6pl9v5iuk7ek5nv87env6rn8y"); // tail = agtail(e); UNSUPPORTED("ap2j55l6otqo1gbl6ltds9nwh"); // /* allocate new Bezier */ UNSUPPORTED("evus0s8ajoz1nr025560y72nt"); // nbez = (bezier*)gmalloc(sizeof(bezier)); UNSUPPORTED("ep4g00m6u2qqzjjpl5wv8pf68"); // nbez->eflag = bez->eflag; UNSUPPORTED("3f2ouh5001dudtknnvyd0d3k"); // nbez->sflag = bez->sflag; UNSUPPORTED("9puveeg1x9guxlasq00a4jkoy"); // /* if Bezier has four points, almost collinear, UNSUPPORTED("3j2z7u8v0esgm7xffel168hq7"); // * make line - unimplemented optimization? UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("gquyyp49r5koft7tvjy0s8rg"); // /* If head cluster defined, find first Bezier UNSUPPORTED("36p20hcsa21623tw4wu1oz2p6"); // * crossing head cluster, and truncate spline to UNSUPPORTED("9s9druwau7a95yt795beirpsq"); // * box edge. UNSUPPORTED("cn1atesybawh2axikezvwq87k"); // * Otherwise, leave end alone. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("7ub8yceaqsfpwhdiiln16imu8"); // fixed = 0; UNSUPPORTED("9pt4rploytevhgdsh2ccwqwa5"); // if (lh) { UNSUPPORTED("1epg8to10rb7b0uyumqk5by3d"); // bb = &(GD_bb(lh)); UNSUPPORTED("5kfib01to02c8vzno1s2ekcr6"); // if (!inBoxf(ND_coord(head), bb)) { UNSUPPORTED("dw7kdr12sq66xx2svd4s92czw"); // agerr(AGWARN, "%s -> %s: head not inside head cluster %s\n", UNSUPPORTED("4685lstw48yeb92f1qu3uf6ju"); // agnameof(agtail(e)), agnameof(aghead(e)), agget(e, "lhead")); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("3uodo3h9hth2y90nphjmbr0oz"); // /* If first control point is in bb, degenerate case. Spline UNSUPPORTED("48lbfpll26nek7srz6txj1ifd"); // * reduces to four points between the arrow head and the point UNSUPPORTED("bnhwhc0oclranqqrc084eqy25"); // * where the segment between the first control point and arrow head UNSUPPORTED("cqgsnvduolzsvf228s6bzu09z"); // * crosses box. UNSUPPORTED("20m1lc1moer8x00tx9ceto0iw"); // */ UNSUPPORTED("9pqsbiv3p2qq7o79wqbbz8l5n"); // if (inBoxf(bez->list[0], bb)) { UNSUPPORTED("9w1xj4pf7ycfdklkv9mztvayi"); // if (inBoxf(ND_coord(tail), bb)) { UNSUPPORTED("3f0u3cjz549lwgnkj0rlfv6rv"); // agerr(AGWARN, UNSUPPORTED("27beaae4u5f8m2rui7t930icj"); // "%s -> %s: tail is inside head cluster %s\n", UNSUPPORTED("5su0sbzvdwjhkfmbg8xivrf3y"); // agnameof(agtail(e)), agnameof(aghead(e)), agget(e, "lhead")); UNSUPPORTED("a47jqpic91ky93e1ohxv590l5"); // } else { UNSUPPORTED("ewwp403copbj6mdyqowm6q2s4"); // assert(bez->sflag); /* must be arrowhead on tail */ UNSUPPORTED("lp06fc3tmr8xux3w7kfnjg4r"); // p = boxIntersectf(bez->list[0], bez->sp, bb); UNSUPPORTED("ejtuxx5nuew10e08cnrbh9avq"); // bez->list[3] = p; UNSUPPORTED("7duperi3l69fplb736n7smpqf"); // bez->list[1] = mid_pointf(p, bez->sp); UNSUPPORTED("a4eh5xj2wrncqnmttmavzegdw"); // bez->list[0] = mid_pointf(bez->list[1], bez->sp); UNSUPPORTED("5dxkrve755ukj7tzac4ft5kee"); // bez->list[2] = mid_pointf(bez->list[1], p); UNSUPPORTED("59ne8fp4dumv8e2dt8nzlbwm9"); // if (bez->eflag) UNSUPPORTED("e0iax8us2lskwlp49snfuewo5"); // endi = arrowEndClip(e, bez->list, UNSUPPORTED("cblie3jhaa9y0orqcusd4rz3n"); // starti, 0, nbez, bez->eflag); UNSUPPORTED("dtvlepuobgzgt31wlwvahcuz6"); // endi += 3; UNSUPPORTED("b1vrskwl75muujmh6lvltym9p"); // fixed = 1; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("2sf4rxnj84i693qu8p8eeb0th"); // for (endi = 0; endi < size - 1; endi += 3) { UNSUPPORTED("3gsvjp9m9s9xkrldmovrxl86l"); // if (splineIntersectf(&(bez->list[endi]), bb)) UNSUPPORTED("a5064jph9xpw67dcun2my4mcm"); // break; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6v67nn2fkgve6sliwhhcjhlzy"); // if (endi == size - 1) { /* no intersection */ UNSUPPORTED("ne38tb76v74pens6v8pbfrbg"); // assert(bez->eflag); UNSUPPORTED("6zfsm93mmi2u1kkkh72v0p3ko"); // nbez->ep = boxIntersectf(bez->ep, bez->list[endi], bb); UNSUPPORTED("a47jqpic91ky93e1ohxv590l5"); // } else { UNSUPPORTED("59ne8fp4dumv8e2dt8nzlbwm9"); // if (bez->eflag) UNSUPPORTED("2931qkcakw4pmrkqfxkwz6c9w"); // endi = UNSUPPORTED("5m1xf54kia4xa3oh9pi0laqg2"); // arrowEndClip(e, bez->list, UNSUPPORTED("dif2h2k72i4vle08l8zt6g99d"); // starti, endi, nbez, bez->eflag); UNSUPPORTED("dtvlepuobgzgt31wlwvahcuz6"); // endi += 3; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("37cextn872jccni47tbuylnde"); // fixed = 1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b4l5v1tzcfyxswk474eyxoh7g"); // if (fixed == 0) { /* if no lh, or something went wrong, use original head */ UNSUPPORTED("5iaa7yro1fezven3pxpfgmxu4"); // endi = size - 1; UNSUPPORTED("a4jsfnfkjyk5zvhtmxz837cwk"); // if (bez->eflag) UNSUPPORTED("ardm696r3cpsbtf6losy2b016"); // nbez->ep = bez->ep; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ea4t41cqs5cu6h8oyl4vr26m2"); // /* If tail cluster defined, find last Bezier UNSUPPORTED("7p2mckkgkchxr6vhh6gezq8wz"); // * crossing tail cluster, and truncate spline to UNSUPPORTED("9s9druwau7a95yt795beirpsq"); // * box edge. UNSUPPORTED("cn1atesybawh2axikezvwq87k"); // * Otherwise, leave end alone. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("7ub8yceaqsfpwhdiiln16imu8"); // fixed = 0; UNSUPPORTED("5qu8oy18iv3lo7czvfxeoa9uf"); // if (lt) { UNSUPPORTED("pk4bun7t8spswxbvfqizndma"); // bb = &(GD_bb(lt)); UNSUPPORTED("5fdmhqx0gpmawrdmhes377bcj"); // if (!inBoxf(ND_coord(tail), bb)) { UNSUPPORTED("1m0jbxdni08pgm584b96t3rjx"); // agerr(AGWARN, "%s -> %s: tail not inside tail cluster %s\n", UNSUPPORTED("3s8r91i8l8gnx912jssz9qyeo"); // agnameof(agtail(e)), agnameof(aghead(e)), agget(e, "ltail")); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("1qjsjzvwnzg5em6iaq3reaswh"); // /* If last control point is in bb, degenerate case. Spline UNSUPPORTED("f2rlo65dpa2r245fl7q3a8uhm"); // * reduces to four points between arrow head, and the point UNSUPPORTED("c22xvluit87sy443q8y00uc4g"); // * where the segment between the last control point and the UNSUPPORTED("drage3192rqa7ifzj1p0rzr7b"); // * arrow head crosses box. UNSUPPORTED("20m1lc1moer8x00tx9ceto0iw"); // */ UNSUPPORTED("5xu4e03fqpef4n5pmrb5kau0d"); // if (inBoxf(bez->list[endi], bb)) { UNSUPPORTED("25cb9bqsfesb0faqthoggdumf"); // if (inBoxf(ND_coord(head), bb)) { UNSUPPORTED("3f0u3cjz549lwgnkj0rlfv6rv"); // agerr(AGWARN, UNSUPPORTED("5xfu8lqrs0caaz29aue2f4s21"); // "%s -> %s: head is inside tail cluster %s\n", UNSUPPORTED("f3g912itxolsegc77eg84cl5l"); // agnameof(agtail(e)), agnameof(aghead(e)), agget(e, "ltail")); UNSUPPORTED("a47jqpic91ky93e1ohxv590l5"); // } else { UNSUPPORTED("8f4spvkivd7okr9g59i6nwodq"); // assert(bez->eflag); /* must be arrowhead on head */ UNSUPPORTED("7f7fhm60xzneykhpsinmusktg"); // p = boxIntersectf(bez->list[endi], nbez->ep, bb); UNSUPPORTED("5sxlw9wg1evuruihg2pf20m2q"); // starti = endi - 3; UNSUPPORTED("469jcsvjasontlve9fx1oiprf"); // bez->list[starti] = p; UNSUPPORTED("cnpwuv23ryh1zxbij0n57992e"); // bez->list[starti + 2] = mid_pointf(p, nbez->ep); UNSUPPORTED("o7wu7segbiephyk1mn6ruzii"); // bez->list[starti + 3] = mid_pointf(bez->list[starti + 2], nbez->ep); UNSUPPORTED("1hq51ue6km9jd5khvilyiu8ba"); // bez->list[starti + 1] = mid_pointf(bez->list[starti + 2], p); UNSUPPORTED("f018p8s1pklqzeu862o8grqz3"); // if (bez->sflag) UNSUPPORTED("c9hvjpjpxposlztt4ykhchse4"); // starti = arrowStartClip(e, bez->list, starti, UNSUPPORTED("dbcocs457i5fpymvciq1id8sl"); // endi - 3, nbez, bez->sflag); UNSUPPORTED("b1vrskwl75muujmh6lvltym9p"); // fixed = 1; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("d2jlvy1nqfh80mgss1c39f01j"); // for (starti = endi; starti > 0; starti -= 3) { UNSUPPORTED("28srqjfv5l9fgucte4xcck1wf"); // for (i = 0; i < 4; i++) UNSUPPORTED("8c8hwyg5j3w5quof1ir68ns70"); // pts[i] = bez->list[starti - i]; UNSUPPORTED("4r5afy1ydhha880ua170puwym"); // if (splineIntersectf(pts, bb)) { UNSUPPORTED("ej309gi9fv5xlnkscibruakjp"); // for (i = 0; i < 4; i++) UNSUPPORTED("7i03k1aqcvrb8znb7097fyn48"); // bez->list[starti - i] = pts[i]; UNSUPPORTED("a5064jph9xpw67dcun2my4mcm"); // break; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("btve1tg4yf6dsbobp66rbktt7"); // if (starti == 0) { UNSUPPORTED("8n6t6jnfgooxt9ia0n2d9xj5a"); // assert(bez->sflag); UNSUPPORTED("9iea16dzn148ggj1yhec6nrv6"); // nbez->sp = UNSUPPORTED("3c8n4kr8984t1a8f2tvj7wgrr"); // boxIntersectf(bez->sp, bez->list[starti], bb); UNSUPPORTED("a47jqpic91ky93e1ohxv590l5"); // } else { UNSUPPORTED("5yn57nenv2uh775lo64evo8ma"); // starti -= 3; UNSUPPORTED("f018p8s1pklqzeu862o8grqz3"); // if (bez->sflag) UNSUPPORTED("c9hvjpjpxposlztt4ykhchse4"); // starti = arrowStartClip(e, bez->list, starti, UNSUPPORTED("dbcocs457i5fpymvciq1id8sl"); // endi - 3, nbez, bez->sflag); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("37cextn872jccni47tbuylnde"); // fixed = 1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7016d9urlsksnhs3cnhecjcda"); // if (fixed == 0) { /* if no lt, or something went wrong, use original tail */ UNSUPPORTED("eb2mhex2xw1imv1kk03mvjjou"); // /* Note: starti == 0 */ UNSUPPORTED("bid01qt9cg10ravykoxdnzxyk"); // if (bez->sflag) UNSUPPORTED("5r4ncqv0i1d4e42av5wd1enpg"); // nbez->sp = bez->sp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6npoy905gpw81hrxzbjbr2cfx"); // /* complete Bezier, free garbage and attach new Bezier to edge UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("5xonbkojra95eckls0aqmri36"); // nbez->size = endi - starti + 1; UNSUPPORTED("ahcr8abvd2jxjhobcfhctvs1b"); // nbez->list = (pointf*)gmalloc((nbez->size)*sizeof(pointf)); UNSUPPORTED("c9hwlt12y9khkl85dhudsnoji"); // for (i = 0, j = starti; i < nbez->size; i++, j++) UNSUPPORTED("bafoyknloit5d46b4iu8wll9p"); // nbez->list[i] = bez->list[j]; UNSUPPORTED("60fikjho2iwcxgrd8xetr09m6"); // free(bez->list); UNSUPPORTED("3qr0q84nc1rpnmowlbyiowg2z"); // free(bez); UNSUPPORTED("70byyll04ac6uqbdyb54i1gr"); // ED_spl(e)->list = nbez; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8dlmdg7jixgrpxke9pgbbnous // void dot_compoundEdges(graph_t * g) public static Object dot_compoundEdges(Object... arg) { UNSUPPORTED("7ugy3v610tnicjpszcs8fvlvb"); // void dot_compoundEdges(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("aice9tv6l0gls54iyk8147m5u"); // Dt_t* clustMap = mkClustMap (g); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("1urljgadk0bknazngl2w39evt"); // makeCompoundEdge(g, e, clustMap); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("11epc7udwyi67f5gszznmfwn8"); // dtclose(clustMap); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/dotgen/conc__c.java000066400000000000000000001120751312650303100215000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; import smetana.core.jmp_buf; public class conc__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 540u5gu9i0x1wzoxqqx5n2vwp // static jmp_buf jbuf private static jmp_buf jbuf = new jmp_buf(); //3 hiohl94lfxzfx1mjrwsqz37c // static boolean samedir(edge_t * e, edge_t * f) public static Object samedir(Object... arg) { UNSUPPORTED("29nu0bleg7r6obvwg17es3eva"); // static boolean samedir(edge_t * e, edge_t * f) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5prsmuiayujknpr12ysexceww"); // edge_t *e0, *f0; UNSUPPORTED("a87jx348k6dr2owi2ge2e9r86"); // for (e0 = e; ED_edge_type(e0) != 0; e0 = ED_to_orig(e0)); UNSUPPORTED("cws6ess4x4o5kp609fhzl087m"); // for (f0 = f; ED_edge_type(f0) != 0; f0 = ED_to_orig(f0)); UNSUPPORTED("ay9e2jfde73nguyfs214f5pif"); // if (ED_conc_opp_flag(e0)) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("3qs48pp09z881fbxjwqfm4u1r"); // if (ED_conc_opp_flag(f0)) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("5p8e0qmobo1inow3m2l1iis5t"); // return ((ND_rank(agtail(f0)) - ND_rank(aghead(f0))) UNSUPPORTED("6n93ns5ibdr64eugmmuj5rn02"); // * (ND_rank(agtail(e0)) - ND_rank(aghead(e0))) > 0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6pb0av8sjhmso4mrttaqsuv6h // static boolean downcandidate(node_t * v) public static Object downcandidate(Object... arg) { UNSUPPORTED("5rcx94deeexsyuzu3uu8v1yk2"); // static boolean downcandidate(node_t * v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6jfx7802edvf66slrrtiwdr3x"); // return ((ND_node_type(v) == 1) && (ND_in(v).size == 1) UNSUPPORTED("bc5c94xpimskyg4uxfcpjzjbk"); // && (ND_out(v).size == 1) && (ND_label(v) == NULL)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5yy2uwgnjzdmsqjig6m7pi4dh // static boolean bothdowncandidates(node_t * u, node_t * v) public static Object bothdowncandidates(Object... arg) { UNSUPPORTED("70c1exdtu7f7a0g2xvtjf1h4v"); // static boolean bothdowncandidates(node_t * u, node_t * v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9b48a157azcrz2ihzqehhpsvs"); // edge_t *e, *f; UNSUPPORTED("n6nd0vbfveotd6ua08vaz9kc"); // e = ND_in(u).list[0]; UNSUPPORTED("a1yoae6m61u88abwgei4iwrv6"); // f = ND_in(v).list[0]; UNSUPPORTED("1igpcdu1bpbjym8gly2bydxmp"); // if (downcandidate(v) && (agtail(e) == agtail(f))) { UNSUPPORTED("b0c3dm89khvdfaecz8vndzs4g"); // return samedir(e, f) UNSUPPORTED("b65ygvpn73rc7xtl4ogmyfdc3"); // && (portcmp(ED_tail_port(e), ED_tail_port(f)) == 0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 pnmyeaeyufqhbdt9phmr34w8 // static boolean upcandidate(node_t * v) public static Object upcandidate(Object... arg) { UNSUPPORTED("1bwv2llboqrh45zw5aau3g8wy"); // static boolean upcandidate(node_t * v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8cpz8jcws7vc5ljvhpqsvtr95"); // return ((ND_node_type(v) == 1) && (ND_out(v).size == 1) UNSUPPORTED("3h8pm2cl2yek27t8a1r51vwwm"); // && (ND_in(v).size == 1) && (ND_label(v) == NULL)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eoltukpbxfjnxh04nr63ockc2 // static boolean bothupcandidates(node_t * u, node_t * v) public static Object bothupcandidates(Object... arg) { UNSUPPORTED("cqzsemphpsgvcisjr9bifnbar"); // static boolean bothupcandidates(node_t * u, node_t * v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9b48a157azcrz2ihzqehhpsvs"); // edge_t *e, *f; UNSUPPORTED("9zpg3620h4heznn3b6mf3rkzc"); // e = ND_out(u).list[0]; UNSUPPORTED("1vg7brvscwl8tqwcwgf2vc1iu"); // f = ND_out(v).list[0]; UNSUPPORTED("232o0u3m0hk33kom12ddv5cf5"); // if (upcandidate(v) && (aghead(e) == aghead(f))) { UNSUPPORTED("b0c3dm89khvdfaecz8vndzs4g"); // return samedir(e, f) UNSUPPORTED("2sbh73r3hanfplu15qi49xx9e"); // && (portcmp(ED_head_port(e), ED_head_port(f)) == 0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9ugj5cxjwh6izs7qwoeplieyq // static void mergevirtual(graph_t * g, int r, int lpos, int rpos, int dir) public static Object mergevirtual(Object... arg) { UNSUPPORTED("7fykjo0tsdbiv0zeb6x3fb8fs"); // static void mergevirtual(graph_t * g, int r, int lpos, int rpos, int dir) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3omv4g8dibh1pqrvt46eo9gvq"); // int i, k; UNSUPPORTED("amyi14irz6dbz0367id35hvp"); // node_t *left, *right; UNSUPPORTED("8f8h355l1495yy9dbaz0it2in"); // edge_t *e, *f, *e0; UNSUPPORTED("231cg7wmyzy38x2wt2fo5w4mj"); // left = GD_rank(g)[r].v[lpos]; UNSUPPORTED("ell7qlxmonsekwusp8xopfdfu"); // /* merge all right nodes into the leftmost one */ UNSUPPORTED("1eeld04u92ygccgaquiq6xaex"); // for (i = lpos + 1; i <= rpos; i++) { UNSUPPORTED("5elwzk0mnuzvd2hm4hjqerr0f"); // right = GD_rank(g)[r].v[i]; UNSUPPORTED("c1uckn7ho04t7ub7xklkxju8h"); // if (dir == 1) { UNSUPPORTED("b0aboa5nfb7ujemy7qx50riyo"); // while ((e = ND_out(right).list[0])) { UNSUPPORTED("61h4dtrrxp3gqi4qq4fa84dj6"); // for (k = 0; (f = ND_out(left).list[k]); k++) UNSUPPORTED("e0g1j10s0bixkrbon6u0yv9c6"); // if (aghead(f) == aghead(e)) UNSUPPORTED("a5064jph9xpw67dcun2my4mcm"); // break; UNSUPPORTED("34init75thgijzfyzza21moxe"); // if (f == NULL) UNSUPPORTED("bevz1zn0blsflvx6jkk50rba9"); // f = virtual_edge(left, aghead(e), e); UNSUPPORTED("asb45d5rqv8it74v7tne8f2fg"); // while ((e0 = ND_in(right).list[0])) { UNSUPPORTED("cuttljjerosdc8dabm2bnnyb8"); // merge_oneway(e0, f); UNSUPPORTED("7v5ie1ooevp21zluuewlboyb5"); // /*ED_weight(f) += ED_weight(e0); */ UNSUPPORTED("5s7a1scru7071fh3chrychja8"); // delete_fast_edge(e0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("4xzroqevvsjt307vvx10f8atw"); // delete_fast_edge(e); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("a9byy1rucxlzdlxewp2rv7gqq"); // while ((e = ND_in(right).list[0])) { UNSUPPORTED("c7omxpe29tnl9ydgup95clcci"); // for (k = 0; (f = ND_in(left).list[k]); k++) UNSUPPORTED("a8u5bsqed458j870nosh64yic"); // if (agtail(f) == agtail(e)) UNSUPPORTED("a5064jph9xpw67dcun2my4mcm"); // break; UNSUPPORTED("34init75thgijzfyzza21moxe"); // if (f == NULL) UNSUPPORTED("dbqismmahqza8fnkjhntz4ll0"); // f = virtual_edge(agtail(e), left, e); UNSUPPORTED("eukpmnw48odadjb55ie78fit9"); // while ((e0 = ND_out(right).list[0])) { UNSUPPORTED("cuttljjerosdc8dabm2bnnyb8"); // merge_oneway(e0, f); UNSUPPORTED("5s7a1scru7071fh3chrychja8"); // delete_fast_edge(e0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("4xzroqevvsjt307vvx10f8atw"); // delete_fast_edge(e); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("20831ggpnh7lvyeu87hwsm0t3"); // assert(ND_in(right).size + ND_out(right).size == 0); UNSUPPORTED("ahkylw437651e5mf9138vl35w"); // delete_fast_node(g, right); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4yunnb5j9hoe6bcsy79b69fh0"); // k = lpos + 1; UNSUPPORTED("1ta71a6pw0aspmpknbt3wjj4k"); // i = rpos + 1; UNSUPPORTED("6vm80zqnn9yxelf6y0p8pdhlh"); // while (i < GD_rank(g)[r].n) { UNSUPPORTED("aour3qu5mlw9cykjikxt0fxcy"); // node_t *n; UNSUPPORTED("2z4aexzipvp6690gajlfsw9ub"); // n = GD_rank(g)[r].v[k] = GD_rank(g)[r].v[i]; UNSUPPORTED("98h1qvrthbfxdz7717i3e1ylh"); // ND_order(n) = k; UNSUPPORTED("9zq7xtwq5cysffia17vtbbt9u"); // k++; UNSUPPORTED("chd2f5z6rt19lbaye25ej7q6j"); // i++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("85og729c3c58hh8wdsc8uec8l"); // GD_rank(g)[r].n = k; UNSUPPORTED("d8ajai913hx6i4otnoso8kawv"); // GD_rank(g)[r].v[k] = NULL; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c20jfo46p56bjbachxehha9pu // static void infuse(graph_t * g, node_t * n) public static Object infuse(Object... arg) { UNSUPPORTED("etmqgz9znjdg1p7di2fe6kis4"); // static void infuse(graph_t * g, node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9roij9rixfrdr3vio8wvn6cym"); // node_t *lead; UNSUPPORTED("1dhtnolphtqb1vhzddsjs4997"); // lead = GD_rankleader(g)[ND_rank(n)]; UNSUPPORTED("7sbrmrdrc6qm86jwzs2p1q0bv"); // if ((lead == NULL) || (ND_order(lead) > ND_order(n))) UNSUPPORTED("4kboqcebkf36wvklvhc0smxyf"); // GD_rankleader(g)[ND_rank(n)] = n; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e8chm1nms49vyf1mp9zdq7e3n // static void rebuild_vlists(graph_t * g) public static Object rebuild_vlists(Object... arg) { UNSUPPORTED("8lxgqgoebpr6pqqvqimb2nold"); // static void rebuild_vlists(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c566lguiyozynv7spc9xx8agv"); // int c, i, r, maxi; UNSUPPORTED("augenu6r3rx501311lht9q7qr"); // node_t *n, *lead; UNSUPPORTED("3bqpdb6f6p2qw9s76g6txvvro"); // edge_t *e, *rep; UNSUPPORTED("br5jnq2zjxxbz2mw0z8ns5uug"); // for (r = GD_minrank(g); r <= GD_maxrank(g); r++) UNSUPPORTED("2rpy1wfe6lhmak6ce4v24v4ao"); // GD_rankleader(g)[r] = NULL; UNSUPPORTED("4frgznaid5m5mdte931ti7cw"); // dot_scan_ranks(g); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("7zlur6lceb4yawe9tb9amgq9s"); // infuse(g, n); UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("7uff9xbfc6s0idd1vxtjm2qth"); // for (rep = e; ED_to_virt(rep); rep = ED_to_virt(rep)); UNSUPPORTED("4oqbk654pzi7973xynf59fntp"); // while (ND_rank(aghead(rep)) < ND_rank(aghead(e))) { UNSUPPORTED("87e8ucrmzsn4x3vikrp4zqx96"); // infuse(g, aghead(rep)); UNSUPPORTED("9l3almai3ugohjo61vxf13yb7"); // rep = ND_out(aghead(rep)).list[0]; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("60nab7gyukq3bs8e6dizhbacy"); // for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { UNSUPPORTED("arvyjg1l9juza75tj23zsykps"); // lead = GD_rankleader(g)[r]; UNSUPPORTED("4atymss3ar3wje54szsaa3omf"); // if (GD_rank(dot_root(g))[r].v[ND_order(lead)] != lead) { UNSUPPORTED("b3cixj6rtwwwmjmebo4r2h15k"); // agerr(AGERR, "rebuiltd_vlists: rank lead %s not in order %d of rank %d\n", UNSUPPORTED("6udrpqggfjxt0na5cdb0725bn"); // agnameof(lead), ND_order(lead), r); UNSUPPORTED("edg6zn44g1egn9rxfpiizzrjo"); // longjmp(jbuf, 1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3907i7loyifjuq3p41y45kyhm"); // GD_rank(g)[r].v = UNSUPPORTED("7j4ogkw53pg0iv0mmko48fw0x"); // GD_rank(dot_root(g))[r].v + ND_order((GD_rankleader(g)[r])); UNSUPPORTED("2c6wxmjs9ytmjutd79l3vt4gl"); // maxi = -1; UNSUPPORTED("6eix918gmfs16624x6omusuhm"); // for (i = 0; i < GD_rank(g)[r].n; i++) { UNSUPPORTED("34a7o67ylktm1es8bkuaeejk2"); // if ((n = GD_rank(g)[r].v[i]) == NULL) UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("e0gk7m0zrsus94mtf86d91p04"); // if (ND_node_type(n) == 0) { UNSUPPORTED("d13494tcz4gbtml8c1ev3ktzb"); // if (agcontains(g, n)) UNSUPPORTED("80spg5b3li0mhxyw957sp2n7q"); // maxi = i; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("3gm29k6z4aks8v0k1r7qvxvlt"); // edge_t *e; UNSUPPORTED("42bmttyjay3sng4c3d0tsvkn9"); // for (e = ND_in(n).list[0]; e && ED_to_orig(e); UNSUPPORTED("148t8jlrp8lwlu4pyvlslf49l"); // e = ED_to_orig(e)); UNSUPPORTED("5n3hyea9ita57alojbawbcurz"); // if (e && (agcontains(g, agtail(e))) UNSUPPORTED("2u3pptvaudhj3kaydu0xn0c9x"); // && agcontains(g, aghead(e))) UNSUPPORTED("80spg5b3li0mhxyw957sp2n7q"); // maxi = i; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("csorvv6yhyohqnsvhazkk6eje"); // if (maxi == -1) UNSUPPORTED("eq3mmft8bst07qw88wjzgvoet"); // agerr(AGWARN, "degenerate concentrated rank %s,%d\n", agnameof(g), UNSUPPORTED("b6bf10m2f2pvxgkfcax559640"); // r); UNSUPPORTED("10l3x6nke8pra4fu5ysnu6j08"); // GD_rank(g)[r].n = maxi + 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7z5fb6iyowsosn1hiz7opeoc6"); // for (c = 1; c <= GD_n_cluster(g); c++) UNSUPPORTED("1d7lqtmagp5mwcbbkf4xawdog"); // rebuild_vlists(GD_clust(g)[c]); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3mzzkxpsezmtvlbzshvr46b8m // void dot_concentrate(graph_t * g) public static Object dot_concentrate(Object... arg) { UNSUPPORTED("4h7xkpw4zpae6ztth270w22gd"); // void dot_concentrate(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("62hcnpegd6vvkgtfo3a833aq9"); // int c, r, leftpos, rightpos; UNSUPPORTED("amyi14irz6dbz0367id35hvp"); // node_t *left, *right; UNSUPPORTED("1exryvusfp7fkh0rn8bxcz96g"); // if (GD_maxrank(g) - GD_minrank(g) <= 1) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("1o57fdj7j63samf9jysgvpqnq"); // /* this is the downward looking pass. r is a candidate rank. */ UNSUPPORTED("ca08a4ijjaxoo89carapxu5ur"); // for (r = 1; GD_rank(g)[r + 1].n; r++) { UNSUPPORTED("8elk0ekrvmk0yt6bmbwub0epc"); // for (leftpos = 0; leftpos < GD_rank(g)[r].n; leftpos++) { UNSUPPORTED("ela65u1ff5sc7nw7eq6hioji0"); // left = GD_rank(g)[r].v[leftpos]; UNSUPPORTED("7yq5j8b980yc5rz1e4lkwgmth"); // if (downcandidate(left) == 0) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("exizgsc0bwm37dxc6j6op74lz"); // for (rightpos = leftpos + 1; rightpos < GD_rank(g)[r].n; UNSUPPORTED("5a4wx0786piefhj7q3m241wof"); // rightpos++) { UNSUPPORTED("3jh1iupmf6freiri4v7zbt87k"); // right = GD_rank(g)[r].v[rightpos]; UNSUPPORTED("7ap3iy5ysmyd0x869id0jyedv"); // if (bothdowncandidates(left, right) == 0) UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("3q4uw7garqdhjalzpk1bivu8s"); // if (rightpos - leftpos > 1) UNSUPPORTED("4o5cptipygbr3qu2m6rkk4qwg"); // mergevirtual(g, r, leftpos, rightpos - 1, 1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cakeuerd3mfjfwy396sci21tn"); // /* this is the corresponding upward pass */ UNSUPPORTED("9cqq87ffcq47f55xlupeeuo6u"); // while (r > 0) { UNSUPPORTED("8elk0ekrvmk0yt6bmbwub0epc"); // for (leftpos = 0; leftpos < GD_rank(g)[r].n; leftpos++) { UNSUPPORTED("ela65u1ff5sc7nw7eq6hioji0"); // left = GD_rank(g)[r].v[leftpos]; UNSUPPORTED("dgbio6b5e3ja3yul0q4rl5qqn"); // if (upcandidate(left) == 0) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("exizgsc0bwm37dxc6j6op74lz"); // for (rightpos = leftpos + 1; rightpos < GD_rank(g)[r].n; UNSUPPORTED("5a4wx0786piefhj7q3m241wof"); // rightpos++) { UNSUPPORTED("3jh1iupmf6freiri4v7zbt87k"); // right = GD_rank(g)[r].v[rightpos]; UNSUPPORTED("6j41xobwrcrep12b6hhs39r8z"); // if (bothupcandidates(left, right) == 0) UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("3q4uw7garqdhjalzpk1bivu8s"); // if (rightpos - leftpos > 1) UNSUPPORTED("c3v2wops656i36vmsec5ezxk0"); // mergevirtual(g, r, leftpos, rightpos - 1, 0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8a1wsnjguqfvz8vfx6erejakp"); // r--; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ci9r8sj8tbc6yer5c8cebb0cm"); // if (setjmp(jbuf)) { UNSUPPORTED("ej9htgkxfq6bintcw04c6svwu"); // agerr(AGPREV, "concentrate=true may not work correctly.\n"); UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7z5fb6iyowsosn1hiz7opeoc6"); // for (c = 1; c <= GD_n_cluster(g); c++) UNSUPPORTED("1d7lqtmagp5mwcbbkf4xawdog"); // rebuild_vlists(GD_clust(g)[c]); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/dotgen/decomp__c.java000066400000000000000000000623401312650303100220240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.cgraph.node__c.agfstnode; import static gen.lib.cgraph.node__c.agnxtnode; import static gen.lib.common.utils__c.UF_find; import static smetana.core.JUtils.EQ; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.GD_comp; import static smetana.core.Macro.GD_n_nodes; import static smetana.core.Macro.GD_nlist; import static smetana.core.Macro.GD_rankleader; import static smetana.core.Macro.ND_clust; import static smetana.core.Macro.ND_flat_in; import static smetana.core.Macro.ND_flat_out; import static smetana.core.Macro.ND_in; import static smetana.core.Macro.ND_mark; import static smetana.core.Macro.ND_next; import static smetana.core.Macro.ND_out; import static smetana.core.Macro.ND_prev; import static smetana.core.Macro.ND_rank; import static smetana.core.Macro.UNSUPPORTED; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.ST_elist; import h.boxf; import h.elist; import h.pointf; import smetana.core.JUtils; import smetana.core.Z; import smetana.core.__array_of_struct__; import smetana.core.__struct__; public class decomp__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 5kbimjtsi4ulxiyk2w1brj6py // static graph_t *G //private static Agraph_s G; //1 ca279jzn1n2k40bv7mz55ccx7 // static node_t *Last_node //private static Agnode_s Last_node; //1 5t6dmo5pbc1wdmxtabavdwyb2 // static char Cmark //private static char Cmark; //3 7ggrwt0f912kp1marrxdjq155 // static void begin_component(void) public static void begin_component() { ENTERING("7ggrwt0f912kp1marrxdjq155","begin_component"); try { Z.z().Last_node_decomp = null; GD_nlist(Z.z().G_decomp, null); } finally { LEAVING("7ggrwt0f912kp1marrxdjq155","begin_component"); } } //3 7icc6b2pvnj6te1yndbel47gg // static void add_to_component(node_t * n) public static void add_to_component(Agnode_s n) { ENTERING("7icc6b2pvnj6te1yndbel47gg","add_to_component"); try { GD_n_nodes(Z.z().G_decomp, 1+GD_n_nodes(Z.z().G_decomp)); ND_mark(n, Z.z().Cmark); if (Z.z().Last_node_decomp!=null) { ND_prev(n, Z.z().Last_node_decomp); ND_next(Z.z().Last_node_decomp, n); } else { ND_prev(n, null); GD_nlist(Z.z().G_decomp, n); } Z.z().Last_node_decomp = n; ND_next(n, null); } finally { LEAVING("7icc6b2pvnj6te1yndbel47gg","add_to_component"); } } //3 5o8hxpr6ppi15pinuy79m7u04 // static void end_component(void) public static void end_component() { ENTERING("5o8hxpr6ppi15pinuy79m7u04","end_component"); try { int i; i = GD_comp(Z.z().G_decomp).size; GD_comp(Z.z().G_decomp).size = 1+GD_comp(Z.z().G_decomp).size; GD_comp(Z.z().G_decomp).reallocEmpty(GD_comp(Z.z().G_decomp).size, Agnode_s.class); GD_comp(Z.z().G_decomp).setInList(i ,GD_nlist(Z.z().G_decomp)); } finally { LEAVING("5o8hxpr6ppi15pinuy79m7u04","end_component"); } } //3 c5u5lnfbu0pmlk6vsvyrdj8ep // static void search_component(graph_t * g, node_t * n) public static void search_component(Agraph_s g, Agnode_s n) { ENTERING("c5u5lnfbu0pmlk6vsvyrdj8ep","search_component"); try { int c, i; __array_of_struct__ vec = __array_of_struct__.malloc(elist.class, 4); Agnode_s other; Agedge_s e; add_to_component(n); vec.plus(0).setStruct(ND_out(n)); vec.plus(1).setStruct(ND_in(n)); vec.plus(2).setStruct(ND_flat_out(n)); vec.plus(3).setStruct(ND_flat_in(n)); for (c = 0; c <= 3; c++) { if (((ST_elist) vec.plus(c).getStruct()).listNotNull()) for (i = 0; (e = (Agedge_s) ((ST_elist) vec.plus(c).getStruct()).getFromList(i))!=null; i++) { if (EQ(other = aghead(e), n)) other = agtail(e); if ((ND_mark(other) != Z.z().Cmark) && (EQ(other, UF_find(other)))) search_component(g, other); } } } finally { LEAVING("c5u5lnfbu0pmlk6vsvyrdj8ep","search_component"); } } //3 2t7r964kqtl5qrl7i57i22tqy // void decompose(graph_t * g, int pass) public static void decompose(Agraph_s g, int pass) { ENTERING("2t7r964kqtl5qrl7i57i22tqy","decompose"); try { Agraph_s subg; Agnode_s n, v; Z.z().G_decomp = g; if (++Z.z().Cmark == 0) Z.z().Cmark = 1; GD_n_nodes(g, 0); GD_comp(g).size = 0; for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) { v = n; if ((pass > 0) && (subg = ND_clust(v))!=null) v = (Agnode_s) GD_rankleader(subg).plus(ND_rank(v)).getPtr(); else if (v != UF_find(v)) continue; if (ND_mark(v) != Z.z().Cmark) { begin_component(); search_component(g, v); end_component(); } } } finally { LEAVING("2t7r964kqtl5qrl7i57i22tqy","decompose"); } } } plantuml-1.2017.15/src/gen/lib/dotgen/dotinit__c.java000066400000000000000000001327031312650303100222300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static gen.lib.cgraph.attr__c.agattr; import static gen.lib.cgraph.attr__c.agget; import static gen.lib.cgraph.edge__c.agfstout; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agnxtout; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.cgraph.graph__c.agnnodes; import static gen.lib.cgraph.node__c.agfstnode; import static gen.lib.cgraph.node__c.agnxtnode; import static gen.lib.cgraph.obj__c.agraphof; import static gen.lib.cgraph.obj__c.agroot; import static gen.lib.cgraph.rec__c.agbindrec; import static gen.lib.cgraph.subg__c.agfstsubg; import static gen.lib.cgraph.subg__c.agnxtsubg; import static gen.lib.common.postproc__c.dotneato_postprocess; import static gen.lib.common.utils__c.common_init_edge; import static gen.lib.common.utils__c.common_init_node; import static gen.lib.common.utils__c.gv_nodesize; import static gen.lib.common.utils__c.late_int; import static gen.lib.common.utils__c.late_string; import static gen.lib.common.utils__c.mapbool; import static gen.lib.common.utils__c.setEdgeType; import static gen.lib.dotgen.aspect__c.setAspect; import static gen.lib.dotgen.class1__c.nonconstraint_edge; import static gen.lib.dotgen.compound__c.dot_compoundEdges; import static gen.lib.dotgen.dotsplines__c.dot_splines; import static gen.lib.dotgen.mincross__c.dot_mincross; import static gen.lib.dotgen.position__c.dot_position; import static gen.lib.dotgen.rank__c.dot_rank; import static gen.lib.dotgen.sameport__c.dot_sameports; import static gen.lib.pack.pack__c.getPack; import static gen.lib.pack.pack__c.getPackInfo; import static gen.lib.pack.pack__c.getPackModeInfo; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.enumAsInt; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGRAPH; import static smetana.core.Macro.ED_count; import static smetana.core.Macro.ED_minlen; import static smetana.core.Macro.ED_showboxes; import static smetana.core.Macro.ED_weight; import static smetana.core.Macro.ED_xpenalty; import static smetana.core.Macro.GD_dotroot; import static smetana.core.Macro.GD_flags; import static smetana.core.Macro.GD_flip; import static smetana.core.Macro.N; import static smetana.core.Macro.ND_UF_size; import static smetana.core.Macro.ND_flat_in; import static smetana.core.Macro.ND_flat_out; import static smetana.core.Macro.ND_in; import static smetana.core.Macro.ND_other; import static smetana.core.Macro.ND_out; import static smetana.core.Macro.UNSUPPORTED; import static smetana.core.Macro.alloc_elist; import h.Agedge_s; import h.Agedgeinfo_t; import h.Agnode_s; import h.Agnodeinfo_t; import h.Agraph_s; import h.Agraphinfo_t; import h.aspect_t; import h.boxf; import h.pack_info; import h.pack_mode; import h.pointf; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Memory; import smetana.core.Z; import smetana.core.__ptr__; import smetana.core.__struct__; public class dotinit__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 exy2l03ceq9zw4vf01bbd4d3o // typedef unsigned int packval_t //3 cmr94z4p2bdeiply1d4wrqwes // static void dot_init_subg(graph_t * g, graph_t* droot) public static void dot_init_subg(Agraph_s g, Agraph_s droot) { ENTERING("cmr94z4p2bdeiply1d4wrqwes","dot_init_subg"); try { Agraph_s subg; if (NEQ(g, agroot(g))) agbindrec(g, new CString("Agraphinfo_t"), sizeof(Agraphinfo_t.class), (N(0))); if (EQ(g, droot)) GD_dotroot(agroot(g), droot); for (subg = agfstsubg(g); subg!=null; subg = agnxtsubg(subg)) { dot_init_subg(subg, droot); } } finally { LEAVING("cmr94z4p2bdeiply1d4wrqwes","dot_init_subg"); } } //3 3hk92jbrfjmn6no3svn9jvje9 // static void dot_init_node(node_t * n) public static void dot_init_node(Agnode_s n) { ENTERING("3hk92jbrfjmn6no3svn9jvje9","dot_init_node"); try { agbindrec(n, new CString("Agnodeinfo_t"), sizeof(Agnodeinfo_t.class), (N(0))); //graph custom data common_init_node(n); gv_nodesize(n, GD_flip(agraphof(n))); alloc_elist(4, ND_in(n), Agnode_s.class); alloc_elist(4, ND_out(n), Agnode_s.class); alloc_elist(2, ND_flat_in(n), Agnode_s.class); alloc_elist(2, ND_flat_out(n), Agnode_s.class); alloc_elist(2, ND_other(n), Agnode_s.class); ND_UF_size(n, 1); } finally { LEAVING("3hk92jbrfjmn6no3svn9jvje9","dot_init_node"); } } //3 zbvhnhd78bppq8wb872847bj // static void dot_init_edge(edge_t * e) public static void dot_init_edge(Agedge_s e) { ENTERING("zbvhnhd78bppq8wb872847bj","dot_init_edge"); try { CString tailgroup, headgroup; agbindrec(e, new CString("Agedgeinfo_t"), sizeof(Agedgeinfo_t.class), (N(0))); //graph custom data common_init_edge(e); ED_weight(e, late_int(e, Z.z().E_weight, 1, 0)); tailgroup = late_string(agtail(e), Z.z().N_group, new CString("")); headgroup = late_string(aghead(e), Z.z().N_group, new CString("")); ED_count(e, 1); ED_xpenalty(e, 1); if (tailgroup.charAt(0)!='\0' && (tailgroup.isSame(headgroup))) { UNSUPPORTED("atjraranegsdjegclykesn5gx"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->xpenalty) = 1000; UNSUPPORTED("5y0yunmvmngg67c9exlbn6jbk"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->weight) *= 100; } if (nonconstraint_edge(e)) { UNSUPPORTED("54niz21n2omf1i9v67brdid9w"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->xpenalty) = 0; UNSUPPORTED("2v5u5jdguhhn7vjihniotrml0"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->weight) = 0; } ED_showboxes(e, late_int(e, Z.z().E_showboxes, 0, 0)); ED_minlen(e, late_int(e, Z.z().E_minlen, 1, 0)); } finally { LEAVING("zbvhnhd78bppq8wb872847bj","dot_init_edge"); } } //3 2ylyhz7macit0ts1hap2tg3wy // void dot_init_node_edge(graph_t * g) public static void dot_init_node_edge(Agraph_s g) { ENTERING("2ylyhz7macit0ts1hap2tg3wy","dot_init_node_edge"); try { Agnode_s n; Agedge_s e; for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) dot_init_node(n); for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) { for (e = agfstout(g, n); e!=null; e = agnxtout(g, e)) dot_init_edge(e); } } finally { LEAVING("2ylyhz7macit0ts1hap2tg3wy","dot_init_node_edge"); } } //3 5z1h7gr0tgapjvuc2z9st9xjr // static void dot_cleanup_node(node_t * n) public static Object dot_cleanup_node(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("3wd33alc21mdt92sw3x9gl65j"); // dot_cleanup_node(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bft238x0kn16j4rew2s49lf8p"); // free_list(ND_in(n)); UNSUPPORTED("9k0f5njfz83ho3jgj8a6l97ia"); // free_list(ND_out(n)); UNSUPPORTED("9hf5u4ow9x2bxsh5roh3klohe"); // free_list(ND_flat_out(n)); UNSUPPORTED("d5cejyb0j1nhixps76lgii0fr"); // free_list(ND_flat_in(n)); UNSUPPORTED("er7qgmylfnw39xn97jixe3cqp"); // free_list(ND_other(n)); UNSUPPORTED("dv63sk5dujcwfkf99o6ponzqm"); // free_label(ND_label(n)); UNSUPPORTED("5or6zu6ycx4zage9ggy1o9it4"); // free_label(ND_xlabel(n)); UNSUPPORTED("4wkmsp7365vb7u5fqtm2buotu"); // if (ND_shape(n)) UNSUPPORTED("2yujce4phniaiwg4fq8up6xu7"); // ND_shape(n)->fns->freefn(n); UNSUPPORTED("4zk1aro1ispxkab9ee4dd0tf"); // agdelrec(n, "Agnodeinfo_t"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5x42drpgjuyzb9oapi7osqxb6 // static void free_virtual_edge_list(node_t * n) public static Object free_virtual_edge_list(Object... arg) { UNSUPPORTED("2kwoaiz0pcpatrbztzebypz24"); // static void free_virtual_edge_list(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("4johvk6fhfn8nimnwv1bayucm"); // for (i = ND_in(n).size - 1; i >= 0; i--) { UNSUPPORTED("dkwp8r3x5yxwt373copif99qc"); // e = ND_in(n).list[i]; UNSUPPORTED("d0cytt2j3orasq0977h5sdypp"); // delete_fast_edge(e); UNSUPPORTED("3ersod3eshpdnzwy1yb73olpy"); // free(e->base.data); UNSUPPORTED("7eb6ytlppce1o1ihl2yf1mb6w"); // free(e); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dyyfpe9giifeythxw1ecgc9gw"); // for (i = ND_out(n).size - 1; i >= 0; i--) { UNSUPPORTED("d0wu190s7vunqmaadd9r01j7m"); // e = ND_out(n).list[i]; UNSUPPORTED("d0cytt2j3orasq0977h5sdypp"); // delete_fast_edge(e); UNSUPPORTED("3ersod3eshpdnzwy1yb73olpy"); // free(e->base.data); UNSUPPORTED("7eb6ytlppce1o1ihl2yf1mb6w"); // free(e); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bzy6cpyjjzfeesjlq49c5sfmo // static void free_virtual_node_list(node_t * vn) public static Object free_virtual_node_list(Object... arg) { UNSUPPORTED("b8mii2q777xhhq7ugpswc15so"); // static void free_virtual_node_list(node_t * vn) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3lk7715piw6ktz28izcuw3l10"); // node_t *next_vn; UNSUPPORTED("cs50uo5tdqm5ri532weezud0q"); // while (vn) { UNSUPPORTED("1zc0twfsq0pvs72obqpqn3jt7"); // next_vn = ND_next(vn); UNSUPPORTED("6v1txca0lc0m7vffh6cxe7s0v"); // free_virtual_edge_list(vn); UNSUPPORTED("ar8qtrvshtnclyd1lwsud1fe1"); // if (ND_node_type(vn) == 1) { UNSUPPORTED("52z735rh4jv9he0idjly61jel"); // free_list(ND_out(vn)); UNSUPPORTED("2cx91nqjcw6sdd1j219nb29ty"); // free_list(ND_in(vn)); UNSUPPORTED("f2pq0qi224q8wspagt6qwoxdp"); // free(vn->base.data); UNSUPPORTED("3lo6egckclz8tk579663nqark"); // free(vn); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1jra8cgf1nhojwmj7gyucvoni"); // vn = next_vn; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 colq6urkwrm9hh0zggl873dla // static void dot_cleanup_graph(graph_t * g) public static Object dot_cleanup_graph(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("84r7i6e9lays55x1yan1d0nlp"); // dot_cleanup_graph(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("8uujemixuhlf040icq3zsh7j8"); // graph_t *subg; UNSUPPORTED("92vjk6rjnnnji7bcczz51lwfx"); // for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) { UNSUPPORTED("ykczo4avgse9arffpd1plmme"); // dot_cleanup_graph(subg); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("12nbb17pw6fg2wwg5c7i800xv"); // if (GD_clust(g)) free (GD_clust(g)); UNSUPPORTED("cw69q4tfzxmrd72fi1vz2be1g"); // if (GD_rankleader(g)) free (GD_rankleader(g)); UNSUPPORTED("cnrd9322z9c4eqvr450ughbzh"); // free_list(GD_comp(g)); UNSUPPORTED("djox731ykith2qz2trtp7zgzf"); // if (GD_rank(g)) { UNSUPPORTED("1vkvarx8mfy1iq12oyq5rtzpa"); // for (i = GD_minrank(g); i <= GD_maxrank(g); i++) UNSUPPORTED("32lqmila03wshgx9x3686apbo"); // free(GD_rank(g)[i].av); UNSUPPORTED("dnv6plmiyr74l3u1aqc16qmiz"); // if (GD_minrank(g) == -1) UNSUPPORTED("b0hpil9jwq1zov1klvpd6vbnf"); // free(GD_rank(g)-1); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("eqir7eaetsm1anqchd3kb8q8t"); // free(GD_rank(g)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("58o9b8zmlqcq96deeorllidce"); // if (g != agroot(g)) UNSUPPORTED("f5hqyohefj8o12bvcv17xpswc"); // agdelrec(g,"Agraphinfo_t"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2uv40x0vx6nmbvld01reukyly // void dot_cleanup(graph_t * g) public static Object dot_cleanup(Object... arg) { UNSUPPORTED("a2tqiktifcbodk46i6x0ux9j1"); // void dot_cleanup(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("v8twirr9ihzxnb06d6x6nxrd"); // free_virtual_node_list(GD_nlist(g)); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("5otoqd7o1zz8ni50urywr7yjy"); // gv_cleanup_edge(e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("yis08tp9td0x00hxoxqopt6b"); // dot_cleanup_node(n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2w88m44roqcqg67kuhg5k4agu"); // dot_cleanup_graph(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4jt1p8taqjuk4atqpwbxkru3g // static void remove_from_rank (Agraph_t * g, Agnode_t* n) public static Object remove_from_rank(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("9axg5z61bd5rkf0cbubkto6eb"); // remove_from_rank (Agraph_t * g, Agnode_t* n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5v9scbkty9fkcyo8yw7jmkokj"); // Agnode_t* v = NULL; UNSUPPORTED("86gmm9qxyhkzst815hr54r1sp"); // int j, rk = ND_rank(n); UNSUPPORTED("7bstlpzg93apc08cfgp386p7m"); // for (j = 0; j < GD_rank(g)[rk].n; j++) { UNSUPPORTED("5oq2646mpw8p4gen80z8g8baz"); // v = GD_rank(g)[rk].v[j]; UNSUPPORTED("aby82dr89m0xbcj8mya7f9fvx"); // if (v == n) { UNSUPPORTED("5494ozi7uqin7n7xlbkqrsahd"); // for (j++; j < GD_rank(g)[rk].n; j++) { UNSUPPORTED("a4l7560unq1yw14pck0v0yo6x"); // GD_rank(g)[rk].v[j-1] = GD_rank(g)[rk].v[j]; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("8pdkxsqmvoce243jar5hwxl3u"); // GD_rank(g)[rk].n--; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cytanc5i1hmu0ag0vz4awfpi"); // assert (v == n); /* if found */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 xgvyh3kinj6cbnknb5oo9qfr // static void removeFill (Agraph_t * g) public static Object removeFill(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("8asq16rjvm285smlce6dul5nq"); // removeFill (Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ci2zh69w6nhi0q816i1ixuy9k"); // Agnode_t* n; UNSUPPORTED("167at4ws3rrdv3znbvpsnb83o"); // Agnode_t* nxt; UNSUPPORTED("22j86kdb5hbziiedfsspj3ipn"); // Agraph_t* sg = agsubg (g, "_new_rank", 0); UNSUPPORTED("1pjx7ke9o4h5tgq0cs9jfui7j"); // if (!sg) return; UNSUPPORTED("5sms8ok354044bziyaq1kfv93"); // for (n = agfstnode(sg); n; n = nxt) { UNSUPPORTED("18crodqmo1f1apt7bwq0mv72m"); // nxt = agnxtnode(sg, n); UNSUPPORTED("227ays2g6u04e210i8wp3jntu"); // delete_fast_node (g, n); UNSUPPORTED("2tp9t78wzq032fbm3msk2gpfx"); // remove_from_rank (g, n); UNSUPPORTED("cyyixtb6lqfain86edffcd92b"); // dot_cleanup_node (n); UNSUPPORTED("3xjgsp211uvaug1aa3mvpdlnc"); // agdelnode(g, n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9ar3yxaq5s0lagg5bw59suv8u"); // agdelsubg (g, sg); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 63o8ieaetc5apjocrd74fobt0 // static void attach_phase_attrs (Agraph_t * g, int maxphase) public static Object attach_phase_attrs(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("adogsvx2s8kkwixbfl53zj175"); // attach_phase_attrs (Agraph_t * g, int maxphase) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("28snkvv05tay2b94o220j0rkx"); // Agsym_t* rk = agattr(g,AGNODE,"rank",""); UNSUPPORTED("2mf6hpet62ccb0nfggxptz459"); // Agsym_t* order = agattr(g,AGNODE,"order",""); UNSUPPORTED("ci2zh69w6nhi0q816i1ixuy9k"); // Agnode_t* n; UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("7wq24g054kmx3aw25vk5ksj4"); // for (n = agfstnode(g); n; n = agnxtnode(g,n)) { UNSUPPORTED("16p5t5iyomfedg6du3xoszhzq"); // if (maxphase >= 1) { UNSUPPORTED("bwgz5xhm64nl5wtnj9vfs1rx7"); // sprintf(buf, "%d", ND_rank(n)); UNSUPPORTED("42xwkqdgcponmubqyxg876oo6"); // agxset(n,rk,buf); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("93x84236b3xx5glpnx5xseeg0"); // if (maxphase >= 2) { UNSUPPORTED("dt1ra0nrgwwdbm8fmxvgcz16x"); // sprintf(buf, "%d", ND_order(n)); UNSUPPORTED("5e6vrutroh3qimffd0rioyhnz"); // agxset(n,order,buf); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7t18nggek2s9vvb5opwqa8rwr // static void dotLayout(Agraph_t * g) public static void dotLayout(Agraph_s g) { ENTERING("7t18nggek2s9vvb5opwqa8rwr","dotLayout"); try { aspect_t aspect = (aspect_t) Memory.malloc(aspect_t.class); aspect_t asp; int maxphase = late_int(g, (agattr(g,AGRAPH,new CString("phase"),null)), -1, 1); setEdgeType (g, (5 << 1)); asp = setAspect (g, aspect); dot_init_subg(g,g); dot_init_node_edge(g); do { dot_rank(g, asp); if (maxphase == 1) { attach_phase_attrs (g, 1); return; } if (aspect.getBoolean("badGraph")) { UNSUPPORTED("1yu5j8tk43i6jlmu8wk9jks15"); // agerr(AGWARN, "dot does not support the aspect attribute for disconnected graphs or graphs with clusters\n"); UNSUPPORTED("5uwp9z6jkv5uc30iyfszyg6dw"); // asp = NULL; UNSUPPORTED("28kbszyxsjoj03gb134ov4hag"); // aspect.nextIter = 0; } dot_mincross(g, (asp != null)); if (maxphase == 2) { attach_phase_attrs (g, 2); return; } dot_position(g, asp); if (maxphase == 3) { attach_phase_attrs (g, 2); /* positions will be attached on output */ return; } aspect.setInt("nPasses", aspect.getInt("nPasses") -1); } while (aspect.getInt("nextIter")!=0 && aspect.getInt("nPasses")!=0); if ((GD_flags(g) & (1 << 4))!=0) removeFill (g); dot_sameports(g); dot_splines(g); if (mapbool(agget(g, new CString("compound")))) dot_compoundEdges(g); } finally { LEAVING("7t18nggek2s9vvb5opwqa8rwr","dotLayout"); } } //3 j18uqz16uc5895o8w92sc8us // static void initSubg (Agraph_t* sg, Agraph_t* g) public static Object initSubg(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("dxv1kymai2xe3m4wblwapgffu"); // initSubg (Agraph_t* sg, Agraph_t* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3oolj8gqkndhoy95ebyjmjt0w"); // agbindrec(sg, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); UNSUPPORTED("2um641xaifqq107czm0htblc3"); // GD_drawing(sg) = (layout_t*)zmalloc(sizeof(layout_t)); UNSUPPORTED("bfocldqmll6ddnmq3h3ci6njt"); // GD_drawing(sg)->quantum = GD_drawing(g)->quantum; UNSUPPORTED("7cnwfvm4lswn7kvucss74krd3"); // GD_drawing(sg)->dpi = GD_drawing(g)->dpi; UNSUPPORTED("7kbbs52ycpyuytqi61m5vme4c"); // GD_gvc(sg) = GD_gvc (g); UNSUPPORTED("8flpf5avt4eg89sc16bgp9v13"); // GD_charset(sg) = GD_charset (g); UNSUPPORTED("d9o7bxs9hl0r5ma0lt9oejmqv"); // GD_rankdir2(sg) = GD_rankdir2 (g); UNSUPPORTED("74762qecxnstp743fwt31hk0p"); // GD_nodesep(sg) = GD_nodesep(g); UNSUPPORTED("b29jhl6zjh8f8jqfb6okoixby"); // GD_ranksep(sg) = GD_ranksep(g); UNSUPPORTED("bctcse1zj9vx2p0in9p4jhso3"); // GD_fontnames(sg) = GD_fontnames(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9pe0e6i01ks2zju1xjzgg39v1 // static void attachPos (Agraph_t* g) public static Object attachPos(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("d606brtp0hf4k8bamafqhu08b"); // attachPos (Agraph_t* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8fmu9hadea4uw8fwzoexoxab"); // node_t* np; UNSUPPORTED("5cl2cj5wj7w1zr7qjww0s4cdf"); // double* ps = (double*)zmalloc((2*agnnodes(g))*sizeof(double)); UNSUPPORTED("73rfwkv8ws65l7qgnz7jw27gf"); // for (np = agfstnode(g); np; np = agnxtnode(g, np)) { UNSUPPORTED("7tbl6es7oks3vntqoetg24xa4"); // ND_pos(np) = ps; UNSUPPORTED("9qwq8ll4gb28hun94xos9i4ud"); // ps[0] = ((ND_coord(np).x)/(double)72); UNSUPPORTED("5z9ztec30pze3mzecneza61qq"); // ps[1] = ((ND_coord(np).y)/(double)72); UNSUPPORTED("aeuy5zibx9et1ncwcqwlr3s3m"); // ps += 2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eufhyu2dccn1mleg8a43s9k2h // static void resetCoord (Agraph_t* g) public static Object resetCoord(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("caofcucw710wwaiwfz4650zsz"); // resetCoord (Agraph_t* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7ds7ppzwt5kjihc3hp8q0ncyl"); // node_t* np = agfstnode(g); UNSUPPORTED("5s8nx20pwknmsow15z16muyab"); // double* sp = ND_pos(np); UNSUPPORTED("5u1fte9td0znzxeayi62ozq8a"); // double* ps = sp; UNSUPPORTED("73rfwkv8ws65l7qgnz7jw27gf"); // for (np = agfstnode(g); np; np = agnxtnode(g, np)) { UNSUPPORTED("8p3hwwbq7seyn0wpf7llgw1xd"); // ND_pos(np) = 0; UNSUPPORTED("a33fx4q39yal0dnv915x71zia"); // ND_coord(np).x = ((ps[0])*(double)72); UNSUPPORTED("avms8890ml5c9jclp66fpto3x"); // ND_coord(np).y = ((ps[1])*(double)72); UNSUPPORTED("aeuy5zibx9et1ncwcqwlr3s3m"); // ps += 2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("btsriptlygrzlk6ojhvss234j"); // free (sp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 nedairhdof6qkmjjoh4h68zy // static void doDot (Agraph_t* g) public static void doDot(Agraph_s g) { ENTERING("nedairhdof6qkmjjoh4h68zy","doDot"); try { Agraph_s ccs[]; Agraph_s sg; int ncc; int i; pack_info pinfo = (pack_info) Memory.malloc(pack_info.class); int Pack = getPack(g, -1, 8); int mode = getPackModeInfo (g, enumAsInt(pack_mode.class, "l_undef"), pinfo); getPackInfo(g, enumAsInt(pack_mode.class, "l_node"), 8, pinfo); if ((mode == enumAsInt(pack_mode.class, "l_undef")) && (Pack < 0)) { /* No pack information; use old dot with components * handled during layout */ dotLayout(g); } else { UNSUPPORTED("952usp51fee2pbidl2frwpq2x"); // /* fill in default values */ UNSUPPORTED("7d8flcn5zht92nop46f168hf9"); // if (mode == l_undef) UNSUPPORTED("bf04f2a6do2dovxgq57ta3qz5"); // pinfo.mode = l_node; UNSUPPORTED("7l7lph3yd7o3jelejupsiytnc"); // else if (Pack < 0) UNSUPPORTED("7odp6lwv29g4nwpfvqt8hkmve"); // Pack = 8; UNSUPPORTED("au4kpvl0egq3dt8hlmqnad61o"); // pinfo.margin = Pack; UNSUPPORTED("6o6lvrnsp1zkqdkduwrfetrrm"); // pinfo.fixed = 0; UNSUPPORTED("7ijhbsssflu2oty986iwhi5u7"); // /* components using clusters */ UNSUPPORTED("axesx20t6oyprzdzjz5cwneq4"); // ccs = cccomps(g, &ncc, 0); UNSUPPORTED("edukq9g8egufczs6ja3h99k6a"); // if (ncc == 1) { UNSUPPORTED("aj3wrqm1ouyaocsn56geghko0"); // dotLayout(g); UNSUPPORTED("2pkescmk4qojc8cqt3wzo8jkp"); // } else if ((((Agraphinfo_t*)(((Agobj_t*)(g))->data))->drawing)->ratio_kind == R_NONE) { UNSUPPORTED("295yqzsqueggcx71mcuv1zy7t"); // pinfo.doSplines = 1; UNSUPPORTED("3rfcnwowz3h58n92j7igzwap0"); // for (i = 0; i < ncc; i++) { UNSUPPORTED("6n1wgj9rnpi5u0c1f6mo7hvdr"); // sg = ccs[i]; UNSUPPORTED("9f5l1z5fur3bn6wlzykztsrr5"); // initSubg (sg, g); UNSUPPORTED("boery4d5nv4jssiy0y3mf2yf7"); // dotLayout (sg); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ahr97rgrh96az7iroebb6p14f"); // attachPos (g); UNSUPPORTED("1eeqkm1855z53jwep9ukxptxa"); // packSubgraphs(ncc, ccs, g, &pinfo); UNSUPPORTED("5jevnxwr3ejh3o6i1n3b15oyz"); // resetCoord (g); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("3dnz4esjw60s265perisqld8n"); // /* Not sure what semantics should be for non-trivial ratio UNSUPPORTED("9752lfn24j9vhkz6y8fvyvpop"); // * attribute with multiple components. UNSUPPORTED("cxv608avcmjij1ltc81ac9zp0"); // * One possibility is to layout nodes, pack, then apply the ratio UNSUPPORTED("71ykqx29qwldoh9wf4e85xh7u"); // * adjustment. We would then have to re-adjust all positions. UNSUPPORTED("29edlge3wqyp1gs0vymtr5700"); // */ UNSUPPORTED("aj3wrqm1ouyaocsn56geghko0"); // dotLayout(g); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cjjlbx1oxw3twss3vlotij507"); // for (i = 0; i < ncc; i++) { UNSUPPORTED("dc0uduk2687c8n6qn7y3y0aph"); // free ((((Agraphinfo_t*)(((Agobj_t*)(ccs[i]))->data))->drawing)); UNSUPPORTED("6lefivq8plsiwa47ucvy1ze1a"); // agdelete(g, ccs[i]); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5eru5cerydhchm7ojmgdlkv9y"); // free(ccs); } } finally { LEAVING("nedairhdof6qkmjjoh4h68zy","doDot"); } } //3 euvc3uoksq3e24augkwebfkcv // void dot_layout(Agraph_t * g) public static void dot_layout(Agraph_s g) { ENTERING("euvc3uoksq3e24augkwebfkcv","dot_layout"); try { if (agnnodes(g)!=0) doDot (g); dotneato_postprocess(g); } finally { LEAVING("euvc3uoksq3e24augkwebfkcv","dot_layout"); } } //3 ca52dadcp7m8x0bqhaw4tvtaw // Agraph_t * dot_root (void* p) public static Agraph_s dot_root(__ptr__ p) { ENTERING("ca52dadcp7m8x0bqhaw4tvtaw","dot_root"); try { return GD_dotroot(agroot(p)); } finally { LEAVING("ca52dadcp7m8x0bqhaw4tvtaw","dot_root"); } } } plantuml-1.2017.15/src/gen/lib/dotgen/dotsplines__c.java000066400000000000000000004024511312650303100227420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static gen.lib.cgraph.edge__c.agfstout; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agnxtout; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.cgraph.node__c.agfstnode; import static gen.lib.cgraph.node__c.agnxtnode; import static gen.lib.cgraph.obj__c.agraphof; import static gen.lib.common.memory__c.gmalloc; import static gen.lib.common.memory__c.zmalloc; import static gen.lib.common.routespl__c.makeStraightEdge; import static gen.lib.common.routespl__c.routepolylines; import static gen.lib.common.routespl__c.routesplines; import static gen.lib.common.routespl__c.routesplinesinit; import static gen.lib.common.routespl__c.routesplinesterm; import static gen.lib.common.routespl__c.simpleSplineRoute; import static gen.lib.common.splines__c.add_box; import static gen.lib.common.splines__c.beginpath; import static gen.lib.common.splines__c.clip_and_install; import static gen.lib.common.splines__c.endpath; import static gen.lib.common.splines__c.getsplinepoints; import static gen.lib.common.splines__c.makeSelfEdge; import static gen.lib.common.utils__c.updateBB; import static gen.lib.dotgen.cluster__c.mark_lowclusters; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.LOG2; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.function; import static smetana.core.JUtils.qsort; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtils.sizeof_starstar_empty; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.ABS; import static smetana.core.Macro.AGSEQ; import static smetana.core.Macro.ALLOC_empty; import static smetana.core.Macro.BETWEEN; import static smetana.core.Macro.ED_adjacent; import static smetana.core.Macro.ED_edge_type; import static smetana.core.Macro.ED_head_port; import static smetana.core.Macro.ED_label; import static smetana.core.Macro.ED_spl; import static smetana.core.Macro.ED_tail_port; import static smetana.core.Macro.ED_to_orig; import static smetana.core.Macro.ED_to_virt; import static smetana.core.Macro.ED_tree_index; import static smetana.core.Macro.GD_bb; import static smetana.core.Macro.GD_flags; import static smetana.core.Macro.GD_flip; import static smetana.core.Macro.GD_has_labels; import static smetana.core.Macro.GD_maxrank; import static smetana.core.Macro.GD_minrank; import static smetana.core.Macro.GD_nlist; import static smetana.core.Macro.GD_nodesep; import static smetana.core.Macro.GD_rank; import static smetana.core.Macro.GD_ranksep; import static smetana.core.Macro.MAKEFWDEDGE; import static smetana.core.Macro.MAX; import static smetana.core.Macro.MIN; import static smetana.core.Macro.M_PI; import static smetana.core.Macro.N; import static smetana.core.Macro.ND_alg; import static smetana.core.Macro.ND_clust; import static smetana.core.Macro.ND_coord; import static smetana.core.Macro.ND_flat_out; import static smetana.core.Macro.ND_ht; import static smetana.core.Macro.ND_in; import static smetana.core.Macro.ND_label; import static smetana.core.Macro.ND_lw; import static smetana.core.Macro.ND_mval; import static smetana.core.Macro.ND_next; import static smetana.core.Macro.ND_node_type; import static smetana.core.Macro.ND_order; import static smetana.core.Macro.ND_other; import static smetana.core.Macro.ND_out; import static smetana.core.Macro.ND_rank; import static smetana.core.Macro.ND_rw; import static smetana.core.Macro.NOT; import static smetana.core.Macro.ROUND; import static smetana.core.Macro.UNSUPPORTED; import h.Agedge_s; import h.Agedgeinfo_t; import h.Agedgepair_s; import h.Agnode_s; import h.Agraph_s; import h.Ppoly_t; import h.ST_boxf; import h.ST_port; import h.attr_state_t; import h.bezier; import h.boxf; import h.path; import h.pathend_t; import h.pointf; import h.spline_info_t; import h.splines; import smetana.core.JUtils; import smetana.core.Memory; import smetana.core.Z; import smetana.core.__array_of_struct__; import smetana.core.__ptr__; import smetana.core.__struct__; public class dotsplines__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static ST_boxf boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static ST_boxf boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final ST_boxf b = new ST_boxf(); b.LL.x = llx; b.LL.y = lly; b.UR.x = urx; b.UR.y = ury; return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 8vvgiozsykdn0hhbvaem6lifn // static boxf boxes[1000] //private static __array_of_struct__ boxes = __array_of_struct__.malloc(boxf.class, 1000); //3 dobhmc46zwtvv8rg3ywntl91j // static edge_t* getmainedge(edge_t * e) public static Agedge_s getmainedge(Agedge_s e) { ENTERING("dobhmc46zwtvv8rg3ywntl91j","getmainedge"); try { Agedge_s le = e; while (ED_to_virt(le)!=null) le = ED_to_virt(le); while (ED_to_orig(le)!=null) le = ED_to_orig(le); return le; } finally { LEAVING("dobhmc46zwtvv8rg3ywntl91j","getmainedge"); } } //3 ddeny5ht7w8b16ztj5zt840ld // static boolean spline_merge(node_t * n) public static boolean spline_merge(Agnode_s n) { ENTERING("ddeny5ht7w8b16ztj5zt840ld","spline_merge"); try { return ((ND_node_type(n) == 1) && ((ND_in(n).size > 1) || (ND_out(n).size > 1))); } finally { LEAVING("ddeny5ht7w8b16ztj5zt840ld","spline_merge"); } } //3 36ofw2qfqlh5ci8gc8cfkqgg3 // static boolean swap_ends_p(edge_t * e) public static boolean swap_ends_p(Agedge_s e) { ENTERING("36ofw2qfqlh5ci8gc8cfkqgg3","swap_ends_p"); try { while (ED_to_orig(e)!=null) e = ED_to_orig(e); if (ND_rank(aghead(e)) > ND_rank(agtail(e))) return false; if (ND_rank(aghead(e)) < ND_rank(agtail(e))) return NOT(false); if (ND_order(aghead(e)) >= ND_order(agtail(e))) return false; return NOT(false); } finally { LEAVING("36ofw2qfqlh5ci8gc8cfkqgg3","swap_ends_p"); } } //1 300wnvw9sndobgke752j9u139 // static splineInfo sinfo = /*static final __struct__ sinfo = JUtils.from(splineInfo.class); static { sinfo.setPtr("swapEnds", function(dotsplines__c.class, "swap_ends_p")); sinfo.setPtr("splineMerge", function(dotsplines__c.class, "spline_merge")); }*/ //3 3krohso3quojiv4fveh1en7o6 // int portcmp(port p0, port p1) public static int portcmp(final ST_port p0, final ST_port p1) { // WARNING!! STRUCT return portcmp_w_(p0.copy(), p1.copy()); } private static int portcmp_w_(final ST_port p0, final ST_port p1) { ENTERING("3krohso3quojiv4fveh1en7o6","portcmp"); try { int rv; if (p1.defined == 0) return (p0.defined!=0 ? 1 : 0); if (p0.defined == 0) return -1; rv = (int) (p0.p.x - p1.p.x); if (rv == 0) rv = (int) (p0.p.y - p1.p.y); return rv; } finally { LEAVING("3krohso3quojiv4fveh1en7o6","portcmp"); } } //3 10wbtt4gwnxgqutinpj4ymjpk // static void swap_bezier(bezier * old, bezier * new) public static void swap_bezier(__ptr__ old, __ptr__ new_) { ENTERING("10wbtt4gwnxgqutinpj4ymjpk","swap_bezier"); try { __ptr__ list; __ptr__ lp; __ptr__ olp; int i, sz; sz = old.getInt("size"); list = gmalloc(sizeof(pointf.class, sz)); lp = list; olp = old.getArrayOfPtr("list").plus(sz - 1).asPtr(); for (i = 0; i < sz; i++) { /* reverse list of points */ lp.getStruct().___(olp.getStruct()); lp=lp.plus(1); olp=olp.plus(-1); } new_.setPtr("list", list); new_.setInt("size", sz); new_.setInt("sflag", old.getInt("eflag")); new_.setInt("eflag", old.getInt("sflag")); new_.setStruct("sp", old.getStruct("ep")); new_.setStruct("ep", old.getStruct("sp")); } finally { LEAVING("10wbtt4gwnxgqutinpj4ymjpk","swap_bezier"); } } //3 3256l3e2huarsy29dd97vqj85 // static void swap_spline(splines * s) public static void swap_spline(splines s) { ENTERING("3256l3e2huarsy29dd97vqj85","swap_spline"); try { __ptr__ list; __ptr__ lp; __ptr__ olp; int i, sz; sz = s.getInt("size"); list = gmalloc(sizeof(bezier.class, sz)); lp = list; olp = s.getArrayOfPtr("list").plus(sz - 1).asPtr(); for (i = 0; i < sz; i++) { /* reverse and swap list of beziers */ swap_bezier(olp, lp); olp = olp.plus(-1); lp = lp.plus(1); } /* free old structures */ for (i = 0; i < sz; i++) Memory.free(s.getArrayOfPtr("list").plus(i).getPtr().getArrayOfPtr("list")); Memory.free(s.getArrayOfPtr("list")); s.setPtr("list", list); } finally { LEAVING("3256l3e2huarsy29dd97vqj85","swap_spline"); } } //3 dgkssqjj566ifra0xy7m46qsb // static void edge_normalize(graph_t * g) public static void edge_normalize(Agraph_s g) { ENTERING("dgkssqjj566ifra0xy7m46qsb","edge_normalize"); try { Agedge_s e; Agnode_s n; for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) { for (e = agfstout(g, n); e!=null; e = agnxtout(g, e)) { if ((Boolean)Z.z().sinfo.call("swapEnds", e) && ED_spl(e)!=null) swap_spline(ED_spl(e)); } } } finally { LEAVING("dgkssqjj566ifra0xy7m46qsb","edge_normalize"); } } //3 bwzdgdea9suuagzueyw8ztx42 // static void resetRW (graph_t * g) public static Object resetRW(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("c4vqsmfolc1meewxoebfkyppx"); // resetRW (graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7ma9kdgag30w5ofv1niitxbro"); // node_t* n; UNSUPPORTED("7wq24g054kmx3aw25vk5ksj4"); // for (n = agfstnode(g); n; n = agnxtnode(g,n)) { UNSUPPORTED("b83f20tdode2lz5a49mhmn9ei"); // if (ND_other(n).list) { UNSUPPORTED("ez6pf4w4vi7z6fqq43v5i3gpv"); // double tmp = ND_rw(n); UNSUPPORTED("24qsh566odunv14qzj2zan7bz"); // ND_rw(n) = ND_mval(n); UNSUPPORTED("cgxuqwflawrd9e6dmnsh3sbwa"); // ND_mval(n) = tmp; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9co1bgu5603fx30juwb01faf // static void setEdgeLabelPos (graph_t * g) public static Object setEdgeLabelPos(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("7y94r9t4hf6d0ltbie4f323al"); // setEdgeLabelPos (graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7ma9kdgag30w5ofv1niitxbro"); // node_t* n; UNSUPPORTED("1o9j4rz3dizwsgefis1axd6uw"); // textlabel_t* l; UNSUPPORTED("cbzhyr6lytrowd5gxn3tg000a"); // /* place regular edge labels */ UNSUPPORTED("8g62mxpap4eeua2lkn9a1iosi"); // for (n = GD_nlist(g); n; n = ND_next(n)) { UNSUPPORTED("53rvntgqit26uu0ydhawavshp"); // if (ND_node_type(n) == 1) { UNSUPPORTED("7sijld2wh9ulkpkumhl6dqqaj"); // if (ND_alg(n)) { // label of non-adjacent flat edge UNSUPPORTED("5ccfgna84rl1jtgmuk8nbffqy"); // edge_t* fe = (edge_t*)ND_alg(n); UNSUPPORTED("8rofnso8jnaa77ukvfpwruvyx"); // assert ((l = ED_label(fe))); UNSUPPORTED("ak1kh1v4u9s5kof1svwbc6ssr"); // l->pos = ND_coord(n); UNSUPPORTED("9ehteylkrnipypq5s9c6jjm67"); // l->set = NOT(0); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("15c8rehrm31gtqtwrj9r863k5"); // else if ((l = ND_label(n))) {// label of regular edge UNSUPPORTED("3i64wd6mr21h7x0hadumabd5r"); // place_vnlabel(n); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("mlknwb70zhu4paqbncp6enq9"); // if (l) updateBB(g, l); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6agx6m2qof9lg57co232lwakj // static void _dot_splines(graph_t * g, int normalize) static void _dot_splines(Agraph_s g, int normalize) { ENTERING("6agx6m2qof9lg57co232lwakj","_dot_splines"); try { int i, j, k, n_nodes, n_edges, ind, cnt; Agnode_s n; final __struct__ fwdedgeai = JUtils.from(Agedgeinfo_t.class), fwdedgebi = JUtils.from(Agedgeinfo_t.class); final __struct__ fwdedgea = JUtils.from(Agedgepair_s.class), fwdedgeb = JUtils.from(Agedgepair_s.class); Agedge_s e, e0, e1, ea, eb, le0, le1; __ptr__ edges; path P; final __struct__ sd = JUtils.from(spline_info_t.class); int et = (GD_flags(g) & (7 << 1)); fwdedgea.getStruct("out").getStruct("base").setPtr("data", fwdedgeai.amp()); fwdedgeb.getStruct("out").getStruct("base").setPtr("data", fwdedgebi.amp()); if (et == (0 << 1)) return; if (et == (2 << 1)) { resetRW (g); if ((GD_has_labels(g) & (1 << 0))!=0) { UNSUPPORTED("4k888z8ymdp2b653twxc1ugbu"); // agerr (AGWARN, "edge labels with splines=curved not supported in dot - use xlabels\n"); } for (n = agfstnode (g); n!=null; n = agnxtnode(g, n)) { for (e = agfstout(g, n); e!=null; e = agnxtout(g,e)) { makeStraightEdge(g, e, et, Z.z().sinfo); } } UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish; } mark_lowclusters(g); if (routesplinesinit()!=0) return; P = (path) zmalloc(sizeof(path.class)); /* FlatHeight = 2 * GD_nodesep(g); */ sd.setInt("Splinesep", GD_nodesep(g) / 4); sd.setInt("Multisep", GD_nodesep(g)); edges = zmalloc(sizeof_starstar_empty(Agedge_s.class, 128)); /* compute boundaries and list of splines */ sd.setInt("RightBound", 0); sd.setInt("LeftBound", 0); n_edges = n_nodes = 0; for (i = GD_minrank(g); i <= GD_maxrank(g); i++) { n_nodes += GD_rank(g).plus(i).getInt("n"); if ((n = (Agnode_s) GD_rank(g).plus(i).getArrayOfPtr("v").plus(0).getPtr())!=null) sd.setInt("LeftBound", (int)MIN(sd.getInt("LeftBound"), (ND_coord(n).getDouble("x") - ND_lw(n)))); if (GD_rank(g).plus(i).getInt("n")!=0 && (n = (Agnode_s) GD_rank(g).plus(i).getArrayOfPtr("v").plus(GD_rank(g).plus(i).getInt("n") - 1).getPtr())!=null) sd.setInt("RightBound", (int)MAX(sd.getInt("RightBound"), (ND_coord(n).getDouble("x") + ND_rw(n)))); sd.setInt("LeftBound", sd.getInt("LeftBound") - 16); sd.setInt("RightBound", sd.getInt("RightBound") + 16); for (j = 0; j < GD_rank(g).plus(i).getInt("n"); j++) { n = (Agnode_s) GD_rank(g).plus(i).getArrayOfPtr("v").plus(j).getPtr(); /* if n is the label of a flat edge, copy its position to * the label. */ if (ND_alg(n)!=null) { Agedge_s fe = (Agedge_s) ND_alg(n); assert (ED_label(fe)!=null); ED_label(fe).setStruct("pos", ND_coord(n)); ED_label(fe).setBoolean("set", NOT(false)); } if ((ND_node_type(n) != 0) && ((Boolean)Z.z().sinfo.call("splineMerge", n) == false)) continue; for (k = 0; (e = (Agedge_s) ND_out(n).getFromList(k))!=null; k++) { if ((ED_edge_type(e) == 4) || (ED_edge_type(e) == 6)) continue; setflags(e, 1, 16, 64); edges.plus(n_edges++).setPtr(e); if (n_edges % 128 == 0) edges = ALLOC_empty (n_edges + 128, edges, Agedge_s.class); } if (ND_flat_out(n).listNotNull()) for (k = 0; (e = (Agedge_s) ND_flat_out(n).getFromList(k))!=null; k++) { setflags(e, 2, 0, 128); edges.plus(n_edges++).setPtr(e); if (n_edges % 128 == 0) edges = ALLOC_empty (n_edges + 128, edges, Agedge_s.class); } if (ND_other(n).listNotNull()) { /* In position, each node has its rw stored in mval and, * if a node is part of a loop, rw may be increased to * reflect the loops and associated labels. We restore * the original value here. */ if (ND_node_type(n) == 0) { double tmp = ND_rw(n); ND_rw(n, ND_mval(n)); ND_mval(n, tmp); } for (k = 0; (e = (Agedge_s) ND_other(n).getFromList(k))!=null; k++) { setflags(e, 0, 0, 128); edges.plus(n_edges++).setPtr(e); if (n_edges % 128 == 0) edges = ALLOC_empty (n_edges + 128, edges, Agedge_s.class); } } } } /* Sort so that equivalent edges are contiguous. * Equivalence should basically mean that 2 edges have the * same set {(tailnode,tailport),(headnode,headport)}, or * alternatively, the edges would be routed identically if * routed separately. */ LOG2("_dot_splines::n_edges="+n_edges); qsort(edges, n_edges, sizeof(edges.plus(0)), function(dotsplines__c.class, "edgecmp")); /* FIXME: just how many boxes can there be? */ P.setPtr("boxes", zmalloc(sizeof(boxf.class, n_nodes + 20 * 2 * 9))); sd.setPtr("Rank_box", zmalloc(sizeof(boxf.class, i))); if (et == (1 << 1)) { /* place regular edge labels */ for (n = GD_nlist(g); n!=null; n = ND_next(n)) { if ((ND_node_type(n) == 1) && (ND_label(n)!=null)) { place_vnlabel(n); } } } for (i = 0; i < n_edges;) { boolean havePorts; ind = i; le0 = getmainedge((e0 = (Agedge_s) edges.plus(i++).getPtr())); if (ED_tail_port(e0).defined!=0 || ED_head_port(e0).defined!=0) { havePorts = NOT(false); ea = e0; } else { havePorts = false; ea = le0; } if ((ED_tree_index(ea) & 32)!=0) { MAKEFWDEDGE(fwdedgea.getStruct("out").amp(), ea); ea = (Agedge_s) fwdedgea.getStruct("out").amp(); } for (cnt = 1; i < n_edges; cnt++, i++) { if (NEQ(le0, (le1 = getmainedge((e1 = (Agedge_s) edges.plus(i).getPtr()))))) break; if (ED_adjacent(e0)!=0) continue; /* all flat adjacent edges at once */ if (ED_tail_port(e1).defined!=0 || ED_head_port(e1).defined!=0) { if (N(havePorts)) break; else eb = e1; } else { if (havePorts) break; else eb = le1; } if ((ED_tree_index(eb) & 32)!=0) { MAKEFWDEDGE(fwdedgeb.getStruct("out").amp(), eb); eb = (Agedge_s) fwdedgeb.getStruct("out").amp(); } if (portcmp(ED_tail_port(ea), ED_tail_port(eb))!=0) break; if (portcmp(ED_head_port(ea), ED_head_port(eb))!=0) break; if ((ED_tree_index(e0) & 15) == 2 && NEQ(ED_label(e0), ED_label(e1))) break; if ((ED_tree_index(edges.plus(i).getPtr()) & 64)!=0) /* Aha! -C is on */ break; } if (EQ(agtail(e0), aghead(e0))) { int b, sizey, r; n = agtail(e0); r = ND_rank(n); if (r == GD_maxrank(g)) { if (r > 0) sizey = (int) (ND_coord(GD_rank(g).plus(r-1).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y") - ND_coord(n).getDouble("y")); else sizey = (int) ND_ht(n); } else if (r == GD_minrank(g)) { sizey = (int)(ND_coord(n).getDouble("y") - ND_coord(GD_rank(g).plus(r+1).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y")); } else { int upy = (int) (ND_coord(GD_rank(g).plus(r-1).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y") - ND_coord(n).getDouble("y")); int dwny = (int) (ND_coord(n).getDouble("y") - ND_coord(GD_rank(g).plus(r+1).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y")); sizey = MIN(upy, dwny); } makeSelfEdge(P, edges, ind, cnt, sd.getInt("Multisep"), sizey/2, Z.z().sinfo.amp()); for (b = 0; b < cnt; b++) { e = (Agedge_s) edges.plus(ind+b).getPtr(); if (ED_label(e)!=null) updateBB(g, ED_label(e)); } } else if (ND_rank(agtail(e0)) == ND_rank(aghead(e0))) { make_flat_edge(g, sd.amp(), P, edges, ind, cnt, et); } else make_regular_edge(g, sd.amp(), P, edges, ind, cnt, et); } /* place regular edge labels */ for (n = GD_nlist(g); n!=null; n = ND_next(n)) { if ((ND_node_type(n) == 1) && (ND_label(n))!=null) { place_vnlabel(n); updateBB(g, ND_label(n)); } } /* normalize splines so they always go from tail to head */ /* place_portlabel relies on this being done first */ if (normalize!=0) edge_normalize(g); finish : /* vladimir: place port labels */ /* FIX: head and tail labels are not part of cluster bbox */ if ((Z.z().E_headlabel!=null || Z.z().E_taillabel!=null) && (Z.z().E_labelangle!=null || Z.z().E_labeldistance!=null)) { UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("54jm4bbgzyl0txauszo1mappu"); // if (E_headlabel) { UNSUPPORTED("dw8yu56thd0wpolmtby8r5doo"); // for (e = agfstin(g, n); e; e = agnxtin(g, e)) UNSUPPORTED("4h39n1vkqyqszgmg2o7d2pw7z"); // if (ED_head_label(AGMKOUT(e))) { UNSUPPORTED("ex7h0x60y0l4oi3dsqg7sfk1t"); // place_portlabel(AGMKOUT(e), NOT(0)); UNSUPPORTED("9u960ou1xs0cdsdn0qe8a13ye"); // updateBB(g, ED_head_label(AGMKOUT(e))); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("cqi8doquf015wo1bw8on36qct"); // if (E_taillabel) { UNSUPPORTED("6gnq0yj07udpwxbuc86k8yysb"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("ejz8yrj8mh0l0gdl5zeaht1ex"); // if (ED_tail_label(e)) { UNSUPPORTED("9pdg7peez077ldl84zfh73o1w"); // if (place_portlabel(e, 0)) UNSUPPORTED("6jup6d9gfnx4b1wptmtw09n6w"); // updateBB(g, ED_tail_label(e)); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } } /* end vladimir */ if (et != (2 << 1)) { Memory.free(edges); Memory.free(P.getPtr("boxes")); Memory.free(P); Memory.free(sd.getPtr("Rank_box")); routesplinesterm(); } Z.z().State = 1; Z.z().EdgeLabelsDone = 1; } finally { LEAVING("6agx6m2qof9lg57co232lwakj","_dot_splines"); } } //3 5n306wbdfjbfnimdo9lg6jjaa // void dot_splines(graph_t * g) public static void dot_splines(Agraph_s g) { ENTERING("5n306wbdfjbfnimdo9lg6jjaa","dot_splines"); try { _dot_splines (g, 1); } finally { LEAVING("5n306wbdfjbfnimdo9lg6jjaa","dot_splines"); } } //3 8jja9ukzsq8tlb9yy7uzavg91 // static void place_vnlabel(node_t * n) public static void place_vnlabel(Agnode_s n) { ENTERING("8jja9ukzsq8tlb9yy7uzavg91","place_vnlabel"); try { final __struct__ dimen = JUtils.from(pointf.class); double width; Agedge_s e; if (ND_in(n).size == 0) return; /* skip flat edge labels here */ for (e = (Agedge_s) ND_out(n).getFromList(0); ED_edge_type(e) != 0; e = ED_to_orig(e)); dimen.___(ED_label(e).getStruct("dimen")); width = GD_flip(agraphof(n))!=0 ? dimen.getDouble("y") : dimen.getDouble("x"); ED_label(e).getStruct("pos").setDouble("x", ND_coord(n).getDouble("x") + width / 2.0); ED_label(e).getStruct("pos").setDouble("y", ND_coord(n).getDouble("y")); ED_label(e).setBoolean("set", NOT(false)); } finally { LEAVING("8jja9ukzsq8tlb9yy7uzavg91","place_vnlabel"); } } //3 598jn37hjkm7j0kcg2nmdvlwq // static void setflags(edge_t *e, int hint1, int hint2, int f3) public static void setflags(Agedge_s e, int hint1, int hint2, int f3) { ENTERING("598jn37hjkm7j0kcg2nmdvlwq","setflags"); try { int f1, f2; if (hint1 != 0) f1 = hint1; else { if (EQ(agtail(e), aghead(e))) if (ED_tail_port(e).defined!=0 || ED_head_port(e).defined!=0) f1 = 4; else f1 = 8; else if (ND_rank(agtail(e)) == ND_rank(aghead(e))) f1 = 2; else f1 = 1; } if (hint2 != 0) f2 = hint2; else { if (f1 == 1) f2 = (ND_rank(agtail(e)) < ND_rank(aghead(e))) ? 16 : 32; else if (f1 == 2) f2 = (ND_order(agtail(e)) < ND_order(aghead(e))) ? 16 : 32; else /* f1 == SELF*EDGE */ f2 = 16; } ED_tree_index(e, (f1 | f2 | f3)); } finally { LEAVING("598jn37hjkm7j0kcg2nmdvlwq","setflags"); } } //3 1nf1s6wkn35ptjn884ii56fh // static int edgecmp(edge_t** ptr0, edge_t** ptr1) public static int edgecmp(__ptr__ ptr0, __ptr__ ptr1) { ENTERING("1nf1s6wkn35ptjn884ii56fh","edgecmp"); try { final __struct__ fwdedgeai = JUtils.from(Agedgeinfo_t.class), fwdedgebi = JUtils.from(Agedgeinfo_t.class); final __struct__ fwdedgea = JUtils.from(Agedgepair_s.class), fwdedgeb = JUtils.from(Agedgepair_s.class); Agedge_s e0, e1, ea, eb, le0, le1; int et0, et1, v0, v1, rv; double t0, t1; fwdedgea.getStruct("out").getStruct("base").setPtr("data", fwdedgeai.amp()); fwdedgeb.getStruct("out").getStruct("base").setPtr("data", fwdedgebi.amp()); e0 = (Agedge_s) ptr0.getPtr(); e1 = (Agedge_s) ptr1.getPtr(); et0 = ED_tree_index(e0) & 15; et1 = ED_tree_index(e1) & 15; if (et0 != et1) return (et1 - et0); le0 = getmainedge(e0); le1 = getmainedge(e1); t0 = ND_rank(agtail(le0)) - ND_rank(aghead(le0)); t1 = ND_rank(agtail(le1)) - ND_rank(aghead(le1)); v0 = ABS((int)t0); /* ugly, but explicit as to how we avoid equality tests on fp numbers */ v1 = ABS((int)t1); if (v0 != v1) return (v0 - v1); t0 = ND_coord(agtail(le0)).getDouble("x") - ND_coord(aghead(le0)).getDouble("x"); t1 = ND_coord(agtail(le1)).getDouble("x") - ND_coord(aghead(le1)).getDouble("x"); v0 = ABS((int)t0); v1 = ABS((int)t1); if (v0 != v1) return (v0 - v1); /* This provides a cheap test for edges having the same set of endpoints. */ if (AGSEQ(le0) != AGSEQ(le1)) return (AGSEQ(le0) - AGSEQ(le1)); ea = (ED_tail_port(e0).defined!=0 || ED_head_port(e0).defined!=0) ? e0 : le0; if ((ED_tree_index(ea) & 32)!=0) { MAKEFWDEDGE(fwdedgea.getStruct("out").amp(), ea); ea = fwdedgea.getStruct("out").amp(); } eb = (ED_tail_port(e1).defined!=0 || ED_head_port(e1).defined!=0) ? e1 : le1; if ((ED_tree_index(eb) & 32)!=0) { MAKEFWDEDGE(fwdedgeb.getStruct("out").amp(), eb); eb = fwdedgeb.getStruct("out").amp(); } if ((rv = portcmp(ED_tail_port(ea), ED_tail_port(eb)))!=0) return rv; if ((rv = portcmp(ED_head_port(ea), ED_head_port(eb)))!=0) return rv; et0 = ED_tree_index(e0) & 192; et1 = ED_tree_index(e1) & 192; if (et0 != et1) return (et0 - et1); if (et0 == 2 && NEQ(ED_label(e0), ED_label(e1))) UNSUPPORTED("return (int) (ED_label(e0) - ED_label(e1))"); return (AGSEQ(e0) - AGSEQ(e1)); } finally { LEAVING("1nf1s6wkn35ptjn884ii56fh","edgecmp"); } } //3 djq8tev8thshox7bob64vi0tf // static void setState (graph_t* auxg, attr_state_t* attr_state) public static Object setState(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("7ovh16jwyjc9wtu0rfxnlws9r"); // setState (graph_t* auxg, attr_state_t* attr_state) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1ko3jd94xpoli03tk73ardy84"); // /* save state */ UNSUPPORTED("3ibgalw3fchq736xx1ozbvh27"); // attr_state->E_constr = E_constr; UNSUPPORTED("e9yatqfh98i71w3v1jcx1agi9"); // attr_state->E_samehead = E_samehead; UNSUPPORTED("57rkvwknyk9urdhck24todttg"); // attr_state->E_sametail = E_sametail; UNSUPPORTED("4y5i0lqx0ze46l88ehzdh2x1z"); // attr_state->E_weight = E_weight; UNSUPPORTED("3yryq1e1hmam5hqciu93ywjj2"); // attr_state->E_minlen = E_minlen; UNSUPPORTED("1n91lxusirg2v758j4v9o9hcg"); // attr_state->E_fontcolor = E_fontcolor; UNSUPPORTED("1ssj9fq3o1sm21ggttj4r3mo0"); // attr_state->E_fontname = E_fontname; UNSUPPORTED("45ntpz46gx7j2hfu2r6ceescw"); // attr_state->E_fontsize = E_fontsize; UNSUPPORTED("6vxi0wxhhjg065ishw2vebsqv"); // attr_state->E_headclip = E_headclip; UNSUPPORTED("aqu557ovwt2k4j894b5p9dssa"); // attr_state->E_headlabel = E_headlabel; UNSUPPORTED("6shb2vynxxgck2x8e8oz63ye"); // attr_state->E_label = E_label; UNSUPPORTED("84eq22wy1zlxwofo8cwwbddbb"); // attr_state->E_label_float = E_label_float; UNSUPPORTED("czndn89byb90jujvx2sudb6d6"); // attr_state->E_labelfontcolor = E_labelfontcolor; UNSUPPORTED("385rz6p4kom75dmgvepqmxlrq"); // attr_state->E_labelfontname = E_labelfontname; UNSUPPORTED("397fs88n9xnlcqo4z8at7j66s"); // attr_state->E_labelfontsize = E_labelfontsize; UNSUPPORTED("f2nu6sif9lmukmlj2um7gnxns"); // attr_state->E_tailclip = E_tailclip; UNSUPPORTED("3ctu9gb3ojun885w9ymnch0er"); // attr_state->E_taillabel = E_taillabel; UNSUPPORTED("qiafl7ru9bq54qol6lov5rgm"); // attr_state->E_xlabel = E_xlabel; UNSUPPORTED("ap9hj5xd4dfmwws8egpgvk5ti"); // attr_state->N_height = N_height; UNSUPPORTED("ctvaloqgyn45in0jdkkvdpf6g"); // attr_state->N_width = N_width; UNSUPPORTED("75ey3ud905155tfmw9zapeawj"); // attr_state->N_shape = N_shape; UNSUPPORTED("19bnzpge8znnwzna8ub6otjze"); // attr_state->N_style = N_style; UNSUPPORTED("6242e8neunx553zs7jb52e2i3"); // attr_state->N_fontsize = N_fontsize; UNSUPPORTED("1rjcall3fixy49t0s4bcdgoho"); // attr_state->N_fontname = N_fontname; UNSUPPORTED("1bj2vtyz3gettntmktngyjv02"); // attr_state->N_fontcolor = N_fontcolor; UNSUPPORTED("1mj5q5f1eft9otmsuyiadl54z"); // attr_state->N_label = N_label; UNSUPPORTED("5lkkhmgpur2i2arkoxbpb8lse"); // attr_state->N_xlabel = N_xlabel; UNSUPPORTED("3c9tzymzuj2wkftyepa2epzur"); // attr_state->N_showboxes = N_showboxes; UNSUPPORTED("9urvz64idw6yth9938puegx1d"); // attr_state->N_ordering = N_ordering; UNSUPPORTED("9wqn3lttroloie8t4urgw9dwl"); // attr_state->N_sides = N_sides; UNSUPPORTED("7aovr97vmuic712quqt6n4gkd"); // attr_state->N_peripheries = N_peripheries; UNSUPPORTED("dc9knw1esnnr7j77so6k8zblk"); // attr_state->N_skew = N_skew; UNSUPPORTED("eoium8gqo2cgsjv87c20ixx5k"); // attr_state->N_orientation = N_orientation; UNSUPPORTED("aq6is6cduc5wvclu1hjacuyk0"); // attr_state->N_distortion = N_distortion; UNSUPPORTED("3w13k0cqxkk8gniu6ydy3qii6"); // attr_state->N_fixed = N_fixed; UNSUPPORTED("32p2drvqb6h9n0118du912gv0"); // attr_state->N_nojustify = N_nojustify; UNSUPPORTED("e2hsbuo1kd2fghtopje0lfp2b"); // attr_state->N_group = N_group; UNSUPPORTED("74w0uzukx3derbgpgi60dzyyg"); // attr_state->State = State; UNSUPPORTED("936fjorw02qiz50qpj7y6en2m"); // attr_state->G_ordering = G_ordering; UNSUPPORTED("2l0v2tecrgmws3to99rcimxzm"); // E_constr = NULL; UNSUPPORTED("93dfyiz6pxq59j6ujx97hdd0c"); // E_samehead = agattr(auxg,AGEDGE, "samehead", NULL); UNSUPPORTED("7kovxag1wgr874sgxwpz7ls6a"); // E_sametail = agattr(auxg,AGEDGE, "sametail", NULL); UNSUPPORTED("295z0g5v309fbrrdopfy66rf4"); // E_weight = agattr(auxg,AGEDGE, "weight", NULL); UNSUPPORTED("3uo53r92k5fuzy9gb2i1k7612"); // if (!E_weight) UNSUPPORTED("4oq1f4cnu0hk0xm34kx9m79le"); // E_weight = agattr (auxg,AGEDGE,"weight", ""); UNSUPPORTED("aoqamti27wg8hvpyho5xmdc9"); // E_minlen = NULL; UNSUPPORTED("8jzaf5sdfgbpqx8y0squconvr"); // E_fontcolor = NULL; UNSUPPORTED("25csaeghkl1rd5cha609fm2vm"); // E_fontname = (agattr(auxg,AGEDGE,"fontname",NULL)); UNSUPPORTED("d9ivs4hv5xdhsxwh8oz1dri02"); // E_fontsize = (agattr(auxg,AGEDGE,"fontsize",NULL)); UNSUPPORTED("djpd3vd7suatk0n76mplhzog4"); // E_headclip = (agattr(auxg,AGEDGE,"headclip",NULL)); UNSUPPORTED("8fy5jrgw22q72jvvjmqh6ajjb"); // E_headlabel = NULL; UNSUPPORTED("93a15wlfj0tmijeeyd1qb12v6"); // E_label = (agattr(auxg,AGEDGE,"label",NULL)); UNSUPPORTED("2l6gmyi1pz4cv9i29k4u3mpjf"); // E_label_float = (agattr(auxg,AGEDGE,"label_float",NULL)); UNSUPPORTED("dcp5qxpq37yer9cipch7q2oc4"); // E_labelfontcolor = NULL; UNSUPPORTED("133ni5qwdb96od0wcma7hj05h"); // E_labelfontname = (agattr(auxg,AGEDGE,"labelfontname",NULL)); UNSUPPORTED("cq9n4kf29qgqy1ll6gandld7f"); // E_labelfontsize = (agattr(auxg,AGEDGE,"labelfontsize",NULL)); UNSUPPORTED("2l9pqb0sug1sr8dlojy1gvik0"); // E_tailclip = (agattr(auxg,AGEDGE,"tailclip",NULL)); UNSUPPORTED("9a173t42nyif5cx0ee6c4qos2"); // E_taillabel = NULL; UNSUPPORTED("pu58ta2e8cevjt84brxtyecs"); // E_xlabel = NULL; UNSUPPORTED("2p7j1fghgsib6tkic2cc1t601"); // N_height = (agattr(auxg,AGNODE,"height",NULL)); UNSUPPORTED("49eok3z6e4piel4m6f7rk8fb6"); // N_width = (agattr(auxg,AGNODE,"width",NULL)); UNSUPPORTED("8cyc904mtcb0zlwybzrqxujrv"); // N_shape = (agattr(auxg,AGNODE,"shape",NULL)); UNSUPPORTED("1ggb495lty2zumaw3qh2d3ssd"); // N_style = NULL; UNSUPPORTED("6hcb194pxn8upijardzdy3v2a"); // N_fontsize = (agattr(auxg,AGNODE,"fontsize",NULL)); UNSUPPORTED("e1cg6m56w3uwo3m2dfdh71o5x"); // N_fontname = (agattr(auxg,AGNODE,"fontname",NULL)); UNSUPPORTED("1gjzz1tv51zd3vsgyc6b8dfdz"); // N_fontcolor = NULL; UNSUPPORTED("42y8wmut30tkdxrxdvh5v8xtz"); // N_label = (agattr(auxg,AGNODE,"label",NULL)); UNSUPPORTED("7jni9lzv0nagk8mnil6vsgzpt"); // N_xlabel = NULL; UNSUPPORTED("5hshk2a2mwuk7cjxsc4mzky7g"); // N_showboxes = NULL; UNSUPPORTED("1j63bq1sarpj53iwvo4ynyeck"); // N_ordering = (agattr(auxg,AGNODE,"ordering",NULL)); UNSUPPORTED("7yaoaugb8cqh7ksl8w4i4utlv"); // N_sides = (agattr(auxg,AGNODE,"sides",NULL)); UNSUPPORTED("15x8xrchzah7wcc5ukej42hut"); // N_peripheries = (agattr(auxg,AGNODE,"peripheries",NULL)); UNSUPPORTED("dcu49fws0uvo8falspy1lno4k"); // N_skew = (agattr(auxg,AGNODE,"skew",NULL)); UNSUPPORTED("bvjg1ch1pmuvfhvf5ubyrqhl3"); // N_orientation = (agattr(auxg,AGNODE,"orientation",NULL)); UNSUPPORTED("b67lzfds2wabbxqa4qaoj0iv8"); // N_distortion = (agattr(auxg,AGNODE,"distortion",NULL)); UNSUPPORTED("yet2s8h61hoih7vba5lhvbn"); // N_fixed = (agattr(auxg,AGNODE,"fixed",NULL)); UNSUPPORTED("dv9ccs2r6bgkfuzvquyym1z1k"); // N_nojustify = NULL; UNSUPPORTED("7kwmsq3m3f4oe4jyi2hzkq544"); // N_group = NULL; UNSUPPORTED("3lqtt3u3nf2945mjpkjcw6s48"); // G_ordering = (agattr(auxg,AGRAPH,"ordering",NULL)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 14hhte1l3zo45pzop5ugwahiv // static graph_t* cloneGraph (graph_t* g, attr_state_t* attr_state) public static Object cloneGraph(Object... arg) { UNSUPPORTED("9bkg8lvj5zr49zg08g7iijeg0"); // static graph_t* UNSUPPORTED("4uq8e6159vvwjuygnnrtonzjr"); // cloneGraph (graph_t* g, attr_state_t* attr_state) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("d4lkyrfdivg76lnwroshuwy1r"); // Agsym_t* sym; UNSUPPORTED("8scmnlh4aqjfli9hjn7snnhb2"); // graph_t* auxg; UNSUPPORTED("9wn75gbfikchs3m5ip8uqbqp9"); // if (agisdirected(g)) UNSUPPORTED("bc2kavqqh860759qs0rw39g9w"); // auxg = agopen ("auxg",Agdirected, ((Agdisc_t *)0)); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("41dm8ksorga6af1u82vvp2o08"); // auxg = agopen ("auxg",Agundirected, ((Agdisc_t *)0)); UNSUPPORTED("dvx3r3ba8ihb3ho0irr3iflz9"); // agbindrec(auxg, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); UNSUPPORTED("8o4tyxwwt6nurmyulizd8yx4h"); // agattr(auxg, AGRAPH, "rank", ""); UNSUPPORTED("4azamavz8yei4klxixxjkjdzy"); // GD_drawing(auxg) = (layout_t*)zmalloc(sizeof(layout_t)); UNSUPPORTED("bl2bbfcsejbdva171i3uuah14"); // GD_drawing(auxg)->quantum = GD_drawing(g)->quantum; UNSUPPORTED("96jzn981deono0qtt4353wjnd"); // GD_drawing(auxg)->dpi = GD_drawing(g)->dpi; UNSUPPORTED("am2ry0w98859w4vlnhjmoegj2"); // GD_charset(auxg) = GD_charset (g); UNSUPPORTED("8qqdurbqk0iszxbs1xz13bx72"); // if (GD_flip(g)) UNSUPPORTED("dldh0wwkfscuwx8vmqd78zne6"); // (GD_rankdir2(auxg) = 0); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("a1gxjxg6ob083fwqk6gac69va"); // (GD_rankdir2(auxg) = 1); UNSUPPORTED("94df1x35koj4u57phwmdtoipp"); // GD_nodesep(auxg) = GD_nodesep(g); UNSUPPORTED("m7a4df7fb58fj3qpf7ocrnth"); // GD_ranksep(auxg) = GD_ranksep(g); UNSUPPORTED("ehand70vpsfxy8xo2usw3sdpd"); // //copy node attrs to auxg UNSUPPORTED("ee6l5a5uekrqgzpa1tzzvn8lu"); // sym=agnxtattr(agroot(g),AGNODE,NULL); //get the first attr. UNSUPPORTED("e9gle5ohw021fnltrv101u94f"); // for (; sym; sym = agnxtattr(agroot(g),AGNODE,sym)) UNSUPPORTED("4mgrl284otjjxa13ifyvsix9o"); // agattr (auxg, AGNODE,sym->name, sym->defval); UNSUPPORTED("8l0npxgg53xbodt3h5bsxaf1u"); // //copy edge attributes UNSUPPORTED("d0l2zhgn9atu49ot95sjvnjx7"); // sym=agnxtattr(agroot(g),AGEDGE,NULL); //get the first attr. UNSUPPORTED("2syhqyxjtl43g8k8nszcgv3qa"); // for (; sym; sym = agnxtattr(agroot(g),AGEDGE,sym)) UNSUPPORTED("7ne23vf4nlppvlnjcbkj9xj7s"); // agattr (auxg, AGEDGE,sym->name, sym->defval); UNSUPPORTED("dbdwjxpzch7ieese5oq712h84"); // if (!agattr(auxg,AGEDGE, "headport", NULL)) UNSUPPORTED("8e9itu32gwm54e46x9vefuuc"); // agattr(auxg,AGEDGE, "headport", ""); UNSUPPORTED("8d6592shcigbk3cnbs3g6zd5o"); // if (!agattr(auxg,AGEDGE, "tailport", NULL)) UNSUPPORTED("1afdsvho7rpgcscq77epwq7h0"); // agattr(auxg,AGEDGE, "tailport", ""); UNSUPPORTED("8g7yfvh0djzbxpsk11iys8s73"); // setState (auxg, attr_state); UNSUPPORTED("84c7zokshe6lxrxoh1l48oh0b"); // return auxg; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 75bd23hms71i6w46oddi0v7c7 // static void cleanupCloneGraph (graph_t* g, attr_state_t* attr_state) public static Object cleanupCloneGraph(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("8l276u9l2gpbol4c2u457ic4o"); // cleanupCloneGraph (graph_t* g, attr_state_t* attr_state) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("81hz17qm480gekbimxzqp5917"); // /* restore main graph syms */ UNSUPPORTED("dyp7mrvrp7pgbjcxvjp3k0rb0"); // E_constr = attr_state->E_constr; UNSUPPORTED("8x6a3xddh4y42i73tahevx314"); // E_samehead = attr_state->E_samehead; UNSUPPORTED("cr53qmp35pahyiy1lksf7pc7o"); // E_sametail = attr_state->E_sametail; UNSUPPORTED("3x6ebo3n7gp5ys2ei418ehbmt"); // E_weight = attr_state->E_weight; UNSUPPORTED("1ho97fsth1t5vvxc5xlwbtvyp"); // E_minlen = attr_state->E_minlen; UNSUPPORTED("bfo2q1yt9zej3021f132mqwe6"); // E_fontcolor = attr_state->E_fontcolor; UNSUPPORTED("caxxsouex07crddgxredl1u2p"); // E_fontname = attr_state->E_fontname; UNSUPPORTED("etmu0sib2tphqwe1wujlnfrup"); // E_fontsize = attr_state->E_fontsize; UNSUPPORTED("6gb56lwdjjgzcqilrpq8m22ns"); // E_headclip = attr_state->E_headclip; UNSUPPORTED("7arkupsho8bk69qdlx5osz58q"); // E_headlabel = attr_state->E_headlabel; UNSUPPORTED("8dbqaxdoyj9z0pkuwsg9vl0eu"); // E_label = attr_state->E_label; UNSUPPORTED("k2wg526i4loudvbn7p6a8e68"); // E_label_float = attr_state->E_label_float; UNSUPPORTED("2tux1z7sjyb58ty6c0bvgfn7u"); // E_labelfontcolor = attr_state->E_labelfontcolor; UNSUPPORTED("exlraaiion456s8e3xwpxozb4"); // E_labelfontname = attr_state->E_labelfontname; UNSUPPORTED("31yhqytdbu2odz0oi3cudffo1"); // E_labelfontsize = attr_state->E_labelfontsize; UNSUPPORTED("frcohw4vy68cah25ckm1cobw"); // E_tailclip = attr_state->E_tailclip; UNSUPPORTED("2z89ojbnte8kwtr9jotk499fc"); // E_taillabel = attr_state->E_taillabel; UNSUPPORTED("3ujqfey1gvz17vmhn9w63qxob"); // E_xlabel = attr_state->E_xlabel; UNSUPPORTED("atq6bae3mv1qr8egljjfsrit6"); // N_height = attr_state->N_height; UNSUPPORTED("aiqf0nz6dfedq2jwgmajnranb"); // N_width = attr_state->N_width; UNSUPPORTED("dt3zktdkst02y23fr3owwe9b9"); // N_shape = attr_state->N_shape; UNSUPPORTED("6pul6vxncmyc96hnj7hoh9xlv"); // N_style = attr_state->N_style; UNSUPPORTED("bbr363noiuq4fiv6dc11hrgki"); // N_fontsize = attr_state->N_fontsize; UNSUPPORTED("5jr71bz21o8ex4piwuj7cyf35"); // N_fontname = attr_state->N_fontname; UNSUPPORTED("muitbco7ytv8yr71bth3vd45"); // N_fontcolor = attr_state->N_fontcolor; UNSUPPORTED("gz675ugjp8z2xgply33d6llr"); // N_label = attr_state->N_label; UNSUPPORTED("3l56ed3d2ocqttxq2mwcaxrs"); // N_xlabel = attr_state->N_xlabel; UNSUPPORTED("2fmh1t4tflmptq1d2wqygd7qt"); // N_showboxes = attr_state->N_showboxes; UNSUPPORTED("br7qgmqsjpzi772b9wc7g00x0"); // N_ordering = attr_state->N_ordering; UNSUPPORTED("cpjgwylhr8d4gvztykf36mf71"); // N_sides = attr_state->N_sides; UNSUPPORTED("dzvcridjcoqlimn9odmlcn9ao"); // N_peripheries = attr_state->N_peripheries; UNSUPPORTED("7wd3t9ok31e37hdqtnffwum66"); // N_skew = attr_state->N_skew; UNSUPPORTED("bkocxpinr1crae21mcidps0"); // N_orientation = attr_state->N_orientation; UNSUPPORTED("bni1bp9we328ofu8dqwnws3b8"); // N_distortion = attr_state->N_distortion; UNSUPPORTED("9ni0gtudygio7exe31uyvwwxy"); // N_fixed = attr_state->N_fixed; UNSUPPORTED("2ep79qyr9wgfu8hyateqngx4o"); // N_nojustify = attr_state->N_nojustify; UNSUPPORTED("77t5uu3931h080u18f50zr0qw"); // N_group = attr_state->N_group; UNSUPPORTED("1czw51da8yggj3mvb5v6dircs"); // G_ordering = attr_state->G_ordering; UNSUPPORTED("60kkiysc7uy667s1kr04csskc"); // State = attr_state->State; UNSUPPORTED("9wfeu3yikah30i1eq789pb1dc"); // free (attr_state); UNSUPPORTED("2tv8es032rxzavamw0dgvm53h"); // dot_cleanup(g); UNSUPPORTED("ego3r1tvwrpv2hie8y9p8vq4z"); // agclose(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 19tqa2ag8idq1y6l3zslax8e8 // static node_t* cloneNode (graph_t* g, node_t* orign, int flipped) public static Object cloneNode(Object... arg) { UNSUPPORTED("b9dd3satxbh59hljdxzcxecc"); // static node_t* UNSUPPORTED("o807sh2podu4gxrp6mweyg3p"); // cloneNode (graph_t* g, node_t* orign, int flipped) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9mlzre34kwhn9wm44mck7e8li"); // node_t* n = agnode(g, agnameof(orign),1); UNSUPPORTED("21wqfabmz2qk7g2vnunyyw1n8"); // agbindrec(n, "Agnodeinfo_t", sizeof(Agnodeinfo_t), NOT(0)); UNSUPPORTED("80tteudx6zbkyxy4erhh0fqeo"); // agcopyattr (orign, n); UNSUPPORTED("65o4lsnpkxraq4wik0gzbv3g3"); // if (shapeOf(orign) == SH_RECORD) { UNSUPPORTED("7w0wn4e9gizbzrsqcre4pnx7"); // int lbllen = strlen(ND_label(orign)->text); UNSUPPORTED("3avq2zh3wpi2nrhofz3l9esev"); // char* buf = (char*)gmalloc((lbllen+3)*sizeof(char)); UNSUPPORTED("bbilsao6wizinl5kripcoya9d"); // sprintf (buf, "{%s}", ND_label(orign)->text); UNSUPPORTED("e93wd087tiy2p8rvqlme93ynm"); // agset (n, "label", buf); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("69hc24ic55i66g8tf2ne42327"); // return n; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eqzwnj9u1k6ij1842mph3kly9 // static edge_t* cloneEdge (graph_t* g, node_t* tn, node_t* hn, edge_t* orig) public static Object cloneEdge(Object... arg) { UNSUPPORTED("adyfsyiyu158mwhrtm33biik2"); // static edge_t* UNSUPPORTED("cpg8ogbdq9zzrqiadh2q271ky"); // cloneEdge (graph_t* g, node_t* tn, node_t* hn, edge_t* orig) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("mdnixwzb9bm22acv2mbc4yo2"); // edge_t* e = agedge(g, tn, hn,NULL,1); UNSUPPORTED("ce403szny1a2xoli6uh7ocakq"); // /* for (; ED_edge_type(orig) != NORMAL; orig = ED_to_orig(orig)); */ UNSUPPORTED("554nt9t4qnutd0wixwbpok522"); // agbindrec(e, "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0)); UNSUPPORTED("6yfr23jllhpfychz887mht80b"); // agcopyattr (orig, e); UNSUPPORTED("4v614d3uabme2jyn0anuritbb"); // /* UNSUPPORTED("jgkgn8228j52jq4wc7yo2q8t"); // if (orig->tail != ND_alg(tn)) { UNSUPPORTED("86dayio2rrehbyot92z4xh4d1"); // char* hdport = agget (orig, HEAD_ID); UNSUPPORTED("39vbjr08q96wugxyva077qpok"); // char* tlport = agget (orig, TAIL_ID); UNSUPPORTED("3z0livr6yj8gkkuxtvqwrqy95"); // agset (e, TAIL_ID, (hdport ? hdport : "")); UNSUPPORTED("dilecd9q5c2tj0pnl7tfwgixx"); // agset (e, HEAD_ID, (tlport ? tlport : "")); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bnetqzovnscxile7ao44kc0qd"); // */ UNSUPPORTED("2bswif6w6ot01ynlvkimntfly"); // return e; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3zb2qrqaqzr6n3m7dgxp4pmrp // static pointf transformf (pointf p, pointf del, int flip) public static Object transformf(Object... arg) { UNSUPPORTED("2zzd7mrm2u540dwuyzehozffj"); // static pointf UNSUPPORTED("a59oomtgi9wbd42kpsaaref6e"); // transformf (pointf p, pointf del, int flip) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9wlzvfxuhvsgkkq6lvlrw01d2"); // if (flip) { UNSUPPORTED("3vhnqvj1whk5vk9hofkhjtksr"); // double i = p.x; UNSUPPORTED("9sla4yejg4e4tlklijoil9k4u"); // p.x = p.y; UNSUPPORTED("688l858wkw5j2uqosjyesr15h"); // p.y = -i; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("890s36h0fh77q487p72cjtyz"); // return add_pointf(p, del); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bmsa24i3avg14po4sp17yh89k // static int edgelblcmpfn(edge_t** ptr0, edge_t** ptr1) public static int edgelblcmpfn(__ptr__ ptr0, __ptr__ ptr1) { ENTERING("bmsa24i3avg14po4sp17yh89k","edgelblcmpfn"); try { Agedge_s e0, e1; final __struct__ sz0 = JUtils.from(pointf.class), sz1 = JUtils.from(pointf.class); e0 = (Agedge_s) ptr0.getPtr(); e1 = (Agedge_s) ptr1.getPtr(); if (ED_label(e0)!=null) { if (ED_label(e1)!=null) { sz0.___(ED_label(e0).getStruct("dimen")); sz1.___(ED_label(e1).getStruct("dimen")); if (sz0.getDouble("x") > sz1.getDouble("x")) return -1; else if (sz0.getDouble("x") < sz1.getDouble("x")) return 1; else if (sz0.getDouble("y") > sz1.getDouble("y")) return -1; else if (sz0.getDouble("y") < sz1.getDouble("y")) return 1; else return 0; } else return -1; } else if (ED_label(e1)!=null) { return 1; } else return 0; } finally { LEAVING("bmsa24i3avg14po4sp17yh89k","edgelblcmpfn"); } } //3 3xmylrnypvoqrj2yrxnomsj5k // static void makeSimpleFlatLabels (node_t* tn, node_t* hn, edge_t** edges, int ind, int cnt, int et, int n_lbls) public static void makeSimpleFlatLabels(Agnode_s tn, Agnode_s hn, __ptr__ edges, int ind, int cnt, int et, int n_lbls) { ENTERING("3xmylrnypvoqrj2yrxnomsj5k","makeSimpleFlatLabels"); try { pointf ps; final __struct__ poly = JUtils.from(Ppoly_t.class); int pn[] = new int[1]; Agedge_s e = (Agedge_s) edges.plus(ind).getPtr(); final __array_of_struct__ points = __array_of_struct__.malloc(pointf.class, 10); final __struct__ tp = JUtils.from(pointf.class), hp = JUtils.from(pointf.class); int i, pointn; double leftend, rightend, ctrx=0, ctry=0, miny, maxy; double uminx=0, umaxx=0; double lminx=0, lmaxx=0; __ptr__ earray = zmalloc(sizeof_starstar_empty(Agedge_s.class, cnt)); for (i = 0; i < cnt; i++) { earray.plus(i).setPtr(edges.plus(ind + i).getPtr()); } qsort(earray, cnt, sizeof(earray.plus(0)), function(dotsplines__c.class, "edgelblcmpfn")); tp.___(add_pointf(ND_coord(tn), ED_tail_port(e).getStruct("p"))); hp.___(add_pointf(ND_coord(hn), ED_head_port(e).getStruct("p"))); leftend = tp.getDouble("x")+ND_rw(tn); rightend = hp.getDouble("x")-ND_lw(hn); ctrx = (leftend + rightend)/2.0; /* do first edge */ e = (Agedge_s) earray.plus(0).getPtr(); pointn = 0; points.plus(pointn++).setStruct(tp); points.plus(pointn++).setStruct(tp); points.plus(pointn++).setStruct(hp); points.plus(pointn++).setStruct(hp); clip_and_install(e, aghead(e), points.asPtr(), pointn, Z.z().sinfo.amp()); ED_label(e).getStruct("pos").setDouble("x", ctrx); ED_label(e).getStruct("pos").setDouble("y", tp.getDouble("y") + (ED_label(e).getStruct("dimen").getDouble("y")+6)/2.0); ED_label(e).setBoolean("set", NOT(false)); miny = tp.getDouble("y") + 6/2.0; maxy = miny + ED_label(e).getStruct("dimen").getDouble("y"); uminx = ctrx - (ED_label(e).getStruct("dimen").getDouble("x"))/2.0; umaxx = ctrx + (ED_label(e).getStruct("dimen").getDouble("x"))/2.0; for (i = 1; i < n_lbls; i++) { e = (Agedge_s) earray.plus(i).getPtr(); if (i%2!=0) { /* down */ if (i == 1) { lminx = ctrx - (ED_label(e).getStruct("dimen").getDouble("x"))/2.0; lmaxx = ctrx + (ED_label(e).getStruct("dimen").getDouble("x"))/2.0; } miny -= 6 + ED_label(e).getStruct("dimen").getDouble("y"); points.plus(0).setStruct(tp); points.plus(1).setDouble("x", tp.getDouble("x")); points.plus(1).setDouble("y", miny - 6); points.plus(2).setDouble("x", hp.getDouble("x")); points.plus(2).setDouble("y", points.plus(1).getDouble("y")); points.plus(3).setStruct(hp); points.plus(4).setDouble("x", lmaxx); points.plus(4).setDouble("y", hp.getDouble("y")); points.plus(5).setDouble("x", lmaxx); points.plus(5).setDouble("y", miny); points.plus(6).setDouble("x", lminx); points.plus(6).setDouble("y", miny); points.plus(7).setDouble("x", lminx); points.plus(7).setDouble("y", tp.getDouble("y")); ctry = miny + (ED_label(e).getStruct("dimen").getDouble("y"))/2.0; } else { /* up */ UNSUPPORTED("7owdudualx55z2cnm9x3iio0w"); // points[0] = tp; UNSUPPORTED("43w0zont6q3y1axlcy96rzm5x"); // points[1].x = uminx; UNSUPPORTED("285u4l65puy5nr3pgq6acl4i2"); // points[1].y = tp.y; UNSUPPORTED("uctdrwzmec4w6vmirs9on197"); // points[2].x = uminx; UNSUPPORTED("d9b8e2upja8koam9memys7nj1"); // points[2].y = maxy; UNSUPPORTED("e8a8ucdpq7sgmbi3qyldleb1s"); // points[3].x = umaxx; UNSUPPORTED("d7xd9vzbdbezltrxsp9a3byuc"); // points[3].y = maxy; UNSUPPORTED("59abeyxxk9ow1g6m45t4ahih7"); // points[4].x = umaxx; UNSUPPORTED("2lzgl5468xguophz9d5wyer2x"); // points[4].y = hp.y; UNSUPPORTED("41u0uroraw4xanvpgg6l74kyh"); // points[5].x = hp.x; UNSUPPORTED("cwkk5bnko3e1udrx4cb720zss"); // points[5].y = hp.y; UNSUPPORTED("eev7hf3617k74bnq18uiedyb0"); // points[6].x = hp.x; UNSUPPORTED("aqxt1dvgfq5zcptjwgx1b3mmq"); // points[6].y = maxy + 6; UNSUPPORTED("5s3o04yf5lzca6ruuygfxngj2"); // points[7].x = tp.x; UNSUPPORTED("56zheeat0b8mo4uvlcbvgbu80"); // points[7].y = maxy + 6; UNSUPPORTED("ehcig8trxc4ble6pcochubv7z"); // ctry = maxy + (ED_label(e)->dimen.y)/2.0 + 6; UNSUPPORTED("e2zgxycgqefryde9nbv6cqz1u"); // maxy += ED_label(e)->dimen.y + 6; } poly.setInt("pn", 8); poly.setPtr("ps", points.asPtr()); ps = simpleSplineRoute (tp, hp, poly, pn, et == (3 << 1)); if (pn[0] == 0) return; ED_label(e).getStruct("pos").setDouble("x", ctrx); ED_label(e).getStruct("pos").setDouble("y", ctry); ED_label(e).setBoolean("set", NOT(false)); clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo.amp()); } /* edges with no labels */ for (; i < cnt; i++) { e = (Agedge_s) earray.plus(i).getPtr(); if (i%2!=0) { /* down */ if (i == 1) { lminx = (2*leftend + rightend)/3.0; lmaxx = (leftend + 2*rightend)/3.0; } miny -= 6; points.plus(0).setStruct(tp); points.plus(1).setDouble("x", tp.getDouble("x")); points.plus(1).setDouble("y", miny - 6); points.plus(2).setDouble("x", hp.getDouble("x")); points.plus(2).setDouble("y", points.plus(1).getDouble("y")); points.plus(3).setStruct(hp); points.plus(4).setDouble("x", lmaxx); points.plus(4).setDouble("y", hp.getDouble("y")); points.plus(5).setDouble("x", lmaxx); points.plus(5).setDouble("y", miny); points.plus(6).setDouble("x", lminx); points.plus(6).setDouble("y", miny); points.plus(7).setDouble("x", lminx); points.plus(7).setDouble("y", tp.getDouble("y")); } else { /* up */ UNSUPPORTED("7owdudualx55z2cnm9x3iio0w"); // points[0] = tp; UNSUPPORTED("43w0zont6q3y1axlcy96rzm5x"); // points[1].x = uminx; UNSUPPORTED("285u4l65puy5nr3pgq6acl4i2"); // points[1].y = tp.y; UNSUPPORTED("uctdrwzmec4w6vmirs9on197"); // points[2].x = uminx; UNSUPPORTED("d9b8e2upja8koam9memys7nj1"); // points[2].y = maxy; UNSUPPORTED("e8a8ucdpq7sgmbi3qyldleb1s"); // points[3].x = umaxx; UNSUPPORTED("d7xd9vzbdbezltrxsp9a3byuc"); // points[3].y = maxy; UNSUPPORTED("59abeyxxk9ow1g6m45t4ahih7"); // points[4].x = umaxx; UNSUPPORTED("2lzgl5468xguophz9d5wyer2x"); // points[4].y = hp.y; UNSUPPORTED("41u0uroraw4xanvpgg6l74kyh"); // points[5].x = hp.x; UNSUPPORTED("cwkk5bnko3e1udrx4cb720zss"); // points[5].y = hp.y; UNSUPPORTED("eev7hf3617k74bnq18uiedyb0"); // points[6].x = hp.x; UNSUPPORTED("aqxt1dvgfq5zcptjwgx1b3mmq"); // points[6].y = maxy + 6; UNSUPPORTED("5s3o04yf5lzca6ruuygfxngj2"); // points[7].x = tp.x; UNSUPPORTED("56zheeat0b8mo4uvlcbvgbu80"); // points[7].y = maxy + 6; UNSUPPORTED("7un2qk34mmmhqi296vl50bacs"); // maxy += + 6; } poly.setInt("pn", 8); poly.setPtr("ps", points.asPtr()); ps = simpleSplineRoute (tp, hp, poly, pn, et == (3 << 1)); if (pn[0] == 0) return; clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo.amp()); } Memory.free (earray); } finally { LEAVING("3xmylrnypvoqrj2yrxnomsj5k","makeSimpleFlatLabels"); } } //3 8kqyzk43ovc2sq6jegua6ytp // static void makeSimpleFlat (node_t* tn, node_t* hn, edge_t** edges, int ind, int cnt, int et) public static void makeSimpleFlat(Agnode_s tn, Agnode_s hn, __ptr__ edges, int ind, int cnt, int et) { ENTERING("8kqyzk43ovc2sq6jegua6ytp","makeSimpleFlat"); try { Agedge_s e = (Agedge_s) edges.plus(ind).getPtr(); final __array_of_struct__ points = __array_of_struct__.malloc(pointf.class, 10); final __struct__ tp = JUtils.from(pointf.class), hp = JUtils.from(pointf.class); int i, pointn; double stepy, dy; tp.___(add_pointf(ND_coord(tn), ED_tail_port(e).getStruct("p"))); hp.___(add_pointf(ND_coord(hn), ED_head_port(e).getStruct("p"))); stepy = (cnt > 1) ? ND_ht(tn) / (double)(cnt - 1) : 0.; dy = tp.getDouble("y") - ((cnt > 1) ? ND_ht(tn) / 2. : 0.); for (i = 0; i < cnt; i++) { e = (Agedge_s) edges.plus(ind + i).getPtr(); pointn = 0; if ((et == (5 << 1)) || (et == (1 << 1))) { points.plus(pointn++).setStruct(tp); points.plus(pointn++).setStruct(pointfof((2 * tp.getDouble("x") + hp.getDouble("x")) / 3, dy)); points.plus(pointn++).setStruct(pointfof((2 * hp.getDouble("x") + tp.getDouble("x")) / 3, dy)); points.plus(pointn++).setStruct(hp); } else { /* ET_PLINE */ UNSUPPORTED("cai7diqq01v8vb92u4mx1xh38"); // points[pointn++] = tp; UNSUPPORTED("cai7diqq01v8vb92u4mx1xh38"); // points[pointn++] = tp; UNSUPPORTED("bnd7kao912fmo940u1gz3cmws"); // points[pointn++] = pointfof((2 * tp.x + hp.x) / 3, dy); UNSUPPORTED("bnd7kao912fmo940u1gz3cmws"); // points[pointn++] = pointfof((2 * tp.x + hp.x) / 3, dy); UNSUPPORTED("bnd7kao912fmo940u1gz3cmws"); // points[pointn++] = pointfof((2 * tp.x + hp.x) / 3, dy); UNSUPPORTED("akir2i0ddpv2ombgdzzs9qqqa"); // points[pointn++] = pointfof((2 * hp.x + tp.x) / 3, dy); UNSUPPORTED("akir2i0ddpv2ombgdzzs9qqqa"); // points[pointn++] = pointfof((2 * hp.x + tp.x) / 3, dy); UNSUPPORTED("akir2i0ddpv2ombgdzzs9qqqa"); // points[pointn++] = pointfof((2 * hp.x + tp.x) / 3, dy); UNSUPPORTED("59cwjy3j5e0igp278migykzi"); // points[pointn++] = hp; UNSUPPORTED("59cwjy3j5e0igp278migykzi"); // points[pointn++] = hp; } dy += stepy; clip_and_install(e, aghead(e), points.asPtr(), pointn, Z.z().sinfo.amp()); } } finally { LEAVING("8kqyzk43ovc2sq6jegua6ytp","makeSimpleFlat"); } } //3 bhnjospwghq4plid12757c928 // static void make_flat_adj_edges(graph_t* g, path* P, edge_t** edges, int ind, int cnt, edge_t* e0, int et) public static void make_flat_adj_edges(Agraph_s g, path P, __ptr__ edges, int ind, int cnt, Agedge_s e0, int et) { ENTERING("bhnjospwghq4plid12757c928","make_flat_adj_edges"); try { Agnode_s n; Agnode_s tn, hn; Agedge_s e; int labels = 0, ports = 0; Agraph_s auxg; Agraph_s subg; Agnode_s auxt, auxh; Agedge_s auxe; int i, j, midx, midy, leftx, rightx; final __struct__ del = JUtils.from(pointf.class); Agedge_s hvye = null; attr_state_t attrs; tn = agtail(e0); hn = aghead(e0); for (i = 0; i < cnt; i++) { e = (Agedge_s) edges.plus(ind + i).getPtr(); if (ED_label(e)!=null) labels++; if (ED_tail_port(e).defined!=0 || ED_head_port(e).defined!=0) ports = 1; } if (ports == 0) { /* flat edges without ports and labels can go straight left to right */ if (labels == 0) { makeSimpleFlat (tn, hn, edges, ind, cnt, et); } /* flat edges without ports but with labels take more work */ else { makeSimpleFlatLabels (tn, hn, edges, ind, cnt, et, labels); } return; } UNSUPPORTED("3ua0mgcwxnpymnpiv77owaur2"); // attrs = (attr_state_t*)zmalloc(sizeof(attr_state_t)); UNSUPPORTED("5qcpchn65culafc5t2ibioksb"); // auxg = cloneGraph (g, attrs); UNSUPPORTED("cwolismpef6l1w4xj5etx8w09"); // subg = agsubg (auxg, "xxx",1); UNSUPPORTED("eocu0fte9egz381w3t8y5m64t"); // agbindrec(subg, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); UNSUPPORTED("er19m8huvnjjn1v6rreiisdf6"); // agset (subg, "rank", "source"); UNSUPPORTED("du7zwfglureqnv5g2wiammuuu"); // rightx = ND_coord(hn).x; UNSUPPORTED("5qa24lmumrg29fbtl0fo4d4z1"); // leftx = ND_coord(tn).x; UNSUPPORTED("b2x6j7m1cmmkcmdl5jo9wn0ap"); // if (GD_flip(g)) { UNSUPPORTED("2elvc001uux0vbe7sv4098e0c"); // node_t* n; UNSUPPORTED("6m8k99c09zmhwgcdsgo33dugz"); // n = tn; UNSUPPORTED("cenlfgoeymhe1am5z6632xniq"); // tn = hn; UNSUPPORTED("cp2gf6c1xawd2yjbqerw98we3"); // hn = n; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1e98fnf9lsk7hwgjt70gh5r55"); // auxt = cloneNode(subg, tn, GD_flip(g)); UNSUPPORTED("a4xa8i1nw83hhnknv84280z00"); // auxh = cloneNode(auxg, hn, GD_flip(g)); UNSUPPORTED("1psokm6w9e7qw7fm2g1cayuk7"); // for (i = 0; i < cnt; i++) { UNSUPPORTED("8hwholxjp08y4q0zbb561684q"); // e = edges[ind + i]; UNSUPPORTED("b3w40fpgfj0j66yi6j582thq2"); // for (; ED_edge_type(e) != 0; e = ED_to_orig(e)); UNSUPPORTED("bcu59ji1apn0rvv7aisl6e4pw"); // if (agtail(e) == tn) UNSUPPORTED("4o3mq2ztiyxlbkpgcyygj4lny"); // auxe = cloneEdge (auxg, auxt, auxh, e); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("3a7m578mxun4c8zv0jurzh7ox"); // auxe = cloneEdge (auxg, auxh, auxt, e); UNSUPPORTED("e6khamu7fhu5m7il9r2v06mui"); // ED_alg(e) = auxe; UNSUPPORTED("64u9xrw8iwy3mtuupoktw7xoz"); // if (!hvye && !ED_tail_port(e).defined && !ED_head_port(e).defined) { UNSUPPORTED("6t23nfzzldtl419g582pr0wjn"); // hvye = auxe; UNSUPPORTED("3fi2uxwkmau5664gnhzyosan5"); // ED_alg(hvye) = e; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("co4n3cv6ybhgvm341r3re61vu"); // if (!hvye) { UNSUPPORTED("a0sxhnruv0ip65j05wt7dciak"); // hvye = agedge (auxg, auxt, auxh,NULL,1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("26l323zwxztuc6sfnh36x7i9f"); // agxset (hvye, E_weight, "10000"); UNSUPPORTED("4pj2d4pwf7wi9fcu4v0byk83z"); // GD_gvc(auxg) = GD_gvc(g); UNSUPPORTED("b6dpjp9wgjzgoy0tq7b9kms74"); // GD_dotroot(auxg) = auxg; UNSUPPORTED("e08t9bx8ldb1d5e0582wg82sx"); // setEdgeType (auxg, et); UNSUPPORTED("8y4433lgybq35f4t7viqsvz5v"); // dot_init_node_edge(auxg); UNSUPPORTED("13c2nt4jwumpvtwudz38a4sb3"); // dot_rank(auxg, 0); UNSUPPORTED("6onnznyz9fof6r8we5z1e4r63"); // dot_mincross(auxg, 0); UNSUPPORTED("4ry85qx5xmahkm0mdv9s65azo"); // dot_position(auxg, 0); UNSUPPORTED("9921qakdgil2jvrvinke44xsz"); // /* reposition */ UNSUPPORTED("ang8wy78872hvqkzvgfjwqwfl"); // midx = (ND_coord(tn).x - ND_rw(tn) + ND_coord(hn).x + ND_lw(hn))/2; UNSUPPORTED("2r2ywte92l423tbcdfvbhz3zh"); // midy = (ND_coord(auxt).x + ND_coord(auxh).x)/2; UNSUPPORTED("b8juh1dggb6sz4d9df42i150k"); // for (n = GD_nlist(auxg); n; n = ND_next(n)) { UNSUPPORTED("4prtyy13ox1fif8vil3g86g87"); // if (n == auxt) { UNSUPPORTED("7gvpia4yo3bfvh5dl7uwr3dbe"); // ND_coord(n).y = rightx; UNSUPPORTED("2zsspnn0nfrdf9fx8sh3ld8j4"); // ND_coord(n).x = midy; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ba2aaoh9ujy4ww9luial39sya"); // else if (n == auxh) { UNSUPPORTED("aoy1ze6hhjuym44mkasdt19qp"); // ND_coord(n).y = leftx; UNSUPPORTED("2zsspnn0nfrdf9fx8sh3ld8j4"); // ND_coord(n).x = midy; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("80o8q2qh1hr671ladbyqzglnt"); // else ND_coord(n).y = midx; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("48hn94qz2y2kb6lqc3462vlco"); // dot_sameports(auxg); UNSUPPORTED("bglhuc9grqkk9ozb97oeh0m3b"); // _dot_splines(auxg, 0); UNSUPPORTED("euvfot8f7xxnibd223qgsylew"); // dotneato_postprocess(auxg); UNSUPPORTED("4mg60pszj0s1anwg8zp0tq0ra"); // /* copy splines */ UNSUPPORTED("b2x6j7m1cmmkcmdl5jo9wn0ap"); // if (GD_flip(g)) { UNSUPPORTED("baukf0b2l91bkgnfdc04rvuxe"); // del.x = ND_coord(tn).x - ND_coord(auxt).y; UNSUPPORTED("96sq686mw9bvj7dli7wb241au"); // del.y = ND_coord(tn).y + ND_coord(auxt).x; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("bxg8i1hqms0izrryxh2at6p7b"); // del.x = ND_coord(tn).x - ND_coord(auxt).x; UNSUPPORTED("3xqgvdcxmu8e4eqtnhaa256tk"); // del.y = ND_coord(tn).y - ND_coord(auxt).y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1psokm6w9e7qw7fm2g1cayuk7"); // for (i = 0; i < cnt; i++) { UNSUPPORTED("47ogn0fae1yuy3kefpawcgcmx"); // bezier* auxbz; UNSUPPORTED("4mujfxtr0wy7m1rbm57rwigo4"); // bezier* bz; UNSUPPORTED("8hwholxjp08y4q0zbb561684q"); // e = edges[ind + i]; UNSUPPORTED("b3w40fpgfj0j66yi6j582thq2"); // for (; ED_edge_type(e) != 0; e = ED_to_orig(e)); UNSUPPORTED("3ii7nnxg3x8jpdk6lcijbizvf"); // auxe = (edge_t*)ED_alg(e); UNSUPPORTED("5rc7uvn4xqfetekcci1uwri5v"); // if ((auxe == hvye) & !ED_alg(auxe)) continue; /* pseudo-edge */ UNSUPPORTED("52vy3jbu67nebznqkhxxqthih"); // auxbz = ED_spl(auxe)->list; UNSUPPORTED("azr1tv8blnu3i6b7wstpqv2tc"); // bz = new_spline(e, auxbz->size); UNSUPPORTED("df84ie4egl6l1i82tz1zp7hg"); // bz->sflag = auxbz->sflag; UNSUPPORTED("49bzonc32mbuchcsmw7csexdw"); // bz->sp = transformf(auxbz->sp, del, GD_flip(g)); UNSUPPORTED("9g1glpjjy5wmh7dyr6u0nb2cn"); // bz->eflag = auxbz->eflag; UNSUPPORTED("44tftrsdjjuh1qjmxjpysmee3"); // bz->ep = transformf(auxbz->ep, del, GD_flip(g)); UNSUPPORTED("w0xl6ghxoii2ze2xmbbunv4d"); // for (j = 0; j < auxbz->size; ) { UNSUPPORTED("22zm6ljvhpz7j2kiqee31nx61"); // pointf cp[4]; UNSUPPORTED("4c88sva3ojadip5w3ehu782tp"); // cp[0] = bz->list[j] = transformf(auxbz->list[j], del, GD_flip(g)); UNSUPPORTED("5jqtd9htl25cd3if3pjtl8dpo"); // j++; UNSUPPORTED("duk541biqshfomah8rlxeyigr"); // if ( j >= auxbz->size ) UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("2qrbm7mhicvoxzk91h9x3gq64"); // cp[1] = bz->list[j] = transformf(auxbz->list[j], del, GD_flip(g)); UNSUPPORTED("5jqtd9htl25cd3if3pjtl8dpo"); // j++; UNSUPPORTED("f4x9unnnofgnvy91ejtm90kw"); // cp[2] = bz->list[j] = transformf(auxbz->list[j], del, GD_flip(g)); UNSUPPORTED("5jqtd9htl25cd3if3pjtl8dpo"); // j++; UNSUPPORTED("6pldfj31dg88qzsa012v8auxn"); // cp[3] = transformf(auxbz->list[j], del, GD_flip(g)); UNSUPPORTED("2xvehdctlpogpd7xhdf1pku00"); // update_bb_bz(&GD_bb(g), cp); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("8bokoh0vcnmvjcahn7de1z0kd"); // if (ED_label(e)) { UNSUPPORTED("8ido4wfhvlqvczqfq5xz33kak"); // ED_label(e)->pos = transformf(ED_label(auxe)->pos, del, GD_flip(g)); UNSUPPORTED("3tkba5lhpnujfu8lcz8lewsyn"); // ED_label(e)->set = NOT(0); UNSUPPORTED("c62p0r1jj71ceakgzrv2gorvu"); // updateBB(g, ED_label(e)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("22prbnbyxmapn1fcer1sktez7"); // cleanupCloneGraph (auxg, attrs); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("bhnjospwghq4plid12757c928","make_flat_adj_edges"); } } //3 fybar4mljnmkh3kure5k1eod // static void makeFlatEnd (graph_t* g, spline_info_t* sp, path* P, node_t* n, edge_t* e, pathend_t* endp, boolean isBegin) public static void makeFlatEnd(Agraph_s g, spline_info_t sp, path P, Agnode_s n, Agedge_s e, pathend_t endp, boolean isBegin) { ENTERING("fybar4mljnmkh3kure5k1eod","makeFlatEnd"); try { final ST_boxf b = new ST_boxf(); b.___(maximal_bbox(g, sp, n, null, e)); endp.setStruct("nb", b); endp.setInt("sidemask", 1<<2); if (isBegin) beginpath(P, e, 2, endp, false); else endpath(P, e, 2, endp, false); b.UR.y = ((ST_boxf)endp.getArrayOfStruct("boxes").plus(endp.getInt("boxn") - 1).getStruct()).UR.y; b.LL.y = ((ST_boxf)endp.getArrayOfStruct("boxes").plus(endp.getInt("boxn") - 1).getStruct()).LL.y; b.___(makeregularend((ST_boxf) b, (1<<2), ND_coord(n).getDouble("y") + GD_rank(g).plus(ND_rank(n)).getDouble("ht2"))); if (b.LL.x < b.UR.x && b.LL.y < b.UR.y) UNSUPPORTED("cmjm4y40vf7wklmgz0ae4k36v"); // endp->boxes[endp->boxn++] = b; } finally { LEAVING("fybar4mljnmkh3kure5k1eod","makeFlatEnd"); } } //3 rfro0b2nsukdjenux3f6osgj // static void makeBottomFlatEnd (graph_t* g, spline_info_t* sp, path* P, node_t* n, edge_t* e, pathend_t* endp, boolean isBegin) public static Object makeBottomFlatEnd(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("8ai1jk8aigoqod7sj7pw1phw3"); // makeBottomFlatEnd (graph_t* g, spline_info_t* sp, path* P, node_t* n, edge_t* e, UNSUPPORTED("25ij2tn6de7b481tpf1ac644s"); // pathend_t* endp, boolean isBegin) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("458vjrt5zjt6am715aiuxdlpo"); // b = endp->nb = maximal_bbox(g, sp, n, NULL, e); UNSUPPORTED("9wzfokn3t7zckgoaxgywy6cbz"); // endp->sidemask = (1<<0); UNSUPPORTED("c3u0b2z8mb4le2v1g6q8amjt"); // if (isBegin) beginpath(P, e, 2, endp, 0); UNSUPPORTED("1e0zyjb03r85tgqddfnlk9e9"); // else endpath(P, e, 2, endp, 0); UNSUPPORTED("7pwqqvagpkzye4cdmjlbrmt7a"); // b.UR.y = endp->boxes[endp->boxn - 1].UR.y; UNSUPPORTED("1mefjjoto40rfwb1qhzvobhje"); // b.LL.y = endp->boxes[endp->boxn - 1].LL.y; UNSUPPORTED("4sn8dc58suk2d3oqlu13cr7ic"); // b = makeregularend(b, (1<<0), ND_coord(n).y - GD_rank(g)[ND_rank(n)].ht2); UNSUPPORTED("6xj9sv3inmj1rwtz76qp6p30n"); // if (b.LL.x < b.UR.x && b.LL.y < b.UR.y) UNSUPPORTED("cmjm4y40vf7wklmgz0ae4k36v"); // endp->boxes[endp->boxn++] = b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 w8ptjibydq995d2lexg85mku // static void make_flat_labeled_edge(graph_t* g, spline_info_t* sp, path* P, edge_t* e, int et) public static void make_flat_labeled_edge(Agraph_s g, spline_info_t sp, path P, Agedge_s e, int et) { ENTERING("w8ptjibydq995d2lexg85mku","make_flat_labeled_edge"); try { Agnode_s tn, hn, ln; pointf ps = null; final __struct__ tend = JUtils.from(pathend_t.class), hend = JUtils.from(pathend_t.class); final ST_boxf lb = new ST_boxf(); int boxn, i, ydelta; int pn[] = new int[1]; Agedge_s f; final __array_of_struct__ points = __array_of_struct__.malloc(pointf.class, 7); tn = agtail(e); hn = aghead(e); for (f = ED_to_virt(e); ED_to_virt(f)!=null; f = ED_to_virt(f)); ln = agtail(f); ED_label(e).setStruct("pos", ND_coord(ln)); ED_label(e).setBoolean("set", NOT(false)); if (et == (1 << 1)) { UNSUPPORTED("ataaqkehwb736ts2x6olzqokx"); // pointf startp, endp, lp; UNSUPPORTED("48h6vk2e5niep4dmpua377248"); // startp = add_pointf(ND_coord(tn), ED_tail_port(e).p); UNSUPPORTED("8fokfn1629eyiqnzi7mey9o2q"); // endp = add_pointf(ND_coord(hn), ED_head_port(e).p); UNSUPPORTED("8zpih1olxdgp3sxk2br3lezzx"); // lp = ED_label(e)->pos; UNSUPPORTED("1sblcap44288tmc3cr80iqpj5"); // lp.y -= (ED_label(e)->dimen.y)/2.0; UNSUPPORTED("8ew9p3k3j0b33dnq0ntgbb6x8"); // points[1] = points[0] = startp; UNSUPPORTED("16h577fdghqtaeot735guew4e"); // points[2] = points[3] = points[4] = lp; UNSUPPORTED("9zjfovamhwwehbviws68s5woy"); // points[5] = points[6] = endp; UNSUPPORTED("68ojpcos92c96bc0i5ag1yb6v"); // ps = points; UNSUPPORTED("1uunj4jbr2uhiqxwor6rzmr3j"); // pn = 7; } else { lb.LL.x = ND_coord(ln).getDouble("x") - ND_lw(ln); lb.UR.x = ND_coord(ln).getDouble("x") + ND_rw(ln); lb.UR.y = ND_coord(ln).getDouble("y") + ND_ht(ln)/2; ydelta = (int)(ND_coord(ln).getDouble("y") - GD_rank(g).plus(ND_rank(tn)).getDouble("ht1") - ND_coord(tn).getDouble("y") + GD_rank(g).plus(ND_rank(tn)).getDouble("ht2")); ydelta = (int)(ydelta / 6.); lb.LL.y = lb.UR.y - MAX(5.,ydelta); boxn = 0; makeFlatEnd (g, sp, P, tn, e, tend.amp(), NOT(false)); makeFlatEnd (g, sp, P, hn, e, hend.amp(), false); ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = ((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).LL.x; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = ((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).UR.y; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = lb.LL.x; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = lb.LL.y; boxn++; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = ((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).LL.x; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = lb.LL.y; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).UR.x; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = lb.UR.y; boxn++; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = lb.UR.x; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = lb.LL.y; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).UR.y; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).UR.x; boxn++; for (i = 0; i < tend.getInt("boxn"); i++) add_box(P, (ST_boxf)tend.getArrayOfStruct("boxes").plus(i).getStruct()); for (i = 0; i < boxn; i++) add_box(P, (ST_boxf)Z.z().boxes.plus(i).getStruct()); for (i = hend.getInt("boxn") - 1; i >= 0; i--) add_box(P, (ST_boxf)hend.getArrayOfStruct("boxes").plus(i).getStruct()); if (et == (5 << 1)) ps = routesplines(P, pn); else ps = routepolylines(P, pn); if (pn[0] == 0) return; } clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo.amp()); } finally { LEAVING("w8ptjibydq995d2lexg85mku","make_flat_labeled_edge"); } } //3 d97ga7gm34rs6r0jo494nhhuo // static void make_flat_bottom_edges(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int ind, int cnt, edge_t* e, int splines) public static Object make_flat_bottom_edges(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("bkp39vt080is6iiqobsw59sk9"); // make_flat_bottom_edges(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int UNSUPPORTED("2gat0ltxh7j57lspwmm9s9x7j"); // ind, int cnt, edge_t* e, int splines) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5np4z3gp6cfmicyuz91nownp8"); // node_t *tn, *hn; UNSUPPORTED("3zgmm04g7gq65c57gco0id1eb"); // int j, i, r; UNSUPPORTED("5wdd96amz7w1sym59mg5nfj51"); // double stepx, stepy, vspace; UNSUPPORTED("63ozqzusft8gpehyaqrdjyr1"); // rank_t* nextr; UNSUPPORTED("7hps2kejtrotcphg5gymma43b"); // int pn; UNSUPPORTED("2rkzhui0essisp5zlw44vx4j9"); // pointf *ps; UNSUPPORTED("32b8td88encjfj6yd1sp8bef"); // pathend_t tend, hend; UNSUPPORTED("d0x4emyekwlcpua99voy3764p"); // tn = agtail(e); UNSUPPORTED("axoua6xpo7xc40u2oj0a8dmr9"); // hn = aghead(e); UNSUPPORTED("63jjxtcojh1aq4na9u4w2a6xe"); // r = ND_rank(tn); UNSUPPORTED("atjnavwfg3xe4ygorslb4vvtv"); // if (r < GD_maxrank(g)) { UNSUPPORTED("6b35lbhficoaf5216p3sdq1cj"); // nextr = GD_rank(g) + (r+1); UNSUPPORTED("bj0cch0dmhpux7wm3fg4zg368"); // vspace = ND_coord(tn).y - GD_rank(g)[r].pht1 - UNSUPPORTED("dqcrkagghulp8u9iuoyckepf7"); // (ND_coord(nextr->v[0]).y + nextr->pht2); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("1sai54q4zfayczfcrklgw4x17"); // vspace = GD_ranksep(g); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dyxkx5ftlgbeem7089pcu1qo4"); // stepx = ((double)(sp->Multisep)) / (cnt+1); UNSUPPORTED("63qqo8mqbn6alfa5k3gfalz53"); // stepy = vspace / (cnt+1); UNSUPPORTED("euw24sa4cgazdf9z7a3sretis"); // makeBottomFlatEnd (g, sp, P, tn, e, &tend, NOT(0)); UNSUPPORTED("c8ip2hla7pb8tz4fhsj5m34wk"); // makeBottomFlatEnd (g, sp, P, hn, e, &hend, 0); UNSUPPORTED("1psokm6w9e7qw7fm2g1cayuk7"); // for (i = 0; i < cnt; i++) { UNSUPPORTED("3smlz0a87gj8w58rwau2ewq23"); // int boxn; UNSUPPORTED("bg5tj2hjixth58v04043jb3do"); // boxf b; UNSUPPORTED("8hwholxjp08y4q0zbb561684q"); // e = edges[ind + i]; UNSUPPORTED("cpcqkqkhkaviy153h92apd82e"); // boxn = 0; UNSUPPORTED("4wkbaj2424ug9j97efwu1r5mc"); // b = tend.boxes[tend.boxn - 1]; UNSUPPORTED("3eyfj1o1bqxlfqw7tq76qiiiz"); // boxes[boxn].LL.x = b.LL.x; UNSUPPORTED("dwlejn7xasxh4yyoq2xodqnyj"); // boxes[boxn].UR.y = b.LL.y; UNSUPPORTED("10o1e4r5ux8d7cr6zg379ss59"); // boxes[boxn].UR.x = b.UR.x + (i + 1) * stepx; UNSUPPORTED("79f4mryzkqqs3t4sxnet9jc7b"); // boxes[boxn].LL.y = b.LL.y - (i + 1) * stepy; UNSUPPORTED("cbrsymd5wpvadg3ziz4dypa50"); // boxn++; UNSUPPORTED("7n7f256w4ewtzexwfxjo28b2"); // boxes[boxn].LL.x = tend.boxes[tend.boxn - 1].LL.x; UNSUPPORTED("6in0ql0upnjg00mgj5k8av2m4"); // boxes[boxn].UR.y = boxes[boxn-1].LL.y; UNSUPPORTED("46ftsiqovpzo9r0mnlc4nf83"); // boxes[boxn].UR.x = hend.boxes[hend.boxn - 1].UR.x; UNSUPPORTED("4bjnn4mhczzd1un9rbib5glch"); // boxes[boxn].LL.y = boxes[boxn].UR.y - stepy; UNSUPPORTED("cbrsymd5wpvadg3ziz4dypa50"); // boxn++; UNSUPPORTED("6oycftap8apw4glb1s5jzineu"); // b = hend.boxes[hend.boxn - 1]; UNSUPPORTED("77c1sajrw9kfc7avomly90gm8"); // boxes[boxn].UR.x = b.UR.x; UNSUPPORTED("e94nxsepfdq17q69drbro41je"); // boxes[boxn].UR.y = b.LL.y; UNSUPPORTED("6cipt7th0uv2xfwyh4rvwignj"); // boxes[boxn].LL.x = b.LL.x - (i + 1) * stepx; UNSUPPORTED("50uajtfbvgkrruywpjq9m4zoj"); // boxes[boxn].LL.y = boxes[boxn-1].UR.y; UNSUPPORTED("cbrsymd5wpvadg3ziz4dypa50"); // boxn++; UNSUPPORTED("eu29s7oeoca2yo9trhfhb9juy"); // for (j = 0; j < tend.boxn; j++) add_box(P, tend.boxes[j]); UNSUPPORTED("b8xs00axp4lkksof6hmim3n3x"); // for (j = 0; j < boxn; j++) add_box(P, boxes[j]); UNSUPPORTED("ahci7z910ypoj0e54wchvk54v"); // for (j = hend.boxn - 1; j >= 0; j--) add_box(P, hend.boxes[j]); UNSUPPORTED("7r9nsxbfy7w3csc04nxo97xpq"); // if (splines) ps = routesplines(P, &pn); UNSUPPORTED("dfku80ag90r137s9az9493oow"); // else ps = routepolylines(P, &pn); UNSUPPORTED("919jubmuis4tp1c1f87rvfhog"); // if (pn == 0) UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return; UNSUPPORTED("62oxk9cc5wf0f8gqbothfte1f"); // clip_and_install(e, aghead(e), ps, pn, &sinfo); UNSUPPORTED("l1nh40fo9oar4mz31h14bc9i"); // P->nbox = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6yr3jfkljl5w0z6dv354ryx63 // static void make_flat_edge(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int ind, int cnt, int et) public static void make_flat_edge(Agraph_s g, spline_info_t sp, path P, __ptr__ edges, int ind, int cnt, int et) { ENTERING("6yr3jfkljl5w0z6dv354ryx63","make_flat_edge"); try { Agnode_s tn, hn; final __struct__ fwdedgei = JUtils.from(Agedgeinfo_t.class); final __struct__ fwdedge = JUtils.from(Agedgepair_s.class); Agedge_s e; int j, i, r, isAdjacent; double stepx, stepy, vspace; int tside, hside; int pn[] = new int[] {0}; pointf ps; final __struct__ tend = JUtils.from(pathend_t.class), hend = JUtils.from(pathend_t.class); fwdedge.getStruct("out").getStruct("base").setPtr("data", fwdedgei.amp()); /* Get sample edge; normalize to go from left to right */ e = (Agedge_s) edges.plus(ind).getPtr(); isAdjacent = ED_adjacent(e); if ((ED_tree_index(e) & 32)!=0) { MAKEFWDEDGE(fwdedge.getStruct("out").amp(), e); e = (Agedge_s) fwdedge.getStruct("out").amp(); } for (i = 1; i < cnt; i++) { if (ED_adjacent(edges.plus(ind+i).getPtr())!=0) { isAdjacent = 1; break; } } /* The lead edge edges[ind] might not have been marked earlier as adjacent, * so check them all. */ if (isAdjacent!=0) { make_flat_adj_edges (g, P, edges, ind, cnt, e, et); return; } if (ED_label(e)!=null) { /* edges with labels aren't multi-edges */ make_flat_labeled_edge (g, sp, P, e, et); return; } if (et == (1 << 1)) { makeSimpleFlat (agtail(e), aghead(e), edges, ind, cnt, et); return; } tside = ED_tail_port(e).getInt("side"); hside = ED_head_port(e).getInt("side"); if (((tside == (1<<0)) && (hside != (1<<2))) || ((hside == (1<<0)) && (tside != (1<<2)))) { make_flat_bottom_edges (g, sp, P, edges, ind, cnt, e, et == (5 << 1)); return; } tn = agtail(e); hn = aghead(e); r = ND_rank(tn); if (r > 0) { __ptr__ prevr; if ((GD_has_labels(g) & (1 << 0))!=0) prevr = GD_rank(g).plus(r-2); else prevr = GD_rank(g).plus(r-1); vspace = ND_coord(prevr.getPtr().getArrayOfPtr("v").plus(0).getPtr()).getDouble("y") - prevr.getPtr().getDouble("ht1") - ND_coord(tn).getDouble("y") - GD_rank(g).plus(r).getDouble("ht2"); } else { vspace = GD_ranksep(g); } stepx = ((double)sp.getInt("Multisep")) / (cnt+1); stepy = vspace / (cnt+1); makeFlatEnd (g, sp, P, tn, e, tend.amp(), true); makeFlatEnd (g, sp, P, hn, e, hend.amp(), false); for (i = 0; i < cnt; i++) { int boxn; final ST_boxf b = new ST_boxf(); e = (Agedge_s) edges.plus(ind + i).getPtr(); boxn = 0; b.___(tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()); ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = b.LL.x; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = b.UR.y; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = b.UR.x + (i + 1) * stepx; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = b.UR.y + (i + 1) * stepy; boxn++; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = ((ST_boxf)(tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct())).LL.x; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = ((ST_boxf)Z.z().boxes.plus(boxn-1).getStruct()).UR.y; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = ((ST_boxf)(hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct())).UR.x; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y + stepy; boxn++; b.___(hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()); ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = b.UR.x; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = b.UR.y; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = b.LL.x - (i + 1) * stepx; ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = ((ST_boxf)Z.z().boxes.plus(boxn-1).getStruct()).LL.y; boxn++; for (j = 0; j < tend.getInt("boxn"); j++) add_box(P, (ST_boxf)tend.getArrayOfStruct("boxes").plus(j).getStruct()); for (j = 0; j < boxn; j++) add_box(P, (ST_boxf)Z.z().boxes.plus(j).getStruct()); for (j = hend.getInt("boxn") - 1; j >= 0; j--) add_box(P, (ST_boxf)hend.getArrayOfStruct("boxes").plus(j).getStruct()); if (et == (5 << 1)) ps = (pointf) routesplines(P, pn); else ps = (pointf) routepolylines(P, pn); if (pn[0] == 0) return; clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo.amp()); P.setInt("nbox", 0); } } finally { LEAVING("6yr3jfkljl5w0z6dv354ryx63","make_flat_edge"); } } //3 78oy7e2xm3t4de66du11ej05j // static int leftOf (pointf p1, pointf p2, pointf p3) public static Object leftOf(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("iqhj2moads3aafqx5xa8j44g"); // leftOf (pointf p1, pointf p2, pointf p3) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5azgw3jpyk2yccpp3p4s3q817"); // int d; UNSUPPORTED("42n6sq1mbcvm3tugypozccbua"); // d = ((p1.y - p2.y) * (p3.x - p2.x)) - UNSUPPORTED("7y9r79gtx363mln6v9yaisvz6"); // ((p3.y - p2.y) * (p1.x - p2.x)); UNSUPPORTED("8y4f8e0mnow6139qoguzsxojx"); // return (d > 0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2n9bpvx34fnukqu1f9u4v7v6n // static int makeLineEdge(graph_t* g, edge_t* fe, pointf* points, node_t** hp) public static int makeLineEdge(Agraph_s g, Agedge_s fe, __ptr__ points, __ptr__ hp) { ENTERING("2n9bpvx34fnukqu1f9u4v7v6n","makeLineEdge"); try { UNSUPPORTED("d9cz56vtrl0ri6hz88cumukuf"); // static int UNSUPPORTED("1act0rov08v6lg5ydqldks7d1"); // makeLineEdge(graph_t* g, edge_t* fe, pointf* points, node_t** hp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("awgar8whid8l1c7lyj8w53w3i"); // int delr, pn; UNSUPPORTED("ewlm0dtv1gpudqhfx5nsr9d77"); // node_t* hn; UNSUPPORTED("cncpk333257fxnc9w8kfl8m70"); // node_t* tn; UNSUPPORTED("etezq0kgy6mttiwr53pna62d7"); // edge_t* e = fe; UNSUPPORTED("3ll9r1mvzzbhqrs4dwsduif44"); // pointf startp, endp, lp; UNSUPPORTED("bgjjpl6jaaa122twwwd0vif6x"); // pointf dimen; UNSUPPORTED("gdtli7sq5cifvdpg3ecrudew"); // double width, height; UNSUPPORTED("1pa1p9mnpooqack43qfpnoio2"); // while (ED_edge_type(e) != 0) UNSUPPORTED("bdmai1d040qmubf08ds339v9x"); // e = ED_to_orig(e); UNSUPPORTED("axoua6xpo7xc40u2oj0a8dmr9"); // hn = aghead(e); UNSUPPORTED("d0x4emyekwlcpua99voy3764p"); // tn = agtail(e); UNSUPPORTED("b4x4vd9cei4o3tjifzw7pdec6"); // delr = ABS(ND_rank(hn)-ND_rank(tn)); UNSUPPORTED("447fk34earndyf1qvvzttsxtk"); // if ((delr == 1) || ((delr == 2) && (GD_has_labels(g) & (1 << 0)))) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("cbnarpi971ox21zdds7a60axh"); // if (agtail(fe) == agtail(e)) { UNSUPPORTED("o7usaxh5vv7rla55dxzkfmk7"); // *hp = hn; UNSUPPORTED("48h6vk2e5niep4dmpua377248"); // startp = add_pointf(ND_coord(tn), ED_tail_port(e).p); UNSUPPORTED("8fokfn1629eyiqnzi7mey9o2q"); // endp = add_pointf(ND_coord(hn), ED_head_port(e).p); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("3uxftvwe3olgfi579s8izpl76"); // *hp = tn; UNSUPPORTED("akhrhgryddg74jqispnh1j1nn"); // startp = add_pointf(ND_coord(hn), ED_head_port(e).p); UNSUPPORTED("dqdai9l5thna19ynowkfwstuh"); // endp = add_pointf(ND_coord(tn), ED_tail_port(e).p); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("brrmfllffwlnqxljgrwy8x5pq"); // if (ED_label(e)) { UNSUPPORTED("et7phi46cskfaxzpfo97e1s5s"); // dimen = ED_label(e)->dimen; UNSUPPORTED("z26zaj60vrdy38k1c2vk7law"); // if (GD_flip(agraphof(hn))) { UNSUPPORTED("6mcl7j0bp09d061f0dywd1ru8"); // width = dimen.y; UNSUPPORTED("eax7dzvpgqzsiffa2dn2idrxe"); // height = dimen.x; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("de3o94hui5i4dbq9moun6h57f"); // width = dimen.x; UNSUPPORTED("41ge1nnwfokwi43f6tlkgmvb0"); // height = dimen.y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("d9umd1qjkl4kkybpd7se993ij"); // lp = ED_label(e)->pos, lp; UNSUPPORTED("arxilpbzpy5a2s8skwl644jj2"); // if (leftOf (endp,startp,lp)) { UNSUPPORTED("7bfb4rovu9obr4fje0hi95e67"); // lp.x += width/2.0; UNSUPPORTED("7y2ejp6vr760aqh5qp4v5zdc8"); // lp.y -= height/2.0; UNSUPPORTED("9l9roc1u8a03ljwm2mmeaiqq2"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("a4spf3n199lr00qkdb3vb8i6c"); // lp.x -= width/2.0; UNSUPPORTED("f15m64yxj1oq475bvrt63d5gf"); // lp.y += height/2.0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8ew9p3k3j0b33dnq0ntgbb6x8"); // points[1] = points[0] = startp; UNSUPPORTED("16h577fdghqtaeot735guew4e"); // points[2] = points[3] = points[4] = lp; UNSUPPORTED("9zjfovamhwwehbviws68s5woy"); // points[5] = points[6] = endp; UNSUPPORTED("1uunj4jbr2uhiqxwor6rzmr3j"); // pn = 7; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("8ew9p3k3j0b33dnq0ntgbb6x8"); // points[1] = points[0] = startp; UNSUPPORTED("aztkfl5qctibiu6en7xf6xf3e"); // points[3] = points[2] = endp; UNSUPPORTED("5rmgdadjn23z8djo32eh9bhzd"); // pn = 4; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("abnopd2ggrpdb538wf7zsmrhq"); // return pn; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("2n9bpvx34fnukqu1f9u4v7v6n","makeLineEdge"); } } //3 30wfq1dby4t07hft9io52nq6z // static void make_regular_edge(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int ind, int cnt, int et) //private static __ptr__ pointfs; //private static __ptr__ pointfs2; //private static int numpts; //private static int numpts2; public static void make_regular_edge(Agraph_s g, spline_info_t sp, path P, __ptr__ edges, int ind, int cnt, int et) { ENTERING("30wfq1dby4t07hft9io52nq6z","make_regular_edge"); try { Agnode_s tn, hn = null; final __struct__ fwdedgeai = JUtils.from(Agedgeinfo_t.class), fwdedgebi = JUtils.from(Agedgeinfo_t.class), fwdedgei = JUtils.from(Agedgeinfo_t.class); final __struct__ fwdedgea = JUtils.from(Agedgepair_s.class), fwdedgeb = JUtils.from(Agedgepair_s.class), fwdedge = JUtils.from(Agedgepair_s.class); Agedge_s e, fe, le, segfirst; pointf ps = null; final __struct__ tend = JUtils.from(pathend_t.class), hend = JUtils.from(pathend_t.class); final ST_boxf b = new ST_boxf(); int boxn, sl, si, i, j, dx, hackflag, longedge; boolean smode; int pn[] = new int[] {0}; int pointn[] = new int[] {0}; fwdedgea.getStruct("out").getStruct("base").setPtr("data", fwdedgeai.amp()); fwdedgeb.getStruct("out").getStruct("base").setPtr("data", fwdedgebi.amp()); fwdedge.getStruct("out").getStruct("base").setPtr("data", fwdedgei.amp()); if (N(Z.z().pointfs)) { Z.z().pointfs = gmalloc(sizeof(pointf.class, 2000)); Z.z().pointfs2 = gmalloc(sizeof(pointf.class, 2000)); Z.z().numpts = 2000; Z.z().numpts2 = 2000; } sl = 0; e = (Agedge_s) edges.plus(ind).getPtr(); hackflag = 0; if (ABS(ND_rank(agtail(e)) - ND_rank(aghead(e))) > 1) { UNSUPPORTED("8f17srpa5iisomehrb4b01h51"); // fwdedgeai = *(Agedgeinfo_t*)e->base.data; UNSUPPORTED("97znyysf99vzzwpgnqcpp5yek"); // fwdedgea.out = *e; UNSUPPORTED("b6jipryp9p354gtq9lwa35lzj"); // fwdedgea.out.base.data = (Agrec_t*)&fwdedgeai; UNSUPPORTED("568s5ftes1chv9n1s98g9cncf"); // if (ED_tree_index(e) & 32) { UNSUPPORTED("9hw2l0eu91vauhvj3cxf3andc"); // MAKEFWDEDGE(&fwdedgeb.out, e); UNSUPPORTED("1rql0qzotc0yyozcfkj9p8xkm"); // agtail(&fwdedgea.out) = aghead(e); UNSUPPORTED("dw3p473qmkgjvxewsr8pimi2h"); // ED_tail_port(&fwdedgea.out) = ED_head_port(e); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("2gys0bodxz4fbasfnrvx6ivg2"); // fwdedgebi = *(Agedgeinfo_t*)e->base.data; UNSUPPORTED("1qqbo2mfls7xhbdno0no8xq54"); // fwdedgeb.out = *e; UNSUPPORTED("980ksnsma7kvvr9755ge8bhzh"); // fwdedgeb.out.base.data = (Agrec_t*)&fwdedgebi; UNSUPPORTED("6le0rehxs2odmv3zg1qg5wvd4"); // agtail(&fwdedgea.out) = agtail(e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3p0d08nntark676jlv1jl0j27"); // le = getmainedge(e); UNSUPPORTED("6tmwmfqoz3y8k44xamrpv82tl"); // while (ED_to_virt(le)) UNSUPPORTED("1c19c7ftue4zoibf7d2tm6uxy"); // le = ED_to_virt(le); UNSUPPORTED("d29k9lzj5g3d8dfxigwogdnoe"); // aghead(&fwdedgea.out) = aghead(le); UNSUPPORTED("36l0czce101bg0wbmu68xjd7z"); // ED_head_port(&fwdedgea.out).defined = 0; UNSUPPORTED("497rb9p6jdgdoyem0y42ecy6c"); // ED_edge_type(&fwdedgea.out) = 1; UNSUPPORTED("4tjj1vbw4mog2qlouazrdirvw"); // ED_head_port(&fwdedgea.out).p.x = ED_head_port(&fwdedgea.out).p.y = 0; UNSUPPORTED("8kdma1vi9aibo7isrge0lunrh"); // ED_to_orig(&fwdedgea.out) = e; UNSUPPORTED("eih8eaai768x1un5mixrtgstp"); // e = &fwdedgea.out; UNSUPPORTED("bxkpl0bp0qhtxaj6rspd19d1k"); // hackflag = NOT(0); } else { if ((ED_tree_index(e) & 32)!=0) { MAKEFWDEDGE(fwdedgea.getPtr("out"), e); e = (Agedge_s) fwdedgea.getPtr("out"); } } fe = e; /* compute the spline points for the edge */ if ((et == (1 << 1)) && (pointn[0] = makeLineEdge (g, fe, Z.z().pointfs, hn.unsupported()))!=0) { } else { boolean splines = (et == (5 << 1)); boxn = 0; pointn[0] = 0; segfirst = e; tn = agtail(e); hn = aghead(e); b.___(maximal_bbox(g, sp, tn, null, e)); tend.getStruct("nb").___(b); beginpath(P, e, 1, tend.amp(), spline_merge(tn)); b.UR.y = ((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).UR.y; b.LL.y = ((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).LL.y; b.___(makeregularend(b, (1<<0), ND_coord(tn).getDouble("y") - GD_rank(g).plus(ND_rank(tn)).getDouble("ht1"))); if (b.LL.x < b.UR.x && b.LL.y < b.UR.y) { tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn")).setStruct(b); tend.setInt("boxn", tend.getInt("boxn") + 1); } longedge = 0; smode = false; si = -1; while (ND_node_type(hn) == 1 && N(((Boolean)Z.z().sinfo.call("splineMerge", hn)).booleanValue())) { longedge = 1; Z.z().boxes.plus(boxn++).setStruct(rank_box(sp, g, ND_rank(tn))); if (N(smode) && ((sl = straight_len(hn)) >= ((GD_has_labels(g) & (1 << 0))!=0 ? 4 + 1 : 2 + 1))) { smode = NOT(false); si = 1; sl -= 2; } if (N(smode) || si > 0) { si--; Z.z().boxes.plus(boxn++).setStruct( maximal_bbox(g, sp, hn, e, (Agedge_s) ND_out(hn).getFromList(0))); e = (Agedge_s) ND_out(hn).getFromList(0); tn = agtail(e); hn = aghead(e); continue; } hend.setStruct("nb", maximal_bbox(g, sp, hn, e, (Agedge_s) ND_out(hn).getFromList(0))); endpath(P, e, 1, hend.amp(), spline_merge(aghead(e))); b.___(makeregularend((ST_boxf) hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct(), (1<<2), ND_coord(hn).getDouble("y") + GD_rank(g).plus(ND_rank(hn)).getDouble("ht2"))); if (b.LL.x < b.UR.x && b.LL.y < b.UR.y) UNSUPPORTED("1crhubfzekx1qi2ti9ajqsfoc"); // hend.boxes[hend.boxn++] = b; P.getStruct("end").setDouble("theta", M_PI / 2); P.getStruct("end").setBoolean("constrained", NOT(false)); completeregularpath(P, segfirst, e, tend.amp(), hend.amp(), Z.z().boxes, boxn, 1); if (splines) ps = routesplines(P, pn); else { UNSUPPORTED("biyp75vm751j3qmqacagfej4b"); // ps = routepolylines (P, &pn); UNSUPPORTED("4fmdmgg43suu7ppgrcaofwqzh"); // if ((et == (1 << 1)) && (pn > 4)) { UNSUPPORTED("2ftwbx9nsy10ldzds3ej4hxi7"); // ps[1] = ps[0]; UNSUPPORTED("2fedie0btpk43e74p462n0y4n"); // ps[3] = ps[2] = ps[pn-1]; UNSUPPORTED("3fwatldph3opctz8aieqd214d"); // pn = 4; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } } if (pn[0] == 0) return; if (pointn[0] + pn[0] > Z.z().numpts) { /* This should be enough to include 3 extra points added by * straight_path below. */ UNSUPPORTED("k37sqlxbjikqg4xdonnvefo3"); // numpts = 2*(pointn+pn); UNSUPPORTED("8kbxhk7qirj3tr7hn1ukwar3h"); // pointfs = RALLOC(numpts, pointfs, pointf); } for (i = 0; i < pn[0]; i++) { Z.z().pointfs.plus(pointn[0]++).setStruct(ps.plus(i).getStruct()); } e = straight_path((Agedge_s)ND_out(hn).getFromList(0), sl, Z.z().pointfs, pointn); recover_slack(segfirst, P); segfirst = e; tn = agtail(e); hn = aghead(e); boxn = 0; tend.setStruct("nb", maximal_bbox(g, sp, tn, (Agedge_s) ND_in(tn).getFromList(0), e)); beginpath(P, e, 1, tend.amp(), spline_merge(tn)); b.___(makeregularend((ST_boxf) tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct(), (1<<0), ND_coord(tn).getDouble("y") - GD_rank(g).plus(ND_rank(tn)).getDouble("ht1"))); if (b.LL.x < b.UR.x && b.LL.y < b.UR.y) UNSUPPORTED("cjx6tldge3otk1pk6ks1pkn2w"); // tend.boxes[tend.boxn++] = b; P.getStruct("start").setDouble("theta", -M_PI / 2); P.getStruct("start").setBoolean("constrained", NOT(false)); smode = false; } Z.z().boxes.plus(boxn++).setStruct(rank_box(sp, g, ND_rank(tn))); b.___(maximal_bbox(g, sp, hn, e, null)); hend.getStruct("nb").___(b); endpath(P, hackflag!=0 ? fwdedgeb.getStruct("out").amp() : e, 1, hend.amp(), spline_merge(aghead(e))); b.UR.y = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).UR.y; b.LL.y = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).LL.y; b.___(makeregularend(b, (1<<2), ND_coord(hn).getDouble("y") + GD_rank(g).plus(ND_rank(hn)).getDouble("ht2"))); if (b.LL.x < b.UR.x && b.LL.y < b.UR.y) { hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn")).setStruct(b); hend.setInt("boxn", hend.getInt("boxn")+1); } completeregularpath(P, segfirst, e, tend.amp(), hend.amp(), Z.z().boxes, boxn, longedge); if (splines) ps = routesplines(P, pn); else ps = routepolylines (P, pn); if ((et == (1 << 1)) && (pn[0] > 4)) { /* Here we have used the polyline case to handle * an edge between two nodes on adjacent ranks. If the * results really is a polyline, straighten it. */ UNSUPPORTED("1u7e6lrkiipml54kkm7ylw56t"); // ps[1] = ps[0]; UNSUPPORTED("76bh6z0xok01d0gdybxcx4ful"); // ps[3] = ps[2] = ps[pn-1]; UNSUPPORTED("95b6xp8h5ai070bekyjhmiehh"); // pn = 4; } if (pn[0] == 0) return; if (pointn[0] + pn[0] > Z.z().numpts) { UNSUPPORTED("c6ux5effs02grz7xh3k8ernda"); // numpts = 2*(pointn+pn); UNSUPPORTED("bedaqcn9h03q6ia6zbezuee1m"); // pointfs = RALLOC(numpts, pointfs, pointf); } for (i = 0; i < pn[0]; i++) { Z.z().pointfs.plus(pointn[0]).setStruct(ps.plus(i).getStruct()); pointn[0]++; } recover_slack(segfirst, P); hn = hackflag!=0 ? aghead(fwdedgeb.getStruct("out").amp()) : aghead(e); } /* make copies of the spline points, one per multi-edge */ if (cnt == 1) { clip_and_install(fe, hn, Z.z().pointfs, pointn[0], Z.z().sinfo.amp()); return; } dx = sp.getInt("Multisep") * (cnt - 1) / 2; for (i = 1; i < pointn[0] - 1; i++) Z.z().pointfs.plus(i).setDouble("x", Z.z().pointfs.plus(i).getDouble("x") - dx); if (Z.z().numpts > Z.z().numpts2) { UNSUPPORTED("9ubr4m7bdv5f5ldk2ta6yw3up"); // numpts2 = numpts; UNSUPPORTED("8qwp7ddy5ztgam63fzfjmu890"); // pointfs2 = RALLOC(numpts2, pointfs2, pointf); } for (i = 0; i < pointn[0]; i++) Z.z().pointfs2.plus(i).setStruct(Z.z().pointfs.plus(i).getStruct()); clip_and_install(fe, hn, Z.z().pointfs2, pointn[0], Z.z().sinfo.amp()); for (j = 1; j < cnt; j++) { e = (Agedge_s) edges.plus(ind + j).getPtr(); if ((ED_tree_index(e) & 32)!=0) { MAKEFWDEDGE(fwdedge.getStruct("out").amp(), e); e = (Agedge_s) fwdedge.getStruct("out").amp(); } for (i = 1; i < pointn[0] - 1; i++) Z.z().pointfs.plus(i).setDouble("x", Z.z().pointfs.plus(i).getDouble("x") + sp.getInt("Multisep")); for (i = 0; i < pointn[0]; i++) Z.z().pointfs2.plus(i).setStruct(Z.z().pointfs.plus(i).getStruct()); clip_and_install(e, aghead(e), Z.z().pointfs2, pointn[0], Z.z().sinfo.amp()); } } finally { LEAVING("30wfq1dby4t07hft9io52nq6z","make_regular_edge"); } } //3 va61hggynvb6z6j34w7otmab // static void completeregularpath(path * P, edge_t * first, edge_t * last, pathend_t * tendp, pathend_t * hendp, boxf * boxes, int boxn, int flag) public static void completeregularpath(path P, Agedge_s first, Agedge_s last, pathend_t tendp, pathend_t hendp, __array_of_struct__ boxes, int boxn, int flag) { ENTERING("va61hggynvb6z6j34w7otmab","completeregularpath"); try { Agedge_s uleft, uright, lleft, lright; int i, fb, lb; splines spl; pointf pp; int pn; fb = lb = -1; uleft = uright = null; uleft = top_bound(first, -1); uright = top_bound(first, 1); if (uleft!=null) { if (N(spl = getsplinepoints(uleft))) return; pp = (pointf) spl.getArrayOfPtr("list").plus(0).getPtr().getPtr("list"); pn = spl.getArrayOfPtr("list").plus(0).getPtr().getInt("size"); } if (uright!=null) { if (N(spl = getsplinepoints(uright))) return; pp = (pointf) spl.getArrayOfPtr("list").plus(0).getPtr().getPtr("list"); pn = spl.getArrayOfPtr("list").plus(0).getPtr().getInt("size"); } lleft = lright = null; lleft = bot_bound(last, -1); lright = bot_bound(last, 1); if (lleft!=null) { if (N(spl = getsplinepoints(lleft))) return; pp = (pointf) spl.getArrayOfPtr("list").plus(spl.getInt("size") - 1).getPtr().getPtr("list"); pn = spl.getArrayOfPtr("list").plus(spl.getInt("size") - 1).getPtr().getInt("size"); } if (lright!=null) { if (N(spl = getsplinepoints(lright))) return; pp = (pointf) spl.getArrayOfPtr("list").plus(spl.getInt("size") - 1).getPtr().getPtr("list"); pn = spl.getArrayOfPtr("list").plus(spl.getInt("size") - 1).getPtr().getInt("size"); } for (i = 0; i < tendp.getInt("boxn"); i++) add_box(P, (ST_boxf)tendp.getArrayOfStruct("boxes").plus(i).getStruct()); fb = P.getInt("nbox") + 1; lb = fb + boxn - 3; for (i = 0; i < boxn; i++) add_box(P, (ST_boxf)boxes.plus(i).getStruct()); for (i = hendp.getInt("boxn") - 1; i >= 0; i--) add_box(P, (ST_boxf)hendp.getArrayOfStruct("boxes").plus(i).getStruct()); adjustregularpath(P, fb, lb); } finally { LEAVING("va61hggynvb6z6j34w7otmab","completeregularpath"); } } //3 3wwhczhpkcnflwr1l9wcga7tq // static boxf makeregularend(boxf b, int side, double y) public static __struct__ makeregularend(final ST_boxf b, int side, double y) { // WARNING!! STRUCT return makeregularend_w_(b.copy(), side, y).copy(); } private static __struct__ makeregularend_w_(final ST_boxf b, int side, double y) { ENTERING("3wwhczhpkcnflwr1l9wcga7tq","makeregularend"); try { final __struct__ newb = JUtils.from(boxf.class); switch (side) { case (1<<0): newb.___(boxfof(b.LL.x, y, b.UR.x, b.LL.y)); break; case (1<<2): newb.___(boxfof(b.LL.x, b.UR.y, b.UR.x, y)); break; } return newb; } finally { LEAVING("3wwhczhpkcnflwr1l9wcga7tq","makeregularend"); } } //3 88xrlzjovkxcnay9b2y5zyiid // static void adjustregularpath(path * P, int fb, int lb) public static void adjustregularpath(path P, int fb, int lb) { ENTERING("88xrlzjovkxcnay9b2y5zyiid","adjustregularpath"); try { boxf bp1, bp2; int i, x; for (i = fb-1; i < lb+1; i++) { bp1 = P.getArrayOfPtr("boxes").plus(i).getStruct().amp(); if ((i - fb) % 2 == 0) { if (bp1.getStruct("LL").getDouble("x") >= bp1.getStruct("UR").getDouble("x")) { x = (int)((bp1.getStruct("LL").getDouble("x") + bp1.getStruct("UR").getDouble("x")) / 2); bp1.getStruct("LL").setDouble("x", x - 8); bp1.getStruct("UR").setDouble("x", x + 8); } } else { if (bp1.getStruct("LL").getDouble("x") + 16 > bp1.getStruct("UR").getDouble("x")) { x = (int)((bp1.getStruct("LL").getDouble("x") + bp1.getStruct("UR").getDouble("x")) / 2); bp1.getStruct("LL").setDouble("x", x - 8); bp1.getStruct("UR").setDouble("x", x + 8); } } } for (i = 0; i < P.getInt("nbox") - 1; i++) { bp1 = P.getArrayOfPtr("boxes").plus(i).getStruct().amp(); bp2 = P.getArrayOfPtr("boxes").plus(i+1).getStruct().amp(); if (i >= fb && i <= lb && (i - fb) % 2 == 0) { if (bp1.getStruct("LL").getDouble("x") + 16 > bp2.getStruct("UR").getDouble("x")) bp2.getStruct("UR").setDouble("x", bp1.getStruct("LL").getDouble("x") + 16); if (bp1.getStruct("UR").getDouble("x") - 16 < bp2.getStruct("LL").getDouble("x")) bp2.getStruct("LL").setDouble("x", bp1.getStruct("UR").getDouble("x") - 16); } else if (i + 1 >= fb && i < lb && (i + 1 - fb) % 2 == 0) { if (bp1.getStruct("LL").getDouble("x") + 16 > bp2.getStruct("UR").getDouble("x")) bp1.getStruct("LL").setDouble("x", bp2.getStruct("UR").getDouble("x") - 16); if (bp1.getStruct("UR").getDouble("x") - 16 < bp2.getStruct("LL").getDouble("x")) bp1.getStruct("UR").setDouble("x", bp2.getStruct("LL").getDouble("x") + 16); } } } finally { LEAVING("88xrlzjovkxcnay9b2y5zyiid","adjustregularpath"); } } //3 bajn5vx0isu427n6dh131b985 // static boxf rank_box(spline_info_t* sp, graph_t * g, int r) public static ST_boxf rank_box(spline_info_t sp, Agraph_s g, int r) { // WARNING!! STRUCT return rank_box_w_(sp, g, r).copy(); } private static ST_boxf rank_box_w_(spline_info_t sp, Agraph_s g, int r) { ENTERING("bajn5vx0isu427n6dh131b985","rank_box"); try { final ST_boxf b = new ST_boxf(); Agnode_s /* *right0, *right1, */ left0, left1; b.___(sp.getPtr("Rank_box").plus(r).getStruct()); if (b.LL.x == b.UR.x) { left0 = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr(); /* right0 = GD_rank(g)[r].v[GD_rank(g)[r].n - 1]; */ left1 = (Agnode_s) GD_rank(g).plus(r + 1).getArrayOfPtr("v").plus(0).getPtr(); /* right1 = GD_rank(g)[r + 1].v[GD_rank(g)[r + 1].n - 1]; */ b.LL.x = sp.getInt("LeftBound"); b.LL.y = ND_coord(left1).getDouble("y") + GD_rank(g).plus(r + 1).getDouble("ht2"); b.UR.x = sp.getInt("RightBound"); b.UR.y = ND_coord(left0).getDouble("y") - GD_rank(g).plus(r).getDouble("ht1"); sp.getPtr("Rank_box").plus(r).setStruct(b); } return b; } finally { LEAVING("bajn5vx0isu427n6dh131b985","rank_box"); } } //3 6qwcnugx2ytjrvi5rgxzyzg5i // static int straight_len(node_t * n) public static int straight_len(Agnode_s n) { ENTERING("6qwcnugx2ytjrvi5rgxzyzg5i","straight_len"); try { int cnt = 0; Agnode_s v; v = n; while (true) { v = (Agnode_s) aghead(ND_out(v).getFromList(0)); if (ND_node_type(v) != 1) break; if ((ND_out(v).size != 1) || (ND_in(v).size != 1)) break; if (ND_coord(v).getDouble("x") != ND_coord(n).getDouble("x")) break; cnt++; } return cnt; } finally { LEAVING("6qwcnugx2ytjrvi5rgxzyzg5i","straight_len"); } } //3 15pgjjuil2c1rjldu29j07gbz // static edge_t *straight_path(edge_t * e, int cnt, pointf * plist, int *np) public static Agedge_s straight_path(Agedge_s e, int cnt, __ptr__ plist, int np[]) { ENTERING("15pgjjuil2c1rjldu29j07gbz","straight_path"); try { int n = np[0]; Agedge_s f = e; while ((cnt--)!=0) f = (Agedge_s) ND_out(aghead(f)).getFromList(0); plist.plus(np[0]++).setStruct(plist.plus(n - 1).getStruct()); plist.plus(np[0]++).setStruct(plist.plus(n - 1).getStruct()); plist.plus(np[0]).setStruct(ND_coord(agtail(f))); /* will be overwritten by next spline */ return f; } finally { LEAVING("15pgjjuil2c1rjldu29j07gbz","straight_path"); } } //3 4ilkzqtegd5uffawb4qcjthu1 // static void recover_slack(edge_t * e, path * p) public static void recover_slack(Agedge_s e, path p) { ENTERING("4ilkzqtegd5uffawb4qcjthu1","recover_slack"); try { int b; Agnode_s vn; b = 0; /* skip first rank box */ for (vn = aghead(e); ND_node_type(vn) == 1 && N(((Boolean)Z.z().sinfo.call("splineMerge", vn)).booleanValue()); vn = aghead(ND_out(vn).getFromList(0))) { while ((b < p.getInt("nbox")) && (p.getPtr("boxes").plus(b).getStruct("LL").getDouble("y") > ND_coord(vn).getDouble("y"))) b++; if (b >= p.getInt("nbox")) break; if (p.getPtr("boxes").plus(b).getStruct("UR").getDouble("y") < ND_coord(vn).getDouble("y")) continue; if (ND_label(vn)!=null) resize_vn(vn, (int)p.getPtr("boxes").plus(b).getStruct("LL").getDouble("x"), (int)p.getPtr("boxes").plus(b).getStruct("UR").getDouble("x"), (int)(p.getPtr("boxes").plus(b).getStruct("UR").getDouble("x") + ND_rw(vn))); else resize_vn(vn, (int)p.getPtr("boxes").plus(b).getStruct("LL").getDouble("x"), (int)((p.getPtr("boxes").plus(b).getStruct("LL").getDouble("x") + p.getPtr("boxes").plus(b).getStruct("UR").getDouble("x")) / 2), (int)p.getPtr("boxes").plus(b).getStruct("UR").getDouble("x")); } } finally { LEAVING("4ilkzqtegd5uffawb4qcjthu1","recover_slack"); } } //3 3vmg1q1r0eb14etvjdk4cukpd // static void resize_vn(vn, lx, cx, rx) node_t *vn public static void resize_vn(Agnode_s vn, int lx, int cx, int rx) { ENTERING("3vmg1q1r0eb14etvjdk4cukpd","resize_vn"); try { ND_coord(vn).setDouble("x", cx); ND_lw(vn, cx - lx); ND_rw(vn, rx - cx); } finally { LEAVING("3vmg1q1r0eb14etvjdk4cukpd","resize_vn"); } } //3 9t0v5wicmjuc3ij9hko6iawle // static edge_t *top_bound(edge_t * e, int side) public static Agedge_s top_bound(Agedge_s e, int side) { ENTERING("9t0v5wicmjuc3ij9hko6iawle","top_bound"); try { Agedge_s f, ans = null; int i; for (i = 0; (f = (Agedge_s) ND_out(agtail(e)).getFromList(i))!=null; i++) { if (side * (ND_order(aghead(f)) - ND_order(aghead(e))) <= 0) continue; if ((ED_spl(f) == null) && ((ED_to_orig(f) == null) || (ED_spl(ED_to_orig(f)) == null))) continue; if ((ans == null) || (side * (ND_order(aghead(ans)) - ND_order(aghead(f))) > 0)) ans = f; } return ans; } finally { LEAVING("9t0v5wicmjuc3ij9hko6iawle","top_bound"); } } //3 9fsg0uiyhtrayd4mimmc0i25e // static edge_t *bot_bound(edge_t * e, int side) public static Agedge_s bot_bound(Agedge_s e, int side) { ENTERING("9fsg0uiyhtrayd4mimmc0i25e","bot_bound"); try { Agedge_s f, ans = null; int i; for (i = 0; (f = (Agedge_s) ND_in(aghead(e)).getFromList(i))!=null; i++) { if (side * (ND_order(agtail(f)) - ND_order(agtail(e))) <= 0) continue; if ((ED_spl(f) == null) && ((ED_to_orig(f) == null) || (ED_spl(ED_to_orig(f)) == null))) continue; if ((ans == null) || (side * (ND_order(agtail(ans)) - ND_order(agtail(f))) > 0)) ans = f; } return ans; } finally { LEAVING("9fsg0uiyhtrayd4mimmc0i25e","bot_bound"); } } //3 65uvkv1mextaah5m997ibe3qs // static int cl_vninside(graph_t * cl, node_t * n) public static boolean cl_vninside(Agraph_s cl, Agnode_s n) { ENTERING("65uvkv1mextaah5m997ibe3qs","cl_vninside"); try { return (BETWEEN(GD_bb(cl).LL.x, (double)(ND_coord(n).getDouble("x")), GD_bb(cl).UR.x) && BETWEEN(GD_bb(cl).LL.y, (double)(ND_coord(n).getDouble("y")), GD_bb(cl).UR.y)); } finally { LEAVING("65uvkv1mextaah5m997ibe3qs","cl_vninside"); } } //3 dzvvmxkya868w5x78lkvchigk // static Agraph_t *cl_bound(graph_t* g, node_t *n, node_t *adj) public static Agraph_s cl_bound(Agraph_s g, Agnode_s n, Agnode_s adj) { ENTERING("dzvvmxkya868w5x78lkvchigk","cl_bound"); try { Agraph_s rv, cl, tcl, hcl; Agedge_s orig; rv = null; if (ND_node_type(n) == 0) tcl = hcl = ND_clust(n); else { orig = ED_to_orig(ND_out(n).getFromList(0)); tcl = ND_clust(agtail(orig)); hcl = ND_clust(aghead(orig)); } if (ND_node_type(adj) == 0) { cl = ( EQ(ND_clust(adj), g) ? null:ND_clust(adj)); if (cl!=null && NEQ(cl, tcl) && NEQ(cl, hcl)) rv = cl; } else { orig = ED_to_orig(ND_out(adj).getFromList(0)); cl = ( EQ(ND_clust(agtail(orig)), g) ? null:ND_clust(agtail(orig))); if (cl!=null && NEQ(cl, tcl) && NEQ(cl, hcl) && cl_vninside(cl, adj)) rv = cl; else { cl = ( EQ(ND_clust(aghead(orig)), g) ? null:ND_clust(aghead(orig))); if (cl!=null && NEQ(cl, tcl) && NEQ(cl, hcl) && cl_vninside(cl, adj)) rv = cl; } } return rv; } finally { LEAVING("dzvvmxkya868w5x78lkvchigk","cl_bound"); } } //3 6qwgl36ugfnduc5x59ohuewv1 // static boxf maximal_bbox(graph_t* g, spline_info_t* sp, node_t* vn, edge_t* ie, edge_t* oe) public static __struct__ maximal_bbox(Agraph_s g, spline_info_t sp, Agnode_s vn, Agedge_s ie, Agedge_s oe) { // WARNING!! STRUCT return maximal_bbox_w_(g, sp, vn, ie, oe).copy(); } private static __struct__ maximal_bbox_w_(Agraph_s g, spline_info_t sp, Agnode_s vn, Agedge_s ie, Agedge_s oe) { ENTERING("6qwgl36ugfnduc5x59ohuewv1","maximal_bbox"); try { double b, nb; Agraph_s left_cl, right_cl; Agnode_s left, right; final ST_boxf rv = new ST_boxf(); left_cl = right_cl = null; /* give this node all the available space up to its neighbors */ b = (double)(ND_coord(vn).getDouble("x") - ND_lw(vn) - 4); if ((left = neighbor(g, vn, ie, oe, -1))!=null) { if ((left_cl = cl_bound(g, vn, left))!=null) nb = GD_bb(left_cl).UR.x + (double)(sp.getInt("Splinesep")); else { nb = (double)(ND_coord(left).getDouble("x") + ND_mval(left)); if (ND_node_type(left) == 0) nb += GD_nodesep(g) / 2.; else nb += (double)(sp.getInt("Splinesep")); } if (nb < b) b = nb; rv.LL.x = ROUND(b); } else rv.LL.x = MIN(ROUND(b), sp.getInt("LeftBound")); /* we have to leave room for our own label! */ if ((ND_node_type(vn) == 1) && (ND_label(vn)!=null)) b = (double)(ND_coord(vn).getDouble("x") + 10); else b = (double)(ND_coord(vn).getDouble("x") + ND_rw(vn) + 4); if ((right = neighbor(g, vn, ie, oe, 1))!=null) { if ((right_cl = cl_bound(g, vn, right))!=null) nb = GD_bb(right_cl).LL.x - (double)(sp.getInt("Splinesep")); else { nb = ND_coord(right).getDouble("x") - ND_lw(right); if (ND_node_type(right) == 0) nb -= GD_nodesep(g) / 2.; else nb -= (double)(sp.getInt("Splinesep")); } if (nb > b) b = nb; rv.UR.x = ROUND(b); } else rv.UR.x = MAX(ROUND(b), sp.getInt("RightBound")); if ((ND_node_type(vn) == 1) && (ND_label(vn)!=null)) { rv.UR.x = rv.UR.x - ND_rw(vn); if (rv.UR.x < rv.LL.x) rv.UR.x = ND_coord(vn).getDouble("x"); } rv.LL.y = ND_coord(vn).getDouble("y") - GD_rank(g).plus(ND_rank(vn)).getDouble("ht1"); rv.UR.y = ND_coord(vn).getDouble("y") + GD_rank(g).plus(ND_rank(vn)).getDouble("ht2"); return rv; } finally { LEAVING("6qwgl36ugfnduc5x59ohuewv1","maximal_bbox"); } } //3 18pm6r3xcy90f0xi5hpm9jdhk // static node_t * neighbor(graph_t* g, node_t *vn, edge_t *ie, edge_t *oe, int dir) public static Agnode_s neighbor(Agraph_s g, Agnode_s vn, Agedge_s ie, Agedge_s oe, int dir) { ENTERING("18pm6r3xcy90f0xi5hpm9jdhk","neighbor"); try { int i; Agnode_s n, rv = null; __ptr__ rank = GD_rank(g).plus(ND_rank(vn)); for (i = ND_order(vn) + dir; ((i >= 0) && (i < rank.getInt("n"))); i += dir) { n = (Agnode_s) rank.getArrayOfPtr("v").plus(i).getPtr(); if ((ND_node_type(n) == 1) && (ND_label(n)!=null)) { rv = n; break; } if (ND_node_type(n) == 0) { rv = n; break; } if (pathscross(n, vn, ie, oe) == false) { rv = n; break; } } return rv; } finally { LEAVING("18pm6r3xcy90f0xi5hpm9jdhk","neighbor"); } } //3 f4q0oqe165s9pl5k0th5noeyv // static boolean pathscross(n0, n1, ie1, oe1) node_t *n0, *n1 public static boolean pathscross(Agnode_s n0, Agnode_s n1, Agedge_s ie1, Agedge_s oe1) { ENTERING("f4q0oqe165s9pl5k0th5noeyv","pathscross"); try { Agedge_s e0, e1; Agnode_s na, nb; boolean order; int cnt; order = (ND_order(n0) > ND_order(n1)); if ((ND_out(n0).size != 1) && (ND_out(n0).size != 1)) return false; e1 = oe1; if (ND_out(n0).size == 1 && e1!=null) { e0 = (Agedge_s) ND_out(n0).getFromList(0); for (cnt = 0; cnt < 2; cnt++) { if (EQ(na = aghead(e0), nb = aghead(e1))) break; if (order != (ND_order(na) > ND_order(nb))) return NOT(false); if ((ND_out(na).size != 1) || (ND_node_type(na) == 0)) break; e0 = (Agedge_s) ND_out(na).getFromList(0); if ((ND_out(nb).size != 1) || (ND_node_type(nb) == 0)) break; e1 = (Agedge_s) ND_out(nb).getFromList(0); } } e1 = ie1; if (ND_in(n0).size == 1 && e1!=null) { e0 = (Agedge_s) ND_in(n0).getFromList(0); for (cnt = 0; cnt < 2; cnt++) { if (EQ(na = agtail(e0), nb = agtail(e1))) break; if (order != (ND_order(na) > ND_order(nb))) return NOT(false); if ((ND_in(na).size != 1) || (ND_node_type(na) == 0)) break; e0 = (Agedge_s) ND_in(na).getFromList(0); if ((ND_in(nb).size != 1) || (ND_node_type(nb) == 0)) break; e1 = (Agedge_s) ND_in(nb).getFromList(0); } } return false; } finally { LEAVING("f4q0oqe165s9pl5k0th5noeyv","pathscross"); } } } plantuml-1.2017.15/src/gen/lib/dotgen/fastgr__c.java000066400000000000000000001113111312650303100220340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.cgraph.obj__c.agroot; import static gen.lib.common.memory__c.zmalloc; import static gen.lib.dotgen.dotinit__c.dot_root; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGINEDGE; import static smetana.core.Macro.AGNODE; import static smetana.core.Macro.AGOUTEDGE; import static smetana.core.Macro.AGSEQ; import static smetana.core.Macro.AGTYPE; import static smetana.core.Macro.ED_count; import static smetana.core.Macro.ED_edge_type; import static smetana.core.Macro.ED_head_port; import static smetana.core.Macro.ED_minlen; import static smetana.core.Macro.ED_tail_port; import static smetana.core.Macro.ED_to_orig; import static smetana.core.Macro.ED_to_virt; import static smetana.core.Macro.ED_weight; import static smetana.core.Macro.ED_xpenalty; import static smetana.core.Macro.GD_has_flat_edges; import static smetana.core.Macro.GD_n_nodes; import static smetana.core.Macro.GD_nlist; import static smetana.core.Macro.ND_UF_size; import static smetana.core.Macro.ND_flat_in; import static smetana.core.Macro.ND_flat_out; import static smetana.core.Macro.ND_ht; import static smetana.core.Macro.ND_in; import static smetana.core.Macro.ND_lw; import static smetana.core.Macro.ND_next; import static smetana.core.Macro.ND_node_type; import static smetana.core.Macro.ND_other; import static smetana.core.Macro.ND_out; import static smetana.core.Macro.ND_prev; import static smetana.core.Macro.ND_rw; import static smetana.core.Macro.NOT; import static smetana.core.Macro.UNSUPPORTED; import static smetana.core.Macro.aghead; import static smetana.core.Macro.agtail; import static smetana.core.Macro.alloc_elist; import static smetana.core.Macro.elist_append; import h.Agedge_s; import h.Agedgeinfo_t; import h.Agedgepair_s; import h.Agnode_s; import h.Agnodeinfo_t; import h.Agraph_s; import h.Agrec_s; import h.ST_elist; import h.boxf; import h.elist; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class fastgr__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 econbrl314rr46qnvvw5e32j7 // static edge_t *ffe(node_t * u, elist uL, node_t * v, elist vL) public static Agedge_s ffe(Agnode_s u, final ST_elist uL, Agnode_s v, final ST_elist vL) { // WARNING!! STRUCT return ffe_w_(u, uL.copy(), v, vL.copy()); } private static Agedge_s ffe_w_(Agnode_s u, final ST_elist uL, Agnode_s v, final ST_elist vL) { ENTERING("econbrl314rr46qnvvw5e32j7","ffe"); try { int i; Agedge_s e = null; if ((uL.size > 0) && (vL.size > 0)) { if (uL.size < vL.size) { for (i = 0; (e = (Agedge_s) uL.getFromList(i))!=null; i++) if (EQ(aghead(e), v)) break; } else { for (i = 0; (e = (Agedge_s) vL.getFromList(i))!=null; i++) if (EQ(agtail(e), u)) break; } } else e = null; return e; } finally { LEAVING("econbrl314rr46qnvvw5e32j7","ffe"); } } //3 1uygfrgur73lfy9vsjozwwupm // edge_t *find_fast_edge(node_t * u, node_t * v) public static Agedge_s find_fast_edge(Agnode_s u, Agnode_s v) { ENTERING("1uygfrgur73lfy9vsjozwwupm","find_fast_edge"); try { return ffe(u, ND_out(u), v, ND_in(v)); } finally { LEAVING("1uygfrgur73lfy9vsjozwwupm","find_fast_edge"); } } //3 1yw7ahdnxnexnicj552zqyyej // static node_t* find_fast_node(graph_t * g, node_t * n) public static Agnode_s find_fast_node(Agraph_s g, Agnode_s n) { ENTERING("1yw7ahdnxnexnicj552zqyyej","find_fast_node"); try { Agnode_s v; for (v = GD_nlist(g); v!=null; v = ND_next(v)) if (EQ(v, n)) break; return v; } finally { LEAVING("1yw7ahdnxnexnicj552zqyyej","find_fast_node"); } } //3 bf1j97keudu416avridkj9fpb // edge_t *find_flat_edge(node_t * u, node_t * v) public static Agedge_s find_flat_edge(Agnode_s u, Agnode_s v) { ENTERING("bf1j97keudu416avridkj9fpb","find_flat_edge"); try { return ffe(u, ND_flat_out(u), v, ND_flat_in(v)); } finally { LEAVING("bf1j97keudu416avridkj9fpb","find_flat_edge"); } } //3 cttswsffgmw1g710jzvdd3wzn // static void safe_list_append(edge_t * e, elist * L) public static Object safe_list_append(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("3kdqf9wvozj4zu6wrv6ur2k47"); // safe_list_append(edge_t * e, elist * L) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("dhvbzrcz6s76mme3x94begmvr"); // for (i = 0; i < L->size; i++) UNSUPPORTED("c0a4ruccwt5263vw39xrttm0y"); // if (e == L->list[i]) UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return; UNSUPPORTED("cslejjtgepjdwlcykfas4fmvz"); // elist_append(e, (*L)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8t6gpubo908pz1pqnt1s88lnt // edge_t *fast_edge(edge_t * e) public static Agedge_s fast_edge(Agedge_s e) { ENTERING("8t6gpubo908pz1pqnt1s88lnt","fast_edge"); try { elist_append(e, ND_out(agtail(e))); elist_append(e, ND_in(aghead(e))); return e; } finally { LEAVING("8t6gpubo908pz1pqnt1s88lnt","fast_edge"); } } //3 dxb0q8ajb7iv25aj6zdqnbwh5 // void zapinlist(elist * L, edge_t * e) public static void zapinlist(elist L, Agedge_s e) { ENTERING("dxb0q8ajb7iv25aj6zdqnbwh5","zapinlist"); try { int i; for (i = 0; i < L.getInt("size"); i++) { if (EQ(L.getArrayOfPtr("list").plus(i).getPtr(), e)) { L.setInt("size", L.getInt("size")-1); L.getArrayOfPtr("list").plus(i).setPtr(L.getArrayOfPtr("list").plus(L.getInt("size")).getPtr()); L.getArrayOfPtr("list").plus(L.getInt("size")).setPtr(null); break; } } } finally { LEAVING("dxb0q8ajb7iv25aj6zdqnbwh5","zapinlist"); } } //3 dkv97rr4ytpehp291etaxe9gc // void delete_fast_edge(edge_t * e) public static void delete_fast_edge(Agedge_s e) { ENTERING("dkv97rr4ytpehp291etaxe9gc","delete_fast_edge"); try { //assert(e != NULL); zapinlist((ND_out(agtail(e))).amp(), e); zapinlist((ND_in(aghead(e))).amp(), e); } finally { LEAVING("dkv97rr4ytpehp291etaxe9gc","delete_fast_edge"); } } //3 b8a9hlxts1y43x7r4f31vwee6 // static void safe_delete_fast_edge(edge_t * e) public static Object safe_delete_fast_edge(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("bw8hdfe3bql5qxhdyxjh12iaf"); // safe_delete_fast_edge(edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("6ag74vz3kjmohe4bp89fktey4"); // edge_t *f; UNSUPPORTED("axei6r4pdvrumkaqc9p82yzjh"); // assert(e != NULL); UNSUPPORTED("f10apexer8zzjd53hdc3kc6l5"); // for (i = 0; (f = ND_out(agtail(e)).list[i]); i++) UNSUPPORTED("dibajtvzac9fny0wd51x9jto8"); // if (f == e) UNSUPPORTED("8jj8ar5kwgfuzsk5nd6eyfcmc"); // zapinlist(&(ND_out(agtail(e))), e); UNSUPPORTED("7h2ym5qzjdgt4gg6uscho1z1e"); // for (i = 0; (f = ND_in(aghead(e)).list[i]); i++) UNSUPPORTED("dibajtvzac9fny0wd51x9jto8"); // if (f == e) UNSUPPORTED("dyemtglp4tpava0oysdm66am8"); // zapinlist(&(ND_in(aghead(e))), e); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 73oebfcfiescklohgt8mddswc // void other_edge(edge_t * e) public static void other_edge(Agedge_s e) { ENTERING("73oebfcfiescklohgt8mddswc","other_edge"); try { elist_append(e, ND_other(agtail(e))); } finally { LEAVING("73oebfcfiescklohgt8mddswc","other_edge"); } } //3 4zg1fp1b7bhnx2tbeaij8yeel // void safe_other_edge(edge_t * e) public static Object safe_other_edge(Object... arg) { UNSUPPORTED("3cc9ux78ad0yjajm0nkpos345"); // void safe_other_edge(edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bn816jsdz3qke6htvbwvztrpc"); // safe_list_append(e, &(ND_other(agtail(e)))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4gd9tmpq70q0rij5otj0k6sn2 // edge_t *new_virtual_edge(node_t * u, node_t * v, edge_t * orig) public static Agedge_s new_virtual_edge(Agnode_s u, Agnode_s v, Agedge_s orig) { ENTERING("4gd9tmpq70q0rij5otj0k6sn2","new_virtual_edge"); try { Agedge_s e; Agedgepair_s e2 = (Agedgepair_s)zmalloc(sizeof(Agedgepair_s.class)); AGTYPE(e2.getStruct("in").amp(), AGINEDGE); AGTYPE(e2.getStruct("out").amp(), AGOUTEDGE); e2.getStruct("out").getStruct("base").setPtr("data", zmalloc(sizeof(Agedgeinfo_t.class)).castTo(Agedgeinfo_t.class).castTo(Agrec_s.class)); e = (Agedge_s) e2.getStruct("out").amp(); agtail(e, u); aghead(e, v); ED_edge_type(e, 1); if (orig!=null) { AGSEQ(e, AGSEQ(orig)); AGSEQ(e2.getStruct("in").amp(), AGSEQ(orig)); ED_count(e, ED_count(orig)); ED_xpenalty(e, ED_xpenalty(orig)); ED_weight(e, ED_weight(orig)); ED_minlen(e, ED_minlen(orig)); if (EQ(agtail(e), agtail(orig))) ED_tail_port(e, ED_tail_port(orig)); else if (EQ(agtail(e), aghead(orig))) ED_tail_port(e, ED_head_port(orig)); if (EQ(aghead(e), aghead(orig))) ED_head_port(e, ED_head_port(orig)); else if (EQ(aghead(e), agtail(orig))) ED_head_port(e, ED_tail_port(orig)); if (ED_to_virt(orig) == null) ED_to_virt(orig, e); ED_to_orig(e, orig); } else { ED_minlen(e, 1); ED_count(e, 1); ED_xpenalty(e, 1); ED_weight(e, 1); } return e; } finally { LEAVING("4gd9tmpq70q0rij5otj0k6sn2","new_virtual_edge"); } } //3 9obdfflzw4cs2z9r0dng26mvw // edge_t *virtual_edge(node_t * u, node_t * v, edge_t * orig) public static Agedge_s virtual_edge(Agnode_s u, Agnode_s v, Agedge_s orig) { ENTERING("9obdfflzw4cs2z9r0dng26mvw","virtual_edge"); try { return fast_edge(new_virtual_edge(u, v, orig)); } finally { LEAVING("9obdfflzw4cs2z9r0dng26mvw","virtual_edge"); } } //3 98hkec8t6fjk10bjpstumw0ey // void fast_node(graph_t * g, Agnode_t * n) public static void fast_node(Agraph_s g, Agnode_s n) { ENTERING("98hkec8t6fjk10bjpstumw0ey","fast_node"); try { ND_next(n, GD_nlist(g)); if (ND_next(n)!=null) ND_prev(ND_next(n), n); GD_nlist(g, n); ND_prev(n, null); //assert(n != ND_next(n)); } finally { LEAVING("98hkec8t6fjk10bjpstumw0ey","fast_node"); } } //3 66jdzhjfa6kx3ntfyl5t7cehm // void fast_nodeapp(node_t * u, node_t * v) public static Object fast_nodeapp(Object... arg) { UNSUPPORTED("24rf80znlmwn6xx6m03vqyykr"); // void fast_nodeapp(node_t * u, node_t * v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8g450a5aruflexr2yn977dnjz"); // assert(u != v); UNSUPPORTED("dw67xh0kd304grgqkgiffmejh"); // assert(ND_next(v) == NULL); UNSUPPORTED("1tm9zh31fbm0sufjyg78ke83i"); // ND_next(v) = ND_next(u); UNSUPPORTED("cswodtimhknr7wxlbmhxfzutw"); // if (ND_next(u)) UNSUPPORTED("7aukr7lwtj4wnis5h9ciserpd"); // ND_prev(ND_next(u)) = v; UNSUPPORTED("6oaowqmk3llh0vp3h096bo6nq"); // ND_prev(v) = u; UNSUPPORTED("5ymiaen2fr7qzsn4uotyf2eqy"); // ND_next(u) = v; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 emsq7b6s5100lscckzy3ileqd // void delete_fast_node(graph_t * g, node_t * n) public static void delete_fast_node(Agraph_s g, Agnode_s n) { ENTERING("emsq7b6s5100lscckzy3ileqd","delete_fast_node"); try { assert(find_fast_node(g, n)!=null); if (ND_next(n)!=null) ND_prev(ND_next(n), ND_prev(n)); if (ND_prev(n)!=null) ND_next(ND_prev(n), ND_next(n)); else GD_nlist(g, ND_next(n)); } finally { LEAVING("emsq7b6s5100lscckzy3ileqd","delete_fast_node"); } } //3 eg08ajzojsm0224btmfi7kdxt // node_t *virtual_node(graph_t * g) public static Agnode_s virtual_node(Agraph_s g) { ENTERING("eg08ajzojsm0224btmfi7kdxt","virtual_node"); try { Agnode_s n; n = (Agnode_s)zmalloc(sizeof(Agnode_s.class)); // agnameof(n) = "virtual"; AGTYPE(n, AGNODE); n.getStruct("base").setPtr("data", (Agnodeinfo_t)zmalloc(sizeof(Agnodeinfo_t.class))); n.setPtr("root", agroot(g)); ND_node_type(n, 1); ND_rw(n, 1); ND_lw(n, 1); ND_ht(n, 1); ND_UF_size(n, 1); alloc_elist(4, ND_in(n), Agnode_s.class); alloc_elist(4, ND_out(n), Agnode_s.class); fast_node(g, n); GD_n_nodes(g, GD_n_nodes(g)+1); return n; } finally { LEAVING("eg08ajzojsm0224btmfi7kdxt","virtual_node"); } } //3 8dvukicq96g5t3xgdl0ue35mj // void flat_edge(graph_t * g, edge_t * e) public static void flat_edge(Agraph_s g, Agedge_s e) { ENTERING("8dvukicq96g5t3xgdl0ue35mj","flat_edge"); try { elist_append(e, ND_flat_out(agtail(e))); elist_append(e, ND_flat_in(aghead(e))); GD_has_flat_edges(g, NOT(false)); GD_has_flat_edges(dot_root(g), NOT(false)); } finally { LEAVING("8dvukicq96g5t3xgdl0ue35mj","flat_edge"); } } //3 clspalhiuedfnk9g9rlvfqpg7 // void delete_flat_edge(edge_t * e) public static void delete_flat_edge(Agedge_s e) { ENTERING("clspalhiuedfnk9g9rlvfqpg7","delete_flat_edge"); try { assert(e != null); if (ED_to_orig(e)!=null && EQ(ED_to_virt(ED_to_orig(e)), e)) ED_to_virt(ED_to_orig(e), null); zapinlist((ND_flat_out(agtail(e))).amp(), e); zapinlist((ND_flat_in(aghead(e))).amp(), e); } finally { LEAVING("clspalhiuedfnk9g9rlvfqpg7","delete_flat_edge"); } } //3 dcfpol11cvlt6aaa6phqbp6fo // static void basic_merge(edge_t * e, edge_t * rep) public static void basic_merge(Agedge_s e, Agedge_s rep) { ENTERING("dcfpol11cvlt6aaa6phqbp6fo","basic_merge"); try { if (ED_minlen(rep) < ED_minlen(e)) ED_minlen(rep, ED_minlen(e)); while (rep!=null) { ED_count(rep, ED_count(rep) + ED_count(e)); ED_xpenalty(rep, ED_xpenalty(rep) +ED_xpenalty(e)); ED_weight(rep, ED_weight(rep) + ED_weight(e)); rep = ED_to_virt(rep); } } finally { LEAVING("dcfpol11cvlt6aaa6phqbp6fo","basic_merge"); } } //3 6dxgtoii76tmonlnvz4rmiytd // void merge_oneway(edge_t * e, edge_t * rep) public static void merge_oneway(Agedge_s e, Agedge_s rep) { ENTERING("6dxgtoii76tmonlnvz4rmiytd","merge_oneway"); try { if (EQ(rep, ED_to_virt(e))) { UNSUPPORTED("84xxsh1cgsif42hgizyxw36ul"); // agerr(AGWARN, "merge_oneway glitch\n"); UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; } //assert(ED_to_virt(e) == NULL); ED_to_virt(e, rep); basic_merge(e, rep); } finally { LEAVING("6dxgtoii76tmonlnvz4rmiytd","merge_oneway"); } } //3 656h1u18x3gommk50i4bak8wi // static void unrep(edge_t * rep, edge_t * e) public static Object unrep(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("1cysdqgx90krtmp6pc8358byz"); // unrep(edge_t * rep, edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("az4p9xxo3dhparzmtf3co61n"); // ED_count(rep) -= ED_count(e); UNSUPPORTED("bf8f3cgvxc5n9ixbj4d1z94r0"); // ED_xpenalty(rep) -= ED_xpenalty(e); UNSUPPORTED("5m9h7kqjxjgizf3o1i6udm3c5"); // ED_weight(rep) -= ED_weight(e); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 62io7qyqg9kqthfkbotnjdq49 // void unmerge_oneway(edge_t * e) public static Object unmerge_oneway(Object... arg) { UNSUPPORTED("3rlflkkd29cm53ssikvrqx06v"); // void unmerge_oneway(edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3we8ga4x5k2sj4s20xlwumjq5"); // edge_t *rep, *nextrep; UNSUPPORTED("e23vpxy61ysfsjvp3u2boafhb"); // for (rep = ED_to_virt(e); rep; rep = nextrep) { UNSUPPORTED("bifyf7jydjlvj8u8hc9tqwutm"); // unrep(rep, e); UNSUPPORTED("eyjz7xjwxabdlqhyvuzfkks49"); // nextrep = ED_to_virt(rep); UNSUPPORTED("4h71tbcobl3o6put6h58thpgu"); // if (ED_count(rep) == 0) UNSUPPORTED("c87nxr35m1again4xqc8x4rhh"); // safe_delete_fast_edge(rep); /* free(rep)? */ UNSUPPORTED("9np2sz8r74ucvij23elgzxkr4"); // /* unmerge from a virtual edge chain */ UNSUPPORTED("5wohy8hhosadqtj6712ufa10t"); // while ((ED_edge_type(rep) == 1) UNSUPPORTED("9nortwuccpr0jx3z027d2jcyh"); // && (ND_node_type(aghead(rep)) == 1) UNSUPPORTED("drowv2sbxmbe2b6632mn3luww"); // && (ND_out(aghead(rep)).size == 1)) { UNSUPPORTED("6f9b53obe00vhcbxj865xc57u"); // rep = ND_out(aghead(rep)).list[0]; UNSUPPORTED("11fxzls2ru6go1mcuza6i8zhv"); // unrep(rep, e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bm31ww0y2fu2w9n5nyi04ad76"); // ED_to_virt(e) = NULL; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/dotgen/flat__c.java000066400000000000000000001021721312650303100215010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.common.memory__c.zmalloc; import static gen.lib.dotgen.dotinit__c.dot_root; import static gen.lib.dotgen.fastgr__c.virtual_edge; import static gen.lib.dotgen.fastgr__c.virtual_node; import static gen.lib.dotgen.mincross__c.rec_reset_vlists; import static gen.lib.dotgen.mincross__c.rec_save_vlists; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.sizeof_starstar_empty; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.ALLOC; import static smetana.core.Macro.ED_adjacent; import static smetana.core.Macro.ED_dist; import static smetana.core.Macro.ED_edge_type; import static smetana.core.Macro.ED_head_port; import static smetana.core.Macro.ED_label; import static smetana.core.Macro.ED_tail_port; import static smetana.core.Macro.ED_to_virt; import static smetana.core.Macro.GD_flip; import static smetana.core.Macro.GD_maxrank; import static smetana.core.Macro.GD_minrank; import static smetana.core.Macro.GD_n_cluster; import static smetana.core.Macro.GD_nlist; import static smetana.core.Macro.GD_rank; import static smetana.core.Macro.GD_ranksep; import static smetana.core.Macro.MAX; import static smetana.core.Macro.N; import static smetana.core.Macro.ND_alg; import static smetana.core.Macro.ND_coord; import static smetana.core.Macro.ND_flat_in; import static smetana.core.Macro.ND_flat_out; import static smetana.core.Macro.ND_ht; import static smetana.core.Macro.ND_in; import static smetana.core.Macro.ND_label; import static smetana.core.Macro.ND_lw; import static smetana.core.Macro.ND_next; import static smetana.core.Macro.ND_node_type; import static smetana.core.Macro.ND_order; import static smetana.core.Macro.ND_other; import static smetana.core.Macro.ND_out; import static smetana.core.Macro.ND_rank; import static smetana.core.Macro.ND_rw; import static smetana.core.Macro.NOT; import static smetana.core.Macro.UNSUPPORTED; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.boxf; import h.pointf; import h.rank_t; import smetana.core.JUtils; import smetana.core.__ptr__; import smetana.core.__struct__; public class flat__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e0gtvsxlvztmwu8yy44wfvf97 // static node_t *make_vn_slot(graph_t * g, int r, int pos) public static Agnode_s make_vn_slot(Agraph_s g, int r, int pos) { ENTERING("e0gtvsxlvztmwu8yy44wfvf97","make_vn_slot"); try { int i; __ptr__ v; Agnode_s n; v = ALLOC(GD_rank(g).plus(r).getInt("n") + 2, GD_rank(g).plus(r).getPtr("v"), Agnode_s.class); GD_rank(g).plus(r).setPtr("v", v); for (i = GD_rank(g).plus(r).getInt("n"); i > pos; i--) { v.plus(i).setPtr(v.plus(i - 1).getPtr()); ND_order(v.plus(i).getPtr(), ND_order(v.plus(i).getPtr())+1); } n = virtual_node(g); v.plus(pos).setPtr(n); ND_order(n, pos); ND_rank(n, r); GD_rank(g).plus(r).setInt("n", GD_rank(g).plus(r).getInt("n")+1); v.plus(GD_rank(g).plus(r).getInt("n")).setPtr(null); return (Agnode_s) v.plus(pos).getPtr(); } finally { LEAVING("e0gtvsxlvztmwu8yy44wfvf97","make_vn_slot"); } } //3 d64wt9oqphauv3hp4axbg2ep3 // static void findlr(node_t * u, node_t * v, int *lp, int *rp) public static void findlr(Agnode_s u, Agnode_s v, int lp[], int rp[]) { ENTERING("d64wt9oqphauv3hp4axbg2ep3","findlr"); try { int l, r; l = ND_order(u); r = ND_order(v); if (l > r) { int t = l; l = r; r = t; } lp[0] = l; rp[0] = r; } finally { LEAVING("d64wt9oqphauv3hp4axbg2ep3","findlr"); } } //3 bwjjmaydx5a2fnpeoligkha0r // static void setbounds(node_t * v, int *bounds, int lpos, int rpos) public static void setbounds(Agnode_s v, int bounds[], int lpos[], int rpos[]) { ENTERING("bwjjmaydx5a2fnpeoligkha0r","setbounds"); try { int i, ord; int[] l = new int[1], r = new int[1]; Agedge_s f; if (ND_node_type(v) == 1) { ord = ND_order(v); if (ND_in(v).size == 0) { /* flat */ assert(ND_out(v).size == 2); findlr((Agnode_s) aghead(ND_out(v).getFromList(0)), (Agnode_s) aghead(ND_out(v).getFromList(1)), l, r); /* the other flat edge could be to the left or right */ if (r[0] <= lpos[0]) bounds[2] = bounds[0] = ord; else if (l[0] >= rpos[0]) bounds[3] = bounds[1] = ord; /* could be spanning this one */ else if ((l[0] < lpos[0]) && (r[0] > rpos[0])); /* ignore */ /* must have intersecting ranges */ else { if ((l[0] < lpos[0]) || ((l[0] == lpos[0]) && (r[0] < rpos[0]))) bounds[2] = ord; if ((r[0] > rpos[0]) || ((r[0] == rpos[0]) && (l[0] > lpos[0]))) bounds[3] = ord; } } else { /* forward */ boolean onleft, onright; onleft = onright = false; for (i = 0; (f = (Agedge_s) ND_out(v).getFromList(i))!=null; i++) { if (ND_order(aghead(f)) <= lpos[0]) { onleft = NOT(false); continue; } if (ND_order(aghead(f)) >= rpos[0]) { onright = NOT(false); continue; } } if (onleft && (onright == false)) bounds[0] = ord + 1; if (onright && (onleft == false)) bounds[1] = ord - 1; } } } finally { LEAVING("bwjjmaydx5a2fnpeoligkha0r","setbounds"); } } //3 3bc4otcsxj1dujj49ydbb19oa // static int flat_limits(graph_t * g, edge_t * e) public static int flat_limits(Agraph_s g, Agedge_s e) { ENTERING("3bc4otcsxj1dujj49ydbb19oa","flat_limits"); try { int lnode, rnode, r, pos; int[] lpos = new int[1], rpos = new int[1]; int bounds[] = new int[4]; __ptr__ rank; r = ND_rank(agtail(e)) - 1; rank = GD_rank(g).plus(r).getPtr("v"); lnode = 0; rnode = GD_rank(g).plus(r).getInt("n") - 1; bounds[0] = bounds[2] = lnode - 1; bounds[1] = bounds[3] = rnode + 1; findlr(agtail(e), aghead(e), lpos, rpos); while (lnode <= rnode) { setbounds((Agnode_s)rank.plus(lnode).getPtr(), bounds, lpos, rpos); if (lnode != rnode) setbounds((Agnode_s)rank.plus(rnode).getPtr(), bounds, lpos, rpos); lnode++; rnode--; if (bounds[1] - bounds[0] <= 1) break; } if (bounds[0] <= bounds[1]) pos = (bounds[0] + bounds[1] + 1) / 2; else pos = (bounds[2] + bounds[3] + 1) / 2; return pos; } finally { LEAVING("3bc4otcsxj1dujj49ydbb19oa","flat_limits"); } } //3 4cw9yo9ap8ze1r873v6jat4yc // static void flat_node(edge_t * e) public static void flat_node(Agedge_s e) { ENTERING("4cw9yo9ap8ze1r873v6jat4yc","flat_node"); try { int r, place, ypos, h2; Agraph_s g; Agnode_s n, vn; Agedge_s ve; final __struct__ dimen = JUtils.from(pointf.class); if (ED_label(e) == null) return; g = dot_root(agtail(e)); r = ND_rank(agtail(e)); place = flat_limits(g, e); /* grab ypos = LL.y of label box before make_vn_slot() */ if ((n = (Agnode_s) GD_rank(g).plus(r - 1).getArrayOfPtr("v").plus(0).getPtr())!=null) ypos = (int)(ND_coord(n).getDouble("y") - GD_rank(g).plus(r - 1).getDouble("ht1")); else { n = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr(); ypos = (int)(ND_coord(n).getDouble("y") + GD_rank(g).plus(r).getDouble("ht2") + GD_ranksep(g)); } vn = make_vn_slot(g, r - 1, place); dimen.___(ED_label(e).getStruct("dimen")); if (GD_flip(g)!=0) { double f = dimen.getDouble("x"); dimen.setDouble("x", dimen.getDouble("y")); dimen.setDouble("y", f); } ND_ht(vn, dimen.getDouble("y")); h2 = (int)(ND_ht(vn) / 2); ND_rw(vn, dimen.getDouble("x") / 2); ND_lw(vn, ND_rw(vn)); ND_label(vn, ED_label(e)); ND_coord(vn).setDouble("y", ypos + h2); ve = virtual_edge(vn, agtail(e), e); /* was NULL? */ ED_tail_port(ve).getStruct("p").setDouble("x", -ND_lw(vn)); ED_head_port(ve).getStruct("p").setDouble("x", ND_rw(agtail(e))); ED_edge_type(ve, 4); ve = virtual_edge(vn, aghead(e), e); ED_tail_port(ve).getStruct("p").setDouble("x", ND_rw(vn)); ED_head_port(ve).getStruct("p").setDouble("x", ND_lw(aghead(e))); ED_edge_type(ve, 4); /* another assumed symmetry of ht1/ht2 of a label node */ if (GD_rank(g).plus(r - 1).getDouble("ht1") < h2) GD_rank(g).plus(r - 1).setDouble("ht1", h2); if (GD_rank(g).plus(r - 1).getDouble("ht2") < h2) GD_rank(g).plus(r - 1).setDouble("ht2", h2); ND_alg(vn, e); } finally { LEAVING("4cw9yo9ap8ze1r873v6jat4yc","flat_node"); } } //3 1lopavodoru6ee52snd5l6swd // static void abomination(graph_t * g) public static void abomination(Agraph_s g) { ENTERING("1lopavodoru6ee52snd5l6swd","abomination"); try { int r; __ptr__ rptr; assert(GD_minrank(g) == 0); /* 3 = one for new rank, one for sentinel, one for off-by-one */ r = GD_maxrank(g) + 3; rptr = ALLOC(r, GD_rank(g), rank_t.class); GD_rank(g, rptr.plus(1)); for (r = GD_maxrank(g); r >= 0; r--) GD_rank(g).plus(r).getPtr().setStruct(GD_rank(g).plus(r - 1).getPtr().getStruct()); GD_rank(g).plus(r).setInt("n", 0); GD_rank(g).plus(r).setInt("an", 0); GD_rank(g).plus(r).setPtr("v", zmalloc(sizeof_starstar_empty(Agnode_s.class, 2))); GD_rank(g).plus(r).setPtr("av", GD_rank(g).plus(r).getPtr("v")); GD_rank(g).plus(r).setPtr("flat", null); GD_rank(g).plus(r).setDouble("ht1", 1); GD_rank(g).plus(r).setDouble("ht2", 1); GD_rank(g).plus(r).setDouble("pht1", 1); GD_rank(g).plus(r).setDouble("pht2", 1); GD_minrank(g, GD_minrank(g)-1); } finally { LEAVING("1lopavodoru6ee52snd5l6swd","abomination"); } } //3 ctujx6e8k3rzv08h6gswdcaqs // static void checkFlatAdjacent (edge_t* e) public static void checkFlatAdjacent(Agedge_s e) { ENTERING("ctujx6e8k3rzv08h6gswdcaqs","checkFlatAdjacent"); try { Agnode_s tn = agtail(e); Agnode_s hn = aghead(e); int i, lo, hi; Agnode_s n; __ptr__ rank; if (ND_order(tn) < ND_order(hn)) { lo = ND_order(tn); hi = ND_order(hn); } else { lo = ND_order(hn); hi = ND_order(tn); } rank = GD_rank(dot_root(tn)).plus(ND_rank(tn)); for (i = lo + 1; i < hi; i++) { n = (Agnode_s) rank.getArrayOfPtr("v").plus(i).getPtr(); if ((ND_node_type(n) == 1 && ND_label(n)!=null) || ND_node_type(n) == 0) break; } if (i == hi) { /* adjacent edge */ do { ED_adjacent(e, 1); e = ED_to_virt(e); } while (e!=null); } } finally { LEAVING("ctujx6e8k3rzv08h6gswdcaqs","checkFlatAdjacent"); } } //3 bjwwj6ftkm0gv04cf1edqeaw6 // int flat_edges(graph_t * g) public static int flat_edges(Agraph_s g) { ENTERING("bjwwj6ftkm0gv04cf1edqeaw6","flat_edges"); try { int i, j, reset = 0; Agnode_s n; Agedge_s e; int found = 0; for (n = GD_nlist(g); n!=null; n = ND_next(n)) { if (ND_flat_out(n).listNotNull()) { for (j = 0; (e = (Agedge_s) ND_flat_out(n).getFromList(j))!=null; j++) { checkFlatAdjacent (e); } } for (j = 0; j < ND_other(n).size; j++) { e = (Agedge_s) ND_other(n).getFromList(j); if (ND_rank(aghead(e)) == ND_rank(agtail(e))) checkFlatAdjacent (e); } } if ((GD_rank(g).plus(0).getPtr("flat")!=null) || (GD_n_cluster(g) > 0)) { for (i = 0; (n = (Agnode_s) GD_rank(g).plus(0).getArrayOfPtr("v").plus(i).getPtr())!=null; i++) { for (j = 0; (e = (Agedge_s) ND_flat_in(n).getFromList(j))!=null; j++) { if ((ED_label(e)!=null) && N(ED_adjacent(e))) { abomination(g); found = 1; break; } } if (found!=0) break; } } rec_save_vlists(g); for (n = GD_nlist(g); n!=null; n = ND_next(n)) { /* if n is the tail of any flat edge, one will be in flat_out */ if (ND_flat_out(n).listNotNull()) { for (i = 0; (e = (Agedge_s) ND_flat_out(n).getFromList(i))!=null; i++) { if (ED_label(e)!=null) { if (ED_adjacent(e)!=0) { if (GD_flip(g)!=0) ED_dist(e, ED_label(e).getStruct("dimen").getDouble("y")); else ED_dist(e, ED_label(e).getStruct("dimen").getDouble("x")); } else { reset = 1; flat_node(e); } } } /* look for other flat edges with labels */ for (j = 0; j < ND_other(n).size; j++) { Agedge_s le; e = (Agedge_s) ND_other(n).getFromList(j); if (ND_rank(agtail(e)) != ND_rank(aghead(e))) continue; if (EQ(agtail(e), aghead(e))) continue; /* skip loops */ le = e; while (ED_to_virt(le)!=null) le = ED_to_virt(le); ED_adjacent(e, ED_adjacent(le)); if (ED_label(e)!=null) { if (ED_adjacent(e)!=0) { double lw; if (GD_flip(g)!=0) lw = ED_label(e).getStruct("dimen").getDouble("y"); else lw = ED_label(e).getStruct("dimen").getDouble("x"); ED_dist(le, MAX(lw,ED_dist(le))); } else { reset = 1; flat_node(e); } } } } } if (reset!=0) rec_reset_vlists(g); return reset; } finally { LEAVING("bjwwj6ftkm0gv04cf1edqeaw6","flat_edges"); } } } plantuml-1.2017.15/src/gen/lib/dotgen/mincross__c.java000066400000000000000000002622301312650303100224120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static gen.lib.cgraph.attr__c.agget; import static gen.lib.cgraph.edge__c.agfstout; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agnxtout; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.cgraph.graph__c.agnedges; import static gen.lib.cgraph.node__c.agfstnode; import static gen.lib.cgraph.node__c.agnxtnode; import static gen.lib.cgraph.obj__c.agcontains; import static gen.lib.common.memory__c.zmalloc; import static gen.lib.common.utils__c.dequeue; import static gen.lib.common.utils__c.enqueue; import static gen.lib.common.utils__c.free_queue; import static gen.lib.common.utils__c.mapbool; import static gen.lib.common.utils__c.new_queue; import static gen.lib.dotgen.class2__c.class2; import static gen.lib.dotgen.cluster__c.expand_cluster; import static gen.lib.dotgen.cluster__c.install_cluster; import static gen.lib.dotgen.cluster__c.mark_lowclusters; import static gen.lib.dotgen.decomp__c.decompose; import static gen.lib.dotgen.dotinit__c.dot_root; import static gen.lib.dotgen.fastgr__c.delete_flat_edge; import static gen.lib.dotgen.fastgr__c.flat_edge; import static gen.lib.dotgen.fastgr__c.merge_oneway; import static gen.lib.dotgen.fastgr__c.new_virtual_edge; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.atof; import static smetana.core.JUtils.function; import static smetana.core.JUtils.qsort; import static smetana.core.JUtils.size_t_array_of_integer; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtils.sizeof_starstar_empty; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.ALLOC; import static smetana.core.Macro.ALLOC_INT; import static smetana.core.Macro.ED_edge_type; import static smetana.core.Macro.ED_head_port; import static smetana.core.Macro.ED_label; import static smetana.core.Macro.ED_tail_port; import static smetana.core.Macro.ED_to_orig; import static smetana.core.Macro.ED_to_virt; import static smetana.core.Macro.ED_weight; import static smetana.core.Macro.ED_xpenalty; import static smetana.core.Macro.GD_clust; import static smetana.core.Macro.GD_comp; import static smetana.core.Macro.GD_flags; import static smetana.core.Macro.GD_flip; import static smetana.core.Macro.GD_has_flat_edges; import static smetana.core.Macro.GD_maxrank; import static smetana.core.Macro.GD_minrank; import static smetana.core.Macro.GD_n_cluster; import static smetana.core.Macro.GD_n_nodes; import static smetana.core.Macro.GD_nlist; import static smetana.core.Macro.GD_rank; import static smetana.core.Macro.GD_rankleader; import static smetana.core.Macro.INT_MAX; import static smetana.core.Macro.MIN; import static smetana.core.Macro.N; import static smetana.core.Macro.ND_clust; import static smetana.core.Macro.ND_coord; import static smetana.core.Macro.ND_flat_in; import static smetana.core.Macro.ND_flat_out; import static smetana.core.Macro.ND_has_port; import static smetana.core.Macro.ND_in; import static smetana.core.Macro.ND_low; import static smetana.core.Macro.ND_mark; import static smetana.core.Macro.ND_mval; import static smetana.core.Macro.ND_next; import static smetana.core.Macro.ND_node_type; import static smetana.core.Macro.ND_onstack; import static smetana.core.Macro.ND_order; import static smetana.core.Macro.ND_other; import static smetana.core.Macro.ND_out; import static smetana.core.Macro.ND_prev; import static smetana.core.Macro.ND_rank; import static smetana.core.Macro.ND_ranktype; import static smetana.core.Macro.ND_weight_class; import static smetana.core.Macro.NOT; import static smetana.core.Macro.UNSUPPORTED; import static smetana.core.Macro.agtail; import static smetana.core.Macro.elist_append; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.adjmatrix_t; import h.boxf; import h.elist; import h.nodequeue; import h.pointf; import h.rank_t; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Memory; import smetana.core.Z; import smetana.core.__array_of_ptr__; import smetana.core.__ptr__; import smetana.core.__struct__; public class mincross__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7ye0tsa8kll1jntdcqzsgjp0q // static int gd_minrank(Agraph_t *g) public static Object gd_minrank(Object... arg) { UNSUPPORTED("7wnr5wvv8mw2d3mfdyvdz5kz9"); // static int gd_minrank(Agraph_t *g) {return GD_minrank(g);} throw new UnsupportedOperationException(); } //3 c7dhattawtph3qv1eeoafltk0 // static int gd_maxrank(Agraph_t *g) public static Object gd_maxrank(Object... arg) { UNSUPPORTED("b89n5iyqsgra9z559023bf23e"); // static int gd_maxrank(Agraph_t *g) {return GD_maxrank(g);} throw new UnsupportedOperationException(); } //3 8g2can1ih1668s30s6d7wny5b // static rank_t *gd_rank(Agraph_t *g, int r) public static Object gd_rank(Object... arg) { UNSUPPORTED("bxd4rm18v4y2x6fo30vh9pauo"); // static rank_t *gd_rank(Agraph_t *g, int r) {return &GD_rank(g)[r];} throw new UnsupportedOperationException(); } //3 8pjrnrvidhpqcubvkk5lsfp6 // static int nd_order(Agnode_t *v) public static Object nd_order(Object... arg) { UNSUPPORTED("f4zvlmxyp6gei8iiu33hpz4oe"); // static int nd_order(Agnode_t *v) { return ND_order(v); } throw new UnsupportedOperationException(); } //1 eusjqny3hma23wvcznk9arpgr // static int MinQuit //private static int MinQuit; //1 eykidmlm64erbhaultu3js822 // static double Convergence //private static double Convergence; //1 f2ssditidb9f1cgp7r1kslp0e // static graph_t *Root //private static Agraph_s Root; //1 ager0orj38x5rjuhzv1o2cxuc // static int GlobalMinRank, GlobalMaxRank //private static int GlobalMinRank, GlobalMaxRank; //1 dag2n5hcww3ada79u52a8yha6 // static edge_t **TE_list //private static __ptr__ TE_list; //1 agrg82s0nsmuokh0t3h5q6h90 // static int *TI_list // private static __ptr__ TI_list; //1 7x0e0qfe96o5elb6lxt8mfmho // static boolean ReMincross //private static boolean ReMincross; //3 e876vp4hgkzshluz6qk77cjwk // void dot_mincross(graph_t * g, int doBalance) public static void dot_mincross(Agraph_s g, boolean doBalance) { ENTERING("e876vp4hgkzshluz6qk77cjwk","dot_mincross"); try { int c, nc; CString s; init_mincross(g); for (nc = c = 0; c < GD_comp(g).size; c++) { init_mccomp(g, c); nc += mincross_(g, 0, 2, doBalance); } merge2(g); /* run mincross on contents of each cluster */ for (c = 1; c <= GD_n_cluster(g); c++) { nc += mincross_clust(g, (Agraph_s) GD_clust(g).plus(c).getPtr(), doBalance); } if ((GD_n_cluster(g) > 0) && (N(s = agget(g, new CString("remincross"))) || (mapbool(s)))) { mark_lowclusters(g); Z.z().ReMincross = NOT(0); nc = mincross_(g, 2, 2, doBalance); } cleanup2(g, nc); } finally { LEAVING("e876vp4hgkzshluz6qk77cjwk","dot_mincross"); } } //3 756bre1tpxb1tq68p7xhkrxkc // static adjmatrix_t *new_matrix(int i, int j) public static adjmatrix_t new_matrix(int i, int j) { ENTERING("756bre1tpxb1tq68p7xhkrxkc","new_matrix"); try { adjmatrix_t rv = (adjmatrix_t) Memory.malloc(adjmatrix_t.class); rv.setInt("nrows", i); rv.setInt("ncols", j); rv.setPtr("data", zmalloc(size_t_array_of_integer(i*j))); return rv; } finally { LEAVING("756bre1tpxb1tq68p7xhkrxkc","new_matrix"); } } //3 1n1e0k0wtlbugwm3cb4na6av6 // static void free_matrix(adjmatrix_t * p) public static void free_matrix(adjmatrix_t p) { ENTERING("1n1e0k0wtlbugwm3cb4na6av6","free_matrix"); try { if (p!=null) { Memory.free(p.getPtr("data")); Memory.free(p); } } finally { LEAVING("1n1e0k0wtlbugwm3cb4na6av6","free_matrix"); } } //3 49vw7fkn99wbojtfksugvuruh // static void init_mccomp(graph_t * g, int c) public static void init_mccomp(Agraph_s g, int c) { ENTERING("49vw7fkn99wbojtfksugvuruh","init_mccomp"); try { int r; // GD_nlist(g, GD_comp(g).getFromListt(c).getPtr()); GD_nlist(g, GD_comp(g).getFromList(c)); if (c > 0) { for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { GD_rank(g).plus(r).setPtr("v", GD_rank(g).plus(r).getPtr("v").plus(GD_rank(g).plus(r).getInt("n"))); GD_rank(g).plus(r).setInt("n", 0); } } } finally { LEAVING("49vw7fkn99wbojtfksugvuruh","init_mccomp"); } } //3 72v5zs502m1of3vsofyfo15ap // static int betweenclust(edge_t * e) public static Object betweenclust(Object... arg) { UNSUPPORTED("6k6r73j7gctt4ntepjubrlfze"); // static int betweenclust(edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1z9f8ptfggp4qlwv5cdd55i3j"); // while (ED_to_orig(e)) UNSUPPORTED("bdmai1d040qmubf08ds339v9x"); // e = ED_to_orig(e); UNSUPPORTED("eq2o4v9qo3xx42in97ssadek"); // return (ND_clust(agtail(e)) != ND_clust(aghead(e))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 760bwoz4twwy2jr1b32r6zefi // static void do_ordering_node (graph_t * g, node_t* n, int outflag) public static Object do_ordering_node(Object... arg) { UNSUPPORTED("ajn55zvrzf8njqkshll3kaz88"); // static void do_ordering_node (graph_t * g, node_t* n, int outflag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bp5tdulayknsvyv8a2j2tinh"); // int i, ne; UNSUPPORTED("5yrhx4blosxo5xnc1nh1kzhfs"); // node_t *u, *v; UNSUPPORTED("9cbk3ly04nbzqoxmmjwptqq9a"); // edge_t *e, *f, *fe; UNSUPPORTED("5ol5beitdgh7axwpk35pc9trm"); // edge_t **sortlist = TE_list; UNSUPPORTED("aeria2or5qpnnrr9wm15k588l"); // if (ND_clust(n)) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("442hvc4h32o6e3cvzm5y5y3oq"); // if (outflag) { UNSUPPORTED("7xi4jdz18dyv740agfh5uwtxv"); // for (i = ne = 0; (e = ND_out(n).list[i]); i++) UNSUPPORTED("24smn55xhvkklh2do2cfcmy98"); // if (!betweenclust(e)) UNSUPPORTED("ouas2w3lk54dwigzgglm3w7r"); // sortlist[ne++] = e; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("6dgl0skwzmsi69ugcewc5vwaf"); // for (i = ne = 0; (e = ND_in(n).list[i]); i++) UNSUPPORTED("24smn55xhvkklh2do2cfcmy98"); // if (!betweenclust(e)) UNSUPPORTED("ouas2w3lk54dwigzgglm3w7r"); // sortlist[ne++] = e; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("hdnqvw2crdbzt2uenqso4l7k"); // if (ne <= 1) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("4zkjvsomlyhcl06ummf4gz0d2"); // /* write null terminator at end of list. UNSUPPORTED("2zx16rdu8hp86z3z36natgy8t"); // requires +1 in TE_list alloccation */ UNSUPPORTED("6dp57feioscwstrfmhqhrz1jx"); // sortlist[ne] = 0; UNSUPPORTED("4wqnlh6z9lr2xvmjp95nozn84"); // qsort(sortlist, ne, sizeof(sortlist[0]), (qsort_cmpf) edgeidcmpf); UNSUPPORTED("d6aia9q03brt8otnyu5m3tlxj"); // for (ne = 1; (f = sortlist[ne]); ne++) { UNSUPPORTED("1b9ylnvr8zscovbyrxoe9ypax"); // e = sortlist[ne - 1]; UNSUPPORTED("4nbrepm0pmohxxml0csb9j5xc"); // if (outflag) { UNSUPPORTED("2rcn453iomwvou108kjr2rboc"); // u = aghead(e); UNSUPPORTED("96i3kysq5lfoyukhe65vpiah2"); // v = aghead(f); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("96jttvtco2oqt3y3qr5fbhu1j"); // u = agtail(e); UNSUPPORTED("8g5mzwux62x43bjzeslylyi0g"); // v = agtail(f); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("a7mygw39shaa9w4l8fdlgqr0i"); // if (find_flat_edge(u, v)) UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return; UNSUPPORTED("aoa2embk8eaij29q6nbl4e5tk"); // fe = new_virtual_edge(u, v, NULL); UNSUPPORTED("67t5g8eu9tdqbnwj4s4g6ah6u"); // ED_edge_type(fe) = 4; UNSUPPORTED("b32n066t1nkgj646wvo7vuwlq"); // flat_edge(g, fe); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 815nmj2gcomtex4yfclqde12j // static void do_ordering(graph_t * g, int outflag) public static Object do_ordering(Object... arg) { UNSUPPORTED("9v68euuxlii02rb5mhlyd8alp"); // static void do_ordering(graph_t * g, int outflag) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5y5mm5obhrqt745c4fx4o0r56"); // /* Order all nodes in graph */ UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("bicm0b87pp2rusaezmk6qigjq"); // do_ordering_node (g, n, outflag); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 svq3i3c6yw3cbfwaeip5dfuy // static void do_ordering_for_nodes(graph_t * g) public static Object do_ordering_for_nodes(Object... arg) { UNSUPPORTED("7yd9vingwgdcdtrx0p38jti00"); // static void do_ordering_for_nodes(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("887aairlqk73reuayo3hz67v3"); // /* Order nodes which have the "ordered" attribute */ UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("cbbfhy5qk3dailijtedj1czut"); // const char *ordering; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("ekvbu44bbrdwkw71yd21dbns9"); // if ((ordering = late_string(n, N_ordering, NULL))) { UNSUPPORTED("7jueg5punlemj6mfbpgltb5u8"); // if ((*(ordering)==*("out")&&!strcmp(ordering,"out"))) UNSUPPORTED("302oz5j9wva90otn6jq513bme"); // do_ordering_node(g, n, NOT(0)); UNSUPPORTED("1dt1hft3eak5ytycs6dh7yk0"); // else if ((*(ordering)==*("in")&&!strcmp(ordering,"in"))) UNSUPPORTED("dnig45so0x904azp9fhxymqjn"); // do_ordering_node(g, n, 0); UNSUPPORTED("2rxgmu8cktngvqtsex2rlbjed"); // else if (ordering[0]) UNSUPPORTED("axk3fxl1bh09n475kmcx42kdu"); // agerr(AGERR, "ordering '%s' not recognized for node '%s'.\n", ordering, agnameof(n)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 hzoz2czb672i0nbjvjhbc3na // static void ordered_edges(graph_t * g) public static void ordered_edges(Agraph_s g) { ENTERING("hzoz2czb672i0nbjvjhbc3na","ordered_edges"); try { CString ordering; if (N(Z.z().G_ordering) && N(Z.z().N_ordering)) return; UNSUPPORTED("98iqppixxkdndoz210i5ejppy"); // if ((ordering = late_string(g, G_ordering, NULL))) { UNSUPPORTED("lhhw62wj3on36enoy6ug6u1p"); // if ((*(ordering)==*("out")&&!strcmp(ordering,"out"))) UNSUPPORTED("ctbadiyd3jjtlt2f5t9p94au7"); // do_ordering(g, NOT(0)); UNSUPPORTED("259y9uhqwc8w6jhrpm1eaa7hf"); // else if ((*(ordering)==*("in")&&!strcmp(ordering,"in"))) UNSUPPORTED("312ij4z5d42rye9s30l9io097"); // do_ordering(g, 0); UNSUPPORTED("25yw5chxmy54pmo88tre1w2ir"); // else if (ordering[0]) UNSUPPORTED("5ugg9zy8378pijqru97mxmen5"); // agerr(AGERR, "ordering '%s' not recognized.\n", ordering); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("50itbchatjp61haxvg3xnhvoo"); // graph_t *subg; UNSUPPORTED("evzjoqkm2xukapjvpccu2f23e"); // for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) { UNSUPPORTED("1016hqxaexp4j33vmkzvdpq80"); // /* clusters are processed by separate calls to ordered_edges */ UNSUPPORTED("7ah0zlu96u6g6cquxebenj4z3"); // if (!is_cluster(subg)) UNSUPPORTED("7sqzaehh40dvpm11hlxhef6cw"); // ordered_edges(subg); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("h2b3ao18r091ie7yk9v20pqq"); // if (N_ordering) do_ordering_for_nodes (g); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("hzoz2czb672i0nbjvjhbc3na","ordered_edges"); } } //3 crwc5qe7fmrpgcqh1a80toyvo // static int mincross_clust(graph_t * par, graph_t * g, int doBalance) public static int mincross_clust(Agraph_s par, Agraph_s g, boolean doBalance) { ENTERING("crwc5qe7fmrpgcqh1a80toyvo","mincross_clust"); try { int c, nc; expand_cluster(g); ordered_edges(g); flat_breakcycles(g); flat_reorder(g); nc = mincross_(g, 2, 2, doBalance); for (c = 1; c <= GD_n_cluster(g); c++) nc += mincross_clust(g, (Agraph_s) GD_clust(g).plus(c).getPtr(), doBalance); save_vlist(g); return nc; } finally { LEAVING("crwc5qe7fmrpgcqh1a80toyvo","mincross_clust"); } } //3 657v773m21j5w3g3v94o7464t // static int left2right(graph_t * g, node_t * v, node_t * w) public static boolean left2right(Agraph_s g, Agnode_s v, Agnode_s w) { ENTERING("657v773m21j5w3g3v94o7464t","left2right"); try { adjmatrix_t M; boolean rv=false; /* CLUSTER indicates orig nodes of clusters, and vnodes of skeletons */ if (Z.z().ReMincross == false) { if (NEQ(ND_clust(v), ND_clust(w)) && (ND_clust(v)!=null) && (ND_clust(w)!=null)) { /* the following allows cluster skeletons to be swapped */ if ((ND_ranktype(v) == 7) && (ND_node_type(v) == 1)) return false; if ((ND_ranktype(w) == 7) && (ND_node_type(w) == 1)) return false; return NOT(false); /*return ((ND_ranktype(v) != CLUSTER) && (ND_ranktype(w) != CLUSTER)); */ } } else { UNSUPPORTED("8lltx4lxwrqossx8qw1khzwf9"); // if ((ND_clust(v)) != (ND_clust(w))) UNSUPPORTED("9qhn9m3123s8n6wwxjfo8awlm"); // return NOT(0); } M = (adjmatrix_t) GD_rank(g).plus(ND_rank(v)).getPtr().getPtr("flat"); if (M == null) rv = false; else { if (GD_flip(g)!=0) { Agnode_s t = v; v = w; w = t; } rv = (M.getArrayOfInteger("data").plus(((ND_low(v))*M.getInt("ncols"))+(ND_low(w))).getInt())!=0; } return rv; } finally { LEAVING("657v773m21j5w3g3v94o7464t","left2right"); } } //3 daknncpjy7g5peiicolbmh55i // static int in_cross(node_t * v, node_t * w) public static int in_cross(Agnode_s v, Agnode_s w) { ENTERING("daknncpjy7g5peiicolbmh55i","in_cross"); try { __array_of_ptr__ e1; __array_of_ptr__ e2; int inv, cross = 0, t; for (e2 = ND_in(w).getTheArray(); e2.getPtr()!=null; e2=e2.plus(1)) { int cnt = ED_xpenalty(e2.getPtr()); inv = ND_order((agtail(e2.getPtr()))); for (e1 = ND_in(v).getTheArray(); e1.getPtr()!=null; e1=e1.plus(1)) { t = ND_order(agtail(e1.getPtr())) - inv; if ((t > 0) || ((t == 0) && ( ED_tail_port(e1.getPtr()).getStruct("p").getDouble("x") > ED_tail_port(e2.getPtr()).getStruct("p").getDouble("x")))) cross += ED_xpenalty(e1.getPtr()) * cnt; } } return cross; } finally { LEAVING("daknncpjy7g5peiicolbmh55i","in_cross"); } } //3 b7mf74np8ewrgzwd5u0o8fqod // static int out_cross(node_t * v, node_t * w) public static int out_cross(Agnode_s v, Agnode_s w) { ENTERING("b7mf74np8ewrgzwd5u0o8fqod","out_cross"); try { __array_of_ptr__ e1, e2; int inv, cross = 0, t; for (e2 = ND_out(w).getTheArray(); e2.getPtr()!=null; e2=e2.plus(1)) { int cnt = ED_xpenalty((Agedge_s)e2.getPtr()); inv = ND_order(aghead(e2.getPtr())); for (e1 = ND_out(v).getTheArray(); e1.getPtr()!=null; e1=e1.plus(1)) { t = ND_order(aghead(e1.getPtr())) - inv; if ((t > 0) || ((t == 0) && ((ED_head_port(e1.getPtr())).getStruct("p").getDouble("x") > (ED_head_port(e2.getPtr())).getStruct("p").getDouble("x")))) cross += ((ED_xpenalty(e1.getPtr())) * cnt); } } return cross; } finally { LEAVING("b7mf74np8ewrgzwd5u0o8fqod","out_cross"); } } //3 ba4tbr57wips1dzpgxzx3b6ja // static void exchange(node_t * v, node_t * w) public static void exchange(Agnode_s v, Agnode_s w) { ENTERING("ba4tbr57wips1dzpgxzx3b6ja","exchange"); try { int vi, wi, r; r = ND_rank(v); vi = ND_order(v); wi = ND_order(w); ND_order(v, wi); GD_rank(Z.z().Root).plus(r).getArrayOfPtr("v").plus(wi).setPtr(v); ND_order(w, vi); GD_rank(Z.z().Root).plus(r).getArrayOfPtr("v").plus(vi).setPtr(w); } finally { LEAVING("ba4tbr57wips1dzpgxzx3b6ja","exchange"); } } //3 dzkv88lq5zv0g3yo7bf90qgr7 // static void balanceNodes(graph_t * g, int r, node_t * v, node_t * w) public static Object balanceNodes(Object... arg) { UNSUPPORTED("504qsj6detmzllj50pno6sdx4"); // static void balanceNodes(graph_t * g, int r, node_t * v, node_t * w) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dor7xumwnqvymg7xdesa6pxqn"); // node_t *s; /* separator node */ UNSUPPORTED("c6s55weiu8hc4voeunxf2utru"); // int sepIndex; UNSUPPORTED("6gqdkaiir2naiawry8cnlpf4a"); // int nullType; /* type of null nodes */ UNSUPPORTED("2dqxr1ujg381s9ugf0367iici"); // int cntDummy = 0, cntOri = 0; UNSUPPORTED("7yj94w2zpwdubyzymyljw490a"); // int k = 0, m = 0, k1 = 0, m1 = 0, i = 0; UNSUPPORTED("6mq7c2z232o8kvpp371lfmewh"); // /* we only consider v and w of different types */ UNSUPPORTED("53kjkk6c0h35zpbikj9y2q6b4"); // if (ND_node_type(v) == ND_node_type(w)) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("5ylcsv8rwps97qz7sdftpwrka"); // /* count the number of dummy and original nodes */ UNSUPPORTED("5025o4uc5dkbxf3smi3kmfoit"); // for (i = 0; i < GD_rank(g)[r].n; i++) { UNSUPPORTED("d87qjwxc2qjvh6hb9fmi9y9vq"); // if (ND_node_type(GD_rank(g)[r].v[i]) == 0) UNSUPPORTED("dcny4syjny1sh20jyjjl7jj62"); // cntOri++; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("bbpsgrsgquajs3xxqzeqvgv6n"); // cntDummy++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2qx27p3loyln3i09ycwf5p1dh"); // if (cntOri < cntDummy) { UNSUPPORTED("ex9drrxqg8zalagzrnvrulrlb"); // if (ND_node_type(v) == 0) UNSUPPORTED("jtm789r1sqidxc39d09n9det"); // s = v; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("c31t0vnbzvj9zml7p91syjzep"); // s = w; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("ex9drrxqg8zalagzrnvrulrlb"); // if (ND_node_type(v) == 0) UNSUPPORTED("c31t0vnbzvj9zml7p91syjzep"); // s = w; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("jtm789r1sqidxc39d09n9det"); // s = v; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ejbeaepbxwawm7mvtusyi2x57"); // /* get the separator node index */ UNSUPPORTED("5025o4uc5dkbxf3smi3kmfoit"); // for (i = 0; i < GD_rank(g)[r].n; i++) { UNSUPPORTED("afetrkwabtn6v07evr5japsk5"); // if (GD_rank(g)[r].v[i] == s) UNSUPPORTED("bvwqg08b9hn6rfdx11sjq0hgc"); // sepIndex = i; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ecis6irl9vire6ejfrshttjk4"); // nullType = (ND_node_type(s) == 0) ? 1 : 0; UNSUPPORTED("1i78b3w9omzkba0pmafwfunbj"); // /* count the number of null nodes to the left and UNSUPPORTED("1f2jn45p7wv1ud964k43lgdss"); // * right of the separator node UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("5l8w7t0ta6p6hnfp72l7lbqey"); // for (i = sepIndex - 1; i >= 0; i--) { UNSUPPORTED("49j09cv8f8ien7kqoguzywjmw"); // if (ND_node_type(GD_rank(g)[r].v[i]) == nullType) UNSUPPORTED("borg3y7rgdooetc6ckrsrg9fc"); // k++; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cuj70hyout6yv30drqkjiwllo"); // for (i = sepIndex + 1; i < GD_rank(g)[r].n; i++) { UNSUPPORTED("49j09cv8f8ien7kqoguzywjmw"); // if (ND_node_type(GD_rank(g)[r].v[i]) == nullType) UNSUPPORTED("d35zlcj7podjjns9eg2ttocr7"); // m++; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9r0b42aqwdlx2cg7aqsxgle1o"); // /* now exchange v,w and calculate the same counts */ UNSUPPORTED("cvktng9nwm6futhlv28bqbqy"); // exchange(v, w); UNSUPPORTED("ejbeaepbxwawm7mvtusyi2x57"); // /* get the separator node index */ UNSUPPORTED("5025o4uc5dkbxf3smi3kmfoit"); // for (i = 0; i < GD_rank(g)[r].n; i++) { UNSUPPORTED("afetrkwabtn6v07evr5japsk5"); // if (GD_rank(g)[r].v[i] == s) UNSUPPORTED("bvwqg08b9hn6rfdx11sjq0hgc"); // sepIndex = i; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1i78b3w9omzkba0pmafwfunbj"); // /* count the number of null nodes to the left and UNSUPPORTED("1f2jn45p7wv1ud964k43lgdss"); // * right of the separator node UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("5l8w7t0ta6p6hnfp72l7lbqey"); // for (i = sepIndex - 1; i >= 0; i--) { UNSUPPORTED("49j09cv8f8ien7kqoguzywjmw"); // if (ND_node_type(GD_rank(g)[r].v[i]) == nullType) UNSUPPORTED("eer25fyjj3njh33v709xj07lk"); // k1++; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cuj70hyout6yv30drqkjiwllo"); // for (i = sepIndex + 1; i < GD_rank(g)[r].n; i++) { UNSUPPORTED("49j09cv8f8ien7kqoguzywjmw"); // if (ND_node_type(GD_rank(g)[r].v[i]) == nullType) UNSUPPORTED("80ptwhmp1gyks2xfkcjub24o9"); // m1++; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6yjcl5tugkib89c3p3beoi0cs"); // if (abs(k1 - m1) > abs(k - m)) { UNSUPPORTED("4hhzcihijbcjb2mo6eop9g855"); // exchange(v, w); //revert to the original ordering UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 72rj5xs4qh00oh2yi1h5qaadu // static int balance(graph_t * g) public static Object balance(Object... arg) { UNSUPPORTED("4223t6rekw3qd8eksvz9kjcqh"); // static int balance(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("970giwpms1ljmt0px5djlqs0z"); // int i, c0, c1, rv; UNSUPPORTED("8xqnhjfdqnlwlyld1ep6hpnmb"); // node_t *v, *w; UNSUPPORTED("p6jnh7nvcpnl3zbz636pskbs"); // int r; UNSUPPORTED("yy0fwjrmxw3jbi85mvwrka7f"); // rv = 0; UNSUPPORTED("9ey19t6tw2srzaedeng4sq96z"); // for (r = GD_maxrank(g); r >= GD_minrank(g); r--) { UNSUPPORTED("2nlemgjbnd1ygry42bcbuwo9y"); // GD_rank(g)[r].candidate = 0; UNSUPPORTED("91gzxbmcoy5xbvf8nlhmlj4eh"); // for (i = 0; i < GD_rank(g)[r].n - 1; i++) { UNSUPPORTED("5ekdr3i8niy7x2ohi7ftgmjke"); // v = GD_rank(g)[r].v[i]; UNSUPPORTED("efwyjm6j3e7byt6z83lrhgd1r"); // w = GD_rank(g)[r].v[i + 1]; UNSUPPORTED("8ey6umhtefcrb61ncgis82hw6"); // assert(ND_order(v) < ND_order(w)); UNSUPPORTED("ddkyq74d5rjfcofczt4hmkxsj"); // if (left2right(g, v, w)) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("cdpfb5fmlhe0831jf96pjp9s0"); // c0 = c1 = 0; UNSUPPORTED("3l676z6ajeugxvie4r957jap3"); // if (r > 0) { UNSUPPORTED("ennnd5cl9xhh55j2bni58iuxv"); // c0 += in_cross(v, w); UNSUPPORTED("bk4dl2r7nw7j8xvkpg7g7x0z9"); // c1 += in_cross(w, v); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("f0ordylgf44hx2l90eof067yo"); // if (GD_rank(g)[r + 1].n > 0) { UNSUPPORTED("d945airzpo5xbu0fz68ylmgql"); // c0 += out_cross(v, w); UNSUPPORTED("e6ez0uwca50uwo7i7i4vak4f2"); // c1 += out_cross(w, v); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("884yfwkgyw57w5ivpfrggmq15"); // if (c1 <= c0) { UNSUPPORTED("c2sevxb1gtyc2olq8akmvs40u"); // balanceNodes(g, r, v, w); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxwzx4m9ejausu58u7abr6fm0 // static int transpose_step(graph_t * g, int r, int reverse) public static int transpose_step(Agraph_s g, int r, boolean reverse) { ENTERING("bxwzx4m9ejausu58u7abr6fm0","transpose_step"); try { int i, c0, c1, rv; Agnode_s v, w; rv = 0; GD_rank(g).plus(r).getPtr().setBoolean("candidate", false); for (i = 0; i < GD_rank(g).plus(r).getInt("n") - 1; i++) { v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr(); w = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i + 1).getPtr(); //assert(ND_order(v) < ND_order(w)); if (left2right(g, v, w)) continue; c0 = c1 = 0; if (r > 0) { c0 += in_cross(v, w); c1 += in_cross(w, v); } if (GD_rank(g).plus(r + 1).getInt("n") > 0) { c0 += out_cross(v, w); c1 += out_cross(w, v); } if ((c1 < c0) || ((c0 > 0) && reverse && (c1 == c0))) { exchange(v, w); rv += (c0 - c1); GD_rank(Z.z().Root).plus(r).getPtr().setBoolean("valid", false); GD_rank(g).plus(r).getPtr().setBoolean("candidate", NOT(false)); if (r > GD_minrank(g)) { GD_rank(Z.z().Root).plus(r - 1).getPtr().setBoolean("valid", false); GD_rank(g).plus(r - 1).getPtr().setBoolean("candidate", NOT(false)); } if (r < GD_maxrank(g)) { GD_rank(Z.z().Root).plus(r + 1).getPtr().setBoolean("valid", false); GD_rank(g).plus(r + 1).getPtr().setBoolean("candidate", NOT(false)); } } } return rv; } finally { LEAVING("bxwzx4m9ejausu58u7abr6fm0","transpose_step"); } } //3 2i22bxgg5y7v5c5d40k5zppky // static void transpose(graph_t * g, int reverse) public static void transpose(Agraph_s g, boolean reverse) { ENTERING("2i22bxgg5y7v5c5d40k5zppky","transpose"); try { int r, delta; for (r = GD_minrank(g); r <= GD_maxrank(g); r++) GD_rank(g).plus(r).getPtr().setBoolean("candidate", NOT(false)); do { delta = 0; for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { if (GD_rank(g).plus(r).getPtr().getBoolean("candidate")) { delta += transpose_step(g, r, reverse); } } /*} while (delta > ncross(g)*(1.0 - Convergence)); */ } while (delta >= 1); } finally { LEAVING("2i22bxgg5y7v5c5d40k5zppky","transpose"); } } //3 7lrk2rxqnwwdau8cx85oqkpmv // static int mincross(graph_t * g, int startpass, int endpass, int doBalance) public static int mincross_(Agraph_s g, int startpass, int endpass, boolean doBalance) { ENTERING("7lrk2rxqnwwdau8cx85oqkpmv","mincross"); try { int maxthispass=0, iter, trying, pass; int cur_cross, best_cross; if (startpass > 1) { cur_cross = best_cross = ncross(g); save_best(g); } else cur_cross = best_cross = INT_MAX; for (pass = startpass; pass <= endpass; pass++) { if (pass <= 1) { maxthispass = MIN(4, Z.z().MaxIter); if (EQ(g, dot_root(g))) build_ranks(g, pass); if (pass == 0) flat_breakcycles(g); flat_reorder(g); if ((cur_cross = ncross(g)) <= best_cross) { save_best(g); best_cross = cur_cross; } trying = 0; } else { maxthispass = Z.z().MaxIter; if (cur_cross > best_cross) restore_best(g); cur_cross = best_cross; } trying = 0; for (iter = 0; iter < maxthispass; iter++) { /*if (Verbose) fprintf(stderr, "mincross: pass %d iter %d trying %d cur_cross %d best_cross %d\n", pass, iter, trying, cur_cross, best_cross);*/ if (trying++ >= Z.z().MinQuit) break; if (cur_cross == 0) break; mincross_step(g, iter); if ((cur_cross = ncross(g)) <= best_cross) { save_best(g); if (cur_cross < Z.z().Convergence * best_cross) trying = 0; best_cross = cur_cross; } } if (cur_cross == 0) break; } if (cur_cross > best_cross) restore_best(g); if (best_cross > 0) { transpose(g, false); best_cross = ncross(g); } if (doBalance) { for (iter = 0; iter < maxthispass; iter++) balance(g); } return best_cross; } finally { LEAVING("7lrk2rxqnwwdau8cx85oqkpmv","mincross"); } } //3 520049zkz9mafaeklgvm6s8e5 // static void restore_best(graph_t * g) public static void restore_best(Agraph_s g) { ENTERING("520049zkz9mafaeklgvm6s8e5","restore_best"); try { Agnode_s n; int r; for (n = GD_nlist(g); n!=null; n = ND_next(n)) ND_order(n, (int)ND_coord(n).getDouble("x")); for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { GD_rank(Z.z().Root).plus(r).setBoolean("valid", false); qsort(GD_rank(g).plus(r).getPtr("v"), GD_rank(g).plus(r).getInt("n"), sizeof(GD_rank(g).plus(r).getPtr("v").plus(0)), function(mincross__c.class, "nodeposcmpf")); } } finally { LEAVING("520049zkz9mafaeklgvm6s8e5","restore_best"); } } //3 8uyqc48j0oul206l3np85wj9p // static void save_best(graph_t * g) public static void save_best(Agraph_s g) { ENTERING("8uyqc48j0oul206l3np85wj9p","save_best"); try { Agnode_s n; for (n = GD_nlist(g); n!=null; n = ND_next(n)) (ND_coord(n)).x = ND_order(n); } finally { LEAVING("8uyqc48j0oul206l3np85wj9p","save_best"); } } //3 6d08fwi4dsk6ikk5d0gy6rq2h // static void merge_components(graph_t * g) public static void merge_components(Agraph_s g) { ENTERING("6d08fwi4dsk6ikk5d0gy6rq2h","merge_components"); try { int c; Agnode_s u, v; if (GD_comp(g).size <= 1) return; u = null; for (c = 0; c < GD_comp(g).size; c++) { v = (Agnode_s) GD_comp(g).getFromList(c); if (u!=null) ND_next(u, v); ND_prev(v, u); while (ND_next(v)!=null) { v = ND_next(v); } u = v; } GD_comp(g).size = 1; GD_nlist(g, GD_comp(g).getFromList(0)); GD_minrank(g, Z.z().GlobalMinRank); GD_maxrank(g, Z.z().GlobalMaxRank); } finally { LEAVING("6d08fwi4dsk6ikk5d0gy6rq2h","merge_components"); } } //3 91vebcdl3q3y0uyxef0iw71n9 // static void merge2(graph_t * g) public static void merge2(Agraph_s g) { ENTERING("91vebcdl3q3y0uyxef0iw71n9","merge2"); try { int i, r; Agnode_s v; /* merge the components and rank limits */ merge_components(g); /* install complete ranks */ for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { GD_rank(g).plus(r).setInt("n", GD_rank(g).plus(r).getInt("an")); GD_rank(g).plus(r).setPtr("v", GD_rank(g).plus(r).getPtr("av")); for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) { v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr(); if (v == null) { /*if (Verbose) fprintf(stderr, "merge2: graph %s, rank %d has only %d < %d nodes\n", agnameof(g), r, i, GD_rank(g)[r].n);*/ GD_rank(g).plus(r).setInt("n", i); break; } ND_order(v, i); } } } finally { LEAVING("91vebcdl3q3y0uyxef0iw71n9","merge2"); } } //3 3cwiyyk1d1jkoo9iqwb5bge4x // static void cleanup2(graph_t * g, int nc) public static void cleanup2(Agraph_s g, int nc) { ENTERING("3cwiyyk1d1jkoo9iqwb5bge4x","cleanup2"); try { int i, j, r, c; Agnode_s v; Agedge_s e; if (Z.z().TI_list!=null) { Memory.free(Z.z().TI_list); Z.z().TI_list = null; } if (Z.z().TE_list!=null) { Memory.free(Z.z().TE_list); Z.z().TE_list = null; } /* fix vlists of clusters */ for (c = 1; c <= GD_n_cluster(g); c++) rec_reset_vlists((Agraph_s) GD_clust(g).plus(c).getPtr()); /* remove node temporary edges for ordering nodes */ for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) { v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr(); ND_order(v, i); if (ND_flat_out(v).listNotNull()) { for (j = 0; (e = (Agedge_s) ND_flat_out(v).getFromList(j))!=null; j++) if (ED_edge_type(e) == 4) { delete_flat_edge(e); Memory.free(e.getPtr("base.data")); Memory.free(e); j--; } } } free_matrix((adjmatrix_t) GD_rank(g).plus(r).getPtr("flat")); } /*if (Verbose) fprintf(stderr, "mincross %s: %d crossings, %.2f secs.\n", agnameof(g), nc, elapsed_sec());*/ } finally { LEAVING("3cwiyyk1d1jkoo9iqwb5bge4x","cleanup2"); } } //3 arax68kzcf86dr2xu0gp962gq // static node_t *neighbor(node_t * v, int dir) public static Agnode_s neighbor(Agnode_s v, int dir) { ENTERING("arax68kzcf86dr2xu0gp962gq","neighbor"); try { Agnode_s rv; rv = null; assert(v!=null); if (dir < 0) { if (ND_order(v) > 0) rv = (Agnode_s) GD_rank(Z.z().Root).plus(ND_rank(v)).getArrayOfPtr("v").plus(ND_order(v) - 1).getPtr(); } else rv = (Agnode_s) GD_rank(Z.z().Root).plus(ND_rank(v)).getArrayOfPtr("v").plus(ND_order(v) + 1).getPtr(); assert((rv == null) || (ND_order(rv)-ND_order(v))*dir > 0); return rv; } finally { LEAVING("arax68kzcf86dr2xu0gp962gq","neighbor"); } } //3 1waqm8z71hi389dt1wqh0bmhr // static int is_a_normal_node_of(graph_t * g, node_t * v) public static boolean is_a_normal_node_of(Agraph_s g, Agnode_s v) { ENTERING("1waqm8z71hi389dt1wqh0bmhr","is_a_normal_node_of"); try { return ((ND_node_type(v) == 0) && agcontains(g, v)); } finally { LEAVING("1waqm8z71hi389dt1wqh0bmhr","is_a_normal_node_of"); } } //3 9f8atyi1unmleplge3rijdt4s // static int is_a_vnode_of_an_edge_of(graph_t * g, node_t * v) public static boolean is_a_vnode_of_an_edge_of(Agraph_s g, Agnode_s v) { ENTERING("9f8atyi1unmleplge3rijdt4s","is_a_vnode_of_an_edge_of"); try { if ((ND_node_type(v) == 1) && (ND_in(v).size == 1) && (ND_out(v).size == 1)) { Agedge_s e = (Agedge_s) ND_out(v).getFromList(0); while (ED_edge_type(e) != 0) e = ED_to_orig(e); if (agcontains(g, e)) return NOT(false); } return false; } finally { LEAVING("9f8atyi1unmleplge3rijdt4s","is_a_vnode_of_an_edge_of"); } } //3 eo7ulc8vwmoaig0j479yapve2 // static int inside_cluster(graph_t * g, node_t * v) public static boolean inside_cluster(Agraph_s g, Agnode_s v) { ENTERING("eo7ulc8vwmoaig0j479yapve2","inside_cluster"); try { return (is_a_normal_node_of(g, v) | is_a_vnode_of_an_edge_of(g, v)); } finally { LEAVING("eo7ulc8vwmoaig0j479yapve2","inside_cluster"); } } //3 8xkmkt4r6gfqj8gk0mokszoz0 // static node_t *furthestnode(graph_t * g, node_t * v, int dir) public static Agnode_s furthestnode(Agraph_s g, Agnode_s v, int dir) { ENTERING("8xkmkt4r6gfqj8gk0mokszoz0","furthestnode"); try { Agnode_s u, rv; rv = u = v; while ((u = neighbor(u, dir))!=null) { if (is_a_normal_node_of(g, u)) rv = u; else if (is_a_vnode_of_an_edge_of(g, u)) rv = u; } return rv; } finally { LEAVING("8xkmkt4r6gfqj8gk0mokszoz0","furthestnode"); } } //3 bwmu2hkwud40601oq5vgo2f1h // void save_vlist(graph_t * g) public static void save_vlist(Agraph_s g) { ENTERING("bwmu2hkwud40601oq5vgo2f1h","save_vlist"); try { int r; if (GD_rankleader(g)!=null) for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { GD_rankleader(g).plus(r).setPtr(GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr()); } } finally { LEAVING("bwmu2hkwud40601oq5vgo2f1h","save_vlist"); } } //3 hwdxg97sefkuyd25x2q4pgzg // void rec_save_vlists(graph_t * g) public static void rec_save_vlists(Agraph_s g) { ENTERING("hwdxg97sefkuyd25x2q4pgzg","rec_save_vlists"); try { int c; save_vlist(g); for (c = 1; c <= GD_n_cluster(g); c++) rec_save_vlists((Agraph_s) GD_clust(g).plus(c).getPtr()); } finally { LEAVING("hwdxg97sefkuyd25x2q4pgzg","rec_save_vlists"); } } //3 f3b4wat4uxn5oil720i5mwq4v // void rec_reset_vlists(graph_t * g) public static void rec_reset_vlists(Agraph_s g) { ENTERING("f3b4wat4uxn5oil720i5mwq4v","rec_reset_vlists"); try { int r, c; Agnode_s u, v, w; /* fix vlists of sub-clusters */ for (c = 1; c <= GD_n_cluster(g); c++) rec_reset_vlists((Agraph_s) GD_clust(g).plus(c).getPtr()); if (GD_rankleader(g)!=null) for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { v = (Agnode_s) GD_rankleader(g).plus(r).getPtr(); u = furthestnode(g, v, -1); w = furthestnode(g, v, 1); GD_rankleader(g).plus(r).setPtr(u); GD_rank(g).plus(r).setPtr("v", GD_rank(dot_root(g)).plus(r).getPtr("v").plus(ND_order(u))); GD_rank(g).plus(r).setInt("n", ND_order(w) - ND_order(u) + 1); } } finally { LEAVING("f3b4wat4uxn5oil720i5mwq4v","rec_reset_vlists"); } } //3 pv0rbbdopo4hmkbl5916qys1 // static Agraph_t* realFillRanks (Agraph_t* g, int rnks[], int rnks_sz, Agraph_t* sg) public static Agraph_s realFillRanks(Agraph_s g, __ptr__ rnks, int rnks_sz, Agraph_s sg) { ENTERING("pv0rbbdopo4hmkbl5916qys1","realFillRanks"); try { UNSUPPORTED("2o2sf6xi2aumo5k0vglp4ik2y"); // static Agraph_t* UNSUPPORTED("3pmsfb0uhqmy5u141c932dtn1"); // realFillRanks (Agraph_t* g, int rnks[], int rnks_sz, Agraph_t* sg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("apiu3v3f9zs9yrq8e25nd2rti"); // int i, c; UNSUPPORTED("6yramhpyls8c6kexupyqip8oq"); // Agedge_t* e; UNSUPPORTED("ci2zh69w6nhi0q816i1ixuy9k"); // Agnode_t* n; UNSUPPORTED("7z5fb6iyowsosn1hiz7opeoc6"); // for (c = 1; c <= GD_n_cluster(g); c++) UNSUPPORTED("wqxqmv4he79njsw6r7sludv"); // sg = realFillRanks (GD_clust(g)[c], rnks, rnks_sz, sg); UNSUPPORTED("8htor72y55gsejjdeh0e8gdrs"); // if (dot_root(g) == g) UNSUPPORTED("bjae04ek2s3o50399zti5a1jh"); // return sg; UNSUPPORTED("bqfhaopbxlwv8h4zfae1lhx6s"); // memset (rnks, 0, sizeof(int)*rnks_sz); UNSUPPORTED("7wq24g054kmx3aw25vk5ksj4"); // for (n = agfstnode(g); n; n = agnxtnode(g,n)) { UNSUPPORTED("do7v5atqor4gnpwgo18ibgjha"); // rnks[ND_rank(n)] = 1; UNSUPPORTED("9fo44dng5uojukw2kj0z8vvdu"); // for (e = agfstout(g,n); e; e = agnxtout(g,e)) { UNSUPPORTED("emlgvc6yzuboae72y6vxpn8z7"); // for (i = ND_rank(n)+1; i <= ND_rank(aghead(e)); i++) UNSUPPORTED("d3fd9x50ix980jjw3old2jrcr"); // rnks[i] = 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7gfo0rr0un3w2026kt6ipknty"); // for (i = GD_minrank(g); i <= GD_maxrank(g); i++) { UNSUPPORTED("6mjvdb94lywg8d7ui6873f18p"); // if (rnks[i] == 0) { UNSUPPORTED("8g0zxrf8w2zly4wln02j3lbnb"); // if (!sg) { UNSUPPORTED("eqx93butvb7swnxbz9j29winp"); // sg = agsubg (dot_root(g), "_new_rank", 1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("9h7suegjozc071a939rh9apw1"); // n = agnode (sg, NULL, 1); UNSUPPORTED("8kclviftszfxkowsmlqq31u8"); // agbindrec(n, "Agnodeinfo_t", sizeof(Agnodeinfo_t), NOT(0)); UNSUPPORTED("8wiry1vcdwy6bzdp98nmxss7c"); // ND_rank(n) = i; UNSUPPORTED("dy16sxtk3jj6127wavfcdx4yw"); // ND_lw(n) = ND_rw(n) = 0.5; UNSUPPORTED("6jr3li9af4sp0uxnpnoe8dqh8"); // ND_ht(n) = 1; UNSUPPORTED("c47fetnb62mx46qzuk9ag3qmu"); // ND_UF_size(n) = 1; UNSUPPORTED("899cyghezv8oxs0iomu58zncj"); // alloc_elist(4, ND_in(n)); UNSUPPORTED("btfqtg58rqwdh7o4cc0gbaaai"); // alloc_elist(4, ND_out(n)); UNSUPPORTED("9zap4z819hsiogrgmekh15f00"); // agsubnode (g, n, 1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1jw141gg4omv8r72xcbl5ln0o"); // return sg; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("pv0rbbdopo4hmkbl5916qys1","realFillRanks"); } } //3 1qy9bupreg1pax62owznr98k // static void fillRanks (Agraph_t* g) public static void fillRanks(Agraph_s g) { ENTERING("1qy9bupreg1pax62owznr98k","fillRanks"); try { Agraph_s sg; int rnks_sz = GD_maxrank(g) + 2; __ptr__ rnks = zmalloc(size_t_array_of_integer(rnks_sz)); sg = realFillRanks (g, rnks, rnks_sz, null); Memory.free (rnks); } finally { LEAVING("1qy9bupreg1pax62owznr98k","fillRanks"); } } //3 7fy4chyk12o7bgp1rv3h27yl3 // static void init_mincross(graph_t * g) public static void init_mincross(Agraph_s g) { ENTERING("7fy4chyk12o7bgp1rv3h27yl3","init_mincross"); try { int size; //if (Verbose) //start_timer(); Z.z().ReMincross = false; Z.z().Root = g; /* alloc +1 for the null terminator usage in do_ordering() */ /* also, the +1 avoids attempts to alloc 0 sizes, something that efence complains about */ size = agnedges(dot_root(g)) + 1; Z.z().TE_list = zmalloc(sizeof_starstar_empty(Agedge_s.class, size)); Z.z().TI_list = zmalloc(size_t_array_of_integer(size)); mincross_options(g); if ((GD_flags(g) & (1 << 4))!=0) fillRanks (g); class2(g); decompose(g, 1); allocate_ranks(g); ordered_edges(g); Z.z().GlobalMinRank = GD_minrank(g); Z.z().GlobalMaxRank = GD_maxrank(g); } finally { LEAVING("7fy4chyk12o7bgp1rv3h27yl3","init_mincross"); } } //3 6fprrp93vmz0jn3l4ro0iropp // void flat_rev(Agraph_t * g, Agedge_t * e) public static void flat_rev(Agraph_s g, Agedge_s e) { ENTERING("6fprrp93vmz0jn3l4ro0iropp","flat_rev"); try { int j; Agedge_s rev; if (ND_flat_out(aghead(e)).listNotNull()==false) // if (N(ND_flat_out(aghead(e)).getArrayOfPtr("list"))) rev = null; else for (j = 0; (rev = (Agedge_s) ND_flat_out(aghead(e)).getFromList(j))!=null; j++) if (EQ(aghead(rev), agtail(e))) break; if (rev!=null) { merge_oneway(e, rev); if (ED_to_virt(e) == null) ED_to_virt(e, rev); if ((ED_edge_type(rev) == 4) && (ED_to_orig(rev) == null)) ED_to_orig(rev, e); elist_append(e, ND_other(agtail(e))); } else { rev = new_virtual_edge(aghead(e), agtail(e), e); if (ED_edge_type(e) == 4) ED_edge_type(rev, 4); else ED_edge_type(rev, 3); ED_label(rev, ED_label(e)); flat_edge(g, rev); } } finally { LEAVING("6fprrp93vmz0jn3l4ro0iropp","flat_rev"); } } //3 63ol0ch6cgln1nvl5oiz6n1v0 // static void flat_search(graph_t * g, node_t * v) public static void flat_search(Agraph_s g, Agnode_s v) { ENTERING("63ol0ch6cgln1nvl5oiz6n1v0","flat_search"); try { int i; boolean hascl; Agedge_s e; adjmatrix_t M = (adjmatrix_t) GD_rank(g).plus(ND_rank(v)).getPtr("flat"); ND_mark(v, NOT(false)); ND_onstack(v, NOT(false)); hascl = (GD_n_cluster(dot_root(g)) > 0); if (ND_flat_out(v).listNotNull()) for (i = 0; (e = (Agedge_s) ND_flat_out(v).getFromList(i))!=null; i++) { if (hascl && NOT(agcontains(g, agtail(e)) && agcontains(g, aghead(e)))) continue; if (ED_weight(e) == 0) continue; if (ND_onstack(aghead(e)) == NOT(false)) { assert(ND_low(aghead(e)) < M.getInt("nrows")); assert(ND_low(agtail(e)) < M.getInt("ncols")); M.getArrayOfInteger("data").plus(ND_low(aghead(e))*M.getInt("ncols")+ND_low(agtail(e))).setInt(1); delete_flat_edge(e); i--; if (ED_edge_type(e) == 4) continue; flat_rev(g, e); } else { assert(ND_low(aghead(e)) < M.getInt("nrows")); assert(ND_low(agtail(e)) < M.getInt("ncols")); M.getArrayOfInteger("data").plus(ND_low(agtail(e))*M.getInt("ncols")+ND_low(aghead(e))).setInt(1); if (ND_mark(aghead(e)) == 0) flat_search(g, aghead(e)); } } ND_onstack(v, 0); } finally { LEAVING("63ol0ch6cgln1nvl5oiz6n1v0","flat_search"); } } //3 3v5h7z4vqivibvpt913lg8at0 // static void flat_breakcycles(graph_t * g) public static void flat_breakcycles(Agraph_s g) { ENTERING("3v5h7z4vqivibvpt913lg8at0","flat_breakcycles"); try { int i, r, flat; Agnode_s v; for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { flat = 0; for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) { v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr(); ND_mark(v, 0); ND_onstack(v, 0); ND_low(v, i); if ((ND_flat_out(v).size > 0) && (flat == 0)) { GD_rank(g).plus(r).setPtr("flat", new_matrix(GD_rank(g).plus(r).getInt("n"), GD_rank(g).plus(r).getInt("n"))); flat = 1; } } if (flat!=0) { for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) { v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr(); if (ND_mark(v) == 0) flat_search(g, v); } } } } finally { LEAVING("3v5h7z4vqivibvpt913lg8at0","flat_breakcycles"); } } //3 d5vb6jiw8mhkaa8gjwn4eqfyn // void allocate_ranks(graph_t * g) public static void allocate_ranks(Agraph_s g) { ENTERING("d5vb6jiw8mhkaa8gjwn4eqfyn","allocate_ranks"); try { // REVIEW 17/01/2016 int r, low, high; __ptr__ cn; Agnode_s n; Agedge_s e; cn = zmalloc(size_t_array_of_integer(GD_maxrank(g) + 2)); /* must be 0 based, not GD_minrank */ for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) { cn.plus(ND_rank(n)).setInt(1+cn.plus(ND_rank(n)).getInt()); for (e = agfstout(g, n); e!=null; e = agnxtout(g, e)) { low = ND_rank(agtail(e)); high = ND_rank(aghead(e)); if (low > high) { int t = low; low = high; high = t; } for (r = low + 1; r < high; r++) cn.plus(r).setInt(1+cn.plus(r).getInt()); } } GD_rank(g, zmalloc(sizeof(rank_t.class, GD_maxrank(g) + 2))); for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { GD_rank(g).plus(r).setInt("n", cn.plus(r).getInt()); GD_rank(g).plus(r).setInt("an", cn.plus(r).getInt()); __ptr__ tmp = zmalloc(sizeof_starstar_empty(Agnode_s.class, cn.plus(r).getInt() + 1)); GD_rank(g).plus(r).setPtr("v", tmp); GD_rank(g).plus(r).setPtr("av", tmp); } Memory.free(cn); } finally { LEAVING("d5vb6jiw8mhkaa8gjwn4eqfyn","allocate_ranks"); } } //3 3lxoqxhiri9fgt20zc5jz3aa5 // void install_in_rank(graph_t * g, node_t * n) public static void install_in_rank(Agraph_s g, Agnode_s n) { ENTERING("3lxoqxhiri9fgt20zc5jz3aa5","install_in_rank"); try { int i, r; r = ND_rank(n); i = GD_rank(g).plus(r).getInt("n"); if (GD_rank(g).plus(r).getInt("an") <= 0) { UNSUPPORTED("8qk1xhvvb994zhv9aq10k4v12"); // agerr(AGERR, "install_in_rank, line %d: %s %s rank %d i = %d an = 0\n", UNSUPPORTED("53h8d82ax23hys2k21hjswp72"); // 1034, agnameof(g), agnameof(n), r, i); return; } GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).setPtr(n); ND_order(n, i); GD_rank(g).plus(r).setInt("n", 1+GD_rank(g).plus(r).getInt("n")); // assert(GD_rank(g)[r].n <= GD_rank(g)[r].an); if (ND_order(n) > GD_rank(Z.z().Root).plus(r).getInt("an")) { UNSUPPORTED("399szcw1txekt1xssyw7s2x07"); // agerr(AGERR, "install_in_rank, line %d: ND_order(%s) [%d] > GD_rank(Root)[%d].an [%d]\n", UNSUPPORTED("9puojrmsk6vb1qc0jtr8ge4g8"); // 1052, agnameof(n), ND_order(n), r, GD_rank(Root)[r].an); return; } if ((r < GD_minrank(g)) || (r > GD_maxrank(g))) { UNSUPPORTED("7o1thnqda767wqpe2lh9mj03t"); // agerr(AGERR, "install_in_rank, line %d: rank %d not in rank range [%d,%d]\n", UNSUPPORTED("d2ugluzf7bmj7osicgitgy3sr"); // 1057, r, GD_minrank(g), GD_maxrank(g)); return; } if (GD_rank(g).plus(r).getPtr("v").plus(ND_order(n)).comparePointer( GD_rank(g).plus(r).getPtr("av").plus(GD_rank(Z.z().Root).plus(r).getInt("an")))>0) { UNSUPPORTED("3eb32nc5czs5auwzz5p5mtl04"); // agerr(AGERR, "install_in_rank, line %d: GD_rank(g)[%d].v + ND_order(%s) [%d] > GD_rank(g)[%d].av + GD_rank(Root)[%d].an [%d]\n", UNSUPPORTED("3qe3qpw5h6vse39xs1ca9sjmo"); // 1062, r, agnameof(n),GD_rank(g)[r].v + ND_order(n), r, r, GD_rank(g)[r].av+GD_rank(Root)[r].an); return; } } finally { LEAVING("3lxoqxhiri9fgt20zc5jz3aa5","install_in_rank"); } } //3 7t49bz6lfcbd9v63ds2x3518z // void build_ranks(graph_t * g, int pass) public static void build_ranks(Agraph_s g, int pass) { ENTERING("7t49bz6lfcbd9v63ds2x3518z","build_ranks"); try { int i, j; Agnode_s n, n0 = null; __ptr__ otheredges; nodequeue q; q = new_queue(GD_n_nodes(g)); for (n = GD_nlist(g); n!=null; n = ND_next(n)) ND_mark(n, 0); for (i = GD_minrank(g); i <= GD_maxrank(g); i++) GD_rank(g).plus(i).setInt("n", 0); for (n = GD_nlist(g); n!=null; n = ND_next(n)) { otheredges = ((pass == 0) ? ND_in(n).getTheList() : ND_out(n).getTheList()); if (otheredges.plus(0).getPtr() != null) continue; if ((ND_mark(n)) == 0) { ND_mark(n, 1); enqueue(q, n); while ((n0 = dequeue(q))!=null) { if (ND_ranktype(n0) != 7) { install_in_rank(g, n0); enqueue_neighbors(q, n0, pass); } else { install_cluster(g, n0, pass, q); } } } } if (dequeue(q)!=null) UNSUPPORTED("1b3hbd5artrq77i58q2o9kgz3"); // agerr(AGERR, "surprise\n"); for (i = GD_minrank(g); i <= GD_maxrank(g); i++) { GD_rank(Z.z().Root).plus(i).setInt("valid", 0); if (GD_flip(g)!=0 && (GD_rank(g).plus(i).getInt("n") > 0)) { int nn, ndiv2; __ptr__ vlist = GD_rank(g).plus(i).getPtr("v"); nn = GD_rank(g).plus(i).getInt("n") - 1; ndiv2 = nn / 2; for (j = 0; j <= ndiv2; j++) exchange((Agnode_s)vlist.plus(j).getPtr(), (Agnode_s)vlist.plus(nn - j).getPtr()); } } if (EQ(g, dot_root(g)) && ncross(g) > 0) transpose(g, false); free_queue(q); } finally { LEAVING("7t49bz6lfcbd9v63ds2x3518z","build_ranks"); } } //3 bmjlneqxex6a9silzkkidkx6s // void enqueue_neighbors(nodequeue * q, node_t * n0, int pass) public static void enqueue_neighbors(nodequeue q, Agnode_s n0, int pass) { ENTERING("bmjlneqxex6a9silzkkidkx6s","enqueue_neighbors"); try { int i; Agedge_s e; if (pass == 0) { for (i = 0; i < ND_out(n0).size; i++) { e = (Agedge_s) ND_out(n0).getFromList(i); if (((ND_mark(aghead(e)))) == 0) { ND_mark(aghead(e), 1); enqueue(q, aghead(e)); } } } else { for (i = 0; i < ND_in(n0).size; i++) { e = (Agedge_s) ND_in(n0).getFromList(i); if (((ND_mark(agtail(e)))) == 0) { ND_mark(agtail(e), 1); enqueue(q, agtail(e)); } } } } finally { LEAVING("bmjlneqxex6a9silzkkidkx6s","enqueue_neighbors"); } } //3 c8nqj0v20api63pikohsbx92u // static int constraining_flat_edge(Agraph_t *g, Agnode_t *v, Agedge_t *e) public static boolean constraining_flat_edge(Agraph_s g, Agnode_s v, Agedge_s e) { ENTERING("c8nqj0v20api63pikohsbx92u","constraining_flat_edge"); try { if (ED_weight(e) == 0) return false; if (N(inside_cluster(g,agtail(e)))) return false; if (N(inside_cluster(g,aghead(e)))) return false; return NOT(false); } finally { LEAVING("c8nqj0v20api63pikohsbx92u","constraining_flat_edge"); } } //3 46to0pkk188af2dlkik2ab7e3 // static int postorder(graph_t * g, node_t * v, node_t ** list, int r) public static int postorder(Agraph_s g, Agnode_s v, __ptr__ list, int r) { ENTERING("46to0pkk188af2dlkik2ab7e3","postorder"); try { Agedge_s e; int i, cnt = 0; ND_mark(v, NOT(false)); if (ND_flat_out(v).size > 0) { for (i = 0; (e = (Agedge_s) ND_flat_out(v).getFromList(i))!=null; i++) { if (N(constraining_flat_edge(g,v,e))) continue; if ((ND_mark(aghead(e))) == 0) cnt += postorder(g, aghead(e), list.plus(cnt), r); } } assert(ND_rank(v) == r); list.plus(cnt++).setPtr(v); return cnt; } finally { LEAVING("46to0pkk188af2dlkik2ab7e3","postorder"); } } //3 zuxoswju917kyl08a5f0gtp6 // static void flat_reorder(graph_t * g) public static void flat_reorder(Agraph_s g) { ENTERING("zuxoswju917kyl08a5f0gtp6","flat_reorder"); try { int i, j, r, pos, n_search, local_in_cnt, local_out_cnt, base_order; Agnode_s v, t; __ptr__ left, right; __ptr__ temprank = null; Agedge_s flat_e, e; if (GD_has_flat_edges(g) == 0) return; for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { if (GD_rank(g).plus(r).getInt("n") == 0) continue; base_order = ND_order(GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr()); for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) ND_mark(GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr(), 0); temprank = ALLOC(i + 1, temprank, Agnode_s.class); pos = 0; /* construct reverse topological sort order in temprank */ for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) { if (GD_flip(g)!=0) v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr(); else v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(GD_rank(g).plus(r).getInt("n") - i - 1).getPtr(); local_in_cnt = local_out_cnt = 0; for (j = 0; j < ND_flat_in(v).size; j++) { flat_e = (Agedge_s) ND_flat_in(v).getFromList(j); if (constraining_flat_edge(g,v,flat_e)) local_in_cnt++; } for (j = 0; j < ND_flat_out(v).size; j++) { flat_e = (Agedge_s) ND_flat_out(v).getFromList(j); if (constraining_flat_edge(g,v,flat_e)) local_out_cnt++; } if ((local_in_cnt == 0) && (local_out_cnt == 0)) temprank.plus(pos++).setPtr(v); else { if (((ND_mark(v)) == 0) && (local_in_cnt == 0)) { left = temprank.plus(pos); n_search = postorder(g, v, left, r); pos += n_search; } } } if (pos!=0) { if (GD_flip(g) == 0) { left = temprank; right = temprank.plus(pos - 1); while (left.comparePointer(right) < 0) { t = (Agnode_s) left.getPtr(); left.setPtr(right.getPtr()); right.setPtr(t); left = left.plus(1); right = right.plus(-1); } } for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) { v = (Agnode_s) temprank.plus(i).getPtr(); GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).setPtr(v); ND_order(v, i + base_order); } /* nonconstraint flat edges must be made LR */ for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) { v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr(); if (ND_flat_out(v).listNotNull()) { for (j = 0; (e = (Agedge_s) ND_flat_out(v).getFromList(j))!=null; j++) { if ( ((GD_flip(g) == 0) && (ND_order(aghead(e)) < ND_order(agtail(e)))) || ( (GD_flip(g)!=0) && (ND_order(aghead(e)) > ND_order(agtail(e)) ))) { assert(constraining_flat_edge(g,v,e) == false); delete_flat_edge(e); j--; flat_rev(g, e); } } } } /* postprocess to restore intended order */ } /* else do no harm! */ GD_rank(Z.z().Root).plus(r).setInt("valid", 0); } if (temprank!=null) Memory.free(temprank); } finally { LEAVING("zuxoswju917kyl08a5f0gtp6","flat_reorder"); } } //3 inv6wazjcnh4xkzzphsdcmg4 // static void reorder(graph_t * g, int r, int reverse, int hasfixed) public static void reorder(Agraph_s g, int r, boolean reverse, boolean hasfixed) { ENTERING("inv6wazjcnh4xkzzphsdcmg4","reorder"); try { boolean changed = false; int nelt; boolean muststay, sawclust; __ptr__ vlist = GD_rank(g).plus(r).getPtr("v"); __ptr__ lp, rp=null, ep = vlist.plus(GD_rank(g).plus(r).getInt("n")); for (nelt = GD_rank(g).plus(r).getInt("n") - 1; nelt >= 0; nelt--) { lp = vlist; while (lp.comparePointer(ep)<0) { /* find leftmost node that can be compared */ while ((lp.comparePointer(ep) < 0) && (ND_mval(lp.getPtr()) < 0)) lp = lp.plus(1); if (lp.comparePointer(ep) >= 0) break; /* find the node that can be compared */ sawclust = muststay = false; for (rp = lp.plus(1); rp.comparePointer(ep) < 0; rp=rp.plus(1)) { if (sawclust && ND_clust(rp.getPtr())!=null) continue; /* ### */ if (left2right(g, (Agnode_s) lp.getPtr(), (Agnode_s) rp.getPtr())) { muststay = NOT(false); break; } if (ND_mval(rp.getPtr()) >= 0) break; if (ND_clust(rp.getPtr())!=null) sawclust = NOT(false); /* ### */ } if (rp.comparePointer(ep) >= 0) break; if (muststay == false) { int p1 = (int) (ND_mval(lp.getPtr())); int p2 = (int) (ND_mval(rp.getPtr())); if ((p1 > p2) || ((p1 == p2) && (reverse))) { exchange((Agnode_s)lp.getPtr(), (Agnode_s)rp.getPtr()); changed=true; } } lp = rp; } if ((hasfixed == false) && (reverse == false)) ep = ep.plus(-1); } if (changed) { GD_rank(Z.z().Root).plus(r).setBoolean("valid", false); if (r > 0) GD_rank(Z.z().Root).plus(r - 1).setBoolean("valid", false); } } finally { LEAVING("inv6wazjcnh4xkzzphsdcmg4","reorder"); } } //3 14t80owwvm7io4ou6czb9ba9 // static void mincross_step(graph_t * g, int pass) public static void mincross_step(Agraph_s g, int pass) { ENTERING("14t80owwvm7io4ou6czb9ba9","mincross_step"); try { int r, other, first, last, dir; boolean hasfixed, reverse; if ((pass % 4) < 2) reverse = NOT(false); else reverse = false; if ((pass % 2)!=0) { r = GD_maxrank(g) - 1; dir = -1; } /* up pass */ else { r = 1; dir = 1; } /* down pass */ if (pass % 2 == 0) { /* down pass */ first = GD_minrank(g) + 1; if (GD_minrank(g) > GD_minrank(Z.z().Root)) first--; last = GD_maxrank(g); dir = 1; } else { /* up pass */ first = GD_maxrank(g) - 1; last = GD_minrank(g); if (GD_maxrank(g) < GD_maxrank(Z.z().Root)) first++; dir = -1; } for (r = first; r != last + dir; r += dir) { other = r - dir; hasfixed = medians(g, r, other); reorder(g, r, reverse, hasfixed); } transpose(g, NOT(reverse)); } finally { LEAVING("14t80owwvm7io4ou6czb9ba9","mincross_step"); } } //3 aq18oa4k4grixvfjx7r2qnl6r // static int local_cross(elist l, int dir) public static int local_cross(final __struct__ l, int dir) { // WARNING!! STRUCT return local_cross_w_(l.copy(), dir); } private static int local_cross_w_(final __struct__ l, int dir) { ENTERING("aq18oa4k4grixvfjx7r2qnl6r","local_cross"); try { UNSUPPORTED("3jmndo6p8u1x5wp297qpt0jto"); // static int local_cross(elist l, int dir) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2gmuwkiycm22in3d9obd7bzll"); // int i, j, is_out; UNSUPPORTED("bcforqedbns82qhgqkocjbvm"); // int cross = 0; UNSUPPORTED("9b48a157azcrz2ihzqehhpsvs"); // edge_t *e, *f; UNSUPPORTED("8az9seos08f2sa39127q6yo9"); // if (dir > 0) UNSUPPORTED("8xj2loay6suplxyiun7hlye39"); // is_out = NOT(0); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("56xhe3qw67sg923dvr87k8hho"); // is_out = 0; UNSUPPORTED("16t717mqlhfn3egmgor8are83"); // for (i = 0; (e = l.list[i]); i++) { UNSUPPORTED("3lbek06034x2gsimhxwfmgf0r"); // if (is_out) UNSUPPORTED("2pkmgz4cm8lwpwxgcg3znjm90"); // for (j = i + 1; (f = l.list[j]); j++) { UNSUPPORTED("8wj6phwqlmunjcua9abo6093d"); // if ((ND_order(aghead(f)) - ND_order(aghead(e))) UNSUPPORTED("pt12knuv94kokmtrwpdp1m0j"); // * (ED_tail_port(f).p.x - ED_tail_port(e).p.x) < 0) UNSUPPORTED("bw8rwv11yqzss88pad7ljil8a"); // cross += ED_xpenalty(e) * ED_xpenalty(f); UNSUPPORTED("6to1esmb8qfrhzgtr7jdqleja"); // } else UNSUPPORTED("2pkmgz4cm8lwpwxgcg3znjm90"); // for (j = i + 1; (f = l.list[j]); j++) { UNSUPPORTED("bza83c6rmihrkzyllwf0jm4tn"); // if ((ND_order(agtail(f)) - ND_order(agtail(e))) UNSUPPORTED("csrxg0y1azmvde7t833lm13sp"); // * (ED_head_port(f).p.x - ED_head_port(e).p.x) < 0) UNSUPPORTED("bw8rwv11yqzss88pad7ljil8a"); // cross += ED_xpenalty(e) * ED_xpenalty(f); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8dm5o3tsfvxtjilyob6q5ndi1"); // return cross; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("aq18oa4k4grixvfjx7r2qnl6r","local_cross"); } } //3 bk5nklhfqgg0uwkv7tv6dn8r2 // static int rcross(graph_t * g, int r) //static __ptr__ Count; //static int C; public static int rcross(Agraph_s g, int r) { ENTERING("bk5nklhfqgg0uwkv7tv6dn8r2","rcross"); try { int top, bot, cross, max, i, k; Agnode_s v; __ptr__ rtop; cross = 0; max = 0; rtop = GD_rank(g).plus(r).getPtr("v"); if (Z.z().C <= GD_rank(Z.z().Root).plus(r + 1).getInt("n")) { Z.z().C = GD_rank(Z.z().Root).plus(r + 1).getInt("n") + 1; Z.z().Count = ALLOC_INT(Z.z().C, Z.z().Count); } for (i = 0; i < GD_rank(g).plus(r + 1).getInt("n"); i++) Z.z().Count.plus(i).setInt(0); for (top = 0; top < GD_rank(g).plus(r).getInt("n"); top++) { Agedge_s e; if (max > 0) { for (i = 0; (e = (Agedge_s) ND_out(rtop.plus(top).getPtr()).getFromList(i))!=null; i++) { for (k = ND_order(aghead(e)) + 1; k <= max; k++) cross += Z.z().Count.plus(k).getInt() * ED_xpenalty(e); } } for (i = 0; (e = (Agedge_s) ND_out(rtop.plus(top).getPtr()).getFromList(i))!=null; i++) { int inv = ND_order(aghead(e)); if (inv > max) max = inv; Z.z().Count.plus(inv).setInt(Z.z().Count.plus(inv).getInt() + ED_xpenalty(e)); } } for (top = 0; top < GD_rank(g).plus(r).getInt("n"); top++) { v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(top).getPtr(); if (ND_has_port(v)) cross += local_cross(ND_out(v), 1); } for (bot = 0; bot < GD_rank(g).plus(r + 1).getInt("n"); bot++) { v = (Agnode_s) GD_rank(g).plus(r + 1).getArrayOfPtr("v").plus(bot).getPtr(); if (ND_has_port(v)) cross += local_cross(ND_in(v), -1); } return cross; } finally { LEAVING("bk5nklhfqgg0uwkv7tv6dn8r2","rcross"); } } //3 dbjmz2tnii2pn9sxg26ap6w5r // int ncross(graph_t * g) public static int ncross(Agraph_s g) { ENTERING("dbjmz2tnii2pn9sxg26ap6w5r","ncross"); try { int r, count, nc; g = Z.z().Root; count = 0; for (r = GD_minrank(g); r < GD_maxrank(g); r++) { if (GD_rank(g).plus(r).getBoolean("valid")) count += GD_rank(g).plus(r).getInt("cache_nc"); else { nc = rcross(g, r); GD_rank(g).plus(r).getInt("cache_nc"); count += nc; GD_rank(g).plus(r).setInt("valid", 1); } } return count; } finally { LEAVING("dbjmz2tnii2pn9sxg26ap6w5r","ncross"); } } //3 8wrsq8a2vooekcm3cdtv5x3ke // static int ordercmpf(int *i0, int *i1) public static int ordercmpf(__ptr__ i0, __ptr__ i1) { ENTERING("8wrsq8a2vooekcm3cdtv5x3ke","ordercmpf"); try { return (i0.getInt()) - (i1.getInt()); } finally { LEAVING("8wrsq8a2vooekcm3cdtv5x3ke","ordercmpf"); } } //3 7397kynkpqf2m1jkpmi8pgf0n // static int flat_mval(node_t * n) public static boolean flat_mval(Agnode_s n) { ENTERING("7397kynkpqf2m1jkpmi8pgf0n","flat_mval"); try { int i; Agedge_s e; __ptr__ fl; Agnode_s nn; if (ND_flat_in(n).size > 0) { fl = ND_flat_in(n).getTheList(); nn = agtail(fl.plus(0).getPtr()); for (i = 1; (e = (Agedge_s) fl.plus(i).getPtr())!=null; i++) if (ND_order(agtail(e)) > ND_order(nn)) nn = agtail(e); if (ND_mval(nn) >= 0) { ND_mval(n, ND_mval(nn) + 1); return false; } } else if (ND_flat_out(n).size > 0) { fl = ND_flat_out(n).getTheList(); nn = aghead(fl.plus(0).getPtr()); for (i = 1; (e = (Agedge_s) fl.plus(i).getPtr())!=null; i++) if (ND_order(aghead(e)) < ND_order(nn)) nn = aghead(e); if (ND_mval(nn) > 0) { ND_mval(n, ND_mval(nn) - 1); return false; } } return NOT(false); } finally { LEAVING("7397kynkpqf2m1jkpmi8pgf0n","flat_mval"); } } //3 azvdpixwwxspl31wp7f4k4fmh // static boolean medians(graph_t * g, int r0, int r1) public static boolean medians(Agraph_s g, int r0, int r1) { ENTERING("azvdpixwwxspl31wp7f4k4fmh","medians"); try { int i, j, j0, lm, rm, lspan, rspan; __ptr__ list; Agnode_s n; __ptr__ v; Agedge_s e; boolean hasfixed = false; list = Z.z().TI_list; v = GD_rank(g).plus(r0).getPtr("v"); for (i = 0; i < GD_rank(g).plus(r0).getInt("n"); i++) { n = (Agnode_s) v.plus(i).getPtr(); j = 0; if (r1 > r0) for (j0 = 0; (e = (Agedge_s) ND_out(n).getFromList(j0))!=null; j0++) { if (ED_xpenalty(e) > 0) list.plus(j++).setInt((256 * ND_order(aghead(e)) + (ED_head_port(e)).getInt("order"))); } else for (j0 = 0; (e = (Agedge_s) ND_in(n).getFromList(j0))!=null; j0++) { if (ED_xpenalty(e) > 0) list.plus(j++).setInt((256 * ND_order(agtail(e)) + (ED_tail_port(e)).getInt("order"))); } switch (j) { case 0: ND_mval(n, -1); break; case 1: ND_mval(n, list.plus(0).getInt()); break; case 2: ND_mval(n, (list.plus(0).getInt() + list.plus(1).getInt()) / 2); break; default: qsort(list, j, sizeof(list.plus(0)), function(mincross__c.class, "ordercmpf")); if (j % 2!=0) ND_mval(n, list.plus(j / 2).getInt()); else { /* weighted median */ rm = j / 2; lm = rm - 1; rspan = list.plus(j - 1).getInt() - list.plus(rm).getInt(); lspan = list.plus(lm).getInt() - list.plus(0).getInt(); if (lspan == rspan) ND_mval(n, (list.plus(lm).getInt() + list.plus(rm).getInt()) / 2); else { int w = list.plus(lm).getInt() * rspan + list.plus(rm).getInt() * lspan; ND_mval(n, w / (lspan + rspan)); } } } } for (i = 0; i < GD_rank(g).plus(r0).getInt("n"); i++) { n = (Agnode_s) v.plus(i).getPtr(); if ((ND_out(n).size == 0) && (ND_in(n).size == 0)) hasfixed |= flat_mval(n); } return hasfixed; } finally { LEAVING("azvdpixwwxspl31wp7f4k4fmh","medians"); } } //3 2vdhpcykq508ma83aif8sxcbd // static int nodeposcmpf(node_t ** n0, node_t ** n1) public static Object nodeposcmpf(__ptr__ n0, __ptr__ n1) { ENTERING("2vdhpcykq508ma83aif8sxcbd","nodeposcmpf"); try { return (ND_order(n0.getPtr()) - ND_order(n1.getPtr())); } finally { LEAVING("2vdhpcykq508ma83aif8sxcbd","nodeposcmpf"); } } //3 87c98ld9c4hv87ekcxdyojx8l // static int edgeidcmpf(edge_t ** e0, edge_t ** e1) public static Object edgeidcmpf(Object... arg) { UNSUPPORTED("apvyql25ya1p7w7i7396gucdg"); // static int edgeidcmpf(edge_t ** e0, edge_t ** e1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9gjc2rit3ezq4il0t5aymk1z"); // return (AGSEQ(*e0) - AGSEQ(*e1)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 40as9opn4mzq4gp4nkmp4dj8w // static int table[3][3] = private static int table[][] = new int[][]{ /* ordinary */ {1, 1, 1}, /* singleton */ {1, 2, 2}, /* virtual */ {1, 2, 4} }; //3 7j638prioxd97f74v1v4adbsf // static int endpoint_class(node_t * n) public static int endpoint_class(Agnode_s n) { ENTERING("7j638prioxd97f74v1v4adbsf","endpoint_class"); try { if (ND_node_type(n) == 1) return 2; if (ND_weight_class(n) <= 1) return 1; return 0; } finally { LEAVING("7j638prioxd97f74v1v4adbsf","endpoint_class"); } } //3 es57bn7ga4wc9tqtcixpn0451 // void virtual_weight(edge_t * e) public static void virtual_weight(Agedge_s e) { ENTERING("es57bn7ga4wc9tqtcixpn0451","virtual_weight"); try { int t; t = table[endpoint_class(agtail(e))][endpoint_class(aghead(e))]; ED_weight(e, ED_weight(e) * t); } finally { LEAVING("es57bn7ga4wc9tqtcixpn0451","virtual_weight"); } } //3 7ru09oqbudpeofsthzveig2m2 // static void mincross_options(graph_t * g) public static void mincross_options(Agraph_s g) { ENTERING("7ru09oqbudpeofsthzveig2m2","mincross_options"); try { CString p; double f; /* set default values */ Z.z().MinQuit = 8; Z.z().MaxIter = 24; Z.z().Convergence = .995; p = agget(g, new CString("mclimit")); if (p!=null && ((f = atof(p)) > 0.0)) { UNSUPPORTED("4iu53eiz077u6joqgwawca8ya"); // MinQuit = ((1)>(MinQuit * f)?(1):(MinQuit * f)); UNSUPPORTED("38po81l36cibw6jc3qlsscpcu"); // MaxIter = ((1)>(MaxIter * f)?(1):(MaxIter * f)); } } finally { LEAVING("7ru09oqbudpeofsthzveig2m2","mincross_options"); } } } plantuml-1.2017.15/src/gen/lib/dotgen/position__c.java000066400000000000000000002301671312650303100224250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static gen.lib.cgraph.attr__c.agget; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agtail; import static gen.lib.cgraph.graph__c.agnnodes; import static gen.lib.cgraph.obj__c.agcontains; import static gen.lib.cgraph.obj__c.agroot; import static gen.lib.common.memory__c.zmalloc; import static gen.lib.common.ns__c.rank; import static gen.lib.common.splines__c.selfRightSpace; import static gen.lib.common.utils__c.late_int; import static gen.lib.dotgen.cluster__c.mark_lowclusters; import static gen.lib.dotgen.conc__c.dot_concentrate; import static gen.lib.dotgen.dotinit__c.dot_root; import static gen.lib.dotgen.fastgr__c.fast_edge; import static gen.lib.dotgen.fastgr__c.find_fast_edge; import static gen.lib.dotgen.fastgr__c.virtual_node; import static gen.lib.dotgen.fastgr__c.zapinlist; import static gen.lib.dotgen.flat__c.flat_edges; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.USHRT_MAX; import static smetana.core.JUtils.atof; import static smetana.core.JUtils.enumAsInt; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGINEDGE; import static smetana.core.Macro.AGOUTEDGE; import static smetana.core.Macro.AGTYPE; import static smetana.core.Macro.ALLOC_empty; import static smetana.core.Macro.ED_dist; import static smetana.core.Macro.ED_head_port; import static smetana.core.Macro.ED_label; import static smetana.core.Macro.ED_minlen; import static smetana.core.Macro.ED_tail_port; import static smetana.core.Macro.ED_to_orig; import static smetana.core.Macro.ED_weight; import static smetana.core.Macro.GD_bb; import static smetana.core.Macro.GD_border; import static smetana.core.Macro.GD_clust; import static smetana.core.Macro.GD_drawing; import static smetana.core.Macro.GD_exact_ranksep; import static smetana.core.Macro.GD_flip; import static smetana.core.Macro.GD_has_labels; import static smetana.core.Macro.GD_ht1; import static smetana.core.Macro.GD_ht2; import static smetana.core.Macro.GD_label; import static smetana.core.Macro.GD_ln; import static smetana.core.Macro.GD_maxrank; import static smetana.core.Macro.GD_minrank; import static smetana.core.Macro.GD_n_cluster; import static smetana.core.Macro.GD_nlist; import static smetana.core.Macro.GD_nodesep; import static smetana.core.Macro.GD_rank; import static smetana.core.Macro.GD_ranksep; import static smetana.core.Macro.GD_rn; import static smetana.core.Macro.INT_MAX; import static smetana.core.Macro.MAX; import static smetana.core.Macro.MIN; import static smetana.core.Macro.N; import static smetana.core.Macro.ND_UF_size; import static smetana.core.Macro.ND_alg; import static smetana.core.Macro.ND_clust; import static smetana.core.Macro.ND_coord; import static smetana.core.Macro.ND_flat_out; import static smetana.core.Macro.ND_ht; import static smetana.core.Macro.ND_in; import static smetana.core.Macro.ND_inleaf; import static smetana.core.Macro.ND_lw; import static smetana.core.Macro.ND_mval; import static smetana.core.Macro.ND_next; import static smetana.core.Macro.ND_node_type; import static smetana.core.Macro.ND_order; import static smetana.core.Macro.ND_other; import static smetana.core.Macro.ND_out; import static smetana.core.Macro.ND_outleaf; import static smetana.core.Macro.ND_prev; import static smetana.core.Macro.ND_rank; import static smetana.core.Macro.ND_ranktype; import static smetana.core.Macro.ND_rw; import static smetana.core.Macro.ND_save_in; import static smetana.core.Macro.ND_save_out; import static smetana.core.Macro.NOT; import static smetana.core.Macro.ROUND; import static smetana.core.Macro.UNSUPPORTED; import static smetana.core.Macro.aghead; import static smetana.core.Macro.agtail; import static smetana.core.Macro.alloc_elist; import static smetana.core.Macro.free_list; import h.Agedge_s; import h.Agedgeinfo_t; import h.Agedgepair_s; import h.Agnode_s; import h.Agraph_s; import h.ST_pointf; import h.aspect_t; import h.boxf; import h.point; import h.pointf; import h.ratio_t; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Memory; import smetana.core.Z; import smetana.core.__ptr__; import smetana.core.__struct__; public class position__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6knxbdrmgk6294aw61s2lpvvf // static double largeMinlen (double l) public static double largeMinlen(double l) { ENTERING("6knxbdrmgk6294aw61s2lpvvf","largeMinlen"); try { UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double UNSUPPORTED("e2f0xhw6om2fpgt48xyjjg3i"); // largeMinlen (double l) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dad2o3vzemegi5fywxl7hcezk"); // agerr (AGERR, "Edge length %f larger than maximum %u allowed.\nCheck for overwide node(s).\n", l, USHRT_MAX); UNSUPPORTED("dlasv24dnuygpwagcamhyg15w"); // return (double)USHRT_MAX; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("6knxbdrmgk6294aw61s2lpvvf","largeMinlen"); } } //3 ccowbxkwmrj75tojopmhcmubx // static void connectGraph (graph_t* g) public static void connectGraph(Agraph_s g) { ENTERING("ccowbxkwmrj75tojopmhcmubx","connectGraph"); try { int i, j, r, found; Agnode_s tp; Agnode_s hp; Agnode_s sn; Agedge_s e; __ptr__ rp; for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { rp = GD_rank(g).plus(r); found =0; tp = null; for (i = 0; i < rp.getPtr().getInt("n"); i++) { tp = (Agnode_s) rp.getPtr().getArrayOfPtr("v").plus(i).getPtr(); if (ND_save_out(tp).listNotNull()) { for (j = 0; (e = (Agedge_s) ND_save_out(tp).getFromList(j))!=null; j++) { if ((ND_rank(aghead(e)) > r) || (ND_rank(agtail(e)) > r)) { found = 1; break; } } if (found!=0) break; } if (ND_save_in(tp).listNotNull()) { for (j = 0; (e = (Agedge_s) ND_save_in(tp).getFromList(j))!=null; j++) { if ((ND_rank(agtail(e)) > r) || (ND_rank(aghead(e)) > r)) { found = 1; break; } } if (found!=0) break; } } if (found!=0 || N(tp)) continue; tp = (Agnode_s) rp.getPtr().getArrayOfPtr("v").plus(0).getPtr(); if (r < GD_maxrank(g)) hp = (Agnode_s) rp.plus(1).getPtr().getArrayOfPtr("v").plus(0).getPtr(); else hp = (Agnode_s) rp.plus(-1).getPtr().getArrayOfPtr("v").plus(0).getPtr(); //assert (hp); sn = virtual_node(g); ND_node_type(sn, 2); make_aux_edge(sn, tp, 0, 0); make_aux_edge(sn, hp, 0, 0); ND_rank(sn, MIN(ND_rank(tp), ND_rank(hp))); } } finally { LEAVING("ccowbxkwmrj75tojopmhcmubx","connectGraph"); } } //3 33snzyd9z0loienur06dnily9 // void dot_position(graph_t * g, aspect_t* asp) public static void dot_position(Agraph_s g, aspect_t asp) { ENTERING("33snzyd9z0loienur06dnily9","dot_position"); try { if (GD_nlist(g) == null) return; /* ignore empty graph */ mark_lowclusters(g); /* we could remove from splines.c now */ set_ycoords(g); if (Z.z().Concentrate) dot_concentrate(g); expand_leaves(g); if (flat_edges(g)!=0) set_ycoords(g); create_aux_edges(g); if (rank(g, 2, nsiter2(g))!=0) { /* LR balance == 2 */ connectGraph (g); //assert(rank(g, 2, nsiter2(g)) == 0); } set_xcoords(g); set_aspect(g, asp); remove_aux_edges(g); /* must come after set_aspect since we now * use GD_ln and GD_rn for bbox width. */ } finally { LEAVING("33snzyd9z0loienur06dnily9","dot_position"); } } //3 90vn63m6v0w9fn9a2dgfxxx3h // static int nsiter2(graph_t * g) public static int nsiter2(Agraph_s g) { ENTERING("90vn63m6v0w9fn9a2dgfxxx3h","nsiter2"); try { int maxiter = INT_MAX; CString s; if ((s = agget(g, new CString("nslimit")))!=null) maxiter = (int)(atof(s) * agnnodes(g)); return maxiter; } finally { LEAVING("90vn63m6v0w9fn9a2dgfxxx3h","nsiter2"); } } //3 5bax8ut6nnk4pr7yxdumk9chl // static int go(node_t * u, node_t * v) public static boolean go(Agnode_s u, Agnode_s v) { ENTERING("5bax8ut6nnk4pr7yxdumk9chl","go"); try { int i; Agedge_s e; if (EQ(u, v)) return NOT(false); for (i = 0; (e = (Agedge_s) ND_out(u).getFromList(i))!=null; i++) { if (go(aghead(e), v)) return NOT(false); } return false; } finally { LEAVING("5bax8ut6nnk4pr7yxdumk9chl","go"); } } //3 9xz8numztzj4qsq85pziahv1k // static int canreach(node_t * u, node_t * v) public static boolean canreach(Agnode_s u, Agnode_s v) { ENTERING("9xz8numztzj4qsq85pziahv1k","canreach"); try { return go(u, v); } finally { LEAVING("9xz8numztzj4qsq85pziahv1k","canreach"); } } //3 4cvgiatny97ou6mhqoq6aqwek // edge_t *make_aux_edge(node_t * u, node_t * v, double len, int wt) public static Agedge_s make_aux_edge(Agnode_s u, Agnode_s v, double len, int wt) { ENTERING("4cvgiatny97ou6mhqoq6aqwek","make_aux_edge"); try { Agedge_s e; Agedgepair_s e2 = (Agedgepair_s) zmalloc(sizeof(Agedgepair_s.class)); AGTYPE(e2.getStruct("in").amp(), AGINEDGE); AGTYPE(e2.getStruct("out").amp(), AGOUTEDGE); e2.getStruct("out").getStruct("base").setPtr("data", zmalloc(sizeof(Agedgeinfo_t.class))); e = (Agedge_s) e2.getStruct("out").amp(); agtail(e, u); aghead(e, v); if (len > USHRT_MAX) len = largeMinlen (len); ED_minlen(e, ROUND(len)); ED_weight(e, wt); fast_edge(e); return e; } finally { LEAVING("4cvgiatny97ou6mhqoq6aqwek","make_aux_edge"); } } //3 53fvij7oun7aezlb7x66vzuyb // static void allocate_aux_edges(graph_t * g) public static void allocate_aux_edges(Agraph_s g) { ENTERING("53fvij7oun7aezlb7x66vzuyb","allocate_aux_edges"); try { int i, j, n_in; Agnode_s n; /* allocate space for aux edge lists */ for (n = GD_nlist(g); n!=null; n = ND_next(n)) { ND_save_in(n, ND_in(n)); ND_save_out(n, ND_out(n)); for (i = 0; ND_out(n).getFromList(i)!=null; i++); for (j = 0; ND_in(n).getFromList(j)!=null; j++); n_in = i + j; alloc_elist(n_in + 3, ND_in(n), Agnode_s.class); alloc_elist(3, ND_out(n), Agnode_s.class); } } finally { LEAVING("53fvij7oun7aezlb7x66vzuyb","allocate_aux_edges"); } } //3 ah28nr6mxpjeosr85bhmzd3si // static void make_LR_constraints(graph_t * g) public static void make_LR_constraints(Agraph_s g) { ENTERING("ah28nr6mxpjeosr85bhmzd3si","make_LR_constraints"); try { int i, j, k; int sw; /* self width */ int m0, m1; double width; int sep[] = new int[2]; int nodesep; /* separation between nodes on same rank */ Agedge_s e, e0, e1, ff; Agnode_s u, v, t0, h0; __ptr__ rank = GD_rank(g); /* Use smaller separation on odd ranks if g has edge labels */ if ((GD_has_labels(g) & (1 << 0))!=0) { sep[0] = GD_nodesep(g); sep[1] = 5; } else { sep[1] = sep[0] = GD_nodesep(g); } /* make edges to constrain left-to-right ordering */ for (i = GD_minrank(g); i <= GD_maxrank(g); i++) { double last; ND_rank(rank.plus(i).getArrayOfPtr("v").plus(0).getPtr(), 0); last = 0; nodesep = sep[i & 1]; for (j = 0; j < rank.plus(i).getInt("n"); j++) { u = (Agnode_s) rank.plus(i).getArrayOfPtr("v").plus(j).getPtr(); ND_mval(u, ND_rw(u)); /* keep it somewhere safe */ if (ND_other(u).size > 0) { /* compute self size */ /* FIX: dot assumes all self-edges go to the right. This * is no longer true, though makeSelfEdge still attempts to * put as many as reasonable on the right. The dot code * should be modified to allow a box reflecting the placement * of all self-edges, and use that to reposition the nodes. * Note that this would not only affect left and right * positioning but may also affect interrank spacing. */ sw = 0; for (k = 0; (e = (Agedge_s) ND_other(u).getFromList(k))!=null; k++) { if (EQ(agtail(e), aghead(e))) { sw += selfRightSpace (e); } } ND_rw(u, ND_rw(u) + sw); /* increment to include self edges */ } v = (Agnode_s) rank.plus(i).getArrayOfPtr("v").plus(j + 1).getPtr(); if (v!=null) { width = ND_rw(u) + ND_lw(v) + nodesep; e0 = make_aux_edge(u, v, width, 0); ND_rank(v, (int)(last + width)); last = (int)(last + width); } /* constraints from labels of flat edges on previous rank */ if ((e = (Agedge_s) ND_alg(u))!=null) { e0 = (Agedge_s) ND_save_out(u).getFromList(0); e1 = (Agedge_s) ND_save_out(u).getFromList(1); if (ND_order(aghead(e0)) > ND_order(aghead(e1))) { ff = e0; e0 = e1; e1 = ff; } m0 = (ED_minlen(e) * GD_nodesep(g)) / 2; m1 = m0 + ((int)(ND_rw(aghead(e0)) + ND_lw(agtail(e0)))); /* these guards are needed because the flat edges * work very poorly with cluster layout */ if (canreach(agtail(e0), aghead(e0)) == false) make_aux_edge(aghead(e0), agtail(e0), m1, ED_weight(e)); m1 = m0 + ((int)(ND_rw(agtail(e1)) + ND_lw(aghead(e1)))); if (canreach(aghead(e1), agtail(e1)) == false) make_aux_edge(agtail(e1), aghead(e1), m1, ED_weight(e)); } /* position flat edge endpoints */ for (k = 0; k < ND_flat_out(u).size; k++) { e = (Agedge_s) ND_flat_out(u).getFromList(k); if (ND_order(agtail(e)) < ND_order(aghead(e))) { t0 = agtail(e); h0 = aghead(e); } else { t0 = aghead(e); h0 = agtail(e); } width = ND_rw(t0) + ND_lw(h0); m0 = (int) (ED_minlen(e) * GD_nodesep(g) + width); if ((e0 = find_fast_edge(t0, h0))!=null) { /* flat edge between adjacent neighbors * ED_dist contains the largest label width. */ m0 = MAX(m0, (int)(width + GD_nodesep(g) + ROUND(ED_dist(e)))); if (m0 > USHRT_MAX) m0 = (int) largeMinlen (m0); ED_minlen(e0, MAX(ED_minlen(e0), m0)); ED_weight(e0, MAX(ED_weight(e0), ED_weight(e))); } else if (N(ED_label(e))) { /* unlabeled flat edge between non-neighbors * ED_minlen(e) is max of ED_minlen of all equivalent * edges. */ make_aux_edge(t0, h0, m0, ED_weight(e)); } /* labeled flat edges between non-neighbors have already * been constrained by the label above. */ } } } } finally { LEAVING("ah28nr6mxpjeosr85bhmzd3si","make_LR_constraints"); } } //3 6uruo8mutxgcni9fm8jcrw4cr // static void make_edge_pairs(graph_t * g) public static void make_edge_pairs(Agraph_s g) { ENTERING("6uruo8mutxgcni9fm8jcrw4cr","make_edge_pairs"); try { int i, m0, m1; Agnode_s n, sn; Agedge_s e; for (n = GD_nlist(g); n!=null; n = ND_next(n)) { if (ND_save_out(n).listNotNull()) for (i = 0; (e = (Agedge_s) ND_save_out(n).getFromList(i))!=null; i++) { sn = virtual_node(g); ND_node_type(sn, 2); m0 = (int)(ED_head_port(e).p.x - ED_tail_port(e).p.x); if (m0 > 0) m1 = 0; else { m1 = -m0; m0 = 0; } make_aux_edge(sn, agtail(e), m0 + 1, ED_weight(e)); make_aux_edge(sn, aghead(e), m1 + 1, ED_weight(e)); ND_rank(sn, MIN(ND_rank(agtail(e)) - m0 - 1, ND_rank(aghead(e)) - m1 - 1)); } } } finally { LEAVING("6uruo8mutxgcni9fm8jcrw4cr","make_edge_pairs"); } } //3 79v3omwzni0nm3h05l3onjsbz // static void contain_clustnodes(graph_t * g) public static void contain_clustnodes(Agraph_s g) { ENTERING("79v3omwzni0nm3h05l3onjsbz","contain_clustnodes"); try { int c; Agedge_s e; if (NEQ(g, dot_root(g))) { contain_nodes(g); if ((e = find_fast_edge(GD_ln(g),GD_rn(g)))!=null) /* maybe from lrvn()?*/ ED_weight(e, ED_weight(e) + 128); else make_aux_edge(GD_ln(g), GD_rn(g), 1, 128); /* clust compaction edge */ } for (c = 1; c <= GD_n_cluster(g); c++) contain_clustnodes((Agraph_s) GD_clust(g).plus(c).getPtr()); } finally { LEAVING("79v3omwzni0nm3h05l3onjsbz","contain_clustnodes"); } } //3 24yfgklubun581fbfyx62lzsm // static int vnode_not_related_to(graph_t * g, node_t * v) public static boolean vnode_not_related_to(Agraph_s g, Agnode_s v) { ENTERING("24yfgklubun581fbfyx62lzsm","vnode_not_related_to"); try { Agedge_s e; if (ND_node_type(v) != 1) return false; for (e = (Agedge_s) ND_save_out(v).getFromList(0); ED_to_orig(e)!=null; e = ED_to_orig(e)); if (agcontains(g, agtail(e))) return false; if (agcontains(g, aghead(e))) return false; return NOT(false); } finally { LEAVING("24yfgklubun581fbfyx62lzsm","vnode_not_related_to"); } } //3 73cdgjl47ohty2va766evbo4 // static void keepout_othernodes(graph_t * g) public static void keepout_othernodes(Agraph_s g) { ENTERING("73cdgjl47ohty2va766evbo4","keepout_othernodes"); try { int i, c, r, margin; Agnode_s u, v; margin = late_int (g, Z.z().G_margin, 8, 0); for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { if (GD_rank(g).plus(r).getInt("n") == 0) continue; v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr(); if (v == null) continue; for (i = ND_order(v) - 1; i >= 0; i--) { u = (Agnode_s) GD_rank(dot_root(g)).plus(r).getArrayOfPtr("v").plus(i).getPtr(); /* can't use "is_a_vnode_of" because elists are swapped */ if ((ND_node_type(u) == 0) || vnode_not_related_to(g, u)) { make_aux_edge(u, GD_ln(g), margin + ND_rw(u), 0); break; } } for (i = ND_order(v) + GD_rank(g).plus(r).getInt("n"); i < GD_rank(dot_root(g)).plus(r).getInt("n"); i++) { u = (Agnode_s) GD_rank(dot_root(g)).plus(r).getArrayOfPtr("v").plus(i).getPtr(); if ((ND_node_type(u) == 0) || vnode_not_related_to(g, u)) { make_aux_edge(GD_rn(g), u, margin + ND_lw(u), 0); break; } } } for (c = 1; c <= GD_n_cluster(g); c++) keepout_othernodes((Agraph_s) GD_clust(g).plus(c).getPtr()); } finally { LEAVING("73cdgjl47ohty2va766evbo4","keepout_othernodes"); } } //3 c734mx1638sfqtl7vh7itaxyx // static void contain_subclust(graph_t * g) public static void contain_subclust(Agraph_s g) { ENTERING("c734mx1638sfqtl7vh7itaxyx","contain_subclust"); try { int margin, c; Agraph_s subg; margin = late_int (g, Z.z().G_margin, 8, 0); make_lrvn(g); for (c = 1; c <= GD_n_cluster(g); c++) { subg = (Agraph_s) GD_clust(g).plus(c).getPtr(); make_lrvn(subg); make_aux_edge(GD_ln(g), GD_ln(subg), margin + GD_border(g).plus(3).getStruct().getDouble("x"), 0); make_aux_edge(GD_rn(subg), GD_rn(g), margin + GD_border(g).plus(1).getStruct().getDouble("x"), 0); contain_subclust(subg); } } finally { LEAVING("c734mx1638sfqtl7vh7itaxyx","contain_subclust"); } } //3 6oruu1p1b7kxr5moh3kmcmvr3 // static void separate_subclust(graph_t * g) public static void separate_subclust(Agraph_s g) { ENTERING("6oruu1p1b7kxr5moh3kmcmvr3","separate_subclust"); try { int i, j, margin; Agraph_s low, high; Agraph_s left, right; margin = late_int (g, Z.z().G_margin, 8, 0); for (i = 1; i <= GD_n_cluster(g); i++) make_lrvn((Agraph_s) GD_clust(g).plus(i).getPtr()); for (i = 1; i <= GD_n_cluster(g); i++) { for (j = i + 1; j <= GD_n_cluster(g); j++) { low = (Agraph_s) GD_clust(g).plus(i).getPtr(); high = (Agraph_s) GD_clust(g).plus(j).getPtr(); if (GD_minrank(low) > GD_minrank(high)) { Agraph_s temp = low; low = high; high = temp; } if (GD_maxrank(low) < GD_minrank(high)) continue; if (ND_order(GD_rank(low).plus(GD_minrank(high)).getPtr("v").plus(0).getPtr()) < ND_order(GD_rank(high).plus(GD_minrank(high)).getPtr("v").plus(0).getPtr())) { left = low; right = high; } else { left = high; right = low; } make_aux_edge(GD_rn(left), GD_ln(right), margin, 0); } separate_subclust((Agraph_s) GD_clust(g).plus(i).getPtr()); } } finally { LEAVING("6oruu1p1b7kxr5moh3kmcmvr3","separate_subclust"); } } //3 8f8gs2zivo4pnd3hmtb9g23x4 // static void pos_clusters(graph_t * g) public static void pos_clusters(Agraph_s g) { ENTERING("8f8gs2zivo4pnd3hmtb9g23x4","pos_clusters"); try { if (GD_n_cluster(g) > 0) { contain_clustnodes(g); keepout_othernodes(g); contain_subclust(g); separate_subclust(g); } } finally { LEAVING("8f8gs2zivo4pnd3hmtb9g23x4","pos_clusters"); } } //3 fywsxto7yvl5wa2dfu7u7jj1 // static void compress_graph(graph_t * g) public static void compress_graph(Agraph_s g) { ENTERING("fywsxto7yvl5wa2dfu7u7jj1","compress_graph"); try { double x; pointf p = (pointf) Memory.malloc(pointf.class); if (GD_drawing(g).getInt("ratio_kind") != enumAsInt(ratio_t.class, "R_COMPRESS")) return; UNSUPPORTED("79oeaf0u32si2chjcpas5whjl"); // p = GD_drawing(g)->size; UNSUPPORTED("6a2ue1i6kvwvpgapb4z8l27jn"); // if (p.x * p.y <= 1) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("5f3k9yz6btwxc8r5t8exytqqt"); // contain_nodes(g); UNSUPPORTED("4mvbrmj6dfhaz3burnpac7zsx"); // if (GD_flip(g) == 0) UNSUPPORTED("dzkztznjq2andjnjzqh8i5tij"); // x = p.x; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("ddzjdkqij3y4gq9i3hikpoqvj"); // x = p.y; UNSUPPORTED("e1xij2jh66kyaiikenemo1qza"); // /* Guard against huge size attribute since max. edge length is USHRT_MAX UNSUPPORTED("5ilmnsqirjhzn5q6s3f9pkgi3"); // * A warning might be called for. Also, one could check that the graph UNSUPPORTED("1nhxkt9jijvhw5gsp2pluh8g8"); // * already fits GD_drawing(g)->size and return immediately. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("dkqac1chvtsaao23vr43xqs5r"); // x = MIN(x,USHRT_MAX); UNSUPPORTED("5es2j3xrdatvha5uea2wlqcxp"); // make_aux_edge(GD_ln(g), GD_rn(g), x, 1000); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("fywsxto7yvl5wa2dfu7u7jj1","compress_graph"); } } //3 b7y0htx4svbhaqb1a12dihlue // static void create_aux_edges(graph_t * g) public static void create_aux_edges(Agraph_s g) { ENTERING("b7y0htx4svbhaqb1a12dihlue","create_aux_edges"); try { allocate_aux_edges(g); make_LR_constraints(g); make_edge_pairs(g); pos_clusters(g); compress_graph(g); } finally { LEAVING("b7y0htx4svbhaqb1a12dihlue","create_aux_edges"); } } //3 euzeilq92ry8a4tcrij5s52t5 // static void remove_aux_edges(graph_t * g) public static void remove_aux_edges(Agraph_s g) { ENTERING("euzeilq92ry8a4tcrij5s52t5","remove_aux_edges"); try { int i; Agnode_s n, nnext, nprev; Agedge_s e; for (n = GD_nlist(g); n!=null; n = ND_next(n)) { for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++) { Memory.free(e.getStruct("base").getPtr("data")); Memory.free(e); } free_list(ND_out(n)); free_list(ND_in(n)); ND_out(n, ND_save_out(n)); ND_in(n, ND_save_in(n)); } /* cannot be merged with previous loop */ nprev = null; for (n = GD_nlist(g); n!=null; n = nnext) { nnext = ND_next(n); if (ND_node_type(n) == 2) { if (nprev!=null) ND_next(nprev, nnext); else GD_nlist(g, nnext); Memory.free(n.getStruct("base").getPtr("data")); Memory.free(n); } else nprev = n; } ND_prev(GD_nlist(g), null); } finally { LEAVING("euzeilq92ry8a4tcrij5s52t5","remove_aux_edges"); } } //3 1oobmglea9t819y95xeel37h8 // static void set_xcoords(graph_t * g) public static void set_xcoords(Agraph_s g) { ENTERING("1oobmglea9t819y95xeel37h8","set_xcoords"); try { int i, j; Agnode_s v; __ptr__ rank = GD_rank(g); for (i = GD_minrank(g); i <= GD_maxrank(g); i++) { for (j = 0; j < rank.plus(i).getInt("n"); j++) { v = (Agnode_s) rank.plus(i).getArrayOfPtr("v").plus(j).getPtr(); ND_coord(v).x = ND_rank(v); ND_rank(v, i); } } } finally { LEAVING("1oobmglea9t819y95xeel37h8","set_xcoords"); } } //3 6mip7s1k9xt9tp6x6nnsbt34p // static void adjustSimple(graph_t * g, int delta, int margin_total) public static Object adjustSimple(Object... arg) { UNSUPPORTED("6b5zs45snahyh3bzod53vasjx"); // static void adjustSimple(graph_t * g, int delta, int margin_total) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4dxxcgj8emjoyp2vlrcw5xmwl"); // int r, bottom, deltop, delbottom; UNSUPPORTED("6i5o0pm41tgebv48wcngsxwqd"); // graph_t *root = dot_root(g); UNSUPPORTED("2clvms28da6dp56nhcz1fw6l8"); // rank_t *rank = GD_rank(root); UNSUPPORTED("3fkjf35jwcy291suh6fv3lnu"); // int maxr = GD_maxrank(g); UNSUPPORTED("be5w8b0upg8swanznmjl6ml56"); // int minr = GD_minrank(g); UNSUPPORTED("enzyy8zeeg6bsgsuwm86u5bwb"); // bottom = (delta+1) / 2; UNSUPPORTED("9jp6b6z7el15spss761fh4rgx"); // delbottom = GD_ht1(g) + bottom - (rank[maxr].ht1 - margin_total); UNSUPPORTED("ckra1b9nceo8q21bwo5iu3rap"); // if (delbottom > 0) { UNSUPPORTED("3jotxrk6oermksl3is78mj0e2"); // for (r = maxr; r >= minr; r--) { UNSUPPORTED("b905w55w58349wk9aktevaljm"); // if (rank[r].n > 0) UNSUPPORTED("bjuzvkc8hhlni54hkaef0j0xa"); // ND_coord(rank[r].v[0]).y += delbottom; UNSUPPORTED("e9yhkch195gia8gdiu6vb4rbn"); // } UNSUPPORTED("bdmop8bk7tvltc7z16xj07kqn"); // deltop = GD_ht2(g) + (delta-bottom) + delbottom - (rank[minr].ht2 - margin_total); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("cw3vv20i8np95bafexnuhhpdg"); // deltop = GD_ht2(g) + (delta-bottom) - (rank[minr].ht2 - margin_total); UNSUPPORTED("49prm57gvpenehfkcxz9xuxu4"); // if (deltop > 0) { UNSUPPORTED("axexjgvfow9k3x1l6j2my6cd"); // for (r = minr-1; r >= GD_minrank(root); r--) { UNSUPPORTED("b905w55w58349wk9aktevaljm"); // if (rank[r].n > 0) UNSUPPORTED("1nebaz06hwqknqrqcnwf03z2"); // ND_coord(rank[r].v[0]).y += deltop; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7o49wizb9vp55xhz88lycavep"); // GD_ht2(g) += (delta - bottom); UNSUPPORTED("4mq1sot7a9bxpobj9602hyyl5"); // GD_ht1(g) += bottom; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9sv968rni5moio662r9kjzai3 // static void adjustRanks(graph_t * g, int margin_total) public static Object adjustRanks(Object... arg) { UNSUPPORTED("47ywar141vmwjartmboxs38cz"); // static void adjustRanks(graph_t * g, int margin_total) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cbyzaxb8pmtp6lo2y4tajk45s"); // double lht; /* label height */ UNSUPPORTED("3r7yt838qvvliagprkv30uka1"); // double rht; /* height between top and bottom ranks */ UNSUPPORTED("n5e6qzpiyv4zvlemheyvbky7"); // int maxr, minr, margin; UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c; UNSUPPORTED("7p11k11wgq46szos3u4lfa5a4"); // double delta, ht1, ht2; UNSUPPORTED("39w5issxrjmte1dn2qnt8gpbj"); // rank_t *rank = GD_rank(dot_root(g)); UNSUPPORTED("aerooskq9gwysw6euktdqjmaq"); // if (g == dot_root(g)) UNSUPPORTED("8tm7x791luf0uq7v2q53kfuqk"); // margin = 0; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("182pb9igel0aoytgtoiguek4x"); // margin = late_int (g, G_margin, 8, 0); UNSUPPORTED("8bcey7cvczgf3t3ominh7ye1b"); // ht1 = GD_ht1(g); UNSUPPORTED("1ac5605x86vam4z4spx361rpd"); // ht2 = GD_ht2(g); UNSUPPORTED("99d9j6m0161wdv2tu4wbf3ifi"); // for (c = 1; c <= GD_n_cluster(g); c++) { UNSUPPORTED("6wacplh886lzcey0jjkfo5jcn"); // graph_t *subg = GD_clust(g)[c]; UNSUPPORTED("6jkyxr322md2frf0pic57ak6e"); // adjustRanks(subg, margin+margin_total); UNSUPPORTED("41b09kckthwa070wznf9tneej"); // if (GD_maxrank(subg) == GD_maxrank(g)) UNSUPPORTED("7gbj2fwymn5k7pywbjc1kbhmb"); // ht1 = MAX(ht1, GD_ht1(subg) + margin); UNSUPPORTED("clsf4pg9bdlkzghw3oq7fpo7c"); // if (GD_minrank(subg) == GD_minrank(g)) UNSUPPORTED("9vmpt65t8kavsz1zoorcr5ik"); // ht2 = MAX(ht2, GD_ht2(subg) + margin); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9lx88c3pk4z5zxca5orq7v2yf"); // GD_ht1(g) = ht1; UNSUPPORTED("2p0gs3kpty9mg9ymk70kjekh0"); // GD_ht2(g) = ht2; UNSUPPORTED("34p29mvxtmpuzcgzh4s03lixs"); // if ((g != dot_root(g)) && GD_label(g)) { UNSUPPORTED("ak9x1j2bu2d8zr8tls942u42r"); // lht = MAX(GD_border(g)[3].y, GD_border(g)[1].y); UNSUPPORTED("ehkev01oc7ynzwkbjbzclaqj6"); // maxr = GD_maxrank(g); UNSUPPORTED("2906nnve3dmqroo2jsq13wfex"); // minr = GD_minrank(g); UNSUPPORTED("8s9tksg226ob1ti8o5ljo1gbg"); // rht = ND_coord(rank[minr].v[0]).y - ND_coord(rank[maxr].v[0]).y; UNSUPPORTED("b0dxtg7jama7mgqccujsbb97n"); // delta = lht - (rht + ht1 + ht2); UNSUPPORTED("bfapr2l9berlmq4ubgk0zp7qf"); // if (delta > 0) { UNSUPPORTED("3zllny0pp0nf7gzw7829oqexo"); // adjustSimple(g, delta, margin_total); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a86aoq62oyhhkqpyzz0um3pvq"); // /* update the global ranks */ UNSUPPORTED("1pmq9pca155672xcv1ow2cbfy"); // if (g != dot_root(g)) { UNSUPPORTED("1kgp3b6qifeit9n2i2k8oc8qv"); // rank[GD_minrank(g)].ht2 = MAX(rank[GD_minrank(g)].ht2, GD_ht2(g)); UNSUPPORTED("8f7gccnlt6m8v3k1ijaznaew3"); // rank[GD_maxrank(g)].ht1 = MAX(rank[GD_maxrank(g)].ht1, GD_ht1(g)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 emtrqv582hdma5aajqtjd76m1 // static int clust_ht(Agraph_t * g) public static int clust_ht(Agraph_s g) { ENTERING("emtrqv582hdma5aajqtjd76m1","clust_ht"); try { int c; double ht1, ht2; Agraph_s subg; __ptr__ rank = GD_rank(dot_root(g)); int margin, haveClustLabel = 0; if (EQ(g, dot_root(g))) margin = 8; else margin = late_int (g, Z.z().G_margin, 8, 0); ht1 = GD_ht1(g); ht2 = GD_ht2(g); /* account for sub-clusters */ for (c = 1; c <= GD_n_cluster(g); c++) { subg = (Agraph_s) GD_clust(g).plus(c).getPtr(); haveClustLabel |= clust_ht(subg); if (GD_maxrank(subg) == GD_maxrank(g)) ht1 = MAX(ht1, GD_ht1(subg) + margin); if (GD_minrank(subg) == GD_minrank(g)) ht2 = MAX(ht2, GD_ht2(subg) + margin); } /* account for a possible cluster label in clusters */ /* room for root graph label is handled in dotneato_postprocess */ if (NEQ(g, dot_root(g)) && GD_label(g)!=null) { haveClustLabel = 1; if (N(GD_flip(agroot(g)))) { ht1 += GD_border(g).plus(0).getDouble("y"); ht2 += GD_border(g).plus(2).getDouble("y"); } } GD_ht1(g, ht1); GD_ht2(g, ht2); /* update the global ranks */ if (NEQ(g, dot_root(g))) { rank.plus(GD_minrank(g)).setDouble("ht2", MAX(rank.plus(GD_minrank(g)).getDouble("ht2"), ht2)); rank.plus(GD_maxrank(g)).setDouble("ht1", MAX(rank.plus(GD_maxrank(g)).getDouble("ht1"), ht1)); } return haveClustLabel; } finally { LEAVING("emtrqv582hdma5aajqtjd76m1","clust_ht"); } } //3 bp8vmol4ncadervcfossysdtd // static void set_ycoords(graph_t * g) public static void set_ycoords(Agraph_s g) { ENTERING("bp8vmol4ncadervcfossysdtd","set_ycoords"); try { int i, j, r; double ht2, maxht, delta, d0, d1; Agnode_s n; Agedge_s e; __ptr__ rank = GD_rank(g); Agraph_s clust; int lbl; ht2 = maxht = 0; /* scan ranks for tallest nodes. */ for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { for (i = 0; i < rank.plus(r).getInt("n"); i++) { n = (Agnode_s) rank.plus(r).getArrayOfPtr("v").plus(i).getPtr(); /* assumes symmetry, ht1 = ht2 */ ht2 = ND_ht(n) / 2; /* have to look for high self-edge labels, too */ if (ND_other(n).listNotNull()) for (j = 0; (e = (Agedge_s) ND_other(n).getFromList(j))!=null; j++) { if (EQ(agtail(e), aghead(e))) { if (ED_label(e)!=null) ht2 = MAX(ht2, ED_label(e).getStruct("dimen").getDouble("y") / 2); } } /* update global rank ht */ if (rank.plus(r).getDouble("pht2") < ht2) { rank.plus(r).setDouble("ht2", ht2); rank.plus(r).setDouble("pht2", ht2); } if (rank.plus(r).getDouble("pht1") < ht2) { rank.plus(r).setDouble("ht1", ht2); rank.plus(r).setDouble("pht1", ht2); } /* update nearest enclosing cluster rank ht */ if ((clust = ND_clust(n))!=null) { int yoff = (clust == g ? 0 : late_int (clust, Z.z().G_margin, 8, 0)); if (ND_rank(n) == GD_minrank(clust)) GD_ht2(clust, MAX(GD_ht2(clust), ht2 + yoff)); if (ND_rank(n) == GD_maxrank(clust)) GD_ht1(clust, MAX(GD_ht1(clust), ht2 + yoff)); } } } /* scan sub-clusters */ lbl = clust_ht(g); /* make the initial assignment of ycoords to leftmost nodes by ranks */ maxht = 0; r = GD_maxrank(g); (ND_coord(rank.plus(r).getArrayOfPtr("v").plus(0).getPtr())).setDouble("y", rank.plus(r).getDouble("ht1")); while (--r >= GD_minrank(g)) { d0 = rank.plus(r + 1).getDouble("pht2") + rank.plus(r).getDouble("pht1") + GD_ranksep(g); /* prim node sep */ d1 = rank.plus(r + 1).getDouble("ht2") + rank.plus(r).getDouble("ht1") + 8; /* cluster sep */ delta = MAX(d0, d1); if (rank.plus(r).getInt("n") > 0) /* this may reflect some problem */ (ND_coord(rank.plus(r).getArrayOfPtr("v").plus(0).getPtr())).setDouble("y", (ND_coord(rank.plus(r + 1).getArrayOfPtr("v").plus(0).getPtr())).getDouble("y") + delta); maxht = MAX(maxht, delta); } /* If there are cluster labels and the drawing is rotated, we need special processing to * allocate enough room. We use adjustRanks for this, and then recompute the maxht if * the ranks are to be equally spaced. This seems simpler and appears to work better than * handling equal spacing as a special case. */ if (lbl!=0 && GD_flip(g)!=0) { UNSUPPORTED("bxjqk5nu40mwo1156dicr9tur"); // adjustRanks(g, 0); UNSUPPORTED("6vy9qfed3u61pmvy12724s9l4"); // if (GD_exact_ranksep(g)) { /* recompute maxht */ UNSUPPORTED("74f5n6u4x39ngn0gsan7fgzyr"); // maxht = 0; UNSUPPORTED("2pd9g1n9b0746fgt892degls3"); // r = GD_maxrank(g); UNSUPPORTED("8dils3hlxottsbf2iuapvhqeq"); // d0 = (ND_coord(rank[r].v[0])).y; UNSUPPORTED("cw5accmrcan3lqfc789udgcka"); // while (--r >= GD_minrank(g)) { UNSUPPORTED("6bxo7bknt38qh9t31zr7p6kie"); // d1 = (ND_coord(rank[r].v[0])).y; UNSUPPORTED("b1ta7vjm5i7swyklhfwy27w35"); // delta = d1 - d0; UNSUPPORTED("65l8hg0imd48bfdu614k2kylt"); // maxht = MAX(maxht, delta); UNSUPPORTED("5irf6cp6xdzi2ik033azsbauo"); // d0 = d1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } } /* re-assign if ranks are equally spaced */ if (GD_exact_ranksep(g)!=0) { UNSUPPORTED("cyxbyjrdzywkc46nl8lkrngai"); // for (r = GD_maxrank(g) - 1; r >= GD_minrank(g); r--) UNSUPPORTED("5sd5ltavyp6llt0t2t0xmqwj5"); // if (rank[r].n > 0) /* this may reflect the same problem :-() */ UNSUPPORTED("5zoeqpznt31feqxjcx2rg0o1f"); // (ND_coord(rank[r].v[0])).y= UNSUPPORTED("e6dfx5uesysjaefb0djyfp7f"); // (ND_coord(rank[r + 1].v[0])).y + maxht; } /* copy ycoord assignment from leftmost nodes to others */ for (n = GD_nlist(g); n!=null; n = ND_next(n)) ND_coord(n).y = ND_coord(rank.plus(ND_rank(n)).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y"); } finally { LEAVING("bp8vmol4ncadervcfossysdtd","set_ycoords"); } } //3 9ay2xnnmh407i32pfokujfda5 //static void dot_compute_bb(graph_t * g, graph_t * root) public static void dot_compute_bb(Agraph_s g, Agraph_s root) { ENTERING("9ay2xnnmh407i32pfokujfda5","dot_compute_bb"); try { int r, c; double x, offset; Agnode_s v; final ST_pointf LL = new ST_pointf(); final ST_pointf UR = new ST_pointf(); if (EQ(g, dot_root(g))) { LL.x = INT_MAX; UR.x = -((double)INT_MAX); for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { int rnkn = GD_rank(g).plus(r).getInt("n"); if (rnkn == 0) continue; if ((v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr()) == null) continue; for (c = 1; (ND_node_type(v) != 0) && c < rnkn; c++) v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(c).getPtr(); if (ND_node_type(v) == 0) { x = ND_coord(v).getDouble("x") - ND_lw(v); LL.setDouble("x", MIN(LL.getDouble("x"), x)); } else continue; /* At this point, we know the rank contains a NORMAL node */ v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(rnkn - 1).getPtr(); for (c = rnkn-2; ND_node_type(v) != 0; c--) v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(c).getPtr(); x = ND_coord(v).getDouble("x") + ND_rw(v); UR.x = MAX(UR.getDouble("x"), x); } offset = 8; for (c = 1; c <= GD_n_cluster(g); c++) { x = (double)(GD_bb(GD_clust(g).plus(c)).LL.x - offset); LL.x = MIN(LL.getDouble("x"), x); x = (double)(GD_bb(GD_clust(g).plus(c)).UR.x + offset); UR.x = MAX(UR.getDouble("x"), x); } } else { LL.x = (double)(ND_rank(GD_ln(g))); UR.x = (double)(ND_rank(GD_rn(g))); } LL.y = ND_coord(GD_rank(root).plus(GD_maxrank(g)).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y") - GD_ht1(g); UR.y = ND_coord(GD_rank(root).plus(GD_minrank(g)).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y") + GD_ht2(g); GD_bb(g).setStruct("LL", LL); GD_bb(g).setStruct("UR", UR); } finally { LEAVING("9ay2xnnmh407i32pfokujfda5","dot_compute_bb"); } } //3 dlbpiimh9g9ff9w7wjoabf817 // static void rec_bb(graph_t * g, graph_t * root) public static void rec_bb(Agraph_s g, Agraph_s root) { ENTERING("dlbpiimh9g9ff9w7wjoabf817","rec_bb"); try { int c; for (c = 1; c <= GD_n_cluster(g); c++) rec_bb((Agraph_s) GD_clust(g).plus(c).getPtr(), root); dot_compute_bb(g, root); } finally { LEAVING("dlbpiimh9g9ff9w7wjoabf817","rec_bb"); } } //3 2p3nacev7k2jft9xov90nke50 // static void scale_bb(graph_t * g, graph_t * root, double xf, double yf) public static Object scale_bb(Object... arg) { UNSUPPORTED("9zkkf6x8cj12vuzqrjaoxfn8s"); // static void scale_bb(graph_t * g, graph_t * root, double xf, double yf) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c; UNSUPPORTED("7z5fb6iyowsosn1hiz7opeoc6"); // for (c = 1; c <= GD_n_cluster(g); c++) UNSUPPORTED("7leh3r5v7roon4liia73wue7e"); // scale_bb(GD_clust(g)[c], root, xf, yf); UNSUPPORTED("duz0iqmos1i372cztpjtsemab"); // GD_bb(g).LL.x *= xf; UNSUPPORTED("ja25041s2x99bhwj5wcliok0"); // GD_bb(g).LL.y *= yf; UNSUPPORTED("7mpnp4j7m1ymn1zdbxzeh5xxd"); // GD_bb(g).UR.x *= xf; UNSUPPORTED("4ahigy1a10wsl6lvc90lpax5e"); // GD_bb(g).UR.y *= yf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 53z9yhpfixulhgqsauulkllvc // static void adjustAspectRatio (graph_t* g, aspect_t* asp) public static Object adjustAspectRatio(Object... arg) { UNSUPPORTED("ezldb6r0csirv1fmkq5itw1v2"); // static void adjustAspectRatio (graph_t* g, aspect_t* asp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7rtldqefvdgcf4u50kulbxtvn"); // double AR = (GD_bb(g).UR.x - GD_bb(g).LL.x)/(GD_bb(g).UR.y - GD_bb(g).LL.y); UNSUPPORTED("cve2on8gll5i0vomy8lnwhai2"); // if (Verbose) { UNSUPPORTED("6z0q1m3yc6o11ejsa59eghqag"); // fprintf(stderr, "AR=%0.4lf\t Area= %0.4lf\t", AR, (double)(GD_bb(g).UR.x - GD_bb(g).LL.x)*(GD_bb(g).UR.y - GD_bb(g).LL.y)/10000.0); UNSUPPORTED("2uealcdkjdgg8ne1cijkbagpu"); // fprintf(stderr, "Dummy=%d\n", countDummyNodes(g)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("96mqnzcfbfghxkxkn1x8kdh8i"); // if (AR > 1.1*asp->targetAR) { UNSUPPORTED("6gq7uj15zh138zyae50c8nh2z"); // asp->nextIter = (int)(asp->targetAR * (double)(asp->curIterations - asp->prevIterations)/(AR)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e1443w2cx49ogpsf5m59zy4fq"); // else if (AR <= 0.8 * asp->targetAR) { UNSUPPORTED("5awa0x1pxpta5wou27bzrtvoc"); // asp->nextIter = -1; UNSUPPORTED("5xdo0sx20rmxgmdkrm1giaige"); // if (Verbose) UNSUPPORTED("du5ztjo6nfo54ailmk1tqs05b"); // fprintf(stderr, "Going to apply another expansion.\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("757eq4638npmb5w5e39iemxfo"); // asp->nextIter = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); // if (Verbose) UNSUPPORTED("29wdml7g4931q8kgah8hgwjd0"); // fprintf(stderr, "next#iter=%d\n", asp->nextIter); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7effq6z6ur101wrch6ttozr26 // static void set_aspect(graph_t * g, aspect_t* asp) public static void set_aspect(Agraph_s g, aspect_t asp) { ENTERING("7effq6z6ur101wrch6ttozr26","set_aspect"); try { double xf = 0.0, yf = 0.0, actual, desired; Agnode_s n; boolean scale_it, filled; point sz = (point) Memory.malloc(point.class); rec_bb(g, g); if ((GD_maxrank(g) > 0) && (GD_drawing(g).getInt("ratio_kind")!=0)) { UNSUPPORTED("5wbmy4x78flo2ztfabki9lyjf"); // sz.x = GD_bb(g).UR.x - GD_bb(g).LL.x; UNSUPPORTED("catd6eu5oc282ln95k9zz52f3"); // sz.y = GD_bb(g).UR.y - GD_bb(g).LL.y; /* normalize */ UNSUPPORTED("21zvq2qx1j34j1i1879zyhzpj"); // if (GD_flip(g)) { UNSUPPORTED("d55uzald1tvs7xodnua67pxv6"); // int t = sz.x; UNSUPPORTED("47s1klx0pfzda4e311w53ou7e"); // sz.x = sz.y; UNSUPPORTED("3tx1mj7j0rqw33y24a0gu4ali"); // sz.y = t; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4ct8ztqxnsskgphsp1v3aw5ec"); // scale_it = NOT(0); UNSUPPORTED("8v772n1u4wqlmskqfswlzcz2o"); // if (GD_drawing(g)->ratio_kind == R_AUTO) UNSUPPORTED("8mtmgag5dxj8ttlcabbpd865p"); // filled = idealsize(g, .5); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("bxtk5e5ls8qsd36eucvhufg9y"); // filled = (GD_drawing(g)->ratio_kind == R_FILL); UNSUPPORTED("2atgu691bmn6h9jvk8lve5qzc"); // if (filled) { UNSUPPORTED("1zx5etcjofceqjvogfn8urkdj"); // /* fill is weird because both X and Y can stretch */ UNSUPPORTED("7ezqjon4u21dwg4qvxssrnwfc"); // if (GD_drawing(g)->size.x <= 0) UNSUPPORTED("dao0fnoi65upcdtr9csqhhy41"); // scale_it = 0; UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("6ifkww34s7php908n9wg0oiju"); // xf = (double) GD_drawing(g)->size.x / (double) sz.x; UNSUPPORTED("6faiikvxwdge2ydblv90976hb"); // yf = (double) GD_drawing(g)->size.y / (double) sz.y; UNSUPPORTED("5xkzvdrdnfd5afhhxgajbywya"); // if ((xf < 1.0) || (yf < 1.0)) { UNSUPPORTED("cvkvyq93xp1itpomhj1r2xlzy"); // if (xf < yf) { UNSUPPORTED("capfpf4tncicsp81elmwvf0l"); // yf = yf / xf; UNSUPPORTED("7sdzyzqj65rbq6edfgf5x6xht"); // xf = 1.0; UNSUPPORTED("d86r93g8nz9a1kfzgi7f8j8nh"); // } else { UNSUPPORTED("emwaipsi6kyqbpk2y26k3cxfw"); // xf = xf / yf; UNSUPPORTED("1s91x56ftedjsc3m32dqgspqn"); // yf = 1.0; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("c48w89y9jw5baxqqucmiyfha7"); // } else if (GD_drawing(g)->ratio_kind == R_EXPAND) { UNSUPPORTED("7ezqjon4u21dwg4qvxssrnwfc"); // if (GD_drawing(g)->size.x <= 0) UNSUPPORTED("dao0fnoi65upcdtr9csqhhy41"); // scale_it = 0; UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("akfs904fsk7cyl8wbv0x7fnvz"); // xf = (double) GD_drawing(g)->size.x / UNSUPPORTED("1ewqbc4kglc2kg1n13euxrxzh"); // (double) GD_bb(g).UR.x; UNSUPPORTED("6fmkpg9ypaxceugi24gklvdra"); // yf = (double) GD_drawing(g)->size.y / UNSUPPORTED("8mskb0mqou89myfbiihsjpbg6"); // (double) GD_bb(g).UR.y; UNSUPPORTED("a2jzgqbpoanzqdqc7vjk32vmz"); // if ((xf > 1.0) && (yf > 1.0)) { UNSUPPORTED("6np8qfg5qnlaypikhw0bdx84j"); // double scale = MIN(xf, yf); UNSUPPORTED("272bmuv1row7l9tla5bhot840"); // xf = yf = scale; UNSUPPORTED("738mi6h8ef0itznt34ngxe25o"); // } else UNSUPPORTED("b5qs3ho2fcywk3sd5cw3m88kw"); // scale_it = 0; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("d7deewhp6akdb13j7ry364hbd"); // } else if (GD_drawing(g)->ratio_kind == R_VALUE) { UNSUPPORTED("fpejwrlknxizaxxibhuyaxdt"); // desired = GD_drawing(g)->ratio; UNSUPPORTED("douwz2voka0puoeooqjn8kijk"); // actual = ((double) sz.y) / ((double) sz.x); UNSUPPORTED("7u9yvuqazzo19geppiphd9rfh"); // if (actual < desired) { UNSUPPORTED("apqq3m2rezfl96zbvk7lut02"); // yf = desired / actual; UNSUPPORTED("8po0oizki4figodjv9xku16gq"); // xf = 1.0; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("84c3pp9xgnii11clyyxblqmy6"); // xf = actual / desired; UNSUPPORTED("1tr1b9rp1b00pcafss87kadfe"); // yf = 1.0; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6to1esmb8qfrhzgtr7jdqleja"); // } else UNSUPPORTED("csvnhx5mo535o6ue1tg3ktjhs"); // scale_it = 0; UNSUPPORTED("bh2d68e9s7cr7k1bl0h9fmr9a"); // if (scale_it) { UNSUPPORTED("b8symsgdtoq84y3j1151pv0g4"); // if (GD_flip(g)) { UNSUPPORTED("bi983gfofc0blj8r4yetj14kb"); // double t = xf; UNSUPPORTED("69pmocxfvmk0urni4fg0x4na5"); // xf = yf; UNSUPPORTED("cyt895z1pa5arxz4d1kv0hqgq"); // yf = t; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("crtcqz91ff5l8ntjbne40b5x4"); // for (n = GD_nlist(g); n; n = ND_next(n)) { UNSUPPORTED("brs6nych5z9m0a75ixbe5l80o"); // ND_coord(n).x = ROUND(ND_coord(n).x * xf); UNSUPPORTED("cpe0pjsilppgrp2ofysn4y54w"); // ND_coord(n).y = ROUND(ND_coord(n).y * yf); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("8f0d3etdet1pk8ikvltmz5h2s"); // scale_bb(g, g, xf, yf); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } } if (asp!=null) adjustAspectRatio (g, asp); } finally { LEAVING("7effq6z6ur101wrch6ttozr26","set_aspect"); } } //3 41mmud7cyx1rwhd0k7g7weaf8 // static point resize_leaf(node_t * leaf, point lbound) public static Object resize_leaf(Object... arg) { UNSUPPORTED("alcqddrml4aj55twvzwyyvfjh"); // static point resize_leaf(node_t * leaf, point lbound) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dnj5vqe4cb2yzzx75ubwrxvav"); // gv_nodesize(leaf, GD_flip(agraphof(leaf))); UNSUPPORTED("bxig9t3r62l84xejntt3x96kv"); // ND_coord(leaf).y = lbound.y; UNSUPPORTED("bx00ps5hied5a63922sqqpvhi"); // ND_coord(leaf).x = lbound.x + ND_lw(leaf); UNSUPPORTED("euhijhn76fi66yqoh8gxk5nq0"); // lbound.x = lbound.x + ND_lw(leaf) + ND_rw(leaf) + GD_nodesep(agraphof(leaf)); UNSUPPORTED("1xmj5l8g8znua01mljujyh61i"); // return lbound; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4jx34mwc4aby8v45omelmfluv // static point place_leaf(graph_t* ing, node_t * leaf, point lbound, int order) public static Object place_leaf(Object... arg) { UNSUPPORTED("cetlk9m8mjd69vuru3rjho0lw"); // static point place_leaf(graph_t* ing, node_t * leaf, point lbound, int order) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b1ht34ftmnpsuxflrqun4ptkr"); // node_t *leader; UNSUPPORTED("aqfu9qyb55o3lehhaqmxag540"); // graph_t *g = dot_root(ing); UNSUPPORTED("1b5u4ut4j70lu60geogmkv572"); // leader = UF_find(leaf); UNSUPPORTED("3urvo2e4w7312r8scg44o0hqw"); // if (leaf != leader) UNSUPPORTED("azdkjz4shu49j3fzjpazxrpwz"); // fast_nodeapp(leader, leaf); UNSUPPORTED("95h5y689udztblrtgdwc8y2ei"); // ND_order(leaf) = order; UNSUPPORTED("cvsh6pf3vxzxd2zn1u8ykd8hx"); // ND_rank(leaf) = ND_rank(leader); UNSUPPORTED("6k8r94a4chbol18r2rnbi9haj"); // GD_rank(g)[ND_rank(leaf)].v[ND_order(leaf)] = leaf; UNSUPPORTED("7ku2dbhi28rhi6dtag1v4zung"); // return resize_leaf(leaf, lbound); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1lejhh3evsa10auyj7cgqj8ub // static void make_leafslots(graph_t * g) public static void make_leafslots(Agraph_s g) { ENTERING("1lejhh3evsa10auyj7cgqj8ub","make_leafslots"); try { int i, j, r; Agnode_s v; for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { j = 0; for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) { v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr(); ND_order(v, j); if (ND_ranktype(v) == 6) j = j + ND_UF_size(v); else j++; } if (j <= GD_rank(g).plus(r).getInt("n")) continue; GD_rank(g).plus(r).setPtr("v", ALLOC_empty(j + 1, GD_rank(g).plus(r).getPtr("v"), Agnode_s.class)); for (i = GD_rank(g).plus(r).getInt("n") - 1; i >= 0; i--) { v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr(); GD_rank(g).plus(r).getArrayOfPtr("v").plus(ND_order(v)).setPtr(v); } GD_rank(g).plus(r).setInt("n", j); GD_rank(g).plus(r).getArrayOfPtr("v").plus(j).setPtr(null); } } finally { LEAVING("1lejhh3evsa10auyj7cgqj8ub","make_leafslots"); } } //3 wb2wvxthkr2sp9u8113go3j3 // static void do_leaves(graph_t * g, node_t * leader) public static Object do_leaves(Object... arg) { UNSUPPORTED("5nmyuqyhfqfwbmgdj5aot9fp4"); // static void do_leaves(graph_t * g, node_t * leader) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2bs0wcp6367dz1o5x166ec7l8"); // int j; UNSUPPORTED("4bxv0pw87c31sbbz6x6s1cq9d"); // point lbound; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("b9upgllg8zjx49090hr3afv91"); // if (ND_UF_size(leader) <= 1) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("9m0hiwybw3dr0lcxmgq833heo"); // lbound.x = ND_coord(leader).x - ND_lw(leader); UNSUPPORTED("ev0phf24gpqz3xtvtueq72f7g"); // lbound.y = ND_coord(leader).y; UNSUPPORTED("90r9xqe4faj7b1g8907ord1x3"); // lbound = resize_leaf(leader, lbound); UNSUPPORTED("66ue8mvk3axhgbkcg3xqo94tb"); // if (ND_out(leader).size > 0) { /* in-edge leaves */ UNSUPPORTED("9lq5udq73fgfeqyqsxw6i3pgm"); // n = aghead(ND_out(leader).list[0]); UNSUPPORTED("4vp9ny4udt1jcmibfgpwgrnqo"); // j = ND_order(leader) + 1; UNSUPPORTED("3ml0tasns5tz6d5xc2xdb6nc"); // for (e = agfstin(g, n); e; e = agnxtin(g, e)) { UNSUPPORTED("e2y71fdc15yxylowp6ohlal9a"); // edge_t *e1 = AGMKOUT(e); UNSUPPORTED("ew4udmdawt257gbk5kzmi1n1"); // if ((agtail(e1) != leader) && (UF_find(agtail(e1)) == leader)) { UNSUPPORTED("d2r94m7xk4qa9hn6s2td5nb6h"); // lbound = place_leaf(g, agtail(e1), lbound, j++); UNSUPPORTED("5xk9d4ra447xucksge6c9mgos"); // unmerge_oneway(e1); UNSUPPORTED("4dqun0n52lcyerkebva2hxh15"); // elist_append(e1, ND_in(aghead(e1))); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6owoaz61uf3928omhuf3rqjoa"); // } else { /* out edge leaves */ UNSUPPORTED("4lbkem8hb4jy3gdg6nt3cbtl9"); // n = agtail(ND_in(leader).list[0]); UNSUPPORTED("4vp9ny4udt1jcmibfgpwgrnqo"); // j = ND_order(leader) + 1; UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("38a98cy0214odvsa98hgyce8q"); // if ((aghead(e) != leader) && (UF_find(aghead(e)) == leader)) { UNSUPPORTED("9j9o79r2bdc6npidu38aq0cym"); // lbound = place_leaf(g, aghead(e), lbound, j++); UNSUPPORTED("6wbwzuqqh5vxume7ga2kuejcf"); // unmerge_oneway(e); UNSUPPORTED("dv9vv9pfcd3cibfjn258toxyv"); // elist_append(e, ND_out(agtail(e))); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 alpljm8o6nsam95ly6leelnbp // int ports_eq(edge_t * e, edge_t * f) public static boolean ports_eq(Agedge_s e, Agedge_s f) { ENTERING("alpljm8o6nsam95ly6leelnbp","ports_eq"); try { return ((ED_head_port(e).defined == ED_head_port(f).defined) && (((ED_head_port(e).p.x == ED_head_port(f).p.x) && (ED_head_port(e).p.y == ED_head_port(f).p.y)) || (ED_head_port(e).defined == 0)) && (((ED_tail_port(e).p.x == ED_tail_port(f).p.x) && (ED_tail_port(e).p.y == ED_tail_port(f).p.y)) || (ED_tail_port(e).defined == 0)) ); } finally { LEAVING("alpljm8o6nsam95ly6leelnbp","ports_eq"); } } //3 cfotmdif5xv7n6oauyvzv0qwa // static void expand_leaves(graph_t * g) public static void expand_leaves(Agraph_s g) { ENTERING("cfotmdif5xv7n6oauyvzv0qwa","expand_leaves"); try { int i, d; Agnode_s n; Agedge_s e, f; make_leafslots(g); for (n = GD_nlist(g); n!=null; n = ND_next(n)) { if (ND_inleaf(n)!=null) do_leaves(g, ND_inleaf(n)); if (ND_outleaf(n)!=null) do_leaves(g, ND_outleaf(n)); if (ND_other(n).listNotNull()) for (i = 0; (e = (Agedge_s) ND_other(n).getFromList(i))!=null; i++) { if ((d = ND_rank(aghead(e)) - ND_rank(aghead(e))) == 0) continue; f = ED_to_orig(e); if (ports_eq(e, f) == false) { zapinlist(ND_other(n).amp(), e); if (d == 1) fast_edge(e); /*else unitize(e); ### */ i--; } } } } finally { LEAVING("cfotmdif5xv7n6oauyvzv0qwa","expand_leaves"); } } //3 d4b57ugpwxy567pfmxn14ed8d // static void make_lrvn(graph_t * g) public static void make_lrvn(Agraph_s g) { ENTERING("d4b57ugpwxy567pfmxn14ed8d","make_lrvn"); try { Agnode_s ln, rn; if (GD_ln(g)!=null) return; ln = virtual_node(dot_root(g)); ND_node_type(ln, 2); rn = virtual_node(dot_root(g)); ND_node_type(rn, 2); if (GD_label(g)!=null && NEQ(g, dot_root(g)) && N(GD_flip(agroot(g)))) { int w = MAX((int)GD_border(g).plus(0).getDouble("x"), (int)GD_border(g).plus(2).getDouble("x")); make_aux_edge(ln, rn, w, 0); } GD_ln(g, ln); GD_rn(g, rn); } finally { LEAVING("d4b57ugpwxy567pfmxn14ed8d","make_lrvn"); } } //3 daz786541idcxnywckcbncazb // static void contain_nodes(graph_t * g) public static void contain_nodes(Agraph_s g) { ENTERING("daz786541idcxnywckcbncazb","contain_nodes"); try { int margin, r; Agnode_s ln, rn, v; margin = late_int (g, Z.z().G_margin, 8, 0); make_lrvn(g); ln = GD_ln(g); rn = GD_rn(g); for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { if (GD_rank(g).plus(r).getInt("n") == 0) continue; v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr(); if (v == null) { UNSUPPORTED("1f2esoodtcrdhljk1cq1klyao"); // agerr(AGERR, "contain_nodes clust %s rank %d missing node\n", UNSUPPORTED("7w6lv4ywtczwz2y1mg0p3jdav"); // agnameof(g), r); UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; } make_aux_edge(ln, v, ND_lw(v) + margin + GD_border(g).plus(3).getStruct().getDouble("x"), 0); v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(GD_rank(g).plus(r).getInt("n") - 1).getPtr(); make_aux_edge(v, rn, ND_rw(v) + margin + GD_border(g).plus(1).getStruct().getDouble("x"), 0); } } finally { LEAVING("daz786541idcxnywckcbncazb","contain_nodes"); } } //3 betdvb8dk8icvqkn6e6y5h94x // static boolean idealsize(graph_t * g, double minallowed) public static Object idealsize(Object... arg) { UNSUPPORTED("74m5dgfkgpr7bq7elj8bk5w6z"); // static boolean idealsize(graph_t * g, double minallowed) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bp9bpmgkh2gsdynqe5wio0i32"); // double xf, yf, f, R; UNSUPPORTED("8404v5b2qtn2x2mlgbyxidbx4"); // pointf b, relpage, margin; UNSUPPORTED("a3ke28asz3w87p4n8bgil541i"); // /* try for one page */ UNSUPPORTED("avi96122npbhja9hwa4goidp"); // relpage = GD_drawing(g)->page; UNSUPPORTED("19uch6jfal0x385xni41gqam6"); // if (relpage.x < 0.001 || relpage.y < 0.001) UNSUPPORTED("52kuioyxcuboss35kg15wudvt"); // return 0; /* no page was specified */ UNSUPPORTED("d6i2metpbkzakq2abzgvcdzle"); // margin = GD_drawing(g)->margin; UNSUPPORTED("asgqm8o7cruxxpfx9lobsif1c"); // relpage = sub_pointf(relpage, margin); UNSUPPORTED("asgqm8o7cruxxpfx9lobsif1c"); // relpage = sub_pointf(relpage, margin); UNSUPPORTED("aqhjsr7rv4ig7d1vagm74jpmo"); // b.x = GD_bb(g).UR.x; UNSUPPORTED("30xemhqjxz13hiyv2o2r8mol1"); // b.y = GD_bb(g).UR.y; UNSUPPORTED("cv2s8vkuet41gdoms8vue473z"); // xf = relpage.x / b.x; UNSUPPORTED("rvfej1l4o57i17le73vt80cf"); // yf = relpage.y / b.y; UNSUPPORTED("4f2ksj9hf0fi9wnzrz20eswmo"); // if ((xf >= 1.0) && (yf >= 1.0)) UNSUPPORTED("e64anddwrzfgr4xoopjelwqg1"); // return 0; /* fits on one page */ UNSUPPORTED("9vakpuy3iri2q9upsuy7lqhln"); // f = MIN(xf, yf); UNSUPPORTED("ccu6nxd64lwxm1h8x0sbrkdv7"); // xf = yf = MAX(f, minallowed); UNSUPPORTED("yc64sd7yr28zgjqrr734fc7i"); // R = ceil((xf * b.x) / relpage.x); UNSUPPORTED("aht5rw6872hwmg7vaop0eairh"); // xf = ((R * relpage.x) / b.x); UNSUPPORTED("asw2ato73u7m4kb07x2mr2snv"); // R = ceil((yf * b.y) / relpage.y); UNSUPPORTED("76j6b15q20gswxka8cglflbym"); // yf = ((R * relpage.y) / b.y); UNSUPPORTED("49gpvau7p2bvvkp6oemyqyjev"); // GD_drawing(g)->size.x = b.x * xf; UNSUPPORTED("7gewumkvzgtqon1jqxp8yf0kk"); // GD_drawing(g)->size.y = b.y * yf; UNSUPPORTED("8fwlqtemsmckleh6946lyd8mw"); // return NOT(0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/dotgen/rank__c.java000066400000000000000000002437531312650303100215210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static gen.lib.cgraph.attr__c.agget; import static gen.lib.cgraph.edge__c.agfstout; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agnxtout; import static gen.lib.cgraph.edge__c.agsubedge; import static gen.lib.cgraph.id__c.agnameof; import static gen.lib.cgraph.node__c.agfstnode; import static gen.lib.cgraph.node__c.agnxtnode; import static gen.lib.cgraph.obj__c.agcontains; import static gen.lib.cgraph.obj__c.agdelete; import static gen.lib.cgraph.subg__c.agfstsubg; import static gen.lib.cgraph.subg__c.agnxtsubg; import static gen.lib.common.input__c.do_graph_label; import static gen.lib.common.ns__c.rank; import static gen.lib.common.utils__c.UF_find; import static gen.lib.common.utils__c.UF_singleton; import static gen.lib.common.utils__c.UF_union; import static gen.lib.common.utils__c.maptoken; import static gen.lib.dotgen.acyclic__c.acyclic_; import static gen.lib.dotgen.aspect__c.rank3; import static gen.lib.dotgen.class1__c.class1_; import static gen.lib.dotgen.decomp__c.decompose; import static gen.lib.dotgen.dotinit__c.dot_root; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.LOG2; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.strncmp; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.ED_minlen; import static smetana.core.Macro.ED_to_orig; import static smetana.core.Macro.ED_to_virt; import static smetana.core.Macro.GD_clust; import static smetana.core.Macro.GD_comp; import static smetana.core.Macro.GD_flags; import static smetana.core.Macro.GD_has_labels; import static smetana.core.Macro.GD_leader; import static smetana.core.Macro.GD_maxrank; import static smetana.core.Macro.GD_maxset; import static smetana.core.Macro.GD_minrank; import static smetana.core.Macro.GD_minset; import static smetana.core.Macro.GD_n_cluster; import static smetana.core.Macro.GD_nlist; import static smetana.core.Macro.GD_parent; import static smetana.core.Macro.GD_ranksep; import static smetana.core.Macro.GD_set_type; import static smetana.core.Macro.MAXSHORT; import static smetana.core.Macro.N; import static smetana.core.Macro.ND_clust; import static smetana.core.Macro.ND_in; import static smetana.core.Macro.ND_mark; import static smetana.core.Macro.ND_next; import static smetana.core.Macro.ND_node_type; import static smetana.core.Macro.ND_out; import static smetana.core.Macro.ND_rank; import static smetana.core.Macro.ND_ranktype; import static smetana.core.Macro.UNSUPPORTED; import static smetana.core.Macro.ZALLOC; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.aspect_t; import h.boxf; import h.elist; import h.point; import h.pointf; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Memory; import smetana.core.Z; import smetana.core.__struct__; public class rank__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3f1re3nfkhxwjjb90kppwuupr // static void renewlist(elist * L) public static void renewlist(elist L) { ENTERING("3f1re3nfkhxwjjb90kppwuupr","renewlist"); try { int i; for (i = L.getInt("size"); i >= 0; i--) L.getArrayOfPtr("list").plus(i).setPtr(null); L.setInt("size", 0); } finally { LEAVING("3f1re3nfkhxwjjb90kppwuupr","renewlist"); } } //3 1xov2qhuxj1f9nbzu3xsa6679 // static void cleanup1(graph_t * g) public static void cleanup1(Agraph_s g) { ENTERING("1xov2qhuxj1f9nbzu3xsa6679","cleanup1"); try { Agnode_s n; Agedge_s e, f; int c; for (c = 0; c < GD_comp(g).size; c++) { GD_nlist(g, GD_comp(g).getFromList(c)); for (n = GD_nlist(g); n!=null; n = ND_next(n)) { renewlist(ND_in(n).amp()); renewlist(ND_out(n).amp()); ND_mark(n, 0); } } for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) { for (e = agfstout(g, n); e!=null; e = agnxtout(g, e)) { f = ED_to_virt(e); /* Null out any other references to f to make sure we don't * handle it a second time. For example, parallel multiedges * share a virtual edge. */ if (f!=null && (EQ(e, ED_to_orig(f)))) { Agedge_s e1, f1; Agnode_s n1; for (n1 = agfstnode(g); n1!=null; n1 = agnxtnode(g, n1)) { for (e1 = agfstout(g, n1); e1!=null; e1 = agnxtout(g, e1)) { if (NEQ(e, e1)) { f1 = ED_to_virt(e1); if (f1!=null && EQ(f, f1)) { ED_to_virt(e1, null); } } } } Memory.free(f.getStruct("base").getPtr("data")); Memory.free(f); } ED_to_virt(e, null); } } GD_comp(g).resetList(); GD_comp(g).size = 0; } finally { LEAVING("1xov2qhuxj1f9nbzu3xsa6679","cleanup1"); } } //3 bxjf5g7g953ii1hfodl1j0y4u // static void edgelabel_ranks(graph_t * g) public static void edgelabel_ranks(Agraph_s g) { ENTERING("bxjf5g7g953ii1hfodl1j0y4u","edgelabel_ranks"); try { Agnode_s n; Agedge_s e; if ((GD_has_labels(g) & (1 << 0))!=0) { for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) for (e = agfstout(g, n); e!=null; e = agnxtout(g, e)) ED_minlen(e, ED_minlen(e) * 2); GD_ranksep(g, (GD_ranksep(g) + 1) / 2); } } finally { LEAVING("bxjf5g7g953ii1hfodl1j0y4u","edgelabel_ranks"); } } //3 9kjpoxcxoy3nhqd9rflwclo7c // static void collapse_rankset(graph_t * g, graph_t * subg, int kind) public static Object collapse_rankset(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("8hizp29cxh1rnp84yrlv4nl8x"); // collapse_rankset(graph_t * g, graph_t * subg, int kind) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5yrhx4blosxo5xnc1nh1kzhfs"); // node_t *u, *v; UNSUPPORTED("nbvmqthk0lqbm00ekylf0l0g"); // u = v = agfstnode(subg); UNSUPPORTED("5q27ub494lpst2s18bizunri0"); // if (u) { UNSUPPORTED("97vrl7utckj5ct78d81xyhhjl"); // ND_ranktype(u) = kind; UNSUPPORTED("99ruvdyom1mcyir0v7i8zq8eh"); // while ((v = agnxtnode(subg, v))) { UNSUPPORTED("7f9cf0wfrirgdoty4qy5pfuj9"); // UF_union(u, v); UNSUPPORTED("5jt25she9etuqjk6nrkrt3059"); // ND_ranktype(v) = ND_ranktype(u); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9ty5l2g646lrkxz43tcnhcsk8"); // switch (kind) { UNSUPPORTED("b8vgbvwzllfs4lrqmmqyr1spk"); // case 2: UNSUPPORTED("1640m8as34e90xhvvtl877cmo"); // case 3: UNSUPPORTED("2crlxhvtrgd5ohsriopqywv1m"); // if (GD_minset(g) == NULL) UNSUPPORTED("9py54j3v52y5qevrsi1omdoq7"); // GD_minset(g) = u; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("1cqwn2xb41g0dsm2oltj15dsd"); // GD_minset(g) = UF_union(GD_minset(g), u); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("495y0cnvj5vci19wsufg88rrq"); // case 4: UNSUPPORTED("1wjv2f7dql1ddky1us3a7q5jq"); // case 5: UNSUPPORTED("1myv9cwrp9n535g9xsalgmg7n"); // if (GD_maxset(g) == NULL) UNSUPPORTED("45gr04d25a1qxrh4hm1kiip5v"); // GD_maxset(g) = u; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("d5a4ohz8nh8xso8ovij23zsxi"); // GD_maxset(g) = UF_union(GD_maxset(g), u); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9ty5l2g646lrkxz43tcnhcsk8"); // switch (kind) { UNSUPPORTED("1640m8as34e90xhvvtl877cmo"); // case 3: UNSUPPORTED("j5ay8vao16zse2bq0etmlhua"); // ND_ranktype(GD_minset(g)) = kind; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1wjv2f7dql1ddky1us3a7q5jq"); // case 5: UNSUPPORTED("9dtrubjv4hiv1k3dq24skxdb8"); // ND_ranktype(GD_maxset(g)) = kind; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 65qi5f0bxp6d6vahhlcolpk88 // static int rank_set_class(graph_t * g) public static int rank_set_class(Agraph_s g) { ENTERING("65qi5f0bxp6d6vahhlcolpk88","rank_set_class"); try { CString name[] = new CString[] { new CString("same"), new CString("min"), new CString("source"), new CString("max"), new CString("sink"), null }; int class_[] = new int[] { 1, 2, 3, 4, 5, 0 }; int val; if (is_cluster(g)) return 7; val = maptoken(agget(g, new CString("rank")), name, class_); GD_set_type(g, val); return val; } finally { LEAVING("65qi5f0bxp6d6vahhlcolpk88","rank_set_class"); } } //3 5189iviqj57iztftckz86y6jj // static int make_new_cluster(graph_t * g, graph_t * subg) public static int make_new_cluster(Agraph_s g, Agraph_s subg) { ENTERING("5189iviqj57iztftckz86y6jj","make_new_cluster"); try { int cno; GD_n_cluster(g, GD_n_cluster(g)+1); cno = GD_n_cluster(g); GD_clust(g, ZALLOC(cno + 1, GD_clust(g), Agraph_s.class, GD_n_cluster(g))); GD_clust(g).plus(cno).setPtr(subg); do_graph_label(subg); return cno; } finally { LEAVING("5189iviqj57iztftckz86y6jj","make_new_cluster"); } } //3 9lvm2ufqjzl2bsbpo0zg9go58 // static void node_induce(graph_t * par, graph_t * g) public static void node_induce(Agraph_s par, Agraph_s g) { ENTERING("9lvm2ufqjzl2bsbpo0zg9go58","node_induce"); try { Agnode_s n, nn; Agedge_s e; int i; LOG2("node_induce"); /* enforce that a node is in at most one cluster at this level */ for (n = agfstnode(g); n!=null; n = nn) { nn = agnxtnode(g, n); if (ND_ranktype(n)!=0) { agdelete(g, n); continue; } for (i = 1; i < GD_n_cluster(par); i++) if (agcontains((Agraph_s) GD_clust(par).plus(i).getPtr(), n)) break; if (i < GD_n_cluster(par)) agdelete(g, n); ND_clust(n, null); } for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) { for (e = agfstout(dot_root(g), n); e!=null; e = agnxtout(dot_root(g), e)) { if (agcontains(g, aghead(e))) agsubedge(g,e,true); } } } finally { LEAVING("9lvm2ufqjzl2bsbpo0zg9go58","node_induce"); } } //3 650rxyqioihwhhqkex61prwfs // void dot_scan_ranks(graph_t * g) public static Object dot_scan_ranks(Object... arg) { UNSUPPORTED("347dderd02mvlozoheqo4ejwo"); // void UNSUPPORTED("3qe2zolxii33gr1krcjkgygwm"); // dot_scan_ranks(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dkbxmqzr28yu8rswd5vubd3ha"); // node_t *n, *leader = NULL; UNSUPPORTED("65ovv0jsp2kemyp7179cotrqh"); // GD_minrank(g) = MAXSHORT; UNSUPPORTED("4rx9wnlw0uumqfzcjtyg9rpfl"); // GD_maxrank(g) = -1; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("68vv0lam9vxeuk3fg60ad5w6g"); // if (GD_maxrank(g) < ND_rank(n)) UNSUPPORTED("2v65dy95gqvsnppoelwwl8ayh"); // GD_maxrank(g) = ND_rank(n); UNSUPPORTED("3ozq6tqfxcegom34qkyrrxnfg"); // if (GD_minrank(g) > ND_rank(n)) UNSUPPORTED("duyud2jy9uf1rbcis84c3lsj6"); // GD_minrank(g) = ND_rank(n); UNSUPPORTED("5j9c428shih0wjw2salkxw0qm"); // if (leader == NULL) UNSUPPORTED("73jlqlf2bn3kx7i020menpfcw"); // leader = n; UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("bwqhlzu5ifbhdg1jral42ycdx"); // if (ND_rank(n) < ND_rank(leader)) UNSUPPORTED("7h663p7xpn4qn3l6bs6vxze7i"); // leader = n; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5j1zsofmtglx1esxwbstti1un"); // GD_leader(g) = leader; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2rbs5deyvlh5s7lkhv6zouqbe // static void cluster_leader(graph_t * clust) public static void cluster_leader(Agraph_s clust) { ENTERING("2rbs5deyvlh5s7lkhv6zouqbe","cluster_leader"); try { Agnode_s leader, n; int maxrank = 0; /* find number of ranks and select a leader */ leader = null; for (n = GD_nlist(clust); n!=null; n = ND_next(n)) { if ((ND_rank(n) == 0) && (ND_node_type(n) == 0)) leader = n; if (maxrank < ND_rank(n)) maxrank = ND_rank(n); } assert(leader != null); GD_leader(clust, leader); for (n = agfstnode(clust); n!=null; n = agnxtnode(clust, n)) { //assert((ND_UF_size(n) <= 1) || (n == leader)); UF_union(n, leader); ND_ranktype(n, 7); } } finally { LEAVING("2rbs5deyvlh5s7lkhv6zouqbe","cluster_leader"); } } //3 f3sl627dqmre3kru883bpdxc3 // static void collapse_cluster(graph_t * g, graph_t * subg) public static void collapse_cluster(Agraph_s g, Agraph_s subg) { ENTERING("f3sl627dqmre3kru883bpdxc3","collapse_cluster"); try { if (GD_parent(subg)!=null) { return; } GD_parent(subg, g); node_induce(g, subg); if (agfstnode(subg) == null) return; make_new_cluster(g, subg); if (Z.z().CL_type == 100) { dot1_rank(subg, null); cluster_leader(subg); } else UNSUPPORTED("1os84mtyrb110i4sd8bdjrwk"); // dot_scan_ranks(subg); } finally { LEAVING("f3sl627dqmre3kru883bpdxc3","collapse_cluster"); } } //3 din4qnipewrwnelaimzvlplft // static void collapse_sets(graph_t *rg, graph_t *g) public static void collapse_sets(Agraph_s rg, Agraph_s g) { ENTERING("din4qnipewrwnelaimzvlplft","collapse_sets"); try { int c; Agraph_s subg; for (subg = agfstsubg(g); subg!=null; subg = agnxtsubg(subg)) { c = rank_set_class(subg); if (c!=0) { if ((c == 7) && Z.z().CL_type == 100) collapse_cluster(rg, subg); else collapse_rankset(rg, subg, c); } else collapse_sets(rg, subg); } } finally { LEAVING("din4qnipewrwnelaimzvlplft","collapse_sets"); } } //3 5n9mgh7vlru5mb1j9oienvbvs // static void find_clusters(graph_t * g) public static Object find_clusters(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("cdsgmo50taekqgk95mfn25930"); // find_clusters(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8uujemixuhlf040icq3zsh7j8"); // graph_t *subg; UNSUPPORTED("39msf2samfrjyh2h1a0nh0bnq"); // for (subg = agfstsubg(dot_root(g)); subg; subg = agnxtsubg(subg)) { UNSUPPORTED("zmexivcsx1b4oppz6cjwhzd9"); // if (GD_set_type(subg) == 7) UNSUPPORTED("xqwyd1xyo86onxfw4s7p8at4"); // collapse_cluster(g, subg); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 12fw0esv4unfin6waf9mknc1o // static void set_minmax(graph_t * g) public static void set_minmax(Agraph_s g) { ENTERING("12fw0esv4unfin6waf9mknc1o","set_minmax"); try { int c; GD_minrank(g, GD_minrank(g) + ND_rank(GD_leader(g))); GD_maxrank(g, GD_maxrank(g) + ND_rank(GD_leader(g))); for (c = 1; c <= GD_n_cluster(g); c++) set_minmax((Agraph_s) GD_clust(g).plus(c).getPtr()); } finally { LEAVING("12fw0esv4unfin6waf9mknc1o","set_minmax"); } } //3 3bcr1748gqnu8ogb73jeja7ly // static point minmax_edges(graph_t * g) public static __struct__ minmax_edges(Agraph_s g) { // WARNING!! STRUCT return minmax_edges_w_(g).copy(); } private static __struct__ minmax_edges_w_(Agraph_s g) { ENTERING("3bcr1748gqnu8ogb73jeja7ly","minmax_edges"); try { Agnode_s n; Agedge_s e; final __struct__ slen = JUtils.from(point.class); slen.setInt("x", 0); slen.setInt("y", 0); if ((GD_maxset(g) == null) && (GD_minset(g) == null)) return slen; UNSUPPORTED("d0tnzm7aw9504y1w1oqoesw64"); // if ((((Agraphinfo_t*)(((Agobj_t*)(g))->data))->minset) != NULL) UNSUPPORTED("9esfh1bqntzgyk7zcq16k9f96"); // (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->minset) = UF_find((((Agraphinfo_t*)(((Agobj_t*)(g))->data))->minset)); UNSUPPORTED("2szhe8u8hvuy7p23r4p4zcb83"); // if ((((Agraphinfo_t*)(((Agobj_t*)(g))->data))->maxset) != NULL) UNSUPPORTED("tufrhwafgfvg5vepfqo9dpwg"); // (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->maxset) = UF_find((((Agraphinfo_t*)(((Agobj_t*)(g))->data))->maxset)); UNSUPPORTED("3num56yubfb33g0m56jntiy0x"); // if ((n = (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->maxset))) { UNSUPPORTED("d60rrtpfeuylcbp2490sojfjq"); // slen.y = ((((Agnodeinfo_t*)(((Agobj_t*)((((Agraphinfo_t*)(((Agobj_t*)(g))->data))->maxset)))->data))->ranktype) == 5); UNSUPPORTED("79ls52ss65f22xrsubkcofzz"); // while ((e = (((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->out).list[0])) { UNSUPPORTED("chd9prkphze2z32e98mbxhqyd"); // assert(((((((Agobj_t*)(e))->tag).objtype) == 2? (e): ((e)-1))->node) == UF_find(((((((Agobj_t*)(e))->tag).objtype) == 2? (e): ((e)-1))->node))); UNSUPPORTED("829yx3b7rjn7ptz89mz4dj5yo"); // reverse_edge(e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8us4psjv2ebkgcp54fvjbuhj8"); // if ((n = (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->minset))) { UNSUPPORTED("7uri9lp9wjgo20ram4gfo974w"); // slen.x = ((((Agnodeinfo_t*)(((Agobj_t*)((((Agraphinfo_t*)(((Agobj_t*)(g))->data))->minset)))->data))->ranktype) == 3); UNSUPPORTED("5up69q1rp9ts32jvunwg9hlrr"); // while ((e = (((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->in).list[0])) { UNSUPPORTED("4t476gsg37fhfa2fdrokupx2c"); // assert(((((((Agobj_t*)(e))->tag).objtype) == 3? (e): ((e)+1))->node) == UF_find(((((((Agobj_t*)(e))->tag).objtype) == 3? (e): ((e)+1))->node))); UNSUPPORTED("829yx3b7rjn7ptz89mz4dj5yo"); // reverse_edge(e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("erz19oifq072tdfzgz6dxa9i4"); // return slen; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("3bcr1748gqnu8ogb73jeja7ly","minmax_edges"); } } //3 1rmlm1wo3t94wyet9rlwrmith // static int minmax_edges2(graph_t * g, point slen) public static boolean minmax_edges2(Agraph_s g, final __struct__ slen) { // WARNING!! STRUCT return minmax_edges2_w_(g, slen.copy()); } private static boolean minmax_edges2_w_(Agraph_s g, final __struct__ slen) { ENTERING("1rmlm1wo3t94wyet9rlwrmith","minmax_edges2"); try { Agnode_s n; Agedge_s e = null; if ((GD_maxset(g)!=null) || (GD_minset(g)!=null)) { UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("8y47p29z0c2f1xpkrsb8w8re8"); // if (n != UF_find(n)) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("49yt5gs5xlk2yzmiulvp7iqrd"); // if (((((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->out).size == 0) && (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->maxset) && (n != (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->maxset))) { UNSUPPORTED("9ksut17itonzpk3hp57jn4d1s"); // e = virtual_edge(n, (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->maxset), NULL); UNSUPPORTED("7dlot3nkpploeywkumjt3erop"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->minlen) = slen.y; UNSUPPORTED("5ddkb181unkbg63gxqjx85fzq"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->weight) = 0; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5b66s1jsuwe7l2e8p6o1xpnab"); // if (((((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->in).size == 0) && (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->minset) && (n != (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->minset))) { UNSUPPORTED("c00g90uqqonkk08nncvi45c8f"); // e = virtual_edge((((Agraphinfo_t*)(((Agobj_t*)(g))->data))->minset), n, NULL); UNSUPPORTED("cxdsqlq2h35nyz65uc4eifchp"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->minlen) = slen.x; UNSUPPORTED("5ddkb181unkbg63gxqjx85fzq"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->weight) = 0; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } } return (e != null); } finally { LEAVING("1rmlm1wo3t94wyet9rlwrmith","minmax_edges2"); } } //3 3vpthwso788idvycelpnqijys // void rank1(graph_t * g) public static void rank1(Agraph_s g) { ENTERING("3vpthwso788idvycelpnqijys","rank1"); try { int maxiter = Integer.MAX_VALUE; int c; CString s; if ((s = agget(g, new CString("nslimit1")))!=null) UNSUPPORTED("9tp2zk1tsr4ce9rwsr0is9u3o"); // maxiter = atof(s) * agnnodes(g); for (c = 0; c < GD_comp(g).size; c++) { //GD_nlist(g, GD_comp(g).getArrayOfPtr("list").plus(c).getPtr()); GD_nlist(g, GD_comp(g).getFromList(c)); rank(g, (GD_n_cluster(g) == 0 ? 1 : 0), maxiter); /* TB balance */ } } finally { LEAVING("3vpthwso788idvycelpnqijys","rank1"); } } //3 cdh8wnb99v90dy6efpbzmrjix // static void expand_ranksets(graph_t * g, aspect_t* asp) public static void expand_ranksets(Agraph_s g, aspect_t asp) { ENTERING("cdh8wnb99v90dy6efpbzmrjix","expand_ranksets"); try { int c; Agnode_s n, leader; if ((n = agfstnode(g))!=null) { GD_minrank(g, MAXSHORT); GD_maxrank(g, -1); while (n!=null) { leader = UF_find(n); /* The following works because ND_rank(n) == 0 if n is not in a * cluster, and ND_rank(n) = the local rank offset if n is in * a cluster. */ if (NEQ(leader, n) && (N(asp) || (ND_rank(n) == 0))) ND_rank(n, ND_rank(n) + ND_rank(leader)); if (GD_maxrank(g) < ND_rank(n)) GD_maxrank(g, ND_rank(n)); if (GD_minrank(g) > ND_rank(n)) GD_minrank(g, ND_rank(n)); if (ND_ranktype(n)!=0 && (ND_ranktype(n) != 6)) UF_singleton(n); n = agnxtnode(g, n); } if (EQ(g, dot_root(g))) { if (Z.z().CL_type == 100) { for (c = 1; c <= GD_n_cluster(g); c++) set_minmax((Agraph_s) GD_clust(g).plus(c).getPtr()); } else { find_clusters(g); } } } else { GD_maxrank(g, 0); GD_minrank(g, 0); } } finally { LEAVING("cdh8wnb99v90dy6efpbzmrjix","expand_ranksets"); } } //3 2o4rmb4o6f6zh46ak3se91rwr // static void dot1_rank(graph_t * g, aspect_t* asp) public static void dot1_rank(Agraph_s g, aspect_t asp) { ENTERING("2o4rmb4o6f6zh46ak3se91rwr","dot1_rank"); try { final __struct__ p = JUtils.from(point.class); edgelabel_ranks(g); if (asp!=null) { UNSUPPORTED("kh7e20nqwuserrnpf3zpvuyl"); // init_UF_size(g); UNSUPPORTED("d88j5oswhz0d3yvd4wlvxohmu"); // initEdgeTypes(g); } collapse_sets(g,g); /*collapse_leaves(g); */ class1_(g); p.___(minmax_edges(g)); decompose(g, 0); if (asp!=null && ((GD_comp(g).getInt("size") > 1)||(GD_n_cluster(g) > 0))) { UNSUPPORTED("evcjt85irnaa02v8cam07i009"); // asp->badGraph = 1; UNSUPPORTED("45nxv6kczal9hnytkfcyt2jk8"); // asp = NULL; } acyclic_(g); if (minmax_edges2(g, p)) UNSUPPORTED("800vpyk6y4hcx2txwyrr2boxu"); // decompose(g, 0); if (asp!=null) rank3(g, asp); else rank1(g); expand_ranksets(g, asp); cleanup1(g); } finally { LEAVING("2o4rmb4o6f6zh46ak3se91rwr","dot1_rank"); } } //3 asyfujgwqa407ffvqn5psbtsc // void dot_rank(graph_t * g, aspect_t* asp) public static void dot_rank(Agraph_s g, aspect_t asp) { ENTERING("asyfujgwqa407ffvqn5psbtsc","dot_rank"); try { if (agget (g, new CString("newrank"))!=null) { GD_flags(g, GD_flags(g) | (1 << 4)); dot2_rank (g, asp); } else dot1_rank (g, asp); //if (Verbose) //fprintf (stderr, "Maxrank = %d, minrank = %d\n", (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->maxrank), (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->minrank)); } finally { LEAVING("asyfujgwqa407ffvqn5psbtsc","dot_rank"); } } //3 cdncou6d2ng5i48rd1mk2cpnw // int is_cluster(graph_t * g) public static boolean is_cluster(Agraph_s g) { ENTERING("cdncou6d2ng5i48rd1mk2cpnw","is_cluster"); try { return (strncmp(agnameof(g), new CString("cluster"), 7) == 0); } finally { LEAVING("cdncou6d2ng5i48rd1mk2cpnw","is_cluster"); } } //3 29qzn29glqnhg14z5cwt9i8ds // static void set_parent(graph_t* g, graph_t* p) public static Object set_parent(Object... arg) { UNSUPPORTED("blcrnfwfdmb15y0sduplfd1kd"); // static void set_parent(graph_t* g, graph_t* p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("761elco9es28q1el1h87c9q8w"); // GD_parent(g) = p; UNSUPPORTED("84dx27r05ns2c0pm7idum25td"); // make_new_cluster(p, g); UNSUPPORTED("65op19ofyxj4vywwg8hovy2yh"); // node_induce(p, g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3qlca4afaxtwu0r2v22ccpfy9 // static int is_empty(graph_t * g) public static Object is_empty(Object... arg) { UNSUPPORTED("1bkrdpgwmb75nr2g9ooqfc79r"); // static int is_empty(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8bgakhvkt8exvi70zpvdvwrt4"); // return (!agfstnode(g)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 sxmrpf4e3wi4vzeiu486heyw // static int is_a_strong_cluster(graph_t * g) public static Object is_a_strong_cluster(Object... arg) { UNSUPPORTED("251zndmdq92kg3zmfr3akrrmn"); // static int is_a_strong_cluster(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ecz4e03zumggc8tfymqvirexq"); // int rv; UNSUPPORTED("9l9qe4o3ak62d2r6cbq90e5g"); // char *str = agget(g, "compact"); UNSUPPORTED("5zgcjj66562k7c4z26hmps9jr"); // /* rv = mapBool((str), TRUE); */ UNSUPPORTED("7k6ls7carz5knwiocbejouapm"); // rv = mapBool((str), 0); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 954bo7mrh993f96ujb8u3e8vt // static int rankset_kind(graph_t * g) public static Object rankset_kind(Object... arg) { UNSUPPORTED("5vyg261oak77cq7e9dmvw2omc"); // static int rankset_kind(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("70l71erfhd26e1u7dnnxpa6i"); // char *str = agget(g, "rank"); UNSUPPORTED("4ml2m315k80oi1eww739kxwgi"); // if (str && str[0]) { UNSUPPORTED("7j0qc9ibr6niawo611kvm2swb"); // if (!strcmp(str, "min")) UNSUPPORTED("avnuwo0ld6vqw4bdve4ku0kwr"); // return 2; UNSUPPORTED("8q0yyecb20k2nm2qnluagpkcv"); // if (!strcmp(str, "source")) UNSUPPORTED("1xt8eg4imiwilo2bv2i5shg7g"); // return 3; UNSUPPORTED("7dkmgopul9nxw7arr5odhh641"); // if (!strcmp(str, "max")) UNSUPPORTED("ajqfmduyeyu16131ii3itnjx7"); // return 4; UNSUPPORTED("4f7keu82iifj10rf0thee5c4s"); // if (!strcmp(str, "sink")) UNSUPPORTED("f45x5jzpirzixrsp3utlgrddo"); // return 5; UNSUPPORTED("kjtw0fdz1jophwulunsrgzdb"); // if (!strcmp(str, "same")) UNSUPPORTED("btmwubugs9vkexo4yb7a5nqel"); // return 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ds4c38px5ikyzcv8pbtfcfg8h"); // return 6; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ej4vtw2e6g22jzlypo03buuob // static int is_nonconstraint(edge_t * e) public static Object is_nonconstraint(Object... arg) { UNSUPPORTED("cdj60nbfp2uc9emgj9bb9tuq4"); // static int is_nonconstraint(edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5bdi9u1cut03m2rbxpkmjg38w"); // char *constr; UNSUPPORTED("ipmkcv3n8rnco04rgte3qrlh"); // if (E_constr && (constr = agxget(e, E_constr))) { UNSUPPORTED("cnlkffmn4nysfcmoyktn3wvrx"); // if (constr[0] && mapbool(constr) == 0) UNSUPPORTED("9qhn9m3123s8n6wwxjfo8awlm"); // return NOT(0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8pb7znv8q3ikfulus8sprsrb8 // static node_t *find(node_t * n) public static Object find(Object... arg) { UNSUPPORTED("420nqb6oiuhh8qfg7ick8eb5j"); // static node_t *find(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dxloerh79kcplsvqy37g3kwx1"); // node_t *set; UNSUPPORTED("ch7ucg4bhoyhb0yswbbtjy53"); // if ((set = ND_set(n))) { UNSUPPORTED("e20g6f3inc2t1acfqffb0ksqe"); // if (set != n) UNSUPPORTED("3lalmwvgf54uou021ltj0hfqg"); // set = ND_set(n) = find(set); UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("45wb5d7uba8g13ojkskeug5v2"); // set = ND_set(n) = n; UNSUPPORTED("d5jffopzvq1b1jnhb3jadtkkb"); // return set; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 tgndl91vjf2dvnepj15uye32 // static node_t *union_one(node_t * leader, node_t * n) public static Object union_one(Object... arg) { UNSUPPORTED("bk1ys5rvc0fqcssw437mw03pk"); // static node_t *union_one(node_t * leader, node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("vkwoakpy0gnbvzgy8gprpluu"); // if (n) UNSUPPORTED("879p5fay2s7f829lo6qaxs62y"); // return (ND_set(find(n)) = find(leader)); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("o1psslvh23yuu288xx1nzbv6"); // return leader; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1ku7zqljp4yk6j8pqxa19ko4u // static node_t *union_all(graph_t * g) public static Object union_all(Object... arg) { UNSUPPORTED("1bddf3dbho07f9di3ae5tdn2z"); // static node_t *union_all(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("d5wzfazsul6ns71kurzu097zq"); // node_t *n, *leader; UNSUPPORTED("42x5vqk9aw9a2ld3duvpmp7u9"); // n = agfstnode(g); UNSUPPORTED("b23lxt0h34yyivnau77kavofl"); // if (!n) UNSUPPORTED("bp96fem54xcxrw16cmnlpell9"); // return n; UNSUPPORTED("c7r16vtue9uiodzk7n9ybdegz"); // leader = find(n); UNSUPPORTED("1azt0yldbuvzvyhftheine5bv"); // while ((n = agnxtnode(g, n))) UNSUPPORTED("aygpegbyw6isjunzjiq2efa8e"); // union_one(leader, n); UNSUPPORTED("d2vvjehoyl5rcjodzjl8q0xne"); // return leader; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dehfujiq2i24w0y9qcoq88gbd // static void compile_samerank(graph_t * ug, graph_t * parent_clust) public static Object compile_samerank(Object... arg) { UNSUPPORTED("52xc1gml0ynibrpu4r03l9cs"); // static void compile_samerank(graph_t * ug, graph_t * parent_clust) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5prtalowcftfpc3phfgtdwxe1"); // graph_t *s; /* subgraph being scanned */ UNSUPPORTED("6rya07j39ddlbnek0cawgbdxq"); // graph_t *clust; /* cluster that contains the rankset */ UNSUPPORTED("d5wzfazsul6ns71kurzu097zq"); // node_t *n, *leader; UNSUPPORTED("3j62rndf411nak99bxbvwogwg"); // if (is_empty(ug)) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("116sd790xqr0sm9prs44dhdi9"); // if (is_a_cluster(ug)) { UNSUPPORTED("anfjvlosf3592vmzm64wp9ukv"); // clust = ug; UNSUPPORTED("a4nj79aw8gc4rsc6qh4h1j3ca"); // if (parent_clust) { UNSUPPORTED("2cme4svj15jnccy2a5my2k0vk"); // GD_level(ug) = GD_level(parent_clust) + 1; UNSUPPORTED("92dkw1fscsyjwrbkjnllcmsiz"); // set_parent(ug, parent_clust); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("1f3tsi2calw640ylv89zufnqg"); // GD_level(ug) = 0; UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("f2eqknbcu7dkt0mk3aa0nseps"); // clust = parent_clust; UNSUPPORTED("2jowbcd45wf29ysq00oxpb9qh"); // /* process subgraphs of this subgraph */ UNSUPPORTED("cpub3vrdy1soy50cezvowuqp8"); // for (s = agfstsubg(ug); s; s = agnxtsubg(s)) UNSUPPORTED("6y2vizzx42iva8zf3ndgfxuoo"); // compile_samerank(s, clust); UNSUPPORTED("4st45szka4kxyf5afpt9r2lr7"); // /* process this subgraph as a cluster */ UNSUPPORTED("116sd790xqr0sm9prs44dhdi9"); // if (is_a_cluster(ug)) { UNSUPPORTED("4pm26v2jo8qeolmy8246h5zal"); // for (n = agfstnode(ug); n; n = agnxtnode(ug, n)) { UNSUPPORTED("dpma84q2zbh96nqex4fp8bs5a"); // if (ND_clust(n) == 0) UNSUPPORTED("9ov8qga72kqj7lnxefrlneehb"); // ND_clust(n) = ug; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b6vj39735t21yl5ayiouei3ea"); // /* process this subgraph as a rankset */ UNSUPPORTED("bt28cwea3vaqopki07c2rians"); // switch (rankset_kind(ug)) { UNSUPPORTED("33l7a58zp8vj6fuliwdkk2nkn"); // case 3: UNSUPPORTED("btl4oqew40wl0bqc9bhe1qshq"); // GD_has_sourcerank(clust) = NOT(0); /* fall through */ UNSUPPORTED("4u5xz2u3urj13y0aw30fdyup5"); // case 2: UNSUPPORTED("9shvnosp4rfl2zcu1mk8mt6k"); // leader = union_all(ug); UNSUPPORTED("6o42rb3i5w3jv1861oa077ahy"); // GD_minrep(clust) = union_one(leader, GD_minrep(clust)); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("94bjfk0blg9ugkinwopclju8t"); // case 5: UNSUPPORTED("b9tzw03kknh7ged56o6llxdh0"); // GD_has_sinkrank(clust) = NOT(0); /* fall through */ UNSUPPORTED("7gwyze795m9aa2915n3bou49x"); // case 4: UNSUPPORTED("9shvnosp4rfl2zcu1mk8mt6k"); // leader = union_all(ug); UNSUPPORTED("dumvmo0mkc9khfmooiadflzuz"); // GD_maxrep(clust) = union_one(leader, GD_maxrep(clust)); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("d0gk15gzj4wz8nv54zbr285hm"); // case 1: UNSUPPORTED("9shvnosp4rfl2zcu1mk8mt6k"); // leader = union_all(ug); UNSUPPORTED("aukepn75qomcnwetlwyvziwx1"); // /* do we need to record these ranksets? */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("4ak4rwp0nsvc9n89y3dnvoiy9"); // case 6: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("b7b3qf9gm8yinsl7rq2tcvamg"); // default: /* unrecognized - warn and do nothing */ UNSUPPORTED("dsg015rva622f29whl6b5ner1"); // agerr(AGWARN, "%s has unrecognized rank=%s", agnameof(ug), UNSUPPORTED("7gjdlew6rtq0dsdxc6uyc7v48"); // agget(ug, "rank")); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8z2hxrvowojvpioiz41x8djhw"); // /* a cluster may become degenerate */ UNSUPPORTED("bg6be1cr97nd4blhxwc8577cz"); // if (is_a_cluster(ug) && GD_minrep(ug)) { UNSUPPORTED("7z1ki4lb1ja4hai3qi68hlg72"); // if (GD_minrep(ug) == GD_maxrep(ug)) { UNSUPPORTED("6d3xnrwrzibz1hajej296nhj4"); // node_t *up = union_all(ug); UNSUPPORTED("bisonxzfe0vx9x9xtsvv27rq9"); // GD_minrep(ug) = up; UNSUPPORTED("esz48qzeb3f3oomg8wb4drmrn"); // GD_maxrep(ug) = up; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6mzsthkzz214du9ljfc7ijlf3 // static graph_t *dot_lca(graph_t * c0, graph_t * c1) public static Object dot_lca(Object... arg) { UNSUPPORTED("egnw42d8jhfdyl5zqlzqffv17"); // static graph_t *dot_lca(graph_t * c0, graph_t * c1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8qmvk29gersospxrjeukh5zdn"); // while (c0 != c1) { UNSUPPORTED("9395225iwl078vpfdl5fz3q1i"); // if (GD_level(c0) >= GD_level(c1)) UNSUPPORTED("ud0xxtx626m6p44f5ybl28oz"); // c0 = GD_parent(c0); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("1z7wsarh0nlwq4y04yizw1pbj"); // c1 = GD_parent(c1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("aqd6v9mqxnbx6er4fkhkmhusr"); // return c0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7fwe6cym6k60fw6f2gkbftvh8 // static int is_internal_to_cluster(edge_t * e) public static Object is_internal_to_cluster(Object... arg) { UNSUPPORTED("esoedecj682cdsbz3i9026zfo"); // static int is_internal_to_cluster(edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bf7f1i4wj7cvj82os2h0somln"); // graph_t *par, *ct, *ch; UNSUPPORTED("pzh3wmhacvb8baamh8d0x2j5"); // ct = ND_clust(agtail(e)); UNSUPPORTED("1yxzewahgac4khyfwgegotstb"); // ch = ND_clust(aghead(e)); UNSUPPORTED("c0hxl5pgz9bgngw9cw54a6y8z"); // if (ct == ch) UNSUPPORTED("bp2y18pqq5n09006utwifdyxo"); // return NOT(0); UNSUPPORTED("b4gos5u06phmhqll71bg7znsl"); // par = dot_lca(ct, ch); UNSUPPORTED("32a491a5jyr0gaudx2odlyl1x"); // /* if (par == agroot(par)) */ UNSUPPORTED("4ugp2o11w5qr2tr0vjcqlm5xu"); // /* return FALSE; */ UNSUPPORTED("1vb9z2lsj8ote2lis1nzqfq98"); // if ((par == ct) || (par == ch)) UNSUPPORTED("bp2y18pqq5n09006utwifdyxo"); // return NOT(0); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 ca279jzn1n2k40bv7mz55ccx7 // static node_t* Last_node //private static Agnode_s Last_node; //3 6odjfuoywf6x6xpuz14xn1w07 // static node_t* makeXnode (graph_t* G, char* name) public static Object makeXnode(Object... arg) { UNSUPPORTED("bpc5db7ozsqpc73t2xl0qmpnr"); // static node_t* makeXnode (graph_t* G, char* name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("as7pt6rau89ac05ml4zp39xgj"); // node_t *n = agnode(G, name, 1); UNSUPPORTED("6b9ymcqm4d2w42w6dvlhb7hio"); // alloc_elist(4, ND_in(n)); UNSUPPORTED("b0ocdkprm41g10emqffwvovpd"); // alloc_elist(4, ND_out(n)); UNSUPPORTED("e32lwhe8aj8zbofa5hl91g94x"); // if (Last_node) { UNSUPPORTED("ctnbewkujd0gitkeptmdjrc5e"); // ND_prev(n) = Last_node; UNSUPPORTED("efpj513jkepv1eb6ehj5cyuqy"); // ND_next(Last_node) = n; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("d73xo1uhf9960attqraecy18q"); // ND_prev(n) = NULL; UNSUPPORTED("bd7fe5nmcvdfwgbbuzoxzk59n"); // GD_nlist(G) = n; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7gutgf5zbme88t9ueyzvir9yh"); // Last_node = n; UNSUPPORTED("9tl9ztdpfpeb900t5gagch4eg"); // ND_next(n) = NULL; UNSUPPORTED("69hc24ic55i66g8tf2ne42327"); // return n; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cd3kauuz11z03xym1la7ze5e6 // static void compile_nodes(graph_t * g, graph_t * Xg) public static Object compile_nodes(Object... arg) { UNSUPPORTED("12jh8m3jnppgzqcx642zkv20x"); // static void compile_nodes(graph_t * g, graph_t * Xg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dm6k18yfspisvs0pl8f3kp9j4"); // /* build variables */ UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("hibhvgkp511r6u6ips8yb0un"); // Last_node = NULL; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("2f2poxq5fr9k7bgerylsq6dkm"); // if (find(n) == n) UNSUPPORTED("9xe9wxas5cxrrzpmqtkfavbuj"); // ND_rep(n) = makeXnode (Xg, agnameof(n)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("cfjmkdzc5nj1nbp2ckl0mejra"); // if (ND_rep(n) == 0) UNSUPPORTED("2u4sgiv3zkgh3t4r1ksk76oyl"); // ND_rep(n) = ND_rep(find(n)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e1guv5kmb9i30k71e66mdxo3y // static void merge(edge_t * e, int minlen, int weight) public static Object merge(Object... arg) { UNSUPPORTED("1npguevtdh47xfz698yahzrqb"); // static void merge(edge_t * e, int minlen, int weight) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("acr0hvlhebqp3iieup5bti0r6"); // ED_minlen(e) = MAX(ED_minlen(e), minlen); UNSUPPORTED("eq9oxzgg08304c8ph77144cpu"); // ED_weight(e) += weight; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c6dqhr5u2wv75vxz5cgbkui // static void strong(graph_t * g, node_t * t, node_t * h, edge_t * orig) public static Object strong(Object... arg) { UNSUPPORTED("6vzggze9zva4h232s9hd64r27"); // static void strong(graph_t * g, node_t * t, node_t * h, edge_t * orig) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("bqayp53mx8tl3a9owcil2sfpy"); // if ((e = (agedge(g,t,h,NULL,0))) || UNSUPPORTED("4bkprvzfmfr1nlqmvqcd1xpg"); // (e = (agedge(g,h,t,NULL,0))) || (e = agedge(g, t, h, 0, 1))) UNSUPPORTED("9otcshlag9drzks2p4q4bz1z8"); // merge(e, ED_minlen(orig), ED_weight(orig)); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("1qsfg1so4d9ee0f799ylbtkyp"); // agerr(AGERR, "ranking: failure to create strong constraint edge between nodes %s and %s\n", UNSUPPORTED("347820654uihcls8om0v8c3g1"); // agnameof(t), agnameof(h)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a1kjm11iwgfl824pakzcm8kuu // static void weak(graph_t * g, node_t * t, node_t * h, edge_t * orig) public static Object weak(Object... arg) { UNSUPPORTED("e0f6tf4pkq822l7f10u2xromd"); // static void weak(graph_t * g, node_t * t, node_t * h, edge_t * orig) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aigogf44ojtcesuy4xs7inqbn"); // node_t *v; UNSUPPORTED("9b48a157azcrz2ihzqehhpsvs"); // edge_t *e, *f; UNSUPPORTED("3kkq8fnz3moxvyriighzr9v70"); // static int id; UNSUPPORTED("hbaoyuj2oi8c7iuzviuukgb7"); // char buf[100]; UNSUPPORTED("5n9mmbpgpmin1li1s5wxfn0j7"); // for (e = agfstin(g, t); e; e = agnxtin(g, e)) { UNSUPPORTED("blrs1fuvxzbs20bdqz7btw4yt"); // /* merge with existing weak edge (e,f) */ UNSUPPORTED("cccrsacwb6lshsxm8g9vpqdvo"); // v = agtail(e); UNSUPPORTED("657evjbfij6x36pli6d9g15lg"); // if ((f = agfstout(g, v)) && (aghead(f) == h)) { UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dhdmfarapbytpy4h24lgqslbi"); // if (!e) { UNSUPPORTED("blf0483ca5ufq6yh26qqww4wv"); // sprintf (buf, "_weak_%d", id++); UNSUPPORTED("9gu1nn0ir6yx53fj7kawo6xtw"); // v = makeXnode(g, buf); UNSUPPORTED("7us6c9ykrtln0besnd67v5cer"); // e = agedge(g, v, t, 0, 1); UNSUPPORTED("atd2wygaazfzcta0bus6bs4uu"); // f = agedge(g, v, h, 0, 1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7nn4pn4dj4nuo71wfp1byijpx"); // ED_minlen(e) = MAX(ED_minlen(e), 0); /* effectively a nop */ UNSUPPORTED("drqgauf89xr1mpyydaxqfg694"); // ED_weight(e) += ED_weight(orig) * 1000; UNSUPPORTED("halhvp8h6olsu4tb4b5zb8ys"); // ED_minlen(f) = MAX(ED_minlen(f), ED_minlen(orig)); UNSUPPORTED("dyyu1myirsx00xvfvqq97f6dt"); // ED_weight(f) += ED_weight(orig); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 68dc7hsp2siu9in566grx5h8l // static void compile_edges(graph_t * ug, graph_t * Xg) public static Object compile_edges(Object... arg) { UNSUPPORTED("57s72j3dqfa0fdsi9zu6yqbxe"); // static void compile_edges(graph_t * ug, graph_t * Xg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("1dgz401xgus10wp90qpgfmm84"); // node_t *Xt, *Xh; UNSUPPORTED("c37x0xox8y9eba9wy6d00j14i"); // graph_t *tc, *hc; UNSUPPORTED("lp2eyq9typ14npscbcmds97c"); // /* build edge constraints */ UNSUPPORTED("1rgbf8esuu21jsnjy0ozcv2nx"); // for (n = agfstnode(ug); n; n = agnxtnode(ug, n)) { UNSUPPORTED("36jgu4l53q07scrzxtbzu9ws1"); // Xt = ND_rep(n); UNSUPPORTED("1huyj2j0jo6l60j1121l0cenn"); // for (e = agfstout(ug, n); e; e = agnxtout(ug, e)) { UNSUPPORTED("eihgt2jen0ohii72jzayossof"); // if (is_nonconstraint(e)) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("21s68hvg9tcok9mc1yj0cxyo8"); // Xh = ND_rep(find(aghead(e))); UNSUPPORTED("5c9s9jmoqhby2u29zb0g9neqn"); // if (Xt == Xh) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("enlmoet02jwyseh462fspj7kr"); // tc = ND_clust(agtail(e)); UNSUPPORTED("47ba8c5wv42664v4uk20dcxui"); // hc = ND_clust(aghead(e)); UNSUPPORTED("7o1ut6pe3ws38101s6x9jv08k"); // if (is_internal_to_cluster(e)) { UNSUPPORTED("61gy4yt9v1l4586kvpqtacmur"); // /* determine if graph requires reversed edge */ UNSUPPORTED("cuivzwkiwyl1njm43k0v3zig3"); // if ((find(agtail(e)) == GD_maxrep(ND_clust(agtail(e)))) UNSUPPORTED("9xxo59da6q1v90ljd3h8apc3j"); // || (find(aghead(e)) == GD_minrep(ND_clust(aghead(e))))) { UNSUPPORTED("4mdqa1pib7sml5socnk5zj1jn"); // node_t *temp = Xt; UNSUPPORTED("edto6lxzuam8lv9gvigp2bnnh"); // Xt = Xh; UNSUPPORTED("edahfvolx6t8a93b1jzop0prz"); // Xh = temp; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("eap1t3wskyfghhrwqv5fzgiye"); // strong(Xg, Xt, Xh, e); UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("73tu1coi87ooqzro2vtdezlut"); // if (is_a_strong_cluster(tc) || is_a_strong_cluster(hc)) UNSUPPORTED("1qlyasf525g29jx5adouyjjaf"); // weak(Xg, Xt, Xh, e); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("dtnnxvw72r9ajw35rh6sh0twe"); // strong(Xg, Xt, Xh, e); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1nzwhja8l48xyfliiyqjsvegu // static void compile_clusters(graph_t* g, graph_t* Xg, node_t* top, node_t* bot) public static Object compile_clusters(Object... arg) { UNSUPPORTED("4w43o1w7rtbr7a1ewf1ai3ynx"); // static void compile_clusters(graph_t* g, graph_t* Xg, node_t* top, node_t* bot) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("tppzioyoeodu2sq7fsqife44"); // node_t *rep; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("evmjaaqcnbnbnogx8aaw70ura"); // graph_t *sub; UNSUPPORTED("73bera1w406yjis65313aefau"); // if (is_a_cluster(g) && is_a_strong_cluster(g)) { UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("cpkj2qkslx3blfoouey105509"); // if (agfstin(g, n) == 0) { UNSUPPORTED("eqsuud7jsawkoiswwrrru1r3a"); // rep = ND_rep(find(n)); UNSUPPORTED("4fbgaoqhx6tmezixpndizn8ee"); // if (!top) top = makeXnode(Xg,"\177top"); UNSUPPORTED("bp6fj85jbfmup51iezb1m0ceo"); // agedge(Xg, top, rep, 0, 1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("f5bjshz39kvzzthd7dqnbg81p"); // if (agfstout(g, n) == 0) { UNSUPPORTED("eqsuud7jsawkoiswwrrru1r3a"); // rep = ND_rep(find(n)); UNSUPPORTED("46t01tbbri501pur6cw0iwvs3"); // if (!bot) bot = makeXnode(Xg,"\177bot"); UNSUPPORTED("5hobrjtzylmppobf8pdnq7rhk"); // agedge(Xg, rep, bot, 0, 1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6qtb53kac7myad1p5cy3wf89i"); // if (top && bot) { UNSUPPORTED("2ydmagof3r394ooo3v0twq5us"); // e = agedge(Xg, top, bot, 0, 1); UNSUPPORTED("5s7xl2rvkq0dxxapwrubcmv9p"); // merge(e, 0, 1000); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bkafc0cyfhu7g619r30g2vtmg"); // for (sub = agfstsubg(g); sub; sub = agnxtsubg(sub)) UNSUPPORTED("br6bnlza0f68fwkd0sbsfznv5"); // compile_clusters(sub, Xg, top, bot); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 93ycqhupenif7m6n70yj2rptv // static void reverse_edge2(graph_t * g, edge_t * e) public static Object reverse_edge2(Object... arg) { UNSUPPORTED("aa57ihhjujmpk9d1fjnh7uhn2"); // static void reverse_edge2(graph_t * g, edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("32j70piql6r327tbseq7o0k28"); // edge_t *rev; UNSUPPORTED("ankp6nch7e9a18lqb2heot7yf"); // rev = (agedge(g,aghead(e),agtail(e),NULL,0)); UNSUPPORTED("8c5hijvd5kr4lynpc8zoa0b9l"); // if (!rev) UNSUPPORTED("3tf0rz74jsukbjti74suklmrr"); // rev = agedge(g, aghead(e), agtail(e), 0, 1); UNSUPPORTED("a37ttwpda0n66ej1agvpbx9u"); // merge(rev, ED_minlen(e), ED_weight(e)); UNSUPPORTED("ae7ymr0zymf63zpp3vzny1kw5"); // agdelete(g, e); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 75994nd7ifrh2xjk0eei7kj04 // static void dfs(graph_t * g, node_t * v) public static Object dfs(Object... arg) { UNSUPPORTED("e728nuv7n4wyffryp1y6ny8no"); // static void dfs(graph_t * g, node_t * v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9b48a157azcrz2ihzqehhpsvs"); // edge_t *e, *f; UNSUPPORTED("9cx417bj13sr8qn5zfj0zllwm"); // node_t *w; UNSUPPORTED("701du899u3x4bjilnoar3a2me"); // if (ND_mark(v)) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("3dxrqgsmycugkp3qprexbuawx"); // ND_mark(v) = NOT(0); UNSUPPORTED("9z9a3g70rwq874kmknu0re0w0"); // ND_onstack(v) = NOT(0); UNSUPPORTED("3twcq4i177ymcmm9hj6l996fr"); // for (e = agfstout(g, v); e; e = f) { UNSUPPORTED("9oaziib9dhmc3xyk6ku5rco5a"); // f = agnxtout(g, e); UNSUPPORTED("bqi3fu38n0i7mblfl3ycwdjuo"); // w = aghead(e); UNSUPPORTED("1pq8rawujka41xkc0ujz0c4jl"); // if (ND_onstack(w)) UNSUPPORTED("cxzlqoajcjsygpeg1218t5uh8"); // reverse_edge2(g, e); UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("1w7s47988wvu89n176ee6lnii"); // if (ND_mark(w) == 0) UNSUPPORTED("d5xmvav6dfdviu7ikabr84w6g"); // dfs(g, w); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8o0qmsv6vkvey8j3nrtn0z3nd"); // ND_onstack(v) = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dt90swbhv55qox6i9anmtxctb // static void break_cycles(graph_t * g) public static Object break_cycles(Object... arg) { UNSUPPORTED("d7jjxsr59cimfe921b021ndni"); // static void break_cycles(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("16hw9gw0dz2w7mrtba0eoqrdi"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("3hbdxz1mh0xcb0h1e1gea41u4"); // ND_mark(n) = ND_onstack(n) = 0; UNSUPPORTED("16hw9gw0dz2w7mrtba0eoqrdi"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("15bqemmbeo0l42s4hi394weuz"); // dfs(g, n); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8wnczo1mkpxdobt1qmszr6m9f // static void setMinMax (graph_t* g, int doRoot) public static Object setMinMax(Object... arg) { UNSUPPORTED("5hvfkvu5sx7btm870992ll8rq"); // static void setMinMax (graph_t* g, int doRoot) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1cpavh3irbeilfgefcbzvnl04"); // int c, v; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("eygm2jbvlhvevem9cgvzdsnoi"); // node_t* leader; UNSUPPORTED("8lepc7wxus3ce9jmpjg54nxtw"); // /* Do child clusters */ UNSUPPORTED("7z5fb6iyowsosn1hiz7opeoc6"); // for (c = 1; c <= GD_n_cluster(g); c++) UNSUPPORTED("8r4qwge4bz0777mdq5rt0ojei"); // setMinMax(GD_clust(g)[c], 0); UNSUPPORTED("3x63fs1jyz7xhzx9gygufh7wx"); // if (!GD_parent(g) && !doRoot) // root graph UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("65ovv0jsp2kemyp7179cotrqh"); // GD_minrank(g) = MAXSHORT; UNSUPPORTED("4rx9wnlw0uumqfzcjtyg9rpfl"); // GD_maxrank(g) = -1; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("5wsvwyjckf81tdlqonfb9nvhu"); // v = ND_rank(n); UNSUPPORTED("bbcqt8euig2s31zz814pp52cw"); // if (GD_maxrank(g) < v) UNSUPPORTED("3cfkrpa6pt2hni0tkp45ybvtz"); // GD_maxrank(g) = v; UNSUPPORTED("3vjkf11cl59z0q8i5mfju17se"); // if (GD_minrank(g) > v) { UNSUPPORTED("cze1fj82fd8cmalgawkse3gy"); // GD_minrank(g) = v; UNSUPPORTED("73jlqlf2bn3kx7i020menpfcw"); // leader = n; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5j1zsofmtglx1esxwbstti1un"); // GD_leader(g) = leader; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1rsds60zu7vl5g6sqr3ielup6 // static void readout_levels(graph_t * g, graph_t * Xg, int ncc) public static Object readout_levels(Object... arg) { UNSUPPORTED("5rkflwuoyx87w4zl80k9x22hy"); // static void readout_levels(graph_t * g, graph_t * Xg, int ncc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("889z71siph20icfcbycjqnicp"); // node_t *xn; UNSUPPORTED("a76n98ruj81c10y11ge1t5f71"); // int* minrk = NULL; UNSUPPORTED("8kdgedl9jvch9df0ltm68vfas"); // int doRoot = 0; UNSUPPORTED("65ovv0jsp2kemyp7179cotrqh"); // GD_minrank(g) = MAXSHORT; UNSUPPORTED("4rx9wnlw0uumqfzcjtyg9rpfl"); // GD_maxrank(g) = -1; UNSUPPORTED("almasgzi7eeks0c5qj1cne0ma"); // if (ncc > 1) { UNSUPPORTED("bbuxsg26kpzb2fl660hjri9l8"); // int i; UNSUPPORTED("dl79ga1rb2mw8udgcp9s69msx"); // minrk = (int*)zmalloc((ncc+1)*sizeof(int)); UNSUPPORTED("2e6gemf3dl8erdtw782hcarc0"); // for (i = 1; i <= ncc; i++) UNSUPPORTED("dd010jlvkjz1z7fowihz8s25o"); // minrk[i] = MAXSHORT; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("dfofew00g6pxf2nxt4l881l0i"); // xn = ND_rep(find(n)); UNSUPPORTED("qp65iwqtnpliswz9lpihtuzc"); // ND_rank(n) = ND_rank(xn); UNSUPPORTED("68vv0lam9vxeuk3fg60ad5w6g"); // if (GD_maxrank(g) < ND_rank(n)) UNSUPPORTED("2v65dy95gqvsnppoelwwl8ayh"); // GD_maxrank(g) = ND_rank(n); UNSUPPORTED("3ozq6tqfxcegom34qkyrrxnfg"); // if (GD_minrank(g) > ND_rank(n)) UNSUPPORTED("duyud2jy9uf1rbcis84c3lsj6"); // GD_minrank(g) = ND_rank(n); UNSUPPORTED("5hf6jaqj5exe9r41fzbjl28ys"); // if (minrk) { UNSUPPORTED("2m02fq9wavpk0rfm07klg50p0"); // ND_hops(n) = ND_hops(xn); UNSUPPORTED("1kpcg7olwm9sb9fw0cw9xov8p"); // minrk[ND_hops(n)] = MIN(minrk[ND_hops(n)],ND_rank(n)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6grm8jag5924kjntwhi98yt6v"); // if (minrk) { UNSUPPORTED("eg21iwn9eqyjsoisl58nl8i36"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("1xy7cyvcmd5jh134wfd4hkd73"); // ND_rank(n) -= minrk[ND_hops(n)]; UNSUPPORTED("3h50jqntcutttxjjqk9e7qrp9"); // /* Non-uniform shifting, so recompute maxrank/minrank of root graph */ UNSUPPORTED("7cxmg4tvzh3us2wx1hpur4ify"); // doRoot = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("19s4z0qdne7jghr6qco9pewkb"); // else if (GD_minrank(g) > 0) { /* should never happen */ UNSUPPORTED("ekheljktcnka7fv7odg7w4w0b"); // int delta = GD_minrank(g); UNSUPPORTED("eg21iwn9eqyjsoisl58nl8i36"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("6xuxsgiblao234kr6ifzzngj"); // ND_rank(n) -= delta; UNSUPPORTED("205yra8usg0d60ou7fdef8sb8"); // GD_minrank(g) -= delta; UNSUPPORTED("1l0r03kgtm5wfa9w1tb2o6pst"); // GD_maxrank(g) -= delta; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bfa83r7gfvl4so45ea11h6hs8"); // setMinMax(g, doRoot); UNSUPPORTED("1oeld9qf035o8gav2314scxai"); // /* release fastgraph memory from Xg */ UNSUPPORTED("4uue9kqy9xt1y7qinhilyp73p"); // for (n = agfstnode(Xg); n; n = agnxtnode(Xg, n)) { UNSUPPORTED("6uowedfybay0zqxujx4izx5eb"); // free_list(ND_in(n)); UNSUPPORTED("9ma0k3ktcua915egahxrgo1f"); // free_list(ND_out(n)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("13jrnqbzc7n4ujm1kc140syrh"); // free(ND_alg(agfstnode(g))); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("6acp2mmds4i0gjn21ospjdm1i"); // ND_alg(n) = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("xlaantr4lfd0cf3p6fhyfjii"); // if (minrk) UNSUPPORTED("2quf4kce4g997p8lptbe0s678"); // free (minrk); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6wyn9t7y4rni0tldyaap4zsg4 // static void dfscc(graph_t * g, node_t * n, int cc) public static Object dfscc(Object... arg) { UNSUPPORTED("9rlus4sokq2q7mrelfhcyeq9t"); // static void dfscc(graph_t * g, node_t * n, int cc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("6xj79bn6cjnne89udj4eccjbq"); // if (ND_hops(n) == 0) { UNSUPPORTED("2ug68j3zfpl1hhipj43mlacw4"); // ND_hops(n) = cc; UNSUPPORTED("8gbd6b2ssf51om8neirzzr6rw"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) UNSUPPORTED("1petrc5reriuz99j26l6kvk9g"); // dfscc(g, aghead(e), cc); UNSUPPORTED("c9yz11pm5cux1tvh62xx2kwle"); // for (e = agfstin(g, n); e; e = agnxtin(g, e)) UNSUPPORTED("4gm4tqnmznd5xu1jmel9vdwu0"); // dfscc(g, agtail(e), cc); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4n4sn2k04eosjc6v3amau8l89 // static int connect_components(graph_t * g) public static Object connect_components(Object... arg) { UNSUPPORTED("93546dpzyvd2lgopztw3kyszh"); // static int connect_components(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3zjt2iwedrvoc4tjrhcgrj2kp"); // int cc = 0; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("16hw9gw0dz2w7mrtba0eoqrdi"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("5yepsj8ho954ywprktudr66m8"); // ND_hops(n) = 0; UNSUPPORTED("16hw9gw0dz2w7mrtba0eoqrdi"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("12mke9q9ufte7dz3juk9xj03o"); // if (ND_hops(n) == 0) UNSUPPORTED("1hzimiukrcikr5ja8r8jsy6mg"); // dfscc(g, n, ++cc); UNSUPPORTED("16hhes6efkztzuw8ooeyr7duq"); // if (cc > 1) { UNSUPPORTED("aen3uv1t10s8e76c30y8j0051"); // node_t *root = makeXnode(g, "\177root"); UNSUPPORTED("bzbr2vqual2twjcg2p2sffsd4"); // int ncc = 1; UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("eci2j6e8io07039308zl0no88"); // if (ND_hops(n) == ncc) { UNSUPPORTED("7rj8qzz8d2u85i7gf6c4rs62m"); // (void) agedge(g, root, n, 0, 1); UNSUPPORTED("cgm8ehtyoyn2ybwnrxvfx1cv8"); // ncc++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("95z6nz9mlol4p31l239u0zyz1"); // return (cc); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lj0r4q3ulap7ly9cvvqn3d0t // static void add_fast_edges (graph_t * g) public static Object add_fast_edges(Object... arg) { UNSUPPORTED("9od2j2a8s9ki669jghjqrkcym"); // static void add_fast_edges (graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("1xm961cuv38vb1rckbyfsk5a8"); // elist_append(e, ND_out(n)); UNSUPPORTED("30covjl73nxramgd8lw1apbkm"); // elist_append(e, ND_in(aghead(e))); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2xyhunzw903dytfpyy63oznhz // static void my_init_graph(Agraph_t *g, Agobj_t *graph, void *arg) public static Object my_init_graph(Object... arg) { UNSUPPORTED("3s5gmr0i7qaf8sa79h9ek2t42"); // static void my_init_graph(Agraph_t *g, Agobj_t *graph, void *arg) UNSUPPORTED("12ubgsqsc8d2oeobshclx2e9m"); // { int *sz = arg; agbindrec(graph,"level graph rec",sz[0],NOT(0)); } throw new UnsupportedOperationException(); } //3 1vibj3ycvfkl07m1a2dzr3qf3 // static void my_init_node(Agraph_t *g, Agobj_t *node, void *arg) public static Object my_init_node(Object... arg) { UNSUPPORTED("448m4h3oktm1kylrq3iss782r"); // static void my_init_node(Agraph_t *g, Agobj_t *node, void *arg) UNSUPPORTED("3mooa3mwczxhc97acdygow0sx"); // { int *sz = arg; agbindrec(node,"level node rec",sz[1],NOT(0)); } throw new UnsupportedOperationException(); } //3 avor9syqevkn2jo4yf8whbg5f // static void my_init_edge(Agraph_t *g, Agobj_t *edge, void *arg) public static Object my_init_edge(Object... arg) { UNSUPPORTED("bo6poh3fcfvu02sod3dyzjhsi"); // static void my_init_edge(Agraph_t *g, Agobj_t *edge, void *arg) UNSUPPORTED("4f0jw3wys20zimucjor8qrhzg"); // { int *sz = arg; agbindrec(edge,"level edge rec",sz[2],NOT(0)); } throw new UnsupportedOperationException(); } //1 46nx7przjp7fn42o28hqdaj9k // static Agcbdisc_t mydisc = //1 9quqxw3oujl7u6bymimr5be7t // int infosizes[] = //3 590k5zi3mrpwbc3lib0w3rmr2 // void dot2_rank(graph_t * g, aspect_t* asp) public static Object dot2_rank(Object... arg) { UNSUPPORTED("d8gu9ua6rerpv9vz9ctco1ca2"); // void dot2_rank(graph_t * g, aspect_t* asp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("23k65agnd27tv4ix9teds9e2t"); // int ssize; UNSUPPORTED("dx1unsp79t4ji8dh8idt48jrc"); // int ncc, maxiter = INT_MAX; UNSUPPORTED("8yytudftst76763qgnjebkzhm"); // char *s; UNSUPPORTED("dxlxz9md3d6r12wog4x5sc7td"); // graph_t *Xg; UNSUPPORTED("hibhvgkp511r6u6ips8yb0un"); // Last_node = NULL; UNSUPPORTED("ey4p0fjtw4ac18jh9svmzjs23"); // Xg = agopen("level assignment constraints", Agstrictdirected, 0); UNSUPPORTED("e4j7z7nfe33svydzyn4w6abcy"); // agbindrec(Xg,"level graph rec",sizeof(Agraphinfo_t),NOT(0)); UNSUPPORTED("4j4bkw2k5v7xlf7ycqcrz8qip"); // agpushdisc(Xg,&mydisc,infosizes); UNSUPPORTED("d4pjn5ef0ywzmhe2fshhm8bvn"); // edgelabel_ranks(g); UNSUPPORTED("e0rdg08m66a12fiixgkjnyrbj"); // if ((s = agget(g, "nslimit1"))) UNSUPPORTED("9tp2zk1tsr4ce9rwsr0is9u3o"); // maxiter = atof(s) * agnnodes(g); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("dapt7hf1vwq593la2oydyrv27"); // maxiter = INT_MAX; UNSUPPORTED("62k95fm4s1z2wzcyg28ir0x7u"); // compile_samerank(g, 0); UNSUPPORTED("bh9imh5owlj1c9ad7mime392x"); // compile_nodes(g, Xg); UNSUPPORTED("3kxtahvovojtzi6qqnrricpoo"); // compile_edges(g, Xg); UNSUPPORTED("9twf7u3r2hzeic9w0gmvh10bc"); // compile_clusters(g, Xg, 0, 0); UNSUPPORTED("cwrov5g30logh4g9omvkblonh"); // break_cycles(Xg); UNSUPPORTED("3ficrpbhiwichejg6n1hshz7k"); // ncc = connect_components(Xg); UNSUPPORTED("9x72se4xuqwfv27jlqpmivrwb"); // add_fast_edges (Xg); UNSUPPORTED("2yazmwrpb1ni51wuck3ruvi2j"); // if (asp) { UNSUPPORTED("8ow3lzc6gh107g9bcn4szm7hj"); // init_UF_size(Xg); UNSUPPORTED("9503vlimf1i2zv76ua88ooepc"); // initEdgeTypes(Xg); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b65fc1791mzxccp9zzxi8vk12"); // if ((s = agget(g, "searchsize"))) UNSUPPORTED("aqd144wenl3zq15bwc41u9aha"); // ssize = atoi(s); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("2n4z8w1w3il45lik0kraspkud"); // ssize = -1; UNSUPPORTED("aotd35u0hficqt6hlkw8xof03"); // rank2(Xg, 1, maxiter, ssize); UNSUPPORTED("4x9mvgxbdou6xj4n98rwzucgi"); // /* fastgr(Xg); */ UNSUPPORTED("8un6x92pzddrzsnq8y95af4m6"); // readout_levels(g, Xg, ncc); UNSUPPORTED("6rs6sp7mefzzbf02kfmvycnaq"); // agclose(Xg); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/dotgen/sameport__c.java000066400000000000000000001027541312650303100224130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.dotgen; import static gen.lib.cgraph.attr__c.agattr; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGEDGE; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.boxf; import h.pointf; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Z; import smetana.core.__struct__; public class sameport__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eu2yvovb9xx4rzic3gllij2bv // void dot_sameports(graph_t * g) public static void dot_sameports(Agraph_s g) { ENTERING("eu2yvovb9xx4rzic3gllij2bv","dot_sameports"); try { Agnode_s n; Agedge_s e; CString id; //same_t samehead[5]; //same_t sametail[5]; int n_samehead; /* number of same_t groups on current node */ int n_sametail; /* number of same_t groups on current node */ int i; Z.z().E_samehead = agattr(g, AGEDGE, new CString("samehead"),null); Z.z().E_sametail = agattr(g, AGEDGE, new CString("sametail"),null); if (N(Z.z().E_samehead!=null || Z.z().E_sametail!=null)) return; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("4roxmr5lxkjz6gn1j9mndurq2"); // n_samehead = n_sametail = 0; UNSUPPORTED("8oxob1qbbkbjh0jjcogk42jfl"); // for (e = agfstedge(g, n); e; e = agnxtedge(g, e, n)) { UNSUPPORTED("4gy7rakqurxvound05crezka2"); // if (aghead(e) == agtail(e)) continue; /* Don't support same* for loops */ UNSUPPORTED("2r5fkddp1ey0fvpok2scgkk99"); // if (aghead(e) == n && E_samehead && UNSUPPORTED("d38ofiemhq37ykyauh9wync84"); // (id = agxget(e, E_samehead))[0]) UNSUPPORTED("18y7dy98psh7ultlx0jugsfu2"); // n_samehead = sameedge(samehead, n_samehead, n, e, id); UNSUPPORTED("5snv0fee5roi91irdwv8x51xi"); // else if (agtail(e) == n && E_sametail && UNSUPPORTED("8xvjbvzldkn1yksprzfexgsjs"); // (id = agxget(e, E_sametail))[0]) UNSUPPORTED("cdn1fgq1pke9ekyar2b4r6e91"); // n_sametail = sameedge(sametail, n_sametail, n, e, id); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c96gtgvp5uw8ktp389l2s9l4u"); // for (i = 0; i < n_samehead; i++) { UNSUPPORTED("b2s9feywib1q9pxw4h31yz6dk"); // if (samehead[i].l.size > 1) UNSUPPORTED("1xvsmwfz2hihjki8tsqiaa1g8"); // sameport(n, &samehead[i].l, samehead[i].arr_len); UNSUPPORTED("cpzvkkchr60qet357b9gg1e5q"); // free_list(samehead[i].l); UNSUPPORTED("6cnsuklvjftdyhzat6za4qggi"); // /* I sure hope I don't need to free the char* id */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9ktz8j6cseb5w7jkfhrj5r19t"); // for (i = 0; i < n_sametail; i++) { UNSUPPORTED("5vcqm1irqrqcg4f6ldrqkikq8"); // if (sametail[i].l.size > 1) UNSUPPORTED("dcjzqns8bm1o766uqi8dy72qf"); // sameport(n, &sametail[i].l, sametail[i].arr_len); UNSUPPORTED("13a7frulpyheo0h4ajbfja7ph"); // free_list(sametail[i].l); UNSUPPORTED("6cnsuklvjftdyhzat6za4qggi"); // /* I sure hope I don't need to free the char* id */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("eu2yvovb9xx4rzic3gllij2bv","dot_sameports"); } } //3 e6phoefj4ujntgmpiclbnmliw // static int sameedge(same_t * same, int n_same, node_t * n, edge_t * e, char *id) public static Object sameedge(Object... arg) { UNSUPPORTED("4pviw1spiyvhdz8yvl4ho6qkx"); // static int sameedge(same_t * same, int n_same, node_t * n, edge_t * e, char *id) UNSUPPORTED("bz7wamuuo5855unp564487v13"); // /* register E in the SAME structure of N under ID. Uses static int N_SAME */ UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ddmbnep3k060w2rgslisky5vw"); // int i, sflag, eflag, flag; UNSUPPORTED("4yhtj0buzrukmv0lwrz77s5oa"); // for (i = 0; i < n_same; i++) UNSUPPORTED("6htdinsa3h8aamp1e6pvd6ig5"); // if ((*(same[i].id)==*(id)&&!strcmp(same[i].id,id))) { UNSUPPORTED("bqrcn2qjykhnd6fuwneng85h"); // elist_append(e, same[i].l); UNSUPPORTED("g5anfkdhikcxt42clvstq6hm"); // goto set_arrow; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8ac5s7v71vxuj2d2r4t989b1c"); // if (++n_same > 5) { UNSUPPORTED("c29filv0jivh50blpbuqjk5ib"); // n_same--; UNSUPPORTED("3uf43hfdusyzm1vp3dq12qu29"); // agerr(AGERR, "too many (> %d) same{head,tail} groups for node %s\n", UNSUPPORTED("ciwytw61x3j4anugbarxaa7m"); // 5, agnameof(n)); UNSUPPORTED("3lrnrroeosc48ilq0azgtzyna"); // return n_same; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("36d7os443e3k5gf7g7zvi3vfs"); // alloc_elist(1, same[i].l); UNSUPPORTED("3s0n702bprlxue4xtghqv3nad"); // elist_fastapp(e, same[i].l); UNSUPPORTED("cwxcw0cnsxpwkd7l94pmw1dfg"); // same[i].id = id; UNSUPPORTED("4y2b9aw2a57zud1ncpiw2fihn"); // same[i].n_arr = 0; UNSUPPORTED("2lemlhm6qdqemg83e6xwyzd01"); // same[i].arr_len = 0; UNSUPPORTED("3k68ve2sycumnr4ncfzymgyli"); // set_arrow: UNSUPPORTED("4028w60fcyzgcb6qh4kf8090j"); // arrow_flags(e, &sflag, &eflag); UNSUPPORTED("1rkfoax4tin2ccbtpc8w1tnpv"); // if ((flag = aghead(e) == n ? eflag : sflag)) UNSUPPORTED("bhh3lvo0knve8fiod7js8o8oy"); // same[i].arr_len = UNSUPPORTED("b7yh5042d5o8u6iso9bm39glf"); // /* only consider arrows if there's exactly one arrow */ UNSUPPORTED("5r1jxkep2wvpcpjz1e6n0dxo7"); // (++same[i].n_arr == 1) ? arrow_length(e, flag) : 0; UNSUPPORTED("59a2z18u4tje6r407a6psdqy8"); // return n_same; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2mnqx0mihpyo94rckzyvqd3ha // static void sameport(node_t * u, elist * l, double arr_len) public static Object sameport(Object... arg) { UNSUPPORTED("5h4o73bwixguohs97owrtr8ef"); // static void sameport(node_t * u, elist * l, double arr_len) UNSUPPORTED("d5nznmmgnjszlfjdd61kps3jx"); // /* make all edges in L share the same port on U. The port is placed on the UNSUPPORTED("bo9mbi1sf1ycc8zr8zucow3sz"); // node boundary and the average angle between the edges. FIXME: this assumes UNSUPPORTED("4jpc10q4iiglyfgqc4t0rvtce"); // naively that the edges are straight lines, which is wrong if they are long. UNSUPPORTED("wh2ex8xlk21eu1y33pacj3v2"); // In that case something like concentration could be done. UNSUPPORTED("4c9tqu2byiozzo2mzc1fbvda9"); // An arr_port is also computed that's ARR_LEN away from the node boundary. UNSUPPORTED("atdcc5pbds8mqzssaq6v0r6rw"); // It's used for edges that don't themselves have an arrow. UNSUPPORTED("bnetqzovnscxile7ao44kc0qd"); // */ UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aigogf44ojtcesuy4xs7inqbn"); // node_t *v; UNSUPPORTED("9b48a157azcrz2ihzqehhpsvs"); // edge_t *e, *f; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("e39yybz8f8dk5960upp4t7e85"); // double x = 0, y = 0, x1, y1, x2, y2, r; UNSUPPORTED("cmzlbdlia0ky3ulmkmhw731vo"); // port prt; UNSUPPORTED("lnwbe9uftcv8uw5w72tyaim6"); // int sflag, eflag; UNSUPPORTED("3s75qjxnr416bs4xwntk5wjey"); // /* Compute the direction vector (x,y) of the average direction. We compute UNSUPPORTED("168uvy6red5coj19cfwdg74w4"); // with direction vectors instead of angles because else we have to first UNSUPPORTED("byd7rdw7ogomu0h8xa3cngptx"); // bring the angles within PI of each other. av(a,b)!=av(a,b+2*PI) */ UNSUPPORTED("7qdtxp882tja3q4pjpimsdpz2"); // for (i = 0; i < l->size; i++) { UNSUPPORTED("9a2w9ypg4zbrmt9mwxerl9ku9"); // e = l->list[i]; UNSUPPORTED("dmcddmsjj52vhbo0p72d20r7x"); // if (aghead(e) == u) UNSUPPORTED("4gg5n60ynsciy3te5bmvsjdu0"); // v = agtail(e); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("39bh91n8ucstjr8vmtx3ynvcd"); // v = aghead(e); UNSUPPORTED("3bzvithkkr721ghsi2ljswz41"); // x1 = ND_coord(v).x - ND_coord(u).x; UNSUPPORTED("2b884aalfpupcphtkwlw7fh1p"); // y1 = ND_coord(v).y - ND_coord(u).y; UNSUPPORTED("2bo8vt6om92qnyd8ajsur7839"); // r = hypot(x1, y1); UNSUPPORTED("8ldeax6x9cgrmbfybuxbl5n3o"); // x += x1 / r; UNSUPPORTED("lvaxvfnj6g12uz2apxvc32bt"); // y += y1 / r; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a1mnn3lz9vym0mycdnjtnqt50"); // r = hypot(x, y); UNSUPPORTED("en33l6y6hjb8cbouawh4qgny1"); // x /= r; UNSUPPORTED("7ogy0bdt0ghq60m7dyzb48vku"); // y /= r; UNSUPPORTED("1zwmby4z9dnptpyvedi7zqx1y"); // /* (x1,y1),(x2,y2) is a segment that must cross the node boundary */ UNSUPPORTED("aezmu3kg51jsv6vuj8yl2vgx0"); // x1 = ND_coord(u).x; UNSUPPORTED("b9lds1fhngov0656kxk71v6o"); // y1 = ND_coord(u).y; /* center of node */ UNSUPPORTED("a47id67bq23txqyol6w89ohg8"); // r = MAX(ND_lw(u) + ND_rw(u), ND_ht(u) + GD_ranksep(agraphof(u))); /* far away */ UNSUPPORTED("632ifec281b8hg0vql6w66fd0"); // x2 = x * r + ND_coord(u).x; UNSUPPORTED("tpm4a8o4c87dctdvop70l3gg"); // y2 = y * r + ND_coord(u).y; UNSUPPORTED("9axcwk1yl7elzq5ch7zzsg2b"); // { /* now move (x1,y1) to the node boundary */ UNSUPPORTED("6qp76u7xiuyi81ocft3zna7rw"); // pointf curve[4]; /* bezier control points for a straight line */ UNSUPPORTED("d2banip9m2nhni4tcg0ub95sb"); // curve[0].x = x1; UNSUPPORTED("jy2q28s2gzpbigtocfoo6cy6"); // curve[0].y = y1; UNSUPPORTED("90jm80vushtpjetfmrlks5tr6"); // curve[1].x = (2 * x1 + x2) / 3; UNSUPPORTED("ah6xwuv1rqq311cmwhnrs4p7g"); // curve[1].y = (2 * y1 + y2) / 3; UNSUPPORTED("5nzdtvblt406q4j887woceaso"); // curve[2].x = (2 * x2 + x1) / 3; UNSUPPORTED("8ccq8nqc6cwcgqyrls16i5n1x"); // curve[2].y = (2 * y2 + y1) / 3; UNSUPPORTED("9e73i3zoi98jcem56ovsw95mw"); // curve[3].x = x2; UNSUPPORTED("bt1idr0p5w37ehw0ca5qvh2d0"); // curve[3].y = y2; UNSUPPORTED("4hvdnsqv9gvg89n449ivew89w"); // shape_clip(u, curve); UNSUPPORTED("e8zqbvvz0hnmxynqrsi4tq6z9"); // x1 = curve[0].x - ND_coord(u).x; UNSUPPORTED("10uhdsyhabakyucrrlkpxmy39"); // y1 = curve[0].y - ND_coord(u).y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ftxzqcd66xy9t3i1shc08phg"); // /* compute PORT on the boundary */ UNSUPPORTED("egqrua11zla4ilqnv8fe2rqa9"); // prt.p.x = ROUND(x1); UNSUPPORTED("3j43h2ta90714rhr89dxd9bly"); // prt.p.y = ROUND(y1); UNSUPPORTED("72f3ncaut57fflmrrrd7g625i"); // prt.bp = 0; UNSUPPORTED("86dw0xu09q0vf963rwyhthsga"); // prt.order = UNSUPPORTED("bi7e99txixk5vn16uz1ewze60"); // (256 * (ND_lw(u) + prt.p.x)) / (ND_lw(u) + ND_rw(u)); UNSUPPORTED("2ssajop92yd2a8y22o22ea36z"); // prt.constrained = 0; UNSUPPORTED("6oy9nbi9ensh5cuoda16glfkk"); // prt.defined = NOT(0); UNSUPPORTED("9vfrhc8s3bav5vsioug70ec8a"); // prt.clip = 0; UNSUPPORTED("58u5npq8vw06285kpx39zg9us"); // prt.dyna = 0; UNSUPPORTED("26hzjlrn2f97g04rs41bxd6cp"); // prt.theta = 0; UNSUPPORTED("6r9ivoxmq49o3gv1yto4zyvi3"); // prt.side = 0; UNSUPPORTED("aujriwmmb49o2fxrmsjoedap6"); // prt.name = NULL; UNSUPPORTED("3ff91qop4adzc4f4h1lnljqyp"); // /* assign one of the ports to every edge */ UNSUPPORTED("7qdtxp882tja3q4pjpimsdpz2"); // for (i = 0; i < l->size; i++) { UNSUPPORTED("9a2w9ypg4zbrmt9mwxerl9ku9"); // e = l->list[i]; UNSUPPORTED("84n057olv326z2v8k45silocb"); // arrow_flags(e, &sflag, &eflag); UNSUPPORTED("2csv6mfvww0031xz126km61c5"); // for (; e; e = ED_to_virt(e)) { /* assign to all virt edges of e */ UNSUPPORTED("9rrwjg2l48y4n9w7ymrr9udrs"); // for (f = e; f; UNSUPPORTED("cd9trmrmocvmp9gcd5yhpi8j2"); // f = ED_edge_type(f) == 1 && UNSUPPORTED("c609sm2glgudtov2qxajroomq"); // ND_node_type(aghead(f)) == 1 && UNSUPPORTED("ez0iln0wthfexsk2addlvf968"); // ND_out(aghead(f)).size == 1 ? UNSUPPORTED("3c7kng7zq5tuk7q0g4368f83a"); // ND_out(aghead(f)).list[0] : NULL) { UNSUPPORTED("au8chupq2urgaefasiz9q9p4"); // if (aghead(f) == u) UNSUPPORTED("9n4w8egcjmjwmkgptavq9x8on"); // ED_head_port(f) = prt; UNSUPPORTED("ckzw343313p1917g5yol8mget"); // if (agtail(f) == u) UNSUPPORTED("es5btobfx5kd4ziscx7ym4kf7"); // ED_tail_port(f) = prt; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("9rrwjg2l48y4n9w7ymrr9udrs"); // for (f = e; f; UNSUPPORTED("cd9trmrmocvmp9gcd5yhpi8j2"); // f = ED_edge_type(f) == 1 && UNSUPPORTED("9po6nu7kgaeigs2afm08whv2o"); // ND_node_type(agtail(f)) == 1 && UNSUPPORTED("49xjryc5nmnom413y2dy0v7gh"); // ND_in(agtail(f)).size == 1 ? UNSUPPORTED("91kaqt4bbz94s6de4uf9wept7"); // ND_in(agtail(f)).list[0] : NULL) { UNSUPPORTED("au8chupq2urgaefasiz9q9p4"); // if (aghead(f) == u) UNSUPPORTED("9n4w8egcjmjwmkgptavq9x8on"); // ED_head_port(f) = prt; UNSUPPORTED("ckzw343313p1917g5yol8mget"); // if (agtail(f) == u) UNSUPPORTED("es5btobfx5kd4ziscx7ym4kf7"); // ED_tail_port(f) = prt; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("d7reofoel6ngjj7zza32cdi0w"); // ND_has_port(u) = NOT(0); /* kinda pointless, because mincross is already done */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/fdpgen/000077500000000000000000000000001312650303100172275ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/lib/fdpgen/clusteredges__c.java000066400000000000000000001075071312650303100232360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.fdpgen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class clusteredges__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cazo65w26cb7zxlhvziqega3u // static void addObj(objlist * l, Ppoly_t * obj) public static Object addObj(Object... arg) { UNSUPPORTED("68ir75ozfvgoainxyrw5vv6u"); // static void addObj(objlist * l, Ppoly_t * obj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("56aokw43ym6k5yrowmz4auad6"); // if (l->sz == l->cnt) { UNSUPPORTED("9w4469475x6atzc9cxogvrgf0"); // if (l->obs) { UNSUPPORTED("aodoni8dj9928k2u2pvprijoo"); // l->sz *= 2; UNSUPPORTED("9lucolec5stqwgfeiajr80rd0"); // l->obs = RALLOC(l->sz, l->obs, Ppoly_t *); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("6155khghdropbhobvg4z91wtz"); // l->obs = (Ppoly_t **)gmalloc((100)*sizeof(Ppoly_t *)); UNSUPPORTED("2kyhgdz2n2rqq9v50pve6mrcc"); // l->sz = 100; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9fec1if3p7yqy365qx9r0tgnd"); // l->obs[l->cnt++] = obj; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2hc0lli1r9xqarid48ykcsmrb // static void freeObjlist(objlist * l) public static Object freeObjlist(Object... arg) { UNSUPPORTED("5rlrs2szsmt9tyh4nxy15b6nm"); // static void freeObjlist(objlist * l) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7e3dhprbb95exqm0bcdah0xm"); // if (l) { UNSUPPORTED("497v1edoyig8dqncswxyve9hv"); // free(l->obs); UNSUPPORTED("asw773mx15gzsz3jglklf2cy0"); // free(l); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 db462cnfr9mcvhrrbcq5kjb3c // static void resetObjlist(objlist * l) public static Object resetObjlist(Object... arg) { UNSUPPORTED("bkfjyf4x65xmnacovlbfl7irl"); // static void resetObjlist(objlist * l) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("sdwhemlfzdg8pxghx7xntzqk"); // l->cnt = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7u5410kfyxwz50qdc35k0biva // static Ppoly_t *makeClustObs(graph_t * g, expand_t* pm) public static Object makeClustObs(Object... arg) { UNSUPPORTED("1atdy1ccj3vpva8swri61dxuh"); // static Ppoly_t *makeClustObs(graph_t * g, expand_t* pm) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("n3ntnupxz7s82qxid8l5zqh7"); // Ppoly_t *obs = (Ppoly_t*)zmalloc(sizeof(Ppoly_t)); UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("bkqli6ffyitb67sucragfrm1n"); // boxf newbb; UNSUPPORTED("21zakluzci2pyeegdamklrhah"); // Ppoint_t ctr; UNSUPPORTED("3pb1rp6yt77fdctds9bv6t2q4"); // bb = GD_bb(g); UNSUPPORTED("76n2ysymty762fc53vtvx69tb"); // obs->pn = 4; UNSUPPORTED("1nhlegzatoioft31pryhg7git"); // obs->ps = (Ppoint_t*)zmalloc((4)*sizeof(Ppoint_t)); UNSUPPORTED("6kdtobe8mpjvnkwsrxtbqzry0"); // ctr.x = (bb.UR.x + bb.LL.x) / 2.0; UNSUPPORTED("52v681rkx2cyhu5tj7bl6b87q"); // ctr.y = (bb.UR.y + bb.LL.y) / 2.0; UNSUPPORTED("b9ylh019dga6kmwgg8s918v2b"); // if (pm->doAdd) { UNSUPPORTED("2jzl6aoalcx6szthm1yfscowk"); // newbb.UR.x = bb.UR.x + pm->x; UNSUPPORTED("ti2qjcce1u6duftqdkaez2ha"); // newbb.UR.y = bb.UR.y + pm->y; UNSUPPORTED("4xk2pvd5wdu2oqhcd96hku34h"); // newbb.LL.x = bb.LL.x - pm->x; UNSUPPORTED("a194yx3lgzokre6nw7edhwl0g"); // newbb.LL.y = bb.LL.y - pm->y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("9iveb47ye8bn2ufeytxql6j8o"); // double deltax = pm->x - 1.0; UNSUPPORTED("33o91x85qnvttc9p0urfisnn9"); // double deltay = pm->y - 1.0; UNSUPPORTED("57q4i6f9mewdma9hnw006mhcf"); // newbb.UR.x = pm->x * bb.UR.x - deltax * ctr.x; UNSUPPORTED("3anxiwmvjxkga8exnqnpa7ryy"); // newbb.UR.y = pm->y * bb.UR.y - deltay * ctr.y; UNSUPPORTED("6lsi4f3jib8g8rgb30okpoaiq"); // newbb.LL.x = pm->x * bb.LL.x - deltax * ctr.x; UNSUPPORTED("aumjykojfbh0nmb4yjmj24v4g"); // newbb.LL.y = pm->y * bb.LL.y - deltay * ctr.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("wl74iy49jslxcn6y04gz6lh6"); // /* CW order */ UNSUPPORTED("6lurznrzif0rqk9j3nnydvf9l"); // obs->ps[0].x = newbb.LL.x; UNSUPPORTED("ezndie34wvqtl89309tiv0qzm"); // obs->ps[0].y = newbb.LL.y; UNSUPPORTED("alhjwe58p3zhewutc80g6owl"); // obs->ps[1].x = newbb.LL.x; UNSUPPORTED("b92a4mym5jehuzrijjz8fx1tf"); // obs->ps[1].y = newbb.UR.y; UNSUPPORTED("7zlq35pok991k3uqnzlrjrd22"); // obs->ps[2].x = newbb.UR.x; UNSUPPORTED("dicjthx9ai41sc20rp2zrdy2c"); // obs->ps[2].y = newbb.UR.y; UNSUPPORTED("9eh3ezpywhc0lvjx9azkomdp2"); // obs->ps[3].x = newbb.UR.x; UNSUPPORTED("89s7csqkxbkhvlh3ryr2mpej"); // obs->ps[3].y = newbb.LL.y; UNSUPPORTED("6h5c8fawl46f3z6k52c5evlck"); // return obs; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2tuxeyw0y73k5wh1niznsmt5r // static void addGraphObjs(objlist * l, graph_t * g, void *tex, void *hex, expand_t* pm) public static Object addGraphObjs(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("9ppvdniopgcaxvsicl8xxyash"); // addGraphObjs(objlist * l, graph_t * g, void *tex, void *hex, expand_t* pm) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5wyi0wasd5kecf6rhsqdjk7v2"); // graph_t *sg; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("afg3odhlqg7cs72be9dopel53"); // if (((ND_clust(n)) == g) && (n != tex) && (n != hex) UNSUPPORTED("5kytxdtwbd0v3ca7a34qluom7"); // && !(ND_clustnode(n))) { UNSUPPORTED("1o7vmgytpeh209omedfz7wilg"); // addObj(l, makeObstacle(n, pm, 0)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7naa6f8pevjidfr7m41eli6xj"); // for (i = 1; i <= GD_n_cluster(g); i++) { UNSUPPORTED("5va1fb20aidhd4ogxkydxr82v"); // sg = GD_clust(g)[i]; UNSUPPORTED("b98h20dc2b9r360etgk7ifsts"); // if ((sg != tex) && (sg != hex)) { UNSUPPORTED("4luk87lqntyj05goqup0cvyly"); // addObj(l, makeClustObs(sg, pm)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dnf5oh64u2taegrsdrqjwzjtl // static void raiseLevel(objlist * l, int maxlvl, void *ex, int minlvl, graph_t ** gp, expand_t* pm) public static Object raiseLevel(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("cffe7klesfnzw4ihflgw1kcx2"); // raiseLevel(objlist * l, int maxlvl, void *ex, int minlvl, graph_t ** gp, UNSUPPORTED("cv6gwbc45ynoxegpiqrlc2xmc"); // expand_t* pm) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aaouwma9zh64fj26pawnrmy0p"); // graph_t *g = *gp; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("eh1xg7smmmszocw99zkv3a594"); // for (i = maxlvl; i > minlvl; i--) { UNSUPPORTED("4o6m0fsp2ufber2muchghzceh"); // addGraphObjs(l, g, ex, NULL, pm); UNSUPPORTED("2xhhwh2osv9qp0iz6tkqhkbjf"); // ex = g; UNSUPPORTED("3roly1bhe7j0bcti8qwa0ybiw"); // g = (((gdata*)(GD_alg(g)))->parent); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bupe6i1evov3u4g754y05h4c3"); // *gp = (graph_t *) ex; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1j5lpgrus3ksq04e4n13s4yfg // static objlist *objectList(edge_t * ep, expand_t* pm) public static Object objectList(Object... arg) { UNSUPPORTED("afy03o9x8nl4yzvaizo1dscco"); // static objlist *objectList(edge_t * ep, expand_t* pm) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("75zd1aauvrffvfdpyfwwcoswd"); // node_t *h = aghead(ep); UNSUPPORTED("br3wb25zvrbmmm732vy1lixsy"); // node_t *t = agtail(ep); UNSUPPORTED("hf0qw8fizjiqe82qyzeqwkfg"); // graph_t *hg = (ND_clust(h)); UNSUPPORTED("4wvcxq0r8t7vnjbb8f985m0r4"); // graph_t *tg = (ND_clust(t)); UNSUPPORTED("6tujxck9mfc4xr1sngv012c0q"); // int hlevel; UNSUPPORTED("a4drnmepoxpz8ds5apcwe53nc"); // int tlevel; UNSUPPORTED("b963c6bsts6y4pmam1dfutk1q"); // void *hex; /* Objects to be excluded from list */ UNSUPPORTED("39nw57ol4dfiath5kwuh1ms6j"); // void *tex; UNSUPPORTED("evjwqb60yu11cr2t3w4w8gz9q"); // objlist *list = (objlist*)zmalloc(sizeof(objlist)); UNSUPPORTED("ehs9zskwfbobvbp4e1jc9gh2r"); // /* If either endpoint is a cluster node, we move up one level */ UNSUPPORTED("dutddcq97o2fasizi03xeqj5k"); // if ((ND_clustnode(h))) { UNSUPPORTED("bxzk3hw9ey0f3bfnv6wti4fk4"); // hex = hg; UNSUPPORTED("augf1sgt6l2ix99x9b08g8wzz"); // hg = (((gdata*)(GD_alg(hg)))->parent); UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("616d768zb2wgz3eg67szch1ld"); // hex = h; UNSUPPORTED("bx8ud3i22jfi2yp76cyl0gz7z"); // if ((ND_clustnode(t))) { UNSUPPORTED("bt0av95w1kbo7oy03hadoiwu7"); // tex = tg; UNSUPPORTED("dgktvvmo6c3p47c8wk7x50sa1"); // tg = (((gdata*)(GD_alg(tg)))->parent); UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("bt7neotqw8vmtctxgkppgj1vk"); // tex = t; UNSUPPORTED("6jekyhq0r4t21vi40i2swnbbl"); // hlevel = (((gdata*)(GD_alg(hg)))->level); UNSUPPORTED("4wub4zmd7w34rplc5o7l499wo"); // tlevel = (((gdata*)(GD_alg(tg)))->level); UNSUPPORTED("4o25v8wcis0loju3kjakvcut0"); // if (hlevel > tlevel) { UNSUPPORTED("abqhza09xtoj2awnzzuaj0uct"); // raiseLevel(list, hlevel, hex, tlevel, &hg, pm); UNSUPPORTED("bxzk3hw9ey0f3bfnv6wti4fk4"); // hex = hg; UNSUPPORTED("augf1sgt6l2ix99x9b08g8wzz"); // hg = (((gdata*)(GD_alg(hg)))->parent); UNSUPPORTED("alm7w50a8u7dgdn5qzfgtx9l"); // } else if (tlevel > hlevel) { UNSUPPORTED("c0ph47igemykx602d77ndmzr3"); // raiseLevel(list, tlevel, tex, hlevel, &tg, pm); UNSUPPORTED("bt0av95w1kbo7oy03hadoiwu7"); // tex = tg; UNSUPPORTED("dgktvvmo6c3p47c8wk7x50sa1"); // tg = (((gdata*)(GD_alg(tg)))->parent); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6gfz0blpmhfhryh0miheyhwmw"); // /* hg and tg always have the same level */ UNSUPPORTED("4cqw2xpgdoy4yuz900dtzfr1r"); // while (hg != tg) { UNSUPPORTED("80mk8v0cx150evwxng8ymnaz"); // addGraphObjs(list, hg, NULL, hex, pm); UNSUPPORTED("1qlnt7mo46ts0saenbfjbofo5"); // addGraphObjs(list, tg, tex, NULL, pm); UNSUPPORTED("bxzk3hw9ey0f3bfnv6wti4fk4"); // hex = hg; UNSUPPORTED("augf1sgt6l2ix99x9b08g8wzz"); // hg = (((gdata*)(GD_alg(hg)))->parent); UNSUPPORTED("bt0av95w1kbo7oy03hadoiwu7"); // tex = tg; UNSUPPORTED("dgktvvmo6c3p47c8wk7x50sa1"); // tg = (((gdata*)(GD_alg(tg)))->parent); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("86qllxibrbyszf6r61j4hu0kl"); // addGraphObjs(list, tg, tex, hex, pm); UNSUPPORTED("1a5vgaasp2bunvu19mvepzcny"); // return list; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dgkvqt2x290bk07kz6s531cuo // int compoundEdges(graph_t * g, expand_t* pm, int edgetype) public static Object compoundEdges(Object... arg) { UNSUPPORTED("bvb0sqdwsn4omgjuez7agj54o"); // int compoundEdges(graph_t * g, expand_t* pm, int edgetype) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("8i0kwb8r6a2sj6nuvcy3bg9rx"); // node_t *head; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("7pmvaj5a5w3pee9zkh22s4jt5"); // edge_t *e0; UNSUPPORTED("86j3yivva2m3p6g760sw6i0cg"); // objlist *objl = NULL; UNSUPPORTED("djnngdue38swhvzvoqm5166v6"); // path *P = NULL; UNSUPPORTED("dvk7iox35qj3qa3xbspg5hqnn"); // vconfig_t *vconfig; UNSUPPORTED("en7ch189nkys76f42mlo1s5zz"); // int rv = 0; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("dgi8r72g1zk34a8ly7d64gncs"); // head = aghead(e); UNSUPPORTED("7uq3zfs24n5p1ihf2wifv4b1l"); // if ((n == head) && ED_count(e)) { /* self arc */ UNSUPPORTED("a5pr04ndliead24094tmar1ml"); // if (!P) { UNSUPPORTED("3g11syr88ddnmz3lq6kmj0e3n"); // P = (path*)zmalloc(sizeof(path)); UNSUPPORTED("8dqikeo83rdwy8rnrg37xxbk9"); // P->boxes = (boxf*)zmalloc((agnnodes(g) + 20 * 2 * 9)*sizeof(boxf)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("es85wqx90iunzzrxy2k42tf99"); // makeSelfArcs(P, e, GD_nodesep(g)); UNSUPPORTED("cx6gnk6ll0lr8dfgovw0z3lur"); // } else if (ED_count(e)) { UNSUPPORTED("eqplgkahppm0zko85vi46hab4"); // objl = objectList(e, pm); UNSUPPORTED("6fd50jntewhnp34pz0b3aajmu"); // if (Plegal_arrangement(objl->obs, objl->cnt)) { UNSUPPORTED("1qiv0092hkt9k6zxbquairfjf"); // vconfig = Pobsopen(objl->obs, objl->cnt); UNSUPPORTED("dxywoqtwov4um1apdcswwb7zq"); // if (!vconfig) { UNSUPPORTED("9xl0srrgybppyi6ol0y50yyy0"); // agerr(AGWARN, "compoundEdges: could not construct obstacles - falling back to straight line edges\n"); UNSUPPORTED("cqc3m4qhi46li5mfx2qdexj8q"); // rv = 1; UNSUPPORTED("91ilj0e8yph90t7k4ijuq5rb0"); // continue; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("3mulqmfnxjxs42xwnb59mqt6y"); // if (Verbose) UNSUPPORTED("3iwc3dzplzj2jkbze5cd6zfh9"); // fprintf(stderr, UNSUPPORTED("9iegisgtluexa2sr114kytpqc"); // "nodes touch - falling back to straight line edges\n"); UNSUPPORTED("e6aksd0p810vl5p3c3h5lovai"); // rv = 1; UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("e4oyynu5hf90ng4f0r2us3wmc"); // /* For efficiency, it should be possible to copy the spline UNSUPPORTED("36zsk1mialyq6t7ivlj6q1yhl"); // * from the first edge to the rest. However, one has to deal UNSUPPORTED("f0ndikqn12reipr44xzqc0ykk"); // * with change in direction, different arrowheads, labels, etc. UNSUPPORTED("edw1ss2r31mqgsvca2gowi52v"); // */ UNSUPPORTED("1hznlgq1yzt68zolmi2w25f5w"); // for (e0 = e; e0; e0 = ED_to_virt(e0)) { UNSUPPORTED("1y9zs9um7yp6dcgn46nvokkpe"); // ED_path(e0) = UNSUPPORTED("4fkrs58bve6iqkgwp7h0bhgoi"); // getPath(e0, vconfig, 0, objl->obs, objl->cnt); UNSUPPORTED("6bohug52xb2tutfbvdn6syse0"); // makeSpline(g, e0, objl->obs, objl->cnt, 0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("706x5p8ey0bol4upbc7p6frj3"); // resetObjlist(objl); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ofxvx8hqutive5l908wrhawa"); // freeObjlist(objl); UNSUPPORTED("4hk7dqllv8ni5iyynz17a2zrw"); // if (P) { UNSUPPORTED("cemgtepdat8xa7jzngmujlly1"); // free(P->boxes); UNSUPPORTED("dgq5kszfp504quv2x88lenes3"); // free(P); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/fdpgen/comp__c.java000066400000000000000000000673121312650303100215020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.fdpgen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class comp__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 exy2l03ceq9zw4vf01bbd4d3o // typedef unsigned int packval_t //3 3wxd4nol8sdk1izeau40e12lc // static void dfs(Agraph_t * g, Agnode_t * n, Agraph_t * out, char *marks) public static Object dfs(Object... arg) { UNSUPPORTED("dwem5syem1fups7zf2l7f5y01"); // static void dfs(Agraph_t * g, Agnode_t * n, Agraph_t * out, char *marks) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("cbgfck2y57x0eyijt2684hs46"); // Agnode_t *other; UNSUPPORTED("ezj8fvmaq6dn90bmzmo87qnm4"); // (marks[ND_id(n)]) = 1; UNSUPPORTED("bgrddosnxu9lc4f03vw6vnggv"); // agsubnode(out,n,1); UNSUPPORTED("dcuhjbsiioawp6zspvonwd4px"); // for (e = agfstedge(g, n); e; e = agnxtedge(g, e, n)) { UNSUPPORTED("9lpc3hmx5rkbpyq1ngqm2e9ll"); // if ((other = agtail(e)) == n) UNSUPPORTED("6r89rozzmm23ba9w3rvcsuqzj"); // other = aghead(e); UNSUPPORTED("4iqzo6mw9ngjyk6xve5fxl3qj"); // if (!(marks[ND_id(other)])) UNSUPPORTED("6yfk0mbr13kxutkwu7j7scg3z"); // dfs(g, other, out, marks); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 b0kgq3gcod0aeoboli87hdowh // static int C_cnt = 0 //3 dk8v4s29y4lqqa5yfgmgawohy // graph_t **findCComp(graph_t * g, int *cnt, int *pinned) public static Object findCComp(Object... arg) { UNSUPPORTED("1t3w31ofjtfgxiomyr6leku62"); // graph_t **findCComp(graph_t * g, int *cnt, int *pinned) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("8uujemixuhlf040icq3zsh7j8"); // graph_t *subg; UNSUPPORTED("78gq1jdufena2r9rigvse5178"); // char name[128]; UNSUPPORTED("azrybezo3qgwcugn67vwwsfjq"); // int c_cnt = 0; UNSUPPORTED("f2dt0a0nzfee7j8nqcycasjdy"); // char *marks; UNSUPPORTED("dj8wp6znctlnc9ae1rgvqwtj0"); // bport_t *pp; UNSUPPORTED("8hqi7khjhietsxup488fqrvwe"); // graph_t **comps; UNSUPPORTED("5wu5b4gtzhb4lm85gxf9z12lj"); // graph_t **cp; UNSUPPORTED("92buvw4cj80pu14nq2qqel9ub"); // int pinflag = 0; UNSUPPORTED("dq3faqa6qbjxl9chbr58vuex2"); // /* fprintf (stderr, "comps of %s starting at %d \n", g->name, c_cnt); */ UNSUPPORTED("6kbc1217he2quh22i34jhmw22"); // marks = (char*)zmalloc((agnnodes(g))*sizeof(char)); /* freed below */ UNSUPPORTED("989ybqq7bs6sjhctufsdu30y5"); // /* Create component based on port nodes */ UNSUPPORTED("arzhsqp3brokvqx05l8jfw34z"); // subg = 0; UNSUPPORTED("ac4pgb337ukder3sujg5h9q5t"); // if ((pp = (((gdata*)(GD_alg(g)))->ports))) { UNSUPPORTED("9p8s2eohajaqdl4mczna0s983"); // sprintf(name, "cc%s_%d", agnameof(g), c_cnt++ + C_cnt); UNSUPPORTED("9i5sv6x6r0p1qrp7ty1mc00ea"); // subg = agsubg(g, name,1); UNSUPPORTED("5n5jfmilqbkyayq7lh6xh7s9m"); // agbindrec(subg, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); UNSUPPORTED("9yqqv6kvxc925xh9tnhrftd06"); // GD_alg(subg) = (void *) (gdata*)zmalloc(sizeof(gdata)); UNSUPPORTED("4ociwu00qk6aoto1zgcrr4elp"); // (((gdata*)(GD_alg(subg)))->ports) = pp; UNSUPPORTED("38c98uts6nnk0rayxcv13666d"); // (((gdata*)(GD_alg(subg)))->nports) = (((gdata*)(GD_alg(g)))->nports); UNSUPPORTED("8g3u41gyjy3xgu6no88qltcot"); // for (; pp->n; pp++) { UNSUPPORTED("2bjcen08xkp1cb1ru9ncv3ezs"); // if ((marks[ND_id(pp->n)])) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("d5txkv4bhocgj35bmkcm0b1vj"); // dfs(g, pp->n, subg, marks); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2nfrlvbwd355cpcvpx1uolgpd"); // /* Create/extend component based on pinned nodes */ UNSUPPORTED("bkxd6kh6mxs8em68sr95l9jyq"); // /* Note that ports cannot be pinned */ UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("bdqqgre8keh4qdlqrfhuh8cpb"); // if ((marks[ND_id(n)])) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("agw2fc76qwvm6ocrl4vmuiapv"); // if (ND_pinned(n) != 3) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("7l15bq07ecygidzbwavui39f0"); // if (!subg) { UNSUPPORTED("2cz3u5akxwje0q6gj4ok1cdzf"); // sprintf(name, "cc%s_%d", agnameof(g), c_cnt++ + C_cnt); UNSUPPORTED("275mxlgljq0ig5t02qautmnhy"); // subg = agsubg(g, name,1); UNSUPPORTED("6vwf6t5b0bzzu3xsveq6yyuvo"); // agbindrec(subg, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); UNSUPPORTED("esue60nq75q8btod0krfr7vie"); // GD_alg(subg) = (void *) (gdata*)zmalloc(sizeof(gdata)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ab5icv3nb6wdj9zx38y7q1af3"); // pinflag = 1; UNSUPPORTED("ee35kbvoh52bly4vf6i610a1l"); // dfs(g, n, subg, marks); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dzulue3lttopupuz464kf1lm0"); // if (subg) UNSUPPORTED("8gblfruxmc6fa94vsjn14gh7k"); // nodeInduce(subg); UNSUPPORTED("9xhrumkhlsx4ct87at2fnxvje"); // /* Pick up remaining components */ UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("bdqqgre8keh4qdlqrfhuh8cpb"); // if ((marks[ND_id(n)])) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("ddp8f7g25wx0qchz3a2w0kgt7"); // sprintf(name, "cc%s+%d", agnameof(g), c_cnt++ + C_cnt); UNSUPPORTED("9i5sv6x6r0p1qrp7ty1mc00ea"); // subg = agsubg(g, name,1); UNSUPPORTED("3r9xp1t6fdie66rze9q0tv6v0"); // agbindrec(subg, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); //node custom data UNSUPPORTED("9yqqv6kvxc925xh9tnhrftd06"); // GD_alg(subg) = (void *) (gdata*)zmalloc(sizeof(gdata)); UNSUPPORTED("ee35kbvoh52bly4vf6i610a1l"); // dfs(g, n, subg, marks); UNSUPPORTED("8gblfruxmc6fa94vsjn14gh7k"); // nodeInduce(subg); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("18dltpx3tu2pqvilaktop4ad5"); // free(marks); UNSUPPORTED("cu7zqck3rhc3afqhr0foi0m05"); // C_cnt += c_cnt; UNSUPPORTED("a7n5zesoh5kzlhdz7rg32y9hu"); // if (cnt) UNSUPPORTED("23d0dv93w9s983tu0k7elewtw"); // *cnt = c_cnt; UNSUPPORTED("6howpdzencjv7b5n10thwlg1d"); // if (pinned) UNSUPPORTED("6kh8e01nm3b6v444qvzsxpb9t"); // *pinned = pinflag; UNSUPPORTED("d5ngoekhsqlhhhlia2x11hgqx"); // /* freed in layout */ UNSUPPORTED("39hmtpztikfd0e1o8smgla7kf"); // comps = cp = (graph_t **)zmalloc((c_cnt + 1)*sizeof(graph_t *)); UNSUPPORTED("92vjk6rjnnnji7bcczz51lwfx"); // for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) { UNSUPPORTED("d3hurhvw5zilk1i6yygjxph4i"); // *cp++ = subg; UNSUPPORTED("cd4x12weu20efbi2fts8474md"); // c_cnt--; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1l6qy19soaj9ggx3hd2btwwz4"); // assert(c_cnt == 0); UNSUPPORTED("dzrgvvzfrht1b5nmfcyc94b0o"); // *cp = 0; UNSUPPORTED("745wm3c5sblj16fadasnxf1r0"); // return comps; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/fdpgen/dbg__c.java000066400000000000000000000035601312650303100212730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.fdpgen; public class dbg__c { } plantuml-1.2017.15/src/gen/lib/fdpgen/fdpinit__c.java000066400000000000000000000735641312650303100222070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.fdpgen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class fdpinit__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 f3e0cgrfbxtmm17pgxr2cduj // static void initialPositions(graph_t * g) public static Object initialPositions(Object... arg) { UNSUPPORTED("esw1s5txtkrnu1rq1heu3tcse"); // static void initialPositions(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("embgw30vqico8gdmn2r6ywcb0"); // node_t *np; UNSUPPORTED("74210hb6op2fnqz19qbx7ngwz"); // attrsym_t *possym; UNSUPPORTED("4xvjup0t4i1teu5lezu8k7ebt"); // attrsym_t *pinsym; UNSUPPORTED("evvfote9pox5gpnsuk75gu9zi"); // double *pvec; UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("wrvu9u7a8j6i6y6552zncxfk"); // char c; UNSUPPORTED("1b5dcjh2a9g5zp8c3gpg13sg1"); // possym = agattr(g,AGNODE, "pos", NULL); UNSUPPORTED("3eb0ujxfacue4y5vg6rgwnsir"); // if (!possym) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("4eh9a5dorzn9gh1cq1joh60da"); // pinsym = agattr(g,AGNODE, "pin", NULL); UNSUPPORTED("9p1urpmsbdtel9f0hyftha4vp"); // for (i = 0; (np = GD_neato_nlist(g)[i]); i++) { UNSUPPORTED("82hus3nxk252ryfmgsj0jd4oe"); // p = agxget(np, possym); UNSUPPORTED("2jgl1gjczjnfj98lx3fumetzb"); // if (p[0]) { UNSUPPORTED("nlhfvpbbwzdx6jcdqg6ibdes"); // pvec = ND_pos(np); UNSUPPORTED("8wtaqjit9awt7xd08vuifknry"); // c = '\0'; UNSUPPORTED("1u1tfrl07xhxpprnxuslpv871"); // if (sscanf(p, "%lf,%lf%c", pvec, pvec + 1, &c) >= 2) { UNSUPPORTED("aywxrq10m6uazx25fiwcfs46u"); // if (PSinputscale > 0.0) { UNSUPPORTED("7si28y5woaw38yg693vh15d32"); // int i; UNSUPPORTED("bvgbqo619j5i3oq2sqvbzu4y2"); // for (i = 0; i < 2; i++) UNSUPPORTED("2oeepwgdoynykl1trrb0p94wm"); // pvec[i] = pvec[i] / PSinputscale; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7djjlwbyom7gt69719c2ge441"); // ND_pinned(np) = 1; UNSUPPORTED("bjsz2shzg2mue2wxe8yrvtkrp"); // if ((c == '!') UNSUPPORTED("238kv6u6hkwuawnjm6dx78ej9"); // || (pinsym && mapbool(agxget(np, pinsym)))) UNSUPPORTED("5vhe98mbf3x3wwvl7dgaiyysi"); // ND_pinned(np) = 3; UNSUPPORTED("afk9bpom7x393euamnvwwkx6b"); // } else UNSUPPORTED("18zn34qcs4vsdhhh831gn9vc9"); // fprintf(stderr, UNSUPPORTED("cvnihzmupmxdhfo91phffr4iz"); // "Warning: node %s, position %s, expected two floats\n", UNSUPPORTED("8vr7f9s0nt8dkq7nt7fi7td6m"); // agnameof(np), p); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eycycj92hbah3h1imwibcgg3l // static void init_edge(edge_t * e, attrsym_t * E_len) public static Object init_edge(Object... arg) { UNSUPPORTED("5chfc4167yxwq5u0yf9jtf5am"); // static void init_edge(edge_t * e, attrsym_t * E_len) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9egiculslq6sjkjl1r3i2xhyw"); // agbindrec(e, "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0)); //node custom data UNSUPPORTED("6asvm3mgvrgkcyl9tgnl3h63l"); // ED_factor(e) = late_double(e, E_weight, 1.0, 0.0); UNSUPPORTED("5874wxxfzdznlt3lo55st6eph"); // ED_dist(e) = late_double(e, E_len, fdp_parms->K, 0.0); UNSUPPORTED("dwvquwksg1mxo6dxl7r7gaxpe"); // common_init_edge(e); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 egbpmyvr9o80vaci8zr1y9n7g // static void init_node(node_t * n) public static Object init_node(Object... arg) { UNSUPPORTED("dfmrunqjpz6te9temyeon7r7v"); // static void init_node(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8n5p3ldt0mx3i3tvjjmpm15le"); // common_init_node(n); UNSUPPORTED("ayxex1urbqyoea700lpxltl6l"); // ND_pos(n) = (double*)zmalloc((GD_ndim(agraphof(n)))*sizeof(double)); UNSUPPORTED("axannqky1100m3o7i9up0h4i7"); // gv_nodesize(n, GD_flip(agraphof(n))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 492ger2hkdmjpreugs1rmtqii // void fdp_init_node_edge(graph_t * g) public static Object fdp_init_node_edge(Object... arg) { UNSUPPORTED("7ng2gj5lv35z4xskaobhf7j7m"); // void fdp_init_node_edge(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6h1xqgehy44gsat105vaw9u8e"); // attrsym_t *E_len; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("5u3xxjr10ujhhn53156wch9ow"); // int nn; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("990mg1wm4x3ml804cdp4f62sb"); // /* ndata* alg; */ UNSUPPORTED("c23zlqic6a88lbl9vw9fsm73r"); // aginit(g, AGNODE, "Agnodeinfo_t", sizeof(Agnodeinfo_t), NOT(0)); UNSUPPORTED("erjahdn9un5js4yg5l9izpj7u"); // processClusterEdges(g); UNSUPPORTED("4d0qmlrvhtb8f9v7jt8x6o30n"); // /* Get node count after processClusterEdges(), as this function may UNSUPPORTED("39up5s15uvyc7wguh1chdya40"); // * add new nodes. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("6r0jyge14l6tevl2zdwwqb38s"); // nn = agnnodes(g); UNSUPPORTED("1jmigyhvbvc50ig7tvyz8r3h0"); // /* alg = N_NEW(nn, ndata); */ UNSUPPORTED("45z3wlw30d4v3obmp251psyml"); // GD_neato_nlist(g) = (node_t **)zmalloc((nn + 1)*sizeof(node_t *)); UNSUPPORTED("9bt5ega0wnm605esgklnofthl"); // for (i = 0, n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("4otfzd04ih23fldz5z9kjz13r"); // init_node (n); UNSUPPORTED("57olun5nyb91u25vsjs21iqpz"); // /* ND_alg(n) = alg + i; */ UNSUPPORTED("6fp8pp1mhoz2oz6b7bjmnivdq"); // GD_neato_nlist(g)[i] = n; UNSUPPORTED("9ku3nzm6ui1ttnjtw2tlxeape"); // ND_id(n) = i++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8luf7vywtg9kvvk1yugl5rnrj"); // E_len = agattr(g,AGEDGE, "len", NULL); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("afzh0se3bdul27kfeb72zmccv"); // init_edge(e, E_len); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("68vimdeays5ksioyhl9g0a64u"); // initialPositions(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8xyco70otbzpy5o0gn0ccbh81 // static void cleanup_subgs(graph_t * g) public static Object cleanup_subgs(Object... arg) { UNSUPPORTED("84hk43pxgtn24h4d5ia4mibtn"); // static void cleanup_subgs(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8uujemixuhlf040icq3zsh7j8"); // graph_t *subg; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("7naa6f8pevjidfr7m41eli6xj"); // for (i = 1; i <= GD_n_cluster(g); i++) { UNSUPPORTED("cpbcovu6u9jpbhniuwko58sge"); // subg = GD_clust(g)[i]; UNSUPPORTED("7yh9n8er7gmkbcvlm9ycl42jp"); // free_label(GD_label(subg)); UNSUPPORTED("1lpwhqj7l6h0eiutrhkf2i3i6"); // if (GD_alg(subg)) { UNSUPPORTED("109zmijlgkrcmnkcf5quh13se"); // free((((gdata*)(GD_alg(subg)))->ports)); UNSUPPORTED("25vpswadzwfupxfn703fb46m5"); // free(GD_alg(subg)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3gp1a1mkjuw28fwl3bc0rwzkf"); // cleanup_subgs(subg); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a5yc031gavhkkx3wq5g726g76"); // free (GD_clust(g)); UNSUPPORTED("8rovagjt3lviwrx7aa3axkgwc"); // if (g != agroot(g)) UNSUPPORTED("jhltskmtad5k9xortu6d6gql"); // agdelrec(g, "Agraphinfo_t"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bnzpam8o3xnj3b7f516ic3nvd // static void fdp_cleanup_graph(graph_t * g) public static Object fdp_cleanup_graph(Object... arg) { UNSUPPORTED("e14i566vhsvk5mmi72i9cyrym"); // static void fdp_cleanup_graph(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4l9vavpqrn41woq5aj74iefbp"); // cleanup_subgs(g); UNSUPPORTED("dxp41biia9zas5nfacx5m4vhp"); // free(GD_neato_nlist(g)); UNSUPPORTED("n2gf06weiher7ar8g5amqip1"); // free(GD_alg(g)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7jmdev7p125ntxi63iz9b6p04 // void fdp_cleanup(graph_t * g) public static Object fdp_cleanup(Object... arg) { UNSUPPORTED("bnvo5l60gvjkaw227hbmo7zuw"); // void fdp_cleanup(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("5otoqd7o1zz8ni50urywr7yjy"); // gv_cleanup_edge(e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ec2wg4tpq1npq2mtdbc154ylh"); // gv_cleanup_node(n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("evkzftlt6qna42mjdlknscgk5"); // fdp_cleanup_graph(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/fdpgen/grid__c.java000066400000000000000000001000231312650303100214540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.fdpgen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class grid__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 48p9xkptvlsxtb58ffyzjbdrn // static block_t *newBlock(int size) public static Object newBlock(Object... arg) { UNSUPPORTED("cqgp9t633c4vidjdixwk62b8x"); // static block_t *newBlock(int size) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("95ide6up3fa3s5xowco8ih2g7"); // block_t *newb; UNSUPPORTED("21xtar9o7c5sw48e7jv8o2f68"); // newb = (block_t*)gmalloc(sizeof(block_t)); UNSUPPORTED("er72usde489r8t38im7xyffgd"); // newb->next = 0; UNSUPPORTED("bfs7wf3xzbwhtv7x2g5cr3lcp"); // newb->mem = (cell*)gmalloc((size)*sizeof(cell)); UNSUPPORTED("77q90euct9sn46uzd5qr13611"); // newb->endp = newb->mem + size; UNSUPPORTED("8jjwt46o919i2b5oo9jqz6g2h"); // newb->cur = newb->mem; UNSUPPORTED("dfk4c476i87s9isvbvzpxvmhk"); // return newb; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1xzd2mgk4xjc5b9hmcv72lyv6 // static void freeBlock(block_t * b) public static Object freeBlock(Object... arg) { UNSUPPORTED("b8d6imvvp6lydokdtr2rhempo"); // static void freeBlock(block_t * b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4itlioqs70mihymynwfmznxvd"); // if (b) { UNSUPPORTED("av0qnyr2at3ebsltm59bkmgri"); // block_t *next = b->next; UNSUPPORTED("cm5cwn22f12c1plyhxex1an5v"); // free(b->mem); UNSUPPORTED("wg03d53tifx6b8xxlazj2y66"); // free(b); UNSUPPORTED("79t7h3r6ynnwnpdmjg4vsmesg"); // freeBlock(next); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dwz1fog5nktaeg1ryc2wyk40s // static cell *getCell(Grid * g) public static Object getCell(Object... arg) { UNSUPPORTED("8uzl60unaw1orsi1po0j9a0ut"); // static cell *getCell(Grid * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ao9xdgmlrsclq6kqohovivqwe"); // cell *cp; UNSUPPORTED("d1zkaxy757i5imyupkpiscaph"); // block_t *bp = g->cellCur; /* current block */ UNSUPPORTED("7ze7jw2uphs568sjmewq9uk4c"); // if (bp->cur == bp->endp) { /* current block is full */ UNSUPPORTED("1uqfbvmtqqjgymjtij5qofscl"); // if (bp->next == 0) { UNSUPPORTED("e6n3vvoi4bmf5x1j8jnf8dxxe"); // bp->next = newBlock(2 * (bp->endp - bp->mem)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1am3lqqsk187zkoqvdmaz621v"); // bp = g->cellCur = bp->next; UNSUPPORTED("79uvfoqwkd9pziekx02rqdd7i"); // bp->cur = bp->mem; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("aifisi1jld6nxlwnsuwuccfuy"); // cp = bp->cur++; UNSUPPORTED("az4lr3wfzqu3df9wce5kcyady"); // return cp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a6oz4rf4ts6rry8veop9yyim7 // static int ijcmpf(Dt_t * d, gridpt * p1, gridpt * p2, Dtdisc_t * disc) public static Object ijcmpf(Object... arg) { UNSUPPORTED("qqmv1dxqcqyeh7lttfs5l1ov"); // static int ijcmpf(Dt_t * d, gridpt * p1, gridpt * p2, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1wmjkf3r3rua2n9n6v1glz64z"); // int diff; UNSUPPORTED("6z29omss9ay00bqf6xael7t6t"); // (void) d; UNSUPPORTED("8l8wg6vltx6d7vc9dzqb6n3wi"); // (void) disc; UNSUPPORTED("ce3bx4bdswb0p58b461byzfps"); // if ((diff = (p1->i - p2->i))) UNSUPPORTED("bq5dcp2mozeoz1g1zcxcu5h27"); // return diff; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("eeqlt2jh61y7nvci218gnox6b"); // return (p1->j - p2->j); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 5s4sj50h3vdrqw1wswkqpule7 // static Grid *_grid //3 dbgusqi6yak0s3w8po4yfwlew // static void *newCell(Dt_t * d, void *obj, Dtdisc_t * disc) public static Object newCell(Object... arg) { UNSUPPORTED("a8p5x7a752ihuz53ssf35670w"); // static void *newCell(Dt_t * d, void *obj, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dd28b94hbwrv5c3yq6npacxxu"); // cell *cellp = (cell *) obj; UNSUPPORTED("eu3li4jorpplvuws8ukseoh0f"); // cell *newp; UNSUPPORTED("8l8wg6vltx6d7vc9dzqb6n3wi"); // (void) disc; UNSUPPORTED("96hm6wof9428lgosvgu7yxvbc"); // newp = getCell(_grid); UNSUPPORTED("1uoj9xhbbmz92x537ikscy72z"); // newp->p.i = cellp->p.i; UNSUPPORTED("81yllhqexfyf0e2w7ifmycjc7"); // newp->p.j = cellp->p.j; UNSUPPORTED("9mpisqlyz5gwc22v3dykoc2kb"); // newp->nodes = 0; UNSUPPORTED("4enxnv484o23jodrkf81rxdg0"); // return newp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 btvo93i71mj5s7jx37y7gpy0q // static node_list *newNode(Grid * g, Agnode_t * n, node_list * nxt) public static Object newNode(Object... arg) { UNSUPPORTED("ehleji79hws4ndms74ucrfug8"); // static node_list *newNode(Grid * g, Agnode_t * n, node_list * nxt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("kv1qgi81221bvfutkp6848gs"); // node_list *newp; UNSUPPORTED("bxz8t60ho4syqfxokqwjomd70"); // newp = g->listCur++; UNSUPPORTED("732w7veecg92msg7cxi48mx18"); // newp->node = n; UNSUPPORTED("6udm0lve1wrpnonls06gpijkr"); // newp->next = nxt; UNSUPPORTED("4enxnv484o23jodrkf81rxdg0"); // return newp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 cp8gjlfyqcmfdqxvn4slvnmpl // static Dtdisc_t gridDisc = //3 dq3rb6lltgxkztrppf4e4ob0a // Grid *mkGrid(int cellHint) public static Object mkGrid(Object... arg) { UNSUPPORTED("9u1txx36o09gsufmfta5bh4xd"); // Grid *mkGrid(int cellHint) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eclpdj3kal4j8s4p5xnir9cqf"); // Grid *g; UNSUPPORTED("80ack44l9uaf0bmvg194jqe48"); // g = (Grid*)gmalloc(sizeof(Grid)); UNSUPPORTED("3ybxv0gvukf27njzufcqqo81a"); // _grid = g; /* see comment above */ UNSUPPORTED("ak5cvv3gc1lfiql31r16xnq4v"); // g->data = dtopen(&gridDisc, Dtoset); UNSUPPORTED("4gem6adq1i3ecl23otyak99c9"); // g->listMem = 0; UNSUPPORTED("1nipmfwxobw0s6w14g6dr5foh"); // g->listSize = 0; UNSUPPORTED("chv70wjlygxy67t8tybh66cwf"); // g->cellMem = newBlock(cellHint); UNSUPPORTED("2syri7q5tc0jyvwq8ecyfo3vr"); // return g; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6bd29u5mwagwt7ghjyyccorh1 // void adjustGrid(Grid * g, int nnodes) public static Object adjustGrid(Object... arg) { UNSUPPORTED("baeey6xmz933iy3d36anps428"); // void adjustGrid(Grid * g, int nnodes) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e4nu416e8phfhoe9opmjt6zxk"); // int nsize; UNSUPPORTED("e7egb5b9opseomve33z4nopvk"); // if (nnodes > g->listSize) { UNSUPPORTED("402jdeovmofgfjapuyzda90w3"); // nsize = MAX(nnodes, 2 * (g->listSize)); UNSUPPORTED("18otakb57uiccyf9ze0ckh1ou"); // if (g->listMem) UNSUPPORTED("cgvx3psdqmzfsscsi6k5qry2c"); // free(g->listMem); UNSUPPORTED("7lk84snr3t4u3ycduwbfdkuo2"); // g->listMem = (node_list*)gmalloc((nsize)*sizeof(node_list)); UNSUPPORTED("2v7eyjzzl6jefj3hhetn64pxo"); // g->listSize = nsize; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 amb9vt2m5v9s58v2odngax7wv // void clearGrid(Grid * g) public static Object clearGrid(Object... arg) { UNSUPPORTED("e7s6yogkps2xb76gikyo7hurp"); // void clearGrid(Grid * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6zxdah94hm76bo0zhiwt1vf9q"); // (*(((Dt_t*)(g->data))->searchf))((g->data),(void*)(0),0000100); UNSUPPORTED("379e5nuyb9hsd83249pxe9zl0"); // g->listCur = g->listMem; UNSUPPORTED("57510i3xz9n6gyrcri6m2x31v"); // g->cellCur = g->cellMem; UNSUPPORTED("8houbh0qth244ekpzfyghstms"); // g->cellCur->cur = g->cellCur->mem; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9pepovt0gwd2trihhc2b9d7kf // void delGrid(Grid * g) public static Object delGrid(Object... arg) { UNSUPPORTED("2hljfnpiz5yvaz8r14pmxlgyx"); // void delGrid(Grid * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3h7tk3hujmu6hb01n5p4qb399"); // dtclose(g->data); UNSUPPORTED("75a1xgp2awtr3p9seu6lq7tor"); // freeBlock(g->cellMem); UNSUPPORTED("ek2bqwr219isf5zhfqksg81yv"); // free(g->listMem); UNSUPPORTED("4r69ldzt3t7hqa8bckw1rmbk4"); // free(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1cotlm44aq5nf1awt6rlrt73f // void addGrid(Grid * g, int i, int j, Agnode_t * n) public static Object addGrid(Object... arg) { UNSUPPORTED("cw8y5dhctcam2kaat5iu7dt32"); // void addGrid(Grid * g, int i, int j, Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f2dlaown2kdact6tryrhjt4wp"); // cell *cellp; UNSUPPORTED("6bzsq12nf65b3f8dvi83to0ev"); // cell key; UNSUPPORTED("afbyqq6mkn219h05byghxl4nd"); // key.p.i = i; UNSUPPORTED("egewjz5xsyhudbf0fb3vd8qyb"); // key.p.j = j; UNSUPPORTED("bqrlni0ru8q9ywz6u62wjfkw3"); // cellp = (*(((Dt_t*)(g->data))->searchf))((g->data),(void*)(&key),0000001); UNSUPPORTED("cu3pr0ujlmxmo3hxkmzouhk3h"); // cellp->nodes = newNode(g, n, cellp->nodes); UNSUPPORTED("85z5t8b0aaiij1mlbipg4mw5d"); // if (Verbose >= 3) { UNSUPPORTED("9jniybnacu91k5lj5tsrc1wuq"); // fprintf(stderr, "grid(%d,%d): %s\n", i, j, agnameof(n)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4g0z7jopk0t99z409uj832wp5 // void walkGrid(Grid * g, int (*walkf) (Dt_t *, cell *, Grid *)) public static Object walkGrid(Object... arg) { UNSUPPORTED("7tlnrgcgro6algvrxp8r7gtmk"); // void walkGrid(Grid * g, int (*walkf) (Dt_t *, cell *, Grid *)) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f3rit8rz1s1ghahuis92gm6k1"); // dtwalk(g->data, (walkfn_t) walkf, g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dku539xf3no0yqw8yd7nxcbt6 // cell *findGrid(Grid * g, int i, int j) public static Object findGrid(Object... arg) { UNSUPPORTED("32b65siusleul2gdaegn2mm9f"); // cell *findGrid(Grid * g, int i, int j) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6bzsq12nf65b3f8dvi83to0ev"); // cell key; UNSUPPORTED("afbyqq6mkn219h05byghxl4nd"); // key.p.i = i; UNSUPPORTED("egewjz5xsyhudbf0fb3vd8qyb"); // key.p.j = j; UNSUPPORTED("2pi5ab8p3o6tsbggtnotsl4ax"); // return ((cell *) (*(((Dt_t*)(g->data))->searchf))((g->data),(void*)(&key),0000004)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1z3w6m5x4gw4pr5cibsbv8ew5 // int gLength(cell * p) public static Object gLength(Object... arg) { UNSUPPORTED("1udy11biurmpvqgnt7nc07594"); // int gLength(cell * p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bsj3r19ko668lwj5fqk8tlbhc"); // int len = 0; UNSUPPORTED("deylrmnd4q7aqkk29acrjt3j0"); // node_list *nodes = p->nodes; UNSUPPORTED("3h2gfuk0qna3lemnipafx7eu9"); // while (nodes) { UNSUPPORTED("1blvazlbh0hbzpw2y1i3ejivl"); // len++; UNSUPPORTED("d4fniru4onrxa8hv51ov2h6dj"); // nodes = nodes->next; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ji4xmwppaalf0z5xzgfw9h36"); // return len; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/fdpgen/layout__c.java000066400000000000000000002417061312650303100220620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.fdpgen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; import smetana.core.jmp_buf; public class layout__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 exy2l03ceq9zw4vf01bbd4d3o // typedef unsigned int packval_t //1 540u5gu9i0x1wzoxqqx5n2vwp // static jmp_buf jbuf private static jmp_buf jbuf = new jmp_buf(); //3 cyfvrx8rigx5zgh4a4b53zpnh // static void finalCC(graph_t * g, int c_cnt, graph_t ** cc, point * pts, graph_t * rg, layout_info* infop) public static Object finalCC(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("5j5ejv8p34k05gcm75fmh1xhf"); // finalCC(graph_t * g, int c_cnt, graph_t ** cc, point * pts, graph_t * rg, UNSUPPORTED("4pqsw04lulyzrk7rq7bblsonr"); // layout_info* infop) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9b4o90u710skovvrp9jqdgitp"); // attrsym_t * G_width = infop->G_width; UNSUPPORTED("bqvw4kmde2f4oa4oi0h9hydsn"); // attrsym_t * G_height = infop->G_height; UNSUPPORTED("e75aepnaqkzqf68ewt7a4zqfi"); // graph_t *cg; UNSUPPORTED("a78eza87s0b98d5urftsa25st"); // box b, bb; UNSUPPORTED("8l1eldlly6rdv04k0fzzkmb68"); // boxf bbf; UNSUPPORTED("tkw5izt69wl0695g5qfi9sug"); // point pt; UNSUPPORTED("15vcjwivk85sj24txzc1mf1gj"); // int margin; UNSUPPORTED("uxzh5927shath4hsa8qeq0vg"); // graph_t **cp = cc; UNSUPPORTED("dgxbjvgw9qxehkxtda1tet15c"); // point *pp = pts; UNSUPPORTED("93l4pivvf6nscv0y64nax0dq7"); // int isRoot = (rg == infop->rootg); UNSUPPORTED("tv1kheyodc68lbqkk90hbfrp"); // int isEmpty = 0; UNSUPPORTED("ebsljzk06lfmoo5yrjxixc0op"); // /* compute graph bounding box in points */ UNSUPPORTED("as51hq9p7apf0yper42ncmv5d"); // if (c_cnt) { UNSUPPORTED("hdi48v81u3904xw6mr33ncuu"); // cg = *cp++; UNSUPPORTED("doqnyqj8oanwl6cloo1nprp6f"); // BF2B(GD_bb(cg), bb); UNSUPPORTED("5aaxht3vfvg8txbt3utwmslrp"); // if (c_cnt > 1) { UNSUPPORTED("9t8rt3bdzsa84ucezrmt14ub6"); // pt = *pp++; UNSUPPORTED("d4he392l7lu60f0c3cfgxrxdc"); // bb.LL.x += pt.x; UNSUPPORTED("4depz3wycfkln7j4l5xklhc9u"); // bb.LL.y += pt.y; UNSUPPORTED("4107b6l6fs0ipw7clehsluvj7"); // bb.UR.x += pt.x; UNSUPPORTED("89fikk6obhaq1qqenedqkj3ee"); // bb.UR.y += pt.y; UNSUPPORTED("3yuvbcdyw38sj04mc19gsblta"); // while ((cg = *cp++)) { UNSUPPORTED("5pgtu6u0dsae0m5olw147upw7"); // BF2B(GD_bb(cg), b); UNSUPPORTED("sk2e9ft63ktyi9torljewy1d"); // pt = *pp++; UNSUPPORTED("exwmgih14x6egeiqtbdao9oig"); // b.LL.x += pt.x; UNSUPPORTED("6s65g13bf25olokd3e9mkk2r0"); // b.LL.y += pt.y; UNSUPPORTED("b947zhl0549npzprxodym6pnv"); // b.UR.x += pt.x; UNSUPPORTED("egzsssfx1cuziklqf0gbha0pg"); // b.UR.y += pt.y; UNSUPPORTED("8tx35iz0n5i30gl1aoykewx2a"); // bb.LL.x = MIN(bb.LL.x, b.LL.x); UNSUPPORTED("1y9hace0nolseswt8ndb04qzp"); // bb.LL.y = MIN(bb.LL.y, b.LL.y); UNSUPPORTED("448anewcsr42vjlqt7bu41gml"); // bb.UR.x = MAX(bb.UR.x, b.UR.x); UNSUPPORTED("8186gsf6v091wiyyfl50wo3pz"); // bb.UR.y = MAX(bb.UR.y, b.UR.y); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("et2gdc4td9f7dgpy4vi5nubcj"); // } else { /* empty graph */ UNSUPPORTED("1usofyibgze1w58108ljx8vlk"); // bb.LL.x = 0; UNSUPPORTED("2x25hiswosyet6n52bfoj0bgb"); // bb.LL.y = 0; UNSUPPORTED("8odqguy5gqxsc924fzt8tugyj"); // bb.UR.x = late_int(rg, G_width, (ROUND((0.75)*72)), 3); UNSUPPORTED("1bcc9n645fsrh3v9qouu2mnnt"); // bb.UR.y = late_int(rg, G_height, (ROUND((0.5)*72)), 3); UNSUPPORTED("oy1o6qaafscd06oaah6skuq8"); // isEmpty = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8bafmwpwdcr8mxkd0349uwj8n"); // if (GD_label(rg)) { UNSUPPORTED("2g3x5xo2qnpun7vilpctpknlc"); // point p; UNSUPPORTED("bo6u5udaa5jm0by3gh04omxwd"); // int d; UNSUPPORTED("dmkzb0rxnfsoon56m8o6st0o1"); // isEmpty = 0; UNSUPPORTED("7fm4t6vqmkowryalb4olpluvi"); // PF2P(GD_label(rg)->dimen, p); UNSUPPORTED("60137a9c14v715u0roc06c7f0"); // d = p.x - (bb.UR.x - bb.LL.x); UNSUPPORTED("ut9vmlliumj6hoam9erca50j"); // if (d > 0) { /* height of label added below */ UNSUPPORTED("dzc85pslju1xdcidb5xsgd63n"); // d /= 2; UNSUPPORTED("5lr6tdfl85phpnr2cjc94rmfk"); // bb.LL.x -= d; UNSUPPORTED("eiysf7bb0jo4knxnnsptfd17o"); // bb.UR.x += d; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dds8500ykadjn0z2mcnznhjfg"); // if (isRoot || isEmpty) UNSUPPORTED("8tm7x791luf0uq7v2q53kfuqk"); // margin = 0; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("182pb9igel0aoytgtoiguek4x"); // margin = late_int (g, G_margin, 8, 0); UNSUPPORTED("dwo09u5p3lixrxqu485pwy6r7"); // pt.x = -bb.LL.x + margin; UNSUPPORTED("3tyf1d65hn5e7kko770etaay1"); // pt.y = -bb.LL.y + margin + GD_border(rg)[0].y; UNSUPPORTED("dze4vn5sf7tdouljozbaukja6"); // bb.LL.x = 0; UNSUPPORTED("5zsax7rqaxnemqxnwgiyn72ga"); // bb.LL.y = 0; UNSUPPORTED("c4rw2sm67jiequg14myrfct0h"); // bb.UR.x += pt.x + margin; UNSUPPORTED("e61322oo73i9nj7nipw8m2zv"); // bb.UR.y += pt.y + margin + GD_border(rg)[2].y; UNSUPPORTED("7tzvnafah7jf93mzxqs95rwrr"); // /* translate nodes */ UNSUPPORTED("as51hq9p7apf0yper42ncmv5d"); // if (c_cnt) { UNSUPPORTED("egz9kmr1h0lairr84fdl6xyb4"); // cp = cc; UNSUPPORTED("1vvyrx201r2ig8es037wn2mfh"); // pp = pts; UNSUPPORTED("c5isnr2v3wtcqtcbjku7pygr1"); // while ((cg = *cp++)) { UNSUPPORTED("8hzx2qlxefkohtl8vzpf4yzof"); // point p; UNSUPPORTED("d55u571q0xu2m8hidf7qm4i0h"); // node_t *n; UNSUPPORTED("ej168lfnr08xgzgaf1gsii95s"); // pointf del; UNSUPPORTED("2u09xj9tpivs6e840bfjna2zc"); // if (pp) { UNSUPPORTED("1rmxuvgazhdv7nv3q5deh14ci"); // p = *pp++; UNSUPPORTED("7w2yxcg7syqzmsu21h1rdu7gv"); // p.x += pt.x; UNSUPPORTED("ct8eacmyhxwe4itxmq5ksle6c"); // p.y += pt.y; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("q29o1awbh8ddg8k9cz591mwc"); // p = pt; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("9wya7e1n1v02ba29i88qevv7d"); // del.x = ((p.x)/(double)72); UNSUPPORTED("2r2n5gssapyxktpmw0tiaplpt"); // del.y = ((p.y)/(double)72); UNSUPPORTED("bhlsqxfst7yx1df4cylgi92p6"); // for (n = agfstnode(cg); n; n = agnxtnode(cg, n)) { UNSUPPORTED("7ljco3d2d5dh0dhrs9qoqvvia"); // ND_pos(n)[0] += del.x; UNSUPPORTED("41qrgy6u1jqqw1qpjqg4c6657"); // ND_pos(n)[1] += del.y; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("exoex2j0qrw664qhzf4cxauq1"); // bbf.LL.x = ((bb.LL.x)/(double)72); UNSUPPORTED("7yprpz6bhlv15uimyl9x7mwyf"); // bbf.LL.y = ((bb.LL.y)/(double)72); UNSUPPORTED("42ps8exnijgn7j0xn3omzdsbp"); // bbf.UR.x = ((bb.UR.x)/(double)72); UNSUPPORTED("2kied7iqt4m348v7idvxdzrfr"); // bbf.UR.y = ((bb.UR.y)/(double)72); UNSUPPORTED("4bavz003b6k3610qxalof3nls"); // (((gdata*)(GD_alg(g)))->bb) = bbf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 byskndejdx3u2hdwh3qbm4apq // static node_t *mkDeriveNode(graph_t * dg, char *name) public static Object mkDeriveNode(Object... arg) { UNSUPPORTED("74hp673smot0qq6e71pnny6um"); // static node_t *mkDeriveNode(graph_t * dg, char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cuxjodqo53rx3gt9t353c352r"); // node_t *dn; UNSUPPORTED("9rsk130zxprz1jr0i0wnjspka"); // dn = agnode(dg, name,1); UNSUPPORTED("2pahd30hmnc5ga3juber1p8rc"); // agbindrec(dn, "Agnodeinfo_t", sizeof(Agnodeinfo_t), NOT(0)); //node custom data UNSUPPORTED("2pbxy8q5lnf7p7rgcaw6q8wky"); // ND_alg(dn) = (void *) (dndata*)zmalloc(sizeof(dndata)); /* free in freeDeriveNode */ UNSUPPORTED("at012b854w3r2woadh9tov0wf"); // ND_pos(dn) = (double*)gmalloc((GD_ndim(dg))*sizeof(double)); UNSUPPORTED("39wajg9uefc99hzbtsfg9trto"); // /* fprintf (stderr, "Creating %s\n", dn->name); */ UNSUPPORTED("7h1byav4bse2wj5qnw2q1myd4"); // return dn; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3iz2r401jxiz372cjszyuoanq // static void freeDeriveNode(node_t * n) public static Object freeDeriveNode(Object... arg) { UNSUPPORTED("1whqjlpv0n0dca6sq85o9cdae"); // static void freeDeriveNode(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5074s0w7ptt9jifu6hn9mei67"); // free(ND_alg(n)); UNSUPPORTED("dblzkmbbygvj7xygvxtoq8tio"); // free(ND_pos(n)); UNSUPPORTED("akue26s9c0sd4k550tyw3sk5n"); // agdelrec(n, "Agnodeinfo_t"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 29x3224gy6v4xzpd3raiirugf // static void freeGData(graph_t * g) public static Object freeGData(Object... arg) { UNSUPPORTED("4qayy728oj2bq4zy8lej3fsth"); // static void freeGData(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("n2gf06weiher7ar8g5amqip1"); // free(GD_alg(g)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cf633ztfyd6ttfwuav4giyi76 // static void freeDerivedGraph(graph_t * g, graph_t ** cc) public static Object freeDerivedGraph(Object... arg) { UNSUPPORTED("cgyg74gyxx6sheskknx21gz3l"); // static void freeDerivedGraph(graph_t * g, graph_t ** cc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e75aepnaqkzqf68ewt7a4zqfi"); // graph_t *cg; UNSUPPORTED("cuxjodqo53rx3gt9t353c352r"); // node_t *dn; UNSUPPORTED("302ixhh6hnlijtkp0oelxikef"); // node_t *dnxt; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("7febwjhfjikg0bvb24i85inl3"); // while ((cg = *cc++)) { UNSUPPORTED("cijqtcfm7sci705u1z4k582tp"); // freeGData(cg); UNSUPPORTED("xmk71ie22xvx7nhgngqacfp9"); // agdelrec(cg, "Agraphinfo_t"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9ef1tmkqo6s5sssnuq8lfknqq"); // if ((((gdata*)(GD_alg(g)))->ports)) UNSUPPORTED("8af0kjmbjyg70lta4awrjjesc"); // free((((gdata*)(GD_alg(g)))->ports)); UNSUPPORTED("cwxxae37yzne0ly0kop5ml6mx"); // freeGData(g); UNSUPPORTED("c2ncz5mhklw8a78yq0pq0wmo"); // agdelrec(g, "Agraphinfo_t"); UNSUPPORTED("4rp7mjl1clntxri8tw8pytsbj"); // for (dn = agfstnode(g); dn; dn = dnxt) { UNSUPPORTED("31j4zdjpamckm6fc2s29x82k1"); // dnxt = agnxtnode(g, dn); UNSUPPORTED("3y0pwms7qy4blq5v99c8qjteh"); // for (e = agfstout(g, dn); e; e = agnxtout(g, e)) { UNSUPPORTED("4xbv3tolbid1n0zz7n3eamn00"); // free (ED_to_virt(e)); UNSUPPORTED("8w3d3ji4u0lki4coi2qpmpskg"); // agdelrec(e, "Agedgeinfo_t"); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("f4nskiqzun441c5ex40ie8gw0"); // freeDeriveNode(dn); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ego3r1tvwrpv2hie8y9p8vq4z"); // agclose(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 84isuvczdhvikhhnui9e3kzra // static void evalPositions(graph_t * g, graph_t* rootg) public static Object evalPositions(Object... arg) { UNSUPPORTED("1oa3ftxfgwenys84ezoeabexx"); // static void evalPositions(graph_t * g, graph_t* rootg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("8uujemixuhlf040icq3zsh7j8"); // graph_t *subg; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("4s8yf152w1bykvv0sazjkgfxz"); // boxf sbb; UNSUPPORTED("an5yuorm1sh0abvgomq1s0db9"); // bb = (((gdata*)(GD_alg(g)))->bb); UNSUPPORTED("2cvzps80tb9p8pvei2bhwj0us"); // /* translate nodes in g */ UNSUPPORTED("31atml91kblm6c59dury75e81"); // if (g != rootg) { UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("5jodw5fl7pfp4w8nn8t3x81jr"); // if ((ND_clust(n)) != g) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("4jnp2t03todyz1wxbgdvmlesd"); // ND_pos(n)[0] += bb.LL.x; UNSUPPORTED("228b94b3kuel3j0i7j3cz181h"); // ND_pos(n)[1] += bb.LL.y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7ogmi241wudfqnsslcsy6hjus"); // /* translate top-level clusters and recurse */ UNSUPPORTED("7naa6f8pevjidfr7m41eli6xj"); // for (i = 1; i <= GD_n_cluster(g); i++) { UNSUPPORTED("cpbcovu6u9jpbhniuwko58sge"); // subg = GD_clust(g)[i]; UNSUPPORTED("dm5tht2ocq023it8nf3hu6qh5"); // if (g != rootg) { UNSUPPORTED("7405elpmfo8oyjglcsdlje8uw"); // sbb = (((gdata*)(GD_alg(subg)))->bb); UNSUPPORTED("7ed3aflu4lv2rtcdee3mijand"); // sbb.LL.x += bb.LL.x; UNSUPPORTED("7ghwc2c7027s57f40x9doldp8"); // sbb.LL.y += bb.LL.y; UNSUPPORTED("czucbxjkl4ejgixorzhl9szxi"); // sbb.UR.x += bb.LL.x; UNSUPPORTED("68wba2rnx2qf1yb1zwl7emyom"); // sbb.UR.y += bb.LL.y; UNSUPPORTED("6vyufad5w3ewjk847wfvet74d"); // (((gdata*)(GD_alg(subg)))->bb) = sbb; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bj0ndzvvsqfftb69nsf5gwgo"); // evalPositions(subg, rootg); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6ptl3bkajdnlcqjtcc65lvzn4 // static void initCList(clist_t * clist) public static Object initCList(Object... arg) { UNSUPPORTED("426b4jcrii041onjvleavkg6a"); // static void initCList(clist_t * clist) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("64bbojzoaaau1t7cl5l5hxdbc"); // clist->cl = 0; UNSUPPORTED("auxbos07f2t0rtf8w8sziaka1"); // clist->sz = 0; UNSUPPORTED("27dd5xcxwffb51e9kt8smvs5v"); // clist->cnt = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 39dqbok6w7dzecbztpcwr2sss // static void addCluster(clist_t * clist, graph_t * subg) public static Object addCluster(Object... arg) { UNSUPPORTED("ch4ooh4zms6v4wnaeg3mu7crr"); // static void addCluster(clist_t * clist, graph_t * subg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ecw34rlkdj1yxbju8tntke1q7"); // clist->cnt++; UNSUPPORTED("11sdiyvywz6e8huzmiae0luxe"); // if (clist->cnt >= clist->sz) { UNSUPPORTED("bw2tzb3640mp9g0yqkt1qriuo"); // clist->sz += 10; UNSUPPORTED("3br43nvgjghg5cl8w55jb575c"); // clist->cl = RALLOC(clist->sz, clist->cl, graph_t *); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2ppf11sr4a47a0hsns9fy4ss"); // clist->cl[clist->cnt] = subg; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 blvez04enibnb1urti8nypr3m // static char *portName(graph_t * g, bport_t * p) public static Object portName(Object... arg) { UNSUPPORTED("2okvscqwpqqezrovvu7ckzyu4"); // static char *portName(graph_t * g, bport_t * p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2l3sv6t0gt2fzfwgwp413xane"); // edge_t *e = p->e; UNSUPPORTED("7sdvsuo2rbo6of75bzleek8qf"); // node_t *h = aghead(e); UNSUPPORTED("7jj1xtfi4cbw5y6yhlzh0mli4"); // node_t *t = agtail(e); UNSUPPORTED("8sd9gndpjspq37480rd49es9t"); // static char buf[1000 + 1]; UNSUPPORTED("41orbbs9l9t5osihlly2avycl"); // int len = 8; UNSUPPORTED("2kipzrn24xz111kc3wsad5y0a"); // len += strlen(agnameof(g)) + strlen(agnameof(h)) + strlen(agnameof(t)); UNSUPPORTED("5oxm695jqpgfl1ixyyoi3befn"); // if (len >= 1000) UNSUPPORTED("8e5b7vlvn7ipfcpws1u55nbno"); // sprintf(buf, "_port_%s_%s_%s_%ld", agnameof(g), agnameof(t), agnameof(h), UNSUPPORTED("22t9pdxhzto354ya2hq6wuba4"); // (unsigned long)AGSEQ(e)); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("e6kgc72n0x7sdm9oybcsvjew7"); // sprintf(buf, "_port_%s_(%d)_(%d)_%ld",agnameof(g), ND_id(t), ND_id(h), UNSUPPORTED("22t9pdxhzto354ya2hq6wuba4"); // (unsigned long)AGSEQ(e)); UNSUPPORTED("5jfpogdyby101eyuw2dhtb5cg"); // return buf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9xly1bqcrp9nnod8k5jfwbp5g // static void chkPos(graph_t* g, node_t* n, layout_info* infop, boxf* bbp) public static Object chkPos(Object... arg) { UNSUPPORTED("3o5p4sqo0s46cn3vz2s0dfh29"); // static void chkPos(graph_t* g, node_t* n, layout_info* infop, boxf* bbp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("d8yqhxb1cnge86592ge3ahdkf"); // char *pp; UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("wrvu9u7a8j6i6y6552zncxfk"); // char c; UNSUPPORTED("em08bsddr0lwo4o5yqu8utzgq"); // graph_t *parent; UNSUPPORTED("8m5vv3nw7eyhv8rf2b8p0zzie"); // attrsym_t *G_coord = infop->G_coord; UNSUPPORTED("429m2pc45k6skac7p443tbpac"); // p = agxget(g, G_coord); UNSUPPORTED("3f1sat0g6anyggfla96go23ep"); // if (p[0]) { UNSUPPORTED("7hmevhd9t0vhoilb7b7z5rtru"); // if (g != infop->rootg) { UNSUPPORTED("zq8n2wn96yv1mbobk1qu5rmj"); // parent =agparent(g); UNSUPPORTED("89aks9kqee96aw168b43hfrtq"); // pp = agxget(parent, G_coord); UNSUPPORTED("9dhvu3xnw93fbt644b52o03to"); // if ((pp == p) || !strcmp(p, pp)) UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cr1dg3johqjxamg5latzq2tdv"); // c = '\0'; UNSUPPORTED("ej59cehhf9pgaw8t6st82pwfv"); // if (sscanf(p, "%lf,%lf,%lf,%lf%c", UNSUPPORTED("9o8oz4nmdyu2kqdek3kb6q226"); // &bb.LL.x, &bb.LL.y, &bb.UR.x, &bb.UR.y, &c) >= 4) { UNSUPPORTED("4lxmr7172n4y4nnubzchbq96t"); // if (PSinputscale > 0.0) { UNSUPPORTED("1c7k9urwuwp7p7vxoy4q7r4sp"); // bb.LL.x /= PSinputscale; UNSUPPORTED("441y7dez7jdhtc56rhx61f0tv"); // bb.LL.y /= PSinputscale; UNSUPPORTED("65wvxshjtzdc9zocf9xsl2gvv"); // bb.UR.x /= PSinputscale; UNSUPPORTED("5v7ndgkjn1ruevu0a06twp7mc"); // bb.UR.y /= PSinputscale; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("9qnr8qmbz7pf3mmpebux0p08m"); // if (c == '!') UNSUPPORTED("a2of0q0fgez6ppasmwdujr5lc"); // ND_pinned(n) = 3; UNSUPPORTED("3nlo9d762yf47jmo6mddv2rhj"); // else if (c == '?') UNSUPPORTED("6jh0kyj5b3x2wq1r7hzqizihz"); // ND_pinned(n) = 2; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("56ez5c0ki8jup5kllwhd9zxdc"); // ND_pinned(n) = 1; UNSUPPORTED("a5ap9hnosv5rv8rwk7ba8won1"); // *bbp = bb; UNSUPPORTED("6to1esmb8qfrhzgtr7jdqleja"); // } else UNSUPPORTED("ezi6sqatds0b2fgekxfupde82"); // agerr(AGWARN, "graph %s, coord %s, expected four doubles\n", UNSUPPORTED("5hu65ilq398d3ey6pxk0s0em9"); // agnameof(g), p); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5fn3mtocch1b26irypnr09t9m // static void addEdge(edge_t * de, edge_t * e) public static Object addEdge(Object... arg) { UNSUPPORTED("1grpxuhc4kibkdljhpys1kapl"); // static void addEdge(edge_t * de, edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e5trxwbwododl3veoj1lp6b7c"); // short cnt = ED_count(de); UNSUPPORTED("5iu5ll9p8cttx85mphqz03ncq"); // edge_t **el; UNSUPPORTED("1bndnrccbbggbh4tnw3a6zabs"); // el = (edge_t **) (ED_to_virt(de)); UNSUPPORTED("eoxhjwtyx2ujqsjoaaarclfrj"); // el = ALLOC(cnt + 1, el, edge_t *); UNSUPPORTED("1ttlm7ew26jwfoq2o0170ns27"); // el[cnt] = e; UNSUPPORTED("8teacoxlhsm20661x85b70o6c"); // ED_to_virt(de) = (edge_t *) el; UNSUPPORTED("b3lq6k9r48uakki9aciefl1b0"); // ED_count(de)++; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7agb5w2cnyvb0z8q9nihjbsxp // static void copyAttr (graph_t* g, graph_t* dg, char* attr) public static Object copyAttr(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("9hbiavk3r6a6bq4cvcry8dscw"); // copyAttr (graph_t* g, graph_t* dg, char* attr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2na6lh852kcxird2ho1vichf5"); // char* ov_val; UNSUPPORTED("848o3cjndi1v3xpwjjiebzbvp"); // Agsym_t* ov; UNSUPPORTED("ca8z7ma72fqedls8lj4qi01ra"); // if ((ov = agattr(g,AGRAPH, attr, NULL))) { UNSUPPORTED("emj7axj812hks27wjzvj3e5yt"); // ov_val = agxget(g,ov); UNSUPPORTED("3pu4oq8u9tlqnjo0bc5vcowjl"); // ov = agattr(dg,AGRAPH, attr, NULL); UNSUPPORTED("2rypj3m1cr0g1qbrw8fbn1q6g"); // if (ov) UNSUPPORTED("9l6gavxujo2qkhfh7jwwgriu0"); // agxset (dg, ov, ov_val); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("3iuelryhfjpm6rm2im7gc5j5z"); // agattr(dg, AGRAPH, attr, ov_val); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6vdt9ftxoj8z4xb5zvray3g1m // static graph_t *deriveGraph(graph_t * g, layout_info * infop) public static Object deriveGraph(Object... arg) { UNSUPPORTED("2sd6al0j42gndvdmp4rzw18jd"); // static graph_t *deriveGraph(graph_t * g, layout_info * infop) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("36r1dzbbxcnyuanwl0580q4nw"); // graph_t *dg; UNSUPPORTED("cuxjodqo53rx3gt9t353c352r"); // node_t *dn; UNSUPPORTED("8uujemixuhlf040icq3zsh7j8"); // graph_t *subg; UNSUPPORTED("4tltvvpkm9lkmh7xst5u0auxy"); // char name[100]; UNSUPPORTED("dj8wp6znctlnc9ae1rgvqwtj0"); // bport_t *pp; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("8u0qg8saz2tni323ov8v7ym8g"); // edge_t *de; UNSUPPORTED("cbj0me372w66gi341wwhu1uxz"); // int i, id = 0; UNSUPPORTED("5o8czyuixfuavbsljaqx0o0co"); // sprintf(name, "_dg_%d", infop->gid++); UNSUPPORTED("41xjj6amd58fjieqo5xy29iwq"); // if (Verbose >= 2) UNSUPPORTED("2jw7n9j1r26v41dzbriysfuph"); // fprintf(stderr, "derive graph %s of %s\n", name, agnameof(g)); UNSUPPORTED("ass9x7oye1kqh43r99fe134rc"); // dg = agopen("derived", Agstrictdirected,((Agdisc_t *)0)); UNSUPPORTED("8u7x1w8qeiknrzdmu54br8hgh"); // agbindrec(dg, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); UNSUPPORTED("1drj83vu125frg9jj9i95swg0"); // GD_alg(dg) = (void *) (gdata*)zmalloc(sizeof(gdata)); /* freed in freeDeriveGraph */ UNSUPPORTED("4d4xxxlu1ervuob2lrn7bp8w7"); // GD_ndim(dg) = GD_ndim(g); UNSUPPORTED("ad3gj6lsuor2yei2uael49jhb"); // /* Copy attributes from g. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("134w8vcs8qk4v9vf1z1wp9vg0"); // copyAttr(g,dg,"overlap"); UNSUPPORTED("5fwoygmjkymrgxdkfmkutsvuz"); // copyAttr(g,dg,"sep"); UNSUPPORTED("433rnj6ixonm6y9ctmp9h9lgs"); // copyAttr(g,dg,"K"); UNSUPPORTED("449dsc5wrhyuj3iwozcdd7sdd"); // /* create derived nodes from clusters */ UNSUPPORTED("7naa6f8pevjidfr7m41eli6xj"); // for (i = 1; i <= GD_n_cluster(g); i++) { UNSUPPORTED("9ddxwk9qkst1jg6m81vwuwn81"); // boxf fix_bb = {{ MAXDOUBLE, MAXDOUBLE },{ -MAXDOUBLE, -MAXDOUBLE }}; UNSUPPORTED("cpbcovu6u9jpbhniuwko58sge"); // subg = GD_clust(g)[i]; UNSUPPORTED("cxmz2wd4fqxujrjcaogvck4n7"); // do_graph_label(subg); UNSUPPORTED("d25721erilxnl8e6wgtvwwf4j"); // dn = mkDeriveNode(dg, agnameof(subg)); UNSUPPORTED("2p0a7ndqiu7hj4i6qiv1snx4l"); // ND_clust(dn) = subg; UNSUPPORTED("6nxi4co9zclo5acd9emsgntyw"); // ND_id(dn) = id++; UNSUPPORTED("bt358jfwmn2uq27qg8kgtungu"); // if (infop->G_coord) UNSUPPORTED("7f7y9g4k5ts6wgqw0qenbhtu0"); // chkPos(subg, dn, infop, &fix_bb); UNSUPPORTED("cy3v8r735frrrifffladjezdu"); // for (n = agfstnode(subg); n; n = agnxtnode(subg, n)) { UNSUPPORTED("1xlso3piaeev0go6meyr8boiz"); // (ND_next(n)) = dn; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("80rcuwseddkt07frvwz9n17vt"); // if (ND_pinned(dn)) { UNSUPPORTED("8a2zdxi6udoat007cfp9w4bkw"); // ND_pos(dn)[0] = (fix_bb.LL.x + fix_bb.UR.x) / 2; UNSUPPORTED("c69q3ml4t91kgitsc44ogkoa5"); // ND_pos(dn)[1] = (fix_bb.LL.y + fix_bb.UR.y) / 2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("617ecq2paqeo8ldlt01h7q0oz"); // /* create derived nodes from remaining nodes */ UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("2ix5xgrr9i5zasv51xrt8rdxb"); // if (!(ND_next(n))) { UNSUPPORTED("chh77aumtkozm98s2n3hq6ntm"); // if ((ND_clust(n)) && ((ND_clust(n)) != (((gdata*)(GD_alg(g)))->parent))) { UNSUPPORTED("eox2yyzidryds7lm2todgq3g2"); // agerr (AGERR, "node \"%s\" is contained in two non-comparable clusters \"%s\" and \"%s\"\n", agnameof(n), agnameof(g), agnameof((ND_clust(n)))); UNSUPPORTED("5igby0q9jkycahnikpdleoyio"); // longjmp (jbuf, 1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("8dikkgctkq3s35v4tz9q2ejit"); // (ND_clust(n)) = g; UNSUPPORTED("9rhp942iykmc0yotzfkotd12d"); // if ((ND_clustnode(n))) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("bv8j18oa5brhrd164npw7573f"); // dn = mkDeriveNode(dg, agnameof(n)); UNSUPPORTED("1xlso3piaeev0go6meyr8boiz"); // (ND_next(n)) = dn; UNSUPPORTED("2agpwv8n236x82s259zsvvbjc"); // ND_id(dn) = id++; UNSUPPORTED("3tgv5xfy7e1q5y0rl8zogrrsz"); // ND_width(dn) = ND_width(n); UNSUPPORTED("32riuc0tbefhrw67o8opdcooo"); // ND_height(dn) = ND_height(n); UNSUPPORTED("7hfs579l04890tsdi5zlthon2"); // ND_lw(dn) = ND_lw(n); UNSUPPORTED("cwno1a7tk3plxczie8ckeo13v"); // ND_rw(dn) = ND_rw(n); UNSUPPORTED("eueztzwym8i21m59nw8oo4il7"); // ND_ht(dn) = ND_ht(n); UNSUPPORTED("3lmyb3a76s2d2fy2t62go74vl"); // ND_shape(dn) = ND_shape(n); UNSUPPORTED("2xf64jj50n2mfjsjxqv38kqvb"); // ND_shape_info(dn) = ND_shape_info(n); UNSUPPORTED("6b4uf9mvh7xmc7zlfisy84j5z"); // if (ND_pinned(n)) { UNSUPPORTED("3wkwtu9wns6c4a2skfpx1c4ox"); // ND_pos(dn)[0] = ND_pos(n)[0]; UNSUPPORTED("319nx1xdjcjnbkoi5vxe2wowp"); // ND_pos(dn)[1] = ND_pos(n)[1]; UNSUPPORTED("42b5qiqttjn7ragj9irug02py"); // ND_pinned(dn) = ND_pinned(n); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("jq9juku0mxk2dheeaietg5jj"); // (((dndata*)(ND_alg(dn)))->dn) = n; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e8fak2kgyre9b18od8wyrjlw2"); // /* add edges */ UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("ak952thd788dbr90m2fvaklyu"); // edge_t *e; UNSUPPORTED("25r3mrk84sqvejk2q2dd81aa1"); // node_t *hd; UNSUPPORTED("bp7hjq9fr800l7cjn5hojjyos"); // node_t *tl = (ND_next(n)); UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("bkfde9mm61hzm3azi6xouz3pv"); // hd = (ND_next(aghead(e))); UNSUPPORTED("2zvgmnv71vkplklm2dmwu24o6"); // if (hd == tl) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("7yvps7igfif7acnwp70cumlel"); // if (hd > tl) UNSUPPORTED("1g6uo9qs73mwhukefmo4sngv5"); // de = agedge(dg, tl, hd, NULL,1); UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("1022owhcb88r8unps1boedbh4"); // de = agedge(dg, hd, tl, NULL,1); UNSUPPORTED("7hwwfug2934h5tg5e3qmi8m3w"); // agbindrec(de, "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0)); UNSUPPORTED("22z76uz4xfa28nyk5h3d1gsj3"); // ED_dist(de) = ED_dist(e); UNSUPPORTED("bcw18t5zay7blame1o4bs12tq"); // ED_factor(de) = ED_factor(e); UNSUPPORTED("c9nabs4xy7r0fpfmurplkrldy"); // /* fprintf (stderr, "edge %s -- %s\n", tl->name, hd->name); */ UNSUPPORTED("8625nhoiscdsh67j2rus26bgp"); // (((dndata*)(ND_alg(hd)))->wdeg)++; UNSUPPORTED("1arf55zpaosytbk2doe07hiqh"); // (((dndata*)(ND_alg(tl)))->wdeg)++; UNSUPPORTED("3sndhzronf938mbr4kohylk4l"); // if ((ED_to_virt(de) == 0)) { UNSUPPORTED("dp31c14fxs9t515jf1j36ihhw"); // (((dndata*)(ND_alg(hd)))->deg)++; UNSUPPORTED("eymwfx8dwyyyryw89ninijw61"); // (((dndata*)(ND_alg(tl)))->deg)++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("cic1cuypauxmkiv3txyydlocu"); // addEdge(de, e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5tn7h1exp6stahb3elxmbtchg"); // /* transform ports */ UNSUPPORTED("ac4pgb337ukder3sujg5h9q5t"); // if ((pp = (((gdata*)(GD_alg(g)))->ports))) { UNSUPPORTED("34rzfa5kqpuclqyhx08ql0nhp"); // bport_t *pq; UNSUPPORTED("5a0euc7zkzo97d75q8yv5hf9t"); // node_t *m; UNSUPPORTED("b3nm6dhki6i23iyz1l344asp2"); // int sz = (((gdata*)(GD_alg(g)))->nports); UNSUPPORTED("6ppwml6ylufuxfg2zrxs0z2ru"); // /* freed in freeDeriveGraph */ UNSUPPORTED("axu3u8881pm5plosjerpfoefx"); // (((gdata*)(GD_alg(dg)))->ports) = pq = (bport_t*)zmalloc((sz + 1)*sizeof(bport_t)); UNSUPPORTED("11mr8ytde2yz4td1bzjpdypro"); // sz = 0; UNSUPPORTED("ejmu2tqe004hmad7z3uen9sbd"); // while (pp->e) { UNSUPPORTED("1dd25u4wqgu3t9n27w1glf2z4"); // m = (ND_next(pp->n)); UNSUPPORTED("d4z9wura62xq75gxmoywpoeos"); // /* Create port in derived graph only if hooks to internal node */ UNSUPPORTED("8j32lcooudgseo85a0j51vz55"); // if (m) { UNSUPPORTED("am8i6svk94imehfp9byv7j5wc"); // dn = mkDeriveNode(dg, portName(g, pp)); UNSUPPORTED("aciu287d4ri031b89kgg3xz6x"); // sz++; UNSUPPORTED("bhfdahdflxt9gaf1pj0afw7jy"); // ND_id(dn) = id++; UNSUPPORTED("3aues0xosdqt23ymmjcziopg4"); // if (dn > m) UNSUPPORTED("7em53cu4xxwoel9gqq82t7lle"); // de = agedge(dg, m, dn, NULL,1); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("e951yp20hzuifh083f6spalcu"); // de = agedge(dg, dn, m, NULL,1); UNSUPPORTED("2j1ohh7g5vwkdgxp5t9t3ny2"); // agbindrec(de, "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0)); UNSUPPORTED("5fe058fybewaey90x4td3ppc9"); // ED_dist(de) = ED_dist(pp->e); UNSUPPORTED("7a43n1n8dskthaivv69xyb698"); // ED_factor(de) = ED_factor(pp->e); UNSUPPORTED("3f4oahnf205anxmrm685rba8f"); // addEdge(de, pp->e); UNSUPPORTED("9tchk5ojkcxw2gm68riqvjif8"); // (((dndata*)(ND_alg(dn)))->wdeg)++; UNSUPPORTED("9q4bhzgr7c0e098pbmmvhqmg0"); // (((dndata*)(ND_alg(m)))->wdeg)++; UNSUPPORTED("7j33x9kn3fots2djc9yah9goz"); // (((dndata*)(ND_alg(dn)))->deg)++; /* ports are unique, so this will be the first and */ UNSUPPORTED("55lin4yd4sfuoga01gowno3xn"); // (((dndata*)(ND_alg(m)))->deg)++; /* only time the edge is touched. */ UNSUPPORTED("b0lwy0fznsomw5chpbt1nj5h0"); // pq->n = dn; UNSUPPORTED("bykxehfnrgknuf93a5cvk1qyd"); // pq->alpha = pp->alpha; UNSUPPORTED("9r66gr9ec26zwd6yk7l3f05a"); // pq->e = de; UNSUPPORTED("4ylj4yiwdkddsiqns5j3vq7m3"); // pq++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4t42c85s64mps71a1sjc7yoey"); // pp++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5bhygv54mbde0tmajhaqwxznv"); // (((gdata*)(GD_alg(dg)))->nports) = sz; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7t6k0j9ffr522l0t8a1atpxqy"); // return dg; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 33v5v2wokaumqudm0d0qlk1t6 // static int ecmp(const void *v1, const void *v2) public static Object ecmp(Object... arg) { UNSUPPORTED("cglhxc83kobq6uvln39iefpub"); // static int ecmp(const void *v1, const void *v2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2s7x8car3i6c4lrri2g00b10o"); // erec *e1 = (erec *) v1; UNSUPPORTED("ea12jvnp6iz8kr6o8prqn92b5"); // erec *e2 = (erec *) v2; UNSUPPORTED("esrrdcedcjc2527zw88yyq6l3"); // if (e1->alpha > e2->alpha) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("29zqx7u24t3hbc2w6nsv43a6z"); // else if (e1->alpha < e2->alpha) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("8ix5otcc1qjwrnv4bmhq4d4qo"); // else if (e1->dist2 > e2->dist2) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("8rbp65y6jnfq1kcqsvoq98f9g"); // else if (e1->dist2 < e2->dist2) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9yzpataeczxhgj2u09bsbpk1k // static erec *getEdgeList(node_t * n, graph_t * g) public static Object getEdgeList(Object... arg) { UNSUPPORTED("4js6nnzf22zxc98rmxu2sy0m5"); // static erec *getEdgeList(node_t * n, graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5wjozc08ggypzjbs49uzfopou"); // erec *erecs; UNSUPPORTED("zc25c5rgocmjnco9wlpa090t"); // int deg = (((dndata*)(ND_alg(n)))->deg); UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("an5v3e2oy9hxck46bwp0l8a0k"); // double dx, dy; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("8rdaar71kdkz8cpsoil3hqta0"); // node_t *m; UNSUPPORTED("cbmm4fkvgxlhv0t133owcx0jn"); // /* freed in expandCluster */ UNSUPPORTED("250grrs502e0mg71llqz7y3ey"); // erecs = (erec*)zmalloc((deg + 1)*sizeof(erec)); UNSUPPORTED("9z3er49pc4h2rxja5r9grdo0h"); // i = 0; UNSUPPORTED("dcuhjbsiioawp6zspvonwd4px"); // for (e = agfstedge(g, n); e; e = agnxtedge(g, e, n)) { UNSUPPORTED("cyvbvhb35lmo87fsomu1d96zj"); // if (aghead(e) == n) UNSUPPORTED("d7s4k8dv2n952zh2uzy586rlg"); // m = agtail(e); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("1f958q8a7vsixzpgoltd50ck9"); // m = aghead(e); UNSUPPORTED("230hngcg1h0kimh2x9qmw8aa6"); // dx = ND_pos(m)[0] - ND_pos(n)[0]; UNSUPPORTED("cp7yivxkc1o2123e3fj4fld40"); // dy = ND_pos(m)[1] - ND_pos(n)[1]; UNSUPPORTED("ebc0qzcdpyvo9hv477ji0d4ld"); // erecs[i].e = e; UNSUPPORTED("9ot3jasi873r93jjz3q7k0xl"); // erecs[i].alpha = atan2(dy, dx); UNSUPPORTED("ai500wq75tl9pns9eu0ebhnp2"); // erecs[i].dist2 = dx * dx + dy * dy; UNSUPPORTED("chd2f5z6rt19lbaye25ej7q6j"); // i++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("eo3y5e9msr0sbf98a9oq70rlx"); // assert(i == deg); UNSUPPORTED("4jcqtkewsctxthnbzmwkgsef1"); // qsort(erecs, deg, sizeof(erec), ecmp); UNSUPPORTED("19r2qn10360fdoz0ctd9swuhi"); // /* ensure no two angles are equal */ UNSUPPORTED("6xfuj7a6ekpi0iz8v543s6enb"); // if (deg >= 2) { UNSUPPORTED("3y61w6tgxj0gpwvw3bw2rtq34"); // int j; UNSUPPORTED("armuznkqp0y34r5qokhqwfiiw"); // double a, inc, delta, bnd; UNSUPPORTED("5or0zebpgtvozlmal8j2q1ymh"); // i = 0; UNSUPPORTED("b9y24dq92kvg4bpwzicghrrl9"); // while (i < deg - 1) { UNSUPPORTED("a8npf73y75uu4rqo3f0hnw1hj"); // a = erecs[i].alpha; UNSUPPORTED("2rrc6js2pfjyzqzzjj6rg6kpa"); // j = i + 1; UNSUPPORTED("7yy089fn32r4vqha2r41wd3ia"); // while ((j < deg) && (erecs[j].alpha == a)) UNSUPPORTED("ebt0qwigtq6akhjzerdy8d52b"); // j++; UNSUPPORTED("6owp0mbm26f3nqj1fmbqw05yl"); // if (j == i + 1) UNSUPPORTED("3c95efoun51kjpyj1cz86clhq"); // i = j; UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("1mjvaixyabzfkloamfs33m997"); // if (j == deg) UNSUPPORTED("93m0uslkw81crhho73k7j0iyw"); // bnd = M_PI; /* all values equal up to end */ UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("38sca4776wdqbui5fjgg0rhj"); // bnd = erecs[j].alpha; UNSUPPORTED("ekjte0x5h4d5chvnzxb8syu3g"); // delta = (bnd - a) / (j - i); UNSUPPORTED("9vvs5ywf8o7pulajli26ynshh"); // if (delta > (M_PI/90)) UNSUPPORTED("dlu9lh11lmhhkokx86hq43rek"); // delta = (M_PI/90); UNSUPPORTED("cl85s8tfki4o6j9rxhi27ibob"); // inc = 0; UNSUPPORTED("an7nwlp3eq8f7mnv3seg9zcoz"); // for (; i < j; i++) { UNSUPPORTED("2dznixqoe5fhu0xxwy0li9j0j"); // erecs[i].alpha += inc; UNSUPPORTED("31c8klms0zg7ed5pbia4p7ue7"); // inc += delta; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4c2yyc1h799tvjuqrd5sikjsk"); // return erecs; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5f5sxn4g2wwqsa042183bnkkb // static int genPorts(node_t * n, erec * er, bport_t * pp, int idx, double bnd) public static Object genPorts(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("a7opwz89ty2fab6t5020fxepv"); // genPorts(node_t * n, erec * er, bport_t * pp, int idx, double bnd) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dxz8gujppjqsa63merjuwp9ak"); // node_t *other; UNSUPPORTED("6iv4xusq3ncisurzdtlt8lhe9"); // int cnt; UNSUPPORTED("nvb8xxeb5opdi1chqigr5ll8"); // edge_t *e = er->e; UNSUPPORTED("bdbvy4bgsn8d0vzx18gusxheq"); // edge_t *el; UNSUPPORTED("54sqpcif3uwzim5rzj2yfvcv"); // edge_t **ep; UNSUPPORTED("etdgofjtpee3ial3gmpgysso0"); // double angle, delta; UNSUPPORTED("u5aovpvnb8qg67qiutwqcinb"); // int i, j, inc; UNSUPPORTED("7x9qeha2xtvr3yc8vzkquaayt"); // cnt = ED_count(e); UNSUPPORTED("6qn90nw5pl3r7g62aowp7ktsb"); // if (aghead(e) == n) UNSUPPORTED("5a60qbv8r5b666nfetu7fbotj"); // other = agtail(e); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("ddn2u7jjuy674veth7q72p0sb"); // other = aghead(e); UNSUPPORTED("ancvozx0amrnu89ky41goacj3"); // delta = (bnd - er->alpha) / cnt; UNSUPPORTED("5iv4gni7wdiw3u34jy7iefzel"); // angle = er->alpha; UNSUPPORTED("524im1x5zfkbrj2y3uvtc0o2q"); // if (delta > (M_PI/90)) UNSUPPORTED("5hvdfsr5lwj48jc8ne066wis3"); // delta = (M_PI/90); UNSUPPORTED("dmzdo20j5ywmevv4pucm657dl"); // if (n < other) { UNSUPPORTED("efntztef5scb94lalziv9p74c"); // i = idx; UNSUPPORTED("59w8ipq1hfgjppab0ne4vt5rn"); // inc = 1; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("9108b9iyl0c19by2pv8n8pxm5"); // i = idx + cnt - 1; UNSUPPORTED("a7uocrd0csmarv70416d9ro6d"); // inc = -1; UNSUPPORTED("1d5i6ukso5ctxozysewfhh2ji"); // angle += delta * (cnt - 1); UNSUPPORTED("9mml7cxrkh63582n90i7pmpri"); // delta = -delta; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4jwzdjf4m5joh6ns1sik7sefr"); // ep = (edge_t **) (el = ED_to_virt(e)); UNSUPPORTED("87erwse4muo7uek029fa7troo"); // for (j = 0; j < ED_count(e); j++, ep++) { UNSUPPORTED("6vqzt3ohw6lxk2qzpwjo6b3yu"); // el = *ep; UNSUPPORTED("4c8uyhenmzmpllixxgxerkicn"); // pp[i].e = el; UNSUPPORTED("aqj2zus52vmgjzmi8fjoaj8fy"); // pp[i].n = ((ND_next(agtail(el))) == n ? agtail(el) : aghead(el)); UNSUPPORTED("7j2e3e5y1jlynpdt66xosutmf"); // pp[i].alpha = angle; UNSUPPORTED("2zobp3cnpuyfg0efxtuusws2c"); // i += inc; UNSUPPORTED("aeyh09i9hn8lki7e6pkmnl3t7"); // angle += delta; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ahjledpa6jcj7ra1dv3nto2b0"); // return (idx + cnt); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1pzmadkv6kzksm5zd4naotpzn // static graph_t *expandCluster(node_t * n, graph_t * cg) public static Object expandCluster(Object... arg) { UNSUPPORTED("riju9qc2n42gxw3wilvyq5zs"); // static graph_t *expandCluster(node_t * n, graph_t * cg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2wfwicsc3edie6yyd9xhtjbnv"); // erec *es; UNSUPPORTED("1pmrh42jv7qy6796ro7kb0kvf"); // erec *ep; UNSUPPORTED("3kc67b1kq37hwnadtpynyn0w1"); // erec *next; UNSUPPORTED("f5k50h9iahfqirvly6e9mlu39"); // graph_t *sg = ND_clust(n); UNSUPPORTED("dj8wp6znctlnc9ae1rgvqwtj0"); // bport_t *pp; UNSUPPORTED("6spducho5ji2ipuw64ubl7x70"); // int sz = (((dndata*)(ND_alg(n)))->wdeg); UNSUPPORTED("716hjbifedt25yhusduvy5hlt"); // int idx = 0; UNSUPPORTED("7zng16j5qq8oz1p14ahsi4o2b"); // double bnd; UNSUPPORTED("8eti18xdz2mo8tqmx9hea5gj"); // if (sz != 0) { UNSUPPORTED("5ee465jmjebzumoi8t37ajkni"); // /* freed in cleanup_subgs */ UNSUPPORTED("dhgbh72vlj9t041pgvr8b4pz1"); // pp = (bport_t*)zmalloc((sz + 1)*sizeof(bport_t)); UNSUPPORTED("6uv9zk4so2vyd8eyt5yk7u224"); // /* create sorted list of edges of n */ UNSUPPORTED("5h94e1eoc5lgyf8oryr168kk7"); // es = ep = getEdgeList(n, cg); UNSUPPORTED("5pjygnv0w421soihur3j2n19s"); // /* generate ports from edges */ UNSUPPORTED("cv0otlibqhj5qkcyd9j21cjyw"); // while (ep->e) { UNSUPPORTED("16gz4mmyn1cns1ghgi4jnxtjz"); // next = ep + 1; UNSUPPORTED("epalo8tlkkido0vcxo64ti05o"); // if (next->e) UNSUPPORTED("8wo10h6flofq3f62vy4o7kbfs"); // bnd = next->alpha; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("biobr00aq48njyaoumysv2mdt"); // bnd = 2 * M_PI + es->alpha; UNSUPPORTED("dzv1s960k4mmyjifb39ofyf4w"); // idx = genPorts(n, ep, pp, idx, bnd); UNSUPPORTED("77abayl2usgy0cb19tv6lfa0a"); // ep = next; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7pzx73jx9fdlfpom5fvuisf30"); // assert(idx == sz); UNSUPPORTED("5yg1wxrsyr26qkpfg5hb6ox69"); // (((gdata*)(GD_alg(sg)))->ports) = pp; UNSUPPORTED("2pte1i8la6fqapoqo9i6jq2jd"); // (((gdata*)(GD_alg(sg)))->nports) = sz; UNSUPPORTED("4vjbnrhp6sp81ysgpigk0w9fe"); // free(es); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1jw141gg4omv8r72xcbl5ln0o"); // return sg; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 y2v1e8mlrtal0inmqimbmwil // static void setClustNodes(graph_t* root) public static Object setClustNodes(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("a1xr13co28v2x7itvx57ckyjv"); // setClustNodes(graph_t* root) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("2n9wv2dwa543h4bdjd6u9qil3"); // graph_t* p; UNSUPPORTED("43ygqm2wusmc5ufanrf2tywuv"); // pointf ctr; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("3qdhpefftpzkhd1uimovgz5jh"); // double w, h, h_pts; UNSUPPORTED("d0p8olt4t1x5mfdfjmckju3y8"); // double h2, w2; UNSUPPORTED("d9xe8rt1gktknfj0nxqb22eba"); // pointf *vertices; UNSUPPORTED("8uyptmsbxy8cnb2yc5e1zjy93"); // for (n = agfstnode(root); n; n = agnxtnode(root, n)) { UNSUPPORTED("4b1hbbxns6t6oevwjsbv4513z"); // if (!(ND_clustnode(n))) continue; UNSUPPORTED("2m6wdm3211yoi47ht9uwrwgsm"); // p = (ND_clust(n)); UNSUPPORTED("5b9nka9jqnnowwqftn354445m"); // bb = (((gdata*)(GD_alg(p)))->bb); /* bbox in parent cluster's coordinates */ UNSUPPORTED("ehx0x2r1iwiwqns4hwag5ww6q"); // w = bb.UR.x - bb.LL.x; UNSUPPORTED("ecqr8i6dhetdps522wjdfb2c"); // h = bb.UR.y - bb.LL.y; UNSUPPORTED("aqt54dcfuupky9j2d2wlh5rd8"); // ctr.x = w / 2.0; UNSUPPORTED("vyxkz174l2mhl7ztncntmmsz"); // ctr.y = h / 2.0; UNSUPPORTED("1olcqhh2kmzq3hpz80wh71gcr"); // w2 = ((w / 2.0)*(double)72); UNSUPPORTED("c25hsrybs7p3ee3xen5qd13gj"); // h2 = ((h / 2.0)*(double)72); UNSUPPORTED("lcz07cdtav0i5pkdm4ulyeif"); // h_pts = ((h)*(double)72); UNSUPPORTED("bw4ulfhcuzvtfy8f1a0fjmiug"); // ND_pos(n)[0] = ctr.x; UNSUPPORTED("ec6oo47jscvlloh5x7u26ompb"); // ND_pos(n)[1] = ctr.y; UNSUPPORTED("6as0e9whx5epwmgr5h91oood0"); // ND_width(n) = w; UNSUPPORTED("exytwm9csyh4wkam8a94p7hd7"); // ND_height(n) = h; UNSUPPORTED("2izyeakwnte2k0f1rym0focld"); // /* ND_xsize(n) = POINTS(w); */ UNSUPPORTED("928hx9xiah08q2u08vu7ukgpt"); // ND_lw(n) = ND_rw(n) = w2; UNSUPPORTED("d0yspu392ttmkkqljtfb2eskr"); // ND_ht(n) = h_pts; UNSUPPORTED("22vsci7n08rkutzk5kh2yhl7c"); // vertices = ((polygon_t *) ND_shape_info(n))->vertices; UNSUPPORTED("dtnoqplb6f5t6rjoetdbn7dpt"); // vertices[0].x = ND_rw(n); UNSUPPORTED("no8acgmdosrbl407jbxil2zz"); // vertices[0].y = h2; UNSUPPORTED("5l5suyq7b3qoi5470ao9b1ihn"); // vertices[1].x = -ND_lw(n); UNSUPPORTED("4edoiulp1b902plttl0pprjs9"); // vertices[1].y = h2; UNSUPPORTED("b0yvqxi6n1vwbsngtqj8o03fp"); // vertices[2].x = -ND_lw(n); UNSUPPORTED("exj9asgcw08vxfr39ityozdfc"); // vertices[2].y = -h2; UNSUPPORTED("79hj8e9phwhpt992ut5q0iczf"); // vertices[3].x = ND_rw(n); UNSUPPORTED("93e6r0lx82k87elewlj8r4an5"); // vertices[3].y = -h2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2uewd3mw1hgw96jr7xtn0ic0j // static void layout(graph_t * g, layout_info * infop) public static Object layout(Object... arg) { UNSUPPORTED("9wf2yhzjprzwjjvfeh8z88me2"); // static UNSUPPORTED("dh8zvn9r31zuya7cuy1pahkna"); // void layout(graph_t * g, layout_info * infop) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("88zvgip6mka5eie52temi7ynd"); // point *pts = NULL; UNSUPPORTED("36r1dzbbxcnyuanwl0580q4nw"); // graph_t *dg; UNSUPPORTED("cuxjodqo53rx3gt9t353c352r"); // node_t *dn; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("e75aepnaqkzqf68ewt7a4zqfi"); // graph_t *cg; UNSUPPORTED("5wyi0wasd5kecf6rhsqdjk7v2"); // graph_t *sg; UNSUPPORTED("9qoemozuf8uc27tr5yncxluhz"); // graph_t **cc; UNSUPPORTED("8gobe9nq2l5rtdvjoqtow0smk"); // graph_t **pg; UNSUPPORTED("bgwb4n61b6v6hggxzjxkzyyhh"); // int c_cnt; UNSUPPORTED("d8w902k7y57534m1l3mqq9o65"); // int pinned; UNSUPPORTED("737jd5uo7xo54hyd5aao8g0aw"); // xparams xpms; UNSUPPORTED("cve2on8gll5i0vomy8lnwhai2"); // if (Verbose) { UNSUPPORTED("rheewzyfvag1kqk93eajs451"); // fprintf (stderr, "layout %s\n", agnameof(g)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cixz5s3nezkl0juedeg7g84v"); // /* initialize derived node pointers */ UNSUPPORTED("16hw9gw0dz2w7mrtba0eoqrdi"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("b11q9bnts0snyhhzbw1jj9miy"); // (ND_next(n)) = 0; UNSUPPORTED("7hk4syj6pc3qquqkt2x0z7ia3"); // dg = deriveGraph(g, infop); UNSUPPORTED("1ed3c4bs6xzjsg99joywylwdz"); // cc = pg = findCComp(dg, &c_cnt, &pinned); UNSUPPORTED("bzg4jbqclh75xauf8ahwwlqeu"); // while ((cg = *pg++)) { UNSUPPORTED("6p7xfvlw6j6ymy8dd4rtsex4c"); // fdp_tLayout(cg, &xpms); UNSUPPORTED("4kwu1qpsymozefbkw7esfkp0s"); // for (n = agfstnode(cg); n; n = agnxtnode(cg, n)) { UNSUPPORTED("19hq5zcwrpz3kbanolctt1rga"); // if (ND_clust(n)) { UNSUPPORTED("ehq21whkkcc52880147xdb98t"); // pointf pt; UNSUPPORTED("f3yuqnp4vbccljwzhl5z97asc"); // sg = expandCluster(n, cg); /* attach ports to sg */ UNSUPPORTED("cpdfu4kunfnauzugdp79ygbed"); // layout(sg, infop); UNSUPPORTED("8vfg96ob62g74ognc7r4pyolw"); // /* bb.LL == origin */ UNSUPPORTED("9og4fo5ydbv2iekdwdiithgp7"); // ND_width(n) = (((gdata*)(GD_alg(sg)))->bb).UR.x; UNSUPPORTED("ar5b8mgij9tdpbvonzvniy4w9"); // ND_height(n) = (((gdata*)(GD_alg(sg)))->bb).UR.y; UNSUPPORTED("m7uq67pf5n4kny8dsfqyvlgz"); // pt.x = 72 * (((gdata*)(GD_alg(sg)))->bb).UR.x; UNSUPPORTED("7qqo12s2ly8pftx69v9ho2fpx"); // pt.y = 72 * (((gdata*)(GD_alg(sg)))->bb).UR.y; UNSUPPORTED("6su2k057bgfgqwapl1bq6re22"); // ND_rw(n) = ND_lw(n) = pt.x/2; UNSUPPORTED("37rbzv83unu3wx38yhpqt3mfm"); // ND_ht(n) = pt.y; UNSUPPORTED("1lbnffsi0sqewlhnfr306b5os"); // } else if ((!(((dndata*)(ND_alg(n)))->dn) && !ND_clust(n))) UNSUPPORTED("12ovzyxhse31ofvnedz9rnbmi"); // agdelete(cg, n); /* remove ports from component */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2hwmcp6r05fwoszwknajwr4e"); // /* Remove overlaps */ UNSUPPORTED("bd30sghv773eh25e8172kcp79"); // if (agnnodes(cg) >= 2) { UNSUPPORTED("dde6icyk8p097navhq7n3d4rv"); // if (g == infop->rootg) UNSUPPORTED("o91hsoxdu3977z0no3btqze1"); // normalize (cg); UNSUPPORTED("9us3yztqv6awyy06jb3151pyz"); // fdp_xLayout(cg, &xpms); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6mqatxukn8l6algw6wnicdq1h"); // /* set bounding box but don't use ports */ UNSUPPORTED("6n9q6i2oz0h5lg51ne8sgdjd7"); // /* setBB (cg); */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ach533dwiyc833o0pcf45m8ey"); // /* At this point, each connected component has its nodes correctly UNSUPPORTED("dtlaursnpahyf5yquwl2hogzu"); // * positioned. If we have multiple components, we pack them together. UNSUPPORTED("cm4nzlpqz8bqyrm7er7yidp10"); // * All nodes will be moved to their new positions. UNSUPPORTED("8y4iimz4emw890c9cxiq368e7"); // * NOTE: packGraphs uses nodes in components, so if port nodes are UNSUPPORTED("8fxnvrdauinzrmk5b92vzkmwb"); // * not removed, it won't work. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("2dnakiplqvzvuwlmi04ym76w5"); // /* Handle special cases well: no ports to real internal nodes UNSUPPORTED("3ngzsmdezip2r5y6yu5ven665"); // * Place cluster edges separately, after layout. UNSUPPORTED("d7ob3q5h2kihofcd4ddnyn9ge"); // * How to combine parts, especially with disparate components? UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("69t9ynphg2g4zqbfhks86yntc"); // if (c_cnt > 1) { UNSUPPORTED("3i3alyfv4qh2fz47okmy66eyf"); // boolean *bp; UNSUPPORTED("rf0rb7e28dtuppfrbea2pr6i"); // if (pinned) { UNSUPPORTED("c0t0fbfp6yuwwowbu3c3qzmmf"); // bp = (boolean*)zmalloc((c_cnt)*sizeof(boolean)); UNSUPPORTED("3bzp377yjo1rz02ji0pcubqdg"); // bp[0] = NOT(0); UNSUPPORTED("6to1esmb8qfrhzgtr7jdqleja"); // } else UNSUPPORTED("e3vi166v7e69g73awva2677ii"); // bp = 0; UNSUPPORTED("6oq7dybkkhotxhmrffm6zq654"); // infop->pack.fixed = bp; UNSUPPORTED("3kwssq0p8kfzn8oj843c4sadv"); // pts = putGraphs(c_cnt, cc, NULL, &infop->pack); UNSUPPORTED("ba9wjjntjmbkmsqme4dmd6vly"); // if (bp) UNSUPPORTED("12zvaavn1p29dn5i0f00qjmvj"); // free(bp); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("b6puqm8dbf47p8okgmwft9wm8"); // pts = NULL; UNSUPPORTED("80omcjjgczpgh78ubtnewnqeo"); // if (c_cnt == 1) UNSUPPORTED("d1p8uifde77cs8ru5l0jthcor"); // compute_bb(cc[0]); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8uqxq2wibo1qumfk9jb959hw0"); // /* set bounding box of dg and reposition nodes */ UNSUPPORTED("a49nqy0s2t1fsx52x7a00ng6m"); // finalCC(dg, c_cnt, cc, pts, g, infop); UNSUPPORTED("1yomvtf3njcprecdmp7eq33o7"); // free (pts); UNSUPPORTED("4rqo60r491fsqgbni456x6hci"); // /* record positions from derived graph to input graph */ UNSUPPORTED("b0scw6vikd2qnty4kh34khl6q"); // /* At present, this does not record port node info */ UNSUPPORTED("7nwtte44n9k20ku652pjxaf79"); // /* In fact, as noted above, we have removed port nodes */ UNSUPPORTED("9v9aifyc1wn6fmqno12jtgowg"); // for (dn = agfstnode(dg); dn; dn = agnxtnode(dg, dn)) { UNSUPPORTED("6ta70illj6ohfmqkcmf1wmybj"); // if ((sg = ND_clust(dn))) { UNSUPPORTED("burgcn0sab271m2e67b9vs4e8"); // (((gdata*)(GD_alg(sg)))->bb).LL.x = ND_pos(dn)[0] - ND_width(dn) / 2; UNSUPPORTED("45rvs2t96msophfe1x3mvh9uc"); // (((gdata*)(GD_alg(sg)))->bb).LL.y = ND_pos(dn)[1] - ND_height(dn) / 2; UNSUPPORTED("1alcqvbu6g0lg3qq1qd411k4n"); // (((gdata*)(GD_alg(sg)))->bb).UR.x = (((gdata*)(GD_alg(sg)))->bb).LL.x + ND_width(dn); UNSUPPORTED("296pr00pchso0t5tx7ml91gjg"); // (((gdata*)(GD_alg(sg)))->bb).UR.y = (((gdata*)(GD_alg(sg)))->bb).LL.y + ND_height(dn); UNSUPPORTED("5tzeb32o52lqrqrfnrsdvlp6w"); // } else if ((n = (((dndata*)(ND_alg(dn)))->dn))) { UNSUPPORTED("1topwhb5x9qma92g5gds1klvz"); // ND_pos(n)[0] = ND_pos(dn)[0]; UNSUPPORTED("dvh5pxzw5ug0vj9xh6t0kbzmx"); // ND_pos(n)[1] = ND_pos(dn)[1]; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("96o7eqvvi7yfzjh5cihnlmik1"); // (((gdata*)(GD_alg(g)))->bb) = (((gdata*)(GD_alg(dg)))->bb); UNSUPPORTED("55phil4i9byyqk021s75t7jm5"); // /* clean up temp graphs */ UNSUPPORTED("3oko0jiuaxgco73omavewl6ul"); // freeDerivedGraph(dg, cc); UNSUPPORTED("799nquje2u0787f1v6vg7jeo4"); // free(cc); UNSUPPORTED("cve2on8gll5i0vomy8lnwhai2"); // if (Verbose) { UNSUPPORTED("egyar87ti23k1trkd58y9x5mn"); // fprintf (stderr, "end %s\n", agnameof(g)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e6vpkhzs8vppi1ddy6378h69x // static void setBB(graph_t * g) public static Object setBB(Object... arg) { UNSUPPORTED("9gihlzux5i75iigxxvzci8y95"); // static void setBB(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("66b1xztgh3k2s120ukvbxb0oe"); // bb.LL.x = 72 * (((gdata*)(GD_alg(g)))->bb).LL.x; UNSUPPORTED("pkikrl9ki5yy5rjpuhzhi6a4"); // bb.LL.y = 72 * (((gdata*)(GD_alg(g)))->bb).LL.y; UNSUPPORTED("33pghp4flcuky4frryba6nm6n"); // bb.UR.x = 72 * (((gdata*)(GD_alg(g)))->bb).UR.x; UNSUPPORTED("btca3fazt152tlo4fumfshra6"); // bb.UR.y = 72 * (((gdata*)(GD_alg(g)))->bb).UR.y; UNSUPPORTED("8pjanfm12ixxbeb7k86g3z5p4"); // GD_bb(g) = bb; UNSUPPORTED("7naa6f8pevjidfr7m41eli6xj"); // for (i = 1; i <= GD_n_cluster(g); i++) { UNSUPPORTED("elctwbyabxid1y9nbaea8sjun"); // setBB(GD_clust(g)[i]); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dn6oox23u0h8iskougokslo7e // void init_info(graph_t * g, layout_info * infop) public static Object init_info(Object... arg) { UNSUPPORTED("2lc3y7r4ks1cm6hql04o6t4hh"); // void init_info(graph_t * g, layout_info * infop) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("nw5y54zwq0b2slyao5wjz11m"); // infop->G_coord = agattr(g,AGRAPH, "coords", NULL); UNSUPPORTED("9p4le4vmrhg113rhwle53g00s"); // infop->G_width = agattr(g,AGRAPH, "width", NULL); UNSUPPORTED("a3bto8c232ov09lrrt8ffqjc0"); // infop->G_height = agattr(g, AGRAPH,"height", NULL); UNSUPPORTED("56qpputejr9qv8j4odoy6niiq"); // infop->rootg = g; UNSUPPORTED("1et75ypywlqixo81s24gievh1"); // infop->gid = 0; UNSUPPORTED("713zzachlarjpl7ntk2ri17xs"); // infop->pack.mode = getPackInfo(g, l_node, 8 / 2, &(infop->pack)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5hmw0raf7fo7e1651a9c86ux6 // static void mkClusters (graph_t * g, clist_t* pclist, graph_t* parent) public static Object mkClusters(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("2eeb6d0sgy6unuutphirljrg0"); // mkClusters (graph_t * g, clist_t* pclist, graph_t* parent) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("33i6ihl97ygnd0nu3vshtyus2"); // graph_t* subg; UNSUPPORTED("91n1af2pl9y3luspzlro6hvdn"); // clist_t list; UNSUPPORTED("2yst7zq83i4vw7r2zd3r3obg8"); // clist_t* clist; UNSUPPORTED("7uhikpp332vk10cbtpsbobb3w"); // if (pclist == NULL) { UNSUPPORTED("1kigmw3i0vf7adlel77srggyr"); // clist = &list; UNSUPPORTED("7q1y8ow8ah030fwaax0yka8dy"); // initCList(clist); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("2q6kb44buc8u4fiiy6rp8mde0"); // clist = pclist; UNSUPPORTED("8us9duq9qebqx3gvmv2fhsz0s"); // for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("6wyv62qz1rfx3aa2yjoud4bb7"); // if (!strncmp(agnameof(subg), "cluster", 7)) { UNSUPPORTED("20b6qijqfhqydfwqqvyon57vd"); // agbindrec(subg, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); UNSUPPORTED("p26065ja2s9vjrvvkxphqak"); // GD_alg(subg) = (void *) (gdata*)zmalloc(sizeof(gdata)); /* freed in cleanup_subgs */ UNSUPPORTED("3qq65xelnxow982faji3nenpa"); // GD_ndim(subg) = GD_ndim(parent); UNSUPPORTED("3qr6sbufeim9aivvukgupx9a3"); // (((gdata*)(GD_alg(subg)))->level) = (((gdata*)(GD_alg(parent)))->level) + 1; UNSUPPORTED("dzlcmy7mlo7g4wu0zvt1l1sv"); // (((gdata*)(GD_alg(subg)))->parent) = parent; UNSUPPORTED("bm1io3f9athvso30b940cla38"); // addCluster(clist, subg); UNSUPPORTED("dz15beivtnurizqg4yb0m8rr9"); // mkClusters(subg, NULL, subg); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("ddr2v8k95yipuuxr863ke1923"); // mkClusters(subg, clist, parent); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7uhikpp332vk10cbtpsbobb3w"); // if (pclist == NULL) { UNSUPPORTED("bqzv2ql6ssjrc7lsmutbooo9n"); // GD_n_cluster(g) = list.cnt; UNSUPPORTED("bsoxsryrl38t4p726ewlt8yr1"); // if (list.cnt) UNSUPPORTED("872193cmr79m1328w6lutgco7"); // GD_clust(g) = RALLOC(list.cnt + 1, list.cl, graph_t*); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7oqb0h6e96vm35r62xv92siyl // void fdp_init_graph(Agraph_t * g) public static Object fdp_init_graph(Object... arg) { UNSUPPORTED("621hzpi43swuc9vu12w0otup0"); // void fdp_init_graph(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6vmhwvwf0v01vufgz8qcmh7jb"); // setEdgeType (g, (1 << 1)); UNSUPPORTED("3tux5uqf6wyphewj4a0h8vq7s"); // GD_alg(g) = (void *) (gdata*)zmalloc(sizeof(gdata)); /* freed in cleanup_graph */ UNSUPPORTED("11cpzbmfepql0mlmxdvdo8quh"); // GD_ndim(g) = late_int(g, agattr(g,AGRAPH, "dim", NULL), 2, 2); UNSUPPORTED("5hw8vplqatvcs4dw99m6zzbbk"); // Ndim = GD_ndim(g) = MIN(GD_ndim(g), 10); UNSUPPORTED("amlqsqhvjj73xf83yl2mywxer"); // mkClusters (g, NULL, g); UNSUPPORTED("8tbconrtghd0w4280y1tkzkvx"); // fdp_initParams(g); UNSUPPORTED("33lin92n8p2oh85qu0o1hqfcd"); // fdp_init_node_edge(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1hxcjip1yvpy0vhiewttmat3j // void fdpLayout(graph_t * g) public static Object fdpLayout(Object... arg) { UNSUPPORTED("5ru9qe1nkqhsen6gakyhzl1ng"); // void fdpLayout(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3jv589is1bq9fpn36dwhl6isb"); // layout_info info; UNSUPPORTED("anrb4m1f1yn0xk25k5mc990zu"); // init_info(g, &info); UNSUPPORTED("3upqmz8ajc4vakmhu805h1nid"); // layout(g, &info); UNSUPPORTED("2e4rkfcememj12fx7tqwo25cy"); // setClustNodes(g); UNSUPPORTED("8lkjllp8rvxmyhf0fjdcgql3g"); // evalPositions(g,g); UNSUPPORTED("2yd4d5risg5xlhmke0mny96lg"); // /* Set bbox info for g and all clusters. This is needed for UNSUPPORTED("7so57s6gz0qrbj48s1eakmyr5"); // * spline drawing. We already know the graph bbox is at the origin. UNSUPPORTED("3my4yyass50pbs1pq6igaklqg"); // * On return from spline drawing, all bounding boxes should be correct. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("6n08gtkj0lfkzg6sfp4v5uv33"); // setBB(g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9zkwo8rvwdaqntt5ydgovptz9 // static void fdpSplines (graph_t * g) public static Object fdpSplines(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("ahpw08he4of3u3skdihhfb5m1"); // fdpSplines (graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("61qimfo86uhktkmgc2eifmw44"); // int trySplines = 0; UNSUPPORTED("cx1drb9eui5nioe70lvmlgm79"); // int et = (GD_flags(g) & (7 << 1)); UNSUPPORTED("d2c1pvg1dcyjaomjapjw58o8k"); // if (et != (1 << 1)) { UNSUPPORTED("c7ki4bp5938htpzwurqejskt2"); // if (et == (6 << 1)) { UNSUPPORTED("7x5gv7elnffza5po9q275o72c"); // trySplines = splineEdges(g, compoundEdges, (5 << 1)); UNSUPPORTED("7afs76n061qxddl4wd0mx7syj"); // /* When doing the edges again, accept edges done by compoundEdges */ UNSUPPORTED("28gf4qun1djy3on0kdkalq4wd"); // if (trySplines) UNSUPPORTED("f2wu54s3ntexz8vxnbbybck31"); // Nop = 2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5iqpclxiba6in78dwhhfrkh7j"); // if (trySplines || (et != (6 << 1))) { UNSUPPORTED("3qn4hkiudvmupsge77wfj3h3w"); // if ((GD_flags(g) & 1)) { UNSUPPORTED("5l8jenkv77ax02t47zzxyv1k0"); // agerr(AGWARN, UNSUPPORTED("71igsnumhcmopapvl2ht62nhw"); // "splines and cluster edges not supported - using line segments\n"); UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("bckhi2az2g64mgp2okezfc8cm"); // spline_edges1(g, et); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("44lb25xxc9dc38to4r88d3e7i"); // Nop = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("edduytjcanjblib6cohib6vvl"); // if (State < 1) UNSUPPORTED("5g20bnuugvhmfkeu6mwq9admo"); // spline_edges1(g, (1 << 1)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 f3fkbzm2by9n9gfyca5lm4mzf // void fdp_layout(graph_t * g) public static Object fdp_layout(Object... arg) { UNSUPPORTED("a64yhnsx9rfi5rarfg5ajgxvx"); // void fdp_layout(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1por4locm3w6858i1hecz1ua5"); // /* Agnode_t* n; */ UNSUPPORTED("6n1wvk34us0rs8w6bpl2j60jb"); // double save_scale = PSinputscale; UNSUPPORTED("3pp4o4xb7kzgf0eutciesk63j"); // PSinputscale = get_inputscale (g); UNSUPPORTED("d3r3xu1e0xm8eldryvatkn73d"); // fdp_init_graph(g); UNSUPPORTED("ci9r8sj8tbc6yer5c8cebb0cm"); // if (setjmp(jbuf)) { UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ewx6xn7zd488a9txulkv17tcd"); // fdpLayout(g); UNSUPPORTED("8gq1pwiarmm40a109fontod36"); // neato_set_aspect(g); UNSUPPORTED("6ea8nkfyo4o4tnrlq1fr5lk19"); // if ((GD_flags(g) & (7 << 1)) != (0 << 1)) fdpSplines (g); UNSUPPORTED("dlehwmfi69wv6xm8yxld35dtj"); // gv_postprocess(g, 0); UNSUPPORTED("cfv32gj5wy5tzsqp22byr9tbf"); // PSinputscale = save_scale; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/fdpgen/tlayout__c.java000066400000000000000000001634131312650303100222440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.fdpgen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class tlayout__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 3re0e5qgyflcireefp7lbqns8 // static parms_t parms //3 ap3ziys4lgccfv5b9hoqgoh0g // static double cool(double temp, int t) public static Object cool(Object... arg) { UNSUPPORTED("5sgre4bc2ydv6l6svk8ek0txc"); // static double cool(double temp, int t) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dw9g5rx4w1ndvm14dmyd1mvas"); // return ((parms.T0) * ((parms.maxIters) - t)) / (parms.maxIters); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1hfj27tv640d0ffqfnm4vb1rz // static void reset_params(void) public static Object reset_params(Object... arg) { UNSUPPORTED("75qf9l8ygyuzzh8vd1n83vj0z"); // static void reset_params(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c8a8jp11ftz446uf6uszgoze8"); // (parms.T0) = -1.0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3nh9css07393fmibnbovph2hs // static int init_params(graph_t * g, xparams * xpms) public static Object init_params(Object... arg) { UNSUPPORTED("48xs4ljefx0vremqgw3ve2odl"); // static int init_params(graph_t * g, xparams * xpms) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6c0or74do22mjnqxo3amn9k4o"); // int ret = 0; UNSUPPORTED("crp6otfgw6p0ubcoh1qm3lb05"); // if ((parms.T0) == -1.0) { UNSUPPORTED("yl9q627kjvgs8jal076bp3sd"); // int nnodes = agnnodes(g); UNSUPPORTED("5s1s7y81lrpy2vnfgv10ur6ri"); // (parms.T0) = (parms.Tfact) * (parms.K) * sqrt(nnodes) / 5; UNSUPPORTED("6bhqrgwycmijdx6y0w0h24lje"); // ret = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bea2sjliujeywzkofbu5g6wrm"); // xpms->T0 = cool((parms.T0), (parms.pass1)); UNSUPPORTED("15szw8lxycu1ph1797eh963av"); // xpms->K = (parms.K); UNSUPPORTED("bb08968msejsgq6ax6cukmdqq"); // xpms->C = (parms.C); UNSUPPORTED("ajd01g9u5dg1lmf1dc37lh7n5"); // xpms->numIters = (parms.maxIters) - (parms.pass1); UNSUPPORTED("7c02dgjlmmmvkkyv8re4trtae"); // if ((parms.numIters) >= 0) { UNSUPPORTED("b7eb7h431oevllb0el5ljwhf5"); // if ((parms.numIters) <= (parms.pass1)) { UNSUPPORTED("1k1km56qkkjfno0nynnso12qb"); // (parms.loopcnt) = (parms.numIters); UNSUPPORTED("7orupvg2v93yn9ayi6934agib"); // xpms->loopcnt = 0; UNSUPPORTED("clivi4vn6ilbnz8nzb0yczlkz"); // } else if ((parms.numIters) <= (parms.maxIters)) { UNSUPPORTED("195qeklys8cc9ohbnb5jijys"); // (parms.loopcnt) = (parms.pass1); UNSUPPORTED("4gno9zp0ukr0oiqr36ju16pr2"); // xpms->loopcnt = (parms.numIters) - (parms.pass1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("d2ke7mqdgmzme2foml7d52wyi"); // (parms.loopcnt) = (parms.pass1); UNSUPPORTED("72avjgv71z4fub3c90yugg1be"); // xpms->loopcnt = xpms->numIters; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("f3b7mj138albdr4lodyomke0z"); // return ret; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 67nwkqs1o8ak0ust8y6xuptkc // void fdp_initParams(graph_t * g) public static Object fdp_initParams(Object... arg) { UNSUPPORTED("1lc6n2kc85uu13nos0984xf29"); // void fdp_initParams(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dhkv7nf2l5so3osfttpwqe9jb"); // (parms.useGrid) = (fdp_parms->useGrid); UNSUPPORTED("7emjshxcasuzcjusb8bbxzdf7"); // (parms.useNew) = (fdp_parms->useNew); UNSUPPORTED("4mrcfc63ungaf44a4vj2uro2c"); // (parms.numIters) = (fdp_parms->numIters); UNSUPPORTED("1nx5n5st3t3nnx7yqzo6ozup6"); // (parms.unscaled) = (fdp_parms->unscaled); UNSUPPORTED("j5zv0n6wl3u586ysr1qqerue"); // (parms.Cell) = 0.0; UNSUPPORTED("dprq8f5x3ovtoay3nlztqt4pw"); // (parms.C) = (fdp_parms->C); UNSUPPORTED("5decfbdk7yhmkg3xgrg7f71sk"); // (parms.Tfact) = (fdp_parms->Tfact); UNSUPPORTED("36qd34h5uzomu0sxgh57rwyb1"); // (parms.maxIters) = late_int(g, agattr(g,AGRAPH, "maxiter", NULL), 600, 0); UNSUPPORTED("1ekk36jjcc8amkk8t0kk5xzqw"); // (fdp_parms->K) = (parms.K) = late_double(g, agattr(g,AGRAPH, "K", NULL), 0.3, 0.0); UNSUPPORTED("5w12po5gw20qkeg6lm9wuqf8b"); // if ((fdp_parms->T0) == -1.0) { UNSUPPORTED("5ei2wdbmgw6tsc1knlgsi5est"); // (parms.T0) = late_double(g, agattr(g,AGRAPH, "T0", NULL), -1.0, 0.0); UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("ey5pnbvbq4sdlnwyww4ufkgdl"); // (parms.T0) = (fdp_parms->T0); UNSUPPORTED("2dwfvel7mvtxuo89r4qyi9nd1"); // (parms.seed) = 1; UNSUPPORTED("chz814s9ux42fqrmt8jyt4bbo"); // (parms.smode) = setSeed (g, INIT_RANDOM, &(parms.seed)); UNSUPPORTED("1ziuxskpjtlf6j1n77u8fazho"); // if ((parms.smode) == INIT_SELF) { UNSUPPORTED("562i07uf5ntbjykofj7kehkl4"); // agerr(AGWARN, "fdp does not support start=self - ignoring\n"); UNSUPPORTED("3a789qzz25t3knjgbg1p6pmmc"); // (parms.seed) = INIT_RANDOM; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("73xh7m64drhf1ddu78yp29z9r"); // (parms.pass1) = ((parms.unscaled) * (parms.maxIters)) / 100; UNSUPPORTED("8iuaxpbl74yddrfynyul5uc8i"); // (parms.K2) = (parms.K) * (parms.K); UNSUPPORTED("5mn14gy4taomtxfb9fvba9s6"); // if ((parms.useGrid)) { UNSUPPORTED("8ukoelkh4qqn1mp0ues4sqdax"); // if ((parms.Cell) <= 0.0) UNSUPPORTED("2hn437nbrh7orkpd3flaakc4q"); // (parms.Cell) = 3 * (parms.K); UNSUPPORTED("evqkx9xtnwhnmrs6eak9kct5j"); // (parms.Cell2) = (parms.Cell) * (parms.Cell); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1mwp8luigyyz0ugh8bwajvy1p // static void doRep(node_t * p, node_t * q, double xdelta, double ydelta, double dist2) public static Object doRep(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("ci8iet8xei7zuq6iwdwmnfie2"); // doRep(node_t * p, node_t * q, double xdelta, double ydelta, double dist2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7xmrzkoismbw37gye9vc6jbi9"); // double force; UNSUPPORTED("6ri5yxqbfur0r77yjjezxcpf1"); // double dist; UNSUPPORTED("9eyts7dlroeintksamasblz0m"); // while (dist2 == 0.0) { UNSUPPORTED("a1kln2sh5ckxy9qbqw7ur6m89"); // xdelta = 5 - rand() % 10; UNSUPPORTED("5utygemiryo6q9jilsrhyspq1"); // ydelta = 5 - rand() % 10; UNSUPPORTED("9cv1lvbstloqs0iz3qbvzcbmx"); // dist2 = xdelta * xdelta + ydelta * ydelta; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2n97ejly0ms3mgkyc9mfw25dq"); // if ((parms.useNew)) { UNSUPPORTED("l1nxn0z1e5oz3ibg3ruc80qz"); // dist = sqrt(dist2); UNSUPPORTED("5hk3sr13w9lnqpnp9r7m0lswq"); // force = (parms.K2) / (dist * dist2); UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("ew8igrf3420bqug5dgydzcj44"); // force = (parms.K2) / dist2; UNSUPPORTED("ez9csfef9y6to70k15uttsiav"); // if ((!(((dndata*)(ND_alg(p)))->dn) && !ND_clust(p)) && (!(((dndata*)(ND_alg(q)))->dn) && !ND_clust(q))) UNSUPPORTED("dakbbyvagw597rpiubgw87lde"); // force *= 10.0; UNSUPPORTED("evkb6fsw3t47cwgrg7xefbqgt"); // (((dndata*)(ND_alg(q)))->disp)[0] += xdelta * force; UNSUPPORTED("47honvuz7ve5pvt9lba48wv53"); // (((dndata*)(ND_alg(q)))->disp)[1] += ydelta * force; UNSUPPORTED("adgrqasjyy2ekyp2z2g84w46v"); // (((dndata*)(ND_alg(p)))->disp)[0] -= xdelta * force; UNSUPPORTED("4ynq3yqyvpqd2e9jy2ky9g7m3"); // (((dndata*)(ND_alg(p)))->disp)[1] -= ydelta * force; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1l5u1c7g8sv7pkutpmed1onix // static void applyRep(Agnode_t * p, Agnode_t * q) public static Object applyRep(Object... arg) { UNSUPPORTED("djgrzdg0i7c81rt5ozd4fy6hy"); // static void applyRep(Agnode_t * p, Agnode_t * q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("fwy8i5zbwxhddxrcwdkd8w1g"); // double xdelta, ydelta; UNSUPPORTED("1gexoq8hut0hmb4k5ef2tvif7"); // xdelta = ND_pos(q)[0] - ND_pos(p)[0]; UNSUPPORTED("bwmnzroxk4eq5fdyzazcmagjs"); // ydelta = ND_pos(q)[1] - ND_pos(p)[1]; UNSUPPORTED("2od246ddg7nl8jg2vbe8w04jx"); // doRep(p, q, xdelta, ydelta, xdelta * xdelta + ydelta * ydelta); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6f5oevq3a3fan12vx9fd8sxig // static void doNeighbor(Grid * grid, int i, int j, node_list * nodes) public static Object doNeighbor(Object... arg) { UNSUPPORTED("9f2tkmlc1n9h3w8lqufgwmcu6"); // static void doNeighbor(Grid * grid, int i, int j, node_list * nodes) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bhnwogekrkz0g5g73xj7vst6t"); // cell *cellp = findGrid(grid, i, j); UNSUPPORTED("j7t2j63o6ph4jsh8zms26jia"); // node_list *qs; UNSUPPORTED("79qovd7yt2ksk0181m08pcblr"); // Agnode_t *p; UNSUPPORTED("26lkxbr2p03cdcyjp6mi5cdx0"); // Agnode_t *q; UNSUPPORTED("fwy8i5zbwxhddxrcwdkd8w1g"); // double xdelta, ydelta; UNSUPPORTED("a48uqm39jxw8xxk12bzq76zhe"); // double dist2; UNSUPPORTED("tvnd12y5b19iotifqmutyeto"); // if (cellp) { UNSUPPORTED("c22my4o1dz0d0w2h43rfo0whg"); // for (; nodes != 0; nodes = nodes->next) { UNSUPPORTED("e56s6kjmmhjpytxlariesqqdw"); // p = nodes->node; UNSUPPORTED("5rq3ugymaj6pf0dvsx6dz5w4h"); // for (qs = cellp->nodes; qs != 0; qs = qs->next) { UNSUPPORTED("1mj1hju2nppgtuoqv8ol5rvwr"); // q = qs->node; UNSUPPORTED("d26xtmkxvpccm7sq2vb7etugl"); // xdelta = (ND_pos(q))[0] - (ND_pos(p))[0]; UNSUPPORTED("5swigfg8ax2mrrfeth3ty0g2"); // ydelta = (ND_pos(q))[1] - (ND_pos(p))[1]; UNSUPPORTED("bmdm7zgfvy74ykfhpqs4mv0jz"); // dist2 = xdelta * xdelta + ydelta * ydelta; UNSUPPORTED("12ef6u3079vohtjab5738nb2o"); // if (dist2 < (parms.Cell2)) UNSUPPORTED("np3ryxjwz0n7fopro629q72k"); // doRep(p, q, xdelta, ydelta, dist2); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cs1mbkztfifrfwd3mxcwg1c2d // static int gridRepulse(Dt_t * dt, cell * cellp, Grid * grid) public static Object gridRepulse(Object... arg) { UNSUPPORTED("dmawgb7u402yluzrrnfgssfuf"); // static int gridRepulse(Dt_t * dt, cell * cellp, Grid * grid) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("esxthhmuxuie3avpfm2495114"); // node_list *nodes = cellp->nodes; UNSUPPORTED("6w5k8ca6easfov2mqqlrdb0dh"); // int i = cellp->p.i; UNSUPPORTED("3s6odfuh8voqpi0e47rmmpr95"); // int j = cellp->p.j; UNSUPPORTED("5t1k1070z2y2ulal5irpeh13r"); // node_list *p; UNSUPPORTED("26ois8lzf5gf4rlc7j1v07nrk"); // node_list *q; UNSUPPORTED("f47xyq0g5jc32mlw2w6176cj8"); // (void) dt; UNSUPPORTED("7bt8fvdfprnhldu94wzsjr1p8"); // for (p = nodes; p != 0; p = p->next) { UNSUPPORTED("9dtqsbgqhq08w8uqr6q8iu1zo"); // for (q = nodes; q != 0; q = q->next) UNSUPPORTED("3mqa4rk942u6cme7lx916c3e7"); // if (p != q) UNSUPPORTED("f4yngxzrsobxrx4qdgnbjuu7y"); // applyRep(p->node, q->node); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("39oj5x7p4uzn9pmrn291fb89e"); // doNeighbor(grid, i - 1, j - 1, nodes); UNSUPPORTED("4x5ymv4kpnjjlwgslb8y54wsf"); // doNeighbor(grid, i - 1, j, nodes); UNSUPPORTED("92c3ombzuprs207hb0839euz4"); // doNeighbor(grid, i - 1, j + 1, nodes); UNSUPPORTED("7x17d3x93lfyweou33msckmp3"); // doNeighbor(grid, i, j - 1, nodes); UNSUPPORTED("axuq727bu6dm67ozulydd2z8b"); // doNeighbor(grid, i, j + 1, nodes); UNSUPPORTED("aprvh8muazan9bg5c6s7zyh3k"); // doNeighbor(grid, i + 1, j - 1, nodes); UNSUPPORTED("6re8faddp09jcpaw086aebyak"); // doNeighbor(grid, i + 1, j, nodes); UNSUPPORTED("4vnxtoqrs66b93cw2r079w5uc"); // doNeighbor(grid, i + 1, j + 1, nodes); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cj85ae9twpl1qbvg8q1a5tkoy // static void applyAttr(Agnode_t * p, Agnode_t * q, Agedge_t * e) public static Object applyAttr(Object... arg) { UNSUPPORTED("awgsi6lurgqk8uwub4vivjq1j"); // static void applyAttr(Agnode_t * p, Agnode_t * q, Agedge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("fwy8i5zbwxhddxrcwdkd8w1g"); // double xdelta, ydelta; UNSUPPORTED("7xmrzkoismbw37gye9vc6jbi9"); // double force; UNSUPPORTED("6ri5yxqbfur0r77yjjezxcpf1"); // double dist; UNSUPPORTED("a48uqm39jxw8xxk12bzq76zhe"); // double dist2; UNSUPPORTED("1gexoq8hut0hmb4k5ef2tvif7"); // xdelta = ND_pos(q)[0] - ND_pos(p)[0]; UNSUPPORTED("bwmnzroxk4eq5fdyzazcmagjs"); // ydelta = ND_pos(q)[1] - ND_pos(p)[1]; UNSUPPORTED("cmcav5u77frmj6i50z471aqvo"); // dist2 = xdelta * xdelta + ydelta * ydelta; UNSUPPORTED("9eyts7dlroeintksamasblz0m"); // while (dist2 == 0.0) { UNSUPPORTED("a1kln2sh5ckxy9qbqw7ur6m89"); // xdelta = 5 - rand() % 10; UNSUPPORTED("5utygemiryo6q9jilsrhyspq1"); // ydelta = 5 - rand() % 10; UNSUPPORTED("9cv1lvbstloqs0iz3qbvzcbmx"); // dist2 = xdelta * xdelta + ydelta * ydelta; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dh786i3lrxpciiafxwi5hohar"); // dist = sqrt(dist2); UNSUPPORTED("4ba6s6456ep2phb9pwqjbc4b9"); // if ((parms.useNew)) UNSUPPORTED("87l88wtd7xyepuhmf35a6bbw2"); // force = (ED_factor(e) * (dist - ED_dist(e))) / dist; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("8wx917t05wq9rcvtqmvooz31z"); // force = (ED_factor(e) * dist) / ED_dist(e); UNSUPPORTED("ef256m9rw2e3kva0vy4mrt4pn"); // (((dndata*)(ND_alg(q)))->disp)[0] -= xdelta * force; UNSUPPORTED("de0dfwmddjz26z7cw76x9uejs"); // (((dndata*)(ND_alg(q)))->disp)[1] -= ydelta * force; UNSUPPORTED("9us8cvhguukd2iasv7c2crzho"); // (((dndata*)(ND_alg(p)))->disp)[0] += xdelta * force; UNSUPPORTED("e4teme92uacnxx36to3g3mdco"); // (((dndata*)(ND_alg(p)))->disp)[1] += ydelta * force; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6klhq8hd2uw9zsfrxwtv1ocnk // static void updatePos(Agraph_t * g, double temp, bport_t * pp) public static Object updatePos(Object... arg) { UNSUPPORTED("2u9aj6rjmowhmurab0vf3r69l"); // static void updatePos(Agraph_t * g, double temp, bport_t * pp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("sg55m1c2s3xuubzzp8n0sw3f"); // double temp2; UNSUPPORTED("25uak17ioz04l0iqfpc2rqjmq"); // double len2; UNSUPPORTED("65672t6c1pgmsnn9zxy9mwvwd"); // double x, y, d; UNSUPPORTED("an5v3e2oy9hxck46bwp0l8a0k"); // double dx, dy; UNSUPPORTED("amlnzp2bleh099q3wlzlmj8zn"); // temp2 = temp * temp; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("20k00hmq2eea97ngndk1rg61o"); // if (ND_pinned(n) & 2) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("1gq3st2z4k9zoet70m3v6x80b"); // dx = (((dndata*)(ND_alg(n)))->disp)[0]; UNSUPPORTED("aodqj11npmkk0fsuybgf620ln"); // dy = (((dndata*)(ND_alg(n)))->disp)[1]; UNSUPPORTED("5qw5xdnfn43mxsapjp20js30k"); // len2 = dx * dx + dy * dy; UNSUPPORTED("66bgqva7s9uk7ly4ar3frkuh1"); // /* limit by temperature */ UNSUPPORTED("baq9cdzymvavytsen7guap4p5"); // if (len2 < temp2) { UNSUPPORTED("e7qusmcrgbdr7i06hhwr6283y"); // x = ND_pos(n)[0] + dx; UNSUPPORTED("1m9xpejjuhy1uxvymyx53pxff"); // y = ND_pos(n)[1] + dy; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("9docoydbw13ckdwmcicezwzu8"); // double fact = temp / (sqrt(len2)); UNSUPPORTED("3qb2m4ym37kunjqqvftkozjbo"); // x = ND_pos(n)[0] + dx * fact; UNSUPPORTED("4xldvbdbn4zcpg8itxhyo9mgc"); // y = ND_pos(n)[1] + dy * fact; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ewgha6n93ins88bgq7rcr4y1o"); // /* if ports, limit by boundary */ UNSUPPORTED("2tfzz986e4p2bid5m9sdnwfl7"); // if (pp) { UNSUPPORTED("2h2fbkvwazh0sjetv7njnauhb"); // d = sqrt((x * x) / (parms.Wd2) + (y * y) / (parms.Ht2)); UNSUPPORTED("ebgj1his6d8t4264yeael6ol7"); // if ((!(((dndata*)(ND_alg(n)))->dn) && !ND_clust(n))) { UNSUPPORTED("asq65gxobhrigft4q2hps44ae"); // ND_pos(n)[0] = x / d; UNSUPPORTED("c1q4rpgqya1cg62hjsznhcx7k"); // ND_pos(n)[1] = y / d; UNSUPPORTED("3zvvzyjqdnyczr8j3l63hduy7"); // } else if (d >= 1.0) { UNSUPPORTED("d0mnxdfz9aqy4chwtknduvqhm"); // ND_pos(n)[0] = 0.95 * x / d; UNSUPPORTED("3n2nm2hlcv949f84l1yk1ouvn"); // ND_pos(n)[1] = 0.95 * y / d; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("bzcs5gjg4p7i9fed154arg1dl"); // ND_pos(n)[0] = x; UNSUPPORTED("62gf754isfr8v6h4kxxwi7it"); // ND_pos(n)[1] = y; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("430348dqvn3b36o02ezqbp1uw"); // ND_pos(n)[0] = x; UNSUPPORTED("d4yvjj58oi9ryj1jplnst6s5g"); // ND_pos(n)[1] = y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2n34xldqlccwhpm8nh1rljs3p // static void gAdjust(Agraph_t * g, double temp, bport_t * pp, Grid * grid) public static Object gAdjust(Object... arg) { UNSUPPORTED("556yrn9aufakg2ifo3g1h6pwf"); // static void gAdjust(Agraph_t * g, double temp, bport_t * pp, Grid * grid) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("f1vdo4z4mtgqh7lb8t6qfv8gu"); // if (temp <= 0.0) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("644hq2ff42fduad6ofrcnnr3z"); // clearGrid(grid); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("d4x7a0ncmwpuitrfyisphry1f"); // (((dndata*)(ND_alg(n)))->disp)[0] = (((dndata*)(ND_alg(n)))->disp)[1] = 0; UNSUPPORTED("5390epov6m7vcinu815ghkhf2"); // addGrid(grid, ((int)floor((ND_pos(n))[0] / (parms.Cell))), ((int)floor((ND_pos(n))[1] / (parms.Cell))), UNSUPPORTED("23mwr8qy9p56xnfsgsetr6kdu"); // n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("8gbd6b2ssf51om8neirzzr6rw"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) UNSUPPORTED("2rz6z5yfu3wqj4z4t81p4m1a5"); // if (n != aghead(e)) UNSUPPORTED("9jgj9dhgjvujbr4f06kroynor"); // applyAttr(n, aghead(e), e); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3f3jqejsuoefgdz3m3vpdl620"); // walkGrid(grid, gridRepulse); UNSUPPORTED("6ucbf08xinzfcptpt2mc495jh"); // updatePos(g, temp, pp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3tt7ro82g74d4dhvgbd5rb9yf // static void adjust(Agraph_t * g, double temp, bport_t * pp) public static Object adjust(Object... arg) { UNSUPPORTED("lv445mknryp4zqtin641m8cs"); // static void adjust(Agraph_t * g, double temp, bport_t * pp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("4rip97cgvbcrlgycxl0wajpuh"); // Agnode_t *n1; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("f1vdo4z4mtgqh7lb8t6qfv8gu"); // if (temp <= 0.0) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("d4x7a0ncmwpuitrfyisphry1f"); // (((dndata*)(ND_alg(n)))->disp)[0] = (((dndata*)(ND_alg(n)))->disp)[1] = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("d5vhk45d87pvhm7ey0xmi5all"); // for (n1 = agnxtnode(g, n); n1; n1 = agnxtnode(g, n1)) { UNSUPPORTED("5r2borrugfgx76x385o64g6uq"); // applyRep(n, n1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("2rz6z5yfu3wqj4z4t81p4m1a5"); // if (n != aghead(e)) UNSUPPORTED("9jgj9dhgjvujbr4f06kroynor"); // applyAttr(n, aghead(e), e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6ucbf08xinzfcptpt2mc495jh"); // updatePos(g, temp, pp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5udrim0k65x88jcd6im7jsk0m // static pointf initPositions(graph_t * g, bport_t * pp) public static Object initPositions(Object... arg) { UNSUPPORTED("5zigfg3p1puzt2mnml8cp2xq9"); // static pointf initPositions(graph_t * g, bport_t * pp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7ne6dk4gevmg9bpajywpl0sld"); // int nG = agnnodes(g) - (((gdata*)(GD_alg(g)))->nports); UNSUPPORTED("cmbn2mebw9i4zvae8o1naka1f"); // double size; UNSUPPORTED("4dnqwjhhs92m1h2q7ld3cpbxw"); // Agnode_t *np; UNSUPPORTED("84res63gkgrpokqhvh08l25gq"); // int n_pos = 0; /* no. of nodes with position info */ UNSUPPORTED("as3veqd6dj01fepy5iqhc3cwb"); // box bb = { {0, 0}, {0, 0} }; UNSUPPORTED("p0gtnc9vtxwu59vjacxfq8q2"); // pointf ctr; /* center of boundary ellipse */ UNSUPPORTED("3cikqmw6ngedc2tcueu4k6kpn"); // long local_seed; UNSUPPORTED("f10pmsxbkh8gwvxc87ikaru1r"); // double PItimes2 = M_PI * 2.0; UNSUPPORTED("73rfwkv8ws65l7qgnz7jw27gf"); // for (np = agfstnode(g); np; np = agnxtnode(g, np)) { UNSUPPORTED("2p5byh0c6jasf3brw2ocfjljl"); // if (ND_pinned(np)) { UNSUPPORTED("b67kqz24hhewea5tyda1wyaeh"); // if (n_pos) { UNSUPPORTED("2ox2wzszwg6uksxze1jyo984e"); // bb.LL.x = MIN(ND_pos(np)[0], bb.LL.x); UNSUPPORTED("19mnog7trnfv3bhe0e066xv21"); // bb.LL.y = MIN(ND_pos(np)[1], bb.LL.y); UNSUPPORTED("7w96keir9silerc8qngpqjosk"); // bb.UR.x = MAX(ND_pos(np)[0], bb.UR.x); UNSUPPORTED("7k6ussgds4bd3z6eesr8fepbd"); // bb.UR.y = MAX(ND_pos(np)[1], bb.UR.y); UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("cprc9p2lim8mn728cjqcd9t8r"); // bb.UR.x = bb.LL.x = ND_pos(np)[0]; UNSUPPORTED("58a3mthmfxdro6hqr8iaekbzo"); // bb.UR.y = bb.LL.y = ND_pos(np)[1]; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("39bza2s3i3py75vnpuv0lahjr"); // n_pos++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("be13vd6vbtkm7vgtqhjrm3pnj"); // size = (parms.K) * (sqrt((double) nG) + 1.0); UNSUPPORTED("dyxxnbmtkvjmqulh7thgktg4s"); // (parms.Wd) = (parms.Ht) = 1.2 * (size / 2.0); UNSUPPORTED("5eg3rzhm9wggbsty8r3wbvqcy"); // if (n_pos == 1) { UNSUPPORTED("aqxuib6x0ru2lex5kbbxipidc"); // ctr.x = bb.LL.x; UNSUPPORTED("c2lyy587nd1u5om969mofy0lc"); // ctr.y = bb.LL.y; UNSUPPORTED("d6bvkxrex3rfetbazxs07ui79"); // } else if (n_pos > 1) { UNSUPPORTED("2o5vlil7etjeflp3478cnk1t1"); // double alpha, area, width, height, quot; UNSUPPORTED("e2bursa13trq43it5r42b5wxl"); // ctr.x = (bb.LL.x + bb.UR.x) / 2.0; UNSUPPORTED("8lkxdcp40t9kxlgfv6bmgopxw"); // ctr.y = (bb.LL.y + bb.UR.y) / 2.0; UNSUPPORTED("3j4sganaq9068n1er45ib9t0w"); // width = 1.2 * (bb.UR.x - bb.LL.x); UNSUPPORTED("31cw3gk0lnuv66j4rb6b76ujq"); // height = 1.2 * (bb.UR.y - bb.LL.y); UNSUPPORTED("9a1dqbpz59walt2lnrapoj8w9"); // area = 4.0 * (parms.Wd) * (parms.Ht); UNSUPPORTED("7sqr95ttttva9uhvsz8m37gb8"); // quot = (width * height) / area; UNSUPPORTED("aqxjptqp5qo65pns1mqxi1lvp"); // if (quot >= 1.0) { /* If bbox has large enough area, use it */ UNSUPPORTED("12mid8wvcpmwh4m3zoym9p3r6"); // (parms.Wd) = width / 2.0; UNSUPPORTED("4qrpy054cs5u0vzvebcrn5dda"); // (parms.Ht) = height / 2.0; UNSUPPORTED("c3u6g89kxfo9iluy5yos1quyx"); // } else if (quot > 0.0) { /* else scale up to have enough area */ UNSUPPORTED("dr733vgdfmc172xhjf47jwaxm"); // quot = 2.0 * sqrt(quot); UNSUPPORTED("8ogpn0wn3ja6jhfkziqwlr6ay"); // (parms.Wd) = width / quot; UNSUPPORTED("8ft1ybryais2vfkvvcur2sxgk"); // (parms.Ht) = height / quot; UNSUPPORTED("8of28fn1ted6krkmk2yjpau60"); // } else { /* either width or height is 0 */ UNSUPPORTED("2jkl72eptn2faso4y1tmn9uze"); // if (width > 0) { UNSUPPORTED("ckrjc637785ohj82zmyw9e5ik"); // height = area / width; UNSUPPORTED("eqttpym94omzt6oujyzbqa0n5"); // (parms.Wd) = width / 2.0; UNSUPPORTED("5jplytikh5trxma41nredtj3z"); // (parms.Ht) = height / 2.0; UNSUPPORTED("gseug6cie81aibj66xfmvo8j"); // } else if (height > 0) { UNSUPPORTED("8e54vo4hp4yrklm62vgkn5v5n"); // width = area / height; UNSUPPORTED("eqttpym94omzt6oujyzbqa0n5"); // (parms.Wd) = width / 2.0; UNSUPPORTED("5jplytikh5trxma41nredtj3z"); // (parms.Ht) = height / 2.0; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6hle4w7nbewioh1h57a8j8cvt"); // /* If width = height = 0, use Wd and Ht as defined above for UNSUPPORTED("7kk74syx1ba2ernmbirp3uwr9"); // * the case the n_pos == 0. UNSUPPORTED("20m1lc1moer8x00tx9ceto0iw"); // */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3o6kj172y1xphtpj6jabh2e94"); // /* Construct enclosing ellipse */ UNSUPPORTED("c0l603qzgyy1ql72a9qrgdals"); // alpha = atan2((parms.Ht), (parms.Wd)); UNSUPPORTED("bbydl25432avreznfwgihdyfq"); // (parms.Wd) = (parms.Wd) / cos(alpha); UNSUPPORTED("3f6cb7sp9a4of125y0697hp9n"); // (parms.Ht) = (parms.Ht) / sin(alpha); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("74pm3pn6axjjr00p1dklum3ja"); // ctr.x = ctr.y = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3pog5nekvf3aruzlqlqacxbn2"); // (parms.Wd2) = (parms.Wd) * (parms.Wd); UNSUPPORTED("9ppyltk2jjqg9furyd77w6fkd"); // (parms.Ht2) = (parms.Ht) * (parms.Ht); UNSUPPORTED("373lcxow3iqe10bnh9zo88csa"); // /* Set seed value */ UNSUPPORTED("w2sxuedcee1wo3s82gme86q1"); // if ((parms.smode) == INIT_RANDOM) UNSUPPORTED("j2hetou7f381kf2tbyh0rukg"); // local_seed = (parms.seed); UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("12svuafktwb2m6pdhnicft7ub"); // local_seed = getpid() ^ time(NULL); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("215ot7whw18pm35pop5udep50"); // srand(local_seed); UNSUPPORTED("dxe9gllri26lww3f475hmq5nv"); // /* If ports, place ports on and nodes within an ellipse centered at origin UNSUPPORTED("60rwp4z0fh34nnarv4wfcspx6"); // * with halfwidth Wd and halfheight Ht. UNSUPPORTED("1l0ild17ow39w4dmixs71gawy"); // * If no ports, place nodes within a rectangle centered at origin UNSUPPORTED("aircln8xkn5pw90ncdh2nng3a"); // * with halfwidth Wd and halfheight Ht. Nodes with a given position UNSUPPORTED("co3h8562l1uwhysdbeef7tn3u"); // * are translated. Wd and Ht are set to contain all positioned points. UNSUPPORTED("2hb260bbb3rvns3j0rfqnr4z"); // * The reverse translation will be applied to all UNSUPPORTED("bwk8qf4fezca0u8904a51fsgb"); // * nodes at the end of the layout. UNSUPPORTED("9tiugqaffj1brmkrm9mufk3cj"); // * TODO: place unfixed points using adjacent ports or fixed pts. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("7x3hp5csomjoow8l3cdyqhlp8"); // if (pp) { UNSUPPORTED("e5k8d4zlp85wal3b0r02pdece"); // /* fprintf (stderr, "initPos %s ctr (%g,%g) Wd %g Ht %g\n", g->name, ctr.x, ctr.y, Wd, Ht); */ UNSUPPORTED("28fuw97soxmhn0392piuj5ivk"); // while (pp->e) { /* position ports on ellipse */ UNSUPPORTED("ct66kbzehcaoegmxd9hvb8twk"); // np = pp->n; UNSUPPORTED("33uoc3m7i8cwcxcw7n38fx2w7"); // ND_pos(np)[0] = (parms.Wd) * cos(pp->alpha) + ctr.x; UNSUPPORTED("43in1oaf03hy0xtdyq6z7ecz"); // ND_pos(np)[1] = (parms.Ht) * sin(pp->alpha) + ctr.y; UNSUPPORTED("24z7oorb6gt8mp5y06u5kqb3x"); // ND_pinned(np) = 1; UNSUPPORTED("c2lbmfsz86m50be60annui55t"); // /* fprintf (stderr, "%s pt (%g,%g) %g\n", np->name, ND_pos(np)[0], ND_pos(np)[1], pp->alpha); */ UNSUPPORTED("4t42c85s64mps71a1sjc7yoey"); // pp++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1731abd7psvbovg3sdrrz3alu"); // for (np = agfstnode(g); np; np = agnxtnode(g, np)) { UNSUPPORTED("6spla98dm5djs2srzlwnx02sv"); // if ((!(((dndata*)(ND_alg(np)))->dn) && !ND_clust(np))) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("acza7ojsifjul54q5l29o3te7"); // if (ND_pinned(np)) { UNSUPPORTED("bu6tbcasyqkgeqjew2fi9bit2"); // ND_pos(np)[0] -= ctr.x; UNSUPPORTED("88ypktdzp7sxkfmj7plhbudbh"); // ND_pos(np)[1] -= ctr.y; UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("4f01a8ivg0evqlhaplulzh9ek"); // pointf p = { 0.0, 0.0 }; UNSUPPORTED("e7zdyie228r4jun06bay4grdk"); // int cnt = 0; UNSUPPORTED("8i69mg2gjp2bd2vd19kwy3vox"); // node_t *op; UNSUPPORTED("39iaqnad631pzrqic9r3emgwy"); // edge_t *ep; UNSUPPORTED("aw2lxucqcgjz8l1b9e12bcsdd"); // for (ep = agfstedge(g, np); ep; ep = agnxtedge(g, ep, np)) { UNSUPPORTED("b5s94n8kk03c84n5vt353ibcy"); // if (aghead(ep) == agtail(ep)) UNSUPPORTED("91ilj0e8yph90t7k4ijuq5rb0"); // continue; UNSUPPORTED("z31psezyu92bc3yi9dvq6tc4"); // op = (aghead(ep) == np ? agtail(ep) : aghead(ep)); UNSUPPORTED("1y3r5jidx8ix3zux535zj5pyi"); // if (!(ND_pinned(op) > 0)) UNSUPPORTED("91ilj0e8yph90t7k4ijuq5rb0"); // continue; UNSUPPORTED("4ef5myoqgaf9zgbcn2wujxw1a"); // if (cnt) { UNSUPPORTED("7lebyzde5wb7xt11nsqzupefh"); // p.x = (p.x * cnt + ND_pos(op)[0]) / (cnt + 1); UNSUPPORTED("f0rtqxd7s2m0x7hxoa13q9kwj"); // p.y = (p.y * cnt + ND_pos(op)[1]) / (cnt + 1); UNSUPPORTED("d86r93g8nz9a1kfzgi7f8j8nh"); // } else { UNSUPPORTED("c0sc4z04s46uhshkw3ozqvnmd"); // p.x = ND_pos(op)[0]; UNSUPPORTED("eiuhticsuick7ct9uaxwjdsqo"); // p.y = ND_pos(op)[1]; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("ah6qookjy3kxxu2ll7p2wqkr5"); // cnt++; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3ky7wkxaat443ni0lypyci7ds"); // if (cnt > 1) { UNSUPPORTED("5hf76y58zaxsd5yfbwr67v1pl"); // ND_pos(np)[0] = p.x; UNSUPPORTED("65iv8m1taebcnnh2f9dl3tzvd"); // ND_pos(np)[1] = p.y; UNSUPPORTED("22fwdoz45bfh8gcgd0uvdzwqi"); // /* fprintf (stderr, "%s 1 (%g,%g)\n", np->name, p.x, p.y); */ UNSUPPORTED("cuhpsk6avu7u4s1o3uouiyrwn"); // } else if (cnt == 1) { UNSUPPORTED("bshbnvfbvodmqx28tn1ekh68u"); // ND_pos(np)[0] = 0.98 * p.x + 0.1 * ctr.x; UNSUPPORTED("7es44punnuei8vk9a6zi6mfcr"); // ND_pos(np)[1] = 0.9 * p.y + 0.1 * ctr.y; UNSUPPORTED("ewww84n7ov6xly1rad9dphi8m"); // /* fprintf (stderr, "%s %d (%g,%g)\n", np->name, cnt, ND_pos(np)[0], ND_pos(np)[1]); */ UNSUPPORTED("a47jqpic91ky93e1ohxv590l5"); // } else { UNSUPPORTED("4m9h4qwahwza1l0lhm457zudx"); // double angle = PItimes2 * drand48(); UNSUPPORTED("3rvzprwz2t47pyqh60oqsw17j"); // double radius = 0.9 * drand48(); UNSUPPORTED("at7x0p3otimkmhsxqkambua5t"); // ND_pos(np)[0] = radius * (parms.Wd) * cos(angle); UNSUPPORTED("8e62lq0w9ogdd5bpizalws1x8"); // ND_pos(np)[1] = radius * (parms.Ht) * sin(angle); UNSUPPORTED("6p3ya6o9y82x4xvoubqk3sn9r"); // /* fprintf (stderr, "%s 0 (%g,%g)\n", np->name, ND_pos(np)[0], ND_pos(np)[1]); */ UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7djjlwbyom7gt69719c2ge441"); // ND_pinned(np) = 1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("cj35dr9ue5hdfys90rl806ohk"); // if (n_pos) { /* If positioned nodes */ UNSUPPORTED("10u5z5m937fskvpiibijz5mn3"); // for (np = agfstnode(g); np; np = agnxtnode(g, np)) { UNSUPPORTED("1zfcoj5p8ibbitj9jx20klypu"); // if (ND_pinned(np)) { UNSUPPORTED("8r9mj2cdquw9apcge0rrsdvo4"); // ND_pos(np)[0] -= ctr.x; UNSUPPORTED("5p6xqo5ilca5hndjyy1rixyo6"); // ND_pos(np)[1] -= ctr.y; UNSUPPORTED("a47jqpic91ky93e1ohxv590l5"); // } else { UNSUPPORTED("4zftore6zkehqgal2xf22rsxm"); // ND_pos(np)[0] = (parms.Wd) * (2.0 * drand48() - 1.0); UNSUPPORTED("bi87ypmmvt5js8xtssxgkcztn"); // ND_pos(np)[1] = (parms.Ht) * (2.0 * drand48() - 1.0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("7q4mtrigf95au3k1wtqedxeie"); // } else { /* No ports or positions; place randomly */ UNSUPPORTED("10u5z5m937fskvpiibijz5mn3"); // for (np = agfstnode(g); np; np = agnxtnode(g, np)) { UNSUPPORTED("8y3ekg5ooz7pty0anyx14u1a0"); // ND_pos(np)[0] = (parms.Wd) * (2.0 * drand48() - 1.0); UNSUPPORTED("9ytn7cf1z9nt38i4r4qxkfb8y"); // ND_pos(np)[1] = (parms.Ht) * (2.0 * drand48() - 1.0); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("48suit55vfvla133oj7youe6x"); // return ctr; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 63jai1t1xyfwqxq5g2yca6qwo // void dumpstat(graph_t * g) public static Object dumpstat(Object... arg) { UNSUPPORTED("20tbhzs2675qjcj5182bnwe3"); // void dumpstat(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("an5v3e2oy9hxck46bwp0l8a0k"); // double dx, dy; UNSUPPORTED("carv9c7ltra9s7bn7325yl1ca"); // double l, max2 = 0.0; UNSUPPORTED("embgw30vqico8gdmn2r6ywcb0"); // node_t *np; UNSUPPORTED("akibnb2rnde6cxd49pthk2vaf"); // edge_t *ep; UNSUPPORTED("73rfwkv8ws65l7qgnz7jw27gf"); // for (np = agfstnode(g); np; np = agnxtnode(g, np)) { UNSUPPORTED("237pehjbrsfpqsziagl7ruflr"); // dx = (((dndata*)(ND_alg(np)))->disp)[0]; UNSUPPORTED("3k3sgrq13y7dqtox9yw9buweb"); // dy = (((dndata*)(ND_alg(np)))->disp)[1]; UNSUPPORTED("2f9eablv6mecibn7seya1pzo1"); // l = dx * dx + dy * dy; UNSUPPORTED("4qnd3kdyfpakhf236u1fc7u3n"); // if (l > max2) UNSUPPORTED("8f9u1ocg2krmsv0et27dgbsho"); // max2 = l; UNSUPPORTED("djec9oesza03ze2suze0ecri6"); // fprintf(stderr, "%s: (%f,%f) (%f,%f)\n", agnameof(np), UNSUPPORTED("2dwhsgsw146t923oie4ner05n"); // ND_pos(np)[0], ND_pos(np)[1], (((dndata*)(ND_alg(np)))->disp)[0], (((dndata*)(ND_alg(np)))->disp)[1]); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("atgvw5qqam8q772joifsaroa6"); // fprintf(stderr, "max delta = %f\n", sqrt(max2)); UNSUPPORTED("73rfwkv8ws65l7qgnz7jw27gf"); // for (np = agfstnode(g); np; np = agnxtnode(g, np)) { UNSUPPORTED("9ogvgwje5yfel4p010a2ngel2"); // for (ep = agfstout(g, np); ep; ep = agnxtout(g, ep)) { UNSUPPORTED("iwctvaad280jc0xmmwtwb8t4"); // dx = ND_pos(np)[0] - ND_pos(aghead(ep))[0]; UNSUPPORTED("a0kmxxudbdd32pjrdm7h80n7j"); // dy = ND_pos(np)[1] - ND_pos(aghead(ep))[1]; UNSUPPORTED("2luk1bzlvxvsu4yaq14jpq63e"); // fprintf(stderr, " %s -- %s (%f)\n", agnameof(np), UNSUPPORTED("5mdn4gi1x1ejrr8dc8ptp7j2b"); // agnameof(aghead(ep)), sqrt(dx * dx + dy * dy)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d496llwnjlxt7wx0sw80xr3h // void fdp_tLayout(graph_t * g, xparams * xpms) public static Object fdp_tLayout(Object... arg) { UNSUPPORTED("4vartheayhc02p8abhpueur8k"); // void fdp_tLayout(graph_t * g, xparams * xpms) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("4yyiedehyodxqynt9nk46f3qx"); // int reset; UNSUPPORTED("5nprjii4b4t1tqwfa7blveqzl"); // bport_t *pp = (((gdata*)(GD_alg(g)))->ports); UNSUPPORTED("cdwiwyvrwcamy7fd5h8v4ctix"); // double temp; UNSUPPORTED("afeqt1r4ifq10hbcu0lkvgtcc"); // Grid *grid; UNSUPPORTED("43ygqm2wusmc5ufanrf2tywuv"); // pointf ctr; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("9glfmd12pu2aocf0x89qyiagz"); // reset = init_params(g, xpms); UNSUPPORTED("51hmas0k3ztao4lklbnmgb1z4"); // temp = (parms.T0); UNSUPPORTED("e6aongyerd2z90gw4058nn9no"); // ctr = initPositions(g, pp); UNSUPPORTED("5mn14gy4taomtxfb9fvba9s6"); // if ((parms.useGrid)) { UNSUPPORTED("9gg2q890dm8rk01ln2soy9q07"); // grid = mkGrid(agnnodes(g)); UNSUPPORTED("99u5ex4brl0v72kblltu29qrp"); // adjustGrid(grid, agnnodes(g)); UNSUPPORTED("2fwoci0dajsurbv4llksgko0m"); // for (i = 0; i < (parms.loopcnt); i++) { UNSUPPORTED("8jwip4lpb66zrs8yg95kcyksu"); // temp = cool(temp, i); UNSUPPORTED("54329047fhts0pe5obmee52ea"); // gAdjust(g, temp, pp, grid); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4j3wd9re4wtkkphmr45m55lv2"); // delGrid(grid); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("2fwoci0dajsurbv4llksgko0m"); // for (i = 0; i < (parms.loopcnt); i++) { UNSUPPORTED("8jwip4lpb66zrs8yg95kcyksu"); // temp = cool(temp, i); UNSUPPORTED("767555czr5rvuel3gvb17yhzz"); // adjust(g, temp, pp); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7n6pc2ga10preyiyao295oubn"); // if ((ctr.x != 0.0) || (ctr.y != 0.0)) { UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("a5q2n8etykpay9dc2nx2w6mbz"); // ND_pos(n)[0] += ctr.x; UNSUPPORTED("hr4c300wuhcjouckus3x3s8z"); // ND_pos(n)[1] += ctr.y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("943t36gae0nxvl615sqll9s1g"); // /* dumpstat (g); */ UNSUPPORTED("d4menyaoqjljh2lz18bl9t9se"); // if (reset) UNSUPPORTED("7goawf09215kg8vtuk4nqmodn"); // reset_params(); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/fdpgen/xlayout__c.java000066400000000000000000001152001312650303100222370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.fdpgen; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class xlayout__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 cvpqgsec3tmr0h6kegatvdo2o // static xparams xParams = //1 8f9xdlbcpihdbur9naj231v5t // static double K2 //1 5aob4wghdkq1e28nt4oyrvddh // static expand_t X_marg //1 7l32vac8fp98do10cuqzpsl4l // static double X_nonov //1 e5ye4unps2rfrha39ipukbu5e // static double X_ov //3 5bxdoearankwgwnh7ieev1f2t // void pr2graphs(Agraph_t *g0, Agraph_t *g1) public static Object pr2graphs(Object... arg) { UNSUPPORTED("8ob5e3tj3qqkxk707z4sva7dz"); // void pr2graphs(Agraph_t *g0, Agraph_t *g1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("m4sd0gipecvy276t1dajif14"); // fprintf(stderr,"%s",agnameof(g0)); UNSUPPORTED("aq42dms9d1zaqtfyso8yls5l6"); // fprintf(stderr,"(%s)",agnameof(g1)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9ezskcr89rqd729rtrbqk4blk // static double RAD(Agnode_t * n) public static Object RAD(Object... arg) { UNSUPPORTED("oc162pur08qfqvc6kkdwcgw"); // static double RAD(Agnode_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("anaablhvhkpfruhh6q7k9lfwn"); // double w = (X_marg.doAdd ? (ND_width(n)/2.0 + X_marg.x): ND_width(n)*X_marg.x/2.0); UNSUPPORTED("zp1pznlvmbw2pfi4j7brjwh5"); // double h = (X_marg.doAdd ? (ND_height(n)/2.0 + X_marg.y): ND_height(n)*X_marg.y/2.0); UNSUPPORTED("9trl22mhp4axgmgirik14gr6u"); // return sqrt(w * w + h * h); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 35nd9lhu27rtjq5z85w20sqxk // static void xinit_params(graph_t* g, int n, xparams * xpms) public static Object xinit_params(Object... arg) { UNSUPPORTED("2yuaxdm4eoik8go49xh4jyliq"); // static void xinit_params(graph_t* g, int n, xparams * xpms) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7d3dcu9gn67sf4j6ofdlzd9e2"); // xParams.K = xpms->K; UNSUPPORTED("bzscxmdiib054y1b13fn8y6vb"); // xParams.numIters = xpms->numIters; UNSUPPORTED("96uw87kt0m77qnixaozfrlmeb"); // xParams.T0 = xpms->T0; UNSUPPORTED("edcnua4znlcko2ncehdp01ux9"); // xParams.loopcnt = xpms->loopcnt; UNSUPPORTED("cmz7xoetbuvn90unm99tcjrhz"); // if (xpms->C > 0.0) UNSUPPORTED("44asfxa3iqq1cwctk3z80y6mn"); // xParams.C = xpms->C; UNSUPPORTED("74kcpkkqnpr70f5ns8e0ylhwy"); // K2 = xParams.K * xParams.K; UNSUPPORTED("9y1fegjaeqd8rpw0k4gxl17ry"); // if (xParams.T0 == 0.0) UNSUPPORTED("9g259lfbcjl150015cll6r9jn"); // xParams.T0 = xParams.K * sqrt(n) / 5; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4evkrutya1m77f44ifcv5ul6k // static double cool(int t) public static Object cool(Object... arg) { UNSUPPORTED("95xloz3za5b4e2j9eok82tdtc"); // static double cool(int t) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("16z464o3q66yekgwi2p39a8pb"); // return (xParams.T0 * (xParams.numIters - t)) / xParams.numIters; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6jgb6820mp4qkxw4s0i7ep80q // static int overlap(node_t * p, node_t * q) public static Object overlap(Object... arg) { UNSUPPORTED("1gajvytagqemoeeempry9wuse"); // static int overlap(node_t * p, node_t * q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("fwy8i5zbwxhddxrcwdkd8w1g"); // double xdelta, ydelta; UNSUPPORTED("2kjx8618avzvxvykmg255vf7n"); // int ret; UNSUPPORTED("1gexoq8hut0hmb4k5ef2tvif7"); // xdelta = ND_pos(q)[0] - ND_pos(p)[0]; UNSUPPORTED("a56zgftjqv6dl2mm95rkt5mh0"); // if (xdelta < 0) UNSUPPORTED("f1yrmo110089rce2g7b5jgxi2"); // xdelta = -xdelta; UNSUPPORTED("bwmnzroxk4eq5fdyzazcmagjs"); // ydelta = ND_pos(q)[1] - ND_pos(p)[1]; UNSUPPORTED("6p9797iiupvo9d8qdjagdayiw"); // if (ydelta < 0) UNSUPPORTED("6q3ayjopnn4trdnypm5ntd819"); // ydelta = -ydelta; UNSUPPORTED("a1v2usm8o9axh44ndj4urb3vc"); // ret = ((xdelta <= ((X_marg.doAdd ? (ND_width(p)/2.0 + X_marg.x): ND_width(p)*X_marg.x/2.0) + (X_marg.doAdd ? (ND_width(q)/2.0 + X_marg.x): ND_width(q)*X_marg.x/2.0))) && (ydelta <= ((X_marg.doAdd ? (ND_height(p)/2.0 + X_marg.y): ND_height(p)*X_marg.y/2.0) + (X_marg.doAdd ? (ND_height(q)/2.0 + X_marg.y): ND_height(q)*X_marg.y/2.0)))); UNSUPPORTED("f3b7mj138albdr4lodyomke0z"); // return ret; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8pxjya6r06g8bxhmlw8bd0fsn // static int cntOverlaps(graph_t * g) public static Object cntOverlaps(Object... arg) { UNSUPPORTED("31o5xe9u8gbzv8w7pouydcktx"); // static int cntOverlaps(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("enbpte8r795n45mzb78meqjac"); // node_t *p; UNSUPPORTED("aic5rmpwe0z0iycem3zwnz54z"); // node_t *q; UNSUPPORTED("behjm5bjsenezpg3f7cncvteu"); // int cnt = 0; UNSUPPORTED("1tf4b5zc506wr6frwwc6uiqh1"); // for (p = agfstnode(g); p; p = agnxtnode(g, p)) { UNSUPPORTED("cr44g0ehxj0z2z6zs1l1joab"); // for (q = agnxtnode(g, p); q; q = agnxtnode(g, q)) { UNSUPPORTED("2p4utan0wd6zdw72yy5h9mse2"); // cnt += overlap(p, q); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3zkt5kbq3sockq663o3s3ync7"); // return cnt; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4gtfyi31c5pyuram2ujkjtuxb // static int doRep(node_t * p, node_t * q, double xdelta, double ydelta, double dist2) public static Object doRep(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("ci8iet8xei7zuq6iwdwmnfie2"); // doRep(node_t * p, node_t * q, double xdelta, double ydelta, double dist2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("283tteroothnz184tu51u1gqa"); // int ov; UNSUPPORTED("7xmrzkoismbw37gye9vc6jbi9"); // double force; UNSUPPORTED("d8u93tbiftet7gnascai5xf56"); // /* double dout, din; */ UNSUPPORTED("engxau4wuazigk2udq499mfjr"); // /* double factor; */ UNSUPPORTED("9eyts7dlroeintksamasblz0m"); // while (dist2 == 0.0) { UNSUPPORTED("a1kln2sh5ckxy9qbqw7ur6m89"); // xdelta = 5 - rand() % 10; UNSUPPORTED("5utygemiryo6q9jilsrhyspq1"); // ydelta = 5 - rand() % 10; UNSUPPORTED("9cv1lvbstloqs0iz3qbvzcbmx"); // dist2 = xdelta * xdelta + ydelta * ydelta; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2teit5gznfwgcf6yt9p4yi8b6"); // if ((ov = overlap(p, q))) UNSUPPORTED("1ji431yv135ypqsxj7mfuq6kz"); // force = X_ov / dist2; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("3jh1msv7a592c7w2o1htjy9f2"); // force = X_nonov / dist2; UNSUPPORTED("evkb6fsw3t47cwgrg7xefbqgt"); // (((dndata*)(ND_alg(q)))->disp)[0] += xdelta * force; UNSUPPORTED("47honvuz7ve5pvt9lba48wv53"); // (((dndata*)(ND_alg(q)))->disp)[1] += ydelta * force; UNSUPPORTED("adgrqasjyy2ekyp2z2g84w46v"); // (((dndata*)(ND_alg(p)))->disp)[0] -= xdelta * force; UNSUPPORTED("4ynq3yqyvpqd2e9jy2ky9g7m3"); // (((dndata*)(ND_alg(p)))->disp)[1] -= ydelta * force; UNSUPPORTED("82m5sgzq9tf80cg4je6sb0dt3"); // return ov; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 vo7a7zssw9meiu7cbd9bc2w2 // static int applyRep(Agnode_t * p, Agnode_t * q) public static Object applyRep(Object... arg) { UNSUPPORTED("42w4fs067face6ybhdbc4dm7e"); // static int applyRep(Agnode_t * p, Agnode_t * q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("fwy8i5zbwxhddxrcwdkd8w1g"); // double xdelta, ydelta; UNSUPPORTED("1gexoq8hut0hmb4k5ef2tvif7"); // xdelta = ND_pos(q)[0] - ND_pos(p)[0]; UNSUPPORTED("bwmnzroxk4eq5fdyzazcmagjs"); // ydelta = ND_pos(q)[1] - ND_pos(p)[1]; UNSUPPORTED("abv0h9yqlurn14oo0x5uv9zy4"); // return doRep(p, q, xdelta, ydelta, xdelta * xdelta + ydelta * ydelta); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e7n8inn8axpewkqle5kltm5vc // static void applyAttr(Agnode_t * p, Agnode_t * q) public static Object applyAttr(Object... arg) { UNSUPPORTED("3ae1kegpe2zjt3moizp0poajn"); // static void applyAttr(Agnode_t * p, Agnode_t * q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("fwy8i5zbwxhddxrcwdkd8w1g"); // double xdelta, ydelta; UNSUPPORTED("7xmrzkoismbw37gye9vc6jbi9"); // double force; UNSUPPORTED("6ri5yxqbfur0r77yjjezxcpf1"); // double dist; UNSUPPORTED("ctt5nlvrv7m0w0nxaxij6cj8o"); // double dout; UNSUPPORTED("c8ob5j0wpqrszphxp6loxhay1"); // double din; UNSUPPORTED("4cwjdr47kafqn8kx0zhzvpr5d"); // if (overlap(p, q)) { UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1gexoq8hut0hmb4k5ef2tvif7"); // xdelta = ND_pos(q)[0] - ND_pos(p)[0]; UNSUPPORTED("bwmnzroxk4eq5fdyzazcmagjs"); // ydelta = ND_pos(q)[1] - ND_pos(p)[1]; UNSUPPORTED("bw1sesuw4cy90zcv9krq4bph2"); // dist = sqrt(xdelta * xdelta + ydelta * ydelta); UNSUPPORTED("2v56dw0jdzzlhxk831vkn0s6z"); // din = RAD(p) + RAD(q); UNSUPPORTED("3pghx81y2dpapjaw4o5itdft3"); // dout = dist - din; UNSUPPORTED("3f80v9p7jk2aow03la9ntwhhj"); // force = (dout * dout) / ((xParams.K + din) * dist); UNSUPPORTED("ef256m9rw2e3kva0vy4mrt4pn"); // (((dndata*)(ND_alg(q)))->disp)[0] -= xdelta * force; UNSUPPORTED("de0dfwmddjz26z7cw76x9uejs"); // (((dndata*)(ND_alg(q)))->disp)[1] -= ydelta * force; UNSUPPORTED("9us8cvhguukd2iasv7c2crzho"); // (((dndata*)(ND_alg(p)))->disp)[0] += xdelta * force; UNSUPPORTED("e4teme92uacnxx36to3g3mdco"); // (((dndata*)(ND_alg(p)))->disp)[1] += ydelta * force; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 72lfwy94e8xghh1pg6o51jx5d // static int adjust(Agraph_t * g, double temp) public static Object adjust(Object... arg) { UNSUPPORTED("bblnro80uf4l58mz89n7uwroc"); // static int adjust(Agraph_t * g, double temp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("4rip97cgvbcrlgycxl0wajpuh"); // Agnode_t *n1; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("sg55m1c2s3xuubzzp8n0sw3f"); // double temp2; UNSUPPORTED("83zpklqoz4hkcpabg6bg1meo4"); // double len; UNSUPPORTED("25uak17ioz04l0iqfpc2rqjmq"); // double len2; UNSUPPORTED("101m7lg3fvv7bt3cqnrr3ugkz"); // double disp[2]; /* incremental displacement */ UNSUPPORTED("dh4blwzy2gol2haq0zvq0r4mt"); // int overlaps = 0; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("d4x7a0ncmwpuitrfyisphry1f"); // (((dndata*)(ND_alg(n)))->disp)[0] = (((dndata*)(ND_alg(n)))->disp)[1] = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("8cdovd65kzu7c0gyi9f0vjomk"); // int ov; UNSUPPORTED("d5vhk45d87pvhm7ey0xmi5all"); // for (n1 = agnxtnode(g, n); n1; n1 = agnxtnode(g, n1)) { UNSUPPORTED("5d1miakuqe3pufhyrg2nfemab"); // ov = applyRep(n, n1); UNSUPPORTED("7p6d73ee50u1l78lhlmnrroih"); // /* if (V && ov) */ UNSUPPORTED("d8rl8vfx944ljvxg4cz14lwoq"); // /* fprintf (stderr,"%s ov %s\n", n->name, n1->name); */ UNSUPPORTED("6ihxid42li0vto0p3fy18ygc5"); // overlaps += ov; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("9xhw7ldujjd4t38b8enpnbcbe"); // applyAttr(n,aghead(e)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5j0o204tpirp5i0dda3kpel8c"); // if (overlaps == 0) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("amlnzp2bleh099q3wlzlmj8zn"); // temp2 = temp * temp; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("etksonx8xl1ocsnrpk6da3ob1"); // if (ND_pinned(n) == 3) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("46f36xeqr50orzwaaehnyahja"); // disp[0] = (((dndata*)(ND_alg(n)))->disp)[0]; UNSUPPORTED("7vl0plbi2jk05jpu82kk9vkxk"); // disp[1] = (((dndata*)(ND_alg(n)))->disp)[1]; UNSUPPORTED("6fr8xh0dd39sdf9ksk754u0uv"); // len2 = disp[0] * disp[0] + disp[1] * disp[1]; UNSUPPORTED("baq9cdzymvavytsen7guap4p5"); // if (len2 < temp2) { UNSUPPORTED("eylgn5y6582ba3grgy9oubk2r"); // ND_pos(n)[0] += disp[0]; UNSUPPORTED("5w0804th0mpm0jxustn7azku9"); // ND_pos(n)[1] += disp[1]; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("9eeklbdqa894l9ixhki8ipa39"); // /* to avoid sqrt, consider abs(x) + abs(y) */ UNSUPPORTED("4wg0pbkksylkittc56p4xy5y7"); // len = sqrt(len2); UNSUPPORTED("bbb6yt3aurbnw54oonsao9aco"); // ND_pos(n)[0] += (disp[0] * temp) / len; UNSUPPORTED("coudu8xt3dyzuw0r88wv26yk4"); // ND_pos(n)[1] += (disp[1] * temp) / len; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("eku6aljbiz6b4mrk8fh010m8o"); // return overlaps; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ebgb1mbfxrbsgxba0h76yoghu // static int x_layout(graph_t * g, xparams * pxpms, int tries) public static Object x_layout(Object... arg) { UNSUPPORTED("d8r2vtws8cszfcp0lp6lpsdtr"); // static int x_layout(graph_t * g, xparams * pxpms, int tries) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("j2awxnit81f2pqilevoqwbi7"); // int try; UNSUPPORTED("283tteroothnz184tu51u1gqa"); // int ov; UNSUPPORTED("cdwiwyvrwcamy7fd5h8v4ctix"); // double temp; UNSUPPORTED("brufdedflymb56undhz1cvxzw"); // int nnodes = agnnodes(g); UNSUPPORTED("bfnlke01bf5uxsciju0esym0d"); // int nedges = agnedges(g); UNSUPPORTED("9paqg2y24fs0c7o8fshi8r9gb"); // double K; UNSUPPORTED("737jd5uo7xo54hyd5aao8g0aw"); // xparams xpms; UNSUPPORTED("39wpa4jkntkm79hvns271igky"); // X_marg = sepFactor (g); UNSUPPORTED("ad4bj6umsvvvn9iafmyfski0v"); // if (X_marg.doAdd) { UNSUPPORTED("1h84n92mhpi0w98m7y86cl09m"); // X_marg.x = ((X_marg.x)/(double)72); /* sepFactor is in points */ UNSUPPORTED("9ue6xcyhni986kwvxugnza6h5"); // X_marg.y = ((X_marg.y)/(double)72); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a0v0gkh4wqz2jv2jt98llzuzy"); // ov = cntOverlaps(g); UNSUPPORTED("3uozzdw2fmo6jyna2cqdv2kri"); // if (ov == 0) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("9by4tgha5w5entt0s1o6syehv"); // try = 0; UNSUPPORTED("93av4lg9y3aedu1bn00moi8mn"); // xpms = *pxpms; UNSUPPORTED("17eaxg4hlw5ok3b139srbiy37"); // K = xpms.K; UNSUPPORTED("w7qba5butfj3jdoufrabtvld"); // while (ov && (try < tries)) { UNSUPPORTED("ctek1x05f6b50pk0hokcaoeoq"); // xinit_params(g, nnodes, &xpms); UNSUPPORTED("d36bht2b7d3wsqamzk5bp13bn"); // X_ov = xParams.C * K2; UNSUPPORTED("7jigut7zop8kgoolvtmty4hbj"); // X_nonov = (nedges*X_ov*2.0)/(nnodes*(nnodes-1)); UNSUPPORTED("jsk5uethwlbnb51ehgow3soh"); // for (i = 0; i < xParams.loopcnt; i++) { UNSUPPORTED("44wdm4c0q0pht0o3u6v5i07px"); // temp = cool(i); UNSUPPORTED("2iwdbgfwhz54bkmiukcxxvpz5"); // if (temp <= 0.0) UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("aenxo7m2fi02ngnhda071yjwl"); // ov = adjust(g, temp); UNSUPPORTED("9p3cpbzv9p8k1ka57xqhalk4s"); // if (ov == 0) UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4o9sjijafemzfi2l116taidm7"); // try++; UNSUPPORTED("br971gk7pewl58gm56w8ubyx2"); // xpms.K += K; /* increase distance */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("82m5sgzq9tf80cg4je6sb0dt3"); // return ov; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7za1p2k71h4y3ogllxkyx2ih5 // void fdp_xLayout(graph_t * g, xparams * xpms) public static Object fdp_xLayout(Object... arg) { UNSUPPORTED("8t1bcmgwg6m0lep3eprv8adb7"); // void fdp_xLayout(graph_t * g, xparams * xpms) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4o4ua8zjnqs0c2322m5lyi6a4"); // int tries; UNSUPPORTED("1m8fw6ftw1xq6k4uyghckh81h"); // char* ovlp = agget (g, "overlap"); UNSUPPORTED("4ktkev652k4fyfzl4rmv5049p"); // char* cp; UNSUPPORTED("2wtobqhf44rke68jbttqcua4a"); // char* rest; UNSUPPORTED("cve2on8gll5i0vomy8lnwhai2"); // if (Verbose) { UNSUPPORTED("2ccn2srthr0pt1isjelqgdyii"); // fprintf (stderr, "xLayout "); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("11agdz7dh5ieet8ctmk1umnfv"); // if (!ovlp || (*ovlp == '\0')) { UNSUPPORTED("910m35r8c28nhc79emy2xg5xv"); // ovlp = "9:prism"; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ebztm1i3wjnjwd5ujqq4ovjz0"); // /* look for optional ":" or "number:" */ UNSUPPORTED("f3qk7qrm8j0z7wfwtlqrw9vz3"); // if ((cp = strchr(ovlp, ':')) && ((cp == ovlp) || isdigit(*ovlp))) { UNSUPPORTED("7wgdzf2gqck3j2qyt8jfply93"); // cp++; UNSUPPORTED("50lz7fpr4xwh0sg144lh8bsa9"); // rest = cp; UNSUPPORTED("4yn5gen1je7znx1qfggjf49if"); // tries = atoi (ovlp); UNSUPPORTED("1wypiyf7bw4lnnglss90nuhq2"); // if (tries < 0) tries = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("1ptbm9147387jdxujy59wugbp"); // tries = 0; UNSUPPORTED("64lbvqheko14zbss8st4mnx7u"); // rest = ovlp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cve2on8gll5i0vomy8lnwhai2"); // if (Verbose) { UNSUPPORTED("3w0rxu0bhoiq71ksp1um5148m"); // fprintf (stderr, "tries = %d, mode = %s\n", tries, rest); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3u031ze4x604nx7ic6wal9vqk"); // if (tries && !x_layout(g, xpms, tries)) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("6k7hqqqf1pb0lcyjk0boq5680"); // removeOverlapAs(g, rest); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/gvc/000077500000000000000000000000001312650303100165435ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/lib/gvc/gvbuffstderr__c.java000066400000000000000000000114261312650303100225560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.gvc; import static smetana.core.Macro.UNSUPPORTED; public class gvbuffstderr__c { //3 8e1sa6f5ejc0r49gfiuv32aul // void *buffstderr(void) public static Object buffstderr(Object... arg) { UNSUPPORTED("bel1uzbdqhzbiuqj5bt2lxzqq"); // void *buffstderr(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("38cr9skhy4jrzhg3wj3bc20yu"); // struct buff_s *b; UNSUPPORTED("28m0s1mo38itho1au29oy5rv9"); // assert ((b = malloc(sizeof(struct buff_s)))); UNSUPPORTED("6rlbco8yzervnvmq2m0r611c1"); // assert ((b->template = strdup("/tmp/stderr_buffer_XXXXXX"))); UNSUPPORTED("bcqwp3my2rhtv5cf0oviy8odz"); // assert ((p = mktemp(b->template))); UNSUPPORTED("aw4nnvbir9iy1nuq4aukql0de"); // fflush(stderr); UNSUPPORTED("62lg711j2rddmpadkk7qhn7o7"); // fgetpos(stderr, &(b->pos)); UNSUPPORTED("1eysolcc2x8f6m0otum5r2501"); // b->fd = dup(fileno(stderr)); UNSUPPORTED("6hw12z5dqv9hheh1gxxpmwey0"); // freopen(b->template, "w+", stderr); UNSUPPORTED("2d461iz08h1aqinzmgs197s94"); // return (void *)b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c9716hxgrfzvnokv7hw8islwa // char *unbuffstderr(struct buff_s *b) public static Object unbuffstderr(Object... arg) { UNSUPPORTED("evux4jdjx4b2zi15ma1m76h5d"); // char *unbuffstderr(struct buff_s *b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eywfpf1qo3rooyuerxrc41h5p"); // long sz; UNSUPPORTED("71fkgwtjx5c4orpsdy7jkyr86"); // char *t = NULL; UNSUPPORTED("3al75fenupx704zal37z61c8b"); // FILE *f; UNSUPPORTED("aw4nnvbir9iy1nuq4aukql0de"); // fflush(stderr); UNSUPPORTED("2s4h3spdm3ti16pnbbiw5wl7h"); // sz = ftell(stderr); UNSUPPORTED("sy0yol0bacbdtlzdr1qewlj9"); // dup2(b->fd, fileno(stderr)); UNSUPPORTED("15iuj8qt4zyy6idhhvkhw7kyy"); // close(b->fd); UNSUPPORTED("6vd38rt8w7l0uxuayeny4pb4"); // clearerr(stderr); UNSUPPORTED("elgraii0bqskacqp0kwicgtfj"); // fsetpos(stderr, &(b->pos)); UNSUPPORTED("9zb4lfjglf6mq4qwh8w8tysh9"); // if (sz) { UNSUPPORTED("61z9k4t8590rqr4gbjt7udecr"); // /* stderr has been restored; these asserts use normal stderr output */ UNSUPPORTED("2mznswy9uou17ncks1p4of2f7"); // assert((t = malloc(sz+1))); UNSUPPORTED("4vbq5cvor2on52t1v9dbok91h"); // assert((f = fopen(b->template, "r"))); UNSUPPORTED("8s2fk8360i1yh41rn73tpnhj"); // assert( fread(t, 1, sz, f) == sz); UNSUPPORTED("dk3j3n9fv8k10vlyl1mk71gbf"); // fclose(f); UNSUPPORTED("7w549vhurh491724lsxzvdx0f"); // t[sz]='\0'; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1iabjly523zdwdwqm9s4pz5vc"); // unlink(b->template); UNSUPPORTED("1xawfl1gbhijvti6c9mg6k3bi"); // free(b->template); UNSUPPORTED("am24176ien70yg0oq7iticngs"); // free(b); UNSUPPORTED("6lv6zglsw62ek6eoecn583mc9"); // return t; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/gvc/gvc__c.java000066400000000000000000000443701312650303100206360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.gvc; import static gen.lib.cgraph.attr__c.agattr; import static gen.lib.gvc.gvconfig__c.gvconfig; import static gen.lib.gvc.gvcontext__c.gvNEWcontext; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGNODE; import static smetana.core.Macro.NOT; import static smetana.core.Macro.UNSUPPORTED; import h.GVC_s; import smetana.core.CString; public class gvc__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //3 f3vdhir2c7dz3pvmx9d3m4lx1 // GVC_t *gvContext(void) public static GVC_s gvContext(Object... arg) { ENTERING("f3vdhir2c7dz3pvmx9d3m4lx1","gvContext"); try { GVC_s gvc; agattr(null, AGNODE, new CString("label"), new CString("\\N")); /* default to no builtins, demand loading enabled */ gvc = (GVC_s) gvNEWcontext(null, (NOT(0))); gvconfig(gvc, false); /* configure for available plugins */ return gvc; } finally { LEAVING("f3vdhir2c7dz3pvmx9d3m4lx1","gvContext"); } } //3 71uhxq27gz2h6tw2jii3pv0m1 // GVC_t *gvContextPlugins(const lt_symlist_t *builtins, int demand_loading) public static Object gvContextPlugins(Object... arg) { UNSUPPORTED("ed1o9q8yu974j7v5vbap4dlsk"); // GVC_t *gvContextPlugins(const lt_symlist_t *builtins, int demand_loading) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8f3ds00y6y855lum5r1q8iguu"); // GVC_t *gvc; UNSUPPORTED("8808fnx5fweuiso27n5bmlach"); // agattr(NULL, AGNODE, "label", "\\N"); UNSUPPORTED("1n7k6h7whkgv2pc7hm2vxrtlz"); // gvc = gvNEWcontext(builtins, demand_loading); UNSUPPORTED("36nskub1lmc5t5yi3kt1v69ot"); // gvconfig(gvc, 0); /* configure for available plugins */ UNSUPPORTED("8vhd87hbzyu5ic6asaqlo81d5"); // return gvc; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dnud6ljljblwvlx76imgoo8i8 // int gvLayout(GVC_t *gvc, graph_t *g, const char *engine) public static Object gvLayout(Object... arg) { UNSUPPORTED("6y1to7xw4qcx9wxk34th6ze7q"); // int gvLayout(GVC_t *gvc, graph_t *g, const char *engine) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9cn2lsc78g1edtf7fifdb4iqx"); // char buf[256]; UNSUPPORTED("1bh3yj957he6yv2dkeg4pzwdk"); // int rc; UNSUPPORTED("ajvhg377bzgyjw1u7fc6ynufe"); // rc = gvlayout_select(gvc, engine); UNSUPPORTED("5wvj0ph8uqfgg8jl3g39jsf51"); // if (rc == 999) { UNSUPPORTED("bqcqxlaqnxiukaofkbaeohlrc"); // agerr (AGERR, "Layout type: \"%s\" not recognized. Use one of:%s\n", UNSUPPORTED("6vb5xjowxadh06keqoi8xkixl"); // engine, gvplugin_list(gvc, API_layout, engine)); UNSUPPORTED("f3a98gxettwtewduvje9y3524"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2zgcvtw13j4ii0vfdebphrdmh"); // if (gvLayoutJobs(gvc, g) == -1) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("1cg49iv90v5mueolzbu69xy3q"); // /* set bb attribute for basic layout. UNSUPPORTED("a7i33czrx785isv8bnwlpc39h"); // * doesn't yet include margins, scaling or page sizes because UNSUPPORTED("25x3oqnrohvx47gdi47wjsvje"); // * those depend on the renderer being used. */ UNSUPPORTED("2cxu41gtx0x2822685tf09ctd"); // if (GD_drawing(g)->landscape) UNSUPPORTED("bw86vkkrgie6ys9mgl56wng55"); // sprintf(buf, "%d %d %d %d", UNSUPPORTED("bejqbur89cau7q2a7x8pbuhd7"); // ROUND(GD_bb(g).LL.y), ROUND(GD_bb(g).LL.x), UNSUPPORTED("3ey1j2uf8t8xsknqe7zba77pt"); // ROUND(GD_bb(g).UR.y), ROUND(GD_bb(g).UR.x)); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("bw86vkkrgie6ys9mgl56wng55"); // sprintf(buf, "%d %d %d %d", UNSUPPORTED("7r04i6r8wgv29cf9sh4x0os5v"); // ROUND(GD_bb(g).LL.x), ROUND(GD_bb(g).LL.y), UNSUPPORTED("buvo4ybvfnr1ki5uxao1rrf74"); // ROUND(GD_bb(g).UR.x), ROUND(GD_bb(g).UR.y)); UNSUPPORTED("dpbq2928p9qeg5a464f8e2yjy"); // agsafeset(g, "bb", buf, ""); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2kh108ndzn77vjo1ch0gt1bak // int gvRender(GVC_t *gvc, graph_t *g, const char *format, FILE *out) public static Object gvRender(Object... arg) { UNSUPPORTED("e2g1sf67k7u629a0lf4qtd4w8"); // int gvRender(GVC_t *gvc, graph_t *g, const char *format, FILE *out) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1bh3yj957he6yv2dkeg4pzwdk"); // int rc; UNSUPPORTED("1ag9dz4apxn0w3cz8w2bfm6se"); // GVJ_t *job; UNSUPPORTED("8msotrfl0cngiua3j57ylm26b"); // g = g->root; UNSUPPORTED("exts51afuertju5ed5v7pdpg7"); // /* create a job for the required format */ UNSUPPORTED("dn6z1r1bbrtmr58m8dnfgfnm0"); // rc = gvjobs_output_langname(gvc, format); UNSUPPORTED("5apijrijm2r8b1g2l4x7iee7s"); // job = gvc->job; UNSUPPORTED("5wvj0ph8uqfgg8jl3g39jsf51"); // if (rc == 999) { UNSUPPORTED("4lkoedjryn54aff3fyrsewwu5"); // agerr (AGERR, "Format: \"%s\" not recognized. Use one of:%s\n", UNSUPPORTED("2pjgp86rkudo6mihbako5yps2"); // format, gvplugin_list(gvc, API_device, format)); UNSUPPORTED("f3a98gxettwtewduvje9y3524"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ect62lxc3zm51lhzifift55m"); // job->output_lang = gvrender_select(job, job->output_langname); UNSUPPORTED("ewlceg1k4gs2e6syq4ear5kzo"); // if (!(agbindrec(g, "Agraphinfo_t", 0, NOT(0)) && GD_drawing(g)) && !(job->flags & (1<<26))) { UNSUPPORTED("3yo4xyapbp7osp8uyz4kff98s"); // agerrorf( "Layout was not done\n"); UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2ai20uylya195fbdqwjy9bz0n"); // job->output_file = out; UNSUPPORTED("10kpqi6pvibjsxjyg0g76lix3"); // if (out == NULL) UNSUPPORTED("d47ukby9krmz2k8ycmzzynnfr"); // job->flags |= (1<<27); UNSUPPORTED("9szsye4q9jykqvtk0bc1r91d0"); // rc = gvRenderJobs(gvc, g); UNSUPPORTED("7l8ugws8ptgtlxc1ymmh3cf18"); // gvrender_end_job(job); UNSUPPORTED("a9p7yonln7g91ge7xab3xf9dr"); // gvjobs_delete(gvc); UNSUPPORTED("5bc9k4vsl6g7wejc5xefc5964"); // return rc; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2e8uwmja1nq8v3iktli5cq851 // int gvRenderFilename(GVC_t *gvc, graph_t *g, const char *format, const char *filename) public static Object gvRenderFilename(Object... arg) { UNSUPPORTED("9xxpjotl5x2p5wtwqunca24kv"); // int gvRenderFilename(GVC_t *gvc, graph_t *g, const char *format, const char *filename) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1bh3yj957he6yv2dkeg4pzwdk"); // int rc; UNSUPPORTED("1ag9dz4apxn0w3cz8w2bfm6se"); // GVJ_t *job; UNSUPPORTED("8msotrfl0cngiua3j57ylm26b"); // g = g->root; UNSUPPORTED("exts51afuertju5ed5v7pdpg7"); // /* create a job for the required format */ UNSUPPORTED("dn6z1r1bbrtmr58m8dnfgfnm0"); // rc = gvjobs_output_langname(gvc, format); UNSUPPORTED("5apijrijm2r8b1g2l4x7iee7s"); // job = gvc->job; UNSUPPORTED("5wvj0ph8uqfgg8jl3g39jsf51"); // if (rc == 999) { UNSUPPORTED("cpui2f5hfk3cihua2ie59746n"); // agerr(AGERR, "Format: \"%s\" not recognized. Use one of:%s\n", UNSUPPORTED("2pjgp86rkudo6mihbako5yps2"); // format, gvplugin_list(gvc, API_device, format)); UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ect62lxc3zm51lhzifift55m"); // job->output_lang = gvrender_select(job, job->output_langname); UNSUPPORTED("ewlceg1k4gs2e6syq4ear5kzo"); // if (!(agbindrec(g, "Agraphinfo_t", 0, NOT(0)) && GD_drawing(g)) && !(job->flags & (1<<26))) { UNSUPPORTED("3yo4xyapbp7osp8uyz4kff98s"); // agerrorf( "Layout was not done\n"); UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("23iaqajrvbemalclzlgih1a09"); // gvjobs_output_filename(gvc, filename); UNSUPPORTED("9szsye4q9jykqvtk0bc1r91d0"); // rc = gvRenderJobs(gvc, g); UNSUPPORTED("7l8ugws8ptgtlxc1ymmh3cf18"); // gvrender_end_job(job); UNSUPPORTED("dql0bth0nzsrpiu9vnffonrhf"); // gvdevice_finalize(job); UNSUPPORTED("a9p7yonln7g91ge7xab3xf9dr"); // gvjobs_delete(gvc); UNSUPPORTED("5bc9k4vsl6g7wejc5xefc5964"); // return rc; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e73ju97kxz883q0hp1udq4rd7 // int gvRenderContext(GVC_t *gvc, graph_t *g, const char *format, void *context) public static Object gvRenderContext(Object... arg) { UNSUPPORTED("6bxfu9f9cshxn0i97berfl9bw"); // int gvRenderContext(GVC_t *gvc, graph_t *g, const char *format, void *context) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1bh3yj957he6yv2dkeg4pzwdk"); // int rc; UNSUPPORTED("1ag9dz4apxn0w3cz8w2bfm6se"); // GVJ_t *job; UNSUPPORTED("8msotrfl0cngiua3j57ylm26b"); // g = g->root; UNSUPPORTED("exts51afuertju5ed5v7pdpg7"); // /* create a job for the required format */ UNSUPPORTED("dn6z1r1bbrtmr58m8dnfgfnm0"); // rc = gvjobs_output_langname(gvc, format); UNSUPPORTED("5apijrijm2r8b1g2l4x7iee7s"); // job = gvc->job; UNSUPPORTED("5wvj0ph8uqfgg8jl3g39jsf51"); // if (rc == 999) { UNSUPPORTED("8r1a6szpsnku0jhatqkh0qo75"); // agerr(AGERR, "Format: \"%s\" not recognized. Use one of:%s\n", UNSUPPORTED("2pj79j8toe6bactkaedt54xcv"); // format, gvplugin_list(gvc, API_device, format)); UNSUPPORTED("b0epxudfxjm8kichhaautm2qi"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ect62lxc3zm51lhzifift55m"); // job->output_lang = gvrender_select(job, job->output_langname); UNSUPPORTED("ewlceg1k4gs2e6syq4ear5kzo"); // if (!(agbindrec(g, "Agraphinfo_t", 0, NOT(0)) && GD_drawing(g)) && !(job->flags & (1<<26))) { UNSUPPORTED("3yo4xyapbp7osp8uyz4kff98s"); // agerrorf( "Layout was not done\n"); UNSUPPORTED("b0epxudfxjm8kichhaautm2qi"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ex1rhur9nlj950oe8r621uxxk"); // job->context = context; UNSUPPORTED("3hvm1mza6yapsb3hi7bkw03cs"); // job->external_context = NOT(0); UNSUPPORTED("9szsye4q9jykqvtk0bc1r91d0"); // rc = gvRenderJobs(gvc, g); UNSUPPORTED("7l8ugws8ptgtlxc1ymmh3cf18"); // gvrender_end_job(job); UNSUPPORTED("dql0bth0nzsrpiu9vnffonrhf"); // gvdevice_finalize(job); UNSUPPORTED("a9p7yonln7g91ge7xab3xf9dr"); // gvjobs_delete(gvc); UNSUPPORTED("5bc9k4vsl6g7wejc5xefc5964"); // return rc; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2p4eja1ksp0cdz8qxl7wpzez9 // int gvRenderData(GVC_t *gvc, graph_t *g, const char *format, char **result, unsigned int *length) public static Object gvRenderData(Object... arg) { UNSUPPORTED("epzew3wavf5f9mykc38usb6r9"); // int gvRenderData(GVC_t *gvc, graph_t *g, const char *format, char **result, unsigned int *length) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1bh3yj957he6yv2dkeg4pzwdk"); // int rc; UNSUPPORTED("1ag9dz4apxn0w3cz8w2bfm6se"); // GVJ_t *job; UNSUPPORTED("8msotrfl0cngiua3j57ylm26b"); // g = g->root; UNSUPPORTED("exts51afuertju5ed5v7pdpg7"); // /* create a job for the required format */ UNSUPPORTED("dn6z1r1bbrtmr58m8dnfgfnm0"); // rc = gvjobs_output_langname(gvc, format); UNSUPPORTED("5apijrijm2r8b1g2l4x7iee7s"); // job = gvc->job; UNSUPPORTED("5wvj0ph8uqfgg8jl3g39jsf51"); // if (rc == 999) { UNSUPPORTED("cpui2f5hfk3cihua2ie59746n"); // agerr(AGERR, "Format: \"%s\" not recognized. Use one of:%s\n", UNSUPPORTED("2pjgp86rkudo6mihbako5yps2"); // format, gvplugin_list(gvc, API_device, format)); UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ect62lxc3zm51lhzifift55m"); // job->output_lang = gvrender_select(job, job->output_langname); UNSUPPORTED("ewlceg1k4gs2e6syq4ear5kzo"); // if (!(agbindrec(g, "Agraphinfo_t", 0, NOT(0)) && GD_drawing(g)) && !(job->flags & (1<<26))) { UNSUPPORTED("3yo4xyapbp7osp8uyz4kff98s"); // agerrorf( "Layout was not done\n"); UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e2razcqp20hymeukedg9bannu"); // /* page size on Linux, Mac OS X and Windows */ UNSUPPORTED("78h54wwr6x96fwwes4nhn1tnu"); // if(!result || !(*result = malloc(4096))) { UNSUPPORTED("48p1xzjf31myn1slku76g3c8j"); // agerr(AGERR, "failure malloc'ing for result string"); UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("f3ljfuaa9qaj4cd1xhojgsd7d"); // job->output_data = *result; UNSUPPORTED("619t5sjk3c37ujk3ndu91wamv"); // job->output_data_allocated = 4096; UNSUPPORTED("dbvvz39zyfsbhofeha2hb1wpf"); // job->output_data_position = 0; UNSUPPORTED("9szsye4q9jykqvtk0bc1r91d0"); // rc = gvRenderJobs(gvc, g); UNSUPPORTED("7l8ugws8ptgtlxc1ymmh3cf18"); // gvrender_end_job(job); UNSUPPORTED("78jlu7v0o8b8itbx8ri5ptkc7"); // if (rc == 0) { UNSUPPORTED("2w0i2qgohz8ogcqrg43r585dh"); // *result = job->output_data; UNSUPPORTED("cnqap0ow188zdpvtqu6bfrmyr"); // *length = job->output_data_position; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a9p7yonln7g91ge7xab3xf9dr"); // gvjobs_delete(gvc); UNSUPPORTED("5bc9k4vsl6g7wejc5xefc5964"); // return rc; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9dmqkq749nve1m6f0uz279w5x // void gvFreeRenderData (char* data) public static Object gvFreeRenderData(Object... arg) { UNSUPPORTED("4zoblerqjutmiyqrcnymyvo8"); // void gvFreeRenderData (char* data) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("23jg3jufd8h5n6iqw6jh5trop"); // free (data); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 63riwkqx5e0b3n3yyjalaveuy // void gvAddLibrary(GVC_t *gvc, gvplugin_library_t *lib) public static Object gvAddLibrary(Object... arg) { UNSUPPORTED("31dpjbojh15wnjppy2p096exn"); // void gvAddLibrary(GVC_t *gvc, gvplugin_library_t *lib) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eawa3cjrrmhe2wb24kkblkv6k"); // gvconfig_plugin_install_from_library(gvc, NULL, lib); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bpzhymnb55ana0o9q691it06 // char **gvcInfo(GVC_t* gvc) public static Object gvcInfo(Object... arg) { UNSUPPORTED("4o912yqrgsuc4t2uym0i2siv3"); // char **gvcInfo(GVC_t* gvc) { return gvc->common.info; } throw new UnsupportedOperationException(); } //3 6gnk937rtz89xtqqmf7nb8mod // char *gvcVersion(GVC_t* gvc) public static Object gvcVersion(Object... arg) { UNSUPPORTED("34219rcx2cc7lx28xxwdo2zic"); // char *gvcVersion(GVC_t* gvc) { return gvc->common.info[1]; } throw new UnsupportedOperationException(); } //3 if7qohbqqln8g7vnhx128b1k // char *gvcBuildDate(GVC_t* gvc) public static Object gvcBuildDate(Object... arg) { UNSUPPORTED("7r5j1w6y3ov7ta18s257h2rqv"); // char *gvcBuildDate(GVC_t* gvc) { return gvc->common.info[2]; } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/gvc/gvconfig__c.java000066400000000000000000000167361312650303100216660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.gvc; import static gen.lib.common.textspan__c.textfont_dict_open; import static gen.lib.gvc.gvtextlayout__c.gvtextlayout_select; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.GVC_s; import h.lt_symlist_t; import smetana.core.CString; public class gvconfig__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //3 btaticnvqvav6giyqk5dhvl0b // static gvplugin_package_t * gvplugin_package_record(GVC_t * gvc, char *path, char *name) public static Object gvplugin_package_record(Object... arg) { UNSUPPORTED("d0v4w7mmhzyohr3cydmk39msc"); // static gvplugin_package_t * gvplugin_package_record(GVC_t * gvc, char *path, char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3l201ckgkdpkadl64dgd5t34a"); // gvplugin_package_t *package = gmalloc(sizeof(gvplugin_package_t)); UNSUPPORTED("e1ux222fnf2pzhlllspc0n9z6"); // package->path = (path) ? strdup(path) : NULL; UNSUPPORTED("6tx9kbkb680t4nrzo9h6wmxt7"); // package->name = strdup(name); UNSUPPORTED("2ddoa0el03kdry52dvxdp02xi"); // package->next = gvc->packages; UNSUPPORTED("2wtcp1phunrqzsy2eyeelnisd"); // gvc->packages = package; UNSUPPORTED("1cvdn1usbhmpxzhmfo5t0qhv0"); // return package; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7b32j8w9cd211oy7f26zd2ld6 // void gvconfig_plugin_install_from_library(GVC_t * gvc, char *path, gvplugin_library_t *library) public static Object gvconfig_plugin_install_from_library(Object... arg) { UNSUPPORTED("9qlio5kiswebv40u9nmcxh1um"); // void gvconfig_plugin_install_from_library(GVC_t * gvc, char *path, gvplugin_library_t *library) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1tb07tzg54jallfz0upl62c1g"); // gvplugin_api_t *apis; UNSUPPORTED("2ihbo5t1nbmg4dq1qvwi9sqoh"); // gvplugin_installed_t *types; UNSUPPORTED("as58mgqb4uw4c8n4sdq7m0qz3"); // gvplugin_package_t *package; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("21xt0dglbm2xme4gg1b8b9tfl"); // package = gvplugin_package_record(gvc, path, library->packagename); UNSUPPORTED("44g9muiwx72zahb9xx5xzmfyv"); // for (apis = library->apis; (types = apis->types); apis++) { UNSUPPORTED("bslr2lh149d2y32qozijhg1pj"); // for (i = 0; types[i].type; i++) { UNSUPPORTED("7xl5c8mkdfmtazqddql72rl4l"); // gvplugin_install(gvc, apis->api, types[i].type, UNSUPPORTED("81elyir1t9mhizwx6bh2dy6fc"); // types[i].quality, package, &types[i]); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a0u25p4ndz2d3mpylo4jnz9cc // static void gvconfig_plugin_install_builtins(GVC_t * gvc) public static void gvconfig_plugin_install_builtins(GVC_s gvc) { ENTERING("a0u25p4ndz2d3mpylo4jnz9cc","gvconfig_plugin_install_builtins"); try { lt_symlist_t s; CString name; if (gvc.getStruct("common").getPtr("builtins") == null) return; UNSUPPORTED("5h6ty7bll7yb1rvxiy8b1a17y"); // for (s = gvc->common.builtins; (name = s->name); s++) UNSUPPORTED("efvffxomvrmz7nbrcbcvananw"); // if (name[0] == 'g' && strstr(name, "_LTX_library")) UNSUPPORTED("95pie5przmmzrwnym8ye97v2e"); // gvconfig_plugin_install_from_library(gvc, NULL, UNSUPPORTED("ezsy5hnc71vs70pla8x24w5py"); // (gvplugin_library_t *)(s->address)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("a0u25p4ndz2d3mpylo4jnz9cc","gvconfig_plugin_install_builtins"); } } //3 f5fyxnkmknydgjt6dtc035z9w // void gvconfig(GVC_t * gvc, boolean rescan) public static void gvconfig(GVC_s gvc, boolean rescan) { ENTERING("f5fyxnkmknydgjt6dtc035z9w","gvconfig"); try { /* builtins don't require LTDL */ gvconfig_plugin_install_builtins(gvc); gvc.setInt("config_found", 0); gvtextlayout_select(gvc); /* choose best available textlayout plugin immediately */ textfont_dict_open(gvc); /* initialize font dict */ } finally { LEAVING("f5fyxnkmknydgjt6dtc035z9w","gvconfig"); } } } plantuml-1.2017.15/src/gen/lib/gvc/gvcontext__c.java000066400000000000000000000162311312650303100220730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.gvc; import static gen.lib.common.memory__c.zmalloc; import static smetana.core.JUtils.function; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.GVC_s; import h.lt_symlist_t; import smetana.core.__ptr__; public class gvcontext__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 9xccaaawyqf5atj8e59ems07n // static char *LibInfo[] = //public static java.util.List LibInfo = java.util.Arrays.asList(new CString("graphviz"),new CString("PACKAGE_VERSION"),new CString("BUILDDATE")); public static __ptr__ LibInfo = null; //3 8jwauh4lo3kcvxhomy40s94b // GVC_t *gvNEWcontext(const lt_symlist_t *builtins, int demand_loading) public static GVC_s gvNEWcontext(lt_symlist_t builtins, boolean demand_loading) { ENTERING("8jwauh4lo3kcvxhomy40s94b","gvNEWcontext"); try { GVC_s gvc = (GVC_s) zmalloc(sizeof(GVC_s.class)); if (gvc!=null) { gvc.getStruct("common").setPtr("info", LibInfo); gvc.getStruct("common").setPtr("errorfn", function(gen.lib.cgraph.agerror__c.class, "agerrorf")); gvc.getStruct("common").setPtr("builtins", builtins); gvc.getStruct("common").setBoolean("demand_loading", demand_loading); } return gvc; } finally { LEAVING("8jwauh4lo3kcvxhomy40s94b","gvNEWcontext"); } } //3 7i8lj0jlmprrj5kmbegtkh46n // void gvFinalize(GVC_t * gvc) public static Object gvFinalize(Object... arg) { UNSUPPORTED("1dio7yofln4lzxco3d0eucybt"); // void gvFinalize(GVC_t * gvc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("72t0pmaautwuw3vb1xwa2grxz"); // if (gvc->active_jobs) UNSUPPORTED("dtzx65g0vmdvgplajdnqct44o"); // gvrender_end_job(gvc->active_jobs); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ctg42qeu1yvs2g9r5wcv4zzrl // int gvFreeContext(GVC_t * gvc) public static Object gvFreeContext(Object... arg) { UNSUPPORTED("cdc5p7gur1o2qu1rfaiwrhdyj"); // int gvFreeContext(GVC_t * gvc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5hwchhks73n6p0p7iu2dhstho"); // GVG_t *gvg, *gvg_next; UNSUPPORTED("adwgvl59jz4qsr1d7xxq5rsng"); // gvplugin_package_t *package, *package_next; UNSUPPORTED("arvwlcmlxzvpwvk7s223e2w8"); // emit_once_reset(); UNSUPPORTED("eutrfc45t7pr7snzd0yrns61e"); // gvg_next = gvc->gvgs; UNSUPPORTED("egtqgis45r50r0vpmklawt86c"); // while ((gvg = gvg_next)) { UNSUPPORTED("een7xpunmqq9r51mgh694gxvi"); // gvg_next = gvg->next; UNSUPPORTED("4iv5fzitlc63rdpf954w6dbax"); // free(gvg); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("aemtpukkty8b8p02pq9n1pe12"); // package_next = gvc->packages; UNSUPPORTED("6bhwk4v49u06ll2918aiuelsp"); // while ((package = package_next)) { UNSUPPORTED("17d6nsylkka56jdgieafhw3cl"); // package_next = package->next; UNSUPPORTED("37qv8a4u1yiip7ecavr8qkzkm"); // free(package->path); UNSUPPORTED("7pxw8ghhb5xxlpdd1jv7osfhz"); // free(package->name); UNSUPPORTED("aimh83a3k7a6ayfix3ppi8nqx"); // free(package); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a9p7yonln7g91ge7xab3xf9dr"); // gvjobs_delete(gvc); UNSUPPORTED("7rlh9wuy2qrh0ehtb3gdalado"); // if (gvc->config_path) UNSUPPORTED("757mqdb4lingk1bymuktrnevh"); // free(gvc->config_path); UNSUPPORTED("85h1etabgqi4o3qi83c7cprtf"); // if (gvc->input_filenames) UNSUPPORTED("58u4di4bdc3xnuj9x373q03z"); // free(gvc->input_filenames); UNSUPPORTED("2wnuuoxkpo409qiqqaihby1z9"); // textfont_dict_close(gvc); UNSUPPORTED("beuj2gz4oz0esqo5psm1l653c"); // free(gvc); UNSUPPORTED("41ok9shf9o21b8omrjo4s42gl"); // return (graphviz_errors + agerrors()); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/gvc/gvdevice__c.java000066400000000000000000000653061312650303100216550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.gvc; import static smetana.core.Macro.UNSUPPORTED; public class gvdevice__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 eru7ktmd59gl3fcbs2oilhvbl // static const int PAGE_ALIGN = 4095 //3 2bgvvqltcp240iwsswb2msc4b // static size_t gvwrite_no_z (GVJ_t * job, const char *s, size_t len) public static Object gvwrite_no_z(Object... arg) { UNSUPPORTED("avituu19zqjw7jh9tfrcm2vaa"); // static size_t gvwrite_no_z (GVJ_t * job, const char *s, size_t len) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6thhrxbooxwjzs6lvh7tmii55"); // if (job->gvc->write_fn) /* externally provided write dicipline */ UNSUPPORTED("ajwhqhqyqpwentvna296wopdr"); // return (job->gvc->write_fn)(job, (char*)s, len); UNSUPPORTED("lih0ttredmrxsoz6mrlvzubo"); // if (job->output_data) { UNSUPPORTED("bnah2gb2ufomx7jjnzd97mbzm"); // if (len > job->output_data_allocated - (job->output_data_position + 1)) { UNSUPPORTED("3hrbwji40pio192kzij9cn7v1"); // /* ensure enough allocation for string = null terminator */ UNSUPPORTED("1ezdnr79jqff920zcjfu0ppqk"); // job->output_data_allocated = (job->output_data_position + len + 1 + PAGE_ALIGN) & ~PAGE_ALIGN; UNSUPPORTED("b67xdfs465mphgzhwe78lbfbu"); // job->output_data = realloc(job->output_data, job->output_data_allocated); UNSUPPORTED("4xh16lf1s9kh9dcfg8f9fkvfb"); // if (!job->output_data) { UNSUPPORTED("ec5pxlqld1kcgdncsj3us6t3s"); // (job->common->errorfn) ("memory allocation failure\n"); UNSUPPORTED("7ujm7da8xuut83e2rygja0n9d"); // exit(1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c02x4fbrjzoq9hakupjq645pz"); // memcpy(job->output_data + job->output_data_position, s, len); UNSUPPORTED("bmmkwdo5fdxd026lky22ivss6"); // job->output_data_position += len; UNSUPPORTED("9akolspkl84209r7uz2tjd6dd"); // job->output_data[job->output_data_position] = '\0'; /* keep null termnated */ UNSUPPORTED("38a44j47si8lvew9i7jutukn9"); // return len; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("8n04i1xqzj3xqxz7bhsek9vn7"); // return fwrite(s, sizeof(char), len, job->output_file); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cc376t4uiy6qsmjtdc2stei85 // static void auto_output_filename(GVJ_t *job) public static Object auto_output_filename(Object... arg) { UNSUPPORTED("7bmm5yx4a4rufskcsnxv6wl0z"); // static void auto_output_filename(GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8kywmm7f51dmrjngxwvnpsd4o"); // static char *buf; UNSUPPORTED("ej9a738oun75yfz0fwi5yrr5"); // static size_t bufsz; UNSUPPORTED("92ye5npa3uq0ky5glgy35w5sk"); // char gidx[100]; /* large enough for '.' plus any integer */ UNSUPPORTED("4qa1e25as4n8qmsddpuz660zr"); // char *fn, *p, *q; UNSUPPORTED("do481ti1ubw0ltflx52iweigu"); // size_t len; UNSUPPORTED("8siu0oojewru3x36pkpq3rtcm"); // if (job->graph_index) UNSUPPORTED("36vwk7ry5ee8fz8vvvxhsa53y"); // sprintf(gidx, ".%d", job->graph_index + 1); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("11rmpw063nwapibztle1uicb4"); // gidx[0] = '\0'; UNSUPPORTED("bdnmi5g7zugx6oqb8oim4qkk6"); // if (!(fn = job->input_filename)) UNSUPPORTED("1461mo4l6w379jk7almrmjggq"); // fn = "noname.gv"; UNSUPPORTED("eo5ffy7jun0ei6jtmk8u4kwo5"); // len = strlen(fn) /* typically "something.gv" */ UNSUPPORTED("1ujivh2ss3ln7xyoufm1icu1s"); // + strlen(gidx) /* "", ".2", ".3", ".4", ... */ UNSUPPORTED("kjjd1xhi7gp11bp4k1e57wxd"); // + 1 /* "." */ UNSUPPORTED("eygwbha2x1l4n5rzyomr2dbqz"); // + strlen(job->output_langname) /* e.g. "png" */ UNSUPPORTED("6smfmxycsc2mrvcsl6mrgi727"); // + 1; /* null terminaor */ UNSUPPORTED("55qowwh2rcv2v2uu70hde9ct4"); // if (bufsz < len) { UNSUPPORTED("12hyi8sdel7zfnt9c20av1tp8"); // bufsz = len + 10; UNSUPPORTED("7ms5jdr5m50uzo3lxyt1gq0cj"); // buf = realloc(buf, bufsz * sizeof(char)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3czlpsj98ep2bccpqdudm2bej"); // strcpy(buf, fn); UNSUPPORTED("5iz9z9zc85yv4b16sbx2lywny"); // strcat(buf, gidx); UNSUPPORTED("5uqzbiefai050ewcqnxnhzyd2"); // strcat(buf, "."); UNSUPPORTED("erqd7hdzmwkcvzz2s1bjfhgwr"); // p = strdup(job->output_langname); UNSUPPORTED("4n8ktnhzjg21hh167bu9kbvuh"); // while ((q = strrchr(p, ':'))) { UNSUPPORTED("18g9wxzxu3k31c0stdr62a2r6"); // strcat(buf, q+1); UNSUPPORTED("3d0me2fe34rtpbmdfbbp9zyvk"); // strcat(buf, "."); UNSUPPORTED("cxlp7boqg1gqp4ii26w29519a"); // *q = '\0'; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("94ysqimvfahimlahyh4amvdd8"); // strcat(buf, p); UNSUPPORTED("bo0y3vz195pcz24vm46pixpb2"); // free(p); UNSUPPORTED("eif3727zpcgrby865izuy2bam"); // job->output_filename = buf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9zdt3xvyjnxhf42eizyfy29ly // int gvdevice_initialize(GVJ_t * job) public static Object gvdevice_initialize(Object... arg) { UNSUPPORTED("2same1m1pu1ldefe93fodijcl"); // int gvdevice_initialize(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("44r8xaau6kv13q6liujnhwe0i"); // gvdevice_engine_t *gvde = job->device.engine; UNSUPPORTED("eyew5ay5wwktz4fysz0b78ugv"); // GVC_t *gvc = job->gvc; UNSUPPORTED("2p848auysctbpp02yxskwgoef"); // if (gvde && gvde->initialize) { UNSUPPORTED("3vrhe9vyw7wj2er55do0u371j"); // gvde->initialize(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8gs9pxngjqg7knaxiacx0x8tq"); // else if (job->output_data) { UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("359rwgnb349m83fzxkva3v46w"); // /* if the device has no initialization then it uses file output */ UNSUPPORTED("33oebivtpnjqlipt0pt25chff"); // else if (!job->output_file) { /* if not yet opened */ UNSUPPORTED("dp33ygrqgmzkpm08snkc1ervb"); // if (gvc->common.auto_outfile_names) UNSUPPORTED("e114zl89x5x9bx0p6tnctzh9z"); // auto_output_filename(job); UNSUPPORTED("a7zftzoyvxtzvya1m1b2ttg72"); // if (job->output_filename) { UNSUPPORTED("v1eei32rad2oq6s98de4ew05"); // job->output_file = fopen(job->output_filename, "w"); UNSUPPORTED("afw1ljocg5i7vzl6ghbj5joaq"); // if (job->output_file == (void *)0) { UNSUPPORTED("3kbjb2hiznrrr74oirsmjdsjy"); // (job->common->errorfn) ("Could not open \"%s\" for writing : %s\n", UNSUPPORTED("2lce20ttxmbpd5czpm6pd2mv6"); // job->output_filename, strerror(errno)); UNSUPPORTED("ef12rdptgkbtbbvkzn1djihki"); // /* perror(job->output_filename); */ UNSUPPORTED("6jf2l4v31jakvckptxdonjqpl"); // return(1); UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("35nw1pbiz2p3s6qwlam5eoo3m"); // else UNSUPPORTED("9c37ox95uc5viasrpewfi74ew"); // job->output_file = stdout; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("146f5u2dl3dt3devy0qnn6ylz"); // if (job->flags & (1<<10)) { UNSUPPORTED("98ow53mx94n2jxerk4g3xuyju"); // (job->common->errorfn) ("No libz support.\n"); UNSUPPORTED("atcj5la5r4ghvn5xk7kx25y7f"); // return(1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ajhncfer509k2pk55o2k8w9aw // size_t gvwrite (GVJ_t * job, const char *s, size_t len) public static Object gvwrite(Object... arg) { UNSUPPORTED("bwx5n843dguc728qqcypic3er"); // size_t gvwrite (GVJ_t * job, const char *s, size_t len) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cmn7vwsif1z0j2gjyq9v1u4pc"); // size_t ret, olen; UNSUPPORTED("bhgtpxgp12b1cvyt6ozbjx6yy"); // if (!len || !s) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("146f5u2dl3dt3devy0qnn6ylz"); // if (job->flags & (1<<10)) { UNSUPPORTED("98ow53mx94n2jxerk4g3xuyju"); // (job->common->errorfn) ("No libz support.\n"); UNSUPPORTED("dtw3cma0ziyha0w534bszl0tx"); // exit(1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8k95edr042llogz6nqedj70ic"); // else { /* uncompressed write */ UNSUPPORTED("3dfkzetcm152gosaspkplit3e"); // ret = gvwrite_no_z (job, s, len); UNSUPPORTED("couxfse3y39odtdvb0dsftko7"); // if (ret != len) { UNSUPPORTED("d5gw78oi8bl5tvl05pegfx7do"); // (job->common->errorfn) ("gvwrite_no_z problem %d\n", len); UNSUPPORTED("6f1y0d5qfp1r9zpw0r7m6xfb4"); // exit(1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ji4xmwppaalf0z5xzgfw9h36"); // return len; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 38q4ri7dsm0ur36bqkxqeeu6y // int gvferror (FILE* stream) public static Object gvferror(Object... arg) { UNSUPPORTED("bw6pcxpys8yj8g1611fjiq85f"); // int gvferror (FILE* stream) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3g3bthpqcv2dm7v2g4agrgksv"); // GVJ_t *job = (GVJ_t*)stream; UNSUPPORTED("e7b7ktlmv7bf41ah2uirp0wr4"); // if (!job->gvc->write_fn && !job->output_data) UNSUPPORTED("k1l61wmfzzg66hb7gu3ouzpe"); // return ferror(job->output_file); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ejkm659i2t9ni9abwvls81srg // size_t gvfwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream) public static Object gvfwrite(Object... arg) { UNSUPPORTED("9jmr6dp0tzh6pynfebkrgg0qu"); // size_t gvfwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2fw95dei1ujeec0ctcdy57c1x"); // assert(size = sizeof(char)); UNSUPPORTED("bnwpx03tbl086znf32xqomw8m"); // return gvwrite((GVJ_t*)stream, ptr, nmemb); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 baq4lnmy9b8h5r38t5kac1wfp // int gvputs(GVJ_t * job, const char *s) public static Object gvputs(Object... arg) { UNSUPPORTED("1p5e428gxaoorzh5qz00rfy0k"); // int gvputs(GVJ_t * job, const char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6sarrx22njzxoct1tqx2jnqwz"); // size_t len = strlen(s); UNSUPPORTED("ebjgxf9iw1qng39s9u5strvc4"); // if (gvwrite (job, s, len) != len) { UNSUPPORTED("5c6r4edgvaov4ot4iejbv50ew"); // return EOF; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("68vhwhq54lavtuaojheojvecm"); // return +1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dmzoqt3ukt72kvftmdjotritt // int gvputc(GVJ_t * job, int c) public static Object gvputc(Object... arg) { UNSUPPORTED("9mag55jpuhl60bjf9unj7xp92"); // int gvputc(GVJ_t * job, int c) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("79xkgu0m0ig0jh2o4v92li22p"); // const char cc = c; UNSUPPORTED("fkmtzb4a1u4ktyy2bnjez0jd"); // if (gvwrite (job, &cc, 1) != 1) { UNSUPPORTED("5c6r4edgvaov4ot4iejbv50ew"); // return EOF; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bskm24m9z4b23box60oxnymv"); // return c; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cv9w48stixnm7kbet4eftjadx // int gvflush (GVJ_t * job) public static Object gvflush(Object... arg) { UNSUPPORTED("5ckii4epkwj83v2nnt54ofh8d"); // int gvflush (GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f23odcxaxyzdd27mwuhiizdj4"); // if (job->output_file UNSUPPORTED("3bjid3e6jo6zuivokehya58qk"); // && ! job->external_context UNSUPPORTED("8z4jf2igc0co6dh6zx1110nbs"); // && ! job->gvc->write_fn) { UNSUPPORTED("5x7mdmw0x73vwxz61fk2yrvdm"); // return fflush(job->output_file); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 330e9khckra3n5ssrwak5tfea // static void gvdevice_close(GVJ_t * job) public static Object gvdevice_close(Object... arg) { UNSUPPORTED("1kd1owjv512h3o8vja7myre50"); // static void gvdevice_close(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1id7d9wccsfisc4cede1yqiu2"); // if (job->output_filename UNSUPPORTED("3d4zs0j1uyhbel5t3tudtwj7i"); // && job->output_file != stdout UNSUPPORTED("9q0a541k3fxrd3zi25ga414vc"); // && ! job->external_context) { UNSUPPORTED("cn3fn60ccz3zrmkt743v9paw1"); // if (job->output_file) { UNSUPPORTED("3hu3ukt7mqj5b5sj0atl2z0f3"); // fclose(job->output_file); UNSUPPORTED("80vq4s94ms6swfrhmfvi3b7w9"); // job->output_file = (void *)0; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("54nje7askf5ueua9t49ftz331"); // job->output_filename = (void *)0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b8iwpcj6eij03r64m0360e7qs // void gvdevice_format(GVJ_t * job) public static Object gvdevice_format(Object... arg) { UNSUPPORTED("6z5f8fkhpqc1bo4eeaxujv2lr"); // void gvdevice_format(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("44r8xaau6kv13q6liujnhwe0i"); // gvdevice_engine_t *gvde = job->device.engine; UNSUPPORTED("9ohvvtakp5ajym21rtdihk6v3"); // if (gvde && gvde->format) UNSUPPORTED("39cv29fv2w96rfomdzkfzjvyq"); // gvde->format(job); UNSUPPORTED("4jpzlipnntejeqtwox13wbkj6"); // gvflush (job); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 46sqk4d6tbspekxqa4h32d301 // void gvdevice_finalize(GVJ_t * job) public static Object gvdevice_finalize(Object... arg) { UNSUPPORTED("e4zp9r9c2a5l12d2tadisfxsi"); // void gvdevice_finalize(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("44r8xaau6kv13q6liujnhwe0i"); // gvdevice_engine_t *gvde = job->device.engine; UNSUPPORTED("2524ggmnv8w9jo35baux304v2"); // boolean finalized_p = 0; UNSUPPORTED("146f5u2dl3dt3devy0qnn6ylz"); // if (job->flags & (1<<10)) { UNSUPPORTED("crmqlvwk4eg6ed4abp1762kia"); // (job->common->errorfn) ("No libz support\n"); UNSUPPORTED("dtw3cma0ziyha0w534bszl0tx"); // exit(1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("79baddj51af049jts2lck9hor"); // if (gvde) { UNSUPPORTED("aw6mxvr3p8qyvr6ia2k3985n3"); // if (gvde->finalize) { UNSUPPORTED("3ey2j155dc6rd51zymyvmijuc"); // gvde->finalize(job); UNSUPPORTED("351335dca88m4t8cwizgrx480"); // finalized_p = (!(0)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7rzmcwo03kb19vozyklhbkc51"); // if (! finalized_p) { UNSUPPORTED("1gp40nfjzceqr97tmcdvl9pmp"); // /* if the device has no finalization then it uses file output */ UNSUPPORTED("f0b7hjoakoas2g2gn6tq5mmj"); // gvflush (job); UNSUPPORTED("18z7v2vnzihvtt5nnbj4q3vpo"); // gvdevice_close(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1egirdomc1btc6kjc3dgard3o // void gvprintf(GVJ_t * job, const char *format, ...) public static Object gvprintf(Object... arg) { UNSUPPORTED("6fhkk7sp6y4sbd7qnk0vy9c"); // void gvprintf(GVJ_t * job, const char *format, ...) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("do481ti1ubw0ltflx52iweigu"); // size_t len; UNSUPPORTED("6kugk1wk3bh66t9k1cisj3wws"); // va_list argp; UNSUPPORTED("dylk0k9c053zb6dp6be1l1vlz"); // char* bp = buf; UNSUPPORTED("6kwm594sixkxroywvqwfb048w"); // va_start(argp, format); UNSUPPORTED("35tuv43una070zfa0wiq1t98n"); // len = vsprintf((char *)buf, format, argp); UNSUPPORTED("9ndja25a5zuub02u8harxnr00"); // va_end(argp); UNSUPPORTED("2h330v6zn1h7y9gty8zh7alu6"); // gvwrite(job, bp, len); UNSUPPORTED("d89vwxhq1gwui8as32g4iyoqu"); // if (bp != buf) UNSUPPORTED("e2oio1w9ngi670q15wq9lrmhg"); // free (bp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 1x6fpuyldpyrhmc2wjnt9r3t5 // static double maxnegnum = -999999999999999.99 //1 8lsntfgdc1tpzcdl8okf4a3xl // static char maxnegnumstr[] = //3 alkcimcmn7kdav5dab3x68rin // static char * gvprintnum (size_t *len, double number) public static Object gvprintnum(Object... arg) { UNSUPPORTED("3sz3rah6s15fileyrygtyvsy4"); // static char * gvprintnum (size_t *len, double number) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4mh7wqzk1u55blr6bw1de1tu9"); // static char tmpbuf[sizeof(maxnegnumstr)]; /* buffer big enough for worst case */ UNSUPPORTED("6kv4u88wo0shex0a589kl7n3l"); // char *result = tmpbuf+sizeof(maxnegnumstr); /* init result to end of tmpbuf */ UNSUPPORTED("bryisyhf57o6i69bxu4ctbqn5"); // long int N; UNSUPPORTED("do2ytzai3ubppaq9z7gm00438"); // boolean showzeros, negative; UNSUPPORTED("9qzqrvquucu9whxj9cncldfww"); // int digit, i; UNSUPPORTED("9gsgfs2guis9c3c3oi57mxpq2"); // /* UNSUPPORTED("2xdl5tkxrstua20058b47xnir"); // number limited to a working range: maxnegnum >= n >= -maxnegnum UNSUPPORTED("c4rjwybrx6rdpn7mwcxhhdt39"); // N = number * DECPLACES_SCALE rounded towards zero, UNSUPPORTED("2p9kws9yqndurf6n81x7xull6"); // printing to buffer in reverse direction, UNSUPPORTED("7ewnrrb059kj4ko3zan8jdop3"); // printing "." after DECPLACES UNSUPPORTED("d35t12puy1knexzxrcyxbfpzj"); // suppressing trailing "0" and "." UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("3ivxbhh2hb2hdvn4pqede8m41"); // if (number < maxnegnum) { /* -ve limit */ UNSUPPORTED("ddh4m6vpzx2sr0pr1nvcd9c1t"); // *len = sizeof(maxnegnumstr)-1; /* len doesn't include terminator */ UNSUPPORTED("103x8qz3872e9w56yknxqpcn6"); // return maxnegnumstr;; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9txbbc6xpk58kk4py9kg3n19n"); // if (number > -maxnegnum) { /* +ve limit */ UNSUPPORTED("epuuqnbsnn45v3ldhyk2vcdr1"); // *len = sizeof(maxnegnumstr)-2; /* len doesn't include terminator or sign */ UNSUPPORTED("bsifggy4hjlok1u06o96n8wbn"); // return maxnegnumstr+1; /* +1 to skip the '-' sign */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dvimjkoyeydgr0k6m42r5slva"); // number *= 100; /* scale by DECPLACES_SCALE */ UNSUPPORTED("2d934k0h3vqdzcfu8c1eroycs"); // if (number < 0.0) /* round towards zero */ UNSUPPORTED("c5rejlqioi39lspbd8otnd6yi"); // N = number - 0.5; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("8j9oa3w53bozqg7s4ajlxsnts"); // N = number + 0.5; UNSUPPORTED("8qqpzh7dl5q2wsuc67kne6ply"); // if (N == 0) { /* special case for exactly 0 */ UNSUPPORTED("e6psxu2ksijx06nl6oyb12m0f"); // *len = 1; UNSUPPORTED("5l47ei1ksik36ffjsvqzl5yt6"); // return "0"; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("disxlfqxvj0f745ce20slp755"); // if ((negative = (N < 0))) /* avoid "-0" by testing rounded int */ UNSUPPORTED("nr08nn1obuklfiybvxp8gdik"); // N = -N; /* make number +ve */ UNSUPPORTED("wlrwbcx0owaybg2agqhp29n"); // showzeros = 0; /* don't print trailing zeros */ UNSUPPORTED("cikkkc06rloyghq0l2srb8vix"); // for (i = 2; N || i > 0; i--) { /* non zero remainder, UNSUPPORTED("23hzgib77z0odvb23kw58z50s"); // or still in fractional part */ UNSUPPORTED("mbh9mebm1pcpg3owc2q4v5xe"); // digit = N % 10; /* next least-significant digit */ UNSUPPORTED("dzqyilj008a4yb3o3xb49ycd2"); // N /= 10; UNSUPPORTED("dcdutieoro6hdlcma5oe5l944"); // if (digit || showzeros) { /* if digit is non-zero, UNSUPPORTED("2bm81grz43tgyhv4jyvdtmsxu"); // or if we are printing zeros */ UNSUPPORTED("dycrtr22pmd5lb4j8fj4yi49o"); // *--result = digit | '0'; /* convert digit to ascii */ UNSUPPORTED("4pqd87ba27akvu14kome4tjze"); // showzeros = (!(0)); /* from now on we must print zeros */ UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("akn9rdzphyrql4nu286ezauux"); // if (i == 1) { /* if completed fractional part */ UNSUPPORTED("c98gv4lvkslivtou8sp5gjgv5"); // if (showzeros) /* if there was a non-zero fraction */ UNSUPPORTED("4e396qblfhvqsvgrwhjm4ucsw"); // *--result = '.'; /* print decimal point */ UNSUPPORTED("byd8n8dae1hujyrmzmt6sl0a6"); // showzeros = (!(0)); /* print all digits in int part */ UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c1bnjfpib859s8q27bm1enmy3"); // if (negative) /* print "-" if needed */ UNSUPPORTED("cttlmjpav2o8r87erigjvs5ss"); // *--result = '-'; UNSUPPORTED("do3t8frc2ui33ozznu6u8jfyd"); // *len = tmpbuf+sizeof(maxnegnumstr) - result; UNSUPPORTED("coko8du03f3lw8bdkapbks750"); // return result; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bmeyiwkpu2qs7dejvs5sh6o8v // void gvprintdouble(GVJ_t * job, double num) public static Object gvprintdouble(Object... arg) { UNSUPPORTED("cn6ds26lgsd3ujjqzrqcox1x5"); // void gvprintdouble(GVJ_t * job, double num) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6ik3p99apk5rihypipg0uxu8i"); // char *buf; UNSUPPORTED("do481ti1ubw0ltflx52iweigu"); // size_t len; UNSUPPORTED("8yb00gp3xzh6a9lvd5mwcrg08"); // buf = gvprintnum(&len, num); UNSUPPORTED("56nuv66m5jb3tmogpfyb3w2e9"); // gvwrite(job, buf, len); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5duaexp4igxjoostpe3eattxa // void gvprintpointf(GVJ_t * job, pointf p) public static Object gvprintpointf(Object... arg) { UNSUPPORTED("ctyuokdenka2j9jhskd3ql9px"); // void gvprintpointf(GVJ_t * job, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6ik3p99apk5rihypipg0uxu8i"); // char *buf; UNSUPPORTED("do481ti1ubw0ltflx52iweigu"); // size_t len; UNSUPPORTED("1gpnnoam3bzp9eo5m7opks45t"); // buf = gvprintnum(&len, p.x); UNSUPPORTED("56nuv66m5jb3tmogpfyb3w2e9"); // gvwrite(job, buf, len); UNSUPPORTED("4t98op6wrpqegev92jt8qeuma"); // gvwrite(job, " ", 1); UNSUPPORTED("2lggxf5etbmynuok5wquoc4h1"); // buf = gvprintnum(&len, p.y); UNSUPPORTED("56nuv66m5jb3tmogpfyb3w2e9"); // gvwrite(job, buf, len); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9mtarrxfoqaaz8anygvcs0eni // void gvprintpointflist(GVJ_t * job, pointf *p, int n) public static Object gvprintpointflist(Object... arg) { UNSUPPORTED("bbdhtxxtsiyz2al9t7saa9yqh"); // void gvprintpointflist(GVJ_t * job, pointf *p, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7s165b75za7edl3pgyc01kxis"); // int i = 0; UNSUPPORTED("5owjshc6gmd9o9lmekzcl6rvg"); // while ((!(0))) { UNSUPPORTED("5xxbbxkf0cife9hhrjjzgkvjt"); // gvprintpointf(job, p[i]); UNSUPPORTED("e8aux6mfyxrmvk370dq1a2tt9"); // if (++i >= n) break; UNSUPPORTED("1rgsln2lih3ohh497shfjlgye"); // gvwrite(job, " ", 1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/gvc/gvevent__c.java000066400000000000000000001330021312650303100215240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.gvc; import static smetana.core.Macro.UNSUPPORTED; public class gvevent__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 a81i1bteklxko8gquxchac0x8 // static char *s_digraph = //1 dgsqnb0c5b6pm90dh3pmafwo1 // static char *s_graph = //1 49ytazp10pvtr6nmtx9h5jkr4 // static char *s_subgraph = //1 49rjw4ovuqev4ekbir1njgrg3 // static char *s_node = //1 exvb7xidqhdzk58w9bccovd1s // static char *s_edge = //1 6b5ql2pwr2ula2263lt2fw60j // static char *s_tooltip = //1 e8yh8l7wzzyhpxv1fk7mdnri1 // static char *s_href = //1 c37wnv95zfw9hla1px6mp8c8v // static char *s_URL = //1 9ihbjjrb6baxg03ds8e7dqyeu // static char *s_tailport = //1 8vucxsazfgxu7fsgq699pfgwb // static char *s_headport = //1 4vtu2e7ieao83dief8qy6vy1o // static char *s_key = //3 4u7xeq4u9gjav5v1ds6xt32a7 // static void gv_graph_state(GVJ_t *job, graph_t *g) public static Object gv_graph_state(Object... arg) { UNSUPPORTED("qi2r1zf56fhta95dbdc4uqh7"); // static void gv_graph_state(GVJ_t *job, graph_t *g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2bs0wcp6367dz1o5x166ec7l8"); // int j; UNSUPPORTED("6fh2f49mjcser5usqcg36hkjn"); // Agsym_t *a; UNSUPPORTED("d9khxorqmza778g5yq0oti4m9"); // gv_argvlist_t *list; UNSUPPORTED("dffw7bunufdqdcx3vwbsa36uq"); // list = &(job->selected_obj_type_name); UNSUPPORTED("1khyaul8b149n1iaylpif58pr"); // j = 0; UNSUPPORTED("ackx3cor82a94trjk4owh3083"); // if (g == agroot(g)) { UNSUPPORTED("e7utna7qhqjns0cncypyq6ypu"); // if (agisdirected(g)) UNSUPPORTED("325cc23s82vex998qq2zet30n"); // gv_argvlist_set_item(list, j++, s_digraph); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("4iceu5v0jkso1pfbd8cptcm26"); // gv_argvlist_set_item(list, j++, s_graph); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("8wbgd0tpi9vafdu305mh891pm"); // gv_argvlist_set_item(list, j++, s_subgraph); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e3m8xakuuoavpc0yzsdz0ttbf"); // gv_argvlist_set_item(list, j++, agnameof(g)); UNSUPPORTED("2g9vk1xhep19zd9rw2ptwgf0n"); // list->argc = j; UNSUPPORTED("d089fe3vpvfvcq6nx8i2de8za"); // list = &(job->selected_obj_attributes); UNSUPPORTED("e1417dqpw5biex3lmgeebcz3z"); // a = NULL; UNSUPPORTED("b7p49ht5isujlq1r0zeqn522z"); // while ((a = agnxtattr(g, AGRAPH, a))) { UNSUPPORTED("99t26p59tgmrccdh9d222241q"); // gv_argvlist_set_item(list, j++, a->name); UNSUPPORTED("cd5io6q45mx69v63k1okoerbk"); // gv_argvlist_set_item(list, j++, agxget(g, a)); UNSUPPORTED("1ji9sink8yrqbo5f75etmnjvw"); // gv_argvlist_set_item(list, j++, (char*)GVATTR_STRING); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2g9vk1xhep19zd9rw2ptwgf0n"); // list->argc = j; UNSUPPORTED("9bqz6abzufgggy4kgl58ohww2"); // a = (agattr(g,AGRAPH,s_href,NULL)); UNSUPPORTED("ad7g9pfuiyqph0mif8l1dkp14"); // if (!a) UNSUPPORTED("31vhl15c44ic03bkyj4plz9tc"); // a = (agattr(g,AGRAPH,s_URL,NULL)); UNSUPPORTED("d0iv30h00si3pq8x1pcdz16i4"); // if (a) UNSUPPORTED("19box3udlik0aynca1mdbgli1"); // job->selected_href = strdup_and_subst_obj(agxget(g, a), (void*)g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1tqun4sawrqin1i1cpsek6xis // static void gv_node_state(GVJ_t *job, node_t *n) public static Object gv_node_state(Object... arg) { UNSUPPORTED("a6a2p7o7hjze8ck9u2wsgbhnz"); // static void gv_node_state(GVJ_t *job, node_t *n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2bs0wcp6367dz1o5x166ec7l8"); // int j; UNSUPPORTED("6fh2f49mjcser5usqcg36hkjn"); // Agsym_t *a; UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("d9khxorqmza778g5yq0oti4m9"); // gv_argvlist_t *list; UNSUPPORTED("dffw7bunufdqdcx3vwbsa36uq"); // list = &(job->selected_obj_type_name); UNSUPPORTED("1khyaul8b149n1iaylpif58pr"); // j = 0; UNSUPPORTED("av2271m76wgi05dd4jp9ko29m"); // gv_argvlist_set_item(list, j++, s_node); UNSUPPORTED("32mps9ctk2avgj3psm456ch9c"); // gv_argvlist_set_item(list, j++, agnameof(n)); UNSUPPORTED("2g9vk1xhep19zd9rw2ptwgf0n"); // list->argc = j; UNSUPPORTED("d089fe3vpvfvcq6nx8i2de8za"); // list = &(job->selected_obj_attributes); UNSUPPORTED("5c0nzsud433f31yaxkbl4z4gs"); // g = agroot(agraphof(n)); UNSUPPORTED("e1417dqpw5biex3lmgeebcz3z"); // a = NULL; UNSUPPORTED("b1vxpowujnp7icf7z1f5ys6fn"); // while ((a = agnxtattr(g, AGNODE, a))) { UNSUPPORTED("99t26p59tgmrccdh9d222241q"); // gv_argvlist_set_item(list, j++, a->name); UNSUPPORTED("bxew0xo3hzemjvs8jsh4vd1fe"); // gv_argvlist_set_item(list, j++, agxget(n, a)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2g9vk1xhep19zd9rw2ptwgf0n"); // list->argc = j; UNSUPPORTED("cop3693r14mtc5cxtwlnfobn7"); // a = (agattr(agraphof(n),AGNODE,s_href,NULL)); UNSUPPORTED("ad7g9pfuiyqph0mif8l1dkp14"); // if (!a) UNSUPPORTED("9vhpq0kaqba5axovooitmksjj"); // a = (agattr(agraphof(n),AGNODE,s_URL,NULL)); UNSUPPORTED("d0iv30h00si3pq8x1pcdz16i4"); // if (a) UNSUPPORTED("17hpyw5vd28ys378heoyue1al"); // job->selected_href = strdup_and_subst_obj(agxget(n, a), (void*)n); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ermyhp9u235dyyeyqapv0xkc7 // static void gv_edge_state(GVJ_t *job, edge_t *e) public static Object gv_edge_state(Object... arg) { UNSUPPORTED("bd6orj26b0p27h7kfbrazb9io"); // static void gv_edge_state(GVJ_t *job, edge_t *e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2bs0wcp6367dz1o5x166ec7l8"); // int j; UNSUPPORTED("6fh2f49mjcser5usqcg36hkjn"); // Agsym_t *a; UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("4t73a9bkotedn8x3fxn53j1km"); // gv_argvlist_t *nlist, *alist; UNSUPPORTED("43j7ne9o1w0oq59jkh0ogpfi8"); // nlist = &(job->selected_obj_type_name); UNSUPPORTED("bvhhwpgurwsvqf00mufgp5jei"); // /* only tail, head, and key are strictly identifying properties, UNSUPPORTED("87w6733styjgjzh7edfba0cpw"); // * but we commonly alse use edge kind (e.g. "->") and tailport,headport UNSUPPORTED("ez2eakrubjtgnn4onqt5ah5mo"); // * in edge names */ UNSUPPORTED("1khyaul8b149n1iaylpif58pr"); // j = 0; UNSUPPORTED("231pmh9ndbj9bl0iq4dwm34ad"); // gv_argvlist_set_item(nlist, j++, s_edge); UNSUPPORTED("cj85zmjfg6vwon6ebadi1utxi"); // gv_argvlist_set_item(nlist, j++, agnameof(agtail(e))); UNSUPPORTED("6gfg10q9wfhddmrxtfaijxc6e"); // j++; /* skip tailport slot for now */ UNSUPPORTED("ab8kmscdvmhs0oz9laxreinrs"); // gv_argvlist_set_item(nlist, j++, agisdirected(agraphof(agtail(e)))?"->":"--"); UNSUPPORTED("3r7da1j0hfzm49kscuyu25bjw"); // gv_argvlist_set_item(nlist, j++, agnameof(aghead(e))); UNSUPPORTED("48ci0f2hgcb9fxqoqhqhvtur0"); // j++; /* skip headport slot for now */ UNSUPPORTED("bu93gjys845yepca55pifkr30"); // j++; /* skip key slot for now */ UNSUPPORTED("227buoijhb0gn22caje4pxv9e"); // nlist->argc = j; UNSUPPORTED("636g3h756buq2y5ye5swbaq80"); // alist = &(job->selected_obj_attributes); UNSUPPORTED("43dcim6z0v0a251vkqsnqej3q"); // g = agroot(agraphof(aghead(e))); UNSUPPORTED("e1417dqpw5biex3lmgeebcz3z"); // a = NULL; UNSUPPORTED("33gb50lyoy7ck2t6qrjkyzo7u"); // while ((a = agnxtattr(g, AGEDGE, a))) { UNSUPPORTED("706s3vyqe37ps1epbb4kq2zg2"); // /* tailport and headport can be shown as part of the name, but they UNSUPPORTED("ae0evldnekm3vq9oe8m0lnt3w"); // * are not identifying properties of the edge so we UNSUPPORTED("1ebad5w1kcs91baie24l37lr3"); // * also list them as modifyable attributes. */ UNSUPPORTED("9kgmn2eeefbu32xw5r0wyockk"); // if (strcmp(a->name,s_tailport) == 0) UNSUPPORTED("69icrfew1qyyma8r8q0sjvcw5"); // gv_argvlist_set_item(nlist, 2, agxget(e, a)); UNSUPPORTED("24i31ghgq3gjhdby4wkzz5zx1"); // else if (strcmp(a->name,s_headport) == 0) UNSUPPORTED("1ylpsr67giqnbh13nsgrwy1a0"); // gv_argvlist_set_item(nlist, 5, agxget(e, a)); UNSUPPORTED("7fflw2yp36ncnjh65hgmcnc2i"); // /* key is strictly an identifying property to distinguish multiple UNSUPPORTED("9hs0myrjsg7n4p9jmyl0r5r7p"); // * edges between the same node pair. Its non-writable, so UNSUPPORTED("3043zukc6eme3vgtc3vm1rkev"); // * no need to list it as an attribute as well. */ UNSUPPORTED("5kvauax0vbqn56b0t22oh5xd6"); // else if (strcmp(a->name,s_key) == 0) { UNSUPPORTED("e8n9jcj9q9h0mq4h3bb6p979i"); // gv_argvlist_set_item(nlist, 6, agxget(e, a)); UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("crs1h0cch6rim4e1iixiii9jq"); // gv_argvlist_set_item(alist, j++, a->name); UNSUPPORTED("azjfqodmy73s2zkayx9j4sj8j"); // gv_argvlist_set_item(alist, j++, agxget(e, a)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3jw4ujbxwhc57nozkshgx5rxt"); // alist->argc = j; UNSUPPORTED("486bp2rr3wk0zelkdw41tofx1"); // a = (agattr(agraphof(aghead(e)),AGEDGE,s_href,NULL)); UNSUPPORTED("ad7g9pfuiyqph0mif8l1dkp14"); // if (!a) UNSUPPORTED("99c3vwky3ugp7vv44mkpscky1"); // a = (agattr(agraphof(aghead(e)),AGEDGE,s_URL,NULL)); UNSUPPORTED("d0iv30h00si3pq8x1pcdz16i4"); // if (a) UNSUPPORTED("8egqarzi4ta3gz1dcxesfrghx"); // job->selected_href = strdup_and_subst_obj(agxget(e, a), (void*)e); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8ukey801l8kyj584x8r8s19fn // static void gvevent_refresh(GVJ_t * job) public static Object gvevent_refresh(Object... arg) { UNSUPPORTED("60f7iu3hlagh8mzyzi1gzv2do"); // static void gvevent_refresh(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("budkdxy4ehaaoj6mevg8mts0k"); // graph_t *g = job->gvc->g; UNSUPPORTED("5imw9vxmcslbvur5jcmeiu666"); // if (!job->selected_obj) { UNSUPPORTED("azy0m0vmtvbtf9smncd59ni1f"); // job->selected_obj = g; UNSUPPORTED("17j63u144fs4ppk3srq2ksaq4"); // GD_gui_state(g) |= (1<<1); UNSUPPORTED("1jgisizs53om7ychvjg7vpfyh"); // gv_graph_state(job, g); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("11vg0v0lz31me44yr8gzuq1ig"); // emit_graph(job, g); UNSUPPORTED("avsp09o6v1ddidlj3obkxmudm"); // job->has_been_rendered = NOT(0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4s1y5j1ypefa3r6swg9s4epez // static graph_t *gvevent_find_cluster(graph_t *g, boxf b) public static Object gvevent_find_cluster(Object... arg) { UNSUPPORTED("efgiax9xi0giix6ubrt3ygjvi"); // static graph_t *gvevent_find_cluster(graph_t *g, boxf b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("5wyi0wasd5kecf6rhsqdjk7v2"); // graph_t *sg; UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("7naa6f8pevjidfr7m41eli6xj"); // for (i = 1; i <= GD_n_cluster(g); i++) { UNSUPPORTED("4qqwxfj8r5wlw1qefrqdy0n93"); // sg = gvevent_find_cluster(GD_clust(g)[i], b); UNSUPPORTED("7dfwj1tgop4l8xzqfh1vpckki"); // if (sg) UNSUPPORTED("3e86a95m950jzhe4zgu9hyh49"); // return(sg); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3mns1dvab55ltos5d414fxujy"); // B2BF(GD_bb(g), bb); UNSUPPORTED("9o2ymndf5rcl0lrzb3mpd7bjg"); // if (OVERLAP(b, bb)) UNSUPPORTED("4s6kjfhn4k2eg7whh6ebugifg"); // return g; UNSUPPORTED("o68dp934ebg4cplebgc5hv4v"); // return NULL; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 10ow7fob9ddjkodlmx7wb3vlm // static void * gvevent_find_obj(graph_t *g, boxf b) public static Object gvevent_find_obj(Object... arg) { UNSUPPORTED("3kn145oul66bpk12w0lrsexgk"); // static void * gvevent_find_obj(graph_t *g, boxf b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5wyi0wasd5kecf6rhsqdjk7v2"); // graph_t *sg; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("7pal7ga4vmcz68u4ug0hj2sdc"); // /* edges might overlap nodes, so search them first */ UNSUPPORTED("16hw9gw0dz2w7mrtba0eoqrdi"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("8gbd6b2ssf51om8neirzzr6rw"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) UNSUPPORTED("eho7nl2fpak2f3plplt40xxj"); // if (overlap_edge(e, b)) UNSUPPORTED("dwep52v1bdkluympomyk9i0ht"); // return (void *)e; UNSUPPORTED("espt12fa1hnstulykcqj7naca"); // /* search graph backwards to get topmost node, in case of overlap */ UNSUPPORTED("27f2ji1mu3qyl3byjq0qs4vd2"); // for (n = aglstnode(g); n; n = agprvnode(g, n)) UNSUPPORTED("3zwvpzb0u2yuv8hrgr513spuw"); // if (overlap_node(n, b)) UNSUPPORTED("dzrsq580bfkcuikl48wyapfj9"); // return (void *)n; UNSUPPORTED("3si0g6jo8cy92kb3olhbz5yjm"); // /* search for innermost cluster */ UNSUPPORTED("7fupgm5yrt8w31ak393pj40fl"); // sg = gvevent_find_cluster(g, b); UNSUPPORTED("apxupu23wl3o8oxx7pkbsgpky"); // if (sg) UNSUPPORTED("34r930zbeg8mvb169774t3vbs"); // return (void *)sg; UNSUPPORTED("4qfi0cgg83t97134rn90jaq0u"); // /* otherwise - we're always in the graph */ UNSUPPORTED("avkvcekelud44sahe2wnjjpp4"); // return (void *)g; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5b9dwyqfdvc0ntrai28ti5pry // static void gvevent_leave_obj(GVJ_t * job) public static Object gvevent_leave_obj(Object... arg) { UNSUPPORTED("2udbvguh4g3rx7hlo1neqvx58"); // static void gvevent_leave_obj(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7fhlvhrelhp8czzhodjpv852t"); // void *obj = job->current_obj; UNSUPPORTED("41wzimn2d65vativ6f19m0scl"); // if (obj) { UNSUPPORTED("bo62maae4sou42p2mt2qkourh"); // switch (agobjkind(obj)) { UNSUPPORTED("5wlxto4vyt8ldlvedarc2ayo5"); // case AGRAPH: UNSUPPORTED("92q8wsc5f6zpyree4vbax8cgz"); // GD_gui_state((graph_t*)obj) &= ~(1<<0); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("9pxpc0v20pz0zlioyzyi3liz"); // case AGNODE: UNSUPPORTED("cvmmjonbzluiek0tgu10677br"); // ND_gui_state((node_t*)obj) &= ~(1<<0); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("64ioinqgxud7s90lisfnn9l9z"); // case AGEDGE: UNSUPPORTED("1vtuqgfc8o6ssdm54seohnhgz"); // ED_gui_state((edge_t*)obj) &= ~(1<<0); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9xg2rumuo2tlvz2ggq2nk8yxt"); // job->active_tooltip = NULL; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9bgq52z2yvkxbxgkigzxo155j // static void gvevent_enter_obj(GVJ_t * job) public static Object gvevent_enter_obj(Object... arg) { UNSUPPORTED("1j8b2x22wexvd0rg7rsvrcvdc"); // static void gvevent_enter_obj(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e5pb9fhb9rq54eedma7yjmh4k"); // void *obj; UNSUPPORTED("djl3ek9tn11htu3vj4zglczzz"); // graph_t *g; UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("6fh2f49mjcser5usqcg36hkjn"); // Agsym_t *a; UNSUPPORTED("d85592gsof8mrrwh92c43cs7f"); // if (job->active_tooltip) { UNSUPPORTED("84wfl59jqbmf5pil5wayrrn6v"); // free(job->active_tooltip); UNSUPPORTED("52xuc6ug71hj23vrl2dg6e69x"); // job->active_tooltip = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4wr2gujkr9cuqpfogwyvtl6ve"); // obj = job->current_obj; UNSUPPORTED("41wzimn2d65vativ6f19m0scl"); // if (obj) { UNSUPPORTED("bo62maae4sou42p2mt2qkourh"); // switch (agobjkind(obj)) { UNSUPPORTED("5wlxto4vyt8ldlvedarc2ayo5"); // case AGRAPH: UNSUPPORTED("5ww62hqfywcpculirwqpvugv4"); // g = (graph_t*)obj; UNSUPPORTED("5kvw2y807unke5dvr69a1cxtt"); // GD_gui_state(g) |= (1<<0); UNSUPPORTED("am1gx79uny2n1upipes6lycqc"); // a = (agattr(g,AGRAPH,s_tooltip,NULL)); UNSUPPORTED("9qz40i0064xica1x2lm4xs62b"); // if (a) UNSUPPORTED("86bd5sstgfox932dk4j5ctawx"); // job->active_tooltip = strdup_and_subst_obj(agxget(g, a), obj); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("9pxpc0v20pz0zlioyzyi3liz"); // case AGNODE: UNSUPPORTED("68c51l5dq12wn0ye4kkxvxvli"); // n = (node_t*)obj; UNSUPPORTED("3o0b9nkrxqjsirceenjg84yhu"); // ND_gui_state(n) |= (1<<0); UNSUPPORTED("3dqzz9izp2l3j72cm22vxnxz3"); // a = (agattr(agraphof(n),AGNODE,s_tooltip,NULL)); UNSUPPORTED("9qz40i0064xica1x2lm4xs62b"); // if (a) UNSUPPORTED("192ludujzp8wewqginadgo6sh"); // job->active_tooltip = strdup_and_subst_obj(agxget(n, a), obj); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("64ioinqgxud7s90lisfnn9l9z"); // case AGEDGE: UNSUPPORTED("1sfsn5gjybpvn8ecor2j6ia72"); // e = (edge_t*)obj; UNSUPPORTED("5a5lk7ama2h4rs90rp4md4ive"); // ED_gui_state(e) |= (1<<0); UNSUPPORTED("a83370r56wwtq6yvlqqz4x6mg"); // a = (agattr(agraphof(aghead(e)),AGEDGE,s_tooltip,NULL)); UNSUPPORTED("9qz40i0064xica1x2lm4xs62b"); // if (a) UNSUPPORTED("4ib9lz9n3e9d9ruzlftax0tze"); // job->active_tooltip = strdup_and_subst_obj(agxget(e, a), obj); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3bfngnj00p5wmq3vn6ezfbf94 // static pointf pointer2graph (GVJ_t *job, pointf pointer) public static Object pointer2graph(Object... arg) { UNSUPPORTED("f3p1sbwml36d6avt439q10bzv"); // static pointf pointer2graph (GVJ_t *job, pointf pointer) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("7hiilb9xpwzl7zzlvutjvty6v"); // /* transform position in device units to position in graph units */ UNSUPPORTED("3h1yo631e2fq69mxwoggya716"); // if (job->rotation) { UNSUPPORTED("30ofcuacpdvu0ywex5uyutuzj"); // p.x = pointer.y / (job->zoom * job->devscale.y) - job->translation.x; UNSUPPORTED("1fl2nifv1w54jg4mkvhzqy622"); // p.y = -pointer.x / (job->zoom * job->devscale.x) - job->translation.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("6g5n8h3dlw9ip1cdkdazows22"); // p.x = pointer.x / (job->zoom * job->devscale.x) - job->translation.x; UNSUPPORTED("as5nwpslv0m20j4m91fxdn7qn"); // p.y = pointer.y / (job->zoom * job->devscale.y) - job->translation.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("91xduilalb406jjyw2g1i07th"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 60qzqk2f8g5r608jr61n4m8fl // static void gvevent_find_current_obj(GVJ_t * job, pointf pointer) public static Object gvevent_find_current_obj(Object... arg) { UNSUPPORTED("73itu563p91qxc75le40uri3v"); // static void gvevent_find_current_obj(GVJ_t * job, pointf pointer) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e5pb9fhb9rq54eedma7yjmh4k"); // void *obj; UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("bn82a8um6s6q9kv8xhz0y4532"); // double closeenough; UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("e90p0pfjf8awf9o8saz5zeg1p"); // p = pointer2graph (job, pointer); UNSUPPORTED("4yw8v5qer8c35skrnab7qvzar"); // /* convert window point to graph coordinates */ UNSUPPORTED("ed3b1vw5anajzc04hkpj8tpln"); // closeenough = 1 / job->zoom; UNSUPPORTED("2jwwft3e122mczo9voml0jvyj"); // b.UR.x = p.x + closeenough; UNSUPPORTED("evkhbbm8g1x40j4cz0d3v7prs"); // b.UR.y = p.y + closeenough; UNSUPPORTED("68oj02o1giw3jceus44ixnxm8"); // b.LL.x = p.x - closeenough; UNSUPPORTED("e9aorl9o9qnkn8mfdfzpzy60t"); // b.LL.y = p.y - closeenough; UNSUPPORTED("ayptl6u6apxfce7alpeck5smt"); // obj = gvevent_find_obj(job->gvc->g, b); UNSUPPORTED("3owfawe3qbxrv9mxsn7fkyqpv"); // if (obj != job->current_obj) { UNSUPPORTED("90lan2ouldugywinbb3grjf3x"); // gvevent_leave_obj(job); UNSUPPORTED("bh8osiivcr3uzxhjf46i0mpfu"); // job->current_obj = obj; UNSUPPORTED("5ppo0fv5d3bhkhkyc2nh1llwq"); // gvevent_enter_obj(job); UNSUPPORTED("8so9jtnfbj4rh32qoan7atzqd"); // job->needs_refresh = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 56do4vqpnbnmg3ft0lfzt4eny // static void gvevent_select_current_obj(GVJ_t * job) public static Object gvevent_select_current_obj(Object... arg) { UNSUPPORTED("d4h54hfakl4a6svzusjuvsqkx"); // static void gvevent_select_current_obj(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e5pb9fhb9rq54eedma7yjmh4k"); // void *obj; UNSUPPORTED("d5fzsj1jcer8417dmj6ucf9js"); // obj = job->selected_obj; UNSUPPORTED("41wzimn2d65vativ6f19m0scl"); // if (obj) { UNSUPPORTED("bo62maae4sou42p2mt2qkourh"); // switch (agobjkind(obj)) { UNSUPPORTED("5wlxto4vyt8ldlvedarc2ayo5"); // case AGRAPH: UNSUPPORTED("1i9nwrkfuqhgca5dxmsumixwr"); // GD_gui_state((graph_t*)obj) |= (1<<2); UNSUPPORTED("79uerqxetp1ko0aj4yetyj0y3"); // GD_gui_state((graph_t*)obj) &= ~(1<<1); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("9pxpc0v20pz0zlioyzyi3liz"); // case AGNODE: UNSUPPORTED("5ot4q2aa7yyy1g83h7bv9udsb"); // ND_gui_state((node_t*)obj) |= (1<<2); UNSUPPORTED("48546mtoje2ca7wf2x0uvej8v"); // ND_gui_state((node_t*)obj) &= ~(1<<1); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("64ioinqgxud7s90lisfnn9l9z"); // case AGEDGE: UNSUPPORTED("apwapkeiw3ich5muguhdwqg6l"); // ED_gui_state((edge_t*)obj) |= (1<<2); UNSUPPORTED("e4zgcxcfg2dgy09byo2wzrauh"); // ED_gui_state((edge_t*)obj) &= ~(1<<1); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b63ukicafdpen83mpxp42b9ha"); // if (job->selected_href) { UNSUPPORTED("8vjgoeh45krs5nlc431jkmoc5"); // free(job->selected_href); UNSUPPORTED("uxywfn5fme945tooe7ybes33"); // job->selected_href = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("82ds4to6mlgnz1hudzp8txutz"); // obj = job->selected_obj = job->current_obj; UNSUPPORTED("41wzimn2d65vativ6f19m0scl"); // if (obj) { UNSUPPORTED("bo62maae4sou42p2mt2qkourh"); // switch (agobjkind(obj)) { UNSUPPORTED("5wlxto4vyt8ldlvedarc2ayo5"); // case AGRAPH: UNSUPPORTED("dgh6iielec5vwkfe73s6dl0dm"); // GD_gui_state((graph_t*)obj) |= (1<<1); UNSUPPORTED("92cql7151gbg5s7txp1qtzxcr"); // gv_graph_state(job, (graph_t*)obj); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("9pxpc0v20pz0zlioyzyi3liz"); // case AGNODE: UNSUPPORTED("4o58dr1al4d1df95cudpf50va"); // ND_gui_state((node_t*)obj) |= (1<<1); UNSUPPORTED("asc1h0xpooldmbd3qr3egpi4t"); // gv_node_state(job, (node_t*)obj); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("64ioinqgxud7s90lisfnn9l9z"); // case AGEDGE: UNSUPPORTED("8sqrwwvrd8cd3xhgq8jenn5uy"); // ED_gui_state((edge_t*)obj) |= (1<<1); UNSUPPORTED("burs8yypr2qjea6o5p2afz6su"); // gv_edge_state(job, (edge_t*)obj); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ex60hox8s3z8id5zo7lak7xbi // static void gvevent_button_press(GVJ_t * job, int button, pointf pointer) public static Object gvevent_button_press(Object... arg) { UNSUPPORTED("b9kw1b3m8gqabvmmm2gedhmms"); // static void gvevent_button_press(GVJ_t * job, int button, pointf pointer) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3zcgccimpfphalnj0i8mfm2r1"); // switch (button) { UNSUPPORTED("699cb0yxkg370qhog523g9x8z"); // case 1: /* select / create in edit mode */ UNSUPPORTED("75lxnhkp5b7e2lfc5y4rxj1fq"); // gvevent_find_current_obj(job, pointer); UNSUPPORTED("cyd579rit2exwz1a7b71163t3"); // gvevent_select_current_obj(job); UNSUPPORTED("3a8qzflnwqfg82zo20c4zvmkt"); // job->click = 1; UNSUPPORTED("blmcsrkt74letf8tkc2ccm4f7"); // job->button = button; UNSUPPORTED("8so9jtnfbj4rh32qoan7atzqd"); // job->needs_refresh = 1; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("4oz4gni7lyi54dde4wm3uz8a7"); // case 2: /* pan */ UNSUPPORTED("3a8qzflnwqfg82zo20c4zvmkt"); // job->click = 1; UNSUPPORTED("blmcsrkt74letf8tkc2ccm4f7"); // job->button = button; UNSUPPORTED("8so9jtnfbj4rh32qoan7atzqd"); // job->needs_refresh = 1; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3k03pmr90eomik84zdhdrti3s"); // case 3: /* insert node or edge */ UNSUPPORTED("75lxnhkp5b7e2lfc5y4rxj1fq"); // gvevent_find_current_obj(job, pointer); UNSUPPORTED("3a8qzflnwqfg82zo20c4zvmkt"); // job->click = 1; UNSUPPORTED("blmcsrkt74letf8tkc2ccm4f7"); // job->button = button; UNSUPPORTED("8so9jtnfbj4rh32qoan7atzqd"); // job->needs_refresh = 1; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("7gwyze795m9aa2915n3bou49x"); // case 4: UNSUPPORTED("2ml1iwm44d5cxsqng95pnixi1"); // /* scrollwheel zoom in at current mouse x,y */ UNSUPPORTED("4vad6btam4cn6noqw97sfmlhl"); // /* FIXME - should code window 0,0 point as feature with Y_GOES_DOWN */ UNSUPPORTED("76vpgnr0ye1dojhnhy0otwjle"); // job->fit_mode = 0; UNSUPPORTED("1oas1wgag0hif8qx29v4yklxv"); // if (job->rotation) { UNSUPPORTED("7g6sapcaxcof3pw9t271w1y8h"); // job->focus.x -= (pointer.y - job->height / 2.) UNSUPPORTED("9hyk0c7dwfz4h1crmjhezz45e"); // * (1.1 - 1.) / (job->zoom * job->devscale.y); UNSUPPORTED("e43b0b2imzn8b8ynbp2mal4md"); // job->focus.y += (pointer.x - job->width / 2.) UNSUPPORTED("2agqs1sz6w0xj54uuzxsih3ae"); // * (1.1 - 1.) / (job->zoom * job->devscale.x); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("3jir07ymknf0hmb9pv9x4dr3o"); // else { UNSUPPORTED("92b9yfihf7feuu1ojha98aucx"); // job->focus.x += (pointer.x - job->width / 2.) UNSUPPORTED("2agqs1sz6w0xj54uuzxsih3ae"); // * (1.1 - 1.) / (job->zoom * job->devscale.x); UNSUPPORTED("4pupq132vcd87490ty9jmdkpf"); // job->focus.y += (pointer.y - job->height / 2.) UNSUPPORTED("9hyk0c7dwfz4h1crmjhezz45e"); // * (1.1 - 1.) / (job->zoom * job->devscale.y); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("wr2oieepfov8hz62dktq6f2z"); // job->zoom *= 1.1; UNSUPPORTED("6pu9nvcwfkrjt09xcyews4irj"); // job->needs_refresh = 1; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("73i90hwf5c0jb5w9lww7yboeq"); // case 5: /* scrollwheel zoom out at current mouse x,y */ UNSUPPORTED("76vpgnr0ye1dojhnhy0otwjle"); // job->fit_mode = 0; UNSUPPORTED("e9tz2awchoyjb7frdzwnroacm"); // job->zoom /= 1.1; UNSUPPORTED("1oas1wgag0hif8qx29v4yklxv"); // if (job->rotation) { UNSUPPORTED("c8wc46or371rjqifvi8r998kd"); // job->focus.x += (pointer.y - job->height / 2.) UNSUPPORTED("9hyk0c7dwfz4h1crmjhezz45e"); // * (1.1 - 1.) / (job->zoom * job->devscale.y); UNSUPPORTED("o0u8c2v37omgye9ilucvtvhv"); // job->focus.y -= (pointer.x - job->width / 2.) UNSUPPORTED("2agqs1sz6w0xj54uuzxsih3ae"); // * (1.1 - 1.) / (job->zoom * job->devscale.x); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("3jir07ymknf0hmb9pv9x4dr3o"); // else { UNSUPPORTED("6zwx79wm2llpicj0vx8ddjhyh"); // job->focus.x -= (pointer.x - job->width / 2.) UNSUPPORTED("2agqs1sz6w0xj54uuzxsih3ae"); // * (1.1 - 1.) / (job->zoom * job->devscale.x); UNSUPPORTED("3qaatj1xmirq053hae4xzwr2l"); // job->focus.y -= (pointer.y - job->height / 2.) UNSUPPORTED("9hyk0c7dwfz4h1crmjhezz45e"); // * (1.1 - 1.) / (job->zoom * job->devscale.y); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("6pu9nvcwfkrjt09xcyews4irj"); // job->needs_refresh = 1; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("62hf9ws0l8zd35rei8kd6y3u0"); // job->oldpointer = pointer; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 65hgbjypgt12lezyx7wgj6mhm // static void gvevent_button_release(GVJ_t *job, int button, pointf pointer) public static Object gvevent_button_release(Object... arg) { UNSUPPORTED("d2aelqvksu4avszxarr327x9o"); // static void gvevent_button_release(GVJ_t *job, int button, pointf pointer) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4kf4459mj5lftb83ao5l6rf4w"); // job->click = 0; UNSUPPORTED("3h1jvgy0zcvs1uzxzvemt60gd"); // job->button = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 40ck841yiiqu2vr67m7w0ayru // static void gvevent_motion(GVJ_t * job, pointf pointer) public static Object gvevent_motion(Object... arg) { UNSUPPORTED("1k2shillcd8968xvxu3cbamfb"); // static void gvevent_motion(GVJ_t * job, pointf pointer) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5xe1ey15po4uno8y4t9cbugi5"); // /* dx,dy change in position, in device independent points */ UNSUPPORTED("c18b7wll7ujgfq0htgi5h6jkk"); // double dx = (pointer.x - job->oldpointer.x) / job->devscale.x; UNSUPPORTED("e8ewy0zul25k4mvzr5whcqkoj"); // double dy = (pointer.y - job->oldpointer.y) / job->devscale.y; UNSUPPORTED("cck0f698k4qf95xqzoos3niwt"); // if (abs(dx) < .0001 && abs(dy) < .0001) /* ignore motion events with no motion */ UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("9fk4hgwrkwuthrmr5tsmjkj0w"); // switch (job->button) { UNSUPPORTED("dqvbfy1kj4sm1clzp84yypk0g"); // case 0: /* drag with no button - */ UNSUPPORTED("75lxnhkp5b7e2lfc5y4rxj1fq"); // gvevent_find_current_obj(job, pointer); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8qnt25sjs3lrjlk6jo36k0lca"); // case 1: /* drag with button 1 - drag object */ UNSUPPORTED("17jbzecixgbp57ifr720i2w23"); // /* FIXME - to be implemented */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("f401i5lou32das0fux80r5ic9"); // case 2: /* drag with button 2 - pan graph */ UNSUPPORTED("6oc35uo8bb3x21jhtp2wmzsmn"); // if (job->rotation) { UNSUPPORTED("5uheedtwe7j6nydvsdwgvdsj5"); // job->focus.x -= dy / job->zoom; UNSUPPORTED("87lkqikxkyin4n49mf3ui048z"); // job->focus.y += dx / job->zoom; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("1yoovihyt7x68mlrh1v3957o4"); // job->focus.x -= dx / job->zoom; UNSUPPORTED("6zgznv9znc83j9bgdvnnwczoo"); // job->focus.y -= dy / job->zoom; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8so9jtnfbj4rh32qoan7atzqd"); // job->needs_refresh = 1; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("92nzvfmuso8utk1ncws76nrkl"); // case 3: /* drag with button 3 - drag inserted node or uncompleted edge */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("62hf9ws0l8zd35rei8kd6y3u0"); // job->oldpointer = pointer; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 309h3ymhziboe2mht4n46ru47 // static int quit_cb(GVJ_t * job) public static Object quit_cb(Object... arg) { UNSUPPORTED("d2aasjdi3qo1v67f1xh4m4a9q"); // static int quit_cb(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2d3158r4aw8sdu1oeit21vqmq // static int left_cb(GVJ_t * job) public static Object left_cb(Object... arg) { UNSUPPORTED("521h83irh6091dct76cd4wq3o"); // static int left_cb(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1jc6q1sk7wtw38mibr185b4ae"); // job->fit_mode = 0; UNSUPPORTED("258sx21x70eo4z4f4cjjzfdk5"); // job->focus.x += 10 / job->zoom; UNSUPPORTED("14bxw21mx0itq382s1d9yvadm"); // job->needs_refresh = 1; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 djqsh8zi6zin7tc1ablymhqyd // static int right_cb(GVJ_t * job) public static Object right_cb(Object... arg) { UNSUPPORTED("e0rr45fh4bimynpp3tyzov053"); // static int right_cb(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1jc6q1sk7wtw38mibr185b4ae"); // job->fit_mode = 0; UNSUPPORTED("6e17ijfp2skgoy0iikmod5cv7"); // job->focus.x -= 10 / job->zoom; UNSUPPORTED("14bxw21mx0itq382s1d9yvadm"); // job->needs_refresh = 1; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9yjypnd484350411fozpecu1w // static int up_cb(GVJ_t * job) public static Object up_cb(Object... arg) { UNSUPPORTED("2xwjivk6gbwmjk2orf31i0bn1"); // static int up_cb(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1jc6q1sk7wtw38mibr185b4ae"); // job->fit_mode = 0; UNSUPPORTED("1gf4o3dtzjulg5xtxmjp31u3x"); // job->focus.y += -(10 / job->zoom); UNSUPPORTED("14bxw21mx0itq382s1d9yvadm"); // job->needs_refresh = 1; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ao1epwwls96l9rn7aorg8t57w // static int down_cb(GVJ_t * job) public static Object down_cb(Object... arg) { UNSUPPORTED("xxaph7ayk44vfwcpj202iq1k"); // static int down_cb(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1jc6q1sk7wtw38mibr185b4ae"); // job->fit_mode = 0; UNSUPPORTED("36xzjyr5ndfvwfeodypoae9b8"); // job->focus.y -= -(10 / job->zoom); UNSUPPORTED("14bxw21mx0itq382s1d9yvadm"); // job->needs_refresh = 1; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 s9fxrizmsy50pmyuxkmqxk6u // static int zoom_in_cb(GVJ_t * job) public static Object zoom_in_cb(Object... arg) { UNSUPPORTED("2riwlfksx6nk9oydtk942wbs8"); // static int zoom_in_cb(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1jc6q1sk7wtw38mibr185b4ae"); // job->fit_mode = 0; UNSUPPORTED("cbpe6q4xe7lv6rmzvuq51p7yk"); // job->zoom *= 1.1; UNSUPPORTED("14bxw21mx0itq382s1d9yvadm"); // job->needs_refresh = 1; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dwx7pk3xbbk6xsv7okp2izif4 // static int zoom_out_cb(GVJ_t * job) public static Object zoom_out_cb(Object... arg) { UNSUPPORTED("adt5ckz3j0b6igqhekyzi9j3c"); // static int zoom_out_cb(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1jc6q1sk7wtw38mibr185b4ae"); // job->fit_mode = 0; UNSUPPORTED("6nhoh1qyyztet8mqqpvccbrt8"); // job->zoom /= 1.1; UNSUPPORTED("14bxw21mx0itq382s1d9yvadm"); // job->needs_refresh = 1; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3v74j066qbm5zjvdffnjqqjsb // static int toggle_fit_cb(GVJ_t * job) public static Object toggle_fit_cb(Object... arg) { UNSUPPORTED("calj7u9drqvbnznvt9qpgpco"); // static int toggle_fit_cb(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bk1me2jow1k66xklpyf96da8z"); // /*FIXME - should allow for margins */ UNSUPPORTED("ca08k9e4l7k97t09hno8eg5ic"); // /* - similar zoom_to_fit code exists in: */ UNSUPPORTED("407kig1fpgnuaqr1p9rmn7rvh"); // /* plugin/gtk/callbacks.c */ UNSUPPORTED("75fmjzjh5oukz4xyadm6o2rrg"); // /* plugin/xlib/gvdevice_xlib.c */ UNSUPPORTED("dtwhbdevq5apej1dgmz28t9t8"); // /* lib/gvc/gvevent.c */ UNSUPPORTED("3gekppn80z1eb3aglohw61u3m"); // job->fit_mode = !job->fit_mode; UNSUPPORTED("cpguagf0s57pek6mm9zvj1dvn"); // if (job->fit_mode) { UNSUPPORTED("syw74d3j5j2nfdmkv9evrita"); // /* FIXME - this code looks wrong */ UNSUPPORTED("9oyvwx5y9ax3tg2zqwhpv3gdn"); // int dflt_width, dflt_height; UNSUPPORTED("8j3kezo5opp2m5wn3ly37cz39"); // dflt_width = job->width; UNSUPPORTED("d9way4je7rmtkau2r1nauz7ys"); // dflt_height = job->height; UNSUPPORTED("6cbgfx2rz5ryr8r0wxuagn4z0"); // job->zoom = UNSUPPORTED("kgc4bn46xnur16uv4rmw4ba7"); // MIN((double) job->width / (double) dflt_width, UNSUPPORTED("xquy3dhq6f4rs8amktm3abt6"); // (double) job->height / (double) dflt_height); UNSUPPORTED("1e1oqbruejs7bca1s0k1bke3s"); // job->focus.x = 0.0; UNSUPPORTED("4zzdaatjg7hr1ge378anr4q9w"); // job->focus.y = 0.0; UNSUPPORTED("8so9jtnfbj4rh32qoan7atzqd"); // job->needs_refresh = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 56ccrkgaretp9luumyk09sglf // static void gvevent_modify (GVJ_t * job, const char *name, const char *value) public static Object gvevent_modify(Object... arg) { UNSUPPORTED("9a50fbnlu9tkk620l868zqnuy"); // static void gvevent_modify (GVJ_t * job, const char *name, const char *value) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("42d3fg9bdfs5c7bjfa8ifmifa"); // /* FIXME */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9y8ix71hznhgpqhdprgm6k2bf // static void gvevent_delete (GVJ_t * job) public static Object gvevent_delete(Object... arg) { UNSUPPORTED("e1gm68y4wg586b527136y2y6z"); // static void gvevent_delete (GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("42d3fg9bdfs5c7bjfa8ifmifa"); // /* FIXME */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 biioemf5ai5iuyoolocr03hc3 // static void gvevent_read (GVJ_t * job, const char *filename, const char *layout) public static Object gvevent_read(Object... arg) { UNSUPPORTED("4h0co0klq5h3sj7yxdyzcvncb"); // static void gvevent_read (GVJ_t * job, const char *filename, const char *layout) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3al75fenupx704zal37z61c8b"); // FILE *f; UNSUPPORTED("8f3ds00y6y855lum5r1q8iguu"); // GVC_t *gvc; UNSUPPORTED("dche8rg8aigyynyqrt6nu6pi9"); // Agraph_t *g = NULL; UNSUPPORTED("a7up84jfetsqtynw5ox47rdn1"); // gvlayout_engine_t *gvle; UNSUPPORTED("7j5dmfadhocojbtl83jkh6xjg"); // gvc = job->gvc; UNSUPPORTED("bds8dq7k78imolfuqvsompdpf"); // if (!filename) { UNSUPPORTED("13uys361kmjd3qx8b3kmbfddm"); // g = agopen("G", Agdirected, ((Agdisc_t *)0)); UNSUPPORTED("5dm2nbgqv55kkg3rp77draehf"); // job->output_filename = "new.gv"; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("7bjzgpbe070yudayasbofefn6"); // f = fopen(filename, "r"); UNSUPPORTED("cph6k7prppj2jpk1p0kv21lzt"); // if (!f) UNSUPPORTED("vsh6vacplnxa4vg4vqz6gr3h"); // return; /* FIXME - need some error handling */ UNSUPPORTED("4dxia19suxcfx8nx4kkv03xvr"); // g = agread(f,((Agdisc_t *)0)); UNSUPPORTED("chdfpk39x7sd1pta68dy54uc7"); // fclose(f); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("d4y2wp550bqfklklls2la62re"); // if (!g) UNSUPPORTED("t91xvoytv7bz3axiuer1p2jk"); // return; /* FIXME - need some error handling */ UNSUPPORTED("8vkljh4chrkc3gbo7q02no1z9"); // if (gvc->g) { UNSUPPORTED("bufvf17xepz6u0m39ufe7ye84"); // gvle = gvc->layout.engine; UNSUPPORTED("czf1mh1evonsv8so8ps3947ll"); // if (gvle && gvle->cleanup) UNSUPPORTED("uyay82wv3l1kokjwlaueo2db"); // gvle->cleanup(gvc->g); UNSUPPORTED("2aupiz398k8rkbfq3c05sw8rv"); // graph_cleanup(gvc->g); UNSUPPORTED("a5pud2m3sxqnuvqgon9a1at18"); // agclose(gvc->g); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dc88opmbj2t1d95ft4b1qfucr"); // aginit (g, AGRAPH, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); UNSUPPORTED("9ags1qc3lejto2k8tjopp22e1"); // aginit (g, AGNODE, "Agnodeinfo_t", sizeof(Agnodeinfo_t), NOT(0)); UNSUPPORTED("e8pylpzs6p3co7burg6on5rs9"); // aginit (g, AGEDGE, "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0)); UNSUPPORTED("8zmfa30bj4y52yk4nu6fzjg4a"); // gvc->g = g; UNSUPPORTED("eal5jjm76ug7lf7e9m9yk6um"); // GD_gvc(g) = gvc; UNSUPPORTED("6cbvip0hdqnrg54zv7c3oesf1"); // if (gvLayout(gvc, g, layout) == -1) UNSUPPORTED("t91xvoytv7bz3axiuer1p2jk"); // return; /* FIXME - need some error handling */ UNSUPPORTED("99q6bmbem9osq0wmq124s5bc4"); // job->selected_obj = NULL; UNSUPPORTED("cqfz5sjxk5oljgi2g2rkngkxw"); // job->current_obj = NULL; UNSUPPORTED("14bxw21mx0itq382s1d9yvadm"); // job->needs_refresh = 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1k1rh0zcbdhmc63pah8p3v9a5 // static void gvevent_layout (GVJ_t * job, const char *layout) public static Object gvevent_layout(Object... arg) { UNSUPPORTED("84aq06ks1526mvfbsygstl1m6"); // static void gvevent_layout (GVJ_t * job, const char *layout) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6vga6er14oo3mi8zwv56hjzy9"); // gvLayout(job->gvc, job->gvc->g, layout); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8m9msj4hgktq8ewa10u5wbtf7 // static void gvevent_render (GVJ_t * job, const char *format, const char *filename) public static Object gvevent_render(Object... arg) { UNSUPPORTED("6lp11ec3wv4z0karcudj7m75i"); // static void gvevent_render (GVJ_t * job, const char *format, const char *filename) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bwwsrqv41ezfoxciv5yp7fxcs"); // gvRenderFilename(job->gvc, job->gvc->g, format, filename); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 5jkaqx0en4lqut923scwlpad7 // gvevent_key_binding_t gvevent_key_binding[] = //1 79b1htxh6vczq03o7b1tx96yh // int gvevent_key_binding_size = (sizeof(gvevent_key_binding)/sizeof(gvevent_key_binding[0])) //1 2rfceko46oix2bfpek421g4uv // gvdevice_callbacks_t gvdevice_callbacks = } plantuml-1.2017.15/src/gen/lib/gvc/gvjobs__c.java000066400000000000000000000300141312650303100213370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.gvc; import static smetana.core.Macro.UNSUPPORTED; public class gvjobs__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 1pjfdgts3f7oydy0y9jhjugta // static GVJ_t *output_filename_job //1 7y5n04mdy4v0ksvy1f8u1ufu1 // static GVJ_t *output_langname_job //3 39qttb09ieneoczohoe18m73o // void gvjobs_output_filename(GVC_t * gvc, const char *name) public static Object gvjobs_output_filename(Object... arg) { UNSUPPORTED("3ryvg5oev9sja9lw3ofgqed7w"); // void gvjobs_output_filename(GVC_t * gvc, const char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cv040o08cv8281cfqhv8854yq"); // if (!gvc->jobs) { UNSUPPORTED("a9cgmkhzy1dikep3roojjbcte"); // output_filename_job = gvc->job = gvc->jobs = zmalloc(sizeof(GVJ_t)); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("d3hw0xdpchwiy1k2rcc44xv4j"); // if (!output_filename_job) { UNSUPPORTED("36c32ldaxz6vogmj5nhf92h83"); // output_filename_job = gvc->jobs; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("485550438nef76qt5kg2ly349"); // if (!output_filename_job->next) { UNSUPPORTED("5oixw6s3swg9hznwx4czokjbk"); // output_filename_job->next = zmalloc(sizeof(GVJ_t)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("b8inpu32tu6zqo000moq75wy0"); // output_filename_job = output_filename_job->next; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8rlxv3o0lru4utlh7jl0f0vue"); // output_filename_job->output_filename = name; UNSUPPORTED("62fru6gff40i2nhkhk1o43tsh"); // output_filename_job->gvc = gvc; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4i5tkl55fx3u0wrjngy8rlrlf // boolean gvjobs_output_langname(GVC_t * gvc, const char *name) public static Object gvjobs_output_langname(Object... arg) { UNSUPPORTED("7pknulb4k1s97jbz2490bhjil"); // boolean gvjobs_output_langname(GVC_t * gvc, const char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cv040o08cv8281cfqhv8854yq"); // if (!gvc->jobs) { UNSUPPORTED("bo2bep4t13b563p9bkmze288q"); // output_langname_job = gvc->job = gvc->jobs = zmalloc(sizeof(GVJ_t)); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("3llf13j0vc8xk1fxkw9pyxdby"); // if (!output_langname_job) { UNSUPPORTED("8sydwjd6sltqbn798ugzschoj"); // output_langname_job = gvc->jobs; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("cyn28cpa3wbtakiskqjpzycm"); // if (!output_langname_job->next) { UNSUPPORTED("aichf642t6sfhx7rmhieyx9ds"); // output_langname_job->next = zmalloc(sizeof(GVJ_t)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("35r3hch2gu4t2k2cwybo9zg6"); // output_langname_job = output_langname_job->next; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("89g459qqeg1bo774abkcni1lt"); // output_langname_job->output_langname = name; UNSUPPORTED("d5cmms7hxpqitvmv6grhco7a9"); // output_langname_job->gvc = gvc; UNSUPPORTED("9j8seo67dfwx0qo2t0owy5ss3"); // /* load it now to check that it exists */ UNSUPPORTED("9c0elq6msr2m6yc2h6gmdodzo"); // if (gvplugin_load(gvc, API_device, name)) UNSUPPORTED("bp2y18pqq5n09006utwifdyxo"); // return NOT(0); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e8pwlap2rcl8cv9ofdfafjvno // GVJ_t *gvjobs_first(GVC_t * gvc) public static Object gvjobs_first(Object... arg) { UNSUPPORTED("ai610ye6dr7wwxocu8id01h8k"); // GVJ_t *gvjobs_first(GVC_t * gvc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5v9dnf37wu1p4ydy7jec1vsdp"); // return (gvc->job = gvc->jobs); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 306mhd1v2f9ubaamkhjsvd8qp // GVJ_t *gvjobs_next(GVC_t * gvc) public static Object gvjobs_next(Object... arg) { UNSUPPORTED("cl5sw4h8jxwka40ye3iclxeye"); // GVJ_t *gvjobs_next(GVC_t * gvc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a78h71dhtlrepn6wv5z3kjyua"); // GVJ_t *job = gvc->job->next; UNSUPPORTED("4ugafys4138jbf2cwbngr1rmf"); // if (job) { UNSUPPORTED("c2ja6xkql14tp4abs4rjoczap"); // /* if langname not specified, then repeat previous value */ UNSUPPORTED("9pe1w1tplonkmhbh6oxtgvk0m"); // if (!job->output_langname) UNSUPPORTED("7meekiuuvso01zylb5f9yhxhn"); // job->output_langname = gvc->job->output_langname; UNSUPPORTED("b4q9cevqaqfulbq7fxg62domu"); // /* if filename not specified, then leave NULL to indicate stdout */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1qgmwakcokc36ya4c4e9x0slz"); // return (gvc->job = job); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 792fo3o9fsxvoz433ctlnc4fc // gv_argvlist_t *gvNEWargvlist(void) public static Object gvNEWargvlist(Object... arg) { UNSUPPORTED("6zo529p4sml722e6ll9gxyt7l"); // gv_argvlist_t *gvNEWargvlist(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2pnc0kxk2813dwiy45sgvw48"); // return (gv_argvlist_t*)zmalloc(sizeof(gv_argvlist_t)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vrgzg9tosokrv5epywnpck6p // void gv_argvlist_set_item(gv_argvlist_t *list, int index, char *item) public static Object gv_argvlist_set_item(Object... arg) { UNSUPPORTED("8bargfhdrutc1xv5dwu2chxuv"); // void gv_argvlist_set_item(gv_argvlist_t *list, int index, char *item) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3fw3kxowrs2t9drym6ls89uy5"); // if (index >= list->alloc) { UNSUPPORTED("1uc5g7t5w5e108ipxs91oph56"); // list->alloc = index + 10; UNSUPPORTED("c5yzzd37ss3fgbr0b3a0aq6z7"); // list->argv = grealloc(list->argv, (list->alloc)*(sizeof(char*))); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bl6ru62mgdiir5470o069hfd1"); // list->argv[index] = item; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d2b5k3hlhil0de7fa1hu7l94h // void gv_argvlist_reset(gv_argvlist_t *list) public static Object gv_argvlist_reset(Object... arg) { UNSUPPORTED("850opb4ojq26l924543kc1gok"); // void gv_argvlist_reset(gv_argvlist_t *list) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("doj8fyzeqsl0r4wgj9lh430ox"); // if (list->argv) UNSUPPORTED("xlt093t6b7j3pnv9hu2vt66f"); // free(list->argv); UNSUPPORTED("ap2mjy4r8fpmayf9uuxp4jf89"); // list->argv = NULL; UNSUPPORTED("4sqkjh7d3c62r110mi2a83svb"); // list->alloc = 0; UNSUPPORTED("7ro2etssmfzc4a1isfbbx6eed"); // list->argc = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5mgwysotnvkta4thc1xg5fi54 // void gv_argvlist_free(gv_argvlist_t *list) public static Object gv_argvlist_free(Object... arg) { UNSUPPORTED("ea3c0vjqyvj4dxsejfvmh35gb"); // void gv_argvlist_free(gv_argvlist_t *list) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("doj8fyzeqsl0r4wgj9lh430ox"); // if (list->argv) UNSUPPORTED("xlt093t6b7j3pnv9hu2vt66f"); // free(list->argv); UNSUPPORTED("77gdlnaiah901ax125wm0qh80"); // free(list); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2wvv6fkvq52bzf9nxkfkegeaq // void gvjobs_delete(GVC_t * gvc) public static Object gvjobs_delete(Object... arg) { UNSUPPORTED("crqxrbflqt2g954zn4tcroo9w"); // void gvjobs_delete(GVC_t * gvc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("97ra1ormlmahj8vge2eunl30v"); // GVJ_t *job, *j; UNSUPPORTED("3pmzbzpokb2qak70z519miwt2"); // job = gvc->jobs; UNSUPPORTED("eaj0v3cv4vpxfa9s4a9encgvb"); // while ((j = job)) { UNSUPPORTED("c3q9r9u9bkmzersvod3mnf57w"); // job = job->next; UNSUPPORTED("1cdz5buzwqhtha92lvuuza7np"); // gv_argvlist_reset(&(j->selected_obj_attributes)); UNSUPPORTED("5zd7n7b1fs7wf1p5gxhwc18tq"); // gv_argvlist_reset(&(j->selected_obj_type_name)); UNSUPPORTED("7v6blrn64uyfyf00wiegwiolr"); // if (j->active_tooltip) UNSUPPORTED("13harrcujsq9tfn9l9si9smra"); // free(j->active_tooltip); UNSUPPORTED("3szbju1px4sq4hkqtrrzspao7"); // if (j->selected_href) UNSUPPORTED("cpy4ywcq3ss7v5o2ymb3x26bb"); // free(j->selected_href); UNSUPPORTED("6vry3qvmafu1jm517mnutt1f7"); // free(j); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4q0duus5k3hueqb940j1h6tc0"); // gvc->jobs = gvc->job = gvc->active_jobs = output_filename_job = output_langname_job = UNSUPPORTED("5miekn5jg1682zqyvjvhc1h25"); // NULL; UNSUPPORTED("77k27xankrzoe9n1nj8zbr2j0"); // gvc->common.viewNum = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/gvc/gvlayout__c.java000066400000000000000000000216331312650303100217260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.gvc; import static gen.lib.cgraph.obj__c.agroot; import static gen.lib.cgraph.rec__c.agbindrec; import static gen.lib.common.emit__c.gv_fixLocale; import static gen.lib.common.input__c.graph_init; import static smetana.core.JUtils.LOG2; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.enumAsInt; import static smetana.core.JUtils.function; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.GD_cleanup; import static smetana.core.Macro.GD_drawing; import static smetana.core.Macro.GD_gvc; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import h.Agraph_s; import h.Agraphinfo_t; import h.GVC_s; import h.gvlayout_engine_s; import h.gvlayout_features_t; import h.gvplugin_installed_t; import h.layout_type; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Memory; import smetana.core.__struct__; public class gvlayout__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //3 2g20jitdi8afuoei8p1mcfg9l // int gvlayout_select(GVC_t * gvc, const char *layout) private final static __struct__ dotgen_features = JUtils.from(gvlayout_features_t.class); private final static __struct__ dotgen_engine = JUtils.from(gvlayout_engine_s.class); static { dotgen_features.setInt("flags", 1<<0); dotgen_engine.setPtr("layout", function(gen.lib.dotgen.dotinit__c.class, "dot_layout")); dotgen_engine.setPtr("cleanup", function(gen.lib.dotgen.dotinit__c.class, "dot_cleanup")); } public static int gvlayout_select(GVC_s gvc, CString layout) { ENTERING("2g20jitdi8afuoei8p1mcfg9l","gvlayout_select"); try { gvplugin_installed_t gvlayout_dot_layout = (gvplugin_installed_t) Memory.malloc(gvplugin_installed_t.class); gvlayout_dot_layout.setInt("id", enumAsInt(layout_type.class, "LAYOUT_DOT")); gvlayout_dot_layout.setPtr("type", new CString("dot")); gvlayout_dot_layout.setInt("quality", 0); gvlayout_dot_layout.setPtr("engine", dotgen_engine.amp()); gvlayout_dot_layout.setPtr("features", dotgen_features.amp()); // gvplugin_available_t *plugin; gvplugin_installed_t typeptr = gvlayout_dot_layout; // plugin = gvplugin_load(gvc, API_layout, layout); // if (plugin) { // typeptr = plugin->typeptr; gvc.getStruct("layout").setPtr("type", typeptr.getPtr("type")); gvc.getStruct("layout").setPtr("engine", typeptr.getPtr("engine")); gvc.getStruct("layout").setInt("id", typeptr.getInt("id")); gvc.getStruct("layout").setPtr("features", typeptr.getPtr("features")); return 300; /* FIXME - need better return code */ // } // return 999; } finally { LEAVING("2g20jitdi8afuoei8p1mcfg9l","gvlayout_select"); } } //3 991b7t7n0x8ifkp49zotjs78x // int gvLayoutJobs(GVC_t * gvc, Agraph_t * g) public static int gvLayoutJobs(GVC_s gvc, Agraph_s g) { ENTERING("991b7t7n0x8ifkp49zotjs78x","gvLayoutJobs"); try { gvlayout_engine_s gvle; CString p = null; int rc; agbindrec(g, new CString("Agraphinfo_t"), sizeof(Agraphinfo_t.class), (N(0))); GD_gvc(g, gvc); if (NEQ(g, agroot(g))) UNSUPPORTED("ah9ygbaap1fyxr97z734juk0j"); // (((Agraphinfo_t*)(((Agobj_t*)(agroot(g)))->data))->gvc) = gvc; /* if ((p = agget(g, new CString("layout")))!=null) { UNSUPPORTED("dlm1jil8gt2pv7p8yrit1tuls"); // gvc->layout.engine = NULL; UNSUPPORTED("efl8rjna6ij4qjxb0xlyu3hh1"); // rc = gvlayout_select(gvc, p); UNSUPPORTED("7smbmph5nldinro02iqf3qlxv"); // if (rc == 999) { UNSUPPORTED("6ru23qpjrx893ivwviirr1ikc"); // agerr (AGERR, "Layout type: \"%s\" not recognized. Use one of:%s\n", UNSUPPORTED("f3vrr10ga3mqymh2qxomxn326"); // p, gvplugin_list(gvc, API_layout, p)); UNSUPPORTED("aivfd7ajlfz8o8oi68d4u5s5z"); // return -1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } }*/ rc = gvlayout_select(gvc, p); //Let's force things gvle = (gvlayout_engine_s) gvc.getStruct("layout").getPtr("engine"); if (N(gvle)) UNSUPPORTED("return -1;"); gv_fixLocale (1); graph_init(g, (gvc.getStruct("layout").getPtr("features").getInt("flags") & (1<<0))!=0); GD_drawing(agroot(g), GD_drawing(g)); if (gvle!=null && gvle.getPtr("layout")!=null) { gvle.call("layout", g); if (gvle.getPtr("cleanup")!=null) if (GD_cleanup(g)==null) LOG2("WARNING WE CHEAT GD_cleanup(g) is NULL"); else GD_cleanup(g).setPtr(gvle.getPtr("cleanup")); } gv_fixLocale (0); return 0; } finally { LEAVING("991b7t7n0x8ifkp49zotjs78x","gvLayoutJobs"); } } //3 3c99zdwpmvsunk8fuj6my9c14 // int gvFreeLayout(GVC_t * gvc, Agraph_t * g) public static Object gvFreeLayout(Object... arg) { UNSUPPORTED("miztaqpyzsrx0tzflsbk18df"); // int gvFreeLayout(GVC_t * gvc, Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("an78d0x2t0pcnm5p7x0nsyl8o"); // /* skip if no Agraphinfo_t yet */ UNSUPPORTED("y9n04abevv5wkts4l75cl1au"); // if (! agbindrec(g, "Agraphinfo_t", 0, NOT(0))) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("3tq49gfbuixakj7ae5tf9mzxz"); // if (GD_cleanup(g)) { UNSUPPORTED("66fe8hcy8mktqozsl94u84wy4"); // (GD_cleanup(g))(g); UNSUPPORTED("9otfc4inu4hywb5uzke8hroh8"); // GD_cleanup(g) = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6o4u7hjlds1wsu4tuaotw2xvr"); // if (GD_drawing(g)) { UNSUPPORTED("614pp135h9hyyoa6quv172ent"); // graph_cleanup(g); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/gvc/gvloadimage__c.java000066400000000000000000000141061312650303100223300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.gvc; import static smetana.core.Macro.UNSUPPORTED; public class gvloadimage__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //3 ep6jmhv0is26drryogw6fohi3 // static int gvloadimage_select(GVJ_t * job, char *str) public static Object gvloadimage_select(Object... arg) { UNSUPPORTED("5bb69p9z62wipd3lyplljm2v4"); // static int gvloadimage_select(GVJ_t * job, char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5ssvxydvbzuxmb74t0hvdbmws"); // gvplugin_available_t *plugin; UNSUPPORTED("9q2rkohjybr7oxouto8gnuzsb"); // gvplugin_installed_t *typeptr; UNSUPPORTED("5yly7xo50onlrn1nqjqrr9wo9"); // plugin = gvplugin_load(job->gvc, API_loadimage, str); UNSUPPORTED("3qzhu1d1ev2sbxdqyn2rujv5y"); // if (plugin) { UNSUPPORTED("9n3145wffxmm0g88h1ajkns50"); // typeptr = plugin->typeptr; UNSUPPORTED("2ui2g5j7vqtvf4ojbk62b0iqw"); // job->loadimage.engine = (gvloadimage_engine_t *) (typeptr->engine); UNSUPPORTED("cfrvp22dhfgc4junmqcolizhe"); // job->loadimage.id = typeptr->id; UNSUPPORTED("51t151ipzzvnbstd9b6wdf6hc"); // return 300; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bel174mlivqazll07qqj29en"); // return 999; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a1485vryn659qrl2rhyrgd6dt // void gvloadimage(GVJ_t * job, usershape_t *us, boxf b, boolean filled, const char *target) public static Object gvloadimage(Object... arg) { UNSUPPORTED("21k2magil01siu25ovmraoqbg"); // void gvloadimage(GVJ_t * job, usershape_t *us, boxf b, boolean filled, const char *target) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e3pb3haf1s6pn0amul7acf5km"); // gvloadimage_engine_t *gvli; UNSUPPORTED("ccf1hpkthzbxg1bqw930patsh"); // char type[128]; UNSUPPORTED("1nk5slg1h855ktp6d9uxli7u3"); // assert(job); UNSUPPORTED("7gqi0ait1bhc4v9zl8rnn0wbs"); // assert(us); UNSUPPORTED("xlffgd4fqdckxg2nbs0mxtlj"); // assert(us->name); UNSUPPORTED("fk4kdjctgb13swd2h14t0yvh"); // assert(us->name[0]); UNSUPPORTED("2pbo4rf9sxizguooweyns5dan"); // strcpy(type, us->stringtype); UNSUPPORTED("19k2ef632wrs9x9vtnv1ijff0"); // strcat(type, ":"); UNSUPPORTED("aeq1ythwox76trv969mshtfdj"); // strcat(type, target); UNSUPPORTED("42tfcob96fcxdwuvlm1jq2rxv"); // if (gvloadimage_select(job, type) == 999) UNSUPPORTED("d5epmnbww8kj1vdjo9mwj8qpo"); // agerr (AGWARN, "No loadimage plugin for \"%s\"\n", type); UNSUPPORTED("1idhakd1v5ijtt2ohczpakl6n"); // if ((gvli = job->loadimage.engine) && gvli->loadimage) UNSUPPORTED("8vlzrv54d9rjiv3pxxvhx7wht"); // gvli->loadimage(job, us, b, filled); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/gvc/gvplugin__c.java000066400000000000000000001474241312650303100217160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.gvc; import static smetana.core.JUtils.enumAsInt; import static smetana.core.JUtils.strchr; import static smetana.core.JUtils.strncpy; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.GVC_s; import h.api_t; import h.gvplugin_api_t; import h.gvplugin_available_s; import h.gvplugin_installed_t; import h.gvplugin_library_t; import smetana.core.CString; public class gvplugin__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 aemimfultk1u2w9cxr60mx9t8 // static char *api_names[] = //3 eevhjwoa4cqgsdjixuro98kl0 // api_t gvplugin_api(char *str) public static Object gvplugin_api(Object... arg) { UNSUPPORTED("cszu4juqkncv208751dxi10l3"); // api_t gvplugin_api(char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6ugrq6sc21ihshl3bbzco6fos"); // int api; UNSUPPORTED("c57imqe71hagsxekx4tv822e"); // for (api = 0; api < (sizeof(api_names)/sizeof(api_names[0])); api++) { UNSUPPORTED("cypzroibwqkkeifp7b9ciyrfx"); // if (strcmp(str, api_names[api]) == 0) UNSUPPORTED("ap3yvrg5ko19s5z8pvkh2f64b"); // return (api_t) api; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("16zkyf3ijnqqhod6luqgoqzd0"); // return -1; /* invalid api */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3vjd9bb625sthhbgjrlrmjw4h // char *gvplugin_api_name(api_t api) public static Object gvplugin_api_name(Object... arg) { UNSUPPORTED("c2dzua9zqksseurlvndxm1do6"); // char *gvplugin_api_name(api_t api) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("15g86gk834zhtgfo7w962s468"); // if (api >= (sizeof(api_names)/sizeof(api_names[0]))) UNSUPPORTED("3kb0mwa3jlee9ipjt7wodtqqb"); // return NULL; UNSUPPORTED("9esfkw01cbkumpp6ou4xmeqos"); // return api_names[api]; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cxx1gbe13gcf3krmmqjiyr7di // boolean gvplugin_install(GVC_t * gvc, api_t api, const char *typestr, int quality, gvplugin_package_t * package, gvplugin_installed_t * typeptr) public static Object gvplugin_install(Object... arg) { UNSUPPORTED("619rhf5ymot3codnbzksouis6"); // boolean gvplugin_install(GVC_t * gvc, api_t api, const char *typestr, UNSUPPORTED("cbeivjlgviyvn2o1ob9xcgjgt"); // int quality, gvplugin_package_t * package, gvplugin_installed_t * typeptr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("d53yi83w5e6hbh7khf6tu3amd"); // gvplugin_available_t *plugin, **pnext; UNSUPPORTED("h46d3z1wpcx5yz5xwrhaep09"); // char *p, pins[63 + 1], pnxt[63 + 1]; UNSUPPORTED("70v3xi82bu6ai1mhcwuqlzygc"); // strncpy(pins, typestr, 63); UNSUPPORTED("5ehl3fspdtq5bd7s4n2jx0n5z"); // if ((p = strchr(pins, ':'))) UNSUPPORTED("1rp7cdmu93lyeduxea3kodw6f"); // *p = '\0'; UNSUPPORTED("bzrdeewfn36nuge9zi5rjnm9d"); // /* point to the beginning of the linked list of plugins for this api */ UNSUPPORTED("8cx9xw3rgslvvjxjfv9nlbjtu"); // pnext = &(gvc->apis[api]); UNSUPPORTED("40pb8kh6h3bxztdhbpk4ngy1t"); // /* keep alpha-sorted and insert new duplicates ahead of old */ UNSUPPORTED("86i3a2gdu4hatw4n3807wkpyz"); // while (*pnext) { UNSUPPORTED("8scl16yzxj5y3qa97lj2iuezz"); // strncpy(pnxt, (*pnext)->typestr, 63); UNSUPPORTED("8r7wzbzf0r4s9m2wasqpwmh4s"); // if ((p = strchr(pnxt, ':'))) UNSUPPORTED("6568pmkatbjs0ljsylsyvwepv"); // *p = '\0'; UNSUPPORTED("6499faf42vnje5zsq4zhf02lb"); // if (strcmp(pins, pnxt) <= 0) UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("55n8nl3sp6k1nc6nnayaegsho"); // pnext = &((*pnext)->next); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dsphd42nrfy5e2axk5sg3b65d"); // /* keep quality sorted within type and insert new duplicates ahead of old */ UNSUPPORTED("86i3a2gdu4hatw4n3807wkpyz"); // while (*pnext) { UNSUPPORTED("8scl16yzxj5y3qa97lj2iuezz"); // strncpy(pnxt, (*pnext)->typestr, 63); UNSUPPORTED("8r7wzbzf0r4s9m2wasqpwmh4s"); // if ((p = strchr(pnxt, ':'))) UNSUPPORTED("6568pmkatbjs0ljsylsyvwepv"); // *p = '\0'; UNSUPPORTED("5pq63gm29ufff21489hv3pdzx"); // if (strcmp(pins, pnxt) != 0) UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("ayxld9otjreak79zsydlip2n8"); // if (quality >= (*pnext)->quality) UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("55n8nl3sp6k1nc6nnayaegsho"); // pnext = &((*pnext)->next); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("27rb5472mqvaoo2lrv9ay9nb2"); // plugin = (gvplugin_available_t*)gmalloc(sizeof(gvplugin_available_t)); UNSUPPORTED("8d3uxfkxttckrkyrqz7c316nd"); // plugin->next = *pnext; UNSUPPORTED("2nzw9ndaixpz96xekhyzf3grg"); // *pnext = plugin; UNSUPPORTED("1ayess103228p1o527qizt55v"); // plugin->typestr = typestr; UNSUPPORTED("3gh26iskvk2frax9qdu4eml5p"); // plugin->quality = quality; UNSUPPORTED("74iei4ud3yzux00gm80pl13w1"); // plugin->package = package; UNSUPPORTED("15sp63w5n1i9737z5m37xrxt7"); // plugin->typeptr = typeptr; /* null if not loaded */ UNSUPPORTED("8fwlqtemsmckleh6946lyd8mw"); // return NOT(0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 awv2xvpinps83rbzhxzsrxeli // static boolean gvplugin_activate(GVC_t * gvc, api_t api, const char *typestr, char *name, char *path, gvplugin_installed_t * typeptr) public static Object gvplugin_activate(Object... arg) { UNSUPPORTED("4rcplnvgpurjnsh6ap3chx2b0"); // static boolean gvplugin_activate(GVC_t * gvc, api_t api, UNSUPPORTED("5npameydw0l8cwolyubcubjac"); // const char *typestr, char *name, char *path, gvplugin_installed_t * typeptr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("55hy9lq9jka8phhommr24dbxn"); // gvplugin_available_t **pnext; UNSUPPORTED("bzrdeewfn36nuge9zi5rjnm9d"); // /* point to the beginning of the linked list of plugins for this api */ UNSUPPORTED("8cx9xw3rgslvvjxjfv9nlbjtu"); // pnext = &(gvc->apis[api]); UNSUPPORTED("86i3a2gdu4hatw4n3807wkpyz"); // while (*pnext) { UNSUPPORTED("ca0mu6mhnhs9xsj0mkrrsgw63"); // if ((strcasecmp(typestr, (*pnext)->typestr) == 0) UNSUPPORTED("5172m3eawe0zwowomraogv42a"); // && (strcasecmp(name, (*pnext)->package->name) == 0) UNSUPPORTED("5pn92hn5htirj0b4blrfjgdpc"); // && ((*pnext)->package->path != 0) UNSUPPORTED("b0ecf9ryo0px6tujptl0einvq"); // && (strcasecmp(path, (*pnext)->package->path) == 0)) { UNSUPPORTED("78cuc01bk5hfha6nvpxlqdkuu"); // (*pnext)->typeptr = typeptr; UNSUPPORTED("et2iafj6t9rndjcqc9yjlp1g0"); // return NOT(0); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("55n8nl3sp6k1nc6nnayaegsho"); // pnext = &((*pnext)->next); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c85ouwevp7apj486314dok24 // gvplugin_library_t *gvplugin_library_load(GVC_t * gvc, char *path) public static Object gvplugin_library_load(Object... arg) { UNSUPPORTED("2pt63mbk45dolii7tkhhsmcqw"); // gvplugin_library_t *gvplugin_library_load(GVC_t * gvc, char *path) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("45vezjnngq4gg1z3p4u8cmmfc"); // agerr(AGERR, "dynamic loading not available\n"); UNSUPPORTED("o68dp934ebg4cplebgc5hv4v"); // return NULL; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dh7wri9ra8xvm9ur14gd95xjj // gvplugin_available_t *gvplugin_load(GVC_t * gvc, api_t api, const char *str) public static gvplugin_available_s gvplugin_load(GVC_s gvc, int api, CString str) { ENTERING("dh7wri9ra8xvm9ur14gd95xjj","gvplugin_load"); try { //gvplugin_available_s **pnext; //gvplugin_available_s rv; gvplugin_library_t library; gvplugin_api_t apis; gvplugin_installed_t types; CString reqtyp = new CString(64), typ = new CString(64); CString reqdep, dep , reqpkg; int i; int apidep; if (api == enumAsInt(api_t.class, "API_device") || api == enumAsInt(api_t.class, "API_loadimage")) /* api dependencies - FIXME - find better way to code these *s */ apidep = enumAsInt(api_t.class, "API_render"); else apidep = api; strncpy(reqtyp, str, 64 - 1); reqdep = strchr(reqtyp, ':'); if (reqdep!=null) { UNSUPPORTED("v4f234lwajz9y86dpuwr76x4"); // *reqdep++ = '\0'; UNSUPPORTED("bj9a4dr8mxpww0obi8zxgrz8n"); // reqpkg = strchr(reqdep, ':'); UNSUPPORTED("9de4oolo5nfmp3pn7rc8z7mpi"); // if (reqpkg) UNSUPPORTED("2web68ydx2ds095472meaj5uu"); // *reqpkg++ = '\0'; } else reqpkg = null; /* iterate the linked list of plugins for this api */ if (gvc!=null) return null; UNSUPPORTED("68d0gbzwhglez9tyb4bkt0lcd"); // for (pnext = &(gvc->apis[api]); *pnext; pnext = &((*pnext)->next)) { UNSUPPORTED("3axytqbyra7wocgomcecm4wlg"); // strncpy(typ, (*pnext)->typestr, 64 - 1); UNSUPPORTED("e5b2el2saiq79o4ykn7kmxwyt"); // dep = strchr(typ, ':'); UNSUPPORTED("chw9vqfst4822csk8kr1l0it"); // if (dep) UNSUPPORTED("6sqb7qw747g3hskwfejd5dcdt"); // *dep++ = '\0'; UNSUPPORTED("b60wz4e3fwt100yl0ccqx3iag"); // if (strcmp(typ, reqtyp)) UNSUPPORTED("1e1b2en921iu779xkfhuf9bty"); // continue; /* types empty or mismatched */ UNSUPPORTED("aluni9fobueuk3p10vji0llg5"); // if (dep && reqdep && strcmp(dep, reqdep)) UNSUPPORTED("bxrhpucln1iea8ytua2k3re1u"); // continue; /* dependencies not empty, but mismatched */ UNSUPPORTED("6u3aquvaxygyv1w8s3hgeeikl"); // if (!reqpkg || strcmp(reqpkg, (*pnext)->package->name) == 0) { UNSUPPORTED("e2bkyex2gkrmc414i8wvkb7xi"); // /* found with no packagename constraints, or with required matching packagname */ UNSUPPORTED("59jlxa3m4zama5p713kkyz5r4"); // if (dep && (apidep != api)) /* load dependency if needed, continue if can't find */ UNSUPPORTED("bsf9jjuzyv8iihk6zjrivkvcn"); // if (!(gvplugin_load(gvc, apidep, dep))) UNSUPPORTED("ci4p4wle87mwq773w72esmnae"); // continue; UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("27lmfyh0m79d94stpbddkdzrv"); // rv = *pnext; UNSUPPORTED("binj9wmdpb8vem5hhtbh5733n"); // if (rv && rv->typeptr == NULL) { UNSUPPORTED("15j4x1t80duys316q8r9fkkt1"); // library = gvplugin_library_load(gvc, rv->package->path); UNSUPPORTED("6pxp53rlv5d0tsd06clxz8vof"); // if (library) { UNSUPPORTED("d2alhhvljuuo0uf6nb3o1kp2g"); // /* Now activate the library with real type ptrs */ UNSUPPORTED("5umnd01nbv4ejzdswcukud4ah"); // for (apis = library->apis; (types = apis->types); apis++) { UNSUPPORTED("5qm5zem2mppsmhrid6q2g198g"); // for (i = 0; types[i].type; i++) { UNSUPPORTED("20c1krmmv0xuknbbvm603bvel"); // /* NB. quality is not checked or replaced UNSUPPORTED("dln3p27g47v58k0z2h13ce0mb"); // * in case user has manually edited quality in config */ UNSUPPORTED("8o3drgb2uqfbdsbqcd60n2hly"); // gvplugin_activate(gvc, apis->api, types[i].type, library->packagename, rv->package->path, &types[i]); UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("cx6aan764qxohieo76h56olf5"); // if (gvc->common.verbose >= 1) UNSUPPORTED("4k41k50htzpoy2mb5tmed3i8e"); // fprintf(stderr, "Activated plugin library: %s\n", rv->package->path ? rv->package->path : ""); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3qiszxrlm01hncks79ifwi9jh"); // /* one last check for successfull load */ UNSUPPORTED("42v8vw2rohnx3tnrmuc85yz2d"); // if (rv && rv->typeptr == NULL) UNSUPPORTED("7bu34crrs14254woee3o1yuk1"); // rv = NULL; UNSUPPORTED("930q30ejwekyhfjobgapch0l5"); // if (rv && gvc->common.verbose >= 1) UNSUPPORTED("790j90vrtpqkyprttlog78ciy"); // fprintf(stderr, "Using %s: %s:%s\n", api_names[api], rv->typestr, rv->package->name); UNSUPPORTED("1mos1622e46mcs6eq5qmg29ht"); // gvc->api[api] = rv; UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("dh7wri9ra8xvm9ur14gd95xjj","gvplugin_load"); } } //3 djkxwqwth7ib6sozs5hisbmqn // char *gvplugin_list(GVC_t * gvc, api_t api, const char *str) public static Object gvplugin_list(Object... arg) { UNSUPPORTED("1v2q9s4cymbg5u04i4iijkj4n"); // char *gvplugin_list(GVC_t * gvc, api_t api, const char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("iu9q9m87bgur91u4rdej8gle"); // static int first = 1; UNSUPPORTED("2nryve1urrjk2ojn2ep4669qr"); // gvplugin_available_t **pnext, **plugin; UNSUPPORTED("bsi41xgsfug6hif16t4rb3w79"); // char *bp; UNSUPPORTED("7yit1omzpv81sbfd8ic9njmz3"); // char *s, *p, *q, *typestr_last; UNSUPPORTED("238qefw0qt8363ih41k92sqw0"); // boolean new = NOT(0); UNSUPPORTED("4prm37g40ckj7wdk0oh3x5tpk"); // static agxbuf xb; UNSUPPORTED("9ts30vphzu6hcp7n5wjnsyj68"); // /* check for valid str */ UNSUPPORTED("1g6v7lgund5oa653abq3l4giy"); // if (!str) UNSUPPORTED("3kb0mwa3jlee9ipjt7wodtqqb"); // return NULL; UNSUPPORTED("7herqsihuvh0d9kz5ji1qn1b2"); // if (first) { UNSUPPORTED("5egh0r7y24qk0cmitame7fi9j"); // agxbinit(&xb, 0, 0); UNSUPPORTED("25bi98k3pjxa9e2o1ew408zrm"); // first = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5z1vnrg7jdoloz7tvs9qxhb9l"); // /* does str have a :path modifier? */ UNSUPPORTED("db1ruffpf3fw8xna0bpslcfn1"); // s = strdup(str); UNSUPPORTED("5j3dabf0pq8p53mdtvs1rv7l7"); // p = strchr(s, ':'); UNSUPPORTED("ay5e65kk8vtv8cnw1dgne9zid"); // if (p) UNSUPPORTED("9jbl9iuamc68i63byu5pa34io"); // *p++ = '\0'; UNSUPPORTED("bzrdeewfn36nuge9zi5rjnm9d"); // /* point to the beginning of the linked list of plugins for this api */ UNSUPPORTED("bpnso1nnkurwa2h11vhuvqbgg"); // plugin = &(gvc->apis[api]); UNSUPPORTED("7727bx9by5zwoh8mu62t47xxz"); // if (p) { /* if str contains a ':', and if we find a match for the type, UNSUPPORTED("7r1sb5y2yws0114vm7oqw0kmt"); // then just list the alternative paths for the plugin */ UNSUPPORTED("do1au3wtm7l8n5k0p2wi4ubmt"); // for (pnext = plugin; *pnext; pnext = &((*pnext)->next)) { UNSUPPORTED("dsb8znr5lqd1s0vh1d44tg7a"); // q = strdup((*pnext)->typestr); UNSUPPORTED("6cotg1zzmnapxko400gs8p1r2"); // if ((p = strchr(q, ':'))) UNSUPPORTED("7bgubhrg54zm297xpoilybwg"); // *p++ = '\0'; UNSUPPORTED("7r3m11wck3p42s4647xgxrt20"); // /* list only the matching type, or all types if s is an empty string */ UNSUPPORTED("cbol5gysdkqlqcslh5x2w7sti"); // if (!s[0] || strcasecmp(s, q) == 0) { UNSUPPORTED("844nl3vki2jqyi2mj6cfoo71z"); // /* list each member of the matching type as "type:path" */ UNSUPPORTED("dcvbas8gf45yzfoglkuxabrfq"); // ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)' '))); UNSUPPORTED("en79hx6rxblgi642wvla3tp3f"); // agxbput(&xb, (*pnext)->typestr); UNSUPPORTED("4u7tuiai7hrptmytjxjb59hme"); // ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)':'))); UNSUPPORTED("tmk8zqkywoslpl5rqdhlps83"); // agxbput(&xb, (*pnext)->package->name); UNSUPPORTED("5492g7k0znwwdhrhryxc6kd3v"); // new = 0; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("78r1pvho3mdwz7thgrt9lo0g9"); // free(q); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1m1k82h0prsffwgjj105oaqyq"); // free(s); UNSUPPORTED("7nk9vs246151cn14h3kz2q38g"); // if (new) { /* if the type was not found, or if str without ':', UNSUPPORTED("dakg0i7twu3pjraw1n6wq3ypq"); // then just list available types */ UNSUPPORTED("6sgnlgwkm8tt1u0lwxic3hpwn"); // typestr_last = NULL; UNSUPPORTED("do1au3wtm7l8n5k0p2wi4ubmt"); // for (pnext = plugin; *pnext; pnext = &((*pnext)->next)) { UNSUPPORTED("8ug6yi4wu9jv2mwfem68i3btd"); // /* list only one instance of type */ UNSUPPORTED("dsb8znr5lqd1s0vh1d44tg7a"); // q = strdup((*pnext)->typestr); UNSUPPORTED("6cotg1zzmnapxko400gs8p1r2"); // if ((p = strchr(q, ':'))) UNSUPPORTED("7bgubhrg54zm297xpoilybwg"); // *p++ = '\0'; UNSUPPORTED("ak5wb5un7zn45o0a7vmxks8ar"); // if (!typestr_last || strcasecmp(typestr_last, q) != 0) { UNSUPPORTED("a5m9n0v5k4shjsi1dhd9769dx"); // /* list it as "type" i.e. w/o ":path" */ UNSUPPORTED("dcvbas8gf45yzfoglkuxabrfq"); // ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)' '))); UNSUPPORTED("aqu5zlkjcyexkyv3zrenxdtik"); // agxbput(&xb, q); UNSUPPORTED("5492g7k0znwwdhrhryxc6kd3v"); // new = 0; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("23xvu0c1equ3bzmgwwfp66etl"); // if (!typestr_last) UNSUPPORTED("cs5nhx0phv9qt4b3i2sc0qvpc"); // free(typestr_last); UNSUPPORTED("1k2kc951dgdzikaj2uy7wbsor"); // typestr_last = q; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("5tmdkz8l68iig5emc3gzwzosb"); // if (!typestr_last) UNSUPPORTED("4detj70lj7h5yymdlzkb5jyeh"); // free(typestr_last); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("aliy0fspw4omzb11sq9ftypvb"); // if (new) UNSUPPORTED("2fixk6x7x06lrtw0cgj4g1f64"); // bp = ""; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("45p6mggceizuz32pp72ykxok1"); // bp = (((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf)); UNSUPPORTED("bgo7070e5cs998w6zp1ma85ad"); // return bp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9rv6x5a14kebbqbr097thlusw // char **gvPluginList(GVC_t * gvc, char *kind, int *sz, char *str) public static Object gvPluginList(Object... arg) { UNSUPPORTED("8ubqe7erabaqlpa8x948629d5"); // char **gvPluginList(GVC_t * gvc, char *kind, int *sz, char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6ugrq6sc21ihshl3bbzco6fos"); // int api; UNSUPPORTED("2nryve1urrjk2ojn2ep4669qr"); // gvplugin_available_t **pnext, **plugin; UNSUPPORTED("behjm5bjsenezpg3f7cncvteu"); // int cnt = 0; UNSUPPORTED("30dos1yzu5kemx2mi15uky7wo"); // char **list = NULL; UNSUPPORTED("2juf5deqc26bjkvm2w9b75wn0"); // char *p, *q, *typestr_last; UNSUPPORTED("cgivdkgckant9nqbakv35ipqv"); // if (!kind) UNSUPPORTED("3kb0mwa3jlee9ipjt7wodtqqb"); // return NULL; UNSUPPORTED("c57imqe71hagsxekx4tv822e"); // for (api = 0; api < (sizeof(api_names)/sizeof(api_names[0])); api++) { UNSUPPORTED("esq1wuyzmawio8qvhb74jj9wo"); // if (!strcasecmp(kind, api_names[api])) UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("adydg893zqt46m6sj3ilro33h"); // if (api == (sizeof(api_names)/sizeof(api_names[0]))) { UNSUPPORTED("3kwn70ufg1m5839pzkvyml804"); // agerr(AGERR, "unrecognized api name \"%s\"\n", kind); UNSUPPORTED("3kb0mwa3jlee9ipjt7wodtqqb"); // return NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bzrdeewfn36nuge9zi5rjnm9d"); // /* point to the beginning of the linked list of plugins for this api */ UNSUPPORTED("bpnso1nnkurwa2h11vhuvqbgg"); // plugin = &(gvc->apis[api]); UNSUPPORTED("a83ef3wxlcw8fabtifuppijgo"); // typestr_last = NULL; UNSUPPORTED("1fz5gcvaztkf8wb6oxldcjr9q"); // for (pnext = plugin; *pnext; pnext = &((*pnext)->next)) { UNSUPPORTED("7pxd51cylsaep4l0bnpyuddtj"); // /* list only one instance of type */ UNSUPPORTED("b32pvhd78roito0slq24bqddt"); // q = strdup((*pnext)->typestr); UNSUPPORTED("9fgs8d3xx629l8b1i2ssjvyve"); // if ((p = strchr(q, ':'))) UNSUPPORTED("8drindhjm9x48eycs6b69an8b"); // *p++ = '\0'; UNSUPPORTED("8qntak9jd9prc2qudpz2in3k"); // if (!typestr_last || strcasecmp(typestr_last, q) != 0) { UNSUPPORTED("30zv25964y6j1ihp7c1m34s71"); // list = RALLOC(cnt + 1, list, char *); UNSUPPORTED("3hmlmi87kwlontlcidxvuw525"); // list[cnt++] = q; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("4isl6kj4pbcfd7zbzjkkij6u0"); // typestr_last = q; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8mx4gi10bdqgitnotw1pu7zii"); // *sz = cnt; UNSUPPORTED("1a5vgaasp2bunvu19mvepzcny"); // return list; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3kbm1klgxj6tigy5o90ir8zg1 // void gvplugin_write_status(GVC_t * gvc) public static Object gvplugin_write_status(Object... arg) { UNSUPPORTED("j7nfpijl0849ghbgk3ia1jmg"); // void gvplugin_write_status(GVC_t * gvc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6ugrq6sc21ihshl3bbzco6fos"); // int api; UNSUPPORTED("c57imqe71hagsxekx4tv822e"); // for (api = 0; api < (sizeof(api_names)/sizeof(api_names[0])); api++) { UNSUPPORTED("bhgr122ktcnbjllxx1h1vsrrw"); // if (gvc->common.verbose >= 2) UNSUPPORTED("8pobdr5kntx66kzr39l7tpepf"); // fprintf(stderr, " %s\t: %s\n", api_names[api], gvplugin_list(gvc, api, ":")); UNSUPPORTED("35nw1pbiz2p3s6qwlam5eoo3m"); // else UNSUPPORTED("3jfqbxmf9owghyg7jmnmocsnt"); // fprintf(stderr, " %s\t: %s\n", api_names[api], gvplugin_list(gvc, api, "?")); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 385wh7mf4m0odlw2tyexnt9fe // Agraph_t *gvplugin_graph(GVC_t * gvc) public static Object gvplugin_graph(Object... arg) { UNSUPPORTED("6nb21wnge36ef7jtbggj9thf2"); // Agraph_t *gvplugin_graph(GVC_t * gvc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3menvgua8fqm47un1b16gdvcy"); // Agraph_t *g, *sg, *ssg; UNSUPPORTED("eorl8dqb83dvnhrq5o9r8wu8b"); // Agnode_t *n, *m, *loadimage_n, *renderer_n, *device_n, *textlayout_n, *layout_n; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("6fh2f49mjcser5usqcg36hkjn"); // Agsym_t *a; UNSUPPORTED("as58mgqb4uw4c8n4sdq7m0qz3"); // gvplugin_package_t *package; UNSUPPORTED("55hy9lq9jka8phhommr24dbxn"); // gvplugin_available_t **pnext; UNSUPPORTED("bs13kw4stjxanch12vhr9ypft"); // char bufa[100], *buf1, *buf2, bufb[100], *p, *q, *lq, *t; UNSUPPORTED("aggfixnfqse53x64q18c9q14p"); // int api, neededge_loadimage, neededge_device; UNSUPPORTED("bfb67djvjstmbi3ox2487rp37"); // g = agopen("G", Agdirected, ((Agdisc_t *)0)); UNSUPPORTED("a1fyubzrynjisxnyp7m1ihueg"); // agattr(g, AGRAPH, "label", ""); UNSUPPORTED("4e2jiv8yamrewe6ksk5zrsnwv"); // agattr(g, AGRAPH, "rankdir", ""); UNSUPPORTED("50q1kfgx0ghhu8odg96kw8fs7"); // agattr(g, AGRAPH, "rank", ""); UNSUPPORTED("bunp522dqapufpqzuamgcu3hv"); // agattr(g, AGRAPH, "ranksep", ""); UNSUPPORTED("3rygbmzp3xb72un29edzt335o"); // agattr(g, AGNODE, "label", "\\N"); UNSUPPORTED("3z876e4purw1c7esq4uhmny0i"); // agattr(g, AGNODE, "shape", ""); UNSUPPORTED("a6m5pjlnbvb4s28gu7s1ojboc"); // agattr(g, AGNODE, "style", ""); UNSUPPORTED("6leyn7o59iyhn79chw4g2raok"); // agattr(g, AGNODE, "width", ""); UNSUPPORTED("8zifbwr3w2enafutiq0uiqql5"); // agattr(g, AGEDGE, "style", ""); UNSUPPORTED("aq4bek4z8gwfafy4eqdj0bg7y"); // a = (agattr(g,AGRAPH,"rankdir",NULL)); UNSUPPORTED("3mcwzuopezhg9zu1a064nqqqs"); // agxset(g, a, "LR"); UNSUPPORTED("ehvk8kqfqmm928y14jj1fyptw"); // a = (agattr(g,AGRAPH,"ranksep",NULL)); UNSUPPORTED("tlomujw8p0j9c5on5ca3sydv"); // agxset(g, a, "2.5"); UNSUPPORTED("3xw2yj2ppc60hl0xfkixh8knl"); // a = (agattr(g,AGRAPH,"label",NULL)); UNSUPPORTED("9moa7sx9scygioe1lfhl5gti2"); // agxset(g, a, "Plugins"); UNSUPPORTED("dxez6ixf69034ajdfut2rqeet"); // for (package = gvc->packages; package; package = package->next) { UNSUPPORTED("bf8adr5qnsvjqx5qns54i8tn9"); // loadimage_n = renderer_n = device_n = textlayout_n = layout_n = NULL; UNSUPPORTED("cdntyqdyu5kxqzvikw6wb31b4"); // neededge_loadimage = neededge_device = 0; UNSUPPORTED("cums1juqtdftirv4v2bxbhmrc"); // strcpy(bufa, "cluster_"); UNSUPPORTED("a9jdx8yky0gmnv97qotzgfww7"); // strcat(bufa, package->name); UNSUPPORTED("bwwlvwa8fbmnujvtiakczg1ns"); // sg = agsubg(g, bufa, 1); UNSUPPORTED("e8gwcodb51qd7k2lwfvvqvvo"); // a = (agattr(sg,AGRAPH,"label",NULL)); UNSUPPORTED("7esplh8cd9vm0dfnqhc5stpun"); // agxset(sg, a, package->name); UNSUPPORTED("1y0pkakd59jobmrnly5pe492d"); // strcpy(bufa, package->name); UNSUPPORTED("f068fnelxn6otng4job1isiqk"); // strcat(bufa, "_"); UNSUPPORTED("3uwc64reta96fsluddki1x02u"); // buf1 = bufa + strlen(bufa); UNSUPPORTED("2481o7hqcvd95u8otj2xj8h7g"); // for (api = 0; api < (sizeof(api_names)/sizeof(api_names[0])); api++) { UNSUPPORTED("7w6sj318auxb1nm6gij82t9ul"); // strcpy(buf1, api_names[api]); UNSUPPORTED("avhemu67qkwe5v8bk26p66wz4"); // ssg = agsubg(sg, bufa, 1); UNSUPPORTED("45h3i52r4pqzfrw0492c04fcc"); // a = (agattr(ssg,AGRAPH,"rank",NULL)); UNSUPPORTED("brlchbdxheybsfnn94jmrpwgm"); // agxset(ssg, a, "same"); UNSUPPORTED("afqb6io8t5c2jx4mvtyqo9m5l"); // strcat(buf1, "_"); UNSUPPORTED("23a6yglzvhmu09en6w5u95vyl"); // buf2 = bufa + strlen(bufa); UNSUPPORTED("anrt511ktu6c1ohrknoyj2epj"); // for (pnext = &(gvc->apis[api]); *pnext; pnext = &((*pnext)->next)) { UNSUPPORTED("6dr25usep0b15n58ef6fu3oxm"); // if ((*pnext)->package == package) { UNSUPPORTED("65b0l808fcuc6ypxzzjh66rbu"); // t = q = strdup((*pnext)->typestr); UNSUPPORTED("ef0iev1i1soawhu10e9f16lwp"); // if ((p = strchr(q, ':'))) UNSUPPORTED("13cb27lx5rvfloiy3u0m2ct8i"); // *p++ = '\0'; UNSUPPORTED("79iuiybxt6jyodedjzurqwq8"); // /* Now p = renderer, e.g. "gd" UNSUPPORTED("czck0qt486a81d5w4k2ecl36c"); // * and q = device, e.g. "png" UNSUPPORTED("du4rqorwcs1krr7h07o7pxpo8"); // * or q = loadimage, e.g. "png" */ UNSUPPORTED("vok0igs7eybz3wbqr8b9rd6d"); // switch (api) { UNSUPPORTED("537u9j534djot38xzhef8kuw0"); // case API_device: UNSUPPORTED("2ahk4ggyn6n91llpssccwrszr"); // case API_loadimage: UNSUPPORTED("4813gad8fplc0u4yu1j13pojn"); // /* draw device as box - record last device in plugin (if any) in device_n */ UNSUPPORTED("7y87fc4aqkcxbin29dr01pbgu"); // /* draw loadimage as box - record last loadimage in plugin (if any) in loadimage_n */ UNSUPPORTED("6qd2eqsf6xctb7gtf59n0soo5"); // /* hack for aliases */ UNSUPPORTED("cexdnvb0dl9pabgm5murg0b0n"); // lq = q; UNSUPPORTED("3xzw0vivz64lag4dptx9g5a0d"); // if (!strncmp(q, "jp", 2)) { UNSUPPORTED("ewcsa7pcj7k4n0a4gurtm1cxy"); // q = "jpg"; /* canonical - for node name */ UNSUPPORTED("a7ssoc631z58w6cvw8qs9h482"); // lq = "jpeg\\njpe\\njpg"; /* list - for label */ UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("f3zj81pisaget09ye2myt37j1"); // else if (!strncmp(q, "tif", 3)) { UNSUPPORTED("c8g49w95mb5fjogr5rag7c9b7"); // q = "tif"; UNSUPPORTED("d7d2h9cwi2j3xwcoo6lvaukad"); // lq = "tiff\\ntif"; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("1sphayc69paz5l9dvh0jj7z89"); // else if (!strcmp(q, "x11") || !strcmp(q, "xlib")) { UNSUPPORTED("esmtqyrz6ef8t0dmmr7ku49ca"); // q = "x11"; UNSUPPORTED("26miooe9mi3toaebdw4mi78bn"); // lq = "x11\\nxlib"; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("grfjtdws4pjp88by2kz3xbf9"); // else if (!strcmp(q, "dot") || !strcmp(q, "gv")) { UNSUPPORTED("7xrtizhekgbnv8pbx1un51s0e"); // q = "gv"; UNSUPPORTED("xm3r5bxze6a4s5brncmx55uz"); // lq = "gv\\ndot"; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("9vpx2ez7z7r7hmcnzanpuvuwl"); // strcpy(buf2, q); UNSUPPORTED("f0p1ey8ki67kdf0tiq0uajpj2"); // n = agnode(ssg, bufa, 1); UNSUPPORTED("ew5vz5eb3q5kvfym5i7fe6mbo"); // a = (agattr(g,AGNODE,"label",NULL)); UNSUPPORTED("34ws9xsuwwhsxm8t5z9cfl391"); // agxset(n, a, lq); UNSUPPORTED("9ryzc4o0n4g7w6x6fduxa1ptj"); // a = (agattr(g,AGNODE,"width",NULL)); UNSUPPORTED("1nijtx0lnxkepvonuehz2v8nc"); // agxset(n, a, "1.0"); UNSUPPORTED("9jgz5bwiy8ahdcy5p8qp88tuu"); // a = (agattr(g,AGNODE,"shape",NULL)); UNSUPPORTED("iphdmh8qpmzi4jg13u83btxc"); // if (api == API_device) { UNSUPPORTED("73os7qvmone60i8ohw1vrgs5h"); // agxset(n, a, "box"); UNSUPPORTED("c68ibsn8h2t382b2zf9xhh9k8"); // device_n = n; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("9phbxix4152jfxnvknp58uxhr"); // else { UNSUPPORTED("73os7qvmone60i8ohw1vrgs5h"); // agxset(n, a, "box"); UNSUPPORTED("8vxadjliase6z6z6jjen07nr0"); // loadimage_n = n; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("5j7863t4gzmxk003j2wkmbyfr"); // if (!(p && *p)) { UNSUPPORTED("6hhxcel5e3k3s50ztx5ijlnj2"); // strcpy(bufb, "render_cg"); UNSUPPORTED("8fcmk3sn0q48qns9rus70n94t"); // m = (agnode(sg,bufb,0)); UNSUPPORTED("4wxlgboqqydxokw7z48yjwwsk"); // if (!m) { UNSUPPORTED("eorutr989m9n47djxrzlvinre"); // m = agnode(sg, bufb, 1); UNSUPPORTED("2g5ydrx9oje1fqabmpbq3s3ov"); // a = (agattr(g,AGRAPH,"label",NULL)); UNSUPPORTED("ckyunebz4o95whifludcfto5y"); // agxset(m, a, "cg"); UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("bl0by7x2x63u4cddz6p76krsq"); // agedge(sg, m, n, NULL, 1); UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("ejprhlzyhagmn5fs7yommr2j2"); // case API_render: UNSUPPORTED("14erysh1po9utm5fnkzdk8h2v"); // /* draw renderers as ellipses - record last renderer in plugin (if any) in renderer_n */ UNSUPPORTED("1xb2oi8i8tn0ka8we1piuzpim"); // strcpy(bufb, api_names[api]); UNSUPPORTED("b2ffyj84jqbpr7gkz66w7gdfi"); // strcat(bufb, "_"); UNSUPPORTED("f33i9wwsaa2gqto7mi4m2qi2l"); // strcat(bufb, q); UNSUPPORTED("67jb48grjetd4ld7jrxirrz27"); // renderer_n = n = agnode(ssg, bufb, 1); UNSUPPORTED("ew5vz5eb3q5kvfym5i7fe6mbo"); // a = (agattr(g,AGNODE,"label",NULL)); UNSUPPORTED("398rxem81slrk9uhcc70hjvj5"); // agxset(n, a, q); UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("8lowpeewxipsp6igvajo6vn3q"); // case API_textlayout: UNSUPPORTED("3anh9q6cafg6buq0k8t4mhn0m"); // /* draw textlayout as invtriangle - record last textlayout in plugin (if any) in textlayout_n */ UNSUPPORTED("151239bfhh0n8pv73xyptt3k4"); // /* FIXME? only one textlayout is loaded. Why? */ UNSUPPORTED("1xb2oi8i8tn0ka8we1piuzpim"); // strcpy(bufb, api_names[api]); UNSUPPORTED("b2ffyj84jqbpr7gkz66w7gdfi"); // strcat(bufb, "_"); UNSUPPORTED("f33i9wwsaa2gqto7mi4m2qi2l"); // strcat(bufb, q); UNSUPPORTED("1syanvrlsdy49u0f41utfrjid"); // textlayout_n = n = agnode(ssg, bufb, 1); UNSUPPORTED("9jgz5bwiy8ahdcy5p8qp88tuu"); // a = (agattr(g,AGNODE,"shape",NULL)); UNSUPPORTED("6zjljs5ffo5sz4bu8ilug5yda"); // agxset(n, a, "invtriangle"); UNSUPPORTED("ew5vz5eb3q5kvfym5i7fe6mbo"); // a = (agattr(g,AGNODE,"label",NULL)); UNSUPPORTED("7b2du9f2jwped529eabfzt9fg"); // agxset(n, a, "T"); UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("3pmhas5tbx2cbteqfpv03v5fu"); // case API_layout: UNSUPPORTED("ax8q182020n661ov8ohm9a6m7"); // /* draw textlayout as hexagon - record last layout in plugin (if any) in layout_n */ UNSUPPORTED("1xb2oi8i8tn0ka8we1piuzpim"); // strcpy(bufb, api_names[api]); UNSUPPORTED("b2ffyj84jqbpr7gkz66w7gdfi"); // strcat(bufb, "_"); UNSUPPORTED("f33i9wwsaa2gqto7mi4m2qi2l"); // strcat(bufb, q); UNSUPPORTED("4v4ck4nx3ujudbz4xu97y8pja"); // layout_n = n = agnode(ssg, bufb, 1); UNSUPPORTED("9jgz5bwiy8ahdcy5p8qp88tuu"); // a = (agattr(g,AGNODE,"shape",NULL)); UNSUPPORTED("bb0ntn8aeb3zazu8ey0obzu15"); // agxset(n, a, "hexagon"); UNSUPPORTED("ew5vz5eb3q5kvfym5i7fe6mbo"); // a = (agattr(g,AGNODE,"label",NULL)); UNSUPPORTED("398rxem81slrk9uhcc70hjvj5"); // agxset(n, a, q); UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("8qbfja4j8nk5tpqj2tov9bz7k"); // default: UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("96y712urx48a31tm7axlbked3"); // free(t); UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("5h24p1a6i7n7z2rewzjwa7x7a"); // // add some invisible nodes (if needed) and invisible edges to UNSUPPORTED("ayulfxznlxx76fxza9x1zt0bs"); // // improve layout of cluster UNSUPPORTED("7fn5mnm3ehijb6yn0ii88u75m"); // if (api == API_loadimage && !loadimage_n) { UNSUPPORTED("3ap79y3kpdlpkm28fyl6kpny3"); // neededge_loadimage = 1; UNSUPPORTED("1dkhoy9x4ajw87bhi1n0bj6ng"); // strcpy(buf2, "invis"); UNSUPPORTED("5u8kn8vzm4lo6zb84coftfpfw"); // loadimage_n = n = agnode(ssg, bufa, 1); UNSUPPORTED("7o7hre8zqwlcxhzorrolv9e85"); // a = (agattr(g,AGNODE,"style",NULL)); UNSUPPORTED("a87bqjg6zgpw0z22ownmwop0"); // agxset(n, a, "invis"); UNSUPPORTED("4ab5c0xio7c2uz7py5r7deg01"); // a = (agattr(g,AGNODE,"label",NULL)); UNSUPPORTED("7hukloum1odusy26c046jdkc8"); // agxset(n, a, ""); UNSUPPORTED("5mlb6kvjaiib201snwdmdr9q0"); // a = (agattr(g,AGNODE,"width",NULL)); UNSUPPORTED("2xc7bzvf6ob2s9xeqlm6x1d6k"); // agxset(n, a, "1.0"); UNSUPPORTED("e1dyn485bxibogxi1e14o12k"); // strcpy(buf2, "invis_src"); UNSUPPORTED("ca015skn3nb4erm6ur2ghjf3w"); // n = agnode(g, bufa, 1); UNSUPPORTED("7o7hre8zqwlcxhzorrolv9e85"); // a = (agattr(g,AGNODE,"style",NULL)); UNSUPPORTED("a87bqjg6zgpw0z22ownmwop0"); // agxset(n, a, "invis"); UNSUPPORTED("4ab5c0xio7c2uz7py5r7deg01"); // a = (agattr(g,AGNODE,"label",NULL)); UNSUPPORTED("7hukloum1odusy26c046jdkc8"); // agxset(n, a, ""); UNSUPPORTED("djnhybur2i8kaeqd3v2wh61mi"); // e = agedge(g, n, loadimage_n, NULL, 1); UNSUPPORTED("3ll814mhwafdmqehxubga8910"); // a = (agattr(g,AGEDGE,"style",NULL)); UNSUPPORTED("61xoac063mvbmjcqfqt21eokk"); // agxset(e, a, "invis"); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("a9m2rhjryvh4zlt3d5reetg7"); // if (api == API_render && !renderer_n) { UNSUPPORTED("3ap79y3kpdlpkm28fyl6kpny3"); // neededge_loadimage = 1; UNSUPPORTED("3wl7hkqasxla4j1t5327xgayk"); // neededge_device = 1; UNSUPPORTED("1dkhoy9x4ajw87bhi1n0bj6ng"); // strcpy(buf2, "invis"); UNSUPPORTED("1mrxv8jb78g2n110y56t7dcsu"); // renderer_n = n = agnode(ssg, bufa, 1); UNSUPPORTED("7o7hre8zqwlcxhzorrolv9e85"); // a = (agattr(g,AGNODE,"style",NULL)); UNSUPPORTED("a87bqjg6zgpw0z22ownmwop0"); // agxset(n, a, "invis"); UNSUPPORTED("4ab5c0xio7c2uz7py5r7deg01"); // a = (agattr(g,AGNODE,"label",NULL)); UNSUPPORTED("7hukloum1odusy26c046jdkc8"); // agxset(n, a, ""); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("8eo2rue615e2ot6h2z4v52ct9"); // if (api == API_device && !device_n) { UNSUPPORTED("3wl7hkqasxla4j1t5327xgayk"); // neededge_device = 1; UNSUPPORTED("1dkhoy9x4ajw87bhi1n0bj6ng"); // strcpy(buf2, "invis"); UNSUPPORTED("duavp9nrrarxvmphayikzxkt0"); // device_n = n = agnode(ssg, bufa, 1); UNSUPPORTED("7o7hre8zqwlcxhzorrolv9e85"); // a = (agattr(g,AGNODE,"style",NULL)); UNSUPPORTED("a87bqjg6zgpw0z22ownmwop0"); // agxset(n, a, "invis"); UNSUPPORTED("4ab5c0xio7c2uz7py5r7deg01"); // a = (agattr(g,AGNODE,"label",NULL)); UNSUPPORTED("7hukloum1odusy26c046jdkc8"); // agxset(n, a, ""); UNSUPPORTED("5mlb6kvjaiib201snwdmdr9q0"); // a = (agattr(g,AGNODE,"width",NULL)); UNSUPPORTED("2xc7bzvf6ob2s9xeqlm6x1d6k"); // agxset(n, a, "1.0"); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("ea5rcrkyfmlz7wkyklke00w6h"); // if (neededge_loadimage) { UNSUPPORTED("285jwi6fbnlqqhob69z2lcc2b"); // e = agedge(sg, loadimage_n, renderer_n, NULL, 1); UNSUPPORTED("52vrd3arfv8vio47p5o9el4bw"); // a = (agattr(g,AGEDGE,"style",NULL)); UNSUPPORTED("2txt2q7rp21dx0sbl681klq05"); // agxset(e, a, "invis"); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("43dps2s0i0lx8ovced3n50ae7"); // if (neededge_device) { UNSUPPORTED("5rsv582ie5yqsj5xbuuoiih3l"); // e = agedge(sg, renderer_n, device_n, NULL, 1); UNSUPPORTED("52vrd3arfv8vio47p5o9el4bw"); // a = (agattr(g,AGEDGE,"style",NULL)); UNSUPPORTED("2txt2q7rp21dx0sbl681klq05"); // agxset(e, a, "invis"); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("43w8fzyp2lxd8j9ml5y5dgdwk"); // if (textlayout_n) { UNSUPPORTED("bxkq1pl2h9gjoa6dsiev9u5y9"); // e = agedge(sg, loadimage_n, textlayout_n, NULL, 1); UNSUPPORTED("52vrd3arfv8vio47p5o9el4bw"); // a = (agattr(g,AGEDGE,"style",NULL)); UNSUPPORTED("2txt2q7rp21dx0sbl681klq05"); // agxset(e, a, "invis"); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("duv0z9gkoklt1x38eez53jfmp"); // if (layout_n) { UNSUPPORTED("exu5iyb4thidap90e10p6bchh"); // e = agedge(sg, loadimage_n, layout_n, NULL, 1); UNSUPPORTED("52vrd3arfv8vio47p5o9el4bw"); // a = (agattr(g,AGEDGE,"style",NULL)); UNSUPPORTED("2txt2q7rp21dx0sbl681klq05"); // agxset(e, a, "invis"); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8pdyobus2g8zf0grucggpdgu2"); // ssg = agsubg(g, "output_formats", 1); UNSUPPORTED("3mxeulyjvwis2b09446ijgh1w"); // a = (agattr(ssg,AGRAPH,"rank",NULL)); UNSUPPORTED("c5ime4x862kwcy2h623ikguda"); // agxset(ssg, a, "same"); UNSUPPORTED("dxez6ixf69034ajdfut2rqeet"); // for (package = gvc->packages; package; package = package->next) { UNSUPPORTED("1y0pkakd59jobmrnly5pe492d"); // strcpy(bufa, package->name); UNSUPPORTED("f068fnelxn6otng4job1isiqk"); // strcat(bufa, "_"); UNSUPPORTED("3uwc64reta96fsluddki1x02u"); // buf1 = bufa + strlen(bufa); UNSUPPORTED("2481o7hqcvd95u8otj2xj8h7g"); // for (api = 0; api < (sizeof(api_names)/sizeof(api_names[0])); api++) { UNSUPPORTED("7w6sj318auxb1nm6gij82t9ul"); // strcpy(buf1, api_names[api]); UNSUPPORTED("afqb6io8t5c2jx4mvtyqo9m5l"); // strcat(buf1, "_"); UNSUPPORTED("23a6yglzvhmu09en6w5u95vyl"); // buf2 = bufa + strlen(bufa); UNSUPPORTED("anrt511ktu6c1ohrknoyj2epj"); // for (pnext = &(gvc->apis[api]); *pnext; pnext = &((*pnext)->next)) { UNSUPPORTED("6dr25usep0b15n58ef6fu3oxm"); // if ((*pnext)->package == package) { UNSUPPORTED("65b0l808fcuc6ypxzzjh66rbu"); // t = q = strdup((*pnext)->typestr); UNSUPPORTED("ef0iev1i1soawhu10e9f16lwp"); // if ((p = strchr(q, ':'))) UNSUPPORTED("13cb27lx5rvfloiy3u0m2ct8i"); // *p++ = '\0'; UNSUPPORTED("79iuiybxt6jyodedjzurqwq8"); // /* Now p = renderer, e.g. "gd" UNSUPPORTED("czck0qt486a81d5w4k2ecl36c"); // * and q = device, e.g. "png" UNSUPPORTED("3r59dtblowlbzl2v8t7uspgsp"); // * or q = imageloader, e.g. "png" */ UNSUPPORTED("3p4ns3y9z2pqqi59kyknbb3yg"); // /* hack for aliases */ UNSUPPORTED("7w37ohsccjgvia3p6r6af8qcj"); // lq = q; UNSUPPORTED("9njl6eyfqvys51resxaqqhpl9"); // if (!strncmp(q, "jp", 2)) { UNSUPPORTED("ckfltz21pk0nwntjwuhpcke1h"); // q = "jpg"; /* canonical - for node name */ UNSUPPORTED("7dwsfzj83wdllli75k9fyax4a"); // lq = "jpeg\\njpe\\njpg"; /* list - for label */ UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("64tfubc9gvf7840j3sh3u3zft"); // else if (!strncmp(q, "tif", 3)) { UNSUPPORTED("3tdr550x3i9yczq94vlp3cjrr"); // q = "tif"; UNSUPPORTED("4nf0ph2rmfboyseyzszz2qnzv"); // lq = "tiff\\ntif"; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("9p8e7eqshet4t7x2493ggtf3s"); // else if (!strcmp(q, "x11") || !strcmp(q, "xlib")) { UNSUPPORTED("a3foiv0r7ajucfbmer64xxvnu"); // q = "x11"; UNSUPPORTED("bmikkk8ek5dthuc6ppq9pdnb5"); // lq = "x11\\nxlib"; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("3gn9h8dqg7asoqu5wqsbumtsy"); // else if (!strcmp(q, "dot") || !strcmp(q, "gv")) { UNSUPPORTED("bypbf1vtvkby1d6fgnvshw0ww"); // q = "gv"; UNSUPPORTED("btvkzgly229sjva0l7i1ksx34"); // lq = "gv\\ndot"; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("vok0igs7eybz3wbqr8b9rd6d"); // switch (api) { UNSUPPORTED("537u9j534djot38xzhef8kuw0"); // case API_device: UNSUPPORTED("9vpx2ez7z7r7hmcnzanpuvuwl"); // strcpy(buf2, q); UNSUPPORTED("6beg6steom1lipq49vms1n7pd"); // n = agnode(g, bufa, 1); UNSUPPORTED("7cg1174hrklv6wp6m9rglukr1"); // strcpy(bufb, "output_"); UNSUPPORTED("f33i9wwsaa2gqto7mi4m2qi2l"); // strcat(bufb, q); UNSUPPORTED("5xz9n2ow5mdbsx7e6kzkzgiyr"); // m = (agnode(ssg,bufb,0)); UNSUPPORTED("6aphvjhre5uyhw4g9kp9w2bcn"); // if (!m) { UNSUPPORTED("e1lgc4753eph0h3sp977j717y"); // m = agnode(ssg, bufb, 1); UNSUPPORTED("2f2dayxas7dqyzuuswa61003k"); // a = (agattr(g,AGNODE,"label",NULL)); UNSUPPORTED("39s7fbve2dyhi4yveemthhkpq"); // agxset(m, a, lq); UNSUPPORTED("el72qil7ij91mjxa8a5odjpyp"); // a = (agattr(g,AGNODE,"shape",NULL)); UNSUPPORTED("9867goebe7qr58a2zc5kkcdal"); // agxset(m, a, "note"); UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("5w6ooc4z9lx3qipxam9fg1c40"); // e = (agedge(g,n,m,NULL,0)); UNSUPPORTED("339jknwe6xhll69xqjj2cvcwb"); // if (!e) UNSUPPORTED("anwjqr4qvhqt6105wrt0zl2s7"); // e = agedge(g, n, m, NULL, 1); UNSUPPORTED("8bahgorvs584f9par6ha6lgv3"); // if (p && *p) { UNSUPPORTED("2d8y9y4cc4hlzs9px4pfz8k55"); // strcpy(bufb, "render_"); UNSUPPORTED("euk5d25u4dauhe1e7hro07l47"); // strcat(bufb, p); UNSUPPORTED("170sjop64mtpzl82mcv9acoib"); // m = (agnode(ssg,bufb,0)); UNSUPPORTED("1hxqs0bqqe653jp49plnovu1m"); // if (!m) UNSUPPORTED("d1b3c5rl5aribzx1df92k1qio"); // m = agnode(g, bufb, 1); UNSUPPORTED("3gq8hene8xn12nd3ipfn9ivrs"); // e = (agedge(g,m,n,NULL,0)); UNSUPPORTED("b5y5e8gcqt9y6990olht7ytej"); // if (!e) UNSUPPORTED("1ybtgtz7xpat58fa8p83pgv10"); // e = agedge(g, m, n, NULL, 1); UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("2ahk4ggyn6n91llpssccwrszr"); // case API_loadimage: UNSUPPORTED("9vpx2ez7z7r7hmcnzanpuvuwl"); // strcpy(buf2, q); UNSUPPORTED("6beg6steom1lipq49vms1n7pd"); // n = agnode(g, bufa, 1); UNSUPPORTED("ant2irrvw28wcz7rf8gatnt2t"); // strcpy(bufb, "input_"); UNSUPPORTED("f33i9wwsaa2gqto7mi4m2qi2l"); // strcat(bufb, q); UNSUPPORTED("3vtn4ccxx1kkweolpg9szuvfq"); // m = (agnode(g,bufb,0)); UNSUPPORTED("6aphvjhre5uyhw4g9kp9w2bcn"); // if (!m) { UNSUPPORTED("e8owtqqc9tvhvg2wm849li9e1"); // m = agnode(g, bufb, 1); UNSUPPORTED("2f2dayxas7dqyzuuswa61003k"); // a = (agattr(g,AGNODE,"label",NULL)); UNSUPPORTED("39s7fbve2dyhi4yveemthhkpq"); // agxset(m, a, lq); UNSUPPORTED("el72qil7ij91mjxa8a5odjpyp"); // a = (agattr(g,AGNODE,"shape",NULL)); UNSUPPORTED("9867goebe7qr58a2zc5kkcdal"); // agxset(m, a, "note"); UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("bls5v8akxuv7z7dcvvkonfz30"); // e = (agedge(g,m,n,NULL,0)); UNSUPPORTED("339jknwe6xhll69xqjj2cvcwb"); // if (!e) UNSUPPORTED("7i9gsti37xh44rgzkpw7sr85n"); // e = agedge(g, m, n, NULL, 1); UNSUPPORTED("cquipnholxdq7tu8j1n49bwra"); // strcpy(bufb, "render_"); UNSUPPORTED("21c5axqrutv5e16vwe4vnaf6r"); // strcat(bufb, p); UNSUPPORTED("3vtn4ccxx1kkweolpg9szuvfq"); // m = (agnode(g,bufb,0)); UNSUPPORTED("bmno3kcacc6pk7z8jwcni8hqv"); // if (!m) UNSUPPORTED("e8owtqqc9tvhvg2wm849li9e1"); // m = agnode(g, bufb, 1); UNSUPPORTED("5w6ooc4z9lx3qipxam9fg1c40"); // e = (agedge(g,n,m,NULL,0)); UNSUPPORTED("339jknwe6xhll69xqjj2cvcwb"); // if (!e) UNSUPPORTED("anwjqr4qvhqt6105wrt0zl2s7"); // e = agedge(g, n, m, NULL, 1); UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("8qbfja4j8nk5tpqj2tov9bz7k"); // default: UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("96y712urx48a31tm7axlbked3"); // free(t); UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2syri7q5tc0jyvwq8ecyfo3vr"); // return g; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/gvc/gvrender__c.java000066400000000000000000002107231312650303100216700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.gvc; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class gvrender__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 4cynie80t6jls6vhgs3jl2fit // static pointf *AF //1 9o8a3mexi9w7oq3wr7jtjcihk // static int sizeAF //3 9fduxdho8czelodj9h6y89ino // int gvrender_select(GVJ_t * job, const char *str) public static Object gvrender_select(Object... arg) { UNSUPPORTED("8q2hci07ap2ph732vslggau4t"); // int gvrender_select(GVJ_t * job, const char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eyew5ay5wwktz4fysz0b78ugv"); // GVC_t *gvc = job->gvc; UNSUPPORTED("5ssvxydvbzuxmb74t0hvdbmws"); // gvplugin_available_t *plugin; UNSUPPORTED("9q2rkohjybr7oxouto8gnuzsb"); // gvplugin_installed_t *typeptr; UNSUPPORTED("5s8ygazjg27yo5uwaw66w15r1"); // gvplugin_load(gvc, API_device, str); UNSUPPORTED("ek4fyjg4ptxc2el4evmh805o1"); // /* When job is created, it is zeroed out. UNSUPPORTED("3kefg2aeqsvm2d6dncfwpxsr8"); // * Some flags, such as OUTPUT_NOT_REQUIRED, may already be set, UNSUPPORTED("9ez2btubxikj170dwe5jqvnof"); // * so don't reset. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("4tlui225yloqahoq9la8pzwy1"); // /* job->flags = 0; */ UNSUPPORTED("76gynnjrs6xvbeb7wfpi1ev1l"); // plugin = gvc->api[API_device]; UNSUPPORTED("3qzhu1d1ev2sbxdqyn2rujv5y"); // if (plugin) { UNSUPPORTED("8cnmkxanogd09zc24faarugvo"); // typeptr = plugin->typeptr; UNSUPPORTED("cx8hqrenucgiq5zy97oaqusmc"); // job->device.engine = (gvdevice_engine_t *) (typeptr->engine); UNSUPPORTED("bm8s8c7aquf0i3erdxldrern4"); // job->device.features = (gvdevice_features_t *) (typeptr->features); UNSUPPORTED("7tiv1ctzor8f6a193o9c3dc4"); // job->device.id = typeptr->id; UNSUPPORTED("b3fa1nmh14yrlxh7u11av178h"); // job->device.type = plugin->typestr; UNSUPPORTED("98gdwzzklfnnvl4rcrxln6ax5"); // job->flags |= job->device.features->flags; UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("7kkm265fhqxbcvyb1tfbvlbg"); // return 999; /* FIXME - should differentiate problem */ UNSUPPORTED("7f2ichmjy32bcdpzo6eam8v7t"); // /* The device plugin has a dependency on a render plugin, UNSUPPORTED("cfcjkcl1s1689uqm7fm9yszr4"); // * so the render plugin should be available as well now */ UNSUPPORTED("bu439zn5xm8jaz1bs1pxzp0dp"); // plugin = gvc->api[API_render]; UNSUPPORTED("3qzhu1d1ev2sbxdqyn2rujv5y"); // if (plugin) { UNSUPPORTED("8cnmkxanogd09zc24faarugvo"); // typeptr = plugin->typeptr; UNSUPPORTED("7tt4s00k0osfiqwahwoff1agx"); // job->render.engine = (gvrender_engine_t *) (typeptr->engine); UNSUPPORTED("669i3eyhmswim1vqxlgkovfrk"); // job->render.features = (gvrender_features_t *) (typeptr->features); UNSUPPORTED("11cw3vs43482kobe5ny07nu35"); // job->render.type = plugin->typestr; UNSUPPORTED("gnm8nzbq1sv2lxsg2d1aerng"); // job->flags |= job->render.features->flags; UNSUPPORTED("243x5gphnardgbfaphg9njktu"); // if (job->device.engine) UNSUPPORTED("5ptnbs646e5n7ko2ca57lk4x"); // job->render.id = typeptr->id; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("5sdmyjmm37n90aaenqcx0oknb"); // /* A null device engine indicates that the device id is also the renderer id UNSUPPORTED("p1e1xenrya70i1wee5fqsrql"); // * and that the renderer doesn't need "device" functions. UNSUPPORTED("787dp7rjt82811tj8dlkpb18e"); // * Device "features" settings are still available */ UNSUPPORTED("e580tqo2v5qy1ecm6k2ep5hy9"); // job->render.id = job->device.id; UNSUPPORTED("e2xl4ygmp65bn739zdpqbu0jq"); // return 300; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5868n9w3txgvuqjat3ibyfjdn"); // job->render.engine = NULL; UNSUPPORTED("dnojigjj91bs3obtgs440c1pu"); // return 999; /* FIXME - should differentiate problem */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8r860ajsh90bfs4d0opfouak // int gvrender_features(GVJ_t * job) public static Object gvrender_features(Object... arg) { UNSUPPORTED("1szoxv2gwujscwb7rnlygg91m"); // int gvrender_features(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("1vuliw37h78m972417wd4axpz"); // int features = 0; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("e5v22h9rlc1j09d58ivcttn9r"); // features = job->render.features->flags; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6dg3yx86pwrpwg0z9d4frxk3q"); // return features; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4h2luwpil87bs6pkf4f7qo2k9 // int gvrender_begin_job(GVJ_t * job) public static Object gvrender_begin_job(Object... arg) { UNSUPPORTED("6ev0o0og4bywnq3aw32oauko3"); // int gvrender_begin_job(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("q4eshv98z33fert8lpher2vz"); // if (gvdevice_initialize(job)) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("9890blf35qwu47a330c2ge4nc"); // if (gvre->begin_job) UNSUPPORTED("aep2cwbk720jnf13nui5zc4gn"); // gvre->begin_job(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3qmxnj1638ltgmhz0csgcpfjk // void gvrender_end_job(GVJ_t * job) public static Object gvrender_end_job(Object... arg) { UNSUPPORTED("c841pljir2lr5bp3us608ghiq"); // void gvrender_end_job(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("52mw58ugr0a7omsyevqcshnls"); // if (gvre->end_job) UNSUPPORTED("a8sk8cfwcv2mpv7g84p1g2zt4"); // gvre->end_job(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2dnat2dhr60k7lx6x7j868ccu"); // job->gvc->common.lib = NULL; /* FIXME - minimally this doesn't belong here */ UNSUPPORTED("dql0bth0nzsrpiu9vnffonrhf"); // gvdevice_finalize(job); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 51309lo7u8y4alv899e4yqadk // pointf gvrender_ptf(GVJ_t * job, pointf p) public static Object gvrender_ptf(Object... arg) { UNSUPPORTED("bvtfrro3td44g1j12ar1rdjpx"); // pointf gvrender_ptf(GVJ_t * job, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2bkj6y2vx6eazaf4xct5yhf4t"); // pointf rv, translation, scale; UNSUPPORTED("ayk9sbv0i0esapa28j5940syn"); // translation = job->translation; UNSUPPORTED("5cwqynigwx0y1vbchhhtgvhwf"); // scale.x = job->zoom * job->devscale.x; UNSUPPORTED("aencyok7qan341gowih0ppjxf"); // scale.y = job->zoom * job->devscale.y; UNSUPPORTED("3h1yo631e2fq69mxwoggya716"); // if (job->rotation) { UNSUPPORTED("7etz5b9vm8n98pkfmmehwqbnc"); // rv.x = -(p.y + translation.y) * scale.x; UNSUPPORTED("3q08n8dxktpivul7bbze3tow2"); // rv.y = (p.x + translation.x) * scale.y; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("bxbzg3yd7725e95lwwjizgtmd"); // rv.x = (p.x + translation.x) * scale.x; UNSUPPORTED("a7bvzlhyi51usu7oaeku8csk6"); // rv.y = (p.y + translation.y) * scale.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 crcyqn21mwz4omhozkd2cp4jc // pointf *gvrender_ptf_A(GVJ_t * job, pointf * af, pointf * AF, int n) public static Object gvrender_ptf_A(Object... arg) { UNSUPPORTED("6s7dm40y4hhxw9cl6698x6qld"); // pointf *gvrender_ptf_A(GVJ_t * job, pointf * af, pointf * AF, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("6wfj8onzmd4ihhh62dqfmqpbx"); // double t; UNSUPPORTED("djnewvgctvkpvlggbpw7lj1sc"); // pointf translation, scale; UNSUPPORTED("ayk9sbv0i0esapa28j5940syn"); // translation = job->translation; UNSUPPORTED("5cwqynigwx0y1vbchhhtgvhwf"); // scale.x = job->zoom * job->devscale.x; UNSUPPORTED("aencyok7qan341gowih0ppjxf"); // scale.y = job->zoom * job->devscale.y; UNSUPPORTED("3h1yo631e2fq69mxwoggya716"); // if (job->rotation) { UNSUPPORTED("7lppn4o65696k131iftk9aihq"); // for (i = 0; i < n; i++) { UNSUPPORTED("8inojmsrqrgmcgv4lgjntmk1p"); // t = -(af[i].y + translation.y) * scale.x; UNSUPPORTED("1tkzeyviyufhxywvbfka8jbq7"); // AF[i].y = (af[i].x + translation.x) * scale.y; UNSUPPORTED("d7d03owzn12m66ymdf5730kj0"); // AF[i].x = t; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("7lppn4o65696k131iftk9aihq"); // for (i = 0; i < n; i++) { UNSUPPORTED("6tyixk0bh3dd1yv33d4y93jjz"); // AF[i].x = (af[i].x + translation.x) * scale.x; UNSUPPORTED("cs1v590y88hqekl0xoh3y093u"); // AF[i].y = (af[i].y + translation.y) * scale.y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1mnc0qamisdd62ud5dfotjxss"); // return AF; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d0k7jgvawtauln88of22iuy40 // static int gvrender_comparestr(const void *s1, const void *s2) public static Object gvrender_comparestr(Object... arg) { UNSUPPORTED("b9vqnpfss55985u1jx9mhx1ss"); // static int gvrender_comparestr(const void *s1, const void *s2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1d9rfce1ndx9322h0frb0z98p"); // return strcmp(*(char **) s1, *(char **) s2); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 93cbs4byyecjhyq5vu6p19p57 // static void gvrender_resolve_color(gvrender_features_t * features, char *name, gvcolor_t * color) public static Object gvrender_resolve_color(Object... arg) { UNSUPPORTED("3knci4gywmc6hb9ujch5j3e9a"); // static void gvrender_resolve_color(gvrender_features_t * features, UNSUPPORTED("aiwlhbymjioyoqr6cp2hw7ukv"); // char *name, gvcolor_t * color) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eqt7m58ywry2anaa5wpii01ri"); // char *tok; UNSUPPORTED("1bh3yj957he6yv2dkeg4pzwdk"); // int rc; UNSUPPORTED("ety8bdkhij0jyjwrsxks5sz02"); // color->u.string = name; UNSUPPORTED("30asoip27omoa1yx0rv9iuutk"); // color->type = COLOR_STRING; UNSUPPORTED("dxlu1039n9c20pueltjind8cy"); // tok = canontoken(name); UNSUPPORTED("dbrv2omaxn2z4bi8k1tjkgbyl"); // if (!features->knowncolors UNSUPPORTED("8s9kvd9phxubwfikx5wl2o4eb"); // || UNSUPPORTED("ewkhu0md9r3wkfof3k37k1a4e"); // (bsearch UNSUPPORTED("7nf6yu4m9s7f9lckxs7vo9v1f"); // (&tok, features->knowncolors, features->sz_knowncolors, UNSUPPORTED("gms28vfgml0rul9gi006ety8"); // sizeof(char *), gvrender_comparestr)) == NULL) { UNSUPPORTED("9nqwxnnz5dxy6h3ij9eovzt8g"); // /* if tok was not found in known_colors */ UNSUPPORTED("dtlh659rjk09rfjgy14jyed67"); // rc = colorxlate(name, color, features->color_type); UNSUPPORTED("ext4y0w1v77cxnsn9odfd3hh0"); // if (rc != 0) { UNSUPPORTED("2wu9auf85lz824gtt1h6w6ev0"); // if (rc == 1) { UNSUPPORTED("avvvne4m4cq0vl2trvdvdg2x6"); // char *missedcolor = gmalloc(strlen(name) + 16); UNSUPPORTED("22z3pxv0m8em81soozhhrokv0"); // sprintf(missedcolor, "color %s", name); UNSUPPORTED("cvqbzc6txkpe2jyy2mhmrh12i"); // if (emit_once(missedcolor)) UNSUPPORTED("6mde88389r3jhseiz163208n6"); // agerr(AGWARN, "%s is not a known color.\n", name); UNSUPPORTED("9e5cs6q89hrxxe32ywke5xd0i"); // free(missedcolor); UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("627apvfea14p6eh91bth30ke"); // agerr(AGERR, "error in colxlate()\n"); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8bz32mh1b67dm7onb98cukhr // void gvrender_begin_graph(GVJ_t * job, graph_t * g) public static Object gvrender_begin_graph(Object... arg) { UNSUPPORTED("8niigqov4bujqwwvqrq6qkfp"); // void gvrender_begin_graph(GVJ_t * job, graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1afe6q2gmnv35uj22aogbg2gh"); // /* GVC_t *gvc = job->gvc; */ UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("62zv37oupg2zeqb8cv4j3mqf0"); // /* char *s; */ UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("3u2mk914st9v3rc5z2iyvnj9k"); // /* render specific init */ UNSUPPORTED("12nyq1yot2zd8pg8a198tiw9c"); // if (gvre->begin_graph) UNSUPPORTED("ccy204j05mtzfr44lugx3pslo"); // gvre->begin_graph(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 65xsy2npcrn2bagmq96hoplmc // void gvrender_end_graph(GVJ_t * job) public static Object gvrender_end_graph(Object... arg) { UNSUPPORTED("e845mtmabap40x91drpi98rgb"); // void gvrender_end_graph(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("47tlf516sc8wywg2atz9mut2v"); // if (gvre->end_graph) UNSUPPORTED("7gu26oojajmet9zp3zbbf8xbl"); // gvre->end_graph(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3z3ed5jhwlihctmb5fr24wahu"); // gvdevice_format(job); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4ptkpos0d265xcx36yp5olziv // void gvrender_begin_page(GVJ_t * job) public static Object gvrender_begin_page(Object... arg) { UNSUPPORTED("dk9dqgxupw4tns0blo563bw3"); // void gvrender_begin_page(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("3ojiwmme99huqifioqypnkdu"); // if (gvre->begin_page) UNSUPPORTED("4rds4n8ynzo8bstdc56wcaq67"); // gvre->begin_page(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2neje7ddfin73he2004jok2oq // void gvrender_end_page(GVJ_t * job) public static Object gvrender_end_page(Object... arg) { UNSUPPORTED("60qwktj4d3u2lx6w9ya7x2ll5"); // void gvrender_end_page(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("bbvge1xpf3csvsgdquklh64wz"); // if (gvre->end_page) UNSUPPORTED("6epuiije9k0po6zbf1wuiv0m"); // gvre->end_page(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bjs8uuw252trlu14ei8bzbsvr // void gvrender_begin_layer(GVJ_t * job) public static Object gvrender_begin_layer(Object... arg) { UNSUPPORTED("73q54jv3dls7oji2nnpvn4jkf"); // void gvrender_begin_layer(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("i2jio5waiow93ulk6mqogx07"); // if (gvre->begin_layer) UNSUPPORTED("979u6s95uq3clnd96s3uo2807"); // gvre->begin_layer(job, job->gvc->layerIDs[job->layerNum], UNSUPPORTED("bw05jjansbpeswe4ktw01i6j6"); // job->layerNum, job->numLayers); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 401dx8s3fwrxydg3x6alimmby // void gvrender_end_layer(GVJ_t * job) public static Object gvrender_end_layer(Object... arg) { UNSUPPORTED("9ae3jsve0v8yslvoyx3pnlacr"); // void gvrender_end_layer(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("4vk85i8m93l7fxj6a38e1fcqx"); // if (gvre->end_layer) UNSUPPORTED("4susivxkhmdvvydg2r87cakmo"); // gvre->end_layer(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 27poq9moik2l4d2chmxas8rm1 // void gvrender_begin_cluster(GVJ_t * job, graph_t * sg) public static Object gvrender_begin_cluster(Object... arg) { UNSUPPORTED("r4znhjms3ot7kcrhcixet65f"); // void gvrender_begin_cluster(GVJ_t * job, graph_t * sg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("cj1dczwhpa0r63wls9ra640q7"); // if (gvre->begin_cluster) UNSUPPORTED("5lz5n1eutzyea7yee250561oi"); // gvre->begin_cluster(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1eapbz6ecf0g6kdtqu28czes2 // void gvrender_end_cluster(GVJ_t * job, graph_t * g) public static Object gvrender_end_cluster(Object... arg) { UNSUPPORTED("dd5abixfui8mnp71zqvuj59qz"); // void gvrender_end_cluster(GVJ_t * job, graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("25ikbftyuamzhvmocbqm27sir"); // if (gvre->end_cluster) UNSUPPORTED("b3jrm6ybfvymn6zj4mdz97vu"); // gvre->end_cluster(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c19ss30f97hmgqtzuxhn0qwys // void gvrender_begin_nodes(GVJ_t * job) public static Object gvrender_begin_nodes(Object... arg) { UNSUPPORTED("97cjt43wnlxgia92a6tk59ud0"); // void gvrender_begin_nodes(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("vylx62m32dzueggujf0nyjtx"); // if (gvre->begin_nodes) UNSUPPORTED("au32m8j1o2erzrxm0k27uf4mx"); // gvre->begin_nodes(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eyo9qxxkb76cgbq7a8ojrxnic // void gvrender_end_nodes(GVJ_t * job) public static Object gvrender_end_nodes(Object... arg) { UNSUPPORTED("9wdm2tj0803fr2xaj6p5xftvn"); // void gvrender_end_nodes(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("4zv75v2c0kmbs38j0c97u4dwl"); // if (gvre->end_nodes) UNSUPPORTED("5cuhpzbv9lqn4aq0gwyo2ye82"); // gvre->end_nodes(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bevetts9ovmaou0v5l9i1aq5 // void gvrender_begin_edges(GVJ_t * job) public static Object gvrender_begin_edges(Object... arg) { UNSUPPORTED("1alfkafh1xx3y2k9ujca26ii1"); // void gvrender_begin_edges(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("lnm2jgz2nptqnahuln8bs898"); // if (gvre->begin_edges) UNSUPPORTED("7kjkdeb3sqzw19x4k66d6hjck"); // gvre->begin_edges(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 35426mu8gpbqgoc6qh9q4c1xo // void gvrender_end_edges(GVJ_t * job) public static Object gvrender_end_edges(Object... arg) { UNSUPPORTED("2z8hgdz7ckm5uvm5dk09ytuix"); // void gvrender_end_edges(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("1pwokcd6d4pph0uv4ob0v2ayz"); // if (gvre->end_edges) UNSUPPORTED("45wdv8q1q1h4ql4iu7j2zfw3"); // gvre->end_edges(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d5gj3gg608fp9k43jzb4ts4xb // void gvrender_begin_node(GVJ_t * job, node_t * n) public static Object gvrender_begin_node(Object... arg) { UNSUPPORTED("cqhiq3ed9f6eu8n3045t48fno"); // void gvrender_begin_node(GVJ_t * job, node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("9hw2jrhsnzuh99o0dwa7w2t46"); // if (gvre->begin_node) UNSUPPORTED("2tnqnm5tlwv327095ukix5mkz"); // gvre->begin_node(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 avfb2baedlecrkfbow9cxrpj8 // void gvrender_end_node(GVJ_t * job) public static Object gvrender_end_node(Object... arg) { UNSUPPORTED("cx7wx0qonl1fg8sktpbann4v7"); // void gvrender_end_node(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("bmg00d8fks4epb7d1z151ujes"); // if (gvre->end_node) UNSUPPORTED("7yw45ob7vq7hv1816oawtvnaw"); // gvre->end_node(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e2uj2wkgme6qb2iw67xtnj76 // void gvrender_begin_edge(GVJ_t * job, edge_t * e) public static Object gvrender_begin_edge(Object... arg) { UNSUPPORTED("92wxdxnrq7ym6oxa8ncnte8yx"); // void gvrender_begin_edge(GVJ_t * job, edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("bpy6xdkxvnktpvt4ng837tqpv"); // if (gvre->begin_edge) UNSUPPORTED("zj6g2pof9uhapm6bxydrx8fq"); // gvre->begin_edge(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dmjwy0x5f2ylehrl4asephmu // void gvrender_end_edge(GVJ_t * job) public static Object gvrender_end_edge(Object... arg) { UNSUPPORTED("503mqi542lcqpbzcar48yjzca"); // void gvrender_end_edge(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("1esg5a3gkxrmgs5zvdu795q7x"); // if (gvre->end_edge) UNSUPPORTED("eu84oc9h3jhmhc6v1kbvxatlo"); // gvre->end_edge(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a3oxjcx4pit0tlwvqrj5pjgla // void gvrender_begin_anchor(GVJ_t * job, char *href, char *tooltip, char *target, char *id) public static Object gvrender_begin_anchor(Object... arg) { UNSUPPORTED("t7nw5oeaewb5af8soqhimjf8"); // void gvrender_begin_anchor(GVJ_t * job, char *href, char *tooltip, UNSUPPORTED("ca2v6kkbpi770n597h24tagaa"); // char *target, char *id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("auez010xhho0xcap2ycz9lju2"); // if (gvre->begin_anchor) UNSUPPORTED("9272f1ryutzdz60cexops6mrp"); // gvre->begin_anchor(job, href, tooltip, target, id); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 939xwaginerexczl0cmv7ihe2 // void gvrender_end_anchor(GVJ_t * job) public static Object gvrender_end_anchor(Object... arg) { UNSUPPORTED("bcd3uehiopd66fbezppgae2dt"); // void gvrender_end_anchor(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("a91isqnl1vm4eci36n2n4cbaj"); // if (gvre->end_anchor) UNSUPPORTED("5qppuiae51yhbsfdv0frgywun"); // gvre->end_anchor(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8hno79twchywwcg8nsufipda9 // void gvrender_begin_label(GVJ_t * job, label_type type) public static Object gvrender_begin_label(Object... arg) { UNSUPPORTED("4flxiegpywb83nvqdngss5inv"); // void gvrender_begin_label(GVJ_t * job, label_type type) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("1jmpi9g9tuv3h494cpncqbeby"); // if (gvre->begin_label) UNSUPPORTED("dnncmlhww1v0s5m19zpp1ayrx"); // gvre->begin_label(job, type); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 33lmy7dfx78r3jdoiq6vipmbf // void gvrender_end_label(GVJ_t * job) public static Object gvrender_end_label(Object... arg) { UNSUPPORTED("962k3bif0rr2lxaitbmcqqgap"); // void gvrender_end_label(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("ywfznc4r5iq2ztfi831qudip"); // if (gvre->end_label) UNSUPPORTED("dpb1dlhljjzdlysacyo5qge5w"); // gvre->end_label(job); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2n07hv6i7ifhafigqmh9hjs41 // void gvrender_textspan(GVJ_t * job, pointf p, textspan_t * span) public static Object gvrender_textspan(Object... arg) { UNSUPPORTED("c11fz6lbqdebdh90bo51ypv2b"); // void gvrender_textspan(GVJ_t * job, pointf p, textspan_t * span) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("7dzn9x60phgi2716c3utq7okm"); // pointf PF; UNSUPPORTED("76pnbk0msbwxf3hexhq42v5l3"); // if (span->str && span->str[0] UNSUPPORTED("avci39h8hze5k7sgd2z1e5ut6"); // && (!job->obj /* because of xdgen non-conformity */ UNSUPPORTED("95huo314k0dtj3gzujngpxav9"); // || job->obj->pen != PEN_NONE)) { UNSUPPORTED("dbbj4xbqmojh658txgt6nut8a"); // if (job->flags & (1<<13)) UNSUPPORTED("1lpccyww1zgpiec5mn5cvykxo"); // PF = p; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("7gbtmnftt2mwo238ttx5dn8tk"); // PF = gvrender_ptf(job, p); UNSUPPORTED("43ewa06mslfnjci1b1imd77l"); // if (gvre) { UNSUPPORTED("e62o0l6l0i86ux0dps9h9e1p5"); // if (gvre->textspan) UNSUPPORTED("bffevstxgixicve9h9ysw8iox"); // gvre->textspan(job, PF, span); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3ip6dcdve8gi3behn0lnxf9ii // void gvrender_set_pencolor(GVJ_t * job, char *name) public static Object gvrender_set_pencolor(Object... arg) { UNSUPPORTED("4ke4p18hmuf4dn24qbbac7tsw"); // void gvrender_set_pencolor(GVJ_t * job, char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dkx0mdb9is3arqebifuxxgail"); // gvcolor_t *color = &(job->obj->pencolor); UNSUPPORTED("7qm0rh822k1sczzlqrrqvbs2x"); // char *cp = NULL; UNSUPPORTED("9of4r30ug3z0b20d8j12e3pnk"); // if ((cp = strstr(name, ":"))) /* if its a color list, then use only first */ UNSUPPORTED("cbuf05ko7kaxq2n9zw35l5v2h"); // *cp = '\0'; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("71y1xk8zhlqbr7ljk4xi6j2x"); // gvrender_resolve_color(job->render.features, name, color); UNSUPPORTED("80xcpwmaq0yeai2wwkv3ipjd8"); // if (gvre->resolve_color) UNSUPPORTED("5skt8kbpasgr6oei3cw53lrw3"); // gvre->resolve_color(job, color); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3h7ovb03mv53jkj4z79mdiv0m"); // if (cp) /* restore color list */ UNSUPPORTED("971i954brvgqb35cftazlqhon"); // *cp = ':'; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d1se1bjsc3m7jbhugf98bvdsy // void gvrender_set_fillcolor(GVJ_t * job, char *name) public static Object gvrender_set_fillcolor(Object... arg) { UNSUPPORTED("5r7oj4opkrxunyrvpxbz9eucg"); // void gvrender_set_fillcolor(GVJ_t * job, char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("eh9bysmovke6e9iezr0onfsif"); // gvcolor_t *color = &(job->obj->fillcolor); UNSUPPORTED("7qm0rh822k1sczzlqrrqvbs2x"); // char *cp = NULL; UNSUPPORTED("9of4r30ug3z0b20d8j12e3pnk"); // if ((cp = strstr(name, ":"))) /* if its a color list, then use only first */ UNSUPPORTED("cbuf05ko7kaxq2n9zw35l5v2h"); // *cp = '\0'; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("71y1xk8zhlqbr7ljk4xi6j2x"); // gvrender_resolve_color(job->render.features, name, color); UNSUPPORTED("80xcpwmaq0yeai2wwkv3ipjd8"); // if (gvre->resolve_color) UNSUPPORTED("5skt8kbpasgr6oei3cw53lrw3"); // gvre->resolve_color(job, color); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5nbgkqw34assnwmypil321sqd"); // if (cp) UNSUPPORTED("971i954brvgqb35cftazlqhon"); // *cp = ':'; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bq4b7phujqc961e7ziqipopma // void gvrender_set_gradient_vals (GVJ_t * job, char *stopcolor, int angle, float frac) public static Object gvrender_set_gradient_vals(Object... arg) { UNSUPPORTED("3y1lob8nc9d6kylff8slmrvt6"); // void gvrender_set_gradient_vals (GVJ_t * job, char *stopcolor, int angle, float frac) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("4wb9uleub62gq1lleh0uzvdvk"); // gvcolor_t *color = &(job->obj->stopcolor); UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("ba71q0eh93yuaf62z4gj4v16l"); // gvrender_resolve_color(job->render.features, stopcolor, color); UNSUPPORTED("80xcpwmaq0yeai2wwkv3ipjd8"); // if (gvre->resolve_color) UNSUPPORTED("5skt8kbpasgr6oei3cw53lrw3"); // gvre->resolve_color(job, color); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4g6prg2786ftm2i5xccm96e6h"); // job->obj->gradient_angle = angle; UNSUPPORTED("6l998scnzlh9f2me8u596k5zd"); // job->obj->gradient_frac = frac; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2lnvbc2ahvd0talu9x7r9dqgb // void gvrender_set_style(GVJ_t * job, char **s) public static Object gvrender_set_style(Object... arg) { UNSUPPORTED("ed6tqrjoo4liy9duowya74n8d"); // void gvrender_set_style(GVJ_t * job, char **s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("cc0bdchuthy63n23oh854p3ir"); // char *line, *p; UNSUPPORTED("8hqsf9nh2ybldgbnnk3bcmu"); // obj->rawstyle = s; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("equxj86ju7dkcxy7wefz8l6u5"); // if (s) UNSUPPORTED("bnw5es8qe45nr5yp9tz6z7a3e"); // while ((p = line = *s++)) { UNSUPPORTED("7qpijbh4ybhl6fxaftd0sfork"); // if ((*(line)==*("solid")&&!strcmp(line,"solid"))) UNSUPPORTED("6hud8gwtkg3zahe2ua4hq83ij"); // obj->pen = PEN_SOLID; UNSUPPORTED("6bwanlgbxst8bc2cv0xzbbsud"); // else if ((*(line)==*("dashed")&&!strcmp(line,"dashed"))) UNSUPPORTED("95srmeof6k7hfybaw6p7dyc3n"); // obj->pen = PEN_DASHED; UNSUPPORTED("8v6hgllyohdu38fmfn5gwk1gs"); // else if ((*(line)==*("dotted")&&!strcmp(line,"dotted"))) UNSUPPORTED("3kl1lutns4cz2ild0sz1xh16q"); // obj->pen = PEN_DOTTED; UNSUPPORTED("4l94fr7n2phccurat8ysgwqio"); // else if ((*(line)==*("invis")&&!strcmp(line,"invis")) || (*(line)==*("invisible")&&!strcmp(line,"invisible"))) UNSUPPORTED("ac76fwv7t6jv1nljbublzljmb"); // obj->pen = PEN_NONE; UNSUPPORTED("aqx8ac8quxag6xil6wuavvi5a"); // else if ((*(line)==*("bold")&&!strcmp(line,"bold"))) UNSUPPORTED("acx11t55moi09ri1211mh10m8"); // obj->penwidth = 2.; UNSUPPORTED("emw5dlagymi75sor2qr0cg7vd"); // else if ((*(line)==*("setlinewidth")&&!strcmp(line,"setlinewidth"))) { UNSUPPORTED("8on9zstcjf8x7vnxo0ruhe15f"); // while (*p) UNSUPPORTED("kqo5b69i4k26e6iv18175dju"); // p++; UNSUPPORTED("6vkekzy7fxtvws16bdbx2yyp0"); // p++; UNSUPPORTED("b78whm1hkisnpr9ue88h9s6mp"); // obj->penwidth = atof(p); UNSUPPORTED("901ar3u82oxx2edwzx67af916"); // } else if ((*(line)==*("filled")&&!strcmp(line,"filled"))) UNSUPPORTED("al7f421nliq8cp8umch5g84id"); // obj->fill = FILL_SOLID; UNSUPPORTED("2c0o9j23cvx64elo52vn5fa55"); // else if ((*(line)==*("unfilled")&&!strcmp(line,"unfilled"))) UNSUPPORTED("4rogmkrrzxs6f7jpqzituon7h"); // obj->fill = FILL_NONE; UNSUPPORTED("afqdk2t3k49ax3yr996td7xij"); // else if ((*(line)==*("tapered")&&!strcmp(line,"tapered"))); UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("3f0u3cjz549lwgnkj0rlfv6rv"); // agerr(AGWARN, UNSUPPORTED("2qw622u36zt4xp5de28umz71p"); // "gvrender_set_style: unsupported style %s - ignoring\n", UNSUPPORTED("c417iw9xyayechno2h2gtkidk"); // line); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eyxsx2an9nibgyxoozqxipc50 // void gvrender_ellipse(GVJ_t * job, pointf * pf, int n, int filled) public static Object gvrender_ellipse(Object... arg) { UNSUPPORTED("7id4bcj5ex7dkq7nf2sjxqkxy"); // void gvrender_ellipse(GVJ_t * job, pointf * pf, int n, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("d33a6zjcnxa56avpwpfci03w0"); // if (gvre->ellipse && job->obj->pen != PEN_NONE) { UNSUPPORTED("5ee29opjv6aldntaubhxveste"); // pointf af[2]; UNSUPPORTED("ezddcbil3k2vpgi3937t190vg"); // /* center */ UNSUPPORTED("eqotgr25by5valy10q8yrlto3"); // af[0].x = (pf[0].x + pf[1].x) / 2.; UNSUPPORTED("7gk0lclx0jgwhwg64fctmcyuw"); // af[0].y = (pf[0].y + pf[1].y) / 2.; UNSUPPORTED("1x05c1xvw0f812ervsc5c1db7"); // /* corner */ UNSUPPORTED("9lxv0dip7ojewgkwaldenpvat"); // af[1] = pf[1]; UNSUPPORTED("4hpouh4g99lqypvfaulobxe1q"); // if (!(job->flags & (1<<13))) UNSUPPORTED("b0ame3q1wj0xu1ddafxmv61r6"); // gvrender_ptf_A(job, af, af, 2); UNSUPPORTED("ecg6t40fcec9tuaidvse5o9k7"); // gvre->ellipse(job, af, filled); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 yp8iozq6mdutn12n5clinpsw // void gvrender_polygon(GVJ_t * job, pointf * af, int n, int filled) public static Object gvrender_polygon(Object... arg) { UNSUPPORTED("bv02ljcfrzola6maqr6v7beev"); // void gvrender_polygon(GVJ_t * job, pointf * af, int n, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7etlb9y79uddlra5j9bq7hjy0"); // int noPoly = 0; UNSUPPORTED("6wlq83bksy1dlfrxo5oqh3qfg"); // gvcolor_t save_pencolor; UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("4dvbzlf9ofw1sbr0kinbiopjy"); // if (gvre->polygon && job->obj->pen != PEN_NONE) { UNSUPPORTED("3c069bec725soy1ddur2lmx88"); // if (filled & 4) { UNSUPPORTED("drtmij0csvtkvgrbk1yqdr04x"); // noPoly = 1; UNSUPPORTED("8fyh7hf01mlybwcrx096jx0g9"); // filled &= ~4; UNSUPPORTED("54l2vwy7bed4cbytx05i897io"); // save_pencolor = job->obj->pencolor; UNSUPPORTED("3sjiewne1u0xvr0lijo4fsj4r"); // job->obj->pencolor = job->obj->fillcolor; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("axkfudcbukjknssqlc19up4oj"); // if (job->flags & (1<<13)) UNSUPPORTED("dtcn338f4dw09aoxz62631sqw"); // gvre->polygon(job, af, n, filled); UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("4bjezvz1si20bgioa75ow050b"); // if (sizeAF < n) { UNSUPPORTED("6uvcrsm6kp84s8ocym7dub4f"); // sizeAF = n + 10; UNSUPPORTED("bq7cfbgsgn87xeot78xdy9ui5"); // AF = grealloc(AF, sizeAF * sizeof(pointf)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("8uevq5szpmt24ikijexgharm4"); // gvrender_ptf_A(job, af, AF, n); UNSUPPORTED("6lcl4fwte735kt1go13ybqeh"); // gvre->polygon(job, AF, n, filled); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("w9ool8zsr5xhadzpe15wbg2s"); // if (noPoly) UNSUPPORTED("4n90uzffapw0hn5othv0zrbi3"); // job->obj->pencolor = save_pencolor; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 887zxc7xkpuux75pyddc0t2sm // void gvrender_box(GVJ_t * job, boxf B, int filled) public static Object gvrender_box(Object... arg) { UNSUPPORTED("e0bwh5wg4tq95uckdyef5xzub"); // void gvrender_box(GVJ_t * job, boxf B, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ctvmenh2xwttzvzv2mrj2pizl"); // pointf A[4]; UNSUPPORTED("ayegu4zx75rk1lklks1prb14u"); // A[0] = B.LL; UNSUPPORTED("blhtdvdu48mofhgnuwowogpyp"); // A[2] = B.UR; UNSUPPORTED("ef7fxzoqydqv1nwffgjbuf1sd"); // A[1].x = A[0].x; UNSUPPORTED("eszwoyo2gnla64vngjy3z1q3v"); // A[1].y = A[2].y; UNSUPPORTED("egya9mjzieml8yqx2caonmq6e"); // A[3].x = A[2].x; UNSUPPORTED("2oe4fg2nwhsb5dalpz4mg5nbn"); // A[3].y = A[0].y; UNSUPPORTED("3zlnq8g9z7psgb93ljeinqwcs"); // gvrender_polygon(job, A, 4, filled); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3ob8x7840dyx76jqhumocvdr6 // void gvrender_beziercurve(GVJ_t * job, pointf * af, int n, int arrow_at_start, int arrow_at_end, boolean filled) public static Object gvrender_beziercurve(Object... arg) { UNSUPPORTED("9vork9t9rxekftwoe2b4co51v"); // void gvrender_beziercurve(GVJ_t * job, pointf * af, int n, UNSUPPORTED("3xhx7uex1gp1o3nnsoocvsyif"); // int arrow_at_start, int arrow_at_end, UNSUPPORTED("275qles1p1xn7ecqbi8gds0jt"); // boolean filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("54lpmghvciyi7cdmsm6wqq3yc"); // if (gvre->beziercurve && job->obj->pen != PEN_NONE) { UNSUPPORTED("axkfudcbukjknssqlc19up4oj"); // if (job->flags & (1<<13)) UNSUPPORTED("52u47z983op39vd0d6yprfpi7"); // gvre->beziercurve(job, af, n, arrow_at_start, arrow_at_end, UNSUPPORTED("4oaa7hd9zzxozaff0cbix2kmp"); // filled); UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("4bjezvz1si20bgioa75ow050b"); // if (sizeAF < n) { UNSUPPORTED("6uvcrsm6kp84s8ocym7dub4f"); // sizeAF = n + 10; UNSUPPORTED("bq7cfbgsgn87xeot78xdy9ui5"); // AF = grealloc(AF, sizeAF * sizeof(pointf)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("8uevq5szpmt24ikijexgharm4"); // gvrender_ptf_A(job, af, AF, n); UNSUPPORTED("ai7qtqrnw5vcq4jpskv8mtnvw"); // gvre->beziercurve(job, AF, n, arrow_at_start, arrow_at_end, UNSUPPORTED("4oaa7hd9zzxozaff0cbix2kmp"); // filled); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3b7i3jvz34m0h6yog8k2fvyfd // void gvrender_polyline(GVJ_t * job, pointf * af, int n) public static Object gvrender_polyline(Object... arg) { UNSUPPORTED("aeof52u6j3ibwxck6m4wrrivp"); // void gvrender_polyline(GVJ_t * job, pointf * af, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("bn4y0nlsh3umgedtpmscc5c9f"); // if (gvre->polyline && job->obj->pen != PEN_NONE) { UNSUPPORTED("axkfudcbukjknssqlc19up4oj"); // if (job->flags & (1<<13)) UNSUPPORTED("2vlnksg14jlxy4qyvzmm0zim1"); // gvre->polyline(job, af, n); UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("4bjezvz1si20bgioa75ow050b"); // if (sizeAF < n) { UNSUPPORTED("6uvcrsm6kp84s8ocym7dub4f"); // sizeAF = n + 10; UNSUPPORTED("bq7cfbgsgn87xeot78xdy9ui5"); // AF = grealloc(AF, sizeAF * sizeof(pointf)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("8uevq5szpmt24ikijexgharm4"); // gvrender_ptf_A(job, af, AF, n); UNSUPPORTED("1gvnhkj77n4ypjiwq1fqxtgp8"); // gvre->polyline(job, AF, n); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 blnfx50nrebk4gjfqqnn4rm7f // void gvrender_comment(GVJ_t * job, char *str) public static Object gvrender_comment(Object... arg) { UNSUPPORTED("b17bq37munzsdb5wh62le6aje"); // void gvrender_comment(GVJ_t * job, char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("5r4zhowru1r7j2yc1tquc5n8c"); // if (!str || !str[0]) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("2alwhjzc47rg93cqdi01wfpgm"); // if (gvre->comment) UNSUPPORTED("et94lf5x9gl8pdspb3jo8s9mg"); // gvre->comment(job, str); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 93prcj5sag4lfc8a5sb2wmsd // static imagescale_t get_imagescale(char *s) public static Object get_imagescale(Object... arg) { UNSUPPORTED("1txzuoketj9nchn3z70fng5v3"); // static imagescale_t get_imagescale(char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ajfjfii8vpjbquxmivdtxeg2b"); // if (*s == '\0') UNSUPPORTED("2coe29ec3wsegxx4gdv5m2kkd"); // return IMAGESCALE_FALSE; UNSUPPORTED("5yk4xjth2k279fyki9bkfr66x"); // if (!strcasecmp(s, "width")) UNSUPPORTED("3lu8ftn55h0wldfqo68xgloi7"); // return IMAGESCALE_WIDTH; UNSUPPORTED("92jzx9kaxuoztwbek5hyxzzuz"); // if (!strcasecmp(s, "height")) UNSUPPORTED("bu03yyk0qldvbb0ods2x4yawd"); // return IMAGESCALE_HEIGHT; UNSUPPORTED("28h8fykjn40nqnrw5vahnfaq4"); // if (!strcasecmp(s, "both")) UNSUPPORTED("kkh6e6r11wcdirsr594y1di"); // return IMAGESCALE_BOTH; UNSUPPORTED("8gusbxecihttgbvw2nehw572g"); // if (mapbool(s)) UNSUPPORTED("bikcgjnvqb6lez1cpnd544oim"); // return IMAGESCALE_TRUE; UNSUPPORTED("42n71z3o7xthvr2pah8c8u3lw"); // return IMAGESCALE_FALSE; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 pi86b4slwqam0a1xxdq0xdf0 // void gvrender_usershape(GVJ_t * job, char *name, pointf * a, int n, boolean filled, char *imagescale) public static Object gvrender_usershape(Object... arg) { UNSUPPORTED("6rpcjgqcfwaiwqvb418x8kokh"); // void gvrender_usershape(GVJ_t * job, char *name, pointf * a, int n, UNSUPPORTED("8jff0dyonsdk8syp7l4ev2bet"); // boolean filled, char *imagescale) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("exneoozy5g8al0a8y6fxb88zv"); // usershape_t *us; UNSUPPORTED("55qv67frd38p9fzngao3h7pz3"); // double iw, ih, pw, ph; UNSUPPORTED("cz8micuten0mlwt1eebcv7uki"); // double scalex, scaley; /* scale factors */ UNSUPPORTED("crqj2odd9fbsbeuzanl23jpv5"); // boxf b; /* target box */ UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("6l51ed47a0ut0f1nmi3st4xsd"); // point isz; UNSUPPORTED("1nk5slg1h855ktp6d9uxli7u3"); // assert(job); UNSUPPORTED("265kxn69043hh3vmr1ma8pbpg"); // assert(name); UNSUPPORTED("1av8we70pcc0ni7489zk2ttcg"); // assert(name[0]); UNSUPPORTED("dztu0qy4iohllldygpjrgx0gv"); // if (!(us = gvusershape_find(name))) { UNSUPPORTED("e4iagmogyeon44yhelfxakcrj"); // if (find_user_shape(name)) { UNSUPPORTED("c7obssvvot4eby517jwrv86al"); // if (gvre && gvre->library_shape) UNSUPPORTED("9hgqs8vju366mem50j32o9147"); // gvre->library_shape(job, name, a, n, filled); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8mq2y4jjt82ryu31wh7v1hyd4"); // isz = gvusershape_size_dpi(us, job->dpi); UNSUPPORTED("99au5wlhecqbfygzkzv8981mi"); // if ((isz.x <= 0) && (isz.y <= 0)) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("esl5shk1uch8lb65tqqq1m71g"); // /* compute bb of polygon */ UNSUPPORTED("9iktk3ta9uy01wdkx10u1v1i0"); // b.LL = b.UR = a[0]; UNSUPPORTED("1zy7dp66aw6aapybjihdnqlz7"); // for (i = 1; i < n; i++) { UNSUPPORTED("1y3lpr6pjid8ob5onc2hncben"); // EXPANDBP(b, a[i]); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5l547bajz46b3nak1gcn1xgbx"); // pw = b.UR.x - b.LL.x; UNSUPPORTED("370p3pzdb3r4j80cqbinj84ig"); // ph = b.UR.y - b.LL.y; UNSUPPORTED("20jqgqhi8nnb31ugjlxv5mfgd"); // ih = (double) isz.y; UNSUPPORTED("eajz69qazr70u5u4virjxef9c"); // iw = (double) isz.x; UNSUPPORTED("3jv1mdnld1gfgqyowoe3iai46"); // scalex = pw / iw; UNSUPPORTED("19lmg6layyecz6vq3tzk6iwqc"); // scaley = ph / ih; UNSUPPORTED("crt8ua8sg8nrxfn965bl378nm"); // switch (get_imagescale(imagescale)) { UNSUPPORTED("9x5d1p2vwawhnebkxvik4ler0"); // case IMAGESCALE_TRUE: UNSUPPORTED("13lnmnrrtauczxh7m0yh16omx"); // /* keep aspect ratio fixed by just using the smaller scale */ UNSUPPORTED("35ptrfp241fjgv3d65rhgyvfz"); // if (scalex < scaley) { UNSUPPORTED("evffc82eplte7tbacg5igm7t1"); // iw *= scalex; UNSUPPORTED("4c103f16tmlh4niqoc6sqgngw"); // ih *= scalex; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("2ia00rm1213j433ep221netai"); // iw *= scaley; UNSUPPORTED("e73g6zisi7ulw9whkaan7y5go"); // ih *= scaley; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("bg4352ii1wtvlgazxbs7q8h21"); // case IMAGESCALE_WIDTH: UNSUPPORTED("98n9ml3m71mrha04tx2qjd2ug"); // iw *= scalex; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("ecv5vta16tbc18yxmxjzpkl03"); // case IMAGESCALE_HEIGHT: UNSUPPORTED("bthar9ttyrew0nvghtr3jbrlv"); // ih *= scaley; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("52xjldytepdnjwbuuftuni25s"); // case IMAGESCALE_BOTH: UNSUPPORTED("98n9ml3m71mrha04tx2qjd2ug"); // iw *= scalex; UNSUPPORTED("bthar9ttyrew0nvghtr3jbrlv"); // ih *= scaley; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("4dtyjnaw3zlyc8ymxnftwyvm6"); // case IMAGESCALE_FALSE: UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("86tahm66tt20ykc8ny2tzk3ze"); // /* if image is smaller than target area then center it */ UNSUPPORTED("5h0ev3sjr0rjuc1rvqvcxdfvq"); // if (iw < pw) { UNSUPPORTED("cbvvk9amzw6bdegl0ecjking7"); // b.LL.x += (pw - iw) / 2.0; UNSUPPORTED("5hysx98tyafdlh0uqucunh4q8"); // b.UR.x -= (pw - iw) / 2.0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7961jlqlc9zg8cezqa8kciiwy"); // if (ih < ph) { UNSUPPORTED("cc1xxa7ttu5nlyd4m0qkif9w7"); // b.LL.y += (ph - ih) / 2.0; UNSUPPORTED("6oh6e3zjxnin6hxzzbd6ljfxp"); // b.UR.y -= (ph - ih) / 2.0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("69ziz4onms29gp005lfbsxw08"); // /* convert from graph to device coordinates */ UNSUPPORTED("5ns2lzxxg3bbgizp0jtbmieye"); // if (!(job->flags & (1<<13))) { UNSUPPORTED("buzq3sk9f7ll29s59hivg2fni"); // b.LL = gvrender_ptf(job, b.LL); UNSUPPORTED("dl8zgtciz8uf4yloys650b6dc"); // b.UR = gvrender_ptf(job, b.UR); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b6p3r12lnoxocu3l1hnza3ybx"); // if (b.LL.x > b.UR.x) { UNSUPPORTED("34o3euq4mb31azwc69v72tqa1"); // double d = b.LL.x; UNSUPPORTED("5uptom4thtt0qanfm9axd15zo"); // b.LL.x = b.UR.x; UNSUPPORTED("6pdd6mw8v1li3v7jz1g4q8t8d"); // b.UR.x = d; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ui9nw26f8tqmqg8nl2ppbzxs"); // if (b.LL.y > b.UR.y) { UNSUPPORTED("5n2cnyobffi7mbdk1qslollkp"); // double d = b.LL.y; UNSUPPORTED("783ve2lazsyx422w165c4syrf"); // b.LL.y = b.UR.y; UNSUPPORTED("5x5nvpjy2r74y4ljpnu4u08i"); // b.UR.y = d; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("9mmza3nlarjca7p78m5h9xos4"); // gvloadimage(job, us, b, filled, job->render.type); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4u2p88wr82whlushkt6jc2qjm // void gvrender_set_penwidth(GVJ_t * job, double penwidth) public static Object gvrender_set_penwidth(Object... arg) { UNSUPPORTED("4sxn3kk22l21zki26l63tudc1"); // void gvrender_set_penwidth(GVJ_t * job, double penwidth) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f1y2y1c3z2f172ut1ewmzfnmn"); // gvrender_engine_t *gvre = job->render.engine; UNSUPPORTED("dg636tu66pifgwut68sbx2cvx"); // if (gvre) { UNSUPPORTED("3zhz40tekxxllcduntmn94hvv"); // job->obj->penwidth = penwidth; UNSUPPORTED("3c3xrh3ygj2k3vrtdokz98wd7"); // /*if (gvre->set_penwidth) gvre->set_penwidth(job, penwidth); */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/gvc/gvtextlayout__c.java000066400000000000000000000124451312650303100226340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.gvc; import static gen.lib.gvc.gvplugin__c.gvplugin_load; import static smetana.core.JUtils.enumAsInt; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.GVC_s; import h.api_t; import h.gvplugin_available_s; import h.gvplugin_installed_t; import smetana.core.CString; public class gvtextlayout__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //3 f1oiyeonoigwygyq8c88wl8tz // int gvtextlayout_select(GVC_t * gvc) public static int gvtextlayout_select(GVC_s gvc) { ENTERING("f1oiyeonoigwygyq8c88wl8tz","gvtextlayout_select"); try { gvplugin_available_s plugin; gvplugin_installed_t typeptr; plugin = gvplugin_load(gvc, enumAsInt(api_t.class, "API_textlayout"), new CString("textlayout")); if (plugin!=null) { UNSUPPORTED("8cnmkxanogd09zc24faarugvo"); // typeptr = plugin->typeptr; UNSUPPORTED("cihmstdaldbultct48d4klpzn"); // gvc->textlayout.engine = (gvtextlayout_engine_t *) (typeptr->engine); UNSUPPORTED("47nsfms3a4gr280vabzgt5x3f"); // return 300; /* FIXME - need more suitable success code */ } return 999; } finally { LEAVING("f1oiyeonoigwygyq8c88wl8tz","gvtextlayout_select"); } } //3 f2jbuh3elz9mya1fc3ga6d3z9 // boolean gvtextlayout(GVC_t *gvc, textspan_t *span, char **fontpath) public static Object gvtextlayout(Object... arg) { UNSUPPORTED("2jsqpz6hn581464yugh0tou2l"); // boolean gvtextlayout(GVC_t *gvc, textspan_t *span, char **fontpath) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6lss2n766usro8etj7wmu49lz"); // gvtextlayout_engine_t *gvte = gvc->textlayout.engine; UNSUPPORTED("8kfw5uy3hnla57n731fnzv3rh"); // if (gvte && gvte->textlayout) UNSUPPORTED("1vzb5q1afwigxljf6njahgd70"); // return gvte->textlayout(span, fontpath); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/gvc/gvusershape__c.java000066400000000000000000001340761312650303100224160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.gvc; import static smetana.core.Macro.UNSUPPORTED; public class gvusershape__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 9brvabw9vk27d2nrq4p8tf971 // static Dict_t *ImageDict //1 9pk2f9zg2k7nxk2pay6uw1ecz // static knowntype_t knowntypes[] = //3 afsdkf8ez5ohl6dd2prle0bgt // static int imagetype (usershape_t *us) public static Object imagetype(Object... arg) { UNSUPPORTED("7vhzi3i3q0uu1byz03i34arpi"); // static int imagetype (usershape_t *us) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4xkzi87btn54hoh901yqje0t2"); // char header[20]; UNSUPPORTED("34btb8w1kvws7rrywxitht2dt"); // char line[200]; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("ayo4w7poqzsosr46zq587rive"); // if (us->f && fread(header, 1, 20, us->f) == 20) { UNSUPPORTED("4f6p9x65zgxhi7g72c6rr85ez"); // for (i = 0; i < sizeof(knowntypes) / sizeof(knowntype_t); i++) { UNSUPPORTED("ken197schvdfnlj4tbd1ajsg"); // if (!memcmp (header, knowntypes[i].template, knowntypes[i].size)) { UNSUPPORTED("boxmes4yvhbhxz864uev9jrkn"); // us->stringtype = knowntypes[i].stringtype; UNSUPPORTED("ot0inunld2mj1q1v9ubb1meg"); // us->type = knowntypes[i].type; UNSUPPORTED("itn78hlno7a8ug22ta41xds5"); // if (us->type == FT_XML) { UNSUPPORTED("152itmr8zxm9bdyohwofdarej"); // /* check for SVG in case of XML */ UNSUPPORTED("3hr9t6mkxbajyo66bbwwo671x"); // while (fgets(line, sizeof(line), us->f) != (void *)0) { UNSUPPORTED("3t6168qdbfqfv25fv7zx4xfms"); // if (!memcmp(line, "stringtype = "svg"; UNSUPPORTED("ano6zabqu54wu0a40t35lj2q8"); // return (us->type = FT_SVG); UNSUPPORTED("3rk33w1xf0jaka2h033sgnx06"); // } UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("f1kxll0fswekbe2gwilmen2m7"); // else if (us->type == FT_RIFF) { UNSUPPORTED("cm5s3kh98e66k97v45ofiyv82"); // /* check for WEBP in case of RIFF */ UNSUPPORTED("4ma0gwqxr9j5qek6xkrskevsl"); // if (!memcmp(header+8, "WEBP", sizeof("WEBP")-1)) { UNSUPPORTED("3zasc2uxnxlgetbuyifmr97bf"); // us->stringtype = "webp"; UNSUPPORTED("cgno6et27of87vw0o38rnarxx"); // return (us->type = FT_WEBP); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("60vq78txdp1vk965f5jgtlboc"); // return us->type; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("775efiysp2o60ingiihr8o6kq"); // us->stringtype = "(lib)"; UNSUPPORTED("acr9g7qhtz1yhdxvbzfapnlad"); // us->type = FT_NULL; UNSUPPORTED("7yivuk2g5w938mbst7quo3jxa"); // return FT_NULL; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bnikn3k3s008dmhsa2qu6lh34 // static boolean get_int_lsb_first (FILE *f, unsigned int sz, unsigned int *val) public static Object get_int_lsb_first(Object... arg) { UNSUPPORTED("cj03ffwnafffjxcznknyyp45b"); // static boolean get_int_lsb_first (FILE *f, unsigned int sz, unsigned int *val) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("70g3qubiio6uxhg2gxt141bff"); // int ch, i; UNSUPPORTED("f3wi4z18bhg0unx5i47wp28hb"); // *val = 0; UNSUPPORTED("6p1fgfnk4itt60e21fa48roiq"); // for (i = 0; i < sz; i++) { UNSUPPORTED("7zywfbf1jevwjemy5yzpfiiza"); // ch = fgetc(f); UNSUPPORTED("1t7v5vi7ec6r3mhla23o1v3w2"); // if (feof(f)) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("1ewc3hwvqjod1e2ou7c4u02h1"); // *val |= (ch << 8*i); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4si0cf97a5sfd9ozuunds9goz"); // return (!(0)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 87ifzytv1xgex4vf4ffa1fx28 // static boolean get_int_msb_first (FILE *f, unsigned int sz, unsigned int *val) public static Object get_int_msb_first(Object... arg) { UNSUPPORTED("ad8pamcrkweeq9xmkgw9docv9"); // static boolean get_int_msb_first (FILE *f, unsigned int sz, unsigned int *val) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("70g3qubiio6uxhg2gxt141bff"); // int ch, i; UNSUPPORTED("f3wi4z18bhg0unx5i47wp28hb"); // *val = 0; UNSUPPORTED("6p1fgfnk4itt60e21fa48roiq"); // for (i = 0; i < sz; i++) { UNSUPPORTED("7zywfbf1jevwjemy5yzpfiiza"); // ch = fgetc(f); UNSUPPORTED("1t7v5vi7ec6r3mhla23o1v3w2"); // if (feof(f)) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("ac2fcmmhoviu6vu7od03xd2fz"); // *val <<= 8; UNSUPPORTED("2aeq31k5bdbmozogiex8thool"); // *val |= ch; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4si0cf97a5sfd9ozuunds9goz"); // return (!(0)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e6zw0qebmgir30wjyodre1w3q // static unsigned int svg_units_convert(double n, char *u) public static Object svg_units_convert(Object... arg) { UNSUPPORTED("1q167s10zcp2ohq3mqsaucn6q"); // static unsigned int svg_units_convert(double n, char *u) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("as83qujnkumxgvltowl9k84pa"); // if (strcmp(u, "in") == 0) UNSUPPORTED("cz9p5u3tzm0vtfcypzsqjjznz"); // return ROUND(n * 72); UNSUPPORTED("a3ea8buut0466me8422yze7nk"); // if (strcmp(u, "px") == 0) UNSUPPORTED("17k340tdedf8kyw8jjau617ji"); // return ROUND(n * 72 / 96); UNSUPPORTED("e1voxws30sz7bauvt2nz3e43i"); // if (strcmp(u, "pc") == 0) UNSUPPORTED("dgfrr8ul58nbz256i7zg3dfnv"); // return ROUND(n * 72 / 6); UNSUPPORTED("3zt4017at03z9nmfg4b6j33nl"); // if (strcmp(u, "pt") == 0 || strcmp(u, "\"") == 0) /* ugly!! - if there are no inits then the %2s get the trailing '"' */ UNSUPPORTED("3bme0piy1kqu5q9y4eqbrr5fm"); // return ROUND(n); UNSUPPORTED("4kvfi7mn3m1cvs8748w6apqe6"); // if (strcmp(u, "cm") == 0) UNSUPPORTED("40fcy0h4yq1mhgc6sig41xkiz"); // return ROUND(n * ((double)72 * 0.393700787)); UNSUPPORTED("795vmm17p8fultyx81btq2qj7"); // if (strcmp(u, "mm") == 0) UNSUPPORTED("2p58445vgby41tw5y37sb952f"); // return ROUND(n * ((double)72 * 0.0393700787)); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 48cx4t8oc5776gxxsx3wj1459 // static char* svg_attr_value_re = //1 urpt4udx4umgv15x10ssv67m // static regex_t re, *pre = (void *)0 //3 di4bxm03m9srcwmfu82mzqtu // static void svg_size (usershape_t *us) public static Object svg_size(Object... arg) { UNSUPPORTED("3bpommb3a197xaax86ebpnapc"); // static void svg_size (usershape_t *us) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("16qpk89sms5wm32xxhdjsrhj1"); // unsigned int w = 0, h = 0; UNSUPPORTED("3bfgwfzonzqutm2m3s241ggmq"); // double n, x0, y0, x1, y1; UNSUPPORTED("5urpczqwzlgz812axw5w07irp"); // char u[10]; UNSUPPORTED("e7xkcvvhzn89z17vzxp5d9wqf"); // char *attribute, *value, *re_string; UNSUPPORTED("34btb8w1kvws7rrywxitht2dt"); // char line[200]; UNSUPPORTED("1kfdqzk554dccavlk1sr8hc6k"); // boolean wFlag = 0, hFlag = 0; UNSUPPORTED("txcitt9410z35lsx2a1qr3zb"); // regmatch_t re_pmatch[4]; UNSUPPORTED("2elnezsihato03euhhcjmczz6"); // /* compile on first use */ UNSUPPORTED("b3qk4y1nm971zossf7ba67c39"); // if (! pre) { UNSUPPORTED("4k0rhf891tka3e5fomw7gygix"); // if (regcomp(&re, svg_attr_value_re, REG_EXTENDED) != 0) { UNSUPPORTED("bvbawrzsgnxy8a4de3iuwaeqb"); // agerr(AGERR,"cannot compile regular expression %s", svg_attr_value_re); UNSUPPORTED("klxoy56t7b20wxnwqm0qoofz"); // } UNSUPPORTED("9let8u6jhsriwmr05bp3gwoy5"); // pre = &re; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7iygf89yc0kwp5pocixawdaed"); // fseek(us->f, 0, SEEK_SET); UNSUPPORTED("40jwwwlrum66g8u94aha46ac6"); // while (fgets(line, sizeof(line), us->f) != (void *)0 && (!wFlag || !hFlag)) { UNSUPPORTED("1d8ii0hljelb18gmpwwrtvano"); // re_string = line; UNSUPPORTED("5bh0ae9np7zl19gk8h3h9317e"); // while (regexec(&re, re_string, 4, re_pmatch, 0) == 0) { UNSUPPORTED("b355fkvcamz9jmg27def9b8x3"); // re_string[re_pmatch[1].rm_eo] = '\0'; UNSUPPORTED("aef3m3p3zi96h0zt0sjw03lj4"); // re_string[re_pmatch[2].rm_eo] = '\0'; UNSUPPORTED("eipkd5535u39a7ub3xbstkeu2"); // attribute = re_string + re_pmatch[1].rm_so; UNSUPPORTED("bqe4861o77yhd2c4hm2q9ryqg"); // value = re_string + re_pmatch[2].rm_so; UNSUPPORTED("c9y0ykkvqmbho7jwq1hq2v8rg"); // re_string += re_pmatch[0].rm_eo + 1; UNSUPPORTED("4x0vivqfmvb5kxu3yv8zlj0z8"); // if (strcmp(attribute,"width") == 0) { UNSUPPORTED("cjoilrknjlp3580a79aeduafs"); // if (sscanf(value, "%lf%2s", &n, u) == 2) { UNSUPPORTED("5804xn01sb0nsqc4oand73j71"); // w = svg_units_convert(n, u); UNSUPPORTED("boxr36cof383w0qjpos68wr3p"); // wFlag = (!(0)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("coem1appm7al4by2xogxcf79v"); // else if (sscanf(value, "%lf", &n) == 1) { UNSUPPORTED("d20bsvecsbla4zfrgr8vs0axk"); // w = svg_units_convert(n, "pt"); UNSUPPORTED("boxr36cof383w0qjpos68wr3p"); // wFlag = (!(0)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("bokpcg0aj7i7sody2nk55sn1m"); // if (hFlag) UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("349wmcj9pjfzzogsgqytbecep"); // else if (strcmp(attribute,"height") == 0) { UNSUPPORTED("cjoilrknjlp3580a79aeduafs"); // if (sscanf(value, "%lf%2s", &n, u) == 2) { UNSUPPORTED("4e8rpne5p90nqhwswzkila8du"); // h = svg_units_convert(n, u); UNSUPPORTED("75lsnpofiu7aq6tvk1bytezfx"); // hFlag = (!(0)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("318wbwzbtyt293618awt8oi7j"); // else if (sscanf(value, "%lf", &n) == 1) { UNSUPPORTED("8roq2ozo7ghuukkquxg4vi3o8"); // h = svg_units_convert(n, "pt"); UNSUPPORTED("75lsnpofiu7aq6tvk1bytezfx"); // hFlag = (!(0)); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3f72eveov59pnntffs33fh1o9"); // if (wFlag) UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("evrgwvbtefbhi8c4vpurqyncz"); // else if (strcmp(attribute,"viewBox") == 0 UNSUPPORTED("7knynrz6icv4twtp5re2u2tyu"); // && sscanf(value, "%lf %lf %lf %lf", &x0,&y0,&x1,&y1) == 4) { UNSUPPORTED("b75jl7dtq9qf4ike38i53sb5b"); // w = x1 - x0 + 1; UNSUPPORTED("ccjsgjzpqovbgplagso2d6wvk"); // h = y1 - y0 + 1; UNSUPPORTED("agh2p3816w463hvgmt7pji00p"); // wFlag = (!(0)); UNSUPPORTED("b0kbr8vydi49ibjics3e3mlip"); // hFlag = (!(0)); UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; UNSUPPORTED("avyq4e4me4o2pteunxjmfehds"); // us->w = w; UNSUPPORTED("evkuhplkb5xfea6ln3h8f6ly2"); // us->h = h; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2phgl4coa8enkvltpf0938lit // static void png_size (usershape_t *us) public static Object png_size(Object... arg) { UNSUPPORTED("5qra9bwfkjw5syv0odudm6gam"); // static void png_size (usershape_t *us) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8l3f9beos057zjxgk0cdj323o"); // unsigned int w, h; UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; UNSUPPORTED("3135bp24afhqdzs2uj5l7sjr1"); // fseek(us->f, 16, SEEK_SET); UNSUPPORTED("1luxqut1mknrn8qp0yakx9czw"); // if (get_int_msb_first(us->f, 4, &w) && get_int_msb_first(us->f, 4, &h)) { UNSUPPORTED("73axoa9apyrx2829eqsezmfik"); // us->w = w; UNSUPPORTED("993qcme7jlmcsi918hu491ld5"); // us->h = h; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 lqow6tkjqnnbqz6msa6cmzlk // static void ico_size (usershape_t *us) public static Object ico_size(Object... arg) { UNSUPPORTED("6eqck7knu0bxd3sib3fpca2hf"); // static void ico_size (usershape_t *us) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8l3f9beos057zjxgk0cdj323o"); // unsigned int w, h; UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; UNSUPPORTED("bunso4je5hrb29m4984fw7bh6"); // fseek(us->f, 6, SEEK_SET); UNSUPPORTED("875b5zt62o9flpi731becymv4"); // if (get_int_msb_first(us->f, 1, &w) && get_int_msb_first(us->f, 1, &h)) { UNSUPPORTED("73axoa9apyrx2829eqsezmfik"); // us->w = w; UNSUPPORTED("993qcme7jlmcsi918hu491ld5"); // us->h = h; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dleljswqxf1oa4gzr8l8fomcl // static void webp_size (usershape_t *us) public static Object webp_size(Object... arg) { UNSUPPORTED("dl59ajg8cu2fj1vuagj6pumce"); // static void webp_size (usershape_t *us) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8l3f9beos057zjxgk0cdj323o"); // unsigned int w, h; UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; UNSUPPORTED("3mt62dnri0kt6p9g6nmf6x78i"); // fseek(us->f, 15, SEEK_SET); UNSUPPORTED("bro476e5tdpqu4kqzjhadepr8"); // if (fgetc(us->f) == 'X') { //VP8X UNSUPPORTED("ciyvs7xrf1sc336ipavk7gjbs"); // fseek(us->f, 24, SEEK_SET); UNSUPPORTED("77gjxe5g6u7c6371ziwedefxf"); // if (get_int_lsb_first(us->f, 4, &w) && get_int_lsb_first(us->f, 4, &h)) { UNSUPPORTED("9htwijlhm4ad9uo70xn5d5tvl"); // us->w = w; UNSUPPORTED("3hh8nl3qystuq8wcwsm411fej"); // us->h = h; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bwt2eurukj3m7fsbr441rf1pj"); // else { //VP8 UNSUPPORTED("5fthwx7kwgddogs4n4fsbb0o8"); // fseek(us->f, 26, SEEK_SET); UNSUPPORTED("621fvdyd12vnbfyxpw6j0z7cr"); // if (get_int_lsb_first(us->f, 2, &w) && get_int_lsb_first(us->f, 2, &h)) { UNSUPPORTED("9htwijlhm4ad9uo70xn5d5tvl"); // us->w = w; UNSUPPORTED("3hh8nl3qystuq8wcwsm411fej"); // us->h = h; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2s3ms72agp5gyfqz15zbpp3u1 // static void gif_size (usershape_t *us) public static Object gif_size(Object... arg) { UNSUPPORTED("ac8be5d24wrrx24tnddiukvl7"); // static void gif_size (usershape_t *us) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8l3f9beos057zjxgk0cdj323o"); // unsigned int w, h; UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; UNSUPPORTED("bunso4je5hrb29m4984fw7bh6"); // fseek(us->f, 6, SEEK_SET); UNSUPPORTED("ezkdvuggkyj11n6ca6xrhm72g"); // if (get_int_lsb_first(us->f, 2, &w) && get_int_lsb_first(us->f, 2, &h)) { UNSUPPORTED("73axoa9apyrx2829eqsezmfik"); // us->w = w; UNSUPPORTED("993qcme7jlmcsi918hu491ld5"); // us->h = h; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bpjeya6em7jp6m6l86m6t4u4a // static void bmp_size (usershape_t *us) public static Object bmp_size(Object... arg) { UNSUPPORTED("ba2pylwi2xu10asnonw92pxw1"); // static void bmp_size (usershape_t *us) { UNSUPPORTED("ct1272vz7j34sqkcwzdiq2x0i"); // unsigned int size_x_msw, size_x_lsw, size_y_msw, size_y_lsw; UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; UNSUPPORTED("9b418veiss4t0o7s8cqq28owo"); // fseek (us->f, 16, SEEK_SET); UNSUPPORTED("1q9kmvi2ajod9wlev8s5p50rv"); // if ( get_int_lsb_first (us->f, 2, &size_x_msw) && UNSUPPORTED("5f5k6cp1ota9f8a2ciircybdh"); // get_int_lsb_first (us->f, 2, &size_x_lsw) && UNSUPPORTED("9n6cqmhzmbkf1vt9fyu6zw0kp"); // get_int_lsb_first (us->f, 2, &size_y_msw) && UNSUPPORTED("cid929pl3ogyk2kecod7opvz0"); // get_int_lsb_first (us->f, 2, &size_y_lsw) ) { UNSUPPORTED("a6g25f4k8ew6jja5m9rnccf5o"); // us->w = size_x_msw << 16 | size_x_lsw; UNSUPPORTED("8exqj264llut5d629ydwne5k2"); // us->h = size_y_msw << 16 | size_y_lsw; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c7yvo5wd816hjqxejnluaol0a // static void jpeg_size (usershape_t *us) public static Object jpeg_size(Object... arg) { UNSUPPORTED("c8uakwctlakoj06f07juq8r2a"); // static void jpeg_size (usershape_t *us) { UNSUPPORTED("3o57tczyjy6z9uvry23b9xkw5"); // unsigned int marker, length, size_x, size_y, junk; UNSUPPORTED("4ylph99ph3r2v7uhxyd2hq0io"); // /* These are the markers that follow 0xff in the file. UNSUPPORTED("1pzctl0feh1bhiqnxtmawvxg4"); // * Other markers implicitly have a 2-byte length field that follows. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("1lgv3mem6buwpyuef4b9h8rzp"); // static unsigned char standalone_markers [] = { UNSUPPORTED("e00djw6cjtdaxejgnewp8nus6"); // 0x01, /* Temporary */ UNSUPPORTED("1urwngq6m3z6m5mr3egwgq9mr"); // 0xd0, 0xd1, 0xd2, 0xd3, /* Reset */ UNSUPPORTED("e1vwc4842h5c84ojr8w3onuno"); // 0xd4, 0xd5, 0xd6, UNSUPPORTED("1uig2kz9nbo8j6vj3r7493n8"); // 0xd7, UNSUPPORTED("927bzm317ui2xj8ugbwhm5xb7"); // 0xd8, /* Start of image */ UNSUPPORTED("9ybi9mcsggfw3zbh6zn9hotef"); // 0xd9, /* End of image */ UNSUPPORTED("fbagrxdnmyjkvt7zaukczscg"); // 0 UNSUPPORTED("9u8qqu9tw95qjbv3cxv3hj4bd"); // }; UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; UNSUPPORTED("5owjshc6gmd9o9lmekzcl6rvg"); // while ((!(0))) { UNSUPPORTED("7kq4b2hkhf3vcx97hwoelgcxz"); // /* Now we must be at a 0xff or at a series of 0xff's. UNSUPPORTED("cga1geam6con9djkcofzmw0ko"); // * If that is not the case, or if we're at EOF, then there's UNSUPPORTED("exr8s1ongonmgsucjdf4zsmb4"); // * a parsing error. UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ UNSUPPORTED("79jgtuw1xg9dgik49e3hx1068"); // if (! get_int_msb_first (us->f, 1, &marker)) UNSUPPORTED("3zyp4vhegf9dl2g8a4ffmxah8"); // return; UNSUPPORTED("e7cevpg68ih107a2ggfgkq1la"); // if (marker == 0xff) UNSUPPORTED("9j8yk6fxm4tnpr3yrev0f9bhm"); // continue; UNSUPPORTED("99hdbrpbwvb3lwfyhz43xnoxf"); // /* Ok.. marker now read. If it is not a stand-alone marker, UNSUPPORTED("b7dntxmllxk3wzmg9mclxs71r"); // * then continue. If it's a Start Of Frame (0xc?), then we're there. UNSUPPORTED("8aramua11q89c43osky6tgha5"); // * If it's another marker with a length field, then skip ahead UNSUPPORTED("5w0fy7m3152rri519xzsydb2w"); // * over that length field. UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ UNSUPPORTED("7itrbaa4e2u9uh86wydx2r1wq"); // /* A stand-alone... */ UNSUPPORTED("7m1dttkv67ixwryn1ukl94hel"); // if (strchr ((char*)standalone_markers, marker)) UNSUPPORTED("9j8yk6fxm4tnpr3yrev0f9bhm"); // continue; UNSUPPORTED("sb3rjk9k59soh7qvm0qpkzoh"); // /* Incase of a 0xc0 marker: */ UNSUPPORTED("6u3lv1x78jskc1qjam25s00h1"); // if (marker == 0xc0) { UNSUPPORTED("4kucipi8uw6ujeuh489csoowf"); // /* Skip length and 2 lengths. */ UNSUPPORTED("30gcyw02iuybxoyj28nhlbwbl"); // if ( get_int_msb_first (us->f, 3, &junk) && UNSUPPORTED("b6ypup1v81rta7mfh68arftfd"); // get_int_msb_first (us->f, 2, &size_x) && UNSUPPORTED("f2mbg2ezlyocn5228wkhy658f"); // get_int_msb_first (us->f, 2, &size_y) ) { UNSUPPORTED("eps17wh894vxn0oojbitsn1lr"); // /* Store length. */ UNSUPPORTED("danamcguxf0st13b0euh47y8v"); // us->h = size_x; UNSUPPORTED("gva1bl1ygb6xzrrjwpma3dpp"); // us->w = size_y; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("7jc4v9i136pgfvwakfui3aupm"); // /* Incase of a 0xc2 marker: */ UNSUPPORTED("a1ww3q31w3xsq697vt32phj9d"); // if (marker == 0xc2) { UNSUPPORTED("7xwfuqyvolr45lp6gdcnmqyna"); // /* Skip length and one more byte */ UNSUPPORTED("dhyz02dvhk6z01p9nh8knpdnp"); // if (! get_int_msb_first (us->f, 3, &junk)) UNSUPPORTED("6an8ocqq0sjru42k4aathe94m"); // return; UNSUPPORTED("7b106vc3jzqz2eyjlo758xw2n"); // /* Get length and store. */ UNSUPPORTED("akbj7dadm0nq5ujmuwiw50ukl"); // if ( get_int_msb_first (us->f, 2, &size_x) && UNSUPPORTED("f2mbg2ezlyocn5228wkhy658f"); // get_int_msb_first (us->f, 2, &size_y) ) { UNSUPPORTED("danamcguxf0st13b0euh47y8v"); // us->h = size_x; UNSUPPORTED("gva1bl1ygb6xzrrjwpma3dpp"); // us->w = size_y; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("9qz6tc2665rtirz7egtertjyl"); // /* Any other marker is assumed to be followed by 2 bytes length. */ UNSUPPORTED("5xvajayqclvcxxqkozzorzbdi"); // if (! get_int_msb_first (us->f, 2, &length)) UNSUPPORTED("3zyp4vhegf9dl2g8a4ffmxah8"); // return; UNSUPPORTED("cv5sg5k6hy1kwgiinb4i5xr6"); // fseek (us->f, length - 2, SEEK_CUR); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9vi0gtfjnp35ie6bx15grm4gp // static void ps_size (usershape_t *us) public static Object ps_size(Object... arg) { UNSUPPORTED("8kctdt9asc26knxxydik2v8ug"); // static void ps_size (usershape_t *us) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("18vi5vqd0r4k0kxsl3h3rwa4y"); // char line[BUFSIZ]; UNSUPPORTED("4qk2wsv83bxm1lchsnd6splfr"); // boolean saw_bb; UNSUPPORTED("5rcgzsa5rlhtyjz964tcthts2"); // int lx, ly, ux, uy; UNSUPPORTED("5fewhg0dt0vbugqk2bmyfr34l"); // char* linep; UNSUPPORTED("891wob6d9fi1zsdfvumw7tx5y"); // us->dpi = 72; UNSUPPORTED("7iygf89yc0kwp5pocixawdaed"); // fseek(us->f, 0, SEEK_SET); UNSUPPORTED("w6asn9e9wasakvoc3kn19lwt"); // saw_bb = 0; UNSUPPORTED("cpypiyiyiq875wcq5pix66en2"); // while (fgets(line, sizeof(line), us->f)) { UNSUPPORTED("7vmkqwijdn7elebqrq3q3qqlv"); // /* PostScript accepts \r as EOL, so using fgets () and looking for a UNSUPPORTED("ccqysd4ji4ezs2u937a1tq93k"); // * bounding box comment at the beginning doesn't work in this case. UNSUPPORTED("a548nncd0y8n2a01c5z3akmhg"); // * As a heuristic, we first search for a bounding box comment in line. UNSUPPORTED("djrf0gim2rh71i0skg41uw6zn"); // * This obviously fails if not all of the numbers make it into the UNSUPPORTED("x3dg0lfzyp7yc2hldpo3cbge"); // * current buffer. This shouldn't be a problem, as the comment is UNSUPPORTED("4uvbwtwj71pylu4bfe3pu79le"); // * typically near the beginning, and so should be read within the first UNSUPPORTED("426auswwt3iw0kmtesztdy9ff"); // * BUFSIZ bytes (even on Windows where this is 512). UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("8iwr2d3ooqy0tw5eisixpectn"); // if (!(linep = strstr (line, "%%BoundingBox:"))) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("2s519tr2mhoj177f79vzllnyq"); // if (sscanf (linep, "%%%%BoundingBox: %d %d %d %d", &lx, &ly, &ux, &uy) == 4) { UNSUPPORTED("6dekl3sp6brld4uq5ep5859l3"); // saw_bb = (!(0)); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8p3jjm43yrzygpor71hdkfs1g"); // if (saw_bb) { UNSUPPORTED("5dym7sjpxsgdgav57jvyuohe8"); // us->x = lx; UNSUPPORTED("da04q03gf0w4upkkrsn74w1dc"); // us->y = ly; UNSUPPORTED("6mpj1u4n7cyggpme1vsa6je8t"); // us->w = ux - lx; UNSUPPORTED("dqnhfatraydhv6fdx3gsi22ao"); // us->h = uy - ly; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 87i5xtm6lbxo4asqfnu0v9rz1 // static unsigned char nxtc (stream_t* str) public static Object nxtc(Object... arg) { UNSUPPORTED("at0aua2ntxsp0j1h4yidmr4si"); // static unsigned char UNSUPPORTED("9rrtdlhn8kugpol3lky8rgp5n"); // nxtc (stream_t* str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9jyosg56ecd165ua22kq89ggj"); // if (fgets(str->buf, BUFSIZ, str->fp)) { UNSUPPORTED("bo88dnmxymbe4e1rppc0ex9ve"); // str->s = str->buf; UNSUPPORTED("8tdhptj2ed5dv8sew624q4jec"); // return *(str->s); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("278hcy3fayv5vclqcgtpjbzdi"); // return '\0'; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2fq3qaeuu4gjr89xmwwy7i4xe // static void skipWS (stream_t* str) public static Object skipWS(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("cactz8998uk8ou1c5zwtwg601"); // skipWS (stream_t* str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("10sir32iwi5l2jyfgp65pihto"); // unsigned char c; UNSUPPORTED("91zm214vvm6477gtei1ggjkef"); // while ((c = (*(str->s)?*(str->s):nxtc(str)))) { UNSUPPORTED("dilzs0pemy12rvmpnko0iel59"); // if (isspace(c)) (str->s++); UNSUPPORTED("9wafzg86cpce49qfuv8wsl6in"); // else return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dwmuhk2xjfndhxozxfrdz5nk8 // static int scanNum (char* tok, double* dp) public static Object scanNum(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("eq0ltrbhzwt422rffdlm4d20e"); // scanNum (char* tok, double* dp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bkz9mqmemp1ljxdwdbu8xv3e9"); // char* endp; UNSUPPORTED("avrsd77b596s5g291ozzdpxf8"); // double d = strtod(tok, &endp); UNSUPPORTED("2qoq2nf2jpfoyc68njwm2ajkq"); // if (tok == endp) return 1; UNSUPPORTED("636uh4i1x8w844yxwd2u322d1"); // *dp = d; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dhjmc8hrpmiohrejyu72mrhno // static void getNum (stream_t* str, char* buf) public static Object getNum(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("doymhclp9a2fukna3vd3r7xf8"); // getNum (stream_t* str, char* buf) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bsj3r19ko668lwj5fqk8tlbhc"); // int len = 0; UNSUPPORTED("wrvu9u7a8j6i6y6552zncxfk"); // char c; UNSUPPORTED("936voey3mecmlo6hla9hyrmun"); // skipWS(str); UNSUPPORTED("tuyymjn2lfs038e1rm6hbw8w"); // while ((c = (*(str->s)?*(str->s):nxtc(str))) && (isdigit(c) || (c == '.'))) { UNSUPPORTED("4rvasxp4ert1zz5jaasrqeft1"); // buf[len++] = c; UNSUPPORTED("8vm8y5ewr5ra87d4f8exah65d"); // (str->s++); UNSUPPORTED("5zs9wc8ip6zkde4o33aadh30c"); // if (len == BUFSIZ-1) break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3w01p3l63zt07scumxz12foyc"); // buf[len] = '\0'; UNSUPPORTED("b9185t6i77ez1ac587ul8ndnc"); // return; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6kdhce4shbkw92wtfgufyqecs // static int boxof (stream_t* str, boxf* bp) public static Object boxof(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("d810hoc5e8uu0odpm097odpfu"); // boxof (stream_t* str, boxf* bp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1z7b1t0srtne632sd3ma9jbp7"); // char tok[BUFSIZ]; UNSUPPORTED("araz8ffm0d5v424qzgyh7bsvy"); // skipWS(str); UNSUPPORTED("1uwfhdftjs4loqhg7ecaermjd"); // if ((*(str->s)?*(str->s):nxtc(str)) != '[') return 1; UNSUPPORTED("8vm8y5ewr5ra87d4f8exah65d"); // (str->s++); UNSUPPORTED("6jh13u8w5qiy4ij2ebx6zmqwa"); // getNum(str, tok); UNSUPPORTED("1m5wgiebygd9j5o6m68etvwh0"); // if (scanNum(tok,&bp->LL.x)) return 1; UNSUPPORTED("6jh13u8w5qiy4ij2ebx6zmqwa"); // getNum(str, tok); UNSUPPORTED("9bcg5vhxd4fqd8ykkbivfm3d4"); // if (scanNum(tok,&bp->LL.y)) return 1; UNSUPPORTED("6jh13u8w5qiy4ij2ebx6zmqwa"); // getNum(str, tok); UNSUPPORTED("1z0q9nrhj393zbs1mok3h84tf"); // if (scanNum(tok,&bp->UR.x)) return 1; UNSUPPORTED("6jh13u8w5qiy4ij2ebx6zmqwa"); // getNum(str, tok); UNSUPPORTED("247082ftkwl5jzjorvyt3sgcl"); // if (scanNum(tok,&bp->UR.y)) return 1; UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dedr09vl6y9ax357arh6tayi // static int bboxPDF (FILE* fp, boxf* bp) public static Object bboxPDF(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("9icxkxwqm6flp3sl9ulkp4fyd"); // bboxPDF (FILE* fp, boxf* bp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f3gl6562biaxa4139uus0d370"); // stream_t str; UNSUPPORTED("5pjh3c3u4lxh1jdyyk966intb"); // char* s; UNSUPPORTED("8c7x8di5w36ib05qan9z4sl9"); // char buf[BUFSIZ]; UNSUPPORTED("8w39jbbwqjx63enrf5fdvcm9r"); // while (fgets(buf, BUFSIZ, fp)) { UNSUPPORTED("b7wioadlc5j3p2q8w7tsq1gam"); // if ((s = strstr(buf,"/MediaBox"))) { UNSUPPORTED("ecmojjd7fnaeah045va2t5eg8"); // str.buf = buf; UNSUPPORTED("5k89yh945d2crbir8397vkavv"); // str.s = s+(sizeof("/MediaBox")-1); UNSUPPORTED("dj08qw9n5j8nlqx752hipu46u"); // str.fp = fp; UNSUPPORTED("uhua7rc3vef3nawzjyh3w1k5"); // return boxof(&str,bp); UNSUPPORTED("yoqd73ulpi5tn8snro7dt3jc"); // } UNSUPPORTED("8nzcpbtoi924xzu8ze3z6dbft"); // } UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3fdvwmb09jpyu6h40pj206vv3 // static void pdf_size (usershape_t *us) public static Object pdf_size(Object... arg) { UNSUPPORTED("97swmsrhwped1e1n72fyev1ai"); // static void pdf_size (usershape_t *us) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; UNSUPPORTED("7iygf89yc0kwp5pocixawdaed"); // fseek(us->f, 0, SEEK_SET); UNSUPPORTED("cu1kld68jk8qm12c9f0n61vyd"); // if ( ! bboxPDF (us->f, &bb)) { UNSUPPORTED("14kgzu9x57imt127uyibumhif"); // us->x = bb.LL.x; UNSUPPORTED("51rq1d6stvtvjgfta18hxoiyg"); // us->y = bb.LL.y; UNSUPPORTED("encm75ymc6wgridj70fk0jf47"); // us->w = bb.UR.x - bb.LL.x; UNSUPPORTED("dy52i81burd516zy265e83wel"); // us->h = bb.UR.y - bb.LL.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cxhbj2es2sky90cnd8qf89prs // static void usershape_close (Dict_t * dict, void * p, Dtdisc_t * disc) public static Object usershape_close(Object... arg) { UNSUPPORTED("b7or8sf6zjmnj6wjf08brm0r"); // static void usershape_close (Dict_t * dict, void * p, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("58pwyr0d4numnoai5v987l5ml"); // usershape_t *us = (usershape_t *)p; UNSUPPORTED("ad2wgtudijnm3bp4549lrva3l"); // if (us->f) UNSUPPORTED("13i1v3mxl0sjnx4rgaden880d"); // fclose(us->f); UNSUPPORTED("e5bs4fy1a1v5ptm2bcrm2m9ai"); // if (us->data && us->datafree) UNSUPPORTED("1wod8ffcoluizmoc72db2htxb"); // us->datafree(us); UNSUPPORTED("73p2w162ujnuoboekx5udlion"); // free (us); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 es7jtx4lx7bg26412fcjit8ri // static Dtdisc_t ImageDictDisc = //3 9msk7qh9auq8w21r32k0ffcsa // usershape_t *gvusershape_find(char *name) public static Object gvusershape_find(Object... arg) { UNSUPPORTED("a9366bkr4gt4nvcj5bnkjrtrd"); // usershape_t *gvusershape_find(char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("exneoozy5g8al0a8y6fxb88zv"); // usershape_t *us; UNSUPPORTED("265kxn69043hh3vmr1ma8pbpg"); // assert(name); UNSUPPORTED("1av8we70pcc0ni7489zk2ttcg"); // assert(name[0]); UNSUPPORTED("4qhyd93m9v57fwb1anljrxfd3"); // if (!ImageDict) UNSUPPORTED("45tfw7tcm68298aro2tdiv8pc"); // return (void *)0; UNSUPPORTED("dzt5b4nn4x2oidxk4g4wzt8et"); // us = (*(((Dt_t*)(ImageDict))->searchf))((ImageDict),(void*)(name),0001000); UNSUPPORTED("2iqrgjc97xskxvw6791yf0sl7"); // return us; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3cgay03dg8pq23kln9kuc0ym5 // boolean gvusershape_file_access(usershape_t *us) public static Object gvusershape_file_access(Object... arg) { UNSUPPORTED("dm8po5i2hu4arliyfc2ea2a47"); // boolean gvusershape_file_access(usershape_t *us) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8u0o5i27i1no60qjs9r4os0f9"); // static int usershape_files_open_cnt; UNSUPPORTED("vadeh8lzzwz0ugk6azcwaayu"); // const char *fn; UNSUPPORTED("7gqi0ait1bhc4v9zl8rnn0wbs"); // assert(us); UNSUPPORTED("xlffgd4fqdckxg2nbs0mxtlj"); // assert(us->name); UNSUPPORTED("fk4kdjctgb13swd2h14t0yvh"); // assert(us->name[0]); UNSUPPORTED("ad2wgtudijnm3bp4549lrva3l"); // if (us->f) UNSUPPORTED("1te90msr6mhllwn4y3ghlahc0"); // fseek(us->f, 0, SEEK_SET); UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("d6n6b94e02ntmefeqcoo0ueon"); // if (! (fn = safefile(us->name))) { UNSUPPORTED("778vwup2lml5qa9eyxd88416u"); // agerr(AGWARN, "Filename \"%s\" is unsafe\n", us->name); UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("31rnydpzhmzclqs3q4flw9ce2"); // us->f = fopen(fn, "r"); UNSUPPORTED("cmb2imwpnm4tgu1dm9r5tgtj5"); // if (us->f == (void *)0) { UNSUPPORTED("ebzon8h2oywxvasmfmyhnw5pq"); // agerr(AGWARN, "%s while opening %s\n", strerror(errno), fn); UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e17a7n92m8ieuby8sa8jm1r3o"); // if (usershape_files_open_cnt >= 50) UNSUPPORTED("c9jo9gbhp1on7wctnk1o7q8vu"); // us->nocache = (!(0)); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("81eb64f0supcvkt4drj4djmby"); // usershape_files_open_cnt++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3ebwn2weruwgdz4tfaxj2htek"); // assert(us->f); UNSUPPORTED("4si0cf97a5sfd9ozuunds9goz"); // return (!(0)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9y4wcbk4jp03lbul2i25xzmp6 // void gvusershape_file_release(usershape_t *us) public static Object gvusershape_file_release(Object... arg) { UNSUPPORTED("6i3sc3o39zrjf80hb57rmbe1t"); // void gvusershape_file_release(usershape_t *us) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5a8j5zrw7vbgoyy4ogtlsywui"); // if (us->nocache) { UNSUPPORTED("47xp2oczqdec6db0z36u2n84r"); // if (us->f) { UNSUPPORTED("bzvrsl2iafc3pw0qughvm761m"); // fclose(us->f); UNSUPPORTED("amwbxewujlnkm7a19q6zl4xq0"); // us->f = (void *)0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gvu7lmp0zomg3yy0a76n8pjh // static usershape_t *gvusershape_open (char *name) public static Object gvusershape_open(Object... arg) { UNSUPPORTED("5kyko9vxn3aqt1awhp5hd8c6a"); // static usershape_t *gvusershape_open (char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("exneoozy5g8al0a8y6fxb88zv"); // usershape_t *us; UNSUPPORTED("265kxn69043hh3vmr1ma8pbpg"); // assert(name); UNSUPPORTED("4qhyd93m9v57fwb1anljrxfd3"); // if (!ImageDict) UNSUPPORTED("7tvne0duj1fh44ndje8hlq8nt"); // ImageDict = dtopen(&ImageDictDisc, Dttree); UNSUPPORTED("be9pwrhxzz4ia299kongm87uq"); // if (! (us = gvusershape_find(name))) { UNSUPPORTED("9suqlrwjg77jwdm7tlgzsc0by"); // if (! (us = zmalloc(sizeof(usershape_t)))) UNSUPPORTED("7f8nrnyuywny79cpzv6a49d8v"); // return (void *)0; UNSUPPORTED("6viwgw3bdyvknckol3dsh1s5v"); // us->name = agstrdup (0, name); UNSUPPORTED("ewc238znlsx5axoejodocqoyp"); // if (!gvusershape_file_access(us)) UNSUPPORTED("7f8nrnyuywny79cpzv6a49d8v"); // return (void *)0; UNSUPPORTED("4i933mk1cyf6xcljbpn69na20"); // assert(us->f); UNSUPPORTED("43qnzsg978s9yom42c0n33wx3"); // switch(imagetype(us)) { UNSUPPORTED("7eenfnk5yzoj21g2agitce6kx"); // case FT_NULL: UNSUPPORTED("azdoxaxgz4fzzdoeyruqj36jk"); // if (!(us->data = (void*)find_user_shape(us->name))) UNSUPPORTED("9mepm6hu7uqhpdwcg60h6pc3o"); // agerr(AGWARN, "\"%s\" was not found as a file or as a shape library member\n", us->name); UNSUPPORTED("9bu5332flxhc1ivhmzuiqcjdh"); // free(us); UNSUPPORTED("6948880uywn56ppo1fuqbm2rt"); // return (void *)0; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("4p4ayucon7vqli1ylni5hjrfb"); // case FT_GIF: UNSUPPORTED("c68gkmazl6aratmtonsx4fan9"); // gif_size(us); UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; UNSUPPORTED("7da7e6aavwlcxg7eglorxy23g"); // case FT_PNG: UNSUPPORTED("ubixbe52lmq7uzqie7h12582"); // png_size(us); UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; UNSUPPORTED("9ysbcxl45mbfo0lhfihqfby4d"); // case FT_BMP: UNSUPPORTED("9xqkpupuhywfcx0rkky4pnu5q"); // bmp_size(us); UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; UNSUPPORTED("bhf95qvvxhf47ek76yf2a45l0"); // case FT_JPEG: UNSUPPORTED("bq0stf6n5x5tzvjir50smcifq"); // jpeg_size(us); UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; UNSUPPORTED("bazpzxo4uq0pwp7j4k94ngrtz"); // case FT_PS: UNSUPPORTED("7bs1bijtavu2jceudpors0jbp"); // ps_size(us); UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; UNSUPPORTED("8xv8jf3eindz5gftkzluercwh"); // case FT_WEBP: UNSUPPORTED("91d89xyv6dtk8a479p0cfwyy7"); // webp_size(us); UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; UNSUPPORTED("c8km9iw5nmks5lp6jl9j5s5q2"); // case FT_SVG: UNSUPPORTED("a147xv5hgfkmevlpr3jb7fzci"); // svg_size(us); UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; UNSUPPORTED("242ztnyfnn9hx8sb3u5z3omun"); // case FT_PDF: UNSUPPORTED("9ef2eux36pp9nf00d1ijmfbhm"); // pdf_size(us); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("3h2lioytqam297xdu0a7l0y6w"); // case FT_ICO: UNSUPPORTED("dj7xjql9twvpafx4qoyb07ra8"); // ico_size(us); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("90yyikfl7j30g6npbi9n0jxyw"); // // case FT_TIFF: UNSUPPORTED("72cnoy8x3q67t6323yzwcdim8"); // // tiff_size(us); UNSUPPORTED("1sbah8d4teszwq6tgzsohjpba"); // // break; UNSUPPORTED("2hkvwieff33mlzyovvk76tpzn"); // case FT_EPS: /* no eps_size code available */ UNSUPPORTED("bt2g0yhsy3c7keqyftf3c98ut"); // default: UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("1ju3i4hja8fc5wwdkk9ed70t0"); // gvusershape_file_release(us); UNSUPPORTED("6ovs68xjm9urfsh1qtosv57gi"); // (*(((Dt_t*)(ImageDict))->searchf))((ImageDict),(void*)(us),0000001); UNSUPPORTED("e7wyuaoyszuqilaizfjv1mnp9"); // return us; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7xahvc82av8lspjlm80i6ycqx"); // gvusershape_file_release(us); UNSUPPORTED("2iqrgjc97xskxvw6791yf0sl7"); // return us; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1uc6t1ylgvem0d3xb73wkh6k5 // point gvusershape_size_dpi (usershape_t* us, pointf dpi) public static Object gvusershape_size_dpi(Object... arg) { UNSUPPORTED("5vjx3ewef6ht20ld1et4ghr4y"); // point UNSUPPORTED("5mxbu6cb95ay6dfs0i5n8icbs"); // gvusershape_size_dpi (usershape_t* us, pointf dpi) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e5r3mj8btrkw973m7l0rritko"); // point rv; UNSUPPORTED("6n6sowowfpx2bppltl0zu5v7v"); // if (!us) { UNSUPPORTED("4zusj5p9eg9pazvp0px1fxvhy"); // rv.x = rv.y = -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("8egqtg148lkga2f8fnti0xikl"); // if (us->dpi != 0) { UNSUPPORTED("appsmczgq79si2bttb9rrlf1n"); // dpi.x = dpi.y = us->dpi; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8z1a50vlhe7l1e7lnn7h5r90w"); // rv.x = us->w * 72 / dpi.x; UNSUPPORTED("b8wlsi5z8klt27ehe7vr9ue61"); // rv.y = us->h * 72 / dpi.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vqiwf4q9iqmxqvd9e5qa1vo7 // point gvusershape_size(graph_t * g, char *name) public static Object gvusershape_size(Object... arg) { UNSUPPORTED("3a8kgtxwhe9qi1f5wde0npt4d"); // point gvusershape_size(graph_t * g, char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e5r3mj8btrkw973m7l0rritko"); // point rv; UNSUPPORTED("aj7pw6lpv6z6nan96bx4pdfu2"); // pointf dpi; UNSUPPORTED("114dkd9d0mrkmtgl0ncfy2y88"); // static char* oldpath; UNSUPPORTED("709e07k0mmaqqdi3botr9zj87"); // usershape_t* us; UNSUPPORTED("d5ucq7enfbvarib2hwpi6y9qi"); // /* no shape file, no shape size */ UNSUPPORTED("crs7cps8buaugcwtbezaqxd0q"); // if (!name || (*name == '\0')) { UNSUPPORTED("4zusj5p9eg9pazvp0px1fxvhy"); // rv.x = rv.y = -1; UNSUPPORTED("cs1ejkx9cw658cl8cagdzqrzm"); // return rv; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("24me4s4cte11xoie4uxxwajbs"); // if (!HTTPServerEnVar && (oldpath != Gvimagepath)) { UNSUPPORTED("ba3zx115acxf5hiob55lfwvhd"); // oldpath = Gvimagepath; UNSUPPORTED("63hyc3s3c95h5g1lp6aypzd8k"); // if (ImageDict) { UNSUPPORTED("50x4kwt6y5jkwbeqmhvki188q"); // dtclose(ImageDict); UNSUPPORTED("75t9qfgcu2fz0o59mjqh5rruv"); // ImageDict = (void *)0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("d77jz2hp035qgnn72uyy7evkj"); // if ((dpi.y = GD_drawing(g)->dpi) >= 1.0) UNSUPPORTED("8kboj4mypdab20ax7qfuq8oyp"); // dpi.x = dpi.y; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("6buslnzh8a0nuwlk9wkfaytt8"); // dpi.x = dpi.y = (double)DEFAULT_DPI; UNSUPPORTED("16h3qy8ek57tauhtrw8xkodar"); // us = gvusershape_open (name); UNSUPPORTED("6tq0lkl6cmjltetu68liok738"); // rv = gvusershape_size_dpi (us, dpi); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/gvc/regex_win32__c.java000066400000000000000000011566631312650303100222250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.gvc; import static smetana.core.Macro.UNSUPPORTED; public class regex_win32__c { //1 11gt8s6kgcau21nr404v703de // static char re_syntax_table[256] //3 70j25rmarcwvzsh361zahv8zo // static void init_syntax_once () public static Object init_syntax_once(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("efoxnnabz2ejqjq7yhilggwkl"); // init_syntax_once () UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ch8iyg809c0lyd0bc1ytqve9u"); // register int c; UNSUPPORTED("e5h3t56qntljcivxieh5a2mkl"); // static int done = 0; UNSUPPORTED("97t7ymgg630qac6285iprjw9v"); // if (done) UNSUPPORTED("z22f11bf96kkfe4raxc9v85x"); // return; UNSUPPORTED("9t38w19yl5jyjw7oodb9irryl"); // bzero (re_syntax_table, sizeof re_syntax_table); UNSUPPORTED("2rmhh76mmq03za3zgh7h64oxo"); // for (c = 'a'; c <= 'z'; c++) UNSUPPORTED("c9iqf6ajwc71dgjf9wrkrmbc4"); // re_syntax_table[c] = 1; UNSUPPORTED("7su4oyfxw838uiaf1heiygrem"); // for (c = 'A'; c <= 'Z'; c++) UNSUPPORTED("c9iqf6ajwc71dgjf9wrkrmbc4"); // re_syntax_table[c] = 1; UNSUPPORTED("3204uyvac8xoymt69hx2jb6xy"); // for (c = '0'; c <= '9'; c++) UNSUPPORTED("c9iqf6ajwc71dgjf9wrkrmbc4"); // re_syntax_table[c] = 1; UNSUPPORTED("bh45yjprswi5um0lyt9x4oony"); // re_syntax_table['_'] = 1; UNSUPPORTED("2py1y9xsuhv2b6cmhyzmcm7c5"); // done = 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 cnkdb29e6yd10874mh5xc3onb // typedef long int s_reg_t //1 112kj8zza71a63rts3ariqovo // typedef unsigned long int active_reg_t //1 5mb2m65nd4m3w2de4v3md7o7m // typedef unsigned long int reg_syntax_t //1 289hb08yhe1j84wgbo0riknbd // extern reg_syntax_t re_syntax_options //1 3tctp51mbz3u1lyv5hope3jn4 // typedef int regoff_t //1 5bxw12pxo297kjn20mqjfmb86 // reg_syntax_t re_syntax_options //3 cxgvt7ypgdfqf2pew3m9adw9i // reg_syntax_t re_set_syntax(reg_syntax_t syntax) public static Object re_set_syntax(Object... arg) { UNSUPPORTED("1jmrr8fkrd2tsxzkjzybt7zfh"); // reg_syntax_t UNSUPPORTED("54rdixdzkwy1r5i8yfr9pfenx"); // re_set_syntax(reg_syntax_t syntax) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8mpejiyi92887r7wji6mys7nq"); // reg_syntax_t ret = re_syntax_options; UNSUPPORTED("4kgq73hxpobga7t16qgh5znpe"); // re_syntax_options = syntax; UNSUPPORTED("f3b7mj138albdr4lodyomke0z"); // return ret; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 4vl073wk5uvf75of82q0v5yyo // static const char *re_error_msgid[] = //1 1nsczrbp8olzcxwsty8y22p1n // static int re_max_failures = 20000 //1 bktlq1f2qk5dg76humjskteaa // static char reg_unset_dummy //1 1lj2324om1rijb97q9h9lxrhv // typedef unsigned regnum_t //1 e3zkpgg5cfqoq1zcfbcl2p5au // typedef long pattern_offset_t //3 b8oct2odjhnzacejd6swmozqo // static reg_errcode_t regex_compile (const char *pattern, size_t size, reg_syntax_t syntax, struct re_pattern_buffer *bufp) public static Object regex_compile(Object... arg) { UNSUPPORTED("9aerjmw5n52ektwk47t1r9bh0"); // static reg_errcode_t UNSUPPORTED("d6mg3ls5pg233p4i2fdv7ex1n"); // regex_compile (const char *pattern, UNSUPPORTED("6t71eiupt12wdbfduq8n5i2sz"); // size_t size, UNSUPPORTED("rg73gczoqylzcinp4bt2p1bw"); // reg_syntax_t syntax, UNSUPPORTED("86tpwausdjloqigvxe0g3anqv"); // struct re_pattern_buffer *bufp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7mnubzvdt62l8vdiefqprs10u"); // /* We fetch characters from PATTERN here. Even though PATTERN is UNSUPPORTED("a1g4ovz742smqh486dhwytetq"); // `char *' (i.e., signed), we declare these variables as unsigned, so UNSUPPORTED("6yz29a8qermrzbhvqskuno14k"); // they can be reliably used as array indices. */ UNSUPPORTED("9zgwtw1nsbdz6hcmyfrgkt63h"); // register unsigned char c, c1; UNSUPPORTED("4z9j463uvcrdj4sj8xj9ye9py"); // /* A random temporary spot in PATTERN. */ UNSUPPORTED("7ccacvizh7wnu163gfkc81hu9"); // const char *p1; UNSUPPORTED("a293r2jyasseioor4io0pp504"); // /* Points to the end of the buffer, where we should append. */ UNSUPPORTED("5o1tyy96cneoiw799jnb2n7ke"); // register unsigned char *b; UNSUPPORTED("cb629v9wydhjaoevjdzc89oy7"); // /* Keeps track of unclosed groups. */ UNSUPPORTED("dgr9dbgbyc1ook38b1euoeouv"); // compile_stack_type compile_stack; UNSUPPORTED("39kpylizmi208i8v5yv2jhjp1"); // /* Points to the current (ending) position in the pattern. */ UNSUPPORTED("9mu7yzuommm5kljxb28ceesow"); // const char *p = pattern; UNSUPPORTED("9ok1q4b2nv6m90q14x6i0k0vm"); // const char *pend = pattern + size; UNSUPPORTED("3oga1grlge5vw6xitb7bzcjw9"); // /* How to translate the characters in the pattern. */ UNSUPPORTED("b6qhkmvrybk31a74eyxl9sf73"); // char * translate = bufp->translate; UNSUPPORTED("34h9x8riezst40pxo4ww0500r"); // /* Address of the count-byte of the most recently inserted `exactn' UNSUPPORTED("a8lirzoby6qul9ds74xai8gbs"); // command. This makes it possible to tell if a new exact-match UNSUPPORTED("6w2dibeuk4g54m7pwlej7e8g8"); // character can be added to that command or if the character requires UNSUPPORTED("atv0mvbd2maopv2ing97xuaph"); // a new `exactn' command. */ UNSUPPORTED("s22nw5te3tpx7wkcpookrrve"); // unsigned char *pending_exact = 0; UNSUPPORTED("er4ntnybigvcvnva5ls2gkx9f"); // /* Address of start of the most recently finished expression. UNSUPPORTED("d9z7cp97wfgynilwmgxdn4w5p"); // This tells, e.g., postfix * where to find the start of its UNSUPPORTED("cwisfez4xccc9t277piikcz7u"); // operand. Reset at the beginning of groups and alternatives. */ UNSUPPORTED("5319mhfghffljm52aipkegz7i"); // unsigned char *laststart = 0; UNSUPPORTED("asyqn8tnmhbn0u8yih4eowlsv"); // /* Address of beginning of regexp, or inside of last group. */ UNSUPPORTED("2prv77rl1a0ic6cloa505n74"); // unsigned char *begalt; UNSUPPORTED("1mpmicgb0aqvs4efkuf1423bb"); // /* Place in the uncompiled pattern (i.e., the {) to UNSUPPORTED("6vlkvivbip6585ngqifn0yut3"); // which to go back if the interval is invalid. */ UNSUPPORTED("dhc5wj4xmde53jd8j5mmpspo2"); // const char *beg_interval; UNSUPPORTED("3gbwrgdnq67nw2ais7b1oaood"); // /* Address of the place where a forward jump should go to the end of UNSUPPORTED("39t3zafmxkdw0y4k5jpg705xl"); // the containing expression. Each alternative of an `or' -- except the UNSUPPORTED("7ax9rzx6regnwitqwud6fas5h"); // last -- ends with a forward jump of this sort. */ UNSUPPORTED("c8bejewn623onq21mfqd22e2w"); // unsigned char *fixup_alt_jump = 0; UNSUPPORTED("a0p6z20zonf6yhyd6u7i62l1f"); // /* Counts open-groups as they are encountered. Remembered for the UNSUPPORTED("f3mw4fx5ayqshia0u0wfwq612"); // matching close-group on the compile stack, so the same register UNSUPPORTED("albygnk4x6lv0oonnbwcx9zse"); // number is put in the stop_memory as the start_memory. */ UNSUPPORTED("1jexufhhoiubt850z3ndj8ej5"); // regnum_t regnum = 0; UNSUPPORTED("7481cz4i3vyo797cewvok0k4c"); // /* Initialize the compile stack. */ UNSUPPORTED("ao1ytyamhvicfeyzqsidalxsk"); // compile_stack.stack = ((compile_stack_elt_t *) malloc ((32) * sizeof (compile_stack_elt_t))); UNSUPPORTED("3pmfpvmkfjp9kx78cvcxd6cpy"); // if (compile_stack.stack == (void *)0) UNSUPPORTED("ex5zj292r0bm8ons2oenc7d53"); // return REG_ESPACE; UNSUPPORTED("6rth766rpftr2lf9tsj3ipcy3"); // compile_stack.size = 32; UNSUPPORTED("7l76n0edqpze4bfgwt0jnlr23"); // compile_stack.avail = 0; UNSUPPORTED("4d5adh0083zve5yjpmlxli8h1"); // /* Initialize the pattern buffer. */ UNSUPPORTED("6qgussdbr9ruavpzcr0y58ts9"); // bufp->syntax = syntax; UNSUPPORTED("c9tm2xzkehz9kbyrn2bkv3dwg"); // bufp->fastmap_accurate = 0; UNSUPPORTED("91jbv9it8qe6sah0sxn6nd4w2"); // bufp->not_bol = bufp->not_eol = 0; UNSUPPORTED("3rafz8q4yl9qbchg80xvodlsy"); // /* Set `used' to zero, so that if we return an error, the pattern UNSUPPORTED("b6wnwmphpmnza6rdw0x8yy5kj"); // printer (for debugging) will think there's no pattern. We reset it UNSUPPORTED("8xe4i97w2l1mmth54di1u7rrd"); // at the end. */ UNSUPPORTED("b65vrlaj7a5mdhjx1m4vm2kzu"); // bufp->used = 0; UNSUPPORTED("5v5ffm48jpbjz5t7q75z95oqu"); // /* Always count groups, whether or not bufp->no_sub is set. */ UNSUPPORTED("fcycoe4nhtup93j74aqh2jlu"); // bufp->re_nsub = 0; UNSUPPORTED("57cfyb08w4wnczh1o759ayl4l"); // /* Initialize the syntax table. */ UNSUPPORTED("eoiuv77ltbli38ssdpi2gptkk"); // init_syntax_once (); UNSUPPORTED("f0l0ry0lbt2gj40a13217dx11"); // if (bufp->allocated == 0) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("eblz85b36y9pboxm6zt66xr2h"); // if (bufp->buffer) UNSUPPORTED("53s3p7apfgsn3pkcwkqznue34"); // { /* If zero allocated, but buffer is non-null, try to realloc UNSUPPORTED("3mwc7vljmgej2pox1thi77h1t"); // enough space. This loses if buffer's address is bogus, but UNSUPPORTED("2hni8mwtvtzlrz7iztjmo1gkm"); // that is the user's responsibility. */ UNSUPPORTED("4soy7dr6bhuvmx7k9nk1d0ql8"); // ((bufp->buffer) = (unsigned char *) realloc (bufp->buffer, (32) * sizeof (unsigned char))); UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else UNSUPPORTED("17v9yg0xtevf2uu5v3tmolocu"); // { /* Caller did not allocate a buffer. Do it for them. */ UNSUPPORTED("6fravsvvcv922fixqgd9sfp3z"); // bufp->buffer = ((unsigned char *) malloc ((32) * sizeof (unsigned char))); UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("4as6xhocbf55x8cvv0z11to2x"); // if (!bufp->buffer) return (free (compile_stack.stack), REG_ESPACE); UNSUPPORTED("af932qywpz9q6n0xek5lztd84"); // bufp->allocated = 32; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("5mg602ef37gzyyfswwutbcqs8"); // begalt = b = bufp->buffer; UNSUPPORTED("89ht4djrhvh6xphi9py7k3pam"); // /* Loop through the uncompiled pattern until we're at the end. */ UNSUPPORTED("5r7butg5genmj9dzegcwao4et"); // while (p != pend) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("42vbjcv24l0oaozyfwaw4j5nc"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); UNSUPPORTED("719kmsx403baae0d0ox2gyi3a"); // switch (c) UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { UNSUPPORTED("32y7yv66mqjhrdqaf9ck9oi4y"); // case '^': UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("3j5jurrtqcxdphc3jlcg8lu39"); // if ( /* If at start of pattern, it's an operator. */ UNSUPPORTED("acrtuah53gidq3uywocguoav"); // p == pattern + 1 UNSUPPORTED("bs7cbfp1wd9jknqlj749u3bj3"); // /* If context independent, it's an operator. */ UNSUPPORTED("9sznx5vvd3orgqcisdh571wv9"); // || syntax & (((((unsigned long int) 1) << 1) << 1) << 1) UNSUPPORTED("7gzhx2l4j1gaba7epz2kdwhlj"); // /* Otherwise, depends on what's come before. */ UNSUPPORTED("10earmgj12izv0tbj9aimxmji"); // || at_begline_loc_p (pattern, p, syntax)) UNSUPPORTED("clssp7ivct1ku99qbhyb7dtzy"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (begline); } while (0); UNSUPPORTED("euvqyl9ihnvv92dr2v2zshlo"); // else UNSUPPORTED("dxpbgmfj2w220xy1q99fxje94"); // goto normal_char; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("9ogqrievi7oirs7cd4cs33egg"); // case '$': UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("hai791a97htfukh6iawb46oz"); // if ( /* If at end of pattern, it's an operator. */ UNSUPPORTED("a0h309uru3crtdmsxpji7m2j3"); // p == pend UNSUPPORTED("bs7cbfp1wd9jknqlj749u3bj3"); // /* If context independent, it's an operator. */ UNSUPPORTED("9sznx5vvd3orgqcisdh571wv9"); // || syntax & (((((unsigned long int) 1) << 1) << 1) << 1) UNSUPPORTED("2iqqtdvj90ata5pvx2o27gw4s"); // /* Otherwise, depends on what's next. */ UNSUPPORTED("67wgd1do640yncemi3ce0qj90"); // || at_endline_loc_p (p, pend, syntax)) UNSUPPORTED("35lv6vfpgmavt421g5ug4tdbc"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (endline); } while (0); UNSUPPORTED("euvqyl9ihnvv92dr2v2zshlo"); // else UNSUPPORTED("dxpbgmfj2w220xy1q99fxje94"); // goto normal_char; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("4yw8evd0fubkfck5nezds5dhn"); // case '+': UNSUPPORTED("f0rooqc2e80a2plohrq4c3c91"); // case '?': UNSUPPORTED("1ku9g8vhwccbudpz9e300f03z"); // if ((syntax & (((unsigned long int) 1) << 1)) UNSUPPORTED("7sxu3x1nkq0rp14piw14s336e"); // || (syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) UNSUPPORTED("uivpjrr5me8j92jky5okan1c"); // goto normal_char; UNSUPPORTED("ak9il2l94xwmflwso0qxuq07i"); // handle_plus: UNSUPPORTED("77sjlj9q2m2icdnuxqgd896ux"); // case '*': UNSUPPORTED("bog9pqkld0m0t6ypotbesbb2s"); // /* If there is no previous pattern... */ UNSUPPORTED("6horrl50ttv3j0vlv0d550qe5"); // if (!laststart) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("8qgst65bgbkg69wykq7paitn0"); // if (syntax & (((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("4zp3pjt3o3sewewdrckac5e7t"); // return (free (compile_stack.stack), REG_BADRPT); UNSUPPORTED("2ji76vo0qsyt5ldqyext7tdsg"); // else if (!(syntax & ((((((unsigned long int) 1) << 1) << 1) << 1) << 1))) UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("2vnh9foicn3ppcbpvb6hdon87"); // /* Are we optimizing this jump? */ UNSUPPORTED("60ry57pj80rgxp87816o6vpy2"); // boolean keep_string_p = 0; UNSUPPORTED("6qwgte4fwcf1xqfiuge2ssau3"); // /* 1 means zero (many) matches is allowed. */ UNSUPPORTED("7z75b80h28y72skvw3v96x2y5"); // char zero_times_ok = 0, many_times_ok = 0; UNSUPPORTED("a3pm3eb949njdi5ypawoqc46v"); // /* If there is a sequence of repetition chars, collapse it UNSUPPORTED("dovcg85ak5c45w4j2nz1vphpt"); // down to just one (the right one). We can't combine UNSUPPORTED("enmqxu33e2oz4v7ad1h3regi1"); // interval operators with these because of, e.g., `a{2}*', UNSUPPORTED("2ic453t1t5s0w63b328mvtw1h"); // which should only match an even number of `a's. */ UNSUPPORTED("1nx31c51hb376ceydwsae35jq"); // for (;;) UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { UNSUPPORTED("1998skt4l5yp1v1sml3xtum0t"); // zero_times_ok |= c != '+'; UNSUPPORTED("d4p0t1ujgqb32xcytuivs2m0m"); // many_times_ok |= c != '?'; UNSUPPORTED("891uwttbfnv5bc58wpbg1fhgl"); // if (p == pend) UNSUPPORTED("1fg4xctmq8acy7m0oob45guaz"); // break; UNSUPPORTED("1ph6d2iv2trnwdx326iuetr4g"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); UNSUPPORTED("do4ccpdwh7h97tg1nxsm8tt4d"); // if (c == '*' UNSUPPORTED("b9cokjueamyv69axw1ekph5qa"); // || (!(syntax & (((unsigned long int) 1) << 1)) && (c == '+' || c == '?'))) UNSUPPORTED("c6tldeu5ffnykyfto7hi9ixau"); // ; UNSUPPORTED("4zyx7dzchkorh28bz90x76p2g"); // else if (syntax & (((unsigned long int) 1) << 1) && c == '\\') UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("e9xhg2qnbm79uk0vrkf792u29"); // if (p == pend) return (free (compile_stack.stack), REG_EESCAPE); UNSUPPORTED("518hxi8xgn35zetedpma2oo2k"); // do {if (p == pend) return REG_EEND; c1 = (unsigned char) *p++; if (translate) c1 = (unsigned char) translate[c1]; } while (0); UNSUPPORTED("31364dtwzgpxty30b38zc4zkj"); // if (!(c1 == '+' || c1 == '?')) UNSUPPORTED("el767oi7fhlc4apdbx8dsvnk6"); // { UNSUPPORTED("2t22wkw5f3ffgm4ga51u5nrej"); // p--; UNSUPPORTED("2t22wkw5f3ffgm4ga51u5nrej"); // p--; UNSUPPORTED("brutz3uly6r5jyimug3eb5y9n"); // break; UNSUPPORTED("b5m0ttlk23avgs4i47o8lbzg1"); // } UNSUPPORTED("e31jqqw74li41ohhn86f6dom7"); // c = c1; UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("5cyajgw0lqe5reqenlh6er6vk"); // p--; UNSUPPORTED("7vckzntfuo1ibi8r53gsfg8al"); // break; UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("5usbancvr06c7aua10b6rnz2v"); // /* If we get here, we found another repeat character. */ UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("4z09n9ulcj74vli0m0kclo5i"); // /* Star, etc. applied to an empty pattern is equivalent UNSUPPORTED("1ixkehs9qjp0ehix96jklbcfm"); // to an empty pattern. */ UNSUPPORTED("60xmx571g6e7xq9uvs63uu1eq"); // if (!laststart) UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("hi54423z7c97klm7jyc2i54y"); // /* Now we know whether or not zero matches is allowed UNSUPPORTED("cdhyalprzmam31a4ky61gdsu5"); // and also whether or not two or more matches is allowed. */ UNSUPPORTED("82umz1mp8urx9qjjtqh65sk5"); // if (many_times_ok) UNSUPPORTED("8omf20fupbos0ngb4nxaz3sj"); // { /* More than one repetition is allowed, so put in at the UNSUPPORTED("6vwybrs5isd11ynby19imvgnc"); // end a backward relative jump from `b' to before the next UNSUPPORTED("7k3po89z1y12gwpxracwd1zwr"); // jump we're going to put in below (which jumps from UNSUPPORTED("497rlrbp2r6kokgq8fic5z8li"); // laststart to after this jump). UNSUPPORTED("elt3pujxvh1j9wbns2s7urafl"); // But if we are at the `*' in the exact sequence `.*\n', UNSUPPORTED("aq9r7pdk4mwsuo46v85xd7nle"); // insert an unconditional jump backwards to the ., UNSUPPORTED("afees40xo77whl3qvfrsjg0p2"); // instead of the beginning of the loop. This way we only UNSUPPORTED("2f6wchn2e63ok4vso04jpeozp"); // push a failure point once, instead of every time UNSUPPORTED("2mne6btvrwz6ly84kpb5k8fz2"); // through the loop. */ UNSUPPORTED("9fy78dg2q1uu4c2t1zsyaestf"); // ; UNSUPPORTED("7osfsgzoickbv6hh4uet35ib8"); // /* Allocate the space for the jump. */ UNSUPPORTED("38dw1m55ji4uptkiga2iwgab7"); // while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); UNSUPPORTED("2v0jxylpfaawr8vdl2dov0us5"); // /* We know we are not at the first character of the pattern, UNSUPPORTED("djrrtgjb76xh1l5pw5u4kxcnv"); // because laststart was nonzero. And we've already UNSUPPORTED("5f4ly8ng2ytcbc7ypdbpa8e11"); // incremented `p', by the way, to be the character after UNSUPPORTED("4as3ltw89z2kch0mrty7q58ey"); // the `*'. Do we have to do something analogous here UNSUPPORTED("d3grtqmpebse1zxznnwl3jm7c"); // for null bytes, because of RE_DOT_NOT_NULL? */ UNSUPPORTED("vbl73uentmynsl9r6evk8ulc"); // if ((translate ? (char) translate[(unsigned char) (*(p - 2))] : (*(p - 2))) == (translate ? (char) translate[(unsigned char) ('.')] : ('.')) UNSUPPORTED("3lbv5kv4tdnxzqobvqv6gz12l"); // && zero_times_ok UNSUPPORTED("1ykhfelz1q80iguwwtohwqvm2"); // && p < pend && (translate ? (char) translate[(unsigned char) (*p)] : (*p)) == (translate ? (char) translate[(unsigned char) ('\n')] : ('\n')) UNSUPPORTED("bxrp4x7jxoo38mvd9ft3k5db"); // && !(syntax & ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1))) UNSUPPORTED("741cloh2pdrplimiiruq6t4ct"); // { /* We have .*\n. */ UNSUPPORTED("317e9s7jnbmgql8x4fdezgmv0"); // store_op1 (jump, b, (int) ((laststart) - (b) - 3)); UNSUPPORTED("8ryrgqjl7v6ohb01o5em2psns"); // keep_string_p = 1; UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else UNSUPPORTED("3ksp6xs2pd8hkq033e06g4a00"); // /* Anything else. */ UNSUPPORTED("4ab5zrwtdkltgbt8onvdet2r1"); // store_op1 (maybe_pop_jump, b, (int) ((laststart - 3) - (b) - 3)); UNSUPPORTED("f4gsd1otghvhc8czjmw8qq776"); // /* We've added more stuff to the buffer. */ UNSUPPORTED("7hdmsj9mi4jwnv83ar1ez4kwn"); // b += 3; UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("7htghz4zhsf1uqpwp6ytvbhih"); // /* On failure, jump from laststart to b + 3, which will be the UNSUPPORTED("c630s54imd7p1b0raogcspf6p"); // end of the buffer after this jump is inserted. */ UNSUPPORTED("5i16nim58sq8mvfckzqrj7q7e"); // while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); UNSUPPORTED("e1gqwwg06ek9zwsxdqko22t8"); // insert_op1 (keep_string_p ? on_failure_keep_string_jump UNSUPPORTED("od51xm1io9lvsdmwr60fm9nx"); // : on_failure_jump, UNSUPPORTED("demgpwduvdu6c55lzwftle76m"); // laststart, (int) ((b + 3) - ( UNSUPPORTED("a887hw7h3lz3jofwz10uxjcdp"); // laststart) - 3), b); UNSUPPORTED("1t3kkww9qyeskw70p028ll4r1"); // pending_exact = 0; UNSUPPORTED("1jpgahganw1gip7gnwn5n2vx6"); // b += 3; UNSUPPORTED("38n9qcy0vfr2upedrm1d6by5o"); // if (!zero_times_ok) UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { UNSUPPORTED("15rx6swjp6qikvp0jmiy5rm4m"); // /* At least one repetition is required, so insert a UNSUPPORTED("5xq4uy1msul1zhp9ptz49bbvn"); // `dummy_failure_jump' before the initial UNSUPPORTED("3q62p85szhotzr22iijxb1lzh"); // `on_failure_jump' instruction of the loop. This UNSUPPORTED("5ukburrf5iegq4x208czcfxp7"); // effects a skip over that instruction the first time UNSUPPORTED("9zr6wiepyct1g2798ohlu821l"); // we hit that loop. */ UNSUPPORTED("38dw1m55ji4uptkiga2iwgab7"); // while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); UNSUPPORTED("caftp211etknfq81tggr97kq3"); // insert_op1 (dummy_failure_jump, laststart, (int) ((laststart + 6) - (laststart) - 3), b); UNSUPPORTED("7hdmsj9mi4jwnv83ar1ez4kwn"); // b += 3; UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("a2evu0k4b91gqn1jmn3a0jwzw"); // case '.': UNSUPPORTED("5nlf7z9fx92ejvc0jjc27l3ks"); // laststart = b; UNSUPPORTED("14r433r50a5mz9kdbq4siwjqy"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (anychar); } while (0); UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("7r93xgyv26x925aap3ia8ymon"); // case '[': UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("2dyj1s6d9ag4nvt1f1crrdjfn"); // boolean had_char_class = 0; UNSUPPORTED("4a3jhscbb3cd0w52yk8g7bkhm"); // if (p == pend) return (free (compile_stack.stack), REG_EBRACK); UNSUPPORTED("18lthbap52pmrc5qc0gdkqazi"); // /* Ensure that we have enough space to push a charset: the UNSUPPORTED("64im3as1hhwe4tfm27p855icz"); // opcode, the length count, and the bitset; 34 bytes in all. */ UNSUPPORTED("dtfdonlqdk0z7gsn1s36st33w"); // while ((unsigned long) (b - bufp->buffer + (34)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); UNSUPPORTED("8dx5294ey8snj5idlltwvrhb1"); // laststart = b; UNSUPPORTED("610aa188uk96qcj24orwjx8fs"); // /* We test `*p == '^' twice, instead of using an if UNSUPPORTED("5bc7brntk24ooxfmk1srxj8cb"); // statement, so we only need one BUF_PUSH. */ UNSUPPORTED("f50kr5oskb25svx2g868njm8n"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (*p == '^' ? charset_not : charset); } while (0); UNSUPPORTED("8evba7dkivr9l77jkvcmqcwz8"); // if (*p == '^') UNSUPPORTED("6qmpdja8bt371mk2seyaa2gbr"); // p++; UNSUPPORTED("7cikubv9dt5tpzkohonns5grc"); // /* Remember the first position in the bracket expression. */ UNSUPPORTED("ams11hw6png742la6sel3atlf"); // p1 = p; UNSUPPORTED("7xg1okqa5l3piclyijoek8ed8"); // /* Push the number of bytes in the bitmap. */ UNSUPPORTED("attsgdtz0wo8uzzx0jzzakd9s"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) ((1 << 8) / 8); } while (0); UNSUPPORTED("9i1ubvjzgw51kylobwxvkoguf"); // /* Clear the whole map. */ UNSUPPORTED("3yt3lfhbs0hx9w9ci87vt4p51"); // bzero (b, (1 << 8) / 8); UNSUPPORTED("2m8299zx4gtxg4ncikd476gkx"); // /* charset_not matches newline according to a syntax bit. */ UNSUPPORTED("16flegxkvnil6me4t0kb73hcj"); // if ((re_opcode_t) b[-2] == charset_not UNSUPPORTED("44gymzta58w37g7hbxz29z8ht"); // && (syntax & ((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) UNSUPPORTED("bm4wsfgshzu6e47pvkdqzgoz6"); // (b[((unsigned char) ('\n')) / 8] |= 1 << (((unsigned char) '\n') % 8)); UNSUPPORTED("2dle8bszohkrok9ivamd6wqu8"); // /* Read in characters and ranges, setting map bits. */ UNSUPPORTED("1nx31c51hb376ceydwsae35jq"); // for (;;) UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { UNSUPPORTED("6jfb28a8r43ndwdevd7rrjlb2"); // if (p == pend) return (free (compile_stack.stack), REG_EBRACK); UNSUPPORTED("1ph6d2iv2trnwdx326iuetr4g"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); UNSUPPORTED("djf8gjrarnydrvlu8tzndsd4t"); // /* \ might escape characters inside [...] and [^...]. */ UNSUPPORTED("89w50n0xz0xx1wgf8ls0sce25"); // if ((syntax & ((unsigned long int) 1)) && c == '\\') UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("e9xhg2qnbm79uk0vrkf792u29"); // if (p == pend) return (free (compile_stack.stack), REG_EESCAPE); UNSUPPORTED("518hxi8xgn35zetedpma2oo2k"); // do {if (p == pend) return REG_EEND; c1 = (unsigned char) *p++; if (translate) c1 = (unsigned char) translate[c1]; } while (0); UNSUPPORTED("d1ssg2hoazmd76m91z40sp5sn"); // (b[((unsigned char) (c1)) / 8] |= 1 << (((unsigned char) c1) % 8)); UNSUPPORTED("cke4ze78n6mw03utm8hpk0ozq"); // continue; UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("bvll4h37ech1nvv3p44tc97ia"); // /* Could be the end of the bracket expression. If it's UNSUPPORTED("464yveauwiujz5tkl76ikld18"); // not (i.e., when the bracket expression is `[]' so UNSUPPORTED("ekv9yerdywogeillz767k3yq9"); // far), the ']' character bit gets set way below. */ UNSUPPORTED("39qeut34k7f0lyjj4z495n6am"); // if (c == ']' && p != p1 + 1) UNSUPPORTED("1fg4xctmq8acy7m0oob45guaz"); // break; UNSUPPORTED("d3v48zs419s4mxk9yyv5xgccj"); // /* Look ahead to see if it's a range when the last thing UNSUPPORTED("65vqnx3pinl0sxqecc7937imc"); // was a character class. */ UNSUPPORTED("8dtiybchqrzjmzzltkvknsq96"); // if (had_char_class && c == '-' && *p != ']') UNSUPPORTED("8zurthmteo7b71btgvw1ke4rg"); // return (free (compile_stack.stack), REG_ERANGE); UNSUPPORTED("d3v48zs419s4mxk9yyv5xgccj"); // /* Look ahead to see if it's a range when the last thing UNSUPPORTED("5wt9bnagn7y3isqyb5kxh04s7"); // was a character: if this is a hyphen not at the UNSUPPORTED("342gxn589rm7wkuq6jbilt9fr"); // beginning or the end of a list, then it's the range UNSUPPORTED("8a0p71nhvq7jckckna5u4qr7t"); // operator. */ UNSUPPORTED("bfxjivoy25rc3bw7qrspkzv1k"); // if (c == '-' UNSUPPORTED("93mph3xo98uvv6qn8e4tbid15"); // && !(p - 2 >= pattern && p[-2] == '[') UNSUPPORTED("1ce2lptewofyiq5ojhwc5va79"); // && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^') UNSUPPORTED("5e843qj23bor49sf7nbcpwezc"); // && *p != ']') UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("f3s9czjbpp43p2benwj88e4vz"); // reg_errcode_t ret UNSUPPORTED("bgzy0fkxhr0j88bt28d2oeo7m"); // = compile_range (&p, pend, translate, syntax, b); UNSUPPORTED("6to7cm3b6s0m5pujlkqqm3m2x"); // if (ret != REG_NOERROR) return (free (compile_stack.stack), ret); UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("65gxrs7y9lu8v93z6nz75m4ck"); // else if (p[0] == '-' && p[1] != ']') UNSUPPORTED("5av67x62ybjftr7suvc3tfqay"); // { /* This handles ranges made up of characters only. */ UNSUPPORTED("cmimxguouw0qbcmhrejq3dnrm"); // reg_errcode_t ret; UNSUPPORTED("6th47hqx3651aqvqnkzfm9yhl"); // /* Move past the `-'. */ UNSUPPORTED("518hxi8xgn35zetedpma2oo2k"); // do {if (p == pend) return REG_EEND; c1 = (unsigned char) *p++; if (translate) c1 = (unsigned char) translate[c1]; } while (0); UNSUPPORTED("8tyv3mj3db8ezfohi5j249qg9"); // ret = compile_range (&p, pend, translate, syntax, b); UNSUPPORTED("6to7cm3b6s0m5pujlkqqm3m2x"); // if (ret != REG_NOERROR) return (free (compile_stack.stack), ret); UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("60ee1e25m2s16fec1vpvlz4n7"); // /* See if we're at the beginning of a possible character UNSUPPORTED("5paafwhmjbew6wm1r82cmglhi"); // class. */ UNSUPPORTED("1fxr5b7xujuw4t8tdfwstlhb5"); // else if (syntax & ((((unsigned long int) 1) << 1) << 1) && c == '[' && *p == ':') UNSUPPORTED("c6rvznitpculxv2jbhy4ncxyq"); // { /* Leave room for the null. */ UNSUPPORTED("35kxjv2sfddffc4bqeyh4imoc"); // char str[6 + 1]; UNSUPPORTED("eqri2rfe7jnz1m2rij615jaj1"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); UNSUPPORTED("d4co4ddeumifnjey3eestnfzq"); // c1 = 0; UNSUPPORTED("4w2zfigedythaavjy46j6zdev"); // /* If pattern is `[[:'. */ UNSUPPORTED("7eef052f6ws02kwwd07t2gogt"); // if (p == pend) return (free (compile_stack.stack), REG_EBRACK); UNSUPPORTED("6rl79w31o26w7y9v243bzntd1"); // for (;;) UNSUPPORTED("el767oi7fhlc4apdbx8dsvnk6"); // { UNSUPPORTED("5rs5zp1k5smyekvir9pcnto9c"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); UNSUPPORTED("5epbd4u9xrfpj6miw9wkaw3as"); // if (c == ':' || c == ']' || p == pend UNSUPPORTED("1xzx4vfazvv793wm3hh5e4ixz"); // || c1 == 6) UNSUPPORTED("1lzsscwayr2ygeagix6ouorzi"); // break; UNSUPPORTED("a6wcfy57u3wkrc8jiwpoxhutg"); // str[c1++] = c; UNSUPPORTED("b5m0ttlk23avgs4i47o8lbzg1"); // } UNSUPPORTED("6hm7an9ruv18077h9go7vsgf4"); // str[c1] = '\0'; UNSUPPORTED("bi9fgjbp9y3y2pyuu9tszhyox"); // /* If isn't a word bracketed by `[:' and:`]': UNSUPPORTED("7nvg1ljm6ad0h7g7s60ej9uca"); // undo the ending character, the letters, and leave UNSUPPORTED("2272ea1yqp1bpznxgbrxbp00w"); // the leading `:' and `[' (but set bits for them). */ UNSUPPORTED("5tqbx68w26ea5218a43fyowz3"); // if (c == ':' && *p == ']') UNSUPPORTED("el767oi7fhlc4apdbx8dsvnk6"); // { UNSUPPORTED("dicsp7memxlin76m5jtuhk6dv"); // int ch; UNSUPPORTED("74i3rk9pefjb3y4b7o4aa2iq9"); // boolean is_alnum = ((strcmp (str, "alnum") == 0)); UNSUPPORTED("89wnjt7xu39ig5ibxfz800la7"); // boolean is_alpha = ((strcmp (str, "alpha") == 0)); UNSUPPORTED("70u6gm5ko26rbqgsh5w8iswjq"); // boolean is_blank = ((strcmp (str, "blank") == 0)); UNSUPPORTED("1aaohxjchuctfrlc9v29p77u8"); // boolean is_cntrl = ((strcmp (str, "cntrl") == 0)); UNSUPPORTED("74upuhtioo8extzco95rwsrj8"); // boolean is_digit = ((strcmp (str, "digit") == 0)); UNSUPPORTED("44vvyq4v0mo3kf1e60wcz5pq1"); // boolean is_graph = ((strcmp (str, "graph") == 0)); UNSUPPORTED("ampk1k6gw3p7tnpd7rlk9zpbh"); // boolean is_lower = ((strcmp (str, "lower") == 0)); UNSUPPORTED("dfcf36k8u7asts9g1790th87m"); // boolean is_print = ((strcmp (str, "print") == 0)); UNSUPPORTED("94toygdeo23h0nswi5ypjemuj"); // boolean is_punct = ((strcmp (str, "punct") == 0)); UNSUPPORTED("5gzado7yzz8iw3b7wmsnnv1c"); // boolean is_space = ((strcmp (str, "space") == 0)); UNSUPPORTED("brptc46jbde0ytz2cf57z0qj9"); // boolean is_upper = ((strcmp (str, "upper") == 0)); UNSUPPORTED("6y30d6k6j6v6mo0u34x84x7pi"); // boolean is_xdigit = ((strcmp (str, "xdigit") == 0)); UNSUPPORTED("5xbajy2nf78y44rt7wqi0ipvw"); // if (!(((strcmp (str, "alpha") == 0)) || ((strcmp (str, "upper") == 0)) || ((strcmp (str, "lower") == 0)) || ((strcmp (str, "digit") == 0)) || ((strcmp (str, "alnum") == 0)) || ((strcmp (str, "xdigit") == 0)) || ((strcmp (str, "space") == 0)) || ((strcmp (str, "print") == 0)) || ((strcmp (str, "punct") == 0)) || ((strcmp (str, "graph") == 0)) || ((strcmp (str, "cntrl") == 0)) || ((strcmp (str, "blank") == 0)))) UNSUPPORTED("9roq2o5jp44jioxvumhpzhasp"); // return (free (compile_stack.stack), REG_ECTYPE); UNSUPPORTED("b01volng00k0jszlwguip1za2"); // /* Throw away the ] at the end of the character UNSUPPORTED("6v4ad7tk28ej4z6x4p9zfn9ip"); // class. */ UNSUPPORTED("5rs5zp1k5smyekvir9pcnto9c"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); UNSUPPORTED("ahygyv10li3nm82zryhpg9mbm"); // if (p == pend) return (free (compile_stack.stack), REG_EBRACK); UNSUPPORTED("e0htyvo32yvtsowvtr07q7jcw"); // for (ch = 0; ch < 1 << 8; ch++) UNSUPPORTED("ednrjrwumcyqj77ytrr2eszv"); // { UNSUPPORTED("3k2ocusl5iq9ds3ppdqj68572"); // /* This was split into 3 if's to UNSUPPORTED("9gbw8s1phg1eyew1sfpr5kp3f"); // avoid an arbitrary limit in some compiler. */ UNSUPPORTED("2cntwsg5hxbdi0ckf9y8w0mnq"); // if ( (is_alnum && (1 && isalnum (ch))) UNSUPPORTED("1zgfij4s84eufjba2ozx3lkrk"); // || (is_alpha && (1 && isalpha (ch))) UNSUPPORTED("bqa0xuagje3ikuybu56a5lsfa"); // || (is_blank && ((ch) == ' ' || (ch) == '\t')) UNSUPPORTED("dnw7neodbiod4p16f06qsugzl"); // || (is_cntrl && (1 && iscntrl (ch)))) UNSUPPORTED("6qfn7xakyg09tnfa2ie1sh8p6"); // (b[((unsigned char) (ch)) / 8] |= 1 << (((unsigned char) ch) % 8)); UNSUPPORTED("6a1x5lr2tbh4dux8kqoyovq6z"); // if ( (is_digit && (1 && isdigit (ch))) UNSUPPORTED("6uh9v7mcu8jqpc8ab1xqdpupe"); // || (is_graph && (1 && isprint (ch) && !isspace (ch))) UNSUPPORTED("2kza3pwfg7co598ybwubyyjtb"); // || (is_lower && (1 && islower (ch))) UNSUPPORTED("2ve5o48kbom0zknpyyo4nrw8b"); // || (is_print && (1 && isprint (ch)))) UNSUPPORTED("6qfn7xakyg09tnfa2ie1sh8p6"); // (b[((unsigned char) (ch)) / 8] |= 1 << (((unsigned char) ch) % 8)); UNSUPPORTED("eu7igk6hg1s58sklwzk61h4b7"); // if ( (is_punct && (1 && ispunct (ch))) UNSUPPORTED("eu3t6ngjxiw3bd3n428dpndsz"); // || (is_space && (1 && isspace (ch))) UNSUPPORTED("cyrylgd8tsf5lm7q40ozat1u6"); // || (is_upper && (1 && isupper (ch))) UNSUPPORTED("6uhsgqbeke0ipkactcwfponfm"); // || (is_xdigit && (1 && isxdigit (ch)))) UNSUPPORTED("6qfn7xakyg09tnfa2ie1sh8p6"); // (b[((unsigned char) (ch)) / 8] |= 1 << (((unsigned char) ch) % 8)); UNSUPPORTED("d10pfpemohjrojtw32b9u288j"); // if ( translate && (is_upper || is_lower) UNSUPPORTED("dn91c7ek6aq14v8orwpui41nf"); // && ((1 && isupper (ch)) || (1 && islower (ch)))) UNSUPPORTED("6qfn7xakyg09tnfa2ie1sh8p6"); // (b[((unsigned char) (ch)) / 8] |= 1 << (((unsigned char) ch) % 8)); UNSUPPORTED("4mlmk54q1pd097btjgvhds4or"); // } UNSUPPORTED("377au4sk1ya757gr7n0hqcmrn"); // had_char_class = 1; UNSUPPORTED("b5m0ttlk23avgs4i47o8lbzg1"); // } UNSUPPORTED("61qf7b2jxc7j3knm5ts69f0b6"); // else UNSUPPORTED("el767oi7fhlc4apdbx8dsvnk6"); // { UNSUPPORTED("7m4co85wi9arl9dcdfqpb4za8"); // c1++; UNSUPPORTED("20tgbjihyvtowact7dzcr1ecf"); // while (c1--) UNSUPPORTED("8je1mldqzk080hkvqxenba16t"); // p--; UNSUPPORTED("48kiij4wie0njh1vtga7it2dv"); // (b[((unsigned char) ('[')) / 8] |= 1 << (((unsigned char) '[') % 8)); UNSUPPORTED("dv206lne3atc9xm9yvrhv1ybg"); // (b[((unsigned char) (':')) / 8] |= 1 << (((unsigned char) ':') % 8)); UNSUPPORTED("41vc3rnsrwhzg40t2l6ddpjfb"); // had_char_class = 0; UNSUPPORTED("b5m0ttlk23avgs4i47o8lbzg1"); // } UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("nugbt1in6a1t1qaxqdyyi3ep"); // had_char_class = 0; UNSUPPORTED("17maz3hujafwurweozb151wdn"); // (b[((unsigned char) (c)) / 8] |= 1 << (((unsigned char) c) % 8)); UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("ehzhyhula77mysp4xro2dci8t"); // /* Discard any (non)matching list bytes that are all 0 at the UNSUPPORTED("el3n9zylp6tlrb6d73napyvmy"); // end of the map. Decrease the map-length byte too. */ UNSUPPORTED("5aojv97eoyl5m04xfurgaavwm"); // while ((int) b[-1] > 0 && b[b[-1] - 1] == 0) UNSUPPORTED("ajlocpcq3igxmb5gmsoqvv2es"); // b[-1]--; UNSUPPORTED("bhvngkxhzl8kmmso1yya535k3"); // b += b[-1]; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("6bh4kues0yl62d5yxc9atvjif"); // case '(': UNSUPPORTED("10vjrts0i5hyw8tlbrt0z7rxn"); // if (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("bmyrcl5ximm9vy0tneijgrytk"); // goto handle_open; UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else UNSUPPORTED("uivpjrr5me8j92jky5okan1c"); // goto normal_char; UNSUPPORTED("1e0dw1ejy35o3woadzbcsm7fr"); // case ')': UNSUPPORTED("10vjrts0i5hyw8tlbrt0z7rxn"); // if (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("3s6h8cwqnf4sxe6ctgnhnea58"); // goto handle_close; UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else UNSUPPORTED("uivpjrr5me8j92jky5okan1c"); // goto normal_char; UNSUPPORTED("e3rwmj3a70hs7pld4kwdx60mn"); // case '\n': UNSUPPORTED("70gx6eoougt8rlinl56yw83xr"); // if (syntax & (((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("5jivfhwm58xf3nhm2fe6mhe63"); // goto handle_alt; UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else UNSUPPORTED("uivpjrr5me8j92jky5okan1c"); // goto normal_char; UNSUPPORTED("4alxh05h1fjl2sladyp35v6wj"); // case '|': UNSUPPORTED("3torkuptfbkp3zjwrckz7pqdn"); // if (syntax & (((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("5jivfhwm58xf3nhm2fe6mhe63"); // goto handle_alt; UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else UNSUPPORTED("uivpjrr5me8j92jky5okan1c"); // goto normal_char; UNSUPPORTED("4pyfskl7wp2jd81x0kmp62qoi"); // case '{': UNSUPPORTED("5b1d1n2on553ca86p9l993tzn"); // if (syntax & (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) && syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("48zoic9u273bq7o6wfz7y7fsv"); // goto handle_interval; UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else UNSUPPORTED("uivpjrr5me8j92jky5okan1c"); // goto normal_char; UNSUPPORTED("5350k8qj9jz4pvuqs0weppxzm"); // case '\\': UNSUPPORTED("drfl8x3xhp9nddd3popxg4kkf"); // if (p == pend) return (free (compile_stack.stack), REG_EESCAPE); UNSUPPORTED("27v1be7swlc5n86wdyk7yqicm"); // /* Do not translate the character after the \, so that we can UNSUPPORTED("aimxtldmdqlup4n4gcasbmjpm"); // distinguish, e.g., \B from \b, even if we normally would UNSUPPORTED("8y750xv4fwoof20pgyb54iljp"); // translate, e.g., B to b. */ UNSUPPORTED("emr80p3t30z3qcchdf6qsg7op"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; } while (0); UNSUPPORTED("1wwqm41fujo96fngaibe11cs"); // switch (c) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("8jxolljx883gvj5ry1lre79rm"); // case '(': UNSUPPORTED("59nlrexduxa9d2pv4p8p4wfyn"); // if (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("duzsz5s9lw56m1on7ajxgk9o2"); // goto normal_backslash; UNSUPPORTED("1mo91efxfidrlkj7o2hpimm5g"); // handle_open: UNSUPPORTED("cc2g9mgbjo7991epy9celv5dq"); // bufp->re_nsub++; UNSUPPORTED("e816ua3kiygoarxwt4u3kjw2e"); // regnum++; UNSUPPORTED("abfkotx8f2o71l3ungy2dc61b"); // if ((compile_stack.avail == compile_stack.size)) UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { UNSUPPORTED("5r9ltvya89zzc88t9p8g86dxp"); // ((compile_stack.stack) = ( UNSUPPORTED("5q6n9lfuwcrd4xf1g8vam0mqg"); // compile_stack_elt_t *) realloc (compile_stack.stack, (compile_stack.size << 1) * sizeof ( UNSUPPORTED("2a7bsn9w2iinvqmd970g996fq"); // compile_stack_elt_t))); UNSUPPORTED("dsrcc4quas84hhfjjm5yh2be8"); // if (compile_stack.stack == (void *)0) return REG_ESPACE; UNSUPPORTED("8kq2kc3jebolynu1cy6403pl0"); // compile_stack.size <<= 1; UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("e0bq2fat5uym1sf4darkcwl7v"); // /* These are the values to restore when we hit end of this UNSUPPORTED("3vpixvd7xctqmc3ngtezp4xh4"); // group. They are all relative offsets, so that if the UNSUPPORTED("2v6zztbhem2o09k7pqvggwe8h"); // whole pattern moves because of realloc, they will still UNSUPPORTED("57di400em2riuffwpvny0f24u"); // be valid. */ UNSUPPORTED("8rxnof37j5xup2c6z4diq79ou"); // (compile_stack.stack[compile_stack.avail]).begalt_offset = begalt - bufp->buffer; UNSUPPORTED("9nay0qlhefwna3c6dilyk0ljp"); // (compile_stack.stack[compile_stack.avail]).fixup_alt_jump UNSUPPORTED("aq269vu0tq0y8wvt7vg6y41u8"); // = fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0; UNSUPPORTED("f2a1p7nj50nhzemnvvv85l9wp"); // (compile_stack.stack[compile_stack.avail]).laststart_offset = b - bufp->buffer; UNSUPPORTED("3ikd9wh2ibpe6fnfbwac6mal"); // (compile_stack.stack[compile_stack.avail]).regnum = regnum; UNSUPPORTED("1222t3yuwlm1hv92xmzgstlpj"); // /* We will eventually replace the 0 with the number of UNSUPPORTED("b5a63c42wobd53sp3c64zj34u"); // groups inner to this one. But do not push a UNSUPPORTED("1indupc2ufbt22ci1btaoi3w1"); // start_memory for groups beyond the last one we can UNSUPPORTED("clbbjbwg9b4yr40r3qt26gayn"); // represent in the compiled pattern. */ UNSUPPORTED("dn6qx81h224i04gen8lz36bur"); // if (regnum <= 255) UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { UNSUPPORTED("b55i0sl0dvhuj7r94cz8uascg"); // (compile_stack.stack[compile_stack.avail]).inner_group_offset = b - bufp->buffer + 2; UNSUPPORTED("crcx4g4ali1dijvt94wdz6nsm"); // do { while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (start_memory); *b++ = (unsigned char) (regnum); *b++ = (unsigned char) (0); } while (0); UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("94rzmxep7enhqkfnp2762ytyy"); // compile_stack.avail++; UNSUPPORTED("dphv9qka2txhy68rnsif6jynt"); // fixup_alt_jump = 0; UNSUPPORTED("dvt6va09huijx10zufnnjqgl3"); // laststart = 0; UNSUPPORTED("90zo4it529eaunfkfdxoxrdgj"); // begalt = b; UNSUPPORTED("dvj2nuag66y7el3zrpla0153y"); // /* If we've reached MAX_REGNUM groups, then this open UNSUPPORTED("2u4e034ze821746znru3h0b45"); // won't actually generate any code, so we'll have to UNSUPPORTED("dk5vb9d5gkrw8sibofm4qt4ue"); // clear pending_exact explicitly. */ UNSUPPORTED("7s8z4qnugzgnbuvds8u8a5jep"); // pending_exact = 0; UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("f58m8dl8wsiu09tv3k6hddsnz"); // case ')': UNSUPPORTED("8rxf228e9g6ihw68iqgw5ye4v"); // if (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) goto normal_backslash; UNSUPPORTED("7yogipyu9e9xkgapyvsso5js4"); // if ((compile_stack.avail == 0)) { UNSUPPORTED("8jaoyupj1e28u8vqk14htwrtv"); // if (syntax & (((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("7twsisd1xmsx52xuobbqhozvn"); // goto normal_backslash; UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else UNSUPPORTED("dn8ttvbrvj1svr73kt4zmcugv"); // return (free (compile_stack.stack), REG_ERPAREN); UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("3bc4i0fs7quuiznm2wabuv57g"); // handle_close: UNSUPPORTED("cba08qms5w8uqvkd4p9iqz909"); // if (fixup_alt_jump) UNSUPPORTED("1lzprxcdmzqjb9whh02ptkgin"); // { /* Push a dummy failure point at the end of the UNSUPPORTED("cc7pak11xcdny8f782y93y6d4"); // alternative for a possible future UNSUPPORTED("4iprb2tgw3ra22d8s7u4ny04z"); // `pop_failure_jump' to pop. See comments at UNSUPPORTED("il2pao7ylwdupdmwkc63wt74"); // `push_dummy_failure' in `re_match_2'. */ UNSUPPORTED("bsoqdb55d2fj7nrshha8baj79"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (push_dummy_failure); } while (0); UNSUPPORTED("bsg3cvulx3vuba3c4g7h8wi9e"); // /* We allocated space for this jump when we assigned UNSUPPORTED("81pcbxblcl9t5t7fqo3daz26"); // to `fixup_alt_jump', in the `handle_alt' case below. */ UNSUPPORTED("42dp50c2b5kexwd7wxmwewwe1"); // store_op1 (jump_past_alt, fixup_alt_jump, (int) ((b - 1) - (fixup_alt_jump) - 3)); UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("172uzd85uuznm53m6t1nv9ke5"); // /* See similar code for backslashed left paren above. */ UNSUPPORTED("7yogipyu9e9xkgapyvsso5js4"); // if ((compile_stack.avail == 0)) { UNSUPPORTED("8jaoyupj1e28u8vqk14htwrtv"); // if (syntax & (((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("6gqrsbcf35slq98fdu38ysotz"); // goto normal_char; UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else UNSUPPORTED("dn8ttvbrvj1svr73kt4zmcugv"); // return (free (compile_stack.stack), REG_ERPAREN); UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("eniovbcxrkcn8texhpvd1c3j"); // /* Since we just checked for an empty stack above, this UNSUPPORTED("oah0j3x85xy0y5snf99b5uto"); // ``can't happen''. */ UNSUPPORTED("e4kt1tmmevqvy3cbyk6xnznck"); // ; UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { UNSUPPORTED("zxem7lefmt7jmq1sphx8jq5d"); // /* We don't just want to restore into `regnum', because UNSUPPORTED("eshff1bkln1euqcvo55z6arar"); // later groups should continue to be numbered higher, UNSUPPORTED("hyn2g413dbg1jtec9jsz3ujb"); // as in `(ab)c(de)' -- the second group is #2. */ UNSUPPORTED("e26xy4hqgvbad7pusqf04i868"); // regnum_t this_group_regnum; UNSUPPORTED("6n0r61042a9cp17p8uaa2pvkk"); // compile_stack.avail--; UNSUPPORTED("b8x4vi5eywvcxrfzoej5bwryf"); // begalt = bufp->buffer + (compile_stack.stack[compile_stack.avail]).begalt_offset; UNSUPPORTED("1xvm5ivpx5tz8e199a7p2rmqz"); // fixup_alt_jump UNSUPPORTED("4umag2hy9kw4kqozrwydhawfq"); // = (compile_stack.stack[compile_stack.avail]).fixup_alt_jump UNSUPPORTED("5gcmnf7zgwup5dbu5kddwwfq5"); // ? bufp->buffer + (compile_stack.stack[compile_stack.avail]).fixup_alt_jump - 1 UNSUPPORTED("1gewh4lotwkkm4iqn6ggzwkoq"); // : 0; UNSUPPORTED("85k6r2lf00egr6wmh6ynrl2p5"); // laststart = bufp->buffer + (compile_stack.stack[compile_stack.avail]).laststart_offset; UNSUPPORTED("8hnnnyzrlgnojw4fgthz9m20m"); // this_group_regnum = (compile_stack.stack[compile_stack.avail]).regnum; UNSUPPORTED("dlko1f9w54peneqoca91cgrci"); // /* If we've reached MAX_REGNUM groups, then this open UNSUPPORTED("74txdb0o7dhsdiultkxutc0e7"); // won't actually generate any code, so we'll have to UNSUPPORTED("185wciv8bzl59e6kldksp04w4"); // clear pending_exact explicitly. */ UNSUPPORTED("47qf9noup192j3ixvbaqfafxw"); // pending_exact = 0; UNSUPPORTED("askuaehvoj7enatduzagqwmbk"); // /* We're at the end of the group, so now we know how many UNSUPPORTED("autf5q3thbf8mmptmgx0msnh4"); // groups were inside this one. */ UNSUPPORTED("a8riafizqdv5zjapabhopp72g"); // if (this_group_regnum <= 255) UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("2wmjb2xbz36ytg6g1bgfd4hb1"); // unsigned char *inner_group_loc UNSUPPORTED("bzfdj6g2ck20pq1mb50l27a9v"); // = bufp->buffer + (compile_stack.stack[compile_stack.avail]).inner_group_offset; UNSUPPORTED("el3pwrfnbqiexy2sk0rffy0cf"); // *inner_group_loc = regnum - this_group_regnum; UNSUPPORTED("cguv9rjc1iive3bv1yez75f03"); // do { while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (stop_memory); *b++ = (unsigned char) (this_group_regnum); *b++ = (unsigned char) ( UNSUPPORTED("7sev1sdu00ye0rtlo3hndpvge"); // regnum - this_group_regnum); } while (0); UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("1r6y7bujaca34ru0thv040wer"); // case '|': /* `\|'. */ UNSUPPORTED("46dgptds7v1z98qko5xqgje7h"); // if (syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) || syntax & (((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("duzsz5s9lw56m1on7ajxgk9o2"); // goto normal_backslash; UNSUPPORTED("4zdduwo0bies2nyvyh3rkqec5"); // handle_alt: UNSUPPORTED("eh6qytrwlnojjauu38ckl7ieo"); // if (syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; UNSUPPORTED("71lbycb6i00gg9x1a2qrb3eip"); // /* Insert before the previous alternative a jump which UNSUPPORTED("7e4xxb42diyggtjzhyj0r4iht"); // jumps to this alternative if the former fails. */ UNSUPPORTED("12a3mmfyhz3lv9g634sbhwpnl"); // while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); UNSUPPORTED("e3r36lsf9nfoaplwmusccx2ko"); // insert_op1 (on_failure_jump, begalt, (int) ((b + 6) - (begalt) - 3), b); UNSUPPORTED("7s8z4qnugzgnbuvds8u8a5jep"); // pending_exact = 0; UNSUPPORTED("ebm7g0g1nuacoouvopi1thit2"); // b += 3; UNSUPPORTED("2oav1ek69wp16iydew6ok9ox8"); // /* The alternative before this one has a jump after it UNSUPPORTED("cmcbmjy59tx8k81e3ek6xwlvq"); // which gets executed if it gets matched. Adjust that UNSUPPORTED("7jb4wxi0em6v0jucfjtw3a4up"); // jump so it will jump to this alternative's analogous UNSUPPORTED("5zlorzwitjp83i56wns9w8u0r"); // jump (put in below, which in turn will jump to the next UNSUPPORTED("3y12zjyrd8x7fd4xc7uz7wk9b"); // (if any) alternative's such jump, etc.). The last such UNSUPPORTED("7oj6n4fel5k5oe1hc1w024dj5"); // jump jumps to the correct final destination. A picture: UNSUPPORTED("ey74hniulk9kz47tqr8by3ul4"); // _____ _____ UNSUPPORTED("ded5vl0okjroo4lbzal107hid"); // | | | | UNSUPPORTED("8dlq9vw86vwqva8uk09fpjhnz"); // | v | v UNSUPPORTED("6xr500bohtokobmkx1m276vk2"); // a | b | c UNSUPPORTED("k27r9mjl8i2jpghyf3yd76ss"); // If we are at `b', then fixup_alt_jump right now points to a UNSUPPORTED("9jlwvx46zdiyc0cgpc9aichx2"); // three-byte space after `a'. We'll put in the jump, set UNSUPPORTED("7gw6bsjyzgswrermi9mrvnnd9"); // fixup_alt_jump to right after `b', and leave behind three UNSUPPORTED("996t1kfvkq1wsgyy9twl2hmf5"); // bytes which we'll fill in when we get to after `c'. */ UNSUPPORTED("cba08qms5w8uqvkd4p9iqz909"); // if (fixup_alt_jump) UNSUPPORTED("1na9w390cmfhlvzr6zo51tmtb"); // store_op1 (jump_past_alt, fixup_alt_jump, (int) ((b) - (fixup_alt_jump) - 3)); UNSUPPORTED("8ed964065ejrs0q6lzv94yez1"); // /* Mark and leave space for a jump after this alternative, UNSUPPORTED("25baag8i46m3zhww0ac4k5o0x"); // to be filled in later either by next alternative or UNSUPPORTED("87vumt536jh7giifqd1s7e35m"); // when know we're at the end of a series of alternatives. */ UNSUPPORTED("ev3p48k8fo943q12gph5h8h5i"); // fixup_alt_jump = b; UNSUPPORTED("12a3mmfyhz3lv9g634sbhwpnl"); // while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); UNSUPPORTED("ebm7g0g1nuacoouvopi1thit2"); // b += 3; UNSUPPORTED("dvt6va09huijx10zufnnjqgl3"); // laststart = 0; UNSUPPORTED("90zo4it529eaunfkfdxoxrdgj"); // begalt = b; UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("99gf69q37flmk5nul07d806ch"); // case '{': UNSUPPORTED("eh7o49r6vtoc1lilgh11tvn4b"); // /* If \{ is a literal. */ UNSUPPORTED("bpfokxd4igwyfns09495mnyj8"); // if (!(syntax & (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("5qn7772e7nzkqvtlkiys53olq"); // /* If we're at `\{' and it's not the open-interval UNSUPPORTED("8a0p71nhvq7jckckna5u4qr7t"); // operator. */ UNSUPPORTED("cswuz8yxul8hsi2ysw71xb9rz"); // || ((syntax & (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) UNSUPPORTED("d0s744fq2fs9l9aaekpxlqj4e"); // || (p - 2 == pattern && p == pend)) UNSUPPORTED("duzsz5s9lw56m1on7ajxgk9o2"); // goto normal_backslash; UNSUPPORTED("bxsvs3tj432mvaj55kae5o9ue"); // handle_interval: UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { UNSUPPORTED("ey78j6wwy5vn22b5iutepsjvj"); // /* If got here, then the syntax allows intervals. */ UNSUPPORTED("22u5dv9jzoa3qwk32b1729l4r"); // /* At least (most) this many matches must be made. */ UNSUPPORTED("8hhxunayr90degkndrot61r2v"); // int lower_bound = -1, upper_bound = -1; UNSUPPORTED("b3m9z0v48oef8fma37xkjtew6"); // beg_interval = p - 1; UNSUPPORTED("891uwttbfnv5bc58wpbg1fhgl"); // if (p == pend) UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("cbdohhh0bm6q3vbmnwn4e1vyq"); // if (syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("ckqpiwbyjnqn5cpwu2kw8rzbb"); // goto unfetch_interval; UNSUPPORTED("61qf7b2jxc7j3knm5ts69f0b6"); // else UNSUPPORTED("5ln10oel04ejmsrfm7uzyxmm3"); // return (free (compile_stack.stack), REG_EBRACE); UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("3imw63qg7eb3mef09yezz6uj7"); // { if (p != pend) { do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); while ((1 && isdigit (c))) { if (lower_bound < 0) lower_bound = 0; lower_bound = lower_bound * 10 + c - '0'; if (p == pend) break; do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); } } }; UNSUPPORTED("1uyn0tiw7bqjiss70oyjn9l7f"); // if (c == ',') UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("5xu6gzc4kvvybje2lnr7qdjka"); // { if (p != pend) { do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); while ((1 && isdigit (c))) { if (upper_bound < 0) upper_bound = 0; upper_bound = upper_bound * 10 + c - '0'; if (p == pend) break; do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); } } }; UNSUPPORTED("36f9x0yetwobrju6guskv8zsf"); // if (upper_bound < 0) upper_bound = (0x7fff); UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else UNSUPPORTED("76by7r7x6guk4yvf4na11j7fa"); // /* Interval such as `{1}' => match exactly once. */ UNSUPPORTED("7oi51mz0kxn0ljkpu564jd1zz"); // upper_bound = lower_bound; UNSUPPORTED("7ec3ilddc87ddo0ohyphhvkag"); // if (lower_bound < 0 || upper_bound > (0x7fff) UNSUPPORTED("dg03lkmdnpyic7onasg3rhqv3"); // || lower_bound > upper_bound) UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("cbdohhh0bm6q3vbmnwn4e1vyq"); // if (syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("ckqpiwbyjnqn5cpwu2kw8rzbb"); // goto unfetch_interval; UNSUPPORTED("61qf7b2jxc7j3knm5ts69f0b6"); // else UNSUPPORTED("dncd6ntkh4fds08gm3c4f7y7z"); // return (free (compile_stack.stack), REG_BADBR); UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("8zi6rfr6252dxyzqv0myhm4xm"); // if (!(syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("3nwh4wgghtnfkscuiwfo0cu3y"); // if (c != '\\') return (free (compile_stack.stack), REG_EBRACE); UNSUPPORTED("eqri2rfe7jnz1m2rij615jaj1"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("7yy5bnz36zs5pyi05n1qbbyfx"); // if (c != '}') UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("cbdohhh0bm6q3vbmnwn4e1vyq"); // if (syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("ckqpiwbyjnqn5cpwu2kw8rzbb"); // goto unfetch_interval; UNSUPPORTED("61qf7b2jxc7j3knm5ts69f0b6"); // else UNSUPPORTED("dncd6ntkh4fds08gm3c4f7y7z"); // return (free (compile_stack.stack), REG_BADBR); UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("5wvp3nau0n8tyg9q5a45z6lyw"); // /* We just parsed a valid interval. */ UNSUPPORTED("8abj2dxygzm4q2t6cik367htu"); // /* If it's invalid to have no preceding re. */ UNSUPPORTED("7jmcihqsic23w36x8uyw6rgq0"); // if (!laststart) UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("dhcq2d5ztdbu4o4zvyapxw6nh"); // if (syntax & (((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("1m9o7j67m70ez7l1kcm89n5hu"); // return (free (compile_stack.stack), REG_BADRPT); UNSUPPORTED("cd9am2nn7ebpy7n4jg9h1ufr4"); // else if (syntax & ((((((unsigned long int) 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("9bhpbnocq89hcx0yaaav9o55q"); // laststart = b; UNSUPPORTED("61qf7b2jxc7j3knm5ts69f0b6"); // else UNSUPPORTED("ckqpiwbyjnqn5cpwu2kw8rzbb"); // goto unfetch_interval; UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("4gb3yehghg1r4z81pfpjdfvgt"); // /* If the upper bound is zero, don't want to succeed at UNSUPPORTED("aatlwtk51r4vhf2pwijmg9mp2"); // all; jump from `laststart' to `b + 3', which will be UNSUPPORTED("5qe2o1vhmd60525scpziso3qd"); // the end of the buffer after we insert the jump. */ UNSUPPORTED("7mu4hmjs37m7lx095ek5vdxxv"); // if (upper_bound == 0) UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("a881bhs9uyxvv8hkudjh48ded"); // while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); UNSUPPORTED("1iszfmgzsydg6wplo0b3rdscs"); // insert_op1 (jump, laststart, (int) ((b + 3) - (laststart) - 3), b); UNSUPPORTED("ef7wtmbarkb4uc7wd67hvt8vg"); // b += 3; UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("er56h1ofqtaixpmzkkaco2esj"); // /* Otherwise, we have a nontrivial interval. When UNSUPPORTED("as06jnzy16oy1d2k8yrsmnzce"); // we're all done, the pattern will look like: UNSUPPORTED("2sy9ixs1qds1ov6cizjv2ekst"); // set_number_at UNSUPPORTED("57q8h3cnrxlq45gvr3k5coz5l"); // set_number_at UNSUPPORTED("9nr6blw8qubgah89xl4e7nkc9"); // succeed_n UNSUPPORTED("3jejf324x7ol07x2qsz7dal9u"); // UNSUPPORTED("91gylqgyabjgru87d2uf6v0sb"); // jump_n UNSUPPORTED("3ef68fn6o1w25y5pabsc3ly4g"); // (The upper bound and `jump_n' are omitted if UNSUPPORTED("bk78ox2ujcbxp08sj3dypdu4d"); // `upper_bound' is 1, though.) */ UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else UNSUPPORTED("efpf0x8clufa77cutrnkx4lcj"); // { /* If the upper bound is > 1, we need to insert UNSUPPORTED("dzt6navygpg7km0wu0um9ly47"); // more at the end of the loop. */ UNSUPPORTED("bj2zq9uzbacy1f5scg45mc8o7"); // unsigned nbytes = 10 + (upper_bound > 1) * 10; UNSUPPORTED("a3dj4ob1sccvwmhsasm69xe72"); // while ((unsigned long) (b - bufp->buffer + (nbytes)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); UNSUPPORTED("1su4wz7ud8htx57ifpl7dvcjb"); // /* Initialize lower bound of the `succeed_n', even UNSUPPORTED("9j79ov5k583ecforn4p7uyj07"); // though it will be set during matching by its UNSUPPORTED("8e98bgll3zoiy6g3o125b3q2f"); // attendant `set_number_at' (inserted next), UNSUPPORTED("53ep471y7ys6dzp9yufebyily"); // because `re_compile_fastmap' needs to know. UNSUPPORTED("14vynt5c8wnonl64olb8ttvtd"); // Jump to the `jump_n' we might insert below. */ UNSUPPORTED("70iuvqfyzlre4zcn83hksrxn8"); // insert_op2 (succeed_n, laststart, (int) (( UNSUPPORTED("5pma6876qpamutcafga5yib97"); // b + 5 +(upper_bound > 1) * 5) - (laststart) - 3), UNSUPPORTED("6vch8eo9jutmcjre2de6d9gbd"); // lower_bound, b); UNSUPPORTED("43kr4g9sdi8c4jh0s5i56vuom"); // b += 5; UNSUPPORTED("9wq1ll164vusxqbxnhcmfglr2"); // /* Code to initialize the lower bound. Insert UNSUPPORTED("8pvo9br1w68oucw65nlm51oyr"); // before the `succeed_n'. The `5' is the last two UNSUPPORTED("a0wkdu3a33nzfqwoi97ucrydd"); // bytes of this `set_number_at', plus 3 bytes of UNSUPPORTED("3f5d3pqpnky1yym79bby1sz14"); // the following `succeed_n'. */ UNSUPPORTED("6tnprwkxn86sjk70t31xuoner"); // insert_op2 (set_number_at, laststart, 5, lower_bound, b); UNSUPPORTED("43kr4g9sdi8c4jh0s5i56vuom"); // b += 5; UNSUPPORTED("oi58bgxgyehr7fep6gg7b30i"); // if (upper_bound > 1) UNSUPPORTED("8k5l99ygyd8csogbu2fv5zo"); // { /* More than one repetition is allowed, so UNSUPPORTED("dfqu908jf8ce7624rr03va1d4"); // append a backward jump to the `succeed_n' UNSUPPORTED("3bwv4hhwkxq1dxz91v6urcgft"); // that starts this interval. UNSUPPORTED("9d1i5cmg65d2yqlnnwhhgb10d"); // When we've reached this during matching, UNSUPPORTED("a4w172v3cp6ffpdtc6uecy35z"); // we'll have matched the interval once, so UNSUPPORTED("ek50qyp6pxt5f0d13fhqk7gb3"); // jump back only `upper_bound - 1' times. */ UNSUPPORTED("cw1t4ts9rzslpfolcfywhn3qn"); // store_op2 (jump_n, b, (int) ((laststart + 5) - (b) - 3), UNSUPPORTED("3bkogjbp2zrhl1e57w52wgtur"); // upper_bound - 1); UNSUPPORTED("e4xjnlgh2lwxl5rgrsy1t0lzp"); // b += 5; UNSUPPORTED("9eb4sjjix0zbs0m5165ieamk0"); // /* The location we want to set is the second UNSUPPORTED("5y1422w9b3ttxiq7uxejd8dl7"); // parameter of the `jump_n'; that is `b-2' as UNSUPPORTED("7pbl00qw1iwl2shqi1boj4s0o"); // an absolute address. `laststart' will be UNSUPPORTED("8nzimsq57reptkqovcwmi5is2"); // the `set_number_at' we're about to insert; UNSUPPORTED("8zphslv1mlv2s77w43gkoi1ul"); // `laststart+3' the number to set, the source UNSUPPORTED("d2f41o7p6x4ikqydu4firrznx"); // for the relative address. But we are UNSUPPORTED("ykrtets348ms6o03g441goo7"); // inserting into the middle of the pattern -- UNSUPPORTED("8wbqzkcrlw3e1ea51h8blhurv"); // so everything is getting moved up by 5. UNSUPPORTED("a3f2u6qy5p003dtis6m0fpvl1"); // Conclusion: (b - 2) - (laststart + 3) + 5, UNSUPPORTED("5emb5r1kvteh6n0qces39m5f2"); // i.e., b - laststart. UNSUPPORTED("3zbu3199lym6vc2u1vakclmn6"); // We insert this at the beginning of the loop UNSUPPORTED("csmu8b2er6ytie5e9nt8t4ii4"); // so that if we fail during matching, we'll UNSUPPORTED("6i50gsk8v7o3h2xgwwmiiftk6"); // reinitialize the bounds. */ UNSUPPORTED("87vlmr3dcbomq11myh4sw1fl6"); // insert_op2 (set_number_at, laststart, b - laststart, UNSUPPORTED("9qs8k9xnugrbv80hqanlzsj0k"); // upper_bound - 1, b); UNSUPPORTED("e4xjnlgh2lwxl5rgrsy1t0lzp"); // b += 5; UNSUPPORTED("b5m0ttlk23avgs4i47o8lbzg1"); // } UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("47qf9noup192j3ixvbaqfafxw"); // pending_exact = 0; UNSUPPORTED("5bsb6g154mdvmrq2r8pg7c57z"); // beg_interval = (void *)0; UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("4g8id4otqpbtngfcwz2lvm1dj"); // unfetch_interval: UNSUPPORTED("2uaon9lzacwcq3uk6um6vhs5b"); // /* If an invalid interval, match the characters as literals. */ UNSUPPORTED("e4kt1tmmevqvy3cbyk6xnznck"); // ; UNSUPPORTED("del20sog75q2qfuqvkporgtm0"); // p = beg_interval; UNSUPPORTED("34xptp017sapmiseov6178cf4"); // beg_interval = (void *)0; UNSUPPORTED("biznyjdfohe9yytw4pz3d8dox"); // /* normal_char and normal_backslash need `c'. */ UNSUPPORTED("criokqqji74yuk47n1jhnpq75"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); UNSUPPORTED("axdhegkjispkpmlj1rwmr7893"); // if (!(syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { UNSUPPORTED("szfu82l2yyl4abpqquds47zb"); // if (p > pattern && p[-1] == '\\') UNSUPPORTED("4pgdoo1pi0fajdrnqd2gl86zc"); // goto normal_backslash; UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("dxpbgmfj2w220xy1q99fxje94"); // goto normal_char; UNSUPPORTED("28ro2br1t858h9e64b2eclvsh"); // case 'w': UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; UNSUPPORTED("bzlbs3vmfi1kf0101kec4qyco"); // laststart = b; UNSUPPORTED("br0jt3hvd6j06mrnfv1j1du2c"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (wordchar); } while (0); UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("cgixiaqx7fff7w14lfzv9un9b"); // case 'W': UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; UNSUPPORTED("bzlbs3vmfi1kf0101kec4qyco"); // laststart = b; UNSUPPORTED("csd38b3d31jeqlokfvq1k1w8f"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (notwordchar); } while (0); UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("56yutn3bw63gli62ao6byqpz6"); // case '<': UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; UNSUPPORTED("bvnndrb6xvkus381wvq683jko"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (wordbeg); } while (0); UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("b27z9bdaut5nhut2j9qtvrc6x"); // case '>': UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; UNSUPPORTED("9x7h5ccf7d8cb7d008zc3fvnn"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (wordend); } while (0); UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("1lgl6j1beved5wkn8lbc9pj9v"); // case 'b': UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; UNSUPPORTED("ee4emtgp2qmp2if03ztroprzx"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (wordbound); } while (0); UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("1rh1jh861iaq6ptkgabcumr89"); // case 'B': UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; UNSUPPORTED("f1o6i9gjd99gwklmvn8viskl6"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (notwordbound); } while (0); UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("59swrjh32j9w6w9fnlmqjwqhm"); // case '`': UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; UNSUPPORTED("21zy7115epyqb00qfyrak2wlh"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (begbuf); } while (0); UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("enp735bu0pvi1g2slk3f3xjlt"); // case '\'': UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; UNSUPPORTED("efz3fdd9mbv7nl371w3u6ezhv"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (endbuf); } while (0); UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("5p5kyaam049yzq965bmdz6nnh"); // case '1': case '2': case '3': case '4': case '5': UNSUPPORTED("9hv7da8hbwl3dpaoiieu3rdte"); // case '6': case '7': case '8': case '9': UNSUPPORTED("8x9ia20e11qngbvg3030t63ib"); // if (syntax & ((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; UNSUPPORTED("984azd04wqga97vlg77nqw3hl"); // c1 = c - '0'; UNSUPPORTED("2j8gb2lyb8b45sk2yf69wj6rw"); // if (c1 > regnum) UNSUPPORTED("3t049zz47oarl9dkg8euljouk"); // return (free (compile_stack.stack), REG_ESUBREG); UNSUPPORTED("b52s0xefwdzq23ebdsm2l635g"); // /* Can't back reference to a subexpression if inside of it. */ UNSUPPORTED("289fpytgoqtnz6sbd26j596ma"); // if (group_in_compile_stack (compile_stack, (regnum_t) c1)) UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; UNSUPPORTED("bzlbs3vmfi1kf0101kec4qyco"); // laststart = b; UNSUPPORTED("ayh7963cwi35nzazymns2xr4j"); // do { while ((unsigned long) (b - bufp->buffer + (2)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (duplicate); *b++ = (unsigned char) (c1); } while (0); UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("10rhhnvrykevpmqtifs3vfsbn"); // case '+': UNSUPPORTED("5d03wz66bdkv7mubtsqfqptwh"); // case '?': UNSUPPORTED("cmtz225wrrfrtyrfnva1w0xyx"); // if (syntax & (((unsigned long int) 1) << 1)) UNSUPPORTED("1e36xo9vcfmetpl665flebmxr"); // goto handle_plus; UNSUPPORTED("ex6jbb36b02x7vzl22fq0yh2l"); // else UNSUPPORTED("duzsz5s9lw56m1on7ajxgk9o2"); // goto normal_backslash; UNSUPPORTED("623zujkdt9es8v0w13jz9jw8x"); // default: UNSUPPORTED("beo8prktwmjyif35z778zfw1g"); // normal_backslash: UNSUPPORTED("d6o76edxq0225kqke2hja81jl"); // /* You might think it would be useful for \ to mean UNSUPPORTED("3ifiyvf5lf26yw26enbob7qmu"); // not to translate; but if we don't translate it UNSUPPORTED("ecuhc5c6wpoj7vpzvjyv5x62r"); // it will never match anything. */ UNSUPPORTED("1nghju7haq80s0kj7x01pojis"); // c = (translate ? (char) translate[(unsigned char) (c)] : (c)); UNSUPPORTED("dxpbgmfj2w220xy1q99fxje94"); // goto normal_char; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("comxch6w0lbi64ejq9m4p0u7o"); // default: UNSUPPORTED("egnm0qedqx5klxttjvckp1nh0"); // /* Expects the character in `c'. */ UNSUPPORTED("4qeb36tm7edhyh2kuighgnt3l"); // normal_char: UNSUPPORTED("1fk2r6llu2tyc89u61aqedfcu"); // /* If no exactn currently being built. */ UNSUPPORTED("dvgbrbk801umnqbk21dcl1jqt"); // if (!pending_exact UNSUPPORTED("4sk1dp6gncxrc6q5vqax6q1ff"); // /* If last exactn not at current position. */ UNSUPPORTED("8ta654rp3f80109ds7wainnbo"); // || pending_exact + *pending_exact + 1 != b UNSUPPORTED("77sazmv1hkm382fcbfgk2amhz"); // /* We have only one byte following the exactn for the count. */ UNSUPPORTED("195b1d4l8t8zfx7373dninfqs"); // || *pending_exact == (1 << 8) - 1 UNSUPPORTED("dfhnk487nvojvngpft8d1m5m6"); // /* If followed by a repetition operator. */ UNSUPPORTED("3ub8lclci64fyijvq4kh6b7wv"); // || *p == '*' || *p == '^' UNSUPPORTED("eus82vo98skwtodf1ct43m3j2"); // || ((syntax & (((unsigned long int) 1) << 1)) UNSUPPORTED("c35rzowssstcdv8ruusljr55b"); // ? *p == '\\' && (p[1] == '+' || p[1] == '?') UNSUPPORTED("an9wblbb8w5ryyrzneu7n5ko8"); // : (*p == '+' || *p == '?')) UNSUPPORTED("9fpdj9n2jjcr421s2g9z3r4i5"); // || ((syntax & (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("doucnd8aksv0c0n2qke841f3d"); // && ((syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("3d5qlx6ctgmlvlyvps6mliwz5"); // ? *p == '{' UNSUPPORTED("5g4kw7ayxlcp3eufwirvf96oj"); // : (p[0] == '\\' && p[1] == '{')))) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("nbxskwykyxkuuturxjw7zviw"); // /* Start building a new exactn. */ UNSUPPORTED("bzlbs3vmfi1kf0101kec4qyco"); // laststart = b; UNSUPPORTED("ejmhwadfnfrzhgtdtjhon9thk"); // do { while ((unsigned long) (b - bufp->buffer + (2)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (exactn); *b++ = (unsigned char) (0); } while (0); UNSUPPORTED("3d84yn9kh97rpe3bpdhnhbnpc"); // pending_exact = b - 1; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("2k7zblp37vmofrhji8gga03t0"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (c); } while (0); UNSUPPORTED("cib3f9ag6ywox7sedgbxkkmzk"); // (*pending_exact)++; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("61b5pg30vl032ddas1lgz7fom"); // } /* switch (c) */ UNSUPPORTED("9758gpbrep7p4gr36dhunt05n"); // } /* while p != pend */ UNSUPPORTED("93p2q85dy4ac5kim9nivyn79p"); // /* Through the pattern now. */ UNSUPPORTED("1owvoxb3fhlen2k6t0r5ai42z"); // if (fixup_alt_jump) UNSUPPORTED("13s484p9xd2bw2xbz1wlvdo2i"); // store_op1 (jump_past_alt, fixup_alt_jump, (int) ((b) - (fixup_alt_jump) - 3)); UNSUPPORTED("aprj6xezpwmu3a179m5g8vbya"); // if (!(compile_stack.avail == 0)) UNSUPPORTED("3qkjmx7dwj6otc7vge7e62fak"); // return (free (compile_stack.stack), REG_EPAREN); UNSUPPORTED("bif9tomfcf0bfh8yujmms4e00"); // /* If we don't want backtracking, force success UNSUPPORTED("6in6drehljv4k3imbk7ay9paw"); // the first time we reach the end of the compiled pattern. */ UNSUPPORTED("65u4ochrazrfxoz1im3b6cxt5"); // if (syntax & ((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) UNSUPPORTED("2gp9v2s1qkxulysls2k1go519"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (succeed); } while (0); UNSUPPORTED("cvaeac7ysy55222mdduh1aku9"); // free (compile_stack.stack); UNSUPPORTED("588061fcmtocd9luhfsdk74at"); // /* We have succeeded; set the length of the buffer. */ UNSUPPORTED("7at4a9mth8j1h0n9mhg91s816"); // bufp->used = b - bufp->buffer; UNSUPPORTED("cwwrkrko9fc4redgkt1b13h6d"); // return REG_NOERROR; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1a5b1tkqolinqh3eydzvc550l // static void store_op1 (re_opcode_t op, unsigned char *loc, int arg) public static Object store_op1(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("eili3inuq1bw9eshdmskywxtg"); // store_op1 (re_opcode_t op, UNSUPPORTED("eqn95cpnpj01ulxvedlp62t24"); // unsigned char *loc, UNSUPPORTED("4bho2a0suqymuq2e9rqlexiq3"); // int arg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1hzyviac306vd3ph2a79xocx7"); // *loc = (unsigned char) op; UNSUPPORTED("bmuizeo6n9t1qzeegovoyri2g"); // do { (loc + 1)[0] = (arg) & 0377; (loc + 1)[1] = (arg) >> 8; } while (0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1dmpl1eqm04oq44hm3nqojfqi // static void store_op2(re_opcode_t op, unsigned char *loc, int arg1, int arg2) public static Object store_op2(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("3uuxvmysdrpmrqq4esv6u5jvy"); // store_op2(re_opcode_t op, UNSUPPORTED("a8vol3cdyfu7j1q063xc83pt0"); // unsigned char *loc, UNSUPPORTED("dk2zk2gteycj6jwc1rcuw4jot"); // int arg1, UNSUPPORTED("afi4spwfrmjjgwzrd48g2eu1g"); // int arg2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1hzyviac306vd3ph2a79xocx7"); // *loc = (unsigned char) op; UNSUPPORTED("6ula40dcnni5p95iedvl6iz0p"); // do { (loc + 1)[0] = (arg1) & 0377; (loc + 1)[1] = (arg1) >> 8; } while (0); UNSUPPORTED("692n1w538qervykzhu59yxbnn"); // do { (loc + 3)[0] = (arg2) & 0377; (loc + 3)[1] = (arg2) >> 8; } while (0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4oawjz5vt9t86ibo8qr5a5ot7 // static void insert_op1(re_opcode_t op, unsigned char *loc, int arg, unsigned char *end) public static Object insert_op1(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("9kqafhtvgqir3019lsqbgnaik"); // insert_op1(re_opcode_t op, UNSUPPORTED("eqn95cpnpj01ulxvedlp62t24"); // unsigned char *loc, UNSUPPORTED("epz3wdlgykwaxdrfpx2zq4v1l"); // int arg, UNSUPPORTED("ebratu77atbhul7tuupzmelvf"); // unsigned char *end) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("169hmon34dm6xedl4afpa0i1j"); // register unsigned char *pfrom = end; UNSUPPORTED("45zeyp0r8qs22j0ji3pvdf6z6"); // register unsigned char *pto = end + 3; UNSUPPORTED("3022v7vf3t5s8s2dsxql29xo4"); // while (pfrom != loc) UNSUPPORTED("648ldcfu6yydgsxc2w4dn9lep"); // *--pto = *--pfrom; UNSUPPORTED("a9874mjpfiitct058pp2hkjid"); // store_op1 (op, loc, arg); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 v4p3krro14wk7jqs0uz06n05 // static void insert_op2(re_opcode_t op, unsigned char *loc, int arg1, int arg2, unsigned char *end) public static Object insert_op2(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("2udn0ng3gbc8cd8v2x946r2ss"); // insert_op2(re_opcode_t op, UNSUPPORTED("eqn95cpnpj01ulxvedlp62t24"); // unsigned char *loc, UNSUPPORTED("9nlhn9pgj5kcxamj9gw78b0qw"); // int arg1, UNSUPPORTED("e6ty8yiwetqhvokp26upcjwjt"); // int arg2, UNSUPPORTED("ebratu77atbhul7tuupzmelvf"); // unsigned char *end) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("169hmon34dm6xedl4afpa0i1j"); // register unsigned char *pfrom = end; UNSUPPORTED("b1q68dlnzwnkjo4hd7zcri3hx"); // register unsigned char *pto = end + 5; UNSUPPORTED("3022v7vf3t5s8s2dsxql29xo4"); // while (pfrom != loc) UNSUPPORTED("648ldcfu6yydgsxc2w4dn9lep"); // *--pto = *--pfrom; UNSUPPORTED("cd1n16p68qnglebcy01f0qn6l"); // store_op2 (op, loc, arg1, arg2); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e4latxw6wysh73m40r7m5x3jb // static boolean at_begline_loc_p(const char *pattern, const char *p, reg_syntax_t syntax) public static Object at_begline_loc_p(Object... arg) { UNSUPPORTED("etarlz3ybg3wdofiesiw8dwbq"); // static boolean UNSUPPORTED("dvoumivore2yi3vu64r9o17rz"); // at_begline_loc_p(const char *pattern, UNSUPPORTED("1ysotgxi8uwyxakudbb9firnu"); // const char *p, UNSUPPORTED("3yknuo3jrjif745axkby3960n"); // reg_syntax_t syntax) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8jnr30ihhlcqx0p7qembtdxv2"); // const char *prev = p - 2; UNSUPPORTED("7v8vzv9bs9dhey9spvhvxxgyp"); // boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\'; UNSUPPORTED("ef16816hd7el6q6461fnw6p1l"); // return UNSUPPORTED("dumav0wvej216wv8szi4x00s7"); // /* After a subexpression? */ UNSUPPORTED("3ki59spy9w7z11gtdahfx1ew3"); // (*prev == '(' && (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) || prev_prev_backslash)) UNSUPPORTED("ck5g71shir4kf9n8pbhvzz9ti"); // /* After an alternative? */ UNSUPPORTED("6zvsscasxk7x2dzo9s2jr9okc"); // || (*prev == '|' && (syntax & (((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) || prev_prev_backslash)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1c0buhtq2gms7qzzw7ql4drl1 // static boolean at_endline_loc_p(const char *p, const char *pend, reg_syntax_t syntax) public static Object at_endline_loc_p(Object... arg) { UNSUPPORTED("etarlz3ybg3wdofiesiw8dwbq"); // static boolean UNSUPPORTED("8w70icoej05avtfcbstpra0d"); // at_endline_loc_p(const char *p, UNSUPPORTED("eououd67tewr9lfimix16skdn"); // const char *pend, UNSUPPORTED("3yknuo3jrjif745axkby3960n"); // reg_syntax_t syntax) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eh8pwbqqa4049a7x1lhsxtsc1"); // const char *next = p; UNSUPPORTED("4wxnm7brzem3ywa9ptyl6m3he"); // boolean next_backslash = *next == '\\'; UNSUPPORTED("6yvr1bnbn14453b6eonom0ubu"); // const char *next_next = p + 1 < pend ? p + 1 : 0; UNSUPPORTED("ef16816hd7el6q6461fnw6p1l"); // return UNSUPPORTED("5zilqqenoq1qg4oaqhst16iny"); // /* Before a subexpression? */ UNSUPPORTED("bt1ckpmadq6m2rwsptz7rdax4"); // (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) ? *next == ')' UNSUPPORTED("ch55eypsczed6pggvuky7qg54"); // : next_backslash && next_next && *next_next == ')') UNSUPPORTED("cguaa6op9dr0opeabtp5b3ucn"); // /* Before an alternative? */ UNSUPPORTED("8fq9j881kguwbavolyyz6299l"); // || (syntax & (((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) ? *next == '|' UNSUPPORTED("84irf5dgp7xptskletavd7lcl"); // : next_backslash && next_next && *next_next == '|'); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 35rs0qiyjwppzg2ck5atwxnul // static boolean group_in_compile_stack(compile_stack_type compile_stack, regnum_t regnum) public static Object group_in_compile_stack(Object... arg) { UNSUPPORTED("etarlz3ybg3wdofiesiw8dwbq"); // static boolean UNSUPPORTED("aja1fo6z3x54rgftvbds69e"); // group_in_compile_stack(compile_stack_type compile_stack, UNSUPPORTED("ddun09npytwyxleyy5nr14lky"); // regnum_t regnum) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dfroqi0gdjuzge2bbdy5jzym0"); // int this_element; UNSUPPORTED("cf73uwdus915lin6frmrap08w"); // for (this_element = compile_stack.avail - 1; UNSUPPORTED("d8j8jtpe5iq1esx7uzvbvm14l"); // this_element >= 0; UNSUPPORTED("1xpv8yktiv0jzqarajl3v79zc"); // this_element--) UNSUPPORTED("bq2imq1log4s4jzgs1z1rv2lj"); // if (compile_stack.stack[this_element].regnum == regnum) UNSUPPORTED("8qe9dt2l8vdfqmmg989im37zb"); // return 1; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b8zwgtmxpoyrzfdfecydtrxda // static reg_errcode_t compile_range(const char **p_ptr, const char *pend, char * translate, reg_syntax_t syntax, unsigned char *b) public static Object compile_range(Object... arg) { UNSUPPORTED("9aerjmw5n52ektwk47t1r9bh0"); // static reg_errcode_t UNSUPPORTED("banxmfbwacgp17kgyqg9m8x68"); // compile_range(const char **p_ptr, UNSUPPORTED("ejc17tabtd2x12qzehf5o0sdm"); // const char *pend, UNSUPPORTED("cgokv0yhej0pe8aib1t4cxlz2"); // char * translate, UNSUPPORTED("1em1aqal71wcsn34n49xy07nb"); // reg_syntax_t syntax, UNSUPPORTED("3n1ptb0viq6trnbcy4c86udvu"); // unsigned char *b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1m07wmw0rmjh2kja0xep3mall"); // unsigned this_char; UNSUPPORTED("yjjwp976mzzqbaq4la5vjvo"); // const char *p = *p_ptr; UNSUPPORTED("77gsk1nkdba3ni503f93jkxhi"); // unsigned int range_start, range_end; UNSUPPORTED("d8twi4xwvpjc0n8mumv8b1ht6"); // if (p == pend) UNSUPPORTED("94ycrvh63vkb1re4zpw8hjmuq"); // return REG_ERANGE; UNSUPPORTED("9fsyho4e2hiebyqb8qkinfir7"); // /* Even though the pattern is a signed `char *', we need to fetch UNSUPPORTED("3pyxw5ydi3c4tot9rd8kfdojm"); // with unsigned char *'s; if the high bit of the pattern character UNSUPPORTED("4cd58zz07lkzfj8p5blv29zy6"); // is set, the range endpoints will be negative if we fetch using a UNSUPPORTED("5loab6k7g2in3add2emwojqiz"); // signed char *. UNSUPPORTED("ktiibovpw3rzck0paixyi46"); // We also want to fetch the endpoints without translating them; the UNSUPPORTED("44ikyyh3eyhoi57l6n4hpq24u"); // appropriate translation is done in the bit-setting loop below. */ UNSUPPORTED("234jza0nhkmiwh04ymakixz0n"); // /* The SVR4 compiler on the 3B2 had trouble with unsigned const char *. */ UNSUPPORTED("bakbcowbgzdyup9hjat04heth"); // range_start = ((const unsigned char *) p)[-2]; UNSUPPORTED("6thno4r8eqqdp5ffdk4l4xs3o"); // range_end = ((const unsigned char *) p)[0]; UNSUPPORTED("eyt8946jvpa0gtrnsnyalwh7j"); // /* Have to increment the pointer into the pattern string, so the UNSUPPORTED("3xddmz8ld8kco5vdujzs1mda5"); // caller isn't still at the ending character. */ UNSUPPORTED("3fa4923s6t6yycjm4mwp7vra6"); // (*p_ptr)++; UNSUPPORTED("deim4fwtozk7jqq58t4co6tpz"); // /* If the start is after the end, the range is empty. */ UNSUPPORTED("a8txh7awa0h63gqw46mc6cesc"); // if (range_start > range_end) UNSUPPORTED("4heoi1bxvv6q4nbsuw4o3n2up"); // return syntax & ((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) ? REG_ERANGE : REG_NOERROR; UNSUPPORTED("c04gtbipb7crea92dxobvfr2o"); // /* Here we see why `this_char' has to be larger than an `unsigned UNSUPPORTED("1ylkxbvyuwl7mimub9q6r3fad"); // char' -- the range is inclusive, so if `range_end' == 0xff UNSUPPORTED("1sabxy9r3dw93krw4s4a7jvs5"); // (assuming 8-bit characters), we would otherwise go into an infinite UNSUPPORTED("akcgy517agwm89djtay996rlu"); // loop, since all characters <= 0xff. */ UNSUPPORTED("8ascd4lg2uczakrabmoc2tbxc"); // for (this_char = range_start; this_char <= range_end; this_char++) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("96hzw7fz10m1eg84p3h8xw6md"); // (b[((unsigned char) ((translate ? (char) translate[(unsigned char) (this_char)] : (this_char)))) / 8] |= 1 << (((unsigned char) (translate ? (char) translate[(unsigned char) (this_char)] : (this_char))) % 8)); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("cwwrkrko9fc4redgkt1b13h6d"); // return REG_NOERROR; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2w5dx8i20qj29gqbasz6ieo34 // int re_compile_fastmap(struct re_pattern_buffer *bufp) public static Object re_compile_fastmap(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("bq6qjjl5z4ymj67dzg1sxznk"); // re_compile_fastmap(struct re_pattern_buffer *bufp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9e6bnowy6jfhnib5uev3scpsu"); // int j, k; UNSUPPORTED("5dndxq85ri0pdc1zsswjws66p"); // fail_stack_type fail_stack; UNSUPPORTED("5vwwchpo0x2nq1kweizvzpx7r"); // char *destination; UNSUPPORTED("4hjgjnhp72gq4oozv5vrn8v10"); // register char *fastmap = bufp->fastmap; UNSUPPORTED("1j52put1dns981rqf534qs3le"); // unsigned char *pattern = bufp->buffer; UNSUPPORTED("1jmcmh4kbvfcpijmdwn6jc3nj"); // unsigned char *p = pattern; UNSUPPORTED("b53ls4akw5mhgh7jwfepoi7vo"); // register unsigned char *pend = pattern + bufp->used; UNSUPPORTED("cs2p9nwy2lugscf16o02dzs8e"); // /* Assume that each path through the pattern can be null until UNSUPPORTED("9dmmpbml2ftmau9q3col8nnct"); // proven otherwise. We set this false at the bottom of switch UNSUPPORTED("b68s3vc4td13a333tqb4omf2a"); // statement, to which we get only if a particular path doesn't UNSUPPORTED("et7h2ks857zgdavpz3yc5qe44"); // match the empty string. */ UNSUPPORTED("51ynrqjxzi49qavh1cav2tkft"); // boolean path_can_be_null = 1; UNSUPPORTED("1gbvpj2yj85p505am5rilkj6r"); // /* We aren't doing a `succeed_n' to begin with. */ UNSUPPORTED("5xxc75r9op15sgdu02o4lgxav"); // boolean succeed_n_p = 0; UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("bbul77ox50tuvngn3t4agr5uo"); // do { fail_stack.stack = (fail_stack_elt_t *) alloca (5 * sizeof (fail_stack_elt_t)); if (fail_stack.stack == (void *)0) return -2; fail_stack.size = 5; fail_stack.avail = 0; } while (0); UNSUPPORTED("bzen69xwi5iake0fs9avj7zyk"); // bzero (fastmap, 1 << 8); /* Assume nothing's valid. */ UNSUPPORTED("5t1sb7m6db0rmhvndw9dbiev3"); // bufp->fastmap_accurate = 1; /* It will be when we're done. */ UNSUPPORTED("6jtlz1qyfqnlyp421hyq8of6x"); // bufp->can_be_null = 0; UNSUPPORTED("epinmskuv2cgr5ahv1yieh4wx"); // while (1) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("d9novosz5eiozbi3d0qtrp39a"); // if (p == pend || *p == succeed) UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { UNSUPPORTED("6kmea0xiqrfcm0nj8n7td2oex"); // /* We have reached the (effective) end of pattern. */ UNSUPPORTED("m3xwmrnky21zpg13i5rj47jr"); // if (!(fail_stack.avail == 0)) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("44fedf1x4d76z1qso6huhgzfg"); // bufp->can_be_null |= path_can_be_null; UNSUPPORTED("dr8ubpktswy9oks8vqmi0x94x"); // /* Reset for next path. */ UNSUPPORTED("cqqk40u5ykr4up1khyq0hdreu"); // path_can_be_null = 1; UNSUPPORTED("701062lrplwck0vemijk6tqcn"); // p = fail_stack.stack[--fail_stack.avail].pointer; UNSUPPORTED("9rd1yahrea8hsebjyzzz61sl3"); // continue; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("a9id4zq8rzlovc4blpl12mdrm"); // /* We should never be about to go beyond the end of the pattern. */ UNSUPPORTED("cf8srqrmhz47tb7zdgoe9ufhv"); // ; UNSUPPORTED("3d9jhchhw3lu8yajca4mi058b"); // switch (((re_opcode_t) *p++)) UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { UNSUPPORTED("6y2d5u8u0sy9seg0d2wbqhh5e"); // /* I guess the idea here is to simply not bother with a fastmap UNSUPPORTED("mj34lm9e61u2qvfpqzkhd5io"); // if a backreference is used, since it's too hard to figure out UNSUPPORTED("9citude1apedkbhbg4qz50zt8"); // the fastmap for the corresponding group. Setting UNSUPPORTED("a0ktcb92qa12q41u9ncckmzua"); // `can_be_null' stops `re_search_2' from using the fastmap, so UNSUPPORTED("4rjoi86n2xfyhdheaakalexzv"); // that is all we do. */ UNSUPPORTED("9zkejga7r0tbainhrb6zuw9os"); // case duplicate: UNSUPPORTED("crvpgpa1og37lio7o6tvycmsg"); // bufp->can_be_null = 1; UNSUPPORTED("7s6msojra17ajwq7l7wrmhhbx"); // goto done; UNSUPPORTED("cr9angfhvv1ykkzaoo7x91pyz"); // /* Following are the cases which match a character. These end UNSUPPORTED("5u9igxod775u9rmzhdtoj0uux"); // with `break'. */ UNSUPPORTED("cw984demptqbnja38a25p2xi1"); // case exactn: UNSUPPORTED("99pcdhcif67xm8lp80laisjza"); // fastmap[p[1]] = 1; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("2ro4nzmlhhrmitxu9446arhlo"); // case charset: UNSUPPORTED("d5oxjemm2desl63l2fbifejay"); // for (j = *p++ * 8 - 1; j >= 0; j--) UNSUPPORTED("34lg6n1mkddxpy07uf61o2pq1"); // if (p[j / 8] & (1 << (j % 8))) UNSUPPORTED("ac5wgoqadttw9m0eqkmq93vpu"); // fastmap[j] = 1; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("2zj0t91dpl66cu75cb0h2j1hu"); // case charset_not: UNSUPPORTED("cagpd8yl8h3c4v8e4gh3f0z2w"); // /* Chars beyond end of map must be allowed. */ UNSUPPORTED("7zzkrrvc3sqjxvhrr4s309imh"); // for (j = *p * 8; j < (1 << 8); j++) UNSUPPORTED("b1s3rgvbln9pwub90llybu41x"); // fastmap[j] = 1; UNSUPPORTED("d5oxjemm2desl63l2fbifejay"); // for (j = *p++ * 8 - 1; j >= 0; j--) UNSUPPORTED("a9l035zjjirwoyk53mqv16l5n"); // if (!(p[j / 8] & (1 << (j % 8)))) UNSUPPORTED("ac5wgoqadttw9m0eqkmq93vpu"); // fastmap[j] = 1; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("buxp1030z7swkjl42wovj9hxd"); // case wordchar: UNSUPPORTED("erc7fe209pzd8kqxh3h4huo03"); // for (j = 0; j < (1 << 8); j++) UNSUPPORTED("e6f90hjwdfaen2gl195u9sabh"); // if (re_syntax_table[j] == 1) UNSUPPORTED("ac5wgoqadttw9m0eqkmq93vpu"); // fastmap[j] = 1; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("7frlpnfuvuphd3bzoulwg4vsr"); // case notwordchar: UNSUPPORTED("erc7fe209pzd8kqxh3h4huo03"); // for (j = 0; j < (1 << 8); j++) UNSUPPORTED("d6si8hs1n9s2q5b16vyt9ka5x"); // if (re_syntax_table[j] != 1) UNSUPPORTED("ac5wgoqadttw9m0eqkmq93vpu"); // fastmap[j] = 1; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("1bv8e740f9rna5i036bo292wc"); // case anychar: UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("czlnu0hbyndj2sl7bud8algx4"); // int fastmap_newline = fastmap['\n']; UNSUPPORTED("2q6r1vdt5x04pt3p41rzto4yl"); // /* `.' matches anything ... */ UNSUPPORTED("5ftk445qjdfu62ddixb4p6q0i"); // for (j = 0; j < (1 << 8); j++) UNSUPPORTED("ac5wgoqadttw9m0eqkmq93vpu"); // fastmap[j] = 1; UNSUPPORTED("93vg14cvrax6ffdlubqre52zy"); // /* ... except perhaps newline. */ UNSUPPORTED("53qidfpnvywpfz8jbsitg0hk2"); // if (!(bufp->syntax & ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1))) UNSUPPORTED("9wuk4mwn83ls1g7lick6497yp"); // fastmap['\n'] = fastmap_newline; UNSUPPORTED("e47uuia66ybg7wem8m4h8zf1m"); // /* Return if we have already set `can_be_null'; if we have, UNSUPPORTED("5o7fl6yjw81x2g5sww79aih3s"); // then the fastmap is irrelevant. Something's wrong here. */ UNSUPPORTED("3750ces0c2deqeyn6w33ndhis"); // else if (bufp->can_be_null) UNSUPPORTED("380tmjmsc0f2y0m6vckz8g0ox"); // goto done; UNSUPPORTED("4nfkkkamxp2xfq2r2eg5c5880"); // /* Otherwise, have to check alternative paths. */ UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("anhhi3sf756j0lcm11sy9nyfc"); // case no_op: UNSUPPORTED("7zj5ggx1l6hln4ude6h5p4hgw"); // case begline: UNSUPPORTED("8pqai98vstdak51ot078dn1ut"); // case endline: UNSUPPORTED("889sq08u5lsi3c6y2z7adu8ex"); // case begbuf: UNSUPPORTED("cx4ezn3s02koh0pq7idm2xvxc"); // case endbuf: UNSUPPORTED("a8jtmsnmpa4937exo9nhopyyb"); // case wordbound: UNSUPPORTED("2jqqzr491mztwr9h8hvs55ja1"); // case notwordbound: UNSUPPORTED("991vlwoc47i8p67jyv2qapdhy"); // case wordbeg: UNSUPPORTED("65os7te2jc1i6uacyszvy5spd"); // case wordend: UNSUPPORTED("9446ac5zvkn7r9yqkh2brh10l"); // case push_dummy_failure: UNSUPPORTED("ci4p4wle87mwq773w72esmnae"); // continue; UNSUPPORTED("f41u8fntqiy246yy3btlg6w1v"); // case jump_n: UNSUPPORTED("6coluo8cd7scxlqwnbvt3jqs5"); // case pop_failure_jump: UNSUPPORTED("d7ziafib9p2sa0rqh34hv3hwj"); // case maybe_pop_jump: UNSUPPORTED("9a1qj2mhg3oh4ehsjpp4d81on"); // case jump: UNSUPPORTED("7ifq76or69643hqib3roiq9f4"); // case jump_past_alt: UNSUPPORTED("ejqzfph0mmtiqin1hmi981bzm"); // case dummy_failure_jump: UNSUPPORTED("ddwq2jxcrhkxhe1dqkaf3heul"); // do { do { (j) = *(p) & 0377; (j) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); UNSUPPORTED("3s98ctay3wrlwmgbs6jycommh"); // p += j; UNSUPPORTED("4aknhsfjvky2yxmkba43w40on"); // if (j > 0) UNSUPPORTED("6ux57x1tcbm5aung2xa8i26f1"); // continue; UNSUPPORTED("1gcc9mlki3vcqxqcamgw15psl"); // /* Jump backward implies we just went through the body of a UNSUPPORTED("dhbf21he6r14900wxjfhl23n8"); // loop and matched nothing. Opcode jumped to should be UNSUPPORTED("b1z48ihpqy8w68mtnyaogzkre"); // `on_failure_jump' or `succeed_n'. Just treat it like an UNSUPPORTED("8sudhkuaiqtvp0rzeztrzphwa"); // ordinary jump. For a * loop, it has pushed its failure UNSUPPORTED("14e2cgrthjy5xos3c84nxu3b8"); // point already; if so, discard that as redundant. */ UNSUPPORTED("eq8dnm5llhgszut0h62teamny"); // if ((re_opcode_t) *p != on_failure_jump UNSUPPORTED("8sbpd0r7b4u37kj9inzim8nty"); // && (re_opcode_t) *p != succeed_n) UNSUPPORTED("6ux57x1tcbm5aung2xa8i26f1"); // continue; UNSUPPORTED("4s6jr3tssbvzb5ee96md1ncoi"); // p++; UNSUPPORTED("ddwq2jxcrhkxhe1dqkaf3heul"); // do { do { (j) = *(p) & 0377; (j) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); UNSUPPORTED("3s98ctay3wrlwmgbs6jycommh"); // p += j; UNSUPPORTED("7s373wkpewfatxsumkd67pyu7"); // /* If what's on the stack is where we are now, pop it. */ UNSUPPORTED("80wyvh0vjsiujqym2stjdj4wh"); // if (!(fail_stack.avail == 0) UNSUPPORTED("a3ueg01xdmhuq0grmerpgbvbb"); // && fail_stack.stack[fail_stack.avail - 1].pointer == p) UNSUPPORTED("3s1nxe7g3rfik4tqx98en3cd8"); // fail_stack.avail--; UNSUPPORTED("ci4p4wle87mwq773w72esmnae"); // continue; UNSUPPORTED("992rmruvdtrxnk46307iiqyjo"); // case on_failure_jump: UNSUPPORTED("753el6ua6knou432p32d1kbcc"); // case on_failure_keep_string_jump: UNSUPPORTED("ceceofttw3ld7litzqabu648u"); // handle_on_failure_jump: UNSUPPORTED("665sufie9pj8i06aycoqewann"); // do { do { (j) = *(p) & 0377; (j) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); UNSUPPORTED("dc5yaeh41cb0brsq1pv7799eq"); // /* For some patterns, e.g., `(a?)?', `p+j' here points to the UNSUPPORTED("2t3hud6hrminx80odtyp1iwa7"); // end of the pattern. We don't want to push such a point, UNSUPPORTED("547mpa99j3jp91cc97q8bgppy"); // since when we restore it above, entering the switch will UNSUPPORTED("d41nubecflssie5s3le3qh9ij"); // increment `p' past the end of the pattern. We don't need UNSUPPORTED("2a6fei9v5xjokdzwz2ib426kh"); // to push such a point since we obviously won't find any more UNSUPPORTED("9kvyfd4vo7d8i4eapffyigb8w"); // fastmap entries beyond `pend'. Such a pattern can match UNSUPPORTED("921h84ug24r379ndj6u4ti857"); // the null string, though. */ UNSUPPORTED("a3exq030sp29tpsjuxvbncjka"); // if (p + j < pend) UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("6actr5ig2vfyitfzjmpn5gcvs"); // if (!(((fail_stack.avail == fail_stack.size) && !((fail_stack).size > (unsigned) (re_max_failures * (5 * 3 + 4)) ? 0 : ((fail_stack).stack = (fail_stack_elt_t *) (destination = (char *) alloca (((fail_stack).size << 1) * sizeof(fail_stack_elt_t)), bcopy ((fail_stack).stack, destination, (fail_stack).size * sizeof(fail_stack_elt_t)), destination), (fail_stack).stack == (void *)0 ? 0 : ((fail_stack).size <<= 1, 1)))) ? 0 : ((fail_stack).stack[(fail_stack).avail++].pointer = p + j, 1))) UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { UNSUPPORTED("9fy78dg2q1uu4c2t1zsyaestf"); // ; UNSUPPORTED("cyqv0odsj3l93ykpf16zgxlh5"); // return -2; UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("c0op0grmjt3kp22s10twqy66r"); // else UNSUPPORTED("crvpgpa1og37lio7o6tvycmsg"); // bufp->can_be_null = 1; UNSUPPORTED("3rb9irs4dl9mnesxjmb9f42vt"); // if (succeed_n_p) UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("vdcz3hf29s758qnvg2tdn3vc"); // do { do { (k) = *(p) & 0377; (k) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); /* Skip the n. */ UNSUPPORTED("501xoe7qse6xea1u7i29ck0mi"); // succeed_n_p = 0; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("bam1am28aekae7y6j816hx07n"); // continue; UNSUPPORTED("bdrmz6krrbsihqbsklz1j7d7a"); // case succeed_n: UNSUPPORTED("3gsxz3wc6v485diavavhdc980"); // /* Get to the number of times to succeed. */ UNSUPPORTED("8mazj3o2k4ts6oo83xpc0clf6"); // p += 2; UNSUPPORTED("8o2myd39fg1ragrtinpt906a8"); // /* Increment p past the n for when k != 0. */ UNSUPPORTED("4chyl5sa2aguucbi2603y1r7c"); // do { do { (k) = *(p) & 0377; (k) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); UNSUPPORTED("6zxjfjfmip0xaqdemcjjztblg"); // if (k == 0) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("b4wfmlrv6zbxvwrfouk2eo7kw"); // p -= 4; UNSUPPORTED("909biyv92rbqo3ayb2nd8yidv"); // succeed_n_p = 1; /* Spaghetti code alert. */ UNSUPPORTED("1ubpxbj2kbf7554qirpm1k0mw"); // goto handle_on_failure_jump; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("ci4p4wle87mwq773w72esmnae"); // continue; UNSUPPORTED("dmqxgjrlj5ddxj88dw919ujoj"); // case set_number_at: UNSUPPORTED("9stirsnvehglwumsosptm8ngk"); // p += 4; UNSUPPORTED("ci4p4wle87mwq773w72esmnae"); // continue; UNSUPPORTED("6c0ei34e676sv2kl1dxfzm5lm"); // case start_memory: UNSUPPORTED("3q89uw4g68y7kyiitvliyykpb"); // case stop_memory: UNSUPPORTED("8mazj3o2k4ts6oo83xpc0clf6"); // p += 2; UNSUPPORTED("ci4p4wle87mwq773w72esmnae"); // continue; UNSUPPORTED("comxch6w0lbi64ejq9m4p0u7o"); // default: UNSUPPORTED("55kbrxcqu6yyh19ldzw88t99r"); // abort (); /* We have listed all the cases. */ UNSUPPORTED("88ufjis6u0ijo8dyph0trsd9f"); // } /* switch *p++ */ UNSUPPORTED("cwq7qsz40n4bhj5dg5eym4pub"); // /* Getting here means we have found the possible starting UNSUPPORTED("9cuw6gsavq5jezett5z0kqhtr"); // characters for one path of the pattern -- and that the empty UNSUPPORTED("1nuw25jxiky0vsokzstwqjshg"); // string does not match. We need not follow this path further. UNSUPPORTED("ir1qnihuj9d2pchsx533wqak"); // Instead, look at the next alternative (remembered on the UNSUPPORTED("2yh8to75n640o6rt44ql2gpr1"); // stack), or quit if no more. The test at the top of the loop UNSUPPORTED("48eepx7kyfmje1rnq1bcr79sq"); // does these things. */ UNSUPPORTED("7b7dtwbvg82guicn1qbjlrm0i"); // path_can_be_null = 0; UNSUPPORTED("9iqvxxuyvmn0bkipb04jv1fp2"); // p = pend; UNSUPPORTED("8qk14yz36d7vk72ifwa7qiujq"); // } /* while p */ UNSUPPORTED("fe2n2uj632yqtenyvepbd4on"); // /* Set `can_be_null' for the last path (also the first path, if the UNSUPPORTED("eoc9k5utu0yxlarln062f7ebo"); // pattern is empty). */ UNSUPPORTED("3uys3oae24dxx6zj9f9r0b80z"); // bufp->can_be_null |= path_can_be_null; UNSUPPORTED("c1mu8v1bx1gc9xwu0pmd4wrmg"); // done: UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aql5ifimwt0liaidklmsf048e // void re_set_registers(struct re_pattern_buffer *bufp, struct re_registers *regs, unsigned num_regs, regoff_t *starts, regoff_t *ends) public static Object re_set_registers(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("4aeowny9csghzgfhys3rxd4bb"); // re_set_registers(struct re_pattern_buffer *bufp, UNSUPPORTED("v08al94r6tf851td77qv1lrw"); // struct re_registers *regs, UNSUPPORTED("cws3mkdihiuxfnp7ty29mle8p"); // unsigned num_regs, UNSUPPORTED("3bn37bfn6icqtacq0lj8zj9cg"); // regoff_t *starts, UNSUPPORTED("aqc83ygcz30vhx0fxtyw3a3gc"); // regoff_t *ends) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("d3ztzcne2cr4fi3m42q2opwfy"); // if (num_regs) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("9z36hkw7bkc2nch28htx6k0sp"); // bufp->regs_allocated = 1; UNSUPPORTED("atb5wuee0ohtv7w4cswzrtdfh"); // regs->num_regs = num_regs; UNSUPPORTED("6xqxd9992s4jjhafwdu58y4w3"); // regs->start = starts; UNSUPPORTED("1dplqbibwb9py7ly7iqtemaka"); // regs->end = ends; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("5err36958fxwo1a5uvi85wj9r"); // bufp->regs_allocated = 0; UNSUPPORTED("3jgm69kgp5moxxlzgyht3brgv"); // regs->num_regs = 0; UNSUPPORTED("1b975m061jnwz38mhlafj6a72"); // regs->start = regs->end = (regoff_t *) 0; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8wxth458oyuuwe1d7zeibvlq3 // int re_search(struct re_pattern_buffer *bufp, const char *string, int size, int startpos, int range, struct re_registers *regs) public static Object re_search(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("5punk3p7482f96e5oexdvqbus"); // re_search(struct re_pattern_buffer *bufp, UNSUPPORTED("bagvrj9iq4kkqcdgysmduv9t1"); // const char *string, UNSUPPORTED("1xy13yd3ws9kwbjft9qc97kcx"); // int size, UNSUPPORTED("9ohmanngcm89n339btr8asvfv"); // int startpos, UNSUPPORTED("23b7j6n4wp3b1b28bigxtgmnl"); // int range, UNSUPPORTED("erz9qq7ug4oj13nqxxy6jbbsy"); // struct re_registers *regs) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5eefi20lbvtfppz7qla7ovjwv"); // return re_search_2 (bufp, (void *)0, 0, string, size, startpos, range, UNSUPPORTED("et83rvt66i87q8ub41vrx6w5v"); // regs, size); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6aljedusbc3m5z49o0khre2m2 // int re_search_2(struct re_pattern_buffer *bufp, const char *string1, int size1, const char *string2, int size2, int startpos, int range, struct re_registers *regs, int stop) public static Object re_search_2(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("5usfyqpnmi7csbuxwbxofoyw7"); // re_search_2(struct re_pattern_buffer *bufp, UNSUPPORTED("74m54b0hvpnb34rks2y7z9363"); // const char *string1, UNSUPPORTED("8nls60axvgy7utfkk3mgzdwb2"); // int size1, UNSUPPORTED("1iaduxc33uthqae9ewpgmxil1"); // const char *string2, UNSUPPORTED("dqei6asi26pdc31aztct1a8je"); // int size2, UNSUPPORTED("3w9t84zdf75a4tulh53r5von1"); // int startpos, UNSUPPORTED("5u62quyw1qekgwt8o4pnjcc5l"); // int range, UNSUPPORTED("5f39e12vpxsielezt5ujbqvho"); // struct re_registers *regs, UNSUPPORTED("7bd44vcdrb5ytkbgi2jb4dl2s"); // int stop) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3z4qqbm5080y3sn2lfr6rs0nk"); // int val; UNSUPPORTED("4hjgjnhp72gq4oozv5vrn8v10"); // register char *fastmap = bufp->fastmap; UNSUPPORTED("e2n10ohqvssxiromz1ghi94lp"); // register char * translate = bufp->translate; UNSUPPORTED("iaij8d98sbsjgborym38smlw"); // int total_size = size1 + size2; UNSUPPORTED("cjv924qhstzo4k8fa23nn3y5t"); // int endpos = startpos + range; UNSUPPORTED("7etis36i9hk8smvitf2zjrk21"); // /* Check for out-of-range STARTPOS. */ UNSUPPORTED("dtj4vp5xpp6ux07kkppwzg5ao"); // if (startpos < 0 || startpos > total_size) UNSUPPORTED("f3a98gxettwtewduvje9y3524"); // return -1; UNSUPPORTED("abu2iwp6rjr8ppylnna5u9yqs"); // /* Fix up RANGE if it might eventually take us outside UNSUPPORTED("9hmt2lbj7vhejhpf2d95tq14f"); // the virtual concatenation of STRING1 and STRING2. UNSUPPORTED("d3ccdgft2wzndli7yy75yesc6"); // Make sure we won't move STARTPOS below 0 or above TOTAL_SIZE. */ UNSUPPORTED("7ynt8jnrj8clotz4nfyn2ysy9"); // if (endpos < 0) UNSUPPORTED("5ra97p6qdpo5phvpk9fwd2h3j"); // range = 0 - startpos; UNSUPPORTED("9w57i1mbsaq0ywxj3y6q7577v"); // else if (endpos > total_size) UNSUPPORTED("6boq6ulbdze7abapaemgg7svh"); // range = total_size - startpos; UNSUPPORTED("ds4p5oizcxuw4xycv8l0vcqdv"); // /* If the search isn't to be a backwards one, don't waste time in a UNSUPPORTED("djej1eoe004hvk7gffedre39u"); // search for a pattern that must be anchored. */ UNSUPPORTED("cvy0dazfbe38ki1z0hsl3dn1l"); // if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == begbuf && range > 0) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("bpeukjf6wgkfxtlskf398co2v"); // if (startpos > 0) UNSUPPORTED("1bjpmpr3p20x2b029ko5zgklx"); // return -1; UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else UNSUPPORTED("ad8lfo0w7g7423hbhmk3ljtia"); // range = 1; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("86solugecvztzl7zf0cnd6cvd"); // /* Update the fastmap now if not correct already. */ UNSUPPORTED("1d8z3kbyyw3rdl2mysjgwzxjl"); // if (fastmap && !bufp->fastmap_accurate) UNSUPPORTED("ckj45nonmakbapzpe7kn1d15x"); // if (re_compile_fastmap (bufp) == -2) UNSUPPORTED("kh5ykxeb4qomvs3j2wfbfj0v"); // return -2; UNSUPPORTED("78edqutsfw99a52tozy5vek1b"); // /* Loop through the string, looking for a place to start matching. */ UNSUPPORTED("3s761dh42eu37yg4q6j6rw0kx"); // for (;;) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("4sxzib864bpin10halp8eff8a"); // /* If a fastmap is supplied, skip quickly over characters that UNSUPPORTED("d5j6rsa3cqak3dmcpdugforyy"); // cannot be the start of a match. If the pattern can match the UNSUPPORTED("bwce0xep6mggs5v11uftrozcs"); // null string, however, we don't need to skip characters; we want UNSUPPORTED("12gdm8hdukh6bx7z396xe3zzf"); // the first null string. */ UNSUPPORTED("cj0pagb4mphhjuy0gimrygb50"); // if (fastmap && startpos < total_size && !bufp->can_be_null) UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { UNSUPPORTED("6ofes2gdk56aoc5qpr3f4zr4a"); // if (range > 0) /* Searching forwards. */ UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("67v7cteuwrvbevvug4l85mak"); // register const char *d; UNSUPPORTED("25rc040ywtpg6wfpwl19bnpyo"); // register int lim = 0; UNSUPPORTED("9qdwkju7e5sftfnsb8qapaizw"); // int irange = range; UNSUPPORTED("1wkzshwijxvvgs068kb4ducku"); // if (startpos < size1 && startpos + range >= size1) UNSUPPORTED("eiy4fhjr94xbrb2h7bvte577b"); // lim = range - (size1 - startpos); UNSUPPORTED("eu28a1ugba5e46l0ni4uhl4a"); // d = (startpos >= size1 ? string2 - size1 : string1) + startpos; UNSUPPORTED("cvmf6f97q523j1gxuc06p4zaw"); // /* Written out as an if-else to avoid testing `translate' UNSUPPORTED("42arvib5v1138qds1m4gq8ifq"); // inside the loop. */ UNSUPPORTED("c1esipwvnh5vdk2nuoqprrzy9"); // if (translate) UNSUPPORTED("99bsp1v6500gcigrncj819bmz"); // while (range > lim UNSUPPORTED("7dwf7n5ce54ua4203lrcvsgyi"); // && !fastmap[(unsigned char) UNSUPPORTED("7fd297npapod0yzvmotp0ad6j"); // translate[(unsigned char) *d++]]) UNSUPPORTED("ede1n2qkk5dq4dchoitn0ij36"); // range--; UNSUPPORTED("ex6jbb36b02x7vzl22fq0yh2l"); // else UNSUPPORTED("d6y3y331fli9a7o5dfc8fwn41"); // while (range > lim && !fastmap[(unsigned char) *d++]) UNSUPPORTED("ede1n2qkk5dq4dchoitn0ij36"); // range--; UNSUPPORTED("7ov5wkldv7ip6gr3qqe7r9fwz"); // startpos += irange - range; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("bvrbbagbquje7me47zpel7bq4"); // else /* Searching backwards. */ UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("84cdrx9bovy6vauwg0lqjqewy"); // register char c = (size1 == 0 || startpos >= size1 UNSUPPORTED("4e056gfwhytvjg4a7elynhkew"); // ? string2[startpos - size1] UNSUPPORTED("8xrw0w684a0sbx04150wtf94o"); // : string1[startpos]); UNSUPPORTED("37wt6pwingk4yq2cmuffily2s"); // if (!fastmap[(unsigned char) (translate ? (char) translate[(unsigned char) (c)] : (c))]) UNSUPPORTED("8vj5bzh7lvr4w2s7svhv0kgxc"); // goto advance; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("cgimbkjo920x6t1512vxlx8ko"); // /* If can't match the null string, and that's all we have left, fail. */ UNSUPPORTED("445mlipz9ii8giv4yb08sv90e"); // if (range >= 0 && startpos == total_size && fastmap UNSUPPORTED("10kowgvu386ep80mmzt22sc9v"); // && !bufp->can_be_null) UNSUPPORTED("1bjpmpr3p20x2b029ko5zgklx"); // return -1; UNSUPPORTED("5ry8yqv40slwqwx0mofc5x95i"); // val = re_match_2_internal (bufp, string1, size1, string2, size2, UNSUPPORTED("3cfs2qe5fkkt6t09tbm9q025r"); // startpos, regs, stop); UNSUPPORTED("2djilouwt96a4942a9xk0bq2j"); // if (val >= 0) UNSUPPORTED("4bosd0hhkhi65o9tz6w39sd4r"); // return startpos; UNSUPPORTED("7mnsrrb2kz0jaysx2jmdwxxhs"); // if (val == -2) UNSUPPORTED("9hr24f7mnlogxg6ehbtrhe9ys"); // return -2; UNSUPPORTED("5ztyn3js8nuvtozugmyim7k2"); // advance: UNSUPPORTED("48h8uf83j8j6i9dl6uwpnxoai"); // if (!range) UNSUPPORTED("d1pumbibe8xz2i7gr1wj6zdak"); // break; UNSUPPORTED("9qvrpsi6e30j6d028sbxm75m8"); // else if (range > 0) UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { UNSUPPORTED("9tfu9zglyv6ato7noi8by9cx7"); // range--; UNSUPPORTED("bpejet1xdfpyxq7gb5gygl6c6"); // startpos++; UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { UNSUPPORTED("c1l5bq4p029ozyiuq76a11c6c"); // range++; UNSUPPORTED("1fnqbyp4904zoq2u6a0h2xo1u"); // startpos--; UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("8azkpi8o0wzdufa90lw8hpt6q"); // return -1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cese97kukrkyoho0nl5aeefuf // int re_match(struct re_pattern_buffer *bufp, const char *string, int size, int pos, struct re_registers *regs) public static Object re_match(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("dv1reldaciy8oglpt3lvrj467"); // re_match(struct re_pattern_buffer *bufp, UNSUPPORTED("c9d38ul1z2b760kkkwbmup6aq"); // const char *string, UNSUPPORTED("8ax0ba4mtdwcwwg0ygxfl2hyx"); // int size, UNSUPPORTED("5wdd1vovm572huu99r72nr8kp"); // int pos, UNSUPPORTED("ly5zx6ikzskn7s3qibi5tipo"); // struct re_registers *regs) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f3va2gee7dhwlha1g39azqlfa"); // int result = re_match_2_internal (bufp, (void *)0, 0, string, size, UNSUPPORTED("ea7wwobss2bdmnj8fhllcq46k"); // pos, regs, size); UNSUPPORTED("e73y2609z2557xahrcvzmcb8e"); // return result; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4bis6vnixbumphbwvjkcy4c2n // int re_match_2(struct re_pattern_buffer *bufp, const char *string1, int size1, const char *string2, int size2, int pos, struct re_registers *regs, int stop) public static Object re_match_2(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("bo3qvsxgxy71pt7n5tjlfpl7q"); // re_match_2(struct re_pattern_buffer *bufp, UNSUPPORTED("8xwssdsckjeb1q0lmxlu07pk5"); // const char *string1, UNSUPPORTED("chena2gcw8p49mjvwjotj1ue5"); // int size1, UNSUPPORTED("7kll64nft07fqgencnx9f2u3h"); // const char *string2, UNSUPPORTED("12hpd55p7b671svle7njxpr6c"); // int size2, UNSUPPORTED("eyuz74k3yno3lawo6tmqeahqh"); // int pos, UNSUPPORTED("5du4j7mghegymbd75ui1ml4fw"); // struct re_registers *regs, UNSUPPORTED("2hcygji7llu5b02n114djuqj0"); // int stop) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a2u8v8zl4azq1kujf4s4cuii1"); // int result = re_match_2_internal (bufp, string1, size1, string2, size2, UNSUPPORTED("7l7rv6dwb5eaxilwku2m9z8we"); // pos, regs, stop); UNSUPPORTED("e73y2609z2557xahrcvzmcb8e"); // return result; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2xc3iz0d568vx4ken91tl6gyt // static int re_match_2_internal(struct re_pattern_buffer *bufp, const char *string1, int size1, const char *string2, int size2, int pos, struct re_registers *regs, int stop) public static Object re_match_2_internal(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("6pa1vmha3pyewzpq2e2wsz00n"); // re_match_2_internal(struct re_pattern_buffer *bufp, UNSUPPORTED("4itq0umd8n4zaefp01c54wxac"); // const char *string1, UNSUPPORTED("2da6uko1m9uyu226zvu3kgswo"); // int size1, UNSUPPORTED("62ljq7ee0r8hkx89qdr6zrcj1"); // const char *string2, UNSUPPORTED("eu49m9ze4ikwzobpj8jmx8zjf"); // int size2, UNSUPPORTED("fsoirv97r4lbqxpez1e1kh6l"); // int pos, UNSUPPORTED("5das77r3z9spuajdb6a5zoqcg"); // struct re_registers *regs, UNSUPPORTED("9byy70s4d1i719ix6yy7okfe0"); // int stop) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("n8hlkyr29gxgnkj4x75w0pbu"); // /* General temporaries. */ UNSUPPORTED("5rwd4tuvikkbfw1s56awbwtbe"); // int mcnt; UNSUPPORTED("7ijkchsbw8xrlcbwdzkzy7sg5"); // unsigned char *p1; UNSUPPORTED("6wjea7744xso80td4x9ur7whp"); // /* Just past the end of the corresponding string. */ UNSUPPORTED("1fqaa6ix61rs3yld0danksdzt"); // const char *end1, *end2; UNSUPPORTED("4qjvhq2dmvddcpe2sq02ul57e"); // /* Pointers into string1 and string2, just past the last characters in UNSUPPORTED("e2o1kagsjdr4x6alq0db0ex6"); // each to consider matching. */ UNSUPPORTED("3lcnzq2ymn1yaonefakdi2gf9"); // const char *end_match_1, *end_match_2; UNSUPPORTED("2x1qwx7dh9vq9oyh9l2ffuhki"); // /* Where we are in the data, and the end of the current string. */ UNSUPPORTED("44aamau4r9tm9tp5eks2hjeeg"); // const char *d, *dend; UNSUPPORTED("1v5unbhjqcfvkvfh3bwyzig4m"); // /* Where we are in the pattern, and the end of the pattern. */ UNSUPPORTED("7juswz68hsy9xygg4vwwp1dk4"); // unsigned char *p = bufp->buffer; UNSUPPORTED("egc1gcrry7bqm2rmed1tbm4p7"); // register unsigned char *pend = p + bufp->used; UNSUPPORTED("e8rkyc240i479ffdjn5bis1o6"); // /* Mark the opcode just after a start_memory, so we can test for an UNSUPPORTED("asrb0rht6g8nqkxfrpbqqwhji"); // empty subpattern when we get to the stop_memory. */ UNSUPPORTED("1xod1essveohmbzqsm3chxtaa"); // unsigned char *just_past_start_mem = 0; UNSUPPORTED("5cqk44skhero82pev2rwsxqod"); // /* We use this to map every character in the string. */ UNSUPPORTED("b6qhkmvrybk31a74eyxl9sf73"); // char * translate = bufp->translate; UNSUPPORTED("clib1bwajaiu950opbz65380n"); // /* Failure point stack. Each place that can handle a failure further UNSUPPORTED("3lyfugbo3isunzbvdm5i0o4cj"); // down the line pushes a failure point on this stack. It consists of UNSUPPORTED("1w6peyhoigpqgnv3qujk00vnp"); // restart, regend, and reg_info for all registers corresponding to UNSUPPORTED("8qdk2kexk0h3w8v82dc1gi8fc"); // the subexpressions we're currently inside, plus the number of such UNSUPPORTED("c464idhhkc8aqmfjb0s7zn2jq"); // registers, and, finally, two char *'s. The first char * is where UNSUPPORTED("d39bcwihp0jxqnlaq775160n0"); // to resume scanning the pattern; the second one is where to resume UNSUPPORTED("bt7bl5ufgmqudglf331090q99"); // scanning the strings. If the latter is zero, the failure point is UNSUPPORTED("dxhf42bpkithht6k5midiilvm"); // a ``dummy''; if a failure happens and the failure point is a dummy, UNSUPPORTED("7k01qsxjsxh1mzfj3zkxymge4"); // it gets discarded and the next next one is tried. */ UNSUPPORTED("5dndxq85ri0pdc1zsswjws66p"); // fail_stack_type fail_stack; UNSUPPORTED("3ussoc6j234lhv666usd1ujlb"); // /* We fill all the registers internally, independent of what we UNSUPPORTED("7hukvye8ngqw8xf4c86mq7ksb"); // return, for use in backreferences. The number here includes UNSUPPORTED("800kciibxx8zzy7gqlip12chx"); // an element for register zero. */ UNSUPPORTED("9te8xao6v2wvrtemmbarxo8r7"); // size_t num_regs = bufp->re_nsub + 1; UNSUPPORTED("69fqftzbp36nb88gj0hyzt7n5"); // /* The currently active registers. */ UNSUPPORTED("210a4lsg6g1jyyakcj1y0z9co"); // active_reg_t lowest_active_reg = ((1 << 8) + 1); UNSUPPORTED("cav7rdafkpj7lnazs9bzo4f01"); // active_reg_t highest_active_reg = (1 << 8); UNSUPPORTED("9lffam35cw7ao19j9sq1na2kz"); // /* Information on the contents of registers. These are pointers into UNSUPPORTED("ezs9s06ouogq0bo54g0m18dwg"); // the input strings; they record just what was matched (on this UNSUPPORTED("cnjuuaptdt6ott2ct87p0obeb"); // attempt) by a subexpression part of the pattern, that is, the UNSUPPORTED("74e8guuvf2ep3sm5wuwk3pvak"); // regnum-th regstart pointer points to where in the pattern we began UNSUPPORTED("3bvo1nxt2ti5kli33880w0y4f"); // matching and the regnum-th regend points to right after where we UNSUPPORTED("btmswfvhn3ofbmow8ypu5e13p"); // stopped matching the regnum-th subexpression. (The zeroth register UNSUPPORTED("1kngd0q79bcbooydkquebsoaf"); // keeps track of what the whole pattern matches.) */ UNSUPPORTED("3bagrvj67tgg2hcld2oq7uq12"); // const char **regstart, **regend; UNSUPPORTED("cj6z5o1u5gz9fj1ldc50421nu"); // /* If a group that's operated upon by a repetition operator fails to UNSUPPORTED("9h8hefhboxbyq3lbhmtfl4dbe"); // match anything, then the register for its start will need to be UNSUPPORTED("269993sksx5a7dxx2skmjmuv0"); // restored because it will have been set to wherever in the string we UNSUPPORTED("8sl9yewrsty5lu2b0b5210k4l"); // are when we last see its open-group operator. Similarly for a UNSUPPORTED("64mro6c1shytou2fsehv14t6e"); // register's end. */ UNSUPPORTED("dzseh4slrayug3iyhvd08tt7k"); // const char **old_regstart, **old_regend; UNSUPPORTED("60rk8kklgq8pft794dlh37glr"); // /* The is_active field of reg_info helps us keep track of which (possibly UNSUPPORTED("bavzn3th9ptlj1baje3pfbu2r"); // nested) subexpressions we are currently in. The matched_something UNSUPPORTED("3wklpcvgm1mxc3ncudzv3u7er"); // field of reg_info[reg_num] helps us tell whether or not we have UNSUPPORTED("9owj5d6jjiwrr65xe8b66ynmg"); // matched any of the pattern so far this time through the reg_num-th UNSUPPORTED("5o4rfc4vl6f2f4i6gl8zb2c12"); // subexpression. These two fields get reset each time through any UNSUPPORTED("jainf18l355wvb9svfolzfyu"); // loop their register is in. */ UNSUPPORTED("cldhi92ebvv3qkzk7hcp1acpx"); // register_info_type *reg_info; UNSUPPORTED("3tm9df4zwjcbf5wzasl5vbo41"); // /* The following record the register info as found in the above UNSUPPORTED("62fw4aryj1l9mpyzofxartoaf"); // variables when we find a match better than any we've seen before. UNSUPPORTED("3yswh3sslq5jxfw5qiqyposlu"); // This happens as we backtrack through the failure points, which in UNSUPPORTED("7fwl7a78gtt9lpholdubg8h20"); // turn happens only if we have not yet matched the entire string. */ UNSUPPORTED("bv3kpg4ykugxqsd55m9yhp5af"); // unsigned best_regs_set = 0; UNSUPPORTED("boct5aaty3lmh8421fbwe811s"); // const char **best_regstart, **best_regend; UNSUPPORTED("4rxhejgld2fxwm1gablnrag3j"); // /* Logically, this is `best_regend[0]'. But we don't want to have to UNSUPPORTED("7qi1q2tujh3qj95sucmglupqv"); // allocate space for that if we're not allocating space for anything UNSUPPORTED("awo7q2rkwc6jlfdsam4my1k84"); // else (see below). Also, we never need info about register 0 for UNSUPPORTED("2f9d4yn8chlunlz3lckbg2mw0"); // any of the other register vectors, and it seems rather a kludge to UNSUPPORTED("dixl88kjwfhphwh4xmk51px61"); // treat `best_regend' differently than the rest. So we keep track of UNSUPPORTED("lthy8n6i428ea9wqx66x5syo"); // the end of the best match so far in a separate variable. We UNSUPPORTED("1g3sl9fbv6pwfi9bysp5k62i"); // initialize this to NULL so that when we backtrack the first time UNSUPPORTED("ek5k7ui0tsvl05jargwtlh04g"); // and need to test it, it's not garbage. */ UNSUPPORTED("274v72hhp6qzltud0qx3natuw"); // const char *match_end = (void *)0; UNSUPPORTED("ce5dox5nl3mnb89gapdwnz2co"); // /* This helps SET_REGS_MATCHED avoid doing redundant work. */ UNSUPPORTED("7rtu9eogaexvklmhbd0nvi8rq"); // int set_regs_matched_done = 0; UNSUPPORTED("6f52yhx59atis4v6w50r78tpr"); // /* Used when we pop values we don't care about. */ UNSUPPORTED("cuer8lfpvninqja7rr37wv7vr"); // const char **reg_dummy; UNSUPPORTED("1tfv2eq96tkv3dnxi9htt3ogy"); // register_info_type *reg_info_dummy; UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("bbul77ox50tuvngn3t4agr5uo"); // do { fail_stack.stack = (fail_stack_elt_t *) alloca (5 * sizeof (fail_stack_elt_t)); if (fail_stack.stack == (void *)0) return -2; fail_stack.size = 5; fail_stack.avail = 0; } while (0); UNSUPPORTED("f2odxckhb2j0jb0skzptkj1li"); // /* Do not bother to initialize all the register variables if there are UNSUPPORTED("7rdujqxkgmrsifkkjc8uc4uf8"); // no groups in the pattern, as it takes a fair amount of time. If UNSUPPORTED("a8btab3qm6qk1ruzu54espdbw"); // there are groups, we include space for register 0 (the whole UNSUPPORTED("2fkpn3ylgs86igj0rin9q175c"); // pattern), even though we never use it, since it simplifies the UNSUPPORTED("a82pq8o4xe5vl6izykmrmv80p"); // array indexing. We should fix this. */ UNSUPPORTED("3b6nyivy298vtrccdf2yz5zfy"); // if (bufp->re_nsub) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("3s4x1dwphpxvwftzx6myntwof"); // regstart = ((const char * *) alloca ((num_regs) * sizeof (const char *))); UNSUPPORTED("2q4zpv4cg2m1hlu19z7n20v0i"); // regend = ((const char * *) alloca ((num_regs) * sizeof (const char *))); UNSUPPORTED("dncg8rhgtq841coamkzozn70f"); // old_regstart = ((const char * *) alloca ((num_regs) * sizeof (const char *))); UNSUPPORTED("dyvpshht388f50j2qsprkqq31"); // old_regend = ((const char * *) alloca ((num_regs) * sizeof (const char *))); UNSUPPORTED("dprck6oszi2zdnvn8ranbm5ax"); // best_regstart = ((const char * *) alloca ((num_regs) * sizeof (const char *))); UNSUPPORTED("3dm3mock6ighuyjpbnckimggr"); // best_regend = ((const char * *) alloca ((num_regs) * sizeof (const char *))); UNSUPPORTED("5732hglv8omqh0obbstzw9ovr"); // reg_info = ((register_info_type *) alloca ((num_regs) * sizeof (register_info_type))); UNSUPPORTED("4itgi9p0hm10q9gc8ligcmjw9"); // reg_dummy = ((const char * *) alloca ((num_regs) * sizeof (const char *))); UNSUPPORTED("2w784gfhj47yvqr5bkl3rnvb1"); // reg_info_dummy = ((register_info_type *) alloca ((num_regs) * sizeof (register_info_type))); UNSUPPORTED("bknt92c4iiz2fki0ya4b4zu9l"); // if (!(regstart && regend && old_regstart && old_regend && reg_info UNSUPPORTED("bvpk762fja9xad61rr2ecsbun"); // && best_regstart && best_regend && reg_dummy && reg_info_dummy)) UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { UNSUPPORTED("8f1nfq1jn2ejt7ub9midgshrh"); // do { ; if ((void*) regstart) ((void)0); (void*) regstart = (void *)0; if ((void*) regend) ((void)0); (void*) regend = (void *)0; if ((void*) old_regstart) ((void)0); (void*) old_regstart = (void *)0; if ((void*) old_regend) ((void)0); (void*) old_regend = (void *)0; if ((void*) best_regstart) ((void)0); (void*) best_regstart = (void *)0; if ((void*) best_regend) ((void)0); (void*) best_regend = (void *)0; if ((void*) reg_info) ((void)0); (void*) reg_info = (void *)0; if ((void*) reg_dummy) ((void)0); (void*) reg_dummy = (void *)0; if ((void*) reg_info_dummy) ((void)0); (void*) reg_info_dummy = (void *)0; } while (0); UNSUPPORTED("7ivse5do9752etnc6lpwep4id"); // return -2; UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("9hkjvu3lvnwrjs0wre7judo3c"); // /* We must initialize all our variables to NULL, so that UNSUPPORTED("45j98q6y8yuy75ls6dsgx1k64"); // `FREE_VARIABLES' doesn't try to free them. */ UNSUPPORTED("2lkorxvitynsptmav1g59ixmb"); // regstart = regend = old_regstart = old_regend = best_regstart UNSUPPORTED("bzn1un5rdvzm7al9b58svbna4"); // = best_regend = reg_dummy = (void *)0; UNSUPPORTED("d9o9396ai0y6hfmg0mj1ebkq3"); // reg_info = reg_info_dummy = (register_info_type *) (void *)0; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("8w78v1mfbuuwhx2hypx8jcldw"); // /* The starting position is bogus. */ UNSUPPORTED("a4wmr8zj9xfpfbqugg1rwnak2"); // if (pos < 0 || pos > size1 + size2) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("7sq147wjkuyi93ra9jbzwkvbf"); // do { ; if ((void*) regstart) ((void)0); (void*) regstart = (void *)0; if ((void*) regend) ((void)0); (void*) regend = (void *)0; if ((void*) old_regstart) ((void)0); (void*) old_regstart = (void *)0; if ((void*) old_regend) ((void)0); (void*) old_regend = (void *)0; if ((void*) best_regstart) ((void)0); (void*) best_regstart = (void *)0; if ((void*) best_regend) ((void)0); (void*) best_regend = (void *)0; if ((void*) reg_info) ((void)0); (void*) reg_info = (void *)0; if ((void*) reg_dummy) ((void)0); (void*) reg_dummy = (void *)0; if ((void*) reg_info_dummy) ((void)0); (void*) reg_info_dummy = (void *)0; } while (0); UNSUPPORTED("62ko03w39aomt1h9y758mag0k"); // return -1; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("cqf83jwvi6ehnlngujy4qchdu"); // /* Initialize subexpression text positions to -1 to mark ones that no UNSUPPORTED("57srgq1s42r2qebxntv9z4v5k"); // start_memory/stop_memory has been seen for. Also initialize the UNSUPPORTED("1ow37crla9qcqw19bbyb805t9"); // register information struct. */ UNSUPPORTED("9ydw7k6i7j7x2k6zngd59rojt"); // for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("2kyhfd6kl7ms8bwg1wlvfqwap"); // regstart[mcnt] = regend[mcnt] UNSUPPORTED("2kl8ke0fnk9nauyk9zokcxkoj"); // = old_regstart[mcnt] = old_regend[mcnt] = (®_unset_dummy); UNSUPPORTED("91q00i6munm3i7qie7rj8jfei"); // ((reg_info[mcnt]).bits.match_null_string_p) = 3; UNSUPPORTED("afk8kaqsmcxqe0q6zubefocrn"); // ((reg_info[mcnt]).bits.is_active) = 0; UNSUPPORTED("df366kaag3ynqzmm60vrmh0vx"); // ((reg_info[mcnt]).bits.matched_something) = 0; UNSUPPORTED("5mtz90agac60yikyx4k2p0tcy"); // ((reg_info[mcnt]).bits.ever_matched_something) = 0; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("j5sjexwvtormmkwlvyyw0j3m"); // /* We move `string1' into `string2' if the latter's empty -- but not if UNSUPPORTED("22snitog4zamx1t4ccq83m95r"); // `string1' is null. */ UNSUPPORTED("e5i3kugt3ww6rnm9voflfgawq"); // if (size2 == 0 && string1 != (void *)0) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("e42qfjjyl84hogtxnpbthj5rz"); // string2 = string1; UNSUPPORTED("crben3jjw8pci91x5lvrk4w8q"); // size2 = size1; UNSUPPORTED("f01lcid5mzfewcivqnd332urs"); // string1 = 0; UNSUPPORTED("5c8judheb0ofzkgdnwqnml8z0"); // size1 = 0; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("e172015pwzssq7c0vo2tq5aq1"); // end1 = string1 + size1; UNSUPPORTED("4m5wyc9k9qkl4sfiwwyvvla1h"); // end2 = string2 + size2; UNSUPPORTED("92k1xad7xyoitcixjggddz2xx"); // /* Compute where to stop matching, within the two strings. */ UNSUPPORTED("6gdkxgosf1sannyt40j9kmngq"); // if (stop <= size1) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("6cypxpgmpeoi6emdah5s9k61u"); // end_match_1 = string1 + stop; UNSUPPORTED("14iyugw7zeo04abwg6k9mz77r"); // end_match_2 = string2; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("ubox1xzc7tf43rh7nzqo0y2w"); // end_match_1 = end1; UNSUPPORTED("g15ad7lvemt1j3tfd3b2wy5n"); // end_match_2 = string2 + stop - size1; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("b72xjrsh15ceq6n0mp9o3dr3b"); // /* `p' scans through the pattern as `d' scans through the data. UNSUPPORTED("ee8kj3n0j7z3zgw3x29pr4iwg"); // `dend' is the end of the input string that `d' points within. `d' UNSUPPORTED("9ht9fo2bvlr07alij7ev6sc64"); // is advanced into the following input string whenever necessary, but UNSUPPORTED("delvy2rsoiwhe79dztx86nhlo"); // this happens before fetching; therefore, at the beginning of the UNSUPPORTED("4fil0e4w6u5hnt1i6cgmhslcj"); // loop, `d' can be pointing at the end of a string, but it cannot UNSUPPORTED("3m773nmhi0vb3kvwhk5zj1fvx"); // equal `string2'. */ UNSUPPORTED("1sztmr22bzx9qg638iuxf0qcf"); // if (size1 > 0 && pos <= size1) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("effnp1jm0qoqpcub7rcliiklk"); // d = string1 + pos; UNSUPPORTED("a3z31vmcwv4izh4gaf0zzu63f"); // dend = end_match_1; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("a6h3karx5gb77i5icjwtr70s"); // d = string2 + pos - size1; UNSUPPORTED("2mh3yoyin5cy0p7onls0cxs88"); // dend = end_match_2; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; UNSUPPORTED("99zhv2pwx2q8a48j197pw6xt4"); // /* This loops over pattern commands. It exits by returning from the UNSUPPORTED("7e60h1pt63bigon94i6v0grl5"); // function if the match is complete, or it drops through if the match UNSUPPORTED("b3n3kmzfara10ikrekjiv0woz"); // fails at this starting point in the input data. */ UNSUPPORTED("3s761dh42eu37yg4q6j6rw0kx"); // for (;;) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("cf8srqrmhz47tb7zdgoe9ufhv"); // ; UNSUPPORTED("coqe9flw9y84q7eb1xt2wxm8v"); // if (p == pend) UNSUPPORTED("a41002aq4p23pyz97pvq70zys"); // { /* End of pattern means we might have succeeded. */ UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("c3on5mrar07ygte8kqbl2hntc"); // /* If we haven't matched the entire string, and we want the UNSUPPORTED("apgoqswuwqwo0jdc88f1g6zjk"); // longest match, try backtracking. */ UNSUPPORTED("6quev9lqtkd3rm2zf8o08q0d4"); // if (d != end_match_2) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("84ttk9zo6qwdugyag6bsfijsa"); // /* 1 if this match ends in the same string (string1 or string2) UNSUPPORTED("3d7aa3i6sz2b5v1rdku8mfkve"); // as the best previous match. */ UNSUPPORTED("99rxk6hqfc6820y8brqyzr1ix"); // boolean same_str_p = ((size1 && string1 <= (match_end) && (match_end) <= string1 + size1) UNSUPPORTED("5h23tai9w26g9uu3555t1s2ko"); // == (dend == end_match_1)); UNSUPPORTED("a9j7f142ppbm4bfda6vllbzkt"); // /* 1 if this match is the best seen so far. */ UNSUPPORTED("7ssv33yt0mo7z7naegb53acst"); // boolean best_match_p; UNSUPPORTED("406ocol9hh6qa1tg01aqw4fm4"); // /* AIX compiler got confused when this was combined UNSUPPORTED("doec2mp5fgho754yj67fiufk6"); // with the previous declaration. */ UNSUPPORTED("3olytwmx4gzy8yajx9lv0w470"); // if (same_str_p) UNSUPPORTED("b8puesm16uljvnmkyguxlpjz2"); // best_match_p = d > match_end; UNSUPPORTED("ex6jbb36b02x7vzl22fq0yh2l"); // else UNSUPPORTED("8g5axzy7uh94mclmd8107jt4r"); // best_match_p = !(dend == end_match_1); UNSUPPORTED("e4kt1tmmevqvy3cbyk6xnznck"); // ; UNSUPPORTED("61g695v6madw50govi0fpaymy"); // if (!(fail_stack.avail == 0)) UNSUPPORTED("c5mtgdtcl0w9vn5m7roo5mclf"); // { /* More failure points to try. */ UNSUPPORTED("6k0fj673itx4y90om89cfw4au"); // /* If exceeds best match so far, save it. */ UNSUPPORTED("8lvy2hc2kk7wk0osmu4kt3b46"); // if (!best_regs_set || best_match_p) UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { UNSUPPORTED("c1z8tnsgrw2hio3750gukv093"); // best_regs_set = 1; UNSUPPORTED("6cvml1s44f1rz7ut1p9732o24"); // match_end = d; UNSUPPORTED("a6r7lto035pp3gvk1bdixang2"); // ; UNSUPPORTED("5lgbvvnv5vugg8j3y9jm7tmto"); // for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++) UNSUPPORTED("1fi5w21ki1vo1jwyr4xwgm27n"); // { UNSUPPORTED("36h25f46gwl1bjkvlv2hi12al"); // best_regstart[mcnt] = regstart[mcnt]; UNSUPPORTED("38u63aln2507yexeleac5i5f6"); // best_regend[mcnt] = regend[mcnt]; UNSUPPORTED("bf03xtomlwkahoqno8ua4cbpc"); // } UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } UNSUPPORTED("3cl1in74qmmbb26vs4qw3mcuv"); // goto fail; UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("9608e8vynn7blihqg1sa5x6hm"); // /* If no failure points, don't restore garbage. And if UNSUPPORTED("cvm5ogwjizby9vpz4bh4t4kmf"); // last match is real best match, don't restore second UNSUPPORTED("5019dps6elcptg07efvg8ytlp"); // best one. */ UNSUPPORTED("31h7b1f1py5xliuo37yr49j0e"); // else if (best_regs_set && !best_match_p) UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { UNSUPPORTED("51sj2rq6npgedmtb80qyu24n8"); // restore_best_regs: UNSUPPORTED("eassx3c83qc4vxc85c75b9qjl"); // /* Restore best match. It may happen that `dend == UNSUPPORTED("5pm2irkm5dt0s4qwuwz8u3q1h"); // end_match_1' while the restored d is in string2. UNSUPPORTED("bc82mepahwmg9x3r4zc1uhtn2"); // For example, the pattern `x.*y.*z' against the UNSUPPORTED("dux3vuywslng2dhkfnnw5vg60"); // strings `x-' and `y-z-', if the two strings are UNSUPPORTED("8xrw6nr4f038b5khvfblfbvnn"); // not consecutive in memory. */ UNSUPPORTED("c6tldeu5ffnykyfto7hi9ixau"); // ; UNSUPPORTED("20z1s97l71qromoe39rg38hm2"); // d = match_end; UNSUPPORTED("3ue7lk6sdffqfud3cceri8m8b"); // dend = ((d >= string1 && d <= end1) UNSUPPORTED("67n43dsreslafvliflcrjntcd"); // ? end_match_1 : end_match_2); UNSUPPORTED("7f2q0145iwgp8w2wsim63zj7m"); // for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++) UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { UNSUPPORTED("f2o08vllkyap6mdqirtbkpmpk"); // regstart[mcnt] = best_regstart[mcnt]; UNSUPPORTED("3pqb99yerpeb7fyy71o36q7nc"); // regend[mcnt] = best_regend[mcnt]; UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("7qpxyrpi9p8bv5o56myo9c2dh"); // } /* d != end_match_2 */ UNSUPPORTED("eo36u7f29du5zdvcxohew6ccd"); // succeed_label: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("ch5rhljwem9e6yq0bvid9b9dj"); // /* If caller wants register contents data back, do it. */ UNSUPPORTED("1yp4u3stmh22ubjzoa5psbbuy"); // if (regs && !bufp->no_sub) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("3kol441pj0oa248vzhp3vv7ls"); // /* Have the register data arrays been allocated? */ UNSUPPORTED("1gzi6m8z4rjss7i9b9wcz0nhw"); // if (bufp->regs_allocated == 0) UNSUPPORTED("bfr9pjr2qri3sxl2k6brn5xer"); // { /* No. So allocate them with malloc. We need one UNSUPPORTED("eo5lmm6txjqzwpnc51q2rr86p"); // extra element beyond `num_regs' for the `-1' marker UNSUPPORTED("1qr602sxafqljujgz9tt6qcf9"); // GNU code uses. */ UNSUPPORTED("w1tdx38yyrw1sowe6ghaj2nk"); // regs->num_regs = ((30) > (num_regs + 1) ? (30) : (num_regs + 1)); UNSUPPORTED("be8i44ggcohl9z9hz4rhqk56n"); // regs->start = ((regoff_t *) malloc ((regs->num_regs) * sizeof (regoff_t))); UNSUPPORTED("cyfi6zngbv1dslzcl7x1sr152"); // regs->end = ((regoff_t *) malloc ((regs->num_regs) * sizeof (regoff_t))); UNSUPPORTED("cxow73omypjzg053jt8epepo8"); // if (regs->start == (void *)0 || regs->end == (void *)0) UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { UNSUPPORTED("eb9qndp4gf1s242vxc2lh5maj"); // do { ; if ((void*) regstart) ((void)0); (void*) regstart = (void *)0; if ((void*) regend) ((void)0); (void*) regend = (void *)0; if ((void*) old_regstart) ((void)0); (void*) old_regstart = (void *)0; if ((void*) old_regend) ((void)0); (void*) old_regend = (void *)0; if ((void*) best_regstart) ((void)0); (void*) best_regstart = (void *)0; if ((void*) best_regend) ((void)0); (void*) best_regend = (void *)0; if ((void*) reg_info) ((void)0); (void*) reg_info = (void *)0; if ((void*) reg_dummy) ((void)0); (void*) reg_dummy = (void *)0; if ((void*) reg_info_dummy) ((void)0); (void*) reg_info_dummy = (void *)0; } while (0); UNSUPPORTED("dqq88wul2lqxsx8tregfubikv"); // return -2; UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } UNSUPPORTED("i0ztbbhawtrpj2duc3ya6kdq"); // bufp->regs_allocated = 1; UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("6c4alibipwc6an6jcy479a3m"); // else if (bufp->regs_allocated == 1) UNSUPPORTED("73h0ws2srjiuc9g7nvfsil3p7"); // { /* Yes. If we need more elements than were already UNSUPPORTED("3k4931vs4niesagz1oxg57nbg"); // allocated, reallocate them. If we need fewer, just UNSUPPORTED("e6dbjm0iyzngr68xmg81z2z0m"); // leave it alone. */ UNSUPPORTED("djowzzvskdbwjag9m9fnha4jh"); // if (regs->num_regs < num_regs + 1) UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { UNSUPPORTED("9xesw41tb2u8ao5widm29kiyp"); // regs->num_regs = num_regs + 1; UNSUPPORTED("87dmzxu9te8vokzvs3irtuxov"); // ((regs->start) = (regoff_t *) realloc (regs->start, (regs->num_regs) * sizeof (regoff_t))); UNSUPPORTED("6e6qfl2iibo9mkatufr410gra"); // ((regs->end) = (regoff_t *) realloc (regs->end, (regs->num_regs) * sizeof (regoff_t))); UNSUPPORTED("1vrn0xsco7imnquwgs11osuf6"); // if (regs->start == (void *)0 || regs->end == (void *)0) UNSUPPORTED("1fi5w21ki1vo1jwyr4xwgm27n"); // { UNSUPPORTED("93c8iop6pb7zwgnohfyvit0s"); // do { ; if ((void*) regstart) ((void)0); (void*) regstart = (void *)0; if ((void*) regend) ((void)0); (void*) regend = (void *)0; if ((void*) old_regstart) ((void)0); (void*) old_regstart = (void *)0; if ((void*) old_regend) ((void)0); (void*) old_regend = (void *)0; if ((void*) best_regstart) ((void)0); (void*) best_regstart = (void *)0; if ((void*) best_regend) ((void)0); (void*) best_regend = (void *)0; if ((void*) reg_info) ((void)0); (void*) reg_info = (void *)0; if ((void*) reg_dummy) ((void)0); (void*) reg_dummy = (void *)0; if ((void*) reg_info_dummy) ((void)0); (void*) reg_info_dummy = (void *)0; } while (0); UNSUPPORTED("7l01rs860ssm9kixuhgx9hdbq"); // return -2; UNSUPPORTED("bf03xtomlwkahoqno8ua4cbpc"); // } UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("ex6jbb36b02x7vzl22fq0yh2l"); // else UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { UNSUPPORTED("3fvt2dndjzd64gdhzxvql5d8b"); // /* These braces fend off a "empty body in an else-statement" UNSUPPORTED("2luomnvf5pqa41oaxy8f8r9or"); // warning under GCC when assert expands to nothing. */ UNSUPPORTED("c6tldeu5ffnykyfto7hi9ixau"); // ; UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("87z47ijxyqp3enbpawsz2ln6c"); // /* Convert the pointer data in `regstart' and `regend' to UNSUPPORTED("2au9uvntej9ho5mvvkamw1j5w"); // indices. Register zero has to be set differently, UNSUPPORTED("7hnlk3p3u0dhyz803a3lfbxnj"); // since we haven't kept track of any info for it. */ UNSUPPORTED("35mb19qsz9130m513vyoka7y0"); // if (regs->num_regs > 0) UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { UNSUPPORTED("9009sy5tyjmheeqydo5wo4kwq"); // regs->start[0] = pos; UNSUPPORTED("edxcovxefspqos0b0zuq6z7ha"); // regs->end[0] = ((dend == end_match_1) UNSUPPORTED("99qit228aypztxnllw89nwokv"); // ? ((regoff_t) (d - string1)) UNSUPPORTED("4aa9l4flk3x9zqpcce1dwt1ta"); // : ((regoff_t) (d - string2 + size1))); UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("egg8arm7ozeve9mx29jgkz7bs"); // /* Go through the first `min (num_regs, regs->num_regs)' UNSUPPORTED("9c1fouoack9c0oqkqs0d1tbyn"); // registers, since that is all we initialized. */ UNSUPPORTED("76y0zjrbtva0kjq7q5c1wths1"); // for (mcnt = 1; (unsigned) mcnt < ((num_regs) < (regs->num_regs) ? (num_regs) : (regs->num_regs)); UNSUPPORTED("1eh3h1x9wgjp35deszyvz3o6e"); // mcnt++) UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { UNSUPPORTED("b0l8ghi3p5kmv8ns6tw59wvuu"); // if (((regstart[mcnt]) == (®_unset_dummy)) || ((regend[mcnt]) == (®_unset_dummy))) UNSUPPORTED("nmubntmt76n8354k37ekf09c"); // regs->start[mcnt] = regs->end[mcnt] = -1; UNSUPPORTED("ecas48ylhxx9t2hquqr1nnwzj"); // else UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { UNSUPPORTED("elvx8lxakvbaqd1oax9ecwh6w"); // regs->start[mcnt] UNSUPPORTED("2ftoc2pu10jb5p4scmxq2z1j2"); // = (regoff_t) ((size1 && string1 <= (regstart[mcnt]) && (regstart[mcnt]) <= string1 + size1) ? ((regoff_t) ((regstart[mcnt]) - string1)) : ((regoff_t) ((regstart[mcnt]) - string2 + size1))); UNSUPPORTED("eblc8kac69cvh0xmx81t3z7qw"); // regs->end[mcnt] UNSUPPORTED("7lahjjs9zz1e6q38t501ceam8"); // = (regoff_t) ((size1 && string1 <= (regend[mcnt]) && (regend[mcnt]) <= string1 + size1) ? ((regoff_t) ((regend[mcnt]) - string1)) : ((regoff_t) ((regend[mcnt]) - string2 + size1))); UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("dud4yeckicq4pijwz9m705cmx"); // /* If the regs structure we return has more elements than UNSUPPORTED("dg2liz6izarfhgllr7c0lvfzx"); // were in the pattern, set the extra elements to -1. If UNSUPPORTED("bgul1odz2k47e5yo08ifpsxux"); // we (re)allocated the registers, this is the case, UNSUPPORTED("8pq9l6jwi4wy8aly679isfqnx"); // because we always allocate enough to have at least one UNSUPPORTED("ccbog2f5misacunpi5lovnpm0"); // -1 at the end. */ UNSUPPORTED("3rm0qbtrqgfau6g7gecmhdspm"); // for (mcnt = num_regs; (unsigned) mcnt < regs->num_regs; mcnt++) UNSUPPORTED("129q7ylakhk2gu6j7p4jpz372"); // regs->start[mcnt] = regs->end[mcnt] = -1; UNSUPPORTED("93qdoi4cltvsoa26wtattpcrj"); // } /* regs && !bufp->no_sub */ UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("4wc9t8vouh3w18pod77gkuoaz"); // mcnt = d - pos - ((dend == end_match_1) UNSUPPORTED("48tr2aou1bn895ggwv1qgo056"); // ? string1 UNSUPPORTED("e9wr9ptogadx1o3labo85tlgf"); // : string2 - size1); UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("8f1nfq1jn2ejt7ub9midgshrh"); // do { ; if ((void*) regstart) ((void)0); (void*) regstart = (void *)0; if ((void*) regend) ((void)0); (void*) regend = (void *)0; if ((void*) old_regstart) ((void)0); (void*) old_regstart = (void *)0; if ((void*) old_regend) ((void)0); (void*) old_regend = (void *)0; if ((void*) best_regstart) ((void)0); (void*) best_regstart = (void *)0; if ((void*) best_regend) ((void)0); (void*) best_regend = (void *)0; if ((void*) reg_info) ((void)0); (void*) reg_info = (void *)0; if ((void*) reg_dummy) ((void)0); (void*) reg_dummy = (void *)0; if ((void*) reg_info_dummy) ((void)0); (void*) reg_info_dummy = (void *)0; } while (0); UNSUPPORTED("c0a9sr78bshk0e2ijyxlzxg7h"); // return mcnt; UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("b0kkxy3zkf3f430688gewaj4w"); // /* Otherwise match next pattern command. */ UNSUPPORTED("3d9jhchhw3lu8yajca4mi058b"); // switch (((re_opcode_t) *p++)) UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { UNSUPPORTED("1cr7m9kscv8emiq2bhdx0l21"); // /* Ignore these. Used to ignore the n of succeed_n's which UNSUPPORTED("4p7fiu2s102akmzhjtzxqkrdi"); // currently have n == 0. */ UNSUPPORTED("anhhi3sf756j0lcm11sy9nyfc"); // case no_op: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("8xm4dpngfjaadz6e2suqjuja7"); // case succeed: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("97sc3afg030x5rva8s655k37e"); // goto succeed_label; UNSUPPORTED("bsqnanqt8sp33wb2pm6xt6ulq"); // /* Match the next n pattern characters exactly. The following UNSUPPORTED("4hpiyumzwmrkzpbtwhyro0nin"); // byte in the pattern defines n, and the n bytes after that UNSUPPORTED("126jkfju6a6kncm4twhsy8b50"); // are the characters to match. */ UNSUPPORTED("cw984demptqbnja38a25p2xi1"); // case exactn: UNSUPPORTED("e299xchgd28m8kehs3yk4j0m0"); // mcnt = *p++; UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("bh28o7qdz7h0u89in1fxom93a"); // /* This is written out as an if-else so we don't waste time UNSUPPORTED("87zph5xuncm4m58n4ggl0buj8"); // testing `translate' inside the loop. */ UNSUPPORTED("7jj6ay2afdj7lpspqsgwusj6m"); // if (translate) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("af97jdpx3vxfjkevna4yd8iu3"); // do UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { UNSUPPORTED("664ue5cxfdx7fkvvgla8dw3ko"); // while (d == dend) { if (dend == end_match_2) goto fail; d = string2; dend = end_match_2; }; UNSUPPORTED("4nbfd88egqevnftfub4el1t0p"); // if ((unsigned char) translate[(unsigned char) *d++] UNSUPPORTED("c44weohee2ybnj7w12bc184r0"); // != (unsigned char) *p++) UNSUPPORTED("bkcykqhkoe9lpop9i2qgzu9yp"); // goto fail; UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("74t2bggypeoowelqm6xtisx30"); // while (--mcnt); UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("af97jdpx3vxfjkevna4yd8iu3"); // do UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { UNSUPPORTED("664ue5cxfdx7fkvvgla8dw3ko"); // while (d == dend) { if (dend == end_match_2) goto fail; d = string2; dend = end_match_2; }; UNSUPPORTED("aozx58qal2txvazcjwrwyio1g"); // if (*d++ != (char) *p++) goto fail; UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("74t2bggypeoowelqm6xtisx30"); // while (--mcnt); UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("2o2dzkzmcvnlj1d5ychre7cqo"); // do { if (!set_regs_matched_done) { active_reg_t r; set_regs_matched_done = 1; for (r = lowest_active_reg; r <= highest_active_reg; r++) { ((reg_info[r]).bits.matched_something) = ((reg_info[r]).bits.ever_matched_something) = 1; } } } while (0); UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("7tks8jmj7cqrcj4nyqm3djfno"); // /* Match any character except possibly a newline or a null. */ UNSUPPORTED("1bv8e740f9rna5i036bo292wc"); // case anychar: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("6l2kf5tzbvscsr8vy2bos6ng7"); // while (d == dend) { if (dend == end_match_2) goto fail; d = string2; dend = end_match_2; }; UNSUPPORTED("avzqzqv7s0tr2npgctz1b2ana"); // if ((!(bufp->syntax & ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (translate ? (char) translate[(unsigned char) (*d)] : (*d)) == '\n') UNSUPPORTED("83t3ma7nbx7fiz0zawdo05ob2"); // || (bufp->syntax & (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) && (translate ? (char) translate[(unsigned char) (*d)] : (*d)) == '\000')) UNSUPPORTED("etjodgz127fwk1r4166wqxg7n"); // goto fail; UNSUPPORTED("2o2dzkzmcvnlj1d5ychre7cqo"); // do { if (!set_regs_matched_done) { active_reg_t r; set_regs_matched_done = 1; for (r = lowest_active_reg; r <= highest_active_reg; r++) { ((reg_info[r]).bits.matched_something) = ((reg_info[r]).bits.ever_matched_something) = 1; } } } while (0); UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("p26x5fh4zcf5ddyi146lh558"); // d++; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("2ro4nzmlhhrmitxu9446arhlo"); // case charset: UNSUPPORTED("2zj0t91dpl66cu75cb0h2j1hu"); // case charset_not: UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("8n4s0kz2yj50t5rvnitti5hyl"); // register unsigned char c; UNSUPPORTED("deppcas7zridwg11cevwayois"); // boolean not = (re_opcode_t) *(p - 1) == charset_not; UNSUPPORTED("6mnx06fa3p4n9bhd9htqjy0il"); // ; UNSUPPORTED("6mf4c0e1oxwfped5hh8u7fz2n"); // while (d == dend) { if (dend == end_match_2) goto fail; d = string2; dend = end_match_2; }; UNSUPPORTED("9aaydk7f3la99u6jfo9kyxp5i"); // c = (translate ? (char) translate[(unsigned char) (*d)] : (*d)); /* The character to match. */ UNSUPPORTED("cc3v2ndt3kmkt0r26mvu8ftfi"); // /* Cast to `unsigned' instead of `unsigned char' in case the UNSUPPORTED("2szsk231obr0m7gvx69h0jje"); // bit list is a full 32 bytes long. */ UNSUPPORTED("2bmmfw3dqxl0rnfrjgzxlk2gw"); // if (c < (unsigned) (*p * 8) UNSUPPORTED("721an1atvtz1g2jzxegur68o9"); // && p[1 + c / 8] & (1 << (c % 8))) UNSUPPORTED("16fenxsijr0vmtxzyb8psvofo"); // not = !not; UNSUPPORTED("9pg86i2witmji2iwfc6jhm9j8"); // p += 1 + *p; UNSUPPORTED("6rkrjn87jai9lq2d129w2h7g8"); // if (!not) goto fail; UNSUPPORTED("632iqprva0k4cq9az0mwgy0ua"); // do { if (!set_regs_matched_done) { active_reg_t r; set_regs_matched_done = 1; for (r = lowest_active_reg; r <= highest_active_reg; r++) { ((reg_info[r]).bits.matched_something) = ((reg_info[r]).bits.ever_matched_something) = 1; } } } while (0); UNSUPPORTED("2ddfcenepkfjkw5qk64bs5pjs"); // d++; UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("ax93bd9x56qib5q0g9wvm2qcy"); // /* The beginning of a group is represented by start_memory. UNSUPPORTED("e38f63tkhbflv1p396hknxdwy"); // The arguments are the register number in the next byte, and the UNSUPPORTED("c64u5xem18b4mqy79877eqfcs"); // number of groups inner to this one in the next. The text UNSUPPORTED("dbdk515uk79zg5hip4kru378u"); // matched within the group is recorded (in the internal UNSUPPORTED("8j4ek9641uur5fxjgkizkb06i"); // registers data structure) under the register number. */ UNSUPPORTED("6c0ei34e676sv2kl1dxfzm5lm"); // case start_memory: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("dus38gizylomi1jon9xa9a9gi"); // /* Find out if this group can match the empty string. */ UNSUPPORTED("1e0kjdjtknuzgjuge4nu2rvvv"); // p1 = p; /* To send to group_match_null_string_p. */ UNSUPPORTED("1lvbl8fbh2kfnyp76ial3wyge"); // if (((reg_info[*p]).bits.match_null_string_p) == 3) UNSUPPORTED("1yvuh3ye9g4wks9vy2jwlla11"); // ((reg_info[*p]).bits.match_null_string_p) UNSUPPORTED("crq9r37sdaimjd51v7rr5rifz"); // = group_match_null_string_p (&p1, pend, reg_info); UNSUPPORTED("ea7tbs2n5vp5hwe31r9ym79d1"); // /* Save the position in the string where we were the last time UNSUPPORTED("b64kvidnxk3y1txigfo1pl99t"); // we were at this open-group operator in case the group is UNSUPPORTED("6w4zb5o8illk23kubyigl5wig"); // operated upon by a repetition operator, e.g., with `(a*)*b' UNSUPPORTED("9d7meouvzhwtqek5lj1q19d3n"); // against `ab'; then we want to ignore where we are now in UNSUPPORTED("elzx65ahdc47yfgprdxj1sjl1"); // the string in case this attempt to match fails. */ UNSUPPORTED("1qsu4c7bkuq3vofwjjijw1e3k"); // old_regstart[*p] = ((reg_info[*p]).bits.match_null_string_p) UNSUPPORTED("6fd5qfd27ra7djj22yvjcis5j"); // ? ((regstart[*p]) == (®_unset_dummy)) ? d : regstart[*p] UNSUPPORTED("eg76mx8hl74su6aktlwej5s9l"); // : regstart[*p]; UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("837i1cwpv2l0eyw1m5ly72e5q"); // regstart[*p] = d; UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("1pjvhqen01q14gt1u2ipmfn78"); // ((reg_info[*p]).bits.is_active) = 1; UNSUPPORTED("7yf870aytlplqgsdoktbv23o8"); // ((reg_info[*p]).bits.matched_something) = 0; UNSUPPORTED("5qe9dgngpf1z0x2gaouwzuh33"); // /* Clear this whenever we change the register activity status. */ UNSUPPORTED("dckkxudermmywleu21wcsh6wk"); // set_regs_matched_done = 0; UNSUPPORTED("4v5t4lf3m98srbm2dhq6otf2z"); // /* This is the new highest active register. */ UNSUPPORTED("3z1903inbnuh0u7jl2xrmgjwy"); // highest_active_reg = *p; UNSUPPORTED("c5um95y8m6g52hnhowkayvp2f"); // /* If nothing was active before, this is the new lowest active UNSUPPORTED("33rqqd71rbnr2br416p5pko3h"); // register. */ UNSUPPORTED("bbhu9dtas1n5xtephxw36fi5o"); // if (lowest_active_reg == ((1 << 8) + 1)) UNSUPPORTED("2zewvmpnwbg7dwzrf032pngut"); // lowest_active_reg = *p; UNSUPPORTED("247xejwk6ewf4ot2xglm0foep"); // /* Move past the register number and inner group count. */ UNSUPPORTED("8mazj3o2k4ts6oo83xpc0clf6"); // p += 2; UNSUPPORTED("9h673b93wmz9abfvqdehryv9v"); // just_past_start_mem = p; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("958t8ufjo5g39llb7x2vk8gey"); // /* The stop_memory opcode represents the end of a group. Its UNSUPPORTED("3diz7dyrj8z41hkn0gv0u90nj"); // arguments are the same as start_memory's: the register UNSUPPORTED("ancmrtd12048bir4um1a42lk2"); // number, and the number of inner groups. */ UNSUPPORTED("3q89uw4g68y7kyiitvliyykpb"); // case stop_memory: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("6myxkco5k76etfo4hu8yr5wbc"); // /* We need to save the string position the last time we were at UNSUPPORTED("79ss3fgfp7q2srolhcfv565wc"); // this close-group operator in case the group is operated UNSUPPORTED("4g7o1h1hqyb3ed7o7xoukat2e"); // upon by a repetition operator, e.g., with `((a*)*(b*)*)*' UNSUPPORTED("7ya5jxfxzzwl6gbtsm5gp06kq"); // against `aba'; then we want to ignore where we are now in UNSUPPORTED("elzx65ahdc47yfgprdxj1sjl1"); // the string in case this attempt to match fails. */ UNSUPPORTED("6tbn6td0l64kefdcsz4l5v4aq"); // old_regend[*p] = ((reg_info[*p]).bits.match_null_string_p) UNSUPPORTED("6ei747c3h9zuuwuuoeuutcbvc"); // ? ((regend[*p]) == (®_unset_dummy)) ? d : regend[*p] UNSUPPORTED("8mmdpk59qqy95iwnf47y5p6dl"); // : regend[*p]; UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("1g18yrcifqxtxpfho7si6eeta"); // regend[*p] = d; UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("7vycocnhdpq8h26dxroqf6qv3"); // /* This register isn't active anymore. */ UNSUPPORTED("7ntazk8yalx2z9fbvgnqmgjyj"); // ((reg_info[*p]).bits.is_active) = 0; UNSUPPORTED("5qe9dgngpf1z0x2gaouwzuh33"); // /* Clear this whenever we change the register activity status. */ UNSUPPORTED("dckkxudermmywleu21wcsh6wk"); // set_regs_matched_done = 0; UNSUPPORTED("42clmiwrmzlsyiozfpc5z4nc9"); // /* If this was the only register active, nothing is active UNSUPPORTED("1ujxcs2n921afe94v57lwlhbh"); // anymore. */ UNSUPPORTED("63r84tgp0e98zrp5vtjft0j7v"); // if (lowest_active_reg == highest_active_reg) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("8kmp96mmwzp28qyx61vh0flaz"); // lowest_active_reg = ((1 << 8) + 1); UNSUPPORTED("7x2sqxkjont50piw66yo0dtpp"); // highest_active_reg = (1 << 8); UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else UNSUPPORTED("c1jewz2a8ue76qm3v9zzr62p2"); // { /* We must scan for the new highest active register, since UNSUPPORTED("decsayupwmti5a04jbhouqvoo"); // it isn't necessarily one less than now: consider UNSUPPORTED("2xmzbvq25xm2umlpe67f0xxcl"); // (a(b)c(d(e)f)g). When group 3 ends, after the f), the UNSUPPORTED("epks85v9quym7a8m6zf2fqi3"); // new highest active register is 1. */ UNSUPPORTED("2txbhcyz9wjvsf90upkqlpnc2"); // unsigned char r = *p - 1; UNSUPPORTED("5734gbg5fpueutgkx1nymooqp"); // while (r > 0 && !((reg_info[r]).bits.is_active)) UNSUPPORTED("bdia7d21cgyoa54eec4z33p89"); // r--; UNSUPPORTED("8n4iy0kw6ecl8rffe6zhoim7f"); // /* If we end up at register zero, that means that we saved UNSUPPORTED("euyoh0d7li8ww59zhb7bcmwss"); // the registers as the result of an `on_failure_jump', not UNSUPPORTED("9b4zvqn8u6k8s7opuitogjuop"); // a `start_memory', and we jumped to past the innermost UNSUPPORTED("2qdslp2g91aru02gnj2jzfngo"); // `stop_memory'. For example, in ((.)*) we save UNSUPPORTED("c49yz0o5hen5lvybntd5j2fns"); // registers 1 and 2 as a result of the *, but when we pop UNSUPPORTED("eqfql6meyzhinquampkweqzy6"); // back to the second ), we are at the stop_memory 1. UNSUPPORTED("3y5zlgk5fpwzvouq2l6ssxmd1"); // Thus, nothing is active. */ UNSUPPORTED("34eseuqzde8opwrs60ycvdlou"); // if (r == 0) UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { UNSUPPORTED("6sxj2komvl2u668mxzv7uw1bk"); // lowest_active_reg = ((1 << 8) + 1); UNSUPPORTED("4wvntivmvrdiicobd01fuopc1"); // highest_active_reg = (1 << 8); UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("ex6jbb36b02x7vzl22fq0yh2l"); // else UNSUPPORTED("2gpimcvwuqcsn5m8kxgtrur9s"); // highest_active_reg = r; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("6tnujp0ji1y0x3qf7nnoewlwi"); // /* If just failed to match something this time around with a UNSUPPORTED("c2a0wegxd9akp346q7kd756xk"); // group that's operated on by a repetition operator, try to UNSUPPORTED("5sojth3d9jro95jciohpo41gv"); // force exit from the ``loop'', and restore the register UNSUPPORTED("6y1gydjqgpmctcds7f5sg7r7a"); // information for this group that we had before trying this UNSUPPORTED("7k609wk6ordqikf4gj9wim2mb"); // last match. */ UNSUPPORTED("drsdlw7kcvkqlu9vl2ekb5pva"); // if ((!((reg_info[*p]).bits.matched_something) UNSUPPORTED("djhystklzfwsz99ch5tg2mdul"); // || just_past_start_mem == p - 1) UNSUPPORTED("73puidl4bjed2y05glwuha2tr"); // && (p + 2) < pend) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("5bmgzdh5rp0tqqvuep6upitw5"); // boolean is_a_jump_n = 0; UNSUPPORTED("6i6e11jwv13din36enbo5swaa"); // p1 = p + 2; UNSUPPORTED("wr9bhelppzmwslf6sw3zxs9m"); // mcnt = 0; UNSUPPORTED("8y47wte4d9uar38b22v7dqq3g"); // switch ((re_opcode_t) *p1++) UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { UNSUPPORTED("bok1esp1zekmbuklmyk3rk5rx"); // case jump_n: UNSUPPORTED("38gwuf75sc2x4fup5mqsis4x6"); // is_a_jump_n = 1; UNSUPPORTED("a8ugqe6z5croeioatypl4otaw"); // case pop_failure_jump: UNSUPPORTED("75n3w229uzeshyir5i61r1043"); // case maybe_pop_jump: UNSUPPORTED("6l3m2qx4riktyve4e2l0wh9fe"); // case jump: UNSUPPORTED("dnliw06x9ef4nef4vszyc6y2o"); // case dummy_failure_jump: UNSUPPORTED("4sq4b65a0bh8lf919g64pqica"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); UNSUPPORTED("c286v7bq7t229rlti3rgsn6i4"); // if (is_a_jump_n) UNSUPPORTED("70d9iq4l9znncby73z47xsgqd"); // p1 += 2; UNSUPPORTED("1fg4xctmq8acy7m0oob45guaz"); // break; UNSUPPORTED("cyzkq50b2b248lxpi6lj66jqs"); // default: UNSUPPORTED("2oxjzlotqn0ba3akkxgs9h02q"); // /* do nothing */ ; UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("8yasklhrgy6q7ca1rahwnp80l"); // p1 += mcnt; UNSUPPORTED("efql51mwt6tl2tkzt0wc69svs"); // /* If the next operation is a jump backwards in the pattern UNSUPPORTED("b1jwyhb9r9kdtn75700ivpm08"); // to an on_failure_jump right before the start_memory UNSUPPORTED("32ioduqtcldpe0p955ukfx3zq"); // corresponding to this stop_memory, exit from the loop UNSUPPORTED("7u1pbravuknawsh6n44eiljij"); // by forcing a failure after pushing on the stack the UNSUPPORTED("1rtxd5d0unekapkzuv0h8bfs9"); // on_failure_jump's jump in the pattern, and d. */ UNSUPPORTED("49ilcm43sqxuhnrflxjzpkyrz"); // if (mcnt < 0 && (re_opcode_t) *p1 == on_failure_jump UNSUPPORTED("bbntf9gewbymuo5dr9q61l4ad"); // && (re_opcode_t) p1[3] == start_memory && p1[4] == *p) UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { UNSUPPORTED("82lu6y87gmwdhb71nwh4nyhlo"); // /* If this group ever matched anything, then restore UNSUPPORTED("2hafp02wsznqsqyi5m15pval5"); // what its registers were before trying this last UNSUPPORTED("d7lxjfsfhmoewr3xbgu83ccq6"); // failed match, e.g., with `(a*)*b' against `ab' for UNSUPPORTED("2a1hjbfps60tel0gx3rexgyr7"); // regstart[1], and, e.g., with `((a*)*(b*)*)*' UNSUPPORTED("c9ye99yclkdsse5qxjva6xyqv"); // against `aba' for regend[3]. UNSUPPORTED("dwcg6me58csfjm6h83aoldo1o"); // Also restore the registers for inner groups for, UNSUPPORTED("ainjqejclhkthdqm7hwkfddil"); // e.g., `((a*)(b*))*' against `aba' (register 3 would UNSUPPORTED("8je91go3933r1lpui4r55qp19"); // otherwise get trashed). */ UNSUPPORTED("1eohn7q2w1elvkijli82m25w4"); // if (((reg_info[*p]).bits.ever_matched_something)) UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { UNSUPPORTED("bah7hcsvx8y54udzheryy1hzy"); // unsigned r; UNSUPPORTED("8akg97mqbnr924ugno750b17t"); // ((reg_info[*p]).bits.ever_matched_something) = 0; UNSUPPORTED("7m9djhctqynaualhx1nqdnjc0"); // /* Restore this and inner groups' (if any) registers. */ UNSUPPORTED("7js4crblmtp6bs951tlz5pibu"); // for (r = *p; r < (unsigned) *p + (unsigned) *(p + 1); UNSUPPORTED("41t6k9ezn45tjk4rj4o95hvw7"); // r++) UNSUPPORTED("1fi5w21ki1vo1jwyr4xwgm27n"); // { UNSUPPORTED("89r32r5193oexr1uoui24rp55"); // regstart[r] = old_regstart[r]; UNSUPPORTED("ie5lviszvuyotv6i5dfa0pe5"); // /* xx why this test? */ UNSUPPORTED("caayksps71ouk9rtbgpk336bb"); // if (old_regend[r] >= regstart[r]) UNSUPPORTED("13lqnupq8b5xodzv3xff3oze1"); // regend[r] = old_regend[r]; UNSUPPORTED("bf03xtomlwkahoqno8ua4cbpc"); // } UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } UNSUPPORTED("3aju47l7l855mt7l00l7xg11q"); // p1++; UNSUPPORTED("4sq4b65a0bh8lf919g64pqica"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); UNSUPPORTED("a9p5b9oxka3gxpe3wgzvhfj4b"); // do { char *destination; s_reg_t this_reg; ; ; ; ; ; ; ; while (((fail_stack).size - (fail_stack).avail) < (((0 ? 0 : highest_active_reg - lowest_active_reg + 1) * 3) + 4)) { if (!((fail_stack).size > (unsigned) (re_max_failures * (5 * 3 + 4)) ? 0 : ((fail_stack).stack = (fail_stack_elt_t *) (destination = (char *) alloca (((fail_stack).size << 1) * sizeof(fail_stack_elt_t)), bcopy ((fail_stack).stack, destination, (fail_stack).size * sizeof(fail_stack_elt_t)), destination), (fail_stack).stack == (void *)0 ? 0 : ((fail_stack).size <<= 1, 1)))) return -2; ; ; } ; if (1) for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; this_reg++) { ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regstart[this_reg]); ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regend[this_reg]); ; ; ; ; ; ; fail_stack.stack[fail_stack.avail++] = (reg_info[this_reg].word); } ; fail_stack.stack[fail_stack.avail++].integer = (lowest_active_reg); ; fail_stack.stack[fail_stack.avail++].integer = (highest_active_reg); ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (p1 + mcnt); ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (d); ; ; } while (0); UNSUPPORTED("3cl1in74qmmbb26vs4qw3mcuv"); // goto fail; UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("2wofa1c2dglau2ufwmcabib0n"); // /* Move past the register number and the inner group count. */ UNSUPPORTED("8mazj3o2k4ts6oo83xpc0clf6"); // p += 2; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("7ckwgnb7aasatvtyteljdqc2k"); // /* \ has been turned into a `duplicate' command which is UNSUPPORTED("dmy8z2x1ttnsvz6kx6l9j4rtv"); // followed by the numeric value of as the register number. */ UNSUPPORTED("9zkejga7r0tbainhrb6zuw9os"); // case duplicate: UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("27u228yvq9k655bp1tq40v02i"); // register const char *d2, *dend2; UNSUPPORTED("bq38n54ifn0fjxun9mtdpyxkj"); // int regno = *p++; /* Get which register to match against. */ UNSUPPORTED("6mnx06fa3p4n9bhd9htqjy0il"); // ; UNSUPPORTED("91m4oa28hi3m5f5icw5pumfab"); // /* Can't back reference a group which we've never matched. */ UNSUPPORTED("9r6debcfgkrh9r4029g0p2tsz"); // if (((regstart[regno]) == (®_unset_dummy)) || ((regend[regno]) == (®_unset_dummy))) UNSUPPORTED("1k6xdu198jqq8v2oj3209y50s"); // goto fail; UNSUPPORTED("dng36k157gcr0rr6l2hysesr7"); // /* Where in input to try to start matching. */ UNSUPPORTED("209civ9l0k19m94b62pp4080r"); // d2 = regstart[regno]; UNSUPPORTED("eexsdzuwnhjynwkc8g0u6hnwm"); // /* Where to stop matching; if both the place to start and UNSUPPORTED("bup7nhzrolgesclm7ac7j3pke"); // the place to stop matching are in the same string, then UNSUPPORTED("8kg60w180bvkgrv4dgbrd491u"); // set to the place to stop, otherwise, for now have to use UNSUPPORTED("9tumayloc0nncf60m1sfzkjhl"); // the end of the first string. */ UNSUPPORTED("9dfy4gfwxkdnc83mqwy6mg4hw"); // dend2 = (((size1 && string1 <= (regstart[regno]) && (regstart[regno]) <= string1 + size1) UNSUPPORTED("c0t5y6icuv24moevxaqu2h4zx"); // == (size1 && string1 <= (regend[regno]) && (regend[regno]) <= string1 + size1)) UNSUPPORTED("ebo6m6ze117x4ioed7wvc6omz"); // ? regend[regno] : end_match_1); UNSUPPORTED("1nx31c51hb376ceydwsae35jq"); // for (;;) UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { UNSUPPORTED("6bj5pjn8kja9qic9u7at0g4va"); // /* If necessary, advance to next segment in register UNSUPPORTED("8qcz04tc3rbrg7kjuf9xezhks"); // contents. */ UNSUPPORTED("braae8dlluapap8zd5o6ihc1u"); // while (d2 == dend2) UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("47ijn5xqcu6vix8sa88nyj6g3"); // if (dend2 == end_match_2) break; UNSUPPORTED("5wcf12qydzz346az1zp6sbphr"); // if (dend2 == regend[regno]) break; UNSUPPORTED("36wliwq9pfherfng9wg1z2930"); // /* End of string1 => advance to string2. */ UNSUPPORTED("97sxan60njmrt6lx6dhy0t35a"); // d2 = string2; UNSUPPORTED("yedssw060ohvbc7klzkqa7ky"); // dend2 = regend[regno]; UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("a3i8zhtb0tt9m1ilvwxr0yry6"); // /* At end of register contents => success */ UNSUPPORTED("9zvbjhvrz5uc7k4zmhbwdfvr6"); // if (d2 == dend2) break; UNSUPPORTED("afb4xzyk6gdokmo985hyfw8c9"); // /* If necessary, advance to next segment in data. */ UNSUPPORTED("ey839udf98rupfliazw91iwf4"); // while (d == dend) { if (dend == end_match_2) goto fail; d = string2; dend = end_match_2; }; UNSUPPORTED("ecd7rg6163cvfm8v1rtt0jtpb"); // /* How many characters left in this segment to match. */ UNSUPPORTED("az6v71e6bfrxdlm5zelm70aji"); // mcnt = dend - d; UNSUPPORTED("96v7a28oxrisen4iasx18f02h"); // /* Want how many consecutive characters we can match in UNSUPPORTED("1iug3sdumn7i4romdq11ea8gc"); // one shot, so, if necessary, adjust the count. */ UNSUPPORTED("k5cjd1jaihwrz80htbwhcz1k"); // if (mcnt > dend2 - d2) UNSUPPORTED("8sygn6fz8wegxhzaxpof9nfdy"); // mcnt = dend2 - d2; UNSUPPORTED("cq9zkdhm0s7gm3of2ojllwxev"); // /* Compare that many; failure if mismatch, else move UNSUPPORTED("cwb3st7nyauiej3bt6si7nk"); // past them. */ UNSUPPORTED("8yrz36iknz8u14syi843ya22w"); // if (translate UNSUPPORTED("1csum7liyqa4kjt5vzjgwl055"); // ? bcmp_translate (d, d2, mcnt, translate) UNSUPPORTED("2mfklscfw9ja01nrbw8irsd34"); // : bcmp (d, d2, mcnt)) UNSUPPORTED("3cl1in74qmmbb26vs4qw3mcuv"); // goto fail; UNSUPPORTED("ejde9u9b01jxuvulwaibu252x"); // d += mcnt, d2 += mcnt; UNSUPPORTED("egy6z5e2fbinnxr0gts3znpv4"); // /* Do this because we've match some characters. */ UNSUPPORTED("b1re2muw6n42ivurg658dizzz"); // do { if (!set_regs_matched_done) { active_reg_t r; set_regs_matched_done = 1; for (r = lowest_active_reg; r <= highest_active_reg; r++) { ((reg_info[r]).bits.matched_something) = ((reg_info[r]).bits.ever_matched_something) = 1; } } } while (0); UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("if344u3tlfkgjfkh9bwgpq8a"); // /* begline matches the empty string at the beginning of the string UNSUPPORTED("ezwcv5j2ponvqm9xcbipsht8u"); // (unless `not_bol' is set in `bufp'), and, if UNSUPPORTED("5elzkvlxjqh3r6z34t1j5y21o"); // `newline_anchor' is set, after newlines. */ UNSUPPORTED("7zj5ggx1l6hln4ude6h5p4hgw"); // case begline: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("9vfz6wya8x71wz4tl74mnon03"); // if (((d) == (size1 ? string1 : string2) || !size2)) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("5xiy4c6bz8y6xryzgmegy61lb"); // if (!bufp->not_bol) break; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("5vfekfkt5mncyuqxnse5u327k"); // else if (d[-1] == '\n' && bufp->newline_anchor) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("cmda966opn67h0f3cl7lk5oaa"); // /* In all other cases, we fail. */ UNSUPPORTED("9s7xl8jyc2iazjidoga852mei"); // goto fail; UNSUPPORTED("6ab5d4s6v9zc6g10652lkpfxb"); // /* endline is the dual of begline. */ UNSUPPORTED("8pqai98vstdak51ot078dn1ut"); // case endline: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("ruaqj050rr07ll8b70yjadcf"); // if (((d) == end2)) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("3zg6eo8m095cishibd0umbzff"); // if (!bufp->not_eol) break; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("1n7gdt1mnk1dwyec8i0pk3vkx"); // /* We have to ``prefetch'' the next character. */ UNSUPPORTED("67ozwfkze7vtbzog58zzkcvh7"); // else if ((d == end1 ? *string2 : *d) == '\n' UNSUPPORTED("8whjciz1pz1blross2jpqly5f"); // && bufp->newline_anchor) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("9s7xl8jyc2iazjidoga852mei"); // goto fail; UNSUPPORTED("1aa2xpr66utsdr273h0vay7rp"); // /* Match at the very beginning of the data. */ UNSUPPORTED("889sq08u5lsi3c6y2z7adu8ex"); // case begbuf: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("9vfz6wya8x71wz4tl74mnon03"); // if (((d) == (size1 ? string1 : string2) || !size2)) UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("9s7xl8jyc2iazjidoga852mei"); // goto fail; UNSUPPORTED("4z8rppnva31fi9mwshpp8kxvw"); // /* Match at the very end of the data. */ UNSUPPORTED("cx4ezn3s02koh0pq7idm2xvxc"); // case endbuf: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("ruaqj050rr07ll8b70yjadcf"); // if (((d) == end2)) UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("9s7xl8jyc2iazjidoga852mei"); // goto fail; UNSUPPORTED("3wki3bf5yoz1vc1fprg2lncya"); // /* on_failure_keep_string_jump is used to optimize `.*\n'. It UNSUPPORTED("pql30urhclx8h7lod7pnj4ip"); // pushes NULL as the value for the string on the stack. Then UNSUPPORTED("dzwsld9trwycslc5k99jr9muh"); // `pop_failure_point' will keep the current value for the UNSUPPORTED("3xl98pouep4b4iwcgj8vvabvc"); // string, instead of restoring it. To see why, consider UNSUPPORTED("8wxp3mbfp1jdn6hlq6djbv5gj"); // matching `foo\nbar' against `.*\n'. The .* matches the foo; UNSUPPORTED("djf7x62cv5c4kahfoqaehjrk9"); // then the . fails against the \n. But the next thing we want UNSUPPORTED("4n6sotfrko2ssux5cwdwroytq"); // to do is match the \n against the \n; if we restored the UNSUPPORTED("9gm1fhuma2g5732wasioh293h"); // string value, we would be back at the foo. UNSUPPORTED("9pocj5oo194wevmdb2pun171k"); // Because this is used only in specific cases, we don't need to UNSUPPORTED("22xw129jbwcohdom5on8mruf1"); // check all the things that `on_failure_jump' does, to make UNSUPPORTED("ov1lrnfw4f23mi84a3odmle4"); // sure the right things get saved on the stack. Hence we don't UNSUPPORTED("8xgl4y5ygq098dtwrbuwey6gq"); // share its code. The only reason to push anything on the UNSUPPORTED("by06u3v9h2tr9d1hfpggutrts"); // stack at all is that otherwise we would have to change UNSUPPORTED("cd2otw100j4q2pgbijt7jkkzt"); // `anychar's code to do something besides goto fail in this UNSUPPORTED("32dqefvhlxi1u35k3ewta7mrl"); // case; that seems worse than this. */ UNSUPPORTED("753el6ua6knou432p32d1kbcc"); // case on_failure_keep_string_jump: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("cxpumlm6doboe0ubkx51bqcx1"); // do { do { (mcnt) = *(p) & 0377; (mcnt) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("4l5nbs7foacbvjtuv07q72uuo"); // do { char *destination; s_reg_t this_reg; ; ; ; ; ; ; ; while (((fail_stack).size - (fail_stack).avail) < (((0 ? 0 : highest_active_reg - lowest_active_reg + 1) * 3) + 4)) { if (!((fail_stack).size > (unsigned) (re_max_failures * (5 * 3 + 4)) ? 0 : ((fail_stack).stack = (fail_stack_elt_t *) (destination = (char *) alloca (((fail_stack).size << 1) * sizeof(fail_stack_elt_t)), bcopy ((fail_stack).stack, destination, (fail_stack).size * sizeof(fail_stack_elt_t)), destination), (fail_stack).stack == (void *)0 ? 0 : ((fail_stack).size <<= 1, 1)))) return -2; ; ; } ; if (1) for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; this_reg++) { ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regstart[this_reg]); ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regend[this_reg]); ; ; ; ; ; ; fail_stack.stack[fail_stack.avail++] = (reg_info[this_reg].word); } ; fail_stack.stack[fail_stack.avail++].integer = (lowest_active_reg); ; fail_stack.stack[fail_stack.avail++].integer = (highest_active_reg); ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (p + mcnt); ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) ((void *)0); ; ; } while (0); UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("18mowhc7dokjwwbpjm3c0jjz3"); // /* Uses of on_failure_jump: UNSUPPORTED("6hohd1mhntprbr29uarcgbh63"); // Each alternative starts with an on_failure_jump that points UNSUPPORTED("9ltnucad533b0qouy73o7txqh"); // to the beginning of the next alternative. Each alternative UNSUPPORTED("56exr10nxswdfl6el06yzn1kl"); // except the last ends with a jump that in effect jumps past UNSUPPORTED("7mx68jjud7wzo6avh55bb818j"); // the rest of the alternatives. (They really jump to the UNSUPPORTED("9nytxeg7tfysw0cho7phep44z"); // ending jump of the following alternative, because tensioning UNSUPPORTED("ax1r80aorhdnf7k83i580xkrd"); // these jumps is a hassle.) UNSUPPORTED("b3w92k7mmdeshyrsyx5j12h3g"); // Repeats start with an on_failure_jump that points past both UNSUPPORTED("aef21o4yg56obwkotdy9xg0ho"); // the repetition text and either the following jump or UNSUPPORTED("3wjc6x34irsiejqg1kbgn3iyt"); // pop_failure_jump back to this on_failure_jump. */ UNSUPPORTED("992rmruvdtrxnk46307iiqyjo"); // case on_failure_jump: UNSUPPORTED("c776gsd8agjizu0u6zgrf49u3"); // on_failure: UNSUPPORTED("7xijz1d7skix4nbsjyzbkawyz"); // ; UNSUPPORTED("6rhr1dl5qu710655mp1bqo0i6"); // do { do { (mcnt) = *(p) & 0377; (mcnt) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); UNSUPPORTED("7xijz1d7skix4nbsjyzbkawyz"); // ; UNSUPPORTED("f46w21fc8pt03jhpnaepq03um"); // /* If this on_failure_jump comes right before a group (i.e., UNSUPPORTED("4osoy23qvwvclpht018wy5fe"); // the original * applied to a group), save the information UNSUPPORTED("bfbi4c30km7bjt8vdpfguqx3b"); // for that group and all inner ones, so that if we fail back UNSUPPORTED("1ra232qtft0mi461dabhedxp4"); // to this point, the group's information will be correct. UNSUPPORTED("b2mqhhpsbx6j245sm4leiu3dn"); // For example, in \(a*\)*\1, we need the preceding group, UNSUPPORTED("6do6go4hsy6lmqykgor4s9ygv"); // and in \(zz\(a*\)b*\)\2, we need the inner group. */ UNSUPPORTED("enwxe23t405zzw5yadk743a5r"); // /* We can't use `p' to check ahead because we push UNSUPPORTED("6yxbydq88le4or0xwwq5siqmw"); // a failure point to `p + mcnt' after we do this. */ UNSUPPORTED("di4spe1yrvg37sczy634usb7k"); // p1 = p; UNSUPPORTED("816d2v18z6b4clqeuef1am657"); // /* We need to skip no_op's before we look for the UNSUPPORTED("ch11lyve93ighowv1prcy2j8k"); // start_memory in case this on_failure_jump is happening as UNSUPPORTED("6qg7rlv2r0m6k4j5x75pimlaa"); // the result of a completed succeed_n, as in \(a\)\{1,3\}b\1 UNSUPPORTED("978ibng6ccfuidf65t6s6mgq0"); // against aba. */ UNSUPPORTED("ajcmgk4q2zko19taooby9ydhf"); // while (p1 < pend && (re_opcode_t) *p1 == no_op) UNSUPPORTED("4hemvstzejy8d3hmd82kukj7v"); // p1++; UNSUPPORTED("6srqj3lww8szsp64bd64yus7k"); // if (p1 < pend && (re_opcode_t) *p1 == start_memory) UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("54s4csu4aujalr4c0swqowr5k"); // /* We have a new highest active register now. This will UNSUPPORTED("4ig8j5bvaq59fsf9hfdn1q5ys"); // get reset at the start_memory we are about to get to, UNSUPPORTED("6aatr095mst5lfh4soia9qpg2"); // but we will have saved all the registers relevant to UNSUPPORTED("2a6e61mk8qy9pwnls9zifuok6"); // this repetition op, as described above. */ UNSUPPORTED("50t6ewzx8ghn8hjs3qg8z17sc"); // highest_active_reg = *(p1 + 1) + *(p1 + 2); UNSUPPORTED("bxlrtrilu12d2jxucjuex0vfp"); // if (lowest_active_reg == ((1 << 8) + 1)) UNSUPPORTED("6li0h0b9p3vauo9vgyypu8fux"); // lowest_active_reg = *(p1 + 1); UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("7xijz1d7skix4nbsjyzbkawyz"); // ; UNSUPPORTED("4637n0f945d4uznxowpb1ha4i"); // do { char *destination; s_reg_t this_reg; ; ; ; ; ; ; ; while (((fail_stack).size - (fail_stack).avail) < (((0 ? 0 : highest_active_reg - lowest_active_reg + 1) * 3) + 4)) { if (!((fail_stack).size > (unsigned) (re_max_failures * (5 * 3 + 4)) ? 0 : ((fail_stack).stack = (fail_stack_elt_t *) (destination = (char *) alloca (((fail_stack).size << 1) * sizeof(fail_stack_elt_t)), bcopy ((fail_stack).stack, destination, (fail_stack).size * sizeof(fail_stack_elt_t)), destination), (fail_stack).stack == (void *)0 ? 0 : ((fail_stack).size <<= 1, 1)))) return -2; ; ; } ; if (1) for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; this_reg++) { ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regstart[this_reg]); ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regend[this_reg]); ; ; ; ; ; ; fail_stack.stack[fail_stack.avail++] = (reg_info[this_reg].word); } ; fail_stack.stack[fail_stack.avail++].integer = (lowest_active_reg); ; fail_stack.stack[fail_stack.avail++].integer = (highest_active_reg); ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (p + mcnt); ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (d); ; ; } while (0); UNSUPPORTED("d1pumbibe8xz2i7gr1wj6zdak"); // break; UNSUPPORTED("ezli68qam5jhg7sd2n0z30pa1"); // /* A smart repeat ends with `maybe_pop_jump'. UNSUPPORTED("5d7n4fkgg5a38sjzmkhaoa8hl"); // We change it to either `pop_failure_jump' or `jump'. */ UNSUPPORTED("d7ziafib9p2sa0rqh34hv3hwj"); // case maybe_pop_jump: UNSUPPORTED("cxpumlm6doboe0ubkx51bqcx1"); // do { do { (mcnt) = *(p) & 0377; (mcnt) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("4i49ynnzyaszs2krb0aw4uqa0"); // register unsigned char *p2 = p; UNSUPPORTED("8b4raalmwo7274mwsk0kcdlbp"); // /* Compare the beginning of the repeat with what in the UNSUPPORTED("6ox8v5j7jznz10vsvok39lx6h"); // pattern follows its end. If we can establish that there UNSUPPORTED("1qm38p3f1vojknhw7v973ela0"); // is nothing that they would both match, i.e., that we UNSUPPORTED("2wnj0iemov40iryz5lsfp3zi5"); // would have to backtrack because of (as in, e.g., `a*a') UNSUPPORTED("9zp4vdc61w9qqpto61p74x8x0"); // then we can change to pop_failure_jump, because we'll UNSUPPORTED("cdtoaohseagznp9y8u81kbpru"); // never have to backtrack. UNSUPPORTED("63w8z2r32mq0x6xowpwds9vjb"); // This is not true in the case of alternatives: in UNSUPPORTED("a98qcnnc9pzff1gk8kfj32f1i"); // `(a|ab)*' we do need to backtrack to the `ab' alternative UNSUPPORTED("errex35giie09vkvn4e9fe4zk"); // (e.g., if the string was `ab'). But instead of trying to UNSUPPORTED("1147ja0a6sr58jg8z4hjs19ji"); // detect that here, the alternative has put on a dummy UNSUPPORTED("64mr7nyur7w7m85zrdx15fqli"); // failure point which is what we will end up popping. */ UNSUPPORTED("amvyb0hgs5zfdebpexntlvwfd"); // /* Skip over open/close-group commands. UNSUPPORTED("2lx4i6yu241papyqk442d7gf1"); // If what follows this loop is a ...+ construct, UNSUPPORTED("1pvxwmxmctfoyisu33wn2tgym"); // look at what begins its body, since we will have to UNSUPPORTED("8tbga6r8dqnryesfg5bmccsge"); // match at least one of that. */ UNSUPPORTED("9nuuiq5ff5vu3ehueiarndup8"); // while (1) UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { UNSUPPORTED("2dak6ikzsj12jm54tispfishb"); // if (p2 + 2 < pend UNSUPPORTED("7yw7v0svrd5pmn1jcqlc4e3u1"); // && ((re_opcode_t) *p2 == stop_memory UNSUPPORTED("2yx468hmjjmhvuzxlu2jyltzc"); // || (re_opcode_t) *p2 == start_memory)) UNSUPPORTED("4hgr2e6ls0cizy5kicpo9i13a"); // p2 += 3; UNSUPPORTED("1yuf55oz0qpsj5aqp5h5fpr42"); // else if (p2 + 6 < pend UNSUPPORTED("bw2og6j9w6s47jv3rzusqgra5"); // && (re_opcode_t) *p2 == dummy_failure_jump) UNSUPPORTED("6ennx95kxfn7n27tkdpz2xiun"); // p2 += 6; UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else UNSUPPORTED("1fg4xctmq8acy7m0oob45guaz"); // break; UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("d2fh23u27kss8fzwuwtp0p6sf"); // p1 = p + mcnt; UNSUPPORTED("90n7ynf24mp5fmsi2nznee8aj"); // /* p1[0] ... p1[2] are the `on_failure_jump' corresponding UNSUPPORTED("4vso45anytez4cjlpkfnzk1ul"); // to the `maybe_finalize_jump' of this case. Examine what UNSUPPORTED("b0juiqz00zb3viboquom9nj05"); // follows. */ UNSUPPORTED("66jpg0e4bmb6ltcah5ku9m5wf"); // /* If we're at the end of the pattern, we can change. */ UNSUPPORTED("5xkeog52k82g0w44z3mfurqp7"); // if (p2 == pend) UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { UNSUPPORTED("e25zbxyj1st10oslj3hfvjw9a"); // /* Consider what happens when matching ":\(.*\)" UNSUPPORTED("1qa8sj8fsagixe1jkmm9j7s4u"); // against ":/". I don't really understand this code UNSUPPORTED("bawpwuc0i5d4c4v2365l038h3"); // yet. */ UNSUPPORTED("5zj568kdmyc87wog3sgbfzsd2"); // p[-3] = (unsigned char) pop_failure_jump; UNSUPPORTED("9fy78dg2q1uu4c2t1zsyaestf"); // ; UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("2wredhzqyuxjyd1qy0vxr02p6"); // else if ((re_opcode_t) *p2 == exactn UNSUPPORTED("5439ysolyacwtm0iroxxof9ja"); // || (bufp->newline_anchor && (re_opcode_t) *p2 == endline)) UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { UNSUPPORTED("6ailij025yibbye551dmh9is0"); // register unsigned char c UNSUPPORTED("68vch1mgcskmseij0qhms2rl9"); // = *p2 == (unsigned char) endline ? '\n' : p2[2]; UNSUPPORTED("1yo80wyjqsiw1t17we6c8a6gr"); // if ((re_opcode_t) p1[3] == exactn && p1[5] != c) UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("agl6h59gsalgrbxzq7fk4n0vn"); // p[-3] = (unsigned char) pop_failure_jump; UNSUPPORTED("czvlqjtrpajrtul735yf6cmfz"); // ; UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("exal5xqo67c7zaxk3gaoj3n0i"); // else if ((re_opcode_t) p1[3] == charset UNSUPPORTED("e0kae24mabhgjjynwkmainteq"); // || (re_opcode_t) p1[3] == charset_not) UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { UNSUPPORTED("do2ngnlega9hi7rlbi6pwnera"); // int not = (re_opcode_t) p1[3] == charset_not; UNSUPPORTED("5f33xcwhul4d1gb3t7lj27aam"); // if (c < (unsigned char) (p1[4] * 8) UNSUPPORTED("78cradlgzgss8hx6xr31uun4d"); // && p1[5 + c / 8] & (1 << (c % 8))) UNSUPPORTED("7n22hwonng6xigiqxvbruxroo"); // not = !not; UNSUPPORTED("dpe5oc4fbt7r8mffvrkacad7a"); // /* `not' is equal to 1 if c would match, which means UNSUPPORTED("bqyj06a9kascwc6t354y5gh61"); // that we can't change to pop_failure_jump. */ UNSUPPORTED("z5vz9r2m8zndo9aeyvz3w07z"); // if (!not) UNSUPPORTED("el767oi7fhlc4apdbx8dsvnk6"); // { UNSUPPORTED("6aq9gjy2dwkpua80yonp1njtn"); // p[-3] = (unsigned char) pop_failure_jump; UNSUPPORTED("4eruune9bfskm05zy5ipimp2s"); // ; UNSUPPORTED("b5m0ttlk23avgs4i47o8lbzg1"); // } UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("3ra1229golg94oou1y8zbvkkp"); // else if ((re_opcode_t) *p2 == charset) UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { UNSUPPORTED("auubej4lkmydm7wamwki5zgyp"); // if ((re_opcode_t) p1[3] == exactn UNSUPPORTED("6zebpplfmgrbk07lmll1yrrsi"); // && ! ((int) p2[1] * 8 > (int) p1[4] UNSUPPORTED("9wp8kzivj0sustlx4ftn0l36h"); // && (p2[2 + p1[4] / 8] UNSUPPORTED("eyu63dq7uwiiwzvudc2gopty4"); // & (1 << (p1[4] % 8))))) UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { UNSUPPORTED("8azfcbpc7h84lhyicbrd2yjqp"); // p[-3] = (unsigned char) pop_failure_jump; UNSUPPORTED("a6r7lto035pp3gvk1bdixang2"); // ; UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } UNSUPPORTED("dcwjh55x5f2wjp4ezmipdxn2b"); // else if ((re_opcode_t) p1[3] == charset_not) UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { UNSUPPORTED("7gajjg3j6bbfnu7tfpv8vd1he"); // int idx; UNSUPPORTED("dxd6z46rfort3j8amp5v1n0wb"); // /* We win if the charset_not inside the loop UNSUPPORTED("5r3347hzknz05fu925j2m38f9"); // lists every character listed in the charset after. */ UNSUPPORTED("drl6mtwfmrng8pxbu6xzqfb18"); // for (idx = 0; idx < (int) p2[1]; idx++) UNSUPPORTED("9gmmtilb47lw5pq4j4sejrbj"); // if (! (p2[2 + idx] == 0 UNSUPPORTED("74zwa83c3pcunsiarfams873p"); // || (idx < (int) p1[4] UNSUPPORTED("3ytcwj384elha7evsxusun8r2"); // && ((p2[2 + idx] & ~ p1[5 + idx]) == 0)))) UNSUPPORTED("1lzsscwayr2ygeagix6ouorzi"); // break; UNSUPPORTED("etst8xjhq076idz2ki2lkc3kl"); // if (idx == p2[1]) UNSUPPORTED("1fi5w21ki1vo1jwyr4xwgm27n"); // { UNSUPPORTED("gi02bd0hnoko53b18tp6muxp"); // p[-3] = (unsigned char) pop_failure_jump; UNSUPPORTED("7ia8gpv947o65avjiwl96gln5"); // ; UNSUPPORTED("bf03xtomlwkahoqno8ua4cbpc"); // } UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } UNSUPPORTED("bfp6jy3jhgcx1qlqs2ugtk84o"); // else if ((re_opcode_t) p1[3] == charset) UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { UNSUPPORTED("7gajjg3j6bbfnu7tfpv8vd1he"); // int idx; UNSUPPORTED("3gf62oi7ics60q83j50ht4j54"); // /* We win if the charset inside the loop UNSUPPORTED("axtgnnoh8n7p39m9fbbxipnxm"); // has no overlap with the one after the loop. */ UNSUPPORTED("6fsyvlzx4skvg5xqoif9n2bli"); // for (idx = 0; UNSUPPORTED("6d7whyux0667vbtt3aoh8j8mc"); // idx < (int) p2[1] && idx < (int) p1[4]; UNSUPPORTED("d4o8f5f71ai8ygtqvrs77062h"); // idx++) UNSUPPORTED("b029onao79pzr7fwgf9oboalu"); // if ((p2[2 + idx] & p1[5 + idx]) != 0) UNSUPPORTED("1lzsscwayr2ygeagix6ouorzi"); // break; UNSUPPORTED("6whqfrc9hpkwoqoqk2cpgstzz"); // if (idx == p2[1] || idx == p1[4]) UNSUPPORTED("1fi5w21ki1vo1jwyr4xwgm27n"); // { UNSUPPORTED("gi02bd0hnoko53b18tp6muxp"); // p[-3] = (unsigned char) pop_failure_jump; UNSUPPORTED("7ia8gpv947o65avjiwl96gln5"); // ; UNSUPPORTED("bf03xtomlwkahoqno8ua4cbpc"); // } UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("dtbtyud0b7t5ily0nm0qkjrov"); // p -= 2; /* Point at relative address again. */ UNSUPPORTED("9hexwrt0gnjztdabmcy13w96a"); // if ((re_opcode_t) p[-1] != pop_failure_jump) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("ca1ptlw6k6dixmzbwm3a4iusp"); // p[-1] = (unsigned char) jump; UNSUPPORTED("e4kt1tmmevqvy3cbyk6xnznck"); // ; UNSUPPORTED("578iyred8hniiy6kj99i6zcx7"); // goto unconditional_jump; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("et4hfzxq1ccol7oenwuqop34c"); // /* Note fall through. */ UNSUPPORTED("evkl6mpyrcnjwer6edp6j9emc"); // /* The end of a simple repeat has a pop_failure_jump back to UNSUPPORTED("2jcckuegby5tkaf50t6wemnmz"); // its matching on_failure_jump, where the latter will push a UNSUPPORTED("5971g2j40ktdkl0khlo1gpoy6"); // failure point. The pop_failure_jump takes off failure UNSUPPORTED("byi3j1ugndbk3u7yo028ikqz3"); // points put on by this pop_failure_jump's matching UNSUPPORTED("48etkzu6pax8j2rcmbcbd2s1k"); // on_failure_jump; we got through the pattern to here from the UNSUPPORTED("8f9as95a103nww8jbbn2vx61n"); // matching on_failure_jump, so didn't fail. */ UNSUPPORTED("6coluo8cd7scxlqwnbvt3jqs5"); // case pop_failure_jump: UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("aaykmyayp7k026o2rgh0xnxtt"); // /* We need to pass separate storage for the lowest and UNSUPPORTED("3w39tfh3tm57hhf0ob12sj5yk"); // highest registers, even though we don't care about the UNSUPPORTED("angsr7u35nqld9m876d6dx7xq"); // actual values. Otherwise, we will restore only one UNSUPPORTED("4ixesek08pb5l67pi00fqsriy"); // register from the stack, since lowest will == highest in UNSUPPORTED("1rzihep5lcgvrl52235a9a2uy"); // `pop_failure_point'. */ UNSUPPORTED("9m9v5kmsap0mtdznppskik3k"); // active_reg_t dummy_low_reg, dummy_high_reg; UNSUPPORTED("5z662sre8crmvzwkqdm96nybf"); // unsigned char *pdummy; UNSUPPORTED("35v2cyfyscndlz7rd41acza4q"); // const char *sdummy; UNSUPPORTED("6mnx06fa3p4n9bhd9htqjy0il"); // ; UNSUPPORTED("3g97rrgu1b7a7ep0xjxi3013b"); // { s_reg_t this_reg; const unsigned char *string_temp; ; ; ; ; ; ; ; string_temp = fail_stack.stack[--fail_stack.avail].pointer; if (string_temp != (void *)0) sdummy = (const char *) string_temp; ; ; ; pdummy = (unsigned char *) fail_stack.stack[--fail_stack.avail].pointer; ; ; dummy_high_reg = (active_reg_t) fail_stack.stack[--fail_stack.avail].integer; ; UNSUPPORTED("1zjxjg81gnrzmbjfvorezv23b"); // dummy_low_reg = (active_reg_t) fail_stack.stack[--fail_stack.avail].integer; ; if (1) for (this_reg = dummy_high_reg; this_reg >= UNSUPPORTED("5y05eeb8zcu1hnp1r7u72wea0"); // dummy_low_reg; this_reg--) { ; reg_info_dummy[this_reg].word = fail_stack.stack[--fail_stack.avail]; ; reg_dummy[this_reg] = (const char *) fail_stack.stack[--fail_stack.avail].pointer; ; UNSUPPORTED("170qj0cyzc65li5h2h8nibj1a"); // reg_dummy[this_reg] = (const char *) fail_stack.stack[--fail_stack.avail].pointer; ; } else { for (this_reg = highest_active_reg; this_reg > dummy_high_reg; this_reg--) { reg_info_dummy[this_reg].word.integer = 0; reg_dummy[this_reg] = 0; UNSUPPORTED("o5cb1sy4lw7ahxhb9ir34ywe"); // reg_dummy[this_reg] = 0; } highest_active_reg = dummy_high_reg; } set_regs_matched_done = 0; ; }; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("et4hfzxq1ccol7oenwuqop34c"); // /* Note fall through. */ UNSUPPORTED("7jzfafc0e4ysay5587d498v0g"); // unconditional_jump: UNSUPPORTED("7xijz1d7skix4nbsjyzbkawyz"); // ; UNSUPPORTED("lbfv20cb4iwb8ilhovngktwp"); // /* Note fall through. */ UNSUPPORTED("6d0r5m74qtbvaned81fau8l5f"); // /* Unconditionally jump (without popping any failure points). */ UNSUPPORTED("9a1qj2mhg3oh4ehsjpp4d81on"); // case jump: UNSUPPORTED("39nxr5mia7bkm0tyl5uoxm1i0"); // do { do { (mcnt) = *(p) & 0377; (mcnt) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); /* Get the amount to jump. */ UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("ard612jdkjyh07vvh6p7xec5q"); // p += mcnt; /* Do the jump. */ UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("6eoc6h9g64ctzuyv0zhwzsp88"); // /* We need this opcode so we can detect where alternatives end UNSUPPORTED("6m0nust2xxmwf4b1plaq3zle2"); // in `group_match_null_string_p' et al. */ UNSUPPORTED("7ifq76or69643hqib3roiq9f4"); // case jump_past_alt: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("8efvwfkzonjvc0xgk7ss31fh2"); // goto unconditional_jump; UNSUPPORTED("eiucbu410s7gabqq4tu08bg8c"); // /* Normally, the on_failure_jump pushes a failure point, which UNSUPPORTED("ctsxylfj3puoijkz434hjg4jg"); // then gets popped at pop_failure_jump. We will end up at UNSUPPORTED("7ociskstxycbbkh41vyojlnby"); // pop_failure_jump, also, and with a pattern of, say, `a+', we UNSUPPORTED("7n2w2rey1jvho9kvlfgz2mero"); // are skipping over the on_failure_jump, so we have to push UNSUPPORTED("ciwekfad3iz5mqjje8hiorvda"); // something meaningless for pop_failure_jump to pop. */ UNSUPPORTED("ejqzfph0mmtiqin1hmi981bzm"); // case dummy_failure_jump: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("csbowj5rzwk0s0pqd3urbka91"); // /* It doesn't matter what we push for the string here. What UNSUPPORTED("4qwf1zf8lyqii172mcx2gdsms"); // the code at `fail' tests is the value for the pattern. */ UNSUPPORTED("359ip48et2ofltl9170r6hayz"); // do { char *destination; s_reg_t this_reg; ; ; ; ; ; ; ; while (((fail_stack).size - (fail_stack).avail) < (((0 ? 0 : highest_active_reg - lowest_active_reg + 1) * 3) + 4)) { if (!((fail_stack).size > (unsigned) (re_max_failures * (5 * 3 + 4)) ? 0 : ((fail_stack).stack = (fail_stack_elt_t *) (destination = (char *) alloca (((fail_stack).size << 1) * sizeof(fail_stack_elt_t)), bcopy ((fail_stack).stack, destination, (fail_stack).size * sizeof(fail_stack_elt_t)), destination), (fail_stack).stack == (void *)0 ? 0 : ((fail_stack).size <<= 1, 1)))) return -2; ; ; } ; if (1) for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; this_reg++) { ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regstart[this_reg]); ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regend[this_reg]); ; ; ; ; ; ; fail_stack.stack[fail_stack.avail++] = (reg_info[this_reg].word); } ; fail_stack.stack[fail_stack.avail++].integer = (lowest_active_reg); ; fail_stack.stack[fail_stack.avail++].integer = (highest_active_reg); ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (0); ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (0); ; ; } while (0); UNSUPPORTED("8efvwfkzonjvc0xgk7ss31fh2"); // goto unconditional_jump; UNSUPPORTED("9mevu5auyy39j4yiw0b2j9h2o"); // /* At the end of an alternative, we need to push a dummy failure UNSUPPORTED("d2uf5y4x1b2hmxla6j6tlr1rb"); // point in case we are followed by a `pop_failure_jump', because UNSUPPORTED("rnnvhhghy5jgw4jg1fhty1td"); // we don't want the failure point for the alternative to be UNSUPPORTED("dkubbc7oql3ppqcdkgq9qelbn"); // popped. For example, matching `(a|ab)*' against `aab' UNSUPPORTED("8eoqcy9m0jjec5bxgkzbvg1c7"); // requires that we match the `ab' alternative. */ UNSUPPORTED("9446ac5zvkn7r9yqkh2brh10l"); // case push_dummy_failure: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("c992qnyh0yle1kop18y31trwb"); // /* See comments just above at `dummy_failure_jump' about the UNSUPPORTED("5synfaxsw4ed7tb33m3un4m4s"); // two zeroes. */ UNSUPPORTED("359ip48et2ofltl9170r6hayz"); // do { char *destination; s_reg_t this_reg; ; ; ; ; ; ; ; while (((fail_stack).size - (fail_stack).avail) < (((0 ? 0 : highest_active_reg - lowest_active_reg + 1) * 3) + 4)) { if (!((fail_stack).size > (unsigned) (re_max_failures * (5 * 3 + 4)) ? 0 : ((fail_stack).stack = (fail_stack_elt_t *) (destination = (char *) alloca (((fail_stack).size << 1) * sizeof(fail_stack_elt_t)), bcopy ((fail_stack).stack, destination, (fail_stack).size * sizeof(fail_stack_elt_t)), destination), (fail_stack).stack == (void *)0 ? 0 : ((fail_stack).size <<= 1, 1)))) return -2; ; ; } ; if (1) for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; this_reg++) { ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regstart[this_reg]); ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regend[this_reg]); ; ; ; ; ; ; fail_stack.stack[fail_stack.avail++] = (reg_info[this_reg].word); } ; fail_stack.stack[fail_stack.avail++].integer = (lowest_active_reg); ; fail_stack.stack[fail_stack.avail++].integer = (highest_active_reg); ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (0); ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (0); ; ; } while (0); UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("cch41i8kiaadul49ef19omdn3"); // /* Have to succeed matching what follows at least n times. UNSUPPORTED("8nb8fa32tplp2rqeqbr6hbn7m"); // After that, handle like `on_failure_jump'. */ UNSUPPORTED("bdrmz6krrbsihqbsklz1j7d7a"); // case succeed_n: UNSUPPORTED("84ijqow5jif2ajlhwgtdm91f7"); // do { (mcnt) = *(p + 2) & 0377; (mcnt) += ((((unsigned char) (*((p + 2) + 1))) ^ 128) - 128) << 8; } while (0); UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("bgjxyv37kr5myctgyhh94vsi6"); // /* Originally, this is how many times we HAVE to succeed. */ UNSUPPORTED("4hf4aztjmayqr0tjd70d8mo5l"); // if (mcnt > 0) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("e8xmciie2t26hwi49v7e64msh"); // mcnt--; UNSUPPORTED("f0uzigopn4c90eyozalab8dsx"); // p += 2; UNSUPPORTED("3trn8e2hbd5q9a392rlo55y4x"); // do { do { (p)[0] = (mcnt) & 0377; (p)[1] = (mcnt) >> 8; } while (0); (p) += 2; } while (0); UNSUPPORTED("e4kt1tmmevqvy3cbyk6xnznck"); // ; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("ach1i5r2ivzzx0xwwovmzz94b"); // else if (mcnt == 0) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("e4kt1tmmevqvy3cbyk6xnznck"); // ; UNSUPPORTED("8kebz7kyb83b0vya08j7g1h0s"); // p[2] = (unsigned char) no_op; UNSUPPORTED("7naalvvwte5koasfwykgk8jy7"); // p[3] = (unsigned char) no_op; UNSUPPORTED("evigqo62udorsulmaru504u73"); // goto on_failure; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("f41u8fntqiy246yy3btlg6w1v"); // case jump_n: UNSUPPORTED("84ijqow5jif2ajlhwgtdm91f7"); // do { (mcnt) = *(p + 2) & 0377; (mcnt) += ((((unsigned char) (*((p + 2) + 1))) ^ 128) - 128) << 8; } while (0); UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("45q1dm5e8czy7dfyydg2p0qre"); // /* Originally, this is how many times we CAN jump. */ UNSUPPORTED("c925pgmxvmas9boqu5ovt7bwp"); // if (mcnt) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("e8xmciie2t26hwi49v7e64msh"); // mcnt--; UNSUPPORTED("bj0025yphmeva1dnjc83w2d82"); // do { (p + 2)[0] = (mcnt) & 0377; (p + 2)[1] = (mcnt) >> 8; } while (0); UNSUPPORTED("e4kt1tmmevqvy3cbyk6xnznck"); // ; UNSUPPORTED("578iyred8hniiy6kj99i6zcx7"); // goto unconditional_jump; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("6xb6uhe949e197w3856eykp9b"); // /* If don't have to jump any more, skip over the rest of command. */ UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else UNSUPPORTED("4g9g5t2dqwtbpe7orh2oew0y9"); // p += 4; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("dmqxgjrlj5ddxj88dw919ujoj"); // case set_number_at: UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("6mnx06fa3p4n9bhd9htqjy0il"); // ; UNSUPPORTED("5pj3hnv50h51ji8ogyd48xedj"); // do { do { (mcnt) = *(p) & 0377; (mcnt) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); UNSUPPORTED("d2fh23u27kss8fzwuwtp0p6sf"); // p1 = p + mcnt; UNSUPPORTED("5pj3hnv50h51ji8ogyd48xedj"); // do { do { (mcnt) = *(p) & 0377; (mcnt) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); UNSUPPORTED("6mnx06fa3p4n9bhd9htqjy0il"); // ; UNSUPPORTED("7iin6qwm1f2j9sjclecva957u"); // do { (p1)[0] = (mcnt) & 0377; (p1)[1] = (mcnt) >> 8; } while (0); UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("a8jtmsnmpa4937exo9nhopyyb"); // case wordbound: UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("1q5kvi9ggao878ze57ikl6vuk"); // boolean prevchar, thischar; UNSUPPORTED("6mnx06fa3p4n9bhd9htqjy0il"); // ; UNSUPPORTED("dugr1bul8t32joy65do0a7h6d"); // if (((d) == (size1 ? string1 : string2) || !size2) || ((d) == end2)) UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("8ijy2sdya91ygss8ru67qxx66"); // prevchar = (re_syntax_table[(d - 1) == end1 ? *string2 :(d - 1) == string2 - 1 ? *(end1 - 1) : *(d - 1)] == 1); UNSUPPORTED("33zxkfaori9emq7m5ssmpr1rd"); // thischar = (re_syntax_table[(d) == end1 ? *string2 :(d) == string2 - 1 ? *(end1 - 1) : *(d)] == 1); UNSUPPORTED("79ooz7jacd1z2sfddoakjbcze"); // if (prevchar != thischar) UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; UNSUPPORTED("etjodgz127fwk1r4166wqxg7n"); // goto fail; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("2jqqzr491mztwr9h8hvs55ja1"); // case notwordbound: UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { UNSUPPORTED("1q5kvi9ggao878ze57ikl6vuk"); // boolean prevchar, thischar; UNSUPPORTED("6mnx06fa3p4n9bhd9htqjy0il"); // ; UNSUPPORTED("dugr1bul8t32joy65do0a7h6d"); // if (((d) == (size1 ? string1 : string2) || !size2) || ((d) == end2)) UNSUPPORTED("1k6xdu198jqq8v2oj3209y50s"); // goto fail; UNSUPPORTED("8ijy2sdya91ygss8ru67qxx66"); // prevchar = (re_syntax_table[(d - 1) == end1 ? *string2 :(d - 1) == string2 - 1 ? *(end1 - 1) : *(d - 1)] == 1); UNSUPPORTED("33zxkfaori9emq7m5ssmpr1rd"); // thischar = (re_syntax_table[(d) == end1 ? *string2 :(d) == string2 - 1 ? *(end1 - 1) : *(d)] == 1); UNSUPPORTED("79ooz7jacd1z2sfddoakjbcze"); // if (prevchar != thischar) UNSUPPORTED("1k6xdu198jqq8v2oj3209y50s"); // goto fail; UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } UNSUPPORTED("991vlwoc47i8p67jyv2qapdhy"); // case wordbeg: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("721tzo9yoqf86tjgrubhs6lcg"); // if ((re_syntax_table[(d) == end1 ? *string2 :(d) == string2 - 1 ? *(end1 - 1) : *(d)] == 1) && (((d) == (size1 ? string1 : string2) || !size2) || !(re_syntax_table[(d - 1) == end1 ? *string2 :(d - 1) == string2 - 1 ? *(end1 - 1) : *(d - 1)] == 1))) UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("9s7xl8jyc2iazjidoga852mei"); // goto fail; UNSUPPORTED("65os7te2jc1i6uacyszvy5spd"); // case wordend: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("88nu0py5i2vups7wk3tj8wcf4"); // if (!((d) == (size1 ? string1 : string2) || !size2) && (re_syntax_table[(d - 1) == end1 ? *string2 :(d - 1) == string2 - 1 ? *(end1 - 1) : *(d - 1)] == 1) UNSUPPORTED("1a0r7hi8r1po69cu5fxqrw4u8"); // && (!(re_syntax_table[(d) == end1 ? *string2 :(d) == string2 - 1 ? *(end1 - 1) : *(d)] == 1) || ((d) == end2))) UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; UNSUPPORTED("9s7xl8jyc2iazjidoga852mei"); // goto fail; UNSUPPORTED("buxp1030z7swkjl42wovj9hxd"); // case wordchar: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("6l2kf5tzbvscsr8vy2bos6ng7"); // while (d == dend) { if (dend == end_match_2) goto fail; d = string2; dend = end_match_2; }; UNSUPPORTED("7qor4v3lsqk2266u914165c3w"); // if (!(re_syntax_table[(d) == end1 ? *string2 :(d) == string2 - 1 ? *(end1 - 1) : *(d)] == 1)) UNSUPPORTED("etjodgz127fwk1r4166wqxg7n"); // goto fail; UNSUPPORTED("2o2dzkzmcvnlj1d5ychre7cqo"); // do { if (!set_regs_matched_done) { active_reg_t r; set_regs_matched_done = 1; for (r = lowest_active_reg; r <= highest_active_reg; r++) { ((reg_info[r]).bits.matched_something) = ((reg_info[r]).bits.ever_matched_something) = 1; } } } while (0); UNSUPPORTED("p26x5fh4zcf5ddyi146lh558"); // d++; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("7frlpnfuvuphd3bzoulwg4vsr"); // case notwordchar: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("6l2kf5tzbvscsr8vy2bos6ng7"); // while (d == dend) { if (dend == end_match_2) goto fail; d = string2; dend = end_match_2; }; UNSUPPORTED("7efqv32ta2jk6dolelm1jju58"); // if ((re_syntax_table[(d) == end1 ? *string2 :(d) == string2 - 1 ? *(end1 - 1) : *(d)] == 1)) UNSUPPORTED("etjodgz127fwk1r4166wqxg7n"); // goto fail; UNSUPPORTED("2o2dzkzmcvnlj1d5ychre7cqo"); // do { if (!set_regs_matched_done) { active_reg_t r; set_regs_matched_done = 1; for (r = lowest_active_reg; r <= highest_active_reg; r++) { ((reg_info[r]).bits.matched_something) = ((reg_info[r]).bits.ever_matched_something) = 1; } } } while (0); UNSUPPORTED("p26x5fh4zcf5ddyi146lh558"); // d++; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("comxch6w0lbi64ejq9m4p0u7o"); // default: UNSUPPORTED("4ga2fk86no0o6rms0bh0zuh4t"); // abort (); UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("9vmmpq61luc1cbbupgqomzlw5"); // continue; /* Successfully executed one pattern command; keep going. */ UNSUPPORTED("9ndw6vvwoffc31wvgwvgra578"); // /* We goto here if a matching operation fails. */ UNSUPPORTED("1x3juxkh7bw5pjqp84ugtlmce"); // fail: UNSUPPORTED("6j68ym8upocfb9ipivxd80ark"); // if (!(fail_stack.avail == 0)) UNSUPPORTED("92q1l5zz5c3sr57dyzmui3e99"); // { /* A restart point is known. Restore to that state. */ UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("ayzf7vhhjnbynnstdi6n454f4"); // { s_reg_t this_reg; const unsigned char *string_temp; ; ; ; ; ; ; ; string_temp = fail_stack.stack[--fail_stack.avail].pointer; if (string_temp != (void *)0) d = (const char *) string_temp; ; ; ; p = (unsigned char *) fail_stack.stack[--fail_stack.avail].pointer; ; ; highest_active_reg = (active_reg_t) fail_stack.stack[--fail_stack.avail].integer; ; UNSUPPORTED("cb1z2qn566ao3l0dqcxiow6dp"); // lowest_active_reg = (active_reg_t) fail_stack.stack[--fail_stack.avail].integer; ; if (1) for (this_reg = highest_active_reg; this_reg >= UNSUPPORTED("2g0zjfujimxzkr97d2g902f35"); // lowest_active_reg; this_reg--) { ; reg_info[this_reg].word = fail_stack.stack[--fail_stack.avail]; ; regend[this_reg] = (const char *) fail_stack.stack[--fail_stack.avail].pointer; ; UNSUPPORTED("2qadsytv032wa95wodwip6p4p"); // regstart[this_reg] = (const char *) fail_stack.stack[--fail_stack.avail].pointer; ; } else { for (this_reg = highest_active_reg; this_reg > highest_active_reg; this_reg--) { reg_info[this_reg].word.integer = 0; regend[this_reg] = 0; UNSUPPORTED("1sgt5yrkh4wqtk60f39qhmqyh"); // regstart[this_reg] = 0; } highest_active_reg = highest_active_reg; } set_regs_matched_done = 0; ; }; UNSUPPORTED("a59azprq7sley0l2fkpr8iplf"); // /* If this failure point is a dummy, try the next one. */ UNSUPPORTED("27dzlpjb6otkjse11xs60aoen"); // if (!p) UNSUPPORTED("etjodgz127fwk1r4166wqxg7n"); // goto fail; UNSUPPORTED("5ezd84f3c0gvxbdr48go3nu9d"); // /* If we failed to the end of the pattern, don't examine *p. */ UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("enro4gwm81mrbyp937vtdmluy"); // if (p < pend) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("5bmgzdh5rp0tqqvuep6upitw5"); // boolean is_a_jump_n = 0; UNSUPPORTED("6rryel9f7nixy5bn6j0bu5pim"); // /* If failed to a backwards jump that's part of a repetition UNSUPPORTED("6lkiil4jkazqh0sr2kuzl2a6n"); // loop, need to pop this failure point and use the next one. */ UNSUPPORTED("3ov8y2d12vzh7q5i3tuyoelxe"); // switch ((re_opcode_t) *p) UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { UNSUPPORTED("bok1esp1zekmbuklmyk3rk5rx"); // case jump_n: UNSUPPORTED("38gwuf75sc2x4fup5mqsis4x6"); // is_a_jump_n = 1; UNSUPPORTED("75n3w229uzeshyir5i61r1043"); // case maybe_pop_jump: UNSUPPORTED("a8ugqe6z5croeioatypl4otaw"); // case pop_failure_jump: UNSUPPORTED("6l3m2qx4riktyve4e2l0wh9fe"); // case jump: UNSUPPORTED("84b1pj26tamclxb0mw5nrxg5g"); // p1 = p + 1; UNSUPPORTED("4sq4b65a0bh8lf919g64pqica"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); UNSUPPORTED("8ocr60qo89yr0vtq5dj8v1owo"); // p1 += mcnt; UNSUPPORTED("6cxswairiyne2bjb1dmz6d26z"); // if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n) UNSUPPORTED("ekvd2x03u6gf8ylhhxyq7h336"); // || (!is_a_jump_n UNSUPPORTED("cw8zksvsbjm3lb2eh5chm46x2"); // && (re_opcode_t) *p1 == on_failure_jump)) UNSUPPORTED("bkcykqhkoe9lpop9i2qgzu9yp"); // goto fail; UNSUPPORTED("1fg4xctmq8acy7m0oob45guaz"); // break; UNSUPPORTED("cyzkq50b2b248lxpi6lj66jqs"); // default: UNSUPPORTED("2oxjzlotqn0ba3akkxgs9h02q"); // /* do nothing */ ; UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("9g1qr2dsx4ng98gqf2c94flil"); // if (d >= string1 && d <= end1) UNSUPPORTED("eb6uc0689wgv8mqsvkm38mu5z"); // dend = end_match_1; UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else UNSUPPORTED("8dc5stfweb0p9s0z2aqvucjp7"); // break; /* Matching at this starting point really fails. */ UNSUPPORTED("7mfls4p0ojvjkaotqvjflu5ht"); // } /* for (;;) */ UNSUPPORTED("78m9mze1ip3qflmasmayufoml"); // if (best_regs_set) UNSUPPORTED("2mqxvuzj0ksk0m6oea72s11bm"); // goto restore_best_regs; UNSUPPORTED("d7ubx9odh5b3nkaac1zt1epbl"); // do { ; if ((void*) regstart) ((void)0); (void*) regstart = (void *)0; if ((void*) regend) ((void)0); (void*) regend = (void *)0; if ((void*) old_regstart) ((void)0); (void*) old_regstart = (void *)0; if ((void*) old_regend) ((void)0); (void*) old_regend = (void *)0; if ((void*) best_regstart) ((void)0); (void*) best_regstart = (void *)0; if ((void*) best_regend) ((void)0); (void*) best_regend = (void *)0; if ((void*) reg_info) ((void)0); (void*) reg_info = (void *)0; if ((void*) reg_dummy) ((void)0); (void*) reg_dummy = (void *)0; if ((void*) reg_info_dummy) ((void)0); (void*) reg_info_dummy = (void *)0; } while (0); UNSUPPORTED("2k1latznr3ux22xinn931zwue"); // return -1; /* Failure to match. */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cq5u8rqlecamd29odxfaybq58 // static boolean group_match_null_string_p(unsigned char **p, unsigned char *end, register_info_type *reg_info) public static Object group_match_null_string_p(Object... arg) { UNSUPPORTED("etarlz3ybg3wdofiesiw8dwbq"); // static boolean UNSUPPORTED("7fmzghcqs81ua3tkzybmg2t5u"); // group_match_null_string_p(unsigned char **p, UNSUPPORTED("2800cclhjee5reqodgs0uz6jp"); // unsigned char *end, UNSUPPORTED("1zudh11exsdumrcui0azslboo"); // register_info_type *reg_info) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5rwd4tuvikkbfw1s56awbwtbe"); // int mcnt; UNSUPPORTED("dbm120px96ap42fmbuxy5yrj5"); // /* Point to after the args to the start_memory. */ UNSUPPORTED("bjzqlm993x9boruj0kyeol53l"); // unsigned char *p1 = *p + 2; UNSUPPORTED("azfsm7rfz2u17du52a0mrfyoq"); // while (p1 < end) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("23a56718i3eh15dzfmbft7w8p"); // /* Skip over opcodes that can match nothing, and return true or UNSUPPORTED("bbrge68fsb7cmb7ocyo176sox"); // false, as appropriate, when we get to one that can't, or to the UNSUPPORTED("9nn48i9apg1r7w3mm0yftr0gb"); // matching stop_memory. */ UNSUPPORTED("3kakimebymsdj9dnon7o0iz9v"); // switch ((re_opcode_t) *p1) UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { UNSUPPORTED("dpdkpfbea8z9xx4m3qriv0ks"); // /* Could be either a loop or a series of alternatives. */ UNSUPPORTED("992rmruvdtrxnk46307iiqyjo"); // case on_failure_jump: UNSUPPORTED("4hemvstzejy8d3hmd82kukj7v"); // p1++; UNSUPPORTED("18pz18zbmozo48uq20alb8ok5"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); UNSUPPORTED("7ysd5uwx66rnhuasuke0gw17h"); // /* If the next operation is not a jump backwards in the UNSUPPORTED("chqkvvtqui6nji6p4nqjnxnc0"); // pattern. */ UNSUPPORTED("clp8uz1ldh06ksh93asr2xtu6"); // if (mcnt >= 0) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("9vuq76qui8wedzsb144fnx8dd"); // /* Go through the on_failure_jumps of the alternatives, UNSUPPORTED("4k14n5k0mqv0fovwitf4alxzx"); // seeing if any of the alternatives cannot match nothing. UNSUPPORTED("clkpepohs7tguzyn8ncluhakf"); // The last alternative starts with only a jump, UNSUPPORTED("49dbeehco6191jqwdivzoevhh"); // whereas the rest start with on_failure_jump and end UNSUPPORTED("6h3f5m3yjc34la8qgzsbzbcsv"); // with a jump, e.g., here is the pattern for `a|b|c': UNSUPPORTED("9m5jtr9332etcn1h5ctckidp4"); // /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6 UNSUPPORTED("ck48ad3kd04evjrca6aqzw2g"); // /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3 UNSUPPORTED("6vxw9gryj1dxtxoycbews4j87"); // /exactn/1/c UNSUPPORTED("3p6xfpp9zbgix9sb10dz2cfhd"); // So, we have to first go through the first (n-1) UNSUPPORTED("cp25hojwgralgldniw273kdj3"); // alternatives and then deal with the last one separately. */ UNSUPPORTED("9a0det71z82exleln86167ddq"); // /* Deal with the first (n-1) alternatives, which start UNSUPPORTED("az6wcsp2m1rn4g8e9nkvxomfi"); // with an on_failure_jump (see above) that jumps to right UNSUPPORTED("cip7j7cjuis96j2g1tyo2fogf"); // past a jump_past_alt. */ UNSUPPORTED("am40qiyqgt5i95zqw8gmfb43f"); // while ((re_opcode_t) p1[mcnt-3] == jump_past_alt) UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { UNSUPPORTED("2lhz8ag4lccpzb4fzqq8rviyo"); // /* `mcnt' holds how many bytes long the alternative UNSUPPORTED("bu59ahle478dwgxifr5a81zrn"); // is, including the ending `jump_past_alt' and UNSUPPORTED("4xvr333ml76572j0cidzpewwy"); // its number. */ UNSUPPORTED("6tqlvyqvppynpnuuf3j8ebtlu"); // if (!alt_match_null_string_p (p1, p1 + mcnt - 3, UNSUPPORTED("3cqjfljoigoe1s3yctsmb49io"); // reg_info)) UNSUPPORTED("5eqwqroxusaik54ze9ykumu4w"); // return 0; UNSUPPORTED("1nweigx3aj1nu16la9727cgek"); // /* Move to right after this alternative, including the UNSUPPORTED("9wjlfe40zk6mcnijph9zw3skr"); // jump_past_alt. */ UNSUPPORTED("8ocr60qo89yr0vtq5dj8v1owo"); // p1 += mcnt; UNSUPPORTED("7me1al3m500othjustdgp25s8"); // /* Break if it's the beginning of an n-th alternative UNSUPPORTED("bsa0fgfj9n2wksuh9f164m03i"); // that doesn't begin with an on_failure_jump. */ UNSUPPORTED("dxkrs3xxv5uhishofpjt2j6mb"); // if ((re_opcode_t) *p1 != on_failure_jump) UNSUPPORTED("7vckzntfuo1ibi8r53gsfg8al"); // break; UNSUPPORTED("dcrlv6lsj26x00kq7h5mb1tft"); // /* Still have to check that it's not an n-th UNSUPPORTED("ehy9rg3hrcurcpp2ofykuu16t"); // alternative that starts with an on_failure_jump. */ UNSUPPORTED("3aju47l7l855mt7l00l7xg11q"); // p1++; UNSUPPORTED("4sq4b65a0bh8lf919g64pqica"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); UNSUPPORTED("7i4x97abeu0pj34gwgukjoe00"); // if ((re_opcode_t) p1[mcnt-3] != jump_past_alt) UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { UNSUPPORTED("7v0khgzw96aytjvy24azi9yi3"); // /* Get to the beginning of the n-th alternative. */ UNSUPPORTED("d58xf2hqair572yx3r8pofa0e"); // p1 -= 3; UNSUPPORTED("b4o9itamiw6ccgnlojl73v2fx"); // break; UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } UNSUPPORTED("j8cvgeroqesrtqchx5ejvs06"); // /* Deal with the last alternative: go back and get number UNSUPPORTED("b74m2a2e9cgu2v8i8t1u5b2x1"); // of the `jump_past_alt' just before it. `mcnt' contains UNSUPPORTED("cu400hxya6t1qs6iquuqabq0s"); // the length of the alternative. */ UNSUPPORTED("26bdoghsw938ft3sgehp275kx"); // do { (mcnt) = *(p1 - 2) & 0377; (mcnt) += ((((unsigned char) (*((p1 - 2) + 1))) ^ 128) - 128) << 8; } while (0); UNSUPPORTED("3xtanhdz88xahyfe15omt5obd"); // if (!alt_match_null_string_p (p1, p1 + mcnt, reg_info)) UNSUPPORTED("4h8qa3kxqmv2m8g445wmasnl"); // return 0; UNSUPPORTED("f53vent58m68zyw39fxmgqbr0"); // p1 += mcnt; /* Get past the n-th alternative. */ UNSUPPORTED("9euvgwd19qm3deiwc663wdzb0"); // } /* if mcnt > 0 */ UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("3q89uw4g68y7kyiitvliyykpb"); // case stop_memory: UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; UNSUPPORTED("8jfkppp2w8v4t5gyqcelvinb4"); // *p = p1 + 2; UNSUPPORTED("15lnhn427yvuetx9312e81jrg"); // return 1; UNSUPPORTED("comxch6w0lbi64ejq9m4p0u7o"); // default: UNSUPPORTED("ir4atstqu8v5sqigzqbwdop4"); // if (!common_op_match_null_string_p (&p1, end, reg_info)) UNSUPPORTED("bwb5ofkxp13uiyvgbvx70039w"); // return 0; UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("55ht7a89z8ua4oqsrrwpapvpg"); // } /* while p1 < end */ UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 azrkydvahepcjvkkru2gdwg0m // static boolean alt_match_null_string_p(unsigned char *p, unsigned char *end, register_info_type *reg_info) public static Object alt_match_null_string_p(Object... arg) { UNSUPPORTED("etarlz3ybg3wdofiesiw8dwbq"); // static boolean UNSUPPORTED("7z4yu5m5t5mwjca6t6wpfajrj"); // alt_match_null_string_p(unsigned char *p, UNSUPPORTED("91jh331pn45y9rnhwhm4fiavm"); // unsigned char *end, UNSUPPORTED("ereoaeyy0phqbbu5cnhfb78ew"); // register_info_type *reg_info) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5rwd4tuvikkbfw1s56awbwtbe"); // int mcnt; UNSUPPORTED("15ytldlmpb2i6cvtxquvhjs2m"); // unsigned char *p1 = p; UNSUPPORTED("azfsm7rfz2u17du52a0mrfyoq"); // while (p1 < end) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("3e0wppcum116c0gyks4koglo6"); // /* Skip over opcodes that can match nothing, and break when we get UNSUPPORTED("ei8lrs2smmn3h63q7rpj9sd0o"); // to one that can't. */ UNSUPPORTED("3kakimebymsdj9dnon7o0iz9v"); // switch ((re_opcode_t) *p1) UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { UNSUPPORTED("5n9m839emxb8of9xbq805onsd"); // /* It's a loop. */ UNSUPPORTED("992rmruvdtrxnk46307iiqyjo"); // case on_failure_jump: UNSUPPORTED("4hemvstzejy8d3hmd82kukj7v"); // p1++; UNSUPPORTED("18pz18zbmozo48uq20alb8ok5"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); UNSUPPORTED("28bkn6qebb96emlyztm3kg6wt"); // p1 += mcnt; UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; UNSUPPORTED("comxch6w0lbi64ejq9m4p0u7o"); // default: UNSUPPORTED("ir4atstqu8v5sqigzqbwdop4"); // if (!common_op_match_null_string_p (&p1, end, reg_info)) UNSUPPORTED("bwb5ofkxp13uiyvgbvx70039w"); // return 0; UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("eixc7qyme2j14k5zjjghyiexn"); // } /* while p1 < end */ UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7hv0wkt4lrkp5whfzuke2qytb // static boolean common_op_match_null_string_p(unsigned char **p, unsigned char *end, register_info_type *reg_info) public static Object common_op_match_null_string_p(Object... arg) { UNSUPPORTED("etarlz3ybg3wdofiesiw8dwbq"); // static boolean UNSUPPORTED("8k0shz76dhg3w8h6nz5pjbbu2"); // common_op_match_null_string_p(unsigned char **p, UNSUPPORTED("28yc2ksklc2vvzt1s5ynbtv0f"); // unsigned char *end, UNSUPPORTED("6qhd2068gir26rtqc477pm6m1"); // register_info_type *reg_info) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5rwd4tuvikkbfw1s56awbwtbe"); // int mcnt; UNSUPPORTED("7n9r83dkya7i0zuq00imgrukd"); // boolean ret; UNSUPPORTED("7ju59c3dbukl0mz5vgjdoozn5"); // int reg_no; UNSUPPORTED("87zyg7fzbf21hmhh461pn9zf9"); // unsigned char *p1 = *p; UNSUPPORTED("qr7u5j2ref5m7rf6d3wqgmps"); // switch ((re_opcode_t) *p1++) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("cf4augtxav7j1ap91bbu3vwy1"); // case no_op: UNSUPPORTED("30ts9llmyexduvfuq7fczrer8"); // case begline: UNSUPPORTED("db3lgui4636z7pglgbzpqe54h"); // case endline: UNSUPPORTED("8fekxuxe035cl7l6pccwsy7fh"); // case begbuf: UNSUPPORTED("16msnj7hxrfentkv031ct5vc3"); // case endbuf: UNSUPPORTED("bcaajfoyi3jhpmdxhguo7iofc"); // case wordbeg: UNSUPPORTED("bkapw3yogqx0sw1ngisv3mb5d"); // case wordend: UNSUPPORTED("9pqp8vzoeyor0e1x4eqhthk8m"); // case wordbound: UNSUPPORTED("7hyd3tgheqr4untlslak7uheb"); // case notwordbound: UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("1olrmh5xaxc4lppwfnwemvaej"); // case start_memory: UNSUPPORTED("4rjnecf4q32xuk4ie6vozpkfh"); // reg_no = *p1; UNSUPPORTED("cf8srqrmhz47tb7zdgoe9ufhv"); // ; UNSUPPORTED("eluoqmhl3j8dyk8hyv680sy72"); // ret = group_match_null_string_p (&p1, end, reg_info); UNSUPPORTED("8hm5umlf6osua8zn0w4y735nh"); // /* Have to set this here in case we're checking a group which UNSUPPORTED("8xeab9le3ct3b2q7y6ly9yrhh"); // contains a group and a back reference to it. */ UNSUPPORTED("5kozscfkat4mdav2anbiib5hw"); // if (((reg_info[reg_no]).bits.match_null_string_p) == 3) UNSUPPORTED("7qym75wzdha4x8u9v6fik2mwy"); // ((reg_info[reg_no]).bits.match_null_string_p) = ret; UNSUPPORTED("4cj58wdjt8jr4gsngmucb56o0"); // if (!ret) UNSUPPORTED("9co1titw8ibive55ugr6yfqa4"); // return 0; UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("608rfpgf7ytuxs7hkgnig1by5"); // /* If this is an optimized succeed_n for zero times, make the jump. */ UNSUPPORTED("9agy5bj4opmh2vksf6lpzm8cd"); // case jump: UNSUPPORTED("9ngggpjqcpnq88nnkxr6y7vpq"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); UNSUPPORTED("1fxhzdbiknha03fye9yen0bje"); // if (mcnt >= 0) UNSUPPORTED("blqj2uomfewkrosqhn5f7bu73"); // p1 += mcnt; UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else UNSUPPORTED("9co1titw8ibive55ugr6yfqa4"); // return 0; UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("e7ahhsjjo9f2hw3bbtucupqlw"); // case succeed_n: UNSUPPORTED("9gimh1u1p2gmf0q5weiqpbbop"); // /* Get to the number of times to succeed. */ UNSUPPORTED("1xi9qxsoaehueyjhabvspqapk"); // p1 += 2; UNSUPPORTED("9ngggpjqcpnq88nnkxr6y7vpq"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); UNSUPPORTED("1ju62vxdlb0sw55v80s2h9p8i"); // if (mcnt == 0) UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { UNSUPPORTED("9o2tf6im70km8pb1v0mz4tbhc"); // p1 -= 4; UNSUPPORTED("18pz18zbmozo48uq20alb8ok5"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); UNSUPPORTED("28bkn6qebb96emlyztm3kg6wt"); // p1 += mcnt; UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else UNSUPPORTED("9co1titw8ibive55ugr6yfqa4"); // return 0; UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("8qjtjs80wrz4f6y4td1b7mvma"); // case duplicate: UNSUPPORTED("asaad7roragv1dquu2i7eek6v"); // if (!((reg_info[*p1]).bits.match_null_string_p)) UNSUPPORTED("9co1titw8ibive55ugr6yfqa4"); // return 0; UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("75h4k3rjfi85b2x98vw0ydipc"); // case set_number_at: UNSUPPORTED("4n2daij5pdw7lao7n4sjeg0jt"); // p1 += 4; UNSUPPORTED("p0mt8wznalavjdm44ot4ykl7"); // default: UNSUPPORTED("7clvngmkw0ra8af8a3iq45vx"); // /* All other opcodes mean we cannot match the empty string. */ UNSUPPORTED("7opo20y2y6rg5i89ocvk6qi3c"); // return 0; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("7aoui9hygj5j6kdd0rxq44xxu"); // *p = p1; UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bmn9h3qza6i9e7dqjjfrybinz // static int bcmp_translate(const char *s1, const char *s2, register int len, char * translate) public static Object bcmp_translate(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("49tjvn2d5kzof9i3764qd8gth"); // bcmp_translate(const char *s1, UNSUPPORTED("5uinwhadus9kwopd7lyrqnv1a"); // const char *s2, UNSUPPORTED("cmbl8wi47y4b1fybqcgqp3cad"); // register int len, UNSUPPORTED("buglwifdxboeujcjzksjh6swn"); // char * translate) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1ugbvzngjn5o1kzerkwa4adyp"); // register const unsigned char *p1 = (const unsigned char *) s1; UNSUPPORTED("180lhbq291ugus1sv6zq5b3l5"); // register const unsigned char *p2 = (const unsigned char *) s2; UNSUPPORTED("6wkqjlkf1iustuo36c77rrlrr"); // while (len) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("ezhykxoqbj0p9ighugfp2pi29"); // if (translate[*p1++] != translate[*p2++]) return 1; UNSUPPORTED("bzd5vvu7ht1mg1wbv21csikm0"); // len--; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 34ah0o8fvtlfnsffbxiyqyidp // const char * re_compile_pattern(const char *pattern, size_t length, struct re_pattern_buffer *bufp) public static Object re_compile_pattern(Object... arg) { UNSUPPORTED("6j2ty6zxx5788lqe504lttmv9"); // const char * UNSUPPORTED("840rb5ffowq19aqwebzlrs0ix"); // re_compile_pattern(const char *pattern, UNSUPPORTED("dl8tq4y4w9kpglxq4nad9nbg9"); // size_t length, UNSUPPORTED("aoahpx5nic1p28er7zbeilibx"); // struct re_pattern_buffer *bufp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3e5irvh3tz7ehf2px38xbca06"); // reg_errcode_t ret; UNSUPPORTED("5e5qu4o19kt10axby5ksjp1wz"); // /* GNU code is written to assume at least RE_NREGS registers will be set UNSUPPORTED("aj16ee11rx90k6v260pcrptdx"); // (and at least one extra will be -1). */ UNSUPPORTED("45osi16xhss2jxm7u3qpsz7c8"); // bufp->regs_allocated = 0; UNSUPPORTED("1s5igzhlf8kjprjkw59u0qgie"); // /* And GNU code determines whether or not to get register information UNSUPPORTED("4guz1aey6odyu4c6y9tmn7zks"); // by passing null for the REGS argument to re_match, etc., not by UNSUPPORTED("52atj9kiaa2ty4xp5v9tsxd36"); // setting no_sub. */ UNSUPPORTED("bbp8v34kk2eq5jyypmrxegzfj"); // bufp->no_sub = 0; UNSUPPORTED("9zh94yub2h9x6jb5ygl7zj9j3"); // /* Match anchors at newline. */ UNSUPPORTED("e5hvlkcul9024me3za5w0z09"); // bufp->newline_anchor = 1; UNSUPPORTED("f3zeg0ozvbzdxvagvz40uveju"); // ret = regex_compile (pattern, length, re_syntax_options, bufp); UNSUPPORTED("2ymc69pz5pg0nhr5joxv3v743"); // if (!ret) UNSUPPORTED("4mszslwsjcaxojerluqjpsu2v"); // return (void *)0; UNSUPPORTED("d6waz7r04hy6vrqylyux3566y"); // return (re_error_msgid[(int) ret]); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ark6qnryn24fu1bsbt5806lp // int regcomp(regex_t *preg, const char *pattern, int cflags) public static Object regcomp(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("blyavrrspx8u7mmx6skbsrpuy"); // regcomp(regex_t *preg, UNSUPPORTED("ez93viyirx32wiwx9ilmwnk2u"); // const char *pattern, UNSUPPORTED("s47pwvnf26eqviz0566rtafr"); // int cflags) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3e5irvh3tz7ehf2px38xbca06"); // reg_errcode_t ret; UNSUPPORTED("arhekyz17wtkt6jcym8vpwl49"); // reg_syntax_t syntax UNSUPPORTED("cbdjhw8vkpou2zuaqsu38y9nq"); // = (cflags & 1) ? UNSUPPORTED("79wzspap1pncga08fi5fl45p3"); // ((((((unsigned long int) 1) << 1) << 1) | ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | ((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) | (((((unsigned long int) 1) << 1) << 1) << 1) | ((((((unsigned long int) 1) << 1) << 1) << 1) << 1) | ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) : ((((((unsigned long int) 1) << 1) << 1) | ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | ((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) | (((unsigned long int) 1) << 1)); UNSUPPORTED("2c2dfk6a0ejxysnnaajue8m3p"); // /* regex_compile will allocate the space for the compiled pattern. */ UNSUPPORTED("ciyvseirt32x5s8n7w8wi9s8b"); // preg->buffer = 0; UNSUPPORTED("b766kips3z6tm9tifbomnvtmy"); // preg->allocated = 0; UNSUPPORTED("2ne52scg87du6fvmgx4iz1ysx"); // preg->used = 0; UNSUPPORTED("dxwa3e8lqasfevebnvit8vz60"); // /* Don't bother to use a fastmap when searching. This simplifies the UNSUPPORTED("d5umtgupwg9d4iorhfyjyv8h5"); // REG_NEWLINE case: if we used a fastmap, we'd have to put all the UNSUPPORTED("ci8pjdo3b21gzu9zuu8df58su"); // characters after newlines into the fastmap. This way, we just try UNSUPPORTED("b5ux13ie7uoiwgtxbhqxccoi6"); // every character. */ UNSUPPORTED("57t8as5xu3zastwhuvl9x5qvx"); // preg->fastmap = 0; UNSUPPORTED("enpzhkdq6ocdhen3xvl8ye5na"); // if (cflags & (1 << 1)) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("nujvj3hueebzfkhe2zarvfil"); // unsigned i; UNSUPPORTED("1pg69zbhom0cik7h8kn6t7y3g"); // preg->translate UNSUPPORTED("4nsrzyk2btcgmsdqjm2ar3vro"); // = (char *) malloc (256 UNSUPPORTED("121bcje0610pzlltu9346d7c4"); // * sizeof (*(char *)0)); UNSUPPORTED("bg80cnygjx78pa8v3kgmb63z4"); // if (preg->translate == (void *)0) UNSUPPORTED("ez6fz5kzz38v9ggr3wcumi254"); // return (int) REG_ESPACE; UNSUPPORTED("1vzdm7mgve5oi32ohhuqg8i00"); // /* Map uppercase characters to corresponding lowercase ones. */ UNSUPPORTED("d532lt7aisdb9o1mkdskq134t"); // for (i = 0; i < 256; i++) UNSUPPORTED("aty2mttvyracw7p9x8sls4efr"); // preg->translate[i] = (1 && isupper (i)) ? tolower (i) : i; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("c74ru7c24sev3knmidtcsy39e"); // preg->translate = (void *)0; UNSUPPORTED("a5kyad26nzmqkixgei1o847n"); // /* If REG_NEWLINE is set, newlines are treated differently. */ UNSUPPORTED("db72pzje2ov1p3o5omyykyi7e"); // if (cflags & ((1 << 1) << 1)) UNSUPPORTED("bpj2wmqxauupj14jn3tkadfjh"); // { /* REG_NEWLINE implies neither . nor [^...] match newline. */ UNSUPPORTED("359fgbemkmx8zzoobn2anh8hi"); // syntax &= ~((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1); UNSUPPORTED("6g64qw2xiqubh3y7z9htmuzh5"); // syntax |= ((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1); UNSUPPORTED("ciyi7qvu3im41264ljmdkdzcl"); // /* It also changes the matching behavior. */ UNSUPPORTED("8qz1elzfwgfxjvri21nioniys"); // preg->newline_anchor = 1; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("2vftf31ujo45k9qv67n4ycbkv"); // preg->newline_anchor = 0; UNSUPPORTED("cx4zfp27tpwfh8xisrvqqbgks"); // preg->no_sub = !!(cflags & (((1 << 1) << 1) << 1)); UNSUPPORTED("2x159h0yz24rnjci2cq7y1ntz"); // /* POSIX says a null character in the pattern terminates it, so we UNSUPPORTED("d66drlhc8quicmkt8miicu0ea"); // can use strlen here in compiling the pattern. */ UNSUPPORTED("d0cg1xygicxugayg5yya59guo"); // ret = regex_compile (pattern, strlen (pattern), syntax, preg); UNSUPPORTED("erkyjok9d0k2psk0sb56f6vvz"); // /* POSIX doesn't distinguish between an unmatched open-group and an UNSUPPORTED("1u6sohla9epfpyet1i7nzcgad"); // unmatched close-group: both are REG_EPAREN. */ UNSUPPORTED("3e5v05pv5yk1o9jdj6bh0zg5w"); // if (ret == REG_ERPAREN) ret = REG_EPAREN; UNSUPPORTED("7ancqvxv19g9moyznhw9my8xj"); // // printf("done with regcomp\n"); UNSUPPORTED("f3hb5xwlfzeslhmq4ytwr8pgd"); // return (int) ret; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9wdgvv1gwc1o7f0w05768p2i3 // int regexec(const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags) public static Object regexec(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("2v3o1uaqb2zp3puxfw779kms2"); // regexec(const regex_t *preg, UNSUPPORTED("ekpgp0iac0e6o9udtd55uiuly"); // const char *string, UNSUPPORTED("dvlw3353jood9rlb0w1geec5z"); // size_t nmatch, UNSUPPORTED("2864eyed7whs62o97tq2npado"); // regmatch_t pmatch[], UNSUPPORTED("3i4rg5r8fnniwlx6ybr4n906a"); // int eflags) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7p7i4cv4qt10ow22vl9znw72j"); // int ret; UNSUPPORTED("82u0gsptykltdsomlyhj9rk19"); // struct re_registers regs; UNSUPPORTED("9z47qt0zii8jvt2jglo0lgszf"); // regex_t private_preg; UNSUPPORTED("6tsm0ylmo6ex2b24vcrr2cim7"); // int len = strlen (string); UNSUPPORTED("17kwuhblkqgc3mdapwyc395sz"); // boolean want_reg_info = !preg->no_sub && nmatch > 0; UNSUPPORTED("agwedmhzs0prdnnlk9jnsfg9c"); // private_preg = *preg; UNSUPPORTED("13e7wtxa8hlobsw8k2nqqg3r3"); // private_preg.not_bol = !!(eflags & 1); UNSUPPORTED("57scmexrxxrwf0l9nzr1szrpt"); // private_preg.not_eol = !!(eflags & (1 << 1)); UNSUPPORTED("mql47hhdnpgkjou517m3726f"); // /* The user has told us exactly how many registers to return UNSUPPORTED("cqy8u5p4xwvs8y4q6w7fce3xv"); // information about, via `nmatch'. We have to pass that on to the UNSUPPORTED("3rosx96qxeg0kqk0uxh7l1cl8"); // matching routines. */ UNSUPPORTED("c013ob9fi1fg0vxd1oam5865g"); // private_preg.regs_allocated = 2; UNSUPPORTED("9rkeiv1fdp19eb173sjfltu2t"); // if (want_reg_info) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("8a02jnbpnzttrw1ayq7w5mj62"); // regs.num_regs = nmatch; UNSUPPORTED("aoe6tbrgjwbzymn65261rgcum"); // regs.start = ((regoff_t *) malloc ((nmatch) * sizeof (regoff_t))); UNSUPPORTED("3hfltfy7wmk9a24vq9wzlmq9v"); // regs.end = ((regoff_t *) malloc ((nmatch) * sizeof (regoff_t))); UNSUPPORTED("7njv4u89envwukxkawqtq0oto"); // if (regs.start == (void *)0 || regs.end == (void *)0) UNSUPPORTED("873f3rccmawjgt3m3uqo8p3ci"); // return (int) REG_NOMATCH; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("a8yuopeuk07ow83nm5njscoxn"); // /* Perform the searching operation. */ UNSUPPORTED("cwamuwhai30lyfbzzvibn401x"); // ret = re_search (&private_preg, string, len, UNSUPPORTED("6jnlnbkqqmvrtbxyne0meo7jt"); // /* start: */ 0, /* range: */ len, UNSUPPORTED("1xnfnhd8hk3tln4va3uu7f2wm"); // want_reg_info ? ®s : (struct re_registers *) 0); UNSUPPORTED("86oesm7mqi9hv2n08zwleh73m"); // /* Copy the register information to the POSIX structure. */ UNSUPPORTED("9rkeiv1fdp19eb173sjfltu2t"); // if (want_reg_info) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("ce73wb0bbrngqy808tp6ppsrq"); // if (ret >= 0) UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { UNSUPPORTED("bxs4m6oognafzhor2ww93b692"); // unsigned r; UNSUPPORTED("8soywsau32kjtl93ct4sxxyma"); // for (r = 0; r < nmatch; r++) UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { UNSUPPORTED("cfq91dne0qag57cuzkcw5mxcg"); // pmatch[r].rm_so = regs.start[r]; UNSUPPORTED("gibau4k00r5dzlvk4kcbwb56"); // pmatch[r].rm_eo = regs.end[r]; UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("c0xnifbhwrr011t5ogyy7sxk4"); // /* If we needed the temporary register info, free the space now. */ UNSUPPORTED("ec72z8dmt4gcwsz42a7ubbvgx"); // free (regs.start); UNSUPPORTED("8gandm25f5zvbvckszq77jha"); // free (regs.end); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("7dob0tgisyvw4rk6jg4viupyw"); // /* We want zero return to mean success, unlike `re_search'. */ UNSUPPORTED("246hp3joht768z00rf97n4yvo"); // return ret >= 0 ? (int) REG_NOERROR : (int) REG_NOMATCH; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6u3voe6b7jao3ubd49rpvpmmx // size_t regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) public static Object regerror(Object... arg) { UNSUPPORTED("4hv4edbckfpx53agqilues063"); // size_t UNSUPPORTED("72xsdxwxd93qf4oxx4jyhdo8z"); // regerror(int errcode, UNSUPPORTED("asif8gxw337t4n3r3vlc5nfry"); // const regex_t *preg, UNSUPPORTED("7k1ct0qwx3daob1tp19njd6q0"); // char *errbuf, UNSUPPORTED("dx6x6qmmym6uzf7roqbw9kvt"); // size_t errbuf_size) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("91x25pzkmtzqo9hslez13lges"); // const char *msg; UNSUPPORTED("6m38jprvakqd3ls3jeotcz1xg"); // size_t msg_size; UNSUPPORTED("adpjyd1odey6jlw7vkjk429xt"); // if (errcode < 0 UNSUPPORTED("8ybd3hnsngs38rh8ddk8q0w26"); // || errcode >= (int) (sizeof (re_error_msgid) UNSUPPORTED("c9vfuy341wx3rri8wvq9sua5s"); // / sizeof (re_error_msgid[0]))) UNSUPPORTED("7u1uewk6wx5joexwehp38vlng"); // /* Only error codes returned by the rest of the code should be passed UNSUPPORTED("6hlmqhjzj6vqjlpwwklal6m89"); // to this routine. If we are given anything else, or if other regex UNSUPPORTED("cbs38fwyo0gkko91u7cenjci"); // code generates an invalid error code, then the program has a bug. UNSUPPORTED("8or7291qatc4r8j81dj07fgb4"); // Dump core so we can fix it. */ UNSUPPORTED("68wdgoila4oldpk4gdc6i6uc3"); // abort (); UNSUPPORTED("4yci96v8pzj722abptwqxdkso"); // msg = (re_error_msgid[errcode]); UNSUPPORTED("dujj3eb9b3zvr0euc5s4itcj"); // msg_size = strlen (msg) + 1; /* Includes the null. */ UNSUPPORTED("6oho364pztumj8yc7uc6bsusm"); // if (errbuf_size != 0) UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { UNSUPPORTED("4oxtwxt5zv8auje423kp2f05r"); // if (msg_size > errbuf_size) UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { UNSUPPORTED("3cof3rq3oujwsp8nrbb9snh96"); // strncpy (errbuf, msg, errbuf_size - 1); UNSUPPORTED("17sh1j757ozjg8a39nvcnmean"); // errbuf[errbuf_size - 1] = 0; UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else UNSUPPORTED("6ru8c1linplme96gzmn6v9ezn"); // strcpy (errbuf, msg); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("ban7kvxs6qguwfg0cz79w2fqe"); // return msg_size; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1ydg62ufhooqvgftuuovy004y // void regfree(regex_t *preg) public static Object regfree(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("yxtwt5xf8mgfwucdzaq8xg0"); // regfree(regex_t *preg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("axv8f27k41wevzbd8jorfk8em"); // if (preg->buffer != (void *)0) UNSUPPORTED("4krgfpqw59bwla8p73a5potcs"); // free (preg->buffer); UNSUPPORTED("duswsbmztnkjw8nmmpoanyq0l"); // preg->buffer = (void *)0; UNSUPPORTED("b766kips3z6tm9tifbomnvtmy"); // preg->allocated = 0; UNSUPPORTED("2ne52scg87du6fvmgx4iz1ysx"); // preg->used = 0; UNSUPPORTED("ac48j1opcvu8p6bmkvhdmubhe"); // if (preg->fastmap != (void *)0) UNSUPPORTED("43aaw7li7lbfcd1lewzzyp7to"); // free (preg->fastmap); UNSUPPORTED("4lv04h2kcmrw99yqy6i26w8g4"); // preg->fastmap = (void *)0; UNSUPPORTED("5e92vh1r7ol7emrm0ijcg45a9"); // preg->fastmap_accurate = 0; UNSUPPORTED("e4iva4m5k6n7oj8enuvyimttj"); // if (preg->translate != (void *)0) UNSUPPORTED("4mliivt4jjgt9njb860f17323"); // free (preg->translate); UNSUPPORTED("7c5ulxpurhe3moa5q2eu01tom"); // preg->translate = (void *)0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/label/000077500000000000000000000000001312650303100170435ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/lib/label/index__c.java000066400000000000000000000444211312650303100214630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.label; import static smetana.core.Macro.UNSUPPORTED; public class index__c { //3 1rfaqe5urty5uyp5xb2r0idce // LeafList_t *RTreeNewLeafList(Leaf_t * lp) public static Object RTreeNewLeafList(Object... arg) { UNSUPPORTED("bu04wzk5vh5g14rcm11j6y1bc"); // LeafList_t *RTreeNewLeafList(Leaf_t * lp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8mcrniwafqlmy5ysg6jeand6o"); // LeafList_t *llp; UNSUPPORTED("3b215c61vcll0rkorzyelp40j"); // if ((llp = (LeafList_t*)zmalloc(sizeof(LeafList_t)))) { UNSUPPORTED("48u04cv4b40c0avzy99mdycx5"); // llp->leaf = lp; UNSUPPORTED("bbvk7v1s0z6yw1xdoq99v233w"); // llp->next = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5a1d3zolzdjict0gus6vz04a2"); // return llp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6pvstz7axi8a7saeqe3nrrmg5 // LeafList_t *RTreeLeafListAdd(LeafList_t * llp, Leaf_t * lp) public static Object RTreeLeafListAdd(Object... arg) { UNSUPPORTED("eiwtmfygcnm8i2i38dywdrxvu"); // LeafList_t *RTreeLeafListAdd(LeafList_t * llp, Leaf_t * lp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c8jefspkzejjwynx8rg8zejbx"); // LeafList_t *nlp; UNSUPPORTED("5whcehr1j26r7aahssfvo2dxa"); // if (!lp) UNSUPPORTED("1sxqq75kqdqzr0enoukqqx3m1"); // return llp; UNSUPPORTED("adl5lp3lwoh3u5zssznsdnxms"); // nlp = RTreeNewLeafList(lp); UNSUPPORTED("373n3s0slcur0mj477nbkp2z9"); // nlp->next = llp; UNSUPPORTED("c398zm44c0kp59y82avlt28qs"); // return nlp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6zraor7x44vrnm19d2igkvow2 // void RTreeLeafListFree(LeafList_t * llp) public static Object RTreeLeafListFree(Object... arg) { UNSUPPORTED("cwsuv5x6hz2atkriag0lyrwpq"); // void RTreeLeafListFree(LeafList_t * llp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("96shepyp7pgdusod9eu04oqsa"); // LeafList_t *tlp; UNSUPPORTED("66etdhvz2fmsepzj2nfiioze9"); // while (llp->next) { UNSUPPORTED("aa7iqc08758zwe37qyy2wffec"); // tlp = llp->next; UNSUPPORTED("efbq5hg14ncf3x5du5wro1m6d"); // free(llp); UNSUPPORTED("6qcaq7a673zdej3uu1ke2kz0a"); // llp = tlp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("41smjtwh6jsdofomjdbd76o7j"); // free(llp); UNSUPPORTED("b9185t6i77ez1ac587ul8ndnc"); // return; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3wss9r0zgt5k06j8ovjv7hq0d // int RTreeInsert(RTree_t * rtp, Rect_t * r, void *data, Node_t ** n, int level) public static Object RTreeInsert(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("4vefy88zis2pcgmerh9m6nllk"); // RTreeInsert(RTree_t * rtp, Rect_t * r, void *data, Node_t ** n, int level) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8ey3knwkpac8aeth9v8pxu3jo"); // /* RTreeInsert(RTree_t*rtp, Rect_t*r, int data, Node_t**n, int level) { */ UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i; UNSUPPORTED("bp3fw6x5k0c1muih5wl2fmk9n"); // register Node_t *newroot; UNSUPPORTED("k2d14nu7r2g4yefydufxqa6l"); // Node_t *newnode=0; UNSUPPORTED("8jhu5fyksz5wgdvvak4rqzjog"); // Branch_t b; UNSUPPORTED("1dfkfq72ilaevpylx2giyequh"); // int result = 0; UNSUPPORTED("3lp95fcfxfbsb08w5umj6mjxb"); // assert(r && n); UNSUPPORTED("jakzrkbz09r9gvlx5yfqsq4t"); // assert(level >= 0 && level <= (*n)->level); UNSUPPORTED("1acecsj25mg52d6624llst9la"); // for (i = 0; i < 2; i++) UNSUPPORTED("au1dzglobtl3y92py1o59k29w"); // assert(r->boundary[i] <= r->boundary[2 + i]); UNSUPPORTED("21ol6vbghnu1ewovfs645sts7"); // if (rtp->StatFlag) { UNSUPPORTED("akhni40ndam0u9c6i7raxw4mp"); // if (rtp->Deleting) UNSUPPORTED("bzb1oqc35evr96528iv16glb0"); // rtp->ReInsertCount++; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("3kxquse3qg2crme5dzybg9jxe"); // rtp->InsertCount++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("872g4yc6sa8rtep8wdqiys74d"); // if (!rtp->Deleting) UNSUPPORTED("4kv2cwozm6o06e73mjdidn17p"); // rtp->RectCount++; UNSUPPORTED("p721o575619ujgj5774sswe4"); // if (RTreeInsert2(rtp, r, data, *n, &newnode, level)) { /* root was split */ UNSUPPORTED("dhd7sfbis7klukcyf8rg2skvp"); // if (rtp->StatFlag) { UNSUPPORTED("2y8kv6b3ysrr61q7tqn76rhhc"); // if (rtp->Deleting) UNSUPPORTED("dn4oynmx9ugizzs5pkxiyptbi"); // rtp->DeTouchCount++; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("2u8wpa4w1q7rg14t07bny6p8i"); // rtp->InTouchCount++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("f1ubx3a7wizvjmsawzdn97nwy"); // newroot = RTreeNewNode(rtp); /* grow a new root, make tree taller */ UNSUPPORTED("cb1h5p8jnxwwzvaoyg1k27xmf"); // rtp->NonLeafCount++; UNSUPPORTED("1611m4hdihz2ns6tzb00du4f"); // newroot->level = (*n)->level + 1; UNSUPPORTED("7abewx8c16vuk9ksc6dh0co53"); // b.rect = NodeCover(*n); UNSUPPORTED("465b8w8j2mnvocx78bsxgs0si"); // b.child = *n; UNSUPPORTED("8lf6tafgpibucjtrng2bzhqt"); // AddBranch(rtp, &b, newroot, (void *)0); UNSUPPORTED("5ncet5h2bsh7p0gqx0zcjk8zs"); // b.rect = NodeCover(newnode); UNSUPPORTED("2iec9n0l9utuq5wm6188trocr"); // b.child = newnode; UNSUPPORTED("8lf6tafgpibucjtrng2bzhqt"); // AddBranch(rtp, &b, newroot, (void *)0); UNSUPPORTED("9kv07evealck0kkd4uos4gkz"); // *n = newroot; UNSUPPORTED("6s4qssw97iu3cy7cu2z00dnd"); // // rtp->root = newroot; UNSUPPORTED("5iff078lko2zs9b2cm7erd5kj"); // rtp->EntryCount += 2; UNSUPPORTED("akq58xm5u8sg03eunssjzl44f"); // result = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e73y2609z2557xahrcvzmcb8e"); // return result; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bsc9m7d7qc06m8id896e60lkg // static int RTreeInsert2(RTree_t * rtp, Rect_t * r, void *data, Node_t * n, Node_t ** new, int level) public static Object RTreeInsert2(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("e1c7cm1mq875co9obwzzyyxt"); // RTreeInsert2(RTree_t * rtp, Rect_t * r, void *data, UNSUPPORTED("4errdslfbv5x54v81wpgk55l7"); // Node_t * n, Node_t ** new, int level) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("d5termnm5bwrhia82rw6jvi00"); // /*static int */ UNSUPPORTED("12ickqloxyobilus63e3bdi65"); // /* RTreeInsert2(RTree_t*rtp, Rect_t*r, UNSUPPORTED("e27l28tilpvjc3y9m1iz6c51k"); // int data, Node_t*n, Node_t**new, int level) { UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("6crctkpvpno5y1bsv7yuqjnm2"); // register int i=0; UNSUPPORTED("8jhu5fyksz5wgdvvak4rqzjog"); // Branch_t b; UNSUPPORTED("4dqkrcduvdmv3d5fgv1enjacs"); // Node_t *n2=0; UNSUPPORTED("bsrr9pvjfr4ki5il3quxx4rqg"); // assert(r && n && new); UNSUPPORTED("5xudi4txe3k13af1mbe43tgbn"); // assert(level >= 0 && level <= n->level); UNSUPPORTED("21ol6vbghnu1ewovfs645sts7"); // if (rtp->StatFlag) { UNSUPPORTED("akhni40ndam0u9c6i7raxw4mp"); // if (rtp->Deleting) UNSUPPORTED("8k1kgaoa4b2mcye1xthc3f1kf"); // rtp->DeTouchCount++; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("1um729vqiy3529kbsrzyl9u3y"); // rtp->InTouchCount++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6bsiysfcc9wix18ej9zs9z659"); // /* Still above level for insertion, go down tree recursively */ UNSUPPORTED("4hz5jfabrdewpogbs7ahesjld"); // if (n->level > level) { UNSUPPORTED("2sz071aqfm5owiilsfyuw76rn"); // i = PickBranch(r, n); UNSUPPORTED("9qcjfckv31n1pds6m7zevi25p"); // if (!RTreeInsert2(rtp, r, data, n->branch[i].child, &n2, level)) { /* recurse: child was not split */ UNSUPPORTED("8yht6usxlnq2ubp9xeqjz71o"); // n->branch[i].rect = CombineRect(r, &(n->branch[i].rect)); UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("99yufmtztzeyeo68jo3yftbcf"); // } else { /* child was split */ UNSUPPORTED("7evrfdq7uc1smqislqm9d82l6"); // n->branch[i].rect = NodeCover(n->branch[i].child); UNSUPPORTED("echuth2qnq0o4n5gkzgtu5bgs"); // b.child = n2; UNSUPPORTED("50z4r9qcomgi4o7vvwq0v0xs"); // b.rect = NodeCover(n2); UNSUPPORTED("451qw2ioqybj69k9abzvqw4mk"); // rtp->EntryCount++; UNSUPPORTED("9uz11nbvh6yp6yq2axvo7e0fb"); // return AddBranch(rtp, &b, n, new); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3uu0fkl3xw648hn9rehmuq54y"); // } else if (n->level == level) { /* at level for insertion. */ UNSUPPORTED("cwtg3er5fpt2rr0k2efjapdmq"); // /*Add rect, split if necessary */ UNSUPPORTED("1xql4kr4r981y1whzdo5zavad"); // b.rect = *r; UNSUPPORTED("7w1b5nw2bj3zmo70m9bczwwov"); // b.child = (Node_t *) data; UNSUPPORTED("7476ssw2oyxxzrqtz24g9cecp"); // rtp->EntryCount++; UNSUPPORTED("8gejxq93li6nilezate9nd078"); // return AddBranch(rtp, &b, n, new); UNSUPPORTED("an9bctf9o42m97fmlr7tb3xd5"); // } else { /* Not supposed to happen */ UNSUPPORTED("22oqraxnqrjall7fj6pooexmi"); // assert((0)); UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eybi74pqddw71yno71n1dxch1 // static void FreeListNode(register struct ListNode *p) public static Object FreeListNode(Object... arg) { UNSUPPORTED("enkn7pc4meks3igihpafaoxnl"); // static void FreeListNode(register struct ListNode *p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bo0y3vz195pcz24vm46pixpb2"); // free(p); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a4tq9skwvzdutka9ei6pbydrk // int RTreeDelete(RTree_t * rtp, Rect_t * r, void *data, Node_t ** nn) public static Object RTreeDelete(Object... arg) { UNSUPPORTED("dxan13j7zc5tysdskndrhp0jy"); // int RTreeDelete(RTree_t * rtp, Rect_t * r, void *data, Node_t ** nn) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a12nb5dbhoiu403g443fctkns"); // /* int */ UNSUPPORTED("db7nkyc7g4zod4pcosw0eosmi"); // /* RTreeDelete(RTree_t*rtp, Rect_t*r, int data, Node_t**nn) { */ UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i; UNSUPPORTED("ben8zsxtpzeiqo8eli2l8uwl0"); // register Node_t *t; UNSUPPORTED("5pdj91y3888dsu9aiv163adqi"); // struct ListNode *reInsertList = (void *)0; UNSUPPORTED("ej513ottpyeoq8nr5ek3cqnyu"); // register struct ListNode *e; UNSUPPORTED("9fgs287rhe40d3q36tlijajk3"); // assert(r && nn); UNSUPPORTED("djo1drf8zqgd4dlmtnp8268ma"); // assert(*nn); UNSUPPORTED("aickurv6sbkajrl6u32h8s7n0"); // assert(data >= 0); UNSUPPORTED("d7p6had3bhs1yux0acgomhxcq"); // rtp->Deleting = (!(0)); UNSUPPORTED("607lavmustb15rxzq2849utq7"); // if (!RTreeDelete2(rtp, r, data, *nn, &reInsertList)) { UNSUPPORTED("78928a78vetdygse25vd6qw33"); // /* found and deleted a data item */ UNSUPPORTED("bi6ay2t4s62zfticozlr791yq"); // if (rtp->StatFlag) UNSUPPORTED("aiqjtlu1lbfame9tsdduxksph"); // rtp->DeleteCount++; UNSUPPORTED("337cl2y5ymgyje4han1uiddia"); // rtp->RectCount--; UNSUPPORTED("dm3fsqsr312twcwr7ejz72sd5"); // /* reinsert any branches from eliminated nodes */ UNSUPPORTED("3miqozg3j3sz0440ya0edtkn1"); // while (reInsertList) { UNSUPPORTED("8bi7drdkfhozlzpnr9a8beo9r"); // t = reInsertList->node; UNSUPPORTED("ehzcswv2o675ah20nlk8ll73b"); // for (i = 0; i < 64; i++) { UNSUPPORTED("16k4a0oof3m3shq22rp10sufm"); // if (t->branch[i].child) { UNSUPPORTED("4pmqw3ejoeiktbmgw5li4osuk"); // RTreeInsert(rtp, &(t->branch[i].rect), UNSUPPORTED("jn668g7qkg8vdom23tf6xyua"); // /* (int)t->branch[i].child, nn, t->level); */ UNSUPPORTED("cr2tz58k73uenuatj8dllr5e"); // t->branch[i].child, nn, t->level); UNSUPPORTED("3ll931j526x4h3iq2n8lb8npl"); // rtp->EntryCount--; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("a0driook10zxazzgo71kxwf5t"); // e = reInsertList; UNSUPPORTED("3ycjjmywhr2h58szv9f0c3r67"); // reInsertList = reInsertList->next; UNSUPPORTED("2l03pg61762f3m81wcifv6o2t"); // RTreeFreeNode(rtp, e->node); UNSUPPORTED("2nfqlmqqiafmfh2uxj5r72e5z"); // FreeListNode(e); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3uomzgqvjm03fwau1petngub8"); // /* check for redundant root (not leaf, 1 child) and eliminate */ UNSUPPORTED("crynploao8fgrtf7envjtfdaz"); // if ((*nn)->count == 1 && (*nn)->level > 0) { UNSUPPORTED("a588ej7tdnabye2dhwn96zbay"); // if (rtp->StatFlag) UNSUPPORTED("4bzchhtuz1r199e9mi0bp1ece"); // rtp->ElimCount++; UNSUPPORTED("6u2n1qlqovrhoecwygc6fuq2c"); // rtp->EntryCount--; UNSUPPORTED("ehzcswv2o675ah20nlk8ll73b"); // for (i = 0; i < 64; i++) { UNSUPPORTED("jk2oyzi48hf05v99gu6wc2o2"); // if ((t = (*nn)->branch[i].child)) UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5ba1w7saym0g246ykbjnn0qrf"); // RTreeFreeNode(rtp, *nn); UNSUPPORTED("dnoogjer2v3hmfm7qtw2p4qrv"); // *nn = t; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cpwomgmpysmof2uglfr37v494"); // rtp->Deleting = (0); UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("cpwomgmpysmof2uglfr37v494"); // rtp->Deleting = (0); UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bax12o5n6n8s94wnn7cxgn99 // static int RTreeDelete2(RTree_t * rtp, Rect_t * r, void *data, Node_t * n, ListNode_t ** ee) public static Object RTreeDelete2(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("dl163ikex89epdeiymlnlhkkt"); // RTreeDelete2(RTree_t * rtp, Rect_t * r, void *data, Node_t * n, UNSUPPORTED("7cv8lwqbi5i6si9trbnke7zl9"); // ListNode_t ** ee) UNSUPPORTED("8suowst9wgd6gxhgbdi3h24b7"); // /* static int */ UNSUPPORTED("ap2yhjmvw1l4wh1rujus8t8ef"); // /* RTreeDelete2(RTree_t*rtp, Rect_t*r, int data, Node_t*n, ListNode_t**ee) */ UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i; UNSUPPORTED("9yzorirytkswjf0omka5g4c20"); // assert(r && n && ee); UNSUPPORTED("aickurv6sbkajrl6u32h8s7n0"); // assert(data >= 0); UNSUPPORTED("btdpzkb56pz41hfftabazxn4s"); // assert(n->level >= 0); UNSUPPORTED("c435v08qyezw1xnbv2zrqr3te"); // if (rtp->StatFlag) UNSUPPORTED("9qx61yt5qzelxylomit9cn4rv"); // rtp->DeTouchCount++; UNSUPPORTED("5zjfl81difxhf334pznet7o8z"); // if (n->level > 0) { /* not a leaf node */ UNSUPPORTED("r6wug9hvutzrx2jp04v9slbe"); // for (i = 0; i < 64; i++) { UNSUPPORTED("9cxgoq0fd8kxz4eymv34vt66k"); // if (n->branch[i].child && Overlap(r, &(n->branch[i].rect))) { UNSUPPORTED("9c2dxowbn34szo9si1s67zn1d"); // if (!RTreeDelete2(rtp, r, data, n->branch[i].child, ee)) { /*recurse */ UNSUPPORTED("1p8d3xzz5d8g7ach93r5dkfpy"); // if (n->branch[i].child->count >= rtp->MinFill) UNSUPPORTED("8qc1vxcpq7d0q3d4pt56sagi6"); // n->branch[i].rect = NodeCover(n->branch[i].child); UNSUPPORTED("1pj51sbe7du437gcgun1tdp0c"); // else { /* not enough entries in child, eliminate child node */ UNSUPPORTED("1mqsg2rc7oaykxyne9jioil3j"); // RTreeReInsert(rtp, n->branch[i].child, ee); UNSUPPORTED("36htmotk6j7fq59vwfp4lanaj"); // DisconBranch(n, i); UNSUPPORTED("614qavwsv6dpxdog4wxkb2op0"); // rtp->EntryCount--; UNSUPPORTED("ad48i843uruoaahfmd2nxb4qv"); // if (rtp->StatFlag) UNSUPPORTED("jk9sg727bbh6mlccfj53sg1m"); // rtp->ElimCount++; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("y2l9mpq5754ggnklm39b7wg"); // return 0; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("dppt1v5lkz1rfqbwx4n4xwltd"); // } else { /* a leaf node */ UNSUPPORTED("r6wug9hvutzrx2jp04v9slbe"); // for (i = 0; i < 64; i++) { UNSUPPORTED("5g2zznotye25yuclpeyzatgrf"); // if (n->branch[i].child UNSUPPORTED("dx5d5kpda621ehao92qybpo7n"); // && n->branch[i].child == (Node_t *) data) { UNSUPPORTED("3nnhyf15i3s8j44ptc0zjxkof"); // DisconBranch(n, i); UNSUPPORTED("cazijll74xx4uxev9qe61vl0h"); // rtp->EntryCount--; UNSUPPORTED("5izxoao5ryte71964f8yjfd5y"); // return 0; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/label/node__c.java000066400000000000000000000247221312650303100213030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.label; import static smetana.core.Macro.UNSUPPORTED; public class node__c { //3 9uj7ni1m6q6drtoh56w82d6m4 // Node_t *RTreeNewNode(RTree_t * rtp) public static Object RTreeNewNode(Object... arg) { UNSUPPORTED("6r87cuk0qgu4wqagr86fr5tts"); // Node_t *RTreeNewNode(RTree_t * rtp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7wl3hkaktfhqdqsm6ubxboo1q"); // register Node_t *n; UNSUPPORTED("4bwg40kiiowl2obspxcr4saa2"); // rtp->NodeCount++; UNSUPPORTED("azoy4bfuupxwp4mi8hfbfb78g"); // n = (Node_t *) malloc(sizeof(Node_t)); UNSUPPORTED("a4ey5uckjqallol1ktyqe35bv"); // InitNode(n); UNSUPPORTED("69hc24ic55i66g8tf2ne42327"); // return n; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 65wa5vy8i5k40218lbhdibrjx // void RTreeFreeNode(RTree_t * rtp, Node_t * p) public static Object RTreeFreeNode(Object... arg) { UNSUPPORTED("e9yu9bfc7a1ihpoc5axpyg4eg"); // void RTreeFreeNode(RTree_t * rtp, Node_t * p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jtyh6hx1w2fcx2gjs8ksbkuh"); // rtp->NodeCount--; UNSUPPORTED("ed5n0l2c9xevohsgtsmv822gw"); // if (p->level == 0) UNSUPPORTED("8pbkap1jra9u3gvgio7ou7y1n"); // rtp->LeafCount--; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("357domcrb707wvdox73ayvdj1"); // rtp->NonLeafCount--; UNSUPPORTED("bo0y3vz195pcz24vm46pixpb2"); // free(p); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4qk9wkm05q2pwf20ud6g2tufg // void InitNode(Node_t * n) public static Object InitNode(Object... arg) { UNSUPPORTED("dlpky13v9fa11z9uukagldaj1"); // void InitNode(Node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i; UNSUPPORTED("7rbjc9psqd4hoib2lezl7pnh"); // n->count = 0; UNSUPPORTED("55ukro5lb2mre4owzaww8q2hc"); // n->level = -1; UNSUPPORTED("8v5nz5apd36odx9nwrk8p8jow"); // for (i = 0; i < 64; i++) UNSUPPORTED("80i9o3c1pvhadp8xg5nka4k0z"); // InitBranch(&(n->branch[i])); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ruhxixxei7au9z1iaj0zggwo // void InitBranch(Branch_t * b) public static Object InitBranch(Object... arg) { UNSUPPORTED("2ds4g44o2u9jlcjegxiplx78k"); // void InitBranch(Branch_t * b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7tixqnx33892tw39ys6j048c9"); // InitRect(&(b->rect)); UNSUPPORTED("6rffpszutr9tr32hwasnosx1l"); // b->child = NULL; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 42vjqe8n5yeq2jjby00xzrotk // Rect_t NodeCover(Node_t * n) public static Object NodeCover(Object... arg) { UNSUPPORTED("2khwamjri7uz3vu8fhl4bz8yr"); // Rect_t NodeCover(Node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e4wfnyowhq6r7cll9ebbr5pcr"); // register int i, flag; UNSUPPORTED("9jotn4njsd13qx406m9otorg4"); // Rect_t r; UNSUPPORTED("25fhmphgra40j368i6b09n5xz"); // assert(n); UNSUPPORTED("7t0m2a3824uy7f5r4wu3p2no9"); // InitRect(&r); UNSUPPORTED("e0yg2emzy8u4jgn9z7jdfpziq"); // flag = 1; UNSUPPORTED("8v5nz5apd36odx9nwrk8p8jow"); // for (i = 0; i < 64; i++) UNSUPPORTED("1ro7ykl3rxfkkcyghzozikkfc"); // if (n->branch[i].child) { UNSUPPORTED("ycid67impnxkwa9mvvkvdu0q"); // if (flag) { UNSUPPORTED("ektombc80083wiu0lsj6kto83"); // r = n->branch[i].rect; UNSUPPORTED("6bejndin7u1ns7xicz114gqtn"); // flag = 0; UNSUPPORTED("afk9bpom7x393euamnvwwkx6b"); // } else UNSUPPORTED("31n3s0xk5l7s3rhi9xeraiklo"); // r = CombineRect(&r, &(n->branch[i].rect)); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bek56v2skz6jfvw4uggy2h5w3 // int PickBranch(Rect_t * r, Node_t * n) public static Object PickBranch(Object... arg) { UNSUPPORTED("efxc8619milx7pkmu113b8cl0"); // int PickBranch(Rect_t * r, Node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4rx3my7ninlw252mkhq0t72v7"); // register Rect_t *rr=0; UNSUPPORTED("cu5ueogqdqm7ym79nlop077f9"); // register int i=0, flag=1, increase=0, bestIncr=0, area=0, bestArea=0; UNSUPPORTED("b5pkdhy36omd5ubfol2jsyr2z"); // int best=0; UNSUPPORTED("3lp95fcfxfbsb08w5umj6mjxb"); // assert(r && n); UNSUPPORTED("82kuymnzv3rubrwutx9bcz4xs"); // for (i = 0; i < 64; i++) { UNSUPPORTED("1ro7ykl3rxfkkcyghzozikkfc"); // if (n->branch[i].child) { UNSUPPORTED("4wt347mvef1i2kr5h5z9l0g8i"); // Rect_t rect; UNSUPPORTED("ak8qz4z2mipw1i6img1tvc3hk"); // rr = &n->branch[i].rect; UNSUPPORTED("d4pnse7tksvywt9f6rcaluv8e"); // area = RectArea(rr); UNSUPPORTED("4wsrjtivlov1p70rt8tn4dt9v"); // /* increase = RectArea(&CombineRect(r, rr)) - area; */ UNSUPPORTED("8b9or9d0f959zrx6zrd0o9noj"); // rect = CombineRect(r, rr); UNSUPPORTED("a1p1sz58nzxnj53fxzzkut6cm"); // increase = RectArea(&rect) - area; UNSUPPORTED("6k6tiifs973t6iordeclfqygk"); // if (increase < bestIncr || flag) { UNSUPPORTED("93dpfupbht4p3y9bsui3n8km4"); // best = i; UNSUPPORTED("apb6b50as71d87ge91yfjwr33"); // bestArea = area; UNSUPPORTED("45tyhbogdetuq767acgw0cvyg"); // bestIncr = increase; UNSUPPORTED("6bejndin7u1ns7xicz114gqtn"); // flag = 0; UNSUPPORTED("1wqm4msrcepk5ixg5ab8polj7"); // } else if (increase == bestIncr && area < bestArea) { UNSUPPORTED("93dpfupbht4p3y9bsui3n8km4"); // best = i; UNSUPPORTED("apb6b50as71d87ge91yfjwr33"); // bestArea = area; UNSUPPORTED("45tyhbogdetuq767acgw0cvyg"); // bestIncr = increase; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3kkxvbiqcsdmtjhhw3b2jcqcy"); // return best; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2njctcrpeff95ysmv9ji34x4s // int AddBranch(RTree_t * rtp, Branch_t * b, Node_t * n, Node_t ** new) public static Object AddBranch(Object... arg) { UNSUPPORTED("abswgz0jexhhyl0we1x68i5gl"); // int AddBranch(RTree_t * rtp, Branch_t * b, Node_t * n, Node_t ** new) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i; UNSUPPORTED("5xtwc50ov4mxby7k6gahwv12t"); // assert(b); UNSUPPORTED("25fhmphgra40j368i6b09n5xz"); // assert(n); UNSUPPORTED("8irlja6ar7hjh8mel91hltz17"); // if (n->count < 64) { /* split won't be necessary */ UNSUPPORTED("8vlryher8oaw4h715yfzs4h0"); // for (i = 0; i < 64; i++) { /* find empty branch */ UNSUPPORTED("3eaeba8b8yt8gq9074wtep0e0"); // if (n->branch[i].child == NULL) { UNSUPPORTED("9newc1m7r062crcakg2dn00kp"); // n->branch[i] = *b; UNSUPPORTED("b4orzj362grzvud5mj73w1cb1"); // n->count++; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2gjzrafpfll8afj90mhedcnnq"); // assert(i < 64); UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("dhd7sfbis7klukcyf8rg2skvp"); // if (rtp->StatFlag) { UNSUPPORTED("2y8kv6b3ysrr61q7tqn76rhhc"); // if (rtp->Deleting) UNSUPPORTED("dn4oynmx9ugizzs5pkxiyptbi"); // rtp->DeTouchCount++; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("2u8wpa4w1q7rg14t07bny6p8i"); // rtp->InTouchCount++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("chipmsvc1hum7sbmvzrfmewz6"); // assert(new); UNSUPPORTED("91mdffv90jr6ypnu3u1bmc972"); // SplitNode(rtp, n, b, new); UNSUPPORTED("1t8cl7q3utcr23gvhtgc1cp0u"); // if (n->level == 0) UNSUPPORTED("b2cc70cq7gpras4l3rbz241at"); // rtp->LeafCount++; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("6tkfiebspy7ecivrzb3l5y7jd"); // rtp->NonLeafCount++; UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eqzamflj58f43cflwns9cemnk // void DisconBranch(Node_t * n, int i) public static Object DisconBranch(Object... arg) { UNSUPPORTED("1gbs5xw4y9htfbc5suxq1rdm4"); // void DisconBranch(Node_t * n, int i) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ays33wicr9a5qwu2dr9g8t1h2"); // assert(n && i >= 0 && i < 64); UNSUPPORTED("29zl8z52z6bh8yxdkmezbs82l"); // assert(n->branch[i].child); UNSUPPORTED("3rvakcl9f71ez4zya83f1vvgx"); // InitBranch(&(n->branch[i])); UNSUPPORTED("4a3m9b5jmmhd18oa8nzovalys"); // n->count--; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/label/nrtmain__c.java000066400000000000000000000557501312650303100220330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.label; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class nrtmain__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 ez7q2nzpr17flkmb0odk67ggx // static char *progname //1 4k7cnypsvtgywml89uxukug5r // static int Verbose //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 2i713kmewjct2igf3lwm80462 // static pointf centerPt(xlabel_t * xlp) public static Object centerPt(Object... arg) { UNSUPPORTED("2ehkj7fn7wtb77mg9wdqpdig1"); // static pointf centerPt(xlabel_t * xlp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("1zfb5l8l1ajr1qwg3mcy71mrm"); // p = xlp->pos; UNSUPPORTED("8hxf8i35knrbncbh2vfaidbi7"); // p.x += (xlp->sz.x) / 2.0; UNSUPPORTED("4pemnun9akazartmat9b8062r"); // p.y += (xlp->sz.y) / 2.0; UNSUPPORTED("91xduilalb406jjyw2g1i07th"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 axo7jzudoju3r02pbuzu5u5cg // static int printData(object_t * objs, int n_objs, xlabel_t * lbls, int n_lbls, label_params_t * params) public static Object printData(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("1ts7sby2d9t84a9e3n3h9z7i4"); // printData(object_t * objs, int n_objs, xlabel_t * lbls, int n_lbls, UNSUPPORTED("b2402200eyc80fno3tkigspyc"); // label_params_t * params) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("2a3rymfsfswadknge9x92kumi"); // fprintf(stderr, UNSUPPORTED("9ffvrcx1kz69kf4ohq458tntr"); // "%d objs %d xlabels force=%d bb=(%.02f,%.02f) (%.02f,%.02f)\n", UNSUPPORTED("8lkiqntjtlrl6e91jrj1crmy7"); // n_objs, n_lbls, params->force, params->bb.LL.x, UNSUPPORTED("atpr27z058nxgtq1injs7j3xx"); // params->bb.LL.y, params->bb.UR.x, params->bb.UR.y); UNSUPPORTED("8rqgsy04sx7rq9dr227gsfdny"); // if (Verbose < 2) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("2646yqgzt1fr9gq4thnuvqw62"); // fprintf(stderr, "objects\n"); UNSUPPORTED("bznihqrwh4167vo2mn4du53da"); // for (i = 0; i < n_objs; i++) { UNSUPPORTED("3h9on00kwjf4xo4j60tbhbd0d"); // if(objs[i].lbl && objs[i].lbl->lbl) UNSUPPORTED("2p5wg8zjn154ih218upte0m8u"); // fprintf (stderr, " [%d] %p %p (%.02f, %.02f) (%.02f, %.02f) %s\n", UNSUPPORTED("3nrlvh61ecaah41rdce7opuz6"); // i, &objs[i], objs[i].lbl, objs[i].pos.x,objs[i].pos.y, UNSUPPORTED("38c5nmfxdrj8anxj2tvsuzwyd"); // objs[i].sz.x,objs[i].sz.y, UNSUPPORTED("5010od1avt4gufwitovfspv53"); // ((textlabel_t*)objs[i].lbl->lbl)->text ); UNSUPPORTED("e2koj2xocq76awegpydpyu62m"); // else UNSUPPORTED("aoaa9ojdu28j43q5olg7ipirz"); // fprintf (stderr, " [%d] %p %p (%.02f, %.02f) (%.02f, %.02f)\n", UNSUPPORTED("3nrlvh61ecaah41rdce7opuz6"); // i, &objs[i], objs[i].lbl, objs[i].pos.x,objs[i].pos.y, UNSUPPORTED("enm5yxjvcqabshcso24gtrc2e"); // objs[i].sz.x,objs[i].sz.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5qiw0ng2ayzadjgb1k8dym0y7"); // fprintf(stderr, "xlabels\n"); UNSUPPORTED("30yvif5t111f94y1fs2gd8crq"); // for (i = 0; i < n_lbls; i++) { UNSUPPORTED("5cpl2wq6ypkvhfql4dd7c82s3"); // fprintf(stderr, " [%d] %p (%.02f, %.02f) (%.02f, %.02f) %s\n", UNSUPPORTED("8qph05eaq6mqxunl6b71h8x2g"); // i, &lbls[i], lbls[i].pos.x, lbls[i].pos.y, UNSUPPORTED("4cl6jk5xeitdm8kz9zfyea3zm"); // lbls[i].sz.x, lbls[i].sz.y, UNSUPPORTED("3vd0l036v68y2ae4kl150n8yp"); // ((textlabel_t *)lbls[i].lbl)->text); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c4cg32mzgkpbcst0jy2upq5w3 // int doxlabel(opts_t * opts) public static Object doxlabel(Object... arg) { UNSUPPORTED("8wurvokwz90fe88uipw31lwep"); // int doxlabel(opts_t * opts) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3l5bdi04ekui6vvrgr3s666fx"); // Agraph_t *gp; UNSUPPORTED("1q5pw5siho05tilkhpvceuax5"); // object_t *objs; UNSUPPORTED("88sdp733wy18rctixyqpiarvo"); // xlabel_t *lbls; UNSUPPORTED("aq6jdvqcw04pxk55fs8ppod2c"); // int i, n_objs, n_lbls; UNSUPPORTED("asd06xewa83y0cc930zzf5d25"); // label_params_t params; UNSUPPORTED("4dnqwjhhs92m1h2q7ld3cpbxw"); // Agnode_t *np; UNSUPPORTED("1bl759aws53yjk3xg9shiogx5"); // Agedge_t *ep; UNSUPPORTED("2wem1nsm7z6vxqjo9edb38fpu"); // int n_nlbls = 0, n_elbls = 0; UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("cqwl7s9yvzr8n5v8svuuv1a1q"); // textlabel_t *lp; UNSUPPORTED("1exmnagt3khrhapqoj43kchc9"); // object_t *objp; UNSUPPORTED("42yb201vo7e3ryt0pg3pupi84"); // xlabel_t *xlp; UNSUPPORTED("1ilrhzyqh05f2u3j3vzg0ys8u"); // pointf ur; UNSUPPORTED("2ntp2ibjekwh9j8nygd0ti1xm"); // fprintf(stderr, "reading %s\n", opts->infname); UNSUPPORTED("b7tc1qd0ygab8ky9f8mq6yr1r"); // if (!(gp = agread(opts->inf))) { UNSUPPORTED("2z171ve8godqlic0qmbasth1e"); // fprintf(stderr, "%s: %s not a dot file\n", progname, UNSUPPORTED("6oq4a7osqwufq0eszpp57ktu6"); // opts->infname); UNSUPPORTED("dtw3cma0ziyha0w534bszl0tx"); // exit(1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("beo8iaf6acg59u8is886fmt2x"); // fclose(opts->inf); UNSUPPORTED("9s7txbykwaiwj5rv1xjdpwh4y"); // fprintf(stderr, "laying out %s\n", opts->lay); UNSUPPORTED("aojth6x8xid0d88cuvl2wn8nf"); // if (gvLayout(opts->gvc, gp, opts->lay)) { UNSUPPORTED("e1ce3rd38aij0uzxsx09fu5kp"); // fprintf(stderr, "%s: layout %s failed\n", progname, opts->lay); UNSUPPORTED("dtw3cma0ziyha0w534bszl0tx"); // exit(1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8s81ox08m1abqhigygxh81299"); // fprintf(stderr, "attach labels\n"); UNSUPPORTED("6cchlbw0dymzb3cw1hfo94n6a"); // /* In the real code, this should be optimized using GD_has_labels() */ UNSUPPORTED("bfdixk0pjg05sljut4h57xbbh"); // /* We could probably provide the number of node and edge xlabels */ UNSUPPORTED("27ppdplfezcqw6rdrkzyrr8yg"); // for (np = agfstnode(gp); np; np = agnxtnode(gp, np)) { UNSUPPORTED("cnz7ckum0lz95m8c8e6i1vok7"); // if (ND_xlabel(np)) UNSUPPORTED("3uhi0myy92p6xl4a5oxde7v9z"); // n_nlbls++; UNSUPPORTED("41dpbku41lh3gpb30ds9ex6aa"); // for (ep = agfstout(gp, np); ep; ep = agnxtout(gp, ep)) { UNSUPPORTED("biq91l2ud7l5kr26ls9zbzzke"); // if (ED_xlabel(ep)) UNSUPPORTED("bffseaexubrngpi9o059qepow"); // n_elbls++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5ft4bvs2l0ce26wb6gnuzjao7"); // n_objs = agnnodes(gp) + n_elbls; UNSUPPORTED("5kla6rwar4q1ig2olguocajn6"); // n_lbls = n_nlbls + n_elbls; UNSUPPORTED("3e10kvi719e134x675xgwi1tj"); // objp = objs = (object_t*)zmalloc((n_objs)*sizeof(object_t)); UNSUPPORTED("6z86cmeenod2nx8ej72n0qotk"); // xlp = lbls = (xlabel_t*)zmalloc((n_lbls)*sizeof(xlabel_t)); UNSUPPORTED("f2nzvg1xnr11v28w2feg923cs"); // bb.LL = pointfof(INT_MAX, INT_MAX); UNSUPPORTED("7tttoj8cnxfqgnq2aagnnav48"); // bb.UR = pointfof(-INT_MAX, -INT_MAX); UNSUPPORTED("27ppdplfezcqw6rdrkzyrr8yg"); // for (np = agfstnode(gp); np; np = agnxtnode(gp, np)) { UNSUPPORTED("4siyxwjbs44obgm7h82zjml69"); // /* Add an obstacle per node */ UNSUPPORTED("6cuxjl9g4nxwyz58c201qdb94"); // objp->sz.x = ((ND_width(np))*(double)72); UNSUPPORTED("e3zk2j9kbexxv2xbsgu3pser6"); // objp->sz.y = ((ND_height(np))*(double)72); UNSUPPORTED("cbc8atcbxsu44juz82lkfcgwq"); // objp->pos = ND_coord(np); UNSUPPORTED("3zy29s8ijfmwn910twoywpps1"); // objp->pos.x -= (objp->sz.x) / 2.0; UNSUPPORTED("7jkvg5hvdxus7k3bv57jyjh88"); // objp->pos.y -= (objp->sz.y) / 2.0; UNSUPPORTED("7jndn79f10gyxumgbo6czxe5m"); // /* Adjust bounding box */ UNSUPPORTED("bsgbwiykz32eqdyc49dobwpnr"); // bb.LL.x = MIN(bb.LL.x, objp->pos.x); UNSUPPORTED("2u94r8rlczbki3ge3ihvmo9mi"); // bb.LL.y = MIN(bb.LL.y, objp->pos.y); UNSUPPORTED("4lusjec057jj66bscit5s7lft"); // ur.x = objp->pos.x + objp->sz.x; UNSUPPORTED("9zdffh9aglmrm8cdsmyxb0wrw"); // ur.y = objp->pos.y + objp->sz.y; UNSUPPORTED("crkzyggmy41k3nrp8csmiakes"); // bb.UR.x = MAX(bb.UR.x, ur.x); UNSUPPORTED("5ejpea5qlp1pbghy6n2lsuwfs"); // bb.UR.y = MAX(bb.UR.y, ur.y); UNSUPPORTED("eezvruvdh9ueqsgad8k5xzbqi"); // if (ND_xlabel(np)) { UNSUPPORTED("dq9r3oew49g4p62l8mj95y1dh"); // xlp->sz = ND_xlabel(np)->dimen; UNSUPPORTED("7xq75ru9hsux949swpm3cp4ue"); // xlp->lbl = ND_xlabel(np); UNSUPPORTED("lch95gg7hal8p4g2coq8qya9"); // xlp->set = 0; UNSUPPORTED("9ozlxoe5hy2ssm40umphbfgxe"); // objp->lbl = xlp; UNSUPPORTED("ddik10sdd1c59te8kbgpqsncp"); // xlp++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bhbvoj12subdn6905juhiubo2"); // objp++; UNSUPPORTED("41dpbku41lh3gpb30ds9ex6aa"); // for (ep = agfstout(gp, np); ep; ep = agnxtout(gp, ep)) { UNSUPPORTED("92f340ohb0u21xl6jgpc2hieo"); // if (ED_label(ep)) { UNSUPPORTED("bbidnvg3rfydq4lbw358qvlik"); // textlabel_t *lp = ED_label(ep); UNSUPPORTED("dow8hf9884ywwrt8hgipox54g"); // lp->pos.x = lp->pos.y = 0.0; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("58ej5pyvcqel713ci83qh7j2n"); // if (!ED_xlabel(ep)) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("d6wg3egk1x5aesy2ng1qyjh0z"); // objp->sz.x = 0; UNSUPPORTED("dy9evuaclpueiidwo0pp40904"); // objp->sz.y = 0; UNSUPPORTED("bpwvk9oag9fx8aiebw7xa9rw8"); // objp->pos = edgeMidpoint(gp, ep); UNSUPPORTED("64lz6mea65zfl2kbogusvglpn"); // xlp->sz = ED_xlabel(ep)->dimen; UNSUPPORTED("5rvgp0x8n9fqvbyp32952ouk2"); // xlp->lbl = ED_xlabel(ep); UNSUPPORTED("lch95gg7hal8p4g2coq8qya9"); // xlp->set = 0; UNSUPPORTED("9ozlxoe5hy2ssm40umphbfgxe"); // objp->lbl = xlp; UNSUPPORTED("ddik10sdd1c59te8kbgpqsncp"); // xlp++; UNSUPPORTED("9061jd99guumlgucvlj3a8vub"); // objp++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("d447casut2vhvblc969saqfs4"); // params.force = opts->force; UNSUPPORTED("2ol916ffwy0e2vxinxn4v4sgt"); // params.bb = bb; UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); // if (Verbose) UNSUPPORTED("4iypau1fdov37qnq2ub6iq5ra"); // printData(objs, n_objs, lbls, n_lbls, ¶ms); UNSUPPORTED("25rb35acbkepp55u3bkjxb1gc"); // placeLabels(objs, n_objs, lbls, n_lbls, ¶ms); UNSUPPORTED("tpyqsliwrqzwhuw8vzkm8loc"); // fprintf(stderr, "read label positions\n"); UNSUPPORTED("52mefujap7scy273ud7nyj9hn"); // xlp = lbls; UNSUPPORTED("30yvif5t111f94y1fs2gd8crq"); // for (i = 0; i < n_lbls; i++) { UNSUPPORTED("w0kpfap6pb5scjkqkgsfira0"); // if (xlp->set) { UNSUPPORTED("8xqwhcveb6ivragr1ebkp4pfh"); // lp = (textlabel_t *) (xlp->lbl); UNSUPPORTED("a5h8ktnl3raui7zo5kcjzd2e0"); // lp->set = 1; UNSUPPORTED("4lub8ddx8vt0gove63lajjr4s"); // lp->pos = centerPt(xlp); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1966qdxqc520zc0itk8al0xus"); // xlp++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("baez6nmarx9nht65vulvjojic"); // free(objs); UNSUPPORTED("ayak2o9js1lmsa5vuzul2sdxs"); // free(lbls); UNSUPPORTED("bftxx8axittt2mwc80wvu1f00"); // fprintf(stderr, "writing %s\n", opts->outfname); UNSUPPORTED("323sem4b7jzyg7l5kylxe0gnx"); // gvRender(opts->gvc, gp, opts->fmt, opts->outf); UNSUPPORTED("bp54wy9c70v90k5bb11lppo5l"); // /* clean up */ UNSUPPORTED("67guepsgjnhtoqor7wh4gstti"); // fprintf(stderr, "cleaning up\n"); UNSUPPORTED("dve51clmbbuj7sc653o65y416"); // gvFreeLayout(opts->gvc, gp); UNSUPPORTED("9d0rk5v0wtzmux625ddclpdn1"); // agclose(gp); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9wfwgoq79qhinosrkyial6epj // int checkOpt(char *l, char *legal[], int n) public static Object checkOpt(Object... arg) { UNSUPPORTED("16prj059n95sysjma58fiqgzu"); // int checkOpt(char *l, char *legal[], int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("1vi49g48u2rc9v88yhabta0yw"); // for (i = 0; i < n; i++) { UNSUPPORTED("nnm3nrg0fnq3so1cn59gl1ty"); // if (strcmp(l, legal[i]) == 0) UNSUPPORTED("btmwubugs9vkexo4yb7a5nqel"); // return 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8q6likcxw6ut5zeraaze8shtb // void usage(char *pp) public static Object usage(Object... arg) { UNSUPPORTED("7m2ltqr2kx3w6q4t3g8dzfqpp"); // void usage(char *pp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2a3rymfsfswadknge9x92kumi"); // fprintf(stderr, UNSUPPORTED("4wrs4bfjfwklmwoco1koczjdv"); // "Usage: %s [-fv] [-V$level] [-T$fmt] [-l$layout] [-o$outfile] dotfile\n", UNSUPPORTED("9ollqr0ef4x8spk0rt3sr8vqp"); // pp); UNSUPPORTED("b9185t6i77ez1ac587ul8ndnc"); // return; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3u8wp1vjie9akflq8id8h4jml // static FILE *openFile(char *name, char *mode) public static Object openFile(Object... arg) { UNSUPPORTED("d20hfpuvv6zzaoadalivef5gx"); // static FILE *openFile(char *name, char *mode) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dn2hi0km4q5ldibguffbger1c"); // FILE *fp; UNSUPPORTED("44fhep40ukv2a3ja1nq34hrm8"); // char *modestr; UNSUPPORTED("a5fahi1wh7pd0cs3oalvsoaiv"); // fp = fopen(name, mode); UNSUPPORTED("304p80cpezoo5tih4fcsob9cq"); // if (!fp) { UNSUPPORTED("9ympiq6pzqmd8nshnoq3vpwfi"); // if (*mode == 'r') UNSUPPORTED("14y4vxn380hggwx7a5m3zwyd0"); // modestr = "reading"; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("55vho08zxn3hxhpr4tx4use3p"); // modestr = "writing"; UNSUPPORTED("c7s8at3cqmzgv80hgd8tm7wfb"); // fprintf(stderr, "%s: could not open file %s for %s -- %s\n", UNSUPPORTED("56vywxbowmjyd2ssgb5jaawi7"); // progname, name, modestr, strerror(errno)); UNSUPPORTED("dtw3cma0ziyha0w534bszl0tx"); // exit(1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6x54oh4xeozqrj2isrpofhher"); // return (fp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 egkkwztfbkxu9vvlc0sm05nxv // static void init(int argc, char *argv[], opts_t * opts) public static Object init(Object... arg) { UNSUPPORTED("elmto38lhyd8ckgkm1qswhosv"); // static void init(int argc, char *argv[], opts_t * opts) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("emc3vdvz7smauda3se70e5ogd"); // int c, cnt; UNSUPPORTED("1pbwdmcrlnqb7teoelyxecqu9"); // char **optList; UNSUPPORTED("87dxsbpdsz45s6w205t6ds10b"); // opts->outf = stdout; UNSUPPORTED("7mpmbqdt8ajbx6itgsay4kr6i"); // opts->outfname = "stdout"; UNSUPPORTED("2ah6k3x8emq2o4qkba0zu0zuv"); // progname = argv[0]; UNSUPPORTED("63lodtevhv92534zqnwg4wf1t"); // opts->gvc = gvContext(); UNSUPPORTED("81tz51f3gan5smiwrvn3h1lt2"); // opts->lay = "dot"; UNSUPPORTED("1yiembfofkehuhrorie2b9gsi"); // opts->fmt = "ps"; UNSUPPORTED("7oi2c7s5gl8voe3x4yum7jszu"); // opts->force = 0; UNSUPPORTED("60bek3ektewmma3p6pak5x2am"); // while ((c = getopt(argc, argv, "o:vFl:T:V:")) != EOF) { UNSUPPORTED("7rk995hpmaqbbasmi40mqg0yw"); // switch (c) { UNSUPPORTED("c7a78qt1dx3jxjw23fwcmwr3p"); // case 'F': UNSUPPORTED("biextvcnz6zkqlqxgssaqrstl"); // opts->force = 1; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("bwy7mh2nb7lz950r20rfilwa4"); // case 'l': UNSUPPORTED("6pele3rfkd0r1k5r8qzc5vbha"); // optList = gvPluginList(opts->gvc, "layout", &cnt, NULL); UNSUPPORTED("7kfiavaqy7qmfg2hg1e8z80e1"); // if (checkOpt(optarg, optList, cnt)) UNSUPPORTED("anmrnwabtq1ijqqr2uop2n1bh"); // opts->lay = optarg; UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("4rymfp2u3aj6lx2s6plx3hojv"); // fprintf(stderr, "%s: unknown layout %s\n", progname, UNSUPPORTED("4xhetnmuyh8emewbykj08vroq"); // optarg); UNSUPPORTED("7ujm7da8xuut83e2rygja0n9d"); // exit(1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("2f0a79iza84u7nhurd3n3jjjf"); // case 'T': UNSUPPORTED("9cus1va3ujh87mdys6c9v2z1t"); // optList = gvPluginList(opts->gvc, "device", &cnt, NULL); UNSUPPORTED("7kfiavaqy7qmfg2hg1e8z80e1"); // if (checkOpt(optarg, optList, cnt)) UNSUPPORTED("5altfebkbv6f35oj03qk2492n"); // opts->fmt = optarg; UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("bzcwn6blrae9inr3p5m09e9d"); // fprintf(stderr, "%s: unknown format %s\n", progname, UNSUPPORTED("4xhetnmuyh8emewbykj08vroq"); // optarg); UNSUPPORTED("7ujm7da8xuut83e2rygja0n9d"); // exit(1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("318vlfmcdz9no6i45k86aygon"); // case 'v': UNSUPPORTED("z08wni1aiuv5b8ommxtq10kj"); // Verbose = 1; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("6k6q2a5qrb52v1ue87bbj6dtv"); // case 'V': UNSUPPORTED("3r3fz5bgdw11zenv47obhu5vt"); // Verbose = atoi(optarg); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("2tj3jzqar12mlqrsqiqtnaml4"); // case 'o': UNSUPPORTED("1wx5260eycnikbxaanmopl7b3"); // opts->outf = openFile(optarg, "w"); UNSUPPORTED("e167mkpssrx4z8qunrmw8kh1n"); // opts->outfname = optarg; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("22xk7nfw0r35o66cqu5qjubqb"); // usage(progname); UNSUPPORTED("6f1y0d5qfp1r9zpw0r7m6xfb4"); // exit(1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3phw6ctc4ona74z9ww17xjaw3"); // if (optind < argc) { UNSUPPORTED("7hpkub9g5s8almwdoymfuenxh"); // opts->inf = openFile(argv[optind], "r"); UNSUPPORTED("3zkn0yg2bqlmxotocssnzhxws"); // opts->infname = argv[optind]; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("30pkf9oeg7gpxsywbm5shgg64"); // opts->inf = stdin; UNSUPPORTED("e61j0rmaw1t3upfgqro72rx91"); // opts->infname = ""; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ct8h35c783zokfb7wxjbkavha"); // if (!opts->outf) { UNSUPPORTED("2s6g8jva40gbl5p87hy413rg4"); // opts->outf = stdout; UNSUPPORTED("e9nmk5kmlczlng9wz7f4q8gtv"); // opts->outfname = ""; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7i7prctjnltgmsf7dgzmddjg9 // int main(int argc, char *argv[]) public static Object main(Object... arg) { UNSUPPORTED("8fr3wh1xwllvel0m0nkh09bjl"); // int main(int argc, char *argv[]) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("kbo4pgmde2ojznpsie5m4t8h"); // opts_t opts; UNSUPPORTED("db6kkkb1xqkrydzxgyiyxl8ds"); // init(argc, argv, &opts); UNSUPPORTED("dap4chqfn6jjoa6j31f8lngs4"); // doxlabel(&opts); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/label/rectangle__c.java000066400000000000000000000237171312650303100223250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.label; import static smetana.core.Macro.UNSUPPORTED; public class rectangle__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 9mnpt3mibocomreg5h1kk860g // extern Rect_t CoverAll //3 1wtvfzwbzj03e6w5rw4k7qdax // void InitRect(Rect_t * r) public static Object InitRect(Object... arg) { UNSUPPORTED("bfynnbut17s29886tfi4hmp71"); // void InitRect(Rect_t * r) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i; UNSUPPORTED("6v26zqmzay64h92bxd4qt6qgs"); // for (i = 0; i < 2*2; i++) UNSUPPORTED("d3uknh6sy0xxecd62dbcemd5p"); // r->boundary[i] = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bvazxgli5q4yxvzl5kn1vjqpm // Rect_t NullRect() public static Object NullRect(Object... arg) { UNSUPPORTED("7bfeg4qbgfa72qeao4zmwznat"); // Rect_t NullRect() UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9jotn4njsd13qx406m9otorg4"); // Rect_t r; UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i; UNSUPPORTED("4cmj0swptez35tqafqf86bskl"); // r.boundary[0] = 1; UNSUPPORTED("6lzrqh8r1olplqcbtz1n5dow7"); // r.boundary[2] = -1; UNSUPPORTED("ol4wmdbmn9kjw3hpmp2gwavz"); // for (i = 1; i < 2; i++) UNSUPPORTED("9xr8ijrn07laqlacrzelzczxa"); // r.boundary[i] = r.boundary[i + 2] = 0; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1ijarur71gcahchxz8vqf69na // unsigned int RectArea(Rect_t * r) public static Object RectArea(Object... arg) { UNSUPPORTED("dt9366zeifsgcei4onz0fdt4i"); // unsigned int RectArea(Rect_t * r) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9cyat6ft4tmgpumn70l9fwydy"); // register int i; UNSUPPORTED("eep6ne1fnwvxrzmao6aq2e80t"); // unsigned int area=1, a=1; UNSUPPORTED("bxtlpefe142w9pb81aa0gkkcj"); // assert(r); UNSUPPORTED("7xe9zz3f2fwhfptig6esqvb1t"); // if (((r)->boundary[0] > (r)->boundary[2])) return 0; UNSUPPORTED("9gsgfs2guis9c3c3oi57mxpq2"); // /* UNSUPPORTED("asaz8qrby7qugc5m3ylnjg6o7"); // * XXX add overflow checks UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("17o3f4aat9tkp17wsngm29nst"); // area = 1; UNSUPPORTED("6xp61z8h2baoxnlm757q289e3"); // for (i = 0; i < 2; i++) { UNSUPPORTED("6g0ik6vssf9px33quo2z9ferr"); // unsigned int b = r->boundary[i + 2] - r->boundary[i]; UNSUPPORTED("7tqqzmxu3tsfxccs53evs54me"); // a *= b; UNSUPPORTED("3u7h4981b69nu4w80bhv3s4q"); // if( (a / b ) != area) { UNSUPPORTED("6qc59bm54jy4hv9gw8a50rk0u"); // agerr (AGERR, "label: area too large for rtree\n"); UNSUPPORTED("awx87c59fwl0w8r64jfd86jrd"); // return UINT_MAX; UNSUPPORTED("dquo3qofk56ds5xl95lhvcthf"); // } UNSUPPORTED("b34qh5cr4ie1y00nbl91sn2km"); // area = a; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9ww3ox2wqjgbtsin4e26qgoyx"); // return area; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 tgmhi1wshyhqky2pappb6w6w // Rect_t CombineRect(Rect_t * r, Rect_t * rr) public static Object CombineRect(Object... arg) { UNSUPPORTED("18ebi8xfcz225jqpfk5vtp9hf"); // Rect_t CombineRect(Rect_t * r, Rect_t * rr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7gcww32g3xx6yjb9m2tgq8f7c"); // register int i, j; UNSUPPORTED("ep1c21oj5vdbkci5nklq26u6d"); // Rect_t new; UNSUPPORTED("8woqwn01hzllzlrb8an6apviw"); // assert(r && rr); UNSUPPORTED("61el74qdlszr9b7htgajgnncw"); // if (((r)->boundary[0] > (r)->boundary[2])) UNSUPPORTED("26gbreijuodtzexgobqd73u1p"); // return *rr; UNSUPPORTED("9c5jzil5a7hm4bfzytn0e7aww"); // if (((rr)->boundary[0] > (rr)->boundary[2])) UNSUPPORTED("h0psmi4ydywx720mvhp33x5g"); // return *r; UNSUPPORTED("6xp61z8h2baoxnlm757q289e3"); // for (i = 0; i < 2; i++) { UNSUPPORTED("1p51ro3v4iw4nogctzk3y0bts"); // new.boundary[i] = MIN(r->boundary[i], rr->boundary[i]); UNSUPPORTED("2h0ee6s8hk7srb6xqmnfluf52"); // j = i + 2; UNSUPPORTED("3cljcok8kw06fphxnu0183g4"); // new.boundary[j] = MAX(r->boundary[j], rr->boundary[j]); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4b8pgvy3c1dhlanxwmafau4pt"); // return new; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9glce34jzknoqj98agg96k03o // int Overlap(Rect_t * r, Rect_t * s) public static Object Overlap(Object... arg) { UNSUPPORTED("75f545jos6v3su84hbt728wxr"); // int Overlap(Rect_t * r, Rect_t * s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7gcww32g3xx6yjb9m2tgq8f7c"); // register int i, j; UNSUPPORTED("3ilt6jfw7dcaebocva6xawiui"); // assert(r && s); UNSUPPORTED("6xp61z8h2baoxnlm757q289e3"); // for (i = 0; i < 2; i++) { UNSUPPORTED("71gqfx1xze9ccjzy9ids9x8cj"); // j = i + 2; /* index for high sides */ UNSUPPORTED("b41yx5qm8jqsnyojyaztg6wy1"); // if (r->boundary[i] > s->boundary[j] UNSUPPORTED("cjb3lqf10yggej4b0uh9acc72"); // || s->boundary[i] > r->boundary[j]) UNSUPPORTED("8tnlb2txucdutal7665h0v68g"); // return (0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4si0cf97a5sfd9ozuunds9goz"); // return (!(0)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b2epj09d2wxyndbn4bgdsxr2q // int Contained(Rect_t * r, Rect_t * s) public static Object Contained(Object... arg) { UNSUPPORTED("733zc41b58sdh3p9oeu9fj9l4"); // int Contained(Rect_t * r, Rect_t * s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9awzjr4cb2zjgf6gos90frckl"); // register int i, j, result; UNSUPPORTED("3ilt6jfw7dcaebocva6xawiui"); // assert(r && s); UNSUPPORTED("ef38prhqw1mt7m82qf23llthz"); // /* undefined rect is contained in any other */ UNSUPPORTED("61el74qdlszr9b7htgajgnncw"); // if (((r)->boundary[0] > (r)->boundary[2])) UNSUPPORTED("3adr32h5e1fehu4g7j2u24asz"); // return (!(0)); UNSUPPORTED("97iyq13885wpg4001abrkjhuk"); // /* no rect (except an undefined one) is contained in an undef rect */ UNSUPPORTED("ex7jjwy9foumvka1ks3pzhm6u"); // if (((s)->boundary[0] > (s)->boundary[2])) UNSUPPORTED("e6i1m837bi402fjvy87uxgyf"); // return (0); UNSUPPORTED("41048mrirr0adiwxs12neylq8"); // result = (!(0)); UNSUPPORTED("6xp61z8h2baoxnlm757q289e3"); // for (i = 0; i < 2; i++) { UNSUPPORTED("71gqfx1xze9ccjzy9ids9x8cj"); // j = i + 2; /* index for high sides */ UNSUPPORTED("59et7tzqav7nffmkllv6u1kbt"); // result = result && r->boundary[i] >= s->boundary[i] UNSUPPORTED("4tdt6ca6zi1rw9kklpgicedap"); // && r->boundary[j] <= s->boundary[j]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e73y2609z2557xahrcvzmcb8e"); // return result; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/label/split_q__c.java000066400000000000000000000432451312650303100220320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.label; import static smetana.core.Macro.UNSUPPORTED; public class split_q__c { //3 6vl3snxd6k95gamfkwfsfdguc // void SplitNode(RTree_t * rtp, Node_t * n, Branch_t * b, Node_t ** nn) public static Object SplitNode(Object... arg) { UNSUPPORTED("78ce6yisssjvu8419g3hps65l"); // void SplitNode(RTree_t * rtp, Node_t * n, Branch_t * b, Node_t ** nn) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ajyfxc076ll1tzroielljxa4s"); // register struct PartitionVars *p; UNSUPPORTED("8jufm5xh68khkqy7z1kcdmesw"); // register int level; UNSUPPORTED("7bskhxl3c4vhiobuvlm02c79c"); // int area; UNSUPPORTED("25fhmphgra40j368i6b09n5xz"); // assert(n); UNSUPPORTED("5xtwc50ov4mxby7k6gahwv12t"); // assert(b); UNSUPPORTED("21ol6vbghnu1ewovfs645sts7"); // if (rtp->StatFlag) { UNSUPPORTED("akhni40ndam0u9c6i7raxw4mp"); // if (rtp->Deleting) UNSUPPORTED("4g80zdlbvunm838x8g3ic9tex"); // rtp->DeSplitCount++; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("2cjo6wz1rmxfm5k7u7rw5dqpj"); // rtp->InSplitCount++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8396srmzb1jm8lij0ngslpcrf"); // /* load all the branches into a buffer, initialize old node */ UNSUPPORTED("21fuexra37tdi6sx7rtjdg1nj"); // level = n->level; UNSUPPORTED("bqz4krdoll1zhnuqj6zgotbcu"); // GetBranches(rtp, n, b); UNSUPPORTED("hdjjn3pouo1k1eq8y4x0nmxs"); // /* find partition */ UNSUPPORTED("prf503ssj57ewtg2w9ypvt6"); // p = &rtp->split.Partitions[0]; UNSUPPORTED("e5s838qmpxfzesnb90fmga2th"); // MethodZero(rtp); UNSUPPORTED("e2qxl0u7yon3spy2kr56ah1lx"); // area = RectArea(&p->cover[0]) + RectArea(&p->cover[1]); UNSUPPORTED("bqvd9kyv5qlcddypjudg6lwpl"); // /* record how good the split was for statistics */ UNSUPPORTED("9isnpzrwseyh76rz7fawgkdyw"); // if (rtp->StatFlag && !rtp->Deleting && area) UNSUPPORTED("z7xk6s3hzi3qcoiq2exj9hpv"); // rtp->SplitMeritSum += (float) rtp->split.CoverSplitArea / area; UNSUPPORTED("dytz8fm640zs5ercfjtork8u2"); // /* put branches from buffer into 2 nodes according to chosen partition */ UNSUPPORTED("3vka4yfkd2kilsogvopxmh6ry"); // *nn = RTreeNewNode(rtp); UNSUPPORTED("3wybhajryp9yjj3lxvzuiv7p9"); // (*nn)->level = n->level = level; UNSUPPORTED("izrbnvm6p45dy2xfr3265jdf"); // LoadNodes(rtp, n, *nn, p); UNSUPPORTED("e0lxlkm80cy0577wy8jdxbhq9"); // assert(n->count + (*nn)->count == 64 + 1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 al7lyin008m7kvrvuxhcuvn61 // static void GetBranches(RTree_t * rtp, Node_t * n, Branch_t * b) public static Object GetBranches(Object... arg) { UNSUPPORTED("378qaodt9k6ytly4svwl41z9w"); // static void GetBranches(RTree_t * rtp, Node_t * n, Branch_t * b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i; UNSUPPORTED("25fhmphgra40j368i6b09n5xz"); // assert(n); UNSUPPORTED("5xtwc50ov4mxby7k6gahwv12t"); // assert(b); UNSUPPORTED("4oznkldmd6dyb0i9hwec78vcs"); // /* load the branch buffer */ UNSUPPORTED("82kuymnzv3rubrwutx9bcz4xs"); // for (i = 0; i < 64; i++) { UNSUPPORTED("8q6h71l7igid38ccu2eiu2u59"); // assert(n->branch[i].child); /* node should have every entry full */ UNSUPPORTED("gimqiz18hbjhs9folzw2kmv9"); // rtp->split.BranchBuf[i] = n->branch[i]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e53m9mpp58nv3640vo2p82rdv"); // rtp->split.BranchBuf[64] = *b; UNSUPPORTED("277onaphbigykl17b8k9ucsw3"); // /* calculate rect containing all in the set */ UNSUPPORTED("ea4y9kg2yx11whdarwr9up60y"); // rtp->split.CoverSplit = rtp->split.BranchBuf[0].rect; UNSUPPORTED("27yzy7ezx5w65cas3232s6j4m"); // for (i = 1; i < 64 + 1; i++) { UNSUPPORTED("4qq8r3ecwl603g3xs97658ebu"); // rtp->split.CoverSplit = CombineRect(&rtp->split.CoverSplit, UNSUPPORTED("8fgchf6ahna7tcxprht01sodq"); // &rtp->split.BranchBuf[i].rect); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8kobdqnp7t9xhtshqkemby6us"); // rtp->split.CoverSplitArea = RectArea(&rtp->split.CoverSplit); UNSUPPORTED("a4ey5uckjqallol1ktyqe35bv"); // InitNode(n); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4woz5xy4gjlahoj7no3ljxmex // static void MethodZero(RTree_t * rtp) public static Object MethodZero(Object... arg) { UNSUPPORTED("4skckzef98x4fz6mws7s1ya15"); // static void MethodZero(RTree_t * rtp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cdtuwprcw1d3bn91v9sde844l"); // register Rect_t *r; UNSUPPORTED("ackphjde797dk6rshtiyv1ydx"); // register int i, growth0, growth1, diff, biggestDiff; UNSUPPORTED("5lh1z9jfdefgm50i9fgjjzf8q"); // register int group, chosen, betterGroup; UNSUPPORTED("6y4x18eeg7eay10tbawh6myhr"); // InitPVars(rtp); UNSUPPORTED("5tz02egfuze5n9nquye65i9lr"); // PickSeeds(rtp); UNSUPPORTED("59gdg3tgr5tyx6gkffgutcpn7"); // while (rtp->split.Partitions[0].count[0] + UNSUPPORTED("7e0o94342ckw0syu4j0m8vyml"); // rtp->split.Partitions[0].count[1] < 64 + 1 && UNSUPPORTED("3kmgnkrx7ku1nnb7vprgwnfvt"); // rtp->split.Partitions[0].count[0] < 64 + 1 - rtp->MinFill UNSUPPORTED("9efzei446ga5t6kd5zstv3mat"); // && rtp->split.Partitions[0].count[1] < UNSUPPORTED("cxlhyya4bw33nn0kxhwtgj7ni"); // 64 + 1 - rtp->MinFill) { UNSUPPORTED("1e60en5izveud5k83xw9vkxwy"); // biggestDiff = -1; UNSUPPORTED("2x1nx9nsne4x3ygmcywl1m3og"); // for (i = 0; i < 64 + 1; i++) { UNSUPPORTED("4c65v1kbz8jvl3tmy8gyj66qi"); // if (!rtp->split.Partitions[0].taken[i]) { UNSUPPORTED("6qli7mcgtgb1ne6pl33r3okkj"); // Rect_t rect; UNSUPPORTED("9tqgad4ybio0vj8j5qgol8sqe"); // r = &rtp->split.BranchBuf[i].rect; UNSUPPORTED("9xitbkq1bfy3lqwrboyzd3wk0"); // /* growth0 = RectArea(&CombineRect(r, UNSUPPORTED("bqznmsnmx0j2z1sfi1s0rtx0t"); // &rtp->split.Partitions[0].cover[0])) - UNSUPPORTED("6tdjjnpjjde476wvn4ez9gy0h"); // rtp->split.Partitions[0].area[0]; UNSUPPORTED("edw1ss2r31mqgsvca2gowi52v"); // */ UNSUPPORTED("b2awl1bpq2krcq7yjahwzc77s"); // /* growth1 = RectArea(&CombineRect(r, UNSUPPORTED("bkjabgaskndtlequuc8ahat39"); // &rtp->split.Partitions[0].cover[1])) - UNSUPPORTED("567lkxsqa5bu7d4nibvr4tpe1"); // rtp->split.Partitions[0].area[1]; UNSUPPORTED("edw1ss2r31mqgsvca2gowi52v"); // */ UNSUPPORTED("5046nw6shbhk2m5dtt3itg1qf"); // rect = CombineRect(r, &rtp->split.Partitions[0].cover[0]); UNSUPPORTED("nc6om9tl3e7nixzkvrf0etup"); // growth0 = UNSUPPORTED("ed7mreakvazgougj1ls6ioj33"); // RectArea(&rect) - rtp->split.Partitions[0].area[0]; UNSUPPORTED("eh4bst7jlzxrquw8wrweiosfn"); // rect = CombineRect(r, &rtp->split.Partitions[0].cover[1]); UNSUPPORTED("9jwgrynpgu0d39tmz3uvb0f5o"); // growth1 = UNSUPPORTED("i0duy3nph3k4msny0ibs81ph"); // RectArea(&rect) - rtp->split.Partitions[0].area[1]; UNSUPPORTED("b9ktilnf5m1wc70yqwf4mdq9e"); // diff = growth1 - growth0; UNSUPPORTED("81ij2fgplw64rbpouql9na7a1"); // if (diff >= 0) UNSUPPORTED("b49dtkykbufvv3lk5trobmbw5"); // group = 0; UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("7sge254zb30sgd45k1os7fw3y"); // group = 1; UNSUPPORTED("adlw9es1w2znqr4h71hd9k1j8"); // diff = -diff; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7qd8i0mpxxu4wueggpmmx9704"); // if (diff > biggestDiff) { UNSUPPORTED("cc2jxkxp6wf0y4a6er7iildb4"); // biggestDiff = diff; UNSUPPORTED("4gq0kbfwv4ls5gbqaxqusd6k"); // chosen = i; UNSUPPORTED("dwalhyg0t90zo8gdq7pstef8a"); // betterGroup = group; UNSUPPORTED("71bce3js2b0lpi50misxff7uy"); // } else if (diff == biggestDiff && UNSUPPORTED("fjvt87on1mhn9dyt0b9vp3jg"); // rtp->split.Partitions[0].count[group] < UNSUPPORTED("1v2g0u9t6ou9xeajwcl3u2nr4"); // rtp->split.Partitions[0].count[betterGroup]) { UNSUPPORTED("4gq0kbfwv4ls5gbqaxqusd6k"); // chosen = i; UNSUPPORTED("dwalhyg0t90zo8gdq7pstef8a"); // betterGroup = group; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("967zxvkt7liyzfgjy03xrpwf2"); // Classify(rtp, chosen, betterGroup); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("15gmufvsx34eo7l2gxmf9sjph"); // /* if one group too full, put remaining rects in the other */ UNSUPPORTED("bz0f1s1b90c4mqpxr24oamywd"); // if (rtp->split.Partitions[0].count[0] + UNSUPPORTED("d6a1dolgcf9n4go7fsk616dlz"); // rtp->split.Partitions[0].count[1] < 64 + 1) { UNSUPPORTED("9xvua0lzynx3u05pjeoibo9tt"); // group = 0; UNSUPPORTED("4edp65b21liyii0fj1ikco7o0"); // if (rtp->split.Partitions[0].count[0] >= UNSUPPORTED("20lpsuiyepr2ujozaf6gp4cc"); // 64 + 1 - rtp->MinFill) UNSUPPORTED("9qtt6i40h8vtjp2cvqyb8ycaz"); // group = 1; UNSUPPORTED("2x1nx9nsne4x3ygmcywl1m3og"); // for (i = 0; i < 64 + 1; i++) { UNSUPPORTED("jdepsnmrs3ghh78ql301sfvu"); // if (!rtp->split.Partitions[0].taken[i]) UNSUPPORTED("gqfhorilvtlogp6f2ozx5akf"); // Classify(rtp, i, group); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5r5xug64f1z60bggncz1pne3f"); // assert(rtp->split.Partitions[0].count[0] + UNSUPPORTED("1whhfnenwvqqzfd4kkosc09z"); // rtp->split.Partitions[0].count[1] == 64 + 1); UNSUPPORTED("c4k8arobh90w9e9sk4s8zx6a5"); // assert(rtp->split.Partitions[0].count[0] >= rtp->MinFill UNSUPPORTED("2lio9rd6ztigudntp9gohkge9"); // && rtp->split.Partitions[0].count[1] >= rtp->MinFill); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8rui4cun4tvq5xy6ke6r3p55e // static void PickSeeds(RTree_t * rtp) public static Object PickSeeds(Object... arg) { UNSUPPORTED("4lrul9ern8gc76sno14wqgtne"); // static void PickSeeds(RTree_t * rtp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("vshrs98l6la9fwui89y20ji3"); // register int i, j; UNSUPPORTED("cz82o6423cha33x8v31g7lhso"); // unsigned int waste, worst; UNSUPPORTED("8glrb479bftuwm5m4w4eqy3id"); // int seed0, seed1; UNSUPPORTED("em2tlievesov4lr9nkas30k2p"); // unsigned int area[64 + 1]; UNSUPPORTED("1rer9hfsfz4to936cdqosy26h"); // for (i = 0; i < 64 + 1; i++) UNSUPPORTED("2f701q18yaasbx3zewp4pc3i3"); // area[i] = RectArea(&rtp->split.BranchBuf[i].rect); UNSUPPORTED("5aj4ab555713s4o7hsg305y2c"); // //worst = -rtp->split.CoverSplitArea - 1; UNSUPPORTED("b2ayju4kcpmgel4or2zbz0dyr"); // worst=0; UNSUPPORTED("82kuymnzv3rubrwutx9bcz4xs"); // for (i = 0; i < 64; i++) { UNSUPPORTED("dw3tar5d5xv4kxcnkcevzm9iw"); // for (j = i + 1; j < 64 + 1; j++) { UNSUPPORTED("4wt347mvef1i2kr5h5z9l0g8i"); // Rect_t rect; UNSUPPORTED("d5jmdkycgoaq3d846xryh0wtz"); // /* waste = RectArea(&CombineRect(&rtp->split.BranchBuf[i].rect, UNSUPPORTED("1d3xkv54rko81ltklwjdtrmj1"); // // &rtp->split.BranchBuf[j].rect)) - area[i] - area[j]; UNSUPPORTED("20m1lc1moer8x00tx9ceto0iw"); // */ UNSUPPORTED("8vf1f6q13lthe8sasqcvpatr3"); // rect = CombineRect(&rtp->split.BranchBuf[i].rect, UNSUPPORTED("5wjck74u7gv0xbv7a01rp3eia"); // &rtp->split.BranchBuf[j].rect); UNSUPPORTED("bzjsjoq354eduv4f511rmjmtk"); // waste = RectArea(&rect) - area[i] - area[j]; UNSUPPORTED("7g3m0cplrcsffy7f3iqsrwztc"); // if (waste > worst) { UNSUPPORTED("1irem1gz77fx5eym990j8l9v5"); // worst = waste; UNSUPPORTED("29q6pzycm1gb2gukvicejmmks"); // seed0 = i; UNSUPPORTED("11wyv1lzvxs0lyd59xqrp77lb"); // seed1 = j; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c1o6jr885s70ej9txo4zjtk3k"); // Classify(rtp, seed0, 0); UNSUPPORTED("bf0ov5eigcyw1mhs6rlnwt7g"); // Classify(rtp, seed1, 1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4qyy2dpbkziuubssvfwb8u1sh // static void Classify(RTree_t * rtp, int i, int group) public static Object Classify(Object... arg) { UNSUPPORTED("8ml9djski25i25i59wyn3dld9"); // static void Classify(RTree_t * rtp, int i, int group) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2ulo1dpl3kexdah5mcmnqpzdl"); // assert(!rtp->split.Partitions[0].taken[i]); UNSUPPORTED("i4edl48bp8pljcmtxd1rep7a"); // rtp->split.Partitions[0].partition[i] = group; UNSUPPORTED("ackdd63x1sev2rjvlsh0xgqbo"); // rtp->split.Partitions[0].taken[i] = (!(0)); UNSUPPORTED("7bethw7ebtjrhmrrq3004xvhh"); // if (rtp->split.Partitions[0].count[group] == 0) UNSUPPORTED("cyhkvve52l3mzao5x0u5df13f"); // rtp->split.Partitions[0].cover[group] = UNSUPPORTED("9mprl7dpvobrbs232soqoyv62"); // rtp->split.BranchBuf[i].rect; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("cyhkvve52l3mzao5x0u5df13f"); // rtp->split.Partitions[0].cover[group] = UNSUPPORTED("7ez406d998w0vpfm3e5tbc0qq"); // CombineRect(&rtp->split.BranchBuf[i].rect, UNSUPPORTED("e0r4nqeeu1jmir6akus7bjggm"); // &rtp->split.Partitions[0].cover[group]); UNSUPPORTED("3n9txb7nb3kh2v0bsy0fufx1e"); // rtp->split.Partitions[0].area[group] = UNSUPPORTED("anowu5wmi1sw0e8v669a1obek"); // RectArea(&rtp->split.Partitions[0].cover[group]); UNSUPPORTED("d8ahf9tcusfmm5zeecg8pmdxb"); // rtp->split.Partitions[0].count[group]++; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ay7l4setwyl3hbx4o2jpa7vyz // static void LoadNodes(RTree_t * rtp, Node_t * n, Node_t * q, struct PartitionVars *p) public static Object LoadNodes(Object... arg) { UNSUPPORTED("d0dvfornj5165j53js6eyidii"); // static void LoadNodes(RTree_t * rtp, Node_t * n, Node_t * q, UNSUPPORTED("an9dlrefy1hbusq999x8s9qgf"); // struct PartitionVars *p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i; UNSUPPORTED("25fhmphgra40j368i6b09n5xz"); // assert(n); UNSUPPORTED("30uxqb850wr1s0f0jg8uipd4m"); // assert(q); UNSUPPORTED("eh686hxootmu11yk2foc2tmr2"); // assert(p); UNSUPPORTED("83olszqrugs1dppzl6flgshr5"); // for (i = 0; i < 64 + 1; i++) { UNSUPPORTED("46lk8hxsutpzodwl5udrq4tik"); // assert(rtp->split.Partitions[0].partition[i] == 0 || UNSUPPORTED("8jebrifw0oq30vs4i2wf1cbse"); // rtp->split.Partitions[0].partition[i] == 1); UNSUPPORTED("56sxhs1suv0k6iod6sl1w72dw"); // if (rtp->split.Partitions[0].partition[i] == 0) UNSUPPORTED("cwda9vt3f43bi23igyzgossds"); // AddBranch(rtp, &rtp->split.BranchBuf[i], n, (void *)0); UNSUPPORTED("9m8w97hthfczabpgdcm7xah33"); // else if (rtp->split.Partitions[0].partition[i] == 1) UNSUPPORTED("2f02d8m6p439gevwt7mxtyo4p"); // AddBranch(rtp, &rtp->split.BranchBuf[i], q, (void *)0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dvgjc83sogjhzf5kxpir405rh // static void InitPVars(RTree_t * rtp) public static Object InitPVars(Object... arg) { UNSUPPORTED("18v3kgq3ud3q6c0nu07xyv8wa"); // static void InitPVars(RTree_t * rtp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i; UNSUPPORTED("2yvv0x8uir74h718l313i7it6"); // rtp->split.Partitions[0].count[0] = rtp->split.Partitions[0].count[1] = UNSUPPORTED("556sry61ttzbp13quuzhes74v"); // 0; UNSUPPORTED("bvhvtlpo10lxy8rquegyfg5jb"); // rtp->split.Partitions[0].cover[0] = rtp->split.Partitions[0].cover[1] = UNSUPPORTED("5bf9thav82syw0gzxp8b9p5ou"); // NullRect(); UNSUPPORTED("8avyuhj51jxnpeujd7fmgcgtq"); // rtp->split.Partitions[0].area[0] = rtp->split.Partitions[0].area[1] = UNSUPPORTED("556sry61ttzbp13quuzhes74v"); // 0; UNSUPPORTED("83olszqrugs1dppzl6flgshr5"); // for (i = 0; i < 64 + 1; i++) { UNSUPPORTED("5dttrbxrjqa1omiz2oovpe18k"); // rtp->split.Partitions[0].taken[i] = (0); UNSUPPORTED("324vwwpg2hf07ejcj9w02evkm"); // rtp->split.Partitions[0].partition[i] = -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/label/xlabels__c.java000066400000000000000000001301761312650303100220110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.label; import static smetana.core.Macro.UNSUPPORTED; public class xlabels__c { //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 1lrfssuxf2e1e5pvk6j7qrff6 // extern int Verbose //1 17dmpzc4uhvmrcx0x00aw2gbc // Dtdisc_t Hdisc = //3 5p3ac8qk4gnne5hj1dc21ysi // static int icompare(Dt_t * dt, void * v1, void * v2, Dtdisc_t * disc) public static Object icompare(Object... arg) { UNSUPPORTED("bpbhsdw4fe10xdxxfuegnvqt2"); // static int icompare(Dt_t * dt, void * v1, void * v2, Dtdisc_t * disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ehks25fxahyjbjd4lm6ryh9su"); // int k1 = *((int *) v1), k2 = *((int *) v2); UNSUPPORTED("6in30ubiocmaih693f0arymgc"); // return k1 - k2; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 88mbfm305igsr7cew5qx6yldp // static XLabels_t *xlnew(object_t * objs, int n_objs, xlabel_t * lbls, int n_lbls, label_params_t * params) public static Object xlnew(Object... arg) { UNSUPPORTED("3le94zdf67vws2boexolzlx7k"); // static XLabels_t *xlnew(object_t * objs, int n_objs, UNSUPPORTED("cb2wq8p902q5tlc1mh5hikgi2"); // xlabel_t * lbls, int n_lbls, UNSUPPORTED("bz8hxsdu70exdmt52dnayj0c7"); // label_params_t * params) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bkrrqfyt0mc9r9usgj4c7t9zs"); // XLabels_t *xlp; UNSUPPORTED("5tfjcsm3vbxebkz2ev3uqptnx"); // xlp = (XLabels_t*)zmalloc(sizeof(XLabels_t)); UNSUPPORTED("evg8rhuwggcno9jwcrub0i4y4"); // /* used to load the rtree in hilbert space filling curve order */ UNSUPPORTED("8yj6rj5llf2mw5pp8tt355a7o"); // if (!(xlp->hdx = dtopen(&Hdisc, Dtobag))) { UNSUPPORTED("4t1y5iinm4310lkpvbal1spve"); // fprintf(stderr, "out of memory\n"); UNSUPPORTED("3m406diamp5s5kwcqtwo4pshf"); // goto bad; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1bzq9uxiqzj7l6llb7e6gti7e"); // /* for querying intersection candidates */ UNSUPPORTED("7elrkgy2129t2ut4mi03dhf75"); // if (!(xlp->spdx = RTreeOpen())) { UNSUPPORTED("4t1y5iinm4310lkpvbal1spve"); // fprintf(stderr, "out of memory\n"); UNSUPPORTED("3m406diamp5s5kwcqtwo4pshf"); // goto bad; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("85lb5m2umu5izyudq40of0dgi"); // /* save arg pointers in the handle */ UNSUPPORTED("ava6c0wrmq2d6j1i4j7bd1lpp"); // xlp->objs = objs; UNSUPPORTED("85sh2ov52z31nsy9mk5su9p5p"); // xlp->n_objs = n_objs; UNSUPPORTED("3et8g76wlkf60sgxrmi3z1vom"); // xlp->lbls = lbls; UNSUPPORTED("2pwe3sog0n7styjgekuhrnd5e"); // xlp->n_lbls = n_lbls; UNSUPPORTED("52j9u0n44sdpwexr3bunb46zi"); // xlp->params = params; UNSUPPORTED("64t9yhsoz02rjp8vy1as25a5n"); // return xlp; UNSUPPORTED("98zx7s9vt8t1s5x9l35evcxnz"); // bad: UNSUPPORTED("66s40csd2ivd8rx4h2ut8oai5"); // if (xlp->hdx) UNSUPPORTED("8mg8tqxa78f1nfk4jh9drw2n0"); // dtclose(xlp->hdx); UNSUPPORTED("b9uy03exphaovgyz5t4gru409"); // if (xlp->spdx) UNSUPPORTED("4cfpl6hom6vo3btrjlhfmn6mi"); // RTreeClose(xlp->spdx); UNSUPPORTED("dms04fhv1vao18v2p0lmk80xf"); // free(xlp); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 apvhod2s1yjb8717rb7gie2kb // static void xlfree(XLabels_t * xlp) public static Object xlfree(Object... arg) { UNSUPPORTED("7jv3t0oxe54lacl7qn1meznth"); // static void xlfree(XLabels_t * xlp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3120ftcrfb2pccpafsxzl14te"); // RTreeClose(xlp->spdx); UNSUPPORTED("dms04fhv1vao18v2p0lmk80xf"); // free(xlp); UNSUPPORTED("b9185t6i77ez1ac587ul8ndnc"); // return; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6lz36gkh8fla3z6f0lxniy368 // static int floorLog2(unsigned int n) public static Object floorLog2(Object... arg) { UNSUPPORTED("dhjwlofpfy5gop5y81eemv6i4"); // static int floorLog2(unsigned int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3xzujk207ipx0d60nbbrwyjez"); // int pos = 0; UNSUPPORTED("f0os7tzuki1s9mllsml3zu2fd"); // if (n == 0) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("4b22up0qcghijti04gz41jqiz"); // if (n >= 1 << 16) { UNSUPPORTED("b8h1lnvuhauq15z5k0fs5u2l1"); // n >>= 16; UNSUPPORTED("e1kd6x1c70e7l8ml3qgzahq34"); // pos += 16; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a7hxj1hb2pc8py8ywsfit3q4n"); // if (n >= 1 << 8) { UNSUPPORTED("aioe8c94e5sluu8n00fdgq128"); // n >>= 8; UNSUPPORTED("b5apnzow59vwb4z38m0bgaxuj"); // pos += 8; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8ln2bn60t9zq7iigfqy9wa5dk"); // if (n >= 1 << 4) { UNSUPPORTED("albua8gefgieknhiuhr1cook"); // n >>= 4; UNSUPPORTED("5ivee6b3gs2khi9h8mpbr20g9"); // pos += 4; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("930rjgw6ueudlb4emmrfw8y8w"); // if (n >= 1 << 2) { UNSUPPORTED("3p8vzi941bcva583xzhk2o7qb"); // n >>= 2; UNSUPPORTED("3t90pfuwl7kz4zpjrsa99cof8"); // pos += 2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8b1fqmv1sxvuyxs3dcp7aas0k"); // if (n >= 1 << 1) { UNSUPPORTED("nx53w89cor5x9akadlbw5et8"); // pos += 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2kr5zds5y6oiaubm8wiunqccr"); // return pos; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 uvnzthcpf4xiih05gxie2rx1 // unsigned int xlhorder(XLabels_t * xlp) public static Object xlhorder(Object... arg) { UNSUPPORTED("9rtsoeopc1glcmntqwf7hz6x7"); // unsigned int xlhorder(XLabels_t * xlp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7w1e4a6q9gftmlsxkc4v7eq9d"); // double maxx = xlp->params->bb.UR.x, maxy = xlp->params->bb.UR.y; UNSUPPORTED("147h47bz0sqql0238qat4fdky"); // return floorLog2(maxx > maxy ? maxx : maxy) + 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lkyvq87bawe3yon7bdwvcjzq // static unsigned int hd_hil_s_from_xy(point p, int n) public static Object hd_hil_s_from_xy(Object... arg) { UNSUPPORTED("9zi37w33fe5wi8h5d2dymr0tt"); // static unsigned int hd_hil_s_from_xy(point p, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("65resmfdu81d1xg2em5l84y82"); // int i, x = p.x, y = p.y, xi, yi; UNSUPPORTED("3s2drtfrrzifwhrt8rk6kq5gq"); // unsigned s; UNSUPPORTED("bd5j4s2m9y2fcgu9giqi9qrhy"); // s = 0; /* Initialize. */ UNSUPPORTED("9d7993w9kft7mplobqeb9boaz"); // for (i = n - 1; i >= 0; i--) { UNSUPPORTED("c1xqmgsdfzeebwk2yfoz65pue"); // xi = (x >> i) & 1; /* Get bit i of x. */ UNSUPPORTED("270wzledmbxq3z8mp5tz7ezib"); // yi = (y >> i) & 1; /* Get bit i of y. */ UNSUPPORTED("3d69e96cdg4apqijubufzse5z"); // s = 4 * s + 2 * xi + (xi ^ yi); /* Append two bits to s. */ UNSUPPORTED("c4cig8vru225s8qy4aj21mfe0"); // x = x ^ y; /* These 3 lines swap */ UNSUPPORTED("7r0w00av090u8a4vi14al4ct6"); // y = y ^ (x & (yi - 1)); /* x and y if yi = 0. */ UNSUPPORTED("cpz7xdfh4gvp5hufdb1ij5amy"); // x = x ^ y; UNSUPPORTED("7i7jygllv89x29npu61cfn74p"); // x = x ^ (-xi & (yi - 1)); /* Complement x and y if */ UNSUPPORTED("5p8kbkyzcbsr9m1b1fl7z3q0h"); // y = y ^ (-xi & (yi - 1)); /* xi = 1 and yi = 0. */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3y6wj3ntgmr1qkdpm7wp1dsch"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bpkzwylrchx5wta1qhytfgbtr // static double aabbaabb(Rect_t * r, Rect_t * s) public static Object aabbaabb(Object... arg) { UNSUPPORTED("21oyvapf2qfnxqid5aolv4mmr"); // static double aabbaabb(Rect_t * r, Rect_t * s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dywr73ggaui4ayztq3tmljs4z"); // /* per dimension if( max < omin || min > omax) */ UNSUPPORTED("981pm44oz7wkhcspjabhjqpmq"); // double iminx, iminy, imaxx, imaxy; UNSUPPORTED("60uso6twsxyml3pff70yndkys"); // if (r->boundary[2] < s->boundary[0] || r->boundary[0] > s->boundary[2]) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("1tavt6umo55xyoarc64k3dxs0"); // if (r->boundary[3] < s->boundary[1] || r->boundary[1] > s->boundary[3]) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("ls92qicz53qcx6cwst6f8om3"); // /* if we get here we have an intersection */ UNSUPPORTED("31cw8fo82001qx6nsg22hugnf"); // /* rightmost left edge of the 2 rectangles */ UNSUPPORTED("7d66kym3m7c0ya8b4kt7vjtvv"); // iminx = UNSUPPORTED("2ohiqb8vdv4gbnzqigtqd47c3"); // r->boundary[0] > s->boundary[0] ? r->boundary[0] : s->boundary[0]; UNSUPPORTED("2bf3t8qfsxq7y4d98hc3p59gv"); // /* upmost bottom edge */ UNSUPPORTED("cvk4ll2zvw3sljlm63j6bcjr8"); // iminy = UNSUPPORTED("13n8uz9c82r3pkg85oh43qf74"); // r->boundary[1] > s->boundary[1] ? r->boundary[1] : s->boundary[1]; UNSUPPORTED("dsfdevf6xy6buo0sydh3h3fis"); // /* leftmost right edge */ UNSUPPORTED("8rdxlzisdq5iw8b07usm1toc9"); // imaxx = UNSUPPORTED("a8uyhcvpgmwrihxaaa5u77i69"); // r->boundary[2] < s->boundary[2] ? r->boundary[2] : s->boundary[2]; UNSUPPORTED("cr403g6ud2h0cyys19fti84tb"); // /* downmost top edge */ UNSUPPORTED("cqszcttk6vqvj0hezy1t1bsig"); // imaxy = UNSUPPORTED("41qdog59oicvy8ku3n9vbzhj6"); // r->boundary[3] < s->boundary[3] ? r->boundary[3] : s->boundary[3]; UNSUPPORTED("cxtiz800rb16yy2u6burhy6mi"); // return (imaxx - iminx) * (imaxy - iminy); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2g71cq6f8w5jbmbnn2x9y5qfq // static int lblenclosing(object_t * objp, object_t * objp1) public static Object lblenclosing(Object... arg) { UNSUPPORTED("96fk2h2cameoldx630f8490ei"); // static int lblenclosing(object_t * objp, object_t * objp1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2uf1ispemhfeg8c7qhy0fbq2j"); // xlabel_t * xlp = objp->lbl;; UNSUPPORTED("txl92fx6l8dzi4yeuegwqirj"); // assert(objp1->sz.x == 0 && objp1->sz.y == 0); UNSUPPORTED("ek6g4dsfb8puipbh006mizket"); // if(! xlp) return 0; UNSUPPORTED("exdts7f2bpam5122kabq2b86c"); // return objp1->pos.x > xlp->pos.x && UNSUPPORTED("99uxf5dqw5nzdymlzfj764uol"); // objp1->pos.x < (xlp->pos.x + xlp->sz.x) && UNSUPPORTED("epx7s3oiw75fuioasz208w1k1"); // objp1->pos.y > xlp->pos.y && UNSUPPORTED("29g3tye8vebllnv9b91xyntzi"); // objp1->pos.y < (xlp->pos.y + xlp->sz.y); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dq1wkb4oxshdggv6cwtgas6m // static void objp2rect(object_t * op, Rect_t * r) public static Object objp2rect(Object... arg) { UNSUPPORTED("bmdr5joxjahq30nkb15r6rf41"); // static void objp2rect(object_t * op, Rect_t * r) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cdtyz1w6cga7n2jo2fbh8c6ro"); // r->boundary[0] = op->pos.x; UNSUPPORTED("9ir52jgzphc4cgyevo2o2ltjs"); // r->boundary[1] = op->pos.y; UNSUPPORTED("cz4cc7haeit4u59so96vv80ch"); // r->boundary[2] = op->pos.x + op->sz.x; UNSUPPORTED("3m857h9kn35205vsumkenc0dx"); // r->boundary[3] = op->pos.y + op->sz.y; UNSUPPORTED("b9185t6i77ez1ac587ul8ndnc"); // return; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 71b5ttp3xs7lo9fqgb7ypyqgx // static void objplp2rect(object_t * objp, Rect_t * r) public static Object objplp2rect(Object... arg) { UNSUPPORTED("5giyzyeu3hmuyo2r06ushsohy"); // static void objplp2rect(object_t * objp, Rect_t * r) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3wparjbgs7cft1xsjcztm8bdh"); // xlabel_t *lp = objp->lbl; UNSUPPORTED("5abhryoldlbjfzt4lh63gmcb4"); // r->boundary[0] = lp->pos.x; UNSUPPORTED("acpv39vcusl8yzf591aja97a0"); // r->boundary[1] = lp->pos.y; UNSUPPORTED("flr92u77dscu4d286xzfwhzs"); // r->boundary[2] = lp->pos.x + lp->sz.x; UNSUPPORTED("beq6fj10iaic6pf2z8xgb1atm"); // r->boundary[3] = lp->pos.y + lp->sz.y; UNSUPPORTED("b9185t6i77ez1ac587ul8ndnc"); // return; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ksqjbiie0e6vvaeawdxriie5 // static Rect_t objplpmks(XLabels_t * xlp, object_t * objp) public static Object objplpmks(Object... arg) { UNSUPPORTED("56xi0kf7c3v2wjn9pgxjfd6h"); // static Rect_t objplpmks(XLabels_t * xlp, object_t * objp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1xpsng8cc6f4327hr9iybol18"); // Rect_t rect; UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("44i0d8rb96ptawj2nb9zhyuzq"); // p.x = p.y = 0.0; UNSUPPORTED("3dwj4u821y9ogiqj7n51lyoag"); // if (objp->lbl) UNSUPPORTED("43e7r8tcv1i4842l88wzlv8oh"); // p = objp->lbl->sz; UNSUPPORTED("5vkhq86nkkgbben2zw7acts5t"); // rect.boundary[0] = (int) floor(objp->pos.x - p.x); UNSUPPORTED("3smh87oiqzvpexhjkfsvfqk9x"); // rect.boundary[1] = (int) floor(objp->pos.y - p.y); UNSUPPORTED("2qxkma0x5w0j667gciafl1erp"); // rect.boundary[2] = (int) ceil(objp->pos.x + objp->sz.x + p.x); UNSUPPORTED("6jltyhrpm228xlstvy1cij4b"); // assert(rect.boundary[2] < INT_MAX); UNSUPPORTED("aczubaaqymb9ns1q4t70v16a2"); // rect.boundary[3] = (int) ceil(objp->pos.y + objp->sz.y + p.y); UNSUPPORTED("560x8steudix953y8g7kyqgph"); // assert(rect.boundary[3] < INT_MAX); UNSUPPORTED("5r5gm69aqx2rcthvo0oaisz5n"); // return rect; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 calnhom3s9dqvvi6crrz3h2wp // static int getintrsxi(XLabels_t * xlp, object_t * op, object_t * cp) public static Object getintrsxi(Object... arg) { UNSUPPORTED("a9fedvxwftar39hm6zje929tj"); // static int getintrsxi(XLabels_t * xlp, object_t * op, object_t * cp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("451bp6msra12odk32g38u2p4l"); // int i = -1; UNSUPPORTED("6ve3kvakrupo08cfuexjzim3j"); // xlabel_t *lp = op->lbl, *clp = cp->lbl; UNSUPPORTED("bot9xncc749y7iruelw2v96mm"); // assert(lp != clp); UNSUPPORTED("95np7ge1zv1ws57dp9wu3twm8"); // if (lp->set == 0 || clp->set == 0) UNSUPPORTED("11drvggon8u61uz4iw75insly"); // return i; UNSUPPORTED("bofpvwtmumoe1ckgnlgbwg8bt"); // if ((op->pos.x == 0.0 && op->pos.y == 0.0) || UNSUPPORTED("f039op8rn0jopi9r8kora4cwz"); // (cp->pos.x == 0.0 && cp->pos.y == 0.0)) UNSUPPORTED("11drvggon8u61uz4iw75insly"); // return i; UNSUPPORTED("5t4dji6xy0hdyx5wguao13hy5"); // if (cp->pos.y < op->pos.y) UNSUPPORTED("kx0a7gocqji2ms0neepjemp0"); // if (cp->pos.x < op->pos.x) UNSUPPORTED("al11nyatzn20y82ligyxw6doz"); // i = 0; UNSUPPORTED("6u28hrhgdf9tpy6v85nmoma8q"); // else if (cp->pos.x > op->pos.x) UNSUPPORTED("3nbwdw3wfkpmnrf8loezvflkx"); // i = 2; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("akdfo982ws6tlct2c4wlm7hdb"); // i = 1; UNSUPPORTED("6h2iz13c1pog9oqz0a4f1sqth"); // else if (cp->pos.y > op->pos.y) UNSUPPORTED("kx0a7gocqji2ms0neepjemp0"); // if (cp->pos.x < op->pos.x) UNSUPPORTED("2rdl000508m132a9u1h076lba"); // i = 6; UNSUPPORTED("6u28hrhgdf9tpy6v85nmoma8q"); // else if (cp->pos.x > op->pos.x) UNSUPPORTED("7p6vu0p80gdkcsj4l5hz59dqb"); // i = 8; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("69apu46xpi0gdi4dt1tir6dbh"); // i = 7; UNSUPPORTED("73lwftxejfwwrm0v22inmutya"); // else if (cp->pos.x < op->pos.x) UNSUPPORTED("9t0t38axcdz9uuxxaxd4e5oi2"); // i = 3; UNSUPPORTED("an605gtk4m1ql9srrrj5k6dah"); // else if (cp->pos.x > op->pos.x) UNSUPPORTED("cmp9l0lizmu0ars1jf1oxdms"); // i = 5; UNSUPPORTED("ahwo5hst5k1gyq20ve63ahe81"); // return i; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 52awwxu810dg9a2pjq45aomam // static double recordointrsx(XLabels_t * xlp, object_t * op, object_t * cp, Rect_t * rp, double a, object_t * intrsx[9]) public static Object recordointrsx(Object... arg) { UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double UNSUPPORTED("2zz9cixco1u51p503mmbdrgwj"); // recordointrsx(XLabels_t * xlp, object_t * op, object_t * cp, Rect_t * rp, UNSUPPORTED("apwjxkvmqelrsmtxwca7febp5"); // double a, object_t * intrsx[9]) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ejj0lh0dxc3weinkmoqplvk87"); // int i = getintrsxi(xlp, op, cp); UNSUPPORTED("7jqpiltkvdvvkjldnxqmz4nfw"); // if (i < 0) UNSUPPORTED("cmp9l0lizmu0ars1jf1oxdms"); // i = 5; UNSUPPORTED("b3zyhtz43kkfxl6c8kovnaukv"); // if (intrsx[i] != (void *)0) { UNSUPPORTED("908eps96desp6goewhn8nkz4v"); // double sa, maxa = 0.0; UNSUPPORTED("cz5yjl642c9a3c7quub0ndp2a"); // Rect_t srect; UNSUPPORTED("aq0f27u636o0qqw392noohjgj"); // /* keep maximally overlapping object */ UNSUPPORTED("5vocmgb870od0q18046qxkydh"); // objp2rect(intrsx[i], &srect); UNSUPPORTED("3by02iwc6g6vz00qca2gs8af1"); // sa = aabbaabb(rp, &srect); UNSUPPORTED("77dloi6nsmguqzpi413an26qc"); // if (sa > a) UNSUPPORTED("8e6d6m12amff6diyc58bdpzap"); // maxa = sa; UNSUPPORTED("2d4heu1iudrpn42muf8z4aedr"); // /*keep maximally overlapping label */ UNSUPPORTED("5g3p1wh0h43afgmy1ttrgr1jv"); // if (intrsx[i]->lbl) { UNSUPPORTED("e5ldv4apogj6g1ixv62v7fqn7"); // objplp2rect(intrsx[i], &srect); UNSUPPORTED("6h73h574xwo051r2xjepln3kk"); // sa = aabbaabb(rp, &srect); UNSUPPORTED("cl94uq2flao8cddtvg02oliwb"); // if (sa > a) UNSUPPORTED("d9hnc5ox6fsga1e2336gg1fwv"); // maxa = sa > maxa ? sa : maxa; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6nmie1l1f5g573kzykn3266zd"); // if (maxa > 0.0) UNSUPPORTED("dm9264t4efl70h617d1apqrlj"); // return maxa; UNSUPPORTED("3vems3bwps1fshis117u06l2l"); // /*replace overlapping label/object pair */ UNSUPPORTED("c3ewj48u0ngzq2xd8g3238ays"); // intrsx[i] = cp; UNSUPPORTED("efte22brajv8hm98pgq1oyjc5"); // return a; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2u8wtbwfirvx570l7nhbkqwmn"); // intrsx[i] = cp; UNSUPPORTED("3gfohtnqgemf2e1akg4je944a"); // return a; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2umrncgkunxoyeuc8i9hd5pwa // static double recordlintrsx(XLabels_t * xlp, object_t * op, object_t * cp, Rect_t * rp, double a, object_t * intrsx[9]) public static Object recordlintrsx(Object... arg) { UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double UNSUPPORTED("a36vanbvru4xq84pujn0rdpr5"); // recordlintrsx(XLabels_t * xlp, object_t * op, object_t * cp, Rect_t * rp, UNSUPPORTED("apwjxkvmqelrsmtxwca7febp5"); // double a, object_t * intrsx[9]) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ejj0lh0dxc3weinkmoqplvk87"); // int i = getintrsxi(xlp, op, cp); UNSUPPORTED("7jqpiltkvdvvkjldnxqmz4nfw"); // if (i < 0) UNSUPPORTED("cmp9l0lizmu0ars1jf1oxdms"); // i = 5; UNSUPPORTED("b3zyhtz43kkfxl6c8kovnaukv"); // if (intrsx[i] != (void *)0) { UNSUPPORTED("908eps96desp6goewhn8nkz4v"); // double sa, maxa = 0.0; UNSUPPORTED("cz5yjl642c9a3c7quub0ndp2a"); // Rect_t srect; UNSUPPORTED("aq0f27u636o0qqw392noohjgj"); // /* keep maximally overlapping object */ UNSUPPORTED("5vocmgb870od0q18046qxkydh"); // objp2rect(intrsx[i], &srect); UNSUPPORTED("3by02iwc6g6vz00qca2gs8af1"); // sa = aabbaabb(rp, &srect); UNSUPPORTED("77dloi6nsmguqzpi413an26qc"); // if (sa > a) UNSUPPORTED("8e6d6m12amff6diyc58bdpzap"); // maxa = sa; UNSUPPORTED("2d4heu1iudrpn42muf8z4aedr"); // /*keep maximally overlapping label */ UNSUPPORTED("5g3p1wh0h43afgmy1ttrgr1jv"); // if (intrsx[i]->lbl) { UNSUPPORTED("e5ldv4apogj6g1ixv62v7fqn7"); // objplp2rect(intrsx[i], &srect); UNSUPPORTED("6h73h574xwo051r2xjepln3kk"); // sa = aabbaabb(rp, &srect); UNSUPPORTED("cl94uq2flao8cddtvg02oliwb"); // if (sa > a) UNSUPPORTED("d9hnc5ox6fsga1e2336gg1fwv"); // maxa = sa > maxa ? sa : maxa; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6nmie1l1f5g573kzykn3266zd"); // if (maxa > 0.0) UNSUPPORTED("dm9264t4efl70h617d1apqrlj"); // return maxa; UNSUPPORTED("3vems3bwps1fshis117u06l2l"); // /*replace overlapping label/object pair */ UNSUPPORTED("c3ewj48u0ngzq2xd8g3238ays"); // intrsx[i] = cp; UNSUPPORTED("efte22brajv8hm98pgq1oyjc5"); // return a; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2u8wtbwfirvx570l7nhbkqwmn"); // intrsx[i] = cp; UNSUPPORTED("3gfohtnqgemf2e1akg4je944a"); // return a; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2td62i5hus8obwt8j1lo3ddj9 // static BestPos_t xlintersections(XLabels_t * xlp, object_t * objp, object_t * intrsx[9]) public static Object xlintersections(Object... arg) { UNSUPPORTED("5d1nc0otrpz1jjsig9p42wcdx"); // static BestPos_t UNSUPPORTED("6wd33niscsg9gaphvjj2k27mk"); // xlintersections(XLabels_t * xlp, object_t * objp, object_t * intrsx[9]) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("3zfiovc9yy1ux6pn9mcga1mhx"); // LeafList_t *ilp, *llp; UNSUPPORTED("a1j5r089evbgqbrk12ebcposk"); // Rect_t rect, srect; UNSUPPORTED("ac14qcqjljksbh1ulqbhsnrnb"); // BestPos_t bp; UNSUPPORTED("cep99zzwrn6h0kw9g90d0bcx5"); // assert(objp->lbl); UNSUPPORTED("at98kl98nqfoglwklw8bmf8dy"); // bp.n = 0; UNSUPPORTED("6umte8r5yaoo1st9aa3ak69vv"); // bp.area = 0.0; UNSUPPORTED("6lbd8rbktjb11npai18mqgehg"); // bp.pos = objp->lbl->pos; UNSUPPORTED("bu059qij9p4jrq3c2fc3dv1tc"); // for(i=0; in_objs; i++) { UNSUPPORTED("2ju28cg7zhx8a22r2nngjed1z"); // if(objp == &xlp->objs[i]) continue; UNSUPPORTED("8y5ea7egphfppbq3tbxnqvszd"); // if(xlp->objs[i].sz.x > 0 && xlp->objs[i].sz.y > 0) continue; UNSUPPORTED("8kr7yfnz75qb1mcurk9ikvqm4"); // if(lblenclosing(objp, &xlp->objs[i]) ) { UNSUPPORTED("4szbt8bacnec4eh6741w9202k"); // bp.n++; UNSUPPORTED("dquo3qofk56ds5xl95lhvcthf"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3kxhpoylut0o1vn46d51xaxmm"); // objplp2rect(objp, &rect); UNSUPPORTED("2oyraxz5ikxma3gbfbygvqyfb"); // llp = RTreeSearch(xlp->spdx, xlp->spdx->root, &rect); UNSUPPORTED("5gmvhcq1f7m3vaw99uu5u2lhh"); // if (!llp) UNSUPPORTED("6t20fkj318tjhdok8hlpbsnf7"); // return bp; UNSUPPORTED("cu0fy461wercnkus2c5pix4y9"); // for (ilp = llp; ilp; ilp = ilp->next) { UNSUPPORTED("694r1mgceoxxp4ktbci1h2qnm"); // double a, ra; UNSUPPORTED("6sqdh7rdwpg33jt0ecjx3yobj"); // object_t *cp = ilp->leaf->data; UNSUPPORTED("7wl0z6xy4danjs21muyt94sm7"); // if (cp == objp) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("91gncffnouukjk2940jfpcll4"); // /*label-object intersect */ UNSUPPORTED("8gzbd1z9dm5uszv31wx6una1n"); // objp2rect(cp, &srect); UNSUPPORTED("c5t1kwupnkevwfpx3deb42y52"); // a = aabbaabb(&rect, &srect); UNSUPPORTED("9zmfoo91yy2c8v5o1x9tul9a5"); // if (a > 0.0) { UNSUPPORTED("di2i1k0ht9d4tbn1d0os7lj44"); // ra = recordointrsx(xlp, objp, cp, &rect, a, intrsx); UNSUPPORTED("20fp32yan59vu7bbp6jc1t8fn"); // bp.n++; UNSUPPORTED("asfx7fyb1rvar23xmjcttxkyc"); // bp.area += ra; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6pabj7ne9s1dinxh7rgynt84r"); // /*label-label intersect */ UNSUPPORTED("6azbae5tbds7g6ytolv14300v"); // if (!cp->lbl || !cp->lbl->set) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("4jw7tfl9ltqgflydxukej7r0d"); // objplp2rect(cp, &srect); UNSUPPORTED("c5t1kwupnkevwfpx3deb42y52"); // a = aabbaabb(&rect, &srect); UNSUPPORTED("9zmfoo91yy2c8v5o1x9tul9a5"); // if (a > 0.0) { UNSUPPORTED("db5ir72mk4a23hg0pqyapmdav"); // ra = recordlintrsx(xlp, objp, cp, &rect, a, intrsx); UNSUPPORTED("20fp32yan59vu7bbp6jc1t8fn"); // bp.n++; UNSUPPORTED("asfx7fyb1rvar23xmjcttxkyc"); // bp.area += ra; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6q4puajbcusq4jhaq2i60nlt4"); // RTreeLeafListFree(llp); UNSUPPORTED("bgo7070e5cs998w6zp1ma85ad"); // return bp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8rxvucqsqnqej6h8p1osfnk4b // static BestPos_t xladjust(XLabels_t * xlp, object_t * objp) public static Object xladjust(Object... arg) { UNSUPPORTED("855u8yvlwgwm8xrgmk8yd4q2g"); // static BestPos_t xladjust(XLabels_t * xlp, object_t * objp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3wparjbgs7cft1xsjcztm8bdh"); // xlabel_t *lp = objp->lbl; UNSUPPORTED("3z9wizs5r8uuyz9r6zxqmltyr"); // double xincr = ((2 * lp->sz.x) + objp->sz.x) / 8; UNSUPPORTED("6y5jbcs5zcnghcye723x4gerv"); // double yincr = ((2 * lp->sz.y) + objp->sz.y) / 2; UNSUPPORTED("75ucply06uar4cxvlazotnq23"); // object_t *intrsx[9]; UNSUPPORTED("9akjtu5ebkpokhkmmtkmz7alu"); // BestPos_t bp, nbp; UNSUPPORTED("cep99zzwrn6h0kw9g90d0bcx5"); // assert(objp->lbl); UNSUPPORTED("8imr23u6gekt0djjf1kronrfn"); // memset(intrsx, 0, sizeof(intrsx)); UNSUPPORTED("1yhd7hlhm8avh8zzfa6szjhz"); // /*x left */ UNSUPPORTED("9j4u90wq1z4maw7hj3ecfdm76"); // lp->pos.x = objp->pos.x - lp->sz.x; UNSUPPORTED("dximv1vws8eaor4idmmxl4cxm"); // /*top */ UNSUPPORTED("2fqhd5bouvdzxkjo7cb26f1be"); // lp->pos.y = objp->pos.y + objp->sz.y; UNSUPPORTED("4ol5wxgvom71bm5d6x8u1uhce"); // bp = xlintersections(xlp, objp, intrsx); UNSUPPORTED("b2di2eiikxmj7aprwrglzmouu"); // if (bp.n == 0) UNSUPPORTED("6t20fkj318tjhdok8hlpbsnf7"); // return bp; UNSUPPORTED("aagnln5mk16fd69wnvh7p5m33"); // /*mid */ UNSUPPORTED("b7imuebo95ow7fl42ukl08csq"); // lp->pos.y = objp->pos.y; UNSUPPORTED("4a8niot6lun3zef1tls6aomot"); // nbp = xlintersections(xlp, objp, intrsx); UNSUPPORTED("5d0zdvxl3sgzkryeuli9o53y8"); // if (nbp.n == 0) UNSUPPORTED("6a6aos5zy43mcgqak0sb6pm5f"); // return nbp; UNSUPPORTED("anqn2ghhjsx21704j9hnkxqle"); // if (nbp.area < bp.area) UNSUPPORTED("ct5bwjy62uv01c11htvtjj68p"); // bp = nbp; UNSUPPORTED("d0vrsmmihdqn5mrg1ukoz4opr"); // /*bottom */ UNSUPPORTED("f5b4ggww4fzy0j1ustukdd023"); // lp->pos.y = objp->pos.y - lp->sz.y; UNSUPPORTED("4a8niot6lun3zef1tls6aomot"); // nbp = xlintersections(xlp, objp, intrsx); UNSUPPORTED("5d0zdvxl3sgzkryeuli9o53y8"); // if (nbp.n == 0) UNSUPPORTED("6a6aos5zy43mcgqak0sb6pm5f"); // return nbp; UNSUPPORTED("anqn2ghhjsx21704j9hnkxqle"); // if (nbp.area < bp.area) UNSUPPORTED("ct5bwjy62uv01c11htvtjj68p"); // bp = nbp; UNSUPPORTED("7fnjcyugtimcpcfm4309c9tdm"); // /*x mid */ UNSUPPORTED("321pfgsh01nbsjro6xmf2ayfz"); // lp->pos.x = objp->pos.x; UNSUPPORTED("dximv1vws8eaor4idmmxl4cxm"); // /*top */ UNSUPPORTED("2fqhd5bouvdzxkjo7cb26f1be"); // lp->pos.y = objp->pos.y + objp->sz.y; UNSUPPORTED("4a8niot6lun3zef1tls6aomot"); // nbp = xlintersections(xlp, objp, intrsx); UNSUPPORTED("5d0zdvxl3sgzkryeuli9o53y8"); // if (nbp.n == 0) UNSUPPORTED("6a6aos5zy43mcgqak0sb6pm5f"); // return nbp; UNSUPPORTED("anqn2ghhjsx21704j9hnkxqle"); // if (nbp.area < bp.area) UNSUPPORTED("ct5bwjy62uv01c11htvtjj68p"); // bp = nbp; UNSUPPORTED("d0vrsmmihdqn5mrg1ukoz4opr"); // /*bottom */ UNSUPPORTED("f5b4ggww4fzy0j1ustukdd023"); // lp->pos.y = objp->pos.y - lp->sz.y; UNSUPPORTED("4a8niot6lun3zef1tls6aomot"); // nbp = xlintersections(xlp, objp, intrsx); UNSUPPORTED("5d0zdvxl3sgzkryeuli9o53y8"); // if (nbp.n == 0) UNSUPPORTED("6a6aos5zy43mcgqak0sb6pm5f"); // return nbp; UNSUPPORTED("anqn2ghhjsx21704j9hnkxqle"); // if (nbp.area < bp.area) UNSUPPORTED("ct5bwjy62uv01c11htvtjj68p"); // bp = nbp; UNSUPPORTED("630ofptck59xowlm1hcwiue59"); // /*x right */ UNSUPPORTED("3zrvv0dmz98537x06egk4mwsj"); // lp->pos.x = objp->pos.x + objp->sz.x; UNSUPPORTED("dximv1vws8eaor4idmmxl4cxm"); // /*top */ UNSUPPORTED("2fqhd5bouvdzxkjo7cb26f1be"); // lp->pos.y = objp->pos.y + objp->sz.y; UNSUPPORTED("4a8niot6lun3zef1tls6aomot"); // nbp = xlintersections(xlp, objp, intrsx); UNSUPPORTED("5d0zdvxl3sgzkryeuli9o53y8"); // if (nbp.n == 0) UNSUPPORTED("6a6aos5zy43mcgqak0sb6pm5f"); // return nbp; UNSUPPORTED("anqn2ghhjsx21704j9hnkxqle"); // if (nbp.area < bp.area) UNSUPPORTED("ct5bwjy62uv01c11htvtjj68p"); // bp = nbp; UNSUPPORTED("aagnln5mk16fd69wnvh7p5m33"); // /*mid */ UNSUPPORTED("b7imuebo95ow7fl42ukl08csq"); // lp->pos.y = objp->pos.y; UNSUPPORTED("4a8niot6lun3zef1tls6aomot"); // nbp = xlintersections(xlp, objp, intrsx); UNSUPPORTED("5d0zdvxl3sgzkryeuli9o53y8"); // if (nbp.n == 0) UNSUPPORTED("6a6aos5zy43mcgqak0sb6pm5f"); // return nbp; UNSUPPORTED("anqn2ghhjsx21704j9hnkxqle"); // if (nbp.area < bp.area) UNSUPPORTED("ct5bwjy62uv01c11htvtjj68p"); // bp = nbp; UNSUPPORTED("d0vrsmmihdqn5mrg1ukoz4opr"); // /*bottom */ UNSUPPORTED("f5b4ggww4fzy0j1ustukdd023"); // lp->pos.y = objp->pos.y - lp->sz.y; UNSUPPORTED("4a8niot6lun3zef1tls6aomot"); // nbp = xlintersections(xlp, objp, intrsx); UNSUPPORTED("5d0zdvxl3sgzkryeuli9o53y8"); // if (nbp.n == 0) UNSUPPORTED("6a6aos5zy43mcgqak0sb6pm5f"); // return nbp; UNSUPPORTED("anqn2ghhjsx21704j9hnkxqle"); // if (nbp.area < bp.area) UNSUPPORTED("ct5bwjy62uv01c11htvtjj68p"); // bp = nbp; UNSUPPORTED("6eft7mmbcin2x9bhx6gvtc33b"); // /*sliding from top left */ UNSUPPORTED("2lmnvn101cpkt9b1cwipe71gz"); // if (intrsx[6] || intrsx[7] || intrsx[8] || intrsx[3] || intrsx[0]) { /* have to move */ UNSUPPORTED("c5acs4cl77hgu5j6nmhk090uz"); // if (!intrsx[7] && !intrsx[8]) { /* some room right? */ UNSUPPORTED("ez8sbh237xdqdjeewev2ys74y"); // /* slide along upper edge */ UNSUPPORTED("ajgw2jggmwmofm77lgbx5eo2n"); // for (lp->pos.x = objp->pos.x - lp->sz.x, UNSUPPORTED("nwfhss2g67z5exjkorj0brd"); // lp->pos.y = objp->pos.y + objp->sz.y; UNSUPPORTED("eav75dwa3f3ieedr9mnov3a6u"); // lp->pos.x <= (objp->pos.x + objp->sz.x); UNSUPPORTED("38u334kkfej5n3r31uv1afw9q"); // lp->pos.x += xincr) { UNSUPPORTED("8pbum2o0fs86ceaiuxv4efbb6"); // nbp = xlintersections(xlp, objp, intrsx); UNSUPPORTED("5xx7o143ftoj0rhyhg1hqgioa"); // if (nbp.n == 0) UNSUPPORTED("eqanxe9w90oki7yqvwyzpfcw1"); // return nbp; UNSUPPORTED("8yd6g3a3f0g09gmu5f67vah0x"); // if (nbp.area < bp.area) UNSUPPORTED("d6ac36j6lh6qspxwnn3vi0uc3"); // bp = nbp; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4w0qgfnt6kpuhb381pmra3ln4"); // if (!intrsx[3] && !intrsx[0]) { /* some room down? */ UNSUPPORTED("6st33ex0udr4mk4sa9vd119uz"); // /* slide down left edge */ UNSUPPORTED("ajgw2jggmwmofm77lgbx5eo2n"); // for (lp->pos.x = objp->pos.x - lp->sz.x, UNSUPPORTED("nwfhss2g67z5exjkorj0brd"); // lp->pos.y = objp->pos.y + objp->sz.y; UNSUPPORTED("eolwmrajeldp9gf9ug6ue0gx2"); // lp->pos.y >= (objp->pos.y - lp->sz.y); UNSUPPORTED("bz3822dbe0xnwj4nm7pf39kae"); // lp->pos.y -= yincr) { UNSUPPORTED("8pbum2o0fs86ceaiuxv4efbb6"); // nbp = xlintersections(xlp, objp, intrsx); UNSUPPORTED("5xx7o143ftoj0rhyhg1hqgioa"); // if (nbp.n == 0) UNSUPPORTED("eqanxe9w90oki7yqvwyzpfcw1"); // return nbp; UNSUPPORTED("8yd6g3a3f0g09gmu5f67vah0x"); // if (nbp.area < bp.area) UNSUPPORTED("d6ac36j6lh6qspxwnn3vi0uc3"); // bp = nbp; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8nu4s12gyh52h2ot9r2mlueuv"); // /*sliding from bottom right */ UNSUPPORTED("3zrvv0dmz98537x06egk4mwsj"); // lp->pos.x = objp->pos.x + objp->sz.x; UNSUPPORTED("f5b4ggww4fzy0j1ustukdd023"); // lp->pos.y = objp->pos.y - lp->sz.y; UNSUPPORTED("9bzyoo2lc0pw2w76mz7eeduvc"); // if (intrsx[2] || intrsx[1] || intrsx[0] || intrsx[5] || intrsx[8]) { /* have to move */ UNSUPPORTED("dq7ul34gznvszkqhgqlz4fihm"); // if (!intrsx[1] && !intrsx[0]) { /* some room left? */ UNSUPPORTED("ahn6dk8lj2by2umnd8pceb83d"); // /* slide along lower edge */ UNSUPPORTED("7natp0873pfsvymhhhvki1sev"); // for (lp->pos.x = objp->pos.x + objp->sz.x, UNSUPPORTED("56ycmo0ljb7e86mnezdx3regh"); // lp->pos.y = objp->pos.y - lp->sz.y; UNSUPPORTED("3wro576dh2vj9wpmfxx4rldbm"); // lp->pos.x >= (objp->pos.x - lp->sz.x); UNSUPPORTED("bvw5pjd7v4j796l8hhh1zrln6"); // lp->pos.x -= xincr) { UNSUPPORTED("8pbum2o0fs86ceaiuxv4efbb6"); // nbp = xlintersections(xlp, objp, intrsx); UNSUPPORTED("5xx7o143ftoj0rhyhg1hqgioa"); // if (nbp.n == 0) UNSUPPORTED("eqanxe9w90oki7yqvwyzpfcw1"); // return nbp; UNSUPPORTED("8yd6g3a3f0g09gmu5f67vah0x"); // if (nbp.area < bp.area) UNSUPPORTED("d6ac36j6lh6qspxwnn3vi0uc3"); // bp = nbp; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4owpyb9p8esm06ttngj1arl5c"); // if (!intrsx[5] && !intrsx[8]) { /* some room up? */ UNSUPPORTED("4bcpk3ixfwrlr0yzrjv2efigj"); // /* slide up right edge */ UNSUPPORTED("7natp0873pfsvymhhhvki1sev"); // for (lp->pos.x = objp->pos.x + objp->sz.x, UNSUPPORTED("56ycmo0ljb7e86mnezdx3regh"); // lp->pos.y = objp->pos.y - lp->sz.y; UNSUPPORTED("9cepfi69gtzy7muk9d27es8oc"); // lp->pos.y <= (objp->pos.y + objp->sz.y); UNSUPPORTED("az41g895dhl39ckrigxl1c5jl"); // lp->pos.y += yincr) { UNSUPPORTED("8pbum2o0fs86ceaiuxv4efbb6"); // nbp = xlintersections(xlp, objp, intrsx); UNSUPPORTED("5xx7o143ftoj0rhyhg1hqgioa"); // if (nbp.n == 0) UNSUPPORTED("eqanxe9w90oki7yqvwyzpfcw1"); // return nbp; UNSUPPORTED("8yd6g3a3f0g09gmu5f67vah0x"); // if (nbp.area < bp.area) UNSUPPORTED("d6ac36j6lh6qspxwnn3vi0uc3"); // bp = nbp; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bgo7070e5cs998w6zp1ma85ad"); // return bp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e29g2hwlogx0zchsnvi464c7t // static int xlhdxload(XLabels_t * xlp) public static Object xlhdxload(Object... arg) { UNSUPPORTED("ttxmlo99ck9eo0jae04cg2v0"); // static int xlhdxload(XLabels_t * xlp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("5qghcwlht7sxz3cthtja5f043"); // int order = xlhorder(xlp); UNSUPPORTED("eali4r93mgkm937waq6to82sj"); // for (i = 0; i < xlp->n_objs; i++) { UNSUPPORTED("aves0wxiz65s447kr8wukl6zr"); // HDict_t *hp; UNSUPPORTED("43j1m17g0mjbn69pbx7ph6omt"); // point pi; UNSUPPORTED("bn6ewrzw1x1whedilfc6kobal"); // hp = (HDict_t*)zmalloc(sizeof(HDict_t)); UNSUPPORTED("5wresbe1bm8eff0j10in23a8b"); // hp->d.data = &xlp->objs[i]; UNSUPPORTED("7syosspcm4ygedrsu0c1gaqop"); // hp->d.rect = objplpmks(xlp, &xlp->objs[i]); UNSUPPORTED("6mb29odwxakb6cqdulhhed9j5"); // /* center of the labeling area */ UNSUPPORTED("83ihi4lf580lzo4gdus20wr2w"); // pi.x = hp->d.rect.boundary[0] + UNSUPPORTED("ao944ocofv44otdeh08kl4u8o"); // (hp->d.rect.boundary[2] - hp->d.rect.boundary[0]) / 2; UNSUPPORTED("3igtyiyl8cpovcwukpm44iquw"); // pi.y = hp->d.rect.boundary[1] + UNSUPPORTED("3r4kfmd4lw5d0osh14sf4cjwg"); // (hp->d.rect.boundary[3] - hp->d.rect.boundary[1]) / 2; UNSUPPORTED("42x3x9vgkald7xdpbxyxih2zj"); // hp->key = hd_hil_s_from_xy(pi, order); UNSUPPORTED("4apoyv2n3t2fcv72hom4owvgj"); // if (!((*(((Dt_t*)(xlp->hdx))->searchf))((xlp->hdx),(void*)(hp),0000001))) UNSUPPORTED("aivfd7ajlfz8o8oi68d4u5s5z"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 26qpvnyd6tmdut8i2wo4itza3 // static void xlhdxunload(XLabels_t * xlp) public static Object xlhdxunload(Object... arg) { UNSUPPORTED("4bsnj74f63qe288s6be1xmrzw"); // static void xlhdxunload(XLabels_t * xlp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9sqtid8yyo2ws8avf33utdebf"); // int size=dtsize(xlp->hdx), freed=0; UNSUPPORTED("dm7bmt2fwlkdskmcebdm1ctqj"); // while(dtsize(xlp->hdx) ) { UNSUPPORTED("a3jz6ykhoarsdfviidq7beb9z"); // void*vp=(((Dt_t*)(xlp->hdx))->data->here ? (((Dt_t*)((xlp->hdx)))->disc->link < 0 ? ((Dthold_t*)((((Dt_t*)(xlp->hdx))->data->here)))->obj : (void*)((char*)((((Dt_t*)(xlp->hdx))->data->here)) - ((Dt_t*)((xlp->hdx)))->disc->link) ):(void*)(0)); UNSUPPORTED("2covsywkzvpkysnjf34nmr1uw"); // assert(vp); UNSUPPORTED("a9jmr8hmnwcky7f1e1qorwnjv"); // if(vp) { UNSUPPORTED("d2vfgb4tj6x8x7cq0kv0qgk23"); // (*(((Dt_t*)(xlp->hdx))->searchf))((xlp->hdx),(void*)(vp),0010000); UNSUPPORTED("7f4abg2jsf465jjlnp95d9sk6"); // free(vp); UNSUPPORTED("5hklxkrkvjgi37kkm6v9xajwc"); // freed++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("bifp41eoqo8l51crrab087z21"); // assert(size==freed); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3wrxwwd3y5ts0ekr32o8vhuvv // static int xlspdxload(XLabels_t * xlp) public static Object xlspdxload(Object... arg) { UNSUPPORTED("87f4jxirnq7mx28zcremgaezf"); // static int xlspdxload(XLabels_t * xlp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eoerd3bf05xvvfj7aisz4slcs"); // HDict_t *op=0; UNSUPPORTED("2ub4kt9g1hlj02ucnbi3as0ps"); // for (op = (*(((Dt_t*)(xlp->hdx))->searchf))((xlp->hdx),(void*)(0),0000200); op; op = (*(((Dt_t*)(xlp->hdx))->searchf))((xlp->hdx),(void*)(op),0000010)) { UNSUPPORTED("cklsugu3v9hzi5pvl4dqcq7gf"); // /* tree rectangle data node lvl */ UNSUPPORTED("b49ahflq7xke1g6eoxv0jw2tg"); // RTreeInsert(xlp->spdx, &op->d.rect, op->d.data, &xlp->spdx->root, 0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6d3fqrllm55toeo3wscwvv4ty // static int xlinitialize(XLabels_t * xlp) public static Object xlinitialize(Object... arg) { UNSUPPORTED("732719k3woyiirridxkwkzxoo"); // static int xlinitialize(XLabels_t * xlp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4s45njph0l3mj07r60fuv2k3y"); // int r=0; UNSUPPORTED("ez5mifho06mx5h3ncausptuzp"); // if ((r = xlhdxload(xlp)) < 0) UNSUPPORTED("bt8wt6mqb316pv7egiekltb74"); // return r; UNSUPPORTED("f2rrvhf7kqopq3w2vk3a66gqq"); // if ((r = xlspdxload(xlp)) < 0) UNSUPPORTED("bt8wt6mqb316pv7egiekltb74"); // return r; UNSUPPORTED("5stn8d1urg4jlet1hh0it6cnh"); // xlhdxunload(xlp); UNSUPPORTED("bevdavatk2tsg3i7wugaqk0ta"); // return dtclose(xlp->hdx); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 brqgbskh3z4ah8infjompibvu // int placeLabels(object_t * objs, int n_objs, xlabel_t * lbls, int n_lbls, label_params_t * params) public static Object placeLabels(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("ec68cktfb4yv5ddz6c3prlrlz"); // placeLabels(object_t * objs, int n_objs, UNSUPPORTED("5ldon0a05p5rangda7ft97vpf"); // xlabel_t * lbls, int n_lbls, label_params_t * params) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ch9su7givqwexp175hzif4dga"); // int r, i; UNSUPPORTED("ac14qcqjljksbh1ulqbhsnrnb"); // BestPos_t bp; UNSUPPORTED("as2y5lue6yv2statqso3a65vn"); // XLabels_t *xlp = xlnew(objs, n_objs, lbls, n_lbls, params); UNSUPPORTED("dm5w2lmehr2rv6b2yi2v83i3g"); // if ((r = xlinitialize(xlp)) < 0) UNSUPPORTED("bt8wt6mqb316pv7egiekltb74"); // return r; UNSUPPORTED("8izrf1sxed8y2dmpz5ju27b6h"); // /* Place xlabel_t* lp near lp->obj so that the rectangle whose lower-left UNSUPPORTED("dy7wplw95swrlkv1ne5udmbk4"); // * corner is lp->pos, and size is lp->sz does not intersect any object UNSUPPORTED("8x5vdo798lnffr7xy14gs8x50"); // * in objs (by convention, an object consisting of a single point UNSUPPORTED("9gxb8rlhafdv5g89oagw3add7"); // * intersects nothing) nor any other label, if possible. On input, UNSUPPORTED("4w8t3nbzjsvab8g9jpodkwd8m"); // * lp->set is 0. UNSUPPORTED("e715w78m2sgdlih8srgyerdiv"); // * UNSUPPORTED("z4vevdpoynmn19xji08qzk3g"); // * On output, any label with a position should have this stored in UNSUPPORTED("4v5b9m6g4uktmdpnsll0erj7z"); // * lp->pos and have lp->set non-zero. UNSUPPORTED("e715w78m2sgdlih8srgyerdiv"); // * UNSUPPORTED("3lkc8tv6lv7r7ufa9evyti04j"); // * If params->force is true, all labels must be positioned, even if UNSUPPORTED("4lybka8gtaqneks34nylp952d"); // * overlaps are necessary. UNSUPPORTED("e715w78m2sgdlih8srgyerdiv"); // * UNSUPPORTED("5frb7jkllwey3jie0brk7sexw"); // * Return 0 if all labels could be placed without overlap; UNSUPPORTED("b8t343yuuec8v0l5c25l9lpi9"); // * non-zero otherwise. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("dfy198s0balu93ez4di7muow9"); // r = 0; UNSUPPORTED("bznihqrwh4167vo2mn4du53da"); // for (i = 0; i < n_objs; i++) { UNSUPPORTED("1kray7p45i859cpqe20uu98y6"); // if (objs[i].lbl == 0) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("572cl1ylp2iqus4kjdigoqut3"); // bp = xladjust(xlp, &objs[i]); UNSUPPORTED("dr8tnm5vyr6b4kb5le39f33s9"); // if (bp.n == 0) { UNSUPPORTED("1wsz4ptoxskyulgu7czf059sf"); // objs[i].lbl->set = 1; UNSUPPORTED("crlmrxaiu6t07d3ztas7pwfoi"); // } else if(bp.area == 0) { UNSUPPORTED("djsgfzak14js9ukvgmoqnkm8v"); // objs[i].lbl->pos.x = bp.pos.x; UNSUPPORTED("5s2aq4djc0l3xyilkowd7ri1r"); // objs[i].lbl->pos.y = bp.pos.y; UNSUPPORTED("1wsz4ptoxskyulgu7czf059sf"); // objs[i].lbl->set = 1; UNSUPPORTED("19st2bzrcserz5r5280g8iwb8"); // } else if (params->force == 1) { UNSUPPORTED("djsgfzak14js9ukvgmoqnkm8v"); // objs[i].lbl->pos.x = bp.pos.x; UNSUPPORTED("5s2aq4djc0l3xyilkowd7ri1r"); // objs[i].lbl->pos.y = bp.pos.y; UNSUPPORTED("1wsz4ptoxskyulgu7czf059sf"); // objs[i].lbl->set = 1; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("cqgdtl138trieiu5el4upwpg0"); // r = 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6oy0ry9luo305no4iuqqxcdjr"); // xlfree(xlp); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/ortho/000077500000000000000000000000001312650303100171175ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/lib/ortho/fPQ__c.java000066400000000000000000000301741312650303100211160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.ortho; import static smetana.core.Macro.UNSUPPORTED; public class fPQ__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 75wd380yhtm1uol93mb8l3kmn // static snode** pq //1 8m7y12v9uhpfwb9agee4dvvd7 // static int PQcnt //1 37df10if13d1k3ddj140oe9ge // static snode guard //1 3oj5aj3gc05focs9czbzub5sm // static int PQsize //3 6d62kgw3p14u24ayu546j4r82 // void PQgen(int sz) public static Object PQgen(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("mv0qxfr5hxyhgu3l3m6o47cy"); // PQgen(int sz) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("do3zjq97xzdk5dhii167i60qh"); // if (!pq) { UNSUPPORTED("74u3ayhkzemd24zmbuv7wpym8"); // pq = (snode**)zmalloc((sz+1)*sizeof(snode*)); UNSUPPORTED("dezukzubu9nms24lhvphuawxq"); // pq[0] = &guard; UNSUPPORTED("593hemyh9nreh89upeivll5qx"); // PQsize = sz; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("akljrpu8bej9lq4rmsktz8u2e"); // PQcnt = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 af70676bgfacdrx355e3fm16w // void PQfree(void) public static Object PQfree(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("a722afmxpzwjdmlojj7lqbxaj"); // PQfree(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("efn0baufwv42rir223e1awlhs"); // free (pq); UNSUPPORTED("4af6njplv9g18xpb4kh6834b2"); // pq = NULL; UNSUPPORTED("akljrpu8bej9lq4rmsktz8u2e"); // PQcnt = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9gva9zqwj67hmfsbnnvelzt5i // void PQinit(void) public static Object PQinit(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("3p0cdanvp4f13d8omi42lvjl1"); // PQinit(void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("akljrpu8bej9lq4rmsktz8u2e"); // PQcnt = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 52wib9gann39qwvmctcw6wxdi // void PQcheck (void) public static Object PQcheck(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("ais4fu8ea90z9l9gc75rtolae"); // PQcheck (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("327a0i7b6rqjqj8wdl0h29mnc"); // int i; UNSUPPORTED("ajjv0cjc9s0osbkjlg35z41k"); // for (i = 1; i <= PQcnt; i++) { UNSUPPORTED("6mg3o7pwh14yf5rgrii3b7la2"); // if ((pq[i])->n_idx != i) { UNSUPPORTED("2kc7vwb5ge1ym5i0vk3t2ku3u"); // assert (0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2lbfs6ynzlunyatr57r41uvz7 // void PQupheap(int k) public static Object PQupheap(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("5hhoge8azwixhuw1r6f1ae6d"); // PQupheap(int k) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7e1sq1127wt16hr7o0andcwob"); // snode* x = pq[k]; UNSUPPORTED("7bfu0p9xmzkty10xv4n4l5cqs"); // int v = x->n_val; UNSUPPORTED("1j1bbq23z0qzohezignztjo66"); // int next = k/2; UNSUPPORTED("ae5pat4mp4l6k25pvk8saz8c7"); // snode* n; UNSUPPORTED("70492o1szwz9au93c3is2goa"); // while ((n = pq[next])->n_val < v) { UNSUPPORTED("4i53ezzk69bsmpugd2h8bo35"); // pq[k] = n; UNSUPPORTED("iolnc8pg22pbme3zbdim1eqy"); // (n)->n_idx = k; UNSUPPORTED("8fpdpgwovt0k58t5u167v63is"); // k = next; UNSUPPORTED("eqtnhenyor3dwsa6on9crthdd"); // next /= 2; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("1lxwoekai0i8v3rg0vrg6ahmx"); // pq[k] = x; UNSUPPORTED("7ss0wudteh17yswf0ihopig7z"); // (x)->n_idx = k; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dpsy3q4qmuyf70antkm0irwus // int PQ_insert(snode* np) public static Object PQ_insert(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("5eeaexrm7pigm7t9d73aqaaht"); // PQ_insert(snode* np) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7d2tojz8u1bqjo7uhe2jqz8ks"); // if (PQcnt == PQsize) { UNSUPPORTED("1fnwaiyzr5fvurskinr46kklp"); // agerr (AGERR, "Heap overflow\n"); UNSUPPORTED("bur99ge8gwr5q0vyjwjyk8z3b"); // return (1); UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("d8u0aq1g7mc9qslpfsw3o3ezz"); // PQcnt++; UNSUPPORTED("8f54fbv0205j58hpu3uq3i2ow"); // pq[PQcnt] = np; UNSUPPORTED("f4e1yfpgiak6lx72g6gk4nyi0"); // PQupheap (PQcnt); UNSUPPORTED("a7h72yd6f22ezx8o0izfoyyzl"); // PQcheck(); UNSUPPORTED("bid671dovx1rdiquw5vm3fttj"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ah2uksf5mfgu7r25rg6poansh // void PQdownheap (int k) public static Object PQdownheap(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("5jo6sukhc9upf5qv4eukh8kop"); // PQdownheap (int k) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dd3235mkocimg2v70ln8ixz3k"); // snode* x = pq[k]; UNSUPPORTED("e0wd4mp2k58ml2bf01e6mtxfc"); // int v = (x)->n_val; UNSUPPORTED("b9pl90rstqz0jhnw3ttda3kx5"); // int lim = PQcnt/2; UNSUPPORTED("917ffzmzxsh6kw3txaqow8dv0"); // snode* n; UNSUPPORTED("zrgst5t0lhf2kxrym9g7gvsn"); // int j; UNSUPPORTED("7bbx1rekibyh3hyxh24lprwwk"); // while (k <= lim) { UNSUPPORTED("disb3eax2r4wgge9im541y9hv"); // j = k+k; UNSUPPORTED("e4w7jx4o3i4gav8ujef2bapbn"); // n = pq[j]; UNSUPPORTED("4yles8zr6ozg2g0df2jefc1l2"); // if (j < PQcnt) { UNSUPPORTED("77cupwd0hd3zp8he6wd4tm6nx"); // if ((n)->n_val < (pq[j+1])->n_val) { UNSUPPORTED("1jeqo15tfc6vbefwf85bniwfn"); // j++; UNSUPPORTED("1sglut5nbxcoto9tvzxs3eixh"); // n = pq[j]; UNSUPPORTED("dquo3qofk56ds5xl95lhvcthf"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3hshbuqs95898wh95e2fdh5uz"); // if (v >= (n)->n_val) break; UNSUPPORTED("4i53ezzk69bsmpugd2h8bo35"); // pq[k] = n; UNSUPPORTED("iolnc8pg22pbme3zbdim1eqy"); // (n)->n_idx = k; UNSUPPORTED("8lpwfkimmel90007dlp5eqpbh"); // k = j; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("1lxwoekai0i8v3rg0vrg6ahmx"); // pq[k] = x; UNSUPPORTED("7ss0wudteh17yswf0ihopig7z"); // (x)->n_idx = k; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 asdsi15xhxgfyxlqv3bbx7vzv // snode* PQremove (void) public static Object PQremove(Object... arg) { UNSUPPORTED("7qyamsdkopruu23xaccl0bcd2"); // snode* UNSUPPORTED("7j2q3l5jxp3w7ags9kr29frzn"); // PQremove (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5cu5gkv7lbctrvkomvhsw0j1o"); // snode* n; UNSUPPORTED("6078p2rnfog3yn8o3qzs373e2"); // if (PQcnt) { UNSUPPORTED("6a46qhtz2fbsmmd370t7fv44f"); // n = pq[1]; UNSUPPORTED("8s70ivnxixrmkvd1lnojuxkfn"); // pq[1] = pq[PQcnt]; UNSUPPORTED("7o53ly4ejd7hkmf5tx564eb0x"); // PQcnt--; UNSUPPORTED("4e6w4ct22nty5htys3c0346u1"); // if (PQcnt) PQdownheap (1); UNSUPPORTED("26oeamvax1w8xlf1fp3w3uwbz"); // PQcheck(); UNSUPPORTED("69hc24ic55i66g8tf2ne42327"); // return n; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("7lrkjjj5lce2uf86c1y9o9yoa"); // else return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dvks137inq1ybpgc3p9il60e // void PQupdate (snode* n, int d) public static Object PQupdate(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("b1fi3xtkc0mzuq3pimbrumdj3"); // PQupdate (snode* n, int d) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("byrcaa9kitj1mfe0we79iao5b"); // (n)->n_val = d; UNSUPPORTED("az1v3dey64e8mmt571cqcmw5b"); // PQupheap (n->n_idx); UNSUPPORTED("a7h72yd6f22ezx8o0izfoyyzl"); // PQcheck(); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9u2i85oe7eva5iz0ousp6k9ze // void PQprint (void) public static Object PQprint(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("837kozmovwrdb83nqf648v9hy"); // PQprint (void) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("29u9nk1nrupcw2j8c7qe5glz7"); // int i; UNSUPPORTED("ae5pat4mp4l6k25pvk8saz8c7"); // snode* n; UNSUPPORTED("f3w7y9hew7fq41kdfxhc1bni7"); // fprintf (stderr, "Q: "); UNSUPPORTED("ajjv0cjc9s0osbkjlg35z41k"); // for (i = 1; i <= PQcnt; i++) { UNSUPPORTED("8ma2z0vb3r4euoklbfwtvqixt"); // n = pq[i]; UNSUPPORTED("5vx4bf24j9k0k7d5db0nzqqho"); // fprintf (stderr, "%d(%d:%d) ", UNSUPPORTED("3cv4xg03w7tifmwxdgb02cs87"); // n->index, (n)->n_idx, (n)->n_val); UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("axonnz64pfb53bfq61adrgxoo"); // fprintf (stderr, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/ortho/maze__c.java000066400000000000000000001011451312650303100213610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.ortho; import static smetana.core.Macro.UNSUPPORTED; public class maze__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 7uu4dvqjnvvhc0gokmgcs954k // extern int odb_flags //1 4322iycvkv4hmlad3noqhgel4 // char* pre = //1 9ozsa5zdtrgxx0s86gc0suyn5 // char* post = //3 9g9xjc2r9n65rkl84jjslos81 // static void psdump (cell* gcells, int n_gcells, boxf BB, boxf* rects, int nrect) public static Object psdump(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("1zp0gx8erzkytols6s6anek61"); // psdump (cell* gcells, int n_gcells, boxf BB, boxf* rects, int nrect) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("767492ltpvkpzowhpej4wil2b"); // box absbb; UNSUPPORTED("60497m34eckxdjihuxvqkxsvu"); // absbb.LL.y = absbb.LL.x = 10; UNSUPPORTED("axwbta36ottbp5ug72pnkfza8"); // absbb.UR.x = absbb.LL.x + BB.UR.x - BB.LL.x; UNSUPPORTED("5jojnuuk1njt9p0dm3aklyf4c"); // absbb.UR.y = absbb.LL.y + BB.UR.y - BB.LL.y; UNSUPPORTED("3n4k59tplss0b8rj6cz8wdq4q"); // fputs (pre, stderr); UNSUPPORTED("2c7r664rf3q2nqvcwm076ljgp"); // fprintf (stderr, "%%%%Page: 1 1\n%%%%PageBoundingBox: %d %d %d %d\n", UNSUPPORTED("gvo0wqx49546ze4wrba9h2ir"); // absbb.LL.x, absbb.LL.y, absbb.UR.x, absbb.UR.y); UNSUPPORTED("9z5vt5st7kmlyqdktlquzkygw"); // fprintf (stderr, "%f %f translate\n", 10-BB.LL.x, 10-BB.LL.y); UNSUPPORTED("7v0j1p03zgrz2n8e2sfmouivd"); // fputs ("0 0 1 setrgbcolor\n", stderr); UNSUPPORTED("4elp64ghdngy60otlqydxcc95"); // for (i = 0; i < n_gcells; i++) { UNSUPPORTED("da5sc56v5aj699nvth2tzez6e"); // bb = gcells[i].bb; UNSUPPORTED("1eywmkz80bfnyb49ljgkxcp4x"); // fprintf (stderr, "%f %f %f %f node\n", bb.LL.x, bb.LL.y, bb.UR.x, bb.UR.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("epywyt7h8b5f1fzegiuykr1r8"); // fputs ("0 0 0 setrgbcolor\n", stderr); UNSUPPORTED("cymbkb9p93tw0m4uu2kkj35a0"); // for (i = 0; i < nrect; i++) { UNSUPPORTED("6kbayg7dph0ok4aw3x13wjkdp"); // bb = rects[i]; UNSUPPORTED("6smdn9wdodygfk1sxfjl9q1rt"); // fprintf (stderr, "%f %f %f %f cell\n", bb.LL.x, bb.LL.y, bb.UR.x, bb.UR.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2to6ts1da6hiyr62cjf8n2rmj"); // fputs ("1 0 0 setrgbcolor\n", stderr); UNSUPPORTED("35fqc70o5xuuv6qdrmnv7z6w5"); // fprintf (stderr, "%f %f %f %f cell\n", BB.LL.x, BB.LL.y, BB.UR.x, BB.UR.y); UNSUPPORTED("e2cdlwdcpu3n7z9jwqa3s87mz"); // fputs (post, stderr); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5uuci5ymtq0q51j1getlj2uzd // static int vcmpid(Dt_t* d, pointf* key1, pointf* key2, Dtdisc_t* disc) public static Object vcmpid(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("3u88ycwd14efwsvwyy7780jbr"); // vcmpid(Dt_t* d, pointf* key1, pointf* key2, Dtdisc_t* disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bswiekdugo71hxqryprabuxdm"); // if (key1->x > key2->x) return 1; UNSUPPORTED("3xqpzrzrofjfgy263mutuwbhr"); // else if (key1->x < key2->x) return -1; UNSUPPORTED("285kfkajed5kbwzt1bg891c12"); // else if (key1->y > key2->y) return 1; UNSUPPORTED("3inoestvznj3b5va767iadnzw"); // else if (key1->y < key2->y) return -1; UNSUPPORTED("7lrkjjj5lce2uf86c1y9o9yoa"); // else return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cl7ra88xdu22d00wqr6z5p1p3 // static int hcmpid(Dt_t* d, pointf* key1, pointf* key2, Dtdisc_t* disc) public static Object hcmpid(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("3xjitmu9hfwuxfgr0qi1r04qg"); // hcmpid(Dt_t* d, pointf* key1, pointf* key2, Dtdisc_t* disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dlpx729kklw9nbmmywrkawtg1"); // if (key1->y > key2->y) return 1; UNSUPPORTED("3inoestvznj3b5va767iadnzw"); // else if (key1->y < key2->y) return -1; UNSUPPORTED("axczvcvlh063j4t14thbuiwmx"); // else if (key1->x > key2->x) return 1; UNSUPPORTED("3xqpzrzrofjfgy263mutuwbhr"); // else if (key1->x < key2->x) return -1; UNSUPPORTED("7lrkjjj5lce2uf86c1y9o9yoa"); // else return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 65ld602fx2uotf16tkazo4kf3 // static Dtdisc_t vdictDisc = //1 bhb4uq3a9aat5tmrtebsgxsza // static Dtdisc_t hdictDisc = //3 p4176ft97w736bpghxhghz3d // static void updateWt (cell* cp, sedge* ep, int sz) public static Object updateWt(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("7q4w394vp6o5d2mqannru219n"); // updateWt (cell* cp, sedge* ep, int sz) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dfo4tnm2f8dlo52sahedzj5v9"); // ep->cnt++; UNSUPPORTED("32vrx8u0i9lp4f9mfpmaun71f"); // if (ep->cnt > sz) { UNSUPPORTED("e1mqs9lo2iip945vyvas2qe3z"); // ep->cnt = 0; UNSUPPORTED("2a244flkhx1rjpipbgdokjx1k"); // ep->weight += 16384; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 blhjst7f42nyvd6sy299gtm3d // void updateWts (sgraph* g, cell* cp, sedge* ep) public static Object updateWts(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("bdbwgs1ph76plmvxczfpeo0fd"); // updateWts (sgraph* g, cell* cp, sedge* ep) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("5us6bymu4crkiqypwh57332hj"); // sedge* e; UNSUPPORTED("dkoxg0eyedifjtrm4x8jlyjls"); // int isBend = ((g->nodes + ep->v1)->isVert != (g->nodes + ep->v2)->isVert); UNSUPPORTED("d0b6n8bhbzbusomlpcp9nczv7"); // int hsz = (((cp->bb.UR.y - cp->bb.LL.y)-3)/2); UNSUPPORTED("48m2yizmm8d4lfvszmls2szq1"); // int vsz = (((cp->bb.UR.x - cp->bb.LL.x)-3)/2); UNSUPPORTED("5ecgup35njvagofmc9zaxes1c"); // int minsz = MIN(hsz, vsz); UNSUPPORTED("dfamh7ue082plphhry3xdnm7o"); // /* Bend edges are added first */ UNSUPPORTED("g33yx85p8wg91aap4znjiva4"); // for (i = 0; i < cp->nedges; i++) { UNSUPPORTED("3v1e6x1tokguyh1cyk9ny2j26"); // e = cp->edges[i]; UNSUPPORTED("boxo665ud04gpicwsnvf3dxep"); // if (!((g->nodes + e->v1)->isVert != (g->nodes + e->v2)->isVert)) break; UNSUPPORTED("a89fyn41tp3jnm2osk1wr48ke"); // updateWt (cp, e, minsz); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } UNSUPPORTED("dlcr5m1q7b4en52gyl8obhj15"); // for (; i < cp->nedges; i++) { UNSUPPORTED("3v1e6x1tokguyh1cyk9ny2j26"); // e = cp->edges[i]; UNSUPPORTED("2l9n6hxqrnrvrs2lgg2kxpekp"); // if (isBend || (e == ep)) updateWt (cp, e, (((g->nodes + e->v1)->isVert)?hsz:vsz)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9kapnv38d6faiuxqp4bzksdz1 // static void markSmall (cell* cp, sgraph* g) public static Object markSmall(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("3tdwg2zpiin5w6zoim60p04th"); // markSmall (cell* cp, sgraph* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("b2wz81fy8zanwrmoc1n7arr13"); // snode* onp; UNSUPPORTED("50n2otdf7w8whs0szmjkxenig"); // cell* ocp; UNSUPPORTED("c4eu95u0g7in27e9oxw15rph0"); // if (((((cp->bb.UR.y-cp->bb.LL.y)-3)/2) < 2)) { UNSUPPORTED("8m46r4idk2cejwmyejh6jinky"); // for (i = 0; i < cp->nsides; i++) { UNSUPPORTED("biwl8z6o1ijoz32js8fzwvocb"); // onp = cp->sides[i]; UNSUPPORTED("1aq3dyirdqeh65yempl0l0gnm"); // if (!onp->isVert) continue; UNSUPPORTED("1dki697od540pxi3vq3sce42l"); // if (onp->cells[0] == cp) { /* onp on the right of cp */ UNSUPPORTED("64d5wc2sqfuiw23vs07o4l6s7"); // ocp = onp->cells[1]; UNSUPPORTED("eu4j3gbjan4f0ttcs7nf6djbr"); // ocp->flags |= 8; UNSUPPORTED("9rf28jnwy28nfeeku68ed10xj"); // while ((onp = ocp->sides[M_RIGHT]) && !(onp->cells[1]->flags & 1)) { UNSUPPORTED("1akhs24p47qfish65mtm0ukab"); // ocp = onp->cells[1]; UNSUPPORTED("4u6cjsu9q863vx1aqgb0yihbz"); // ocp->flags |= 8; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("2xswp7wv8mz6jgl7wgro8x4bh"); // else { /* onp on the left of cp */ UNSUPPORTED("788pevah9rf0z6mjd3asogvnj"); // ocp = onp->cells[0]; UNSUPPORTED("eu4j3gbjan4f0ttcs7nf6djbr"); // ocp->flags |= 8; UNSUPPORTED("1y5bqnhg7i4c1fturqzrm83q4"); // while ((onp = ocp->sides[M_LEFT]) && !(onp->cells[0]->flags & 1)) { UNSUPPORTED("du48mhkbj3xddektvxzoot6gk"); // ocp = onp->cells[0]; UNSUPPORTED("4u6cjsu9q863vx1aqgb0yihbz"); // ocp->flags |= 8; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("916l539e3joqg6fu1g6o6o6m1"); // if (((((cp->bb.UR.x-cp->bb.LL.x)-3)/2) < 2)) { UNSUPPORTED("8m46r4idk2cejwmyejh6jinky"); // for (i = 0; i < cp->nsides; i++) { UNSUPPORTED("biwl8z6o1ijoz32js8fzwvocb"); // onp = cp->sides[i]; UNSUPPORTED("eamm9cw0ocdt1wrb6xdeisy4c"); // if (onp->isVert) continue; UNSUPPORTED("7w1e0iugb1y82w3gf5mvxqd6n"); // if (onp->cells[0] == cp) { /* onp on the top of cp */ UNSUPPORTED("64d5wc2sqfuiw23vs07o4l6s7"); // ocp = onp->cells[1]; UNSUPPORTED("auy2yjaypfi86526pdiw6nxyk"); // ocp->flags |= 16; UNSUPPORTED("d88x50zssjd4zw4m00dzwnrig"); // while ((onp = ocp->sides[M_TOP]) && !(onp->cells[1]->flags & 1)) { UNSUPPORTED("1akhs24p47qfish65mtm0ukab"); // ocp = onp->cells[1]; UNSUPPORTED("mf674e2ernvx88oxuj2jvr0z"); // ocp->flags |= 16; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("am0piqqao9stqcscpvwx2n1so"); // else { /* onp on the bottom of cp */ UNSUPPORTED("788pevah9rf0z6mjd3asogvnj"); // ocp = onp->cells[0]; UNSUPPORTED("auy2yjaypfi86526pdiw6nxyk"); // ocp->flags |= 16; UNSUPPORTED("mi3y18vi9ndcg7qz68bvpahf"); // while ((onp = ocp->sides[M_BOTTOM]) && !(onp->cells[0]->flags & 1)) { UNSUPPORTED("du48mhkbj3xddektvxzoot6gk"); // ocp = onp->cells[0]; UNSUPPORTED("mf674e2ernvx88oxuj2jvr0z"); // ocp->flags |= 16; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3l3sbpuetdu8ntcpo8pz13k3e // static void createSEdges (cell* cp, sgraph* g) public static Object createSEdges(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("eiufnofet665j4i0xks3yggav"); // createSEdges (cell* cp, sgraph* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("axfpgrsg8gskangc3qgtq71hz"); // boxf bb = cp->bb; UNSUPPORTED("amp31z1m0vbq1q8zefv5rn3w5"); // double hwt = 1*(bb.UR.x-bb.LL.x); UNSUPPORTED("117vv77kpq1u7vcvnavhc82o9"); // double vwt = 1*(bb.UR.y-bb.LL.y); UNSUPPORTED("3yg7jb3f3z3wrxh6itkf0d5gf"); // double wt = (hwt + vwt)/2.0 + 500; UNSUPPORTED("f3jme7t4b06y2xf3tgf76yger"); // /* We automatically make small channels have high cost to guide routes to UNSUPPORTED("516jhn8ke0rkom44i48cqziuj"); // * more spacious channels. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("cvl5o3802l0vsczlmqn621y5g"); // if (((((bb.UR.y-bb.LL.y)-3)/2) < 2) && !(cp->flags & 8)) { UNSUPPORTED("2ork5nyyvrggj5vavnox5dnik"); // hwt = 16384; UNSUPPORTED("52900dmw3bmqbe886hkd7f0wt"); // wt = 16384; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3mb8guxy615hn4v2qy5ypehr3"); // if (((((bb.UR.x-bb.LL.x)-3)/2) < 2) && !(cp->flags & 16)) { UNSUPPORTED("aik6n8xli7v6xvo8u3rvr7ii0"); // vwt = 16384; UNSUPPORTED("52900dmw3bmqbe886hkd7f0wt"); // wt = 16384; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1r05jnpuv96fwsxl0u1qjjlps"); // if (cp->sides[M_LEFT] && cp->sides[M_TOP]) UNSUPPORTED("4kbjer1m4fqs6a3a264gga6n8"); // cp->edges[cp->nedges++] = createSEdge (g, cp->sides[M_LEFT], cp->sides[M_TOP], wt); UNSUPPORTED("aedmthruftfexyf7cov7u4vvl"); // if (cp->sides[M_TOP] && cp->sides[M_RIGHT]) UNSUPPORTED("5hpsphuhuvv1brp42nrttvb31"); // cp->edges[cp->nedges++] = createSEdge (g, cp->sides[M_TOP], cp->sides[M_RIGHT], wt); UNSUPPORTED("84yyv6mzbxtjgbfa28m4avh6r"); // if (cp->sides[M_LEFT] && cp->sides[M_BOTTOM]) UNSUPPORTED("tyvf713ih73547d7pf5snxf"); // cp->edges[cp->nedges++] = createSEdge (g, cp->sides[M_LEFT], cp->sides[M_BOTTOM], wt); UNSUPPORTED("bnzsrfjru8dtlqidqs86hye5o"); // if (cp->sides[M_BOTTOM] && cp->sides[M_RIGHT]) UNSUPPORTED("69cj63j54kgemat46kq68yrsz"); // cp->edges[cp->nedges++] = createSEdge (g, cp->sides[M_BOTTOM], cp->sides[M_RIGHT], wt); UNSUPPORTED("2sny7e4r4ms0rpg6bxgod0y6w"); // if (cp->sides[M_TOP] && cp->sides[M_BOTTOM]) UNSUPPORTED("eeawpv5dnk3bza402e1fao0sa"); // cp->edges[cp->nedges++] = createSEdge (g, cp->sides[M_TOP], cp->sides[M_BOTTOM], vwt); UNSUPPORTED("2suc8k9vfuvh4m53sqo1etd6w"); // if (cp->sides[M_LEFT] && cp->sides[M_RIGHT]) UNSUPPORTED("9obc9lnx233uhbnedl4zx9ph0"); // cp->edges[cp->nedges++] = createSEdge (g, cp->sides[M_LEFT], cp->sides[M_RIGHT], hwt); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 758etn7f0xldup69utj5juffr // static snode* findSVert (sgraph* g, Dt_t* cdt, pointf p, snodeitem* ditems, boolean isVert) public static Object findSVert(Object... arg) { UNSUPPORTED("1mqfssg5cquehb5bdk2189gy2"); // static snode* UNSUPPORTED("cga4obs9816altnwz6esmme8m"); // findSVert (sgraph* g, Dt_t* cdt, pointf p, snodeitem* ditems, boolean isVert) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("10plv37z3rcnamkp6u1f3fbvy"); // snodeitem* n = (*(((Dt_t*)(cdt))->searchf))((cdt),(void*)(&p),0001000); UNSUPPORTED("aaebo2bb05xyrm6bioykv7j55"); // if (!n) { UNSUPPORTED("2mr1j8jv499c17v211yrq0zid"); // snode* np = createSNode (g); UNSUPPORTED("49x5opmvb6qvpbdzvvwx81n7o"); // assert(ditems); UNSUPPORTED("9imn5k9pmajz70owgy1yst564"); // n = ditems + np->index; UNSUPPORTED("1whmelwelwpr8hmh739a4rx4e"); // n->p = p; UNSUPPORTED("8weo3ve11u2juhqncx820pb23"); // n->np = np; UNSUPPORTED("9js6alb3fxl3uww30tpdie1cc"); // np->isVert = isVert; UNSUPPORTED("lfditfpqzerpfh82n4mjf4e9"); // (*(((Dt_t*)(cdt))->searchf))((cdt),(void*)(n),0000001); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8tkxsnqf69mnlas38600doi66"); // return n->np; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ju0zs4s4k058zbq8y43apnp2 // static void chkSgraph (sgraph* g) public static Object chkSgraph(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("8ywrcod5zukths1uhqhrx6vxw"); // chkSgraph (sgraph* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("327a0i7b6rqjqj8wdl0h29mnc"); // int i; UNSUPPORTED("23fb0v6g2dlefe4px8tzi8zra"); // snode* np; UNSUPPORTED("3l28r11fb44myi7htm1om4cnr"); // for (i = 0; i < g->nnodes; i++) { UNSUPPORTED("8gpm8loz5nt1uxatp2fd3oe6s"); // np = g->nodes+i; UNSUPPORTED("43gcbpnat2bgm3ejrf1vmy4u"); // if (!np->cells[0]) fprintf (stderr, "failed at node %d[0]\n", i); UNSUPPORTED("4oasbub46ddvzyljkj816mvby"); // assert (np->cells[0]); UNSUPPORTED("5cvdi2wx76ojk7uchdcrjcb6i"); // if (!np->cells[1]) fprintf (stderr, "failed at node %d[1]\n", i); UNSUPPORTED("8qge8qp4tr5copb51yv5xxzr3"); // assert (np->cells[1]); UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 85o629p94h5u46pgb4a0x1fto // static sgraph* mkMazeGraph (maze* mp, boxf bb) public static Object mkMazeGraph(Object... arg) { UNSUPPORTED("4a0ckv6kz4gak54lxsr6w9ioy"); // static sgraph* UNSUPPORTED("3409ksucyvqu8i3qex5l9ogv1"); // mkMazeGraph (maze* mp, boxf bb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0h9n3v7xo6m86qr2s9jd4nmz"); // int nsides, i, ncnt, maxdeg; UNSUPPORTED("8nt6vrkyw6r9ib7riac3cwzd1"); // int bound = 4*mp->ncells; UNSUPPORTED("8j75p52hdfny88ny2loms6p80"); // sgraph* g = createSGraph (bound + 2); UNSUPPORTED("8p0cao2lz1e6ihnom1zrti2xq"); // Dt_t* vdict = dtopen(&vdictDisc,Dtoset); UNSUPPORTED("bpe1gv2u25ttmjwienjfwsyzd"); // Dt_t* hdict = dtopen(&hdictDisc,Dtoset); UNSUPPORTED("3lxbgi6k04dub0sshm1mawntn"); // snodeitem* ditems = (snodeitem*)zmalloc((bound)*sizeof(snodeitem)); UNSUPPORTED("83j9x6relm30wmuipbei491st"); // snode** sides; UNSUPPORTED("9w8bspidla7axh1uz7uzys18h"); // /* For each cell, create if necessary and attach a node in search UNSUPPORTED("e6kuh48kval5kcakfxzd1z69i"); // * corresponding to each internal face. The node also gets UNSUPPORTED("cyfjarx488wrc88fgx2fnek70"); // * a pointer to the cell. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("8wxcwqqwmrfzljscdhy3971us"); // sides = (snode**)zmalloc((4*mp->ncells)*sizeof(snode*)); UNSUPPORTED("buvjn27k5tz2673nmlkf9ohz5"); // ncnt = 0; UNSUPPORTED("cc6zk9wsty15bcay61nb68jos"); // for (i = 0; i < mp->ncells; i++) { UNSUPPORTED("2noex6z427j2b0xavovcqkxja"); // cell* cp = mp->cells+i; UNSUPPORTED("f3gck9cxfm9jzl1864uz2y79q"); // snode* np; UNSUPPORTED("7nnzkzxddbza1ae9ba66yaath"); // pointf pt; UNSUPPORTED("9l3tga3eg9n944lh5fs2rkb4h"); // cp->nsides = 4; UNSUPPORTED("9dfgiofr0fzw0r6lz4qrt9zyw"); // cp->sides = sides + 4*i; UNSUPPORTED("bfx5d25fi7joih74q1wr7rf4f"); // if (cp->bb.UR.x < bb.UR.x) { UNSUPPORTED("5jm345o0dxsgpqu2h67gvkukd"); // pt.x = cp->bb.UR.x; UNSUPPORTED("d899yxmcyrxgknu569q83j56y"); // pt.y = cp->bb.LL.y; UNSUPPORTED("al78l565joceq8wykiomytl3v"); // np = findSVert (g, vdict, pt, ditems, NOT(0)); UNSUPPORTED("dyj0n8pksb6qap9nu5jmfpj9w"); // np->cells[0] = cp; UNSUPPORTED("4129rynmdsxu71kxazy1hyycy"); // cp->sides[M_RIGHT] = np; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dequu7puz1aj8ss3oni3mx995"); // if (cp->bb.UR.y < bb.UR.y) { UNSUPPORTED("dxvnot4cde33jxs0bsb7nz382"); // pt.x = cp->bb.LL.x; UNSUPPORTED("3p9qsubmglgugaw1d40s99klt"); // pt.y = cp->bb.UR.y; UNSUPPORTED("c3axnzt640u1xryxs43q8cuab"); // np = findSVert (g, hdict, pt, ditems, 0); UNSUPPORTED("dyj0n8pksb6qap9nu5jmfpj9w"); // np->cells[0] = cp; UNSUPPORTED("boewakbellfte64hummys1al4"); // cp->sides[M_TOP] = np; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("40k7l6eiot79jgs4q9j5r2kjv"); // if (cp->bb.LL.x > bb.LL.x) { UNSUPPORTED("8gfqay3lh5vyrik8rxo1yg2nl"); // np = findSVert (g, vdict, cp->bb.LL, ditems, NOT(0)); UNSUPPORTED("d2mluf5pmzh4dvlhfdwky76qv"); // np->cells[1] = cp; UNSUPPORTED("do45kl0dk4amf3cqorzfqm0tf"); // cp->sides[M_LEFT] = np; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("66y49caixd7f6uqyv2baolqae"); // if (cp->bb.LL.y > bb.LL.y) { UNSUPPORTED("2cqyrkg1fyix8wowsnfdeuorq"); // np = findSVert (g, hdict, cp->bb.LL, ditems, 0); UNSUPPORTED("d2mluf5pmzh4dvlhfdwky76qv"); // np->cells[1] = cp; UNSUPPORTED("bhmdbk8okdxhymkp2zrb7u8xy"); // cp->sides[M_BOTTOM] = np; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ay0zemsj6o1e18wmjs05jsshs"); // /* For each gcell, corresponding to a node in the input graph, UNSUPPORTED("e4frwuwjez68hkt6p71wpwlxp"); // * connect it to its corresponding search nodes. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("doc2vwrr7r2f4tx2zxpfpypw4"); // maxdeg = 0; UNSUPPORTED("4rohfkczkjec9j8oi6c5x026a"); // sides = (snode**)zmalloc((g->nnodes)*sizeof(snode*)); UNSUPPORTED("3cxv3gaogbbrf3xu2gz1bxd2l"); // nsides = 0; UNSUPPORTED("eabxb5i0ddkbddnag9j34xjbc"); // for (i = 0; i < mp->ngcells; i++) { UNSUPPORTED("2xvmsgulyy6tipsy4akf2uzj"); // cell* cp = mp->gcells+i; UNSUPPORTED("17m8hsxma8135wjiolo05duux"); // pointf pt; UNSUPPORTED("4c1f2otw76p0krr6ugzi2malz"); // snodeitem* np; UNSUPPORTED("179ywzb15i2sku8g8z7i1boz"); // cp->sides = sides+nsides; UNSUPPORTED("6ct8i1irbix7j6hecssdk2o42"); // pt = cp->bb.LL; UNSUPPORTED("4ns50pdyghalrjqr4o3qpevji"); // np = (*(((Dt_t*)(hdict))->searchf))((hdict),(void*)(&pt),0001000); UNSUPPORTED("298kvmb0795bd6b9fx9zkdwuo"); // for (; np && np->p.x < cp->bb.UR.x; np = (*(((Dt_t*)(hdict))->searchf))((hdict),(void*)(np),0000010)) { UNSUPPORTED("eq4x6lu28wtcm0m1ekd1r4pg5"); // cp->sides[cp->nsides++] = np->np; UNSUPPORTED("iizzgq6n25zyzvx82krjhkem"); // np->np->cells[1] = cp; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("evuyxziekv131tbe328a72tga"); // np = (*(((Dt_t*)(vdict))->searchf))((vdict),(void*)(&pt),0001000); UNSUPPORTED("7pmcauszxeoqlecavr7kzrzcf"); // for (; np && np->p.y < cp->bb.UR.y; np = (*(((Dt_t*)(vdict))->searchf))((vdict),(void*)(np),0000010)) { UNSUPPORTED("eq4x6lu28wtcm0m1ekd1r4pg5"); // cp->sides[cp->nsides++] = np->np; UNSUPPORTED("iizzgq6n25zyzvx82krjhkem"); // np->np->cells[1] = cp; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5h3mvfcnt7jg2xqse67wo1obl"); // pt.y = cp->bb.UR.y; UNSUPPORTED("4ns50pdyghalrjqr4o3qpevji"); // np = (*(((Dt_t*)(hdict))->searchf))((hdict),(void*)(&pt),0001000); UNSUPPORTED("298kvmb0795bd6b9fx9zkdwuo"); // for (; np && np->p.x < cp->bb.UR.x; np = (*(((Dt_t*)(hdict))->searchf))((hdict),(void*)(np),0000010)) { UNSUPPORTED("eq4x6lu28wtcm0m1ekd1r4pg5"); // cp->sides[cp->nsides++] = np->np; UNSUPPORTED("accj0ibwtypfqux48mf08irfq"); // np->np->cells[0] = cp; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6e77uu605lqzyoy5chq2wtqfk"); // pt.x = cp->bb.UR.x; UNSUPPORTED("4pblgwb16qkmxa4gmvm1k7jt8"); // pt.y = cp->bb.LL.y; UNSUPPORTED("evuyxziekv131tbe328a72tga"); // np = (*(((Dt_t*)(vdict))->searchf))((vdict),(void*)(&pt),0001000); UNSUPPORTED("7pmcauszxeoqlecavr7kzrzcf"); // for (; np && np->p.y < cp->bb.UR.y; np = (*(((Dt_t*)(vdict))->searchf))((vdict),(void*)(np),0000010)) { UNSUPPORTED("eq4x6lu28wtcm0m1ekd1r4pg5"); // cp->sides[cp->nsides++] = np->np; UNSUPPORTED("accj0ibwtypfqux48mf08irfq"); // np->np->cells[0] = cp; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("20mszbn1fqt3r5famytys2b7k"); // nsides += cp->nsides; UNSUPPORTED("6025gj96dwgvacuh99fqz7ojm"); // if (cp->nsides > maxdeg) maxdeg = cp->nsides; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("z0dqo9s1gp2o5rf0c6034igz"); // /* sides = RALLOC (nsides, sides, snode*); */ UNSUPPORTED("2qr5jfiul6hnhj5d6z80qgpb1"); // /* Mark cells that are small because of a small node, not because of the close UNSUPPORTED("2lob3t7thoheoyjm2lymh9i9f"); // * alignment of two rectangles. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("eabxb5i0ddkbddnag9j34xjbc"); // for (i = 0; i < mp->ngcells; i++) { UNSUPPORTED("2xvmsgulyy6tipsy4akf2uzj"); // cell* cp = mp->gcells+i; UNSUPPORTED("3d6qq4g3fw0mz4rcay5nx440a"); // markSmall (cp, g); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("el9dwhqim3arfedly8lrp9vq2"); // /* Set index of two dummy nodes used for real nodes */ UNSUPPORTED("dyl9rr87m0sgliepkv3gf27cg"); // g->nodes[g->nnodes].index = g->nnodes; UNSUPPORTED("3r7b7odsrw99ic8or2omu919p"); // g->nodes[g->nnodes+1].index = g->nnodes+1; UNSUPPORTED("2w6qcucx2d9cglbvaflbxw4o6"); // /* create edges UNSUPPORTED("1j0arl1zdd5kcgz4ma54mwxi"); // * For each ordinary cell, there can be at most 6 edges. UNSUPPORTED("eqw7wagcnifpu2fjni6vek5f8"); // * At most 2 gcells will be used at a time, and each of these UNSUPPORTED("xxno67cyczcsgky9n34pauce"); // * can have at most degree maxdeg. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("bsysrnk2t83p9hwmajmhxyhv0"); // initSEdges (g, maxdeg); UNSUPPORTED("cc6zk9wsty15bcay61nb68jos"); // for (i = 0; i < mp->ncells; i++) { UNSUPPORTED("2noex6z427j2b0xavovcqkxja"); // cell* cp = mp->cells+i; UNSUPPORTED("7amfovltkaqx2bzlrepw8j5zm"); // createSEdges (cp, g); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bzohd8qeiebtj0um7pujifzvk"); // /* tidy up memory */ UNSUPPORTED("alfe6acszsh611blhpw2t224g"); // /* g->nodes = RALLOC (g->nnodes+2, g->nodes, snode); */ UNSUPPORTED("daoy3ejdfg7yqywgc1d6l42ls"); // /* g->edges = RALLOC (g->nedges+2*maxdeg, g->edges, sedge); */ UNSUPPORTED("6ay8mbpe7d44870v0xaw2poe1"); // dtclose (vdict); UNSUPPORTED("3bw7qxrnqbqniuud4o0r4sfbs"); // dtclose (hdict); UNSUPPORTED("dzdth58xx98ya8ggp2giwte05"); // free (ditems); UNSUPPORTED("74gpu8xcot4zlnqtwmtwj1gxl"); // chkSgraph (g); UNSUPPORTED("ba08yhdiocr2grhsh1n3a6k6z"); // /* save core graph state */ UNSUPPORTED("1ysafzgp6gjgoh4xzpiziysi4"); // gsave(g); UNSUPPORTED("2syri7q5tc0jyvwq8ecyfo3vr"); // return g; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 47ee79k49zgxrbvcwk6qo1a91 // maze* mkMaze (graph_t* g, int doLbls) public static Object mkMaze(Object... arg) { UNSUPPORTED("8ftsypi54d22742r6wjoy5v25"); // maze* UNSUPPORTED("chjzymjdqshexf6h9lqtpflg6"); // mkMaze (graph_t* g, int doLbls) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7ma9kdgag30w5ofv1niitxbro"); // node_t* n; UNSUPPORTED("aq8iuld39z3anhn3agas7wrpx"); // maze* mp = (maze*)zmalloc(sizeof(maze)); UNSUPPORTED("170trbmtoncj4hi7wpq7j1v1w"); // boxf* rects; UNSUPPORTED("epxy4v5wrs6mm1nymdce9o2mo"); // int i, nrect; UNSUPPORTED("dyevh82lgyyzdp6weja1ovxir"); // cell* cp; UNSUPPORTED("aqeh4gm2tudxnfkw4nym58953"); // double w2, h2; UNSUPPORTED("8ucfzgk767hqg7v3sq95gwtxz"); // boxf bb, BB; UNSUPPORTED("bydgyuxeazagl60ymagro1h9t"); // mp->ngcells = agnnodes(g); UNSUPPORTED("bvlzfj9xz0yyl1uqoyot7rtyg"); // cp = mp->gcells = (cell*)zmalloc((mp->ngcells)*sizeof(cell)); UNSUPPORTED("ffxll70yqx7zs7ajl2nbmdgi"); // BB.LL.x = BB.LL.y = MAXDOUBLE; UNSUPPORTED("cz4gqh4qsnqvih07liqyudf1o"); // BB.UR.x = BB.UR.y = -MAXDOUBLE; UNSUPPORTED("2ci0azpwlbk63rcshlsj1ve8u"); // for (n = agfstnode (g); n; n = agnxtnode(g,n)) { UNSUPPORTED("9eyzmqvpe8fyomq6d83u60ad8"); // w2 = ND_xsize(n)/2.0; UNSUPPORTED("a5huvn2de51imlq70uxu06ix1"); // if (w2 < 1) w2 = 1; UNSUPPORTED("4165mxclove3sa7vcb5pab3lo"); // h2 = ND_ysize(n)/2.0; UNSUPPORTED("5udqpftmbh4p3ikl8bcptzbyf"); // if (h2 < 1) h2 = 1; UNSUPPORTED("9s6b5rf5dh58h3k6k8u0d9wpz"); // bb.LL.x = ND_coord(n).x - w2; UNSUPPORTED("7makiveicd97c7ttfkw3az03m"); // bb.UR.x = ND_coord(n).x + w2; UNSUPPORTED("4iy87lfal1aq0qmyvlj8e6rmy"); // bb.LL.y = ND_coord(n).y - h2; UNSUPPORTED("3e4m3beafo37vj6bje1w9qhnx"); // bb.UR.y = ND_coord(n).y + h2; UNSUPPORTED("ehjvhmi74i8b9imane6e9gs38"); // BB.LL.x = MIN(BB.LL.x, bb.LL.x); UNSUPPORTED("22q0hpto8htuccf0e98b8noee"); // BB.LL.y = MIN(BB.LL.y, bb.LL.y); UNSUPPORTED("ah47wdkrpv5cflac5mmhhjdn5"); // BB.UR.x = MAX(BB.UR.x, bb.UR.x); UNSUPPORTED("5jcljn7v3ijnrk5mw7tznxrai"); // BB.UR.y = MAX(BB.UR.y, bb.UR.y); UNSUPPORTED("cruvxryr09s05g4gxamylge5p"); // cp->bb = bb; UNSUPPORTED("1t8h7vwcednduaar7crw1obrk"); // cp->flags |= 1; UNSUPPORTED("61mx5zuc5l32rfja607gutu3k"); // ND_alg(n) = cp; UNSUPPORTED("4s1pb2i2w7q7dsgd38jko4ff2"); // cp++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("71u00vuawtzqg4gz0lsai1m4a"); // if (doLbls) { UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7sfcm5iivxihxyopxhnmyyv9w"); // BB.LL.x -= 36;; UNSUPPORTED("5illqz3dav1thosefdf7zf012"); // BB.LL.y -= 36;; UNSUPPORTED("5muslgfqvix4h5kxrntmnt2rh"); // BB.UR.x += 36;; UNSUPPORTED("5gw6fudbmpkabywynsetntifs"); // BB.UR.y += 36;; UNSUPPORTED("12xoan2rb09zbemcgjh189oso"); // rects = partition (mp->gcells, mp->ngcells, &nrect, BB); UNSUPPORTED("8qqibd1rblf4kt3wblfja4pch"); // if (odb_flags & 1) psdump (mp->gcells, mp->ngcells, BB, rects, nrect); UNSUPPORTED("f0ajael9mvkz908ohbsqp8u46"); // mp->cells = (cell*)zmalloc((nrect)*sizeof(cell)); UNSUPPORTED("dzo2h9k9ofrv8aifrwhvdxlk"); // mp->ncells = nrect; UNSUPPORTED("cymbkb9p93tw0m4uu2kkj35a0"); // for (i = 0; i < nrect; i++) { UNSUPPORTED("qb6erte9h6etocgwnpipxn18"); // mp->cells[i].bb = rects[i]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2uqylplzsbm0qd6yfhl4t4vqi"); // free (rects); UNSUPPORTED("ewcr081zwl8ssdtp4n9ofylo0"); // mp->sg = mkMazeGraph (mp, BB); UNSUPPORTED("965jxkqp2n8rpzvodac6mz9mg"); // return mp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 babqclyzdgzlc9rs6vagsa3a9 // void freeMaze (maze* mp) public static Object freeMaze(Object... arg) { UNSUPPORTED("ixanx2vs8hc7piq3w1asfrq5"); // void freeMaze (maze* mp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("65ltdjbqueg56kn1hn5igwiec"); // free (mp->cells[0].sides); UNSUPPORTED("8dgjx2dy276w12zps4vkayrht"); // free (mp->gcells[0].sides); UNSUPPORTED("4u4be1832al75o9ui7p8j20dy"); // free (mp->cells); UNSUPPORTED("4xldapnzfl3mjsal1a38po778"); // free (mp->gcells); UNSUPPORTED("19t5nwndr3zdn7ivgdejb45fh"); // freeSGraph (mp->sg); UNSUPPORTED("8v1nc3xpgspux65bxybvk2gxd"); // dtclose (mp->hchans); UNSUPPORTED("19jphht7cd5e7ovrg923dx1yo"); // dtclose (mp->vchans); UNSUPPORTED("29o1zsbwttldwz75iylxxkrm"); // free (mp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/ortho/ortho__c.java000066400000000000000000003454651312650303100215770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.ortho; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; import smetana.core.jmp_buf; public class ortho__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 7uu4dvqjnvvhc0gokmgcs954k // extern int odb_flags //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //1 6ddu6mrp88g3kun2w1gg8ck8t // typedef Dict_t PointSet //1 6t1gwljnc5qkhgkp9oc8y7lhm // typedef Dict_t PointMap //1 540u5gu9i0x1wzoxqqx5n2vwp // static jmp_buf jbuf private static jmp_buf jbuf = new jmp_buf(); //1 4i7exv80uvzrbbvqtmcwqgujj // int odb_flags //3 1fgp1w41g6nj3rcw29phstsaj // static cell* cellOf (snode* p, snode* q) public static Object cellOf(Object... arg) { UNSUPPORTED("earoc9gw4gdp2iwqsdlz5babo"); // static cell* UNSUPPORTED("a81f9eexacyqhjwx31312aaij"); // cellOf (snode* p, snode* q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2p9afojds64j2415r77pe11ot"); // cell* cp = p->cells[0]; UNSUPPORTED("6s9p9cp0t5f776vclqnqj9dps"); // if ((cp == q->cells[0]) || (cp == q->cells[1])) return cp; UNSUPPORTED("3x1wxbq1zv1fxtxbt8cqyf2zm"); // else return p->cells[1]; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d9bq37gvmpmw51z5hep2ibevp // static pointf midPt (cell* cp) public static Object midPt(Object... arg) { UNSUPPORTED("2zzd7mrm2u540dwuyzehozffj"); // static pointf UNSUPPORTED("5m9iv8q1cwqhqjdweoca9fxwp"); // midPt (cell* cp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p; UNSUPPORTED("6wfic6l7qkikzq3uxy7ra5rk8"); // p.x = (((cp->bb.LL.x)+(cp->bb.UR.x))/2.0); UNSUPPORTED("270uxtsi045j2nyb091mgys86"); // p.y = (((cp->bb.LL.y)+(cp->bb.UR.y))/2.0); UNSUPPORTED("91xduilalb406jjyw2g1i07th"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3fs08z3b3bgjahvaa5l6b4zo0 // static pointf sidePt (snode* ptr, cell* cp) public static Object sidePt(Object... arg) { UNSUPPORTED("2zzd7mrm2u540dwuyzehozffj"); // static pointf UNSUPPORTED("a38yr0nzj0vkqomj9uks960c1"); // sidePt (snode* ptr, cell* cp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2e0v7u9pfngzg11mt4kn3oudg"); // pointf pt; UNSUPPORTED("67cqw53uchqjz2cyglbs25v99"); // if (cp == ptr->cells[1]) { UNSUPPORTED("7hlq358idsgr518ei0otfvvzn"); // if (ptr->isVert) { UNSUPPORTED("dxvnot4cde33jxs0bsb7nz382"); // pt.x = cp->bb.LL.x; UNSUPPORTED("64l4d6adxd1dwebr9az75w0bq"); // pt.y = (((cp->bb.LL.y)+(cp->bb.UR.y))/2.0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("b55gnqjtnj37pizchlqw7tuat"); // pt.x = (((cp->bb.LL.x)+(cp->bb.UR.x))/2.0); UNSUPPORTED("d899yxmcyrxgknu569q83j56y"); // pt.y = cp->bb.LL.y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("7hlq358idsgr518ei0otfvvzn"); // if (ptr->isVert) { UNSUPPORTED("5jm345o0dxsgpqu2h67gvkukd"); // pt.x = cp->bb.UR.x; UNSUPPORTED("64l4d6adxd1dwebr9az75w0bq"); // pt.y = (((cp->bb.LL.y)+(cp->bb.UR.y))/2.0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("b55gnqjtnj37pizchlqw7tuat"); // pt.x = (((cp->bb.LL.x)+(cp->bb.UR.x))/2.0); UNSUPPORTED("3p9qsubmglgugaw1d40s99klt"); // pt.y = cp->bb.UR.y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ak6zrr3ug1q6nedtkthjyg33a"); // return pt; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7emnes5443mx9i54qiv085z3c // static void setSeg (segment* sp, int dir, double fix, double b1, double b2, int l1, int l2) public static Object setSeg(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("czy1oo8vy1jomzgzissjz1pa8"); // setSeg (segment* sp, int dir, double fix, double b1, double b2, int l1, int l2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2lzx2lnk6n6qiepwpcof58amv"); // sp->isVert = dir; UNSUPPORTED("egu7wy8np7s0sfcam1ccn50l8"); // sp->comm_coord = fix; UNSUPPORTED("4k7kksif599bd6vj4gbjlgdvu"); // if (b1 < b2) { UNSUPPORTED("2kbc7nvci81onspyljnbbm2yy"); // sp->p.p1 = b1; UNSUPPORTED("69ntpjs4vuyb4c55h77zuda23"); // sp->p.p2 = b2; UNSUPPORTED("a5cq2nxrju7radz9bujgt4rhr"); // sp->l1 = l1; UNSUPPORTED("9tatc5wgmjq70eejnp326bw0s"); // sp->l2 = l2; UNSUPPORTED("20uja4lokugnba2pfzz5gomz4"); // sp->flipped = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("dmrpx7gtvzbduny1jg7iwe9m4"); // sp->p.p2 = b1; UNSUPPORTED("1fydpfnyspbu5e91gaqjd462s"); // sp->p.p1 = b2; UNSUPPORTED("1q9i62p8y6lpofiaqtwag6ytb"); // sp->l2 = l1; UNSUPPORTED("askwqfrybpj6e7cjozg2h65p2"); // sp->l1 = l2; UNSUPPORTED("etuylyul4aqlllu3yotsuuzp8"); // sp->flipped = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ejdbblkeiy6k5qhpj8qsj0z8y // static route convertSPtoRoute (sgraph* g, snode* fst, snode* lst) public static Object convertSPtoRoute(Object... arg) { UNSUPPORTED("8fb3yibi0votqqanq3fr6x8pj"); // static route UNSUPPORTED("wyj8sug7d8lkktfaafr8tnj7"); // convertSPtoRoute (sgraph* g, snode* fst, snode* lst) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("76tjoqkn7jsh2pn0trcuu3nvs"); // route rte; UNSUPPORTED("au5gm9chihcao74rl90b6ryps"); // snode* ptr; UNSUPPORTED("cywzrf8tem3eh04r3uc8ah1di"); // snode* next; UNSUPPORTED("dvl617t5wak51pbm6b2wwpq7a"); // snode* prev; /* node in shortest path just previous to next */ UNSUPPORTED("ccl0rgdbwuva223xhat8drba8"); // int i, sz = 0; UNSUPPORTED("dyevh82lgyyzdp6weja1ovxir"); // cell* cp; UNSUPPORTED("a5qjw7t9yw4fy2yn8wybaubwv"); // cell* ncp; UNSUPPORTED("8tfdncboqzrme5mtb8miqamt8"); // segment seg; UNSUPPORTED("e8ttz1kqzt1p2bbcbynxzgxwr"); // double fix, b1, b2; UNSUPPORTED("1znk1bh9hsbr0uenjzfdyl00x"); // int l1, l2; UNSUPPORTED("af5fm46r9aa1jyef1lcxmilbj"); // pointf bp1, bp2, prevbp; /* bend points */ UNSUPPORTED("b6zcm30rwu0uuagbtdyocmn03"); // /* count no. of nodes in shortest path */ UNSUPPORTED("2wn8ggohh5i2zmr4zmswe82yn"); // for (ptr = fst; ptr; ptr = (ptr)->n_dad) sz++; UNSUPPORTED("32gg7r7g3ge2w1h3so5nleqkn"); // rte.n = 0; UNSUPPORTED("c8dglxlwc6735e241xb2kleps"); // rte.segs = (segment*)zmalloc((sz-2)*sizeof(segment)); /* at most sz-2 segments */ UNSUPPORTED("anlmm69dbu1fyet3im0yytjdv"); // seg.prev = seg.next = 0; UNSUPPORTED("99cys70aea9mlxqhd6l7nznh8"); // ptr = prev = (fst)->n_dad; UNSUPPORTED("adcxm0zct91fjkt21xpk7t2oc"); // next = (ptr)->n_dad; UNSUPPORTED("cw4hqow3w9qpnqan38q4lzr80"); // if ((ptr->cells[0]->flags & 1)) UNSUPPORTED("f3ouda0gkwbhpq1ghgnvzs28s"); // cp = ptr->cells[1]; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("bwecpy85k4r89mdewgkqnxmqs"); // cp = ptr->cells[0]; UNSUPPORTED("8hu317tt07i24q0t1njlxgaaj"); // bp1 = sidePt (ptr, cp); UNSUPPORTED("fojny6cnx3nf3wyctl8jt3m1"); // while ((next)->n_dad!=NULL) { UNSUPPORTED("4685y9um6houwpnmq3o3xdnbl"); // ncp = cellOf (prev, next); UNSUPPORTED("8avl1rf7puyncfn3xpiz6jmyq"); // updateWts (g, ncp, (ptr)->n_edge); UNSUPPORTED("e9wkqtlau9mlc4plmvuuh9n7t"); // /* add seg if path bends or at end */ UNSUPPORTED("f4tdpv7sv5hrh14s0m0qn6ijr"); // if ((ptr->isVert != next->isVert) || ((next)->n_dad == lst)) { UNSUPPORTED("c536jildnbvxtl2yss5a5uez"); // if (ptr->isVert != next->isVert) UNSUPPORTED("8hpdisbshs8wjwypt17ftfmfg"); // bp2 = midPt (ncp); UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("c06vwwj01jup12zkp64pdhnl5"); // bp2 = sidePt(next, ncp); UNSUPPORTED("1yychnglbjeaemvsoqr67uc24"); // if (ptr->isVert) { /* horizontal segment */ UNSUPPORTED("dvn1bwxcs69692i2rl1pm8ks9"); // if (ptr == (fst)->n_dad) l1 = B_NODE; UNSUPPORTED("7xkaeei1db8jok1w7cm6ipvij"); // else if (prevbp.y > bp1.y) l1 = B_UP; UNSUPPORTED("eudlpvdzus72tg534zqj1oyt2"); // else l1 = B_DOWN; UNSUPPORTED("2u5nit0ixq58ppnkni37zkx0p"); // if (ptr->isVert != next->isVert) { UNSUPPORTED("ho3qdbjkg3vo1gms22e3owtc"); // if (next->cells[0] == ncp) l2 = B_UP; UNSUPPORTED("yfq0lkdewjlujiizjym1ixwn"); // else l2 = B_DOWN; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("wfw1pwgc72zyl8jhmc2mx9q1"); // else l2 = B_NODE; UNSUPPORTED("1kjvrvanocnesq3lr4m4rkpql"); // fix = cp->bb.LL.y; UNSUPPORTED("3l1nsh8rq7tmjt0aaypvrjafd"); // b1 = cp->bb.LL.x; UNSUPPORTED("bdk1ammkqt91fkcw3tko38c4f"); // b2 = ncp->bb.LL.x; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("3jhmgphu961hd77sesd05sgwa"); // else { /* vertical segment */ UNSUPPORTED("dvn1bwxcs69692i2rl1pm8ks9"); // if (ptr == (fst)->n_dad) l1 = B_NODE; UNSUPPORTED("5omok2oqvkufnr17ynsa5l31u"); // else if (prevbp.x > bp1.x) l1 = B_RIGHT; UNSUPPORTED("5u8ur9yzca1q5snap89wagubu"); // else l1 = B_LEFT; UNSUPPORTED("2u5nit0ixq58ppnkni37zkx0p"); // if (ptr->isVert != next->isVert) { UNSUPPORTED("70wuwqcivcyzgs1tpuyker0tw"); // if (next->cells[0] == ncp) l2 = B_RIGHT; UNSUPPORTED("b1h57bzme4p9um8dgwvjorz6d"); // else l2 = B_LEFT; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("wfw1pwgc72zyl8jhmc2mx9q1"); // else l2 = B_NODE; UNSUPPORTED("a6wqml6r0ya7a0ukfjl1akcof"); // fix = cp->bb.LL.x; UNSUPPORTED("c5y1a76ll49xwb6f525w31cxw"); // b1 = cp->bb.LL.y; UNSUPPORTED("5y9rsak5s8cwzp9r7hqzjtdn2"); // b2 = ncp->bb.LL.y; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5ytq0i1egd8zgjegz2alyi2l"); // setSeg (&seg, !ptr->isVert, fix, b1, b2, l1, l2); UNSUPPORTED("3d5wnmejfwzawn8av2oedjr6w"); // rte.segs[rte.n++] = seg; UNSUPPORTED("4butkpw7q0mfe8ci5ktgzfx7h"); // cp = ncp; UNSUPPORTED("6euarq5hpmo6fnhw9236tny10"); // prevbp = bp1; UNSUPPORTED("9ak3tu9gfug7h6n5oe3atds63"); // bp1 = bp2; UNSUPPORTED("6upeg6isij4ds1zu1jxrpacvy"); // if ((ptr->isVert != next->isVert) && ((next)->n_dad == lst)) { UNSUPPORTED("c06vwwj01jup12zkp64pdhnl5"); // bp2 = sidePt(next, ncp); UNSUPPORTED("1ud8fuhorhhfedc95moinbg3n"); // l2 = B_NODE; UNSUPPORTED("7i3it08m376phdxh0p1uzqai5"); // if (next->isVert) { /* horizontal segment */ UNSUPPORTED("6i41faageoastaoondsec5yp4"); // if (prevbp.y > bp1.y) l1 = B_UP; UNSUPPORTED("5g30gkn2ryx49ev1n4e2smcx9"); // else l1 = B_DOWN; UNSUPPORTED("8fxukh2rk7ex4092kgv805ite"); // fix = cp->bb.LL.y; UNSUPPORTED("cuz1j4nsn7d1nc8gyk6pwxms4"); // b1 = cp->bb.LL.x; UNSUPPORTED("6bi6zqtgdmd0jnfszi2huxntb"); // b2 = ncp->bb.LL.x; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("qmgaeq8ywmhhu9os2y3ykl5h"); // if (prevbp.x > bp1.x) l1 = B_RIGHT; UNSUPPORTED("elww0yfcft9fn920zdzqjqag4"); // else l1 = B_LEFT; UNSUPPORTED("e942krdqcom8eneazkyc1gf5i"); // fix = cp->bb.LL.x; UNSUPPORTED("225z3yt58cl9ma5i7jb3b6zj1"); // b1 = cp->bb.LL.y; UNSUPPORTED("2grsi5yyliiziqp3ehv7saoqg"); // b2 = ncp->bb.LL.y; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("atcm0274c8dmqoq2enw1723k1"); // setSeg (&seg, !next->isVert, fix, b1, b2, l1, l2); UNSUPPORTED("6eajjgh7sernfrp1c4gqwdqva"); // rte.segs[rte.n++] = seg; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5oraagbeabq0cwuspqij33hro"); // ptr = next; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1qyv8z4yk5u9fxyioeycj4pg4"); // prev = next; UNSUPPORTED("dtddoorswdnxqgywntqy6r3rj"); // next = (next)->n_dad; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6wc8b07bbvef9c5f0xaq0a7w7"); // rte.segs = realloc (rte.segs, rte.n*sizeof(segment)); UNSUPPORTED("9t92jm5uuo94z4984kskv1zs1"); // for (i=0; i 0) UNSUPPORTED("6ocqv4us3offjwlpkz1trldjf"); // rte.segs[i].prev = rte.segs + (i-1); UNSUPPORTED("140nkijwoi101c4avzme9y00x"); // if (i < rte.n-1) UNSUPPORTED("2zgm1op1kek2062uh1ir84v1p"); // rte.segs[i].next = rte.segs + (i+1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6rsvido8aoxm4xz31egwihvie"); // return rte; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aqw2pcwz2wbv0f1rw9usmyqgf // static void freeChannel (Dt_t* d, channel* cp, Dtdisc_t* disc) public static Object freeChannel(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("c9euy7p3sclc7ckkp1bzs1jx"); // freeChannel (Dt_t* d, channel* cp, Dtdisc_t* disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b9qijws3odg8l7q5fou8uuguj"); // free_graph (cp->G); UNSUPPORTED("q5fdp3fynm4ytf68bfq4eyi1"); // free (cp->seg_list); UNSUPPORTED("15g2jqm1fxtvztnindiv43hg9"); // free (cp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 czg5smuwmyt5ciilshur9hm5e // static void freeChanItem (Dt_t* d, chanItem* cp, Dtdisc_t* disc) public static Object freeChanItem(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("3shy48lfkzdtnmko723ebxmhv"); // freeChanItem (Dt_t* d, chanItem* cp, Dtdisc_t* disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2j623061b9jjl1jqz6i2eartz"); // dtclose (cp->chans); UNSUPPORTED("15g2jqm1fxtvztnindiv43hg9"); // free (cp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cbapcnadrscvk8m1ip2223p3e // static int chancmpid(Dt_t* d, paird* key1, paird* key2, Dtdisc_t* disc) public static Object chancmpid(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("c3dmj421aezge5a3ggj2xi34t"); // chancmpid(Dt_t* d, paird* key1, paird* key2, Dtdisc_t* disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jh3acz833d3cdotdb2s5kr3v"); // if (key1->p1 > key2->p1) { UNSUPPORTED("p297m3b0zcsixgurzbmjqkqr"); // if (key1->p2 <= key2->p2) return 0; UNSUPPORTED("ayizfb4et318igswkluxa6rgf"); // else return 1; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("awnfnp6rvvw6qa9g0i6vjio9k"); // else if (key1->p1 < key2->p1) { UNSUPPORTED("6hzvi4g07ent2az0wn1att4zj"); // if (key1->p2 >= key2->p2) return 0; UNSUPPORTED("c20igl46iqplts26214lc7ebm"); // else return -1; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("7lrkjjj5lce2uf86c1y9o9yoa"); // else return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 659jucoqq7j1ud5wehj42ik2d // static int dcmpid(Dt_t* d, double* key1, double* key2, Dtdisc_t* disc) public static Object dcmpid(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("6vxm1h1q3grwa81zaivfch1re"); // dcmpid(Dt_t* d, double* key1, double* key2, Dtdisc_t* disc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1cu94gjng90rrt7xtp42ifr1"); // if (*key1 > *key2) return 1; UNSUPPORTED("3h1tdtwyfqaqhne2o7pz8yq9h"); // else if (*key1 < *key2) return -1; UNSUPPORTED("7lrkjjj5lce2uf86c1y9o9yoa"); // else return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 ethokur0ooay9stl4lw8geq1r // static Dtdisc_t chanDisc = //1 db0w2llnzryezehbaes3knwwv // static Dtdisc_t chanItemDisc = //3 1yykle604b3x2mutto2rk7k0q // static void addChan (Dt_t* chdict, channel* cp, double j) public static Object addChan(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("5y1j3qnhsbg3b86o7hpanej1s"); // addChan (Dt_t* chdict, channel* cp, double j) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("67yxlxmzwjczlfm96jhe7luye"); // chanItem* subd = (*(((Dt_t*)(chdict))->searchf))((chdict),(void*)(&j),0001000); UNSUPPORTED("bl97x4t04cnuvu98zcsh3u3r1"); // if (!subd) { UNSUPPORTED("92ya0nhv9b16cc5o2095t5rp2"); // subd = (chanItem*)zmalloc(sizeof(chanItem)); UNSUPPORTED("6kkqd46tx54vo55rc8xyc93dg"); // subd->v = j; UNSUPPORTED("e4cijg0myh4jmsjklqxc3ia0r"); // subd->chans = dtopen (&chanDisc, Dtoset); UNSUPPORTED("anh61bjg3nlucvypx7x43xfk7"); // (*(((Dt_t*)(chdict))->searchf))((chdict),(void*)(subd),0000001); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("344a2yp8gxqtygac1hl0bxduf"); // (*(((Dt_t*)(subd->chans))->searchf))((subd->chans),(void*)(cp),0000001); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 870j0jbluhoffx3ke1eog9a0e // static Dt_t* extractHChans (maze* mp) public static Object extractHChans(Object... arg) { UNSUPPORTED("2xt7ub3z01qt6i7l0luh5zpbd"); // static Dt_t* UNSUPPORTED("6h6avfk40i1d436sls3sjaic3"); // extractHChans (maze* mp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("bhhrlzv5tqbx6ctv8b8hya7ll"); // snode* np; UNSUPPORTED("2pyx8we0m19pr0whdh4wa2df9"); // Dt_t* hchans = dtopen (&chanItemDisc, Dtoset); UNSUPPORTED("cc6zk9wsty15bcay61nb68jos"); // for (i = 0; i < mp->ncells; i++) { UNSUPPORTED("6mflke7nml2pfj18uu5t0itb2"); // channel* chp; UNSUPPORTED("2noex6z427j2b0xavovcqkxja"); // cell* cp = mp->cells+i; UNSUPPORTED("4id7mgutk26h361i0yn0dr0c9"); // cell* nextcp; UNSUPPORTED("lrx70e5v1i9g2x8dyh0781af"); // if ((cp->flags & 4)) continue; UNSUPPORTED("4fw3zqbj9rdk41p6d04n8l4p9"); // /* move left */ UNSUPPORTED("4hw0byd0u8kw6qzgqn54tsvsm"); // while ((np = cp->sides[M_LEFT]) && (nextcp = np->cells[0]) && UNSUPPORTED("rfl3ehaprpjsjs96qg8xsipw"); // !(nextcp->flags & 1)) { UNSUPPORTED("292smg9hw43fsfevnum565skt"); // cp = nextcp; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cor1kngy665478bu9tlxw55y0"); // chp = (channel*)zmalloc(sizeof(channel)); UNSUPPORTED("3tv0uje2s5tbgyq4tltlazjfp"); // chp->cp = cp; UNSUPPORTED("241dtcbm0olj1vf27gmksfshg"); // chp->p.p1 = cp->bb.LL.x; UNSUPPORTED("67k0t4al7ygki756mk386ga5v"); // /* move right */ UNSUPPORTED("c89349lhw5ip8nh8afxcjd01t"); // cp->flags |= 4; UNSUPPORTED("6ky3mzdgm24nohd7cwj4ljp2k"); // while ((np = cp->sides[M_RIGHT]) && (nextcp = np->cells[1]) && UNSUPPORTED("rfl3ehaprpjsjs96qg8xsipw"); // !(nextcp->flags & 1)) { UNSUPPORTED("292smg9hw43fsfevnum565skt"); // cp = nextcp; UNSUPPORTED("1en3ueviartdiagf21oyb422w"); // cp->flags |= 4; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("78071fo42hy6imylzbfy3bf8i"); // chp->p.p2 = cp->bb.UR.x; UNSUPPORTED("e8p02vlsess6lxodmtmo1c1ms"); // addChan (hchans, chp, chp->cp->bb.LL.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bq8ebjnwnc14ngjegh07xcdh7"); // return hchans; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7s43hm0mz2wo1mdduca26ojr5 // static Dt_t* extractVChans (maze* mp) public static Object extractVChans(Object... arg) { UNSUPPORTED("2xt7ub3z01qt6i7l0luh5zpbd"); // static Dt_t* UNSUPPORTED("c36zuoh2qlc3lrap5d8f3y8lk"); // extractVChans (maze* mp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("bhhrlzv5tqbx6ctv8b8hya7ll"); // snode* np; UNSUPPORTED("dnn2hmk22k5leb4unfdv23ay"); // Dt_t* vchans = dtopen (&chanItemDisc, Dtoset); UNSUPPORTED("cc6zk9wsty15bcay61nb68jos"); // for (i = 0; i < mp->ncells; i++) { UNSUPPORTED("6mflke7nml2pfj18uu5t0itb2"); // channel* chp; UNSUPPORTED("2noex6z427j2b0xavovcqkxja"); // cell* cp = mp->cells+i; UNSUPPORTED("4id7mgutk26h361i0yn0dr0c9"); // cell* nextcp; UNSUPPORTED("4oetph2txtwv1olvghotnhpps"); // if ((cp->flags & 2)) continue; UNSUPPORTED("c6rkuey5ihzorfjp9881pbmej"); // /* move down */ UNSUPPORTED("a9307fsrcb38pq8una61um0oe"); // while ((np = cp->sides[M_BOTTOM]) && (nextcp = np->cells[0]) && UNSUPPORTED("rfl3ehaprpjsjs96qg8xsipw"); // !(nextcp->flags & 1)) { UNSUPPORTED("292smg9hw43fsfevnum565skt"); // cp = nextcp; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cor1kngy665478bu9tlxw55y0"); // chp = (channel*)zmalloc(sizeof(channel)); UNSUPPORTED("3tv0uje2s5tbgyq4tltlazjfp"); // chp->cp = cp; UNSUPPORTED("1yizwyrbv5k2pljd9srrt507t"); // chp->p.p1 = cp->bb.LL.y; UNSUPPORTED("9l69ytmot9sii7jf1nezunp0j"); // /* move up */ UNSUPPORTED("ekzngugyx3nx0hy0tcenivo3e"); // cp->flags |= 2; UNSUPPORTED("eaga01f5n4bcc04jzd7koe2zn"); // while ((np = cp->sides[M_TOP]) && (nextcp = np->cells[1]) && UNSUPPORTED("rfl3ehaprpjsjs96qg8xsipw"); // !(nextcp->flags & 1)) { UNSUPPORTED("292smg9hw43fsfevnum565skt"); // cp = nextcp; UNSUPPORTED("2z9bt6rzic3h5f2bswrctlkm5"); // cp->flags |= 2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("4t6wc1803m511jzzii1e5refw"); // chp->p.p2 = cp->bb.UR.y; UNSUPPORTED("117s1riz7scnahvfdhjad7oo7"); // addChan (vchans, chp, chp->cp->bb.LL.x); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("mc3k9myynjaxs0u8wam7xntw"); // return vchans; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3fx0dtmoubptoy863qaohsyiv // static void insertChan (channel* chan, segment* seg) public static Object insertChan(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("9wvfovtdcnhpa9y21q29xb2xs"); // insertChan (channel* chan, segment* seg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8rut445afekmag201py7zerog"); // seg->ind_no = chan->cnt++; UNSUPPORTED("1fpx5uvyy1jw7h6nzfgxqij4q"); // chan->seg_list = ALLOC(chan->cnt, chan->seg_list, segment*); UNSUPPORTED("dtkgbijbhv6zio2otpjus55me"); // chan->seg_list[chan->cnt-1] = seg; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2k7dmuexcawtry3q8ifzylkb9 // static channel* chanSearch (Dt_t* chans, segment* seg) public static Object chanSearch(Object... arg) { UNSUPPORTED("9qh7gtx6joh26yrtekarlkx5k"); // static channel* UNSUPPORTED("6iggv78oc0ydb9b7w5c37fcdb"); // chanSearch (Dt_t* chans, segment* seg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6ysgprb9sb91hot466r1pbjvf"); // channel* cp; UNSUPPORTED("3eoemzrlaus9ecq2mmuirfx2e"); // chanItem* chani = (*(((Dt_t*)(chans))->searchf))((chans),(void*)(&seg->comm_coord),0001000); UNSUPPORTED("xbnh2djh0amu19ivzrfv1zrb"); // assert (chani); UNSUPPORTED("a5sgr1i6e2c5nbli6kjtt8w0o"); // cp = (*(((Dt_t*)(chani->chans))->searchf))((chani->chans),(void*)(&seg->p),0001000); UNSUPPORTED("1e4wppypayzgri783mhjwfvr3"); // assert (cp); UNSUPPORTED("4jjmko29xep9s4rocrlxrqsof"); // return cp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e8ecrel25ykgpfve8c2pg90bt // static void assignSegs (int nrtes, route* route_list, maze* mp) public static Object assignSegs(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("9gbzlbbthoblu6f8211e9rp46"); // assignSegs (int nrtes, route* route_list, maze* mp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7pmetyg241ybw8hq3j61i271y"); // channel* chan; UNSUPPORTED("dzpsknrwv8qkqq20hjnjpjn68"); // int i, j; UNSUPPORTED("arcr89i9kld6j0uwf2fd919vf"); // for (i=0;iisVert) UNSUPPORTED("bdeg9z0esjwizlyn8av1pup0v"); // chan = chanSearch(mp->vchans, seg); UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("52uzmq8ikrhropj8svxedldsn"); // chan = chanSearch(mp->hchans, seg); UNSUPPORTED("73ufkqlb3bea3t1t87hm2wgdl"); // insertChan (chan, seg); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4648ghx1zvrhmfvw1szjx5en // static void addLoop (sgraph* sg, cell* cp, snode* dp, snode* sp) public static Object addLoop(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("a3tsmcxhg7iyjoceb1tpll3mb"); // addLoop (sgraph* sg, cell* cp, snode* dp, snode* sp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("a5bapcojbf1pon4upj40dgnit"); // int onTop; UNSUPPORTED("2mmprwecm43sdonztnzfjh86u"); // pointf midp = midPt (cp); UNSUPPORTED("2zty3wxdquu2fbdk9ag3eibug"); // for (i = 0; i < cp->nsides; i++) { UNSUPPORTED("6aknf99z3dbb067he348v23c2"); // cell* ocp; UNSUPPORTED("9wdrv4uc4c7ssn0qpmxgz5eu1"); // pointf p; UNSUPPORTED("97a26i8tw0qmzg5i2dlia94tf"); // double wt; UNSUPPORTED("2o74t2kk9zszzjmhl2o58radp"); // snode* onp = cp->sides[i]; UNSUPPORTED("2bh0qvoskfpyikivdli33p1t7"); // if (onp->isVert) continue; UNSUPPORTED("3r96db0og4bylr45sqo2u7ire"); // if (onp->cells[0] == cp) { UNSUPPORTED("5ld3bwx3i8kedyixr9hiunybw"); // onTop = 1; UNSUPPORTED("7u4yqyzc7gp7vvs8j9a8o1vz3"); // ocp = onp->cells[1]; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("4nrjdhrb9ccxue57dab1e82ec"); // onTop = 0; UNSUPPORTED("5t2fdtivke5zplmmsz3noc2h2"); // ocp = onp->cells[0]; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3o5hqzfql7utdq40v2mp489na"); // p = sidePt (onp, ocp); UNSUPPORTED("2pqzno9l1yhihvq61yikfha7x"); // wt = abs(p.x - midp.x) + abs(p.y - midp.y); UNSUPPORTED("eeypctdtd8leg1t71p1ef13ns"); // if (onTop) UNSUPPORTED("ay6bley4n4nuqyi003sc8kb3d"); // createSEdge (sg, sp, onp, 0); /* FIX weight */ UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("bhgjjjfikli3ur37hc7x7pvem"); // createSEdge (sg, dp, onp, 0); /* FIX weight */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3o1amzqcqc6xflt5rclqgaoop"); // sg->nnodes += 2; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 89iyhk6f9rhg0e8rz0hlwkesx // static void addNodeEdges (sgraph* sg, cell* cp, snode* np) public static Object addNodeEdges(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("3s08k325s6c0dzl8xxm0e71pf"); // addNodeEdges (sgraph* sg, cell* cp, snode* np) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("2mmprwecm43sdonztnzfjh86u"); // pointf midp = midPt (cp); UNSUPPORTED("2zty3wxdquu2fbdk9ag3eibug"); // for (i = 0; i < cp->nsides; i++) { UNSUPPORTED("2o74t2kk9zszzjmhl2o58radp"); // snode* onp = cp->sides[i]; UNSUPPORTED("6aknf99z3dbb067he348v23c2"); // cell* ocp; UNSUPPORTED("9wdrv4uc4c7ssn0qpmxgz5eu1"); // pointf p; UNSUPPORTED("97a26i8tw0qmzg5i2dlia94tf"); // double wt; UNSUPPORTED("5tmebwuyw7chpq5iitcyuvnod"); // if (onp->cells[0] == cp) UNSUPPORTED("7u4yqyzc7gp7vvs8j9a8o1vz3"); // ocp = onp->cells[1]; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("5t2fdtivke5zplmmsz3noc2h2"); // ocp = onp->cells[0]; UNSUPPORTED("3o5hqzfql7utdq40v2mp489na"); // p = sidePt (onp, ocp); UNSUPPORTED("2pqzno9l1yhihvq61yikfha7x"); // wt = abs(p.x - midp.x) + abs(p.y - midp.y); UNSUPPORTED("d513bewr1npimr2it2ia2k56r"); // createSEdge (sg, np, onp, 0); /* FIX weight */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("580kqdl0txe4fd1g3jdsx7oj8"); // sg->nnodes++; UNSUPPORTED("8dkxzvuy1kheqf9w0lmvljni5"); // np->cells[0] = np->cells[1] = cp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7yrubx0zxon9c2uglsfqdw6wb // static char* bendToStr (bend b) public static Object bendToStr(Object... arg) { UNSUPPORTED("aso9sesbnmywhnboxv863whri"); // static char* bendToStr (bend b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1nqf38mopzr5h6gz1w5jgibcq"); // char* s; UNSUPPORTED("6ep6naubtnkle2baax49za5kt"); // switch (b) { UNSUPPORTED("468ky1b2wfpa4muv0a4vayt73"); // case B_NODE : UNSUPPORTED("7asao4q2agscqkw1vxzbiovd"); // s = "B_NODE"; UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("9p3ucw6vl509wdnlc9fo3qviu"); // case B_UP : UNSUPPORTED("eabybll1yskskaq7a8kxvc8tp"); // s = "B_UP"; UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("6y3zt8d6u1qyjwi9sxz0vhxov"); // case B_LEFT : UNSUPPORTED("83j5r4h8qfyqcjko2filk6pf6"); // s = "B_LEFT"; UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("9twa5d2kxeox6wxq7il75kpvb"); // case B_DOWN : UNSUPPORTED("2lrnwyogg8ylvavh64j9fsc4v"); // s = "B_DOWN"; UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("e3th0xydbkfhgz8nlphys6knw"); // case B_RIGHT : UNSUPPORTED("4z5jeqjq3629k9tjxww0ixjqv"); // s = "B_RIGHT"; UNSUPPORTED("8ofzhd1f1qc2gz9hfk7vzz6ox"); // break; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("cw8hinum739bvjkye9axxkjp3"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 90xcxnm75ks9geu9fenh3dm1y // static void putSeg (FILE* fp, segment* seg) public static Object putSeg(Object... arg) { UNSUPPORTED("ezdh139xemkeu6ueshufvm7w2"); // static void putSeg (FILE* fp, segment* seg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("70c5pnzzsu7czszgxj1512qab"); // if (seg->isVert) UNSUPPORTED("ah8jrf48288m893sn0xhnsoyl"); // fprintf (fp, "((%f,%f),(%f,%f)) %s %s", seg->comm_coord, seg->p.p1, UNSUPPORTED("1m3ectywf3939xa468uztvqoq"); // seg->comm_coord, seg->p.p2, bendToStr (seg->l1), bendToStr (seg->l2)); UNSUPPORTED("8983svt6g1kt3l45bd6ju9mw6"); // else UNSUPPORTED("c1qsbthiirdz2q4klv9p53rth"); // fprintf (fp, "((%f,%f),(%f,%f)) %s %s", seg->p.p1,seg->comm_coord, UNSUPPORTED("bxjfdk1v4pdjllz1clm0jzi7c"); // seg->p.p2, seg->comm_coord, bendToStr (seg->l1), bendToStr (seg->l2)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2fdwckbttldonqwo3v1bwb0tx // static void dumpChanG (channel* cp, int v) public static Object dumpChanG(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("1jiwdzplvv49bv58z35y6cdxe"); // dumpChanG (channel* cp, int v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8ebsbykup813mmiz374hgxn60"); // int k; UNSUPPORTED("9sznn1kro0jd847rh8vo0hwbc"); // intitem* ip; UNSUPPORTED("1e46umbsk6iochvxe1wvpa4hm"); // Dt_t* adj; UNSUPPORTED("6oro5r2fdy2jr6tual6x7sagh"); // if (cp->cnt < 2) return; UNSUPPORTED("cz9tbd9xi7o70lfrwgwnls8ry"); // fprintf (stderr, "channel %d (%f,%f)\n", v, cp->p.p1, cp->p.p2); UNSUPPORTED("2e81m6ga4aivsowi1d0mro7qz"); // for (k=0;kcnt;k++) { UNSUPPORTED("esbukm9onpnxbeewu9ks5cx7q"); // adj = cp->G->vertices[k].adj_list; UNSUPPORTED("7d5y6bg0ngegbqsnsn7gu87bt"); // if (dtsize(adj) == 0) continue; UNSUPPORTED("7wdg4xscc6apj5ksye6gvz131"); // putSeg (stderr, cp->seg_list[k]); UNSUPPORTED("d811shlhb0ykm0lp0t2naamkw"); // fputs (" ->\n", stderr); UNSUPPORTED("4lca7ud2mcwkyvh8ynb1pjo61"); // for (ip = (intitem*)(*(((Dt_t*)(adj))->searchf))((adj),(void*)(0),0000200); ip; ip = (intitem*)(*(((Dt_t*)(adj))->searchf))((adj),(void*)(ip),0000010)) { UNSUPPORTED("drhixa423prmpgu5j6qe8l3je"); // fputs (" ", stderr); UNSUPPORTED("8kybw0d4hrww4xqhdna4mlsgc"); // putSeg (stderr, cp->seg_list[ip->id]); UNSUPPORTED("24p9gcmr0oxvz0sli52c722vt"); // fputs ("\n", stderr); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d0tqkl09dlk95z7uv7a0esz2h // static void assignTrackNo (Dt_t* chans) public static Object assignTrackNo(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("32zdrf69xvfxhlj0l5jffzppy"); // assignTrackNo (Dt_t* chans) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a4p8766eh6ra21i7u5o9nf6rm"); // Dt_t* lp; UNSUPPORTED("1mqjeo37v4tmo6kht0rep1tht"); // Dtlink_t* l1; UNSUPPORTED("eiqtkkndttzmunuxtnm99mkpy"); // Dtlink_t* l2; UNSUPPORTED("dbd08d8bpiw762wer960cicgj"); // channel* cp; UNSUPPORTED("b0kisc5bimb4jnz3z1g2yhbqv"); // int k; UNSUPPORTED("cp4kv1fg74up3ubek2qyx8d25"); // for (l1 = dtflatten (chans); l1; l1 = (((Dtlink_t*)(l1))->right)) { UNSUPPORTED("950o75hi1nj794oxa101pt5t0"); // lp = ((chanItem*)l1)->chans; UNSUPPORTED("71dqer4eeiqshvsh6rbj0kis5"); // for (l2 = dtflatten (lp); l2; l2 = (((Dtlink_t*)(l2))->right)) { UNSUPPORTED("135wr0zp93ul7lqzg4608t7cy"); // cp = (channel*)l2; UNSUPPORTED("jmhm2rezhg6jgnyq2vvyf1xt"); // if (cp->cnt) { UNSUPPORTED("oz7u32hmswbxtvcx0h9iwqbc"); // if (odb_flags & 8) dumpChanG (cp, ((chanItem*)l1)->v); UNSUPPORTED("4g04bc8ywv1z7gpxqhucbcys2"); // top_sort (cp->G); UNSUPPORTED("9u4bikrj4ida8i29gym2jn5b9"); // for (k=0;kcnt;k++) UNSUPPORTED("8o41cm37dmlh7y14o8j7byzbn"); // cp->seg_list[k]->track_no = cp->G->vertices[k].topsort_order+1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("9pqd0punhe3g1up9qd8xxo652"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4cvz30tum1j5kh2mr4tikagu7 // static void create_graphs(Dt_t* chans) public static Object create_graphs(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("bhabfg4ovu9hg3f74xotdq8w2"); // create_graphs(Dt_t* chans) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a4p8766eh6ra21i7u5o9nf6rm"); // Dt_t* lp; UNSUPPORTED("1mqjeo37v4tmo6kht0rep1tht"); // Dtlink_t* l1; UNSUPPORTED("eiqtkkndttzmunuxtnm99mkpy"); // Dtlink_t* l2; UNSUPPORTED("dbd08d8bpiw762wer960cicgj"); // channel* cp; UNSUPPORTED("cp4kv1fg74up3ubek2qyx8d25"); // for (l1 = dtflatten (chans); l1; l1 = (((Dtlink_t*)(l1))->right)) { UNSUPPORTED("950o75hi1nj794oxa101pt5t0"); // lp = ((chanItem*)l1)->chans; UNSUPPORTED("71dqer4eeiqshvsh6rbj0kis5"); // for (l2 = dtflatten (lp); l2; l2 = (((Dtlink_t*)(l2))->right)) { UNSUPPORTED("135wr0zp93ul7lqzg4608t7cy"); // cp = (channel*)l2; UNSUPPORTED("3cr2g51ro0c0oi5l2n756dpbt"); // cp->G = make_graph (cp->cnt); UNSUPPORTED("9pqd0punhe3g1up9qd8xxo652"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bzybz2vhse04djha8f0fquflw // static int eqEndSeg (bend S1l2, bend S2l2, bend T1, bend T2) public static Object eqEndSeg(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("85zkrfkxr894bmai11bwpink8"); // eqEndSeg (bend S1l2, bend S2l2, bend T1, bend T2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7gxac6sgui9mlexwzhcjde73q"); // if (((S1l2==T2)&&(S2l2=!T2)) UNSUPPORTED("60oyzebkxpkavx2feau5rt7kl"); // || ((S1l2==B_NODE)&&(S2l2==T1))) UNSUPPORTED("dcqs008t3a3ccoe71d0lqe7yd"); // return(0); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("1b9bshcz3yhp7bwyu248z4k9t"); // return(-1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eb1uhz6fkbngny6t6auaxxt9b // static int overlapSeg (segment* S1, segment* S2, bend T1, bend T2) public static Object overlapSeg(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("ezv23yz3jqikw7nzsie354dxc"); // overlapSeg (segment* S1, segment* S2, bend T1, bend T2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a78h8j082nhcdjv739yn4qppz"); // if(S1->p.p2p.p2) { UNSUPPORTED("4rsshkwyw60o88gdb3dn0ovf4"); // if(S1->l2==T1&&S2->l1==T2) return(-1); UNSUPPORTED("2mabne1z2rhv79s1slqsz0khx"); // else if(S1->l2==T2&&S2->l1==T1) return(1); UNSUPPORTED("2vzk76estb6plbulns7pz9fh4"); // else return(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("f2sgqrqg5ty4z7q2umaxpejio"); // else if(S1->p.p2==S2->p.p2) { UNSUPPORTED("ct6utyz0mi3m48f5wk8rnqoc3"); // if(S2->l1==T2) return eqEndSeg (S1->l2, S2->l2, T1, T2); UNSUPPORTED("5ot15cxdtf6ibi79p9ahnuiyy"); // else return -1*eqEndSeg (S2->l2, S1->l2, T1, T2); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7aq9p42tl9bfo9gar2o9pyo6"); // else { /* S1->p.p2>S2->p.p2 */ UNSUPPORTED("89qwmoj26o4fkmkwqkugfzwjf"); // if(S2->l1==T2&&S2->l2==T2) return(-1); UNSUPPORTED("adhycem4k08o2rbxo59z3jkhz"); // else if (S2->l1==T1&&S2->l2==T1) return(1); UNSUPPORTED("2vzk76estb6plbulns7pz9fh4"); // else return(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 916xnvutvt73y05azmf2m6y6t // static int ellSeg (bend S1l1, bend S1l2, bend T) public static Object ellSeg(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("akzolart54jjjeeqmyxqrnmuc"); // ellSeg (bend S1l1, bend S1l2, bend T) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("be5bxc372qf9z4u0bn8p5f3a2"); // if (S1l1 == T) { UNSUPPORTED("19rq2setuug0dsuwd18u6bp16"); // if (S1l2== T) return -1; UNSUPPORTED("3x8iplz4npgo85ip5rp23jmcu"); // else return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ayizfb4et318igswkluxa6rgf"); // else return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3set1dgc7lhl9wfckj4voync3 // static int segCmp (segment* S1, segment* S2, bend T1, bend T2) public static Object segCmp(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("5so0u4o583yem7g066n6h5h8v"); // segCmp (segment* S1, segment* S2, bend T1, bend T2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cgb5j5ouyqocl1eu5sq5ul1m1"); // /* no overlap */ UNSUPPORTED("1m7w9c5br675ne9d38ak6hu53"); // if((S1->p.p2p.p1)||(S1->p.p1>S2->p.p2)) return(0); UNSUPPORTED("edg1u6oyftrvreqlbjqxcznnc"); // /* left endpoint of S2 inside S1 */ UNSUPPORTED("1x0gxclmpt2dwwdqev2ara450"); // if(S1->p.p1p.p1&&S2->p.p1p.p2) UNSUPPORTED("am1178qaqllybktyjo3nv97xc"); // return overlapSeg (S1, S2, T1, T2); UNSUPPORTED("bvhn7dxguoamigzpbv1635rse"); // /* left endpoint of S1 inside S2 */ UNSUPPORTED("1x5d71ow7dh9gcypm1uex4adi"); // else if(S2->p.p1p.p1&&S1->p.p1p.p2) UNSUPPORTED("8jh6cjdtp573oq8qqbvo18fjx"); // return -1*overlapSeg (S2, S1, T1, T2); UNSUPPORTED("cjqc4716c7f0ty1biibdcbi3b"); // else if(S1->p.p1==S2->p.p1) { UNSUPPORTED("1a96hc1yp8pa6nhuky2f3kpov"); // if(S1->p.p2==S2->p.p2) { UNSUPPORTED("dakz4gu568b47ilof0mjlkp3g"); // if((S1->l1==S2->l1)&&(S1->l2==S2->l2)) UNSUPPORTED("dtxrebylagy9i05p1v1fhxnuz"); // return(0); UNSUPPORTED("57vde3e47agnudbdc9bacshif"); // else if (S2->l1==S2->l2) { UNSUPPORTED("67o69o09wpy0v0ur5f1l1c5s5"); // if(S2->l1==T1) return(1); UNSUPPORTED("b6r32yfv7dexk3ru7g6nqwg1g"); // else if(S2->l1==T2) return(-1); UNSUPPORTED("ek9n5w1l5tq5so113ne9728y8"); // else if ((S1->l1!=T1)&&(S1->l2!=T1)) return (1); UNSUPPORTED("3877rrvm4cl9vsly8mophiluw"); // else if ((S1->l1!=T2)&&(S1->l2!=T2)) return (-1); UNSUPPORTED("7ke2h1gpwvqi6ougdwfz82wmh"); // else return 0; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("3lz4dhijiqr5ht941jdjwgi7z"); // else if ((S2->l1==T1)&&(S2->l2==T2)) { UNSUPPORTED("6679v73zr10343sabv0545ajx"); // if ((S1->l1!=T1)&&(S1->l2==T2)) return 1; UNSUPPORTED("5c357ofc3tlta7b6ntliniwd9"); // else if ((S1->l1==T1)&&(S1->l2!=T2)) return -1; UNSUPPORTED("7ke2h1gpwvqi6ougdwfz82wmh"); // else return 0; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("evz657j0gnvx74823jqra523c"); // else if ((S2->l2==T1)&&(S2->l1==T2)) { UNSUPPORTED("aitlrwojh186x6j2ty4o4gocm"); // if ((S1->l2!=T1)&&(S1->l1==T2)) return 1; UNSUPPORTED("er78pkwc9gkhcxvyjq62zor6c"); // else if ((S1->l2==T1)&&(S1->l1!=T2)) return -1; UNSUPPORTED("7ke2h1gpwvqi6ougdwfz82wmh"); // else return 0; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("1ny3yv8c13bp4zcfp8dvffoa8"); // else if ((S2->l1==B_NODE)&&(S2->l2==T1)) { UNSUPPORTED("4mlaa90t6h9d80djun5rflzkq"); // return ellSeg (S1->l1, S1->l2, T1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("3dq7kw6w7e1wh4etca0rl6d0v"); // else if ((S2->l1==B_NODE)&&(S2->l2==T2)) { UNSUPPORTED("4i2pfdj4zt2umblnmyoloiduk"); // return -1*ellSeg (S1->l1, S1->l2, T2); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("2v5dfnazye6510cbha31l8i7w"); // else if ((S2->l1==T1)&&(S2->l2==B_NODE)) { UNSUPPORTED("4rq25g617jse4401t7v75md57"); // return ellSeg (S1->l2, S1->l1, T1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("96b656c5ejlopals3g50cqegi"); // else { /* ((S2->l1==T2)&&(S2->l2==B_NODE)) */ UNSUPPORTED("bcifb3xs85visnlkzrg2nt70g"); // return -1*ellSeg (S1->l2, S1->l1, T2); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bmcaw8gehzc5d62dx0w3skyig"); // else if(S1->p.p2p.p2) { UNSUPPORTED("1u3o14xi8e1cxvb445iu3kct6"); // if(S1->l2==T1) UNSUPPORTED("1qnx7k0mdbkhofu0mdzisxijd"); // return eqEndSeg (S2->l1, S1->l1, T1, T2); UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("d9rodbu7eiqzjvik47smclsdl"); // return -1*eqEndSeg (S2->l1, S1->l1, T1, T2); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7aq9p42tl9bfo9gar2o9pyo6"); // else { /* S1->p.p2>S2->p.p2 */ UNSUPPORTED("51m1xa8u2znzxazdwantwyuyv"); // if(S2->l2==T2) UNSUPPORTED("4f3mewxm7upg06y9z4bjrn4vf"); // return eqEndSeg (S1->l1, S2->l1, T1, T2); UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("b7xkdbwtc22b1j95kr0hty8sp"); // return -1*eqEndSeg (S1->l1, S2->l1, T1, T2); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1z3rgo8s9sfovtqdrlci7ydng"); // else if(S1->p.p2==S2->p.p1) { UNSUPPORTED("dryuqkmwg4utuh4fz56nec4iu"); // if(S1->l2==S2->l1) return(0); UNSUPPORTED("92dwbh0qiegdwle729knbwdao"); // else if(S1->l2==T2) return(1); UNSUPPORTED("2yl5dq1it450fqpkn8wjdxab4"); // else return(-1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ewjrcchl8l1d8fp4y1r6qfbp3"); // else { /* S1->p.p1==S2->p.p2 */ UNSUPPORTED("1h7f8h4o89nvu26mb04i68h34"); // if(S1->l1==S2->l2) return(0); UNSUPPORTED("e97u2o9q8t0rv2icxkb8fsowu"); // else if(S1->l1==T2) return(1); UNSUPPORTED("2yl5dq1it450fqpkn8wjdxab4"); // else return(-1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6ufddz487491174h94zezajk8"); // assert(0); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2why0kxj0qrlrn435c0twfblb // static int seg_cmp(segment* S1, segment* S2) public static Object seg_cmp(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("5ucj9rj7ohyk0eh1h5jzk9qhh"); // seg_cmp(segment* S1, segment* S2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef82t09fd18di0isi59csjlwu"); // if(S1->isVert!=S2->isVert||S1->comm_coord!=S2->comm_coord) { UNSUPPORTED("2a6h1eg3z0m4zzhdw7vtdz33i"); // agerr (AGERR, "incomparable segments !! -- Aborting\n"); UNSUPPORTED("1ghgraebed3srgimi1gdqx5nj"); // longjmp(jbuf, 1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("88n6v57rjcx5w9zz51wjd80mn"); // if(S1->isVert) UNSUPPORTED("10jcxkwtbmjakpk36jpzzhsnm"); // return segCmp (S1, S2, B_RIGHT, B_LEFT); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("1ealfunb0xbji4f46jf9balu7"); // return segCmp (S1, S2, B_DOWN, B_UP); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7ycppm4b8xqpa85ov0gpp4r1w // static void add_edges_in_G(channel* cp) public static Object add_edges_in_G(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("e7prlxhst1riecg8sy2dq7ho3"); // add_edges_in_G(channel* cp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2b5x6xxv7d1fwjdnit9o6fac4"); // int x,y; UNSUPPORTED("462fowlguwrqt49rjdjc35vdl"); // segment** seg_list = cp->seg_list; UNSUPPORTED("9zouge4neqmqsg96284lxensf"); // int size = cp->cnt; UNSUPPORTED("dmbfnx3582vhxsi4o65ruesyn"); // rawgraph* G = cp->G; UNSUPPORTED("8uyd6tjjadhk8ovw1osaocc0g"); // for(x=0;x+1right)) { UNSUPPORTED("950o75hi1nj794oxa101pt5t0"); // lp = ((chanItem*)l1)->chans; UNSUPPORTED("71dqer4eeiqshvsh6rbj0kis5"); // for (l2 = dtflatten (lp); l2; l2 = (((Dtlink_t*)(l2))->right)) { UNSUPPORTED("135wr0zp93ul7lqzg4608t7cy"); // cp = (channel*)l2; UNSUPPORTED("b9bbgy74zwpeh6zk1wsld8tx2"); // if (cp->cnt) UNSUPPORTED("37n1ytiss9w7m68eh2a5ahf44"); // add_edges_in_G(cp); UNSUPPORTED("9pqd0punhe3g1up9qd8xxo652"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 emn5p2pij0zdp2hl3dyjefe36 // static segment* next_seg(segment* seg, int dir) public static Object next_seg(Object... arg) { UNSUPPORTED("5hl6i4lkcopw8a7eywmfv5qyv"); // static segment* UNSUPPORTED("6ov8c8zpwswdr0pj1gzchtfwx"); // next_seg(segment* seg, int dir) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6ri8jco2tikytst7ste1069yq"); // assert(seg); UNSUPPORTED("9yxubvqbrubzc3jcqnh9rpnmf"); // if (!dir) UNSUPPORTED("8dd4jx4ni1rdife7uof1nuwi9"); // return(seg->prev); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("5c5he207xx8av0i912x9hawr2"); // return(seg->next); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cs3u9dks2e2tzv2xu98p77w90 // static int propagate_prec(segment* seg, int prec, int hops, int dir) public static Object propagate_prec(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("tr6cv9djjf64a8yuh6q95jsp"); // propagate_prec(segment* seg, int prec, int hops, int dir) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dpr58lv2eeka28wequlp2xrzl"); // int x; UNSUPPORTED("ay64podpnebhkrkm9jq6r391s"); // int ans=prec; UNSUPPORTED("5ih4ipri3bjcgm61xdrc8ud4y"); // segment* next; UNSUPPORTED("cbeluzwuxiponx0az49dgkui4"); // segment* current; UNSUPPORTED("o8icbmalf0qgkleaf5kmc0ui"); // current = seg; UNSUPPORTED("yvzhy5oaj4saluubblynzmhv"); // for(x=1;x<=hops;x++) { UNSUPPORTED("9h1ebsbxexcfuink8l7o97r07"); // next = next_seg(current, dir); UNSUPPORTED("2gosr1fjv173ysmvks0ybbgvt"); // if(!current->isVert) { UNSUPPORTED("4v64kcbbxxsk315fnsi8ya930"); // if(next->comm_coord==current->p.p1) { UNSUPPORTED("6gkb69knhwko2b5weglnqbil9"); // if(current->l1==B_UP) ans *= -1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("2o8y0vj6uxky1dqkbntiyges"); // if(current->l2==B_DOWN) ans *= -1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("4v64kcbbxxsk315fnsi8ya930"); // if(next->comm_coord==current->p.p1) { UNSUPPORTED("bzsdu04we48ifrljpe0az0g4j"); // if(current->l1==B_RIGHT) ans *= -1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("2q2w4w0cp24ko6jdyfchiodyq"); // if(current->l2==B_LEFT) ans *= -1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("10sew6kuf3dcpt2wqk10ptksi"); // current = next; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dhivmxtyss2i31bgun146pdvx"); // return(ans); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bp53nx2ri4vm9anrojt7u7c2u // static int is_parallel(segment* s1, segment* s2) public static Object is_parallel(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("ddygyr541ybi2kvxacd9n2m9j"); // is_parallel(segment* s1, segment* s2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("51or2j2w3vw4tt3ek3h4o7r2t"); // assert (s1->comm_coord==s2->comm_coord); UNSUPPORTED("9gufgbv51f5we43a6jx1uyqh9"); // return ((s1->p.p1==s2->p.p1)&& UNSUPPORTED("4cxvzf3a2g1ubcxf02lgmj2xh"); // (s1->p.p2==s2->p.p2)&& UNSUPPORTED("bzty8iew02v127lmuh0uuecmi"); // (s1->l1==s2->l1)&& UNSUPPORTED("8ilakshy93x5k5my1hijj1fpw"); // (s1->l2==s2->l2)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5cy5xm5pageww1ken6y8teea4 // static pair decide_point(segment* si, segment* sj, int dir1, int dir2) public static Object decide_point(Object... arg) { UNSUPPORTED("f1byl3savsjxfld9h2fobwfo3"); // static pair UNSUPPORTED("7l2qer0l7u4rucnbo5kqj4vgc"); // decide_point(segment* si, segment* sj, int dir1, int dir2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dfk7h3txri9a3b4e7wkrzosju"); // int prec, ans = 0, temp; UNSUPPORTED("axbwlxs3xs2c5t2is2ke1ham5"); // pair ret; UNSUPPORTED("36dbtz3qjw44q55zoxfkmkykb"); // segment* np1; UNSUPPORTED("b95suv5ftmjl1s7ra4hrpi2db"); // segment* np2; UNSUPPORTED("afc9pg3q0h9ku0fioayd8nokq"); // while ((np1 = next_seg(si,dir1)) && (np2 = next_seg(sj,dir2)) && UNSUPPORTED("a0ti049y8u1wrflxigii3nmuq"); // is_parallel(np1, np2)) { UNSUPPORTED("aunxscflrorekqz8lv1sco0h1"); // ans++; UNSUPPORTED("ok657kaukdbv5j6b55n9lu6c"); // si = np1; UNSUPPORTED("7e7drakmuxwngzq18f1lbsn1g"); // sj = np2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4z9en58svufdyqqt3fyi3z80j"); // if (!np1) UNSUPPORTED("98h93apvsb643md8j6fnbun83"); // prec = 0; UNSUPPORTED("8p3l7vg6fa42z5f9qr4kcwdbk"); // else if (!np2) UNSUPPORTED("9o9tshvh3903w7oznf4dx4ksw"); // assert(0); /* FIXME */ UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("9sednl43da21gajvwpmk1pyle"); // temp = seg_cmp(np1, np2); UNSUPPORTED("bojwazeev7k8w4xnz842s9dc6"); // prec = propagate_prec(np1, temp, ans+1, 1-dir1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c46mwi9n2qk3nz5az4iu04e2s"); // ret.a = ans; UNSUPPORTED("5vibf15888faapk0uzvvophg9"); // ret.b = prec; UNSUPPORTED("35t727xxibdqfcn6xwikpae5w"); // return(ret); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lqaqtqdkw9rqhmyltdrzs6xy // static void set_parallel_edges (segment* seg1, segment* seg2, int dir1, int dir2, int hops, maze* mp) public static Object set_parallel_edges(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("3p9s2fmb4u10tilwejs0l9pp1"); // set_parallel_edges (segment* seg1, segment* seg2, int dir1, int dir2, int hops, UNSUPPORTED("1rikd6gjoe3cvxggpkhj7z34d"); // maze* mp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dpr58lv2eeka28wequlp2xrzl"); // int x; UNSUPPORTED("7pmetyg241ybw8hq3j61i271y"); // channel* chan; UNSUPPORTED("81v3bzorfnk43chwizhwmbb1n"); // channel* nchan; UNSUPPORTED("2qv0nvdra5zvo2b2ewep1ala4"); // segment* prev1; UNSUPPORTED("6s95g7xlatuyfm26klez18no0"); // segment* prev2; UNSUPPORTED("430rnwqjk85b89sh9kt07e6a0"); // if (seg1->isVert) UNSUPPORTED("4m8jh0bz7h9xwt55zl1stxnm8"); // chan = chanSearch(mp->vchans, seg1); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("4sukugpamblizlwievszn8nl3"); // chan = chanSearch(mp->hchans, seg1); UNSUPPORTED("1elt521vxb74ewc1nqabq3gby"); // insert_edge(chan->G, seg1->ind_no, seg2->ind_no); UNSUPPORTED("2n7xloj5t3tkvc8h58imqk8td"); // for (x=1;x<=hops;x++) { UNSUPPORTED("iytowix4us30gxbxx69ke9rn"); // prev1 = next_seg(seg1, dir1); UNSUPPORTED("9v39bw7og01cgrd9fnjubn0pi"); // prev2 = next_seg(seg2, dir2); UNSUPPORTED("7q2x5kqynrhvcsduekv09bdn4"); // if(!seg1->isVert) { UNSUPPORTED("7hs0lytek5umsxrj0a6jc8t5f"); // nchan = chanSearch(mp->vchans, prev1); UNSUPPORTED("7lpjkbjai262xfygabcg0nwnu"); // if(prev1->comm_coord==seg1->p.p1) { UNSUPPORTED("13ucbaachj06c0mvgupkiswfl"); // if(seg1->l1==B_UP) { UNSUPPORTED("e14484zac1ca6tr55nq056y2s"); // if(edge_exists(chan->G, seg1->ind_no, seg2->ind_no)) UNSUPPORTED("850me5iwi1gvweet5jzd7lqwy"); // insert_edge(nchan->G, prev2->ind_no, prev1->ind_no); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("9jmkjj0x67qxhr4shs6ibvgk3"); // insert_edge(nchan->G, prev1->ind_no, prev2->ind_no); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("e14484zac1ca6tr55nq056y2s"); // if(edge_exists(chan->G, seg1->ind_no, seg2->ind_no)) UNSUPPORTED("9jmkjj0x67qxhr4shs6ibvgk3"); // insert_edge(nchan->G, prev1->ind_no, prev2->ind_no); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("850me5iwi1gvweet5jzd7lqwy"); // insert_edge(nchan->G, prev2->ind_no, prev1->ind_no); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("8vywd7o1vdaaij4z9jtx8pi63"); // if(seg1->l2==B_UP) { UNSUPPORTED("e14484zac1ca6tr55nq056y2s"); // if(edge_exists(chan->G, seg1->ind_no, seg2->ind_no)) UNSUPPORTED("173hlqu5ukdae2k6wt7ch1x8p"); // insert_edge(nchan->G,prev1->ind_no, prev2->ind_no); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("7lby5m10dvjryzfv32elha7cq"); // insert_edge(nchan->G,prev2->ind_no, prev1->ind_no); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("e14484zac1ca6tr55nq056y2s"); // if(edge_exists(chan->G, seg1->ind_no, seg2->ind_no)) UNSUPPORTED("850me5iwi1gvweet5jzd7lqwy"); // insert_edge(nchan->G, prev2->ind_no, prev1->ind_no); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("9jmkjj0x67qxhr4shs6ibvgk3"); // insert_edge(nchan->G, prev1->ind_no, prev2->ind_no); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("9tap010f91m7yxd7a77xcc6gy"); // nchan = chanSearch(mp->hchans, prev1); UNSUPPORTED("7lpjkbjai262xfygabcg0nwnu"); // if(prev1->comm_coord==seg1->p.p1) { UNSUPPORTED("bv0pfzaflx2zmsfq7fl4fumox"); // if(seg1->l1==B_LEFT) { UNSUPPORTED("e14484zac1ca6tr55nq056y2s"); // if(edge_exists(chan->G, seg1->ind_no, seg2->ind_no)) UNSUPPORTED("9jmkjj0x67qxhr4shs6ibvgk3"); // insert_edge(nchan->G, prev1->ind_no, prev2->ind_no); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("850me5iwi1gvweet5jzd7lqwy"); // insert_edge(nchan->G, prev2->ind_no, prev1->ind_no); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("e14484zac1ca6tr55nq056y2s"); // if(edge_exists(chan->G, seg1->ind_no, seg2->ind_no)) UNSUPPORTED("850me5iwi1gvweet5jzd7lqwy"); // insert_edge(nchan->G, prev2->ind_no, prev1->ind_no); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("9jmkjj0x67qxhr4shs6ibvgk3"); // insert_edge(nchan->G, prev1->ind_no, prev2->ind_no); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("nvpd9xg7sp7w29u53zc5n7om"); // if(seg1->l2==B_LEFT) { UNSUPPORTED("e14484zac1ca6tr55nq056y2s"); // if(edge_exists(chan->G, seg1->ind_no, seg2->ind_no)) UNSUPPORTED("850me5iwi1gvweet5jzd7lqwy"); // insert_edge(nchan->G, prev2->ind_no, prev1->ind_no); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("9jmkjj0x67qxhr4shs6ibvgk3"); // insert_edge(nchan->G, prev1->ind_no, prev2->ind_no); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("e14484zac1ca6tr55nq056y2s"); // if(edge_exists(chan->G, seg1->ind_no, seg2->ind_no)) UNSUPPORTED("9jmkjj0x67qxhr4shs6ibvgk3"); // insert_edge(nchan->G, prev1->ind_no, prev2->ind_no); UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else UNSUPPORTED("850me5iwi1gvweet5jzd7lqwy"); // insert_edge(nchan->G, prev2->ind_no, prev1->ind_no); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3d9r09rxjpct04hoj66705cp1"); // chan = nchan; UNSUPPORTED("2c2yvnaxh16x89y9hq4w5yk1m"); // seg1 = prev1; UNSUPPORTED("11ckhoc2b2u2dsurx9qg07st6"); // seg2 = prev2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 38cpeb1o8uvzyjd93p234ds9f // static void removeEdge(segment* seg1, segment* seg2, int dir, maze* mp) public static Object removeEdge(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("6sgltkpz58p9krap0y1sbvj6k"); // removeEdge(segment* seg1, segment* seg2, int dir, maze* mp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("szrq58jnhhhevz1yqgbr4ck2"); // segment* ptr1; UNSUPPORTED("31dak66p4n83b984pfixwotla"); // segment* ptr2; UNSUPPORTED("7pmetyg241ybw8hq3j61i271y"); // channel* chan; UNSUPPORTED("3f6utfpnejoda18juym1fb1ko"); // ptr1 = seg1; UNSUPPORTED("4zdcf2h90axz04i03w6ttg5k4"); // ptr2 = seg2; UNSUPPORTED("bnoomvnxrkeudsz6vyirx44uc"); // while(is_parallel(ptr1, ptr2)) { UNSUPPORTED("bgoj9z4ow368rwa0wiqpvom0o"); // ptr1 = next_seg(ptr1, 1); UNSUPPORTED("6k9a6lk6tlg00as6qklki8xiz"); // ptr2 = next_seg(ptr2, dir); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ai7oa06ous30ke73ob1k1h6go"); // if(ptr1->isVert) UNSUPPORTED("7qlxjn3a1d6nys3x5s0ngrs5q"); // chan = chanSearch(mp->vchans, ptr1); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("79qdq8et7m2rlyh1z4wss3y1n"); // chan = chanSearch(mp->hchans, ptr1); UNSUPPORTED("1f4mrzxo4q83k5yazad1hezbb"); // remove_redge (chan->G, ptr1->ind_no, ptr2->ind_no); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eiig50kmclab4ei88pq4soo34 // static void addPEdges (channel* cp, maze* mp) public static Object addPEdges(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("68fs5heyk95e6jn74c6cgq01t"); // addPEdges (channel* cp, maze* mp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8nbbb2xvtigkcv51627tsphb7"); // int i,j; UNSUPPORTED("691z894ert27013tlk15hh2qh"); // /* dir[1,2] are used to figure out whether we should use prev UNSUPPORTED("d52bbwvlo6xaftcxmyc07f9w5"); // * pointers or next pointers -- 0 : decrease, 1 : increase UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("2ihd1217lj7h5zt9n0d1q5cna"); // int dir; UNSUPPORTED("2ur22e7h79m2ohnopwac8a76b"); // /* number of hops along the route to get to the deciding points */ UNSUPPORTED("8czu5hbarwrdzcuxp2djvv4rp"); // pair hops; UNSUPPORTED("3cz2vt0y2kw2ogxww3u2j1kl6"); // /* precedences of the deciding points : same convention as UNSUPPORTED("1tpdmm5wve9rduvay2ahgvle9"); // * seg_cmp function UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("522qtrew5eqvwpn5wxnu2k9dn"); // int prec1, prec2; UNSUPPORTED("1fnwnz6zqrixdpfmd5wf4hbj"); // pair p; UNSUPPORTED("dmbfnx3582vhxsi4o65ruesyn"); // rawgraph* G = cp->G; UNSUPPORTED("7hb8fcc74usveupz7kgy2qol3"); // segment** segs = cp->seg_list; UNSUPPORTED("39nnkurg9t4qq74t5jz3zkjrl"); // for(i=0;i+1cnt;i++) { UNSUPPORTED("6a9jbb5aterxr0g0hiu2pyhld"); // for(j=i+1;jcnt;j++) { UNSUPPORTED("3dvaxn4ireem858ssmcsr58hn"); // if (!edge_exists(G,i,j) && !edge_exists(G,j,i)) { UNSUPPORTED("dpy9omkq97zyoo9w1inx3pbm9"); // if (is_parallel(segs[i], segs[j])) { UNSUPPORTED("6ig9p93cmed2v70a0npblnlxp"); // /* get_directions */ UNSUPPORTED("amvy33u98h6r9qq7ugnuf2nlz"); // if(segs[i]->prev==0) { UNSUPPORTED("cc25alanei7n0arh5bqailcv4"); // if(segs[j]->prev==0) UNSUPPORTED("27dopm02s7e623flmf0oyucf6"); // dir = 0; UNSUPPORTED("cqgi8f4d37bqva8z6bx5rvn7w"); // else UNSUPPORTED("afmb9itetac5509pz0vzquffn"); // dir = 1; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6tva5tknk59csaydjoaehlxqy"); // else if(segs[j]->prev==0) { UNSUPPORTED("bf3scu300t9b1jl5wrxkahki9"); // dir = 1; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("cphaexi33y32dnefwtu3jsom4"); // else { UNSUPPORTED("ay1tigliz8fu739c3s4lnp4c8"); // if(segs[i]->prev->comm_coord==segs[j]->prev->comm_coord) UNSUPPORTED("27dopm02s7e623flmf0oyucf6"); // dir = 0; UNSUPPORTED("cqgi8f4d37bqva8z6bx5rvn7w"); // else UNSUPPORTED("afmb9itetac5509pz0vzquffn"); // dir = 1; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("2h9ts7wzrya1rr66lklhh0rda"); // p = decide_point(segs[i], segs[j], 0, dir); UNSUPPORTED("y15vvy2yhgh75hmjibm6d0tv"); // hops.a = p.a; UNSUPPORTED("6y60dh26moscelbp5xfex7fy7"); // prec1 = p.b; UNSUPPORTED("1fwna4qrlam89qjgrsjnzwkuc"); // p = decide_point(segs[i], segs[j], 1, 1-dir); UNSUPPORTED("7ck6vr1ic310ui6v7y8lcpwbh"); // hops.b = p.a; UNSUPPORTED("564q1rsht56yza954y2x1jtm"); // prec2 = p.b; UNSUPPORTED("dtcs9mr4kwcta690gbrwlt910"); // switch(prec1) { UNSUPPORTED("7xhopigym72b3wkri4tfjy1dy"); // case -1 : UNSUPPORTED("enqa6da4597ij1v8v5x3f251q"); // set_parallel_edges (segs[j], segs[i], dir, 0, hops.a, mp); UNSUPPORTED("6diyb5ikl44b7ym0eennr0yq6"); // set_parallel_edges (segs[j], segs[i], 1-dir, 1, hops.b, mp); UNSUPPORTED("5r2jji4zmdfrbfwx99e4tv69i"); // if(prec2==1) UNSUPPORTED("8x6usd0clpqn19g8onqqgzjn4"); // removeEdge (segs[i], segs[j], 1-dir, mp); UNSUPPORTED("a5064jph9xpw67dcun2my4mcm"); // break; UNSUPPORTED("22xfu28lqt3r284k47pbuy7cz"); // case 0 : UNSUPPORTED("4dfzzbp1vuxk64hoh65xa34yc"); // switch(prec2) { UNSUPPORTED("4gsejoo0eevrt7un6e6qn989l"); // case -1: UNSUPPORTED("emhqawmwj90tfh02qk8r1pk0v"); // set_parallel_edges (segs[j], segs[i], dir, 0, hops.a, mp); UNSUPPORTED("9n3o6zltbzimqd4msu9ngqtyd"); // set_parallel_edges (segs[j], segs[i], 1-dir, 1, hops.b, mp); UNSUPPORTED("a4shncx2bmdaa04gvja9v2blz"); // break; UNSUPPORTED("9bar4olfqd3r7389ggqw5djvq"); // case 0 : UNSUPPORTED("2s64t77sytwec1d6n2jbf74wc"); // set_parallel_edges (segs[i], segs[j], 0, dir, hops.a, mp); UNSUPPORTED("6r0468haso97c6g4zkdfg9kt2"); // set_parallel_edges (segs[i], segs[j], 1, 1-dir, hops.b, mp); UNSUPPORTED("a4shncx2bmdaa04gvja9v2blz"); // break; UNSUPPORTED("4yd30eh9icuxnqotseihb7l4w"); // case 1: UNSUPPORTED("2s64t77sytwec1d6n2jbf74wc"); // set_parallel_edges (segs[i], segs[j], 0, dir, hops.a, mp); UNSUPPORTED("6r0468haso97c6g4zkdfg9kt2"); // set_parallel_edges (segs[i], segs[j], 1, 1-dir, hops.b, mp); UNSUPPORTED("a4shncx2bmdaa04gvja9v2blz"); // break; UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // } UNSUPPORTED("a5064jph9xpw67dcun2my4mcm"); // break; UNSUPPORTED("7725wrsrh4ancb1bh89l3x12r"); // case 1 : UNSUPPORTED("3ubmnbt9kypi1ptpye7w37vkl"); // set_parallel_edges (segs[i], segs[j], 0, dir, hops.a, mp); UNSUPPORTED("4s97q82e6wclxf2y8jhzfh14k"); // set_parallel_edges (segs[i], segs[j], 1, 1-dir, hops.b, mp); UNSUPPORTED("5zh7u5zg9v4zshpcfsj3brwfk"); // if(prec2==-1) UNSUPPORTED("8x6usd0clpqn19g8onqqgzjn4"); // removeEdge (segs[i], segs[j], 1-dir, mp); UNSUPPORTED("a5064jph9xpw67dcun2my4mcm"); // break; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 98d1c54yaxchy0ms0e99lst7s // static void add_p_edges (Dt_t* chans, maze* mp) public static Object add_p_edges(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("5ebboq5zrhtd0rfaeawkl5s2f"); // add_p_edges (Dt_t* chans, maze* mp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a4p8766eh6ra21i7u5o9nf6rm"); // Dt_t* lp; UNSUPPORTED("1mqjeo37v4tmo6kht0rep1tht"); // Dtlink_t* l1; UNSUPPORTED("eiqtkkndttzmunuxtnm99mkpy"); // Dtlink_t* l2; UNSUPPORTED("cp4kv1fg74up3ubek2qyx8d25"); // for (l1 = dtflatten (chans); l1; l1 = (((Dtlink_t*)(l1))->right)) { UNSUPPORTED("950o75hi1nj794oxa101pt5t0"); // lp = ((chanItem*)l1)->chans; UNSUPPORTED("71dqer4eeiqshvsh6rbj0kis5"); // for (l2 = dtflatten (lp); l2; l2 = (((Dtlink_t*)(l2))->right)) { UNSUPPORTED("di14tjuua1p9n96grrfboue6o"); // addPEdges ((channel*)l2, mp); UNSUPPORTED("9pqd0punhe3g1up9qd8xxo652"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxsh28469kd6r9fen9l7v8f2w // static void assignTracks (int nrtes, route* route_list, maze* mp) public static Object assignTracks(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("e80kmdu0n8gwftxrcchppqznf"); // assignTracks (int nrtes, route* route_list, maze* mp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("26qmbe7syf8caazopicbw1o73"); // /* Create the graphs for each channel */ UNSUPPORTED("5kswlmxeu7z6znausks9omj52"); // create_graphs(mp->hchans); UNSUPPORTED("1qo05yt4o0eiyn1axxxfiecee"); // create_graphs(mp->vchans); UNSUPPORTED("9k9f44tgb14d6rvcxauyk4kg3"); // /* add edges between non-parallel segments */ UNSUPPORTED("2bpipgzzkyey9l1jwcx2ytvc0"); // add_np_edges(mp->hchans); UNSUPPORTED("7fju2e1xyweu6benhq0akolab"); // add_np_edges(mp->vchans); UNSUPPORTED("a2akrqgy2t88akl274eg0somv"); // /* add edges between parallel segments + remove appropriate edges */ UNSUPPORTED("5zdimrk15jv0lju7twpsqz29m"); // add_p_edges(mp->hchans, mp); UNSUPPORTED("9bqggms2mbxxvkbh0u4jidv0l"); // add_p_edges(mp->vchans, mp); UNSUPPORTED("9envbpdpd498dstkls2pqtswo"); // /* Assign the tracks after a top sort */ UNSUPPORTED("10z0c5n6u2v6o7td59aig5lfd"); // assignTrackNo (mp->hchans); UNSUPPORTED("t8kw88xoabf7nbvqv8ds7www"); // assignTrackNo (mp->vchans); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 udi38qq74cw0pvrqn6g1yle5 // static double vtrack (segment* seg, maze* m) public static Object vtrack(Object... arg) { UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double UNSUPPORTED("19x5ivyvkfhintu5d2rpflcvo"); // vtrack (segment* seg, maze* m) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1xvv17gm5rfjinvy3gmnsc2ke"); // channel* chp = chanSearch(m->vchans, seg); UNSUPPORTED("76k3vszrhcky681kek2r7d5h9"); // double f = ((double)seg->track_no)/(chp->cnt+1); UNSUPPORTED("2ug8vx71z1uw4iw38ehgqdc7g"); // double left = chp->cp->bb.LL.x; UNSUPPORTED("f2ozrx5u8liyshw7972fqzlry"); // double right = chp->cp->bb.UR.x; UNSUPPORTED("2gju483ltduiu0c964t9ir9wa"); // return left + f*(right-left); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3cqaxjb6pietkwiyugn6h26kd // static int htrack (segment* seg, maze* m) public static Object htrack(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("a2hs7lm69vuj9mt0513f8z4oz"); // htrack (segment* seg, maze* m) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("40ntn3e9uwr1zuuu2sbtdsa6w"); // channel* chp = chanSearch(m->hchans, seg); UNSUPPORTED("erszzli51plsbzcgsn48c0180"); // double f = 1.0 - ((double)seg->track_no)/(chp->cnt+1); UNSUPPORTED("4i67gabp0r3u9scclorhs3ktm"); // double lo = chp->cp->bb.LL.y; UNSUPPORTED("4p8tiujx3t2fm7is5dxnoqxhe"); // double hi = chp->cp->bb.UR.y; UNSUPPORTED("83od9je177vrwp4ps0kbd4szw"); // return lo + f*(hi-lo); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 83e5ejcqta67f2p2asgbtfaoi // static pointf addPoints(pointf p0, pointf p1) public static Object addPoints(Object... arg) { UNSUPPORTED("2zzd7mrm2u540dwuyzehozffj"); // static pointf UNSUPPORTED("682qkd4mibtnxpxyv5orrsjtx"); // addPoints(pointf p0, pointf p1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("f5hox117bxx1r58lcs3udisoe"); // p0.x += p1.x; UNSUPPORTED("ujsxixrtu1t8f32elbvw8dwa"); // p0.y += p1.y; UNSUPPORTED("3eojsvh2rm970fcai0twfpvnl"); // return p0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a0iuxsb2zu9l7k8a3v4ixv00e // static void attachOrthoEdges (Agraph_t* g, maze* mp, int n_edges, route* route_list, splineInfo *sinfo, epair_t es[], int doLbls) public static Object attachOrthoEdges(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("cspgusupjxy5utjicgxrmrq7w"); // attachOrthoEdges (Agraph_t* g, maze* mp, int n_edges, route* route_list, splineInfo *sinfo, epair_t es[], int doLbls) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bzsk5t9x5gtbz8fnomb2f9s4v"); // int irte = 0; UNSUPPORTED("9guu55302lj09t48j16nqyxbq"); // int i, ipt, npts; UNSUPPORTED("5b40dnpfc88et1cia7fuj40yb"); // pointf* ispline = 0; UNSUPPORTED("dprplco8u5mu9i11jo6go6bcy"); // int splsz = 0; UNSUPPORTED("2asgcu0nywvhoazecb6ofcubs"); // pointf p, p1, q1; UNSUPPORTED("76tjoqkn7jsh2pn0trcuu3nvs"); // route rte; UNSUPPORTED("9ixgpcejsl25oetqsy1ewnfnu"); // segment* seg; UNSUPPORTED("6yramhpyls8c6kexupyqip8oq"); // Agedge_t* e; UNSUPPORTED("ef044lvbrsjiucn4ouhr6x2qb"); // textlabel_t* lbl; UNSUPPORTED("77xmhk7dbpg0c00j8666pclyi"); // for (; irte < n_edges; irte++) { UNSUPPORTED("bv52iygkt2gg4gzoyp4c9wk6b"); // e = es[irte].e; UNSUPPORTED("ay9p5i1iubyhzon5z6a3jrw9n"); // p1 = addPoints(ND_coord(agtail(e)), ED_tail_port(e).p); UNSUPPORTED("4z87m5xmyxfqf4gbe4pskna9n"); // q1 = addPoints(ND_coord(aghead(e)), ED_head_port(e).p); UNSUPPORTED("8wciy7quxxigt8dwxr9ctgk2d"); // rte = route_list[irte]; UNSUPPORTED("6ed9g47vzboko6g0h5y17e1ou"); // npts = 1 + 3*rte.n; UNSUPPORTED("efs0cd713nnm7zxrgb0l11wz"); // if (npts > splsz) { UNSUPPORTED("5d7b0ws1zxf4b536zojp5j1gy"); // if (ispline) free (ispline); UNSUPPORTED("dqxwk098ekx7gst5gdhr310bc"); // ispline = (pointf*)gmalloc((npts)*sizeof(pointf)); UNSUPPORTED("e4i1tff7gmkjg8kevj7hw8gs1"); // splsz = npts; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1ry9c35mgaxl2ivjx1h2v5cr0"); // seg = rte.segs; UNSUPPORTED("6pz2d4cdoe2l7351iysy6x98p"); // if (seg->isVert) { UNSUPPORTED("91n0eh3r7wj0n97kdj9ld31kj"); // p.x = vtrack(seg, mp); UNSUPPORTED("45fe06ci8qec4u7eii52becqh"); // p.y = p1.y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("9t5iimum2tu1jo5tlcx6m7fhq"); // p.y = htrack(seg, mp); UNSUPPORTED("8je4vuu6jnq5fu4znanftosq8"); // p.x = p1.x; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("76sz3tzo9psbgiwiel6nlkhyd"); // ispline[0] = ispline[1] = p; UNSUPPORTED("2xvzqz1y0roznr4j0qz8gdn97"); // ipt = 2; UNSUPPORTED("ehl4i682tsgw4ev386bxd9bvk"); // for (i = 1;iisVert) UNSUPPORTED("5ordk0g9tt85vst6tn9y7yw5e"); // p.x = vtrack(seg, mp); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("2e3jl8piax6scxsrx2jl4mn0m"); // p.y = htrack(seg, mp); UNSUPPORTED("5zlu7lc3edxwcalx4u2toh91o"); // ispline[ipt+2] = ispline[ipt+1] = ispline[ipt] = p; UNSUPPORTED("1h4km88eju8ubv62x2a9mwdzm"); // ipt += 3; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6pz2d4cdoe2l7351iysy6x98p"); // if (seg->isVert) { UNSUPPORTED("91n0eh3r7wj0n97kdj9ld31kj"); // p.x = vtrack(seg, mp); UNSUPPORTED("obj8bne89a63k09t0vg3ksax"); // p.y = q1.y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("9t5iimum2tu1jo5tlcx6m7fhq"); // p.y = htrack(seg, mp); UNSUPPORTED("cwlvttt636ou35je24a6zn8fw"); // p.x = q1.x; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6883d1dn4elcixp0dy2yzu4ck"); // ispline[ipt] = ispline[ipt+1] = p; UNSUPPORTED("e7wcbocwpb0ubwm19n3qdsfdu"); // if (Verbose > 1) UNSUPPORTED("6243buyivvpmixvapfka7f2n3"); // fprintf(stderr, "ortho %s %s\n", agnameof(agtail(e)),agnameof(aghead(e))); UNSUPPORTED("aiznf16jsmgfywhbln59n8weh"); // clip_and_install(e, aghead(e), ispline, npts, sinfo); UNSUPPORTED("5odapjhwjcy61acm5m79qw8fs"); // if (doLbls && (lbl = ED_label(e)) && !lbl->set) UNSUPPORTED("2bpsdc28nv5l876oe7rqtanlx"); // addEdgeLabels(g, e, p1, q1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c0bfcb8svwdkq95cokqra1pi2"); // free(ispline); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e71zkztxzapvl1mgiq8p5gzzs // static int edgeLen (Agedge_t* e) public static Object edgeLen(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("4eh66xikxzh6l4lhjcmvtv8cn"); // edgeLen (Agedge_t* e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1vcqzavbye1orax38cfndljrr"); // pointf p = ND_coord(agtail(e)); UNSUPPORTED("d1qthvuzf3w3d5qujx199xm23"); // pointf q = ND_coord(aghead(e)); UNSUPPORTED("7b42di3iyhbsuhhw6yaw6539m"); // return (int)DIST2(p,q); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7afj2qnluiytxt8hvcnhreb2 // static int edgecmp(epair_t* e0, epair_t* e1) public static Object edgecmp(Object... arg) { UNSUPPORTED("4biy4n19ul16vp6vcv9xmui1i"); // static int edgecmp(epair_t* e0, epair_t* e1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dlcw570tkt0usu32yvwm8cd3q"); // return (e0->d - e1->d); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 v4bpabyggw2gk3qw5qiapig9 // static boolean spline_merge(node_t * n) public static Object spline_merge(Object... arg) { UNSUPPORTED("676qpx3n8ouo1wjyumn6zmyxp"); // static boolean spline_merge(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 90yjqn8lf9ig968uma0q5sh34 // static boolean swap_ends_p(edge_t * e) public static Object swap_ends_p(Object... arg) { UNSUPPORTED("3fjj0uj2p25pitmluszw94p02"); // static boolean swap_ends_p(edge_t * e) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 9nmy74adtwr7rthq8xzoptzrf // static splineInfo sinfo = //3 9rb5k3o906weqm31n2i8lv5so // void orthoEdges (Agraph_t* g, int doLbls) public static Object orthoEdges(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("9ttq9irkfbqsx0q7wcnetzy74"); // orthoEdges (Agraph_t* g, int doLbls) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2omyui5qg1nq6by9uehikdjsy"); // sgraph* sg; UNSUPPORTED("7cg9ke1jhysixb020x5an69jv"); // maze* mp; UNSUPPORTED("cu6yxi1acnq5g0btge7zjdkm0"); // int n_edges; UNSUPPORTED("9ro0xuxbh1xd61xqzcaaadikl"); // route* route_list; UNSUPPORTED("bl7f59ax29638dd6kka6eopr"); // int i, gstart; UNSUPPORTED("ci2zh69w6nhi0q816i1ixuy9k"); // Agnode_t* n; UNSUPPORTED("6yramhpyls8c6kexupyqip8oq"); // Agedge_t* e; UNSUPPORTED("7kt5z7l3gj30fc2g11brz7hn3"); // snode* sn; UNSUPPORTED("4lm0qpz2knefonz0ik550n9qi"); // snode* dn; UNSUPPORTED("f0kzqokjxzhga3oyrmev903hw"); // epair_t* es = (epair_t*)gmalloc((agnedges(g))*sizeof(epair_t)); UNSUPPORTED("ih7y3b036cc7gqpd8tqtpr9q"); // cell* start; UNSUPPORTED("1jv0h6v7ggk7dfm6oqzs4u3lj"); // cell* dest; UNSUPPORTED("4vt2v1dwhho9ajlyh6nnd1d8h"); // PointSet* ps; UNSUPPORTED("ef044lvbrsjiucn4ouhr6x2qb"); // textlabel_t* lbl; UNSUPPORTED("e800kdbiqq8i4me0u6fwkd370"); // if (Concentrate) UNSUPPORTED("7r91fjc8u70111hbxlvqd7ktw"); // ps = newPS(); UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("9wn8pvvih4vrawe5alvfhm9yn"); // char* s = agget(g, "odb"); UNSUPPORTED("b8c7bwegidsegu11m5xttb11j"); // char c; UNSUPPORTED("1jro8v0ct38i7wcl91bk3ic3e"); // odb_flags = 0; UNSUPPORTED("3jmzbbt2cpizqt2dufx87w3al"); // if (s && (*s != '\0')) { UNSUPPORTED("7ns3g2gy7v368e78t92w9xfwe"); // while ((c = *s++)) { UNSUPPORTED("2mo7busikqaj4ukkdtf5zm8ik"); // switch (c) { UNSUPPORTED("ahx4iaogjvo14pciwab02xzsk"); // case 'c' : UNSUPPORTED("eai7hbieqphsrvjgzprem79fi"); // odb_flags |= 8; // emit channel graph UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("3dcblef3ry3y3dukenp1w4dfg"); // case 'i' : UNSUPPORTED("8f1c36fjkua8s8jgm0zigqvgv"); // odb_flags |= (2|16); // emit search graphs UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("a5nt85f0rq0jcipae19734270"); // case 'm' : UNSUPPORTED("6jh77aqljluu3rx42j6uz2wog"); // odb_flags |= 1; // emit maze UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("ci305ii9fygih5qjkc9cb43gn"); // case 'r' : UNSUPPORTED("db7u5t19gdpwvuygsvb2vjc3d"); // odb_flags |= 4; // emit routes in maze UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("bt1b5biu9zb9zccgj0cr658xz"); // case 's' : UNSUPPORTED("3uqs3qb95942pbzmg53uqc42a"); // odb_flags |= 2; // emit search graph UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("71u00vuawtzqg4gz0lsai1m4a"); // if (doLbls) { UNSUPPORTED("10xzs4g55w92883ej7ty5glms"); // agerr(AGWARN, "Orthogonal edges do not currently handle edge labels. Try using xlabels.\n"); UNSUPPORTED("ditf90dyqp9mua87s8pumvi32"); // doLbls = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("etv0iiw2ala4rlayc040wzggy"); // mp = mkMaze (g, doLbls); UNSUPPORTED("4mmgpe06gcmxv31p3y6ipyf5s"); // sg = mp->sg; UNSUPPORTED("emjkv8wxfnbb355266hsa90ni"); // if (odb_flags & 2) emitSearchGraph (stderr, sg); UNSUPPORTED("6kfj8qzl4paerer9gefcgsf7h"); // /* store edges to be routed in es, along with their lengths */ UNSUPPORTED("c8047kmsz3vp9lv0w3cw7yas8"); // n_edges = 0; UNSUPPORTED("ef1ej9licmntta3ibshtov76v"); // for (n = agfstnode (g); n; n = agnxtnode(g, n)) { UNSUPPORTED("bojcrt9w5b2e0csoijdzfkvq9"); // for (e = agfstout(g, n); e; e = agnxtout(g,e)) { UNSUPPORTED("2xpa4q3kqyqhcc2z6j7asagqt"); // if ((Nop == 2) && ED_spl(e)) continue; UNSUPPORTED("41rwk0z8paqjc2mcm2a1byosa"); // if (Concentrate) { UNSUPPORTED("9luudm8wqdv4jx4s0ustrk6br"); // int ti = AGSEQ(agtail(e)); UNSUPPORTED("c976iy0d8sqzcrczrfzsoevxv"); // int hi = AGSEQ(aghead(e)); UNSUPPORTED("48wqpeunj9fn8sno227cy07cn"); // if (ti <= hi) { UNSUPPORTED("4xk5rpi8h5diyml5ko1c9pb4o"); // if (isInPS (ps,ti,hi)) continue; UNSUPPORTED("eufspanc57875qmod8zz8vvj"); // else addPS (ps,ti,hi); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("9g3uik8w4uis1skxgzm9wfjkr"); // if (isInPS (ps,hi,ti)) continue; UNSUPPORTED("ckw8orokucnmrq9rly0vp6483"); // else addPS (ps,hi,ti); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("disvm7blt6qwq36jp0pcx05p8"); // es[n_edges].e = e; UNSUPPORTED("8treoc9xy0md6z4ggqb44auyg"); // es[n_edges].d = edgeLen (e); UNSUPPORTED("e9hecjb6c3qp2o2tya683ai62"); // n_edges++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("191cpw36uzdm3gqmxfphm1xbu"); // route_list = (route*)zmalloc((n_edges)*sizeof(route)); UNSUPPORTED("2gq02agovwtyskbeh5vefmslh"); // qsort((char *)es, n_edges, sizeof(epair_t), (qsort_cmpf) edgecmp); UNSUPPORTED("brl796jea4mql81k1b7ershdc"); // gstart = sg->nnodes; UNSUPPORTED("cs9x91hl58n3ub79e9ugvdn4x"); // PQgen (sg->nnodes+2); UNSUPPORTED("5d43q0fg31x5nwtqm0ata3zjz"); // sn = &sg->nodes[gstart]; UNSUPPORTED("66qkjbw0jrnak7d2s42h0jg70"); // dn = &sg->nodes[gstart+1]; UNSUPPORTED("6gdenpywxn3p3xidvp7z66cf1"); // for (i = 0; i < n_edges; i++) { UNSUPPORTED("49gwq06gbm2qhfpy2s6ar6gje"); // if ((i > 0) && (odb_flags & 16)) emitSearchGraph (stderr, sg); UNSUPPORTED("a80m8bfu7lu477kat2scc0z01"); // e = es[i].e; UNSUPPORTED("cod1w9an9gcxijan671a4atdt"); // start = ((cell*)ND_alg(agtail(e))); UNSUPPORTED("emi0a8wy2fz98d3tyq50nu13j"); // dest = ((cell*)ND_alg(aghead(e))); UNSUPPORTED("3n4xox18pqitgomsjx10rjonm"); // if (doLbls && (lbl = ED_label(e)) && lbl->set) { UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("596hk3sqi3zgv5ypngx0bx7mq"); // if (start == dest) UNSUPPORTED("d0zcyw4sme2i3mtmhe3hlbrmc"); // addLoop (sg, start, dn, sn); UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("3uirdblzfj10bp724w2p35bup"); // addNodeEdges (sg, dest, dn); UNSUPPORTED("52k51th88uehvgef7fd4gfbu6"); // addNodeEdges (sg, start, sn); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("dd3ztkz69q7dffhj4ihaizk6s"); // if (shortPath (sg, dn, sn)) goto orthofinish; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("nl2nzce1mtx118xuy1w9uq6v"); // route_list[i] = convertSPtoRoute(sg, sn, dn); UNSUPPORTED("bt25p7tmlvva5imw8gh97toy4"); // reset (sg); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9br7yf8ixw2vq0ih496kr0a3p"); // PQfree (); UNSUPPORTED("1h1p1wlchwso3mavejmc8cyxv"); // mp->hchans = extractHChans (mp); UNSUPPORTED("dbw3nbw93ongdgdhdtscvuxb8"); // mp->vchans = extractVChans (mp); UNSUPPORTED("9r77bxpkuu3nsxa0nttqjh0hl"); // assignSegs (n_edges, route_list, mp); UNSUPPORTED("bbjzso9cox08g0ax9rs132q90"); // if (setjmp(jbuf)) UNSUPPORTED("uycdh1qmy4ty2pb0zgz2v78a"); // goto orthofinish; UNSUPPORTED("41rz8iqv9lm60deshcar8hjxa"); // assignTracks (n_edges, route_list, mp); UNSUPPORTED("as0ctk4holgq03a3hl4doch8d"); // if (odb_flags & 4) emitGraph (stderr, mp, n_edges, route_list, es); UNSUPPORTED("c1p0r114sfd1lvyamywzbro10"); // attachOrthoEdges (g, mp, n_edges, route_list, &sinfo, es, doLbls); UNSUPPORTED("7e5qeaxbygknkdgnv53oq2u1e"); // orthofinish: UNSUPPORTED("2o1inibord55o8k32yn7kfrwl"); // if (Concentrate) UNSUPPORTED("ghiimsk3vbhjzh67h8pwbk95"); // freePS (ps); UNSUPPORTED("an57w0rx9dpimg8nf764q8n97"); // for (i=0; i < n_edges; i++) UNSUPPORTED("3fz1dnh6u4wislz0u5bxb5ugh"); // free (route_list[i].segs); UNSUPPORTED("570o41p0l7jgclg83j647v910"); // free (route_list); UNSUPPORTED("3pnwqn95p3wz9ni8ys8j0u5hv"); // freeMaze (mp); UNSUPPORTED("d507lsxnfvq57ccke7bica6zl"); // free (es); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 d9p47q2g7x3b0asfu3jvceq3l // static char* prolog2 = //1 475m5xvb3loybtd1l2z8rftoq // static char* epilog2 = //3 dx1s3vj94skvk7pmrz4s875l9 // static point coordOf (cell* cp, snode* np) public static Object coordOf(Object... arg) { UNSUPPORTED("5ji3k3tukj2uxmd2ympfpwtml"); // static point UNSUPPORTED("dd9sjhv4zfl34767d8g79k27"); // coordOf (cell* cp, snode* np) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("41nrdsugvfgw23s93g0dhizkn"); // point p; UNSUPPORTED("703pcgiucdy0i6g6mphde8dno"); // if (cp->sides[M_TOP] == np) { UNSUPPORTED("68easn97lilb2aqdb8frrsss1"); // p.x = (cp->bb.LL.x + cp->bb.UR.x)/2; UNSUPPORTED("6aab1cx7aql0barme21mg8zqj"); // p.y = cp->bb.UR.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("835f42b2b380czfp1110k8i9k"); // else if (cp->sides[M_BOTTOM] == np) { UNSUPPORTED("68easn97lilb2aqdb8frrsss1"); // p.x = (cp->bb.LL.x + cp->bb.UR.x)/2; UNSUPPORTED("2hak744886lhw45wamafgo56x"); // p.y = cp->bb.LL.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5ik2pzxq0pwcq7l7og6ti9ee3"); // else if (cp->sides[M_LEFT] == np) { UNSUPPORTED("1t69shrxanujd9qd85gq4qeng"); // p.y = (cp->bb.LL.y + cp->bb.UR.y)/2; UNSUPPORTED("4k1o0atpyqo35gcbuse4az3rg"); // p.x = cp->bb.LL.x; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4u9elo3yvf0zruskl3zjt2b2f"); // else if (cp->sides[M_RIGHT] == np) { UNSUPPORTED("1t69shrxanujd9qd85gq4qeng"); // p.y = (cp->bb.LL.y + cp->bb.UR.y)/2; UNSUPPORTED("ehaxid5d4p09fg8swm5oivbh9"); // p.x = cp->bb.UR.x; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("91xduilalb406jjyw2g1i07th"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 88q5zadn0aehrwxgxwm2qrbrk // static boxf emitEdge (FILE* fp, Agedge_t* e, route rte, maze* m, int ix, boxf bb) public static Object emitEdge(Object... arg) { UNSUPPORTED("d5qt6s97burjfu5qe0oxyyrmr"); // static boxf UNSUPPORTED("dnxab88k0n0c2bl3z0wgvml6i"); // emitEdge (FILE* fp, Agedge_t* e, route rte, maze* m, int ix, boxf bb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eusea1bk6jn8fd1b9chikta59"); // int i, x, y; UNSUPPORTED("orqp5l9owubc5xfs0c6zc4fu"); // boxf n = ((cell*)ND_alg(agtail(e)))->bb; UNSUPPORTED("bv14gu5qoc27okyaav2vdl3fi"); // segment* seg = rte.segs; UNSUPPORTED("9z20n0kimree8b0ala1dzcz3f"); // if (seg->isVert) { UNSUPPORTED("d35lpqdphvgn7a4elfttfttf5"); // x = vtrack(seg, m); UNSUPPORTED("7d8m8clw270qs6crbw28fvj90"); // y = (n.UR.y + n.LL.y)/2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("cl661znjs3x3fj8d1y9cg24sj"); // y = htrack(seg, m); UNSUPPORTED("c1hxt4wou5pqdatrc4gw3y5yt"); // x = (n.UR.x + n.LL.x)/2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("xhluynvutbzbfvcxx2cjyytz"); // bb.LL.x = MIN(bb.LL.x, 1*x); UNSUPPORTED("33wk87zqb5r4f23468khg93pg"); // bb.LL.y = MIN(bb.LL.y, 1*y); UNSUPPORTED("6mk0mwcxlhcgch8smmk49m01g"); // bb.UR.x = MAX(bb.UR.x, 1*x); UNSUPPORTED("4z54bwwdfw0evollgabbhoyfh"); // bb.UR.y = MAX(bb.UR.y, 1*y); UNSUPPORTED("bd57sg9ngr5l29b4xy3hasneh"); // fprintf (fp, "newpath %d %d moveto\n", 1*x, 1*y); UNSUPPORTED("rfx8uba9j7zxsbk2dfcyo2j8"); // for (i = 1;iisVert) { UNSUPPORTED("1b5sxos9qcnmmvphnk5nns37s"); // x = vtrack(seg, m); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("19kkar9zhosg7ryut8il82rx7"); // y = htrack(seg, m); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2d7turuf2z2kzsjsi5ajmg6np"); // bb.LL.x = MIN(bb.LL.x, 1*x); UNSUPPORTED("c2qeisl94yrotinrfx39xxqo3"); // bb.LL.y = MIN(bb.LL.y, 1*y); UNSUPPORTED("2y9tfuxsj7noszyfrt0ahp2lk"); // bb.UR.x = MAX(bb.UR.x, 1*x); UNSUPPORTED("ckczjxes8uggdg6ltkg2gqw5x"); // bb.UR.y = MAX(bb.UR.y, 1*y); UNSUPPORTED("dwd2wbhfazyd038t2qn0hc7bv"); // fprintf (fp, "%d %d lineto\n", 1*x, 1*y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b0b65d8qp73v6bg7hjzivvqz9"); // n = ((cell*)ND_alg(aghead(e)))->bb; UNSUPPORTED("9z20n0kimree8b0ala1dzcz3f"); // if (seg->isVert) { UNSUPPORTED("d35lpqdphvgn7a4elfttfttf5"); // x = vtrack(seg, m); UNSUPPORTED("7d8m8clw270qs6crbw28fvj90"); // y = (n.UR.y + n.LL.y)/2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("cl661znjs3x3fj8d1y9cg24sj"); // y = htrack(seg, m); UNSUPPORTED("d0efs14iyqyu5lops51368trn"); // x = (n.LL.x + n.UR.x)/2; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("xhluynvutbzbfvcxx2cjyytz"); // bb.LL.x = MIN(bb.LL.x, 1*x); UNSUPPORTED("33wk87zqb5r4f23468khg93pg"); // bb.LL.y = MIN(bb.LL.y, 1*y); UNSUPPORTED("6mk0mwcxlhcgch8smmk49m01g"); // bb.UR.x = MAX(bb.UR.x, 1*x); UNSUPPORTED("4z54bwwdfw0evollgabbhoyfh"); // bb.UR.y = MAX(bb.UR.y, 1*y); UNSUPPORTED("4lv2wvln641rjodmppi1ea8ow"); // fprintf (fp, "%d %d lineto stroke\n", 1*x, 1*y); UNSUPPORTED("5v5hh30squmit8o2i5hs25eig"); // return bb; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 26m9b9nmqeqz2egz17qjrsmi6 // static void emitSearchGraph (FILE* fp, sgraph* sg) public static Object emitSearchGraph(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("3afa3kd81chzz47ecdq46zrer"); // emitSearchGraph (FILE* fp, sgraph* sg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dyevh82lgyyzdp6weja1ovxir"); // cell* cp; UNSUPPORTED("bhhrlzv5tqbx6ctv8b8hya7ll"); // snode* np; UNSUPPORTED("2360u3fv51vz7azzvwtpxz8ys"); // sedge* ep; UNSUPPORTED("41nrdsugvfgw23s93g0dhizkn"); // point p; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("6gvhztp2b7m89nv2btikaiyz4"); // fputs ("graph G {\n", fp); UNSUPPORTED("bmtp7y0sxxjdh22j8p4pvgssu"); // fputs (" node[shape=point]\n", fp); UNSUPPORTED("89usm1dk3yo4ttycgh9mcqv0f"); // for (i = 0; i < sg->nnodes; i++) { UNSUPPORTED("3kjyiosnhbp02weff5w4htinu"); // np = sg->nodes+i; UNSUPPORTED("4k5we2dw3u45kv7a09gffw8tf"); // cp = np->cells[0]; UNSUPPORTED("1kn01nkzc34bp86c9bvl7a74b"); // if (cp == np->cells[1]) { UNSUPPORTED("e78riujsgaj8ogp31bihqa6rr"); // pointf pf = midPt (cp); UNSUPPORTED("1hdg4vfvme7qnviehisvcj5jl"); // p.x = pf.x; UNSUPPORTED("7o9naunu16bztru6ho4g6yp5s"); // p.y = pf.y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("7ks8s38h2f1xoqnd6vgdegepn"); // if ((cp->flags & 1)) cp = np->cells[1]; UNSUPPORTED("995g67hltj0paxtxlkedyryh1"); // p = coordOf (cp, np); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7lalws1y1951xlz9ffakcbom8"); // fprintf (fp, " %d [pos=\"%d,%d\"]\n", i, p.x, p.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2ktcncbuekdxpzstdfs5xnwyu"); // for (i = 0; i < sg->nedges; i++) { UNSUPPORTED("6hjfrnsaxev4hsgcyeka41z77"); // ep = sg->edges+i; UNSUPPORTED("a7b1ejc81bv3o5ahc8hoxa98u"); // fprintf (fp, " %d -- %d[len=\"%f\"]\n", ep->v1, ep->v2, ep->weight); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("69smfbpzurcjvgjvm90vhl35k"); // fputs ("}\n", fp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7qavznbkl6bvpmm9axulwfdbe // static void emitGraph (FILE* fp, maze* mp, int n_edges, route* route_list, epair_t es[]) public static Object emitGraph(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("bkcsiggpetlvefiz01q93uej4"); // emitGraph (FILE* fp, maze* mp, int n_edges, route* route_list, epair_t es[]) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("7546bgor76e4n44ldtchty3d4"); // boxf bb, absbb; UNSUPPORTED("emg8ro778e56pul9iomm1odwo"); // box bbox; UNSUPPORTED("c1kybqd5l3qg3n9a305wjynks"); // absbb.LL.x = absbb.LL.y = MAXDOUBLE; UNSUPPORTED("8k7etzgpxlrl6uupdtjg0hodh"); // absbb.UR.x = absbb.UR.y = -MAXDOUBLE; UNSUPPORTED("118oh6o7l5ozdkayqepqyzeq1"); // fprintf (fp, "%s", prolog2); UNSUPPORTED("1m4pf51j8j5r5hwafqhf1gpxp"); // fprintf (fp, "%d %d translate\n", 10, 10); UNSUPPORTED("1l4k0raj069p4juux59nmeddm"); // fputs ("0 0 1 setrgbcolor\n", fp); UNSUPPORTED("eabxb5i0ddkbddnag9j34xjbc"); // for (i = 0; i < mp->ngcells; i++) { UNSUPPORTED("8we0nz55uqrc136qh9ei4wi1r"); // bb = mp->gcells[i].bb; UNSUPPORTED("eaawrfhkil1c35bbtxc96ifj7"); // fprintf (fp, "%f %f %f %f node\n", bb.LL.x, bb.LL.y, bb.UR.x, bb.UR.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6gdenpywxn3p3xidvp7z66cf1"); // for (i = 0; i < n_edges; i++) { UNSUPPORTED("c0bzh5j9t4e77lu0tb21a67bz"); // absbb = emitEdge (fp, es[i].e, route_list[i], mp, i, absbb); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("86kkucwmapf5ozkph3236xcgb"); // fputs ("0.8 0.8 0.8 setrgbcolor\n", fp); UNSUPPORTED("cc6zk9wsty15bcay61nb68jos"); // for (i = 0; i < mp->ncells; i++) { UNSUPPORTED("323ihqshamlg2xo726pk3b3vj"); // bb = mp->cells[i].bb; UNSUPPORTED("e86ar5rrwd873yux3qqdkktes"); // fprintf (fp, "%f %f %f %f cell\n", bb.LL.x, bb.LL.y, bb.UR.x, bb.UR.y); UNSUPPORTED("1739n1u2wlfk0ha07u0i2kqns"); // absbb.LL.x = MIN(absbb.LL.x, bb.LL.x); UNSUPPORTED("2k0qxt9afi97ol188k2rxoiot"); // absbb.LL.y = MIN(absbb.LL.y, bb.LL.y); UNSUPPORTED("cgmau9yngryx709jc2th5sk7o"); // absbb.UR.x = MAX(absbb.UR.x, bb.UR.x); UNSUPPORTED("b08g38fj835q33y3jhlu4r7or"); // absbb.UR.y = MAX(absbb.UR.y, bb.UR.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("66qdohztsd8obgtrz7n7aneyq"); // bbox.LL.x = absbb.LL.x + 10; UNSUPPORTED("eanpui2i9474f3m8ugpr9isad"); // bbox.LL.y = absbb.LL.y + 10; UNSUPPORTED("8azdlhxair6id14ox480nrq72"); // bbox.UR.x = absbb.UR.x + 10; UNSUPPORTED("3pbdldqi9gmkwgneq7kyfowun"); // bbox.UR.y = absbb.UR.y + 10; UNSUPPORTED("e2528fy8l69smovwey76qcix3"); // fprintf (fp, epilog2, bbox.LL.x, bbox.LL.y, bbox.UR.x, bbox.UR.y); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/ortho/partition__c.java000066400000000000000000001446341312650303100224500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.ortho; import static smetana.core.Macro.UNSUPPORTED; public class partition__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 1duz2zmve5bdooct0ezmnnaxq // static int chain_idx, mon_idx //1 67uj2vwqlb937zf3jgzd5bre1 // static monchain_t* mchain //1 b7wevmtwi3ljzl56axez0c18m // static vertexchain_t* vert //1 2owm4aavvrdgcsmzw0xh1keul // static int* mon //3 c5f2ppu5vis7zj6x1ehr7ipb8 // static void convert (boxf bb, int flip, int ccw, pointf* pts) public static Object convert(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("7z9p7ryaqovx8l4zvz8ut5lh"); // convert (boxf bb, int flip, int ccw, pointf* pts) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("d4u5o9hun4r9ctb05sitn35ie"); // pts[0] = bb.LL; UNSUPPORTED("8c7ixjyy0o8pk7jvbhubvu7fk"); // pts[2] = bb.UR; UNSUPPORTED("3oqttg1p147o6iu2ik3nuhaag"); // if (ccw) { UNSUPPORTED("b6cwugc335s6xo11bjy8lzdtv"); // pts[1].x = bb.UR.x; UNSUPPORTED("5g8pg756wtn4jz9pynuub13nu"); // pts[1].y = bb.LL.y; UNSUPPORTED("86i7iwyoibsuencp95bp2l0q4"); // pts[3].x = bb.LL.x; UNSUPPORTED("es4u9iskz0bxl8yc2utghf7yw"); // pts[3].y = bb.UR.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("apctdgahb5872oqu7l5h6puc2"); // pts[1].x = bb.LL.x; UNSUPPORTED("7hnlqi5nik1acsnv1f8p6bcl"); // pts[1].y = bb.UR.y; UNSUPPORTED("7jd9pnw8dy4kydjdmsqgagnag"); // pts[3].x = bb.UR.x; UNSUPPORTED("tk95qh6cyvgcle477dclxmdc"); // pts[3].y = bb.LL.y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9wlzvfxuhvsgkkq6lvlrw01d2"); // if (flip) { UNSUPPORTED("bbuxsg26kpzb2fl660hjri9l8"); // int i; UNSUPPORTED("5d0rjolqhmqfhdts46h273pw"); // for (i = 0; i < 4; i++) { UNSUPPORTED("9dpwe8ucpbv8y180jmvfjohj0"); // double tmp = pts[i].y; UNSUPPORTED("8nsyib2abbayywi8ydtyfrh1w"); // pts[i].y = pts[i].x; UNSUPPORTED("e2stbhhso88rb6d0bps3wesbm"); // pts[i].x = -tmp; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7f2x9i3stjkwyki8jhp8g4crp // static int store (segment_t* seg, int first, pointf* pts) public static Object store(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("ck5s10q08ha996jg1dthuj4gz"); // store (segment_t* seg, int first, pointf* pts) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6a67ll1vnp0gczc7sdxxm0eus"); // int i, last = first + 4 - 1; UNSUPPORTED("cp0v943eklkgtfrjyj59exkgj"); // int j = 0; UNSUPPORTED("32ltq51ztqu722sxfo74u4mtw"); // for (i = first; i <= last; i++, j++) { UNSUPPORTED("79puvan9sro080fsgrgz2t2q7"); // if (i == first) { UNSUPPORTED("64r4m4ormvokugbo70tnvjx5m"); // seg[i].next = first+1; UNSUPPORTED("1dm0tna3ay2sbc2yaliye2bse"); // seg[i].prev = last; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6cjbyd0qmosdne3p1e7cmt94k"); // else if (i == last) { UNSUPPORTED("eanh96xgpeo6woibzznfh0wbv"); // seg[i].next = first; UNSUPPORTED("9dcogmtm6yucs0hqvurnlvd8c"); // seg[i].prev = last-1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("2n6qylkakd0eh8qirmanhkqv6"); // seg[i].next = i+1; UNSUPPORTED("e074ljxriocjv010xtqimpe82"); // seg[i].prev = i-1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5n6eo7o5v5jxlkoan6t7rxrs6"); // seg[i].is_inserted = 0; UNSUPPORTED("8boueifn4zp07ophbsfll1c4j"); // seg[seg[i].prev].v1 = seg[i].v0 = pts[j]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2fba7o4mz0g2iwmw1tsdmnyeq"); // return (last+1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 86pkmn254w4mzlbm1tvtj0utl // static void genSegments (cell* cells, int ncells, boxf bb, segment_t* seg, int flip) public static Object genSegments(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("1kvuie0el6g2uqdy7kissygr5"); // genSegments (cell* cells, int ncells, boxf bb, segment_t* seg, int flip) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("brjd2xw92qki6azgl484qbcab"); // int j = 0, i = 1; UNSUPPORTED("d8sp6cfkpfyndzmid92shiq50"); // pointf pts[4]; UNSUPPORTED("599xkip8oct4w8qnqgosguvxf"); // convert (bb, flip, 1, pts); UNSUPPORTED("2ukjeetspuv54livez9siabr3"); // i = store (seg, i, pts); UNSUPPORTED("c0t3vyjxjf53cre3fnsjl1zct"); // for (j = 0; j < ncells; j++) { UNSUPPORTED("nnyfz2s31gezrnoj0r6t3c7e"); // convert (cells[j].bb, flip, 0, pts); UNSUPPORTED("dtkvdb642xk2z42q0cqxa8cuw"); // i = store (seg, i, pts); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 adiv3g0l2lfgmsrp6nszkbu7e // static void generateRandomOrdering(int n, int* permute) public static Object generateRandomOrdering(Object... arg) { UNSUPPORTED("59dl3yc4jbcy2pb7j1njhlybi"); // static void UNSUPPORTED("bayg75oypsrrhfr1fn4t44xzq"); // generateRandomOrdering(int n, int* permute) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dbbxghj26zogt3ririv6d35rx"); // int i, j, tmp; UNSUPPORTED("bm4rxb9avtrlnwyqnenc25krj"); // for (i = 0; i <= n; i++) permute[i] = i; UNSUPPORTED("8m819riue7hsq2j2p8vn2ssb5"); // for (i = 1; i <= n; i++) { UNSUPPORTED("2kwf0aqv8qsg7rp5zguz8rp9a"); // j = i + drand48() * (n + 1 - i); UNSUPPORTED("7d04842291lql0mh7uyxlrdk5"); // if (j != i) { UNSUPPORTED("9c8awz319ebq9x0wpxjy3vdr6"); // tmp = permute[i]; UNSUPPORTED("9tz2w7jz6snz46csphfzc6j1r"); // permute [i] = permute[j]; UNSUPPORTED("c274z0kj80nfnoqb077lr9e5w"); // permute [j] = tmp; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 abhkjog92vle0cw28y59cd6ny // static int inside_polygon (trap_t *t, segment_t* seg) public static Object inside_polygon(Object... arg) { UNSUPPORTED("d9cz56vtrl0ri6hz88cumukuf"); // static int UNSUPPORTED("5e3r7cxnwod76fm476ejisqjs"); // inside_polygon (trap_t *t, segment_t* seg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1iqmfrt5wo4mwmshecxpdfpa9"); // int rseg = t->rseg; UNSUPPORTED("dxnx57i2vw0o7ngs9bgwpet6"); // if (t->state == 2) UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("ciw4dstxif0s9rksfu13tmxi1"); // if ((t->lseg <= 0) || (t->rseg <= 0)) UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("ea7zf31094dwtjf2dzluky008"); // if (((t->u0 <= 0) && (t->u1 <= 0)) || UNSUPPORTED("e15aszibtu1esr9cm5ddq9d5u"); // ((t->d0 <= 0) && (t->d1 <= 0))) /* triangle */ UNSUPPORTED("be5gm064ul8v8gm34w7hgonoj"); // return ((((&seg[rseg].v1)->y > (&seg[rseg].v0)->y + 1.0e-7) ? NOT(0) : (((&seg[rseg].v1)->y < (&seg[rseg].v0)->y - 1.0e-7) ? 0 : ((&seg[rseg].v1)->x > (&seg[rseg].v0)->x)))); UNSUPPORTED("bid671dovx1rdiquw5vm3fttj"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ew088xpoj2s831ch0zbnz5elx // static double get_angle (pointf *vp0, pointf *vpnext, pointf *vp1) public static Object get_angle(Object... arg) { UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double UNSUPPORTED("dahlnw9xplc13ehv56akxp6fe"); // get_angle (pointf *vp0, pointf *vpnext, pointf *vp1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("369yvcclaxnouso7vjmxhcz1l"); // pointf v0, v1; UNSUPPORTED("941ut9wx36d2re4xt7vn0stim"); // v0.x = vpnext->x - vp0->x; UNSUPPORTED("7dfsrn98hfr6a80nms62qv9dy"); // v0.y = vpnext->y - vp0->y; UNSUPPORTED("eholvtx37o5y2d1638yxn6v24"); // v1.x = vp1->x - vp0->x; UNSUPPORTED("9967xssda33wyljha7pewt4mk"); // v1.y = vp1->y - vp0->y; UNSUPPORTED("j9n4bua0t2z6uqjun1rcultc"); // if (((v0).x * (v1).y - (v1).x * (v0).y) >= 0) /* sine is positive */ UNSUPPORTED("cf3rdnuyrr7l7ewade7a57djr"); // return ((v0).x * (v1).x + (v0).y * (v1).y)/(sqrt((v0).x * (v0).x + (v0).y * (v0).y))/(sqrt((v1).x * (v1).x + (v1).y * (v1).y)); UNSUPPORTED("8983svt6g1kt3l45bd6ju9mw6"); // else UNSUPPORTED("b8d4rpcuwbgggvigw19cs3pz3"); // return (-1.0 * ((v0).x * (v1).x + (v0).y * (v1).y)/(sqrt((v0).x * (v0).x + (v0).y * (v0).y))/(sqrt((v1).x * (v1).x + (v1).y * (v1).y)) - 2); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7gi4ub1tqpupq617koabfz9iy // static int get_vertex_positions (int v0, int v1, int *ip, int *iq) public static Object get_vertex_positions(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("86uczcsl4cyu14zme5scqmswu"); // get_vertex_positions (int v0, int v1, int *ip, int *iq) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("en82orb21pn5f2w6hxc0pmi6r"); // vertexchain_t *vp0, *vp1; UNSUPPORTED("9cyat6ft4tmgpumn70l9fwydy"); // register int i; UNSUPPORTED("55a7kpuxgq6hsi6ljkbdivg16"); // double angle, temp; UNSUPPORTED("bjekmi3f789xf2g33a7v1marm"); // int tp, tq; UNSUPPORTED("6v6uklf23950dew0q3vlmjmtu"); // vp0 = &vert[v0]; UNSUPPORTED("e6h7hqx9nzufu0i4o6xctjri6"); // vp1 = &vert[v1]; UNSUPPORTED("ety4qtnzh8rpooitlhb64ufil"); // /* p is identified as follows. Scan from (v0, v1) rightwards till */ UNSUPPORTED("9em6bl9ikz3uv4t3tpkdoxeb9"); // /* you hit the first segment starting from v0. That chain is the */ UNSUPPORTED("17iufy6n7vezx6qpdhhsc8zvy"); // /* chain of our interest */ UNSUPPORTED("zq0nk6k4owgwciv5sc0z95vf"); // angle = -4.0; UNSUPPORTED("2d2pdjjgu969q63zrkykinxdb"); // for (i = 0; i < 4; i++) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("aiwx3n6xiaje2wbcw9fja0kp6"); // if (vp0->vnext[i] <= 0) UNSUPPORTED("6hzbngzom80qdcr88vnds1r59"); // continue; UNSUPPORTED("2qqqfeckj323vggxs72i2b9bd"); // if ((temp = get_angle(&vp0->pt, &(vert[vp0->vnext[i]].pt), UNSUPPORTED("bfendrzuwv7ttibwlfxnzh3mv"); // &vp1->pt)) > angle) UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("d5mp4kdylwkyngcbi2ra9gda7"); // angle = temp; UNSUPPORTED("8gf4rptcek1rtsswxgp4f5sp"); // tp = i; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("29ch4xe4dtb8vrs3u6br7fkfn"); // *ip = tp; UNSUPPORTED("449uwiujph9yz1kmgp91x1mph"); // /* Do similar actions for q */ UNSUPPORTED("zq0nk6k4owgwciv5sc0z95vf"); // angle = -4.0; UNSUPPORTED("2d2pdjjgu969q63zrkykinxdb"); // for (i = 0; i < 4; i++) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("6utzp015ebcuvv226lur8xqjn"); // if (vp1->vnext[i] <= 0) UNSUPPORTED("6u4qfk9ctif0s5v6pg2ym2kh0"); // continue; UNSUPPORTED("4qeaopyujc1p8ghdkrfs8swg1"); // if ((temp = get_angle(&vp1->pt, &(vert[vp1->vnext[i]].pt), UNSUPPORTED("6d1kzaf50kwdnqztg4frxwh8t"); // &vp0->pt)) > angle) UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("d5mp4kdylwkyngcbi2ra9gda7"); // angle = temp; UNSUPPORTED("5ksmrx85xq93zau95l8v9vcve"); // tq = i; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8xqnxp3votu03cx1jrh2jwkzn"); // *iq = tq; UNSUPPORTED("bid671dovx1rdiquw5vm3fttj"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9a6v0rhhqdmefbgzi11be5g6h // static int make_new_monotone_poly (int mcur, int v0, int v1) public static Object make_new_monotone_poly(Object... arg) { UNSUPPORTED("d9cz56vtrl0ri6hz88cumukuf"); // static int UNSUPPORTED("8dv9txhv2yeoqkzbydeqjl054"); // make_new_monotone_poly (int mcur, int v0, int v1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9ikjwwfx33ts34kb25fa7bc2l"); // int p, q, ip, iq; UNSUPPORTED("9j34whh433i14tkn8pbaxw6gh"); // int mnew = (++mon_idx); UNSUPPORTED("56fxdenx5fitvdwopxm5znugu"); // int i, j, nf0, nf1; UNSUPPORTED("en82orb21pn5f2w6hxc0pmi6r"); // vertexchain_t *vp0, *vp1; UNSUPPORTED("6v6uklf23950dew0q3vlmjmtu"); // vp0 = &vert[v0]; UNSUPPORTED("e6h7hqx9nzufu0i4o6xctjri6"); // vp1 = &vert[v1]; UNSUPPORTED("alqs5f8e3n3u5onl2jk7dufp7"); // get_vertex_positions(v0, v1, &ip, &iq); UNSUPPORTED("2hakm8lo9g5t2j1ag9nyr2s6n"); // p = vp0->vpos[ip]; UNSUPPORTED("9cggg3kyqycbmj88qwiid1uar"); // q = vp1->vpos[iq]; UNSUPPORTED("3rkbxqt4po5kl0o0mduct8rcc"); // /* At this stage, we have got the positions of v0 and v1 in the */ UNSUPPORTED("c8605sg6k4m4718ch7un7l4n0"); // /* desired chain. Now modify the linked lists */ UNSUPPORTED("h85pxdzzlj05gngtc6052x5l"); // i = (++chain_idx); /* for the new list */ UNSUPPORTED("eowz6d0op1t6t0njrx6bb0yn8"); // j = (++chain_idx); UNSUPPORTED("dn6hlugxl248e01l7ox4q9u8w"); // mchain[i].vnum = v0; UNSUPPORTED("cbym1az3wmxvz10xvo5c25vlp"); // mchain[j].vnum = v1; UNSUPPORTED("3xenn6wt1u82649f6st1y0jpy"); // mchain[i].next = mchain[p].next; UNSUPPORTED("8gj5lqet3v2djl0zzmduxhjbo"); // mchain[mchain[p].next].prev = i; UNSUPPORTED("8jwcwnyjn22k8hwa6snhelhdv"); // mchain[i].prev = j; UNSUPPORTED("e8e675obna2uq1ayo5j6qxb3c"); // mchain[j].next = i; UNSUPPORTED("249azfk4cx6fvn29okrr43mxg"); // mchain[j].prev = mchain[q].prev; UNSUPPORTED("1ejluvyey6e0j7029btn2imcn"); // mchain[mchain[q].prev].next = j; UNSUPPORTED("d1hgtt0rm4nozlb8yt6pa0k8q"); // mchain[p].next = q; UNSUPPORTED("c8s9isar38c8ee9yj9szqdh2j"); // mchain[q].prev = p; UNSUPPORTED("42hpz0zje3mclnj3dro8ypwml"); // nf0 = vp0->nextfree; UNSUPPORTED("3vhonm18vr4ry7uanlxdzsa78"); // nf1 = vp1->nextfree; UNSUPPORTED("dikgb6wf4n9mffboqek4g7min"); // vp0->vnext[ip] = v1; UNSUPPORTED("dcc84n7kvdgludx7het4l77pa"); // vp0->vpos[nf0] = i; UNSUPPORTED("bn2d4dxs38on2tt66qsk854a7"); // vp0->vnext[nf0] = mchain[mchain[i].next].vnum; UNSUPPORTED("s8g0h9c5ugu7jx7fammu57j5"); // vp1->vpos[nf1] = j; UNSUPPORTED("2cfbu34obnbyi820v423b3p3a"); // vp1->vnext[nf1] = v0; UNSUPPORTED("18ghn7twlfq25wg7ho4mdpjq5"); // vp0->nextfree++; UNSUPPORTED("6pibe6i58ps0evcw0elchlr5n"); // vp1->nextfree++; UNSUPPORTED("8ofsl1uexufhfiekbia3rpw71"); // mon[mcur] = p; UNSUPPORTED("6qcylzq69scx8z47rc3q53c2p"); // mon[mnew] = i; UNSUPPORTED("1txsom7ht7w6bgk1wfyx8lsst"); // return mnew; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d0so1zakha0q0j27n2kdrpttw // static int traverse_polygon (int* visited, boxf* decomp, int size, segment_t* seg, trap_t* tr, int mcur, int trnum, int from, int flip, int dir) public static Object traverse_polygon(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("9guvbji3t13b64dg1nyaopea3"); // traverse_polygon (int* visited, boxf* decomp, int size, segment_t* seg, trap_t* tr, UNSUPPORTED("cop1jvb6sbgiafrugdgcuyww8"); // int mcur, int trnum, int from, int flip, int dir) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9hip0zrehch3ppd50n93ndz9f"); // trap_t *t = &tr[trnum]; UNSUPPORTED("9vw5pneq9i40hijbn87i6muzw"); // int mnew; UNSUPPORTED("4by94oz8hw5ksrudixtwwrdjt"); // int v0, v1; UNSUPPORTED("4d0metbv0f36rcwe2dlscspik"); // int retval; UNSUPPORTED("6b0tp7olw8su1dlt9r0409joh"); // int do_switch = 0; UNSUPPORTED("d0q9pab7nbe8xr6dncj1rkglj"); // if ((trnum <= 0) || visited[trnum]) UNSUPPORTED("5fnyq1zql95vx5xiysa7fj12a"); // return size; UNSUPPORTED("cnabgqf0r6cwbefc6z48v4muv"); // visited[trnum] = NOT(0); UNSUPPORTED("e3779kj7w5dz1oy9qmxmrgv6x"); // if ((t->hi.y > t->lo.y) && UNSUPPORTED("1bkd7ej5xoxkn9w9yngm73in6"); // (seg[t->lseg].v0.x == seg[t->lseg].v1.x) && UNSUPPORTED("6dhg0j2967gtz8tbuf2fkmvte"); // (seg[t->rseg].v0.x == seg[t->rseg].v1.x)) { UNSUPPORTED("cegqs3fbxpy1vh6ttghu2haol"); // if (flip) { UNSUPPORTED("6uelhwb8drf4b6q5ru2myp9gr"); // decomp[size].LL.x = t->lo.y; UNSUPPORTED("3ie5nszkp1w8ls6i09xu2kj58"); // decomp[size].LL.y = -seg[t->rseg].v0.x; UNSUPPORTED("61vo1z771fo68sucys7bs0ijk"); // decomp[size].UR.x = t->hi.y; UNSUPPORTED("a9grvoswejyt77ctdmsonk0qt"); // decomp[size].UR.y = -seg[t->lseg].v0.x; UNSUPPORTED("yjgjo2sxpmhb7skgxwjx03ie"); // } else { UNSUPPORTED("8ruo1j70pzrg494vp86s1sqc"); // decomp[size].LL.x = seg[t->lseg].v0.x; UNSUPPORTED("6mj48zie12c6x3u7xea2f8hr3"); // decomp[size].LL.y = t->lo.y; UNSUPPORTED("39hkdsjwkvofrh735gqoi7dci"); // decomp[size].UR.x = seg[t->rseg].v0.x; UNSUPPORTED("1bjhgfi5s9y6kuu4xguq9bd20"); // decomp[size].UR.y = t->hi.y; UNSUPPORTED("dquo3qofk56ds5xl95lhvcthf"); // } UNSUPPORTED("cy8kzhvb0obp7jgom47s7zco9"); // size++; UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("8xva2s9wcuidd7mlvpytarai8"); // /* We have much more information available here. */ UNSUPPORTED("zp53t0r52m3c9e801jgb0anx"); // /* rseg: goes upwards */ UNSUPPORTED("2a7sgu699nkxh3e7rs42nslze"); // /* lseg: goes downwards */ UNSUPPORTED("bspvkvr3shhnvq13d1c9svgc8"); // /* Initially assume that dir = TR_FROM_DN (from the left) */ UNSUPPORTED("859erkm7vifnaeylhrg1ge489"); // /* Switch v0 and v1 if necessary afterwards */ UNSUPPORTED("7nenieaup2bo7wznju50124gu"); // /* special cases for triangles with cusps at the opposite ends. */ UNSUPPORTED("2f72rdf12bkur0sb8jzt141et"); // /* take care of this first */ UNSUPPORTED("ark0tbg2u4lksur0hn1thlg8u"); // if ((t->u0 <= 0) && (t->u1 <= 0)) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("2gky1sit45s3urap7m9572dui"); // if ((t->d0 > 0) && (t->d1 > 0)) /* downward opening triangle */ UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("a7q0c7q3zwi84dk8feu8hw949"); // v0 = tr[t->d1].lseg; UNSUPPORTED("3un92nsknf6dvivoo4ut6xpjw"); // v1 = t->lseg; UNSUPPORTED("b9sp6domcray594tb7rq7599"); // if (from == t->d1) UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("9b48jw83n2qlbd27xuf69c5qe"); // do_switch = NOT(0); UNSUPPORTED("7dchvr9xk6f4wwi83audzw6vj"); // mnew = make_new_monotone_poly(mcur, v1, v0); UNSUPPORTED("4mo16xjesdvkqcrs3j9pw6rb6"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1); UNSUPPORTED("dtlg30b72ms08kp03lb2akq3r"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // else UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("5ente0j9qdx8ibzrosxtyl4nv"); // mnew = make_new_monotone_poly(mcur, v0, v1); UNSUPPORTED("3r3k4encoopl3sdf3f1ozjqhk"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1); UNSUPPORTED("1zydelpskydrv2jlukrghxjqm"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e2koj2xocq76awegpydpyu62m"); // else UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("d1qk9y23kl78admhc396jcrkj"); // retval = -1; /* Just traverse all neighbours */ UNSUPPORTED("55rfugj7cpg4mi8oc5lwm9ve9"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2); UNSUPPORTED("7n2ov6zceqcw0j8pmeiz8hn4s"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2); UNSUPPORTED("e1jcx0tbalqyelsxssbh3lmt6"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1); UNSUPPORTED("4me7fmwngeaircvtb7sff3ijj"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("biibbejkkn6y2hgp4rbkzlt63"); // else if ((t->d0 <= 0) && (t->d1 <= 0)) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("co9cdjh0zss1ce6wn5hsovb4o"); // if ((t->u0 > 0) && (t->u1 > 0)) /* upward opening triangle */ UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("608hye0unh62kxu73xjcim0vg"); // v0 = t->rseg; UNSUPPORTED("997u5iufydhu5b83stykxqi4s"); // v1 = tr[t->u0].rseg; UNSUPPORTED("5pqs6tn54r9kjjuv7noh9n97t"); // if (from == t->u1) UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("9b48jw83n2qlbd27xuf69c5qe"); // do_switch = NOT(0); UNSUPPORTED("7dchvr9xk6f4wwi83audzw6vj"); // mnew = make_new_monotone_poly(mcur, v1, v0); UNSUPPORTED("c0yxgwq7qw8py1stvijtw9ut3"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2); UNSUPPORTED("et6qmwrb429cnthwmphempxu0"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // else UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("5ente0j9qdx8ibzrosxtyl4nv"); // mnew = make_new_monotone_poly(mcur, v0, v1); UNSUPPORTED("bxugslyfkclt3755mhv0sc3ht"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2); UNSUPPORTED("64qq66m1iccqslv5wour58853"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e2koj2xocq76awegpydpyu62m"); // else UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("d1qk9y23kl78admhc396jcrkj"); // retval = -1; /* Just traverse all neighbours */ UNSUPPORTED("55rfugj7cpg4mi8oc5lwm9ve9"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2); UNSUPPORTED("7n2ov6zceqcw0j8pmeiz8hn4s"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2); UNSUPPORTED("e1jcx0tbalqyelsxssbh3lmt6"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1); UNSUPPORTED("4me7fmwngeaircvtb7sff3ijj"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1izitiatr2ulhvy8h0pnsxiiz"); // else if ((t->u0 > 0) && (t->u1 > 0)) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("5pvgc5lzsbemakfagmdy8onnt"); // if ((t->d0 > 0) && (t->d1 > 0)) /* downward + upward cusps */ UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("a7q0c7q3zwi84dk8feu8hw949"); // v0 = tr[t->d1].lseg; UNSUPPORTED("997u5iufydhu5b83stykxqi4s"); // v1 = tr[t->u0].rseg; UNSUPPORTED("3oejl3ub1rc10j9jmx94a30sw"); // retval = 3; UNSUPPORTED("cpjixbghid2v2ttmi1omjq4df"); // if (((dir == 2) && (t->d1 == from)) || UNSUPPORTED("1vtjp034u1x48uhzu2jvmh0ek"); // ((dir == 1) && (t->u1 == from))) UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("9b48jw83n2qlbd27xuf69c5qe"); // do_switch = NOT(0); UNSUPPORTED("7dchvr9xk6f4wwi83audzw6vj"); // mnew = make_new_monotone_poly(mcur, v1, v0); UNSUPPORTED("c0yxgwq7qw8py1stvijtw9ut3"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2); UNSUPPORTED("4mo16xjesdvkqcrs3j9pw6rb6"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1); UNSUPPORTED("bwjfea2e7yj2tyyhz2fj73xub"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2); UNSUPPORTED("c6tug0v8jlllvmf2nw412i7az"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // else UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("5ente0j9qdx8ibzrosxtyl4nv"); // mnew = make_new_monotone_poly(mcur, v0, v1); UNSUPPORTED("bxugslyfkclt3755mhv0sc3ht"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2); UNSUPPORTED("3r3k4encoopl3sdf3f1ozjqhk"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1); UNSUPPORTED("64qq66m1iccqslv5wour58853"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2); UNSUPPORTED("b00fn0czpty1ag5ihw9ev67k9"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7vbb8vznij9zlyolu6orgzq63"); // else /* only downward cusp */ UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("8a5njs108pwwsicxpr9cp011e"); // if (((fabs((&t->lo)->y - (&seg[t->lseg].v1)->y) <= 1.0e-7) && (fabs((&t->lo)->x - (&seg[t->lseg].v1)->x) <= 1.0e-7))) UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("iq55fez7l08t1doqy34awci0"); // v0 = tr[t->u0].rseg; UNSUPPORTED("6dqmuhbse549xc7nbc1t4fi8c"); // v1 = seg[t->lseg].next; UNSUPPORTED("3o1isg154krcrahue9rgdvzzv"); // retval = 4; UNSUPPORTED("ct1dz4hcovsoo7o89yuv4jqaj"); // if ((dir == 1) && (t->u0 == from)) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("747hebbjlsz3afhysgh8jddh3"); // do_switch = NOT(0); UNSUPPORTED("a63etqdmntd8mnuuuuq2iv8uk"); // mnew = make_new_monotone_poly(mcur, v1, v0); UNSUPPORTED("e78lvv8zmyhisqei55jg0b5ow"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2); UNSUPPORTED("dspgt98nlpx18w318d5b65jdf"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1); UNSUPPORTED("8321g7cqx5few6bc5d8ltrpbu"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2); UNSUPPORTED("9vnwz4c8xw8z1762jvr65pidr"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // else UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("6tnv93tybou8dnl9l7lcmyp50"); // mnew = make_new_monotone_poly(mcur, v0, v1); UNSUPPORTED("66azwpktshnoqv46ag8h77g8h"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2); UNSUPPORTED("el7cvlcafkwitwo8t66cutvmj"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1); UNSUPPORTED("ck5jclcux876638ifzrabja6c"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1); UNSUPPORTED("6vtwa1ilotojo4dxm38prhhb6"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // else UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("7mcbwj8a2veib26ww67v0xayb"); // v0 = t->rseg; UNSUPPORTED("el138o2v6si9fi54s9rho23kj"); // v1 = tr[t->u0].rseg; UNSUPPORTED("cdlggb241g5t55g6npu51bhjo"); // retval = 5; UNSUPPORTED("5jw5gn3xil0quizho5x17qzin"); // if ((dir == 1) && (t->u1 == from)) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("747hebbjlsz3afhysgh8jddh3"); // do_switch = NOT(0); UNSUPPORTED("a63etqdmntd8mnuuuuq2iv8uk"); // mnew = make_new_monotone_poly(mcur, v1, v0); UNSUPPORTED("66azwpktshnoqv46ag8h77g8h"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2); UNSUPPORTED("9vnwz4c8xw8z1762jvr65pidr"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1); UNSUPPORTED("dspgt98nlpx18w318d5b65jdf"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1); UNSUPPORTED("6vtwa1ilotojo4dxm38prhhb6"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // else UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("6tnv93tybou8dnl9l7lcmyp50"); // mnew = make_new_monotone_poly(mcur, v0, v1); UNSUPPORTED("e78lvv8zmyhisqei55jg0b5ow"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2); UNSUPPORTED("el7cvlcafkwitwo8t66cutvmj"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1); UNSUPPORTED("ck5jclcux876638ifzrabja6c"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1); UNSUPPORTED("8321g7cqx5few6bc5d8ltrpbu"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8ql1l7nv15rr51xt5ty1sjycw"); // else if ((t->u0 > 0) || (t->u1 > 0)) /* no downward cusp */ UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("duzxgn403jzqn6d6ut3gz298t"); // if ((t->d0 > 0) && (t->d1 > 0)) /* only upward cusp */ UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("4xbxe3o8leve6xm0t19ee2vfe"); // if (((fabs((&t->hi)->y - (&seg[t->lseg].v0)->y) <= 1.0e-7) && (fabs((&t->hi)->x - (&seg[t->lseg].v0)->x) <= 1.0e-7))) UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("ddiuyd0k6l4ju7yt0t7gnkyn2"); // v0 = tr[t->d1].lseg; UNSUPPORTED("3xgnfxeseit96nt2oywbb12cm"); // v1 = t->lseg; UNSUPPORTED("612bonw6ququtpyb2otlknu6u"); // retval = 6; UNSUPPORTED("52c1b8vw0ww4s2y1fp9e5rjxt"); // if (!((dir == 2) && (t->d0 == from))) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("747hebbjlsz3afhysgh8jddh3"); // do_switch = NOT(0); UNSUPPORTED("a63etqdmntd8mnuuuuq2iv8uk"); // mnew = make_new_monotone_poly(mcur, v1, v0); UNSUPPORTED("66azwpktshnoqv46ag8h77g8h"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2); UNSUPPORTED("ck5jclcux876638ifzrabja6c"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1); UNSUPPORTED("e78lvv8zmyhisqei55jg0b5ow"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2); UNSUPPORTED("dspgt98nlpx18w318d5b65jdf"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // else UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("6tnv93tybou8dnl9l7lcmyp50"); // mnew = make_new_monotone_poly(mcur, v0, v1); UNSUPPORTED("el7cvlcafkwitwo8t66cutvmj"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1); UNSUPPORTED("6vtwa1ilotojo4dxm38prhhb6"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2); UNSUPPORTED("8321g7cqx5few6bc5d8ltrpbu"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2); UNSUPPORTED("5yk6sndya5s45z9fap3jlftsv"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // else UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("ddiuyd0k6l4ju7yt0t7gnkyn2"); // v0 = tr[t->d1].lseg; UNSUPPORTED("7wup2u127p4wprrhd2g65hvf6"); // v1 = seg[t->rseg].next; UNSUPPORTED("6ywwmc78aiixut85yk4dr53yx"); // retval = 7; UNSUPPORTED("ayjr7wdfuvpw08o3v1x8gwrxn"); // if ((dir == 2) && (t->d1 == from)) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("747hebbjlsz3afhysgh8jddh3"); // do_switch = NOT(0); UNSUPPORTED("a63etqdmntd8mnuuuuq2iv8uk"); // mnew = make_new_monotone_poly(mcur, v1, v0); UNSUPPORTED("ck5jclcux876638ifzrabja6c"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1); UNSUPPORTED("8321g7cqx5few6bc5d8ltrpbu"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2); UNSUPPORTED("6vtwa1ilotojo4dxm38prhhb6"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2); UNSUPPORTED("dspgt98nlpx18w318d5b65jdf"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // else UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("6tnv93tybou8dnl9l7lcmyp50"); // mnew = make_new_monotone_poly(mcur, v0, v1); UNSUPPORTED("e78lvv8zmyhisqei55jg0b5ow"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2); UNSUPPORTED("el7cvlcafkwitwo8t66cutvmj"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1); UNSUPPORTED("66azwpktshnoqv46ag8h77g8h"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2); UNSUPPORTED("9vnwz4c8xw8z1762jvr65pidr"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cs5d2p3v6x67knxt079180lf1"); // else /* no cusp */ UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("u3jb6lmd4ip7tq4edphxoy2z"); // if (((fabs((&t->hi)->y - (&seg[t->lseg].v0)->y) <= 1.0e-7) && (fabs((&t->hi)->x - (&seg[t->lseg].v0)->x) <= 1.0e-7)) && UNSUPPORTED("8hbx4q52b68r4izus3j4ewijg"); // ((fabs((&t->lo)->y - (&seg[t->rseg].v0)->y) <= 1.0e-7) && (fabs((&t->lo)->x - (&seg[t->rseg].v0)->x) <= 1.0e-7))) UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("7mcbwj8a2veib26ww67v0xayb"); // v0 = t->rseg; UNSUPPORTED("3xgnfxeseit96nt2oywbb12cm"); // v1 = t->lseg; UNSUPPORTED("cj0s3n96u7e6tq1nzlxp8a7gv"); // retval = 2; UNSUPPORTED("azgs71ez0f45idcd7u0uhjkz4"); // if (dir == 1) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("747hebbjlsz3afhysgh8jddh3"); // do_switch = NOT(0); UNSUPPORTED("a63etqdmntd8mnuuuuq2iv8uk"); // mnew = make_new_monotone_poly(mcur, v1, v0); UNSUPPORTED("e78lvv8zmyhisqei55jg0b5ow"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2); UNSUPPORTED("66azwpktshnoqv46ag8h77g8h"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2); UNSUPPORTED("9vnwz4c8xw8z1762jvr65pidr"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1); UNSUPPORTED("dspgt98nlpx18w318d5b65jdf"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // else UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("6tnv93tybou8dnl9l7lcmyp50"); // mnew = make_new_monotone_poly(mcur, v0, v1); UNSUPPORTED("ck5jclcux876638ifzrabja6c"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1); UNSUPPORTED("el7cvlcafkwitwo8t66cutvmj"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1); UNSUPPORTED("6vtwa1ilotojo4dxm38prhhb6"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2); UNSUPPORTED("8321g7cqx5few6bc5d8ltrpbu"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("30bq1zitecexyibeos8lcz9ms"); // else if (((fabs((&t->hi)->y - (&seg[t->rseg].v1)->y) <= 1.0e-7) && (fabs((&t->hi)->x - (&seg[t->rseg].v1)->x) <= 1.0e-7)) && UNSUPPORTED("7fm0u4okmm25vcrbk21uccbkf"); // ((fabs((&t->lo)->y - (&seg[t->lseg].v1)->y) <= 1.0e-7) && (fabs((&t->lo)->x - (&seg[t->lseg].v1)->x) <= 1.0e-7))) UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("8e5yhelccmj6n8d33ziozi9ej"); // v0 = seg[t->rseg].next; UNSUPPORTED("6dqmuhbse549xc7nbc1t4fi8c"); // v1 = seg[t->lseg].next; UNSUPPORTED("eh17urgk88bfnpryw1evbojlf"); // retval = 1; UNSUPPORTED("azgs71ez0f45idcd7u0uhjkz4"); // if (dir == 1) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("747hebbjlsz3afhysgh8jddh3"); // do_switch = NOT(0); UNSUPPORTED("a63etqdmntd8mnuuuuq2iv8uk"); // mnew = make_new_monotone_poly(mcur, v1, v0); UNSUPPORTED("e78lvv8zmyhisqei55jg0b5ow"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2); UNSUPPORTED("66azwpktshnoqv46ag8h77g8h"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2); UNSUPPORTED("9vnwz4c8xw8z1762jvr65pidr"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d1, trnum, flip, 1); UNSUPPORTED("dspgt98nlpx18w318d5b65jdf"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->d0, trnum, flip, 1); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // else UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("6tnv93tybou8dnl9l7lcmyp50"); // mnew = make_new_monotone_poly(mcur, v0, v1); UNSUPPORTED("ck5jclcux876638ifzrabja6c"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1); UNSUPPORTED("el7cvlcafkwitwo8t66cutvmj"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1); UNSUPPORTED("6vtwa1ilotojo4dxm38prhhb6"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u0, trnum, flip, 2); UNSUPPORTED("8321g7cqx5few6bc5d8ltrpbu"); // size = traverse_polygon (visited, decomp, size, seg, tr, mnew, t->u1, trnum, flip, 2); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4i2amsjqesppq3lp9vpmv7r4r"); // else /* no split possible */ UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("a4ghaevttvkkfms2dhd4j26pc"); // retval = -1; UNSUPPORTED("bxugslyfkclt3755mhv0sc3ht"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u0, trnum, flip, 2); UNSUPPORTED("3r3k4encoopl3sdf3f1ozjqhk"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d0, trnum, flip, 1); UNSUPPORTED("c0yxgwq7qw8py1stvijtw9ut3"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->u1, trnum, flip, 2); UNSUPPORTED("3ypcbrw5a964vz3dszjca8xvw"); // size = traverse_polygon (visited, decomp, size, seg, tr, mcur, t->d1, trnum, flip, 1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8mmoka8dpm06e00j83nvx2wfc"); // return size; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1q5h2go20arrwvxkwi1dpllun // static int monotonate_trapezoids(int nsegs, segment_t*seg, trap_t* tr, int flip, boxf* decomp) public static Object monotonate_trapezoids(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("4st5re5qeun3fazm6nwtr2504"); // monotonate_trapezoids(int nsegs, segment_t*seg, trap_t* tr, UNSUPPORTED("3gqslrg5hqigs6bb03nagwbax"); // int flip, boxf* decomp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9v0t4zzai4k1kr9wu7yirdcca"); // int i, size; UNSUPPORTED("2axop7sy1z49z2ga4o3phveq3"); // int tr_start; UNSUPPORTED("403dbgvseikvuaz19wa8ka871"); // int tr_size = (5*(nsegs)+1); UNSUPPORTED("5l974t0r35h6lgions7zrfr9n"); // int* visited = (int*)zmalloc((tr_size)*sizeof(int)); UNSUPPORTED("8kbv1p0hl6a1jsb28mp9xizs6"); // mchain = (monchain_t*)zmalloc((tr_size)*sizeof(monchain_t)); UNSUPPORTED("50knp82hjjep106iokix8jayb"); // vert = (vertexchain_t*)zmalloc((nsegs+1)*sizeof(vertexchain_t)); UNSUPPORTED("3joe7zjof9jfs427j0nanppzg"); // mon = (int*)zmalloc((nsegs)*sizeof(int)); UNSUPPORTED("5stezg8pn70o9al2yeof9vbbm"); // /* First locate a trapezoid which lies inside the polygon */ UNSUPPORTED("clz63gofo9l9x4djgclagrdbl"); // /* and which is triangular */ UNSUPPORTED("bfkwyvnluov44fmf0ve0qc47b"); // for (i = 0; i < (5*(nsegs)+1); i++) UNSUPPORTED("3kwag0shsa1vlgnpfz2z52jad"); // if (inside_polygon(&tr[i], seg)) break; UNSUPPORTED("ebpi22p8d3ms6x8kif7wf849m"); // tr_start = i; UNSUPPORTED("80e8cmn8ppz1g34yart4h3guc"); // /* Initialise the mon data-structure and start spanning all the */ UNSUPPORTED("c288aziy4b5qyrm0inw81wpf"); // /* trapezoids within the polygon */ UNSUPPORTED("9qxeq136dyf2jnwd4bf1kuaq6"); // for (i = 1; i <= nsegs; i++) { UNSUPPORTED("9m9y60p6vbo7stjuyotwxb88s"); // mchain[i].prev = seg[i].prev; UNSUPPORTED("88ejlvwd7gy17hqrhragtc8zv"); // mchain[i].next = seg[i].next; UNSUPPORTED("cu3ie2h2ob81y8d5ebxfm56uj"); // mchain[i].vnum = i; UNSUPPORTED("9akiu4gv6b7q4t4v7jbvspe77"); // vert[i].pt = seg[i].v0; UNSUPPORTED("j6yppsuzqh4phhdx6t7chtp3"); // vert[i].vnext[0] = seg[i].next; /* next vertex */ UNSUPPORTED("avvt0stq2xxai7od20rqmnt4c"); // vert[i].vpos[0] = i; /* locn. of next vertex */ UNSUPPORTED("68bp8qgzocylz07fdkq761k61"); // vert[i].nextfree = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("50js3uabj113ezvs27yvc5zv5"); // chain_idx = nsegs; UNSUPPORTED("8ocywthfoxu2ckdm469ksnvdw"); // mon_idx = 0; UNSUPPORTED("36vw4fu4m3w15c4afhp1dgf7p"); // mon[0] = 1; /* position of any vertex in the first */ UNSUPPORTED("1gkcquzwnonqmlrklzwimth46"); // /* chain */ UNSUPPORTED("5mq8oebfg9zlu2dh458odwyza"); // /* traverse the polygon */ UNSUPPORTED("l12iv7r3oz1l157wkxev3k26"); // if (tr[tr_start].u0 > 0) UNSUPPORTED("ef00tkl3m246yucima83gjqry"); // size = traverse_polygon (visited, decomp, 0, seg, tr, 0, tr_start, tr[tr_start].u0, flip, 1); UNSUPPORTED("ek9ndv4cgpvv1ppq3o6hffjln"); // else if (tr[tr_start].d0 > 0) UNSUPPORTED("2phk6542w1awpzofg19twa9u3"); // size = traverse_polygon (visited, decomp, 0, seg, tr, 0, tr_start, tr[tr_start].d0, flip, 2); UNSUPPORTED("7p1upi5nlpk6oews5ejvqxzgq"); // free (visited); UNSUPPORTED("dyur1to2vops13ap1n0q7lsol"); // free (mchain); UNSUPPORTED("8pnrg51s1fq9cek6lwdi7795g"); // free (vert); UNSUPPORTED("d0yk4ad70j6la3tjcpwkdaqvf"); // free (mon); UNSUPPORTED("6vecslx1iges54gigd2bc6x6h"); // /* return the number of rects created */ UNSUPPORTED("8mmoka8dpm06e00j83nvx2wfc"); // return size; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7dl8o2typqtrtf964o8l9x9mn // static int rectIntersect (boxf *d, const boxf *r0, const boxf *r1) public static Object rectIntersect(Object... arg) { UNSUPPORTED("d9cz56vtrl0ri6hz88cumukuf"); // static int UNSUPPORTED("emzrn19dd9a1n8a75xt78ialj"); // rectIntersect (boxf *d, const boxf *r0, const boxf *r1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6wfj8onzmd4ihhh62dqfmqpbx"); // double t; UNSUPPORTED("10mg3ctpr0doly1xr4mn7m39v"); // t = (r0->LL.x > r1->LL.x) ? r0->LL.x : r1->LL.x; UNSUPPORTED("4q3ymg1fo2b29aomy5kba4o06"); // d->UR.x = (r0->UR.x < r1->UR.x) ? r0->UR.x : r1->UR.x; UNSUPPORTED("1muxzktb9b7cx05opqest2kf9"); // d->LL.x = t; UNSUPPORTED("qu5cb749o6mku5meyk7xzjiq"); // t = (r0->LL.y > r1->LL.y) ? r0->LL.y : r1->LL.y; UNSUPPORTED("3063iivbgzdi6hh53rsfr6o54"); // d->UR.y = (r0->UR.y < r1->UR.y) ? r0->UR.y : r1->UR.y; UNSUPPORTED("5at6mfpw5k8ldnmm0icvhnj8j"); // d->LL.y = t; UNSUPPORTED("upus29izwyyfylisn68yvdtv"); // if ((d->LL.x >= d->UR.x) || UNSUPPORTED("b45965pwcafgyy3hsxz3h3ywo"); // (d->LL.y >= d->UR.y)) UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 73fynz7ym6jvzqhvlj7evww7y // boxf* partition (cell* cells, int ncells, int* nrects, boxf bb) public static Object partition(Object... arg) { UNSUPPORTED("e6wfqaorm3eq04ew3viebrrmw"); // boxf* UNSUPPORTED("6tl2sd3xvb9xj27ba3ekerljs"); // partition (cell* cells, int ncells, int* nrects, boxf bb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5a9fu6e10ez4wfuzd6drz5wqj"); // int nsegs = 4*(ncells+1); UNSUPPORTED("8wy6s9fpdi1b5ozj26nvgi5k8"); // segment_t* segs = (segment_t*)gmalloc((nsegs+1)*sizeof(segment_t)); UNSUPPORTED("56aa5hinuuh4nm3lzmpzutm67"); // int* permute = (int*)zmalloc((nsegs+1)*sizeof(int)); UNSUPPORTED("79evy8eevd0rueiuu9nwedmmd"); // int hd_size, vd_size; UNSUPPORTED("377uv2ijmy274yxftumax5tc"); // int i, j, cnt = 0; UNSUPPORTED("aset1r6i7s8ess7vp2yh2hy3l"); // boxf* rs; UNSUPPORTED("bxa465e0rk3cso7kp0a5dkzjk"); // int ntraps = (5*(nsegs)+1); UNSUPPORTED("er46tt5i0x6c3jxkq7mwoku1i"); // trap_t* trs = (trap_t*)gmalloc((ntraps)*sizeof(trap_t)); UNSUPPORTED("afztmb3ryx5mnwhx57hubf04c"); // boxf* hor_decomp = (boxf*)zmalloc((ntraps)*sizeof(boxf)); UNSUPPORTED("57drcp2w6xycpft0alhizl1jb"); // boxf* vert_decomp = (boxf*)zmalloc((ntraps)*sizeof(boxf)); UNSUPPORTED("1k4qbp811phcxky1im1ceolu8"); // int nt; UNSUPPORTED("4x4e3wgmpgyp48r9d918kpji2"); // /* fprintf (stderr, "cells = %d segs = %d traps = %d\n", ncells, nsegs, ntraps); */ UNSUPPORTED("3aznlcy8m96vtolzl06u5su27"); // genSegments (cells, ncells, bb, segs, 0); UNSUPPORTED("cc0cvkd217k2gs1dd318mzfup"); // srand(173); UNSUPPORTED("1icg2pbsojr5i5uz47hr32q6g"); // generateRandomOrdering (nsegs, permute); UNSUPPORTED("diwoovfk15pa3cutfdespebi4"); // nt = construct_trapezoids(nsegs, segs, permute, ntraps, trs); UNSUPPORTED("9y24uilj6sd8c40w65qz24w28"); // /* fprintf (stderr, "hor traps = %d\n", nt); */ UNSUPPORTED("bywih9homfisgvn30fa9ylam6"); // hd_size = monotonate_trapezoids (nsegs, segs, trs, 0, hor_decomp); UNSUPPORTED("br66y4yenl0hukxxeblvw92wg"); // genSegments (cells, ncells, bb, segs, 1); UNSUPPORTED("1icg2pbsojr5i5uz47hr32q6g"); // generateRandomOrdering (nsegs, permute); UNSUPPORTED("diwoovfk15pa3cutfdespebi4"); // nt = construct_trapezoids(nsegs, segs, permute, ntraps, trs); UNSUPPORTED("nklu5u660tkq7hgg1skeyos0"); // /* fprintf (stderr, "ver traps = %d\n", nt); */ UNSUPPORTED("aan563s5w2u32ftofra38kc7f"); // vd_size = monotonate_trapezoids (nsegs, segs, trs, 1, vert_decomp); UNSUPPORTED("3tjm1uhdfv0fgkihdgxfbtp2k"); // rs = (boxf*)zmalloc((hd_size*vd_size)*sizeof(boxf)); UNSUPPORTED("1rg2b95x8evw81ge2jwloma9y"); // for (i=0; invs = n; UNSUPPORTED("8o0aimsmyrmbv62ryv7vejhv1"); // g->vertices = (vertex*)zmalloc((n)*sizeof(vertex)); UNSUPPORTED("dudyytiqbhk3xyognwkwx5tt1"); // for(i=0;ivertices[i].adj_list = openIntSet (); UNSUPPORTED("1anncbcbrd6gx9hlo6mg1ha7d"); // g->vertices[i].color = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2syri7q5tc0jyvwq8ecyfo3vr"); // return g; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5qv1mxxuhkzua2w2dqem19lny // void free_graph(rawgraph* g) public static Object free_graph(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("6cqftcuhpqak3hl5c518hyr4e"); // free_graph(rawgraph* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("31v9apskm8ur1w7f890v55btk"); // for(i=0;invs;i++) UNSUPPORTED("mfqz9m45ul5js6fnn03ol8j5"); // dtclose(g->vertices[i].adj_list); UNSUPPORTED("4836xd1juguptr6qebt07jlrh"); // free (g->vertices); UNSUPPORTED("dwuc0y4whcauryjdz2g3rdyey"); // free (g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 186nbf92ja5ttnrgvj422eqf5 // void insert_edge(rawgraph* g, int v1, int v2) public static Object insert_edge(Object... arg) { UNSUPPORTED("347dderd02mvlozoheqo4ejwo"); // void UNSUPPORTED("jldraubzdwc00et6agtk6726"); // insert_edge(rawgraph* g, int v1, int v2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2rjvy9cij6zo2nowb4w37hnjt"); // intitem obj; UNSUPPORTED("bmm6cyaytc4kc2ri4gey846yp"); // obj.id = v2; UNSUPPORTED("a1hlf5bwzya3m4ujh9zokvj3a"); // (*(((Dt_t*)(g->vertices[v1].adj_list))->searchf))((g->vertices[v1].adj_list),(void*)(&obj),0000001); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1r1ufpzdilo5438zjdky0uy2w // void remove_redge(rawgraph* g, int v1, int v2) public static Object remove_redge(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("a9gk586ljggidricdp6evpxau"); // remove_redge(rawgraph* g, int v1, int v2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2rjvy9cij6zo2nowb4w37hnjt"); // intitem obj; UNSUPPORTED("bmm6cyaytc4kc2ri4gey846yp"); // obj.id = v2; UNSUPPORTED("14tyn9y8xz91kr6dfeier49r"); // (*(((Dt_t*)(g->vertices[v1].adj_list))->searchf))((g->vertices[v1].adj_list),(void*)(&obj),0000002); UNSUPPORTED("c4j1680th3r5qcpns3u4zjale"); // obj.id = v1; UNSUPPORTED("9oqxwhwpfvzwxbnltjdoq1oga"); // (*(((Dt_t*)(g->vertices[v2].adj_list))->searchf))((g->vertices[v2].adj_list),(void*)(&obj),0000002); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3ff6zoop8jhts0qsvj91k9dfk // int edge_exists(rawgraph* g, int v1, int v2) public static Object edge_exists(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("4urd9z39jr49sen0w7s573505"); // edge_exists(rawgraph* g, int v1, int v2) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e2phkxwl9hjxom6accmixx6p2"); // return ((*(((Dt_t*)(g->vertices[v1].adj_list))->searchf))((g->vertices[v1].adj_list),(void*)(&v2),0001000) != 0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1zivcgw1xwk6pq169yqc75oh1 // static stack* mkStack (int i) public static Object mkStack(Object... arg) { UNSUPPORTED("9cla0obmp67i5rjsjxiqdeimj"); // static stack* UNSUPPORTED("ci2xjox5enk1600klp4wnc4d0"); // mkStack (int i) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8bsg9hgmxo09dmbp0rqikzip9"); // stack* sp = (stack*)zmalloc(sizeof(stack)); UNSUPPORTED("dgvcpjjkop19ctj9c6as7irgh"); // sp->vals = (int*)zmalloc((i)*sizeof(int)); UNSUPPORTED("6ak6snmn7x9mv08cxv1uhqto0"); // sp->top = -1; UNSUPPORTED("c31qqlge2adqev6kmlr0iuaea"); // return sp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 56jaryc2ndgkphreacgutgkko // static void freeStack (stack* s) public static Object freeStack(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("1tmwfqmwfffw7layx1b9l774l"); // freeStack (stack* s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4ivw0yolzv64dlaqawvv30x5v"); // free (s->vals); UNSUPPORTED("f1430a029xzg8cabffg2k9l6j"); // free (s); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 40jmhsu64yd114q5sxnbwirxh // static void pushStack (stack* s, int i) public static Object pushStack(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("efz1du2gap9f44f5qfs4oa0ga"); // pushStack (stack* s, int i) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1a9i725yadesextx7inlkz10x"); // s->top++; UNSUPPORTED("5pdmgjwfiz1iusmq5fydnblap"); // s->vals[s->top] = i; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4oxcr6qfkyvzxsr9y5oo4ok34 // static int popStack (stack* s) public static Object popStack(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("9blpzh0xe07qxynad8t5mqz8x"); // popStack (stack* s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6m5stt3wg7jgpdcvvk37onm1s"); // int v; UNSUPPORTED("ceenb9p2929863jeh6inli97k"); // if (s->top == -1) return -1; UNSUPPORTED("efrvy47jf2m4lt70c0u4yxt67"); // v = s->vals[s->top]; UNSUPPORTED("owa601uw5gl8igjnyr2lfsq7"); // s->top--; UNSUPPORTED("dpci52ct1zm8k1aasm170ru2j"); // return v; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2jkcimgyhf4lzdolm41833uv1 // static int DFS_visit(rawgraph* g, int v, int time, stack* sp) public static Object DFS_visit(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("9tjvxtubftvfbyn9yg9s2ukk5"); // DFS_visit(rawgraph* g, int v, int time, stack* sp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("efg3j1wpsky3c1yns7rcddd1g"); // Dt_t* adj; UNSUPPORTED("6i10bzt8ybhoodrtwofkpcavu"); // Dtlink_t* link; UNSUPPORTED("9uf2icnp9lntl8gmbrqtn59cu"); // int id; UNSUPPORTED("b69yoemu1fzv6up7qzrryu9z1"); // vertex* vp; UNSUPPORTED("eoyjtfht0qiqsx0g6j3shub2r"); // vp = g->vertices + v; UNSUPPORTED("1bpaugmlepecgk8uiqqd6lhih"); // vp->color = 1; UNSUPPORTED("17rwtc50qcliu6s4uujnjxlfn"); // /* g->vertices[v].d = time; */ UNSUPPORTED("c8ss949bn9k3dw76vpp186lei"); // adj = vp->adj_list; UNSUPPORTED("5mtxa718isij6bd88jbwav09r"); // time = time + 1; UNSUPPORTED("683z4jufz8k2kssqjqpceyjzm"); // for(link = dtflatten (adj); link; link = (((Dtlink_t*)(link))->right)) { UNSUPPORTED("2aeor5mnjzhwqpcgc294oq70m"); // id = ((intitem*)(((Dt_t*)(adj))->disc->link < 0 ? ((Dthold_t*)((link)))->obj : (void*)((char*)((link)) - ((Dt_t*)(adj))->disc->link) ))->id; UNSUPPORTED("1fci76oeaq8sz2pvp4p6npq73"); // if(g->vertices[id].color == 0) UNSUPPORTED("94vjlul0tyxbd7e0q4ing2z1h"); // time = DFS_visit(g, id, time, sp); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2rts8n24enk3adhy8owm41yh9"); // vp->color = 2; UNSUPPORTED("c4n0lojve186vzv3wqq6dk1pl"); // /* g->vertices[v].f = time; */ UNSUPPORTED("axvith90awf9705pbyhu4nx38"); // pushStack (sp, v); UNSUPPORTED("9pkzxm2gxhkcw8p51ercqleh1"); // return (time + 1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9r0jqlhxs5buqs5hsdqnbj84j // void top_sort(rawgraph* g) public static Object top_sort(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("4yot0xeux4j9xntlfs27gwtcf"); // top_sort(rawgraph* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b9q08fv1def3y3mbkfcttoygi"); // int i, v; UNSUPPORTED("c3xjd5j8j3bgmchyoisbyw64b"); // int time = 0; UNSUPPORTED("551funk1bxiemly3silcqtngw"); // int count = 0; UNSUPPORTED("c7rls4c8tdfpn2b8sp15reiyh"); // stack* sp; UNSUPPORTED("9n2rm2xd87zhiqudy5248ij10"); // if (g->nvs == 0) return; UNSUPPORTED("5j8ivb7xr19v4nmq7wd60cj5p"); // if (g->nvs == 1) { UNSUPPORTED("5p60crx1qes9x8eijukw93td3"); // g->vertices[0].topsort_order = count; UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dlug72rf2lqioskxr8kgz0r1f"); // sp = mkStack (g->nvs); UNSUPPORTED("89rud9nlbi3f8k7rz0vv5vtd8"); // for(i=0;invs;i++) { UNSUPPORTED("9lczna1336ncq8zrahl9nzymo"); // if(g->vertices[i].color == 0) UNSUPPORTED("6ln2w0gjr0kz3163kops6o4p1"); // time = DFS_visit(g, i, time, sp); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a9tz9ejeuh2cz8adl3rtuxvth"); // while((v = popStack(sp)) >= 0) { UNSUPPORTED("9m1c27tt4l4z6f1503uugs6ak"); // g->vertices[v].topsort_order = count; UNSUPPORTED("4221wbi45004vm34bns3e6zhv"); // count++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("71qiyws5c2bt08glef0zb8cfv"); // freeStack (sp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/ortho/sgraph__c.java000066400000000000000000000332571312650303100217210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.ortho; import static smetana.core.Macro.UNSUPPORTED; public class sgraph__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //3 do1p8q9fgspbwjclhfas1e31i // void gsave (sgraph* G) public static Object gsave(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("53tz1kawkoq5faz7kymp6ptpo"); // gsave (sgraph* G) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("4a3idvuwsn45q081062uxj30b"); // G->save_nnodes = G->nnodes; UNSUPPORTED("dvjft3jbvipb8kx48kn2cxq4d"); // G->save_nedges = G->nedges; UNSUPPORTED("ehil2x3e5xjd504di5xq03ix2"); // for (i = 0; i < G->nnodes; i++) UNSUPPORTED("8phdmwqejnwfe17clzvzqusic"); // G->nodes[i].save_n_adj = G->nodes[i].n_adj; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4bd3mhrsaxr0us4mbdlnz3fva // void reset(sgraph* G) public static Object reset(Object... arg) { UNSUPPORTED("347dderd02mvlozoheqo4ejwo"); // void UNSUPPORTED("o6ryffoh62mg3jqikb1bcvcn"); // reset(sgraph* G) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("4z92iyiytnarfwg69q6q1qxdo"); // G->nnodes = G->save_nnodes; UNSUPPORTED("gi9g609ppu0efm44uexae3lg"); // G->nedges = G->save_nedges; UNSUPPORTED("ehil2x3e5xjd504di5xq03ix2"); // for (i = 0; i < G->nnodes; i++) UNSUPPORTED("amo8o2h5u6ikoe5ouawwnxttv"); // G->nodes[i].n_adj = G->nodes[i].save_n_adj; UNSUPPORTED("395pz5pbzjp227kygyayer2m0"); // for (; i < G->nnodes+2; i++) UNSUPPORTED("1w65z5djtqk8i6nk3cu9qavs9"); // G->nodes[i].n_adj = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2uooy3bnw1kc4mm4ns09blzvd // void initSEdges (sgraph* g, int maxdeg) public static Object initSEdges(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("3t8ixyxav6ee8tjumnj6c4on7"); // initSEdges (sgraph* g, int maxdeg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("584qbup3c7sdxo8kave8mllal"); // int* adj = (int*)zmalloc((6*g->nnodes + 2*maxdeg)*sizeof(int)); UNSUPPORTED("dvc1rp1rnjfmjnxvwpm004stb"); // g->edges = (sedge*)zmalloc((3*g->nnodes + maxdeg)*sizeof(sedge)); UNSUPPORTED("eavilhxlidc3wjniw4glglbnt"); // for (i = 0; i < g->nnodes; i++) { UNSUPPORTED("ckt5vl01ya7v4i84i9yxcipv0"); // g->nodes[i].adj_edge_list = adj; UNSUPPORTED("dzxhiwbj9xcvedfridh0okcez"); // adj += 6; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dgkzkhndgc3xziilvfagce4xi"); // for (; i < g->nnodes+2; i++) { UNSUPPORTED("ckt5vl01ya7v4i84i9yxcipv0"); // g->nodes[i].adj_edge_list = adj; UNSUPPORTED("68si7kljcmnbf59kgy3rk0m6z"); // adj += maxdeg; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4lws7mi89ekzzcc99wuw9r7l8 // sgraph* createSGraph (int nnodes) public static Object createSGraph(Object... arg) { UNSUPPORTED("9xadge294rqhy06asmqycka8m"); // sgraph* UNSUPPORTED("eqjwxhjyhqmefxsvpknl1bnfx"); // createSGraph (int nnodes) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dwa606y0aknngzxrrsnswltbr"); // sgraph* g = (sgraph*)zmalloc(sizeof(sgraph)); UNSUPPORTED("1i02j60f9yupm02tj9rvzps0o"); // /* create the nodes vector in the search graph */ UNSUPPORTED("3yhlfn7hpvrjkdva5gida8jqo"); // g->nnodes = 0; UNSUPPORTED("47bxz2s175s5k1snvid5o4hve"); // g->nodes = (snode*)zmalloc((nnodes)*sizeof(snode)); UNSUPPORTED("2syri7q5tc0jyvwq8ecyfo3vr"); // return g; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4jwt9radjtehigwninuxfni66 // snode* createSNode (sgraph* g) public static Object createSNode(Object... arg) { UNSUPPORTED("7qyamsdkopruu23xaccl0bcd2"); // snode* UNSUPPORTED("753vtsohiclqv7nl3y14twf19"); // createSNode (sgraph* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1hdbk7wtbmf5ysy77ka3v1wv1"); // snode* np = g->nodes+g->nnodes; UNSUPPORTED("12345aoqngizwar08ubsjkjql"); // np->index = g->nnodes; UNSUPPORTED("1pdvfvgbmueo5t1u1q4rbj9t4"); // g->nnodes++; UNSUPPORTED("8iwc9afkw6pes2mgfhktuxzj8"); // return np; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 49zscu3ughv1sfoes00tmvzew // static void addEdgeToNode (snode* np, sedge* e, int idx) public static Object addEdgeToNode(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("dpg266aklzv95plhgmmdgdl2h"); // addEdgeToNode (snode* np, sedge* e, int idx) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3bjz47ii1rlzjcxhnphx8bepr"); // np->adj_edge_list[np->n_adj] = idx; UNSUPPORTED("2vd3mg5b94lmz0n3qsamkbrbk"); // np->n_adj++; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 25bbgi67jwpg5nrx87bctkn5s // sedge* createSEdge (sgraph* g, snode* v1, snode* v2, double wt) public static Object createSEdge(Object... arg) { UNSUPPORTED("de30fcx2rpq95h8prggzz38de"); // sedge* UNSUPPORTED("e67qstzz1cjy6tm1gp72tqiy9"); // createSEdge (sgraph* g, snode* v1, snode* v2, double wt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5us6bymu4crkiqypwh57332hj"); // sedge* e; UNSUPPORTED("3edhazo5e0eznk99j763w7wvk"); // int idx = g->nedges++; UNSUPPORTED("12o3iah7k1tllf6ehoks5ez9r"); // e = g->edges + idx; UNSUPPORTED("742bl52l6dlhwl8vdmr0gi6mt"); // e->v1 = v1->index; UNSUPPORTED("eo17frg8yipb9e15ykaocxv8"); // e->v2 = v2->index; UNSUPPORTED("3tbomhde001xxpsgrqrxaj5qq"); // e->weight = wt; UNSUPPORTED("bdajav43vx6s0dqy0k4qzz34r"); // e->cnt = 0; UNSUPPORTED("2fxbnv4tmis57zol548d8t69o"); // addEdgeToNode (v1, e, idx); UNSUPPORTED("8fhmkjmzcgsaedp55s0lgcnzf"); // addEdgeToNode (v2, e, idx); UNSUPPORTED("2bswif6w6ot01ynlvkimntfly"); // return e; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cmavbm512p00aze5hpa7ewqnf // void freeSGraph (sgraph* g) public static Object freeSGraph(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("9hthkvnsrcbkqzxbng2mlgcr"); // freeSGraph (sgraph* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5xfei00jwgg7b7kejqmwtve51"); // free (g->nodes[0].adj_edge_list); UNSUPPORTED("apli015280vdkava7kzfu45gt"); // free (g->nodes); UNSUPPORTED("aobfrb6yk5ivr8l2memu6iegu"); // free (g->edges); UNSUPPORTED("dwuc0y4whcauryjdz2g3rdyey"); // free (g); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1rcimcpgyvapk639i1ln4ubi5 // static snode* adjacentNode(sgraph* g, sedge* e, snode* n) public static Object adjacentNode(Object... arg) { UNSUPPORTED("1mqfssg5cquehb5bdk2189gy2"); // static snode* UNSUPPORTED("d7hrrud3osvm08rbt95y6nc7v"); // adjacentNode(sgraph* g, sedge* e, snode* n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aapvzqekocoy044mxh46608wo"); // if (e->v1==n->index) UNSUPPORTED("62g358pvqoywxqbeb39tjulp2"); // return (&(g->nodes[e->v2])); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("dkxx6omcntqirmu5yygun7kop"); // return (&(g->nodes[e->v1])); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9giqtyb1anron57zz1mdcuwr0 // int shortPath (sgraph* g, snode* from, snode* to) public static Object shortPath(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("2d7cnx1fuelcu110onyrglta1"); // shortPath (sgraph* g, snode* from, snode* to) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2azqjiolcsah2sn6lnkbcv8q6"); // snode* n; UNSUPPORTED("5us6bymu4crkiqypwh57332hj"); // sedge* e; UNSUPPORTED("a4iu3ng9cbut3oe6j3w1hhtlw"); // snode* adjn; UNSUPPORTED("5azgw3jpyk2yccpp3p4s3q817"); // int d; UNSUPPORTED("1ouxm7u78s3lne6g97el7yirj"); // int x, y; UNSUPPORTED("cj7nzqwbchsm0mvo2wmynwq5u"); // for (x = 0; xnnodes; x++) { UNSUPPORTED("7d5ytzu7ryaoy73g9z0g89g37"); // snode* temp; UNSUPPORTED("ed9j6kqbny3qsxz8e8dk4vxe6"); // temp = &(g->nodes[x]); UNSUPPORTED("78pvwvoqedjj594q1og8f58lt"); // (temp)->n_val = INT_MIN; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6ig938tzt63g78nuq5ozjoxia"); // PQinit(); UNSUPPORTED("d1qoqypb9nj64lzirszjt4ips"); // if (PQ_insert (from)) return 1; UNSUPPORTED("5jv8ecdm6aag2bo5uj5oaqdmn"); // (from)->n_dad = NULL; UNSUPPORTED("ddhvyzr3vort1bce9uxacz0cy"); // (from)->n_val = 0; UNSUPPORTED("58d6z37ovsflm1901h2priinl"); // while ((n = PQremove())) { UNSUPPORTED("83j13xloeu1fjo8bdrw4zv4ot"); // (n)->n_val *= -1; UNSUPPORTED("62t0o3w85qn5ull41imvtkl2v"); // if (n == to) break; UNSUPPORTED("2yuzydrscmjwya9vwcjaub1bw"); // for (y=0; yn_adj; y++) { UNSUPPORTED("7dykckcqwi0r01sokehzys07u"); // e = &(g->edges[n->adj_edge_list[y]]); UNSUPPORTED("ee5sii5zq78njilg2b84rcedx"); // adjn = adjacentNode(g, e, n); UNSUPPORTED("dcr46uov2a9y4x1d805di1vkj"); // if ((adjn)->n_val < 0) { UNSUPPORTED("ean1jlrfbqj5db693w8atob75"); // d = -((n)->n_val + (e->weight)); UNSUPPORTED("5i12njirmr3egi8u7dyh2x5jq"); // if ((adjn)->n_val == INT_MIN) { UNSUPPORTED("7fyonsun390xwjwz5nvv6387t"); // (adjn)->n_val = d; UNSUPPORTED("17otcakp576j9myi0y8j2018l"); // if (PQ_insert(adjn)) return 1; UNSUPPORTED("cr4e7c9poda05whkcy9htuvi4"); // (adjn)->n_dad = n; UNSUPPORTED("4ag21fj7gx3dj7pmwqjl89ucr"); // (adjn)->n_edge = e; UNSUPPORTED("1vo9ytkxoezj3oe6k9py3kdc4"); // } UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { UNSUPPORTED("ddue9dplflq1i5vnoxj8kmr5q"); // if ((adjn)->n_val < d) { UNSUPPORTED("btt3je7wg001msmvi1swe6o2i"); // PQupdate(adjn, d); UNSUPPORTED("dkztzg2evj6hhccujfulxxaif"); // (adjn)->n_dad = n; UNSUPPORTED("7jm2ji6pc40tpai19vzx2ewqf"); // (adjn)->n_edge = e; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7a6hw5yb8rm8wg0rs40229cw4"); // /* PQfree(); */ UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/ortho/trapezoid__c.java000066400000000000000000002020111312650303100224200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.ortho; import static smetana.core.Macro.UNSUPPORTED; public class trapezoid__c { //1 9sub06q78sfddgkymxfcy2c73 // static int q_idx //1 6g6us29cvfladuvel3e1yesjo // static int tr_idx //1 d43x33t89dq1mez0urx9oiia6 // static int QSIZE //1 bweoibjhrqkbu4mf0na0da9i4 // static int TRSIZE //3 ezwgb38ifqfgyqxu3qqar9lpw // static int newnode() public static Object newnode(Object... arg) { UNSUPPORTED("7foww06xea9wyyn20fapyohtz"); // static int newnode() UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aqs9lgy5mghk1gc6qzg6yfy4s"); // if (q_idx < QSIZE) UNSUPPORTED("8djpsfvmvn0bc1er4s9kph9cj"); // return q_idx++; UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("11efsmyeab3fqgi4nmlwej7ui"); // fprintf(stderr, "newnode: Query-table overflow\n"); UNSUPPORTED("2g1czwq8qs1hp7515i11qbn75"); // assert(0); UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4lbfds1s3bs19eoap1a3m3e6z // static int newtrap(trap_t* tr) public static Object newtrap(Object... arg) { UNSUPPORTED("5u9cievsb4s3x8zwuu8pspcam"); // static int newtrap(trap_t* tr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("d8y9k9n2vzw3s1hdo0dyfgusw"); // if (tr_idx < TRSIZE) { UNSUPPORTED("24d5qbi4y7dlh2alv9w6dspvq"); // tr[tr_idx].lseg = -1; UNSUPPORTED("9zrdh7a878ko4cmpzev5ayinb"); // tr[tr_idx].rseg = -1; UNSUPPORTED("74u8379xavsf8burpaazx8doy"); // tr[tr_idx].state = 1; UNSUPPORTED("cp5hfaygeyrh9332itky24tau"); // return tr_idx++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("4zebr8hhs7o8tpx01k01mpds0"); // fprintf(stderr, "newtrap: Trapezoid-table overflow %d\n", tr_idx); UNSUPPORTED("2g1czwq8qs1hp7515i11qbn75"); // assert(0); UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3vts8knsk95mverrgac2cq3yc // static int _max (pointf *yval, pointf *v0, pointf *v1) public static Object _max(Object... arg) { UNSUPPORTED("b70ixswaw70rop2i3a10o3usx"); // static int _max (pointf *yval, pointf *v0, pointf *v1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8sp05pzzul51jatoi7t38rnpp"); // if (v0->y > v1->y + 1.0e-7) UNSUPPORTED("180yy7z15hk29ewh0m4iwy075"); // *yval = *v0; UNSUPPORTED("2ty39vroyyu183wiz8ofw0rxa"); // else if ((fabs(v0->y - v1->y) <= 1.0e-7)) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("72xrk5q82zxqso4bc60bh0en6"); // if (v0->x > v1->x + 1.0e-7) UNSUPPORTED("1cpd3nxmmss753abfkrjus62"); // *yval = *v0; UNSUPPORTED("e2koj2xocq76awegpydpyu62m"); // else UNSUPPORTED("90n843sj6wbl3520yksspwwd7"); // *yval = *v1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8983svt6g1kt3l45bd6ju9mw6"); // else UNSUPPORTED("3alzaeg88yo110ikg55vztkke"); // *yval = *v1; UNSUPPORTED("bid671dovx1rdiquw5vm3fttj"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5wxt3huxqmnpq4koff0wywqeg // static int _min (pointf *yval, pointf *v0, pointf *v1) public static Object _min(Object... arg) { UNSUPPORTED("41dy0yxvmnu3g6nomhqjilah6"); // static int _min (pointf *yval, pointf *v0, pointf *v1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6kmfzgofw4kdg3jrtg4qesuzn"); // if (v0->y < v1->y - 1.0e-7) UNSUPPORTED("180yy7z15hk29ewh0m4iwy075"); // *yval = *v0; UNSUPPORTED("2ty39vroyyu183wiz8ofw0rxa"); // else if ((fabs(v0->y - v1->y) <= 1.0e-7)) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("459y4uw84m4wk21vkdz3fp0q"); // if (v0->x < v1->x) UNSUPPORTED("1cpd3nxmmss753abfkrjus62"); // *yval = *v0; UNSUPPORTED("e2koj2xocq76awegpydpyu62m"); // else UNSUPPORTED("90n843sj6wbl3520yksspwwd7"); // *yval = *v1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8983svt6g1kt3l45bd6ju9mw6"); // else UNSUPPORTED("3alzaeg88yo110ikg55vztkke"); // *yval = *v1; UNSUPPORTED("bid671dovx1rdiquw5vm3fttj"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1tgrd4zziresuq6qhk0xfoa92 // static int _greater_than_equal_to (pointf *v0, pointf *v1) public static Object _greater_than_equal_to(Object... arg) { UNSUPPORTED("3x672w6uwysfps5nvhyqmwl95"); // static int _greater_than_equal_to (pointf *v0, pointf *v1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8sp05pzzul51jatoi7t38rnpp"); // if (v0->y > v1->y + 1.0e-7) UNSUPPORTED("4si0cf97a5sfd9ozuunds9goz"); // return (!(0)); UNSUPPORTED("cmmtmayq5o6ek8zgcrha6po9p"); // else if (v0->y < v1->y - 1.0e-7) UNSUPPORTED("297p5iu8oro94tdg9v29bbgiw"); // return (0); UNSUPPORTED("8983svt6g1kt3l45bd6ju9mw6"); // else UNSUPPORTED("ccnvf5snmgs9gvqzl6fmieioz"); // return (v0->x >= v1->x); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ckf51i5h4qoeq20aso56vcc5h // static int _less_than (pointf *v0, pointf *v1) public static Object _less_than(Object... arg) { UNSUPPORTED("8ancjlh02pjhsn49e6a25wl6r"); // static int _less_than (pointf *v0, pointf *v1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6kmfzgofw4kdg3jrtg4qesuzn"); // if (v0->y < v1->y - 1.0e-7) UNSUPPORTED("4si0cf97a5sfd9ozuunds9goz"); // return (!(0)); UNSUPPORTED("cg91nfse0xdez0vz4ak53mlc6"); // else if (v0->y > v1->y + 1.0e-7) UNSUPPORTED("297p5iu8oro94tdg9v29bbgiw"); // return (0); UNSUPPORTED("8983svt6g1kt3l45bd6ju9mw6"); // else UNSUPPORTED("5gqsmyi9rrv1qx6cgtd2xi44t"); // return (v0->x < v1->x); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7q4v9wyz2nlemt8xq7v0184fv // static int init_query_structure(int segnum, segment_t* seg, trap_t* tr, qnode_t* qs) public static Object init_query_structure(Object... arg) { UNSUPPORTED("d9cz56vtrl0ri6hz88cumukuf"); // static int UNSUPPORTED("80esr9k64zjsp5282c35kte4"); // init_query_structure(int segnum, segment_t* seg, trap_t* tr, qnode_t* qs) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2esdkeckyaxmhthp1vzn695tv"); // int i1, i2, i3, i4, i5, i6, i7, root; UNSUPPORTED("1etoutqq3u32ryiyi4rlsmsro"); // int t1, t2, t3, t4; UNSUPPORTED("55wy1clqaecn10s0jetfvt04s"); // segment_t *s = &seg[segnum]; UNSUPPORTED("c83t5z66410r47uvwhte8atg2"); // i1 = newnode(); UNSUPPORTED("6tcn5be7qo2ntg03pl4u3r61e"); // qs[i1].nodetype = 2; UNSUPPORTED("c1r0tcnd1jjxieidujrboz04k"); // _max(&qs[i1].yval, &s->v0, &s->v1); /* root */ UNSUPPORTED("f428tco5zyg6ypbzmd6nv8jxo"); // root = i1; UNSUPPORTED("1939agqcbtihe79feh1epnhqd"); // qs[i1].right = i2 = newnode(); UNSUPPORTED("bclzn2z0bot5q64khoc3xo1eh"); // qs[i2].nodetype = 3; UNSUPPORTED("3wxpvt6gxhzk59qbw5yybfzok"); // qs[i2].parent = i1; UNSUPPORTED("50zz911fku71s62zxmf340erk"); // qs[i1].left = i3 = newnode(); UNSUPPORTED("a2m2pfcpcs6m23o59w73a3ult"); // qs[i3].nodetype = 2; UNSUPPORTED("844hmc2g8n8v8oq1t3pu20waf"); // _min(&qs[i3].yval, &s->v0, &s->v1); /* root */ UNSUPPORTED("6eqlqz24lil3mz951mbp9aigr"); // qs[i3].parent = i1; UNSUPPORTED("6umgkg0ppnkz3jqbvyaxe1m2i"); // qs[i3].left = i4 = newnode(); UNSUPPORTED("2a5a7b307rm5psez1mdr9nc42"); // qs[i4].nodetype = 3; UNSUPPORTED("1qbi9f0emsed1xpkk2p6wqgr1"); // qs[i4].parent = i3; UNSUPPORTED("7ijfbel4e53xg0oyi1hdok8qp"); // qs[i3].right = i5 = newnode(); UNSUPPORTED("d9lgcb4dl6oscs3faq8cipzdp"); // qs[i5].nodetype = 1; UNSUPPORTED("3ncb03lht8293piupe9raycfn"); // qs[i5].segnum = segnum; UNSUPPORTED("b3g3e6ii94dctnonsv4wd6pdl"); // qs[i5].parent = i3; UNSUPPORTED("2hrir3mvn61r4z0suya88l2nq"); // qs[i5].left = i6 = newnode(); UNSUPPORTED("z8w28kgi1isfybx3itfos5s6"); // qs[i6].nodetype = 3; UNSUPPORTED("cu0goy732xo6v416gatn10gvh"); // qs[i6].parent = i5; UNSUPPORTED("8mrutb9o0h1by9tk58yfkoqth"); // qs[i5].right = i7 = newnode(); UNSUPPORTED("4hxmyrxp7ehrl5bbgglxggb3v"); // qs[i7].nodetype = 3; UNSUPPORTED("7cv8pxpknvmffsmvootfn7huq"); // qs[i7].parent = i5; UNSUPPORTED("47um0g3rf0a66rfc8ix8q7vds"); // t1 = newtrap(tr); /* middle left */ UNSUPPORTED("dhqbu2kqod5qekt4mbkpcokkj"); // t2 = newtrap(tr); /* middle right */ UNSUPPORTED("9d3tauevh5y1ibiiwo6wp2v76"); // t3 = newtrap(tr); /* bottom-most */ UNSUPPORTED("8by6n8cunt2i39aek7qn4bxzm"); // t4 = newtrap(tr); /* topmost */ UNSUPPORTED("9ooybm01jfqc70193duq4ut3k"); // tr[t1].hi = tr[t2].hi = tr[t4].lo = qs[i1].yval; UNSUPPORTED("ahal1vcbrbvp2tots6ntov40m"); // tr[t1].lo = tr[t2].lo = tr[t3].hi = qs[i3].yval; UNSUPPORTED("awhuxi9kh5n3qn62td3x1rx2e"); // tr[t4].hi.y = (double) (1<<30); UNSUPPORTED("9yuy8hbx22hhqfluto46v4rb3"); // tr[t4].hi.x = (double) (1<<30); UNSUPPORTED("dogql1uip3yn8sty2gnmwevpt"); // tr[t3].lo.y = (double) -1* (1<<30); UNSUPPORTED("d2iv9aswbnku15auic7ves2fg"); // tr[t3].lo.x = (double) -1* (1<<30); UNSUPPORTED("8y0utktr8o66ckjdf97ig9bw3"); // tr[t1].rseg = tr[t2].lseg = segnum; UNSUPPORTED("8my9cfjyt5wyy7n9gqm30i6f"); // tr[t1].u0 = tr[t2].u0 = t4; UNSUPPORTED("78rq2swfcihc9nwji63nql4b3"); // tr[t1].d0 = tr[t2].d0 = t3; UNSUPPORTED("ebptwtro7kf1luhehrxb744p8"); // tr[t4].d0 = tr[t3].u0 = t1; UNSUPPORTED("amaflatnwoybz3paepojnqzjc"); // tr[t4].d1 = tr[t3].u1 = t2; UNSUPPORTED("cgyw8wailvfpayg8djskaqm0j"); // tr[t1].sink = i6; UNSUPPORTED("2sj6wyx5ww6w67v1loc3qhk4a"); // tr[t2].sink = i7; UNSUPPORTED("4h7l33kqm6unri8ilybcbjfcw"); // tr[t3].sink = i4; UNSUPPORTED("2wmmcp3dsa7xgu0t7iyv906s2"); // tr[t4].sink = i2; UNSUPPORTED("bxw0r5s14kl48z1l94rbm9ur"); // tr[t1].state = tr[t2].state = 1; UNSUPPORTED("5n86x6hksj9v0g2mlx1fxaafr"); // tr[t3].state = tr[t4].state = 1; UNSUPPORTED("2xueg60vz46kgccrmtjvwznoi"); // qs[i2].trnum = t4; UNSUPPORTED("6cc5iezoueqotgmhzeglj4pz9"); // qs[i4].trnum = t3; UNSUPPORTED("187dsocnulk5op8i2uxlll76g"); // qs[i6].trnum = t1; UNSUPPORTED("eu7m875ftlwx5wo4kxra1uhmp"); // qs[i7].trnum = t2; UNSUPPORTED("68vdbfxjp39ycnev1lw2fz5px"); // s->is_inserted = (!(0)); UNSUPPORTED("8kli59ivt5ad0heic1p0r3dbs"); // return root; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8ewy3ncs31dca68taarb3iw8t // static int is_left_of (int segnum, segment_t* seg, pointf *v) public static Object is_left_of(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("5njshx2lwca6yvst4l5l2kvum"); // is_left_of (int segnum, segment_t* seg, pointf *v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("55wy1clqaecn10s0jetfvt04s"); // segment_t *s = &seg[segnum]; UNSUPPORTED("42zj0zwvmsgnq8k1sof5wa9x2"); // double area; UNSUPPORTED("63r3u1i01cseh1k50rrs740v"); // if ((((&s->v1)->y > (&s->v0)->y + 1.0e-7) ? (!(0)) : (((&s->v1)->y < (&s->v0)->y - 1.0e-7) ? (0) : ((&s->v1)->x > (&s->v0)->x)))) /* seg. going upwards */ UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("cbadnx7r0dofl81ka6xnnq6o7"); // if ((fabs(s->v1.y - v->y) <= 1.0e-7)) UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("cxi8g1p2jce4akg5ny6kbhrfj"); // if (v->x < s->v1.x) UNSUPPORTED("1fw3mcjmrjyug8inon5ce6dqp"); // area = 1.0; UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // else UNSUPPORTED("7jzu14omzk1dfuz500k0pmy3i"); // area = -1.0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3y16ysaprb1mi29myg2n7khc3"); // else if ((fabs(s->v0.y - v->y) <= 1.0e-7)) UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("blqfzreaz43r05gwx8e2g2mwl"); // if (v->x < s->v0.x) UNSUPPORTED("1fw3mcjmrjyug8inon5ce6dqp"); // area = 1.0; UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // else UNSUPPORTED("7jzu14omzk1dfuz500k0pmy3i"); // area = -1.0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e2koj2xocq76awegpydpyu62m"); // else UNSUPPORTED("9j65co4mvzqq92gveemasixui"); // area = (((s->v1).x - (s->v0).x)*(((*v)).y - (s->v0).y) - ((s->v1).y - (s->v0).y)*(((*v)).x - (s->v0).x)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1ifob9844re1ifigjf8fkr37a"); // else /* v0 > v1 */ UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("cbadnx7r0dofl81ka6xnnq6o7"); // if ((fabs(s->v1.y - v->y) <= 1.0e-7)) UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("cxi8g1p2jce4akg5ny6kbhrfj"); // if (v->x < s->v1.x) UNSUPPORTED("1fw3mcjmrjyug8inon5ce6dqp"); // area = 1.0; UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // else UNSUPPORTED("7jzu14omzk1dfuz500k0pmy3i"); // area = -1.0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3y16ysaprb1mi29myg2n7khc3"); // else if ((fabs(s->v0.y - v->y) <= 1.0e-7)) UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("blqfzreaz43r05gwx8e2g2mwl"); // if (v->x < s->v0.x) UNSUPPORTED("1fw3mcjmrjyug8inon5ce6dqp"); // area = 1.0; UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // else UNSUPPORTED("7jzu14omzk1dfuz500k0pmy3i"); // area = -1.0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e2koj2xocq76awegpydpyu62m"); // else UNSUPPORTED("4mok58gqh8sibhgfd7iko8c9v"); // area = (((s->v0).x - (s->v1).x)*(((*v)).y - (s->v1).y) - ((s->v0).y - (s->v1).y)*(((*v)).x - (s->v1).x)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("f01je1mbiagbodxwrd5uinsjb"); // if (area > 0.0) UNSUPPORTED("4si0cf97a5sfd9ozuunds9goz"); // return (!(0)); UNSUPPORTED("783dsehm4gdkhlghq59hccnzp"); // else UNSUPPORTED("297p5iu8oro94tdg9v29bbgiw"); // return (0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ds0k9vbvh7ed069gt2xxgoh8f // static int inserted (int segnum, segment_t* seg, int whichpt) public static Object inserted(Object... arg) { UNSUPPORTED("1hxgwm2z6apwm18im719wroya"); // static int inserted (int segnum, segment_t* seg, int whichpt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("178ivgdk5i7c18ldleui4zwx8"); // if (whichpt == 1) UNSUPPORTED("6ne7u4gw5ulsrhx8n7u6rkli4"); // return seg[seg[segnum].prev].is_inserted; UNSUPPORTED("8983svt6g1kt3l45bd6ju9mw6"); // else UNSUPPORTED("e67pnyvlna9gyn2uw744phhx8"); // return seg[seg[segnum].next].is_inserted; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3sd5i6hidutg4bza9cb9iqpxj // static int locate_endpoint (pointf *v, pointf *vo, int r, segment_t* seg, qnode_t* qs) public static Object locate_endpoint(Object... arg) { UNSUPPORTED("d9cz56vtrl0ri6hz88cumukuf"); // static int UNSUPPORTED("40jqc5hn9dtw9jy159l2bpv0g"); // locate_endpoint (pointf *v, pointf *vo, int r, segment_t* seg, qnode_t* qs) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cmndkfofn727hmimgmjjqabmb"); // qnode_t *rptr = &qs[r]; UNSUPPORTED("9no4uq8gm1skxdt3c5npacs5o"); // switch (rptr->nodetype) { UNSUPPORTED("33l7a58zp8vj6fuliwdkk2nkn"); // case 3: UNSUPPORTED("chlduh24i0dc156oi8zegnisk"); // return rptr->trnum; UNSUPPORTED("4u5xz2u3urj13y0aw30fdyup5"); // case 2: UNSUPPORTED("360mq4ndaxyqt1kvu3lx2g9iv"); // if ((((v)->y > (&rptr->yval)->y + 1.0e-7) ? (!(0)) : (((v)->y < (&rptr->yval)->y - 1.0e-7) ? (0) : ((v)->x > (&rptr->yval)->x)))) /* above */ UNSUPPORTED("1rwlw98jlk3uq5eash5mq3kty"); // return locate_endpoint(v, vo, rptr->right, seg, qs); UNSUPPORTED("2x6nvn1yiw8qe6y0l034l612c"); // else if (((fabs((v)->y - (&rptr->yval)->y) <= 1.0e-7) && (fabs((v)->x - (&rptr->yval)->x) <= 1.0e-7))) /* the point is already */ UNSUPPORTED("e4032360lx81txp3ugx7q41pg"); // { /* inserted. */ UNSUPPORTED("5mpyvd6pkc7oidge31j3rtrt4"); // if ((((vo)->y > (&rptr->yval)->y + 1.0e-7) ? (!(0)) : (((vo)->y < (&rptr->yval)->y - 1.0e-7) ? (0) : ((vo)->x > (&rptr->yval)->x)))) /* above */ UNSUPPORTED("9v669sdem5q69ss1a3sedpyhr"); // return locate_endpoint(v, vo, rptr->right, seg, qs); UNSUPPORTED("embybz3p65nxf0rx8b52bb0cj"); // else UNSUPPORTED("4hct334tbu519smetk1d6vmf2"); // return locate_endpoint(v, vo, rptr->left, seg, qs); /* below */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e2koj2xocq76awegpydpyu62m"); // else UNSUPPORTED("54lgz3gtv3i7kpaib8hyvgbfz"); // return locate_endpoint(v, vo, rptr->left, seg, qs); /* below */ UNSUPPORTED("d0gk15gzj4wz8nv54zbr285hm"); // case 1: UNSUPPORTED("9lajd4oadrk3ahujglee1gdtr"); // if (((fabs((v)->y - (&seg[rptr->segnum].v0)->y) <= 1.0e-7) && (fabs((v)->x - (&seg[rptr->segnum].v0)->x) <= 1.0e-7)) || UNSUPPORTED("f48mzifmh37dv8tr0qtoo49je"); // ((fabs((v)->y - (&seg[rptr->segnum].v1)->y) <= 1.0e-7) && (fabs((v)->x - (&seg[rptr->segnum].v1)->x) <= 1.0e-7))) UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("9z6xoklpdo4zj5pno4f5ce0h7"); // if ((fabs(v->y - vo->y) <= 1.0e-7)) /* horizontal segment */ UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("er0sr1b1xyl1koezju4fce9s9"); // if (vo->x < v->x) UNSUPPORTED("btfxao9lmldnm9ox00uhp9k89"); // return locate_endpoint(v, vo, rptr->left, seg, qs); /* left */ UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // else UNSUPPORTED("46b4vvmvw19uagy9lolvbjpva"); // return locate_endpoint(v, vo, rptr->right, seg, qs); /* right */ UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("7h5s2qfodilr20w0xkcpxkptk"); // else if (is_left_of(rptr->segnum, seg, vo)) UNSUPPORTED("42gk6xyx9b3ob9l5n3r5csyt1"); // return locate_endpoint(v, vo, rptr->left, seg, qs); /* left */ UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // else UNSUPPORTED("b95yqgth0rp8t6hd608cwibcv"); // return locate_endpoint(v, vo, rptr->right, seg, qs); /* right */ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9h1dd7wy66jgqp0wcr4kep5c2"); // else if (is_left_of(rptr->segnum, seg, v)) UNSUPPORTED("2q0jgs1w9wo5aut83ngsh2kqr"); // return locate_endpoint(v, vo, rptr->left, seg, qs); /* left */ UNSUPPORTED("e2koj2xocq76awegpydpyu62m"); // else UNSUPPORTED("56jpzw5vjtdztvgezig0lr54s"); // return locate_endpoint(v, vo, rptr->right, seg, qs); /* right */ UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("7popo524s1mkw4my7n7tm8zwm"); // fprintf(stderr, "unexpected case in locate_endpoint\n"); UNSUPPORTED("2kc7vwb5ge1ym5i0vk3t2ku3u"); // assert (0); UNSUPPORTED("aihsv59rc0q4ji937lr34lo8k"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1rl8ucq8uwd451ybs5xqlr67w"); // return 1; /* stop warning */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dbmj7tlr6ld9ptryu0lsaq4tc // static void merge_trapezoids (int segnum, int tfirst, int tlast, int side, trap_t* tr, qnode_t* qs) public static Object merge_trapezoids(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("d3sy6vv9zv5n4mb41oxk1obz6"); // merge_trapezoids (int segnum, int tfirst, int tlast, int side, trap_t* tr, UNSUPPORTED("3yigib6ow3jx4tobp06lwnbpn"); // qnode_t* qs) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7zesosg72mooutvqm92puylwn"); // int t, tnext, cond; UNSUPPORTED("srqa51ewat44yd9ccq23akdt"); // int ptnext; UNSUPPORTED("dumb9eoy9ae3crz585y5gm7jd"); // /* First merge polys on the LHS */ UNSUPPORTED("8dfvttfe7lc7i6u3r5ecr1fu7"); // t = tfirst; UNSUPPORTED("4prw3c0s3s628lu72k6lantaz"); // while ((t > 0) && _greater_than_equal_to(&tr[t].lo, &tr[tlast].lo)) UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("e01nwr4jvd1tahpmnshgnq2jv"); // if (side == 1) UNSUPPORTED("clu6aa5l65xiz793joqfsuqpj"); // cond = ((((tnext = tr[t].d0) > 0) && (tr[tnext].rseg == segnum)) || UNSUPPORTED("58j0umsvte3xelv7t0rq6gjmz"); // (((tnext = tr[t].d1) > 0) && (tr[tnext].rseg == segnum))); UNSUPPORTED("e2koj2xocq76awegpydpyu62m"); // else UNSUPPORTED("ay6y0octsk8vv6mxe73k52poq"); // cond = ((((tnext = tr[t].d0) > 0) && (tr[tnext].lseg == segnum)) || UNSUPPORTED("9giajatrisho4roj4jmi2mtdu"); // (((tnext = tr[t].d1) > 0) && (tr[tnext].lseg == segnum))); UNSUPPORTED("9jg0aj4lchk2qzrqzcn6ou93"); // if (cond) UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("4sfxjqv3pdk6ccs6trnltbq2f"); // if ((tr[t].lseg == tr[tnext].lseg) && UNSUPPORTED("8waxrtn63q8iol80ocgfo5avl"); // (tr[t].rseg == tr[tnext].rseg)) /* good neighbours */ UNSUPPORTED("4zrza3uxjr5k879ok6o3ajyq5"); // { /* merge them */ UNSUPPORTED("de9a84mtxjfcb7d29uq6ysi80"); // /* Use the upper node as the new node i.e. t */ UNSUPPORTED("5hnggs6fldg6n2aa0v0wb7mhs"); // ptnext = qs[tr[tnext].sink].parent; UNSUPPORTED("4aftlg6xged6gwbjcopvljfdk"); // if (qs[ptnext].left == tr[tnext].sink) UNSUPPORTED("f034psp1axv24k350wb0intx5"); // qs[ptnext].left = tr[t].sink; UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // else UNSUPPORTED("erqbnxbh6c3ixq6cid3y15v6f"); // qs[ptnext].right = tr[t].sink; /* redirect parent */ UNSUPPORTED("f51s02y9sf5wp5418x4hjsyr3"); // /* Change the upper neighbours of the lower trapezoids */ UNSUPPORTED("4s40zetcif254u9y9h8shaf7j"); // if ((tr[t].d0 = tr[tnext].d0) > 0) { UNSUPPORTED("7kf24rblb1mya5dy87gfod71g"); // if (tr[tr[t].d0].u0 == tnext) UNSUPPORTED("5ippcybc2d61q6we5qdy4i2qa"); // tr[tr[t].d0].u0 = t; UNSUPPORTED("4n5ukkxajjh25cyvxn2mfv7p5"); // else if (tr[tr[t].d0].u1 == tnext) UNSUPPORTED("49bf3poo5ld3e7zfa7owoqwkt"); // tr[tr[t].d0].u1 = t; UNSUPPORTED("1rlnjstsgqacqe09a5425xsv7"); // } UNSUPPORTED("cx0c40s7cejokjr55q624jp8i"); // if ((tr[t].d1 = tr[tnext].d1) > 0) { UNSUPPORTED("6tk5voiwfy6257or9pk26rpls"); // if (tr[tr[t].d1].u0 == tnext) UNSUPPORTED("8vwe6jjx4f0cxtyk1cjsred13"); // tr[tr[t].d1].u0 = t; UNSUPPORTED("faags7rxrk8rz9u528brw9w1"); // else if (tr[tr[t].d1].u1 == tnext) UNSUPPORTED("c1g7dyxu9y9bu3cnqai6ffpai"); // tr[tr[t].d1].u1 = t; UNSUPPORTED("1rlnjstsgqacqe09a5425xsv7"); // } UNSUPPORTED("rqi8hsnl6a07uwsdllnklsov"); // tr[t].lo = tr[tnext].lo; UNSUPPORTED("alq15ri09p1ftxvstnhiy11pw"); // tr[tnext].state = 2; /* invalidate the lower */ UNSUPPORTED("7g5imzgc3x4g8m1764txnxwyg"); // /* trapezium */ UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("22mnxtwfg5bxnxn9hi92d3s98"); // else /* not good neighbours */ UNSUPPORTED("62cajrs5gvbcki7xpbugxr503"); // t = tnext; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cy3s4c19cvi3od7ig0v5w1dau"); // else /* do not satisfy the outer if */ UNSUPPORTED("9ndn482wriowrzfxei5dwe91s"); // t = tnext; UNSUPPORTED("65mlofu9i9895kq8xkb6x103e"); // } /* end-while */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 423adx9iu4aqsh6kmh9d6a9be // static int add_segment (int segnum, segment_t* seg, trap_t* tr, qnode_t* qs) public static Object add_segment(Object... arg) { UNSUPPORTED("d9cz56vtrl0ri6hz88cumukuf"); // static int UNSUPPORTED("6kdmtyxbba7hab6oumuavm30n"); // add_segment (int segnum, segment_t* seg, trap_t* tr, qnode_t* qs) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aywleif3lrmut4f9ns6y61k57"); // segment_t s; UNSUPPORTED("364wkucwxm1xu5s9elyid5hh4"); // int tu, tl, sk, tfirst, tlast; UNSUPPORTED("3sfv77g4x70yfiew8fyfwgniw"); // int tfirstr, tlastr, tfirstl, tlastl; UNSUPPORTED("hfh89kyneima7i4d8yp0hbwi"); // int i1, i2, t, tn; UNSUPPORTED("8z6gljvt2mmr0150xzv8dl25q"); // pointf tpt; UNSUPPORTED("dnwffbpvy39x5k4uyp0o8auxh"); // int tritop = 0, tribot = 0, is_swapped; UNSUPPORTED("94kgtpn18xur5803w9zeeemzl"); // int tmptriseg; UNSUPPORTED("1pyedo5b6xqv0d871wz5tos5c"); // s = seg[segnum]; UNSUPPORTED("8gkp133xtnguno18r03aljy2z"); // if ((((&s.v1)->y > (&s.v0)->y + 1.0e-7) ? (!(0)) : (((&s.v1)->y < (&s.v0)->y - 1.0e-7) ? (0) : ((&s.v1)->x > (&s.v0)->x)))) /* Get higher vertex in v0 */ UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("cwmbl7chjorytaifkyv8kht3c"); // int tmp; UNSUPPORTED("5luhts0zxuhi3potzediaro1z"); // tpt = s.v0; UNSUPPORTED("3zornvro5dwtu8yscak3thc3j"); // s.v0 = s.v1; UNSUPPORTED("7xkhhzhpalzk4r57usnt0ei5g"); // s.v1 = tpt; UNSUPPORTED("bqhqxuz448ejhe47314s7ywqn"); // tmp = s.root0; UNSUPPORTED("2re8ujw6s9kgcmuthp39hguph"); // s.root0 = s.root1; UNSUPPORTED("75kknuapl2tfu08nxm6s55sm1"); // s.root1 = tmp; UNSUPPORTED("9eflrb5pudqbmm3wm6qeiwwsz"); // is_swapped = (!(0)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("kf5313k7om91mo87n2t6l6mk"); // else is_swapped = (0); UNSUPPORTED("9fmss7ubwydpupsrikix6nafv"); // if ((is_swapped) ? !inserted(segnum, seg, 2) : UNSUPPORTED("6hcg7juc159xaz2xirhecwc5n"); // !inserted(segnum, seg, 1)) /* insert v0 in the tree */ UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("c8xc5g4gm8dkiy87rty8nml52"); // int tmp_d; UNSUPPORTED("2qpiovudynlersguqz1by6yg8"); // tu = locate_endpoint(&s.v0, &s.v1, s.root0, seg, qs); UNSUPPORTED("3vk36g0d9b4pv8frx4h1q7url"); // tl = newtrap(tr); /* tl is the new lower trapezoid */ UNSUPPORTED("1lylt0f9mi470jwcjjrujr0lv"); // tr[tl].state = 1; UNSUPPORTED("e36yrv3eo2yxyqvkbbxaji21d"); // tr[tl] = tr[tu]; UNSUPPORTED("9wngpyofpofpk3iw7x1nua784"); // tr[tu].lo.y = tr[tl].hi.y = s.v0.y; UNSUPPORTED("kayts5od8vhhpy0xbhr9dkxg"); // tr[tu].lo.x = tr[tl].hi.x = s.v0.x; UNSUPPORTED("5boxd28ndhyga6l1be8q33e4q"); // tr[tu].d0 = tl; UNSUPPORTED("40mjz1kftaduly7n34bovhzoa"); // tr[tu].d1 = 0; UNSUPPORTED("8ohfd1sq3vt575ufy2sejpq49"); // tr[tl].u0 = tu; UNSUPPORTED("er5qcoyhp181kav6eod7im5xk"); // tr[tl].u1 = 0; UNSUPPORTED("dmb9ggnvbbi4oj28pzhxe0i4s"); // if (((tmp_d = tr[tl].d0) > 0) && (tr[tmp_d].u0 == tu)) UNSUPPORTED("7dung2mkyltlpc6rn6xg2w2qa"); // tr[tmp_d].u0 = tl; UNSUPPORTED("6mzktvtijtpt77jiqbxio9zos"); // if (((tmp_d = tr[tl].d0) > 0) && (tr[tmp_d].u1 == tu)) UNSUPPORTED("4hk19hnhoihfn3k52lnb5wnmi"); // tr[tmp_d].u1 = tl; UNSUPPORTED("50ybcyf9j71skb8bxbrvd4wfo"); // if (((tmp_d = tr[tl].d1) > 0) && (tr[tmp_d].u0 == tu)) UNSUPPORTED("7dung2mkyltlpc6rn6xg2w2qa"); // tr[tmp_d].u0 = tl; UNSUPPORTED("burj10cn6158fzm20uvqf635h"); // if (((tmp_d = tr[tl].d1) > 0) && (tr[tmp_d].u1 == tu)) UNSUPPORTED("4hk19hnhoihfn3k52lnb5wnmi"); // tr[tmp_d].u1 = tl; UNSUPPORTED("511t3099c7ezfx13h8n2yb4qc"); // /* Now update the query structure and obtain the sinks for the */ UNSUPPORTED("c9xihvs3g1nqpo1l2de28bsb"); // /* two trapezoids */ UNSUPPORTED("csfd7w5pm87z8w5eoyoa2movw"); // i1 = newnode(); /* Upper trapezoid sink */ UNSUPPORTED("564u4l90sl4dmr5g58s7iqs8x"); // i2 = newnode(); /* Lower trapezoid sink */ UNSUPPORTED("7oz11ubssufczo1a50yljtcvy"); // sk = tr[tu].sink; UNSUPPORTED("b677gy1yh3616vmj895bab5b"); // qs[sk].nodetype = 2; UNSUPPORTED("k2rmuj3cg2b11t520einze0k"); // qs[sk].yval = s.v0; UNSUPPORTED("bxfy7g6fyf60ts626mpqxu6se"); // qs[sk].segnum = segnum; /* not really reqd ... maybe later */ UNSUPPORTED("89s0xn0ow2pfjhij4atarki22"); // qs[sk].left = i2; UNSUPPORTED("41dfb6dqvo0ska2nsf8cg7mlp"); // qs[sk].right = i1; UNSUPPORTED("e9qlif497bsjdb7r26vnxr6zv"); // qs[i1].nodetype = 3; UNSUPPORTED("20z4ufoaz5upwcj5cwcfdbsxt"); // qs[i1].trnum = tu; UNSUPPORTED("3sg533hzyg1vg1p3yue1tnscq"); // qs[i1].parent = sk; UNSUPPORTED("b7ik0xdl2ccze3lyok2lk1u8i"); // qs[i2].nodetype = 3; UNSUPPORTED("dw3di9wgg1xfyl4volkqwvr2a"); // qs[i2].trnum = tl; UNSUPPORTED("1aovaau4d0p4kaw0ceoit4mk8"); // qs[i2].parent = sk; UNSUPPORTED("bv09rvz94qyrsm8yxn6ib3gjz"); // tr[tu].sink = i1; UNSUPPORTED("edgs0wz1q5yh76ulwbge7k0y5"); // tr[tl].sink = i2; UNSUPPORTED("6lodj5exd6zj9qf7jjt4ajwcb"); // tfirst = tl; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9ai90pnlwcnwugiwlrp31rno1"); // else /* v0 already present */ UNSUPPORTED("1na80phemhx8r2c3bejhbvi9q"); // { /* Get the topmost intersecting trapezoid */ UNSUPPORTED("bux5mye3492eeh39qlfwu4h0i"); // tfirst = locate_endpoint(&s.v0, &s.v1, s.root0, seg, qs); UNSUPPORTED("9sgryoanil25eur6sx2wvst7w"); // tritop = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("73p090oxqw3wxq9qn6hpedl6r"); // if ((is_swapped) ? !inserted(segnum, seg, 1) : UNSUPPORTED("4nw2s0j85w6cpo3ch1vo46vxr"); // !inserted(segnum, seg, 2)) /* insert v1 in the tree */ UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("c8xc5g4gm8dkiy87rty8nml52"); // int tmp_d; UNSUPPORTED("8k5whoux68dwuz2ebzjwdz2lh"); // tu = locate_endpoint(&s.v1, &s.v0, s.root1, seg, qs); UNSUPPORTED("3vk36g0d9b4pv8frx4h1q7url"); // tl = newtrap(tr); /* tl is the new lower trapezoid */ UNSUPPORTED("1lylt0f9mi470jwcjjrujr0lv"); // tr[tl].state = 1; UNSUPPORTED("e36yrv3eo2yxyqvkbbxaji21d"); // tr[tl] = tr[tu]; UNSUPPORTED("7dp0os3ywo9qpt13od74hlz32"); // tr[tu].lo.y = tr[tl].hi.y = s.v1.y; UNSUPPORTED("b9h60u19dl3vo6dnfe9rl89ki"); // tr[tu].lo.x = tr[tl].hi.x = s.v1.x; UNSUPPORTED("5boxd28ndhyga6l1be8q33e4q"); // tr[tu].d0 = tl; UNSUPPORTED("40mjz1kftaduly7n34bovhzoa"); // tr[tu].d1 = 0; UNSUPPORTED("8ohfd1sq3vt575ufy2sejpq49"); // tr[tl].u0 = tu; UNSUPPORTED("er5qcoyhp181kav6eod7im5xk"); // tr[tl].u1 = 0; UNSUPPORTED("dmb9ggnvbbi4oj28pzhxe0i4s"); // if (((tmp_d = tr[tl].d0) > 0) && (tr[tmp_d].u0 == tu)) UNSUPPORTED("7dung2mkyltlpc6rn6xg2w2qa"); // tr[tmp_d].u0 = tl; UNSUPPORTED("6mzktvtijtpt77jiqbxio9zos"); // if (((tmp_d = tr[tl].d0) > 0) && (tr[tmp_d].u1 == tu)) UNSUPPORTED("4hk19hnhoihfn3k52lnb5wnmi"); // tr[tmp_d].u1 = tl; UNSUPPORTED("50ybcyf9j71skb8bxbrvd4wfo"); // if (((tmp_d = tr[tl].d1) > 0) && (tr[tmp_d].u0 == tu)) UNSUPPORTED("7dung2mkyltlpc6rn6xg2w2qa"); // tr[tmp_d].u0 = tl; UNSUPPORTED("burj10cn6158fzm20uvqf635h"); // if (((tmp_d = tr[tl].d1) > 0) && (tr[tmp_d].u1 == tu)) UNSUPPORTED("4hk19hnhoihfn3k52lnb5wnmi"); // tr[tmp_d].u1 = tl; UNSUPPORTED("511t3099c7ezfx13h8n2yb4qc"); // /* Now update the query structure and obtain the sinks for the */ UNSUPPORTED("c9xihvs3g1nqpo1l2de28bsb"); // /* two trapezoids */ UNSUPPORTED("csfd7w5pm87z8w5eoyoa2movw"); // i1 = newnode(); /* Upper trapezoid sink */ UNSUPPORTED("564u4l90sl4dmr5g58s7iqs8x"); // i2 = newnode(); /* Lower trapezoid sink */ UNSUPPORTED("7oz11ubssufczo1a50yljtcvy"); // sk = tr[tu].sink; UNSUPPORTED("b677gy1yh3616vmj895bab5b"); // qs[sk].nodetype = 2; UNSUPPORTED("b27knotih9bj8ve0japzl9l9v"); // qs[sk].yval = s.v1; UNSUPPORTED("bxfy7g6fyf60ts626mpqxu6se"); // qs[sk].segnum = segnum; /* not really reqd ... maybe later */ UNSUPPORTED("89s0xn0ow2pfjhij4atarki22"); // qs[sk].left = i2; UNSUPPORTED("41dfb6dqvo0ska2nsf8cg7mlp"); // qs[sk].right = i1; UNSUPPORTED("e9qlif497bsjdb7r26vnxr6zv"); // qs[i1].nodetype = 3; UNSUPPORTED("20z4ufoaz5upwcj5cwcfdbsxt"); // qs[i1].trnum = tu; UNSUPPORTED("3sg533hzyg1vg1p3yue1tnscq"); // qs[i1].parent = sk; UNSUPPORTED("b7ik0xdl2ccze3lyok2lk1u8i"); // qs[i2].nodetype = 3; UNSUPPORTED("dw3di9wgg1xfyl4volkqwvr2a"); // qs[i2].trnum = tl; UNSUPPORTED("1aovaau4d0p4kaw0ceoit4mk8"); // qs[i2].parent = sk; UNSUPPORTED("bv09rvz94qyrsm8yxn6ib3gjz"); // tr[tu].sink = i1; UNSUPPORTED("edgs0wz1q5yh76ulwbge7k0y5"); // tr[tl].sink = i2; UNSUPPORTED("n3654qaak8jk8d5on2gwnw3f"); // tlast = tu; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("71qg7qvginab7d0qflim4y82r"); // else /* v1 already present */ UNSUPPORTED("e56qskbf1f1spsk53sle0yg9x"); // { /* Get the lowermost intersecting trapezoid */ UNSUPPORTED("f5e0c0cb0tzted54oxk1lg8so"); // tlast = locate_endpoint(&s.v1, &s.v0, s.root1, seg, qs); UNSUPPORTED("19802pxxzzbhz30pxvxhuauza"); // tribot = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6or2wr1m9e6t9eswiywjcnari"); // /* Thread the segment into the query tree creating a new X-node */ UNSUPPORTED("953uyi8s6j0kjt6kii0ifi05n"); // /* First, split all the trapezoids which are intersected by s into */ UNSUPPORTED("2ec1eki04zl9bzcirfgpxwz1d"); // /* two */ UNSUPPORTED("7vltbln6jmb4dcnt727aotqu"); // t = tfirst; /* topmost trapezoid */ UNSUPPORTED("86huck5mq1n2xe2bgd5h0g4qh"); // while ((t > 0) && UNSUPPORTED("9a2osatsmh7im166493j5z9ql"); // _greater_than_equal_to(&tr[t].lo, &tr[tlast].lo)) UNSUPPORTED("8q0qvfyu6b98xudyzf1jey121"); // /* traverse from top to bot */ UNSUPPORTED("6ld19omy1z68vprfzbhrjqr2z"); // { UNSUPPORTED("c361t9ie1jl34waoz1qx7qglt"); // int t_sav, tn_sav; UNSUPPORTED("735i6dbhhrwalqp0rdzf1plzu"); // sk = tr[t].sink; UNSUPPORTED("11cd0f59j2rlnu33mg33fy21u"); // i1 = newnode(); /* left trapezoid sink */ UNSUPPORTED("8iq31y998euwxxys7lz4i0di5"); // i2 = newnode(); /* right trapezoid sink */ UNSUPPORTED("eki95gcvgxhhxodpx7hhb2ms"); // qs[sk].nodetype = 1; UNSUPPORTED("bic1vt1c10xyb4dh0jvmlwitc"); // qs[sk].segnum = segnum; UNSUPPORTED("1oop28nporjqqttdge2bzb9yr"); // qs[sk].left = i1; UNSUPPORTED("9j0y61zaus712wgthf8xl2bjs"); // qs[sk].right = i2; UNSUPPORTED("a2vaedsgrsasf749gokb7o6zn"); // qs[i1].nodetype = 3; /* left trapezoid (use existing one) */ UNSUPPORTED("d3wvuzqx7whtc7lkr3a1c6x1e"); // qs[i1].trnum = t; UNSUPPORTED("3sg533hzyg1vg1p3yue1tnscq"); // qs[i1].parent = sk; UNSUPPORTED("4f8cdthira5gw458qa3g8n1pw"); // qs[i2].nodetype = 3; /* right trapezoid (allocate new) */ UNSUPPORTED("72zn9njck31ow5p4cd7x2vhdp"); // qs[i2].trnum = tn = newtrap(tr); UNSUPPORTED("cs7pcwh6y85gsxjbjcd3fp4th"); // tr[tn].state = 1; UNSUPPORTED("1aovaau4d0p4kaw0ceoit4mk8"); // qs[i2].parent = sk; UNSUPPORTED("8tii09oyev9eg5v8tjs5xqnzi"); // if (t == tfirst) UNSUPPORTED("c7vntoti83d7nzm1pez02dojb"); // tfirstr = tn; UNSUPPORTED("4lrakx12kpsm7brfxuacfvepm"); // if (((fabs((&tr[t].lo)->y - (&tr[tlast].lo)->y) <= 1.0e-7) && (fabs((&tr[t].lo)->x - (&tr[tlast].lo)->x) <= 1.0e-7))) UNSUPPORTED("dyxxoq2rclqc042m49pabo5tu"); // tlastr = tn; UNSUPPORTED("3m5dvd9h55xvklqd7bt4yyg18"); // tr[tn] = tr[t]; UNSUPPORTED("4m7mubrux1t63hm4v0mbdoft0"); // tr[t].sink = i1; UNSUPPORTED("34b00t67vxmsuf1t0urk7kfni"); // tr[tn].sink = i2; UNSUPPORTED("5ilkt84avyzqnbgenie56bfpa"); // t_sav = t; UNSUPPORTED("1ndtxyyz47mtzmcxjr2kg61ci"); // tn_sav = tn; UNSUPPORTED("8fi9adh8qsrwfrgcxhrxnygb5"); // /* error */ UNSUPPORTED("9ufele7a3qptly4g8e4gzkr4u"); // if ((tr[t].d0 <= 0) && (tr[t].d1 <= 0)) /* case cannot arise */ UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("2j1bqg7boruaga6kpx00agtvb"); // fprintf(stderr, "add_segment: error\n"); UNSUPPORTED("5tzm1n3i8u3c1oms5ri2fiqbt"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("787ro5xblsfkpjif4xda30sc2"); // /* only one trapezoid below. partition t into two and make the */ UNSUPPORTED("5j474wt6fmynj8yasccaob1py"); // /* two resulting trapezoids t and tn as the upper neighbours of */ UNSUPPORTED("aqtupurtnt0dzlj5jafgtirwc"); // /* the sole lower trapezoid */ UNSUPPORTED("ewm9o917kyj2ae62y3e5bdvqf"); // else if ((tr[t].d0 > 0) && (tr[t].d1 <= 0)) UNSUPPORTED("9cj5nz12eopffdahw5emn4c08"); // { /* Only one trapezoid below */ UNSUPPORTED("6a1dcxf2rsr9zq5pxrpuecig1"); // if ((tr[t].u0 > 0) && (tr[t].u1 > 0)) UNSUPPORTED("4vladne5kzv3xueclq0sxcjho"); // { /* continuation of a chain from abv. */ UNSUPPORTED("bwewd7qprc37qhwxz3ko1y4uq"); // if (tr[t].usave > 0) /* three upper neighbours */ UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("esaqksoargwy10mkyzhmv2p9v"); // if (tr[t].uside == 1) UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("82gucb8vt172fhq2ug560dgje"); // tr[tn].u0 = tr[t].u1; UNSUPPORTED("lgzjorwqs1rmmyj7q8jzt16e"); // tr[t].u1 = -1; UNSUPPORTED("6wku8ik0lpiqemv9dmew6dodf"); // tr[tn].u1 = tr[t].usave; UNSUPPORTED("1h87mqh0ff7hg3ogzwu8daiai"); // tr[tr[t].u0].d0 = t; UNSUPPORTED("30jz3yn7hygbk25oykenqo2tp"); // tr[tr[tn].u0].d0 = tn; UNSUPPORTED("ehcdy9xx8x9l0nz0oybez912h"); // tr[tr[tn].u1].d0 = tn; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6cf2pwwuzbumwpxili1otryjb"); // else /* intersects in the right */ UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("1zxekgfse665xkba3vu2wy0c0"); // tr[tn].u1 = -1; UNSUPPORTED("82gucb8vt172fhq2ug560dgje"); // tr[tn].u0 = tr[t].u1; UNSUPPORTED("dedip96pnjatmrxwr3szb2ltb"); // tr[t].u1 = tr[t].u0; UNSUPPORTED("be5obz58np1ogzt1m8welxd6c"); // tr[t].u0 = tr[t].usave; UNSUPPORTED("1h87mqh0ff7hg3ogzwu8daiai"); // tr[tr[t].u0].d0 = t; UNSUPPORTED("2d4udv8v764lhooiia78atj4b"); // tr[tr[t].u1].d0 = t; UNSUPPORTED("72euqk1bum10xtl1bm12ug86r"); // tr[tr[tn].u0].d0 = tn; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("d52osx7vrtw97wm9ut9vfa5wj"); // tr[t].usave = tr[tn].usave = 0; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("91694gf7sahoxvmiw82owvef2"); // else /* No usave.... simple case */ UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("e2zdzb3rlpq6pieuayb44oijq"); // tr[tn].u0 = tr[t].u1; UNSUPPORTED("6291oktyj53xp9yslzj405wgb"); // tr[t].u1 = tr[tn].u1 = -1; UNSUPPORTED("ay4xwmue8kz8uzp2wgge6752p"); // tr[tr[tn].u0].d0 = tn; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("embybz3p65nxf0rx8b52bb0cj"); // else UNSUPPORTED("2auoskyvfrf0wu8ekti5fs1n4"); // { /* fresh seg. or upward cusp */ UNSUPPORTED("2hrv5rm87wox9rp79f6wpn619"); // int tmp_u = tr[t].u0; UNSUPPORTED("8zaj2aem34dupb1plqsm8uwk5"); // int td0, td1; UNSUPPORTED("6f3f5nfgz2txzlmdcntsu2yyx"); // if (((td0 = tr[tmp_u].d0) > 0) && UNSUPPORTED("7ed0ylnawdzj4xmtq0ih0wt7o"); // ((td1 = tr[tmp_u].d1) > 0)) UNSUPPORTED("8dh5ldf8m83e9ngo1yqfbo7m1"); // { /* upward cusp */ UNSUPPORTED("62v7ooft04km5zqvbpql7o5ps"); // if ((tr[td0].rseg > 0) && UNSUPPORTED("4hx3tu7xyeswnab7x0q6yoefl"); // !is_left_of(tr[td0].rseg, seg, &s.v1)) UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("201vn0jou9fcf0n2tjih472mz"); // tr[t].u0 = tr[t].u1 = tr[tn].u1 = -1; UNSUPPORTED("rg3tngg7tj2qgf4erhpbcau8"); // tr[tr[tn].u0].d1 = tn; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("crxpsdr3uqrfkq55ecsr4zuxi"); // else /* cusp going leftwards */ UNSUPPORTED("bkwn0jotk953x4wcx60j0p47f"); // { UNSUPPORTED("e9ql35kajykty3zsmtldh0wzb"); // tr[tn].u0 = tr[tn].u1 = tr[t].u1 = -1; UNSUPPORTED("1h87mqh0ff7hg3ogzwu8daiai"); // tr[tr[t].u0].d0 = t; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("dayzocp22vmevtvo1awep6h63"); // else /* fresh segment */ UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("1i8cfmzh5xxisiuekr63cd7hs"); // tr[tr[t].u0].d0 = t; UNSUPPORTED("694mejpoguhaimtc4oglzp817"); // tr[tr[t].u0].d1 = tn; UNSUPPORTED("5m5bo8wuz7zrobc77883wcpw1"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("e0kb482en9la96mrxyisdyquw"); // if ((fabs(tr[t].lo.y - tr[tlast].lo.y) <= 1.0e-7) && UNSUPPORTED("8d08n1tz1fajvu4tkkmyvqto3"); // (fabs(tr[t].lo.x - tr[tlast].lo.x) <= 1.0e-7) && tribot) UNSUPPORTED("2pqges4a601rkdgoh9ay4fwkc"); // { /* bottom forms a triangle */ UNSUPPORTED("74q36498zx96m389wznj126jh"); // if (is_swapped) UNSUPPORTED("c6l0dqua1wi4sm2nno83tqjpu"); // tmptriseg = seg[segnum].prev; UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // else UNSUPPORTED("cr8el00rgafuidxf7dkqmprk9"); // tmptriseg = seg[segnum].next; UNSUPPORTED("7m5vjpo3bvkkv7dehsu8lk1i0"); // if ((tmptriseg > 0) && is_left_of(tmptriseg, seg, &s.v0)) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("vgbcetfcktd1hjnqclhp7w01"); // /* L-R downward cusp */ UNSUPPORTED("5ippcybc2d61q6we5qdy4i2qa"); // tr[tr[t].d0].u0 = t; UNSUPPORTED("ejo4cyfym8ojporxegfwpinht"); // tr[tn].d0 = tr[tn].d1 = -1; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // else UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("eldt3ci812qmne3db4ojeuhz7"); // /* R-L downward cusp */ UNSUPPORTED("8g2jcubbcwsaaenx674f63kth"); // tr[tr[tn].d0].u1 = tn; UNSUPPORTED("3c4euuu782207qdjnwrjswbyy"); // tr[t].d0 = tr[t].d1 = -1; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // else UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("cad2a1rc10cprtvojmol6lcxf"); // if ((tr[tr[t].d0].u0 > 0) && (tr[tr[t].d0].u1 > 0)) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("6ilx5r7u9y1m64f57y23qxlii"); // if (tr[tr[t].d0].u0 == t) /* passes thru LHS */ UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("5my98yb1h8davodq05wl96zgu"); // tr[tr[t].d0].usave = tr[tr[t].d0].u1; UNSUPPORTED("5lykreqcj4w4ugg2fshp1085g"); // tr[tr[t].d0].uside = 1; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("12hbppj0gv84xkilzofj6ohze"); // else UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("azh2ilm9el27ve1j7t3o8lo3k"); // tr[tr[t].d0].usave = tr[tr[t].d0].u0; UNSUPPORTED("2wjhisme7ontii2rgbvel3qza"); // tr[tr[t].d0].uside = 2; UNSUPPORTED("ctzn5o8xqkywd73gcu6ofjsb7"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3vlkssstu9yp43651wjntawrq"); // tr[tr[t].d0].u0 = t; UNSUPPORTED("dy31y8zhzxmyas9wde5g3vvlh"); // tr[tr[t].d0].u1 = tn; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("er72bs1z1fiixf6x2m2ck5218"); // t = tr[t].d0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3vmznfuejkuwxfecdhhksjlqn"); // else if ((tr[t].d0 <= 0) && (tr[t].d1 > 0)) UNSUPPORTED("9cj5nz12eopffdahw5emn4c08"); // { /* Only one trapezoid below */ UNSUPPORTED("6a1dcxf2rsr9zq5pxrpuecig1"); // if ((tr[t].u0 > 0) && (tr[t].u1 > 0)) UNSUPPORTED("4vladne5kzv3xueclq0sxcjho"); // { /* continuation of a chain from abv. */ UNSUPPORTED("bwewd7qprc37qhwxz3ko1y4uq"); // if (tr[t].usave > 0) /* three upper neighbours */ UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("esaqksoargwy10mkyzhmv2p9v"); // if (tr[t].uside == 1) UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("82gucb8vt172fhq2ug560dgje"); // tr[tn].u0 = tr[t].u1; UNSUPPORTED("lgzjorwqs1rmmyj7q8jzt16e"); // tr[t].u1 = -1; UNSUPPORTED("6wku8ik0lpiqemv9dmew6dodf"); // tr[tn].u1 = tr[t].usave; UNSUPPORTED("1h87mqh0ff7hg3ogzwu8daiai"); // tr[tr[t].u0].d0 = t; UNSUPPORTED("30jz3yn7hygbk25oykenqo2tp"); // tr[tr[tn].u0].d0 = tn; UNSUPPORTED("ehcdy9xx8x9l0nz0oybez912h"); // tr[tr[tn].u1].d0 = tn; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6cf2pwwuzbumwpxili1otryjb"); // else /* intersects in the right */ UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("1zxekgfse665xkba3vu2wy0c0"); // tr[tn].u1 = -1; UNSUPPORTED("82gucb8vt172fhq2ug560dgje"); // tr[tn].u0 = tr[t].u1; UNSUPPORTED("dedip96pnjatmrxwr3szb2ltb"); // tr[t].u1 = tr[t].u0; UNSUPPORTED("be5obz58np1ogzt1m8welxd6c"); // tr[t].u0 = tr[t].usave; UNSUPPORTED("1h87mqh0ff7hg3ogzwu8daiai"); // tr[tr[t].u0].d0 = t; UNSUPPORTED("2d4udv8v764lhooiia78atj4b"); // tr[tr[t].u1].d0 = t; UNSUPPORTED("72euqk1bum10xtl1bm12ug86r"); // tr[tr[tn].u0].d0 = tn; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("d52osx7vrtw97wm9ut9vfa5wj"); // tr[t].usave = tr[tn].usave = 0; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("91694gf7sahoxvmiw82owvef2"); // else /* No usave.... simple case */ UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("e2zdzb3rlpq6pieuayb44oijq"); // tr[tn].u0 = tr[t].u1; UNSUPPORTED("6291oktyj53xp9yslzj405wgb"); // tr[t].u1 = tr[tn].u1 = -1; UNSUPPORTED("ay4xwmue8kz8uzp2wgge6752p"); // tr[tr[tn].u0].d0 = tn; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("embybz3p65nxf0rx8b52bb0cj"); // else UNSUPPORTED("2auoskyvfrf0wu8ekti5fs1n4"); // { /* fresh seg. or upward cusp */ UNSUPPORTED("2hrv5rm87wox9rp79f6wpn619"); // int tmp_u = tr[t].u0; UNSUPPORTED("8zaj2aem34dupb1plqsm8uwk5"); // int td0, td1; UNSUPPORTED("6f3f5nfgz2txzlmdcntsu2yyx"); // if (((td0 = tr[tmp_u].d0) > 0) && UNSUPPORTED("7ed0ylnawdzj4xmtq0ih0wt7o"); // ((td1 = tr[tmp_u].d1) > 0)) UNSUPPORTED("8dh5ldf8m83e9ngo1yqfbo7m1"); // { /* upward cusp */ UNSUPPORTED("62v7ooft04km5zqvbpql7o5ps"); // if ((tr[td0].rseg > 0) && UNSUPPORTED("4hx3tu7xyeswnab7x0q6yoefl"); // !is_left_of(tr[td0].rseg, seg, &s.v1)) UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("201vn0jou9fcf0n2tjih472mz"); // tr[t].u0 = tr[t].u1 = tr[tn].u1 = -1; UNSUPPORTED("rg3tngg7tj2qgf4erhpbcau8"); // tr[tr[tn].u0].d1 = tn; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("e77o5ieo3c02dom0f04cj7inv"); // else UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("e9ql35kajykty3zsmtldh0wzb"); // tr[tn].u0 = tr[tn].u1 = tr[t].u1 = -1; UNSUPPORTED("1h87mqh0ff7hg3ogzwu8daiai"); // tr[tr[t].u0].d0 = t; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("dayzocp22vmevtvo1awep6h63"); // else /* fresh segment */ UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("1i8cfmzh5xxisiuekr63cd7hs"); // tr[tr[t].u0].d0 = t; UNSUPPORTED("694mejpoguhaimtc4oglzp817"); // tr[tr[t].u0].d1 = tn; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("e0kb482en9la96mrxyisdyquw"); // if ((fabs(tr[t].lo.y - tr[tlast].lo.y) <= 1.0e-7) && UNSUPPORTED("8d08n1tz1fajvu4tkkmyvqto3"); // (fabs(tr[t].lo.x - tr[tlast].lo.x) <= 1.0e-7) && tribot) UNSUPPORTED("2pqges4a601rkdgoh9ay4fwkc"); // { /* bottom forms a triangle */ UNSUPPORTED("3xb6452d73nnzbrvxea9r7avd"); // /* int tmpseg; */ UNSUPPORTED("74q36498zx96m389wznj126jh"); // if (is_swapped) UNSUPPORTED("c6l0dqua1wi4sm2nno83tqjpu"); // tmptriseg = seg[segnum].prev; UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // else UNSUPPORTED("cr8el00rgafuidxf7dkqmprk9"); // tmptriseg = seg[segnum].next; UNSUPPORTED("c1pnfnnei4xmduu3ik7cdc40k"); // /* if ((tmpseg > 0) && is_left_of(tmpseg, seg, &s.v0)) */ UNSUPPORTED("7m5vjpo3bvkkv7dehsu8lk1i0"); // if ((tmptriseg > 0) && is_left_of(tmptriseg, seg, &s.v0)) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("7its0v1anhryibc6kbl7e3rih"); // /* L-R downward cusp */ UNSUPPORTED("8vwe6jjx4f0cxtyk1cjsred13"); // tr[tr[t].d1].u0 = t; UNSUPPORTED("ejo4cyfym8ojporxegfwpinht"); // tr[tn].d0 = tr[tn].d1 = -1; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // else UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("2j9f9vrzjshiti7k2l10sx84u"); // /* R-L downward cusp */ UNSUPPORTED("e1gz5epvwn4p0q5i8fveabsz8"); // tr[tr[tn].d1].u1 = tn; UNSUPPORTED("3c4euuu782207qdjnwrjswbyy"); // tr[t].d0 = tr[t].d1 = -1; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("1qf8h2an6bk6wlk3fyq6i22ad"); // } UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // else UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("dp2662k6f23gqdw8zett9yvym"); // if ((tr[tr[t].d1].u0 > 0) && (tr[tr[t].d1].u1 > 0)) UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("77i22g6l292mg0okyxnajy9gb"); // if (tr[tr[t].d1].u0 == t) /* passes thru LHS */ UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("42sveu7omg4ras47bkv0d1q9l"); // tr[tr[t].d1].usave = tr[tr[t].d1].u1; UNSUPPORTED("3u8ltfhvqrsqd7ghc6mp90sk9"); // tr[tr[t].d1].uside = 1; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("12hbppj0gv84xkilzofj6ohze"); // else UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("4pcz02ip4pmu4wcvx249zt3hg"); // tr[tr[t].d1].usave = tr[tr[t].d1].u0; UNSUPPORTED("16fb5zagcitmzonkbzu89irjk"); // tr[tr[t].d1].uside = 2; UNSUPPORTED("ctzn5o8xqkywd73gcu6ofjsb7"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6s5143onio335hfkk9om9l2a9"); // tr[tr[t].d1].u0 = t; UNSUPPORTED("6y4fvgf18azjngp3ph603viqk"); // tr[tr[t].d1].u1 = tn; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5ltskdvhhim7914v7bcvcdu1y"); // t = tr[t].d1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("d8ibg8ps7psb492dez8t19wv3"); // /* two trapezoids below. Find out which one is intersected by */ UNSUPPORTED("cpnw42brz1nujz70qenh15r33"); // /* this segment and proceed down that one */ UNSUPPORTED("e2koj2xocq76awegpydpyu62m"); // else UNSUPPORTED("98gvqspn5y1bfyr14rwoaqk67"); // { UNSUPPORTED("aeo0l7hd0tz385ecxm03tsqb1"); // /* int tmpseg = tr[tr[t].d0].rseg; */ UNSUPPORTED("21dtwfwxm34d3el5rfez2ddio"); // double y0, yt; UNSUPPORTED("ds4ikd3wmue9s0ynmtxz1aw74"); // pointf tmppt; UNSUPPORTED("ah7kj1y9wo89l5ql0wxxjuqlt"); // int tnext, i_d0, i_d1; UNSUPPORTED("9l5ekv5nqwnh36g4gcr1x82aj"); // i_d0 = i_d1 = (0); UNSUPPORTED("4z75kl9vosft7cj42ce1arxdo"); // if ((fabs(tr[t].lo.y - s.v0.y) <= 1.0e-7)) UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("c8cramjmaogq40iauxa5mwm71"); // if (tr[t].lo.x > s.v0.x) UNSUPPORTED("18rqvljf5nebs454zlt2irs1i"); // i_d0 = (!(0)); UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // else UNSUPPORTED("v34oktxyq713ipav88bmcfn6"); // i_d1 = (!(0)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("cm85lvkbze3joxoa0qgvj5d42"); // else UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("db0whoy6j8f6uwqf5v4ilkh4v"); // tmppt.y = y0 = tr[t].lo.y; UNSUPPORTED("e5hekltsjclzspvdy92oh7kbu"); // yt = (y0 - s.v0.y)/(s.v1.y - s.v0.y); UNSUPPORTED("f30z7uxjf30rbkx5rdbcrwsm4"); // tmppt.x = s.v0.x + yt * (s.v1.x - s.v0.x); UNSUPPORTED("b4znl042gb9xqbe7w3hs5cz0y"); // if (_less_than(&tmppt, &tr[t].lo)) UNSUPPORTED("18rqvljf5nebs454zlt2irs1i"); // i_d0 = (!(0)); UNSUPPORTED("3aqvmk5i0k4ue9zqfwhex7t14"); // else UNSUPPORTED("v34oktxyq713ipav88bmcfn6"); // i_d1 = (!(0)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("9hbp7chg2crbrb1u4rnba7190"); // /* check continuity from the top so that the lower-neighbour */ UNSUPPORTED("81ywl919vnapbffcabfhs0ntz"); // /* values are properly filled for the upper trapezoid */ UNSUPPORTED("6a1dcxf2rsr9zq5pxrpuecig1"); // if ((tr[t].u0 > 0) && (tr[t].u1 > 0)) UNSUPPORTED("4vladne5kzv3xueclq0sxcjho"); // { /* continuation of a chain from abv. */ UNSUPPORTED("bwewd7qprc37qhwxz3ko1y4uq"); // if (tr[t].usave > 0) /* three upper neighbours */ UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("esaqksoargwy10mkyzhmv2p9v"); // if (tr[t].uside == 1) UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("82gucb8vt172fhq2ug560dgje"); // tr[tn].u0 = tr[t].u1; UNSUPPORTED("lgzjorwqs1rmmyj7q8jzt16e"); // tr[t].u1 = -1; UNSUPPORTED("6wku8ik0lpiqemv9dmew6dodf"); // tr[tn].u1 = tr[t].usave; UNSUPPORTED("1h87mqh0ff7hg3ogzwu8daiai"); // tr[tr[t].u0].d0 = t; UNSUPPORTED("30jz3yn7hygbk25oykenqo2tp"); // tr[tr[tn].u0].d0 = tn; UNSUPPORTED("ehcdy9xx8x9l0nz0oybez912h"); // tr[tr[tn].u1].d0 = tn; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6cf2pwwuzbumwpxili1otryjb"); // else /* intersects in the right */ UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("1zxekgfse665xkba3vu2wy0c0"); // tr[tn].u1 = -1; UNSUPPORTED("82gucb8vt172fhq2ug560dgje"); // tr[tn].u0 = tr[t].u1; UNSUPPORTED("dedip96pnjatmrxwr3szb2ltb"); // tr[t].u1 = tr[t].u0; UNSUPPORTED("be5obz58np1ogzt1m8welxd6c"); // tr[t].u0 = tr[t].usave; UNSUPPORTED("1h87mqh0ff7hg3ogzwu8daiai"); // tr[tr[t].u0].d0 = t; UNSUPPORTED("2d4udv8v764lhooiia78atj4b"); // tr[tr[t].u1].d0 = t; UNSUPPORTED("72euqk1bum10xtl1bm12ug86r"); // tr[tr[tn].u0].d0 = tn; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("d52osx7vrtw97wm9ut9vfa5wj"); // tr[t].usave = tr[tn].usave = 0; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("91694gf7sahoxvmiw82owvef2"); // else /* No usave.... simple case */ UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("e2zdzb3rlpq6pieuayb44oijq"); // tr[tn].u0 = tr[t].u1; UNSUPPORTED("ddpnvdcma38disf8tyw74xp3g"); // tr[tn].u1 = -1; UNSUPPORTED("dqxje9ppj2ffgivrfpyid7ffd"); // tr[t].u1 = -1; UNSUPPORTED("ay4xwmue8kz8uzp2wgge6752p"); // tr[tr[tn].u0].d0 = tn; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("embybz3p65nxf0rx8b52bb0cj"); // else UNSUPPORTED("2auoskyvfrf0wu8ekti5fs1n4"); // { /* fresh seg. or upward cusp */ UNSUPPORTED("2hrv5rm87wox9rp79f6wpn619"); // int tmp_u = tr[t].u0; UNSUPPORTED("8zaj2aem34dupb1plqsm8uwk5"); // int td0, td1; UNSUPPORTED("6f3f5nfgz2txzlmdcntsu2yyx"); // if (((td0 = tr[tmp_u].d0) > 0) && UNSUPPORTED("7ed0ylnawdzj4xmtq0ih0wt7o"); // ((td1 = tr[tmp_u].d1) > 0)) UNSUPPORTED("8dh5ldf8m83e9ngo1yqfbo7m1"); // { /* upward cusp */ UNSUPPORTED("62v7ooft04km5zqvbpql7o5ps"); // if ((tr[td0].rseg > 0) && UNSUPPORTED("4hx3tu7xyeswnab7x0q6yoefl"); // !is_left_of(tr[td0].rseg, seg, &s.v1)) UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("201vn0jou9fcf0n2tjih472mz"); // tr[t].u0 = tr[t].u1 = tr[tn].u1 = -1; UNSUPPORTED("rg3tngg7tj2qgf4erhpbcau8"); // tr[tr[tn].u0].d1 = tn; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("e77o5ieo3c02dom0f04cj7inv"); // else UNSUPPORTED("4tol1smeoe31nndhs3aq3vdlq"); // { UNSUPPORTED("e9ql35kajykty3zsmtldh0wzb"); // tr[tn].u0 = tr[tn].u1 = tr[t].u1 = -1; UNSUPPORTED("1h87mqh0ff7hg3ogzwu8daiai"); // tr[tr[t].u0].d0 = t; UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("dayzocp22vmevtvo1awep6h63"); // else /* fresh segment */ UNSUPPORTED("3lflizih274xjqgv1g0wjdgeq"); // { UNSUPPORTED("1i8cfmzh5xxisiuekr63cd7hs"); // tr[tr[t].u0].d0 = t; UNSUPPORTED("694mejpoguhaimtc4oglzp817"); // tr[tr[t].u0].d1 = tn; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("e0kb482en9la96mrxyisdyquw"); // if ((fabs(tr[t].lo.y - tr[tlast].lo.y) <= 1.0e-7) && UNSUPPORTED("8d08n1tz1fajvu4tkkmyvqto3"); // (fabs(tr[t].lo.x - tr[tlast].lo.x) <= 1.0e-7) && tribot) UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("4i449ebwuk75bwvj3njk3c62q"); // /* this case arises only at the lowest trapezoid.. i.e. UNSUPPORTED("chl5iuvrjyna1uuc1kjo3qe67"); // tlast, if the lower endpoint of the segment is UNSUPPORTED("9x1ytb8hzdseof3w011rw1vo6"); // already inserted in the structure */ UNSUPPORTED("3vlkssstu9yp43651wjntawrq"); // tr[tr[t].d0].u0 = t; UNSUPPORTED("m24vo48yuozp20pg0jewoocj"); // tr[tr[t].d0].u1 = -1; UNSUPPORTED("bqsxgabpkfrz4qsvsfyt54x4d"); // tr[tr[t].d1].u0 = tn; UNSUPPORTED("5pcabowqh0osy2bara83fy53g"); // tr[tr[t].d1].u1 = -1; UNSUPPORTED("9akd96bko966x16jg4ghdofjt"); // tr[tn].d0 = tr[t].d1; UNSUPPORTED("ez9y4mtzds5q3em5b2h4m0dj"); // tr[t].d1 = tr[tn].d1 = -1; UNSUPPORTED("7zlu4fl3iisiyyfhc8efkikq2"); // tnext = tr[t].d1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("7ekeyr3kxnx2g4xkar2e97ujg"); // else if (i_d0) UNSUPPORTED("df98v04w3tfu8ysuydsf7y85a"); // /* intersecting d0 */ UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("3vlkssstu9yp43651wjntawrq"); // tr[tr[t].d0].u0 = t; UNSUPPORTED("dy31y8zhzxmyas9wde5g3vvlh"); // tr[tr[t].d0].u1 = tn; UNSUPPORTED("bqsxgabpkfrz4qsvsfyt54x4d"); // tr[tr[t].d1].u0 = tn; UNSUPPORTED("5pcabowqh0osy2bara83fy53g"); // tr[tr[t].d1].u1 = -1; UNSUPPORTED("f4j0by9ay0t0diwmyfz091taa"); // /* new code to determine the bottom neighbours of the */ UNSUPPORTED("62pe8dmdbu3mmvgi9x43iqe6b"); // /* newly partitioned trapezoid */ UNSUPPORTED("6qcsr9br9c9peep8mzd4eldpu"); // tr[t].d1 = -1; UNSUPPORTED("7n0btjlxfoym1gc1tkc5zrbdg"); // tnext = tr[t].d0; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("et6v36d4wyvf6eg7htev3s7m9"); // else /* intersecting d1 */ UNSUPPORTED("6dbei3uox5ql5a1vaaguh0xzp"); // { UNSUPPORTED("3vlkssstu9yp43651wjntawrq"); // tr[tr[t].d0].u0 = t; UNSUPPORTED("m24vo48yuozp20pg0jewoocj"); // tr[tr[t].d0].u1 = -1; UNSUPPORTED("6s5143onio335hfkk9om9l2a9"); // tr[tr[t].d1].u0 = t; UNSUPPORTED("6y4fvgf18azjngp3ph603viqk"); // tr[tr[t].d1].u1 = tn; UNSUPPORTED("f4j0by9ay0t0diwmyfz091taa"); // /* new code to determine the bottom neighbours of the */ UNSUPPORTED("62pe8dmdbu3mmvgi9x43iqe6b"); // /* newly partitioned trapezoid */ UNSUPPORTED("9akd96bko966x16jg4ghdofjt"); // tr[tn].d0 = tr[t].d1; UNSUPPORTED("41y3k6fjtt5tbdx3goo3bnr1i"); // tr[tn].d1 = -1; UNSUPPORTED("da00twqjxr6q0clcep0wcdlql"); // tnext = tr[t].d1; UNSUPPORTED("1dgkp19ct6hczd1425v8q1dct"); // } UNSUPPORTED("6fwmq6tx1y4cibphzm0f4wakm"); // t = tnext; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e44ec6lx2mkb3zz7hmhjx90rq"); // tr[t_sav].rseg = tr[tn_sav].lseg = segnum; UNSUPPORTED("65mlofu9i9895kq8xkb6x103e"); // } /* end-while */ UNSUPPORTED("8rkpqhwjgyuqdygp3b2o580ff"); // /* Now combine those trapezoids which share common segments. We can */ UNSUPPORTED("cklqh43b0korps6nmg2eefd70"); // /* use the pointers to the parent to connect these together. This */ UNSUPPORTED("nzam565p5xaq9ashe9ekcjks"); // /* works only because all these new trapezoids have been formed */ UNSUPPORTED("81u7z601i80he54qa00v17ami"); // /* due to splitting by the segment, and hence have only one parent */ UNSUPPORTED("cn4qmoxsrclu3q3mbcc9ff7fw"); // tfirstl = tfirst; UNSUPPORTED("duhakllu2zu2zvohf6zxwdnqc"); // tlastl = tlast; UNSUPPORTED("36mff9r0jqhoc1chz9zqbk3x1"); // merge_trapezoids(segnum, tfirstl, tlastl, 1, tr, qs); UNSUPPORTED("aldx6ji29f73y5modmaxg9zs9"); // merge_trapezoids(segnum, tfirstr, tlastr, 2, tr, qs); UNSUPPORTED("5e3z4o423d4ob6d3adzxdeipj"); // seg[segnum].is_inserted = (!(0)); UNSUPPORTED("bid671dovx1rdiquw5vm3fttj"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7afsay7ejf6pnu6atsg7glt53 // static void find_new_roots(int segnum, segment_t* seg, trap_t* tr, qnode_t* qs) public static Object find_new_roots(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("hytfu5b4w9vy61qxrhvzemj3"); // find_new_roots(int segnum, segment_t* seg, trap_t* tr, qnode_t* qs) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("55wy1clqaecn10s0jetfvt04s"); // segment_t *s = &seg[segnum]; UNSUPPORTED("13js9c1rj1roq5meh748h5zjy"); // if (s->is_inserted) return; UNSUPPORTED("3v99ch3hok3ae2fl5leqyzkd7"); // s->root0 = locate_endpoint(&s->v0, &s->v1, s->root0, seg, qs); UNSUPPORTED("7xdyqtj001z8eqv93gzye5r0k"); // s->root0 = tr[s->root0].sink; UNSUPPORTED("azljsp4ofo8uf3sqfwo50lv7y"); // s->root1 = locate_endpoint(&s->v1, &s->v0, s->root1, seg, qs); UNSUPPORTED("4cgieg4q0okhq82lczulvj2ok"); // s->root1 = tr[s->root1].sink; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1ftshkxhp22o0xgh3kuc3sile // static int math_logstar_n(int n) public static Object math_logstar_n(Object... arg) { UNSUPPORTED("3a94rmq48cptlea8l9svm2vdf"); // static int math_logstar_n(int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9cyat6ft4tmgpumn70l9fwydy"); // register int i; UNSUPPORTED("6om7utuy6ofppg87j05edy4cy"); // double v; UNSUPPORTED("2r6ldqvvcn5lqu4qdj5pias2v"); // for (i = 0, v = (double) n; v >= 1; i++) UNSUPPORTED("1d99ficfyx27epymfs7pc5c4"); // v = (log(v)/log(2)); UNSUPPORTED("17678qqlxjn7yfcjfzl0pk4ao"); // return (i - 1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 20alp7vy21dvsx8ums8pezh3o // static int math_N(int n, int h) public static Object math_N(Object... arg) { UNSUPPORTED("dd4ge3rbi53dw0wh8a3si1jh7"); // static int math_N(int n, int h) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9cyat6ft4tmgpumn70l9fwydy"); // register int i; UNSUPPORTED("6om7utuy6ofppg87j05edy4cy"); // double v; UNSUPPORTED("ujffxxrs7gz2vawl37d9jslq"); // for (i = 0, v = (int) n; i < h; i++) UNSUPPORTED("1d99ficfyx27epymfs7pc5c4"); // v = (log(v)/log(2)); UNSUPPORTED("enxjvr50hyamoic6g6lwxie70"); // return (int) ceil((double) 1.0*n/v); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9jpwujop3smqitn3gmtcrcixm // int construct_trapezoids(int nseg, segment_t* seg, int* permute, int ntraps, trap_t* tr) public static Object construct_trapezoids(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("cywexw0hiyl2gthuawhdixmym"); // construct_trapezoids(int nseg, segment_t* seg, int* permute, int ntraps, UNSUPPORTED("benaopemb2t6pehss4gcdybzb"); // trap_t* tr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("c4yv5wsz9md0n246eno8qs5et"); // int root, h; UNSUPPORTED("1c0phmc3iq7tb3sotrpcjoup9"); // int segi = 1; UNSUPPORTED("7jamhwzh4w6lx0bpq57thdtpt"); // qnode_t* qs; UNSUPPORTED("1yqtu5d20wep1ymxy1y0nv1g0"); // QSIZE = 2*ntraps; UNSUPPORTED("3mcur34pgw6444857byhvmgs5"); // TRSIZE = ntraps; UNSUPPORTED("alj695bdzyptc3wnccsnyuano"); // qs = (qnode_t*)zmalloc((2*ntraps)*sizeof(qnode_t)); UNSUPPORTED("eroaf3tk5y6euf62it6cxn758"); // q_idx = tr_idx = 1; UNSUPPORTED("873fgjnxtke0s60r4k3bn0se8"); // memset((void *)tr, 0, ntraps*sizeof(trap_t)); UNSUPPORTED("dznan6lx9lxucsy4yr6edbkas"); // /* Add the first segment and get the query structure and trapezoid */ UNSUPPORTED("acrntweri3uun3ahwdudmq1bc"); // /* list initialised */ UNSUPPORTED("57gkh96bcrh9z87hoeeqq9nw4"); // root = init_query_structure(permute[segi++], seg, tr, qs); UNSUPPORTED("56oij2ngkqcxgpihju021plmr"); // for (i = 1; i <= nseg; i++) UNSUPPORTED("137jp8s4g6ip477ywoxna6hr4"); // seg[i].root0 = seg[i].root1 = root; UNSUPPORTED("56osqlqd8y3slj5zr13d4grc7"); // for (h = 1; h <= math_logstar_n(nseg); h++) { UNSUPPORTED("tmjwiqe8s4q112nev98zolt7"); // for (i = math_N(nseg, h -1) + 1; i <= math_N(nseg, h); i++) UNSUPPORTED("bk608pqmg2xw7fpucgxkgwhmo"); // add_segment(permute[segi++], seg, tr, qs); UNSUPPORTED("9lu6zl26144vbdgsqc1mc6wwz"); // /* Find a new root for each of the segment endpoints */ UNSUPPORTED("d1y51tnl70njrosh5iimn6xmx"); // for (i = 1; i <= nseg; i++) UNSUPPORTED("cfk5n685oegsos34urlk5307z"); // find_new_roots(i, seg, tr, qs); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4sfugdwxcf71d498tnurlvs5"); // for (i = math_N(nseg, math_logstar_n(nseg)) + 1; i <= nseg; i++) UNSUPPORTED("eqduqz9al6zdpuhe8fsvnn2en"); // add_segment(permute[segi++], seg, tr, qs); UNSUPPORTED("5olrlwcgauazrftmytyls44zs"); // free (qs); UNSUPPORTED("awblwd52926w1zhpsot3aqld9"); // return tr_idx; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/pack/000077500000000000000000000000001312650303100167025ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/lib/pack/ccomps__c.java000066400000000000000000001627031312650303100215030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.pack; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; import smetana.core.jmp_buf; public class ccomps__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 exy2l03ceq9zw4vf01bbd4d3o // typedef unsigned int packval_t //1 540u5gu9i0x1wzoxqqx5n2vwp // static jmp_buf jbuf private static jmp_buf jbuf = new jmp_buf(); //3 ewv0wgzjcdnccieiofn923tzs // static void initStk(stk_t* sp, blk_t* bp, Agnode_t** base, void (*actionfn) (Agnode_t *, void *), int (*markfn) (Agnode_t *, int)) public static Object initStk(Object... arg) { UNSUPPORTED("4owkhdzsvdc67eibb0hkce52q"); // static void initStk(stk_t* sp, blk_t* bp, Agnode_t** base, void (*actionfn) (Agnode_t *, void *), UNSUPPORTED("2ugi0pnat35n3v5vu8m6wo8c9"); // int (*markfn) (Agnode_t *, int)) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4cbv5zljxbezjfjh2w96uqzqo"); // bp->data = base; UNSUPPORTED("426ak2yitexsg6w4qx8qa3hhn"); // bp->endp = bp->data + 1024; UNSUPPORTED("cobh6ukbtrqg5kazfkb5qbwos"); // bp->prev = bp->next = NULL; UNSUPPORTED("d0y7isc6mkt4zs7cuxs0z8cbi"); // sp->curblk = sp->fstblk = bp; UNSUPPORTED("4plit1pai1xwb6lmp8vxdw765"); // sp->curp = sp->curblk->data; UNSUPPORTED("6jgugocuz58zaphptxebwqqu0"); // sp->actionfn = actionfn; UNSUPPORTED("40ff66oit4kaivk88m97roufs"); // sp->markfn = markfn; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 avbxwaxrnn1f4ijqvx6vxj4v9 // static void freeBlk (blk_t* bp) public static Object freeBlk(Object... arg) { UNSUPPORTED("29r3rvz6nqb5jkizgs6l1gfir"); // static void freeBlk (blk_t* bp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ac5kl6l72wqbpu92jfnqucas5"); // free (bp->data); UNSUPPORTED("c9jxbo3hkfopwopqpnypylnqn"); // free (bp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 905gm18k22sxeiqmefouokdo7 // static void freeStk (stk_t* sp) public static Object freeStk(Object... arg) { UNSUPPORTED("7voev7gkgzy2irm66y8o7lv98"); // static void freeStk (stk_t* sp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("80y0y8nl1rhrvjhyidchkoszx"); // blk_t* bp; UNSUPPORTED("2hg7cngzjwbp4pra1mt6hm7c8"); // blk_t* nxtbp; UNSUPPORTED("bxbujse1qlvr5o62jaz7w882b"); // for (bp = sp->fstblk->next; bp; bp = nxtbp) { UNSUPPORTED("9ongyx2cs1pmip1padbv3faub"); // nxtbp = bp->next; UNSUPPORTED("8nhlz8mf83z61xbe7ebmuvrvg"); // freeBlk (bp); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 hd5g5m1klfh6fir1b88dxxy0 // static void push(stk_t* sp, Agnode_t * np) public static Object push(Object... arg) { UNSUPPORTED("4mi4cbphlu8woard9ipkskhxa"); // static void push(stk_t* sp, Agnode_t * np) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7sn7er3kav3y1pmuuel14uk4g"); // if (sp->curp == sp->curblk->endp) { UNSUPPORTED("7ejfjo9ujnhxt1brqoyvda98z"); // if (sp->curblk->next == NULL) { UNSUPPORTED("8p9lw9k3c5g8o70jiwpc4khxg"); // blk_t *bp = (blk_t*)gmalloc(sizeof(blk_t)); UNSUPPORTED("vmqejt4xnnxkowx9kdfiom2v"); // if (bp == 0) { UNSUPPORTED("64rnd8pm27zc8ih7z4lo209g6"); // agerr(AGERR, "gc: Out of memory\n"); UNSUPPORTED("6a6l5zrquzjwwujlojo3bxgmx"); // longjmp(jbuf, 1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("8lzokfu3379ms29120i1pi1u7"); // bp->prev = sp->curblk; UNSUPPORTED("5355u0h1ffziua427nbgktm4f"); // bp->next = NULL; UNSUPPORTED("10q0f3r7358yitvftkhg0ndxj"); // bp->data = (Agnode_t **)gmalloc((1000000)*sizeof(Agnode_t *)); UNSUPPORTED("7cdsxgqqn6n13r36rho1tazbr"); // if (bp->data == 0) { UNSUPPORTED("64rnd8pm27zc8ih7z4lo209g6"); // agerr(AGERR, "gc: Out of memory\n"); UNSUPPORTED("6a6l5zrquzjwwujlojo3bxgmx"); // longjmp(jbuf, 1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("6di34zac4wnahzd9mi35073nv"); // bp->endp = bp->data + 1000000; UNSUPPORTED("4t6bbh2oqn8c69wf8nk793yd0"); // sp->curblk->next = bp; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ch08fzplwlydp5ixuffkebkjo"); // sp->curblk = sp->curblk->next; UNSUPPORTED("2wgliq4kn3k88bzp6t95d09ox"); // sp->curp = sp->curblk->data; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ct5glogt08r7tscahocggmdfc"); // ((sp)->markfn(np,1)); UNSUPPORTED("9sik0jiysxoobhzxy0ak66cpp"); // *sp->curp++ = np; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e6guowi184k24c0h3wmo4jgwi // static Agnode_t *pop(stk_t* sp) public static Object pop(Object... arg) { UNSUPPORTED("f2vfqjdyjli6458h1bzgg94f4"); // static Agnode_t *pop(stk_t* sp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("brdzto4291wjh8nzcp3nalomf"); // if (sp->curp == sp->curblk->data) { UNSUPPORTED("35z2251j4uecu4a3nol54xs6x"); // if (sp->curblk == sp->fstblk) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("3ilhmneazyfaw2w1tuqpbo2bm"); // sp->curblk = sp->curblk->prev; UNSUPPORTED("av0wsua2iig5is0rmch044ib2"); // sp->curp = sp->curblk->endp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8sjk9jdrp04i7gd4folcevdaz"); // sp->curp--; UNSUPPORTED("4c0inpy6hwyly336ksznoypxk"); // return *sp->curp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4qon7xpbucrl2h3x79m1mrhdy // static int dfs(Agraph_t * g, Agnode_t * n, void *state, stk_t* stk) public static Object dfs(Object... arg) { UNSUPPORTED("c6pqde78hulcrl0f3eogd7ib3"); // static int dfs(Agraph_t * g, Agnode_t * n, void *state, stk_t* stk) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("cbgfck2y57x0eyijt2684hs46"); // Agnode_t *other; UNSUPPORTED("behjm5bjsenezpg3f7cncvteu"); // int cnt = 0; UNSUPPORTED("6ahe2jq1dzq4y0pnmufi2vw3u"); // push (stk, n); UNSUPPORTED("dgfqwrzjkj3ev00ljgm6ayh9m"); // while ((n = pop(stk))) { UNSUPPORTED("1szm63athnlkprt3pv29pjc6z"); // cnt++; UNSUPPORTED("czpypkhhg6vw19r3ysrzw0g7x"); // if (stk->actionfn) stk->actionfn(n, state); UNSUPPORTED("5pyyxln0sos0bzz7gqoxiygvs"); // for (e = agfstedge(g, n); e; e = agnxtedge(g, e, n)) { UNSUPPORTED("efh17yk4k8csgso8w3lpvem9j"); // if ((other = agtail(e)) == n) UNSUPPORTED("51ukauobgihi6jj53ljaewspy"); // other = aghead(e); UNSUPPORTED("3i6jyepdzfttpuanl9xkt3l74"); // if (!((stk)->markfn(other,-1))) UNSUPPORTED("2r2yl007yl5rb5pi6ykq8ze9m"); // push(stk, other); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3zkt5kbq3sockq663o3s3ync7"); // return cnt; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 174yjh9lnitag5picxfy766ci // static int isLegal(char *p) public static Object isLegal(Object... arg) { UNSUPPORTED("49bgdm1mc1l4egxrugqfcsxft"); // static int isLegal(char *p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("10sir32iwi5l2jyfgp65pihto"); // unsigned char c; UNSUPPORTED("73mude5vwxafdk7a208ydvwwk"); // while ((c = *(unsigned char *) p++)) { UNSUPPORTED("c704d9cbejqs424vb7en49y9c"); // if ((c != '_') && !isalnum(c)) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5st5bmswl1esywsmkbn2ncrq8 // static void insertFn(Agnode_t * n, void *state) public static Object insertFn(Object... arg) { UNSUPPORTED("dfx1qatv0ncgh1c0k5xc2mgs"); // static void insertFn(Agnode_t * n, void *state) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("314x2h86n0dnk8f7lk9qju5ev"); // agsubnode((Agraph_t *) state,n,1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6rise12p1nj7fgxw063r6ta8i // static int markFn (Agnode_t* n, int v) public static Object markFn(Object... arg) { UNSUPPORTED("756hr5llx7m5qrjsd89e43sih"); // static int markFn (Agnode_t* n, int v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7p7i4cv4qt10ow22vl9znw72j"); // int ret; UNSUPPORTED("bb4ryyd0u2nyew8s02tgj44mz"); // if (v < 0) return ND_mark(n); UNSUPPORTED("agb9yqeh2hgzfwhn99lhe9nej"); // ret = ND_mark(n); UNSUPPORTED("ez00xa01bio9a8f4bkdnqthwe"); // ND_mark(n) = v; UNSUPPORTED("f3b7mj138albdr4lodyomke0z"); // return ret; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9m4rpn5fxnq9fz0xjsa7cwl // static char* setPrefix (char* pfx, int* lenp, char* buf, int buflen) public static Object setPrefix(Object... arg) { UNSUPPORTED("1yranxmu2maol02ulzd1ka1re"); // static char* UNSUPPORTED("5vpw3fxc1m9xx0a9kbusu2lu4"); // setPrefix (char* pfx, int* lenp, char* buf, int buflen) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dwe86466ugstemepdfk8yzphz"); // int len; UNSUPPORTED("euqqtidhrr0boizgvrdl79ed9"); // char* name; UNSUPPORTED("1c7sond4zth2sag1wbbl3t222"); // if (!pfx || !isLegal(pfx)) { UNSUPPORTED("2844112cattqbxvd6b7ce564t"); // pfx = "_cc_"; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8hiwachi0j9lvf75thphnbcg6"); // len = strlen(pfx); UNSUPPORTED("5gzy2dz1vy190rh06xgh0m5u5"); // if (len + 25 <= buflen) UNSUPPORTED("d77612sl11xi52ir9qb9xlbj1"); // name = buf; UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("n9xihlwlyyntpy3723l3tn20"); // if (!(name = (char *) gmalloc(len + 25))) return NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("byt633e1ijrc7va3qghegkhgf"); // strcpy(name, pfx); UNSUPPORTED("54tcra08tvmrr18bbqnrzq2ty"); // *lenp = len; UNSUPPORTED("d8c692wl5ut9pklgbb0o4igud"); // return name; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 29iykhzfyaspduditcr7ufri3 // Agraph_t **pccomps(Agraph_t * g, int *ncc, char *pfx, boolean * pinned) public static Object pccomps(Object... arg) { UNSUPPORTED("9592a0sohpkfkhnxqgkd1t8xx"); // Agraph_t **pccomps(Agraph_t * g, int *ncc, char *pfx, boolean * pinned) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("azrybezo3qgwcugn67vwwsfjq"); // int c_cnt = 0; UNSUPPORTED("9v478fb3v8s4hrtw6o447bhau"); // char buffer[128]; UNSUPPORTED("8i0d7frxcvvmzhidle0zin9i0"); // char *name; UNSUPPORTED("eyezi8gbtgev1y2marpkc69yj"); // Agraph_t *out = 0; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("8i0oxshyd0x2idt42lftg3zjx"); // Agraph_t **ccs; UNSUPPORTED("dwe86466ugstemepdfk8yzphz"); // int len; UNSUPPORTED("2bcwwo628380s594v69l4227q"); // int bnd = 10; UNSUPPORTED("8b988hcz92alr94zkfaa6fzf2"); // boolean pin = 0; UNSUPPORTED("7yhkdqak81ozlnttsdgys1u73"); // stk_t stk; UNSUPPORTED("569n8uukmri0xiy62ctofxq74"); // blk_t blk; UNSUPPORTED("4rzpakwprbbiyxu0p7mszvgt"); // Agnode_t* base[1024]; UNSUPPORTED("bhqjv6dj0aycz89qaoyr18yjt"); // int error = 0; UNSUPPORTED("254mtuuhqbzuf93i7qlphavdc"); // if (agnnodes(g) == 0) { UNSUPPORTED("5ojqtedar4ecf884rvp0r36iu"); // *ncc = 0; UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ajoz89eaec73wuy8zxf06ifo4"); // name = setPrefix (pfx, &len, buffer, 128); UNSUPPORTED("f3456xelgcn1uercqhtm0lkq7"); // ccs = (Agraph_t **)gmalloc((bnd)*sizeof(Agraph_t *)); UNSUPPORTED("bxcxf1l5mkrh3ledoksmyvts5"); // initStk (&stk, &blk, base, insertFn, markFn); UNSUPPORTED("16hw9gw0dz2w7mrtba0eoqrdi"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("d9gqryaqwhyp5tgpniv6hnwv2"); // ((&stk)->markfn(n,0)); UNSUPPORTED("ci9r8sj8tbc6yer5c8cebb0cm"); // if (setjmp(jbuf)) { UNSUPPORTED("9kfwhlafp0jfjaqja0h7o44j3"); // error = 1; UNSUPPORTED("ek2tuwzllhwxjyaifgtzhek1p"); // goto packerror; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6td879ed4e8kzbz3j6eslw7sk"); // /* Component with pinned nodes */ UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("3jk51f0a1c8hnomknt8lim471"); // if (((&stk)->markfn(n,-1)) || !(ND_pinned(n) == 3)) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("6mjcpt5xx0wfprtp5g7cw8rf4"); // if (!out) { UNSUPPORTED("7g01291mlr17yn51m62mweoca"); // sprintf(name + len, "%d", c_cnt); UNSUPPORTED("cjsaclfsdg5p4yky4tv82slc6"); // out = agsubg(g, name,1); UNSUPPORTED("24tepx4mk3tk4cwf5xg5eff9g"); // agbindrec(out, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); //node custom data UNSUPPORTED("38fxwar8xtrbq4ks8ba6j4pd4"); // ccs[c_cnt] = out; UNSUPPORTED("53kaio4ritpla1m5kb2tf7q3o"); // c_cnt++; UNSUPPORTED("1gzrmotgur9t2cexqgiw7ssd4"); // pin = NOT(0); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("egn0zid00hgedez76ffqesyvo"); // dfs (g, n, out, &stk); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a48f7fcfqvwf0yg64qt36uxdg"); // /* Remaining nodes */ UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("es7cb1ubgfdb9vo8q5y32753t"); // if (((&stk)->markfn(n,-1))) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("7aaiftnzi12afb1li6dqj6aga"); // sprintf(name + len, "%d", c_cnt); UNSUPPORTED("8vra9mk0wz2njkvxa4nnvxevo"); // out = agsubg(g, name,1); UNSUPPORTED("e6e58g6ou2zwwtnjzww36hem2"); // agbindrec(out, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); //node custom data UNSUPPORTED("94s85ldn0q9223lgg7zmt3zsp"); // dfs(g, n, out, &stk); UNSUPPORTED("dn9pcjtlvoi17ds4bm8ppc6wa"); // if (c_cnt == bnd) { UNSUPPORTED("esme9v58cizis473mukmd87qb"); // bnd *= 2; UNSUPPORTED("d3tfv1o5r3ymjk84qnbz7ayxc"); // ccs = RALLOC(bnd, ccs, Agraph_t *); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("etwpnr04bwdr2egdjyg4e4emw"); // ccs[c_cnt] = out; UNSUPPORTED("axd6jb2bjqul4a1junq61zc7n"); // c_cnt++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("51l3e2kz0gd0fbdng1rtuerf3"); // packerror: UNSUPPORTED("7hwkgfwulgopzu68jf9894c53"); // freeStk (&stk); UNSUPPORTED("47276yunfeevpru1276of6w85"); // if (name != buffer) UNSUPPORTED("bwp196o8phb9mx2d8yw1b9mhi"); // free(name); UNSUPPORTED("e86x7y7gnx93hxjdfw9c7g7tl"); // if (error) { UNSUPPORTED("bbuxsg26kpzb2fl660hjri9l8"); // int i; UNSUPPORTED("5ojqtedar4ecf884rvp0r36iu"); // *ncc = 0; UNSUPPORTED("1a1pbowm86vviazmczqetcv2d"); // for (i=0; i < c_cnt; i++) { UNSUPPORTED("9i8py6xnef029xu0ib3h1fn68"); // agclose (ccs[i]); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2hpyw07aau9wk3j15iw5d100j"); // free (ccs); UNSUPPORTED("84y4vz58r1d0r98k7ilwxl69a"); // ccs = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("assgjfny1ffjxhhcioxsmmveo"); // ccs = RALLOC(c_cnt, ccs, Agraph_t *); UNSUPPORTED("2qmltrj92j4d606oy6g1uh26x"); // *ncc = c_cnt; UNSUPPORTED("ancxkuch6389wh7l57e5yiwgd"); // *pinned = pin; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("d077t46km2flvzhvfy5b9ld5u"); // return ccs; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7oum7fisfbl39e0gt9kuc2xyz // Agraph_t **ccomps(Agraph_t * g, int *ncc, char *pfx) public static Object ccomps(Object... arg) { UNSUPPORTED("943ghlrqozczbucoafw2tim5n"); // Agraph_t **ccomps(Agraph_t * g, int *ncc, char *pfx) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("azrybezo3qgwcugn67vwwsfjq"); // int c_cnt = 0; UNSUPPORTED("9v478fb3v8s4hrtw6o447bhau"); // char buffer[128]; UNSUPPORTED("8i0d7frxcvvmzhidle0zin9i0"); // char *name; UNSUPPORTED("ae3ezq9c9de3ci6tyzfl88bf7"); // Agraph_t *out; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("8i0oxshyd0x2idt42lftg3zjx"); // Agraph_t **ccs; UNSUPPORTED("dwe86466ugstemepdfk8yzphz"); // int len; UNSUPPORTED("2bcwwo628380s594v69l4227q"); // int bnd = 10; UNSUPPORTED("7yhkdqak81ozlnttsdgys1u73"); // stk_t stk; UNSUPPORTED("569n8uukmri0xiy62ctofxq74"); // blk_t blk; UNSUPPORTED("4rzpakwprbbiyxu0p7mszvgt"); // Agnode_t* base[1024]; UNSUPPORTED("254mtuuhqbzuf93i7qlphavdc"); // if (agnnodes(g) == 0) { UNSUPPORTED("5ojqtedar4ecf884rvp0r36iu"); // *ncc = 0; UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ajoz89eaec73wuy8zxf06ifo4"); // name = setPrefix (pfx, &len, buffer, 128); UNSUPPORTED("f3456xelgcn1uercqhtm0lkq7"); // ccs = (Agraph_t **)gmalloc((bnd)*sizeof(Agraph_t *)); UNSUPPORTED("bxcxf1l5mkrh3ledoksmyvts5"); // initStk (&stk, &blk, base, insertFn, markFn); UNSUPPORTED("16hw9gw0dz2w7mrtba0eoqrdi"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("d9gqryaqwhyp5tgpniv6hnwv2"); // ((&stk)->markfn(n,0)); UNSUPPORTED("ci9r8sj8tbc6yer5c8cebb0cm"); // if (setjmp(jbuf)) { UNSUPPORTED("6ynxvmoqlj83wenon4xamzykd"); // freeStk (&stk); UNSUPPORTED("2hpyw07aau9wk3j15iw5d100j"); // free (ccs); UNSUPPORTED("4030v2eeye6q0bfv1q68xdc2l"); // if (name != buffer) UNSUPPORTED("do5yd7vtp5fqk099x8dj0r7yg"); // free(name); UNSUPPORTED("5ojqtedar4ecf884rvp0r36iu"); // *ncc = 0; UNSUPPORTED("11hwqop4xebvtcskop4uhpp01"); // return NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("es7cb1ubgfdb9vo8q5y32753t"); // if (((&stk)->markfn(n,-1))) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("7aaiftnzi12afb1li6dqj6aga"); // sprintf(name + len, "%d", c_cnt); UNSUPPORTED("8vra9mk0wz2njkvxa4nnvxevo"); // out = agsubg(g, name,1); UNSUPPORTED("e6e58g6ou2zwwtnjzww36hem2"); // agbindrec(out, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0)); //node custom data UNSUPPORTED("94s85ldn0q9223lgg7zmt3zsp"); // dfs(g, n, out, &stk); UNSUPPORTED("dn9pcjtlvoi17ds4bm8ppc6wa"); // if (c_cnt == bnd) { UNSUPPORTED("esme9v58cizis473mukmd87qb"); // bnd *= 2; UNSUPPORTED("d3tfv1o5r3ymjk84qnbz7ayxc"); // ccs = RALLOC(bnd, ccs, Agraph_t *); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("etwpnr04bwdr2egdjyg4e4emw"); // ccs[c_cnt] = out; UNSUPPORTED("axd6jb2bjqul4a1junq61zc7n"); // c_cnt++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7hwkgfwulgopzu68jf9894c53"); // freeStk (&stk); UNSUPPORTED("dnmp67lbepsjnm94ykx22xbaa"); // ccs = RALLOC(c_cnt, ccs, Agraph_t *); UNSUPPORTED("47276yunfeevpru1276of6w85"); // if (name != buffer) UNSUPPORTED("bwp196o8phb9mx2d8yw1b9mhi"); // free(name); UNSUPPORTED("dd0bcvxiscwe7k1z5sh8lczni"); // *ncc = c_cnt; UNSUPPORTED("d077t46km2flvzhvfy5b9ld5u"); // return ccs; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 39ot62028rkkd87h9frgwqnn6 // static void deriveClusters(Agraph_t* dg, Agraph_t * g) public static Object deriveClusters(Object... arg) { UNSUPPORTED("868sk3tgejqs7lgdi9hbyqe0a"); // static void deriveClusters(Agraph_t* dg, Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c3tourf5k7groqyh71yjd5xec"); // Agraph_t *subg; UNSUPPORTED("83voshd1807fk59ndryglxfxy"); // Agnode_t *dn; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("92vjk6rjnnnji7bcczz51lwfx"); // for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) { UNSUPPORTED("86x37f2blxq73klb3gsehigpa"); // if ((strncmp(agnameof(subg), "cluster", 7) == 0)) { UNSUPPORTED("4phmb7xbshx4zd2t4955r6bi"); // dn = agnode(dg, agnameof(subg), 1); UNSUPPORTED("b27pjkkz8bon9l0vyzh4kgmh2"); // agbindrec (dn, "ccgnodeinfo", sizeof(ccgnodeinfo_t), NOT(0)); UNSUPPORTED("43h4eauirakaj5syijhqx73du"); // (((ccgnodeinfo_t*)((dn)->base.data))->ptr.g) = subg; UNSUPPORTED("96y7c5rvxsf9uodnfdl3mgayx"); // for (n = agfstnode(subg); n; n = agnxtnode(subg, n)) { UNSUPPORTED("4zymv9xm4baria22qh2ka6kua"); // if ((((ccgnodeinfo_t*)aggetrec(n, "ccgnodeinfo", 0))->ptr.n)) { UNSUPPORTED("9m0pin0xdz4s8m2th3lylhzql"); // fprintf (stderr, "Error: node \"%s\" belongs to two non-nested clusters \"%s\" and \"%s\"\n", UNSUPPORTED("at3005nk2ku7cn4chzrn5zupi"); // agnameof (n), agnameof(subg), agnameof((((ccgnodeinfo_t*)aggetrec(n, "ccgnodeinfo", 0))->ptr.n))); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("7j98il0qk6xrzt7w4i3gb0bt7"); // (((ccgnodeinfo_t*)aggetrec(n, "ccgnodeinfo", 0))->ptr.n=dn); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("5nz26tfuq99z5jkkuzr9k19bz"); // deriveClusters (dg, subg); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5lih4958yg41q8p4zxcfrrvdw // static Agraph_t *deriveGraph(Agraph_t * g) public static Object deriveGraph(Object... arg) { UNSUPPORTED("4nxhxefmq3j34nvl4eiimpj3h"); // static Agraph_t *deriveGraph(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4irto8d9ngepfwouz32g86zl6"); // Agraph_t *dg; UNSUPPORTED("83voshd1807fk59ndryglxfxy"); // Agnode_t *dn; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("ayftac06jlte1cy25k8p9iyvn"); // dg = agopen("dg", Agstrictundirected, (Agdisc_t *) 0); UNSUPPORTED("cvmouwuru7hi7yf51avtrbr24"); // deriveClusters (dg, g); UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("bpv6hya89z189liol7ggh5mx4"); // if ((((ccgnodeinfo_t*)aggetrec(n, "ccgnodeinfo", 0))->ptr.n)) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("2qgs0l1lw8vd8n47zg2u0rsm4"); // dn = agnode(dg, agnameof(n), 1); UNSUPPORTED("893w6lm5jjr02l302on5ksmdk"); // agbindrec (dn, "ccgnodeinfo", sizeof(ccgnodeinfo_t), NOT(0)); UNSUPPORTED("12uiujr38t0dn5rjluqfjokgr"); // (((ccgnodeinfo_t*)((dn)->base.data))->ptr.n) = n; UNSUPPORTED("987f0ysnrssct1iosjitjko1k"); // (((ccgnodeinfo_t*)aggetrec(n, "ccgnodeinfo", 0))->ptr.n=dn); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("d4mlgfduxhsp2wvke20sb15y7"); // Agedge_t *e; UNSUPPORTED("2fn1y8jpr9zxd6c1ikvlfxnba"); // Agnode_t *hd; UNSUPPORTED("cbvfldlsb4ch7lpabbvb5sh9p"); // Agnode_t *tl = (((ccgnodeinfo_t*)aggetrec(n, "ccgnodeinfo", 0))->ptr.n); UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("elx93gms5yid1nchdexmh31yf"); // hd = aghead(e); UNSUPPORTED("aii4ly75jknsfm576dxb2t21i"); // hd = (((ccgnodeinfo_t*)aggetrec(hd, "ccgnodeinfo", 0))->ptr.n); UNSUPPORTED("2zvgmnv71vkplklm2dmwu24o6"); // if (hd == tl) UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("7yvps7igfif7acnwp70cumlel"); // if (hd > tl) UNSUPPORTED("aiisqdoegjibrytnbc9bu5zws"); // agedge(dg, tl, hd, 0, 1); UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("54yhr2deg9g0o899gn0rw3tfg"); // agedge(dg, hd, tl, 0, 1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7t6k0j9ffr522l0t8a1atpxqy"); // return dg; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2wkfliv6m1b1405ef7p1b32ft // static void unionNodes(Agraph_t * dg, Agraph_t * g) public static Object unionNodes(Object... arg) { UNSUPPORTED("8pzls87c97kkx2wk1iptbln6t"); // static void unionNodes(Agraph_t * dg, Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("83voshd1807fk59ndryglxfxy"); // Agnode_t *dn; UNSUPPORTED("iih8ksk7ssyh6etktikclltd"); // Agraph_t *clust; UNSUPPORTED("9v9aifyc1wn6fmqno12jtgowg"); // for (dn = agfstnode(dg); dn; dn = agnxtnode(dg, dn)) { UNSUPPORTED("756w02dujq85xid2jsypwfwbo"); // if (AGTYPE((((ccgnodeinfo_t*)((dn)->base.data))->ptr.v)) == AGNODE) { UNSUPPORTED("ayydn4x5zmeefefr7oc9zv6jp"); // agsubnode(g, (((ccgnodeinfo_t*)((dn)->base.data))->ptr.n), 1); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("8dwdvx9gjbp6qikelgbqeadmr"); // clust = (((ccgnodeinfo_t*)((dn)->base.data))->ptr.g); UNSUPPORTED("n9q43ee8prm443las25a61re"); // for (n = agfstnode(clust); n; n = agnxtnode(clust, n)) UNSUPPORTED("11xq84jjndb2is2mabgkudwl6"); // agsubnode(g, n, 1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5glt6khfafozusksfg5b131p1 // static int clMarkFn (Agnode_t* n, int v) public static Object clMarkFn(Object... arg) { UNSUPPORTED("47itxizphm8ofv4u5hj6tqemj"); // static int clMarkFn (Agnode_t* n, int v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7p7i4cv4qt10ow22vl9znw72j"); // int ret; UNSUPPORTED("57a2pqux1jftek2pvb1t01xr8"); // if (v < 0) return (((ccgnodeinfo_t*)(n->base.data))->mark); UNSUPPORTED("b4le2e10kzsr6gx0lg7uc7lq8"); // ret = (((ccgnodeinfo_t*)(n->base.data))->mark); UNSUPPORTED("91a9kciyaag5an0lw6k6kj32n"); // (((ccgnodeinfo_t*)(n->base.data))->mark) = v; UNSUPPORTED("f3b7mj138albdr4lodyomke0z"); // return ret; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8e4t1udts4sc9qid3yeclb95v // int node_induce(Agraph_t * g, Agraph_t* eg) public static Object node_induce(Object... arg) { UNSUPPORTED("7p43q9etzpr6fi00r7wawn5fy"); // int node_induce(Agraph_t * g, Agraph_t* eg) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("5llwdc06lj3riadsxuf4qi0mx"); // int e_cnt = 0; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("1trjc50yj62b04stmilwnrccw"); // for (e = agfstout(eg, n); e; e = agnxtout(eg, e)) { UNSUPPORTED("5otnii3zntzego765yvjx2y7z"); // if (agsubnode(g, aghead(e),0)) { UNSUPPORTED("2bgblhx59x2fapl17ghgyo44l"); // agsubedge(g,e,1); UNSUPPORTED("7z5wc5mbeiwlmkv0uqaoxtznf"); // e_cnt++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4ym6gish1r7q7wxu44bk8pd9g"); // return e_cnt; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 48loms2wapgbbzoo5tu7zc00a // static Agraph_t *projectG(Agraph_t * subg, Agraph_t * g, int inCluster) public static Object projectG(Object... arg) { UNSUPPORTED("cp0ewepqetunqupy9nw5l03m9"); // static Agraph_t *projectG(Agraph_t * subg, Agraph_t * g, int inCluster) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("adkgf7cbtl7hb01475fmwl2a9"); // Agraph_t *proj = 0; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("erqonjaeogo4eut0nvkpoesw1"); // Agnode_t *m; UNSUPPORTED("6ewipai3bqonhmh4h826lvwyi"); // for (n = agfstnode(subg); n; n = agnxtnode(subg, n)) { UNSUPPORTED("ew3h1s60a0mp7r9k848dfjapx"); // if ((m = (agnode(g,agnameof(n),0)))) { UNSUPPORTED("5tl2d28pm7we88zjr2fmqo629"); // if (proj == 0) { UNSUPPORTED("8uuh5enbjghz3ovb1tkv9nhah"); // proj = agsubg(g, agnameof(subg), 1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("9oprxeyfg7zxo5dcwz0w2luek"); // agsubnode(proj, m, 1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cb38bqtcofuiby9gyj6jkdxmi"); // if (!proj && inCluster) { UNSUPPORTED("76tqz65aepm0rewx7b80vnprx"); // proj = agsubg(g, agnameof(subg), 1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8gnjhgr9si23zy7tikodxtw7a"); // if (proj) { UNSUPPORTED("7vzop3cuejhhvb29rjvhzu8l5"); // node_induce(proj, subg); UNSUPPORTED("8qa8yzjlvof85nup5jiu1eysv"); // agcopyattr(subg, proj); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1ln6n4q5gupkrbtfa8n20b685"); // return proj; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dyxre2nf3xjqo91parvz2g7vf // static void subgInduce(Agraph_t * root, Agraph_t * g, int inCluster) public static Object subgInduce(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("6m7vdbmbz7x6wjr9k6wlhkg82"); // subgInduce(Agraph_t * root, Agraph_t * g, int inCluster) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c3tourf5k7groqyh71yjd5xec"); // Agraph_t *subg; UNSUPPORTED("3f7wzn1vz5nqgbp9vbpstmapg"); // Agraph_t *proj; UNSUPPORTED("2s6u867pcv2zhmf31509ehwwx"); // int in_cluster; UNSUPPORTED("ebr5bwfw08ehy2ft191wy9pxt"); // /* fprintf (stderr, "subgInduce %s inCluster %d\n", agnameof(root), inCluster); */ UNSUPPORTED("3dlvn9nrxc92go0kzv135mmcg"); // for (subg = agfstsubg(root); subg; subg = agnxtsubg(subg)) { UNSUPPORTED("e29xy4oeug7nshfpb8ezj3tqi"); // if ((((ccgraphinfo_t*)aggetrec(subg, "ccgraphinfo", 0))->cc_subg)) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("etwnh7vodaalf5db09o66xy9t"); // if ((proj = projectG(subg, g, inCluster))) { UNSUPPORTED("eg3o6p4sy4eltgk6uqwx2u99t"); // in_cluster = (inCluster || (strncmp(agnameof(subg), "cluster", 7) == 0)); UNSUPPORTED("9wjudih0u2882alnxkf0ebj6v"); // subgInduce(subg, proj, in_cluster); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5affs0nf6g75npbot8em2x8m7 // static void subGInduce(Agraph_t* g, Agraph_t * out) public static Object subGInduce(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("ajg4dr4fv1s1lknlf0o2gdybq"); // subGInduce(Agraph_t* g, Agraph_t * out) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5prswoj7lndeoid09c1al9g1j"); // subgInduce(g, out, 0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c05zexiwxzdj93dkl8we8khab // Agraph_t **cccomps(Agraph_t * g, int *ncc, char *pfx) public static Object cccomps(Object... arg) { UNSUPPORTED("bh1guslvsmjnntue2v45pives"); // Agraph_t **cccomps(Agraph_t * g, int *ncc, char *pfx) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4irto8d9ngepfwouz32g86zl6"); // Agraph_t *dg; UNSUPPORTED("dewne7ib8u38idnpmmyanpxy4"); // long n_cnt, c_cnt, e_cnt; UNSUPPORTED("8i0d7frxcvvmzhidle0zin9i0"); // char *name; UNSUPPORTED("ae3ezq9c9de3ci6tyzfl88bf7"); // Agraph_t *out; UNSUPPORTED("cyqedugrpptm0bxk320mwqont"); // Agraph_t *dout; UNSUPPORTED("83voshd1807fk59ndryglxfxy"); // Agnode_t *dn; UNSUPPORTED("9v478fb3v8s4hrtw6o447bhau"); // char buffer[128]; UNSUPPORTED("8i0oxshyd0x2idt42lftg3zjx"); // Agraph_t **ccs; UNSUPPORTED("7yhkdqak81ozlnttsdgys1u73"); // stk_t stk; UNSUPPORTED("569n8uukmri0xiy62ctofxq74"); // blk_t blk; UNSUPPORTED("4rzpakwprbbiyxu0p7mszvgt"); // Agnode_t* base[1024]; UNSUPPORTED("3zmxwwco9e8lfzit5g7xyni3u"); // int len, sz = sizeof(ccgraphinfo_t); UNSUPPORTED("254mtuuhqbzuf93i7qlphavdc"); // if (agnnodes(g) == 0) { UNSUPPORTED("5ojqtedar4ecf884rvp0r36iu"); // *ncc = 0; UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("mn4op16ipeagjc74l7yww8bz"); // /* Bind ccgraphinfo to graph and all subgraphs */ UNSUPPORTED("3303xo8hilcqucew7np45prjp"); // aginit(g, AGRAPH, "ccgraphinfo", -sz, 0); UNSUPPORTED("mn4op16ipeagjc74l7yww8bz"); // /* Bind ccgraphinfo to graph and all subgraphs */ UNSUPPORTED("3i1yc6icdysjig83q9w4xiegw"); // aginit(g, AGNODE, "ccgnodeinfo", sizeof(ccgnodeinfo_t), 0); UNSUPPORTED("ajoz89eaec73wuy8zxf06ifo4"); // name = setPrefix (pfx, &len, buffer, 128); UNSUPPORTED("6b8hpfo0yzr73kue74wg5urik"); // dg = deriveGraph(g); UNSUPPORTED("ddvbuomn6rrv78seji0yjwbbv"); // ccs = (Agraph_t **)gmalloc((agnnodes(dg))*sizeof(Agraph_t *)); UNSUPPORTED("7l5ogrxq72sxssip6r18npo0n"); // initStk (&stk, &blk, base, insertFn, clMarkFn); UNSUPPORTED("d24jzvut52q0hj9nlorc44vrg"); // c_cnt = 0; UNSUPPORTED("9v9aifyc1wn6fmqno12jtgowg"); // for (dn = agfstnode(dg); dn; dn = agnxtnode(dg, dn)) { UNSUPPORTED("etraumuco3o1vcr8xan2q9q5h"); // if (((&stk)->markfn(dn,-1))) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("ezh99rvltuhb4d5w386i5g1nx"); // sprintf(name + len, "%ld", c_cnt); UNSUPPORTED("6462mwu57pnu19vu84crikc3k"); // dout = agsubg(dg, name, 1); UNSUPPORTED("6i42st1vabeuy8tx3i36itl9a"); // out = agsubg(g, name, 1); UNSUPPORTED("7yzk1n28fx1u27fhfidifq9bi"); // agbindrec(out, "ccgraphinfo", sizeof(ccgraphinfo_t), 0); UNSUPPORTED("enaayclc0kf0z0a4xejm43oeo"); // (((ccgraphinfo_t*)aggetrec(out, "ccgraphinfo", 0))->cc_subg) = 1; UNSUPPORTED("e1uwav0phirwwvu1neif4abik"); // n_cnt = dfs(dg, dn, dout, &stk); UNSUPPORTED("74xnahtnf5jim9abf6cpexgqy"); // unionNodes(dout, out); UNSUPPORTED("2e6ezdfi63q03v7jwxczoc0fk"); // e_cnt = nodeInduce(out); UNSUPPORTED("5ehzmuadvlo08j35hai2cu52d"); // subGInduce(g, out); UNSUPPORTED("etwpnr04bwdr2egdjyg4e4emw"); // ccs[c_cnt] = out; UNSUPPORTED("du4qeeya3ro6e7elm6ob0kg3"); // agdelete(dg, dout); UNSUPPORTED("a0xpyoq74njvdwc9lcvgyfc0p"); // if (Verbose) UNSUPPORTED("5eih3td1dj05hma7t3x9cv1sz"); // fprintf(stderr, "(%4ld) %7ld nodes %7ld edges\n", UNSUPPORTED("doasu7up2loxsbjm287gl6pl7"); // c_cnt, n_cnt, e_cnt); UNSUPPORTED("axd6jb2bjqul4a1junq61zc7n"); // c_cnt++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); // if (Verbose) UNSUPPORTED("474chts8vmoqnir32g2cf2jhh"); // fprintf(stderr, " %7d nodes %7d edges %7ld components %s\n", UNSUPPORTED("1vccvosilgooou5g023ghfhvd"); // agnnodes(g), agnedges(g), c_cnt, agnameof(g)); UNSUPPORTED("drqwalxujrfmlajqixy65ayrx"); // agclose(dg); UNSUPPORTED("635qc8j61lcasvpl3uehv7kws"); // agclean (g, AGRAPH, "ccgraphinfo"); UNSUPPORTED("ali2vcmmjxz7qj3j0xeqgvqai"); // agclean (g, AGNODE, "ccgnodeinfo"); UNSUPPORTED("7hwkgfwulgopzu68jf9894c53"); // freeStk (&stk); UNSUPPORTED("dnmp67lbepsjnm94ykx22xbaa"); // ccs = RALLOC(c_cnt, ccs, Agraph_t *); UNSUPPORTED("47276yunfeevpru1276of6w85"); // if (name != buffer) UNSUPPORTED("bwp196o8phb9mx2d8yw1b9mhi"); // free(name); UNSUPPORTED("dd0bcvxiscwe7k1z5sh8lczni"); // *ncc = c_cnt; UNSUPPORTED("d077t46km2flvzhvfy5b9ld5u"); // return ccs; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c6h4ladmfc1rtdc8d57592jxj // int isConnected(Agraph_t * g) public static Object isConnected(Object... arg) { UNSUPPORTED("964gnb5ub22thb4btdue682kw"); // int isConnected(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("4jfqz808d62e4cvmb6cbl8bg3"); // int ret = 1; UNSUPPORTED("behjm5bjsenezpg3f7cncvteu"); // int cnt = 0; UNSUPPORTED("7yhkdqak81ozlnttsdgys1u73"); // stk_t stk; UNSUPPORTED("569n8uukmri0xiy62ctofxq74"); // blk_t blk; UNSUPPORTED("4rzpakwprbbiyxu0p7mszvgt"); // Agnode_t* base[1024]; UNSUPPORTED("6gs3ra2bpw8hex3dn3pz9dyep"); // if (agnnodes(g) == 0) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("6thuq4l7a2kmf681ihuog2jyt"); // initStk (&stk, &blk, base, NULL, markFn); UNSUPPORTED("16hw9gw0dz2w7mrtba0eoqrdi"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("d9gqryaqwhyp5tgpniv6hnwv2"); // ((&stk)->markfn(n,0)); UNSUPPORTED("ci9r8sj8tbc6yer5c8cebb0cm"); // if (setjmp(jbuf)) { UNSUPPORTED("6ynxvmoqlj83wenon4xamzykd"); // freeStk (&stk); UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("42x5vqk9aw9a2ld3duvpmp7u9"); // n = agfstnode(g); UNSUPPORTED("155g1h8ib5rdqvi6w6a0lbqc7"); // cnt = dfs(g, agfstnode(g), NULL, &stk); UNSUPPORTED("2g8uwa65n8i12wom2gzjzjbly"); // if (cnt != agnnodes(g)) UNSUPPORTED("233rsrgc8rw3666kshx67w2sl"); // ret = 0; UNSUPPORTED("7hwkgfwulgopzu68jf9894c53"); // freeStk (&stk); UNSUPPORTED("f3b7mj138albdr4lodyomke0z"); // return ret; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3qdni7ppm3mp7tf4nbkg8b54c // int nodeInduce(Agraph_t * g) public static Object nodeInduce(Object... arg) { UNSUPPORTED("c5we4nfcmmumlgexr5upjrsd3"); // int nodeInduce(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dy63ol2hkiluswrcx8ebvgxuu"); // return node_induce (g, g->root); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/pack/pack__c.java000066400000000000000000003027031312650303100211310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.pack; import static gen.lib.cgraph.attr__c.agget; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.Agraph_s; import h.boxf; import h.pack_info; import h.pointf; import smetana.core.CString; import smetana.core.JUtils; import smetana.core.__struct__; public class pack__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 exy2l03ceq9zw4vf01bbd4d3o // typedef unsigned int packval_t //1 6ddu6mrp88g3kun2w1gg8ck8t // typedef Dict_t PointSet //1 6t1gwljnc5qkhgkp9oc8y7lhm // typedef Dict_t PointMap //3 bdbcgpx3oes6bcwdhfnfq0wjf // static int computeStep(int ng, boxf* bbs, int margin) public static Object computeStep(Object... arg) { UNSUPPORTED("8t29o17pwh1az79qvvoe5gzig"); // static int computeStep(int ng, boxf* bbs, int margin) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("55lbmpqutqoil2r1b1kshhf4"); // double l1, l2; UNSUPPORTED("a43rbn0mnlegy80nlm8zaa198"); // double a, b, c, d, r; UNSUPPORTED("ady3ytrxxbt2q1wph02epzm2x"); // double W, H; /* width and height of graph, with margin */ UNSUPPORTED("4wnirjl62mfwcoakp6lyep3p7"); // int i, root; UNSUPPORTED("xo2ha29kgc22utvzozfopc3t"); // a = 100 * ng - 1; UNSUPPORTED("10mngu08a3ilg9ogq1ucw6uro"); // c = 0; UNSUPPORTED("5bkjzlhrfwudnhdqvgcum89jk"); // b = 0; UNSUPPORTED("7zun8aoc3cgzj5s89wluw8xq4"); // for (i = 0; i < ng; i++) { UNSUPPORTED("3u59zam8do4bsljnozwf0fx8s"); // boxf bb = bbs[i]; UNSUPPORTED("bzl9bfq6ylumj5u7zvlkdd1fy"); // W = bb.UR.x - bb.LL.x + 2 * margin; UNSUPPORTED("6keu83u4vpu8uuctqbhsxm1f"); // H = bb.UR.y - bb.LL.y + 2 * margin; UNSUPPORTED("66ehok2jts1k8egaj9o3d4mhd"); // b -= (W + H); UNSUPPORTED("ecmu5b20wldgp7ltdenk6r6y3"); // c -= (W * H); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6eylx7urr9urjgcpq15mz9mbx"); // d = b * b - 4.0 * a * c; UNSUPPORTED("6gohrnij1pp8uigeqwldand78"); // if (d < 0) { UNSUPPORTED("aqx00bc7erj1s1idkis6k0xou"); // agerr(AGERR, "libpack: disc = %f ( < 0)\n", d); UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7w2mz82iiqh2etpb0eadr0ddt"); // r = sqrt(d); UNSUPPORTED("1iy2sivksdztrjf4h3k0algs0"); // l1 = (-b + r) / (2 * a); UNSUPPORTED("erlkg1mh0rfh16bj67xa68qmy"); // l2 = (-b - r) / (2 * a); UNSUPPORTED("cr6iwpvlne2bcqjtejlgpsa48"); // root = (int) l1; UNSUPPORTED("1gg2fab0bfmz9yl7zohktb3g9"); // if (root == 0) root = 1; UNSUPPORTED("3kxq91b30qey91r4hkc9jrb9n"); // if (Verbose > 2) { UNSUPPORTED("55e0qgjsydjz1tjye67igkeny"); // fprintf(stderr, "Packing: compute grid size\n"); UNSUPPORTED("eirgraz2ak76fhuf5dbajvv02"); // fprintf(stderr, "a %f b %f c %f d %f r %f\n", a, b, c, d, r); UNSUPPORTED("eekm76wxww26ubtn5v9ypypiy"); // fprintf(stderr, "root %d (%f) %d (%f)\n", root, l1, (int) l2, UNSUPPORTED("eilpovu9tr2mn82840g4gwduy"); // l2); UNSUPPORTED("5pjri22kxtwvbb3hbf0n1qput"); // fprintf(stderr, " r1 %f r2 %f\n", a * l1 * l1 + b * l1 + c, UNSUPPORTED("3h2jsnh1591w0kbq88cmk89ul"); // a * l2 * l2 + b * l2 + c); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4hzlvk8t0qcn15wg6988vwra9"); // return root; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dob2o9m8sfsrsm1g93hfznsp // static int cmpf(const void *X, const void *Y) public static Object cmpf(Object... arg) { UNSUPPORTED("4nc6jpvian95rmtwnhxuaib4b"); // static int cmpf(const void *X, const void *Y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2eux9vyonke173k6wx67nvmeu"); // ginfo *x = *(ginfo **) X; UNSUPPORTED("4rofn9loku05xrr4fp3slcs6r"); // ginfo *y = *(ginfo **) Y; UNSUPPORTED("95s1jm8x7y2tc9y914raaljrs"); // /* flip order to get descending array */ UNSUPPORTED("46lhhdh1hfndiefr57nzqj6ib"); // return (y->perim - x->perim); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4r8s4k6p01ynfz88kz50ttlr8 // void fillLine(pointf p, pointf q, PointSet * ps) public static Object fillLine(Object... arg) { UNSUPPORTED("a5130f5j305uj46zjcopit703"); // void fillLine(pointf p, pointf q, PointSet * ps) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1duvjyh47lxf7d7ue5car0vsj"); // int x1 = ROUND(p.x); UNSUPPORTED("9pzzawvcmpw6i93hjb26rq63h"); // int y1 = ROUND(p.y); UNSUPPORTED("3057bhojttdigycfgf1lyio0f"); // int x2 = ROUND(q.x); UNSUPPORTED("5bgjp0mm0o564h53ba0zrnbhq"); // int y2 = ROUND(q.y); UNSUPPORTED("d8jccesapcqy22p9y3vtpm616"); // int d, x, y, ax, ay, sx, sy, dx, dy; UNSUPPORTED("6vdso33syc5f2j40e5bsuhb83"); // dx = x2 - x1; UNSUPPORTED("6zrp5a2timck4sou5qym3hsrd"); // ax = ABS(dx) << 1; UNSUPPORTED("ay754u242psxjbqm7n8azez52"); // sx = SGN(dx); UNSUPPORTED("cmvkhiqbscc6cgktpynqycfhn"); // dy = y2 - y1; UNSUPPORTED("eigqi5q47z9sk7utvxv72dif0"); // ay = ABS(dy) << 1; UNSUPPORTED("1ifl8r2gf1amwzvvvfohlx6uw"); // sy = SGN(dy); UNSUPPORTED("2x97iysx5j91wtf3wmgeo2pt"); // /* fprintf (stderr, "fillLine %d %d - %d %d\n", x1,y1,x2,y2); */ UNSUPPORTED("9y4duec6l30q5clw8qd85w784"); // x = x1; UNSUPPORTED("6rlb844uhus8twyid93q8kqbs"); // y = y1; UNSUPPORTED("ccle7h8pebi673oczx2fj5nxi"); // if (ax > ay) { /* x dominant */ UNSUPPORTED("7h60osio7amm1igvh0h7ipgx9"); // d = ay - (ax >> 1); UNSUPPORTED("2v2pue2y1u2d4ka6733iv5vk0"); // for (;;) { UNSUPPORTED("13fg1e71tu92h0bfrs9xka8tb"); // /* fprintf (stderr, " addPS %d %d\n", x,y); */ UNSUPPORTED("62ytgdd26o3p2xgoq37xnoifl"); // addPS(ps, x, y); UNSUPPORTED("2lero25dpfd7f3wrrhmxhly2h"); // if (x == x2) UNSUPPORTED("6an8ocqq0sjru42k4aathe94m"); // return; UNSUPPORTED("9erzrv938084t7vmam5bxw7mx"); // if (d >= 0) { UNSUPPORTED("9cka76ykusjv3k3y8fda4nfk0"); // y += sy; UNSUPPORTED("bynlwjpgqdvo01z64gm1sf2ga"); // d -= ax; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("1vyuktjou7iccegm28w06drqv"); // x += sx; UNSUPPORTED("3a5mkjlhp2t10gtqh3qj69q2v"); // d += ay; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("161urjc4hdupo7zswtjf376th"); // } else { /* y dominant */ UNSUPPORTED("39keqb5njfkczwllbrur21irg"); // d = ax - (ay >> 1); UNSUPPORTED("2v2pue2y1u2d4ka6733iv5vk0"); // for (;;) { UNSUPPORTED("13fg1e71tu92h0bfrs9xka8tb"); // /* fprintf (stderr, " addPS %d %d\n", x,y); */ UNSUPPORTED("62ytgdd26o3p2xgoq37xnoifl"); // addPS(ps, x, y); UNSUPPORTED("colj1ywjuo0sy4arrbdvl8jfd"); // if (y == y2) UNSUPPORTED("6an8ocqq0sjru42k4aathe94m"); // return; UNSUPPORTED("9erzrv938084t7vmam5bxw7mx"); // if (d >= 0) { UNSUPPORTED("14xdaydif31mwi2l1z4k2oepc"); // x += sx; UNSUPPORTED("jjd6xfq9lhh82zyxg0ikry3"); // d -= ay; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("58q6s3oua65hpto8xa7dz10sf"); // y += sy; UNSUPPORTED("d3ci5x842hrarrzjeputfalm"); // d += ax; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6ewq3stx5of82qf0ol1xwjf0o // static void fillEdge(Agedge_t * e, point p, PointSet * ps, int dx, int dy, int ssize, int doS) public static Object fillEdge(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("9b96jon8bxkz7znkmv20875w6"); // fillEdge(Agedge_t * e, point p, PointSet * ps, int dx, int dy, UNSUPPORTED("8yrc5v6qafl4vg0xln2we5kn3"); // int ssize, int doS) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9e6bnowy6jfhnib5uev3scpsu"); // int j, k; UNSUPPORTED("37thdceezsvepe7tlyfatrbcw"); // bezier bz; UNSUPPORTED("9j8f6779znpou18ci9dqadum3"); // pointf pt, hpt; UNSUPPORTED("15nfkonrgeitraj70893dwyoj"); // Agnode_t *h; UNSUPPORTED("5adeloig3qt9512e0wlnw0stj"); // P2PF(p, pt); UNSUPPORTED("9k8qdzbe2z8whvdrbl13aayb6"); // /* If doS is false or the edge has not splines, use line segment */ UNSUPPORTED("bd6qvosxwfyw4x4l6o4442ous"); // if (!doS || !ED_spl(e)) { UNSUPPORTED("1058dpzesyxnmmn0hdydhfm1n"); // h = aghead(e); UNSUPPORTED("dyy30pakjvyqg13qemnd5v50i"); // hpt = coord(h); UNSUPPORTED("d3qru0pr047p8fj3evxw9gstq"); // ((hpt).x += dx, (hpt).y += dy); UNSUPPORTED("99rq045btzmqomibgmhvv8wce"); // ((hpt).x = (((hpt).x) >= 0 ? ((hpt).x)/(ssize) : ((((hpt).x)+1)/(ssize))-1), (hpt).y = (((hpt).y) >= 0 ? ((hpt).y)/((ssize)) : ((((hpt).y)+1)/((ssize)))-1)); UNSUPPORTED("74hokpj1xz0ky4pomxsicfkvi"); // fillLine(pt, hpt, ps); UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e9vow5lzqvgcxabgjj99yokjr"); // for (j = 0; j < ED_spl(e)->size; j++) { UNSUPPORTED("8ni4zfvf78h93ucjuoqtuomjh"); // bz = ED_spl(e)->list[j]; UNSUPPORTED("2qc36pchob3dha7c8jedwalcn"); // if (bz.sflag) { UNSUPPORTED("d5qnj0ut8jldhlvcj8dgvm1r5"); // pt = bz.sp; UNSUPPORTED("8h1rn4kivdousjdpfa1mmawwm"); // hpt = bz.list[0]; UNSUPPORTED("7hf6867dr3c65w2pf4xq323mu"); // k = 1; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("bf65xvm2dou3rh6h7knsa2us5"); // pt = bz.list[0]; UNSUPPORTED("3z2k5orut98eo0vq0pyevi2ed"); // hpt = bz.list[1]; UNSUPPORTED("dz2m8yuk8yfnc2srukp3nh4tc"); // k = 2; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("cgn9befmvtd4d8yfqs126lbpq"); // ((pt).x += dx, (pt).y += dy); UNSUPPORTED("dpf9cre3x7edch35g0alvo167"); // ((pt).x = (((pt).x) >= 0 ? ((pt).x)/(ssize) : ((((pt).x)+1)/(ssize))-1), (pt).y = (((pt).y) >= 0 ? ((pt).y)/((ssize)) : ((((pt).y)+1)/((ssize)))-1)); UNSUPPORTED("d3qru0pr047p8fj3evxw9gstq"); // ((hpt).x += dx, (hpt).y += dy); UNSUPPORTED("99rq045btzmqomibgmhvv8wce"); // ((hpt).x = (((hpt).x) >= 0 ? ((hpt).x)/(ssize) : ((((hpt).x)+1)/(ssize))-1), (hpt).y = (((hpt).y) >= 0 ? ((hpt).y)/((ssize)) : ((((hpt).y)+1)/((ssize)))-1)); UNSUPPORTED("74hokpj1xz0ky4pomxsicfkvi"); // fillLine(pt, hpt, ps); UNSUPPORTED("6gftmkq3mhknwzkm4an4llzet"); // for (; k < bz.size; k++) { UNSUPPORTED("a9t723l1szseqti9o12357emd"); // pt = hpt; UNSUPPORTED("b960h12noe0vcvmcdqt04yz5r"); // hpt = bz.list[k]; UNSUPPORTED("uxitedizhv3r59kwo9hloxga"); // ((hpt).x += dx, (hpt).y += dy); UNSUPPORTED("g2ys8m7lhj8ygyslxd1awd8c"); // ((hpt).x = (((hpt).x) >= 0 ? ((hpt).x)/(ssize) : ((((hpt).x)+1)/(ssize))-1), (hpt).y = (((hpt).y) >= 0 ? ((hpt).y)/((ssize)) : ((((hpt).y)+1)/((ssize)))-1)); UNSUPPORTED("b6h1kxqo0bbiehrmk1374qmig"); // fillLine(pt, hpt, ps); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("973cbk976xio10xxw9bgkyen2"); // if (bz.eflag) { UNSUPPORTED("a9t723l1szseqti9o12357emd"); // pt = hpt; UNSUPPORTED("mppggrplo1gua39zwczw05dl"); // hpt = bz.ep; UNSUPPORTED("uxitedizhv3r59kwo9hloxga"); // ((hpt).x += dx, (hpt).y += dy); UNSUPPORTED("g2ys8m7lhj8ygyslxd1awd8c"); // ((hpt).x = (((hpt).x) >= 0 ? ((hpt).x)/(ssize) : ((((hpt).x)+1)/(ssize))-1), (hpt).y = (((hpt).y) >= 0 ? ((hpt).y)/((ssize)) : ((((hpt).y)+1)/((ssize)))-1)); UNSUPPORTED("b6h1kxqo0bbiehrmk1374qmig"); // fillLine(pt, hpt, ps); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1qqcfh1obd0wpw60zt3qb10o1 // static void genBox(boxf bb0, ginfo * info, int ssize, int margin, point center, char* s) public static Object genBox(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("dkh8x4gma6inyhel8ms5kdqyn"); // genBox(boxf bb0, ginfo * info, int ssize, int margin, point center, char* s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aqkjgsdfo55oljkejalj18x5o"); // PointSet *ps; UNSUPPORTED("d9cafq96lxhglzixa87lnoi5j"); // int W, H; UNSUPPORTED("20jw6e25uf75jfj884w81pyn6"); // point UR, LL; UNSUPPORTED("dli0hhfxexiypybw00gp6530v"); // box bb; UNSUPPORTED("7ksbgqgqrh7y32ijnkxl8zaw0"); // int x, y; UNSUPPORTED("bmfwjlyug1vwjdhkwhf2qxh0a"); // BF2B(bb0, bb); UNSUPPORTED("6udv07xykmb0e2pdyqurnc9p4"); // ps = newPS(); UNSUPPORTED("6xe56afm9k659fq07xtcn9147"); // LL.x = center.x - margin; UNSUPPORTED("dh3kj8xysu2kv9k3a983iqav3"); // LL.y = center.y - margin; UNSUPPORTED("585l7y7guge9z8fsbbxli30rj"); // UR.x = center.x + bb.UR.x - bb.LL.x + margin; UNSUPPORTED("e584696y40atkpz430l6plczr"); // UR.y = center.y + bb.UR.y - bb.LL.y + margin; UNSUPPORTED("9v2053h0uv8gyfep4zczhjyd"); // ((LL).x = (((LL).x) >= 0 ? ((LL).x)/(ssize) : ((((LL).x)+1)/(ssize))-1), (LL).y = (((LL).y) >= 0 ? ((LL).y)/((ssize)) : ((((LL).y)+1)/((ssize)))-1)); UNSUPPORTED("de40ubd0t9d1rv08pcspaltry"); // ((UR).x = (((UR).x) >= 0 ? ((UR).x)/(ssize) : ((((UR).x)+1)/(ssize))-1), (UR).y = (((UR).y) >= 0 ? ((UR).y)/((ssize)) : ((((UR).y)+1)/((ssize)))-1)); UNSUPPORTED("afbpk7wdnlzfrfjsfanv0nxp9"); // for (x = LL.x; x <= UR.x; x++) UNSUPPORTED("eqzaosdvrone8rhgu36tsk45v"); // for (y = LL.y; y <= UR.y; y++) UNSUPPORTED("5jwcnu6k267vszq6le3zpltr2"); // addPS(ps, x, y); UNSUPPORTED("b6965k7cvxgazo4d1x1gpicax"); // info->cells = pointsOf(ps); UNSUPPORTED("79rp86itd9b91tc0db54220fr"); // info->nc = sizeOf(ps); UNSUPPORTED("agmsrp2u25tarnb04rrmz8szf"); // W = ((int)ceil((bb0.UR.x - bb0.LL.x + 2 * margin)/(ssize))); UNSUPPORTED("37qvodfrig2t4hcn9v3c7fita"); // H = ((int)ceil((bb0.UR.y - bb0.LL.y + 2 * margin)/(ssize))); UNSUPPORTED("2w04og11wkyoe6e59x489rdlp"); // info->perim = W + H; UNSUPPORTED("3kxq91b30qey91r4hkc9jrb9n"); // if (Verbose > 2) { UNSUPPORTED("bbuxsg26kpzb2fl660hjri9l8"); // int i; UNSUPPORTED("f23g1eoeiffc45ucsecqxqkap"); // fprintf(stderr, "%s no. cells %d W %d H %d\n", UNSUPPORTED("dbm7epl7o6mpeo72klw135uni"); // s, info->nc, W, H); UNSUPPORTED("5raufl639beqv87bsfap22ar5"); // for (i = 0; i < info->nc; i++) UNSUPPORTED("36wdram8nco5bacym97n1egc0"); // fprintf(stderr, " %d %d cell\n", info->cells[i].x, UNSUPPORTED("606tqxapdsuzdhl2ssic0tz2v"); // info->cells[i].y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dg5ijmmysdxc2qm5j58u0zr8i"); // freePS(ps); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5un21g6597dr1wxwpjststcy2 // static int genPoly(Agraph_t * root, Agraph_t * g, ginfo * info, int ssize, pack_info * pinfo, point center) public static Object genPoly(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("29xjrg34ztih2ce44tcl0h5dl"); // genPoly(Agraph_t * root, Agraph_t * g, ginfo * info, UNSUPPORTED("103ox5jcn94jkt4i92802xe30"); // int ssize, pack_info * pinfo, point center) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aqkjgsdfo55oljkejalj18x5o"); // PointSet *ps; UNSUPPORTED("d9cafq96lxhglzixa87lnoi5j"); // int W, H; UNSUPPORTED("9z1w1elfjsy9fmy4de64anci3"); // point LL, UR; UNSUPPORTED("du26lyeqo8abix4w0d22tb9t8"); // point pt, s2; UNSUPPORTED("bz0wmxtnzgka3zfovkbr7eozh"); // pointf ptf; UNSUPPORTED("y2e8aue8lq20s36dp5cktigw"); // Agraph_t *eg; /* graph containing edges */ UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("7ksbgqgqrh7y32ijnkxl8zaw0"); // int x, y; UNSUPPORTED("bftz89757hgmx7ivuna8lc4z6"); // int dx, dy; UNSUPPORTED("8uujemixuhlf040icq3zsh7j8"); // graph_t *subg; UNSUPPORTED("bgh1ykg5jxme381zrqlfzre56"); // int margin = pinfo->margin; UNSUPPORTED("7l72pjfqpydwx4ojgn4x8l6u7"); // int doSplines = pinfo->doSplines; UNSUPPORTED("dli0hhfxexiypybw00gp6530v"); // box bb; UNSUPPORTED("dqseu01ng2nnpewmpp95sm688"); // if (root) UNSUPPORTED("3nj280m96ug062kyr3cutmoqh"); // eg = root; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("bcwj9q77uro493bbvuwbpo5vy"); // eg = g; UNSUPPORTED("6udv07xykmb0e2pdyqurnc9p4"); // ps = newPS(); UNSUPPORTED("9i5jau3uugaz7oitfcmhousx1"); // dx = center.x - ROUND(GD_bb(g).LL.x); UNSUPPORTED("66eemj62brnu3mglipwc7cqii"); // dy = center.y - ROUND(GD_bb(g).LL.y); UNSUPPORTED("dj9kkvxpyum7mive0tpr3vfod"); // if (pinfo->mode == l_clust) { UNSUPPORTED("bbuxsg26kpzb2fl660hjri9l8"); // int i; UNSUPPORTED("5tckx2f0jgn7lryi9m2e7btre"); // void **alg; UNSUPPORTED("3sna9ll8elsitmdj8rs4m15cr"); // /* backup the alg data */ UNSUPPORTED("cbau5vo7rkixloiylj1lwlytg"); // alg = (void **)gmalloc((agnnodes(g))*sizeof(void *)); UNSUPPORTED("1rckxjxqzxb846omrtt9yuxw3"); // for (i = 0, n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("4xioornmodd5ydv19wigsz1lu"); // alg[i++] = ND_alg(n); UNSUPPORTED("bqtu555nwh760awky8m65eec2"); // ND_alg(n) = 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5s8wtxkay1fm0fn50m39tk6fj"); // /* do bbox of top clusters */ UNSUPPORTED("axxs2u0a8b8lf42oqy6xq0bx1"); // for (i = 1; i <= GD_n_cluster(g); i++) { UNSUPPORTED("2vrnig406r4mku4kxy2kf648a"); // subg = GD_clust(g)[i]; UNSUPPORTED("pfi3ma6w50rsu99wqswvhjgx"); // BF2B(GD_bb(subg), bb); UNSUPPORTED("btynl1nm8k1pr7vp22utdesdj"); // if ((bb.UR.x > bb.LL.x) && (bb.UR.y > bb.LL.y)) { UNSUPPORTED("ev14habqjuz1vhqxmavftlqlh"); // ((bb.LL).x += dx, (bb.LL).y += dy); UNSUPPORTED("bdzc32hvn2ybrea165mrd66rg"); // ((bb.UR).x += dx, (bb.UR).y += dy); UNSUPPORTED("55n48hmw8i7wktq78vfub4obw"); // bb.LL.x -= margin; UNSUPPORTED("3756d2o8pocqpkunmmdj28zmf"); // bb.LL.y -= margin; UNSUPPORTED("5urkhackfkfy3g74mu9xtpk5d"); // bb.UR.x += margin; UNSUPPORTED("9pw4vnniswa2mnfe3olr8ciey"); // bb.UR.y += margin; UNSUPPORTED("7thgtnyonec8a9sn8hizox5ig"); // ((bb.LL).x = (((bb.LL).x) >= 0 ? ((bb.LL).x)/(ssize) : ((((bb.LL).x)+1)/(ssize))-1), (bb.LL).y = (((bb.LL).y) >= 0 ? ((bb.LL).y)/((ssize)) : ((((bb.LL).y)+1)/((ssize)))-1)); UNSUPPORTED("f33jy5tuo13bi4db8gwf2ilvy"); // ((bb.UR).x = (((bb.UR).x) >= 0 ? ((bb.UR).x)/(ssize) : ((((bb.UR).x)+1)/(ssize))-1), (bb.UR).y = (((bb.UR).y) >= 0 ? ((bb.UR).y)/((ssize)) : ((((bb.UR).y)+1)/((ssize)))-1)); UNSUPPORTED("2fzfb48cw1tpgnx1fenamdt17"); // for (x = bb.LL.x; x <= bb.UR.x; x++) UNSUPPORTED("dw8r9tjg3wg1jpgi9dg0ordai"); // for (y = bb.LL.y; y <= bb.UR.y; y++) UNSUPPORTED("9fsyndaeb3wa4vnzkwju02aa6"); // addPS(ps, x, y); UNSUPPORTED("b9ww7g26bsulxmdli1uykqg48"); // /* note which nodes are in clusters */ UNSUPPORTED("78m4mkxem2uguubk1gpgsx6oc"); // for (n = agfstnode(subg); n; n = agnxtnode(subg, n)) UNSUPPORTED("8uh55vusbiw7a90rj8jzyf76o"); // ND_clust(n) = subg; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("ehh6v9228lmsahzxxt4e6a0f9"); // /* now do remaining nodes and edges */ UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("6kr9j6zxr0o4iy7nnp40lvuvz"); // ptf = coord(n); UNSUPPORTED("75lvkqsq23pobdcg6bmqa6mt9"); // PF2P(ptf, pt); UNSUPPORTED("4rskihc5j4vz55z4tvwua5wpa"); // ((pt).x += dx, (pt).y += dy); UNSUPPORTED("1pf6jaggdcnmdld5nu4v22mh9"); // if (!ND_clust(n)) { /* n is not in a top-level cluster */ UNSUPPORTED("2hsx1r535mu25g5wpz8r66dbw"); // s2.x = margin + ND_xsize(n) / 2; UNSUPPORTED("dpwfob5uc018fjpxki2nqa0si"); // s2.y = margin + ND_ysize(n) / 2; UNSUPPORTED("d21twu3noz0h6l4k80bk03bfj"); // LL = sub_point(pt, s2); UNSUPPORTED("pje1a01729779s85awuaqnan"); // UR = add_point(pt, s2); UNSUPPORTED("60bthwtp8xgwr83vnyczt23xz"); // ((LL).x = (((LL).x) >= 0 ? ((LL).x)/(ssize) : ((((LL).x)+1)/(ssize))-1), (LL).y = (((LL).y) >= 0 ? ((LL).y)/((ssize)) : ((((LL).y)+1)/((ssize)))-1)); UNSUPPORTED("einuv6rwbjqts3wnufwpslxlv"); // ((UR).x = (((UR).x) >= 0 ? ((UR).x)/(ssize) : ((((UR).x)+1)/(ssize))-1), (UR).y = (((UR).y) >= 0 ? ((UR).y)/((ssize)) : ((((UR).y)+1)/((ssize)))-1)); UNSUPPORTED("83q0u30721zb0pgciso7ziyt8"); // for (x = LL.x; x <= UR.x; x++) UNSUPPORTED("8c9342p5vvoot1zdjdtqlz2m9"); // for (y = LL.y; y <= UR.y; y++) UNSUPPORTED("9fsyndaeb3wa4vnzkwju02aa6"); // addPS(ps, x, y); UNSUPPORTED("dxoo8z7t9s82hnv32b8inj5fl"); // ((pt).x = (((pt).x) >= 0 ? ((pt).x)/(ssize) : ((((pt).x)+1)/(ssize))-1), (pt).y = (((pt).y) >= 0 ? ((pt).y)/((ssize)) : ((((pt).y)+1)/((ssize)))-1)); UNSUPPORTED("av9pal9kng6v9bj1n1r76p890"); // for (e = agfstout(eg, n); e; e = agnxtout(eg, e)) { UNSUPPORTED("3244vgtt0iocuk7pgdpymweq8"); // fillEdge(e, pt, ps, dx, dy, ssize, doSplines); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else { UNSUPPORTED("dxoo8z7t9s82hnv32b8inj5fl"); // ((pt).x = (((pt).x) >= 0 ? ((pt).x)/(ssize) : ((((pt).x)+1)/(ssize))-1), (pt).y = (((pt).y) >= 0 ? ((pt).y)/((ssize)) : ((((pt).y)+1)/((ssize)))-1)); UNSUPPORTED("av9pal9kng6v9bj1n1r76p890"); // for (e = agfstout(eg, n); e; e = agnxtout(eg, e)) { UNSUPPORTED("ea4ls3030vg98zyoy7palapff"); // if (ND_clust(n) == ND_clust(aghead(e))) UNSUPPORTED("91ilj0e8yph90t7k4ijuq5rb0"); // continue; UNSUPPORTED("3244vgtt0iocuk7pgdpymweq8"); // fillEdge(e, pt, ps, dx, dy, ssize, doSplines); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("33gzyqd0dti267fbnuc393vqf"); // /* restore the alg data */ UNSUPPORTED("1rckxjxqzxb846omrtt9yuxw3"); // for (i = 0, n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("7d40zxbnht9hibe4reayjt3ab"); // ND_alg(n)= alg[i++]; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1avb9rstkf5v05swj5oavmbsx"); // free(alg); UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("6kr9j6zxr0o4iy7nnp40lvuvz"); // ptf = coord(n); UNSUPPORTED("75lvkqsq23pobdcg6bmqa6mt9"); // PF2P(ptf, pt); UNSUPPORTED("4rskihc5j4vz55z4tvwua5wpa"); // ((pt).x += dx, (pt).y += dy); UNSUPPORTED("32wulfgkqo1gdziiuynkzohma"); // s2.x = margin + ND_xsize(n) / 2; UNSUPPORTED("asa04lxhwek7h53q45xwt9eo3"); // s2.y = margin + ND_ysize(n) / 2; UNSUPPORTED("e4pwp7ppfey2ur2rzi0bnbarb"); // LL = sub_point(pt, s2); UNSUPPORTED("dtfkzedesg45sgmdx85bqajb"); // UR = add_point(pt, s2); UNSUPPORTED("2lukx7z9l672b9an4yd3kimpc"); // ((LL).x = (((LL).x) >= 0 ? ((LL).x)/(ssize) : ((((LL).x)+1)/(ssize))-1), (LL).y = (((LL).y) >= 0 ? ((LL).y)/((ssize)) : ((((LL).y)+1)/((ssize)))-1)); UNSUPPORTED("1rt3uhmbxplvrk1o7obv4z3er"); // ((UR).x = (((UR).x) >= 0 ? ((UR).x)/(ssize) : ((((UR).x)+1)/(ssize))-1), (UR).y = (((UR).y) >= 0 ? ((UR).y)/((ssize)) : ((((UR).y)+1)/((ssize)))-1)); UNSUPPORTED("dx18nl37frf8sg26xij552ejz"); // for (x = LL.x; x <= UR.x; x++) UNSUPPORTED("6a90v0hbdo93le7neim40no3u"); // for (y = LL.y; y <= UR.y; y++) UNSUPPORTED("dn4dbpnefy79i1g03hfsakcno"); // addPS(ps, x, y); UNSUPPORTED("8hl3q69p8aqetblqadqf2uhkf"); // ((pt).x = (((pt).x) >= 0 ? ((pt).x)/(ssize) : ((((pt).x)+1)/(ssize))-1), (pt).y = (((pt).y) >= 0 ? ((pt).y)/((ssize)) : ((((pt).y)+1)/((ssize)))-1)); UNSUPPORTED("7hqutkde2o0fy2g0xv1yitxjf"); // for (e = agfstout(eg, n); e; e = agnxtout(eg, e)) { UNSUPPORTED("6zc0jmxujx99ljtqkmiydrjzq"); // fillEdge(e, pt, ps, dx, dy, ssize, doSplines); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("b6965k7cvxgazo4d1x1gpicax"); // info->cells = pointsOf(ps); UNSUPPORTED("79rp86itd9b91tc0db54220fr"); // info->nc = sizeOf(ps); UNSUPPORTED("es3gh0zqwlw0iiolk6x45vege"); // W = ((int)ceil((GD_bb(g).UR.x - GD_bb(g).LL.x + 2 * margin)/(ssize))); UNSUPPORTED("bfr7ygy7lkfhss45a84thsa7s"); // H = ((int)ceil((GD_bb(g).UR.y - GD_bb(g).LL.y + 2 * margin)/(ssize))); UNSUPPORTED("2w04og11wkyoe6e59x489rdlp"); // info->perim = W + H; UNSUPPORTED("3kxq91b30qey91r4hkc9jrb9n"); // if (Verbose > 2) { UNSUPPORTED("bbuxsg26kpzb2fl660hjri9l8"); // int i; UNSUPPORTED("f23g1eoeiffc45ucsecqxqkap"); // fprintf(stderr, "%s no. cells %d W %d H %d\n", UNSUPPORTED("dhnvei7zsgifid5vebovzl15"); // agnameof(g), info->nc, W, H); UNSUPPORTED("5raufl639beqv87bsfap22ar5"); // for (i = 0; i < info->nc; i++) UNSUPPORTED("36wdram8nco5bacym97n1egc0"); // fprintf(stderr, " %d %d cell\n", info->cells[i].x, UNSUPPORTED("606tqxapdsuzdhl2ssic0tz2v"); // info->cells[i].y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dg5ijmmysdxc2qm5j58u0zr8i"); // freePS(ps); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c9qfbamaiq4liwngpzcw4g15e // static int fits(int x, int y, ginfo * info, PointSet * ps, point * place, int step, boxf* bbs) public static Object fits(Object... arg) { UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int UNSUPPORTED("1qf35tpyffbtwwrvw009al0jw"); // fits(int x, int y, ginfo * info, PointSet * ps, point * place, int step, boxf* bbs) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7s7b72q8pqs2vwdmytpwqd8fw"); // point *cells = info->cells; UNSUPPORTED("dx19rog6lno8k3o89p0yw80de"); // int n = info->nc; UNSUPPORTED("8w8wc32jqtifc9dhh8tzlcnzx"); // point cell; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("bs4odh29a6rnkbmhk59sanyar"); // point LL; UNSUPPORTED("1vi49g48u2rc9v88yhabta0yw"); // for (i = 0; i < n; i++) { UNSUPPORTED("ct2td16327xzczczmc9cxbxhr"); // cell = *cells; UNSUPPORTED("8cjpqypsv5o9zwngain8itc5l"); // cell.x += x; UNSUPPORTED("8yup3gihmsdumxy94c06s7514"); // cell.y += y; UNSUPPORTED("qak41spsdwyya6gwwbgwkl53"); // if (inPS(ps, cell)) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("cbdyrzw9tiul7z5wurhto17q"); // cells++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2bp5zif4pew12zbwc252fzewz"); // PF2P(bbs[info->index].LL, LL); UNSUPPORTED("d9jkxf05nyf0mf7eh3mig9p6"); // place->x = step * x - LL.x; UNSUPPORTED("ciocs0be2oq5sze7g0mgy1k3c"); // place->y = step * y - LL.y; UNSUPPORTED("1eqiy1kl714gqpoigzeqcvf5p"); // cells = info->cells; UNSUPPORTED("1vi49g48u2rc9v88yhabta0yw"); // for (i = 0; i < n; i++) { UNSUPPORTED("ct2td16327xzczczmc9cxbxhr"); // cell = *cells; UNSUPPORTED("8cjpqypsv5o9zwngain8itc5l"); // cell.x += x; UNSUPPORTED("8yup3gihmsdumxy94c06s7514"); // cell.y += y; UNSUPPORTED("g4rk5u461kggq0l6ilauwlo4"); // insertPS(ps, cell); UNSUPPORTED("cbdyrzw9tiul7z5wurhto17q"); // cells++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("41xjj6amd58fjieqo5xy29iwq"); // if (Verbose >= 2) UNSUPPORTED("69kux3f6h23w09bw3rza60lq8"); // fprintf(stderr, "cc (%d cells) at (%d,%d) (%d,%d)\n", n, x, y, UNSUPPORTED("5aew9usp1puf2vjfyvkt8ki4u"); // place->x, place->y); UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3bievtf2w4iqqz5qhvvye4imw // static void placeFixed(ginfo * info, PointSet * ps, point * place, point center) public static Object placeFixed(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("5u8hxdr88fztn78otn0zptwfo"); // placeFixed(ginfo * info, PointSet * ps, point * place, point center) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7s7b72q8pqs2vwdmytpwqd8fw"); // point *cells = info->cells; UNSUPPORTED("dx19rog6lno8k3o89p0yw80de"); // int n = info->nc; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("dxwnlmthaq0wgr96pkmv2fk9e"); // place->x = -center.x; UNSUPPORTED("6btj6uln4as29swn0gnfjlfrb"); // place->y = -center.y; UNSUPPORTED("1vi49g48u2rc9v88yhabta0yw"); // for (i = 0; i < n; i++) { UNSUPPORTED("chepmmzu07rgo2s6lhxc1yust"); // insertPS(ps, *cells++); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("41xjj6amd58fjieqo5xy29iwq"); // if (Verbose >= 2) UNSUPPORTED("efy6uprafzlbzcuuea0iywmn"); // fprintf(stderr, "cc (%d cells) at (%d,%d)\n", n, place->x, UNSUPPORTED("erkjyjoclu003wz9pn5id7r1n"); // place->y); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6ly0zu2bl9e2z9zb6tgiis6ji // static void placeGraph(int i, ginfo * info, PointSet * ps, point * place, int step, int margin, boxf* bbs) public static Object placeGraph(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("bomsrpn26g609cfz6rxujk3bu"); // placeGraph(int i, ginfo * info, PointSet * ps, point * place, int step, UNSUPPORTED("bqojgt4ai0dr1qe25n6dgk8zp"); // int margin, boxf* bbs) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7ksbgqgqrh7y32ijnkxl8zaw0"); // int x, y; UNSUPPORTED("d9cafq96lxhglzixa87lnoi5j"); // int W, H; UNSUPPORTED("90urniwcsawwori7426tta0kx"); // int bnd; UNSUPPORTED("3cvtov5t3e3nw7jf8qx7h8eeo"); // boxf bb = bbs[info->index]; UNSUPPORTED("bpwdzzlwgsm5lqfqgzplsw92a"); // if (i == 0) { UNSUPPORTED("3zg9yd27ewzn95seu5sp3bxw7"); // W = ((int)ceil((bb.UR.x - bb.LL.x + 2 * margin)/(step))); UNSUPPORTED("emdieik6twlh1vjo5ywsbcdaz"); // H = ((int)ceil((bb.UR.y - bb.LL.y + 2 * margin)/(step))); UNSUPPORTED("65t43oobc63x9wvv9o6muhprh"); // if (fits(-W / 2, -H / 2, info, ps, place, step, bbs)) UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("18spugm2e70i89b481k3i5w70"); // if (fits(0, 0, info, ps, place, step, bbs)) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("jx7bqatqf7k5p5w0ci42dfd8"); // W = ceil(bb.UR.x - bb.LL.x); UNSUPPORTED("1sc44fow0xifkubpnp87bjwp"); // H = ceil(bb.UR.y - bb.LL.y); UNSUPPORTED("8wngkvmkilwdbxat9rddy9qv6"); // if (W >= H) { UNSUPPORTED("1xe0f3svmp0ieofq7s2ss9z2n"); // for (bnd = 1;; bnd++) { UNSUPPORTED("9i002a0gwbjlfbzmkcc26n16h"); // x = 0; UNSUPPORTED("bbyf4zi7pju6lcgspmut3qygt"); // y = -bnd; UNSUPPORTED("dhlxiqgb2o6a1bomoafek4b66"); // for (; x < bnd; x++) UNSUPPORTED("c80k1vihrjb8lsuc6moaq5bh3"); // if (fits(x, y, info, ps, place, step, bbs)) UNSUPPORTED("46hqh1l8dmimisi2nr03ntomn"); // return; UNSUPPORTED("eyxe9lc00uz4eqb1uii15fjc1"); // for (; y < bnd; y++) UNSUPPORTED("c80k1vihrjb8lsuc6moaq5bh3"); // if (fits(x, y, info, ps, place, step, bbs)) UNSUPPORTED("46hqh1l8dmimisi2nr03ntomn"); // return; UNSUPPORTED("9s5n7ukau4s2kpxp4szrf537q"); // for (; x > -bnd; x--) UNSUPPORTED("c80k1vihrjb8lsuc6moaq5bh3"); // if (fits(x, y, info, ps, place, step, bbs)) UNSUPPORTED("46hqh1l8dmimisi2nr03ntomn"); // return; UNSUPPORTED("2p7aqe0xpy2yshac8hs4h8boz"); // for (; y > -bnd; y--) UNSUPPORTED("c80k1vihrjb8lsuc6moaq5bh3"); // if (fits(x, y, info, ps, place, step, bbs)) UNSUPPORTED("46hqh1l8dmimisi2nr03ntomn"); // return; UNSUPPORTED("7zfcwps71uh29bw8vxk0wu5r6"); // for (; x < 0; x++) UNSUPPORTED("c80k1vihrjb8lsuc6moaq5bh3"); // if (fits(x, y, info, ps, place, step, bbs)) UNSUPPORTED("46hqh1l8dmimisi2nr03ntomn"); // return; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("1xe0f3svmp0ieofq7s2ss9z2n"); // for (bnd = 1;; bnd++) { UNSUPPORTED("3suauipkdshia74hhot2qydd6"); // y = 0; UNSUPPORTED("13guhblt4ee02wp7skslgweux"); // x = -bnd; UNSUPPORTED("2p7aqe0xpy2yshac8hs4h8boz"); // for (; y > -bnd; y--) UNSUPPORTED("c80k1vihrjb8lsuc6moaq5bh3"); // if (fits(x, y, info, ps, place, step, bbs)) UNSUPPORTED("46hqh1l8dmimisi2nr03ntomn"); // return; UNSUPPORTED("dhlxiqgb2o6a1bomoafek4b66"); // for (; x < bnd; x++) UNSUPPORTED("c80k1vihrjb8lsuc6moaq5bh3"); // if (fits(x, y, info, ps, place, step, bbs)) UNSUPPORTED("46hqh1l8dmimisi2nr03ntomn"); // return; UNSUPPORTED("eyxe9lc00uz4eqb1uii15fjc1"); // for (; y < bnd; y++) UNSUPPORTED("c80k1vihrjb8lsuc6moaq5bh3"); // if (fits(x, y, info, ps, place, step, bbs)) UNSUPPORTED("46hqh1l8dmimisi2nr03ntomn"); // return; UNSUPPORTED("9s5n7ukau4s2kpxp4szrf537q"); // for (; x > -bnd; x--) UNSUPPORTED("c80k1vihrjb8lsuc6moaq5bh3"); // if (fits(x, y, info, ps, place, step, bbs)) UNSUPPORTED("46hqh1l8dmimisi2nr03ntomn"); // return; UNSUPPORTED("ejcax560bkqv16vszo54w4m5d"); // for (; y > 0; y--) UNSUPPORTED("c80k1vihrjb8lsuc6moaq5bh3"); // if (fits(x, y, info, ps, place, step, bbs)) UNSUPPORTED("46hqh1l8dmimisi2nr03ntomn"); // return; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 cm57bp8kzzj7nhvnbzhzniya7 // static packval_t* userVals //3 dy401uvesqi5waa3p7s48m4ab // static int ucmpf(const void *X, const void *Y) public static Object ucmpf(Object... arg) { UNSUPPORTED("137928stzn8zfxl3jxu2a3ai5"); // static int ucmpf(const void *X, const void *Y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1ku8n7iezmely5ex218gfmgnn"); // ainfo* x = *(ainfo **) X; UNSUPPORTED("c5kqjorns3t5qoc40cc435dzl"); // ainfo* y = *(ainfo **) Y; UNSUPPORTED("5tomfbuz1yassu35dwz1iq7vm"); // int dX = userVals[x->index]; UNSUPPORTED("bpyepdnz0i98c1givec8sfzi8"); // int dY = userVals[y->index]; UNSUPPORTED("esc8v2x5h3onwsqp6c6xno2wx"); // if (dX > dY) return 1; UNSUPPORTED("7qerkoonjr1hepr83sy6pv0tv"); // else if (dX < dY) return -1; UNSUPPORTED("895k5gbyc2kla939upm8m5u76"); // else return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6x4xkvohgtocih0ggo5pnszne // static int acmpf(const void *X, const void *Y) public static Object acmpf(Object... arg) { UNSUPPORTED("423xzl59p1su4ak69hnavsj3y"); // static int acmpf(const void *X, const void *Y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1ku8n7iezmely5ex218gfmgnn"); // ainfo* x = *(ainfo **) X; UNSUPPORTED("c5kqjorns3t5qoc40cc435dzl"); // ainfo* y = *(ainfo **) Y; UNSUPPORTED("8gzrdc9r316hn5bgbdj9iwld"); // double dX = x->height + x->width; UNSUPPORTED("acl6jabv3oppesl52kwesjisc"); // double dY = y->height + y->width; UNSUPPORTED("3ydx317qb6esfml32gmrn8d2"); // if (dX < dY) return 1; UNSUPPORTED("6dxscssmk09iu34elvy825a17"); // else if (dX > dY) return -1; UNSUPPORTED("895k5gbyc2kla939upm8m5u76"); // else return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1ri9de5rw5soigxidz94knl59 // static point * arrayRects (int ng, boxf* gs, pack_info* pinfo) public static Object arrayRects(Object... arg) { UNSUPPORTED("7mjw19ag4ln47wi0vuem3rdo7"); // static point * UNSUPPORTED("7i2605a8yy8rvl2sjqdyq0zkr"); // arrayRects (int ng, boxf* gs, pack_info* pinfo) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("587clam8w31px41vh3zl1x5zz"); // int nr = 0, nc; UNSUPPORTED("3uj2h26d8pqkuu2k0mjvkeol9"); // int r, c; UNSUPPORTED("exshbiefqo5bvtelq35q1uihg"); // ainfo *info; UNSUPPORTED("wyaib9x4tjhrx2m1ezfsaukn"); // ainfo *ip; UNSUPPORTED("2s7rlgsp3tf6744uvlbowf61l"); // ainfo **sinfo; UNSUPPORTED("3dy5gn4dyvwvrrpcjcltwo1or"); // double* widths; UNSUPPORTED("c0nhg35w7lcgf18f246eg5tsw"); // double* heights; UNSUPPORTED("4d9aph59v9jbee7xholivf5zp"); // double v, wd, ht; UNSUPPORTED("7843lpndabgsr9cdbfkcywvvx"); // point* places = (point*)zmalloc((ng)*sizeof(point)); UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("7l9fl3dxxtjbfy8hgqxikcdlp"); // int sz, rowMajor; UNSUPPORTED("83ixjypz1k5iieg2apicsmpgn"); // /* set up no. of rows and columns */ UNSUPPORTED("c1codecudzu0sc5eeyf0k3shl"); // sz = pinfo->sz; UNSUPPORTED("368ad1d7qg13ji33rpsspgt8n"); // if (pinfo->flags & (1 << 0)) { UNSUPPORTED("9nsjbn4fps3cxesy71lw4otlx"); // rowMajor = 0; UNSUPPORTED("6r33xzmrfhkea13cb2uq9to3w"); // if (sz > 0) { UNSUPPORTED("t30y3kxgl5xg1b0x1pvhso1i"); // nr = sz; UNSUPPORTED("6ifv906e9hfiqnj8h4zuwcj4y"); // nc = (ng + (nr-1))/nr; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("cio9a5vmyx6df3sfnalfboiuf"); // nr = ceil(sqrt(ng)); UNSUPPORTED("6ifv906e9hfiqnj8h4zuwcj4y"); // nc = (ng + (nr-1))/nr; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("ctpc0t0nilg3t9gj01k4ywsj3"); // rowMajor = 1; UNSUPPORTED("6r33xzmrfhkea13cb2uq9to3w"); // if (sz > 0) { UNSUPPORTED("6errm4a85tsehl607eqelczds"); // nc = sz; UNSUPPORTED("1x339pl43qiukqwjve0wxt28e"); // nr = (ng + (nc-1))/nc; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("364szoyjdpowhykehht3akq3e"); // nc = ceil(sqrt(ng)); UNSUPPORTED("1x339pl43qiukqwjve0wxt28e"); // nr = (ng + (nc-1))/nc; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); // if (Verbose) UNSUPPORTED("3pdy7z56ruqq4oyacr883mikq"); // fprintf (stderr, "array packing: %s %d rows %d columns\n", (rowMajor?"row major":"column major"), nr, nc); UNSUPPORTED("6043fy5yx6lbdsxu5yn3brmal"); // widths = (double*)zmalloc((nc+1)*sizeof(double)); UNSUPPORTED("a1b2xc5h9ne6kbzuy0nkuwvyo"); // heights = (double*)zmalloc((nr+1)*sizeof(double)); UNSUPPORTED("9aw3rarlnxmlwhap0h7473k7u"); // ip = info = (ainfo*)zmalloc((ng)*sizeof(ainfo)); UNSUPPORTED("5rngkhxlli0ca2dadcc2l90yc"); // for (i = 0; i < ng; i++, ip++) { UNSUPPORTED("ay7zkx9vy6thctuz1zc6uwgp"); // bb = gs[i]; UNSUPPORTED("6u6ndmrhwricwao2uxni5h1k0"); // ip->width = bb.UR.x - bb.LL.x + pinfo->margin; UNSUPPORTED("e97e7wvrktg5tvh7jgix3rh4n"); // ip->height = bb.UR.y - bb.LL.y + pinfo->margin; UNSUPPORTED("c1vy7jp6gj45js1vpscqrdow5"); // ip->index = i; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cj72vx5oyj2o2q2m7645spujf"); // sinfo = (ainfo**)zmalloc((ng)*sizeof(ainfo*)); UNSUPPORTED("7zun8aoc3cgzj5s89wluw8xq4"); // for (i = 0; i < ng; i++) { UNSUPPORTED("9mn44smuwqqa7634ytys2no53"); // sinfo[i] = info + i; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("12fyz4qnl5zp3xwitz3v50nei"); // if (pinfo->vals) { UNSUPPORTED("60usk332i3h20n9in7ul42urp"); // userVals = pinfo->vals; UNSUPPORTED("zri192zm0qymulo1qj64bkk4"); // qsort(sinfo, ng, sizeof(ainfo *), ucmpf); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("elre2mkk0b66ystun7ksceacd"); // else if (!(pinfo->flags & (1 << 6))) { UNSUPPORTED("46wm7t71y606fg0p1pmnrotxs"); // qsort(sinfo, ng, sizeof(ainfo *), acmpf); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bh1a6itzd1t536vncxeg55kws"); // /* compute column widths and row heights */ UNSUPPORTED("a29uwx3mv4g7tkw0a7nld91n6"); // r = c = 0; UNSUPPORTED("5rngkhxlli0ca2dadcc2l90yc"); // for (i = 0; i < ng; i++, ip++) { UNSUPPORTED("9pextrq1h4wbpvek3nn5hpdj1"); // ip = sinfo[i]; UNSUPPORTED("2m8hk2qls872rs7vknlc6s0lx"); // widths[c] = MAX(widths[c],ip->width); UNSUPPORTED("e6t8bv0nuykk21ia3zd431xfa"); // heights[r] = MAX(heights[r],ip->height); UNSUPPORTED("2x8y0mx5s4y94qc2l938923p3"); // if (rowMajor){ c++; if (c == nc) { c = 0; r++; } } else { r++; if (r == nr) { r = 0; c++; } }; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("35agl3q9fx549xwrbpsl2d4us"); // /* convert widths and heights to positions */ UNSUPPORTED("2xhvo47ul8yuzrfw9qt8dw0ps"); // wd = 0; UNSUPPORTED("b19j342j5puv71h95o4ipftcy"); // for (i = 0; i <= nc; i++) { UNSUPPORTED("cn91vt3tkx1q0hk0v0efsy0u5"); // v = widths[i]; UNSUPPORTED("9rsjnuoiq6k71cnjchxzdi4b2"); // widths[i] = wd; UNSUPPORTED("8uj5r8kz22am852pbxn5xbj2o"); // wd += v; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("28dk2342xmi4riersjpcgji1t"); // ht = 0; UNSUPPORTED("v2352s1mp3wons7njjjynrxt"); // for (i = nr; 0 < i; i--) { UNSUPPORTED("6ua786jl1gs84859xekg6b8fg"); // v = heights[i-1]; UNSUPPORTED("bazhlkhnh5k7eheis0ez0n9vb"); // heights[i] = ht; UNSUPPORTED("bvofkv7v5wfgk9cj4wzfaib3y"); // ht += v; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9rbcr484ikmoafnug3xnaxs32"); // heights[0] = ht; UNSUPPORTED("ddygazuu5ir5m2y5nmnsrajqx"); // /* position rects */ UNSUPPORTED("a29uwx3mv4g7tkw0a7nld91n6"); // r = c = 0; UNSUPPORTED("5rngkhxlli0ca2dadcc2l90yc"); // for (i = 0; i < ng; i++, ip++) { UNSUPPORTED("drn8u5l7wlzkbovfo92png2jy"); // int idx; UNSUPPORTED("9pextrq1h4wbpvek3nn5hpdj1"); // ip = sinfo[i]; UNSUPPORTED("2ps143essu8ajs0kj531wnief"); // idx = ip->index; UNSUPPORTED("3k2y6x5t2zzgaukk772pdwx6f"); // bb = gs[idx]; UNSUPPORTED("81ldqtnpthu2abqyry4z6ym8m"); // if (pinfo->flags & (1 << 2)) UNSUPPORTED("13f3a690c3l0f4v06nrwmimi4"); // places[idx].x = widths[c]; UNSUPPORTED("8eg2gw7wqr3mql161981r68br"); // else if (pinfo->flags & (1 << 3)) UNSUPPORTED("e3iwxanyszyzq23zx6vtonrj8"); // places[idx].x = widths[c+1] - (bb.UR.x - bb.LL.x); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("67vni7zjcybymkjnpjnavoflk"); // places[idx].x = (widths[c] + widths[c+1] - bb.UR.x - bb.LL.x)/2.0; UNSUPPORTED("8dcmf759vr0nvbyid59jtzauy"); // if (pinfo->flags & (1 << 4)) UNSUPPORTED("24esxiop1grjauhaq6g2839fx"); // places[idx].y = heights[r] - (bb.UR.y - bb.LL.y); UNSUPPORTED("2dch1dl8cgtov5959f5m06bwn"); // else if (pinfo->flags & (1 << 5)) UNSUPPORTED("4t5x1tjwncmgjvqii9uimq4b1"); // places[idx].y = heights[r+1]; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("djge91fby18vnmw35p7pnh54e"); // places[idx].y = (heights[r] + heights[r+1] - bb.UR.y - bb.LL.y)/2.0; UNSUPPORTED("2x8y0mx5s4y94qc2l938923p3"); // if (rowMajor){ c++; if (c == nc) { c = 0; r++; } } else { r++; if (r == nr) { r = 0; c++; } }; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2t9jewjat2jsi4mczos1h2k63"); // free (info); UNSUPPORTED("6m428qwh53clq0b13nr60dt5t"); // free (sinfo); UNSUPPORTED("srea4nhmmob1m0yxi5gapwxa"); // free (widths); UNSUPPORTED("aej4g6wixnif5navqnu0z5d02"); // free (heights); UNSUPPORTED("4pw9nikwh26us27xquq8gxeom"); // return places; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2irl4ooaj6ar2weyzs1jt6vnj // static point* polyRects(int ng, boxf* gs, pack_info * pinfo) public static Object polyRects(Object... arg) { UNSUPPORTED("ck2vnuu91etfn4os7sqednjdt"); // static point* UNSUPPORTED("emdivhrzg1z379tgeonw1e2wn"); // polyRects(int ng, boxf* gs, pack_info * pinfo) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("824stmaoi8w8lahubzh2aqmnt"); // int stepSize; UNSUPPORTED("egeh7d2rftmojiwelzoch9qzs"); // ginfo *info; UNSUPPORTED("cgpy9yq4nom59s6xdcks21z34"); // ginfo **sinfo; UNSUPPORTED("d5zj0uiljdydjp99y2c8421tm"); // point *places; UNSUPPORTED("vela488x5cw8iukv3b2rxxfg"); // Dict_t *ps; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("757l2o5nnleyj2fwon83lkwp4"); // point center; UNSUPPORTED("4xciuabrdcqf4qlyxzw20rgoq"); // /* calculate grid size */ UNSUPPORTED("2eg1bg6rzeyuwox4ji13hfsn3"); // stepSize = computeStep(ng, gs, pinfo->margin); UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); // if (Verbose) UNSUPPORTED("9jvi53wte1pa00ysz1tyoirwu"); // fprintf(stderr, "step size = %d\n", stepSize); UNSUPPORTED("4uchvv7hqly12y7in635yrzk2"); // if (stepSize <= 0) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("ai9xhwyay6jsf18f9an9wiqxh"); // /* generate polyomino cover for the rectangles */ UNSUPPORTED("cc7f8jeq787ivlq7z8w36zsxr"); // center.x = center.y = 0; UNSUPPORTED("5ja8kdpayis0xlce0mars9kyq"); // info = (ginfo*)zmalloc((ng)*sizeof(ginfo)); UNSUPPORTED("7zun8aoc3cgzj5s89wluw8xq4"); // for (i = 0; i < ng; i++) { UNSUPPORTED("dotsh6x7f3q84jxx9kanz0zxs"); // info[i].index = i; UNSUPPORTED("50f4hs6qh3bifktl7ofmdluau"); // genBox(gs[i], info + i, stepSize, pinfo->margin, center, ""); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7hsq9ilfch3hi4eeqdzbo8hcz"); // /* sort */ UNSUPPORTED("516yap1pdty58f0uvcm0ol21t"); // sinfo = (ginfo **)zmalloc((ng)*sizeof(ginfo *)); UNSUPPORTED("7zun8aoc3cgzj5s89wluw8xq4"); // for (i = 0; i < ng; i++) { UNSUPPORTED("9mn44smuwqqa7634ytys2no53"); // sinfo[i] = info + i; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("aht3on8lvvmmuavandpu3mrqf"); // qsort(sinfo, ng, sizeof(ginfo *), cmpf); UNSUPPORTED("6udv07xykmb0e2pdyqurnc9p4"); // ps = newPS(); UNSUPPORTED("1lrlt4okvwo1r2jn12curx4a4"); // places = (point*)zmalloc((ng)*sizeof(point)); UNSUPPORTED("8ykrswirvj1kokawlp0qt20e"); // for (i = 0; i < ng; i++) UNSUPPORTED("amjrgk4ewbgnlny99ltipn4rw"); // placeGraph(i, sinfo[i], ps, places + (sinfo[i]->index), UNSUPPORTED("cdibq48a1vztjqwrav8lplm2l"); // stepSize, pinfo->margin, gs); UNSUPPORTED("cz66ku8toq29n6o82kekmnlpy"); // free(sinfo); UNSUPPORTED("8ykrswirvj1kokawlp0qt20e"); // for (i = 0; i < ng; i++) UNSUPPORTED("87pbwy86umrgdjafr4sezm9n"); // free(info[i].cells); UNSUPPORTED("3evfbda0xfi17zcdebhf34f0u"); // free(info); UNSUPPORTED("dg5ijmmysdxc2qm5j58u0zr8i"); // freePS(ps); UNSUPPORTED("9ez4vr7qufhjoyjfdx4btsya0"); // if (Verbose > 1) UNSUPPORTED("8zex7y0yhzzbk09jno4q16t99"); // for (i = 0; i < ng; i++) UNSUPPORTED("d35w6hrucxuabl0h4ezjaa3uc"); // fprintf(stderr, "pos[%d] %d %d\n", i, places[i].x, UNSUPPORTED("a7cjk49c6ofhzhsgib8hilvhs"); // places[i].y); UNSUPPORTED("4pw9nikwh26us27xquq8gxeom"); // return places; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1knslw9muqsgklyyji7ievnok // static point* polyGraphs(int ng, Agraph_t ** gs, Agraph_t * root, pack_info * pinfo) public static Object polyGraphs(Object... arg) { UNSUPPORTED("ck2vnuu91etfn4os7sqednjdt"); // static point* UNSUPPORTED("b0bfi4ppj9z49du0yf8jw51g5"); // polyGraphs(int ng, Agraph_t ** gs, Agraph_t * root, pack_info * pinfo) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("824stmaoi8w8lahubzh2aqmnt"); // int stepSize; UNSUPPORTED("egeh7d2rftmojiwelzoch9qzs"); // ginfo *info; UNSUPPORTED("cgpy9yq4nom59s6xdcks21z34"); // ginfo **sinfo; UNSUPPORTED("d5zj0uiljdydjp99y2c8421tm"); // point *places; UNSUPPORTED("vela488x5cw8iukv3b2rxxfg"); // Dict_t *ps; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("g39u5n77k6uyq207nn2icvox"); // boolean *fixed = pinfo->fixed; UNSUPPORTED("7o8gvve73xqzq084bw5qh7gcn"); // int fixed_cnt = 0; UNSUPPORTED("w52lhq0cd0isq9ayfz50inrq"); // box bb, fixed_bb = { {0, 0}, {0, 0} }; UNSUPPORTED("757l2o5nnleyj2fwon83lkwp4"); // point center; UNSUPPORTED("7gi50jrfs9ke5a9wali0er15n"); // boxf* bbs; UNSUPPORTED("3mtqlb2sgomhp5qec8wdsugsi"); // if (ng <= 0) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("djthf1vazs4za0so4hdnt5wj0"); // /* update bounding box info for each graph */ UNSUPPORTED("5jm29bcxipf9ixrkoge4l6qm2"); // /* If fixed, compute bbox of fixed graphs */ UNSUPPORTED("7zun8aoc3cgzj5s89wluw8xq4"); // for (i = 0; i < ng; i++) { UNSUPPORTED("8u7vr203farotwj0fftrag209"); // Agraph_t *g = gs[i]; UNSUPPORTED("1pr9y3xbbgtpw0j2cdlmr5z50"); // compute_bb(g); UNSUPPORTED("24swiauow6ik517gmj0sm5rfw"); // if (fixed && fixed[i]) { UNSUPPORTED("97wxoa3jn3w53rreu435mpy74"); // BF2B(GD_bb(g), bb); UNSUPPORTED("5lpwic2iylf55w56n041ro1x"); // if (fixed_cnt) { UNSUPPORTED("9frrmjyww4wh93dyu5k98peb9"); // fixed_bb.LL.x = MIN(bb.LL.x, fixed_bb.LL.x); UNSUPPORTED("e85tcd131giv33jrjja1olduw"); // fixed_bb.LL.y = MIN(bb.LL.y, fixed_bb.LL.y); UNSUPPORTED("dj6e5qtw7vxwfyomq1k58hcsk"); // fixed_bb.UR.x = MAX(bb.UR.x, fixed_bb.UR.x); UNSUPPORTED("b4wurhjcgswx703j06qz21n6l"); // fixed_bb.UR.y = MAX(bb.UR.y, fixed_bb.UR.y); UNSUPPORTED("afk9bpom7x393euamnvwwkx6b"); // } else UNSUPPORTED("2e612eixx1ofzkwvzqn2kwd76"); // fixed_bb = bb; UNSUPPORTED("ny0y2ibeyhhufmet5xl3j048"); // fixed_cnt++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("29xfwsb3c8xg86f1k0dnyeo0w"); // if (Verbose > 2) { UNSUPPORTED("cdzr4ncs6h15d0ih7ert3l5z3"); // fprintf(stderr, "bb[%s] %.5g %.5g %.5g %.5g\n", agnameof(g), UNSUPPORTED("759r58p1rwwxhyxaj7ofczgfy"); // GD_bb(g).LL.x, GD_bb(g).LL.y, UNSUPPORTED("btv2fogged3wlas7cotr1a3my"); // GD_bb(g).UR.x, GD_bb(g).UR.y); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4xciuabrdcqf4qlyxzw20rgoq"); // /* calculate grid size */ UNSUPPORTED("1zfqthv6gt9dvwrk425hk65xk"); // bbs = (boxf*)gmalloc((ng)*sizeof(boxf)); UNSUPPORTED("8ykrswirvj1kokawlp0qt20e"); // for (i = 0; i < ng; i++) UNSUPPORTED("2bt80lu17wcugimh4ljj70zdp"); // bbs[i] = GD_bb(gs[i]); UNSUPPORTED("5owrhafi21tpc0ktinz3o2f43"); // stepSize = computeStep(ng, bbs, pinfo->margin); UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); // if (Verbose) UNSUPPORTED("9jvi53wte1pa00ysz1tyoirwu"); // fprintf(stderr, "step size = %d\n", stepSize); UNSUPPORTED("4uchvv7hqly12y7in635yrzk2"); // if (stepSize <= 0) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("1alk6avw0u6hfvqo3xmul0jg6"); // /* generate polyomino cover for the graphs */ UNSUPPORTED("84yhbc8186y40vqfeqxzxfrz6"); // if (fixed) { UNSUPPORTED("5ueew992kcblg2bz1oerhmyqi"); // center.x = (fixed_bb.LL.x + fixed_bb.UR.x) / 2; UNSUPPORTED("87nbiqt8xjmmkxfd2e4w4w7vr"); // center.y = (fixed_bb.LL.y + fixed_bb.UR.y) / 2; UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("e83bosc1hfovot0zgf1yquw6p"); // center.x = center.y = 0; UNSUPPORTED("5ja8kdpayis0xlce0mars9kyq"); // info = (ginfo*)zmalloc((ng)*sizeof(ginfo)); UNSUPPORTED("7zun8aoc3cgzj5s89wluw8xq4"); // for (i = 0; i < ng; i++) { UNSUPPORTED("8u7vr203farotwj0fftrag209"); // Agraph_t *g = gs[i]; UNSUPPORTED("dotsh6x7f3q84jxx9kanz0zxs"); // info[i].index = i; UNSUPPORTED("khn1not6v8q3llxivwzrif1a"); // if (pinfo->mode == l_graph) UNSUPPORTED("ef0j485ay1qbdf8azewxc0pwi"); // genBox(GD_bb(g), info + i, stepSize, pinfo->margin, center, agnameof(g)); UNSUPPORTED("bwshrbmzbgqbses1jh55297bx"); // else if (genPoly(root, gs[i], info + i, stepSize, pinfo, center)) { UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7hsq9ilfch3hi4eeqdzbo8hcz"); // /* sort */ UNSUPPORTED("516yap1pdty58f0uvcm0ol21t"); // sinfo = (ginfo **)zmalloc((ng)*sizeof(ginfo *)); UNSUPPORTED("7zun8aoc3cgzj5s89wluw8xq4"); // for (i = 0; i < ng; i++) { UNSUPPORTED("9mn44smuwqqa7634ytys2no53"); // sinfo[i] = info + i; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("aht3on8lvvmmuavandpu3mrqf"); // qsort(sinfo, ng, sizeof(ginfo *), cmpf); UNSUPPORTED("6udv07xykmb0e2pdyqurnc9p4"); // ps = newPS(); UNSUPPORTED("1lrlt4okvwo1r2jn12curx4a4"); // places = (point*)zmalloc((ng)*sizeof(point)); UNSUPPORTED("84yhbc8186y40vqfeqxzxfrz6"); // if (fixed) { UNSUPPORTED("3e0deh4u5tol3atbp956xif23"); // for (i = 0; i < ng; i++) { UNSUPPORTED("umfi6ok5pdkv9azybxeoslof"); // if (fixed[i]) UNSUPPORTED("8wt6vr2q1holh0icpplq4zqec"); // placeFixed(sinfo[i], ps, places + (sinfo[i]->index), UNSUPPORTED("deqjfvghqxur4bfoz3puk300n"); // center); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3e0deh4u5tol3atbp956xif23"); // for (i = 0; i < ng; i++) { UNSUPPORTED("74god7lqd61d25tmue88dqtbf"); // if (!fixed[i]) UNSUPPORTED("czkvahaom618elf7saxx38r8p"); // placeGraph(i, sinfo[i], ps, places + (sinfo[i]->index), UNSUPPORTED("i3cmxkksuk6am6ht9wvhbdgc"); // stepSize, pinfo->margin, bbs); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("8zex7y0yhzzbk09jno4q16t99"); // for (i = 0; i < ng; i++) UNSUPPORTED("a532n3o5yemks8slunbp5py2i"); // placeGraph(i, sinfo[i], ps, places + (sinfo[i]->index), UNSUPPORTED("dt17bemprdm748nimg2zjv0m0"); // stepSize, pinfo->margin, bbs); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cz66ku8toq29n6o82kekmnlpy"); // free(sinfo); UNSUPPORTED("8ykrswirvj1kokawlp0qt20e"); // for (i = 0; i < ng; i++) UNSUPPORTED("87pbwy86umrgdjafr4sezm9n"); // free(info[i].cells); UNSUPPORTED("3evfbda0xfi17zcdebhf34f0u"); // free(info); UNSUPPORTED("dg5ijmmysdxc2qm5j58u0zr8i"); // freePS(ps); UNSUPPORTED("a3ilp870e8stntakfa9mhpq3s"); // free (bbs); UNSUPPORTED("9ez4vr7qufhjoyjfdx4btsya0"); // if (Verbose > 1) UNSUPPORTED("8zex7y0yhzzbk09jno4q16t99"); // for (i = 0; i < ng; i++) UNSUPPORTED("d35w6hrucxuabl0h4ezjaa3uc"); // fprintf(stderr, "pos[%d] %d %d\n", i, places[i].x, UNSUPPORTED("a7cjk49c6ofhzhsgib8hilvhs"); // places[i].y); UNSUPPORTED("4pw9nikwh26us27xquq8gxeom"); // return places; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 al89yl8dh1jxwk08tyczwknn7 // point *putGraphs(int ng, Agraph_t ** gs, Agraph_t * root, pack_info * pinfo) public static Object putGraphs(Object... arg) { UNSUPPORTED("2bmiezotvi7u8eu53600a4id7"); // point *putGraphs(int ng, Agraph_t ** gs, Agraph_t * root, UNSUPPORTED("dnotj3yx4zh4izfbxl101921l"); // pack_info * pinfo) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b9q08fv1def3y3mbkfcttoygi"); // int i, v; UNSUPPORTED("7gi50jrfs9ke5a9wali0er15n"); // boxf* bbs; UNSUPPORTED("c9h1fo1uvas6uw1a8qaapnln6"); // Agraph_t* g; UNSUPPORTED("37y05h5xfo0t6oujuechff9od"); // point* pts; UNSUPPORTED("yiuh599p05f2mpu2e3pesu2o"); // char* s; UNSUPPORTED("10gh49wkm3r9433ve3ykoy8zd"); // if (ng <= 0) return NULL; UNSUPPORTED("74z1gk7owd6s8rog374fsoz77"); // if (pinfo->mode <= l_graph) UNSUPPORTED("3mqc3im4s572a4m1gq3luvraa"); // return polyGraphs (ng, gs, root, pinfo); UNSUPPORTED("1zfqthv6gt9dvwrk425hk65xk"); // bbs = (boxf*)gmalloc((ng)*sizeof(boxf)); UNSUPPORTED("7zun8aoc3cgzj5s89wluw8xq4"); // for (i = 0; i < ng; i++) { UNSUPPORTED("1o35elvmsbg14ylv3li4k555e"); // g = gs[i]; UNSUPPORTED("1pr9y3xbbgtpw0j2cdlmr5z50"); // compute_bb(g); UNSUPPORTED("38ehh0n0z7yr3ku3wax91eny9"); // bbs[i] = GD_bb(g); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8kmg7cdfeuqszcwxcz5y3c5td"); // if (pinfo->mode == l_array) { UNSUPPORTED("7nb1jaoblp1yvgvo27aaud6s6"); // if (pinfo->flags & (1 << 1)) { UNSUPPORTED("dbollhgp3oflycwtdbdbh9i88"); // pinfo->vals = (packval_t*)zmalloc((ng)*sizeof(packval_t)); UNSUPPORTED("58nh8251ikin1r1ikujawgmvi"); // for (i = 0; i < ng; i++) { UNSUPPORTED("f0c6o7jozps86mqlhvb9n9d6s"); // s = agget (gs[i], "sortv"); UNSUPPORTED("dor0p055w386zaz88qm97z87v"); // if (s && (sscanf (s, "%d", &v) > 0) && (v >= 0)) UNSUPPORTED("14rvncot97v829zy8a8tp0zwz"); // pinfo->vals[i] = v; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1ptopw7nt3b3yr62pvaymgk9m"); // pts = arrayRects (ng, bbs, pinfo); UNSUPPORTED("b93dvbn6t4y3hpjm8h8t94bxt"); // if (pinfo->flags & (1 << 1)) UNSUPPORTED("2y3e1eszpxr131wfwuq7wc18i"); // free (pinfo->vals); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a3ilp870e8stntakfa9mhpq3s"); // free (bbs); UNSUPPORTED("b7gk8q1reftzri269holggnig"); // return pts; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e73o8yamtvnffshrs9rm3lim0 // point * putRects(int ng, boxf* bbs, pack_info* pinfo) public static Object putRects(Object... arg) { UNSUPPORTED("b2t3wt7lnrvb61t0hory0gh2h"); // point * UNSUPPORTED("8fweyba26afb4b3vn251yp6u1"); // putRects(int ng, boxf* bbs, pack_info* pinfo) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("10gh49wkm3r9433ve3ykoy8zd"); // if (ng <= 0) return NULL; UNSUPPORTED("f2v1akrh6kotuwhh1shnn0cvk"); // if ((pinfo->mode == l_node) || (pinfo->mode == l_clust)) return NULL; UNSUPPORTED("bvxb92ntr7lr5208ycn2rmmpa"); // if (pinfo->mode == l_graph) UNSUPPORTED("790j7xshzs2a26qdpizm1dor3"); // return polyRects (ng, bbs, pinfo); UNSUPPORTED("15zpqbwzhvrw6k4i293i6qm4o"); // else if (pinfo->mode == l_array) UNSUPPORTED("defqlfr5ltykxr36gzynktwnd"); // return arrayRects (ng, bbs, pinfo); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("11hwqop4xebvtcskop4uhpp01"); // return NULL; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1snngl11fvf8fd7gvroyic9u6 // int packRects(int ng, boxf* bbs, pack_info* pinfo) public static Object packRects(Object... arg) { UNSUPPORTED("7zkpme13g8rxxwloxvpvvnbcw"); // int UNSUPPORTED("byuhbycc8aq8qmlje1kkikzes"); // packRects(int ng, boxf* bbs, pack_info* pinfo) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("ca6brvq3h4u316zi41fa1e7nl"); // point *pp; UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; UNSUPPORTED("41nrdsugvfgw23s93g0dhizkn"); // point p; UNSUPPORTED("4rnqckqjseeaveduaeddk5kly"); // if (ng < 0) return -1; UNSUPPORTED("62vqifnah2fjfuxwj69bq3p1z"); // if (ng <= 1) return 0; UNSUPPORTED("e86z2a3ujrvoqxb1e6rn7l4xh"); // pp = putRects(ng, bbs, pinfo); UNSUPPORTED("5e2m9zqmerz2m76uyivjvvjnz"); // if (!pp) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("1hemhly8ts9l7caj22as9b5nv"); // for (i = 0; i < ng; i++) { UNSUPPORTED("cpgjovg5bttmcqygaaobc3a6l"); // bb = bbs[i]; UNSUPPORTED("4v8yuwm5xgienbqxhd69pz5cc"); // p = pp[i]; UNSUPPORTED("f3utitevgnfhjuotaq73baii9"); // bb.LL.x += p.x; UNSUPPORTED("31znkfxiz3wa3ebxopvejt2eu"); // bb.UR.x += p.x; UNSUPPORTED("c3ak9fudqw0ye4ls2y61ajfta"); // bb.LL.y += p.y; UNSUPPORTED("djl8lmebqjuxhormrrnxryg2d"); // bb.UR.y += p.y; UNSUPPORTED("ds6wyt4f0tketopteichqayg0"); // bbs[i] = bb; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7vph3omiu71ktck9w3uvcdp6q"); // free(pp); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eyiqyefdjlfh0t51u26x2zh5x // static void shiftEdge(Agedge_t * e, int dx, int dy) public static Object shiftEdge(Object... arg) { UNSUPPORTED("9u5vr04c98yfoctnamlbuc2ag"); // static void shiftEdge(Agedge_t * e, int dx, int dy) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9e6bnowy6jfhnib5uev3scpsu"); // int j, k; UNSUPPORTED("37thdceezsvepe7tlyfatrbcw"); // bezier bz; UNSUPPORTED("88hfgnjbnnlyh1vmms1kwsrod"); // if (ED_label(e)) UNSUPPORTED("4ktdw0hk8c5lnprxiqxxp8kpf"); // ((ED_label(e)->pos).x += dx, (ED_label(e)->pos).y += dy); UNSUPPORTED("37decwf4jqk863lp048x1gcwk"); // if (ED_xlabel(e)) UNSUPPORTED("8xzkzyz7cb3te6mkfkt3zlvvv"); // ((ED_xlabel(e)->pos).x += dx, (ED_xlabel(e)->pos).y += dy); UNSUPPORTED("dc4h855lfazgpazdd3bsd3dle"); // if (ED_head_label(e)) UNSUPPORTED("ekvchodhl5temnce8je23xtng"); // ((ED_head_label(e)->pos).x += dx, (ED_head_label(e)->pos).y += dy); UNSUPPORTED("2nan67aki9dkzb14alqq58pk6"); // if (ED_tail_label(e)) UNSUPPORTED("4humrtjlk95veottt9p8slpt3"); // ((ED_tail_label(e)->pos).x += dx, (ED_tail_label(e)->pos).y += dy); UNSUPPORTED("tt8piuiel7igl12irv6488jd"); // if (ED_spl(e) == NULL) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("e9vow5lzqvgcxabgjj99yokjr"); // for (j = 0; j < ED_spl(e)->size; j++) { UNSUPPORTED("8ni4zfvf78h93ucjuoqtuomjh"); // bz = ED_spl(e)->list[j]; UNSUPPORTED("7h0wreqeq69tmfuymjgf6y30p"); // for (k = 0; k < bz.size; k++) UNSUPPORTED("8p04wyfp1epw24aj3ooutcm9f"); // ((bz.list[k]).x += dx, (bz.list[k]).y += dy); UNSUPPORTED("9u19ic8wst5bdydvzocx725dd"); // if (bz.sflag) UNSUPPORTED("7drx2tftwhcon6o1unse2w8rs"); // ((ED_spl(e)->list[j].sp).x += dx, (ED_spl(e)->list[j].sp).y += dy); UNSUPPORTED("3ps9lzlxh4tqc8zn14yrvcl4n"); // if (bz.eflag) UNSUPPORTED("did8o6w576i3j4f1c8nqnwjpl"); // ((ED_spl(e)->list[j].ep).x += dx, (ED_spl(e)->list[j].ep).y += dy); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7xx1rik6wio4uaxsnuw7osy3u // static void shiftGraph(Agraph_t * g, int dx, int dy) public static Object shiftGraph(Object... arg) { UNSUPPORTED("3rx9mi6118cqiy2pcuxsl4mgc"); // static void shiftGraph(Agraph_t * g, int dx, int dy) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8uujemixuhlf040icq3zsh7j8"); // graph_t *subg; UNSUPPORTED("2eiur8hkm8tcazpq12w4ikbqo"); // boxf bb = GD_bb(g); UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("3pb1rp6yt77fdctds9bv6t2q4"); // bb = GD_bb(g); UNSUPPORTED("8apkqrqdqqydv62uo6t2kih65"); // bb.LL.x += dx; UNSUPPORTED("cxx7s1j7oanjj7qcgww51qzv"); // bb.UR.x += dx; UNSUPPORTED("8i5b905t9fyewlfs3ptj5ts9i"); // bb.LL.y += dy; UNSUPPORTED("bat733mf4if1fc1cc75wf3vdh"); // bb.UR.y += dy; UNSUPPORTED("8pjanfm12ixxbeb7k86g3z5p4"); // GD_bb(g) = bb; UNSUPPORTED("aplr7sm051i57jygcfj6gigoh"); // if (GD_label(g)) UNSUPPORTED("3y0fbtz3yao1jomzv4uolrp00"); // ((GD_label(g)->pos).x += dx, (GD_label(g)->pos).y += dy); UNSUPPORTED("7naa6f8pevjidfr7m41eli6xj"); // for (i = 1; i <= GD_n_cluster(g); i++) { UNSUPPORTED("cpbcovu6u9jpbhniuwko58sge"); // subg = GD_clust(g)[i]; UNSUPPORTED("2gsxiux9jv0jpf915foz63dgv"); // shiftGraph(subg, dx, dy); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e3319d41y02srtfpto31q37ty // int shiftGraphs(int ng, Agraph_t ** gs, point * pp, Agraph_t * root, int doSplines) public static Object shiftGraphs(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("e3b6ggtg7s8nlv7sbaoirghbw"); // shiftGraphs(int ng, Agraph_t ** gs, point * pp, Agraph_t * root, UNSUPPORTED("9noyex54k0macq3k16r5ym7m7"); // int doSplines) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("bftz89757hgmx7ivuna8lc4z6"); // int dx, dy; UNSUPPORTED("52jqyu9tdwfx6u9l7492mdvxw"); // double fx, fy; UNSUPPORTED("41nrdsugvfgw23s93g0dhizkn"); // point p; UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("4fddvn6emf9gppkxys6y69el2"); // Agraph_t *eg; UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("3mtqlb2sgomhp5qec8wdsugsi"); // if (ng <= 0) UNSUPPORTED("bof722m66fo2c6qrziuzp1qrb"); // return abs(ng); UNSUPPORTED("7zun8aoc3cgzj5s89wluw8xq4"); // for (i = 0; i < ng; i++) { UNSUPPORTED("1o35elvmsbg14ylv3li4k555e"); // g = gs[i]; UNSUPPORTED("651v5s5braiusljmonry4n2gv"); // if (root) UNSUPPORTED("64a6av0hcmo7owy9zqh1m0rf2"); // eg = root; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("9w2sfnbzooomlt0cy7lv4r651"); // eg = g; UNSUPPORTED("4v8yuwm5xgienbqxhd69pz5cc"); // p = pp[i]; UNSUPPORTED("ap6rzh2gz0cyv006wzje9vm64"); // dx = p.x; UNSUPPORTED("ecigmad6hz1aki283absmrv4k"); // dy = p.y; UNSUPPORTED("crjm7321nijj633qm2os1rffv"); // fx = ((dx)/(double)72); UNSUPPORTED("9fof84axpoehtz8vm7e591gug"); // fy = ((dy)/(double)72); UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("emng3ci5q7cb4o56sokohkzxg"); // ND_pos(n)[0] += fx; UNSUPPORTED("7hccr00zs6a1djjd96lnn6aka"); // ND_pos(n)[1] += fy; UNSUPPORTED("9p2dkqvsj8qbvhoe67ls2u17p"); // ((ND_coord(n)).x += dx, (ND_coord(n)).y += dy); UNSUPPORTED("9i39rsg8gc22jjd87bzbvdziv"); // if (ND_xlabel(n)) { UNSUPPORTED("9hx48w0r43gelhjavye29okfv"); // ((ND_xlabel(n)->pos).x += dx, (ND_xlabel(n)->pos).y += dy); UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("3dcleparqyzm2ewv674fws8u9"); // if (doSplines) { UNSUPPORTED("8menlqwqcb9c7ireb6sa8qo21"); // for (e = agfstout(eg, n); e; e = agnxtout(eg, e)) UNSUPPORTED("l0qmhpy5cagstbj5hrkzk8rr"); // shiftEdge(e, dx, dy); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bk9jkveibpb3mrdqpv4po37sy"); // shiftGraph(g, dx, dy); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9db5t8nm89djo9ln21gm3yf8u // int packGraphs(int ng, Agraph_t ** gs, Agraph_t * root, pack_info * info) public static Object packGraphs(Object... arg) { UNSUPPORTED("56vi2bsj4me6of6ownlhvsvwz"); // int packGraphs(int ng, Agraph_t ** gs, Agraph_t * root, pack_info * info) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7p7i4cv4qt10ow22vl9znw72j"); // int ret; UNSUPPORTED("56ocwkz3s6lgpumk8xidlqcc7"); // point *pp = putGraphs(ng, gs, root, info); UNSUPPORTED("5e2m9zqmerz2m76uyivjvvjnz"); // if (!pp) UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("7qo1holf96smktjgs8l0gibpj"); // ret = shiftGraphs(ng, gs, pp, root, info->doSplines); UNSUPPORTED("7vph3omiu71ktck9w3uvcdp6q"); // free(pp); UNSUPPORTED("f3b7mj138albdr4lodyomke0z"); // return ret; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eeedpohq9tu61htldhskjnrqo // int packSubgraphs(int ng, Agraph_t ** gs, Agraph_t * root, pack_info * info) public static Object packSubgraphs(Object... arg) { UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int UNSUPPORTED("cu03rkfa1tn2levktk9f0kn72"); // packSubgraphs(int ng, Agraph_t ** gs, Agraph_t * root, pack_info * info) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7p7i4cv4qt10ow22vl9znw72j"); // int ret; UNSUPPORTED("60qkq3hoxtw8jjw7osm6gbvh9"); // ret = packGraphs(ng, gs, root, info); UNSUPPORTED("4uiunytnyi2vmlytj49547oen"); // if (ret == 0) { UNSUPPORTED("cb6qes2nvjr9djerw1rcq8w3j"); // int i, j; UNSUPPORTED("58vfsgm37n0q8bcfczvgvut8m"); // boxf bb; UNSUPPORTED("ak2n425v85g82xo9282myas7y"); // graph_t* g; UNSUPPORTED("6rvedme286x3a6z4sema6be33"); // compute_bb(root); UNSUPPORTED("b6i8aku7mgq1oktewocn2b8au"); // bb = GD_bb(root); UNSUPPORTED("3e0deh4u5tol3atbp956xif23"); // for (i = 0; i < ng; i++) { UNSUPPORTED("8awv02csdisyrr0puo3g7x7zo"); // g = gs[i]; UNSUPPORTED("3pxtqjoekga8rbxndmr9eyk8t"); // for (j = 1; j <= GD_n_cluster(g); j++) { UNSUPPORTED("15cmvttn1yf4brhtxlki7jqff"); // EXPANDBB(bb,GD_bb(GD_clust(g)[j])); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("e9bwlicnysgjem9pm2owophm3"); // GD_bb(root) = bb; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("f3b7mj138albdr4lodyomke0z"); // return ret; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8rfd6spe19v1327cufpqvnqec // int pack_graph(int ng, Agraph_t** gs, Agraph_t* root, boolean* fixed) public static Object pack_graph(Object... arg) { UNSUPPORTED("7zkpme13g8rxxwloxvpvvnbcw"); // int UNSUPPORTED("dgtmyy97t6j1t4kpcjat3nnl1"); // pack_graph(int ng, Agraph_t** gs, Agraph_t* root, boolean* fixed) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7p7i4cv4qt10ow22vl9znw72j"); // int ret; UNSUPPORTED("1uqyueaw3113nhl88qcfu7bzu"); // pack_info info; UNSUPPORTED("9pq8hgklb5oc6tdvk45bgja03"); // getPackInfo(root, l_graph, 8, &info); UNSUPPORTED("32h39ruk7pnxsjjwa8ptjg8re"); // info.doSplines = 1; UNSUPPORTED("1my115b5f8fzfk0oafnabmxfj"); // info.fixed = fixed; UNSUPPORTED("2bhwyiicw1zcnic4vjothzze3"); // ret = packSubgraphs(ng, gs, root, &info); UNSUPPORTED("5nd36gtfbsaee4fp6jvef26g8"); // if (ret == 0) dotneato_postprocess (root); UNSUPPORTED("f3b7mj138albdr4lodyomke0z"); // return ret; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5u1pdxxmfiu2hry342a4x7kh6 // static char* chkFlags (char* p, pack_info* pinfo) public static Object chkFlags(Object... arg) { UNSUPPORTED("1yranxmu2maol02ulzd1ka1re"); // static char* UNSUPPORTED("8hwjd3nd6s2uo8zndhppm3kvo"); // chkFlags (char* p, pack_info* pinfo) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b95pirj2cs9mytcz8lfgdzg8w"); // int c, more; UNSUPPORTED("2uon126vetx4frre9rfj5kwo3"); // if (*p != '_') return p; UNSUPPORTED("cdsfbjd0c8345i6xay73clz7w"); // p++; UNSUPPORTED("6ecxobdci26ildbdmnvdlxcaq"); // more = 1; UNSUPPORTED("69yg68y6v9aac3lfm1ph27y4p"); // while (more && (c = *p)) { UNSUPPORTED("7rk995hpmaqbbasmi40mqg0yw"); // switch (c) { UNSUPPORTED("7uv0u7m8t8vyjwy3v82ow51w3"); // case 'c' : UNSUPPORTED("zpuzt82wipz2nkqsosee5ak2"); // pinfo->flags |= (1 << 0); UNSUPPORTED("847zwwso12sey42b59zepembc"); // p++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("dcwafq80cu9cfgjlh6mde3jl5"); // case 'i' : UNSUPPORTED("93wkkv5r9w97t1opi2g578qdx"); // pinfo->flags |= (1 << 6); UNSUPPORTED("847zwwso12sey42b59zepembc"); // p++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("8ef3noocjg099b2wm2at9fcfm"); // case 'u' : UNSUPPORTED("5fat3lcknhnoy1piblquof76n"); // pinfo->flags |= (1 << 1); UNSUPPORTED("847zwwso12sey42b59zepembc"); // p++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4gib6kzlsyq6li9hy7twvu1z2"); // case 't' : UNSUPPORTED("3fkvofx77siau3tckaayyty9i"); // pinfo->flags |= (1 << 4); UNSUPPORTED("847zwwso12sey42b59zepembc"); // p++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("f2k4zkd8o9triyu1ym1kmlyq3"); // case 'b' : UNSUPPORTED("bexhnqh3hnmo2exnreo65qrn9"); // pinfo->flags |= (1 << 5); UNSUPPORTED("847zwwso12sey42b59zepembc"); // p++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("3gnomrm4ne7tv5zoleucfclel"); // case 'l' : UNSUPPORTED("50e0nwuj7xqbdvos1msb37ily"); // pinfo->flags |= (1 << 2); UNSUPPORTED("847zwwso12sey42b59zepembc"); // p++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("aba8jswwne2ykziks3sfo201b"); // case 'r' : UNSUPPORTED("izuljhdmym8vluo87hpk7kq8"); // pinfo->flags |= (1 << 3); UNSUPPORTED("847zwwso12sey42b59zepembc"); // p++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5ujjs4gho9mjjupbibyqyplxp"); // default : UNSUPPORTED("ak3tvcq0zczj4iaz1osxh5ruq"); // more = 0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("91xduilalb406jjyw2g1i07th"); // return p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 f2iaacl82y04a7oguahy9oo6 // static char* mode2Str (pack_mode m) public static Object mode2Str(Object... arg) { UNSUPPORTED("1yranxmu2maol02ulzd1ka1re"); // static char* UNSUPPORTED("cbahd10pirq1ryicw6cbj8454"); // mode2Str (pack_mode m) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8yytudftst76763qgnjebkzhm"); // char *s; UNSUPPORTED("c4zsjnmgv48k6r8sbrvwztb6n"); // switch (m) { UNSUPPORTED("57a9puw02tf6kffzzki2yiejt"); // case l_clust: UNSUPPORTED("eriuzmc5hmkj22dwkc1jyxn0f"); // s = "cluster"; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9dmynvx8joldqskjnpn5m77ze"); // case l_node: UNSUPPORTED("dm3a6gn1co2hl85txdr7kc7ux"); // s = "node"; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dpfo62efj4ibm7vn73t9zwpcv"); // case l_graph: UNSUPPORTED("1leprh5ff6gk2iz2teqzgpmz9"); // s = "graph"; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9qrcli4a5yhl31kzvzyvb5iho"); // case l_array: UNSUPPORTED("a8mkbpe7uwb8dmzrlu3hutdsm"); // s = "array"; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8xvt26fzpofcs0qvk5cpwuynx"); // case l_aspect: UNSUPPORTED("15jl19ngssxkg73ykfeez8dpd"); // s = "aspect"; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1jswhiu2nci8p4mklivv8912o"); // case l_undef: UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("aufikv57oho66mjvuxi8sjjes"); // s = "undefined"; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3y6wj3ntgmr1qkdpm7wp1dsch"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dyb1n3lhbi0wnr9kvmu6onux9 // pack_mode parsePackModeInfo(char* p, pack_mode dflt, pack_info* pinfo) public static int parsePackModeInfo(CString p, int dflt, pack_info pinfo) { ENTERING("dyb1n3lhbi0wnr9kvmu6onux9","parsePackModeInfo"); try { float v; int i; //assert (pinfo); pinfo.setInt("flags", 0); pinfo.setInt("mode", dflt); pinfo.setInt("sz", 0); pinfo.setPtr("vals", null); if (p!=null && p.charAt(0)!='\0') { UNSUPPORTED("2ybrtqq8efxouph8wjbrnowxz"); // switch (*p) { UNSUPPORTED("2v5u3irq50r1n2ccuna0y09lk"); // case 'a': UNSUPPORTED("4o68zbwd6291pxryyntjh2432"); // if ((!strncmp(p,"array",(sizeof("array")/sizeof(char) - 1)))) { UNSUPPORTED("3cxht114gc0fn4wl8xjy515bv"); // pinfo->mode = l_array; UNSUPPORTED("edkaa80od81ojkn7d4h0q1zbu"); // p += (sizeof("array")/sizeof(char) - 1); UNSUPPORTED("106zhcf9a6frvafctbbgrbws3"); // p = chkFlags (p, pinfo); UNSUPPORTED("epac8gmlq3r1q3g6lh3fb9nzh"); // if ((sscanf (p, "%d", &i)>0) && (i > 0)) UNSUPPORTED("2e563kaxakuuou2t5kqvv33w5"); // pinfo->sz = i; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("38dve3snq2grkwui6y1tpc6r1"); // else if ((!strncmp(p,"aspect",(sizeof("aspect")/sizeof(char) - 1)))) { UNSUPPORTED("ems4wqj0nbd0vi3sttf36tnir"); // pinfo->mode = l_aspect; UNSUPPORTED("3ckdfsy55ba8os2xhymh002al"); // if ((sscanf (p + (sizeof("array")/sizeof(char) - 1), "%f", &v)>0) && (v > 0)) UNSUPPORTED("1i6xlg2sfqvjqjdu811xm5398"); // pinfo->aspect = v; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("b3tzhasiwa1p83l47nhl6k5x8"); // pinfo->aspect = 1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("f3lyz2cejs6yn5fyckhn7ba1"); // case 'c': UNSUPPORTED("d6yjom2gtqleeq1vf5l72eazl"); // if ((*(p)==*("cluster")&&!strcmp(p,"cluster"))) UNSUPPORTED("2xe2y3s32q27l74dshw3831hu"); // pinfo->mode = l_clust; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("e00kor2k58i044hvvxytt9dhg"); // case 'g': UNSUPPORTED("8vzhimdinzz48u15tcx34gzgs"); // if ((*(p)==*("graph")&&!strcmp(p,"graph"))) UNSUPPORTED("coafx7pn3ah1ulp0o7a0z119r"); // pinfo->mode = l_graph; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("f187wptsr73liavtlyoyfovp3"); // case 'n': UNSUPPORTED("aqi1ed010xc3cj8xoye8vqkqe"); // if ((*(p)==*("node")&&!strcmp(p,"node"))) UNSUPPORTED("epewq8yin5pr1meeofxvntjes"); // pinfo->mode = l_node; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } } //if (Verbose) { //fprintf (stderr, "pack info:\n"); //fprintf (stderr, " mode %s\n", mode2Str(pinfo->mode)); //if (pinfo->mode == l_aspect) // fprintf (stderr, " aspect %f\n", pinfo->aspect); //fprintf (stderr, " size %d\n", pinfo->sz); //fprintf (stderr, " flags %d\n", pinfo->flags); //} return pinfo.getInt("mode"); } finally { LEAVING("dyb1n3lhbi0wnr9kvmu6onux9","parsePackModeInfo"); } } //3 bnxqpsmvz6tyekstfjte4pzwj // pack_mode getPackModeInfo(Agraph_t * g, pack_mode dflt, pack_info* pinfo) public static int getPackModeInfo(Agraph_s g, int dflt, pack_info pinfo) { ENTERING("bnxqpsmvz6tyekstfjte4pzwj","getPackModeInfo"); try { return parsePackModeInfo (agget(g, new CString("packmode")), dflt, pinfo); } finally { LEAVING("bnxqpsmvz6tyekstfjte4pzwj","getPackModeInfo"); } } //3 7drbmsd08zij375icggr3egvy // pack_mode getPackMode(Agraph_t * g, pack_mode dflt) public static Object getPackMode(Object... arg) { UNSUPPORTED("c1prvosj3g3y8yq8z6btufyr1"); // pack_mode UNSUPPORTED("acjweauaygv7o5gppq7c33mp7"); // getPackMode(Agraph_t * g, pack_mode dflt) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0d79ghjhm6kl6qz811tqj0ip"); // pack_info info; UNSUPPORTED("3abevvtclwlzp8dcg3zhzsnll"); // return getPackModeInfo (g, dflt, &info); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ata97fmix5q1oikrmk5pezvrf // int getPack(Agraph_t * g, int not_def, int dflt) public static int getPack(Agraph_s g, int not_def, int dflt) { ENTERING("ata97fmix5q1oikrmk5pezvrf","getPack"); try { CString p; int i; int v = not_def; if ((p = agget(g, new CString("pack")))!=null) { UNSUPPORTED("enpqar7c7okvibe7xhe0vjtfn"); // if ((sscanf(p, "%d", &i) == 1) && (i >= 0)) UNSUPPORTED("3puzxwczcmpxvlw8cvmeyio74"); // v = i; UNSUPPORTED("65w8fxtw319slbg2c6nvtmow8"); // else if ((*p == 't') || (*p == 'T')) UNSUPPORTED("5lifdir9mxnvpi8ur34qo0jej"); // v = dflt; } return v; } finally { LEAVING("ata97fmix5q1oikrmk5pezvrf","getPack"); } } //3 ce4a70w8ddkj4l9efi74h61s6 // pack_mode getPackInfo(Agraph_t * g, pack_mode dflt, int dfltMargin, pack_info* pinfo) public static int getPackInfo(Agraph_s g, int dflt, int dfltMargin, pack_info pinfo) { ENTERING("ce4a70w8ddkj4l9efi74h61s6","getPackInfo"); try { //assert (pinfo); pinfo.setInt("margin", getPack(g, dfltMargin, dfltMargin)); //if (Verbose) { //fprintf (stderr, " margin %d\n", pinfo->margin); //} pinfo.setInt("doSplines", 0); pinfo.setInt("fixed", 0); getPackModeInfo(g, dflt, pinfo); return pinfo.getInt("mode"); } finally { LEAVING("ce4a70w8ddkj4l9efi74h61s6","getPackInfo"); } } } plantuml-1.2017.15/src/gen/lib/pack/ptest__c.java000066400000000000000000001313211312650303100213460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.pack; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.boxf; import h.pointf; import smetana.core.JUtils; import smetana.core.__struct__; public class ptest__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 nye6dsi1twkbddwo9iffca1j // extern char *Version //1 65mu6k7h7lb7bx14jpiw7iyxr // extern char **Files //1 2rpjdzsdyrvomf00zcs3u3dyn // extern const char **Lib //1 6d2f111lntd2rsdt4gswh5909 // extern char *CmdName //1 a0ltq04fpeg83soa05a2fkwb2 // extern char *specificFlags //1 1uv30qeqq2jh6uznlr4dziv0y // extern char *specificItems //1 7i4hkvngxe3x7lmg5h6b3t9g3 // extern char *Gvfilepath //1 9jp96pa73kseya3w6sulxzok6 // extern char *Gvimagepath //1 40ylumfu7mrvawwf4v2asvtwk // extern unsigned char Verbose //1 93st8awjy1z0h07n28qycbaka // extern unsigned char Reduce //1 f2vs67ts992erf8onwfglurzp // extern int MemTest //1 c6f8whijgjwwagjigmxlwz3gb // extern char *HTTPServerEnVar //1 cp4hzj7p87m7arw776d3bt7aj // extern char *Output_file_name //1 a3rqagofsgraie6mx0krzkgsy // extern int graphviz_errors //1 5up05203r4kxvjn1m4njcgq5x // extern int Nop //1 umig46cco431x14b3kosde2t // extern double PSinputscale //1 52bj6v8fqz39khasobljfukk9 // extern int Syntax_errors //1 9ekf2ina8fsjj6y6i0an6somj // extern int Show_cnt //1 38di5qi3nkxkq65onyvconk3r // extern char** Show_boxes //1 6ri6iu712m8mpc7t2670etpcw // extern int CL_type //1 bomxiw3gy0cgd1ydqtek7fpxr // extern unsigned char Concentrate //1 cqy3gqgcq8empdrbnrhn84058 // extern double Epsilon //1 64slegfoouqeg0rmbyjrm8wgr // extern int MaxIter //1 88wdinpnmfs4mab4aw62yb0bg // extern int Ndim //1 8bbad3ogcelqnnvo5br5s05gq // extern int State //1 17rnd8q45zclfn68qqst2vxxn // extern int EdgeLabelsDone //1 ymx1z4s8cznjifl2d9f9m8jr // extern double Initial_dist //1 a33bgl0c3uqb3trx419qulj1x // extern double Damping //1 d9lvrpjg1r0ojv40pod1xwk8n // extern int Y_invert //1 71efkfs77q5tq9ex6y0f4kanh // extern int GvExitOnUsage //1 4xy2dkdkv0acs2ue9eca8hh2e // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin //1 9js5gxgzr74eakgtfhnbws3t9 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle //1 anqllp9sj7wo45w6bm11j8trn // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth //1 bh0z9puipqw7gymjd5h5b8s6i // extern struct fdpParms_s* fdp_parms //3 ciez0pfggxdljedzsbklq49f0 // static inline point pointof(int x, int y) public static Object pointof(Object... arg) { UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x; UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1s4k85p1cdfn176o3uryeros // static inline pointf pointfof(double x, double y) public static __struct__ pointfof(double x, double y) { // WARNING!! STRUCT return pointfof_w_(x, y).copy(); } private static __struct__ pointfof_w_(double x, double y) { ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", x); r.setDouble("y", y); return r; } finally { LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); } } //3 7cufnfitrh935ew093mw0i4b7 // static inline box boxof(int llx, int lly, int urx, int ury) public static Object boxof(Object... arg) { UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly; UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury; UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1vvsta5i8of59frav6uymguav // static inline boxf boxfof(double llx, double lly, double urx, double ury) public static __struct__ boxfof(double llx, double lly, double urx, double ury) { // WARNING!! STRUCT return boxfof_w_(llx, lly, urx, ury).copy(); } private static __struct__ boxfof_w_(double llx, double lly, double urx, double ury) { ENTERING("1vvsta5i8of59frav6uymguav","boxfof"); try { final __struct__ b = JUtils.from(boxf.class); b.getStruct("LL").setDouble("x", llx); b.getStruct("LL").setDouble("y", lly); b.getStruct("UR").setDouble("x", urx); b.getStruct("UR").setDouble("y", ury); return b; } finally { LEAVING("1vvsta5i8of59frav6uymguav","boxfof"); } } //3 1n5xl70wxuabyf97mclvilsm6 // static inline point add_point(point p, point q) public static Object add_point(Object... arg) { UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x; UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 arrsbik9b5tnfcbzsm8gr2chx // static inline pointf add_pointf(pointf p, pointf q) public static __struct__ add_pointf(final __struct__ p, final __struct__ q) { // WARNING!! STRUCT return add_pointf_w_(p.copy(), q.copy()).copy(); } private static __struct__ add_pointf_w_(final __struct__ p, final __struct__ q) { ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); try { final __struct__ r = JUtils.from(pointf.class); r.setDouble("x", p.getDouble("x") + q.getDouble("x")); r.setDouble("y", p.getDouble("y") + q.getDouble("y")); return r; } finally { LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); } } //3 ai2dprak5y6obdsflguh5qbd7 // static inline point sub_point(point p, point q) public static Object sub_point(Object... arg) { UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 16f6pyogcv3j7n2p0n8giqqgh // static inline pointf sub_pointf(pointf p, pointf q) public static Object sub_pointf(Object... arg) { UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x; UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k50jgrhc4f9824vf8ony74rw // static inline point mid_point(point p, point q) public static Object mid_point(Object... arg) { UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2; UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 59c4f7im0ftyowhnzzq2v9o1x // static inline pointf mid_pointf(pointf p, pointf q) public static Object mid_pointf(Object... arg) { UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.; UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5r18p38gisvcx3zsvbb9saixx // static inline pointf interpolate_pointf(double t, pointf p, pointf q) public static Object interpolate_pointf(Object... arg) { UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r; UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x); UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y); UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bxzrv2ghq04qk5cbyy68s4mol // static inline point exch_xy(point p) public static Object exch_xy(Object... arg) { UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9lt3e03tac6h6sydljrcws8fd // static inline pointf exch_xyf(pointf p) public static Object exch_xyf(Object... arg) { UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8l9qhieokthntzdorlu5zn29b // static inline box box_bb(box b0, box b1) public static Object box_bb(Object... arg) { UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 clws9h3bbjm0lw3hexf8nl4c4 // static inline boxf boxf_bb(boxf b0, boxf b1) public static Object boxf_bb(Object... arg) { UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x); UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y); UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x); UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bit6ycxo1iqd2al92y8gkzlvb // static inline box box_intersect(box b0, box b1) public static Object box_intersect(Object... arg) { UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8gfybie7k6pgb3o1a6llgpwng // static inline boxf boxf_intersect(boxf b0, boxf b1) public static Object boxf_intersect(Object... arg) { UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b; UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x); UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y); UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x); UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y); UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7z8j2quq65govaaejrz7b4cvb // static inline int box_overlap(box b0, box b1) public static Object box_overlap(Object... arg) { UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z0suuut2acsay5m8mg9dqjdu // static inline int boxf_overlap(boxf b0, boxf b1) public static Object boxf_overlap(Object... arg) { UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dd34swz5rmdgu3a2np2a4h1dy // static inline int box_contains(box b0, box b1) public static Object box_contains(Object... arg) { UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8laj1bspbu2i1cjd9upr7xt32 // static inline int boxf_contains(boxf b0, boxf b1) public static Object boxf_contains(Object... arg) { UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4wf5swkz24xx51ja2dynbycu1 // static inline pointf perp (pointf p) public static Object perp(Object... arg) { UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y; UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6dtlpzv4mvgzb9o0b252yweuv // static inline pointf scale (double c, pointf p) public static Object scale(Object... arg) { UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x; UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y; UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 exy2l03ceq9zw4vf01bbd4d3o // typedef unsigned int packval_t //1 8amxw444izqh4g66lhdxcci9r // char *Info[] = //1 1eqfoyx6n6i882swvudliohy7 // static int margin = 8 //1 5bs16xeo79e467x65e7bkq7kf // static int doEdges = 1 //1 24uzz7vpu4g7xsx0sh5tuemke // static int doComps = 0 //1 dhz067fzogh2sp5htzam45al3 // static int verbose = 0 //1 57m3hjduqaawz7lzqgpsrik9c // static char **Files = 0 //1 bwphlvhhlnqsf4xzzsagjay2 // static int nFiles = 0 //1 a4ojujd209l93x23jer8omiep // static int single = 0 //1 hys4o67qq0qkc7kbehvo7lhb // static char *useString = //3 73e82wwqdxeij8zonccymd6kz // static void usage(int v) public static Object usage(Object... arg) { UNSUPPORTED("94mouoc9v3rqowaduimbdrlsg"); // static void usage(int v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dezf59tqaazw376bwzeh0lnk"); // printf(useString); UNSUPPORTED("awsu87poqc0o7ac0x3zri08x2"); // exit(v); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 efl73lc0qt3y2dwkp2bq3qs7q // static void init(int argc, char *argv[]) public static Object init(Object... arg) { UNSUPPORTED("bgxu2kkx7u9qfq81tb3oefdcs"); // static void init(int argc, char *argv[]) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c; UNSUPPORTED("4qgmh8k7p00n85stclc5uyuv1"); // aginit(); UNSUPPORTED("1niqqfd7us06n0wzaiiz3u5xg"); // while ((c = getopt(argc, argv, ":escvm:?")) != -1) { UNSUPPORTED("7rk995hpmaqbbasmi40mqg0yw"); // switch (c) { UNSUPPORTED("2fzjr952o6hmcz3ad5arl2n8d"); // case 'e': UNSUPPORTED("612z1fkxvsn3pr6uz8smtwwg6"); // doEdges = 0; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("f3lyz2cejs6yn5fyckhn7ba1"); // case 'c': UNSUPPORTED("coi2qrxdv2l71tb75401s90cn"); // doComps = 1; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("953l7gyh3b52lc5n9fbhtxhbg"); // case 'm': UNSUPPORTED("agwyr30ptmkberfxzlr2qb4sm"); // margin = atoi(optarg); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("b4quboi30n0afnbpgm9chdttx"); // case 's': UNSUPPORTED("a2kcyv0orvfio4god7x1ra1gc"); // single = 1; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("318vlfmcdz9no6i45k86aygon"); // case 'v': UNSUPPORTED("52jus61ki82kyvoho03bg8yu8"); // verbose = 1; UNSUPPORTED("z08wni1aiuv5b8ommxtq10kj"); // Verbose = 1; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("d0u2ka51n27um0avxdj14adrh"); // case '?': UNSUPPORTED("6ongvn9s4rb5sz2f3jrzfcj0m"); // if (optopt == '?') UNSUPPORTED("46bu3s4vi4qapnhhl79s89q2f"); // usage(0); UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("18zn34qcs4vsdhhh831gn9vc9"); // fprintf(stderr, UNSUPPORTED("cqx5xtn6ibatrlhvobfqyy4sj"); // "ptest: option -%c unrecognized - ignored\n", c); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bza5bo54n74fk73l7h2zw3sn2"); // argv += optind; UNSUPPORTED("2z9v9pfcshjw42gkhviv8qmf8"); // argc -= optind; UNSUPPORTED("euz202o13jvson684m35br400"); // if (argc) { UNSUPPORTED("a6hax0v25w382s8uhktk1z3ac"); // Files = argv; UNSUPPORTED("9j2gbktfok4tc5txw0oj203eb"); // nFiles = argc; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6ow5r7ch1so5cayfbyf9crc5p // static int numFields(char *pos) public static Object numFields(Object... arg) { UNSUPPORTED("29ky16cycv6cs96zmpduu1bsp"); // static int numFields(char *pos) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("behjm5bjsenezpg3f7cncvteu"); // int cnt = 0; UNSUPPORTED("wrvu9u7a8j6i6y6552zncxfk"); // char c; UNSUPPORTED("1b9np136i2dme8ejhydy0dhlv"); // while (isspace(*pos)) UNSUPPORTED("e30zd4or99122hlq3vt45sef"); // pos++; UNSUPPORTED("7dpyo20wi5esbmcan08qtztz7"); // while (*pos) { UNSUPPORTED("1szm63athnlkprt3pv29pjc6z"); // cnt++; UNSUPPORTED("5piqmvc132ob5y49h6v7bkeof"); // while ((c = *pos) && !isspace(c)) UNSUPPORTED("n5o9yha6va5mqug8xmgxtum9"); // pos++; /* skip token */ UNSUPPORTED("4n3nq7ssq6ovrj330hssbhwz9"); // while (isspace(*pos)) UNSUPPORTED("27349aw1zezm0lpez1jn3pcw4"); // pos++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3zkt5kbq3sockq663o3s3ync7"); // return cnt; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6b85bwuqwmq3ucqcauigm0orn // static point *user_spline(attrsym_t * symptr, edge_t * e, int *np) public static Object user_spline(Object... arg) { UNSUPPORTED("ewvc2qr116wrkxhg4q77v0uqv"); // static point *user_spline(attrsym_t * symptr, edge_t * e, int *np) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bvo2it3yepiz2er9rw3uuk47s"); // char *pos; UNSUPPORTED("7k2ifbl8vz1is0pf2z1t0o2xf"); // int i, n, nc; UNSUPPORTED("a13x213r98q5dm6phmdpj3r2l"); // point *ps = 0; UNSUPPORTED("ca6brvq3h4u316zi41fa1e7nl"); // point *pp; UNSUPPORTED("4g01jt8p980itgxzog49s8ur3"); // double x, y; UNSUPPORTED("5elka0ltgqf61uccerqfkjvvp"); // if (symptr == NULL) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("c21yig5e4hykm28ao7kpzwodl"); // pos = agxget(e, symptr->index); UNSUPPORTED("7i9zryjmvv454i1r57dlez6kk"); // if (*pos == '\0') UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("az1jdxaqsdxumqec6q7ctjrh3"); // n = numFields(pos); UNSUPPORTED("82fimuwp8ur9yxpbd8c89a1wb"); // *np = n; UNSUPPORTED("bvx0cyk5fhwwsm29cbghfhcpj"); // if (n > 1) { UNSUPPORTED("9lfsqwngk625slfuwyukwtdpy"); // ps = ALLOC(n, 0, point); UNSUPPORTED("49hki9cvrilnaez8dm0dbbgoq"); // pp = ps; UNSUPPORTED("4x9kp7oo5ln5zpe2bhy2s9oyc"); // while (n) { UNSUPPORTED("ejpj2kxorfrlsluqdege3h70h"); // i = sscanf(pos, "%lf,%lf%n", &x, &y, &nc); UNSUPPORTED("4mo26m3d7t9gf29k5zgh6d3dp"); // if (i < 2) { UNSUPPORTED("botxh6letfus33f79p4s19719"); // free(ps); UNSUPPORTED("d31bxxiinmdzudo8yt1laapa1"); // ps = 0; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("8cjb49m5i1gwlcbb72l8kieuk"); // pos = pos + nc; UNSUPPORTED("dn8a13edl8j88azhrkizcbwsx"); // pp->x = (int) x; UNSUPPORTED("6qrmrrz624ilc14dax4fzkzy"); // pp->y = (int) y; UNSUPPORTED("4t42c85s64mps71a1sjc7yoey"); // pp++; UNSUPPORTED("704o6677xgknjexhj6bdlst8x"); // n--; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b0dfwpxhogdrp9mwkzc8oa9vt"); // return ps; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5vxza0l0hf6kgjh7hgffhqk1d // static void initPos(Agraph_t * g) public static Object initPos(Object... arg) { UNSUPPORTED("6wuroti5ljub8qdkqwz84bll8"); // static void initPos(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); // Agedge_t *e; UNSUPPORTED("evvfote9pox5gpnsuk75gu9zi"); // double *pvec; UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("3w79hfiet3147pb1ehbe0tltw"); // point *sp; UNSUPPORTED("7hps2kejtrotcphg5gymma43b"); // int pn; UNSUPPORTED("6717r3gljnzz5j6x8yd64vxmy"); // attrsym_t *N_pos = (agattr(g,AGNODE,"pos",NULL)); UNSUPPORTED("8s1tvuk5eoddac3tdw3vwm3g6"); // attrsym_t *E_pos = (agattr(g,AGEDGE,"pos",NULL)); UNSUPPORTED("607cie06087nzjkhdxwkh8t5x"); // assert(N_pos); UNSUPPORTED("9pqnws9ww5w3wm6etqvhhmaag"); // if (!E_pos) { UNSUPPORTED("b7m2ei650qyfpw37qbnbselef"); // if (doEdges) UNSUPPORTED("1jx8qc7jakb79udi264irb795"); // fprintf(stderr, "Warning: turning off doEdges, graph %s\n", UNSUPPORTED("52cuafai1d5jpnyygo0jtwp19"); // g->name); UNSUPPORTED("25yxh6xy9gvks3xlk4ay8ana2"); // doEdges = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("2hbtrrffbxr8fodextlckjcte"); // pvec = ND_pos(n); UNSUPPORTED("4mrzu4a737x10k9m629qjvpmx"); // p = agxget(n, N_pos->index); UNSUPPORTED("9fce8t386yx1ohlzh5z3v64uy"); // if (p[0] && (sscanf(p, "%lf,%lf", pvec, pvec + 1) == 2)) { UNSUPPORTED("a8amhiqvlp5s6vz8p4u2amapy"); // int i; UNSUPPORTED("e2k2y77qbvhl4ttkl82r7skpc"); // for (i = 0; i < NDIM; i++) UNSUPPORTED("54fe965wvv1n2dqk9v5lqtfe"); // pvec[i] = pvec[i] / PSinputscale; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("apu2a6fysp0sm0oh3eg9sdx3g"); // fprintf(stderr, "could not find pos for node %s in graph %s\n", UNSUPPORTED("5ii3q9tejxvznaewo80u58jc6"); // n->name, g->name); UNSUPPORTED("6f1y0d5qfp1r9zpw0r7m6xfb4"); // exit(1); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("a7cnx8vpthir8tg7wq0gmkyfp"); // ND_coord_i(n).x = (ROUND((ND_pos(n)[0])*72)); UNSUPPORTED("56q0neer7h6q9r2hlewrmtpac"); // ND_coord_i(n).y = (ROUND((ND_pos(n)[1])*72)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3x2r45g8h3r71u5v8lu9etnq6"); // if (doEdges) { UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("7yvyv13me3s32qvq3gfbyt283"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("cas0s66j5xm7zv7rfmut5t5ua"); // if ((sp = user_spline(E_pos, e, &pn)) != 0) { UNSUPPORTED("b1l3m7l581iaaysgzy59rlnqp"); // clip_and_install(e, sp, pn); UNSUPPORTED("bgz7miqt6x7s9we62suaznam2"); // free(sp); UNSUPPORTED("a47jqpic91ky93e1ohxv590l5"); // } else { UNSUPPORTED("4gzgwztxcj3c7qtlt3xuwnsq1"); // fprintf(stderr, UNSUPPORTED("2mti2jcwd7nic33dut8daaxli"); // "Missing edge pos for edge %s - %s in graph %s\n", UNSUPPORTED("7tw8ugnhfmrhmd69kh0nfu7p2"); // n->name, e->head->name, g->name); UNSUPPORTED("btkmdyvgs2b3io3tacfuo3ht6"); // exit(1); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e5z9zrazoioj4tcqyaohcup5l // static void ptest_nodesize(node_t * n, boolean flip) public static Object ptest_nodesize(Object... arg) { UNSUPPORTED("a6fr7g8doj4m1has0v8m3gn0v"); // static void ptest_nodesize(node_t * n, boolean flip) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dgezc9nq6515gryb5aoradhlj"); // int w; UNSUPPORTED("hcl98itasit8bk43t1a7dksx"); // w = ND_xsize(n) = (ROUND((ND_width(n))*72)); UNSUPPORTED("clr7qgpaln5v1e8sa81vefxgx"); // ND_lw(n) = ND_rw(n) = w / 2; UNSUPPORTED("dxe3mk5x98xnzhulw934sin35"); // ND_ht(n) = ND_ysize(n) = (ROUND((ND_height(n))*72)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5z906z4eqvn94qwep17t9ecfv // static void ptest_initNode(node_t * n) public static Object ptest_initNode(Object... arg) { UNSUPPORTED("74hpo7rawbv1l53gcs8gse89n"); // static void ptest_initNode(node_t * n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("76nok3eiyr33qf4ecv69ujxn6"); // char *str; UNSUPPORTED("4ii64hrv86n2irvf71lpjlait"); // ND_width(n) = UNSUPPORTED("be5qy7slnjp1ltoih3332j4qk"); // late_double(n, N_width, 0.75, 0.01); UNSUPPORTED("9zjn5j4471it4d3vb5wdfuzlh"); // ND_height(n) = UNSUPPORTED("n9gbpj6q00o3ggm4xxil4afm"); // late_double(n, N_height, 0.5, 0.01); UNSUPPORTED("4ia5lmwela2aa00dkga0q3by5"); // if (N_label == NULL) UNSUPPORTED("8jmb1jjt8cpml3yo3nh59pkkq"); // str = "\\N"; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("ania83ea7map6i1xu69ykshav"); // str = agxget(n, N_label->index); UNSUPPORTED("182xxyk6623a24gu3lts9h7i3"); // str = strdup_and_subst(str, "\\N", n->name); UNSUPPORTED("2rx8312iagen4kz1a1be428i2"); // ND_label(n) = make_label(str, UNSUPPORTED("3umbo59bv54mpje1ar1p3emyg"); // late_double(n, N_fontsize, 14.0, UNSUPPORTED("6joc02il1cncp1pwbeqwqd6bv"); // 1.0), late_nnstring(n, UNSUPPORTED("eg23z30i9f0bgdsfxqzjr8cm3"); // N_fontname, UNSUPPORTED("7p3qoqg9tlh094wkumjk0gu1r"); // "Times-Roman"), UNSUPPORTED("27lxhu1i8goyngm5z5ztzc9se"); // late_nnstring(n, N_fontcolor, "black"), UNSUPPORTED("a66nrz185x5w9czfz4hxvddaj"); // n->graph); UNSUPPORTED("cfoyczwylecqlhhb5vmnerwbg"); // ND_shape(n) = bind_shape(late_nnstring(n, N_shape, "ellipse")); UNSUPPORTED("2z4f61h2jydnf1wz262734vda"); // ND_shape(n)->initfn(n); /* ### need to quantize ? */ UNSUPPORTED("56aecvcbqxgl0e67wrub498ix"); // ptest_nodesize(n, n->GD_flip(graph)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5f35etfq3qbirfsag89nr6382 // static void ptest_initGraph(graph_t * g) public static Object ptest_initGraph(Object... arg) { UNSUPPORTED("6byfidommpiiaekcfq26jwzzz"); // static void ptest_initGraph(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("94x0mmuhef4re0y05ngcuytf9"); // /* edge_t *e; */ UNSUPPORTED("16hw9gw0dz2w7mrtba0eoqrdi"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNSUPPORTED("aakael964bsjn7l22rgdr13zt"); // ptest_initNode(n); UNSUPPORTED("4v614d3uabme2jyn0anuritbb"); // /* UNSUPPORTED("eh6wqx3d37l7km9kh1gdso2t"); // for (n = agfstnode(g); n; n = agnxtnode(g,n)) { UNSUPPORTED("1suh3w1zdcqasuka9dgx4ukgl"); // for (e = agfstout(g,n); e; e = agnxtout(g,e)) ptest_initEdge(e); UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // } UNSUPPORTED("bnetqzovnscxile7ao44kc0qd"); // */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3y6d5zmybm89vnfzssntfxuga // static void dumpG(graph_t * g) public static Object dumpG(Object... arg) { UNSUPPORTED("80as52jwfpla4s14zbrh506cu"); // static void dumpG(graph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("am98nf596s79mx0jh0eukf2pj"); // /* point p; */ UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); // edge_t *e; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("92hx0hzt0genpiycslyy2fphe"); // fprintf(stderr, " node %s \n", n->name); UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("ddikw3m3fhov54kkj3710v3kh"); // fprintf(stderr, " %s - %s \n", e->tail->name, e->head->name); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c6p4imduurlyugmp9lakjsrkx // static void copyPos(Agraph_t * g) public static Object copyPos(Object... arg) { UNSUPPORTED("2bnytjwn7g67uh683868e3xl7"); // static void copyPos(Agraph_t * g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2jcii9cclu1dijzqekzc175pe"); // Agnode_t *n; UNSUPPORTED("44thr6ep72jsj3fksjiwdx3yr"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("a7cnx8vpthir8tg7wq0gmkyfp"); // ND_coord_i(n).x = (ROUND((ND_pos(n)[0])*72)); UNSUPPORTED("56q0neer7h6q9r2hlewrmtpac"); // ND_coord_i(n).y = (ROUND((ND_pos(n)[1])*72)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 56nlfv4elbzzbch9wiks1pqti // main(int argc, char *argv[]) public static Object main(Object... arg) { UNSUPPORTED("8wkt709xta3burfudbrvdhsdm"); // main(int argc, char *argv[]) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("75makfli697jao0r0h73ksibj"); // Agraph_t **gs; UNSUPPORTED("8i0oxshyd0x2idt42lftg3zjx"); // Agraph_t **ccs; UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g; UNSUPPORTED("3l5bdi04ekui6vvrgr3s666fx"); // Agraph_t *gp; UNSUPPORTED("66jjdcm9x1i8fc2eq9b1z81d4"); // char *fname; UNSUPPORTED("dn2hi0km4q5ldibguffbger1c"); // FILE *fp; UNSUPPORTED("6iv4xusq3ncisurzdtlt8lhe9"); // int cnt; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("44luxtsxnt651zyc4b8x3r6po"); // init(argc, argv); UNSUPPORTED("dmdjgm6j4zsty2ies7uit5831"); // if (!Files) { UNSUPPORTED("4issxf2kepoao7ljc3j3jkos8"); // fprintf(stderr, "No input files given\n"); UNSUPPORTED("dtw3cma0ziyha0w534bszl0tx"); // exit(1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9zj7hq1iiirxb7wx6osfdutah"); // PSinputscale = 72; UNSUPPORTED("2szscn7gy6eg6ghb7zdqj0qwm"); // if (doComps) { UNSUPPORTED("46pn2m7yn4pem434vcfqq1gei"); // if (verbose) UNSUPPORTED("dawpetqdqceyrxbb0n5oi20vg"); // fprintf(stderr, "do Comps\n"); UNSUPPORTED("2zdroao5t5zjp7reldctg2hic"); // while (fname = *Files++) { UNSUPPORTED("c2vs68cvzv11vpc3d0vhgn0o6"); // fp = fopen(fname, "r"); UNSUPPORTED("2de0glisr7me97htqp4v4qe2m"); // if (!fp) { UNSUPPORTED("bruposf45ak9wnammmxs05uq2"); // fprintf(stderr, "Could not open %s\n", fname); UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4vtewfrcwhx9cqnhzzelmnc07"); // g = agread(fp); UNSUPPORTED("81dgkqb2pfz2cmbpgkwbv8yca"); // fclose(fp); UNSUPPORTED("9e4rervmy1jguubifdob867qa"); // if (!g) { UNSUPPORTED("c3k9mm0laol4uhxfovks7vvx4"); // fprintf(stderr, "Could not read graph\n"); UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("5ok0v4mf41z8mas48m0payhcd"); // printf("%s %d nodes %d edges %sconnected\n", UNSUPPORTED("e4t4a5rs8mj1rhyqxa3t0bc7r"); // g->name, agnnodes(g), agnedges(g), UNSUPPORTED("84a4uyu2upwydiyuzql8rnciu"); // (isConnected(g) ? "" : "not ")); UNSUPPORTED("d3glokalvrf1m3vjonhaejamf"); // gs = ccomps(g, &cnt, "abc"); UNSUPPORTED("ivgffft2q5w6sjw0k1jg6o4j"); // for (i = 0; i < cnt; i++) { UNSUPPORTED("55ej4zekzmpz6h9dwcotkqzvn"); // gp = gs[i]; UNSUPPORTED("dyst0rumkq269hhpmrynhel67"); // printf(" %s %d nodes %d edges\n", gp->name, agnnodes(gp), UNSUPPORTED("af8li2e2oidx7nfn42l2lzqc0"); // agnedges(gp)); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("eob8bvfezsx0hr1brt37a4lyv"); // gs = (Agraph_t **)gmalloc((nFiles)*sizeof(Agraph_t *)); UNSUPPORTED("5j7jmlebvv4x0vqasag7ecunu"); // cnt = 0; UNSUPPORTED("ievvgb8tg6613rw4cwuvqtqm"); // while (fname = Files[cnt]) { UNSUPPORTED("c2vs68cvzv11vpc3d0vhgn0o6"); // fp = fopen(fname, "r"); UNSUPPORTED("2de0glisr7me97htqp4v4qe2m"); // if (!fp) { UNSUPPORTED("bruposf45ak9wnammmxs05uq2"); // fprintf(stderr, "Could not open %s\n", fname); UNSUPPORTED("7ujm7da8xuut83e2rygja0n9d"); // exit(1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4vtewfrcwhx9cqnhzzelmnc07"); // g = agread(fp); UNSUPPORTED("81dgkqb2pfz2cmbpgkwbv8yca"); // fclose(fp); UNSUPPORTED("9e4rervmy1jguubifdob867qa"); // if (!g) { UNSUPPORTED("c3k9mm0laol4uhxfovks7vvx4"); // fprintf(stderr, "Could not read graph\n"); UNSUPPORTED("7ujm7da8xuut83e2rygja0n9d"); // exit(1); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4ttwxmfi4jwb95u2zpmg90qlj"); // if (!single) { UNSUPPORTED("344ixhk5pj5cgkfitztxg39wq"); // graph_init(g); UNSUPPORTED("dgurzsu7a9v8li0uoqshe04ub"); // ptest_initGraph(g); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4ju9fxktkzm6g6k8jyu66ps6s"); // initPos(g); UNSUPPORTED("4l3u0654thteocjvzjwfmdfc1"); // /* if (Verbose) dumpG (g); */ UNSUPPORTED("2u2wotplp8k3k2hisg44444mr"); // gs[cnt++] = g; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9pza2sgruhfiag9f4hehchd0u"); // if (single) { UNSUPPORTED("7xk90wmd7j06hqt7b7i3eeyfy"); // Agraph_t *root; UNSUPPORTED("81iug4po5ggethdqgapdw9mez"); // Agnode_t *n; UNSUPPORTED("8zwiekoyqkvb7nqu0jvrmjubj"); // Agnode_t *np; UNSUPPORTED("7sxvwdnz5adoqfobhuxe9kpo7"); // Agnode_t *tp; UNSUPPORTED("6dcxsvi3exhmbtwrpyagifa28"); // Agnode_t *hp; UNSUPPORTED("7vvr9l0r0k3c179gu9edbannt"); // Agedge_t *e; UNSUPPORTED("45l8sazink6wfvjc5iv9mbqfv"); // Agedge_t *ep; UNSUPPORTED("2dsdl1tbecto2tl7rzbajp2ki"); // root = agopen("root", 0); UNSUPPORTED("2qcacl7cdr2zcme1wtbp5nudb"); // agedgeattr(root, "pos", ""); UNSUPPORTED("ivgffft2q5w6sjw0k1jg6o4j"); // for (i = 0; i < cnt; i++) { UNSUPPORTED("150kyv7qt24hep1ix7ekbxzhv"); // g = gs[i]; UNSUPPORTED("3mq66y5bl1rf1c70443ospyk"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("5e6yfzrf4s24izgf8jayt1s43"); // if ((agnode(root,n->name,0))) { UNSUPPORTED("3iwc3dzplzj2jkbze5cd6zfh9"); // fprintf(stderr, UNSUPPORTED("7hqzc3wtbhvlu2qsdc4y25qk6"); // "Error: node %s in graph %d (%s) previously added\n", UNSUPPORTED("cj5j27wggqfiejzj83ygjjtfd"); // n->name, i, Files[i]); UNSUPPORTED("8197k2c9bktvbqw28fy46jqt"); // exit(1); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("9tm8oxmtnz3g24k9p328sf9if"); // np = agnode(root, n->name); UNSUPPORTED("k7qf5ks6w37bfi3z9eef3qlu"); // ND_pos(np)[0] = ND_pos(n)[0]; UNSUPPORTED("bfzh6521nzll5lsnpw1k5n4m4"); // ND_pos(np)[1] = ND_pos(n)[1]; UNSUPPORTED("khqpoz54xjfjkti1t9djhewn"); // ND_coord_i(np).x = ND_coord_i(n).x; UNSUPPORTED("4x9c7uwd0kx0jhvnx5dxmudl"); // ND_coord_i(np).y = ND_coord_i(n).y; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("3mq66y5bl1rf1c70443ospyk"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) { UNSUPPORTED("35xtxnvjglep45528xu3bdsj"); // tp = (agnode(root,n->name,0)); UNSUPPORTED("a3z26j7g5efb4epbmqjb786zu"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) { UNSUPPORTED("62fs4ym4p052thn1lyb29j2q5"); // hp = (agnode(root,e->head->name,0)); UNSUPPORTED("dvwpkbrij9w40pbsbchqp4err"); // ep = agedge(root, tp, hp); UNSUPPORTED("dn7joqnj1y0k5ua3p8eyyts4t"); // ED_spl(ep) = ED_spl(e); UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ewdephguezv9n4j0pr1pilfay"); // graph_init(root); UNSUPPORTED("8c3un2iqe187mmdrtw54jbkyc"); // ptest_initGraph(root); UNSUPPORTED("7f8mdyxgvend9tx5cby8fsriu"); // ccs = ccomps(root, &cnt, 0); UNSUPPORTED("bgk9mnbqancywhx9z6leue7ri"); // packGraphs(cnt, ccs, root, margin, doEdges); UNSUPPORTED("2wu6h8z9h6pvzsdd62mmcfxg0"); // if (!doEdges) UNSUPPORTED("2ghubirp3mlgcl6gjf50g3gbu"); // copyPos(root); UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("byjd9fn68fzvo0yhanif3ydum"); // State = 1; UNSUPPORTED("664tfkoggn4h8g2k56p888fsg"); // attach_attrs(root); UNSUPPORTED("ivgffft2q5w6sjw0k1jg6o4j"); // for (i = 0; i < cnt; i++) { UNSUPPORTED("cpd2gdsuj81r184ywe3ya1863"); // agdelete(root, ccs[i]); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("byt1dlccqrnf77otl8aey0q7"); // agwrite(root, stdout); UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("6okr9lyl25rynlpeb541qyy7h"); // packGraphs(cnt, gs, 0, margin, doEdges); UNSUPPORTED("durj7dcilnt6i4j5m304vugx7"); // if (doEdges) UNSUPPORTED("byjd9fn68fzvo0yhanif3ydum"); // State = 1; UNSUPPORTED("ivgffft2q5w6sjw0k1jg6o4j"); // for (i = 0; i < cnt; i++) { UNSUPPORTED("2ebr0nay4ws6wvabvtsc7i6g6"); // if (!doEdges) UNSUPPORTED("6msz5q1lfw4hvu5d3eqbs110s"); // copyPos(gs[i]); UNSUPPORTED("1ue5ykok6uxlgcq1ob0qdyro8"); // attach_attrs(gs[i]); UNSUPPORTED("4azg08ol0hnirn0s158w62j2j"); // agwrite(gs[i], stdout); UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/pathplan/000077500000000000000000000000001312650303100175735ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/lib/pathplan/cvt__c.java000066400000000000000000000343571312650303100217070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.pathplan; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.UNSUPPORTED; import h.pointf; import smetana.core.__struct__; public class cvt__c { //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 7pb9zum2n4wlgil34lvh8i0ts // typedef double COORD //1 e75el5ykqd72ikokwkl7j2epc // typedef COORD **array2 //1 ej0x6pmbhu30xkhld8bcz4gwv // typedef Ppoint_t ilcoord_t //3 1xzun807liyzhh33wecbjr36t // static void *mymalloc(size_t newsize) public static Object mymalloc(Object... arg) { UNSUPPORTED("4sbfatyg3fhc2c20h2xhk3mx9"); // static void *mymalloc(size_t newsize) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5ccnu5m92hidffpixzo964tna"); // void *rv; UNSUPPORTED("bl8qbtd4wj1z7r9hhretdafhi"); // if (newsize > 0) UNSUPPORTED("911ost0j5419vf2t0dcv9syl0"); // rv = malloc(newsize); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("c4gs555ukbqlir0vf7test5fk"); // rv = (void *) 0; UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4pfhgk8c796mhpyfqs8fd3fy9 // vconfig_t *Pobsopen(Ppoly_t ** obs, int n_obs) public static Object Pobsopen(Object... arg) { UNSUPPORTED("dz610tzpr6mx5ioen71yt9lw2"); // vconfig_t *Pobsopen(Ppoly_t ** obs, int n_obs) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6h763iz1lhdcesjffuohit038"); // vconfig_t *rv; UNSUPPORTED("6fyedst0dusa16an4rkc8wowr"); // int poly_i, pt_i, i, n; UNSUPPORTED("aa6b5n017in5orglen9ktgs9a"); // int start, end; UNSUPPORTED("2izagha9qm9hfmw2zjtq0yyqy"); // rv = malloc(sizeof(vconfig_t)); UNSUPPORTED("3932k5yue8e2mb5g02yh32q3u"); // if (!rv) { UNSUPPORTED("11hwqop4xebvtcskop4uhpp01"); // return NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("537ma80b4p1qif18ogmioua6f"); // /* get storage */ UNSUPPORTED("5479ingjjk6qn2seps3k0btka"); // n = 0; UNSUPPORTED("6pryh49akl0qqyof6t9enjse3"); // for (poly_i = 0; poly_i < n_obs; poly_i++) UNSUPPORTED("7mn5akiq7xlxj3bhbg2hjyw43"); // n = n + obs[poly_i]->pn; UNSUPPORTED("4w0j0xkeflf96a4msrd1djw60"); // rv->P = mymalloc(n * sizeof(Ppoint_t)); UNSUPPORTED("d9e6s9bw2zqrvvmjjx99t8om5"); // rv->start = mymalloc((n_obs + 1) * sizeof(int)); UNSUPPORTED("cxuszkdst7q9ivsqe8ioe2yrw"); // rv->next = mymalloc(n * sizeof(int)); UNSUPPORTED("burxtua12xjppcbmval0ggvxg"); // rv->prev = mymalloc(n * sizeof(int)); UNSUPPORTED("b6qs2ihtcpwqt5curgpzssi0t"); // rv->N = n; UNSUPPORTED("y8pzts8dvguxzsn2xoi6o7xr"); // rv->Npoly = n_obs; UNSUPPORTED("85r5n7qhz9w2j71ctswryvhs9"); // /* build arrays */ UNSUPPORTED("9z3er49pc4h2rxja5r9grdo0h"); // i = 0; UNSUPPORTED("a9lqcyerwxbnkjv25bsdl8zm4"); // for (poly_i = 0; poly_i < n_obs; poly_i++) { UNSUPPORTED("c9man7k6dcktdn55nx8sc8hu2"); // start = i; UNSUPPORTED("l4rzwhaigo1dmtzc7olyk6y2"); // rv->start[poly_i] = start; UNSUPPORTED("do78yh8gawc61ywbjurslrmc7"); // end = start + obs[poly_i]->pn - 1; UNSUPPORTED("ef97u4pbd8y1vhy459q7r4jlr"); // for (pt_i = 0; pt_i < obs[poly_i]->pn; pt_i++) { UNSUPPORTED("duznt0bepum3jc0h5n1g0j6r1"); // rv->P[i] = obs[poly_i]->ps[pt_i]; UNSUPPORTED("cbqnpyguo28y5hi6788clitol"); // rv->next[i] = i + 1; UNSUPPORTED("75iqn38g2hugox3zmrro1eruh"); // rv->prev[i] = i - 1; UNSUPPORTED("1lo0ackow66iudrq1gb15y3ry"); // i++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c62cdvr5s10dskbn3g3nv130u"); // rv->next[end] = start; UNSUPPORTED("b77mp3jilxwb6gjveuwuldrvq"); // rv->prev[start] = end; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1u0umi0jiwt4fdh8n0nr1j8ns"); // rv->start[poly_i] = i; UNSUPPORTED("26uynreqxoitqc5md315okjca"); // visibility(rv); UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e4migs6coi22m83vhdmasdpq2 // void Pobsclose(vconfig_t * config) public static Object Pobsclose(Object... arg) { UNSUPPORTED("54tyi1oh5fd4a8lh1107ysppi"); // void Pobsclose(vconfig_t * config) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9i5pewoqi7dxp9hvkbh6p1kcd"); // free(config->P); UNSUPPORTED("dyvruo3b8nwce9o0q2bcycvb6"); // free(config->start); UNSUPPORTED("7at6jri0rjj24yyxd75duo75z"); // free(config->next); UNSUPPORTED("akdd6tfoylim5pdwp1w2o0j20"); // free(config->prev); UNSUPPORTED("e5hnzu51syeuaqx4dgswvpyje"); // if (config->vis) { UNSUPPORTED("8rwcdtu45rfzpyn5z46pkkhl6"); // free(config->vis[0]); UNSUPPORTED("i31zzb5907stuz3hbwbdcbhp"); // free(config->vis); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("61miap7xqs0is8dzf039j57nq"); // free(config); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8doijz2zl7icgvbs59qtqw2e6 // int Pobspath(vconfig_t * config, Ppoint_t p0, int poly0, Ppoint_t p1, int poly1, Ppolyline_t * output_route) public static Object Pobspath(Object... arg) { UNSUPPORTED("es9wttiuk2pkcqinglvdetmxh"); // int Pobspath(vconfig_t * config, Ppoint_t p0, int poly0, Ppoint_t p1, UNSUPPORTED("8waigfzvwmpsy4nk2ybswloiu"); // int poly1, Ppolyline_t * output_route) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("e2p3zngy6gppxlaxnza2atj67"); // int i, j, *dad; UNSUPPORTED("e62ya6atrka5y0vefbxn9gvsd"); // int opn; UNSUPPORTED("eio9tluzd00a9allc8rpk3sn3"); // Ppoint_t *ops; UNSUPPORTED("ekriswamubxah5xbwpyub2glk"); // COORD *ptvis0, *ptvis1; UNSUPPORTED("f3ay7pz98tp6wbnj91hh3kj"); // ptvis0 = ptVis(config, poly0, p0); UNSUPPORTED("9d1jc97ql0y8dloqkw50mmzdj"); // ptvis1 = ptVis(config, poly1, p1); UNSUPPORTED("7qs63rfsr6g17tfm9o33b3su6"); // dad = makePath(p0, poly0, ptvis0, p1, poly1, ptvis1, config); UNSUPPORTED("b26wav438av32fij4hegkkgu6"); // opn = 1; UNSUPPORTED("2vrbfn91t93xoyd85qnu32sy2"); // for (i = dad[config->N]; i != config->N + 1; i = dad[i]) UNSUPPORTED("3qey9tefagfie3qnkiki4nf6l"); // opn++; UNSUPPORTED("4196zy1bbqiysbv1glm6f6rs5"); // opn++; UNSUPPORTED("3snkzyfbaaeiotrx64sx9tpni"); // ops = malloc(opn * sizeof(Ppoint_t)); UNSUPPORTED("63lio5qjaoeboqhgiam7y7q0q"); // j = opn - 1; UNSUPPORTED("ebor0877uiofxllu68qt0ni85"); // ops[j--] = p1; UNSUPPORTED("2vrbfn91t93xoyd85qnu32sy2"); // for (i = dad[config->N]; i != config->N + 1; i = dad[i]) UNSUPPORTED("53win5ovenp62h9g9qdgiu4wq"); // ops[j--] = config->P[i]; UNSUPPORTED("2edzhlekn1dh9s7bk2yb2b4sm"); // ops[j] = p0; UNSUPPORTED("7i8zqi2jg8upn1wjzqf5il16o"); // assert(j == 0); UNSUPPORTED("4sudedq08kppbbadyqc21is7x"); // if (ptvis0) UNSUPPORTED("6zdjevsy6rl1dvkniswano9ae"); // free(ptvis0); UNSUPPORTED("1rp1r4ghfa31f1v07hmkoglxl"); // if (ptvis1) UNSUPPORTED("au3lcfls1tf7t5z3skjuvfuv8"); // free(ptvis1); UNSUPPORTED("70yf545lz9a6vp2qw2i0q9mr1"); // output_route->pn = opn; UNSUPPORTED("e9qedm1c6q4ehjjxi6v3u68ms"); // output_route->ps = ops; UNSUPPORTED("6qqkuw5cd4ebshxoji365xfkz"); // free(dad); UNSUPPORTED("2mmsh4mer8e3bkt2jk4gf4cyq"); // return ((!(0))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dya1texcjg4i2qyusjnmin7d1 // int Pobsbarriers(vconfig_t * config, Pedge_t ** barriers, int *n_barriers) public static Object Pobsbarriers(Object... arg) { UNSUPPORTED("bbaf03fwbv3733qfrsvd4eoom"); // int Pobsbarriers(vconfig_t * config, Pedge_t ** barriers, int *n_barriers) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dzpsknrwv8qkqq20hjnjpjn68"); // int i, j; UNSUPPORTED("cjg450i3kmtjepexj18lku2oz"); // *barriers = malloc(config->N * sizeof(Pedge_t)); UNSUPPORTED("b77jnv231p5441j8pofch6qjp"); // *n_barriers = config->N; UNSUPPORTED("bt2nq7y73jm09gh8xqv1scjog"); // for (i = 0; i < config->N; i++) { UNSUPPORTED("5xul9j0873agp8fm22e0halsf"); // barriers[i]->a.x = config->P[i].x; UNSUPPORTED("ca43a9xp0edjts9sme3eysq0v"); // barriers[i]->a.y = config->P[i].y; UNSUPPORTED("blqt6zbpyfb8cpsh8az3u154y"); // j = config->next[i]; UNSUPPORTED("4iqggxhzor4r40emialldaqms"); // barriers[i]->b.x = config->P[j].x; UNSUPPORTED("68b84cgnmyt50bomnqfrw8nau"); // barriers[i]->b.y = config->P[j].y; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 7jm8pu31yvt3fi0tc6t6go9tr // static Ppoint_t Bezpt[1000] //1 7h8jm5n1tlklgw1yaxx7dlvsx // static int Bezctr //3 oneie60d998qei37slgf3ce4 // static void addpt(Ppoint_t p) public static Object addpt(Object... arg) { UNSUPPORTED("3r6t7ceh9f1lplt1ewgna2ynh"); // static void addpt(Ppoint_t p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ad7t5k9prp8sma4kc9pwszul3"); // if ((Bezctr == 0) || UNSUPPORTED("eam5jo5658c75g0tppvkhcu31"); // (Bezpt[Bezctr - 1].x != p.x) || (Bezpt[Bezctr - 1].y != p.y)) UNSUPPORTED("a0616m6xy91u5reig6r0gz4pg"); // Bezpt[Bezctr++] = p; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3xaxtxslceffm0wx9zcpiqjgb // static ilcoord_t Bezier(ilcoord_t * V, int degree, double t, ilcoord_t * Left, ilcoord_t * Right) public static __struct__ Bezier(pointf V, int degree, double t, pointf Left, pointf Right) { // WARNING!! STRUCT return Bezier_w_(V, degree, t, Left, Right).copy(); } private static __struct__ Bezier_w_(pointf V, int degree, double t, pointf Left, pointf Right) { ENTERING("3xaxtxslceffm0wx9zcpiqjgb","Bezier"); try { int i, j; /* Index variables */ UNSUPPORTED("3a1zgxysa3t54vyq7k6z62wlj"); // ilcoord_t Vtemp[5 + 1][5 + 1]; UNSUPPORTED("byow1e8wyl29b607ktk3oabre"); // /* Copy control points */ UNSUPPORTED("88y00f5lc64b0ryy0gup9n4sb"); // for (j = 0; j <= degree; j++) { UNSUPPORTED("41awql5ne79yczmc4ilerplz3"); // Vtemp[0][j] = V[j]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("djq9b7i3h3uq77dr40ha5o1kr"); // /* Triangle computation */ UNSUPPORTED("227fs1hi4i0vh0vutu3yqxarc"); // for (i = 1; i <= degree; i++) { UNSUPPORTED("85sv74izli9gqstg0gqk2oznr"); // for (j = 0; j <= degree - i; j++) { UNSUPPORTED("6iowld1ly15t67xtpbyotvond"); // Vtemp[i][j].x = UNSUPPORTED("c9tdp4smiiyeg0r8t5udg667x"); // (1.0 - t) * Vtemp[i - 1][j].x + t * Vtemp[i - 1][j + 1].x; UNSUPPORTED("d7sb593gdk2getmc8zbflz6wq"); // Vtemp[i][j].y = UNSUPPORTED("d3h6zzsk3tsvl81ds9isu6lrl"); // (1.0 - t) * Vtemp[i - 1][j].y + t * Vtemp[i - 1][j + 1].y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7eb3j7c6ls3zjqm1bteyyg8dd"); // if (Left != ((ilcoord_t *)0)) UNSUPPORTED("dzkatwg4oc51psd4chd1yao6"); // for (j = 0; j <= degree; j++) UNSUPPORTED("7zwjg663emkibah35euakizmj"); // Left[j] = Vtemp[j][0]; UNSUPPORTED("6h28oxt02m95ar9k62xgzs2"); // if (Right != ((ilcoord_t *)0)) UNSUPPORTED("dzkatwg4oc51psd4chd1yao6"); // for (j = 0; j <= degree; j++) UNSUPPORTED("1rki0omqbix35s4wfx442v4ty"); // Right[j] = Vtemp[degree - j][j]; UNSUPPORTED("b23mms6jm55li1q74etrttq6m"); // return (Vtemp[degree][0]); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } finally { LEAVING("3xaxtxslceffm0wx9zcpiqjgb","Bezier"); } } //3 2e1dbsqqgp7k8i5doa7prt6jc // static void append_bezier(Ppoint_t * bezier) public static Object append_bezier(Object... arg) { UNSUPPORTED("5zm80zw3vn3gsj6zre2ynedck"); // static void append_bezier(Ppoint_t * bezier) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("544oxt8zbzz0u06hmg8ivxp3p"); // double a; UNSUPPORTED("2lyetpb097xdkox7xgnw605xd"); // ilcoord_t left[4], right[4]; UNSUPPORTED("4c5enrmeixpvwutnq2tbdb7ck"); // a = fabs(area2(bezier[0], bezier[1], bezier[2])) UNSUPPORTED("4fcyo20wfetvf2l99r0pchq0l"); // + fabs(area2(bezier[2], bezier[3], bezier[0])); UNSUPPORTED("3y36bo7zjs0dx2q4g6sl5awol"); // if (a < .5) { UNSUPPORTED("ar7l14fqklgvayi8jwebecz25"); // addpt(bezier[0]); UNSUPPORTED("268jkzt57hijh09gst1b1yl1e"); // addpt(bezier[3]); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("4k2sg523wku7lp7tcc9l6ggoj"); // (void) Bezier(bezier, 3, .5, left, right); UNSUPPORTED("bct90i183hbs4qhx4mmpnep1i"); // append_bezier(left); UNSUPPORTED("5dcnwocv9fm5psu807c2hpft6"); // append_bezier(right); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/pathplan/inpoly__c.java000066400000000000000000000060351312650303100224150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.pathplan; import static smetana.core.Macro.UNSUPPORTED; public class inpoly__c { //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 7pb9zum2n4wlgil34lvh8i0ts // typedef double COORD //3 8npqmbhzypa3vnvez32eenjfm // int in_poly(Ppoly_t poly, Ppoint_t q) public static Object in_poly(Object... arg) { UNSUPPORTED("591yna7lwmr02zotphxiz9jfy"); // int in_poly(Ppoly_t poly, Ppoint_t q) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3i49psuyz9205y6sp22yi0vg6"); // int i, i1; /* point index; i1 = i-1 mod n */ UNSUPPORTED("5jiiwgyq1pv7khw5ygfo33wmr"); // int n; UNSUPPORTED("ds3u5c0i2zcpyxll28zg5jfxz"); // Ppoint_t *P; UNSUPPORTED("aseexj0pf1b85gzltie980nx4"); // P = poly.ps; UNSUPPORTED("5wttw208juz89to1dojh5ke2v"); // n = poly.pn; UNSUPPORTED("1vi49g48u2rc9v88yhabta0yw"); // for (i = 0; i < n; i++) { UNSUPPORTED("esgbg5oqpjx4h4cvtcp2vu9ar"); // i1 = (i + n - 1) % n; UNSUPPORTED("40aader15dux12c5hbpxegrwb"); // if (wind(P[i1],P[i],q) == 1) return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2mmsh4mer8e3bkt2jk4gf4cyq"); // return ((!(0))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/pathplan/route__c.java000066400000000000000000000631111312650303100222370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.pathplan; import static gen.lib.pathplan.solvers__c.solve3; import static smetana.core.JUtils.setjmp; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtils.sqrt; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.DISTSQ; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import h.Ppoly_t; import h.pointf; import h.tna_t; import smetana.core.JUtils; import smetana.core.Memory; import smetana.core.Z; import smetana.core.__array_of_struct__; import smetana.core.__ptr__; import smetana.core.__struct__; import smetana.core.jmp_buf; public class route__c { //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 7pb9zum2n4wlgil34lvh8i0ts // typedef double COORD //1 540u5gu9i0x1wzoxqqx5n2vwp // static jmp_buf jbuf private static jmp_buf jbuf = new jmp_buf(); //1 3k2f2er3efsrl0210su710vf // static Ppoint_t *ops //static private __ptr__ ops; //1 ds2k0zdfzruet3qxk0duytkjx // static int opn, opl //private static int opn; //private static int opl; //3 9stmrdqlmufyk2wutp3totr5j // int Proutespline(Pedge_t * edges, int edgen, Ppolyline_t input, Ppoint_t * evs, Ppolyline_t * output) public static int Proutespline(__ptr__ edges, int edgen, final __struct__ input, __ptr__ evs, __ptr__ output) { // WARNING!! STRUCT return Proutespline_w_(edges, edgen, input.copy(), evs, output); } private static int Proutespline_w_(__ptr__ edges, int edgen, final __struct__ input, __ptr__ evs, __ptr__ output) { ENTERING("9stmrdqlmufyk2wutp3totr5j","Proutespline"); try { __ptr__ inps; int inpn; /* unpack into previous format rather than modify legacy code */ inps = input.getPtr("ps"); inpn = input.getInt("pn"); if (setjmp(jbuf)!=0) UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; /* generate the splines */ evs.plus(0).getStruct().___(normv(evs.plus(0).getStruct())); evs.plus(1).getStruct().___(normv(evs.plus(1).getStruct())); Z.z().opl = 0; growops(4); Z.z().ops_route.plus(Z.z().opl).setStruct(inps.plus(0).getStruct()); Z.z().opl++; if (reallyroutespline(edges, edgen, inps, inpn, evs.plus(0).getStruct(), evs.plus(1).getStruct()) == -1) return -1; output.setInt("pn", Z.z().opl); output.setPtr("ps", Z.z().ops_route); return 0; } finally { LEAVING("9stmrdqlmufyk2wutp3totr5j","Proutespline"); } } //3 13dxqzbgtpl4ubnnvw6ehzzi9 // static int reallyroutespline(Pedge_t * edges, int edgen, Ppoint_t * inps, int inpn, Ppoint_t ev0, Ppoint_t ev1) //private static __ptr__ tnas; //private static int tnan; public static int reallyroutespline(__ptr__ edges, int edgen, __ptr__ inps, int inpn, final __struct__ ev0, final __struct__ ev1) { // WARNING!! STRUCT return reallyroutespline_w_(edges, edgen, inps, inpn, ev0.copy(), ev1.copy()); } private static int reallyroutespline_w_(__ptr__ edges, int edgen, __ptr__ inps, int inpn, final __struct__ ev0, final __struct__ ev1) { ENTERING("13dxqzbgtpl4ubnnvw6ehzzi9","reallyroutespline"); try { final __struct__ p1 = JUtils.from(pointf.class), p2 = JUtils.from(pointf.class), cp1 = JUtils.from(pointf.class), cp2 = JUtils.from(pointf.class), p = JUtils.from(pointf.class); final __struct__ v1 = JUtils.from(pointf.class), v2 = JUtils.from(pointf.class), splitv = JUtils.from(pointf.class), splitv1 = JUtils.from(pointf.class), splitv2 = JUtils.from(pointf.class); double maxd, d, t; int maxi, i, spliti; if (Z.z().tnan < inpn) { if (N(Z.z().tnas)) { if (N(Z.z().tnas = Memory.malloc(sizeof(tna_t.class, inpn)))) return -1; } else { if (N(Z.z().tnas = Memory.realloc(Z.z().tnas, sizeof(tna_t.class, inpn)))) return -1; } Z.z().tnan = inpn; } Z.z().tnas.plus(0).getStruct().setDouble("t", 0); for (i = 1; i < inpn; i++) Z.z().tnas.plus(i).getStruct().setDouble("t", Z.z().tnas.plus(i-1).getStruct().getDouble("t") + dist(inps.plus(i).getStruct(), inps.plus(i-1).getStruct())); for (i = 1; i < inpn; i++) Z.z().tnas.plus(i).getStruct().setDouble("t", Z.z().tnas.plus(i).getStruct().getDouble("t") / Z.z().tnas.plus(inpn - 1).getStruct().getDouble("t")); for (i = 0; i < inpn; i++) { Z.z().tnas.plus(i).getStruct().getArrayOfStruct("a").plus(0).setStruct(scale(ev0, B1(Z.z().tnas.plus(i).getStruct().getDouble("t")))); Z.z().tnas.plus(i).getStruct().getArrayOfStruct("a").plus(1).setStruct(scale(ev1, B2(Z.z().tnas.plus(i).getStruct().getDouble("t")))); } if (mkspline(inps, inpn, Z.z().tnas, ev0, ev1, p1.amp(), v1.amp(), p2.amp(), v2.amp()) == -1) return -1; if (splinefits(edges, edgen, p1, v1, p2, v2, inps, inpn)!=0) return 0; cp1.___(add(p1, scale(v1, 1 / 3.0))); cp2.___(sub(p2, scale(v2, 1 / 3.0))); for (maxd = -1, maxi = -1, i = 1; i < inpn - 1; i++) { t = Z.z().tnas.plus(i).getDouble("t"); p.setDouble("x", B0(t) * p1.getDouble("x") + B1(t) * cp1.getDouble("x") + B2(t) * cp2.getDouble("x") + B3(t) * p2.getDouble("x")); p.setDouble("y", B0(t) * p1.getDouble("y") + B1(t) * cp1.getDouble("y") + B2(t) * cp2.getDouble("y") + B3(t) * p2.getDouble("y")); if ((d = dist(p, inps.plus(i).getStruct())) > maxd) {maxd = d; maxi = i;} } spliti = maxi; splitv1.___(normv(sub(inps.plus(spliti).getStruct(), inps.plus(spliti - 1).getStruct()))); splitv2.___(normv(sub(inps.plus(spliti + 1).getStruct(), inps.plus(spliti).getStruct()))); splitv.___(normv(add(splitv1, splitv2))); reallyroutespline(edges, edgen, inps, spliti + 1, ev0, splitv); reallyroutespline(edges, edgen, inps.plus(spliti), inpn - spliti, splitv, ev1); return 0; } finally { LEAVING("13dxqzbgtpl4ubnnvw6ehzzi9","reallyroutespline"); } } //3 29sok6jkfyobf83q130snkhmh // static int mkspline(Ppoint_t * inps, int inpn, tna_t * tnas, Ppoint_t ev0, Ppoint_t ev1, Ppoint_t * sp0, Ppoint_t * sv0, Ppoint_t * sp1, Ppoint_t * sv1) public static int mkspline(__ptr__ inps, int inpn, __ptr__ tnas, final __struct__ ev0, final __struct__ ev1, __ptr__ sp0, __ptr__ sv0, __ptr__ sp1, __ptr__ sv1) { // WARNING!! STRUCT return mkspline_w_(inps, inpn, tnas, ev0.copy(), ev1.copy(), sp0, sv0, sp1, sv1); } private static int mkspline_w_(__ptr__ inps, int inpn, __ptr__ tnas, final __struct__ ev0, final __struct__ ev1, __ptr__ sp0, __ptr__ sv0, __ptr__ sp1, __ptr__ sv1) { ENTERING("29sok6jkfyobf83q130snkhmh","mkspline"); try { final __struct__ tmp = JUtils.from(pointf.class); double c[][] = new double[2][2]; double x[] = new double[2]; double det01, det0X, detX1; double d01, scale0, scale3; int i; scale0 = scale3 = 0.0; c[0][0] = c[0][1] = c[1][0] = c[1][1] = 0.0; x[0] = x[1] = 0.0; for (i = 0; i < inpn; i++) { c[0][0] += dot(tnas.plus(i).getStruct().getArrayOfStruct("a").plus(0).getStruct(), tnas.plus(i).getStruct().getArrayOfStruct("a").plus(0).getStruct()); c[0][1] += dot(tnas.plus(i).getStruct().getArrayOfStruct("a").plus(0).getStruct(), tnas.plus(i).getStruct().getArrayOfStruct("a").plus(1).getStruct()); c[1][0] = c[0][1]; c[1][1] += dot(tnas.plus(i).getStruct().getArrayOfStruct("a").plus(1).getStruct(), tnas.plus(i).getStruct().getArrayOfStruct("a").plus(1).getStruct()); tmp.___(sub(inps.plus(i).getStruct(), add(scale(inps.plus(0).getStruct(), B01(tnas.plus(i).getStruct().getDouble("t"))), scale(inps.plus(inpn - 1).getStruct(), B23(tnas.plus(i).getStruct().getDouble("t")))))); x[0] += dot(tnas.plus(i).getStruct().getArrayOfStruct("a").plus(0).getStruct(), tmp); x[1] += dot(tnas.plus(i).getStruct().getArrayOfStruct("a").plus(1).getStruct(), tmp); } det01 = c[0][0] * c[1][1] - c[1][0] * c[0][1]; det0X = c[0][0] * x[1] - c[0][1] * x[0]; detX1 = x[0] * c[1][1] - x[1] * c[0][1]; if (((det01) >= 0 ? (det01) : -(det01)) >= 1e-6) { scale0 = detX1 / det01; scale3 = det0X / det01; } if (((det01) >= 0 ? (det01) : -(det01)) < 1e-6 || scale0 <= 0.0 || scale3 <= 0.0) { d01 = dist(inps.plus(0).getStruct(), inps.plus(inpn - 1).getStruct()) / 3.0; scale0 = d01; scale3 = d01; } sp0.setStruct(inps.plus(0).getStruct()); sv0.setStruct(scale(ev0, scale0)); sp1.setStruct(inps.plus(inpn - 1).getStruct()); sv1.setStruct(scale(ev1, scale3)); return 0; } finally { LEAVING("29sok6jkfyobf83q130snkhmh","mkspline"); } } //3 ea6jsc0rwfyjtmmuxax6r5ngk // static double dist_n(Ppoint_t * p, int n) public static double dist_n(__ptr__ p, int n) { ENTERING("ea6jsc0rwfyjtmmuxax6r5ngk","dist_n"); try { int i; double rv; rv = 0.0; for (i = 1; i < n; i++) { rv += sqrt((p.plus(i).getStruct().getDouble("x") - p.plus(i - 1).getStruct().getDouble("x")) * (p.plus(i).getStruct().getDouble("x") - p.plus(i - 1).getStruct().getDouble("x"))+ (p.plus(i).getStruct().getDouble("y") - p.plus(i - 1).getStruct().getDouble("y")) * (p.plus(i).getStruct().getDouble("y") - p.plus(i - 1).getStruct().getDouble("y"))); } return rv; } finally { LEAVING("ea6jsc0rwfyjtmmuxax6r5ngk","dist_n"); } } //3 987ednrgu5qo9dzhpiox47mhb // static int splinefits(Pedge_t * edges, int edgen, Ppoint_t pa, Pvector_t va, Ppoint_t pb, Pvector_t vb, Ppoint_t * inps, int inpn) public static int splinefits(__ptr__ edges, int edgen, final __struct__ pa, final __struct__ va, final __struct__ pb, final __struct__ vb, __ptr__ inps, int inpn) { // WARNING!! STRUCT return splinefits_w_(edges, edgen, pa.copy(), va.copy(), pb.copy(), vb.copy(), inps, inpn); } private static int splinefits_w_(__ptr__ edges, int edgen, final __struct__ pa, final __struct__ va, final __struct__ pb, final __struct__ vb, __ptr__ inps, int inpn) { ENTERING("987ednrgu5qo9dzhpiox47mhb","splinefits"); try { final __array_of_struct__ sps = __array_of_struct__.malloc(pointf.class, 4); double a, b; int pi; int forceflag; int first = 1; forceflag = (inpn == 2 ? 1 : 0); a = b = 4; for (;;) { sps.plus(0).getStruct().setDouble("x", pa.getDouble("x")); sps.plus(0).getStruct().setDouble("y", pa.getDouble("y")); sps.plus(1).getStruct().setDouble("x", pa.getDouble("x") + a * va.getDouble("x") / 3.0); sps.plus(1).getStruct().setDouble("y", pa.getDouble("y") + a * va.getDouble("y") / 3.0); sps.plus(2).getStruct().setDouble("x", pb.getDouble("x") - b * vb.getDouble("x") / 3.0); sps.plus(2).getStruct().setDouble("y", pb.getDouble("y") - b * vb.getDouble("y") / 3.0); sps.plus(3).getStruct().setDouble("x", pb.getDouble("x")); sps.plus(3).getStruct().setDouble("y", pb.getDouble("y")); /* shortcuts (paths shorter than the shortest path) not allowed - * they must be outside the constraint polygon. this can happen * if the candidate spline intersects the constraint polygon exactly * on sides or vertices. maybe this could be more elegant, but * it solves the immediate problem. we could also try jittering the * constraint polygon, or computing the candidate spline more carefully, * for example using the path. SCN */ if (first!=0 && (dist_n(sps.asPtr(), 4) < (dist_n(inps, inpn) - 1E-3))) return 0; first = 0; if (splineisinside(edges, edgen, sps)) { growops(Z.z().opl + 4); for (pi = 1; pi < 4; pi++) { Z.z().ops_route.plus(Z.z().opl).setDouble("x", sps.plus(pi).getStruct().getDouble("x")); Z.z().ops_route.plus(Z.z().opl).setDouble("y", sps.plus(pi).getStruct().getDouble("y")); Z.z().opl++; } return 1; } if (a == 0 && b == 0) { if (forceflag!=0) { growops(Z.z().opl + 4); for (pi = 1; pi < 4; pi++) { Z.z().ops_route.plus(Z.z().opl).setDouble("x", sps.plus(pi).getStruct().getDouble("x")); Z.z().ops_route.plus(Z.z().opl).setDouble("y", sps.plus(pi).getStruct().getDouble("y")); Z.z().opl++; } return 1; } break; } if (a > .01) { a /= 2; b /= 2; } else a = b = 0; } return 0; } finally { LEAVING("987ednrgu5qo9dzhpiox47mhb","splinefits"); } } //3 b6eghkeu16aum3l778ig52ht1 // static int splineisinside(Pedge_t * edges, int edgen, Ppoint_t * sps) public static boolean splineisinside(__ptr__ edges, int edgen, __array_of_struct__ sps) { ENTERING("b6eghkeu16aum3l778ig52ht1","splineisinside"); try { double roots[] = new double[4]; int rooti, rootn; int ei; final __array_of_struct__ lps = __array_of_struct__.malloc(pointf.class, 2); final __struct__ ip = JUtils.from(pointf.class); double t, ta, tb, tc, td; for (ei = 0; ei < edgen; ei++) { lps.plus(0).setStruct(edges.plus(ei).getStruct("a")); lps.plus(1).setStruct(edges.plus(ei).getStruct("b")); /* if ((rootn = splineintersectsline (sps, lps, roots)) == 4) return 1; */ if ((rootn = splineintersectsline(sps, lps, roots)) == 4) continue; for (rooti = 0; rooti < rootn; rooti++) { if (roots[rooti] < 1E-6 || roots[rooti] > 1 - 1E-6) continue; t = roots[rooti]; td = t * t * t; tc = 3 * t * t * (1 - t); tb = 3 * t * (1 - t) * (1 - t); ta = (1 - t) * (1 - t) * (1 - t); ip.setDouble("x", ta * sps.plus(0).getDouble("x") + tb * sps.plus(1).getDouble("x") + tc * sps.plus(2).getDouble("x") + td * sps.plus(3).getDouble("x")); ip.setDouble("y", ta * sps.plus(0).getDouble("y") + tb * sps.plus(1).getDouble("y") + tc * sps.plus(2).getDouble("y") + td * sps.plus(3).getDouble("y")); if (DISTSQ(ip, lps.plus(0).getStruct()) < 1E-3 || DISTSQ(ip, lps.plus(1).getStruct()) < 1E-3) continue; return false; } } return true; } finally { LEAVING("b6eghkeu16aum3l778ig52ht1","splineisinside"); } } //3 32nc8itszi77u36la8npt2870 // static int splineintersectsline(Ppoint_t * sps, Ppoint_t * lps, double *roots) public static int splineintersectsline(__array_of_struct__ sps, __array_of_struct__ lps, double roots[]) { ENTERING("32nc8itszi77u36la8npt2870","splineintersectsline"); try { double scoeff[] = new double[4]; double xcoeff[] = new double[2]; double ycoeff[] = new double[2]; double xroots[] = new double[3]; double yroots[] = new double[3]; double tv, sv, rat; int rootn[] = new int[]{0}; int xrootn, yrootn, i, j; xcoeff[0] = lps.plus(0).getStruct().getDouble("x"); xcoeff[1] = lps.plus(1).getStruct().getDouble("x") - lps.plus(0).getStruct().getDouble("x"); ycoeff[0] = lps.plus(0).getStruct().getDouble("y"); ycoeff[1] = lps.plus(1).getStruct().getDouble("y") - lps.plus(0).getStruct().getDouble("y"); rootn[0] = 0; if (xcoeff[1] == 0) { if (ycoeff[1] == 0) { points2coeff(sps.plus(0).getStruct().getDouble("x"), sps.plus(1).getStruct().getDouble("x"), sps.plus(2).getStruct().getDouble("x"), sps.plus(3).getStruct().getDouble("x"), scoeff); scoeff[0] -= xcoeff[0]; xrootn = solve3(scoeff, xroots); points2coeff(sps.plus(0).getStruct().getDouble("y"), sps.plus(1).getStruct().getDouble("y"), sps.plus(2).getStruct().getDouble("y"), sps.plus(3).getStruct().getDouble("y"), scoeff); scoeff[0] -= ycoeff[0]; yrootn = solve3(scoeff, yroots); if (xrootn == 4) if (yrootn == 4) return 4; else for (j = 0; j < yrootn; j++) addroot(yroots[j], roots, rootn); else if (yrootn == 4) for (i = 0; i < xrootn; i++) addroot(xroots[i], roots, rootn); else for (i = 0; i < xrootn; i++) for (j = 0; j < yrootn; j++) if (xroots[i] == yroots[j]) addroot(xroots[i], roots, rootn); return rootn[0]; } else { points2coeff(sps.plus(0).getStruct().getDouble("x"), sps.plus(1).getStruct().getDouble("x"), sps.plus(2).getStruct().getDouble("x"), sps.plus(3).getStruct().getDouble("x"), scoeff); scoeff[0] -= xcoeff[0]; xrootn = solve3(scoeff, xroots); if (xrootn == 4) return 4; for (i = 0; i < xrootn; i++) { tv = xroots[i]; if (tv >= 0 && tv <= 1) { points2coeff(sps.plus(0).getStruct().getDouble("y"), sps.plus(1).getStruct().getDouble("y"), sps.plus(2).getStruct().getDouble("y"), sps.plus(3).getStruct().getDouble("y"), scoeff); sv = scoeff[0] + tv * (scoeff[1] + tv * (scoeff[2] + tv * scoeff[3])); sv = (sv - ycoeff[0]) / ycoeff[1]; if ((0 <= sv) && (sv <= 1)) addroot(tv, roots, rootn); } } return rootn[0]; } } else { rat = ycoeff[1] / xcoeff[1]; points2coeff(sps.plus(0).getStruct().getDouble("y") - rat * sps.plus(0).getStruct().getDouble("x"), sps.plus(1).getStruct().getDouble("y") - rat * sps.plus(1).getStruct().getDouble("x"), sps.plus(2).getStruct().getDouble("y") - rat * sps.plus(2).getStruct().getDouble("x"), sps.plus(3).getStruct().getDouble("y") - rat * sps.plus(3).getStruct().getDouble("x"), scoeff); scoeff[0] += rat * xcoeff[0] - ycoeff[0]; xrootn = solve3(scoeff, xroots); if (xrootn == 4) return 4; for (i = 0; i < xrootn; i++) { tv = xroots[i]; if (tv >= 0 && tv <= 1) { points2coeff(sps.plus(0).getStruct().getDouble("x"), sps.plus(1).getStruct().getDouble("x"), sps.plus(2).getStruct().getDouble("x"), sps.plus(3).getStruct().getDouble("x"), scoeff); sv = scoeff[0] + tv * (scoeff[1] + tv * (scoeff[2] + tv * scoeff[3])); sv = (sv - xcoeff[0]) / xcoeff[1]; if ((0 <= sv) && (sv <= 1)) addroot(tv, roots, rootn); } } return rootn[0]; } } finally { LEAVING("32nc8itszi77u36la8npt2870","splineintersectsline"); } } //3 9011b45d42bhwfxzhgxqnlfhp // static void points2coeff(double v0, double v1, double v2, double v3, double *coeff) public static void points2coeff(double v0, double v1, double v2, double v3, double coeff[]) { ENTERING("9011b45d42bhwfxzhgxqnlfhp","points2coeff"); try { coeff[3] = v3 + 3 * v1 - (v0 + 3 * v2); coeff[2] = 3 * v0 + 3 * v2 - 6 * v1; coeff[1] = 3 * (v1 - v0); coeff[0] = v0; } finally { LEAVING("9011b45d42bhwfxzhgxqnlfhp","points2coeff"); } } //3 6ldk438jjflh0huxkg4cs8kwu // static void addroot(double root, double *roots, int *rootnp) public static void addroot(double root, double roots[], int rootnp[]) { ENTERING("6ldk438jjflh0huxkg4cs8kwu","addroot"); try { if (root >= 0 && root <= 1) { roots[rootnp[0]] = root; rootnp[0]++; } } finally { LEAVING("6ldk438jjflh0huxkg4cs8kwu","addroot"); } } //3 3i8m1m9fg7qmnt8jloorwlu8e // static Pvector_t normv(Pvector_t v) public static __struct__ normv(final __struct__ v) { // WARNING!! STRUCT return normv_w_(v.copy()).copy(); } private static __struct__ normv_w_(final __struct__ v) { ENTERING("3i8m1m9fg7qmnt8jloorwlu8e","normv"); try { double d; d = v.getDouble("x") * v.getDouble("x") + v.getDouble("y") * v.getDouble("y"); if (d > 1e-6) { d = sqrt(d); v.setDouble("x", v.getDouble("x") / d); v.setDouble("y", v.getDouble("y") / d); } return v; } finally { LEAVING("3i8m1m9fg7qmnt8jloorwlu8e","normv"); } } //3 d59jcnpi1y0wr8e9uwxny2fvk // static void growops(int newopn) public static void growops(int newopn) { ENTERING("d59jcnpi1y0wr8e9uwxny2fvk","growops"); try { if (newopn <= Z.z().opn_route) return; if (N(Z.z().ops_route)) { if (N(Z.z().ops_route = Memory.malloc(sizeof (pointf.class, newopn)))) { UNSUPPORTED("413an1hqgkb4ezaec6qdsdplx"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\route.c", 32, ("cannot malloc ops")); UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1); } } else { if (N(Z.z().ops_route = Memory.realloc(Z.z().ops_route, sizeof (pointf.class, newopn)))) { UNSUPPORTED("8u0qgahxvk5pplf90thmhwxhl"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\route.c", 32, ("cannot realloc ops")); UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1); } } Z.z().opn_route = newopn; } finally { LEAVING("d59jcnpi1y0wr8e9uwxny2fvk","growops"); } } //3 f4a7nt247bokdwr2owda050of // static Ppoint_t add(Ppoint_t p1, Ppoint_t p2) public static __struct__ add(final __struct__ p1, final __struct__ p2) { // WARNING!! STRUCT return add_w_(p1.copy(), p2.copy()).copy(); } private static __struct__ add_w_(final __struct__ p1, final __struct__ p2) { ENTERING("f4a7nt247bokdwr2owda050of","add"); try { p1.setDouble("x", p1.getDouble("x") + p2.getDouble("x")); p1.setDouble("y", p1.getDouble("y") + p2.getDouble("y")); return p1; } finally { LEAVING("f4a7nt247bokdwr2owda050of","add"); } } //3 c4l1gvlkv2s4mi6os7r9dh89f // static Ppoint_t sub(Ppoint_t p1, Ppoint_t p2) public static __struct__ sub(final __struct__ p1, final __struct__ p2) { // WARNING!! STRUCT return sub_w_(p1.copy(), p2.copy()).copy(); } private static __struct__ sub_w_(final __struct__ p1, final __struct__ p2) { ENTERING("c4l1gvlkv2s4mi6os7r9dh89f","sub"); try { p1.setDouble("x", p1.getDouble("x") - p2.getDouble("x")); p1.setDouble("y", p1.getDouble("y") - p2.getDouble("y")); return p1; } finally { LEAVING("c4l1gvlkv2s4mi6os7r9dh89f","sub"); } } //3 dqnlz0tceriykws4ngudl94w9 // static double dist(Ppoint_t p1, Ppoint_t p2) public static double dist(final __struct__ p1, final __struct__ p2) { // WARNING!! STRUCT return dist_w_(p1.copy(), p2.copy()); } private static double dist_w_(final __struct__ p1, final __struct__ p2) { ENTERING("dqnlz0tceriykws4ngudl94w9","dist"); try { double dx, dy; dx = p2.getDouble("x") - p1.getDouble("x"); dy = p2.getDouble("y") - p1.getDouble("y"); return sqrt(dx * dx + dy * dy); } finally { LEAVING("dqnlz0tceriykws4ngudl94w9","dist"); } } //3 19149pdllzhplvew0bsh5v6hy // static Ppoint_t scale(Ppoint_t p, double c) public static __struct__ scale(final __struct__ p, double c) { // WARNING!! STRUCT return scale_w_(p.copy(), c).copy(); } private static __struct__ scale_w_(final __struct__ p, double c) { ENTERING("19149pdllzhplvew0bsh5v6hy","scale"); try { p.setDouble("x", p.getDouble("x") * c); p.setDouble("y", p.getDouble("y") * c); return p; } finally { LEAVING("19149pdllzhplvew0bsh5v6hy","scale"); } } //3 7ebsa2s1eoopqj1pp43bh5fw // static double dot(Ppoint_t p1, Ppoint_t p2) public static double dot(final __struct__ p1, final __struct__ p2) { // WARNING!! STRUCT return dot_w_(p1.copy(), p2.copy()); } private static double dot_w_(final __struct__ p1, final __struct__ p2) { ENTERING("7ebsa2s1eoopqj1pp43bh5fw","dot"); try { return p1.getDouble("x") * p2.getDouble("x") + p1.getDouble("y") * p2.getDouble("y"); } finally { LEAVING("7ebsa2s1eoopqj1pp43bh5fw","dot"); } } //3 73nhv3cuxqa9va0puve0ji2d5 // static double B0(double t) public static double B0(double t) { ENTERING("73nhv3cuxqa9va0puve0ji2d5","B0"); try { double tmp = 1.0 - t; return tmp * tmp * tmp; } finally { LEAVING("73nhv3cuxqa9va0puve0ji2d5","B0"); } } //3 jkfs4ak0xr5pzwye7qnm6irp // static double B1(double t) public static double B1(double t) { ENTERING("jkfs4ak0xr5pzwye7qnm6irp","B1"); try { double tmp = 1.0 - t; return 3 * t * tmp * tmp; } finally { LEAVING("jkfs4ak0xr5pzwye7qnm6irp","B1"); } } //3 9ziajuqys2xceftdw0vac02g9 // static double B2(double t) public static double B2(double t) { ENTERING("9ziajuqys2xceftdw0vac02g9","B2"); try { double tmp = 1.0 - t; return 3 * t * t * tmp; } finally { LEAVING("9ziajuqys2xceftdw0vac02g9","B2"); } } //3 5sjstsgkvoou9grsty3y0cnvg // static double B3(double t) public static double B3(double t) { ENTERING("5sjstsgkvoou9grsty3y0cnvg","B3"); try { return t * t * t; } finally { LEAVING("5sjstsgkvoou9grsty3y0cnvg","B3"); } } //3 9hzfapzxcesobeegq4aokksbp // static double B01(double t) public static double B01(double t) { ENTERING("9hzfapzxcesobeegq4aokksbp","B01"); try { double tmp = 1.0 - t; return tmp * tmp * (tmp + 3 * t); } finally { LEAVING("9hzfapzxcesobeegq4aokksbp","B01"); } } //3 571cxp9l20eyvqjwdoy9vnc6t // static double B23(double t) public static double B23(double t) { ENTERING("571cxp9l20eyvqjwdoy9vnc6t","B23"); try { double tmp = 1.0 - t; return t * t * (3 * tmp + t); } finally { LEAVING("571cxp9l20eyvqjwdoy9vnc6t","B23"); } } } plantuml-1.2017.15/src/gen/lib/pathplan/shortest__c.java000066400000000000000000000660451312650303100227650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.pathplan; import static smetana.core.JUtils.EQ; import static smetana.core.JUtils.LOG2; import static smetana.core.JUtils.NEQ; import static smetana.core.JUtils.setjmp; import static smetana.core.JUtils.sizeof; import static smetana.core.JUtils.sizeof_starstar_empty; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.HUGE_VAL; import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; import h.Ppoly_t; import h.pointf; import h.pointnlink_t; import h.triangle_t; import smetana.core.JUtils; import smetana.core.Memory; import smetana.core.Z; import smetana.core.__array_of_struct__; import smetana.core.__ptr__; import smetana.core.__struct__; import smetana.core.jmp_buf; public class shortest__c { //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 7pb9zum2n4wlgil34lvh8i0ts // typedef double COORD //1 540u5gu9i0x1wzoxqqx5n2vwp // static jmp_buf jbuf private static jmp_buf jbuf = new jmp_buf(); //1 3gj35j1owzho1bj8qrr8j520a // static pointnlink_t *pnls, **pnlps //private static pointnlink_t pnls; //private static __ptr__ pnlps; //1 6r0oj01m6zabkua5f5x778wq6 // static int pnln, pnll //private static int pnln, pnll; //1 aywrlzd2nea9kkv8kzuctk7pt // static triangle_t *tris //private static __ptr__ tris; //1 a6aizijrgkmhf8hoyeqj49b60 // static int trin, tril //private static int trin, tril; //1 cc2hmcygbtg3adbwgkunssdhx // static deque_t dq //private final static __struct__ dq = JUtils.from(deque_t.class); //1 3k2f2er3efsrl0210su710vf // static Ppoint_t *ops //static private __ptr__ ops; //1 68lm8qk1d212p1ngzu26gudjc // static int opn //private static int opn; //3 2gub5b19vo2qexn56nw23wage // int Pshortestpath(Ppoly_t * polyp, Ppoint_t * eps, Ppolyline_t * output) public static int Pshortestpath(Ppoly_t polyp, __array_of_struct__ eps, Ppoly_t output) { ENTERING("2gub5b19vo2qexn56nw23wage","Pshortestpath"); try { int pi, minpi; double minx; final __struct__ p1 = JUtils.from(pointf.class), p2 = JUtils.from(pointf.class), p3 = JUtils.from(pointf.class); int trii, trij, ftrii, ltrii; int ei; final __array_of_struct__ epnls = __array_of_struct__.malloc(pointnlink_t.class, 2); pointnlink_t lpnlp=null, rpnlp=null, pnlp=null; triangle_t trip; int splitindex; if (setjmp(jbuf)!=0) return -2; /* make space */ growpnls(polyp.getInt("pn")); Z.z().pnll = 0; Z.z().tril = 0; growdq(polyp.getInt("pn") * 2); Z.z().dq.setInt("fpnlpi", Z.z().dq.getInt("pnlpn") / 2); Z.z().dq.setInt("lpnlpi", Z.z().dq.getInt("fpnlpi") - 1); /* make sure polygon is CCW and load pnls array */ for (pi = 0, minx = HUGE_VAL, minpi = -1; pi < polyp.getInt("pn"); pi++) { if (minx > polyp.getPtr("ps").plus(pi).getDouble("x")) { minx = polyp.getPtr("ps").plus(pi).getDouble("x"); minpi = pi; } } p2.____(polyp.getPtr("ps").plus(minpi)); p1.____(polyp.getPtr("ps").plus(((minpi == 0) ? polyp.getInt("pn") - 1 : minpi - 1))); p3.____(polyp.getPtr("ps").plus(((minpi == polyp.getInt("pn") - 1) ? 0 : minpi + 1))); if (((p1.getDouble("x") == p2.getDouble("x") && p2.getDouble("x") == p3.getDouble("x")) && (p3.getDouble("y") > p2.getDouble("y"))) || ccw(p1.amp(), p2.amp(), p3.amp()) != 1) { for (pi = polyp.getInt("pn") - 1; pi >= 0; pi--) { if (pi < polyp.getInt("pn") - 1 && polyp.getPtr("ps").plus(pi).getDouble("x") == polyp.getPtr("ps").plus(pi+1).getDouble("x") && polyp.getPtr("ps").plus(pi).getDouble("y") == polyp.getPtr("ps").plus(pi+1).getDouble("y")) continue; Z.z().pnls.plus(Z.z().pnll).setPtr("pp", polyp.getPtr("ps").plus(pi)); Z.z().pnls.plus(Z.z().pnll).setPtr("link", Z.z().pnls.plus(Z.z().pnll % polyp.getInt("pn"))); Z.z().pnlps.plus(Z.z().pnll).setPtr(Z.z().pnls.plus(Z.z().pnll).getPtr()); Z.z().pnll++; } } else { for (pi = 0; pi < polyp.getInt("pn"); pi++) { if (pi > 0 && polyp.getPtr("ps").plus(pi).getDouble("x") == polyp.getPtr("ps").plus(pi - 1).getDouble("x") && polyp.getPtr("ps").plus(pi).getDouble("y") == polyp.getPtr("ps").plus(pi - 1).getDouble("y")) continue; Z.z().pnls.plus(Z.z().pnll).setPtr("pp", polyp.getPtr("ps").plus(pi)); Z.z().pnls.plus(Z.z().pnll).setPtr("link", Z.z().pnls.plus(Z.z().pnll % polyp.getInt("pn"))); Z.z().pnlps.plus(Z.z().pnll).setPtr(Z.z().pnls.plus(Z.z().pnll)); Z.z().pnll++; } } /* generate list of triangles */ triangulate(Z.z().pnlps, Z.z().pnll); /* connect all pairs of triangles that share an edge */ for (trii = 0; trii < Z.z().tril; trii++) for (trij = trii + 1; trij < Z.z().tril; trij++) connecttris(trii, trij); /* find first and last triangles */ for (trii = 0; trii < Z.z().tril; trii++) if (pointintri(trii, eps.plus(0).getStruct().amp())) break; if (trii == Z.z().tril) { UNSUPPORTED("4ma3y8l4lmjcsw49kmsgknig6"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("source point not in any triangle")); UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1; } ftrii = trii; for (trii = 0; trii < Z.z().tril; trii++) if (pointintri(trii, eps.plus(1).getStruct().amp())) break; if (trii == Z.z().tril) { System.err.println("libpath/%s:%d: %s\n" + "graphviz-2.38.0\\lib\\pathplan\\shortest.c" + 26 + ("destination point not in any triangle")); return -1; } ltrii = trii; /* mark the strip of triangles from eps[0] to eps[1] */ if (N(marktripath(ftrii, ltrii))) { System.err.println("libpath/%s:%d: %s" + "graphviz-2.38.0\\lib\\pathplan\\shortest.c" + 26 + ("cannot find triangle path")); /* a straight line is better than failing */ growops(2); output.setInt("pn", 2); Z.z().ops_shortest.plus(0).setStruct(eps.plus(0).getStruct()); Z.z().ops_shortest.plus(1).setStruct(eps.plus(1).getStruct()); output.setPtr("ps", Z.z().ops_shortest); return 0; } /* if endpoints in same triangle, use a single line */ if (ftrii == ltrii) { UNSUPPORTED("2nnkwrdxg0ma2m482dqarlbz6"); // growops(2); UNSUPPORTED("5penbn9ky80i7jw02belk2zoj"); // output->pn = 2; UNSUPPORTED("8i925e1tnbqn909027lqcg3fi"); // ops[0] = eps[0], ops[1] = eps[1]; UNSUPPORTED("3rcg6c9s9nmostq9c3r5n6x4h"); // output->ps = ops; UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; } /* build funnel and shortest path linked list (in add2dq) */ epnls.plus(0).getStruct().setPtr("pp", eps.plus(0).asPtr()); epnls.plus(0).getStruct().setPtr("link", null); epnls.plus(1).getStruct().setPtr("pp", eps.plus(1).asPtr()); epnls.plus(1).getStruct().setPtr("link", null); add2dq(1, epnls.plus(0).asPtr()); Z.z().dq.setInt("apex", Z.z().dq.getInt("fpnlpi")); trii = ftrii; while (trii != -1) { trip = (triangle_t) Z.z().tris.plus(trii); trip.setInt("mark", 2); /* find the left and right points of the exiting edge */ for (ei = 0; ei < 3; ei++) if (trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("rtp")!=null && trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("rtp").getInt("mark") == 1) break; if (ei == 3) { /* in last triangle */ if (ccw(eps.plus(1).asPtr(), Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("fpnlpi")).getPtr().getPtr("pp"), Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("lpnlpi")).getPtr().getPtr("pp")) == 1) { lpnlp = (pointnlink_t) Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("lpnlpi")).getPtr(); rpnlp = (pointnlink_t) epnls.plus(1).asPtr(); } else { lpnlp = (pointnlink_t) epnls.plus(1).asPtr(); rpnlp = (pointnlink_t) Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("lpnlpi")).getPtr(); } } else { pnlp = (pointnlink_t) trip.getArrayOfStruct("e").plus((ei + 1) % 3).getStruct().getPtr("pnl1p"); if (ccw(trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl0p").getPtr("pp"), pnlp.getPtr("pp"), trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl1p").getPtr("pp")) == 1) UNSUPPORTED("2cii65lhw4wb8nyvjv702v7md"); // lpnlp = trip->e[ei].pnl1p, rpnlp = trip->e[ei].pnl0p; else { lpnlp = (pointnlink_t) trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl0p"); rpnlp = (pointnlink_t) trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl1p"); } } /* update deque */ if (trii == ftrii) { add2dq(2, lpnlp); add2dq(1, rpnlp); } else { if (NEQ(Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("fpnlpi")).getPtr(), rpnlp) && NEQ(Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("lpnlpi")).getPtr(), rpnlp)) { /* add right point to deque */ splitindex = finddqsplit(rpnlp); splitdq(2, splitindex); add2dq(1, rpnlp); /* if the split is behind the apex, then reset apex */ if (splitindex > Z.z().dq.getInt("apex")) Z.z().dq.setInt("apex", splitindex); } else { /* add left point to deque */ splitindex = finddqsplit(lpnlp); splitdq(1, splitindex); add2dq(2, lpnlp); /* if the split is in front of the apex, then reset apex */ if (splitindex < Z.z().dq.getInt("apex")) Z.z().dq.setInt("apex", splitindex); } } trii = -1; for (ei = 0; ei < 3; ei++) if (trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("rtp")!=null && trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("rtp").getInt("mark") == 1) { trii = trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("rtp").minus(Z.z().tris); break; } } for (pi = 0, pnlp = (pointnlink_t) epnls.plus(1).asPtr(); pnlp!=null; pnlp = (pointnlink_t) pnlp.getPtr("link")) pi++; growops(pi); output.setInt("pn", pi); for (pi = pi - 1, pnlp = (pointnlink_t) epnls.plus(1).asPtr(); pnlp!=null; pi--, pnlp = (pointnlink_t) pnlp.getPtr("link")) Z.z().ops_shortest.plus(pi).setPtr(pnlp.getPtr("pp")); output.setPtr("ps", Z.z().ops_shortest); return 0; } finally { LEAVING("2gub5b19vo2qexn56nw23wage","Pshortestpath"); } } //3 73cr7m3mqvtuotpzrmaw2y8zm // static void triangulate(pointnlink_t ** pnlps, int pnln) public static void triangulate(__ptr__ pnlps, int pnln) { ENTERING("73cr7m3mqvtuotpzrmaw2y8zm","triangulate"); try { int pnli, pnlip1, pnlip2; LOG2("triangulate "+pnln); if (pnln > 3) { for (pnli = 0; pnli < pnln; pnli++) { pnlip1 = (pnli + 1) % pnln; pnlip2 = (pnli + 2) % pnln; if (isdiagonal(pnli, pnlip2, pnlps, pnln)) { loadtriangle(pnlps.plus(pnli).getPtr(), pnlps.plus(pnlip1).getPtr(), pnlps.plus(pnlip2).getPtr()); for (pnli = pnlip1; pnli < pnln - 1; pnli++) pnlps.plus(pnli).setPtr(pnlps.plus(pnli + 1).getPtr()); triangulate(pnlps, pnln - 1); return; } } throw new IllegalStateException("libpath/%s:%d: %s\n" + "graphviz-2.38.0\\lib\\pathplan\\shortest.c" + 26 + ("triangulation failed")); } else loadtriangle(pnlps.plus(0).getPtr(), pnlps.plus(1).getPtr(), pnlps.plus(2).getPtr()); } finally { LEAVING("73cr7m3mqvtuotpzrmaw2y8zm","triangulate"); } } //3 72of3cd7shtwokglxapw04oe9 // static int isdiagonal(int pnli, int pnlip2, pointnlink_t ** pnlps, int pnln) public static boolean isdiagonal(int pnli, int pnlip2, __ptr__ pnlps, int pnln) { ENTERING("72of3cd7shtwokglxapw04oe9","isdiagonal"); try { int pnlip1, pnlim1, pnlj, pnljp1; boolean res; /* neighborhood test */ pnlip1 = (pnli + 1) % pnln; pnlim1 = (pnli + pnln - 1) % pnln; /* If P[pnli] is a convex vertex [ pnli+1 left of (pnli-1,pnli) ]. */ if (ccw(pnlps.plus(pnlim1).getPtr("pp"), pnlps.plus(pnli).getPtr("pp"), pnlps.plus(pnlip1).getPtr("pp")) == 1) res = (ccw(pnlps.plus(pnli).getPtr("pp"), pnlps.plus(pnlip2).getPtr("pp"), pnlps.plus(pnlim1).getPtr("pp")) == 1) && (ccw(pnlps.plus(pnlip2).getPtr("pp"), pnlps.plus(pnli).getPtr("pp"), pnlps.plus(pnlip1).getPtr("pp")) == 1); /* Assume (pnli - 1, pnli, pnli + 1) not collinear. */ else res = (ccw(pnlps.plus(pnli).getPtr("pp"), pnlps.plus(pnlip2).getPtr("pp"), pnlps.plus(pnlip1).getPtr("pp")) == 2); if (N(res)) return false; /* check against all other edges */ for (pnlj = 0; pnlj < pnln; pnlj++) { pnljp1 = (pnlj + 1) % pnln; if (N((pnlj == pnli) || (pnljp1 == pnli) || (pnlj == pnlip2) || (pnljp1 == pnlip2))) if (intersects(pnlps.plus(pnli).getPtr("pp"), pnlps.plus(pnlip2).getPtr("pp"), pnlps.plus(pnlj).getPtr("pp"), pnlps.plus(pnljp1).getPtr("pp"))) return false; } return ((N(false))); } finally { LEAVING("72of3cd7shtwokglxapw04oe9","isdiagonal"); } } //3 7vf9jtj9i8rg0cxrstbqswuck // static void loadtriangle(pointnlink_t * pnlap, pointnlink_t * pnlbp, pointnlink_t * pnlcp) public static void loadtriangle(__ptr__ pnlap, __ptr__ pnlbp, __ptr__ pnlcp) { ENTERING("7vf9jtj9i8rg0cxrstbqswuck","loadtriangle"); try { triangle_t trip; int ei; /* make space */ if (Z.z().tril >= Z.z().trin) growtris(Z.z().trin + 20); trip = (triangle_t) Z.z().tris.plus(Z.z().tril++); trip.setInt("mark", 0); trip.getArrayOfStruct("e").plus(0).getStruct().setPtr("pnl0p", pnlap); trip.getArrayOfStruct("e").plus(0).getStruct().setPtr("pnl1p", pnlbp); trip.getArrayOfStruct("e").plus(0).getStruct().setPtr("rtp", null); trip.getArrayOfStruct("e").plus(1).getStruct().setPtr("pnl0p", pnlbp); trip.getArrayOfStruct("e").plus(1).getStruct().setPtr("pnl1p", pnlcp); trip.getArrayOfStruct("e").plus(1).getStruct().setPtr("rtp", null); trip.getArrayOfStruct("e").plus(2).getStruct().setPtr("pnl0p", pnlcp); trip.getArrayOfStruct("e").plus(2).getStruct().setPtr("pnl1p", pnlap); trip.getArrayOfStruct("e").plus(2).getStruct().setPtr("rtp", null); for (ei = 0; ei < 3; ei++) trip.getArrayOfStruct("e").plus(ei).getStruct().setPtr("ltp", trip); } finally { LEAVING("7vf9jtj9i8rg0cxrstbqswuck","loadtriangle"); } } //3 6coujw0qksrgu5sxj0r39qm1u // static void connecttris(int tri1, int tri2) public static void connecttris(int tri1, int tri2) { ENTERING("6coujw0qksrgu5sxj0r39qm1u","connecttris"); try { triangle_t tri1p, tri2p; int ei, ej; for (ei = 0; ei < 3; ei++) { for (ej = 0; ej < 3; ej++) { tri1p = (triangle_t) Z.z().tris.plus(tri1); tri2p = (triangle_t) Z.z().tris.plus(tri2); if ((EQ(tri1p.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl0p").getPtr("pp"), tri2p.getArrayOfStruct("e").plus(ej).getStruct().getPtr("pnl0p").getPtr("pp")) && EQ(tri1p.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl1p").getPtr("pp"), tri2p.getArrayOfStruct("e").plus(ej).getStruct().getPtr("pnl1p").getPtr("pp"))) || (EQ(tri1p.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl0p").getPtr("pp"), tri2p.getArrayOfStruct("e").plus(ej).getStruct().getPtr("pnl1p").getPtr("pp")) && EQ(tri1p.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl1p").getPtr("pp"), tri2p.getArrayOfStruct("e").plus(ej).getStruct().getPtr("pnl0p").getPtr("pp")))) { tri1p.getArrayOfStruct("e").plus(ei).getStruct().setPtr("rtp", tri2p); tri2p.getArrayOfStruct("e").plus(ej).getStruct().setPtr("rtp", tri1p); } } } } finally { LEAVING("6coujw0qksrgu5sxj0r39qm1u","connecttris"); } } //3 3waxf5wy3mwt12wpg5hxg3o9c // static int marktripath(int trii, int trij) public static boolean marktripath(int trii, int trij) { ENTERING("3waxf5wy3mwt12wpg5hxg3o9c","marktripath"); try { int ei; if (Z.z().tris.plus(trii).getBoolean("mark")) return false; Z.z().tris.plus(trii).setInt("mark", 1); if (trii == trij) return ((!(false))); for (ei = 0; ei < 3; ei++) if (Z.z().tris.plus(trii).getArrayOfStruct("e").plus(ei).getStruct().getPtr("rtp")!=null && marktripath(Z.z().tris.plus(trii).getArrayOfStruct("e").plus(ei).getStruct().getPtr("rtp").minus(Z.z().tris), trij)) return ((!(false))); Z.z().tris.plus(trii).setInt("mark", 0); return false; } finally { LEAVING("3waxf5wy3mwt12wpg5hxg3o9c","marktripath"); } } //3 44szdl31mg8mt5qrfj70kb2sn // static void add2dq(int side, pointnlink_t * pnlp) public static void add2dq(int side, __ptr__ pnlp) { ENTERING("44szdl31mg8mt5qrfj70kb2sn","add2dq"); try { if (side == 1) { if (Z.z().dq.getInt("lpnlpi") - Z.z().dq.getInt("fpnlpi") >= 0) pnlp.setPtr("link", Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("fpnlpi")).getPtr()); /* shortest path links */ Z.z().dq.setInt("fpnlpi", Z.z().dq.getInt("fpnlpi")-1); Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("fpnlpi")).setPtr(pnlp); } else { if (Z.z().dq.getInt("lpnlpi") - Z.z().dq.getInt("fpnlpi") >= 0) pnlp.setPtr("link", Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("lpnlpi")).getPtr()); /* shortest path links */ Z.z().dq.setInt("lpnlpi", Z.z().dq.getInt("lpnlpi")+1); Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("lpnlpi")).setPtr(pnlp); } } finally { LEAVING("44szdl31mg8mt5qrfj70kb2sn","add2dq"); } } //3 572sssdz1se16w790xceiy5vr // static void splitdq(int side, int index) public static void splitdq(int side, int index) { ENTERING("572sssdz1se16w790xceiy5vr","splitdq"); try { if (side == 1) Z.z().dq.setInt("lpnlpi", index); else Z.z().dq.setInt("fpnlpi", index); } finally { LEAVING("572sssdz1se16w790xceiy5vr","splitdq"); } } //3 9dnrc8vqpffp5t3bmsackgqtl // static int finddqsplit(pointnlink_t * pnlp) public static int finddqsplit(pointnlink_t pnlp) { ENTERING("9dnrc8vqpffp5t3bmsackgqtl","finddqsplit"); try { int index; for (index = Z.z().dq.getInt("fpnlpi"); index < Z.z().dq.getInt("apex"); index++) if (ccw(Z.z().dq.getPtr("pnlps").plus(index + 1).getPtr().getPtr("pp"), Z.z().dq.getPtr("pnlps").plus(index).getPtr().getPtr("pp"), pnlp.getPtr("pp")) == 1) return index; for (index = Z.z().dq.getInt("lpnlpi"); index > Z.z().dq.getInt("apex"); index--) if (ccw(Z.z().dq.getPtr("pnlps").plus(index - 1).getPtr().getPtr("pp"), Z.z().dq.getPtr("pnlps").plus(index).getPtr().getPtr("pp"), pnlp.getPtr("pp")) == 2) return index; return Z.z().dq.getInt("apex"); } finally { LEAVING("9dnrc8vqpffp5t3bmsackgqtl","finddqsplit"); } } //3 72h03s8inxtto2ekvmuqjtj3d // static int ccw(Ppoint_t * p1p, Ppoint_t * p2p, Ppoint_t * p3p) public static int ccw(__ptr__ p1p, __ptr__ p2p, __ptr__ p3p) { ENTERING("72h03s8inxtto2ekvmuqjtj3d","ccw"); try { double d; d = ((p1p.getDouble("y") - p2p.getDouble("y")) * (p3p.getDouble("x") - p2p.getDouble("x"))) - ((p3p.getDouble("y") - p2p.getDouble("y")) * (p1p.getDouble("x") - p2p.getDouble("x"))); return (d > 0) ? 1 : ((d < 0) ? 2 : 3); } finally { LEAVING("72h03s8inxtto2ekvmuqjtj3d","ccw"); } } //3 22a9ajg9t8ovqsigk3tyu3rkd // static int intersects(Ppoint_t * pap, Ppoint_t * pbp, Ppoint_t * pcp, Ppoint_t * pdp) public static boolean intersects(__ptr__ pap, __ptr__ pbp, __ptr__ pcp, __ptr__ pdp) { ENTERING("22a9ajg9t8ovqsigk3tyu3rkd","intersects"); try { int ccw1, ccw2, ccw3, ccw4; if (ccw(pap, pbp, pcp) == 3 || ccw(pap, pbp, pdp) == 3 || ccw(pcp, pdp, pap) == 3 || ccw(pcp, pdp, pbp) == 3) { if (between(pap, pbp, pcp) || between(pap, pbp, pdp) || between(pcp, pdp, pap) || between(pcp, pdp, pbp)) return ((!(false))); } else { ccw1 = (ccw(pap, pbp, pcp) == 1) ? 1 : 0; ccw2 = (ccw(pap, pbp, pdp) == 1) ? 1 : 0; ccw3 = (ccw(pcp, pdp, pap) == 1) ? 1 : 0; ccw4 = (ccw(pcp, pdp, pbp) == 1) ? 1 : 0; return (ccw1 ^ ccw2)!=0 && (ccw3 ^ ccw4)!=0; } return false; } finally { LEAVING("22a9ajg9t8ovqsigk3tyu3rkd","intersects"); } } //3 uh5n18rzyevtb4cwpni70qpc // static int between(Ppoint_t * pap, Ppoint_t * pbp, Ppoint_t * pcp) public static boolean between(__ptr__ pap, __ptr__ pbp, __ptr__ pcp) { ENTERING("uh5n18rzyevtb4cwpni70qpc","between"); try { final __struct__ p1 = JUtils.from(pointf.class), p2 = JUtils.from(pointf.class); p1.setDouble("x", pbp.getDouble("x") - pap.getDouble("x")); p1.setDouble("y", pbp.getDouble("y") - pap.getDouble("y")); p2.setDouble("x", pcp.getDouble("x") - pap.getDouble("x")); p2.setDouble("y", pcp.getDouble("y") - pap.getDouble("y")); if (ccw(pap, pbp, pcp) != 3) return false; return (p2.getDouble("x") * p1.getDouble("x") + p2.getDouble("y") * p1.getDouble("y") >= 0) && (p2.getDouble("x") * p2.getDouble("x") + p2.getDouble("y") * p2.getDouble("y") <= p1.getDouble("x") * p1.getDouble("x") + p1.getDouble("y") * p1.getDouble("y")); } finally { LEAVING("uh5n18rzyevtb4cwpni70qpc","between"); } } //3 zti1mzm2m7tr2xwnbf7e8u3d // static int pointintri(int trii, Ppoint_t * pp) public static boolean pointintri(int trii, __ptr__ pp) { ENTERING("zti1mzm2m7tr2xwnbf7e8u3d","pointintri"); try { int ei, sum; for (ei = 0, sum = 0; ei < 3; ei++) if (ccw(Z.z().tris.plus(trii).getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl0p").getPtr("pp"), Z.z().tris.plus(trii).getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl1p").getPtr("pp"), pp) != 2) sum++; return (sum == 3 || sum == 0); } finally { LEAVING("zti1mzm2m7tr2xwnbf7e8u3d","pointintri"); } } //3 85wstb60jkjd0kbh9tyninm4h // static void growpnls(int newpnln) public static void growpnls(int newpnln) { ENTERING("85wstb60jkjd0kbh9tyninm4h","growpnls"); try { if (newpnln <= Z.z().pnln) return; if (N(Z.z().pnls)) { if (N(Z.z().pnls = (pointnlink_t) Memory.malloc(sizeof (pointnlink_t.class, newpnln)))) { UNSUPPORTED("9zyfc4bjg3i6rrna9vqf8doys"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot malloc pnls")); UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1); } if (N(Z.z().pnlps = Memory.malloc(sizeof_starstar_empty(pointnlink_t.class, newpnln)))) { UNSUPPORTED("1etar0wd2cbbvqo4jnmbvjiz4"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot malloc pnlps")); UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1); } } else { if (N(Z.z().pnls = (pointnlink_t) Memory.realloc(Z.z().pnls, sizeof (pointnlink_t.class, newpnln)))) { UNSUPPORTED("105nogpkt0qqut0yu4alvkk1u"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot realloc pnls")); UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1); } if (N(Z.z().pnlps = Memory.realloc(Z.z().pnlps, sizeof_starstar_empty(pointnlink_t.class, newpnln)))) { UNSUPPORTED("be84alh84ub40x4um989aj20d"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot realloc pnlps")); UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1); } } Z.z().pnln = newpnln; } finally { LEAVING("85wstb60jkjd0kbh9tyninm4h","growpnls"); } } //3 c5q8ult6w26jppe5ifzgcoq82 // static void growtris(int newtrin) public static void growtris(int newtrin) { ENTERING("c5q8ult6w26jppe5ifzgcoq82","growtris"); try { if (newtrin <= Z.z().trin) return; if (N(Z.z().tris)) { if (N(Z.z().tris = Memory.malloc(sizeof(triangle_t.class, newtrin)))) { UNSUPPORTED("5782e28cjpaa3dpf8up4zmtq7"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot malloc tris")); UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1); } } else { if (N(Z.z().tris = Memory.realloc(Z.z().tris, sizeof (triangle_t.class, newtrin)))) { UNSUPPORTED("d3fgu54pn5tydfhn7z73v73ra"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot realloc tris")); UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1); } } Z.z().trin = newtrin; } finally { LEAVING("c5q8ult6w26jppe5ifzgcoq82","growtris"); } } //3 bzym9u6dtatii1vp4hcmofc80 // static void growdq(int newdqn) public static void growdq(int newdqn) { ENTERING("bzym9u6dtatii1vp4hcmofc80","growdq"); try { if (newdqn <= Z.z().dq.getInt("pnlpn")) return; if (N(Z.z().dq.getPtr("pnlps"))) { if (N (Z.z().dq.setPtr("pnlps", (__ptr__) Memory.malloc(sizeof_starstar_empty(pointnlink_t.class, newdqn))))) { UNSUPPORTED("88fwpb40wz9jc8jiz7u032s4t"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot malloc dq.pnls")); UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1); } } else { if (N(Z.z().dq.setPtr("pnlps", (__ptr__) Memory.realloc(Z.z().dq.getPtr("pnlps"), sizeof_starstar_empty(pointnlink_t.class, newdqn))))) { UNSUPPORTED("exqx4ck7h15m8whgip6xpnhoo"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot realloc dq.pnls")); UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1); } } Z.z().dq.setInt("pnlpn", newdqn); } finally { LEAVING("bzym9u6dtatii1vp4hcmofc80","growdq"); } } //3 d7vtt8xqxbdnx9kwtt1zzof75 // static void growops(int newopn) public static void growops(int newopn) { ENTERING("d7vtt8xqxbdnx9kwtt1zzof75","growops"); try { if (newopn <= Z.z().opn_shortest) return; if (N(Z.z().ops_shortest)) { if (N(Z.z().ops_shortest = Memory.malloc(sizeof(pointf.class, newopn)))) { UNSUPPORTED("7wxgcgah7iy6vetj5yszoq4k4"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot malloc ops")); UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1); } } else { if (N(Z.z().ops_shortest = Memory.realloc(Z.z().ops_shortest, sizeof(pointf.class, newopn)))) { UNSUPPORTED("7azrdo5s3kc44taqmtmeu1s33"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot realloc ops")); UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1); } } Z.z().opn_shortest = newopn; } finally { LEAVING("d7vtt8xqxbdnx9kwtt1zzof75","growops"); } } } plantuml-1.2017.15/src/gen/lib/pathplan/shortestpth__c.java000066400000000000000000000153321312650303100234720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.pathplan; import static smetana.core.Macro.UNSUPPORTED; public class shortestpth__c { //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 7pb9zum2n4wlgil34lvh8i0ts // typedef double COORD //1 e75el5ykqd72ikokwkl7j2epc // typedef COORD **array2 //1 4lqn82dcexmb1ujfx7ciwkq7t // static COORD unseen = (double) INT_MAX //3 3vmsnhxv064fhv23juvb3901f // int *shortestPath(int root, int target, int V, array2 wadj) public static Object shortestPath(Object... arg) { UNSUPPORTED("ck9i1aidj3wocmwgkt8103ov9"); // int *shortestPath(int root, int target, int V, array2 wadj) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7q38vtznktnwi60z79t1yl7kn"); // int *dad; UNSUPPORTED("3n8lsf3bhkta5dw01y6dosbhw"); // COORD *vl; UNSUPPORTED("emjv9wq86wxaz1mkis592qedk"); // COORD *val; UNSUPPORTED("985nf8jew0zg19ydmlmarwyl1"); // int min; UNSUPPORTED("5tszi7ot461b5xrq7t6i2p9jw"); // int k, t; UNSUPPORTED("8lhpkwmemj4ejagiby4wce1tp"); // /* allocate arrays */ UNSUPPORTED("70ahd60yay9ycxlgxj1zuyqwk"); // dad = (int *) malloc(V * sizeof(int)); UNSUPPORTED("cwcxxkaw0opazqbubfd67ylkw"); // vl = (COORD *) malloc((V + 1) * sizeof(COORD)); /* One extra for sentinel */ UNSUPPORTED("30bnpu1p596ets2fp9d9fcuuo"); // val = vl + 1; UNSUPPORTED("6usgmh9di07cghsmczuausuqv"); // /* initialize arrays */ UNSUPPORTED("7s35obmd4mmmswain6cq6kjyz"); // for (k = 0; k < V; k++) { UNSUPPORTED("9g1fv9lo3mqgozp0hgspk0jfx"); // dad[k] = -1; UNSUPPORTED("3dfr2o54vzdz7ow35rvkkupwp"); // val[k] = -unseen; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6vvn9wwyfshecuati4wkh0hb1"); // val[-1] = -(unseen + (COORD) 1); /* Set sentinel */ UNSUPPORTED("ail1ie6r4omx0srfndd7uhkx8"); // min = root; UNSUPPORTED("8iguu5odqkwyske4dcuz2zh5c"); // /* use (min >= 0) to fill entire tree */ UNSUPPORTED("3b9mo25ltl9ubqm9ptv305emr"); // while (min != target) { UNSUPPORTED("37uwanwupwkgvkiatkocsnwmi"); // k = min; UNSUPPORTED("2yk23r7ym8txau8t7w94um5l9"); // val[k] *= -1; UNSUPPORTED("d8r99m4cpfcmbygzpwrb87waf"); // min = -1; UNSUPPORTED("99ykmzy96436vip14lubfa2jo"); // if (val[k] == unseen) UNSUPPORTED("9vb74y52jxvq4iptd1w4dewnu"); // val[k] = 0; UNSUPPORTED("45pfcyfo86ei9srti6g0iz6xo"); // for (t = 0; t < V; t++) { UNSUPPORTED("didw0ewjf6uo68oewapzly1rv"); // if (val[t] < 0) { UNSUPPORTED("ekeykiipkt1z2a3sn2ilt5gx7"); // COORD newpri; UNSUPPORTED("bczxeah6ns9u23ey094g25kjz"); // COORD wkt; UNSUPPORTED("cctfdc4m6tunpeulyd30cbdma"); // /* Use lower triangle */ UNSUPPORTED("akz9x35nrpcyklhz1a227a4xh"); // if (k >= t) UNSUPPORTED("6cx7tblgrev9yzb4ppafglzh7"); // wkt = wadj[k][t]; UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("bbx44cas4y4rgf8fnytgoavog"); // wkt = wadj[t][k]; UNSUPPORTED("2p64h5oxifdj0iau4zuiebitc"); // newpri = -(val[k] + wkt); UNSUPPORTED("1skepgmjhmtk882tbnh0ny10o"); // if ((wkt != 0) && (val[t] < newpri)) { UNSUPPORTED("73wirchpqpajql6a751nimkyu"); // val[t] = newpri; UNSUPPORTED("4hhrf0py8taqfmqeg3uvrx081"); // dad[t] = k; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("98nv5m3wkh33gdi3z4vns4n4k"); // if (val[t] > val[min]) UNSUPPORTED("cpb83eu6rulsmbhc2rwsi9i5l"); // min = t; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("yxn5pc6i3jmimfvzmmhfotak"); // free(vl); UNSUPPORTED("60tomuwdovbmgh94zzb3yeqib"); // return dad; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eb1kiq1ildiyme0qn3xszjyvk // int *makePath(Ppoint_t p, int pp, COORD * pvis, Ppoint_t q, int qp, COORD * qvis, vconfig_t * conf) public static Object makePath(Object... arg) { UNSUPPORTED("2jth0bos9lrgk2xi5083p5rvp"); // int *makePath(Ppoint_t p, int pp, COORD * pvis, UNSUPPORTED("a6dn81zxyfp9ydvajebmx15wt"); // Ppoint_t q, int qp, COORD * qvis, vconfig_t * conf) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9e683sch2jealt2ckz48v9f0j"); // int V = conf->N; UNSUPPORTED("5ykvw66ec1v4dm5wm0ujsfgt9"); // if (directVis(p, pp, q, qp, conf)) { UNSUPPORTED("8y9o9xskc3crv3uecpyrsdakg"); // int *dad = (int *) malloc(sizeof(int) * (V + 2)); UNSUPPORTED("7oo70ckt9z1mf09uljyji5zud"); // dad[V] = V + 1; UNSUPPORTED("3akorfrpmzhjtlnjmmos6z20q"); // dad[V + 1] = -1; UNSUPPORTED("7x27015v5wfafitei6hpx0rii"); // return dad; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("946fxixcelejjif01eiioqduy"); // array2 wadj = conf->vis; UNSUPPORTED("5ynkls19r2ylvtzz36h6vjy0t"); // wadj[V] = qvis; UNSUPPORTED("a8gy96zl4x1lwid18nfp48pbm"); // wadj[V + 1] = pvis; UNSUPPORTED("1fm1wr69gee2idjkv025ovvwh"); // return (shortestPath(V + 1, V, V + 2, wadj)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/pathplan/solvers__c.java000066400000000000000000000113611312650303100225760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.pathplan; import static smetana.core.JUtils.atan2; import static smetana.core.JUtils.cos; import static smetana.core.JUtils.pow; import static smetana.core.JUtils.sqrt; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; public class solvers__c { //3 2rap7a11ad4ugnphkh9gbn4xl // int solve3(double *coeff, double *roots) public static int solve3(double coeff[], double roots[]) { ENTERING("2rap7a11ad4ugnphkh9gbn4xl","solve3"); try { double a, b, c, d; int rootn, i; double p, q, disc, b_over_3a, c_over_a, d_over_a; double r, theta, temp, alpha, beta; a = coeff[3]; b = coeff[2]; c = coeff[1]; d = coeff[0]; if ((((a) < 1E-7) && ((a) > -1E-7))) return solve2(coeff, roots); b_over_3a = b / (3 * a); c_over_a = c / a; d_over_a = d / a; p = b_over_3a * b_over_3a; q = 2 * b_over_3a * p - b_over_3a * c_over_a + d_over_a; p = c_over_a / 3 - p; disc = q * q + 4 * p * p * p; if (disc < 0) { r = .5 * sqrt(-disc + q * q); theta = atan2(sqrt(-disc), -q); temp = 2 * ((r < 0) ? (-1*pow(-r, 1.0/3.0)) : pow (r, 1.0/3.0)); roots[0] = temp * cos(theta / 3); roots[1] = temp * cos((theta + 3.14159265358979323846 + 3.14159265358979323846) / 3); roots[2] = temp * cos((theta - 3.14159265358979323846 - 3.14159265358979323846) / 3); rootn = 3; } else { alpha = .5 * (sqrt(disc) - q); beta = -q - alpha; roots[0] = ((alpha < 0) ? (-1*pow(-alpha, 1.0/3.0)) : pow (alpha, 1.0/3.0)) + ((beta < 0) ? (-1*pow(-beta, 1.0/3.0)) : pow (beta, 1.0/3.0)); if (disc > 0) rootn = 1; else {roots[1] = roots[2] = -.5 * roots[0]; rootn = 3;} } for (i = 0; i < rootn; i++) roots[i] -= b_over_3a; return rootn; } finally { LEAVING("2rap7a11ad4ugnphkh9gbn4xl","solve3"); } } //3 9b5238tdddphds1x726z0osdm // int solve2(double *coeff, double *roots) public static int solve2(double coeff[], double roots[]) { ENTERING("9b5238tdddphds1x726z0osdm","solve2"); try { double a, b, c; double disc, b_over_2a, c_over_a; a = coeff[2]; b = coeff[1]; c = coeff[0]; if ((((a) < 1E-7) && ((a) > -1E-7))) return solve1(coeff, roots); b_over_2a = b / (2 * a); c_over_a = c / a; disc = b_over_2a * b_over_2a - c_over_a; if (disc < 0) return 0; else if (disc == 0) { roots[0] = -b_over_2a; return 1; } else { roots[0] = -b_over_2a + sqrt(disc); roots[1] = -2 * b_over_2a - roots[0]; return 2; } } finally { LEAVING("9b5238tdddphds1x726z0osdm","solve2"); } } //3 8xtqt7j6wyxc1b6tj0qtcu1rd // int solve1(double *coeff, double *roots) public static int solve1(double coeff[], double roots[]) { ENTERING("8xtqt7j6wyxc1b6tj0qtcu1rd","solve1"); try { double a, b; a = coeff[1]; b = coeff[0]; if ((((a) < 1E-7) && ((a) > -1E-7))) { if ((((b) < 1E-7) && ((b) > -1E-7))) return 4; else return 0; } roots[0] = -b / a; return 1; } finally { LEAVING("8xtqt7j6wyxc1b6tj0qtcu1rd","solve1"); } } } plantuml-1.2017.15/src/gen/lib/pathplan/triang__c.java000066400000000000000000000272541312650303100223750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.pathplan; import static smetana.core.Macro.UNSUPPORTED; import smetana.core.jmp_buf; public class triang__c { //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 7pb9zum2n4wlgil34lvh8i0ts // typedef double COORD //1 540u5gu9i0x1wzoxqqx5n2vwp // static jmp_buf jbuf private static jmp_buf jbuf = new jmp_buf(); //3 9l5xg5aowmh2yvhbzseo8ws0i // static int dpd_ccw(Ppoint_t * p1, Ppoint_t * p2, Ppoint_t * p3) public static Object dpd_ccw(Object... arg) { UNSUPPORTED("66u8hjpmzz1u1podxvft7tqbr"); // static int dpd_ccw(Ppoint_t * p1, Ppoint_t * p2, Ppoint_t * p3) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8l4kygp6iwsssqf4pip9kt8ih"); // double d = UNSUPPORTED("a5i2lyqa3iblrijf5i8d2gc2l"); // ((p1->y - p2->y) * (p3->x - p2->x)) - UNSUPPORTED("8vxxbchvixjdl9bnn73jj0ken"); // ((p3->y - p2->y) * (p1->x - p2->x)); UNSUPPORTED("2duek0l6qi5enj1p52uzx935s"); // return (d > 0) ? 2 : ((d < 0) ? 1 : 3); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3cpm045bql7do4skuvm0gysbz // int Ptriangulate(Ppoly_t * polygon, void (*fn) (void *, Ppoint_t *), void *vc) public static Object Ptriangulate(Object... arg) { UNSUPPORTED("9wq0zzi4wsqf1qmh5lisb5tur"); // int Ptriangulate(Ppoly_t * polygon, void (*fn) (void *, Ppoint_t *), UNSUPPORTED("aiup6hqt7vuonmdnhtadcpyyg"); // void *vc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("79ig2xj5nogd41esx7798m82t"); // int pointn; UNSUPPORTED("vbp57y34yrr1stscac6ij6wl"); // Ppoint_t **pointp; UNSUPPORTED("8i4e5opqy9uomak4ow0vdfkyu"); // pointn = polygon->pn; UNSUPPORTED("c7ts682vzzct8ooh1x4u7zy09"); // pointp = (Ppoint_t **) malloc(pointn * sizeof(Ppoint_t *)); UNSUPPORTED("69msjv91b63ali4jnpa1iae96"); // for (i = 0; i < pointn; i++) UNSUPPORTED("66ykefpx20ohahuts3stdhpv4"); // pointp[i] = &(polygon->ps[i]); UNSUPPORTED("ci9r8sj8tbc6yer5c8cebb0cm"); // if (setjmp(jbuf)) { UNSUPPORTED("1hfjyk5uqecl2hrvu9vdplqm9"); // free(pointp); UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3epdv4rxh1dblgm1uu3cirnns"); // triangulate(pointp, pointn, fn, vc); UNSUPPORTED("d7eui8n8t6ty33reomekpb4uy"); // free(pointp); UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 db1gjkgbhdyik8njcwxidnm06 // static void triangulate(Ppoint_t ** pointp, int pointn, void (*fn) (void *, Ppoint_t *), void *vc) public static Object triangulate(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("cycr5htq0awpt4lysrda94z75"); // triangulate(Ppoint_t ** pointp, int pointn, UNSUPPORTED("b80kmvbhu4qon4ithxw7iqghl"); // void (*fn) (void *, Ppoint_t *), void *vc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("47im1y8cb3jov8e7vfoq6976"); // int i, ip1, ip2, j; UNSUPPORTED("9vrtuc7i6xtgewghaf5mhcvw7"); // Ppoint_t A[3]; UNSUPPORTED("exebh5u9jcrlenwyhvh1q7ydp"); // if (pointn > 3) { UNSUPPORTED("17s2by4i08aiirk34qoufejm1"); // for (i = 0; i < pointn; i++) { UNSUPPORTED("4s8abivdx5zru8lby110pnbr0"); // ip1 = (i + 1) % pointn; UNSUPPORTED("el7eqg9364rd6m2jmmgd1x0w6"); // ip2 = (i + 2) % pointn; UNSUPPORTED("eugvvlona15w69kyxc7uao5rn"); // if (dpd_isdiagonal(i, ip2, pointp, pointn)) { UNSUPPORTED("7jt096yrjcjaka77bxj8ow4ur"); // A[0] = *pointp[i]; UNSUPPORTED("798zfru1x3zjftqir7h3184cy"); // A[1] = *pointp[ip1]; UNSUPPORTED("5sabp0m6pi8misjllge9rhs6i"); // A[2] = *pointp[ip2]; UNSUPPORTED("3tx9m6zu4gpdon7itam4m4zj6"); // fn(vc, A); UNSUPPORTED("cwdl8048erup925vkw9wm50tm"); // j = 0; UNSUPPORTED("b406sjxectwut71daq5renp3v"); // for (i = 0; i < pointn; i++) UNSUPPORTED("17mmkxxi6uyt2rtn26wqpnjq0"); // if (i != ip1) UNSUPPORTED("20nocric7p5rwm1keba2y9u9s"); // pointp[j++] = pointp[i]; UNSUPPORTED("f1yvgmqdgpzz2ld9mihtb1ny6"); // triangulate(pointp, pointn - 1, fn, vc); UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("efu63j23oynz0w42y5x2ccgl"); // longjmp(jbuf,1); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("du12jp7y7eb3k2lzktkq97ocv"); // A[0] = *pointp[0]; UNSUPPORTED("3zxe87agbrkgcdv3ezmeb4e0r"); // A[1] = *pointp[1]; UNSUPPORTED("7kqa9p0bujx0a7qu7g0l8u5gf"); // A[2] = *pointp[2]; UNSUPPORTED("4a2pon3qy0ncl805797s5a1cg"); // fn(vc, A); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6g3z4d4wjf8de2l784sgpmmol // static int dpd_isdiagonal(int i, int ip2, Ppoint_t ** pointp, int pointn) public static Object dpd_isdiagonal(Object... arg) { UNSUPPORTED("6igaattr8mose3ux86cjxqy8f"); // static int dpd_isdiagonal(int i, int ip2, Ppoint_t ** pointp, int pointn) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("i2fy680j9sex9dnpbrntxl4b"); // int ip1, im1, j, jp1, res; UNSUPPORTED("5lvzmrs5o783t9b2alzlkj6uq"); // /* neighborhood test */ UNSUPPORTED("9eqc4ewd8x2tb2o7676bqvzbk"); // ip1 = (i + 1) % pointn; UNSUPPORTED("7uaqndtt8y6wd5jenwxduolym"); // im1 = (i + pointn - 1) % pointn; UNSUPPORTED("e4zga3b8zozs44qyy6bccq35q"); // /* If P[i] is a convex vertex [ i+1 left of (i-1,i) ]. */ UNSUPPORTED("6rxb1urly3d45lz9xrdat9rjc"); // if (dpd_ccw(pointp[im1], pointp[i], pointp[ip1]) == 1) UNSUPPORTED("1h8m3wqaqis9j4awgexj22ljg"); // res = (dpd_ccw(pointp[i], pointp[ip2], pointp[im1]) == 1) && UNSUPPORTED("54snmiylw2hrwv7yf250ut7kk"); // (dpd_ccw(pointp[ip2], pointp[i], pointp[ip1]) == 1); UNSUPPORTED("f2vywip5w6wo2ku9n219qyc0t"); // /* Assume (i - 1, i, i + 1) not collinear. */ UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("8s457vlt2s8q2dv1carkz8jw1"); // res = ((dpd_ccw(pointp[i], pointp[ip2], pointp[ip1]) == 2) UNSUPPORTED("5lgnvc71rkx0ldj6euv5vtcsr"); // ); UNSUPPORTED("4v614d3uabme2jyn0anuritbb"); // /* UNSUPPORTED("71hkfc5n8im1y698xlsrhbyp5"); // && UNSUPPORTED("axkcv4kehdkqwxnlh4284iio4"); // (dpd_ccw (pointp[ip2], pointp[i], pointp[im1]) != ISCW)); UNSUPPORTED("bnetqzovnscxile7ao44kc0qd"); // */ UNSUPPORTED("6o97tfdzw11zrs51pped6bix"); // if (!res) { UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bsnnstj5ry3f53yyx6h80if6r"); // /* check against all other edges */ UNSUPPORTED("2eknpu2grk40zpq5rvl1rsf0e"); // for (j = 0; j < pointn; j++) { UNSUPPORTED("7j38zwxm4hyg9g5fi62sr5dz6"); // jp1 = (j + 1) % pointn; UNSUPPORTED("7cqino9kvp1bszwsv2z4zllv1"); // if (!((j == i) || (jp1 == i) || (j == ip2) || (jp1 == ip2))) UNSUPPORTED("attqyhhvmboobjbl2qf7l6hk1"); // if (dpd_intersects UNSUPPORTED("43hv90vngw3gvon8vmtn7o3in"); // (pointp[i], pointp[ip2], pointp[j], pointp[jp1])) { UNSUPPORTED("5izxoao5ryte71964f8yjfd5y"); // return 0; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2mmsh4mer8e3bkt2jk4gf4cyq"); // return ((!(0))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8pjte4rru806nqx2myxn2h8tn // static int dpd_intersects(Ppoint_t * pa, Ppoint_t * pb, Ppoint_t * pc, Ppoint_t * pd) public static Object dpd_intersects(Object... arg) { UNSUPPORTED("b7u1jnesjd68hfofduzpr4qf0"); // static int dpd_intersects(Ppoint_t * pa, Ppoint_t * pb, Ppoint_t * pc, UNSUPPORTED("def51j09bielz8iq0blza86vg"); // Ppoint_t * pd) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9nscw3h7ol3rzfhy7cmityo7h"); // int ccw1, ccw2, ccw3, ccw4; UNSUPPORTED("98ug1zrydddu1pwy2oplua9u6"); // if (dpd_ccw(pa, pb, pc) == 3 || dpd_ccw(pa, pb, pd) == 3 || UNSUPPORTED("4cfcl9frsb20o33zdgi2pm67u"); // dpd_ccw(pc, pd, pa) == 3 || dpd_ccw(pc, pd, pb) == 3) { UNSUPPORTED("48qgrwlmwsf461u8tcizu96zg"); // if (dpd_between(pa, pb, pc) || dpd_between(pa, pb, pd) || UNSUPPORTED("64gna5xeh3ex4eoernwe8f797"); // dpd_between(pc, pd, pa) || dpd_between(pc, pd, pb)) UNSUPPORTED("a56gc2zenjhptik6h3r86au9x"); // return ((!(0))); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("345wiq942wt8egchavxisiate"); // ccw1 = (dpd_ccw(pa, pb, pc) == 1) ? 1 : 0; UNSUPPORTED("8ss56vnafb15h2m5amgdjkdeo"); // ccw2 = (dpd_ccw(pa, pb, pd) == 1) ? 1 : 0; UNSUPPORTED("281uxj8f020cd62tq8wnntaf6"); // ccw3 = (dpd_ccw(pc, pd, pa) == 1) ? 1 : 0; UNSUPPORTED("9u7kvtaa6q6nms4h93wl3llei"); // ccw4 = (dpd_ccw(pc, pd, pb) == 1) ? 1 : 0; UNSUPPORTED("e8shba3pxorddpi51sfeac4ju"); // return (ccw1 ^ ccw2) && (ccw3 ^ ccw4); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 coo3dmcddl2hcgc5gprzj3xtf // static int dpd_between(Ppoint_t * pa, Ppoint_t * pb, Ppoint_t * pc) public static Object dpd_between(Object... arg) { UNSUPPORTED("8i6slq3k2lvso1osulneg0qfd"); // static int dpd_between(Ppoint_t * pa, Ppoint_t * pb, Ppoint_t * pc) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("42b52ogcufv0s2qul8bwyz1mc"); // Ppoint_t pba, pca; UNSUPPORTED("71f5gd0n8v9s3kgph6iiqu4xl"); // pba.x = pb->x - pa->x, pba.y = pb->y - pa->y; UNSUPPORTED("8grh7ovfy0h3pcie2b7bxoxf9"); // pca.x = pc->x - pa->x, pca.y = pc->y - pa->y; UNSUPPORTED("ajkxh6482351n4hst9pf3sajt"); // if (dpd_ccw(pa, pb, pc) != 3) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("e461rpw0ig3rd1xwxn9quym9h"); // return (pca.x * pba.x + pca.y * pba.y >= 0) && UNSUPPORTED("2nprox8kgwp76fqf186ca4l78"); // (pca.x * pca.x + pca.y * pca.y <= pba.x * pba.x + pba.y * pba.y); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/pathplan/util__c.java000066400000000000000000000166101312650303100220600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.pathplan; import static smetana.core.Macro.UNSUPPORTED; public class util__c { //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 7pb9zum2n4wlgil34lvh8i0ts // typedef double COORD //3 carluwds75s8h206m05m74b3h // Ppoly_t copypoly(Ppoly_t argpoly) public static Object copypoly(Object... arg) { UNSUPPORTED("98pcxyqxy9rpxukga9lzhom1l"); // Ppoly_t copypoly(Ppoly_t argpoly) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dzef9h5fvxtkk8wkn4kn0edc"); // Ppoly_t rv; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("cd3pkstbs6ds3ufjvrms7zt87"); // rv.pn = argpoly.pn; UNSUPPORTED("7h1rkca2bkbjau89uq44bj6rc"); // rv.ps = malloc(sizeof(Ppoint_t) * argpoly.pn); UNSUPPORTED("bc26n5uxrnb6d5gdge4vsdufw"); // for (i = 0; i < argpoly.pn; i++) UNSUPPORTED("extja5g4z7gbi72cffs9hjfkz"); // rv.ps[i] = argpoly.ps[i]; UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 74f2l3kbysoz1jx37ybw786si // void freePath(Ppolyline_t* p) public static Object freePath(Object... arg) { UNSUPPORTED("arisensk81s44uevsoenjkx4k"); // void freePath(Ppolyline_t* p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4wfnv6rzlk455oiie96g1328x"); // free(p->ps); UNSUPPORTED("bo0y3vz195pcz24vm46pixpb2"); // free(p); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b1oegen4vbhrooizaesj0qbc4 // void freepoly(Ppoly_t argpoly) public static Object freepoly(Object... arg) { UNSUPPORTED("37smh22suphf2psfo815rvfa5"); // void freepoly(Ppoly_t argpoly) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("evt1iow9xd0lxmcp9o1ystvr4"); // free(argpoly.ps); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4lkt0le495f2sbojevq677n62 // int Ppolybarriers(Ppoly_t ** polys, int npolys, Pedge_t ** barriers, int *n_barriers) public static Object Ppolybarriers(Object... arg) { UNSUPPORTED("6tzncqs5o5i3rjuimqmwkco8c"); // int Ppolybarriers(Ppoly_t ** polys, int npolys, Pedge_t ** barriers, UNSUPPORTED("1ciabmjyrm3si7ov5e2nq2yre"); // int *n_barriers) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("l9iv7kwx0qdqzyzbm9jzmoeh"); // Ppoly_t pp; UNSUPPORTED("ri456px9wye6dag9hjrx9igj"); // int i, j, k, n, b; UNSUPPORTED("3qifo11sfcapaabkt29qxeyf3"); // Pedge_t *bar; UNSUPPORTED("5479ingjjk6qn2seps3k0btka"); // n = 0; UNSUPPORTED("7hu2o6gt6a1x3hz06uqj88mvq"); // for (i = 0; i < npolys; i++) UNSUPPORTED("770fj3pnbv37giif1b0tfjafy"); // n = n + polys[i]->pn; UNSUPPORTED("67tf52l267s83r3u3t4vz2fb3"); // bar = malloc(n * sizeof(Pedge_t)); UNSUPPORTED("5bkjzlhrfwudnhdqvgcum89jk"); // b = 0; UNSUPPORTED("409l75vikw9qauilz9d2vztce"); // for (i = 0; i < npolys; i++) { UNSUPPORTED("ct16i4ubqpsg61cvvo21el407"); // pp = *polys[i]; UNSUPPORTED("86ht42bn8i5wfk2joxg3g8876"); // for (j = 0; j < pp.pn; j++) { UNSUPPORTED("x1ux3l93pwkw8ri2200m18g7"); // k = j + 1; UNSUPPORTED("e103u6wglmn9dhi7e4a4okoz9"); // if (k >= pp.pn) UNSUPPORTED("c4bsmdfnwwk5rcxfmp596kqdg"); // k = 0; UNSUPPORTED("elv4yjqfsvkrgr9w336r9pnqp"); // bar[b].a = pp.ps[j]; UNSUPPORTED("98pws89dkn1po2vhy5by2fbxx"); // bar[b].b = pp.ps[k]; UNSUPPORTED("7vp6sv54f23ddwn8k74yzt98"); // b++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("d5kgqcba92v9u40uo4kdwuexd"); // assert(b == n); UNSUPPORTED("16w4tlbc3naryaamw0wn6jfip"); // *barriers = bar; UNSUPPORTED("brj70oj6k1scg3kfvjtk13idx"); // *n_barriers = n; UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ct6tszngugakbl42zkaqrt7p1 // void make_polyline(Ppolyline_t line, Ppolyline_t* sline) public static Object make_polyline(Object... arg) { UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void UNSUPPORTED("caslgp07xc1rz7m4io9o6y06u"); // make_polyline(Ppolyline_t line, Ppolyline_t* sline) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("69kg050pehcqgm1vozba79nx6"); // static int isz = 0; UNSUPPORTED("4fjyhrgkxtd8bira8nmu5i8b3"); // static Ppoint_t* ispline = 0; UNSUPPORTED("dzpsknrwv8qkqq20hjnjpjn68"); // int i, j; UNSUPPORTED("93m2yes5av2bhu9cbgdvgao05"); // int npts = 4 + 3*(line.pn-2); UNSUPPORTED("c0tj1d84o2ebjy9ke6sgke9m8"); // if (npts > isz) { UNSUPPORTED("av96wgpkd1n2udjlb9h7j3y3y"); // ispline = (ispline? (Ppoint_t*)realloc(ispline,(npts)*sizeof(Ppoint_t)):(Ppoint_t*)malloc((npts)*sizeof(Ppoint_t))); UNSUPPORTED("ehmbnzpsz0najunz7f2xuutcf"); // isz = npts; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cjbplkbp2r33l9lxd9f4plw8q"); // j = i = 0; UNSUPPORTED("3sl38lopto9lxrp6b54bo2mp9"); // ispline[j+1] = ispline[j] = line.ps[i]; UNSUPPORTED("1jxyp8hw11938jx60dm71z97j"); // j += 2; UNSUPPORTED("6xu6l640dwkn7142pwdqqinwh"); // i++; UNSUPPORTED("73ap4ch7ov640gtez9np1qdy"); // for (; i < line.pn-1; i++) { UNSUPPORTED("9mzuffh5epf8o14tph3qhs6bb"); // ispline[j+2] = ispline[j+1] = ispline[j] = line.ps[i]; UNSUPPORTED("b6bx299910tris4yhn65it5di"); // j += 3; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3sl38lopto9lxrp6b54bo2mp9"); // ispline[j+1] = ispline[j] = line.ps[i]; UNSUPPORTED("1m0hhl8du9lwz0vqvit6zf4cv"); // sline->pn = npts; UNSUPPORTED("bsi255abbfm738aeiyf2i04u8"); // sline->ps = ispline; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/pathplan/visibility__c.java000066400000000000000000000523201312650303100232700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.pathplan; import static smetana.core.Macro.UNSUPPORTED; public class visibility__c { //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 7pb9zum2n4wlgil34lvh8i0ts // typedef double COORD //1 e75el5ykqd72ikokwkl7j2epc // typedef COORD **array2 //3 bsczl8sh39sr9x8mdrdw934gc // static array2 allocArray(int V, int extra) public static Object allocArray(Object... arg) { UNSUPPORTED("2ep0t1ji7dax5248t02u6t7r6"); // static array2 allocArray(int V, int extra) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("6advqmqfqum2lcm4ln3micrah"); // array2 arr; UNSUPPORTED("37gilvazosxkc28mj73rooar1"); // COORD *p; UNSUPPORTED("8o8ej4mv7ezjz8fiws88yzo9q"); // arr = (COORD **) malloc((V + extra) * sizeof(COORD *)); UNSUPPORTED("e510sd0tpqggpavb3qj1c1qxt"); // p = (COORD *) calloc(V * V, sizeof(COORD)); UNSUPPORTED("95d7bboanqosxp7ljja94xzf3"); // for (i = 0; i < V; i++) { UNSUPPORTED("cpb0ooq9n5nzvgd12sa7ws9h"); // arr[i] = p; UNSUPPORTED("54buizub47gj1g6rqqp2nuxm"); // p += V; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dbbu9u15v89j269ghj0n14aj4"); // for (i = V; i < V + extra; i++) UNSUPPORTED("w0dpyxz5clv9ki0kuw7rzfn7"); // arr[i] = (COORD *) 0; UNSUPPORTED("ccsfhshi4ig5z5la1ju1x9cnc"); // return arr; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dlr6qgzk1zg621iotphi6ibd8 // COORD area2(Ppoint_t a, Ppoint_t b, Ppoint_t c) public static Object area2(Object... arg) { UNSUPPORTED("955niwvmnzworzojvwdpapmof"); // COORD area2(Ppoint_t a, Ppoint_t b, Ppoint_t c) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("57vegsifiuko417qaa6szlm9n"); // return ((a.y - b.y) * (c.x - b.x) - (c.y - b.y) * (a.x - b.x)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 vt0jebecnhaqax0chaict0yw // int wind(Ppoint_t a, Ppoint_t b, Ppoint_t c) public static Object wind(Object... arg) { UNSUPPORTED("7zwv4pv8g3dirkozmn0fe34z8"); // int wind(Ppoint_t a, Ppoint_t b, Ppoint_t c) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4ecssyhacl2ayvt0ote07teaw"); // COORD w; UNSUPPORTED("5wu3j9ks9mimt6j7joxxnq9ia"); // w = ((a.y - b.y) * (c.x - b.x) - (c.y - b.y) * (a.x - b.x)); UNSUPPORTED("es8qrkgjbswwyq90zllvcxwnh"); // /* need to allow for small math errors. seen with "gcc -O2 -mcpu=i686 -ffast-math" */ UNSUPPORTED("dzqusvkt2ejo97ycithiv2ucf"); // return (w > .0001) ? 1 : ((w < -.0001) ? -1 : 0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3zfwfpss5ea581xa4wtms7rxv // int inBetween(Ppoint_t a, Ppoint_t b, Ppoint_t c) public static Object inBetween(Object... arg) { UNSUPPORTED("dnvtojgefs45udqxtt80ifsxm"); // int inBetween(Ppoint_t a, Ppoint_t b, Ppoint_t c) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9retom1yv4wpdu31f7jsiae8d"); // if (a.x != b.x) /* not vertical */ UNSUPPORTED("7bptnkdfcpj5jr3mniv8eq3tl"); // return (((a.x < c.x) && (c.x < b.x)) UNSUPPORTED("1v7hun84nlrv6wqpwv4dlqlxu"); // || ((b.x < c.x) && (c.x < a.x))); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("d2izj3dk2mx1gese9uwrde73a"); // return (((a.y < c.y) && (c.y < b.y)) UNSUPPORTED("ey5cvegw2q4qz6328omtt2frt"); // || ((b.y < c.y) && (c.y < a.y))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 79f7jjxrrdgo9l858v24xof7v // int intersect(Ppoint_t a, Ppoint_t b, Ppoint_t c, Ppoint_t d) public static Object intersect(Object... arg) { UNSUPPORTED("roqgz6tihjg6s1lbmr0j6phx"); // int intersect(Ppoint_t a, Ppoint_t b, Ppoint_t c, Ppoint_t d) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5ak23ep8c08cwpy4ro73kg6a9"); // int a_abc; UNSUPPORTED("pkbc2911eqdxi3q3oig9iggz"); // int a_abd; UNSUPPORTED("3x6q0p7p8vp6n3xuz68aqyi2z"); // int a_cda; UNSUPPORTED("2nckaq0hwjy642bs8wytfrvzc"); // int a_cdb; UNSUPPORTED("dh0rdktbccsux65trza0p1ex0"); // a_abc = wind(a, b, c); UNSUPPORTED("8rg4ptpwwdazrael76ersibnj"); // if ((a_abc == 0) && inBetween(a, b, c)) { UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("65kyqogr1qwpdj4vzqhqdovjx"); // a_abd = wind(a, b, d); UNSUPPORTED("f2bfktdr6qjmqrr2o4ngzp8hs"); // if ((a_abd == 0) && inBetween(a, b, d)) { UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("54toimzvo18mzs7vfnqvnumln"); // a_cda = wind(c, d, a); UNSUPPORTED("7qvzemgdibqwxezutu4es8otb"); // a_cdb = wind(c, d, b); UNSUPPORTED("4cp5ufnxuyvb9bthje52yijlm"); // /* True if c and d are on opposite sides of ab, UNSUPPORTED("4k1c3jig81qg0as8woji48ew9"); // * and a and b are on opposite sides of cd. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("d581gmneeqsqn2uql7i5toff3"); // return (((a_abc * a_abd) < 0) && ((a_cda * a_cdb) < 0)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 897fne6m7yp6g1skatrohstqd // static int in_cone(Ppoint_t a0, Ppoint_t a1, Ppoint_t a2, Ppoint_t b) public static Object in_cone(Object... arg) { UNSUPPORTED("6k9z11o3eut4ihkvof27ionw4"); // static int in_cone(Ppoint_t a0, Ppoint_t a1, Ppoint_t a2, Ppoint_t b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("azst6m11c18syon6lwf1d36gq"); // int m = wind(b, a0, a1); UNSUPPORTED("edizv9dcv0vkkp4l4vuw7k97r"); // int p = wind(b, a1, a2); UNSUPPORTED("6b5qii4lexve7f52xqb76yfuj"); // if (wind(a0, a1, a2) > 0) UNSUPPORTED("eav3el0uo07672rpa2kyd0uge"); // return (m >= 0 && p >= 0); /* convex at a */ UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("21ufwcoiy0fe6t0dog8u1mgyb"); // return (m >= 0 || p >= 0); /* reflex at a */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bo8ti3cpgvbanj1uzsm9c1bhe // COORD dist2(Ppoint_t a, Ppoint_t b) public static Object dist2(Object... arg) { UNSUPPORTED("blrxs1tia575ecxgyj1t3xyzr"); // COORD dist2(Ppoint_t a, Ppoint_t b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("p0k98xc3wk6x7in7sehd5dyh"); // COORD delx = a.x - b.x; UNSUPPORTED("bw95b7u6pyi3v7wyz9gln4uus"); // COORD dely = a.y - b.y; UNSUPPORTED("c07ue20s75ggd0htt7g0ow5sh"); // return (delx * delx + dely * dely); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e6i8sjhx5klba13ifnde18uay // static COORD dist(Ppoint_t a, Ppoint_t b) public static Object dist(Object... arg) { UNSUPPORTED("f3414cvfyz69wnzb7u82byqr6"); // static COORD dist(Ppoint_t a, Ppoint_t b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c5c8q1zhigd7yv5pwxe30rbc4"); // return sqrt(dist2(a, b)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bbuqqywhkghz3a4pmrzvnwat3 // static int inCone(int i, int j, Ppoint_t pts[], int nextPt[], int prevPt[]) public static Object inCone(Object... arg) { UNSUPPORTED("2m7xwhnvt83bmhre90ibjzp22"); // static int inCone(int i, int j, Ppoint_t pts[], int nextPt[], int prevPt[]) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3nsyz336uzlzhdtn1ifpdpdbw"); // return in_cone(pts[prevPt[i]], pts[i], pts[nextPt[i]], pts[j]); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9k5g381ss7ta6nb7v37y3oo4x // static int clear(Ppoint_t pti, Ppoint_t ptj, int start, int end, int V, Ppoint_t pts[], int nextPt[], int prevPt[]) public static Object clear(Object... arg) { UNSUPPORTED("68m9293lem1wya8xmo8rg6biv"); // static int clear(Ppoint_t pti, Ppoint_t ptj, UNSUPPORTED("8lrao52hd6uwbjl78v0f7a7ec"); // int start, int end, UNSUPPORTED("a8lvklwic5zz27yulrg7ododk"); // int V, Ppoint_t pts[], int nextPt[], int prevPt[]) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b0kisc5bimb4jnz3z1g2yhbqv"); // int k; UNSUPPORTED("9phanu31yb7616q5xjn3fva6x"); // for (k = 0; k < start; k++) { UNSUPPORTED("ye8byugyetsemml5w5sus11k"); // if (intersect((pti),(ptj),(pts[k]),(pts[nextPt[k]]))) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("aey08ei9e4arvxt8hzy83qb9c"); // for (k = end; k < V; k++) { UNSUPPORTED("ye8byugyetsemml5w5sus11k"); // if (intersect((pti),(ptj),(pts[k]),(pts[nextPt[k]]))) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 a5f84g6uyajcrmmt06a61ulyi // static void compVis(vconfig_t * conf, int start) public static Object compVis(Object... arg) { UNSUPPORTED("izn0i9pb2n1dmy8hrpd016j1"); // static void compVis(vconfig_t * conf, int start) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9e683sch2jealt2ckz48v9f0j"); // int V = conf->N; UNSUPPORTED("7d9bin19ief7l7y1pkikvuwiu"); // Ppoint_t *pts = conf->P; UNSUPPORTED("9rljos3iubpdnzm02l6bd6pga"); // int *nextPt = conf->next; UNSUPPORTED("4n11bnl3onnk0hldumoxfi7bx"); // int *prevPt = conf->prev; UNSUPPORTED("e0225hhlmgxnr7acr4j9fr4rj"); // array2 wadj = conf->vis; UNSUPPORTED("edgqyxis5vrh7zvky36d4e9a0"); // int j, i, previ; UNSUPPORTED("bjc6w95h0ns9cjy8h8j9niggy"); // COORD d; UNSUPPORTED("2xpkyvrmw8kb8hkc5g5820ed7"); // for (i = start; i < V; i++) { UNSUPPORTED("4woc2r6ql8s9ni8zc78gafifx"); // /* add edge between i and previ. UNSUPPORTED("aoxujkcbwbq2misfrn7k3d7x8"); // * Note that this works for the cases of polygons of 1 and 2 UNSUPPORTED("1uyr4bh9q9mhcn76g13u98kh0"); // * vertices, though needless work is done. UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ UNSUPPORTED("31w2a4xrdim19v0h965b1cr2c"); // previ = prevPt[i]; UNSUPPORTED("4bd7y0t2a1w6hs3ohpem3ysgu"); // d = dist(pts[i], pts[previ]); UNSUPPORTED("4otd40ic0u4tos8oseiipjzc9"); // wadj[i][previ] = d; UNSUPPORTED("bib5b7wm3wqhsons82qecl"); // wadj[previ][i] = d; UNSUPPORTED("e85r4voxpd10f2vhaakw43f9m"); // /* Check remaining, earlier vertices */ UNSUPPORTED("34wvs6wxg9wroez0cob4eq0yt"); // if (previ == i - 1) UNSUPPORTED("52l667dp9oah6rslc8wjoujp1"); // j = i - 2; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("9k7vxyf71hfmr8jfddpfd90fg"); // j = i - 1; UNSUPPORTED("86i8ouw8og1peosqts789zl36"); // for (; j >= 0; j--) { UNSUPPORTED("axb1scf1zch83hijq76uhgavw"); // if (inCone(i, j, pts, nextPt, prevPt) && UNSUPPORTED("f53u8xtqvo7t5kx42e92w686r"); // inCone(j, i, pts, nextPt, prevPt) && UNSUPPORTED("1g3bn9manlh9eb34pxq0uzz8t"); // clear(pts[i], pts[j], V, V, V, pts, nextPt, prevPt)) { UNSUPPORTED("5qsnuuk4fv4fooabczbbd9ahx"); // /* if i and j see each other, add edge */ UNSUPPORTED("9fadh88q86g90beilv0kqxmaa"); // d = dist(pts[i], pts[j]); UNSUPPORTED("6ut8yosujth8pmmzsvs0rbn4r"); // wadj[i][j] = d; UNSUPPORTED("dm7renktz4js1qpo4fxfpjv96"); // wadj[j][i] = d; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 afx2tbncgy8wtrk8wrpvt8c7v // void visibility(vconfig_t * conf) public static Object visibility(Object... arg) { UNSUPPORTED("25e0cmz7nmahqmmpcvbvi3kbv"); // void visibility(vconfig_t * conf) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("80p1p77b7wohnw2r3v9cilgja"); // conf->vis = allocArray(conf->N, 2); UNSUPPORTED("cocdypij6tuxqzgtmgw0ffdyi"); // compVis(conf, 0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 f53btxccmpw07qdajkgza16dq // static int polyhit(vconfig_t * conf, Ppoint_t p) public static Object polyhit(Object... arg) { UNSUPPORTED("3jhqkjkjkqnmtf4w0yu1vcgkm"); // static int polyhit(vconfig_t * conf, Ppoint_t p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("4a012clawvd7u5m72juylqzoa"); // Ppoly_t poly; UNSUPPORTED("bdsnknxap30wvari7ivffhs3m"); // for (i = 0; i < conf->Npoly; i++) { UNSUPPORTED("ey7hd6wdy31mr7tdmlijqjq0n"); // poly.ps = &(conf->P[conf->start[i]]); UNSUPPORTED("3qtnbizhz0j64zuzkh3tthe1h"); // poly.pn = conf->start[i + 1] - conf->start[i]; UNSUPPORTED("5mttoot38d7jpevufudmwxewd"); // if (in_poly(poly, p)) UNSUPPORTED("8wtxouhhluawfic81s58qdk0e"); // return i; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b8wqo20wej72k4fwead61jun4"); // return -1111; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2yvo05bz8qq8rrhli2rlonyix // COORD *ptVis(vconfig_t * conf, int pp, Ppoint_t p) public static Object ptVis(Object... arg) { UNSUPPORTED("d58fb5rw4i15qcu5i6zi8562u"); // COORD *ptVis(vconfig_t * conf, int pp, Ppoint_t p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9e683sch2jealt2ckz48v9f0j"); // int V = conf->N; UNSUPPORTED("7d9bin19ief7l7y1pkikvuwiu"); // Ppoint_t *pts = conf->P; UNSUPPORTED("9rljos3iubpdnzm02l6bd6pga"); // int *nextPt = conf->next; UNSUPPORTED("4n11bnl3onnk0hldumoxfi7bx"); // int *prevPt = conf->prev; UNSUPPORTED("b0kisc5bimb4jnz3z1g2yhbqv"); // int k; UNSUPPORTED("aa6b5n017in5orglen9ktgs9a"); // int start, end; UNSUPPORTED("ib3s5dce6s963vo6b8ltvstb"); // COORD *vadj; UNSUPPORTED("99q4ws63ls29yvcb513my0kp3"); // Ppoint_t pk; UNSUPPORTED("bjc6w95h0ns9cjy8h8j9niggy"); // COORD d; UNSUPPORTED("amrnq8h2txtlsnydbwpxx8p9e"); // vadj = (COORD *) malloc((V + 2) * sizeof(COORD)); UNSUPPORTED("1xmg38dmhrjwt80u0hb882akq"); // if (pp == -2222) UNSUPPORTED("67gimzlcd9mmh55z0uwgo1svm"); // pp = polyhit(conf, p); UNSUPPORTED("fcadmwema5f9zw0pun57mr61"); // if (pp >= 0) { UNSUPPORTED("6rdfhzubd1dzowvcgtvu07skw"); // start = conf->start[pp]; UNSUPPORTED("qr28k5sqgz293v061p9lh7mw"); // end = conf->start[pp + 1]; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("4k2lbbhod6d50bie3p0ovngng"); // start = V; UNSUPPORTED("6p0gh50lvtsw3epczfbncrrzh"); // end = V; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9phanu31yb7616q5xjn3fva6x"); // for (k = 0; k < start; k++) { UNSUPPORTED("685xi4ztalqspw63iho1ijb2a"); // pk = pts[k]; UNSUPPORTED("ej65d6v3kqqc41pf2amjx9u8o"); // if (in_cone(pts[prevPt[k]], pk, pts[nextPt[k]], p) && UNSUPPORTED("45whycl2s4k3gm8ltb52iawfc"); // clear(p, pk, start, end, V, pts, nextPt, prevPt)) { UNSUPPORTED("204lwnssk9azp929idzzmu2oh"); // /* if p and pk see each other, add edge */ UNSUPPORTED("2y5618jurnxt2bnwydutfzwr4"); // d = dist(p, pk); UNSUPPORTED("d97qa8dblreww61gxggrpddq9"); // vadj[k] = d; UNSUPPORTED("6to1esmb8qfrhzgtr7jdqleja"); // } else UNSUPPORTED("w27fuo0npg13jbsblev28cke"); // vadj[k] = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3aiu3msz4kw0sitr3eu403460"); // for (k = start; k < end; k++) UNSUPPORTED("ecdly7fjptzn9hbgscfv42v5f"); // vadj[k] = 0; UNSUPPORTED("aey08ei9e4arvxt8hzy83qb9c"); // for (k = end; k < V; k++) { UNSUPPORTED("685xi4ztalqspw63iho1ijb2a"); // pk = pts[k]; UNSUPPORTED("ej65d6v3kqqc41pf2amjx9u8o"); // if (in_cone(pts[prevPt[k]], pk, pts[nextPt[k]], p) && UNSUPPORTED("45whycl2s4k3gm8ltb52iawfc"); // clear(p, pk, start, end, V, pts, nextPt, prevPt)) { UNSUPPORTED("204lwnssk9azp929idzzmu2oh"); // /* if p and pk see each other, add edge */ UNSUPPORTED("2y5618jurnxt2bnwydutfzwr4"); // d = dist(p, pk); UNSUPPORTED("d97qa8dblreww61gxggrpddq9"); // vadj[k] = d; UNSUPPORTED("6to1esmb8qfrhzgtr7jdqleja"); // } else UNSUPPORTED("w27fuo0npg13jbsblev28cke"); // vadj[k] = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6udsra1z6g208yb80gqshsz7i"); // vadj[V] = 0; UNSUPPORTED("6cyoyzpz6109ngfp8zw4x3ign"); // vadj[V + 1] = 0; UNSUPPORTED("euzt74fd0hlgexbbuks72111"); // return vadj; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 euo3asq18kkzr6xpldh1whj5j // int directVis(Ppoint_t p, int pp, Ppoint_t q, int qp, vconfig_t * conf) public static Object directVis(Object... arg) { UNSUPPORTED("6vkegkahwe6v9zxmpo9y849de"); // int directVis(Ppoint_t p, int pp, Ppoint_t q, int qp, vconfig_t * conf) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9e683sch2jealt2ckz48v9f0j"); // int V = conf->N; UNSUPPORTED("7d9bin19ief7l7y1pkikvuwiu"); // Ppoint_t *pts = conf->P; UNSUPPORTED("9rljos3iubpdnzm02l6bd6pga"); // int *nextPt = conf->next; UNSUPPORTED("cn01t5vyidv9t9jp5k1ebvqnf"); // /* int* prevPt = conf->prev; */ UNSUPPORTED("b0kisc5bimb4jnz3z1g2yhbqv"); // int k; UNSUPPORTED("5jthc5ipz7t03l29ayjuyuwss"); // int s1, e1; UNSUPPORTED("ewn7imvjy270ybgfwapp0tq42"); // int s2, e2; UNSUPPORTED("7s1xhwbtcl4cfff6w7bovcx4p"); // if (pp < 0) { UNSUPPORTED("8kwihfze04zickxvmduqyz9oz"); // s1 = 0; UNSUPPORTED("d9lzfcaqs050pvd6f6sn4ybfd"); // e1 = 0; UNSUPPORTED("bx8ug7ayoxr9yyklnxyk820fn"); // if (qp < 0) { UNSUPPORTED("bz1de6hpp200ljwdvpkd5u3gn"); // s2 = 0; UNSUPPORTED("at1mpgp51u974mlhndrczv2lo"); // e2 = 0; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("1w3zcz5sbss50hne5vn9c54uf"); // s2 = conf->start[qp]; UNSUPPORTED("5aiw8tbtx5x4c6d90lqekac0k"); // e2 = conf->start[qp + 1]; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("91fgea3cg2flt7f19hu4m9f3k"); // } else if (qp < 0) { UNSUPPORTED("8kwihfze04zickxvmduqyz9oz"); // s1 = 0; UNSUPPORTED("d9lzfcaqs050pvd6f6sn4ybfd"); // e1 = 0; UNSUPPORTED("c7jjeiyrdte7kaqrcqi78tb6j"); // s2 = conf->start[pp]; UNSUPPORTED("181206xgdu45tknm5eoc7vy7p"); // e2 = conf->start[pp + 1]; UNSUPPORTED("1vsb0sn9g2id7jgf818wp2h61"); // } else if (pp <= qp) { UNSUPPORTED("2jpazbnst1z69liefzlp7x6k5"); // s1 = conf->start[pp]; UNSUPPORTED("birxkvbxsgsetxfbpuugteqbx"); // e1 = conf->start[pp + 1]; UNSUPPORTED("2lmk984g1rwi6bvyc4aqlzovj"); // s2 = conf->start[qp]; UNSUPPORTED("9sx0re3e6x3m54pfxrbuk571d"); // e2 = conf->start[qp + 1]; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("dun18brbfd255gv2nfo9sog80"); // s1 = conf->start[qp]; UNSUPPORTED("c1zf66qllk0cm9c4q3cjv9f3r"); // e1 = conf->start[qp + 1]; UNSUPPORTED("c7jjeiyrdte7kaqrcqi78tb6j"); // s2 = conf->start[pp]; UNSUPPORTED("181206xgdu45tknm5eoc7vy7p"); // e2 = conf->start[pp + 1]; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("f28p3ogo8j178cx69vueppwjb"); // for (k = 0; k < s1; k++) { UNSUPPORTED("an3a9zyfv6sgx5bn13egxyjbb"); // if (intersect((p),(q),(pts[k]),(pts[nextPt[k]]))) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ecib0ib1qhu5qbad78mhypnbs"); // for (k = e1; k < s2; k++) { UNSUPPORTED("an3a9zyfv6sgx5bn13egxyjbb"); // if (intersect((p),(q),(pts[k]),(pts[nextPt[k]]))) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dawiv8sbk7c60uo6bv5kesrag"); // for (k = e2; k < V; k++) { UNSUPPORTED("an3a9zyfv6sgx5bn13egxyjbb"); // if (intersect((p),(q),(pts[k]),(pts[nextPt[k]]))) UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/lib/xdot/000077500000000000000000000000001312650303100167425ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/lib/xdot/xdot__c.java000066400000000000000000002260531312650303100212340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.lib.xdot; import static smetana.core.Macro.UNSUPPORTED; public class xdot__c { //3 18i9xd96uncylv9umnz90gzrh // static void agxbinit(agxbuf * xb, unsigned int hint, unsigned char *init) public static Object agxbinit(Object... arg) { UNSUPPORTED("84pe35dre7aor7etu052tqf8t"); // static void agxbinit(agxbuf * xb, unsigned int hint, unsigned char *init) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3ctz7esjgupftv01eshc2dhx2"); // if (init) { UNSUPPORTED("7ccqm4ipez0mmdk6bv50shi8z"); // xb->buf = init; UNSUPPORTED("bgb2e1tveztx6w0nuo6t6kxbd"); // xb->dyna = 0; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("49jhfm9yw3megswomc4gzzgd7"); // if (hint == 0) UNSUPPORTED("5h1ggxg5ypn75rue18vgizp12"); // hint = BUFSIZ; UNSUPPORTED("bwuph2kus95n04yy45ff0ygwg"); // xb->dyna = 1; UNSUPPORTED("b3ogvpic8o2143ihrt95fsmt5"); // xb->buf = (unsigned char*)calloc((hint), sizeof(unsigned char)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1vqjbr0qaxnp1tks2ilwqgn3g"); // xb->eptr = xb->buf + hint; UNSUPPORTED("dtbxbzhkw05lut0ozk9a49lw6"); // xb->ptr = xb->buf; UNSUPPORTED("5ymin98xo0ermvpyhsuo8xwim"); // *xb->ptr = '\0'; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 deo0nqa6fmyacu293m9q0f3ad // static int agxbmore(agxbuf * xb, unsigned int ssz) public static Object agxbmore(Object... arg) { UNSUPPORTED("dr7xxpbudfd4q496z1hjh0uam"); // static int agxbmore(agxbuf * xb, unsigned int ssz) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ayzlme0ebe3j87lpz076cg2vq"); // int cnt; /* current no. of characters in buffer */ UNSUPPORTED("71r9w1f25l9h79jodjer7my8a"); // int size; /* current buffer size */ UNSUPPORTED("2bckq0rejaf94iovglem6hqko"); // int nsize; /* new buffer size */ UNSUPPORTED("dmokvf86b5kj3srnwwbr7ebmc"); // unsigned char *nbuf; /* new buffer */ UNSUPPORTED("347vqdgen21gpinnet4lkk7gk"); // size = xb->eptr - xb->buf; UNSUPPORTED("49rolm7orqt4aw3uud529g4qc"); // nsize = 2 * size; UNSUPPORTED("6t3aq9fvpvhbjssfqnjmktfh0"); // if (size + ssz > nsize) UNSUPPORTED("7ykdy1xuvrmibubukfxhfmz91"); // nsize = size + ssz; UNSUPPORTED("bfinudkdiev8mwo6udbayoaex"); // cnt = xb->ptr - xb->buf; UNSUPPORTED("4cmq49lu7qhmui59rl36qd6fr"); // if (xb->dyna) { UNSUPPORTED("8vf8arbygb0610hkc403uiror"); // nbuf = realloc(xb->buf, nsize); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("3k38m0q2g7fwya1dna0s39dqc"); // nbuf = (unsigned char*)calloc((nsize), sizeof(unsigned char)); UNSUPPORTED("do1ts7n0vopj00hs85yw95qjx"); // memcpy(nbuf, xb->buf, cnt); UNSUPPORTED("bwuph2kus95n04yy45ff0ygwg"); // xb->dyna = 1; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5a5gutjqda6fhdylt7vi64g71"); // xb->buf = nbuf; UNSUPPORTED("dodqzfdb41641741187lm9aci"); // xb->ptr = xb->buf + cnt; UNSUPPORTED("e45cf41wsuzfjfi2my7jn7odp"); // xb->eptr = xb->buf + nsize; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8zf71o02uu26r06lmjzr6c8df // static int agxbput(char *s, agxbuf * xb) public static Object agxbput(Object... arg) { UNSUPPORTED("dpuodut5jl740qijx0viiicj3"); // static int agxbput(char *s, agxbuf * xb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dmstj6pqesin7a4ufrtut65t5"); // unsigned int ssz = strlen(s); UNSUPPORTED("6q0wy2t9qi11079j0wyuhsmiw"); // if (xb->ptr + ssz > xb->eptr) UNSUPPORTED("82p9dlopf5tuzmyy5454sv4mm"); // agxbmore(xb, ssz); UNSUPPORTED("9tvk5ztcu9lg2u40sfmevitl2"); // memcpy(xb->ptr, s, ssz); UNSUPPORTED("2wy6om6o92zevnnevl5v0pr0c"); // xb->ptr += ssz; UNSUPPORTED("dzondrrxi2pe7xy72r0jstd20"); // return ssz; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6pn991iar889bzaq1znh7dj3b // static void agxbfree(agxbuf * xb) public static Object agxbfree(Object... arg) { UNSUPPORTED("3dnzpw59o9bwwyrb7eat7i3u4"); // static void agxbfree(agxbuf * xb) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("da8gv3dgf6bnks54n9mnlgzxk"); // if (xb->dyna) UNSUPPORTED("62irfu7vrq2ewolixn0ksp5f6"); // free(xb->buf); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4l360un6jpvisf8n73t7pqy9 // static char *parseReal(char *s, double *fp) public static Object parseReal(Object... arg) { UNSUPPORTED("27cxezovcf9115tk1jj1gyw8j"); // static char *parseReal(char *s, double *fp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("8ne6p4d5pykwl1d3xk0yg0ipb"); // double d; UNSUPPORTED("1xd0ne3bq4byy8xcbce2jvh7s"); // d = strtod(s, &p); UNSUPPORTED("66hd5x2o87fqb7ug58kbyi4e5"); // if (p == s) return 0; UNSUPPORTED("f3dzvb82hjtktpqsfn7uyp86z"); // *fp = d; UNSUPPORTED("1fnaj5qlhzixwhovwrjmw4vgb"); // return (p); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bsxeh14qqmz6v3qdi9irrllr // static char *parseInt(char *s, int *ip) public static Object parseInt(Object... arg) { UNSUPPORTED("73v5uzvbtjguvilqpgltjnq7t"); // static char *parseInt(char *s, int *ip) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bkz9mqmemp1ljxdwdbu8xv3e9"); // char* endp; UNSUPPORTED("c5qif45ng54sfzc28pvot6iwq"); // *ip = (int)strtol (s, &endp, 10); UNSUPPORTED("ct4gh2jrkm41477ikplh0rn57"); // if (s == endp) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("2ulm7bppf40z5aob8ngdrce73"); // return endp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3mwttoeqe8u9fia2d46vwzsve // static char *parseUInt(char *s, unsigned int *ip) public static Object parseUInt(Object... arg) { UNSUPPORTED("enlzxotrmwou3zcdcg63q0u1i"); // static char *parseUInt(char *s, unsigned int *ip) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bkz9mqmemp1ljxdwdbu8xv3e9"); // char* endp; UNSUPPORTED("2osjo1qcy5wbt8hb0i484t7gl"); // *ip = (unsigned int)strtoul (s, &endp, 10); UNSUPPORTED("ct4gh2jrkm41477ikplh0rn57"); // if (s == endp) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("2ulm7bppf40z5aob8ngdrce73"); // return endp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8jcdtdxdrx01gn9f1nebzs68r // static char *parseRect(char *s, xdot_rect * rp) public static Object parseRect(Object... arg) { UNSUPPORTED("8cfahk8txxaintbez7726qocf"); // static char *parseRect(char *s, xdot_rect * rp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bkz9mqmemp1ljxdwdbu8xv3e9"); // char* endp; UNSUPPORTED("ayw7luucspha90kbooccenfvz"); // rp->x = strtod (s, &endp); UNSUPPORTED("ct4gh2jrkm41477ikplh0rn57"); // if (s == endp) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("6ojhqyohyu9t2drew53jrtxrw"); // s = endp; UNSUPPORTED("3bz6uhgg11k6vjacbsjnx1wi3"); // rp->y = strtod (s, &endp); UNSUPPORTED("ct4gh2jrkm41477ikplh0rn57"); // if (s == endp) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("6ojhqyohyu9t2drew53jrtxrw"); // s = endp; UNSUPPORTED("7o4n2gvc98j75dt3j9dxbjo78"); // rp->w = strtod (s, &endp); UNSUPPORTED("ct4gh2jrkm41477ikplh0rn57"); // if (s == endp) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("6ojhqyohyu9t2drew53jrtxrw"); // s = endp; UNSUPPORTED("7yrlj0k618ctn709clsxdxl1d"); // rp->h = strtod (s, &endp); UNSUPPORTED("ct4gh2jrkm41477ikplh0rn57"); // if (s == endp) UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("6ojhqyohyu9t2drew53jrtxrw"); // s = endp; UNSUPPORTED("3y6wj3ntgmr1qkdpm7wp1dsch"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9zgiw1nnozptos14kotjlqzes // static char *parsePolyline(char *s, xdot_polyline * pp) public static Object parsePolyline(Object... arg) { UNSUPPORTED("5vennd9p6hb7tz8vier5n3awr"); // static char *parsePolyline(char *s, xdot_polyline * pp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("aqektudazrrmp3o28qu9lc8lr"); // xdot_point *pts; UNSUPPORTED("224clts6kmlangjk0mxje18pw"); // xdot_point *ps; UNSUPPORTED("bkz9mqmemp1ljxdwdbu8xv3e9"); // char* endp; UNSUPPORTED("9k4v6oml42z495w37d15bdhgq"); // s = parseInt(s, &i); UNSUPPORTED("4tppo7loevc5w3rzs7kcd6q3s"); // if (!s) return s; UNSUPPORTED("2jikm4wubyo74pnrnkqlp64n3"); // pts = ps = (xdot_point*)calloc((i), sizeof(xdot_point)); UNSUPPORTED("4eh3im98g60ywzmhhcdwd6fvl"); // pp->cnt = i; UNSUPPORTED("cphbu2o9nlpu87ymbrrqqzxyd"); // for (i = 0; i < pp->cnt; i++) { UNSUPPORTED("31n0sbteq5vit0duqm4fw62us"); // ps->x = strtod (s, &endp); UNSUPPORTED("1jb4h180dxiqktyhn2gltjn0v"); // if (s == endp) { UNSUPPORTED("7bqn4djl4wq567zf4ce3ocb57"); // free (pts); UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("91nzbbhlz222quh6avosg1gs3"); // s = endp; UNSUPPORTED("e65aaxn30tf5qsj1a1qq7w231"); // ps->y = strtod (s, &endp); UNSUPPORTED("1jb4h180dxiqktyhn2gltjn0v"); // if (s == endp) { UNSUPPORTED("7bqn4djl4wq567zf4ce3ocb57"); // free (pts); UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("91nzbbhlz222quh6avosg1gs3"); // s = endp; UNSUPPORTED("cc5r26z00xi25odsicfy1n1mg"); // ps->z = 0; UNSUPPORTED("87sp63nt8twfjdetw9u20nv3l"); // ps++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6rgl3frmyuop1sfw5ytbajpe"); // pp->pts = pts; UNSUPPORTED("3y6wj3ntgmr1qkdpm7wp1dsch"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9ndna3jb07n84p1schywyuztb // static char *parseString(char *s, char **sp) public static Object parseString(Object... arg) { UNSUPPORTED("6ho8lvhy0v0vmiwxtchvowdag"); // static char *parseString(char *s, char **sp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("a1dehvgts7vkximbs2yo0q6pa"); // char *c; UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("9k4v6oml42z495w37d15bdhgq"); // s = parseInt(s, &i); UNSUPPORTED("8t62hsoemjy6c138b6890zgr6"); // if (!s || (i <= 0)) return 0; UNSUPPORTED("3ugsfktr0fa4ozg4wrl9ol7dc"); // while (*s && (*s != '-')) s++; UNSUPPORTED("98g0ujdodpjy3g7nibv2z5ait"); // if (*s) s++; UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("50parur6008yns69htbrun3l2"); // c = (char*)calloc((i + 1), sizeof(char)); UNSUPPORTED("c920n72fhgint9bu1xhd382e5"); // p = c; UNSUPPORTED("7ph7rzi6mme47sk2y140dwlbm"); // while ((i > 0) && *s) { UNSUPPORTED("8e6st6hhl4yfs7qub4b87bkm0"); // *p++ = *s++; UNSUPPORTED("2fvaz29y6ivihvxotxz84fsl9"); // i--; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2gn9hkx01ingqp86itwc4b5dm"); // if (i > 0) { UNSUPPORTED("1jlx2cuwttezm3zsuuehbh1l8"); // free (c); UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2t1d66kwn86kqh0i665hqw6cl"); // *p = '\0'; UNSUPPORTED("a0gcud6ayeka85e6o5adbzjd2"); // *sp = c; UNSUPPORTED("3y6wj3ntgmr1qkdpm7wp1dsch"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7reshvtfhworq8s9q6lowo6nl // static char *parseAlign(char *s, xdot_align * ap) public static Object parseAlign(Object... arg) { UNSUPPORTED("8si3sn14sdmyqz32r6ja6zl9h"); // static char *parseAlign(char *s, xdot_align * ap) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("9k4v6oml42z495w37d15bdhgq"); // s = parseInt(s, &i); UNSUPPORTED("7jqpiltkvdvvkjldnxqmz4nfw"); // if (i < 0) UNSUPPORTED("bfu0mpq4mmjh0pu6dyx8xlrna"); // *ap = xd_left; UNSUPPORTED("8544wlrukmsh3w27eef43oivi"); // else if (i > 0) UNSUPPORTED("1bi0jgsifwqkvdvmho2gvvfad"); // *ap = xd_right; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("6pvvrqivfj7ir7h3u5x5yfrrc"); // *ap = xd_center; UNSUPPORTED("3y6wj3ntgmr1qkdpm7wp1dsch"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ehnxo19guzhgzj6t8jgklcy9t // static char *parseOp(xdot_op * op, char *s, drawfunc_t ops[], int* error) public static Object parseOp(Object... arg) { UNSUPPORTED("6n4wgd5e0tmwigktwbqr7b2mh"); // static char *parseOp(xdot_op * op, char *s, drawfunc_t ops[], int* error) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1al7rtqrsk1oru479p6d19nt"); // char* cs; UNSUPPORTED("dcftaleqvuytghzlz8x1uo05u"); // xdot_color clr; UNSUPPORTED("6fdmf6t8ozu6ifv41ah2khjh5"); // *error = 0; UNSUPPORTED("5gi4ktom734bivy5bia2jyoyg"); // while (isspace(*s)) UNSUPPORTED("1fe0kohehgdxhenrepo7ymdcw"); // s++; UNSUPPORTED("avvtfrt0s9pcst93venr1pjk3"); // switch (*s++) { UNSUPPORTED("4qkgjhvxkpafhor6qtoe37y14"); // case 'E': UNSUPPORTED("9dnkzv2t54la5ntx5vagvydnh"); // op->kind = xd_filled_ellipse; UNSUPPORTED("atahrjx7tu9jw9spyi7jwfptn"); // s = parseRect(s, &op->u.ellipse); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("68fwibhr1nqhg298v23jvoosh"); // if (ops) UNSUPPORTED("f3txy198klrpx73ctc6lg125r"); // op->drawfunc = ops[xop_ellipse]; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("yic0mjrlpepyvrda3gv6t25f"); // case 'e': UNSUPPORTED("e9q42iiycw42fzv9sxtvjkwh1"); // op->kind = xd_unfilled_ellipse; UNSUPPORTED("atahrjx7tu9jw9spyi7jwfptn"); // s = parseRect(s, &op->u.ellipse); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("68fwibhr1nqhg298v23jvoosh"); // if (ops) UNSUPPORTED("f3txy198klrpx73ctc6lg125r"); // op->drawfunc = ops[xop_ellipse]; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("61e1o543la5tkcimttlw8ywf2"); // case 'P': UNSUPPORTED("altg4bjpb2pgvh11pwr1uwmr"); // op->kind = xd_filled_polygon; UNSUPPORTED("7f8c0fkrsn9rb7rkurug6gf2z"); // s = parsePolyline(s, &op->u.polygon); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("68fwibhr1nqhg298v23jvoosh"); // if (ops) UNSUPPORTED("3jz0du43oha0dv721jmcm9iaq"); // op->drawfunc = ops[xop_polygon]; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8nhycr2g1b6hvihfh3uztphax"); // case 'p': UNSUPPORTED("22idwk0wq7hih6wgv79c42gxj"); // op->kind = xd_unfilled_polygon; UNSUPPORTED("7f8c0fkrsn9rb7rkurug6gf2z"); // s = parsePolyline(s, &op->u.polygon); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("68fwibhr1nqhg298v23jvoosh"); // if (ops) UNSUPPORTED("3jz0du43oha0dv721jmcm9iaq"); // op->drawfunc = ops[xop_polygon]; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("volih9dzznkmqxv0f6d40beq"); // case 'b': UNSUPPORTED("dghgxw5iaz1lqcpx6khg9fwt5"); // op->kind = xd_filled_bezier; UNSUPPORTED("de36xrnd6y03zp55847a4giju"); // s = parsePolyline(s, &op->u.bezier); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("68fwibhr1nqhg298v23jvoosh"); // if (ops) UNSUPPORTED("1pmk6j85vg5odzetxiw461gw"); // op->drawfunc = ops[xop_bezier]; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9nbe45sgjnq9pebqfddm57j34"); // case 'B': UNSUPPORTED("7yupkrdo7hn0u4tlxtznjbh03"); // op->kind = xd_unfilled_bezier; UNSUPPORTED("de36xrnd6y03zp55847a4giju"); // s = parsePolyline(s, &op->u.bezier); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("68fwibhr1nqhg298v23jvoosh"); // if (ops) UNSUPPORTED("1pmk6j85vg5odzetxiw461gw"); // op->drawfunc = ops[xop_bezier]; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("rzit3m9f6iuku0clu8nqw5ih"); // case 'c': UNSUPPORTED("5mc0sy0u0wyb9hblr1cbvyp1h"); // s = parseString(s, &cs); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("ddh0k5n3l9rto4gcuggkkja61"); // cs = parseXDotColor (cs, &clr); UNSUPPORTED("ix8ie1z4452fb8rtdsib6ufu"); // if(!cs){*error=1;return 0;}; UNSUPPORTED("dqfrfyicjfcf6t6vr1g1atdpm"); // if (clr.type == xd_none) { UNSUPPORTED("4jv4w1znjmyk4pv8e2882cz0"); // op->kind = xd_pen_color; UNSUPPORTED("9ohuadhd8hihpbkr4vazi9dho"); // op->u.color = clr.u.clr; UNSUPPORTED("8npw75ua3iw8jlh0dm8nidoy9"); // if (ops) UNSUPPORTED("1r3cxmw9aafv54g3bc6bxkrey"); // op->drawfunc = ops[xop_pen_color]; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("eamachthb8mef0nhonusnktu9"); // op->kind = xd_grad_pen_color; UNSUPPORTED("1t72m9kz99a1xacrrrcfo1472"); // op->u.grad_color = clr; UNSUPPORTED("8npw75ua3iw8jlh0dm8nidoy9"); // if (ops) UNSUPPORTED("2uoht3mjgjvn6q5p8grt2eqt"); // op->drawfunc = ops[xop_grad_color]; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1b9yj8jr8j9uh2dubizj3pb1w"); // case 'C': UNSUPPORTED("5mc0sy0u0wyb9hblr1cbvyp1h"); // s = parseString(s, &cs); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("ddh0k5n3l9rto4gcuggkkja61"); // cs = parseXDotColor (cs, &clr); UNSUPPORTED("ix8ie1z4452fb8rtdsib6ufu"); // if(!cs){*error=1;return 0;}; UNSUPPORTED("dqfrfyicjfcf6t6vr1g1atdpm"); // if (clr.type == xd_none) { UNSUPPORTED("50qk3ylyw205nzn8fqok09cs5"); // op->kind = xd_fill_color; UNSUPPORTED("9ohuadhd8hihpbkr4vazi9dho"); // op->u.color = clr.u.clr; UNSUPPORTED("8npw75ua3iw8jlh0dm8nidoy9"); // if (ops) UNSUPPORTED("4zwt9xuucvf9zu22n83cq16mv"); // op->drawfunc = ops[xop_fill_color]; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("crmgghygtre74dw1tfur2pnt4"); // op->kind = xd_grad_fill_color; UNSUPPORTED("1t72m9kz99a1xacrrrcfo1472"); // op->u.grad_color = clr; UNSUPPORTED("8npw75ua3iw8jlh0dm8nidoy9"); // if (ops) UNSUPPORTED("2uoht3mjgjvn6q5p8grt2eqt"); // op->drawfunc = ops[xop_grad_color]; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("92wd4259ggzetbnn56kh75cap"); // case 'L': UNSUPPORTED("adyh3da2x6ec56lvn4k7ke2if"); // op->kind = xd_polyline; UNSUPPORTED("cxbj7pu045lx6cudbid7zp9qe"); // s = parsePolyline(s, &op->u.polyline); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("68fwibhr1nqhg298v23jvoosh"); // if (ops) UNSUPPORTED("9vy8b22mc6n5byr6erdtsw40t"); // op->drawfunc = ops[xop_polyline]; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("2s6hwvc7utwke7l45suhmumhk"); // case 'T': UNSUPPORTED("7jtgg1g4yy9elu7uj6ort6gx5"); // op->kind = xd_text; UNSUPPORTED("ddz6ejg5d3ser8syqgqgor5or"); // s = parseReal(s, &op->u.text.x); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("dtm3mydushiqsv1486knmsmk4"); // s = parseReal(s, &op->u.text.y); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("bprdmfsh0vryv3p7ij0qf40ew"); // s = parseAlign(s, &op->u.text.align); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("ah35sfvnqnxyb683wo4p2rk35"); // s = parseReal(s, &op->u.text.width); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("246imx3icdy7iqe7js9nneni"); // s = parseString(s, &op->u.text.text); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("68fwibhr1nqhg298v23jvoosh"); // if (ops) UNSUPPORTED("5knq711m08yljnaejvjqfcg3j"); // op->drawfunc = ops[xop_text]; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("6q33jx6joepwjvm90xt4bf0vh"); // case 'F': UNSUPPORTED("9kl1bheiih6co789yxhdhiujb"); // op->kind = xd_font; UNSUPPORTED("t4du5s5scamal3d24vj1iqbh"); // s = parseReal(s, &op->u.font.size); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("2fc9sdef2b51gow7bu6sjkkg4"); // s = parseString(s, &op->u.font.name); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("68fwibhr1nqhg298v23jvoosh"); // if (ops) UNSUPPORTED("35fyib2apc4v7sbldsq0go062"); // op->drawfunc = ops[xop_font]; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("a64n1v2knehfy9fh7m8eu7hsw"); // case 'S': UNSUPPORTED("8zk5sf79y3v9t2m0y1ymj3iey"); // op->kind = xd_style; UNSUPPORTED("7cq7xz66wdm8q5mb092031z4u"); // s = parseString(s, &op->u.style); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("68fwibhr1nqhg298v23jvoosh"); // if (ops) UNSUPPORTED("7squrebrjdtz8u4fte81buvyz"); // op->drawfunc = ops[xop_style]; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("29wq7b3fga4nijwl3yta17mv7"); // case 'I': UNSUPPORTED("eg0zxy0wpuyiu2oougybrgiy7"); // op->kind = xd_image; UNSUPPORTED("8z1u31p0vzmblgt8ohzyr1ndx"); // s = parseRect(s, &op->u.image.pos); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("bumle8azn9e1h3v7bopmk5n54"); // s = parseString(s, &op->u.image.name); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("68fwibhr1nqhg298v23jvoosh"); // if (ops) UNSUPPORTED("6m0v33rzuqjeq92tc2rckvele"); // op->drawfunc = ops[xop_image]; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("eat2i5ddqniirlvawyhxdst46"); // case 't': UNSUPPORTED("e92hvbw42702796zjdpygw9hm"); // op->kind = xd_fontchar; UNSUPPORTED("1ccegleo0pp43r2ln4pqcss9g"); // s = parseUInt(s, &op->u.fontchar); UNSUPPORTED("dgnldyd2pb5vmg1g32106eh4l"); // if(!s){*error=1;return 0;}; UNSUPPORTED("68fwibhr1nqhg298v23jvoosh"); // if (ops) UNSUPPORTED("9d0mk8yn2iofol0nxgvjskxm2"); // op->drawfunc = ops[xop_fontchar]; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1luutzji7osg8esr8b5j2cmsr"); // case '\0': UNSUPPORTED("cx0xi1vqbff1wttv329u71fsf"); // s = 0; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("12iorka61r0svbo67ymiyk2xm"); // *error = 1; UNSUPPORTED("cx0xi1vqbff1wttv329u71fsf"); // s = 0; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3y6wj3ntgmr1qkdpm7wp1dsch"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5wc1slq9x7lxo1mohysgr0u9v // xdot *parseXDotFOn (char *s, drawfunc_t fns[], int sz, xdot* x) public static Object parseXDotFOn(Object... arg) { UNSUPPORTED("del1weqvytt23ivpfz8ioo7lq"); // xdot *parseXDotFOn (char *s, drawfunc_t fns[], int sz, xdot* x) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6qc99eq4i3e3ogqtvwjenpax6"); // xdot_op op; UNSUPPORTED("de9l6pn4qzf2wjdqbawozkf7e"); // char *ops; UNSUPPORTED("1fre7x15xdukb9hyi6d6711i5"); // int oldsz, bufsz; UNSUPPORTED("cknrkc54njhr0aclf9l9gw0bw"); // int error; UNSUPPORTED("ecv0zeja1tcgfn8qgbqizf04m"); // int initcnt; UNSUPPORTED("5io7qudgtw3wrjkc5ndpni08d"); // if (!s) UNSUPPORTED("7ngxpkghjermbwbho2j4f5qvi"); // return x; UNSUPPORTED("ke1x8t1fmvv316rneoda0ss2"); // if (!x) { UNSUPPORTED("1bt9ibfd7selwlyjzzj8zugyw"); // x = (xdot*)calloc(1, sizeof(xdot)); UNSUPPORTED("2e1w10luru5il8ocut51grwgv"); // if (sz <= sizeof(xdot_op)) UNSUPPORTED("7apwr620hx5egvyfz58suchvi"); // sz = sizeof(xdot_op); UNSUPPORTED("ek6enscr1j99c8kzgpj6u2bxa"); // /* cnt, freefunc, ops, flags zeroed by NEW */ UNSUPPORTED("cajvvx0dkfkoti3nbxwiluats"); // x->sz = sz; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("e077xzd8dapealp6nhtlqdpl4"); // initcnt = x->cnt; UNSUPPORTED("7mal8ay7kpitrb9g5mthqfbjb"); // sz = x->sz; UNSUPPORTED("8i2hi7mj1cgsl90sxhbpqranx"); // if (initcnt == 0) { UNSUPPORTED("bkcefor4uv5jyrv0x0yfbxyna"); // bufsz = 100; UNSUPPORTED("201agqdoyv7sx9c17j6fuw2sg"); // ops = (char *) calloc(100, sz); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("cwo1tpf247100oddqjti32zmh"); // ops = (char*)(x->ops); UNSUPPORTED("7nja6mm5tt34cve70y0571hub"); // bufsz = initcnt + 100; UNSUPPORTED("cnb950g9dc109a90346xph8iy"); // ops = (char *) realloc(ops, bufsz * sz); UNSUPPORTED("b43qdbc13emvwq99ngcburls5"); // memset(ops + (initcnt*sz), '\0', (bufsz - initcnt)*sz); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("73x1ejpfjxn2mhkzjznytsxvn"); // while ((s = parseOp(&op, s, fns, &error))) { UNSUPPORTED("5ol0b0rd00pjdvj32o6c1il1x"); // if (x->cnt == bufsz) { UNSUPPORTED("1w2w52ovyn8un9gr3j9lxj202"); // oldsz = bufsz; UNSUPPORTED("3psgdtqxnrljp3xnkep0f4qm4"); // bufsz *= 2; UNSUPPORTED("2ykj4yj4vfhwxjomqhhrg8uzr"); // ops = (char *) realloc(ops, bufsz * sz); UNSUPPORTED("6hvg5i6znthuu7cdcsjq5mnz0"); // memset(ops + (oldsz*sz), '\0', (bufsz - oldsz)*sz); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("du21yaxgccjzlo45llct4tqak"); // *(xdot_op *) (ops + (x->cnt * sz)) = op; UNSUPPORTED("ai5pt7k72sx5jp61rk4fvdhxp"); // x->cnt++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9ob7nuswfwxxvd5brie5gso4d"); // if (error) UNSUPPORTED("dyyumzikvlv9fg24z6x09p5lu"); // x->flags |= 1; UNSUPPORTED("1n5koxwuji1d5l2zzs1e4h1qi"); // if (x->cnt) { UNSUPPORTED("4ssdlr3gorr9y6t08ll8z4znz"); // x->ops = (xdot_op *) realloc(ops, x->cnt * sz); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("cycxnymrxk0vovp1xbx5ma9md"); // free (ops); UNSUPPORTED("c0mmv67btk6s9utzudcjef1b"); // free (x); UNSUPPORTED("ajmuq0bs0l1j2jqys1lqyatkp"); // x = NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4jnfz0yeu1qihsx3sbr7l2fsh"); // return x; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4460p54l4myil3tss1cr4fryd // xdot *parseXDotF(char *s, drawfunc_t fns[], int sz) public static Object parseXDotF(Object... arg) { UNSUPPORTED("969km4cd3fzkxaw7yidsr8p7p"); // xdot *parseXDotF(char *s, drawfunc_t fns[], int sz) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dlkx6l0c5f3r3r98huhdg2ooa"); // return parseXDotFOn (s, fns, sz, NULL); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1l1kp80xwz00t0yjxs3q5rmk3 // xdot *parseXDot(char *s) public static Object parseXDot(Object... arg) { UNSUPPORTED("8q2xd8yodlhxzirc9af1nt5x5"); // xdot *parseXDot(char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("arcemicyd1w4yf877xwdo6rx7"); // return parseXDotF(s, 0, 0); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2f1smkubo9aphaw4mu9x6fqep // static void trim (char* buf) public static Object trim(Object... arg) { UNSUPPORTED("16qqcors2mtgshjsd8bo4p83w"); // static void trim (char* buf) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7puz5on3kut1d51f3su87yzvy"); // char* dotp; UNSUPPORTED("a4px33i4moqe8ybwatz0g8k6"); // char* p; UNSUPPORTED("25j4nlrn8fb330rtpgs3znj2e"); // if ((dotp = strchr (buf,'.'))) { UNSUPPORTED("4ahv95yhrsexjeiyqeqh89ui5"); // p = dotp+1; UNSUPPORTED("8owim6df9ae01xere8qw3zijk"); // while (*p) p++; // find end of string UNSUPPORTED("6y68c149kyxt4ja9q3jh7bc19"); // p--; UNSUPPORTED("e2htnsr0x54tbh21x4z55a8fg"); // while (*p == '0') *p-- = '\0'; UNSUPPORTED("azdcgp3weiwu7xxfo6mjw11v3"); // if (*p == '.') // If all decimals were zeros, remove ".". UNSUPPORTED("6568pmkatbjs0ljsylsyvwepv"); // *p = '\0'; UNSUPPORTED("35nw1pbiz2p3s6qwlam5eoo3m"); // else UNSUPPORTED("a0t85lvr3qdf70ajg30c8eadd"); // p++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dkdckkwtr1hxr1itqzjgv1uwc // static void printRect(xdot_rect * r, pf print, void *info) public static Object printRect(Object... arg) { UNSUPPORTED("1j4yxl2tdu1mgcs8f18wo7y1p"); // static void printRect(xdot_rect * r, pf print, void *info) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ao5jsn9dl1jrlcy9pc1frc1o0"); // char buf[128]; UNSUPPORTED("6ded6umxsn4kpbdobx5psese6"); // sprintf(buf, " %.02f", r->x); UNSUPPORTED("c6edvxq3lg824jb9zcjytatwi"); // trim(buf); UNSUPPORTED("1pvfmyr62uut2ima4wfa83yq7"); // print(buf, info); UNSUPPORTED("1dq8e468ztu7szq5wr6jwqoyk"); // sprintf(buf, " %.02f", r->y); UNSUPPORTED("c6edvxq3lg824jb9zcjytatwi"); // trim(buf); UNSUPPORTED("1pvfmyr62uut2ima4wfa83yq7"); // print(buf, info); UNSUPPORTED("4hbjzmluo9cbzej5u95q8a7z4"); // sprintf(buf, " %.02f", r->w); UNSUPPORTED("c6edvxq3lg824jb9zcjytatwi"); // trim(buf); UNSUPPORTED("1pvfmyr62uut2ima4wfa83yq7"); // print(buf, info); UNSUPPORTED("aneklasez7u2mjv2budi0ucgq"); // sprintf(buf, " %.02f", r->h); UNSUPPORTED("c6edvxq3lg824jb9zcjytatwi"); // trim(buf); UNSUPPORTED("1pvfmyr62uut2ima4wfa83yq7"); // print(buf, info); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 42jio1rnt74r1eotoz52e2103 // static void printPolyline(xdot_polyline * p, pf print, void *info) public static Object printPolyline(Object... arg) { UNSUPPORTED("5duf17af1csfzpnc3dyas5huc"); // static void printPolyline(xdot_polyline * p, pf print, void *info) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("bx1dr4weajm160sejmy560gvb"); // char buf[512]; UNSUPPORTED("2wggiazumqcdxtujbvty42yuv"); // sprintf(buf, " %d", p->cnt); UNSUPPORTED("1pvfmyr62uut2ima4wfa83yq7"); // print(buf, info); UNSUPPORTED("1zh4rtgdnj1q51o48247n8113"); // for (i = 0; i < p->cnt; i++) { UNSUPPORTED("6npaqu2tg8ldsxi0i5k0n0z3j"); // sprintf(buf, " %.02f", p->pts[i].x); UNSUPPORTED("3b5kljt1py58tdgjxk9e2dsww"); // trim(buf); UNSUPPORTED("7oss8g82at7padefgh6z1oko6"); // print(buf, info); UNSUPPORTED("3ci7wlatgm8j39td4y1jtvcyq"); // sprintf(buf, " %.02f", p->pts[i].y); UNSUPPORTED("3b5kljt1py58tdgjxk9e2dsww"); // trim(buf); UNSUPPORTED("7oss8g82at7padefgh6z1oko6"); // print(buf, info); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4gdy7r7tpkmrd0prm55gzhki5 // static void printString(char *p, pf print, void *info) public static Object printString(Object... arg) { UNSUPPORTED("9f4f8ckw2jx1xeiecbc5j14jx"); // static void printString(char *p, pf print, void *info) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4f58isghm038gd5wa6xw6tk4k"); // char buf[30]; UNSUPPORTED("axfy0wcb6535wfyimof2qaa44"); // sprintf(buf, " %d -", (int) strlen(p)); UNSUPPORTED("1pvfmyr62uut2ima4wfa83yq7"); // print(buf, info); UNSUPPORTED("bp53hk5r9lhkewy59gijr0m4j"); // print(p, info); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8sfpijalp2tilivgvo7ipgyo2 // static void printInt(int i, pf print, void *info) public static Object printInt(Object... arg) { UNSUPPORTED("9vsvsk7dh3k27thd38londqpp"); // static void printInt(int i, pf print, void *info) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4f58isghm038gd5wa6xw6tk4k"); // char buf[30]; UNSUPPORTED("1ikq43mlxdu4l67uy39bejql4"); // sprintf(buf, " %d", i); UNSUPPORTED("1pvfmyr62uut2ima4wfa83yq7"); // print(buf, info); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bb85wa9ydpjx8azkt6j8fkk9z // static void printFloat(float f, pf print, void *info, int space) public static Object printFloat(Object... arg) { UNSUPPORTED("d94ew8o9g8u5ic657j9wqhrwz"); // static void printFloat(float f, pf print, void *info, int space) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ao5jsn9dl1jrlcy9pc1frc1o0"); // char buf[128]; UNSUPPORTED("4syg3ja72oets2mdjgyjmzh5w"); // if (space) UNSUPPORTED("8dxllh2z42b75e6r0pxkdg2j1"); // sprintf(buf, " %.02f", f); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("97zm9gyi28c0wrfbvlls52v1h"); // sprintf(buf, "%.02f", f); UNSUPPORTED("481rvn40hp1stspd04wqvyej6"); // trim (buf); UNSUPPORTED("1pvfmyr62uut2ima4wfa83yq7"); // print(buf, info); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cewa9h3fzdsvn1pbwq6owgc41 // static void printAlign(xdot_align a, pf print, void *info) public static Object printAlign(Object... arg) { UNSUPPORTED("8miq75j7m3nbilqa8rw1slpm9"); // static void printAlign(xdot_align a, pf print, void *info) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b5n0x9uualh7k0dnk80sdcgqs"); // switch (a) { UNSUPPORTED("css95m4wfpdkor1v8y1jvb0yf"); // case xd_left: UNSUPPORTED("5j6u0d7ydfnkl37wkp62dee5z"); // print(" -1", info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3qghu38yz817sx6eaztlm3p6l"); // case xd_right: UNSUPPORTED("bm2tfxfdkjx58e5wkpecpko4u"); // print(" 1", info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1hh2q36cwlihkbrqqwveukrto"); // case xd_center: UNSUPPORTED("8qpabgae6mxxb1ly8yuw0h9pa"); // print(" 0", info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8sdpv3zwgeio07qexxyifrki9 // static void gradprint (char* s, void* v) public static Object gradprint(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("e9q23vdw8dsq7sa76x8tatioi"); // gradprint (char* s, void* v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("byn5a1ck7ae0nmlhvjrcigb3i"); // agxbput(s, (agxbuf*)v); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d8h0f1ny0lfqgdlltgznth70f // static void toGradString (agxbuf* xb, xdot_color* cp) public static Object toGradString(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("e098a5mtgj1bjdwal9mpcyohu"); // toGradString (agxbuf* xb, xdot_color* cp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bg1wmmucmjnf92wix4t7nfnaa"); // int i, n_stops; UNSUPPORTED("5c0mu092bwx9r1ah38xzg3b4c"); // xdot_color_stop* stops; UNSUPPORTED("19ar0bs2h13txvy4uwtw868m"); // if (cp->type == xd_linear) { UNSUPPORTED("a5e0eku2d7lu5e1urereer9qd"); // ((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)'['))); UNSUPPORTED("26is4zw7egae66druypu7x87g"); // printFloat (cp->u.ling.x0, gradprint, xb, 0); UNSUPPORTED("7enppj732f9vvrl746z88q49u"); // printFloat (cp->u.ling.y0, gradprint, xb, 1); UNSUPPORTED("3gu8dszmue79k293so5y2wfvm"); // printFloat (cp->u.ling.x1, gradprint, xb, 1); UNSUPPORTED("cal670m45zbhvvhzumai92o9y"); // printFloat (cp->u.ling.y1, gradprint, xb, 1); UNSUPPORTED("es7ru0t95ecdn3lk7jb64x0h4"); // n_stops = cp->u.ling.n_stops; UNSUPPORTED("24qiepo9vtk8pnivng82po3mt"); // stops = cp->u.ling.stops; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("4onc3nmgcaapl00s6m043sg26"); // ((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)'('))); UNSUPPORTED("aagp8bu8z9h8c1osmyvdw10fi"); // printFloat (cp->u.ring.x0, gradprint, xb, 0); UNSUPPORTED("5aksyngm1c2y5a0lcsafnlkx3"); // printFloat (cp->u.ring.y0, gradprint, xb, 1); UNSUPPORTED("pf3sl7ifvvw4cxut4qrg5pyy"); // printFloat (cp->u.ring.r0, gradprint, xb, 1); UNSUPPORTED("4h1gr2eixkyvubhblkd58jcbi"); // printFloat (cp->u.ring.x1, gradprint, xb, 1); UNSUPPORTED("6e9hjapf13xkygv9wqzgrd6b3"); // printFloat (cp->u.ring.y1, gradprint, xb, 1); UNSUPPORTED("a5durn757p58xt7ajmie3ne0r"); // printFloat (cp->u.ring.r1, gradprint, xb, 1); UNSUPPORTED("9vzzyqc3eqpw3j9gk4twef732"); // n_stops = cp->u.ring.n_stops; UNSUPPORTED("1ifkpfecqerrx44isr3gttz6y"); // stops = cp->u.ring.stops; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9bbs1gkxn1py6cenyvu86g6io"); // printInt (n_stops, gradprint, xb); UNSUPPORTED("4c8mz82f1vdtbgs20z3sj5piu"); // for (i = 0; i < n_stops; i++) { UNSUPPORTED("4hufkcyrhdph16ckosmd5cghd"); // printFloat (stops[i].frac, gradprint, xb, 1); UNSUPPORTED("es15carbpwf4hdyr222w7gct0"); // printString (stops[i].color, gradprint, xb); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a0vxpwbxeeom01urwsawtv3c4"); // if (cp->type == xd_linear) UNSUPPORTED("9pej3878vsbmnvzgtbqgdb9a5"); // ((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)']'))); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("yifq4dmob9tld1rc5va5zha8"); // ((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)')'))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2ifo26ctb4oo4z48u3q84ejrn // static void printXDot_Op(xdot_op * op, pf print, void *info, int more) public static Object printXDot_Op(Object... arg) { UNSUPPORTED("1793b7u18bt999rej4hfqd18z"); // static void printXDot_Op(xdot_op * op, pf print, void *info, int more) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("esg3s800dx899v69pkng2kavv"); // unsigned char buf[BUFSIZ]; UNSUPPORTED("cx1hx0xl1yzchdfsninsbfsek"); // agxbinit (&xb, BUFSIZ, buf); UNSUPPORTED("egsu3y4d03wndsn6zaevl28hr"); // switch (op->kind) { UNSUPPORTED("92w4nbepujb6qq0yhaml31tcv"); // case xd_filled_ellipse: UNSUPPORTED("avfl9oam76dloz4i7gb63380f"); // print("E", info); UNSUPPORTED("18zcxe29q21cnf6ocj8rtkhsv"); // printRect(&op->u.ellipse, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("7zgc3n99mi30jda6c8ii6z9ij"); // case xd_unfilled_ellipse: UNSUPPORTED("83413w1sz69a4c9t1pbqq1y"); // print("e", info); UNSUPPORTED("18zcxe29q21cnf6ocj8rtkhsv"); // printRect(&op->u.ellipse, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("a02o53vx69zifve1qybxt6bwg"); // case xd_filled_polygon: UNSUPPORTED("7u9vnqf5qa98cod2pe107pm8c"); // print("P", info); UNSUPPORTED("awy43l3osrby3v6u35pv3pgcn"); // printPolyline(&op->u.polygon, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1amgc8nhs2zl8rzvqurr02syl"); // case xd_unfilled_polygon: UNSUPPORTED("eqr0mrqf32c8edkz2vxxufss3"); // print("p", info); UNSUPPORTED("awy43l3osrby3v6u35pv3pgcn"); // printPolyline(&op->u.polygon, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("i75482wp0xfww8yo6wanbdpe"); // case xd_filled_bezier: UNSUPPORTED("dps7uwiaic5ssgx5ak76dknwc"); // print("b", info); UNSUPPORTED("4btk2wauocq7ho3pcmjhpaep3"); // printPolyline(&op->u.bezier, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("cljys033beawi3mtklyme87lc"); // case xd_unfilled_bezier: UNSUPPORTED("bx3k28i94anx726x3fsw3hcbn"); // print("B", info); UNSUPPORTED("4btk2wauocq7ho3pcmjhpaep3"); // printPolyline(&op->u.bezier, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3hbkjfy0n8isa112ucvobo206"); // case xd_pen_color: UNSUPPORTED("etajunwxx38izkyu1vgomrd18"); // print("c", info); UNSUPPORTED("2acpcykvd9wut6d3psoj4licj"); // printString(op->u.color, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("7xkva0g2qpvpgvf24yglj76mo"); // case xd_grad_pen_color: UNSUPPORTED("etajunwxx38izkyu1vgomrd18"); // print("c", info); UNSUPPORTED("dn1ii4k6v4t36te9fit9p5ow"); // toGradString (&xb, &op->u.grad_color); UNSUPPORTED("50kwynjmi5e57cvsa7vzmi43r"); // printString((((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf)), print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("p898bkyv60y69qbm68pjwrc"); // case xd_fill_color: UNSUPPORTED("42hiueari9313xfmjkmlsh4nl"); // print("C", info); UNSUPPORTED("2acpcykvd9wut6d3psoj4licj"); // printString(op->u.color, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("iqk6nvbp31j9twtqmoldcx45"); // case xd_grad_fill_color: UNSUPPORTED("42hiueari9313xfmjkmlsh4nl"); // print("C", info); UNSUPPORTED("dn1ii4k6v4t36te9fit9p5ow"); // toGradString (&xb, &op->u.grad_color); UNSUPPORTED("50kwynjmi5e57cvsa7vzmi43r"); // printString((((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf)), print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("a19xwyhpt7uym00dh6pmlvhhk"); // case xd_polyline: UNSUPPORTED("bnzcmoivqx29pzecf56klb5rt"); // print("L", info); UNSUPPORTED("6jpvv2wygo44odwyu9lynwlla"); // printPolyline(&op->u.polyline, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8iuq6qr8jjaqun0ulqu2u1x77"); // case xd_text: UNSUPPORTED("1covx2pxt7w158hh2znfdjibj"); // print("T", info); UNSUPPORTED("du2g2u2x2kjtop4xp0foszscr"); // printInt(op->u.text.x, print, info); UNSUPPORTED("e5fzs5nglnsh9m8cvrm6mhh9j"); // printInt(op->u.text.y, print, info); UNSUPPORTED("12ip8eyyw9723ifasdged1v2g"); // printAlign(op->u.text.align, print, info); UNSUPPORTED("dff5na2fdib9h0c3ltg1q62m1"); // printInt(op->u.text.width, print, info); UNSUPPORTED("4j0eb8wt0yftyu0xsxwmht5y0"); // printString(op->u.text.text, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("7mkkywc80hjajd0vttqrsfcsz"); // case xd_font: UNSUPPORTED("5cr592wslkjhte61diwmbbiao"); // print("F", info); UNSUPPORTED("2v4nq9epbpb850zg0p0ne7i9z"); // printFloat(op->u.font.size, print, info, 1); UNSUPPORTED("m0mhdn5rhrw213vfetr1qvrr"); // printString(op->u.font.name, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("4bvixlppj4a6yebt6egxnzu9e"); // case xd_fontchar: UNSUPPORTED("4paiwfmol6vza6gj5t58bj1tu"); // print("t", info); UNSUPPORTED("7f3e0jgah853oke7gxa99azrt"); // printInt(op->u.fontchar, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9c1yqt1pf6mjkrdhf7pxoea82"); // case xd_style: UNSUPPORTED("5s484jqdx1mqox7ld6hgx74h3"); // print("S", info); UNSUPPORTED("31kaly9swqallffqmpz4d8g8q"); // printString(op->u.style, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3tev1dlfh70jm5km963v1i7rr"); // case xd_image: UNSUPPORTED("8u2x1dwtxbkqfhrhav6mps4zz"); // print("I", info); UNSUPPORTED("cmjkhpcu8kludztp79rewpw3r"); // printRect(&op->u.image.pos, print, info); UNSUPPORTED("7huh682je4jhfwyzr6jis9v3e"); // printString(op->u.image.name, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("21eozdlhui5hv29fj41fdny45"); // if (more) UNSUPPORTED("3fhfv2tii5y8pg1pxuqf61414"); // print(" ", info); UNSUPPORTED("9ocnzhe59r19odwgtedwnydm"); // agxbfree (&xb); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 22qizeibm0jpts105p4r4ssu7 // static void jsonRect(xdot_rect * r, pf print, void *info) public static Object jsonRect(Object... arg) { UNSUPPORTED("atngzawms4mstydgpenmodeae"); // static void jsonRect(xdot_rect * r, pf print, void *info) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ao5jsn9dl1jrlcy9pc1frc1o0"); // char buf[128]; UNSUPPORTED("899gofiybbl25xf9pqimd5aww"); // sprintf(buf, "[%.06f,%.06f,%.06f,%.06f]", r->x, r->y, r->w, r->h); UNSUPPORTED("1pvfmyr62uut2ima4wfa83yq7"); // print(buf, info); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cfkyn9xd2i5z05dsbh0ne2rjg // static void jsonPolyline(xdot_polyline * p, pf print, void *info) public static Object jsonPolyline(Object... arg) { UNSUPPORTED("egjrc5eqaywh9r95et92i5j12"); // static void jsonPolyline(xdot_polyline * p, pf print, void *info) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("ao5jsn9dl1jrlcy9pc1frc1o0"); // char buf[128]; UNSUPPORTED("dx17wwbu2afo621ke8m0p66bx"); // print("[", info); UNSUPPORTED("1zh4rtgdnj1q51o48247n8113"); // for (i = 0; i < p->cnt; i++) { UNSUPPORTED("9kduk4sv1f8wp0siawqgz9c4o"); // sprintf(buf, "%.06f,%.06f", p->pts[i].x, p->pts[i].y); UNSUPPORTED("7oss8g82at7padefgh6z1oko6"); // print(buf, info); UNSUPPORTED("dmxnc6gb50dg4v9n0xtjz51hf"); // if (i < p->cnt-1) print(",", info); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4oeezkifb3drxphpg1cjeg70d"); // print("]", info); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 aje680ivpjh0mfzcsw9x1ht0r // static void jsonString(char *p, pf print, void *info) public static Object jsonString(Object... arg) { UNSUPPORTED("xd8vixlem3ryrydnitavheuh"); // static void jsonString(char *p, pf print, void *info) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ccqtabt7b8gb82xm56jlgsmct"); // unsigned char c, buf[BUFSIZ]; UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("3jwm77zyv02ukrvjv9jppejf7"); // agxbinit(&xb, BUFSIZ, buf); UNSUPPORTED("b3e82u1ow4q1lk03crhf13ayh"); // ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'"'))); UNSUPPORTED("5idssb31ihz3min8hoscutczg"); // while ((c = *p++)) { UNSUPPORTED("cm03my2812x36d3fncswnob84"); // if (c == '"') agxbput("\\\"", &xb); UNSUPPORTED("94otk4xgi87nfbyoszjr7j55w"); // else if (c == '\\') agxbput("\\\\", &xb); UNSUPPORTED("2jd1vf95nxgl1jccn2hj57ltn"); // /* else if (c > 127) handle UTF-8 */ UNSUPPORTED("2cra9r66covnc0bjlevlzi5jj"); // else ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)c))); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b3e82u1ow4q1lk03crhf13ayh"); // ((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'"'))); UNSUPPORTED("cc3sjgjwfnwoa96mfkgf04x8y"); // print((((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf)), info); UNSUPPORTED("1at5m9ctjn3ukv5gqtfswik02"); // agxbfree(&xb); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 en6kdtyyuve3yy1mk979yf17k // static void jsonXDot_Op(xdot_op * op, pf print, void *info, int more) public static Object jsonXDot_Op(Object... arg) { UNSUPPORTED("9emtpnf2em1erh1ibaoqmcvew"); // static void jsonXDot_Op(xdot_op * op, pf print, void *info, int more) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("esg3s800dx899v69pkng2kavv"); // unsigned char buf[BUFSIZ]; UNSUPPORTED("cx1hx0xl1yzchdfsninsbfsek"); // agxbinit (&xb, BUFSIZ, buf); UNSUPPORTED("egsu3y4d03wndsn6zaevl28hr"); // switch (op->kind) { UNSUPPORTED("92w4nbepujb6qq0yhaml31tcv"); // case xd_filled_ellipse: UNSUPPORTED("7shzdk63y5m3x09b9ff524dm6"); // print("{E : ", info); UNSUPPORTED("cfit896buh0gkw7q1d7stizok"); // jsonRect(&op->u.ellipse, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("7zgc3n99mi30jda6c8ii6z9ij"); // case xd_unfilled_ellipse: UNSUPPORTED("101qypctltvfnagwnn6e8ofl"); // print("{e : ", info); UNSUPPORTED("cfit896buh0gkw7q1d7stizok"); // jsonRect(&op->u.ellipse, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("a02o53vx69zifve1qybxt6bwg"); // case xd_filled_polygon: UNSUPPORTED("6rcmfpfjotckasov8w4bzpb7r"); // print("{P : ", info); UNSUPPORTED("cp182xgfbyzs7pjw98qp82hzb"); // jsonPolyline(&op->u.polygon, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1amgc8nhs2zl8rzvqurr02syl"); // case xd_unfilled_polygon: UNSUPPORTED("dzu0713owvp18q74j7ppfmhw6"); // print("{p : ", info); UNSUPPORTED("cp182xgfbyzs7pjw98qp82hzb"); // jsonPolyline(&op->u.polygon, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("i75482wp0xfww8yo6wanbdpe"); // case xd_filled_bezier: UNSUPPORTED("dqqwbsqud2t7i7xz1gohsqcq5"); // print("{b : ", info); UNSUPPORTED("4xnyfd4ws1ocexeydxb9xpvth"); // jsonPolyline(&op->u.bezier, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("cljys033beawi3mtklyme87lc"); // case xd_unfilled_bezier: UNSUPPORTED("e7cley1ku4kmdkxq0aawfeb2t"); // print("{B : ", info); UNSUPPORTED("4xnyfd4ws1ocexeydxb9xpvth"); // jsonPolyline(&op->u.bezier, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3hbkjfy0n8isa112ucvobo206"); // case xd_pen_color: UNSUPPORTED("c4qk7i453wj5fobvuvr3ei45w"); // print("{c : ", info); UNSUPPORTED("7zcrklnkletwkzkl84au4weoa"); // jsonString(op->u.color, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("7xkva0g2qpvpgvf24yglj76mo"); // case xd_grad_pen_color: UNSUPPORTED("c4qk7i453wj5fobvuvr3ei45w"); // print("{c : ", info); UNSUPPORTED("dn1ii4k6v4t36te9fit9p5ow"); // toGradString (&xb, &op->u.grad_color); UNSUPPORTED("efndbch1vq95g86ddil3h32hq"); // jsonString((((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf)), print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("p898bkyv60y69qbm68pjwrc"); // case xd_fill_color: UNSUPPORTED("92we9quymvrj11tqzxd0xxwun"); // print("{C : ", info); UNSUPPORTED("7zcrklnkletwkzkl84au4weoa"); // jsonString(op->u.color, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("iqk6nvbp31j9twtqmoldcx45"); // case xd_grad_fill_color: UNSUPPORTED("92we9quymvrj11tqzxd0xxwun"); // print("{C : ", info); UNSUPPORTED("dn1ii4k6v4t36te9fit9p5ow"); // toGradString (&xb, &op->u.grad_color); UNSUPPORTED("efndbch1vq95g86ddil3h32hq"); // jsonString((((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf)), print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("a19xwyhpt7uym00dh6pmlvhhk"); // case xd_polyline: UNSUPPORTED("7a0hwcdrq1t22zkthfk8rjvny"); // print("{L :", info); UNSUPPORTED("agckpp5qx857omx0z2p1omp9w"); // jsonPolyline(&op->u.polyline, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8iuq6qr8jjaqun0ulqu2u1x77"); // case xd_text: UNSUPPORTED("6su4jcg42a5hqw1iewbdbqss8"); // print("{T : [", info); UNSUPPORTED("du2g2u2x2kjtop4xp0foszscr"); // printInt(op->u.text.x, print, info); UNSUPPORTED("9vp943ns0hhsqhqgt5bko6l5e"); // print(",", info); UNSUPPORTED("e5fzs5nglnsh9m8cvrm6mhh9j"); // printInt(op->u.text.y, print, info); UNSUPPORTED("9vp943ns0hhsqhqgt5bko6l5e"); // print(",", info); UNSUPPORTED("12ip8eyyw9723ifasdged1v2g"); // printAlign(op->u.text.align, print, info); UNSUPPORTED("9vp943ns0hhsqhqgt5bko6l5e"); // print(",", info); UNSUPPORTED("dff5na2fdib9h0c3ltg1q62m1"); // printInt(op->u.text.width, print, info); UNSUPPORTED("9vp943ns0hhsqhqgt5bko6l5e"); // print(",", info); UNSUPPORTED("exr3mgpya5ekmani7zwyecckp"); // jsonString(op->u.text.text, print, info); UNSUPPORTED("1xljw3cra5mz10d8m2ofd93g1"); // print("]", info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("7mkkywc80hjajd0vttqrsfcsz"); // case xd_font: UNSUPPORTED("chm0rcdooqkwdilqs4ob4x7er"); // print("{F : [", info); UNSUPPORTED("9kl1bheiih6co789yxhdhiujb"); // op->kind = xd_font; UNSUPPORTED("2v4nq9epbpb850zg0p0ne7i9z"); // printFloat(op->u.font.size, print, info, 1); UNSUPPORTED("9vp943ns0hhsqhqgt5bko6l5e"); // print(",", info); UNSUPPORTED("4gjyxukif0iv2opnta7dxjuud"); // jsonString(op->u.font.name, print, info); UNSUPPORTED("1xljw3cra5mz10d8m2ofd93g1"); // print("]", info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("4bvixlppj4a6yebt6egxnzu9e"); // case xd_fontchar: UNSUPPORTED("7kn2tqcgq6mh4f6a2wjucq8ut"); // print("{t : ", info); UNSUPPORTED("7f3e0jgah853oke7gxa99azrt"); // printInt(op->u.fontchar, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9c1yqt1pf6mjkrdhf7pxoea82"); // case xd_style: UNSUPPORTED("c96ck14wi4rohmbat8gi5dld6"); // print("{S : ", info); UNSUPPORTED("aee1scodw2sd4ao9kc1vbmqhk"); // jsonString(op->u.style, print, info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3tev1dlfh70jm5km963v1i7rr"); // case xd_image: UNSUPPORTED("arfqyu09gop5ue9k4msfg8etr"); // print("{I : [", info); UNSUPPORTED("71vovzeon9tb2c11s1nknqmff"); // jsonRect(&op->u.image.pos, print, info); UNSUPPORTED("9vp943ns0hhsqhqgt5bko6l5e"); // print(",", info); UNSUPPORTED("cr1qzeh98mlvqnlw58iuual50"); // jsonString(op->u.image.name, print, info); UNSUPPORTED("1xljw3cra5mz10d8m2ofd93g1"); // print("]", info); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("21eozdlhui5hv29fj41fdny45"); // if (more) UNSUPPORTED("5b86atqkvtk6yh0jjr574te6i"); // print("},\n", info); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("697b92co0pv9qoy9ikskp8tt2"); // print("}\n", info); UNSUPPORTED("9ocnzhe59r19odwgtedwnydm"); // agxbfree (&xb); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2zdgagi4yv5fkpnso5ildjfj5 // static void _printXDot(xdot * x, pf print, void *info, print_op ofn) public static Object _printXDot(Object... arg) { UNSUPPORTED("beqsyisd37qh2rmab3wmlihg9"); // static void _printXDot(xdot * x, pf print, void *info, print_op ofn) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("7iglpnbs5h4cbinybqfog9ddx"); // xdot_op *op; UNSUPPORTED("7hh6k0a6zqwhdnmtvr8eessta"); // char *base = (char *) (x->ops); UNSUPPORTED("budcfgz6nozjl4wd3lhsp20s7"); // for (i = 0; i < x->cnt; i++) { UNSUPPORTED("coll83cylkgt1g7npgfdqqgx3"); // op = (xdot_op *) (base + i * x->sz); UNSUPPORTED("dh2m2dnrjv9clw1u2sgwmpw6t"); // ofn(op, print, info, (i < x->cnt - 1)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1c9ib0ywnb7bedzxnss4cmagy // char *sprintXDot(xdot * x) public static Object sprintXDot(Object... arg) { UNSUPPORTED("2e52l2dihzy7a2f1vl7qlv1xl"); // char *sprintXDot(xdot * x) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8yytudftst76763qgnjebkzhm"); // char *s; UNSUPPORTED("esg3s800dx899v69pkng2kavv"); // unsigned char buf[BUFSIZ]; UNSUPPORTED("9gou5otj6s39l2cbyc8i5i5lq"); // agxbuf xb; UNSUPPORTED("3jwm77zyv02ukrvjv9jppejf7"); // agxbinit(&xb, BUFSIZ, buf); UNSUPPORTED("6sioi1y1n9tqffo04oybnku8f"); // _printXDot(x, (pf) agxbput, &xb, printXDot_Op); UNSUPPORTED("ezli236dfm9v74jhi9tffjqlg"); // s = strdup((((((&xb)->ptr >= (&xb)->eptr) ? agxbmore(&xb,1) : 0), (int)(*(&xb)->ptr++ = ((unsigned char)'\0'))),(char*)((&xb)->ptr = (&xb)->buf))); UNSUPPORTED("1at5m9ctjn3ukv5gqtfswik02"); // agxbfree(&xb); UNSUPPORTED("3y6wj3ntgmr1qkdpm7wp1dsch"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eyjcl48szw6vtlxtutpssg7q5 // void fprintXDot(FILE * fp, xdot * x) public static Object fprintXDot(Object... arg) { UNSUPPORTED("85u4x93wot46fvnzf3cz0cfk0"); // void fprintXDot(FILE * fp, xdot * x) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1qdeobw8612jy9o2hfcrb6kq2"); // _printXDot(x, (pf) fputs, fp, printXDot_Op); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 701gu0x25va3ckongikjzclu2 // void jsonXDot(FILE * fp, xdot * x) public static Object jsonXDot(Object... arg) { UNSUPPORTED("8gckq5ubk6r40s6smk07wzmip"); // void jsonXDot(FILE * fp, xdot * x) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6izaqjssjpc0w431vv0fizft2"); // fputs ("[\n", fp); UNSUPPORTED("4ui1pnf80zlet8vuuq94tv91m"); // _printXDot(x, (pf) fputs, fp, jsonXDot_Op); UNSUPPORTED("d0endh1to4wsuqqpyuqcwflcz"); // fputs ("]\n", fp); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eu3dz6gm2u949z4rva28vws5z // static void freeXOpData(xdot_op * x) public static Object freeXOpData(Object... arg) { UNSUPPORTED("d67njmp17xncuo32921x74jb7"); // static void freeXOpData(xdot_op * x) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ebv1xjp5fu1yrwjo0u1nkgbku"); // switch (x->kind) { UNSUPPORTED("a02o53vx69zifve1qybxt6bwg"); // case xd_filled_polygon: UNSUPPORTED("1amgc8nhs2zl8rzvqurr02syl"); // case xd_unfilled_polygon: UNSUPPORTED("3bulq0614xay7aipkjqh6zpyj"); // free(x->u.polyline.pts); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("i75482wp0xfww8yo6wanbdpe"); // case xd_filled_bezier: UNSUPPORTED("cljys033beawi3mtklyme87lc"); // case xd_unfilled_bezier: UNSUPPORTED("3bulq0614xay7aipkjqh6zpyj"); // free(x->u.polyline.pts); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("a19xwyhpt7uym00dh6pmlvhhk"); // case xd_polyline: UNSUPPORTED("3bulq0614xay7aipkjqh6zpyj"); // free(x->u.polyline.pts); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8iuq6qr8jjaqun0ulqu2u1x77"); // case xd_text: UNSUPPORTED("bsij5o7b7yq4jagg1x1rw9m7b"); // free(x->u.text.text); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("p898bkyv60y69qbm68pjwrc"); // case xd_fill_color: UNSUPPORTED("3hbkjfy0n8isa112ucvobo206"); // case xd_pen_color: UNSUPPORTED("4fm7etfn9hr7qh74k70k45uc5"); // free(x->u.color); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("iqk6nvbp31j9twtqmoldcx45"); // case xd_grad_fill_color: UNSUPPORTED("7xkva0g2qpvpgvf24yglj76mo"); // case xd_grad_pen_color: UNSUPPORTED("eeydb7vp5du56qijz8fccw2r3"); // freeXDotColor (&x->u.grad_color); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("7mkkywc80hjajd0vttqrsfcsz"); // case xd_font: UNSUPPORTED("5tw7fqrjrai5235dxqqspkn4e"); // free(x->u.font.name); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("9c1yqt1pf6mjkrdhf7pxoea82"); // case xd_style: UNSUPPORTED("7ubzpnx9p19ff69lqpgd94zvj"); // free(x->u.style); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3tev1dlfh70jm5km963v1i7rr"); // case xd_image: UNSUPPORTED("1hkdbbhj8w4le1mure7j1iycv"); // free(x->u.image.name); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6w9r3p709c95b1186uuktgd6w // void freeXDot (xdot * x) public static Object freeXDot(Object... arg) { UNSUPPORTED("bkwtbjppiirw4uu074jdrqmwx"); // void freeXDot (xdot * x) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("7iglpnbs5h4cbinybqfog9ddx"); // xdot_op *op; UNSUPPORTED("ejkl9z7itgy7zzscudx1yzdk7"); // char *base; UNSUPPORTED("3wjppwgev4ff3xk0a3t00ad33"); // freefunc_t ff = x->freefunc; UNSUPPORTED("122mngve03ds89670xc36bby4"); // if (!x) return; UNSUPPORTED("bfek0k78f6s41yzixruv7bn0n"); // base = (char *) (x->ops); UNSUPPORTED("budcfgz6nozjl4wd3lhsp20s7"); // for (i = 0; i < x->cnt; i++) { UNSUPPORTED("coll83cylkgt1g7npgfdqqgx3"); // op = (xdot_op *) (base + i * x->sz); UNSUPPORTED("btmjd8b69pae4tiax28j2a9yb"); // if (ff) ff (op); UNSUPPORTED("7guxp0atlez0kkyrftijyd56n"); // freeXOpData(op); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bh93g0pb87hg3tj0uqdyob6ch"); // free(base); UNSUPPORTED("8uuggodur7e2m5hhf7yudpatc"); // free(x); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5ppkb51932f7y8920b91b8yz0 // int statXDot (xdot* x, xdot_stats* sp) public static Object statXDot(Object... arg) { UNSUPPORTED("b17qzxcu2x9pfzv1bgj20qzsu"); // int statXDot (xdot* x, xdot_stats* sp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("7iglpnbs5h4cbinybqfog9ddx"); // xdot_op *op; UNSUPPORTED("ejkl9z7itgy7zzscudx1yzdk7"); // char *base; UNSUPPORTED("dvr4f7ur0dz4axrewk8pjbmr6"); // if (!x || !sp) return 1; UNSUPPORTED("dceumk5yz37ggmopa5ozrd0kd"); // memset(sp, 0, sizeof(xdot_stats)); UNSUPPORTED("9qgptx96avnkvh76z1iqxnluz"); // sp->cnt = x->cnt; UNSUPPORTED("bfek0k78f6s41yzixruv7bn0n"); // base = (char *) (x->ops); UNSUPPORTED("budcfgz6nozjl4wd3lhsp20s7"); // for (i = 0; i < x->cnt; i++) { UNSUPPORTED("coll83cylkgt1g7npgfdqqgx3"); // op = (xdot_op *) (base + i * x->sz); UNSUPPORTED("a11dc1tsoh8jlk9a6zq7xidtf"); // switch (op->kind) { UNSUPPORTED("gyhetlwsld2yu7e13jh9wl0p"); // case xd_filled_ellipse: UNSUPPORTED("7o72maa292xeug6fqyefi5yeh"); // case xd_unfilled_ellipse: UNSUPPORTED("byo1z59r61djcdrqo2sz0s6d8"); // sp->n_ellipse++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("c4cta0iol0ehph9h9jbj3hq6b"); // case xd_filled_polygon: UNSUPPORTED("bouwa31z2x0t0i08rrhgcc80s"); // case xd_unfilled_polygon: UNSUPPORTED("n653bv9uo9zdwuay4ttk727m"); // sp->n_polygon++; UNSUPPORTED("8pkl31upi6bo7e5456dqgg9cf"); // sp->n_polygon_pts += op->u.polygon.cnt; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("c5d0rnemshsbpz91xa6p8zlgm"); // case xd_filled_bezier: UNSUPPORTED("cfxvwl549fde103677s4mrkan"); // case xd_unfilled_bezier: UNSUPPORTED("bc9n0o6ayfum7bnpr3uy803re"); // sp->n_bezier++; UNSUPPORTED("eong22lj6t9v9twe68w6225vm"); // sp->n_bezier_pts += op->u.bezier.cnt; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("2o8knajzbqdw17pjofl3lyba5"); // case xd_polyline: UNSUPPORTED("5yiqntymnbiahfga4vc7fodvi"); // sp->n_polyline++; UNSUPPORTED("wqyxazka9baia8rl594mcn8v"); // sp->n_polyline_pts += op->u.polyline.cnt; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("3j1afgdctetzfhmpq1in869a8"); // case xd_text: UNSUPPORTED("cmtkneyksr4n2nqm6zix8obpb"); // sp->n_text++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("a7hdcxzowxlm4uwwzc9birrhz"); // case xd_image: UNSUPPORTED("cyrdu153ri3djcqvdysa3e9ma"); // sp->n_image++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5iiy6stlclt7q11quzekzoahe"); // case xd_fill_color: UNSUPPORTED("dasyqbofzz98834s6dlt2j59r"); // case xd_pen_color: UNSUPPORTED("drrnos6mkmowo515fz3aho484"); // sp->n_color++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("awaj31d0herhghbn9hyh0h1ud"); // case xd_grad_fill_color: UNSUPPORTED("4jem039cg71t5w6niim5cmtja"); // case xd_grad_pen_color: UNSUPPORTED("a0wcwsdvkhuvy96sq00kf9bdv"); // sp->n_gradcolor++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5buaw3jwt248z13cbi4dw72rv"); // case xd_font: UNSUPPORTED("9vmuklbiba31872a14t1ah25g"); // sp->n_font++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("3zomvq2vb2nxfyjrz92qbvebb"); // case xd_fontchar: UNSUPPORTED("ab2c6l3irdvzagnh22t7cm7u7"); // sp->n_fontchar++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("8y8p7g08bet801pbrz3v2318k"); // case xd_style: UNSUPPORTED("64gbg1bn71xd32z3wwcxw7nvs"); // sp->n_style++; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5ujjs4gho9mjjupbibyqyplxp"); // default : UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 99e5rt9esmjy9qkrpjj7ynswj // xdot_grad_type colorType (char* cp) public static Object colorType(Object... arg) { UNSUPPORTED("cwdrzw5wilfdxd4c2q0iq3jk7"); // xdot_grad_type UNSUPPORTED("4mpmfofo3mrmcqks805lq8fcz"); // colorType (char* cp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cr1ew9y7c1x3j9hax94mlznse"); // xdot_grad_type rv; UNSUPPORTED("eck0zpg9yxtq1rk3duhbe3bra"); // switch (*cp) { UNSUPPORTED("5hf3lvn9xppbffbljy7ctxuws"); // case '[' : UNSUPPORTED("cfshpws9bhzz0wwfffkxsx9zn"); // rv = xd_linear; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("7fug2421p5vf8mm40vy1p2m9v"); // case '(' : UNSUPPORTED("4q5p6a8iwssmvo5k6r8rh4w7p"); // rv = xd_radial; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("29hi90x8rlo9f7q3mhj5dg71d"); // default : UNSUPPORTED("ev130oonej2ev8dyzjye3mh13"); // rv = xd_none; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cr8h18xais4lf1qgyf0g4asw8 // static char* radGradient (char* cp, xdot_color* clr) public static Object radGradient(Object... arg) { UNSUPPORTED("1yranxmu2maol02ulzd1ka1re"); // static char* UNSUPPORTED("c06wjt41hfdz5kqs2bgvfzceu"); // radGradient (char* cp, xdot_color* clr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("al4i3evop0chjzmtu1hand9z7"); // char* s = cp; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("8ne6p4d5pykwl1d3xk0yg0ipb"); // double d; UNSUPPORTED("3cwcf8fhklyr0kmoplrimnxif"); // xdot_color_stop* stops = NULL; UNSUPPORTED("9no119gmgymj8afua0bzjg6s"); // clr->type = xd_radial; UNSUPPORTED("7tr6l5gdo66lrh52cf1q5euke"); // s = parseReal(s, &clr->u.ring.x0); UNSUPPORTED("d12z8bcj00q4anqzoqw7ooslh"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("aj0fpvr0kifndf28kqgvnvcxj"); // s = parseReal(s, &clr->u.ring.y0); UNSUPPORTED("d12z8bcj00q4anqzoqw7ooslh"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("8z7hm5iter228czykl2d7o2u"); // s = parseReal(s, &clr->u.ring.r0); UNSUPPORTED("d12z8bcj00q4anqzoqw7ooslh"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("5szk7acro300ld5mynca1crd7"); // s = parseReal(s, &clr->u.ring.x1); UNSUPPORTED("d12z8bcj00q4anqzoqw7ooslh"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("6mszl2wb5yjgawvt86wt4xnfk"); // s = parseReal(s, &clr->u.ring.y1); UNSUPPORTED("d12z8bcj00q4anqzoqw7ooslh"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("eonwrf0vyl6643nxoe4243ufp"); // s = parseReal(s, &clr->u.ring.r1); UNSUPPORTED("d12z8bcj00q4anqzoqw7ooslh"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("21uyg70wnmu3pyvfnpsru6z84"); // s = parseInt(s, &clr->u.ring.n_stops); UNSUPPORTED("d12z8bcj00q4anqzoqw7ooslh"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("463gu8qdr6ujd5ewcr0qb7iwt"); // stops = (xdot_color_stop*)calloc((clr->u.ring.n_stops), sizeof(xdot_color_stop)); UNSUPPORTED("8ivfd2dyo5rbybzlrwxp6wyn3"); // for (i = 0; i < clr->u.ring.n_stops; i++) { UNSUPPORTED("3u2xlz22rewp744asdc0bytvg"); // s = parseReal(s, &d); UNSUPPORTED("a0v4lnk3pysd85f3bisny1r3d"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("jlx4hmg3e9km3tzyrivx28ia"); // stops[i].frac = d; UNSUPPORTED("2epsrdxaugx40ma9hbigwwgwn"); // s = parseString(s, &stops[i].color); UNSUPPORTED("a0v4lnk3pysd85f3bisny1r3d"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6m8rt8apu9sd63f5z0wr4k8b6"); // clr->u.ring.stops = stops; UNSUPPORTED("az4lr3wfzqu3df9wce5kcyady"); // return cp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 etmxebtapyaikihfpbsuehvzw // static char* linGradient (char* cp, xdot_color* clr) public static Object linGradient(Object... arg) { UNSUPPORTED("1yranxmu2maol02ulzd1ka1re"); // static char* UNSUPPORTED("b55lo3bj9pnkmwxlyocdqefjc"); // linGradient (char* cp, xdot_color* clr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("al4i3evop0chjzmtu1hand9z7"); // char* s = cp; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("8ne6p4d5pykwl1d3xk0yg0ipb"); // double d; UNSUPPORTED("3cwcf8fhklyr0kmoplrimnxif"); // xdot_color_stop* stops = NULL; UNSUPPORTED("57x32822mgbsnq8whh355dqre"); // clr->type = xd_linear; UNSUPPORTED("ark8bh8iswvlirv4bjk1bqhrw"); // s = parseReal(s, &clr->u.ling.x0); UNSUPPORTED("d12z8bcj00q4anqzoqw7ooslh"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("5td0oqu8abk0thbuh313mzd6o"); // s = parseReal(s, &clr->u.ling.y0); UNSUPPORTED("d12z8bcj00q4anqzoqw7ooslh"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("b8cvrv8opa85wy8igqk79g7d7"); // s = parseReal(s, &clr->u.ling.x1); UNSUPPORTED("d12z8bcj00q4anqzoqw7ooslh"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("dknvmejt8kipg3y8sbtkoep7z"); // s = parseReal(s, &clr->u.ling.y1); UNSUPPORTED("d12z8bcj00q4anqzoqw7ooslh"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("25k8bj46m6jyyal6cq6jekyvv"); // s = parseInt(s, &clr->u.ling.n_stops); UNSUPPORTED("d12z8bcj00q4anqzoqw7ooslh"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("5rf9mvmwp48cnm63n826n47hs"); // stops = (xdot_color_stop*)calloc((clr->u.ling.n_stops), sizeof(xdot_color_stop)); UNSUPPORTED("33udax4ghl8rclztmn80tqcms"); // for (i = 0; i < clr->u.ling.n_stops; i++) { UNSUPPORTED("3u2xlz22rewp744asdc0bytvg"); // s = parseReal(s, &d); UNSUPPORTED("a0v4lnk3pysd85f3bisny1r3d"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("jlx4hmg3e9km3tzyrivx28ia"); // stops[i].frac = d; UNSUPPORTED("2epsrdxaugx40ma9hbigwwgwn"); // s = parseString(s, &stops[i].color); UNSUPPORTED("a0v4lnk3pysd85f3bisny1r3d"); // if(!s){free(stops);return NULL;}; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ptvrq9unacmo19dbcuqsw5hs"); // clr->u.ling.stops = stops; UNSUPPORTED("az4lr3wfzqu3df9wce5kcyady"); // return cp; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2xdgjw8k00kahh9gsbqku1umv // char* parseXDotColor (char* cp, xdot_color* clr) public static Object parseXDotColor(Object... arg) { UNSUPPORTED("cqm25rponse4rsi686sbn1lo0"); // char* UNSUPPORTED("b1mfye1zmcj65mtkq9c97iewc"); // parseXDotColor (char* cp, xdot_color* clr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4jzs7e30qz04dbigz4312soqm"); // char c = *cp; UNSUPPORTED("8amt8fmqdipygnxirowfbawox"); // switch (c) { UNSUPPORTED("5hf3lvn9xppbffbljy7ctxuws"); // case '[' : UNSUPPORTED("6mfazl1u2o7yhg2w5wjkacuam"); // return linGradient (cp+1, clr); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("7fug2421p5vf8mm40vy1p2m9v"); // case '(' : UNSUPPORTED("4q00cne45f9wmtg4ib0a706ke"); // return radGradient (cp+1, clr); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("4cj632tvft1wcpezg8rs6k4ux"); // case '#' : UNSUPPORTED("akaqca9sqliw6p0fmic1xj32y"); // case '/' : UNSUPPORTED("9lk7f6fpju45nq995i59ec3uq"); // clr->type = xd_none; UNSUPPORTED("b1eztpupu7ok5m0w7u2ji432j"); // clr->u.clr = cp; UNSUPPORTED("e6bh2um7pqrlkuxueips4t7pi"); // return cp; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("29hi90x8rlo9f7q3mhj5dg71d"); // default : UNSUPPORTED("8ukynmh00mj2vf4p5rh4mn72h"); // if (isalnum(c)) { UNSUPPORTED("3osvgszhwg2l36m35rz7hjl8d"); // clr->type = xd_none; UNSUPPORTED("af2fdffzkgez7alg79ev8oafq"); // clr->u.clr = cp; UNSUPPORTED("hlsdiu6i05x2q5cxsa9myd04"); // return cp; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("7t3fvwp9cv90qu5bdjdglcgtk"); // return NULL; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 am6ngtbh04wxuyw4ohmmjtiy2 // void freeXDotColor (xdot_color* cp) public static Object freeXDotColor(Object... arg) { UNSUPPORTED("dz8v7jtcg5p1c58myh27zc9pt"); // void freeXDotColor (xdot_color* cp) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("19ar0bs2h13txvy4uwtw868m"); // if (cp->type == xd_linear) { UNSUPPORTED("81392dv0g58pud5wxe52pgf6e"); // for (i = 0; i < cp->u.ling.n_stops; i++) { UNSUPPORTED("6wzfng0iio7thawoxyaiwc5xt"); // free (cp->u.ling.stops[i].color); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3317yv7m2rcitjg00m6d02wnt"); // free (cp->u.ling.stops); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("etp4zs2ofz2x0b9yrx7z9xa08"); // else if (cp->type == xd_radial) { UNSUPPORTED("8plb1dios9foj9qo7n5jc5n7m"); // for (i = 0; i < cp->u.ring.n_stops; i++) { UNSUPPORTED("kp618tg06ig032jupq8pyp1k"); // free (cp->u.ring.stops[i].color); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("eo4csunnsophbm4ec0ilzoal8"); // free (cp->u.ring.stops); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/gen/plugin/000077500000000000000000000000001312650303100165145ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/plugin/core/000077500000000000000000000000001312650303100174445ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/plugin/core/gvloadimage_core__c.java000066400000000000000000000477351312650303100242570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.plugin.core; import static smetana.core.Macro.UNSUPPORTED; public class gvloadimage_core__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //3 29goij7ee0eovul0mzbqx3jtm // static void core_loadimage_svg(GVJ_t * job, usershape_t *us, boxf b, boolean filled) public static Object core_loadimage_svg(Object... arg) { UNSUPPORTED("6nk88j61lq1suxn7ouneycpcp"); // static void core_loadimage_svg(GVJ_t * job, usershape_t *us, boxf b, boolean filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dvlg6flv7gt7lh0gcin0uy3l9"); // double width = (b.UR.x-b.LL.x); UNSUPPORTED("9wz3r0c7kyzar3i72jllttzwb"); // double height = (b.UR.y-b.LL.y); UNSUPPORTED("372q395e12m69cssk3g0ukwxy"); // double originx = (b.UR.x+b.LL.x - width)/2; UNSUPPORTED("e0lvri5s3y6isyvxbzp7653yf"); // double originy = (b.UR.y+b.LL.y + height)/2; UNSUPPORTED("1nk5slg1h855ktp6d9uxli7u3"); // assert(job); UNSUPPORTED("7gqi0ait1bhc4v9zl8rnn0wbs"); // assert(us); UNSUPPORTED("xlffgd4fqdckxg2nbs0mxtlj"); // assert(us->name); UNSUPPORTED("exol4q9xzni0vyr9nsjkskzb8"); // gvputs(job, "name); UNSUPPORTED("3h1yo631e2fq69mxwoggya716"); // if (job->rotation) { UNSUPPORTED("a8oo007b0fig1htfcdahd040r"); // // FIXME - this is messed up >>> UNSUPPORTED("7mtjuxpu3v8f5jp6pvlspyh1a"); // gvprintf (job, "\" width=\"%gpx\" height=\"%gpx\" preserveAspectRatio=\"xMidYMid meet\" x=\"%g\" y=\"%g\"", UNSUPPORTED("24tosnol9uj8kbohgufx2s1m5"); // height, width, originx, -originy); UNSUPPORTED("ecvojyyyf3xwfchx60bgxozgv"); // gvprintf (job, " transform=\"rotate(%d %g %g)\"", UNSUPPORTED("2ttp17y9k4a6sx4o1ft0ek3pu"); // job->rotation, originx, -originy); UNSUPPORTED("57iw9hoiqdl157du9x27qmt5u"); // // <<< UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("7bmd7sn9bhyqyf2jkx9sba5us"); // gvprintf (job, "\" width=\"%gpx\" height=\"%gpx\" preserveAspectRatio=\"xMinYMin meet\" x=\"%g\" y=\"%g\"", UNSUPPORTED("aew8hp12uey186go0vuwtc02d"); // width, height, originx, -originy); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("tkpriz9q4d4xzeglsnt7kh4c"); // gvputs(job, "/>\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 awiixve7n69ck2vx4dnqj8c5o // static void core_loadimage_fig(GVJ_t * job, usershape_t *us, boxf bf, boolean filled) public static Object core_loadimage_fig(Object... arg) { UNSUPPORTED("1vcx0fw33mfxu0cqs69faf8ue"); // static void core_loadimage_fig(GVJ_t * job, usershape_t *us, boxf bf, boolean filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1250jrnrnv2ts7w11no09s3c0"); // int object_code = 2; /* always 2 for polyline */ UNSUPPORTED("148en6b5hi275wxx19n6cp8gd"); // int sub_type = 5; /* always 5 for image */ UNSUPPORTED("7tjgx9otv93qdrebs8rv7cyac"); // int line_style = 0; /* solid, dotted, dashed */ UNSUPPORTED("30e0ixftw8701xjb61twlmbhq"); // int thickness = 0; UNSUPPORTED("dftwk23t2axyh7uht019u3i0u"); // int pen_color = 0; UNSUPPORTED("cem2frpnojzzocp1y610v2plc"); // int fill_color = -1; UNSUPPORTED("8aj0xwj2jf76yit9k9rhnf5ns"); // int depth = 1; UNSUPPORTED("wus8ctd22mlgr1imanbjzq23"); // int pen_style = -1; /* not used */ UNSUPPORTED("1pvrunrk1ylb19scd5xzhf3lp"); // int area_fill = 0; UNSUPPORTED("1lwafxtlvm06paa55v0re37kn"); // double style_val = 0.0; UNSUPPORTED("emk8vv370o9kkt54b48xbckqk"); // int join_style = 0; UNSUPPORTED("at27yenlhsw2mhidnzh560qs7"); // int cap_style = 0; UNSUPPORTED("5ah3zh0iiveyst5794k0axkys"); // int radius = 0; UNSUPPORTED("6aehzky7l6ssu826xre37yhtt"); // int forward_arrow = 0; UNSUPPORTED("cvrcowx9gwh8vdfgelcwxhrhq"); // int backward_arrow = 0; UNSUPPORTED("6cgv2nf65suhgjxqoahqfc6rs"); // int npoints = 5; UNSUPPORTED("eij0m34z5k44tgdf6qkh2oy5k"); // int flipped = 0; UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b; UNSUPPORTED("1nk5slg1h855ktp6d9uxli7u3"); // assert(job); UNSUPPORTED("7gqi0ait1bhc4v9zl8rnn0wbs"); // assert(us); UNSUPPORTED("xlffgd4fqdckxg2nbs0mxtlj"); // assert(us->name); UNSUPPORTED("b9iu6kbbbdei5no6t11x88z55"); // BF2B(bf, b); UNSUPPORTED("8kr2slc04t19kslj4ccgdx67d"); // gvprintf(job, "%d %d %d %d %d %d %d %d %d %.1f %d %d %d %d %d %d\n %d %s\n", UNSUPPORTED("aqhcl971r2txljfiisq3maosf"); // object_code, sub_type, line_style, thickness, pen_color, UNSUPPORTED("7565hrxms7ljcrl0jc6pzqo2r"); // fill_color, depth, pen_style, area_fill, style_val, join_style, UNSUPPORTED("1d2j1ewli8cdqxi5o6m08r2u9"); // cap_style, radius, forward_arrow, backward_arrow, npoints, UNSUPPORTED("c7cn7eesrrv4hcu8c5cwj9hdx"); // flipped, us->name); UNSUPPORTED("dlp90sbnetvo18p7neoiy44m2"); // gvprintf(job," %d %d %d %d %d %d %d %d %d %d\n", UNSUPPORTED("3awclag88e7eg21axn0hj3pg0"); // b.LL.x, b.LL.y, UNSUPPORTED("11zvogg3ty0403x7yuwy6ojq0"); // b.LL.x, b.UR.y, UNSUPPORTED("8s3cyzq8f154a25bzouw9viu0"); // b.UR.x, b.UR.y, UNSUPPORTED("elo0t85arc0xfjh4exd58ol1u"); // b.UR.x, b.LL.y, UNSUPPORTED("3kygvlprcdhmx33nfvx79bo5"); // b.LL.x, b.LL.y); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e0srb4a7jout9298385qcktc // static void core_loadimage_vrml(GVJ_t * job, usershape_t *us, boxf b, boolean filled) public static Object core_loadimage_vrml(Object... arg) { UNSUPPORTED("6l83xscu9iu6f4q8ggkiinfbw"); // static void core_loadimage_vrml(GVJ_t * job, usershape_t *us, boxf b, boolean filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8lamppsqs7nhiu5v8k1f5jfh2"); // obj_state_t *obj; UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); // node_t *n; UNSUPPORTED("1nk5slg1h855ktp6d9uxli7u3"); // assert(job); UNSUPPORTED("dfvn35vopdad6lj7flf800tqq"); // obj = job->obj; UNSUPPORTED("cvrjqjl5r3cwa1izxxgzgzrap"); // assert(obj); UNSUPPORTED("7gqi0ait1bhc4v9zl8rnn0wbs"); // assert(us); UNSUPPORTED("xlffgd4fqdckxg2nbs0mxtlj"); // assert(us->name); UNSUPPORTED("8vniyq800jfq5vcshi73on9n1"); // n = job->obj->u.n; UNSUPPORTED("25fhmphgra40j368i6b09n5xz"); // assert(n); UNSUPPORTED("5s8sa7g2p1i5jr6wwil4fkbal"); // gvprintf(job, "Shape {\n"); UNSUPPORTED("7ku2bmvaeet8qzuuiubu8f6m9"); // gvprintf(job, " appearance Appearance {\n"); UNSUPPORTED("c4wvt5ni6d27pjcj501qxdy4r"); // gvprintf(job, " material Material {\n"); UNSUPPORTED("buqlt6jt41o18ca6qvrnxo9zu"); // gvprintf(job, " ambientIntensity 0.33\n"); UNSUPPORTED("9732sepoh8vxkxd5c5z6n1xob"); // gvprintf(job, " diffuseColor 1 1 1\n"); UNSUPPORTED("1ssfesmz57l8uwfj3pgj48ft9"); // gvprintf(job, " }\n"); UNSUPPORTED("3ic6hlam7i4qdhjx51lmkyl6d"); // gvprintf(job, " texture ImageTexture { url \"%s\" }\n", us->name); UNSUPPORTED("buxxkw2q5k2ois60qv3i78cx1"); // gvprintf(job, " }\n"); UNSUPPORTED("5evvn7xr8ggxco146doj8qb8d"); // gvprintf(job, "}\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dkpdahf85whho6alw0wyi0589 // static void ps_freeimage(usershape_t *us) public static Object ps_freeimage(Object... arg) { UNSUPPORTED("9sf6siqz00t6dace56itvz47b"); // static void ps_freeimage(usershape_t *us) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("47gtx7ffdovrgtqza8fnyxsug"); // free(us->data); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 nuj4ufu0lit6u72no7bfa0rd // static void core_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, boolean filled) public static Object core_loadimage_ps(Object... arg) { UNSUPPORTED("3fms3fyfhjnm6awkw5hqg4yl5"); // static void core_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, boolean filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1nk5slg1h855ktp6d9uxli7u3"); // assert(job); UNSUPPORTED("7gqi0ait1bhc4v9zl8rnn0wbs"); // assert(us); UNSUPPORTED("xlffgd4fqdckxg2nbs0mxtlj"); // assert(us->name); UNSUPPORTED("3ustk9u43nfwube24g9ve98xz"); // if (us->data) { UNSUPPORTED("afe4zn3m0v1pzuhkzgqpru8w4"); // if (us->datafree != ps_freeimage) { UNSUPPORTED("14ok3e5cytlxzf48yq4we8eg9"); // us->datafree(us); /* free incompatible cache data */ UNSUPPORTED("68mtdvgnb8rekg06am2p1had0"); // us->data = NULL; UNSUPPORTED("db62bupqi5lihbntfqe7tlesg"); // us->datafree = NULL; UNSUPPORTED("2yrrfg6saymvlwjvr1suu7q7o"); // us->datasize = 0; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6cah19vmbqd3lb4lb3na7ugk1"); // if (!us->data) { /* read file into cache */ UNSUPPORTED("2lo7xzfretk2gbeewv8amikyl"); // int fd; UNSUPPORTED("4vpkg06n5nt4a7401vz4vcqu8"); // struct stat statbuf; UNSUPPORTED("d5mf2vtj9iib67q8oqf1ddfoy"); // if (!gvusershape_file_access(us)) UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return; UNSUPPORTED("de56k988tghtjxf7im4t0oh4w"); // fd = fileno(us->f); UNSUPPORTED("6c857qum6nd7x5wc8q1jm7m0j"); // switch (us->type) { UNSUPPORTED("9fdmy6cmkcs9xgg5u8d0r8az9"); // case FT_PS: UNSUPPORTED("362x4fjrplaceoflc8oicvclf"); // case FT_EPS: UNSUPPORTED("9rlgca7weqdcml6h34damptdz"); // fstat(fd, &statbuf); UNSUPPORTED("aaef3zsmqgw7i8yzrzsa9f8ub"); // us->datasize = statbuf.st_size; UNSUPPORTED("mvnxwqq1g43j0zwetc2lrbp0"); // us->data = malloc(statbuf.st_size); UNSUPPORTED("8xav6nswhw039it5hkieqssre"); // read(fd, us->data, statbuf.st_size); UNSUPPORTED("als7ie9jjt7wa384s4idszvj8"); // us->must_inline = NOT(0); UNSUPPORTED("d1pumbibe8xz2i7gr1wj6zdak"); // break; UNSUPPORTED("84cl4r6uveabh1lahtyw0ptb8"); // default: UNSUPPORTED("d1pumbibe8xz2i7gr1wj6zdak"); // break; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("a9tazqo3lt2plzwxwbkazmark"); // if (us->data) UNSUPPORTED("8xta46k7s6x1mogx5xomvejr3"); // us->datafree = ps_freeimage; UNSUPPORTED("98myit7krb8a180ecsgm7wvjm"); // gvusershape_file_release(us); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3ustk9u43nfwube24g9ve98xz"); // if (us->data) { UNSUPPORTED("50th0fnys6h3ghiyg8f4dfbdc"); // gvprintf(job, "gsave %g %g translate newpath\n", UNSUPPORTED("5uhskkri1bhns0e9ddbr7mg4u"); // b.LL.x - (double)(us->x), b.LL.y - (double)(us->y)); UNSUPPORTED("e1l98s1a0wb698pmm0ai481qi"); // if (us->must_inline) UNSUPPORTED("988u2js5bqmntibjg98i07nz"); // epsf_emit_body(job, us); UNSUPPORTED("35nw1pbiz2p3s6qwlam5eoo3m"); // else UNSUPPORTED("az4q3r5wmapqascnw6mjghrmm"); // gvprintf(job, "user_shape_%d\n", us->macro_id); UNSUPPORTED("1u16m9wjpuzt2gfhhilh5n9nv"); // gvprintf(job, "grestore\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cjibf8ypal3z8qjb7adn6tcix // static void core_loadimage_pslib(GVJ_t * job, usershape_t *us, boxf b, boolean filled) public static Object core_loadimage_pslib(Object... arg) { UNSUPPORTED("7n8f9on2nkf9werk0kza1vc7b"); // static void core_loadimage_pslib(GVJ_t * job, usershape_t *us, boxf b, boolean filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("en6q26cyrg17g6yd6el73b3ns"); // pointf AF[4]; UNSUPPORTED("1l6nftr6o7rxwrg50yru6yu46"); // shape_desc *shape; UNSUPPORTED("1nk5slg1h855ktp6d9uxli7u3"); // assert(job); UNSUPPORTED("7gqi0ait1bhc4v9zl8rnn0wbs"); // assert(us); UNSUPPORTED("xlffgd4fqdckxg2nbs0mxtlj"); // assert(us->name); UNSUPPORTED("bbiovnfd6hlkzpdyqejaf3qb"); // if ((shape = (shape_desc*)us->data)) { UNSUPPORTED("39kp6t9wenypchz2s58mkxgup"); // AF[0] = b.LL; UNSUPPORTED("qpi4gufgxrvf8bx626lhkjwi"); // AF[2] = b.UR; UNSUPPORTED("9lkdjc4of18mpcfe956xmzwet"); // AF[1].x = AF[0].x; UNSUPPORTED("dpljjfhpwqivqkp6h79do3mqj"); // AF[1].y = AF[2].y; UNSUPPORTED("32r2hu93lwrbd3zwxt303gh03"); // AF[3].x = AF[2].x; UNSUPPORTED("edu3nrugftlt30kevnwc8y7f8"); // AF[3].y = AF[0].y; UNSUPPORTED("9iv8yeefz2ll4zeeboqqtd4xu"); // if (filled) { UNSUPPORTED("19zazncbqb0fh25slowlirl7k"); // // ps_begin_context(); UNSUPPORTED("44dzyphll6m2rt2zvmxpxgr21"); // // ps_set_color(S[SP].fillcolor); UNSUPPORTED("dhq1jxkwjggs0noew4i58yadj"); // gvprintf(job, "[ "); UNSUPPORTED("8pozief1dm7j8crbw5313ff7f"); // for (i = 0; i < 4; i++) UNSUPPORTED("4t5xu3wpffox1dcs6a4ulrynd"); // gvprintf(job, "%g %g ", AF[i].x, AF[i].y); UNSUPPORTED("6peyrbfphj7hkptgimqm27sca"); // gvprintf(job, "%g %g ", AF[0].x, AF[0].y); UNSUPPORTED("akrzmc2n64ahl34msb4iapdqx"); // gvprintf(job, "] %d true %s\n", 4, us->name); UNSUPPORTED("3i17c088ltdll07ap9tqxpxs3"); // // ps_end_context(); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("erik7m9ivop3xh5y5fpto8q1n"); // gvprintf(job, "[ "); UNSUPPORTED("ccewlfwc1gagj8vpwd576azfu"); // for (i = 0; i < 4; i++) UNSUPPORTED("a68qmvv7ajcdvz4ko51ja25wy"); // gvprintf(job, "%g %g ", AF[i].x, AF[i].y); UNSUPPORTED("eh6hpah3dqqf8n4pf1hn0urfi"); // gvprintf(job, "%g %g ", AF[0].x, AF[0].y); UNSUPPORTED("aatxb1868s4jg7ocv1yy2rr7p"); // gvprintf(job, "] %d false %s\n", 4, us->name); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 11j2m0cxdp9z59j3doz82ei2o // static void core_loadimage_vml(GVJ_t * job, usershape_t *us, boxf b, boolean filled) public static Object core_loadimage_vml(Object... arg) { UNSUPPORTED("dp5zde6274mdvioy5u59hk5jc"); // static void core_loadimage_vml(GVJ_t * job, usershape_t *us, boxf b, boolean filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("oe4wxcwk2rxtensxhcfp70d8"); // unsigned int graphHeight; UNSUPPORTED("e1b0xy1qef9gc82t0ivbjb8zh"); // graphHeight =(int)(job->bb.UR.y - job->bb.LL.y); UNSUPPORTED("56vt25hvpvbnprocv3ga6amb9"); // gvprintf (job, "name, b.UR.x - b.LL.x, b.UR.y - b.LL.y, b.LL.x, graphHeight-b.UR.y); UNSUPPORTED("bq4vgoqdsjkwuyyspku5kznhh"); // gvputs(job, " />\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9rnpduughujmxwpfj9uny5yfw // static void core_loadimage_tk(GVJ_t * job, usershape_t *us, boxf b, boolean filled) public static Object core_loadimage_tk(Object... arg) { UNSUPPORTED("2us7fsaz0xyimqhdmd2oabwoo"); // static void core_loadimage_tk(GVJ_t * job, usershape_t *us, boxf b, boolean filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("wkagaos2d0sha79uninstvkl"); // gvprintf (job, "image create photo \"photo_%s\" -file \"%s\"\n", UNSUPPORTED("38kbczko9ldqe6gfwzsqn7ne1"); // us->name, us->name); UNSUPPORTED("57qf7m9y8ekwlo8zafyotx1vi"); // gvprintf (job, "$c create image %.2f %.2f -image \"photo_%s\"\n", UNSUPPORTED("amiu4sx3oah6j8cumbyac7fgu"); // us->name, (b.UR.x + b.LL.x) / 2, (b.UR.y + b.LL.y) / 2); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7r8kuhs5mt25fif8rga7ycuk4 // void core_loadimage_null(GVJ_t *gvc, usershape_t *us, boxf b, boolean filled) public static Object core_loadimage_null(Object... arg) { UNSUPPORTED("10aeq8i34y842tyczscr6r92s"); // void core_loadimage_null(GVJ_t *gvc, usershape_t *us, boxf b, boolean filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("43g24def5o0e68iopoodbo6hq"); // /* null function - basically suppress the missing loader message */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 5caj98xv9ldmw6dinjt7jgpcx // static gvloadimage_engine_t engine_svg = //1 pv6o8s1n1h9zk3lxm9ryq5c8 // static gvloadimage_engine_t engine_fig = //1 a9e239ql9867ljor8u16cj2pf // static gvloadimage_engine_t engine_vrml = //1 8kzbk9u03208629mtai1ay942 // static gvloadimage_engine_t engine_ps = //1 dj5z2gmpjxtxsvujmovvwuyxw // static gvloadimage_engine_t engine_pslib = //1 3kvzpib9rpmlf3o00tet08n90 // static gvloadimage_engine_t engine_null = //1 bwx5544czjvaz5aigxvcx2nl // static gvloadimage_engine_t engine_xdot = //1 965gxus2gru0zhovsq4pc39w3 // static gvloadimage_engine_t engine_vml = //1 7h8ksznsrd48e4elfd9w6yqnm // static gvloadimage_engine_t engine_tk = //1 90d4e129eeox69ftipmimqjx2 // gvplugin_installed_t gvloadimage_core_types[] = } plantuml-1.2017.15/src/gen/plugin/core/gvplugin_core__c.java000066400000000000000000000072261312650303100236220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.plugin.core; public class gvplugin_core__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 bepawssupm52fq0lm5wsr16al // extern gvplugin_installed_t gvdevice_dot_types[] //1 2pmt8logi0mdp33cr7zd3t5x // extern gvplugin_installed_t gvdevice_fig_types[] //1 3ij2091oltlpvbck9v2wmkp43 // extern gvplugin_installed_t gvdevice_map_types[] //1 o66br7py774tlamewghimqwy // extern gvplugin_installed_t gvdevice_ps_types[] //1 bbd6wneeg6dm1orwkfatpg2pt // extern gvplugin_installed_t gvdevice_svg_types[] //1 6n8md2u2h4ivi8wi95wu4evhb // extern gvplugin_installed_t gvdevice_tk_types[] //1 epwx6myt1ewysie9m8plglnf2 // extern gvplugin_installed_t gvdevice_vml_types[] //1 uwhavpdt2nhldg6pblapnc4 // extern gvplugin_installed_t gvdevice_pic_types[] //1 7elvfkn2p7kfk7xsvkggoyzu6 // extern gvplugin_installed_t gvdevice_pov_types[] //1 3ym6hp8b5grhq3cqzehssxwy7 // extern gvplugin_installed_t gvrender_dot_types[] //1 6fnl9wlb1ri61mczhdj1di9l8 // extern gvplugin_installed_t gvrender_fig_types[] //1 6byuxy9waz31wtr27jgyc25il // extern gvplugin_installed_t gvrender_map_types[] //1 a0f2mn4xwrnalx5a84k2lm9u // extern gvplugin_installed_t gvrender_ps_types[] //1 91fai7sbb5q5qqqrzaq8x1wyr // extern gvplugin_installed_t gvrender_svg_types[] //1 5arrl0krk3iai3qq91lhdp395 // extern gvplugin_installed_t gvrender_tk_types[] //1 bfgrpitg0x3zaoq0u3hz4ferf // extern gvplugin_installed_t gvrender_vml_types[] //1 blbevajtwilj9dpc57os4m20m // extern gvplugin_installed_t gvrender_pic_types[] //1 dx46eihm4es1r0uynbli6oncl // extern gvplugin_installed_t gvrender_pov_types[] //1 bxmum7q70ivk3bagjvirwncj8 // extern gvplugin_installed_t gvloadimage_core_types[] //1 cbnrpy2p824ffaki379rnbq2s // static gvplugin_api_t apis[] = //1 331lykt41pc1qfqahndu3jpo0 // gvplugin_library_t gvplugin_core_LTX_library = } plantuml-1.2017.15/src/gen/plugin/core/gvrender_core_dot__c.java000066400000000000000000001423711312650303100244520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.plugin.core; import static smetana.core.Macro.UNSUPPORTED; public class gvrender_core_dot__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 9u9ddh5oeqjnkh6gb2tfp88y1 // static agxbuf* xbufs[] = //1 cf69o2d8bfvl354bx5dd5ac0e // static double penwidth [] = //1 9wf85aesqstltvkdjt9p083n0 // static unsigned int textflags[EMIT_ELABEL+1] //1 7ivt3fjvux748h2yxbenc8bqq // static xdot_state_t* xd //3 1wkd9anhtvlykvgmpcy4zkduu // static void xdot_str_xbuf (agxbuf* xb, char* pfx, char* s) public static Object xdot_str_xbuf(Object... arg) { UNSUPPORTED("eiqhtkofka0l2zcf53e6v3ylf"); // static void xdot_str_xbuf (agxbuf* xb, char* pfx, char* s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("ewqeh9hox7co8bzse7rxlkc2z"); // sprintf (buf, "%s%d -", pfx, (int)strlen(s)); UNSUPPORTED("5q33wkzo42rb2ovinz8n32geq"); // agxbput(xb, buf); UNSUPPORTED("cuyd9w1qxswgadsoaaheatuqb"); // agxbput(xb, s); UNSUPPORTED("dmja623e9ktger7ewkxjzmo84"); // ((((xb)->ptr >= (xb)->eptr) ? agxbmore(xb,1) : 0), (int)(*(xb)->ptr++ = ((unsigned char)' '))); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 mk0pj46oyko8l6ihsvvttvsc // static void xdot_str (GVJ_t *job, char* pfx, char* s) public static Object xdot_str(Object... arg) { UNSUPPORTED("80ilwf46sqp2jfv94cqcri1ic"); // static void xdot_str (GVJ_t *job, char* pfx, char* s) UNSUPPORTED("4ecslok588dpq5vf5tzktm48k"); // { UNSUPPORTED("5tol2owvqctfpttgzs7ee7b7x"); // emit_state_t emit_state = job->obj->emit_state; UNSUPPORTED("8v27eq2fu6i17hxi8j7rfmkj5"); // xdot_str_xbuf (xbufs[emit_state], pfx, s); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9uxhmu9h5insv750upobc4o0l // static void xdot_trim_zeros (char* buf, int addSpace) public static Object xdot_trim_zeros(Object... arg) { UNSUPPORTED("bvi7exukjrwib9dsydzfrdk4n"); // static void xdot_trim_zeros (char* buf, int addSpace) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7puz5on3kut1d51f3su87yzvy"); // char* dotp; UNSUPPORTED("a4px33i4moqe8ybwatz0g8k6"); // char* p; UNSUPPORTED("25j4nlrn8fb330rtpgs3znj2e"); // if ((dotp = strchr (buf,'.'))) { UNSUPPORTED("8w9fei3kxjnvyzike65mh21t7"); // p = dotp+1; UNSUPPORTED("5ntwg5wj08qs7n9uot1y5hwwf"); // while (*p) p++; // find end of string UNSUPPORTED("8gbgjwvss67q2imd2llmusuvd"); // p--; UNSUPPORTED("9mqht74ijjj8b90otim0hl4q2"); // while (*p == '0') *p-- = '\0'; UNSUPPORTED("azdcgp3weiwu7xxfo6mjw11v3"); // if (*p == '.') // If all decimals were zeros, remove ".". UNSUPPORTED("6568pmkatbjs0ljsylsyvwepv"); // *p = '\0'; UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("847zwwso12sey42b59zepembc"); // p++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4o5kpau9io5iwhvou436hc35q"); // else if (addSpace) UNSUPPORTED("e3s0jnyo85s4deod5zf8oc5hc"); // p = buf + strlen(buf); UNSUPPORTED("96j5jq7x4zyb0h1l4pde9eq3q"); // if (addSpace) { /* p points to null byte */ UNSUPPORTED("eeruol8z2e2a5p96651r1p4sc"); // *p++ = ' '; UNSUPPORTED("8wxgv4s6cq9cor6gqhrq2ho9a"); // *p = '\0'; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cot7kk25j8se9g2df0gbmku2a // static void xdot_fmt_num (char* buf, double v) public static Object xdot_fmt_num(Object... arg) { UNSUPPORTED("5jrqa3gbng6pjj5nyqacr9khf"); // static void xdot_fmt_num (char* buf, double v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5ckf35csnj99dtdulm0zo7w0y"); // sprintf(buf, "%.02f", v); UNSUPPORTED("5jyfg2es8t6ywaex3wqf67xef"); // xdot_trim_zeros (buf, 1); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d2kq7iarnvxb8dkbj93p7ug4v // static void xdot_point(agxbuf *xbuf, pointf p) public static Object xdot_point(Object... arg) { UNSUPPORTED("6twuxzj24ui8i4qsb1236n5bu"); // static void xdot_point(agxbuf *xbuf, pointf p) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("6n9sqsgqw9k9278ve5k3bf33w"); // xdot_fmt_num (buf, p.x); UNSUPPORTED("2mti8qvk2i3vu0hgebyml4mf5"); // agxbput(xbuf, buf); UNSUPPORTED("4ywl1kwk6cjwjju7h13jgn4is"); // xdot_fmt_num (buf, yDir(p.y)); UNSUPPORTED("2mti8qvk2i3vu0hgebyml4mf5"); // agxbput(xbuf, buf); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 633vtcrwss117gqzfi65hphsk // static void xdot_num(agxbuf *xbuf, double v) public static Object xdot_num(Object... arg) { UNSUPPORTED("brgmp34gkz1uzv465rpmizl3q"); // static void xdot_num(agxbuf *xbuf, double v) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("3b78vqzlsntfrji71cvxnl52w"); // xdot_fmt_num (buf, v); UNSUPPORTED("2mti8qvk2i3vu0hgebyml4mf5"); // agxbput(xbuf, buf); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 21r3xgncf7w8o613kfnmva18a // static void xdot_points(GVJ_t *job, char c, pointf * A, int n) public static Object xdot_points(Object... arg) { UNSUPPORTED("9lvr3j68zawvig186yetti81t"); // static void xdot_points(GVJ_t *job, char c, pointf * A, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5tol2owvqctfpttgzs7ee7b7x"); // emit_state_t emit_state = job->obj->emit_state; UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("279in5xyusoen2ceb3tjlpk6s"); // int i, rc; UNSUPPORTED("dwc16jocaa8wb6rvy807ka8l0"); // rc = ((((xbufs[emit_state])->ptr >= (xbufs[emit_state])->eptr) ? agxbmore(xbufs[emit_state],1) : 0), (int)(*(xbufs[emit_state])->ptr++ = ((unsigned char)c))); UNSUPPORTED("einyohdycmivi09l9gvzgu3db"); // sprintf(buf, " %d ", n); UNSUPPORTED("9rhyq2cgol181qsty6dn352bn"); // agxbput(xbufs[emit_state], buf); UNSUPPORTED("e6c6vkuvc5wlnup26rm248nss"); // for (i = 0; i < n; i++) UNSUPPORTED("f2f5qt5d5wp2skos4tmlo5tbx"); // xdot_point(xbufs[emit_state], A[i]); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9kyijycd11rekgoyg64rgqh44 // static char* color2str (unsigned char rgba[4]) public static Object color2str(Object... arg) { UNSUPPORTED("1yranxmu2maol02ulzd1ka1re"); // static char* UNSUPPORTED("bsnee5s0jupootudg18ki3jq7"); // color2str (unsigned char rgba[4]) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("796b8xr3u6v0v9uvbkc4b7w4n"); // static char buf [10]; UNSUPPORTED("eexjt0hdr3nf2yolzswuxniiu"); // if (rgba[3] == 0xFF) UNSUPPORTED("dbarmk43l3dgnnz7gsuxz67s3"); // sprintf (buf, "#%02x%02x%02x", rgba[0], rgba[1], rgba[2]); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("4563xhb68jjvke8ljnprmby5y"); // sprintf (buf, "#%02x%02x%02x%02x", rgba[0], rgba[1], rgba[2], rgba[3]); UNSUPPORTED("5jfpogdyby101eyuw2dhtb5cg"); // return buf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 blqpsel4jzy8tyzcf9wk6ratz // static void xdot_pencolor (GVJ_t *job) public static Object xdot_pencolor(Object... arg) { UNSUPPORTED("b6vezfwlb588uhbpb1thq72v8"); // static void xdot_pencolor (GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("eltetchcdlchlpqxrbt93wyl5"); // xdot_str (job, "c ", color2str (job->obj->pencolor.u.rgba)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3aob3mp6ea6z3uiuz7je5xgnp // static void xdot_fillcolor (GVJ_t *job) public static Object xdot_fillcolor(Object... arg) { UNSUPPORTED("ejjftiuyrxovyl636o8pnpcj6"); // static void xdot_fillcolor (GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("boz2fjqox1pq60m56eico3v0p"); // xdot_str (job, "C ", color2str (job->obj->fillcolor.u.rgba)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 akblfseh504uvt16lpiz8w2rs // static void xdot_style (GVJ_t *job) public static Object xdot_style(Object... arg) { UNSUPPORTED("db76ixln345h83r6te7s58z7x"); // static void xdot_style (GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("afhr40frddxftx356soi57rg3"); // unsigned char buf0[BUFSIZ]; UNSUPPORTED("2gnjttug203yi2oh7n4j4a3hg"); // char buf [128]; /* enough to hold a double */ UNSUPPORTED("d7xb6maj0ydcfhxp7ibk0szkw"); // agxbuf xbuf; UNSUPPORTED("ccvotvthaccdugxq4vhorvsrj"); // char* p, **s; UNSUPPORTED("8lluzb23zpt42lfn1j18s337z"); // int more; UNSUPPORTED("cykkurgudosfmfhpzldhi18aj"); // agxbinit(&xbuf, BUFSIZ, buf0); UNSUPPORTED("2tyl80zoe1rs9g95dx69tqk3w"); // /* First, check if penwidth state is correct */ UNSUPPORTED("6ip3ef109ytqv03buns0pf7yj"); // if (job->obj->penwidth != penwidth[job->obj->emit_state]) { UNSUPPORTED("6jbvmrfuwla67iwyeqizjvc43"); // penwidth[job->obj->emit_state] = job->obj->penwidth; UNSUPPORTED("d6elqy8gvxv6tj6ko8vrcey51"); // agxbput (&xbuf, "setlinewidth("); UNSUPPORTED("9drk08ktte1le712u4fb8cx3e"); // sprintf (buf, "%.3f", job->obj->penwidth); UNSUPPORTED("2x3jw5oglrvbttiesukwcs1gc"); // xdot_trim_zeros (buf, 0); UNSUPPORTED("8e0455x8th67gro0sitvj7rtm"); // agxbput(&xbuf, buf); UNSUPPORTED("cazm9btr28fejr5n4cwsma7tw"); // ((((&xbuf)->ptr >= (&xbuf)->eptr) ? agxbmore(&xbuf,1) : 0), (int)(*(&xbuf)->ptr++ = ((unsigned char)')'))); UNSUPPORTED("caplzv8idwd0qnoaq3w2vy5ff"); // xdot_str (job, "S ", (((((&xbuf)->ptr >= (&xbuf)->eptr) ? agxbmore(&xbuf,1) : 0), (int)(*(&xbuf)->ptr++ = ((unsigned char)'\0'))),(char*)((&xbuf)->ptr = (&xbuf)->buf))); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ezgpaevuurfv1bn90du0txpse"); // /* now process raw style, if any */ UNSUPPORTED("e6dlq4pw8dw2g5an1ea0m2wii"); // s = job->obj->rawstyle; UNSUPPORTED("5io7qudgtw3wrjkc5ndpni08d"); // if (!s) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("catth0ogzsfgrpygkfd0cbryu"); // while ((p = *s++)) { UNSUPPORTED("dodemy5m4a5amvr3bhs96zfni"); // if ((*(p)==*("filled")&&!strcmp(p,"filled")) || (*(p)==*("bold")&&!strcmp(p,"bold")) || (*(p)==*("setlinewidth")&&!strcmp(p,"setlinewidth"))) continue; UNSUPPORTED("2nyfr4iutosldh71xx4giq7ld"); // agxbput(&xbuf, p); UNSUPPORTED("59gu8gjy0gkpkkgmy7w3c6hz8"); // while (*p) UNSUPPORTED("a0t85lvr3qdf70ajg30c8eadd"); // p++; UNSUPPORTED("5ms90gds9d7jyok5oqzrumfjz"); // p++; UNSUPPORTED("1rk1yssdqhcu8mg9wsz5s403g"); // if (*p) { /* arguments */ UNSUPPORTED("ezc5o9bz1652ofqsi8ceaswyk"); // ((((&xbuf)->ptr >= (&xbuf)->eptr) ? agxbmore(&xbuf,1) : 0), (int)(*(&xbuf)->ptr++ = ((unsigned char)'('))); UNSUPPORTED("dld8yejzb1pzu4wrg97fvx3jc"); // more = 0; UNSUPPORTED("3xy02it8l5j1ou46bxrmcmj9g"); // while (*p) { UNSUPPORTED("6w8b4rzmwbn832ggmg5z2hz3k"); // if (more) UNSUPPORTED("f014jjwukcwe1h27o8tb4elz7"); // ((((&xbuf)->ptr >= (&xbuf)->eptr) ? agxbmore(&xbuf,1) : 0), (int)(*(&xbuf)->ptr++ = ((unsigned char)','))); UNSUPPORTED("f14rwp6u955tfu6cz9c5dykoe"); // agxbput(&xbuf, p); UNSUPPORTED("cc4ka25bv1qo01yebmhukrudh"); // while (*p) p++; UNSUPPORTED("9qg60ras48o8da5tv4x27825z"); // p++; UNSUPPORTED("b7uckf8huqm9rbpqs7i2shp26"); // more++; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("e2cqo5jxgtpd6regkfgu974a2"); // ((((&xbuf)->ptr >= (&xbuf)->eptr) ? agxbmore(&xbuf,1) : 0), (int)(*(&xbuf)->ptr++ = ((unsigned char)')'))); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("caplzv8idwd0qnoaq3w2vy5ff"); // xdot_str (job, "S ", (((((&xbuf)->ptr >= (&xbuf)->eptr) ? agxbmore(&xbuf,1) : 0), (int)(*(&xbuf)->ptr++ = ((unsigned char)'\0'))),(char*)((&xbuf)->ptr = (&xbuf)->buf))); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9audbw57i2imjhpg3zy9xu5mv"); // agxbfree(&xbuf); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 djj0v1y6ft33l01s92mhmr3j1 // static void xdot_end_node(GVJ_t* job) public static Object xdot_end_node(Object... arg) { UNSUPPORTED("95abravuaefe897744oovdbgg"); // static void xdot_end_node(GVJ_t* job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2lezgk5o9qmdslgwzpqrn1h4k"); // Agnode_t* n = job->obj->u.n; UNSUPPORTED("dnj3m7u15yca5e0djce9ndvvp"); // if ((((xbufs[EMIT_NDRAW])->ptr)-((xbufs[EMIT_NDRAW])->buf))) UNSUPPORTED("3erl3ds6swm4uogbpfesahw0u"); // agxset(n, xd->n_draw, (((((xbufs[EMIT_NDRAW])->ptr >= (xbufs[EMIT_NDRAW])->eptr) ? agxbmore(xbufs[EMIT_NDRAW],1) : 0), (int)(*(xbufs[EMIT_NDRAW])->ptr++ = ((unsigned char)'\0'))),(char*)((xbufs[EMIT_NDRAW])->ptr = (xbufs[EMIT_NDRAW])->buf))); UNSUPPORTED("d19b8c2q143j6pjrn1imkr6cb"); // if ((((xbufs[EMIT_NLABEL])->ptr)-((xbufs[EMIT_NLABEL])->buf))) UNSUPPORTED("33169rwgvzvqy0fn0jr86ukzc"); // agxset(n, xd->n_l_draw, (((((xbufs[EMIT_NLABEL])->ptr >= (xbufs[EMIT_NLABEL])->eptr) ? agxbmore(xbufs[EMIT_NLABEL],1) : 0), (int)(*(xbufs[EMIT_NLABEL])->ptr++ = ((unsigned char)'\0'))),(char*)((xbufs[EMIT_NLABEL])->ptr = (xbufs[EMIT_NLABEL])->buf))); UNSUPPORTED("9ethb4ntxk0h21pjx0sv6g8w5"); // penwidth[EMIT_NDRAW] = 1; UNSUPPORTED("d8dohyb2l7olxqf7no2cc3182"); // penwidth[EMIT_NLABEL] = 1; UNSUPPORTED("4ib1axosef2xal7sx0hnv73el"); // textflags[EMIT_NDRAW] = 0; UNSUPPORTED("27ks7p26fei0vcpbqhvhyreve"); // textflags[EMIT_NLABEL] = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ephot24v485u441t22spc1qxd // static void xdot_end_edge(GVJ_t* job) public static Object xdot_end_edge(Object... arg) { UNSUPPORTED("5h94a39uxt4m5kq9bcyd2jcup"); // static void xdot_end_edge(GVJ_t* job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cs9lngw1dgp8n3lvti2wx4ro4"); // Agedge_t* e = job->obj->u.e; UNSUPPORTED("5aqbusskhk2rgmt0v3anuaod0"); // if ((((xbufs[EMIT_EDRAW])->ptr)-((xbufs[EMIT_EDRAW])->buf))) UNSUPPORTED("8jbq0gt6cplwr2t4lb8r3o03u"); // agxset(e, xd->e_draw, (((((xbufs[EMIT_EDRAW])->ptr >= (xbufs[EMIT_EDRAW])->eptr) ? agxbmore(xbufs[EMIT_EDRAW],1) : 0), (int)(*(xbufs[EMIT_EDRAW])->ptr++ = ((unsigned char)'\0'))),(char*)((xbufs[EMIT_EDRAW])->ptr = (xbufs[EMIT_EDRAW])->buf))); UNSUPPORTED("7jyyj1fsz2gdq8093dto36oql"); // if ((((xbufs[EMIT_TDRAW])->ptr)-((xbufs[EMIT_TDRAW])->buf))) UNSUPPORTED("113qjp9jjxo9ee7n0norzpy94"); // agxset(e, xd->t_draw, (((((xbufs[EMIT_TDRAW])->ptr >= (xbufs[EMIT_TDRAW])->eptr) ? agxbmore(xbufs[EMIT_TDRAW],1) : 0), (int)(*(xbufs[EMIT_TDRAW])->ptr++ = ((unsigned char)'\0'))),(char*)((xbufs[EMIT_TDRAW])->ptr = (xbufs[EMIT_TDRAW])->buf))); UNSUPPORTED("1s5rfn5msds0g3l08ukdnatf6"); // if ((((xbufs[EMIT_HDRAW])->ptr)-((xbufs[EMIT_HDRAW])->buf))) UNSUPPORTED("5mnz5pqsbe8l1nrt4dx2qgotx"); // agxset(e, xd->h_draw, (((((xbufs[EMIT_HDRAW])->ptr >= (xbufs[EMIT_HDRAW])->eptr) ? agxbmore(xbufs[EMIT_HDRAW],1) : 0), (int)(*(xbufs[EMIT_HDRAW])->ptr++ = ((unsigned char)'\0'))),(char*)((xbufs[EMIT_HDRAW])->ptr = (xbufs[EMIT_HDRAW])->buf))); UNSUPPORTED("6dv2nqce6ve0m7l061jjlmaye"); // if ((((xbufs[EMIT_ELABEL])->ptr)-((xbufs[EMIT_ELABEL])->buf))) UNSUPPORTED("3budwb0zd8tka557wgarsszrz"); // agxset(e, xd->e_l_draw,(((((xbufs[EMIT_ELABEL])->ptr >= (xbufs[EMIT_ELABEL])->eptr) ? agxbmore(xbufs[EMIT_ELABEL],1) : 0), (int)(*(xbufs[EMIT_ELABEL])->ptr++ = ((unsigned char)'\0'))),(char*)((xbufs[EMIT_ELABEL])->ptr = (xbufs[EMIT_ELABEL])->buf))); UNSUPPORTED("bbq0f5l1m6tifwlpdbgjxjxmb"); // if ((((xbufs[EMIT_TLABEL])->ptr)-((xbufs[EMIT_TLABEL])->buf))) UNSUPPORTED("4hcvf4p9vrk0ep0jjusj3jfhg"); // agxset(e, xd->tl_draw, (((((xbufs[EMIT_TLABEL])->ptr >= (xbufs[EMIT_TLABEL])->eptr) ? agxbmore(xbufs[EMIT_TLABEL],1) : 0), (int)(*(xbufs[EMIT_TLABEL])->ptr++ = ((unsigned char)'\0'))),(char*)((xbufs[EMIT_TLABEL])->ptr = (xbufs[EMIT_TLABEL])->buf))); UNSUPPORTED("8npymvk65ot8kt7ab3njeurja"); // if ((((xbufs[EMIT_HLABEL])->ptr)-((xbufs[EMIT_HLABEL])->buf))) UNSUPPORTED("aiq65lb7yped6b0lu116yo7a4"); // agxset(e, xd->hl_draw, (((((xbufs[EMIT_HLABEL])->ptr >= (xbufs[EMIT_HLABEL])->eptr) ? agxbmore(xbufs[EMIT_HLABEL],1) : 0), (int)(*(xbufs[EMIT_HLABEL])->ptr++ = ((unsigned char)'\0'))),(char*)((xbufs[EMIT_HLABEL])->ptr = (xbufs[EMIT_HLABEL])->buf))); UNSUPPORTED("2x0ufa4uwhp9bb7fn3s7usmzd"); // penwidth[EMIT_EDRAW] = 1; UNSUPPORTED("ayk6jgfpc8vvemv998gbjnsww"); // penwidth[EMIT_ELABEL] = 1; UNSUPPORTED("agspcnz5b0suqpit8cner6mhc"); // penwidth[EMIT_TDRAW] = 1; UNSUPPORTED("1e0b8ziuh0xrcaq0zplxix85s"); // penwidth[EMIT_HDRAW] = 1; UNSUPPORTED("6q4g8p0xtw5agqvlkpum8e9vz"); // penwidth[EMIT_TLABEL] = 1; UNSUPPORTED("7zohf6ywwsdckdn01n3cs1hjl"); // penwidth[EMIT_HLABEL] = 1; UNSUPPORTED("cb1xiw693bv2yaimwk2pjorom"); // textflags[EMIT_EDRAW] = 0; UNSUPPORTED("ezfay17uxlha202qtn3sntxaq"); // textflags[EMIT_ELABEL] = 0; UNSUPPORTED("e3whco999z8g1b67c9zy58eu0"); // textflags[EMIT_TDRAW] = 0; UNSUPPORTED("cguuvn26z1l27ish4rurbai3w"); // textflags[EMIT_HDRAW] = 0; UNSUPPORTED("bhdmf1uvv60ds7vyrvwu4u9dl"); // textflags[EMIT_TLABEL] = 0; UNSUPPORTED("2jq39xm07ptt1y0oamn4scxht"); // textflags[EMIT_HLABEL] = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dgd04lnzpx25r8td4fyyg7u9n // static void xdot_end_cluster(GVJ_t * job) public static Object xdot_end_cluster(Object... arg) { UNSUPPORTED("748xi07ak7ijn36t3dcv852k6"); // static void xdot_end_cluster(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7hp4cwsa27640rg8l9i1oc3au"); // Agraph_t* cluster_g = job->obj->u.sg; UNSUPPORTED("7b9pvrvxfs1gy8pbpc556vgxn"); // agxset(cluster_g, xd->g_draw, (((((xbufs[EMIT_CDRAW])->ptr >= (xbufs[EMIT_CDRAW])->eptr) ? agxbmore(xbufs[EMIT_CDRAW],1) : 0), (int)(*(xbufs[EMIT_CDRAW])->ptr++ = ((unsigned char)'\0'))),(char*)((xbufs[EMIT_CDRAW])->ptr = (xbufs[EMIT_CDRAW])->buf))); UNSUPPORTED("4wwr02p3sc6z77r6pac172u8s"); // if (GD_label(cluster_g)) UNSUPPORTED("2dcg44k25x6u6ovhi0x82ky18"); // agxset(cluster_g, xd->g_l_draw, (((((xbufs[EMIT_CLABEL])->ptr >= (xbufs[EMIT_CLABEL])->eptr) ? agxbmore(xbufs[EMIT_CLABEL],1) : 0), (int)(*(xbufs[EMIT_CLABEL])->ptr++ = ((unsigned char)'\0'))),(char*)((xbufs[EMIT_CLABEL])->ptr = (xbufs[EMIT_CLABEL])->buf))); UNSUPPORTED("6mewhqzermfouij20dxeiylv4"); // penwidth[EMIT_CDRAW] = 1; UNSUPPORTED("13g8ea820qlbpgkiw8okcurxy"); // penwidth[EMIT_CLABEL] = 1; UNSUPPORTED("2ihltn665xnv186ed88nlcu5c"); // textflags[EMIT_CDRAW] = 0; UNSUPPORTED("ais8984m9rao3r8qrdv5oyrqd"); // textflags[EMIT_CLABEL] = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 8w9h04r6wb5w595zzittoeka4 // static unsigned short versionStr2Version (char* str) public static Object versionStr2Version(Object... arg) { UNSUPPORTED("chrcy094x7ttaya3h1exscw7v"); // static unsigned short UNSUPPORTED("e4d2kbrvn8htupn0iafoih5mq"); // versionStr2Version (char* str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4stmwy26608swzz374tod0ean"); // char c, buf[BUFSIZ]; UNSUPPORTED("bvxkingiukxgnvvl6kws5dtd3"); // int n = 0; UNSUPPORTED("2abz7v9cw72cf6hqjox54nmwp"); // char* s = str; UNSUPPORTED("5c5g7fflmrhni3g2nuv63ojib"); // unsigned short us; UNSUPPORTED("c5ryg6x0ohski7pfyjfenou9s"); // while ((c = *s++)) { UNSUPPORTED("1pnj5rt1fbfrxp7zvqffa53x5"); // if (isdigit(c)) { UNSUPPORTED("ehkrwnuhx00twplplqn1558ge"); // if (n < BUFSIZ-1) buf[n++] = c; UNSUPPORTED("6q044im7742qhglc4553noina"); // else { UNSUPPORTED("6l35fjttf01gcmuqayv4bqy2w"); // agerr(AGWARN, "xdot version \"%s\" too long", str); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dduxfzva8x0mdh16aqyebatl1"); // buf[n] = '\0'; UNSUPPORTED("ogkrzx48vpp24yudp5vze1k"); // us = atoi(buf); UNSUPPORTED("2iqrgjc97xskxvw6791yf0sl7"); // return us; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b6dujnnnx0vkz2azj96gb7m4s // static void xdot_begin_graph (graph_t *g, int s_arrows, int e_arrows, format_type id) public static Object xdot_begin_graph(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("2rjz3mulunwdz9ta0eo4csy2b"); // xdot_begin_graph (graph_t *g, int s_arrows, int e_arrows, format_type id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ic1aerpescva8qu266cf4kgz"); // int i, us; UNSUPPORTED("yiuh599p05f2mpu2e3pesu2o"); // char* s; UNSUPPORTED("3vqymbo4wpza3fq6x8saz6rn7"); // xd = (xdot_state_t*)malloc(sizeof(xdot_state_t)); UNSUPPORTED("3a76ht5j9z1ccvqedbdgme3dd"); // if (id == FORMAT_XDOT14) { UNSUPPORTED("dt2u9y3kkmi56oskm69x8mikm"); // xd->version = 14; UNSUPPORTED("66cdr1t0wjaf0s0kucjxfuwim"); // xd->version_s = "1.4"; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("bf0zctwltwc67p5nltorciugj"); // else if (id == FORMAT_XDOT12) { UNSUPPORTED("4878ji8ec7yej8s8b623nj7pp"); // xd->version = 12; UNSUPPORTED("aaqxtlgybeiz9p9nyseoms49t"); // xd->version_s = "1.2"; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dnjx9r21tejepmqiuwox2oxrg"); // else if ((s = agget(g, "xdotversion")) && s[0] && ((us = versionStr2Version(s)) > 10)) { UNSUPPORTED("4s8ywxustrk8erm1tc6ejw2rg"); // xd->version = us; UNSUPPORTED("1424no2f3makhwi7tfl8c5q80"); // xd->version_s = s; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("1b4xz050q21m7lott5uquc11d"); // xd->version = versionStr2Version("1.7"); UNSUPPORTED("5kd75c5wqbvyshanptxfkj057"); // xd->version_s = "1.7"; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7zymy8kk3ewvzchagbq7uv1cu"); // if (GD_n_cluster(g)) UNSUPPORTED("cucvefvtr19ty35o4vh2yk4oz"); // xd->g_draw = safe_dcl(g, AGRAPH, "_draw_", ""); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("62tnc1j7duax67f6mmiymrdfa"); // xd->g_draw = NULL; UNSUPPORTED("2e1fr0r03jmw794odl240c8f7"); // if (GD_has_labels(g) & (1 << 3)) UNSUPPORTED("9a39cc2g4ltbio86mu69qmvj"); // xd->g_l_draw = safe_dcl(g, AGRAPH, "_ldraw_", ""); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("e0ldg474fh8tbrhv0i9u0aqjp"); // xd->g_l_draw = NULL; UNSUPPORTED("dw68da3w0j8rbxtrn9vhq44of"); // xd->n_draw = safe_dcl(g, AGNODE, "_draw_", ""); UNSUPPORTED("f4nik9l77a4c6uvt9x55ngopt"); // xd->n_l_draw = safe_dcl(g, AGNODE, "_ldraw_", ""); UNSUPPORTED("93zg18zlp7hsfph618t3hyejs"); // xd->e_draw = safe_dcl(g, AGEDGE, "_draw_", ""); UNSUPPORTED("6d4jdibq9wvx7on8dimlxq0yn"); // if (e_arrows) UNSUPPORTED("9ou3qp01825r9ps5uo5xfzgzc"); // xd->h_draw = safe_dcl(g, AGEDGE, "_hdraw_", ""); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("be9ld1gbisp6a176vdzaof8d3"); // xd->h_draw = NULL; UNSUPPORTED("euj2g8y61z0t4qjvgr0jss8v1"); // if (s_arrows) UNSUPPORTED("dowfh8qe11fawskapg5ro3jfr"); // xd->t_draw = safe_dcl(g, AGEDGE, "_tdraw_", ""); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("danxd49is8wbz9kakvzoq5odi"); // xd->t_draw = NULL; UNSUPPORTED("3ufm3epx8zs5wivuj6wsveht6"); // if (GD_has_labels(g) & ((1 << 0)|(1 << 5))) UNSUPPORTED("enylxaurlxd4or2zdfs634dga"); // xd->e_l_draw = safe_dcl(g, AGEDGE, "_ldraw_", ""); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("bi02qgm8vwdvqv11mwmnhs6to"); // xd->e_l_draw = NULL; UNSUPPORTED("9o41hpfnkkzxiqf6wmsulmacd"); // if (GD_has_labels(g) & (1 << 1)) UNSUPPORTED("6nvmq2gfvww01ewp3x9sjkuke"); // xd->hl_draw = safe_dcl(g, AGEDGE, "_hldraw_", ""); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("3nwv12jiirdbiz1oc47o2r3dg"); // xd->hl_draw = NULL; UNSUPPORTED("cpnv97fkn07xq4zk0ujfs1ae5"); // if (GD_has_labels(g) & (1 << 2)) UNSUPPORTED("da26r5gjgp3688l1z4tpzbq31"); // xd->tl_draw = safe_dcl(g, AGEDGE, "_tldraw_", ""); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("2tye9jzgetwsilq9chtxirz1i"); // xd->tl_draw = NULL; UNSUPPORTED("7kk0ag26ulyeot56meorf4p5s"); // for (i = 0; i < (EMIT_HLABEL+1); i++) UNSUPPORTED("8ajne0cu6u9nmlfrbjocyi684"); // agxbinit(xbuf+i, BUFSIZ, xd->buf[i]); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9el3cs7jw7xcl0wowpu7ct3rz // static void dot_begin_graph(GVJ_t *job) public static Object dot_begin_graph(Object... arg) { UNSUPPORTED("55cwgn2ctpl1i38b5pfptyfxh"); // static void dot_begin_graph(GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5trsosjncbloszlsxd8sslp3o"); // int e_arrows; /* graph has edges with end arrows */ UNSUPPORTED("1bxz1lm8m0fgeoigia5tikg9d"); // int s_arrows; /* graph has edges with start arrows */ UNSUPPORTED("a3q119d7e1ostqe1x435lxrvm"); // graph_t *g = job->obj->u.g; UNSUPPORTED("69opxqj69jbqthw7e5x8p71j0"); // switch (job->render.id) { UNSUPPORTED("asbdg30zpxv93m8c8q7ut9pp7"); // case FORMAT_DOT: UNSUPPORTED("2ufbsycafpqid948lx5vaouyr"); // attach_attrs(g); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("d55f2zrc5u2nlqzvfrhox6uyo"); // case FORMAT_CANON: UNSUPPORTED("3tclamickukum1mag8ngi9dc4"); // if ((GD_flags(g) & 1)) UNSUPPORTED("13lh6smzxcir33yrc79wvp3ps"); // undoClusterEdges(g); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4p4opxbu0ika01d9nbkvr7c5a"); // case FORMAT_PLAIN: UNSUPPORTED("b4g1j6lxp030dk3zr7rcgwrkn"); // case FORMAT_PLAIN_EXT: UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("drwnou77a82tgjqpyix5e973i"); // case FORMAT_XDOT: UNSUPPORTED("oq1yoczrthmfym4uucuuvtwg"); // case FORMAT_XDOT12: UNSUPPORTED("5detc6thxx6k2gbql8t37kino"); // case FORMAT_XDOT14: UNSUPPORTED("e517lrgflyjmfilgki7hwb0v0"); // attach_attrs_and_arrows(g, &s_arrows, &e_arrows); UNSUPPORTED("8kje0t3r1kyhxp9ztlespm94x"); // xdot_begin_graph(g, s_arrows, e_arrows, job->render.id); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5frt5zpj5ehffb4xazrp3bk5a // static void xdot_end_graph(graph_t* g) public static Object xdot_end_graph(Object... arg) { UNSUPPORTED("644gqx36xocy4ypd9o808hu8k"); // static void xdot_end_graph(graph_t* g) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("5in05wx4rr8c79fscbbuj0ny4"); // if ((((xbufs[EMIT_GDRAW])->ptr)-((xbufs[EMIT_GDRAW])->buf))) { UNSUPPORTED("71dz7nzjnm6fuzbfeq9vq9fhd"); // if (!xd->g_draw) UNSUPPORTED("d00l0rr0wvgnbyncpg4c280md"); // xd->g_draw = safe_dcl(g, AGRAPH, "_draw_", ""); UNSUPPORTED("col5wyh184hm8s7tk9u3wduo4"); // agxset(g, xd->g_draw, (((((xbufs[EMIT_GDRAW])->ptr >= (xbufs[EMIT_GDRAW])->eptr) ? agxbmore(xbufs[EMIT_GDRAW],1) : 0), (int)(*(xbufs[EMIT_GDRAW])->ptr++ = ((unsigned char)'\0'))),(char*)((xbufs[EMIT_GDRAW])->ptr = (xbufs[EMIT_GDRAW])->buf))); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("aplr7sm051i57jygcfj6gigoh"); // if (GD_label(g)) UNSUPPORTED("6hnqed76xd8ub681wy4l61i6k"); // agxset(g, xd->g_l_draw, (((((xbufs[EMIT_GLABEL])->ptr >= (xbufs[EMIT_GLABEL])->eptr) ? agxbmore(xbufs[EMIT_GLABEL],1) : 0), (int)(*(xbufs[EMIT_GLABEL])->ptr++ = ((unsigned char)'\0'))),(char*)((xbufs[EMIT_GLABEL])->ptr = (xbufs[EMIT_GLABEL])->buf))); UNSUPPORTED("9l6hpui3e7ttewt7f0pbdmj7n"); // agsafeset (g, "xdotversion", xd->version_s, ""); UNSUPPORTED("7kk0ag26ulyeot56meorf4p5s"); // for (i = 0; i < (EMIT_HLABEL+1); i++) UNSUPPORTED("7oy2gkodmmkkpcrpnsqj8zo3y"); // agxbfree(xbuf+i); UNSUPPORTED("8zq3l17h8kry49np2uj156vbf"); // free (xd); UNSUPPORTED("1k9pby72xelcehm9qyzsmgbuj"); // penwidth[EMIT_GDRAW] = 1; UNSUPPORTED("a4udc0v8tnpzqfdhk4ey7hlj2"); // penwidth[EMIT_GLABEL] = 1; UNSUPPORTED("85vfts415fxmowpvc6oa94wtk"); // textflags[EMIT_GDRAW] = 0; UNSUPPORTED("bprw4c19qmn4tbiyw95senow2"); // textflags[EMIT_GLABEL] = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 365wp64if2aqqmz88lgc2acad // static void dot_end_graph(GVJ_t *job) public static Object dot_end_graph(Object... arg) { UNSUPPORTED("7od3m4syfzwmjresag6exqpa2"); // static void dot_end_graph(GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a3q119d7e1ostqe1x435lxrvm"); // graph_t *g = job->obj->u.g; UNSUPPORTED("4y5ui7sbb6i9ctt3c57thi7gr"); // Agiodisc_t* io_save; UNSUPPORTED("17vaxtfzi2nvsvj86pltalk4h"); // static Agiodisc_t io; UNSUPPORTED("dooum3itkcwjhytfxgpkqy2bc"); // if (io.afread == NULL) { UNSUPPORTED("buq0dfl65l186567ldevfu1lc"); // io.afread = AgIoDisc.afread; UNSUPPORTED("61t5ae3n3uf6lem5ma8yk8g8r"); // io.putstr = (putstrfn)gvputs; UNSUPPORTED("9myl5023j2t6dyfsi6w7rnvi6"); // io.flush = (flushfn)gvflush; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4qb1dpqvvr2x20dk4v9y86cr2"); // io_save = g->clos->disc.io; UNSUPPORTED("cgto05kv6b8s6ytjz5jz9698n"); // g->clos->disc.io = &io; UNSUPPORTED("69opxqj69jbqthw7e5x8p71j0"); // switch (job->render.id) { UNSUPPORTED("4p4opxbu0ika01d9nbkvr7c5a"); // case FORMAT_PLAIN: UNSUPPORTED("1samwnyuotk102w959rrud5i7"); // write_plain(job, g, (FILE*)job, 0); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("b4g1j6lxp030dk3zr7rcgwrkn"); // case FORMAT_PLAIN_EXT: UNSUPPORTED("1jrd36rj77i6km0m420xlpul"); // write_plain(job, g, (FILE*)job, NOT(0)); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("asbdg30zpxv93m8c8q7ut9pp7"); // case FORMAT_DOT: UNSUPPORTED("d55f2zrc5u2nlqzvfrhox6uyo"); // case FORMAT_CANON: UNSUPPORTED("3pog4cju4ila5a12l0p0zeb88"); // if (!(job->flags & (1<<27))) UNSUPPORTED("3lsqt99njjcj8p92ycwhmflh6"); // agwrite(g, (FILE*)job); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("drwnou77a82tgjqpyix5e973i"); // case FORMAT_XDOT: UNSUPPORTED("oq1yoczrthmfym4uucuuvtwg"); // case FORMAT_XDOT12: UNSUPPORTED("5detc6thxx6k2gbql8t37kino"); // case FORMAT_XDOT14: UNSUPPORTED("58qfh8cm3k2usaxu31aasg2q0"); // xdot_end_graph(g); UNSUPPORTED("3pog4cju4ila5a12l0p0zeb88"); // if (!(job->flags & (1<<27))) UNSUPPORTED("3lsqt99njjcj8p92ycwhmflh6"); // agwrite(g, (FILE*)job); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2khgjvw37rb0f0u56v0bmeuhk"); // g->clos->disc.io = io_save; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 miu9dqoprpn4z02dr1v5dp5m // static unsigned int flag_masks[] = //3 cxy8ygsrutpg71gnj7rvevr82 // static void xdot_textspan(GVJ_t * job, pointf p, textspan_t * span) public static Object xdot_textspan(Object... arg) { UNSUPPORTED("gwiq1hicnrtpzvgg8epkkvav"); // static void xdot_textspan(GVJ_t * job, pointf p, textspan_t * span) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5tol2owvqctfpttgzs7ee7b7x"); // emit_state_t emit_state = job->obj->emit_state; UNSUPPORTED("bvksijlrvlrkfx8y487wyj382"); // int flags; UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("2bs0wcp6367dz1o5x166ec7l8"); // int j; UNSUPPORTED("6l9fjr9roux0dfl0wfu7fcddr"); // agxbput(xbufs[emit_state], "F "); UNSUPPORTED("az3hohvk4k0kbhvylbungddx3"); // xdot_fmt_num (buf, span->font->size); UNSUPPORTED("9rhyq2cgol181qsty6dn352bn"); // agxbput(xbufs[emit_state], buf); UNSUPPORTED("99k2as158r23heb0l4ctcm9vy"); // xdot_str (job, "", span->font->name); UNSUPPORTED("b60954b8v5dalvf3r6llehqzf"); // xdot_pencolor(job); UNSUPPORTED("bpqxh9mig0sh1gasrlkg6hbph"); // switch (span->just) { UNSUPPORTED("15tf5rbprgr65ucp24e4bba9t"); // case 'l': UNSUPPORTED("2suvzg8lg1f7fj0rjb3xgexxo"); // j = -1; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("8pu80wsk8me7q17ensqlviq86"); // case 'r': UNSUPPORTED("bd07lgrxf1a60vz7i2yh1oc5y"); // j = 1; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("37fbny64zwo23oymypyreuldc"); // case 'n': UNSUPPORTED("r79hxjsrgn8qe981wwjhqv5r"); // j = 0; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3ph6hw1a9g39ebdmtg6m2z1e6"); // if (span->font) UNSUPPORTED("1h81g9cqefbz374gnxhsrzihh"); // flags = span->font->flags; UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("1zfq2ftnydeuv7ocl0s1qswos"); // flags = 0; UNSUPPORTED("byh8c2fia9mydfrbinzik1yj"); // if (xd->version >= 15) { UNSUPPORTED("adh7i3qky231rctbj07n1ltuh"); // unsigned int mask = flag_masks[xd->version-15]; UNSUPPORTED("5zcevqq4z3m3xk2679v33aydh"); // unsigned int bits = flags & mask; UNSUPPORTED("1aj03a1vg8w23trgnu1prqjjn"); // if (textflags[emit_state] != bits) { UNSUPPORTED("3qyyq68k6zvnwy5s3w6dtw9i3"); // sprintf (buf, "t %u ", bits); UNSUPPORTED("4rkyue7yryguey5gmxi33gx43"); // agxbput(xbufs[emit_state], buf); UNSUPPORTED("bbejxaf27qcm3hgffhoos4cep"); // textflags[emit_state] = bits; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c9qtg5nyqzscz54w8w9mfwv7v"); // p.y += span->yoffset_centerline; UNSUPPORTED("dx3kapcolqs61rakt0sf1g2ne"); // agxbput(xbufs[emit_state], "T "); UNSUPPORTED("cn33udbmfohead259f30gigu9"); // xdot_point(xbufs[emit_state], p); UNSUPPORTED("e6ynnabzexm69rwnkcujg3ytl"); // sprintf(buf, "%d ", j); UNSUPPORTED("9rhyq2cgol181qsty6dn352bn"); // agxbput(xbufs[emit_state], buf); UNSUPPORTED("69ugzyybutpdllfj7qjgdpzzf"); // xdot_fmt_num (buf, span->size.x); UNSUPPORTED("9rhyq2cgol181qsty6dn352bn"); // agxbput(xbufs[emit_state], buf); UNSUPPORTED("eyg91nw45p8h7ujjgtsrndc38"); // xdot_str (job, "", span->str); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 951oub23cl7586oxghh5so2n4 // static void xdot_color_stop (agxbuf* xb, float v, gvcolor_t* clr) public static Object xdot_color_stop(Object... arg) { UNSUPPORTED("3bwn7e5owadbvieiqpx44m016"); // static void xdot_color_stop (agxbuf* xb, float v, gvcolor_t* clr) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("bh3lqw75arlp2hvbqi7hw0plv"); // sprintf (buf, "%.03f", v); UNSUPPORTED("5jyfg2es8t6ywaex3wqf67xef"); // xdot_trim_zeros (buf, 1); UNSUPPORTED("absgo5laog0paf2par7r2x2gj"); // xdot_str_xbuf (xb, buf, color2str (clr->u.rgba)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 81lb9t5vutop207f66wrvrzmv // static void xdot_gradient_fillcolor (GVJ_t* job, int filled, pointf* A, int n) public static Object xdot_gradient_fillcolor(Object... arg) { UNSUPPORTED("cfu8qq2194ludhgqlobf0hd99"); // static void xdot_gradient_fillcolor (GVJ_t* job, int filled, pointf* A, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("afhr40frddxftx356soi57rg3"); // unsigned char buf0[BUFSIZ]; UNSUPPORTED("d7xb6maj0ydcfhxp7ibk0szkw"); // agxbuf xbuf; UNSUPPORTED("dkl0vzbfc5x8033scv4snd5jw"); // obj_state_t* obj = job->obj; UNSUPPORTED("apv553335q0u7zdmvsw0pkwua"); // float angle = obj->gradient_angle * M_PI / 180; UNSUPPORTED("4qdy8fespthd4iw616b9kqbug"); // float r1,r2; UNSUPPORTED("1jkyxz2untcdunxnh5lg110bm"); // pointf G[2],c1,c2; UNSUPPORTED("4s3lilfwec0zb6xral9scaw8w"); // if (xd->version < 14) { UNSUPPORTED("jhsnzw28kj9x70ilt7413rx1"); // xdot_fillcolor (job); UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cykkurgudosfmfhpzldhi18aj"); // agxbinit(&xbuf, BUFSIZ, buf0); UNSUPPORTED("6ix1vu2jcuffbc6bfez9ob1bm"); // if (filled == 2) { UNSUPPORTED("cj0ole2l1i4n8tqoqi5ttskq0"); // get_gradient_points(A, G, n, angle, 2); UNSUPPORTED("2qhqfakxqg575vnxt8hl977es"); // ((((&xbuf)->ptr >= (&xbuf)->eptr) ? agxbmore(&xbuf,1) : 0), (int)(*(&xbuf)->ptr++ = ((unsigned char)'['))); UNSUPPORTED("d5n6wae9wjfp1nge6poeog0ne"); // xdot_point (&xbuf, G[0]); UNSUPPORTED("4it3udjo4ot3vncc2d0azcj3y"); // xdot_point (&xbuf, G[1]); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("552p8gqtzfrli5iijew1yzbc2"); // get_gradient_points(A, G, n, 0, 3); UNSUPPORTED("azmgl3vqx13s5t2zy71yqt0zv"); // //r1 is inner radius, r2 is outer radius UNSUPPORTED("cgza74zbphmgyazdy25a1yjwd"); // r1 = G[1].x; UNSUPPORTED("8sucs08ls3j7nrift30lvczdo"); // r2 = G[1].y; UNSUPPORTED("3xbidpbr5d8c0q1a9e5r3m3bf"); // if (angle == 0) { UNSUPPORTED("33xdqpb7fle8qc4kgvrlyb978"); // c1.x = G[0].x; UNSUPPORTED("azjf33tlorlkh7g3obi1fw9o8"); // c1.y = G[0].y; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("ctiy8a8egqtw0wdettm82nol3"); // c1.x = G[0].x + (r2/4) * cos(angle); UNSUPPORTED("f55breu5jzgg9cdf1yjle3ldk"); // c1.y = G[0].y + (r2/4) * sin(angle); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2de5pr45z8x035q11la5yj7mr"); // c2.x = G[0].x; UNSUPPORTED("3uy8a7vkkzkc62z0w7rwbftff"); // c2.y = G[0].y; UNSUPPORTED("33tuj6sqq0diph014rq1qr5l2"); // r1 = r2/4; UNSUPPORTED("1e7clx93h8m75wd14f3tz60a5"); // ((((&xbuf)->ptr >= (&xbuf)->eptr) ? agxbmore(&xbuf,1) : 0), (int)(*(&xbuf)->ptr++ = ((unsigned char)'('))); UNSUPPORTED("73hnifpkt5nmlbooav542m03w"); // xdot_point (&xbuf, c1); UNSUPPORTED("c2f1hoenqv8l25y3hjr50uj98"); // xdot_num (&xbuf, r1); UNSUPPORTED("3e41s473bda488ppw2goj2b2s"); // xdot_point (&xbuf, c2); UNSUPPORTED("5hvhixnw8w82m7kro7wcn3q6i"); // xdot_num (&xbuf, r2); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("do5q72ggtf3cz3etzwfza579u"); // agxbput(&xbuf, "2 "); UNSUPPORTED("8fgkppjkw1zj55kkf5f3vfttd"); // if (obj->gradient_frac > 0) { UNSUPPORTED("2sd2i1enczhlwsjncjv8mae1z"); // xdot_color_stop (&xbuf, obj->gradient_frac, &obj->fillcolor); UNSUPPORTED("1dto0ii6gendp8jq487yi1hca"); // xdot_color_stop (&xbuf, obj->gradient_frac, &obj->stopcolor); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("is1pyjf8le3sjv4tl7l3ziaf"); // xdot_color_stop (&xbuf, 0, &obj->fillcolor); UNSUPPORTED("24knhjivq0t12zx1guvl5rf7f"); // xdot_color_stop (&xbuf, 1, &obj->stopcolor); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9px7n8ot0ypjfbsjvvoc0sw9f"); // agxbpop(&xbuf); UNSUPPORTED("xfkgq4px6z7dad4dxc34hfda"); // if (filled == 2) UNSUPPORTED("8qcdfuctjpke1bbm2pfd8botk"); // ((((&xbuf)->ptr >= (&xbuf)->eptr) ? agxbmore(&xbuf,1) : 0), (int)(*(&xbuf)->ptr++ = ((unsigned char)']'))); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("cazm9btr28fejr5n4cwsma7tw"); // ((((&xbuf)->ptr >= (&xbuf)->eptr) ? agxbmore(&xbuf,1) : 0), (int)(*(&xbuf)->ptr++ = ((unsigned char)')'))); UNSUPPORTED("6zoxco27bs4sptdv3yvk4b4f4"); // xdot_str (job, "C ", (((((&xbuf)->ptr >= (&xbuf)->eptr) ? agxbmore(&xbuf,1) : 0), (int)(*(&xbuf)->ptr++ = ((unsigned char)'\0'))),(char*)((&xbuf)->ptr = (&xbuf)->buf))); UNSUPPORTED("9audbw57i2imjhpg3zy9xu5mv"); // agxbfree(&xbuf); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 elpdgf7i39797gvcc6b2t7ff0 // static void xdot_ellipse(GVJ_t * job, pointf * A, int filled) public static Object xdot_ellipse(Object... arg) { UNSUPPORTED("5ui8vu8fdabmwbsjpzn9fke7j"); // static void xdot_ellipse(GVJ_t * job, pointf * A, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5tol2owvqctfpttgzs7ee7b7x"); // emit_state_t emit_state = job->obj->emit_state; UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("6xsl5ij07s1n8lkq3esgcpnkd"); // xdot_style (job); UNSUPPORTED("afipplsdzhk8ka8f8byy3b6ew"); // xdot_pencolor (job); UNSUPPORTED("9yhmhvzz81x2bovke5qc93036"); // if (filled) { UNSUPPORTED("5vocstppqgtqsgie6wt3h97lx"); // if ((filled == 2) || (filled == 3)) { UNSUPPORTED("32wte71cc4mwvlc654ryoqvgp"); // xdot_gradient_fillcolor (job, filled, A, 2); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("2ny1fosqv89i3jorx0crjx93q"); // else UNSUPPORTED("e2g0v2azia2l0a317ei6s9lc7"); // xdot_fillcolor (job); UNSUPPORTED("4fy4eziyv5vh3mm1f4yikgh1g"); // agxbput(xbufs[emit_state], "E "); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("7z7k33fjb8nol2vfc95j2so4v"); // agxbput(xbufs[emit_state], "e "); UNSUPPORTED("3k8oqnla7s88jh4xlmwpxlefs"); // xdot_point(xbufs[emit_state], A[0]); UNSUPPORTED("19tmmds723z70vc4nukjdbn6v"); // xdot_fmt_num (buf, A[1].x - A[0].x); UNSUPPORTED("9rhyq2cgol181qsty6dn352bn"); // agxbput(xbufs[emit_state], buf); UNSUPPORTED("9llhc3ra6q58d31qhdtzspgb7"); // xdot_fmt_num (buf, A[1].y - A[0].y); UNSUPPORTED("9rhyq2cgol181qsty6dn352bn"); // agxbput(xbufs[emit_state], buf); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4lnrf12q3ldkwy8zf6gci2pks // static void xdot_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, int arrow_at_end, int filled) public static Object xdot_bezier(Object... arg) { UNSUPPORTED("37xlnhhrtu9vagol2alnbwrk8"); // static void xdot_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, int arrow_at_end, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6xsl5ij07s1n8lkq3esgcpnkd"); // xdot_style (job); UNSUPPORTED("afipplsdzhk8ka8f8byy3b6ew"); // xdot_pencolor (job); UNSUPPORTED("9yhmhvzz81x2bovke5qc93036"); // if (filled) { UNSUPPORTED("5vocstppqgtqsgie6wt3h97lx"); // if ((filled == 2) || (filled == 3)) { UNSUPPORTED("bpeb0kmrjxd69y7dwei7wnoal"); // xdot_gradient_fillcolor (job, filled, A, n); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("35nw1pbiz2p3s6qwlam5eoo3m"); // else UNSUPPORTED("e2g0v2azia2l0a317ei6s9lc7"); // xdot_fillcolor (job); UNSUPPORTED("98py6ghqeml2v4q8ndh3x8a1b"); // xdot_points(job, 'b', A, n); /* NB - 'B' & 'b' are reversed in comparison to the other items */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("8o1bgpp5kvqu13syxpzk68480"); // xdot_points(job, 'B', A, n); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dqb35ass6fhia5ed3fazmq2me // static void xdot_polygon(GVJ_t * job, pointf * A, int n, int filled) public static Object xdot_polygon(Object... arg) { UNSUPPORTED("cndk7usyfoi66d0rxi8ep9ehq"); // static void xdot_polygon(GVJ_t * job, pointf * A, int n, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6xsl5ij07s1n8lkq3esgcpnkd"); // xdot_style (job); UNSUPPORTED("afipplsdzhk8ka8f8byy3b6ew"); // xdot_pencolor (job); UNSUPPORTED("9yhmhvzz81x2bovke5qc93036"); // if (filled) { UNSUPPORTED("5vocstppqgtqsgie6wt3h97lx"); // if ((filled == 2) || (filled == 3)) { UNSUPPORTED("bpeb0kmrjxd69y7dwei7wnoal"); // xdot_gradient_fillcolor (job, filled, A, n); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("35nw1pbiz2p3s6qwlam5eoo3m"); // else UNSUPPORTED("e2g0v2azia2l0a317ei6s9lc7"); // xdot_fillcolor (job); UNSUPPORTED("ezmi4i7cc8d9uelz9assws82f"); // xdot_points(job, 'P', A, n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("48nm1x4l16t2ale21cdz3mcza"); // xdot_points(job, 'p', A, n); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e7grmvqgv9168jtqtt87zmzyy // static void xdot_polyline(GVJ_t * job, pointf * A, int n) public static Object xdot_polyline(Object... arg) { UNSUPPORTED("6d20bb7cmgbtsecpavuqttst6"); // static void xdot_polyline(GVJ_t * job, pointf * A, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6xsl5ij07s1n8lkq3esgcpnkd"); // xdot_style (job); UNSUPPORTED("afipplsdzhk8ka8f8byy3b6ew"); // xdot_pencolor (job); UNSUPPORTED("cpqh42avxgy10sr2b44k34o5r"); // xdot_points(job, 'L', A, n); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eykvrl427om1rgwd7xrbbwrzk // void core_loadimage_xdot(GVJ_t * job, usershape_t *us, boxf b, boolean filled) public static Object core_loadimage_xdot(Object... arg) { UNSUPPORTED("6rbh44wuyqe0mblq32vw2cf7p"); // void core_loadimage_xdot(GVJ_t * job, usershape_t *us, boxf b, boolean filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5tol2owvqctfpttgzs7ee7b7x"); // emit_state_t emit_state = job->obj->emit_state; UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("bghgst163im2c320on8x4w3zh"); // agxbput(xbufs[emit_state], "I "); UNSUPPORTED("asxolcwcmi1gbbpelswru4bbo"); // xdot_point(xbufs[emit_state], b.LL); UNSUPPORTED("bhn6trlb4cfurw7boroefzm9t"); // xdot_fmt_num (buf, b.UR.x - b.LL.x); UNSUPPORTED("9rhyq2cgol181qsty6dn352bn"); // agxbput(xbufs[emit_state], buf); UNSUPPORTED("3azj7tzkveayr8ycyk2gu34pw"); // xdot_fmt_num (buf, b.UR.y - b.LL.y); UNSUPPORTED("9rhyq2cgol181qsty6dn352bn"); // agxbput(xbufs[emit_state], buf); UNSUPPORTED("dmjnxlq1z32kfdqx4y7zhegaw"); // xdot_str (job, "", (char*)(us->name)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 8pi2ts65r8gsvbkjt5wq965nq // gvrender_engine_t dot_engine = //1 1plhtdsvqvsimvarzf4jj1eq7 // gvrender_engine_t xdot_engine = //1 au6z2onamntzabqj683rh3n3a // gvrender_features_t render_features_dot = //1 6f9e1l4u72pnxzq9wtm1r9lti // gvrender_features_t render_features_xdot = //1 3lwgnw04i5fjt5ies1vspsbt6 // gvdevice_features_t device_features_canon = //1 blql9jmu6ahfd8lqid7tast8h // gvdevice_features_t device_features_dot = //1 8t8p2uw0f9lt9lbs33nt9zhpy // gvplugin_installed_t gvrender_dot_types[] = //1 4p12wx67x4s3z9tqpkk0xnq2g // gvplugin_installed_t gvdevice_dot_types[] = } plantuml-1.2017.15/src/gen/plugin/core/gvrender_core_fig__c.java000066400000000000000000001067411312650303100244320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.plugin.core; import static smetana.core.Macro.UNSUPPORTED; public class gvrender_core_fig__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 4ywl2my7bw54moba4jmobv1yt // static int Depth //3 col13zsmm8179we47mk0y0ryx // static void figptarray(GVJ_t *job, pointf * A, int n, int close) public static Object figptarray(Object... arg) { UNSUPPORTED("5sak5etnrhk4n1c20jbn4x6sw"); // static void figptarray(GVJ_t *job, pointf * A, int n, int close) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("41nrdsugvfgw23s93g0dhizkn"); // point p; UNSUPPORTED("1vi49g48u2rc9v88yhabta0yw"); // for (i = 0; i < n; i++) { UNSUPPORTED("4pvmqbw3yqtv1skjcmzaxzz1j"); // PF2P(A[i],p); UNSUPPORTED("9l156bri4abd87e44n6ponvf7"); // gvprintf(job, " %d %d", p.x, p.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("125u8ocmya1ui6f2vy92ys41c"); // if (close) { UNSUPPORTED("3nww6192gmqzcyq5v0whqebqg"); // PF2P(A[0],p); UNSUPPORTED("9l156bri4abd87e44n6ponvf7"); // gvprintf(job, " %d %d", p.x, p.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b7eafy5bhxn361xe2c8x8553b"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 awvjm7vo78a8gt65eab40rjv3 // static char *fig_string(char *s) public static Object fig_string(Object... arg) { UNSUPPORTED("7jy2u90k97u4zfgxqxjryrrij"); // static char *fig_string(char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("210phh7av8ei8ajjmpptx96m6"); // static char *buf = NULL; UNSUPPORTED("6fpm1wk8mz0hofn15361g6nzn"); // static int bufsize = 0; UNSUPPORTED("3xzujk207ipx0d60nbbrwyjez"); // int pos = 0; UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("10sir32iwi5l2jyfgp65pihto"); // unsigned char c; UNSUPPORTED("cjyiejw67ffjjsk60tgeebvif"); // if (!buf) { UNSUPPORTED("7mna7k5m37x6jycc55rpeeje8"); // bufsize = 64; UNSUPPORTED("ep0onxumq5jdi6uy8gbmbmcbb"); // buf = malloc(bufsize * sizeof(char)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dpfzdhkfq6u86uv5f9lnqfbpq"); // p = buf; UNSUPPORTED("c5ryg6x0ohski7pfyjfenou9s"); // while ((c = *s++)) { UNSUPPORTED("9zdb3w6p9hdzpyyb0migch83s"); // if (pos > (bufsize - 8)) { UNSUPPORTED("6e6hti39a4qgpg5w8s3kln578"); // bufsize *= 2; UNSUPPORTED("5ws50ei3kkqkw4ut1rt6a53bm"); // buf = realloc(buf, bufsize * sizeof(char)); UNSUPPORTED("7bji4miupgafja2y29safeneg"); // p = buf + pos; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("19kfsb89ftcmo72ye73cn1plm"); // if (isascii(c)) { UNSUPPORTED("q0pniw6fxx771jygciq7vzx8"); // if (c == '\\') { UNSUPPORTED("et6mc0jzry6p7o1acim2wudi9"); // *p++ = '\\'; UNSUPPORTED("e2z9y4j5uutkew1vp7bi9rhl4"); // pos++; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("a9lw77m0m78a5a98c3vho52nx"); // *p++ = c; UNSUPPORTED("80sypvk9gmir13zzfmeeey8ri"); // pos++; UNSUPPORTED("7g575y36b78djy0o00izqx7eq"); // } else { UNSUPPORTED("9x6j5mtq8ejbmg0m64b60ml"); // *p++ = '\\'; UNSUPPORTED("dev643k7td5xqer5x35ldenoh"); // sprintf(p, "%03o", c); UNSUPPORTED("5xg21ei3admmdqgn97zgseutd"); // p += 3; UNSUPPORTED("8sk7u4qhds42x15qm3hujzttc"); // pos += 4; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2t1d66kwn86kqh0i665hqw6cl"); // *p = '\0'; UNSUPPORTED("5jfpogdyby101eyuw2dhtb5cg"); // return buf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c9fcem04fcrcl4xar0xmrikcd // static int figColorResolve(int *new, int r, int g, int b) public static Object figColorResolve(Object... arg) { UNSUPPORTED("8axwcbee7joccp1jlpniopwsa"); // static int figColorResolve(int *new, int r, int g, int b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c2sddndcjmau5tt4mtu64l1ez"); // static int top = 0; UNSUPPORTED("bnrhaqz49cielpy7fgo6dz2ub"); // static short red[256], green[256], blue[256]; UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c; UNSUPPORTED("5hsogcx940isfoos26t853z9j"); // int ct = -1; UNSUPPORTED("4nf4ocdnzdty5edptkslzgrhc"); // long rd, gd, bd, dist; UNSUPPORTED("b9jn6a9ked66uo0b0um0kfzfb"); // long mindist = 3 * 255 * 255; /* init to max poss dist */ UNSUPPORTED("c5tawsm7j8n0vkq0qcls0soc3"); // *new = 0; /* in case it is not a new color */ UNSUPPORTED("39bm5fhhzyquf4rlun9zbcbi4"); // for (c = 0; c < top; c++) { UNSUPPORTED("6412n3rfkfyimbx1puriyeqqz"); // rd = (long) (red[c] - r); UNSUPPORTED("amn29e9pu9d8t9ccunm7fn20f"); // gd = (long) (green[c] - g); UNSUPPORTED("1qvtyk7n5kdkzxz8gi0t6sl7m"); // bd = (long) (blue[c] - b); UNSUPPORTED("5awh60zjinxyaizmnt7bcnsgo"); // dist = rd * rd + gd * gd + bd * bd; UNSUPPORTED("72niuav6m4ahb9zc0o87j3rup"); // if (dist < mindist) { UNSUPPORTED("45pwtf48ibwznp83ycluh93rj"); // if (dist == 0) UNSUPPORTED("39io4oxurhajbqm5r7elzwd3g"); // return c; /* Return exact match color */ UNSUPPORTED("9ctfnrqq05xpz8c2upf35fhfw"); // mindist = dist; UNSUPPORTED("2b2qywvsce8xntf2r51qyo3lz"); // ct = c; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("92ga17xtfz92ju9egrpkatfx5"); // /* no exact match. We now know closest, but first try to allocate exact */ UNSUPPORTED("5ovv0tkjil1wqwcyc3cvzxgha"); // if (top++ == 256) UNSUPPORTED("1qskgh83m3zps1l8d7o3ylo8g"); // return ct; /* Return closest available color */ UNSUPPORTED("7lij9fxsovvuk0nh18y6qq0cr"); // red[c] = r; UNSUPPORTED("7uavxrqaipwwg1svkkt5e6gon"); // green[c] = g; UNSUPPORTED("eew689jpibm80nsjrhdscvx6g"); // blue[c] = b; UNSUPPORTED("4ocisp2giicxopfp4qg90x7u9"); // *new = 1; /* flag new color */ UNSUPPORTED("264d1dm29x04zyyqjdk3ddnl5"); // return c; /* Return newly allocated color */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 11cnk7gp9g9cdub4ga2u8jszp // static char *figcolor[] = //3 gzljm8fc35nb7t3z7v13qxsl // static void fig_resolve_color(GVJ_t *job, gvcolor_t * color) public static Object fig_resolve_color(Object... arg) { UNSUPPORTED("d9huvcouhj8yhy5b4fps1vy3m"); // static void fig_resolve_color(GVJ_t *job, gvcolor_t * color) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bq377qzls373nkw9grr3xbhb9"); // int object_code = 0; /* always 0 for color */ UNSUPPORTED("dj1t9kf7kksjvw5f22h1orpag"); // int i, new; UNSUPPORTED("bxo9w7e24zf8i5xwh6wi8bxh4"); // switch (color->type) { UNSUPPORTED("3963t7kz3wj9jmr4b42bh0ikz"); // case COLOR_STRING: UNSUPPORTED("amg503k352sitwi1mo9d5l09"); // for (i = 0; figcolor[i]; i++) { UNSUPPORTED("1a2fom7wr1ukqwuv9pvsldw8d"); // if ((*(figcolor[i])==*(color->u.string)&&!strcmp(figcolor[i],color->u.string))) { UNSUPPORTED("9fmop7ycuw4c06a6ourx7vv8l"); // color->u.index = i; UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("4qyq5lb20pb6flw57yam37kot"); // case RGBA_BYTE: UNSUPPORTED("cnl3ezckqhpxx1k3zwy7hql2p"); // i = 32 + figColorResolve(&new, UNSUPPORTED("7ypz6k2dstjlbvkqpf28ryrka"); // color->u.rgba[0], UNSUPPORTED("1pkpumtkequn1fci0837v2e9a"); // color->u.rgba[1], UNSUPPORTED("dt4rc3qfwjro0c9kpkkqmtgw8"); // color->u.rgba[2]); UNSUPPORTED("438u9aoruxazb8jrtx91hlbdz"); // if (new) UNSUPPORTED("613atevuo7fg5d4ei7jbuj8x4"); // gvprintf(job, "%d %d #%02x%02x%02x\n", UNSUPPORTED("2gvnwuloyapznbrz8e4t06b35"); // object_code, i, UNSUPPORTED("7ypz6k2dstjlbvkqpf28ryrka"); // color->u.rgba[0], UNSUPPORTED("1pkpumtkequn1fci0837v2e9a"); // color->u.rgba[1], UNSUPPORTED("dt4rc3qfwjro0c9kpkkqmtgw8"); // color->u.rgba[2]); UNSUPPORTED("9d1rbsakym2mocpx05cjm9vua"); // color->u.index = i; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("bkkv1y1k8t2tqld7taz25diq9"); // assert(0); /* internal error */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dn17pk6kdqb9z3cs77yg6syfc"); // color->type = COLOR_INDEX; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c3uupx3hhjief1a1ojoxqlei8 // static void fig_line_style(obj_state_t *obj, int *line_style, double *style_val) public static Object fig_line_style(Object... arg) { UNSUPPORTED("7m4ggpn5o0f67nqnhdm0hh4oe"); // static void fig_line_style(obj_state_t *obj, int *line_style, double *style_val) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1a0u5t2wyxdqipaswmaz0wsvz"); // switch (obj->pen) { UNSUPPORTED("ersst7rw166izs2gaqp8nna81"); // case PEN_DASHED: UNSUPPORTED("2anynsrc9mionezyitu3h8ust"); // *line_style = 1; UNSUPPORTED("13xgbwsnirhzzkr4rhxlssp80"); // *style_val = 10.; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5u2fwmkidl1tehl5ms86n9ior"); // case PEN_DOTTED: UNSUPPORTED("6w3l2bm01hn2c597o758rnjdd"); // *line_style = 2; UNSUPPORTED("13xgbwsnirhzzkr4rhxlssp80"); // *style_val = 10.; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("f0tv0x0m7ey5lru9fd0f8d6zq"); // case PEN_SOLID: UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("d8wx5390c9r0unl07858cm345"); // *line_style = 0; UNSUPPORTED("3eu0slevfiogpisxlbf0y2b5m"); // *style_val = 0.; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 68usbfogj1fgje2tybh6k9wpv // static void fig_comment(GVJ_t *job, char *str) public static Object fig_comment(Object... arg) { UNSUPPORTED("1o50j8sbyabs2ev6hhz4w4sgr"); // static void fig_comment(GVJ_t *job, char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5ls4cp3mls7mazf3b7jw70mpv"); // gvprintf(job, "# %s\n", str); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 chft6a85fdy4m0a4qvlktap4v // static void fig_begin_graph(GVJ_t * job) public static Object fig_begin_graph(Object... arg) { UNSUPPORTED("b4s3t12w52npmo1ujd63j2f5k"); // static void fig_begin_graph(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("2pap898oez8d25yf5kfweuuk6"); // gvputs(job, "#FIG 3.2\n"); UNSUPPORTED("edxtivvelwys6lghpf7qc76zg"); // gvprintf(job, "# Generated by %s version %s (%s)\n", UNSUPPORTED("59dk4u30jduauy0wtxlpr76x1"); // job->common->info[0], job->common->info[1], job->common->info[2]); UNSUPPORTED("ekao5tqpl20bazozknsb9hrd8"); // gvprintf(job, "# Title: %s\n", agnameof(obj->u.g)); UNSUPPORTED("8b6jyihvfmhd2n5rvghchmrt2"); // gvprintf(job, "# Pages: %d\n", job->pagesArraySize.x * job->pagesArraySize.y); UNSUPPORTED("19fci1x0tibc9yaswa1vpwvj7"); // gvputs(job, "Portrait\n"); /* orientation */ UNSUPPORTED("bla0mad3joi37n0me8lt7abry"); // gvputs(job, "Center\n"); /* justification */ UNSUPPORTED("99jmbek36mwgrm1390uej329j"); // gvputs(job, "Inches\n"); /* units */ UNSUPPORTED("bv6sjdnyrgv0ewmwbbdy7oexf"); // gvputs(job, "Letter\n"); /* papersize */ UNSUPPORTED("b4pzpk2ljd50g6ytib67dvf9p"); // gvputs(job, "100.00\n"); /* magnification % */ UNSUPPORTED("ex1qio5jby5iqrzmx3wpne0i2"); // gvputs(job, "Single\n"); /* multiple-page */ UNSUPPORTED("cbaxpw5xdqyrxsc7zb2jf6kn9"); // gvputs(job, "-2\n"); /* transparent color (none) */ UNSUPPORTED("9rabahws1hd55k75f87vxna8h"); // gvputs(job, "1200"); /* resolution */ UNSUPPORTED("4f41n0n1ycxa4axvle5vo3i5d"); // gvputs(job, " 2\n"); /* coordinate system (upper left) */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bkqqnus0p5047dqnvj8xcmwcg // static void fig_end_graph(GVJ_t * job) public static Object fig_end_graph(Object... arg) { UNSUPPORTED("70oxcx7i9b6krmj29wltu7d6e"); // static void fig_end_graph(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7pkjok4dkmqeqrch0exb583uq"); // gvputs(job, "# end of FIG file\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4fe9t0bc320bhbivcpnyky0mw // static void fig_begin_page(GVJ_t * job) public static Object fig_begin_page(Object... arg) { UNSUPPORTED("ddvv6085s21jjkyi1wqmvdhpb"); // static void fig_begin_page(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c1gm14tiwad4k4eoml1bsd3k5"); // Depth = 2; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c1nntth6qdw8345t3z9utbg2i // static void fig_begin_node(GVJ_t * job) public static Object fig_begin_node(Object... arg) { UNSUPPORTED("9w1pcgb9r7k9nki9s1m44ocvv"); // static void fig_begin_node(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9hk8obst6wz63uuuikjjdwyzz"); // Depth = 1; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cn90ubz6l6mp7s7mvo837mo8z // static void fig_end_node(GVJ_t * job) public static Object fig_end_node(Object... arg) { UNSUPPORTED("bfrwx5xveq0p3tjz8wblhrcyu"); // static void fig_end_node(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c1gm14tiwad4k4eoml1bsd3k5"); // Depth = 2; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6al11pypki5kl1rtaf7punyjv // static void fig_begin_edge(GVJ_t * job) public static Object fig_begin_edge(Object... arg) { UNSUPPORTED("bxqu7omuy56mmwk0yzpvuk5i4"); // static void fig_begin_edge(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cioni2yvv899csf3dtmg9eha3"); // Depth = 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7a9nvpozbckjvcqfyiziwmerf // static void fig_end_edge(GVJ_t * job) public static Object fig_end_edge(Object... arg) { UNSUPPORTED("2o0jbz0jjtxfi8cigc8cay4h9"); // static void fig_end_edge(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c1gm14tiwad4k4eoml1bsd3k5"); // Depth = 2; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4oxer4job7tqemycu51w9p3mh // static void fig_textspan(GVJ_t * job, pointf p, textspan_t * span) public static Object fig_textspan(Object... arg) { UNSUPPORTED("djabt0co2f7pjs7jc9bvgxsr6"); // static void fig_textspan(GVJ_t * job, pointf p, textspan_t * span) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("7pxhx3kruwsackat2315zxaxh"); // PostscriptAlias *pA; UNSUPPORTED("9d9rjo8dlx1gxguygcjybx74m"); // int object_code = 4; /* always 4 for text */ UNSUPPORTED("5s2ydywbdzlqmetnfugnfe5fl"); // int sub_type = 0; /* text justification */ UNSUPPORTED("7ybdgnput9qe5cha4v5bregdu"); // int color = obj->pencolor.u.index; UNSUPPORTED("240u1bsplk74etvnv0m0z4af6"); // int depth = Depth; UNSUPPORTED("4mqqliisakngnea1fbgw3n16w"); // int pen_style = 0; /* not used */ UNSUPPORTED("dziv47p6oqiz76xbamjxu0z3o"); // int font = -1; /* init to xfig's default font */ UNSUPPORTED("5ocaelp6q7jvbtn5uhwco76xq"); // double font_size = span->font->size * job->zoom; UNSUPPORTED("5zziwmkfz3qorpubyv0ulb9po"); // double angle = job->rotation ? (M_PI / 2.0) : 0.0; UNSUPPORTED("eevxabquf9e055685n7suxe0i"); // int font_flags = 6; /* PostScript font + Special text */ UNSUPPORTED("5kl4au0hs3siodz66xvefluxd"); // /* Special text indicates that latex markup may exist UNSUPPORTED("2fgvo02dcn6m14crur8mksddh"); // * in the output - but note that dot knows nothing about latex, UNSUPPORTED("axpbsmglcjaf7wxm2hjju6p5z"); // * so the node sizes may be wrong. UNSUPPORTED("e5xwyhh2l2jm6g9w2ofnktaf6"); // */ UNSUPPORTED("dc3yhtv0s5gn1oiueksfstlmg"); // double height = 0.0; UNSUPPORTED("6kzarmuop6iucuc80316jjlh0"); // double length = 0.0; UNSUPPORTED("5gvgwpzq8o9hz6bmkphkldr14"); // pA = span->font->postscript_alias; UNSUPPORTED("1h5aj1b720joqhv55iufgqpfp"); // if (pA) /* if it is a standard postscript font */ UNSUPPORTED("bjr18qse2hemimgc5t7yvhb5o"); // font = pA->xfig_code; UNSUPPORTED("bpqxh9mig0sh1gasrlkg6hbph"); // switch (span->just) { UNSUPPORTED("15tf5rbprgr65ucp24e4bba9t"); // case 'l': UNSUPPORTED("7mx7u2dej8vdo3cx0ey3lm4l0"); // sub_type = 0; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("8pu80wsk8me7q17ensqlviq86"); // case 'r': UNSUPPORTED("dj3b12q9461tclhahjftmfegb"); // sub_type = 2; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("37fbny64zwo23oymypyreuldc"); // case 'n': UNSUPPORTED("9zod2h747f4609jdryh6ur7c8"); // sub_type = 1; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("yye4jazfsuupscl2ouv9wvr5"); // "%d %d %d %d %d %d %.1f %.4f %d %.1f %.1f %d %d %s\\001\n", UNSUPPORTED("elwt9xmgpxwk1vhtzqyo7kspm"); // object_code, sub_type, color, depth, pen_style, font, UNSUPPORTED("8slvsonq7x735w041f8tgfmql"); // font_size, angle, font_flags, height, length, ROUND(p.x), ROUND(p.y), UNSUPPORTED("7d4x8ygbd1tufei47zggvjf88"); // fig_string(span->str)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1jiv2yy8nu32uzog6alaa8v8k // static void fig_ellipse(GVJ_t * job, pointf * A, int filled) public static Object fig_ellipse(Object... arg) { UNSUPPORTED("6eij12yycbzfznuo59zpz9m0j"); // static void fig_ellipse(GVJ_t * job, pointf * A, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("49cpg15v3wnis47c6rhryrszg"); // int object_code = 1; /* always 1 for ellipse */ UNSUPPORTED("cejin2mgxtn6j73itzswkqp7r"); // int sub_type = 1; /* ellipse defined by radii */ UNSUPPORTED("7yz13t0sqtqvzxyddzcozxe33"); // int line_style; /* solid, dotted, dashed */ UNSUPPORTED("9pyxwz1r98uut10u02vkx6v1q"); // int thickness = obj->penwidth; UNSUPPORTED("spi81120or5799hcfjb8itk6"); // int pen_color = obj->pencolor.u.index; UNSUPPORTED("85qo3gmfwzm58xlqrukeg2vyr"); // int fill_color = obj->fillcolor.u.index; UNSUPPORTED("240u1bsplk74etvnv0m0z4af6"); // int depth = Depth; UNSUPPORTED("4mqqliisakngnea1fbgw3n16w"); // int pen_style = 0; /* not used */ UNSUPPORTED("1rb7krh80rapa6zt9gze6d8y"); // int area_fill = filled ? 20 : -1; UNSUPPORTED("erg3jyrsg6mbllclii9gqtczn"); // double style_val; UNSUPPORTED("3ii4kknfj31pfzxrmkfltt2zt"); // int direction = 0; UNSUPPORTED("dxmz1yn7d7fvno32wnups9ycf"); // double angle = 0.0; UNSUPPORTED("1t06o3s897149fuj9mx3ajyo0"); // int center_x, center_y, radius_x, radius_y; UNSUPPORTED("cht658tehrm3ih06a53hsv4yu"); // int start_x, start_y, end_x, end_y; UNSUPPORTED("dub6ackp2wp6jel838haqwj85"); // fig_line_style(obj, &line_style, &style_val); UNSUPPORTED("96gojoqvhtu23bt4w73sv8qna"); // start_x = center_x = ROUND(A[0].x); UNSUPPORTED("1dxdqoj7ddbigydx3mvemwwc7"); // start_y = center_y = ROUND(A[0].y); UNSUPPORTED("xzlx4ukt6lrd3oi5mdp7un5e"); // radius_x = ROUND(A[1].x - A[0].x); UNSUPPORTED("7xpj066ootir8rxi2ugf3nfxi"); // radius_y = ROUND(A[1].y - A[0].y); UNSUPPORTED("a6imzbkbllgyj947xlfc0xw4p"); // end_x = ROUND(A[1].x); UNSUPPORTED("55csxx8x7gw7hqe8mrozi6892"); // end_y = ROUND(A[1].y); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("7asl8kr2p5g9tx5jjbdl7lu8a"); // "%d %d %d %d %d %d %d %d %d %.3f %d %.4f %d %d %d %d %d %d %d %d\n", UNSUPPORTED("aqhcl971r2txljfiisq3maosf"); // object_code, sub_type, line_style, thickness, pen_color, UNSUPPORTED("dmgl7afna6bbrvwxo139s3dy0"); // fill_color, depth, pen_style, area_fill, style_val, direction, UNSUPPORTED("bvlsv4p2qx2rvc3xhdqsxwgbr"); // angle, center_x, center_y, radius_x, radius_y, start_x, UNSUPPORTED("5r9wxj6okv0n9dayg4f863i5x"); // start_y, end_x, end_y); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 crvis3ujujfabp7xi5hzoizsf // static void fig_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, int arrow_at_end, int filled) public static Object fig_bezier(Object... arg) { UNSUPPORTED("ba3o2mpkld3037uow23zovho7"); // static void fig_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, UNSUPPORTED("77j21vz8ekimnj6b6uefavtz2"); // int arrow_at_end, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("3slisz3umk8yx744ufnbbf50r"); // int object_code = 3; /* always 3 for spline */ UNSUPPORTED("dg2m9953dx1s3kh2xh49cl6j9"); // int sub_type; UNSUPPORTED("7yz13t0sqtqvzxyddzcozxe33"); // int line_style; /* solid, dotted, dashed */ UNSUPPORTED("9pyxwz1r98uut10u02vkx6v1q"); // int thickness = obj->penwidth; UNSUPPORTED("spi81120or5799hcfjb8itk6"); // int pen_color = obj->pencolor.u.index; UNSUPPORTED("85qo3gmfwzm58xlqrukeg2vyr"); // int fill_color = obj->fillcolor.u.index; UNSUPPORTED("240u1bsplk74etvnv0m0z4af6"); // int depth = Depth; UNSUPPORTED("4mqqliisakngnea1fbgw3n16w"); // int pen_style = 0; /* not used */ UNSUPPORTED("cv6hsumgyv706zrsc1mb79vjt"); // int area_fill; UNSUPPORTED("erg3jyrsg6mbllclii9gqtczn"); // double style_val; UNSUPPORTED("at27yenlhsw2mhidnzh560qs7"); // int cap_style = 0; UNSUPPORTED("6aehzky7l6ssu826xre37yhtt"); // int forward_arrow = 0; UNSUPPORTED("cvrcowx9gwh8vdfgelcwxhrhq"); // int backward_arrow = 0; UNSUPPORTED("cnai2dhmnp0nlkurdvfgcftzp"); // int npoints = n; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("2ripxrfk1hjvzu0cnqlmtvz7q"); // pointf pf, V[4]; UNSUPPORTED("41nrdsugvfgw23s93g0dhizkn"); // point p; UNSUPPORTED("54a5cffl70pabwgya54wkrjdt"); // int j, step; UNSUPPORTED("551funk1bxiemly3silcqtngw"); // int count = 0; UNSUPPORTED("cav0e7ncloqss0hsvc4fyfi7s"); // int size; UNSUPPORTED("6wvmmuf1e3qp2qoi1k1njw0a0"); // char *buffer; UNSUPPORTED("6ik3p99apk5rihypipg0uxu8i"); // char *buf; UNSUPPORTED("8gbsddpwt5ezq32xj2np650w7"); // assert (n >= 4); UNSUPPORTED("6v2xdvwnmehi99gxnutv3kf38"); // buffer = UNSUPPORTED("7ls09ukxgkos4a02570trbo11"); // malloc((npoints + 1) * (6 + UNSUPPORTED("82a2b3l9tnp4wb4zntqluobrf"); // 1) * 20 * sizeof(char)); UNSUPPORTED("3fe0hbpwq6bj9ioyuwkjdzyzz"); // buf = buffer; UNSUPPORTED("dub6ackp2wp6jel838haqwj85"); // fig_line_style(obj, &line_style, &style_val); UNSUPPORTED("9yhmhvzz81x2bovke5qc93036"); // if (filled) { UNSUPPORTED("bj3webccz9d6zwkfor1wbs62"); // sub_type = 5; /* closed X-spline */ UNSUPPORTED("7zcxl4upa7xx6c4i5y2x03nm8"); // area_fill = 20; /* fully saturated color */ UNSUPPORTED("72p315i58kf1cm2zd3q0u8cn9"); // fill_color = job->obj->fillcolor.u.index; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("b42prafms4wcjet9oaqz2r9an"); // sub_type = 4; /* opened X-spline */ UNSUPPORTED("e8seyevdqkm3o522h0kw3ofoo"); // area_fill = -1; UNSUPPORTED("cnfp5y1qtuaq6rg9e86neg62e"); // fill_color = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a5n7zezdexpwwfy12hsc5q41m"); // V[3].x = A[0].x; UNSUPPORTED("3wrmg8m53mwjg50y22lcyblmg"); // V[3].y = A[0].y; UNSUPPORTED("d4fw6y4mj6hshwm4fwoegfv1"); // /* Write first point in line */ UNSUPPORTED("7ap9l0s2x29me32trtt38kph0"); // count++; UNSUPPORTED("8hem85phuz76zejto4bkwovw1"); // PF2P(A[0], p); UNSUPPORTED("73o6ys1pid2ocs41fxtzlcv8n"); // size = sprintf(buf, " %d %d", p.x, p.y); UNSUPPORTED("1j1vfgxpkci66jmmmccgza2lm"); // buf += size; UNSUPPORTED("a3w2dgd3a2dpgvb5n1a63c9ar"); // /* write subsequent points */ UNSUPPORTED("3s0blwgctqa0ygs872bnu4kye"); // for (i = 0; i + 3 < n; i += 3) { UNSUPPORTED("4a58elv5pvvi5twh4hrzzzj3d"); // V[0] = V[3]; UNSUPPORTED("cr2c5h66bahjj7gd63bz4bhl7"); // for (j = 1; j <= 3; j++) { UNSUPPORTED("d5p6lhssn8pxlfrjhmbm89neq"); // V[j].x = A[i + j].x; UNSUPPORTED("aasvql7kiskb32j9te9gp5xif"); // V[j].y = A[i + j].y; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("afevm918v5rewrdihltcjtka7"); // for (step = 1; step <= 6; step++) { UNSUPPORTED("cc15ym2418ncxwrvmrbf7d5fb"); // count++; UNSUPPORTED("1maly6enkyv5xs410cfeocfo8"); // pf = Bezier (V, 3, (double) step / 6, NULL, NULL); UNSUPPORTED("9hehuild0uke3e57cn1cu37d4"); // PF2P(pf, p); UNSUPPORTED("dlhqn2sqdjrfl9iuem0x42sg7"); // size = sprintf(buf, " %d %d", p.x, p.y); UNSUPPORTED("dc1iwkgf67a40ouxumqgp087o"); // buf += size; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c4x928a1fx4pey929yv4i7xi7"); // gvprintf(job, "%d %d %d %d %d %d %d %d %d %.1f %d %d %d %d\n", UNSUPPORTED("1dqdjogaxgb0j9mm27wtggy5a"); // object_code, UNSUPPORTED("391a91dumfga72c7rkunzsagw"); // sub_type, UNSUPPORTED("3flh0qnrquemq28lvxyxvwr2z"); // line_style, UNSUPPORTED("bgi0dskp51huj9xln98wnumjz"); // thickness, UNSUPPORTED("3e88wabokfvxz8grv7y8pcp7x"); // pen_color, UNSUPPORTED("71yn2s9gjpe47twtrov8pg08y"); // fill_color, UNSUPPORTED("5zqiluvq3fq9xui090kw9js36"); // depth, UNSUPPORTED("6f5tu3f8cchk4yg41erz05hd0"); // pen_style, UNSUPPORTED("kgl9ed0oj2lceff9d2ufi72n"); // area_fill, UNSUPPORTED("c5pgscy9jqkl0df0tcd2xh7d9"); // style_val, cap_style, forward_arrow, backward_arrow, count); UNSUPPORTED("cqyleb6lm2k4okgz6yyfsnyvs"); // gvprintf(job, " %s\n", buffer); /* print points */ UNSUPPORTED("2puk68crvxxdnxykmgd8hccpb"); // free(buffer); UNSUPPORTED("880df02j7ml0ml3y149lcn5r0"); // for (i = 0; i < count; i++) { UNSUPPORTED("aqnpclkffnis7si1mcldfnqzb"); // gvprintf(job, " %d", i % (count - 1) ? 1 : 0); /* -1 on all */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b7eafy5bhxn361xe2c8x8553b"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b6u8ndxbe2p5x3otn62y515vj // static void fig_polygon(GVJ_t * job, pointf * A, int n, int filled) public static Object fig_polygon(Object... arg) { UNSUPPORTED("60icufw43hiimy7u8y66joumx"); // static void fig_polygon(GVJ_t * job, pointf * A, int n, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("1250jrnrnv2ts7w11no09s3c0"); // int object_code = 2; /* always 2 for polyline */ UNSUPPORTED("1u7xi4usjz62x26cm8thbbuzf"); // int sub_type = 3; /* always 3 for polygon */ UNSUPPORTED("7yz13t0sqtqvzxyddzcozxe33"); // int line_style; /* solid, dotted, dashed */ UNSUPPORTED("9pyxwz1r98uut10u02vkx6v1q"); // int thickness = obj->penwidth; UNSUPPORTED("spi81120or5799hcfjb8itk6"); // int pen_color = obj->pencolor.u.index; UNSUPPORTED("85qo3gmfwzm58xlqrukeg2vyr"); // int fill_color = obj->fillcolor.u.index; UNSUPPORTED("240u1bsplk74etvnv0m0z4af6"); // int depth = Depth; UNSUPPORTED("4mqqliisakngnea1fbgw3n16w"); // int pen_style = 0; /* not used */ UNSUPPORTED("1rb7krh80rapa6zt9gze6d8y"); // int area_fill = filled ? 20 : -1; UNSUPPORTED("erg3jyrsg6mbllclii9gqtczn"); // double style_val; UNSUPPORTED("emk8vv370o9kkt54b48xbckqk"); // int join_style = 0; UNSUPPORTED("at27yenlhsw2mhidnzh560qs7"); // int cap_style = 0; UNSUPPORTED("5ah3zh0iiveyst5794k0axkys"); // int radius = 0; UNSUPPORTED("6aehzky7l6ssu826xre37yhtt"); // int forward_arrow = 0; UNSUPPORTED("cvrcowx9gwh8vdfgelcwxhrhq"); // int backward_arrow = 0; UNSUPPORTED("b2q7ayijmq412v8tkb0p5a4xq"); // int npoints = n + 1; UNSUPPORTED("dub6ackp2wp6jel838haqwj85"); // fig_line_style(obj, &line_style, &style_val); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("46ua4zhlbcjsh2nua5zhohuez"); // "%d %d %d %d %d %d %d %d %d %.1f %d %d %d %d %d %d\n", UNSUPPORTED("aqhcl971r2txljfiisq3maosf"); // object_code, sub_type, line_style, thickness, pen_color, UNSUPPORTED("7565hrxms7ljcrl0jc6pzqo2r"); // fill_color, depth, pen_style, area_fill, style_val, join_style, UNSUPPORTED("cyfkuqh06tebk11sxbz22gb"); // cap_style, radius, forward_arrow, backward_arrow, npoints); UNSUPPORTED("2raacuz450jnyzch78nhdpi5r"); // figptarray(job, A, n, 1); /* closed shape */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1afauosj6wr5u4dhbjovifgei // static void fig_polyline(GVJ_t * job, pointf * A, int n) public static Object fig_polyline(Object... arg) { UNSUPPORTED("1sx5zjyuegemqg5bkzvssc1bn"); // static void fig_polyline(GVJ_t * job, pointf * A, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("1250jrnrnv2ts7w11no09s3c0"); // int object_code = 2; /* always 2 for polyline */ UNSUPPORTED("2xiuwyphr1m2pc2o9smsohpy7"); // int sub_type = 1; /* always 1 for polyline */ UNSUPPORTED("7yz13t0sqtqvzxyddzcozxe33"); // int line_style; /* solid, dotted, dashed */ UNSUPPORTED("9pyxwz1r98uut10u02vkx6v1q"); // int thickness = obj->penwidth; UNSUPPORTED("spi81120or5799hcfjb8itk6"); // int pen_color = obj->pencolor.u.index; UNSUPPORTED("afxyknafudgf6s6v5jw9qx8p9"); // int fill_color = 0; UNSUPPORTED("240u1bsplk74etvnv0m0z4af6"); // int depth = Depth; UNSUPPORTED("4mqqliisakngnea1fbgw3n16w"); // int pen_style = 0; /* not used */ UNSUPPORTED("1pvrunrk1ylb19scd5xzhf3lp"); // int area_fill = 0; UNSUPPORTED("erg3jyrsg6mbllclii9gqtczn"); // double style_val; UNSUPPORTED("emk8vv370o9kkt54b48xbckqk"); // int join_style = 0; UNSUPPORTED("at27yenlhsw2mhidnzh560qs7"); // int cap_style = 0; UNSUPPORTED("5ah3zh0iiveyst5794k0axkys"); // int radius = 0; UNSUPPORTED("6aehzky7l6ssu826xre37yhtt"); // int forward_arrow = 0; UNSUPPORTED("cvrcowx9gwh8vdfgelcwxhrhq"); // int backward_arrow = 0; UNSUPPORTED("cnai2dhmnp0nlkurdvfgcftzp"); // int npoints = n; UNSUPPORTED("dub6ackp2wp6jel838haqwj85"); // fig_line_style(obj, &line_style, &style_val); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("46ua4zhlbcjsh2nua5zhohuez"); // "%d %d %d %d %d %d %d %d %d %.1f %d %d %d %d %d %d\n", UNSUPPORTED("aqhcl971r2txljfiisq3maosf"); // object_code, sub_type, line_style, thickness, pen_color, UNSUPPORTED("7565hrxms7ljcrl0jc6pzqo2r"); // fill_color, depth, pen_style, area_fill, style_val, join_style, UNSUPPORTED("cyfkuqh06tebk11sxbz22gb"); // cap_style, radius, forward_arrow, backward_arrow, npoints); UNSUPPORTED("8pzdn1xlgnbq81goh0w0k3roi"); // figptarray(job, A, n, 0); /* open shape */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 am7q7qqmqp3cj87eqv61ag2tt // gvrender_engine_t fig_engine = //1 ar7bi3fv0al906tc46yku4qmt // static char *fig_knowncolors[] = //1 2qcp4lauqvs4msrc3ulasniqr // gvrender_features_t render_features_fig = //1 1hl171y3pew4vgjt6v4vsax61 // gvdevice_features_t device_features_fig = //1 472dfp6vcnqblz1b82crth1dc // gvplugin_installed_t gvrender_fig_types[] = //1 3dtvxqen0zlfmzz1ygg4lnixq // gvplugin_installed_t gvdevice_fig_types[] = } plantuml-1.2017.15/src/gen/plugin/core/gvrender_core_map__c.java000066400000000000000000000431071312650303100244360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.plugin.core; import static smetana.core.Macro.UNSUPPORTED; public class gvrender_core_map__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //3 csv3l33vvs1vebcphye24jq0f // static void map_output_shape (GVJ_t *job, map_shape_t map_shape, pointf * AF, int nump, char* url, char *tooltip, char *target, char *id) public static Object map_output_shape(Object... arg) { UNSUPPORTED("8kf7pfh75y963yumtk9b9z3ys"); // static void map_output_shape (GVJ_t *job, map_shape_t map_shape, pointf * AF, int nump, UNSUPPORTED("bfj85pn6xenrvqizqe3wao6l7"); // char* url, char *tooltip, char *target, char *id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("4yzh52cxlcnx4kwijawrsiq93"); // static point *A; UNSUPPORTED("ajll5vpeb8zhkx6ef6exlg0x"); // static int size_A; UNSUPPORTED("1w53t40nspe671k7na03lhgrq"); // if (!AF || !nump) UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return; UNSUPPORTED("d68wemoq0y2k254bi7ibengwn"); // if (size_A < nump) { UNSUPPORTED("7edr6xzvxhtgwcv3aqikccj9i"); // size_A = nump + 10; UNSUPPORTED("497iml6bv2y1ybutiuoiszh1m"); // A = realloc(A, size_A * sizeof(point)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4v4y5eb8k5nr6qaau3ynqhvcq"); // for (i = 0; i < nump; i++) UNSUPPORTED("cx0olmahgh2xwrv8z1bx82xm2"); // PF2P(AF[i], A[i]); UNSUPPORTED("5i3rds5u46g9ststudzor9xt"); // if (job->render.id == FORMAT_IMAP && url && url[0]) { UNSUPPORTED("2hz9rwf090vttuoibzu9fsw5q"); // switch (map_shape) { UNSUPPORTED("9ny69tiwv0c1k92wg0f5bc2hx"); // case MAP_RECTANGLE: UNSUPPORTED("3fnbb8my11ctfv54p20sjx95u"); // /* Y_GOES_DOWN so need UL to LR */ UNSUPPORTED("13myxcrwgvjfs7vqhn41gptdg"); // gvprintf(job, "rect %s %d,%d %d,%d\n", url, UNSUPPORTED("apxbzz2r91p4jj1fzpftrnwll"); // A[0].x, A[1].y, A[1].x, A[0].y); UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("969pm8kka9j9ajn1lpb3q0e7f"); // case MAP_CIRCLE: UNSUPPORTED("1f8q1mvrhrf0asqye0b30as1n"); // gvprintf(job, "circle %s %d,%d,%d\n", url, UNSUPPORTED("e8ycnkoqzmazghue74s8t4ods"); // A[0].x, A[0].y, A[1].x-A[0].x); UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("clptlh6vuwx7mynynpacj0ktl"); // case MAP_POLYGON: UNSUPPORTED("8fgyk7ask8my1kx2al65iaaje"); // gvprintf(job, "poly %s", url); UNSUPPORTED("d0fj0wck6hjqyxoodtze7797f"); // for (i = 0; i < nump; i++) UNSUPPORTED("d0b7gixn87mqrfgw7cfdyuj9h"); // gvprintf(job, " %d,%d", A[i].x, A[i].y); UNSUPPORTED("5uq09elejy2ot3s8x5d13dxs9"); // gvputs(job, "\n"); UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("p0mt8wznalavjdm44ot4ykl7"); // default: UNSUPPORTED("1hh9o1t0fynw7ejmjny7gevig"); // assert(0); UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("d3576y606phfrc0nvil7m7j14"); // } else if (job->render.id == FORMAT_ISMAP && url && url[0]) { UNSUPPORTED("2hz9rwf090vttuoibzu9fsw5q"); // switch (map_shape) { UNSUPPORTED("9ny69tiwv0c1k92wg0f5bc2hx"); // case MAP_RECTANGLE: UNSUPPORTED("3fnbb8my11ctfv54p20sjx95u"); // /* Y_GOES_DOWN so need UL to LR */ UNSUPPORTED("4cujqj1wxkt2prhfpa93ocz33"); // gvprintf(job, "rectangle (%d,%d) (%d,%d) %s %s\n", UNSUPPORTED("b0bipjx63l5bwm4ur9r16oddw"); // A[0].x, A[1].y, A[1].x, A[0].y, url, tooltip); UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("p0mt8wznalavjdm44ot4ykl7"); // default: UNSUPPORTED("1hh9o1t0fynw7ejmjny7gevig"); // assert(0); UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("f271g0t382wvokvh5b79gnj3c"); // } else if (job->render.id == FORMAT_CMAP || job->render.id == FORMAT_CMAPX) { UNSUPPORTED("2hz9rwf090vttuoibzu9fsw5q"); // switch (map_shape) { UNSUPPORTED("969pm8kka9j9ajn1lpb3q0e7f"); // case MAP_CIRCLE: UNSUPPORTED("apmt6zpnpwkhkathi0qvmwxok"); // gvputs(job, "render.id == FORMAT_CMAPX) UNSUPPORTED("9wuepleq2yxn1w8g9l2t5bv8n"); // gvputs(job, "\"/>\n"); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("8ljg9ari52ao59grstt68083c"); // gvputs(job, "\">\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ecfzje2iii2p83pu7a8oknudk // static void map_begin_page(GVJ_t * job) public static Object map_begin_page(Object... arg) { UNSUPPORTED("51hmqgn59iqb0k30s7slug47h"); // static void map_begin_page(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("8yytudftst76763qgnjebkzhm"); // char *s; UNSUPPORTED("69opxqj69jbqthw7e5x8p71j0"); // switch (job->render.id) { UNSUPPORTED("7txd1s74e7fla0b5ppbpj4e9m"); // case FORMAT_IMAP: UNSUPPORTED("5qsnhnk2hikn4v5rngaesebru"); // gvputs(job, "base referer\n"); UNSUPPORTED("bgwmnukjcck9eqoe70218t5sl"); // if (obj->url && obj->url[0]) { UNSUPPORTED("5mfw77dfjvx7mortvgofrjffx"); // gvputs(job, "default "); UNSUPPORTED("cmkzfcsqw6lcz4oeepg7r0ysr"); // gvputs(job, xml_string(obj->url)); UNSUPPORTED("3wbqcj3wgh85ybkhw9jxfnqt5"); // gvputs(job, "\n"); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("azd5ozzc5h2655cjyqy5l6xdm"); // case FORMAT_ISMAP: UNSUPPORTED("bgwmnukjcck9eqoe70218t5sl"); // if (obj->url && obj->url[0]) { UNSUPPORTED("5mfw77dfjvx7mortvgofrjffx"); // gvputs(job, "default "); UNSUPPORTED("cmkzfcsqw6lcz4oeepg7r0ysr"); // gvputs(job, xml_string(obj->url)); UNSUPPORTED("6iupbw97yijdtdpg2bxm4syfu"); // gvputs(job, " "); UNSUPPORTED("4ujbj52xrmo4jrufevyc1puvo"); // gvputs(job, xml_string(agnameof(obj->u.g))); UNSUPPORTED("3wbqcj3wgh85ybkhw9jxfnqt5"); // gvputs(job, "\n"); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("t5h5je1zpt3u8ndyh15gdg9l"); // case FORMAT_CMAPX: UNSUPPORTED("f34ya28ve4bvds8gp4exdfj56"); // s = xml_string(agnameof(obj->u.g)); UNSUPPORTED("xrk4koadrppi4k4gs57d4h9m"); // gvputs(job, "\n"); UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4mrmum1lvc20st1t0ngkucbc4 // static void map_end_page(GVJ_t * job) public static Object map_end_page(Object... arg) { UNSUPPORTED("em0rrlv2wa8t6mbr0f800q1n0"); // static void map_end_page(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("69opxqj69jbqthw7e5x8p71j0"); // switch (job->render.id) { UNSUPPORTED("d2zsw3sbah6m5v82up3yiqu8w"); // case FORMAT_CMAP: UNSUPPORTED("1l81rvjolrz0avoek7zv4ikn6"); // map_output_shape(job, obj->url_map_shape, UNSUPPORTED("b1a3iatyrxuif1n4gqu0f8u5u"); // obj->url_map_p,obj->url_map_n, UNSUPPORTED("av1tl9edbbm94up94c6rfx2tc"); // obj->url, obj->tooltip, obj->target, obj->id); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("t5h5je1zpt3u8ndyh15gdg9l"); // case FORMAT_CMAPX: UNSUPPORTED("1l81rvjolrz0avoek7zv4ikn6"); // map_output_shape(job, obj->url_map_shape, UNSUPPORTED("b1a3iatyrxuif1n4gqu0f8u5u"); // obj->url_map_p,obj->url_map_n, UNSUPPORTED("av1tl9edbbm94up94c6rfx2tc"); // obj->url, obj->tooltip, obj->target, obj->id); UNSUPPORTED("bli0vsh6dvw26mi7hr07pgrto"); // gvputs(job, "\n"); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6gah2kjnd3decve8krn1svbqb // static void map_begin_anchor(GVJ_t * job, char *url, char *tooltip, char *target, char *id) public static Object map_begin_anchor(Object... arg) { UNSUPPORTED("5qn8yqjbqcyx0grv0yypccdy2"); // static void map_begin_anchor(GVJ_t * job, char *url, char *tooltip, char *target, char *id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("6s3igifxj8shhox656bdbx5pf"); // map_output_shape(job, obj->url_map_shape, UNSUPPORTED("2clu43j15vr7y290qz69husnn"); // obj->url_map_p, obj->url_map_n, UNSUPPORTED("6vqhbjy76o3uv1cptjwt6y45l"); // url, tooltip, target, id); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 aunc2bv7z37pgfwoea8pqzdw6 // static gvrender_engine_t map_engine = //1 1zilsb5vzp5hkz1bqy634l392 // static gvrender_features_t render_features_map = //1 bi57uhrsu8bhcnnl39xr27v97 // static gvdevice_features_t device_features_map = //1 3nksama0j9ayv22motim935v3 // static gvdevice_features_t device_features_map_nopoly = //1 zv8eak0r501gmnqu92pzr5x5 // gvplugin_installed_t gvrender_map_types[] = //1 97mwnp7oqdjce0xttnqhkq7t3 // gvplugin_installed_t gvdevice_map_types[] = } plantuml-1.2017.15/src/gen/plugin/core/gvrender_core_pic__c.java000066400000000000000000001274141312650303100244400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.plugin.core; import static smetana.core.Macro.UNSUPPORTED; public class gvrender_core_pic__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 bfefdbmxgotf4qqkevk6qvjfy // static int BezierSubdivision = 10 //1 8505t85skxggg0irl1tfmrgdy // static int onetime = NOT(0) //1 4xmsfk0yyzqo0cf2y9ajr36ty // static double Fontscale //1 dffduaq2lkvewi20yyl0idqlq // static const char *EscComment = //1 1u8ij16cx26ycd5fobsl8g2di // static const char picgen_msghdr[] = //3 ayos3jxehp1ztek0fzcl358ep // static void unsupported(char *s) public static Object unsupported(Object... arg) { UNSUPPORTED("7088si6a7r2vno19b32uo8410"); // static void unsupported(char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bf1fgr4hqu10lh6v19a4jkjgv"); // agerr(AGWARN, "%s%s unsupported\n", picgen_msghdr, s); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 caqxhmpta2lx5mq13dxzj2u8x // static void warn(char *s) public static Object warn(Object... arg) { UNSUPPORTED("eeixovji04zzi8o9wfp7t9t7o"); // static void warn(char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("w0ej7p9v7ag2pzzics45jb9x"); // agerr(AGWARN, "%s%s\n", picgen_msghdr, s); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 554f31iuqyl7u1zcf17z53d5d // static fontinfo fonttab[] = //3 8rp81pt8d1m62r13763vzqa4x // static char *picfontname(char *psname) public static Object picfontname(Object... arg) { UNSUPPORTED("3cgi3bkyyuwjkob8wjbv3j9jb"); // static char *picfontname(char *psname) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ehyq61leulhsbvzo34gv4br20"); // char *rv; UNSUPPORTED("ddbhwe6t3q29agh7a7xgastxx"); // fontinfo *p; UNSUPPORTED("1quze5gak9fidti4u2gpcgauq"); // for (p = fonttab; p->psname; p++) UNSUPPORTED("2d2432dtxx1g5wbcjejux4jqi"); // if (strcmp(p->psname, psname) == 0) UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; UNSUPPORTED("epo8hgm34vxye7ud1qqax9ilb"); // if (p->psname) UNSUPPORTED("kyhn9y1x9lm133bxfmj4bwek"); // rv = p->trname; UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("k08w7t9x1k6guv6vfivs4v2s"); // agerr(AGERR, "%s%s is not a troff font\n", picgen_msghdr, psname); UNSUPPORTED("6ulxsks045sya9n5eia1i7ddp"); // /* try base font names, e.g. Helvetica-Outline-Oblique -> Helvetica-Outline -> Helvetica */ UNSUPPORTED("72ll8tnxnsj2tpmxl5khlayu0"); // if ((rv = strrchr(psname, '-'))) { UNSUPPORTED("btt8svsoi3k8j99f4n3rlc843"); // *rv = '\0'; /* psname is not specified as const ... */ UNSUPPORTED("aa0y2bm93qvnsy4kdck9f1f2a"); // rv = picfontname(psname); UNSUPPORTED("59zykg2pjkae9ritp3zmr9eeo"); // } else UNSUPPORTED("5zdgc0gkiq6npy5xb86pim6b7"); // rv = "R"; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 wa4nhto9uu4kuly7ppruahop // static void pic_set_color(GVJ_t *job, char *name) public static Object pic_set_color(Object... arg) { UNSUPPORTED("64zybybdqdszgcglznula2i6f"); // static void pic_set_color(GVJ_t *job, char *name) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dicmblysf3rxg5j4drimtm362"); // gvcolor_t color; UNSUPPORTED("e5viuqy4awhjy9yfqag7onhm1"); // colorxlate(name, &color, HSVA_DOUBLE); UNSUPPORTED("baelh9sxxexicjnrlbx7vdyb4"); // /* just v used to set grayscale value */ UNSUPPORTED("er4wz5rvcluf3o1z6qwlatuzh"); // gvprintf(job, "setfillval %f\n", color.u.HSVA[2]); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c5pyghjxe3qfm0n6mgm79rdlm // static void pic_set_style(GVJ_t *job, char **s) public static Object pic_set_style(Object... arg) { UNSUPPORTED("96wpaw44vdacs0vh6jgoj4tz6"); // static void pic_set_style(GVJ_t *job, char **s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("balwwj76p8kmfix80qmjiugl4"); // const char *line, *p; UNSUPPORTED("cs3d00usngkaxu4kgv7kkyckp"); // char skip = 0; UNSUPPORTED("cf8w5z35zxww7q6yjin9lc9op"); // char buf[BUFSIZ]; UNSUPPORTED("32ofqlv8xfhdrh1ooiw235kv6"); // buf[0] = '\0'; UNSUPPORTED("6xleu4rgsqy1817r9he4r47b0"); // gvprintf(job, "define attrs%d %%", 0); UNSUPPORTED("1azyqxax8ahnngehbhvuqt8gz"); // while ((p = line = *s++)) { UNSUPPORTED("59gu8gjy0gkpkkgmy7w3c6hz8"); // while (*p) UNSUPPORTED("a0t85lvr3qdf70ajg30c8eadd"); // p++; UNSUPPORTED("5ms90gds9d7jyok5oqzrumfjz"); // p++; UNSUPPORTED("8tvf313utqfv0v9axl6r3wlkl"); // while (*p) { UNSUPPORTED("cf7nujm2cqcn2a02hkvyf1mvw"); // if (!strcmp(line, "setlinewidth")) { /* a hack to handle the user-defined (PS) style spec in proc3d.gv */ UNSUPPORTED("ai5a1136garr7covbnxk6pyxr"); // long n = atol(p); UNSUPPORTED("16jrsjmpt5dozkg3fowz598p1"); // sprintf(buf, UNSUPPORTED("1nvkg4g1u8xahxfewtp3c722z"); // "oldlinethick = linethick;linethick = %ld * scalethickness / %.0f\n", UNSUPPORTED("eg7jvgq9596hgaq35cxgye91g"); // n, Fontscale); UNSUPPORTED("5kcdmo80e6cptkdn6zgvgxf81"); // skip = 1; UNSUPPORTED("8983k01wuaibmqpm7x4605bp7"); // } else UNSUPPORTED("2fvo48a0txnpmru0ceovu13vm"); // gvprintf(job, " %s", p); UNSUPPORTED("bc3tgg2q6b0su4mo7wfruc1lb"); // while (*p) UNSUPPORTED("9qg60ras48o8da5tv4x27825z"); // p++; UNSUPPORTED("a0t85lvr3qdf70ajg30c8eadd"); // p++; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("26drzkow7ea1ue7a2odilltn8"); // if (!skip) UNSUPPORTED("32d5j591dz6q8zd5wzds7vbrw"); // gvprintf(job, " %s", line); UNSUPPORTED("v8fuj86tc7ilar46z8lk0ou9"); // skip = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3n37k03ptdiq5ledify5lcl9w"); // gvprintf(job, " %%\n"); UNSUPPORTED("7bnv6h5iccaz38t7o7b8u1dlh"); // gvprintf(job, "%s", buf); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 48ntim1de294utfi4bxsk074i // static void picptarray(GVJ_t *job, pointf * A, int n, int close) public static Object picptarray(Object... arg) { UNSUPPORTED("bmccbawo91lbcivkwyf8vc4hg"); // static void picptarray(GVJ_t *job, pointf * A, int n, int close) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("41nrdsugvfgw23s93g0dhizkn"); // point p; UNSUPPORTED("1vi49g48u2rc9v88yhabta0yw"); // for (i = 0; i < n; i++) { UNSUPPORTED("4pvmqbw3yqtv1skjcmzaxzz1j"); // PF2P(A[i],p); UNSUPPORTED("9l156bri4abd87e44n6ponvf7"); // gvprintf(job, " %d %d", p.x, p.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("125u8ocmya1ui6f2vy92ys41c"); // if (close) { UNSUPPORTED("3nww6192gmqzcyq5v0whqebqg"); // PF2P(A[0],p); UNSUPPORTED("9l156bri4abd87e44n6ponvf7"); // gvprintf(job, " %d %d", p.x, p.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b7eafy5bhxn361xe2c8x8553b"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6ijginogo45k3r7evz06wou90 // static char *pic_string(char *s) public static Object pic_string(Object... arg) { UNSUPPORTED("dw9uiu4spxd1twnomgmszil97"); // static char *pic_string(char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("210phh7av8ei8ajjmpptx96m6"); // static char *buf = NULL; UNSUPPORTED("6fpm1wk8mz0hofn15361g6nzn"); // static int bufsize = 0; UNSUPPORTED("3xzujk207ipx0d60nbbrwyjez"); // int pos = 0; UNSUPPORTED("aexhdud6z2wbwwi73yppp0ynl"); // char *p; UNSUPPORTED("10sir32iwi5l2jyfgp65pihto"); // unsigned char c; UNSUPPORTED("cjyiejw67ffjjsk60tgeebvif"); // if (!buf) { UNSUPPORTED("7mna7k5m37x6jycc55rpeeje8"); // bufsize = 64; UNSUPPORTED("ep0onxumq5jdi6uy8gbmbmcbb"); // buf = malloc(bufsize * sizeof(char)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dpfzdhkfq6u86uv5f9lnqfbpq"); // p = buf; UNSUPPORTED("c5ryg6x0ohski7pfyjfenou9s"); // while ((c = *s++)) { UNSUPPORTED("9zdb3w6p9hdzpyyb0migch83s"); // if (pos > (bufsize - 8)) { UNSUPPORTED("6e6hti39a4qgpg5w8s3kln578"); // bufsize *= 2; UNSUPPORTED("5ws50ei3kkqkw4ut1rt6a53bm"); // buf = realloc(buf, bufsize * sizeof(char)); UNSUPPORTED("7bji4miupgafja2y29safeneg"); // p = buf + pos; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("19kfsb89ftcmo72ye73cn1plm"); // if (isascii(c)) { UNSUPPORTED("q0pniw6fxx771jygciq7vzx8"); // if (c == '\\') { UNSUPPORTED("et6mc0jzry6p7o1acim2wudi9"); // *p++ = '\\'; UNSUPPORTED("e2z9y4j5uutkew1vp7bi9rhl4"); // pos++; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("a9lw77m0m78a5a98c3vho52nx"); // *p++ = c; UNSUPPORTED("80sypvk9gmir13zzfmeeey8ri"); // pos++; UNSUPPORTED("7g575y36b78djy0o00izqx7eq"); // } else { UNSUPPORTED("9x6j5mtq8ejbmg0m64b60ml"); // *p++ = '\\'; UNSUPPORTED("dev643k7td5xqer5x35ldenoh"); // sprintf(p, "%03o", c); UNSUPPORTED("5xg21ei3admmdqgn97zgseutd"); // p += 3; UNSUPPORTED("8sk7u4qhds42x15qm3hujzttc"); // pos += 4; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2t1d66kwn86kqh0i665hqw6cl"); // *p = '\0'; UNSUPPORTED("5jfpogdyby101eyuw2dhtb5cg"); // return buf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 18gvpecdvza39yoravsxzyqgm // static int picColorResolve(int *new, int r, int g, int b) public static Object picColorResolve(Object... arg) { UNSUPPORTED("50j17slpkgnb1ezx64xqzce87"); // static int picColorResolve(int *new, int r, int g, int b) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c2sddndcjmau5tt4mtu64l1ez"); // static int top = 0; UNSUPPORTED("bnrhaqz49cielpy7fgo6dz2ub"); // static short red[256], green[256], blue[256]; UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c; UNSUPPORTED("5hsogcx940isfoos26t853z9j"); // int ct = -1; UNSUPPORTED("4nf4ocdnzdty5edptkslzgrhc"); // long rd, gd, bd, dist; UNSUPPORTED("b9jn6a9ked66uo0b0um0kfzfb"); // long mindist = 3 * 255 * 255; /* init to max poss dist */ UNSUPPORTED("c5tawsm7j8n0vkq0qcls0soc3"); // *new = 0; /* in case it is not a new color */ UNSUPPORTED("39bm5fhhzyquf4rlun9zbcbi4"); // for (c = 0; c < top; c++) { UNSUPPORTED("6412n3rfkfyimbx1puriyeqqz"); // rd = (long) (red[c] - r); UNSUPPORTED("amn29e9pu9d8t9ccunm7fn20f"); // gd = (long) (green[c] - g); UNSUPPORTED("1qvtyk7n5kdkzxz8gi0t6sl7m"); // bd = (long) (blue[c] - b); UNSUPPORTED("5awh60zjinxyaizmnt7bcnsgo"); // dist = rd * rd + gd * gd + bd * bd; UNSUPPORTED("72niuav6m4ahb9zc0o87j3rup"); // if (dist < mindist) { UNSUPPORTED("45pwtf48ibwznp83ycluh93rj"); // if (dist == 0) UNSUPPORTED("39io4oxurhajbqm5r7elzwd3g"); // return c; /* Return exact match color */ UNSUPPORTED("9ctfnrqq05xpz8c2upf35fhfw"); // mindist = dist; UNSUPPORTED("2b2qywvsce8xntf2r51qyo3lz"); // ct = c; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("92ga17xtfz92ju9egrpkatfx5"); // /* no exact match. We now know closest, but first try to allocate exact */ UNSUPPORTED("5ovv0tkjil1wqwcyc3cvzxgha"); // if (top++ == 256) UNSUPPORTED("1qskgh83m3zps1l8d7o3ylo8g"); // return ct; /* Return closest available color */ UNSUPPORTED("7lij9fxsovvuk0nh18y6qq0cr"); // red[c] = r; UNSUPPORTED("7uavxrqaipwwg1svkkt5e6gon"); // green[c] = g; UNSUPPORTED("eew689jpibm80nsjrhdscvx6g"); // blue[c] = b; UNSUPPORTED("4ocisp2giicxopfp4qg90x7u9"); // *new = 1; /* flag new color */ UNSUPPORTED("264d1dm29x04zyyqjdk3ddnl5"); // return c; /* Return newly allocated color */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ct81u9217meiyte0vlkysz69d // static void pic_line_style(obj_state_t *obj, int *line_style, double *style_val) public static Object pic_line_style(Object... arg) { UNSUPPORTED("7vmwghtuxdgpvfbhfzdv2z1xm"); // static void pic_line_style(obj_state_t *obj, int *line_style, double *style_val) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1a0u5t2wyxdqipaswmaz0wsvz"); // switch (obj->pen) { UNSUPPORTED("ersst7rw166izs2gaqp8nna81"); // case PEN_DASHED: UNSUPPORTED("2anynsrc9mionezyitu3h8ust"); // *line_style = 1; UNSUPPORTED("13xgbwsnirhzzkr4rhxlssp80"); // *style_val = 10.; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("5u2fwmkidl1tehl5ms86n9ior"); // case PEN_DOTTED: UNSUPPORTED("6w3l2bm01hn2c597o758rnjdd"); // *line_style = 2; UNSUPPORTED("13xgbwsnirhzzkr4rhxlssp80"); // *style_val = 10.; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("f0tv0x0m7ey5lru9fd0f8d6zq"); // case PEN_SOLID: UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("d8wx5390c9r0unl07858cm345"); // *line_style = 0; UNSUPPORTED("3eu0slevfiogpisxlbf0y2b5m"); // *style_val = 0.; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7y7rby3rupqrhq7ae1qveool3 // static void pic_comment(GVJ_t *job, char *str) public static Object pic_comment(Object... arg) { UNSUPPORTED("bfsgdr1g2hvv18xxk5d8ghv5v"); // static void pic_comment(GVJ_t *job, char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8h60idnupi1k47ro0clunyh5q"); // gvprintf(job, "%s %s\n", EscComment, str); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 38dpgquwrcip8qpihgqze85vh // static void pic_begin_graph(GVJ_t * job) public static Object pic_begin_graph(Object... arg) { UNSUPPORTED("4fvhhvcs3op3q4yyanzl48yik"); // static void pic_begin_graph(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("dcigebmf6s6f51j4m9qa6yymj"); // gvprintf(job, "%s Creator: %s version %s (%s)\n", UNSUPPORTED("5998iss16ljg5pzhhht19mmwr"); // EscComment, job->common->info[0], job->common->info[1], job->common->info[2]); UNSUPPORTED("equqpxkstjemlzo2j1dd344zl"); // gvprintf(job, "%s Title: %s\n", EscComment, agnameof(obj->u.g)); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("7ktvkleeg0xcthzjlfhuhmzhl"); // "%s save point size and font\n.nr .S \\n(.s\n.nr DF \\n(.f\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 cj0z02tehuufzejuqii6uk31t // static void pic_end_graph(GVJ_t * job) public static Object pic_end_graph(Object... arg) { UNSUPPORTED("8n0jembcnqf86g3lkgvtafy41"); // static void pic_end_graph(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("f2kfkuj6972o4mzg4g2s5v725"); // "%s restore point size and font\n.ps \\n(.S\n.ft \\n(DF\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4efot5904qdgxwian7og8s7yz // static void pic_begin_page(GVJ_t * job) public static Object pic_begin_page(Object... arg) { UNSUPPORTED("59k0cacsr6yc1k00zy49jcoha"); // static void pic_begin_page(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("76g96x1rehn6s0a72jz2no0bi"); // box pbr = job->pageBoundingBox; UNSUPPORTED("2b2vsocq8sefpglko8y2rk3za"); // double height, width; UNSUPPORTED("m5wp5531idyj44zub1521718"); // if (onetime && job->rotation && (job->rotation != 90)) { UNSUPPORTED("4bqo9fs7mwf1m4oohl243dc7g"); // unsupported("rotation"); UNSUPPORTED("6d9vivazko02yncki54y6wxr0"); // onetime = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("3qzghrup4vwvnoamerwu2xyju"); // height = (((double)(pbr.UR.y) -(double)(pbr.LL.y))/(double)72); UNSUPPORTED("7gvykkmmv8bjpav4giilxkevx"); // width = (((double)(pbr.UR.x) -(double)(pbr.LL.x))/(double)72); UNSUPPORTED("cipcm9rjowjd96dkcyfo6kj26"); // if (job->rotation == 90) { UNSUPPORTED("b0dr2avp0yfrvx3x6lo32hcc9"); // double temp = width; UNSUPPORTED("4ayhsbggju2dkkm9haen3dcuj"); // width = height; UNSUPPORTED("vjy6msvtpf98lv27ygdmc3an"); // height = temp; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("brwmt6ymnb9j9k57fp6dwx0z1"); // gvprintf(job, ".PS %.5f %.5f\n", width, height); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("4xv98dzt9da1iwfbed3qzbz51"); // "%s to change drawing size, multiply the width and height on the .PS line above and the number on the two lines below (rounded to the nearest integer) by a scale factor\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("cvyjdl3qzdzycj7001kaj2al3"); // if (width > 0.0) { UNSUPPORTED("8qqxw44yvv1gjotw76yaj9yiq"); // Fontscale = log10(width); UNSUPPORTED("3gge74lntaihg4dvjhwv7oqhw"); // Fontscale += 3.0 - (int) Fontscale; /* between 3.0 and 4.0 */ UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("hjzl5l4sn9hwtlrmk9lvsx80"); // Fontscale = 3.0; UNSUPPORTED("1otido4r7tr5suta2iikwypjq"); // Fontscale = pow(10.0, Fontscale); /* a power of 10 times width, between 1000 and 10000 */ UNSUPPORTED("dpnhw47fss92k4dkrtrjk13ar"); // gvprintf(job, ".nr SF %.0f\nscalethickness = %.0f\n", Fontscale, UNSUPPORTED("2eilbgmfjnjynn65kgq9ridff"); // Fontscale); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("dfbnxc3d0zif5ki61u2qhpi0u"); // "%s don't change anything below this line in this drawing\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("4q8frt9vf2a38v6cjjeow3hhv"); // "%s non-fatal run-time pic version determination, version 2\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("dc09zp41jpx1ar2yhyc3alm6p"); // "boxrad=2.0 %s will be reset to 0.0 by gpic only\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("87vg3zmzozd5n9v73rd4rorjp"); // gvprintf(job, "scale=1.0 %s required for comparisons\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("fb2hg6vh04qtr5rds817ytzw"); // "%s boxrad is now 0.0 in gpic, else it remains 2.0\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("907w2hhexounybm744hrqew70"); // "%s dashwid is 0.1 in 10th Edition, 0.05 in DWB 2 and in gpic\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("b9scmygr8ue1db38lhe0ugf74"); // "%s fillval is 0.3 in 10th Edition (fill 0 means black), 0.5 in gpic (fill 0 means white), undefined in DWB 2\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("3q4puqndbhga2mrwvj5w2j7ss"); // "%s fill has no meaning in DWB 2, gpic can use fill or filled, 10th Edition uses fill only\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("a3x53q93b4sksa7vee61vtsls"); // "%s DWB 2 doesn't use fill and doesn't define fillval\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("cglsqpq97ek5itbkjjzdm0w8k"); // "%s reset works in gpic and 10th edition, but isn't defined in DWB 2\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("6vzczz8vf0wqmrionyd7tqda8"); // gvprintf(job, "%s DWB 2 compatibility definitions\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("ce0em94lu4t3pt85r2za9mvf2"); // "if boxrad > 1.0 && dashwid < 0.075 then X\n\tfillval = 1;\n\tdefine fill Y Y;\n\tdefine solid Y Y;\n\tdefine reset Y scale=1.0 Y;\nX\n"); UNSUPPORTED("dq09jmz8i5yv8jt3stebgbyqd"); // gvprintf(job, "reset %s set to known state\n", EscComment); UNSUPPORTED("dph08fr8e18senfvv4uvyofo6"); // gvprintf(job, "%s GNU pic vs. 10th Edition d\\(e'tente\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("dqdtm7xiklcacg5om9np226lc"); // "if fillval > 0.4 then X\n\tdefine setfillval Y fillval = 1 - Y;\n\tdefine bold Y thickness 2 Y;\n"); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("18lex7q6g1l8eu6dnpt343s2e"); // "\t%s if you use gpic and it barfs on encountering \"solid\",\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("5ik7ebm2ec8itf29vezxtz2dd"); // "\t%s\tinstall a more recent version of gpic or switch to DWB or 10th Edition pic;\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("3y2bp6wbvp7p7lfnqdb8643gt"); // "\t%s\tsorry, the groff folks changed gpic; send any complaint to them;\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("bjxixh8i6komlukzxuq6bzuxm"); // "X else Z\n\tdefine setfillval Y fillval = Y;\n\tdefine bold Y Y;\n\tdefine filled Y fill Y;\nZ\n"); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("1etnf378bbiv7frkkx646nc6x"); // "%s arrowhead has no meaning in DWB 2, arrowhead = 7 makes filled arrowheads in gpic and in 10th Edition\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("dypqrdzmizcvbpx12mt4t7n5t"); // "%s arrowhead is undefined in DWB 2, initially 1 in gpic, 2 in 10th Edition\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("2laq9xrgobmth8qhrini8rhsi"); // gvprintf(job, "arrowhead = 7 %s not used by graphviz\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("avkzkz4i40ucrl9ssi3p6pyo5"); // "%s GNU pic supports a boxrad variable to draw boxes with rounded corners; DWB and 10th Ed. do not\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("2oi2oo2n1kmide3fp6c7nidfb"); // gvprintf(job, "boxrad = 0 %s no rounded corners in graphviz\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("aa64gd28t5mwmg704oordujc5"); // "%s GNU pic supports a linethick variable to set line thickness; DWB and 10th Ed. do not\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("53sr2p9jkfa612b87p2yb66sq"); // gvprintf(job, "linethick = 0; oldlinethick = linethick\n"); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("db9i2enfon83i8aia8hn3nz90"); // "%s .PS w/o args causes GNU pic to scale drawing to fit 8.5x11 paper; DWB does not\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("3a8pqeqq1melrwpx86klp29z7"); // "%s maxpsht and maxpswid have no meaning in DWB 2.0, set page boundaries in gpic and in 10th Edition\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("3z8mzj59f8c2eyp4tue6ey7yc"); // "%s maxpsht and maxpswid are predefined to 11.0 and 8.5 in gpic\n", UNSUPPORTED("4eth1b45y2w7jpem9jkc8sblp"); // EscComment); UNSUPPORTED("e3g7qqt4wwzno1yygiv98l5o9"); // gvprintf(job, "maxpsht = %f\nmaxpswid = %f\n", height, width); UNSUPPORTED("5ju4jha3xnti1j2ieoce0qmdf"); // gvprintf(job, "Dot: [\n"); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("eynntob2c9h5peks987ekrzym"); // "define attrs0 %% %%; define unfilled %% %%; define rounded %% %%; define diagonals %% %%\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6nt6zbbo643w8j7t009y2v5bm // static void pic_end_page(GVJ_t * job) public static Object pic_end_page(Object... arg) { UNSUPPORTED("c239lltddwrudapv2a7xxlxga"); // static void pic_end_page(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("2teal9uw4ezwoi03qufhfiwlq"); // "]\n.PE\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d9e0jepdo8c58ajdoxng9e1h5 // static void pic_textspan(GVJ_t * job, pointf p, textspan_t * span) public static Object pic_textspan(Object... arg) { UNSUPPORTED("cauh218qle2ae9yjf61ud9p2r"); // static void pic_textspan(GVJ_t * job, pointf p, textspan_t * span) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2z4ulhebckee70a2cyx0dq01k"); // static char *lastname; UNSUPPORTED("begkqws1spfd955d0kagsh1jc"); // static int lastsize; UNSUPPORTED("bpt627vzs0r1tzo7jgpyjdssp"); // int sz; UNSUPPORTED("bpqxh9mig0sh1gasrlkg6hbph"); // switch (span->just) { UNSUPPORTED("b1mhc3reptgjo2p3hwaxyqgfu"); // case 'l': UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("estx9pvff1tn1neki26jky2py"); // case 'r': UNSUPPORTED("lzwxwwf5wl644m2hvx2zioue"); // p.x -= span->size.x; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("bb1f2erxhc1jxdi9awn26znil"); // case 'n': UNSUPPORTED("6tzmt862u12ecdvt2d00dk679"); // p.x -= span->size.x / 2; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("4wr1p5fnqbdu0f5yq4dxvlir6"); // /* Why on earth would we do this. But it works. SCN 2/26/2002 */ UNSUPPORTED("d421di00t94nr476ghy7h70n3"); // p.y += span->font->size / (3.0 * 72); UNSUPPORTED("ee4w493wyhc900xnxk58kqlin"); // p.x += span->size.x / (2.0 * 72); UNSUPPORTED("cmznyqe6zlkta59u4wlkwm0b6"); // if (span->font->name && (!(lastname) || strcmp(lastname, span->font->name))) { UNSUPPORTED("4mtb7uml2hzvmd5f3v4vak5ta"); // gvprintf(job, ".ft %s\n", picfontname(span->font->name)); UNSUPPORTED("7hlu4ruvtzkys6hdg160ghzq4"); // lastname = span->font->name; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1cwn7rsimk721vf93302dq6l3"); // if ((sz = (int)span->font->size) < 1); UNSUPPORTED("8nr9q999sn2bf0neqzuypuipz"); // sz = 1; UNSUPPORTED("3nh3xkjixssc69c7r9h07udba"); // if (sz != lastsize) { UNSUPPORTED("7ve9efsns80c8bp56ezays3c5"); // gvprintf(job, ".ps %d*\\n(SFu/%.0fu\n", sz, Fontscale); UNSUPPORTED("ar7ezodtm533ndxpfoz661cp9"); // lastsize = sz; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("cpdm8yivurrmx8ub86bpgs4vn"); // gvprintf(job, "\"%s\" at (%.5f,%.5f);\n", UNSUPPORTED("5zts6obdghaq7mbeyq13bucln"); // pic_string(span->str), p.x, p.y); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3rlk5pvbfad7rr584hs87fbaa // static void pic_ellipse(GVJ_t * job, pointf * A, int filled) public static Object pic_ellipse(Object... arg) { UNSUPPORTED("1v59z1y3qs6icmg9adsga165a"); // static void pic_ellipse(GVJ_t * job, pointf * A, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8tuvacxowvjyekfxkm6dgvp8f"); // /* A[] contains 2 points: the center and corner. */ UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("dwfvg3ih86afd5uzqvndt9ur4"); // "ellipse attrs%d %swid %.5f ht %.5f at (%.5f,%.5f);\n", 1, UNSUPPORTED("457e4jaeiuoxhg7v340gy9rw4"); // filled ? "fill " : "", UNSUPPORTED("cfsz2r42gzz2n7gz9o93odh4i"); // ((2*(A[1].x - A[0].x))/(double)72), UNSUPPORTED("9mgg3lvutbvo26fsphghc4c"); // ((2*(A[1].y - A[0].y))/(double)72), UNSUPPORTED("4hj3y2hq0474p3ghy1l4x0lxf"); // ((A[0].x)/(double)72), UNSUPPORTED("6ccewir86nmmtromy3mivt1ao"); // ((A[0].y)/(double)72)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1sw3gedor8k03dnq5rspgqe0b // static void pic_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, public static Object pic_bezier(Object... arg) { UNSUPPORTED("2mb1csja400u5qyc223ocy3me"); // static void pic_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, UNSUPPORTED("aucu2oah5hsehslkm52zjqn3q"); // // start_y, end_x, end_y); UNSUPPORTED("77j21vz8ekimnj6b6uefavtz2"); // int arrow_at_end, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("3slisz3umk8yx744ufnbbf50r"); // int object_code = 3; /* always 3 for spline */ UNSUPPORTED("dg2m9953dx1s3kh2xh49cl6j9"); // int sub_type; UNSUPPORTED("7yz13t0sqtqvzxyddzcozxe33"); // int line_style; /* solid, dotted, dashed */ UNSUPPORTED("9pyxwz1r98uut10u02vkx6v1q"); // int thickness = obj->penwidth; UNSUPPORTED("spi81120or5799hcfjb8itk6"); // int pen_color = obj->pencolor.u.index; UNSUPPORTED("85qo3gmfwzm58xlqrukeg2vyr"); // int fill_color = obj->fillcolor.u.index; UNSUPPORTED("4mqqliisakngnea1fbgw3n16w"); // int pen_style = 0; /* not used */ UNSUPPORTED("cv6hsumgyv706zrsc1mb79vjt"); // int area_fill; UNSUPPORTED("erg3jyrsg6mbllclii9gqtczn"); // double style_val; UNSUPPORTED("at27yenlhsw2mhidnzh560qs7"); // int cap_style = 0; UNSUPPORTED("6aehzky7l6ssu826xre37yhtt"); // int forward_arrow = 0; UNSUPPORTED("cvrcowx9gwh8vdfgelcwxhrhq"); // int backward_arrow = 0; UNSUPPORTED("cnai2dhmnp0nlkurdvfgcftzp"); // int npoints = n; UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("2ripxrfk1hjvzu0cnqlmtvz7q"); // pointf pf, V[4]; UNSUPPORTED("41nrdsugvfgw23s93g0dhizkn"); // point p; UNSUPPORTED("54a5cffl70pabwgya54wkrjdt"); // int j, step; UNSUPPORTED("551funk1bxiemly3silcqtngw"); // int count = 0; UNSUPPORTED("cav0e7ncloqss0hsvc4fyfi7s"); // int size; UNSUPPORTED("6wvmmuf1e3qp2qoi1k1njw0a0"); // char *buffer; UNSUPPORTED("6ik3p99apk5rihypipg0uxu8i"); // char *buf; UNSUPPORTED("2oge79a1lz0azw1572k9culsm"); // buffer = UNSUPPORTED("7ls09ukxgkos4a02570trbo11"); // malloc((npoints + 1) * (6 + UNSUPPORTED("82a2b3l9tnp4wb4zntqluobrf"); // 1) * 20 * sizeof(char)); UNSUPPORTED("3fe0hbpwq6bj9ioyuwkjdzyzz"); // buf = buffer; UNSUPPORTED("e77xa6hsjckwgdadat7v55pl6"); // pic_line_style(obj, &line_style, &style_val); UNSUPPORTED("9yhmhvzz81x2bovke5qc93036"); // if (filled) { UNSUPPORTED("bj3webccz9d6zwkfor1wbs62"); // sub_type = 5; /* closed X-spline */ UNSUPPORTED("7zcxl4upa7xx6c4i5y2x03nm8"); // area_fill = 20; /* fully saturated color */ UNSUPPORTED("72p315i58kf1cm2zd3q0u8cn9"); // fill_color = job->obj->fillcolor.u.index; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("b42prafms4wcjet9oaqz2r9an"); // sub_type = 4; /* opened X-spline */ UNSUPPORTED("e8seyevdqkm3o522h0kw3ofoo"); // area_fill = -1; UNSUPPORTED("cnfp5y1qtuaq6rg9e86neg62e"); // fill_color = 0; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a5n7zezdexpwwfy12hsc5q41m"); // V[3].x = A[0].x; UNSUPPORTED("3wrmg8m53mwjg50y22lcyblmg"); // V[3].y = A[0].y; UNSUPPORTED("d4fw6y4mj6hshwm4fwoegfv1"); // /* Write first point in line */ UNSUPPORTED("7ap9l0s2x29me32trtt38kph0"); // count++; UNSUPPORTED("8hem85phuz76zejto4bkwovw1"); // PF2P(A[0], p); UNSUPPORTED("73o6ys1pid2ocs41fxtzlcv8n"); // size = sprintf(buf, " %d %d", p.x, p.y); UNSUPPORTED("1j1vfgxpkci66jmmmccgza2lm"); // buf += size; UNSUPPORTED("a3w2dgd3a2dpgvb5n1a63c9ar"); // /* write subsequent points */ UNSUPPORTED("3s0blwgctqa0ygs872bnu4kye"); // for (i = 0; i + 3 < n; i += 3) { UNSUPPORTED("4a58elv5pvvi5twh4hrzzzj3d"); // V[0] = V[3]; UNSUPPORTED("cr2c5h66bahjj7gd63bz4bhl7"); // for (j = 1; j <= 3; j++) { UNSUPPORTED("d5p6lhssn8pxlfrjhmbm89neq"); // V[j].x = A[i + j].x; UNSUPPORTED("aasvql7kiskb32j9te9gp5xif"); // V[j].y = A[i + j].y; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("afevm918v5rewrdihltcjtka7"); // for (step = 1; step <= 6; step++) { UNSUPPORTED("cc15ym2418ncxwrvmrbf7d5fb"); // count++; UNSUPPORTED("1maly6enkyv5xs410cfeocfo8"); // pf = Bezier (V, 3, (double) step / 6, NULL, NULL); UNSUPPORTED("9hehuild0uke3e57cn1cu37d4"); // PF2P(pf, p); UNSUPPORTED("dlhqn2sqdjrfl9iuem0x42sg7"); // size = sprintf(buf, " %d %d", p.x, p.y); UNSUPPORTED("dc1iwkgf67a40ouxumqgp087o"); // buf += size; UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("adja5audqilxvakjhc4ffv918"); // // gvprintf(job, "%d %d %d %d %d %d %d %d %d %.1f %d %d %d %d\n", UNSUPPORTED("6biruvlzylxqarkvvvk8f1kj1"); // // object_code, UNSUPPORTED("1gvy5x6e4tb8y1t58ea5a9gbr"); // // sub_type, UNSUPPORTED("3j51v7djf78may8pc7fqmbfu9"); // // line_style, UNSUPPORTED("6qk3rwg8n74pfvc3t1l02mcbk"); // // thickness, UNSUPPORTED("e4i6ly0erhqrn6l0sdh52e09w"); // // pen_color, UNSUPPORTED("e6lb1qzdgn5b1xs9adtu5z1a2"); // // fill_color, UNSUPPORTED("du7j3ee3lzjzintra1dpg14fx"); // // depth, UNSUPPORTED("3k0iccc4zc3dcn6wva0b62aue"); // // pen_style, UNSUPPORTED("3i8kq2rp9dnqrluiipxuw59tv"); // // area_fill, UNSUPPORTED("4yigk5lhyfyre5v90resjpok8"); // // style_val, cap_style, forward_arrow, backward_arrow, count); UNSUPPORTED("cqyleb6lm2k4okgz6yyfsnyvs"); // gvprintf(job, " %s\n", buffer); /* print points */ UNSUPPORTED("2puk68crvxxdnxykmgd8hccpb"); // free(buffer); UNSUPPORTED("880df02j7ml0ml3y149lcn5r0"); // for (i = 0; i < count; i++) { UNSUPPORTED("aqnpclkffnis7si1mcldfnqzb"); // gvprintf(job, " %d", i % (count - 1) ? 1 : 0); /* -1 on all */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b7eafy5bhxn361xe2c8x8553b"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6vpufqet2cxqbjkd7b1oz5nqd // static void pic_polygon(GVJ_t * job, pointf * A, int n, int filled) public static Object pic_polygon(Object... arg) { UNSUPPORTED("72rnzkq710hqh92i1k0acfd37"); // static void pic_polygon(GVJ_t * job, pointf * A, int n, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("1250jrnrnv2ts7w11no09s3c0"); // int object_code = 2; /* always 2 for polyline */ UNSUPPORTED("1u7xi4usjz62x26cm8thbbuzf"); // int sub_type = 3; /* always 3 for polygon */ UNSUPPORTED("7yz13t0sqtqvzxyddzcozxe33"); // int line_style; /* solid, dotted, dashed */ UNSUPPORTED("9pyxwz1r98uut10u02vkx6v1q"); // int thickness = obj->penwidth; UNSUPPORTED("spi81120or5799hcfjb8itk6"); // int pen_color = obj->pencolor.u.index; UNSUPPORTED("85qo3gmfwzm58xlqrukeg2vyr"); // int fill_color = obj->fillcolor.u.index; UNSUPPORTED("4mqqliisakngnea1fbgw3n16w"); // int pen_style = 0; /* not used */ UNSUPPORTED("1rb7krh80rapa6zt9gze6d8y"); // int area_fill = filled ? 20 : -1; UNSUPPORTED("erg3jyrsg6mbllclii9gqtczn"); // double style_val; UNSUPPORTED("emk8vv370o9kkt54b48xbckqk"); // int join_style = 0; UNSUPPORTED("at27yenlhsw2mhidnzh560qs7"); // int cap_style = 0; UNSUPPORTED("5ah3zh0iiveyst5794k0axkys"); // int radius = 0; UNSUPPORTED("6aehzky7l6ssu826xre37yhtt"); // int forward_arrow = 0; UNSUPPORTED("cvrcowx9gwh8vdfgelcwxhrhq"); // int backward_arrow = 0; UNSUPPORTED("b2q7ayijmq412v8tkb0p5a4xq"); // int npoints = n + 1; UNSUPPORTED("e77xa6hsjckwgdadat7v55pl6"); // pic_line_style(obj, &line_style, &style_val); UNSUPPORTED("5y46af2tm0pigzfxvxrfcb4lk"); // // gvprintf(job, UNSUPPORTED("5jxusmce4v4hqmp46sfkrhqiu"); // // "%d %d %d %d %d %d %d %d %d %.1f %d %d %d %d %d %d\n", UNSUPPORTED("9gl7rgac8iy5bwp4aik7fhxhm"); // // object_code, sub_type, line_style, thickness, pen_color, UNSUPPORTED("f00qd9ts19m4zytpw9ul3nw86"); // // fill_color, depth, pen_style, area_fill, style_val, join_style, UNSUPPORTED("6zilgzihyxax6qcclohoma171"); // // cap_style, radius, forward_arrow, backward_arrow, npoints); UNSUPPORTED("bb2br2kig62zs308gqpx7dl6j"); // picptarray(job, A, n, 1); /* closed shape */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7rlxbmvn1s9o400xa6a47b3u0 // static void pic_polyline(GVJ_t * job, pointf * A, int n) public static Object pic_polyline(Object... arg) { UNSUPPORTED("2ifmtbi7jzs4ziyl98lik2sln"); // static void pic_polyline(GVJ_t * job, pointf * A, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("1250jrnrnv2ts7w11no09s3c0"); // int object_code = 2; /* always 2 for polyline */ UNSUPPORTED("2xiuwyphr1m2pc2o9smsohpy7"); // int sub_type = 1; /* always 1 for polyline */ UNSUPPORTED("7yz13t0sqtqvzxyddzcozxe33"); // int line_style; /* solid, dotted, dashed */ UNSUPPORTED("9pyxwz1r98uut10u02vkx6v1q"); // int thickness = obj->penwidth; UNSUPPORTED("spi81120or5799hcfjb8itk6"); // int pen_color = obj->pencolor.u.index; UNSUPPORTED("afxyknafudgf6s6v5jw9qx8p9"); // int fill_color = 0; UNSUPPORTED("4mqqliisakngnea1fbgw3n16w"); // int pen_style = 0; /* not used */ UNSUPPORTED("1pvrunrk1ylb19scd5xzhf3lp"); // int area_fill = 0; UNSUPPORTED("erg3jyrsg6mbllclii9gqtczn"); // double style_val; UNSUPPORTED("emk8vv370o9kkt54b48xbckqk"); // int join_style = 0; UNSUPPORTED("at27yenlhsw2mhidnzh560qs7"); // int cap_style = 0; UNSUPPORTED("5ah3zh0iiveyst5794k0axkys"); // int radius = 0; UNSUPPORTED("6aehzky7l6ssu826xre37yhtt"); // int forward_arrow = 0; UNSUPPORTED("cvrcowx9gwh8vdfgelcwxhrhq"); // int backward_arrow = 0; UNSUPPORTED("cnai2dhmnp0nlkurdvfgcftzp"); // int npoints = n; UNSUPPORTED("e77xa6hsjckwgdadat7v55pl6"); // pic_line_style(obj, &line_style, &style_val); UNSUPPORTED("5y46af2tm0pigzfxvxrfcb4lk"); // // gvprintf(job, UNSUPPORTED("5jxusmce4v4hqmp46sfkrhqiu"); // // "%d %d %d %d %d %d %d %d %d %.1f %d %d %d %d %d %d\n", UNSUPPORTED("9gl7rgac8iy5bwp4aik7fhxhm"); // // object_code, sub_type, line_style, thickness, pen_color, UNSUPPORTED("f00qd9ts19m4zytpw9ul3nw86"); // // fill_color, depth, pen_style, area_fill, style_val, join_style, UNSUPPORTED("6zilgzihyxax6qcclohoma171"); // // cap_style, radius, forward_arrow, backward_arrow, npoints); UNSUPPORTED("aclk0i1g5h2w55leog4sbehnt"); // picptarray(job, A, n, 0); /* open shape */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 1qbgpljw1sasfxrm2urmq04xv // gvrender_engine_t pic_engine = //1 562akbmoglmbe4vhlm4vhgl7d // static gvrender_features_t render_features_pic = //1 brpaeygrxu0b0eyu2x62og81 // static gvdevice_features_t device_features_pic = //1 buvtiax25ah766ey9qhdtidlo // gvplugin_installed_t gvrender_pic_types[] = //1 3t0wgwjmiuh24ntyxb1zv6u5n // gvplugin_installed_t gvdevice_pic_types[] = } plantuml-1.2017.15/src/gen/plugin/core/gvrender_core_pov__c.java000066400000000000000000001024271312650303100244660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.plugin.core; import static smetana.core.Macro.UNSUPPORTED; public class gvrender_core_pov__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 axr8iiqze4sowxdzhp5h67ccy // static char *pov_knowncolors[] = //1 1xn6uqvhqpp8aql9dt6qqh2z2 // static float layerz = 0 //1 bz4ial18k2hf5bfpuvztnf8tr // static float z = 0 //3 9vn87676zx3r2mmmw7rp52uyy // char *el(GVJ_t* job, char *template, ...) public static Object el(Object... arg) { UNSUPPORTED("dr1ui1v7k7dfzi58sjrxnr8hq"); // char *el(GVJ_t* job, char *template, ...) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3bclex5rigeol6kpwga9nrp4o"); // /* Dummy function that will never be used */ UNSUPPORTED("c65npejb203kqftvj9of8tg28"); // return strdup(""); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9pw2lre7mxb30qh6ob8oaebc2 // static char *pov_color_as_str(GVJ_t * job, gvcolor_t color, float transparency) public static Object pov_color_as_str(Object... arg) { UNSUPPORTED("bl2yw1wd29bda0ivzrrgu9edn"); // static char *pov_color_as_str(GVJ_t * job, gvcolor_t color, float transparency) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ef8yz870ibkbk17ridydfygym"); // char *pov, *c; UNSUPPORTED("5fmow7rd08qdpjro9ggko2axg"); // switch (color.type) { UNSUPPORTED("3963t7kz3wj9jmr4b42bh0ikz"); // case COLOR_STRING: UNSUPPORTED("4bi7a75t9gvcwhnm13jo31q8g"); // if (!strcmp(color.u.string, "red")) UNSUPPORTED("eu9kml5h4p55xr8jdh2cccm3c"); // c = el(job, "%s transmit %.3f", "Red", transparency); UNSUPPORTED("677fpercxitfukr8v78x2w5cb"); // else if (!strcmp(color.u.string, "green")) UNSUPPORTED("1qiiwyqveadi00g1dvya9gofj"); // c = el(job, "%s transmit %.3f", "Green", transparency); UNSUPPORTED("144n6nl0tohqej0icjdjh72sp"); // else if (!strcmp(color.u.string, "blue")) UNSUPPORTED("6ysoqjit3c4036kfg992gdju"); // c = el(job, "%s transmit %.3f", "Blue", transparency); UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else UNSUPPORTED("5xvdf2fd67dqx75mdmvchi5ct"); // c = el(job, "%s transmit %.3f", color.u.string, transparency); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("4qyq5lb20pb6flw57yam37kot"); // case RGBA_BYTE: UNSUPPORTED("5wxuremuazucr0f5jubhi97ms"); // c = el(job, "rgb""<%9.3f, %9.3f, %9.3f>"" transmit %.3f", UNSUPPORTED("12zckwop92tdxv6dlv1vp0fbs"); // color.u.rgba[0] / 256.0, color.u.rgba[1] / 256.0, UNSUPPORTED("3aw03ntnbxbvdxah2aeh3p24b"); // color.u.rgba[2] / 256.0, transparency); UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("18zn34qcs4vsdhhh831gn9vc9"); // fprintf(stderr, UNSUPPORTED("4i3x2ar1txrydae0r4ejyuz6a"); // "oops, internal error: unhandled color type=%d %s\n", UNSUPPORTED("11r7e8g9h9a5htgibzuoxopjl"); // color.type, color.u.string); UNSUPPORTED("cgq902zwbdbdny3ekubc7rtwg"); // assert(0); //oops, wrong type set in gvrender_features_t? UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1umcnsvyiiij01szhjjwci3fw"); // pov = el(job, "pigment { color %s }\n", c); UNSUPPORTED("5rfulyznntlt1olqapu82esby"); // free(c); UNSUPPORTED("ec6nf0cxneh8g9w1p13kiy0dj"); // return pov; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 blyo0peeuj2vdpa4s7h40t882 // static void pov_comment(GVJ_t * job, char *str) public static Object pov_comment(Object... arg) { UNSUPPORTED("5ny39zebhyjkf7c8wtacqvks9"); // static void pov_comment(GVJ_t * job, char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ep887hrpmp4h57zbiq58d1fdl"); // gvprintf(job, "//*** comment: %s\n", str); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 19jx65sbu7mzdlbpobkqmkcm5 // static void pov_begin_job(GVJ_t * job) public static Object pov_begin_job(Object... arg) { UNSUPPORTED("e7ucc8led9jhpy4503iyu1mx3"); // static void pov_begin_job(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ezi9hebxdhn31a8g77mjddcho"); // gvputs(job, "#version 3.6;\n"); UNSUPPORTED("717tvalowegvfefto6nsu0ssr"); // gvputs(job, "global_settings { assumed_gamma 1.0 }\n"); UNSUPPORTED("ambfxfnqqcqjwa371wi2xxa7j"); // gvputs(job, "#default { finish { ambient 0.1 diffuse 0.9 } }\n"); UNSUPPORTED("2fr5g4jf2x5dkqy2rzur089sd"); // gvputs(job, "#include \"colors.inc\"\n" "#include \"textures.inc\"\n" "#include \"shapes.inc\"\n"); UNSUPPORTED("3p0r7bbc28ao5qtxrbbv16p1v"); // gvprintf(job, "#declare %s = %s;\n", "black", "Black"); UNSUPPORTED("bv59pn9i50oaiu2joqodi7v3m"); // gvprintf(job, "#declare %s = %s;\n", "white", "White"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2uod4qhdoe2sxk49g7jnnxej1 // static void pov_begin_graph(GVJ_t * job) public static Object pov_begin_graph(Object... arg) { UNSUPPORTED("7r54iz4ovg2j1636jr02tb0fq"); // static void pov_begin_graph(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("67e4xbpzccjioks12bk0w12s7"); // float x, y, d, px, py; UNSUPPORTED("2np0pxewx2qr0hc4wvdsukjdi"); // gvprintf(job, "//*** begin_graph %s\n", agnameof(job->obj->u.g)); UNSUPPORTED("4p6634f0ays00wyvz0jqew496"); // //setup scene UNSUPPORTED("c6yotkg0ed9f75gui9axv2rob"); // x = job->view.x / 2.0 * job->scale.x; UNSUPPORTED("2jqapjhabefytb0cnl8zra3c1"); // y = job->view.y / 2.0 * job->scale.y; UNSUPPORTED("eepp86bbm9j6kz7yrj6bxm7rd"); // d = -500; UNSUPPORTED("8cvhzu1hyz5hi8nkkdodtwn49"); // px = atanf(x / abs(d)) * 180 / M_PI * 2; UNSUPPORTED("6rvfie6mwp4jpauy66s5ef9po"); // py = atanf(y / abs(d)) * 180 / M_PI * 2; UNSUPPORTED("a5t124x5xel6027dgfcxkc1k0"); // gvprintf(job, "camera { location <%.3f , %.3f , %.3f>\n" " look_at <%.3f , %.3f , %.3f>\n" " right x * image_width / image_height\n" " angle %.3f\n" "}\n", x, y, d, x, y, 0.0, UNSUPPORTED("f0y37qj1uxr9qkprkzpddptic"); // (px > py ? px : py) * 1.2); UNSUPPORTED("4ejvtub36nhniqc8kx0q9ugcc"); // gvputs(job, "//sky\n" "plane { <0, 1, 0>, 1 hollow\n" " texture {\n" " pigment { bozo turbulence 0.95\n" " color_map {\n" " [0.00 rgb <0.05, 0.20, 0.50>]\n" " [0.50 rgb <0.05, 0.20, 0.50>]\n" " [0.75 rgb <1.00, 1.00, 1.00>]\n" " [0.75 rgb <0.25, 0.25, 0.25>]\n" " [1.00 rgb <0.50, 0.50, 0.50>]\n" " }\n" " scale <1.00, 1.00, 1.50> * 2.50\n" " translate <0.00, 0.00, 0.00>\n" " }\n" " finish { ambient 1 diffuse 0 }\n" " }\n" " scale 10000\n" "}\n" "//mist\n" "fog { fog_type 2\n" " distance 50\n" " color rgb <1.00, 1.00, 1.00> * 0.75\n" " fog_offset 0.10\n" " fog_alt 1.50\n" " turbulence 1.75\n" "}\n" "//gnd\n" "plane { <0.00, 1.00, 0.00>, 0\n" " texture {\n" " pigment{ color rgb <0.25, 0.45, 0.00> }\n" " normal { bumps 0.75 scale 0.01 }\n" " finish { phong 0.10 }\n" " }\n" "}\n"); UNSUPPORTED("2wxid02webko3zekheejcp2ak"); // gvputs(job, "light_source { <1500,3000,-2500> color White }\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4i3fvchaaqy0lecs9urmfd8c9 // static void pov_end_graph(GVJ_t * job) public static Object pov_end_graph(Object... arg) { UNSUPPORTED("a62y9av6or8p2emv2p63mc48t"); // static void pov_end_graph(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1hga3nvp22vfl40enmsok6fol"); // gvputs(job, "//*** end_graph\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 e5tq67bjtp1mxou7ivnyjj96c // static void pov_begin_layer(GVJ_t * job, char *layername, int layerNum, int numLayers) public static Object pov_begin_layer(Object... arg) { UNSUPPORTED("21l3qlfmtt9jj25ltili90086"); // static void pov_begin_layer(GVJ_t * job, char *layername, int layerNum, int numLayers) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6vxpb1gk8xxy3aeje3hukjj8f"); // gvprintf(job, "//*** begin_layer: %s, %d/%d\n", layername, layerNum, UNSUPPORTED("3p7uxhm5ftq2vewm5vqpgyl52"); // numLayers); UNSUPPORTED("7afht14wina8ef7t2obgzr53z"); // layerz = layerNum * -10; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6ot7jtlpa5ns5g8mrljucw73p // static void pov_end_layer(GVJ_t * job) public static Object pov_end_layer(Object... arg) { UNSUPPORTED("msmg6mchcw6wk1hwzv4vfh9"); // static void pov_end_layer(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6wmd7mpzynz9r6txzhga6hseq"); // gvputs(job, "//*** end_layer\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4z4wr7z5q5tb2nw3y70re05w2 // static void pov_begin_page(GVJ_t * job) public static Object pov_begin_page(Object... arg) { UNSUPPORTED("du0jdd44z91nfwdqe62phoc7c"); // static void pov_begin_page(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("jj3s1e88b3c3eeucmt9a2dl1"); // gvputs(job, "//*** begin_page\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6ort6jt20rg9fnad6wyg7pwor // static void pov_end_page(GVJ_t * job) public static Object pov_end_page(Object... arg) { UNSUPPORTED("3rhzejrofrliwvfg22jrq09tg"); // static void pov_end_page(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cpbqx0fkzv5v1omdltbdfb03"); // gvputs(job, "//*** end_page\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6knkobsw1frd76zp1qw7z53rj // static void pov_begin_cluster(GVJ_t * job) public static Object pov_begin_cluster(Object... arg) { UNSUPPORTED("2juyfkoz2kja04ue6gwra6vd8"); // static void pov_begin_cluster(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8g6u83xzr1yp6es8v82x6t712"); // gvputs(job, "//*** begin_cluster\n"); UNSUPPORTED("6xzjyk7shpggapmx9msnltpor"); // layerz -= 2; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1so9pfvjq4zz182ufinyv9fv2 // static void pov_end_cluster(GVJ_t * job) public static Object pov_end_cluster(Object... arg) { UNSUPPORTED("3vp8n8w4vn3uthzjzd0x0k41x"); // static void pov_end_cluster(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5n89byozotfig7g8ibo1gao3p"); // gvputs(job, "//*** end_cluster\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2p7ma5wim7eq25qp8gx7cocuq // static void pov_begin_node(GVJ_t * job) public static Object pov_begin_node(Object... arg) { UNSUPPORTED("es06i47dskbixwwotieeyv5mr"); // static void pov_begin_node(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ez8i1j34mzm9in29mtx4b3v0"); // gvprintf(job, "//*** begin_node: %s\n", agnameof(job->obj->u.n)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4asyy6qwnihawoxqyey2uw0d5 // static void pov_end_node(GVJ_t * job) public static Object pov_end_node(Object... arg) { UNSUPPORTED("6o3vlh6gnxvtq9jdzf2it0x1b"); // static void pov_end_node(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("cbfh6mmc1rbt7m9l9s9ypvdj7"); // gvputs(job, "//*** end_node\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3nnmi75q7dx9uhggg3eqsssez // static void pov_begin_edge(GVJ_t * job) public static Object pov_begin_edge(Object... arg) { UNSUPPORTED("2z40r4qoltjdiqjwr1htt5bp4"); // static void pov_begin_edge(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("c6ba404gdc9z8520xq82tknvw"); // gvputs(job, "//*** begin_edge\n"); UNSUPPORTED("b1i8thw6fnr132r6o719oly3i"); // layerz -= 5; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 67ua9o3fipl6vujo4osgu6pew // static void pov_end_edge(GVJ_t * job) public static Object pov_end_edge(Object... arg) { UNSUPPORTED("6e3hav877emt1quzaldcem28y"); // static void pov_end_edge(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5n48qab4bxl9dxf8rgqw44ix2"); // gvputs(job, "//*** end_edge\n"); UNSUPPORTED("dhvja5wqkslqorvosluq18fwn"); // layerz += 5; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dzgi67xn3f7g3qpvtluivy9b4 // static void pov_textspan(GVJ_t * job, pointf c, textspan_t * span) public static Object pov_textspan(Object... arg) { UNSUPPORTED("da91j5br6qhlfr421zkx076tx"); // static void pov_textspan(GVJ_t * job, pointf c, textspan_t * span) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bhqtz42wh5ojvof66mrtbotz5"); // double x, y; UNSUPPORTED("3cohebhm3opbm2vh6b4wzdlkl"); // char *pov, *s, *r, *t, *p; UNSUPPORTED("caph5wpsys7oxxneh5xjl1ge2"); // gvprintf(job, "//*** textspan: %s, fontsize = %.3f, fontname = %s\n", UNSUPPORTED("aatbh13pgi2seywuv58l164sg"); // span->str, span->font->size, span->font->name); UNSUPPORTED("p78pafc3a70q01a93j3hakqj"); // z = layerz - 9; UNSUPPORTED("8yrhor0piybk3cx5mqluj6ct0"); // //handle text justification UNSUPPORTED("abi5cnvri7biecl3jbz3ljbqn"); // switch (span->just) { UNSUPPORTED("f0b1gez33b7p2l2mh99g8szv9"); // case 'l': //left justified UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("2unsigciyurjjkm59j0x51yks"); // case 'r': //right justified UNSUPPORTED("bawpoz7lcmuf4ttemxc072smd"); // c.x = c.x - span->size.x; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("6imja9q9r4w9xkws4jnkxaoib"); // case 'n': //centered UNSUPPORTED("arerr6hl1fo2r21lgv6dq0fhe"); // c.x = c.x - span->size.x / 2.0; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5dp6hqhk8pdh35zmahjmrbil4"); // x = (c.x + job->translation.x) * job->scale.x; UNSUPPORTED("8g5ivywnwkgbkamexmslhkbwl"); // y = (c.y + job->translation.y) * job->scale.y; UNSUPPORTED("7ibjof57xyrrbjfq984fhq53q"); // s = el(job, "scale %.3f\n", span->font->size * job->scale.x); UNSUPPORTED("12hm1ht9azi6mmxv4dvc2dvih"); // r = el(job, "rotate ""<%9.3f, %9.3f, %9.3f>""\n", 0.0, 0.0, (float)job->rotation); UNSUPPORTED("9tdxqqkubd9vcc8ei2ek0ohsu"); // t = el(job, "translate""<%9.3f, %9.3f, %9.3f>""\n", x, y, z); UNSUPPORTED("3boaqla3jgicjsvi0cj6tylfw"); // p = pov_color_as_str(job, job->obj->pencolor, 0.0); UNSUPPORTED("b2ejqbz7lvl4hg7pgh487n64i"); // //pov bundled fonts: timrom.ttf, cyrvetic.ttf UNSUPPORTED("6igjb924cisay3j6lgi0ongrm"); // pov = el(job, "text {\n" " ttf \"%s\",\n" " \"%s\", %.3f, %.3f\n" " %s %s %s %s %s" "}\n", UNSUPPORTED("3xx9l0bux74bmtji5uhkw2ik8"); // span->font->name, 0.25, 0.0, //font, depth (0.5 ... 2.0), offset UNSUPPORTED("a1wi2fm46kq0gl96wwx26fgab"); // span->str, " no_shadow\n", s, r, t, p); UNSUPPORTED("3x0tju516ycfkyg76dbmy12z3"); // gvputs(job, pov); UNSUPPORTED("1nwb9ca1mjxkgynagbneulg58"); // free(pov); UNSUPPORTED("7scwdfzpkx03bafy8mo9p36ku"); // free(r); UNSUPPORTED("cy5x5dma0v4hiepir7lrfuo17"); // free(p); UNSUPPORTED("9r1kr4nla99ts81ivi2g8ne6q"); // free(t); UNSUPPORTED("d285xdylp7oj81aar06ulc7kh"); // free(s); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 80vqnzdsz7alwxdre4myzs7cz // static void pov_ellipse(GVJ_t * job, pointf * A, int filled) public static Object pov_ellipse(Object... arg) { UNSUPPORTED("41s3h16cmnt5btexht7j82vat"); // static void pov_ellipse(GVJ_t * job, pointf * A, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3cohebhm3opbm2vh6b4wzdlkl"); // char *pov, *s, *r, *t, *p; UNSUPPORTED("2c4bbxdmt2mx4fss2xa1kkfap"); // float cx, cy, rx, ry, w; UNSUPPORTED("eposezldvr4ehjm1pb4ymq2u5"); // gvputs(job, "//*** ellipse\n"); UNSUPPORTED("4yafz83qky6zhzfs6o2wgxklk"); // z = layerz - 6; UNSUPPORTED("bhf89737crzdptaovef0dh68a"); // // A[0] center, A[1] corner of ellipse UNSUPPORTED("9fxk9sykye0f78f0i5b95gtaw"); // cx = (A[0].x + job->translation.x) * job->scale.x; UNSUPPORTED("19fh9jhjbqwtt9qitwkzy7jb2"); // cy = (A[0].y + job->translation.y) * job->scale.y; UNSUPPORTED("d48v01y3j249ssh8yx85xfm5u"); // rx = (A[1].x - A[0].x) * job->scale.x; UNSUPPORTED("7rbc982nuc7nd1tuc5effk4fw"); // ry = (A[1].y - A[0].y) * job->scale.y; UNSUPPORTED("aekbfd5p6hwhtk3o1acksvq6"); // w = job->obj->penwidth / (rx + ry) / 2.0 * 5; UNSUPPORTED("2zqnnknbzl1cnu2qmt2uquiuh"); // //draw rim (torus) UNSUPPORTED("d1xsz8zm5cmzpth3kx2ypj6ae"); // s = el(job, "scale ""<%9.3f, %9.3f, %9.3f>""\n", rx, (rx + ry) / 4.0, ry); UNSUPPORTED("c8v01mji8vpxow1hdefxz0xy5"); // r = el(job, "rotate ""<%9.3f, %9.3f, %9.3f>""\n", 90.0, 0.0, (float)job->rotation); UNSUPPORTED("995xgtqf93yds26fofxapqasn"); // t = el(job, "translate""<%9.3f, %9.3f, %9.3f>""\n", cx, cy, z); UNSUPPORTED("3boaqla3jgicjsvi0cj6tylfw"); // p = pov_color_as_str(job, job->obj->pencolor, 0.0); UNSUPPORTED("ditiwhg74so8wkvce2dz1ctsc"); // pov = el(job, "torus { %.3f, %.3f\n" " %s %s %s %s" "}\n", 1.0, w, //radius, size of ring UNSUPPORTED("3k6wpzzzs2t4gtijl8zs1c6e"); // s, r, t, p); UNSUPPORTED("3x0tju516ycfkyg76dbmy12z3"); // gvputs(job, pov); UNSUPPORTED("d285xdylp7oj81aar06ulc7kh"); // free(s); UNSUPPORTED("7scwdfzpkx03bafy8mo9p36ku"); // free(r); UNSUPPORTED("9r1kr4nla99ts81ivi2g8ne6q"); // free(t); UNSUPPORTED("cy5x5dma0v4hiepir7lrfuo17"); // free(p); UNSUPPORTED("1nwb9ca1mjxkgynagbneulg58"); // free(pov); UNSUPPORTED("b6xpllwn0s7t41md7rql9u6ps"); // //backgroud of ellipse if filled UNSUPPORTED("2atgu691bmn6h9jvk8lve5qzc"); // if (filled) { UNSUPPORTED("d55j0r2nj3jas2svuuhd22due"); // s = el(job, "scale ""<%9.3f, %9.3f, %9.3f>""\n", rx, ry, 1.0); UNSUPPORTED("95ovvy40bmmuglc6s7uitv3jq"); // r = el(job, "rotate ""<%9.3f, %9.3f, %9.3f>""\n", 0.0, 0.0, (float)job->rotation); UNSUPPORTED("58dmanx0lpf638fy0xe5bb2qu"); // t = el(job, "translate""<%9.3f, %9.3f, %9.3f>""\n", cx, cy, z); UNSUPPORTED("a5gghuf60fymy4ca6p0yubyro"); // p = pov_color_as_str(job, job->obj->fillcolor, 0.0); UNSUPPORTED("ek1cqknka7kxhnsb5frwqxjvk"); // pov = el(job, "sphere {""<%9.3f, %9.3f, %9.3f>"", 1.0\n" " %s %s %s %s" "}\n", UNSUPPORTED("4glbfmpx1gp42z1y90x0sn18x"); // 0.0, 0.0, 0.0, s, r, t, p); UNSUPPORTED("38o9oyyy59mzbbt6zzozzj5kp"); // gvputs(job, pov); UNSUPPORTED("80itb1itky2rb7sgcktyeypr2"); // free(s); UNSUPPORTED("3t86d4kz7zwqy3xx9m37y0eoa"); // free(r); UNSUPPORTED("iagyh21osy84ww1ekih6gqlh"); // free(t); UNSUPPORTED("8eho71vuxbyqy1c76wpeqzivl"); // free(p); UNSUPPORTED("8aa1al3xqgdhiv4dq7n9t47bu"); // free(pov); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1nwr700gjhj5a5axcdo060csj // static void pov_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, int arrow_at_end, int filled) public static Object pov_bezier(Object... arg) { UNSUPPORTED("ee8875esc1r7im8eq6n9m1bbb"); // static void pov_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, UNSUPPORTED("yl0kcnz0uvxq0ffk8eb6kcon"); // int arrow_at_end, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bbuxsg26kpzb2fl660hjri9l8"); // int i; UNSUPPORTED("coyatly5x4mbjcq0bwhb3ky4k"); // char *v, *x; UNSUPPORTED("3cohebhm3opbm2vh6b4wzdlkl"); // char *pov, *s, *r, *t, *p; UNSUPPORTED("9swckmk8r5e9zhs7k5ljct6nt"); // gvputs(job, "//*** bezier\n"); UNSUPPORTED("6w5t2p8ujl2czgk9nm8q9twwq"); // z = layerz - 4; UNSUPPORTED("2omh8jf0yjm0iz8fp4udk4f62"); // s = el(job, "scale ""<%9.3f, %9.3f, %9.3f>""\n", job->scale.x, job->scale.y, 1.0); UNSUPPORTED("12hm1ht9azi6mmxv4dvc2dvih"); // r = el(job, "rotate ""<%9.3f, %9.3f, %9.3f>""\n", 0.0, 0.0, (float)job->rotation); UNSUPPORTED("e4zn7gmaqed5rgvrdfmn4aws9"); // t = el(job, "translate""<%9.3f, %9.3f, %9.3f>""\n", 0.0, 0.0, z - 2); UNSUPPORTED("av7kz9qqnv0p5fnbcld2iw2qa"); // p = pov_color_as_str(job, job->obj->fillcolor, 0.0); UNSUPPORTED("a24ea5773bp2lh6m5pc3nb3cq"); // pov = el(job, "sphere_sweep {\n" " %s\n" " %d,\n", "b_spline", n + 2); UNSUPPORTED("7lppn4o65696k131iftk9aihq"); // for (i = 0; i < n; i++) { UNSUPPORTED("321e5283swfg4sm1s1vl257nh"); // v = el(job, "<%9.3f, %9.3f, %9.3f>" ", %.3f\n", A[i].x + job->translation.x, A[i].y + job->translation.y, 0.0, job->obj->penwidth); //z coordinate, thickness UNSUPPORTED("4zdxrso8p4mqjcbsmj89gqlte"); // x = el(job, "%s %s", pov, v); //catenate pov & vector v UNSUPPORTED("vfr0wm9gm15yrovhwdzvfjj3"); // free(v); UNSUPPORTED("8aa1al3xqgdhiv4dq7n9t47bu"); // free(pov); UNSUPPORTED("b536z5l52wpzyul7cr4nfyjml"); // pov = x; UNSUPPORTED("a2hqs30x24m07r0la4yg21n03"); // //TODO: we currently just use the start and end points of the curve as UNSUPPORTED("874oelxej10s2jdrj46nlkyhy"); // //control points but we should use center of nodes UNSUPPORTED("33w4htg1ddnzrlrn3aaqx4mih"); // if (i == 0 || i == n - 1) { UNSUPPORTED("ejfxr9c5tlyeymuqusujnge65"); // v = el(job, "<%9.3f, %9.3f, %9.3f>" ", %.3f\n", A[i].x + job->translation.x, A[i].y + job->translation.y, 0.0, job->obj->penwidth); //z coordinate, thickness UNSUPPORTED("117aoj4wdcidfnr09ttcuh0bq"); // x = el(job, "%s %s", pov, v); //catenate pov & vector v UNSUPPORTED("2ms9r7llvwurv03vshuwp33g0"); // free(v); UNSUPPORTED("36ulf5u2x88apdfvl8575t0pw"); // free(pov); UNSUPPORTED("52w8yci1wukx08u5iw209foki"); // pov = x; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6rjarox8bj4qvyn5xm8l44ek3"); // x = el(job, " tolerance 0.01\n %s %s %s %s" "}\n", s, r, t, UNSUPPORTED("75z6hiocdm99uxsymxnekqzz4"); // p); UNSUPPORTED("57yf8g8kqm96q238qx5boux2p"); // pov = el(job, "%s%s", pov, x); //catenate pov & end str UNSUPPORTED("6laycqh8jpxy4ruipf713audd"); // free(x); UNSUPPORTED("3x0tju516ycfkyg76dbmy12z3"); // gvputs(job, pov); UNSUPPORTED("d285xdylp7oj81aar06ulc7kh"); // free(s); UNSUPPORTED("7scwdfzpkx03bafy8mo9p36ku"); // free(r); UNSUPPORTED("9r1kr4nla99ts81ivi2g8ne6q"); // free(t); UNSUPPORTED("cy5x5dma0v4hiepir7lrfuo17"); // free(p); UNSUPPORTED("1nwb9ca1mjxkgynagbneulg58"); // free(pov); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 byjm8zehiu37tz6v8axr9pw3n // static void pov_polygon(GVJ_t * job, pointf * A, int n, int filled) public static Object pov_polygon(Object... arg) { UNSUPPORTED("66neyti84r77ayxgttnq6ja44"); // static void pov_polygon(GVJ_t * job, pointf * A, int n, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7w62ed76qkbpnwrmdmtxuvbqt"); // char *pov, *s, *r, *t, *p, *v, *x; UNSUPPORTED("bbuxsg26kpzb2fl660hjri9l8"); // int i; UNSUPPORTED("7qf2cy4yl409rjtqmxp9e15zk"); // gvputs(job, "//*** polygon\n"); UNSUPPORTED("egmkaiy8ma7d7wgilpj7gjfx8"); // z = layerz - 2; UNSUPPORTED("2omh8jf0yjm0iz8fp4udk4f62"); // s = el(job, "scale ""<%9.3f, %9.3f, %9.3f>""\n", job->scale.x, job->scale.y, 1.0); UNSUPPORTED("12hm1ht9azi6mmxv4dvc2dvih"); // r = el(job, "rotate ""<%9.3f, %9.3f, %9.3f>""\n", 0.0, 0.0, (float)job->rotation); UNSUPPORTED("e4zn7gmaqed5rgvrdfmn4aws9"); // t = el(job, "translate""<%9.3f, %9.3f, %9.3f>""\n", 0.0, 0.0, z - 2); UNSUPPORTED("3boaqla3jgicjsvi0cj6tylfw"); // p = pov_color_as_str(job, job->obj->pencolor, 0.0); UNSUPPORTED("37ahpca2y7feyrvstporqhl8u"); // pov = el(job, "sphere_sweep {\n" " %s\n" " %d,\n", "linear_spline", n + 1); UNSUPPORTED("7lppn4o65696k131iftk9aihq"); // for (i = 0; i < n; i++) { UNSUPPORTED("321e5283swfg4sm1s1vl257nh"); // v = el(job, "<%9.3f, %9.3f, %9.3f>" ", %.3f\n", A[i].x + job->translation.x, A[i].y + job->translation.y, 0.0, job->obj->penwidth); //z coordinate, thickness UNSUPPORTED("4zdxrso8p4mqjcbsmj89gqlte"); // x = el(job, "%s %s", pov, v); //catenate pov & vector v UNSUPPORTED("vfr0wm9gm15yrovhwdzvfjj3"); // free(v); UNSUPPORTED("8aa1al3xqgdhiv4dq7n9t47bu"); // free(pov); UNSUPPORTED("b536z5l52wpzyul7cr4nfyjml"); // pov = x; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("514o3in8i24vfy9zenseu42h1"); // //close polygon, add starting point as final point^ UNSUPPORTED("9tnc5necekjr89isqg9turon9"); // v = el(job, "<%9.3f, %9.3f, %9.3f>" ", %.3f\n", A[0].x + job->translation.x, A[0].y + job->translation.y, 0.0, job->obj->penwidth); //z coordinate, thickness UNSUPPORTED("4ktvr5g349qqwk467rn1z63az"); // x = el(job, "%s %s", pov, v); //catenate pov & vector v UNSUPPORTED("cuo9qqlefcz4kzzualo1de3no"); // free(v); UNSUPPORTED("1nwb9ca1mjxkgynagbneulg58"); // free(pov); UNSUPPORTED("7xz82xouyjrr6uykusy7qpf2w"); // pov = x; UNSUPPORTED("ht1aje0654drgytpm5le9rjh"); // x = el(job, " tolerance 0.1\n %s %s %s %s" "}\n", s, r, t, p); UNSUPPORTED("57yf8g8kqm96q238qx5boux2p"); // pov = el(job, "%s%s", pov, x); //catenate pov & end str UNSUPPORTED("6laycqh8jpxy4ruipf713audd"); // free(x); UNSUPPORTED("3x0tju516ycfkyg76dbmy12z3"); // gvputs(job, pov); UNSUPPORTED("d285xdylp7oj81aar06ulc7kh"); // free(s); UNSUPPORTED("7scwdfzpkx03bafy8mo9p36ku"); // free(r); UNSUPPORTED("9r1kr4nla99ts81ivi2g8ne6q"); // free(t); UNSUPPORTED("cy5x5dma0v4hiepir7lrfuo17"); // free(p); UNSUPPORTED("1nwb9ca1mjxkgynagbneulg58"); // free(pov); UNSUPPORTED("aq1dxinpieit5q7d2nbxcebql"); // //create fill background UNSUPPORTED("2atgu691bmn6h9jvk8lve5qzc"); // if (filled) { UNSUPPORTED("3ruh2ygmjwz4qt3cdfolchjsr"); // s = el(job, "scale ""<%9.3f, %9.3f, %9.3f>""\n", job->scale.x, job->scale.y, 1.0); UNSUPPORTED("95ovvy40bmmuglc6s7uitv3jq"); // r = el(job, "rotate ""<%9.3f, %9.3f, %9.3f>""\n", 0.0, 0.0, (float)job->rotation); UNSUPPORTED("13w1x4vkx03vnimou254113c9"); // t = el(job, "translate""<%9.3f, %9.3f, %9.3f>""\n", 0.0, 0.0, z - 2); UNSUPPORTED("2d03xv6bj4q7cciljhxeyma7w"); // p = pov_color_as_str(job, job->obj->fillcolor, 0.25); UNSUPPORTED("ay7d9vngvzwvfr5gm3r67e4sg"); // pov = el(job, "polygon { %d,\n", n); UNSUPPORTED("2rrnw2qr4kt708c1ryyszovp9"); // for (i = 0; i < n; i++) { UNSUPPORTED("1yhl4u2jvgrqqs92asnmn634"); // //create on z = 0 plane, then translate to real z pos UNSUPPORTED("323gm6pkek1kq1f80pdg2baje"); // v = el(job, "<%9.3f, %9.3f, %9.3f>", UNSUPPORTED("9y7o0jvy5fig3ebzjjuvxrp9"); // A[i].x + job->translation.x, UNSUPPORTED("7dm6pesqrr4ofolkoau22kfyw"); // A[i].y + job->translation.y, 0.0); UNSUPPORTED("5426ydiaul7suvot22wcxj4ql"); // x = el(job, "%s\n %s", pov, v); //catenate pov & vector v UNSUPPORTED("2ms9r7llvwurv03vshuwp33g0"); // free(v); UNSUPPORTED("36ulf5u2x88apdfvl8575t0pw"); // free(pov); UNSUPPORTED("52w8yci1wukx08u5iw209foki"); // pov = x; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("1c5gz2uin3fm53ihebst7i310"); // x = el(job, "\n %s %s %s %s" "}\n", s, r, t, p); UNSUPPORTED("a5ui5eg32sxrkxt68rvk1y6nd"); // pov = el(job, "%s%s", pov, x); //catenate pov & end str UNSUPPORTED("akxc4ygimq2dxgjssmv2tcw24"); // free(x); UNSUPPORTED("38o9oyyy59mzbbt6zzozzj5kp"); // gvputs(job, pov); UNSUPPORTED("80itb1itky2rb7sgcktyeypr2"); // free(s); UNSUPPORTED("3t86d4kz7zwqy3xx9m37y0eoa"); // free(r); UNSUPPORTED("iagyh21osy84ww1ekih6gqlh"); // free(t); UNSUPPORTED("8eho71vuxbyqy1c76wpeqzivl"); // free(p); UNSUPPORTED("8aa1al3xqgdhiv4dq7n9t47bu"); // free(pov); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4tenvyj7b9pbo2g8hb5qwdl5e // static void pov_polyline(GVJ_t * job, pointf * A, int n) public static Object pov_polyline(Object... arg) { UNSUPPORTED("6y14qhe4e218exwzocw9x5gfq"); // static void pov_polyline(GVJ_t * job, pointf * A, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7w62ed76qkbpnwrmdmtxuvbqt"); // char *pov, *s, *r, *t, *p, *v, *x; UNSUPPORTED("bbuxsg26kpzb2fl660hjri9l8"); // int i; UNSUPPORTED("diupy09i3wc1frcvkvjwnyty1"); // gvputs(job, "//*** polyline\n"); UNSUPPORTED("4yafz83qky6zhzfs6o2wgxklk"); // z = layerz - 6; UNSUPPORTED("2omh8jf0yjm0iz8fp4udk4f62"); // s = el(job, "scale ""<%9.3f, %9.3f, %9.3f>""\n", job->scale.x, job->scale.y, 1.0); UNSUPPORTED("12hm1ht9azi6mmxv4dvc2dvih"); // r = el(job, "rotate ""<%9.3f, %9.3f, %9.3f>""\n", 0.0, 0.0, (float)job->rotation); UNSUPPORTED("9wdvdavwfn1nyjtjdobqa9137"); // t = el(job, "translate""<%9.3f, %9.3f, %9.3f>""\n", 0.0, 0.0, z); UNSUPPORTED("3boaqla3jgicjsvi0cj6tylfw"); // p = pov_color_as_str(job, job->obj->pencolor, 0.0); UNSUPPORTED("dp2pkyhb12fz76mwb5hgddd7l"); // pov = el(job, "sphere_sweep {\n" " %s\n" " %d,\n", "linear_spline", n); UNSUPPORTED("7lppn4o65696k131iftk9aihq"); // for (i = 0; i < n; i++) { UNSUPPORTED("321e5283swfg4sm1s1vl257nh"); // v = el(job, "<%9.3f, %9.3f, %9.3f>" ", %.3f\n", A[i].x + job->translation.x, A[i].y + job->translation.y, 0.0, job->obj->penwidth); //z coordinate, thickness UNSUPPORTED("4zdxrso8p4mqjcbsmj89gqlte"); // x = el(job, "%s %s", pov, v); //catenate pov & vector v UNSUPPORTED("vfr0wm9gm15yrovhwdzvfjj3"); // free(v); UNSUPPORTED("8aa1al3xqgdhiv4dq7n9t47bu"); // free(pov); UNSUPPORTED("b536z5l52wpzyul7cr4nfyjml"); // pov = x; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5oy4ofx9kib8m20osqf5183js"); // x = el(job, " tolerance 0.01\n %s %s %s %s" "}\n", s, r, t, p); UNSUPPORTED("57yf8g8kqm96q238qx5boux2p"); // pov = el(job, "%s%s", pov, x); //catenate pov & end str UNSUPPORTED("6laycqh8jpxy4ruipf713audd"); // free(x); UNSUPPORTED("3x0tju516ycfkyg76dbmy12z3"); // gvputs(job, pov); UNSUPPORTED("d285xdylp7oj81aar06ulc7kh"); // free(s); UNSUPPORTED("7scwdfzpkx03bafy8mo9p36ku"); // free(r); UNSUPPORTED("9r1kr4nla99ts81ivi2g8ne6q"); // free(t); UNSUPPORTED("cy5x5dma0v4hiepir7lrfuo17"); // free(p); UNSUPPORTED("1nwb9ca1mjxkgynagbneulg58"); // free(pov); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 60ddyecwuwk1q703j08lxofaw // gvrender_engine_t pov_engine = //1 3mk6p83k5m6nkdmz9a3zgngia // gvrender_features_t render_features_pov = //1 4vl7xgwqefutkozj8utzeuuwh // gvdevice_features_t device_features_pov = //1 4xnrqrdo6vuoa096fq2ib607n // gvplugin_installed_t gvrender_pov_types[] = //1 7glwt7v8poq3kemx5yiig02a8 // gvplugin_installed_t gvdevice_pov_types[] = } plantuml-1.2017.15/src/gen/plugin/core/gvrender_core_ps__c.java000066400000000000000000001041321312650303100242770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.plugin.core; import static smetana.core.Macro.UNSUPPORTED; public class gvrender_core_ps__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 1qtflsog3urfbtfk7yequcb6l // static const char *ps_txt[] = //1 7fq6ozjgi243ox7yrdb2ep5lx // static int isLatin1 //1 u3p8me9bh8fnyshn034rzpzo // static char setupLatin1 //3 4jsbd8kmwbzb2dkxcq0akopqt // static void psgen_begin_job(GVJ_t * job) public static Object psgen_begin_job(Object... arg) { UNSUPPORTED("9orw8eslfn5kltlv212oz9m4t"); // static void psgen_begin_job(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2gqkshnzesys4oyr4v83wtm7r"); // gvputs(job, "%!PS-Adobe-3.0"); UNSUPPORTED("10cxufp7bdbg3focj7i2ji75x"); // if (job->render.id == FORMAT_EPS) UNSUPPORTED("d7jryk3bdwpt507jq18ibacn5"); // gvputs(job, " EPSF-3.0\n"); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("ab9vno2hfka5wkcaq86o3njmq"); // gvputs(job, "\n"); UNSUPPORTED("dv3jmvt7myav44xtzcqkbrvpa"); // gvprintf(job, "%%%%Creator: %s version %s (%s)\n", UNSUPPORTED("4avcb2reh8m3qem3f2716wav3"); // job->common->info[0], job->common->info[1], job->common->info[2]); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3vsgq26dsfvpzsck4p2l68jv8 // static void psgen_end_job(GVJ_t * job) public static Object psgen_end_job(Object... arg) { UNSUPPORTED("829ltuhwlzr8hozer6oad9sz5"); // static void psgen_end_job(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("djedkpe7zjd45r39k271iaxcu"); // gvputs(job, "%%Trailer\n"); UNSUPPORTED("b3iu4ks8uomai9twz4bxnbipx"); // if (job->render.id != FORMAT_EPS) UNSUPPORTED("36ngacoh31azhdowttvvpjjk2"); // gvprintf(job, "%%%%Pages: %d\n", job->common->viewNum); UNSUPPORTED("dgmf05k9an1qfxjxd97hq1buj"); // if (job->common->show_boxes == NULL) UNSUPPORTED("6h3w6ikmuw9ywilwm2qpevp3l"); // if (job->render.id != FORMAT_EPS) UNSUPPORTED("18j4zj26y29rtjxd0cekzpfee"); // gvprintf(job, "%%%%BoundingBox: %d %d %d %d\n", UNSUPPORTED("dxbze4i780qyz19i2rh8y5jht"); // job->boundingBox.LL.x, job->boundingBox.LL.y, UNSUPPORTED("60out7dqilui46fgktwm5ej8r"); // job->boundingBox.UR.x, job->boundingBox.UR.y); UNSUPPORTED("c1p513mbeu7uv14dlqfw6abkg"); // gvputs(job, "end\nrestore\n"); UNSUPPORTED("4uqbd6po1wgmrs3zrxz4ik9mw"); // gvputs(job, "%%EOF\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3gb6ikypoueyb2y6i764cxbhx // static void psgen_begin_graph(GVJ_t * job) public static Object psgen_begin_graph(Object... arg) { UNSUPPORTED("apgmzjzeua7qxnlanxaxe3hua"); // static void psgen_begin_graph(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("bhf3m2sbf59gs5cg8rpaiywew"); // setupLatin1 = 0; UNSUPPORTED("8bju5ndiwsdb8q2ly29dv84wm"); // if (job->common->viewNum == 0) { UNSUPPORTED("7q41bmyw0rrgi4x6negigle3m"); // gvprintf(job, "%%%%Title: %s\n", agnameof(obj->u.g)); UNSUPPORTED("5n912p3phcw0i5akike49jiqc"); // if (job->render.id != FORMAT_EPS) UNSUPPORTED("8aqdygs4r7d8g3i6xp7mj8e50"); // gvputs(job, "%%Pages: (atend)\n"); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("4vsc5buyrhwh1ovu2agkm6zjy"); // gvputs(job, "%%Pages: 1\n"); UNSUPPORTED("d56ndgp8enkjfui03ixmhufw3"); // if (job->common->show_boxes == NULL) { UNSUPPORTED("w7ueydz0ch59r5x7jz39zgtp"); // if (job->render.id != FORMAT_EPS) UNSUPPORTED("bxgfbxaraautik8cspg1wmptv"); // gvputs(job, "%%BoundingBox: (atend)\n"); UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("6wpp34s0c7tqg0wv4g8ltebzm"); // gvprintf(job, "%%%%BoundingBox: %d %d %d %d\n", UNSUPPORTED("1smwnfuueu6rmd1bgwt1zhvtx"); // job->pageBoundingBox.LL.x, job->pageBoundingBox.LL.y, UNSUPPORTED("6lr43m798s3534swmbhen5m0q"); // job->pageBoundingBox.UR.x, job->pageBoundingBox.UR.y); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("6q85d3glhzmompt5xmvj42zoa"); // gvputs(job, "%%EndComments\nsave\n"); UNSUPPORTED("c9ohr5sqm5pydsv4h8o12ku9h"); // /* include shape library */ UNSUPPORTED("sk0bwxtidaigb1oi4xkk10up"); // cat_libfile(job, job->common->lib, ps_txt); UNSUPPORTED("clqt6n30kglwpmnxf6ayp06x9"); // /* include epsf */ UNSUPPORTED("61opdwqs031lj4tzzg2sgcci2"); // epsf_define(job); UNSUPPORTED("6vg9px4q8r7fdndbyt64w62lt"); // if (job->common->show_boxes) { UNSUPPORTED("edalkp7jyj28icbidbcmfsz4y"); // const char* args[2]; UNSUPPORTED("912tsmkymhqfhqp25qexxz6m5"); // args[0] = job->common->show_boxes[0]; UNSUPPORTED("83o9dwn4xs47t734kcj652p5p"); // args[1] = NULL; UNSUPPORTED("7miirzhxs42qrp2ovadq92khu"); // cat_libfile(job, NULL, args); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("33xxzmz1g6bggeapvxm1zx9yr"); // isLatin1 = (GD_charset(obj->u.g) == 1 ? 1 : -1); UNSUPPORTED("1xv4b98ox7mq8hhp97i19zfor"); // /* We always setup Latin1. The charset info is always output, UNSUPPORTED("1d9yupk35hp3i9e12yycbevaz"); // * and installing it is cheap. With it installed, we can then UNSUPPORTED("m5mzxzrnlpf7h3hy7np9zmd0"); // * rely on ps_string to convert UTF-8 characters whose encoding UNSUPPORTED("cajcmda1cmsbpwhy0mvm56dao"); // * is in the range of Latin-1 into the Latin-1 equivalent and UNSUPPORTED("eko1rvgwxxxitm2caqgogrvhq"); // * get the expected PostScript output. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("a6gal7mia1c9lnenwqr2je5bh"); // if (!setupLatin1) { UNSUPPORTED("erhruwqa7hy0mxl27hsdhwjvq"); // gvputs(job, "setupLatin1\n"); /* as defined in ps header */ UNSUPPORTED("4yyacs2oqpdxm2x0r5pdup66w"); // setupLatin1 = NOT(0); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6szrbi81oehk1yhwceaheeuev"); // /* Set base URL for relative links (for Distiller >= 3.0) */ UNSUPPORTED("4jozt8n5f1lyy86sk34jfrvgg"); // if (obj->url) UNSUPPORTED("36rstk5tbud6jtt4g6z61q808"); // gvprintf(job, "[ {Catalog} << /URI << /Base %s >> >>\n" UNSUPPORTED("d3gnahi0ckutslapcmkiqsd7p"); // "/PUT pdfmark\n", ps_string(obj->url,isLatin1)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ar4xx7dz90q15xh2y4klc4num // static void psgen_begin_layer(GVJ_t * job, char *layername, int layerNum, int numLayers) public static Object psgen_begin_layer(Object... arg) { UNSUPPORTED("agsvap2lizd7txyml3u0vrp85"); // static void psgen_begin_layer(GVJ_t * job, char *layername, int layerNum, int numLayers) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("61nwew8w1g6gyi8sfcje734f0"); // gvprintf(job, "%d %d setlayer\n", layerNum, numLayers); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7m0sjz6ewwd4y7tot8bmcfcei // static void psgen_begin_page(GVJ_t * job) public static Object psgen_begin_page(Object... arg) { UNSUPPORTED("cogyrlqcthcac2sfe3ms3b7v8"); // static void psgen_begin_page(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("76g96x1rehn6s0a72jz2no0bi"); // box pbr = job->pageBoundingBox; UNSUPPORTED("br2sfjk7c29me4e6ggop0ljk3"); // gvprintf(job, "%%%%Page: %d %d\n", UNSUPPORTED("17n0zsnmgi4zptncq1uvxywuu"); // job->common->viewNum + 1, job->common->viewNum + 1); UNSUPPORTED("dgmf05k9an1qfxjxd97hq1buj"); // if (job->common->show_boxes == NULL) UNSUPPORTED("68yf7k1sgpmnim51dqkg7iijt"); // gvprintf(job, "%%%%PageBoundingBox: %d %d %d %d\n", UNSUPPORTED("21d5hfu7mone3g6dbuen2sgg3"); // pbr.LL.x, pbr.LL.y, pbr.UR.x, pbr.UR.y); UNSUPPORTED("3x0ssk90v3lg33lsr6b4ula1p"); // gvprintf(job, "%%%%PageOrientation: %s\n", UNSUPPORTED("78a69y96uj20rf1bjroairawi"); // (job->rotation ? "Landscape" : "Portrait")); UNSUPPORTED("2ztdn9tzegcfj0564qx2gwyq0"); // if (job->render.id == FORMAT_PS2) UNSUPPORTED("3uk2omkh4h2oh9x6p6gdfgezn"); // gvprintf(job, "<< /PageSize [%d %d] >> setpagedevice\n", UNSUPPORTED("alr7wses0g3ewh8vkfvlk58fc"); // pbr.UR.x, pbr.UR.y); UNSUPPORTED("4h7sybrqpqww3pcpixnfe21z6"); // gvprintf(job, "%d %d %d beginpage\n", UNSUPPORTED("96jucytj8f7c6fy6z1gy6r1ze"); // job->pagesArrayElem.x, job->pagesArrayElem.y, job->numPages); UNSUPPORTED("dgmf05k9an1qfxjxd97hq1buj"); // if (job->common->show_boxes == NULL) UNSUPPORTED("5koijcwi38ci3a4qx13pvfwlw"); // gvprintf(job, "gsave\n%d %d %d %d boxprim clip newpath\n", UNSUPPORTED("9clbdsb3beptgdszw41ynvu0p"); // pbr.LL.x, pbr.LL.y, pbr.UR.x-pbr.LL.x, pbr.UR.y-pbr.LL.y); UNSUPPORTED("4a7e5k6q3rlacd537rx9ub20c"); // gvprintf(job, "%g %g set_scale %d rotate %g %g translate\n", UNSUPPORTED("10afwn16gj676dpglziigsm50"); // job->scale.x, job->scale.y, UNSUPPORTED("a1cdlhacjn1xlkc1yude0wrql"); // job->rotation, UNSUPPORTED("c7ifb58gy4lomkldshbldytbo"); // job->translation.x, job->translation.y); UNSUPPORTED("1z8ea74p9uxtwtwscul3o3jz7"); // /* Define the size of the PS canvas */ UNSUPPORTED("4sr6w5mogwrv0l5izwjeu7ryc"); // if (job->render.id == FORMAT_PS2) { UNSUPPORTED("co3q2mi6gjxi3gchpln4w4567"); // if (pbr.UR.x >= 14400 || pbr.UR.y >= 14400) UNSUPPORTED("31162iy3wjwmhqlutqv8nfc7d"); // job->common->errorfn("canvas size (%d,%d) exceeds PDF limit (%d)\n" UNSUPPORTED("an7h4u4y334blwkn06120ydt5"); // "\t(suggest setting a bounding box size, see dot(1))\n", UNSUPPORTED("c56zgl5pu3nxenerpmp3f3o0z"); // pbr.UR.x, pbr.UR.y, 14400); UNSUPPORTED("dxf3rvnawk3z9x2n179fzbxt9"); // gvprintf(job, "[ /CropBox [%d %d %d %d] /PAGES pdfmark\n", UNSUPPORTED("ddbug0c0aj9lbqu8f829kzjvm"); // pbr.LL.x, pbr.LL.y, pbr.UR.x, pbr.UR.y); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7jxfd86j0csce75s68ekegiq6 // static void psgen_end_page(GVJ_t * job) public static Object psgen_end_page(Object... arg) { UNSUPPORTED("5uicvg0h4t78pg6xobhau861e"); // static void psgen_end_page(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3u573a16zqopxfboi2w0zqqzz"); // if (job->common->show_boxes) { UNSUPPORTED("8uc8ww599n2y8x603qf4a4b06"); // gvputs(job, "0 0 0 edgecolor\n"); UNSUPPORTED("c67xlny46u43tnb3m46iy32o4"); // cat_libfile(job, NULL, job->common->show_boxes + 1); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5flwz55ptjslg8li9ttksuap5"); // /* the showpage is really a no-op, but at least one PS processor UNSUPPORTED("9eh3687p6imh9z6upt3sok5ka"); // * out there needs to see this literal token. endpage does the real work. UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ UNSUPPORTED("2jczhqdkf2v0tvqskulv69qq3"); // gvputs(job, "endpage\nshowpage\ngrestore\n"); UNSUPPORTED("eof3ypspah8sg4phxnbptv9l"); // gvputs(job, "%%PageTrailer\n"); UNSUPPORTED("48g7wddoi0h6l2ma38gg97vcs"); // gvprintf(job, "%%%%EndPage: %d\n", job->common->viewNum); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 64yihbmjh014pmpusuctsl3sl // static void psgen_begin_cluster(GVJ_t * job) public static Object psgen_begin_cluster(Object... arg) { UNSUPPORTED("9m23jcvafreyz22sgraim1dr6"); // static void psgen_begin_cluster(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("e2btf3o0oasmpyurrr5iedyei"); // gvprintf(job, "%% %s\n", agnameof(obj->u.g)); UNSUPPORTED("br61vl70v0xgjsjgnfhks64fr"); // gvputs(job, "gsave\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3yzoaq9nyxn75ghsk94xknu7c // static void psgen_end_cluster(GVJ_t * job) public static Object psgen_end_cluster(Object... arg) { UNSUPPORTED("x7ci6jzq6e6cbwdkt9cbd1az"); // static void psgen_end_cluster(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8efwipnmlx4cesl8wwb0fxsi1"); // gvputs(job, "grestore\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4gsfnvgb2qcux6uz1kdumc5vr // static void psgen_begin_node(GVJ_t * job) public static Object psgen_begin_node(Object... arg) { UNSUPPORTED("4ngrphh4a1xs5qfo6vgfzqgh0"); // static void psgen_begin_node(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("br61vl70v0xgjsjgnfhks64fr"); // gvputs(job, "gsave\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 f0az3wc3ll61cwwyyr8dsyphs // static void psgen_end_node(GVJ_t * job) public static Object psgen_end_node(Object... arg) { UNSUPPORTED("ecuij4nzrh3ztsf6nmjoubsqu"); // static void psgen_end_node(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8efwipnmlx4cesl8wwb0fxsi1"); // gvputs(job, "grestore\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6d5xpnziymgn6d0min85jfjvv // static void psgen_begin_edge(GVJ_t * job) public static Object psgen_begin_edge(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("eni14d6lyslf5a4etuic39aa8"); // psgen_begin_edge(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("br61vl70v0xgjsjgnfhks64fr"); // gvputs(job, "gsave\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1smwxyj2mbjasopcdnl2snrpe // static void psgen_end_edge(GVJ_t * job) public static Object psgen_end_edge(Object... arg) { UNSUPPORTED("f2g7y2r104tklwtr280jfpf5h"); // static void psgen_end_edge(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8efwipnmlx4cesl8wwb0fxsi1"); // gvputs(job, "grestore\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b0pad7wyg5jnhkvyvxxfex8ij // static void psgen_begin_anchor(GVJ_t *job, char *url, char *tooltip, char *target, char *id) public static Object psgen_begin_anchor(Object... arg) { UNSUPPORTED("51xu7flm3qjo0cjkkrc57auwy"); // static void psgen_begin_anchor(GVJ_t *job, char *url, char *tooltip, char *target, char *id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("9cok0gxbmxzogxgwng4xmi787"); // if (url && obj->url_map_p) { UNSUPPORTED("18v6n3l39cjzkzv2qek8f5afv"); // gvputs(job, "[ /Rect [ "); UNSUPPORTED("chip985p4cjoasqpkgaiuru5f"); // gvprintpointflist(job, obj->url_map_p, 2); UNSUPPORTED("672y6r8zwkhwb44q91feajtwe"); // gvputs(job, " ]\n"); UNSUPPORTED("15sn5jwyf74feyieb8amxyl2n"); // gvprintf(job, " /Border [ 0 0 0 ]\n" UNSUPPORTED("efeqhwnyncozgnojuosrolj8l"); // " /Action << /Subtype /URI /URI %s >>\n" UNSUPPORTED("5zen76z1f3ruolu46nam3b8sm"); // " /Subtype /Link\n" UNSUPPORTED("4xsvt507xerg3xtxu3l0co4zn"); // "/ANN pdfmark\n", UNSUPPORTED("2xp015vqrvd5x2cu42yttmbvv"); // ps_string(url, isLatin1)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 azkjcny2ozhl5ngrex3xy1920 // static void ps_set_pen_style(GVJ_t *job) public static Object ps_set_pen_style(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("7tbc3p5jgba58vc3atp666q9o"); // ps_set_pen_style(GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3jhg4yacyumgqbahinlar0ugn"); // double penwidth = job->obj->penwidth; UNSUPPORTED("9nzbcv0dhv0ufp0gxl6imgp7c"); // char *p, *line, **s = job->obj->rawstyle; UNSUPPORTED("a54kc8hkuqkvqgh8t0g3edgg6"); // gvprintdouble(job, penwidth); UNSUPPORTED("193mrkgt2kaa19s0ahu3qlpvn"); // gvputs(job," setlinewidth\n"); UNSUPPORTED("exk7aqfswofs5s40p0nulkkbq"); // while (s && (p = line = *s++)) { UNSUPPORTED("996bsna1tw4r0r1j0ontx6960"); // if (strcmp(line, "setlinewidth") == 0) UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; UNSUPPORTED("yxnvzyld8ixj1ioqsioffpte"); // while (*p) UNSUPPORTED("847zwwso12sey42b59zepembc"); // p++; UNSUPPORTED("2wdgcrx402aszs54rq2kh9txd"); // p++; UNSUPPORTED("1bnbwdqgkfyku19nvuttx2w2d"); // while (*p) { UNSUPPORTED("32m73n62g8mlcoc4opqo15aug"); // gvprintf(job,"%s ", p); UNSUPPORTED("48rrlpibv3umwc6ofz2eg3007"); // while (*p) UNSUPPORTED("f0iluvyv5shsjqi6qh07pclgc"); // p++; UNSUPPORTED("847zwwso12sey42b59zepembc"); // p++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3uz4rodnpqcb2rgbcjlk95s2c"); // if (strcmp(line, "invis") == 0) UNSUPPORTED("1tn42ug84sznim8sne8iif91k"); // job->obj->penwidth = 0; UNSUPPORTED("f3bcgmltuhfwlwib8wdxiq8vz"); // gvprintf(job, "%s\n", line); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ewmcmbew48t6xoasz1f2dg37q // static void ps_set_color(GVJ_t *job, gvcolor_t *color) public static Object ps_set_color(Object... arg) { UNSUPPORTED("97ps1rl0dp2n5licoxgmtrh4d"); // static void ps_set_color(GVJ_t *job, gvcolor_t *color) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("aqb0odbaeg51ab9k2c5qo3x9x"); // char *objtype; UNSUPPORTED("aut7kl4l7gn4g3hxqkru7ilg4"); // if (color) { UNSUPPORTED("5loilaiyk3wcqxx79q7zkv8pe"); // switch (job->obj->type) { UNSUPPORTED("4twjeggzt94nyvkfk4ngj7uqp"); // case ROOTGRAPH_OBJTYPE: UNSUPPORTED("bs92udgg6yjwdh38r8entr4c"); // case CLUSTER_OBJTYPE: UNSUPPORTED("4nfiirl3mvtumxrrh21gbk154"); // objtype = "graph"; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("c7xs8ak1x3jqu2f4z7haikpgw"); // case NODE_OBJTYPE: UNSUPPORTED("31u8h2s30zfu9ub2557w6y2n1"); // objtype = "node"; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("5cvje3cnq8nvl851sut6sdhs9"); // case EDGE_OBJTYPE: UNSUPPORTED("4aw3ehtuh69fgbi7j764udybx"); // objtype = "edge"; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("bt2g0yhsy3c7keqyftf3c98ut"); // default: UNSUPPORTED("6o2vs9xfrblfvi3oi2nzlvsaa"); // objtype = "sethsb"; UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("3xu9fluch6hl1rf5xj3p7bmwh"); // gvprintf(job, "%.5g %.5g %.5g %scolor\n", UNSUPPORTED("bfjslqaz3l8lvo8opshvafth"); // color->u.HSVA[0], color->u.HSVA[1], color->u.HSVA[2], objtype); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ay05ube2905przfamsvtiz6l6 // static void psgen_textspan(GVJ_t * job, pointf p, textspan_t * span) public static Object psgen_textspan(Object... arg) { UNSUPPORTED("d3apfsoqjlwvrkzxkew5ymyrd"); // static void psgen_textspan(GVJ_t * job, pointf p, textspan_t * span) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("76nok3eiyr33qf4ecv69ujxn6"); // char *str; UNSUPPORTED("27583bfrnkeiouhqlzq21bpee"); // if (job->obj->pencolor.u.HSVA[3] < .5) UNSUPPORTED("6p588rupwy8yjjk196zz8qcvj"); // return; /* skip transparent text */ UNSUPPORTED("78h44lidscrr82izbmmtwxpvy"); // ps_set_color(job, &(job->obj->pencolor)); UNSUPPORTED("33ezxcuazz0b3dqe48eqxi81p"); // gvprintdouble(job, span->font->size); UNSUPPORTED("29wnsn5uix8ajohqm9brgm9gr"); // gvprintf(job, " /%s set_font\n", span->font->name); UNSUPPORTED("9mljtbtg6rnqp0ppoda72glkp"); // str = ps_string(span->str,isLatin1); UNSUPPORTED("bpqxh9mig0sh1gasrlkg6hbph"); // switch (span->just) { UNSUPPORTED("8pu80wsk8me7q17ensqlviq86"); // case 'r': UNSUPPORTED("lzwxwwf5wl644m2hvx2zioue"); // p.x -= span->size.x; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("15tf5rbprgr65ucp24e4bba9t"); // case 'l': UNSUPPORTED("5u1yeddr7gxqz7isver6zd56p"); // p.x -= 0.0; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("37fbny64zwo23oymypyreuldc"); // case 'n': UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("e3odj4lftxsik5ovvxgbu6ddv"); // p.x -= span->size.x / 2.0; UNSUPPORTED("bzxyddcf9jharsko2rb8asyik"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c9qtg5nyqzscz54w8w9mfwv7v"); // p.y += span->yoffset_centerline; UNSUPPORTED("i7zx9lpif6lu4yrqqzsw2a4o"); // gvprintpointf(job, p); UNSUPPORTED("bj02ifjyeidil7b0nmgp8v2p3"); // gvputs(job, " moveto "); UNSUPPORTED("ckz29c0pawvdlkc5buih60dss"); // gvprintdouble(job, span->size.x); UNSUPPORTED("8lffoflzrv4a2q19ehsyhtrpb"); // gvprintf(job, " %s alignedtext\n", str); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1g8u7srxnvq1rd50aunp0in6i // static void psgen_ellipse(GVJ_t * job, pointf * A, int filled) public static Object psgen_ellipse(Object... arg) { UNSUPPORTED("2jfirodbjd67iil3z6l362as"); // static void psgen_ellipse(GVJ_t * job, pointf * A, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8tuvacxowvjyekfxkm6dgvp8f"); // /* A[] contains 2 points: the center and corner. */ UNSUPPORTED("6c99ntmslfdjq7lacoxq90io4"); // pointf AA[2]; UNSUPPORTED("9m1ds5xbx68961mur5f3hmoa0"); // AA[0] = A[0]; UNSUPPORTED("ad7su3a8dtyp8cqjizxb1fa0w"); // AA[1].x = A[1].x - A[0].x; UNSUPPORTED("2k9sojs8nidphiuatou9i7dmw"); // AA[1].y = A[1].y - A[0].y; UNSUPPORTED("2ream5c4u1f89xiwzlijg1ydk"); // if (filled && job->obj->fillcolor.u.HSVA[3] > .5) { UNSUPPORTED("ba0yi3he6a0tf9iisvs2r7lud"); // ps_set_color(job, &(job->obj->fillcolor)); UNSUPPORTED("c9ias5z64yrffrtfmr2jmrp6o"); // gvprintpointflist(job, AA, 2); UNSUPPORTED("7gxao5sidmj76sv5nozugni5x"); // gvputs(job, " ellipse_path fill\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5745blic5ogwm4kppw7oweo2d"); // if (job->obj->pencolor.u.HSVA[3] > .5) { UNSUPPORTED("21kugn3mt0fvrcqbct2bxlb7t"); // ps_set_pen_style(job); UNSUPPORTED("axvgzd7tszpjn2lhenmufiumy"); // ps_set_color(job, &(job->obj->pencolor)); UNSUPPORTED("c9ias5z64yrffrtfmr2jmrp6o"); // gvprintpointflist(job, AA, 2); UNSUPPORTED("5zt3wwgax2r40r61om4iuqlfx"); // gvputs(job, " ellipse_path stroke\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dbmkwnmkz2w3ar1495wtjqo79 // static void psgen_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, int arrow_at_end, int filled) public static Object psgen_bezier(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("9fpyhlu20gavb794dxeeud675"); // psgen_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, UNSUPPORTED("e5hr0515188mok0vrr6ri5swt"); // int arrow_at_end, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2bs0wcp6367dz1o5x166ec7l8"); // int j; UNSUPPORTED("2ream5c4u1f89xiwzlijg1ydk"); // if (filled && job->obj->fillcolor.u.HSVA[3] > .5) { UNSUPPORTED("ba0yi3he6a0tf9iisvs2r7lud"); // ps_set_color(job, &(job->obj->fillcolor)); UNSUPPORTED("eb3xzimrw2og0neoowz566azn"); // gvputs(job, "newpath "); UNSUPPORTED("bjs7upob2hu49ojei4bhcfxz7"); // gvprintpointf(job, A[0]); UNSUPPORTED("d8x140qupg29prem26ttu4koj"); // gvputs(job, " moveto\n"); UNSUPPORTED("8wzekl6ndy167eorf6dv1b631"); // for (j = 1; j < n; j += 3) { UNSUPPORTED("3xyqg3mc833hr109cg8gvmv2t"); // gvprintpointflist(job, &A[j], 3); UNSUPPORTED("1m65lci1avkdlwjkxllj4m6gw"); // gvputs(job, " curveto\n"); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("i9jma968ecg2ludmdn9y0lee"); // gvputs(job, "closepath fill\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5745blic5ogwm4kppw7oweo2d"); // if (job->obj->pencolor.u.HSVA[3] > .5) { UNSUPPORTED("21kugn3mt0fvrcqbct2bxlb7t"); // ps_set_pen_style(job); UNSUPPORTED("axvgzd7tszpjn2lhenmufiumy"); // ps_set_color(job, &(job->obj->pencolor)); UNSUPPORTED("eb3xzimrw2og0neoowz566azn"); // gvputs(job, "newpath "); UNSUPPORTED("bjs7upob2hu49ojei4bhcfxz7"); // gvprintpointf(job, A[0]); UNSUPPORTED("d8x140qupg29prem26ttu4koj"); // gvputs(job, " moveto\n"); UNSUPPORTED("8wzekl6ndy167eorf6dv1b631"); // for (j = 1; j < n; j += 3) { UNSUPPORTED("3xyqg3mc833hr109cg8gvmv2t"); // gvprintpointflist(job, &A[j], 3); UNSUPPORTED("1m65lci1avkdlwjkxllj4m6gw"); // gvputs(job, " curveto\n"); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("87zw9vd7draxbwfkbyy134lil"); // gvputs(job, "stroke\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3uv0mikukldcg9dyvrcagotsn // static void psgen_polygon(GVJ_t * job, pointf * A, int n, int filled) public static Object psgen_polygon(Object... arg) { UNSUPPORTED("4qcfsf0li4k9lm1473wfiyl8a"); // static void psgen_polygon(GVJ_t * job, pointf * A, int n, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2bs0wcp6367dz1o5x166ec7l8"); // int j; UNSUPPORTED("2ream5c4u1f89xiwzlijg1ydk"); // if (filled && job->obj->fillcolor.u.HSVA[3] > .5) { UNSUPPORTED("ba0yi3he6a0tf9iisvs2r7lud"); // ps_set_color(job, &(job->obj->fillcolor)); UNSUPPORTED("eb3xzimrw2og0neoowz566azn"); // gvputs(job, "newpath "); UNSUPPORTED("bjs7upob2hu49ojei4bhcfxz7"); // gvprintpointf(job, A[0]); UNSUPPORTED("d8x140qupg29prem26ttu4koj"); // gvputs(job, " moveto\n"); UNSUPPORTED("d3tqpplutqsilsr0svy23b35k"); // for (j = 1; j < n; j++) { UNSUPPORTED("de5j1zrilg6nolqeb004l2e18"); // gvprintpointf(job, A[j]); UNSUPPORTED("2u9oh4cykwgv0xspreoaonj0k"); // gvputs(job, " lineto\n"); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("i9jma968ecg2ludmdn9y0lee"); // gvputs(job, "closepath fill\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5745blic5ogwm4kppw7oweo2d"); // if (job->obj->pencolor.u.HSVA[3] > .5) { UNSUPPORTED("21kugn3mt0fvrcqbct2bxlb7t"); // ps_set_pen_style(job); UNSUPPORTED("axvgzd7tszpjn2lhenmufiumy"); // ps_set_color(job, &(job->obj->pencolor)); UNSUPPORTED("eb3xzimrw2og0neoowz566azn"); // gvputs(job, "newpath "); UNSUPPORTED("bjs7upob2hu49ojei4bhcfxz7"); // gvprintpointf(job, A[0]); UNSUPPORTED("d8x140qupg29prem26ttu4koj"); // gvputs(job, " moveto\n"); UNSUPPORTED("8d369cvojmdwbhvjfm3dy9wci"); // for (j = 1; j < n; j++) { UNSUPPORTED("de5j1zrilg6nolqeb004l2e18"); // gvprintpointf(job, A[j]); UNSUPPORTED("2u9oh4cykwgv0xspreoaonj0k"); // gvputs(job, " lineto\n"); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("94j5qi9ukl2l2ogh7z7dosq32"); // gvputs(job, "closepath stroke\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 emshu7ex2sb49zftzpu7v7nl8 // static void psgen_polyline(GVJ_t * job, pointf * A, int n) public static Object psgen_polyline(Object... arg) { UNSUPPORTED("dzdwhrdgsj0bxjp7f2uws63rf"); // static void psgen_polyline(GVJ_t * job, pointf * A, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2bs0wcp6367dz1o5x166ec7l8"); // int j; UNSUPPORTED("5745blic5ogwm4kppw7oweo2d"); // if (job->obj->pencolor.u.HSVA[3] > .5) { UNSUPPORTED("21kugn3mt0fvrcqbct2bxlb7t"); // ps_set_pen_style(job); UNSUPPORTED("axvgzd7tszpjn2lhenmufiumy"); // ps_set_color(job, &(job->obj->pencolor)); UNSUPPORTED("eb3xzimrw2og0neoowz566azn"); // gvputs(job, "newpath "); UNSUPPORTED("bjs7upob2hu49ojei4bhcfxz7"); // gvprintpointf(job, A[0]); UNSUPPORTED("d8x140qupg29prem26ttu4koj"); // gvputs(job, " moveto\n"); UNSUPPORTED("8d369cvojmdwbhvjfm3dy9wci"); // for (j = 1; j < n; j++) { UNSUPPORTED("de5j1zrilg6nolqeb004l2e18"); // gvprintpointf(job, A[j]); UNSUPPORTED("2u9oh4cykwgv0xspreoaonj0k"); // gvputs(job, " lineto\n"); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("87zw9vd7draxbwfkbyy134lil"); // gvputs(job, "stroke\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2gsov0kt2cm8uz4mmsiy83z46 // static void psgen_comment(GVJ_t * job, char *str) public static Object psgen_comment(Object... arg) { UNSUPPORTED("45z5nair27wr5kf22brmgmms1"); // static void psgen_comment(GVJ_t * job, char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("64ek15nfld1t8q7vi9x33fpvy"); // gvputs(job, "% "); UNSUPPORTED("de7p50zdgdv1ycamcx5ibians"); // gvputs(job, str); UNSUPPORTED("b7eafy5bhxn361xe2c8x8553b"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 f2bghtv809eimejb28i73kzia // static void psgen_library_shape(GVJ_t * job, char *name, pointf * A, int n, int filled) public static Object psgen_library_shape(Object... arg) { UNSUPPORTED("dn0m6cdwn28bcu1u2vmoy1a2c"); // static void psgen_library_shape(GVJ_t * job, char *name, pointf * A, int n, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("2ream5c4u1f89xiwzlijg1ydk"); // if (filled && job->obj->fillcolor.u.HSVA[3] > .5) { UNSUPPORTED("ba0yi3he6a0tf9iisvs2r7lud"); // ps_set_color(job, &(job->obj->fillcolor)); UNSUPPORTED("2p1j7dn4pu0imzbf77mre9k3s"); // gvputs(job, "[ "); UNSUPPORTED("af44mg78omj8g3sx02euas8s"); // gvprintpointflist(job, A, n); UNSUPPORTED("8dk2likbqm43q0p28bspn3ux4"); // gvputs(job, " "); UNSUPPORTED("didklqh38lq2cm8zufhnkjy94"); // gvprintpointf(job, A[0]); UNSUPPORTED("8c4717nsqb9qh1m5pkqxu3nab"); // gvprintf(job, " ] %d true %s\n", n, name); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5745blic5ogwm4kppw7oweo2d"); // if (job->obj->pencolor.u.HSVA[3] > .5) { UNSUPPORTED("21kugn3mt0fvrcqbct2bxlb7t"); // ps_set_pen_style(job); UNSUPPORTED("axvgzd7tszpjn2lhenmufiumy"); // ps_set_color(job, &(job->obj->pencolor)); UNSUPPORTED("a9rnggimah1qzsbj25u9gxjvi"); // gvputs(job, "[ "); UNSUPPORTED("af44mg78omj8g3sx02euas8s"); // gvprintpointflist(job, A, n); UNSUPPORTED("8dk2likbqm43q0p28bspn3ux4"); // gvputs(job, " "); UNSUPPORTED("didklqh38lq2cm8zufhnkjy94"); // gvprintpointf(job, A[0]); UNSUPPORTED("ar45etwgai0wcnglwou25mka6"); // gvprintf(job, " ] %d false %s\n", n, name); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 4f0tedaxz1mg2o27rukecbmjl // static gvrender_engine_t psgen_engine = //1 6mtxeu6btxy3ypxd3uwk9m4s5 // static gvrender_features_t render_features_ps = //1 4tcujj00n5zmmxavjrh1y4cv // static gvdevice_features_t device_features_ps = //1 2fdbmmc7eh40yzthi2e79fs6v // static gvdevice_features_t device_features_eps = //1 8ccgm6294yfcwokwubby9ui9t // gvplugin_installed_t gvrender_ps_types[] = //1 40zb59jhewjfetnd2oqgm1wh7 // gvplugin_installed_t gvdevice_ps_types[] = } plantuml-1.2017.15/src/gen/plugin/core/gvrender_core_svg__c.java000066400000000000000000001262301312650303100244570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.plugin.core; import static smetana.core.Macro.UNSUPPORTED; public class gvrender_core_svg__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 bvcf56ia0p6vpyltaakksum8n // static char *sdasharray = //1 32o9ll4py294p7pqt1k953d4w // static char *sdotarray = //3 827ujd356a39nqzblmaenq91m // static void svg_bzptarray(GVJ_t * job, pointf * A, int n) public static Object svg_bzptarray(Object... arg) { UNSUPPORTED("cazk54t3k9gr91cuy8thjwn1l"); // static void svg_bzptarray(GVJ_t * job, pointf * A, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("wrvu9u7a8j6i6y6552zncxfk"); // char c; UNSUPPORTED("6828kr12yxx3rtky06j9ffxcx"); // c = 'M'; /* first point */ UNSUPPORTED("1vi49g48u2rc9v88yhabta0yw"); // for (i = 0; i < n; i++) { UNSUPPORTED("e6mg6rzvpgtjw4cqzq98shznt"); // gvprintf(job, "%c%g,%g", c, A[i].x, -A[i].y); UNSUPPORTED("82djk3ejfh3b927h8m60dmvut"); // if (i == 0) UNSUPPORTED("96i2xuik7cifcs9jthuh45l7g"); // c = 'C'; /* second point */ UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("5xdp61gfqysw7d4xy1nav6fbf"); // c = ' '; /* remaining points */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ayourvjaaejk97eijt6e5i8v3 // static void svg_print_color(GVJ_t * job, gvcolor_t color) public static Object svg_print_color(Object... arg) { UNSUPPORTED("2fy9dz4og1ebbt4qo1ewgqlj6"); // static void svg_print_color(GVJ_t * job, gvcolor_t color) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1hn9tht7vq6fnuzbw3mgpwl6i"); // switch (color.type) { UNSUPPORTED("8d4tzwdd3f608e3jl4lzyugu0"); // case COLOR_STRING: UNSUPPORTED("13cycml8lfb1s4abkvnuhd8dh"); // gvputs(job, color.u.string); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1ke9k1couoeb4od2nwibgg0xu"); // case RGBA_BYTE: UNSUPPORTED("abau3frv1i9j8mksgb01245yj"); // if (color.u.rgba[3] == 0) /* transparent */ UNSUPPORTED("azlrdflufy5e04p9xhwe83phw"); // gvputs(job, "none"); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("7jq54scftd6wr5k5aefwuq5r4"); // gvprintf(job, "#%02x%02x%02x", UNSUPPORTED("625ktjnk20h4ovl2ahumf26wi"); // color.u.rgba[0], color.u.rgba[1], color.u.rgba[2]); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("3yz4iw4v7mm470if4vb6yaack"); // assert(0); /* internal error */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 ewal0ri6n9uxj2sbig9gocp29 // static void svg_grstyle(GVJ_t * job, int filled, int gid) public static Object svg_grstyle(Object... arg) { UNSUPPORTED("7elkc6m9imb8varjnzb30xb02"); // static void svg_grstyle(GVJ_t * job, int filled, int gid) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("c2x5gho26hata2tuomem5yvki"); // gvputs(job, " fill=\""); UNSUPPORTED("6ix1vu2jcuffbc6bfez9ob1bm"); // if (filled == 2) { UNSUPPORTED("dvtv0kwd2akm1jigbiozoiqw5"); // gvprintf(job, "url(#l_%d)", gid); UNSUPPORTED("efd7920d59k4ry70p4ywahhv7"); // } else if (filled == 3) { UNSUPPORTED("477jazwco6vx5txrrroe5v8z5"); // gvprintf(job, "url(#r_%d)", gid); UNSUPPORTED("1vkwrzn8i2sf7fo7hsb8koiqs"); // } else if (filled) { UNSUPPORTED("4gxgoulqqxervkv6xlv14to0z"); // svg_print_color(job, obj->fillcolor); UNSUPPORTED("7qngwi9a7zbb7rz4n2iflsxnb"); // if (obj->fillcolor.type == RGBA_BYTE UNSUPPORTED("2pteb6b7jxu3tu27ixhdkxkwr"); // && obj->fillcolor.u.rgba[3] > 0 UNSUPPORTED("chj56ql2g9vj2sr7r5vc0ot60"); // && obj->fillcolor.u.rgba[3] < 255) UNSUPPORTED("ckmt75f4ouzjccut0i5hbpjg1"); // gvprintf(job, "\" fill-opacity=\"%f", UNSUPPORTED("deszrkdt62tz6uhj3w9wa76jm"); // ((float) obj->fillcolor.u.rgba[3] / 255.0)); UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("30hha2b9y77pqqb6gvdbgcm43"); // gvputs(job, "none"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5e5xi4p9sv1ne0igfwfygfhru"); // gvputs(job, "\" stroke=\""); UNSUPPORTED("9gt78yg9a3ph8mbbfsrn902ib"); // svg_print_color(job, obj->pencolor); UNSUPPORTED("eeukvd8elh15jnqvrpkyb0m4q"); // if (obj->penwidth != 1.) UNSUPPORTED("4oq6l59kmwm1i8icb12lytqrk"); // gvprintf(job, "\" stroke-width=\"%g", obj->penwidth); UNSUPPORTED("djo67r65tyuacmqc3z1ydjwqz"); // if (obj->pen == PEN_DASHED) { UNSUPPORTED("a4974y0ir8mq99xudu33ptkas"); // gvprintf(job, "\" stroke-dasharray=\"%s", sdasharray); UNSUPPORTED("8lyt1l1t8621bzmtn7js5zd27"); // } else if (obj->pen == PEN_DOTTED) { UNSUPPORTED("427m3m7ogg0sx6ys62nnfa6dl"); // gvprintf(job, "\" stroke-dasharray=\"%s", sdotarray); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9iyzhe3jrf11fsglobdu8z73k"); // if (obj->pencolor.type == RGBA_BYTE && obj->pencolor.u.rgba[3] > 0 UNSUPPORTED("77a9crd4hjv6i9wqpfa5vc90d"); // && obj->pencolor.u.rgba[3] < 255) UNSUPPORTED("mhthumv7lzyftxticeftd06x"); // gvprintf(job, "\" stroke-opacity=\"%f", UNSUPPORTED("89yrujjhfpvunosus21e587nh"); // ((float) obj->pencolor.u.rgba[3] / 255.0)); UNSUPPORTED("37rm205a74loh45pr3ipamp7f"); // gvputs(job, "\""); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 29mng6on9ihwuvj7oo9qtysys // static void svg_comment(GVJ_t * job, char *str) public static Object svg_comment(Object... arg) { UNSUPPORTED("5l1vlrhw8bkx7tct31qeo6151"); // static void svg_comment(GVJ_t * job, char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6944t04aqfgp80pwqjz0owo0u"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6mwdhf5su8dr537zquta04atq // static void svg_begin_job(GVJ_t * job) public static Object svg_begin_job(Object... arg) { UNSUPPORTED("4e7xpfs5qzccui3jexpu1pqoe"); // static void svg_begin_job(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8yytudftst76763qgnjebkzhm"); // char *s; UNSUPPORTED("ayed4u3e3kuzbpmriet6gf3jg"); // gvputs(job, UNSUPPORTED("4gl5ch5bkikklz0xjqvf4kwku"); // "\n"); UNSUPPORTED("dydthgf8fenq2b363w8o1seqw"); // if ((s = agget(job->gvc->g, "stylesheet")) && s[0]) { UNSUPPORTED("eucq5lq6nxhzzmxfzcixi5h4f"); // gvputs(job, "\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("ctj0hnvfmv4c6uy6y5b9bel4o"); // gvputs(job, "\n"); UNSUPPORTED("9e78axv4zzrr2igh04wi6f9t7"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6u4qt4f63eb32j74vgthrvm3k // static void svg_begin_graph(GVJ_t * job) public static Object svg_begin_graph(Object... arg) { UNSUPPORTED("etwt71rr36sz8xg8iwyo3lxpm"); // static void svg_begin_graph(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("86eziot3ia26vo3saxgg09478"); // gvputs(job, "\n", UNSUPPORTED("1ej7utiu4i2qo6za5fe4yt3mk"); // job->pagesArraySize.x * job->pagesArraySize.y); UNSUPPORTED("bvmajkx0qvgcj8bp8btgb0aat"); // gvprintf(job, "width, job->height); UNSUPPORTED("6rttd8yqbzg3ge9sbgwv1rc7f"); // gvprintf(job, " viewBox=\"%.2f %.2f %.2f %.2f\"", UNSUPPORTED("1tgix2fnrgqsbtjao4h5qa8y8"); // job->canvasBox.LL.x, UNSUPPORTED("clzvcjx7z45oixlhix29si3iq"); // job->canvasBox.LL.y, UNSUPPORTED("4l8ealx1li6nrviboxdy946k5"); // job->canvasBox.UR.x, UNSUPPORTED("s6k2ogvbwyc0koya5xkl6qz7"); // job->canvasBox.UR.y); UNSUPPORTED("2bzmoimqon8kjq0pd5r46qm39"); // /* namespace of svg */ UNSUPPORTED("4cefpshby7cvk6nh7o5k9dd1l"); // gvputs(job, " xmlns=\"http://www.w3.org/2000/svg\""); UNSUPPORTED("173phnczur0o8y4nl77tj7w4t"); // /* namespace of xlink */ UNSUPPORTED("26qfcwfkirbk76zvu4fbvw4dg"); // gvputs(job, " xmlns:xlink=\"http://www.w3.org/1999/xlink\""); UNSUPPORTED("8nnf9bugtewncr07cqxfrhd2f"); // gvputs(job, ">\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2hipijo16x18tlxywsjp6iuco // static void svg_end_graph(GVJ_t * job) public static Object svg_end_graph(Object... arg) { UNSUPPORTED("4avti5hfwd5zukwiqponwsj4p"); // static void svg_end_graph(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("67oo7pytz2b3e3mgw1csct2it"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4n6b17byr3am0te4kjrvg0out // static void svg_begin_layer(GVJ_t * job, char *layername, int layerNum, int numLayers) public static Object svg_begin_layer(Object... arg) { UNSUPPORTED("1r9c8oevaa5ry2zdcz0aacjqk"); // static void svg_begin_layer(GVJ_t * job, char *layername, int layerNum, UNSUPPORTED("19krtcvsu8mqw2qgui7bmaa55"); // int numLayers) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a34kpoo0q6rr9pc4et7430a4v"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7t2zqyq53yz5otut6qswu0dwl // static void svg_end_layer(GVJ_t * job) public static Object svg_end_layer(Object... arg) { UNSUPPORTED("944h0psiepf1zvjpjbct7pd04"); // static void svg_end_layer(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3hlnrvjmgpq1q1u2yiwyshlu7"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9xak74k7uwv1dmzpqrrjngk0d // static void svg_begin_page(GVJ_t * job) public static Object svg_begin_page(Object... arg) { UNSUPPORTED("603r99thfc1ydss48z9z4a4xq"); // static void svg_begin_page(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("8idc8bxfl4rmppt1hunj7lyc8"); // /* its really just a page of the graph, but its still a graph, UNSUPPORTED("4ftdfj0v4nvlad96sxezwsljv"); // * and it is the entire graph if we're not currently paging */ UNSUPPORTED("a34kpoo0q6rr9pc4et7430a4v"); // gvputs(job, "id)); UNSUPPORTED("5ad32c614mvtmwco7ib5x86r5"); // gvputs(job, "\" class=\"graph\""); UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("2g7b7oapf1f994y3cbzhwtffs"); // " transform=\"scale(%g %g) rotate(%d) translate(%g %g)\">\n", UNSUPPORTED("5dcg2db7g2mpvt9u2skn5pvza"); // job->scale.x, job->scale.y, -job->rotation, UNSUPPORTED("8bf40j0648ock32z2279j44lw"); // job->translation.x, -job->translation.y); UNSUPPORTED("9ab0b7dzh2g3iqza181l2oauj"); // /* default style */ UNSUPPORTED("a140rb3spyp62aewcsebcj6lz"); // if (agnameof(obj->u.g)[0]) { UNSUPPORTED("5kgm2a3rpk6s37lzlp8n3f1tc"); // gvputs(job, ""); UNSUPPORTED("56224uoiibb4gtpsqio4wdtya"); // gvputs(job, xml_string(agnameof(obj->u.g))); UNSUPPORTED("4rj6l5z1l0bf3ie9wy97io0dl"); // gvputs(job, "\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3lrylfpzwboor5fazs5bzblqy // static void svg_end_page(GVJ_t * job) public static Object svg_end_page(Object... arg) { UNSUPPORTED("a63vtpfz17jfrg1v6k4ithnck"); // static void svg_end_page(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3hlnrvjmgpq1q1u2yiwyshlu7"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1i2x52qcsyl7b2n1uk3xo8bt2 // static void svg_begin_cluster(GVJ_t * job) public static Object svg_begin_cluster(Object... arg) { UNSUPPORTED("5770ni8d11ktmtniojx88vupg"); // static void svg_begin_cluster(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("a34kpoo0q6rr9pc4et7430a4v"); // gvputs(job, "id)); UNSUPPORTED("ak3v9uh54ekp5ra6l7niqmhir"); // gvputs(job, "\" class=\"cluster\">"); UNSUPPORTED("2wuzvoqzbmnfp97tc2ns323h7"); // gvputs(job, ""); UNSUPPORTED("1y1fios3ue07ny9j6953yqqgl"); // gvputs(job, xml_string(agnameof(obj->u.g))); UNSUPPORTED("6c646bxlvxh07x9tspq8c6op6"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 12501qs5dpkc4yvizuoe3oszr // static void svg_end_cluster(GVJ_t * job) public static Object svg_end_cluster(Object... arg) { UNSUPPORTED("bf99mf7m7ypqllj8l88ybolew"); // static void svg_end_cluster(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3hlnrvjmgpq1q1u2yiwyshlu7"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 62sozvxvxh2xvvuz04updxsoj // static void svg_begin_node(GVJ_t * job) public static Object svg_begin_node(Object... arg) { UNSUPPORTED("6kr2t5s0pv6i3wkyf85csih71"); // static void svg_begin_node(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("a34kpoo0q6rr9pc4et7430a4v"); // gvputs(job, "id)); UNSUPPORTED("3t9kr3ms5xoxx12pel4pthxrk"); // if (job->layerNum > 1) UNSUPPORTED("28x41kw3rxtipdm6pxbqd0m0x"); // gvprintf (job, "_%s", xml_string(job->gvc->layerIDs[job->layerNum])); UNSUPPORTED("7brh7599jyc889z01a186atee"); // gvputs(job, "\" class=\"node\">"); UNSUPPORTED("2wuzvoqzbmnfp97tc2ns323h7"); // gvputs(job, ""); UNSUPPORTED("enr2p4c7ke6vme870ssfffrvf"); // gvputs(job, xml_string(agnameof(obj->u.n))); UNSUPPORTED("6c646bxlvxh07x9tspq8c6op6"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2ssu7z7ncurc3v03vezyd70jd // static void svg_end_node(GVJ_t * job) public static Object svg_end_node(Object... arg) { UNSUPPORTED("e42ev4sec4fgoa1lxjoddv9vc"); // static void svg_end_node(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3hlnrvjmgpq1q1u2yiwyshlu7"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4lkaj8kdorw3nudimt40x1p0m // static void svg_begin_edge(GVJ_t * job) public static Object svg_begin_edge(Object... arg) { UNSUPPORTED("5wtieu2gn40jt7gdgind9bf4"); // static void svg_begin_edge(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("6ujcykx18mkszn1x15d0ptd8m"); // char *ename; UNSUPPORTED("a34kpoo0q6rr9pc4et7430a4v"); // gvputs(job, "id)); UNSUPPORTED("62xyzl6khtp7jteidlu55vcar"); // gvputs(job, "\" class=\"edge\">"); UNSUPPORTED("2wuzvoqzbmnfp97tc2ns323h7"); // gvputs(job, ""); UNSUPPORTED("dakm0rgzt870aen1gs4yfkqvm"); // ename = strdup_and_subst_obj("\\E", (void *) (obj->u.e)); UNSUPPORTED("4h38cdc7bvsawzk220q60efus"); // gvputs(job, xml_string(ename)); UNSUPPORTED("1ptaw1megx8o1nxddb9cru8b1"); // free(ename); UNSUPPORTED("6c646bxlvxh07x9tspq8c6op6"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5jbl4ebzw11dwjfx2exyr6twj // static void svg_end_edge(GVJ_t * job) public static Object svg_end_edge(Object... arg) { UNSUPPORTED("9d2i3nxvvtquponlm7cw31rha"); // static void svg_end_edge(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3hlnrvjmgpq1q1u2yiwyshlu7"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 2ls1kg5xerh9e6l4ngof4km0p // static void svg_begin_anchor(GVJ_t * job, char *href, char *tooltip, char *target, char *id) public static Object svg_begin_anchor(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("4y9u0dzkdunolhcze5gpuysob"); // svg_begin_anchor(GVJ_t * job, char *href, char *tooltip, char *target, UNSUPPORTED("6tix47kj9o1r14xs59rhq05qt"); // char *id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("an2ri99x8tiwg2vb9fhwft10s"); // gvputs(job, ""); UNSUPPORTED("amqsywm4tf3cr4mn35bngqsho"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4ddtxxh621w5w7uuokg15lfuk // static void svg_end_anchor(GVJ_t * job) public static Object svg_end_anchor(Object... arg) { UNSUPPORTED("96oojtu8n7eizsc1uma8aeq1f"); // static void svg_end_anchor(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("gdbgsnwooftm30av6d4pf8vp"); // gvputs(job, "\n"); UNSUPPORTED("3hlnrvjmgpq1q1u2yiwyshlu7"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 509rbvnnpffihwcds1q4o4el5 // static void svg_textspan(GVJ_t * job, pointf p, textspan_t * span) public static Object svg_textspan(Object... arg) { UNSUPPORTED("cdh2myddciaij2jg2ygpu0f4d"); // static void svg_textspan(GVJ_t * job, pointf p, textspan_t * span) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("7pxhx3kruwsackat2315zxaxh"); // PostscriptAlias *pA; UNSUPPORTED("boqtrshd5fxyaq9o4qrp6ies"); // char *family = NULL, *weight = NULL, *stretch = NULL, *style = NULL; UNSUPPORTED("f0j3qhox7adw2oktxrx3z6n3b"); // unsigned int flags; UNSUPPORTED("6eq2wimnyond8hhyt7fj62jkq"); // gvputs(job, "just) { UNSUPPORTED("15tf5rbprgr65ucp24e4bba9t"); // case 'l': UNSUPPORTED("256awp1qimuok9dpwcna489jx"); // gvputs(job, " text-anchor=\"start\""); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8pu80wsk8me7q17ensqlviq86"); // case 'r': UNSUPPORTED("eyrb4ojjun5482g8v15qc73r3"); // gvputs(job, " text-anchor=\"end\""); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("37fbny64zwo23oymypyreuldc"); // case 'n': UNSUPPORTED("3023vn5j4xt8ewwp1kfhet7lv"); // gvputs(job, " text-anchor=\"middle\""); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c9qtg5nyqzscz54w8w9mfwv7v"); // p.y += span->yoffset_centerline; UNSUPPORTED("7l5wmvdydbzztglmyvtqj67ac"); // gvprintf(job, " x=\"%g\" y=\"%g\"", p.x, -p.y); UNSUPPORTED("5gvgwpzq8o9hz6bmkphkldr14"); // pA = span->font->postscript_alias; UNSUPPORTED("85v4mh1bambtpopgva0jmspn9"); // if (pA) { UNSUPPORTED("93b89673s4m4oux21ikja33by"); // switch (GD_fontnames(job->gvc->g)) { UNSUPPORTED("7t6u02vcbbp8pgwlv0s475wy7"); // case PSFONTS: UNSUPPORTED("1zo7hx1h667n22l58hefai6xu"); // family = pA->name; UNSUPPORTED("tzy3gy5xrkn2kylegnfq40gx"); // weight = pA->weight; UNSUPPORTED("4biccq2rftoyzak5v0rx6bbua"); // style = pA->style; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("92e0ccltko27a70yl2qkogz66"); // case SVGFONTS: UNSUPPORTED("d29jpipvsssvit4udg5m4rb9z"); // family = pA->svg_font_family; UNSUPPORTED("b7bano7beynz6cdjgdw5p10xh"); // weight = pA->svg_font_weight; UNSUPPORTED("9u0c8t1jl3ksdy4uqeau1ytm9"); // style = pA->svg_font_style; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("1drv0xz8hp34qnf72b4jpprg2"); // default: UNSUPPORTED("8usgbe5tejhe3ynslgkg0pw79"); // case NATIVEFONTS: UNSUPPORTED("e2iij4hncoq1z5mod74s7xb9l"); // family = pA->family; UNSUPPORTED("tzy3gy5xrkn2kylegnfq40gx"); // weight = pA->weight; UNSUPPORTED("4biccq2rftoyzak5v0rx6bbua"); // style = pA->style; UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("apakty8ulxpur721psab8qc25"); // stretch = pA->stretch; UNSUPPORTED("f2ahbdlyhogvxic3wgumxlnx4"); // gvprintf(job, " font-family=\"%s", family); UNSUPPORTED("dlvmrp3zu9by9thsalw30kor9"); // if (pA->svg_font_family) UNSUPPORTED("32af7qmlteybi80xxc5ku3d6c"); // gvprintf(job, ",%s", pA->svg_font_family); UNSUPPORTED("5dipay2vdinr7r0bjdg2vqthj"); // gvputs(job, "\""); UNSUPPORTED("1823tfo3ifqci6w34a3hp2jm3"); // if (weight) UNSUPPORTED("erjhhd4wujeagj8jj8i553pyb"); // gvprintf(job, " font-weight=\"%s\"", weight); UNSUPPORTED("dddcuk8zw7ruwe8def3hcqhq1"); // if (stretch) UNSUPPORTED("1gicoqs8k03tm9i7r2n7yvtaf"); // gvprintf(job, " font-stretch=\"%s\"", stretch); UNSUPPORTED("2k6etsm6v3ivdzk5e818fki9r"); // if (style) UNSUPPORTED("dwa6mvk6ta3fyrds7hknr5e2l"); // gvprintf(job, " font-style=\"%s\"", style); UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else UNSUPPORTED("9rrqjadroq7mnlchw9ylzerl5"); // gvprintf(job, " font-family=\"%s\"", span->font->name); UNSUPPORTED("8pu27ywa7vnvu5xu1c6mfmdcb"); // if ((span->font) && (flags = span->font->flags)) { UNSUPPORTED("7ba191a6p5dly5azwbzrnq45c"); // if ((flags & (1 << 0)) && !weight) UNSUPPORTED("4xpkdz7hajytfllktyx3iaoxg"); // gvprintf(job, " font-weight=\"bold\""); UNSUPPORTED("8hb411ksceuuz5uydsa7vfjfz"); // if ((flags & (1 << 1)) && !style) UNSUPPORTED("ch4ehek8vqzttd65qrzb0wgm5"); // gvprintf(job, " font-style=\"italic\""); UNSUPPORTED("8lsjw9ngsxcsmcngqckbis5rr"); // if ((flags & ((1 << 2)|(1 << 5)|(1 << 6)))) { UNSUPPORTED("5ceh1yy4z3eou7y6sb7daoij0"); // int comma = 0; UNSUPPORTED("4ol2se2oh595cmdhxyppj02k0"); // gvprintf(job, " text-decoration=\""); UNSUPPORTED("5rdoupdxxwd930xga1248jy1j"); // if ((flags & (1 << 2))) { UNSUPPORTED("5pt5lms126q1c044gxn7rma8m"); // gvprintf(job, "underline"); UNSUPPORTED("5cv6nleg9qer8wzue8yj3mhu2"); // comma = 1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("4z5scs2etzrpry6bj0hqsph8v"); // if ((flags & (1 << 6))) { UNSUPPORTED("cipt1c28whuawjgtwpo5bgob3"); // gvprintf(job, "%soverline", (comma?",":"")); UNSUPPORTED("5cv6nleg9qer8wzue8yj3mhu2"); // comma = 1; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } UNSUPPORTED("eqjv5jxaigje1i0o5dz9obtt5"); // if ((flags & (1 << 5))) UNSUPPORTED("29q3ccadncw279yksfy435h8g"); // gvprintf(job, "%sline-through", (comma?",":"")); UNSUPPORTED("8o2uvz97hn60l8j1okfocnsbl"); // gvprintf(job, "\""); UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9m7kf0pwe40hzlub06abvfeh9"); // if ((flags & (1 << 3))) UNSUPPORTED("nr8krq8748jfkd0ispcblf9f"); // gvprintf(job, " baseline-shift=\"super\""); UNSUPPORTED("clacovmef99qjhl0yk3rl7piu"); // if ((flags & (1 << 4))) UNSUPPORTED("1sfxrrei9occxyku20wyj1583"); // gvprintf(job, " baseline-shift=\"sub\""); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("5emn8p1yeoecdhojsizg5m36t"); // gvprintf(job, " font-size=\"%.2f\"", span->font->size); UNSUPPORTED("1ns59jz9xcw8otsxv6kgjgr5e"); // switch (obj->pencolor.type) { UNSUPPORTED("8d4tzwdd3f608e3jl4lzyugu0"); // case COLOR_STRING: UNSUPPORTED("b7fzwqzuy02m4jzy6m43xnpd1"); // if (strcasecmp(obj->pencolor.u.string, "black")) UNSUPPORTED("f4bdj41dxfe9c90otbtpckefx"); // gvprintf(job, " fill=\"%s\"", obj->pencolor.u.string); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1ke9k1couoeb4od2nwibgg0xu"); // case RGBA_BYTE: UNSUPPORTED("8ajndit7j1806751z61j7gfj9"); // gvprintf(job, " fill=\"#%02x%02x%02x\"", UNSUPPORTED("5raiao60ivpnxzihbubbx93ls"); // obj->pencolor.u.rgba[0], obj->pencolor.u.rgba[1], UNSUPPORTED("1y0xlsu8sbuudl5682umhlese"); // obj->pencolor.u.rgba[2]); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("3yz4iw4v7mm470if4vb6yaack"); // assert(0); /* internal error */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("b0wlwv4nycnh5og2scvone3i5"); // gvputs(job, ">"); UNSUPPORTED("b2d727ygdp49jzxj4mltky63u"); // gvputs(job, xml_string0(span->str, NOT(0))); UNSUPPORTED("dmq45ciur1vva2ppfymdb900x"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3gjy3fev22j4mgz0ihk6o8twf // static int svg_gradstyle(GVJ_t * job, pointf * A, int n) public static Object svg_gradstyle(Object... arg) { UNSUPPORTED("2bfo7hixlhvjvrfaafyyg88ar"); // static int svg_gradstyle(GVJ_t * job, pointf * A, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4umvnon5n2rousfurm6sgtb1j"); // pointf G[2]; UNSUPPORTED("c7hjgducl4grlwhjwsinbtcee"); // float angle; UNSUPPORTED("egjk91955uvmmeb20amqowi0s"); // static int gradId; UNSUPPORTED("6fce7laz159a9nfec1weed9tk"); // int id = gradId++; UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("3fni3vsly1h90xeevvu56dkuj"); // angle = obj->gradient_angle * M_PI / 180; //angle of gradient line UNSUPPORTED("2qsw987g3l3zzvlx93ioi4gx2"); // G[0].x = G[0].y = G[1].x = G[1].y = 0.; UNSUPPORTED("3bsktxjgzrewl1tjtpyx52p3f"); // get_gradient_points(A, G, n, angle, 0); //get points on gradient line UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("aq4i0pf82yoa5atdyl1f1efy6"); // "\n\n", G[0].x, UNSUPPORTED("biy1yz3z88ncz02663a4qs5fz"); // G[0].y, G[1].x, G[1].y); UNSUPPORTED("bzb8si8h6dzcj4rpku675ennh"); // if (obj->gradient_frac > 0) UNSUPPORTED("z96xvbayfas7iuiat2o7lacc"); // gvprintf(job, "gradient_frac - 0.001); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("5j0brbmsc3uac75nrnbi7hbjg"); // gvputs(job, "fillcolor); UNSUPPORTED("25yyjy09rw6wj1hem358rrtx5"); // gvputs(job, ";stop-opacity:"); UNSUPPORTED("894falzn9ikb3ugxo7rf30v01"); // if (obj->fillcolor.type == RGBA_BYTE && obj->fillcolor.u.rgba[3] > 0 UNSUPPORTED("7msi3z20gjxrpjeseoycqw22g"); // && obj->fillcolor.u.rgba[3] < 255) UNSUPPORTED("2dbabn5cv0kwtysa1rcpsrcq7"); // gvprintf(job, "%f", ((float) obj->fillcolor.u.rgba[3] / 255.0)); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("czmoa1w0n08fmcmgutwcr3apz"); // gvputs(job, "1."); UNSUPPORTED("dy96k8bewexhluplfg196pr0c"); // gvputs(job, ";\"/>\n"); UNSUPPORTED("bzb8si8h6dzcj4rpku675ennh"); // if (obj->gradient_frac > 0) UNSUPPORTED("5vmqn1vuq3rb8jtl78xdov7zm"); // gvprintf(job, "gradient_frac); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("3nhcni3eauuet4n0oul1y75zp"); // gvputs(job, "stopcolor); UNSUPPORTED("25yyjy09rw6wj1hem358rrtx5"); // gvputs(job, ";stop-opacity:"); UNSUPPORTED("69jkl15qlmjhgsrh61j09jxp9"); // if (obj->stopcolor.type == RGBA_BYTE && obj->stopcolor.u.rgba[3] > 0 UNSUPPORTED("5yvxwp3rfgj1z2d6dri2q83cx"); // && obj->stopcolor.u.rgba[3] < 255) UNSUPPORTED("bivsghea127ronz4jnplynoy"); // gvprintf(job, "%f", ((float) obj->stopcolor.u.rgba[3] / 255.0)); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("czmoa1w0n08fmcmgutwcr3apz"); // gvputs(job, "1."); UNSUPPORTED("1iszsyeqv6zyj3zb7w2pfpu4i"); // gvputs(job, ";\"/>\n\n\n"); UNSUPPORTED("8jjtthatl5k37wbc9wfeogjct"); // return id; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 67ww4214261qqk7os79dnxb91 // static int svg_rgradstyle(GVJ_t * job, pointf * A, int n) public static Object svg_rgradstyle(Object... arg) { UNSUPPORTED("2qd44o0nwqzg9a83ie5f868kk"); // static int svg_rgradstyle(GVJ_t * job, pointf * A, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("anwmj45eahbja1x9uwxa4z67q"); // /* pointf G[2]; */ UNSUPPORTED("c7hjgducl4grlwhjwsinbtcee"); // float angle; UNSUPPORTED("1gwihowmrjihhujhiqo20snqq"); // int ifx, ify; UNSUPPORTED("1v43j91cccrl5r4pl30a68se3"); // static int rgradId; UNSUPPORTED("bg4c10jkjriorbj66ijiyhvh0"); // int id = rgradId++; UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("3fni3vsly1h90xeevvu56dkuj"); // angle = obj->gradient_angle * M_PI / 180; //angle of gradient line UNSUPPORTED("a7sn2w4y0sbdrtnmup718yxk2"); // /* G[0].x = G[0].y = G[1].x = G[1].y; */ UNSUPPORTED("ea160wg5wxr6lqtaddejmsqka"); // /* get_gradient_points(A, G, n, 0, 1); */ UNSUPPORTED("ylvjn4yu1p8yxux37vu789na"); // if (angle == 0.) { UNSUPPORTED("2izgqowow6pmwmv27fiva3tvz"); // ifx = ify = 50; UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("aum9vd35r7s7f9use8zf38z9k"); // ifx = 50 * (1 + cos(angle)); UNSUPPORTED("cm03wwy8l2b9wnla83wnp3msr"); // ify = 50 * (1 - sin(angle)); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("a8yoal1dchk0nt5nro0jh2f29"); // gvprintf(job, UNSUPPORTED("14gmgrq5aclflj13s6zyh43is"); // "\n\n", UNSUPPORTED("l5wr5d3d8joaguf800asanct"); // id, ifx, ify); UNSUPPORTED("8ado4ojlrd7ipx162vau7fxvx"); // gvputs(job, "fillcolor); UNSUPPORTED("25yyjy09rw6wj1hem358rrtx5"); // gvputs(job, ";stop-opacity:"); UNSUPPORTED("894falzn9ikb3ugxo7rf30v01"); // if (obj->fillcolor.type == RGBA_BYTE && obj->fillcolor.u.rgba[3] > 0 UNSUPPORTED("7msi3z20gjxrpjeseoycqw22g"); // && obj->fillcolor.u.rgba[3] < 255) UNSUPPORTED("2dbabn5cv0kwtysa1rcpsrcq7"); // gvprintf(job, "%f", ((float) obj->fillcolor.u.rgba[3] / 255.0)); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("czmoa1w0n08fmcmgutwcr3apz"); // gvputs(job, "1."); UNSUPPORTED("dy96k8bewexhluplfg196pr0c"); // gvputs(job, ";\"/>\n"); UNSUPPORTED("2ciprtix75p6n1rvrofzer09k"); // gvputs(job, "stopcolor); UNSUPPORTED("25yyjy09rw6wj1hem358rrtx5"); // gvputs(job, ";stop-opacity:"); UNSUPPORTED("69jkl15qlmjhgsrh61j09jxp9"); // if (obj->stopcolor.type == RGBA_BYTE && obj->stopcolor.u.rgba[3] > 0 UNSUPPORTED("5yvxwp3rfgj1z2d6dri2q83cx"); // && obj->stopcolor.u.rgba[3] < 255) UNSUPPORTED("bivsghea127ronz4jnplynoy"); // gvprintf(job, "%f", ((float) obj->stopcolor.u.rgba[3] / 255.0)); UNSUPPORTED("div10atae09n36x269sl208r1"); // else UNSUPPORTED("czmoa1w0n08fmcmgutwcr3apz"); // gvputs(job, "1."); UNSUPPORTED("82y1ud8efmpl12973l04ba0xk"); // gvputs(job, ";\"/>\n\n\n"); UNSUPPORTED("8jjtthatl5k37wbc9wfeogjct"); // return id; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6179wcbuyu90qz6rpi6mgppxr // static void svg_ellipse(GVJ_t * job, pointf * A, int filled) public static Object svg_ellipse(Object... arg) { UNSUPPORTED("aeulny0gu30zb5sbdc2fb6i8q"); // static void svg_ellipse(GVJ_t * job, pointf * A, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("5n5mg10ujef23pj2i3tfg98mb"); // int gid = 0; UNSUPPORTED("8tuvacxowvjyekfxkm6dgvp8f"); // /* A[] contains 2 points: the center and corner. */ UNSUPPORTED("6ix1vu2jcuffbc6bfez9ob1bm"); // if (filled == 2) { UNSUPPORTED("408j2y19ppayrgj8rcylk5uej"); // gid = svg_gradstyle(job, A, 2); UNSUPPORTED("1f3u2rbrimcdejw1fhkimfmtq"); // } else if (filled == (3)) { UNSUPPORTED("17dijdtidp3dm9zedxik5pte8"); // gid = svg_rgradstyle(job, A, 2); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("prza2073gtuthtmkfaeasaom"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4voh5pqlltjszwhlaqt8qc6h // static void svg_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, int arrow_at_end, int filled) public static Object svg_bezier(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("4b2sf54o9xlmuusu6iujw6tzo"); // svg_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, UNSUPPORTED("dxw18xwwo4n9p0pz03h53njzw"); // int arrow_at_end, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bva9x0qdlhvut574wqidcp51o"); // int gid = 0; UNSUPPORTED("6ix1vu2jcuffbc6bfez9ob1bm"); // if (filled == 2) { UNSUPPORTED("336pt1lxutdhk6cn1yrrnb31g"); // gid = svg_gradstyle(job, A, n); UNSUPPORTED("1f3u2rbrimcdejw1fhkimfmtq"); // } else if (filled == (3)) { UNSUPPORTED("7ykd3tlli3mnnab2q0uiotvhd"); // gid = svg_rgradstyle(job, A, n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2wytgj2mvbp924ox0n93mx0s2"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7ibkd0we1erd0sjwcq0769ynl // static void svg_polygon(GVJ_t * job, pointf * A, int n, int filled) public static Object svg_polygon(Object... arg) { UNSUPPORTED("bs95s3hzmbofgepmna889krqu"); // static void svg_polygon(GVJ_t * job, pointf * A, int n, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9rv93hlp64hdng1p33rot7lfv"); // int i, gid = 0; UNSUPPORTED("6ix1vu2jcuffbc6bfez9ob1bm"); // if (filled == 2) { UNSUPPORTED("336pt1lxutdhk6cn1yrrnb31g"); // gid = svg_gradstyle(job, A, n); UNSUPPORTED("1f3u2rbrimcdejw1fhkimfmtq"); // } else if (filled == (3)) { UNSUPPORTED("7ykd3tlli3mnnab2q0uiotvhd"); // gid = svg_rgradstyle(job, A, n); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("78z961zddfij8pb5rmwl4n2tm"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c8rn5juypta39ccw5pbh8pk49 // static void svg_polyline(GVJ_t * job, pointf * A, int n) public static Object svg_polyline(Object... arg) { UNSUPPORTED("38urwxhvfthoaqtp3stv44nr7"); // static void svg_polyline(GVJ_t * job, pointf * A, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("6g8w45vwmydzwnarkgxk5lr6g"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 b9hjnmz91lrhcgjntnr3pxxg8 // static char *svg_knowncolors[] = //1 4e1dh88puzpsk9gnuuog4v6n // gvrender_engine_t svg_engine = //1 eaglivfetg4iko7wbadzatuu1 // gvrender_features_t render_features_svg = //1 4n103oc5z61rm55i81psizksi // gvdevice_features_t device_features_svg = //1 bd33dnvj2ff9ha2832sa7e0u8 // gvdevice_features_t device_features_svgz = //1 c8ccvawathznbo5pws5jwz6q0 // gvplugin_installed_t gvrender_svg_types[] = //1 3g6v0vqqku0vco0few4b26in8 // gvplugin_installed_t gvdevice_svg_types[] = } plantuml-1.2017.15/src/gen/plugin/core/gvrender_core_tk__c.java000066400000000000000000000642411312650303100243010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.plugin.core; import static smetana.core.Macro.UNSUPPORTED; public class gvrender_core_tk__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //3 vnba6ctep0vnompe5n04xa3l // static char *tkgen_string(char *s) public static Object tkgen_string(Object... arg) { UNSUPPORTED("aa32h5bkponzvoqtod1mva7ps"); // static char *tkgen_string(char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("3y6wj3ntgmr1qkdpm7wp1dsch"); // return s; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dplaa6pgfnvndktf7zizb0dd9 // static void tkgen_print_color(GVJ_t * job, gvcolor_t color) public static Object tkgen_print_color(Object... arg) { UNSUPPORTED("2038ixzt93lz5npkbq5uh0qwr"); // static void tkgen_print_color(GVJ_t * job, gvcolor_t color) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1hn9tht7vq6fnuzbw3mgpwl6i"); // switch (color.type) { UNSUPPORTED("8d4tzwdd3f608e3jl4lzyugu0"); // case COLOR_STRING: UNSUPPORTED("13cycml8lfb1s4abkvnuhd8dh"); // gvputs(job, color.u.string); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1ke9k1couoeb4od2nwibgg0xu"); // case RGBA_BYTE: UNSUPPORTED("bk6hmzzce8zu1dqkcetedyx8a"); // if (color.u.rgba[3] == 0) /* transparent */ UNSUPPORTED("cqkxybfy03p6sdzaw403x4anw"); // gvputs(job, "\"\""); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("7jq54scftd6wr5k5aefwuq5r4"); // gvprintf(job, "#%02x%02x%02x", UNSUPPORTED("e0jr1wda5b2t6n9g1aas984rf"); // color.u.rgba[0], color.u.rgba[1], color.u.rgba[2]); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("3yz4iw4v7mm470if4vb6yaack"); // assert(0); /* internal error */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7fftf2s66s7nkjfvfwqxq2wri // static void tkgen_print_tags(GVJ_t *job) public static Object tkgen_print_tags(Object... arg) { UNSUPPORTED("5rwzkk8kjevk7s1e5igx8wikf"); // static void tkgen_print_tags(GVJ_t *job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("6fmxub3a5s4yqhi6k71lbbewx"); // char *ObjType; UNSUPPORTED("36c1s92uv6tfwjm89w624ibxa"); // unsigned int ObjId; UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("e6yyipvortaqhjfzpnfvdaea6"); // int ObjFlag; UNSUPPORTED("9kqeoqv8k67h4o1r0zmzcpja4"); // switch (obj->emit_state) { UNSUPPORTED("edn2txxwkd2kmwwo2dgazo6hg"); // case EMIT_NDRAW: UNSUPPORTED("9wmdny2syd27ay1uhzyj36k2k"); // ObjType = "node"; UNSUPPORTED("3x8av8kig5q0u8qayofbq7ao5"); // ObjFlag = 1; UNSUPPORTED("4lrn04rxio5vdym9mvu96uakv"); // ObjId = AGSEQ(obj->u.n); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("3dkus0mrhy1dxovvhot9s7zc4"); // case EMIT_NLABEL: UNSUPPORTED("9wmdny2syd27ay1uhzyj36k2k"); // ObjType = "node"; UNSUPPORTED("arrey7e5x7t7ug3fcbir0h99f"); // ObjFlag = 0; UNSUPPORTED("4lrn04rxio5vdym9mvu96uakv"); // ObjId = AGSEQ(obj->u.n); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("ddijyz6xr6xxiji0xwi84qsq1"); // case EMIT_EDRAW: UNSUPPORTED("2zes9o0ykhutqmeeyeizb6sw6"); // case EMIT_TDRAW: UNSUPPORTED("f4ax0wnfz42m0mvpo8ov4uwgj"); // case EMIT_HDRAW: UNSUPPORTED("ekq5izr299kjgtxohtoayjuay"); // ObjType = "edge"; UNSUPPORTED("3x8av8kig5q0u8qayofbq7ao5"); // ObjFlag = 1; UNSUPPORTED("2n6su1jan1lfwl3bv3vpvtf2m"); // ObjId = AGSEQ(obj->u.e); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("82u5g3c6sjjwnob1gwc3bumud"); // case EMIT_ELABEL: UNSUPPORTED("5a42wk0iyr9uwqezh67ujkaci"); // case EMIT_TLABEL: UNSUPPORTED("bgniadjg8rn6697mbbbrtdj46"); // case EMIT_HLABEL: UNSUPPORTED("ekq5izr299kjgtxohtoayjuay"); // ObjType = "edge"; UNSUPPORTED("arrey7e5x7t7ug3fcbir0h99f"); // ObjFlag = 0; UNSUPPORTED("2n6su1jan1lfwl3bv3vpvtf2m"); // ObjId = AGSEQ(obj->u.e); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("eoday7rklu6k6yz10yospl4fm"); // case EMIT_GDRAW: UNSUPPORTED("8kzghiwhkdmm0vv0aph5lnl24"); // ObjType = "graph"; UNSUPPORTED("3x8av8kig5q0u8qayofbq7ao5"); // ObjFlag = 1; UNSUPPORTED("caivixbej5pdp5nezbwnt2ncp"); // ObjId = -1; /* hack! */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("bs2bx2mdpt81ogx6xg3uu2tmf"); // case EMIT_GLABEL: UNSUPPORTED("arrey7e5x7t7ug3fcbir0h99f"); // ObjFlag = 0; UNSUPPORTED("3gtg1b09awmbttihqzq7we0yl"); // ObjType = "graph label"; UNSUPPORTED("caivixbej5pdp5nezbwnt2ncp"); // ObjId = -1; /* hack! */ UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("5mi2jlcl1mkxh27aq4swcrvsd"); // case EMIT_CDRAW: UNSUPPORTED("8kzghiwhkdmm0vv0aph5lnl24"); // ObjType = "graph"; UNSUPPORTED("3x8av8kig5q0u8qayofbq7ao5"); // ObjFlag = 1; UNSUPPORTED("3019wv5sfqax6te4ocvlvdik2"); // ObjId = AGSEQ(obj->u.sg); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("2g9uft4wkkmqft2kfgbtkig71"); // case EMIT_CLABEL: UNSUPPORTED("8kzghiwhkdmm0vv0aph5lnl24"); // ObjType = "graph"; UNSUPPORTED("arrey7e5x7t7ug3fcbir0h99f"); // ObjFlag = 0; UNSUPPORTED("3019wv5sfqax6te4ocvlvdik2"); // ObjId = AGSEQ(obj->u.sg); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("b844if1dn4kjcevyd28kssy2e"); // assert (0); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("55znmxgknag5qirkz1z6lpksh"); // gvprintf(job, " -tags {%d%s%d}", ObjFlag, ObjType, ObjId); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6oyiwbg0tt965z8czwrybx7sk // static void tkgen_canvas(GVJ_t * job) public static Object tkgen_canvas(Object... arg) { UNSUPPORTED("3jvfz8f5qzwiglrakhy83umfp"); // static void tkgen_canvas(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("9h891dv6xzcbe003pt2da6zaa"); // if (job->external_context) UNSUPPORTED("5qodxedfoew7wk6n6u7a55eoy"); // gvputs(job, job->imagedata); UNSUPPORTED("axam71d21fg4esy4zqklfrwm4"); // else UNSUPPORTED("2vrpkklffbp4w437thim0u8b7"); // gvputs(job, "$c"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 234xlyukcgtfrl83jcxd9lago // static void tkgen_comment(GVJ_t * job, char *str) public static Object tkgen_comment(Object... arg) { UNSUPPORTED("2280389c7mo073ymgoiqe9zc7"); // static void tkgen_comment(GVJ_t * job, char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ea77c3tz79kbzzy6ixp1d2kh4"); // gvputs(job, "# "); UNSUPPORTED("5q62ijbcsw35n264ivjfulqvt"); // gvputs(job, tkgen_string(str)); UNSUPPORTED("b7eafy5bhxn361xe2c8x8553b"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9fhmin70b5qf04bp9t3gp6ql5 // static void tkgen_begin_job(GVJ_t * job) public static Object tkgen_begin_job(Object... arg) { UNSUPPORTED("7099eur0jsw3fx3t04i009op4"); // static void tkgen_begin_job(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8phrhbpt3gwyqfay75nnt01sn"); // gvputs(job, "# Generated by "); UNSUPPORTED("4fmowhw6woxnz0yfmf7ihnv5w"); // gvputs(job, tkgen_string(job->common->info[0])); UNSUPPORTED("cx22tlhx29vhu1t7qu0qa4qq7"); // gvputs(job, " version "); UNSUPPORTED("71t1hukev4nj9d5vgu67aecnu"); // gvputs(job, tkgen_string(job->common->info[1])); UNSUPPORTED("85rsmmnqjhjgun71czh20mlqf"); // gvputs(job, " ("); UNSUPPORTED("eq1ksgr2y9k7jkdl3l5fx2dxr"); // gvputs(job, tkgen_string(job->common->info[2])); UNSUPPORTED("2e9opn4z98non8389n3x7cvfj"); // gvputs(job, ")\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bidf6nln7jad77uyvyjiwsahj // static void tkgen_begin_graph(GVJ_t * job) public static Object tkgen_begin_graph(Object... arg) { UNSUPPORTED("c66a3xz9acxwt162a2639p0kf"); // static void tkgen_begin_graph(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("bf5z85r4dnnsytsyyw7t3gx6o"); // gvputs(job, "#"); UNSUPPORTED("a140rb3spyp62aewcsebcj6lz"); // if (agnameof(obj->u.g)[0]) { UNSUPPORTED("dzpnxf48rus9qbb0ks0h8dqd1"); // gvputs(job, " Title: "); UNSUPPORTED("aqk6vyc91z34ikxpps386o2gb"); // gvputs(job, tkgen_string(agnameof(obj->u.g))); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9zpqzsstpmkb5v40kv0rt86rx"); // gvprintf(job, " Pages: %d\n", job->pagesArraySize.x * job->pagesArraySize.y); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 578fx153hsm0thk9yst8xsav // static int first_periphery //3 3y0ogli6wn5tiuel1z0cdvpmp // static void tkgen_begin_node(GVJ_t * job) public static Object tkgen_begin_node(Object... arg) { UNSUPPORTED("65n9qvpouyi5n69pxqhy3ly5j"); // static void tkgen_begin_node(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ekl6yorur1ahi50axky7lyawh"); // first_periphery = 1; /* FIXME - this is an ugly hack! */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 48o8qk8mdvwx737vbohxu80s6 // static void tkgen_begin_edge(GVJ_t * job) public static Object tkgen_begin_edge(Object... arg) { UNSUPPORTED("4jelx905puajzw3pw79wr399g"); // static void tkgen_begin_edge(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("8rousoe1k1rgca46ysx8k11n9"); // first_periphery = -1; /* FIXME - this is an ugly ugly hack! Need this one for arrowheads. */ UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 elok7zvfwcod280ol1ewx7xi6 // static void tkgen_textspan(GVJ_t * job, pointf p, textspan_t * span) public static Object tkgen_textspan(Object... arg) { UNSUPPORTED("ctbqa72rfic93u34n0vcy070n"); // static void tkgen_textspan(GVJ_t * job, pointf p, textspan_t * span) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("2eltcrenufen27upw0otuj5rg"); // const char *font; UNSUPPORTED("7pxhx3kruwsackat2315zxaxh"); // PostscriptAlias *pA; UNSUPPORTED("cav0e7ncloqss0hsvc4fyfi7s"); // int size; UNSUPPORTED("t8jc65c5jcpqdkfpg4fjb8u4"); // if (obj->pen != PEN_NONE) { UNSUPPORTED("jmu515qulcvrabiwjcvrcc3z"); // /* determine font size */ UNSUPPORTED("27qmq4a14tm7p6a47yf7m6bwl"); // /* round fontsize down, better too small than too big */ UNSUPPORTED("d6wfbdo0cro4b8en0ny4b4zn0"); // size = (int)(span->font->size * job->zoom); UNSUPPORTED("2jso8vydmg40ljyk6riyesqpe"); // /* don't even bother if fontsize < 1 point */ UNSUPPORTED("4ek995evzufhzop2kinw7g53o"); // if (size) { UNSUPPORTED("9g1m3v4tgit2cudtd1mdwt6ui"); // tkgen_canvas(job); UNSUPPORTED("efw4q0zbq8bz1zbek9qh8r362"); // gvputs(job, " create text "); UNSUPPORTED("6z6wkidq5hq6evjicc4xdclir"); // p.y -= size * 0.55; /* cl correction */ UNSUPPORTED("2v1yrsn7wzpnae01zojw8d7no"); // gvprintpointf(job, p); UNSUPPORTED("786rbjesnuuzbso73vd0nop0m"); // gvputs(job, " -text {"); UNSUPPORTED("3rqoe86bgahp689yo06e13tg9"); // gvputs(job, span->str); UNSUPPORTED("c5daf8oxiupwtbg0xqvnmhcja"); // gvputs(job, "}"); UNSUPPORTED("eyrt0ozexqiogwfvx6afjau6i"); // gvputs(job, " -fill "); UNSUPPORTED("2g5b6wr0r6zs9h8szn82kzlwh"); // tkgen_print_color(job, obj->pencolor); UNSUPPORTED("2f348xbokrc8ke8cqvx1n8r8t"); // gvputs(job, " -font {"); UNSUPPORTED("9sp1k6nk7qgspuoh1fsykad1d"); // /* tk doesn't like PostScript font names like "Times-Roman" */ UNSUPPORTED("3fgue2b4or4v2ea9156z83s40"); // /* so use family names */ UNSUPPORTED("8hnpk6w2tpf5af6930s0fwjzv"); // pA = span->font->postscript_alias; UNSUPPORTED("25qpoikp60eudd2s2rx82m4nz"); // if (pA) UNSUPPORTED("8jg0mf1p0gcs81yus1o9buib3"); // font = pA->family; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("blasxdo35r0ck273xhl4rt9aq"); // font = span->font->name; UNSUPPORTED("eec8oj7b6e89hy8dovtjq79l3"); // gvputs(job, "\""); UNSUPPORTED("bfjoee7kusanzqqsijx9fv8e3"); // gvputs(job, font); UNSUPPORTED("eec8oj7b6e89hy8dovtjq79l3"); // gvputs(job, "\""); UNSUPPORTED("3iim7kn92kmgyv6y3ksj64yts"); // /* use -ve fontsize to indicate pixels - see "man n font" */ UNSUPPORTED("1npabltzbojkssc7y6zaax68z"); // gvprintf(job, " %d}", size); UNSUPPORTED("aa77x3rwsgl9w2j4emr2slvvg"); // switch (span->just) { UNSUPPORTED("dva9utlw6mjaqopti10jmbumi"); // case 'l': UNSUPPORTED("3axfyb1v0b6zx9rpx0zk823t8"); // gvputs(job, " -anchor w"); UNSUPPORTED("d1pumbibe8xz2i7gr1wj6zdak"); // break; UNSUPPORTED("8t43r13dsz4v58jm5myew417n"); // case 'r': UNSUPPORTED("21sml808kswrqs8l2ia7cc6lw"); // gvputs(job, " -anchor e"); UNSUPPORTED("d1pumbibe8xz2i7gr1wj6zdak"); // break; UNSUPPORTED("84cl4r6uveabh1lahtyw0ptb8"); // default: UNSUPPORTED("9szdbf50c5ed9xajhvikui4o6"); // case 'n': UNSUPPORTED("d1pumbibe8xz2i7gr1wj6zdak"); // break; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("2il2s87ajd09islkh7e2kirpo"); // tkgen_print_tags(job); UNSUPPORTED("5uq09elejy2ot3s8x5d13dxs9"); // gvputs(job, "\n"); UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3g3c5t15h39grskbujipsb3n7 // static void tkgen_ellipse(GVJ_t * job, pointf * A, int filled) public static Object tkgen_ellipse(Object... arg) { UNSUPPORTED("5092mqkkvnba8iben6dh14iz5"); // static void tkgen_ellipse(GVJ_t * job, pointf * A, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r; UNSUPPORTED("t8jc65c5jcpqdkfpg4fjb8u4"); // if (obj->pen != PEN_NONE) { UNSUPPORTED("dm4570wcyjb3rox4itsi86l1q"); // /* A[] contains 2 points: the center and top right corner. */ UNSUPPORTED("5s8l5jhamrhlmzhbxbollx0ce"); // r.x = A[1].x - A[0].x; UNSUPPORTED("5xe23krn77wrf3q2cnb8tid6u"); // r.y = A[1].y - A[0].y; UNSUPPORTED("42w8f4syzoodosc4lqh7zdhf6"); // A[0].x -= r.x; UNSUPPORTED("8v0iqqzghk3op67s3lqog6ehb"); // A[0].y -= r.y; UNSUPPORTED("cpyq52t64pblc9nfne0q9tzvv"); // tkgen_canvas(job); UNSUPPORTED("897mq76heyo6hgxh4e95wy9zi"); // gvputs(job, " create oval "); UNSUPPORTED("cxoxxyz7qmjvft5cr1rcjstyo"); // gvprintpointflist(job, A, 2); UNSUPPORTED("cfzbaouamgyduscf63lup4oww"); // gvputs(job, " -fill "); UNSUPPORTED("2r3o5gud8djix2uwr2zk2pvtr"); // if (filled) UNSUPPORTED("in3qxhb278ephlrwa1dj9da8"); // tkgen_print_color(job, obj->fillcolor); UNSUPPORTED("1zsbuj1o3uaqqaqgzt5q0kcs"); // else if (first_periphery) UNSUPPORTED("1q9z405druym0tb73iu7wgsbj"); // /* tk ovals default to no fill, some fill UNSUPPORTED("aeswylfea9yhqvz6vm9o2vu8l"); // * is necessary else "canvas find overlapping" doesn't UNSUPPORTED("mj4s48s0gyalklfrcrgpxdol"); // * work as expected, use white instead */ UNSUPPORTED("vh2rv9mnbc28spfzs8cyaoar"); // gvputs(job, "white"); UNSUPPORTED("df5svfeo1imlc8qm6azeqkkmh"); // else UNSUPPORTED("cqkxybfy03p6sdzaw403x4anw"); // gvputs(job, "\"\""); UNSUPPORTED("67pmynbmmb156i27d3hh6z2lm"); // if (first_periphery == 1) UNSUPPORTED("beq2s7wwrxfrqoschrxojlq3"); // first_periphery = 0; UNSUPPORTED("5d33cl4ogs78yvw2i75icg9g6"); // gvputs(job, " -width "); UNSUPPORTED("9lzl69uuazscmin8fqgbic818"); // gvprintdouble(job, obj->penwidth); UNSUPPORTED("4cpwr3m94g1ys1g7qno3p7770"); // gvputs(job, " -outline "); UNSUPPORTED("b1kdoymo0peu76atwvwlvppxm"); // tkgen_print_color(job, obj->pencolor); UNSUPPORTED("7ljsiyfswf1fyq7u5u5meig9b"); // if (obj->pen == PEN_DASHED) UNSUPPORTED("48ujmq20gr1bcmnb9x7qstuon"); // gvputs(job, " -dash 5"); UNSUPPORTED("qz536d4xx8biptvgrkpjg3wo"); // if (obj->pen == PEN_DOTTED) UNSUPPORTED("nxz0zcvg2vp69h2k4vz0zxjo"); // gvputs(job, " -dash 2"); UNSUPPORTED("7xbsyhpezhbss8vlckn2p77i7"); // tkgen_print_tags(job); UNSUPPORTED("427r2p9r3ymmxp5p69rt99ymp"); // gvputs(job, "\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eeajnb6p79ncip1c7g31tb6ig // static void tkgen_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, int arrow_at_end, int filled) public static Object tkgen_bezier(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("3iwjodya57audhxb7vhl6mtnt"); // tkgen_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, UNSUPPORTED("77j21vz8ekimnj6b6uefavtz2"); // int arrow_at_end, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("t8jc65c5jcpqdkfpg4fjb8u4"); // if (obj->pen != PEN_NONE) { UNSUPPORTED("cpyq52t64pblc9nfne0q9tzvv"); // tkgen_canvas(job); UNSUPPORTED("bb6nsdbnte9p73wmrdar55mb7"); // gvputs(job, " create line "); UNSUPPORTED("af44mg78omj8g3sx02euas8s"); // gvprintpointflist(job, A, n); UNSUPPORTED("cfzbaouamgyduscf63lup4oww"); // gvputs(job, " -fill "); UNSUPPORTED("8lreipxfzo9h2hdub9byfimmx"); // tkgen_print_color(job, obj->pencolor); UNSUPPORTED("5d33cl4ogs78yvw2i75icg9g6"); // gvputs(job, " -width "); UNSUPPORTED("9lzl69uuazscmin8fqgbic818"); // gvprintdouble(job, obj->penwidth); UNSUPPORTED("7ljsiyfswf1fyq7u5u5meig9b"); // if (obj->pen == PEN_DASHED) UNSUPPORTED("48ujmq20gr1bcmnb9x7qstuon"); // gvputs(job, " -dash 5"); UNSUPPORTED("qz536d4xx8biptvgrkpjg3wo"); // if (obj->pen == PEN_DOTTED) UNSUPPORTED("nxz0zcvg2vp69h2k4vz0zxjo"); // gvputs(job, " -dash 2"); UNSUPPORTED("3rjk6ae9vk516ajz9hz4fr70p"); // gvputs(job, " -smooth bezier "); UNSUPPORTED("7xbsyhpezhbss8vlckn2p77i7"); // tkgen_print_tags(job); UNSUPPORTED("427r2p9r3ymmxp5p69rt99ymp"); // gvputs(job, "\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 d9qc2t2e84r1dyjrjh9lvaaqc // static void tkgen_polygon(GVJ_t * job, pointf * A, int n, int filled) public static Object tkgen_polygon(Object... arg) { UNSUPPORTED("17wb4p46hmuuq5j0pxtx7ui5x"); // static void tkgen_polygon(GVJ_t * job, pointf * A, int n, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("t8jc65c5jcpqdkfpg4fjb8u4"); // if (obj->pen != PEN_NONE) { UNSUPPORTED("cpyq52t64pblc9nfne0q9tzvv"); // tkgen_canvas(job); UNSUPPORTED("1sccvd9iuqc3n3fkzk810g0y"); // gvputs(job, " create polygon "); UNSUPPORTED("af44mg78omj8g3sx02euas8s"); // gvprintpointflist(job, A, n); UNSUPPORTED("cfzbaouamgyduscf63lup4oww"); // gvputs(job, " -fill "); UNSUPPORTED("2r3o5gud8djix2uwr2zk2pvtr"); // if (filled) UNSUPPORTED("in3qxhb278ephlrwa1dj9da8"); // tkgen_print_color(job, obj->fillcolor); UNSUPPORTED("1zsbuj1o3uaqqaqgzt5q0kcs"); // else if (first_periphery) UNSUPPORTED("b9wx5iz0yfgk23y63056w64g8"); // /* tk polygons default to black fill, some fill UNSUPPORTED("85jmgncgec9epxj3v03qzl4x6"); // * is necessary else "canvas find overlapping" doesn't UNSUPPORTED("aorsjpcyvmasihruyarjm4f8p"); // * work as expected, use white instead */ UNSUPPORTED("3jjudqx9sb6o5u51zdnpfjf9q"); // gvputs(job, "white"); UNSUPPORTED("35nw1pbiz2p3s6qwlam5eoo3m"); // else UNSUPPORTED("cys9b9aepuo25ntuuyhiqb6ln"); // gvputs(job, "\"\""); UNSUPPORTED("94eif945asnu8gb1psb6wspvz"); // if (first_periphery == 1) UNSUPPORTED("beq2s7wwrxfrqoschrxojlq3"); // first_periphery = 0; UNSUPPORTED("5d33cl4ogs78yvw2i75icg9g6"); // gvputs(job, " -width "); UNSUPPORTED("9lzl69uuazscmin8fqgbic818"); // gvprintdouble(job, obj->penwidth); UNSUPPORTED("4cpwr3m94g1ys1g7qno3p7770"); // gvputs(job, " -outline "); UNSUPPORTED("b1kdoymo0peu76atwvwlvppxm"); // tkgen_print_color(job, obj->pencolor); UNSUPPORTED("7ljsiyfswf1fyq7u5u5meig9b"); // if (obj->pen == PEN_DASHED) UNSUPPORTED("48ujmq20gr1bcmnb9x7qstuon"); // gvputs(job, " -dash 5"); UNSUPPORTED("qz536d4xx8biptvgrkpjg3wo"); // if (obj->pen == PEN_DOTTED) UNSUPPORTED("nxz0zcvg2vp69h2k4vz0zxjo"); // gvputs(job, " -dash 2"); UNSUPPORTED("7xbsyhpezhbss8vlckn2p77i7"); // tkgen_print_tags(job); UNSUPPORTED("427r2p9r3ymmxp5p69rt99ymp"); // gvputs(job, "\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 6c5hyqf18vqv7zjvhkfe6ti35 // static void tkgen_polyline(GVJ_t * job, pointf * A, int n) public static Object tkgen_polyline(Object... arg) { UNSUPPORTED("at98nvxsdu2h0dornar4y15ul"); // static void tkgen_polyline(GVJ_t * job, pointf * A, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("t8jc65c5jcpqdkfpg4fjb8u4"); // if (obj->pen != PEN_NONE) { UNSUPPORTED("cpyq52t64pblc9nfne0q9tzvv"); // tkgen_canvas(job); UNSUPPORTED("bb6nsdbnte9p73wmrdar55mb7"); // gvputs(job, " create line "); UNSUPPORTED("af44mg78omj8g3sx02euas8s"); // gvprintpointflist(job, A, n); UNSUPPORTED("cfzbaouamgyduscf63lup4oww"); // gvputs(job, " -fill "); UNSUPPORTED("8lreipxfzo9h2hdub9byfimmx"); // tkgen_print_color(job, obj->pencolor); UNSUPPORTED("7ljsiyfswf1fyq7u5u5meig9b"); // if (obj->pen == PEN_DASHED) UNSUPPORTED("48ujmq20gr1bcmnb9x7qstuon"); // gvputs(job, " -dash 5"); UNSUPPORTED("qz536d4xx8biptvgrkpjg3wo"); // if (obj->pen == PEN_DOTTED) UNSUPPORTED("nxz0zcvg2vp69h2k4vz0zxjo"); // gvputs(job, " -dash 2"); UNSUPPORTED("7xbsyhpezhbss8vlckn2p77i7"); // tkgen_print_tags(job); UNSUPPORTED("427r2p9r3ymmxp5p69rt99ymp"); // gvputs(job, "\n"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 2zi5rrmhj45i69kzgpbc74bsu // gvrender_engine_t tkgen_engine = //1 89ucnxk8hokecx6wfztqf0uyc // gvrender_features_t render_features_tk = //1 bl8y4t7jlhz6ojwhbki4xl65i // gvdevice_features_t device_features_tk = //1 9u0gr6vcp1rk5yi3h4xw8lvbp // gvplugin_installed_t gvrender_tk_types[] = //1 2ge2ai9gnykik4apwbrsp6qua // gvplugin_installed_t gvdevice_tk_types[] = } plantuml-1.2017.15/src/gen/plugin/core/gvrender_core_vml__c.java000066400000000000000000001224241312650303100244570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.plugin.core; import static smetana.core.Macro.UNSUPPORTED; public class gvrender_core_vml__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 btjrd0itqwulq8xqtw1togigv // unsigned int graphHeight,graphWidth //3 bevzgi4opmmgxwksl1lssepxc // static int xml_isentity(char *s) public static Object xml_isentity(Object... arg) { UNSUPPORTED("ddxpdim5n11qvep9b61kpijae"); // static int xml_isentity(char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("7309b02hjekdyss2l1jlfa3o5"); // s++; /* already known to be '&' */ UNSUPPORTED("ee1xg58k0yj6mgak36f7bqx4z"); // if (*s == '#') { UNSUPPORTED("1fe0kohehgdxhenrepo7ymdcw"); // s++; UNSUPPORTED("autyof60ysqv0zxvcovs8ol1o"); // if (*s == 'x' || *s == 'X') { UNSUPPORTED("8dqpp2f04tbhgnmk4gjjb8dga"); // s++; UNSUPPORTED("7z8kjrmcms9gfhq10a65dbjog"); // while ((*s >= '0' && *s <= '9') UNSUPPORTED("cvyao8709l4lhttkvu9hcnvne"); // || (*s >= 'a' && *s <= 'f') UNSUPPORTED("5q6n6p2xf3gohuffw81ur8vhb"); // || (*s >= 'A' && *s <= 'F')) UNSUPPORTED("zybbca41b450wccgr0kkur00"); // s++; UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else { UNSUPPORTED("1hg41j8n8b0uz0lmqlqcy30so"); // while (*s >= '0' && *s <= '9') UNSUPPORTED("zybbca41b450wccgr0kkur00"); // s++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { UNSUPPORTED("8h0cru3h3jveaqc5sgyq4rk71"); // while ((*s >= 'a' && *s <= 'z') UNSUPPORTED("31bir978ftxj7zjleb3mr1bei"); // || (*s >= 'A' && *s <= 'Z')) UNSUPPORTED("8dqpp2f04tbhgnmk4gjjb8dga"); // s++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9hcbv4ydnt8trlfaz870sjsyh"); // if (*s == ';') UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 4b9su7anr30347e1zthtrc5ym // static void vml_bzptarray(GVJ_t * job, pointf * A, int n) public static Object vml_bzptarray(Object... arg) { UNSUPPORTED("6cz31arpp4llfud9so2l10aha"); // static void vml_bzptarray(GVJ_t * job, pointf * A, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("a1dehvgts7vkximbs2yo0q6pa"); // char *c; UNSUPPORTED("7ldg2xw8jnkip042t0h8hr93d"); // c = "m "; /* first point */ UNSUPPORTED("1vi49g48u2rc9v88yhabta0yw"); // for (i = 0; i < n; i++) { UNSUPPORTED("1hgvbe15yhlrd0rd46akda9gh"); // /* integers only in path! */ UNSUPPORTED("e0prmugfew3rqlba7h143j07h"); // gvprintf(job, "%s%.0f,%.0f ", c, A[i].x, graphHeight-A[i].y); UNSUPPORTED("82djk3ejfh3b927h8m60dmvut"); // if (i == 0) UNSUPPORTED("en3ws2ntk263bznbygnksiaqs"); // c = "c "; /* second point */ UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("bhkjgxzahx5z8sapqu2kv00g6"); // c = ""; /* remaining points */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("37rm205a74loh45pr3ipamp7f"); // gvputs(job, "\""); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 c7gxm1yprlzzrruo8zduf87vr // static void vml_print_color(GVJ_t * job, gvcolor_t color) public static Object vml_print_color(Object... arg) { UNSUPPORTED("cq7w4y4atb4wd7qbo6b5xu52q"); // static void vml_print_color(GVJ_t * job, gvcolor_t color) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("1hn9tht7vq6fnuzbw3mgpwl6i"); // switch (color.type) { UNSUPPORTED("8d4tzwdd3f608e3jl4lzyugu0"); // case COLOR_STRING: UNSUPPORTED("13cycml8lfb1s4abkvnuhd8dh"); // gvputs(job, color.u.string); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1ke9k1couoeb4od2nwibgg0xu"); // case RGBA_BYTE: UNSUPPORTED("bk6hmzzce8zu1dqkcetedyx8a"); // if (color.u.rgba[3] == 0) /* transparent */ UNSUPPORTED("azlrdflufy5e04p9xhwe83phw"); // gvputs(job, "none"); UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else UNSUPPORTED("7jq54scftd6wr5k5aefwuq5r4"); // gvprintf(job, "#%02x%02x%02x", UNSUPPORTED("e0jr1wda5b2t6n9g1aas984rf"); // color.u.rgba[0], color.u.rgba[1], color.u.rgba[2]); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("3yz4iw4v7mm470if4vb6yaack"); // assert(0); /* internal error */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 eev3wa4msf4zlx50e30mpo9cg // static void vml_grstroke(GVJ_t * job, int filled) public static Object vml_grstroke(Object... arg) { UNSUPPORTED("4sobdt8jkapv72q76h5vuwa4d"); // static void vml_grstroke(GVJ_t * job, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("ehybj1eln7oznx97cjgnxbsh4"); // gvputs(job, "pencolor); UNSUPPORTED("eeukvd8elh15jnqvrpkyb0m4q"); // if (obj->penwidth != 1.) UNSUPPORTED("17tvpctzkynev0i8kjxunhih0"); // gvprintf(job, "\" weight=\"%.0fpt", obj->penwidth); UNSUPPORTED("djo67r65tyuacmqc3z1ydjwqz"); // if (obj->pen == PEN_DASHED) { UNSUPPORTED("ezihanuro72spak2bn2a3hsgj"); // gvputs(job, "\" dashstyle=\"dash"); UNSUPPORTED("8lyt1l1t8621bzmtn7js5zd27"); // } else if (obj->pen == PEN_DOTTED) { UNSUPPORTED("8c5eqi9230prlfcpffd4p996q"); // gvputs(job, "\" dashstyle=\"dot"); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6ojsqtwezy0tjycbxcwjo31az"); // gvputs(job, "\" />"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5pomyedqfnet64wh6uod6vb2q // static void vml_grfill(GVJ_t * job, int filled) public static Object vml_grfill(Object... arg) { UNSUPPORTED("ajogwjsu07g39q2rvxv7fkhes"); // static void vml_grfill(GVJ_t * job, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("76ttmy9v8uqmlqtu38x3c4z7j"); // if (filled){ UNSUPPORTED("57p42rg5dkh6garwd1jzybkv5"); // gvputs(job, " filled=\"true\" fillcolor=\""); UNSUPPORTED("1n6pvxcwsq6w87n3kgcvwrkc0"); // vml_print_color(job, obj->fillcolor); UNSUPPORTED("5mqqon1gnvkayrizou1xqmzp7"); // gvputs(job, "\" "); UNSUPPORTED("d5hubmf3ko4b709pzj48gex81"); // }else{ UNSUPPORTED("5bqy4mcc9vk4ut4zsywfztdpy"); // gvputs(job, " filled=\"false\" "); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dyzsyf54kn673uhch0r5fwpg // char *html_string(char *s) public static Object html_string(Object... arg) { UNSUPPORTED("8tv9tnhw9ye4r7idvy9m4aey6"); // char *html_string(char *s) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("210phh7av8ei8ajjmpptx96m6"); // static char *buf = NULL; UNSUPPORTED("6fpm1wk8mz0hofn15361g6nzn"); // static int bufsize = 0; UNSUPPORTED("1q9p9mppsiolvz4xyp1xfe8s2"); // char *p, *sub, *prev = NULL; UNSUPPORTED("9ee5mdh9hsw491mz8n88ey33d"); // int len, pos = 0; UNSUPPORTED("29p3td3mgocxg8wzsqpdzufk1"); // int temp,cnt,remaining=0; UNSUPPORTED("3kfrqsdr0zbtgcprb136f6jf7"); // char workstr[16]; UNSUPPORTED("dqghet86b6lisy95vk1aiqmoq"); // long unsigned int charnum=0; UNSUPPORTED("blujo31vwffo3a9xik8oit7xl"); // unsigned char byte; UNSUPPORTED("a6hm2qvtj6ubjqjo5o0y1nbv6"); // unsigned char mask; UNSUPPORTED("cjyiejw67ffjjsk60tgeebvif"); // if (!buf) { UNSUPPORTED("4xkxdnucjd4ldoikgelnsa7c9"); // bufsize = 64; UNSUPPORTED("9pvgystp8nwvblycum3rps3tz"); // buf = gmalloc(bufsize); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("dpfzdhkfq6u86uv5f9lnqfbpq"); // p = buf; UNSUPPORTED("e8ng575h9ts71v7d04mtpxyr5"); // while (s && *s) { UNSUPPORTED("85svsyrkaau2681m7ya7tygx6"); // if (pos > (bufsize - 8)) { UNSUPPORTED("aa09fjtytqkag416h6457rmkr"); // bufsize *= 2; UNSUPPORTED("3vu2n3g10rrkdmia0oyndfj4s"); // buf = grealloc(buf, bufsize); UNSUPPORTED("cz6j3s7zlvrbs83g3e42o83z7"); // p = buf + pos; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("97iud4axotxlk7ywlijb75m3d"); // /* escape '&' only if not part of a legal entity sequence */ UNSUPPORTED("2ulqzjhkp81o1cpur4y62jck9"); // if (*s == '&' && !(xml_isentity(s))) { UNSUPPORTED("cac1jzftgtiz1fvztpxrb5pzr"); // sub = "&"; UNSUPPORTED("17g0bn2jwfuvdxn93z9lsronr"); // len = 5; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7e1vaedh6l0yfegrgw9donb9e"); // /* '<' '>' are safe to substitute even if string is already UTF-8 coded UNSUPPORTED("2hspzajrej6p5fmxtp3xo33mw"); // * since UTF-8 strings won't contain '<' or '>' */ UNSUPPORTED("3xg4wo6utmvnlgyvg8ciz4tey"); // else if (*s == '<') { UNSUPPORTED("13qv1mf2mabbasi5mgrjsqs3n"); // sub = "<"; UNSUPPORTED("cn6mu8yh8covbdy1zkhq7256"); // len = 4; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("art2agkl4px2ncm5gmygaoi4v"); // else if (*s == '>') { UNSUPPORTED("dbkjqbduusn4tza1p3ng8iuyi"); // sub = ">"; UNSUPPORTED("cn6mu8yh8covbdy1zkhq7256"); // len = 4; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("aundz2f5ze9pcxo1dksgg0zxi"); // else if (*s == '-') { /* can't be used in xml comment strings */ UNSUPPORTED("37g3n162xpdox7os6l6tphpwc"); // sub = "-"; UNSUPPORTED("17g0bn2jwfuvdxn93z9lsronr"); // len = 5; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("1lvkv9camdmveih40gwylsnw6"); // else if (*s == ' ' && prev && *prev == ' ') { UNSUPPORTED("b0atdb6d1uzal5s04csjvyq30"); // /* substitute 2nd and subsequent spaces with required_spaces */ UNSUPPORTED("72g8c8ott8fvqjni8tir0plf7"); // sub = " "; /* inkscape doesn't recognise   */ UNSUPPORTED("axaethtisavqkan2dx7laigpw"); // len = 6; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("9e32cag083iuoabhlvpcldsa8"); // else if (*s == '"') { UNSUPPORTED("4w7kby1vesehrcs7zpowfb0q6"); // sub = """; UNSUPPORTED("axaethtisavqkan2dx7laigpw"); // len = 6; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("akz9vs5rt6crj61e0batgdi09"); // else if (*s == '\'') { UNSUPPORTED("6ohptq6v6vjhjivmjf7d5auoz"); // sub = "'"; UNSUPPORTED("17g0bn2jwfuvdxn93z9lsronr"); // len = 5; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("7osubpgj63tmt0wj4pvxpwxoe"); // else if ((unsigned char)*s > 127) { UNSUPPORTED("ck3iw54e1uosgnoar7tuj5yiq"); // byte=(unsigned char)*s; UNSUPPORTED("685r14yvgnv8corj4fyj87dwc"); // cnt=0; UNSUPPORTED("1sk7v07qqsmtkhcx3a69hnjyd"); // for (mask=127; mask < byte; mask=mask >>1){ UNSUPPORTED("8fopryll06kvr0jnyzk09qfpq"); // cnt++; UNSUPPORTED("3kqngicr09spfic6rk1h6wfin"); // byte=byte & mask; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("9i47zp8uygm8m9vcerpifoq21"); // if (cnt>1){ UNSUPPORTED("ac2ry7rlqffp1fgrhemc934gu"); // charnum=byte; UNSUPPORTED("90z94v1tlojflavsqt0s26r6j"); // remaining=cnt-1; UNSUPPORTED("exa3odb9ukrxd1fpltrrdron7"); // }else{ UNSUPPORTED("1og0iux5l20krj89wdqh9w7uv"); // charnum=charnum<<6; UNSUPPORTED("cft38jo0ay29phgz8mhgumxq1"); // charnum+=byte; UNSUPPORTED("aeih2m1vf4h9mot9xtfcgud99"); // remaining--; UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } UNSUPPORTED("5a72e9ko8v0uosbb9u6k1hcc6"); // if (remaining>0){ UNSUPPORTED("6rtxeprdkn5hl12mzahfp266n"); // s++; UNSUPPORTED("5ltvgvxpweo0rh2kdfohxc2hz"); // continue; UNSUPPORTED("bqxp6rw8noicrlglo8qe8unqq"); // } UNSUPPORTED("7et6ic8p4hqvhv3yec3yk55p6"); // /* we will build the html value right-to-left UNSUPPORTED("2mvg42q0v95d1x1ed42qbvx01"); // * (least significant-to-most) */ UNSUPPORTED("31b55rw6kawn2r6zmqrh228qf"); // workstr[15]=';'; UNSUPPORTED("8i1jougg0os93j7bodx0va50k"); // sub=&workstr[14]; UNSUPPORTED("d3rh9e3or0bar417dv1fit5fo"); // len=3; /* &# + ; */ UNSUPPORTED("ewhmvw4ooekot2lyb18r4tj5g"); // do { UNSUPPORTED("cwwv0otu07pe13eakls5xxerm"); // temp=charnum%10; UNSUPPORTED("da252sqmro65h7ak83r4m3obu"); // *(sub--)=(char)((int)'0'+ temp); UNSUPPORTED("1zirekhu226huecycep0ne7pu"); // charnum/=10; UNSUPPORTED("aq5hs10z0fbv4mhaeuzcmkgog"); // len++; UNSUPPORTED("4bx2iu76wtvgwdtj1yxkeo7bw"); // if (len>12){ /* 12 is arbitrary, but clearly in error */ UNSUPPORTED("btpcnzuplf607blcmfn5tmveu"); // fprintf(stderr, "Error during conversion to \"UTF-8\". Quiting.\n"); UNSUPPORTED("5s066qy9i7y4r1rxj2y59o0cj"); // exit(1); UNSUPPORTED("43y12cfgcytwnxmxacc66zhaa"); // } UNSUPPORTED("8lm55matje4172sjn6kkr5hxq"); // } while (charnum>0); UNSUPPORTED("9y3km5dpa85tacgkfb6yz1mnf"); // *(sub--)='#'; UNSUPPORTED("bo52wzef6reby5fe9dmhkk81l"); // *(sub)='&'; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else { UNSUPPORTED("adxr80w3fzxvf4gxvbuo78rm5"); // sub = s; UNSUPPORTED("ct414lk8my1pywj7ypk05e6d"); // len = 1; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("25ryz7f7izh8r6792860c1d0y"); // while (len--) { UNSUPPORTED("byu93mjyl867v3xyy1fb9pw9"); // *p++ = *sub++; UNSUPPORTED("27349aw1zezm0lpez1jn3pcw4"); // pos++; UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } UNSUPPORTED("5j7yubj14qnrajv5mpkfylpk3"); // prev = s; UNSUPPORTED("1fe0kohehgdxhenrepo7ymdcw"); // s++; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("2t1d66kwn86kqh0i665hqw6cl"); // *p = '\0'; UNSUPPORTED("5jfpogdyby101eyuw2dhtb5cg"); // return buf; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 dur880fsg5atx9nvy1p3ela10 // static void vml_comment(GVJ_t * job, char *str) public static Object vml_comment(Object... arg) { UNSUPPORTED("c00kjo9ns7f17wgw1ohzw57tm"); // static void vml_comment(GVJ_t * job, char *str) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("66eb4g2o03hr5raslmg9nfbeu"); // gvputs(job, " \n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5oyyq924hjocedbpq4l7oehzv // static void vml_begin_job(GVJ_t * job) public static Object vml_begin_job(Object... arg) { UNSUPPORTED("4vv3qhgtpbes35jfx8pclwrgh"); // static void vml_begin_job(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("4cbnyzmzg3cvvcs2o2oquee16"); // gvputs(job, "\n"); UNSUPPORTED("928w4si5zj3hjwozhxchpdea3"); // gvputs(job, "\n\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3xv9atzf4fzy1912qmp1uvq0m // static void vml_begin_graph(GVJ_t * job) public static Object vml_begin_graph(Object... arg) { UNSUPPORTED("avqdb0s2nmtb6gvp76ps0ei2k"); // static void vml_begin_graph(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("8i0d7frxcvvmzhidle0zin9i0"); // char *name; UNSUPPORTED("e1b0xy1qef9gc82t0ivbjb8zh"); // graphHeight =(int)(job->bb.UR.y - job->bb.LL.y); UNSUPPORTED("55u7wm7xjrcquuu2n0hz1jizw"); // graphWidth =(int)(job->bb.UR.x - job->bb.LL.x); UNSUPPORTED("6dl46e1222e567abtx5vifkzq"); // gvputs(job, ""); UNSUPPORTED("b70phb0h3tdknwo7m1tzk0yu9"); // gvputs(job, "\n"); UNSUPPORTED("an46m2db2jmg9d78f3cw0oeep"); // name = agnameof(obj->u.g); UNSUPPORTED("2bwa0axbof4o9lendy4mv0cpr"); // if (name[0]) { UNSUPPORTED("9a7iaj7rt5y0ad0nng4a7jxbo"); // gvputs(job, ""); UNSUPPORTED("1upiypaoqqpwx9r8wle6ufk2g"); // gvputs(job, html_string(name)); UNSUPPORTED("6hyq1ok8iavza1xukic96q0h"); // gvputs(job, ""); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("9tm5u4fe5an4thc0q7bjxnr75"); // gvprintf(job, "\n", job->pagesArraySize.x * job->pagesArraySize.y); UNSUPPORTED("5la678eg2w90eh0sdfjkqn7cz"); // /* the next chunk and all the "DIV" stuff is not required, UNSUPPORTED("6zlticf1cev2j2vigz4tx779o"); // * but it helps with non-IE browsers */ UNSUPPORTED("lhp79l7hlsjswf7b7tw8wpdx"); // gvputs(job, " \n"); UNSUPPORTED("269gwva6ivx61sjbdee3m8vj0"); // gvputs(job, ""); UNSUPPORTED("93pwzzgpdh9757l4olxop6pi0"); // gvputs(job, "\n"); UNSUPPORTED("3kryaxr0uaxo7qpu3ktwzjhz9"); // /* add 10pt pad to the bottom of the graph */ UNSUPPORTED("87yakm6jlsdw93lwf21ta1fdh"); // gvputs(job, "
\n", graphWidth, 10+graphHeight); UNSUPPORTED("5jwc1lxfhyiu5a3waqioulo3"); // gvputs(job, "\n"); UNSUPPORTED("kfdibijgk7342gk871tg8gje"); // gvputs(job, "\n"); UNSUPPORTED("35orfdyus9v7xk40ooebirkq5"); // gvputs(job, " ", graphWidth, graphHeight); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 9qyew5qsglzdy9qx7swdfe7mp // static void vml_end_graph(GVJ_t * job) public static Object vml_end_graph(Object... arg) { UNSUPPORTED("anrryg4l39vgr225rotun9gnr"); // static void vml_end_graph(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("bxensc87sjojotvuy3k04i58o"); // gvputs(job, "\n"); UNSUPPORTED("dvq6wxetnzd2fc0ug9uz2zppo"); // gvputs(job, "
\n"); UNSUPPORTED("1s3mj7n718sgb6k6qbmbcdc9v"); // /* add 10pt pad to the bottom of the graph */ UNSUPPORTED("27m6w3kfdqelgtlqxrx56jlxr"); // gvputs(job, "
\n"); UNSUPPORTED("ebb37y083syliy72ozkhk4wks"); // gvputs(job, "\n"); UNSUPPORTED("dvq6wxetnzd2fc0ug9uz2zppo"); // gvputs(job, "
\n"); UNSUPPORTED("3s1hxsrzd7hxfmm8x5jyyjieh"); // gvputs(job, "
\n"); UNSUPPORTED("5fd7vc4jew0i3dt9bu5fowugo"); // gvputs(job, "\n"); UNSUPPORTED("2vufe64jniejolxnz5681gxqe"); // gvputs(job, "

Sorry, this diagram will only display correctly on Internet Explorer 5 (and up) browsers.

\n"); UNSUPPORTED("dvq6wxetnzd2fc0ug9uz2zppo"); // gvputs(job, "
\n"); UNSUPPORTED("ez37b3bcyingy4jq78tmg0pxj"); // gvputs(job, "
\n"); UNSUPPORTED("eq3lzj7qatimzfjmxipjhyiqz"); // gvputs(job, "\n"); UNSUPPORTED("dvq6wxetnzd2fc0ug9uz2zppo"); // gvputs(job, "
\n"); UNSUPPORTED("dy4p0jrbfldkelbyrvvyzj4qz"); // gvputs(job, "\n\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 bl9rzlwd1nwcpeg5ugnuzqa5e // static void vml_begin_anchor(GVJ_t * job, char *href, char *tooltip, char *target, char *id) public static Object vml_begin_anchor(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("1a7vcj7j4eg713imsharya0ud"); // vml_begin_anchor(GVJ_t * job, char *href, char *tooltip, char *target, char *id) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("amqsywm4tf3cr4mn35bngqsho"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 1x3m9i59qmjupolfx4vhxw0v7 // static void vml_end_anchor(GVJ_t * job) public static Object vml_end_anchor(Object... arg) { UNSUPPORTED("9vhqbnuimouv0ow47wxsqyrls"); // static void vml_end_anchor(GVJ_t * job) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("gdbgsnwooftm30av6d4pf8vp"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 3w9m053yxsneu33cud9timt9t // static void vml_textspan(GVJ_t * job, pointf p, textspan_t * span) public static Object vml_textspan(Object... arg) { UNSUPPORTED("aizdf41m4lp84vrfxtqqjm5kk"); // static void vml_textspan(GVJ_t * job, pointf p, textspan_t * span) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("a6cqx0inp0ev3s5i17yp4krl3"); // pointf p1,p2; UNSUPPORTED("84llcpxtvxaggx841n2t03850"); // obj_state_t *obj = job->obj; UNSUPPORTED("7pxhx3kruwsackat2315zxaxh"); // PostscriptAlias *pA; UNSUPPORTED("bpqxh9mig0sh1gasrlkg6hbph"); // switch (span->just) { UNSUPPORTED("15tf5rbprgr65ucp24e4bba9t"); // case 'l': UNSUPPORTED("bx5btb16vs7f3gj67kpy77ey5"); // p1.x=p.x; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8pu80wsk8me7q17ensqlviq86"); // case 'r': UNSUPPORTED("88f68xft9y7x7p7757jw5v539"); // p1.x=p.x-span->size.x; UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("37fbny64zwo23oymypyreuldc"); // case 'n': UNSUPPORTED("41f56eyenmswtnwdl92dgzi6i"); // p1.x=p.x-(span->size.x/2); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("6v5kd5y5vru7rgdgdqpx8v5qn"); // p2.x=p1.x+span->size.x; UNSUPPORTED("8qe9sncool5td3uxg4au3fcr3"); // if (span->size.y < span->font->size){ UNSUPPORTED("2ta69i4d7oe74st195r1on46r"); // span->size.y = 1 + (1.1*span->font->size); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("l7n28ygxehizidxvci80c5eo"); // p1.x-=8; /* vml textbox margin fudge factor */ UNSUPPORTED("d04wets4lspsvs5pxjr5f7qiv"); // p2.x+=8; /* vml textbox margin fudge factor */ UNSUPPORTED("8y5r2cgryhw2do4ex1gj8g5k2"); // p2.y=graphHeight-(p.y); UNSUPPORTED("348q7svrvxy55boyhh6ini0m5"); // p1.y=(p2.y-span->size.y); UNSUPPORTED("dn75y57iaumqs7rtia0ypr6ho"); // /* text "y" was too high UNSUPPORTED("1lan35rlz4uz5bucr5o7r0g4v"); // * Graphviz uses "baseline", VML seems to use bottom of descenders - so we fudge a little UNSUPPORTED("20rbf35vu5ppvv7irnm95dyo"); // * (heuristics - based on eyeballs) */ UNSUPPORTED("2612tyqxei5p6h4f9ys5dee86"); // if (span->font->size <12.){ /* see graphs/directed/arrows.gv */ UNSUPPORTED("cvs1mwall6wq4ij48lqm4op48"); // p1.y+=1.4+span->font->size/5; /* adjust by approx. descender */ UNSUPPORTED("1rt3dk2b5mwsszlr7636vr1iu"); // p2.y+=1.4+span->font->size/5; /* adjust by approx. descender */ UNSUPPORTED("d5hubmf3ko4b709pzj48gex81"); // }else{ UNSUPPORTED("d562p565hvv27m9q6hboqoceg"); // p1.y+=2+span->font->size/5; /* adjust by approx. descender */ UNSUPPORTED("9zyp3amjqv7igfjsyakzl17mh"); // p2.y+=2+span->font->size/5; /* adjust by approx. descender */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("euxy967coeahp4bc20yubm2yl"); // gvprintf(job, "\n"); UNSUPPORTED("9qq0nba1t0ng7kljc1sbs0qfj"); // gvputs(job, "font->postscript_alias; UNSUPPORTED("85v4mh1bambtpopgva0jmspn9"); // if (pA) { UNSUPPORTED("bgqxo8khg1e099cxrptiwit1z"); // gvprintf(job, "font-family: '%s';", pA->family); UNSUPPORTED("9h5q63fru796qjss1e7qmjs87"); // if (pA->weight) UNSUPPORTED("d27tbziquy9uwa9ti4aosdkhl"); // gvprintf(job, "font-weight: %s;", pA->weight); UNSUPPORTED("9huytp1h7voa42nmxmer22vzu"); // if (pA->stretch) UNSUPPORTED("3pki43hxuzxyud3tzdxwrhaa0"); // gvprintf(job, "font-stretch: %s;", pA->stretch); UNSUPPORTED("5d7zj4s1n6561mk9pcx6o6cgu"); // if (pA->style) UNSUPPORTED("eh8ev5fgxm7vpxf9pk75n85ex"); // gvprintf(job, "font-style: %s;", pA->style); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { UNSUPPORTED("fz55kaucqr8430w3mc1m8hwl"); // gvprintf(job, "font-family: \'%s\';", span->font->name); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("7rot1wnzwom21e0ppkrh5zdav"); // gvprintf(job, " font-size: %.2fpt;", span->font->size); UNSUPPORTED("1ns59jz9xcw8otsxv6kgjgr5e"); // switch (obj->pencolor.type) { UNSUPPORTED("8d4tzwdd3f608e3jl4lzyugu0"); // case COLOR_STRING: UNSUPPORTED("b7fzwqzuy02m4jzy6m43xnpd1"); // if (strcasecmp(obj->pencolor.u.string, "black")) UNSUPPORTED("8nzpd9zrx7vpp0m8m1qgid7do"); // gvprintf(job, "color:%s;", obj->pencolor.u.string); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("1ke9k1couoeb4od2nwibgg0xu"); // case RGBA_BYTE: UNSUPPORTED("c3dfl7pq8vixzp7cbj7583mln"); // gvprintf(job, "color:#%02x%02x%02x;", UNSUPPORTED("7se80bj4r3ij8yqdqdw96l2d2"); // obj->pencolor.u.rgba[0], obj->pencolor.u.rgba[1], obj->pencolor.u.rgba[2]); UNSUPPORTED("6aw91xzjmqvmtdvt1di23af8y"); // break; UNSUPPORTED("8l3rwj6ctswoa4gvh2j4poq70"); // default: UNSUPPORTED("3yz4iw4v7mm470if4vb6yaack"); // assert(0); /* internal error */ UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8stgz0xogc10yjcir6sanbobh"); // gvputs(job, "\">
"); UNSUPPORTED("2y2125yjs17y8io61dtxwyrmo"); // gvputs(job, html_string(span->str)); UNSUPPORTED("32wtt9g6cjyw7gk6tdrbhp88n"); // gvputs(job, "
\n"); UNSUPPORTED("ec1nzz2ms8uxq882p4akkdc7x"); // gvputs(job, "
\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 7uemnirlwr6y4ngurfwnenkrx // static void vml_ellipse(GVJ_t * job, pointf * A, int filled) public static Object vml_ellipse(Object... arg) { UNSUPPORTED("2rzq7xornook326ugiqtx9ip8"); // static void vml_ellipse(GVJ_t * job, pointf * A, int filled) UNSUPPORTED("4ecslok588dpq5vf5tzktm48k"); // { UNSUPPORTED("a736y55qgt64cklrj8yk9uvu"); // double dx, dy, left, right, top, bottom; UNSUPPORTED("8tuvacxowvjyekfxkm6dgvp8f"); // /* A[] contains 2 points: the center and corner. */ UNSUPPORTED("7s2m9hgonz1vxyrkaunqzmm0x"); // gvputs(job, " "); UNSUPPORTED("7gqf6f2q0xzi9bhfhrkseam0y"); // vml_grstroke(job, filled); UNSUPPORTED("18q2t3ic8pbe1l0wsmw06z2n5"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 b5kmfiqdu9573i9iqip2kkynm // static void vml_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, int arrow_at_end, int filled) public static Object vml_bezier(Object... arg) { UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void UNSUPPORTED("cxwdtprcwq7lm3c780w1tds29"); // vml_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, UNSUPPORTED("77j21vz8ekimnj6b6uefavtz2"); // int arrow_at_end, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("dticghuio7so5b1whdvly7d4h"); // gvputs(job, " "); UNSUPPORTED("7gqf6f2q0xzi9bhfhrkseam0y"); // vml_grstroke(job, filled); UNSUPPORTED("3sp32zqf7o27wlhfm0e8qwo8f"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 5k4nobte06p1zh3op4d1ubct2 // static void vml_polygon(GVJ_t * job, pointf * A, int n, int filled) public static Object vml_polygon(Object... arg) { UNSUPPORTED("14advi4blywcgi43gbteimc7r"); // static void vml_polygon(GVJ_t * job, pointf * A, int n, int filled) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("dwt7qbi5bm9qnisfbxetj2c1u"); // double px,py; UNSUPPORTED("dticghuio7so5b1whdvly7d4h"); // gvputs(job, " "); UNSUPPORTED("7gqf6f2q0xzi9bhfhrkseam0y"); // vml_grstroke(job, filled); UNSUPPORTED("3sp32zqf7o27wlhfm0e8qwo8f"); // gvputs(job, ""); UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } UNSUPPORTED("8va191an28d0k948tf16y0nxn"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //3 elv8mlcw3hix4jbez3msjvwl3 // static void vml_polyline(GVJ_t * job, pointf * A, int n) public static Object vml_polyline(Object... arg) { UNSUPPORTED("9k67ncobudll8378huzqmql4u"); // static void vml_polyline(GVJ_t * job, pointf * A, int n) UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; UNSUPPORTED("dticghuio7so5b1whdvly7d4h"); // gvputs(job, " ", graphWidth, graphHeight); UNSUPPORTED("8xo83512azztf61gbgqbp60i"); // gvputs(job, ""); UNSUPPORTED("1k6f5ran45kpeb0vrbfuqpswu"); // vml_grstroke(job, 0); /* no fill here for polyline */ UNSUPPORTED("8va191an28d0k948tf16y0nxn"); // gvputs(job, "\n"); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } throw new UnsupportedOperationException(); } //1 d0v2ctv7fk7xyjshwyllfkcpt // static char *vml_knowncolors[] = //1 i4obs2vdal7jcgzcmqpiabad // gvrender_engine_t vml_engine = //1 f19ql4f0xzpd3o01gsqdld6hy // gvrender_features_t render_features_vml = //1 do5wawnnfhzf2g7r3wftgsy4o // gvdevice_features_t device_features_vml = //1 8yst1dqk2z5q83e32t3wmrr75 // gvdevice_features_t device_features_vmlz = //1 65n0gf390fc3raflk4vdbxp9y // gvplugin_installed_t gvrender_vml_types[] = //1 2pmjyl28in77fbh1nf0xxn20c // gvplugin_installed_t gvdevice_vml_types[] = } plantuml-1.2017.15/src/gen/plugin/dot_layout/000077500000000000000000000000001312650303100206775ustar00rootroot00000000000000plantuml-1.2017.15/src/gen/plugin/dot_layout/gvlayout_dot_layout__c.java000066400000000000000000000073001312650303100263200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.plugin.dot_layout; public class gvlayout_dot_layout__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 baedz5i9est5csw3epz3cv7z // typedef Ppoly_t Ppolyline_t //1 9k44uhd5foylaeoekf3llonjq // extern Dtmethod_t* Dtset //1 1ahfywsmzcpcig2oxm7pt9ihj // extern Dtmethod_t* Dtbag //1 anhghfj3k7dmkudy2n7rvt31v // extern Dtmethod_t* Dtoset //1 5l6oj1ux946zjwvir94ykejbc // extern Dtmethod_t* Dtobag //1 2wtf222ak6cui8cfjnw6w377z // extern Dtmethod_t* Dtlist //1 d1s1s6ibtcsmst88e3057u9r7 // extern Dtmethod_t* Dtstack //1 axa7mflo824p6fspjn1rdk0mt // extern Dtmethod_t* Dtqueue //1 ega812utobm4xx9oa9w9ayij6 // extern Dtmethod_t* Dtdeque //1 cyfr996ur43045jv1tjbelzmj // extern Dtmethod_t* Dtorder //1 wlofoiftbjgrrabzb2brkycg // extern Dtmethod_t* Dttree //1 12bds94t7voj7ulwpcvgf6agr // extern Dtmethod_t* Dthash //1 9lqknzty480cy7zsubmabkk8h // extern Dtmethod_t _Dttree //1 bvn6zkbcp8vjdhkccqo1xrkrb // extern Dtmethod_t _Dthash //1 9lidhtd6nsmmv3e7vjv9e10gw // extern Dtmethod_t _Dtlist //1 34ujfamjxo7xn89u90oh2k6f8 // extern Dtmethod_t _Dtqueue //1 3jy4aceckzkdv950h89p4wjc8 // extern Dtmethod_t _Dtstack //1 8dfqgf3u1v830qzcjqh9o8ha7 // extern Agmemdisc_t AgMemDisc //1 18k2oh2t6llfsdc5x0wlcnby8 // extern Agiddisc_t AgIdDisc //1 a4r7hi80gdxtsv4hdoqpyiivn // extern Agiodisc_t AgIoDisc //1 bnzt5syjb7mgeru19114vd6xx // extern Agdisc_t AgDefaultDisc //1 35y2gbegsdjilegaribes00mg // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected //1 c2rygslq6bcuka3awmvy2b3ow // typedef Agsubnode_t Agnoderef_t //1 xam6yv0dcsx57dtg44igpbzn // typedef Dtlink_t Agedgeref_t //1 3rtanuqep8p4j1ff0fu8pc317 // gvlayout_engine_t dotgen_engine = //1 d72gzhpu1133ozfmxotx96w15 // gvlayout_features_t dotgen_features = //1 b4znay22fp8g1gn9bsyovltke // gvplugin_installed_t gvlayout_dot_layout[] = } plantuml-1.2017.15/src/gen/plugin/dot_layout/gvplugin_dot_layout__c.java000066400000000000000000000043061312650303100263040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package gen.plugin.dot_layout; public class gvplugin_dot_layout__c { //1 2digov3edok6d5srhgtlmrycs // extern lt_symlist_t lt_preloaded_symbols[] //1 7fijea0rwszpxhs4k5zka76di // extern gvplugin_installed_t gvlayout_dot_layout[] //1 b52d96517bdj0tz5tyri3l3ma // static gvplugin_api_t apis[] = //1 91j4f2ok2soe72bm33t6lrnvv // gvplugin_library_t gvplugin_dot_layout_LTX_library = } plantuml-1.2017.15/src/h/000077500000000000000000000000001312650303100146745ustar00rootroot00000000000000plantuml-1.2017.15/src/h/Agattr_s.java000066400000000000000000000045071312650303100173110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 bhyg6b8o9rt02pkq0cw5v7v8l public interface Agattr_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agattr_s", "{", "Agrec_t h", "Dict_t *dict", "char **str", "}"); } // struct Agattr_s { /* dynamic string attributes */ // Agrec_t h; /* common data header */ // Dict_t *dict; /* shared dict to interpret attr field */ // char **str; /* the attribute string values */ // };plantuml-1.2017.15/src/h/Agattr_t.java000066400000000000000000000041131312650303100173030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 4eab8jpwd22sxwe7231h81ak7 public interface Agattr_t extends Agattr_s { public static List DEFINITION = Arrays.asList( "typedef struct Agattr_s Agattr_t"); } // typedef struct Agattr_s Agattr_t;plantuml-1.2017.15/src/h/Agcbdisc_s.java000066400000000000000000000044441312650303100175660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4bs0remcyjtoc7ic0ezb77hjt public interface Agcbdisc_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agcbdisc_s", "{", "struct", "{", "agobjfn_t ins", "agobjupdfn_t mod", "agobjfn_t del", "}", "graph, node, edge", "}"); } // struct Agcbdisc_s { // struct { // agobjfn_t ins; // agobjupdfn_t mod; // agobjfn_t del; // } graph, node, edge; // };plantuml-1.2017.15/src/h/Agcbdisc_t.java000066400000000000000000000041271312650303100175650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 5yq6nwzfy7wrzq92i583nbcxk public interface Agcbdisc_t extends Agcbdisc_s { public static List DEFINITION = Arrays.asList( "typedef struct Agcbdisc_s Agcbdisc_t"); } // typedef struct Agcbdisc_s Agcbdisc_t;plantuml-1.2017.15/src/h/Agcbstack_s.java000066400000000000000000000045061312650303100177500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 c13tvg963ir8gy4n4hq85wlp5 public interface Agcbstack_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agcbstack_s", "{", "Agcbdisc_t *f", "void *state", "Agcbstack_t *prev", "}"); } // struct Agcbstack_s { /* object event callbacks */ // Agcbdisc_t *f; /* methods */ // void *state; /* closure */ // Agcbstack_t *prev; /* kept in a stack, unlike other disciplines */ // };plantuml-1.2017.15/src/h/Agcbstack_t.java000066400000000000000000000041351312650303100177470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 9vl1n1ipo4hb9ftk6z6tbxabj public interface Agcbstack_t extends Agcbstack_s { public static List DEFINITION = Arrays.asList( "typedef struct Agcbstack_s Agcbstack_t"); } // typedef struct Agcbstack_s Agcbstack_t;plantuml-1.2017.15/src/h/Agclos_s.java000066400000000000000000000053271312650303100173000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 eo8sfsh5lby147igpryzvitu7 public interface Agclos_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agclos_s", "{", "Agdisc_t disc", "Agdstate_t state", "Dict_t *strdict", "unsigned long seq[3]", "Agcbstack_t *cb", "unsigned char callbacks_enabled", "Dict_t *lookup_by_name[3]", "Dict_t *lookup_by_id[3]", "}"); } // struct Agclos_s { // Agdisc_t disc; /* resource discipline functions */ // Agdstate_t state; /* resource closures */ // Dict_t *strdict; /* shared string dict */ // unsigned long seq[3]; /* local object sequence number counter */ // Agcbstack_t *cb; /* user and system callback function stacks */ // unsigned char callbacks_enabled; /* issue user callbacks or hold them? */ // Dict_t *lookup_by_name[3]; // Dict_t *lookup_by_id[3]; // };plantuml-1.2017.15/src/h/Agclos_t.java000066400000000000000000000041131312650303100172710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 b7spmxawwjlyako5bvwhmto82 public interface Agclos_t extends Agclos_s { public static List DEFINITION = Arrays.asList( "typedef struct Agclos_s Agclos_t"); } // typedef struct Agclos_s Agclos_t;plantuml-1.2017.15/src/h/Agcmpedge_t.java000066400000000000000000000044021312650303100177360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 aaoij3s9ltd2qv1eegfydx2a3 public interface Agcmpedge_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct Agcmpedge_s", "{", "Agrec_t hdr", "save_stack_t stack[2]", "}", "Agcmpedge_t"); } // typedef struct Agcmpedge_s { // Agrec_t hdr; // save_stack_t stack[2]; /* IN and OUT save stacks */ // } Agcmpedge_t;plantuml-1.2017.15/src/h/Agcmpgraph_t.java000066400000000000000000000044621312650303100201410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5vqgch0hhxdt8uyrsm383989v public interface Agcmpgraph_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct Agcmpgraph_s", "{", "Agrec_t hdr", "Agnode_t *node", "Dict_t *hidden_node_set", "}", "Agcmpgraph_t"); } // typedef struct Agcmpgraph_s { // Agrec_t hdr; // Agnode_t *node; /* its associated node */ // Dict_t *hidden_node_set; // } Agcmpgraph_t;plantuml-1.2017.15/src/h/Agcmpnode_t.java000066400000000000000000000043761312650303100177710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 cym8pkipa9u10pg85jps0y6fj public interface Agcmpnode_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct Agcmpnode_s", "{", "Agrec_t hdr", "Agraph_t *subg", "int collapsed", "}", "Agcmpnode_t"); } // typedef struct Agcmpnode_s { // Agrec_t hdr; // Agraph_t *subg; // int collapsed; // } Agcmpnode_t;plantuml-1.2017.15/src/h/Agdatadict_s.java000066400000000000000000000044661312650303100201200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 1wbtv41cwqamseppeo0vb4kjf public interface Agdatadict_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agdatadict_s", "{", "Agrec_t h", "struct", "{", "Dict_t *n, *e, *g", "}", "dict", "}"); } // struct Agdatadict_s { /* set of dictionaries per graph */ // Agrec_t h; /* installed in list of graph recs */ // struct { // Dict_t *n, *e, *g; // } dict; // };plantuml-1.2017.15/src/h/Agdatadict_t.java000066400000000000000000000041431312650303100201110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 cx24b8rdaygr5mrcvg063ostp public interface Agdatadict_t extends Agdatadict_s { public static List DEFINITION = Arrays.asList( "typedef struct Agdatadict_s Agdatadict_t"); } // typedef struct Agdatadict_s Agdatadict_t;plantuml-1.2017.15/src/h/Agdesc_s.java000066400000000000000000000054401312650303100172520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 drqmj6wswekevi9i4ghve61wj public interface Agdesc_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agdesc_s", "{", "unsigned directed:1", "unsigned strict:1", "unsigned no_loop:1", "unsigned maingraph:1", "unsigned flatlock:1", "unsigned no_write:1", "unsigned has_attrs:1", "unsigned has_cmpnd:1", "}"); } // struct Agdesc_s { /* graph descriptor */ // unsigned directed:1; /* if edges are asymmetric */ // unsigned strict:1; /* if multi-edges forbidden */ // unsigned no_loop:1; /* if no loops */ // unsigned maingraph:1; /* if this is the top level graph */ // unsigned flatlock:1; /* if sets are flattened into lists in cdt */ // unsigned no_write:1; /* if a temporary subgraph */ // unsigned has_attrs:1; /* if string attr tables should be initialized */ // unsigned has_cmpnd:1; /* if may contain collapsed nodes */ // };plantuml-1.2017.15/src/h/Agdesc_t.java000066400000000000000000000041131312650303100172470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 2nxdbvy3uxd7hzq9yspewhiy2 public interface Agdesc_t extends Agdesc_s { public static List DEFINITION = Arrays.asList( "typedef struct Agdesc_s Agdesc_t"); } // typedef struct Agdesc_s Agdesc_t;plantuml-1.2017.15/src/h/Agdisc_s.java000066400000000000000000000043571312650303100172640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 88aohxn7kudu5j4oxbyvcxvz9 public interface Agdisc_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agdisc_s", "{", "Agmemdisc_t *mem", "Agiddisc_t *id", "Agiodisc_t *io", "}"); } // struct Agdisc_s { /* user's discipline */ // Agmemdisc_t *mem; // Agiddisc_t *id; // Agiodisc_t *io; // };plantuml-1.2017.15/src/h/Agdisc_t.java000066400000000000000000000041131312650303100172530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 a75fiuk7wedgsbsb3dymg9c1c public interface Agdisc_t extends Agdisc_s { public static List DEFINITION = Arrays.asList( "typedef struct Agdisc_s Agdisc_t"); } // typedef struct Agdisc_s Agdisc_t;plantuml-1.2017.15/src/h/Agdstate_s.java000066400000000000000000000044311312650303100176170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 87jmuxk6h1j3ep0k0s2qz7fsb public interface Agdstate_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agdstate_s", "{", "void *mem", "void *id", "}"); } // struct Agdstate_s { // void *mem; // void *id; // /* IO must be initialized and finalized outside Cgraph, // * and channels (FILES) are passed as void* arguments. */ // };plantuml-1.2017.15/src/h/Agdstate_t.java000066400000000000000000000041271312650303100176220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 5kp1ggrs1pvfbdfrnl42a1l69 public interface Agdstate_t extends Agdstate_s { public static List DEFINITION = Arrays.asList( "typedef struct Agdstate_s Agdstate_t"); } // typedef struct Agdstate_s Agdstate_t;plantuml-1.2017.15/src/h/Agedge_s.java000066400000000000000000000044611312650303100172420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5g85sn734cnzkqf8sdgtdesgl public interface Agedge_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agedge_s", "{", "Agobj_t base", "Dtlink_t id_link", "Dtlink_t seq_link", "Agnode_t *node", "}"); } // struct Agedge_s { // Agobj_t base; // Dtlink_t id_link; /* main graph only */ // Dtlink_t seq_link; // Agnode_t *node; /* the endpoint node */ // };plantuml-1.2017.15/src/h/Agedge_t.java000066400000000000000000000041131312650303100172350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 at817e3s1icc92sqipan1gjl9 public interface Agedge_t extends Agedge_s { public static List DEFINITION = Arrays.asList( "typedef struct Agedge_s Agedge_t"); } // typedef struct Agedge_s Agedge_t;plantuml-1.2017.15/src/h/Agedgeinfo_t.java000066400000000000000000000063151312650303100201170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 c1b3tf6cmbwk2cvu1u6j2rduc public interface Agedgeinfo_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct Agedgeinfo_t", "{", "Agrec_t hdr", "splines *spl", "port tail_port, head_port", "textlabel_t *label, *head_label, *tail_label, *xlabel", "char edge_type", "char adjacent", "char label_ontop", "unsigned char gui_state", "edge_t *to_orig", "void *alg", "double factor", "double dist", "Ppolyline_t path", "unsigned char showboxes", "boolean conc_opp_flag", "short xpenalty", "int weight", "int cutvalue, tree_index", "short count", "unsigned short minlen", "edge_t *to_virt", "}", "Agedgeinfo_t"); } // typedef struct Agedgeinfo_t { // Agrec_t hdr; // splines *spl; // port tail_port, head_port; // textlabel_t *label, *head_label, *tail_label, *xlabel; // char edge_type; // char adjacent; /* true for flat edge with adjacent nodes */ // char label_ontop; // unsigned char gui_state; /* Edge state for GUI ops */ // edge_t *to_orig; /* for dot's shapes.c */ // void *alg; // // // double factor; // double dist; // Ppolyline_t path; // // // unsigned char showboxes; // boolean conc_opp_flag; // short xpenalty; // int weight; // int cutvalue, tree_index; // short count; // unsigned short minlen; // edge_t *to_virt; // // } Agedgeinfo_t;plantuml-1.2017.15/src/h/Agedgepair_s.java000066400000000000000000000042201312650303100201070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 57xqkv3rhmm29ure1eqi4xjwm public interface Agedgepair_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agedgepair_s", "{", "Agedge_t out, in", "}"); } // struct Agedgepair_s { // Agedge_t out, in; // };plantuml-1.2017.15/src/h/Agedgepair_t.java000066400000000000000000000041431312650303100201140ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 9y2h3138nynj283jcxucqmaib public interface Agedgepair_t extends Agedgepair_s { public static List DEFINITION = Arrays.asList( "typedef struct Agedgepair_s Agedgepair_t"); } // typedef struct Agedgepair_s Agedgepair_t;plantuml-1.2017.15/src/h/Agiddisc_s.java000066400000000000000000000057621312650303100176020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9v8qggm3xqq7ok84lmnkhvpv8 public interface Agiddisc_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agiddisc_s", "{", "void *(*open) (Agraph_t * g, Agdisc_t*)", "long (*map) (void *state, int objtype, char *str, unsigned long *id, int createflag)", "long (*alloc) (void *state, int objtype, unsigned long id)", "void (*free) (void *state, int objtype, unsigned long id)", "char *(*print) (void *state, int objtype, unsigned long id)", "void (*close) (void *state)", "void (*idregister) (void *state, int objtype, void *obj)", "}"); } // struct Agiddisc_s { /* object ID allocator */ // void *(*open) (Agraph_t * g, Agdisc_t*); /* associated with a graph */ // long (*map) (void *state, int objtype, char *str, unsigned long *id, // int createflag); // long (*alloc) (void *state, int objtype, unsigned long id); // void (*free) (void *state, int objtype, unsigned long id); // char *(*print) (void *state, int objtype, unsigned long id); // void (*close) (void *state); // void (*idregister) (void *state, int objtype, void *obj); // };plantuml-1.2017.15/src/h/Agiddisc_t.java000066400000000000000000000041271312650303100175750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 7fbm9w57ywtqk4kw5c3z6zwm1 public interface Agiddisc_t extends Agiddisc_s { public static List DEFINITION = Arrays.asList( "typedef struct Agiddisc_s Agiddisc_t"); } // typedef struct Agiddisc_s Agiddisc_t;plantuml-1.2017.15/src/h/Agiodisc_s.java000066400000000000000000000046301312650303100176060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 e7kjont9j5j3b97ohu5k7ur89 public interface Agiodisc_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agiodisc_s", "{", "int (*afread) (void *chan, char *buf, int bufsize)", "int (*putstr) (void *chan, const char *str)", "int (*flush) (void *chan)", "}"); } // struct Agiodisc_s { // int (*afread) (void *chan, char *buf, int bufsize); // int (*putstr) (void *chan, const char *str); // int (*flush) (void *chan); /* sync */ // /* error messages? */ // };plantuml-1.2017.15/src/h/Agiodisc_t.java000066400000000000000000000041271312650303100176100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 63k1fn4amvhaud4remizhg2ks public interface Agiodisc_t extends Agiodisc_s { public static List DEFINITION = Arrays.asList( "typedef struct Agiodisc_s Agiodisc_t"); } // typedef struct Agiodisc_s Agiodisc_t;plantuml-1.2017.15/src/h/Agmemdisc_s.java000066400000000000000000000051401312650303100177520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 366ph8t7jvjosq0zlqhb1g26x public interface Agmemdisc_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agmemdisc_s", "{", "void *(*open) (Agdisc_t*)", "void *(*alloc) (void *state, size_t req)", "void *(*resize) (void *state, void *ptr, size_t old, size_t req)", "void (*free) (void *state, void *ptr)", "void (*close) (void *state)", "}"); } // struct Agmemdisc_s { /* memory allocator */ // void *(*open) (Agdisc_t*); /* independent of other resources */ // void *(*alloc) (void *state, size_t req); // void *(*resize) (void *state, void *ptr, size_t old, size_t req); // void (*free) (void *state, void *ptr); // void (*close) (void *state); // };plantuml-1.2017.15/src/h/Agmemdisc_t.java000066400000000000000000000041351312650303100177560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 e2u8m7bby3ay236un81y217mm public interface Agmemdisc_t extends Agmemdisc_s { public static List DEFINITION = Arrays.asList( "typedef struct Agmemdisc_s Agmemdisc_t"); } // typedef struct Agmemdisc_s Agmemdisc_t;plantuml-1.2017.15/src/h/Agnode_s.java000066400000000000000000000043661312650303100172670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5h58ys5dc8q21vir1hk2r7xr7 public interface Agnode_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agnode_s", "{", "Agobj_t base", "Agraph_t *root", "Agsubnode_t mainsub", "}"); } // struct Agnode_s { // Agobj_t base; // Agraph_t *root; // Agsubnode_t mainsub; /* embedded for main graph */ // };plantuml-1.2017.15/src/h/Agnode_t.java000066400000000000000000000041131312650303100172560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 8eeq5jtusu1u57hjz90nc9i9m public interface Agnode_t extends Agnode_s { public static List DEFINITION = Arrays.asList( "typedef struct Agnode_s Agnode_t"); } // typedef struct Agnode_s Agnode_t;plantuml-1.2017.15/src/h/Agnodeinfo_t.java000066400000000000000000000077211312650303100201420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 da1kcmh9tvz6n7xaqw78dn4h8 public interface Agnodeinfo_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct Agnodeinfo_t", "{", "Agrec_t hdr", "shape_desc *shape", "void *shape_info", "pointf coord", "double width, height", "boxf bb", "double ht, lw, rw", "textlabel_t *label", "textlabel_t *xlabel", "void *alg", "char state", "unsigned char gui_state", "boolean clustnode", "unsigned char pinned", "int id, heapindex, hops", "double *pos, dist", "unsigned char showboxes", "boolean has_port", "node_t* rep", "node_t *set", "char node_type, mark, onstack", "char ranktype, weight_class", "node_t *next, *prev", "elist in, out, flat_out, flat_in, other", "graph_t *clust", "int UF_size", "node_t *UF_parent", "node_t *inleaf, *outleaf", "int rank, order", "double mval", "elist save_in, save_out", "elist tree_in, tree_out", "edge_t *par", "int low, lim", "int priority", "double pad[1]", "}", "Agnodeinfo_t"); } // typedef struct Agnodeinfo_t { // Agrec_t hdr; // shape_desc *shape; // void *shape_info; // pointf coord; // double width, height; /* inches */ // boxf bb; // double ht, lw, rw; // textlabel_t *label; // textlabel_t *xlabel; // void *alg; // char state; // unsigned char gui_state; /* Node state for GUI ops */ // boolean clustnode; // // // unsigned char pinned; // int id, heapindex, hops; // double *pos, dist; // // // unsigned char showboxes; // boolean has_port; // node_t* rep; // node_t *set; // // /* fast graph */ // char node_type, mark, onstack; // char ranktype, weight_class; // node_t *next, *prev; // elist in, out, flat_out, flat_in, other; // graph_t *clust; // // /* for union-find and collapsing nodes */ // int UF_size; // node_t *UF_parent; // node_t *inleaf, *outleaf; // // /* for placing nodes */ // int rank, order; /* initially, order = 1 for ordered edges */ // double mval; // elist save_in, save_out; // // /* for network-simplex */ // elist tree_in, tree_out; // edge_t *par; // int low, lim; // int priority; // // double pad[1]; // // // } Agnodeinfo_t;plantuml-1.2017.15/src/h/Agobj_s.java000066400000000000000000000042361312650303100171100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7fv7yqhmqaa7u2qszrcz1x603 public interface Agobj_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agobj_s", "{", "Agtag_t tag", "Agrec_t *data", "}"); } // struct Agobj_s { // Agtag_t tag; // Agrec_t *data; // };plantuml-1.2017.15/src/h/Agobj_t.java000066400000000000000000000041051312650303100171040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 cxj639s7ndfjcf3ku07ins96y public interface Agobj_t extends Agobj_s { public static List DEFINITION = Arrays.asList( "typedef struct Agobj_s Agobj_t"); } // typedef struct Agobj_s Agobj_t;plantuml-1.2017.15/src/h/Agraph_s.java000066400000000000000000000052111312650303100172620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5ho0f0m8hitlfq9j032lww947 public interface Agraph_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agraph_s", "{", "Agobj_t base", "Agdesc_t desc", "Dtlink_t link", "Dict_t *n_seq", "Dict_t *n_id", "Dict_t *e_seq, *e_id", "Dict_t *g_dict", "Agraph_t *parent, *root", "Agclos_t *clos", "}"); } // struct Agraph_s { // Agobj_t base; // Agdesc_t desc; // Dtlink_t link; // Dict_t *n_seq; /* the node set in sequence */ // Dict_t *n_id; /* the node set indexed by ID */ // Dict_t *e_seq, *e_id; /* holders for edge sets */ // Dict_t *g_dict; /* subgraphs - descendants */ // Agraph_t *parent, *root; /* subgraphs - ancestors */ // Agclos_t *clos; /* shared resources */ // };plantuml-1.2017.15/src/h/Agraph_t.java000066400000000000000000000041131312650303100172630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 aqw3i7b3unkie2w709gyzy18f public interface Agraph_t extends Agraph_s { public static List DEFINITION = Arrays.asList( "typedef struct Agraph_s Agraph_t"); } // typedef struct Agraph_s Agraph_t;plantuml-1.2017.15/src/h/Agraphinfo_t.java000066400000000000000000000116671312650303100201530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 2mtqmob86ayzjvuxgvhlg4ctl public interface Agraphinfo_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct Agraphinfo_t", "{", "Agrec_t hdr", "layout_t *drawing", "textlabel_t *label", "boxf bb", "pointf border[4]", "unsigned char gui_state", "unsigned char has_labels", "boolean has_images", "unsigned char charset", "int rankdir", "double ht1, ht2", "unsigned short flags", "void *alg", "GVC_t *gvc", "void (*cleanup) (graph_t * g)", "node_t **neato_nlist", "int move", "double **dist, **spring, **sum_t, ***t", "unsigned short ndim", "unsigned short odim", "int n_cluster", "graph_t **clust", "graph_t *dotroot", "node_t *nlist", "rank_t *rank", "graph_t *parent", "int level", "node_t *minrep, *maxrep", "nlist_t comp", "node_t *minset, *maxset", "long n_nodes", "short minrank, maxrank", "boolean has_flat_edges", "boolean has_sourcerank", "boolean has_sinkrank", "unsigned char showboxes", "fontname_kind fontnames", "int nodesep, ranksep", "node_t *ln, *rn", "node_t *leader, **rankleader", "boolean expanded", "char installed", "char set_type", "char label_pos", "boolean exact_ranksep", "}", "Agraphinfo_t"); } // typedef struct Agraphinfo_t { // Agrec_t hdr; // /* to generate code */ // layout_t *drawing; // textlabel_t *label; /* if the cluster has a title */ // boxf bb; /* bounding box */ // pointf border[4]; /* sizes of margins for graph labels */ // unsigned char gui_state; /* Graph state for GUI ops */ // unsigned char has_labels; // boolean has_images; // unsigned char charset; /* input character set */ // int rankdir; // double ht1, ht2; /* below and above extremal ranks */ // unsigned short flags; // void *alg; // GVC_t *gvc; /* context for "globals" over multiple graphs */ // void (*cleanup) (graph_t * g); /* function to deallocate layout-specific data */ // // // /* to place nodes */ // node_t **neato_nlist; // int move; // double **dist, **spring, **sum_t, ***t; // unsigned short ndim; // unsigned short odim; // // // /* to have subgraphs */ // int n_cluster; // graph_t **clust; /* clusters are in clust[1..n_cluster] !!! */ // graph_t *dotroot; // node_t *nlist; // rank_t *rank; // graph_t *parent; /* containing cluster (not parent subgraph) */ // int level; /* cluster nesting level (not node level!) */ // node_t *minrep, *maxrep; /* set leaders for min and max rank */ // // /* fast graph node list */ // nlist_t comp; // /* connected components */ // node_t *minset, *maxset; /* set leaders */ // long n_nodes; // /* includes virtual */ // short minrank, maxrank; // // /* various flags */ // boolean has_flat_edges; // boolean has_sourcerank; // boolean has_sinkrank; // unsigned char showboxes; // fontname_kind fontnames; /* to override mangling in SVG */ // // int nodesep, ranksep; // node_t *ln, *rn; /* left, right nodes of bounding box */ // // /* for clusters */ // node_t *leader, **rankleader; // boolean expanded; // char installed; // char set_type; // char label_pos; // boolean exact_ranksep; // // // } Agraphinfo_t;plantuml-1.2017.15/src/h/Agrec_s.java000066400000000000000000000043351312650303100171070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 87jgefxbqnrx426i1quuhv9a1 public interface Agrec_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agrec_s", "{", "char *name", "Agrec_t *next", "}"); } // struct Agrec_s { // char *name; // Agrec_t *next; // /* following this would be any programmer-defined data */ // };plantuml-1.2017.15/src/h/Agrec_t.java000066400000000000000000000041051312650303100171030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 6w4pxxbi3ief76hgbmcde192u public interface Agrec_t extends Agrec_s { public static List DEFINITION = Arrays.asList( "typedef struct Agrec_s Agrec_t"); } // typedef struct Agrec_s Agrec_t;plantuml-1.2017.15/src/h/Agsplice_arg_t.java000066400000000000000000000043561312650303100204520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6utnqddi1e85hs0re8q6xa1vy public interface Agsplice_arg_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct Agsplice_arg_s", "{", "int head_side", "Agnode_t *target", "}", "Agsplice_arg_t"); } // typedef struct Agsplice_arg_s { // int head_side; // Agnode_t *target; // } Agsplice_arg_t;plantuml-1.2017.15/src/h/Agsubnode_s.java000066400000000000000000000050031312650303100177660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 eykrclzau59zmxissqegaiilg public interface Agsubnode_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agsubnode_s", "{", "Dtlink_t seq_link", "Dtlink_t id_link", "Agnode_t *node", "Dtlink_t *in_id, *out_id", "Dtlink_t *in_seq, *out_seq", "}"); } // struct Agsubnode_s { /* the node-per-graph-or-subgraph record */ // Dtlink_t seq_link; /* must be first */ // Dtlink_t id_link; // Agnode_t *node; /* the object */ // Dtlink_t *in_id, *out_id; /* by node/ID for random access */ // Dtlink_t *in_seq, *out_seq; /* by node/sequence for serial access */ // };plantuml-1.2017.15/src/h/Agsubnode_t.java000066400000000000000000000041351312650303100177740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 df23022lk4w8conzi4uihoqpu public interface Agsubnode_t extends Agsubnode_s { public static List DEFINITION = Arrays.asList( "typedef struct Agsubnode_s Agsubnode_t"); } // typedef struct Agsubnode_s Agsubnode_t;plantuml-1.2017.15/src/h/Agsym_s.java000066400000000000000000000051061312650303100171430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 38c2s12koxcpi2c7vwl72qrsp public interface Agsym_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agsym_s", "{", "Dtlink_t link", "char *name", "char *defval", "int id", "unsigned char kind", "unsigned char fixed", "unsigned char print", "}"); } // struct Agsym_s { /* symbol in one of the above dictionaries */ // Dtlink_t link; // char *name; /* attribute's name */ // char *defval; /* its default value for initialization */ // int id; /* its index in attr[] */ // unsigned char kind; /* referent object type */ // unsigned char fixed; /* immutable value */ // unsigned char print; /* always print */ // };plantuml-1.2017.15/src/h/Agsym_t.java000066400000000000000000000041051312650303100171420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 c6lodtp6m9o7i924kguh8py09 public interface Agsym_t extends Agsym_s { public static List DEFINITION = Arrays.asList( "typedef struct Agsym_s Agsym_t"); } // typedef struct Agsym_s Agsym_t;plantuml-1.2017.15/src/h/Agtag_s.java000066400000000000000000000047741312650303100171200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 f4eovs59su6ztmd1h9rq229c2 public interface Agtag_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct Agtag_s", "{", "unsigned objtype:2", "unsigned mtflock:1", "unsigned attrwf:1", "unsigned seq:(sizeof(unsigned) * 8 - 4)", "unsigned long id", "}"); } // struct Agtag_s { // unsigned objtype:2; /* see literal tags below */ // unsigned mtflock:1; /* move-to-front lock, see above */ // unsigned attrwf:1; /* attrs written (parity, write.c) */ // unsigned seq:(sizeof(unsigned) * 8 - 4); /* sequence no. */ // unsigned long id; /* client ID */ // };plantuml-1.2017.15/src/h/Agtag_t.java000066400000000000000000000041051312650303100171050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 bfyeakqg0xg9gqt8ssajorir5 public interface Agtag_t extends Agtag_s { public static List DEFINITION = Arrays.asList( "typedef struct Agtag_s Agtag_t"); } // typedef struct Agtag_s Agtag_t;plantuml-1.2017.15/src/h/BestPos_t.java000066400000000000000000000043321312650303100174430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 42vrsrrzqoc36nrw8vum1390l public interface BestPos_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct best_p_s", "{", "int n", "double area", "pointf pos", "}", "BestPos_t"); } // typedef struct best_p_s { // int n; // double area; // pointf pos; // } BestPos_t;plantuml-1.2017.15/src/h/Branch_t.java000066400000000000000000000043141312650303100172610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 85dckzvbvghwxxfvifa6k6n9u public interface Branch_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct Branch", "{", "Rect_t rect", "struct Node *child", "}", "Branch_t"); } // typedef struct Branch { // Rect_t rect; // struct Node *child; // } Branch_t;plantuml-1.2017.15/src/h/Dict_t.java000066400000000000000000000040761312650303100167540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 2ggfcdw1rvmiwttzvdn3ew5b9 public interface Dict_t extends _dt_s { public static List DEFINITION = Arrays.asList( "typedef struct _dt_s Dict_t"); } // typedef struct _dt_s Dict_t;plantuml-1.2017.15/src/h/Dt_t.java000066400000000000000000000040671312650303100164400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 u1i3hxdborawdyw7d778quhw public interface Dt_t extends _dt_s { public static List DEFINITION = Arrays.asList( "typedef struct _dt_s Dt_t"); } // typedef struct _dt_s Dt_t;plantuml-1.2017.15/src/h/Dtcompar_f.java000066400000000000000000000042321312650303100176160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8l0hamj2h9wjmxntnfif8qr0u public interface Dtcompar_f extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef int (*Dtcompar_f)(Dt_t*,void*,void*,Dtdisc_t*)"); } // typedef int (*Dtcompar_f)(Dt_t*,void*,void*,Dtdisc_t*);plantuml-1.2017.15/src/h/Dtdata_t.java000066400000000000000000000041161312650303100172650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 864wtxvrdrty5k31pa1h7jqki public interface Dtdata_t extends _dtdata_s { public static List DEFINITION = Arrays.asList( "typedef struct _dtdata_s Dtdata_t"); } // typedef struct _dtdata_s Dtdata_t;plantuml-1.2017.15/src/h/Dtdisc_t.java000066400000000000000000000041161312650303100172760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 3n3lg4dzicyo9pzjj6bv0krf5 public interface Dtdisc_t extends _dtdisc_s { public static List DEFINITION = Arrays.asList( "typedef struct _dtdisc_s Dtdisc_t"); } // typedef struct _dtdisc_s Dtdisc_t;plantuml-1.2017.15/src/h/Dtevent_f.java000066400000000000000000000042231312650303100174560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 aok6h7reyx9aof9o5x8vmhrdl public interface Dtevent_f extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef int (*Dtevent_f)(Dt_t*,int,void*,Dtdisc_t*)"); } // typedef int (*Dtevent_f)(Dt_t*,int,void*,Dtdisc_t*);plantuml-1.2017.15/src/h/Dtfree_f.java000066400000000000000000000042141312650303100172560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 77oaerxzxja1o4hf22u53nx0q public interface Dtfree_f extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef void (*Dtfree_f)(Dt_t*,void*,Dtdisc_t*)"); } // typedef void (*Dtfree_f)(Dt_t*,void*,Dtdisc_t*);plantuml-1.2017.15/src/h/Dthash_f.java000066400000000000000000000042301312650303100172560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 df6rxih396i1t0qdbcbr992aw public interface Dthash_f extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef unsigned int (*Dthash_f)(Dt_t*,void*,Dtdisc_t*)"); } // typedef unsigned int (*Dthash_f)(Dt_t*,void*,Dtdisc_t*);plantuml-1.2017.15/src/h/Dthold_t.java000066400000000000000000000041161312650303100173020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 1tob3f90syune1bxwbffctfmj public interface Dthold_t extends _dthold_s { public static List DEFINITION = Arrays.asList( "typedef struct _dthold_s Dthold_t"); } // typedef struct _dthold_s Dthold_t;plantuml-1.2017.15/src/h/Dtlink_t.java000066400000000000000000000041161312650303100173110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 8y38rtlesz0zzh2ncgic680by public interface Dtlink_t extends _dtlink_s { public static List DEFINITION = Arrays.asList( "typedef struct _dtlink_s Dtlink_t"); } // typedef struct _dtlink_s Dtlink_t;plantuml-1.2017.15/src/h/Dtmake_f.java000066400000000000000000000042141312650303100172520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9m2e8f1zyiy1pfo2wn5pxlrd4 public interface Dtmake_f extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef void* (*Dtmake_f)(Dt_t*,void*,Dtdisc_t*)"); } // typedef void* (*Dtmake_f)(Dt_t*,void*,Dtdisc_t*);plantuml-1.2017.15/src/h/Dtmemory_f.java000066400000000000000000000042401312650303100176440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4zc871fjqyem7alnz2wj8tbr1 public interface Dtmemory_f extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef void* (*Dtmemory_f)(Dt_t*,void*,size_t,Dtdisc_t*)"); } // typedef void* (*Dtmemory_f)(Dt_t*,void*,size_t,Dtdisc_t*);plantuml-1.2017.15/src/h/Dtmethod_t.java000066400000000000000000000041311312650303100176310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 14xcg8o7gvv98a59xu3dtokd public interface Dtmethod_t extends _dtmethod_s { public static List DEFINITION = Arrays.asList( "typedef struct _dtmethod_s Dtmethod_t"); } // typedef struct _dtmethod_s Dtmethod_t;plantuml-1.2017.15/src/h/Dtsearch_f.java000066400000000000000000000042061312650303100176030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 aagzksky19to67t04s3ajytr4 public interface Dtsearch_f extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef void* (*Dtsearch_f)(Dt_t*,void*,int)"); } // typedef void* (*Dtsearch_f)(Dt_t*,void*,int);plantuml-1.2017.15/src/h/Dtstat_t.java000066400000000000000000000041161312650303100173270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 1r5lk2p40u9awvooeu2vq9dks public interface Dtstat_t extends _dtstat_s { public static List DEFINITION = Arrays.asList( "typedef struct _dtstat_s Dtstat_t"); } // typedef struct _dtstat_s Dtstat_t;plantuml-1.2017.15/src/h/GVCOMMON_t.java000066400000000000000000000054501312650303100173130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3xlydw5hu2becv89l6tup8eo public interface GVCOMMON_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct GVCOMMON_s", "{", "char **info", "char *cmdname", "int verbose", "boolean config, auto_outfile_names", "void (*errorfn) (const char *fmt, ...)", "const char **show_boxes", "const char **lib", "int viewNum", "const lt_symlist_t *builtins", "int demand_loading", "}", "GVCOMMON_t"); } // typedef struct GVCOMMON_s { // char **info; // char *cmdname; // int verbose; // boolean config, auto_outfile_names; // void (*errorfn) (const char *fmt, ...); // const char **show_boxes; /* emit code for correct box coordinates */ // const char **lib; // // /* rendering state */ // int viewNum; /* current view - 1 based count of views, // all pages in all layers */ // const lt_symlist_t *builtins; // int demand_loading; // } GVCOMMON_t;plantuml-1.2017.15/src/h/GVC_s.java000066400000000000000000000130551312650303100165040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 clpjw996k49ieh47hl09lwwq1 public interface GVC_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct GVC_s", "{", "GVCOMMON_t common", "char *config_path", "boolean config_found", "char **input_filenames", "GVG_t *gvgs", "GVG_t *gvg", "gvplugin_available_t *apis[ +1 +1 +1 +1 +1 ]", "gvplugin_available_t *api[ +1 +1 +1 +1 +1 ]", "gvplugin_package_t *packages", "size_t (*write_fn) (GVJ_t *job, const char *s, size_t len)", "Dtdisc_t textfont_disc", "Dt_t *textfont_dt", "gvplugin_active_textlayout_t textlayout", "GVJ_t *jobs", "GVJ_t *job", "graph_t *g", "gvplugin_active_layout_t layout", "char *graphname", "GVJ_t *active_jobs", "char *pagedir", "pointf margin", "pointf pad", "pointf pageSize", "point pb", "boxf bb", "int rotation", "boolean graph_sets_pad, graph_sets_margin, graph_sets_pageSize, graph_sets_rotation", "char *layerDelims", "char *layerListDelims", "char *layers", "char **layerIDs", "int numLayers", "int *layerlist", "char *defaultfontname", "double defaultfontsize", "char **defaultlinestyle", "gvcolor_t bgcolor", "int fontrenaming", "}"); } // struct GVC_s { // GVCOMMON_t common; // // char *config_path; // boolean config_found; // // /* gvParseArgs */ // char **input_filenames; /* null terminated array of input filenames */ // // /* gvNextInputGraph() */ // GVG_t *gvgs; /* linked list of graphs */ // GVG_t *gvg; /* current graph */ // // /* plugins */ // // /* APIS expands to "+1 +1 ... +1" to give the number of APIs */ // gvplugin_available_t *apis[ +1 +1 +1 +1 +1 ]; /* array of linked-list of plugins per api */ // gvplugin_available_t *api[ +1 +1 +1 +1 +1 ]; /* array of current plugins per api */ // // gvplugin_package_t *packages; /* list of available packages */ // // /* externally provided write() displine */ // size_t (*write_fn) (GVJ_t *job, const char *s, size_t len); // // /* fonts and textlayout */ // Dtdisc_t textfont_disc; // Dt_t *textfont_dt; // gvplugin_active_textlayout_t textlayout; /* always use best avail for all jobs */ // // void (*free_layout) (void *layout); /* function for freeing layouts (mostly used by pango) */ // // /* FIXME - everything below should probably move to GVG_t */ // // /* gvrender_config() */ // GVJ_t *jobs; /* linked list of jobs */ // GVJ_t *job; /* current job */ // // graph_t *g; /* current graph */ // // /* gvrender_begin_job() */ // gvplugin_active_layout_t layout; // // char *graphname; /* name from graph */ // GVJ_t *active_jobs; /* linked list of active jobs */ // // /* pagination */ // char *pagedir; /* pagination order */ // pointf margin; /* margins in graph units */ // pointf pad; /* pad in graph units */ // pointf pageSize; /* pageSize in graph units, not including margins */ // point pb; /* page size - including margins (inches) */ // boxf bb; /* graph bb in graph units, not including margins */ // int rotation; /* rotation - 0 = portrait, 90 = landscape */ // boolean graph_sets_pad, graph_sets_margin, graph_sets_pageSize, graph_sets_rotation; // // /* layers */ // char *layerDelims; /* delimiters in layer names */ // char *layerListDelims; /* delimiters between layer ranges */ // char *layers; /* null delimited list of layer names */ // char **layerIDs; /* array of layer names */ // int numLayers; /* number of layers */ // int *layerlist; // // /* default font */ // char *defaultfontname; // double defaultfontsize; // // /* default line style */ // char **defaultlinestyle; // // /* render defaults set from graph */ // gvcolor_t bgcolor; /* background color */ // // /* whether to mangle font names (at least in SVG), usually false */ // int fontrenaming; // };plantuml-1.2017.15/src/h/GVC_t.java000066400000000000000000000040701312650303100165020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 fg8z912mbk6t13fn38q7zn7l public interface GVC_t extends GVC_s { public static List DEFINITION = Arrays.asList( "typedef struct GVC_s GVC_t"); } // typedef struct GVC_s GVC_t;plantuml-1.2017.15/src/h/GVG_s.java000066400000000000000000000045631312650303100165140ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 cvpkcmk8fwmnuwmcjl85zzkxc public interface GVG_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct GVG_s", "{", "GVC_t *gvc", "GVG_t *next", "char *input_filename", "int graph_index", "graph_t *g", "}"); } // struct GVG_s { // GVC_t *gvc; /* parent gvc */ // GVG_t *next; /* next gvg in list */ // // char *input_filename; /* or NULL if stdin */ // int graph_index; /* index of graph within input_file */ // graph_t *g; // };plantuml-1.2017.15/src/h/GVG_t.java000066400000000000000000000040711312650303100165070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 3h2jjekexv13eg90o5lqy1d0j public interface GVG_t extends GVG_s { public static List DEFINITION = Arrays.asList( "typedef struct GVG_s GVG_t"); } // typedef struct GVG_s GVG_t;plantuml-1.2017.15/src/h/GVJ_s.java000066400000000000000000000165261312650303100165210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 dg8cqsmppn0zl04sycueci9yw public interface GVJ_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct GVJ_s", "{", "GVC_t *gvc", "GVJ_t *next", "GVJ_t *next_active", "GVCOMMON_t *common", "obj_state_t *obj", "char *input_filename", "int graph_index", "const char *layout_type", "const char *output_filename", "FILE *output_file", "char *output_data", "unsigned int output_data_allocated", "unsigned int output_data_position", "const char *output_langname", "int output_lang", "gvplugin_active_render_t render", "gvplugin_active_device_t device", "gvplugin_active_loadimage_t loadimage", "gvdevice_callbacks_t *callbacks", "pointf device_dpi", "boolean device_sets_dpi", "void *display", "int screen", "void *context", "boolean external_context", "char *imagedata", "int flags", "int numLayers", "int layerNum", "point pagesArraySize", "point pagesArrayFirst", "point pagesArrayMajor", "point pagesArrayMinor", "point pagesArrayElem", "int numPages", "boxf bb", "pointf pad", "boxf clip", "boxf pageBox", "pointf pageSize", "pointf focus", "double zoom", "int rotation", "pointf view", "boxf canvasBox", "pointf margin", "pointf dpi", "unsigned int width", "unsigned int height", "box pageBoundingBox", "box boundingBox", "pointf scale", "pointf translation", "pointf devscale", "boolean fit_mode, needs_refresh, click, has_grown, has_been_rendered", "unsigned char button", "pointf pointer", "pointf oldpointer", "void *current_obj", "void *selected_obj", "char *active_tooltip", "char *selected_href", "gv_argvlist_t selected_obj_type_name", "gv_argvlist_t selected_obj_attributes", "void *window", "gvevent_key_binding_t *keybindings", "int numkeys", "void *keycodes", "}"); } // struct GVJ_s { // GVC_t *gvc; /* parent gvc */ // GVJ_t *next; /* linked list of jobs */ // GVJ_t *next_active; /* linked list of active jobs (e.g. multiple windows) */ // // GVCOMMON_t *common; // // obj_state_t *obj; /* objects can be nested (at least clusters can) // so keep object state on a stack */ // char *input_filename; // int graph_index; // // const char *layout_type; // // const char *output_filename; // FILE *output_file; // char *output_data; // unsigned int output_data_allocated; // unsigned int output_data_position; // // const char *output_langname; // int output_lang; // // gvplugin_active_render_t render; // gvplugin_active_device_t device; // gvplugin_active_loadimage_t loadimage; // gvdevice_callbacks_t *callbacks; // pointf device_dpi; // boolean device_sets_dpi; // // void *display; // int screen; // // void *context; /* gd or cairo surface */ // boolean external_context; /* context belongs to caller */ // char *imagedata; /* location of imagedata */ // // int flags; /* emit_graph flags */ // // int numLayers; /* number of layers */ // int layerNum; /* current layer - 1 based*/ // // point pagesArraySize; /* 2D size of page array */ // point pagesArrayFirst;/* 2D starting corner in */ // point pagesArrayMajor;/* 2D major increment */ // point pagesArrayMinor;/* 2D minor increment */ // point pagesArrayElem; /* 2D coord of current page - 0,0 based */ // int numPages; /* number of pages */ // // boxf bb; /* graph bb with padding - graph units */ // pointf pad; /* padding around bb - graph units */ // boxf clip; /* clip region in graph units */ // boxf pageBox; /* current page in graph units */ // pointf pageSize; /* page size in graph units */ // pointf focus; /* viewport focus - graph units */ // // double zoom; /* viewport zoom factor (points per graph unit) */ // int rotation; /* viewport rotation (degrees) 0=portrait, 90=landscape */ // // pointf view; /* viewport size - points */ // boxf canvasBox; /* viewport area - points */ // pointf margin; /* job-specific margin - points */ // // pointf dpi; /* device resolution device-units-per-inch */ // // unsigned int width; /* device width - device units */ // unsigned int height; /* device height - device units */ // box pageBoundingBox;/* rotated boundingBox - device units */ // box boundingBox; /* cumulative boundingBox over all pages - device units */ // // pointf scale; /* composite device to graph units (zoom and dpi) */ // pointf translation; /* composite translation */ // pointf devscale; /* composite device to points: dpi, y_goes_down */ // // boolean fit_mode, // needs_refresh, // click, // has_grown, // has_been_rendered; // // unsigned char button; /* active button */ // pointf pointer; /* pointer position in device units */ // pointf oldpointer; /* old pointer position in device units */ // // void *current_obj; /* graph object that pointer is in currently */ // // void *selected_obj; /* graph object that has been selected */ // /* (e.g. button 1 clicked on current obj) */ // char *active_tooltip; /* tooltip of active object - or NULL */ // char *selected_href; /* href of selected object - or NULL */ // gv_argvlist_t selected_obj_type_name; /* (e.g. "edge" "node3" "e" "->" "node5" "") */ // gv_argvlist_t selected_obj_attributes; /* attribute triplets: name, value, type */ // /* e.g. "color", "red", GVATTR_COLOR, // "style", "filled", GVATTR_BOOL, */ // // void *window; /* display-specific data for gvrender plugin */ // // /* keybindings for keyboard events */ // gvevent_key_binding_t *keybindings; // int numkeys; // void *keycodes; // };plantuml-1.2017.15/src/h/GVJ_t.java000066400000000000000000000040711312650303100165120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 1emyokhi9lvf2dq2tz1mt5lq6 public interface GVJ_t extends GVJ_s { public static List DEFINITION = Arrays.asList( "typedef struct GVJ_s GVJ_t"); } // typedef struct GVJ_s GVJ_t;plantuml-1.2017.15/src/h/Grid.java000066400000000000000000000040661312650303100164320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 4i6l1ddogjsyl2pt4s30fqmwy public interface Grid extends _grid { public static List DEFINITION = Arrays.asList( "typedef struct _grid Grid"); } // typedef struct _grid Grid;plantuml-1.2017.15/src/h/HDict_t.java000066400000000000000000000043201312650303100170540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 d6n85f1kdf00c97r9x4uf3hdy public interface HDict_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct obyh", "{", "Dtlink_t link", "int key", "Leaf_t d", "}", "HDict_t"); } // typedef struct obyh { // Dtlink_t link; // int key; // Leaf_t d; // } HDict_t;plantuml-1.2017.15/src/h/IMapEntry_t.java000066400000000000000000000045051312650303100177360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 et72dr7wfb74xjns0mtbfof0b public interface IMapEntry_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct IMapEntry_s", "{", "Dtlink_t namedict_link", "Dtlink_t iddict_link", "unsigned long id", "char *str", "}", "IMapEntry_t"); } // typedef struct IMapEntry_s { // Dtlink_t namedict_link; // Dtlink_t iddict_link; // unsigned long id; // char *str; // } IMapEntry_t;plantuml-1.2017.15/src/h/LeafList_t.java000066400000000000000000000043361312650303100175730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5wb626r2549k6hvj4smr38atg public interface LeafList_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct LeafList", "{", "struct LeafList *next", "Leaf_t *leaf", "}", "LeafList_t"); } // typedef struct LeafList { // struct LeafList *next; // Leaf_t *leaf; // } LeafList_t;plantuml-1.2017.15/src/h/Leaf_t.java000066400000000000000000000042621312650303100167350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 222l43uzb7c0te92wbi9jdkk4 public interface Leaf_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct Leaf", "{", "Rect_t rect", "void *data", "}", "Leaf_t"); } // typedef struct Leaf { // Rect_t rect; // void *data; // } Leaf_t;plantuml-1.2017.15/src/h/ListNode_t.java000066400000000000000000000043501312650303100176050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 2e7wm1x0xyl1l19f34nw52e1c public interface ListNode_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct ListNode", "{", "struct ListNode *next", "struct Node *node", "}", "ListNode_t"); } // typedef struct ListNode { // struct ListNode *next; // struct Node *node; // } ListNode_t;plantuml-1.2017.15/src/h/MPairDisc.java000066400000000000000000000042711312650303100173560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4elpghprbfhy6q6283wnrh4wv public interface MPairDisc extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Dtdisc_t disc", "mpair *flist", "}", "MPairDisc"); } // typedef struct { // Dtdisc_t disc; // mpair *flist; // } MPairDisc;plantuml-1.2017.15/src/h/PartitionVars.java000066400000000000000000000045111312650303100203450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3bl1j8t9m914f4j86dshaf3ec public interface PartitionVars extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct PartitionVars", "{", "int partition[64 + 1]", "int taken[64 + 1]", "int count[2]", "struct Rect cover[2]", "int area[2]", "}"); } // struct PartitionVars { // int partition[64 + 1]; // int taken[64 + 1]; // int count[2]; // struct Rect cover[2]; // int area[2]; // };plantuml-1.2017.15/src/h/Pedge_t.java000066400000000000000000000042371312650303100171140ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 2nvsp26kuu9u7ogyjj0s4xc6g public interface Pedge_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct Pedge_t", "{", "Ppoint_t a, b", "}", "Pedge_t"); } // typedef struct Pedge_t { // Ppoint_t a, b; // } Pedge_t;plantuml-1.2017.15/src/h/PostscriptAlias.java000066400000000000000000000050631312650303100206670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 bz3dqxllqmg9suinb2cpbn15d public interface PostscriptAlias extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct _PostscriptAlias", "{", "char* name", "char* family", "char* weight", "char* stretch", "char* style", "int xfig_code", "char* svg_font_family", "char* svg_font_weight", "char* svg_font_style", "}", "PostscriptAlias"); } // typedef struct _PostscriptAlias { // char* name; // char* family; // char* weight; // char* stretch; // char* style; // int xfig_code; // char* svg_font_family; // char* svg_font_weight; // char* svg_font_style; // } PostscriptAlias;plantuml-1.2017.15/src/h/Ppoint_t.java000066400000000000000000000041521312650303100173350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.pointf_s; //2 5ih4079ytax8x1xfcnbvykspw public interface Ppoint_t extends pointf_s { public static List DEFINITION = Arrays.asList( "typedef struct pointf_s Ppoint_t"); } // typedef struct pointf_s Ppoint_t;plantuml-1.2017.15/src/h/Ppoly_t.java000066400000000000000000000042631312650303100171720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 e64uez8phkm446sopxainj3um public interface Ppoly_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct Ppoly_t", "{", "Ppoint_t *ps", "int pn", "}", "Ppoly_t"); } // typedef struct Ppoly_t { // Ppoint_t *ps; // int pn; // } Ppoly_t;plantuml-1.2017.15/src/h/Pvector_t.java000066400000000000000000000041551312650303100175110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.pointf_s; //2 7u6ia0m5l63lzjsh8q9g4m0z0 public interface Pvector_t extends pointf_s { public static List DEFINITION = Arrays.asList( "typedef struct pointf_s Pvector_t"); } // typedef struct pointf_s Pvector_t;plantuml-1.2017.15/src/h/Pxy_t.java000066400000000000000000000042211312650303100166410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6l32s8asvxzjzhd33lym87bk6 public interface Pxy_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct Pxy_t", "{", "double x, y", "}", "Pxy_t"); } // typedef struct Pxy_t { // double x, y; // } Pxy_t;plantuml-1.2017.15/src/h/RTree.java000066400000000000000000000066511312650303100165700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6erg9dnjb8l3vavlty90aui6v public interface RTree extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct RTree", "{", "Node_t *root", "SplitQ_t split", "int MinFill", "long ElapsedTime", "float UserTime, SystemTime", "int Deleting", "int StatFlag", "int InsertCount", "int DeleteCount", "int ReInsertCount", "int InSplitCount", "int DeSplitCount", "int ElimCount", "int EvalCount", "int InTouchCount", "int DeTouchCount", "int SeTouchCount", "int CallCount", "float SplitMeritSum", "int RectCount", "int NodeCount", "int LeafCount, NonLeafCount", "int EntryCount", "int SearchCount", "int HitCount", "}"); } // struct RTree { // Node_t *root; // // SplitQ_t split; // // /* balance criterion for node splitting */ // int MinFill; // // /* times */ // long ElapsedTime; // float UserTime, SystemTime; // // int Deleting; // // /* variables for statistics */ // int StatFlag; /* tells if we are counting or not */ // /* counters affected only when StatFlag set */ // int InsertCount; // int DeleteCount; // int ReInsertCount; // int InSplitCount; // int DeSplitCount; // int ElimCount; // int EvalCount; // int InTouchCount; // int DeTouchCount; // int SeTouchCount; // int CallCount; // float SplitMeritSum; // // /* counters used even when StatFlag not set */ // int RectCount; // int NodeCount; // int LeafCount, NonLeafCount; // int EntryCount; // int SearchCount; // int HitCount; // // };plantuml-1.2017.15/src/h/RTree_t.java000066400000000000000000000040771312650303100171130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 2mpm2fft75drx0k0by8s54asw public interface RTree_t extends RTree { public static List DEFINITION = Arrays.asList( "typedef struct RTree RTree_t"); } // typedef struct RTree RTree_t;plantuml-1.2017.15/src/h/Rect_t.java000066400000000000000000000042351312650303100167630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 32vghhci9sc1tdk0jb8p5rlhk public interface Rect_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct Rect", "{", "int boundary[2*2]", "}", "Rect_t"); } // typedef struct Rect { // int boundary[2*2]; // } Rect_t;plantuml-1.2017.15/src/h/ST_Agdesc_s.java000066400000000000000000000117441312650303100176640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import smetana.core.HardcodedStruct; import smetana.core.UnsupportedStarStruct; import smetana.core.UnsupportedStruct; import smetana.core.UnsupportedStructAndPtr; import smetana.core.__struct__; import smetana.core.amiga.Area; import smetana.core.amiga.AreaInt; import smetana.core.amiga.InternalData; import smetana.core.amiga.StarStruct; public class ST_Agdesc_s extends UnsupportedStructAndPtr implements HardcodedStruct { public int directed; /* if edges are asymmetric */ public int strict; /* if multi-edges forbidden */ public int no_loop; /* if no loops */ public int maingraph; /* if this is the top level graph */ public int flatlock; /* if sets are flattened into lists in cdt */ public int no_write; /* if a temporary subgraph */ public int has_attrs; /* if string attr tables should be initialized */ public int has_cmpnd; /* if may contain collapsed nodes */ public ST_Agdesc_s() { this(null); } public ST_Agdesc_s(StarStruct parent) { } @Override public __struct__ copy() { final ST_Agdesc_s result = new ST_Agdesc_s(); result.directed = directed; result.strict = strict; result.no_loop = no_loop; result.maingraph = maingraph; result.flatlock = flatlock; result.no_write = no_write; result.has_attrs = has_attrs; result.has_cmpnd = has_cmpnd; return result; } @Override public void copyDataFrom(__struct__ other) { ST_Agdesc_s other2 = (ST_Agdesc_s) other; directed = other2.directed; strict = other2.strict; no_loop = other2.no_loop; maingraph = other2.maingraph; flatlock = other2.flatlock; no_write = other2.no_write; has_attrs = other2.has_attrs; has_cmpnd = other2.has_cmpnd; } public class MyInternalData extends UnsupportedStarStruct implements InternalData { @Override public Area getArea(String name) { final AreaInt result = new AreaInt(); if (name.equals("directed")) { result.setInternal(directed); return result; } if (name.equals("strict")) { result.setInternal(strict); return result; } if (name.equals("no_loop")) { result.setInternal(no_loop); return result; } if (name.equals("maingraph")) { result.setInternal(maingraph); return result; } if (name.equals("flatlock")) { result.setInternal(flatlock); return result; } if (name.equals("no_write")) { result.setInternal(no_write); return result; } if (name.equals("has_attrs")) { result.setInternal(has_attrs); return result; } if (name.equals("has_cmpnd")) { result.setInternal(has_cmpnd); return result; } return super.getArea(name); } } @Override public StarStruct getInternalData() { return new MyInternalData(); } } // struct Agdesc_s { /* graph descriptor */ // unsigned directed:1; /* if edges are asymmetric */ // unsigned strict:1; /* if multi-edges forbidden */ // unsigned no_loop:1; /* if no loops */ // unsigned maingraph:1; /* if this is the top level graph */ // unsigned flatlock:1; /* if sets are flattened into lists in cdt */ // unsigned no_write:1; /* if a temporary subgraph */ // unsigned has_attrs:1; /* if string attr tables should be initialized */ // unsigned has_cmpnd:1; /* if may contain collapsed nodes */ // };plantuml-1.2017.15/src/h/ST_Agiddisc_s.java000066400000000000000000000076221312650303100202050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import smetana.core.CFunction; import smetana.core.UnsupportedStarStruct; import smetana.core.UnsupportedStruct; import smetana.core.__ptr__; import smetana.core.amiga.StarStruct; public class ST_Agiddisc_s extends UnsupportedStruct { public CFunction open; public CFunction map; public CFunction alloc; public CFunction free; public CFunction print; public CFunction close; public CFunction idregister; @Override public StarStruct amp() { return new UnsupportedStarStruct() { @Override public Object call(String fieldName, Object... args) { if (fieldName.equals("open")) { return open.exe(args); } if (fieldName.equals("map")) { return map.exe(args); } if (fieldName.equals("idregister")) { return idregister.exe(args); } if (fieldName.equals("print")) { return print.exe(args); } return super.call(fieldName, args); } @Override public __ptr__ getPtr(String fieldName) { if (fieldName.equals("print")) { return print; } return super.getPtr(fieldName); } }; } // public static List DEFINITION = Arrays.asList( // "struct Agiddisc_s", // "{", // "void *(*open) (Agraph_t * g, Agdisc_t*)", // "long (*map) (void *state, int objtype, char *str, unsigned long *id, int createflag)", // "long (*alloc) (void *state, int objtype, unsigned long id)", // "void (*free) (void *state, int objtype, unsigned long id)", // "char *(*print) (void *state, int objtype, unsigned long id)", // "void (*close) (void *state)", // "void (*idregister) (void *state, int objtype, void *obj)", // "}"); } // struct Agiddisc_s { /* object ID allocator */ // void *(*open) (Agraph_t * g, Agdisc_t*); /* associated with a graph */ // long (*map) (void *state, int objtype, char *str, unsigned long *id, // int createflag); // long (*alloc) (void *state, int objtype, unsigned long id); // void (*free) (void *state, int objtype, unsigned long id); // char *(*print) (void *state, int objtype, unsigned long id); // void (*close) (void *state); // void (*idregister) (void *state, int objtype, void *obj); // };plantuml-1.2017.15/src/h/ST_Agmemdisc_s.java000066400000000000000000000061711312650303100203650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import smetana.core.CFunction; import smetana.core.UnsupportedStarStruct; import smetana.core.UnsupportedStruct; import smetana.core.amiga.StarStruct; public class ST_Agmemdisc_s extends UnsupportedStruct { public CFunction open; public CFunction alloc; public CFunction resize; public CFunction free; public CFunction close; @Override public StarStruct amp() { return new UnsupportedStarStruct() { @Override public Object call(String fieldName, Object... args) { if (fieldName.equals("open")) { return open.exe(args); } if (fieldName.equals("alloc")) { return alloc.exe(args); } return super.call(fieldName, args); } }; } // public static List DEFINITION = Arrays.asList( // "struct Agmemdisc_s", // "{", // "void *(*open) (Agdisc_t*)", // "void *(*alloc) (void *state, size_t req)", // "void *(*resize) (void *state, void *ptr, size_t old, size_t req)", // "void (*free) (void *state, void *ptr)", // "void (*close) (void *state)", // "}"); } // struct Agmemdisc_s { /* memory allocator */ // void *(*open) (Agdisc_t*); /* independent of other resources */ // void *(*alloc) (void *state, size_t req); // void *(*resize) (void *state, void *ptr, size_t old, size_t req); // void (*free) (void *state, void *ptr); // void (*close) (void *state); // };plantuml-1.2017.15/src/h/ST_Agtag_s.java000066400000000000000000000122761312650303100175220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import smetana.core.HardcodedStruct; import smetana.core.UnsupportedStarStruct; import smetana.core.UnsupportedStructAndPtr; import smetana.core.__struct__; import smetana.core.amiga.Area; import smetana.core.amiga.AreaInt; import smetana.core.amiga.InternalData; import smetana.core.amiga.StarStruct; public class ST_Agtag_s extends UnsupportedStructAndPtr implements HardcodedStruct { public int objtype; public int mtflock; public int attrwf; public int seq; public int id; public ST_Agtag_s(StarStruct parent) { } public ST_Agtag_s() { this(null); } @Override public Class getRealClass() { return Agtag_s.class; } @Override public __struct__ copy() { final ST_Agtag_s result = new ST_Agtag_s(); result.objtype = objtype; result.mtflock = mtflock; result.attrwf = attrwf; result.seq = seq; result.id = id; return result; } @Override public void copyDataFrom(__struct__ other) { // if (other instanceof ST_Agtag_s) { final ST_Agtag_s other2 = (ST_Agtag_s) other; objtype = other2.objtype; mtflock = other2.mtflock; attrwf = other2.attrwf; seq = other2.seq; id = other2.id; // } else { // objtype = other.getInt("objtype"); // mtflock = other.getInt("mtflock"); // attrwf = other.getInt("attrwf"); // seq = other.getInt("seq"); // id = other.getInt("id"); // } } @Override public void memcopyFrom(Area source) { final ST_Agtag_s other2 = (ST_Agtag_s) source; objtype = other2.objtype; mtflock = other2.mtflock; attrwf = other2.attrwf; seq = other2.seq; id = other2.id; } @Override public void ___(__struct__ other) { copyDataFrom(other); } @Override public Area getArea(String name) { final AreaInt result = new AreaInt(); if (name.equals("objtype")) { result.setInternal(objtype); return result; } if (name.equals("mtflock")) { result.setInternal(mtflock); return result; } if (name.equals("attrwf")) { result.setInternal(attrwf); return result; } if (name.equals("seq")) { result.setInternal(seq); return result; } if (name.equals("id")) { result.setInternal(id); return result; } return super.getArea(name); } public class MyInternalData extends UnsupportedStarStruct implements InternalData { @Override public Area getArea(String name) { final AreaInt result = new AreaInt(); if (name.equals("objtype")) { result.setInternal(objtype); return result; } if (name.equals("mtflock")) { result.setInternal(mtflock); return result; } if (name.equals("attrwf")) { result.setInternal(attrwf); return result; } if (name.equals("seq")) { result.setInternal(seq); return result; } if (name.equals("id")) { result.setInternal(id); return result; } return super.getArea(name); } } @Override public StarStruct getInternalData() { return new MyInternalData(); } // public static List DEFINITION = Arrays.asList( // "struct Agtag_s", // "{", // "unsigned objtype:2", // "unsigned mtflock:1", // "unsigned attrwf:1", // "unsigned seq:(sizeof(unsigned) * 8 - 4)", // "unsigned long id", // "}"); } // struct Agtag_s { // unsigned objtype:2; /* see literal tags below */ // unsigned mtflock:1; /* move-to-front lock, see above */ // unsigned attrwf:1; /* attrs written (parity, write.c) */ // unsigned seq:(sizeof(unsigned) * 8 - 4); /* sequence no. */ // unsigned long id; /* client ID */ // };plantuml-1.2017.15/src/h/ST_arrowname_t.java000066400000000000000000000047271312650303100204750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import smetana.core.CString; import smetana.core.UnsupportedStructAndPtr; import smetana.core.__struct__; public class ST_arrowname_t extends UnsupportedStructAndPtr { public CString name; public int type; @Override public void ___(__struct__ other) { ST_arrowname_t other2 = (ST_arrowname_t) other; this.name = other2.name == null ? null : other2.name.duplicate(); this.type = other2.type; } // public static List DEFINITION = Arrays.asList( // "typedef struct arrowname_t", // "{", // "char *name", // "int type", // "}", // "arrowname_t"); } // typedef struct arrowname_t { // char *name; // int type; // } arrowname_t;plantuml-1.2017.15/src/h/ST_arrowtype_t.java000066400000000000000000000063361312650303100205340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import smetana.core.CFunction; import smetana.core.UnsupportedStructAndPtr; import smetana.core.__ptr__; import smetana.core.__struct__; public class ST_arrowtype_t extends UnsupportedStructAndPtr { public int type; public double lenfact; public CFunction gen; @Override public void ___(__struct__ other) { ST_arrowtype_t other2 = (ST_arrowtype_t) other; type = other2.type; lenfact = other2.lenfact; gen = other2.gen; } @Override public int getInt(String fieldName) { if (fieldName.equals("type")) { return type; } return super.getInt(fieldName); } @Override public double getDouble(String fieldName) { if (fieldName.equals("lenfact")) { return lenfact; } return super.getDouble(fieldName); } @Override public __ptr__ getPtr(String fieldName) { if (fieldName.equals("gen")) { return gen; } return super.getPtr(fieldName); } // public static List DEFINITION = Arrays.asList( // "typedef struct arrowtype_t", // "{", // "int type", // "double lenfact", // "void (*gen) (GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag)", // "}", // "arrowtype_t"); } // typedef struct arrowtype_t { // int type; // double lenfact; /* ratio of length of this arrow type to standard arrow */ // void (*gen) (GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag); /* generator function for // type */ // } arrowtype_t;plantuml-1.2017.15/src/h/ST_boxf.java000066400000000000000000000106451312650303100171110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import smetana.core.HardcodedStruct; import smetana.core.UnsupportedStarStruct; import smetana.core.UnsupportedStructAndPtr; import smetana.core.__ptr__; import smetana.core.__struct__; import smetana.core.amiga.StarStruct; public class ST_boxf extends UnsupportedStructAndPtr implements HardcodedStruct { public final ST_pointf LL = new ST_pointf(this); public final ST_pointf UR = new ST_pointf(this); public ST_boxf(StarStruct parent) { } public ST_boxf() { } // @Override // public void setStruct(__struct__ value) { // final ST_boxf other = (ST_boxf) value; // this.LL.setStruct(other.LL); // this.UR.setStruct(other.UR); // } @Override public __struct__ getStruct(String fieldName) { // if (fieldName.equals("LL")) { // return LL; // } // if (fieldName.equals("UR")) { // return UR; // } return super.getStruct(fieldName); } public __struct__ getStructInternal(String fieldName) { if (fieldName.equals("LL")) { return LL; } if (fieldName.equals("UR")) { return UR; } throw new IllegalArgumentException(); } @Override public void setStruct(String fieldName, __struct__ newData) { if (fieldName.equals("LL")) { this.LL.setStruct(newData); return; } if (fieldName.equals("UR")) { this.UR.setStruct(newData); return; } super.setStruct(fieldName, newData); } @Override public ST_boxf copy() { final ST_boxf result = new ST_boxf(); result.LL.copyDataFrom((__struct__) this.LL); result.UR.copyDataFrom((__struct__) this.UR); return result; } @Override public void copyDataFrom(__struct__ value) { final ST_boxf other = (ST_boxf) value; this.LL.setStruct(other.LL); this.UR.setStruct(other.UR); } // @Override // public void copyDataFrom(__ptr__ value) { // final ST_boxf other = (ST_boxf) value; // this.LL.setStruct(other.LL); // this.UR.setStruct(other.UR); // } @Override public void ___(__struct__ value) { final ST_boxf other = (ST_boxf) value; this.LL.setStruct(other.LL); this.UR.setStruct(other.UR); } class Amp extends UnsupportedStarStruct { @Override public __struct__ getStruct(String fieldName) { if (fieldName.equals("LL")) { return LL; } if (fieldName.equals("UR")) { return UR; } return super.getStruct(fieldName); } @Override public __struct__ getStruct() { return ST_boxf.this; } } @Override public StarStruct amp() { return new Amp(); } // public interface ST_boxf extends __ptr__ { // public static List DEFINITION = Arrays.asList( // "typedef struct", // "{", // "pointf LL, UR", // "}", // "boxf"); } // typedef struct { pointf LL, UR; } boxf;plantuml-1.2017.15/src/h/ST_dtdisc_s.java000066400000000000000000000103071312650303100177420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import smetana.core.CFunction; import smetana.core.UnsupportedStarStruct; import smetana.core.UnsupportedStructAndPtr; import smetana.core.__ptr__; import smetana.core.amiga.StarStruct; public class ST_dtdisc_s extends UnsupportedStructAndPtr { public int key; /* where the key begins in an object */ public int size; /* key size and type */ public int link; /* offset to Dtlink_t field */ public CFunction makef; /* object constructor */ public CFunction freef; /* object destructor */ public CFunction comparf;/* to compare two objects */ public CFunction hashf; /* to compute hash value of an object */ public CFunction memoryf;/* to allocate/free memory */ public CFunction eventf; /* to process events */ public ST_dtdisc_s(StarStruct parent) { } public ST_dtdisc_s() { this(null); } class Amp extends UnsupportedStarStruct { private final ST_dtdisc_s parent; public Amp(ST_dtdisc_s me) { parent = me; } @Override public boolean isSameThan(StarStruct other) { final Amp other2 = (Amp) other; return parent == other2.parent; } @Override public __ptr__ getPtr(String fieldName) { if (fieldName.equals("memoryf")) { return memoryf; } if (fieldName.equals("eventf")) { return eventf; } if (fieldName.equals("comparf")) { return comparf; } if (fieldName.equals("makef")) { return makef; } return super.getPtr(fieldName); } @Override public int getInt(String fieldName) { if (fieldName.equals("key")) { return key; } if (fieldName.equals("size")) { return size; } if (fieldName.equals("link")) { return link; } return super.getInt(fieldName); } @Override public __ptr__ setPtr(String fieldName, __ptr__ newData) { if (fieldName.equals("memoryf")) { memoryf = (CFunction) newData; return newData; } return super.setPtr(fieldName, newData); } } @Override public StarStruct amp() { return new Amp(this); } } // struct _dtdisc_s // { int key; /* where the key begins in an object */ // int size; /* key size and type */ // int link; /* offset to Dtlink_t field */ // Dtmake_f makef; /* object constructor */ // Dtfree_f freef; /* object destructor */ // Dtcompar_f comparf;/* to compare two objects */ // Dthash_f hashf; /* to compute hash value of an object */ // Dtmemory_f memoryf;/* to allocate/free memory */ // Dtevent_f eventf; /* to process events */ // };plantuml-1.2017.15/src/h/ST_dtmethod_s.java000066400000000000000000000060001312650303100202730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import smetana.core.CFunction; import smetana.core.UnsupportedStarStruct; import smetana.core.UnsupportedStruct; import smetana.core.__ptr__; import smetana.core.amiga.StarStruct; public class ST_dtmethod_s extends UnsupportedStruct { public CFunction searchf; public int type; // public static List DEFINITION = Arrays.asList( // "struct _dtmethod_s", // "{", // "Dtsearch_f searchf", // "int type", // "}"); @Override public ST_dtmethod_s copy() { final ST_dtmethod_s result = new ST_dtmethod_s(); result.searchf = this.searchf; result.type = this.type; return result; } @Override public StarStruct amp() { return new UnsupportedStarStruct() { @Override public int getInt(String fieldName) { if (fieldName.equals("type")) { return type; } return super.getInt(fieldName); } @Override public __ptr__ getPtr(String fieldName) { if (fieldName.equals("searchf")) { return searchf; } return super.getPtr(fieldName); } @Override public Object call(String fieldName, Object... args) { if (fieldName.equals("searchf")) { return searchf.exe(args); } return super.call(fieldName, args); } }; } }plantuml-1.2017.15/src/h/ST_elist.java000066400000000000000000000122161312650303100172670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.ArrayList; import java.util.List; import smetana.core.HardcodedStruct; import smetana.core.UnsupportedArrayOfPtr; import smetana.core.UnsupportedStarStruct; import smetana.core.UnsupportedStructAndPtr; import smetana.core.__array_of_ptr__; import smetana.core.__ptr__; import smetana.core.__struct__; import smetana.core.amiga.StarStruct; public class ST_elist extends UnsupportedStructAndPtr implements HardcodedStruct { public int size; private List list; public ST_elist() { this(null); } public ST_elist(StarStruct parent) { } @Override public void copyDataFrom(__struct__ other) { ST_elist other2 = (ST_elist) other; this.size = other2.size; this.list = other2.list; } @Override public void ___(__struct__ other) { ST_elist other2 = (ST_elist) other; this.size = other2.size; this.list = other2.list; } @Override public ST_elist copy() { final ST_elist result = new ST_elist(); result.size = this.size; result.list = this.list; return result; } public boolean listNotNull() { return list != null; } public void mallocEmpty(Class cl, int nb) { list = new ArrayList(); while (list.size() < nb) { list.add(null); } } class ArrayOfPtr extends UnsupportedArrayOfPtr { private int pos; private ArrayOfPtr(int pos) { this.pos = pos; } @Override public __array_of_ptr__ plus(int delta) { return new ArrayOfPtr(pos + delta); } @Override public void setPtr(__ptr__ value) { list.set(pos, value); } @Override public __ptr__ getPtr() { return (__ptr__) list.get(pos); } } class Amp extends UnsupportedStarStruct { @Override public int getInt(String fieldName) { if (fieldName.equals("size")) { return size; } return ST_elist.this.getInt(fieldName); } @Override public void setInt(String fieldName, int data) { if (fieldName.equals("size")) { size = data; return; } ST_elist.this.setInt(fieldName, data); } @Override public __array_of_ptr__ getArrayOfPtr(String fieldName) { if (fieldName.equals("list")) { if (list == null) { return null; } return new ArrayOfPtr(0); } return ST_elist.this.getArrayOfPtr(fieldName); } } @Override public StarStruct amp() { return new Amp(); } public void realloc(int nb) { if (list == null) { list = new ArrayList(); } while (list.size() < nb) { list.add(null); } } class Ptr extends UnsupportedStructAndPtr { private final int pos; public Ptr(int pos) { this.pos = pos; } @Override public __ptr__ plus(int pointerMove) { return new Ptr(pos + pointerMove); } @Override public __ptr__ getPtr() { return (__ptr__) list.get(pos); } } public void free() { list = null; } public void setInList(int idx, Object value) { list.set(idx, value); } public __ptr__ getFromList(int i) { return (__ptr__) list.get(i); } public __ptr__ getTheList() { if (list == null) { throw new IllegalStateException(); } return new Ptr(0); } public __array_of_ptr__ getTheArray() { if (list == null) { throw new IllegalStateException(); } return new ArrayOfPtr(0); } // public static List DEFINITION = Arrays.asList( // "typedef struct elist", // "{", // "edge_t **list", // "int size", // "}", // "elist"); } // typedef struct elist { // edge_t **list; // int size; // } elist;plantuml-1.2017.15/src/h/ST_nlist_t.java000066400000000000000000000056731312650303100176340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.ArrayList; import java.util.List; import smetana.core.HardcodedStruct; import smetana.core.UnsupportedStructAndPtr; import smetana.core.__ptr__; import smetana.core.amiga.StarStruct; public class ST_nlist_t extends UnsupportedStructAndPtr implements HardcodedStruct { // public __ptr__ list; public int size; private final List data = new ArrayList(); public ST_nlist_t(StarStruct parent) { } public ST_nlist_t() { this(null); } public void reallocEmpty(int n_nodes, Class class1) { while (data.size() < n_nodes) { data.add(null); } } public void allocEmpty(int n_nodes, Class class1) { data.clear(); reallocEmpty(n_nodes, class1); } public void setInList(int idx, Agnode_s value) { data.set(idx, value); } public __ptr__ getFromList(int i) { return (__ptr__) data.get(i); } public void resetList() { data.clear(); } // public static List DEFINITION = Arrays.asList( // "typedef struct nlist_t", // "{", // "node_t **list", // "int size", // "}", // "nlist_t"); } // typedef struct nlist_t { // node_t **list; // int size; // } nlist_t;plantuml-1.2017.15/src/h/ST_pointf.java000066400000000000000000000122051312650303100174440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import smetana.core.HardcodedStruct; import smetana.core.UnsupportedStarStruct; import smetana.core.UnsupportedStructAndPtr; import smetana.core.__array_of_ptr__; import smetana.core.__ptr__; import smetana.core.__struct__; import smetana.core.amiga.Area; import smetana.core.amiga.StarArrayOfPtr; import smetana.core.amiga.StarArrayOfStruct; import smetana.core.amiga.StarStruct; public class ST_pointf extends UnsupportedStructAndPtr implements HardcodedStruct { public double x; public double y; public ST_pointf() { this(null); } public class Amp extends UnsupportedStarStruct { public double getX() { return x; } public double getY() { return y; } public void setX(double value) { x = value; } public void setY(double value) { y = value; } @Override public __struct__ getStruct() { return ST_pointf.this; } @Override public double getDouble(String fieldName) { return ST_pointf.this.getDouble(fieldName); } @Override public void setStruct(__struct__ value) { ST_pointf.this.setStruct(value); } } @Override public __struct__ copy() { final ST_pointf result = new ST_pointf(); result.x = this.x; result.y = this.y; return result; } @Override public void setStruct(__struct__ value) { final ST_pointf other2 = (ST_pointf) value; this.x = other2.x; this.y = other2.y; } @Override public void memcopyFrom(Area source) { if (source instanceof StarArrayOfPtr) { final Amp other2 = (Amp) ((StarArrayOfPtr) source).getPtr(); this.x = other2.getX(); this.y = other2.getY(); return; } final ST_pointf other2 = (ST_pointf) source; this.x = other2.x; this.y = other2.y; } @Override public void ___(__struct__ other) { final ST_pointf other2 = (ST_pointf) other; this.x = other2.x; this.y = other2.y; } @Override public void ____(__ptr__ other) { if (other instanceof __array_of_ptr__) { Amp other2 = (Amp) other.getPtr(); this.x = other2.getX(); this.y = other2.getY(); return; } if (other instanceof StarArrayOfPtr) { Amp other2 = (Amp) other.getPtr(); this.x = other2.getX(); this.y = other2.getY(); return; } if (other instanceof StarArrayOfStruct) { Amp other2 = (Amp) other.getPtr(); this.x = other2.getX(); this.y = other2.getY(); return; } System.err.println("other=" + other.getClass()); System.err.println("other=" + other.getPtr().getClass()); super.____(other); } @Override public void copyDataFrom(__struct__ other) { final ST_pointf other2 = (ST_pointf) other; this.x = other2.x; this.y = other2.y; } @Override public StarStruct amp() { return new Amp(); } @Override public double getDouble(String fieldName) { if (fieldName.equals("x")) { return x; } if (fieldName.equals("y")) { return y; } return super.getDouble(fieldName); } @Override public void setDouble(String fieldName, double data) { if (fieldName.equals("x")) { this.x = data; return; } if (fieldName.equals("y")) { this.y = data; return; } super.setDouble(fieldName, data); } public ST_pointf(StarStruct parent) { } // public interface ST_pointf extends __ptr__ { // public static List DEFINITION = Arrays.asList( // "typedef struct pointf_s", // "{", // "double x, y", // "}", // "pointf"); } // typedef struct pointf_s { double x, y; } pointf;plantuml-1.2017.15/src/h/ST_port.java000066400000000000000000000154511312650303100171370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import javax.swing.text.html.CSS; import smetana.core.CString; import smetana.core.HardcodedStruct; import smetana.core.UnsupportedStarStruct; import smetana.core.UnsupportedStructAndPtr; import smetana.core.__ptr__; import smetana.core.__struct__; import smetana.core.amiga.Area; import smetana.core.amiga.StarStruct; public class ST_port extends UnsupportedStructAndPtr implements HardcodedStruct { public final ST_pointf p = new ST_pointf(this); public double theta; public ST_boxf.Amp bp; public int defined; public int constrained; public int clip; public int dyna; public int order; public int side; public CString name; public ST_port(StarStruct parent) { } public ST_port() { } @Override public void ___(__struct__ other) { ST_port other2 = (ST_port) other; this.p.___(other2.p); this.theta = other2.theta; this.bp = other2.bp; this.defined = other2.defined; this.constrained = other2.constrained; this.clip = other2.clip; this.dyna = other2.dyna; this.order = other2.order; this.side = other2.side; this.name = other2.name; } @Override public void copyDataFrom(__struct__ other) { ST_port other2 = (ST_port) other; this.p.___(other2.p); this.theta = other2.theta; this.bp = other2.bp; this.defined = other2.defined; this.constrained = other2.constrained; this.clip = other2.clip; this.dyna = other2.dyna; this.order = other2.order; this.side = other2.side; this.name = other2.name; } @Override public void memcopyFrom(Area other) { ST_port other2 = (ST_port) other; this.p.___(other2.p); this.theta = other2.theta; this.bp = other2.bp; this.defined = other2.defined; this.constrained = other2.constrained; this.clip = other2.clip; this.dyna = other2.dyna; this.order = other2.order; this.side = other2.side; this.name = other2.name; } @Override public ST_port copy() { final ST_port result = new ST_port(); result.p.___(this.p); result.theta = this.theta; result.bp = this.bp; result.defined = this.defined; result.constrained = this.constrained; result.clip = this.clip; result.dyna = this.dyna; result.order = this.order; result.side = this.side; result.name = this.name; return result; } @Override public __struct__ getStruct(String fieldName) { if (fieldName.equals("p")) { return p; } return super.getStruct(fieldName); } @Override public void setStruct(String fieldName, __struct__ newData) { if (fieldName.equals("p")) { p.copyDataFrom(newData); return; } super.setStruct(fieldName, newData); } @Override public boolean getBoolean(String fieldName) { if (fieldName.equals("constrained")) { return constrained != 0; } if (fieldName.equals("dyna")) { return dyna != 0; } return super.getBoolean(fieldName); } @Override public void setBoolean(String fieldName, boolean data) { if (fieldName.equals("constrained")) { constrained = data ? 1 : 0; return; } super.setBoolean(fieldName, data); } @Override public void setInt(String fieldName, int data) { if (fieldName.equals("constrained")) { constrained = data; return; } super.setInt(fieldName, data); } @Override public int getInt(String fieldName) { if (fieldName.equals("clip")) { return clip; } if (fieldName.equals("order")) { return order; } if (fieldName.equals("side")) { return side; } return super.getInt(fieldName); } public class Amp extends UnsupportedStarStruct { } @Override public StarStruct amp() { return new Amp(); } @Override public __ptr__ getPtr(String fieldName) { if (fieldName.equals("bp")) { return bp; } return super.getPtr(fieldName); } @Override public void setDouble(String fieldName, double data) { if (fieldName.equals("theta")) { this.theta = data; return; } super.setDouble(fieldName, data); } @Override public double getDouble(String fieldName) { if (fieldName.equals("theta")) { return theta; } return super.getDouble(fieldName); } // "typedef struct port", // "{", // "pointf p", // "double theta", // "boxf *bp", // "boolean defined", // "boolean constrained", // "boolean clip", // "boolean dyna", // "unsigned char order", // "unsigned char side", // "char *name", // "}", // "port"); } // typedef struct port { /* internal edge endpoint specification */ // pointf p; /* aiming point relative to node center */ // double theta; /* slope in radians */ // boxf *bp; /* if not null, points to bbox of // * rectangular area that is port target // */ // boolean defined; /* if true, edge has port info at this end */ // boolean constrained; /* if true, constraints such as theta are set */ // boolean clip; /* if true, clip end to node/port shape */ // boolean dyna; /* if true, assign compass point dynamically */ // unsigned char order; /* for mincross */ // unsigned char side; /* if port is on perimeter of node, this // * contains the bitwise OR of the sides (TOP, // * BOTTOM, etc.) it is on. // */ // char *name; /* port name, if it was explicitly given, otherwise NULL */ // } port;plantuml-1.2017.15/src/h/SplitQ_t.java000066400000000000000000000046261312650303100173060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5la7qmeq461s77rfwh637x31k public interface SplitQ_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct split_q_s", "{", "struct Branch BranchBuf[64 + 1]", "struct Rect CoverSplit", "unsigned int CoverSplitArea", "struct PartitionVars Partitions[1]", "}", "SplitQ_t"); } // typedef struct split_q_s { // struct Branch BranchBuf[64 + 1]; // struct Rect CoverSplit; // unsigned int CoverSplitArea; // struct PartitionVars Partitions[1]; // } SplitQ_t;plantuml-1.2017.15/src/h/XLabels_t.java000066400000000000000000000047271312650303100174260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5g5jopfxwib4iq0tncmxengai public interface XLabels_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct XLabels_s", "{", "object_t *objs", "int n_objs", "xlabel_t *lbls", "int n_lbls", "label_params_t *params", "Dt_t *hdx", "RTree_t *spdx", "}", "XLabels_t"); } // typedef struct XLabels_s { // object_t *objs; // int n_objs; // xlabel_t *lbls; // int n_lbls; // label_params_t *params; // // Dt_t *hdx; // splay tree keyed with hilbert spatial codes // RTree_t *spdx; // rtree // // } XLabels_t;plantuml-1.2017.15/src/h/YYSTYPE.java000066400000000000000000000044661312650303100167370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 23p91jqzwh8asa1yejjd5avb1 public interface YYSTYPE extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef union YYSTYPE", "{", "int i", "char *str", "struct Agnode_s *n", "}", "YYSTYPE"); } // typedef union YYSTYPE // { // /* Line 2049 of yacc.c */ // // // int i; // char *str; // struct Agnode_s *n; // // // /* Line 2049 of yacc.c */ // // } YYSTYPE;plantuml-1.2017.15/src/h/_Note_t___.java000066400000000000000000000044201312650303100175630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 aqoki3wwzhqcy2mpz21vzdona public interface _Note_t___ extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct Node", "{", "int count", "int level", "struct Branch branch[64]", "}", "Node_t"); } // typedef struct Node { // int count; // int level; /* 0 is leaf, others positive */ // struct Branch branch[64]; // } Node_t;plantuml-1.2017.15/src/h/_dt_s.java000066400000000000000000000053271312650303100166360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 926gualwyh744kklf86qw5qsj public interface _dt_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct _dt_s", "{", "Dtsearch_f searchf", "Dtdisc_t* disc", "Dtdata_t* data", "Dtmemory_f memoryf", "Dtmethod_t* meth", "int type", "int nview", "Dt_t* view", "Dt_t* walk", "void* user", "}"); } // struct _dt_s // { Dtsearch_f searchf;/* search function */ // Dtdisc_t* disc; /* method to manipulate objs */ // Dtdata_t* data; /* sharable data */ // Dtmemory_f memoryf;/* function to alloc/free memory */ // Dtmethod_t* meth; /* dictionary method */ // int type; /* type information */ // int nview; /* number of parent view dictionaries */ // Dt_t* view; /* next on viewpath */ // Dt_t* walk; /* dictionary being walked */ // void* user; /* for user's usage */ // };plantuml-1.2017.15/src/h/_dtdata_s.java000066400000000000000000000052451312650303100174670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 2ncfjhm10yijctdn20pwnelos public interface _dtdata_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct _dtdata_s", "{", "int type", "Dtlink_t* here", "union", "{", "Dtlink_t** _htab", "Dtlink_t* _head", "}", "hh", "int ntab", "int size", "int loop", "int minp", "}"); } // struct _dtdata_s // { int type; /* type of dictionary */ // Dtlink_t* here; /* finger to last search element */ // union // { Dtlink_t** _htab; /* hash table */ // Dtlink_t* _head; /* linked list */ // } hh; // int ntab; /* number of hash slots */ // int size; /* number of objects */ // int loop; /* number of nested loops */ // int minp; /* min path before splay, always even */ // /* for hash dt, > 0: fixed table size */ // };plantuml-1.2017.15/src/h/_dtdisc_s.java000066400000000000000000000052701312650303100174760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7uiwhqnseej0oaqiv35vi47k1 public interface _dtdisc_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct _dtdisc_s", "{", "int key", "int size", "int link", "Dtmake_f makef", "Dtfree_f freef", "Dtcompar_f comparf", "Dthash_f hashf", "Dtmemory_f memoryf", "Dtevent_f eventf", "}"); } // struct _dtdisc_s // { int key; /* where the key begins in an object */ // int size; /* key size and type */ // int link; /* offset to Dtlink_t field */ // Dtmake_f makef; /* object constructor */ // Dtfree_f freef; /* object destructor */ // Dtcompar_f comparf;/* to compare two objects */ // Dthash_f hashf; /* to compute hash value of an object */ // Dtmemory_f memoryf;/* to allocate/free memory */ // Dtevent_f eventf; /* to process events */ // };plantuml-1.2017.15/src/h/_dthold_s.java000066400000000000000000000042711312650303100175020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 bj5vks4vb3mb95f68v6qwe1q public interface _dthold_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct _dthold_s", "{", "Dtlink_t hdr", "void* obj", "}"); } // struct _dthold_s // { Dtlink_t hdr; /* header */ // void* obj; /* user object */ // };plantuml-1.2017.15/src/h/_dtlink_s.java000066400000000000000000000044771312650303100175210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6b881ar4wz3iwu5spghy0ocnj public interface _dtlink_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct _dtlink_s", "{", "Dtlink_t* right", "union", "{", "unsigned int _hash", "Dtlink_t* _left", "}", "hl", "}"); } // struct _dtlink_s // { Dtlink_t* right; /* right child */ // union // { unsigned int _hash; /* hash value */ // Dtlink_t* _left; /* left child */ // } hl; // };plantuml-1.2017.15/src/h/_dtmethod_s.java000066400000000000000000000043301312650303100200300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4djfx98e5oxk0jjryvk4600wt public interface _dtmethod_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct _dtmethod_s", "{", "Dtsearch_f searchf", "int type", "}"); } // struct _dtmethod_s // { Dtsearch_f searchf; /* search function */ // int type; /* type of operation */ // };plantuml-1.2017.15/src/h/_dtstat_s.java000066400000000000000000000046271312650303100175340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 d0ga3dn66q62mmy36kk5eorat public interface _dtstat_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct _dtstat_s", "{", "int dt_meth", "int dt_size", "int dt_n", "int dt_max", "int* dt_count", "}"); } // struct _dtstat_s // { int dt_meth; /* method type */ // int dt_size; /* number of elements */ // int dt_n; /* number of chains or levels */ // int dt_max; /* max size of a chain or a level */ // int* dt_count; /* counts of chains or levels by size */ // };plantuml-1.2017.15/src/h/_grid.java000066400000000000000000000047751312650303100166400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 bzaoe3mouoxna5q5cxl3fdw6b public interface _grid extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct _grid", "{", "Dt_t *data", "block_t *cellMem", "block_t *cellCur", "int listSize", "node_list *listMem", "node_list *listCur", "}"); } // struct _grid { // Dt_t *data; /* cells indexed by (i,j) */ // block_t *cellMem; /* list of memory blocks for cells */ // block_t *cellCur; /* current block */ // int listSize; /* memory of nodes */ // node_list *listMem; /* list of memory for node items */ // node_list *listCur; /* next node item */ // };plantuml-1.2017.15/src/h/_vmalloc_s.java000066400000000000000000000042001312650303100176510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 39v3r26qnl4xc35g69w1abt28 public interface _vmalloc_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct _vmalloc_s", "{", "char unused", "}"); } // struct _vmalloc_s { // char unused; // };plantuml-1.2017.15/src/h/_xdot_op.java000066400000000000000000000061661312650303100173630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8n228pyy8v750bhs0ubxnx0l9 public interface _xdot_op extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct _xdot_op", "{", "xdot_kind kind", "union", "{", "xdot_rect ellipse", "xdot_polyline polygon", "xdot_polyline polyline", "xdot_polyline bezier", "xdot_text text", "xdot_image image", "char* color", "xdot_color grad_color", "xdot_font font", "char* style", "unsigned int fontchar", "}", "u", "drawfunc_t drawfunc", "}"); } // struct _xdot_op { // xdot_kind kind; // union { // xdot_rect ellipse; /* xd_filled_ellipse, xd_unfilled_ellipse */ // xdot_polyline polygon; /* xd_filled_polygon, xd_unfilled_polygon */ // xdot_polyline polyline; /* xd_polyline */ // xdot_polyline bezier; /* xd_filled_bezier, xd_unfilled_bezier */ // xdot_text text; /* xd_text */ // xdot_image image; /* xd_image */ // char* color; /* xd_fill_color, xd_pen_color */ // xdot_color grad_color; /* xd_grad_fill_color, xd_grad_pen_color */ // xdot_font font; /* xd_font */ // char* style; /* xd_style */ // unsigned int fontchar; /* xd_fontchar */ // } u; // drawfunc_t drawfunc; // };plantuml-1.2017.15/src/h/aag_buffer_state.java000066400000000000000000000042201312650303100210160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 e7lgo132acoi1iqay15jxdzl9 public interface aag_buffer_state extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct aag_buffer_state *YY_BUFFER_STATE"); } // typedef struct aag_buffer_state *YY_BUFFER_STATE;plantuml-1.2017.15/src/h/aag_trans_info.java000066400000000000000000000043301312650303100205110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8hrh4p1c1600bqkq54h8v51u7 public interface aag_trans_info extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct aag_trans_info", "{", "flex_int32_t aag_verify", "flex_int32_t aag_nxt", "}"); } // struct aag_trans_info // { // flex_int32_t aag_verify; // flex_int32_t aag_nxt; // };plantuml-1.2017.15/src/h/adjmatrix_t.java000066400000000000000000000043261312650303100200520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 lba1kw4oxusponhglgarjnj1 public interface adjmatrix_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct adjmatrix_t", "{", "int nrows, ncols", "char *data", "}", "adjmatrix_t"); } // typedef struct adjmatrix_t { // int nrows, ncols; // char *data; // } adjmatrix_t;plantuml-1.2017.15/src/h/agerrlevel_t.java000066400000000000000000000042541312650303100202170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 eplx3pd5fkm68aeae4k6rwmj7 public interface agerrlevel_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "AGWARN, AGERR, AGMAX, AGPREV", "}", "agerrlevel_t"); } // typedef enum { AGWARN, AGERR, AGMAX, AGPREV } agerrlevel_t;plantuml-1.2017.15/src/h/agobjfn_t.java000066400000000000000000000042551312650303100174760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 af6h9515752o3oaywyt2y8x34 public interface agobjfn_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef void (*agobjfn_t) (Agraph_t * g, Agobj_t * obj, void *arg)"); } // typedef void (*agobjfn_t) (Agraph_t * g, Agobj_t * obj, void *arg);plantuml-1.2017.15/src/h/agobjsearchfn_t.java000066400000000000000000000042611312650303100206610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 dr9rtwhzssf8aypcenb0z3tfy public interface agobjsearchfn_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef Agobj_t *(*agobjsearchfn_t) (Agraph_t * g, Agobj_t * obj)"); } // typedef Agobj_t *(*agobjsearchfn_t) (Agraph_t * g, Agobj_t * obj);plantuml-1.2017.15/src/h/agobjupdfn_t.java000066400000000000000000000043511312650303100202040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8ezqpl2zflq85hy4pay4rex52 public interface agobjupdfn_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef void (*agobjupdfn_t) (Agraph_t * g, Agobj_t * obj, void *arg, Agsym_t * sym)"); } // typedef void (*agobjupdfn_t) (Agraph_t * g, Agobj_t * obj, void *arg, // Agsym_t * sym);plantuml-1.2017.15/src/h/agusererrf.java000066400000000000000000000041541312650303100177100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 dar3eyxi2ee4qldba8o9a54az public interface agusererrf extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef int (*agusererrf) (char*)"); } // typedef int (*agusererrf) (char*);plantuml-1.2017.15/src/h/agxbuf.java000066400000000000000000000045651312650303100170250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 2bvk4wwyb3pp3ygpa39hp9xqw public interface agxbuf extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "unsigned char *buf", "unsigned char *ptr", "unsigned char *eptr", "int dyna", "}", "agxbuf"); } // typedef struct { // unsigned char *buf; /* start of buffer */ // unsigned char *ptr; /* next place to write */ // unsigned char *eptr; /* end of buffer */ // int dyna; /* true if buffer is malloc'ed */ // } agxbuf;plantuml-1.2017.15/src/h/ainfo.java000066400000000000000000000043251312650303100166370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 aqlnras6a8pluk7ulr2jzajlz public interface ainfo extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "double width, height", "int index", "}", "ainfo"); } // typedef struct { // double width, height; // int index; /* index in original array */ // } ainfo;plantuml-1.2017.15/src/h/api_t.java000066400000000000000000000044001312650303100166310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 jt0nf4pbk6zp8gpe1a9abjx9 public interface api_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "API_render, API_layout, API_textlayout, API_device, API_loadimage, _DUMMY_ELEM_=0", "}", "api_t"); } // typedef enum { API_render, API_layout, API_textlayout, API_device, API_loadimage, _DUMMY_ELEM_=0 } api_t;plantuml-1.2017.15/src/h/arrowdir_t.java000066400000000000000000000043431312650303100177170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5ghieyxthirf2pc6x8z6vuj05 public interface arrowdir_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct arrowdir_t", "{", "char *dir", "int sflag", "int eflag", "}", "arrowdir_t"); } // typedef struct arrowdir_t { // char *dir; // int sflag; // int eflag; // } arrowdir_t;plantuml-1.2017.15/src/h/arrowname_t.java000066400000000000000000000043111312650303100200540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9xua47nwla43qv3cmy92tx1mr public interface arrowname_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct arrowname_t", "{", "char *name", "int type", "}", "arrowname_t"); } // typedef struct arrowname_t { // char *name; // int type; // } arrowname_t;plantuml-1.2017.15/src/h/arrowtype_t.java000066400000000000000000000047601312650303100201250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 cvw01xnbdvcxj00pawmicyx3p public interface arrowtype_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct arrowtype_t", "{", "int type", "double lenfact", "void (*gen) (GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag)", "}", "arrowtype_t"); } // typedef struct arrowtype_t { // int type; // double lenfact; /* ratio of length of this arrow type to standard arrow */ // void (*gen) (GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag); /* generator function for type */ // } arrowtype_t;plantuml-1.2017.15/src/h/aspect_t.java000066400000000000000000000053601312650303100173450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7ric227rdgzts8ajl8qu4g4r3 public interface aspect_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct aspect_t", "{", "double targetAR", "double combiAR", "int prevIterations", "int curIterations", "int nextIter", "int nPasses", "int badGraph", "}", "aspect_t"); } // typedef struct aspect_t { // double targetAR; /* target aspect ratio */ // double combiAR; // int prevIterations; /* no. of iterations in previous pass */ // int curIterations; /* no. of iterations in current pass */ // int nextIter; /* dynamically adjusted no. of iterations */ // int nPasses; /* bound on no. of top-level passes */ // int badGraph; /* hack: set if graph is disconnected or has // * clusters. If so, turn off aspect */ // } aspect_t;plantuml-1.2017.15/src/h/attr_state_t.java000066400000000000000000000103071312650303100202350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9k0huyjtpb77v42bdkmmy7zo5 public interface attr_state_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "attrsym_t* E_constr", "attrsym_t* E_samehead", "attrsym_t* E_sametail", "attrsym_t* E_weight", "attrsym_t* E_minlen", "attrsym_t* E_fontcolor", "attrsym_t* E_fontname", "attrsym_t* E_fontsize", "attrsym_t* E_headclip", "attrsym_t* E_headlabel", "attrsym_t* E_label", "attrsym_t* E_label_float", "attrsym_t* E_labelfontcolor", "attrsym_t* E_labelfontname", "attrsym_t* E_labelfontsize", "attrsym_t* E_tailclip", "attrsym_t* E_taillabel", "attrsym_t* E_xlabel", "attrsym_t* N_height", "attrsym_t* N_width", "attrsym_t* N_shape", "attrsym_t* N_style", "attrsym_t* N_fontsize", "attrsym_t* N_fontname", "attrsym_t* N_fontcolor", "attrsym_t* N_label", "attrsym_t* N_xlabel", "attrsym_t* N_showboxes", "attrsym_t* N_ordering", "attrsym_t* N_sides", "attrsym_t* N_peripheries", "attrsym_t* N_skew", "attrsym_t* N_orientation", "attrsym_t* N_distortion", "attrsym_t* N_fixed", "attrsym_t* N_nojustify", "attrsym_t* N_group", "attrsym_t* G_ordering", "int State", "}", "attr_state_t"); } // typedef struct { // attrsym_t* E_constr; // attrsym_t* E_samehead; // attrsym_t* E_sametail; // attrsym_t* E_weight; // attrsym_t* E_minlen; // attrsym_t* E_fontcolor; // attrsym_t* E_fontname; // attrsym_t* E_fontsize; // attrsym_t* E_headclip; // attrsym_t* E_headlabel; // attrsym_t* E_label; // attrsym_t* E_label_float; // attrsym_t* E_labelfontcolor; // attrsym_t* E_labelfontname; // attrsym_t* E_labelfontsize; // attrsym_t* E_tailclip; // attrsym_t* E_taillabel; // attrsym_t* E_xlabel; // // attrsym_t* N_height; // attrsym_t* N_width; // attrsym_t* N_shape; // attrsym_t* N_style; // attrsym_t* N_fontsize; // attrsym_t* N_fontname; // attrsym_t* N_fontcolor; // attrsym_t* N_label; // attrsym_t* N_xlabel; // attrsym_t* N_showboxes; // attrsym_t* N_ordering; // attrsym_t* N_sides; // attrsym_t* N_peripheries; // attrsym_t* N_skew; // attrsym_t* N_orientation; // attrsym_t* N_distortion; // attrsym_t* N_fixed; // attrsym_t* N_nojustify; // attrsym_t* N_group; // // attrsym_t* G_ordering; // int State; // } attr_state_t;plantuml-1.2017.15/src/h/attrsym_t.java000066400000000000000000000041131312650303100175640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 d4orkcxq0xaek87mt94led8jv public interface attrsym_t extends Agsym_s { public static List DEFINITION = Arrays.asList( "typedef struct Agsym_s attrsym_t"); } // typedef struct Agsym_s attrsym_t;plantuml-1.2017.15/src/h/bend.java000066400000000000000000000042441312650303100164530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5vksevapsq3dmbrs630cwnpqp public interface bend extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "B_NODE, B_UP, B_LEFT, B_DOWN, B_RIGHT", "}", "bend"); } // typedef enum {B_NODE, B_UP, B_LEFT, B_DOWN, B_RIGHT} bend;plantuml-1.2017.15/src/h/bezier.java000066400000000000000000000044001312650303100170150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 2rm8pcuhkjly1xk9haledn1k9 public interface bezier extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct bezier", "{", "pointf *list", "int size", "int sflag, eflag", "pointf sp, ep", "}", "bezier"); } // typedef struct bezier { // pointf *list; // int size; // int sflag, eflag; // pointf sp, ep; // } bezier;plantuml-1.2017.15/src/h/blk_t.java000066400000000000000000000044451312650303100166410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 az8jvz0appwxv09fzo6ia7pw2 public interface blk_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct blk_t", "{", "Agnode_t **data", "Agnode_t **endp", "struct blk_t *prev", "struct blk_t *next", "}", "blk_t"); } // typedef struct blk_t { // Agnode_t **data; // Agnode_t **endp; // struct blk_t *prev; // struct blk_t *next; // } blk_t;plantuml-1.2017.15/src/h/block.java000066400000000000000000000053241312650303100166350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 aeiesb8xknt6qv58gj7tdny3l public interface block extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct block", "{", "Agnode_t *child", "block_t *next", "Agraph_t *sub_graph", "double radius", "double rad0", "nodelist_t *circle_list", "blocklist_t children", "double parent_pos", "int flags", "}"); } // struct block { // Agnode_t *child; /* if non-null, points to node in parent block */ // block_t *next; /* sibling block */ // Agraph_t *sub_graph; /* nodes and edges in this block */ // double radius; /* radius of block and subblocks */ // double rad0; /* radius of block */ // nodelist_t *circle_list; /* ordered list of nodes in block */ // blocklist_t children; /* child blocks */ // double parent_pos; /* if block has 1 node, angle to place parent */ // int flags; // };plantuml-1.2017.15/src/h/block_t.java000066400000000000000000000040761312650303100171630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 9hb5i7kwpg2hbs4jpz9n14is public interface block_t extends block { public static List DEFINITION = Arrays.asList( "typedef struct block block_t"); } // typedef struct block block_t;plantuml-1.2017.15/src/h/blocklist_t.java000066400000000000000000000043011312650303100200460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4fuyio1lh8xw103g3n4akljx4 public interface blocklist_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "block_t *first", "block_t *last", "}", "blocklist_t"); } // typedef struct { // block_t *first; // block_t *last; // } blocklist_t;plantuml-1.2017.15/src/h/box.java000066400000000000000000000041661312650303100163360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 ecciois6ttiu20v5ds6ne801k public interface box extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "point LL, UR", "}", "box"); } // typedef struct { point LL, UR; } box;plantuml-1.2017.15/src/h/boxf.java000066400000000000000000000041731312650303100165020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5ixaxdj4kxutnllqftpefs67r public interface boxf extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "pointf LL, UR", "}", "boxf"); } // typedef struct { pointf LL, UR; } boxf;plantuml-1.2017.15/src/h/bport_t.java000066400000000000000000000043321312650303100172120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 enjd0328nmx4raj6kmm6ktq7y public interface bport_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct bport_s", "{", "edge_t *e", "node_t *n", "double alpha", "}", "bport_t"); } // typedef struct bport_s { // edge_t *e; // node_t *n; // double alpha; // } bport_t;plantuml-1.2017.15/src/h/bsearch_cmpf.java000066400000000000000000000042341312650303100201560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 dw2o83im6nk4bxd64xd6z2z00 public interface bsearch_cmpf extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef int (*bsearch_cmpf) (const void *, const void *)"); } // typedef int (*bsearch_cmpf) (const void *, const void *);plantuml-1.2017.15/src/h/buff_s.java000066400000000000000000000042641312650303100170110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 f33zs2sbhgsvvrelmw2nq6vt3 public interface buff_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct buff_s", "{", "int fd", "fpos_t pos", "char *template", "}"); } // struct buff_s { // int fd; // fpos_t pos; // char *template; // };plantuml-1.2017.15/src/h/ccgnodeinfo_t.java000066400000000000000000000045161312650303100203460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 e6r3vblqbmjwwqavuqcrl06zb public interface ccgnodeinfo_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Agrec_t h", "char mark", "union", "{", "Agraph_t* g", "Agnode_t* n", "void* v", "}", "ptr", "}", "ccgnodeinfo_t"); } // typedef struct { // Agrec_t h; // char mark; // union { // Agraph_t* g; // Agnode_t* n; // void* v; // } ptr; // } ccgnodeinfo_t;plantuml-1.2017.15/src/h/ccgraphinfo_t.java000066400000000000000000000043621312650303100203520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 b28r73e4bd3fdpfewruggsvk1 public interface ccgraphinfo_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Agrec_t h", "char cc_subg", "}", "ccgraphinfo_t"); } // typedef struct { // Agrec_t h; // char cc_subg; /* true iff subgraph corresponds to a component */ // } ccgraphinfo_t;plantuml-1.2017.15/src/h/cdata.java000066400000000000000000000066161312650303100166240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 39c66ffd2kgahvaaf8e61dspv public interface cdata extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "union", "{", "Agraph_t *g", "Agnode_t *np", "}", "orig", "int flags", "node_t *parent", "block_t *block", "union", "{", "struct", "{", "node_t *next", "int val", "int low_val", "}", "bc", "node_t *clone", "struct", "{", "node_t *tparent", "node_t *first", "node_t *second", "int fdist", "int sdist", "}", "t", "struct", "{", "int pos", "double psi", "}", "f", "}", "u", "}", "cdata"); } // typedef struct { // union { /* Pointer to node/cluster in original graph */ // Agraph_t *g; // Agnode_t *np; // } orig; // int flags; // node_t *parent; /* parent in block-cutpoint traversal (1,2,4) */ // block_t *block; /* Block containing node (1,2,3,4) */ // union { // struct { /* Pass 1 */ // node_t *next; /* used for stack */ // int val; // int low_val; // } bc; // node_t *clone; /* Cloned node (3a) */ // struct { /* Spanning tree and longest path (3b) */ // node_t *tparent; /* Parent in tree */ // node_t *first; /* Leaf on longest path from node */ // node_t *second; /* Leaf on 2nd longest path from node */ // int fdist; /* Length of longest path from node */ // int sdist; /* Length of 2nd longest path from node */ // } t; // struct { // int pos; /* Index of node in block circle (3c,4) */ // double psi; /* Offset angle of children (4) */ // } f; // } u; // } cdata;plantuml-1.2017.15/src/h/cell.java000066400000000000000000000044031312650303100164570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5st453umnwqp8rukqzc30apk6 public interface cell extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "gridpt p", "node_list *nodes", "Dtlink_t link", "}", "cell"); } // typedef struct { // gridpt p; /* index of cell */ // node_list *nodes; /* nodes in cell */ // Dtlink_t link; /* cdt data */ // } cell;plantuml-1.2017.15/src/h/chanItem.java000066400000000000000000000043411312650303100172710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 caod2kxpi4xwamq1g7wm3mm6o public interface chanItem extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Dtlink_t link", "double v", "Dt_t* chans", "}", "chanItem"); } // typedef struct { // Dtlink_t link; // double v; // Dt_t* chans; // } chanItem;plantuml-1.2017.15/src/h/channel.java000066400000000000000000000046151312650303100171550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 71crbqpwuxwtsnppsp39wccqp public interface channel extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Dtlink_t link", "paird p", "int cnt", "segment** seg_list", "rawgraph* G", "struct cell* cp", "}", "channel"); } // typedef struct { // Dtlink_t link; // paird p; /* extrema of channel */ // int cnt; /* number of segments */ // segment** seg_list; /* array of segment pointers */ // rawgraph* G; // struct cell* cp; // } channel;plantuml-1.2017.15/src/h/cinfo_t.java000066400000000000000000000042521312650303100171630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9i2jwknpgmej0gz38zz670oa public interface cinfo_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "boxf bb", "object_t* objp", "}", "cinfo_t"); } // typedef struct { // boxf bb; // object_t* objp; // } cinfo_t;plantuml-1.2017.15/src/h/circ_state.java000066400000000000000000000046411312650303100176640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3lnrtud6sukofbfngncbfav33 public interface circ_state extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "blocklist_t bl", "int orderCount", "int blockCount", "attrsym_t *N_artpos", "attrsym_t *N_root", "char *rootname", "double min_dist", "}", "circ_state"); } // typedef struct { // blocklist_t bl; // int orderCount; // int blockCount; // attrsym_t *N_artpos; // attrsym_t *N_root; // char *rootname; // double min_dist; // } circ_state;plantuml-1.2017.15/src/h/clist_t.java000066400000000000000000000043001312650303100171750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 2ibe0en9njq1f3z4y5g2kzaj2 public interface clist_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "graph_t **cl", "int sz", "int cnt", "}", "clist_t"); } // typedef struct { // graph_t **cl; // int sz; // int cnt; // } clist_t;plantuml-1.2017.15/src/h/clust_t.java000066400000000000000000000043261312650303100172210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3lissut0g2m7y25k8erhz18z7 public interface clust_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Dtlink_t link", "char* name", "Agraph_t* clp", "}", "clust_t"); } // typedef struct { // Dtlink_t link; // char* name; // Agraph_t* clp; // } clust_t;plantuml-1.2017.15/src/h/color_type_t.java000066400000000000000000000044431312650303100202460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4mmho2n6bv9tphi419uxzrpes public interface color_type_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "HSVA_DOUBLE, RGBA_BYTE, RGBA_WORD, CMYK_BYTE, RGBA_DOUBLE, COLOR_STRING, COLOR_INDEX", "}", "color_type_t"); } // typedef enum { HSVA_DOUBLE, RGBA_BYTE, RGBA_WORD, CMYK_BYTE, // RGBA_DOUBLE, COLOR_STRING, COLOR_INDEX } color_type_t;plantuml-1.2017.15/src/h/colorseg_t.java000066400000000000000000000045141312650303100177030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 38z6pew8kytg1kjpmiov8etuh public interface colorseg_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "char* color", "float t", "boolean hasFraction", "}", "colorseg_t"); } // typedef struct { // char* color; /* segment color */ // float t; /* segment size >= 0 */ // boolean hasFraction; /* true if color explicitly specifies its fraction */ // } colorseg_t;plantuml-1.2017.15/src/h/colorsegs_t.java000066400000000000000000000046131312650303100200660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 84j0pyfjr7xbsnzkzlwsc5tin public interface colorsegs_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int numc", "char* base", "colorseg_t* segs", "}", "colorsegs_t"); } // typedef struct { // int numc; /* number of used segments in segs; may include segs with t == 0 */ // char* base; /* storage of color names */ // colorseg_t* segs; /* array of segments; real segments always followed by a sentinel */ // } colorsegs_t;plantuml-1.2017.15/src/h/compile_stack_elt_t.java000066400000000000000000000047571312650303100215600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4l4tfavjmu8v5sgzzud7q5c6n public interface compile_stack_elt_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "pattern_offset_t begalt_offset", "pattern_offset_t fixup_alt_jump", "pattern_offset_t inner_group_offset", "pattern_offset_t laststart_offset", "regnum_t regnum", "}", "compile_stack_elt_t"); } // typedef struct // { // pattern_offset_t begalt_offset; // pattern_offset_t fixup_alt_jump; // pattern_offset_t inner_group_offset; // pattern_offset_t laststart_offset; // regnum_t regnum; // } compile_stack_elt_t;plantuml-1.2017.15/src/h/compile_stack_type.java000066400000000000000000000045241312650303100214220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6mc1jtf0ah6aikjxfamdk90i public interface compile_stack_type extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "compile_stack_elt_t *stack", "unsigned size", "unsigned avail", "}", "compile_stack_type"); } // typedef struct // { // compile_stack_elt_t *stack; // unsigned size; // unsigned avail; /* Offset of next open position. */ // } compile_stack_type;plantuml-1.2017.15/src/h/degitem.java000066400000000000000000000043711312650303100171620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 a0671ts08zydaqdyqkjudgjhm public interface degitem extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Dtlink_t link", "int deg", "Agnode_t *np", "}", "degitem"); } // typedef struct { // Dtlink_t link; // int deg; // Agnode_t *np; /* linked list of nodes of same degree */ // } degitem;plantuml-1.2017.15/src/h/deque_t.java000066400000000000000000000043671312650303100171770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 15n6mbjkpo4mjswqo3d30dej6 public interface deque_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct deque_t", "{", "pointnlink_t **pnlps", "int pnlpn, fpnlpi, lpnlpi, apex", "}", "deque_t"); } // typedef struct deque_t { // pointnlink_t **pnlps; // int pnlpn, fpnlpi, lpnlpi, apex; // } deque_t;plantuml-1.2017.15/src/h/dndata.java000066400000000000000000000046111312650303100167740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 a4zm7bj4ibv3mswu1844wdstr public interface dndata extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int deg", "int wdeg", "node_t *dn", "double disp[2]", "}", "dndata"); } // typedef struct { // int deg; /* degree of node */ // int wdeg; /* weighted degree of node */ // node_t *dn; /* If derived node is not a cluster, */ // /* dn points real node. */ // double disp[2]; /* incremental displacement */ // } dndata;plantuml-1.2017.15/src/h/drawfunc_t.java000066400000000000000000000041741312650303100177010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 c0knfy0z2w7qhmdudke2ar4xz public interface drawfunc_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef void (*drawfunc_t)(xdot_op*, int)"); } // typedef void (*drawfunc_t)(xdot_op*, int);plantuml-1.2017.15/src/h/edata.java000066400000000000000000000042511312650303100166170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 aa8lv40j7f2q31yuuqyzqncnl public interface edata extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int order", "Agedge_t* next", "}", "edata"); } // typedef struct { // int order; // Agedge_t* next; // } edata;plantuml-1.2017.15/src/h/edge_t.java000066400000000000000000000041051312650303100167660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 1fsfdd86c8isg6ylp15pwknbu public interface edge_t extends Agedge_s { public static List DEFINITION = Arrays.asList( "typedef struct Agedge_s edge_t"); } // typedef struct Agedge_s edge_t;plantuml-1.2017.15/src/h/edgelistitem.java000066400000000000000000000043361312650303100202240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 2pomqgw3z041x7wlav4wa7554 public interface edgelistitem extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct edgelistitem", "{", "Dtlink_t link", "Agedge_t *edge", "}", "edgelistitem"); } // typedef struct edgelistitem { // Dtlink_t link; // Agedge_t *edge; // } edgelistitem;plantuml-1.2017.15/src/h/elist.java000066400000000000000000000042571312650303100166670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8lw80si2xjoivlskhxdmff5mu public interface elist extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct elist", "{", "edge_t **list", "int size", "}", "elist"); } // typedef struct elist { // edge_t **list; // int size; // } elist;plantuml-1.2017.15/src/h/elist_t.java000066400000000000000000000043351312650303100172070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8ya2p1uqesbvs87po5upckzn0 public interface elist_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct elist_t", "{", "Pedge_t *ep", "struct elist_t *next, *prev", "}", "elist_t"); } // typedef struct elist_t { // Pedge_t *ep; // struct elist_t *next, *prev; // } elist_t;plantuml-1.2017.15/src/h/ellipse_t.java000066400000000000000000000060051312650303100175200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7sm9vcfcserrygyo079543gdf public interface ellipse_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "double cx, cy", "double a, b", "double theta, cosTheta, sinTheta", "double eta1, eta2", "double x1, y1, x2, y2", "double xF1, yF1, xF2, yF2", "double xLeft", "double yUp", "double width, height", "double f, e2, g, g2", "}", "ellipse_t"); } // typedef struct { // double cx, cy; /* center */ // double a, b; /* semi-major and -minor axes */ // // /* Orientation of the major axis with respect to the x axis. */ // double theta, cosTheta, sinTheta; // // /* Start and end angles of the arc. */ // double eta1, eta2; // // /* Position of the start and end points. */ // double x1, y1, x2, y2; // // /* Position of the foci. */ // double xF1, yF1, xF2, yF2; // // /* x of the leftmost point of the arc. */ // double xLeft; // // /* y of the highest point of the arc. */ // double yUp; // // /* Horizontal width and vertical height of the arc. */ // double width, height; // // double f, e2, g, g2; // } ellipse_t;plantuml-1.2017.15/src/h/emit_state_t.java000066400000000000000000000046671312650303100202350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6f8ug3prsw7z33swixem3j76r public interface emit_state_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "EMIT_GDRAW, EMIT_CDRAW, EMIT_TDRAW, EMIT_HDRAW, EMIT_GLABEL, EMIT_CLABEL, EMIT_TLABEL, EMIT_HLABEL, EMIT_NDRAW, EMIT_EDRAW, EMIT_NLABEL, EMIT_ELABEL,", "}", "emit_state_t"); } // typedef enum { // EMIT_GDRAW, EMIT_CDRAW, EMIT_TDRAW, EMIT_HDRAW, // EMIT_GLABEL, EMIT_CLABEL, EMIT_TLABEL, EMIT_HLABEL, // EMIT_NDRAW, EMIT_EDRAW, EMIT_NLABEL, EMIT_ELABEL, // } emit_state_t;plantuml-1.2017.15/src/h/epair_t.java000066400000000000000000000042411312650303100171630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 47wrxm3dq9ggw4h17ykphv1ck public interface epair_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int d", "Agedge_t* e", "}", "epair_t"); } // typedef struct { // int d; // Agedge_t* e; // } epair_t;plantuml-1.2017.15/src/h/epsf_t.java000066400000000000000000000042721312650303100170240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 69jjtteuvsovhvkrfbvx2021c public interface epsf_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct epsf_s", "{", "int macro_id", "point offset", "}", "epsf_t"); } // typedef struct epsf_s { // int macro_id; // point offset; // } epsf_t;plantuml-1.2017.15/src/h/erec.java000066400000000000000000000043071312650303100164610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 1zoua45sppb09q1mpfhzlvhus public interface erec extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "edge_t *e", "double alpha", "double dist2", "}", "erec"); } // typedef struct { // edge_t *e; // double alpha; // double dist2; // } erec;plantuml-1.2017.15/src/h/estack.java000066400000000000000000000042441312650303100170150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9fnin5thtg37gur12wihsuz4j public interface estack extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Agedge_t *top", "int sz", "}", "estack"); } // typedef struct { // Agedge_t *top; // int sz; // } estack;plantuml-1.2017.15/src/h/exdot_op.java000066400000000000000000000043231312650303100173620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5dtjk4eaksfp1h28795tk7u7h public interface exdot_op extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "xdot_op op", "boxf bb", "textspan_t* span", "}", "exdot_op"); } // typedef struct { // xdot_op op; // boxf bb; // textspan_t* span; // } exdot_op;plantuml-1.2017.15/src/h/fail_stack_type.java000066400000000000000000000045061312650303100207050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 el5ktmij22s6d4cvfe81842jd public interface fail_stack_type extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "fail_stack_elt_t *stack", "unsigned size", "unsigned avail", "}", "fail_stack_type"); } // typedef struct // { // fail_stack_elt_t *stack; // unsigned size; // unsigned avail; /* Offset of next open position. */ // } fail_stack_type;plantuml-1.2017.15/src/h/fdpParms_s.java000066400000000000000000000053731312650303100176450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 f7uv7vj69dm0khl1b380tapm public interface fdpParms_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct fdpParms_s", "{", "int useGrid", "int useNew", "int numIters", "int unscaled", "double C", "double Tfact", "double K", "double T0", "}"); } // struct fdpParms_s { // int useGrid; /* use grid for speed up */ // int useNew; /* encode x-K into attractive force */ // int numIters; /* actual iterations in layout */ // int unscaled; /* % of iterations used in pass 1 */ // double C; /* Repulsion factor in xLayout */ // double Tfact; /* scale temp from default expression */ // double K; /* spring constant; ideal distance */ // double T0; /* initial temperature */ // };plantuml-1.2017.15/src/h/fdpParms_t.java000066400000000000000000000041271312650303100176420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 8unwxxsfji1yz0v4p07nrybhu public interface fdpParms_t extends fdpParms_s { public static List DEFINITION = Arrays.asList( "typedef struct fdpParms_s fdpParms_t"); } // typedef struct fdpParms_s fdpParms_t;plantuml-1.2017.15/src/h/field_t.java000066400000000000000000000051621312650303100171510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5slbuxsxkyuboijzrnorwqjk4 public interface field_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct field_t", "{", "pointf size", "boxf b", "int n_flds", "textlabel_t *lp", "struct field_t **fld", "char *id", "unsigned char LR", "unsigned char sides", "}", "field_t"); } // typedef struct field_t { // pointf size; /* its dimension */ // boxf b; /* its placement in node's coordinates */ // int n_flds; // textlabel_t *lp; /* n_flds == 0 */ // struct field_t **fld; /* n_flds > 0 */ // char *id; /* user's identifier */ // unsigned char LR; /* if box list is horizontal (left to right) */ // unsigned char sides; /* sides of node exposed to field */ // } field_t;plantuml-1.2017.15/src/h/fill_type.java000066400000000000000000000043101312650303100175240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7yr1sspvlqw3sgiyhkr854cd public interface fill_type extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "FILL_NONE, FILL_SOLID, FILL_LINEAR, FILL_RADIAL", "}", "fill_type"); } // typedef enum { FILL_NONE, FILL_SOLID, FILL_LINEAR, FILL_RADIAL } fill_type;plantuml-1.2017.15/src/h/fitem.java000066400000000000000000000042671312650303100166540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 2w2z3tmg7hmxrqko2dt5rsqag public interface fitem extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Dtlink_t link", "textspan_t ti", "}", "fitem"); } // typedef struct { // Dtlink_t link; // textspan_t ti; // } fitem;plantuml-1.2017.15/src/h/flushfn.java000066400000000000000000000041551312650303100172110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6co8gnhn5xjhq4c6lyebol0jr public interface flushfn extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef int (*flushfn) (void *chan)"); } // typedef int (*flushfn) (void *chan);plantuml-1.2017.15/src/h/font_type.java000066400000000000000000000042631312650303100175530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 2xdqtc3a2c3n08rywh1rm8cjw public interface font_type extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "FONT_REGULAR, FONT_BOLD, FONT_ITALIC", "}", "font_type"); } // typedef enum { FONT_REGULAR, FONT_BOLD, FONT_ITALIC } font_type;plantuml-1.2017.15/src/h/fontinfo.java000066400000000000000000000043261312650303100173660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 964775l6tcok47z2sykyt451v public interface fontinfo extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct fontinfo", "{", "double fontsize", "char *fontname", "char *fontcolor", "}"); } // struct fontinfo { // double fontsize; // char *fontname; // char *fontcolor; // };plantuml-1.2017.15/src/h/fontname_kind.java000066400000000000000000000042551312650303100203610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 b9cjioxrhs04ztwegqflwrjk9 public interface fontname_kind extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "NATIVEFONTS,PSFONTS,SVGFONTS", "}", "fontname_kind"); } // typedef enum {NATIVEFONTS,PSFONTS,SVGFONTS} fontname_kind;plantuml-1.2017.15/src/h/format_type.java000066400000000000000000000063431312650303100200760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 48gvd3f5a7qs6f6eid493tvyl public interface format_type extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "FORMAT_PNG_XDOT, FORMAT_GIF_XDOT, FORMAT_JPEG_XDOT, FORMAT_SVG_XDOT, FORMAT_PS_XDOT, FORMAT_PNG_DOT, FORMAT_GIF_DOT, FORMAT_JPEG_DOT, FORMAT_SVG_DOT, FORMAT_PS_DOT, FORMAT_PNG_MAP, FORMAT_GIF_MAP, FORMAT_JPEG_MAP, FORMAT_SVG_MAP, FORMAT_PS_MAP, FORMAT_PNG_SVG, FORMAT_GIF_SVG, FORMAT_JPEG_SVG, FORMAT_SVG_SVG, FORMAT_PNG_FIG, FORMAT_GIF_FIG, FORMAT_JPEG_FIG, FORMAT_PNG_VRML, FORMAT_GIF_VRML, FORMAT_JPEG_VRML, FORMAT_PS_PS, FORMAT_PSLIB_PS, FORMAT_PNG_VML, FORMAT_GIF_VML, FORMAT_JPEG_VML, FORMAT_GIF_TK,", "}", "format_type"); } // typedef enum { // FORMAT_PNG_XDOT, FORMAT_GIF_XDOT, FORMAT_JPEG_XDOT, FORMAT_SVG_XDOT, FORMAT_PS_XDOT, // FORMAT_PNG_DOT, FORMAT_GIF_DOT, FORMAT_JPEG_DOT, FORMAT_SVG_DOT, FORMAT_PS_DOT, // FORMAT_PNG_MAP, FORMAT_GIF_MAP, FORMAT_JPEG_MAP, FORMAT_SVG_MAP, FORMAT_PS_MAP, // FORMAT_PNG_SVG, FORMAT_GIF_SVG, FORMAT_JPEG_SVG, FORMAT_SVG_SVG, // FORMAT_PNG_FIG, FORMAT_GIF_FIG, FORMAT_JPEG_FIG, // FORMAT_PNG_VRML, FORMAT_GIF_VRML, FORMAT_JPEG_VRML, // FORMAT_PS_PS, FORMAT_PSLIB_PS, // FORMAT_PNG_VML, FORMAT_GIF_VML, FORMAT_JPEG_VML, // FORMAT_GIF_TK, // } format_type;plantuml-1.2017.15/src/h/freefunc_t.java000066400000000000000000000041621312650303100176620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 e8aa7nh48ajm604b51pz19bub public interface freefunc_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef void (*freefunc_t)(xdot_op*)"); } // typedef void (*freefunc_t)(xdot_op*);plantuml-1.2017.15/src/h/fspan.java000066400000000000000000000042731312650303100166540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 ey73hen3l0l82tzpokzw8heu4 public interface fspan extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Dtlink_t link", "htextspan_t lp", "}", "fspan"); } // typedef struct { // Dtlink_t link; // htextspan_t lp; // } fspan;plantuml-1.2017.15/src/h/gdata.java000066400000000000000000000047321312650303100166250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 2ruxso0qdpjclz5edssp197zm public interface gdata extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "bport_t *ports", "int nports", "boxf bb", "int flags", "int level", "graph_t *parent", "}", "gdata"); } // typedef struct { // bport_t *ports; /* boundary ports. 0-terminated */ // int nports; /* no. of ports */ // boxf bb; /* bounding box of graph */ // int flags; // int level; /* depth in graph hierarchy */ // graph_t *parent; /* smallest containing cluster */ // // // // } gdata;plantuml-1.2017.15/src/h/ginfo.java000066400000000000000000000045471312650303100166530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 49o2f0vj6o2k7glkg59q1t341 public interface ginfo extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int perim", "point *cells", "int nc", "int index", "}", "ginfo"); } // typedef struct { // int perim; /* half size of bounding rectangle perimeter */ // point *cells; /* cells in covering polyomino */ // int nc; /* no. of cells */ // int index; /* index in original array */ // } ginfo;plantuml-1.2017.15/src/h/graph_t.java000066400000000000000000000041101312650303100171570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 ebapqf0991e4p4fqcr0tva8qa public interface graph_t extends Agraph_s { public static List DEFINITION = Arrays.asList( "typedef struct Agraph_s graph_t"); } // typedef struct Agraph_s graph_t;plantuml-1.2017.15/src/h/gridpt.java000066400000000000000000000042021312650303100170260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 bh966kf6yzel6b62omfkro2sw public interface gridpt extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int i, j", "}", "gridpt"); } // typedef struct { // int i, j; // } gridpt;plantuml-1.2017.15/src/h/gstack_t.java000066400000000000000000000044331312650303100173420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the Eclipse Public License. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 831302imlb2pb01kdebykh623 public interface gstack_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct gstack_s", "{", "Agraph_t *g", "Agraph_t *subg", "list_t nodelist,edgelist,attrlist", "struct gstack_s *down", "}", "gstack_t"); } // typedef struct gstack_s { // Agraph_t *g; // Agraph_t *subg; // list_t nodelist,edgelist,attrlist; // struct gstack_s *down; // } gstack_t;plantuml-1.2017.15/src/h/gv_argvlist_t.java000066400000000000000000000043571312650303100204220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 ed9gxxtmujpu6gyrtmhxdut42 public interface gv_argvlist_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct gv_argvlist_s", "{", "char **argv", "int argc", "int alloc", "}", "gv_argvlist_t"); } // typedef struct gv_argvlist_s { // char **argv; // int argc; // int alloc; // } gv_argvlist_t;plantuml-1.2017.15/src/h/gvattr_t.java000066400000000000000000000042701312650303100173740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 2sx3fd85hu0bac6ji75ngovnu public interface gvattr_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "GVATTR_STRING, GVATTR_BOOL, GVATTR_COLOR", "}", "gvattr_t"); } // typedef enum { GVATTR_STRING, GVATTR_BOOL, GVATTR_COLOR } gvattr_t;plantuml-1.2017.15/src/h/gvcolor_t.java000066400000000000000000000047711312650303100175460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9xilv9or3ptvy3gupp6t2ql19 public interface gvcolor_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct color_s", "{", "union", "{", "double RGBA[4]", "double HSVA[4]", "unsigned char rgba[4]", "unsigned char cmyk[4]", "int rrggbbaa[4]", "char *string", "int index", "}", "u", "color_type_t type", "}", "gvcolor_t"); } // typedef struct color_s { // union { // double RGBA[4]; // double HSVA[4]; // unsigned char rgba[4]; // unsigned char cmyk[4]; // int rrggbbaa[4]; // char *string; // int index; // } u; // color_type_t type; // } gvcolor_t;plantuml-1.2017.15/src/h/gvdevice_callbacks_t.java000066400000000000000000000064601312650303100216630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 f3e0bdxm3k2e7dwusmutjfhyg public interface gvdevice_callbacks_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct gvdevice_callbacks_s", "{", "void (*refresh) (GVJ_t * job)", "void (*button_press) (GVJ_t * job, int button, pointf pointer)", "void (*button_release) (GVJ_t * job, int button, pointf pointer)", "void (*motion) (GVJ_t * job, pointf pointer)", "void (*modify) (GVJ_t * job, const char *name, const char *value)", "void (*del) (GVJ_t * job)", "void (*read) (GVJ_t * job, const char *filename, const char *layout)", "void (*layout) (GVJ_t * job, const char *layout)", "void (*render) (GVJ_t * job, const char *format, const char *filename)", "}", "gvdevice_callbacks_t"); } // typedef struct gvdevice_callbacks_s { // void (*refresh) (GVJ_t * job); // void (*button_press) (GVJ_t * job, int button, pointf pointer); // void (*button_release) (GVJ_t * job, int button, pointf pointer); // void (*motion) (GVJ_t * job, pointf pointer); // void (*modify) (GVJ_t * job, const char *name, const char *value); // void (*del) (GVJ_t * job); /* can't use "delete" 'cos C++ stole it */ // void (*read) (GVJ_t * job, const char *filename, const char *layout); // void (*layout) (GVJ_t * job, const char *layout); // void (*render) (GVJ_t * job, const char *format, const char *filename); // } gvdevice_callbacks_t;plantuml-1.2017.15/src/h/gvdevice_engine_s.java000066400000000000000000000045451312650303100212120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 z4n2hij703yppdzze03zzgi6 public interface gvdevice_engine_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct gvdevice_engine_s", "{", "void (*initialize) (GVJ_t * firstjob)", "void (*format) (GVJ_t * firstjob)", "void (*finalize) (GVJ_t * firstjob)", "}"); } // struct gvdevice_engine_s { // void (*initialize) (GVJ_t * firstjob); // void (*format) (GVJ_t * firstjob); // void (*finalize) (GVJ_t * firstjob); // };plantuml-1.2017.15/src/h/gvdevice_engine_t.java000066400000000000000000000042011312650303100212000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 3xl6s6o9sk6ni7l5g3amrl4p3 public interface gvdevice_engine_t extends gvdevice_engine_s { public static List DEFINITION = Arrays.asList( "typedef struct gvdevice_engine_s gvdevice_engine_t"); } // typedef struct gvdevice_engine_s gvdevice_engine_t;plantuml-1.2017.15/src/h/gvdevice_features_t.java000066400000000000000000000046251312650303100215630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7mtrzu9286sibihpev6m1kq0d public interface gvdevice_features_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int flags", "pointf default_margin", "pointf default_pagesize", "pointf default_dpi", "}", "gvdevice_features_t"); } // typedef struct { // int flags; // pointf default_margin; /* left/right, top/bottom - points */ // pointf default_pagesize;/* default page width, height - points */ // pointf default_dpi; // } gvdevice_features_t;plantuml-1.2017.15/src/h/gvevent_key_binding_t.java000066400000000000000000000044611312650303100221070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 36q7p68bw2kihtosgcli2ebnl public interface gvevent_key_binding_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct gvevent_key_binding_s", "{", "char *keystring", "gvevent_key_callback_t callback", "}", "gvevent_key_binding_t"); } // typedef struct gvevent_key_binding_s { // char *keystring; // gvevent_key_callback_t callback; // } gvevent_key_binding_t;plantuml-1.2017.15/src/h/gvevent_key_callback_t.java000066400000000000000000000042331312650303100222260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8od0u0s38rvhqrafwy4nh1i0 public interface gvevent_key_callback_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef int (*gvevent_key_callback_t) (GVJ_t * job)"); } // typedef int (*gvevent_key_callback_t) (GVJ_t * job);plantuml-1.2017.15/src/h/gvformatter_engine_t.java000066400000000000000000000042761312650303100217600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.gvformatter_engine_s; //2 3vj53t416qxwn8efaetlwcvoc public interface gvformatter_engine_t extends gvformatter_engine_s { public static List DEFINITION = Arrays.asList( "typedef struct gvformatter_engine_s gvformatter_engine_t"); } // typedef struct gvformatter_engine_s gvformatter_engine_t;plantuml-1.2017.15/src/h/gvlayout_engine_s.java000066400000000000000000000043741312650303100212700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 aufqatak555umhtr2zwzdxcam public interface gvlayout_engine_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct gvlayout_engine_s", "{", "void (*layout) (graph_t * g)", "void (*cleanup) (graph_t * g)", "}"); } // struct gvlayout_engine_s { // void (*layout) (graph_t * g); // void (*cleanup) (graph_t * g); // };plantuml-1.2017.15/src/h/gvlayout_engine_t.java000066400000000000000000000042011312650303100212560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 6neg5ydx7okjqcbqz9nndxl88 public interface gvlayout_engine_t extends gvlayout_engine_s { public static List DEFINITION = Arrays.asList( "typedef struct gvlayout_engine_s gvlayout_engine_t"); } // typedef struct gvlayout_engine_s gvlayout_engine_t;plantuml-1.2017.15/src/h/gvlayout_features_t.java000066400000000000000000000042531312650303100216360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5ixrh5lzf6cgqakcirp2uozbb public interface gvlayout_features_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int flags", "}", "gvlayout_features_t"); } // typedef struct { // int flags; // } gvlayout_features_t;plantuml-1.2017.15/src/h/gvloadimage_engine_s.java000066400000000000000000000044271312650303100216740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9857ym486lfba1vbejkz0jesv public interface gvloadimage_engine_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct gvloadimage_engine_s", "{", "void (*loadimage) (GVJ_t *job, usershape_t *us, boxf b, boolean filled)", "}"); } // struct gvloadimage_engine_s { // void (*loadimage) (GVJ_t *job, usershape_t *us, boxf b, boolean filled); // };plantuml-1.2017.15/src/h/gvloadimage_engine_t.java000066400000000000000000000042231312650303100216670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 2ribkbowigqfs0otd9wwditp5 public interface gvloadimage_engine_t extends gvloadimage_engine_s { public static List DEFINITION = Arrays.asList( "typedef struct gvloadimage_engine_s gvloadimage_engine_t"); } // typedef struct gvloadimage_engine_s gvloadimage_engine_t;plantuml-1.2017.15/src/h/gvplugin_active_device_t.java000066400000000000000000000046531312650303100225770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 c5u1u6iz4msxf9y4q5w78w22 public interface gvplugin_active_device_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct gvplugin_active_device_s", "{", "gvdevice_engine_t *engine", "int id", "gvdevice_features_t *features", "const char *type", "}", "gvplugin_active_device_t"); } // typedef struct gvplugin_active_device_s { // gvdevice_engine_t *engine; // int id; // gvdevice_features_t *features; // const char *type; // } gvplugin_active_device_t;plantuml-1.2017.15/src/h/gvplugin_active_layout_t.java000066400000000000000000000046541312650303100226560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 13w4wtxe0z0sh446ur163yvhf public interface gvplugin_active_layout_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct gvplugin_active_layout_s", "{", "gvlayout_engine_t *engine", "int id", "gvlayout_features_t *features", "const char *type", "}", "gvplugin_active_layout_t"); } // typedef struct gvplugin_active_layout_s { // gvlayout_engine_t *engine; // int id; // gvlayout_features_t *features; // const char *type; // } gvplugin_active_layout_t;plantuml-1.2017.15/src/h/gvplugin_active_loadimage_t.java000066400000000000000000000045411312650303100232560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 633mt1gwzq159n5j6n0lzgzam public interface gvplugin_active_loadimage_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct gvplugin_active_loadimage_t", "{", "gvloadimage_engine_t *engine", "int id", "const char *type", "}", "gvplugin_active_loadimage_t"); } // typedef struct gvplugin_active_loadimage_t { // gvloadimage_engine_t *engine; // int id; // const char *type; // } gvplugin_active_loadimage_t;plantuml-1.2017.15/src/h/gvplugin_active_render_t.java000066400000000000000000000046541312650303100226200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4af9oysh9wk1u0m5wjc60jcr3 public interface gvplugin_active_render_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct gvplugin_active_render_s", "{", "gvrender_engine_t *engine", "int id", "gvrender_features_t *features", "const char *type", "}", "gvplugin_active_render_t"); } // typedef struct gvplugin_active_render_s { // gvrender_engine_t *engine; // int id; // gvrender_features_t *features; // const char *type; // } gvplugin_active_render_t;plantuml-1.2017.15/src/h/gvplugin_active_textlayout_t.java000066400000000000000000000045611312650303100235600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4ht0rt62yul08h6v5kje6jk1x public interface gvplugin_active_textlayout_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct gvplugin_active_textlayout_s", "{", "gvtextlayout_engine_t *engine", "int id", "char *type", "}", "gvplugin_active_textlayout_t"); } // typedef struct gvplugin_active_textlayout_s { // gvtextlayout_engine_t *engine; // int id; // char *type; // } gvplugin_active_textlayout_t;plantuml-1.2017.15/src/h/gvplugin_api_t.java000066400000000000000000000043341312650303100205520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 epw5dncvmltf7yue85r8t00a7 public interface gvplugin_api_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "api_t api", "gvplugin_installed_t *types", "}", "gvplugin_api_t"); } // typedef struct { // api_t api; // gvplugin_installed_t *types; // } gvplugin_api_t;plantuml-1.2017.15/src/h/gvplugin_available_s.java000066400000000000000000000053461312650303100217240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4mff7kl30vs5cmzxe47j17hex public interface gvplugin_available_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct gvplugin_available_s", "{", "gvplugin_available_t *next", "const char *typestr", "int quality", "gvplugin_package_t *package", "gvplugin_installed_t *typeptr", "}"); } // struct gvplugin_available_s { // gvplugin_available_t *next; /* next plugin in linked list, or NULL */ // const char *typestr; /* type string, e.g. "png" or "ps" */ // int quality; /* Programmer assigned quality ranking within type (+ve or -ve int). // First implementation of type should be given "0" quality */ // gvplugin_package_t *package; /* details of library containing plugin */ // gvplugin_installed_t *typeptr; /* pointer to jumptable for plugin, // or NULL if not yet loaded */ // };plantuml-1.2017.15/src/h/gvplugin_available_t.java000066400000000000000000000042231312650303100217160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 6ct699hskqmknua7dg0fdwvmz public interface gvplugin_available_t extends gvplugin_available_s { public static List DEFINITION = Arrays.asList( "typedef struct gvplugin_available_s gvplugin_available_t"); } // typedef struct gvplugin_available_s gvplugin_available_t;plantuml-1.2017.15/src/h/gvplugin_installed_t.java000066400000000000000000000056141312650303100217620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 dcmpl8ruksxab5p8161qcvxcw public interface gvplugin_installed_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int id", "const char *type", "int quality", "void *engine", "void *features", "}", "gvplugin_installed_t"); } // typedef struct { // int id; /* an id that is only unique within a package // of plugins of the same api. // A renderer-type such as "png" in the cairo package // has an id that is different from the "ps" type // in the same package */ // const char *type; /* a string name, such as "png" or "ps" that // distinguishes different types withing the same // (renderer in this case) */ // int quality; /* an arbitrary integer used for ordering plugins of // the same type from different packages */ // void *engine; /* pointer to the jump table for the plugin */ // void *features; /* pointer to the feature description // void* because type varies by api */ // } gvplugin_installed_t;plantuml-1.2017.15/src/h/gvplugin_library_t.java000066400000000000000000000044601312650303100214450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 elhfawlitxj3187hf4lyyku80 public interface gvplugin_library_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "char *packagename", "gvplugin_api_t *apis", "}", "gvplugin_library_t"); } // typedef struct { // char *packagename; /* used when this plugin is builtin and has // no pathname */ // gvplugin_api_t *apis; // } gvplugin_library_t;plantuml-1.2017.15/src/h/gvplugin_package_s.java000066400000000000000000000044041312650303100213710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4x42jt53r4w0hua6kytv25z05 public interface gvplugin_package_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct gvplugin_package_s", "{", "gvplugin_package_t *next", "char *path", "char *name", "}"); } // struct gvplugin_package_s { // gvplugin_package_t *next; // char *path; // char *name; // };plantuml-1.2017.15/src/h/gvplugin_package_t.java000066400000000000000000000042061312650303100213720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 4mfo0bv62esvw8qme2tplg7k public interface gvplugin_package_t extends gvplugin_package_s { public static List DEFINITION = Arrays.asList( "typedef struct gvplugin_package_s gvplugin_package_t"); } // typedef struct gvplugin_package_s gvplugin_package_t;plantuml-1.2017.15/src/h/gvrender_engine_s.java000066400000000000000000000120031312650303100212160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 c9lcfmvndhmluehnjakiea1ei public interface gvrender_engine_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct gvrender_engine_s", "{", "void (*begin_job) (GVJ_t * job)", "void (*end_job) (GVJ_t * job)", "void (*begin_graph) (GVJ_t * job)", "void (*end_graph) (GVJ_t * job)", "void (*begin_layer) (GVJ_t * job, char *layername, int layerNum, int numLayers)", "void (*end_layer) (GVJ_t * job)", "void (*begin_page) (GVJ_t * job)", "void (*end_page) (GVJ_t * job)", "void (*begin_cluster) (GVJ_t * job)", "void (*end_cluster) (GVJ_t * job)", "void (*begin_nodes) (GVJ_t * job)", "void (*end_nodes) (GVJ_t * job)", "void (*begin_edges) (GVJ_t * job)", "void (*end_edges) (GVJ_t * job)", "void (*begin_node) (GVJ_t * job)", "void (*end_node) (GVJ_t * job)", "void (*begin_edge) (GVJ_t * job)", "void (*end_edge) (GVJ_t * job)", "void (*begin_anchor) (GVJ_t * job, char *href, char *tooltip, char *target, char *id)", "void (*end_anchor) (GVJ_t * job)", "void (*begin_label) (GVJ_t * job, label_type type)", "void (*end_label) (GVJ_t * job)", "void (*textspan) (GVJ_t * job, pointf p, textspan_t * span)", "void (*resolve_color) (GVJ_t * job, gvcolor_t * color)", "void (*ellipse) (GVJ_t * job, pointf * A, int filled)", "void (*polygon) (GVJ_t * job, pointf * A, int n, int filled)", "void (*beziercurve) (GVJ_t * job, pointf * A, int n, int arrow_at_start, int arrow_at_end, int)", "void (*polyline) (GVJ_t * job, pointf * A, int n)", "void (*comment) (GVJ_t * job, char *comment)", "void (*library_shape) (GVJ_t * job, char *name, pointf * A, int n, int filled)", "}"); } // struct gvrender_engine_s { // void (*begin_job) (GVJ_t * job); // void (*end_job) (GVJ_t * job); // void (*begin_graph) (GVJ_t * job); // void (*end_graph) (GVJ_t * job); // void (*begin_layer) (GVJ_t * job, char *layername, // int layerNum, int numLayers); // void (*end_layer) (GVJ_t * job); // void (*begin_page) (GVJ_t * job); // void (*end_page) (GVJ_t * job); // void (*begin_cluster) (GVJ_t * job); // void (*end_cluster) (GVJ_t * job); // void (*begin_nodes) (GVJ_t * job); // void (*end_nodes) (GVJ_t * job); // void (*begin_edges) (GVJ_t * job); // void (*end_edges) (GVJ_t * job); // void (*begin_node) (GVJ_t * job); // void (*end_node) (GVJ_t * job); // void (*begin_edge) (GVJ_t * job); // void (*end_edge) (GVJ_t * job); // void (*begin_anchor) (GVJ_t * job, // char *href, char *tooltip, char *target, char *id); // void (*end_anchor) (GVJ_t * job); // void (*begin_label) (GVJ_t * job, label_type type); // void (*end_label) (GVJ_t * job); // void (*textspan) (GVJ_t * job, pointf p, textspan_t * span); // void (*resolve_color) (GVJ_t * job, gvcolor_t * color); // void (*ellipse) (GVJ_t * job, pointf * A, int filled); // void (*polygon) (GVJ_t * job, pointf * A, int n, int filled); // void (*beziercurve) (GVJ_t * job, pointf * A, int n, // int arrow_at_start, int arrow_at_end, int); // void (*polyline) (GVJ_t * job, pointf * A, int n); // void (*comment) (GVJ_t * job, char *comment); // void (*library_shape) (GVJ_t * job, char *name, pointf * A, int n, int filled); // };plantuml-1.2017.15/src/h/gvrender_engine_t.java000066400000000000000000000042011312650303100212200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 5bxr6kqlo53bavjt2xfhgd4p8 public interface gvrender_engine_t extends gvrender_engine_s { public static List DEFINITION = Arrays.asList( "typedef struct gvrender_engine_s gvrender_engine_t"); } // typedef struct gvrender_engine_s gvrender_engine_t;plantuml-1.2017.15/src/h/gvrender_features_t.java000066400000000000000000000045771312650303100216110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 b5pxs48fv8n5ovo8dntg7yyiw public interface gvrender_features_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int flags", "double default_pad", "char **knowncolors", "int sz_knowncolors", "color_type_t color_type", "}", "gvrender_features_t"); } // typedef struct { // int flags; // double default_pad; /* graph units */ // char **knowncolors; // int sz_knowncolors; // color_type_t color_type; // } gvrender_features_t;plantuml-1.2017.15/src/h/gvtextlayout_engine_s.java000066400000000000000000000043761312650303100221770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 btpkmksp5qljd7s3c2whxtupr public interface gvtextlayout_engine_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct gvtextlayout_engine_s", "{", "boolean (*textlayout) (textspan_t *span, char** fontpath)", "}"); } // struct gvtextlayout_engine_s { // boolean (*textlayout) (textspan_t *span, char** fontpath); // };plantuml-1.2017.15/src/h/gvtextlayout_engine_t.java000066400000000000000000000042311312650303100221660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 6ftez1uvnskvljccs3z0sfspf public interface gvtextlayout_engine_t extends gvtextlayout_engine_s { public static List DEFINITION = Arrays.asList( "typedef struct gvtextlayout_engine_s gvtextlayout_engine_t"); } // typedef struct gvtextlayout_engine_s gvtextlayout_engine_t;plantuml-1.2017.15/src/h/hsvrgbacolor_t.java000066400000000000000000000044571312650303100205670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 a81kzkq5n7k0bft1xpxzn8sof public interface hsvrgbacolor_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct hsvrgbacolor_t", "{", "char *name", "unsigned char h, s, v", "unsigned char r, g, b, a", "}", "hsvrgbacolor_t"); } // typedef struct hsvrgbacolor_t { // char *name; // unsigned char h, s, v; // unsigned char r, g, b, a; // } hsvrgbacolor_t;plantuml-1.2017.15/src/h/htextspan_t.java000066400000000000000000000045561312650303100201120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 73dlf2ef4p53l8j1jla74ryhq public interface htextspan_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "textspan_t *items", "short nitems", "char just", "double size", "double lfsize", "}", "htextspan_t"); } // typedef struct { // textspan_t *items; // short nitems; // char just; // double size; /* width of span */ // double lfsize; /* offset from previous baseline to current one */ // } htextspan_t;plantuml-1.2017.15/src/h/htmlcell_t.java000066400000000000000000000041621312650303100176710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 c3fdy8b5qt90u4c5ss75lcguu public interface htmlcell_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct htmlcell_t htmlcell_t"); } // typedef struct htmlcell_t htmlcell_t;plantuml-1.2017.15/src/h/htmldata_t.java000066400000000000000000000056271312650303100176720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3ndpf3koymkortrl6lwwvih5k public interface htmldata_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "char *href", "char *port", "char *target", "char *title", "char *id", "char *bgcolor", "char *pencolor", "int gradientangle", "signed char space", "unsigned char border", "unsigned char pad", "unsigned char sides", "unsigned short flags", "unsigned short width", "unsigned short height", "unsigned short style", "boxf box", "}", "htmldata_t"); } // typedef struct { // char *href; /* pointer to an external resource */ // char *port; // char *target; // char *title; // char *id; // char *bgcolor; // char *pencolor; // int gradientangle; // signed char space; // unsigned char border; // unsigned char pad; // unsigned char sides; /* set of sides exposed to field */ // unsigned short flags; // unsigned short width; // unsigned short height; // unsigned short style; // boxf box; /* its geometric placement in points */ // } htmldata_t;plantuml-1.2017.15/src/h/htmlenv_t.java000066400000000000000000000046261312650303100175470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 c1g03t0hv8uptocwfcdelqwqa public interface htmlenv_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "pointf pos", "textfont_t finfo", "void *obj", "graph_t *g", "char *imgscale", "char *objid", "boolean objid_set", "}", "htmlenv_t"); } // typedef struct { // pointf pos; // textfont_t finfo; // void *obj; // graph_t *g; // char *imgscale; // char *objid; // boolean objid_set; // } htmlenv_t;plantuml-1.2017.15/src/h/htmlimg_t.java000066400000000000000000000043071312650303100175270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 2qx8kiwbmyh61vxkplyhzp0i7 public interface htmlimg_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "boxf box", "char *src", "char *scale", "}", "htmlimg_t"); } // typedef struct { // boxf box; // char *src; // char *scale; // } htmlimg_t;plantuml-1.2017.15/src/h/htmllabel_t.java000066400000000000000000000041661312650303100200350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 gzde2tumx5vupv2vjpzbv299 public interface htmllabel_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct htmllabel_t htmllabel_t"); } // typedef struct htmllabel_t htmllabel_t;plantuml-1.2017.15/src/h/htmlmap_data_t.java000066400000000000000000000045731312650303100205260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 d20oliwp4ordsbln3u0w8ovgu public interface htmlmap_data_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "char *url", "char *tooltip", "char *target", "char *id", "boolean explicit_tooltip", "point LL", "point UR", "}", "htmlmap_data_t"); } // typedef struct { // char *url; // char *tooltip; // char *target; // char *id; // boolean explicit_tooltip; // point LL; // point UR; // } htmlmap_data_t;plantuml-1.2017.15/src/h/htmltbl_t.java000066400000000000000000000041551312650303100175350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4l8qax3cpj0f9m5mv6n7ijuw3 public interface htmltbl_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct htmltbl_t htmltbl_t"); } // typedef struct htmltbl_t htmltbl_t;plantuml-1.2017.15/src/h/htmltxt_t.java000066400000000000000000000043731312650303100175750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9d3jp17twvv6zmypz9ry6ulqm public interface htmltxt_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "htextspan_t *spans", "short nspans", "char simple", "boxf box", "}", "htmltxt_t"); } // typedef struct { // htextspan_t *spans; // short nspans; // char simple; // boxf box; // } htmltxt_t;plantuml-1.2017.15/src/h/imagescale_t.java000066400000000000000000000050631312650303100201600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 89sw2fm15jrbgce4w1skvyxcw public interface imagescale_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "IMAGESCALE_FALSE,", "IMAGESCALE_TRUE,", "IMAGESCALE_WIDTH,", "IMAGESCALE_HEIGHT,", "IMAGESCALE_BOTH", "}", "imagescale_t"); } // typedef enum { // IMAGESCALE_FALSE, /* no image scaling */ // IMAGESCALE_TRUE, /* scale image to fit but keep aspect ratio */ // IMAGESCALE_WIDTH, /* scale image width to fit, keep height fixed */ // IMAGESCALE_HEIGHT, /* scale image height to fit, keep width fixed */ // IMAGESCALE_BOTH /* scale image to fit without regard for aspect ratio */ // } imagescale_t;plantuml-1.2017.15/src/h/imagetype_t.java000066400000000000000000000045531312650303100200550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 323qopt4v37hk4tf587zjqima public interface imagetype_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "FT_NULL, FT_BMP, FT_GIF, FT_PNG, FT_JPEG, FT_PDF, FT_PS, FT_EPS, FT_SVG, FT_XML, FT_RIFF, FT_WEBP, FT_ICO, FT_TIFF", "}", "imagetype_t"); } // typedef enum { FT_NULL, // FT_BMP, FT_GIF, FT_PNG, FT_JPEG, // FT_PDF, FT_PS, FT_EPS, FT_SVG, FT_XML, // FT_RIFF, FT_WEBP, FT_ICO, FT_TIFF // } imagetype_t;plantuml-1.2017.15/src/h/inside_t.java000066400000000000000000000045401312650303100173400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 1ntxl46xf9k1rah2wosqhcdno public interface inside_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef union inside_t", "{", "struct", "{", "pointf* p", "double* r", "}", "a", "struct", "{", "node_t* n", "boxf* bp", "}", "s", "}", "inside_t"); } // typedef union inside_t { // struct { // pointf* p; // double* r; // } a; // struct { // node_t* n; // boxf* bp; // } s; // } inside_t;plantuml-1.2017.15/src/h/intitem.java000066400000000000000000000042651312650303100172170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7b66x6dd9gr7x0hzm479cbpjg public interface intitem extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int id", "Dtlink_t link", "}", "intitem"); } // typedef struct { // int id; // Dtlink_t link; // } intitem;plantuml-1.2017.15/src/h/item.java000066400000000000000000000044001312650303100164730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6pciw9nctk1zwl2yxkga3xn64 public interface item extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Dtlink_t link", "void *p[2]", "node_t *t", "node_t *h", "}", "item"); } // typedef struct { // Dtlink_t link; /* cdt data */ // void *p[2]; /* key */ // node_t *t; // node_t *h; // } item;plantuml-1.2017.15/src/h/knowntype_t.java000066400000000000000000000044031312650303100201210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3x7rb5nh45r9eb6pmyo1jg63w public interface knowntype_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "char *template", "int size", "int type", "char *stringtype", "}", "knowntype_t"); } // typedef struct { // char *template; // int size; // int type; // char *stringtype; // } knowntype_t;plantuml-1.2017.15/src/h/label_params_t.java000066400000000000000000000044261312650303100205120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 hnxz1757w4pts48w055n1a2r public interface label_params_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "boxf bb", "unsigned char force", "}", "label_params_t"); } // typedef struct { // boxf bb; /* Bounding box of all objects */ // unsigned char force; /* If true, all labels must be placed */ // } label_params_t;plantuml-1.2017.15/src/h/label_type.java000066400000000000000000000042341312650303100176620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 anrmbfb1beni5tl0v3mgwb9j0 public interface label_type extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "LABEL_PLAIN, LABEL_HTML", "}", "label_type"); } // typedef enum { LABEL_PLAIN, LABEL_HTML } label_type;plantuml-1.2017.15/src/h/layerWidthInfo_t.java000066400000000000000000000050211312650303100210100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3a7yg8rwvl5zylbzoufm1r2ak public interface layerWidthInfo_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct layerWidthInfo_t", "{", "int layerNumber", "nodeGroup_t **nodeGroupsInLayer", "int *removed", "int nNodeGroupsInLayer", "int nDummyNodes", "double width", "double height", "}", "layerWidthInfo_t"); } // typedef struct layerWidthInfo_t { // int layerNumber; // nodeGroup_t **nodeGroupsInLayer; // int *removed; /* is the node group removed? */ // int nNodeGroupsInLayer; // int nDummyNodes; // double width; // double height; // } layerWidthInfo_t;plantuml-1.2017.15/src/h/layout_info.java000066400000000000000000000046521312650303100200760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5mkovfn67mfcvlnamhjqfmd15 public interface layout_info extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "graph_t* rootg", "attrsym_t *G_coord", "attrsym_t *G_width", "attrsym_t *G_height", "int gid", "pack_info pack", "}", "layout_info"); } // typedef struct { // graph_t* rootg; /* logical root; graph passed in to fdp_layout */ // attrsym_t *G_coord; // attrsym_t *G_width; // attrsym_t *G_height; // int gid; // pack_info pack; // } layout_info;plantuml-1.2017.15/src/h/layout_t.java000066400000000000000000000051711312650303100174030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6njlcutz3q6rco547vwgggk5l public interface layout_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct layout_t", "{", "double quantum", "double scale", "double ratio", "double dpi", "pointf margin", "pointf page", "pointf size", "boolean filled", "boolean landscape", "boolean centered", "ratio_t ratio_kind", "void* xdots", "char* id", "}", "layout_t"); } // typedef struct layout_t { // double quantum; // double scale; // double ratio; /* set only if ratio_kind == R_VALUE */ // double dpi; // pointf margin; // pointf page; // pointf size; // boolean filled; // boolean landscape; // boolean centered; // ratio_t ratio_kind; // void* xdots; // char* id; // } layout_t;plantuml-1.2017.15/src/h/layout_type.java000066400000000000000000000042071312650303100201200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6g73ng9kl31nlub97di73mpi3 public interface layout_type extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "LAYOUT_DOT,", "}", "layout_type"); } // typedef enum { LAYOUT_DOT, } layout_type;plantuml-1.2017.15/src/h/lexstate_t.java000066400000000000000000000055371312650303100177250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8p2u7sziyialmpuyrxsg8ptw6 public interface lexstate_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "char* ptr", "int tok", "agxbuf* xb", "agxbuf lb", "char warn", "char error", "char inCell", "char mode", "char *currtok", "char *prevtok", "int currtoklen", "int prevtoklen", "}", "lexstate_t"); } // typedef struct { // // // // char* ptr; /* input source */ // int tok; /* token type */ // agxbuf* xb; /* buffer to gather T_string data */ // agxbuf lb; /* buffer for translating lexical data */ // char warn; /* set if warning given */ // char error; /* set if error given */ // char inCell; /* set if in TD to allow T_string */ // char mode; /* for handling artificial .. */ // char *currtok; /* for error reporting */ // char *prevtok; /* for error reporting */ // int currtoklen; // int prevtoklen; // } lexstate_t;plantuml-1.2017.15/src/h/list_t.java000066400000000000000000000043041312650303100170360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the Eclipse Public License. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 67szzzwvgx8wjittlg7atd5zm public interface list_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct list_s", "{", "item *first", "item *last", "}", "list_t"); } // typedef struct list_s { /* maintain head and tail ptrs for fast append */ // item *first; // item *last; // } list_t;plantuml-1.2017.15/src/h/lt_symlist_t.java000066400000000000000000000043101312650303100202630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 309opqtj1406u6ign73nfq4m4 public interface lt_symlist_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "const char *name", "void* address", "}", "lt_symlist_t"); } // typedef struct { // const char *name; // void* address; // } lt_symlist_t;plantuml-1.2017.15/src/h/ltriangle_t.java000066400000000000000000000042661312650303100200530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3566t0d7zo0xk2bqt6gkpxwbo public interface ltriangle_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct dpd_triangle", "{", "Ppoint_t *v[3]", "}", "ltriangle_t"); } // typedef struct dpd_triangle { // Ppoint_t *v[3]; // } ltriangle_t;plantuml-1.2017.15/src/h/lvertex_2_t.java000066400000000000000000000042561312650303100200030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 89tzmfb64xv1whqvoh9qplgib public interface lvertex_2_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct lvertex_2_t", "{", "double x, y", "}", "lvertex_2_t"); } // typedef struct lvertex_2_t { // double x, y; // } lvertex_2_t;plantuml-1.2017.15/src/h/map_shape_t.java000066400000000000000000000042761312650303100200300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 demuj81ppuddcmcukr5ibr2ow public interface map_shape_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "MAP_RECTANGLE, MAP_CIRCLE, MAP_POLYGON,", "}", "map_shape_t"); } // typedef enum {MAP_RECTANGLE, MAP_CIRCLE, MAP_POLYGON, } map_shape_t;plantuml-1.2017.15/src/h/maze.java000066400000000000000000000046251312650303100165020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 etmr8p3tgfovcabhg7h432rr7 public interface maze extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int ncells, ngcells", "cell* cells", "cell* gcells", "sgraph* sg", "Dt_t* hchans", "Dt_t* vchans", "}", "maze"); } // typedef struct { // int ncells, ngcells; // cell* cells; /* cells not corresponding to graph nodes */ // cell* gcells; /* cells corresponding to graph nodes */ // sgraph* sg; // Dt_t* hchans; // Dt_t* vchans; // } maze;plantuml-1.2017.15/src/h/monchain_t.java000066400000000000000000000045041312650303100176610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 54inajo7osrhht39i3f0jv3yq public interface monchain_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int vnum", "int next", "int prev", "int marked", "}", "monchain_t"); } // typedef struct { // int vnum; // int next; /* Circularly linked list */ // int prev; /* describing the monotone */ // int marked; /* polygon */ // } monchain_t;plantuml-1.2017.15/src/h/mpair.java000066400000000000000000000042741312650303100166560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7ew589ru405xxz59tz7c44626 public interface mpair extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Dtlink_t link", "point id", "int v", "}", "mpair"); } // typedef struct { // Dtlink_t link; // point id; // int v; // } mpair;plantuml-1.2017.15/src/h/mytime_t.java000066400000000000000000000041251312650303100173700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.tms; //2 eevewge4moog8cb48ratfyry public interface mytime_t extends tms { public static List DEFINITION = Arrays.asList( "typedef struct tms mytime_t"); } // typedef struct tms mytime_t;plantuml-1.2017.15/src/h/ndata.java000066400000000000000000000042141312650303100166270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 agft9d3rpslafvegya5hlggdj public interface ndata extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Agnode_t *dnode", "}", "ndata"); } // typedef struct { // Agnode_t *dnode; // } ndata;plantuml-1.2017.15/src/h/nlist_t.java000066400000000000000000000042711312650303100172170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 21yt3x3ukjw41rbx7gc4w7ebj public interface nlist_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct nlist_t", "{", "node_t **list", "int size", "}", "nlist_t"); } // typedef struct nlist_t { // node_t **list; // int size; // } nlist_t;plantuml-1.2017.15/src/h/nodeGroup_t.java000066400000000000000000000044121312650303100200250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7osdhdc58wglwftiwr8ad9ocj public interface nodeGroup_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct nodeGroup_t", "{", "node_t **nodes", "int nNodes", "double width, height", "}", "nodeGroup_t"); } // typedef struct nodeGroup_t { // node_t **nodes; // int nNodes; // double width, height; // } nodeGroup_t;plantuml-1.2017.15/src/h/node_list.java000066400000000000000000000043441312650303100175240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 vma2gttg3cuyksw8xvwfgf30 public interface node_list extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct _node_list", "{", "Agnode_t *node", "struct _node_list *next", "}", "node_list"); } // typedef struct _node_list { // Agnode_t *node; // struct _node_list *next; // } node_list;plantuml-1.2017.15/src/h/node_t.java000066400000000000000000000041051312650303100170070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 9eay2w1ulq4b60xf1edcfkkmi public interface node_t extends Agnode_s { public static List DEFINITION = Arrays.asList( "typedef struct Agnode_s node_t"); } // typedef struct Agnode_s node_t;plantuml-1.2017.15/src/h/nodelist_t.java000066400000000000000000000043601312650303100177060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 cvnwgrhim9meq1d0au3lunrpz public interface nodelist_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "nodelistitem_t *first", "nodelistitem_t *last", "int sz", "}", "nodelist_t"); } // typedef struct { // nodelistitem_t *first; // nodelistitem_t *last; // int sz; // } nodelist_t;plantuml-1.2017.15/src/h/nodelistitem.java000066400000000000000000000043551312650303100202460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9tgul5z9izqfjpthq6opcm8cx public interface nodelistitem extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct nodelistitem", "{", "node_t *curr", "nodelistitem_t *next", "nodelistitem_t *prev", "}"); } // struct nodelistitem { // node_t *curr; // nodelistitem_t *next; // nodelistitem_t *prev; // };plantuml-1.2017.15/src/h/nodelistitem_t.java000066400000000000000000000041511312650303100205630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 bafagz7d505sofeisu9sq7ssj public interface nodelistitem_t extends nodelistitem { public static List DEFINITION = Arrays.asList( "typedef struct nodelistitem nodelistitem_t"); } // typedef struct nodelistitem nodelistitem_t;plantuml-1.2017.15/src/h/nodequeue.java000066400000000000000000000043351312650303100175360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 aevkl4zsbstj3pc33rpzrocul public interface nodequeue extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct nodequeue", "{", "node_t **store, **limit, **head, **tail", "}", "nodequeue"); } // typedef struct nodequeue { // node_t **store, **limit, **head, **tail; // } nodequeue;plantuml-1.2017.15/src/h/nodesizefn_t.java000066400000000000000000000042201312650303100202240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 40pzqs0lu99zr390eymloav3n public interface nodesizefn_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef void (*nodesizefn_t) (Agnode_t *, boolean)"); } // typedef void (*nodesizefn_t) (Agnode_t *, boolean);plantuml-1.2017.15/src/h/nsitem_t.java000066400000000000000000000042641312650303100173670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9b6xyzk04h9hcfqxkrertg16r public interface nsitem_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Dtlink_t link", "Agnode_t *np", "}", "nsitem_t"); } // typedef struct { // Dtlink_t link; // Agnode_t *np; // } nsitem_t;plantuml-1.2017.15/src/h/obj_state_s.java000066400000000000000000000123431312650303100200360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7rfvc65ygzocig64xmd4vm8m8 public interface obj_state_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct obj_state_s", "{", "obj_state_t *parent", "obj_type type", "union", "{", "graph_t *g", "graph_t *sg", "node_t *n", "edge_t *e", "}", "u", "emit_state_t emit_state", "gvcolor_t pencolor, fillcolor, stopcolor", "int gradient_angle", "float gradient_frac", "pen_type pen", "fill_type fill", "double penwidth", "char **rawstyle", "double z, tail_z, head_z", "char *label", "char *xlabel", "char *taillabel", "char *headlabel", "char *url", "char *id", "char *labelurl", "char *tailurl", "char *headurl", "char *tooltip", "char *labeltooltip", "char *tailtooltip", "char *headtooltip", "char *target", "char *labeltarget", "char *tailtarget", "char *headtarget", "int explicit_tooltip:1", "int explicit_tailtooltip:1", "int explicit_headtooltip:1", "int explicit_labeltooltip:1", "int explicit_tailtarget:1", "int explicit_headtarget:1", "int explicit_edgetarget:1", "int explicit_tailurl:1", "int explicit_headurl:1", "map_shape_t url_map_shape", "int url_map_n", "pointf *url_map_p", "int url_bsplinemap_poly_n", "int *url_bsplinemap_n", "pointf *url_bsplinemap_p", "int tailendurl_map_n", "pointf *tailendurl_map_p", "int headendurl_map_n", "pointf *headendurl_map_p", "}"); } // struct obj_state_s { // obj_state_t *parent; // // obj_type type; // union { // graph_t *g; // graph_t *sg; // node_t *n; // edge_t *e; // } u; // // emit_state_t emit_state; // // gvcolor_t pencolor, fillcolor, stopcolor; // int gradient_angle; // float gradient_frac; // pen_type pen; // fill_type fill; // double penwidth; // char **rawstyle; // // double z, tail_z, head_z; /* z depths for 2.5D renderers such as vrml */ // // /* fully substituted text strings */ // char *label; // char *xlabel; // char *taillabel; // char *headlabel; // // char *url; /* if GVRENDER_DOES_MAPS */ // char *id; // char *labelurl; // char *tailurl; // char *headurl; // // char *tooltip; /* if GVRENDER_DOES_TOOLTIPS */ // char *labeltooltip; // char *tailtooltip; // char *headtooltip; // // char *target; /* if GVRENDER_DOES_TARGETS */ // char *labeltarget; // char *tailtarget; // char *headtarget; // // int explicit_tooltip:1; // int explicit_tailtooltip:1; // int explicit_headtooltip:1; // int explicit_labeltooltip:1; // int explicit_tailtarget:1; // int explicit_headtarget:1; // int explicit_edgetarget:1; // int explicit_tailurl:1; // int explicit_headurl:1; // // /* primary mapped region - node shape, edge labels */ // map_shape_t url_map_shape; // int url_map_n; /* number of points for url map if GVRENDER_DOES_MAPS */ // pointf *url_map_p; // // /* additonal mapped regions for edges */ // int url_bsplinemap_poly_n; /* number of polygons in url bspline map // if GVRENDER_DOES_MAPS && GVRENDER_DOES_MAP_BSPLINES */ // int *url_bsplinemap_n; /* array of url_bsplinemap_poly_n ints // of number of points in each polygon */ // pointf *url_bsplinemap_p; /* all the polygon points */ // // int tailendurl_map_n; /* tail end intersection with node */ // pointf *tailendurl_map_p; // // int headendurl_map_n; /* head end intersection with node */ // pointf *headendurl_map_p; // };plantuml-1.2017.15/src/h/obj_state_t.java000066400000000000000000000041341312650303100200360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 ol13mjn4n7xeyqspov33hno8 public interface obj_state_t extends obj_state_s { public static List DEFINITION = Arrays.asList( "typedef struct obj_state_s obj_state_t"); } // typedef struct obj_state_s obj_state_t;plantuml-1.2017.15/src/h/obj_type.java000066400000000000000000000043421312650303100173550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4karyr6plzrqsfs5wpstvmzdx public interface obj_type extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "ROOTGRAPH_OBJTYPE, CLUSTER_OBJTYPE, NODE_OBJTYPE, EDGE_OBJTYPE", "}", "obj_type"); } // typedef enum {ROOTGRAPH_OBJTYPE, CLUSTER_OBJTYPE, NODE_OBJTYPE, EDGE_OBJTYPE} obj_type;plantuml-1.2017.15/src/h/object_t.java000066400000000000000000000045321312650303100173340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3ll53gc239t205eaimof9u6ah public interface object_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "pointf pos", "pointf sz", "xlabel_t *lbl", "}", "object_t"); } // typedef struct { // pointf pos; /* Position of lower-left corner of object */ // pointf sz; /* Size of object; may be zero for a point */ // xlabel_t *lbl; /* Label attached to object, or NULL */ // } object_t;plantuml-1.2017.15/src/h/objlist.java000066400000000000000000000043021312650303100172040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 bap0murffzh9iwgtluqxcuzxl public interface objlist extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int cnt", "int sz", "Ppoly_t **obs", "}", "objlist"); } // typedef struct { // int cnt; // int sz; // Ppoly_t **obs; // } objlist;plantuml-1.2017.15/src/h/opts_t.java000066400000000000000000000045621312650303100170560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8jr1ed153znr4z4552bl1bfkj public interface opts_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "GVC_t *gvc", "char *infname", "char *outfname", "FILE *inf", "FILE *outf", "char *lay", "char *fmt", "int force", "}", "opts_t"); } // typedef struct { // GVC_t *gvc; // char *infname; // char *outfname; // FILE *inf; // FILE *outf; // char *lay; // char *fmt; // int force; // } opts_t;plantuml-1.2017.15/src/h/p2e_t.java000066400000000000000000000042651312650303100165570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 1im40ams3kh5v6dlvxd8o76ql public interface p2e_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct p2e_t", "{", "Ppoint_t *pp", "Pedge_t *ep", "}", "p2e_t"); } // typedef struct p2e_t { // Ppoint_t *pp; // Pedge_t *ep; // } p2e_t;plantuml-1.2017.15/src/h/pack_info.java000066400000000000000000000052361312650303100174760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 95stwmwomxnw1qea4q6lmeekb public interface pack_info extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "float aspect", "int sz", "unsigned int margin", "int doSplines", "pack_mode mode", "boolean *fixed", "packval_t* vals", "int flags", "}", "pack_info"); } // typedef struct { // float aspect; /* desired aspect ratio */ // int sz; /* row/column size size */ // unsigned int margin; /* margin left around objects, in points */ // int doSplines; /* use splines in constructing graph shape */ // pack_mode mode; /* granularity and method */ // boolean *fixed; /* fixed[i] == true implies g[i] should not be moved */ // packval_t* vals; /* for arrays, sort numbers */ // int flags; // } pack_info;plantuml-1.2017.15/src/h/pack_mode.java000066400000000000000000000043231312650303100174630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 1ptr5q16rzf9tt2rxbfqjxump public interface pack_mode extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "l_undef, l_clust, l_node, l_graph, l_array, l_aspect", "}", "pack_mode"); } // typedef enum { l_undef, l_clust, l_node, l_graph, l_array, l_aspect } pack_mode;plantuml-1.2017.15/src/h/pair.java000066400000000000000000000042421312650303100164740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 ddwipekygokokhhjsvpkehl11 public interface pair extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Dtlink_t link", "point id", "}", "pair"); } // typedef struct { // Dtlink_t link; // point id; // } pair;plantuml-1.2017.15/src/h/pair2.java000066400000000000000000000042011312650303100165510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 dy5r1sdgz0max2193u4q02fxa public interface pair2 extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "pair t1, t2", "}", "pair2"); } // typedef struct { // pair t1, t2; // } pair2;plantuml-1.2017.15/src/h/paird.java000066400000000000000000000042101312650303100166330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 einfe3q62jgv9xhayk3bntd2n public interface paird extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "double p1, p2", "}", "paird"); } // typedef struct { // double p1, p2; // } paird;plantuml-1.2017.15/src/h/parms_t.java000066400000000000000000000065111312650303100172070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9cd2h3321diwjh8ip8pl0j7no public interface parms_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int useGrid", "int useNew", "long seed", "int numIters", "int maxIters", "int unscaled", "double C", "double Tfact", "double K", "double T0", "int smode", "double Cell", "double Cell2", "double K2", "double Wd", "double Ht", "double Wd2", "double Ht2", "int pass1", "int loopcnt", "}", "parms_t"); } // typedef struct { // int useGrid; /* use grid for speed up */ // int useNew; /* encode x-K into attractive force */ // long seed; /* seed for position RNG */ // int numIters; /* actual iterations in layout */ // int maxIters; /* max iterations in layout */ // int unscaled; /* % of iterations used in pass 1 */ // double C; /* Repulsion factor in xLayout */ // double Tfact; /* scale temp from default expression */ // double K; /* spring constant; ideal distance */ // double T0; /* initial temperature */ // int smode; /* seed mode */ // double Cell; /* grid cell size */ // double Cell2; /* Cell*Cell */ // double K2; /* K*K */ // double Wd; /* half-width of boundary */ // double Ht; /* half-height of boundary */ // double Wd2; /* Wd*Wd */ // double Ht2; /* Ht*Ht */ // int pass1; /* iterations used in pass 1 */ // int loopcnt; /* actual iterations in this pass */ // } parms_t;plantuml-1.2017.15/src/h/path.java000066400000000000000000000045441312650303100165020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 ccnx75vstszprxk6fxhq89rpu public interface path extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct path", "{", "port start, end", "int nbox", "boxf *boxes", "void *data", "}", "path"); } // typedef struct path { /* internal specification for an edge spline */ // port start, end; // int nbox; /* number of subdivisions */ // boxf *boxes; /* rectangular regions of subdivision */ // void *data; // } path;plantuml-1.2017.15/src/h/pathend_t.java000066400000000000000000000045011312650303100175050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 42vd8ru4xms0dzzipvkxpb5xt public interface pathend_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct pathend_t", "{", "boxf nb", "pointf np", "int sidemask", "int boxn", "boxf boxes[20]", "}", "pathend_t"); } // typedef struct pathend_t { // boxf nb; /* the node box */ // pointf np; /* node port */ // int sidemask; // int boxn; // boxf boxes[20]; // } pathend_t;plantuml-1.2017.15/src/h/pathpoint.java000066400000000000000000000045751312650303100175600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 a5i7wzlk8jfe8fjde2lmrcxmi public interface pathpoint extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "double x", "double y", "double lengthsofar", "char type", "double dir", "double lout", "int bevel", "double dir2", "}", "pathpoint"); } // typedef struct { // double x; // double y; // double lengthsofar; // char type; // double dir; // double lout; // int bevel; // double dir2; // } pathpoint;plantuml-1.2017.15/src/h/pen_type.java000066400000000000000000000042761312650303100173730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 1soyedn2kokhqrl0ppmbkgno9 public interface pen_type extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "PEN_NONE, PEN_DASHED, PEN_DOTTED, PEN_SOLID", "}", "pen_type"); } // typedef enum { PEN_NONE, PEN_DASHED, PEN_DOTTED, PEN_SOLID } pen_type;plantuml-1.2017.15/src/h/pending_cb_t.java000066400000000000000000000046141312650303100201570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7egb0316v9vsn8jyhhkr2gszq public interface pending_cb_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Dtlink_t link", "unsigned long key", "Agraph_t *g", "Agobj_t *obj", "symlist_t *symlist", "}", "pending_cb_t"); } // typedef struct { // Dtlink_t link; // unsigned long key; /* universal key for main or sub-object */ // Agraph_t *g; // Agobj_t *obj; // symlist_t *symlist; /* attributes involved */ // } pending_cb_t;plantuml-1.2017.15/src/h/pendingset_t.java000066400000000000000000000044161312650303100202270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3vwa5jq346b29ho1uecj2lpz7 public interface pendingset_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Agrec_t h", "struct", "{", "Dict_t *g, *n, *e", "}", "ins, mod, del", "}", "pendingset_t"); } // typedef struct { // Agrec_t h; // struct { // Dict_t *g, *n, *e; // } ins, mod, del; // } pendingset_t;plantuml-1.2017.15/src/h/pf.java000066400000000000000000000041501312650303100161440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9wkvh85air3altazyul27m0gc public interface pf extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef void (*pf) (char *, void *)"); } // typedef void (*pf) (char *, void *);plantuml-1.2017.15/src/h/pitem.java000066400000000000000000000044561312650303100166660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 1mvg2nc9o3ce4978cy5j457yj public interface pitem extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Dtlink_t link", "union", "{", "Dt_t *rp", "htmlcell_t *cp", "}", "u", "unsigned char ruled", "}", "pitem"); } // typedef struct { // Dtlink_t link; // union { // Dt_t *rp; // htmlcell_t *cp; // } u; // unsigned char ruled; // } pitem;plantuml-1.2017.15/src/h/point.java000066400000000000000000000041641312650303100166750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 axpj7c8u90q3k5tbk9sy03qy6 public interface point extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int x, y", "}", "point"); } // typedef struct { int x, y; } point;plantuml-1.2017.15/src/h/pointf.java000066400000000000000000000042171312650303100170420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 c2dqy43vdg0rr841peh6gqytj public interface pointf extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct pointf_s", "{", "double x, y", "}", "pointf"); } // typedef struct pointf_s { double x, y; } pointf;plantuml-1.2017.15/src/h/pointnlink_t.java000066400000000000000000000043641312650303100202560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3pqj1ldfe9xn0d28j7xc7apm0 public interface pointnlink_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct pointnlink_t", "{", "Ppoint_t *pp", "struct pointnlink_t *link", "}", "pointnlink_t"); } // typedef struct pointnlink_t { // Ppoint_t *pp; // struct pointnlink_t *link; // } pointnlink_t;plantuml-1.2017.15/src/h/poly_desc_t.java000066400000000000000000000044151312650303100200470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6mt9ui9xo6b1joat1z7c0klmi public interface poly_desc_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "pointf (*size_gen) (pointf)", "void (*vertex_gen) (pointf*, pointf*)", "}", "poly_desc_t"); } // typedef struct { // pointf (*size_gen) (pointf); // void (*vertex_gen) (pointf*, pointf*); // } poly_desc_t;plantuml-1.2017.15/src/h/polygon_t.java000066400000000000000000000053561312650303100175620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 23el548cy5m8f5wz8b2x5tihx public interface polygon_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct polygon_t", "{", "int regular", "int peripheries", "int sides", "double orientation", "double distortion", "double skew", "int option", "pointf *vertices", "}", "polygon_t"); } // typedef struct polygon_t { /* mutable shape information for a node */ // int regular; /* true for symmetric shapes */ // int peripheries; /* number of periphery lines */ // int sides; /* number of sides */ // double orientation; /* orientation of shape (+ve degrees) */ // double distortion; /* distortion factor - as in trapezium */ // double skew; /* skew factor - as in parallelogram */ // int option; /* ROUNDED, DIAGONAL corners, etc. */ // pointf *vertices; /* array of vertex points */ // } polygon_t;plantuml-1.2017.15/src/h/port.java000066400000000000000000000062571312650303100165350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 71w78cxaan0929s365t8kncr6 public interface port extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct port", "{", "pointf p", "double theta", "boxf *bp", "boolean defined", "boolean constrained", "boolean clip", "boolean dyna", "unsigned char order", "unsigned char side", "char *name", "}", "port"); } // typedef struct port { /* internal edge endpoint specification */ // pointf p; /* aiming point relative to node center */ // double theta; /* slope in radians */ // boxf *bp; /* if not null, points to bbox of // * rectangular area that is port target // */ // boolean defined; /* if true, edge has port info at this end */ // boolean constrained; /* if true, constraints such as theta are set */ // boolean clip; /* if true, clip end to node/port shape */ // boolean dyna; /* if true, assign compass point dynamically */ // unsigned char order; /* for mincross */ // unsigned char side; /* if port is on perimeter of node, this // * contains the bitwise OR of the sides (TOP, // * BOTTOM, etc.) it is on. // */ // char *name; /* port name, if it was explicitly given, otherwise NULL */ // } port;plantuml-1.2017.15/src/h/posinfo_t.java000066400000000000000000000052441312650303100175440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 dce4b7kx8f1rue2zogxekzxww public interface posinfo_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "Agnode_t* n", "double theta", "double minRadius", "double maxRadius", "double diameter", "double scale", "int childCount", "}", "posinfo_t"); } // typedef struct { // Agnode_t* n; // double theta; /* angle of node */ // double minRadius; /* minimum radius for child circle */ // double maxRadius; /* maximum radius of child blocks */ // double diameter; /* length of arc needed for child blocks */ // double scale; /* scale factor to increase minRadius to parents' children don't overlap */ // int childCount; /* no. of child blocks attached at n */ // } posinfo_t;plantuml-1.2017.15/src/h/posstate.java000066400000000000000000000052451312650303100174070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 92zaxjl5ni7v139jf56a43ebk public interface posstate extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "double radius", "double subtreeR", "double nodeAngle", "double firstAngle", "double lastAngle", "block_t *cp", "node_t *neighbor", "}", "posstate"); } // typedef struct { // double radius; /* Basic radius of block */ // double subtreeR; /* Max of subtree radii */ // double nodeAngle; /* Angle allocated to each node in block */ // double firstAngle; /* Smallest child angle when block has 1 node */ // double lastAngle; /* Largest child angle when block has 1 node */ // block_t *cp; /* Children of block */ // node_t *neighbor; /* Node connected to parent block, if any */ // } posstate;plantuml-1.2017.15/src/h/print_op.java000066400000000000000000000042631312650303100173760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8175ey66kudr10vwd06s8mqz public interface print_op extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef void (*print_op)(xdot_op * op, pf print, void *info, int more)"); } // typedef void (*print_op)(xdot_op * op, pf print, void *info, int more);plantuml-1.2017.15/src/h/putstrfn.java000066400000000000000000000042221312650303100174240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9trwr3s9t77smt1kilyj442wh public interface putstrfn extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef int (*putstrfn) (void *chan, const char *str)"); } // typedef int (*putstrfn) (void *chan, const char *str);plantuml-1.2017.15/src/h/qnode_t.java000066400000000000000000000046041312650303100171740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 27lijxqu2p29w0d5l19be0n3m public interface qnode_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int nodetype", "int segnum", "pointf yval", "int trnum", "int parent", "int left, right", "}", "qnode_t"); } // typedef struct { // int nodetype; /* Y-node or S-node */ // int segnum; // pointf yval; // int trnum; // int parent; /* doubly linked DAG */ // int left, right; /* children */ // } qnode_t;plantuml-1.2017.15/src/h/qsort_cmpf.java000066400000000000000000000042261312650303100177200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 760ti35q5jpka8zpo262spvnl public interface qsort_cmpf extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef int (*qsort_cmpf) (const void *, const void *)"); } // typedef int (*qsort_cmpf) (const void *, const void *);plantuml-1.2017.15/src/h/radfunc_t.java000066400000000000000000000042131312650303100175040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 10r1g6lk6ojy6x6ppt148q1o2 public interface radfunc_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef double (*radfunc_t)(double,double,double)"); } // typedef double (*radfunc_t)(double,double,double);plantuml-1.2017.15/src/h/rank_t.java000066400000000000000000000053761312650303100170300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3cl38y4ai8c9r6d23izdf6jgn public interface rank_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct rank_t", "{", "int n", "node_t **v", "int an", "node_t **av", "double ht1, ht2", "double pht1, pht2", "boolean candidate", "boolean valid", "int cache_nc", "adjmatrix_t *flat", "}", "rank_t"); } // typedef struct rank_t { // int n; /* number of nodes in this rank */ // node_t **v; /* ordered list of nodes in rank */ // int an; /* globally allocated number of nodes */ // node_t **av; /* allocated list of nodes in rank */ // double ht1, ht2; /* height below/above centerline */ // double pht1, pht2; /* as above, but only primitive nodes */ // boolean candidate; /* for transpose () */ // boolean valid; // int cache_nc; /* caches number of crossings */ // adjmatrix_t *flat; // } rank_t;plantuml-1.2017.15/src/h/ratio_t.java000066400000000000000000000043441312650303100172050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6n9jcxa02dyqa57pkcrd73otm public interface ratio_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "R_NONE = 0, R_VALUE, R_FILL, R_COMPRESS, R_AUTO, R_EXPAND", "}", "ratio_t"); } // typedef enum { R_NONE = // 0, R_VALUE, R_FILL, R_COMPRESS, R_AUTO, R_EXPAND } ratio_t;plantuml-1.2017.15/src/h/rawgraph.java000066400000000000000000000042561312650303100173610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3gcy12n7txwt4m8zgbj4peo1e public interface rawgraph extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int nvs", "vertex* vertices", "}", "rawgraph"); } // typedef struct { // int nvs; // vertex* vertices; // } rawgraph;plantuml-1.2017.15/src/h/rdr_t.java000066400000000000000000000043041312650303100166520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8ps8r8mtrw6f5dhflc33s2dtg public interface rdr_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "const char *data", "int len", "int cur", "}", "rdr_t"); } // typedef struct { // const char *data; // int len; // int cur; // } rdr_t;plantuml-1.2017.15/src/h/re_opcode_t.java000066400000000000000000000164431312650303100200310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 e3hfh80mtu75t9spasjqrsdrh public interface re_opcode_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "no_op = 0,", "succeed,", "exactn,", "anychar,", "charset,", "charset_not,", "start_memory,", "stop_memory,", "duplicate,", "begline,", "endline,", "begbuf,", "endbuf,", "jump,", "jump_past_alt,", "on_failure_jump,", "on_failure_keep_string_jump,", "pop_failure_jump,", "maybe_pop_jump,", "dummy_failure_jump,", "push_dummy_failure,", "succeed_n,", "jump_n,", "set_number_at, wordchar,", "notwordchar,", "wordbeg,", "wordend,", "wordbound,", "notwordbound", "}", "re_opcode_t"); } // typedef enum // { // no_op = 0, // // /* Succeed right away--no more backtracking. */ // succeed, // // /* Followed by one byte giving n, then by n literal bytes. */ // exactn, // // /* Matches any (more or less) character. */ // anychar, // // /* Matches any one char belonging to specified set. First // following byte is number of bitmap bytes. Then come bytes // for a bitmap saying which chars are in. Bits in each byte // are ordered low-bit-first. A character is in the set if its // bit is 1. A character too large to have a bit in the map is // automatically not in the set. */ // charset, // // /* Same parameters as charset, but match any character that is // not one of those specified. */ // charset_not, // // /* Start remembering the text that is matched, for storing in a // register. Followed by one byte with the register number, in // the range 0 to one less than the pattern buffer's re_nsub // field. Then followed by one byte with the number of groups // inner to this one. (This last has to be part of the // start_memory only because we need it in the on_failure_jump // of re_match_2.) */ // start_memory, // // /* Stop remembering the text that is matched and store it in a // memory register. Followed by one byte with the register // number, in the range 0 to one less than `re_nsub' in the // pattern buffer, and one byte with the number of inner groups, // just like `start_memory'. (We need the number of inner // groups here because we don't have any easy way of finding the // corresponding start_memory when we're at a stop_memory.) */ // stop_memory, // // /* Match a duplicate of something remembered. Followed by one // byte containing the register number. */ // duplicate, // // /* Fail unless at beginning of line. */ // begline, // // /* Fail unless at end of line. */ // endline, // // /* Succeeds if at beginning of buffer (if emacs) or at beginning // of string to be matched (if not). */ // begbuf, // // /* Analogously, for end of buffer/string. */ // endbuf, // // /* Followed by two byte relative address to which to jump. */ // jump, // // /* Same as jump, but marks the end of an alternative. */ // jump_past_alt, // // /* Followed by two-byte relative address of place to resume at // in case of failure. */ // on_failure_jump, // // /* Like on_failure_jump, but pushes a placeholder instead of the // current string position when executed. */ // on_failure_keep_string_jump, // // /* Throw away latest failure point and then jump to following // two-byte relative address. */ // pop_failure_jump, // // /* Change to pop_failure_jump if know won't have to backtrack to // match; otherwise change to jump. This is used to jump // back to the beginning of a repeat. If what follows this jump // clearly won't match what the repeat does, such that we can be // sure that there is no use backtracking out of repetitions // already matched, then we change it to a pop_failure_jump. // Followed by two-byte address. */ // maybe_pop_jump, // // /* Jump to following two-byte address, and push a dummy failure // point. This failure point will be thrown away if an attempt // is made to use it for a failure. A `+' construct makes this // before the first repeat. Also used as an intermediary kind // of jump when compiling an alternative. */ // dummy_failure_jump, // // /* Push a dummy failure point and continue. Used at the end of // alternatives. */ // push_dummy_failure, // // /* Followed by two-byte relative address and two-byte number n. // After matching N times, jump to the address upon failure. */ // succeed_n, // // /* Followed by two-byte relative address, and two-byte number n. // Jump to the address N times, then fail. */ // jump_n, // // /* Set the following two-byte relative address to the // subsequent two-byte number. The address *includes* the two // bytes of number. */ // set_number_at, // // wordchar, /* Matches any word-constituent character. */ // notwordchar, /* Matches any char that is not a word-constituent. */ // // wordbeg, /* Succeeds if at word beginning. */ // wordend, /* Succeeds if at word end. */ // // wordbound, /* Succeeds if at a word boundary. */ // notwordbound /* Succeeds if not at a word boundary. */ // // // // // // // // // // // // // // } re_opcode_t;plantuml-1.2017.15/src/h/re_pattern_buffer.java000066400000000000000000000117511312650303100212400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3hom62aciieyjg8pgbfmp1qik public interface re_pattern_buffer extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct re_pattern_buffer", "{", "unsigned char *buffer", "unsigned long int allocated", "unsigned long int used", "reg_syntax_t syntax", "char *fastmap", "char * translate", "size_t re_nsub", "unsigned can_be_null : 1", "unsigned regs_allocated : 2", "unsigned fastmap_accurate : 1", "unsigned no_sub : 1", "unsigned not_bol : 1", "unsigned not_eol : 1", "unsigned newline_anchor : 1", "}"); } // struct re_pattern_buffer // { // /* [[[begin pattern_buffer]]] */ // /* Space that holds the compiled pattern. It is declared as // `unsigned char *' because its elements are // sometimes used as array indexes. */ // unsigned char *buffer; // // /* Number of bytes to which `buffer' points. */ // unsigned long int allocated; // // /* Number of bytes actually used in `buffer'. */ // unsigned long int used; // // /* Syntax setting with which the pattern was compiled. */ // reg_syntax_t syntax; // // /* Pointer to a fastmap, if any, otherwise zero. re_search uses // the fastmap, if there is one, to skip over impossible // starting points for matches. */ // char *fastmap; // // /* Either a translate table to apply to all characters before // comparing them, or zero for no translation. The translation // is applied to a pattern when it is compiled and to a string // when it is matched. */ // char * translate; // // /* Number of subexpressions found by the compiler. */ // size_t re_nsub; // // /* Zero if this pattern cannot match the empty string, one else. // Well, in truth it's used only in `re_search_2', to see // whether or not we should use the fastmap, so we don't set // this absolutely perfectly; see `re_compile_fastmap' (the // `duplicate' case). */ // unsigned can_be_null : 1; // // /* If REGS_UNALLOCATED, allocate space in the `regs' structure // for `max (RE_NREGS, re_nsub + 1)' groups. // If REGS_REALLOCATE, reallocate space if necessary. // If REGS_FIXED, use what's there. */ // // // // unsigned regs_allocated : 2; // // /* Set to zero when `regex_compile' compiles a pattern; set to one // by `re_compile_fastmap' if it updates the fastmap. */ // unsigned fastmap_accurate : 1; // // /* If set, `re_match_2' does not return information about // subexpressions. */ // unsigned no_sub : 1; // // /* If set, a beginning-of-line anchor doesn't match at the // beginning of the string. */ // unsigned not_bol : 1; // // /* Similarly for an end-of-line anchor. */ // unsigned not_eol : 1; // // /* If true, an anchor at a newline matches. */ // unsigned newline_anchor : 1; // // /* [[[end pattern_buffer]]] */ // };plantuml-1.2017.15/src/h/re_registers.java000066400000000000000000000043731312650303100202430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 c6l7vumjull8d6poh7y1xqrct public interface re_registers extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct re_registers", "{", "unsigned num_regs", "regoff_t *start", "regoff_t *end", "}"); } // struct re_registers // { // unsigned num_regs; // regoff_t *start; // regoff_t *end; // };plantuml-1.2017.15/src/h/refstr_t.java000066400000000000000000000045011312650303100173670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 61ughvl20d1mf5vtkmd94wfy public interface refstr_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct refstr_t", "{", "Dtlink_t link", "unsigned long refcnt", "char *s", "char store[1]", "}", "refstr_t"); } // typedef struct refstr_t { // Dtlink_t link; // unsigned long refcnt; // char *s; // char store[1]; /* this is actually a dynamic array */ // } refstr_t;plantuml-1.2017.15/src/h/reg_errcode_t.java000066400000000000000000000072121312650303100203440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 ap7c4ii9ux7nlggs68fm76fy6 public interface reg_errcode_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "REG_NOERROR = 0,", "REG_NOMATCH,", "REG_BADPAT,", "REG_ECOLLATE,", "REG_ECTYPE,", "REG_EESCAPE,", "REG_ESUBREG,", "REG_EBRACK,", "REG_EPAREN,", "REG_EBRACE,", "REG_BADBR,", "REG_ERANGE,", "REG_ESPACE,", "REG_BADRPT,", "REG_EEND,", "REG_ESIZE,", "REG_ERPAREN", "}", "reg_errcode_t"); } // typedef enum // { // REG_NOERROR = 0, /* Success. */ // REG_NOMATCH, /* Didn't find a match (for regexec). */ // // /* POSIX regcomp return error codes. (In the order listed in the // standard.) */ // REG_BADPAT, /* Invalid pattern. */ // REG_ECOLLATE, /* Not implemented. */ // REG_ECTYPE, /* Invalid character class name. */ // REG_EESCAPE, /* Trailing backslash. */ // REG_ESUBREG, /* Invalid back reference. */ // REG_EBRACK, /* Unmatched left bracket. */ // REG_EPAREN, /* Parenthesis imbalance. */ // REG_EBRACE, /* Unmatched \{. */ // REG_BADBR, /* Invalid contents of \{\}. */ // REG_ERANGE, /* Invalid range end. */ // REG_ESPACE, /* Ran out of memory. */ // REG_BADRPT, /* No preceding re for repetition op. */ // // /* Error codes we've added. */ // REG_EEND, /* Premature end. */ // REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ // REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ // } reg_errcode_t;plantuml-1.2017.15/src/h/regex_t.java000066400000000000000000000041431312650303100171760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 a0207gwp8wnf6l2kb9poka4m4 public interface regex_t extends re_pattern_buffer { public static List DEFINITION = Arrays.asList( "typedef struct re_pattern_buffer regex_t"); } // typedef struct re_pattern_buffer regex_t;plantuml-1.2017.15/src/h/register_info_type.java000066400000000000000000000053241312650303100214430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 32aq50hgdk3miqrwc4915dj1o public interface register_info_type extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef union", "{", "fail_stack_elt_t word", "struct", "{", "unsigned match_null_string_p : 2", "unsigned is_active : 1", "unsigned matched_something : 1", "unsigned ever_matched_something : 1", "}", "bits", "}", "register_info_type"); } // typedef union // { // fail_stack_elt_t word; // struct // { // /* This field is one if this group can match the empty string, // zero if not. If not yet determined, `MATCH_NULL_UNSET_VALUE'. */ // // unsigned match_null_string_p : 2; // unsigned is_active : 1; // unsigned matched_something : 1; // unsigned ever_matched_something : 1; // } bits; // } register_info_type;plantuml-1.2017.15/src/h/regmatch_t.java000066400000000000000000000045161312650303100176620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 pj9qzzazlscp3s43o8lug1br public interface regmatch_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "regoff_t rm_so", "regoff_t rm_eo", "}", "regmatch_t"); } // typedef struct // { // regoff_t rm_so; /* Byte offset from string's start to substring's start. */ // regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ // } regmatch_t;plantuml-1.2017.15/src/h/route.java000066400000000000000000000042331312650303100166770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5fq657all5l5bqizkuz5ggrdj public interface route extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int n", "segment* segs", "}", "route"); } // typedef struct { // int n; // segment* segs; // } route;plantuml-1.2017.15/src/h/same_t.java000066400000000000000000000045561312650303100170210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8c359dwrpz9nffi3rk433ukjt public interface same_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct same_t", "{", "char *id", "elist l", "int n_arr", "double arr_len", "}", "same_t"); } // typedef struct same_t { // char *id; /* group id */ // elist l; /* edges in the group */ // int n_arr; /* number of edges with arrows */ // double arr_len; /* arrow length of an edge in the group */ // } same_t;plantuml-1.2017.15/src/h/save_e_t.java000066400000000000000000000042571312650303100173340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 24xdytkhdvt79rfwsa7gp6do2 public interface save_e_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct save_e_s", "{", "Agnode_t *from, *to", "}", "save_e_t"); } // typedef struct save_e_s { // Agnode_t *from, *to; // } save_e_t;plantuml-1.2017.15/src/h/save_stack_t.java000066400000000000000000000043361312650303100202130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9a1whydr7ixbfnkje6ytmde8t public interface save_stack_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct save_stack_s", "{", "save_e_t *mem", "int stacksize", "}", "save_stack_t"); } // typedef struct save_stack_s { // save_e_t *mem; // int stacksize; // } save_stack_t;plantuml-1.2017.15/src/h/sedge.java000066400000000000000000000041311312650303100166250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 15ruicbgesimuhfhph6r72639 public interface sedge extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct sedge sedge"); } // typedef struct sedge sedge;plantuml-1.2017.15/src/h/seedMode.java000066400000000000000000000043121312650303100172640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7n29466qjouzyf7izmjndudt5 public interface seedMode extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "seed_unset, seed_val, seed_time, seed_regular", "}", "seedMode"); } // typedef enum { // seed_unset, seed_val, seed_time, seed_regular // } seedMode;plantuml-1.2017.15/src/h/segitem_t.java000066400000000000000000000043271312650303100175250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 btsf9u7kgq9gvrmm3ikqza2ix public interface segitem_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct segitem_s", "{", "pointf p", "struct segitem_s* next", "}", "segitem_t"); } // typedef struct segitem_s { // pointf p; // struct segitem_s* next; // } segitem_t;plantuml-1.2017.15/src/h/segment.java000066400000000000000000000051571312650303100172110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 chpljvx1wjvc6a9wott6pl7mo public interface segment extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct segment", "{", "boolean isVert", "boolean flipped", "double comm_coord", "paird p", "bend l1, l2", "int ind_no", "int track_no", "struct segment* prev", "struct segment* next", "}", "segment"); } // typedef struct segment { // boolean isVert; // boolean flipped; // double comm_coord; /* the common coordinate */ // paird p; /* end points */ // bend l1, l2; // int ind_no; /* index number of this segment in its channel */ // int track_no; /* track number assigned in the channel */ // struct segment* prev; // struct segment* next; // } segment;plantuml-1.2017.15/src/h/segment_t.java000066400000000000000000000046771312650303100175420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4p5dhxpx14ooxgkym0hnv7g04 public interface segment_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "pointf v0, v1", "int is_inserted", "int root0, root1", "int next", "int prev", "}", "segment_t"); } // typedef struct { // pointf v0, v1; /* two endpoints */ // int is_inserted; /* inserted in trapezoidation yet ? */ // int root0, root1; /* root nodes in Q */ // int next; /* Next logical segment */ // int prev; /* Previous segment */ // } segment_t;plantuml-1.2017.15/src/h/sfont_t.java000066400000000000000000000043361312650303100172210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 e0z0hnt02wemy4xf87o17z7cp public interface sfont_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct sfont_t", "{", "textfont_t *cfont", "struct sfont_t *pfont", "}", "sfont_t"); } // typedef struct sfont_t { // textfont_t *cfont; // struct sfont_t *pfont; // } sfont_t;plantuml-1.2017.15/src/h/sgraph.java000066400000000000000000000044341312650303100170300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 dxskpbv74lxltj165fmgf70cp public interface sgraph extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int nnodes, nedges", "int save_nnodes, save_nedges", "snode* nodes", "sedge* edges", "}", "sgraph"); } // typedef struct { // int nnodes, nedges; // int save_nnodes, save_nedges; // snode* nodes; // sedge* edges; // } sgraph;plantuml-1.2017.15/src/h/shape_desc.java000066400000000000000000000046141312650303100176420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8ger4o0h260ys1ca9fc7x46eq public interface shape_desc extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct shape_desc", "{", "char *name", "shape_functions *fns", "polygon_t *polygon", "boolean usershape", "}", "shape_desc"); } // typedef struct shape_desc { /* read-only shape descriptor */ // char *name; /* as read from graph file */ // shape_functions *fns; // polygon_t *polygon; /* base polygon info */ // boolean usershape; // } shape_desc;plantuml-1.2017.15/src/h/shape_functions.java000066400000000000000000000060071312650303100207320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5mip14tura2l8b750vykgeun3 public interface shape_functions extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct shape_functions", "{", "void (*initfn) (node_t *)", "void (*freefn) (node_t *)", "port(*portfn) (node_t *, char *, char *)", "boolean(*insidefn) (inside_t * inside_context, pointf)", "int (*pboxfn)(node_t* n, port* p, int side, boxf rv[], int *kptr)", "void (*codefn) (GVJ_t * job, node_t * n)", "}", "shape_functions"); } // typedef struct shape_functions { /* read-only shape functions */ // void (*initfn) (node_t *); /* initializes shape from node u.shape_info structure */ // void (*freefn) (node_t *); /* frees shape from node u.shape_info structure */ // port(*portfn) (node_t *, char *, char *); /* finds aiming point and slope of port */ // boolean(*insidefn) (inside_t * inside_context, pointf); /* clips incident gvc->e spline on shape of gvc->n */ // int (*pboxfn)(node_t* n, port* p, int side, boxf rv[], int *kptr); /* finds box path to reach port */ // void (*codefn) (GVJ_t * job, node_t * n); /* emits graphics code for node */ // } shape_functions;plantuml-1.2017.15/src/h/shape_kind.java000066400000000000000000000043131312650303100176450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 br7wf04petqrkv3jy73x2hnfl public interface shape_kind extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "SH_UNSET, SH_POLY, SH_RECORD, SH_POINT, SH_EPSF", "}", "shape_kind"); } // typedef enum { SH_UNSET, SH_POLY, SH_RECORD, SH_POINT, SH_EPSF} shape_kind;plantuml-1.2017.15/src/h/shape_t.java000066400000000000000000000046301312650303100171650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 a6qcq27iylfbrgiga37cxkr9t public interface shape_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct shape_t", "{", "int nstrokes", "stroke_t *strokes", "}", "shape_t"); } // typedef struct shape_t { /* mutable shape information for a node */ // int nstrokes; /* number of strokes in array */ // stroke_t *strokes; /* array of strokes */ // /* The last stroke must always be closed, but can be pen_up. // * It is used as the clipping path */ // } shape_t;plantuml-1.2017.15/src/h/snode.java000066400000000000000000000041311312650303100166460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 dp60xuei2ue2x586frihti3gr public interface snode extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct snode snode"); } // typedef struct snode snode;plantuml-1.2017.15/src/h/snodeitem.java000066400000000000000000000043361312650303100175340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 d89g0gupg4cmbfbww7yqebufn public interface snodeitem extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "snode* np", "pointf p", "Dtlink_t link", "}", "snodeitem"); } // typedef struct { // snode* np; // pointf p; // Dtlink_t link; // } snodeitem;plantuml-1.2017.15/src/h/splineInfo.java000066400000000000000000000050421312650303100176460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8u1r3c3d0g8hn19fq04x9z0ht public interface splineInfo extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "boolean(*swapEnds) (edge_t * e)", "boolean(*splineMerge) (node_t * n)", "boolean ignoreSwap", "boolean isOrtho", "}", "splineInfo"); } // typedef struct { // boolean(*swapEnds) (edge_t * e); /* Should head and tail be swapped? */ // boolean(*splineMerge) (node_t * n); /* Is n a node in the middle of an edge? */ // boolean ignoreSwap; /* Test for swapped edges if false */ // boolean isOrtho; /* Orthogonal routing used */ // } splineInfo;plantuml-1.2017.15/src/h/spline_info_t.java000066400000000000000000000044131312650303100203710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 368du94hwpmwj2vxjibw1kyxw public interface spline_info_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int LeftBound, RightBound, Splinesep, Multisep", "boxf* Rank_box", "}", "spline_info_t"); } // typedef struct { // int LeftBound, RightBound, Splinesep, Multisep; // boxf* Rank_box; // } spline_info_t;plantuml-1.2017.15/src/h/splines.java000066400000000000000000000043171312650303100172210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 966xu1ddmyus6hb8a0jpk0mxv public interface splines extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct splines", "{", "bezier *list", "int size", "boxf bb", "}", "splines"); } // typedef struct splines { // bezier *list; // int size; // boxf bb; // } splines;plantuml-1.2017.15/src/h/stack.java000066400000000000000000000042271312650303100166510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7clbkey2x67pv7myg32sbtaev public interface stack extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int top", "int* vals", "}", "stack"); } // typedef struct { // int top; // int* vals; // } stack;plantuml-1.2017.15/src/h/stk_t.java000066400000000000000000000045741312650303100166750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5hcf1ml5onpp69gd7ny7c1jpv public interface stk_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "blk_t *fstblk", "blk_t *curblk", "Agnode_t **curp", "void (*actionfn) (Agnode_t *, void *)", "int (*markfn) (Agnode_t *, int)", "}", "stk_t"); } // typedef struct { // blk_t *fstblk; // blk_t *curblk; // Agnode_t **curp; // void (*actionfn) (Agnode_t *, void *); // int (*markfn) (Agnode_t *, int); // } stk_t;plantuml-1.2017.15/src/h/stream_t.java000066400000000000000000000043011312650303100173530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6nmxfljmpic0z165aeccgy3io public interface stream_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "char* s", "char* buf", "FILE* fp", "}", "stream_t"); } // typedef struct { // char* s; // char* buf; // FILE* fp; // } stream_t;plantuml-1.2017.15/src/h/stroke_t.java000066400000000000000000000046711312650303100174010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8ck3otqwsudjpgfogblgza1gb public interface stroke_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct stroke_t", "{", "int nvertices", "int flags", "pointf *vertices", "}", "stroke_t"); } // typedef struct stroke_t { /* information about a single stroke */ // /* we would have called it a path if that term wasn't already used */ // int nvertices; /* number of points in the stroke */ // int flags; /* stroke style flags */ // pointf *vertices; /* array of vertex points */ // } stroke_t;plantuml-1.2017.15/src/h/symlist_t.java000066400000000000000000000043371312650303100175750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 14amtv3porwybjn6et6rnys71 public interface symlist_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct symlist_s", "{", "Agsym_t *sym", "struct symlist_s *link", "}", "symlist_t"); } // typedef struct symlist_s { // Agsym_t *sym; // struct symlist_s *link; // } symlist_t;plantuml-1.2017.15/src/h/tedge_t.java000066400000000000000000000045171312650303100171610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 etqt95dxzhlewy48djz53vdvy public interface tedge_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct tedge_t", "{", "pointnlink_t *pnl0p", "pointnlink_t *pnl1p", "struct triangle_t *ltp", "struct triangle_t *rtp", "}", "tedge_t"); } // typedef struct tedge_t { // pointnlink_t *pnl0p; // pointnlink_t *pnl1p; // struct triangle_t *ltp; // struct triangle_t *rtp; // } tedge_t;plantuml-1.2017.15/src/h/textfont_t.java000066400000000000000000000047731312650303100177500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7eimedro6z0j21rhmmxbqdssy public interface textfont_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "char* name", "char* color", "PostscriptAlias *postscript_alias", "double size", "unsigned int flags:7", "unsigned int cnt:(sizeof(unsigned int) * 8 - 7)", "}", "textfont_t"); } // typedef struct { // char* name; // char* color; // PostscriptAlias *postscript_alias; // double size; // unsigned int flags:7; /* HTML_UL, HTML_IF, HTML_BF, etc. */ // unsigned int cnt:(sizeof(unsigned int) * 8 - 7); /* reference count */ // } textfont_t;plantuml-1.2017.15/src/h/textlabel_t.java000066400000000000000000000060511312650303100200500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9qqo4pt0x97lv7fp9yneflgkr public interface textlabel_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct textlabel_t", "{", "char *text, *fontname, *fontcolor", "int charset", "double fontsize", "pointf dimen", "pointf space", "pointf pos", "union", "{", "struct", "{", "textspan_t *span", "short nspans", "}", "txt", "htmllabel_t *html", "}", "u", "char valign", "boolean set", "boolean html", "}", "textlabel_t"); } // typedef struct textlabel_t { // char *text, *fontname, *fontcolor; // int charset; // double fontsize; // pointf dimen; /* the diagonal size of the label (estimated by layout) */ // pointf space; /* the diagonal size of the space for the label */ // /* the rendered label is aligned in this box */ // /* space does not include pad or margin */ // pointf pos; /* the center of the space for the label */ // union { // struct { // textspan_t *span; // short nspans; // } txt; // htmllabel_t *html; // } u; // char valign; /* 't' 'c' 'b' */ // boolean set; /* true if position is set */ // boolean html; /* true if html label */ // } textlabel_t;plantuml-1.2017.15/src/h/textspan_t.java000066400000000000000000000050311312650303100177270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3u5j54p26whh9zkbxuboqgjl8 public interface textspan_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "char *str", "textfont_t *font", "void *layout", "void (*free_layout) (void *layout)", "double yoffset_layout, yoffset_centerline", "pointf size", "char just", "}", "textspan_t"); } // typedef struct { // char *str; /* stored in utf-8 */ // textfont_t *font; // void *layout; // void (*free_layout) (void *layout); /* FIXME - this is ugly */ // double yoffset_layout, yoffset_centerline; // pointf size; // char just; /* 'l' 'n' 'r' */ /* FIXME */ // } textspan_t;plantuml-1.2017.15/src/h/tna_t.java000066400000000000000000000042611312650303100166470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8b2ok0k4502ln9ebjmmz8i24b public interface tna_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct tna_t", "{", "double t", "Ppoint_t a[2]", "}", "tna_t"); } // typedef struct tna_t { // double t; // Ppoint_t a[2]; // } tna_t;plantuml-1.2017.15/src/h/trap_t.java000066400000000000000000000047411312650303100170360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 98x8jrsxyu5va90pidn9bybc0 public interface trap_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int lseg, rseg", "pointf hi, lo", "int u0, u1", "int d0, d1", "int sink", "int usave, uside", "int state", "}", "trap_t"); } // typedef struct { // int lseg, rseg; /* two adjoining segments */ // pointf hi, lo; /* max/min y-values */ // int u0, u1; // int d0, d1; // int sink; /* pointer to corresponding in Q */ // int usave, uside; /* I forgot what this means */ // int state; // } trap_t;plantuml-1.2017.15/src/h/triangle_t.java000066400000000000000000000043261312650303100176740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 5ecxnf8ebe9n3gyiow712oltk public interface triangle_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct triangle_t", "{", "int mark", "struct tedge_t e[3]", "}", "triangle_t"); } // typedef struct triangle_t { // int mark; // struct tedge_t e[3]; // } triangle_t;plantuml-1.2017.15/src/h/usershape_s.java000066400000000000000000000053441312650303100200660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 etvnzxzle0w43gjkxm4pvnhj8 public interface usershape_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct usershape_s", "{", "Dtlink_t link", "const char *name", "int macro_id", "boolean must_inline", "boolean nocache", "FILE *f", "imagetype_t type", "char *stringtype", "int x, y, w, h, dpi", "void *data", "size_t datasize", "void (*datafree)(usershape_t *us)", "}"); } // struct usershape_s { // Dtlink_t link; // const char *name; // int macro_id; // boolean must_inline; // boolean nocache; // FILE *f; // imagetype_t type; // char *stringtype; // int x, y, w, h, dpi; // void *data; /* data loaded by a renderer */ // size_t datasize; /* size of data (if mmap'ed) */ // void (*datafree)(usershape_t *us); /* renderer's function for freeing data */ // };plantuml-1.2017.15/src/h/usershape_t.java000066400000000000000000000041351312650303100200640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 chz6xkjhrs9pyfn4o58fuw87o public interface usershape_t extends usershape_s { public static List DEFINITION = Arrays.asList( "typedef struct usershape_s usershape_t"); } // typedef struct usershape_s usershape_t;plantuml-1.2017.15/src/h/val_t.java000066400000000000000000000046421312650303100166520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the Eclipse Public License. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 ay78pm8zwkesyc85l5d5hpf1p public interface val_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef union s", "{", "Agnode_t *n", "Agraph_t *subg", "Agedge_t *e", "Agsym_t *asym", "char *name", "struct item_s *list", "}", "val_t"); } // typedef union s { /* possible items in generic list */ // Agnode_t *n; // Agraph_t *subg; // Agedge_t *e; // Agsym_t *asym; /* bound attribute */ // char *name; /* unbound attribute */ // struct item_s *list; /* list-of-lists (for edgestmt) */ // } val_t;plantuml-1.2017.15/src/h/vararr_t.java000066400000000000000000000043061312650303100173620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 oghwi8868wglf1fone49o4mk public interface vararr_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "pathpoint* pts", "int cnt", "int sz", "}", "vararr_t"); } // typedef struct { // pathpoint* pts; // int cnt; // int sz; // } vararr_t;plantuml-1.2017.15/src/h/vconfig_s.java000066400000000000000000000046231312650303100175210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 7spuyiz5ytbh1otla4fyecyrn public interface vconfig_s extends __ptr__ { public static List DEFINITION = Arrays.asList( "struct vconfig_s", "{", "int Npoly", "int N", "Ppoint_t *P", "int *start", "int *next", "int *prev", "array2 vis", "}"); } // struct vconfig_s { // int Npoly; // int N; /* number of points in walk of barriers */ // Ppoint_t *P; /* barrier points */ // int *start; // int *next; // int *prev; // // /* this is computed from the above */ // array2 vis; // };plantuml-1.2017.15/src/h/vconfig_t.java000066400000000000000000000041211312650303100175130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 6gxwgxurv7pycllk13f8dpux6 public interface vconfig_t extends vconfig_s { public static List DEFINITION = Arrays.asList( "typedef struct vconfig_s vconfig_t"); } // typedef struct vconfig_s vconfig_t;plantuml-1.2017.15/src/h/vertex.java000066400000000000000000000043451312650303100170620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 91jsneefoo0k8vh8cfacj8oxy public interface vertex extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int color", "int topsort_order", "Dt_t* adj_list", "}", "vertex"); } // typedef struct { // int color; // int topsort_order; // Dt_t* adj_list; /* adj_list */ // } vertex;plantuml-1.2017.15/src/h/vertexchain_t.java000066400000000000000000000045271312650303100204120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8jbxzxhbdy0flrmgb5ulugq1w public interface vertexchain_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "pointf pt", "int vnext[4]", "int vpos[4]", "int nextfree", "}", "vertexchain_t"); } // typedef struct { // pointf pt; // int vnext[4]; /* next vertices for the 4 chains */ // int vpos[4]; /* position of v in the 4 chains */ // int nextfree; // } vertexchain_t;plantuml-1.2017.15/src/h/walkfn_t.java000066400000000000000000000042071312650303100173470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 uetkvys3lmc07q98hxrctlr6 public interface walkfn_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef int (*walkfn_t) (Dt_t *, void *, void *)"); } // typedef int (*walkfn_t) (Dt_t *, void *, void *);plantuml-1.2017.15/src/h/xdot.java000066400000000000000000000045331312650303100165220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 38aioi9ikzxlifhp4ycl5a12m public interface xdot extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int cnt", "int sz", "xdot_op* ops", "freefunc_t freefunc", "int flags", "}", "xdot"); } // typedef struct { // int cnt; /* no. of xdot ops */ // int sz; /* sizeof structure containing xdot_op as first field */ // xdot_op* ops; // freefunc_t freefunc; // int flags; // } xdot;plantuml-1.2017.15/src/h/xdot_align.java000066400000000000000000000042601312650303100176710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 e7x0o7gr081vjwke671rdirk2 public interface xdot_align extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "xd_left, xd_center, xd_right", "}", "xdot_align"); } // typedef enum { // xd_left, xd_center, xd_right // } xdot_align;plantuml-1.2017.15/src/h/xdot_color.java000066400000000000000000000045321312650303100177170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6y1cws31xuq9r3y52qnszd7f6 public interface xdot_color extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "xdot_grad_type type", "union", "{", "char* clr", "xdot_linear_grad ling", "xdot_radial_grad ring", "}", "u", "}", "xdot_color"); } // typedef struct { // xdot_grad_type type; // union { // char* clr; // xdot_linear_grad ling; // xdot_radial_grad ring; // } u; // } xdot_color;plantuml-1.2017.15/src/h/xdot_color_stop.java000066400000000000000000000043021312650303100207570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 xzo69vancovfvk7lnaol0jpc public interface xdot_color_stop extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "float frac", "char* color", "}", "xdot_color_stop"); } // typedef struct { // float frac; // char* color; // } xdot_color_stop;plantuml-1.2017.15/src/h/xdot_font.java000066400000000000000000000042611312650303100175460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4bxcepuedme9et1adr2g9a20o public interface xdot_font extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "double size", "char* name", "}", "xdot_font"); } // typedef struct { // double size; // char* name; // } xdot_font;plantuml-1.2017.15/src/h/xdot_grad_type.java000066400000000000000000000043241312650303100205560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6c63rmtqc9y84xocq4ll0zatp public interface xdot_grad_type extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "xd_none, xd_linear, xd_radial", "}", "xdot_grad_type"); } // typedef enum { // xd_none, // xd_linear, // xd_radial // } xdot_grad_type;plantuml-1.2017.15/src/h/xdot_image.java000066400000000000000000000042671312650303100176700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 zuln9hnjvuwwk4g106x6hmhn public interface xdot_image extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "xdot_rect pos", "char* name", "}", "xdot_image"); } // typedef struct { // xdot_rect pos; // char* name; // } xdot_image;plantuml-1.2017.15/src/h/xdot_kind.java000066400000000000000000000053051312650303100175250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 4a4izg5kkwsn1z1946vyklb3b public interface xdot_kind extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "xd_filled_ellipse, xd_unfilled_ellipse, xd_filled_polygon, xd_unfilled_polygon, xd_filled_bezier, xd_unfilled_bezier, xd_polyline, xd_text, xd_fill_color, xd_pen_color, xd_font, xd_style, xd_image, xd_grad_fill_color, xd_grad_pen_color, xd_fontchar", "}", "xdot_kind"); } // typedef enum { // xd_filled_ellipse, xd_unfilled_ellipse, // xd_filled_polygon, xd_unfilled_polygon, // xd_filled_bezier, xd_unfilled_bezier, // xd_polyline, xd_text, // xd_fill_color, xd_pen_color, xd_font, xd_style, xd_image, // xd_grad_fill_color, xd_grad_pen_color, // xd_fontchar // } xdot_kind;plantuml-1.2017.15/src/h/xdot_linear_grad.java000066400000000000000000000044541312650303100210530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8xbeerie9940dlui93o9uduhv public interface xdot_linear_grad extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "double x0, y0", "double x1, y1", "int n_stops", "xdot_color_stop* stops", "}", "xdot_linear_grad"); } // typedef struct { // double x0, y0; // double x1, y1; // int n_stops; // xdot_color_stop* stops; // } xdot_linear_grad;plantuml-1.2017.15/src/h/xdot_op.java000066400000000000000000000041101312650303100172070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; //2 8x0twnxu1fhm6q5e871fteso9 public interface xdot_op extends _xdot_op { public static List DEFINITION = Arrays.asList( "typedef struct _xdot_op xdot_op"); } // typedef struct _xdot_op xdot_op;plantuml-1.2017.15/src/h/xdot_point.java000066400000000000000000000042311312650303100177260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 6kldzrjqd360f2b5vpn1elj2t public interface xdot_point extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "double x, y, z", "}", "xdot_point"); } // typedef struct { // double x, y, z; // } xdot_point;plantuml-1.2017.15/src/h/xdot_polyline.java000066400000000000000000000042771312650303100204420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8p27dcmllwwifbm6k530v1zf5 public interface xdot_polyline extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int cnt", "xdot_point* pts", "}", "xdot_polyline"); } // typedef struct { // int cnt; // xdot_point* pts; // } xdot_polyline;plantuml-1.2017.15/src/h/xdot_radial_grad.java000066400000000000000000000044741312650303100210370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 73pwh5ex8hy6zad5cqdh3dl8j public interface xdot_radial_grad extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "double x0, y0, r0", "double x1, y1, r1", "int n_stops", "xdot_color_stop* stops", "}", "xdot_radial_grad"); } // typedef struct { // double x0, y0, r0; // double x1, y1, r1; // int n_stops; // xdot_color_stop* stops; // } xdot_radial_grad;plantuml-1.2017.15/src/h/xdot_rect.java000066400000000000000000000042341312650303100175350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 dytdxtdizn050yrh7uobj1fkt public interface xdot_rect extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "double x, y, w, h", "}", "xdot_rect"); } // typedef struct { // double x, y, w, h; // } xdot_rect;plantuml-1.2017.15/src/h/xdot_state_t.java000066400000000000000000000054411312650303100202440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 dhiu7hb5hm946g0tfbnpowdu5 public interface xdot_state_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "attrsym_t *g_draw", "attrsym_t *g_l_draw", "attrsym_t *n_draw", "attrsym_t *n_l_draw", "attrsym_t *e_draw", "attrsym_t *h_draw", "attrsym_t *t_draw", "attrsym_t *e_l_draw", "attrsym_t *hl_draw", "attrsym_t *tl_draw", "unsigned char buf[(EMIT_HLABEL+1)][BUFSIZ]", "unsigned short version", "char* version_s", "}", "xdot_state_t"); } // typedef struct { // attrsym_t *g_draw; // attrsym_t *g_l_draw; // attrsym_t *n_draw; // attrsym_t *n_l_draw; // attrsym_t *e_draw; // attrsym_t *h_draw; // attrsym_t *t_draw; // attrsym_t *e_l_draw; // attrsym_t *hl_draw; // attrsym_t *tl_draw; // unsigned char buf[(EMIT_HLABEL+1)][BUFSIZ]; // unsigned short version; // char* version_s; // } xdot_state_t;plantuml-1.2017.15/src/h/xdot_stats.java000066400000000000000000000053121312650303100177340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 ckvi0csmdepbsh2fme77kpwds public interface xdot_stats extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int cnt", "int n_ellipse", "int n_polygon", "int n_polygon_pts", "int n_polyline", "int n_polyline_pts", "int n_bezier", "int n_bezier_pts", "int n_text", "int n_font", "int n_style", "int n_color", "int n_image", "int n_gradcolor", "int n_fontchar", "}", "xdot_stats"); } // typedef struct { // int cnt; /* no. of xdot ops */ // int n_ellipse; // int n_polygon; // int n_polygon_pts; // int n_polyline; // int n_polyline_pts; // int n_bezier; // int n_bezier_pts; // int n_text; // int n_font; // int n_style; // int n_color; // int n_image; // int n_gradcolor; // int n_fontchar; // } xdot_stats;plantuml-1.2017.15/src/h/xdot_text.java000066400000000000000000000043731312650303100175700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 1r6csyayxjv7abyjh9drchhp1 public interface xdot_text extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "double x, y", "xdot_align align", "double width", "char* text", "}", "xdot_text"); } // typedef struct { // double x, y; // xdot_align align; // double width; // char* text; // } xdot_text;plantuml-1.2017.15/src/h/xlabel_t.java000066400000000000000000000046541312650303100173420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 cguvocw1bak2n3x4pc98z410a public interface xlabel_t extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "pointf sz", "pointf pos", "void *lbl", "unsigned char set", "}", "xlabel_t"); } // typedef struct { // pointf sz; /* Size of label (input) */ // pointf pos; /* Position of lower-left corner of label (output) */ // void *lbl; /* Pointer to label in the graph */ // unsigned char set; /* True if the position has been set (input/output) */ // } xlabel_t;plantuml-1.2017.15/src/h/xop_kind.java000066400000000000000000000047721312650303100173640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 8ucfcdlx92zlvpzsawjzbwj2l public interface xop_kind extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef enum", "{", "xop_ellipse, xop_polygon, xop_bezier, xop_polyline, xop_text, xop_fill_color, xop_pen_color, xop_font, xop_style, xop_image, xop_grad_color, xop_fontchar", "}", "xop_kind"); } // typedef enum { // xop_ellipse, // xop_polygon, // xop_bezier, // xop_polyline, xop_text, // xop_fill_color, xop_pen_color, xop_font, xop_style, xop_image, // xop_grad_color, // xop_fontchar // } xop_kind;plantuml-1.2017.15/src/h/xparams.java000066400000000000000000000043751312650303100172230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 3tsqzkcxjfsnllr7i7uuj30uu public interface xparams extends __ptr__ { public static List DEFINITION = Arrays.asList( "typedef struct", "{", "int numIters", "double T0", "double K", "double C", "int loopcnt", "}", "xparams"); } // typedef struct { // int numIters; // double T0; // double K; // double C; // int loopcnt; // } xparams;plantuml-1.2017.15/src/jcckit/000077500000000000000000000000001312650303100157145ustar00rootroot00000000000000plantuml-1.2017.15/src/jcckit/GraphicsPlotCanvas.java000066400000000000000000000161371312650303100223220ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.image.BufferedImage; import jcckit.graphic.GraphicalElement; import jcckit.graphic.Renderer; import jcckit.plot.Plot; import jcckit.plot.PlotCanvas; import jcckit.renderer.Graphics2DRenderer; import jcckit.renderer.Transformation; import jcckit.util.ConfigParameters; import jcckit.util.Factory; /** * Class which handles plotting into a Graphics context based on the * {@link jcckit.renderer.GraphicsRenderer}. This class is not a subclass of * java.awt.Component. The actual AWT component presenting the plot * is an innerclass. Its instance wrapped by GraphicsPlotCanvas can * be obtained with {@link #getGraphicsCanvas}. *

* The plot is painted by using double-buffering and pre-rendered view of the * coordinate system. That is, the coordinate system is drawn into an off-screen * image. It will be redrawn only if the size of the embedding AWT component is * changed. * * @author Franz-Josef Elmer */ public class GraphicsPlotCanvas extends PlotCanvas { /** Key of a configuration parameter. */ public static final String BACKGROUND_KEY = "background"; public static final String FOREGROUND_KEY = "foreground"; public static final String DOUBLE_BUFFERING_KEY = "doubleBuffering"; /** * Class which does the actual painting. Needs the Component into * which the plot is painted for some resources like size, background color, * etc. * * @author Franz-Josef Elmer */ private final BufferedImage img3; private final Graphics2D g3; private Transformation _transformation; private String _renderer = "jcckit.renderer.GraphicsRenderer"; private GraphicalElement _marker; /** * Creates an instance from the specified configuration parameters.

* * * * * * * * * * * * * * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
background = default background color of the wrapped * AWT componentColornoBackground color of the wrapped AWT component.
foreground = default foreground color of the wrapped * AWT componentColornoForeground color of the wrapped AWT component.
doubleBuffering = truebooleannoIf true the plot will be painted by using * double-buffering and pre-rendered view of the coordinate system. *
* In addition the configuration parameters of the * * constructor of the superclass {@link jcckit.plot.PlotCanvas} apply. */ public GraphicsPlotCanvas(ConfigParameters config, BufferedImage img3) { super(config); this.img3 = img3; setRenderer("jcckit.renderer.Graphics2DRenderer"); g3 = img3.createGraphics(); g3.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // _doubleBuffering = config.getBoolean(DOUBLE_BUFFERING_KEY, true); background = config.getColor(BACKGROUND_KEY, Color.WHITE); foreground = config.getColor(FOREGROUND_KEY, Color.BLACK); } private final Color background; private final Color foreground; /** * Paints the plot. If {@link GraphicsPlotCanvas#_doubleBuffering} is set * double-buffering and pre-rendered view of the coordinate system is used. */ public void paint() { Dimension size = new Dimension(img3.getWidth(), img3.getHeight()); g3.setColor(background); g3.fillRect(0, 0, size.width + 1, size.height + 1); init(size); _transformation.apply(g3); Plot plot = getPlot(); drawCoordinateSystem(size, plot); drawPlot(plot); if (_marker != null) { _marker.renderWith(createRenderer()); } } private void drawPlot(Plot plot) { prepare(); Renderer renderer = createRenderer(); GraphicalElement[] curves = plot.getCurves(); for (int i = 0; i < curves.length; i++) { curves[i].renderWith(renderer); } GraphicalElement annotation = plot.getAnnotation(); if (annotation != null) { annotation.renderWith(renderer); } if (plot.isLegendVisible()) { plot.getLegend().renderWith(renderer); } } private void init(Dimension size) { calculateTransformation(size); } private void drawCoordinateSystem(Dimension size, Plot plot) { g3.setColor(foreground); plot.getCoordinateSystem().renderWith(createRenderer()); } /** * Prepare graphics context before drawing the pre-rendered view of the * coordinate system. Does nothing but will be used in subclasses. */ protected void prepare() { } /** * Calculate the transformation form device-independent coordinates into * device-dependent coordinates according to the specified canvas size. */ protected void calculateTransformation(Dimension size) { _transformation = new Transformation(size.width, size.height, getPaper(), getHorizontalAnchor(), getVerticalAnchor()); } /** * Creates an appropriated {@link Renderer} for the specified * Graphics context. */ protected Renderer createRenderer() { return ((Graphics2DRenderer) Factory.create(_renderer)).init(g3); // return ((GraphicsRenderer) Factory.create(_renderer)).init(g, null, // _transformation); } /** * Sets the renderer used to render the plot. The default value is * {@link GraphicsRenderer}. * * @param className * Fully qualified name of the renderer class. */ public void setRenderer(String className) { _renderer = className; } // /** // * Maps the cursor position onto a point in device-independent // coordinates. // * // * @param x // * X-coordinate of the cursor. // * @param y // * Y-coordinate of the cursor. // */ // public GraphPoint mapCursorPosition(int x, int y) { // return _transformation.transformBack(x, y); // } /** * Defines a graphical marker which will be drawn on top of the plot. To * remove the marker call this method with argument null. * * @param marker * Marker element. Can be null. */ public void setMarker(GraphicalElement marker) { _marker = marker; } } plantuml-1.2017.15/src/jcckit/data/000077500000000000000000000000001312650303100166255ustar00rootroot00000000000000plantuml-1.2017.15/src/jcckit/data/DataContainer.java000066400000000000000000000156761312650303100222230ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.data; import java.text.MessageFormat; import java.util.Vector; /** * Abstract superclass of all data containers. A data container holds an * ordered list of {@link DataElement DataElements} of the same type. *

* Data elements can be added, inserted, removed, or replaced. * Such an action leads to a {@link DataEvent} which will be delivered to * all {@link DataListener DataListeners} observing this * DataContainer. If this data container also implements * {@link DataEvent} (as {@link DataCurve} does) also the listeners * registrated at the data container containg this container will be notified. * As a consequence a DataListener must only be registered at the * {@link DataPlot} instance and it will automatically also received events * caused by manipulating one of its DataCurves. *

* Concrete subclasses have to implement {@link #isValid} which * checks whether the added or inserted DataElement is of the right * type. This is an application of the Template Method Design Pattern. * * @author Franz-Josef Elmer */ public abstract class DataContainer { private final static String TEMPLATE = "Invalid operation: {0}, Element: {1}, Container: {2}"; final static String ADD = "add", REPLACE = "replace", INSERT = "insert"; private final Vector _listeners = new Vector(); private final Vector _container = new Vector(); /** Adds a {@link DataListener}. Does nothing if already added. */ public void addDataListener(DataListener listener) { if (!_listeners.contains(listener)) { _listeners.addElement(listener); } } /** Removes a {@link DataListener}. Does nothing if already removed. */ public void removeDataListener(DataListener listener) { _listeners.removeElement(listener); } private void notifyListeners(DataEvent event) { for (int i = 0, n = _listeners.size(); i < n; i++) { ((DataListener) _listeners.elementAt(i)).dataChanged(event); } // Notifies also parent container if (this instanceof DataElement) { DataContainer container = ((DataElement) this).getContainer(); if (container != null) { container.notifyListeners(event); } } } /** Returns the number of elements of this container. */ public int getNumberOfElements() { return _container.size(); } /** Returns the element for the specified index. */ public DataElement getElement(int index) { return (DataElement) _container.elementAt(index); } /** * Returns the index of the specified element. * @param element Element to be looked for. * @return -1 if not found. */ public int getIndexOf(DataElement element) { return _container.indexOf(element); } /** * Adds a {@link DataElement}. After the element has been successfully * added all {@link DataListener DataListeners} will be informed. * @param element DataElement to be added. * @throws IllegalArgumentException if element is not of the correct * type which will be checked by the method {@link #isValid}. */ public void addElement(DataElement element) { if (isValid(element)) { _container.addElement(element); element.setContainer(this); notifyListeners(DataEvent.createAddEvent(this)); } else { throwException(ADD, element); } } /** * Inserts a {@link DataElement} at the specified index. * After the element has been successfully inserted * all {@link DataListener DataListeners} will be informed. * @param index Index at which element will be inserted. * All elements with an index >= index will be shifted. * @param element DataElement to be added. * @throws IllegalArgumentException if element is not of the correct * type which will be checked by the method {@link #isValid}. */ public void insertElementAt(int index, DataElement element) { if (isValid(element)) { _container.insertElementAt(element, index); element.setContainer(this); notifyListeners(DataEvent.createInsertEvent(this, index)); } else { throwException(INSERT, element); } } /** * Removes a {@link DataElement} at the specified index. * After the element has been successfully removed * all {@link DataListener DataListeners} will be informed. * @param index Index of the element which will be removed. * All elements with an index > index will be shifted. */ public void removeElementAt(int index) { DataElement element = (DataElement) _container.elementAt(index); element.setContainer(null); _container.removeElementAt(index); notifyListeners(DataEvent.createRemoveEvent(this, index, element)); } /** * Replaces the {@link DataElement} at the specified index. * After the element has been successfully replaced * all {@link DataListener DataListeners} will be informed. * @param index Index of the element which will be replaced by * element. * @param element The new DataElement. * @throws IllegalArgumentException if element is not of the correct * type which will be checked by the method {@link #isValid}. */ public void replaceElementAt(int index, DataElement element) { if (isValid(element)) { DataElement oldElement = (DataElement) _container.elementAt(index); oldElement.setContainer(null); _container.setElementAt(element, index); element.setContainer(this); notifyListeners(DataEvent.createReplaceEvent(this, index, oldElement)); } else { throwException(REPLACE, element); } } private void throwException(String operation, DataElement element) { throw new IllegalArgumentException(MessageFormat.format(TEMPLATE, new Object[] {operation, element, this.getClass().getName()})); } /** * Returns true if the specified {@link DataElement} has the * correct type. Concrete subclasses have to implement this method. * @param element DataElement to be checked. */ protected abstract boolean isValid(DataElement element); } plantuml-1.2017.15/src/jcckit/data/DataCurve.java000066400000000000000000000056741312650303100213620ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.data; import jcckit.util.ConfigParameters; /** * A curve is a {@link DataContainer} of {@link DataPoint DataPoints}. * * @author Franz-Josef Elmer */ public class DataCurve extends DataContainer implements DataElement { /** Config parameter key. */ public static final String X_KEY = "x", Y_KEY = "y", TITLE_KEY = "title"; private final String _title; private DataContainer _container; /** Creates an empty instance with the specified title. */ public DataCurve(String title) { _title = title; } /** * Creates an instance from the specified config parameters. * * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
title = empty stringStringnoCurve title.
xdouble[]yesx-coordinates of the curve points.
ydouble[]yesy-coordinates of the curve points.
*/ public DataCurve(ConfigParameters config) { this(config.get(TITLE_KEY, "")); double[] xPoints = config.getDoubleArray(X_KEY); double[] yPoints = config.getDoubleArray(Y_KEY); int n = Math.min(xPoints.length, yPoints.length); for (int i = 0; i < n; i++) { addElement(new DataPoint(xPoints[i], yPoints[i])); } } /** * Returns the {@link DataPlot} containing this curve. */ public DataContainer getContainer() { return _container; } /** * Sets the {@link DataPlot} where this is a curve of. */ public void setContainer(DataContainer container) { _container = container; } /** Returns the title of this curve. */ public String getTitle() { return _title; } /** * Returns true if element is an instance of * {@link DataPoint}. */ protected boolean isValid(DataElement element) { return element instanceof DataPoint; } } plantuml-1.2017.15/src/jcckit/data/DataElement.java000066400000000000000000000027601312650303100216600ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.data; /** * Interface for all kinds of data elements. * * @author Franz-Josef Elmer */ public interface DataElement { /** * Returns the container containing this element. * @return null if this element is not an element of a container. */ public DataContainer getContainer(); /** * Sets the container which should contain this element. * This method should not used outside {@link DataContainer}.. * @param container Container which should contains this element. Cann be * null if this element does not belong to a container. */ public void setContainer(DataContainer container); } plantuml-1.2017.15/src/jcckit/data/DataEvent.java000066400000000000000000000110601312650303100213410ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.data; /** * Event to be sent to a {@link DataListener}. * * @author Franz-Josef Elmer */ public class DataEvent { private final DataContainer _container; private final DataEventType _type; private final int _index; private final DataElement _deletedElement; /** * Creates an instance for the specified parameters. * @param container The container which has been changed. * @param type Type of change. * @param index Index of the element which has been added, inserted, * replaced, or removed. * @param deletedElement Element which has been replaced or removed. */ private DataEvent(DataContainer container, DataEventType type, int index, DataElement deletedElement) { _container = container; _type = type; _index = index; _deletedElement = deletedElement; } /** * Creates an event of type {@link DataEventType#ELEMENT_ADDED} for the * specified container. * @param container Container where an element has been added. * @return ELEMENT_ADDED event. */ public static final DataEvent createAddEvent(DataContainer container) { return new DataEvent(container, DataEventType.ELEMENT_ADDED, container.getNumberOfElements() - 1, null); } /** * Creates an event of type {@link DataEventType#ELEMENT_INSERTED} for the * specified container. * @param container Container where an element has been inserted. * @param index Index at which an element has been inserted. * @return ELEMENT_INSERTED event. */ public static final DataEvent createInsertEvent(DataContainer container, int index) { return new DataEvent(container, DataEventType.ELEMENT_INSERTED, index, null); } /** * Creates an event of type {@link DataEventType#ELEMENT_REPLACED} for the * specified container. * @param container Container where an element has been replaced. * @param index Index of the replaced element. * @param replacedElement The previous element at index. * @return ELEMENT_REPLACED event. */ public static final DataEvent createReplaceEvent(DataContainer container, int index, DataElement replacedElement) { return new DataEvent(container, DataEventType.ELEMENT_REPLACED, index, replacedElement); } /** * Creates an event of type {@link DataEventType#ELEMENT_REMOVED} for the * specified container. * @param container Container where an element has been removed. * @param index Index of the removed element. * @param removedElement The previous element at index. * @return ELEMENT_REMOVED event. */ public static final DataEvent createRemoveEvent(DataContainer container, int index, DataElement removedElement) { return new DataEvent(container, DataEventType.ELEMENT_REMOVED, index, removedElement); } /** Returns the container. */ public DataContainer getContainer() { return _container; } /** * Returns the event type. Will be one of the constants * {@link DataEventType#ELEMENT_ADDED}, * {@link DataEventType#ELEMENT_INSERTED}, * {@link DataEventType#ELEMENT_REMOVED}, or * {@link DataEventType#ELEMENT_REPLACED}. */ public DataEventType getType() { return _type; } /** Returns the index. */ public int getIndex() { return _index; } /** * Returns the deleted element. * @return null if either an element has been added or inserted. */ public DataElement getDeletedElement() { return _deletedElement; } } plantuml-1.2017.15/src/jcckit/data/DataEventType.java000066400000000000000000000025401312650303100222060ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.data; /** * Type of a {@link DataEvent}. Implements the typesafe enumeration pattern. * * @author Franz-Josef Elmer */ public class DataEventType { private DataEventType() {} /** Event type. */ public static final DataEventType ELEMENT_ADDED = new DataEventType(), ELEMENT_INSERTED = new DataEventType(), ELEMENT_REPLACED = new DataEventType(), ELEMENT_REMOVED = new DataEventType(); } plantuml-1.2017.15/src/jcckit/data/DataListener.java000066400000000000000000000022721312650303100220520ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.data; /** * An interface all observers of {@link DataEvent DataEvents} * have to implement. * * @author Franz-Josef Elmer */ public interface DataListener { /** * Sends the specified data event to this object. * @param event Data event informing where and what happened. */ public void dataChanged(DataEvent event); } plantuml-1.2017.15/src/jcckit/data/DataPlot.java000066400000000000000000000050511312650303100212010ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.data; import java.util.StringTokenizer; import jcckit.util.ConfigParameters; /** * A plot is a {@link DataContainer} of {@link DataCurve DataCurves}. * * @author Franz-Josef Elmer */ public class DataPlot extends DataContainer { /** Config parameter key. */ public static final String CURVES_KEY = "curves", DATA_KEY = "data"; /** Creates an empty instance. */ public DataPlot() {} /** * Creates an instance from the specified config parameters. * * * * * *
Key & Default ValueTypeMandatoryDescription
curvesString[]yesList of keys denoting data curves. Each key refers to * config parameters used in the * * constructor of {@link DataCurve}.
*/ public DataPlot(ConfigParameters config) { StringTokenizer tokenizer = new StringTokenizer(config.get(CURVES_KEY)); while (tokenizer.hasMoreTokens()) { addElement(new DataCurve(config.getNode(tokenizer.nextToken()))); } } /** * Convenient method to create a DataPlot based on the specified * config parameters. It is a short-cut of * new DataPlot(config.getNode("data")). */ public static DataPlot create(ConfigParameters config) { return new DataPlot(config.getNode(DATA_KEY)); } /** * Returns true if element is an instance of * {@link DataCurve}. */ protected boolean isValid(DataElement element) { return element instanceof DataCurve; } } plantuml-1.2017.15/src/jcckit/data/DataPoint.java000066400000000000000000000024321312650303100213540ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.data; import jcckit.util.Point; /** * Immutable two-dimensional point in data coordinates. * * @author Franz-Josef Elmer */ public class DataPoint extends Point implements DataElement { public DataPoint(double x, double y) { super(x, y); } /** Returns always null. */ public DataContainer getContainer() { return null; } /** Does nothing. */ public void setContainer(DataContainer container) {} } plantuml-1.2017.15/src/jcckit/graphic/000077500000000000000000000000001312650303100173315ustar00rootroot00000000000000plantuml-1.2017.15/src/jcckit/graphic/Anchor.java000066400000000000000000000111241312650303100214050ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; import jcckit.util.ConfigParameters; import jcckit.util.FactoryException; /** * Anchor of a graphical element. There exist only the three * instances {@link #LEFT_BOTTOM}, {@link #CENTER}, and * {@link #RIGHT_TOP}. *

* The anchor factor can be used in a position formular. Its value * for the three instances reads: *

*

* * * * * *
InstanceFactor
LEFT_BOTTOM0
CENTER1
RIGHT_TOP2
*
* * @author Franz-Josef Elmer */ public class Anchor { /** Anchor constant. */ public static final Anchor LEFT_BOTTOM = new Anchor(0), CENTER = new Anchor(1), RIGHT_TOP = new Anchor(2); private static final String LEFT_VALUE = "left", RIGHT_VALUE = "right", CENTER_VALUE = "center", TOP_VALUE = "top", BOTTOM_VALUE = "bottom"; /** * Returns form the specified configuration parameters the * horizontal anchor defined by the specified key or the * specified default value. * @param config Configuration parameters. * @param key The key of the anchor. null is not allowed. * @param defaultValue The default value. * @return one of the three instances of Anchor. * @throws FactoryException if the value of key is * neither left, center, * nor right. * Note, that {@link FactoryException#getClassName()} * returns the invalid value. */ public static Anchor getHorizontalAnchor(ConfigParameters config, String key, Anchor defaultValue) { Anchor result = defaultValue; String anchor = config.get(key, null); if (anchor != null) { if (anchor.equals(LEFT_VALUE)) { result = Anchor.LEFT_BOTTOM; } else if (anchor.equals(CENTER_VALUE)) { result = Anchor.CENTER; } else if (anchor.equals(RIGHT_VALUE)) { result = Anchor.RIGHT_TOP; } else { throw new FactoryException(config, key, "Invalid horizontal anchor."); } } return result; } /** * Returns form the specified configuration parameters the * vertical anchor defined by the specified key or the * specified default value. * @param config Configuration parameters. * @param key The key of the anchor. null is not allowed. * @param defaultValue The default value. * @return one of the three instances of Anchor. * @throws FactoryException if the value of key is * neither top, center, * nor bottom. * Note, that {@link FactoryException#getClassName()} * returns the invalid value. */ public static Anchor getVerticalAnchor(ConfigParameters config, String key, Anchor defaultValue) { Anchor result = defaultValue; String anchor = config.get(key, null); if (anchor != null) { if (anchor.equals(BOTTOM_VALUE)) { result = Anchor.LEFT_BOTTOM; } else if (anchor.equals(CENTER_VALUE)) { result = Anchor.CENTER; } else if (anchor.equals(TOP_VALUE)) { result = Anchor.RIGHT_TOP; } else { throw new FactoryException(config, key, "Invalid vertcal anchor."); } } return result; } private final int _factor; private Anchor(int factor) { _factor = factor; } /** Returns the factor. */ public int getFactor() { return _factor; } } plantuml-1.2017.15/src/jcckit/graphic/BasicGraphicAttributes.java000066400000000000000000000175341312650303100245740ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; import java.awt.Color; import jcckit.util.ConfigParameters; /** * The basic attributes of any {@link BasicGraphicalElement}. This is an * extension of {@link ShapeAttributes} implementing {@link TextAttributes}. * * @author Franz-Josef Elmer */ public class BasicGraphicAttributes extends ShapeAttributes implements TextAttributes { /** Configuration parameter key. */ public static final String TEXT_COLOR_KEY = "textColor", FONT_NAME_KEY = "fontName", FONT_STYLE_KEY = "fontStyle", FONT_SIZE_KEY = "fontSize", HORIZONTAL_ANCHOR_KEY = "horizontalAnchor", VERTICAL_ANCHOR_KEY = "verticalAnchor", ORIENTATION_ANGLE_KEY = "orientationAngle"; private final Color _textColor; private final String _fontName; private final FontStyle _fontStyle; private final double _fontSize; private final double _orientationAngle; private final Anchor _horizontalAnchor; private final Anchor _verticalAnchor; /** * Creates a new instance based on the specified configuration * parameters. * * * * * * * * * * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
textColor = default foreground color of the * rendererColornoThe text color.
fontName = default font name of the * rendererStringnoThe name of the text font. The standard Java font name * "Serif", "SansSerif", and "Monospaced" can be used. * Other font names depend on the actual {@link Renderer} * rendering the corresponding {@link BasicGraphicalElement}. *
fontStyle = normalString * noThe font style. Possible values are: *
  • normal
  • bold
  • italic *
  • bold italic
*
fontSize = default font size of the * rendererdoublenoThe font size in units of the device-independent * coordinates.
orientationAngle = 0doublenoThe orientation angle of the text (in degree). * Zero means normal orientation whereas a positive value means * a rotation in counter-clockweise direction.
horizontalAnchor = leftString * noAnchor for horizontal text position. Possible values are * left, center, and right.
verticalAnchor = centerString * noAnchor for vertical text position. Possible values are * top, center, and bottom.
* Additional configuration parameters are explained in the * {@link ShapeAttributes#ShapeAttributes constructor} * of the superclass {@link ShapeAttributes}. */ public BasicGraphicAttributes(ConfigParameters config) { super(config); _textColor = config.getColor(TEXT_COLOR_KEY, null); _fontName = config.get(FONT_NAME_KEY, null); _fontStyle = FontStyle.getFontStyle(config, FONT_STYLE_KEY, FontStyle.NORMAL); _fontSize = config.getDouble(FONT_SIZE_KEY, 0); _orientationAngle = config.getDouble(ORIENTATION_ANGLE_KEY, 0); _horizontalAnchor = Anchor.getHorizontalAnchor(config, HORIZONTAL_ANCHOR_KEY, Anchor.LEFT_BOTTOM); _verticalAnchor = Anchor.getVerticalAnchor(config, VERTICAL_ANCHOR_KEY, Anchor.CENTER); } /** * Creates a new instance. * @param fillColor The fill color. May be null. * @param lineColor The line color. May be null. * @param lineThickness Thickness of the line. * Negative numbers will be trimmed to zero. * @param linePattern Line pattern. May be null. * @param textColor The text color. May be null. * @param fontName The font name. May be null. * @param fontStyle The font style. May be null. * @param fontSize The font size in units of the device-independent * coordinates. May be null. * @param orientationAngle Orientation angle of the text. * @param horizontalAnchor Horizontal text anchor. * @param verticalAnchor Vertical text anchor. */ public BasicGraphicAttributes(Color fillColor, Color lineColor, double lineThickness, double[] linePattern, Color textColor, String fontName, FontStyle fontStyle, double fontSize, double orientationAngle, Anchor horizontalAnchor, Anchor verticalAnchor) { super(fillColor, lineColor, lineThickness, linePattern); _textColor = textColor; _fontName = fontName; _fontStyle = fontStyle; _fontSize = fontSize; _orientationAngle = orientationAngle; _horizontalAnchor = horizontalAnchor; _verticalAnchor = verticalAnchor; } /** * Returns the text color. * @return null means default color of the renderer. */ public Color getTextColor() { return _textColor; } /** * Returns the font name. * @return null means default font name of the renderer. */ public String getFontName() { return _fontName; } /** * Returns the font style. * @return null means default font style of the renderer. */ public FontStyle getFontStyle() { return _fontStyle; } /** * Returns the font size in units of the device-independent coordinates. */ public double getFontSize() { return _fontSize; } /** * Returns the orientation angle in degree. Zero means * normal text orientation. Any positive angle means a * counter-clockwise rotation of the text. */ public double getOrientationAngle() { return _orientationAngle; } /** * Returns the anchor for horizontal position of the text. * Note, that the anchor is related to the text before * it is rotated by the orientation angle. * @return one of the three instances of Anchor. */ public Anchor getHorizontalAnchor() { return _horizontalAnchor; } /** * Returns the anchor for vertical position of the text. * Note, that the anchor is related to the text before * it is rotated by the orientation angle. * @return one of the three instances of Anchor. */ public Anchor getVerticalAnchor() { return _verticalAnchor; } } plantuml-1.2017.15/src/jcckit/graphic/BasicGraphicalElement.java000066400000000000000000000037551312650303100243540ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; /** * Abstract superclass of all basic {@link GraphicalElement * GraphicalElements}. Concrete subclasses have to implement * the method {@link GraphicalElement#renderWith}. * * @author Franz-Josef Elmer */ public abstract class BasicGraphicalElement implements GraphicalElement { private final GraphicAttributes _attributes; /** * Creates an instance with the specified drawing attributes. * Note, that a {@link Renderer} should use default attributes * in the case no attributes are defined. * @param attributes Drawing attributes or null if undefined. */ public BasicGraphicalElement(GraphicAttributes attributes) { _attributes = attributes; } /** * Returns the drawing attributes. * @return null if undefined. */ public GraphicAttributes getGraphicAttributes() { return _attributes; } /** * Returns whether this basic graphical element has a closed shape * or not. By default always true. Subclasses may override * this behaviour. * @return true if the shape is closed. */ public boolean isClosed() { return true; } } plantuml-1.2017.15/src/jcckit/graphic/ClippingRectangle.java000066400000000000000000000045401312650303100235710ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; /** * Immutable class of a rectangular clipping area. * * @author Franz-Josef Elmer */ public class ClippingRectangle implements ClippingShape { private final double _minX, _minY, _maxX, _maxY; /** * Creates an instance for the specified coordinates of * two opposite corner points. */ public ClippingRectangle(double x1, double y1, double x2, double y2) { _minX = Math.min(x1, x2); _minY = Math.min(y1, y2); _maxX = Math.max(x1, x2); _maxY = Math.max(y1, y2); } /** * Returns true if the specified point is inside this * rectangle. */ public boolean isInside(GraphPoint point) { double x = point.getX(); double y = point.getY(); return _minX <= x && x <= _maxX && _minY <= y && y <= _maxY; } /** Returns the minimum x value. */ public double getMinX() { return _minX; } /** Returns the maximum x value. */ public double getMaxX() { return _maxX; } /** Returns the minimum y value. */ public double getMinY() { return _minY; } /** Returns the maximum y value. */ public double getMaxY() { return _maxY; } /** Returns this instance. */ public ClippingRectangle getBoundingBox() { return this; } /** Returns a {@link Rectangle}. */ public BasicGraphicalElement getGraphicalElement() { return new Rectangle(new GraphPoint(0.5 * (_minX + _maxX), 0.5 * (_minY + _maxY)), _maxX - _minX, _maxY - _minY, null); } } plantuml-1.2017.15/src/jcckit/graphic/ClippingShape.java000066400000000000000000000032121312650303100227200ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; /** * Defining a clipping shape applied to all {@link GraphicalElement * GraphicalElements} of a {@link GraphicalComposite}. * * @author Franz-Josef Elmer */ public interface ClippingShape { /** * Returns true if the specified point is inside this * clipping shape. */ public boolean isInside(GraphPoint point); /** * Returns the bounding box of this clipping shape. * This method will be used by renderers who supports only * rectangular clipping shapes. */ public ClippingRectangle getBoundingBox(); /** * Returns a basic graphical element (such as {@link Rectangle} * or {@link Polygon}) which may be used by renderers to * define the clipping shape for the output device. */ public BasicGraphicalElement getGraphicalElement(); } plantuml-1.2017.15/src/jcckit/graphic/FillAttributes.java000066400000000000000000000022101312650303100231240ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; import java.awt.Color; /** * Interface for fill attributes. * * @author Franz-Josef Elmer */ public interface FillAttributes extends GraphicAttributes { /** * Returns the fill color. * @return null means no filling. */ public Color getFillColor(); } plantuml-1.2017.15/src/jcckit/graphic/FontStyle.java000066400000000000000000000061031312650303100221230ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; import java.util.Hashtable; import jcckit.util.ConfigParameters; import jcckit.util.FactoryException; /** * Font style constants. * This class is based on the typesafe enumeration pattern. * * @author Franz-Josef Elmer */ public class FontStyle { private static final Hashtable REPOSITORY = new Hashtable(); static final String NORMAL_TXT = "normal", BOLD_TXT = "bold", ITALIC_TXT = "italic", BOLD_ITALIC_TXT = "bold italic"; /** Font style constant. */ public static final FontStyle NORMAL = new FontStyle(NORMAL_TXT), BOLD = new FontStyle(BOLD_TXT), ITALIC = new FontStyle(ITALIC_TXT), BOLD_ITALIC = new FontStyle(BOLD_ITALIC_TXT); private final String _description; /** Non-public constructor to control the number of instances. */ private FontStyle(String description) { _description = description; REPOSITORY.put(description, this); } /** * Returns from the specified configuration parameters the font style * defined by the specified key or the specified default value. * @param config Configuration parameters. * @param key The key of the font style. * @param defaultValue The default value. * @return one of the four instances of FontStyle. * @throws FactoryException if the value of the key-value pair denoted * by key is neither normal, bold, * italic, nor bold italic, * Note, that {@link FactoryException#getClassName()} * returns the invalid value. */ public static FontStyle getFontStyle(ConfigParameters config, String key, FontStyle defaultValue) { FontStyle result = defaultValue; String value = config.get(key, null); if (value != null) { result = (FontStyle) REPOSITORY.get(value); if (result == null) { throw new FactoryException(config, key, "Invalid font style."); } } return result; } /** Returns a human readable description for pretty printing. */ public String toString() { return _description; } } plantuml-1.2017.15/src/jcckit/graphic/GraphPoint.java000066400000000000000000000026411312650303100222520ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; import jcckit.util.Point; /** * Immutable class of a two-dimensional point in the device-independent * coordinate system. * * @author Franz-Josef Elmer */ public class GraphPoint extends Point { /** * Creates an instance for the specified vector. * If vector is null or not long enough the * default value 0 will be used instead. */ public GraphPoint(double[] vector) { super(vector); } /** Creates an instance for the specified coordinates. */ public GraphPoint(double x, double y) { super(x, y); } } plantuml-1.2017.15/src/jcckit/graphic/GraphicAttributes.java000066400000000000000000000026231312650303100236230ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; /** * Marker interface for all types of graphic attributes * of a {@link BasicGraphicalElement}. Graphic attributes are only * hints for {@link Renderer Renderers} how to render a * BasicGraphicalElement. Whether they are used and how * they are interpreted depends on the concrete Renderer. *

* This is only a marker interface. There are several subinterfaces * specifying various attributes grouped by the type of element to * be rendered. * * @author Franz-Josef Elmer */ public interface GraphicAttributes { } plantuml-1.2017.15/src/jcckit/graphic/GraphicalComposite.java000066400000000000000000000067601312650303100237620ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; import java.util.Vector; /** * Container for {@link GraphicalElement GraphicalElements}. * * @author Franz-Josef Elmer */ public class GraphicalComposite implements GraphicalElement { private final Vector _elements = new Vector(); private final ClippingShape _clippingShape; /** * Creates an instance with the specified clipping shape. * @param clippingShape Clipping shape or null if no clipping. */ public GraphicalComposite(ClippingShape clippingShape) { _clippingShape = clippingShape; } /** * Returns the clipping shape. * @return null if no clipping should be applied. */ public ClippingShape getClippingShape() { return _clippingShape; } /** * Adds the specified element at the end of the list of elements. * @param element Element to be added. null is not allowed. * @throws NullPointerException if element == null */ public void addElement(GraphicalElement element) { if (element == null) { throwNullPointerException(); } else { _elements.addElement(element); } } /** Remove all elements. */ public void removeAllElements() { _elements.removeAllElements(); } /** * Replaces the specified element at the specified index of * the list of elements. * @param element New element. null is not allowed. * @throws NullPointerException if element == null */ public void replaceElementAt(int index, GraphicalElement element) { if (element == null) { throwNullPointerException(); } else { _elements.setElementAt(element, index); } } private void throwNullPointerException() { throw new NullPointerException( "A null as an GraphicalElement is not allowed"); } /** * Renders all {@link GraphicalElement GraphicalElements} in the sequence * they have been added. * @param renderer Renderer which implements all renderer interfaces * necessary to render the child elements. * @throws IllegalArgumentException if renderer is not * an instance of GraphicalCompositeRenderer. */ public void renderWith(Renderer renderer) { if (renderer instanceof GraphicalCompositeRenderer) { GraphicalCompositeRenderer r = (GraphicalCompositeRenderer) renderer; r.startRendering(this); for (int i = 0, n = _elements.size(); i < n; i++) { ((GraphicalElement) _elements.elementAt(i)).renderWith(r); } r.finishRendering(this); } else { throw new IllegalArgumentException(renderer + " does not implements GraphicalCompositeRenderer."); } } } plantuml-1.2017.15/src/jcckit/graphic/GraphicalCompositeRenderer.java000066400000000000000000000030721312650303100254420ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; /** * Interface of all {@link Renderer Renderers} who render a * {@link GraphicalComposite}. Note, that a * GraphicalCompositeRenderer does not * render the element of a GraphicalComposite * * @author Franz-Josef Elmer */ public interface GraphicalCompositeRenderer extends Renderer { /** * Starts rendering of the specified composite before its * elements are rendererd. Implementations of this method * usually obtain the {@link ClippingShape} from * composite. */ public void startRendering(GraphicalComposite composite); /** Finishes rendering of the specified composite. */ public void finishRendering(GraphicalComposite composite); } plantuml-1.2017.15/src/jcckit/graphic/GraphicalElement.java000066400000000000000000000033201312650303100233760ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; /** * Interface all graphical elements have to implement. * Together with the marker interface {@link Renderer} it * realizes the Anticyclic Visitor Pattern, a variant of the * GoF Visitor Pattern. This allows not only to extend JCCKit with * new renderers but also with new types of GraphicalElements * without touching existing code. * * @author Franz-Josef Elmer */ public interface GraphicalElement { /** * Renders this element according to the type of renderer. * Concrete GraphicalElements who are not instances of * {@link GraphicalComposite} dynamically cast renderer. * If it does not implement the type of renderer specific for * the concrete GraphicalElement it should throw an * IllegalArgumentException. */ public abstract void renderWith(Renderer renderer); } plantuml-1.2017.15/src/jcckit/graphic/LineAttributes.java000066400000000000000000000033411312650303100231330ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; import java.awt.Color; /** * Interface for line attributes. * * @author Franz-Josef Elmer */ public interface LineAttributes extends GraphicAttributes { /** * Returns the line color. * @return null means default color of the renderer. */ public Color getLineColor(); /** * Returns the line tickness. 0 means that the line thickness is * chosen as thin as possible. * Implementations have to guarantee that the returned value is * never negative. */ public double getLineThickness(); /** * Returns the line pattern. This is a sequence of length where the * pen is down or up. The first element is the length where the * pen is down. The next element is the length where the pen is up. * The pattern is cyclically repeated. * @return null means solid line. */ public double[] getLinePattern(); } plantuml-1.2017.15/src/jcckit/graphic/Oval.java000066400000000000000000000036031312650303100210770ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; /** * An oval (i.e. an ellipse). * * @author Franz-Josef Elmer */ public class Oval extends Rectangle { /** * Creates a new instance. * @param center The position of the center of this element. * @param width The width. * @param height The height. * @param attributes Drawing attributes. Can be null. */ public Oval(GraphPoint center, double width, double height, GraphicAttributes attributes) { super(center, width, height, attributes); } /** * Renders this oval with the specified {@link Renderer}. * @param renderer An instance of {@link OvalRenderer}. * @throws IllegalArgumentException if renderer is not * an instance of OvalRenderer. */ public void renderWith(Renderer renderer) { if (renderer instanceof OvalRenderer) { ((OvalRenderer) renderer).render(this); } else { throw new IllegalArgumentException(renderer + " does not implements OvalRenderer."); } } } plantuml-1.2017.15/src/jcckit/graphic/OvalRenderer.java000066400000000000000000000021371312650303100225670ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; /** * Interface of all {@link Renderer Renderers} who render a * {@link Oval}. * * @author Franz-Josef Elmer */ public interface OvalRenderer extends Renderer { /** Renders the specified oval. */ public void render(Oval oval); } plantuml-1.2017.15/src/jcckit/graphic/Polygon.java000066400000000000000000000051641312650303100216310ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; import java.util.Vector; /** * A polygon or polyline. * * @author Franz-Josef Elmer */ public class Polygon extends BasicGraphicalElement { private final Vector _points = new Vector(); private final boolean _closed; /** * Creates an instance of the specified graphic attributes. * @param closed true if this polygon is closed. */ public Polygon(GraphicAttributes attributes, boolean closed) { super(attributes); _closed = closed; } /** Returns true if this polygon is closed. */ public boolean isClosed() { return _closed; } /** Returns the number points. */ public int getNumberOfPoints() { return _points.size(); } /** Returns the point for the specified index. */ public GraphPoint getPoint(int index) { return (GraphPoint) _points.elementAt(index); } /** Adds a new point to the end of the list of points. */ public void addPoint(GraphPoint point) { _points.addElement(point); } /** Removes all points. */ public void removeAllPoints() { _points.removeAllElements(); } /** Replaces the point at the specified index by a new one. */ public void replacePointAt(int index, GraphPoint point) { _points.setElementAt(point, index); } /** * Renders this line with the specified {@link Renderer}. * @param renderer An instance of {@link PolygonRenderer}. * @throws IllegalArgumentException if renderer is not * an instance of PolygonRenderer. */ public void renderWith(Renderer renderer) { if (renderer instanceof PolygonRenderer) { ((PolygonRenderer) renderer).render(this); } else { throw new IllegalArgumentException(renderer + " does not implements PolygonRenderer."); } } } plantuml-1.2017.15/src/jcckit/graphic/PolygonRenderer.java000066400000000000000000000022151312650303100233120ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; /** * Interface of all {@link Renderer Renderers} who render an * instance of {@link Polygon}. * * @author Franz-Josef Elmer */ public interface PolygonRenderer extends Renderer { /** Renders the specified Polygon instance. */ public void render(Polygon polygon); } plantuml-1.2017.15/src/jcckit/graphic/Rectangle.java000066400000000000000000000045361312650303100221100ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; /** * A rectangle. * * @author Franz-Josef Elmer */ public class Rectangle extends BasicGraphicalElement { private final GraphPoint _center; private final double _width; private final double _height; /** * Creates a new instance. * @param center The position of the center of this element. * @param width The width. * @param height The height. * @param attributes Drawing attributes. Can be null. */ public Rectangle(GraphPoint center, double width, double height, GraphicAttributes attributes) { super(attributes); _center = center; _width = width; _height = height; } /** Returns the center of this element. */ public GraphPoint getCenter() { return _center; } /** Returns the width of this element. */ public double getWidth() { return _width; } /** Returns the height of this element. */ public double getHeight() { return _height; } /** * Renders this rectangle with the specified {@link Renderer}. * @param renderer An instance of {@link RectangleRenderer}. * @throws IllegalArgumentException if renderer is not * an instance of RectangleRenderer. */ public void renderWith(Renderer renderer) { if (renderer instanceof RectangleRenderer) { ((RectangleRenderer) renderer).render(this); } else { throw new IllegalArgumentException(renderer + " does not implements RectangleRenderer."); } } } plantuml-1.2017.15/src/jcckit/graphic/RectangleRenderer.java000066400000000000000000000021701312650303100235670ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; /** * Interface of all {@link Renderer Renderers} who render a * {@link Rectangle}. * * @author Franz-Josef Elmer */ public interface RectangleRenderer extends Renderer { /** Renders the specified rectangle. */ public void render(Rectangle rectangle); } plantuml-1.2017.15/src/jcckit/graphic/Renderer.java000066400000000000000000000020351312650303100217420ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; /** * Marker interface. Each subclass is an interface for a specific * type of {@link GraphicalElement}. * * @author Franz-Josef Elmer */ public interface Renderer {} plantuml-1.2017.15/src/jcckit/graphic/ShapeAttributes.java000066400000000000000000000073651312650303100233160ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; import java.awt.Color; import jcckit.util.ConfigParameters; /** * Basic attributes for shapes. * * @author Franz-Josef Elmer */ public class ShapeAttributes implements LineAttributes, FillAttributes { /** Configuration parameter key. */ public static final String FILL_COLOR_KEY = "fillColor", LINE_COLOR_KEY = "lineColor", LINE_THICKNESS_KEY = "lineThickness", LINE_PATTERN_KEY = "linePattern"; private final Color _fillColor; private final Color _lineColor; private final double _lineThickness; private final double[] _linePattern; /** * Creates a new instance based on the specified configuration * parameters. * * * * * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
fillColor = no fillingColornoThe fill color of the shape.
lineColor = no lineColornoThe color of a line, a polygon, or the border of a shape.
lineThickness = 0doublenoThe thickness of a line. A thickness of zero means that * the renderer will draw the thinest line possible.
linePattern = solid linedouble[]noA sequence of lengths where the pen is alternatively * down or up. For example, 0.1 0.1 will lead to a dashed * line whereas 0.02 0.02 is the pattern of a dotted * line and 0.02 0.02 0.1 0.02 of a dashed-dotted * line.
*/ public ShapeAttributes(ConfigParameters config) { this(config.getColor(FILL_COLOR_KEY, null), config.getColor(LINE_COLOR_KEY, null), config.getDouble(LINE_THICKNESS_KEY, 0), config.getDoubleArray(LINE_PATTERN_KEY, null)); } /** * Creates a new instance. * @param fillColor The fill color. May be null. * @param lineColor The line color. May be null. * @param lineThickness Thickness of the line. * Negative numbers will be trimmed to zero. * @param linePattern Line pattern. May be null. */ public ShapeAttributes(Color fillColor, Color lineColor, double lineThickness, double[] linePattern) { _fillColor = fillColor; _lineColor = lineColor; _lineThickness = Math.max(0, lineThickness); _linePattern = linePattern; } public Color getFillColor() { return _fillColor; } public Color getLineColor() { return _lineColor; } public double getLineThickness() { return _lineThickness; } public double[] getLinePattern() { return _linePattern; } } plantuml-1.2017.15/src/jcckit/graphic/Text.java000066400000000000000000000041231312650303100211200ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; /** * A single line of text. * * @author Franz-Josef Elmer */ public class Text extends BasicGraphicalElement { private final GraphPoint _position; private final String _text; /** * Creates an instance with the specified parameters. * @param position Position of the text. * @param text Text. * @param attributes Drawing attributes. Can be null. */ public Text(GraphPoint position, String text, GraphicAttributes attributes) { super(attributes); _position = position; _text = text; } /** Returns the position. */ public GraphPoint getPosition() { return _position; } /** Returns the text string. */ public String getText() { return _text; } /** * Renders this line with the specified {@link Renderer}. * @param renderer An instance of {@link TextRenderer}. * @throws IllegalArgumentException if renderer is not * an instance of TextRenderer. */ public void renderWith(Renderer renderer) { if (renderer instanceof TextRenderer) { ((TextRenderer) renderer).render(this); } else { throw new IllegalArgumentException(renderer + " does not implements TextRenderer."); } } } plantuml-1.2017.15/src/jcckit/graphic/TextAttributes.java000066400000000000000000000045071312650303100231750ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; import java.awt.Color; /** * Interface for text attributes. * * @author Franz-Josef Elmer */ public interface TextAttributes extends GraphicAttributes { /** * Returns the text color. * @return null means default color of the renderer. */ public Color getTextColor(); /** * Returns the font name. * @return null means default font name of the renderer. */ public String getFontName(); /** * Returns the font style. * @return null means default font style of the renderer. */ public FontStyle getFontStyle(); /** * Returns the font size in units of the device-independent coordinates. */ public double getFontSize(); /** * Returns the orientation angle in degree. Zero means * normal text orientation. Any positive angle means a * counter-clockwise rotation of the text. */ public double getOrientationAngle(); /** * Returns the anchor for horizontal position of the text. * Note, that the anchor is related to the text before * it is rotated by the orientation angle. * @return one of the three instances of Anchor. */ public Anchor getHorizontalAnchor(); /** * Returns the anchor for vertical position of the text. * Note, that the anchor is related to the text before * it is rotated by the orientation angle. * @return one of the three instances of Anchor. */ public Anchor getVerticalAnchor(); } plantuml-1.2017.15/src/jcckit/graphic/TextRenderer.java000066400000000000000000000021761312650303100226150ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.graphic; /** * Interface of all {@link Renderer Renderers} who render an * instance of {@link Text}. * * @author Franz-Josef Elmer */ public interface TextRenderer extends Renderer { /** Renders the specified Text instance. */ public void render(Text text); } plantuml-1.2017.15/src/jcckit/plot/000077500000000000000000000000001312650303100166725ustar00rootroot00000000000000plantuml-1.2017.15/src/jcckit/plot/AbstractSymbolFactory.java000066400000000000000000000116731312650303100240260ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.graphic.GraphPoint; import jcckit.graphic.GraphicAttributes; import jcckit.graphic.GraphicalElement; import jcckit.util.ConfigParameters; import jcckit.util.Factory; /** * Abstract superclass of all {@link SymbolFactory SymbolFactories}. * Subclasses have to implement {@link #createPlainSymbol createPlainSymbol()}. * * @author Franz-Josef Elmer */ public abstract class AbstractSymbolFactory implements SymbolFactory { /** Size of all symbols. */ protected final double _size; /** Attributes of all symbols. */ protected final GraphicAttributes _attributes; /** * Creates an instance from the specified configuration parameters. * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
size = 0.01doublenoSize of the symbol in device-independent units.
attributesConfigParametersnoConfiguration parameters for the attributes of the symbol. * className has to be a class which is an instance of * {@link GraphicAttributes}.
*/ public AbstractSymbolFactory(ConfigParameters config) { _size = config.getDouble(SIZE_KEY, DEFAULT_SIZE); _attributes = (GraphicAttributes) Factory.createOrGet( config.getNode(ATTRIBUTES_KEY), null); } /** * Creates a symbol. * Evaluate hintFromPreviousPoint if it is a {@link AttributesHint}. * Calls {@link #createSymbol(GraphPoint, GraphicAttributes, Hint, Hint)}. * @param point Symbol position. * @param hintFromPreviousPoint Hint from the previous point. * @param hintFromPreviousCurve Hint from the previous curve. */ public Symbol createSymbol(GraphPoint point, Hint hintFromPreviousPoint, Hint hintFromPreviousCurve) { GraphicAttributes attributes = _attributes; Hint hintForNextPoint = hintFromPreviousPoint; if (hintFromPreviousPoint instanceof AttributesHint) { attributes = ((AttributesHint) hintFromPreviousPoint).getAttributes(); hintForNextPoint = ((AttributesHint) hintFromPreviousPoint).getNextHint(); } return createSymbol(point, attributes, hintForNextPoint, hintFromPreviousCurve); } /** * Creates a symbol. * Uses {@link #createPlainSymbol createPlainSymbol()}. * @param point Symbol position. * @param attributes Symbol attributes. * @param hintForNextPoint Hint for the next point. Will be delivered * unchanged in the return Symbol object. * @param hintFromPreviousCurve Hint from the previous curve. * Will be delivered unchanged in the return Symbol object. * Subclasses may override this behavior. */ protected Symbol createSymbol(GraphPoint point, GraphicAttributes attributes, Hint hintForNextPoint, Hint hintFromPreviousCurve) { return new Symbol(createPlainSymbol(point, _size, attributes), hintForNextPoint, hintFromPreviousCurve); } /** * Creates a symbol for the legend at the specified position. * Uses {@link #createPlainSymbol createPlainSymbol()} * @param centerPosition Center position of the symbol. * @param size The size of the symbol. Will be ignored because the value * given in the constructor will be used. */ public GraphicalElement createLegendSymbol(GraphPoint centerPosition, double size) { return createPlainSymbol(centerPosition, _size, _attributes); } /** * Creates the graphical element of the plain symbol. * @param centerPosition Center position of the symbol. * @param size The size of the symbol. * @param attributes The attributes of the symbol. */ protected abstract GraphicalElement createPlainSymbol( GraphPoint centerPosition, double size, GraphicAttributes attributes); } plantuml-1.2017.15/src/jcckit/plot/AttributesHint.java000066400000000000000000000027141312650303100225120ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.graphic.GraphicAttributes; /** * A {@link Hint} which wraps a {@link GraphicAttributes} instance. * In addition the method {@link #getNextHint()} creates a new instance * with different attributes derivated from the wrapped attributes. * * @author Franz-Josef Elmer */ public interface AttributesHint extends Hint { /** * Returns the hint for the next {@link Symbol} of a {@link Curve}. * The new hint has a different {@link GraphicAttributes}. */ public AttributesHint getNextHint(); /** Returns the attributes value. */ public GraphicAttributes getAttributes(); } plantuml-1.2017.15/src/jcckit/plot/AxisParameters.java000066400000000000000000000526021312650303100224720ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import java.util.Properties; import jcckit.graphic.BasicGraphicAttributes; import jcckit.graphic.GraphPoint; import jcckit.graphic.LineAttributes; import jcckit.graphic.ShapeAttributes; import jcckit.graphic.TextAttributes; import jcckit.util.ConfigData; import jcckit.util.ConfigParameters; import jcckit.util.ConfigParametersBasedConfigData; import jcckit.util.Factory; import jcckit.util.Format; import jcckit.util.PropertiesBasedConfigData; import jcckit.util.TicLabelFormat; import jcckit.util.Util; /** * Helper class with various parameters defining an axis. * This helper class is used by {@link CartesianCoordinateSystem} * to set up a coordinate systems. *

* This class holds more than a dozen parameters. There are two factory * methods creating instances for x- and y-axis based on * {@link ConfigParameters}. They differ in their default parameters for * those axes. *

* Note, that there is a direct access of these parameters without getters * and setters but only for classes in the package jcckit.plot. * * @author Franz-Josef Elmer */ public class AxisParameters { /** Configuration parameter key. */ public static final String LOG_SCALE_KEY = "logScale", MINIMUM_KEY = "minimum", MAXIMUM_KEY = "maximum", AXIS_LENGTH_KEY = "axisLength", AXIS_ATTRIBUTES_KEY = "axisAttributes", AXIS_LABEL_KEY = "axisLabel", AXIS_LABEL_POSITION_KEY = "axisLabelPosition", AXIS_LABEL_ATTRIBUTES_KEY = "axisLabelAttributes", AUTOMATIC_TIC_CALCULATION_KEY = "automaticTicCalculation", MINIMUM_TIC_KEY = "minimumTic", MAXIMUM_TIC_KEY = "maximumTic", NUMBER_OF_TICS_KEY = "numberOfTics", TIC_LENGTH_KEY = "ticLength", TIC_ATTRIBUTES_KEY = "ticAttributes", TIC_LABEL_FORMAT_KEY = "ticLabelFormat", TIC_LABEL_POSITION_KEY = "ticLabelPosition", TIC_LABEL_ATTRIBUTES_KEY = "ticLabelAttributes", GRID_KEY = "grid", GRID_ATTRIBUTES_KEY = "gridAttributes"; private static final double LN10 = Math.log(10); /** If true the scale is logarithmic otherwise linear. */ boolean logScale; /** Minimum data value represented by the axis. */ double minimum; /** Maximum data value represented by the axis. */ double maximum; /** Length of the axis in device-independent graphical units. */ double axisLength; /** * Line attributes of the axis. * Can be null which means default attributes. */ LineAttributes axisAttributes; boolean automaticTicCalculation; double minimumTic; double maximumTic; int numberOfTics; /** * Length of the tics in device-independent graphical units. * If 0 no tics and tics label will be drawn. */ double ticLength; /** * Attributes of the tics. * Can be null which means default attributes. */ LineAttributes ticAttributes; /** Tic label formatter. */ TicLabelFormat ticLabelFormat; /** Position of the tic label relative to the tic. */ GraphPoint ticLabelPosition; /** Text attributes of the tic labels. */ TextAttributes ticLabelAttributes; /** If true grid lines are drawn. */ boolean grid; /** * Attributes of the grid lines. * Can be null which means default attributes. */ LineAttributes gridAttributes; /** Axis label. */ String axisLabel; /** Position of the axis label relative to the center of the axis. */ GraphPoint axisLabelPosition; /** Text attributes of the axis label. */ TextAttributes axisLabelAttributes; /** * Calculate the tics based on minimumTic, maximumTic, * and numberOfTics. If automaticTicCalculation == true * appropriated values for these fields are calculated. */ double[] calculateTics() { if (automaticTicCalculation) { calculateTicsParameters(); } double[] result = new double[numberOfTics]; if (numberOfTics > 0) { double b = Util.log(minimumTic, logScale); double a = Util.log(maximumTic, logScale); a = numberOfTics > 1 ? (a - b) / (numberOfTics - 1) : 0; for (int i = 0; i < result.length; i++) { result[i] = Util.exp(a * i + b, logScale); } result[0] = adjust(minimum, result[0]); result[numberOfTics - 1] = adjust(maximum, result[numberOfTics - 1]); } return result; } private void calculateTicsParameters() { double min = Math.min(minimum, maximum); double max = Math.max(minimum, maximum); if (logScale) { int minExponent = (int) (199.9999 + Math.log(min) / LN10) - 199; int maxExponent = (int) (200.0001 + Math.log(max) / LN10) - 200; minimumTic = Math.exp(LN10 * minExponent); maximumTic = Math.exp(LN10 * maxExponent); numberOfTics = maxExponent - minExponent + 1; } else { int baseExponent = (int) (199.69 + Math.log(max - min) / LN10) - 200; double base = 0.2 * Math.exp(LN10 * baseExponent); do { base *= 5; int minInt = (int) (999999.999999 + min / base) - 999999; int maxInt = (int) (1000000.000001 + max / base) - 1000000; minimumTic = minInt * base; maximumTic = maxInt * base; numberOfTics = maxInt - minInt + 1; } while (numberOfTics > 11); } } /** * Returns adjustingValue if value is very close * to adjustingValue. Otherwise value is returned. */ private static double adjust(double adjustingValue, double value) { return value != 0 && Math.abs(adjustingValue / value - 1) < 1e-11 ? adjustingValue : value; } /** * Returns a Properties object with those default parameters * which are common for x- and y-axis. */ private static Properties createDefaultAxisProperties() { Properties p = new Properties(); p.put(LOG_SCALE_KEY, "false"); p.put(MINIMUM_KEY, "0"); p.put(MAXIMUM_KEY, "1"); p.put(AXIS_LENGTH_KEY, "0.8"); p.put(AXIS_ATTRIBUTES_KEY + '/' + Factory.CLASS_NAME_KEY, ShapeAttributes.class.getName()); p.put(AXIS_LABEL_KEY, "x"); p.put(AXIS_LABEL_POSITION_KEY, "0 -0.05"); p.put(AXIS_LABEL_ATTRIBUTES_KEY + '/' + Factory.CLASS_NAME_KEY, BasicGraphicAttributes.class.getName()); p.put(AXIS_LABEL_ATTRIBUTES_KEY + '/' + BasicGraphicAttributes.HORIZONTAL_ANCHOR_KEY, "center"); p.put(AUTOMATIC_TIC_CALCULATION_KEY, "true"); p.put(TIC_LENGTH_KEY, "0.01"); p.put(TIC_ATTRIBUTES_KEY + '/' + Factory.CLASS_NAME_KEY, ShapeAttributes.class.getName()); p.put(TIC_LABEL_POSITION_KEY, "0 -0.01"); p.put(TIC_LABEL_FORMAT_KEY, "%1.1f"); p.put(TIC_LABEL_ATTRIBUTES_KEY + '/' + Factory.CLASS_NAME_KEY, BasicGraphicAttributes.class.getName()); p.put(TIC_LABEL_ATTRIBUTES_KEY + '/' + BasicGraphicAttributes.HORIZONTAL_ANCHOR_KEY, "center"); p.put(TIC_LABEL_ATTRIBUTES_KEY + '/' + BasicGraphicAttributes.VERTICAL_ANCHOR_KEY, "top"); p.put(GRID_KEY, "false"); p.put(GRID_ATTRIBUTES_KEY + '/' + Factory.CLASS_NAME_KEY, ShapeAttributes.class.getName()); return p; } /** * Returns a Properties object of the default parameters for * an x-axis. */ private static Properties createDefaultXAxisProperties() { Properties p = createDefaultAxisProperties(); p.put(AXIS_LABEL_KEY, "x"); p.put(AXIS_LABEL_POSITION_KEY, "0 -0.05"); p.put(AXIS_LABEL_ATTRIBUTES_KEY + '/' + BasicGraphicAttributes.VERTICAL_ANCHOR_KEY, "top"); p.put(TIC_LABEL_POSITION_KEY, "0 -0.01"); p.put(TIC_LABEL_ATTRIBUTES_KEY + '/' + BasicGraphicAttributes.HORIZONTAL_ANCHOR_KEY, "center"); p.put(TIC_LABEL_ATTRIBUTES_KEY + '/' + BasicGraphicAttributes.VERTICAL_ANCHOR_KEY, "top"); return p; } /** * Creates an x axis based on the specified configuration parameters. * All numbers (lengths, fontsizes, linethicknesses, etc.) are in * device-independent units. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
automaticTicCalculation = truebooleannoHas to be true if the tics should be calculated * automatically.
axisAttributes = default values of * {@link ShapeAttributes}ConfigParametersnoAttributes of the axis box.
axisLabel = xStringnoAxis label.
axisLabelAttributes = default values of * {@link BasicGraphicAttributes} with a text anchor CENTER * TOP.ConfigParametersnoText attributes of axis label.
axisLabelPosition = 0 -0.05double[]noPosition of the anchor of the axis * label relative to the center of the x-axis line.
axisLength = 0.8doublenoLength of the x-axis.
grid = falsebooleannoIf true grid lines will be drawn through the axis * tics.
gridAttributes = default values of * {@link ShapeAttributes}ConfigParametersnoAttributes of the grid lines.
logScale = falsebooleannoIf true the axis will be logarithmic. Otherwise * the axis is linear.
maximum = 1doublenoThe corresponding data value of one end of the axis.
maximumTic = result from automatic calculationdoublenoThe corresponding data value of the tic nearest the maximum end * of the axis.
minimum = 0doublenoThe corresponding data value of one end of the axis.
minimumTic = result from automatic calculationdoublenoThe corresponding data value of the tic nearest the minimum end * of the axis.
numberOfTics = result from automatic calculationintnoNumber of tics. The tics between the minimum and maximum tic * are spaced equidistantly.
ticAttributes = default values of * {@link ShapeAttributes}ConfigParametersnoAttributes of the tics.
ticLabelAttributes = default values of * {@link BasicGraphicAttributes} with a text anchor CENTER * TOP.ConfigParametersnoText attributes of tic labels.
ticLabelFormat = %1.1fString or ConfigParametersnoDefines rendering of the tic label. By default a * printf-like format string is given (see {@link Format}). * Note, that an empty string means that tic labels are dropped. *

* For non-numerical rendering an implementation of a * {@link TicLabelFormat} can be specified (e.g. * {@link TicLabelMap}). Note, that a configuration sub tree with * a className key-value pair overwrites any string * definition.

ticLabelPosition = 0 -0.01double[]noPosition of the anchor of the tic label relative to the * tic position on the axis.
ticLength = 0.01doublenoLength of the tics. Negative/positive values mean tics * inside/outside the box.
*/ public static AxisParameters createXAxis(ConfigParameters config) { return createAxis(config, createDefaultXAxisProperties()); } /** * Returns a Properties object of the default parameters for * an x-axis. */ private static Properties createDefaultYAxisProperties() { Properties p = createDefaultAxisProperties(); p.put(AXIS_LENGTH_KEY, "0.45"); p.put(AXIS_LABEL_KEY, "y"); p.put(AXIS_LABEL_POSITION_KEY, "-0.1 0"); p.put(AXIS_LABEL_ATTRIBUTES_KEY + '/' + BasicGraphicAttributes.VERTICAL_ANCHOR_KEY, "bottom"); p.put(AXIS_LABEL_ATTRIBUTES_KEY + '/' + BasicGraphicAttributes.ORIENTATION_ANGLE_KEY, "90"); p.put(TIC_LABEL_POSITION_KEY, "-0.01 0"); p.put(TIC_LABEL_ATTRIBUTES_KEY + '/' + BasicGraphicAttributes.HORIZONTAL_ANCHOR_KEY, "right"); p.put(TIC_LABEL_ATTRIBUTES_KEY + '/' + BasicGraphicAttributes.VERTICAL_ANCHOR_KEY, "center"); return p; } /** * Creates an y axis based on the specified configuration parameters. * All numbers (lengths, fontsizes, linethicknesses, etc.) are in * device-independent units. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
automaticTicCalculation = truebooleannoHas to be true if the tics should be calculated * automatically.
axisAttributes = default values of * {@link ShapeAttributes}ConfigParametersnoAttributes of the axis box.
axisLabel = yStringnoAxis label.
axisLabelAttributes = default values of * {@link BasicGraphicAttributes} with a text anchor CENTER * BOTTOM and the text rotated by 90 degree.ConfigParametersnoText attributes of axis label.
axisLabelPosition = -0.1 0double[]noPosition of the anchor of the axis * label relative to the center of the y-axis line.
axisLength = 0.45doublenoLength of the y-axis.
grid = falsebooleannoIf true grid lines will be drawn through the axis * tics.
gridAttributes = default values of * {@link ShapeAttributes}ConfigParametersnoAttributes of the grid lines.
logScale = falsebooleannoIf true the axis will be logarithmic. Otherwise * the axis is linear.
maximum = 1doublenoThe corresponding data value of one end of the axis.
maximumTic = result from automatic calculationdoublenoThe corresponding data value of the tic nearest the maximum end * of the axis.
minimum = 0doublenoThe corresponding data value of one end of the axis.
minimumTic = result from automatic calculationdoublenoThe corresponding data value of the tic nearest the minimum end * of the axis.
numberOfTics = result from automatic calculationintnoNumber of tics. The tics between the minimum and maximum tic * are spaced equidistantly.
ticAttributes = default values of * {@link ShapeAttributes}ConfigParametersnoAttributes of the tics.
ticLabelAttributes = default values of * {@link BasicGraphicAttributes} with a text anchor RIGHT CENTER. * ConfigParametersnoText attributes of tic labels.
ticLabelFormat = %1.1fStringnoDefines rendering of the tic label. By default a * printf-like format string is given (see {@link Format}). * Note, that an empty string means that tic labels are dropped. *

* For non-numerical rendering an implementation of a * {@link TicLabelFormat} can be specified (e.g. * {@link TicLabelMap}). Note, that a configuration sub tree with * a className key-value pair overwrites any string * definition.

ticLabelPosition = -0.01 0double[]noPosition of the anchor of the tic label relative to the * tic position on the axis.
ticLength = 0.01doublenoLength of the tics. Negative/positive values mean tics * inside/outside the box.
*/ public static AxisParameters createYAxis(ConfigParameters config) { return createAxis(config, createDefaultYAxisProperties()); } private static AxisParameters createAxis(ConfigParameters config, Properties p) { ConfigData cd = new PropertiesBasedConfigData(p); ConfigParameters c = new ConfigParameters(cd); cd = new ConfigParametersBasedConfigData(config, c); c = new ConfigParameters(cd); AxisParameters a = new AxisParameters(); a.logScale = c.getBoolean(LOG_SCALE_KEY); a.minimum = c.getDouble(MINIMUM_KEY); a.maximum = c.getDouble(MAXIMUM_KEY); a.axisLength = c.getDouble(AXIS_LENGTH_KEY); a.axisAttributes = (LineAttributes) Factory.create(c.getNode(AXIS_ATTRIBUTES_KEY)); a.axisLabel = c.get(AXIS_LABEL_KEY); a.axisLabelPosition = new GraphPoint(c.getDoubleArray(AXIS_LABEL_POSITION_KEY)); a.axisLabelAttributes = (TextAttributes) Factory.create( c.getNode(AXIS_LABEL_ATTRIBUTES_KEY)); a.ticLength = c.getDouble(TIC_LENGTH_KEY); a.automaticTicCalculation = c.getBoolean(AUTOMATIC_TIC_CALCULATION_KEY); if (!a.automaticTicCalculation) { a.calculateTicsParameters(); // calculate default parameters a.minimumTic = c.getDouble(MINIMUM_TIC_KEY, a.minimumTic); a.maximumTic = c.getDouble(MAXIMUM_TIC_KEY, a.maximumTic); a.numberOfTics = c.getInt(NUMBER_OF_TICS_KEY, a.numberOfTics); } a.ticAttributes = (LineAttributes) Factory.create(c.getNode(TIC_ATTRIBUTES_KEY)); a.ticLabelFormat = createTicLabelFormat(c); a.ticLabelPosition = new GraphPoint(c.getDoubleArray(TIC_LABEL_POSITION_KEY)); a.ticLabelAttributes = (TextAttributes) Factory.create( c.getNode(TIC_LABEL_ATTRIBUTES_KEY)); a.grid = c.getBoolean(GRID_KEY); a.gridAttributes = (LineAttributes) Factory.create(c.getNode(GRID_ATTRIBUTES_KEY)); return a; } private static TicLabelFormat createTicLabelFormat(ConfigParameters c) { TicLabelFormat result = Format.create(c, TIC_LABEL_FORMAT_KEY); ConfigParameters node = c.getNode(TIC_LABEL_FORMAT_KEY); if (node.get(Factory.CLASS_NAME_KEY, null) != null) { result = (TicLabelFormat) Factory.create(node); } return result; } } plantuml-1.2017.15/src/jcckit/plot/BarFactory.java000066400000000000000000000123341312650303100215740ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.graphic.ClippingShape; import jcckit.graphic.GraphPoint; import jcckit.graphic.GraphicAttributes; import jcckit.graphic.GraphicalElement; import jcckit.graphic.Rectangle; import jcckit.util.ConfigParameters; /** * A factory of bars. The bars are {@link Rectangle Rectangles}. * Depending on the configuration parameters the bars can be * horizontal or vertical. Bars of several curves can be side by side or * stacked. The bar length is determined by the x or y value of the * curve point in device-independent coordinates. If the value is negative * the bar goes into the negative direction. For stacked bars the values * should always be positive. *

* When used inside a {@link SimpleCurve} soft clipping should always be * switched off (see * {@link SimpleCurve#SimpleCurve(ConfigParameters, int, int, ClippingShape, Legend)}). * * @author Franz-Josef Elmer */ public class BarFactory extends AbstractSymbolFactory { /** Configuration parameter key. */ public static final String STACKED_KEY = "stacked", HORIZONTAL_BARS_KEY = "horizontalBars"; private final boolean _stacked; private final boolean _horizontalBars; /** * Creates an instance from the specified configuration parameters. * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
horizontalBars = falsebooleannoIf true horizontal bars will be drawn. Otherwise * vertical bars are drawn.
stacked = falsebooleannoIf true the bars of several curves will be * stacked.
* In addition the configuration parameters of the * * constructor of the superclass {@link AbstractSymbolFactory} apply. */ public BarFactory(ConfigParameters config) { super(config); _horizontalBars = config.getBoolean(HORIZONTAL_BARS_KEY, false); _stacked = config.getBoolean(STACKED_KEY, false); } /** * Creates a bar at the specified point. * If hintFromPreviousCurve * is not an instance of {@link PositionHint} the values of * origin and position will be (0,0). * @param hintFromPreviousCurve Hint from previous curve. Will be used * to calculate symbol shape and hint for the next curve. */ protected Symbol createSymbol(GraphPoint point, GraphicAttributes attributes, Hint hintForNextPoint, Hint hintFromPreviousCurve) { GraphPoint origin = new GraphPoint(null); GraphPoint position = origin; if (hintFromPreviousCurve instanceof PositionHint) { origin = ((PositionHint) hintFromPreviousCurve).getOrigin(); position = ((PositionHint) hintFromPreviousCurve).getPosition(); } double px = position.getX(); double py = position.getY(); double x = point.getX() - origin.getX(); double y = point.getY() - origin.getY(); if (_horizontalBars) { y = _size; position = new GraphPoint(px + 0.5 * x, point.getY() + py); px += _stacked ? x : 0; py += _stacked ? 0 : _size; } else { x = _size; position = new GraphPoint(point.getX() + px, py + 0.5 * y); px += _stacked ? 0 : _size; py += _stacked ? y : 0; } Hint hintForNextCurve = new PositionHint(origin, new GraphPoint(px, py)); return new Symbol(new Rectangle(position, Math.abs(x), Math.abs(y), attributes), hintForNextPoint, hintForNextCurve); } /** * Creates a symbol for the legend at the specified position. * @param centerPosition Center position of the symbol. * @param size The size of the symbol. */ public GraphicalElement createLegendSymbol(GraphPoint centerPosition, double size) { return new Rectangle(centerPosition, size, size, _attributes); } /** * Returns null because this method isn't needed but has to be * implemented. */ protected GraphicalElement createPlainSymbol( GraphPoint centerPosition, double size, GraphicAttributes attributes) { return null; } } plantuml-1.2017.15/src/jcckit/plot/CartesianCoordinateSystem.java000066400000000000000000000210001312650303100246540ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.data.DataPoint; import jcckit.graphic.ClippingRectangle; import jcckit.graphic.ClippingShape; import jcckit.graphic.GraphPoint; import jcckit.graphic.GraphicAttributes; import jcckit.graphic.GraphicalComposite; import jcckit.graphic.GraphicalElement; import jcckit.graphic.LineAttributes; import jcckit.graphic.Polygon; import jcckit.graphic.Text; import jcckit.transformation.CartesianTransformation; import jcckit.transformation.Transformation; import jcckit.util.ConfigParameters; /** * A Cartesian coordinate system. One or both axes can be logarithmic. * * @author Franz-Josef Elmer */ public class CartesianCoordinateSystem implements CoordinateSystem { /** Configuration parameter key. */ public static final String ORIGIN_KEY = "origin", X_AXIS_KEY = "xAxis", Y_AXIS_KEY = "yAxis"; private final CartesianTransformation _transformation; private final GraphicalComposite _view; private final ClippingRectangle _clippingRectangle; /** * Creates an instance from the specified configuration parameters. * * * * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
origin = 0.15, 0.1double[]noPosition (in device-independent coordinates) of the lower-left * corner of the axis box.
xAxisConfigParametersnoParameters defining the x-axis. For definitions and default * values see {@link AxisParameters#createXAxis * AxisParameters.createXAxis()}.
yAxisConfigParametersnoParameters defining the y-axis. For definitions and default * values see {@link AxisParameters#createYAxis * AxisParameters.createYAxis()}.
*/ public CartesianCoordinateSystem(ConfigParameters config) { this(new GraphPoint(config.getDoubleArray(ORIGIN_KEY, new double[] {0.15, 0.1})), AxisParameters.createXAxis(config.getNode(X_AXIS_KEY)), AxisParameters.createYAxis(config.getNode(Y_AXIS_KEY))); } /** * Creates an instance for the specified origin and parameters * of both axes. * @param origin Position (in device-independent coordinates) of the * lower-left corner of the axis box. * @param xAxisParameters Parameters of the x-axis. * @param yAxisParameters Parameters of the y-axis. */ public CartesianCoordinateSystem(GraphPoint origin, AxisParameters xAxisParameters, AxisParameters yAxisParameters) { double x = origin.getX(); double y = origin.getY(); _transformation = new CartesianTransformation(xAxisParameters.logScale, yAxisParameters.logScale, new DataPoint(xAxisParameters.minimum, yAxisParameters.minimum), new GraphPoint(x, y), new DataPoint(xAxisParameters.maximum, yAxisParameters.maximum), new GraphPoint(x + xAxisParameters.axisLength, y + yAxisParameters.axisLength)); _clippingRectangle = new ClippingRectangle(x, y, x + xAxisParameters.axisLength, y + yAxisParameters.axisLength); _view = new GraphicalComposite(null); createView(origin, xAxisParameters, yAxisParameters); } /** Creates the graphical representation of this coordinate system. */ private void createView(GraphPoint origin, AxisParameters xAxisParameters, AxisParameters yAxisParameters) { double x0 = origin.getX(); double x1 = x0 + xAxisParameters.axisLength; double y0 = origin.getY(); double y1 = y0 + yAxisParameters.axisLength; GraphPoint lowerLeftCorner = new GraphPoint(x0, y0); GraphPoint upperLeftCorner = new GraphPoint(x0, y1); GraphPoint lowerRightCorner = new GraphPoint(x1, y0); GraphPoint upperRightCorner = new GraphPoint(x1, y1); LineAttributes xLineAttributes = xAxisParameters.axisAttributes; LineAttributes yLineAttributes = yAxisParameters.axisAttributes; createTicsAndGrid(true, y0, y1, xAxisParameters); createTicsAndGrid(false, x0, x1, yAxisParameters); addLine(lowerLeftCorner, lowerRightCorner, xLineAttributes); addLine(lowerLeftCorner, upperLeftCorner, yLineAttributes); addLine(upperLeftCorner, upperRightCorner, xLineAttributes); addLine(lowerRightCorner, upperRightCorner, yLineAttributes); createLabel(0.5 * (x0 + x1), y0, xAxisParameters); createLabel(x0, 0.5 * (y0 + y1), yAxisParameters); } private void createLabel(double x, double y, AxisParameters parameters) { if (parameters.axisLabel.length() > 0) { _view.addElement(new Text( new GraphPoint(x + parameters.axisLabelPosition.getX(), y + parameters.axisLabelPosition.getY()), parameters.axisLabel, parameters.axisLabelAttributes)); } } private void createTicsAndGrid(boolean isXAxis, double low, double high, AxisParameters parameters) { double[] tics = parameters.calculateTics(); int offIndex = isXAxis ? 1 : 0; double[] point = new double[2]; // helper array for (int i = 0; i < tics.length; i++) { point[1 - offIndex] = tics[i]; point[offIndex] = 1; GraphPoint gPoint1 = _transformation.transformToGraph(new DataPoint(point[0], point[1])); point[0] = gPoint1.getX(); point[1] = gPoint1.getY(); point[offIndex] = high; gPoint1 = new GraphPoint(point[0], point[1]); point[offIndex] += parameters.ticLength; addLine(gPoint1, new GraphPoint(point[0], point[1]), parameters.ticAttributes); point[offIndex] = low; GraphPoint gPoint2 = new GraphPoint(point[0], point[1]); if (parameters.grid) { addLine(gPoint1, gPoint2, parameters.gridAttributes); } point[offIndex] -= parameters.ticLength; addLine(gPoint2, new GraphPoint(point[0], point[1]), parameters.ticAttributes); if (parameters.ticLabelFormat != null) { point[offIndex] += parameters.ticLength; point[0] += parameters.ticLabelPosition.getX(); point[1] += parameters.ticLabelPosition.getY(); _view.addElement(new Text(new GraphPoint(point[0], point[1]), parameters.ticLabelFormat.form(tics[i]), parameters.ticLabelAttributes)); } } } private void addLine(GraphPoint point1, GraphPoint point2, GraphicAttributes attributes) { Polygon line = new Polygon(attributes, false); line.addPoint(point1); line.addPoint(point2); _view.addElement(line); } /** * Returns the graphical representation of the coordinate system. * In each call the same instance is returned. */ public GraphicalElement getView() { return _view; } /** * Returns the clipping rectangle of specified by the axis. * In each call the same instance is returned. */ public ClippingShape getClippingShape() { return _clippingRectangle; } /** * Returns the transformation of data coordinates into the device-independent * coordinates of the axis box. * In each call the same instance is returned. */ public Transformation getTransformation() { return _transformation; } } plantuml-1.2017.15/src/jcckit/plot/CircleSymbolFactory.java000066400000000000000000000037571312650303100234700ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.graphic.GraphPoint; import jcckit.graphic.GraphicAttributes; import jcckit.graphic.GraphicalElement; import jcckit.graphic.Oval; import jcckit.util.ConfigParameters; /** * A factory of circle symbols. * * @author Franz-Josef Elmer */ public class CircleSymbolFactory extends AbstractSymbolFactory { /** * Creates an instance from the specified configuration parameters. * For the configuration parameters see the * * constructor of the superclass {@link AbstractSymbolFactory}. */ public CircleSymbolFactory(ConfigParameters config) { super(config); } /** * Creates a circle. * @param centerPosition Position of the center of the circle. * @param size Diameter of the circle. * @param attributes Circle attributes. */ protected GraphicalElement createPlainSymbol(GraphPoint centerPosition, double size, GraphicAttributes attributes) { return new Oval(centerPosition, size, size, attributes); } } plantuml-1.2017.15/src/jcckit/plot/CoordinateSystem.java000066400000000000000000000040501312650303100230300ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.graphic.ClippingShape; import jcckit.graphic.GraphicalElement; import jcckit.transformation.Transformation; /** * Interface for all generators of coordinate systems. A * CoordinateSystem creates a * {@link jcckit.graphic.GraphicalComposite} which contains all the * {@link GraphicalElement GraphicalElements} defining axes, labels, grid, etc. * * @author Franz-Josef Elmer */ public interface CoordinateSystem { /** * Returns the graphical representation of a coordinate * system. Different invocations of this method may return * different coordinate systems, e.g., due to changes in the * transformation or clipping shapes. */ public GraphicalElement getView(); /** * Returns the clipping chape of {@link Curve Curves} drawn on top * of the coordinates system. Different invocations of * this method may return different clipping shapes. */ public ClippingShape getClippingShape(); /** * Returns the transformation between data coordinates and * device-independent graphcial coordinates. Different invocations * of this method may return different transformations. */ public Transformation getTransformation(); } plantuml-1.2017.15/src/jcckit/plot/Curve.java000066400000000000000000000045531312650303100206300ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.graphic.GraphPoint; import jcckit.graphic.GraphicalElement; /** * A curve is defined by a sequence of points in device-independent * coordinates. The points can be decorated by symbols and/or * connected by lines.{@link Hint Hints} are used to determine additional * properties of the symbol. This is especially important for * charts with bars. *

* In accordance with the Factory Method Pattern * the symbols are created by a {@link SymbolFactory}. * * @author Franz-Josef Elmer */ public interface Curve { /** * Returns the graphical representation of a curve. * Different invocations of this method might return * different instances. * This is especially true after adding, inserting, removing, or * repplacing a point of the curve. */ public GraphicalElement getView(); /** * Returns a symbol which can be used to create the legend for the curve. * For example, it should return a horizontal line with the symbol * in the middle if the curve is a line with points decorated by symbols. */ public GraphicalElement getLegendSymbol(); /** * Appends a new point to the curve. * @param point Position in device-independent coordinates. * @param hintFromPreviousCurve Hint which may be used to calculate * the corresponding {@link GraphicalElement}. * @return hint for next curve. */ public Hint addPoint(GraphPoint point, Hint hintFromPreviousCurve); /** Removes all points from the curve. */ public void removeAllPoints(); } plantuml-1.2017.15/src/jcckit/plot/CurveFactory.java000066400000000000000000000031551312650303100221550ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.graphic.ClippingShape; /** * Interface of a curve factory. A curve factory creates a new instance * of a {@link Curve}. * * @author Franz-Josef Elmer */ public interface CurveFactory { /** * Creates a new curve instance. * @param curveIndex The index of the curve in the {@link Plot} to which * it should belong. * @param numberOfCurves Number of curves. Will be needed to calculate the * y-coordinate of the legend symbol. * @param clippingShape Clipping shape applied to the curve. * @param legend The legend which will show the curve symbol. * @return an empty instance. */ public Curve create(int curveIndex, int numberOfCurves, ClippingShape clippingShape, Legend legend); } plantuml-1.2017.15/src/jcckit/plot/ErrorBarFactory.java000066400000000000000000000133451312650303100226110ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.graphic.GraphPoint; import jcckit.graphic.GraphicAttributes; import jcckit.graphic.GraphicalComposite; import jcckit.graphic.GraphicalElement; import jcckit.graphic.Rectangle; import jcckit.util.ConfigParameters; import jcckit.util.Factory; /** * Symbol factory for creating symbols with error bars. It wraps * a {@link SymbolFactory} for creating the symbol. The error bars * are {@link Rectangle Rectangles}. *

* Curves with error bars are based on two * {@link jcckit.data.DataCurve DataCurves}: *

  1. The plain curve. *
  2. An instance which stores the errors in x and y. * It is assumed that the errors are positive values defining * the error symmetrically around the curve points. *
*

* The ErrorBarFactory needs an instance of {@link PositionHint} * as initial {@link Hint} for the next curve. Its origin must be * the origin of the data coordinate system in device-independent coordinates. * The position of PositionHint must be undefined. * * @author Franz-Josef Elmer */ public class ErrorBarFactory implements SymbolFactory { /** Configuration parameter key. */ public static final String SYMBOL_FACTORY_KEY = "symbolFactory"; private final SymbolFactory _symbolFactory; private final GraphicAttributes _attributes; private final double _size; /** * Creates an instance from the specified configuration parameters. * * * * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
symbolFactory = nullConfigParametersnoDefinition of the wrapped {@link SymbolFactory} which generates * the curve symbol without bars. By default an empty * {@link GraphicalComposite} will be created.
size = 0doublenoWidth of the error bars.
attributes = nullConfigParametersnoDefinition of the {@link GraphicAttributes} of the error * bars.
*/ public ErrorBarFactory(ConfigParameters config) { _symbolFactory = (SymbolFactory) Factory.createOrGet( config.getNode(SYMBOL_FACTORY_KEY), null); _size = config.getDouble(SIZE_KEY, 0); _attributes = (GraphicAttributes) Factory.createOrGet( config.getNode(ATTRIBUTES_KEY), null); } /** * Creates the legend symbol. Calls the wrapped {@link SymbolFactory} * or returns an empty instance of {@link GraphicalComposite} if undefined. */ public GraphicalElement createLegendSymbol(GraphPoint centerPosition, double size) { return _symbolFactory == null ? new GraphicalComposite(null) : _symbolFactory.createLegendSymbol(centerPosition, size); } /** * Creates either the curve symbol or the error bars. Error bars are * created when hintFromPreviousCurve is an instance of * {@link PositionHint} and its position attribute is not null. * Otherwise the curve symbol is created. The position attributes stores * the curve point (in device-independent coordinates). The origin is * always as set in the initial PositionHint. The hint for * the next curve wrapped by the returned Symbol is always * a PositionHint. */ public Symbol createSymbol(GraphPoint point, Hint hintFromPreviousPoint, Hint hintFromPreviousCurve) { GraphPoint origin = new GraphPoint(null); GraphPoint position = null; if (hintFromPreviousCurve instanceof PositionHint) { origin = ((PositionHint) hintFromPreviousCurve).getOrigin(); position = ((PositionHint) hintFromPreviousCurve).getPosition(); } if (position == null) { if (_symbolFactory == null) { return new Symbol(new GraphicalComposite(null), hintFromPreviousPoint, new PositionHint(origin, point)); } else { return _symbolFactory.createSymbol(point, hintFromPreviousPoint, new PositionHint(origin, point)); } } else { double xError = point.getX() - origin.getX(); double yError = point.getY() - origin.getY(); GraphicalComposite errorBars = new GraphicalComposite(null); if (xError > 0) { errorBars.addElement(new Rectangle(position, 2 * xError, _size, _attributes)); } if (yError > 0) { errorBars.addElement(new Rectangle(position, _size, 2 * yError, _attributes)); } return new Symbol(errorBars, hintFromPreviousPoint, new PositionHint(origin, null)); } } } plantuml-1.2017.15/src/jcckit/plot/Hint.java000066400000000000000000000024401312650303100204370ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; /** * Marker interface of all types of hints. Hints are used to calculate * {@link jcckit.graphic.GraphicalElement} representing a point in a {@link * Curve}. For example, in a chart with stacked * bars the data determines the height of a bar but the foot of * a bar is determined by the height of the bar below. Its value will be * stored in a {@link PositionHint}. * * @author Franz-Josef Elmer */ public interface Hint {} plantuml-1.2017.15/src/jcckit/plot/Legend.java000066400000000000000000000256721312650303100207470ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import java.util.Properties; import jcckit.graphic.BasicGraphicAttributes; import jcckit.graphic.GraphPoint; import jcckit.graphic.GraphicAttributes; import jcckit.graphic.GraphicalComposite; import jcckit.graphic.GraphicalElement; import jcckit.graphic.Polygon; import jcckit.graphic.Rectangle; import jcckit.graphic.ShapeAttributes; import jcckit.graphic.Text; import jcckit.graphic.TextAttributes; import jcckit.util.ConfigData; import jcckit.util.ConfigParameters; import jcckit.util.ConfigParametersBasedConfigData; import jcckit.util.Factory; import jcckit.util.PropertiesBasedConfigData; /** * Helper class for creating the legend of a {@link Plot}. * * @author Franz-Josef Elmer */ public class Legend { /** Configuration parameter key. */ public static final String UPPER_RIGHT_CORNER_KEY = "upperRightCorner", BOX_WIDTH_KEY = "boxWidth", BOX_HEIGHT_KEY = "boxHeight", BOX_ATTRIBUTES_KEY = "boxAttributes", TITLE_KEY = "title", TITLE_DISTANCE_KEY = "titleDistance", TITLE_ATTRIBUTES_KEY = "titleAttributes", LEFT_DISTANCE_KEY = "leftDistance", BOTTOM_DISTANCE_KEY = "bottomDistance", TOP_DISTANCE_KEY = "topDistance", LINE_LENGTH_KEY = "lineLength", SYMBOL_SIZE_KEY = "symbolSize", CURVE_TITLE_DISTANCE_KEY = "curveTitleDistance", CURVE_TITLE_ATTRIBUTES_KEY = "curveTitleAttributes"; private final GraphicalComposite _box; private final TextAttributes _curveTitleAttributes; private final double _xSymbol; private final double _xText; private final double _yBase; private final double _yLastRow; private final double _length; private final double _size; /** * Creates an instance from the specified configuration parameters. * All numbers (lengths, fontsizes, linethicknesses, etc.) are in * device-independent units. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
bottomDistance = 0.02doublenoDistance between the last row and the bottom of the legend box. *
boxAttributes = default values of * {@link ShapeAttributes} with a white fill color.ConfigParametersnoAttributes of the legend box.
boxHeight = 0.1doublenoHeight of the legend box.
boxWidth = 0.2doublenoWidth of the legend box.
curveTitleAttributes = default values of * {@link BasicGraphicAttributes}ConfigParametersnoText attributes of curve titles printed in the legend.
curveTitleDistance = 0.005doublenoHorizontal distance between the line part of the legend symbol * and the curve title.
leftDistance = 0.01doublenoHorizontal distance between the line part of the legend symbol * and the left border of the legend box.
lineLength = 0.035doublenoLength of the line part of the legend symbol.
symbolSize = 0.01doublenoSize of the symbol part of the legend symbol. Will be the * size argument of {@link SymbolFactory#createLegendSymbol * createLegendSymbol} in a {@link SymbolFactory}.
titleAttributes = default values of * {@link BasicGraphicAttributes} with a text anchor CENTER * TOP.ConfigParametersnoText attributes of the title of the legend box.
title = LegendStringnoTitle of the legend box.
titleDistance = 0.005doublenoDistance between the center of the upper line of the legend box * and the anchor of the legend title.
topDistance = 0.04doublenoDistance between the first row and the top of the legend box. *
upperRightCorner = 0.94, 0.54double[]noPosition of the upper-right corner of the legend box.
*/ public Legend(ConfigParameters config) { config = mergeWithDefaultConfig(config); GraphPoint corner = new GraphPoint(config.getDoubleArray(UPPER_RIGHT_CORNER_KEY, new double[] {0.94, 0.54})); double width = config.getDouble(BOX_WIDTH_KEY, 0.2); double height = config.getDouble(BOX_HEIGHT_KEY, 0.1); _curveTitleAttributes = (TextAttributes) Factory.create( config.getNode(CURVE_TITLE_ATTRIBUTES_KEY)); _xSymbol = corner.getX() - width + config.getDouble(LEFT_DISTANCE_KEY, 0.01); _yBase = corner.getY() - config.getDouble(TOP_DISTANCE_KEY, 0.04); _yLastRow = corner.getY() - height + config.getDouble(BOTTOM_DISTANCE_KEY, 0.02); _length = config.getDouble(LINE_LENGTH_KEY, 0.035); _size = config.getDouble(SYMBOL_SIZE_KEY, 0.01); _xText = _xSymbol + _length + config.getDouble(CURVE_TITLE_DISTANCE_KEY, 0.005); _box = new GraphicalComposite(null); double xCenter = corner.getX() - width / 2; _box.addElement(new Rectangle( new GraphPoint(xCenter, corner.getY() - height / 2), width, height, (GraphicAttributes) Factory.create( config.getNode(BOX_ATTRIBUTES_KEY)))); _box.addElement(new Text( new GraphPoint(xCenter, corner.getY() - config.getDouble(TITLE_DISTANCE_KEY, 0.005)), config.get(TITLE_KEY, "Legend"), (TextAttributes) Factory.create( config.getNode(TITLE_ATTRIBUTES_KEY)))); } private ConfigParameters mergeWithDefaultConfig(ConfigParameters config) { Properties p = new Properties(); p.put(BOX_ATTRIBUTES_KEY + '/' + Factory.CLASS_NAME_KEY, ShapeAttributes.class.getName()); p.put(BOX_ATTRIBUTES_KEY + '/' + ShapeAttributes.FILL_COLOR_KEY, "0xffffff"); p.put(BOX_ATTRIBUTES_KEY + '/' + ShapeAttributes.LINE_COLOR_KEY, "0"); p.put(TITLE_ATTRIBUTES_KEY + '/' + Factory.CLASS_NAME_KEY, BasicGraphicAttributes.class.getName()); p.put(TITLE_ATTRIBUTES_KEY + '/' + BasicGraphicAttributes.HORIZONTAL_ANCHOR_KEY, "center"); p.put(TITLE_ATTRIBUTES_KEY + '/' + BasicGraphicAttributes.VERTICAL_ANCHOR_KEY, "top"); p.put(CURVE_TITLE_ATTRIBUTES_KEY + '/' + Factory.CLASS_NAME_KEY, BasicGraphicAttributes.class.getName()); ConfigData cd = new PropertiesBasedConfigData(p); cd = new ConfigParametersBasedConfigData(config, new ConfigParameters(cd)); return new ConfigParameters(cd); } /** * Returns the legend box with title but without legend symbols and curve * titles. */ public GraphicalElement getBox() { return _box; } /** * Creates the symbol part of a legend symbol. * @param curveIndex Index of the curve. Will be needed to calculate the * y-coordinate of the symbol. * @param numberOfCurves Number of curves. Will be needed to calculate the * y-coordinate of the symbol. * @param factory Factory for the symbol part of the legend symbol. * Can be null. * @param withLine true if the line part of the legend symbol * should be created. * @param lineAttributes Attributes of the line part. */ public GraphicalElement createSymbol(int curveIndex, int numberOfCurves, SymbolFactory factory, boolean withLine, GraphicAttributes lineAttributes) { GraphicalComposite result = new GraphicalComposite(null); double y = calculateBaseLine(curveIndex, numberOfCurves); if (withLine) { Polygon line = new Polygon(lineAttributes, false); line.addPoint(new GraphPoint(_xSymbol, y)); line.addPoint(new GraphPoint(_xSymbol + _length, y)); result.addElement(line); } if (factory != null) { result.addElement(factory.createLegendSymbol( new GraphPoint(_xSymbol + _length / 2, y), _size)); } return result; } private double calculateBaseLine(int curveIndex, int numberOfCurves) { if (numberOfCurves > 1) { return _yBase + ((_yLastRow - _yBase) / (numberOfCurves - 1)) * curveIndex; } else { return 0.5 * (_yBase + _yLastRow); } } /** * Creates the title part of a legend symbol. * @param curveIndex Index of the curve. Will be needed to calculate the * y-coordinate of the title. * @param numberOfCurves Number of curves. Will be needed to calculate the * y-coordinate of the symbol. * @param title Title text. */ public GraphicalElement createCurveTitle(int curveIndex, int numberOfCurves, String title) { return new Text(new GraphPoint(_xText, calculateBaseLine(curveIndex, numberOfCurves)), title, _curveTitleAttributes); } } plantuml-1.2017.15/src/jcckit/plot/Plot.java000066400000000000000000000340571312650303100204640ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import java.util.Vector; import jcckit.data.DataCurve; import jcckit.data.DataEvent; import jcckit.data.DataListener; import jcckit.data.DataPlot; import jcckit.data.DataPoint; import jcckit.graphic.ClippingShape; import jcckit.graphic.GraphPoint; import jcckit.graphic.GraphicalComposite; import jcckit.graphic.GraphicalElement; import jcckit.transformation.Transformation; import jcckit.util.ConfigParameters; import jcckit.util.Factory; /** * A plot is determined by a {@link CoordinateSystem}, {@link Curve Curves}, * an optional annotation layer and an optional {@link Legend}. When rendered * these components are draw in this order. *

* Registrated {@link PlotListener PlotListeners} will be informed * when the plot changes. *

* A {@link DataPlot} can be connected with a Plot instance. * This is done with the method {@link #connect connect()} which registrates * this Plot instance as * a {@link DataListener} at the connected DataPlot. * After an received {@link DataEvent DataEvents} has been handled * the registrated PlotListeners will receive a * {@link PlotEvent} of the type {@link PlotEventType#DATA_PLOT_CHANGED}. * * @author Franz-Josef Elmer */ public class Plot implements DataListener { /** Configuration parameter key. */ public static final String COORDINATE_SYSTEM_KEY = "coordinateSystem", CURVE_FACTORY_KEY = "curveFactory", LEGEND_VISIBLE_KEY = "legendVisible", LEGEND_KEY = "legend", INITIAL_HINT_FOR_NEXT_CURVE_KEY = "initialHintForNextCurve"; private final Vector _plotListeners = new Vector(); private DataPlot _dataPlot; private final CurveFactory _curveFactory; private final Vector _curves = new Vector(); private final Vector _nextCurveHints = new Vector(); private final Hint _initialHintForNextCurve; private final Legend _legend; private final boolean _legendVisibility; private GraphicalElement _coordinateSystemView; private ClippingShape _clippingShape; private Transformation _transformation; private GraphicalElement _annotation; private GraphicalComposite _legendView = new GraphicalComposite(null); /** * Creates an instance from the specified configuration parameters. * * * * * * * * * * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
coordinateSystem = {@link CartesianCoordinateSystem}ConfigParametersnoDefinition of the {@link CoordinateSystem}.
curveFactory = {@link SimpleCurveFactory}ConfigParametersnoDefinition of the {@link CurveFactory}.
initialHintForNextCurve = nullConfigParametersnoDefinition of the initial {@link Hint} which is needed by some * {@link SymbolFactory SymbolFactories} like {@link BarFactory}. *
legend = default values of {@link Legend}ConfigParametersnoConfiguration parameters of a {@link Legend}.
legendVisible = truebooleannoIf true the {@link Legend} will be created.
*/ public Plot(ConfigParameters config) { CoordinateSystem coordinateSystem = (CoordinateSystem) Factory.create( config.getNode(COORDINATE_SYSTEM_KEY), CartesianCoordinateSystem.class.getName()); setCoordinateSystem(coordinateSystem); _curveFactory = (CurveFactory) Factory.create( config.getNode(CURVE_FACTORY_KEY), SimpleCurveFactory.class.getName()); _initialHintForNextCurve = (Hint) Factory.createOrGet( config.getNode(INITIAL_HINT_FOR_NEXT_CURVE_KEY), null); _legend = new Legend(config.getNode(LEGEND_KEY)); _legendVisibility = config.getBoolean(LEGEND_VISIBLE_KEY, true); } /** * Sets the coordinate system. All curves will be regenerated and a * {@link PlotEvent} of type {@link PlotEventType#COODINATE_SYSTEM_CHANGED} * will be fired. * * @param coordinateSystem New coordinate system. */ public void setCoordinateSystem(CoordinateSystem coordinateSystem) { _coordinateSystemView = coordinateSystem.getView(); _clippingShape = coordinateSystem.getClippingShape(); _transformation = coordinateSystem.getTransformation(); if (_dataPlot != null) { generateCurves(_dataPlot); } notifyListeners( new PlotEvent(this, PlotEventType.COODINATE_SYSTEM_CHANGED, null)); } /** * Adds the specified {@link PlotListener}. Does nothing if * already added. */ public void addPlotListener(PlotListener listener) { if (!_plotListeners.contains(listener)) { _plotListeners.addElement(listener); } } /** * Removes the specfied {@link PlotListener}. Does nothing if * already removed. */ public void removePlotListener(PlotListener listener) { _plotListeners.removeElement(listener); } /** * Sends all registrated {@link PlotListener PlotListeners} * the specified event. */ protected void notifyListeners(PlotEvent event) { for (int i = 0, n = _plotListeners.size(); i < n; i++) { ((PlotListener) _plotListeners.elementAt(i)).plotChanged(event); } } /** * Connect the specified {@link DataPlot} with this instance. *

* If this Plot instance is already connected with a * DataPlot the connection will be released and a * {@link PlotEvent} of the type {@link PlotEventType#DATA_PLOT_DISCONNECTED} * will be sent to all registrated {@link PlotListener PlotListeners}. *

* It registers itself at dataPlot and * all its {@link DataCurve DataCurves}. *

* Finally all curves will be generated and a PlotEvent * of the type {@link PlotEventType#DATA_PLOT_CONNECTED} will be transmitted. * @param dataPlot Data to be connected with this plot instance. * Can be null in order to disconnect this instance from * any DataPlot. */ public void connect(DataPlot dataPlot) { if (_dataPlot != null) { _dataPlot.removeDataListener(this); notifyListeners(new PlotEvent(this, PlotEventType.DATA_PLOT_DISCONNECTED, _dataPlot)); } _dataPlot = dataPlot; if (_dataPlot != null) { _dataPlot.addDataListener(this); generateCurves(_dataPlot); notifyListeners(new PlotEvent(this, PlotEventType.DATA_PLOT_CONNECTED, _dataPlot)); } } /** * Transforms a point from device-independent coordinates into * data coordinates. * @param point Point in device-independent coordinates. * @return transform point. */ public DataPoint transform(GraphPoint point) { return _transformation.transformToData(point); } /** * Creates a graphical representation of the complete plot. * @return GraphicalComposite containing the views of the * coordinate system, the curves, and optionally the legend (in this order). */ public GraphicalComposite getCompletePlot() { GraphicalComposite result = new GraphicalComposite(null); result.addElement(_coordinateSystemView); GraphicalElement[] curves = getCurves(); for (int i = 0; i < curves.length; i++) { result.addElement(curves[i]); } if (_annotation != null) { result.addElement(_annotation); } if (_legendVisibility) { result.addElement(getLegend()); } return result; } /** Returns the view of the coordinate system. */ public GraphicalElement getCoordinateSystem() { return _coordinateSystemView; } /** Returns the graphical representations of all curves. */ public GraphicalElement[] getCurves() { synchronized (_curves) { GraphicalElement[] curves = new GraphicalElement[_curves.size()]; for (int i = 0; i < curves.length; i++) { curves[i] = ((Curve) _curves.elementAt(i)).getView(); } return curves; } } /** * Returns the annotation layer. * @return null if no annotation layer. */ public GraphicalElement getAnnotation() { return _annotation; } /** * Sets the annotation layer. * @param annotation Any kind of graphics which will be drawn on the * top of the curves but may be covered by the legend. * Can be null. */ public void setAnnotation(GraphicalElement annotation) { _annotation = annotation; } /** Returns true if the legend is visible. */ public boolean isLegendVisible() { return _legendVisibility; } /** Returns the graphical representations of the legend. */ public GraphicalElement getLegend() { return _legendView; } /** * Handles the received {@link DataEvent} and notifies * {@link PlotListener PlotListeners} by an event of the type * {@link PlotEventType#DATA_CURVE_CHANGED} or * {@link PlotEventType#DATA_PLOT_CHANGED}. The following table shows what * this method does: * * * * * * * *
Source of eventAll hints for the next curve are null?ActionType of sent {@link PlotEvent}
{@link DataCurve}YesRecreate changed curve. * DATA_CURVE_CHANGED
{@link DataCurve}NoRecreate changed curve * and all curves with large curve index. * DATA_PLOT_CHANGED
{@link DataPlot}-Recreate all curves * and {@link Legend} view. * DATA_PLOT_CHANGED
*/ public void dataChanged(DataEvent event) { Integer index = new Integer(0); PlotEventType type = PlotEventType.DATA_PLOT_CHANGED; synchronized (_curves) { int numberOfCurves = _curves.size(); if (event.getContainer() instanceof DataCurve && numberOfCurves == _dataPlot.getNumberOfElements()) { DataCurve curve = (DataCurve) event.getContainer(); index = new Integer(curve.getContainer().getIndexOf(curve)); type = PlotEventType.DATA_CURVE_CHANGED; fillCurve(index.intValue(), curve); if (index.intValue() < numberOfCurves - 1) { Vector curveHints = (Vector) _nextCurveHints.elementAt(index.intValue()); for (int i = 0, n = curveHints.size(); i < n; i++) { if (curveHints.elementAt(i) != null) { type = PlotEventType.DATA_PLOT_CHANGED; for (int j = index.intValue()+1; j < numberOfCurves; j++) { fillCurve(j, (DataCurve) _dataPlot.getElement(j)); } break; } } } } else { generateCurves(_dataPlot); } } notifyListeners(new PlotEvent(Plot.this, type, index)); } /** * Generates all curves based on the specified data. * In addition the legend view is created. */ private void generateCurves(DataPlot dataPlot) { synchronized (_curves) { _legendView = new GraphicalComposite(null); _legendView.addElement(_legend.getBox()); _curves.setSize(0); _nextCurveHints.setSize(0); for (int i = 0, n = dataPlot.getNumberOfElements(); i < n; i++) { Curve curve = _curveFactory.create(i, n, _clippingShape, _legend); _curves.addElement(curve); _nextCurveHints.addElement(new Vector()); DataCurve dataCurve = (DataCurve) dataPlot.getElement(i); _legendView.addElement(curve.getLegendSymbol()); _legendView.addElement( _legend.createCurveTitle(i, n, dataCurve.getTitle())); fillCurve(i, dataCurve); } } } private void fillCurve(int curveIndex, DataCurve dataCurve) { Vector curveHints = (Vector) _nextCurveHints.elementAt(curveIndex); Curve curve = (Curve) _curves.elementAt(curveIndex); curve.removeAllPoints(); for (int i = 0, n = dataCurve.getNumberOfElements(); i < n; i++) { setHintForNextCurve(curveHints, i, curve.addPoint(_transformation.transformToGraph( (DataPoint) dataCurve.getElement(i)), getHintForNextCurve(curveIndex - 1, i))); } } private Hint getHintForNextCurve(int curveIndex, int pointIndex) { Hint result = _initialHintForNextCurve; if (curveIndex >= 0) { Vector curveHints = (Vector) _nextCurveHints.elementAt(curveIndex); result = pointIndex < curveHints.size() ? (Hint) curveHints.elementAt(pointIndex) : getHintForNextCurve(curveIndex - 1, pointIndex); } return result; } private void setHintForNextCurve(Vector curveHints, int pointIndex, Hint hint) { while (curveHints.size() <= pointIndex) { curveHints.addElement(_initialHintForNextCurve); } curveHints.setElementAt(hint, pointIndex); } } plantuml-1.2017.15/src/jcckit/plot/PlotCanvas.java000066400000000000000000000105611312650303100216120ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.data.DataPlot; import jcckit.graphic.Anchor; import jcckit.graphic.ClippingRectangle; import jcckit.util.ConfigParameters; /** * An abstract canvas containg a single {@link Plot}. The canvas is specified * by a {@link ClippingRectangle}, called paper. A horizontal and * vertical {@link Anchor} determine the position of the paper on the actual * device. * * @author Franz-Josef Elmer */ public class PlotCanvas implements PlotListener { /** Configuration parameter key. */ public static final String PAPER_KEY = "paper", HORIZONTAL_ANCHOR_KEY = "horizontalAnchor", VERTICAL_ANCHOR_KEY = "verticalAnchor", PLOT_KEY = "plot"; private final ClippingRectangle _paper; private final Anchor _horizontalAnchor; private final Anchor _verticalAnchor; private final Plot _plot; /** * Creates an instance from the specified configuration parameters. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
horizontalAnchor = centerStringnoHorizontal position of the paper relative to the device border. * Possible values are left, center, and * right.
paper = 0, 0, 1, 0.6double[]noRectangle defining the paper. The first two values determine the x- * and y- coordinates (in device-independent units) of the lower-left * corner. The last two values determine the upper-right corner.
plot = default values of {@link Plot}ConfigParametersnoDefinition of the {@link Plot}.
verticalAnchor = centerStringnoVertical position of the paper relative to the device border. * Possible values are top, center, and * bottom.
*

* Note, that this instance registers itself at the wrapped {@link Plot} * instance. */ public PlotCanvas(ConfigParameters config) { double[] paper = config.getDoubleArray(PAPER_KEY, new double[] { 0, 0, 1, 0.6 }); _paper = new ClippingRectangle(paper[0], paper[1], paper[2], paper[3]); _horizontalAnchor = Anchor.getHorizontalAnchor(config, HORIZONTAL_ANCHOR_KEY, Anchor.CENTER); _verticalAnchor = Anchor.getVerticalAnchor(config, VERTICAL_ANCHOR_KEY, Anchor.CENTER); _plot = new Plot(config.getNode(PLOT_KEY)); _plot.addPlotListener(this); } /** Returns the paper definition. */ public ClippingRectangle getPaper() { return _paper; } /** Returns the horizontal anchor. */ public Anchor getHorizontalAnchor() { return _horizontalAnchor; } /** Returns the vertical anchor. */ public Anchor getVerticalAnchor() { return _verticalAnchor; } /** Returns the plot. */ public Plot getPlot() { return _plot; } /** * Connects the wrapped {@link Plot} instance with the specified * {@link DataPlot}. * * @param dataPlot * Data to be connected with this plot canvas. Can be * null in order to disconnect this instance from a * DataPlot. */ public void connect(DataPlot dataPlot) { _plot.connect(dataPlot); } /** * Handles the spcified event. Here nothing is done. But subclass may * override this method. */ public void plotChanged(PlotEvent event) { } } plantuml-1.2017.15/src/jcckit/plot/PlotEvent.java000066400000000000000000000064151312650303100214630ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; /** * A plot event signales some changes of a {@link Plot}. * It has three attributes: *

  • source: Indicates the Plot instance responsible * for this event. *
  • type: The type of event. *
  • message: The message object. Its meaning depends on the * type of event: * * * * * * * * *
    TypeMeaning of the message object
    {@link PlotEventType#DATA_PLOT_CONNECTED}, * {@link PlotEventType#DATA_PLOT_DISCONNECTED}The {@link jcckit.data.DataPlot} (dis)connected with the * {@link Plot} instance specified by the source.
    {@link PlotEventType#DATA_PLOT_CHANGED}An Integer indicating the lowest index of * those curves which have been changed.
    {@link PlotEventType#DATA_CURVE_CHANGED}An Integer indicating the index of the curve * which has been changed.
    *
* * * @author Franz-Josef Elmer */ public class PlotEvent { private final Plot _source; private final PlotEventType _type; private final Object _message; /** * Creates a new event for the specified source, type, and message. * @param source Plot causing this event. * @param type Type of the event. Possible values are * {@link PlotEventType#DATA_PLOT_CHANGED}, * {@link PlotEventType#DATA_CURVE_CHANGED}, * {@link PlotEventType#DATA_PLOT_CONNECTED}, and * {@link PlotEventType#DATA_PLOT_DISCONNECTED}. * @param message Message object. Can be null */ public PlotEvent(Plot source, PlotEventType type, Object message) { _source = source; _type = type; _message = message; } /** Returns the source of this event. */ public Plot getSource() { return _source; } /** * Returns the event type. * @return either {@link PlotEventType#DATA_PLOT_CHANGED}, * {@link PlotEventType#DATA_CURVE_CHANGED}, * {@link PlotEventType#DATA_PLOT_CONNECTED}, or * {@link PlotEventType#DATA_PLOT_DISCONNECTED}. */ public PlotEventType getType() { return _type; } /** Returns the message object. */ public Object getMessage() { return _message; } } plantuml-1.2017.15/src/jcckit/plot/PlotEventType.java000066400000000000000000000027101312650303100223170ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; /** * Types of {@link PlotEvent PlotEvents}. Using the typesafe enumeration * pattern. * * @author Franz-Josef Elmer */ public class PlotEventType { /** Event type. */ public static final PlotEventType DATA_PLOT_CONNECTED = new PlotEventType(), DATA_PLOT_DISCONNECTED = new PlotEventType(), COODINATE_SYSTEM_CHANGED = new PlotEventType(), DATA_CURVE_CHANGED = new PlotEventType(), DATA_PLOT_CHANGED = new PlotEventType(); private PlotEventType() {} } plantuml-1.2017.15/src/jcckit/plot/PlotListener.java000066400000000000000000000021061312650303100221600ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; /** * Listener for changes of plots, diagrams, and charts. * * @author Franz-Josef Elmer */ public interface PlotListener { /** Receives the specified plot event.*/ public void plotChanged(PlotEvent event); } plantuml-1.2017.15/src/jcckit/plot/PositionHint.java000066400000000000000000000050161312650303100221660ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.graphic.GraphPoint; import jcckit.util.ConfigParameters; /** * An immutable {@link Hint} capsulating two {@link GraphPoint GraphPoints}. * * @author Franz-Josef Elmer */ public class PositionHint implements Hint { /** Configuration parameter key. */ public static final String POSITION_KEY = "position", ORIGIN_KEY = "origin"; private final GraphPoint _position; private final GraphPoint _origin; /** * Creates an instance from the specified configuration parameters. * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
position = nulldouble[]noDefinition of position.
origin = position or (0,0) if position * undefineddouble[]noDefinition of origin.
*/ public PositionHint(ConfigParameters config) { double[] point = config.getDoubleArray(POSITION_KEY, null); _position = point == null ? null : new GraphPoint(point); _origin = new GraphPoint(config.getDoubleArray(ORIGIN_KEY, point)); } /** * Creates an instance based on two points. * @param origin The origin. * @param position The position. */ public PositionHint(GraphPoint origin, GraphPoint position) { _origin = origin; _position = position; } /** Returns the position. */ public GraphPoint getPosition() { return _position; } /** Returns the origin. */ public GraphPoint getOrigin() { return _origin; } } plantuml-1.2017.15/src/jcckit/plot/ShapeAttributesHint.java000066400000000000000000000130011312650303100234620ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import java.awt.Color; import jcckit.graphic.GraphicAttributes; import jcckit.graphic.ShapeAttributes; import jcckit.util.ConfigParameters; /** * An {@link AttributesHint} which wraps {@link ShapeAttributes}. * Each call of {@link #getNextHint()} returns a new instance of * ShapeAttributes where fill color, line color and/or * line thickness has been increased by a constant amount. * * @author Franz-Josef Elmer */ public class ShapeAttributesHint implements AttributesHint, Cloneable { /** Configuration parameter key. */ public static final String INITIAL_ATTRIBUTES_KEY = "initialAttributes", FILL_COLOR_HSB_INCREMENT_KEY = "fillColorHSBIncrement", LINE_COLOR_HSB_INCREMENT_KEY = "lineColorHSBIncrement", LINE_THICKNESS_INCREMENT_KEY = "lineThicknessIncrement"; private static float[] extractHSB(Color color) { return color == null ? null : Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null); } private static Color createColor(float[] colorHSB) { return colorHSB == null ? null : Color.getHSBColor(colorHSB[0], colorHSB[1], colorHSB[2]); } private static float[] incrementColor(float[] colorHSB, double[] increments) { float[] result = null; if (colorHSB != null) { result = (float[]) colorHSB.clone(); for (int i = 0; i < 3; i++) { result[i] += increments[i]; } } return result; } private float[] _fillColorHSB; private float[] _lineColorHSB; private double _lineThickness; private double[] _linePattern; private double[] _fillColorHSBIncrement; private double[] _lineColorHSBIncrement; private double _lineThicknessIncrement; /** * Creates an instance from the specified configuration parameters. * * * * * * * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
initialAttributes = default values of * {@link ShapeAttributes}ConfigParametersnoInitial values of shape attributes. Note, that default * fill and line colors are undefined (they depend on the * Renderer). In this case color increments have no effects. *
fillColorHSBIncrement = 0 0 0double[]noHue, saturation, and brightness increments of the fill color. *
lineColorHSBIncrement = 0 0 0double[]noHue, saturation, and brightness increments of the line color. *
lineThicknessIncrement = 0doublenoLine thickness increment.
*/ public ShapeAttributesHint(ConfigParameters config) { ShapeAttributes attributes = new ShapeAttributes(config.getNode(INITIAL_ATTRIBUTES_KEY)); _fillColorHSB = extractHSB(attributes.getFillColor()); _lineColorHSB = extractHSB(attributes.getLineColor()); _lineThickness = attributes.getLineThickness(); _linePattern = attributes.getLinePattern(); _fillColorHSBIncrement = config.getDoubleArray(FILL_COLOR_HSB_INCREMENT_KEY, new double[3]); _lineColorHSBIncrement = config.getDoubleArray(LINE_COLOR_HSB_INCREMENT_KEY, new double[3]); _lineThicknessIncrement = config.getDouble(LINE_THICKNESS_INCREMENT_KEY, 0); } /** * Creates a new ShapeAttributesHint where all attributes has been * incremented. */ public AttributesHint getNextHint() { ShapeAttributesHint nextHint = null; try { nextHint = (ShapeAttributesHint) clone(); } catch (CloneNotSupportedException e) {} nextHint._fillColorHSB = incrementColor(_fillColorHSB, _fillColorHSBIncrement); nextHint._lineColorHSB = incrementColor(_lineColorHSB, _lineColorHSBIncrement); nextHint._lineThickness = Math.max(0, _lineThickness + _lineThicknessIncrement); return nextHint; } /** Returns the wrapped {@link ShapeAttributes} instance. */ public GraphicAttributes getAttributes() { return new ShapeAttributes(createColor(_fillColorHSB), createColor(_lineColorHSB), _lineThickness, _linePattern); } } plantuml-1.2017.15/src/jcckit/plot/SimpleCurve.java000066400000000000000000000171611312650303100220010ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import java.awt.Color; import jcckit.graphic.ClippingShape; import jcckit.graphic.GraphPoint; import jcckit.graphic.GraphicalComposite; import jcckit.graphic.GraphicalElement; import jcckit.graphic.LineAttributes; import jcckit.graphic.Polygon; import jcckit.graphic.ShapeAttributes; import jcckit.util.ConfigParameters; import jcckit.util.Factory; /** * A simple curve is the basic implementation of the {@link Curve} interface. * * @author Franz-Josef Elmer */ public class SimpleCurve implements Curve { /** Configuration parameter key. */ public static final String SYMBOL_FACTORY_KEY = "symbolFactory", WITH_LINE_KEY = "withLine", SOFT_CLIPPING_KEY = "softClipping", LINE_ATTRIBUTES_KEY = "lineAttributes", INITIAL_HINT_FOR_NEXT_POINT_KEY = "initialHintForNextPoint"; private final ClippingShape _clippingShape; private final SymbolFactory _symbolFactory; private final GraphicalComposite _symbols; private final GraphicalComposite _completeCurve; private final GraphicalElement _legendSymbol; private final Hint _initialHintForNextPoint; private final Polygon _curve; private final boolean _softClipping; private Hint _hintForNextPoint; /** * Creates a new curve. The parameter config contains: * * * * * * * * * * * * * * * * * * *
Key & Default ValueTypeMandatoryDescription
initialHintForNextPoint = nullConfigParametersnoDefinition of an initial {@link Hint} for the first curve point. *
lineAttributes = a {@link ShapeAttributes} * instances with default values and line colors based on * the formula Color.getHSBColor(curveIndex/6,1,0.8)ConfigParametersnoConfiguration parameters of an instances of * {@link jcckit.graphic.GraphicAttributes} for the * {@link Polygon Polygons} connecting curve points.
symbolFactory = nullConfigParametersnoConfiguration parameters defining an instances of * {@link SymbolFactory} for the {@link Symbol Symbols} * decorating curve points.
softClipping = truebooleannoIf true no explicit clipping takes * place but the symbol is not drawn if the corresponding curve * point is outside the axis box.
* If false the symbol is * drawn in any case but it may be clipped by the axis box. * Soft-clipping should be set to false if the * symbols are not located around the curve point (like for bars). *
withLine = truebooleannoIf true curve points are connected by a * {@link jcckit.graphic.Polygon}.
* @param config Configuration parameters described above. * @param curveIndex Index of this curve in the collection of curves * defining a {@link Plot}. * @param numberOfCurves Number of curves in this collection. * @param clippingShape Clipping shape. Can be null. * @param legend Legend. Will be used to calculate the legend symbol. * @throws IllegalArgumentException if symbolFactory == null and * withLine == false. * */ public SimpleCurve(ConfigParameters config, int curveIndex, int numberOfCurves, ClippingShape clippingShape, Legend legend) { _symbolFactory = (SymbolFactory) Factory.createOrGet( config.getNode(SYMBOL_FACTORY_KEY), null); boolean withLine = config.getBoolean(WITH_LINE_KEY, true); LineAttributes lineAttributes = (LineAttributes) Factory.createOrGet( config.getNode(LINE_ATTRIBUTES_KEY), new ShapeAttributes(null, Color.getHSBColor((curveIndex % 6) / 6f, 1f, 0.8f), 0, null)); if (_symbolFactory != null || withLine) { _clippingShape = clippingShape; _completeCurve = new GraphicalComposite(null); if (withLine) { GraphicalComposite container = new GraphicalComposite(clippingShape); _curve = new Polygon(lineAttributes, false); container.addElement(_curve); _completeCurve.addElement(container); } else { _curve = null; } _softClipping = config.getBoolean(SOFT_CLIPPING_KEY, true); if (_symbolFactory != null) { _symbols = new GraphicalComposite(_softClipping ? null : clippingShape); _completeCurve.addElement(_symbols); } else { _symbols = null; } } else { throw new IllegalArgumentException( "Either a SymbolFactory must exist or withLines == true."); } _hintForNextPoint = _initialHintForNextPoint = (Hint) Factory.createOrGet( config.getNode(INITIAL_HINT_FOR_NEXT_POINT_KEY), null); _legendSymbol = legend.createSymbol(curveIndex, numberOfCurves, _symbolFactory, withLine, lineAttributes); } /** * Returns the graphical representation of a curve. * @return always the same instance. */ public GraphicalElement getView() { return _completeCurve; } /** Returns the legend symbol. */ public GraphicalElement getLegendSymbol() { return _legendSymbol; } /** Appends a new point to the curve if inside the clipping shape. */ public Hint addPoint(GraphPoint point, Hint hintFromPreviousCurve) { if (_curve != null) { _curve.addPoint(point); } Hint hintForNextCurve = hintFromPreviousCurve; if (_symbolFactory != null) { Symbol symbol = _symbolFactory.createSymbol(point, _hintForNextPoint, hintFromPreviousCurve); if (_clippingShape == null || !_softClipping || _clippingShape.isInside(point)) { _symbols.addElement(symbol.getSymbol()); } _hintForNextPoint = symbol.getHintForNextPoint(); hintForNextCurve = symbol.getHintForNextCurve(); } return hintForNextCurve; } public void removeAllPoints() { if (_curve != null) { _curve.removeAllPoints(); } if (_symbols != null) { _symbols.removeAllElements(); } _hintForNextPoint = _initialHintForNextPoint; } } plantuml-1.2017.15/src/jcckit/plot/SimpleCurveFactory.java000066400000000000000000000062601312650303100233270ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import java.util.Properties; import java.util.StringTokenizer; import jcckit.graphic.ClippingShape; import jcckit.util.ConfigParameters; import jcckit.util.PropertiesBasedConfigData; /** * Factory for {@link SimpleCurve SimpleCurves}. * * @author Franz-Josef Elmer */ public class SimpleCurveFactory implements CurveFactory { /** Configuration parameter key. */ public static final String DEFINITIONS_KEY = "definitions"; private ConfigParameters[] _configs = new ConfigParameters[] {new ConfigParameters(new PropertiesBasedConfigData(new Properties()))}; /** * Creates an instance from the specified configuration parameter. * * * * * * *
Key & Default ValueTypeMandatoryDescription
definitions = one empty ConfigParameters * instanceString[]noKeys of subtrees defining {@link ConfigParameters} * used by the {@link SimpleCurve#SimpleCurve constructor} of * {@link SimpleCurve}.
*/ public SimpleCurveFactory(ConfigParameters config) { String value = config.get(DEFINITIONS_KEY, null); if (value != null) { StringTokenizer tokenizer = new StringTokenizer(value); _configs = new ConfigParameters[tokenizer.countTokens()]; for (int i = 0; i < _configs.length; i++) { _configs[i] = config.getNode(tokenizer.nextToken()); } } } /** * Creates an instance of {@link SimpleCurve}. * @param curveIndex Index of the curve. Will be used to select the * {@link ConfigParameters} object and the line attributes. * In addition it will be used to calculate the y-coordinate * of the legend symbol. * @param numberOfCurves Number of curves. Will be needed to calculate * the y-coordinate of the legend symbol. * @param clippingShape The clipping shape. * @param legend The legend. Will be needed to create the legend symbol. */ public Curve create(int curveIndex, int numberOfCurves, ClippingShape clippingShape, Legend legend) { return new SimpleCurve(_configs[curveIndex % _configs.length], curveIndex, numberOfCurves, clippingShape, legend); } } plantuml-1.2017.15/src/jcckit/plot/SquareSymbolFactory.java000066400000000000000000000040151312650303100235130ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.graphic.GraphPoint; import jcckit.graphic.GraphicAttributes; import jcckit.graphic.GraphicalElement; import jcckit.graphic.Rectangle; import jcckit.util.ConfigParameters; /** * A factory of square symbols. * * @author Franz-Josef Elmer */ public class SquareSymbolFactory extends AbstractSymbolFactory { /** * Creates an instance from the specified configuration parameters. * For the configuration parameters see the * * constructor of the superclass {@link AbstractSymbolFactory}. */ public SquareSymbolFactory(ConfigParameters config) { super(config); } /** * Creates a {@link Rectangle}. * @param centerPosition Position of the center of the rectangle. * @param size Diameter of the rectangle. * @param attributes Rectangle attributes. */ protected GraphicalElement createPlainSymbol(GraphPoint centerPosition, double size, GraphicAttributes attributes) { return new Rectangle(centerPosition, size, size, attributes); } } plantuml-1.2017.15/src/jcckit/plot/Symbol.java000066400000000000000000000034411312650303100210040ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.graphic.GraphicalElement; /** * Immutable class holding the graphical represention of the symbol and * two {@link Hint Hints}. * * @author Franz-Josef Elmer */ public class Symbol { private final GraphicalElement _symbol; private final Hint _hintForNextPoint; private final Hint _hintForNextCurve; /** Creates an instance for the specified symbol and hints. */ public Symbol(GraphicalElement symbol, Hint hintForNextPoint, Hint hintForNextCurve) { _symbol = symbol; _hintForNextPoint = hintForNextPoint; _hintForNextCurve = hintForNextCurve; } /** Returns the graphical symbol. */ public GraphicalElement getSymbol() { return _symbol; } /** Returns the hint for the next point. */ public Hint getHintForNextPoint() { return _hintForNextPoint; } /** Returns the hint for the next curve. */ public Hint getHintForNextCurve() { return _hintForNextCurve; } } plantuml-1.2017.15/src/jcckit/plot/SymbolFactory.java000066400000000000000000000054001312650303100223310ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.graphic.GraphPoint; import jcckit.graphic.GraphicalElement; /** * Interface of a symbol factory. A symbol is a {@link GraphicalElement} * or {@link jcckit.graphic.GraphicalComposite}. A symbol factory creates * the same type of symbols. In general, they have all the same size. * But they are distinguished from each other by their positions. * In addition they may also differ in other properties which will * be determined by {@link Hint Hints}. * * @author Franz-Josef Elmer */ public interface SymbolFactory { /** Common configuration parameter key need by implementing classes. */ public static final String SIZE_KEY = "size", ATTRIBUTES_KEY = "attributes"; /** Default size of a symbol = 0.01. */ public static final double DEFAULT_SIZE = 0.01; /** * Creates a symbol for the specified point taking into account * the specified hints. * @param point The position of the symbol. In general it is a transformation * of a corresponding {@link jcckit.data.DataPoint} into a * {@link GraphPoint}. * @param hintFromPreviousPoint Hint from the previous point of the same * {@link Curve} or null. * @param hintFromPreviousCurve Hint from the previous * {@link Curve} or null. */ public Symbol createSymbol(GraphPoint point, Hint hintFromPreviousPoint, Hint hintFromPreviousCurve); /** * Creates a symbol for the legend at the specified position. * @param centerPosition Center position of the symbol. * @param size The size of the symbol. Will not be used if the symbol * of the curve points have all the same size. In this case * the symbol for the legend has the size of the curve symbols. */ public GraphicalElement createLegendSymbol(GraphPoint centerPosition, double size); } plantuml-1.2017.15/src/jcckit/plot/TicLabelMap.java000066400000000000000000000113011312650303100216460ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import java.util.StringTokenizer; import jcckit.util.ConfigParameters; import jcckit.util.TicLabelFormat; /** * Map of number intervals onto a text label. The map is defined by a * map description string provided by configuration data. *

* The map description is a list * of conditions separated by ';'. The conditions are tested from left to * right until a condition is fulfilled for the tic value. If no condition * is fullfilled a '?' will be returned. *

* A condition description has one of the following forms: *

<label>
*
<number>=<label>
*
<number1>:<number2>=<label>
*

* The first type of condition is always fulfilled. It will return * <label>. This is a kind of else condtion * which is put at the end of the condition list. *

* The second form maps a particular number onto a label. In order to be * equal with the sepcified number the tic value should not deviate more * than 1 ppm (part per millions) from <number>. *

* The third form maps an interval onto a label. The condition reads *

* <number1> <= tic label < <number2> *

* Examples: *


 * 1=monday;2=tuesday;3=wednesday;4=thursday;5=friday;6=saturday;7=sunday 
 * 0.5:1.5=I; 1.5:2.5 = II; 2.5:3.5 = III; the rest 
 * 
* * @author Franz-Josef Elmer */ public class TicLabelMap implements TicLabelFormat { public static final String MAP_KEY = "map"; private static class MapItem { private double _min = Double.MIN_VALUE; private double _max = Double.MAX_VALUE; private final String label; public MapItem(String item) { int index = item.indexOf('='); if (index < 0) { label = item; } else { label = item.substring(index + 1).trim(); item = item.substring(0, index).trim(); index = item.indexOf(':'); if (index < 0) { _min = new Double(item).doubleValue(); _max = _min == 0 ? Double.MIN_VALUE : _min * 1.000001d; _min = _min * 0.999999d; if (_min > _max) { double z = _min; _min = _max; _max = z; } } else { _min = new Double(item.substring(0, index)).doubleValue(); _max = new Double(item.substring(index + 1)).doubleValue(); } } } public boolean isInside(double value) { return value >= _min && value < _max; } } private final MapItem[] _map; /** * Creates an instance from the specified configuration parameters. * * * * * * *
Key & Default ValueTypeMandatoryDescription
mapStringyesMap description as explained above.
*/ public TicLabelMap(ConfigParameters config) { StringTokenizer tokenizer = new StringTokenizer(config.get(MAP_KEY), ";"); _map = new MapItem[tokenizer.countTokens()]; for (int i = 0; i < _map.length; i++) { String item = tokenizer.nextToken(); try { _map[i] = new MapItem(item.trim()); } catch (NumberFormatException e) { throw new NumberFormatException("Item '" + item + "' of " + config.getFullKey(MAP_KEY) + " has an invalid number."); } } } /** * Maps the specified tic value onto a text label in accordance * with the map description. */ public String form(double ticValue) { String result = "?"; for (int i = 0; i < _map.length; i++) { if (_map[i].isInside(ticValue)) { result = _map[i].label; break; } } return result; } } plantuml-1.2017.15/src/jcckit/renderer/000077500000000000000000000000001312650303100175225ustar00rootroot00000000000000plantuml-1.2017.15/src/jcckit/renderer/Graphics2DRenderer.java000066400000000000000000000251411312650303100240050ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.renderer; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.Ellipse2D; import java.awt.geom.GeneralPath; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import jcckit.graphic.BasicGraphicalElement; import jcckit.graphic.ClippingRectangle; import jcckit.graphic.ClippingShape; import jcckit.graphic.FillAttributes; import jcckit.graphic.FontStyle; import jcckit.graphic.GraphPoint; import jcckit.graphic.GraphicAttributes; import jcckit.graphic.GraphicalComposite; import jcckit.graphic.GraphicalCompositeRenderer; import jcckit.graphic.LineAttributes; import jcckit.graphic.Oval; import jcckit.graphic.OvalRenderer; import jcckit.graphic.Polygon; import jcckit.graphic.PolygonRenderer; import jcckit.graphic.Rectangle; import jcckit.graphic.RectangleRenderer; import jcckit.graphic.Text; import jcckit.graphic.TextAttributes; import jcckit.graphic.TextRenderer; /** * Renderer who draws the {@link jcckit.graphic.GraphicalElement * GraphicalElements} into a java.awt.Graphics2D context. *

* The default color for lines and texts is determined by the current color of * the Graphics2D context when a new instance of * Graphics2DRenderer is created. *

* The default font is SansSerif-12. * * @author Franz-Josef Elmer */ public class Graphics2DRenderer implements GraphicalCompositeRenderer, PolygonRenderer, OvalRenderer, TextRenderer, RectangleRenderer { private static final int FS = 1; private static final String DEFAULT_FONT_NAME = "SansSerif"; private static final FontStyle DEFAULT_FONT_STYLE = FontStyle.NORMAL; private static final int DEFAULT_FONT_SIZE = 12; private Color _defaultColor; private Graphics2D _graphics; /** * Initializes this instance. During renderering the current transformation * will be leaved unchanged. But the current Clip may be cleared. * * @param graphics * Graphics2D context into which the * {@link BasicGraphicalElement BaiscGraphicalElements} are * painted. * @return this instance. */ public Graphics2DRenderer init(Graphics2D graphics) { _graphics = graphics; _defaultColor = graphics.getColor(); // the foreground color return this; } /** * Starts rendering of the specified composite. Does nothing except if * composite has a {@link ClippingShape}. In this case the Clip * of the Graphics2D context becomes the clipping rectangle * determined by the bounding box of the ClippingShape. */ public void startRendering(GraphicalComposite composite) { ClippingShape shape = composite.getClippingShape(); if (shape != null) { ClippingRectangle rect = shape.getBoundingBox(); _graphics.clip(new Rectangle2D.Double(rect.getMinX(), rect.getMinY(), rect.getMaxX() - rect.getMinX(), rect .getMaxY() - rect.getMinY())); } } /** * Finishes rendering of the specified composite. Does nothing except if * composite has a {@link ClippingShape}. In this case the Clip * of the Graphics2D context will be cleared. */ public void finishRendering(GraphicalComposite composite) { _graphics.setClip(null); } /** Paints the specified polygon into the Graphics2D context. */ public void render(Polygon polygon) { int numberOfPoints = polygon.getNumberOfPoints(); if (numberOfPoints > 0) { Color currentColor = _graphics.getColor(); GeneralPath p = new GeneralPath(GeneralPath.WIND_EVEN_ODD, numberOfPoints); p.moveTo((float) polygon.getPoint(0).getX(), (float) polygon.getPoint(0).getY()); for (int i = 1; i < numberOfPoints; i++) { p.lineTo((float) polygon.getPoint(i).getX(), (float) polygon.getPoint(i).getY()); } if (polygon.isClosed()) { p.closePath(); } drawShape(p, polygon, currentColor); } } /** * Paints the specified rectangle into the current Graphics * context. */ public void render(Rectangle rectangle) { Color currentColor = _graphics.getColor(); GraphPoint center = rectangle.getCenter(); double width = rectangle.getWidth(); double height = rectangle.getHeight(); Rectangle2D rect = new Rectangle2D.Double(center.getX() - 0.5 * width, center.getY() - 0.5 * height, width, height); drawShape(rect, rectangle, currentColor); } /** * Paints the specified oval into the current Graphics context. */ public void render(Oval oval) { Color currentColor = _graphics.getColor(); GraphPoint center = oval.getCenter(); double width = oval.getWidth(); double height = oval.getHeight(); Ellipse2D ellipse = new Ellipse2D.Double(center.getX() - 0.5 * width, center.getY() - 0.5 * height, width, height); drawShape(ellipse, oval, currentColor); } private void drawShape(Shape shape, BasicGraphicalElement element, Color backupColor) { GraphicAttributes attributes = element.getGraphicAttributes(); Color fillColor = null; if (element.isClosed() && attributes instanceof FillAttributes) { fillColor = ((FillAttributes) attributes).getFillColor(); } if (fillColor != null) { _graphics.setColor(fillColor); _graphics.fill(shape); } Color lineColor = _defaultColor; if (attributes instanceof LineAttributes) { LineAttributes la = (LineAttributes) attributes; BasicStroke stroke = new BasicStroke((float) la.getLineThickness()); double[] linePattern = la.getLinePattern(); if (linePattern != null) { float[] dash = new float[linePattern.length]; for (int i = 0; i < dash.length; i++) { dash[i] = (float) la.getLinePattern()[i]; } stroke = new BasicStroke(stroke.getLineWidth(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10f, dash, 0f); } _graphics.setStroke(stroke); if (la.getLineColor() != null || fillColor != null) { lineColor = la.getLineColor(); } } if (lineColor != null) { _graphics.setColor(lineColor); _graphics.draw(shape); } _graphics.setColor(backupColor); } /** * Paints the specified text into the current Graphics context. *

* If the font size is zero the default font size will be used. *

* If the orientation angle is unequal zero the text will first be painted * into an off-screen image and rotated. Finally, it will be drawn into the * current Graphics context. Note, that only integer multiples of * 90 degree rotation are performed. Other orientation angles will be * adjusted to the nearest integer multiple of 90 degree. */ public void render(Text text) { final GraphicAttributes ga = text.getGraphicAttributes(); if (ga instanceof TextAttributes) { final TextAttributes ta = (TextAttributes) ga; final Color currentColor = _graphics.getColor(); Color fontColor = ta.getTextColor(); if (fontColor == null) { fontColor = _defaultColor; } _graphics.setColor(fontColor); final double scale = _graphics.getTransform().getScaleX(); final String str = text.getText(); AffineTransform before = _graphics.getTransform(); _graphics.setTransform(new AffineTransform()); double fs = ta.getFontSize(); fs = fs == 0 ? 1 : fs * scale / DEFAULT_FONT_SIZE; Font font = createFont(ta, 0); AffineTransform fontTransform = new AffineTransform(); fontTransform.scale(fs, fs); fontTransform.rotate(-ta.getOrientationAngle() * Math.PI / 180); font = font.deriveFont(fontTransform); _graphics.setFont(font); Rectangle2D bounds = _graphics.getFontMetrics().getStringBounds(str, _graphics); fontTransform.rotate(-ta.getOrientationAngle() * Math.PI / 180); final double yy = bounds.getHeight() + bounds.getY(); Point2D.Double pos = new Point2D.Double(text.getPosition().getX(), text.getPosition().getY()); before.transform(pos, pos); double x = 0; double y = 0; if (ta.getOrientationAngle() == 0) { x = -0.5 * ta.getHorizontalAnchor().getFactor() * bounds.getWidth(); y = 0.5 * ta.getVerticalAnchor().getFactor() * bounds.getHeight() - yy; x = pos.x + x; y = pos.y + y; } else { x = 0.5 * ta.getVerticalAnchor().getFactor() * bounds.getHeight(); y = 0.5 * ta.getHorizontalAnchor().getFactor() * bounds.getWidth(); // System.err.println("yy="+y+" dx="+x+" dy="+y); // x = 0; // y = 0; x = pos.x + x; y = pos.y + y; } // if (ta.getOrientationAngle() == 0) { //// System.err.println("x0=" + x); //// System.err.println("y0=" + y); // } else { // System.err.println("bounds=" + bounds + " y=" + bounds.getY() + " h=" + bounds.getHeight() + " vert=" // + ta.getVerticalAnchor().getFactor()+" horz="+ta.getHorizontalAnchor().getFactor()); // System.err.println("x1=" + x); // System.err.println("y1=" + y); // } _graphics.drawString(str, (float) x, (float) y); // _graphics.fillRect((int)x, (int)y, 5, 5); _graphics.setTransform(before); _graphics.setColor(currentColor); } } /** * Creates a font instance based on the specified text attributes and font * size. * * @param attributes * Text attributes (font name and style). * @param size * Font size in pixel. If 0 {@link #DEFAULT_FONT_SIZE} will be * used. * @return new font instance. */ static Font createFont(TextAttributes attributes, int size) { String fontName = attributes.getFontName(); if (fontName == null) { fontName = DEFAULT_FONT_NAME; } FontStyle fontStyle = attributes.getFontStyle(); if (fontStyle == null) { fontStyle = DEFAULT_FONT_STYLE; } int style = Font.PLAIN; if (fontStyle == FontStyle.BOLD) { style = Font.BOLD; } else if (fontStyle == FontStyle.ITALIC) { style = Font.ITALIC; } else if (fontStyle == FontStyle.BOLD_ITALIC) { style = Font.BOLD + Font.ITALIC; } if (size == 0) { size = DEFAULT_FONT_SIZE; } return new Font(fontName, style, size); } } plantuml-1.2017.15/src/jcckit/renderer/Transformation.java000066400000000000000000000073221312650303100233770ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.renderer; import java.awt.Graphics2D; import jcckit.graphic.Anchor; import jcckit.graphic.ClippingRectangle; import jcckit.graphic.GraphPoint; /** * Transformation between device-independent coordinates * and standard Java coordinates. The aspect-ratio will * be the same. The position in the canvas is determined by a * {@link jcckit.graphic.Rectangle Rectangle} defining a (virtual) * paper which is placed in the canvas according to an anchor point. * Depending on the aspect ratio of the canvas the paper width or * height occupies the canvas width or height. * * @author Franz-Josef Elmer */ public class Transformation { private final double _scale, _x0, _y0; public String toString() { return "_scale=" + _scale + " _x0=" + _x0 + " _y0=" + _y0; } /** * Creates an instance for the specified canvas size, paper size, * and anchor points of the paper. * @param width Width of the canvas. * @param height Height of the canvas. * @param paper Rectangle defining the paper in device-independent * coordinates. * @param horizontalAnchor Horizontal anchor of the paper in the canvas. * @param verticalAnchor Vertical anchor of the paper in the canvas. */ public Transformation(int width, int height, ClippingRectangle paper, Anchor horizontalAnchor, Anchor verticalAnchor) { double pWidth = paper.getMaxX() - paper.getMinX(); double pHeight = paper.getMaxY() - paper.getMinY(); _scale = Math.min(width / pWidth, height / pHeight); _x0 = 0.5 * horizontalAnchor.getFactor() * (width - _scale * pWidth) - _scale * paper.getMinX(); _y0 = 0.5 * verticalAnchor.getFactor() * (_scale * pHeight - height) + height + _scale * + paper.getMinY(); } /** Transforms the device-independent x coordinate into Java coordinates. */ public int transformX(double x) { return trim(_scale * x + _x0); } /** Transforms the device-independent y coordinate into Java coordinates. */ public int transformY(double y) { return trim(_y0 - _scale * y); } /** Transforms the device-independent width into Java width. */ public int transformWidth(double width) { return trim(_scale * width + 0.5); } /** Transforms the device-independent height into Java height. */ public int transformHeight(double height) { return trim(_scale * height + 0.5); } private static int trim(double number) { return number > Short.MAX_VALUE ? Short.MAX_VALUE : (number < Short.MIN_VALUE ? Short.MIN_VALUE : (int) number); } /** * Transforms a point in Java coordinates back into device-independent * coordinates. */ public GraphPoint transformBack(int x, int y) { return new GraphPoint((x - _x0) / _scale, (_y0 - y) / _scale); } public void apply(Graphics2D g) { g.translate(_x0, _y0); g.scale(_scale, -_scale); } } plantuml-1.2017.15/src/jcckit/transformation/000077500000000000000000000000001312650303100207625ustar00rootroot00000000000000plantuml-1.2017.15/src/jcckit/transformation/CartesianTransformation.java000066400000000000000000000075621312650303100264770ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.transformation; import jcckit.data.DataPoint; import jcckit.graphic.GraphPoint; import jcckit.util.Util; /** * Two-dimensional Cartesian transformation. The two independent * transformations for the x-axis and the y-axis can be logarithmic * from data coordinates to device-independent coordinates in order to * realize diagrams with logarithmic scales. * * @author Franz-Josef Elmer */ public class CartesianTransformation implements Transformation { private final boolean _xLogScale; private final double _xOffset; private final double _xScale; private final boolean _yLogScale; private final double _yOffset; private final double _yScale; /** * Creates an instance from the specified reference points. * Note, that the reference points must differ in x and y coordinates * otherwise a transformation would not be possible. * @param xLogScale true if logarithmic x axis. * @param yLogScale true if logarithmic y axis. * @param dataPoint1 First reference point in data coordinates. * @param graphPoint1 First reference point in device-independent * coordinates. * @param dataPoint2 Second reference point in data coordinates. * @param graphPoint2 Second reference point in device-independent * coordinates. * @throws IllegalArgumentException if transformation in at least * one of both directions is not possible. */ public CartesianTransformation(boolean xLogScale, boolean yLogScale, DataPoint dataPoint1, GraphPoint graphPoint1, DataPoint dataPoint2, GraphPoint graphPoint2) { _xLogScale = xLogScale; double d1 = Util.log(dataPoint1.getX(), xLogScale); double dd = Util.log(dataPoint2.getX(), xLogScale) - d1; check(dd, "data", "x", d1); _xScale = (graphPoint2.getX() - graphPoint1.getX()) / dd; check(_xScale, "graphical", "x", graphPoint1.getX()); _xOffset = graphPoint1.getX() - d1 * _xScale; _yLogScale = yLogScale; d1 = Util.log(dataPoint1.getY(), yLogScale); dd = Util.log(dataPoint2.getY(), yLogScale) - d1; check(dd, "data", "y", d1); _yScale = (graphPoint2.getY() - graphPoint1.getY()) / dd; check(_yScale, "graphical", "y", graphPoint1.getY()); _yOffset = graphPoint1.getY() - d1 * _yScale; } private void check(double valueToCheck, String type, String axis, double value) { if (valueToCheck == 0) { throw new IllegalArgumentException("The " + type + " reference points in " + axis + " must be different; both are " + value); } } public GraphPoint transformToGraph(DataPoint point) { return new GraphPoint( _xOffset + Util.log(point.getX(), _xLogScale) * _xScale, _yOffset + Util.log(point.getY(), _yLogScale) * _yScale); } public DataPoint transformToData(GraphPoint point) { return new DataPoint( Util.exp((point.getX() - _xOffset) / _xScale, _xLogScale), Util.exp((point.getY() - _yOffset) / _yScale, _yLogScale)); } } plantuml-1.2017.15/src/jcckit/transformation/Transformation.java000066400000000000000000000031421312650303100246330ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.transformation; import jcckit.data.DataPoint; import jcckit.graphic.GraphPoint; /** * Interface for transformations between data coordinates * and device-independent coordinates. * * @author Franz-Josef Elmer */ public interface Transformation { /** * Transforms a {@link DataPoint} into a {@link GraphPoint}. * @param point A point in data coordinates. * @return point tranformed into device-independent coordinates.. */ public GraphPoint transformToGraph(DataPoint point); /** * Transforms a {@link GraphPoint} into a {@link DataPoint}. * @param point A point in device-independent coordinates.. * @return point tranformed into data coordinates. */ public DataPoint transformToData(GraphPoint point); } plantuml-1.2017.15/src/jcckit/util/000077500000000000000000000000001312650303100166715ustar00rootroot00000000000000plantuml-1.2017.15/src/jcckit/util/AppletBasedConfigData.java000066400000000000000000000032231312650303100236400ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.util; import java.applet.Applet; /** * Implementation of {@link FlatConfigData} based on * java.applet.Applet. * * @author Franz-Josef Elmer */ public class AppletBasedConfigData extends FlatConfigData { private final Applet _applet; /** * Creates an instance based on the specified applet. * The path is undefined. */ public AppletBasedConfigData(Applet applet) { this(applet, null); } /** Creates an instance based on the specified properties and path. */ private AppletBasedConfigData(Applet applet, String path) { super(path); _applet = applet; } protected String getValue(String fullKey) { return _applet.getParameter(fullKey); } protected ConfigData createConfigData(String path) { return new AppletBasedConfigData(_applet, path); } } plantuml-1.2017.15/src/jcckit/util/ConfigData.java000066400000000000000000000041001312650303100215260ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.util; /** * Interface for hierarchically managed key-value pairs. The key is * always a string which contains any kind of printable character except * '/', '=', ':', and whitespace characters like ' ' and '\t'. * The value is either a string or a ConfigData object. *

* This interface will be used by {@link ConfigParameters} in accordance * with the Strategy design pattern. * * @author Franz-Josef Elmer */ public interface ConfigData { /** * Returns the full key. * @param key A (relative) key. null is not allowed. * @return the full key including path. */ public String getFullKey(String key); /** * Returns the value associated with this key. * @param key The relative key. null is not allowed. * @return the associated value. Will be null if no value exists * for key. */ public String get(String key); /** * Returns the ConfigData object associated with this key. * @param key The relative key. null is not allowed. * @return the associated value. Will never return null. * Instead an empty ConfigData is returned. */ public ConfigData getNode(String key); } plantuml-1.2017.15/src/jcckit/util/ConfigParameters.java000066400000000000000000000301511312650303100227650ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.util; import java.awt.Color; import java.util.StringTokenizer; import net.sourceforge.plantuml.graphic.HtmlColorSet; import net.sourceforge.plantuml.graphic.HtmlColorSetSimple; import net.sourceforge.plantuml.graphic.IHtmlColorSet; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; /** * Read-only class for hierarchically organized key-value pairs. * The key is always a string. The following value types are * supported: *

  • String *
  • boolean *
  • int *
  • double *
  • double[] *
  • Color *
  • ConfigParameters *
*

* In accordance with the Strategy design pattern the retrieval of * a key-value pair is delegated to an instance of * {@link ConfigData}. * * @author Franz-Josef Elmer */ public class ConfigParameters { private final ConfigData _configData; /** Creates an instance from the specified ConfigData object. */ public ConfigParameters(ConfigData configData) { _configData = configData; } /** * Returns the full key. * @return the path concatenated with key. * @see ConfigData#getFullKey */ public String getFullKey(String key) { return _configData.getFullKey(key); } /** * Returns the string value associated with the specified key. * @param key The (relative) key. null is not allowed. * @return the corresponding value. Will always be not null. * @throws IllegalArgumentException if no value exists for key. * The exception message is the full key. */ public String get(String key) { String result = _configData.get(key); if (result == null) { throw new IllegalArgumentException(getFullKey(key)); } return result; } /** * Returns the string value associated with the specified key or * defaultValue if undefined. * @param key The (relative) key. null is not allowed. * @param defaultValue The default value. Can be null. * @return the corresponding value or defaultValue. */ public String get(String key, String defaultValue) { String result = _configData.get(key); if (result == null) { result = defaultValue; } return result; } /** * Returns the boolean associated with the specified key. * @param key The (relative) key. null is not allowed. * @return true if the value is "true" otherwise false. * @throws IllegalArgumentException if no value exists for key. * The exception message is the full key. * @throws NumberFormatException if the value is neither "true" nor "false". */ public boolean getBoolean(String key) { return parseBoolean(get(key), key); } /** * Returns the boolean associated with the specified key. * @param key The (relative) key. null is not allowed. * @param defaultValue The default value. Can be null. * @return true if the value is "true" otherwise false. * @throws NumberFormatException if the value is neither "true" nor "false". */ public boolean getBoolean(String key, boolean defaultValue) { String value = _configData.get(key); return value == null ? defaultValue : parseBoolean(value, key); } private boolean parseBoolean(String value, String key) { if (value.equals("true")) { return true; } else if (value.equals("false")) { return false; } else { throw createNumberFormatException("boolean", value, key); } } private NumberFormatException createNumberFormatException(String text, String value, String key) { return new NumberFormatException("Not a " + text + ": " + getFullKey(key) + " = " + value); } /** * Returns the integer associated with the specified key. * The value can be either *

  • a decimal number (starting with a non-zero digit), *
  • a hexadecimal number (starting with 0x), or *
  • an octal number (starting with zero). *
* @param key The (relative) key. null is not allowed. * @return the integer value. * @throws IllegalArgumentException if no value exists for key. * The exception message is the full key. * @throws NumberFormatException if the value is not a number. * The exception message contains the full key and the invalid value. */ public int getInt(String key) { return parseInt(get(key), key); } /** * Returns the integer associated with the specified key or * defaultValue if no key-value pair exists for the specified key. * The value can be either *
  • a decimal number (starting with a non-zero digit), *
  • a hexadecimal number (starting with 0x), or *
  • an octal number (starting with zero). *
* @param key The (relative) key. null is not allowed. * @param defaultValue The default value. Can be null. * @return the integer value. * @throws NumberFormatException if the value exists but is not a number. * The exception message contains the full key and the invalid value. */ public int getInt(String key, int defaultValue) { String value = _configData.get(key); return value == null ? defaultValue : parseInt(value, key); } private int parseInt(String value, String key) { try { return Integer.decode(value).intValue(); } catch (NumberFormatException e) { throw createNumberFormatException("number", value, key); } } /** * Returns the double associated with the specified key. * @param key The (relative) key. null is not allowed. * @return the double value. * @throws IllegalArgumentException if no value exists for key. * The exception message is the full key. * @throws NumberFormatException if the value is not a valid number. * The exception message contains the full key and the invalid value. */ public double getDouble(String key) { return parseDouble(get(key), key); } /** * Returns the double associated with the specified key or * defaultValue if no key-value pair exists for the specified key. * @param key The (relative) key. null is not allowed. * @param defaultValue The default value. Can be null. * @return the double value. * @throws NumberFormatException if the value exists but is not a valid * number. * The exception message contains the full key and the invalid value. */ public double getDouble(String key, double defaultValue) { String value = _configData.get(key); return value == null ? defaultValue : parseDouble(value, key); } private double parseDouble(String value, String key) { try { return new Double(value).doubleValue(); } catch (NumberFormatException e) { throw createNumberFormatException("number", value, key); } } /** * Returns the array of doubles associated with the specified key. * The numbers are separated by whitespaces. * @param key The (relative) key. null is not allowed. * @return the array of double values. * @throws IllegalArgumentException if no value exists for key. * The exception message is the full key. * @throws NumberFormatException if the value exists but is not a * sequence of number. The exception message contains * the full key and the invalid value. */ public double[] getDoubleArray(String key) { return parseDoubleArray(get(key), key); } /** * Returns the array of doubles associated with the specified key * or defaultValue if no key-value pair exists for * the specified key. The numbers are separated by whitespaces. * @param key The (relative) key. null is not allowed. * @param defaultValue The default value. Can be null. * @return the array of double values. * @throws NumberFormatException if the value exists but is not a * sequence of number. The exception message contains * the full key and the invalid value. */ public double[] getDoubleArray(String key, double[] defaultValue) { String value = _configData.get(key); return value == null ? defaultValue : parseDoubleArray(value, key); } private double[] parseDoubleArray(String value, String key) { try { StringTokenizer tokenizer = new StringTokenizer(value); double[] result = new double[tokenizer.countTokens()]; for (int i = 0; i < result.length; i++) { result[i] = new Double(tokenizer.nextToken()).doubleValue(); } return result; } catch (NumberFormatException e) { throw createNumberFormatException("sequence of numbers", value, key); } } /** * Returns the color associated with the specified key. * The color is coded as *
  • a decimal number (starting with a non-zero digit), *
  • a hexadecimal number (starting with 0x), or *
  • an octal number (starting with zero). *
* @param key The (relative) key. null is not allowed. * @return the color. * @throws NumberFormatException if the value exists but is not a number. * The exception message contains the full key and the invalid value. */ public Color getColor(String key) { return parseColor(get(key), key); } /** * Returns the color associated with the specified key or the specified * default value if no key-value pair exists for the specified key. * The color is coded as *
  • a decimal number (starting with a non-zero digit), *
  • a hexadecimal number (starting with 0x), or *
  • an octal number (starting with zero). *
* @param key The (relative) key. null is not allowed. * @param defaultValue The default value. Can be null. * @return the color or null if the value is an empty string. * @throws NumberFormatException if the value exists but is not a number. * The exception message contains the full key and the invalid value. */ public Color getColor(String key, Color defaultValue) { String value = _configData.get(key); return value == null ? defaultValue : parseColor(value, key); } private Color parseColor(String value, String key) { try { return value.length() == 0 ? null : decodeInternal(value); } catch (NumberFormatException e) { throw createNumberFormatException("number", value, key); } } static private IHtmlColorSet colors = new HtmlColorSetSimple(); private Color decodeInternal(String value) { if (colors.getColorIfValid(value)!=null) { return new ColorMapperIdentity().getMappedColor(colors.getColorIfValid(value)); } return Color.decode(value); } /** * Returns the child node associated with the specified key. * This method returns in any case a non-null result. * @param key The (relative) key. null is not allowed. * @return the corresponding child node which may be empty. */ public ConfigParameters getNode(String key) { return new ConfigParameters(_configData.getNode(key)); } } plantuml-1.2017.15/src/jcckit/util/ConfigParametersBasedConfigData.java000066400000000000000000000052451312650303100256520ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.util; /** * An implementation of {@link ConfigData} based on two instances of * {@link ConfigParameters}. The second one serves as a set of * default parameters. It will be used if the first one has not the requested * key-value pair. * * @author Franz-Josef Elmer */ public class ConfigParametersBasedConfigData implements ConfigData { private ConfigParameters _config; private ConfigParameters _defaultConfig; /** * Creates an instance. * @param config A set of key-value pairs. * @param defaultConfig The default set of key-value pairs. */ public ConfigParametersBasedConfigData(ConfigParameters config, ConfigParameters defaultConfig) { _config = config; _defaultConfig = defaultConfig; } /** * Returns the full key. * @param key A (relative) key. null is not allowed. * @return the full key including path. */ public String getFullKey(String key) { return _config.getFullKey(key); } /** * Returns the value associated with this key. * @param key The relative key. null is not allowed. * @return the associated value. Will be null if no value exists * for key. */ public String get(String key) { String value = _config.get(key, null); return value == null ? _defaultConfig.get(key, null) : value; } /** * Returns the ConfigData object associated with this key. * @param key The relative key. null is not allowed. * @return the associated value. Will never return null. * Instead an empty ConfigData is returned. */ public ConfigData getNode(String key) { return new ConfigParametersBasedConfigData(_config.getNode(key), _defaultConfig.getNode(key)); } } plantuml-1.2017.15/src/jcckit/util/Factory.java000066400000000000000000000114431312650303100211460ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.util; import java.lang.reflect.Constructor; /** * General purpose factory method based on {@link ConfigParameters} * and Java's Reflection API. * * @author Franz-Josef Elmer */ public class Factory { /** The constant defining the key className. */ public static final String CLASS_NAME_KEY = "className"; /** No public constructor necessary. */ private Factory() {} /** * Creates an instance of the specified class. * @param className Fully-qualified name of a class with a default * constructor. * @return a new instance. * @throws IllegalArgumentException if the instance could be created. */ public static Object create(String className) { try { return Class.forName(className).newInstance(); } catch (Throwable t) { throw new IllegalArgumentException("Could not create an instance of " + className + " because of " + t); } } /** * Creates an object based on the specified configuration * parameters. The class of the object is determined by the * parameter with the key {@link #CLASS_NAME_KEY}. * The constructor with a single argument of the type * ConfigParameter is invoked with the argument * configParameters. If such a constructor * does not exists the default constructor is invoked. If * neither of these constructors exist a {@link FactoryException} * is thrown. * @param configParameters Configuration parameters. * @return the newly created object. * @throws IllegalArgumentException if key className is missing. * @throws FactoryException wrapping any kind of exception or error occured. */ public static Object create(ConfigParameters configParameters) { String className = configParameters.get(CLASS_NAME_KEY); return createObject(configParameters, className); } /** * Creates an object based on the specified configuration * parameters and default class name. If the * parameter with the key {@link #CLASS_NAME_KEY} is missed in * configParameters defaultClassName is used. * Otherwise it works as {@link #create(jcckit.util.ConfigParameters)}. * @param configParameters Configuration parameters. * @param defaultClassName Default class name. * @return the newly created object. * @throws FactoryException wrapping any kind of exception or error occured. */ public static Object create(ConfigParameters configParameters, String defaultClassName) { String className = configParameters.get(CLASS_NAME_KEY, defaultClassName); return createObject(configParameters, className); } /** * Creates an object based on the specified configuration * parameters or returns the default object. This method behaves * as {@link #create(jcckit.util.ConfigParameters)}, except that is does * not throw an IllegalArgumentException if key className * is missing. Instead defaultObject is returned. */ public static Object createOrGet(ConfigParameters configParameters, Object defaultObject) { String className = configParameters.get(CLASS_NAME_KEY, null); return className == null ? defaultObject : createObject(configParameters, className); } private static Object createObject(ConfigParameters configParameters, String className) { try { Class c = Class.forName(className); Object result = null; Constructor constructor = null; try { constructor = c.getConstructor(new Class[] {ConfigParameters.class}); result = constructor.newInstance(new Object[] {configParameters}); } catch (NoSuchMethodException e) { result = c.newInstance(); } return result; } catch (Throwable t) { throw new FactoryException(configParameters, CLASS_NAME_KEY, t); } } } plantuml-1.2017.15/src/jcckit/util/FactoryException.java000066400000000000000000000053171312650303100230300ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.util; import java.lang.reflect.InvocationTargetException; /** * Exception thrown in the case of an error during creation of a new * object by {@link Factory#create}. * * @author Franz-Josef Elmer */ public class FactoryException extends RuntimeException { private final String _fullKey; private final String _className; private final Object _reason; /** * Creates a new instance based on the specified configuration parameters * and reason object. *

* If reason is an instance of InvocationTargetException * it will be replaced by the wrapped Throwable. * @param configParameters Configuration parameters from which the * className will be extracted (if it exists, otherwise * null will be taken). * @param reason The reason causing this exception. Most often an * an exception. */ public FactoryException(ConfigParameters configParameters, String key, Object reason) { _fullKey = configParameters.getFullKey(key); _className = configParameters.get(key, null); if (reason instanceof InvocationTargetException) { reason = ((InvocationTargetException) reason).getTargetException(); } _reason = reason; } /** Returns the full class name key. */ public String getFullKey() { return _fullKey; } /** Returns the fully qualified class name. */ public String getClassName() { return _className; } /** Returns the reason object causing this exception. */ public Object getReason() { return _reason; } /** * Renders this instance as follows: jcckit.util.FactoryException: * full key = class name: reason. */ public String toString() { return getClass().getName() + ": " + _fullKey + " = " + _className + ": " + _reason; } } plantuml-1.2017.15/src/jcckit/util/FlatConfigData.java000066400000000000000000000156761312650303100223610ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.util; /** * An implementation of ConfigData based on a flat * representation of the hierachically organized key-value pairs. * Concrete subclasses must implement the methods * {@link #getValue} and {@link #createConfigData} in accordance * with the Template Method pattern and Factory Method pattern, * respectively. *

* In a flat representation of hierachically organized key-value * pairs all key-value pairs are stored in a single Hashtable. * Its key is the full key of the configuration data (i.e. the key * including its path). *

* Example (using the notation for a .properties file): *

 *  title = example
 *  symbolAttributes/className = jcckit.graphic.BasicDrawingAttributes
 *  symbolAttributes/fillColor = 0xcaffee
 *  symbolAttributes/lineColor = 0xff0000
 *  
* The following table shows the result of some method calls at a * FlatConfigData instance prepared with * this example: *

*

* * * * *
Method callResult
get("title")example
getNode("symbolAttributes").get("fillColor") * 0xcaffee
*
*

* In addition FlatConfigData implements inheritance * of key-value pairs. * Basically a node in the tree of key-value pairs * may extend another node in the tree. * The extended node inherit all key-value pairs from the extending * one including the key-value pairs of all descendants. * The value of a inherited key-value pair may be overridden. * Also new key-value pairs may be placed in the inherited node or * anywhere in the subtree. * Note, that the extending node has to be a node which is not a * descendant of the extended node (otherwise a circulary chain * of references occurs). As a consequence not more than 20 inheritance * levels are allowed. *

* The implementation of this kind of inheritance in a flat hashtable * is done by an additional key-value pair of the form *

 *    extending-node/ = extended-node/
 *  
* Example: *
 *  A/a/priority = high
 *  A/a/alpha/hello = universe
 *  A/a/alpha/answer = 42
 *  A/b/1/ = A/a/
 *  A/b/1/alpha/hello = world
 *  A/b/1/alpha/question = 6 * 7
 *  
* The following table shows the result of various method calls * applied at the node A/b/1/ of a FlatConfigData * instance prepared with this example: *

*

* * * * * * *
Method callResultComment
get("priority")highinherited
getNode("alpha").get("hello") * worldoverridden
getNode("alpha").get("question") * 6 * 7added
getNode("alpha").get("answer") * 42inherited
*
* * @author Franz-Josef Elmer */ public abstract class FlatConfigData implements ConfigData { private final String _path; /** Creates a new instance for the specified path. */ public FlatConfigData(String path) { _path = path; } /** * Returns the full key. * @param key A (relative) key. null is not allowed. * @return the path concatenated with key or key * if the path is undefined. */ public String getFullKey(String key) { return _path == null ? key : _path + key; } /** * Returns the value associated with this key. * @param key The relative key. null is not allowed. * @return the associated value. Will be null if no value exists * for key. */ public String get(String key) { return get(_path, key, 0); } /** * Obtains a value in accordance with hierarchy (path) and * inheritance (recursive calls of this routine). */ private String get(String path, String key, int numberOfLevels) { String result = null; if (numberOfLevels < 20) { String fullKey = path == null ? key : path + key; result = getValue(fullKey); if (result == null) { // posAfterDelim is the index in path just after '/' int posAfterDelim = path == null ? -1 : path.length(); String replacement; while (posAfterDelim > 0) { // look for a sub-tree replacement = getValue(path.substring(0, posAfterDelim)); if (replacement != null) { // sub-tree found, add last part of the original path result = get(replacement + path.substring(posAfterDelim), key, numberOfLevels + 1); // break whether result is null or not. break; } // remove last element from the path posAfterDelim = path.lastIndexOf('/', posAfterDelim - 2) + 1; } } } return result; } /** * Returns the ConfigData object associated with this key. * @param key The relative key. * @return the associated value. Will never return null. * Instead an empty ConfigData is returned. */ public ConfigData getNode(String key) { String path = (_path == null ? key : _path + key) + '/'; return createConfigData(path); } /** * Returns the value for the specified full key from the flat * representation of the hierarchically organized key-value pairs. * @param fullKey The full key including path. null is not allowed. * @return the value or null if not found. */ protected abstract String getValue(String fullKey); /** * Returns the FlatConfigData object for the specified full path. * In general path will be used in the constructor with * path argument. * @param path The full path. * @return a new instance in any case. */ protected abstract ConfigData createConfigData(String path); } plantuml-1.2017.15/src/jcckit/util/Format.java000066400000000000000000000162511312650303100207710ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.util; import java.util.Vector; /** * A helper class for formatting numbers according to * a printf-like format string. Each instance of * this class is initialized by a format string for a * single number. * * @author Franz-Josef Elmer */ public class Format implements TicLabelFormat { /** * Creates a new instance based of specified key-value pair of the * specified configuration parameters. * @param config Config parameters. * @param key The key of the key-value pair in config containing * the format string. * @return null if undefined key-value pair or format string * is an empty string. * @throws FactoryException if the format string is invalid. */ public static Format create(ConfigParameters config, String key) { Format result = null; String format = config.get(key, null); if (format != null && format.length() > 0) { try { result = new Format(format); } catch (Exception e) { throw new FactoryException(config, key, e); } } return result; } private final FormatElement[] _formatElements; private final Vector _staticParts; /** * Creates an instance for the specified format string. * The format string is an alternation of some static texts and * format elements. * A format element has to start with '%' and it must end with * one of the following format descriptors: * * * * * * * * * * * * * *
ddecimal integer
ooctal integer
xhex integer
ffloating point number with a fixed decimal point
e, Efloating point number in logarithmic format
g, Gfloating point number rendered either in fixed-decimal * format of logarithmic format depending on the size of * the mantissa.
* The characters between '%' and the decriptor are optional. * They can be grouped into *
  • modifier
    * it is *
    • '-' if the formated result should be flushed left *
    • '+' if the sign should be always appear *
    • '0' if the leading space should be filled with zeros *
    *
  • width
    * a decimal number given the minimum number of characters * of the result *
  • precision *
* A plain '%' is coded as '%%'. * @param formatString The format string. * @exception IllegalArgumentException if invalid format string. */ public Format(String formatString) { _staticParts = new Vector(); Vector formatElements = new Vector(); StringBuffer part = new StringBuffer(); boolean insideFormatElement = false; boolean atPercentSymbol = false; for (int i = 0, n = formatString.length(); i < n; i++) { char c = formatString.charAt(i); if (insideFormatElement) { part.append(c); if (FormatElement.DESCRIPTORS.indexOf(c) >= 0) { formatElements.addElement(new String(part)); part.setLength(0); insideFormatElement = false; } } else if (atPercentSymbol) { atPercentSymbol = false; if (c != '%') { _staticParts.addElement(new String(part)); part.setLength(0); insideFormatElement = true; } part.append(c); if (FormatElement.DESCRIPTORS.indexOf(c) >= 0) { formatElements.addElement(new String(part)); part.setLength(0); insideFormatElement = false; } } else { if (c == '%') { atPercentSymbol = true; } else { part.append(c); } } } if (insideFormatElement) { formatElements.addElement(new String(part)); } else { _staticParts.addElement(new String(part)); } _formatElements = new FormatElement[formatElements.size()]; for (int i = 0; i < _formatElements.length; i++) { _formatElements[i] = new FormatElement((String) formatElements.elementAt(i)); } } /** * Format a number. * If there are no format elements the numbers will be ignored. * If there are more than one format elements the * additional format elements will be ignored and only the static parts * are taken. * @param number Number to be formated. * @return Formated number. */ public String form(long number) { StringBuffer result = new StringBuffer(); result.append(_staticParts.elementAt(0)); if (_formatElements.length > 0) { _formatElements[0].form(result, number); } return appendRest(result); } /** * Format a number. * If there are no format elements the numbers will be ignored. * If there are more than one format elements the * additional format elements will be ignored and only the static parts * are taken. * @param number Number to be formated. * @return Formated number. */ public String form(double number) { StringBuffer result = new StringBuffer(); result.append(_staticParts.elementAt(0)); if (_formatElements.length > 0) { _formatElements[0].form(result, number); } return appendRest(result); } private String appendRest(StringBuffer buffer) { for (int i = 1, n = _staticParts.size(); i < n; i++) { buffer.append(_staticParts.elementAt(i)); } return new String(buffer); } /** * Format an array of double numbers. * If there are less format elements than numbers the additional numbers * will be ignored. If there are less numbers than format elements the * additional format elements will be ignored and only the static parts * are taken. * @param numbers Numbers to be formated. * @return Formated numbers. */ public String form(double[] numbers) { StringBuffer result = new StringBuffer(); for (int i = 0, n = _staticParts.size(); i < n; i++) { result.append(_staticParts.elementAt(i)); if (i < _formatElements.length && i < numbers.length) { _formatElements[i].form(result, numbers[i]); } } return new String(result); } } plantuml-1.2017.15/src/jcckit/util/FormatElement.java000066400000000000000000000172611312650303100223050ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.util; /** * * * @author Franz-Josef Elmer */ class FormatElement { /** All descriptor characters. */ static final String DESCRIPTORS = "doxfeEgG"; private static final String INT_DESCRIPTORS = "dox"; private static final int INT_DESCRIPTOR = 0; private static final int FLOAT_DESCRIPTOR = 1; /** * Calculate the integer power of a floating point number. * @param n Exponent. * @param x Number. * @return x^n. */ private static final double power(double x, int n) { return n < 0 ? 1.0 / power2(x, -n) : power2(x, n); } /** Calculate x^n recursively assuming n > 0. */ private static final double power2(double x, int n) { switch (n) { case 0: return 1; case 1: return x; default: double p = power2(x, n / 2); return p * p * power2(x, n % 2); } } private final char _descriptor; private final int _descriptorType; private final double _tenToPrecision; private boolean _decimalPoint; private boolean _flushLeft; private boolean _leadingZeros; private boolean _alwaysSign; private int _width; private int _precision; /** Creates an instance for the specified format string. */ FormatElement(String formatString) { int len = formatString.length() - 1; _descriptor = formatString.charAt(len); if (DESCRIPTORS.indexOf(_descriptor) < 0) { throw new IllegalArgumentException("Format element '" + formatString + "' does not ends with one of the following characters: " + DESCRIPTORS); } _descriptorType = INT_DESCRIPTORS.indexOf(_descriptor) >= 0 ? INT_DESCRIPTOR : FLOAT_DESCRIPTOR; if (formatString.length() > 1) { switch (formatString.charAt(0)) { case '-': _flushLeft = true; formatString = formatString.substring(1); break; case '0': _leadingZeros = true; formatString = formatString.substring(1); break; case '+': _alwaysSign = true; formatString = formatString.substring(1); break; } len = formatString.length() - 1; int index = formatString.indexOf('.'); _decimalPoint = index >= 0; int last = _decimalPoint ? index : len; if (last > 0) { _width = Integer.parseInt(formatString.substring(0, last)); } if (_decimalPoint) { index++; if (index < len) { _precision = Integer.parseInt(formatString.substring(index, len)); } } } _tenToPrecision = power(10, _precision); } /** * Format a number in accordance of the format string * given at the initialisation of this instance. * @param buffer Buffer to which the formated output will be appended. * @param number Number to be formated. */ public void form(StringBuffer buffer, long number) { if (_descriptorType == FLOAT_DESCRIPTOR) { form(buffer, (double) number); } else { // Format absolut value in the right base buffer.append(form(number < 0, Long.toString(Math.abs(number), _descriptor == 'o' ? 8 : (_descriptor == 'x' ? 16 : 10)), "")); } } /** * Format a number in accordance of the format string * given at the initialisation of this instance. * @param buffer Buffer to which the formated output will be appended. * @param number Number to be formated. */ public void form(StringBuffer buffer, double number) { if (_descriptorType == INT_DESCRIPTOR) { form(buffer, (long) Math.floor(number + 0.5)); } else if (_descriptor == 'f') { buffer.append(formF(number)); } else if (_descriptor == 'e' || _descriptor == 'E') { buffer.append(formE(number)); } else if (_descriptor == 'g' || _descriptor == 'G') { String formF = formF(number); String formE = formE(number); buffer.append(formF.length() > formE.length() ? formE : formF); } } private String form(boolean negativeValue, String intPart, String fracPart) { int len = intPart.length() + fracPart.length(); // Buffer holding the result StringBuffer result = new StringBuffer(); int count = 0; // add sign if necessary if (_alwaysSign || negativeValue) { result.append(negativeValue ? '-' : '+'); count++; } // add zeros if necessary if (_leadingZeros) { for (int i = count + len; i < _width; i++) { result.append('0'); count++; } } // add number result.append(intPart).append(fracPart); count += len; // add spaces if necessary if (_flushLeft) { for (; count < _width; count++) { result.append(' '); } } else { for (; count < _width; count++) { result.insert(0, ' '); } } return new String(result); } /** Format floating point number with exponent. */ private String formE(double number) { // format absolute mantisse int exponent = 0; String zeros = "00000000000000000000000".substring(0, _precision + 1); if (number != 0) { exponent = (int) Math.floor(Math.log(Math.abs(number)) / Math.log(10)); double mantisse = Math.floor(Math.abs(number * power(10.0, _precision - exponent)) + 0.5); if (mantisse >= 10 * _tenToPrecision) { exponent++; mantisse = Math.floor(Math.abs(number * power(10.0, _precision - exponent)) + 0.5); } zeros = Long.toString((long) mantisse); } // make fractional part StringBuffer fracPart = new StringBuffer(); if (_decimalPoint) { fracPart.append('.').append(zeros.substring(1)); } // make exponent fracPart.append(Character.isLowerCase(_descriptor) ? 'e': 'E') .append(exponent < 0 ? '-' : '+'); exponent = Math.abs(exponent); for (int i = 0, n = fracPart.length(); i < 3; i++) { fracPart.insert(n, Character.forDigit(exponent % 10, 10)); exponent /= 10; } return form(number < 0, zeros.substring(0, 1), new String(fracPart)); } /** Format floating point number. */ private String formF(double number) { // Format absolut value double multiplier = number < 0 ? - _tenToPrecision : _tenToPrecision; String digits = Long.toString((long) Math.floor(number * multiplier + 0.5)); String intPart = digits; StringBuffer fracPart = new StringBuffer(); if (_decimalPoint) { int len = digits.length() - _precision; fracPart.append('.').append(digits.substring(Math.max(0, len))); if (len > 0) { intPart = digits.substring(0, len); } else { intPart = "0"; for (; len < 0; len++) { fracPart.insert(1, '0'); } } } return form(number < 0, intPart, new String(fracPart)); } } plantuml-1.2017.15/src/jcckit/util/Point.java000066400000000000000000000035271312650303100206340ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.util; /** * Immutable class of a two-dimensional point with floating point * coordinates. * * @author Franz-Josef Elmer */ public class Point { private final double _x; private final double _y; /** * Creates an instance for the specified vector. The value of the * first/second element of vector denotes the x/y value. * If vector is null or not long enough 0 will be used * as default values. */ public Point(double[] vector) { double x = 0; double y = 0; if (vector != null && vector.length > 0) { x = vector[0]; if (vector.length > 1) { y = vector[1]; } } _x = x; _y = y; } /** Creates an instance for the specified coordinates. */ public Point(double x, double y) { _x = x; _y = y; } /** Returns the x-coordinate of the point. */ public double getX() { return _x; } /** Returns the y-coordinate of the point. */ public double getY() { return _y; } } plantuml-1.2017.15/src/jcckit/util/PropertiesBasedConfigData.java000066400000000000000000000054331312650303100245540ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.util; import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; /** * Implementation of {@link FlatConfigData} based on * java.util.Properties. * * @author Franz-Josef Elmer */ public class PropertiesBasedConfigData extends FlatConfigData { private final Properties _properties; /** * Creates an instance from the specified .properties file. * @param fileName File name of the .properties file relative * to the working directory or absolute. * @throws IOException if the .properties does not exist or could * not be read. */ public PropertiesBasedConfigData(String fileName) throws IOException { super(null); _properties = new Properties(); _properties.load(new FileInputStream(fileName)); } /** * Creates an instance based on the specified properties. * The path is undefined. */ public PropertiesBasedConfigData(Properties properties) { this(properties, null); } /** Creates an instance based on the specified properties and path. */ private PropertiesBasedConfigData(Properties properties, String path) { super(path); _properties = properties; } /** * Returns the value for the specified full key. The call will be delegated * to the wrapped java.util.properties object. * @param fullKey The full key including path. null is not allowed. * @return the value or null if not found. */ protected String getValue(String fullKey) { return _properties.getProperty(fullKey); } /** * Returns a new instance of PropertiesBasedConfigData * for the specified full path. The wrapped java.util.Properties * will be the same as of this instance. * @param path The full path. * @return a new instance. */ protected ConfigData createConfigData(String path) { return new PropertiesBasedConfigData(_properties, path); } } plantuml-1.2017.15/src/jcckit/util/TicLabelFormat.java000066400000000000000000000022751312650303100223720ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.util; /** * Format interface for tic labels. Maps a numerical tic value onto a string. * * @author Franz-Josef Elmer */ public interface TicLabelFormat { /** * Forms the specified tic value to a string. Note, the numerical * ticValue may be mapped onto a non-numerical one. */ public String form(double ticValue); } plantuml-1.2017.15/src/jcckit/util/Util.java000066400000000000000000000031021312650303100204450ustar00rootroot00000000000000/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.util; /** * Collection of static utility methods. * * @author Franz-Josef Elmer */ public class Util { /** Private constructor to prevent instanciation of this class. */ private Util() {} /** * Returns the natural logarithm of the specified number if * logScale is true. * @return x if logScale == false. */ public static double log(double x, boolean logScale) { return logScale ? Math.log(x) : x; } /** * Returns the exponential function of the specified number if * logScale is true. * @return x if logScale == false. */ public static double exp(double x, boolean logScale) { return logScale ? Math.exp(x) : x; } } plantuml-1.2017.15/src/net/000077500000000000000000000000001312650303100152335ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/000077500000000000000000000000001312650303100175565ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/000077500000000000000000000000001312650303100214125ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/AbstractPSystem.java000066400000000000000000000104311312650303100253440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.ProtectedCommand; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.VerticalAlignment; import net.sourceforge.plantuml.stats.StatsUtilsIncrement; import net.sourceforge.plantuml.version.License; import net.sourceforge.plantuml.version.Version; public abstract class AbstractPSystem implements Diagram { private UmlSource source; private String getVersion() { final StringBuilder toAppend = new StringBuilder(); toAppend.append("PlantUML version "); toAppend.append(Version.versionString()); toAppend.append("(" + Version.compileTimeString() + ")\n"); toAppend.append("(" + License.getCurrent() + " source distribution)\n"); for (String name : OptionPrint.interestingProperties()) { toAppend.append(name); toAppend.append(BackSlash.CHAR_NEWLINE); } return toAppend.toString(); } final public String getMetadata() { if (source == null) { return getVersion(); } return source.getPlainString() + BackSlash.NEWLINE + getVersion(); } final public UmlSource getSource() { return source; } final public long seed() { if (source == null) { return 42; } return getSource().seed(); } final public void setSource(UmlSource source) { this.source = source; } public int getNbImages() { return 1; } public DisplayPositionned getTitle() { if (source == null) { return new DisplayPositionned(Display.empty(), HorizontalAlignment.CENTER, VerticalAlignment.TOP); } return new DisplayPositionned(source.getTitle(), HorizontalAlignment.CENTER, VerticalAlignment.TOP); } public String getWarningOrError() { return null; } public String checkFinalError() { return null; } public void makeDiagramReady() { } public boolean isOk() { return true; } public CommandExecutionResult executeCommand(Command cmd, BlocLines lines) { cmd = new ProtectedCommand(cmd); return cmd.execute(this, lines); } public boolean hasUrl() { return false; } final public ImageData exportDiagram(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { final long now = System.currentTimeMillis(); try { return exportDiagramNow(os, index, fileFormatOption, seed()); } finally { if (OptionFlags.getInstance().isEnableStats()) { StatsUtilsIncrement.onceMoreGenerate(System.currentTimeMillis() - now, getClass(), fileFormatOption.getFileFormat()); } } } protected abstract ImageData exportDiagramNow(OutputStream os, int index, FileFormatOption fileFormatOption, long seed) throws IOException; } plantuml-1.2017.15/src/net/sourceforge/plantuml/AlignParam.java000066400000000000000000000034301312650303100242700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.graphic.HorizontalAlignment; public enum AlignParam { ARROW_MESSAGE_ALIGN(HorizontalAlignment.LEFT), SEQUENCE_MESSAGE_ALIGN(HorizontalAlignment.LEFT), SEQUENCE_MESSAGETEXT_ALIGN(HorizontalAlignment.LEFT), SEQUENCE_REFERENCE_ALIGN(HorizontalAlignment.CENTER); private final HorizontalAlignment defaultValue; private AlignParam(HorizontalAlignment defaultValue) { this.defaultValue = defaultValue; } public final HorizontalAlignment getDefaultValue() { return defaultValue; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/AnimatedGifEncoder.java000066400000000000000000001027221312650303100257310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.awt.Color; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.awt.image.DataBufferByte; import java.io.BufferedOutputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; /** * Class AnimatedGifEncoder - Encodes a GIF file consisting of one or more * frames. * *
 *  Example:
 *     AnimatedGifEncoder e = new AnimatedGifEncoder();
 *     e.start(outputFileName);
 *     e.setDelay(1000);   // 1 frame per sec
 *     e.addFrame(image1);
 *     e.addFrame(image2);
 *     e.finish();
 * 
* * No copyright asserted on the source code of this class. May be used for any * purpose, however, refer to the Unisys LZW patent for restrictions on use of * the associated LZWEncoder class. Please forward any corrections to * kweiner@fmsware.com. * * @author Kevin Weiner, FM Software * @version 1.03 November 2003 * */ public class AnimatedGifEncoder { protected int width; // image size protected int height; protected Color transparent = null; // transparent color if given protected int transIndex; // transparent index in color table protected int repeat = -1; // no repeat protected int delay = 0; // frame delay (hundredths) protected boolean started = false; // ready to output frames protected OutputStream out; protected BufferedImage image; // current frame protected byte[] pixels; // BGR byte array from frame protected byte[] indexedPixels; // converted frame indexed to palette protected int colorDepth; // number of bit planes protected byte[] colorTab; // RGB palette protected boolean[] usedEntry = new boolean[256]; // active palette // entries protected int palSize = 7; // color table size (bits-1) protected int dispose = -1; // disposal code (-1 = use default) protected boolean closeStream = false; // close stream when finished protected boolean firstFrame = true; protected boolean sizeSet = false; // if false, get size from first frame protected int sample = 10; // default sample interval for quantizer /** * Sets the delay time between each frame, or changes it for subsequent * frames (applies to last frame added). * * @param ms * int delay time in milliseconds */ public void setDelay(int ms) { delay = Math.round(ms / 10.0f); } /** * Sets the GIF frame disposal code for the last added frame and any * subsequent frames. Default is 0 if no transparent color has been set, * otherwise 2. * * @param code * int disposal code. */ public void setDispose(int code) { if (code >= 0) { dispose = code; } } /** * Sets the number of times the set of GIF frames should be played. Default * is 1; 0 means play indefinitely. Must be invoked before the first image * is added. * * @param iter * int number of iterations. */ public void setRepeat(int iter) { if (iter >= 0) { repeat = iter; } } /** * Sets the transparent color for the last added frame and any subsequent * frames. Since all colors are subject to modification in the quantization * process, the color in the final palette for each frame closest to the * given color becomes the transparent color for that frame. May be set to * null to indicate no transparent color. * * @param c * Color to be treated as transparent on display. */ public void setTransparent(Color c) { transparent = c; } /** * Adds next GIF frame. The frame is not written immediately, but is * actually deferred until the next frame is received so that timing data * can be inserted. Invoking finish() flushes all frames. If * setSize was not invoked, the size of the first image is * used for all subsequent frames. * * @param im * BufferedImage containing frame to write. * @return true if successful. */ public boolean addFrame(BufferedImage im) { if ((im == null) || !started) { return false; } boolean ok = true; try { if (!sizeSet) { // use first frame's size setSize(im.getWidth(), im.getHeight()); } image = im; getImagePixels(); // convert to correct format if necessary analyzePixels(); // build color table & map pixels if (firstFrame) { writeLSD(); // logical screen descriptior writePalette(); // global color table if (repeat >= 0) { // use NS app extension to indicate reps writeNetscapeExt(); } } writeGraphicCtrlExt(); // write graphic control extension writeImageDesc(); // image descriptor if (!firstFrame) { writePalette(); // local color table } writePixels(); // encode and write pixel data firstFrame = false; } catch (IOException e) { ok = false; } return ok; } /** * Flushes any pending data and closes output file. If writing to an * OutputStream, the stream is not closed. */ public boolean finish() { if (!started) return false; boolean ok = true; started = false; try { out.write(0x3b); // gif trailer out.flush(); if (closeStream) { out.close(); } } catch (IOException e) { ok = false; } // reset for subsequent use transIndex = 0; out = null; image = null; pixels = null; indexedPixels = null; colorTab = null; closeStream = false; firstFrame = true; return ok; } /** * Sets frame rate in frames per second. Equivalent to * setDelay(1000/fps). * * @param fps * float frame rate (frames per second) */ public void setFrameRate(float fps) { if (fps != 0f) { delay = Math.round(100f / fps); } } /** * Sets quality of color quantization (conversion of images to the maximum * 256 colors allowed by the GIF specification). Lower values (minimum = 1) * produce better colors, but slow processing significantly. 10 is the * default, and produces good color mapping at reasonable speeds. Values * greater than 20 do not yield significant improvements in speed. * * @param quality * int greater than 0. */ public void setQuality(int quality) { if (quality < 1) quality = 1; sample = quality; } /** * Sets the GIF frame size. The default size is the size of the first frame * added if this method is not invoked. * * @param w * int frame width. * @param h * int frame width. */ public void setSize(int w, int h) { if (started && !firstFrame) return; width = w; height = h; if (width < 1) width = 320; if (height < 1) height = 240; sizeSet = true; } /** * Initiates GIF file creation on the given stream. The stream is not closed * automatically. * * @param os * OutputStream on which GIF images are written. * @return false if initial write failed. */ public boolean start(OutputStream os) { if (os == null) return false; boolean ok = true; closeStream = false; out = os; try { writeString("GIF89a"); // header } catch (IOException e) { ok = false; } return started = ok; } /** * Initiates writing of a GIF file with the specified name. * * @param file * String containing output file name. * @return false if open or initial write failed. */ public boolean start(String file) { boolean ok = true; try { out = new BufferedOutputStream(new FileOutputStream(file)); ok = start(out); closeStream = true; } catch (IOException e) { ok = false; } return started = ok; } /** * Analyzes image colors and creates color map. */ protected void analyzePixels() { int len = pixels.length; int nPix = len / 3; indexedPixels = new byte[nPix]; NeuQuant nq = new NeuQuant(pixels, len, sample); // initialize quantizer colorTab = nq.process(); // create reduced palette // convert map from BGR to RGB for (int i = 0; i < colorTab.length; i += 3) { byte temp = colorTab[i]; colorTab[i] = colorTab[i + 2]; colorTab[i + 2] = temp; usedEntry[i / 3] = false; } // map image pixels to new palette int k = 0; for (int i = 0; i < nPix; i++) { int index = nq.map(pixels[k++] & 0xff, pixels[k++] & 0xff, pixels[k++] & 0xff); usedEntry[index] = true; indexedPixels[i] = (byte) index; } pixels = null; colorDepth = 8; palSize = 7; // get closest match to transparent color if specified if (transparent != null) { transIndex = findClosest(transparent); } } /** * Returns index of palette color closest to c * */ protected int findClosest(Color c) { if (colorTab == null) return -1; int r = c.getRed(); int g = c.getGreen(); int b = c.getBlue(); int minpos = 0; int dmin = 256 * 256 * 256; int len = colorTab.length; for (int i = 0; i < len;) { int dr = r - (colorTab[i++] & 0xff); int dg = g - (colorTab[i++] & 0xff); int db = b - (colorTab[i] & 0xff); int d = dr * dr + dg * dg + db * db; int index = i / 3; if (usedEntry[index] && (d < dmin)) { dmin = d; minpos = index; } i++; } return minpos; } /** * Extracts image pixels into byte array "pixels" */ protected void getImagePixels() { int w = image.getWidth(); int h = image.getHeight(); int type = image.getType(); if ((w != width) || (h != height) || (type != BufferedImage.TYPE_3BYTE_BGR)) { // create new image with right size/format BufferedImage temp = new BufferedImage(width, height, BufferedImage.TYPE_3BYTE_BGR); Graphics2D g = temp.createGraphics(); g.drawImage(image, 0, 0, null); image = temp; } pixels = ((DataBufferByte) image.getRaster().getDataBuffer()).getData(); } /** * Writes Graphic Control Extension */ protected void writeGraphicCtrlExt() throws IOException { out.write(0x21); // extension introducer out.write(0xf9); // GCE label out.write(4); // data block size int transp, disp; if (transparent == null) { transp = 0; disp = 0; // dispose = no action } else { transp = 1; disp = 2; // force clear if using transparent color } if (dispose >= 0) { disp = dispose & 7; // user override } disp <<= 2; // packed fields out.write(0 | // 1:3 reserved disp | // 4:6 disposal 0 | // 7 user input - 0 = none transp); // 8 transparency flag writeShort(delay); // delay x 1/100 sec out.write(transIndex); // transparent color index out.write(0); // block terminator } /** * Writes Image Descriptor */ protected void writeImageDesc() throws IOException { out.write(0x2c); // image separator writeShort(0); // image position x,y = 0,0 writeShort(0); writeShort(width); // image size writeShort(height); // packed fields if (firstFrame) { // no LCT - GCT is used for first (or only) frame out.write(0); } else { // specify normal LCT out.write(0x80 | // 1 local color table 1=yes 0 | // 2 interlace - 0=no 0 | // 3 sorted - 0=no 0 | // 4-5 reserved palSize); // 6-8 size of color table } } /** * Writes Logical Screen Descriptor */ protected void writeLSD() throws IOException { // logical screen size writeShort(width); writeShort(height); // packed fields out.write((0x80 | // 1 : global color table flag = 1 (gct used) 0x70 | // 2-4 : color resolution = 7 0x00 | // 5 : gct sort flag = 0 palSize)); // 6-8 : gct size out.write(0); // background color index out.write(0); // pixel aspect ratio - assume 1:1 } /** * Writes Netscape application extension to define repeat count. */ protected void writeNetscapeExt() throws IOException { out.write(0x21); // extension introducer out.write(0xff); // app extension label out.write(11); // block size writeString("NETSCAPE" + "2.0"); // app id + auth code out.write(3); // sub-block size out.write(1); // loop sub-block id writeShort(repeat); // loop count (extra iterations, 0=repeat forever) out.write(0); // block terminator } /** * Writes color table */ protected void writePalette() throws IOException { out.write(colorTab, 0, colorTab.length); int n = (3 * 256) - colorTab.length; for (int i = 0; i < n; i++) { out.write(0); } } /** * Encodes and writes pixel data */ protected void writePixels() throws IOException { LZWEncoder encoder = new LZWEncoder(width, height, indexedPixels, colorDepth); encoder.encode(out); } /** * Write 16-bit value to output stream, LSB first */ protected void writeShort(int value) throws IOException { out.write(value & 0xff); out.write((value >> 8) & 0xff); } /** * Writes string to output stream */ protected void writeString(String s) throws IOException { for (int i = 0; i < s.length(); i++) { out.write((byte) s.charAt(i)); } } } /* * NeuQuant Neural-Net Quantization Algorithm * ------------------------------------------ * * Copyright (c) 1994 Anthony Dekker * * NEUQUANT Neural-Net quantization algorithm by Anthony Dekker, 1994. See * "Kohonen neural networks for optimal colour quantization" in "Network: * Computation in Neural Systems" Vol. 5 (1994) pp 351-367. for a discussion of * the algorithm. * * Any party obtaining a copy of these files from the author, directly or * indirectly, is granted, free of charge, a full and unrestricted irrevocable, * world-wide, paid up, royalty-free, nonexclusive right and license to deal in * this software and documentation files (the "Software"), including without * limitation the rights to use, copy, modify, merge, publish, distribute, * sublicense, and/or sell copies of the Software, and to permit persons who * receive copies from any such party to do so, with the only requirement being * that this copyright notice remain intact. */ // Ported to Java 12/00 K Weiner class NeuQuant { protected static final int netsize = 256; /* number of colours used */ /* four primes near 500 - assume no image has a length so large */ /* that it is divisible by all four primes */ protected static final int prime1 = 499; protected static final int prime2 = 491; protected static final int prime3 = 487; protected static final int prime4 = 503; protected static final int minpicturebytes = (3 * prime4); /* minimum size for input image */ /* * Program Skeleton ---------------- [select samplefac in range 1..30] [read * image from input file] pic = (unsigned char*) malloc(3*width*height); * initnet(pic,3*width*height,samplefac); learn(); unbiasnet(); [write * output image header, using writecolourmap(f)] inxbuild(); write output * image using inxsearch(b,g,r) */ /* * Network Definitions ------------------- */ protected static final int maxnetpos = (netsize - 1); protected static final int netbiasshift = 4; /* bias for colour values */ protected static final int ncycles = 100; /* no. of learning cycles */ /* defs for freq and bias */ protected static final int intbiasshift = 16; /* bias for fractions */ protected static final int intbias = (((int) 1) << intbiasshift); protected static final int gammashift = 10; /* gamma = 1024 */ protected static final int gamma = (((int) 1) << gammashift); protected static final int betashift = 10; protected static final int beta = (intbias >> betashift); /* beta = 1/1024 */ protected static final int betagamma = (intbias << (gammashift - betashift)); /* defs for decreasing radius factor */ protected static final int initrad = (netsize >> 3); /* * for 256 cols, * radius starts */ protected static final int radiusbiasshift = 6; /* at 32.0 biased by 6 bits */ protected static final int radiusbias = (((int) 1) << radiusbiasshift); protected static final int initradius = (initrad * radiusbias); /* * and * decreases * by a */ protected static final int radiusdec = 30; /* factor of 1/30 each cycle */ /* defs for decreasing alpha factor */ protected static final int alphabiasshift = 10; /* alpha starts at 1.0 */ protected static final int initalpha = (((int) 1) << alphabiasshift); protected int alphadec; /* biased by 10 bits */ /* radbias and alpharadbias used for radpower calculation */ protected static final int radbiasshift = 8; protected static final int radbias = (((int) 1) << radbiasshift); protected static final int alpharadbshift = (alphabiasshift + radbiasshift); protected static final int alpharadbias = (((int) 1) << alpharadbshift); /* * Types and Global Variables -------------------------- */ protected byte[] thepicture; /* the input image itself */ protected int lengthcount; /* lengthcount = H*W*3 */ protected int samplefac; /* sampling factor 1..30 */ // typedef int pixel[4]; /* BGRc */ protected int[][] network; /* the network itself - [netsize][4] */ protected int[] netindex = new int[256]; /* for network lookup - really 256 */ protected int[] bias = new int[netsize]; /* bias and freq arrays for learning */ protected int[] freq = new int[netsize]; protected int[] radpower = new int[initrad]; /* radpower for precomputation */ /* * Initialise network in range (0,0,0) to (255,255,255) and set parameters * ----------------------------------------------------------------------- */ public NeuQuant(byte[] thepic, int len, int sample) { int i; int[] p; thepicture = thepic; lengthcount = len; samplefac = sample; network = new int[netsize][]; for (i = 0; i < netsize; i++) { network[i] = new int[4]; p = network[i]; p[0] = p[1] = p[2] = (i << (netbiasshift + 8)) / netsize; freq[i] = intbias / netsize; /* 1/netsize */ bias[i] = 0; } } public byte[] colorMap() { byte[] map = new byte[3 * netsize]; int[] index = new int[netsize]; for (int i = 0; i < netsize; i++) index[network[i][3]] = i; int k = 0; for (int i = 0; i < netsize; i++) { int j = index[i]; map[k++] = (byte) (network[j][0]); map[k++] = (byte) (network[j][1]); map[k++] = (byte) (network[j][2]); } return map; } /* * Insertion sort of network and building of netindex[0..255] (to do after * unbias) * ------------------------------------------------------------------------------- */ public void inxbuild() { int i, j, smallpos, smallval; int[] p; int[] q; int previouscol, startpos; previouscol = 0; startpos = 0; for (i = 0; i < netsize; i++) { p = network[i]; smallpos = i; smallval = p[1]; /* index on g */ /* find smallest in i..netsize-1 */ for (j = i + 1; j < netsize; j++) { q = network[j]; if (q[1] < smallval) { /* index on g */ smallpos = j; smallval = q[1]; /* index on g */ } } q = network[smallpos]; /* swap p (i) and q (smallpos) entries */ if (i != smallpos) { j = q[0]; q[0] = p[0]; p[0] = j; j = q[1]; q[1] = p[1]; p[1] = j; j = q[2]; q[2] = p[2]; p[2] = j; j = q[3]; q[3] = p[3]; p[3] = j; } /* smallval entry is now in position i */ if (smallval != previouscol) { netindex[previouscol] = (startpos + i) >> 1; for (j = previouscol + 1; j < smallval; j++) netindex[j] = i; previouscol = smallval; startpos = i; } } netindex[previouscol] = (startpos + maxnetpos) >> 1; for (j = previouscol + 1; j < 256; j++) netindex[j] = maxnetpos; /* really 256 */ } /* * Main Learning Loop ------------------ */ public void learn() { int i, j, b, g, r; int radius, rad, alpha, step, delta, samplepixels; byte[] p; int pix, lim; if (lengthcount < minpicturebytes) samplefac = 1; alphadec = 30 + ((samplefac - 1) / 3); p = thepicture; pix = 0; lim = lengthcount; samplepixels = lengthcount / (3 * samplefac); delta = samplepixels / ncycles; alpha = initalpha; radius = initradius; rad = radius >> radiusbiasshift; if (rad <= 1) rad = 0; for (i = 0; i < rad; i++) radpower[i] = alpha * (((rad * rad - i * i) * radbias) / (rad * rad)); // fprintf(stderr,"beginning 1D learning: initial radius=%d\n", rad); if (lengthcount < minpicturebytes) step = 3; else if ((lengthcount % prime1) != 0) step = 3 * prime1; else { if ((lengthcount % prime2) != 0) step = 3 * prime2; else { if ((lengthcount % prime3) != 0) step = 3 * prime3; else step = 3 * prime4; } } i = 0; while (i < samplepixels) { b = (p[pix + 0] & 0xff) << netbiasshift; g = (p[pix + 1] & 0xff) << netbiasshift; r = (p[pix + 2] & 0xff) << netbiasshift; j = contest(b, g, r); altersingle(alpha, j, b, g, r); if (rad != 0) alterneigh(rad, j, b, g, r); /* alter neighbours */ pix += step; if (pix >= lim) pix -= lengthcount; i++; if (delta == 0) delta = 1; if (i % delta == 0) { alpha -= alpha / alphadec; radius -= radius / radiusdec; rad = radius >> radiusbiasshift; if (rad <= 1) rad = 0; for (j = 0; j < rad; j++) radpower[j] = alpha * (((rad * rad - j * j) * radbias) / (rad * rad)); } } // fprintf(stderr,"finished 1D learning: final alpha=%f // !\n",((float)alpha)/initalpha); } /* * Search for BGR values 0..255 (after net is unbiased) and return colour * index * ---------------------------------------------------------------------------- */ public int map(int b, int g, int r) { int i, j, dist, a, bestd; int[] p; int best; bestd = 1000; /* biggest possible dist is 256*3 */ best = -1; i = netindex[g]; /* index on g */ j = i - 1; /* start at netindex[g] and work outwards */ while ((i < netsize) || (j >= 0)) { if (i < netsize) { p = network[i]; dist = p[1] - g; /* inx key */ if (dist >= bestd) i = netsize; /* stop iter */ else { i++; if (dist < 0) dist = -dist; a = p[0] - b; if (a < 0) a = -a; dist += a; if (dist < bestd) { a = p[2] - r; if (a < 0) a = -a; dist += a; if (dist < bestd) { bestd = dist; best = p[3]; } } } } if (j >= 0) { p = network[j]; dist = g - p[1]; /* inx key - reverse dif */ if (dist >= bestd) j = -1; /* stop iter */ else { j--; if (dist < 0) dist = -dist; a = p[0] - b; if (a < 0) a = -a; dist += a; if (dist < bestd) { a = p[2] - r; if (a < 0) a = -a; dist += a; if (dist < bestd) { bestd = dist; best = p[3]; } } } } } return (best); } public byte[] process() { learn(); unbiasnet(); inxbuild(); return colorMap(); } /* * Unbias network to give byte values 0..255 and record position i to * prepare for sort * ----------------------------------------------------------------------------------- */ public void unbiasnet() { int i, j; for (i = 0; i < netsize; i++) { network[i][0] >>= netbiasshift; network[i][1] >>= netbiasshift; network[i][2] >>= netbiasshift; network[i][3] = i; /* record colour no */ } } /* * Move adjacent neurons by precomputed alpha*(1-((i-j)^2/[r]^2)) in * radpower[|i-j|] * --------------------------------------------------------------------------------- */ protected void alterneigh(int rad, int i, int b, int g, int r) { int j, k, lo, hi, a, m; int[] p; lo = i - rad; if (lo < -1) lo = -1; hi = i + rad; if (hi > netsize) hi = netsize; j = i + 1; k = i - 1; m = 1; while ((j < hi) || (k > lo)) { a = radpower[m++]; if (j < hi) { p = network[j++]; try { p[0] -= (a * (p[0] - b)) / alpharadbias; p[1] -= (a * (p[1] - g)) / alpharadbias; p[2] -= (a * (p[2] - r)) / alpharadbias; } catch (Exception e) { } // prevents 1.3 miscompilation } if (k > lo) { p = network[k--]; try { p[0] -= (a * (p[0] - b)) / alpharadbias; p[1] -= (a * (p[1] - g)) / alpharadbias; p[2] -= (a * (p[2] - r)) / alpharadbias; } catch (Exception e) { } } } } /* * Move neuron i towards biased (b,g,r) by factor alpha * ---------------------------------------------------- */ protected void altersingle(int alpha, int i, int b, int g, int r) { /* alter hit neuron */ int[] n = network[i]; n[0] -= (alpha * (n[0] - b)) / initalpha; n[1] -= (alpha * (n[1] - g)) / initalpha; n[2] -= (alpha * (n[2] - r)) / initalpha; } /* * Search for biased BGR values ---------------------------- */ protected int contest(int b, int g, int r) { /* finds closest neuron (min dist) and updates freq */ /* finds best neuron (min dist-bias) and returns position */ /* * for frequently chosen neurons, freq[i] is high and bias[i] is * negative */ /* bias[i] = gamma*((1/netsize)-freq[i]) */ int i, dist, a, biasdist, betafreq; int bestpos, bestbiaspos, bestd, bestbiasd; int[] n; bestd = ~(((int) 1) << 31); bestbiasd = bestd; bestpos = -1; bestbiaspos = bestpos; for (i = 0; i < netsize; i++) { n = network[i]; dist = n[0] - b; if (dist < 0) dist = -dist; a = n[1] - g; if (a < 0) a = -a; dist += a; a = n[2] - r; if (a < 0) a = -a; dist += a; if (dist < bestd) { bestd = dist; bestpos = i; } biasdist = dist - ((bias[i]) >> (intbiasshift - netbiasshift)); if (biasdist < bestbiasd) { bestbiasd = biasdist; bestbiaspos = i; } betafreq = (freq[i] >> betashift); freq[i] -= betafreq; bias[i] += (betafreq << gammashift); } freq[bestpos] += beta; bias[bestpos] -= betagamma; return (bestbiaspos); } } // ============================================================================== // Adapted from Jef Poskanzer's Java port by way of J. M. G. Elliott. // K Weiner 12/00 class LZWEncoder { private static final int EOF = -1; private int imgW, imgH; private byte[] pixAry; private int initCodeSize; private int remaining; private int curPixel; // GIFCOMPR.C - GIF Image compression routines // // Lempel-Ziv compression based on 'compress'. GIF modifications by // David Rowley (mgardi@watdcsu.waterloo.edu) // General DEFINEs static final int BITS = 12; static final int HSIZE = 5003; // 80% occupancy // GIF Image compression - modified 'compress' // // Based on: compress.c - File compression ala IEEE Computer, June 1984. // // By Authors: Spencer W. Thomas (decvax!harpo!utah-cs!utah-gr!thomas) // Jim McKie (decvax!mcvax!jim) // Steve Davies (decvax!vax135!petsd!peora!srd) // Ken Turkowski (decvax!decwrl!turtlevax!ken) // James A. Woods (decvax!ihnp4!ames!jaw) // Joe Orost (decvax!vax135!petsd!joe) int n_bits; // number of bits/code int maxbits = BITS; // user settable max # bits/code int maxcode; // maximum code, given n_bits int maxmaxcode = 1 << BITS; // should NEVER generate this code int[] htab = new int[HSIZE]; int[] codetab = new int[HSIZE]; int hsize = HSIZE; // for dynamic table sizing int free_ent = 0; // first unused entry // block compression parameters -- after all codes are used up, // and compression rate changes, start over. boolean clear_flg = false; // Algorithm: use open addressing double hashing (no chaining) on the // prefix code / next character combination. We do a variant of Knuth's // algorithm D (vol. 3, sec. 6.4) along with G. Knott's relatively-prime // secondary probe. Here, the modular division first probe is gives way // to a faster exclusive-or manipulation. Also do block compression with // an adaptive reset, whereby the code table is cleared when the compression // ratio decreases, but after the table fills. The variable-length output // codes are re-sized at this point, and a special CLEAR code is generated // for the decompressor. Late addition: construct the table according to // file size for noticeable speed improvement on small files. Please direct // questions about this implementation to ames!jaw. int g_init_bits; int ClearCode; int EOFCode; // output // // Output the given code. // Inputs: // code: A n_bits-bit integer. If == -1, then EOF. This assumes // that n_bits =< wordsize - 1. // Outputs: // Outputs code to the file. // Assumptions: // Chars are 8 bits long. // Algorithm: // Maintain a BITS character long buffer (so that 8 codes will // fit in it exactly). Use the VAX insv instruction to insert each // code in turn. When the buffer fills up empty it and start over. int cur_accum = 0; int cur_bits = 0; int masks[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }; // Number of characters so far in this 'packet' int a_count; // Define the storage for the packet accumulator byte[] accum = new byte[256]; // ---------------------------------------------------------------------------- LZWEncoder(int width, int height, byte[] pixels, int color_depth) { imgW = width; imgH = height; pixAry = pixels; initCodeSize = Math.max(2, color_depth); } // Add a character to the end of the current packet, and if it is 254 // characters, flush the packet to disk. void char_out(byte c, OutputStream outs) throws IOException { accum[a_count++] = c; if (a_count >= 254) flush_char(outs); } // Clear out the hash table // table clear for block compress void cl_block(OutputStream outs) throws IOException { cl_hash(hsize); free_ent = ClearCode + 2; clear_flg = true; output(ClearCode, outs); } // reset code table void cl_hash(int hsize) { for (int i = 0; i < hsize; ++i) htab[i] = -1; } void compress(int init_bits, OutputStream outs) throws IOException { int fcode; int i /* = 0 */; int c; int ent; int disp; int hsize_reg; int hshift; // Set up the globals: g_init_bits - initial number of bits g_init_bits = init_bits; // Set up the necessary values clear_flg = false; n_bits = g_init_bits; maxcode = MAXCODE(n_bits); ClearCode = 1 << (init_bits - 1); EOFCode = ClearCode + 1; free_ent = ClearCode + 2; a_count = 0; // clear packet ent = nextPixel(); hshift = 0; for (fcode = hsize; fcode < 65536; fcode *= 2) ++hshift; hshift = 8 - hshift; // set hash code range bound hsize_reg = hsize; cl_hash(hsize_reg); // clear hash table output(ClearCode, outs); outer_loop: while ((c = nextPixel()) != EOF) { fcode = (c << maxbits) + ent; i = (c << hshift) ^ ent; // xor hashing if (htab[i] == fcode) { ent = codetab[i]; continue; } else if (htab[i] >= 0) // non-empty slot { disp = hsize_reg - i; // secondary hash (after G. Knott) if (i == 0) disp = 1; do { if ((i -= disp) < 0) i += hsize_reg; if (htab[i] == fcode) { ent = codetab[i]; continue outer_loop; } } while (htab[i] >= 0); } output(ent, outs); ent = c; if (free_ent < maxmaxcode) { codetab[i] = free_ent++; // code -> hashtable htab[i] = fcode; } else cl_block(outs); } // Put out the final code. output(ent, outs); output(EOFCode, outs); } // ---------------------------------------------------------------------------- void encode(OutputStream os) throws IOException { os.write(initCodeSize); // write "initial code size" byte remaining = imgW * imgH; // reset navigation variables curPixel = 0; compress(initCodeSize + 1, os); // compress and write the pixel data os.write(0); // write block terminator } // Flush the packet to disk, and reset the accumulator void flush_char(OutputStream outs) throws IOException { if (a_count > 0) { outs.write(a_count); outs.write(accum, 0, a_count); a_count = 0; } } final int MAXCODE(int n_bits) { return (1 << n_bits) - 1; } // ---------------------------------------------------------------------------- // Return the next pixel from the image // ---------------------------------------------------------------------------- private int nextPixel() { if (remaining == 0) return EOF; --remaining; byte pix = pixAry[curPixel++]; return pix & 0xff; } void output(int code, OutputStream outs) throws IOException { cur_accum &= masks[cur_bits]; if (cur_bits > 0) cur_accum |= (code << cur_bits); else cur_accum = code; cur_bits += n_bits; while (cur_bits >= 8) { char_out((byte) (cur_accum & 0xff), outs); cur_accum >>= 8; cur_bits -= 8; } // If the next entry is going to be too big for the code size, // then increase it, if possible. if (free_ent > maxcode || clear_flg) { if (clear_flg) { maxcode = MAXCODE(n_bits = g_init_bits); clear_flg = false; } else { ++n_bits; if (n_bits == maxbits) maxcode = maxmaxcode; else maxcode = MAXCODE(n_bits); } } if (code == EOFCode) { // At EOF, write the rest of the buffer. while (cur_bits > 0) { char_out((byte) (cur_accum & 0xff), outs); cur_accum >>= 8; cur_bits -= 8; } flush_char(outs); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/Annotated.java000066400000000000000000000030631312650303100241740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; public interface Annotated { public DisplayPositionned getTitle(); public DisplayPositionned getCaption(); public DisplayPositionned getLegend(); public DisplayPositionned getHeader(); public DisplayPositionned getFooter(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/AnnotatedWorker.java000066400000000000000000000111361312650303100253660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.activitydiagram3.ftile.EntityImageLegend; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.svek.DecorateEntityImage; import net.sourceforge.plantuml.svek.TextBlockBackcolored; public class AnnotatedWorker { private final Annotated annotated; private final ISkinParam skinParam; public AnnotatedWorker(Annotated annotated, ISkinParam skinParam) { this.annotated = annotated; this.skinParam = skinParam; } public TextBlockBackcolored addAdd(TextBlock result) { result = addLegend(result); result = addTitle(result); result = addCaption(result); result = addHeaderAndFooter(result); return (TextBlockBackcolored) result; } private TextBlock addLegend(TextBlock original) { if (DisplayPositionned.isNull(annotated.getLegend())) { return original; } final TextBlock text = EntityImageLegend.create(annotated.getLegend().getDisplay(), getSkinParam()); return DecorateEntityImage.add(original, text, annotated.getLegend().getHorizontalAlignment(), annotated .getLegend().getVerticalAlignment()); } private ISkinParam getSkinParam() { return skinParam; } private TextBlock addCaption(TextBlock original) { if (DisplayPositionned.isNull(annotated.getCaption())) { return original; } final TextBlock text = getCaption(); return DecorateEntityImage.addBottom(original, text, HorizontalAlignment.CENTER); } public TextBlock getCaption() { if (DisplayPositionned.isNull(annotated.getCaption())) { return TextBlockUtils.empty(0, 0); } return annotated .getCaption() .getDisplay() .create(new FontConfiguration(getSkinParam(), FontParam.CAPTION, null), HorizontalAlignment.CENTER, getSkinParam()); } private TextBlock addTitle(TextBlock original) { final DisplayPositionned title = annotated.getTitle(); if (DisplayPositionned.isNull(title)) { return original; } ISkinParam skinParam = getSkinParam(); final FontConfiguration fontConfiguration = new FontConfiguration(skinParam, FontParam.TITLE, null); final TextBlock block = TextBlockUtils.title(fontConfiguration, title.getDisplay(), skinParam); return DecorateEntityImage.addTop(original, block, HorizontalAlignment.CENTER); } private TextBlock addHeaderAndFooter(TextBlock original) { if (DisplayPositionned.isNull(annotated.getFooter()) && DisplayPositionned.isNull(annotated.getHeader())) { return original; } final TextBlock textFooter = DisplayPositionned.isNull(annotated.getFooter()) ? null : annotated .getFooter() .getDisplay() .create(new FontConfiguration(getSkinParam(), FontParam.FOOTER, null), annotated.getFooter().getHorizontalAlignment(), getSkinParam()); final TextBlock textHeader = DisplayPositionned.isNull(annotated.getHeader()) ? null : annotated .getHeader() .getDisplay() .create(new FontConfiguration(getSkinParam(), FontParam.HEADER, null), annotated.getHeader().getHorizontalAlignment(), getSkinParam()); return new DecorateEntityImage(original, textHeader, annotated.getHeader().getHorizontalAlignment(), textFooter, annotated.getFooter().getHorizontalAlignment()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/BackSlash.java000066400000000000000000000074721312650303100241220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; public class BackSlash { private static final char PRIVATE_BLOCK = '\uE000'; public static final String BS_BS_N = "\\n"; public static final String NEWLINE = "\n"; public static final char CHAR_NEWLINE = '\n'; public static char hiddenNewLine() { return PRIVATE_BLOCK + BackSlash.CHAR_NEWLINE; } public static String convertHiddenNewLine(String s) { s = s.replaceAll("(? splitHiddenNewLine(String s) { return Arrays.asList(s.split("" + hiddenNewLine())); } public static String manageNewLine(String string) { return string.replace(hiddenNewLine(), BackSlash.CHAR_NEWLINE); } public static List getWithNewlines(CharSequence s) { if (s == null) { return null; } final List result = new ArrayList(); final StringBuilder current = new StringBuilder(); for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); if (c == '\\' && i < s.length() - 1) { final char c2 = s.charAt(i + 1); i++; if (c2 == 'n') { result.add(current.toString()); current.setLength(0); } else if (c2 == 't') { current.append('\t'); } else if (c2 == '\\') { current.append(c2); } } else { current.append(c); } } result.add(current.toString()); return Collections.unmodifiableList(result); } public static String translateBackSlashes(CharSequence s) { if (s == null) { return null; } final StringBuilder result = new StringBuilder(); for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); if (c == '\\' && i < s.length() - 1 && isEnglishLetter(s.charAt(i + 1))) { result.append('\\'); result.append(translateChar(s.charAt(i + 1))); i++; } else { result.append(c); } } return result.toString(); } public static String untranslateBackSlashes(CharSequence s) { if (s == null) { return null; } final StringBuilder result = new StringBuilder(); for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (c > PRIVATE_BLOCK && c < '\uE07F') { c = (char) (c - PRIVATE_BLOCK); } result.append(c); } return result.toString(); } private static boolean isEnglishLetter(char c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); } private static char translateChar(char c) { if (c > 128) { throw new IllegalArgumentException(); } return (char) (PRIVATE_BLOCK + c); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/BaseFile.java000066400000000000000000000042141312650303100237300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; public class BaseFile { private final String basename; private final File basedir; public BaseFile() { this.basedir = null; this.basename = null; } public BaseFile(File file) { this.basedir = file.getParentFile(); this.basename = extractBasename(file.getName()); } private static String extractBasename(String name) { final int idx = name.lastIndexOf('.'); if (idx == -1) { return name; } return name.substring(0, idx); } @Override public String toString() { if (basedir == null || basename == null) { return "(DEFAULT)"; } return basedir + " " + basename; } public String getBasename() { return basename; } public File getBasedir() { return basedir; } public File getTraceFile(String tail) { if (basedir == null || basename == null) { return new File(tail); } return new File(basedir, basename + "_" + tail); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/BasicEnsureVisible.java000066400000000000000000000041401312650303100257750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public class BasicEnsureVisible implements EnsureVisible { private double minX = Double.MAX_VALUE; private double maxX = -Double.MAX_VALUE; private double minY = Double.MAX_VALUE; private double maxY = -Double.MAX_VALUE; public void ensureVisible(double x, double y) { if (x > maxX) { maxX = x; } if (x < minX) { minX = x; } if (y > maxY) { maxY = y; } if (y < minY) { minY = y; } } public String getCoords(double scale) { if (minX == Double.MAX_VALUE) { return "0,0,0,0"; } final int x1 = (int) (minX * scale); final int y1 = (int) (minY * scale); final int x2 = (int) (maxX * scale); final int y2 = (int) (maxY * scale); return "" + x1 + "," + y1 + "," + x2 + "," + y2; } public double getSurface() { if (minX == Double.MAX_VALUE) { return 0; } return (maxX - minX) * (maxY - minY); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/BlockUml.java000066400000000000000000000125071312650303100237720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.IOException; import java.security.MessageDigest; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.code.AsciiEncoder; import net.sourceforge.plantuml.code.Transcoder; import net.sourceforge.plantuml.code.TranscoderUtil; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.utils.StartUtils; import net.sourceforge.plantuml.version.Version; public class BlockUml { private final List data; private final int startLine; private Diagram system; private final Defines localDefines; BlockUml(String... strings) { this(convert(strings), 0, Defines.createEmpty()); } public String getEncodedUrl() throws IOException { final Transcoder transcoder = TranscoderUtil.getDefaultTranscoder(); final String source = getDiagram().getSource().getPlainString(); final String encoded = transcoder.encode(source); return encoded; } public String getFlashData() { final StringBuilder sb = new StringBuilder(); for (CharSequence2 line : data) { sb.append(line); sb.append('\r'); sb.append(BackSlash.CHAR_NEWLINE); } return sb.toString(); } public static List convert(String... strings) { return convert(Arrays.asList(strings)); } public static List convert(List strings) { final List result = new ArrayList(); LineLocationImpl location = new LineLocationImpl("block", null); for (String s : strings) { location = location.oneLineRead(); result.add(new CharSequence2Impl(s, location)); } return result; } public BlockUml(List strings, int startLine, Defines defines) { this.startLine = startLine; this.localDefines = defines; final CharSequence2 s0 = strings.get(0).trin(); if (StartUtils.startsWithSymbolAnd("start", s0) == false) { throw new IllegalArgumentException(); } this.data = new ArrayList(strings); } public String getFileOrDirname() { if (OptionFlags.getInstance().isWord()) { return null; } final Matcher2 m = StartUtils.patternFilename.matcher(StringUtils.trin(data.get(0).toString())); final boolean ok = m.find(); if (ok == false) { return null; } String result = m.group(1); final int x = result.indexOf(','); if (x != -1) { result = result.substring(0, x); } for (int i = 0; i < result.length(); i++) { final char c = result.charAt(i); if ("<>|".indexOf(c) != -1) { return null; } } if (result.startsWith("file://")) { result = result.substring("file://".length()); } result = result.replaceAll("\\.\\w\\w\\w$", ""); return result; } public Diagram getDiagram() { if (system == null) { system = new PSystemBuilder().createPSystem(data, startLine); } return system; } public final int getStartLine() { return startLine; } public final List getData() { return data; } private String internalEtag() { try { final AsciiEncoder coder = new AsciiEncoder(); final MessageDigest msgDigest = MessageDigest.getInstance("MD5"); for (CharSequence s : data) { msgDigest.update(s.toString().getBytes("UTF-8")); } final byte[] digest = msgDigest.digest(); return coder.encode(digest); } catch (Exception e) { e.printStackTrace(); return "NOETAG"; } } public String etag() { return Version.etag() + internalEtag(); } public long lastModified() { return (Version.compileTime() / 1000L / 60) * 1000L * 60 + Version.beta() * 1000L * 3600; } public boolean isStartDef(String name) { final String signature = "@startdef(id=" + name + ")"; return data.get(0).toString().equalsIgnoreCase(signature); } public List getDefinition() { if (data.get(0).toString().startsWith("@startdef") == false) { throw new IllegalStateException(); } return Collections.unmodifiableList(data.subList(1, data.size() - 1)); } public Defines getLocalDefines() { return localDefines; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/BlockUmlBuilder.java000066400000000000000000000110741312650303100252770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; import java.io.IOException; import java.io.Reader; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.preproc.FileWithSuffix; import net.sourceforge.plantuml.preproc.Preprocessor; import net.sourceforge.plantuml.preproc.ReadLineReader; import net.sourceforge.plantuml.preproc.UncommentReadLine; import net.sourceforge.plantuml.utils.StartUtils; public final class BlockUmlBuilder implements DefinitionsContainer { private final List blocks = new ArrayList(); private Set usedFiles = new HashSet(); private final UncommentReadLine reader2; private final Defines defines; public BlockUmlBuilder(List config, String charset, Defines defines, Reader reader, File newCurrentDir, String desc) throws IOException { Preprocessor includer = null; this.defines = defines; try { reader2 = new UncommentReadLine(new ReadLineReader(reader, desc)); includer = new Preprocessor(reader2, charset, defines, newCurrentDir, this); init(includer, config); } finally { if (includer != null) { includer.close(); usedFiles = includer.getFilesUsed(); } } } public BlockUmlBuilder(List config, String charset, Defines defines, Reader reader) throws IOException { this(config, charset, defines, reader, null, null); } private void init(Preprocessor includer, List config) throws IOException { CharSequence2 s = null; List current2 = null; boolean paused = false; int startLine = 0; while ((s = includer.readLine()) != null) { if (StartUtils.isArobaseStartDiagram(s)) { current2 = new ArrayList(); paused = false; startLine = includer.getLineNumber(); } if (StartUtils.isArobasePauseDiagram(s)) { paused = true; reader2.setPaused(true); } if (current2 != null && paused == false) { current2.add(s); } else if (paused) { final CharSequence2 append = StartUtils.getPossibleAppend(s); if (append != null) { current2.add(append); } } if (StartUtils.isArobaseUnpauseDiagram(s)) { paused = false; reader2.setPaused(false); } if (StartUtils.isArobaseEndDiagram(s) && current2 != null) { current2.addAll(1, convert(config, new LineLocationImpl(null, null).oneLineRead())); blocks.add(new BlockUml(current2, startLine - config.size(), defines.cloneMe())); current2 = null; reader2.setPaused(false); } } } private Collection convert(List config, LineLocation location) { final List result = new ArrayList(); for (String s : config) { result.add(new CharSequence2Impl(s, location)); } return result; } public List getBlockUmls() { return Collections.unmodifiableList(blocks); } public final Set getIncludedFiles() { return Collections.unmodifiableSet(usedFiles); } public List getDefinition(String name) { for (BlockUml block : blocks) { if (block.isStartDef(name)) { this.defines.importFrom(block.getLocalDefines()); return block.getDefinition(); } } return Collections.emptyList(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/CMapData.java000066400000000000000000000053321312650303100236720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; public class CMapData { private final StringBuilder stringBuilder = new StringBuilder(); public String asString(String nameId) { return "\n" + stringBuilder.toString() + "\n"; } public boolean containsData() { return stringBuilder.length() > 0; } public void appendString(String s) { stringBuilder.append(s); } public void appendLong(long s) { stringBuilder.append(s); } public void appendUrl(int seq, Url url, double scale) { appendString("\"\""); appendString(BackSlash.NEWLINE); } // private CMapData() { // } public static CMapData cmapString(Set allUrlEncountered, double scale) { final CMapData cmapdata = new CMapData(); final List all = new ArrayList(allUrlEncountered); Collections.sort(all, Url.SURFACE_COMPARATOR); int seq = 1; for (Url u : all) { cmapdata.appendUrl(seq, u, scale); seq++; } return cmapdata; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/CharSequence2.java000066400000000000000000000032551312650303100247120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public interface CharSequence2 extends CharSequence { public int length(); public char charAt(int index); public CharSequence2 subSequence(int start, int end); public String toString2(); public LineLocation getLocation(); public CharSequence2 trin(); public boolean startsWith(String string); public String getPreprocessorError(); public CharSequence2 withErrorPreprocessor(String preprocessorError); } plantuml-1.2017.15/src/net/sourceforge/plantuml/CharSequence2Impl.java000066400000000000000000000055161312650303100255360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public class CharSequence2Impl implements CharSequence2 { private final CharSequence s; private final LineLocation location; private String preprocessorError; public CharSequence2Impl(CharSequence s, LineLocation location) { this(s, location, null); } public CharSequence2Impl(CharSequence s, LineLocation location, String preprocessorError) { if (s == null) { throw new IllegalArgumentException(); } this.s = s; this.location = location; this.preprocessorError = preprocessorError; } // public static CharSequence2 errorPreprocessor(CharSequence s, String preprocessorError) { // return new CharSequence2Impl("FOO4242", null, preprocessorError); // } public CharSequence2 withErrorPreprocessor(String preprocessorError) { return new CharSequence2Impl(s, location, preprocessorError); } public int length() { return s.length(); } public char charAt(int index) { return s.charAt(index); } public CharSequence2 subSequence(int start, int end) { return new CharSequence2Impl(s.subSequence(start, end), location, preprocessorError); } public CharSequence toCharSequence() { return s; } @Override public String toString() { return s.toString(); } public String toString2() { return s.toString(); } public LineLocation getLocation() { return location; } public CharSequence2 trin() { return new CharSequence2Impl(StringUtils.trin(s.toString()), location, preprocessorError); } public boolean startsWith(String start) { return s.toString().startsWith(start); } public String getPreprocessorError() { return preprocessorError; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ColorParam.java000066400000000000000000000206021312650303100243140ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.color.ColorType; public enum ColorParam { background(HtmlColorUtils.WHITE, true, ColorType.BACK), hyperlink(HtmlColorUtils.BLUE), activityDiamondBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), activityDiamondBorder(HtmlColorUtils.MY_RED, ColorType.LINE), activityBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), activityBorder(HtmlColorUtils.MY_RED, ColorType.LINE), activityStart(HtmlColorUtils.BLACK), activityEnd(HtmlColorUtils.BLACK), activityBar(HtmlColorUtils.BLACK), // activityArrow(HtmlColorUtils.MY_RED, ColorType.ARROW), swimlaneBorder(HtmlColorUtils.BLACK), usecaseBorder(HtmlColorUtils.MY_RED, ColorType.LINE), usecaseBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), // usecaseArrow(HtmlColorUtils.MY_RED, ColorType.ARROW), objectBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), objectBorder(HtmlColorUtils.MY_RED, ColorType.LINE), // objectArrow(HtmlColorUtils.MY_RED, ColorType.ARROW), classHeaderBackground(null, true, ColorType.BACK), classBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), classBorder(HtmlColorUtils.MY_RED, ColorType.LINE), stereotypeCBackground(HtmlColorUtils.COL_ADD1B2), stereotypeNBackground(HtmlColorUtils.COL_E3664A), stereotypeABackground(HtmlColorUtils.COL_A9DCDF), stereotypeIBackground(HtmlColorUtils.COL_B4A7E5), stereotypeEBackground(HtmlColorUtils.COL_EB937F), // classArrow(HtmlColorUtils.MY_RED, ColorType.ARROW), packageBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), packageBorder(HtmlColorUtils.BLACK, ColorType.LINE), partitionBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), partitionBorder(HtmlColorUtils.BLACK, ColorType.LINE), componentBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), componentBorder(HtmlColorUtils.MY_RED, ColorType.LINE), interfaceBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), interfaceBorder(HtmlColorUtils.MY_RED, ColorType.LINE), arrow(HtmlColorUtils.MY_RED, ColorType.ARROW), stateBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), stateBorder(HtmlColorUtils.MY_RED, ColorType.LINE), // stateArrow(HtmlColorUtils.MY_RED, ColorType.ARROW), stateStart(HtmlColorUtils.BLACK), stateEnd(HtmlColorUtils.BLACK), noteBackground(HtmlColorUtils.COL_FBFB77, true, ColorType.BACK), noteBorder(HtmlColorUtils.MY_RED, ColorType.LINE), legendBackground(HtmlColorUtils.COL_DDDDDD, true, ColorType.BACK), legendBorder(HtmlColorUtils.BLACK, ColorType.LINE), titleBackground(null, true, ColorType.BACK), titleBorder(null, ColorType.LINE), diagramBorder(null, ColorType.LINE), actorBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), actorBorder(HtmlColorUtils.MY_RED, ColorType.LINE), participantBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), participantBorder(HtmlColorUtils.MY_RED, ColorType.LINE), sequenceGroupBorder(HtmlColorUtils.BLACK, ColorType.LINE), sequenceGroupBackground(HtmlColorUtils.COL_EEEEEE, true, ColorType.BACK), sequenceGroupBodyBackground(HtmlColorUtils.RED, true, ColorType.BACK), sequenceReferenceBorder(HtmlColorUtils.BLACK, ColorType.LINE), sequenceReferenceHeaderBackground(HtmlColorUtils.COL_EEEEEE, true, ColorType.BACK), sequenceReferenceBackground(HtmlColorUtils.WHITE, true, ColorType.BACK), sequenceDividerBackground(HtmlColorUtils.COL_EEEEEE, true, ColorType.BACK), sequenceDividerBorder(HtmlColorUtils.BLACK, ColorType.LINE), sequenceLifeLineBackground(HtmlColorUtils.WHITE, true, ColorType.BACK), sequenceLifeLineBorder(HtmlColorUtils.MY_RED, ColorType.LINE), sequenceNewpageSeparator(HtmlColorUtils.BLACK, ColorType.LINE), // sequenceArrow(HtmlColorUtils.MY_RED), sequenceBoxBorder(HtmlColorUtils.MY_RED, ColorType.LINE), sequenceBoxBackground(HtmlColorUtils.COL_DDDDDD, true, ColorType.BACK), artifactBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), artifactBorder(HtmlColorUtils.BLACK, ColorType.LINE), cloudBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), cloudBorder(HtmlColorUtils.BLACK, ColorType.LINE), queueBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), queueBorder(HtmlColorUtils.MY_RED, ColorType.LINE), stackBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), stackBorder(HtmlColorUtils.MY_RED, ColorType.LINE), databaseBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), databaseBorder(HtmlColorUtils.BLACK, ColorType.LINE), folderBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), folderBorder(HtmlColorUtils.BLACK, ColorType.LINE), fileBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), fileBorder(HtmlColorUtils.BLACK, ColorType.LINE), frameBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), frameBorder(HtmlColorUtils.BLACK, ColorType.LINE), nodeBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), nodeBorder(HtmlColorUtils.BLACK, ColorType.LINE), rectangleBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), rectangleBorder(HtmlColorUtils.BLACK, ColorType.LINE), agentBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), agentBorder(HtmlColorUtils.MY_RED, ColorType.LINE), storageBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), storageBorder(HtmlColorUtils.BLACK, ColorType.LINE), boundaryBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), boundaryBorder(HtmlColorUtils.MY_RED, ColorType.LINE), collectionsBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), collectionsBorder(HtmlColorUtils.MY_RED, ColorType.LINE), controlBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), controlBorder(HtmlColorUtils.MY_RED, ColorType.LINE), entityBackground(HtmlColorUtils.MY_YELLOW, true, ColorType.BACK), entityBorder(HtmlColorUtils.MY_RED, ColorType.LINE), iconPrivate(HtmlColorUtils.COL_C82930), iconPrivateBackground(HtmlColorUtils.COL_F24D5C), iconPackage(HtmlColorUtils.COL_1963A0), iconPackageBackground(HtmlColorUtils.COL_4177AF), iconProtected(HtmlColorUtils.COL_B38D22), iconProtectedBackground(HtmlColorUtils.COL_FFFF44), iconPublic(HtmlColorUtils.COL_038048), iconPublicBackground(HtmlColorUtils.COL_84BE84), iconIEMandatory(HtmlColorUtils.BLACK); private final boolean isBackground; private final HtmlColor defaultValue; private final ColorType colorType; private ColorParam(HtmlColor defaultValue, ColorType colorType) { this(defaultValue, false, colorType); } private ColorParam(HtmlColor defaultValue) { this(defaultValue, false, null); } private ColorParam() { this(null, false, null); } private ColorParam(boolean isBackground) { this(null, isBackground, null); } private ColorParam(HtmlColor defaultValue, boolean isBackground, ColorType colorType) { this.isBackground = isBackground; this.defaultValue = defaultValue; this.colorType = colorType; if (colorType == ColorType.BACK && isBackground == false) { System.err.println(this); throw new IllegalStateException(); } } protected boolean isBackground() { return isBackground; } public final HtmlColor getDefaultValue() { return defaultValue; } public ColorType getColorType() { return colorType; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/CounterOutputStream.java000066400000000000000000000041601312650303100262720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.IOException; import java.io.OutputStream; public class CounterOutputStream extends OutputStream { private int length; private final OutputStream os; public CounterOutputStream(OutputStream os) { this.os = os; } /** * Writes to nowhere */ @Override public void write(int b) throws IOException { os.write(b); length++; } /** * Overridden for performance reason */ @Override public void write(byte b[]) throws IOException { os.write(b); length += b.length; } /** * Overridden for performance reason */ @Override public void write(byte b[], int off, int len) throws IOException { os.write(b, off, len); length += len; } public int getLength() { return length; } @Override public void flush() throws IOException { os.flush(); } @Override public void close() throws IOException { os.close(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/DefinitionsContainer.java000066400000000000000000000026141312650303100263760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.util.List; public interface DefinitionsContainer { public List getDefinition(String name); } plantuml-1.2017.15/src/net/sourceforge/plantuml/Dimension2DDouble.java000066400000000000000000000074171312650303100255340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.utils.MathUtils; public class Dimension2DDouble extends Dimension2D { final private double width; final private double height; public Dimension2DDouble(double width, double height) { this.width = width; this.height = height; } @Override public String toString() { return "[" + width + "," + height + "]"; } @Override public double getHeight() { return height; } @Override public double getWidth() { return width; } @Override public void setSize(double width, double height) { throw new UnsupportedOperationException(); } public static Dimension2D delta(Dimension2D dim, double delta) { return delta(dim, delta, delta); } public static Dimension2D delta(Dimension2D dim, double deltaWidth, double deltaHeight) { if (deltaHeight == 0 && deltaWidth == 0) { return dim; } return new Dimension2DDouble(dim.getWidth() + deltaWidth, dim.getHeight() + deltaHeight); } public static Dimension2D mergeTB(Dimension2D top, Dimension2D bottom) { final double width = Math.max(top.getWidth(), bottom.getWidth()); final double height = top.getHeight() + bottom.getHeight(); return new Dimension2DDouble(width, height); } public static Dimension2D mergeTB(Dimension2D a, Dimension2D b, Dimension2D c) { final double width = MathUtils.max(a.getWidth(), b.getWidth(), c.getWidth()); final double height = a.getHeight() + b.getHeight() + c.getHeight(); return new Dimension2DDouble(width, height); } public static Dimension2D mergeLR(Dimension2D left, Dimension2D right) { final double height = Math.max(left.getHeight(), right.getHeight()); final double width = left.getWidth() + right.getWidth(); return new Dimension2DDouble(width, height); } public static Dimension2D mergeLayoutT12B3(Dimension2D top1, Dimension2D top2, Dimension2D bottom) { final double width = MathUtils.max(top1.getWidth(), top2.getWidth(), bottom.getWidth()); final double height = top1.getHeight() + top2.getHeight() + bottom.getHeight(); return new Dimension2DDouble(width, height); } public static Dimension2D max(Dimension2D dim1, Dimension2D dim2) { return atLeast(dim1, dim2.getWidth(), dim2.getHeight()); } public static Dimension2D atLeast(Dimension2D dim, double minWidth, double minHeight) { double h = dim.getHeight(); double w = dim.getWidth(); if (w > minWidth && h > minHeight) { return dim; } if (h < minHeight) { h = minHeight; } if (w < minWidth) { w = minWidth; } return new Dimension2DDouble(w, h); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/DirWatcher.java000066400000000000000000000074311312650303100243160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.preproc.FileWithSuffix; @Deprecated public class DirWatcher { final private File dir; final private Option option; final private String pattern; final private Map modifieds = new HashMap(); public DirWatcher(File dir, Option option, String pattern) { this.dir = dir; this.option = option; this.pattern = pattern; } public List buildCreatedFiles() throws IOException, InterruptedException { boolean error = false; final List result = new ArrayList(); for (File f : dir.listFiles()) { if (error) { continue; } if (f.isFile() == false) { continue; } if (fileToProcess(f.getName()) == false) { continue; } final FileWatcher watcher = modifieds.get(f); if (watcher == null || watcher.hasChanged()) { final SourceFileReader sourceFileReader = new SourceFileReader(Defines.createWithFileName(f), f, option.getOutputDir(), option.getConfig(), option.getCharset(), option.getFileFormatOption()); final Set files = FileWithSuffix.convert(sourceFileReader.getIncludedFiles()); files.add(f); for (GeneratedImage g : sourceFileReader.getGeneratedImages()) { result.add(g); if (option.isFailfastOrFailfast2() && g.lineErrorRaw() != -1) { error = true; } } modifieds.put(f, new FileWatcher(files)); } } Collections.sort(result); return Collections.unmodifiableList(result); } public File getErrorFile() throws IOException, InterruptedException { for (File f : dir.listFiles()) { if (f.isFile() == false) { continue; } if (fileToProcess(f.getName()) == false) { continue; } final FileWatcher watcher = modifieds.get(f); if (watcher == null || watcher.hasChanged()) { final SourceFileReader sourceFileReader = new SourceFileReader(Defines.createWithFileName(f), f, option.getOutputDir(), option.getConfig(), option.getCharset(), option.getFileFormatOption()); if (sourceFileReader.hasError()) { return f; } } } return null; } private boolean fileToProcess(String name) { return name.matches(pattern); } public final File getDir() { return dir; } // public void setPattern(String pattern) { // this.pattern = pattern; // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/DirWatcher2.java000066400000000000000000000101261312650303100243730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; import java.io.IOException; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import net.sourceforge.plantuml.preproc.FileWithSuffix; public class DirWatcher2 { final private File dir; final private Option option; final private String pattern; final private Map modifieds = new ConcurrentHashMap(); final private ExecutorService executorService; public DirWatcher2(File dir, Option option, String pattern) { this.dir = dir; this.option = option; this.pattern = pattern; final int nb = Option.defaultNbThreads(); this.executorService = Executors.newFixedThreadPool(nb); } public Map>> buildCreatedFiles() throws IOException, InterruptedException { final Map>> result = new TreeMap>>(); if (dir.listFiles() != null) { for (final File f : dir.listFiles()) { if (f.isFile() == false) { continue; } if (fileToProcess(f.getName()) == false) { continue; } final FileWatcher watcher = modifieds.get(f); if (watcher == null || watcher.hasChanged()) { final SourceFileReader sourceFileReader = new SourceFileReader(option.getDefaultDefines(f), f, option.getOutputDir(), option.getConfig(), option.getCharset(), option.getFileFormatOption()); modifieds.put(f, new FileWatcher(Collections.singleton(f))); final Future> value = executorService .submit(new Callable>() { public List call() throws Exception { try { final List generatedImages = sourceFileReader .getGeneratedImages(); final Set files = FileWithSuffix.convert(sourceFileReader .getIncludedFiles()); files.add(f); modifieds.put(f, new FileWatcher(files)); return Collections.unmodifiableList(generatedImages); } catch (Exception e) { e.printStackTrace(); return Collections.emptyList(); } } }); result.put(f, value); } } } return Collections.unmodifiableMap(result); } private boolean fileToProcess(String name) { return name.matches(pattern); } public final File getDir() { return dir; } public void cancel() { executorService.shutdownNow(); } public void waitEnd() throws InterruptedException { executorService.shutdown(); executorService.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/Direction.java000066400000000000000000000054461312650303100242060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.awt.geom.Point2D; public enum Direction { RIGHT, LEFT, DOWN, UP; public Direction getInv() { if (this == RIGHT) { return LEFT; } if (this == LEFT) { return RIGHT; } if (this == DOWN) { return UP; } if (this == UP) { return DOWN; } throw new IllegalStateException(); } public String getShortCode() { return name().substring(0, 1); } public static Direction fromChar(char c) { if (c == '<') { return Direction.LEFT; } if (c == '>') { return Direction.RIGHT; } if (c == '^') { return Direction.UP; } return Direction.DOWN; } public Direction clockwise() { if (this == RIGHT) { return DOWN; } if (this == LEFT) { return UP; } if (this == DOWN) { return LEFT; } if (this == UP) { return RIGHT; } throw new IllegalStateException(); } public static Direction leftOrRight(Point2D p1, Point2D p2) { if (p1.getX() < p2.getX()) { return Direction.LEFT; } if (p1.getX() > p2.getX()) { return Direction.RIGHT; } throw new IllegalArgumentException(); } public static Direction fromVector(Point2D p1, Point2D p2) { final double x1 = p1.getX(); final double y1 = p1.getY(); final double x2 = p2.getX(); final double y2 = p2.getY(); if (x1 == x2 && y1 == y2) { return null; } if (x1 == x2) { if (y2 > y1) { return Direction.DOWN; } return Direction.UP; } if (y1 == y2) { if (x2 > x1) { return Direction.RIGHT; } return Direction.LEFT; } throw new IllegalArgumentException("Not a H or V line!"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/EmbededDiagram.java000066400000000000000000000033721312650303100250740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.cucadiagram.Display; public class EmbededDiagram implements CharSequence { private final Display system; public EmbededDiagram(Display system) { this.system = system; } public int length() { return toString().length(); } public char charAt(int index) { return toString().charAt(index); } public CharSequence subSequence(int start, int end) { return toString().subSequence(start, end); } public final Display getLines() { return system; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/EmptyImageBuilder.java000066400000000000000000000060761312650303100256360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.awt.Color; import java.awt.Graphics2D; import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.UAntiAliasing; import net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d; public class EmptyImageBuilder { private final BufferedImage im; private final Graphics2D g2d; public EmptyImageBuilder(double width, double height, Color background) { this((int) width, (int) height, background); } public EmptyImageBuilder(int width, int height, Color background) { if (width > GraphvizUtils.getenvImageLimit()) { Log.info("Width too large " + width); width = GraphvizUtils.getenvImageLimit(); } if (height > GraphvizUtils.getenvImageLimit()) { Log.info("Height too large " + height); height = GraphvizUtils.getenvImageLimit(); } Log.info("Creating image " + width + "x" + height); im = new BufferedImage(width, height, background == null ? BufferedImage.TYPE_INT_ARGB : BufferedImage.TYPE_INT_RGB); g2d = im.createGraphics(); UAntiAliasing.ANTI_ALIASING_ON.apply(g2d); if (background != null) { g2d.setColor(background); g2d.fillRect(0, 0, width, height); } } public EmptyImageBuilder(int width, int height, Color background, double dpiFactor) { this(width * dpiFactor, height * dpiFactor, background); if (dpiFactor != 1.0) { g2d.setTransform(AffineTransform.getScaleInstance(dpiFactor, dpiFactor)); } } public BufferedImage getBufferedImage() { return im; } public Graphics2D getGraphics2D() { return g2d; } public UGraphicG2d getUGraphicG2d() { final UGraphicG2d result = new UGraphicG2d(new ColorMapperIdentity(), g2d, 1.0); result.setBufferedImage(im); return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/EnsureVisible.java000066400000000000000000000025331312650303100250370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public interface EnsureVisible { public void ensureVisible(double x, double y); } plantuml-1.2017.15/src/net/sourceforge/plantuml/ErrorUml.java000066400000000000000000000055701312650303100240330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.suggest.SuggestEngineResult; import net.sourceforge.plantuml.suggest.SuggestEngineStatus; public class ErrorUml { private final String error; private final ErrorUmlType type; private SuggestEngineResult suggest; private final LineLocation lineLocation; // private final int startLine; public ErrorUml(ErrorUmlType type, String error, LineLocation lineLocation) { if (error == null || type == null || StringUtils.isEmpty(error)) { throw new IllegalArgumentException(); } // this.startLine = startLine; this.error = error; this.type = type; this.lineLocation = lineLocation; } @Override public boolean equals(Object obj) { final ErrorUml this2 = (ErrorUml) obj; return this.type == this2.type && this.getPosition() == this2.getPosition() && this.error.equals(this2.error); } @Override public int hashCode() { return error.hashCode() + type.hashCode() + getPosition() + (suggest == null ? 0 : suggest.hashCode()); } @Override public String toString() { return type.toString() + " " + getPosition() + " " + error + " " + suggest; } public final String getError() { return error; } public final ErrorUmlType getType() { return type; } public final int getPosition() { return lineLocation.getPosition(); } public final LineLocation getLineLocation() { return lineLocation; } public final SuggestEngineResult getSuggest() { return suggest; } public final boolean hasSuggest() { return suggest != null && suggest.getStatus() == SuggestEngineStatus.ONE_SUGGESTION; } public void setSuggest(SuggestEngineResult suggest) { this.suggest = suggest; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ErrorUmlType.java000066400000000000000000000025021312650303100246650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public enum ErrorUmlType { SYNTAX_ERROR, EXECUTION_ERROR } plantuml-1.2017.15/src/net/sourceforge/plantuml/FileFormat.java000066400000000000000000000110041312650303100243010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.awt.FontMetrics; import java.awt.Graphics2D; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.io.File; import net.sourceforge.plantuml.braille.BrailleCharFactory; import net.sourceforge.plantuml.braille.UGraphicBraille; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UFont; /** * Format for output files generated by PlantUML. * * @author Arnaud Roques * */ public enum FileFormat { PNG, SVG, EPS, EPS_TEXT, ATXT, UTXT, XMI_STANDARD, XMI_STAR, XMI_ARGO, SCXML, PDF, MJPEG, ANIMATED_GIF, HTML, HTML5, VDX, LATEX, LATEX_NO_PREAMBLE, BASE64, BRAILLE_PNG; /** * Returns the file format to be used for that format. * * @return a string starting by a point. */ public String getFileSuffix() { if (name().startsWith("XMI")) { return ".xmi"; } if (this == MJPEG) { return ".avi"; } if (this == LATEX_NO_PREAMBLE) { return ".latex"; } if (this == ANIMATED_GIF) { return ".gif"; } if (this == BRAILLE_PNG) { return ".braille.png"; } if (this == EPS_TEXT) { return EPS.getFileSuffix(); } return "." + StringUtils.goLowerCase(name()); } final static private BufferedImage imDummy = new BufferedImage(800, 100, BufferedImage.TYPE_INT_RGB); final static private Graphics2D gg = imDummy.createGraphics(); public StringBounder getDefaultStringBounder() { if (this == BRAILLE_PNG) { return new StringBounder() { public Dimension2D calculateDimension(UFont font, String text) { final int nb = BrailleCharFactory.build(text).size(); final double quanta = UGraphicBraille.QUANTA; final double height = 5 * quanta; final double width = 3 * nb * quanta + 1; return new Dimension2DDouble(width, height); } }; } return new StringBounder() { public Dimension2D calculateDimension(UFont font, String text) { final FontMetrics fm = gg.getFontMetrics(font.getFont()); final Rectangle2D rect = fm.getStringBounds(text, gg); return new Dimension2DDouble(rect.getWidth(), rect.getHeight()); } }; } /** * Check if this file format is Encapsulated PostScript. * * @return true for EPS. */ public boolean isEps() { if (this == EPS) { return true; } if (this == EPS_TEXT) { return true; } return false; } public String changeName(String fileName, int cpt) { if (cpt == 0) { return changeName(fileName, getFileSuffix()); } return changeName(fileName, OptionFlags.getInstance().getFileSeparator() + String.format("%03d", cpt) + getFileSuffix()); } private File computeFilename(File pngFile, int i) { if (i == 0) { return pngFile; } final File dir = pngFile.getParentFile(); return new File(dir, computeFilenameInternal(pngFile.getName(), i)); } private String changeName(String fileName, String replacement) { String result = fileName.replaceAll("\\.\\w+$", replacement); if (result.equals(fileName)) { result = fileName + replacement; } return result; } private String computeFilenameInternal(String name, int i) { if (i == 0) { return name; } return name.replaceAll("\\" + getFileSuffix() + "$", OptionFlags.getInstance().getFileSeparator() + String.format("%03d", i) + getFileSuffix()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/FileFormatOption.java000066400000000000000000000074431312650303100255060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.awt.geom.AffineTransform; import java.io.Serializable; import net.sourceforge.plantuml.graphic.StringBounder; /** * A FileFormat with some parameters. * * * @author Arnaud Roques * */ public class FileFormatOption implements Serializable { private final FileFormat fileFormat; private final AffineTransform affineTransform; private boolean withMetadata; private final boolean useRedForError; private final String svgLinkTarget; private final String hoverColor; public FileFormatOption(FileFormat fileFormat) { this(fileFormat, null, true, false, "_top", false, null); } public StringBounder getDefaultStringBounder() { return fileFormat.getDefaultStringBounder(); } public String getSvgLinkTarget() { return svgLinkTarget; } public final boolean isWithMetadata() { return withMetadata; } public FileFormatOption(FileFormat fileFormat, boolean withMetadata) { this(fileFormat, null, false, false, "_top", false, null); } private FileFormatOption(FileFormat fileFormat, AffineTransform at, boolean withMetadata, boolean useRedForError, String svgLinkTarget, boolean debugsvek, String hoverColor) { this.hoverColor = hoverColor; this.fileFormat = fileFormat; this.affineTransform = at; this.withMetadata = withMetadata; this.useRedForError = useRedForError; this.svgLinkTarget = svgLinkTarget; this.debugsvek = debugsvek; } public FileFormatOption withUseRedForError() { return new FileFormatOption(fileFormat, affineTransform, withMetadata, true, svgLinkTarget, debugsvek, hoverColor); } public FileFormatOption withSvgLinkTarget(String svgLinkTarget) { return new FileFormatOption(fileFormat, affineTransform, withMetadata, useRedForError, svgLinkTarget, debugsvek, hoverColor); } public FileFormatOption withHoverColor(String hoverColor) { return new FileFormatOption(fileFormat, affineTransform, withMetadata, useRedForError, svgLinkTarget, debugsvek, hoverColor); } @Override public String toString() { return fileFormat.toString() + " " + affineTransform; } public final FileFormat getFileFormat() { return fileFormat; } public AffineTransform getAffineTransform() { return affineTransform; } public final boolean isUseRedForError() { return useRedForError; } private boolean debugsvek = false; public void setDebugSvek(boolean debugsvek) { this.debugsvek = debugsvek; } public boolean isDebugSvek() { return debugsvek; } public final String getHoverColor() { return hoverColor; } public void hideMetadata() { this.withMetadata = false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/FileGroup.java000066400000000000000000000112211312650303100241460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; public class FileGroup { private final List result = new ArrayList(); private final String pattern; private final List excluded; private final Option option; private final static Pattern2 predirPath = MyPattern.cmpile("^([^*?]*[/\\\\])?(.*)$"); public FileGroup(String pattern, List excluded, Option option) { this.pattern = pattern; this.excluded = excluded; this.option = option; if (pattern.indexOf("*") == -1 && pattern.indexOf("?") == -1) { initNoStar(); } else if (pattern.indexOf("**") != -1) { recurse(); } else { initWithSimpleStar(); } Collections.sort(result); } private void recurse() { final Matcher2 m = predirPath.matcher(pattern); final boolean ok = m.find(); if (ok == false) { throw new IllegalArgumentException(); } final File parent; if (m.group(1) == null) { parent = new File("."); } else { parent = new File(m.group(1)); } initWithDoubleStar(parent); } private void initNoStar() { final File f = new File(pattern); if (f.isDirectory()) { addSimpleDirectory(f); } else if (f.isFile()) { addResultFile(f); } } private void addResultFile(final File f) { final String path = getNormalizedPath(f); for (String x : excluded) { if (path.matches(toRegexp(x))) { return; } } result.add(f); } private void addSimpleDirectory(File dir) { if (OptionFlags.getInstance().isWord()) { addSimpleDirectory(dir, "(?i)^.*_extr\\d+\\.txt$"); } else { addSimpleDirectory(dir, option.getPattern()); } } private void addSimpleDirectory(File dir, String pattern) { if (dir.isDirectory() == false) { throw new IllegalArgumentException("dir=" + dir); } for (File f : dir.listFiles()) { if (f.getName().matches(pattern)) { addResultFile(f); } } } private static String getNormalizedPath(File f) { return f.getPath().replace('\\', '/'); } private final static Pattern2 noStarInDirectory = MyPattern.cmpile("^(?:([^*?]*)[/\\\\])?([^/\\\\]*)$"); private void initWithSimpleStar() { assert pattern.indexOf("**") == -1; final Matcher2 m = noStarInDirectory.matcher(pattern); if (m.find()) { File dir = new File("."); if (m.group(1) != null) { final String dirPart = m.group(1); dir = new File(dirPart); } final String filesPart = m.group(2); addSimpleDirectory(dir, toRegexp(filesPart)); } else { recurse(); } } private void initWithDoubleStar(File currentDir) { for (File f : currentDir.listFiles()) { if (f.isDirectory()) { initWithDoubleStar(f); } else if (f.isFile()) { final String path = getNormalizedPath(f); if (path.matches(toRegexp(pattern))) { addResultFile(f); } } } } public List getFiles() { return Collections.unmodifiableList(result); } public static String toRegexp(String pattern) { pattern = pattern.replace("\\", "/"); pattern = pattern.replace(".", "\\."); pattern = pattern.replace("?", "[^/]"); pattern = pattern.replace("/**/", "(/|/.{0,}/)"); pattern = pattern.replace("**", ".{0,}"); pattern = pattern.replace("*", "[^/]{0,}"); pattern = "(?i)^(\\./)?" + pattern + "$"; return pattern; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/FileImageData.java000066400000000000000000000032001312650303100246640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; import net.sourceforge.plantuml.core.ImageData; public class FileImageData { private final File file; private final ImageData imageData; public FileImageData(File file, ImageData imageData) { this.file = file; this.imageData = imageData; } public File getFile() { return file; } public ImageData getImageData() { return imageData; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/FileSystem.java000066400000000000000000000064031312650303100243440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; public class FileSystem { private final static FileSystem singleton = new FileSystem(); private final ThreadLocal currentDir = new ThreadLocal(); private FileSystem() { reset(); } public static FileSystem getInstance() { return singleton; } public void setCurrentDir(File dir) { if (dir == null) { throw new IllegalArgumentException(); } Log.info("Setting current dir: " + dir); this.currentDir.set(dir); } public File getCurrentDir() { return this.currentDir.get(); } public File getFile(String nameOrPath) throws IOException { final File dir = currentDir.get(); if (dir == null || isAbsolute(nameOrPath)) { return new File(nameOrPath).getCanonicalFile(); } final File filecurrent = new File(dir.getAbsoluteFile(), nameOrPath); if (filecurrent.exists()) { return filecurrent.getCanonicalFile(); } for (File d : getPath("plantuml.include.path")) { final File file = new File(d, nameOrPath); if (file.exists()) { return file.getCanonicalFile(); } } for (File d : getPath("java.class.path")) { final File file = new File(d, nameOrPath); if (file.exists()) { return file.getCanonicalFile(); } } return filecurrent; } private List getPath(String prop) { final List result = new ArrayList(); String paths = System.getProperty(prop); if (paths == null) { return result; } paths = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(paths); final StringTokenizer st = new StringTokenizer(paths, System.getProperty("path.separator")); while (st.hasMoreTokens()) { final File f = new File(st.nextToken()); if (f.exists() && f.isDirectory()) { result.add(f); } } return result; } private boolean isAbsolute(String nameOrPath) { final File f = new File(nameOrPath); return f.isAbsolute(); } public void reset() { setCurrentDir(new File(".")); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/FileUtils.java000066400000000000000000000102601312650303100241540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.util.concurrent.atomic.AtomicInteger; // Used by the Eclipse Plugin, so do not change package location. public class FileUtils { private static AtomicInteger counter; public static void resetCounter() { counter = new AtomicInteger(0); } static public File createTempFile(String prefix, String suffix) throws IOException { if (suffix.startsWith(".") == false) { throw new IllegalArgumentException(); } if (prefix == null) { throw new IllegalArgumentException(); } final File f; if (counter == null) { f = File.createTempFile(prefix, suffix); } else { final String name = prefix + counter.addAndGet(1) + suffix; f = new File(name); } Log.info("Creating temporary file: " + f); f.deleteOnExit(); return f; } private static void copyInternal(final InputStream fis, final OutputStream fos) throws IOException { final byte[] buf = new byte[10240]; int len; while ((len = fis.read(buf)) > 0) { fos.write(buf, 0, len); } fos.close(); fis.close(); } static public void copyToFile(File src, File dest) throws IOException { if (dest.isDirectory()) { dest = new File(dest, src.getName()); } final InputStream fis = new BufferedInputStream(new FileInputStream(src)); final OutputStream fos = new BufferedOutputStream(new FileOutputStream(dest)); copyInternal(fis, fos); } static public void copyToStream(File src, OutputStream os) throws IOException { final InputStream fis = new BufferedInputStream(new FileInputStream(src)); final OutputStream fos = new BufferedOutputStream(os); copyInternal(fis, fos); } static public void copyToStream(InputStream is, OutputStream os) throws IOException { final InputStream fis = new BufferedInputStream(is); final OutputStream fos = new BufferedOutputStream(os); copyInternal(fis, fos); } static public void copyToFile(byte[] src, File dest) throws IOException { final OutputStream fos = new BufferedOutputStream(new FileOutputStream(dest)); fos.write(src); fos.close(); } static public String readSvg(File svgFile) throws IOException { final BufferedReader br = new BufferedReader(new FileReader(svgFile)); return readSvg(br, true); } static public String readSvg(InputStream is) throws IOException { final BufferedReader br = new BufferedReader(new InputStreamReader(is)); return readSvg(br, false); } private static String readSvg(final BufferedReader br, boolean withClose) throws IOException { final StringBuilder sb = new StringBuilder(); String s; while ((s = br.readLine()) != null) { sb.append(s); } if (withClose) { br.close(); } return sb.toString(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/FileWatcher.java000066400000000000000000000036751312650303100244650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; import java.util.HashMap; import java.util.Map; import java.util.Set; public class FileWatcher { private final Map modified2 = new HashMap(); public FileWatcher(Set files) { if (files.size() == 0) { throw new IllegalArgumentException(); } for (File f : files) { modified2.put(f, f.lastModified()); } } @Override public String toString() { return modified2.toString(); } public boolean hasChanged() { for (Map.Entry ent : modified2.entrySet()) { final long nowModified = ent.getKey().lastModified(); if (ent.getValue().longValue() != nowModified) { return true; } } return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/FontParam.java000066400000000000000000000122631312650303100241500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.awt.Font; import net.sourceforge.plantuml.graphic.FontConfiguration; interface FontParamConstant { String FAMILY = "SansSerif"; String COLOR = "black"; } public enum FontParam { ACTIVITY(12, Font.PLAIN), // ACTIVITY_DIAMOND(11, Font.PLAIN), // // ACTIVITY_ARROW(11, Font.PLAIN), // // GENERIC_ARROW(13, Font.PLAIN), // ARROW(13, Font.PLAIN), // CIRCLED_CHARACTER(17, Font.BOLD, FontParamConstant.COLOR, "Monospaced"), // OBJECT_ATTRIBUTE(10, Font.PLAIN), // OBJECT(12, Font.PLAIN), // OBJECT_STEREOTYPE(12, Font.ITALIC), // CLASS_ATTRIBUTE(10, Font.PLAIN), // CLASS(12, Font.PLAIN), // CLASS_STEREOTYPE(12, Font.ITALIC), // COMPONENT(14, Font.PLAIN), // INTERFACE(14, Font.PLAIN), // INTERFACE_STEREOTYPE(14, Font.ITALIC), // COMPONENT_STEREOTYPE(14, Font.ITALIC), // NOTE(13, Font.PLAIN), // PACKAGE(14, Font.PLAIN), // PACKAGE_STEREOTYPE(14, Font.ITALIC), // ACTOR(14, Font.PLAIN), // ARTIFACT(14, Font.PLAIN), // CLOUD(14, Font.PLAIN), // FOLDER(14, Font.PLAIN), // FILE(14, Font.PLAIN), // FRAME(14, Font.PLAIN), // STORAGE(14, Font.PLAIN), // BOUNDARY(14, Font.PLAIN), // CONTROL(14, Font.PLAIN), // ENTITY(14, Font.PLAIN), // AGENT(14, Font.PLAIN), // RECTANGLE(14, Font.PLAIN), // NODE(14, Font.PLAIN), // DATABASE(14, Font.PLAIN), // QUEUE(14, Font.PLAIN), // STACK(14, Font.PLAIN), // // SEQUENCE_ARROW(13, Font.PLAIN), // SEQUENCE_BOX(13, Font.BOLD), // SEQUENCE_DIVIDER(13, Font.BOLD), // SEQUENCE_REFERENCE(13, Font.PLAIN), // SEQUENCE_DELAY(11, Font.PLAIN), // SEQUENCE_GROUP(11, Font.BOLD), // SEQUENCE_GROUP_HEADER(13, Font.BOLD), // PARTICIPANT(14, Font.PLAIN), // SEQUENCE_TITLE(14, Font.BOLD), // STATE(14, Font.PLAIN), // STATE_ATTRIBUTE(12, Font.PLAIN), // LEGEND(14, Font.PLAIN), // TITLE(18, Font.PLAIN), // CAPTION(14, Font.PLAIN), // SWIMLANE_TITLE(18, Font.PLAIN), // FOOTER(10, Font.PLAIN, "#888888", FontParamConstant.FAMILY), // HEADER(10, Font.PLAIN, "#888888", FontParamConstant.FAMILY), // USECASE(14, Font.PLAIN), // USECASE_STEREOTYPE(14, Font.ITALIC), // ARTIFACT_STEREOTYPE(14, Font.ITALIC), // CLOUD_STEREOTYPE(14, Font.ITALIC), // STORAGE_STEREOTYPE(14, Font.ITALIC), // BOUNDARY_STEREOTYPE(14, Font.ITALIC), // CONTROL_STEREOTYPE(14, Font.ITALIC), // ENTITY_STEREOTYPE(14, Font.ITALIC), // AGENT_STEREOTYPE(14, Font.ITALIC), // RECTANGLE_STEREOTYPE(14, Font.ITALIC), // NODE_STEREOTYPE(14, Font.ITALIC), // FOLDER_STEREOTYPE(14, Font.ITALIC), // FILE_STEREOTYPE(14, Font.ITALIC), // FRAME_STEREOTYPE(14, Font.ITALIC), // DATABASE_STEREOTYPE(14, Font.ITALIC), // QUEUE_STEREOTYPE(14, Font.ITALIC), // STACK_STEREOTYPE(14, Font.ITALIC), // ACTOR_STEREOTYPE(14, Font.ITALIC), // SEQUENCE_STEREOTYPE(14, Font.ITALIC), // PARTITION(14, Font.PLAIN); // private final int defaultSize; private final int fontStyle; private final String defaultColor; private final String defaultFamily; private FontParam(int defaultSize, int fontStyle, String defaultColor, String defaultFamily) { this.defaultSize = defaultSize; this.fontStyle = fontStyle; this.defaultColor = defaultColor; this.defaultFamily = defaultFamily; } private FontParam(int defaultSize, int fontStyle) { this(defaultSize, fontStyle, FontParamConstant.COLOR, FontParamConstant.FAMILY); } public final int getDefaultSize(ISkinParam skinParam) { if (this == ARROW && skinParam.getUmlDiagramType() == UmlDiagramType.ACTIVITY) { return 11; } if (this == CLASS_ATTRIBUTE) { return 11; } return defaultSize; } public final int getDefaultFontStyle(ISkinParam skinParam, boolean inPackageTitle) { if (this == STATE) { return fontStyle; } if (inPackageTitle || this == PACKAGE) { return Font.BOLD; } return fontStyle; } public final String getDefaultColor() { return defaultColor; } public String getDefaultFamily() { return defaultFamily; } public FontConfiguration getFontConfiguration(ISkinParam skinParam) { return new FontConfiguration(skinParam, this, null); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/GeneratedImage.java000066400000000000000000000026761312650303100251310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; public interface GeneratedImage extends Comparable { public File getPngFile(); public String getDescription(); public int lineErrorRaw(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/GeneratedImageImpl.java000066400000000000000000000051631312650303100257450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; import net.sourceforge.plantuml.core.Diagram; public class GeneratedImageImpl implements GeneratedImage { private final File pngFile; private final String description; private final BlockUml blockUml; public GeneratedImageImpl(File pngFile, String description, BlockUml blockUml) { this.blockUml = blockUml; this.pngFile = pngFile; this.description = description; } public File getPngFile() { return pngFile; } public String getDescription() { return description; } public int lineErrorRaw() { final Diagram system = blockUml.getDiagram(); if (system instanceof PSystemError) { return ((PSystemError) system).getHigherErrorPosition2().getPosition(); } return -1; } @Override public String toString() { return pngFile.getAbsolutePath() + " " + description; } public int compareTo(GeneratedImage this2) { final int cmp = this.pngFile.compareTo(this2.getPngFile()); if (cmp != 0) { return cmp; } return this.description.compareTo(this2.getDescription()); } @Override public int hashCode() { return pngFile.hashCode() + description.hashCode(); } @Override public boolean equals(Object obj) { final GeneratedImageImpl this2 = (GeneratedImageImpl) obj; return this2.pngFile.equals(this.pngFile) && this2.description.equals(this.description); } public BlockUml getBlockUml() { return blockUml; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/Hideable.java000066400000000000000000000025011312650303100237500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public interface Hideable { public boolean isHidden(); }plantuml-1.2017.15/src/net/sourceforge/plantuml/ISkinParam.java000066400000000000000000000101731312650303100242550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.cucadiagram.Rankdir; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.dot.DotSplines; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.SkinParameter; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.skin.ArrowDirection; import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.svek.PackageStyle; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UStroke; public interface ISkinParam extends ISkinSimple { public HtmlColor getHyperlinkColor(); public boolean useUnderlineForHyperlink(); public HtmlColor getBackgroundColor(); public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable); public Colors getColors(ColorParam param, Stereotype stereotype); public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param); public UStroke getThickness(LineParam param, Stereotype stereotype); public UFont getFont(Stereotype stereotype, boolean inPackageTitle, FontParam... fontParam); public HorizontalAlignment getHorizontalAlignment(AlignParam param, ArrowDirection arrowDirection); public HorizontalAlignment getDefaultTextAlignment(HorizontalAlignment defaultValue); public int getCircledCharacterRadius(); public int classAttributeIconSize(); public ColorMapper getColorMapper(); public DotSplines getDotSplines(); public String getDotExecutable(); public boolean shadowing(); public boolean shadowingForNote(Stereotype stereotype); public boolean shadowing2(SkinParameter skinParameter); public PackageStyle getPackageStyle(); public boolean useUml2ForComponent(); public boolean stereotypePositionTop(); public boolean useSwimlanes(UmlDiagramType type); public double getNodesep(); public double getRanksep(); public double getRoundCorner(String param, Stereotype stereotype); public LineBreakStrategy maxMessageSize(); public boolean strictUmlStyle(); public boolean forceSequenceParticipantUnderlined(); public ConditionStyle getConditionStyle(); public double minClassWidth(); public boolean sameClassWidth(); public Rankdir getRankdir(); public boolean useOctagonForActivity(Stereotype stereotype); public int groupInheritance(); public boolean useGuillemet(); public boolean handwritten(); public String getSvgLinkTarget(); public int getTabSize(); public int maxAsciiMessageLength(); public int colorArrowSeparationSpace(); public SplitParam getSplitParam(); public int swimlaneWidth(); public UmlDiagramType getUmlDiagramType(); public HtmlColor getHoverPathColor(); public double getPadding(PaddingParam param); public boolean useRankSame(); }plantuml-1.2017.15/src/net/sourceforge/plantuml/ISkinSimple.java000066400000000000000000000031011312650303100244370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.graphic.IHtmlColorSet; public interface ISkinSimple extends SpriteContainer { public String getValue(String key); public double getPadding(); public String getMonospacedFamily(); public int getTabSize(); public IHtmlColorSet getIHtmlColorSet(); public int getDpi(); }plantuml-1.2017.15/src/net/sourceforge/plantuml/ISourceFileReader.java000066400000000000000000000030631312650303100255530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.IOException; import java.util.List; public interface ISourceFileReader { public List getGeneratedImages() throws IOException; public List getBlocks(); public boolean hasError(); public void setFileFormatOption(FileFormatOption fileFormatOption); } plantuml-1.2017.15/src/net/sourceforge/plantuml/LineBreakStrategy.java000066400000000000000000000031411312650303100256330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public class LineBreakStrategy { public static final LineBreakStrategy NONE = new LineBreakStrategy(null); private final String value; public LineBreakStrategy(String value) { this.value = value; } public double getMathWidth() { if (value != null && value.matches("-?\\d+")) { return Double.parseDouble(value); } return 0; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/LineConfigurable.java000066400000000000000000000031171312650303100254670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; public interface LineConfigurable { public Colors getColors(ISkinParam skinParam); public void setSpecificColorTOBEREMOVED(ColorType type, HtmlColor color); }plantuml-1.2017.15/src/net/sourceforge/plantuml/LineLocation.java000066400000000000000000000036041312650303100246400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; /** * Indicates the location of a line of code within a resource. * The resource maybe a local file or a remote URL. * */ public interface LineLocation extends Comparable { /** * Position of the line, starting at 0. */ public int getPosition(); /** * A description of the ressource. * If the ressource is a file, this is the complete path of the file. */ public String getDescription(); /** * Get the parent of this location. * If this resource has been included by a !include or !includeurl directive, * this return the location of the !include line. */ public LineLocation getParent(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/LineLocationImpl.java000066400000000000000000000045271312650303100254670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public class LineLocationImpl implements LineLocation { private final String desc; private final int position; private final LineLocation parent; @Override public String toString() { if (desc == null) { return "[?] : " + position; } return desc + " : " + position; } public LineLocationImpl(String desc, LineLocation parent) { this(desc, parent, -1); } private LineLocationImpl(String desc, LineLocation parent, int position) { this.parent = parent; this.desc = desc; this.position = position; } public LineLocationImpl oneLineRead() { return new LineLocationImpl(desc, parent, position + 1); } public static LineLocation fromLine(CharSequence cs) { if (cs instanceof CharSequence2) { return ((CharSequence2) cs).getLocation(); } return null; } public int getPosition() { return position; } public String getDescription() { return desc; } public LineLocation getParent() { return parent; } public int compareTo(LineLocation other) { final LineLocationImpl other2 = (LineLocationImpl) other; return this.position - other2.position; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/LineParam.java000066400000000000000000000033621312650303100241310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public enum LineParam { // sequenceBoundaryBorder, sequenceActorBorder, sequenceDividerBorder, // sequenceGroupBorder(0.1), // sequenceReferenceBorder(0.1), sequenceLifeLineBorder, sequenceParticipantBorder, noteBorder, sequenceGroupBorder, sequenceReferenceBorder, legendBorder, sequenceArrow, classBorder, objectBorder, usecaseBorder, partitionBorder, packageBorder, swimlaneBorder, activityBorder, titleBorder, diagramBorder, rectangleBorder; // sequenceBoxBorder(0.1); } plantuml-1.2017.15/src/net/sourceforge/plantuml/Log.java000066400000000000000000000064351312650303100230060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public abstract class Log { private static final long start = System.currentTimeMillis(); public synchronized static void debug(String s) { } public synchronized static void info(String s) { if (OptionFlags.getInstance().isVerbose()) { ProgressBar.clear(); System.err.println(format(s)); } } public synchronized static void error(String s) { ProgressBar.clear(); System.err.println(s); } private static String format(String s) { final long delta = System.currentTimeMillis() - start; // final HealthCheck healthCheck = Performance.getHealthCheck(); // final long cpu = healthCheck.jvmCpuTime() / 1000L / 1000L; // final long dot = healthCheck.dotTime().getSum(); final long freeMemory = Runtime.getRuntime().freeMemory(); final long maxMemory = Runtime.getRuntime().maxMemory(); final long totalMemory = Runtime.getRuntime().totalMemory(); final long usedMemory = totalMemory - freeMemory; final int threadActiveCount = Thread.activeCount(); final StringBuilder sb = new StringBuilder(); sb.append("("); sb.append(delta / 1000L); sb.append("."); sb.append(String.format("%03d", delta % 1000L)); // if (cpu != -1) { // sb.append(" - "); // sb.append(cpu / 1000L); // sb.append("."); // sb.append(String.format("%03d", cpu % 1000L)); // } // sb.append(" - "); // sb.append(dot / 1000L); // sb.append("."); // sb.append(String.format("%03d", dot % 1000L)); // sb.append("("); // sb.append(healthCheck.dotTime().getNb()); // sb.append(")"); sb.append(" - "); final long total = totalMemory / 1024 / 1024; final long free = freeMemory / 1024 / 1024; sb.append(total); sb.append(" Mo) "); sb.append(free); sb.append(" Mo - "); sb.append(s); return sb.toString(); } public static void println(Object s) { if (header2.get() == null) { System.err.println("L = " + s); } else { System.err.println(header2.get() + " " + s); } } private static final ThreadLocal header2 = new ThreadLocal(); public static void header(String s) { header2.set(s); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/NamedOutputStream.java000066400000000000000000000042071312650303100257010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; public class NamedOutputStream extends OutputStream { private final OutputStream os; private final BaseFile basefile; public NamedOutputStream(File file) throws FileNotFoundException { this.os = new BufferedOutputStream(new FileOutputStream(file)); this.basefile = new BaseFile(file); } public void close() throws IOException { os.close(); } public void flush() throws IOException { os.flush(); } public void write(byte[] b) throws IOException { os.write(b); } public void write(byte[] b, int off, int len) throws IOException { os.write(b, off, len); } public void write(int b) throws IOException { os.write(b); } public BaseFile getBasefile() { return basefile; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/NewpagedDiagram.java000066400000000000000000000106551312650303100253030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; public class NewpagedDiagram extends AbstractPSystem { private final List diagrams = new ArrayList(); public NewpagedDiagram(AbstractPSystem diag1, AbstractPSystem diag2) { if (diag1 instanceof NewpagedDiagram) { throw new IllegalArgumentException(); } if (diag2 instanceof NewpagedDiagram) { throw new IllegalArgumentException(); } this.diagrams.add(diag1); this.diagrams.add(diag2); } @Override public String toString() { return super.toString() + " SIZE=" + diagrams.size() + " " + diagrams; } public Diagram getLastDiagram() { return diagrams.get(diagrams.size() - 1); } public CommandExecutionResult executeCommand(Command cmd, BlocLines lines) { final int nb = diagrams.size(); final CommandExecutionResult tmp = cmd.execute(diagrams.get(nb - 1), lines); if (tmp.getNewDiagram() instanceof NewpagedDiagram) { final NewpagedDiagram new1 = (NewpagedDiagram) tmp.getNewDiagram(); // System.err.println("this=" + this); // System.err.println("new1=" + new1); if (new1.size() != 2) { throw new IllegalStateException(); } if (new1.diagrams.get(0) != this.diagrams.get(nb - 1)) { throw new IllegalStateException(); } this.diagrams.add(new1.diagrams.get(1)); return tmp.withDiagram(this); } return tmp; } private int size() { return diagrams.size(); } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { return diagrams.get(num).exportDiagram(os, 0, fileFormat); } public int getNbImages() { int nb = 0; for (Diagram d : diagrams) { nb += d.getNbImages(); } return nb; } public DiagramDescription getDescription() { final StringBuilder sb = new StringBuilder(); for (Diagram d : diagrams) { if (sb.length() > 0) { sb.append(" "); } sb.append(d.getDescription()); } return new DiagramDescription(sb.toString()); } public String getWarningOrError() { final StringBuilder sb = new StringBuilder(); for (Diagram d : diagrams) { if (sb.length() > 0) { sb.append(" "); } if (d.getWarningOrError() != null) { sb.append(d.getWarningOrError()); } } if (sb.length() == 0) { return null; } return sb.toString(); } @Override public void makeDiagramReady() { super.makeDiagramReady(); for (Diagram diagram : diagrams) { ((AbstractPSystem) diagram).makeDiagramReady(); } } @Override public String checkFinalError() { for (Diagram p : getDiagrams()) { final String check = ((AbstractPSystem) p).checkFinalError(); if (check != null) { return check; } } return super.checkFinalError(); } public final List getDiagrams() { return Collections.unmodifiableList(diagrams); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/NullOutputStream.java000066400000000000000000000035731312650303100255740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.IOException; import java.io.OutputStream; // Modified by Maxime Sinclair public class NullOutputStream extends OutputStream { /** * Writes to nowhere */ @Override public void write(int b) throws IOException { // Do nothing silently } /** * Overridden for performance reason */ @Override public void write(byte b[]) throws IOException { // Do nothing silently } /** * Overridden for performance reason */ @Override public void write(byte b[], int off, int len) throws IOException { // Do nothing silently } } plantuml-1.2017.15/src/net/sourceforge/plantuml/Option.java000066400000000000000000000427171312650303100235400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.api.ApiWarning; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.stats.StatsUtils; public class Option { private final List excludes = new ArrayList(); private final List config = new ArrayList(); private final Map defines = new LinkedHashMap(); private String charset; private boolean computeurl = false; private boolean decodeurl = false; private boolean pipe = false; private String pipeDelimitor; private boolean pipeMap = false; private boolean pipeNoStdErr = false; private boolean syntax = false; private boolean checkOnly = false; private boolean failfast = false; private boolean failfast2 = false; private boolean pattern = false; private boolean duration = false; private boolean debugsvek = false; private boolean splash = false; private boolean textProgressBar = false; private int nbThreads = 0; private int ftpPort = -1; private boolean hideMetadata = false; private int imageIndex = 0; private File outputDir = null; private File outputFile = null; private final List result = new ArrayList(); public Option() { } private FileFormatOption fileFormatOption = new FileFormatOption(FileFormat.PNG); @Deprecated @ApiWarning(willBeRemoved = "in next major release") final public void setFileFormat(FileFormat fileFormat) { setFileFormatOption(new FileFormatOption(fileFormat)); } final public void setFileFormatOption(FileFormatOption newFormat) { this.fileFormatOption = newFormat; } public Option(String... arg) throws InterruptedException, IOException { if (arg.length == 0) { OptionFlags.getInstance().setGui(true); } for (int i = 0; i < arg.length; i++) { String s = arg[i]; if (s.equalsIgnoreCase("-tsvg") || s.equalsIgnoreCase("-svg")) { setFileFormatOption(new FileFormatOption(FileFormat.SVG)); } else if (s.equalsIgnoreCase("-tsvg:nornd") || s.equalsIgnoreCase("-svg:nornd")) { setFileFormatOption(new FileFormatOption(FileFormat.SVG)); } else if (s.equalsIgnoreCase("-thtml") || s.equalsIgnoreCase("-html")) { setFileFormatOption(new FileFormatOption(FileFormat.HTML)); } else if (s.equalsIgnoreCase("-tscxml") || s.equalsIgnoreCase("-scxml")) { setFileFormatOption(new FileFormatOption(FileFormat.SCXML)); } else if (s.equalsIgnoreCase("-txmi") || s.equalsIgnoreCase("-xmi")) { setFileFormatOption(new FileFormatOption(FileFormat.XMI_STANDARD)); } else if (s.equalsIgnoreCase("-txmi:argo") || s.equalsIgnoreCase("-xmi:argo")) { setFileFormatOption(new FileFormatOption(FileFormat.XMI_ARGO)); } else if (s.equalsIgnoreCase("-txmi:star") || s.equalsIgnoreCase("-xmi:star")) { setFileFormatOption(new FileFormatOption(FileFormat.XMI_STAR)); } else if (s.equalsIgnoreCase("-teps") || s.equalsIgnoreCase("-eps")) { setFileFormatOption(new FileFormatOption(FileFormat.EPS)); } else if (s.equalsIgnoreCase("-teps:text") || s.equalsIgnoreCase("-eps:text")) { setFileFormatOption(new FileFormatOption(FileFormat.EPS_TEXT)); } else if (s.equalsIgnoreCase("-ttxt") || s.equalsIgnoreCase("-txt")) { setFileFormatOption(new FileFormatOption(FileFormat.ATXT)); } else if (s.equalsIgnoreCase("-tutxt") || s.equalsIgnoreCase("-utxt")) { setFileFormatOption(new FileFormatOption(FileFormat.UTXT)); } else if (s.equalsIgnoreCase("-braille") || s.equalsIgnoreCase("-tbraille")) { setFileFormatOption(new FileFormatOption(FileFormat.BRAILLE_PNG)); } else if (s.equalsIgnoreCase("-png") || s.equalsIgnoreCase("-tpng")) { setFileFormatOption(new FileFormatOption(FileFormat.PNG)); } else if (s.equalsIgnoreCase("-vdx") || s.equalsIgnoreCase("-tvdx")) { setFileFormatOption(new FileFormatOption(FileFormat.VDX)); } else if (s.equalsIgnoreCase("-latex") || s.equalsIgnoreCase("-tlatex")) { setFileFormatOption(new FileFormatOption(FileFormat.LATEX)); } else if (s.equalsIgnoreCase("-latex:nopreamble") || s.equalsIgnoreCase("-tlatex:nopreamble")) { setFileFormatOption(new FileFormatOption(FileFormat.LATEX_NO_PREAMBLE)); } else if (s.equalsIgnoreCase("-base64") || s.equalsIgnoreCase("-tbase64")) { setFileFormatOption(new FileFormatOption(FileFormat.BASE64)); } else if (s.equalsIgnoreCase("-pdf") || s.equalsIgnoreCase("-tpdf")) { setFileFormatOption(new FileFormatOption(FileFormat.PDF)); } else if (s.equalsIgnoreCase("-overwrite")) { OptionFlags.getInstance().setOverwrite(true); } else if (s.equalsIgnoreCase("-output") || s.equalsIgnoreCase("-o")) { i++; if (i == arg.length) { continue; } outputDir = new File(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg[i])); } else if (s.equalsIgnoreCase("-ofile")) { i++; if (i == arg.length) { continue; } outputFile = new File(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg[i])); } else if (s.equalsIgnoreCase("-graphvizdot") || s.equalsIgnoreCase("-graphviz_dot")) { i++; if (i == arg.length) { continue; } GraphvizUtils.setDotExecutable(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg[i])); } else if (s.equalsIgnoreCase("-charset")) { i++; if (i == arg.length) { continue; } charset = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg[i]); } else if (s.startsWith("-o") && s.length() > 3) { s = s.substring(2); outputDir = new File(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(s)); } else if (s.equalsIgnoreCase("-recurse") || s.equalsIgnoreCase("-r")) { // recurse = true; } else if (s.equalsIgnoreCase("-exclude") || s.equalsIgnoreCase("-x")) { i++; if (i == arg.length) { continue; } excludes.add(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg[i])); } else if (s.equalsIgnoreCase("-nbthread") || s.equalsIgnoreCase("-nbthreads")) { i++; if (i == arg.length) { continue; } final String nb = arg[i]; if ("auto".equalsIgnoreCase(nb)) { this.nbThreads = defaultNbThreads(); } else if (nb.matches("\\d+")) { this.nbThreads = Integer.parseInt(nb); } } else if (s.equalsIgnoreCase("-timeout")) { i++; if (i == arg.length) { continue; } final String timeSeconds = arg[i]; if (timeSeconds.matches("\\d+")) { OptionFlags.getInstance().setTimeoutMs(Integer.parseInt(timeSeconds) * 1000L); } } else if (s.equalsIgnoreCase("-failfast")) { this.failfast = true; } else if (s.equalsIgnoreCase("-failfast2")) { this.failfast2 = true; } else if (s.equalsIgnoreCase("-checkonly")) { this.checkOnly = true; } else if (s.equalsIgnoreCase("-config")) { i++; if (i == arg.length) { continue; } initConfig(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg[i])); } else if (s.startsWith("-I")) { initInclude(s.substring(2)); } else if (s.equalsIgnoreCase("-computeurl") || s.equalsIgnoreCase("-encodeurl")) { this.computeurl = true; } else if (s.startsWith("-x")) { s = s.substring(2); excludes.add(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(s)); } else if (s.equalsIgnoreCase("-verbose") || s.equalsIgnoreCase("-v")) { OptionFlags.getInstance().setVerbose(true); } else if (s.equalsIgnoreCase("-pipe") || s.equalsIgnoreCase("-p")) { pipe = true; } else if (s.equalsIgnoreCase("-pipedelimitor")) { i++; if (i == arg.length) { continue; } pipeDelimitor = arg[i]; } else if (s.equalsIgnoreCase("-pipemap")) { pipeMap = true; } else if (s.equalsIgnoreCase("-pipenostderr")) { pipeNoStdErr = true; } else if (s.equalsIgnoreCase("-pattern")) { pattern = true; } else if (s.equalsIgnoreCase("-syntax")) { syntax = true; OptionFlags.getInstance().setQuiet(true); } else if (s.equalsIgnoreCase("-duration")) { duration = true; } else if (s.equalsIgnoreCase("-debugsvek") || s.equalsIgnoreCase("-debug_svek")) { debugsvek = true; } else if (s.equalsIgnoreCase("-keepfiles") || s.equalsIgnoreCase("-keepfile")) { System.err.println("-keepfiles option has been removed. Please consider -debugsvek instead"); } else if (s.equalsIgnoreCase("-metadata")) { OptionFlags.getInstance().setExtractFromMetadata(true); } else if (s.equalsIgnoreCase("-logdata")) { i++; if (i == arg.length) { continue; } OptionFlags.getInstance().setLogData( new File(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg[i]))); } else if (s.equalsIgnoreCase("-word")) { OptionFlags.getInstance().setWord(true); OptionFlags.getInstance().setQuiet(true); this.charset = "UTF-8"; } else if (s.equalsIgnoreCase("-quiet")) { OptionFlags.getInstance().setQuiet(true); } else if (s.equalsIgnoreCase("-decodeurl")) { this.decodeurl = true; } else if (s.equalsIgnoreCase("-version")) { OptionPrint.printVersion(); } else if (s.matches("(?i)^-li[sc][ea]n[sc]e\\s*$")) { OptionPrint.printLicense(); } else if (s.equalsIgnoreCase("-checkversion")) { OptionPrint.checkVersion(); } else if (s.startsWith("-D")) { manageDefine(s.substring(2)); } else if (s.startsWith("-S")) { manageSkinParam(s.substring(2)); } else if (s.equalsIgnoreCase("-testdot")) { OptionPrint.printTestDot(); } else if (s.equalsIgnoreCase("-about") || s.equalsIgnoreCase("-author") || s.equalsIgnoreCase("-authors")) { OptionPrint.printAbout(); } else if (s.equalsIgnoreCase("-help") || s.equalsIgnoreCase("-h") || s.equalsIgnoreCase("-?")) { OptionPrint.printHelp(); } else if (s.equalsIgnoreCase("-language")) { OptionPrint.printLanguage(); } else if (s.equalsIgnoreCase("-gui")) { OptionFlags.getInstance().setGui(true); } else if (s.equalsIgnoreCase("-encodesprite")) { OptionFlags.getInstance().setEncodesprite(true); } else if (s.equalsIgnoreCase("-nosuggestengine")) { OptionFlags.getInstance().setUseSuggestEngine(false); } else if (s.equalsIgnoreCase("-printfonts")) { OptionFlags.getInstance().setPrintFonts(true); } else if (s.equalsIgnoreCase("-dumphtmlstats")) { OptionFlags.getInstance().setDumpHtmlStats(true); } else if (s.equalsIgnoreCase("-dumpstats")) { OptionFlags.getInstance().setDumpStats(true); } else if (s.equalsIgnoreCase("-loopstats")) { OptionFlags.getInstance().setLoopStats(true); } else if (s.equalsIgnoreCase("-enablestats")) { OptionFlags.getInstance().setEnableStats(true); } else if (s.equalsIgnoreCase("-disablestats")) { OptionFlags.getInstance().setEnableStats(false); } else if (s.equalsIgnoreCase("-htmlstats")) { StatsUtils.setHtmlStats(true); } else if (s.equalsIgnoreCase("-xmlstats")) { StatsUtils.setXmlStats(true); } else if (s.equalsIgnoreCase("-realtimestats")) { StatsUtils.setRealTimeStats(true); } else if (s.equalsIgnoreCase("-useseparatorminus")) { OptionFlags.getInstance().setFileSeparator("-"); } else if (s.equalsIgnoreCase("-splash")) { splash = true; } else if (s.equalsIgnoreCase("-progress")) { textProgressBar = true; } else if (s.equalsIgnoreCase("-nometadata")) { hideMetadata = true; } else if (s.equalsIgnoreCase("-pipeimageindex")) { i++; if (i == arg.length) { continue; } final String nb = arg[i]; if (nb.matches("\\d+")) { this.imageIndex = Integer.parseInt(nb); } } else if (StringUtils.goLowerCase(s).startsWith("-ftp")) { final int x = s.indexOf(':'); if (x == -1) { this.ftpPort = 4242; } else { this.ftpPort = Integer.parseInt(s.substring(x + 1)); } } else if (s.startsWith("-c")) { s = s.substring(2); config.add(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(s)); } else { result.add(s); } } } public int getFtpPort() { return ftpPort; } private void addInConfig(final FileReader source) throws IOException { BufferedReader br = null; try { br = new BufferedReader(source); String s = null; while ((s = br.readLine()) != null) { config.add(s); } } finally { if (br != null) { br.close(); } } } public void initConfig(String filename) throws IOException { addInConfig(new FileReader(filename)); } private void initInclude(String filename) throws IOException { if (filename.contains("*")) { final FileGroup group = new FileGroup(filename, Collections. emptyList(), null); for (File f : group.getFiles()) { addInConfig(new FileReader(f)); } } else { addInConfig(new FileReader(filename)); } } private void manageDefine(String s) { final Pattern2 p = MyPattern.cmpile("^(\\w+)(?:=(.*))?$"); final Matcher2 m = p.matcher(s); if (m.find()) { define(m.group(1), m.group(2)); } } private void manageSkinParam(String s) { final Pattern2 p = MyPattern.cmpile("^(\\w+)(?:=(.*))?$"); final Matcher2 m = p.matcher(s); if (m.find()) { skinParam(m.group(1), m.group(2)); } } private void skinParam(String var, String value) { if (var != null && value != null) { config.add("skinparamlocked " + var + " " + value); } } public final File getOutputDir() { return outputDir; } public final static String getPattern() { return "(?i)^.*\\.(txt|tex|java|htm|html|c|h|cpp|apt|pu)$"; } public void setOutputDir(File f) { outputDir = f; } public final List getExcludes() { return Collections.unmodifiableList(excludes); } public Defines getDefaultDefines(File f) { final Defines result = Defines.createWithFileName(f); for (Map.Entry ent : defines.entrySet()) { result.define(ent.getKey(), Arrays.asList(ent.getValue()), false); } return result; } public void define(String name, String value) { defines.put(name, value); } public List getConfig() { return Collections.unmodifiableList(config); } public final List getResult() { return Collections.unmodifiableList(result); } public final String getCharset() { return charset; } public void setCharset(String s) { this.charset = s; } public final boolean isComputeurl() { return computeurl; } public final boolean isDecodeurl() { return decodeurl; } public final boolean isPipe() { return pipe; } public final boolean isPipeMap() { return pipeMap; } public final boolean isSyntax() { return syntax; } public final boolean isPattern() { return pattern; } public FileFormatOption getFileFormatOption() { if (debugsvek) { fileFormatOption.setDebugSvek(true); } if (hideMetadata) { fileFormatOption.hideMetadata(); } return fileFormatOption; } public final boolean isDuration() { return duration; } public final int getNbThreads() { return nbThreads; } public final void setNbThreads(int nb) { this.nbThreads = nb; } public static int defaultNbThreads() { return Runtime.getRuntime().availableProcessors(); } public final boolean isCheckOnly() { return checkOnly; } public final void setCheckOnly(boolean checkOnly) { this.checkOnly = checkOnly; } public final boolean isFailfastOrFailfast2() { return failfast || failfast2; } public final boolean isFailfast2() { return failfast2; } public final void setFailfast(boolean failfast) { this.failfast = failfast; } public final void setFailfast2(boolean failfast2) { this.failfast2 = failfast2; } public final File getOutputFile() { return outputFile; } public final void setDebugSvek(boolean debugsvek) { this.debugsvek = debugsvek; } boolean isDebugSvek() { return debugsvek; } public final boolean isSplash() { return splash; } public final void setSplash(boolean splash) { this.splash = splash; } public final boolean isTextProgressBar() { return textProgressBar; } public String getPipeDelimitor() { return pipeDelimitor; } public final boolean isPipeNoStdErr() { return pipeNoStdErr; } public final int getImageIndex() { return imageIndex; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/OptionFlags.java000066400000000000000000000200271312650303100245030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.PrintStream; import java.util.concurrent.atomic.AtomicBoolean; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class OptionFlags { private static final OptionFlags singleton = new OptionFlags(); // static public final boolean PBBACK = false; // static public boolean GRAPHVIZCACHE = false; // static public final boolean TRACE_DOT = false; static public boolean ALLOW_INCLUDE = true; static public void setMaxPixel(int max) { ImageBuilder.setMaxPixel(max); } static public final boolean USE_HECTOR = false; static public boolean ADD_NICE_FOR_DOT = false; static public final boolean STRICT_SELFMESSAGE_POSITION = true; // static public final boolean USE_IF_VERTICAL = true; static public final boolean FORCE_TEOZ = false; static public final boolean USE_INTERFACE_EYE1 = false; static public final boolean USE_INTERFACE_EYE2 = false; // static public final boolean SWI2 = false; // static public final boolean USE_COMPOUND = false; static public final boolean OMEGA_CROSSING = false; // static public final boolean LINK_BETWEEN_FIELDS = true; // static public final boolean USE_JDOT = false; public void reset() { reset(false); GraphvizUtils.setDotExecutable(null); } public final void setDotExecutable(String dotExecutable) { GraphvizUtils.setDotExecutable(dotExecutable); } private OptionFlags() { reset(true); } private void reset(boolean exit) { // keepTmpFiles = false; verbose = false; extractFromMetadata = false; word = false; systemExit = exit; gui = false; quiet = false; checkDotError = false; printFonts = false; useSuggestEngine = true; // failOnError = false; encodesprite = false; // PIC_LINE = false; } public boolean useJavaInsteadOfDot() { return false; } // private boolean keepTmpFiles; private boolean verbose; private boolean extractFromMetadata; private boolean word; private boolean systemExit; private boolean gui; private boolean quiet; private boolean checkDotError; private boolean printFonts; private boolean useSuggestEngine; private boolean encodesprite; private boolean dumpHtmlStats; private boolean dumpStats; private boolean loopStats; private boolean overwrite; private boolean enableStats = defaultForStats(); private String fileSeparator = "_"; private long timeoutMs = 15 * 60 * 1000L; // 15 minutes private File logData; public static OptionFlags getInstance() { return singleton; } public final boolean isVerbose() { return verbose; } public final void setVerbose(boolean verbose) { this.verbose = verbose; } public final boolean isExtractFromMetadata() { return extractFromMetadata; } public final void setExtractFromMetadata(boolean extractFromMetadata) { this.extractFromMetadata = extractFromMetadata; } public final boolean isWord() { return word; } public final void setWord(boolean word) { this.word = word; } public final boolean isSystemExit() { return systemExit; } public final void setSystemExit(boolean systemExit) { this.systemExit = systemExit; } public final boolean isGui() { return gui; } public final void setGui(boolean gui) { this.gui = gui; } public final boolean isQuiet() { return quiet; } public final void setQuiet(boolean quiet) { this.quiet = quiet; } public final boolean isCheckDotError() { return checkDotError; } public final void setCheckDotError(boolean checkDotError) { this.checkDotError = checkDotError; } private final AtomicBoolean logDataInitized = new AtomicBoolean(false); public void logData(File file, Diagram system) { final String warnOrError = system.getWarningOrError(); if (warnOrError == null) { return; } synchronized (logDataInitized) { if (logData == null && logDataInitized.get() == false) { final String s = GraphvizUtils.getenvLogData(); if (s != null) { setLogData(new File(s)); } logDataInitized.set(true); } if (logData == null) { return; } // final PSystemError systemError = (PSystemError) system; PrintStream ps = null; try { ps = new PrintStream(new FileOutputStream(logData, true)); ps.println("Start of " + file.getName()); ps.println(warnOrError); ps.println("End of " + file.getName()); ps.println(); } catch (FileNotFoundException e) { Log.error("Cannot open " + logData); e.printStackTrace(); } finally { if (ps != null) { ps.close(); } } } } public final void setLogData(File logData) { this.logData = logData; logData.delete(); PrintStream ps = null; try { ps = new PrintStream(new FileOutputStream(logData)); ps.println(); } catch (FileNotFoundException e) { Log.error("Cannot open " + logData); e.printStackTrace(); } finally { if (ps != null) { ps.close(); } } } public final boolean isPrintFonts() { return printFonts; } public final void setPrintFonts(boolean printFonts) { this.printFonts = printFonts; } public final boolean isUseSuggestEngine() { return useSuggestEngine; } public final void setUseSuggestEngine(boolean useSuggestEngine) { this.useSuggestEngine = useSuggestEngine; } public final boolean isEncodesprite() { return encodesprite; } public final void setEncodesprite(boolean encodesprite) { this.encodesprite = encodesprite; } public final boolean isOverwrite() { return overwrite; } public final void setOverwrite(boolean overwrite) { this.overwrite = overwrite; } public final String getFileSeparator() { return fileSeparator; } public final void setFileSeparator(String fileSeparator) { this.fileSeparator = fileSeparator; } public final boolean isDumpHtmlStats() { return dumpHtmlStats; } public final void setDumpHtmlStats(boolean value) { this.dumpHtmlStats = value; } public final boolean isDumpStats() { return dumpStats; } public final void setDumpStats(boolean dumpStats) { this.dumpStats = dumpStats; } public final boolean isLoopStats() { return loopStats; } public final void setLoopStats(boolean loopStats) { this.loopStats = loopStats; } private static boolean defaultForStats() { return isTrue(System.getProperty("PLANTUML_STATS")) || isTrue(System.getenv("PLANTUML_STATS")); } private static boolean isTrue(final String value) { return "on".equalsIgnoreCase(value) || "true".equalsIgnoreCase(value) || "on".equalsIgnoreCase(value); } public boolean isEnableStats() { return enableStats; } public void setEnableStats(boolean enableStats) { this.enableStats = enableStats; } public final long getTimeoutMs() { return timeoutMs; } public final void setTimeoutMs(long timeoutMs) { this.timeoutMs = timeoutMs; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/OptionPrint.java000066400000000000000000000316551312650303100245540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; import java.net.InetAddress; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Properties; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils; import net.sourceforge.plantuml.syntax.LanguageDescriptor; import net.sourceforge.plantuml.version.License; import net.sourceforge.plantuml.version.PSystemVersion; import net.sourceforge.plantuml.version.Version; public class OptionPrint { static public void printTestDot() throws InterruptedException { for (String s : GraphvizUtils.getTestDotStrings(false)) { System.out.println(s); } exit(); } static public void printHelp() throws InterruptedException { final String charset = Charset.defaultCharset().displayName(); System.out.println("Usage: java -jar plantuml.jar [options] -gui"); System.out.println("\t(to execute the GUI)"); System.out.println(" or java -jar plantuml.jar [options] [file/dir] [file/dir] [file/dir]"); System.out.println("\t(to process files or directories)"); System.out.println(); System.out.println("You can use the following wildcards in files/dirs:"); System.out.println("\t*\tmeans any characters but '" + File.separator + "'"); System.out.println("\t?\tone and only one character but '" + File.separator + "'"); System.out.println("\t**\tmeans any characters (used to recurse through directories)"); System.out.println(); System.out.println("where options include:"); System.out.println(" -gui\t\tTo run the graphical user interface"); System.out.println(" -tpng\t\tTo generate images using PNG format (default)"); System.out.println(" -tsvg\t\tTo generate images using SVG format"); System.out.println(" -teps\t\tTo generate images using EPS format"); System.out.println(" -tpdf\t\tTo generate images using PDF format"); System.out.println(" -tvdx\t\tTo generate images using VDX format"); System.out.println(" -txmi\t\tTo generate XMI file for class diagram"); System.out.println(" -tscxml\t\tTo generate SCXML file for state diagram"); System.out.println(" -thtml\t\tTo generate HTML file for class diagram"); System.out.println(" -ttxt\t\tTo generate images with ASCII art"); System.out.println(" -tutxt\t\tTo generate images with ASCII art using Unicode characters"); System.out.println(" -tlatex\t\tTo generate images using LaTeX/Tikz format"); System.out.println(" -tlatex:nopreamble\tTo generate images using LaTeX/Tikz format without preamble"); System.out.println(" -o[utput] \"dir\"\tTo generate images in the specified directory"); System.out.println(" -DVAR1=value\tTo set a preprocessing variable as if '!define VAR1 value' were used"); System.out.println(" -Sparam1=value\tTo set a skin parameter as if 'skinparam param1 value' were used"); System.out.println(" -r[ecurse]\t\trecurse through directories"); // System.out.println(" -config \"file\"\tTo read the provided config file before each diagram"); final char separator = File.separatorChar; System.out.println(" -I" + separator + "path" + separator + "to" + separator + "file\tTo include file as if '!include file' were used"); System.out.println(" -I" + separator + "path" + separator + "to" + separator + "*.puml\tTo include files with pattern"); System.out.println(" -charset xxx\tTo use a specific charset (default is " + charset + ")"); System.out.println(" -e[x]clude pattern\tTo exclude files that match the provided pattern"); System.out.println(" -metadata\t\tTo retrieve PlantUML sources from PNG images"); System.out.println(" -nometadata\t\tTo NOT export metadata in PNG/SVG generated files"); System.out.println(" -version\t\tTo display information about PlantUML and Java versions"); System.out.println(" -checkversion\tTo check if a newer version is available for download"); System.out.println(" -v[erbose]\t\tTo have log information"); System.out.println(" -quiet\t\tTo NOT print error message into the console"); System.out.println(" -debugsvek\t\tTo generate intermediate svek files"); System.out.println(" -h[elp]\t\tTo display this help message"); System.out.println(" -testdot\t\tTo test the installation of graphviz"); System.out.println(" -graphvizdot \"exe\"\tTo specify dot executable"); System.out.println(" -p[ipe]\t\tTo use stdin for PlantUML source and stdout for PNG/SVG/EPS generation"); System.out .println(" -encodesprite 4|8|16[z] \"file\"\tTo encode a sprite at gray level (z for compression) from an image"); System.out.println(" -computeurl|-encodeurl\tTo compute the encoded URL of a PlantUML source file"); System.out.println(" -decodeurl\t\tTo retrieve the PlantUML source from an encoded URL"); System.out.println(" -syntax\t\tTo report any syntax error from standard input without generating images"); System.out.println(" -language\t\tTo print the list of PlantUML keywords"); System.out.println(" -nosuggestengine\tTo disable the suggest engine when errors in diagrams"); System.out.println(" -checkonly\t\tTo check the syntax of files without generating images"); System.out.println(" -failfast\t\tTo stop processing as soon as a syntax error in diagram occurs"); System.out.println(" -failfast2\t\tTo do a first syntax check before processing files, to fail even faster"); System.out.println(" -pattern\t\tTo print the list of Regular Expression used by PlantUML"); System.out.println(" -duration\t\tTo print the duration of complete diagrams processing"); System.out.println(" -nbthread N\t\tTo use (N) threads for processing"); System.out.println(" -nbthread auto\tTo use " + Option.defaultNbThreads() + " threads for processing"); System.out .println(" -timeout N\t\tProcessing timeout in (N) seconds. Defaults to 15 minutes (900 seconds)."); System.out.println(" -author[s]\t\tTo print information about PlantUML authors"); System.out.println(" -overwrite\t\tTo allow to overwrite read only files"); System.out.println(" -printfonts\t\tTo print fonts available on your system"); System.out.println(" -enablestats\tTo enable statistics computation"); System.out.println(" -disablestats\tTo disable statistics computation (default)"); System.out.println(" -htmlstats\t\tTo output general statistics in file plantuml-stats.html"); System.out.println(" -xmlstats\t\tTo output general statistics in file plantuml-stats.xml"); System.out.println(" -realtimestats\tTo generate statistics on the fly rather than at the end"); System.out.println(" -loopstats\t\tTo continuously print statistics about usage"); System.out.println(" -splash\t\tTo display a splash screen with some progress bar"); System.out.println(" -progress\t\tTo display a textual progress bar in console"); System.out.println(" -pipeimageindex N\tTo generate the Nth image with pipe option"); System.out.println(); System.out.println("If needed, you can setup the environment variable GRAPHVIZ_DOT."); exit(); } static private void exit() throws InterruptedException { if (OptionFlags.getInstance().isSystemExit()) { System.exit(0); } throw new InterruptedException("exit"); } public static void printLicense() throws InterruptedException { for (String s : License.getCurrent().getText()) { System.out.println(s); } exit(); } public static void printVersion() throws InterruptedException { System.out.println("PlantUML version " + Version.versionString() + " (" + Version.compileTimeString() + ")"); System.out.println("(" + License.getCurrent() + " source distribution)"); for (String v : interestingProperties()) { System.out.println(v); } for (String v : interestingValues()) { System.out.println(v); } System.out.println(); for (String s : GraphvizUtils.getTestDotStrings(false)) { System.out.println(s); } exit(); } public static Collection interestingProperties() { final Properties p = System.getProperties(); final List all = withIp() ? Arrays.asList("java.runtime.name", "Java Runtime", "java.vm.name", "JVM", "java.runtime.version", "Java Version", "os.name", "Operating System", "file.encoding", "Default Encoding", "user.language", "Language", "user.country", "Country") : Arrays.asList( "java.runtime.name", "Java Runtime", "java.vm.name", "JVM", "java.runtime.version", "Java Version", "os.name", "Operating System", "os.version", "OS Version", "file.encoding", "Default Encoding", "user.language", "Language", "user.country", "Country"); final List result = new ArrayList(); for (int i = 0; i < all.size(); i += 2) { result.add(all.get(i + 1) + ": " + p.getProperty(all.get(i))); } return result; } public static Collection interestingValues() { final List strings = new ArrayList(); if (withIp() == false) { strings.add("Machine: " + getHostName()); } strings.add("PLANTUML_LIMIT_SIZE: " + GraphvizUtils.getenvImageLimit()); strings.add("Processors: " + Runtime.getRuntime().availableProcessors()); final long freeMemory = Runtime.getRuntime().freeMemory(); final long maxMemory = Runtime.getRuntime().maxMemory(); final long totalMemory = Runtime.getRuntime().totalMemory(); final long usedMemory = totalMemory - freeMemory; final int threadActiveCount = Thread.activeCount(); strings.add("Max Memory: " + format(maxMemory)); strings.add("Total Memory: " + format(totalMemory)); strings.add("Free Memory: " + format(freeMemory)); strings.add("Used Memory: " + format(usedMemory)); strings.add("Thread Active Count: " + threadActiveCount); return Collections.unmodifiableCollection(strings); } private static boolean withIp() { return getHostName().startsWith("ip-"); } private static String hostname; public static synchronized String getHostName() { if (hostname == null) { hostname = getHostNameSlow(); } return hostname; } private static String getHostNameSlow() { try { final InetAddress addr = InetAddress.getLocalHost(); return addr.getHostName(); } catch (Throwable e) { final Map env = System.getenv(); if (env.containsKey("COMPUTERNAME")) { return env.get("COMPUTERNAME"); } else if (env.containsKey("HOSTNAME")) { return env.get("HOSTNAME"); } } return "Unknown Computer"; } private static String format(final long value) { return String.format(Locale.US, "%,d", value); } public static void checkVersion() throws InterruptedException { System.out.println("PlantUML version " + Version.versionString() + " (" + Version.compileTimeString() + ")"); System.out.println(); final int lastversion = PSystemVersion.extractDownloadableVersion(null, null); if (lastversion == -1) { System.out.println("Error"); System.out.println("Cannot connect to http://plantuml.com/"); System.out.println("Maybe you should set your proxy ?"); } else if (lastversion == 0) { System.out.println("Error"); System.out.println("Cannot retrieve last version from http://plantuml.com/"); } else { System.out.println("Last available version for download : " + lastversion); System.out.println(); if (Version.version() >= lastversion) { System.out.println("Your version is up to date."); } else { System.out.println("A newer version is available for download."); } } exit(); } public static void printAbout() throws InterruptedException { for (String s : PSystemVersion.getAuthorsStrings(false)) { System.out.println(s); } OptionPrint.exit(); } public static void printLanguage() throws InterruptedException { new LanguageDescriptor().print(System.out); exit(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/PSystemBuilder.java000066400000000000000000000213121312650303100251670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.acearth.PSystemXearthFactory; import net.sourceforge.plantuml.activitydiagram.ActivityDiagramFactory; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagramFactory3; import net.sourceforge.plantuml.api.PSystemFactory; import net.sourceforge.plantuml.bpm.BpmDiagramFactory; import net.sourceforge.plantuml.classdiagram.ClassDiagramFactory; import net.sourceforge.plantuml.compositediagram.CompositeDiagramFactory; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.creole.PSystemCreoleFactory; import net.sourceforge.plantuml.cute.PSystemCuteFactory; import net.sourceforge.plantuml.dedication.PSystemDedicationFactory; import net.sourceforge.plantuml.definition.PSystemDefinitionFactory; import net.sourceforge.plantuml.descdiagram.DescriptionDiagramFactory; import net.sourceforge.plantuml.directdot.PSystemDotFactory; import net.sourceforge.plantuml.ditaa.PSystemDitaaFactory; import net.sourceforge.plantuml.donors.PSystemDonorsFactory; import net.sourceforge.plantuml.eggs.PSystemAppleTwoFactory; import net.sourceforge.plantuml.eggs.PSystemCharlieFactory; import net.sourceforge.plantuml.eggs.PSystemColorsFactory; import net.sourceforge.plantuml.eggs.PSystemEggFactory; import net.sourceforge.plantuml.eggs.PSystemLostFactory; import net.sourceforge.plantuml.eggs.PSystemPathFactory; import net.sourceforge.plantuml.eggs.PSystemRIPFactory; import net.sourceforge.plantuml.eggs.PSystemWelcomeFactory; import net.sourceforge.plantuml.flowdiagram.FlowDiagramFactory; import net.sourceforge.plantuml.font.PSystemListFontsFactory; import net.sourceforge.plantuml.jcckit.PSystemJcckitFactory; import net.sourceforge.plantuml.jungle.PSystemTreeFactory; import net.sourceforge.plantuml.logo.PSystemLogoFactory; import net.sourceforge.plantuml.math.PSystemLatexFactory; import net.sourceforge.plantuml.math.PSystemMathFactory; import net.sourceforge.plantuml.openiconic.PSystemListOpenIconicFactory; import net.sourceforge.plantuml.openiconic.PSystemOpenIconicFactory; import net.sourceforge.plantuml.oregon.PSystemOregonFactory; import net.sourceforge.plantuml.postit.PostIdDiagramFactory; import net.sourceforge.plantuml.printskin.PrintSkinFactory; import net.sourceforge.plantuml.project3.GanttDiagramFactory; import net.sourceforge.plantuml.salt.PSystemSaltFactory; import net.sourceforge.plantuml.sequencediagram.SequenceDiagramFactory; import net.sourceforge.plantuml.statediagram.StateDiagramFactory; import net.sourceforge.plantuml.stats.StatsUtilsIncrement; import net.sourceforge.plantuml.sudoku.PSystemSudokuFactory; import net.sourceforge.plantuml.timingdiagram.TimingDiagramFactory; import net.sourceforge.plantuml.ugraphic.sprite.PSystemListInternalSpritesFactory; import net.sourceforge.plantuml.version.License; import net.sourceforge.plantuml.version.PSystemLicenseFactory; import net.sourceforge.plantuml.version.PSystemVersionFactory; public class PSystemBuilder { public static final long startTime = System.currentTimeMillis(); final public Diagram createPSystem(final List strings2, int startLine) { final long now = System.currentTimeMillis(); Diagram result = null; try { final DiagramType type = DiagramType.getTypeFromArobaseStart(strings2.get(0).toString2()); final UmlSource umlSource = new UmlSource(strings2, type == DiagramType.UML, startLine); // int cpt = 0; for (CharSequence2 s : strings2) { if (s.getPreprocessorError() != null) { Log.error("Preprocessor Error: " + s.getPreprocessorError()); final ErrorUml err = new ErrorUml(ErrorUmlType.SYNTAX_ERROR, s.getPreprocessorError(), /* cpt */ s.getLocation()); return new PSystemError(umlSource, err, Collections. emptyList()); } // cpt++; } final DiagramType diagramType = umlSource.getDiagramType(); final List errors = new ArrayList(); final List factories = getAllFactories(); for (PSystemFactory systemFactory : factories) { if (diagramType != systemFactory.getDiagramType()) { continue; } final Diagram sys = systemFactory.createSystem(umlSource); if (isOk(sys)) { result = sys; return sys; } errors.add((PSystemError) sys); } final PSystemError err = PSystemError.merge(errors); result = err; return err; } finally { if (result != null && OptionFlags.getInstance().isEnableStats()) { StatsUtilsIncrement.onceMoreParse(System.currentTimeMillis() - now, result.getClass()); } } } private List getAllFactories() { final List factories = new ArrayList(); factories.add(new PSystemWelcomeFactory()); factories.add(new PSystemColorsFactory()); factories.add(new SequenceDiagramFactory()); factories.add(new ClassDiagramFactory()); factories.add(new ActivityDiagramFactory()); factories.add(new DescriptionDiagramFactory()); factories.add(new StateDiagramFactory()); factories.add(new ActivityDiagramFactory3()); factories.add(new CompositeDiagramFactory()); // factories.add(new ObjectDiagramFactory()); factories.add(new BpmDiagramFactory(DiagramType.BPM)); factories.add(new PostIdDiagramFactory()); factories.add(new PrintSkinFactory()); factories.add(new PSystemLicenseFactory()); factories.add(new PSystemVersionFactory()); factories.add(new PSystemDonorsFactory()); factories.add(new PSystemListFontsFactory()); factories.add(new PSystemOpenIconicFactory()); factories.add(new PSystemListOpenIconicFactory()); factories.add(new PSystemListInternalSpritesFactory()); factories.add(new PSystemSaltFactory(DiagramType.SALT)); factories.add(new PSystemSaltFactory(DiagramType.UML)); factories.add(new PSystemDotFactory(DiagramType.DOT)); factories.add(new PSystemDotFactory(DiagramType.UML)); if (License.getCurrent() == License.GPL || License.getCurrent() == License.GPLV2) { factories.add(new PSystemDitaaFactory(DiagramType.DITAA)); factories.add(new PSystemDitaaFactory(DiagramType.UML)); factories.add(new PSystemJcckitFactory(DiagramType.JCCKIT)); factories.add(new PSystemJcckitFactory(DiagramType.UML)); factories.add(new PSystemLogoFactory()); factories.add(new PSystemSudokuFactory()); } factories.add(new PSystemDefinitionFactory()); factories.add(new PSystemMathFactory(DiagramType.MATH)); factories.add(new PSystemLatexFactory(DiagramType.LATEX)); // factories.add(new PSystemStatsFactory()); factories.add(new PSystemCreoleFactory()); factories.add(new PSystemEggFactory()); factories.add(new PSystemAppleTwoFactory()); factories.add(new PSystemRIPFactory()); factories.add(new PSystemLostFactory()); factories.add(new PSystemPathFactory()); factories.add(new PSystemOregonFactory()); factories.add(new PSystemCharlieFactory()); if (License.getCurrent() == License.GPL || License.getCurrent() == License.GPLV2) { factories.add(new PSystemXearthFactory()); } factories.add(new GanttDiagramFactory()); factories.add(new FlowDiagramFactory()); factories.add(new PSystemTreeFactory(DiagramType.JUNGLE)); factories.add(new PSystemCuteFactory(DiagramType.CUTE)); factories.add(new PSystemDedicationFactory()); factories.add(new TimingDiagramFactory()); return factories; } private boolean isOk(Diagram ps) { if (ps == null || ps instanceof PSystemError) { return false; } return true; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/PSystemError.java000066400000000000000000000351741312650303100247050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml; import java.awt.Color; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import net.sourceforge.plantuml.api.ImageDataSimple; import net.sourceforge.plantuml.asciiart.UmlCharArea; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.eggs.PSystemWelcome; import net.sourceforge.plantuml.graphic.GraphicPosition; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorSimple; import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; import net.sourceforge.plantuml.version.PSystemVersion; public class PSystemError extends AbstractPSystem { private final LineLocation higherErrorPosition; private final List printedErrors; private final List debugLines = new ArrayList(); public PSystemError(UmlSource source, ErrorUml singleError, List debugLines) { this(source, Collections.singletonList(singleError), debugLines); } private PSystemError(UmlSource source, List all, List debugLines) { this.setSource(source); final LineLocation execution = getHigherErrorPosition2(ErrorUmlType.EXECUTION_ERROR, all); final LineLocation syntax = getHigherErrorPosition2(ErrorUmlType.SYNTAX_ERROR, all); if (execution == null && syntax == null) { throw new IllegalStateException(); } if (execution != null && (syntax == null || execution.compareTo(syntax) >= 0)) { higherErrorPosition = execution; printedErrors = getErrorsAt2(execution, ErrorUmlType.EXECUTION_ERROR, all); } else { // assert syntax.compareTo(execution) > 0; higherErrorPosition = syntax; printedErrors = getErrorsAt2(syntax, ErrorUmlType.SYNTAX_ERROR, all); } if (debugLines != null) { this.debugLines.addAll(debugLines); } } private String getSuggestColor(boolean useRed) { if (useRed) { return "black"; } return "white"; } private String getRed(boolean useRed) { if (useRed) { return "#CD0A0A"; } return "red"; } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { if (fileFormat.getFileFormat() == FileFormat.ATXT || fileFormat.getFileFormat() == FileFormat.UTXT) { final UGraphicTxt ugt = new UGraphicTxt(); final UmlCharArea area = ugt.getCharArea(); area.drawStringsLR(getTextStrings(), 0, 0); area.print(new PrintStream(os)); return new ImageDataSimple(1, 1); } final boolean useRed = fileFormat.isUseRedForError(); final TextBlockBackcolored result = GraphicStrings.createForError(getHtmlStrings(useRed), useRed); TextBlock udrawable; final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, result.getBackcolor(), getMetadata(), null, 0, 0, null, false); if (getSource().getTotalLineCount() < 5) { udrawable = addWelcome(result); } else { udrawable = result; } final int min = (int) (System.currentTimeMillis() / 60000L) % 60; if (min == 0) { udrawable = addMessage(udrawable); } imageBuilder.setUDrawable(udrawable); return imageBuilder.writeImageTOBEMOVED(fileFormat, seed(), os); } private TextBlockBackcolored getWelcome() throws IOException { return new PSystemWelcome(GraphicPosition.BACKGROUND_CORNER_TOP_RIGHT).getGraphicStrings(); } private TextBlock addWelcome(final TextBlockBackcolored result) throws IOException { final TextBlockBackcolored welcome = getWelcome(); return TextBlockUtils.mergeTB(welcome, result, HorizontalAlignment.LEFT); } private TextBlock addMessage(final TextBlock source) throws IOException { final TextBlock message = getMessage(); TextBlock result = TextBlockUtils.mergeTB(message, source, HorizontalAlignment.LEFT); result = TextBlockUtils.mergeTB(result, message, HorizontalAlignment.LEFT); return result; } private TextBlockBackcolored getMessage() { final UImage message = new UImage(PSystemVersion.getTime()); final HtmlColor backImage = new HtmlColorSimple(new Color(message.getImage().getRGB(0, 0)), false); final double imWidth = message.getWidth(); final double imHeight = message.getHeight(); return new TextBlockBackcolored() { public void drawU(UGraphic ug) { ug.apply(new UTranslate(1, 1)).draw(message); } public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { return null; } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(imWidth + 1, imHeight + 1); } public HtmlColor getBackcolor() { return backImage; } }; } private List getTextStrings() { final List result = new ArrayList(getStack()); if (result.size() > 0) { result.add(" "); } // final int limit = 4; // int start; // final int skip = higherErrorPosition - limit + 1; // if (skip <= 0) { // start = 0; // } else { // if (skip == 1) { // result.add("... (skipping 1 line) ..."); // } else { // result.add("... (skipping " + skip + " lines) ..."); // } // start = higherErrorPosition - limit + 1; // } // for (int i = start; i < higherErrorPosition; i++) { // result.add(getSource().getLine(i)); // } for (String s : getPartialCode()) { result.add(s); } final String errorLine = getSource().getLine(higherErrorPosition); final String err = StringUtils.hideComparatorCharacters(errorLine); if (StringUtils.isNotEmpty(err)) { result.add(err); } final StringBuilder underscore = new StringBuilder(); for (int i = 0; i < errorLine.length(); i++) { underscore.append("^"); } result.add(underscore.toString()); final Collection textErrors = new LinkedHashSet(); for (ErrorUml er : printedErrors) { textErrors.add(er.getError()); } for (String er : textErrors) { result.add(" " + er); } boolean first = true; for (String s : getSuggest()) { if (first) { result.add(" " + s); } else { result.add(s); } first = false; } result.addAll(this.debugLines); return result; } private List getStack() { LineLocation lineLocation = getLineLocation(); final List result = new ArrayList(); if (lineLocation != null) { append(result, lineLocation); while (lineLocation.getParent() != null) { lineLocation = lineLocation.getParent(); append(result, lineLocation); } } return result; } public LineLocation getLineLocation() { for (ErrorUml err : printedErrors) { if (err.getLineLocation() != null) { return err.getLineLocation(); } } return null; } private void append(List result, LineLocation lineLocation) { if (lineLocation.getDescription() != null) { result.add("[From " + lineLocation.getDescription() + " (line " + (lineLocation.getPosition() + 1) + ") ]"); } } private List getPartialCode() { List result = new ArrayList(); for (Iterator it = getSource().iterator2(); it.hasNext();) { final CharSequence2 s = it.next(); if (s.getLocation().compareTo(higherErrorPosition) < 0) { result.add(s.toString()); } } final int limit = 4; if (result.size() > limit) { final int skip = result.size() - limit + 1; final String skipMessage; if (skip == 1) { skipMessage = "... (skipping 1 line) ..."; } else { skipMessage = "... (skipping " + skip + " lines) ..."; } result = new ArrayList(result.subList(skip, result.size())); result.add(0, skipMessage); } return result; } private List getHtmlStrings(boolean useRed) { final List htmlStrings = new ArrayList(getStack()); if (htmlStrings.size() > 0) { htmlStrings.add("----"); } // final int limit = 4; // int start; // final int skip = higherErrorPosition - limit + 1; // if (skip <= 0) { // start = 0; // } else { // if (skip == 1) { // htmlStrings.add("... (skipping 1 line) ..."); // } else { // htmlStrings.add("... (skipping " + skip + " lines) ..."); // } // start = higherErrorPosition - limit + 1; // } // for (int i = start; i < higherErrorPosition; i++) { // htmlStrings.add(StringUtils.hideComparatorCharacters(getSource().getLine(i))); // } for (String s : getPartialCode()) { htmlStrings.add(StringUtils.hideComparatorCharacters(s)); } final String errorLine = getSource().getLine(higherErrorPosition); final String err = StringUtils.hideComparatorCharacters(errorLine); if (StringUtils.isNotEmpty(err)) { htmlStrings.add("" + err + ""); } final Collection textErrors = new LinkedHashSet(); for (ErrorUml er : printedErrors) { textErrors.add(er.getError()); } for (String er : textErrors) { htmlStrings.add(" " + er + ""); } boolean first = true; for (String s : getSuggest()) { if (first) { htmlStrings.add(" " + s + ""); } else { htmlStrings.add("" + StringUtils.hideComparatorCharacters(s) + ""); } first = false; } htmlStrings.addAll(this.debugLines); return htmlStrings; } public List getSuggest() { boolean suggested = false; for (ErrorUml er : printedErrors) { if (er.hasSuggest()) { suggested = true; } } if (suggested == false) { return Collections.emptyList(); } final List result = new ArrayList(); result.add("Did you mean:"); for (ErrorUml er : printedErrors) { if (er.hasSuggest()) { result.add(er.getSuggest().getSuggestedLine()); } } return Collections.unmodifiableList(result); } private Collection getErrors(ErrorUmlType type, List all) { final Collection result = new LinkedHashSet(); for (ErrorUml error : all) { if (error.getType() == type) { result.add(error); } } return result; } // private int getHigherErrorPosition(ErrorUmlType type, List all) { // int max = Integer.MIN_VALUE; // for (ErrorUml error : getErrors(type, all)) { // if (error.getPosition() > max) { // max = error.getPosition(); // } // } // return max; // } private LineLocation getHigherErrorPosition2(ErrorUmlType type, List all) { LineLocation max = null; for (ErrorUml error : getErrors(type, all)) { if (max == null || error.getLineLocation().compareTo(max) > 0) { max = error.getLineLocation(); } } return max; } // private List getErrorsAt(int position, ErrorUmlType type, List all) { // final List result = new ArrayList(); // for (ErrorUml error : getErrors(type, all)) { // if (error.getPosition() == position && StringUtils.isNotEmpty(error.getError())) { // result.add(error); // } // } // return result; // } private List getErrorsAt2(LineLocation position, ErrorUmlType type, List all) { final List result = new ArrayList(); for (ErrorUml error : getErrors(type, all)) { if (error.getLineLocation().compareTo(position) == 0 && StringUtils.isNotEmpty(error.getError())) { result.add(error); } } return result; } public DiagramDescription getDescription() { return new DiagramDescription("(Error)"); } public final LineLocation getHigherErrorPosition2() { return higherErrorPosition; } public final Collection getErrorsUml() { return Collections.unmodifiableCollection(printedErrors); } @Override public String getWarningOrError() { final StringBuilder sb = new StringBuilder(); sb.append(getDescription()); sb.append(BackSlash.CHAR_NEWLINE); for (CharSequence t : getTitle().getDisplay()) { sb.append(t); sb.append(BackSlash.CHAR_NEWLINE); } sb.append(BackSlash.CHAR_NEWLINE); for (String s : getSuggest()) { sb.append(s); sb.append(BackSlash.CHAR_NEWLINE); } return sb.toString(); } public static PSystemError merge(Collection ps) { UmlSource source = null; final List errors = new ArrayList(); final List debugs = new ArrayList(); for (PSystemError system : ps) { if (system == null) { continue; } if (system.getSource() != null && source == null) { source = system.getSource(); } errors.addAll(system.getErrorsUml()); debugs.addAll(system.debugLines); if (system.debugLines.size() > 0) { debugs.add("-"); } } if (source == null) { throw new IllegalStateException(); } return new PSystemError(source, errors, debugs); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/PSystemUtils.java000066400000000000000000000205641312650303100247110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.html.CucaDiagramHtmlMaker; import net.sourceforge.plantuml.png.PngSplitter; import net.sourceforge.plantuml.sequencediagram.SequenceDiagram; public class PSystemUtils { public static List exportDiagrams(Diagram system, SuggestedFile suggestedFile, FileFormatOption fileFormatOption) throws IOException { if (system instanceof NewpagedDiagram) { return exportDiagramsNewpaged((NewpagedDiagram) system, suggestedFile, fileFormatOption); } if (system instanceof SequenceDiagram) { return exportDiagramsSequence((SequenceDiagram) system, suggestedFile, fileFormatOption); } if (system instanceof CucaDiagram) { return exportDiagramsCuca((CucaDiagram) system, suggestedFile, fileFormatOption); } if (system instanceof ActivityDiagram3) { return exportDiagramsActivityDiagram3((ActivityDiagram3) system, suggestedFile, fileFormatOption); } return exportDiagramsDefault(system, suggestedFile, fileFormatOption); } private static List exportDiagramsNewpaged(NewpagedDiagram system, SuggestedFile suggestedFile, FileFormatOption fileFormat) throws IOException { final List result = new ArrayList(); final int nbImages = system.getNbImages(); for (int i = 0; i < nbImages; i++) { final File f = suggestedFile.getFile(i); if (canFileBeWritten(f) == false) { return result; } final OutputStream fos = new BufferedOutputStream(new FileOutputStream(f)); ImageData cmap = null; try { system.exportDiagram(fos, i, fileFormat); } finally { fos.close(); } // if (system.hasUrl() && cmap != null && cmap.containsCMapData()) { // system.exportCmap(suggestedFile, cmap); // } Log.info("File size : " + f.length()); result.add(new FileImageData(f, cmap)); } return result; } public static boolean canFileBeWritten(final File f) { Log.info("Creating file: " + f); if (f.exists() && f.canWrite() == false) { if (OptionFlags.getInstance().isOverwrite()) { Log.info("Overwrite " + f); f.setWritable(true); f.delete(); return true; } Log.error("Cannot write to file " + f); return false; } return true; } static private List exportDiagramsDefault(Diagram system, SuggestedFile suggestedFile, FileFormatOption fileFormat) throws IOException { if (suggestedFile.getFile(0).exists() && suggestedFile.getFile(0).isDirectory()) { throw new IllegalArgumentException("File is a directory " + suggestedFile); } OutputStream os = null; ImageData imageData = null; try { if (PSystemUtils.canFileBeWritten(suggestedFile.getFile(0)) == false) { return Collections.emptyList(); } os = new BufferedOutputStream(new FileOutputStream(suggestedFile.getFile(0))); // system.exportDiagram(os, null, 0, fileFormat); imageData = system.exportDiagram(os, 0, fileFormat); } finally { if (os != null) { os.close(); } } return Arrays.asList(new FileImageData(suggestedFile.getFile(0), imageData)); } static private List exportDiagramsActivityDiagram3(ActivityDiagram3 system, SuggestedFile suggestedFile, FileFormatOption fileFormat) throws IOException { if (suggestedFile.getFile(0).exists() && suggestedFile.getFile(0).isDirectory()) { throw new IllegalArgumentException("File is a directory " + suggestedFile); } OutputStream os = null; ImageData cmap = null; ImageData imageData = null; try { if (PSystemUtils.canFileBeWritten(suggestedFile.getFile(0)) == false) { return Collections.emptyList(); } os = new BufferedOutputStream(new FileOutputStream(suggestedFile.getFile(0))); imageData = cmap = system.exportDiagram(os, 0, fileFormat); } finally { if (os != null) { os.close(); } } if (cmap != null && cmap.containsCMapData()) { system.exportCmap(suggestedFile, 0, cmap); } return Arrays.asList(new FileImageData(suggestedFile.getFile(0), imageData)); } private static List exportDiagramsSequence(SequenceDiagram system, SuggestedFile suggestedFile, FileFormatOption fileFormat) throws IOException { final List result = new ArrayList(); final int nbImages = system.getNbImages(); for (int i = 0; i < nbImages; i++) { final File f = suggestedFile.getFile(i); if (PSystemUtils.canFileBeWritten(suggestedFile.getFile(i)) == false) { return result; } final OutputStream fos = new BufferedOutputStream(new FileOutputStream(f)); ImageData cmap = null; try { cmap = system.exportDiagram(fos, i, fileFormat); } finally { fos.close(); } if (cmap != null && cmap.containsCMapData()) { system.exportCmap(suggestedFile, i, cmap); } Log.info("File size : " + f.length()); result.add(new FileImageData(f, cmap)); } return result; } static private List exportDiagramsCuca(CucaDiagram system, SuggestedFile suggestedFile, FileFormatOption fileFormat) throws IOException { if (suggestedFile.getFile(0).exists() && suggestedFile.getFile(0).isDirectory()) { throw new IllegalArgumentException("File is a directory " + suggestedFile); } if (fileFormat.getFileFormat() == FileFormat.HTML) { return createFilesHtml(system, suggestedFile); } ImageData cmap = null; OutputStream os = null; try { if (PSystemUtils.canFileBeWritten(suggestedFile.getFile(0)) == false) { return Collections.emptyList(); } // System.err.println("FOO11=" + suggestedFile); // os = new BufferedOutputStream(new FileOutputStream(suggestedFile)); os = new NamedOutputStream(suggestedFile.getFile(0)); cmap = system.exportDiagram(os, 0, fileFormat); } finally { if (os != null) { os.close(); } } List result = Arrays.asList(suggestedFile.getFile(0)); if (cmap != null && cmap.containsCMapData()) { system.exportCmap(suggestedFile, 0, cmap); } if (fileFormat.getFileFormat() == FileFormat.PNG) { result = new PngSplitter(suggestedFile, system.getHorizontalPages(), system.getVerticalPages(), system.getMetadata(), system.getDpi(fileFormat), fileFormat.isWithMetadata(), system.getSkinParam() .getSplitParam()).getFiles(); } final List result2 = new ArrayList(); for (File f : result) { result2.add(new FileImageData(f, cmap)); } return result2; } private static List createFilesHtml(CucaDiagram system, SuggestedFile suggestedFile) throws IOException { final String name = suggestedFile.getName(); final int idx = name.lastIndexOf('.'); final File dir = new File(suggestedFile.getParentFile(), name.substring(0, idx)); final CucaDiagramHtmlMaker maker = new CucaDiagramHtmlMaker(system, dir); return maker.create(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/PaddingParam.java000066400000000000000000000026201312650303100246040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public enum PaddingParam { PARTICIPANT, BOX; public String getSkinName() { return StringUtils.goLowerCase(name()) + "Padding"; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/Pipe.java000066400000000000000000000124341312650303100231560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintStream; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.preproc.Defines; public class Pipe { private final Option option; private final InputStream is; private final PrintStream ps; private boolean closed = false; private final String charset; public Pipe(Option option, PrintStream ps, InputStream is, String charset) { this.option = option; this.is = is; this.ps = ps; this.charset = charset; } public boolean managePipe() throws IOException { boolean error = false; final boolean noStdErr = option.isPipeNoStdErr(); do { final String source = readOneDiagram(); if (source == null) { ps.flush(); return error; } final SourceStringReader sourceStringReader = new SourceStringReader(Defines.createEmpty(), source, option.getConfig()); if (option.isComputeurl()) { for (BlockUml s : sourceStringReader.getBlocks()) { ps.println(s.getEncodedUrl()); } } else if (option.isSyntax()) { final Diagram system = sourceStringReader.getBlocks().get(0).getDiagram(); if (system instanceof UmlDiagram) { ps.println(((UmlDiagram) system).getUmlDiagramType().name()); ps.println(system.getDescription()); } else if (system instanceof PSystemError) { error = true; printErrorText(ps, (PSystemError) system); } else { ps.println("OTHER"); ps.println(system.getDescription()); } } else if (option.isPipeMap()) { final String result = sourceStringReader.getCMapData(0, option.getFileFormatOption()); ps.println(result); } else { final OutputStream os = noStdErr ? new ByteArrayOutputStream() : ps; final DiagramDescription result = sourceStringReader.outputImage(os, option.getImageIndex(), option.getFileFormatOption()); if (result != null && "(error)".equalsIgnoreCase(result.getDescription())) { error = true; manageErrors(noStdErr ? ps : System.err, sourceStringReader); } else if (noStdErr) { final ByteArrayOutputStream baos = (ByteArrayOutputStream) os; baos.close(); ps.write(baos.toByteArray()); } if (option.getPipeDelimitor() != null) { ps.println(option.getPipeDelimitor()); } } ps.flush(); } while (closed == false); return error; } private void manageErrors(final PrintStream output, final SourceStringReader sourceStringReader) { // if (option.getPipeDelimitor() != null) { // output.println(option.getPipeDelimitor()); // } printErrorText(output, (PSystemError) sourceStringReader.getBlocks().get(0).getDiagram()); } private void printErrorText(final PrintStream output, final PSystemError sys) { output.println("ERROR"); output.println(sys.getHigherErrorPosition2().getPosition()); for (ErrorUml er : sys.getErrorsUml()) { output.println(er.getError()); } output.flush(); } private boolean isFinished(String s) { return s == null || s.startsWith("@end"); } private String readOneDiagram() throws IOException { final StringBuilder sb = new StringBuilder(); while (true) { final String s = readOneLine(); if (s == null) { closed = true; } else { sb.append(s); sb.append(BackSlash.NEWLINE); } if (isFinished(s)) { break; } } if (sb.length() == 0) { return null; } String source = sb.toString(); if (source.startsWith("@start") == false) { source = "@startuml\n" + source + "\n@enduml"; } return source; } private String readOneLine() throws IOException { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); while (true) { final int read = is.read(); if (read == -1) { if (baos.size() == 0) { return null; } break; } if (read != '\r' && read != '\n') { baos.write(read); } if (read == '\n') { break; } } if (charset == null) { return new String(baos.toByteArray()); } return new String(baos.toByteArray(), charset); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/Pragma.java000066400000000000000000000042101312650303100234610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.util.LinkedHashMap; import java.util.Map; public class Pragma { private final Map values = new LinkedHashMap(); public void define(String name, String value) { values.put(name, value); } public boolean isDefine(String name) { return values.containsKey(name); } public void undefine(String name) { values.remove(name); } public String getValue(String name) { return values.get(name); } public boolean horizontalLineBetweenDifferentPackageAllowed() { return isDefine("horizontallinebetweendifferentpackageallowed"); } public boolean useVerticalIf() { final String teoz = getValue("useverticalif"); return "true".equalsIgnoreCase(teoz) || "on".equalsIgnoreCase(teoz); } public boolean useTeozLayout() { final String teoz = getValue("teoz"); return "true".equalsIgnoreCase(teoz) || "on".equalsIgnoreCase(teoz); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ProgressBar.java000066400000000000000000000054111312650303100245070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.util.concurrent.atomic.AtomicInteger; public class ProgressBar { private static boolean enable; private static String last = null; private static final AtomicInteger total = new AtomicInteger(); private static final AtomicInteger done = new AtomicInteger(); private synchronized static void print(String message) { clear(); System.err.print(message); last = message; } public synchronized static void clear() { if (last != null) { for (int i = 0; i < last.length(); i++) { System.err.print('\b'); } for (int i = 0; i < last.length(); i++) { System.err.print(' '); } for (int i = 0; i < last.length(); i++) { System.err.print('\b'); } } last = null; } public static void incTotal(int nb) { total.addAndGet(nb); printBar(done.intValue(), total.intValue()); } private synchronized static void printBar(int done, int total) { if (enable == false) { return; } if (total == 0) { return; } final String message = "[" + getBar(done, total) + "] " + done + "/" + total; print(message); } private static String getBar(int done, int total) { final StringBuilder sb = new StringBuilder(); final int width = 30; final int value = width * done / total; for (int i = 0; i < width; i++) { sb.append(i < value ? '#' : ' '); } return sb.toString(); } public static void incDone(boolean error) { done.incrementAndGet(); printBar(done.intValue(), total.intValue()); } public static void setEnable(boolean value) { enable = value; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/Removeable.java000066400000000000000000000025041312650303100243370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public interface Removeable { public boolean isRemoved(); }plantuml-1.2017.15/src/net/sourceforge/plantuml/Run.java000066400000000000000000000326721312650303100230330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics2D; import java.awt.GraphicsEnvironment; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import javax.imageio.ImageIO; import javax.swing.UIManager; import net.sourceforge.plantuml.activitydiagram.ActivityDiagramFactory; import net.sourceforge.plantuml.classdiagram.ClassDiagramFactory; import net.sourceforge.plantuml.code.Transcoder; import net.sourceforge.plantuml.code.TranscoderUtil; import net.sourceforge.plantuml.command.UmlDiagramFactory; import net.sourceforge.plantuml.descdiagram.DescriptionDiagramFactory; import net.sourceforge.plantuml.ftp.FtpServer; import net.sourceforge.plantuml.objectdiagram.ObjectDiagramFactory; import net.sourceforge.plantuml.png.MetadataTag; import net.sourceforge.plantuml.sequencediagram.SequenceDiagramFactory; import net.sourceforge.plantuml.statediagram.StateDiagramFactory; import net.sourceforge.plantuml.stats.StatsUtils; import net.sourceforge.plantuml.swing.MainWindow2; import net.sourceforge.plantuml.ugraphic.sprite.SpriteGrayLevel; import net.sourceforge.plantuml.ugraphic.sprite.SpriteUtils; import net.sourceforge.plantuml.version.Version; public class Run { public static void main(String[] argsArray) throws IOException, InterruptedException { final long start = System.currentTimeMillis(); saveCommandLine(argsArray); final Option option = new Option(argsArray); ProgressBar.setEnable(option.isTextProgressBar()); if (OptionFlags.getInstance().isDumpStats()) { StatsUtils.dumpStats(); return; } if (OptionFlags.getInstance().isLoopStats()) { StatsUtils.loopStats(); return; } if (OptionFlags.getInstance().isDumpHtmlStats()) { StatsUtils.outHtml(); return; } if (OptionFlags.getInstance().isEncodesprite()) { encodeSprite(option.getResult()); return; } if (OptionFlags.getInstance().isVerbose()) { Log.info("PlantUML Version " + Version.versionString()); Log.info("GraphicsEnvironment.isHeadless() " + GraphicsEnvironment.isHeadless()); } if (GraphicsEnvironment.isHeadless()) { Log.info("Forcing -Djava.awt.headless=true"); System.setProperty("java.awt.headless", "true"); Log.info("java.awt.headless set as true"); } if (OptionFlags.getInstance().isPrintFonts()) { printFonts(); return; } if (option.getFtpPort() != -1) { goFtp(option); return; } forceOpenJdkResourceLoad(); boolean error = false; boolean forceQuit = false; if (option.isPattern()) { managePattern(); } else if (OptionFlags.getInstance().isGui()) { try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch (Exception e) { } final List list = option.getResult(); File dir = null; if (list.size() == 1) { final File f = new File(list.get(0)); if (f.exists() && f.isDirectory()) { dir = f; } } new MainWindow2(option, dir); } else if (option.isPipe() || option.isPipeMap() || option.isSyntax()) { error = managePipe(option); forceQuit = true; } else if (option.isFailfast2()) { if (option.isSplash()) { Splash.createSplash(); } final long start2 = System.currentTimeMillis(); option.setCheckOnly(true); error = manageAllFiles(option); option.setCheckOnly(false); if (option.isDuration()) { final double duration = (System.currentTimeMillis() - start2) / 1000.0; Log.error("Check Duration = " + duration + " seconds"); } if (error == false) { error = manageAllFiles(option); } forceQuit = true; } else { if (option.isSplash()) { Splash.createSplash(); } error = manageAllFiles(option); forceQuit = true; } if (option.isDuration()) { final double duration = (System.currentTimeMillis() - start) / 1000.0; Log.error("Duration = " + duration + " seconds"); } if (error) { Log.error("Some diagram description contains errors"); System.exit(1); } if (forceQuit && OptionFlags.getInstance().isSystemExit()) { System.exit(0); } } private static String commandLine = ""; public static final String getCommandLine() { return commandLine; } private static void saveCommandLine(String[] argsArray) { final StringBuilder sb = new StringBuilder(); for (String s : argsArray) { sb.append(s); sb.append(" "); } commandLine = sb.toString(); } public static void forceOpenJdkResourceLoad() { final BufferedImage imDummy = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB); final Graphics2D gg = imDummy.createGraphics(); final String text = "Alice"; final Font font = new Font("SansSerif", Font.PLAIN, 12); final FontMetrics fm = gg.getFontMetrics(font); final Rectangle2D rect = fm.getStringBounds(text, gg); } private static void encodeSprite(List result) throws IOException { SpriteGrayLevel level = SpriteGrayLevel.GRAY_16; boolean compressed = false; final File f; if (result.size() > 1 && result.get(0).matches("(4|8|16)z?")) { if (result.get(0).startsWith("8")) { level = SpriteGrayLevel.GRAY_8; } if (result.get(0).startsWith("4")) { level = SpriteGrayLevel.GRAY_4; } compressed = StringUtils.goLowerCase(result.get(0)).endsWith("z"); f = new File(result.get(1)); } else { f = new File(result.get(0)); } final BufferedImage im = ImageIO.read(f); final String name = getSpriteName(f); final String s = compressed ? SpriteUtils.encodeCompressed(im, name, level) : SpriteUtils.encode(im, name, level); System.out.println(s); } private static String getSpriteName(File f) { final String s = getSpriteNameInternal(f); if (s.length() == 0) { return "test"; } return s; } private static String getSpriteNameInternal(File f) { final StringBuilder sb = new StringBuilder(); for (char c : f.getName().toCharArray()) { if (("" + c).matches("[\\p{L}0-9_]")) { sb.append(c); } else { return sb.toString(); } } return sb.toString(); } private static void goFtp(Option option) throws IOException { final int ftpPort = option.getFtpPort(); System.err.println("ftpPort=" + ftpPort); final FtpServer ftpServer = new FtpServer(ftpPort, option.getFileFormatOption().getFileFormat()); ftpServer.go(); } public static void printFonts() { final Font fonts[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); for (Font f : fonts) { System.out.println("f=" + f + "/" + f.getPSName() + "/" + f.getName() + "/" + f.getFontName() + "/" + f.getFamily()); } final String name[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); for (String n : name) { System.out.println("n=" + n); } } private static void managePattern() { printPattern(new SequenceDiagramFactory()); printPattern(new ClassDiagramFactory()); printPattern(new ActivityDiagramFactory()); printPattern(new DescriptionDiagramFactory()); // printPattern(new ComponentDiagramFactory()); printPattern(new StateDiagramFactory()); printPattern(new ObjectDiagramFactory()); } private static void printPattern(UmlDiagramFactory factory) { System.out.println(); System.out.println(factory.getClass().getSimpleName().replaceAll("Factory", "")); final List descriptions = factory.getDescription(); for (String s : descriptions) { System.out.println(s); } } private static boolean managePipe(Option option) throws IOException { final String charset = option.getCharset(); return new Pipe(option, System.out, System.in, charset).managePipe(); } private static boolean manageAllFiles(Option option) throws IOException, InterruptedException { File lockFile = null; try { if (OptionFlags.getInstance().isWord()) { final File dir = new File(option.getResult().get(0)); final File javaIsRunningFile = new File(dir, "javaisrunning.tmp"); javaIsRunningFile.delete(); lockFile = new File(dir, "javaumllock.tmp"); } return processArgs(option); } finally { if (lockFile != null) { lockFile.delete(); } } } private static boolean processArgs(Option option) throws IOException, InterruptedException { if (option.isDecodeurl() == false && option.getNbThreads() > 1 && option.isCheckOnly() == false && OptionFlags.getInstance().isExtractFromMetadata() == false) { return multithread(option); } boolean errorGlobal = false; final List files = new ArrayList(); for (String s : option.getResult()) { if (option.isDecodeurl()) { final Transcoder transcoder = TranscoderUtil.getDefaultTranscoder(); System.out.println("@startuml"); System.out.println(transcoder.decode(s)); System.out.println("@enduml"); } else { final FileGroup group = new FileGroup(s, option.getExcludes(), option); incTotal(group.getFiles().size()); files.addAll(group.getFiles()); } } for (File f : files) { try { final boolean error = manageFileInternal(f, option); if (error) { errorGlobal = true; } incDone(error); if (error && option.isFailfastOrFailfast2()) { return true; } } catch (IOException e) { e.printStackTrace(); } } return errorGlobal; } private static boolean multithread(final Option option) throws InterruptedException { Log.info("Using several threads: " + option.getNbThreads()); final ExecutorService executor = Executors.newFixedThreadPool(option.getNbThreads()); final AtomicBoolean errors = new AtomicBoolean(false); for (String s : option.getResult()) { final FileGroup group = new FileGroup(s, option.getExcludes(), option); for (final File f : group.getFiles()) { incTotal(1); executor.submit(new Runnable() { public void run() { if (errors.get() && option.isFailfastOrFailfast2()) { return; } try { final boolean error = manageFileInternal(f, option); if (error) { errors.set(true); } } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } incDone(errors.get()); } }); } } executor.shutdown(); executor.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS); return errors.get(); } private static void incDone(boolean error) { Splash.incDone(error); ProgressBar.incDone(error); } private static void incTotal(int nb) { Splash.incTotal(nb); ProgressBar.incTotal(nb); } private static boolean manageFileInternal(File f, Option option) throws IOException, InterruptedException { if (OptionFlags.getInstance().isExtractFromMetadata()) { System.out.println("------------------------"); System.out.println(f); // new Metadata().readAndDisplayMetadata(f); System.out.println(); System.out.println(new MetadataTag(f, "plantuml").getData()); System.out.println("------------------------"); return false; } final ISourceFileReader sourceFileReader; if (option.getOutputFile() == null) { sourceFileReader = new SourceFileReader(option.getDefaultDefines(f), f, option.getOutputDir(), option.getConfig(), option.getCharset(), option.getFileFormatOption()); } else { sourceFileReader = new SourceFileReader2(option.getDefaultDefines(f), f, option.getOutputFile(), option.getConfig(), option.getCharset(), option.getFileFormatOption()); } if (option.isComputeurl()) { for (BlockUml s : sourceFileReader.getBlocks()) { System.out.println(s.getEncodedUrl()); } return false; } if (option.isCheckOnly()) { final boolean hasError = sourceFileReader.hasError(); final List result = sourceFileReader.getGeneratedImages(); hasErrors(f, result); return hasError; } final List result = sourceFileReader.getGeneratedImages(); return hasErrors(f, result); } private static boolean hasErrors(File f, final List list) throws IOException { boolean result = false; for (GeneratedImage i : list) { final int lineError = i.lineErrorRaw(); if (lineError != -1) { Log.error("Error line " + lineError + " in file: " + f.getCanonicalPath()); result = true; } } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/Scale.java000066400000000000000000000025301312650303100233040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public interface Scale { public double getScale(double width, double height); } plantuml-1.2017.15/src/net/sourceforge/plantuml/ScaleHeight.java000066400000000000000000000027671312650303100244510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public class ScaleHeight implements Scale { private final double maxHeight; public ScaleHeight(double maxHeight) { this.maxHeight = maxHeight; } public double getScale(double width, double height) { return maxHeight / height; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ScaleMaxHeight.java000066400000000000000000000031021312650303100250770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public class ScaleMaxHeight implements Scale { private final double maxHeight; public ScaleMaxHeight(double maxHeight) { this.maxHeight = maxHeight; } public double getScale(double width, double height) { final double result = maxHeight / height; if (result > 1) { return 1; } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ScaleMaxWidth.java000066400000000000000000000030721312650303100247540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public class ScaleMaxWidth implements Scale { private final double maxWidth; public ScaleMaxWidth(double maxWidth) { this.maxWidth = maxWidth; } public double getScale(double width, double height) { final double result = maxWidth / width; if (result > 1) { return 1; } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ScaleMaxWidthAndHeight.java000066400000000000000000000033621312650303100265320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public class ScaleMaxWidthAndHeight implements Scale { private final double maxWidth; private final double maxHeight; public ScaleMaxWidthAndHeight(double maxWidth, double maxHeight) { this.maxWidth = maxWidth; this.maxHeight = maxHeight; } public double getScale(double width, double height) { final double scale1 = maxWidth / width; final double scale2 = maxHeight / height; final double min = Math.min(scale1, scale2); if (min > 1) { return 1; } return min; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ScaleSimple.java000066400000000000000000000027351312650303100244650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public class ScaleSimple implements Scale { private final double scale; public ScaleSimple(double scale) { this.scale = scale; } public double getScale(double width, double height) { return scale; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ScaleWidth.java000066400000000000000000000027571312650303100243170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public class ScaleWidth implements Scale { private final double maxWidth; public ScaleWidth(double maxWidth) { this.maxWidth = maxWidth; } public double getScale(double width, double height) { return maxWidth / width; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ScaleWidthAndHeight.java000066400000000000000000000033511312650303100260620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public class ScaleWidthAndHeight implements Scale { private final double maxWidth; private final double maxHeight; public ScaleWidthAndHeight(double maxWidth, double maxHeight) { this.maxWidth = maxWidth; this.maxHeight = maxHeight; } public double getScale(double width, double height) { final double scale1 = maxWidth / width; final double scale2 = maxHeight / height; // if (scale1 > 1 && scale2 > 1) { // return 1; // } return Math.min(scale1, scale2); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SignatureUtils.java000066400000000000000000000077411312650303100252500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import net.sourceforge.plantuml.code.AsciiEncoder; public class SignatureUtils { public static String getSignature(String s) { try { final AsciiEncoder coder = new AsciiEncoder(); final MessageDigest msgDigest = MessageDigest.getInstance("MD5"); msgDigest.update(s.getBytes("UTF-8")); final byte[] digest = msgDigest.digest(); return coder.encode(digest); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); throw new UnsupportedOperationException(e); } catch (UnsupportedEncodingException e) { e.printStackTrace(); throw new UnsupportedOperationException(e); } } public static String getSignatureSha512(File f) throws IOException { final InputStream is = new FileInputStream(f); try { return getSignatureSha512(is); } finally { is.close(); } } public static String getSignatureSha512(InputStream is) throws IOException { try { final AsciiEncoder coder = new AsciiEncoder(); final MessageDigest msgDigest = MessageDigest.getInstance("SHA-512"); int read = 0; while ((read = is.read()) != -1) { msgDigest.update((byte) read); } final byte[] digest = msgDigest.digest(); return coder.encode(digest); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); throw new UnsupportedOperationException(e); } catch (UnsupportedEncodingException e) { e.printStackTrace(); throw new UnsupportedOperationException(e); } } public static String getSignatureWithoutImgSrc(String s) { s = getSignature(purge(s)); return s; } public static String purge(String s) { final String regex = "(?i)\\"; s = s.replaceAll(regex, ""); final String regex2 = "(?i)image=\"(?:[^\"]+[/\\\\])?([^/\\\\\\d.]+)\\d*(\\.\\w+)\""; s = s.replaceAll(regex2, "image=\"$1$2\""); return s; } public static String getSignature(File f) throws IOException { try { final AsciiEncoder coder = new AsciiEncoder(); final MessageDigest msgDigest = MessageDigest.getInstance("MD5"); final FileInputStream is = new FileInputStream(f); int read = -1; while ((read = is.read()) != -1) { msgDigest.update((byte) read); } is.close(); final byte[] digest = msgDigest.digest(); return coder.encode(digest); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); throw new UnsupportedOperationException(e); } catch (UnsupportedEncodingException e) { e.printStackTrace(); throw new UnsupportedOperationException(e); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SingleLine.java000066400000000000000000000026121312650303100243070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.core.Diagram; public interface SingleLine { Diagram getSystemFromSingleLine(String singleLine); } plantuml-1.2017.15/src/net/sourceforge/plantuml/SkinParam.java000066400000000000000000000607321312650303100241520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.awt.Font; import java.util.Collection; import java.util.Collections; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.TreeSet; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.creole.CommandCreoleMonospaced; import net.sourceforge.plantuml.cucadiagram.Rankdir; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.dot.DotSplines; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorSetSimple; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.IHtmlColorSet; import net.sourceforge.plantuml.graphic.SkinParameter; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.skin.ArrowDirection; import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.svek.PackageStyle; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ColorMapperMonochrome; import net.sourceforge.plantuml.ugraphic.ColorMapperReverse; import net.sourceforge.plantuml.ugraphic.ColorOrder; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.sprite.Sprite; import net.sourceforge.plantuml.ugraphic.sprite.SpriteImage; public class SkinParam implements ISkinParam { private static final String stereoPatternString = "\\<\\<(.*?)\\>\\>"; private static final Pattern2 stereoPattern = MyPattern.cmpile(stereoPatternString); private final Map params = new HashMap(); private Rankdir rankdir = Rankdir.TOP_TO_BOTTOM; private String dotExecutable; private final UmlDiagramType type; public String getDotExecutable() { return dotExecutable; } public void setDotExecutable(String dotExecutable) { Log.info("Overwritting dot in skinparam " + dotExecutable); this.dotExecutable = dotExecutable; } public void setParam(String key, String value) { params.put(cleanForKey(key), StringUtils.trin(value)); } private SkinParam(UmlDiagramType type) { this.type = type; } public static SkinParam create(UmlDiagramType type) { return new SkinParam(type); } public static SkinParam noShadowing(UmlDiagramType type) { final SkinParam result = new SkinParam(type); result.setParam("shadowing", "false"); return result; } static String cleanForKey(String key) { key = StringUtils.trin(StringUtils.goLowerCase(key)); key = key.replaceAll("_|\\.|\\s", ""); // key = replaceSmart(key, "partition", "package"); key = replaceSmart(key, "sequenceparticipant", "participant"); key = replaceSmart(key, "sequenceactor", "actor"); // if (key.contains("arrow")) { // key = key.replaceAll("activityarrow|objectarrow|classarrow|componentarrow|statearrow|usecasearrow", // "genericarrow"); // } key = key.replaceAll("activityarrow", "arrow"); key = key.replaceAll("objectarrow", "arrow"); key = key.replaceAll("classarrow", "arrow"); key = key.replaceAll("componentarrow", "arrow"); key = key.replaceAll("statearrow", "arrow"); key = key.replaceAll("usecasearrow", "arrow"); key = key.replaceAll("sequencearrow", "arrow"); final Matcher2 m = stereoPattern.matcher(key); if (m.find()) { final String s = m.group(1); key = key.replaceAll(stereoPatternString, ""); key += "<<" + s + ">>"; } return key; } private static String replaceSmart(String s, String src, String target) { if (s.contains(src) == false) { return s; } return s.replaceAll(src, target); } public HtmlColor getHyperlinkColor() { final HtmlColor result = getHtmlColor(ColorParam.hyperlink, null, false); if (result == null) { return HtmlColorUtils.BLUE; } return result; } public HtmlColor getBackgroundColor() { final HtmlColor result = getHtmlColor(ColorParam.background, null, false); if (result == null) { return HtmlColorUtils.WHITE; } return result; } public String getValue(String key) { return params.get(cleanForKey(key)); } static String humanName(String key) { final StringBuilder sb = new StringBuilder(); boolean upper = true; for (int i = 0; i < key.length(); i++) { final char c = key.charAt(i); if (c == '_') { upper = true; } else { sb.append(upper ? StringUtils.goUpperCase(c) : StringUtils.goLowerCase(c)); upper = false; } } return sb.toString(); } public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) { if (stereotype != null) { checkStereotype(stereotype); for (String s : stereotype.getMultipleLabels()) { final String value2 = getValue(param.name() + "color" + "<<" + s + ">>"); if (value2 != null && getIHtmlColorSet().getColorIfValid(value2) != null) { return getIHtmlColorSet().getColorIfValid(value2); } } } final String value = getValue(getParamName(param, clickable)); if (value == null) { return null; } final boolean acceptTransparent = param == ColorParam.background || param == ColorParam.sequenceGroupBodyBackground; return getIHtmlColorSet().getColorIfValid(value, acceptTransparent); } public Colors getColors(ColorParam param, Stereotype stereotype) { if (stereotype != null) { checkStereotype(stereotype); final String value2 = getValue(param.name() + "color" + stereotype.getLabel(false)); if (value2 != null && getIHtmlColorSet().getColorIfValid(value2) != null) { return new Colors(value2, getIHtmlColorSet(), param.getColorType()); } } final String value = getValue(getParamName(param, false)); if (value == null) { return Colors.empty(); } return new Colors(value, getIHtmlColorSet(), param.getColorType()); } private String getParamName(ColorParam param, boolean clickable) { String n = param.name(); if (clickable && n.endsWith("Background")) { n = n.replaceAll("Background", "ClickableBackground"); } else if (clickable && n.endsWith("Border")) { n = n.replaceAll("Border", "ClickableBorder"); } return n + "color"; } private void checkStereotype(Stereotype stereotype) { // if (stereotype.startsWith("<<") == false || stereotype.endsWith(">>") == false) { // throw new IllegalArgumentException(); // } } private int getFontSize(Stereotype stereotype, FontParam... param) { if (stereotype != null) { checkStereotype(stereotype); final String value2 = getFirstValueNonNullWithSuffix("fontsize" + stereotype.getLabel(false), param); if (value2 != null && value2.matches("\\d+")) { return Integer.parseInt(value2); } } String value = getFirstValueNonNullWithSuffix("fontsize", param); if (value == null || value.matches("\\d+") == false) { value = getValue("defaultfontsize"); } if (value == null || value.matches("\\d+") == false) { return param[0].getDefaultSize(this); } return Integer.parseInt(value); } private String getFontFamily(Stereotype stereotype, FontParam... param) { if (stereotype != null) { checkStereotype(stereotype); final String value2 = getFirstValueNonNullWithSuffix("fontname" + stereotype.getLabel(false), param); if (value2 != null) { return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(value2); } } // Times, Helvetica, Courier or Symbol String value = getFirstValueNonNullWithSuffix("fontname", param); if (value != null) { return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(value); } if (param[0] != FontParam.CIRCLED_CHARACTER) { value = getValue("defaultfontname"); if (value != null) { return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(value); } } return param[0].getDefaultFamily(); } public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param) { String value = null; if (stereotype != null) { checkStereotype(stereotype); value = getFirstValueNonNullWithSuffix("fontcolor" + stereotype.getLabel(false), param); } if (value == null || getIHtmlColorSet().getColorIfValid(value) == null) { value = getFirstValueNonNullWithSuffix("fontcolor", param); } if (value == null || getIHtmlColorSet().getColorIfValid(value) == null) { value = getValue("defaultfontcolor"); } if (value == null || getIHtmlColorSet().getColorIfValid(value) == null) { value = param[0].getDefaultColor(); } return getIHtmlColorSet().getColorIfValid(value); } private String getFirstValueNonNullWithSuffix(String suffix, FontParam... param) { for (FontParam p : param) { final String v = getValue(p.name() + suffix); if (v != null) { return v; } } return null; } private int getFontStyle(Stereotype stereotype, boolean inPackageTitle, FontParam... param) { String value = null; if (stereotype != null) { checkStereotype(stereotype); value = getFirstValueNonNullWithSuffix("fontstyle" + stereotype.getLabel(false), param); } if (value == null) { value = getFirstValueNonNullWithSuffix("fontstyle", param); } if (value == null) { value = getValue("defaultfontstyle"); } if (value == null) { return param[0].getDefaultFontStyle(this, inPackageTitle); } int result = Font.PLAIN; if (StringUtils.goLowerCase(value).contains("bold")) { result = result | Font.BOLD; } if (StringUtils.goLowerCase(value).contains("italic")) { result = result | Font.ITALIC; } return result; } public UFont getFont(Stereotype stereotype, boolean inPackageTitle, FontParam... fontParam) { if (stereotype != null) { checkStereotype(stereotype); } final String fontFamily = getFontFamily(stereotype, fontParam); final int fontStyle = getFontStyle(stereotype, inPackageTitle, fontParam); final int fontSize = getFontSize(stereotype, fontParam); return new UFont(fontFamily, fontStyle, fontSize); } public int getCircledCharacterRadius() { final String value = getValue("circledcharacterradius"); if (value != null && value.matches("\\d+")) { return Integer.parseInt(value); } // return 11; // Log.println("SIZE1="+getFontSize(FontParam.CIRCLED_CHARACTER)); // Log.println("SIZE1="+getFontSize(FontParam.CIRCLED_CHARACTER)/3); return getFontSize(null, FontParam.CIRCLED_CHARACTER) / 3 + 6; } public int classAttributeIconSize() { final String value = getValue("classAttributeIconSize"); if (value != null && value.matches("\\d+")) { return Integer.parseInt(value); } return 10; } public static Collection getPossibleValues() { final Set result = new TreeSet(); result.add("Monochrome"); // result.add("BackgroundColor"); result.add("CircledCharacterRadius"); result.add("ClassAttributeIconSize"); result.add("DefaultFontName"); result.add("DefaultFontStyle"); result.add("DefaultFontSize"); result.add("DefaultFontColor"); result.add("MinClassWidth"); result.add("MinClassWidth"); result.add("Dpi"); result.add("DefaultTextAlignment"); result.add("Shadowing"); result.add("NoteShadowing"); result.add("Handwritten"); result.add("CircledCharacterRadius"); result.add("ClassAttributeIconSize"); result.add("Linetype"); result.add("PackageStyle"); result.add("ComponentStyle"); result.add("StereotypePosition"); result.add("Nodesep"); result.add("Ranksep"); result.add("RoundCorner"); result.add("TitleBorderRoundCorner"); result.add("MaxMessageSize"); result.add("Style"); result.add("SequenceParticipant"); result.add("ConditionStyle"); result.add("SameClassWidth"); result.add("HyperlinkUnderline"); result.add("Padding"); result.add("Guillemet"); result.add("SvglinkTarget"); result.add("DefaultMonospacedFontName"); result.add("TabSize"); result.add("MaxAsciiMessageLength"); result.add("ColorArrowSeparationSpace"); for (FontParam p : EnumSet.allOf(FontParam.class)) { final String h = humanName(p.name()); result.add(h + "FontStyle"); result.add(h + "FontName"); result.add(h + "FontSize"); result.add(h + "FontColor"); } for (ColorParam p : EnumSet.allOf(ColorParam.class)) { final String h = capitalize(p.name()); result.add(h + "Color"); } for (LineParam p : EnumSet.allOf(LineParam.class)) { final String h = capitalize(p.name()); result.add(h + "Thickness"); } return Collections.unmodifiableSet(result); } private static String capitalize(String name) { return StringUtils.goUpperCase(name.substring(0, 1)) + name.substring(1); } public int getDpi() { final String value = getValue("dpi"); if (value != null && value.matches("\\d+")) { return Integer.parseInt(value); } return 96; } public DotSplines getDotSplines() { final String value = getValue("linetype"); if ("polyline".equalsIgnoreCase(value)) { return DotSplines.POLYLINE; } if ("ortho".equalsIgnoreCase(value)) { return DotSplines.ORTHO; } return DotSplines.SPLINES; } public HorizontalAlignment getHorizontalAlignment(AlignParam param, ArrowDirection arrowDirection) { final String value; switch (param) { case SEQUENCE_MESSAGE_ALIGN: value = getArg(getValue(AlignParam.SEQUENCE_MESSAGE_ALIGN.name()), 0); break; case SEQUENCE_MESSAGETEXT_ALIGN: value = getArg(getValue(AlignParam.SEQUENCE_MESSAGE_ALIGN.name()), 1); break; default: value = getValue(param.name()); } if ("direction".equalsIgnoreCase(value)) { if (arrowDirection == ArrowDirection.LEFT_TO_RIGHT_NORMAL) { return HorizontalAlignment.LEFT; } if (arrowDirection == ArrowDirection.RIGHT_TO_LEFT_REVERSE) { return HorizontalAlignment.RIGHT; } } if ("reversedirection".equalsIgnoreCase(value)) { if (arrowDirection == ArrowDirection.LEFT_TO_RIGHT_NORMAL) { return HorizontalAlignment.RIGHT; } if (arrowDirection == ArrowDirection.RIGHT_TO_LEFT_REVERSE) { return HorizontalAlignment.LEFT; } } final HorizontalAlignment result = HorizontalAlignment.fromString(value); if (result == null) { return param.getDefaultValue(); } return result; } public HorizontalAlignment getDefaultTextAlignment(HorizontalAlignment defaultValue) { final String value = getValue("defaulttextalignment"); final HorizontalAlignment result = HorizontalAlignment.fromString(value); if (result == null) { return defaultValue; } return result; } private String getArg(String value, int i) { if (value == null) { return null; } final String[] split = value.split(":"); if (i >= split.length) { return split[0]; } return split[i]; } public ColorMapper getColorMapper() { final String monochrome = getValue("monochrome"); if ("true".equals(monochrome)) { return new ColorMapperMonochrome(false); } if ("reverse".equals(monochrome)) { return new ColorMapperMonochrome(true); } final String value = getValue("reversecolor"); if (value == null) { return new ColorMapperIdentity(); } final ColorOrder order = ColorOrder.fromString(value); if (order == null) { return new ColorMapperIdentity(); } return new ColorMapperReverse(order); } public boolean shadowing() { final String value = getValue("shadowing"); if ("false".equalsIgnoreCase(value)) { return false; } if ("true".equalsIgnoreCase(value)) { return true; } if (strictUmlStyle()) { return false; } return true; } public boolean shadowingForNote(Stereotype stereotype) { if (stereotype != null) { checkStereotype(stereotype); final String value2 = getValue("note" + "shadowing" + stereotype.getLabel(false)); if (value2 != null) { return value2.equalsIgnoreCase("true"); } } final String value2 = getValue("note" + "shadowing"); if (value2 != null) { return value2.equalsIgnoreCase("true"); } return shadowing(); } public boolean shadowing2(SkinParameter skinParameter) { if (skinParameter == null) { throw new IllegalArgumentException(); } final String name = skinParameter.getUpperCaseName(); final String value = getValue(name + "shadowing"); if (value == null) { return shadowing(); } if ("false".equalsIgnoreCase(value)) { return false; } if ("true".equalsIgnoreCase(value)) { return true; } if (strictUmlStyle()) { return false; } return true; } public PackageStyle getPackageStyle() { final String value = getValue("packageStyle"); final PackageStyle p = PackageStyle.fromString(value); if (p == null) { return PackageStyle.FOLDER; } return p; } private final Map sprites = new HashMap(); public void addSprite(String name, Sprite sprite) { sprites.put(name, sprite); } public Sprite getSprite(String name) { Sprite result = sprites.get(name); if (result == null) { result = SpriteImage.fromInternal(name); } return result; } public boolean useUml2ForComponent() { if (strictUmlStyle()) { return true; } final String value = getValue("componentstyle"); return "uml2".equalsIgnoreCase(value); } public boolean stereotypePositionTop() { final String value = getValue("stereotypePosition"); if ("bottom".equalsIgnoreCase(value)) { return false; } return true; } public boolean useSwimlanes(UmlDiagramType type) { if (type != UmlDiagramType.ACTIVITY) { return false; } if ("true".equalsIgnoreCase(getValue("swimlane"))) { return true; } if ("true".equalsIgnoreCase(getValue("swimlanes"))) { return true; } return false; } public double getNodesep() { final String value = getValue("nodesep"); if (value != null && value.matches("\\d+")) { return Double.parseDouble(value); } return 0; } public double getRanksep() { final String value = getValue("ranksep"); if (value != null && value.matches("\\d+")) { return Double.parseDouble(value); } return 0; } public double getRoundCorner(String param, Stereotype stereotype) { String key = param + "roundcorner"; if (stereotype != null) { key += stereotype.getLabel(false); } final String value = getValue(key); if (value != null && value.matches("\\d+")) { return Double.parseDouble(value); } return 0; } public UStroke getThickness(LineParam param, Stereotype stereotype) { if (stereotype != null) { checkStereotype(stereotype); final String value2 = getValue(param.name() + "thickness" + stereotype.getLabel(false)); if (value2 != null && value2.matches("[\\d.]+")) { return new UStroke(Double.parseDouble(value2)); } } final String value = getValue(param.name() + "thickness"); if (value != null && value.matches("[\\d.]+")) { return new UStroke(Double.parseDouble(value)); } return null; } public LineBreakStrategy maxMessageSize() { return new LineBreakStrategy(getValue("maxmessagesize")); } public boolean strictUmlStyle() { final String value = getValue("style"); if ("strictuml".equalsIgnoreCase(value)) { return true; } return false; } public boolean forceSequenceParticipantUnderlined() { final String value = getValue("sequenceParticipant"); if ("underline".equalsIgnoreCase(value)) { return true; } return false; } public ConditionStyle getConditionStyle() { final String value = getValue("conditionStyle"); final ConditionStyle p = ConditionStyle.fromString(value); if (p == null) { return ConditionStyle.INSIDE; } return p; } public double minClassWidth() { final String value = getValue("minclasswidth"); if (value != null && value.matches("\\d+")) { return Integer.parseInt(value); } return 0; } public boolean sameClassWidth() { return "true".equals(getValue("sameclasswidth")); } public final Rankdir getRankdir() { return rankdir; } public final void setRankdir(Rankdir rankdir) { this.rankdir = rankdir; } public boolean useOctagonForActivity(Stereotype stereotype) { String value = getValue("activityshape"); if (stereotype != null) { checkStereotype(stereotype); final String value2 = getValue("activityshape" + stereotype.getLabel(false)); if (value2 != null) { value = value2; } } if ("roundedbox".equalsIgnoreCase(value)) { return false; } if ("octagon".equalsIgnoreCase(value)) { return true; } return false; } private final IHtmlColorSet htmlColorSet = new HtmlColorSetSimple(); public IHtmlColorSet getIHtmlColorSet() { return htmlColorSet; } public boolean useUnderlineForHyperlink() { final String value = getValue("hyperlinkunderline"); if ("false".equalsIgnoreCase(value)) { return false; } return true; } public int groupInheritance() { final String value = getValue("groupinheritance"); int result = Integer.MAX_VALUE; if (value != null && value.matches("\\d+")) { result = Integer.parseInt(value); } if (result <= 1) { result = Integer.MAX_VALUE; } return result; } public boolean useGuillemet() { final String value = getValue("guillemet"); if ("false".equalsIgnoreCase(value)) { return false; } return true; } public boolean handwritten() { final String value = getValue("handwritten"); if ("true".equalsIgnoreCase(value)) { return true; } return false; } public String getSvgLinkTarget() { final String value = getValue("svglinktarget"); if (value == null) { return "_top"; } return value; } public String getMonospacedFamily() { final String value = getValue("defaultMonospacedFontName"); if (value == null) { return CommandCreoleMonospaced.MONOSPACED; } return value; } public int getTabSize() { final String value = getValue("tabsize"); if (value != null && value.matches("\\d+")) { return Integer.parseInt(value); } return 8; } public int maxAsciiMessageLength() { final String value = getValue("maxasciimessagelength"); if (value != null && value.matches("\\d+")) { return Integer.parseInt(value); } return -1; } public int colorArrowSeparationSpace() { final String value = getValue("colorarrowseparationspace"); if (value != null && value.matches("\\d+")) { return Integer.parseInt(value); } return 0; } public SplitParam getSplitParam() { final String border = getValue("pageBorderColor"); final String external = getValue("pageExternalColor"); final String marginString = getValue("pageMargin"); int margin = 0; if (marginString != null && marginString.matches("\\d+")) { margin = Integer.parseInt(marginString); } return new SplitParam(getIHtmlColorSet().getColorIfValid(border), getIHtmlColorSet().getColorIfValid(external), margin); } public int swimlaneWidth() { final String value = getValue("swimlanewidth"); if ("same".equalsIgnoreCase(value)) { return -1; } if (value != null && value.matches("\\d+")) { return Integer.parseInt(value); } return 0; } public UmlDiagramType getUmlDiagramType() { return type; } public HtmlColor getHoverPathColor() { final String value = getValue("pathhovercolor"); if (value == null) { return null; } return getIHtmlColorSet().getColorIfValid(value, false); } public double getPadding() { final String value = getValue("padding"); if (value != null && value.matches("\\d+(\\.\\d+)?")) { return Double.parseDouble(value); } return 0; } public double getPadding(PaddingParam param) { final String value = getValue(param.getSkinName()); if (value != null && value.matches("\\d+(\\.\\d+)?")) { return Double.parseDouble(value); } return 0; } public boolean useRankSame() { return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SkinParamBackcolored.java000066400000000000000000000065051312650303100263010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.util.EnumMap; import java.util.Map; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.HtmlColor; public class SkinParamBackcolored extends SkinParamDelegator { final private HtmlColor backColorElement; final private HtmlColor backColorGeneral; final private boolean forceClickage; public SkinParamBackcolored(ISkinParam skinParam, HtmlColor backColorElement) { this(skinParam, backColorElement, null, false); } public SkinParamBackcolored(ISkinParam skinParam, HtmlColor backColorElement, boolean forceClickage) { this(skinParam, backColorElement, null, forceClickage); } public SkinParamBackcolored(ISkinParam skinParam, HtmlColor backColorElement, HtmlColor backColorGeneral) { this(skinParam, backColorElement, backColorGeneral, false); } @Override public String toString() { return super.toString() + " " + backColorElement + " " + backColorGeneral; } public SkinParamBackcolored(ISkinParam skinParam, HtmlColor backColorElement, HtmlColor backColorGeneral, boolean forceClickage) { super(skinParam); this.forceClickage = forceClickage; this.backColorElement = backColorElement; this.backColorGeneral = backColorGeneral; } @Override public HtmlColor getBackgroundColor() { if (backColorGeneral != null) { return backColorGeneral; } return super.getBackgroundColor(); } @Override public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) { if (param.isBackground() && backColorElement != null) { return backColorElement; } if (forceClickage) { final HtmlColor c1 = super.getHtmlColor(param, stereotype, true); if (c1 != null) { return c1; } // clickable = true; } final HtmlColor forcedColor = forced.get(param); if (forcedColor != null) { return forcedColor; } return super.getHtmlColor(param, stereotype, clickable); } private final Map forced = new EnumMap(ColorParam.class); public void forceColor(ColorParam param, HtmlColor color) { forced.put(param, color); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SkinParamBackcoloredReference.java000066400000000000000000000044731312650303100301220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.HtmlColor; public class SkinParamBackcoloredReference extends SkinParamDelegator { final private HtmlColor sequenceReferenceHeaderBackground; final private HtmlColor sequenceReferenceBackground; public SkinParamBackcoloredReference(ISkinParam skinParam, HtmlColor sequenceReferenceHeaderBackground, HtmlColor sequenceReferenceBackground) { super(skinParam); this.sequenceReferenceBackground = sequenceReferenceBackground; this.sequenceReferenceHeaderBackground = sequenceReferenceHeaderBackground; } @Override public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) { if (param == ColorParam.sequenceReferenceHeaderBackground && sequenceReferenceHeaderBackground != null) { return sequenceReferenceHeaderBackground; } if (param == ColorParam.sequenceReferenceBackground && sequenceReferenceBackground != null) { return sequenceReferenceBackground; } return super.getHtmlColor(param, stereotype, clickable); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SkinParamColors.java000066400000000000000000000050521312650303100253260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; public class SkinParamColors extends SkinParamDelegator { final private Colors colors; public SkinParamColors(ISkinParam skinParam, Colors colors) { super(skinParam); this.colors = colors; } @Override public String toString() { return super.toString() + colors; } @Override public boolean shadowing() { if (colors.getShadowing() == null) { return super.shadowing(); } return colors.getShadowing(); } @Override public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param) { final HtmlColor value = colors.getColor(ColorType.TEXT); if (value == null) { return super.getFontHtmlColor(stereotype, param); } return value; } @Override public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) { final ColorType type = param.getColorType(); if (type == null) { return super.getHtmlColor(param, stereotype, clickable); } final HtmlColor value = colors.getColor(type); if (value != null) { return value; } assert value == null; return super.getHtmlColor(param, stereotype, clickable); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SkinParamDelegator.java000066400000000000000000000156171312650303100260030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.cucadiagram.Rankdir; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.dot.DotSplines; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.IHtmlColorSet; import net.sourceforge.plantuml.graphic.SkinParameter; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.skin.ArrowDirection; import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.svek.PackageStyle; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.sprite.Sprite; public class SkinParamDelegator implements ISkinParam { final private ISkinParam skinParam; public SkinParamDelegator(ISkinParam skinParam) { this.skinParam = skinParam; } public HtmlColor getHyperlinkColor() { return skinParam.getHyperlinkColor(); } public HtmlColor getBackgroundColor() { return skinParam.getBackgroundColor(); } public int getCircledCharacterRadius() { return skinParam.getCircledCharacterRadius(); } public UFont getFont(Stereotype stereotype, boolean inPackageTitle, FontParam... fontParam) { return skinParam.getFont(stereotype, false, fontParam); } public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param) { return skinParam.getFontHtmlColor(stereotype, param); } public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) { return skinParam.getHtmlColor(param, stereotype, clickable); } public String getValue(String key) { return skinParam.getValue(key); } public int classAttributeIconSize() { return skinParam.classAttributeIconSize(); } public int getDpi() { return skinParam.getDpi(); } public DotSplines getDotSplines() { return skinParam.getDotSplines(); } public String getDotExecutable() { return skinParam.getDotExecutable(); } public HorizontalAlignment getHorizontalAlignment(AlignParam param, ArrowDirection arrowDirection) { return skinParam.getHorizontalAlignment(param, arrowDirection); } public ColorMapper getColorMapper() { return skinParam.getColorMapper(); } public boolean shadowing() { return skinParam.shadowing(); } public boolean shadowing2(SkinParameter skinParameter) { return skinParam.shadowing2(skinParameter); } public PackageStyle getPackageStyle() { return skinParam.getPackageStyle(); } public Sprite getSprite(String name) { return skinParam.getSprite(name); } public boolean useUml2ForComponent() { return skinParam.useUml2ForComponent(); } public boolean stereotypePositionTop() { return skinParam.stereotypePositionTop(); } public boolean useSwimlanes(UmlDiagramType type) { return skinParam.useSwimlanes(type); } public double getNodesep() { return skinParam.getNodesep(); } public double getRanksep() { return skinParam.getRanksep(); } public double getRoundCorner(String param, Stereotype stereotype) { return skinParam.getRoundCorner(param, stereotype); } public UStroke getThickness(LineParam param, Stereotype stereotype) { return skinParam.getThickness(param, stereotype); } public LineBreakStrategy maxMessageSize() { return skinParam.maxMessageSize(); } public boolean strictUmlStyle() { return skinParam.strictUmlStyle(); } public boolean forceSequenceParticipantUnderlined() { return skinParam.forceSequenceParticipantUnderlined(); } public ConditionStyle getConditionStyle() { return skinParam.getConditionStyle(); } public double minClassWidth() { return skinParam.minClassWidth(); } public boolean sameClassWidth() { return skinParam.sameClassWidth(); } public Rankdir getRankdir() { return skinParam.getRankdir(); } public boolean useOctagonForActivity(Stereotype stereotype) { return skinParam.useOctagonForActivity(stereotype); } public IHtmlColorSet getIHtmlColorSet() { return skinParam.getIHtmlColorSet(); } public boolean useUnderlineForHyperlink() { return skinParam.useUnderlineForHyperlink(); } public HorizontalAlignment getDefaultTextAlignment(HorizontalAlignment defaultValue) { return skinParam.getDefaultTextAlignment(defaultValue); } public double getPadding() { return skinParam.getPadding(); } public int groupInheritance() { return skinParam.groupInheritance(); } public boolean useGuillemet() { return skinParam.useGuillemet(); } public boolean handwritten() { return skinParam.handwritten(); } public String getSvgLinkTarget() { return skinParam.getSvgLinkTarget(); } public String getMonospacedFamily() { return skinParam.getMonospacedFamily(); } public Colors getColors(ColorParam param, Stereotype stereotype) { return skinParam.getColors(param, stereotype); } public int getTabSize() { return skinParam.getTabSize(); } public boolean shadowingForNote(Stereotype stereotype) { return shadowingForNote(stereotype); } public int maxAsciiMessageLength() { return skinParam.maxAsciiMessageLength(); } public int colorArrowSeparationSpace() { return skinParam.colorArrowSeparationSpace(); } public SplitParam getSplitParam() { return skinParam.getSplitParam(); } public int swimlaneWidth() { return skinParam.swimlaneWidth(); } public UmlDiagramType getUmlDiagramType() { return skinParam.getUmlDiagramType(); } public HtmlColor getHoverPathColor() { return skinParam.getHoverPathColor(); } public double getPadding(PaddingParam param) { return skinParam.getPadding(param); } public boolean useRankSame() { return skinParam.useRankSame(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SkinParamForceColor.java000066400000000000000000000036201312650303100261210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.HtmlColor; public class SkinParamForceColor extends SkinParamDelegator { final private ColorParam colorParam;; final private HtmlColor color; public SkinParamForceColor(ISkinParam skinParam, ColorParam colorParam, HtmlColor color) { super(skinParam); this.color = color; this.colorParam = colorParam; } @Override public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) { if (colorParam == param) { return color; } // return color; return super.getHtmlColor(param, stereotype, clickable); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SkinParamForecolored.java000066400000000000000000000033301312650303100263250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.HtmlColor; public class SkinParamForecolored extends SkinParamDelegator { final private HtmlColor forecolor; public SkinParamForecolored(ISkinParam skinParam, HtmlColor forecolor) { super(skinParam); this.forecolor = forecolor; } @Override public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) { return forecolor; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SkinParamSameClassWidth.java000066400000000000000000000030341312650303100267360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public class SkinParamSameClassWidth extends SkinParamDelegator { final private double width; public SkinParamSameClassWidth(ISkinParam skinParam, double width) { super(skinParam); this.width = width; } @Override public double minClassWidth() { return width; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SkinParamUtils.java000066400000000000000000000037761312650303100252000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.ugraphic.UFont; public class SkinParamUtils { private static final Rose rose = new Rose(); public static UFont getFont(ISkinParam skinParam, FontParam fontParam, Stereotype stereo) { return skinParam.getFont(stereo, false, fontParam); } public static HtmlColor getFontColor(ISkinParam skinParam, FontParam fontParam, Stereotype stereo) { return skinParam.getFontHtmlColor(stereo, fontParam); } public static HtmlColor getColor(ISkinParam skinParam, ColorParam colorParam, Stereotype stereo) { return rose.getHtmlColor(skinParam, colorParam, stereo); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SourceFileReader.java000066400000000000000000000212431312650303100254420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintStream; import java.io.Reader; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.preproc.FileWithSuffix; public class SourceFileReader implements ISourceFileReader { private final File file; private final File outputDirectory; private final BlockUmlBuilder builder; private FileFormatOption fileFormatOption; public SourceFileReader(File file) throws IOException { this(file, file.getAbsoluteFile().getParentFile()); } public SourceFileReader(File file, File outputDirectory, String charset) throws IOException { this(Defines.createWithFileName(file), file, outputDirectory, Collections. emptyList(), charset, new FileFormatOption(FileFormat.PNG)); } public SourceFileReader(final File file, File outputDirectory) throws IOException { this(Defines.createWithFileName(file), file, outputDirectory, Collections. emptyList(), null, new FileFormatOption(FileFormat.PNG)); } public SourceFileReader(final File file, File outputDirectory, FileFormatOption fileFormatOption) throws IOException { this(Defines.createWithFileName(file), file, outputDirectory, Collections. emptyList(), null, fileFormatOption); } public SourceFileReader(Defines defines, final File file, File outputDirectory, List config, String charset, FileFormatOption fileFormatOption) throws IOException { this.file = file; this.fileFormatOption = fileFormatOption; if (file.exists() == false) { throw new IllegalArgumentException(); } FileSystem.getInstance().setCurrentDir(file.getAbsoluteFile().getParentFile()); if (outputDirectory == null) { outputDirectory = file.getAbsoluteFile().getParentFile(); } else if (outputDirectory.isAbsolute() == false) { outputDirectory = FileSystem.getInstance().getFile(outputDirectory.getPath()); } if (outputDirectory.exists() == false) { outputDirectory.mkdirs(); } this.outputDirectory = outputDirectory; builder = new BlockUmlBuilder(config, charset, defines, getReader(charset), file.getAbsoluteFile() .getParentFile(), file.getAbsolutePath()); } public boolean hasError() { for (final BlockUml b : builder.getBlockUmls()) { if (b.getDiagram() instanceof PSystemError) { return true; } } return false; } private File getDirIfDirectory(String newName) { Log.info("Checking=" + newName); if (endsWithSlashOrAntislash(newName)) { Log.info("It ends with / so it looks like a directory"); newName = newName.substring(0, newName.length() - 1); File f = new File(newName); Log.info("f=" + f); if (f.isAbsolute() == false) { Log.info("It's relative, so let's change it"); f = new File(outputDirectory, newName); Log.info("f=" + f); } if (f.exists() == false) { Log.info("It does not exist: let's create it"); try { f.mkdirs(); } catch (Exception e) { Log.info("Error " + e); } if (f.exists() && f.isDirectory()) { Log.info("Creation ok"); return f; } Log.info("We cannot create it"); } else if (f.isDirectory() == false) { Log.info("It exists, but is not a directory: we ignore it"); return null; } return f; } File f = new File(newName); Log.info("f=" + f); if (f.isAbsolute() == false) { Log.info("Relative, so let's change it"); f = new File(outputDirectory, newName); Log.info("f=" + f); } if (f.exists() && f.isDirectory()) { Log.info("It's an existing directory"); return f; } Log.info("It's not a directory"); return null; } public List getGeneratedImages() throws IOException { Log.info("Reading file: " + file); int cpt = 0; final List result = new ArrayList(); for (BlockUml blockUml : builder.getBlockUmls()) { final String newName = blockUml.getFileOrDirname(); SuggestedFile suggested = null; if (newName != null) { Log.info("name from block=" + newName); final File dir = getDirIfDirectory(newName); if (dir == null) { Log.info(newName + " is not taken as a directory"); suggested = SuggestedFile.fromOutputFile(new File(outputDirectory, newName), fileFormatOption.getFileFormat(), 0); } else { Log.info("We are going to create files in directory " + dir); suggested = SuggestedFile.fromOutputFile(new File(dir, file.getName()), fileFormatOption.getFileFormat(), 0); } Log.info("We are going to put data in " + suggested); } if (suggested == null) { suggested = SuggestedFile.fromOutputFile(new File(outputDirectory, file.getName()), fileFormatOption.getFileFormat(), cpt++); } suggested.getParentFile().mkdirs(); final Diagram system; try { system = blockUml.getDiagram(); } catch (Throwable t) { final GeneratedImage image = new GeneratedImageImpl(suggested.getFile(0), "Crash Error", blockUml); OutputStream os = null; try { os = new BufferedOutputStream(new FileOutputStream(suggested.getFile(0))); UmlDiagram.exportDiagramError(os, t, fileFormatOption, 42, null, blockUml.getFlashData(), UmlDiagram.getFailureText2(t, blockUml.getFlashData())); } finally { if (os != null) { os.close(); } } return Collections.singletonList(image); } final List exportDiagrams = PSystemUtils.exportDiagrams(system, suggested, fileFormatOption); if (exportDiagrams.size() > 1) { cpt += exportDiagrams.size() - 1; } OptionFlags.getInstance().logData(file, system); for (FileImageData fdata : exportDiagrams) { final String desc = "[" + file.getName() + "] " + system.getDescription(); final File f = fdata.getFile(); if (OptionFlags.getInstance().isWord()) { final String warnOrError = system.getWarningOrError(); if (warnOrError != null) { final String name = f.getName().substring(0, f.getName().length() - 4) + ".err"; final File errorFile = new File(f.getParentFile(), name); final PrintStream ps = new PrintStream(new FileOutputStream(errorFile)); ps.print(warnOrError); ps.close(); } } final GeneratedImage generatedImage = new GeneratedImageImpl(f, desc, blockUml); result.add(generatedImage); } } Log.info("Number of image(s): " + result.size()); return Collections.unmodifiableList(result); } private boolean endsWithSlashOrAntislash(String newName) { return newName.endsWith("/") || newName.endsWith("\\"); } public List getBlocks() { return builder.getBlockUmls(); } private Reader getReader(String charset) throws FileNotFoundException, UnsupportedEncodingException { if (charset == null) { Log.info("Using default charset"); return new InputStreamReader(new FileInputStream(file)); } Log.info("Using charset " + charset); return new InputStreamReader(new FileInputStream(file), charset); } public final void setFileFormatOption(FileFormatOption fileFormatOption) { this.fileFormatOption = fileFormatOption; } public final Set getIncludedFiles() { return builder.getIncludedFiles(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SourceFileReader2.java000066400000000000000000000102141312650303100255200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.preproc.FileWithSuffix; public class SourceFileReader2 implements ISourceFileReader { private final File file; private final File outputFile; private final BlockUmlBuilder builder; private FileFormatOption fileFormatOption; public SourceFileReader2(Defines defines, final File file, File outputFile, List config, String charset, FileFormatOption fileFormatOption) throws IOException { this.file = file; this.fileFormatOption = fileFormatOption; this.outputFile = outputFile; if (file.exists() == false) { throw new IllegalArgumentException(); } FileSystem.getInstance().setCurrentDir(file.getAbsoluteFile().getParentFile()); builder = new BlockUmlBuilder(config, charset, defines, getReader(charset), file.getAbsoluteFile() .getParentFile(), file.getAbsolutePath()); } public boolean hasError() { for (final BlockUml b : builder.getBlockUmls()) { if (b.getDiagram() instanceof PSystemError) { return true; } } return false; } public List getGeneratedImages() throws IOException { Log.info("Reading file: " + file); final List result = new ArrayList(); for (BlockUml blockUml : builder.getBlockUmls()) { final SuggestedFile suggested = SuggestedFile.fromOutputFile(outputFile, fileFormatOption.getFileFormat()); final Diagram system = blockUml.getDiagram(); OptionFlags.getInstance().logData(file, system); for (FileImageData fdata : PSystemUtils.exportDiagrams(system, suggested, fileFormatOption)) { final String desc = "[" + file.getName() + "] " + system.getDescription(); final GeneratedImage generatedImage = new GeneratedImageImpl(fdata.getFile(), desc, blockUml); result.add(generatedImage); } } Log.info("Number of image(s): " + result.size()); return Collections.unmodifiableList(result); } private Reader getReader(String charset) throws FileNotFoundException, UnsupportedEncodingException { if (charset == null) { Log.info("Using default charset"); return new InputStreamReader(new FileInputStream(file)); } Log.info("Using charset " + charset); return new InputStreamReader(new FileInputStream(file), charset); } public final void setFileFormatOption(FileFormatOption fileFormatOption) { this.fileFormatOption = fileFormatOption; } public final Set getIncludedFiles2() { return builder.getIncludedFiles(); } public List getBlocks() { return builder.getBlockUmls(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SourceStringReader.java000066400000000000000000000172051312650303100260340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.StringReader; import java.util.Arrays; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class SourceStringReader { final private List blocks; public SourceStringReader(String source) { this(Defines.createEmpty(), source, Collections. emptyList()); } public SourceStringReader(String source, String charset) { this(Defines.createEmpty(), source, "UTF-8", Collections. emptyList()); } public SourceStringReader(Defines defines, String source, List config) { this(defines, source, "UTF-8", config); } public SourceStringReader(String source, File newCurrentDir) { this(Defines.createEmpty(), source, "UTF-8", Collections. emptyList(), newCurrentDir); } public SourceStringReader(Defines defines, String source, String charset, List config) { this(defines, source, charset, config, null); } public SourceStringReader(Defines defines, String source, String charset, List config, File newCurrentDir) { // WARNING GLOBAL LOCK HERE synchronized (SourceStringReader.class) { try { final BlockUmlBuilder builder = new BlockUmlBuilder(config, charset, defines, new StringReader(source), newCurrentDir, null); this.blocks = builder.getBlockUmls(); } catch (IOException e) { Log.error("error " + e); throw new IllegalStateException(e); } } } @Deprecated public String generateImage(OutputStream os) throws IOException { return outputImage(os).getDescription(); } public DiagramDescription outputImage(OutputStream os) throws IOException { return outputImage(os, 0); } @Deprecated public String generateImage(File f) throws IOException { return outputImage(f).getDescription(); } public DiagramDescription outputImage(File f) throws IOException { final OutputStream os = new BufferedOutputStream(new FileOutputStream(f)); DiagramDescription result = null; try { result = outputImage(os, 0); } finally { os.close(); } return result; } @Deprecated public String generateImage(OutputStream os, FileFormatOption fileFormatOption) throws IOException { return outputImage(os, fileFormatOption).getDescription(); } public DiagramDescription outputImage(OutputStream os, FileFormatOption fileFormatOption) throws IOException { return outputImage(os, 0, fileFormatOption); } @Deprecated public String generateImage(OutputStream os, int numImage) throws IOException { return outputImage(os, numImage).getDescription(); } public DiagramDescription outputImage(OutputStream os, int numImage) throws IOException { return outputImage(os, numImage, new FileFormatOption(FileFormat.PNG)); } @Deprecated public String generateImage(OutputStream os, int numImage, FileFormatOption fileFormatOption) throws IOException { return outputImage(os, numImage, fileFormatOption).getDescription(); } public DiagramDescription outputImage(OutputStream os, int numImage, FileFormatOption fileFormatOption) throws IOException { if (blocks.size() == 0) { noStartumlFound(os, fileFormatOption, 42); return null; } for (BlockUml b : blocks) { final Diagram system = b.getDiagram(); final int nbInSystem = system.getNbImages(); if (numImage < nbInSystem) { // final CMapData cmap = new CMapData(); final ImageData imageData = system.exportDiagram(os, numImage, fileFormatOption); // if (imageData.containsCMapData()) { // return system.getDescription().getDescription() + BackSlash.BS_N + imageData.getCMapData("plantuml"); // } return system.getDescription(); } numImage -= nbInSystem; } Log.error("numImage is too big = " + numImage); return null; } public DiagramDescription generateDiagramDescription(int numImage, FileFormatOption fileFormatOption) { if (blocks.size() == 0) { return null; } for (BlockUml b : blocks) { final Diagram system = b.getDiagram(); final int nbInSystem = system.getNbImages(); if (numImage < nbInSystem) { // final ImageData imageData = system.exportDiagram(os, numImage, fileFormatOption); // if (imageData.containsCMapData()) { // return system.getDescription().withCMapData(imageData.getCMapData("plantuml")); // } return system.getDescription(); } numImage -= nbInSystem; } Log.error("numImage is too big = " + numImage); return null; } public DiagramDescription generateDiagramDescription() { return generateDiagramDescription(0); } public DiagramDescription generateDiagramDescription(FileFormatOption fileFormatOption) { return generateDiagramDescription(0, fileFormatOption); } public DiagramDescription generateDiagramDescription(int numImage) { return generateDiagramDescription(numImage, new FileFormatOption(FileFormat.PNG)); } public String getCMapData(int numImage, FileFormatOption fileFormatOption) throws IOException { if (blocks.size() == 0) { return null; } for (BlockUml b : blocks) { final Diagram system = b.getDiagram(); final int nbInSystem = system.getNbImages(); if (numImage < nbInSystem) { final ImageData imageData = system.exportDiagram(new NullOutputStream(), numImage, fileFormatOption); if (imageData.containsCMapData()) { return imageData.getCMapData("plantuml"); } return null; } numImage -= nbInSystem; } return null; } private void noStartumlFound(OutputStream os, FileFormatOption fileFormatOption, long seed) throws IOException { final TextBlockBackcolored error = GraphicStrings.createForError(Arrays.asList("No @startuml found"), fileFormatOption.isUseRedForError()); final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, error.getBackcolor(), null, null, 0, 0, null, false); imageBuilder.setUDrawable(error); imageBuilder.writeImageTOBEMOVED(fileFormatOption, seed, os); } public final List getBlocks() { return Collections.unmodifiableList(blocks); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SpecificBackcolorable.java000066400000000000000000000030211312650303100264420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.graphic.color.Colors; public interface SpecificBackcolorable { public Colors getColors(ISkinParam skinParam); // public void setSpecificColorTOBEREMOVED(ColorType type, HtmlColor color); public void setColors(Colors colors); }plantuml-1.2017.15/src/net/sourceforge/plantuml/Splash.java000066400000000000000000000162141312650303100235130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.awt.Color; import java.awt.Cursor; import java.awt.Desktop; import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; import java.awt.Toolkit; import java.awt.Window; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.net.URL; import java.util.concurrent.atomic.AtomicInteger; import net.sourceforge.plantuml.version.PSystemVersion; public class Splash extends Window implements MouseListener, MouseMotionListener { private static final Color LINK_NORMAL = Color.BLUE; private static final Color LINK_HOVER = new Color(127, 0, 127); private static Splash singleton; private final int width = 280; private final int height = 80; private final BufferedImage logo; private final AtomicInteger total = new AtomicInteger(); private final AtomicInteger done = new AtomicInteger(); private final AtomicInteger errors = new AtomicInteger(); private final Font font = new Font("SansSerif", Font.BOLD, 12); public static void main(String[] args) throws Exception { Splash.createSplash(); Splash.incTotal(30); for (int i = 0; i < 20; i++) { Splash.incDone(i > 3); Thread.sleep(1000); } } private Splash() { super(null); this.logo = PSystemVersion.getPlantumlImage(); final Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); final int x = (int) ((dimension.getWidth() - width)) / 2; final int y = (int) ((dimension.getHeight() - height)) / 2; this.setBounds(x, y, width, height); this.setVisible(true); this.setAlwaysOnTop(true); this.setFocusable(false); this.setFocusableWindowState(false); addMouseListener(this); addMouseMotionListener(this); } private int xClicked; private int yClicked; private int limY; private int limX; public void mouseDragged(MouseEvent event) { int x = event.getXOnScreen(); int y = event.getYOnScreen(); this.setBounds(x - xClicked, y - yClicked, width, height); } private Color link = LINK_NORMAL; public void mouseMoved(MouseEvent event) { if (event.getY() > limY && event.getX() < limX) { updateLinkColor(LINK_HOVER); } else { updateLinkColor(LINK_NORMAL); } } private void updateLinkColor(final Color newLink) { if (link != newLink) { link = newLink; this.setCursor(link == LINK_NORMAL ? Cursor.getDefaultCursor() : Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); repaint(); } } public void mouseReleased(MouseEvent event) { // System.err.println("mouseReleased " + event); } public void mousePressed(MouseEvent event) { this.xClicked = event.getX(); this.yClicked = event.getY(); } public void mouseClicked(MouseEvent event) { if (link != LINK_NORMAL) { try { Desktop.getDesktop().browse(new URL("http://plantuml.com").toURI()); } catch (Exception e) { e.printStackTrace(); } return; } this.xClicked = event.getX(); this.yClicked = event.getY(); } public void mouseExited(MouseEvent event) { updateLinkColor(LINK_NORMAL); } public void mouseEntered(MouseEvent event) { // System.err.println("mouseEntered " + event); } private void incTotalInternal(int nb) { this.total.addAndGet(nb); // invalidate(); repaint(); // System.err.println("INC TOTAL=" + done + "/" + total); } private void incDoneInternal(boolean error) { this.done.incrementAndGet(); if (error) { this.errors.incrementAndGet(); } // invalidate(); repaint(); // System.err.println("INC TOTAL=" + done + "/" + total); } @Override public void paint(Graphics g) { super.paint(g); g.setColor(Color.WHITE); g.fillRect(0, 0, width, height); g.setColor(Color.BLACK); g.drawRect(0, 0, width - 1, height - 1); g.drawRect(1, 1, width - 3, height - 3); // g.setColor(Color.RED); // final String status = done + "/" + total; // g.drawString(status, width / 2, height / 2); g.drawImage(logo, width - logo.getWidth() - 4, height - logo.getHeight() - 4, null); drawProgessBar(g, done.intValue(), total.intValue()); final int nbErrors = errors.get(); if (nbErrors > 0) { g.setColor(Color.RED); final String message = "" + nbErrors + (nbErrors > 1 ? " diagrams" : " diagram") + " contains errors"; g.drawString(message, 10, 20); } g.setColor(link); final String urllink = "http://plantuml.com"; final Rectangle2D rect = getUsed(g, urllink); g.drawString(urllink, 10, (int) (height - rect.getMaxY())); limY = (int) (height - rect.getMaxY() + rect.getMinY()); limX = (int) (10 + rect.getMaxX()); } private void drawProgessBar(Graphics g, int intValue, int totalValue) { if (totalValue == 0) { return; } g.setFont(font); final String label = "" + intValue + "/" + totalValue; final Rectangle2D rect = getUsed(g, label); final int x = 10; final int y = 33; final int barWidth = 170; final int barHeight = (int) (rect.getHeight() + 2); final int grey = 230; g.setColor(new Color(grey, grey, grey)); final int value = barWidth * intValue / totalValue; g.fillRect(x, y, value, barHeight); g.setColor(Color.BLACK); g.drawRect(x, y, barWidth, barHeight); final double xLabel = x + (barWidth - rect.getWidth()) / 2; final double yLabel = y - rect.getY() + (barHeight - rect.getHeight()) / 2; g.drawString(label, (int) xLabel, (int) yLabel); } private Rectangle2D getUsed(Graphics g, final String label) { return g.getFontMetrics().getStringBounds(label, g); } // Static public synchronized static void createSplash() { if (singleton == null) { singleton = new Splash(); } } public static void incTotal(int nb) { if (singleton != null) { singleton.incTotalInternal(nb); } } public static void incDone(boolean error) { if (singleton != null) { singleton.incDoneInternal(error); } } public synchronized static void disposeSplash() { if (singleton != null) { singleton.setVisible(false); singleton.dispose(); singleton = null; } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SplitParam.java000066400000000000000000000044021312650303100243310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.awt.Color; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorSimple; public class SplitParam { private final HtmlColor borderColor; private final HtmlColor externalColor; private final int externalMargin; public SplitParam() { this(null, null, 0); } public SplitParam(HtmlColor borderColor, HtmlColor externalColor, int externalMargin) { if (borderColor != null && externalMargin == 0) { externalMargin = 1; } this.borderColor = borderColor; this.externalColor = externalColor; this.externalMargin = externalMargin; } public boolean isSet() { return externalMargin > 0; } public int getExternalMargin() { return externalMargin; } public Color getBorderColor() { if (borderColor == null) { return null; } return ((HtmlColorSimple) borderColor).getColor999(); } public Color getExternalColor() { if (externalColor == null) { return null; } return ((HtmlColorSimple) externalColor).getColor999(); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/SpriteContainer.java000066400000000000000000000026541312650303100253750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.ugraphic.sprite.Sprite; public interface SpriteContainer { public Sprite getSprite(String name); public boolean useGuillemet(); }plantuml-1.2017.15/src/net/sourceforge/plantuml/SpriteContainerEmpty.java000066400000000000000000000041521312650303100264070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.creole.CommandCreoleMonospaced; import net.sourceforge.plantuml.graphic.HtmlColorSetSimple; import net.sourceforge.plantuml.graphic.IHtmlColorSet; import net.sourceforge.plantuml.ugraphic.sprite.Sprite; import net.sourceforge.plantuml.ugraphic.sprite.SpriteImage; public class SpriteContainerEmpty implements SpriteContainer, ISkinSimple { public Sprite getSprite(String name) { return SpriteImage.fromInternal(name); } public String getValue(String key) { return null; } public double getPadding() { return 0; } public boolean useGuillemet() { return false; } public String getMonospacedFamily() { return CommandCreoleMonospaced.MONOSPACED; } public int getTabSize() { return 8; } public IHtmlColorSet getIHtmlColorSet() { return new HtmlColorSetSimple(); } public int getDpi() { return 96; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/StringUtils.java000066400000000000000000000320451312650303100245500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.awt.Color; import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorTransparent; import net.sourceforge.plantuml.ugraphic.ColorMapper; // Do not move public class StringUtils { public static String getPlateformDependentAbsolutePath(File file) { return file.getAbsolutePath(); } final static public List getSplit(Pattern2 pattern, String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return null; } final List result = new ArrayList(); for (int i = 1; i <= m.groupCount(); i++) { result.add(m.group(i)); } return result; } public static boolean isNotEmpty(String input) { return input != null && trin(input).length() > 0; } public static boolean isNotEmpty(List input) { return input != null && input.size() > 0; } public static boolean isEmpty(String input) { return input == null || trin(input).length() == 0; } public static String manageHtml(String s) { s = s.replace("<", "<"); s = s.replace(">", ">"); return s; } public static String unicode(String s) { final StringBuilder result = new StringBuilder(); for (char c : s.toCharArray()) { if (c > 127 || c == '&' || c == '|') { final int i = c; result.append("&#" + i + ";"); } else { result.append(c); } } return result.toString(); } public static String unicodeForHtml(String s) { final StringBuilder result = new StringBuilder(); for (char c : s.toCharArray()) { if (c > 127 || c == '&' || c == '|' || c == '<' || c == '>') { final int i = c; result.append("&#" + i + ";"); } else { result.append(c); } } return result.toString(); } public static String unicodeForHtml(Display display) { final StringBuilder result = new StringBuilder(); for (int i = 0; i < display.size(); i++) { result.append(unicodeForHtml(display.get(i).toString())); if (i < display.size() - 1) { result.append("
"); } } return result.toString(); } public static String manageArrowForSequence(String s) { s = s.replace('=', '-').toLowerCase(); return s; } public static String capitalize(String s) { return s.substring(0, 1).toUpperCase() + s.substring(1).toLowerCase(); } public static String goUpperCase(String s) { return s.toUpperCase(Locale.ENGLISH); } public static char goUpperCase(char c) { return goUpperCase("" + c).charAt(0); } public static String goLowerCase(String s) { return s.toLowerCase(Locale.ENGLISH); } public static char goLowerCase(char c) { return goLowerCase("" + c).charAt(0); } public static String manageArrowForCuca(String s) { final Direction dir = getArrowDirection(s); s = s.replace('=', '-'); s = s.replaceAll("\\w*", ""); if (dir == Direction.LEFT || dir == Direction.RIGHT) { s = s.replaceAll("-+", "-"); } if (s.length() == 2 && (dir == Direction.UP || dir == Direction.DOWN)) { s = s.replaceFirst("-", "--"); } return s; } public static String manageQueueForCuca(String s) { final Direction dir = getQueueDirection(s); s = s.replace('=', '-'); s = s.replaceAll("\\w*", ""); if (dir == Direction.LEFT || dir == Direction.RIGHT) { s = s.replaceAll("-+", "-"); } if (s.length() == 1 && (dir == Direction.UP || dir == Direction.DOWN)) { s = s.replaceFirst("-", "--"); } return s; } public static Direction getArrowDirection(String s) { if (s.endsWith(">")) { return getQueueDirection(s.substring(0, s.length() - 1)); } if (s.startsWith("<")) { if (s.length() == 2) { return Direction.LEFT; } return Direction.UP; } throw new IllegalArgumentException(s); } public static Direction getQueueDirection(String s) { if (s.indexOf('<') != -1 || s.indexOf('>') != -1) { throw new IllegalArgumentException(s); } s = s.toLowerCase(); if (s.contains("left")) { return Direction.LEFT; } if (s.contains("right")) { return Direction.RIGHT; } if (s.contains("up")) { return Direction.UP; } if (s.contains("down")) { return Direction.DOWN; } if (s.contains("l")) { return Direction.LEFT; } if (s.contains("r")) { return Direction.RIGHT; } if (s.contains("u")) { return Direction.UP; } if (s.contains("d")) { return Direction.DOWN; } if (s.length() == 1) { return Direction.RIGHT; } return Direction.DOWN; } // public static Code eventuallyRemoveStartingAndEndingDoubleQuote(Code s) { // return Code.of(eventuallyRemoveStartingAndEndingDoubleQuote(s.getCode())); // } public static String eventuallyRemoveStartingAndEndingDoubleQuote(String s, String format) { if (format.contains("\"") && s.length() > 1 && isDoubleQuote(s.charAt(0)) && isDoubleQuote(s.charAt(s.length() - 1))) { return s.substring(1, s.length() - 1); } if (format.contains("(") && s.startsWith("(") && s.endsWith(")")) { return s.substring(1, s.length() - 1); } if (format.contains("[") && s.startsWith("[") && s.endsWith("]")) { return s.substring(1, s.length() - 1); } if (format.contains(":") && s.startsWith(":") && s.endsWith(":")) { return s.substring(1, s.length() - 1); } return s; } public static String eventuallyRemoveStartingAndEndingDoubleQuote(String s) { if (s == null) { return s; } return eventuallyRemoveStartingAndEndingDoubleQuote(s, "\"([:"); } private static boolean isDoubleQuote(char c) { return c == '\"' || c == '\u201c' || c == '\u201d' || c == '\u00ab' || c == '\u00bb'; } public static boolean isCJK(char c) { final Character.UnicodeBlock block = Character.UnicodeBlock.of(c); Log.println("block=" + block); return false; } public static char hiddenLesserThan() { return '\u0005'; } public static char hiddenBiggerThan() { return '\u0006'; } public static String hideComparatorCharacters(String s) { s = s.replace('<', hiddenLesserThan()); s = s.replace('>', hiddenBiggerThan()); return s; } public static String showComparatorCharacters(String s) { s = s.replace(hiddenLesserThan(), '<'); s = s.replace(hiddenBiggerThan(), '>'); return s; } public static int getWidth(Display stringsToDisplay) { int result = 1; for (CharSequence s : stringsToDisplay) { if (s != null && result < s.length()) { result = s.length(); } } return result; } public static int getHeight(List stringsToDisplay) { return stringsToDisplay.size(); } public static int getHeight(Display stringsToDisplay) { return stringsToDisplay.size(); } private static boolean isSpaceOrTab(char c) { return c == ' ' || c == '\t'; } public static boolean isDiagramCacheable(String uml) { uml = uml.toLowerCase(); if (uml.startsWith("@startuml\nversion\n")) { return false; } if (uml.startsWith("@startuml\nlicense\n")) { return false; } if (uml.startsWith("@startuml\nlicence\n")) { return false; } if (uml.startsWith("@startuml\nauthor\n")) { return false; } if (uml.startsWith("@startuml\ncheckversion")) { return false; } if (uml.startsWith("@startuml\ntestdot\n")) { return false; } if (uml.startsWith("@startuml\nsudoku\n")) { return false; } return true; } public static int getPragmaRevision(String uml) { uml = uml.toLowerCase(); final String header = "@startuml\n!pragma revision "; if (uml.startsWith(header) == false) { return -1; } int x1 = header.length(); int x2 = x1; while (x2 < uml.length() && Character.isDigit(uml.charAt(x2))) { x2++; } if (x1 == x2) { return -1; } return Integer.parseInt(uml.substring(x1, x2)); } public static List splitComma(String s) { s = trin(s); // if (s.matches("([\\p{L}0-9_.]+|[%g][^%g]+[%g])(\\s*,\\s*([\\p{L}0-9_.]+|[%g][^%g]+[%g]))*") == false) { // throw new IllegalArgumentException(); // } final List result = new ArrayList(); final Pattern2 p = MyPattern.cmpile("([\\p{L}0-9_.]+|[%g][^%g]+[%g])"); final Matcher2 m = p.matcher(s); while (m.find()) { result.add(eventuallyRemoveStartingAndEndingDoubleQuote(m.group(0))); } return Collections.unmodifiableList(result); } public static String getAsHtml(Color color) { if (color == null) { return null; } return getAsHtml(color.getRGB()); } public static String getAsSvg(ColorMapper mapper, HtmlColor color) { if (color == null) { return "none"; } if (color instanceof HtmlColorTransparent) { return "#FFFFFF"; } return getAsHtml(mapper.getMappedColor(color)); } public static String getAsHtml(int color) { final int v = 0xFFFFFF & color; String s = "000000" + Integer.toHexString(v).toUpperCase(); s = s.substring(s.length() - 6); return "#" + s; } public static String getUid(String uid1, int uid2) { return uid1 + String.format("%04d", uid2); } public static List merge(List l1, List l2) { final List result = new ArrayList(l1); result.addAll(l2); return Collections.unmodifiableList(result); } public static boolean endsWithBackslash(final String s) { return s.endsWith("\\") && s.endsWith("\\\\") == false; } public static String manageGuillemetStrict(String st) { if (st.startsWith("<< ")) { st = "\u00AB" + st.substring(3); } else if (st.startsWith("<<")) { st = "\u00AB" + st.substring(2); } if (st.endsWith(" >>")) { st = st.substring(0, st.length() - 3) + "\u00BB"; } else if (st.endsWith(">>")) { st = st.substring(0, st.length() - 2) + "\u00BB"; } return st; } public static String rot(String s) { final StringBuilder sb = new StringBuilder(); for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if ((c >= 'a' && c <= 'm') || (c >= 'A' && c <= 'M')) { c += 13; } else if ((c >= 'n' && c <= 'z') || (c >= 'N' && c <= 'Z')) { c -= 13; } sb.append(c); } return sb.toString(); } public static String manageGuillemet(String st) { return st.replaceAll("\\<\\<\\s?((?:\\<&\\w+\\>|[^<>])+?)\\s?\\>\\>", "\u00AB$1\u00BB"); } public static String manageUnicodeNotationUplus(String s) { final Pattern pattern = Pattern.compile("\\"); final Matcher matcher = pattern.matcher(s); final StringBuffer result = new StringBuffer(); while (matcher.find()) { final String num = matcher.group(1); final int value = Integer.parseInt(num, 16); matcher.appendReplacement(result, new String(Character.toChars(value))); } matcher.appendTail(result); return result.toString(); } public static String manageAmpDiese(String s) { final Pattern pattern = Pattern.compile("\\&#([0-9]+);"); final Matcher matcher = pattern.matcher(s); final StringBuffer result = new StringBuffer(); while (matcher.find()) { final String num = matcher.group(1); final char c = (char) Integer.parseInt(num); matcher.appendReplacement(result, "" + c); } matcher.appendTail(result); return result.toString(); } public static String manageTildeArobaseStart(String s) { s = s.replaceAll("~@start", "@start"); return s; } public static String trinNoTrace(CharSequence s) { return s.toString().trim(); } public static String trin(CharSequence arg) { if (arg.length() == 0) { return arg.toString(); } int i = 0; while (i < arg.length() && isSpaceOrTab(arg.charAt(i))) { i++; } int j = arg.length() - 1; while (j >= i && isSpaceOrTab(arg.charAt(j))) { j--; } if (i == 0 && j == arg.length() - 1) { return arg.toString(); } return arg.subSequence(i, j + 1).toString(); } // http://docs.oracle.com/javase/tutorial/i18n/format/dateFormat.html } plantuml-1.2017.15/src/net/sourceforge/plantuml/SuggestedFile.java000066400000000000000000000047731312650303100250220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.io.File; public class SuggestedFile { private final FileFormat fileFormat; private final int initialCpt; private final File outputFile; private SuggestedFile(File outputFile, FileFormat fileFormat, int initialCpt) { if (outputFile.getName().endsWith(fileFormat.getFileSuffix())) { throw new IllegalArgumentException(); } this.outputFile = outputFile; this.fileFormat = fileFormat; this.initialCpt = initialCpt; } @Override public String toString() { return outputFile.getAbsolutePath() + "[" + initialCpt + "]"; } public static SuggestedFile fromOutputFile(File outputFile, FileFormat fileFormat) { return fromOutputFile(outputFile, fileFormat, 0); } public File getParentFile() { return outputFile.getParentFile(); } public String getName() { return outputFile.getName(); } public File getFile(int cpt) { final String newName = fileFormat.changeName(outputFile.getName(), initialCpt + cpt); return new File(outputFile.getParentFile(), newName); } public static SuggestedFile fromOutputFile(File outputFile, FileFormat fileFormat, int initialCpt) { return new SuggestedFile(outputFile, fileFormat, initialCpt); } public File getTmpFile() { return new File(getParentFile(), getName() + ".tmp"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/SvgString.java000066400000000000000000000043311312650303100242040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.util.regex.Matcher; import java.util.regex.Pattern; public class SvgString { private final String svg; private final double scale; public SvgString(String svg, double scale) { this.svg = svg; this.scale = scale; } public String getSvg() { String result = svg; if (result.startsWith(""); result = "" + result.substring(idx + 1); } if (result.startsWith("") == false) { throw new IllegalArgumentException(); } return result; } public int getData(String name) { final Pattern p = Pattern.compile("(?i)" + name + "\\W+(\\d+)"); final Matcher m = p.matcher(svg); if (m.find()) { final String s = m.group(1); return Integer.parseInt(s); } throw new IllegalStateException("Cannot find " + name); } public double getScale() { return scale; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/UmlDiagram.java�������������������������������������0000664�0000000�0000000�00000034206�13126503031�0024304�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.awt.geom.AffineTransform; import java.awt.geom.Dimension2D; import java.awt.image.BufferedImage; import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; import java.util.List; import javax.imageio.ImageIO; import javax.script.ScriptException; import net.sourceforge.plantuml.anim.Animation; import net.sourceforge.plantuml.anim.AnimationDecoder; import net.sourceforge.plantuml.api.ImageDataSimple; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; import net.sourceforge.plantuml.cucadiagram.UnparsableGraphvizException; import net.sourceforge.plantuml.flashcode.FlashCodeFactory; import net.sourceforge.plantuml.flashcode.FlashCodeUtils; import net.sourceforge.plantuml.fun.IconLoader; import net.sourceforge.plantuml.graphic.GraphicPosition; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.graphic.VerticalAlignment; import net.sourceforge.plantuml.mjpeg.MJPEGGenerator; import net.sourceforge.plantuml.pdf.PdfConverter; import net.sourceforge.plantuml.svek.EmptySvgException; import net.sourceforge.plantuml.svek.GraphvizCrash; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.sprite.Sprite; import net.sourceforge.plantuml.version.Version; public abstract class UmlDiagram extends AbstractPSystem implements Diagram, Annotated { private boolean rotation; private boolean hideUnlinkedData; private int minwidth = Integer.MAX_VALUE; private DisplayPositionned title = DisplayPositionned.none(HorizontalAlignment.CENTER, VerticalAlignment.TOP); private DisplayPositionned caption = DisplayPositionned.none(HorizontalAlignment.CENTER, VerticalAlignment.BOTTOM); private DisplayPositionned header = DisplayPositionned.none(HorizontalAlignment.RIGHT, VerticalAlignment.TOP); private DisplayPositionned footer = DisplayPositionned.none(HorizontalAlignment.CENTER, VerticalAlignment.BOTTOM); private DisplayPositionned legend = DisplayPositionned.none(HorizontalAlignment.CENTER, VerticalAlignment.BOTTOM); private final Pragma pragma = new Pragma(); private Scale scale; private Animation animation; private final SkinParam skinParam = SkinParam.create(getUmlDiagramType()); final public void setTitle(DisplayPositionned title) { this.title = title; } final public void setCaption(DisplayPositionned caption) { this.caption = caption; } final public DisplayPositionned getCaption() { return caption; } @Override final public DisplayPositionned getTitle() { return title; } final public int getMinwidth() { return minwidth; } final public void setMinwidth(int minwidth) { this.minwidth = minwidth; } final public boolean isRotation() { return rotation; } final public void setRotation(boolean rotation) { this.rotation = rotation; } public final ISkinParam getSkinParam() { return skinParam; } public void setParam(String key, String value) { skinParam.setParam(StringUtils.goLowerCase(key), value); } public final DisplayPositionned getHeader() { return header; } public final void setHeader(DisplayPositionned header) { this.header = header; } public final DisplayPositionned getFooter() { return footer; } public final void setFooter(DisplayPositionned footer) { this.footer = footer; } public final DisplayPositionned getFooterOrHeaderTeoz(FontParam param) { if (param == FontParam.FOOTER) { return getFooter(); } if (param == FontParam.HEADER) { return getHeader(); } throw new IllegalArgumentException(); } abstract public UmlDiagramType getUmlDiagramType(); public Pragma getPragma() { return pragma; } final public void setScale(Scale scale) { this.scale = scale; } final public Scale getScale() { return scale; } final public void setAnimation(Iterable animationData) { try { final AnimationDecoder animationDecoder = new AnimationDecoder(animationData); this.animation = Animation.create(animationDecoder.decode()); } catch (ScriptException e) { e.printStackTrace(); } } final public Animation getAnimation() { return animation; } public final double getDpiFactor(FileFormatOption fileFormatOption) { if (getSkinParam().getDpi() == 96) { return 1.0; } return getSkinParam().getDpi() / 96.0; } public final int getDpi(FileFormatOption fileFormatOption) { return getSkinParam().getDpi(); } public final boolean isHideUnlinkedData() { return hideUnlinkedData; } public final void setHideUnlinkedData(boolean hideUnlinkedData) { this.hideUnlinkedData = hideUnlinkedData; } @Override final protected ImageData exportDiagramNow(OutputStream os, int index, FileFormatOption fileFormatOption, long seed) throws IOException { final HtmlColor hover = getSkinParam().getHoverPathColor(); fileFormatOption = fileFormatOption.withSvgLinkTarget(getSkinParam().getSvgLinkTarget()); if (hover != null) { fileFormatOption = fileFormatOption.withHoverColor(StringUtils.getAsHtml(getSkinParam().getColorMapper() .getMappedColor(hover))); } if (fileFormatOption.getFileFormat() == FileFormat.PDF) { return exportDiagramInternalPdf(os, index); } try { final ImageData imageData = exportDiagramInternal(os, index, fileFormatOption); this.lastInfo = new Dimension2DDouble(imageData.getWidth(), imageData.getHeight()); return imageData; } catch (UnparsableGraphvizException e) { e.printStackTrace(); exportDiagramError(os, e.getCause(), fileFormatOption, seed, e.getGraphvizVersion()); } catch (Exception e) { e.printStackTrace(); exportDiagramError(os, e, fileFormatOption, seed, null); } return new ImageDataSimple(); } private void exportDiagramError(OutputStream os, Throwable exception, FileFormatOption fileFormat, long seed, String graphvizVersion) throws IOException { exportDiagramError(os, exception, fileFormat, seed, getMetadata(), getFlashData(), getFailureText1(exception, graphvizVersion, getFlashData())); } public static void exportDiagramError(OutputStream os, Throwable exception, FileFormatOption fileFormat, long seed, String metadata, String flash, List strings) throws IOException { if (fileFormat.getFileFormat() == FileFormat.ATXT || fileFormat.getFileFormat() == FileFormat.UTXT) { exportDiagramErrorText(os, exception, strings); return; } strings.addAll(CommandExecutionResult.getStackTrace(exception)); final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, HtmlColorUtils.WHITE, metadata, null, 0, 0, null, false); final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils(); final BufferedImage im = utils.exportFlashcode(flash); if (im != null) { GraphvizCrash.addDecodeHint(strings); } final TextBlockBackcolored graphicStrings = GraphicStrings.createBlackOnWhite(strings, IconLoader.getRandom(), GraphicPosition.BACKGROUND_CORNER_TOP_RIGHT); if (im == null) { imageBuilder.setUDrawable(graphicStrings); } else { imageBuilder.setUDrawable(new UDrawable() { public void drawU(UGraphic ug) { graphicStrings.drawU(ug); final double height = graphicStrings.calculateDimension(ug.getStringBounder()).getHeight(); ug = ug.apply(new UTranslate(0, height)); ug.draw(new UImage(im)); } }); } imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os); } private static void exportDiagramErrorText(OutputStream os, Throwable exception, List strings) { final PrintWriter pw = new PrintWriter(os); exception.printStackTrace(pw); pw.println(); pw.println(); for (String s : strings) { s = s.replaceAll("\\", ""); pw.println(s); } pw.flush(); } public String getFlashData() { final UmlSource source = getSource(); if (source == null) { return ""; } return source.getPlainString(); } static private List getFailureText1(Throwable exception, String graphvizVersion, String textDiagram) { final List strings = GraphvizCrash.anErrorHasOccured(exception, textDiagram); strings.add("PlantUML (" + Version.versionString() + ") cannot parse result from dot/GraphViz."); if (exception instanceof EmptySvgException) { strings.add("Because dot/GraphViz returns an empty string."); } GraphvizCrash.checkOldVersionWarning(strings); if (graphvizVersion != null) { strings.add(" "); strings.add("GraphViz version used : " + graphvizVersion); } GraphvizCrash.pleaseGoTo(strings); GraphvizCrash.addProperties(strings); strings.add(" "); GraphvizCrash.thisMayBeCaused(strings); strings.add(" "); GraphvizCrash.youShouldSendThisDiagram(strings); strings.add(" "); return strings; } public static List getFailureText2(Throwable exception, String textDiagram) { final List strings = GraphvizCrash.anErrorHasOccured(exception, textDiagram); strings.add("PlantUML (" + Version.versionString() + ") has crashed."); GraphvizCrash.checkOldVersionWarning(strings); strings.add(" "); GraphvizCrash.youShouldSendThisDiagram(strings); strings.add(" "); return strings; } private void exportDiagramInternalMjpeg(OutputStream os) throws IOException { final File f = new File("c:/test.avi"); final int nb = 150; final double framerate = 30; final MJPEGGenerator m = new MJPEGGenerator(f, 640, 480, framerate, nb); for (int i = 0; i < nb; i++) { final AffineTransform at = new AffineTransform(); final double coef = (nb - 1 - i) * 1.0 / nb; at.setToShear(coef, coef); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); // exportDiagramTOxxBEREMOVED(baos, null, 0, new FileFormatOption(FileFormat.PNG, at)); baos.close(); final BufferedImage im = ImageIO.read(new ByteArrayInputStream(baos.toByteArray())); m.addImage(im); } m.finishAVI(); } private Dimension2D lastInfo; private ImageData exportDiagramInternalPdf(OutputStream os, int index) throws IOException { final File svg = FileUtils.createTempFile("pdf", ".svf"); final File pdfFile = FileUtils.createTempFile("pdf", ".pdf"); final OutputStream fos = new BufferedOutputStream(new FileOutputStream(svg)); final ImageData result = exportDiagram(fos, index, new FileFormatOption(FileFormat.SVG)); fos.close(); PdfConverter.convert(svg, pdfFile); FileUtils.copyToStream(pdfFile, os); return result; } protected abstract ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException; final protected void exportCmap(SuggestedFile suggestedFile, int index, final ImageData cmapdata) throws FileNotFoundException { final String name = changeName(suggestedFile.getFile(index).getAbsolutePath()); final File cmapFile = new File(name); PrintWriter pw = null; try { if (PSystemUtils.canFileBeWritten(cmapFile) == false) { return; } pw = new PrintWriter(cmapFile); pw.print(cmapdata.getCMapData(cmapFile.getName().substring(0, cmapFile.getName().length() - 6))); pw.close(); } finally { if (pw != null) { pw.close(); } } } static String changeName(String name) { return name.replaceAll("(?i)\\.\\w{3}$", ".cmapx"); } @Override public String getWarningOrError() { if (lastInfo == null) { return null; } final double actualWidth = lastInfo.getWidth(); if (actualWidth == 0) { return null; } final String value = getSkinParam().getValue("widthwarning"); if (value == null) { return null; } if (value.matches("\\d+") == false) { return null; } final int widthwarning = Integer.parseInt(value); if (actualWidth > widthwarning) { return "The image is " + ((int) actualWidth) + " pixel width. (Warning limit is " + widthwarning + ")"; } return null; } public void addSprite(String name, Sprite sprite) { skinParam.addSprite(name, sprite); } public final DisplayPositionned getLegend() { return legend; } public final void setLegend(DisplayPositionned legend) { this.legend = legend; } private boolean useJDot; public void setUseJDot(boolean useJDot) { this.useJDot = useJDot; } public boolean isUseJDot() { return useJDot; } public void setDotExecutable(String dotExecutable) { skinParam.setDotExecutable(dotExecutable); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/UmlDiagramType.java���������������������������������0000664�0000000�0000000�00000002572�13126503031�0025147�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; public enum UmlDiagramType { SEQUENCE, STATE, CLASS, OBJECT, ACTIVITY, DESCRIPTION, COMPOSITE, FLOW, TIMING, BPM } ��������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/Url.java��������������������������������������������0000664�0000000�0000000�00000006262�13126503031�0023025�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import java.util.Comparator; import net.sourceforge.plantuml.cucadiagram.dot.DotMaker2; public class Url implements EnsureVisible { private final String url; private final String tooltip; private final String label; private boolean member; public Url(String url, String tooltip) { this(url, tooltip, null); } public Url(String url, String tooltip, String label) { if (url.contains("{")) { throw new IllegalArgumentException(url); } this.url = url; if (tooltip == null) { this.tooltip = url; } else { this.tooltip = BackSlash.manageNewLine(tooltip); } if (label == null || label.length() == 0) { this.label = url; } else { this.label = label; } } public static boolean isLatex(String pendingUrl) { return pendingUrl.startsWith("latex://"); } public boolean isLatex() { return isLatex(url); } public final String getUrl() { return url; } public final String getTooltip() { return tooltip; } public String getLabel() { return label; } @Override public String toString() { return super.toString() + " " + url + " " + visible.getCoords(1.0); } public String getCoords(double scale) { if (DotMaker2.isJunit() && visible.getCoords(1.0).contains("0,0,0,0")) { throw new IllegalStateException(toString()); } return visible.getCoords(scale); } public void setMember(boolean member) { this.member = member; } public final boolean isMember() { return member; } private final BasicEnsureVisible visible = new BasicEnsureVisible(); public void ensureVisible(double x, double y) { visible.ensureVisible(x, y); } public static final Comparator SURFACE_COMPARATOR = new Comparator() { public int compare(Url url1, Url url2) { final double surface1 = url1.visible.getSurface(); final double surface2 = url2.visible.getSurface(); if (surface1 > surface2) { return 1; } else if (surface1 < surface2) { return -1; } return 0; } }; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/UrlBuilder.java�������������������������������������0000664�0000000�0000000�00000011606�13126503031�0024332�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; public class UrlBuilder { public static enum ModeUrl { STRICT, ANYWHERE } // private static String level0() { // return "(?:[^{}]|\\{[^{}]*\\})+"; // } // // private static String levelN(int n) { // if (n == 0) { // return level0(); // } // return "(?:[^{}]|\\{" + levelN(n - 1) + "\\})+"; // } // private static final String URL_PATTERN_OLD = // "\\[\\[([%g][^%g]+[%g]|[^{}%s\\]\\[]*)(?:[%s]*\\{((?:[^{}]|\\{[^{}]*\\})+)\\})?(?:[%s]*([^\\]\\[]+))?\\]\\]"; private static final String URL_PATTERN = "\\[\\[([%g][^%g]+[%g])?([\\w\\W]*?)\\]\\]"; // private static final String URL_PATTERN_BAD = "\\[\\[([%g][^%g]+[%g]|[^{}%s\\]\\[]*)(?:[%s]*\\{" + "(" + // levelN(3) // + ")" + "\\})?(?:[%s]*([^\\]\\[]+))?\\]\\]"; private final String topurl; private ModeUrl mode; public UrlBuilder(String topurl, ModeUrl mode) { this.topurl = topurl; this.mode = mode; } // private static String multilineTooltip(String label) { // final Pattern2 p = MyPattern.cmpile("(?i)^(" + URL_PATTERN + ")?(.*)$"); // final Matcher2 m = p.matcher(label); // if (m.matches() == false) { // return label; // } // String gr1 = m.group(1); // if (gr1 == null) { // return label; // } // final String gr2 = m.group(m.groupCount()); // gr1 = gr1.replaceAll("\\\\n", BackSlash.BS_N); // return gr1 + gr2; // } public Url getUrl(String s) { final Pattern2 p; if (mode == ModeUrl.STRICT) { p = MyPattern.cmpile("(?i)^" + URL_PATTERN + "$"); } else if (mode == ModeUrl.ANYWHERE) { p = MyPattern.cmpile("(?i).*" + URL_PATTERN + ".*"); } else { throw new IllegalStateException(); } final Matcher2 m = p.matcher(StringUtils.trinNoTrace(s)); if (m.matches() == false) { return null; } // String url = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(m.group(1)); // if (url.startsWith("http:") == false && url.startsWith("https:") == false) { // // final String top = getSystem().getSkinParam().getValue("topurl"); // if (topurl != null) { // url = topurl + url; // } // } final String quotedPart = m.group(1); final String full = m.group(2); final int openBracket = full.indexOf('{'); final int closeBracket = full.lastIndexOf('}'); if (quotedPart == null) { if (openBracket != -1 && closeBracket != -1) { return new Url(withTopUrl(full.substring(0, openBracket)), full.substring(openBracket + 1, closeBracket), full.substring(closeBracket + 1).trim()); } final int firstSpace = full.indexOf(' '); if (firstSpace == -1) { return new Url(full, null, null); } return new Url(withTopUrl(full.substring(0, firstSpace)), null, full.substring(firstSpace + 1).trim()); } if (openBracket != -1 && closeBracket != -1) { return new Url(withTopUrl(quotedPart), full.substring(openBracket + 1, closeBracket), full.substring( closeBracket + 1).trim()); } return new Url(withTopUrl(quotedPart), null, null); } private String withTopUrl(String url) { if (url.startsWith("http:") == false && url.startsWith("https:") == false && topurl != null) { return topurl + url; } return url; } public static String getRegexp() { return URL_PATTERN; } // private static String purgeUrl(final String label) { // final Pattern2 p = MyPattern.cmpile("[%s]*" + URL_PATTERN + "[%s]*"); // final Matcher2 m = p.matcher(label); // if (m.find() == false) { // return label; // } // final String url = m.group(0); // final int x = label.indexOf(url); // return label.substring(0, x) + label.substring(x + url.length()); // } } ��������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/acearth/��������������������������������������������0000775�0000000�0000000�00000000000�13126503031�0023021�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/acearth/PSystemXearth.java��������������������������0000664�0000000�0000000�00000011124�13126503031�0026443�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.acearth; import java.io.IOException; import java.io.OutputStream; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Collection; import java.util.Date; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.TimeZone; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.api.ImageDataSimple; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import com.ctreber.acearth.ACearth; import com.ctreber.acearth.ConfigurationACearth; import com.ctreber.acearth.plugins.markers.Marker; public class PSystemXearth extends AbstractPSystem { final private int width; final private int height; final private Map config; final private List markers; final private Collection enums = Arrays.asList("viewPositionType"); final private Collection doubles = Arrays.asList("sunPosRelLat", "sunPosRelLong", "orbitPeriod", "orbitInclination", "viewPosLat", "viewPosLong", "starFrequency", "viewMagnification"); final private Collection integers = Arrays.asList("daySideBrightness", "nightSideBrightness", "terminatorDiscontinuity", "gridDivision", "gridPixelDivision", "bigStars"); final private Collection booleans = Arrays.asList("shadeP", "gridP", "starsP"); public PSystemXearth(int width, int height, Map config, List markers) { this.width = width; this.height = height; this.config = config; this.markers = markers; } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final ACearth earth = new ACearth(markers); final ConfigurationACearth conf = earth.getConf(); conf.setInt("imageWidth", width); conf.setInt("imageHeight", height); for (Map.Entry ent : config.entrySet()) { final String key = ent.getKey(); final String value = ent.getValue(); if (key.equalsIgnoreCase("GMT")) { final Date date = extractGmt(value); conf.setInt("fixedTime", (int) (date.getTime() / 1000L)); } else if (enums.contains(key)) { conf.getMOEnum(key).set(value); } else if (doubles.contains(key)) { conf.setDouble(key, Double.parseDouble(value)); } else if (integers.contains(key)) { conf.setInt(key, Integer.parseInt(value)); } else if (booleans.contains(key)) { conf.setBoolean(key, value.equalsIgnoreCase("true")); } else { throw new UnsupportedOperationException(key); } } earth.exportPng(os); return new ImageDataSimple(width, height); } private Date extractGmt(String s) { final SimpleDateFormat timeFormat; if (s.matches("\\d{4}/\\d{2}/\\d{2} \\d{2}:\\d{2}:\\d{2}")) { timeFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.US); } else if (s.matches("\\d{4}/\\d{2}/\\d{2} \\d{2}:\\d{2}")) { timeFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm", Locale.US); } else { throw new UnsupportedOperationException(s); } timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); try { return timeFormat.parse(s); } catch (ParseException e) { throw new UnsupportedOperationException(s); } } public DiagramDescription getDescription() { return new DiagramDescription("(XEarth)"); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java�������������������0000664�0000000�0000000�00000006140�13126503031�0027775�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.acearth; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import com.ctreber.acearth.plugins.markers.Marker; public class PSystemXearthFactory extends PSystemBasicFactory { private final Map config = new LinkedHashMap(); private final List markers = new ArrayList(); private int width; private int height; public PSystemXearth init(String startLine) { this.width = 512; this.height = 512; this.config.clear(); this.markers.clear(); return null; } private void extractDimension(String startLine) { final Pattern2 p = MyPattern.cmpile("\\((\\d+),(\\d+)\\)"); final Matcher2 m = p.matcher(startLine); final boolean ok = m.find(); if (ok) { width = Integer.parseInt(m.group(1)); height = Integer.parseInt(m.group(2)); } } @Override public PSystemXearth executeLine(PSystemXearth system, String line) { if (system == null && line.startsWith("xearth")) { extractDimension(line); system = new PSystemXearth(width, height, config, markers); return system; } if (system == null) { return null; } if (line.startsWith("#") || line.startsWith("'")) { return system; } final Pattern2 p = MyPattern.cmpile("(\\w+)[%s]*=[%s]*(.*)"); final Matcher2 m = p.matcher(line); if (m.find()) { config.put(m.group(1), m.group(2)); return system; } try { final Marker marker = Marker.loadMarkerFile(line); if (marker != null) { markers.add(marker); return system; } } catch (Exception e) { e.printStackTrace(); return null; } return null; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/������������������������������������0000775�0000000�0000000�00000000000�13126503031�0024573�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java����������������0000664�0000000�0000000�00000013743�13126503031�0030527�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram; import java.util.Arrays; import java.util.List; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.utils.UniqueSequence; public class ActivityDiagram extends CucaDiagram { private IEntity lastEntityConsulted; private IEntity lastEntityBrancheConsulted; private ConditionalContext currentContext; public ILeaf getOrCreateLeaf(Code code, LeafType type, USymbol symbol) { return getOrCreateLeafDefault(code, type, symbol); } private String getAutoBranch() { return "#" + UniqueSequence.getValue(); } public IEntity getOrCreate(Code code, Display display, LeafType type) { final IEntity result; if (leafExist(code)) { result = getOrCreateLeafDefault(code, type, null); if (result.getLeafType() != type) { // throw new IllegalArgumentException("Already known: " + code + " " + result.getType() + " " + type); return null; } } else { result = createLeaf(code, display, type, null); } updateLasts(result); return result; } public void startIf(Code optionalCode) { final IEntity br = createLeaf(optionalCode == null ? Code.of(getAutoBranch()) : optionalCode, Display.create(""), LeafType.BRANCH, null); currentContext = new ConditionalContext(currentContext, br, Direction.DOWN); } public void endif() { currentContext = currentContext.getParent(); } public ILeaf getStart() { return (ILeaf) getOrCreate(Code.of("start"), Display.getWithNewlines("start"), LeafType.CIRCLE_START); } public ILeaf getEnd(String suppId) { final Code code = suppId == null ? Code.of("end") : Code.of("end$" + suppId); return (ILeaf) getOrCreate(code, Display.getWithNewlines("end"), LeafType.CIRCLE_END); } private void updateLasts(final IEntity result) { if (result.getLeafType() == LeafType.NOTE) { return; } this.lastEntityConsulted = result; if (result.getLeafType() == LeafType.BRANCH) { lastEntityBrancheConsulted = result; } } @Override public ILeaf createLeaf(Code code, Display display, LeafType type, USymbol symbol) { final ILeaf result = super.createLeaf(code, display, type, symbol); updateLasts(result); return result; } public IEntity createNote(Code code, Display display) { return super.createLeaf(code, display, LeafType.NOTE, null); } final protected List getDotStrings() { return Arrays.asList("nodesep=.20;", "ranksep=0.4;", "edge [fontsize=11,labelfontsize=11];", "node [fontsize=11];"); } public DiagramDescription getDescription() { return new DiagramDescription("(" + getLeafssize() + " activities)"); } public IEntity getLastEntityConsulted() { return lastEntityConsulted; } @Deprecated public IEntity getLastEntityBrancheConsulted() { return lastEntityBrancheConsulted; } @Override public UmlDiagramType getUmlDiagramType() { return UmlDiagramType.ACTIVITY; } public final ConditionalContext getCurrentContext() { return currentContext; } public final void setLastEntityConsulted(IEntity lastEntityConsulted) { this.lastEntityConsulted = lastEntityConsulted; } public IEntity createInnerActivity() { // Log.println("createInnerActivity A"); final Code code = Code.of("##" + UniqueSequence.getValue()); final IEntity g = getOrCreateGroup(code, Display.getWithNewlines(code), GroupType.INNER_ACTIVITY, getCurrentGroup()); // g.setRankdir(Rankdir.LEFT_TO_RIGHT); lastEntityConsulted = null; lastEntityBrancheConsulted = null; // Log.println("createInnerActivity B "+getCurrentGroup()); return g; } public void concurrentActivity(String name) { // Log.println("concurrentActivity A name=" + name+" "+getCurrentGroup()); if (getCurrentGroup().getGroupType() == GroupType.CONCURRENT_ACTIVITY) { // getCurrentGroup().setRankdir(Rankdir.LEFT_TO_RIGHT); endGroup(); // Log.println("endgroup"); } // Log.println("concurrentActivity A name=" + name+" "+getCurrentGroup()); final Code code = Code.of("##" + UniqueSequence.getValue()); if (getCurrentGroup().getGroupType() != GroupType.INNER_ACTIVITY) { throw new IllegalStateException("type=" + getCurrentGroup().getGroupType()); } getOrCreateGroup(code, Display.getWithNewlines("code"), GroupType.CONCURRENT_ACTIVITY, getCurrentGroup()); lastEntityConsulted = null; lastEntityBrancheConsulted = null; } } �����������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagramFactory.java���������0000664�0000000�0000000�00000006454�13126503031�0032060�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.activitydiagram.command.CommandElse; import net.sourceforge.plantuml.activitydiagram.command.CommandEndPartition; import net.sourceforge.plantuml.activitydiagram.command.CommandEndif; import net.sourceforge.plantuml.activitydiagram.command.CommandIf; import net.sourceforge.plantuml.activitydiagram.command.CommandLinkActivity; import net.sourceforge.plantuml.activitydiagram.command.CommandLinkLongActivity; import net.sourceforge.plantuml.activitydiagram.command.CommandPartition; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandFootboxIgnored; import net.sourceforge.plantuml.command.CommandRankDir; import net.sourceforge.plantuml.command.UmlDiagramFactory; import net.sourceforge.plantuml.command.note.FactoryNoteActivityCommand; import net.sourceforge.plantuml.command.note.FactoryNoteOnLinkCommand; public class ActivityDiagramFactory extends UmlDiagramFactory { @Override public ActivityDiagram createEmptyDiagram() { return new ActivityDiagram(); } @Override protected List createCommands() { final List cmds = new ArrayList(); cmds.add(new CommandFootboxIgnored()); addCommonCommands(cmds); cmds.add(new CommandRankDir()); cmds.add(new CommandPartition()); cmds.add(new CommandEndPartition()); cmds.add(new CommandLinkLongActivity()); final FactoryNoteActivityCommand factoryNoteActivityCommand = new FactoryNoteActivityCommand(); cmds.add(factoryNoteActivityCommand.createSingleLine()); cmds.add(factoryNoteActivityCommand.createMultiLine(false)); final FactoryNoteOnLinkCommand factoryNoteOnLinkCommand = new FactoryNoteOnLinkCommand(); cmds.add(factoryNoteOnLinkCommand.createSingleLine()); cmds.add(factoryNoteOnLinkCommand.createMultiLine(false)); cmds.add(new CommandIf()); cmds.add(new CommandElse()); cmds.add(new CommandEndif()); cmds.add(new CommandLinkActivity()); // addCommand(new CommandInnerConcurrent(system)); return cmds; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/ConditionalContext.java�������������0000664�0000000�0000000�00000004005�13126503031�0031245�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; public class ConditionalContext { private final IEntity branch; private final Direction direction; private final ConditionalContext parent; public ConditionalContext(ConditionalContext parent, IEntity branch, Direction direction) { if (branch.getLeafType() != LeafType.BRANCH) { throw new IllegalArgumentException(); } this.branch = branch; this.direction = direction; this.parent = parent; } public Direction getDirection() { return direction; } public final ConditionalContext getParent() { return parent; } public final IEntity getBranch() { return branch; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/����������������������������0000775�0000000�0000000�00000000000�13126503031�0026211�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/CommandElse.java������������0000664�0000000�0000000�00000004200�13126503031�0031237�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram.command; import java.util.List; import net.sourceforge.plantuml.activitydiagram.ActivityDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; import net.sourceforge.plantuml.cucadiagram.IEntity; public class CommandElse extends SingleLineCommand { public CommandElse() { super("(?i)^else$"); } @Override protected CommandExecutionResult executeArg(ActivityDiagram system, List arg) { if (system.getLastEntityConsulted() == null) { return CommandExecutionResult.error("No if for this else"); } if (system.getCurrentContext() == null) { return CommandExecutionResult.error("No if for this else"); } final IEntity branch = system.getCurrentContext().getBranch(); system.setLastEntityConsulted(branch); return CommandExecutionResult.ok(); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/CommandEndPartition.java����0000664�0000000�0000000�00000004013�13126503031�0032751�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram.command; import java.util.List; import net.sourceforge.plantuml.activitydiagram.ActivityDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; import net.sourceforge.plantuml.cucadiagram.IEntity; public class CommandEndPartition extends SingleLineCommand { public CommandEndPartition() { super("(?i)^(end[%s]?partition|\\})$"); } @Override protected CommandExecutionResult executeArg(ActivityDiagram diagram, List arg) { final IEntity currentPackage = diagram.getCurrentGroup(); if (currentPackage == null) { return CommandExecutionResult.error("No partition defined"); } diagram.endGroup(); return CommandExecutionResult.ok(); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/CommandEndif.java�����������0000664�0000000�0000000�00000004000�13126503031�0031372�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram.command; import java.util.List; import net.sourceforge.plantuml.activitydiagram.ActivityDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; public class CommandEndif extends SingleLineCommand { public CommandEndif() { super("(?i)^end[%s]?if$"); } @Override protected CommandExecutionResult executeArg(ActivityDiagram diagram, List arg) { if (diagram.getLastEntityConsulted() == null) { return CommandExecutionResult.error("No if for this endif"); } if (diagram.getCurrentContext() == null) { return CommandExecutionResult.error("No if for this endif"); } diagram.endif(); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/CommandIf.java��������������0000664�0000000�0000000�00000010565�13126503031�0030720�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram.command; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.activitydiagram.ActivityDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOptional; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; public class CommandIf extends SingleLineCommand2 { public CommandIf() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexOptional(// new RegexOr("FIRST", // new RegexLeaf("STAR", "(\\(\\*(top)?\\))"), // new RegexLeaf("CODE", "([\\p{L}0-9_.]+)"), // new RegexLeaf("BAR", "(?:==+)[%s]*([\\p{L}0-9_.]+)[%s]*(?:==+)"), // new RegexLeaf("QUOTED", "[%g]([^%g]+)[%g](?:[%s]+as[%s]+([\\p{L}0-9_.]+))?"))), // new RegexLeaf("[%s]*"), // new RegexLeaf("ARROW", "([=-]+(?:(left|right|up|down|le?|ri?|up?|do?)(?=[-=.]))?[=-]*\\>)?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("BRACKET", "(?:\\[([^\\]*]+[^\\]]*)\\])?"), // new RegexLeaf("[%s]*"), // new RegexOr(// new RegexLeaf("IF1", "if[%s]*[%g]([^%g]*)[%g][%s]*(?:as[%s]+([\\p{L}0-9_.]+)[%s]+)?"), // new RegexLeaf("IF2", "if[%s]+(.+?)[%s]*")), // new RegexLeaf("(?:then)?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram system, RegexResult arg) { final IEntity entity1 = CommandLinkActivity.getEntity(system, arg, true); if (entity1 == null) { return CommandExecutionResult.error("No if possible at this point"); } final String ifCode; final String ifLabel; if (arg.get("IF2", 0) == null) { ifCode = arg.get("IF1", 1); ifLabel = arg.get("IF1", 0); } else { ifCode = null; ifLabel = arg.get("IF2", 0); } system.startIf(Code.of(ifCode)); int lenght = 2; if (arg.get("ARROW", 0) != null) { final String arrow = StringUtils.manageArrowForCuca(arg.get("ARROW", 0)); lenght = arrow.length() - 1; } final IEntity branch = system.getCurrentContext().getBranch(); Link link = new Link(entity1, branch, new LinkType(LinkDecor.ARROW, LinkDecor.NONE), Display.getWithNewlines(arg.get("BRACKET", 0)), lenght, null, ifLabel, system.getLabeldistance(), system.getLabelangle()); if (arg.get("ARROW", 0) != null) { final Direction direction = StringUtils.getArrowDirection(arg.get("ARROW", 0)); if (direction == Direction.LEFT || direction == Direction.UP) { link = link.getInv(); } } system.addLink(link); return CommandExecutionResult.ok(); } } �������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/CommandInnerConcurrent.java�0000664�0000000�0000000�00000003770�13126503031�0033500�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram.command; import java.util.List; import net.sourceforge.plantuml.activitydiagram.ActivityDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; import net.sourceforge.plantuml.cucadiagram.EntityUtils; public class CommandInnerConcurrent extends SingleLineCommand { public CommandInnerConcurrent() { super("(?i)^--\\s*(.*)$"); } @Override protected CommandExecutionResult executeArg(ActivityDiagram diagram, List arg) { if (EntityUtils.groupRoot(diagram.getCurrentGroup())) { return CommandExecutionResult.error("No inner activity"); } diagram.concurrentActivity(arg.get(0)); return CommandExecutionResult.ok(); } } ��������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java����0000664�0000000�0000000�00000023547�13126503031�0033000�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram.command; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.activitydiagram.ActivityDiagram; import net.sourceforge.plantuml.classdiagram.command.CommandLinkClass; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOptional; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexPartialMatch; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; public class CommandLinkActivity extends SingleLineCommand2 { public CommandLinkActivity() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexOptional(// new RegexOr("FIRST", // new RegexLeaf("STAR", "(\\(\\*(top)?\\))"), // new RegexLeaf("CODE", "([\\p{L}0-9][\\p{L}0-9_.]*)"), // new RegexLeaf("BAR", "(?:==+)[%s]*([\\p{L}0-9_.]+)[%s]*(?:==+)"), // new RegexLeaf("QUOTED", "[%g]([^%g]+)[%g](?:[%s]+as[%s]+([\\p{L}0-9_.]+))?"))), // new RegexLeaf("[%s]*"), // new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // new RegexLeaf("[%s]*"), // ColorParser.exp2(), // new RegexLeaf("[%s]*"), // new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("ARROW_BODY1", "([-.]+)"), // new RegexLeaf("ARROW_STYLE1", "(?:\\[((?:#\\w+|dotted|dashed|plain|bold|hidden)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden)*)\\])?"), // new RegexLeaf("ARROW_DIRECTION", "(\\*|left|right|up|down|le?|ri?|up?|do?)?"), // new RegexLeaf("ARROW_STYLE2", "(?:\\[((?:#\\w+|dotted|dashed|plain|bold|hidden)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden)*)\\])?"), // new RegexLeaf("ARROW_BODY2", "([-.]*)\\>"), // new RegexLeaf("[%s]*"), // new RegexLeaf("BRACKET", "(?:\\[([^\\]*]+[^\\]]*)\\])?"), // new RegexLeaf("[%s]*"), // new RegexOr("FIRST2", // new RegexLeaf("STAR2", "(\\(\\*(top|\\d+)?\\))"), // new RegexLeaf("OPENBRACKET2", "(\\{)"), // new RegexLeaf("CODE2", "([\\p{L}0-9][\\p{L}0-9_.]*)"), // new RegexLeaf("BAR2", "(?:==+)[%s]*([\\p{L}0-9_.]+)[%s]*(?:==+)"), // new RegexLeaf("QUOTED2", "[%g]([^%g]+)[%g](?:[%s]+as[%s]+([\\p{L}0-9][\\p{L}0-9_.]*))?"), // new RegexLeaf("QUOTED_INVISIBLE2", "(\\w.*?)")), // new RegexLeaf("[%s]*"), // new RegexLeaf("STEREOTYPE2", "(\\<\\<.*\\>\\>)?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("PARTITION2", "(?:in[%s]+([%g][^%g]+[%g]|\\S+))?"), // new RegexLeaf("[%s]*"), // ColorParser.exp3(), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram diagram, RegexResult arg) { final IEntity entity1 = getEntity(diagram, arg, true); if (entity1 == null) { return CommandExecutionResult.error("No such activity"); } if (arg.get("STEREOTYPE", 0) != null) { entity1.setStereotype(new Stereotype(arg.get("STEREOTYPE", 0))); } if (arg.get("BACKCOLOR", 0) != null) { entity1.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet() .getColorIfValid(arg.get("BACKCOLOR", 0))); } final IEntity entity2 = getEntity(diagram, arg, false); if (entity2 == null) { return CommandExecutionResult.error("No such activity"); } if (arg.get("BACKCOLOR2", 0) != null) { entity2.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet() .getColorIfValid(arg.get("BACKCOLOR2", 0))); } if (arg.get("STEREOTYPE2", 0) != null) { entity2.setStereotype(new Stereotype(arg.get("STEREOTYPE2", 0))); } final Display linkLabel = Display.getWithNewlines(arg.get("BRACKET", 0)); final String arrowBody1 = CommandLinkClass.notNull(arg.get("ARROW_BODY1", 0)); final String arrowBody2 = CommandLinkClass.notNull(arg.get("ARROW_BODY2", 0)); final String arrowDirection = CommandLinkClass.notNull(arg.get("ARROW_DIRECTION", 0)); final String arrow = StringUtils.manageArrowForCuca(arrowBody1 + arrowDirection + arrowBody2 + ">"); int lenght = arrow.length() - 1; if (arrowDirection.contains("*")) { lenght = 2; } LinkType type = new LinkType(LinkDecor.ARROW, LinkDecor.NONE); if ((arrowBody1 + arrowBody2).contains(".")) { type = type.getDotted(); } Link link = new Link(entity1, entity2, type, linkLabel, lenght); if (arrowDirection.contains("*")) { link.setConstraint(false); } final Direction direction = StringUtils.getArrowDirection(arrowBody1 + arrowDirection + arrowBody2 + ">"); if (direction == Direction.LEFT || direction == Direction.UP) { link = link.getInv(); } if (arg.get("URL", 0) != null) { final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); final Url urlLink = urlBuilder.getUrl(arg.get("URL", 0)); link.setUrl(urlLink); } CommandLinkClass.applyStyle(arg.getLazzy("ARROW_STYLE", 0), link); diagram.addLink(link); return CommandExecutionResult.ok(); } static IEntity getEntity(ActivityDiagram system, RegexResult arg, final boolean start) { final String suf = start ? "" : "2"; final String openBracket2 = arg.get("OPENBRACKET" + suf, 0); if (openBracket2 != null) { return system.createInnerActivity(); } if (arg.get("STAR" + suf, 0) != null) { final String suppId = arg.get("STAR" + suf, 1); if (start) { if (suppId != null) { system.getStart().setTop(true); } return system.getStart(); } return system.getEnd(suppId); } String partition = arg.get("PARTITION" + suf, 0); if (partition != null) { partition = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(partition); } final Code code = Code.of(arg.get("CODE" + suf, 0)); if (code != null) { if (partition != null) { system.getOrCreateGroup(Code.of(partition), Display.getWithNewlines(partition), GroupType.PACKAGE, system.getRootGroup()); } final IEntity result = system.getOrCreate(code, Display.getWithNewlines(code), CommandLinkActivity.getTypeIfExisting(system, code)); if (partition != null) { system.endGroup(); } return result; } final String bar = arg.get("BAR" + suf, 0); if (bar != null) { return system.getOrCreate(Code.of(bar), Display.getWithNewlines(bar), LeafType.SYNCHRO_BAR); } final RegexPartialMatch quoted = arg.get("QUOTED" + suf); if (quoted.get(0) != null) { final Code quotedCode = Code.of(quoted.get(1) == null ? quoted.get(0) : quoted.get(1)); if (partition != null) { system.getOrCreateGroup(Code.of(partition), Display.getWithNewlines(partition), GroupType.PACKAGE, system.getRootGroup()); } final IEntity result = system.getOrCreate(quotedCode, Display.getWithNewlines(quoted.get(0)), CommandLinkActivity.getTypeIfExisting(system, quotedCode)); if (partition != null) { system.endGroup(); } return result; } final Code quotedInvisible = Code.of(arg.get("QUOTED_INVISIBLE" + suf, 0)); if (quotedInvisible != null) { if (partition != null) { system.getOrCreateGroup(Code.of(partition), Display.getWithNewlines(partition), GroupType.PACKAGE, system.getRootGroup()); } final IEntity result = system.getOrCreate(quotedInvisible, Display.getWithNewlines(quotedInvisible), LeafType.ACTIVITY); if (partition != null) { system.endGroup(); } return result; } final String first = arg.get("FIRST" + suf, 0); if (first == null) { return system.getLastEntityConsulted(); } return null; } static LeafType getTypeIfExisting(ActivityDiagram system, Code code) { if (system.leafExist(code)) { final IEntity ent = system.getLeafsget(code); if (ent.getLeafType() == LeafType.BRANCH) { return LeafType.BRANCH; } } return LeafType.ACTIVITY; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java0000664�0000000�0000000�00000021056�13126503031�0033611�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram.command; import java.util.List; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.activitydiagram.ActivityDiagram; import net.sourceforge.plantuml.classdiagram.command.CommandLinkClass; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOptional; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.color.ColorType; public class CommandLinkLongActivity extends CommandMultilines2 { public CommandLinkLongActivity() { super(getRegexConcat(), MultilinesStrategy.REMOVE_STARTING_QUOTE); } @Override public String getPatternEnd() { return "(?i)^[%s]*([^%g]*)[%g](?:[%s]+as[%s]+([\\p{L}0-9][\\p{L}0-9_.]*))?[%s]*(\\<\\<.*\\>\\>)?[%s]*(?:in[%s]+([%g][^%g]+[%g]|\\S+))?[%s]*(#\\w+)?$"; } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexOptional(// new RegexOr("FIRST", // new RegexLeaf("STAR", "(\\(\\*(top)?\\))"), // new RegexLeaf("CODE", "([\\p{L}0-9][\\p{L}0-9_.]*)"), // new RegexLeaf("BAR", "(?:==+)[%s]*([\\p{L}0-9_.]+)[%s]*(?:==+)"), // new RegexLeaf("QUOTED", "[%g]([^%g]+)[%g](?:[%s]+as[%s]+([\\p{L}0-9_.]+))?"))), // new RegexLeaf("[%s]*"), // new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("BACKCOLOR", "(#\\w+)?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("ARROW_BODY1", "([-.]+)"), // new RegexLeaf("ARROW_STYLE1", "(?:\\[((?:#\\w+|dotted|dashed|plain|bold|hidden)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden)*)\\])?"), // new RegexLeaf("ARROW_DIRECTION", "(\\*|left|right|up|down|le?|ri?|up?|do?)?"), // new RegexLeaf("ARROW_STYLE2", "(?:\\[((?:#\\w+|dotted|dashed|plain|bold|hidden)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden)*)\\])?"), // new RegexLeaf("ARROW_BODY2", "([-.]*)\\>"), // new RegexLeaf("[%s]*"), // new RegexLeaf("BRACKET", "(?:\\[([^\\]*]+[^\\]]*)\\])?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("DESC", "[%g]([^%g]*?)"), // new RegexLeaf("[%s]*"), // new RegexLeaf("$")); } public CommandExecutionResult executeNow(final ActivityDiagram diagram, BlocLines lines) { lines = lines.trim(false); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); final IEntity entity1 = CommandLinkActivity.getEntity(diagram, line0, true); if (line0.get("STEREOTYPE", 0) != null) { entity1.setStereotype(new Stereotype(line0.get("STEREOTYPE", 0))); } if (line0.get("BACKCOLOR", 0) != null) { entity1.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet() .getColorIfValid(line0.get("BACKCOLOR", 0))); } final StringBuilder sb = new StringBuilder(); final String desc0 = line0.get("DESC", 0); Url urlActivity = null; if (StringUtils.isNotEmpty(desc0)) { urlActivity = extractUrl(diagram, desc0); if (urlActivity == null) { sb.append(desc0); sb.append(BackSlash.BS_BS_N); } } int i = 0; for (CharSequence cs : lines.subExtract(1, 1)) { i++; if (i == 1 && urlActivity == null) { urlActivity = extractUrl(diagram, cs); if (urlActivity != null) { continue; } } sb.append(cs); if (i < lines.size() - 2) { sb.append(BackSlash.BS_BS_N); } } final List lineLast = StringUtils.getSplit(MyPattern.cmpile(getPatternEnd()), lines.getLast499() .toString()); if (StringUtils.isNotEmpty(lineLast.get(0))) { if (sb.length() > 0 && sb.toString().endsWith(BackSlash.BS_BS_N) == false) { sb.append(BackSlash.BS_BS_N); } sb.append(lineLast.get(0)); } final String display = sb.toString(); final Code code = Code.of(lineLast.get(1) == null ? display : lineLast.get(1)); String partition = null; if (lineLast.get(3) != null) { partition = lineLast.get(3); partition = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(partition); } if (partition != null) { diagram.getOrCreateGroup(Code.of(partition), Display.getWithNewlines(partition), GroupType.PACKAGE, null); } final IEntity entity2 = diagram.createLeaf(code, Display.getWithNewlines(display), LeafType.ACTIVITY, null); if (partition != null) { diagram.endGroup(); } if (urlActivity != null) { entity2.addUrl(urlActivity); } if (lineLast.get(2) != null) { entity2.setStereotype(new Stereotype(lineLast.get(2))); } if (lineLast.get(4) != null) { entity2.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(lineLast.get(4))); } if (entity1 == null || entity2 == null) { return CommandExecutionResult.error("No such entity"); } final String arrowBody1 = CommandLinkClass.notNull(line0.get("ARROW_BODY1", 0)); final String arrowBody2 = CommandLinkClass.notNull(line0.get("ARROW_BODY2", 0)); final String arrowDirection = CommandLinkClass.notNull(line0.get("ARROW_DIRECTION", 0)); final String arrow = StringUtils.manageArrowForCuca(arrowBody1 + arrowDirection + arrowBody2 + ">"); final int lenght = arrow.length() - 1; final Display linkLabel = Display.getWithNewlines(line0.get("BRACKET", 0)); LinkType type = new LinkType(LinkDecor.ARROW, LinkDecor.NONE); if (arrow.contains(".")) { type = type.getDotted(); } Link link = new Link(entity1, entity2, type, linkLabel, lenght); final Direction direction = StringUtils.getArrowDirection(arrowBody1 + arrowDirection + arrowBody2 + ">"); if (direction == Direction.LEFT || direction == Direction.UP) { link = link.getInv(); } if (line0.get("URL", 0) != null) { final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); final Url urlLink = urlBuilder.getUrl(line0.get("URL", 0)); link.setUrl(urlLink); } CommandLinkClass.applyStyle(line0.getLazzy("ARROW_STYLE", 0), link); diagram.addLink(link); return CommandExecutionResult.ok(); } public Url extractUrl(final ActivityDiagram diagram, CharSequence string) { final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); return urlBuilder.getUrl(string.toString()); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java�������0000664�0000000�0000000�00000007072�13126503031�0032332�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.activitydiagram.ActivityDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; public class CommandPartition extends SingleLineCommand2 { public CommandPartition() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("partition"), // new RegexLeaf("[%s]+"), // new RegexLeaf("NAME", "([%g][^%g]+[%g]|\\S+)"), // new RegexLeaf("[%s]*"), // new RegexOr(// color().getRegex(), // new RegexLeaf("LEGACYCOLORIGNORED", "(#[0-9a-fA-F]{6}|#?\\w+)?")), // new RegexLeaf("[%s]*\\{?$")); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } @Override protected CommandExecutionResult executeArg(ActivityDiagram diagram, RegexResult arg) { final Code code = Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get("NAME", 0))); final IGroup currentPackage = diagram.getCurrentGroup(); final IEntity p = diagram.getOrCreateGroup(code, Display.getWithNewlines(code), GroupType.PACKAGE, currentPackage); final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); if (colors.isEmpty() == false) { p.setColors(colors); } // final String color = arg.get("COLOR", 0); // if (color != null) { // p.setSpecificColorTOBEREMOVED(ColorType.BACK, // diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(color)); // } return CommandExecutionResult.ok(); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/�����������������������������������0000775�0000000�0000000�00000000000�13126503031�0024656�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java��������������0000664�0000000�0000000�00000037511�13126503031�0030674�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import java.awt.geom.Dimension2D; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.AnnotatedWorker; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.Scale; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlanes; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockCompressed; import net.sourceforge.plantuml.graphic.TextBlockRecentred; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class ActivityDiagram3 extends UmlDiagram { enum SwimlaneStrategy { SWIMLANE_FORBIDDEN, SWIMLANE_ALLOWED; } private SwimlaneStrategy swimlaneStrategy; private final Swimlanes swinlanes = new Swimlanes(getSkinParam(), getPragma()); private void manageSwimlaneStrategy() { if (swimlaneStrategy == null) { swimlaneStrategy = SwimlaneStrategy.SWIMLANE_FORBIDDEN; } } public CommandExecutionResult swimlane(String name, HtmlColor color, Display label) { if (swimlaneStrategy == null) { swimlaneStrategy = SwimlaneStrategy.SWIMLANE_ALLOWED; } if (swimlaneStrategy == SwimlaneStrategy.SWIMLANE_FORBIDDEN) { return CommandExecutionResult.error("This swimlane must be defined at the start of the diagram."); } swinlanes.swimlane(name, color, label); return CommandExecutionResult.ok(); } private void setCurrent(Instruction ins) { swinlanes.setCurrent(ins); } private Instruction current() { return swinlanes.getCurrent(); } private LinkRendering nextLinkRenderer() { return swinlanes.nextLinkRenderer(); } public void addActivity(Display activity, BoxStyle style, Url url, Colors colors) { manageSwimlaneStrategy(); final InstructionSimple ins = new InstructionSimple(activity, nextLinkRenderer(), swinlanes.getCurrentSwimlane(), style, url, colors); current().add(ins); setNextLinkRendererInternal(LinkRendering.none()); manageHasUrl(activity); if (url != null) { hasUrl = true; } } public CommandExecutionResult addGoto(String name) { final InstructionGoto ins = new InstructionGoto(swinlanes.getCurrentSwimlane(), name); current().add(ins); setNextLinkRendererInternal(LinkRendering.none()); return CommandExecutionResult.ok(); } public CommandExecutionResult addLabel(String name) { final InstructionLabel ins = new InstructionLabel(swinlanes.getCurrentSwimlane(), name); current().add(ins); setNextLinkRendererInternal(LinkRendering.none()); return CommandExecutionResult.ok(); } public void start() { manageSwimlaneStrategy(); current().add(new InstructionStart(swinlanes.getCurrentSwimlane())); } public void stop() { manageSwimlaneStrategy(); final InstructionStop ins = new InstructionStop(swinlanes.getCurrentSwimlane(), nextLinkRenderer()); if (manageSpecialStopEndAfterEndWhile(ins)) { return; } current().add(ins); } public void end() { manageSwimlaneStrategy(); final InstructionEnd ins = new InstructionEnd(swinlanes.getCurrentSwimlane(), nextLinkRenderer()); if (manageSpecialStopEndAfterEndWhile(ins)) { return; } current().add(ins); } private boolean manageSpecialStopEndAfterEndWhile(Instruction special) { if (current() instanceof InstructionList == false) { return false; } final InstructionList current = (InstructionList) current(); final Instruction last = current.getLast(); if (last instanceof InstructionWhile == false) { return false; } ((InstructionWhile) last).setSpecial(special); return true; } public void breakInstruction() { manageSwimlaneStrategy(); current().add(new InstructionBreak(swinlanes.getCurrentSwimlane(), nextLinkRenderer())); } public DiagramDescription getDescription() { return new DiagramDescription("activity3"); } @Override public UmlDiagramType getUmlDiagramType() { return UmlDiagramType.ACTIVITY; } @Override protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { // BUG42 // COMPRESSION // TextBlock result = swinlanes; TextBlock result = new TextBlockCompressed(swinlanes); result = new TextBlockRecentred(result); final ISkinParam skinParam = getSkinParam(); result = new AnnotatedWorker(this, skinParam).addAdd(result); final Dimension2D dim = TextBlockUtils.getMinMax(result, fileFormatOption.getDefaultStringBounder()) .getDimension(); final double margin = 10; final double dpiFactor = getDpiFactor(fileFormatOption, Dimension2DDouble.delta(dim, 2 * margin, 0)); final ImageBuilder imageBuilder = new ImageBuilder(getSkinParam(), dpiFactor, fileFormatOption.isWithMetadata() ? getMetadata() : null, getWarningOrError(), margin, margin, getAnimation()); imageBuilder.setUDrawable(result); return imageBuilder.writeImageTOBEMOVED(fileFormatOption, seed(), os); } private final double getDpiFactor(FileFormatOption fileFormatOption, final Dimension2D dim) { final double dpiFactor; final Scale scale = getScale(); if (scale == null) { dpiFactor = getDpiFactor(fileFormatOption); } else { dpiFactor = scale.getScale(dim.getWidth(), dim.getHeight()); } return dpiFactor; } public void fork() { final InstructionFork instructionFork = new InstructionFork(current(), nextLinkRenderer(), getSkinParam()); current().add(instructionFork); setNextLinkRendererInternal(LinkRendering.none()); setCurrent(instructionFork); } public CommandExecutionResult forkAgain() { if (current() instanceof InstructionFork) { final InstructionFork currentFork = (InstructionFork) current(); currentFork.manageOutRendering(nextLinkRenderer(), false); setNextLinkRendererInternal(LinkRendering.none()); currentFork.forkAgain(); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("Cannot find fork"); } public CommandExecutionResult endFork(ForkStyle forkStyle, String label) { if (current() instanceof InstructionFork) { final InstructionFork currentFork = (InstructionFork) current(); currentFork.setStyle(forkStyle, label); currentFork.manageOutRendering(nextLinkRenderer(), true); setNextLinkRendererInternal(LinkRendering.none()); setCurrent(currentFork.getParent()); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("Cannot find fork"); } public void split() { final InstructionSplit instructionSplit = new InstructionSplit(current(), nextLinkRenderer()); setNextLinkRendererInternal(LinkRendering.none()); current().add(instructionSplit); setCurrent(instructionSplit); } public CommandExecutionResult splitAgain() { if (current() instanceof InstructionSplit) { ((InstructionSplit) current()).splitAgain(nextLinkRenderer()); setNextLinkRendererInternal(LinkRendering.none()); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("Cannot find split"); } public CommandExecutionResult endSplit() { if (current() instanceof InstructionSplit) { ((InstructionSplit) current()).endSplit(nextLinkRenderer()); setNextLinkRendererInternal(LinkRendering.none()); setCurrent(((InstructionSplit) current()).getParent()); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("Cannot find split"); } public void startIf(Display test, Display whenThen, HtmlColor color) { manageSwimlaneStrategy(); final InstructionIf instructionIf = new InstructionIf(swinlanes.getCurrentSwimlane(), current(), test, whenThen, nextLinkRenderer(), color, getSkinParam()); current().add(instructionIf); setNextLinkRendererInternal(LinkRendering.none()); setCurrent(instructionIf); } public CommandExecutionResult elseIf(Display inlabel, Display test, Display whenThen, HtmlColor color) { if (current() instanceof InstructionIf) { final boolean ok = ((InstructionIf) current()).elseIf(inlabel, test, whenThen, nextLinkRenderer(), color); if (ok == false) { return CommandExecutionResult.error("You cannot put an elseIf here"); } setNextLinkRendererInternal(LinkRendering.none()); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("Cannot find if"); } public CommandExecutionResult else2(Display whenElse) { if (current() instanceof InstructionIf) { final boolean result = ((InstructionIf) current()).swithToElse2(whenElse, nextLinkRenderer()); if (result == false) { return CommandExecutionResult.error("Cannot find if"); } setNextLinkRendererInternal(LinkRendering.none()); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("Cannot find if"); } public CommandExecutionResult endif() { // System.err.println("Activity3::endif"); if (current() instanceof InstructionIf) { ((InstructionIf) current()).endif(nextLinkRenderer()); setNextLinkRendererInternal(LinkRendering.none()); setCurrent(((InstructionIf) current()).getParent()); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("Cannot find if"); } public void startRepeat(HtmlColor color, Display label) { manageSwimlaneStrategy(); final InstructionRepeat instructionRepeat = new InstructionRepeat(swinlanes.getCurrentSwimlane(), current(), nextLinkRenderer(), color, label); current().add(instructionRepeat); setCurrent(instructionRepeat); setNextLinkRendererInternal(LinkRendering.none()); } public CommandExecutionResult repeatWhile(Display label, Display yes, Display out, Display linkLabel, Rainbow linkColor) { manageSwimlaneStrategy(); if (current() instanceof InstructionRepeat) { final InstructionRepeat instructionRepeat = (InstructionRepeat) current(); final LinkRendering back = new LinkRendering(linkColor).withDisplay(linkLabel); instructionRepeat.setTest(label, yes, out, nextLinkRenderer(), back); setCurrent(instructionRepeat.getParent()); this.setNextLinkRendererInternal(LinkRendering.none()); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("Cannot find repeat"); } public CommandExecutionResult backwardWhile(Display label) { manageSwimlaneStrategy(); if (current() instanceof InstructionRepeat) { final InstructionRepeat instructionRepeat = (InstructionRepeat) current(); // final LinkRendering back = new LinkRendering(linkColor).withDisplay(linkLabel); instructionRepeat.setBackward(label); // setCurrent(instructionRepeat.getParent()); // this.setNextLinkRendererInternal(LinkRendering.none()); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("Cannot find repeat"); } public void doWhile(Display test, Display yes, HtmlColor color) { manageSwimlaneStrategy(); final InstructionWhile instructionWhile = new InstructionWhile(swinlanes.getCurrentSwimlane(), current(), test, nextLinkRenderer(), yes, color, getSkinParam()); current().add(instructionWhile); setCurrent(instructionWhile); } public CommandExecutionResult endwhile(Display out) { if (current() instanceof InstructionWhile) { ((InstructionWhile) current()).endwhile(nextLinkRenderer(), out); setNextLinkRendererInternal(LinkRendering.none()); setCurrent(((InstructionWhile) current()).getParent()); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("Cannot find while"); } final public CommandExecutionResult kill() { if (current().kill() == false) { return CommandExecutionResult.error("kill cannot be used here"); } return CommandExecutionResult.ok(); } public void startGroup(Display name, HtmlColor backColor, HtmlColor titleColor, HtmlColor borderColor) { manageSwimlaneStrategy(); final InstructionGroup instructionGroup = new InstructionGroup(current(), name, backColor, titleColor, swinlanes.getCurrentSwimlane(), borderColor, nextLinkRenderer()); current().add(instructionGroup); setCurrent(instructionGroup); } public CommandExecutionResult endGroup() { if (current() instanceof InstructionGroup) { setCurrent(((InstructionGroup) current()).getParent()); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("Cannot find group"); } private void setNextLinkRendererInternal(LinkRendering link) { if (link == null) { throw new IllegalArgumentException(); } // System.err.println("setNextLinkRendererInternal=" + link); swinlanes.setNextLinkRenderer(link); } private void setNextLink(LinkRendering linkRenderer) { if (linkRenderer == null) { throw new IllegalArgumentException(); } // System.err.println("setNextLink=" + linkRenderer); if (current() instanceof InstructionCollection) { final Instruction last = ((InstructionCollection) current()).getLast(); if (last instanceof InstructionWhile) { ((InstructionWhile) last).afterEndwhile(linkRenderer); } else if (last instanceof InstructionIf) { ((InstructionIf) last).afterEndwhile(linkRenderer); } } this.setNextLinkRendererInternal(linkRenderer); } public void setLabelNextArrow(Display label) { if (current() instanceof InstructionWhile && ((InstructionWhile) current()).getLast() == null) { ((InstructionWhile) current()).overwriteYes(label); return; } setNextLinkRendererInternal(nextLinkRenderer().withDisplay(label)); } public void setColorNextArrow(Rainbow color) { if (color == null) { return; } final LinkRendering link = new LinkRendering(color); setNextLink(link); } public CommandExecutionResult addNote(Display note, NotePosition position, NoteType type, Colors colors) { final boolean ok = current().addNote(note, position, type, colors, swinlanes.getCurrentSwimlane()); if (ok == false) { return CommandExecutionResult.error("Cannot add note here"); } manageHasUrl(note); return CommandExecutionResult.ok(); } private boolean hasUrl = false; private void manageHasUrl(Display display) { if (display.hasUrl()) { hasUrl = true; } } @Override public boolean hasUrl() { return hasUrl; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagramFactory3.java�������0000664�0000000�0000000�00000014671�13126503031�0032226�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.activitydiagram3.command.CommandActivity3; import net.sourceforge.plantuml.activitydiagram3.command.CommandActivityLegacy1; import net.sourceforge.plantuml.activitydiagram3.command.CommandActivityLong3; import net.sourceforge.plantuml.activitydiagram3.command.CommandArrow3; import net.sourceforge.plantuml.activitydiagram3.command.CommandArrowLong3; import net.sourceforge.plantuml.activitydiagram3.command.CommandBackward3; import net.sourceforge.plantuml.activitydiagram3.command.CommandBreak; import net.sourceforge.plantuml.activitydiagram3.command.CommandElse3; import net.sourceforge.plantuml.activitydiagram3.command.CommandElseIf2; import net.sourceforge.plantuml.activitydiagram3.command.CommandElseLegacy1; import net.sourceforge.plantuml.activitydiagram3.command.CommandEnd3; import net.sourceforge.plantuml.activitydiagram3.command.CommandEndPartition3; import net.sourceforge.plantuml.activitydiagram3.command.CommandEndif3; import net.sourceforge.plantuml.activitydiagram3.command.CommandFork3; import net.sourceforge.plantuml.activitydiagram3.command.CommandForkAgain3; import net.sourceforge.plantuml.activitydiagram3.command.CommandForkEnd3; import net.sourceforge.plantuml.activitydiagram3.command.CommandGoto; import net.sourceforge.plantuml.activitydiagram3.command.CommandGroup3; import net.sourceforge.plantuml.activitydiagram3.command.CommandGroupEnd3; import net.sourceforge.plantuml.activitydiagram3.command.CommandIf2; import net.sourceforge.plantuml.activitydiagram3.command.CommandIf4; import net.sourceforge.plantuml.activitydiagram3.command.CommandIfLegacy1; import net.sourceforge.plantuml.activitydiagram3.command.CommandKill3; import net.sourceforge.plantuml.activitydiagram3.command.CommandLabel; import net.sourceforge.plantuml.activitydiagram3.command.CommandLink3; import net.sourceforge.plantuml.activitydiagram3.command.CommandNote3; import net.sourceforge.plantuml.activitydiagram3.command.CommandNoteLong3; import net.sourceforge.plantuml.activitydiagram3.command.CommandPartition3; import net.sourceforge.plantuml.activitydiagram3.command.CommandRepeat3; import net.sourceforge.plantuml.activitydiagram3.command.CommandRepeatWhile3; import net.sourceforge.plantuml.activitydiagram3.command.CommandRepeatWhile3Multilines; import net.sourceforge.plantuml.activitydiagram3.command.CommandSplit3; import net.sourceforge.plantuml.activitydiagram3.command.CommandSplitAgain3; import net.sourceforge.plantuml.activitydiagram3.command.CommandSplitEnd3; import net.sourceforge.plantuml.activitydiagram3.command.CommandStart3; import net.sourceforge.plantuml.activitydiagram3.command.CommandStop3; import net.sourceforge.plantuml.activitydiagram3.command.CommandSwimlane; import net.sourceforge.plantuml.activitydiagram3.command.CommandSwimlane2; import net.sourceforge.plantuml.activitydiagram3.command.CommandWhile3; import net.sourceforge.plantuml.activitydiagram3.command.CommandWhileEnd3; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandDecoratorMultine; import net.sourceforge.plantuml.command.CommandFootboxIgnored; import net.sourceforge.plantuml.command.UmlDiagramFactory; public class ActivityDiagramFactory3 extends UmlDiagramFactory { @Override protected List createCommands() { final List cmds = new ArrayList(); cmds.add(new CommandFootboxIgnored()); addCommonCommands(cmds); cmds.add(new CommandSwimlane()); cmds.add(new CommandSwimlane2()); cmds.add(new CommandPartition3()); cmds.add(new CommandEndPartition3()); cmds.add(new CommandGroup3()); cmds.add(new CommandGroupEnd3()); cmds.add(new CommandArrow3()); cmds.add(new CommandArrowLong3()); cmds.add(new CommandActivity3()); cmds.add(new CommandIf4()); cmds.add(new CommandIf2()); cmds.add(new CommandDecoratorMultine(new CommandIf2(), 50)); cmds.add(new CommandIfLegacy1()); cmds.add(new CommandElseIf2()); cmds.add(new CommandElse3()); cmds.add(new CommandDecoratorMultine(new CommandElse3(), 50)); cmds.add(new CommandElseLegacy1()); cmds.add(new CommandEndif3()); cmds.add(new CommandRepeat3()); cmds.add(new CommandRepeatWhile3()); cmds.add(new CommandRepeatWhile3Multilines()); cmds.add(new CommandBackward3()); cmds.add(new CommandWhile3()); cmds.add(new CommandWhileEnd3()); cmds.add(new CommandFork3()); cmds.add(new CommandForkAgain3()); cmds.add(new CommandForkEnd3()); cmds.add(new CommandSplit3()); cmds.add(new CommandSplitAgain3()); cmds.add(new CommandSplitEnd3()); // cmds.add(new CommandGroup3()); // cmds.add(new CommandGroupEnd3()); cmds.add(new CommandStart3()); cmds.add(new CommandStop3()); cmds.add(new CommandBreak()); cmds.add(new CommandEnd3()); cmds.add(new CommandKill3()); cmds.add(new CommandLink3()); cmds.add(new CommandNote3()); cmds.add(new CommandNoteLong3()); cmds.add(new CommandActivityLong3()); cmds.add(new CommandActivityLegacy1()); cmds.add(new CommandLabel()); cmds.add(new CommandGoto()); cmds.add(new CommandDecoratorMultine(new CommandElseIf2(), 50)); return cmds; } @Override public ActivityDiagram3 createEmptyDiagram() { return new ActivityDiagram3(); } } �����������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/Branch.java������������������������0000664�0000000�0000000�00000010454�13126503031�0026722�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import java.util.Collection; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; public class Branch { private final InstructionList list; private final Display labelTest; private final Display labelPositive; private final Display inlabel; private final HtmlColor color; private LinkRendering inlinkRendering = LinkRendering.none(); private Ftile ftile; public Branch(Swimlane swimlane, Display labelPositive, Display labelTest, HtmlColor color, Display inlabel) { if (labelPositive == null) { throw new IllegalArgumentException(); } if (labelTest == null) { throw new IllegalArgumentException(); } if (inlabel == null) { throw new IllegalArgumentException(); } this.inlabel = inlabel; this.list = new InstructionList(swimlane); this.labelTest = labelTest; this.labelPositive = labelPositive; this.color = color; } public Collection getWeldingPoints() { return ftile.getWeldingPoints(); } public void add(Instruction ins) { list.add(ins); } public boolean kill() { return list.kill(); } public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) { return list.addNote(note, position, type, colors, swimlaneNote); } public final void setInlinkRendering(LinkRendering inlinkRendering) { if (inlinkRendering == null) { throw new IllegalArgumentException(); } this.inlinkRendering = inlinkRendering; } public void updateFtile(FtileFactory factory) { this.ftile = factory.decorateOut(list.createFtile(factory), inlinkRendering); } public Collection getSwimlanes() { return list.getSwimlanes(); } public final Display getLabelPositive() { final LinkRendering in = ftile.getInLinkRendering(); if (in != null && Display.isNull(in.getDisplay()) == false) { return in.getDisplay(); } return labelPositive; } public final Display getLabelTest() { return labelTest; } public final Rainbow getInlinkRenderingColorAndStyle() { return inlinkRendering == null ? null : inlinkRendering.getRainbow(); } public Display getInlabel() { return inlabel; } public final Ftile getFtile() { return ftile; } public ISkinParam skinParam() { return ftile.skinParam(); } public final HtmlColor getColor() { return color; } public boolean isEmpty() { return list.isEmpty(); } public Instruction getLast() { return list.getLast(); } public boolean isOnlySingleStop() { return list.isOnlySingleStop(); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ForkStyle.java���������������������0000664�0000000�0000000�00000002504�13126503031�0027444�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; public enum ForkStyle { FORK, SPLIT, MERGE } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/Instruction.java�������������������0000664�0000000�0000000�00000004104�13126503031�0030041�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimable; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; public interface Instruction extends Swimable { public Ftile createFtile(FtileFactory factory); public void add(Instruction other); public boolean kill(); public LinkRendering getInLinkRendering(); public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionBreak.java��������������0000664�0000000�0000000�00000004302�13126503031�0031006�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileBreak; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; public class InstructionBreak extends MonoSwimable implements Instruction { private final LinkRendering inlinkRendering; public InstructionBreak(Swimlane swimlane, LinkRendering inlinkRendering) { super(swimlane); this.inlinkRendering = inlinkRendering; if (inlinkRendering == null) { throw new IllegalArgumentException(); } } public Ftile createFtile(FtileFactory factory) { return new FtileBreak(factory.skinParam(), getSwimlaneIn()); } public void add(Instruction other) { throw new UnsupportedOperationException(); } final public boolean kill() { return false; } public LinkRendering getInLinkRendering() { return inlinkRendering; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionCollection.java���������0000664�0000000�0000000�00000002566�13126503031�0032067�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; public interface InstructionCollection extends Instruction { public Instruction getLast(); } ������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionEnd.java����������������0000664�0000000�0000000�00000004303�13126503031�0030471�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; public class InstructionEnd extends MonoSwimable implements Instruction { private final LinkRendering inlinkRendering; public InstructionEnd(Swimlane swimlane, LinkRendering inlinkRendering) { super(swimlane); this.inlinkRendering = inlinkRendering; if (inlinkRendering == null) { throw new IllegalArgumentException(); } } public Ftile createFtile(FtileFactory factory) { Ftile result = factory.end(getSwimlaneIn()); result = eventuallyAddNote(factory, result, result.getSwimlaneIn()); return result; } public void add(Instruction other) { throw new UnsupportedOperationException(); } final public boolean kill() { return false; } public LinkRendering getInLinkRendering() { return inlinkRendering; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionFork.java���������������0000664�0000000�0000000�00000010655�13126503031�0030673�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import java.util.ArrayList; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNoteOpale; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; public class InstructionFork extends WithNote implements Instruction { private final List forks = new ArrayList(); private final Instruction parent; private final LinkRendering inlinkRendering; private final ISkinParam skinParam; private ForkStyle style = ForkStyle.FORK; private String label; boolean finished = false; public InstructionFork(Instruction parent, LinkRendering inlinkRendering, ISkinParam skinParam) { this.parent = parent; this.inlinkRendering = inlinkRendering; this.skinParam = skinParam; this.forks.add(new InstructionList()); if (inlinkRendering == null) { throw new IllegalArgumentException(); } } private InstructionList getLastList() { return forks.get(forks.size() - 1); } public void add(Instruction ins) { getLastList().add(ins); } public Ftile createFtile(FtileFactory factory) { final List all = new ArrayList(); for (InstructionList list : forks) { all.add(list.createFtile(factory)); } Ftile result = factory.createParallel(getSwimlaneIn(), all, style, label); if (getPositionedNotes().size() > 0) { result = FtileWithNoteOpale.create(result, getPositionedNotes(), skinParam, false); } return result; } public Instruction getParent() { return parent; } public void forkAgain() { this.forks.add(new InstructionList()); } final public boolean kill() { return getLastList().kill(); } public LinkRendering getInLinkRendering() { return inlinkRendering; } @Override public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) { if (finished) { return super.addNote(note, position, type, colors, swimlaneNote); } if (getLastList().getLast() == null) { return getLastList().addNote(note, position, type, colors, swimlaneNote); } return getLastList().addNote(note, position, type, colors, swimlaneNote); } public Set getSwimlanes() { return InstructionList.getSwimlanes2(forks); } public Swimlane getSwimlaneIn() { // return parent.getSwimlaneOut(); return forks.get(0).getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return forks.get(0).getSwimlaneOut(); // return getLastList().getSwimlaneOut(); } public void manageOutRendering(LinkRendering nextLinkRenderer, boolean endFork) { if (endFork) { this.finished = true; } if (nextLinkRenderer == null) { return; } getLastList().setOutRendering(nextLinkRenderer); } public void setStyle(ForkStyle style, String label) { this.style = style; this.label = label; } } �����������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionGoto.java���������������0000664�0000000�0000000�00000004101�13126503031�0030667�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGoto; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; public class InstructionGoto extends MonoSwimable implements Instruction { private final String name; public InstructionGoto(Swimlane swimlane, String name) { super(swimlane); this.name = name; } public Ftile createFtile(FtileFactory factory) { return new FtileGoto(factory.skinParam(), getSwimlaneIn(), name); } public void add(Instruction other) { throw new UnsupportedOperationException(); } final public boolean kill() { return false; } public LinkRendering getInLinkRendering() { return LinkRendering.none(); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionGroup.java��������������0000664�0000000�0000000�00000007337�13126503031�0031071�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNotes; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; public class InstructionGroup implements Instruction, InstructionCollection { private final InstructionList list; private final Instruction parent; private final HtmlColor backColor; private final HtmlColor borderColor; private final HtmlColor titleColor; private final LinkRendering linkRendering; private final Display test; private PositionedNote note = null; public InstructionGroup(Instruction parent, Display test, HtmlColor backColor, HtmlColor titleColor, Swimlane swimlane, HtmlColor borderColor, LinkRendering linkRendering) { this.list = new InstructionList(swimlane); this.linkRendering = linkRendering; this.parent = parent; this.test = test; this.borderColor = borderColor; this.backColor = backColor; this.titleColor = titleColor; } public void add(Instruction ins) { list.add(ins); } public Ftile createFtile(FtileFactory factory) { Ftile tmp = list.createFtile(factory); if (note != null) { tmp = new FtileWithNotes(tmp, Collections.singleton(note), factory.skinParam()); } return factory.createGroup(tmp, test, backColor, titleColor, null, borderColor); } public Instruction getParent() { return parent; } final public boolean kill() { return list.kill(); } public LinkRendering getInLinkRendering() { return linkRendering; } public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) { if (list.isEmpty()) { this.note = new PositionedNote(note, position, type, colors, swimlaneNote); return true; } return list.addNote(note, position, type, colors, swimlaneNote); } public Set getSwimlanes() { return list.getSwimlanes(); } public Swimlane getSwimlaneIn() { return list.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return list.getSwimlaneOut(); } public Instruction getLast() { return list.getLast(); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java�����������������0000664�0000000�0000000�00000014522�13126503031�0030325�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileDecorateWelding; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNoteOpale; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; public class InstructionIf extends WithNote implements Instruction, InstructionCollection { private final List thens = new ArrayList(); private Branch elseBranch; private boolean endifCalled = false; private final ISkinParam skinParam; private final Instruction parent; private Branch current; private final LinkRendering topInlinkRendering; private LinkRendering afterEndwhile = LinkRendering.none(); private final Swimlane swimlane; public InstructionIf(Swimlane swimlane, Instruction parent, Display labelTest, Display whenThen, LinkRendering inlinkRendering, HtmlColor color, ISkinParam skinParam) { this.parent = parent; this.skinParam = skinParam; this.topInlinkRendering = inlinkRendering; if (inlinkRendering == null) { throw new IllegalArgumentException(); } this.swimlane = swimlane; this.thens.add(new Branch(swimlane, whenThen, labelTest, color, Display.NULL)); this.current = this.thens.get(0); } public void add(Instruction ins) { current.add(ins); } public Ftile createFtile(FtileFactory factory) { for (Branch branch : thens) { branch.updateFtile(factory); } if (elseBranch == null) { this.elseBranch = new Branch(swimlane, Display.NULL, Display.NULL, null, Display.NULL); } elseBranch.updateFtile(factory); Ftile result = factory.createIf(swimlane, thens, elseBranch, afterEndwhile, topInlinkRendering); if (getPositionedNotes().size() > 0) { result = FtileWithNoteOpale.create(result, getPositionedNotes(), skinParam, false); } final List weldingPoints = new ArrayList(); for (Branch branch : thens) { weldingPoints.addAll(branch.getWeldingPoints()); } weldingPoints.addAll(elseBranch.getWeldingPoints()); if (weldingPoints.size() > 0) { result = new FtileDecorateWelding(result, weldingPoints); } return result; } public Instruction getParent() { return parent; } public boolean swithToElse2(Display whenElse, LinkRendering nextLinkRenderer) { if (elseBranch != null) { return false; } this.current.setInlinkRendering(nextLinkRenderer); this.elseBranch = new Branch(swimlane, whenElse, Display.NULL, null, Display.NULL); this.current = elseBranch; return true; } public boolean elseIf(Display inlabel, Display test, Display whenThen, LinkRendering nextLinkRenderer, HtmlColor color) { if (elseBranch != null) { return false; } this.current.setInlinkRendering(nextLinkRenderer); this.current = new Branch(swimlane, whenThen, test, color, inlabel); this.thens.add(current); return true; } public void endif(LinkRendering nextLinkRenderer) { endifCalled = true; if (elseBranch == null) { this.elseBranch = new Branch(swimlane, Display.NULL, Display.NULL, null, Display.NULL); } this.current.setInlinkRendering(nextLinkRenderer); } final public boolean kill() { if (endifCalled) { for (Branch branch : thens) { if (branch.getLast().kill() == false) { return false; } if (elseBranch != null && elseBranch.getLast()!=null && elseBranch.getLast().kill() == false) { return false; } return true; } } return current.kill(); } public LinkRendering getInLinkRendering() { return topInlinkRendering; } @Override public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) { if (endifCalled || current.isEmpty()) { return super.addNote(note, position, type, colors, swimlaneNote); } else { return current.addNote(note, position, type, colors, swimlaneNote); } } public Set getSwimlanes() { final Set result = new HashSet(); if (swimlane != null) { result.add(swimlane); } for (Branch branch : thens) { result.addAll(branch.getSwimlanes()); } if (elseBranch != null) { result.addAll(elseBranch.getSwimlanes()); } return Collections.unmodifiableSet(result); } public Swimlane getSwimlaneIn() { return swimlane; } public Swimlane getSwimlaneOut() { return swimlane; } public Instruction getLast() { if (elseBranch == null) { return thens.get(thens.size() - 1).getLast(); } return elseBranch.getLast(); } public void afterEndwhile(LinkRendering linkRenderer) { this.afterEndwhile = linkRenderer; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionLabel.java��������������0000664�0000000�0000000�00000004105�13126503031�0031002�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileLabel; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; public class InstructionLabel extends MonoSwimable implements Instruction { private final String name; public InstructionLabel(Swimlane swimlane, String name) { super(swimlane); this.name = name; } public Ftile createFtile(FtileFactory factory) { return new FtileLabel(factory.skinParam(), getSwimlaneIn(), name); } public void add(Instruction other) { throw new UnsupportedOperationException(); } final public boolean kill() { return false; } public LinkRendering getInLinkRendering() { return LinkRendering.none(); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java���������������0000664�0000000�0000000�00000012245�13126503031�0030702�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileDecorateWelding; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileEmpty; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; public class InstructionList extends WithNote implements Instruction, InstructionCollection { private final List all = new ArrayList(); private final Swimlane defaultSwimlane; public InstructionList() { this(null); } public boolean isEmpty() { return all.isEmpty(); } public boolean isOnlySingleStop() { return all.size() == 1 && getLast() instanceof InstructionStop && ((InstructionStop) getLast()).hasNotes() == false; } public InstructionList(Swimlane defaultSwimlane) { this.defaultSwimlane = defaultSwimlane; } public void add(Instruction ins) { all.add(ins); } public Ftile createFtile(FtileFactory factory) { if (all.size() == 0) { return new FtileEmpty(factory.skinParam(), defaultSwimlane); } final List breaks = new ArrayList(); Ftile result = eventuallyAddNote(factory, null, getSwimlaneIn()); for (Instruction ins : all) { Ftile cur = ins.createFtile(factory); breaks.addAll(cur.getWeldingPoints()); if (ins.getInLinkRendering().isNone() == false) { cur = factory.decorateIn(cur, ins.getInLinkRendering()); } if (result == null) { result = cur; } else { result = factory.assembly(result, cur); } } if (outlinkRendering != null) { result = factory.decorateOut(result, outlinkRendering); } if (breaks.size() > 0) { result = new FtileDecorateWelding(result, breaks); } // if (killed) { // result = new FtileKilled(result); // } return result; } final public boolean kill() { if (all.size() == 0) { return false; } return getLast().kill(); } public LinkRendering getInLinkRendering() { return all.iterator().next().getInLinkRendering(); } public Instruction getLast() { if (all.size() == 0) { return null; } return all.get(all.size() - 1); } public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) { if (getLast() == null) { return super.addNote(note, position, type, colors, swimlaneNote); } return getLast().addNote(note, position, type, colors, swimlaneNote); } public Set getSwimlanes() { return getSwimlanes2(all); } public Swimlane getSwimlaneIn() { return defaultSwimlane; // final Set swimlanes = getSwimlanes(); // if (swimlanes.size() == 0) { // return null; // } // if (swimlanes.size() == 1) { // return swimlanes.iterator().next(); // } // System.err.println("foo1="+getClass()); // return all.get(0).getSwimlaneIn(); } public Swimlane getSwimlaneOut() { final Set swimlanes = getSwimlanes(); if (swimlanes.size() == 0) { return null; } if (swimlanes.size() == 1) { return swimlanes.iterator().next(); } return getLast().getSwimlaneOut(); } public static Set getSwimlanes2(List list) { final Set result = new HashSet(); for (Instruction ins : list) { result.addAll(ins.getSwimlanes()); } return Collections.unmodifiableSet(result); } private LinkRendering outlinkRendering; public void setOutRendering(LinkRendering outlinkRendering) { this.outlinkRendering = outlinkRendering; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionPartition.java����������0000664�0000000�0000000�00000005255�13126503031�0031743�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import java.util.Set; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; public class InstructionPartition implements Instruction { private final InstructionList list = new InstructionList(); private final Instruction parent; public InstructionPartition(Instruction parent, String partitionTitle) { this.parent = parent; } public Instruction getParent() { return parent; } public Set getSwimlanes() { return list.getSwimlanes(); } public Swimlane getSwimlaneIn() { return list.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return list.getSwimlaneOut(); } public Ftile createFtile(FtileFactory factory) { return list.createFtile(factory); } public void add(Instruction other) { list.add(other); } public boolean kill() { return list.kill(); } public LinkRendering getInLinkRendering() { return list.getInLinkRendering(); } public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) { throw new UnsupportedOperationException(); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java�������������0000664�0000000�0000000�00000011322�13126503031�0031202�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import java.util.Set; import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileKilled; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; public class InstructionRepeat implements Instruction { private final InstructionList repeatList = new InstructionList(); private final Instruction parent; private final LinkRendering nextLinkRenderer; private final Swimlane swimlane; private final HtmlColor color; private boolean killed = false; private Display backward = Display.NULL; private Display test = Display.NULL; private Display yes = Display.NULL; private Display out = Display.NULL; private final Display startLabel; private boolean testCalled = false; private LinkRendering endRepeatLinkRendering = LinkRendering.none(); private LinkRendering backRepeatLinkRendering = LinkRendering.none(); public InstructionRepeat(Swimlane swimlane, Instruction parent, LinkRendering nextLinkRenderer, HtmlColor color, Display startLabel) { this.startLabel = startLabel; this.parent = parent; this.swimlane = swimlane; this.nextLinkRenderer = nextLinkRenderer; if (nextLinkRenderer == null) { throw new IllegalArgumentException(); } this.color = color; } public void setBackward(Display label) { this.backward = label; } public void add(Instruction ins) { repeatList.add(ins); } public Ftile createFtile(FtileFactory factory) { final Ftile back = Display.isNull(backward) ? null : factory.activity(backward, swimlane, BoxStyle.PLAIN, Colors.empty()); final Ftile result = factory.repeat(swimlane, repeatList.getSwimlaneOut(), startLabel, factory.decorateOut(repeatList.createFtile(factory), endRepeatLinkRendering), test, yes, out, color, backRepeatLinkRendering, back); if (killed) { return new FtileKilled(result); } return result; } public Instruction getParent() { return parent; } public void setTest(Display test, Display yes, Display out, LinkRendering endRepeatLinkRendering, LinkRendering backRepeatLinkRendering) { this.test = test; this.yes = yes; this.out = out; if (test == null) { throw new IllegalArgumentException(); } if (yes == null) { throw new IllegalArgumentException(); } if (out == null) { throw new IllegalArgumentException(); } this.endRepeatLinkRendering = endRepeatLinkRendering; this.backRepeatLinkRendering = backRepeatLinkRendering; this.testCalled = true; } final public boolean kill() { if (testCalled) { this.killed = true; return true; } return repeatList.kill(); } public LinkRendering getInLinkRendering() { return nextLinkRenderer; } public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) { return repeatList.addNote(note, position, type, colors, swimlaneNote); } public Set getSwimlanes() { return repeatList.getSwimlanes(); } public Swimlane getSwimlaneIn() { return parent.getSwimlaneOut(); } public Swimlane getSwimlaneOut() { return parent.getSwimlaneOut(); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionSimple.java�������������0000664�0000000�0000000�00000005760�13126503031�0031224�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileKilled; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.color.Colors; public class InstructionSimple extends MonoSwimable implements Instruction { private boolean killed = false; private final Display label; private final Colors colors; private final LinkRendering inlinkRendering; private final BoxStyle style; private final Url url; public InstructionSimple(Display label, LinkRendering inlinkRendering, Swimlane swimlane, BoxStyle style, Url url, Colors colors) { super(swimlane); if (colors == null) { throw new IllegalArgumentException(); } this.url = url; this.style = style; this.label = label; this.inlinkRendering = inlinkRendering; if (inlinkRendering == null) { throw new IllegalArgumentException(); } this.colors = colors; } public Ftile createFtile(FtileFactory factory) { Ftile result = factory.activity(label, getSwimlaneIn(), style, colors); if (url != null) { result = factory.addUrl(result, url); } result = eventuallyAddNote(factory, result, result.getSwimlaneIn()); if (killed) { return new FtileKilled(result); } return result; } public void add(Instruction other) { throw new UnsupportedOperationException(); } final public boolean kill() { this.killed = true; return true; } public LinkRendering getInLinkRendering() { return inlinkRendering; } } ����������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionSplit.java��������������0000664�0000000�0000000�00000007151�13126503031�0031062�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import java.util.ArrayList; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; public class InstructionSplit implements Instruction { private final List splits = new ArrayList(); private final Instruction parent; private final LinkRendering inlinkRendering; public InstructionSplit(Instruction parent, LinkRendering inlinkRendering) { this.parent = parent; this.splits.add(new InstructionList()); this.inlinkRendering = inlinkRendering; if (inlinkRendering == null) { throw new IllegalArgumentException(); } } private InstructionList getLast() { return splits.get(splits.size() - 1); } public void add(Instruction ins) { getLast().add(ins); } public Ftile createFtile(FtileFactory factory) { final List all = new ArrayList(); for (InstructionList list : splits) { all.add(list.createFtile(factory)); } return factory.createParallel(getSwimlaneIn(), all, ForkStyle.SPLIT, null); } public Instruction getParent() { return parent; } public void splitAgain(LinkRendering inlinkRendering) { if (inlinkRendering != null) { getLast().setOutRendering(inlinkRendering); } final InstructionList list = new InstructionList(); this.splits.add(list); } public void endSplit(LinkRendering inlinkRendering) { if (inlinkRendering != null) { getLast().setOutRendering(inlinkRendering); } } final public boolean kill() { return getLast().kill(); } public LinkRendering getInLinkRendering() { return inlinkRendering; } public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) { return getLast().addNote(note, position, type, colors, swimlaneNote); } public Set getSwimlanes() { return InstructionList.getSwimlanes2(splits); } public Swimlane getSwimlaneIn() { return parent.getSwimlaneOut(); } public Swimlane getSwimlaneOut() { return getLast().getSwimlaneOut(); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionStart.java��������������0000664�0000000�0000000�00000004010�13126503031�0031053�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; public class InstructionStart extends MonoSwimable implements Instruction { public InstructionStart(Swimlane swimlane) { super(swimlane); } public Ftile createFtile(FtileFactory factory) { Ftile result = factory.start(getSwimlaneIn()); result = eventuallyAddNote(factory, result, result.getSwimlaneIn()); return result; } public void add(Instruction other) { throw new UnsupportedOperationException(); } final public boolean kill() { return false; } public LinkRendering getInLinkRendering() { return LinkRendering.none(); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionStop.java���������������0000664�0000000�0000000�00000004306�13126503031�0030713�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; public class InstructionStop extends MonoSwimable implements Instruction { private final LinkRendering inlinkRendering; public InstructionStop(Swimlane swimlane, LinkRendering inlinkRendering) { super(swimlane); this.inlinkRendering = inlinkRendering; if (inlinkRendering == null) { throw new IllegalArgumentException(); } } public Ftile createFtile(FtileFactory factory) { Ftile result = factory.stop(getSwimlaneIn()); result = eventuallyAddNote(factory, result, result.getSwimlaneIn()); return result; } public void add(Instruction other) { throw new UnsupportedOperationException(); } final public boolean kill() { return false; } public LinkRendering getInLinkRendering() { return inlinkRendering; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionWhile.java��������������0000664�0000000�0000000�00000011737�13126503031�0031044�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import java.util.Set; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileKilled; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNoteOpale; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; public class InstructionWhile extends WithNote implements Instruction, InstructionCollection { private final InstructionList repeatList = new InstructionList(); private final Instruction parent; private final LinkRendering nextLinkRenderer; private final HtmlColor color; private boolean killed = false; private final Display test; private Display yes; private Display out = Display.NULL; private boolean testCalled = false; private LinkRendering endInlinkRendering = LinkRendering.none(); private LinkRendering afterEndwhile = LinkRendering.none(); private final Swimlane swimlane; private final ISkinParam skinParam; private Instruction specialOut; public void overwriteYes(Display yes) { this.yes = yes; } public InstructionWhile(Swimlane swimlane, Instruction parent, Display test, LinkRendering nextLinkRenderer, Display yes, HtmlColor color, ISkinParam skinParam) { if (test == null) { throw new IllegalArgumentException(); } if (yes == null) { throw new IllegalArgumentException(); } this.parent = parent; this.test = test; this.nextLinkRenderer = nextLinkRenderer; if (nextLinkRenderer == null) { throw new IllegalArgumentException(); } this.yes = yes; this.swimlane = swimlane; this.color = color; this.skinParam = skinParam; } public void add(Instruction ins) { repeatList.add(ins); } public Ftile createFtile(FtileFactory factory) { Ftile tmp = factory.decorateOut(repeatList.createFtile(factory), endInlinkRendering); tmp = factory.createWhile(swimlane, tmp, test, yes, out, afterEndwhile, color, specialOut); if (getPositionedNotes().size() > 0) { tmp = FtileWithNoteOpale.create(tmp, getPositionedNotes(), skinParam, false); } if (killed || specialOut != null) { return new FtileKilled(tmp); } return tmp; } public Instruction getParent() { return parent; } final public boolean kill() { if (testCalled) { this.killed = true; return true; } return repeatList.kill(); } public LinkRendering getInLinkRendering() { return nextLinkRenderer; } public void endwhile(LinkRendering nextLinkRenderer, Display out) { this.endInlinkRendering = nextLinkRenderer; this.out = out; if (out == null) { throw new IllegalArgumentException(); } this.testCalled = true; } public void afterEndwhile(LinkRendering linkRenderer) { this.afterEndwhile = linkRenderer; } @Override public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) { if (repeatList.isEmpty()) { return super.addNote(note, position, type, colors, swimlaneNote); } else { return repeatList.addNote(note, position, type, colors, swimlaneNote); } } public Set getSwimlanes() { return repeatList.getSwimlanes(); } public Swimlane getSwimlaneIn() { return parent.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return parent.getSwimlaneOut(); } public Instruction getLast() { return repeatList.getLast(); } public void setSpecial(Instruction special) { this.specialOut = special; } } ���������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/LinkRendering.java�����������������0000664�0000000�0000000�00000004511�13126503031�0030255�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.Rainbow; public class LinkRendering { private final Rainbow rainbow; private final Display display; public LinkRendering(Rainbow rainbow) { this(rainbow, Display.NULL); } private LinkRendering(Rainbow rainbow, Display display) { if (rainbow == null) { throw new IllegalArgumentException(); } this.rainbow = rainbow; this.display = display; } public static LinkRendering none() { return new LinkRendering(Rainbow.none()); } public LinkRendering withDisplay(Display display) { return new LinkRendering(rainbow, display); } public Display getDisplay() { return display; } public Rainbow getRainbow() { return rainbow; } public Rainbow getRainbow(Rainbow defaultColor) { if (rainbow.size() == 0) { return defaultColor; } return rainbow; } public boolean isNone() { return Display.isNull(display) && rainbow.size() == 0; } @Override public String toString() { return super.toString() + " " + display + " " + rainbow; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/MonoSwimable.java������������������0000664�0000000�0000000�00000003635�13126503031�0030124�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimable; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; public class MonoSwimable extends WithNote implements Swimable { private final Swimlane swimlane; public MonoSwimable(Swimlane swimlane) { this.swimlane = swimlane; } final public Set getSwimlanes() { return swimlane == null ? Collections. emptySet() : Collections. singleton(swimlane); } final public Swimlane getSwimlaneIn() { return swimlane; } final public Swimlane getSwimlaneOut() { return swimlane; } } ���������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/PositionedNote.java����������������0000664�0000000�0000000�00000005076�13126503031�0030474�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; public class PositionedNote { private final Display display; private final NotePosition notePosition; private final NoteType type; private final Colors colors; private final Swimlane swimlaneNote; public PositionedNote(Display display, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) { this.display = display; this.notePosition = position; this.type = type; this.colors = colors; this.swimlaneNote = swimlaneNote; } @Override public String toString() { return "type=" + type + " notePosition=" + notePosition + " " + display; } public PositionedNote(Display note, NotePosition position, NoteType type, Swimlane swimlaneNote) { this(note, position, type, null, swimlaneNote); } public Display getDisplay() { return display; } public NotePosition getNotePosition() { return notePosition; } public NoteType getType() { return type; } public Colors getColors() { return colors; } public final Swimlane getSwimlaneNote() { return swimlaneNote; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/WithNote.java����������������������0000664�0000000�0000000�00000004723�13126503031�0027270�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; public class WithNote { private final Collection notes = new ArrayList(); public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) { this.notes.add(new PositionedNote(note, position, type, colors, swimlaneNote)); return true; } final protected Ftile eventuallyAddNote(FtileFactory factory, Ftile ftile, Swimlane swimlane) { if (notes.size() == 0) { return ftile; } return factory.addNote(ftile, swimlane, notes); } public Collection getPositionedNotes() { return Collections.unmodifiableCollection(notes); } public boolean hasNotes() { return notes.size() > 0; } } ���������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/���������������������������0000775�0000000�0000000�00000000000�13126503031�0026274�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivity3.java������0000664�0000000�0000000�00000006662�13126503031�0032327�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; public class CommandActivity3 extends SingleLineCommand2 { public static final String ENDING_GROUP = "(;|\\\\\\\\|(?}\\]])(?:[/<}\\]])|(?]{1,999})(?)(?:\\>)|(? { public CommandActivityLegacy1() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("-"), // new RegexLeaf("LABEL", "(.*)"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { diagram.addActivity(Display.getWithNewlines(arg.get("LABEL", 0)), BoxStyle.PLAIN, null, Colors.empty()); return CommandExecutionResult.ok(); } } �������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java��0000664�0000000�0000000�00000006370�13126503031�0033143�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; public class CommandActivityLong3 extends CommandMultilines2 { public CommandActivityLong3() { super(getRegexConcat(), MultilinesStrategy.REMOVE_STARTING_QUOTE); } @Override public String getPatternEnd() { return "^(.*)" + CommandActivity3.ENDING_GROUP + "$"; } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // color().getRegex(), // new RegexLeaf(":"), // new RegexLeaf("DATA", "(.*)"), // new RegexLeaf("$")); } public CommandExecutionResult executeNow(ActivityDiagram3 diagram, BlocLines lines) { lines = lines.removeEmptyColumns(); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); final Colors colors = color().getColor(line0, diagram.getSkinParam().getIHtmlColorSet()); // final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(line0.get("COLOR", 0)); final BoxStyle style = BoxStyle.fromChar(lines.getLastChar()); lines = lines.removeStartingAndEnding2(line0.get("DATA", 0)); diagram.addActivity(lines.toDisplay(), style, null, colors); return CommandExecutionResult.ok(); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandArrow3.java���������0000664�0000000�0000000�00000006032�13126503031�0031614�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.Rainbow; public class CommandArrow3 extends SingleLineCommand2 { public static final String STYLE_COLORS = "-\\[((?:#\\w+|dotted|dashed|plain|bold|hidden)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden)*(?:;(?:#\\w+|dotted|dashed|plain|bold|hidden)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden)*)*)\\]->"; public CommandArrow3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexOr(// new RegexLeaf("->"), // new RegexLeaf("COLOR", STYLE_COLORS)), // new RegexLeaf("[%s]*"), // new RegexOr(// new RegexLeaf("LABEL", "(.*);"), // new RegexLeaf("")), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final String colorString = arg.get("COLOR", 0); if (colorString != null) { Rainbow rainbow = Rainbow.build(diagram.getSkinParam(), colorString, diagram.getSkinParam() .colorArrowSeparationSpace()); diagram.setColorNextArrow(rainbow); } final String label = arg.get("LABEL", 0); if (label != null && label.length() > 0) { diagram.setLabelNextArrow(Display.getWithNewlines(label)); } return CommandExecutionResult.ok(); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandArrowLong3.java�����0000664�0000000�0000000�00000007215�13126503031�0032440�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import java.util.List; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.graphic.Rainbow; public class CommandArrowLong3 extends CommandMultilines2 { public CommandArrowLong3() { super(getRegexConcat(), MultilinesStrategy.REMOVE_STARTING_QUOTE); } @Override public String getPatternEnd() { return "^(.*);$"; } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexOr(// new RegexLeaf("->"), // new RegexLeaf("COLOR", CommandArrow3.STYLE_COLORS)), // new RegexLeaf("[%s]*"), // new RegexLeaf("LABEL", "(.*)"), // new RegexLeaf("$")); } public CommandExecutionResult executeNow(ActivityDiagram3 diagram, BlocLines lines) { lines = lines.removeEmptyColumns(); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); // final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(line0.get("COLOR", 0)); // diagram.setColorNextArrow(HtmlColorAndStyle.fromColor(color)); final String colorString = line0.get("COLOR", 0); if (colorString != null) { Rainbow rainbow = Rainbow.build(diagram.getSkinParam(), colorString, diagram.getSkinParam() .colorArrowSeparationSpace()); diagram.setColorNextArrow(rainbow); } lines = lines.removeStartingAndEnding2(line0.get("LABEL", 0)); diagram.setLabelNextArrow(lines.toDisplay()); return CommandExecutionResult.ok(); } private void removeStarting(List lines, String data) { if (lines.size() == 0) { return; } lines.set(0, (CS) data); } private void removeEnding(List lines) { if (lines.size() == 0) { return; } final int n = lines.size() - 1; final CharSequence s = lines.get(n); lines.set(n, (CS) s.subSequence(0, s.length() - 1)); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandBackward3.java������0000664�0000000�0000000�00000004434�13126503031�0032244�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; public class CommandBackward3 extends SingleLineCommand2 { public CommandBackward3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("backward"), // new RegexLeaf("[%s]*"), // new RegexLeaf(":"), // new RegexLeaf("LABEL", "(.*)"), // new RegexLeaf(";$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final Display label = Display.getWithNewlines(arg.get("LABEL", 0)); return diagram.backwardWhile(label); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandBreak.java����������0000664�0000000�0000000�00000004132�13126503031�0031462�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandBreak extends SingleLineCommand2 { public CommandBreak() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("break"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { diagram.breakInstruction(); return CommandExecutionResult.ok(); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandElse3.java����������0000664�0000000�0000000�00000004520�13126503031�0031412�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; public class CommandElse3 extends SingleLineCommand2 { public CommandElse3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("else"), // new RegexLeaf("WHEN", "(?:[%s]*(?:\\(([^()]*)\\))?)?"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { // if (getSystem().getLastEntityConsulted() == null) { // return CommandExecutionResult.error("No if for this endif"); // } return diagram.else2(Display.getWithNewlines(arg.get("WHEN", 0))); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandElseIf2.java��������0000664�0000000�0000000�00000005570�13126503031�0031676�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.ColorParser; public class CommandElseIf2 extends SingleLineCommand2 { public CommandElseIf2() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // ColorParser.exp4(), // new RegexLeaf("[%s]*"), // new RegexLeaf("INLABEL", "(?:\\((.+?)\\))?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("else[%s]*if"), // new RegexLeaf("[%s]*"), // new RegexLeaf("TEST", "\\((.*?)\\)"), // new RegexLeaf("[%s]*"), // new RegexLeaf("WHEN", "(?:then[%s]*(?:\\((.+?)\\))?)?"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0)); String test = arg.get("TEST", 0); if (test.length() == 0) { test = null; } final String inlabel = arg.get("INLABEL", 0); return diagram.elseIf(Display.getWithNewlines(inlabel), Display.getWithNewlines(test), Display.getWithNewlines(arg.get("WHEN", 0)), color); } } ����������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandElseLegacy1.java����0000664�0000000�0000000�00000004520�13126503031�0032535�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; public class CommandElseLegacy1 extends SingleLineCommand2 { public CommandElseLegacy1() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("else[%s]when"), // new RegexLeaf("WHEN", "[%s]+(.*)"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { // if (getSystem().getLastEntityConsulted() == null) { // return CommandExecutionResult.error("No if for this endif"); // } return diagram.else2(Display.getWithNewlines(arg.get("WHEN", 0))); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandEnd3.java�����������0000664�0000000�0000000�00000004111�13126503031�0031224�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandEnd3 extends SingleLineCommand2 { public CommandEnd3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("end"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { diagram.end(); return CommandExecutionResult.ok(); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandEndPartition3.java��0000664�0000000�0000000�00000003664�13126503031�0033132�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import java.util.List; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; public class CommandEndPartition3 extends SingleLineCommand { public CommandEndPartition3() { super("(?i)^(\\})$"); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, List arg) { // final IEntity currentPackage = diagram.getCurrentGroup(); // if (currentPackage == null) { // return CommandExecutionResult.error("No partition defined"); // } return diagram.endGroup(); } } ����������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandEndif3.java���������0000664�0000000�0000000�00000004264�13126503031�0031554�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandEndif3 extends SingleLineCommand2 { public CommandEndif3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("endif"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { // if (getSystem().getLastEntityConsulted() == null) { // return CommandExecutionResult.error("No if for this endif"); // } return diagram.endif(); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandFork3.java����������0000664�0000000�0000000�00000004116�13126503031�0031424�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandFork3 extends SingleLineCommand2 { public CommandFork3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("fork"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { diagram.fork(); return CommandExecutionResult.ok(); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandForkAgain3.java�����0000664�0000000�0000000�00000004110�13126503031�0032356�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandForkAgain3 extends SingleLineCommand2 { public CommandForkAgain3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("fork[%s]?again"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { return diagram.forkAgain(); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandForkEnd3.java�������0000664�0000000�0000000�00000004657�13126503031�0032065�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.activitydiagram3.ForkStyle; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandForkEnd3 extends SingleLineCommand2 { public CommandForkEnd3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("STYLE", "(end[%s]?fork|fork[%s]?end|end[%s]?merge)"), // new RegexLeaf("\\s*"), // new RegexLeaf("LABEL", "(\\{.+\\})?"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final String style = arg.get("STYLE", 0); final ForkStyle forkStyle = style.contains("merge") ? ForkStyle.MERGE : ForkStyle.FORK; final String label = arg.get("LABEL", 0); return diagram.endFork(forkStyle, label); } } ���������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandGoto.java�����������0000664�0000000�0000000�00000004301�13126503031�0031344�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandGoto extends SingleLineCommand2 { public CommandGoto() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("goto"), // new RegexLeaf("[%s]+"), // new RegexLeaf("NAME", "([\\p{L}0-9_.]+)"), // new RegexLeaf(";?"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final String name = arg.get("NAME", 0); return diagram.addGoto(name); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandGroup3.java���������0000664�0000000�0000000�00000004405�13126503031�0031620�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2013, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; public class CommandGroup3 extends SingleLineCommand2 { public CommandGroup3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("group"), // new RegexLeaf("\\s*"), // new RegexLeaf("NAME", "(.*)"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { diagram.startGroup(Display.getWithNewlines(arg.get("NAME", 0)), null, null, null); return CommandExecutionResult.ok(); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandGroupEnd3.java������0000664�0000000�0000000�00000004106�13126503031�0032245�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2013, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandGroupEnd3 extends SingleLineCommand2 { public CommandGroupEnd3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("(end ?group|group ?end)"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { return diagram.endGroup(); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf2.java������������0000664�0000000�0000000�00000005276�13126503031�0031070�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.ColorParser; public class CommandIf2 extends SingleLineCommand2 { public CommandIf2() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // ColorParser.exp4(), // new RegexLeaf("if"), // new RegexLeaf("[%s]*"), // new RegexLeaf("TEST", "\\((.*?)\\)"), // new RegexLeaf("[%s]*"), // new RegexLeaf("WHEN", "(?:then[%s]*(?:\\((.+?)\\))?)?"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0)); String test = arg.get("TEST", 0); if (test.length() == 0) { test = null; } diagram.startIf(Display.getWithNewlines(test), Display.getWithNewlines(arg.get("WHEN", 0)), color); return CommandExecutionResult.ok(); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIf4.java������������0000664�0000000�0000000�00000005342�13126503031�0031064�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.ColorParser; public class CommandIf4 extends SingleLineCommand2 { public CommandIf4() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // ColorParser.exp4(), // new RegexLeaf("if"), // new RegexLeaf("[%s]*"), // new RegexLeaf("TEST", "\\((.*?)\\)"), // new RegexLeaf("[%s]*(is|equals?)[%s]*"), // new RegexLeaf("WHEN", "\\((.+?)\\)"), // new RegexLeaf("[%s]*then[%s]*"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0)); String test = arg.get("TEST", 0); if (test.length() == 0) { test = null; } diagram.startIf(Display.getWithNewlines(test), Display.getWithNewlines(arg.get("WHEN", 0)), color); return CommandExecutionResult.ok(); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandIfLegacy1.java������0000664�0000000�0000000�00000004606�13126503031�0032210�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; public class CommandIfLegacy1 extends SingleLineCommand2 { public CommandIfLegacy1() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("if"), // new RegexLeaf("[%s]*"), // new RegexLeaf("TEST", "\\((.+?)\\)"), // new RegexLeaf("[%s]*"), // new RegexLeaf("WHEN", "then[%s]when[%s]+(.*)"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { diagram.startIf(Display.getWithNewlines(arg.get("TEST", 0)), Display.getWithNewlines(arg.get("WHEN", 0)), null); return CommandExecutionResult.ok(); } } ��������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandKill3.java����������0000664�0000000�0000000�00000004065�13126503031�0031421�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandKill3 extends SingleLineCommand2 { public CommandKill3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("kill|detach"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { return diagram.kill(); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandLabel.java����������0000664�0000000�0000000�00000004306�13126503031�0031460�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandLabel extends SingleLineCommand2 { public CommandLabel() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("label"), // new RegexLeaf("[%s]+"), // new RegexLeaf("NAME", "([\\p{L}0-9_.]+)"), // new RegexLeaf(";?"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final String name = arg.get("NAME", 0); return diagram.addLabel(name); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandLink3.java����������0000664�0000000�0000000�00000004662�13126503031�0031426�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; public class CommandLink3 extends SingleLineCommand2 { public CommandLink3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("link[%s]+"), // new RegexLeaf("COLOR", "(#\\w+)"), // new RegexLeaf(";?"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0)); if (color != null) { diagram.setColorNextArrow(HtmlColorAndStyle.fromColor(color)); } return CommandExecutionResult.ok(); } } ������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNolink.java���������0000664�0000000�0000000�00000004356�13126503031�0031700�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; public class CommandNolink extends SingleLineCommand2 { public CommandNolink() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("nolink"), // new RegexLeaf(";?"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { // diagram.setColorNextArrow(color); diagram.setLabelNextArrow(Display.getWithNewlines("NOLINK")); return CommandExecutionResult.ok(); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNote3.java����������0000664�0000000�0000000�00000006000�13126503031�0031422�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; public class CommandNote3 extends SingleLineCommand2 { public CommandNote3() { super(getRegexConcat()); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("TYPE", "(note|floating note)"), // new RegexLeaf("POSITION", "[%s]*(left|right)?"), // new RegexLeaf("[%s]*"), // color().getRegex(), // new RegexLeaf("[%s]*:[%s]*"), // new RegexLeaf("NOTE", "(.*)"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final Display note = Display.getWithNewlines(arg.get("NOTE", 0)); final NotePosition position = NotePosition.defaultLeft(arg.get("POSITION", 0)); final NoteType type = NoteType.defaultType(arg.get("TYPE", 0)); return diagram.addNote(note, position, type, colors); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNoteLong3.java������0000664�0000000�0000000�00000006706�13126503031�0032257�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; public class CommandNoteLong3 extends CommandMultilines2 { public CommandNoteLong3() { super(getRegexConcat(), MultilinesStrategy.REMOVE_STARTING_QUOTE); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } public String getPatternEnd() { return "(?i)^end[%s]?note$"; } public CommandExecutionResult executeNow(final ActivityDiagram3 diagram, BlocLines lines) { // final List in = StringUtils.removeEmptyColumns2(lines.subList(1, lines.size() - 1)); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); lines = lines.subExtract(1, 1); lines = lines.removeEmptyColumns(); final NotePosition position = NotePosition.defaultLeft(line0.get("POSITION", 0)); final NoteType type = NoteType.defaultType(line0.get("TYPE", 0)); final Display note = lines.toDisplay(); final Colors colors = color().getColor(line0, diagram.getSkinParam().getIHtmlColorSet()); return diagram.addNote(note, position, type, colors); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("TYPE", "(note|floating note)"), // new RegexLeaf("POSITION", "[%s]*(left|right)?"), // new RegexLeaf("[%s]*"), // color().getRegex(), // new RegexLeaf("$")); } } ����������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java�����0000664�0000000�0000000�00000007412�13126503031�0032476�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOptional; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; public class CommandPartition3 extends SingleLineCommand2 { public CommandPartition3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("partition"), // new RegexLeaf("[%s]+"), // new RegexOptional(// new RegexConcat( // color().getRegex(),// new RegexLeaf("[%s]+"))), // new RegexLeaf("TITLECOLOR", "(?:(#\\w+)[%s]+)?"), // new RegexLeaf("NAME", "([%g][^%g]+[%g]|\\S+)"), // new RegexLeaf("[%s]*\\{?$")); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final String partitionTitle = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get("NAME", 0)); final HtmlColor titleColor = diagram.getSkinParam().getIHtmlColorSet() .getColorIfValid(arg.get("TITLECOLOR", 0)); final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final HtmlColor backColorInSkinparam = diagram.getSkinParam().getHtmlColor(ColorParam.partitionBackground, null, false); final HtmlColor backColor; if (backColorInSkinparam == null) { backColor = colors.getColor(ColorType.BACK); } else { backColor = backColorInSkinparam; } HtmlColor borderColor = diagram.getSkinParam().getHtmlColor(ColorParam.partitionBorder, null, false); if (borderColor == null) { borderColor = HtmlColorUtils.BLACK; } diagram.startGroup(Display.getWithNewlines(partitionTitle), backColor, titleColor, borderColor); return CommandExecutionResult.ok(); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandRepeat3.java��������0000664�0000000�0000000�00000005034�13126503031�0031743�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.ColorParser; public class CommandRepeat3 extends SingleLineCommand2 { public CommandRepeat3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // ColorParser.exp4(), // new RegexLeaf("repeat"), // new RegexLeaf("[%s]*"), // new RegexLeaf("LABEL", "(?::(.*?))?"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0)); final Display label = Display.getWithNewlines(arg.get("LABEL", 0)); diagram.startRepeat(color, label); return CommandExecutionResult.ok(); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandRepeatWhile3.java���0000664�0000000�0000000�00000007614�13126503031�0032742�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOptional; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.Rainbow; public class CommandRepeatWhile3 extends SingleLineCommand2 { public CommandRepeatWhile3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("repeat[%s]?while"), // new RegexLeaf("[%s]*"), // new RegexOr(// new RegexConcat(new RegexLeaf("TEST3", "\\((.*?)\\)"), // new RegexLeaf("[%s]*(is|equals?)[%s]*"), // new RegexLeaf("WHEN3", "\\((.+?)\\)"), // new RegexLeaf("[%s]*(not)[%s]*"), // new RegexLeaf("OUT3", "\\((.+?)\\)")), // new RegexConcat(new RegexLeaf("TEST4", "\\((.*?)\\)"), // new RegexLeaf("[%s]*(not)[%s]*"), // new RegexLeaf("OUT4", "\\((.+?)\\)")), // new RegexConcat(new RegexLeaf("TEST2", "\\((.*?)\\)"), // new RegexLeaf("[%s]*(is|equals?)[%s]*"), // new RegexLeaf("WHEN2", "\\((.+?)\\)") // ), // new RegexLeaf("TEST1", "(?:\\((.*)\\))?") // ), // new RegexLeaf("[%s]*"), // new RegexOptional(new RegexConcat( // new RegexOr(// new RegexLeaf("->"), // new RegexLeaf("COLOR", CommandArrow3.STYLE_COLORS)), // new RegexLeaf("[%s]*"), // new RegexOr(// new RegexLeaf("LABEL", "(.*)"), // new RegexLeaf("")) // )), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final Display test = Display.getWithNewlines(arg.getLazzy("TEST", 0)); final Display yes = Display.getWithNewlines(arg.getLazzy("WHEN", 0)); final Display out = Display.getWithNewlines(arg.getLazzy("OUT", 0)); final String colorString = arg.get("COLOR", 0); final Rainbow rainbow; if (colorString == null) { rainbow = Rainbow.none(); } else { rainbow = Rainbow.build(diagram.getSkinParam(), colorString, diagram.getSkinParam() .colorArrowSeparationSpace()); } final Display linkLabel = Display.getWithNewlines(arg.get("LABEL", 0)); return diagram.repeatWhile(test, yes, out, linkLabel, rainbow); } } ��������������������������������������������������������������������������������������������������������������������CommandRepeatWhile3Multilines.java������������������������������������������������������������������0000664�0000000�0000000�00000010234�13126503031�0034721�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command�����������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import java.util.List; import java.util.regex.Pattern; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines3; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.Rainbow; public class CommandRepeatWhile3Multilines extends CommandMultilines3 { public CommandRepeatWhile3Multilines() { super(getRegexConcat(), MultilinesStrategy.REMOVE_STARTING_QUOTE); } @Override public RegexConcat getPatternEnd2() { return new RegexConcat(// new RegexLeaf("TEST1", "(.*)"), new RegexLeaf("\\)"), // new RegexLeaf(";?$")); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("repeat[%s]?while"), // new RegexLeaf("[%s]*"), // new RegexLeaf("\\("), // new RegexLeaf("TEST1", "(.*)$")); } @Override public CommandExecutionResult executeNow(ActivityDiagram3 diagram, BlocLines lines) { lines = lines.trim(false); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); final RegexResult lineLast = getPatternEnd2().matcher(lines.getLast499().toString()); // System.err.println("line0=" + line0); // System.err.println("linesLast=" + lineLast); // // final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(line0.get("COLOR", 0)); final String test = line0.get("TEST1", 0); Display testDisplay = Display.getWithNewlines(test); for (CharSequence s : lines.subExtract(1, 1)) { testDisplay = testDisplay.add(s); } final String trailTest = lineLast.get("TEST1", 0); if (StringUtils.isEmpty(trailTest) == false) { testDisplay = testDisplay.add(trailTest); } Display yes = Display.NULL;// Display.getWithNewlines("arg.getLazzy(\"WHEN\", 0)"); final Display out = Display.NULL; // Display.getWithNewlines("arg.getLazzy(\"OUT\", 0)"); final Rainbow linkColor = Rainbow.none(); // diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", // 0)); final Display linkLabel = Display.NULL; // Display.getWithNewlines("arg.get(\"LABEL\", 0)"); final List splitted = testDisplay.splitMultiline(MyPattern.cmpile("\\)[%s]*(is|equals?)[%s]*\\(", Pattern.CASE_INSENSITIVE)); if (splitted.size() == 2) { testDisplay = splitted.get(0); yes = splitted.get(1); } return diagram.repeatWhile(testDisplay, yes, out, linkLabel, linkColor); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSplit3.java���������0000664�0000000�0000000�00000004122�13126503031�0031613�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandSplit3 extends SingleLineCommand2 { public CommandSplit3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("split"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { diagram.split(); return CommandExecutionResult.ok(); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSplitAgain3.java����0000664�0000000�0000000�00000004114�13126503031�0032554�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandSplitAgain3 extends SingleLineCommand2 { public CommandSplitAgain3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("split[%s]?again"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { return diagram.splitAgain(); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSplitEnd3.java������0000664�0000000�0000000�00000004123�13126503031�0032243�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandSplitEnd3 extends SingleLineCommand2 { public CommandSplitEnd3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("(end[%s]?split|split[%s]?end)"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { return diagram.endSplit(); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandStart3.java���������0000664�0000000�0000000�00000004324�13126503031�0031621�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandStart3 extends SingleLineCommand2 { public CommandStart3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("start"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { // if (getSystem().getLastEntityConsulted() == null) { // return CommandExecutionResult.error("No if for this endif"); // } diagram.start(); return CommandExecutionResult.ok(); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandStop3.java����������0000664�0000000�0000000�00000004115�13126503031�0031447�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandStop3 extends SingleLineCommand2 { public CommandStop3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("stop"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { diagram.stop(); return CommandExecutionResult.ok(); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSwimlane.java�������0000664�0000000�0000000�00000005121�13126503031�0032214�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.ColorParser; public class CommandSwimlane extends SingleLineCommand2 { public CommandSwimlane() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("\\|"), // ColorParser.exp6(), // new RegexLeaf("SWIMLANE", "([^|]+)"), // new RegexLeaf("\\|"), // new RegexLeaf("LABEL", "([^|]+)?"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0)); final String name = arg.get("SWIMLANE", 0); final Display label = Display.getWithNewlines(arg.get("LABEL", 0)); return diagram.swimlane(name, color, label); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandSwimlane2.java������0000664�0000000�0000000�00000005157�13126503031�0032307�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.ColorParser; public class CommandSwimlane2 extends SingleLineCommand2 { public CommandSwimlane2() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("swimlane[%s]+"), // ColorParser.exp7(), // new RegexLeaf("[%s]*"), // new RegexLeaf("SWIMLANE", "([^|]+)"), // new RegexLeaf("LABEL", "(?:[%s]+as[%s]+([^|]+))?"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0)); final String name = arg.get("SWIMLANE", 0); final Display label = Display.getWithNewlines(arg.get("LABEL", 0)); return diagram.swimlane(name, color, label); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandWhile3.java���������0000664�0000000�0000000�00000005324�13126503031�0031575�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOptional; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.ColorParser; public class CommandWhile3 extends SingleLineCommand2 { public CommandWhile3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // ColorParser.exp4(), // new RegexLeaf("while"), // new RegexLeaf("TEST", "[%s]*\\((.*?)\\)"), // new RegexOptional(new RegexConcat(// new RegexLeaf("[%s]*(is|equals?)[%s]*"), // new RegexLeaf("YES", "\\((.+?)\\)"))), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0)); diagram.doWhile(Display.getWithNewlines(arg.get("TEST", 0)), Display.getWithNewlines(arg.get("YES", 0)), color); return CommandExecutionResult.ok(); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandWhileEnd3.java������0000664�0000000�0000000�00000004341�13126503031�0032222�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.command; import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; public class CommandWhileEnd3 extends SingleLineCommand2 { public CommandWhileEnd3() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("(end[%s]?while|while[%s]?end)"), // new RegexLeaf("OUT", "[%s]*(?:\\((.+?)\\))?"), // new RegexLeaf(";?$")); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { return diagram.endwhile(Display.getWithNewlines(arg.get("OUT", 0))); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/�����������������������������0000775�0000000�0000000�00000000000�13126503031�0025761�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/AbstractConnection.java������0000664�0000000�0000000�00000004006�13126503031�0032407�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.graphic.HorizontalAlignment; public abstract class AbstractConnection implements Connection { private final Ftile ftile1; private final Ftile ftile2; public AbstractConnection(Ftile ftile1, Ftile ftile2) { this.ftile1 = ftile1; this.ftile2 = ftile2; } @Override public String toString() { return "[" + ftile1 + "]->[" + ftile2 + "]"; } final public Ftile getFtile1() { return ftile1; } final public Ftile getFtile2() { return ftile2; } final public HorizontalAlignment arrowHorizontalAlignment() { if (ftile1 != null) { return ftile1.arrowHorizontalAlignment(); } if (ftile2 != null) { return ftile2.arrowHorizontalAlignment(); } return HorizontalAlignment.LEFT; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/AbstractFtile.java�����������0000664�0000000�0000000�00000006430�13126503031�0031356�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.Collection; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.AlignParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public abstract class AbstractFtile extends AbstractTextBlock implements Ftile { private final boolean shadowing; private final ISkinParam skinParam; private AbstractFtile(boolean shadowing) { this.shadowing = shadowing; this.skinParam = null; } public AbstractFtile(ISkinParam skinParam) { this.shadowing = skinParam.shadowing(); this.skinParam = skinParam; } final public ISkinParam skinParam() { if (skinParam == null) { throw new IllegalStateException(); } return skinParam; } public LinkRendering getInLinkRendering() { return LinkRendering.none(); } public LinkRendering getOutLinkRendering() { return LinkRendering.none(); } public Collection getInnerConnections() { return Collections.emptyList(); } public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) { throw new UnsupportedOperationException("" + getClass()); } public final UStroke getThickness() { UStroke thickness = skinParam.getThickness(LineParam.activityBorder, null); if (thickness == null) { thickness = new UStroke(1.5); } return thickness; } public List getWeldingPoints() { return Collections.emptyList(); } public Collection getMyChildren() { throw new UnsupportedOperationException("" + getClass()); // return Collections.emptyList(); } public HorizontalAlignment arrowHorizontalAlignment() { return skinParam.getHorizontalAlignment(AlignParam.ARROW_MESSAGE_ALIGN, null); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Arrows.java������������������0000664�0000000�0000000�00000005436�13126503031�0030111�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.ugraphic.UPolygon; public class Arrows { final static private double delta1 = 10; final static private double delta2 = 4; public static UPolygon asToUp() { final UPolygon polygon = new UPolygon("asToUp"); polygon.addPoint(-delta2, delta1); polygon.addPoint(0, 0); polygon.addPoint(delta2, delta1); polygon.addPoint(0, delta1 - 4); return polygon; } public static UPolygon asToDown() { final UPolygon polygon = new UPolygon("asToDown"); polygon.addPoint(-delta2, -delta1); polygon.addPoint(0, 0); polygon.addPoint(delta2, -delta1); polygon.addPoint(0, -delta1 + 4); return polygon; } public static UPolygon asToRight() { final UPolygon polygon = new UPolygon("asToRight"); polygon.addPoint(-delta1, -delta2); polygon.addPoint(0, 0); polygon.addPoint(-delta1, delta2); polygon.addPoint(-delta1 + 4, 0); return polygon; } public static UPolygon asToLeft() { final UPolygon polygon = new UPolygon("asToLeft"); polygon.addPoint(delta1, -delta2); polygon.addPoint(0, 0); polygon.addPoint(delta1, delta2); polygon.addPoint(delta1 - 4, 0); return polygon; } public static UPolygon asTo(Direction direction) { if (direction == Direction.UP) { return asToUp(); } if (direction == Direction.DOWN) { return asToDown(); } if (direction == Direction.LEFT) { return asToLeft(); } if (direction == Direction.RIGHT) { return asToRight(); } throw new IllegalArgumentException(); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/BoxStyle.java����������������0000664�0000000�0000000�00000012776�13126503031�0030412�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.USegmentType; import net.sourceforge.plantuml.ugraphic.UTranslate; // Created from Luc Trudeau original work public enum BoxStyle { PLAIN { @Override protected Shadowable getShape(double width, double height) { return new URectangle(width, height, CORNER, CORNER); } }, SDL_INPUT('<') { @Override protected Shadowable getShape(double width, double height) { final UPolygon result = new UPolygon(); result.addPoint(0, 0); result.addPoint(width + DELTA_INPUT_OUTPUT, 0); result.addPoint(width, height / 2); result.addPoint(width + DELTA_INPUT_OUTPUT, height); result.addPoint(0, height); return result; } }, SDL_OUTPUT('>') { @Override protected Shadowable getShape(double width, double height) { final UPolygon result = new UPolygon(); result.addPoint(0.0, 0.0); result.addPoint(width, 0.0); result.addPoint(width + DELTA_INPUT_OUTPUT, height / 2); result.addPoint(width, height); result.addPoint(0.0, height); return result; } }, SDL_PROCEDURE('|') { @Override protected void drawInternal(UGraphic ug, double width, double height, boolean shadowing) { final URectangle rect = new URectangle(width, height); if (shadowing) { rect.setDeltaShadow(3); } ug.draw(rect); final ULine vline = new ULine(0, height); ug.apply(new UTranslate(PADDING, 0)).draw(vline); ug.apply(new UTranslate(width - PADDING, 0)).draw(vline); } }, SDL_SAVE('\\') { @Override protected Shadowable getShape(double width, double height) { final UPolygon result = new UPolygon(); result.addPoint(0.0, 0.0); result.addPoint(width - DELTA_INPUT_OUTPUT, 0.0); result.addPoint(width, height); result.addPoint(DELTA_INPUT_OUTPUT, height); return result; } }, SDL_ANTISAVE('/') { @Override protected Shadowable getShape(double width, double height) { final UPolygon result = new UPolygon(); result.addPoint(DELTA_INPUT_OUTPUT, 0.0); result.addPoint(width, 0.0); result.addPoint(width - DELTA_INPUT_OUTPUT, height); result.addPoint(0, height); return result; } }, SDL_CONTINUOUS('}') { @Override protected Shadowable getShape(double width, double height) { final UPath result = new UPath(); final double c1[] = { DELTA_CONTINUOUS, 0 }; final double c2[] = { 0, height / 2 }; final double c3[] = { DELTA_CONTINUOUS, height }; result.add(c1, USegmentType.SEG_MOVETO); result.add(c2, USegmentType.SEG_LINETO); result.add(c3, USegmentType.SEG_LINETO); final double c4[] = { width - DELTA_CONTINUOUS, 0 }; final double c5[] = { width, height / 2 }; final double c6[] = { width - DELTA_CONTINUOUS, height }; result.add(c4, USegmentType.SEG_MOVETO); result.add(c5, USegmentType.SEG_LINETO); result.add(c6, USegmentType.SEG_LINETO); return result; } }, SDL_TASK(']') { @Override protected Shadowable getShape(double width, double height) { return new URectangle(width, height); } }; private static final int CORNER = 25; private final char style; private static int DELTA_INPUT_OUTPUT = 10; private static double DELTA_CONTINUOUS = 5.0; private static int PADDING = 5; private BoxStyle() { this('\0'); } private BoxStyle(char style) { this.style = style; } public static BoxStyle fromChar(char style) { for (BoxStyle bs : BoxStyle.values()) { if (bs.style == style) { return bs; } } return PLAIN; } public final UDrawable getUDrawable(final double width, final double height, final boolean shadowing) { return new UDrawable() { public void drawU(UGraphic ug) { drawInternal(ug, width, height, shadowing); } }; } protected Shadowable getShape(double width, double height) { return null; } protected void drawInternal(UGraphic ug, double width, double height, boolean shadowing) { final Shadowable s = getShape(width, height); if (shadowing) { s.setDeltaShadow(3); } ug.draw(s); } } ��plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/CollisionDetector.java�������0000664�0000000�0000000�00000014365�13126503031�0032262�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.awt.geom.Line2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UParamNull; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class CollisionDetector implements UGraphic { public UGraphic apply(UChange change) { if (change instanceof UTranslate) { return new CollisionDetector(stringBounder, translate.compose((UTranslate) change), this.context); } else if (change instanceof UStroke) { return new CollisionDetector(this); } else if (change instanceof UChangeBackColor) { return new CollisionDetector(this); } else if (change instanceof UChangeColor) { return new CollisionDetector(this); } throw new UnsupportedOperationException(); } private final StringBounder stringBounder; private final UTranslate translate; private final Context context; static class Context { private final List rectangles = new ArrayList(); private final List snakes = new ArrayList(); private boolean manageSnakes; public void drawDebug(UGraphic ug) { for (MinMax minmax : rectangles) { if (collision(minmax)) { minmax.drawGrey(ug); } } final HtmlColor color = HtmlColorUtils.BLACK; ug = ug.apply(new UChangeColor(color)).apply(new UStroke(5)); for (Snake snake : snakes) { for (Line2D line : snake.getHorizontalLines()) { if (collision(line)) { drawLine(ug, line); } } } } private void drawLine(UGraphic ug, Line2D line) { ug = ug.apply(new UTranslate(line.getX1(), line.getY1())); ug.draw(new ULine(line.getX2() - line.getX1(), line.getY2() - line.getY1())); } private boolean collision(Line2D hline) { for (MinMax r : rectangles) { if (collisionCheck(r, hline)) { return true; } } return false; } private boolean collision(MinMax r) { for (Snake snake : snakes) { for (Line2D hline : snake.getHorizontalLines()) { if (collisionCheck(r, hline)) { return true; } } } return false; } } private static boolean collisionCheck(MinMax rect, Line2D hline) { if (hline.getY1() != hline.getY2()) { throw new IllegalArgumentException(); } if (hline.getY1() < rect.getMinY()) { return false; } if (hline.getY1() > rect.getMaxY()) { return false; } final double x1 = Math.min(hline.getX1(), hline.getX2()); final double x2 = Math.max(hline.getX1(), hline.getX2()); if (x2 < rect.getMinX()) { return false; } if (x1 > rect.getMaxX()) { return false; } return true; } public CollisionDetector(StringBounder stringBounder) { this(stringBounder, new UTranslate(), new Context()); } private CollisionDetector(StringBounder stringBounder, UTranslate translate, Context context) { this.stringBounder = stringBounder; this.translate = translate; this.context = context; } private CollisionDetector(CollisionDetector other) { this(other.stringBounder, other.translate, other.context); } public StringBounder getStringBounder() { return stringBounder; } public UParam getParam() { return new UParamNull(); } public void draw(UShape shape) { if (shape instanceof UPolygon) { drawPolygone((UPolygon) shape); } else if (shape instanceof URectangle) { drawRectangle((URectangle) shape); } else if (shape instanceof Snake) { drawSnake((Snake) shape); } /* * else { System.err.println("shape=" + shape.getClass() + " " + shape); } */ } private void drawSnake(Snake shape) { if (context.manageSnakes) { context.snakes.add(shape.translate(translate)); } } private void drawRectangle(URectangle shape) { context.rectangles.add(shape.getMinMax().translate(translate)); } private void drawPolygone(UPolygon shape) { context.rectangles.add(shape.getMinMax().translate(translate)); } public ColorMapper getColorMapper() { throw new UnsupportedOperationException(); } public void startUrl(Url url) { } public void closeAction() { } public void flushUg() { } public void drawDebug(UGraphic ug) { context.drawDebug(ug); } public final void setManageSnakes(boolean manageSnakes) { this.context.manageSnakes = manageSnakes; } public boolean matchesProperty(String propertyName) { return false; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Connection.java��������������0000664�0000000�0000000�00000002767�13126503031�0030737�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UShape; public interface Connection extends UDrawable, UShape { public Ftile getFtile1(); public Ftile getFtile2(); } ���������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/ConnectionCross.java���������0000664�0000000�0000000�00000004230�13126503031�0031734�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.ugraphic.UGraphic; public class ConnectionCross extends AbstractConnection { private final Connection connection; public ConnectionCross(Connection connection) { super(connection.getFtile1(), connection.getFtile2()); this.connection = connection; } public void drawU(UGraphic ug) { if (connection instanceof ConnectionTranslatable) { final ConnectionTranslatable conn = (ConnectionTranslatable) connection; final Swimlane swimlane1 = getFtile1().getSwimlaneOut(); final Swimlane swimlane2 = getFtile2().getSwimlaneIn(); if (swimlane1 == null) { return; // throw new IllegalStateException("" + getFtile1().getClass()); } if (swimlane2 == null) { return; // throw new IllegalStateException("" + getFtile2().getClass()); } conn.drawTranslate(ug, swimlane1.getTranslate(), swimlane2.getTranslate()); } } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/ConnectionTranslatable.java��0000664�0000000�0000000�00000003036�13126503031�0033262�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public interface ConnectionTranslatable extends Connection { public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Diamond.java�����������������0000664�0000000�0000000�00000006703�13126503031�0030205�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UPolygon; public class Diamond { final static public double diamondHalfSize = 12; public static UPolygon asPolygon(boolean shadowing) { final UPolygon diams = new UPolygon(); diams.addPoint(diamondHalfSize, 0); diams.addPoint(diamondHalfSize * 2, diamondHalfSize); diams.addPoint(diamondHalfSize, diamondHalfSize * 2); diams.addPoint(0, diamondHalfSize); diams.addPoint(diamondHalfSize, 0); if (shadowing) { diams.setDeltaShadow(3); } return diams; } public static UPolygon asPolygon(boolean shadowing, double width, double height) { final UPolygon diams = new UPolygon(); diams.addPoint(diamondHalfSize, 0); diams.addPoint(width - diamondHalfSize, 0); diams.addPoint(width, height / 2); diams.addPoint(width - diamondHalfSize, height); diams.addPoint(diamondHalfSize, height); diams.addPoint(0, height / 2); diams.addPoint(diamondHalfSize, 0); if (shadowing) { diams.setDeltaShadow(3); } return diams; } public static Stencil asStencil(final TextBlock tb) { return new Stencil() { private final double getDeltaX(double height, double y) { final double p = y / height * 2; if (p <= 1) { return diamondHalfSize * p; } return diamondHalfSize * (2 - p); } public double getStartingX(StringBounder stringBounder, double y) { final Dimension2D dim = tb.calculateDimension(stringBounder); return -getDeltaX(dim.getHeight(), y); } public double getEndingX(StringBounder stringBounder, double y) { final Dimension2D dim = tb.calculateDimension(stringBounder); return dim.getWidth() + getDeltaX(dim.getHeight(), y); } }; } public static UPolygon asPolygonFoo1(boolean shadowing, double width, double height) { final UPolygon diams = new UPolygon(); diams.addPoint(width / 2, 0); diams.addPoint(width, height / 2); diams.addPoint(width / 2, height); diams.addPoint(0, height / 2); if (shadowing) { diams.setDeltaShadow(3); } return diams; } } �������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/EntityImageLegend.java�������0000664�0000000�0000000�00000005103�13126503031�0032161�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.ugraphic.UStroke; public class EntityImageLegend { public static TextBlock create(Display note, ISkinParam skinParam) { final TextBlock textBlock = note.create(new FontConfiguration(skinParam, FontParam.LEGEND, null), HorizontalAlignment.LEFT, skinParam); final Rose rose = new Rose(); final HtmlColor legendBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.legendBackground); final HtmlColor legendColor = rose.getHtmlColor(skinParam, ColorParam.legendBorder); final UStroke stroke = skinParam.getThickness(LineParam.legendBorder, null); final TextBlock result = TextBlockUtils.bordered(textBlock, stroke, legendColor, legendBackgroundColor, 10); return TextBlockUtils.withMargin(result, 8, 8); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Ftile.java�������������������0000664�0000000�0000000�00000004405�13126503031�0027672�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.Collection; import java.util.List; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public interface Ftile extends Swimable, TextBlock { public UStroke getThickness(); public ISkinParam skinParam(); public LinkRendering getInLinkRendering(); public LinkRendering getOutLinkRendering(); public FtileGeometry calculateDimension(StringBounder stringBounder); public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder); public Collection getMyChildren(); public Collection getInnerConnections(); public List getWeldingPoints(); public HorizontalAlignment arrowHorizontalAlignment(); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileAssemblySimple.java�����0000664�0000000�0000000�00000011733�13126503031�0032546�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileAssemblySimple extends AbstractTextBlock implements Ftile { private final Ftile tile1; private final Ftile tile2; @Override public String toString() { return "FtileAssemblySimple " + tile1 + " && " + tile2; } public FtileAssemblySimple(Ftile tile1, Ftile tile2) { this.tile1 = tile1; this.tile2 = tile2; } public Swimlane getSwimlaneIn() { return tile1.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return tile2.getSwimlaneOut(); } public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) { if (child == tile1) { return getTranslated1(stringBounder); } if (child == tile2) { return getTranslated2(stringBounder); } UTranslate tmp = tile1.getTranslateFor(child, stringBounder); if (tmp != null) { return tmp.compose(getTranslated1(stringBounder)); } tmp = tile2.getTranslateFor(child, stringBounder); if (tmp != null) { return tmp.compose(getTranslated2(stringBounder)); } throw new UnsupportedOperationException(); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); ug.apply(getTranslated1(stringBounder)).draw(tile1); ug.apply(getTranslated2(stringBounder)).draw(tile2); } public LinkRendering getInLinkRendering() { return tile1.getInLinkRendering(); } public LinkRendering getOutLinkRendering() { return LinkRendering.none(); } private FtileGeometry calculateDimension; public FtileGeometry calculateDimension(StringBounder stringBounder) { if (calculateDimension == null) { calculateDimension = tile1.calculateDimension(stringBounder).appendBottom( tile2.calculateDimension(stringBounder)); } return calculateDimension; } private UTranslate getTranslated1(StringBounder stringBounder) { final double left = calculateDimension(stringBounder).getLeft(); return new UTranslate(left - tile1.calculateDimension(stringBounder).getLeft(), 0); } private UTranslate getTranslated2(StringBounder stringBounder) { final Dimension2D dim1 = tile1.calculateDimension(stringBounder); final double left = calculateDimension(stringBounder).getLeft(); return new UTranslate(left - tile2.calculateDimension(stringBounder).getLeft(), dim1.getHeight()); } public Collection getInnerConnections() { return Collections.emptyList(); } public Set getSwimlanes() { final Set result = new HashSet(); result.addAll(tile1.getSwimlanes()); result.addAll(tile2.getSwimlanes()); return Collections.unmodifiableSet(result); } public ISkinParam skinParam() { return tile1.skinParam(); } public UStroke getThickness() { return tile1.getThickness(); } public List getWeldingPoints() { final List result = new ArrayList(tile1.getWeldingPoints()); result.addAll(tile2.getWeldingPoints()); return Collections.unmodifiableList(result); } public Collection getMyChildren() { return Arrays.asList(tile1, tile2); } public HorizontalAlignment arrowHorizontalAlignment() { return tile1.arrowHorizontalAlignment(); } } �������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileBreak.java��������������0000664�0000000�0000000�00000004042�13126503031�0030634�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.Collection; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.graphic.StringBounder; public class FtileBreak extends FtileEmpty implements WeldingPoint { public FtileBreak(ISkinParam skinParam, Swimlane swimlane) { super(skinParam, swimlane); } @Override public Collection getMyChildren() { return Collections.emptyList(); } @Override public String toString() { return "FtileBreak"; } public FtileGeometry calculateDimension(StringBounder stringBounder) { return super.calculateDimension(stringBounder).withoutPointOut(); } @Override public List getWeldingPoints() { return Collections.singletonList((WeldingPoint) this); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileDecorateWelding.java����0000664�0000000�0000000�00000003460�13126503031�0032653�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorate; public class FtileDecorateWelding extends FtileDecorate { private final List breaks; public FtileDecorateWelding(final Ftile ftile, final List breaks) { super(ftile); this.breaks = new ArrayList(breaks); } @Override public List getWeldingPoints() { return Collections.unmodifiableList(breaks); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileEmpty.java��������������0000664�0000000�0000000�00000005745�13126503031�0030721�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.Set; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; public class FtileEmpty extends AbstractFtile { private final double width; private final double height; private final Swimlane swimlaneIn; private final Swimlane swimlaneOut; @Override public Collection getMyChildren() { return Collections.emptyList(); } public FtileEmpty(ISkinParam skinParam, double width, double height) { this(skinParam, width, height, null, null); } public FtileEmpty(ISkinParam skinParam, double width, double height, Swimlane swimlaneIn, Swimlane swimlaneOut) { super(skinParam); this.width = width; this.height = height; this.swimlaneIn = swimlaneIn; this.swimlaneOut = swimlaneOut; } public FtileEmpty(ISkinParam skinParam) { this(skinParam, 0, 0, null, null); } public FtileEmpty(ISkinParam skinParam, Swimlane swimlane) { this(skinParam, 0, 0, swimlane, swimlane); } @Override public String toString() { return "FtileEmpty"; } public void drawU(UGraphic ug) { } public FtileGeometry calculateDimension(StringBounder stringBounder) { return new FtileGeometry(width, height, width / 2, 0, height); } public Swimlane getSwimlaneIn() { return swimlaneIn; } public Swimlane getSwimlaneOut() { return swimlaneOut; } public Set getSwimlanes() { final Set result = new HashSet(); if (swimlaneIn != null) { result.add(swimlaneIn); } if (swimlaneOut != null) { result.add(swimlaneOut); } return Collections.unmodifiableSet(result); } } ���������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java������������0000664�0000000�0000000�00000006500�13126503031�0031220�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.Collection; import java.util.List; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.activitydiagram3.Branch; import net.sourceforge.plantuml.activitydiagram3.ForkStyle; import net.sourceforge.plantuml.activitydiagram3.Instruction; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.PositionedNote; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.color.Colors; public interface FtileFactory { public StringBounder getStringBounder(); public ISkinParam skinParam(); public Ftile start(Swimlane swimlane); public Ftile stop(Swimlane swimlane); public Ftile end(Swimlane swimlane); public Ftile activity(Display label, Swimlane swimlane, BoxStyle style, Colors colors); public Ftile addNote(Ftile ftile, Swimlane swimlane, Collection notes); public Ftile addUrl(Ftile ftile, Url url); public Ftile decorateIn(Ftile ftile, LinkRendering linkRendering); public Ftile decorateOut(Ftile ftile, LinkRendering linkRendering); public Ftile assembly(Ftile tile1, Ftile tile2); public Ftile repeat(Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, Ftile repeat, Display test, Display yes, Display out, HtmlColor color, LinkRendering backRepeatLinkRendering, Ftile backward); public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out, LinkRendering afterEndwhile, HtmlColor color, Instruction specialOut); public Ftile createIf(Swimlane swimlane, List thens, Branch elseBranch, LinkRendering afterEndwhile, LinkRendering topInlinkRendering); public Ftile createParallel(Swimlane swimlane, List all, ForkStyle style, String label); public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note, HtmlColor borderColor); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java���0000664�0000000�0000000�00000014100�13126503031�0033042�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.Collection; import java.util.List; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.activitydiagram3.Branch; import net.sourceforge.plantuml.activitydiagram3.ForkStyle; import net.sourceforge.plantuml.activitydiagram3.Instruction; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.PositionedNote; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.skin.rose.Rose; public class FtileFactoryDelegator implements FtileFactory { private final FtileFactory factory; private final Rose rose = new Rose(); protected final Rainbow getInLinkRenderingColor(Ftile tile) { Rainbow color; final LinkRendering linkRendering = tile.getInLinkRendering(); if (linkRendering == null) { color = HtmlColorAndStyle.build(skinParam()); } else { color = linkRendering.getRainbow(); } if (color.size() == 0) { color = HtmlColorAndStyle.build(skinParam()); } return color; } protected final TextBlock getTextBlock(Display display) { // DUP3945 if (Display.isNull(display)) { return null; } final FontConfiguration fontConfiguration = new FontConfiguration(skinParam(), FontParam.ARROW, null); return display.create(fontConfiguration, HorizontalAlignment.LEFT, skinParam(), CreoleMode.SIMPLE_LINE); } protected Display getInLinkRenderingDisplay(Ftile tile) { final LinkRendering linkRendering = tile.getInLinkRendering(); if (linkRendering == null) { return Display.NULL; } return linkRendering.getDisplay(); } public FtileFactoryDelegator(FtileFactory factory) { this.factory = factory; } public Ftile start(Swimlane swimlane) { return factory.start(swimlane); } public Ftile end(Swimlane swimlane) { return factory.end(swimlane); } public Ftile stop(Swimlane swimlane) { return factory.stop(swimlane); } public Ftile activity(Display label, Swimlane swimlane, BoxStyle style, Colors colors) { return factory.activity(label, swimlane, style, colors); } public Ftile addNote(Ftile ftile, Swimlane swimlane, Collection notes) { return factory.addNote(ftile, swimlane, notes); } public Ftile addUrl(Ftile ftile, Url url) { return factory.addUrl(ftile, url); } public Ftile decorateIn(Ftile ftile, LinkRendering linkRendering) { if (linkRendering == null) { throw new IllegalArgumentException(); } return factory.decorateIn(ftile, linkRendering); } public Ftile decorateOut(Ftile ftile, LinkRendering linkRendering) { if (linkRendering == null) { throw new IllegalArgumentException(); } return factory.decorateOut(ftile, linkRendering); } public Ftile assembly(Ftile tile1, Ftile tile2) { return factory.assembly(tile1, tile2); } public Ftile repeat(Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, Ftile repeat, Display test, Display yes, Display out, HtmlColor color, LinkRendering backRepeatLinkRendering, Ftile backward) { return factory.repeat(swimlane, swimlaneOut, startLabel, repeat, test, yes, out, color, backRepeatLinkRendering, backward); } public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out, LinkRendering afterEndwhile, HtmlColor color, Instruction specialOut) { return factory.createWhile(swimlane, whileBlock, test, yes, out, afterEndwhile, color, specialOut); } public Ftile createIf(Swimlane swimlane, List thens, Branch elseBranch, LinkRendering afterEndwhile, LinkRendering topInlinkRendering) { return factory.createIf(swimlane, thens, elseBranch, afterEndwhile, topInlinkRendering); } public Ftile createParallel(Swimlane swimlane, List all, ForkStyle style, String label) { return factory.createParallel(swimlane, all, style, label); } public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note, HtmlColor borderColor) { return factory.createGroup(list, name, backColor, titleColor, note, borderColor); } public StringBounder getStringBounder() { return factory.getStringBounder(); } protected final Rose getRose() { return rose; } public final ISkinParam skinParam() { return factory.skinParam(); } protected FtileFactory getFactory() { return factory; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileGeometry.java�����������0000664�0000000�0000000�00000011063�13126503031�0031404�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileGeometry extends Dimension2D { private final double width; private final double height; private final double left; private final double inY; private final double outY; public FtileGeometry(Dimension2D dim, double left, double inY) { this(dim.getWidth(), dim.getHeight(), left, inY); } public FtileGeometry(double width, double height, double left, double inY) { this(width, height, left, inY, Double.MIN_NORMAL); } @Override public String toString() { return "[" + width + "x" + height + " left=" + left + "]"; } @Override public void setSize(double width, double height) { throw new UnsupportedOperationException(); } public FtileGeometry(double width, double height, double left, double inY, double outY) { this.left = left; this.inY = inY; this.outY = outY; this.width = width; this.height = height; } public FtileGeometry incHeight(double northHeight) { return new FtileGeometry(width, height + northHeight, left, inY, outY); } public FtileGeometry(Dimension2D dim, double left, double inY, double outY) { this(dim.getWidth(), dim.getHeight(), left, inY, outY); } public boolean hasPointOut() { return outY != Double.MIN_NORMAL; } public Point2D getPointIn() { return new Point2D.Double(left, inY); } public Point2D getPointOut() { if (outY == Double.MIN_NORMAL) { throw new UnsupportedOperationException(); } return new Point2D.Double(left, outY); } public FtileGeometry withoutPointOut() { return new FtileGeometry(width, height, left, inY); } public FtileGeometry translate(UTranslate translate) { final double dx = translate.getDx(); final double dy = translate.getDy(); if (this.outY == Double.MIN_NORMAL) { return new FtileGeometry(width, height, left + dx, inY + dy); } return new FtileGeometry(width, height, left + dx, inY + dy, outY + dy); } public final double getInY() { return inY; } public final double getLeft() { return left; } public double getOutY() { return outY; } public final double getWidth() { return width; } public final double getHeight() { return height; } public FtileGeometry addDim(double deltaWidth, double deltaHeight) { return new FtileGeometry(width + deltaWidth, height + deltaHeight, left, inY, outY + deltaHeight); } public FtileGeometry addMarginX(double marginx) { return new FtileGeometry(width + 2 * marginx, height, left + marginx, inY, outY); } public FtileGeometry addMarginX(double margin1, double margin2) { return new FtileGeometry(width + margin1 + margin2, height, left + margin1, inY, outY); } public FtileGeometry fixedHeight(double fixedHeight) { return new FtileGeometry(width, fixedHeight, left, inY, outY); } public FtileGeometry appendBottom(FtileGeometry other) { return new FtileGeometryMerger(this, other).getResult(); } public FtileGeometry ensureHeight(double newHeight) { if (this.height > newHeight) { return this; } return fixedHeight(newHeight); } private FtileGeometry ensureRightStrange(double newRight) { final double right = this.width - this.left; if (right > newRight) { return this; } // return addMarginX(0, newRight - right); return addMarginX(0, newRight); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileGeometryMerger.java�����0000664�0000000�0000000�00000003751�13126503031�0032553�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; public class FtileGeometryMerger { private final FtileGeometry result; public FtileGeometryMerger(FtileGeometry geo1, FtileGeometry geo2) { final double left = Math.max(geo1.getLeft(), geo2.getLeft()); final double dx1 = left - geo1.getLeft(); final double dx2 = left - geo2.getLeft(); final double width = Math.max(geo1.getWidth() + dx1, geo2.getWidth() + dx2); final double height = geo1.getHeight() + geo2.getHeight(); if (geo2.hasPointOut()) { result = new FtileGeometry(width, height, left, geo1.getInY(), geo2.getOutY() + geo1.getHeight()); } else { result = new FtileGeometry(width, height, left, geo1.getInY()); } } public final FtileGeometry getResult() { return result; } } �����������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileGoto.java���������������0000664�0000000�0000000�00000003412�13126503031�0030520�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.graphic.StringBounder; public class FtileGoto extends FtileEmpty { private final String name; public FtileGoto(ISkinParam skinParam, Swimlane swimlane, String name) { super(skinParam, swimlane); this.name = name; } public FtileGeometry calculateDimension(StringBounder stringBounder) { return super.calculateDimension(stringBounder).withoutPointOut(); } public String getName() { return name; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileHeightFixed.java��������0000664�0000000�0000000�00000005415�13126503031�0032005�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.awt.geom.Dimension2D; import java.util.Set; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileHeightFixed extends AbstractFtile { private final Ftile tile; private final double fixedHeight; public FtileHeightFixed(Ftile tile, double fixedHeight) { super(tile.skinParam()); this.tile = tile; this.fixedHeight = fixedHeight; } @Override public LinkRendering getInLinkRendering() { return tile.getInLinkRendering(); } @Override public LinkRendering getOutLinkRendering() { return tile.getOutLinkRendering(); } public Set getSwimlanes() { return tile.getSwimlanes(); } public Swimlane getSwimlaneIn() { return tile.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return tile.getSwimlaneOut(); } public FtileGeometry calculateDimension(StringBounder stringBounder) { return tile.calculateDimension(stringBounder).translate(getTranslate(stringBounder)).fixedHeight(fixedHeight); } private UTranslate getTranslate(StringBounder stringBounder) { final Dimension2D dim = tile.calculateDimension(stringBounder); if (dim.getHeight() > fixedHeight) { throw new IllegalStateException(); } return new UTranslate(0, (fixedHeight - dim.getHeight()) / 2); } public void drawU(UGraphic ug) { ug.apply(getTranslate(ug.getStringBounder())).draw(tile); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileKilled.java�������������0000664�0000000�0000000�00000004124�13126503031�0031015�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.Set; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; public class FtileKilled extends AbstractFtile { private final Ftile tile; public FtileKilled(Ftile tileToKill) { super(tileToKill.skinParam()); this.tile = tileToKill; } public Set getSwimlanes() { return tile.getSwimlanes(); } public Swimlane getSwimlaneIn() { return tile.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return tile.getSwimlaneOut(); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final FtileGeometry geo = tile.calculateDimension(stringBounder); return new FtileGeometry(tile.calculateDimension(stringBounder), geo.getLeft(), geo.getInY()); } public void drawU(UGraphic ug) { ug.draw(tile); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileLabel.java��������������0000664�0000000�0000000�00000003113�13126503031�0030625�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.ISkinParam; public class FtileLabel extends FtileEmpty { private final String name; public FtileLabel(ISkinParam skinParam, Swimlane swimlane, String name) { super(skinParam, swimlane); this.name = name; } public final String getName() { return name; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMarged.java�������������0000664�0000000�0000000�00000006143�13126503031�0031013�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.Collection; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileMarged extends AbstractFtile { private final Ftile tile; private final double margin1; private final double margin2; public FtileMarged(Ftile tile, double margin1, double margin2) { super(tile.skinParam()); this.tile = tile; this.margin1 = margin1; this.margin2 = margin2; } @Override public Collection getMyChildren() { return Collections.singleton(tile); // return tile.getMyChildren(); } @Override public LinkRendering getInLinkRendering() { return tile.getInLinkRendering(); } @Override public LinkRendering getOutLinkRendering() { return tile.getOutLinkRendering(); } public Set getSwimlanes() { return tile.getSwimlanes(); } public Swimlane getSwimlaneIn() { return tile.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return tile.getSwimlaneOut(); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final FtileGeometry orig = tile.calculateDimension(stringBounder); return new FtileGeometry(orig.getWidth() + margin1 + margin2, orig.getHeight(), orig.getLeft() + margin1, orig.getInY(), orig.getOutY()); } public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) { if (child == tile) { return getTranslate(); } UTranslate result = tile.getTranslateFor(child, stringBounder); result = result.compose(getTranslate()); return result; } private UTranslate getTranslate() { return new UTranslate(margin1, 0); } public void drawU(UGraphic ug) { ug.apply(getTranslate()).draw(tile); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMargedRight.java��������0000664�0000000�0000000�00000004730�13126503031�0032011�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.Set; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; public class FtileMargedRight extends AbstractFtile { private final Ftile tile; private final double maxX; public FtileMargedRight(Ftile tile, double maxX) { super(tile.skinParam()); this.tile = tile; this.maxX = maxX; } @Override public LinkRendering getInLinkRendering() { return tile.getInLinkRendering(); } @Override public LinkRendering getOutLinkRendering() { return tile.getOutLinkRendering(); } public Set getSwimlanes() { return tile.getSwimlanes(); } public Swimlane getSwimlaneIn() { return tile.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return tile.getSwimlaneOut(); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final FtileGeometry orig = tile.calculateDimension(stringBounder); if (orig.getWidth() > maxX) { throw new IllegalStateException(); } return new FtileGeometry(maxX, orig.getHeight(), orig.getLeft(), orig.getInY(), orig.getOutY()); } public void drawU(UGraphic ug) { ug.draw(tile); } } ����������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMargedVertically.java���0000664�0000000�0000000�00000004410�13126503031�0033045�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorate; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileMargedVertically extends FtileDecorate { private final double margin1; private final double margin2; public FtileMargedVertically(Ftile tile, double margin1, double margin2) { super(tile); this.margin1 = margin1; this.margin2 = margin2; } public void drawU(UGraphic ug) { if (margin1 > 0) { ug = ug.apply(new UTranslate(0, margin1)); } ug.draw(getFtileDelegated()); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final FtileGeometry orig = getFtileDelegated().calculateDimension(stringBounder); return new FtileGeometry(orig.getWidth(), orig.getHeight() + margin1 + margin2, orig.getLeft(), orig.getInY() + margin1, orig.hasPointOut() ? orig.getOutY() + margin1 : orig.getOutY()); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMinWidth.java�����������0000664�0000000�0000000�00000007373�13126503031�0031345�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorate; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileMinWidth extends FtileDecorate { private final double minWidth; private FtileGeometry calculateDimensionInternal; public FtileMinWidth(Ftile tile, double minWidth) { super(tile); this.minWidth = minWidth; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final UTranslate change = getUTranslateInternal(stringBounder); super.drawU(ug.apply(change)); } @Override public FtileGeometry calculateDimension(StringBounder stringBounder) { if (calculateDimensionInternal == null) { calculateDimensionInternal = calculateDimensionSlow(stringBounder); } return calculateDimensionInternal; } private FtileGeometry calculateDimensionSlow(StringBounder stringBounder) { final FtileGeometry geo = super.calculateDimension(stringBounder); final double left = getPoint2(geo.getLeft(), stringBounder); if (geo.hasPointOut() == false) { return new FtileGeometry(getDimensionInternal(stringBounder), left, geo.getInY()); } return new FtileGeometry(getDimensionInternal(stringBounder), left, geo.getInY(), geo.getOutY()); } private Dimension2D getDimensionInternal(StringBounder stringBounder) { final Dimension2D dim = getFtileDelegated().calculateDimension(stringBounder); if (dim.getWidth() < minWidth) { return new Dimension2DDouble(minWidth, dim.getHeight()); } return dim; } private UTranslate getUTranslateInternal(final StringBounder stringBounder) { final Dimension2D dimTile = getFtileDelegated().calculateDimension(stringBounder); final Dimension2D dimTotal = getDimensionInternal(stringBounder); final UTranslate change = new UTranslate((dimTotal.getWidth() - dimTile.getWidth()) / 2, 0); return change; } public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) { if (child == getFtileDelegated()) { return getUTranslateInternal(stringBounder); } return null; } private double getPoint2(double x, StringBounder stringBounder) { final Dimension2D dim = getFtileDelegated().calculateDimension(stringBounder); if (dim.getWidth() < minWidth) { final double diff = minWidth - dim.getWidth(); return x + diff / 2; } return x; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileOverpassing.java��������0000664�0000000�0000000�00000002723�13126503031�0032114�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.graphic.StringBounder; public interface FtileOverpassing extends Ftile { public FtileGeometry getOverpassDimension(StringBounder stringBounder); } ���������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileUtils.java��������������0000664�0000000�0000000�00000005357�13126503031�0030722�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.Collection; public class FtileUtils { public static Ftile addConnection(Ftile ftile, Connection connection) { return new FtileWithConnection(ftile, connection); } public static Ftile addConnection(Ftile ftile, Collection connections) { return new FtileWithConnection(ftile, connections); } public static Ftile withSwimlaneOut(Ftile ftile, Swimlane out) { return new FtileWithSwimlanes(ftile, ftile.getSwimlaneIn(), out); } public static Ftile addBottom(Ftile ftile, double marginBottom) { return new FtileMargedVertically(ftile, 0, marginBottom); } public static Ftile addVerticalMargin(Ftile ftile, double marginTop, double marginBottom) { if (marginTop == 0 && marginBottom == 0) { return ftile; } return new FtileMargedVertically(ftile, marginTop, marginBottom); } public static Ftile addHorizontalMargin(Ftile ftile, double margin1, double margin2) { if (margin1 == 0 && margin2 == 0) { return ftile; } return new FtileMarged(ftile, margin1, margin2); } public static Ftile addHorizontalMargin(Ftile ftile, double margin) { if (margin == 0) { return ftile; } return new FtileMarged(ftile, margin, margin); } // public static Ftile addHorizontalMargin(Ftile ftile, double margin) { // return new FtileMarged(ftile, margin); // } // private static Ftile neverNull(Ftile ftile, ISkinParam skinParam) { // if (ftile == null) { // return new FtileEmpty(skinParam); // } // return ftile; // } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileWithConnection.java�����0000664�0000000�0000000�00000005012�13126503031�0032541�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorate; import net.sourceforge.plantuml.ugraphic.UGraphic; class FtileWithConnection extends FtileDecorate { private final List connections = new ArrayList(); FtileWithConnection(Ftile ftile, Collection connections) { super(ftile); if (connections == null || connections.size() == 0) { throw new IllegalArgumentException(); } this.connections.addAll(connections); } @Override public String toString() { return super.toString() + " " + connections; } public FtileWithConnection(Ftile ftile, Connection connection) { this(ftile, Arrays.asList(connection)); if (connection == null) { throw new IllegalArgumentException(); } } public void drawU(UGraphic ug) { getFtileDelegated().drawU(ug); for (Connection c : connections) { ug.draw(c); } } public Collection getInnerConnections() { final List result = new ArrayList(super.getInnerConnections()); result.addAll(connections); return Collections.unmodifiableList(connections); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileWithSwimlanes.java������0000664�0000000�0000000�00000003316�13126503031�0032411�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorate; class FtileWithSwimlanes extends FtileDecorate { private final Swimlane in; private final Swimlane out; FtileWithSwimlanes(Ftile ftile, Swimlane in, Swimlane out) { super(ftile); this.in = in; this.out = out; } @Override public Swimlane getSwimlaneIn() { return in; } @Override public Swimlane getSwimlaneOut() { return out; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileWithUrl.java������������0000664�0000000�0000000�00000003426�13126503031�0031213�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorate; import net.sourceforge.plantuml.ugraphic.UGraphic; public class FtileWithUrl extends FtileDecorate { private final Url url; public FtileWithUrl(Ftile ftile, Url url) { super(ftile); if (url == null) { throw new IllegalArgumentException(); } this.url = url; } public void drawU(UGraphic ug) { ug.startUrl(url); getFtileDelegated().drawU(ug); ug.closeAction(); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Genealogy.java���������������0000664�0000000�0000000�00000005331�13126503031�0030540�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.Collection; import java.util.HashMap; import java.util.Map; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Genealogy { private Map myFatherIs = new HashMap(); private final Ftile root; public Genealogy(Ftile root) { this.root = root; process(root); // System.err.println("myFatherIs=" + myFatherIs); } private void process(Ftile current) { final Collection children = current.getMyChildren(); // System.err.println("current=" + current); // System.err.println("children=" + children); for (Ftile child : children) { setMyFather(child, current); process(child); } } public Ftile getMyFather(Ftile me) { return myFatherIs.get(me); } private void setMyFather(Ftile child, Ftile father) { if (myFatherIs.containsKey(child)) { throw new IllegalArgumentException(); } myFatherIs.put(child, father); } public UTranslate getTranslate(Ftile child, StringBounder stringBounder) { Ftile current = child; UTranslate result = new UTranslate(); while (current != root) { final Ftile father = getMyFather(current); final UTranslate tr = father.getTranslateFor(current, stringBounder); // System.err.println("Father=" + father); // System.err.println("current=" + current); // System.err.println("TR=" + tr); result = tr.compose(result); current = father; } return result; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/GotoInterceptor.java���������0000664�0000000�0000000�00000004022�13126503031�0031751�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.UGraphicInterceptorGoto; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UGraphic; public class GotoInterceptor extends AbstractTextBlock implements TextBlock { private final TextBlock swinlanes; public GotoInterceptor(TextBlock swinlanes) { this.swinlanes = swinlanes; } public void drawU(UGraphic ug) { new UGraphicInterceptorGoto(ug).draw(swinlanes); } public Dimension2D calculateDimension(StringBounder stringBounder) { return swinlanes.calculateDimension(stringBounder); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/MergeStrategy.java�����������0000664�0000000�0000000�00000002752�13126503031�0031414�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; public enum MergeStrategy { FULL, LIMITED, NONE; public MergeStrategy max(MergeStrategy other) { final int max = Math.max(this.ordinal(), other.ordinal()); return MergeStrategy.values()[max]; } } ����������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Snake.java�������������������0000664�0000000�0000000�00000021465�13126503031�0027675�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.awt.geom.Dimension2D; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.ugraphic.CompressionTransform; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Snake implements UShape { private final Worm worm = new Worm(); private UPolygon endDecoration; private final Rainbow color; private TextBlock textBlock; private MergeStrategy mergeable = MergeStrategy.FULL; private Direction emphasizeDirection; private final HorizontalAlignment horizontalAlignment; public Snake transformX(CompressionTransform compressionTransform) { final Snake result = new Snake(horizontalAlignment, color, endDecoration); result.textBlock = this.textBlock; result.mergeable = this.mergeable; result.emphasizeDirection = this.emphasizeDirection; for (Point2D.Double pt : worm) { final double x = compressionTransform.transform(pt.x); final double y = pt.y; result.addPoint(x, y); } return result; } public void removeEndDecoration() { this.endDecoration = null; } public Snake(HorizontalAlignment horizontalAlignment, Rainbow color, UPolygon endDecoration) { if (color == null) { throw new IllegalArgumentException(); } if (color.size() == 0) { throw new IllegalArgumentException(); } this.endDecoration = endDecoration; this.color = color; this.horizontalAlignment = horizontalAlignment; } public Snake(HorizontalAlignment horizontalAlignment, Rainbow color) { this(horizontalAlignment, color, null); } public void setLabel(TextBlock label) { this.textBlock = label; } public Snake move(double dx, double dy) { final Snake result = new Snake(horizontalAlignment, color, endDecoration); for (Point2D pt : worm) { result.addPoint(pt.getX() + dx, pt.getY() + dy); } result.textBlock = this.textBlock; result.mergeable = this.mergeable; result.emphasizeDirection = this.emphasizeDirection; return result; } public Snake translate(UTranslate translate) { return move(translate.getDx(), translate.getDy()); } @Override public String toString() { return worm.toString(); } public void addPoint(double x, double y) { worm.addPoint(x, y); } public void addPoint(Point2D p) { addPoint(p.getX(), p.getY()); } public void drawInternal(UGraphic ug) { if (color.size() > 1) { drawRainbow(ug); } else { worm.drawInternalOneColor(ug, color.getColors().get(0), 1.5, emphasizeDirection, endDecoration); drawInternalLabel(ug); } } private void drawRainbow(UGraphic ug) { final List colors = color.getColors(); final int colorArrowSeparationSpace = color.getColorArrowSeparationSpace(); final double move = 2 + colorArrowSeparationSpace; final WormMutation mutation = WormMutation.create(worm, move); final double globalMove = -1.0 * (colors.size() - 1) / 2.0; Worm current = worm.moveFirstPoint(mutation.getFirst().multiplyBy(globalMove)); if (mutation.size() > 2) { current = current.moveLastPoint(mutation.getLast().multiplyBy(globalMove)); } for (int i = 0; i < colors.size(); i++) { double stroke = 1.5; if (colorArrowSeparationSpace == 0) { stroke = i == colors.size() - 1 ? 2.0 : 3.0; } current.drawInternalOneColor(ug, colors.get(i), stroke, emphasizeDirection, endDecoration); current = mutation.mute(current); } final UTranslate textTranslate = mutation.getTextTranslate(colors.size()); drawInternalLabel(ug.apply(textTranslate)); } private void drawInternalLabel(UGraphic ug) { if (textBlock != null) { final Point2D position = getTextBlockPosition(ug.getStringBounder()); textBlock.drawU(ug.apply(new UTranslate(position))); } } public double getMaxX(StringBounder stringBounder) { double result = -Double.MAX_VALUE; for (Point2D pt : worm) { result = Math.max(result, pt.getX()); } if (textBlock != null) { final Point2D position = getTextBlockPosition(stringBounder); final Dimension2D dim = textBlock.calculateDimension(stringBounder); result = Math.max(result, position.getX() + dim.getWidth()); } return result; } private Point2D getTextBlockPosition(StringBounder stringBounder) { final Point2D pt1 = worm.get(0); final Point2D pt2 = worm.get(1); final Dimension2D dim = textBlock.calculateDimension(stringBounder); double x = Math.max(pt1.getX(), pt2.getX()) + 4; final boolean zigzag = worm.getDirectionsCode().startsWith("DLD") || worm.getDirectionsCode().startsWith("DRD"); if (horizontalAlignment == HorizontalAlignment.CENTER && zigzag) { final Point2D pt3 = worm.get(2); x = (pt2.getX() + pt3.getX()) / 2 - dim.getWidth() / 2; } else if (horizontalAlignment == HorizontalAlignment.RIGHT && zigzag) { // final Point2D pt3 = worm.get(2); x = Math.max(pt1.getX(), pt2.getX()) - dim.getWidth() - 4; } final double y = (pt1.getY() + pt2.getY()) / 2 - dim.getHeight() / 2; return new Point2D.Double(x, y); } public List getHorizontalLines() { final List result = new ArrayList(); for (int i = 0; i < worm.size() - 1; i++) { final Point2D pt1 = worm.get(i); final Point2D pt2 = worm.get(i + 1); if (pt1.getY() == pt2.getY()) { final Line2D line = new Line2D.Double(pt1, pt2); result.add(line); } } return result; } private Point2D getFirst() { return worm.get(0); } public Point2D getLast() { return worm.get(worm.size() - 1); } static boolean same(Point2D pt1, Point2D pt2) { return pt1.distance(pt2) < 0.001; } public Snake merge(Snake other, StringBounder stringBounder) { final MergeStrategy strategy = this.mergeable.max(other.mergeable); if (strategy == MergeStrategy.NONE) { return null; } final boolean emptyOther = TextBlockUtils.isEmpty(other.textBlock, stringBounder); // final boolean emptyThis = TextBlockUtils.isEmpty(this.textBlock, stringBounder); if (emptyOther == false /* || emptyThis == false */) { // System.err.println("merge other.textBlock="+other.textBlock+" "+other.textBlock.calculateDimension(TextBlockUtils.getDummyStringBounder())); return null; } if (same(this.getLast(), other.getFirst())) { final UPolygon oneOf = other.endDecoration == null ? endDecoration : other.endDecoration; final Snake result = new Snake(horizontalAlignment, color, oneOf); // result.textBlock = oneOf(this.textBlock, other.textBlock, stringBounder); result.emphasizeDirection = emphasizeDirection == null ? other.emphasizeDirection : emphasizeDirection; result.worm.addAll(this.worm.merge(other.worm, strategy)); result.mergeable = strategy; return result; } if (same(this.getFirst(), other.getLast())) { return other.merge(this, stringBounder); } return null; } public boolean touches(Snake other) { if (other.mergeable != MergeStrategy.FULL) { return false; } if (other.worm.isPureHorizontal()) { return false; } return same(this.getLast(), other.getFirst()); } public void goUnmergeable(MergeStrategy strategy) { this.mergeable = strategy; } public void emphasizeDirection(Direction direction) { this.emphasizeDirection = direction; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/SnakeDirection.java����������0000664�0000000�0000000�00000003227�13126503031�0031532�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.awt.geom.Point2D; public enum SnakeDirection { VERTICAL_THEN_HORIZONTAL, HORIZONTAL_THEN_VERTICAL; public static SnakeDirection getDirection(Point2D pt1, Point2D pt2) { if (pt1.getX() == pt2.getX()) { return VERTICAL_THEN_HORIZONTAL; } if (pt1.getY() == pt2.getY()) { return HORIZONTAL_THEN_VERTICAL; } throw new IllegalArgumentException(); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimable.java����������������0000664�0000000�0000000�00000002700�13126503031�0030366�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.Set; public interface Swimable { public Set getSwimlanes(); public Swimlane getSwimlaneIn(); public Swimlane getSwimlaneOut(); } ����������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlane.java����������������0000664�0000000�0000000�00000005671�13126503031�0030414�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SpecificBackcolorable; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Swimlane implements SpecificBackcolorable { private final String name; private Display display; private UTranslate translate = new UTranslate(); private double totalWidth; public Swimlane(String name) { this.name = name; this.display = Display.getWithNewlines(name); } @Override public String toString() { return name; } public String getName() { return name; } public Display getDisplay() { return display; } public void setDisplay(Display label) { this.display = label; } public final UTranslate getTranslate() { return translate; } public final void setTranslateAndWidth(UTranslate translate, double totalWidth) { this.translate = translate; this.totalWidth = totalWidth; } public Colors getColors(ISkinParam skinParam) { return colors; } public void setSpecificColorTOBEREMOVED(ColorType type, HtmlColor color) { if (color != null) { this.colors = colors.add(type, color); } } private Colors colors = Colors.empty(); public final double getTotalWidth() { return totalWidth; } public void setColors(Colors colors) { this.colors = colors; } private MinMax minMax; public void setMinMax(MinMax minMax) { this.minMax = minMax; } public MinMax getMinMax() { return minMax; } } �����������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java���������������0000664�0000000�0000000�00000036200�13126503031�0030567�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.Pragma; import net.sourceforge.plantuml.activitydiagram3.Instruction; import net.sourceforge.plantuml.activitydiagram3.InstructionList; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorAddNote; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorAddUrl; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorAssembly; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorCreateGroup; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorCreateParallel; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorIf; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorRepeat; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorWhile; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.UGraphicInterceptorOneSwimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.VCompactFactory; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.UGraphicDelegator; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.svek.UGraphicForSnake; import net.sourceforge.plantuml.ugraphic.LimitFinder; import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.SlotSet; import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.utils.MathUtils; public class Swimlanes extends AbstractTextBlock implements TextBlock { private final ISkinParam skinParam;; private final Pragma pragma; private final List swimlanes = new ArrayList(); private Swimlane currentSwimlane = null; private final Instruction root = new InstructionList(); private Instruction currentInstruction = root; private LinkRendering nextLinkRenderer = LinkRendering.none(); public Swimlanes(ISkinParam skinParam, Pragma pragma) { this.skinParam = skinParam; this.pragma = pragma; } private FontConfiguration getFontConfiguration() { return new FontConfiguration(skinParam, FontParam.SWIMLANE_TITLE, null); } private FtileFactory getFtileFactory(StringBounder stringBounder) { FtileFactory factory = new VCompactFactory(skinParam, stringBounder); factory = new FtileFactoryDelegatorAddUrl(factory); factory = new FtileFactoryDelegatorAssembly(factory); factory = new FtileFactoryDelegatorIf(factory, pragma); factory = new FtileFactoryDelegatorWhile(factory); factory = new FtileFactoryDelegatorRepeat(factory); factory = new FtileFactoryDelegatorCreateParallel(factory); // factory = new FtileFactoryDelegatorCreateParallelAddingMargin(new FtileFactoryDelegatorCreateParallel1(factory)); factory = new FtileFactoryDelegatorAddNote(factory); factory = new FtileFactoryDelegatorCreateGroup(factory); return factory; } public void swimlane(String name, HtmlColor color, Display label) { currentSwimlane = getOrCreate(name); if (color != null) { currentSwimlane.setSpecificColorTOBEREMOVED(ColorType.BACK, color); } if (Display.isNull(label) == false) { currentSwimlane.setDisplay(label); } } private Swimlane getOrCreate(String name) { for (Swimlane s : swimlanes) { if (s.getName().equals(name)) { return s; } } final Swimlane result = new Swimlane(name); swimlanes.add(result); return result; } class Cross extends UGraphicDelegator { private Cross(UGraphic ug) { super(ug); } @Override public void draw(UShape shape) { if (shape instanceof Ftile) { final Ftile tile = (Ftile) shape; tile.drawU(this); } else if (shape instanceof Connection) { final Connection connection = (Connection) shape; final Ftile tile1 = connection.getFtile1(); final Ftile tile2 = connection.getFtile2(); if (tile1 == null || tile2 == null) { return; } if (tile1.getSwimlaneOut() != tile2.getSwimlaneIn()) { final ConnectionCross connectionCross = new ConnectionCross(connection); connectionCross.drawU(getUg()); } } } public UGraphic apply(UChange change) { return new Cross(getUg().apply(change)); } } static private final double separationMargin = 10; public void drawU(UGraphic ug) { final FtileFactory factory = getFtileFactory(ug.getStringBounder()); TextBlock full = root.createFtile(factory); ug = new UGraphicForSnake(ug); if (swimlanes.size() <= 1) { full = new TextBlockInterceptorUDrawable(full); // BUG42 // full.drawU(ug); full.drawU(ug); ug.flushUg(); return; } // if (OptionFlags.SWI2) { // // final SlotFinderX slotFinder = new SlotFinderX(ug.getStringBounder()); // drawWhenSwimlanes(slotFinder, full); // final SlotSet slotX = slotFinder.getXSlotSet().reverse(); // // // // // final SlotSet ysSlotSet = slotFinder.getYSlotSet().reverse().smaller(5.0); // // // System.err.println("slotX=" + slotX); // // printDebug(ug, slotX, HtmlColorUtils.GRAY, full); // // double x2 = 0; // double y2 = 0; // final double stepy = 40; // int i = 0; // final SlotSet deconnectedSwimlanes = new SlotSet(); // for (Swimlane swimlane : swimlanes) { // final UGraphic ug2 = ug.apply(new UChangeColor(HtmlColorUtils.GREEN)).apply( // new UChangeBackColor(HtmlColorUtils.GREEN)); // final double totalWidth = swimlane.getTotalWidth(); // final SlotSet slot2 = slotX.filter(x2 + separationMargin, x2 + totalWidth - separationMargin); // deconnectedSwimlanes.addAll(slot2); // // ug2.apply(new UTranslate(x2, y2)).draw(new URectangle(totalWidth, stepy)); // x2 += totalWidth; // y2 += stepy; // i++; // } // // printDebug(ug, deconnectedSwimlanes, HtmlColorUtils.GRAY, full); // // // // final CompressionTransform compressionTransform = new CompressionTransform(deconnectedSwimlanes); // // ug = new UGraphicCompress2(ug, compressionTransform); // drawWhenSwimlanes(ug, full); // } else { drawWhenSwimlanes(ug, full); // } // getCollisionDetector(ug, titleHeightTranslate).drawDebug(ug); } static private void printDebug(UGraphic ug, SlotSet slot, HtmlColor col, TextBlock full) { slot.drawDebugX(ug.apply(new UChangeColor(col)).apply(new UChangeBackColor(col)), full.calculateDimension(ug.getStringBounder()).getHeight()); } private void drawWhenSwimlanes(UGraphic ug, TextBlock full) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimensionFull = full.calculateDimension(stringBounder); final UTranslate titleHeightTranslate = getTitleHeightTranslate(stringBounder); computeSize(ug, full); double x2 = 0; for (Swimlane swimlane : swimlanes) { final HtmlColor back = swimlane.getColors(skinParam).getColor(ColorType.BACK); if (back != null) { final UGraphic background = ug.apply(new UChangeBackColor(back)).apply(new UChangeColor(back)) .apply(new UTranslate(x2, 0)); background.draw(new URectangle(swimlane.getTotalWidth(), dimensionFull.getHeight() + titleHeightTranslate.getDy())); } // if (OptionFlags.SWI2 == false) { final TextBlock swTitle = swimlane.getDisplay().create(getFontConfiguration(), HorizontalAlignment.LEFT, skinParam); final double titleWidth = swTitle.calculateDimension(stringBounder).getWidth(); final double posTitle = x2 + (swimlane.getTotalWidth() - titleWidth) / 2; swTitle.drawU(ug.apply(new UTranslate(posTitle, 0))); // } drawSeparation(ug.apply(new UTranslate(x2, 0)), dimensionFull.getHeight() + titleHeightTranslate.getDy()); full.drawU(new UGraphicInterceptorOneSwimlane(ug, swimlane).apply(swimlane.getTranslate()).apply( titleHeightTranslate)); x2 += swimlane.getTotalWidth(); } drawSeparation(ug.apply(new UTranslate(x2, 0)), dimensionFull.getHeight() + titleHeightTranslate.getDy()); final Cross cross = new Cross(ug.apply(titleHeightTranslate)); full.drawU(cross); cross.flushUg(); } private void computeDrawingWidths(UGraphic ug, TextBlock full) { final StringBounder stringBounder = ug.getStringBounder(); for (Swimlane swimlane : swimlanes) { final LimitFinder limitFinder = new LimitFinder(stringBounder, false); final UGraphicInterceptorOneSwimlane interceptor = new UGraphicInterceptorOneSwimlane(new UGraphicForSnake( limitFinder), swimlane); full.drawU(interceptor); interceptor.flushUg(); final MinMax minMax = limitFinder.getMinMax(); swimlane.setMinMax(minMax); } } private void computeSize(UGraphic ug, TextBlock full) { computeDrawingWidths(ug, full); double x1 = 0; final StringBounder stringBounder = ug.getStringBounder(); double swimlaneWidth = skinParam.swimlaneWidth(); if (swimlaneWidth == -1) { for (Swimlane swimlane : swimlanes) { final MinMax minMax = swimlane.getMinMax(); swimlaneWidth = Math.max(swimlaneWidth, minMax.getWidth()); } } for (Swimlane swimlane : swimlanes) { final MinMax minMax = swimlane.getMinMax(); final double drawingWidth = minMax.getWidth() + 2 * separationMargin; final TextBlock swTitle = swimlane.getDisplay().create(getFontConfiguration(), HorizontalAlignment.LEFT, skinParam); final double titleWidth = swTitle.calculateDimension(stringBounder).getWidth(); final double totalWidth = MathUtils.max(swimlaneWidth, drawingWidth, titleWidth + 2 * separationMargin); final UTranslate translate = new UTranslate(x1 - minMax.getMinX() + separationMargin + (totalWidth - drawingWidth) / 2.0, 0); swimlane.setTranslateAndWidth(translate, totalWidth); x1 += totalWidth; } } private void computeSizeOld(UGraphic ug, TextBlock full) { double x1 = 0; final StringBounder stringBounder = ug.getStringBounder(); for (Swimlane swimlane : swimlanes) { final LimitFinder limitFinder = new LimitFinder(stringBounder, false); final UGraphicInterceptorOneSwimlane interceptor = new UGraphicInterceptorOneSwimlane(new UGraphicForSnake( limitFinder), swimlane); full.drawU(interceptor); interceptor.flushUg(); final MinMax minMax = limitFinder.getMinMax(); final double drawingWidth = minMax.getWidth() + 2 * separationMargin; final TextBlock swTitle = swimlane.getDisplay().create(getFontConfiguration(), HorizontalAlignment.LEFT, skinParam); final double titleWidth = swTitle.calculateDimension(stringBounder).getWidth(); final double totalWidth = Math.max(drawingWidth, titleWidth + 2 * separationMargin); final UTranslate translate = new UTranslate(x1 - minMax.getMinX() + separationMargin + (totalWidth - drawingWidth) / 2.0, 0); swimlane.setTranslateAndWidth(translate, totalWidth); x1 += totalWidth; } } private UTranslate getTitleHeightTranslate(final StringBounder stringBounder) { double titlesHeight = 0; for (Swimlane swimlane : swimlanes) { final TextBlock swTitle = swimlane.getDisplay().create(getFontConfiguration(), HorizontalAlignment.LEFT, skinParam); titlesHeight = Math.max(titlesHeight, swTitle.calculateDimension(stringBounder).getHeight()); } final UTranslate titleHeightTranslate = new UTranslate(0, titlesHeight); return titleHeightTranslate; } private CollisionDetector getCollisionDetector(UGraphic ug, final UTranslate titleHeightTranslate) { final FtileFactory factory = getFtileFactory(ug.getStringBounder()); final TextBlock full = root.createFtile(factory); ug = new UGraphicForSnake(ug); final CollisionDetector collisionDetector = new CollisionDetector(ug.getStringBounder()); for (Swimlane swimlane : swimlanes) { full.drawU(new UGraphicInterceptorOneSwimlane(collisionDetector, swimlane).apply(swimlane.getTranslate()) .apply(titleHeightTranslate)); } collisionDetector.setManageSnakes(true); final Cross cross = new Cross(collisionDetector.apply(titleHeightTranslate)); full.drawU(cross); cross.flushUg(); return collisionDetector; } private void drawSeparation(UGraphic ug, double height) { HtmlColor color = skinParam.getHtmlColor(ColorParam.swimlaneBorder, null, false); if (color == null) { color = ColorParam.swimlaneBorder.getDefaultValue(); } final UStroke thickness = Rose.getStroke(skinParam, LineParam.swimlaneBorder, 2); ug.apply(thickness).apply(new UChangeColor(color)).draw(new ULine(0, height)); } public Dimension2D calculateDimension(StringBounder stringBounder) { return TextBlockUtils.getMinMax(this, stringBounder).getDimension(); } public Instruction getCurrent() { return currentInstruction; } public void setCurrent(Instruction current) { this.currentInstruction = current; } public LinkRendering nextLinkRenderer() { return nextLinkRenderer; } public void setNextLinkRenderer(LinkRendering link) { if (link == null) { throw new IllegalArgumentException(); } this.nextLinkRenderer = link; } public Swimlane getCurrentSwimlane() { return currentSwimlane; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������TextBlockInterceptorUDrawable.java������������������������������������������������������������������0000664�0000000�0000000�00000004246�13126503031�0034460�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile�������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.awt.geom.Dimension2D; import java.util.HashMap; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TextBlockInterceptorUDrawable extends AbstractTextBlock implements TextBlock { private final TextBlock textBlock; public TextBlockInterceptorUDrawable(TextBlock textBlock) { this.textBlock = textBlock; } public void drawU(UGraphic ug) { textBlock.drawU(new UGraphicInterceptorUDrawable2(ug, new HashMap())); ug.flushUg(); } public Dimension2D calculateDimension(StringBounder stringBounder) { return TextBlockUtils.getMinMax(this, stringBounder).getDimension(); } }����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������UGraphicInterceptorUDrawable2.java������������������������������������������������������������������0000664�0000000�0000000�00000007440�13126503031�0034344�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile�������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.awt.geom.Point2D; import java.util.Map; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.graphic.UGraphicDelegator; import net.sourceforge.plantuml.svek.UGraphicForSnake; import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UTranslate; public class UGraphicInterceptorUDrawable2 extends UGraphicDelegator { private final Map positions; public UGraphicInterceptorUDrawable2(UGraphic ug, Map positions) { super(ug); this.positions = positions; } public void draw(UShape shape) { if (shape instanceof Ftile) { final Ftile ftile = (Ftile) shape; // System.err.println("ftile=" + ftile); ftile.drawU(this); if (ftile instanceof FtileLabel) { positions.put(((FtileLabel) ftile).getName(), getPosition()); // System.err.println("ug=" + getUg().getClass()); } if (ftile instanceof FtileGoto) { // System.err.println("positions=" + positions); drawGoto((FtileGoto) ftile); } } else if (shape instanceof UDrawable) { final UDrawable drawable = (UDrawable) shape; drawable.drawU(this); } else { getUg().draw(shape); } } private UTranslate getPosition() { return ((UGraphicForSnake) getUg()).getTranslation(); } private void drawGoto(FtileGoto ftile) { final FtileGeometry geom = ftile.calculateDimension(getStringBounder()); final Point2D pt = geom.getPointIn(); UGraphic ugGoto = getUg().apply(new UChangeColor(HtmlColorUtils.GREEN)).apply( new UChangeBackColor(HtmlColorUtils.GREEN)); ugGoto = ugGoto.apply(new UTranslate(pt)); final UTranslate posNow = getPosition(); final UTranslate dest = positions.get(ftile.getName()); final double dx = dest.getDx() - posNow.getDx(); final double dy = dest.getDy() - posNow.getDy(); ugGoto.draw(new UEllipse(3, 3)); ugGoto.apply(new UTranslate(dx, dy)).draw(new UEllipse(3, 3)); ugGoto.draw(new ULine(dx, 0)); ugGoto.apply(new UTranslate(dx, 0)).draw(new ULine(0, dy)); // ugGoto.draw(new ULine(dx, dy)); } public UGraphic apply(UChange change) { return new UGraphicInterceptorUDrawable2(getUg().apply(change), positions); } }��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/WeldingPoint.java������������0000664�0000000�0000000�00000002477�13126503031�0031241�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; public interface WeldingPoint { } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Worm.java��������������������0000664�0000000�0000000�00000032275�13126503031�0027561�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Iterator; import java.util.List; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.cucadiagram.LinkStyle; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Worm implements Iterable { private final List points = new ArrayList(); public boolean isPureHorizontal() { return points.size() == 2 && points.get(0).getY() == points.get(1).getY(); } public void drawInternalOneColor(UGraphic ug, HtmlColorAndStyle color, double stroke, Direction emphasizeDirection, UPolygon endDecoration) { final HtmlColor color2 = color.getColor(); if (color2 == null) { throw new IllegalArgumentException(); } final LinkStyle style = color.getStyle(); if (style == LinkStyle.INVISIBLE) { return; } ug = ug.apply(new UChangeColor(color2)); ug = ug.apply(new UChangeBackColor(color2)); if (style == LinkStyle.NORMAL) { ug = ug.apply(new UStroke(stroke)); } else { ug = ug.apply(LinkStyle.getStroke(style, stroke)); } boolean drawn = false; for (int i = 0; i < points.size() - 1; i++) { final java.awt.geom.Point2D.Double p1 = points.get(i); final java.awt.geom.Point2D.Double p2 = points.get(i + 1); final Line2D line = new Line2D.Double(p1, p2); if (drawn == false && emphasizeDirection != null && Direction.fromVector(p1, p2) == emphasizeDirection) { drawLine(ug, line, emphasizeDirection); drawn = true; } else { drawLine(ug, line, null); } } if (endDecoration != null) { ug = ug.apply(new UStroke(1.5)); final Point2D end = points.get(points.size() - 1); ug.apply(new UTranslate(end)).apply(new UStroke()).draw(endDecoration); } } private void drawLine(UGraphic ug, Line2D line, Direction direction) { drawLine(ug, line.getX1(), line.getY1(), line.getX2(), line.getY2(), direction); } private void drawLine(UGraphic ug, double x1, double y1, double x2, double y2, Direction direction) { ug = ug.apply(new UTranslate(x1, y1)); if (direction != null) { ug.apply(new UTranslate((x2 - x1) / 2, (y2 - y1) / 2)).draw(Arrows.asTo(direction)); } ug.draw(new ULine(x2 - x1, y2 - y1)); } public Worm move(double dx, double dy) { final Worm result = new Worm(); for (Point2D pt : points) { result.addPoint(pt.getX() + dx, pt.getY() + dy); } return result; } public Worm moveFirstPoint(UTranslate move) { final double dx = move.getDx(); final double dy = move.getDy(); if (dx != 0 && dy != 0) { throw new IllegalArgumentException("move=" + move); } final Worm result = new Worm(); double x0 = this.points.get(0).getX(); double y0 = this.points.get(0).getY(); double x1 = this.points.get(1).getX(); double y1 = this.points.get(1).getY(); if (dx != 0 && x0 == x1) { x1 += dx; } if (dy != 0 && y0 == y1) { y1 += dy; } x0 += dx; y0 += dy; result.addPoint(x0, y0); result.addPoint(x1, y1); for (int i = 2; i < this.points.size(); i++) { result.addPoint(this.points.get(i)); } return result; } public Worm moveLastPoint(UTranslate move) { final double dx = move.getDx(); final double dy = move.getDy(); if (dx != 0 && dy != 0) { throw new IllegalArgumentException("move=" + move); } final Worm result = new Worm(); double x8 = this.points.get(this.points.size() - 2).getX(); double y8 = this.points.get(this.points.size() - 2).getY(); double x9 = this.points.get(this.points.size() - 1).getX(); double y9 = this.points.get(this.points.size() - 1).getY(); if (dx != 0 && x8 == x9) { x8 += dx; } if (dy != 0 && y8 == y9) { y8 += dy; } x9 += dx; y9 += dy; for (int i = 0; i < this.points.size() - 2; i++) { result.addPoint(this.points.get(i)); } result.addPoint(x8, y8); result.addPoint(x9, y9); return result; } @Override public String toString() { final StringBuilder result = new StringBuilder(); for (int i = 0; i < points.size() - 1; i++) { result.append(getDirectionAtPoint(i) + " "); } return result + points.toString(); } public void addPoint(double x, double y) { this.points.add(new Point2D.Double(x, y)); } public void addPoint(Point2D pt) { this.addPoint(pt.getX(), pt.getY()); } public Worm translate(UTranslate translate) { return move(translate.getDx(), translate.getDy()); } SnakeDirection getDirection() { if (points.size() < 2) { throw new IllegalStateException(); } return SnakeDirection.getDirection(points.get(0), points.get(1)); } String getDirectionsCode() { final StringBuilder result = new StringBuilder(); for (int i = 0; i < points.size() - 1; i++) { final Direction direction = Direction.fromVector(points.get(i), points.get(i + 1)); result.append(direction.getShortCode()); } return result.toString(); } private List getPatternAt(int i) { return Arrays.asList(getDirectionAtPoint(i), getDirectionAtPoint(i + 1), getDirectionAtPoint(i + 2), getDirectionAtPoint(i + 3)); } private boolean isForwardAndBackwardAt(int i) { return getDirectionAtPoint(i) == getDirectionAtPoint(i + 1).getInv(); } private Direction getDirectionAtPoint(int i) { return Direction.fromVector(points.get(i), points.get(i + 1)); } public Iterator iterator() { return Collections.unmodifiableCollection(points).iterator(); } public int size() { return this.points.size(); } public Point2D.Double get(int i) { return this.points.get(i); } public void addAll(Worm other) { this.points.addAll(other.points); } public void remove(int i) { this.points.remove(i); } public void add(int i, Point2D.Double pt) { this.points.add(i, pt); } private Point2D getFirst() { return points.get(0); } public Point2D getLast() { return points.get(points.size() - 1); } public Worm merge(Worm other, MergeStrategy merge) { if (Snake.same(this.getLast(), other.getFirst()) == false) { throw new IllegalArgumentException(); } final Worm result = new Worm(); result.points.addAll(this.points); result.points.addAll(other.points); result.mergeMe(merge); return result; } private void mergeMe(MergeStrategy merge) { boolean change = false; do { change = false; change = change || removeNullVector(); change = change || removeRedondantDirection(); change = change || removePattern1(); change = change || removePattern2(); change = change || removePattern3(); change = change || removePattern4(); change = change || removePattern5(); change = change || removePattern6(); change = change || removePattern7(); if (merge == MergeStrategy.FULL) { change = change || removePattern8(); } } while (change); } private boolean removeNullVector() { for (int i = 0; i < points.size() - 1; i++) { final Direction dir = getDirectionAtPoint(i); if (dir == null) { points.remove(i); return true; } } return false; } private boolean removeRedondantDirection() { for (int i = 0; i < points.size() - 2; i++) { final Direction dir1 = getDirectionAtPoint(i); final Direction dir2 = getDirectionAtPoint(i + 1); if (dir1 == dir2) { points.remove(i + 1); return true; } } return false; } private boolean removePattern1() { for (int i = 0; i < points.size() - 5; i++) { final List patternAt = getPatternAt(i); if (Arrays.asList(Direction.DOWN, Direction.LEFT, Direction.DOWN, Direction.RIGHT).equals(patternAt) || Arrays.asList(Direction.DOWN, Direction.RIGHT, Direction.DOWN, Direction.LEFT).equals(patternAt)) { final Point2D.Double newPoint = new Point2D.Double(points.get(i + 1).x, points.get(i + 3).y); points.remove(i + 3); points.remove(i + 2); points.remove(i + 1); points.add(i + 1, newPoint); return true; } } return false; } private boolean removePattern7() { if (points.size() > 4) { final int i = 0; final List patternAt = getPatternAt(i); if (Arrays.asList(Direction.RIGHT, Direction.DOWN, Direction.LEFT, Direction.DOWN).equals(patternAt) && points.get(i + 3).x > points.get(i).x) { final Point2D.Double newPoint = new Point2D.Double(points.get(i + 3).x, points.get(i).y); points.remove(i + 2); points.remove(i + 1); points.add(i + 1, newPoint); return true; } } return false; } private boolean removePattern2() { for (int i = 0; i < points.size() - 5; i++) { final List patternAt = getPatternAt(i); if (Arrays.asList(Direction.RIGHT, Direction.DOWN, Direction.RIGHT, Direction.UP).equals(patternAt) || Arrays.asList(Direction.LEFT, Direction.DOWN, Direction.LEFT, Direction.UP).equals(patternAt)) { final Point2D.Double newPoint = new Point2D.Double(points.get(i + 3).x, points.get(i + 1).y); points.remove(i + 3); points.remove(i + 2); points.remove(i + 1); points.add(i + 1, newPoint); return true; } } return false; } private boolean removePattern3() { for (int i = 0; i < points.size() - 4; i++) { final List patternAt = getPatternAt(i); if (Arrays.asList(Direction.DOWN, Direction.RIGHT, Direction.DOWN, Direction.RIGHT).equals(patternAt) || Arrays.asList(Direction.DOWN, Direction.LEFT, Direction.DOWN, Direction.LEFT).equals(patternAt)) { final Point2D.Double newPoint = new Point2D.Double(points.get(i + 1).x, points.get(i + 3).y); points.remove(i + 3); points.remove(i + 2); points.remove(i + 1); points.add(i + 1, newPoint); return true; } } return false; } private boolean removePattern4() { final int i = points.size() - 5; if (i >= 0) { final List patternAt = getPatternAt(i); if (Arrays.asList(Direction.DOWN, Direction.LEFT, Direction.DOWN, Direction.RIGHT).equals(patternAt)) { final Point2D.Double p1 = points.get(i + 1); final Point2D.Double p4 = points.get(i + 4); if (p4.x > p1.x) { final Point2D.Double newPoint = new Point2D.Double(points.get(i + 1).x, points.get(i + 3).y); points.remove(i + 3); points.remove(i + 2); points.remove(i + 1); points.add(i + 1, newPoint); return true; } } } return false; } private boolean removePattern5() { final int i = points.size() - 5; if (i >= 0) { final List patternAt = getPatternAt(i); if (Arrays.asList(Direction.DOWN, Direction.RIGHT, Direction.DOWN, Direction.LEFT).equals(patternAt)) { final Point2D.Double p1 = points.get(i + 1); final Point2D.Double p4 = points.get(i + 4); if (p4.x + 4 < p1.x) { final Point2D.Double newPoint = new Point2D.Double(points.get(i + 1).x, points.get(i + 3).y); points.remove(i + 3); points.remove(i + 2); points.remove(i + 1); points.add(i + 1, newPoint); return true; } } } return false; } private boolean removePattern6() { for (int i = 0; i < points.size() - 2; i++) { if (isForwardAndBackwardAt(i)) { points.remove(i + 1); return true; } } return false; } private boolean removePattern8() { for (int i = 0; i < points.size() - 4; i++) { final List patternAt = getPatternAt(i); if (Arrays.asList(Direction.LEFT, Direction.DOWN, Direction.LEFT, Direction.DOWN).equals(patternAt) || Arrays.asList(Direction.RIGHT, Direction.DOWN, Direction.RIGHT, Direction.DOWN) .equals(patternAt)) { final Point2D.Double newPoint = new Point2D.Double(points.get(i + 3).x, points.get(i + 1).y); points.remove(i + 3); points.remove(i + 2); points.remove(i + 1); points.add(i + 1, newPoint); return true; } } return false; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/WormMutation.java������������0000664�0000000�0000000�00000013443�13126503031�0031276�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ugraphic.UTranslate; public class WormMutation { private final List translations = new ArrayList(); private WormMutation() { } public static WormMutation create(Worm worm, double delta) { final String signature = worm.getDirectionsCode(); if (signature.length() > 2) { return createFromLongSignature(signature, delta); } return createFromSimpleSignature(signature, delta); } private static WormMutation createFromLongSignature(final String signature, final double delta) { final WormMutation result = new WormMutation(); for (int i = 0; i < signature.length() - 1; i++) { WormMutation tmp = createFromSimpleSignature(signature.substring(i, i + 2), delta); if (i == 0) { result.translations.add(tmp.translations.get(0)); } else { UTranslate last = result.getLast(); if (last.isAlmostSame(tmp.translations.get(0)) == false) { tmp = tmp.reverse(); } } result.translations.add(tmp.translations.get(1)); if (i == signature.length() - 2) { result.translations.add(tmp.translations.get(2)); } } return result; } private WormMutation reverse() { final WormMutation result = new WormMutation(); for (UTranslate tr : translations) { result.translations.add(tr.reverse()); } return result; } public UTranslate getLast() { return translations.get(translations.size() - 1); } public UTranslate getFirst() { return translations.get(0); } public int size() { return translations.size(); } private static WormMutation createFromSimpleSignature(final String signature, final double delta) { final WormMutation result = new WormMutation(); // System.err.println("signature=" + signature); if (signature.equals("D") || signature.equals("U")) { final UTranslate translate = new UTranslate(delta, 0); result.translations.add(translate); result.translations.add(translate); return result; } if (signature.equals("L") || signature.equals("R")) { final UTranslate translate = new UTranslate(0, delta); result.translations.add(translate); result.translations.add(translate); return result; } if (signature.equals("RD")) { result.translations.add(new UTranslate(0, -delta)); result.translations.add(new UTranslate(delta, -delta)); result.translations.add(new UTranslate(delta, 0)); return result; } if (signature.equals("RU")) { result.translations.add(new UTranslate(0, delta)); result.translations.add(new UTranslate(delta, delta)); result.translations.add(new UTranslate(delta, 0)); return result; } if (signature.equals("LD")) { result.translations.add(new UTranslate(0, -delta)); result.translations.add(new UTranslate(-delta, -delta)); result.translations.add(new UTranslate(-delta, 0)); return result; } if (signature.equals("DL")) { result.translations.add(new UTranslate(delta, 0)); result.translations.add(new UTranslate(delta, delta)); result.translations.add(new UTranslate(0, delta)); return result; } if (signature.equals("DR")) { result.translations.add(new UTranslate(-delta, 0)); result.translations.add(new UTranslate(-delta, delta)); result.translations.add(new UTranslate(0, delta)); return result; } if (signature.equals("UL")) { result.translations.add(new UTranslate(delta, 0)); result.translations.add(new UTranslate(delta, -delta)); result.translations.add(new UTranslate(0, -delta)); return result; } if (signature.equals("UR")) { result.translations.add(new UTranslate(-delta, 0)); result.translations.add(new UTranslate(-delta, -delta)); result.translations.add(new UTranslate(0, -delta)); return result; } throw new UnsupportedOperationException(signature); } static private class MinMax { private double min = Double.MAX_VALUE; private double max = Double.MIN_VALUE; private void append(double v) { if (v > max) { max = v; } if (v < min) { min = v; } } private double getExtreme() { if (Math.abs(max) > Math.abs(min)) { return max; } return min; } } public UTranslate getTextTranslate(int size) { final MinMax result = new MinMax(); for (UTranslate tr : translations) { result.append(tr.getDx()); } return new UTranslate(result.getExtreme() * (size - 1), 0); } public Worm mute(Worm original) { final Worm result = new Worm(); for (int i = 0; i < original.size(); i++) { result.addPoint(translations.get(i).getTranslated(original.get(i))); } return result; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/WormTexted.java��������������0000664�0000000�0000000�00000010334�13126503031�0030727�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.Iterator; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UTranslate; public class WormTexted implements Iterable { private final Worm worm; private TextBlock textBlock; public WormTexted() { this(new Worm()); } private WormTexted(Worm worm) { this.worm = worm; } public Iterator iterator() { return worm.iterator(); } public void addPoint(double x, double y) { worm.addPoint(x, y); } public void drawInternalOneColor(UGraphic ug, HtmlColorAndStyle color, double stroke, Direction emphasizeDirection, UPolygon endDecoration) { worm.drawInternalOneColor(ug, color, stroke, emphasizeDirection, endDecoration); } public Worm getWorm() { return worm; } public Point2D get(int i) { return worm.get(i); } public int size() { return worm.size(); } public WormTexted merge(WormTexted other, MergeStrategy merge) { final Worm result = worm.merge(other.worm, merge); return new WormTexted(result); } public void addAll(WormTexted other) { this.worm.addAll(other.worm); } public void setLabel(TextBlock label) { if (textBlock != null) { throw new IllegalStateException(); } this.textBlock = label; } public boolean isEmptyText(StringBounder stringBounder) { return TextBlockUtils.isEmpty(textBlock, stringBounder); } private Point2D getTextBlockPosition(StringBounder stringBounder) { final Point2D pt1 = get(0); final Point2D pt2 = get(1); final Dimension2D dim = textBlock.calculateDimension(stringBounder); // if (worm.getDirectionsCode().startsWith("LD")) { // final double y = pt1.getY() - dim.getHeight(); // return new Point2D.Double(Math.max(pt1.getX(), pt2.getX()) - dim.getWidth(), y); // } final double y = (pt1.getY() + pt2.getY()) / 2 - dim.getHeight() / 2; return new Point2D.Double(Math.max(pt1.getX(), pt2.getX()) + 4, y); } public double getMaxX(StringBounder stringBounder) { double result = -Double.MAX_VALUE; for (Point2D pt : this) { result = Math.max(result, pt.getX()); } if (textBlock != null) { final Point2D position = getTextBlockPosition(stringBounder); final Dimension2D dim = textBlock.calculateDimension(stringBounder); result = Math.max(result, position.getX() + dim.getWidth()); } return result; } void drawInternalLabel(UGraphic ug) { if (textBlock != null) { final Point2D position = getTextBlockPosition(ug.getStringBounder()); textBlock.drawU(ug.apply(new UTranslate(position))); } } public void copyLabels(WormTexted other) { this.textBlock = other.textBlock; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/��������������������0000775�0000000�0000000�00000000000�13126503031�0027575�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ConnectionVerticalDown.java�������������������������������������������������������������������������0000664�0000000�0000000�00000006721�13126503031�0035010�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Point2D; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection; import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows; import net.sourceforge.plantuml.activitydiagram3.ftile.ConnectionTranslatable; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class ConnectionVerticalDown extends AbstractConnection implements ConnectionTranslatable { private final Point2D p1; private final Point2D p2; private final Rainbow color; private final TextBlock textBlock; public ConnectionVerticalDown(Ftile ftile1, Ftile ftile2, Point2D p1, Point2D p2, Rainbow color, TextBlock textBlock) { super(ftile1, ftile2); if (color.size() == 0) { throw new IllegalArgumentException(); } this.p1 = p1; this.p2 = p2; this.color = color; this.textBlock = textBlock; } public void drawU(UGraphic ug) { ug.draw(getSimpleSnake()); } public double getMaxX(StringBounder stringBounder) { return getSimpleSnake().getMaxX(stringBounder); } private Snake getSimpleSnake() { final Snake snake = new Snake(arrowHorizontalAlignment(), color, Arrows.asToDown()); snake.setLabel(textBlock); snake.addPoint(p1); snake.addPoint(p2); return snake; } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { final Snake snake = new Snake(arrowHorizontalAlignment(), color, Arrows.asToDown()); snake.setLabel(textBlock); final Point2D mp1a = translate1.getTranslated(p1); final Point2D mp2b = translate2.getTranslated(p2); final double middle = (mp1a.getY() + mp2b.getY()) / 2.0; snake.addPoint(mp1a); snake.addPoint(mp1a.getX(), middle); snake.addPoint(mp2b.getX(), middle); snake.addPoint(mp2b); ug.draw(snake); // final Snake small = new Snake(color, Arrows.asToDown()); // small.addPoint(mp2b.getX(), middle); // small.addPoint(mp2b); // ug.draw(small); } }�����������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FloatingNote.java���0000664�0000000�0000000�00000007313�13126503031�0033035�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.CreoleParser; import net.sourceforge.plantuml.creole.Sheet; import net.sourceforge.plantuml.creole.SheetBlock1; import net.sourceforge.plantuml.creole.SheetBlock2; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.svek.image.Opale; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; public class FloatingNote extends AbstractTextBlock implements Stencil, TextBlock { private final Opale opale; public FloatingNote(Display note, ISkinParam skinParam) { final Rose rose = new Rose(); final HtmlColor noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground); final HtmlColor borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder); final FontConfiguration fc = new FontConfiguration(skinParam, FontParam.NOTE, null); final Sheet sheet = new CreoleParser(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL).createSheet(note); final SheetBlock2 sheetBlock2 = new SheetBlock2(new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()), this, new UStroke(1)); this.opale = new Opale(borderColor, noteBackgroundColor, sheetBlock2, skinParam.shadowing(), false); // this.text = sheetBlock2; } public void drawU(UGraphic ug) { opale.drawU(ug); } public Dimension2D calculateDimension(StringBounder stringBounder) { return opale.calculateDimension(stringBounder); } public double getStartingX(StringBounder stringBounder, double y) { return -opale.getMarginX1(); } public double getEndingX(StringBounder stringBounder, double y) { return opale.calculateDimension(stringBounder).getWidth() - opale.getMarginX1(); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileFactoryDelegatorAddNote.java�������������������������������������������������������������������0000664�0000000�0000000�00000005065�13126503031�0036050�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.util.Collection; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.PositionedNote; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.sequencediagram.NoteType; public class FtileFactoryDelegatorAddNote extends FtileFactoryDelegator { public FtileFactoryDelegatorAddNote(FtileFactory factory) { super(factory); } @Override public Ftile addNote(Ftile ftile, Swimlane swimlane, Collection notes) { if (notes.size() == 0) { throw new IllegalArgumentException(); } // if (notes.size() > 1) { // throw new IllegalArgumentException(); // } ISkinParam skinParam = skinParam(); if (ftile == null) { final PositionedNote note = notes.iterator().next(); if (note.getColors() != null) { skinParam = note.getColors().mute(skinParam); } return new FtileNoteAlone(skinParam.shadowing(), note.getDisplay(), skinParam, note.getType() == NoteType.NOTE, swimlane); } return FtileWithNoteOpale.create(ftile, notes, skinParam, true); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileFactoryDelegatorAddUrl.java��������������������������������������������������������������������0000664�0000000�0000000�00000003743�13126503031�0035706�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileWithUrl; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileBox; public class FtileFactoryDelegatorAddUrl extends FtileFactoryDelegator { public FtileFactoryDelegatorAddUrl(FtileFactory factory) { super(factory); } @Override public Ftile addUrl(Ftile ftile, Url url) { if (ftile instanceof FtileBox) { return new FtileWithUrl(ftile, url); } return ftile; } } �����������������������������FtileFactoryDelegatorAssembly.java������������������������������������������������������������������0000664�0000000�0000000�00000010113�13126503031�0036277�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Point2D; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileMargedRight; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileFactoryDelegatorAssembly extends FtileFactoryDelegator { public FtileFactoryDelegatorAssembly(FtileFactory factory) { super(factory); } @Override public Ftile assembly(final Ftile tile1, final Ftile tile2) { double height = 35; final TextBlock textBlock = getTextBlock(getInLinkRenderingDisplay(tile2)); final StringBounder stringBounder = getStringBounder(); if (textBlock != null) { height += textBlock.calculateDimension(stringBounder).getHeight(); } // final Ftile space = new FtileEmpty(getFactory().shadowing(), 1, height); final Ftile tile1andSpace = FtileUtils.addBottom(tile1, height); Ftile result = super.assembly(tile1andSpace, tile2); final FtileGeometry geo = tile1.calculateDimension(stringBounder); if (geo.hasPointOut() == false) { return result; } final UTranslate translate1 = result.getTranslateFor(tile1andSpace, stringBounder); final Point2D p1 = geo.translate(translate1).getPointOut(); final UTranslate translate2 = result.getTranslateFor(tile2, stringBounder); final Point2D p2 = tile2.calculateDimension(stringBounder).translate(translate2).getPointIn(); final Rainbow color = getInLinkRenderingColor(tile2); final ConnectionVerticalDown connection = new ConnectionVerticalDown(tile1, tile2, p1, p2, color, textBlock); result = FtileUtils.addConnection(result, connection); if (textBlock != null) { final FtileGeometry dim = result.calculateDimension(stringBounder); final double width = dim.getWidth(); // System.err.println("width=" + width); // System.err.println("p1=" + p1); // System.err.println("p2=" + p2); final double maxX = connection.getMaxX(stringBounder); // System.err.println("FtileFactoryDelegatorAssembly dim=" + dim); // System.err.println("maxX=" + maxX); final double needed = (maxX - width) * 2; // result = new FtileMinWidth(result, needed); if (width < maxX) { result = new FtileMargedRight(result, maxX); } // System.err.println("FtileFactoryDelegatorAssembly result=" + result.calculateDimension(stringBounder)); } return result; } private final Rose rose = new Rose(); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileFactoryDelegatorCreateGroup.java���������������������������������������������������������������0000664�0000000�0000000�00000004710�13126503031�0036746�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.util.Collections; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.activitydiagram3.PositionedNote; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.skin.rose.Rose; public class FtileFactoryDelegatorCreateGroup extends FtileFactoryDelegator { private final Rose rose = new Rose(); public FtileFactoryDelegatorCreateGroup(FtileFactory factory) { super(factory); } @Override public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note, HtmlColor borderColor) { final HtmlColor arrowColor = rose.getHtmlColor(skinParam(), ColorParam.arrow); Ftile result = new FtileGroup(list, name, null, arrowColor, backColor, titleColor, skinParam(), borderColor); if (note != null) { result = new FtileWithNotes(result, Collections.singleton(note), skinParam()); } return result; } } ��������������������������������������������������������FtileFactoryDelegatorCreateParallel.java������������������������������������������������������������0000664�0000000�0000000�00000006440�13126503031�0037410�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.activitydiagram3.ForkStyle; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileHeightFixed; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; public class FtileFactoryDelegatorCreateParallel extends FtileFactoryDelegator { private final double spaceArroundBlackBar = 20; private final double xMargin = 14; public FtileFactoryDelegatorCreateParallel(FtileFactory factory) { super(factory); } private Ftile allOverlapped(Swimlane swimlane, List all, ForkStyle style, String label) { return new FtileForkInnerOverlapped(all); } @Override public Ftile createParallel(Swimlane swimlane, List all, ForkStyle style, String label) { final Dimension2D dimSuper = super.createParallel(swimlane, all, style, label).calculateDimension(getStringBounder()); final double height1 = dimSuper.getHeight() + 2 * spaceArroundBlackBar; final List list = new ArrayList(); for (Ftile tmp : all) { list.add(new FtileHeightFixed(FtileUtils.addHorizontalMargin(tmp, xMargin), height1)); } final Ftile inner = super.createParallel(swimlane, list, style, label); ParallelFtilesBuilder builder; if (style == ForkStyle.SPLIT) { builder = new ParallelBuilderSplit2(skinParam(), getStringBounder(), list, inner, swimlane); } else if (style == ForkStyle.MERGE) { builder = new ParallelBuilderMerge(skinParam(), getStringBounder(), list, inner, swimlane); } else if (style == ForkStyle.FORK) { builder = new ParallelBuilderFork(skinParam(), getStringBounder(), list, inner, swimlane, label); } else { throw new IllegalStateException(); } return builder.build(); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileFactoryDelegatorCreateParallel1.java�����������������������������������������������������������0000664�0000000�0000000�00000005223�13126503031�0037467�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.util.List; import net.sourceforge.plantuml.activitydiagram3.ForkStyle; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; public class FtileFactoryDelegatorCreateParallel1 extends FtileFactoryDelegator { public FtileFactoryDelegatorCreateParallel1(FtileFactory factory) { super(factory); } private Ftile allOverlapped(Swimlane swimlane, List all, ForkStyle style, String label) { return new FtileForkInnerOverlapped(all); } @Override public Ftile createParallel(Swimlane swimlane, List list, ForkStyle style, String label) { final Ftile inner = super.createParallel(swimlane, list, style, label); ParallelFtilesBuilder builder; if (style == ForkStyle.SPLIT) { builder = new ParallelBuilderSplit(skinParam(), getStringBounder(), list, inner, swimlane); } else if (style == ForkStyle.MERGE) { builder = new ParallelBuilderMerge(skinParam(), getStringBounder(), list, inner, swimlane); } else if (style == ForkStyle.FORK) { builder = new ParallelBuilderFork(skinParam(), getStringBounder(), list, inner, swimlane, label); } else { throw new IllegalStateException(); } return builder.build(); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileFactoryDelegatorCreateParallelAddingMargin.java������������������������������������������������0000664�0000000�0000000�00000005225�13126503031�0041655�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.activitydiagram3.ForkStyle; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileHeightFixed; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; public class FtileFactoryDelegatorCreateParallelAddingMargin extends FtileFactoryDelegator { private final double spaceArroundBlackBar = 20; private final double xMargin = 14; public FtileFactoryDelegatorCreateParallelAddingMargin(FtileFactory factory) { super(factory); } @Override public Ftile createParallel(Swimlane swimlane, List all, ForkStyle style, String label) { final Dimension2D dimSuper = super.createParallel(swimlane, all, style, label).calculateDimension( getStringBounder()); final double height1 = dimSuper.getHeight() + 2 * spaceArroundBlackBar; final List list = new ArrayList(); for (Ftile tmp : all) { list.add(new FtileHeightFixed(FtileUtils.addHorizontalMargin(tmp, xMargin), height1)); } return super.createParallel(swimlane, list, style, label); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileFactoryDelegatorIf.java������������������������������������������������������������������������0000664�0000000�0000000�00000010206�13126503031�0035061�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.util.List; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.Pragma; import net.sourceforge.plantuml.activitydiagram3.Branch; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond.ConditionalBuilder; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.svek.ConditionStyle; public class FtileFactoryDelegatorIf extends FtileFactoryDelegator { private final Pragma pragma; public FtileFactoryDelegatorIf(FtileFactory factory, Pragma pragma) { super(factory); this.pragma = pragma; } @Override public Ftile createIf(Swimlane swimlane, List thens, Branch elseBranch, LinkRendering afterEndwhile, LinkRendering topInlinkRendering) { final ConditionStyle conditionStyle = skinParam().getConditionStyle(); final Branch branch0 = thens.get(0); final HtmlColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder); final HtmlColor backColor = branch0.getColor() == null ? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground) : branch0.getColor(); final Rainbow arrowColor = HtmlColorAndStyle.build(skinParam()); final FontConfiguration fcArrow = new FontConfiguration(skinParam(), FontParam.ARROW, null); // .changeColor(fontColor(FontParam.ACTIVITY_DIAMOND)); if (thens.size() > 1) { if (pragma.useVerticalIf()/* OptionFlags.USE_IF_VERTICAL */) return FtileIfLongVertical.create(swimlane, borderColor, backColor, arrowColor, getFactory(), conditionStyle, thens, elseBranch, fcArrow, topInlinkRendering, afterEndwhile); return FtileIfLongHorizontal.create(swimlane, borderColor, backColor, arrowColor, getFactory(), conditionStyle, thens, elseBranch, fcArrow, topInlinkRendering, afterEndwhile); } final FontParam testParam = conditionStyle == ConditionStyle.INSIDE ? FontParam.ACTIVITY_DIAMOND : FontParam.ARROW; final FontConfiguration fcTest = new FontConfiguration(skinParam(), testParam, null) .changeColor(fontColor(FontParam.ACTIVITY_DIAMOND)); return ConditionalBuilder.create(swimlane, borderColor, backColor, arrowColor, getFactory(), conditionStyle, thens.get(0), elseBranch, skinParam(), getStringBounder(), fcArrow, fcTest); } private HtmlColor fontColor(FontParam param) { return skinParam().getFontHtmlColor(null, param); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileFactoryDelegatorRepeat.java��������������������������������������������������������������������0000664�0000000�0000000�00000013210�13126503031�0035741�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.util.List; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows; import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileBreak; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.Genealogy; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileFactoryDelegatorRepeat extends FtileFactoryDelegator { public FtileFactoryDelegatorRepeat(FtileFactory factory) { super(factory); } @Override public Ftile repeat(Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, final Ftile repeat, Display test, Display yes, Display out, HtmlColor color, LinkRendering backRepeatLinkRendering, Ftile backward) { final ConditionStyle conditionStyle = skinParam().getConditionStyle(); final HtmlColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder); final HtmlColor backColor = color == null ? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground) : color; final Rainbow arrowColor = HtmlColorAndStyle.build(skinParam()); final LinkRendering endRepeatLinkRendering = repeat.getOutLinkRendering(); final Rainbow endRepeatLinkColor = endRepeatLinkRendering == null ? null : endRepeatLinkRendering.getRainbow(); final FontConfiguration fcDiamond = new FontConfiguration(skinParam(), FontParam.ACTIVITY_DIAMOND, null); final FontConfiguration fcArrow = new FontConfiguration(skinParam(), FontParam.ARROW, null); final Ftile backStart = Display.isNull(startLabel) ? null : this.activity(startLabel, swimlane, BoxStyle.PLAIN, Colors.empty()); Ftile result = FtileRepeat.create(backRepeatLinkRendering, swimlane, swimlaneOut, backStart, repeat, test, yes, out, borderColor, backColor, arrowColor, endRepeatLinkColor, conditionStyle, this.skinParam(), fcDiamond, fcArrow, backward); final List weldingPoints = repeat.getWeldingPoints(); if (weldingPoints.size() > 0) { // printAllChild(repeat); final Ftile diamondBreak = new FtileDiamond(repeat.skinParam(), backColor, borderColor, swimlane); result = assembly(FtileUtils.addHorizontalMargin(result, 10, 0), diamondBreak); final Genealogy genealogy = new Genealogy(result); final FtileBreak ftileBreak = (FtileBreak) weldingPoints.get(0); result = FtileUtils.addConnection(result, new Connection() { public void drawU(UGraphic ug) { final UTranslate tr1 = genealogy.getTranslate(ftileBreak, ug.getStringBounder()); final UTranslate tr2 = genealogy.getTranslate(diamondBreak, ug.getStringBounder()); final Dimension2D dimDiamond = diamondBreak.calculateDimension(ug.getStringBounder()); final Snake snake = new Snake(getFtile1().arrowHorizontalAlignment(), arrowColor, Arrows.asToRight()); snake.addPoint(tr1.getDx(), tr1.getDy()); snake.addPoint(0, tr1.getDy()); snake.addPoint(0, tr2.getDy() + dimDiamond.getHeight() / 2); snake.addPoint(tr2.getDx(), tr2.getDy() + dimDiamond.getHeight() / 2); ug.draw(snake); } public Ftile getFtile1() { return ftileBreak; } public Ftile getFtile2() { return diamondBreak; } }); } return result; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileFactoryDelegatorWhile.java���������������������������������������������������������������������0000664�0000000�0000000�00000007017�13126503031�0035601�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.activitydiagram3.Instruction; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.svek.ConditionStyle; public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator { public FtileFactoryDelegatorWhile(FtileFactory factory) { super(factory); } @Override public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out, LinkRendering afterEndwhile, HtmlColor color, Instruction specialOut) { final HtmlColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder); final HtmlColor backColor = color == null ? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground) : color; final Rainbow arrowColor = HtmlColorAndStyle.build(skinParam()); final ConditionStyle conditionStyle = skinParam().getConditionStyle(); final FontParam testParam = conditionStyle == ConditionStyle.INSIDE ? FontParam.ACTIVITY_DIAMOND : FontParam.ARROW; final FontConfiguration fcTest = new FontConfiguration(skinParam(), testParam, null); final LinkRendering endInlinkRendering = whileBlock.getOutLinkRendering(); final Rainbow endInlinkColor = endInlinkRendering == null || endInlinkRendering.getRainbow().size() == 0 ? arrowColor : endInlinkRendering.getRainbow(); final FontConfiguration fontArrow = new FontConfiguration(skinParam(), FontParam.ARROW, null); return FtileWhile.create(swimlane, whileBlock, test, borderColor, backColor, arrowColor, yes, out, endInlinkColor, afterEndwhile, fontArrow, getFactory(), conditionStyle, fcTest, specialOut); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInner.java�0000664�0000000�0000000�00000007313�13126503031�0033325�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; class FtileForkInner extends AbstractFtile { private final List forks = new ArrayList(); public FtileForkInner(List forks) { super(forks.get(0).skinParam()); for (Ftile ftile : forks) { this.forks.add(ftile); } } public Swimlane getSwimlaneIn() { return forks.get(0).getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return getSwimlaneIn(); } public Set getSwimlanes() { return mergeSwimlanes(forks); } public static Set mergeSwimlanes(List tiles) { final Set result = new HashSet(); for (Ftile tile : tiles) { result.addAll(tile.getSwimlanes()); } return Collections.unmodifiableSet(result); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); double xpos = 0; for (Ftile ftile : forks) { ug.apply(new UTranslate(xpos, 0)).draw(ftile); final Dimension2D dim = ftile.calculateDimension(stringBounder); xpos += dim.getWidth(); } } public FtileGeometry calculateDimension(StringBounder stringBounder) { double height = 0; double width = 0; for (Ftile ftile : forks) { final Dimension2D dim = ftile.calculateDimension(stringBounder); width += dim.getWidth(); if (dim.getHeight() > height) { height = dim.getHeight(); } } final Dimension2D dimTotal = new Dimension2DDouble(width, height); return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0, dimTotal.getHeight()); } public UTranslate getTranslateFor(Ftile searched, StringBounder stringBounder) { double xpos = 0; for (Ftile ftile : forks) { if (ftile == searched) { return new UTranslate(xpos, 0); } final Dimension2D dim = ftile.calculateDimension(stringBounder); xpos += dim.getWidth(); } throw new IllegalArgumentException(); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileForkInnerOverlapped.java�����������������������������������������������������������������������0000664�0000000�0000000�00000007451�13126503031�0035273�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; class FtileForkInnerOverlapped extends AbstractFtile { private final List forks = new ArrayList(); public FtileForkInnerOverlapped(List forks) { super(forks.get(0).skinParam()); for (Ftile ftile : forks) { this.forks.add(ftile); } } public Swimlane getSwimlaneIn() { return forks.get(0).getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return getSwimlaneIn(); } public Set getSwimlanes() { return mergeSwimlanes(forks); } public static Set mergeSwimlanes(List tiles) { final Set result = new HashSet(); for (Ftile tile : tiles) { result.addAll(tile.getSwimlanes()); } return Collections.unmodifiableSet(result); } public void drawU(UGraphic ug) { // final StringBounder stringBounder = ug.getStringBounder(); final double xpos = 0; for (Ftile ftile : forks) { ug.apply(new UTranslate(xpos, 0)).draw(ftile); // final Dimension2D dim = ftile.calculateDimension(stringBounder); // xpos += dim.getWidth(); } } public FtileGeometry calculateDimension(StringBounder stringBounder) { double height = 0; double width = 0; for (Ftile ftile : forks) { final Dimension2D dim = ftile.calculateDimension(stringBounder); // width += dim.getWidth(); width = Math.max(width, dim.getWidth()); if (dim.getHeight() > height) { height = dim.getHeight(); } } final Dimension2D dimTotal = new Dimension2DDouble(width, height); return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0, dimTotal.getHeight()); } public UTranslate getTranslateFor(Ftile searched, StringBounder stringBounder) { final double xpos = 0; for (Ftile ftile : forks) { if (ftile == searched) { return new UTranslate(xpos, 0); } // final Dimension2D dim = ftile.calculateDimension(stringBounder); // xpos += dim.getWidth(); } throw new IllegalArgumentException(); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java�����0000664�0000000�0000000�00000017527�13126503031�0032534�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.util.Set; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.UGraphicInterceptorUDrawable; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.svek.UGraphicForSnake; import net.sourceforge.plantuml.ugraphic.LimitFinder; import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.utils.MathUtils; public class FtileGroup extends AbstractFtile { private final double diffYY2 = 20; private final Ftile inner; private final TextBlock name; private final TextBlock headerNote; private final HtmlColor borderColor; private final HtmlColor backColor; private final UStroke stroke; public FtileGroup(Ftile inner, Display title, Display displayNote, HtmlColor arrowColor, HtmlColor backColor, HtmlColor titleColor, ISkinParam skinParam, HtmlColor borderColor) { super(inner.skinParam()); this.backColor = backColor == null ? HtmlColorUtils.WHITE : backColor; this.inner = FtileUtils.addHorizontalMargin(inner, 10); this.borderColor = backColor == null ? HtmlColorUtils.BLACK : borderColor; final UFont font = skinParam.getFont(null, false, FontParam.PARTITION); final HtmlColor fontColor = skinParam.getFontHtmlColor(null, FontParam.PARTITION); final FontConfiguration fc = new FontConfiguration(font, fontColor, skinParam.getHyperlinkColor(), skinParam.useUnderlineForHyperlink(), skinParam.getTabSize()); if (title == null) { this.name = TextBlockUtils.empty(0, 0); } else { this.name = title.create(fc, HorizontalAlignment.LEFT, skinParam); } if (Display.isNull(displayNote)) { this.headerNote = TextBlockUtils.empty(0, 0); } else { this.headerNote = new FloatingNote(displayNote, skinParam); } final UStroke thickness = skinParam.getThickness(LineParam.partitionBorder, null); this.stroke = thickness == null ? new UStroke(2) : thickness; } @Override public LinkRendering getInLinkRendering() { return inner.getInLinkRendering(); } public Set getSwimlanes() { return inner.getSwimlanes(); } public Swimlane getSwimlaneIn() { return inner.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return inner.getSwimlaneOut(); } private double diffHeightTitle(StringBounder stringBounder) { final Dimension2D dimTitle = name.calculateDimension(stringBounder); return Math.max(25, dimTitle.getHeight() + 20); } private UTranslate getTranslate(StringBounder stringBounder) { final double suppWidth = suppWidth(stringBounder); return new UTranslate(suppWidth / 2, diffHeightTitle(stringBounder) + headerNoteHeight(stringBounder)); } private static MinMax getMinMax(TextBlock tb, StringBounder stringBounder) { final LimitFinder limitFinder = new LimitFinder(stringBounder, false); final UGraphicForSnake interceptor = new UGraphicForSnake(limitFinder); final UGraphicInterceptorUDrawable interceptor2 = new UGraphicInterceptorUDrawable(interceptor); tb.drawU(interceptor2); interceptor2.flushUg(); return limitFinder.getMinMax(); } public double suppWidth(StringBounder stringBounder) { final FtileGeometry orig = getInnerDimension(stringBounder); final Dimension2D dimTitle = name.calculateDimension(stringBounder); final Dimension2D dimHeaderNote = headerNote.calculateDimension(stringBounder); final double suppWidth = MathUtils .max(orig.getWidth(), dimTitle.getWidth() + 20, dimHeaderNote.getWidth() + 20) - orig.getWidth(); return suppWidth; } private FtileGeometry getInnerDimension(StringBounder stringBounder) { final FtileGeometry orig = inner.calculateDimension(stringBounder); final MinMax minMax = getMinMax(inner, stringBounder); final double missingWidth = minMax.getMaxX() - orig.getWidth(); if (missingWidth > 0) { return orig.addDim(missingWidth + 5, 0); } return orig; } public FtileGeometry calculateDimension(StringBounder stringBounder) { final FtileGeometry orig = getInnerDimension(stringBounder); final double suppWidth = suppWidth(stringBounder); final double width = orig.getWidth() + suppWidth; final double height = orig.getHeight() + diffHeightTitle(stringBounder) + diffYY2 + headerNoteHeight(stringBounder); final double titleAndHeaderNoteHeight = diffHeightTitle(stringBounder) + headerNoteHeight(stringBounder); if (orig.hasPointOut()) { return new FtileGeometry(width, height, orig.getLeft() + suppWidth / 2, orig.getInY() + titleAndHeaderNoteHeight, orig.getOutY() + titleAndHeaderNoteHeight); } return new FtileGeometry(width, height, orig.getLeft() + suppWidth / 2, orig.getInY() + titleAndHeaderNoteHeight); } private double headerNoteHeight(StringBounder stringBounder) { return headerNote.calculateDimension(stringBounder).getHeight(); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimTotal = calculateDimension(stringBounder); final SymbolContext symbolContext = new SymbolContext(backColor, borderColor).withShadow( skinParam().shadowing()).withStroke(stroke); USymbol.FRAME.asBig(name, TextBlockUtils.empty(0, 0), dimTotal.getWidth(), dimTotal.getHeight(), symbolContext) .drawU(ug); final Dimension2D dimHeaderNote = headerNote.calculateDimension(stringBounder); headerNote.drawU(ug.apply(new UTranslate(dimTotal.getWidth() - dimHeaderNote.getWidth() - 10, diffHeightTitle(ug.getStringBounder()) - 10))); ug.apply(getTranslate(stringBounder)).draw(inner); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfAndStop.java�0000664�0000000�0000000�00000031363�13126503031�0033261�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.activitydiagram3.Branch; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.Diamond; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInside; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.CreoleParser; import net.sourceforge.plantuml.creole.Sheet; import net.sourceforge.plantuml.creole.SheetBlock1; import net.sourceforge.plantuml.creole.SheetBlock2; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; class FtileIfAndStop extends AbstractFtile { private final Ftile tile1; private final Ftile diamond1; private final Ftile stop2; private final Rainbow arrowColor; private FtileIfAndStop(Ftile diamond1, Ftile tile1, Rainbow arrowColor, Ftile stopFtile) { super(tile1.skinParam()); this.diamond1 = diamond1; this.tile1 = tile1; this.stop2 = stopFtile; this.arrowColor = arrowColor; } public Set getSwimlanes() { final Set result = new HashSet(); if (getSwimlaneIn() != null) { result.add(getSwimlaneIn()); } result.addAll(tile1.getSwimlanes()); return Collections.unmodifiableSet(result); } public Swimlane getSwimlaneIn() { return diamond1.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return getSwimlaneIn(); } static Ftile create(Swimlane swimlane, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor, FtileFactory ftileFactory, ConditionStyle conditionStyle, Branch nonStop, ISkinParam skinParam, StringBounder stringBounder, Display labelTest) { // backColor = HtmlColorUtils.BLUE; // final Ftile tileNonStop = new FtileMinWidth(nonStop.getFtile(), 30); final Ftile tileNonStop = nonStop.getFtile(); final FontConfiguration fcTest = new FontConfiguration(skinParam, FontParam.ACTIVITY_DIAMOND, null); final Ftile stopFtile = ftileFactory.stop(swimlane); // final TextBlock tb1 = Display.create(branch1.getLabelPositive(), fcArrow, HorizontalAlignment.LEFT, // ftileFactory); // final TextBlock tb2 = Display.create(branch2.getLabelPositive(), fcArrow, HorizontalAlignment.LEFT, // ftileFactory); final Sheet sheet = new CreoleParser(fcTest, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL).createSheet(labelTest); final SheetBlock1 sheetBlock1 = new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()); final TextBlock tbTest = new SheetBlock2(sheetBlock1, Diamond.asStencil(sheetBlock1), tileNonStop.getThickness()); final Ftile diamond1; if (conditionStyle == ConditionStyle.INSIDE) { diamond1 = new FtileDiamondInside(tileNonStop.skinParam(), backColor, borderColor, swimlane, tbTest); // .withWest(tb1).withEast(tb2); } else if (conditionStyle == ConditionStyle.DIAMOND) { diamond1 = new FtileDiamond(tileNonStop.skinParam(), backColor, borderColor, swimlane).withNorth(tbTest); // .withWest(tb1).withEast(tb2).withNorth(tbTest); } else { throw new IllegalStateException(); } // final Ftile diamond2; // if (tile1.calculateDimension(stringBounder).hasPointOut() // && tile2.calculateDimension(stringBounder).hasPointOut()) { // diamond2 = new FtileDiamond(tile1.shadowing(), backColor, borderColor, swimlane); // } else { // diamond2 = new FtileEmpty(tile1.shadowing(), Diamond.diamondHalfSize * 2, Diamond.diamondHalfSize * 2, // swimlane, swimlane); // } final FtileIfAndStop result = new FtileIfAndStop(diamond1, tileNonStop, arrowColor, stopFtile); final List conns = new ArrayList(); conns.add(result.new ConnectionHorizontal(arrowColor)); // conns.add(result.new ConnectionHorizontalThenVertical(tile2)); // if (tile1.calculateDimension(stringBounder).hasPointOut() // && tile2.calculateDimension(stringBounder).hasPointOut()) { // conns.add(result.new ConnectionVerticalThenHorizontal(tile1, branch1.getInlinkRenderingColor())); // conns.add(result.new ConnectionVerticalThenHorizontal(tile2, branch2.getInlinkRenderingColor())); // } else if (tile1.calculateDimension(stringBounder).hasPointOut() // && tile2.calculateDimension(stringBounder).hasPointOut() == false) { // conns.add(result.new ConnectionVerticalThenHorizontalDirect(tile1, branch1.getInlinkRenderingColor())); // } else if (tile1.calculateDimension(stringBounder).hasPointOut() == false // && tile2.calculateDimension(stringBounder).hasPointOut()) { // conns.add(result.new ConnectionVerticalThenHorizontalDirect(tile2, branch2.getInlinkRenderingColor())); // } return FtileUtils.addConnection(result, conns); // return result; } private UTranslate getTranslate1(StringBounder stringBounder) { // final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final FtileGeometry dimTotal = calculateDimension(stringBounder); final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final FtileGeometry dim1 = tile1.calculateDimension(stringBounder); final double x1 = calculateDimension(stringBounder).getLeft() - dim1.getLeft(); // final double y1 = (dimTotal.getHeight() - 2 * h - dim1.getHeight()) / 2 + h; final double y1 = dimDiamond1.getHeight() + getSuppHeight(); return new UTranslate(x1, y1); } private int getSuppHeight() { return 30; } private UTranslate getTranslateDiamond1(StringBounder stringBounder) { final double y1 = 0; final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); // final double x1 = getLeft(stringBounder) - dimDiamond1.getWidth() / 2; final double x1 = calculateDimension(stringBounder).getLeft() - dimDiamond1.getWidth() / 2; return new UTranslate(x1, y1); } private UTranslate getTranslateStop(StringBounder stringBounder) { final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); final Dimension2D dimStop = stop2.calculateDimension(stringBounder); final double y1 = (dimDiamond1.getHeight() - dimStop.getHeight()) / 2; final double x1 = calculateDimension(stringBounder).getLeft() + dimDiamond1.getWidth() / 2 + getDiamondStopDistance(); return new UTranslate(x1, y1); } private double getDiamondStopDistance() { return 40; } class ConnectionHorizontal extends AbstractConnection { private final Rainbow color; public ConnectionHorizontal(Rainbow color) { super(diamond1, stop2); this.color = color; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final Snake snake = new Snake(arrowHorizontalAlignment(), color, Arrows.asToRight()); snake.addPoint(p1); snake.addPoint(p2); ug.draw(snake); } private Point2D getP1(StringBounder stringBounder) { final Dimension2D dimDiamond1 = getFtile1().calculateDimension(stringBounder); final Point2D p = new Point2D.Double(dimDiamond1.getWidth(), dimDiamond1.getHeight() / 2); return getTranslateDiamond1(stringBounder).getTranslated(p); } private Point2D getP2(StringBounder stringBounder) { final Dimension2D dimStop = getFtile2().calculateDimension(stringBounder); final Point2D p = new Point2D.Double(0, dimStop.getHeight() / 2); return getTranslateStop(stringBounder).getTranslated(p); } } @Override public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) { if (child == diamond1) { return getTranslateDiamond1(stringBounder); } if (child == tile1) { return getTranslate1(stringBounder); } // if (child == tile2) { // return getTranslate2(stringBounder); // } // if (child == diamond2) { // return getTranslateDiamond2(stringBounder); // } throw new UnsupportedOperationException(); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); ug.apply(getTranslateDiamond1(stringBounder)).draw(diamond1); ug.apply(getTranslate1(stringBounder)).draw(tile1); ug.apply(getTranslateStop(stringBounder)).draw(stop2); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final Dimension2D dimStop2 = stop2.calculateDimension(stringBounder); final FtileGeometry dim1 = tile1.calculateDimension(stringBounder).addDim(0, getDiamondStopDistance() + dimStop2.getWidth()); final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); return dimDiamond1.appendBottom(dim1).addDim(0, getSuppHeight()); // final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); // if (tile1.calculateDimension(stringBounder).hasPointOut()) { // return new FtileGeometry(dimTotal, getLeft(stringBounder), 0, dimTotal.getHeight()); // } // return new FtileGeometry(dimTotal, getLeft(stringBounder), 0); } // private Dimension2D calculateDimensionInternal; // // private Dimension2D calculateDimensionInternal(StringBounder stringBounder) { // if (calculateDimensionInternal == null) { // calculateDimensionInternal = calculateDimensionInternalSlow(stringBounder); // } // return calculateDimensionInternal; // } // // private Dimension2D calculateDimensionInternalSlow(StringBounder stringBounder) { // final Dimension2D dim1 = tile1.calculateDimension(stringBounder); // final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); // final Dimension2D dimStop2 = stop2.calculateDimension(stringBounder); // final double width = Math.max(dim1.getWidth(), // dimDiamond1.getWidth() + getDiamondStopDistance() + dimStop2.getWidth()); // return new Dimension2DDouble(width + 30, dim1.getHeight() + dimDiamond1.getHeight() + 40); // } // // private double getLeft(StringBounder stringBounder) { // // return calculateDimension(stringBounder).getLeft(); // return tile1.calculateDimension(stringBounder).translate(getTranslate1(stringBounder)).getLeft(); // // final double left1 = // tile1.calculateDimension(stringBounder).translate(getTranslate1(stringBounder)).getLeft(); // // // final double left2 = // // // tile2.calculateDimension(stringBounder).translate(getTranslate2(stringBounder)).getLeft(); // // // return (left1 + left2) / 2; // // return left1; // } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfDown.java����0000664�0000000�0000000�00000040012�13126503031�0032607�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.ConnectionTranslatable; import net.sourceforge.plantuml.activitydiagram3.ftile.Diamond; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileEmpty; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInside; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UEmpty; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileIfDown extends AbstractFtile { private final Ftile thenBlock; private final Ftile diamond1; private final Ftile diamond2; private final Ftile optionalStop; @Override public Collection getMyChildren() { if (optionalStop == null) { return Arrays.asList(thenBlock, diamond1, diamond2); } return Arrays.asList(thenBlock, diamond1, diamond2, optionalStop); } public Set getSwimlanes() { final Set result = new HashSet(thenBlock.getSwimlanes()); result.add(getSwimlaneIn()); return result; } public Swimlane getSwimlaneIn() { return diamond1.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { if (optionalStop == null) { return getSwimlaneIn(); } return thenBlock.getSwimlaneOut(); } private FtileIfDown(Ftile thenBlock, Ftile diamond1, Ftile diamond2, Ftile optionalStop) { super(thenBlock.skinParam()); this.thenBlock = thenBlock; this.diamond1 = diamond1; this.diamond2 = diamond2; this.optionalStop = optionalStop; } public static Ftile create(Ftile diamond1, Ftile diamond2, Swimlane swimlane, Ftile thenBlock, Rainbow arrowColor, FtileFactory ftileFactory, Ftile optionalStop, Rainbow elseColor) { elseColor = elseColor.withDefault(arrowColor); final FtileIfDown result = new FtileIfDown(thenBlock, diamond1, optionalStop == null ? diamond2 : new FtileEmpty(ftileFactory.skinParam()), optionalStop); final List conns = new ArrayList(); conns.add(result.new ConnectionIn(thenBlock.getInLinkRendering().getRainbow(arrowColor))); final boolean hasPointOut1 = thenBlock.calculateDimension(ftileFactory.getStringBounder()).hasPointOut(); if (optionalStop == null) { if (hasPointOut1) { conns.add(result.new ConnectionElse(elseColor)); } else { conns.add(result.new ConnectionElseNoDiamond(elseColor)); } } else { conns.add(result.new ConnectionHorizontal(elseColor)); } conns.add(result.new ConnectionOut(thenBlock.getOutLinkRendering().getRainbow(arrowColor))); return FtileUtils.addConnection(result, conns); } class ConnectionHorizontal extends AbstractConnection { private final Rainbow color; public ConnectionHorizontal(Rainbow color) { super(diamond1, optionalStop); this.color = color; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); // p2 = new Point2D.Double(p2.getX(), p1.getY()); final Snake snake = new Snake(arrowHorizontalAlignment(), color, Arrows.asToRight()); snake.addPoint(p1); snake.addPoint(p2); ug.draw(snake); } private Point2D getP1(StringBounder stringBounder) { final FtileGeometry dimDiamond1 = getFtile1().calculateDimension(stringBounder); final Point2D p = new Point2D.Double(dimDiamond1.getWidth(), (dimDiamond1.getInY() + dimDiamond1.getOutY()) / 2); return getTranslateDiamond1(stringBounder).getTranslated(p); } private Point2D getP2(StringBounder stringBounder) { final Dimension2D dimStop = getFtile2().calculateDimension(stringBounder); final Point2D p = new Point2D.Double(0, dimStop.getHeight() / 2); return getTranslateOptionalStop(stringBounder).getTranslated(p); } } class ConnectionIn extends AbstractConnection implements ConnectionTranslatable { private final Rainbow arrowColor; public ConnectionIn(Rainbow arrowColor) { super(diamond1, thenBlock); this.arrowColor = arrowColor; } private Point2D getP1(final StringBounder stringBounder) { return getTranslateDiamond1(stringBounder).getTranslated( getFtile1().calculateDimension(stringBounder).getPointOut()); } private Point2D getP2(final StringBounder stringBounder) { return getTranslateForThen(stringBounder).getTranslated( getFtile2().calculateDimension(stringBounder).getPointIn()); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); snake.addPoint(getP1(stringBounder)); snake.addPoint(getP2(stringBounder)); ug.draw(snake); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { final StringBounder stringBounder = ug.getStringBounder(); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); final Point2D mp1a = translate1.getTranslated(p1); final Point2D mp2b = translate2.getTranslated(p2); final double middle = (mp1a.getY() + mp2b.getY()) / 2.0; snake.addPoint(mp1a); snake.addPoint(mp1a.getX(), middle); snake.addPoint(mp2b.getX(), middle); snake.addPoint(mp2b); ug.draw(snake); } } class ConnectionOut extends AbstractConnection implements ConnectionTranslatable { private final Rainbow arrowColor; public ConnectionOut(Rainbow arrowColor) { super(thenBlock, diamond2); this.arrowColor = arrowColor; } private Point2D getP1(final StringBounder stringBounder) { return getTranslateForThen(stringBounder).getTranslated( getFtile1().calculateDimension(stringBounder).getPointOut()); } private Point2D getP2(final StringBounder stringBounder) { return getTranslateDiamond2(stringBounder).getTranslated( getFtile2().calculateDimension(stringBounder).getPointIn()); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); if (getFtile1().calculateDimension(ug.getStringBounder()).hasPointOut() == false) { return; } final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); snake.addPoint(getP1(stringBounder)); snake.addPoint(getP2(stringBounder)); ug.draw(snake); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { if (getFtile1().calculateDimension(ug.getStringBounder()).hasPointOut() == false) { return; } final StringBounder stringBounder = ug.getStringBounder(); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); final Point2D mp1a = translate1.getTranslated(p1); final Point2D mp2b = translate2.getTranslated(p2); final double middle = (mp1a.getY() + mp2b.getY()) / 2.0; snake.addPoint(mp1a); snake.addPoint(mp1a.getX(), middle); snake.addPoint(mp2b.getX(), middle); snake.addPoint(mp2b); ug.draw(snake); } } class ConnectionElse extends AbstractConnection { private final Rainbow endInlinkColor; public ConnectionElse(Rainbow endInlinkColor) { super(diamond1, diamond2); this.endInlinkColor = endInlinkColor; } private Point2D getP1(StringBounder stringBounder) { final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final double x = dimDiamond1.getWidth(); final double half = (dimDiamond1.getOutY() - dimDiamond1.getInY()) / 2; return getTranslateDiamond1(stringBounder) .getTranslated(new Point2D.Double(x, dimDiamond1.getInY() + half)); } protected Point2D getP2(final StringBounder stringBounder) { final FtileGeometry dimDiamond2 = diamond2.calculateDimension(stringBounder); final double x = dimDiamond2.getWidth(); final double half = (dimDiamond2.getOutY() - dimDiamond2.getInY()) / 2; return getTranslateDiamond2(stringBounder) .getTranslated(new Point2D.Double(x, dimDiamond2.getInY() + half)); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Snake snake = new Snake(arrowHorizontalAlignment(), endInlinkColor, Arrows.asToLeft()); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final double x1 = p1.getX(); final double y1 = p1.getY(); final double x2 = p2.getX(); final double y2 = p2.getY(); snake.addPoint(x1, y1); final FtileGeometry thenGeom = thenBlock.calculateDimension(stringBounder); final double xmax = Math.max(x1 + Diamond.diamondHalfSize, getTranslateForThen(stringBounder).getDx() + thenGeom.getWidth()); snake.addPoint(xmax, y1); snake.addPoint(xmax, y2); snake.addPoint(x2, y2); snake.emphasizeDirection(Direction.DOWN); ug.apply(new UTranslate(x2, y2 - Diamond.diamondHalfSize)).draw(new UEmpty(5, Diamond.diamondHalfSize)); ug.draw(snake); } } class ConnectionElseNoDiamond extends ConnectionElse { public ConnectionElseNoDiamond(Rainbow endInlinkColor) { super(endInlinkColor); } @Override protected Point2D getP2(final StringBounder stringBounder) { return calculateDimension(stringBounder).getPointOut(); } } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); ug.apply(getTranslateForThen(stringBounder)).draw(thenBlock); ug.apply(getTranslateDiamond1(stringBounder)).draw(diamond1); if (optionalStop == null) { ug.apply(getTranslateDiamond2(stringBounder)).draw(diamond2); } else { ug.apply(getTranslateOptionalStop(stringBounder)).draw(optionalStop); } } public FtileGeometry calculateDimension(StringBounder stringBounder) { final FtileGeometry geoDiamond1 = diamond1.calculateDimension(stringBounder); final FtileGeometry geoThen = thenBlock.calculateDimension(stringBounder); final FtileGeometry geoDiamond2 = diamond2.calculateDimension(stringBounder); final FtileGeometry geo = geoDiamond1.appendBottom(geoThen).appendBottom(geoDiamond2); final double height = geo.getHeight() + 3 * Diamond.diamondHalfSize + Math.max(Diamond.diamondHalfSize * 1, getSouthLabelHeight(stringBounder)); double width = geo.getWidth() + Diamond.diamondHalfSize; if (optionalStop != null) { width += optionalStop.calculateDimension(stringBounder).getWidth() + getAdditionalWidth(stringBounder); } return new FtileGeometry(width, height, geo.getLeft(), geoDiamond1.getInY(), height); } private double getAdditionalWidth(StringBounder stringBounder) { final FtileGeometry dimStop = optionalStop.calculateDimension(stringBounder); final double val1 = getEastLabelWidth(stringBounder); final double stopWidth = dimStop.getWidth(); return Math.max(stopWidth, val1 + stopWidth / 2); } private double getSouthLabelHeight(StringBounder stringBounder) { if (diamond1 instanceof FtileDiamondInside) { return ((FtileDiamondInside) diamond1).getSouthLabelHeight(stringBounder); } if (diamond1 instanceof FtileDiamond) { return ((FtileDiamond) diamond1).getSouthLabelHeight(stringBounder); } return 0; } private double getEastLabelWidth(StringBounder stringBounder) { if (diamond1 instanceof FtileDiamondInside) { return ((FtileDiamondInside) diamond1).getEastLabelWidth(stringBounder); } if (diamond1 instanceof FtileDiamond) { return ((FtileDiamond) diamond1).getEastLabelWidth(stringBounder); } return 0; } @Override public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) { if (child == thenBlock) { return getTranslateForThen(stringBounder); } if (child == diamond1) { return getTranslateDiamond1(stringBounder); } if (child == optionalStop) { return getTranslateOptionalStop(stringBounder); } if (child == diamond2) { return getTranslateDiamond2(stringBounder); } throw new UnsupportedOperationException(); } private UTranslate getTranslateForThen(StringBounder stringBounder) { final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final FtileGeometry dimDiamond2 = diamond2.calculateDimension(stringBounder); final FtileGeometry dimTotal = calculateDimension(stringBounder); final FtileGeometry dimThen = thenBlock.calculateDimension(stringBounder); final double y = dimDiamond1.getHeight() + (dimTotal.getHeight() - dimDiamond1.getHeight() - dimDiamond2.getHeight() - dimThen.getHeight()) / 2; final double x = dimTotal.getLeft() - dimThen.getLeft(); return new UTranslate(x, y); } private UTranslate getTranslateDiamond1(StringBounder stringBounder) { final FtileGeometry dimTotal = calculateDimension(stringBounder); final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final double y1 = 0; final double x1 = dimTotal.getLeft() - dimDiamond1.getLeft(); return new UTranslate(x1, y1); } private UTranslate getTranslateOptionalStop(StringBounder stringBounder) { final FtileGeometry dimTotal = calculateDimension(stringBounder); final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final FtileGeometry dimStop = optionalStop.calculateDimension(stringBounder); final double labelNorth = dimDiamond1.getInY(); final double y1 = labelNorth + (dimDiamond1.getHeight() - labelNorth - dimStop.getHeight()) / 2; final double x1 = dimTotal.getLeft() - dimDiamond1.getLeft() + dimDiamond1.getWidth() + getAdditionalWidth(stringBounder); return new UTranslate(x1, y1); } private UTranslate getTranslateDiamond2(StringBounder stringBounder) { final FtileGeometry dimTotal = calculateDimension(stringBounder); final FtileGeometry dimDiamond2 = diamond2.calculateDimension(stringBounder); final double y2 = dimTotal.getHeight() - dimDiamond2.getHeight(); final double x2 = dimTotal.getLeft() - dimDiamond2.getLeft(); return new UTranslate(x2, y2); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileIfLongHorizontal.java��������������������������������������������������������������������������0000664�0000000�0000000�00000047760�13126503031�0034613�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.activitydiagram3.Branch; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.ConnectionTranslatable; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileAssemblySimple; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileMinWidth; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.MergeStrategy; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond.FtileIfWithLinks; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInside2; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; class FtileIfLongHorizontal extends AbstractFtile { private final double xSeparation = 20; private final List tiles; private final Ftile tile2; private final List diamonds; private final List couples = new ArrayList(); private final Rainbow arrowColor; private FtileIfLongHorizontal(List diamonds, List inlabelSizes, List tiles, Ftile tile2, Rainbow arrowColor) { super(tiles.get(0).skinParam()); if (diamonds.size() != tiles.size()) { throw new IllegalArgumentException(); } for (int i = 0; i < diamonds.size(); i++) { final Ftile diamond = diamonds.get(i); final FtileAssemblySimple tmp = new FtileAssemblySimple(diamond, tiles.get(i)); couples.add(FtileUtils.addHorizontalMargin(tmp, inlabelSizes.get(i), 0)); } this.tile2 = tile2; this.diamonds = new ArrayList(diamonds); this.tiles = new ArrayList(tiles); this.arrowColor = arrowColor; } private static List alignDiamonds(List diamonds, StringBounder stringBounder) { double maxOutY = 0; for (Ftile diamond : diamonds) { maxOutY = Math.max(maxOutY, diamond.calculateDimension(stringBounder).getOutY()); } final List result = new ArrayList(); for (int i = 0; i < diamonds.size(); i++) { Ftile diamond = diamonds.get(i); final double missing = maxOutY - diamond.calculateDimension(stringBounder).getOutY(); assert missing >= 0; diamond = FtileUtils.addVerticalMargin(diamond, missing / 2, 20); result.add(diamond); } return result; } public Set getSwimlanes() { final Set result = new HashSet(); if (getSwimlaneIn() != null) { result.add(getSwimlaneIn()); } for (Ftile tile : couples) { result.addAll(tile.getSwimlanes()); } result.addAll(tile2.getSwimlanes()); return Collections.unmodifiableSet(result); } public Swimlane getSwimlaneIn() { return couples.get(0).getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return getSwimlaneIn(); } static Ftile create(Swimlane swimlane, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor, FtileFactory ftileFactory, ConditionStyle conditionStyle, List thens, Branch branch2, FontConfiguration fc, LinkRendering topInlinkRendering, LinkRendering afterEndwhile) { if (afterEndwhile == null) { throw new IllegalArgumentException(); } final List tiles = new ArrayList(); for (Branch branch : thens) { tiles.add(new FtileMinWidth(branch.getFtile(), 30)); } final Ftile tile2 = new FtileMinWidth(branch2.getFtile(), 30); List diamonds = new ArrayList(); List inlabelSizes = new ArrayList(); for (Branch branch : thens) { final TextBlock tb1 = branch.getLabelPositive().create(fc, HorizontalAlignment.LEFT, ftileFactory.skinParam()); final TextBlock tbTest = branch.getLabelTest().create(fc, HorizontalAlignment.LEFT, ftileFactory.skinParam()); final HtmlColor diamondColor = branch.getColor() == null ? backColor : branch.getColor(); FtileDiamondInside2 diamond = new FtileDiamondInside2(branch.skinParam(), diamondColor, borderColor, swimlane, tbTest); TextBlock tbInlabel = null; if (Display.isNull(branch.getInlabel())) { inlabelSizes.add(0.0); } else { tbInlabel = branch.getInlabel().create(fc, HorizontalAlignment.LEFT, ftileFactory.skinParam()); inlabelSizes.add(tbInlabel.calculateDimension(ftileFactory.getStringBounder()).getWidth()); diamond = diamond.withWest(tbInlabel); } diamond = diamond.withNorth(tb1); diamonds.add(diamond); } final TextBlock tb2 = branch2.getLabelPositive().create(fc, HorizontalAlignment.LEFT, ftileFactory.skinParam()); final int last = diamonds.size() - 1; diamonds.set(last, ((FtileDiamondInside2) diamonds.get(last)).withEast(tb2)); diamonds = alignDiamonds(diamonds, ftileFactory.getStringBounder()); final FtileIfLongHorizontal result = new FtileIfLongHorizontal(diamonds, inlabelSizes, tiles, tile2, arrowColor); final List conns = new ArrayList(); for (int i = 0; i < thens.size(); i++) { final Ftile ftile = tiles.get(i); final Ftile diam = diamonds.get(i); final Rainbow rainbowIn = FtileIfWithLinks.getInColor(thens.get(i), arrowColor); final Branch branch = thens.get(i); final Rainbow rainbowOut = branch.getInlinkRenderingColorAndStyle(); conns.add(result.new ConnectionVerticalIn(diam, ftile, rainbowIn.size() == 0 ? arrowColor : rainbowIn)); conns.add(result.new ConnectionVerticalOut(ftile, rainbowOut.size() == 0 ? arrowColor : rainbowOut)); } final Rainbow topInColor = topInlinkRendering.getRainbow(arrowColor); for (int i = 0; i < diamonds.size() - 1; i++) { final Ftile diam1 = diamonds.get(i); final Ftile diam2 = diamonds.get(i + 1); conns.add(result.new ConnectionHorizontal(diam1, diam2, arrowColor)); } conns.add(result.new ConnectionIn(topInColor)); conns.add(result.new ConnectionLastElseIn(FtileIfWithLinks.getInColor(branch2, arrowColor))); conns.add(result.new ConnectionLastElseOut(arrowColor)); final Rainbow horizontalOutColor = afterEndwhile.getRainbow(arrowColor); conns.add(result.new ConnectionHline(horizontalOutColor)); // conns.add(result.new ConnectionHline(HtmlColorUtils.BLUE)); return FtileUtils.addConnection(result, conns); } class ConnectionHorizontal extends AbstractConnection { private final Rainbow color; public ConnectionHorizontal(Ftile diam1, Ftile diam2, Rainbow color) { super(diam1, diam2); this.color = color; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final Snake snake = new Snake(arrowHorizontalAlignment(), color, Arrows.asToRight()); snake.addPoint(p1); snake.addPoint(p2); ug.draw(snake); } private Point2D getP1(StringBounder stringBounder) { final FtileGeometry dimDiamond1 = getFtile1().calculateDimension(stringBounder); final Point2D p = new Point2D.Double(dimDiamond1.getLeft() * 2, getYdiamontOutToLeft(dimDiamond1, stringBounder)); return getTranslateDiamond1(getFtile1(), stringBounder).getTranslated(p); } private Point2D getP2(StringBounder stringBounder) { final FtileGeometry dimDiamond1 = getFtile2().calculateDimension(stringBounder); final Point2D p = new Point2D.Double(0, getYdiamontOutToLeft(dimDiamond1, stringBounder)); return getTranslateDiamond1(getFtile2(), stringBounder).getTranslated(p); } } static private double getYdiamontOutToLeft(FtileGeometry dimDiamond1, StringBounder stringBounder) { return (dimDiamond1.getInY() + dimDiamond1.getOutY()) / 2; } class ConnectionIn extends AbstractConnection { private final Rainbow arrowColor; public ConnectionIn(Rainbow arrowColor) { super(null, diamonds.get(0)); this.arrowColor = arrowColor; } public void drawU(UGraphic ug) { final UTranslate tr = getTranslateDiamond1(getFtile2(), ug.getStringBounder()); final Point2D p2 = tr.getTranslated(getFtile2().calculateDimension(ug.getStringBounder()).getPointIn()); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); final Point2D p1 = calculateDimensionInternal(ug.getStringBounder()).getPointIn(); snake.addPoint(p1); snake.addPoint(p2.getX(), p1.getY()); snake.addPoint(p2); ug.draw(snake); } } class ConnectionLastElseIn extends AbstractConnection { private final Rainbow arrowColor; public ConnectionLastElseIn(Rainbow arrowColor) { super(diamonds.get(diamonds.size() - 1), tile2); this.arrowColor = arrowColor; } public void drawU(UGraphic ug) { final Point2D p1 = getP1(ug.getStringBounder()); final UTranslate tr2 = getTranslate2(ug.getStringBounder()); final Point2D p2 = tr2.getTranslated(getFtile2().calculateDimension(ug.getStringBounder()).getPointIn()); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); snake.addPoint(p1); snake.addPoint(p2.getX(), p1.getY()); snake.addPoint(p2); ug.draw(snake); } private Point2D getP1(StringBounder stringBounder) { final FtileGeometry dimDiamond1 = getFtile1().calculateDimension(stringBounder); final Point2D p = new Point2D.Double(dimDiamond1.getLeft() * 2, getYdiamontOutToLeft(dimDiamond1, stringBounder)); return getTranslateDiamond1(getFtile1(), stringBounder).getTranslated(p); } } class ConnectionLastElseOut extends AbstractConnection { private final Rainbow arrowColor; public ConnectionLastElseOut(Rainbow arrowColor) { super(tile2, null); this.arrowColor = arrowColor; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final UTranslate tr1 = getTranslate2(stringBounder); final FtileGeometry dim = getFtile1().calculateDimension(stringBounder); if (dim.hasPointOut() == false) { return; } final Point2D p1 = tr1.getTranslated(dim.getPointOut()); final double totalHeight = calculateDimensionInternal(stringBounder).getHeight(); final Point2D p2 = new Point2D.Double(p1.getX(), totalHeight); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); snake.addPoint(p1); snake.addPoint(p2); ug.draw(snake); } } class ConnectionVerticalIn extends AbstractConnection implements ConnectionTranslatable { private final Rainbow color; public ConnectionVerticalIn(Ftile diamond, Ftile tile, Rainbow color) { super(diamond, tile); this.color = color; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final Snake snake = new Snake(arrowHorizontalAlignment(), color, Arrows.asToDown()); snake.addPoint(p1); snake.addPoint(p2); ug.draw(snake); } private Point2D getP1(StringBounder stringBounder) { final Point2D p = getFtile1().calculateDimension(stringBounder).getPointOut(); return getTranslateDiamond1(getFtile1(), stringBounder).getTranslated(p); } private Point2D getP2(StringBounder stringBounder) { final Point2D p = getFtile2().calculateDimension(stringBounder).getPointIn(); return getTranslate1(getFtile2(), stringBounder).getTranslated(p); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { final Point2D p1 = getP1(ug.getStringBounder()); final Point2D p2 = getP2(ug.getStringBounder()); final Snake snake = new Snake(arrowHorizontalAlignment(), color, Arrows.asToDown()); final Point2D mp1a = translate1.getTranslated(p1); final Point2D mp2b = translate2.getTranslated(p2); final double middle = mp1a.getY() + 4; snake.addPoint(mp1a); snake.addPoint(mp1a.getX(), middle); snake.addPoint(mp2b.getX(), middle); snake.addPoint(mp2b); ug.draw(snake); } } class ConnectionVerticalOut extends AbstractConnection { private final Rainbow color; public ConnectionVerticalOut(Ftile tile, Rainbow color) { super(tile, null); this.color = color; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final double totalHeight = calculateDimensionInternal(stringBounder).getHeight(); final Point2D p1 = getP1(stringBounder); if (p1 == null) { return; } final Point2D p2 = new Point2D.Double(p1.getX(), totalHeight); final Snake snake = new Snake(arrowHorizontalAlignment(), color, Arrows.asToDown()); snake.addPoint(p1); snake.addPoint(p2); ug.draw(snake); } private Point2D getP1(StringBounder stringBounder) { final FtileGeometry geo = getFtile1().calculateDimension(stringBounder); if (geo.hasPointOut() == false) { return null; } final Point2D p = geo.getPointOut(); return getTranslate1(getFtile1(), stringBounder).getTranslated(p); } } class ConnectionHline extends AbstractConnection { private final Rainbow arrowColor; public ConnectionHline(Rainbow arrowColor) { super(null, null); this.arrowColor = arrowColor; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D totalDim = calculateDimensionInternal(stringBounder); final Swimlane intoSw; if (ug instanceof UGraphicInterceptorOneSwimlane) { intoSw = ((UGraphicInterceptorOneSwimlane) ug).getSwimlane(); } else { intoSw = null; } final List all = new ArrayList(couples); all.add(tile2); double minX = totalDim.getWidth() / 2; double maxX = totalDim.getWidth() / 2; boolean atLeastOne = false; for (Ftile tmp : all) { if (tmp.calculateDimension(stringBounder).hasPointOut() == false) { continue; } if (intoSw != null && tmp.getSwimlanes().contains(intoSw) == false) { continue; } if (intoSw != null && tmp.getSwimlaneOut() != intoSw) { continue; } atLeastOne = true; final UTranslate ut = getTranslateFor(tmp, stringBounder); final double out = tmp.calculateDimension(stringBounder).translate(ut).getLeft(); minX = Math.min(minX, out); maxX = Math.max(maxX, out); } if (atLeastOne == false) { return; } final Snake s = new Snake(arrowHorizontalAlignment(), arrowColor); s.goUnmergeable(MergeStrategy.NONE); final double height = totalDim.getHeight(); s.addPoint(minX, height); s.addPoint(maxX, height); ug.draw(s); } } @Override public Collection getMyChildren() { final List result = new ArrayList(tiles); result.add(tile2); return Collections.unmodifiableList(result); } @Override public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) { if (child == tile2) { return getTranslate2(stringBounder); } if (couples.contains(child)) { return getTranslateCouple1(child, stringBounder); } if (tiles.contains(child)) { return getTranslate1(child, stringBounder); } throw new UnsupportedOperationException(); } private UTranslate getTranslate2(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final Dimension2D dim2 = tile2.calculateDimension(stringBounder); final double x2 = dimTotal.getWidth() - dim2.getWidth(); final double h = 0; // getAllDiamondsHeight(stringBounder); final double y2 = (dimTotal.getHeight() - h * 2 - dim2.getHeight()) / 2 + h; return new UTranslate(x2, y2); } private UTranslate getTranslateDiamond1(Ftile diamond, StringBounder stringBounder) { final int idx = diamonds.indexOf(diamond); if (idx == -1) { throw new IllegalArgumentException(); } final UTranslate trCouple = getTranslateCouple1(couples.get(idx), stringBounder); final UTranslate in = couples.get(idx).getTranslateFor(diamond, stringBounder); return trCouple.compose(in); } public UTranslate getTranslate1(Ftile tile, StringBounder stringBounder) { final int idx = tiles.indexOf(tile); if (idx == -1) { throw new IllegalArgumentException(); } final UTranslate trCouple = getTranslateCouple1(couples.get(idx), stringBounder); final UTranslate in = couples.get(idx).getTranslateFor(tile, stringBounder); return trCouple.compose(in); } private UTranslate getTranslateCouple1(Ftile candidat, StringBounder stringBounder) { double x1 = 0; for (Ftile couple : couples) { final FtileGeometry dim1 = couple.calculateDimension(stringBounder); if (couple == candidat) { return new UTranslate(x1, 25); } x1 += dim1.getWidth() + xSeparation; } throw new IllegalArgumentException(); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); for (Ftile couple : couples) { ug.apply(getTranslateCouple1(couple, stringBounder)).draw(couple); } ug.apply(getTranslate2(stringBounder)).draw(tile2); } private FtileGeometry calculateDimensionInternal(StringBounder stringBounder) { Dimension2D result = new Dimension2DDouble(0, 0); for (Ftile couple : couples) { result = Dimension2DDouble.mergeLR(result, couple.calculateDimension(stringBounder)); } final FtileGeometry dimTile2 = tile2.calculateDimension(stringBounder); result = Dimension2DDouble.mergeLR(result, dimTile2); result = Dimension2DDouble.delta(result, xSeparation * couples.size(), 100); return new FtileGeometry(result, result.getWidth() / 2, 0); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final List all = new ArrayList(tiles); all.add(tile2); for (Ftile tmp : all) { if (tmp.calculateDimension(stringBounder).hasPointOut()) { return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0, dimTotal.getHeight()); } } return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0); } } ����������������FtileIfLongVertical.java����������������������������������������������������������������������������0000664�0000000�0000000�00000052402�13126503031�0034220�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.activitydiagram3.Branch; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileMinWidth; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileOverpassing; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond.FtileIfWithLinks; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInside3; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; class FtileIfLongVertical extends AbstractFtile { private final double ySeparation = 20; private final double marginy1 = 30; private final List tiles; private final Ftile tile2; private final List diamonds; private final Ftile lastDiamond; // private final List couples = new ArrayList(); private final Rainbow arrowColor; private FtileIfLongVertical(List diamonds, List tiles, Ftile tile2, Rainbow arrowColor, Ftile lastDiamond) { super(tiles.get(0).skinParam()); if (diamonds.size() != tiles.size()) { throw new IllegalArgumentException(); } this.lastDiamond = lastDiamond; // for (int i = 0; i < diamonds.size(); i++) { // couples.add(new FtileAssemblySimple(diamonds.get(i), tiles.get(i))); // } this.tile2 = tile2; this.diamonds = new ArrayList(diamonds); this.tiles = new ArrayList(tiles); this.arrowColor = arrowColor; } // private static List alignDiamonds(List diamonds, StringBounder stringBounder) { // double maxOutY = 0; // for (Ftile diamond : diamonds) { // maxOutY = Math.max(maxOutY, diamond.calculateDimension(stringBounder).getOutY()); // } // final List result = new ArrayList(); // for (int i = 0; i < diamonds.size(); i++) { // Ftile diamond = diamonds.get(i); // final double missing = maxOutY - diamond.calculateDimension(stringBounder).getOutY(); // assert missing >= 0; // diamond = FtileUtils.addVerticalMargin(diamond, missing / 2, 20); // result.add(diamond); // } // return result; // } public Set getSwimlanes() { final Set result = new HashSet(); if (getSwimlaneIn() != null) { result.add(getSwimlaneIn()); } for (Ftile tile : tiles) { result.addAll(tile.getSwimlanes()); } result.addAll(tile2.getSwimlanes()); return Collections.unmodifiableSet(result); } public Swimlane getSwimlaneIn() { return tiles.get(0).getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return getSwimlaneIn(); } static Ftile create(Swimlane swimlane, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor, FtileFactory ftileFactory, ConditionStyle conditionStyle, List thens, Branch branch2, FontConfiguration fc, LinkRendering topInlinkRendering, LinkRendering afterEndwhile) { final List tiles = new ArrayList(); for (Branch branch : thens) { tiles.add(new FtileMinWidth(branch.getFtile(), 30)); } final Ftile tile2 = new FtileMinWidth(branch2.getFtile(), 30); List diamonds = new ArrayList(); for (Branch branch : thens) { final TextBlock tb1 = branch.getLabelPositive().create(fc, HorizontalAlignment.LEFT, ftileFactory.skinParam()); final TextBlock tbTest = branch.getLabelTest().create(fc, HorizontalAlignment.LEFT, ftileFactory.skinParam()); FtileDiamondInside3 diamond = new FtileDiamondInside3(branch.skinParam(), backColor, borderColor, swimlane, tbTest); diamond = diamond.withEast(tb1); diamonds.add(diamond); } final TextBlock tb2 = branch2.getLabelPositive().create(fc, HorizontalAlignment.LEFT, ftileFactory.skinParam()); final int last = diamonds.size() - 1; diamonds.set(last, ((FtileDiamondInside3) diamonds.get(last)).withSouth(tb2)); // diamonds = alignDiamonds(diamonds, ftileFactory.getStringBounder()); final Ftile lastDiamond = new FtileDiamond(tiles.get(0).skinParam(), backColor, borderColor, swimlane); final FtileIfLongVertical result = new FtileIfLongVertical(diamonds, tiles, tile2, arrowColor, lastDiamond); final List conns = new ArrayList(); for (int i = 0; i < thens.size(); i++) { final Ftile ftile = tiles.get(i); final Ftile diam = diamonds.get(i); final Rainbow color = FtileIfWithLinks.getInColor(thens.get(i), arrowColor); conns.add(result.new ConnectionVerticalIn(diam, ftile, color == null ? arrowColor : color)); // conns.add(result.new ConnectionVerticalOut(ftile, arrowColor)); } for (int i = 0; i < diamonds.size() - 1; i++) { conns.add(result.new ConnectionVertical(diamonds.get(i), diamonds.get(i + 1), arrowColor)); } conns.add(result.new ConnectionThenOut(tiles.get(0), arrowColor)); for (int i = 1; i < tiles.size(); i++) { conns.add(result.new ConnectionThenOutConnect(tiles.get(i), arrowColor)); } final Rainbow topInColor = topInlinkRendering.getRainbow(arrowColor); // for (int i = 0; i < diamonds.size() - 1; i++) { // final Ftile diam1 = diamonds.get(i); // final Ftile diam2 = diamonds.get(i + 1); // conns.add(result.new ConnectionHorizontal(diam1, diam2, topInColor)); // } conns.add(result.new ConnectionIn(topInColor)); // conns.add(result.new ConnectionLastElseIn(FtileIfWithLinks.getInColor(branch2, arrowColor))); // conns.add(result.new ConnectionLastElseOut(arrowColor)); // final HtmlColor horizontalOutColor = LinkRendering.getColor(afterEndwhile, arrowColor); // conns.add(result.new ConnectionHline(horizontalOutColor)); conns.add(result.new ConnectionLastElse(topInColor)); conns.add(result.new ConnectionLastElseOut(arrowColor)); return FtileUtils.addConnection(result, conns); } static private double getYdiamontOutToLeft(FtileGeometry dimDiamond1, StringBounder stringBounder) { return (dimDiamond1.getInY() + dimDiamond1.getOutY()) / 2; } class ConnectionIn extends AbstractConnection { private final Rainbow arrowColor; public ConnectionIn(Rainbow arrowColor) { super(null, diamonds.get(0)); this.arrowColor = arrowColor; } public void drawU(UGraphic ug) { final UTranslate tr = getTranslateDiamond(getFtile2(), ug.getStringBounder()); final Point2D p2 = tr.getTranslated(getFtile2().calculateDimension(ug.getStringBounder()).getPointIn()); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); final Point2D p1 = calculateDimensionInternal(ug.getStringBounder()).getPointIn(); snake.addPoint(p1); snake.addPoint(p1.getX(), (p1.getY() + p2.getY()) / 2); snake.addPoint(p2.getX(), (p1.getY() + p2.getY()) / 2); snake.addPoint(p2); ug.draw(snake); } } class ConnectionVerticalIn extends AbstractConnection { private final Rainbow color; public ConnectionVerticalIn(Ftile diamond, Ftile tile, Rainbow color) { super(diamond, tile); this.color = color; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final Snake snake = new Snake(arrowHorizontalAlignment(), color, Arrows.asToDown()); snake.addPoint(p1); snake.addPoint(p2.getX(), p1.getY()); snake.addPoint(p2); ug.draw(snake); } private Point2D getP1(StringBounder stringBounder) { final Dimension2D dimDiamond1 = getFtile1().calculateDimension(stringBounder); final double diamondWidth = dimDiamond1.getWidth(); return getTranslateDiamond(getFtile1(), stringBounder).getTranslated( new Point2D.Double(diamondWidth, dimDiamond1.getHeight() / 2)); } private Point2D getP2(StringBounder stringBounder) { final Point2D p = getFtile2().calculateDimension(stringBounder).getPointIn(); return getTranslate1(getFtile2(), stringBounder).getTranslated(p); } } class ConnectionVertical extends AbstractConnection { private final Rainbow color; public ConnectionVertical(Ftile diamond1, Ftile diamond2, Rainbow color) { super(diamond1, diamond2); this.color = color; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final Snake snake = new Snake(arrowHorizontalAlignment(), color, Arrows.asToDown()); snake.addPoint(p1); snake.addPoint(p2); ug.draw(snake); } private Point2D getP1(StringBounder stringBounder) { final Point2D p = getFtile1().calculateDimension(stringBounder).getPointOut(); return getTranslateFor(getFtile1(), stringBounder).getTranslated(p); } private Point2D getP2(StringBounder stringBounder) { final Point2D p = getFtile2().calculateDimension(stringBounder).getPointIn(); return getTranslateFor(getFtile2(), stringBounder).getTranslated(p); } } class ConnectionLastElse extends AbstractConnection { private final Rainbow arrowColor; public ConnectionLastElse(Rainbow arrowColor) { super(diamonds.get(diamonds.size() - 1), tile2); this.arrowColor = arrowColor; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final UTranslate tr1 = getTranslateDiamond(getFtile1(), stringBounder); final FtileGeometry dimDiamond = getFtile1().calculateDimension(stringBounder); final Point2D p1 = tr1.getTranslated(dimDiamond.getPointOut()); final Point2D p2 = getTranslate2(stringBounder).getTranslated( getFtile2().calculateDimension(stringBounder).getPointIn()); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); snake.addPoint(p1); snake.addPoint(p1.getX(), p2.getY() - 15); snake.addPoint(p2.getX(), p2.getY() - 15); snake.addPoint(p2); ug.draw(snake); } } class ConnectionLastElseOut extends AbstractConnection { private final Rainbow arrowColor; public ConnectionLastElseOut(Rainbow arrowColor) { super(tile2, lastDiamond); this.arrowColor = arrowColor; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final FtileGeometry dim1 = getFtile1().calculateDimension(stringBounder); if (dim1.hasPointOut() == false) { return; } final Point2D p1 = getTranslate2(stringBounder).getTranslated(dim1.getPointOut()); final Point2D p2 = getTranslateLastDiamond(stringBounder).getTranslated( getFtile2().calculateDimension(stringBounder).getPointIn()); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); snake.addPoint(p1); snake.addPoint(p1.getX(), p2.getY() - 15); snake.addPoint(p2.getX(), p2.getY() - 15); snake.addPoint(p2); ug.draw(snake); } } class ConnectionThenOut extends AbstractConnection { private final Rainbow arrowColor; public ConnectionThenOut(Ftile tile1, Rainbow arrowColor) { super(tile1, lastDiamond); this.arrowColor = arrowColor; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final FtileGeometry dim1 = getFtile1().calculateDimension(stringBounder); if (dim1.hasPointOut() == false) { return; } final Point2D p1 = getTranslate1(getFtile1(), stringBounder).getTranslated(dim1.getPointOut()); final FtileGeometry dimLastDiamond = getFtile2().calculateDimension(stringBounder); Point2D p2 = getTranslateLastDiamond(stringBounder).getTranslated( getFtile2().calculateDimension(stringBounder).getPointIn()); p2 = new UTranslate(dimLastDiamond.getWidth() / 2, dimLastDiamond.getHeight() / 2).getTranslated(p2); final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToLeft()); snake.addPoint(p1); snake.addPoint(p1.getX(), p1.getY() + 15); snake.addPoint(dimTotal.getWidth(), p1.getY() + 15); snake.addPoint(dimTotal.getWidth(), p2.getY()); snake.addPoint(p2); ug.draw(snake); } } class ConnectionThenOutConnect extends AbstractConnection { private final Rainbow arrowColor; public ConnectionThenOutConnect(Ftile tile1, Rainbow arrowColor) { super(tile1, lastDiamond); this.arrowColor = arrowColor; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final FtileGeometry dim1 = getFtile1().calculateDimension(stringBounder); if (dim1.hasPointOut() == false) { return; } final Point2D p1 = getTranslate1(getFtile1(), stringBounder).getTranslated(dim1.getPointOut()); final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final Point2D p2 = new Point2D.Double(dimTotal.getWidth(), p1.getY() + 15); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToRight()); snake.addPoint(p1); snake.addPoint(p1.getX(), p2.getY()); snake.addPoint(p2); ug.draw(snake); } } @Override public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) { if (child == tile2) { return getTranslate2(stringBounder); } if (child == lastDiamond) { return getTranslateLastDiamond(stringBounder); } if (tiles.contains(child)) { return getTranslate1(child, stringBounder); } if (diamonds.contains(child)) { return getTranslateDiamond(child, stringBounder); } throw new UnsupportedOperationException(); } private UTranslate getTranslateDiamond(Ftile diamond, StringBounder stringBounder) { final double allDiamondsWidth = allDiamondsWidth(stringBounder); final int idx = diamonds.indexOf(diamond); if (idx == -1) { throw new IllegalArgumentException(); } final double y1 = getTranslateDy(idx, stringBounder); return new UTranslate((allDiamondsWidth - diamond.calculateDimension(stringBounder).getWidth()) / 2, y1); } private UTranslate getTranslateLastDiamond(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final FtileGeometry dimLast = lastDiamond.calculateDimension(stringBounder); final double x = (dimTotal.getWidth() - dimLast.getWidth()) / 2; return new UTranslate(x, dimTotal.getHeight() - dimLast.getHeight()); } private UTranslate getTranslate1(Ftile candidat, StringBounder stringBounder) { final int idx = tiles.indexOf(candidat); if (idx == -1) { throw new IllegalArgumentException(); } final double y1 = getTranslateDy(idx, stringBounder); final FtileGeometry diam = diamonds.get(idx).calculateDimension(stringBounder); final FtileGeometry dim1 = candidat.calculateDimension(stringBounder); final FtileGeometry dimTotal = calculateDimensionInternal(stringBounder); final double allDiamondsWidth = allDiamondsWidth(stringBounder); final double x = allDiamondsWidth + (dimTotal.getWidth() - allDiamondsWidth - dim1.getWidth()) / 2; return new UTranslate(x, y1 + diam.getHeight()); } private double getTranslateDy(int idx, StringBounder stringBounder) { double y1 = marginy1; for (int i = 0; i < idx; i++) { final FtileGeometry dim1 = tiles.get(i).calculateDimension(stringBounder); final FtileGeometry diam = diamonds.get(i).calculateDimension(stringBounder); y1 += dim1.getHeight() + diam.getHeight() + ySeparation; } return y1; } private UTranslate getTranslate2(StringBounder stringBounder) { final double y1 = getTranslateDy(tiles.size(), stringBounder); final FtileGeometry dim2 = tile2.calculateDimension(stringBounder); final FtileGeometry dimTotal = calculateDimensionInternal(stringBounder); final double x = (dimTotal.getWidth() - dim2.getWidth()) / 2; return new UTranslate(x, y1); // final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); // final Dimension2D dim2 = tile2.calculateDimension(stringBounder); // // final double x2 = dimTotal.getWidth() - dim2.getWidth(); // // final double h = 0; // getAllDiamondsHeight(stringBounder); // final double y2 = (dimTotal.getHeight() - h * 2 - dim2.getHeight()) / 2 + h; // // return new UTranslate(x2, y2); } // private UTranslate getTranslateCouple1(Ftile candidat, StringBounder stringBounder) { // double x1 = 0; // // for (Ftile couple : couples) { // final FtileGeometry dim1 = couple.calculateDimension(stringBounder); // if (couple == candidat) { // return new UTranslate(x1, 25); // } // x1 += dim1.getWidth() + xSeparation; // } // throw new IllegalArgumentException(); // // } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); for (Ftile tile1 : tiles) { ug.apply(getTranslate1(tile1, stringBounder)).draw(tile1); } for (Ftile diam : diamonds) { ug.apply(getTranslateDiamond(diam, stringBounder)).draw(diam); } ug.apply(getTranslate2(stringBounder)).draw(tile2); ug.apply(getTranslateLastDiamond(stringBounder)).draw(lastDiamond); } private FtileGeometry calculateDimensionInternal(StringBounder stringBounder) { // FtileGeometry result = new FtileGeometry(0, marginy1, 0, 0); double col1 = 0; double col1overpass = 0; double col2 = 0; double height = marginy1; for (int i = 0; i < tiles.size(); i++) { final FtileGeometry dim1 = tiles.get(i).calculateDimension(stringBounder); final FtileGeometry diamondOverpassing = ((FtileOverpassing) diamonds.get(i)) .getOverpassDimension(stringBounder); final FtileGeometry diamondDim = diamonds.get(i).calculateDimension(stringBounder); height += diamondDim.getHeight() + dim1.getHeight(); col1 = Math.max(col1, diamondDim.getWidth()); col1overpass = Math.max(col1overpass, diamondOverpassing.getWidth()); col2 = Math.max(col2, dim1.getWidth()); } final double width = Math.max(col1 + col2, col1overpass); FtileGeometry result = new FtileGeometry(width, height, width / 2, 0); final FtileGeometry dimTile2 = tile2.calculateDimension(stringBounder); result = result.appendBottom(dimTile2); final FtileGeometry dimLastDiamond = lastDiamond.calculateDimension(stringBounder); final double lastElseArrowHeight = 40; result = result.addDim(0, ySeparation * tiles.size() + lastElseArrowHeight + dimLastDiamond.getHeight()); return new FtileGeometry(result, result.getWidth() / 2, 0); } private double allDiamondsWidth(StringBounder stringBounder) { double width = 0; for (Ftile diam : diamonds) { width = Math.max(width, diam.calculateDimension(stringBounder).getWidth()); } return width; } private double allTile1Width(StringBounder stringBounder) { double width = 0; for (Ftile tile1 : tiles) { width = Math.max(width, tile1.calculateDimension(stringBounder).getWidth()); } return width; } public FtileGeometry calculateDimension(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final List all = new ArrayList(tiles); all.add(tile2); for (Ftile tmp : all) { if (tmp.calculateDimension(stringBounder).hasPointOut()) { return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0, dimTotal.getHeight()); } } return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java�0000664�0000000�0000000�00000011470�13126503031�0033313�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.util.Collection; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.CreoleParser; import net.sourceforge.plantuml.creole.Sheet; import net.sourceforge.plantuml.creole.SheetBlock1; import net.sourceforge.plantuml.creole.SheetBlock2; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.svek.image.Opale; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; public class FtileNoteAlone extends AbstractFtile implements Stencil { private final Opale opale; private final boolean withOutPoint; private final Swimlane swimlane; @Override public Collection getMyChildren() { return Collections.emptyList(); } public Set getSwimlanes() { if (swimlane == null) { return Collections.emptySet(); } return Collections.singleton(swimlane); } public Swimlane getSwimlaneIn() { return swimlane; } public Swimlane getSwimlaneOut() { return swimlane; } public FtileNoteAlone(boolean shadow, Display note, ISkinParam skinParam, boolean withOutPoint, Swimlane swimlane) { super(skinParam); this.swimlane = swimlane; this.withOutPoint = withOutPoint; final Rose rose = new Rose(); final HtmlColor noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground); final HtmlColor borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder); final FontConfiguration fc = new FontConfiguration(skinParam, FontParam.NOTE, null); final Sheet sheet = new CreoleParser(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL).createSheet(note); final TextBlock text = new SheetBlock2(new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()), this, new UStroke(1)); opale = new Opale(borderColor, noteBackgroundColor, text, skinParam.shadowing(), false); } public void drawU(UGraphic ug) { opale.drawU(ug); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); if (withOutPoint) { return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0, dimTotal.getHeight()); } return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0); } private Dimension2D calculateDimensionInternal(StringBounder stringBounder) { return opale.calculateDimension(stringBounder); } public double getStartingX(StringBounder stringBounder, double y) { return -opale.getMarginX1(); } public double getEndingX(StringBounder stringBounder, double y) { return opale.calculateDimension(stringBounder).getWidth() - opale.getMarginX1(); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileRepeat.java����0000664�0000000�0000000�00000054176�13126503031�0032661�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.ConnectionTranslatable; import net.sourceforge.plantuml.activitydiagram3.ftile.Diamond; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondFoo1; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInside; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; class FtileRepeat extends AbstractFtile { private final Ftile repeat; private final Ftile diamond1; private final Ftile diamond2; private final Ftile backward; private final TextBlock tbTest; @Override public Collection getMyChildren() { return Arrays.asList(repeat, diamond1, diamond2); } private FtileRepeat(Ftile repeat, Ftile diamond1, Ftile diamond2, TextBlock tbTest, Ftile backward) { super(repeat.skinParam()); this.repeat = repeat; this.diamond1 = diamond1; this.diamond2 = diamond2; this.tbTest = tbTest; this.backward = backward; } public Swimlane getSwimlaneIn() { return repeat.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return diamond2.getSwimlaneOut(); } public Set getSwimlanes() { return repeat.getSwimlanes(); } public static Ftile create(LinkRendering backRepeatLinkRendering, Swimlane swimlane, Swimlane swimlaneOut, Ftile backStart, Ftile repeat, Display test, Display yes, Display out, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor, Rainbow endRepeatLinkColor, ConditionStyle conditionStyle, ISkinSimple spriteContainer, FontConfiguration fcDiamond, FontConfiguration fcArrow, Ftile backward) { final FontConfiguration fontConfiguration1 = conditionStyle == ConditionStyle.INSIDE ? fcDiamond : fcArrow; final TextBlock tbTest = (Display.isNull(test) || test.isWhite()) ? TextBlockUtils.empty(0, 0) : test.create( fontConfiguration1, repeat.skinParam().getDefaultTextAlignment(HorizontalAlignment.LEFT), spriteContainer); final TextBlock yesTb = yes.create(fcArrow, HorizontalAlignment.LEFT, spriteContainer); final TextBlock outTb = out.create(fcArrow, HorizontalAlignment.LEFT, spriteContainer); final Ftile diamond1; if (backStart == null) { diamond1 = new FtileDiamond(repeat.skinParam(), backColor, borderColor, swimlane); } else { diamond1 = backStart; } final FtileRepeat result; if (conditionStyle == ConditionStyle.INSIDE) { final Ftile diamond2 = new FtileDiamondInside(repeat.skinParam(), backColor, borderColor, swimlaneOut, tbTest).withEast(yesTb).withSouth(outTb); result = new FtileRepeat(repeat, diamond1, diamond2, TextBlockUtils.empty(0, 0), backward); } else if (conditionStyle == ConditionStyle.DIAMOND) { final Ftile diamond2 = new FtileDiamond(repeat.skinParam(), backColor, borderColor, swimlane) .withEast(tbTest); result = new FtileRepeat(repeat, diamond1, diamond2, tbTest, backward); } else if (conditionStyle == ConditionStyle.FOO1) { final Ftile diamond2 = new FtileDiamondFoo1(repeat.skinParam(), backColor, borderColor, swimlane, tbTest); result = new FtileRepeat(repeat, diamond1, diamond2, TextBlockUtils.empty(0, 0), backward); } else { throw new IllegalStateException(); } final List conns = new ArrayList(); final Display in1 = repeat.getInLinkRendering().getDisplay(); final TextBlock tbin1 = in1 == null ? null : in1.create(fcArrow, HorizontalAlignment.LEFT, spriteContainer, CreoleMode.SIMPLE_LINE); conns.add(result.new ConnectionIn(repeat.getInLinkRendering().getRainbow(arrowColor), tbin1)); final Display backLink1 = backRepeatLinkRendering.getDisplay(); final TextBlock tbbackLink1 = backLink1 == null ? null : backLink1.create(fcArrow, HorizontalAlignment.LEFT, spriteContainer, CreoleMode.SIMPLE_LINE); if (repeat.getSwimlaneIn() == repeat.getSwimlaneOut()) { if (backward == null) { conns.add(result.new ConnectionBackSimple(backRepeatLinkRendering.getRainbow(arrowColor), tbbackLink1)); } else { conns.add(result.new ConnectionBackBackward1(backRepeatLinkRendering.getRainbow(arrowColor), tbbackLink1)); conns.add(result.new ConnectionBackBackward2(backRepeatLinkRendering.getRainbow(arrowColor))); } } else { conns.add(result.new ConnectionBackComplex1(backRepeatLinkRendering.getRainbow(arrowColor))); conns.add(result.new ConnectionBackComplexHorizontalOnly(backRepeatLinkRendering.getRainbow(arrowColor), tbbackLink1)); } final Display out1 = repeat.getOutLinkRendering().getDisplay(); final TextBlock tbout1 = out1 == null ? null : out1.create(fcArrow, HorizontalAlignment.LEFT, spriteContainer, CreoleMode.SIMPLE_LINE); final Rainbow tmpColor = endRepeatLinkColor.withDefault(arrowColor); conns.add(result.new ConnectionOut(tmpColor, tbout1)); return FtileUtils.addConnection(result, conns); } class ConnectionIn extends AbstractConnection { private final Rainbow arrowColor; private final TextBlock tbin; public ConnectionIn(Rainbow arrowColor, TextBlock tbin) { super(diamond1, repeat); this.arrowColor = arrowColor; this.tbin = tbin; } private Point2D getP1(final StringBounder stringBounder) { return getFtile1().calculateDimension(stringBounder).translate(getTranslateDiamond1(stringBounder)) .getPointOut(); } private Point2D getP2(final StringBounder stringBounder) { return getFtile2().calculateDimension(stringBounder).translate(getTranslateForRepeat(stringBounder)) .getPointIn(); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); snake.setLabel(tbin); snake.addPoint(getP1(stringBounder)); snake.addPoint(getP2(stringBounder)); ug.draw(snake); } } class ConnectionOut extends AbstractConnection implements ConnectionTranslatable { private final Rainbow arrowColor; private final TextBlock tbout; public ConnectionOut(Rainbow arrowColor, TextBlock tbout) { super(repeat, diamond2); this.arrowColor = arrowColor; this.tbout = tbout; } private Point2D getP1(final StringBounder stringBounder) { return getTranslateForRepeat(stringBounder).getTranslated( getFtile1().calculateDimension(stringBounder).getPointOut()); } private Point2D getP2(final StringBounder stringBounder) { return getTranslateDiamond2(stringBounder).getTranslated( getFtile2().calculateDimension(stringBounder).getPointIn()); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); if (getFtile1().calculateDimension(stringBounder).hasPointOut() == false) { return; } final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); snake.setLabel(tbout); snake.addPoint(getP1(stringBounder)); snake.addPoint(getP2(stringBounder)); ug.draw(snake); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { final StringBounder stringBounder = ug.getStringBounder(); if (getFtile1().calculateDimension(stringBounder).hasPointOut() == false) { return; } final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor); snake.setLabel(tbout); final Point2D mp1a = translate1.getTranslated(getP1(stringBounder)); final Point2D mp2b = translate2.getTranslated(getP2(stringBounder)); final double middle = (mp1a.getY() + mp2b.getY()) / 2.0; snake.addPoint(mp1a); snake.addPoint(mp1a.getX(), middle); snake.addPoint(mp2b.getX(), middle); // snake.addPoint(mp2b); ug.draw(snake); final Snake small = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); small.addPoint(mp2b.getX(), middle); small.addPoint(mp2b); ug.draw(small); } } class ConnectionBackComplex1 extends AbstractConnection implements ConnectionTranslatable { private final Rainbow arrowColor; public ConnectionBackComplex1(Rainbow arrowColor) { super(diamond2, repeat); this.arrowColor = arrowColor; } private Point2D getP1(final StringBounder stringBounder) { return getTranslateDiamond2(stringBounder).getTranslated(new Point2D.Double(0, 0)); } private Point2D getP2(final StringBounder stringBounder) { return getTranslateDiamond1(stringBounder).getTranslated(new Point2D.Double(0, 0)); } public void drawU(UGraphic ug) { // throw new UnsupportedOperationException(); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { final StringBounder stringBounder = ug.getStringBounder(); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToLeft()); snake.emphasizeDirection(Direction.UP); final Dimension2D dimRepeat = repeat.calculateDimension(stringBounder); Point2D p1 = getP1(stringBounder); Point2D p2 = getP2(stringBounder); p1 = translate1.getTranslated(p1); p2 = translate2.getTranslated(p2); final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); final Dimension2D dimDiamond2 = diamond2.calculateDimension(stringBounder); final double y1 = p1.getY() + dimDiamond2.getHeight() / 2; final double x2 = p2.getX() + dimDiamond1.getWidth(); final double y2 = p2.getY() + dimDiamond1.getHeight() / 2; final double xmax = p1.getX() + dimDiamond2.getWidth() / 2 + dimRepeat.getWidth() / 2 + Diamond.diamondHalfSize; snake.addPoint(xmax, y1); snake.addPoint(xmax, y2); snake.addPoint(x2, y2); ug.draw(snake); } } class ConnectionBackComplexHorizontalOnly extends AbstractConnection { private final Rainbow arrowColor; private final TextBlock tbback; public ConnectionBackComplexHorizontalOnly(Rainbow arrowColor, TextBlock tbback) { super(diamond2, diamond2); this.arrowColor = arrowColor; this.tbback = tbback; } private Point2D getP1(final StringBounder stringBounder) { return getTranslateDiamond2(stringBounder).getTranslated(new Point2D.Double(0, 0)); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, null); snake.setLabel(tbback); final Dimension2D dimRepeat = repeat.calculateDimension(stringBounder); final Point2D p1 = getP1(stringBounder); final Dimension2D dimDiamond2 = diamond2.calculateDimension(stringBounder); final double x1 = p1.getX() + dimDiamond2.getWidth(); final double y1 = p1.getY() + dimDiamond2.getHeight() / 2; snake.addPoint(x1, y1); final double xmax = p1.getX() + dimDiamond2.getWidth() / 2 + dimRepeat.getWidth() / 2 + Diamond.diamondHalfSize; snake.addPoint(xmax, y1); ug.draw(snake); } } class ConnectionBackBackward1 extends AbstractConnection { private final Rainbow arrowColor; private final TextBlock tbback; public ConnectionBackBackward1(Rainbow arrowColor, TextBlock tbback) { super(diamond2, backward); this.arrowColor = arrowColor; this.tbback = tbback; } private Point2D getP1(final StringBounder stringBounder) { return getTranslateDiamond2(stringBounder).getTranslated(new Point2D.Double(0, 0)); } private Point2D getP2(final StringBounder stringBounder) { final FtileGeometry dim = backward.calculateDimension(stringBounder); return getTranslateBackward(stringBounder).getTranslated(new Point2D.Double(dim.getLeft(), dim.getOutY())); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToUp()); snake.setLabel(tbback); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final Dimension2D dimDiamond2 = diamond2.calculateDimension(stringBounder); final double x1 = p1.getX() + dimDiamond2.getWidth(); final double y1 = p1.getY() + dimDiamond2.getHeight() / 2; final double x2 = p2.getX(); final double y2 = p2.getY(); snake.addPoint(x1, y1); snake.addPoint(x2, y1); snake.addPoint(x2, y2); ug.draw(snake); } } class ConnectionBackBackward2 extends AbstractConnection { private final Rainbow arrowColor; public ConnectionBackBackward2(Rainbow arrowColor) { super(backward, diamond1); this.arrowColor = arrowColor; } private Point2D getP1(final StringBounder stringBounder) { final FtileGeometry dim = backward.calculateDimension(stringBounder); return getTranslateBackward(stringBounder).getTranslated(new Point2D.Double(dim.getLeft(), dim.getInY())); } private Point2D getP2(final StringBounder stringBounder) { return getTranslateDiamond1(stringBounder).getTranslated(new Point2D.Double(0, 0)); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToLeft()); snake.emphasizeDirection(Direction.UP); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); final double x1 = p1.getX(); final double y1 = p1.getY(); final double x2 = p2.getX() + dimDiamond1.getWidth(); final double y2 = p2.getY() + dimDiamond1.getHeight() / 2; snake.addPoint(x1, y1); snake.addPoint(x1, y2); snake.addPoint(x2, y2); ug.draw(snake); } } class ConnectionBackSimple extends AbstractConnection { private final Rainbow arrowColor; private final TextBlock tbback; public ConnectionBackSimple(Rainbow arrowColor, TextBlock tbback) { super(diamond2, repeat); this.arrowColor = arrowColor; this.tbback = tbback; } private Point2D getP1(final StringBounder stringBounder) { return getTranslateDiamond2(stringBounder).getTranslated(new Point2D.Double(0, 0)); } private Point2D getP2(final StringBounder stringBounder) { return getTranslateDiamond1(stringBounder).getTranslated(new Point2D.Double(0, 0)); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToLeft()); snake.setLabel(tbback); snake.emphasizeDirection(Direction.UP); final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); final Dimension2D dimDiamond2 = diamond2.calculateDimension(stringBounder); final double x1 = p1.getX() + dimDiamond2.getWidth(); final double y1 = p1.getY() + dimDiamond2.getHeight() / 2; final double x2 = p2.getX() + dimDiamond1.getWidth(); final double y2 = p2.getY() + dimDiamond1.getHeight() / 2; snake.addPoint(x1, y1); final double xmax = dimTotal.getWidth() - Diamond.diamondHalfSize; snake.addPoint(xmax, y1); snake.addPoint(xmax, y2); snake.addPoint(x2, y2); ug.draw(snake); } } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); ug.apply(getTranslateForRepeat(stringBounder)).draw(repeat); ug.apply(getTranslateDiamond1(stringBounder)).draw(diamond1); ug.apply(getTranslateDiamond2(stringBounder)).draw(diamond2); if (backward != null) { ug.apply(getTranslateBackward(stringBounder)).draw(backward); } } public FtileGeometry calculateDimension(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); return new FtileGeometry(dimTotal, getLeft(stringBounder), 0, dimTotal.getHeight()); } private Dimension2D calculateDimensionInternal(StringBounder stringBounder) { final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); final Dimension2D dimDiamond2 = diamond2.calculateDimension(stringBounder); final Dimension2D dimRepeat = repeat.calculateDimension(stringBounder); final double w = tbTest.calculateDimension(stringBounder).getWidth(); double width = getLeft(stringBounder) + getRight(stringBounder); width = Math.max(width, w + 2 * Diamond.diamondHalfSize); if (backward != null) { width += backward.calculateDimension(stringBounder).getWidth(); } final double height = dimDiamond1.getHeight() + dimRepeat.getHeight() + dimDiamond2.getHeight() + 8 * Diamond.diamondHalfSize; return new Dimension2DDouble(width + 2 * Diamond.diamondHalfSize, height); } @Override public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) { if (child == repeat) { return getTranslateForRepeat(stringBounder); } if (child == diamond1) { return getTranslateDiamond1(stringBounder); } throw new UnsupportedOperationException(); } private UTranslate getTranslateForRepeat(StringBounder stringBounder) { final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); final Dimension2D dimDiamond2 = diamond2.calculateDimension(stringBounder); final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final Dimension2D dimRepeat = repeat.calculateDimension(stringBounder); final double space = dimTotal.getHeight() - dimDiamond1.getHeight() - dimDiamond2.getHeight() - dimRepeat.getHeight(); final double y = dimDiamond1.getHeight() + space / 2; final double left = getLeft(stringBounder); return new UTranslate(left - repeat.calculateDimension(stringBounder).getLeft(), y); } private UTranslate getTranslateDiamond1(StringBounder stringBounder) { final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); final double left = getLeft(stringBounder); return new UTranslate(left - dimDiamond1.getWidth() / 2, 0); } private UTranslate getTranslateBackward(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final Dimension2D dimBackward = backward.calculateDimension(stringBounder); final double x = dimTotal.getWidth() - dimBackward.getWidth(); final double y = (dimTotal.getHeight() - dimBackward.getHeight()) / 2; return new UTranslate(x, y); } private UTranslate getTranslateDiamond2(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final Dimension2D dimDiamond2 = diamond2.calculateDimension(stringBounder); final double y2 = dimTotal.getHeight() - dimDiamond2.getHeight(); final double left = getLeft(stringBounder); return new UTranslate(left - dimDiamond2.getWidth() / 2, y2); } private double getLeft(StringBounder stringBounder) { final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); final Dimension2D dimDiamond2 = diamond2.calculateDimension(stringBounder); double left1 = repeat.calculateDimension(stringBounder).getLeft(); left1 = Math.max(left1, dimDiamond1.getWidth() / 2); double left2 = repeat.calculateDimension(stringBounder).getLeft(); left2 = Math.max(left2, dimDiamond2.getWidth() / 2); return Math.max(left1, left2); } private double getRight(StringBounder stringBounder) { final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); final Dimension2D dimDiamond2 = diamond2.calculateDimension(stringBounder); final Dimension2D dimRepeat = repeat.calculateDimension(stringBounder); double right1 = dimRepeat.getWidth() - repeat.calculateDimension(stringBounder).getLeft(); right1 = Math.max(right1, dimDiamond1.getWidth() / 2); double right2 = dimRepeat.getWidth() - repeat.calculateDimension(stringBounder).getLeft(); right2 = Math.max(right2, dimDiamond2.getWidth() / 2); return Math.max(right1, right2); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileSplit1.java����0000664�0000000�0000000�00000007131�13126503031�0032602�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; class FtileSplit1 extends AbstractFtile { private final List forks = new ArrayList(); public FtileSplit1(List forks) { super(forks.get(0).skinParam()); for (Ftile ftile : forks) { this.forks.add(ftile); } } public Swimlane getSwimlaneIn() { return forks.get(0).getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return null; // return getSwimlaneIn(); } public Set getSwimlanes() { return mergeSwimlanes(forks); } public static Set mergeSwimlanes(List tiles) { final Set result = new HashSet(); for (Ftile tile : tiles) { result.addAll(tile.getSwimlanes()); } return Collections.unmodifiableSet(result); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); for (Ftile ftile : forks) { ug.apply(getTranslateFor(ftile, stringBounder)).draw(ftile); } } public FtileGeometry calculateDimension(StringBounder stringBounder) { double height = 0; double width = 0; for (Ftile ftile : forks) { final Dimension2D dim = ftile.calculateDimension(stringBounder); if (dim.getWidth() > width) { width = dim.getWidth(); } if (dim.getHeight() > height) { height = dim.getHeight(); } } final Dimension2D dimTotal = new Dimension2DDouble(width, height); return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0, dimTotal.getHeight()); } public UTranslate getTranslateFor(Ftile searched, StringBounder stringBounder) { final Dimension2D dim = searched.calculateDimension(stringBounder); final double xpos = calculateDimension(stringBounder).getWidth() - dim.getWidth(); return new UTranslate(xpos / 2, 0); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWhile.java�����0000664�0000000�0000000�00000047357�13126503031�0032514�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.activitydiagram3.Instruction; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.ConnectionTranslatable; import net.sourceforge.plantuml.activitydiagram3.ftile.Diamond; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.MergeStrategy; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondFoo1; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInside; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.svek.ConditionStyle; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEmpty; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; class FtileWhile extends AbstractFtile { private final Ftile whileBlock; private final Ftile diamond1; private final Ftile specialOut; public Set getSwimlanes() { final Set result = new HashSet(whileBlock.getSwimlanes()); result.add(getSwimlaneIn()); return result; } public Swimlane getSwimlaneIn() { return diamond1.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return getSwimlaneIn(); } private FtileWhile(Ftile whileBlock, Ftile diamond1, Ftile specialOut) { super(whileBlock.skinParam()); this.whileBlock = whileBlock; this.diamond1 = diamond1; this.specialOut = specialOut; } public static Ftile create(Swimlane swimlane, Ftile whileBlock, Display test, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor, Display yes, Display out2, Rainbow endInlinkColor, LinkRendering afterEndwhile, FontConfiguration fontArrow, FtileFactory ftileFactory, ConditionStyle conditionStyle, FontConfiguration fcTest, Instruction specialOut) { final TextBlock yesTb = yes.create(fontArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam()); final TextBlock testTb = test.create(fcTest, whileBlock.skinParam().getDefaultTextAlignment(HorizontalAlignment.LEFT), ftileFactory.skinParam()); final TextBlock out = out2.create(fontArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam()); final Ftile diamond1; if (conditionStyle == ConditionStyle.INSIDE) { diamond1 = new FtileDiamondInside(whileBlock.skinParam(), backColor, borderColor, swimlane, testTb) .withNorth(yesTb).withWest(out); } else if (conditionStyle == ConditionStyle.FOO1) { diamond1 = new FtileDiamondFoo1(whileBlock.skinParam(), backColor, borderColor, swimlane, testTb) .withNorth(yesTb).withWest(out); } else if (conditionStyle == ConditionStyle.DIAMOND) { diamond1 = new FtileDiamond(whileBlock.skinParam(), backColor, borderColor, swimlane).withNorth(testTb) .withSouth(yesTb).withWest(out); } else { throw new IllegalStateException(); } final Ftile special = specialOut == null ? null : specialOut.createFtile(ftileFactory); final FtileWhile result = new FtileWhile(whileBlock, diamond1, special); Rainbow afterEndwhileColor = arrowColor; if (afterEndwhile != null && afterEndwhile.getRainbow() != null && afterEndwhile.getRainbow().size() != 0) { afterEndwhileColor = afterEndwhile.getRainbow(); } final Dimension2D dim = whileBlock.calculateDimension(ftileFactory.getStringBounder()); final Display backDisplay = whileBlock.getOutLinkRendering().getDisplay(); final TextBlock back = backDisplay.create(fontArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam()); final List conns = new ArrayList(); if (dim.getWidth() == 0 || dim.getHeight() == 0) { conns.add(result.new ConnectionBackEmpty(endInlinkColor)); } else { conns.add(result.new ConnectionIn(whileBlock.getInLinkRendering().getRainbow(arrowColor))); conns.add(result.new ConnectionBack(endInlinkColor, back)); } if (specialOut == null) { conns.add(result.new ConnectionOut(afterEndwhileColor)); } else { conns.add(result.new ConnectionOutSpecial(afterEndwhileColor)); } return FtileUtils.addConnection(result, conns); } class ConnectionIn extends AbstractConnection implements ConnectionTranslatable { private final Rainbow arrowColor; public ConnectionIn(Rainbow arrowColor) { super(diamond1, whileBlock); this.arrowColor = arrowColor; } private Point2D getP1(final StringBounder stringBounder) { return getTranslateDiamond1(stringBounder).getTranslated( getFtile1().calculateDimension(stringBounder).getPointOut()); } private Point2D getP2(final StringBounder stringBounder) { return getTranslateForWhile(stringBounder).getTranslated( getFtile2().calculateDimension(stringBounder).getPointIn()); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); snake.addPoint(getP1(stringBounder)); snake.addPoint(getP2(stringBounder)); ug.draw(snake); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { final StringBounder stringBounder = ug.getStringBounder(); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); final Point2D mp1a = translate1.getTranslated(p1); final Point2D mp2b = translate2.getTranslated(p2); final double middle = (mp1a.getY() + mp2b.getY()) / 2.0; snake.addPoint(mp1a); snake.addPoint(mp1a.getX(), middle); snake.addPoint(mp2b.getX(), middle); snake.addPoint(mp2b); snake.goUnmergeable(MergeStrategy.LIMITED); ug.draw(snake); } } class ConnectionBack extends AbstractConnection implements ConnectionTranslatable { private final Rainbow endInlinkColor; private final TextBlock back; public ConnectionBack(Rainbow endInlinkColor, TextBlock back) { super(whileBlock, diamond1); this.endInlinkColor = endInlinkColor; this.back = back; } private Point2D getP1(final StringBounder stringBounder) { final FtileGeometry geo = whileBlock.calculateDimension(stringBounder); if (geo.hasPointOut() == false) { return null; } return getTranslateForWhile(stringBounder).getTranslated(geo.getPointOut()); } private double getBottom(final StringBounder stringBounder) { final FtileGeometry geo = whileBlock.calculateDimension(stringBounder); return getTranslateForWhile(stringBounder).getDy() + geo.getHeight(); } private Point2D getP2(final StringBounder stringBounder) { return getTranslateDiamond1(stringBounder).getTranslated(new Point2D.Double(0, 0)); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Snake snake = new Snake(arrowHorizontalAlignment(), endInlinkColor, Arrows.asToLeft()); final Dimension2D dimTotal = calculateDimension(stringBounder); final Point2D p1 = getP1(stringBounder); if (p1 == null) { return; } final Point2D p2 = getP2(stringBounder); final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final double x1 = p1.getX(); final double y1 = p1.getY(); final double x2 = p2.getX() + dimDiamond1.getWidth(); // final double y2 = p2.getY() + dimDiamond1.getOutY() / 2; final double half = (dimDiamond1.getOutY() - dimDiamond1.getInY()) / 2; final double y2 = p2.getY() + dimDiamond1.getInY() + half; snake.setLabel(back); snake.addPoint(x1, y1); final double y1bis = Math.max(y1, getBottom(stringBounder)) + Diamond.diamondHalfSize; snake.addPoint(x1, y1bis); final double xx = dimTotal.getWidth(); snake.addPoint(xx, y1bis); snake.addPoint(xx, y2); snake.addPoint(x2, y2); snake.emphasizeDirection(Direction.UP); ug.draw(snake); ug.apply(new UTranslate(x1, y1bis)).draw(new UEmpty(5, Diamond.diamondHalfSize)); // ug = ug.apply(new UChangeColor(endInlinkColor)).apply(new UChangeBackColor(endInlinkColor)); // ug.apply(new UTranslate(xx, (y1 + y2) / 2)).draw(Arrows.asToUp()); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { final StringBounder stringBounder = ug.getStringBounder(); final Snake snake = new Snake(arrowHorizontalAlignment(), endInlinkColor, Arrows.asToLeft()); final Dimension2D dimTotal = calculateDimension(stringBounder); final Point2D ap1 = getP1(stringBounder); final Point2D ap2 = getP2(stringBounder); final Point2D p1 = translate1.getTranslated(ap1); final Point2D p2 = translate2.getTranslated(ap2); final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); final double x1 = p1.getX(); final double y1 = p1.getY(); final double x2 = p2.getX() + dimDiamond1.getWidth(); final double y2 = p2.getY() + dimDiamond1.getHeight() / 2; snake.addPoint(x1, y1); snake.addPoint(x1, y1 + Diamond.diamondHalfSize); final double xx = Math.max(translate1.getDx(), translate2.getDx()) + dimTotal.getWidth(); snake.addPoint(xx, y1 + Diamond.diamondHalfSize); snake.addPoint(xx, y2); snake.addPoint(x2, y2); snake.goUnmergeable(MergeStrategy.LIMITED); ug.draw(snake); ug.apply(new UTranslate(x1, y1 + Diamond.diamondHalfSize)).draw(new UEmpty(5, Diamond.diamondHalfSize)); ug = ug.apply(new UChangeColor(endInlinkColor.getColor())).apply( new UChangeBackColor(endInlinkColor.getColor())); ug.apply(new UTranslate(xx, (y1 + y2) / 2)).draw(Arrows.asToUp()); } } class ConnectionBackEmpty extends AbstractConnection { private final Rainbow endInlinkColor; public ConnectionBackEmpty(Rainbow endInlinkColor) { super(diamond1, diamond1); this.endInlinkColor = endInlinkColor; } private Point2D getP1(final StringBounder stringBounder) { return getTranslateDiamond1(stringBounder).getTranslated( diamond1.calculateDimension(stringBounder).getPointOut()); } private double getBottom(final StringBounder stringBounder) { final FtileGeometry geo = whileBlock.calculateDimension(stringBounder); return getTranslateForWhile(stringBounder).getDy() + geo.getHeight(); } private Point2D getP2(final StringBounder stringBounder) { return getTranslateDiamond1(stringBounder).getTranslated(new Point2D.Double(0, 0)); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Snake snake = new Snake(arrowHorizontalAlignment(), endInlinkColor, Arrows.asToLeft()); final Dimension2D dimTotal = calculateDimension(stringBounder); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final double x1 = p1.getX(); final double y1 = p1.getY(); final double x2 = p2.getX() + dimDiamond1.getWidth(); // final double y2 = p2.getY() + dimDiamond1.getOutY() / 2; final double half = (dimDiamond1.getOutY() - dimDiamond1.getInY()) / 2; final double y2 = p2.getY() + dimDiamond1.getInY() + half; snake.addPoint(x1, y1); final double y1bis = Math.max(y1, getBottom(stringBounder)) + Diamond.diamondHalfSize; snake.addPoint(x1, y1bis); final double xx = dimTotal.getWidth(); snake.addPoint(xx, y1bis); snake.addPoint(xx, y2); snake.addPoint(x2, y2); snake.emphasizeDirection(Direction.UP); ug.draw(snake); ug.apply(new UTranslate(x1, y1bis)).draw(new UEmpty(5, Diamond.diamondHalfSize)); } } class ConnectionOut extends AbstractConnection { private final Rainbow afterEndwhileColor; public ConnectionOut(Rainbow afterEndwhileColor) { super(diamond1, null); this.afterEndwhileColor = afterEndwhileColor; } private Point2D getP1(final StringBounder stringBounder) { return getTranslateDiamond1(stringBounder).getTranslated(new Point2D.Double(0, 0)); } private Point2D getP2(final StringBounder stringBounder) { final FtileGeometry dimTotal = calculateDimension(stringBounder); return new Point2D.Double(dimTotal.getLeft(), dimTotal.getHeight()); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Snake snake = new Snake(arrowHorizontalAlignment(), afterEndwhileColor); final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final double x1 = p1.getX(); final double half = (dimDiamond1.getOutY() - dimDiamond1.getInY()) / 2; final double y1 = p1.getY() + dimDiamond1.getInY() + half; final double x2 = p2.getX(); final double y2 = p2.getY(); snake.addPoint(x1, y1); snake.addPoint(Diamond.diamondHalfSize, y1); snake.addPoint(Diamond.diamondHalfSize, y2); snake.emphasizeDirection(Direction.DOWN); snake.goUnmergeable(MergeStrategy.LIMITED); ug.draw(snake); // ug = ug.apply(new UChangeColor(afterEndwhileColor)).apply(new UChangeBackColor(afterEndwhileColor)); // ug.apply(new UTranslate(Diamond.diamondHalfSize, (y1 + y2) / 2)).draw(Arrows.asToDown()); final Snake snake2 = new Snake(arrowHorizontalAlignment(), afterEndwhileColor); snake2.addPoint(Diamond.diamondHalfSize, y2); snake2.addPoint(x2, y2); // snake2.goUnmergeable(MergeStrategy.LIMITED); ug.draw(snake2); } } class ConnectionOutSpecial extends AbstractConnection { private final Rainbow afterEndwhileColor; public ConnectionOutSpecial(Rainbow afterEndwhileColor) { super(diamond1, specialOut); this.afterEndwhileColor = afterEndwhileColor; } private Point2D getP1(final StringBounder stringBounder) { return getTranslateDiamond1(stringBounder).getTranslated(new Point2D.Double(0, 0)); } private Point2D getP2(final StringBounder stringBounder) { return getTranslateForSpecial(stringBounder).getTranslated( specialOut.calculateDimension(stringBounder).getPointIn()); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Snake snake = new Snake(arrowHorizontalAlignment(), afterEndwhileColor, Arrows.asToDown()); final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final double x1 = p1.getX(); final double half = (dimDiamond1.getOutY() - dimDiamond1.getInY()) / 2; final double y1 = p1.getY() + dimDiamond1.getInY() + half; final double x2 = p2.getX(); final double y2 = p2.getY(); snake.addPoint(x1, y1); snake.addPoint(x2, y1); snake.addPoint(x2, y2); ug.draw(snake); } } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); ug.apply(getTranslateForWhile(stringBounder)).draw(whileBlock); ug.apply(getTranslateDiamond1(stringBounder)).draw(diamond1); if (specialOut != null) { ug.apply(getTranslateForSpecial(stringBounder)).draw(specialOut); } } public FtileGeometry calculateDimension(StringBounder stringBounder) { final FtileGeometry geoDiamond1 = diamond1.calculateDimension(stringBounder); FtileGeometry geoWhile = whileBlock.calculateDimension(stringBounder); final double diff = -geoWhile.getWidth(); if (diff > 0) { geoWhile = geoWhile.addMarginX(diff / 2); assert false; } final FtileGeometry geo = geoDiamond1.appendBottom(geoWhile); final double height = geo.getHeight() + 4 * Diamond.diamondHalfSize; final double dx = 2 * Diamond.diamondHalfSize; return new FtileGeometry(xDeltaBecauseSpecial(stringBounder) + geo.getWidth() + dx + Diamond.diamondHalfSize, height, xDeltaBecauseSpecial(stringBounder) + geo.getLeft() + dx, geoDiamond1.getInY(), height); } private double xDeltaBecauseSpecial(StringBounder stringBounder) { if (specialOut == null) { return 0; } return specialOut.calculateDimension(stringBounder).getWidth(); } @Override public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) { if (child == whileBlock) { return getTranslateForWhile(stringBounder); } if (child == diamond1) { return getTranslateDiamond1(stringBounder); } throw new UnsupportedOperationException(); } private UTranslate getTranslateForWhile(StringBounder stringBounder) { final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final FtileGeometry dimTotal = calculateDimension(stringBounder); final FtileGeometry dimWhile = whileBlock.calculateDimension(stringBounder); final double y = dimDiamond1.getHeight() + (dimTotal.getHeight() - dimDiamond1.getHeight() - dimWhile.getHeight()) / 2; final double x = dimTotal.getLeft() - dimWhile.getLeft(); return new UTranslate(x, y); } private UTranslate getTranslateDiamond1(StringBounder stringBounder) { final FtileGeometry dimTotal = calculateDimension(stringBounder); final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final double y1 = 0; final double x1 = dimTotal.getLeft() - dimDiamond1.getLeft(); return new UTranslate(x1, y1); } private UTranslate getTranslateForSpecial(StringBounder stringBounder) { final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final double half = (dimDiamond1.getOutY() - dimDiamond1.getInY()) / 2; final double y1 = Math.max(3 * half, 4 * Diamond.diamondHalfSize); final double x1 = getTranslateForWhile(stringBounder).getDx() - xDeltaBecauseSpecial(stringBounder); return new UTranslate(x1, y1); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileWithNoteOpale.java�����������������������������������������������������������������������������0000664�0000000�0000000�00000020761�13126503031�0034075�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.Set; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.activitydiagram3.PositionedNote; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.CreoleParser; import net.sourceforge.plantuml.creole.Sheet; import net.sourceforge.plantuml.creole.SheetBlock1; import net.sourceforge.plantuml.creole.SheetBlock2; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.svek.image.Opale; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileWithNoteOpale extends AbstractFtile implements Stencil { private final Ftile tile; private final Opale opale; // private final HtmlColor arrowColor; private final NotePosition notePosition; private final double suppSpace = 20; private final Swimlane swimlaneNote; public Set getSwimlanes() { if (swimlaneNote != null) { final Set result = new HashSet(tile.getSwimlanes()); result.add(swimlaneNote); return Collections.unmodifiableSet(result); } return tile.getSwimlanes(); } public Swimlane getSwimlaneIn() { return tile.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return tile.getSwimlaneOut(); } @Override public Collection getMyChildren() { return Collections.singleton(tile); } public static Ftile create(Ftile tile, Collection notes, ISkinParam skinParam, boolean withLink) { if (notes.size() > 1) { return new FtileWithNotes(tile, notes, skinParam); } if (notes.size() == 0) { throw new IllegalArgumentException(); } return new FtileWithNoteOpale(tile, notes.iterator().next(), skinParam, withLink); } private FtileWithNoteOpale(Ftile tile, PositionedNote note, ISkinParam skinParam, boolean withLink) { super(tile.skinParam()); this.swimlaneNote = note.getSwimlaneNote(); if (note.getColors() != null) { skinParam = note.getColors().mute(skinParam); } this.tile = tile; this.notePosition = note.getNotePosition(); if (note.getType() == NoteType.FLOATING_NOTE) { withLink = false; } final Rose rose = new Rose(); final HtmlColor noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground); final HtmlColor borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder); final FontConfiguration fc = new FontConfiguration(skinParam, FontParam.NOTE, null); final Sheet sheet = new CreoleParser(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL).createSheet(note.getDisplay()); final TextBlock text = new SheetBlock2(new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()), this, new UStroke(1)); opale = new Opale(borderColor, noteBackgroundColor, text, skinParam.shadowing(), withLink); } private UTranslate getTranslate(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final Dimension2D dimNote = opale.calculateDimension(stringBounder); final Dimension2D dimTile = tile.calculateDimension(stringBounder); final double yForFtile = (dimTotal.getHeight() - dimTile.getHeight()) / 2; final double marge; if (notePosition == NotePosition.LEFT) { marge = dimNote.getWidth() + suppSpace; } else { marge = 0; } return new UTranslate(marge, yForFtile); } private UTranslate getTranslateForOpale(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimTotal = calculateDimension(stringBounder); final Dimension2D dimNote = opale.calculateDimension(stringBounder); final double yForNote = (dimTotal.getHeight() - dimNote.getHeight()) / 2; if (notePosition == NotePosition.LEFT) { return new UTranslate(0, yForNote); } final double dx = dimTotal.getWidth() - dimNote.getWidth(); return new UTranslate(dx, yForNote); } public void drawU(UGraphic ug) { final Swimlane intoSw; if (ug instanceof UGraphicInterceptorOneSwimlane) { intoSw = ((UGraphicInterceptorOneSwimlane) ug).getSwimlane(); } else { intoSw = null; } final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimNote = opale.calculateDimension(stringBounder); if (notePosition == NotePosition.LEFT) { final Direction strategy = Direction.RIGHT; final Point2D pp1 = new Point2D.Double(dimNote.getWidth(), dimNote.getHeight() / 2); final Point2D pp2 = new Point2D.Double(dimNote.getWidth() + suppSpace, dimNote.getHeight() / 2); opale.setOpale(strategy, pp1, pp2); } else { final Direction strategy = Direction.LEFT; final Point2D pp1 = new Point2D.Double(0, dimNote.getHeight() / 2); final Point2D pp2 = new Point2D.Double(-suppSpace, dimNote.getHeight() / 2); opale.setOpale(strategy, pp1, pp2); } if (swimlaneNote == null || intoSw == swimlaneNote) { opale.drawU(ug.apply(getTranslateForOpale(ug))); } ug.apply(getTranslate(stringBounder)).draw(tile); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final FtileGeometry orig = tile.calculateDimension(stringBounder); final UTranslate translate = getTranslate(stringBounder); if (orig.hasPointOut()) { return new FtileGeometry(dimTotal, orig.getLeft() + translate.getDx(), orig.getInY() + translate.getDy(), orig.getOutY() + translate.getDy()); } return new FtileGeometry(dimTotal, orig.getLeft() + translate.getDx(), orig.getInY() + translate.getDy()); } private Dimension2D calculateDimensionInternal(StringBounder stringBounder) { final Dimension2D dimNote = opale.calculateDimension(stringBounder); final Dimension2D dimTile = tile.calculateDimension(stringBounder); final double height = Math.max(dimNote.getHeight(), dimTile.getHeight()); return new Dimension2DDouble(dimTile.getWidth() + 1 * dimNote.getWidth() + suppSpace, height); } public double getStartingX(StringBounder stringBounder, double y) { return -opale.getMarginX1(); } public double getEndingX(StringBounder stringBounder, double y) { return opale.calculateDimension(stringBounder).getWidth() - opale.getMarginX1(); } } ���������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java�0000664�0000000�0000000�00000017024�13126503031�0033354�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.util.Collection; import java.util.Set; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.activitydiagram3.PositionedNote; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.CreoleParser; import net.sourceforge.plantuml.creole.Sheet; import net.sourceforge.plantuml.creole.SheetBlock1; import net.sourceforge.plantuml.creole.SheetBlock2; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.svek.image.Opale; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.utils.MathUtils; public class FtileWithNotes extends AbstractFtile { private final Ftile tile; private TextBlock left; private TextBlock right; private final double suppSpace = 20; public Set getSwimlanes() { return tile.getSwimlanes(); } public Swimlane getSwimlaneIn() { return tile.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return tile.getSwimlaneOut(); } public FtileWithNotes(Ftile tile, Collection notes, ISkinParam skinParam) { super(tile.skinParam()); this.tile = tile; final Rose rose = new Rose(); final HtmlColor noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground); final HtmlColor borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder); final FontConfiguration fc = new FontConfiguration(skinParam, FontParam.NOTE, null); for (PositionedNote note : notes) { final Sheet sheet = new CreoleParser(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL).createSheet(note.getDisplay()); final SheetBlock1 sheet1 = new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()); final SheetBlock2 sheet2 = new SheetBlock2(sheet1, new Stencil() { // -6 and 15 value comes from Opale: this is very ugly! public double getStartingX(StringBounder stringBounder, double y) { return -6; } public double getEndingX(StringBounder stringBounder, double y) { return sheet1.getEndingX(stringBounder, y) + 15; } }, new UStroke()); final Opale opale = new Opale(borderColor, noteBackgroundColor, sheet2, skinParam.shadowing(), false); final TextBlock opaleMarged = TextBlockUtils.withMargin(opale, 10, 10); if (note.getNotePosition() == NotePosition.LEFT) { if (left == null) { left = opaleMarged; } else { left = TextBlockUtils.mergeTB(left, opaleMarged, HorizontalAlignment.CENTER); } } else { if (right == null) { right = opaleMarged; } else { right = TextBlockUtils.mergeTB(right, opaleMarged, HorizontalAlignment.CENTER); } } } if (left == null) { left = TextBlockUtils.empty(0, 0); } if (right == null) { right = TextBlockUtils.empty(0, 0); } } private UTranslate getTranslate(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final Dimension2D dimTile = tile.calculateDimension(stringBounder); final double xDelta = left.calculateDimension(stringBounder).getWidth(); final double yDelta = (dimTotal.getHeight() - dimTile.getHeight()) / 2; return new UTranslate(xDelta, yDelta); } private UTranslate getTranslateForLeft(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final Dimension2D dimLeft = left.calculateDimension(stringBounder); final double xDelta = 0; final double yDelta = (dimTotal.getHeight() - dimLeft.getHeight()) / 2; return new UTranslate(xDelta, yDelta); } private UTranslate getTranslateForRight(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final Dimension2D dimRight = right.calculateDimension(stringBounder); final double xDelta = dimTotal.getWidth() - dimRight.getWidth(); final double yDelta = (dimTotal.getHeight() - dimRight.getHeight()) / 2; return new UTranslate(xDelta, yDelta); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); left.drawU(ug.apply(getTranslateForLeft(stringBounder))); right.drawU(ug.apply(getTranslateForRight(stringBounder))); ug.apply(getTranslate(stringBounder)).draw(tile); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final FtileGeometry orig = tile.calculateDimension(stringBounder); final UTranslate translate = getTranslate(stringBounder); if (orig.hasPointOut()) { return new FtileGeometry(dimTotal, orig.getLeft() + translate.getDx(), orig.getInY() + translate.getDy(), orig.getOutY() + translate.getDy()); } return new FtileGeometry(dimTotal, orig.getLeft() + translate.getDx(), orig.getInY() + translate.getDy()); } private Dimension2D calculateDimensionInternal(StringBounder stringBounder) { final Dimension2D dimTile = tile.calculateDimension(stringBounder); final Dimension2D dimLeft = left.calculateDimension(stringBounder); final Dimension2D dimRight = right.calculateDimension(stringBounder); final double height = MathUtils.max(dimLeft.getHeight(), dimRight.getHeight(), dimTile.getHeight()); return new Dimension2DDouble(dimTile.getWidth() + dimLeft.getWidth() + dimRight.getWidth(), height); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ParallelBuilderFork.java����������������������������������������������������������������������������0000664�0000000�0000000�00000020551�13126503031�0034251�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection; import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.ConnectionTranslatable; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileAssemblySimple; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileBlackBlock; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class ParallelBuilderFork extends ParallelFtilesBuilder { private final String label; public ParallelBuilderFork(ISkinParam skinParam, StringBounder stringBounder, final List list, Ftile inner, Swimlane swimlane, String label) { super(skinParam, stringBounder, list, inner, swimlane); this.label = label; } @Override protected Ftile doStep1() { Ftile result = getMiddle(); final List conns = new ArrayList(); final Ftile black = new FtileBlackBlock(skinParam(), getRose() .getHtmlColor(skinParam(), ColorParam.activityBar), getList().get(0).getSwimlaneIn()); double x = 0; for (Ftile tmp : getList()) { final Dimension2D dim = tmp.calculateDimension(getStringBounder()); conns.add(new ConnectionIn(black, tmp, x, tmp.getInLinkRendering().getRainbow( HtmlColorAndStyle.build(skinParam())))); x += dim.getWidth(); } result = FtileUtils.addConnection(result, conns); ((FtileBlackBlock) black).setBlackBlockDimension(result.calculateDimension(getStringBounder()).getWidth(), barHeight); return new FtileAssemblySimple(black, result); } @Override protected Ftile doStep2(Ftile result) { final Ftile out = new FtileBlackBlock(skinParam(), getRose().getHtmlColor(skinParam(), ColorParam.activityBar), getList().get(0).getSwimlaneIn()); ((FtileBlackBlock) out).setBlackBlockDimension(result.calculateDimension(getStringBounder()).getWidth(), barHeight); if (label != null) { ((FtileBlackBlock) out).setLabel(getTextBlock(Display.getWithNewlines(label))); } result = new FtileAssemblySimple(result, out); final List conns = new ArrayList(); double x = 0; for (Ftile tmp : getList()) { final UTranslate translate0 = new UTranslate(0, barHeight); final Dimension2D dim = tmp.calculateDimension(getStringBounder()); conns.add(new ConnectionOut(translate0, tmp, out, x, tmp.getOutLinkRendering().getRainbow( HtmlColorAndStyle.build(skinParam())), getHeightOfMiddle())); x += dim.getWidth(); } result = FtileUtils.addConnection(result, conns); return result; } class ConnectionIn extends AbstractConnection implements ConnectionTranslatable { private final double x; private final Rainbow arrowColor; private final Display label; public ConnectionIn(Ftile ftile1, Ftile ftile2, double x, Rainbow arrowColor) { super(ftile1, ftile2); label = ftile2.getInLinkRendering().getDisplay(); this.x = x; this.arrowColor = arrowColor; } public void drawU(UGraphic ug) { ug = ug.apply(new UTranslate(x, 0)); final FtileGeometry geo = getFtile2().calculateDimension(getStringBounder()); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); if (Display.isNull(label) == false) { snake.setLabel(getTextBlock(label)); } snake.addPoint(geo.getLeft(), 0); snake.addPoint(geo.getLeft(), geo.getInY()); ug.draw(snake); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { ug = ug.apply(new UTranslate(x, 0)); final FtileGeometry geo = getFtile2().calculateDimension(getStringBounder()); final Point2D p1 = new Point2D.Double(geo.getLeft(), 0); final Point2D p2 = new Point2D.Double(geo.getLeft(), geo.getInY()); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); if (Display.isNull(label) == false) { snake.setLabel(getTextBlock(label)); } final Point2D mp1a = translate1.getTranslated(p1); final Point2D mp2b = translate2.getTranslated(p2); final double middle = mp1a.getY() + 4; snake.addPoint(mp1a); snake.addPoint(mp1a.getX(), middle); snake.addPoint(mp2b.getX(), middle); snake.addPoint(mp2b); ug.draw(snake); } } class ConnectionOut extends AbstractConnection implements ConnectionTranslatable { private final double x; private final Rainbow arrowColor; private final double height; private final Display label; private final UTranslate translate0; public ConnectionOut(UTranslate translate0, Ftile ftile1, Ftile ftile2, double x, Rainbow arrowColor, double height) { super(ftile1, ftile2); this.translate0 = translate0; this.label = ftile1.getOutLinkRendering().getDisplay(); this.x = x; this.arrowColor = arrowColor; this.height = height; } public void drawU(UGraphic ug) { ug = ug.apply(new UTranslate(x, 0)); final FtileGeometry geo = getFtile1().calculateDimension(getStringBounder()); if (geo.hasPointOut() == false) { return; } final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); if (Display.isNull(label) == false) { snake.setLabel(getTextBlock(label)); } final Point2D p1 = translate0.getTranslated(new Point2D.Double(geo.getLeft(), geo.getOutY())); final Point2D p2 = translate0.getTranslated(new Point2D.Double(geo.getLeft(), height)); snake.addPoint(p1); snake.addPoint(p2); ug.draw(snake); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { ug = ug.apply(new UTranslate(x, 0)); final FtileGeometry geo = getFtile1().calculateDimension(getStringBounder()); if (geo.hasPointOut() == false) { return; } final Point2D p1 = translate0.getTranslated(new Point2D.Double(geo.getLeft(), geo.getOutY())); final Point2D p2 = translate0.getTranslated(new Point2D.Double(geo.getLeft(), height)); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); if (Display.isNull(label) == false) { snake.setLabel(getTextBlock(label)); } final Point2D mp1a = translate1.getTranslated(p1); final Point2D mp2b = translate2.getTranslated(p2); final double middle = mp2b.getY() - 14; snake.addPoint(mp1a); snake.addPoint(mp1a.getX(), middle); snake.addPoint(mp2b.getX(), middle); snake.addPoint(mp2b); ug.draw(snake); } } } �������������������������������������������������������������������������������������������������������������������������������������������������������ParallelBuilderMerge.java���������������������������������������������������������������������������0000664�0000000�0000000�00000020534�13126503031�0034410�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection; import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.ConnectionTranslatable; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileAssemblySimple; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileBlackBlock; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UTranslate; public class ParallelBuilderMerge extends ParallelFtilesBuilder { public ParallelBuilderMerge(ISkinParam skinParam, StringBounder stringBounder, final List list, Ftile inner, Swimlane swimlane) { super(skinParam, stringBounder, list, inner, swimlane); } @Override protected Ftile doStep1() { Ftile result = getMiddle(); final List conns = new ArrayList(); final HtmlColor colorBar = getRose().getHtmlColor(skinParam(), ColorParam.activityBar); final Ftile black = new FtileBlackBlock(skinParam(), colorBar, getList().get(0).getSwimlaneIn()); double x = 0; for (Ftile tmp : getList()) { final Dimension2D dim = tmp.calculateDimension(getStringBounder()); conns.add(new ConnectionIn(black, tmp, x, tmp.getInLinkRendering().getRainbow( HtmlColorAndStyle.build(skinParam())))); x += dim.getWidth(); } result = FtileUtils.addConnection(result, conns); ((FtileBlackBlock) black).setBlackBlockDimension(result.calculateDimension(getStringBounder()).getWidth(), barHeight); return new FtileAssemblySimple(black, result); } @Override protected Ftile doStep2(Ftile result) { final HtmlColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder); final HtmlColor backColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground); final Ftile out = new FtileDiamond(skinParam(), backColor, borderColor, swimlane()); result = new FtileAssemblySimple(result, out); final List conns = new ArrayList(); final UTranslate diamondTranslate = result.getTranslateFor(out, getStringBounder()); int i = 0; double x = 0; for (Ftile tmp : getList()) { final Dimension2D dim = tmp.calculateDimension(getStringBounder()); final UTranslate translate0 = new UTranslate(x, barHeight); conns.add(new ConnectionHorizontalThenVertical(tmp, out, tmp.getOutLinkRendering().getRainbow( HtmlColorAndStyle.build(skinParam())), translate0, diamondTranslate, i)); x += dim.getWidth(); i++; } return FtileUtils.addConnection(result, conns); } class ConnectionHorizontalThenVertical extends AbstractConnection /* implements ConnectionTranslatable */{ private final Rainbow arrowColor; private final UTranslate diamondTranslate; private final UTranslate translate0; private final int counter; public ConnectionHorizontalThenVertical(Ftile tile, Ftile diamond, Rainbow arrowColor, UTranslate translate0, UTranslate diamondTranslate, int counter) { super(tile, diamond); this.arrowColor = arrowColor; this.diamondTranslate = diamondTranslate; this.translate0 = translate0; this.counter = counter; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final double x1 = p1.getX(); final double y1 = p1.getY(); final double x2 = p2.getX(); final double y2 = p2.getY(); UPolygon endDecoration = null; if (counter == 0) { endDecoration = Arrows.asToRight(); } else if (counter == 1) { endDecoration = Arrows.asToLeft(); } final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, endDecoration); snake.addPoint(x1, y1); snake.addPoint(x1, y2); snake.addPoint(x2, y2); ug.draw(snake); } private Point2D getP1(StringBounder stringBounder) { return translate0.getTranslated(getFtile1().calculateDimension(stringBounder).getPointOut()); } private Point2D getP2(final StringBounder stringBounder) { final Point2D result = diamondTranslate.getTranslated(getFtile2().calculateDimension(stringBounder) .getPointOut()); final Dimension2D dim = getFtile2().calculateDimension(stringBounder); UTranslate arrival = new UTranslate(); if (counter == 0) { arrival = new UTranslate(-dim.getWidth() / 2, -dim.getHeight() / 2); } else if (counter == 1) { arrival = new UTranslate(dim.getWidth() / 2, -dim.getHeight() / 2); } return arrival.getTranslated(result); } } class ConnectionIn extends AbstractConnection implements ConnectionTranslatable { private final double x; private final Rainbow arrowColor; private final Display label; public ConnectionIn(Ftile ftile1, Ftile ftile2, double x, Rainbow arrowColor) { super(ftile1, ftile2); label = ftile2.getInLinkRendering().getDisplay(); this.x = x; this.arrowColor = arrowColor; } public void drawU(UGraphic ug) { ug = ug.apply(new UTranslate(x, 0)); final FtileGeometry geo = getFtile2().calculateDimension(getStringBounder()); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); if (Display.isNull(label) == false) { snake.setLabel(getTextBlock(label)); } snake.addPoint(geo.getLeft(), 0); snake.addPoint(geo.getLeft(), geo.getInY()); ug.draw(snake); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { ug = ug.apply(new UTranslate(x, 0)); final FtileGeometry geo = getFtile2().calculateDimension(getStringBounder()); final Point2D p1 = new Point2D.Double(geo.getLeft(), 0); final Point2D p2 = new Point2D.Double(geo.getLeft(), geo.getInY()); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); if (Display.isNull(label) == false) { snake.setLabel(getTextBlock(label)); } final Point2D mp1a = translate1.getTranslated(p1); final Point2D mp2b = translate2.getTranslated(p2); final double middle = mp1a.getY() + 4; snake.addPoint(mp1a); snake.addPoint(mp1a.getX(), middle); snake.addPoint(mp2b.getX(), middle); snake.addPoint(mp2b); ug.draw(snake); } } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������ParallelBuilderSplit.java���������������������������������������������������������������������������0000664�0000000�0000000�00000022236�13126503031�0034445�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection; import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.ConnectionTranslatable; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileKilled; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.MergeStrategy; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class ParallelBuilderSplit extends ParallelFtilesBuilder { public ParallelBuilderSplit(ISkinParam skinParam, StringBounder stringBounder, final List list, Ftile inner, Swimlane swimlane) { super(skinParam, stringBounder, list, inner, swimlane); } @Override protected Ftile doStep1() { Ftile result = getMiddle(); final List conns = new ArrayList(); double x1 = 0; for (Ftile tmp : getList()) { final Dimension2D dim = tmp.calculateDimension(getStringBounder()); conns.add(new ConnectionIn(tmp, x1, tmp.getInLinkRendering().getRainbow( HtmlColorAndStyle.build(skinParam())), getTextBlock(tmp.getInLinkRendering()))); x1 += dim.getWidth(); } final double totalWidth1 = result.calculateDimension(getStringBounder()).getWidth(); conns.add(new ConnectionHline2(result, HtmlColorAndStyle.build(skinParam()), 0, getList(), totalWidth1)); result = FtileUtils.addConnection(result, conns); return result; } @Override protected Ftile doStep2(Ftile result) { final List conns2 = new ArrayList(); double x2 = 0; boolean hasOut = false; for (Ftile tmp : getList()) { final Dimension2D dim = tmp.calculateDimension(getStringBounder()); final boolean hasOutTmp = tmp.calculateDimension(getStringBounder()).hasPointOut(); if (hasOutTmp) { conns2.add(new ConnectionOut(tmp, x2, tmp.getOutLinkRendering().getRainbow( HtmlColorAndStyle.build(skinParam())), getHeightOfMiddle(), getTextBlock(tmp .getOutLinkRendering()))); hasOut = true; } x2 += dim.getWidth(); } if (hasOut) { final double totalWidth2 = result.calculateDimension(getStringBounder()).getWidth(); conns2.add(new ConnectionHline2(result, HtmlColorAndStyle.build(skinParam()), getHeightOfMiddle(), getList(), totalWidth2)); result = FtileUtils.addConnection(result, conns2); } else { result = new FtileKilled(result); } return result; } static class ConnectionHline2 extends AbstractConnection { private final Ftile inner; private final double y; private final Rainbow arrowColor; private final List list; private final double totalWidth; public ConnectionHline2(Ftile inner, Rainbow arrowColor, double y, List list, double totalWidth) { super(null, null); this.inner = inner; this.y = y; this.arrowColor = arrowColor; this.list = list; this.totalWidth = totalWidth; } public void drawU(UGraphic ug) { double minX = Double.MAX_VALUE; double maxX = 0; if (y == 0 && ug instanceof UGraphicInterceptorOneSwimlane) { final Swimlane intoSw = ((UGraphicInterceptorOneSwimlane) ug).getSwimlane(); boolean found = false; for (Ftile tmp : list) { if (tmp.getSwimlaneIn() == intoSw) { found = true; } } if (found == false) { return; } } final StringBounder stringBounder = ug.getStringBounder(); for (Ftile tmp : list) { if (y > 0 && tmp.calculateDimension(stringBounder).hasPointOut() == false) { continue; } final UTranslate ut = inner.getTranslateFor(tmp, stringBounder); if (ut == null) { continue; } final double middle = tmp.calculateDimension(stringBounder).translate(ut).getLeft(); minX = Math.min(minX, middle); maxX = Math.max(maxX, middle); } if (minX > totalWidth / 2) { minX = totalWidth / 2; } if (maxX < totalWidth / 2) { maxX = totalWidth / 2; } final Snake s = new Snake(arrowHorizontalAlignment(), arrowColor); s.goUnmergeable(MergeStrategy.NONE); s.addPoint(minX, y); s.addPoint(maxX, y); ug.draw(s); } } static class ConnectionHline3 extends AbstractConnection implements ConnectionTranslatable { private final Ftile inner; private final double y; private final Rainbow arrowColor; private final List list; private final double totalWidth; public ConnectionHline3(Ftile inner, Rainbow arrowColor, double y, List list, double totalWidth) { super(null, null); this.inner = inner; this.y = y; this.arrowColor = arrowColor; this.list = list; this.totalWidth = totalWidth; } public void drawU(UGraphic ug) { throw new UnsupportedOperationException(); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { final StringBounder stringBounder = ug.getStringBounder(); final UTranslate left = inner.getSwimlaneIn().getTranslate(); double minX = inner.calculateDimension(stringBounder).getLeft() + left.getDx(); double maxX = minX; for (Ftile tmp : list) { final FtileGeometry tmpGeom = tmp.calculateDimension(stringBounder); final UTranslate tpos = inner.getTranslateFor(tmp, stringBounder); for (Swimlane sw : tmp.getSwimlanes()) { final double x = tmpGeom.translate(sw.getTranslate().compose(tpos)).getLeft(); minX = Math.min(minX, x); maxX = Math.max(maxX, x); } } final Dimension2D dimInner = inner.calculateDimension(stringBounder); final Snake s = new Snake(arrowHorizontalAlignment(), arrowColor); // final Snake s = new Snake(HtmlColorUtils.GREEN); s.goUnmergeable(MergeStrategy.LIMITED); s.addPoint(minX, y); s.addPoint(maxX, y); ug.draw(s); } } static class ConnectionIn extends AbstractConnection { private final double x; private final Rainbow arrowColor; private final TextBlock text; public ConnectionIn(Ftile tmp, double x, Rainbow arrowColor, TextBlock text) { super(null, tmp); this.x = x; this.arrowColor = arrowColor; this.text = text; } public void drawU(UGraphic ug) { ug = ug.apply(new UTranslate(x, 0)); final FtileGeometry geo = getFtile2().calculateDimension(ug.getStringBounder()); final double left = geo.getLeft(); final Snake s = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); s.setLabel(text); s.addPoint(left, 0); s.addPoint(left, geo.getInY()); ug.draw(s); } } static class ConnectionOut extends AbstractConnection { private final double x; private final Rainbow arrowColor; private final double height; private final TextBlock text; public ConnectionOut(Ftile tmp, double x, Rainbow arrowColor, double height, TextBlock text) { super(tmp, null); this.x = x; this.arrowColor = arrowColor; this.height = height; this.text = text; } public void drawU(UGraphic ug) { ug = ug.apply(new UTranslate(x, 0)); final FtileGeometry geo = getFtile1().calculateDimension(ug.getStringBounder()); if (geo.hasPointOut() == false) { assert false; return; } final Snake s = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); s.setLabel(text); s.goUnmergeable(MergeStrategy.NONE); s.addPoint(geo.getLeft(), geo.getOutY()); s.addPoint(geo.getLeft(), height); ug.draw(s); } } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ParallelBuilderSplit2.java��������������������������������������������������������������������������0000664�0000000�0000000�00000021633�13126503031�0034527�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection; import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.ConnectionTranslatable; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileAssemblySimple; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileKilled; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileThinSplit; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class ParallelBuilderSplit2 extends ParallelFtilesBuilder { public ParallelBuilderSplit2(ISkinParam skinParam, StringBounder stringBounder, final List list, Ftile inner, Swimlane swimlane) { super(skinParam, stringBounder, list, inner, swimlane); } @Override protected Ftile doStep1() { Ftile result = getMiddle(); final List conns = new ArrayList(); final Rainbow thinColor = result.getInLinkRendering().getRainbow(HtmlColorAndStyle.build(skinParam())); final Ftile thin = new FtileThinSplit(skinParam(), thinColor.getColor(), getList().get(0).getSwimlaneIn()); double x = 0; double first = 0; double last = 0; for (Ftile tmp : getList()) { final FtileGeometry dim = tmp.calculateDimension(getStringBounder()); if (first == 0) { first = dim.getLeft(); } last = x + dim.getLeft(); conns.add(new ConnectionIn(thin, tmp, x, tmp.getInLinkRendering().getRainbow( HtmlColorAndStyle.build(skinParam())))); x += dim.getWidth(); } result = FtileUtils.addConnection(result, conns); ((FtileThinSplit) thin).setGeom(first, last, result.calculateDimension(getStringBounder()).getWidth()); return new FtileAssemblySimple(thin, result); } private boolean hasOut() { for (Ftile tmp : getList()) { final boolean hasOutTmp = tmp.calculateDimension(getStringBounder()).hasPointOut(); if (hasOutTmp) { return true; } } return false; } @Override protected Ftile doStep2(Ftile result) { final FtileGeometry geom = result.calculateDimension(getStringBounder()); if (hasOut() == false) { return new FtileKilled(result); } final Rainbow thinColor = result.getInLinkRendering().getRainbow(HtmlColorAndStyle.build(skinParam())); final Ftile out = new FtileThinSplit(skinParam(), thinColor.getColor(), getList().get(0).getSwimlaneIn()); result = new FtileAssemblySimple(result, out); final List conns = new ArrayList(); double x = 0; double first = 0; double last = 0; for (Ftile tmp : getList()) { final UTranslate translate0 = new UTranslate(0, 1.5); final FtileGeometry dim = tmp.calculateDimension(getStringBounder()); if (dim.hasPointOut()) { if (first == 0) { first = dim.getLeft(); } last = x + dim.getLeft(); } conns.add(new ConnectionOut(translate0, tmp, out, x, tmp.getOutLinkRendering().getRainbow( HtmlColorAndStyle.build(skinParam())), getHeightOfMiddle())); x += dim.getWidth(); } if (last < geom.getLeft()) { last = geom.getLeft(); } ((FtileThinSplit) out).setGeom(first, last, geom.getWidth()); result = FtileUtils.addConnection(result, conns); return result; } class ConnectionIn extends AbstractConnection implements ConnectionTranslatable { private final double x; private final Rainbow arrowColor; private final Display label; public ConnectionIn(Ftile ftile1, Ftile ftile2, double x, Rainbow arrowColor) { super(ftile1, ftile2); label = ftile2.getInLinkRendering().getDisplay(); this.x = x; this.arrowColor = arrowColor; } public void drawU(UGraphic ug) { ug = ug.apply(new UTranslate(x, 0)); final FtileGeometry geo = getFtile2().calculateDimension(getStringBounder()); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); if (Display.isNull(label) == false) { snake.setLabel(getTextBlock(label)); } snake.addPoint(geo.getLeft(), 0); snake.addPoint(geo.getLeft(), geo.getInY()); ug.draw(snake); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { ug = ug.apply(new UTranslate(x, 0)); final FtileGeometry geo = getFtile2().calculateDimension(getStringBounder()); final Point2D p1 = new Point2D.Double(geo.getLeft(), 0); final Point2D p2 = new Point2D.Double(geo.getLeft(), geo.getInY()); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); if (Display.isNull(label) == false) { snake.setLabel(getTextBlock(label)); } final Point2D mp1a = translate1.getTranslated(p1); final Point2D mp2b = translate2.getTranslated(p2); final double middle = mp1a.getY() + 4; snake.addPoint(mp1a); snake.addPoint(mp1a.getX(), middle); snake.addPoint(mp2b.getX(), middle); snake.addPoint(mp2b); ug.draw(snake); } } class ConnectionOut extends AbstractConnection implements ConnectionTranslatable { private final double x; private final Rainbow arrowColor; private final double height; private final Display label; private final UTranslate translate0; public ConnectionOut(UTranslate translate0, Ftile ftile1, Ftile ftile2, double x, Rainbow arrowColor, double height) { super(ftile1, ftile2); this.translate0 = translate0; this.label = ftile1.getOutLinkRendering().getDisplay(); this.x = x; this.arrowColor = arrowColor; this.height = height; } public void drawU(UGraphic ug) { ug = ug.apply(new UTranslate(x, 0)); final FtileGeometry geo = getFtile1().calculateDimension(getStringBounder()); if (geo.hasPointOut() == false) { return; } final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); if (Display.isNull(label) == false) { snake.setLabel(getTextBlock(label)); } final Point2D p1 = translate0.getTranslated(new Point2D.Double(geo.getLeft(), geo.getOutY())); final Point2D p2 = translate0.getTranslated(new Point2D.Double(geo.getLeft(), height)); snake.addPoint(p1); snake.addPoint(p2); ug.draw(snake); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { ug = ug.apply(new UTranslate(x, 0)); final FtileGeometry geo = getFtile1().calculateDimension(getStringBounder()); if (geo.hasPointOut() == false) { return; } final Point2D p1 = translate0.getTranslated(new Point2D.Double(geo.getLeft(), geo.getOutY())); final Point2D p2 = translate0.getTranslated(new Point2D.Double(geo.getLeft(), height)); final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown()); if (Display.isNull(label) == false) { snake.setLabel(getTextBlock(label)); } final Point2D mp1a = translate1.getTranslated(p1); final Point2D mp2b = translate2.getTranslated(p2); final double middle = mp2b.getY() - 14; snake.addPoint(mp1a); snake.addPoint(mp1a.getX(), middle); snake.addPoint(mp2b.getX(), middle); snake.addPoint(mp2b); ug.draw(snake); } } } �����������������������������������������������������������������������������������������������������ParallelFtilesBuilder.java��������������������������������������������������������������������������0000664�0000000�0000000�00000007612�13126503031�0034601�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.skin.rose.Rose; public abstract class ParallelFtilesBuilder { protected final double barHeight = 6; private final Rose rose = new Rose(); private final ISkinParam skinParam; private final StringBounder stringBounder; private final List list; private final Ftile middle; private final FtileGeometry middleDimension; private final Swimlane swimlane; public ParallelFtilesBuilder(ISkinParam skinParam, StringBounder stringBounder, final List list, Ftile middle, Swimlane swimlane) { this.skinParam = skinParam; this.stringBounder = stringBounder; this.list = list; this.middle = middle; this.middleDimension = middle.calculateDimension(getStringBounder()); this.swimlane = swimlane; } public final Ftile build() { final Ftile step1 = doStep1(); return doStep2(step1); } protected abstract Ftile doStep1(); protected abstract Ftile doStep2(Ftile step1); protected StringBounder getStringBounder() { return stringBounder; } protected Rose getRose() { return rose; } protected ISkinParam skinParam() { return skinParam; } protected final TextBlock getTextBlock(Display display) { // DUP3945 if (Display.isNull(display)) { return null; } final FontConfiguration fontConfiguration = new FontConfiguration(skinParam(), FontParam.ARROW, null); return display.create(fontConfiguration, HorizontalAlignment.LEFT, skinParam(), CreoleMode.SIMPLE_LINE); } protected TextBlock getTextBlock(LinkRendering linkRendering) { // DUP1433 final Display display = linkRendering.getDisplay(); return getTextBlock(display); } protected final List getList() { return Collections.unmodifiableList(list); } protected final Ftile getMiddle() { return middle; } protected final double getHeightOfMiddle() { return middleDimension.getHeight(); } protected final Swimlane swimlane() { return swimlane; } } ����������������������������������������������������������������������������������������������������������������������UGraphicInterceptorGoto.java������������������������������������������������������������������������0000664�0000000�0000000�00000004050�13126503031�0035132�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.graphic.UGraphicDelegator; import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UShape; public class UGraphicInterceptorGoto extends UGraphicDelegator { public UGraphicInterceptorGoto(UGraphic ug) { super(ug); } public void draw(UShape shape) { System.err.println("inter=" + shape.getClass()); if (shape instanceof Ftile) { final Ftile foo = (Ftile) shape; foo.drawU(this); } else { getUg().draw(shape); System.err.println("Drawing " + shape); } } public UGraphic apply(UChange change) { return new UGraphicInterceptorGoto(getUg().apply(change)); } }����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������UGraphicInterceptorOneSwimlane.java�����������������������������������������������������������������0000664�0000000�0000000�00000006664�13126503031�0036460�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.util.Set; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.UGraphicDelegator; import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UShape; public class UGraphicInterceptorOneSwimlane extends UGraphicDelegator { private final Swimlane swimlane; public UGraphicInterceptorOneSwimlane(UGraphic ug, Swimlane swimlane) { super(ug); this.swimlane = swimlane; } public void draw(UShape shape) { // System.err.println("inter=" + shape.getClass()); if (shape instanceof Ftile) { final Ftile tile = (Ftile) shape; final Set swinlanes = tile.getSwimlanes(); final boolean contained = swinlanes.contains(swimlane); if (contained) { tile.drawU(this); // drawGoto(); } } else if (shape instanceof Connection) { final Connection connection = (Connection) shape; final Ftile tile1 = connection.getFtile1(); final Ftile tile2 = connection.getFtile2(); final boolean contained1 = tile1 == null || tile1.getSwimlaneOut() == null || tile1.getSwimlaneOut() == swimlane; final boolean contained2 = tile2 == null || tile2.getSwimlaneIn() == null || tile2.getSwimlaneIn() == swimlane; if (contained1 && contained2) { connection.drawU(this); } } else { getUg().draw(shape); // System.err.println("Drawing " + shape); } } private void drawGoto() { final UGraphic ugGoto = getUg().apply(new UChangeColor(HtmlColorUtils.GREEN)).apply( new UChangeBackColor(HtmlColorUtils.GREEN)); ugGoto.draw(new ULine(100, 100)); } public UGraphic apply(UChange change) { return new UGraphicInterceptorOneSwimlane(getUg().apply(change), swimlane); } public final Swimlane getSwimlane() { return swimlane; } }����������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java0000664�0000000�0000000�00000014227�13126503031�0033512�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; import java.util.ArrayList; import java.util.Collection; import java.util.List; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.activitydiagram3.Branch; import net.sourceforge.plantuml.activitydiagram3.ForkStyle; import net.sourceforge.plantuml.activitydiagram3.Instruction; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.PositionedNote; import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileAssemblySimple; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileBox; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleEnd; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleStart; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleStop; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorateIn; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorateOut; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.ugraphic.UFont; public class VCompactFactory implements FtileFactory { private final ISkinParam skinParam; private final Rose rose = new Rose(); private final StringBounder stringBounder; public StringBounder getStringBounder() { return stringBounder; } public VCompactFactory(ISkinParam skinParam, StringBounder stringBounder) { this.skinParam = skinParam; this.stringBounder = stringBounder; } public Ftile start(Swimlane swimlane) { final HtmlColor color = rose.getHtmlColor(skinParam, ColorParam.activityStart); return new FtileCircleStart(skinParam(), color, swimlane); } public Ftile stop(Swimlane swimlane) { final HtmlColor color = rose.getHtmlColor(skinParam, ColorParam.activityEnd); return new FtileCircleStop(skinParam(), color, swimlane); } public Ftile end(Swimlane swimlane) { final HtmlColor color = rose.getHtmlColor(skinParam, ColorParam.activityEnd); return new FtileCircleEnd(skinParam(), color, swimlane); } public Ftile activity(Display label, Swimlane swimlane, BoxStyle style, Colors colors) { // final HtmlColor borderColor = rose.getHtmlColor(skinParam, ColorParam.activityBorder); // final HtmlColor backColor = color == null ? rose.getHtmlColor(skinParam, ColorParam.activityBackground) : // color; final UFont font = skinParam.getFont(null, false, FontParam.ACTIVITY); return new FtileBox(colors.mute(skinParam), label, font, swimlane, style); } public Ftile addNote(Ftile ftile, Swimlane swimlane, Collection notes) { return ftile; } public Ftile addUrl(Ftile ftile, Url url) { return ftile; } public Ftile assembly(Ftile tile1, Ftile tile2) { return new FtileAssemblySimple(tile1, tile2); } public Ftile repeat(Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, Ftile repeat, Display test, Display yes, Display out, HtmlColor color, LinkRendering backRepeatLinkRendering, Ftile backward) { return repeat; } public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out, LinkRendering afterEndwhile, HtmlColor color, Instruction specialOut) { return whileBlock; } public Ftile createIf(Swimlane swimlane, List thens, Branch elseBranch, LinkRendering afterEndwhile, LinkRendering topInlinkRendering) { final List ftiles = new ArrayList(); for (Branch branch : thens) { ftiles.add(branch.getFtile()); } ftiles.add(elseBranch.getFtile()); return new FtileForkInner(ftiles); } public Ftile createParallel(Swimlane swimlane, List all, ForkStyle style, String label) { return new FtileForkInner(all); } public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note, HtmlColor borderColor) { return list; } public Ftile decorateIn(final Ftile ftile, final LinkRendering linkRendering) { return new FtileDecorateIn(ftile, linkRendering); } public Ftile decorateOut(final Ftile ftile, final LinkRendering linkRendering) { // if (ftile instanceof FtileWhile) { // if (linkRendering != null) { // ((FtileWhile) ftile).changeAfterEndwhileColor(linkRendering.getColor()); // } // return ftile; // } return new FtileDecorateOut(ftile, linkRendering); } public ISkinParam skinParam() { return skinParam; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/���������������0000775�0000000�0000000�00000000000�13126503031�0030520�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ConditionalBuilder.java�����������������������������������������������������������������������������0000664�0000000�0000000�00000026746�13126503031�0035075�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond�����������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.activitydiagram3.Branch; import net.sourceforge.plantuml.activitydiagram3.ftile.Diamond; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileEmpty; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileMinWidth; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileIfDown; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamondInside; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.CreoleParser; import net.sourceforge.plantuml.creole.Sheet; import net.sourceforge.plantuml.creole.SheetBlock1; import net.sourceforge.plantuml.creole.SheetBlock2; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.svek.ConditionStyle; public class ConditionalBuilder { private final Swimlane swimlane; private final HtmlColor borderColor; private final HtmlColor backColor; private final Rainbow arrowColor; private final FtileFactory ftileFactory; private final ConditionStyle conditionStyle; private final Branch branch1; private final Branch branch2; private final ISkinParam skinParam; private final StringBounder stringBounder; private final FontConfiguration fontArrow; private final FontConfiguration fontTest; private final Ftile tile1; private final Ftile tile2; public ConditionalBuilder(Swimlane swimlane, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor, FtileFactory ftileFactory, ConditionStyle conditionStyle, Branch branch1, Branch branch2, ISkinParam skinParam, StringBounder stringBounder, FontConfiguration fontArrow, FontConfiguration fontTest) { this.swimlane = swimlane; this.borderColor = borderColor; this.backColor = backColor; this.arrowColor = arrowColor; this.ftileFactory = ftileFactory; this.conditionStyle = conditionStyle; this.branch1 = branch1; this.branch2 = branch2; this.skinParam = skinParam; this.stringBounder = stringBounder; this.fontArrow = fontArrow; this.fontTest = fontTest; this.tile1 = new FtileMinWidth(branch1.getFtile(), 30); this.tile2 = new FtileMinWidth(branch2.getFtile(), 30); } static public Ftile create(Swimlane swimlane, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor, FtileFactory ftileFactory, ConditionStyle conditionStyle, Branch branch1, Branch branch2, ISkinParam skinParam, StringBounder stringBounder, FontConfiguration fcArrow, FontConfiguration fcTest) { final ConditionalBuilder builder = new ConditionalBuilder(swimlane, borderColor, backColor, arrowColor, ftileFactory, conditionStyle, branch1, branch2, skinParam, stringBounder, fcArrow, fcTest); if (isEmptyOrOnlySingleStop(branch2) && isEmptyOrOnlySingleStop(branch1) == false) { return builder.createDown(builder.branch1, builder.branch2); } if (branch1.isEmpty() && branch2.isOnlySingleStop()) { return builder.createDown(builder.branch1, builder.branch2); } if (isEmptyOrOnlySingleStop(branch1) && isEmptyOrOnlySingleStop(branch2) == false) { return builder.createDown(builder.branch2, builder.branch1); } if (branch2.isEmpty() && branch1.isOnlySingleStop()) { return builder.createDown(builder.branch2, builder.branch1); } return builder.createWithLinks(); // return builder.createWithDiamonds(); // return builder.createNude(); } private static boolean isEmptyOrOnlySingleStop(Branch branch) { return branch.isEmpty() || branch.isOnlySingleStop(); } private Ftile createDown(Branch branch1, Branch branch2) { final Ftile tile1 = new FtileMinWidth(branch1.getFtile(), 30); final Ftile tile2 = new FtileMinWidth(branch2.getFtile(), 30); final TextBlock tb1 = getLabelPositive(branch1); final TextBlock tb2 = getLabelPositive(branch2); final Ftile diamond1 = getDiamond1(false, tb1, tb2); final Ftile diamond2 = getDiamond2(branch1, branch2, true); if (branch2.isOnlySingleStop()) { return FtileIfDown.create(diamond1, diamond2, swimlane, FtileUtils.addHorizontalMargin(tile1, 10), arrowColor, ftileFactory, branch2.getFtile(), branch2.getInlinkRenderingColorAndStyle()); } if (branch1.isOnlySingleStop()) { return FtileIfDown.create(diamond1, diamond2, swimlane, FtileUtils.addHorizontalMargin(tile2, 10), arrowColor, ftileFactory, branch1.getFtile(), branch1.getInlinkRenderingColorAndStyle()); } if (branch1.isEmpty()) { return FtileIfDown.create(diamond1, diamond2, swimlane, FtileUtils.addHorizontalMargin(tile2, 10), arrowColor, ftileFactory, null, null); } return FtileIfDown.create(diamond1, diamond2, swimlane, FtileUtils.addHorizontalMargin(tile1, 10), arrowColor, ftileFactory, null, branch2.getInlinkRenderingColorAndStyle()); } private Ftile createNude() { return new FtileIfNude(tile1, tile2, swimlane); } private Ftile createWithDiamonds() { final Ftile diamond1 = getDiamond1(true); final Ftile diamond2 = getDiamond2(branch1, branch2, false); final FtileIfWithDiamonds ftile = new FtileIfWithDiamonds(diamond1, tile1, tile2, diamond2, swimlane, stringBounder); final Dimension2D label1 = getLabelPositive(branch1).calculateDimension(stringBounder); final Dimension2D label2 = getLabelPositive(branch2).calculateDimension(stringBounder); final double diff1 = ftile.computeMarginNeedForBranchLabe1(stringBounder, label1); final double diff2 = ftile.computeMarginNeedForBranchLabe2(stringBounder, label2); Ftile result = FtileUtils.addHorizontalMargin(ftile, diff1, diff2); final double suppHeight = ftile.computeVerticalMarginNeedForBranchs(stringBounder, label1, label2); result = FtileUtils.addVerticalMargin(result, suppHeight, 0); return result; } private Ftile createWithLinks() { final Ftile diamond1 = getDiamond1(true); final Ftile diamond2 = getDiamond2(branch1, branch2, false); final Ftile tmp1 = FtileUtils.addHorizontalMargin(tile1, 10); final Ftile tmp2 = FtileUtils.addHorizontalMargin(tile2, 10); final FtileIfWithLinks ftile = new FtileIfWithLinks(diamond1, tmp1, tmp2, diamond2, swimlane, arrowColor, stringBounder); final Dimension2D label1 = getLabelPositive(branch1).calculateDimension(stringBounder); final Dimension2D label2 = getLabelPositive(branch2).calculateDimension(stringBounder); final double diff1 = ftile.computeMarginNeedForBranchLabe1(stringBounder, label1); final double diff2 = ftile.computeMarginNeedForBranchLabe2(stringBounder, label2); final double suppHeight = ftile.computeVerticalMarginNeedForBranchs(stringBounder, label1, label2); Ftile result = ftile.addLinks(branch1, branch2, stringBounder); result = FtileUtils.addHorizontalMargin(result, diff1, diff2); result = FtileUtils.addVerticalMargin(result, suppHeight, 0); return result; } private Ftile getDiamond1(boolean eastWest) { return getDiamond1(eastWest, getLabelPositive(branch1), getLabelPositive(branch2)); } private Ftile getDiamond1(boolean eastWest, TextBlock tb1, TextBlock tb2) { final Display labelTest = branch1.getLabelTest(); final Sheet sheet = new CreoleParser(fontTest, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL).createSheet(labelTest); final SheetBlock1 sheetBlock1 = new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()); final TextBlock tbTest = new SheetBlock2(sheetBlock1, Diamond.asStencil(sheetBlock1), tile1.getThickness()); final Ftile diamond1; if (conditionStyle == ConditionStyle.INSIDE) { if (eastWest) { diamond1 = new FtileDiamondInside(tile1.skinParam(), backColor, borderColor, swimlane, tbTest) .withWestAndEast(tb1, tb2); } else { diamond1 = new FtileDiamondInside(tile1.skinParam(), backColor, borderColor, swimlane, tbTest) .withSouth(tb1).withEast(tb2); } } else if (conditionStyle == ConditionStyle.DIAMOND) { if (eastWest) { diamond1 = new FtileDiamond(tile1.skinParam(), backColor, borderColor, swimlane).withNorth(tbTest) .withWestAndEast(tb1, tb2); } else { diamond1 = new FtileDiamond(tile1.skinParam(), backColor, borderColor, swimlane).withNorth(tbTest) .withSouth(tb1).withEast(tb2); } } else { throw new IllegalStateException(); } return diamond1; } private TextBlock getLabelPositive(Branch branch) { return branch.getLabelPositive().create(fontArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam(), CreoleMode.SIMPLE_LINE); } private Ftile getDiamond2(Branch branch1, Branch branch2, boolean useNorth) { final Ftile diamond2; if (hasTwoBranches()) { final Display out1 = branch1.getFtile().getOutLinkRendering().getDisplay(); final TextBlock tbout1 = out1 == null ? null : out1.create(fontArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam(), CreoleMode.SIMPLE_LINE); final Display out2 = branch2.getFtile().getOutLinkRendering().getDisplay(); final TextBlock tbout2 = out2 == null ? null : out2.create(fontArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam(), CreoleMode.SIMPLE_LINE); FtileDiamond tmp = new FtileDiamond(tile1.skinParam(), backColor, borderColor, swimlane); tmp = useNorth ? tmp.withNorth(tbout1) : tmp.withWest(tbout1); tmp = tmp.withEast(tbout2); diamond2 = tmp; } else { diamond2 = new FtileEmpty(tile1.skinParam(), 0, Diamond.diamondHalfSize / 2, swimlane, swimlane); } return diamond2; } public boolean hasTwoBranches() { return tile1.calculateDimension(stringBounder).hasPointOut() && tile2.calculateDimension(stringBounder).hasPointOut(); } // private HtmlColor fontColor() { // return skinParam.getFontHtmlColor(FontParam.ACTIVITY_DIAMOND, null); // } } ��������������������������FtileDimensionMemoize.java��������������������������������������������������������������������������0000664�0000000�0000000�00000004103�13126503031�0035541�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond�����������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.graphic.StringBounder; public abstract class FtileDimensionMemoize extends AbstractFtile { public FtileDimensionMemoize(ISkinParam skinParam) { super(skinParam); } private FtileGeometry calculateDimensionInternal; protected final FtileGeometry calculateDimensionInternal(StringBounder stringBounder) { if (calculateDimensionInternal == null) { calculateDimensionInternal = calculateDimensionInternalSlow(stringBounder); } return calculateDimensionInternal; } abstract protected FtileGeometry calculateDimensionInternalSlow(StringBounder stringBounder); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileIfNude.java������������������������������������������������������������������������������������0000664�0000000�0000000�00000012546�13126503031�0033452�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond�����������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond; import java.awt.geom.Dimension2D; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.Set; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileIfNude extends FtileDimensionMemoize { protected final Ftile tile1; protected final Ftile tile2; private final Swimlane in; FtileIfNude(Ftile tile1, Ftile tile2, Swimlane in) { super(tile1.skinParam()); this.tile1 = tile1; this.tile2 = tile2; this.in = in; } @Override public Collection getMyChildren() { return Arrays.asList(tile1, tile2); } public boolean hasTwoBranches(StringBounder stringBounder) { return tile1.calculateDimension(stringBounder).hasPointOut() && tile2.calculateDimension(stringBounder).hasPointOut(); } public Set getSwimlanes() { final Set result = new HashSet(); if (getSwimlaneIn() != null) { result.add(getSwimlaneIn()); } result.addAll(tile1.getSwimlanes()); result.addAll(tile2.getSwimlanes()); return Collections.unmodifiableSet(result); } public Swimlane getSwimlaneIn() { return in; } public Swimlane getSwimlaneOut() { return getSwimlaneIn(); } protected UTranslate getTranslate1(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final Dimension2D dim1 = tile1.calculateDimension(stringBounder); final double x1 = 0; final double y1 = 0; return new UTranslate(x1, y1); } protected UTranslate getTranslate2(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final Dimension2D dim2 = tile2.calculateDimension(stringBounder); final double x2 = dimTotal.getWidth() - dim2.getWidth(); final double y2 = 0; return new UTranslate(x2, y2); } @Override public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) { if (child == tile1) { return getTranslate1(stringBounder); } if (child == tile2) { return getTranslate2(stringBounder); } throw new UnsupportedOperationException(); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); ug.apply(getTranslate1(stringBounder)).draw(tile1); ug.apply(getTranslate2(stringBounder)).draw(tile2); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final FtileGeometry dimTotal = calculateDimensionInternal(stringBounder); if (tile1.calculateDimension(stringBounder).hasPointOut() || tile2.calculateDimension(stringBounder).hasPointOut()) { return dimTotal; } return dimTotal.withoutPointOut(); } @Override protected FtileGeometry calculateDimensionInternalSlow(StringBounder stringBounder) { final FtileGeometry dim1 = tile1.calculateDimension(stringBounder); final FtileGeometry dim2 = tile2.calculateDimension(stringBounder); final double innerMargin = withInner(stringBounder); final double width = dim1.getLeft() + innerMargin + (dim2.getWidth() - dim2.getLeft()); final Dimension2D dim12 = Dimension2DDouble.mergeLR(dim1, dim2); return new FtileGeometry(width, dim12.getHeight(), dim1.getLeft() + innerMargin / 2, 0); } protected double withInner(StringBounder stringBounder) { final FtileGeometry dim1 = tile1.calculateDimension(stringBounder); final FtileGeometry dim2 = tile2.calculateDimension(stringBounder); return (dim1.getWidth() - dim1.getLeft()) + dim2.getLeft(); } // protected double getLeft(StringBounder stringBounder) { // final double left1 = tile1.calculateDimension(stringBounder).translate(getTranslate1(stringBounder)).getLeft(); // final double left2 = tile2.calculateDimension(stringBounder).translate(getTranslate2(stringBounder)).getLeft(); // return (left1 + left2) / 2; // } } ����������������������������������������������������������������������������������������������������������������������������������������������������������FtileIfWithDiamonds.java����������������������������������������������������������������������������0000664�0000000�0000000�00000014651�13126503031�0035150�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond�����������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond; import java.awt.geom.Dimension2D; import java.util.Arrays; import java.util.Collection; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileIfWithDiamonds extends FtileIfNude { private final double SUPP_WITH = 20; protected final Ftile diamond1; protected final Ftile diamond2; public FtileIfWithDiamonds(Ftile diamond1, Ftile tile1, Ftile tile2, Ftile diamond2, Swimlane in, StringBounder stringBounder) { super(tile1, tile2, in); this.diamond1 = diamond1; this.diamond2 = diamond2; } @Override public Collection getMyChildren() { return Arrays.asList(diamond1, diamond2, tile1, tile2); } public int getYdelta1a(StringBounder stringBounder) { // if (getSwimlanes().size() > 1 && hasTwoBranches(stringBounder)) { if (getSwimlanes().size() > 1) { return 20; } return 10; // return hasTwoBranches(stringBounder) ? 6 : 6; } public int getYdelta1b(StringBounder stringBounder) { // if (getSwimlanes().size() > 1 && hasTwoBranches(stringBounder)) { if (getSwimlanes().size() > 1) { return 10; } return hasTwoBranches(stringBounder) ? 6 : 0; } @Override protected double withInner(StringBounder stringBounder) { final FtileGeometry dim1 = diamond1.calculateDimension(stringBounder); return Math.max(super.withInner(stringBounder), dim1.getWidth() + SUPP_WITH); } @Override protected FtileGeometry calculateDimensionInternalSlow(StringBounder stringBounder) { final FtileGeometry dim1 = diamond1.calculateDimension(stringBounder); final FtileGeometry dim2 = diamond2.calculateDimension(stringBounder); final FtileGeometry dimNude = super.calculateDimensionInternalSlow(stringBounder); final FtileGeometry all = dim1.appendBottom(dimNude).appendBottom(dim2); return all.addDim(0, getYdelta1a(stringBounder) + getYdelta1b(stringBounder)); // final double height = dimNude.getHeight() + dim1.getHeight() + dim2.getHeight() + getYdelta1a(stringBounder) // + getYdelta1b(stringBounder); // return new Dimension2DDouble(width, height); } @Override public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); ug.apply(getTranslateDiamond1(stringBounder)).draw(diamond1); super.drawU(ug); ug.apply(getTranslateDiamond2(stringBounder)).draw(diamond2); } @Override protected UTranslate getTranslate1(StringBounder stringBounder) { final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); return super.getTranslate1(stringBounder).compose( new UTranslate(0, dimDiamond1.getHeight() + getYdelta1a(stringBounder))); } @Override protected UTranslate getTranslate2(StringBounder stringBounder) { final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); return super.getTranslate2(stringBounder).compose( new UTranslate(0, dimDiamond1.getHeight() + getYdelta1a(stringBounder))); } protected UTranslate getTranslateDiamond1(StringBounder stringBounder) { final double y1 = 0; final FtileGeometry dimTotal = calculateDimensionInternal(stringBounder); final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); // final double x1 = getLeft(stringBounder) - dimDiamond1.getWidth() / 2; final double x1 = dimTotal.getLeft() - dimDiamond1.getLeft(); return new UTranslate(x1, y1); } protected UTranslate getTranslateDiamond2(StringBounder stringBounder) { final FtileGeometry dimTotal = calculateDimensionInternal(stringBounder); final FtileGeometry dimDiamond2 = diamond2.calculateDimension(stringBounder); final double y2 = dimTotal.getHeight() - dimDiamond2.getHeight(); final double x2 = dimTotal.getLeft() - dimDiamond2.getWidth() / 2; return new UTranslate(x2, y2); } public double computeMarginNeedForBranchLabe1(StringBounder stringBounder, Dimension2D label1) { final double widthLabelBranch1 = label1.getWidth(); final double dxDiamond = getTranslateDiamond1(stringBounder).getDx(); final double diff = widthLabelBranch1 - dxDiamond; if (diff > 0) { return diff; } return 0; } public double computeMarginNeedForBranchLabe2(StringBounder stringBounder, Dimension2D label2) { final double widthLabelBranch2 = label2.getWidth(); final double theoricalEndNeeded = getTranslateDiamond1(stringBounder).getDx() + diamond1.calculateDimension(stringBounder).getWidth() + widthLabelBranch2; final double diff = theoricalEndNeeded - calculateDimension(stringBounder).getWidth(); if (diff > 0) { return diff; } return 0; } public double computeVerticalMarginNeedForBranchs(StringBounder stringBounder, Dimension2D label1, Dimension2D label2) { final double heightLabels = Math.max(label1.getHeight(), label2.getHeight()); final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final double dyDiamond = dimDiamond1.getHeight(); final double diff = heightLabels - dyDiamond; if (diff > 0) { return diff; } return 0; } } ���������������������������������������������������������������������������������������FtileIfWithLinks.java�������������������������������������������������������������������������������0000664�0000000�0000000�00000034701�13126503031�0034470�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond�����������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.cond; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.activitydiagram3.Branch; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection; import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.ConnectionTranslatable; import net.sourceforge.plantuml.activitydiagram3.ftile.Diamond; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.MergeStrategy; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileIfWithLinks extends FtileIfWithDiamonds { private final Rainbow arrowColor; public FtileIfWithLinks(Ftile diamond1, Ftile tile1, Ftile tile2, Ftile diamond2, Swimlane in, Rainbow arrowColor, StringBounder stringBounder) { super(diamond1, tile1, tile2, diamond2, in, stringBounder); this.arrowColor = arrowColor; if (arrowColor.size() == 0) { throw new IllegalArgumentException(); } } public static Rainbow getInColor(Branch branch, Rainbow arrowColor) { if (branch.isEmpty()) { return branch.getFtile().getOutLinkRendering().getRainbow(arrowColor); } final LinkRendering linkIn = branch.getFtile().getInLinkRendering(); final Rainbow color = linkIn == null ? arrowColor : linkIn.getRainbow(); if (color.size() == 0) { return arrowColor; } return color; } class ConnectionHorizontalThenVertical extends AbstractConnection implements ConnectionTranslatable { private final Rainbow color; private final UPolygon usingArrow; public ConnectionHorizontalThenVertical(Ftile tile, Branch branch) { super(diamond1, tile); color = getInColor(branch, arrowColor); if (color.size() == 0) { getInColor(branch, arrowColor); throw new IllegalArgumentException(); } usingArrow = branch.isEmpty() ? null : Arrows.asToDown(); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Point2D p1 = getP1(stringBounder); final Point2D p2 = getP2(stringBounder); final double x1 = p1.getX(); final double y1 = p1.getY(); final double x2 = p2.getX(); final double y2 = p2.getY(); final Snake snake = new Snake(arrowHorizontalAlignment(), color, usingArrow); snake.addPoint(x1, y1); snake.addPoint(x2, y1); snake.addPoint(x2, y2); ug.draw(snake); } private Point2D getP1(StringBounder stringBounder) { final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final double diamondWidth = dimDiamond1.getWidth(); final double x; if (getFtile2() == tile1) { x = 0; } else if (getFtile2() == tile2) { x = diamondWidth; } else { throw new IllegalStateException(); } final double half = (dimDiamond1.getOutY() - dimDiamond1.getInY()) / 2; return getTranslateDiamond1(stringBounder) .getTranslated(new Point2D.Double(x, dimDiamond1.getInY() + half)); } private Point2D getP2(final StringBounder stringBounder) { return translate(stringBounder).getTranslated(getFtile2().calculateDimension(stringBounder).getPointIn()); } private UTranslate translate(StringBounder stringBounder) { if (getFtile2() == tile1) { return getTranslate1(stringBounder); } if (getFtile2() == tile2) { return getTranslate2(stringBounder); } throw new IllegalStateException(); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { final StringBounder stringBounder = ug.getStringBounder(); Point2D p1 = getP1(stringBounder); Point2D p2 = getP2(stringBounder); final Direction originalDirection = Direction.leftOrRight(p1, p2); p1 = translate1.getTranslated(p1); p2 = translate2.getTranslated(p2); final Direction newDirection = Direction.leftOrRight(p1, p2); if (originalDirection != newDirection) { final double delta = (originalDirection == Direction.RIGHT ? -1 : 1) * Diamond.diamondHalfSize; final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); final Snake small = new Snake(arrowHorizontalAlignment(), color); small.addPoint(p1); small.addPoint(p1.getX() + delta, p1.getY()); small.addPoint(p1.getX() + delta, p1.getY() + dimDiamond1.getHeight() * .75); ug.draw(small); p1 = small.getLast(); } final Snake snake = new Snake(arrowHorizontalAlignment(), color, usingArrow); snake.addPoint(p1); snake.addPoint(p2.getX(), p1.getY()); snake.addPoint(p2); snake.goUnmergeable(MergeStrategy.LIMITED); ug.draw(snake); } } class ConnectionVerticalThenHorizontal extends AbstractConnection implements ConnectionTranslatable { private final Rainbow myArrowColor; private final boolean branchEmpty; public ConnectionVerticalThenHorizontal(Ftile tile, Rainbow myArrowColor, boolean branchEmpty) { super(tile, diamond2); this.myArrowColor = myArrowColor == null || myArrowColor.size() == 0 ? arrowColor : myArrowColor; this.branchEmpty = branchEmpty; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final FtileGeometry geo = getFtile1().calculateDimension(stringBounder); if (geo.hasPointOut() == false) { return; } final Point2D p1 = geo.translate(translate(stringBounder)).getPointOut(); final Point2D p2 = getP2(stringBounder); final double x1 = p1.getX(); final double y1 = p1.getY(); final double x2 = p2.getX(); final double y2 = p2.getY(); final UPolygon arrow = x2 > x1 ? Arrows.asToRight() : Arrows.asToLeft(); final Snake snake = new Snake(arrowHorizontalAlignment(), myArrowColor, arrow); if (branchEmpty) { snake.emphasizeDirection(Direction.DOWN); } snake.addPoint(x1, y1); snake.addPoint(x1, y2); snake.addPoint(x2, y2); ug.draw(snake); } private Point2D getP2(StringBounder stringBounder) { final Dimension2D dimDiamond2 = diamond2.calculateDimension(stringBounder); final double diamondWidth = dimDiamond2.getWidth(); final double x; if (getFtile1() == tile1) { x = 0; } else if (getFtile1() == tile2) { x = diamondWidth; } else { throw new IllegalStateException(); } return getTranslateDiamond2(stringBounder) .getTranslated(new Point2D.Double(x, dimDiamond2.getHeight() / 2)); } private UTranslate translate(StringBounder stringBounder) { if (getFtile1() == tile1) { return getTranslate1(stringBounder); } if (getFtile1() == tile2) { return getTranslate2(stringBounder); } throw new IllegalStateException(); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { final StringBounder stringBounder = ug.getStringBounder(); final FtileGeometry geo = getFtile1().calculateDimension(stringBounder); if (geo.hasPointOut() == false) { return; } final Point2D p2 = getP2(stringBounder); final Point2D p1 = geo.translate(translate(stringBounder)).getPointOut(); final Direction originalDirection = Direction.leftOrRight(p1, p2); final double x1 = p1.getX(); final double x2 = p2.getX(); final Point2D mp1a = translate1.getTranslated(p1); final Point2D mp2b = translate2.getTranslated(p2); final Direction newDirection = Direction.leftOrRight(mp1a, mp2b); final UPolygon arrow = x2 > x1 ? Arrows.asToRight() : Arrows.asToLeft(); if (originalDirection == newDirection) { final double delta = (x2 > x1 ? -1 : 1) * 1.5 * Diamond.diamondHalfSize; final Point2D mp2bc = new Point2D.Double(mp2b.getX() + delta, mp2b.getY()); final Snake snake = new Snake(arrowHorizontalAlignment(), myArrowColor); final double middle = (mp1a.getY() + mp2b.getY()) / 2.0; snake.addPoint(mp1a); snake.addPoint(mp1a.getX(), middle); snake.addPoint(mp2bc.getX(), middle); snake.addPoint(mp2bc); snake.goUnmergeable(MergeStrategy.LIMITED); ug.draw(snake); final Snake small = new Snake(arrowHorizontalAlignment(), myArrowColor, arrow); small.addPoint(mp2bc); small.addPoint(mp2bc.getX(), mp2b.getY()); small.addPoint(mp2b); small.goUnmergeable(MergeStrategy.LIMITED); ug.draw(small); } else { final double delta = (x2 > x1 ? -1 : 1) * 1.5 * Diamond.diamondHalfSize; final Point2D mp2bb = new Point2D.Double(mp2b.getX() + delta, mp2b.getY() - 1.5 * Diamond.diamondHalfSize); final Snake snake = new Snake(arrowHorizontalAlignment(), myArrowColor); snake.addPoint(mp1a); snake.addPoint(mp1a.getX(), mp2bb.getY()); snake.addPoint(mp2bb); snake.goUnmergeable(MergeStrategy.LIMITED); ug.draw(snake); final Snake small = new Snake(arrowHorizontalAlignment(), myArrowColor, arrow); small.addPoint(mp2bb); small.addPoint(mp2bb.getX(), mp2b.getY()); small.addPoint(mp2b); small.goUnmergeable(MergeStrategy.LIMITED); ug.draw(small); } } } class ConnectionVerticalThenHorizontalDirect extends AbstractConnection implements ConnectionTranslatable { private final Rainbow myArrowColor; private final boolean branchEmpty; public ConnectionVerticalThenHorizontalDirect(Ftile tile, Rainbow myArrowColor, boolean branchEmpty) { super(tile, diamond2); this.myArrowColor = myArrowColor == null || myArrowColor.size() == 0 ? arrowColor : myArrowColor; this.branchEmpty = branchEmpty; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final FtileGeometry dimTotal = calculateDimensionInternal(stringBounder); final FtileGeometry geo = getFtile1().calculateDimension(stringBounder); if (geo.hasPointOut() == false) { return; } final Point2D p1 = geo.translate(translate(stringBounder)).getPointOut(); final Point2D p2 = new Point2D.Double(dimTotal.getLeft(), dimTotal.getHeight()); final double x1 = p1.getX(); final double y1 = p1.getY(); final double x2 = p2.getX(); final double y2 = p2.getY(); final Snake snake = new Snake(arrowHorizontalAlignment(), myArrowColor); if (branchEmpty) { snake.emphasizeDirection(Direction.DOWN); } snake.addPoint(x1, y1); snake.addPoint(x1, y2); snake.addPoint(x2, y2); snake.addPoint(x2, dimTotal.getHeight()); ug.draw(snake); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { final StringBounder stringBounder = ug.getStringBounder(); final FtileGeometry dimTotal = calculateDimensionInternal(stringBounder); final FtileGeometry geo = getFtile1().calculateDimension(stringBounder); if (geo.hasPointOut() == false) { return; } final Point2D p1 = geo.translate(translate(stringBounder)).getPointOut(); final Point2D p2 = new Point2D.Double(dimTotal.getLeft(), dimTotal.getHeight() - Diamond.diamondHalfSize); final Point2D mp1a = translate1.getTranslated(p1); final Point2D mp2b = translate2.getTranslated(p2); final Snake snake = new Snake(arrowHorizontalAlignment(), myArrowColor); // snake.emphasizeDirection(Direction.DOWN); final double x1 = mp1a.getX(); final double x2 = mp2b.getX(); final double y2 = mp2b.getY(); snake.addPoint(mp1a); snake.addPoint(x1, y2); snake.addPoint(mp2b); snake.addPoint(x2, dimTotal.getHeight()); snake.goUnmergeable(MergeStrategy.LIMITED); ug.draw(snake); } private UTranslate translate(StringBounder stringBounder) { if (getFtile1() == tile1) { return getTranslate1(stringBounder); } if (getFtile1() == tile2) { return getTranslate2(stringBounder); } throw new IllegalStateException(); } } public Ftile addLinks(Branch branch1, Branch branch2, StringBounder stringBounder) { final List conns = new ArrayList(); conns.add(new ConnectionHorizontalThenVertical(tile1, branch1)); conns.add(new ConnectionHorizontalThenVertical(tile2, branch2)); final boolean hasPointOut1 = tile1.calculateDimension(stringBounder).hasPointOut(); final boolean hasPointOut2 = tile2.calculateDimension(stringBounder).hasPointOut(); if (hasPointOut1 && hasPointOut2) { conns.add(new ConnectionVerticalThenHorizontal(tile1, branch1.getInlinkRenderingColorAndStyle(), branch1 .isEmpty())); conns.add(new ConnectionVerticalThenHorizontal(tile2, branch2.getInlinkRenderingColorAndStyle(), branch2 .isEmpty())); } else if (hasPointOut1 && hasPointOut2 == false) { conns.add(new ConnectionVerticalThenHorizontalDirect(tile1, branch1.getInlinkRenderingColorAndStyle(), branch1.isEmpty())); } else if (hasPointOut1 == false && hasPointOut2) { conns.add(new ConnectionVerticalThenHorizontalDirect(tile2, branch2.getInlinkRenderingColorAndStyle(), branch2.isEmpty())); } return FtileUtils.addConnection(this, conns); } } ���������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/��������������������0000775�0000000�0000000�00000000000�13126503031�0027572�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBlackBlock.java0000664�0000000�0000000�00000007200�13126503031�0033407�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import java.awt.geom.Dimension2D; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileBlackBlock extends AbstractFtile { private final double labelMargin = 5; private double width; private double height; private TextBlock label = TextBlockUtils.empty(0, 0); private final HtmlColor colorBar; private final Swimlane swimlane; public FtileBlackBlock(ISkinParam skinParam, HtmlColor colorBar, Swimlane swimlane) { super(skinParam); this.colorBar = colorBar; this.swimlane = swimlane; } public void setBlackBlockDimension(double width, double height) { this.height = height; this.width = width; } public void setLabel(TextBlock label) { if (label == null) { throw new IllegalArgumentException(); } this.label = label; } public FtileGeometry calculateDimension(StringBounder stringBounder) { double supp = label.calculateDimension(stringBounder).getWidth(); if (supp > 0) { supp += labelMargin; } return new FtileGeometry(width + supp, height, width / 2, 0, height); } public void drawU(UGraphic ug) { final URectangle rect = new URectangle(width, height, 5, 5); if (skinParam().shadowing()) { rect.setDeltaShadow(3); } ug.apply(new UChangeColor(colorBar)).apply(new UChangeBackColor(colorBar)).draw(rect); final Dimension2D dimLabel = label.calculateDimension(ug.getStringBounder()); label.drawU(ug.apply(new UTranslate(width + labelMargin, -dimLabel.getHeight() / 2))); } public Set getSwimlanes() { return Collections.singleton(swimlane); } public Swimlane getSwimlaneIn() { return swimlane; } public Swimlane getSwimlaneOut() { return swimlane; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox.java�������0000664�0000000�0000000�00000013456�13126503031�0032162�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import java.awt.geom.Dimension2D; import java.util.Collection; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.CreoleParser; import net.sourceforge.plantuml.creole.Sheet; import net.sourceforge.plantuml.creole.SheetBlock1; import net.sourceforge.plantuml.creole.SheetBlock2; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileBox extends AbstractFtile { private static final int MARGIN = 10; private final TextBlock tb; private final LinkRendering inRenreding; private final Swimlane swimlane; private final BoxStyle style; private final ISkinParam skinParam; final public LinkRendering getInLinkRendering() { return inRenreding; } public Set getSwimlanes() { if (swimlane == null) { return Collections.emptySet(); } return Collections.singleton(swimlane); } public Swimlane getSwimlaneIn() { return swimlane; } public Swimlane getSwimlaneOut() { return swimlane; } class MyStencil implements Stencil { public double getStartingX(StringBounder stringBounder, double y) { return -MARGIN; } public double getEndingX(StringBounder stringBounder, double y) { final Dimension2D dim = calculateDimension(stringBounder); return dim.getWidth() - MARGIN; } } public FtileBox(ISkinParam skinParam, Display label, UFont font, Swimlane swimlane, BoxStyle style) { super(skinParam); this.style = style; this.skinParam = skinParam; this.swimlane = swimlane; this.inRenreding = new LinkRendering(HtmlColorAndStyle.build(skinParam)); final FontConfiguration fc = new FontConfiguration(skinParam, FontParam.ACTIVITY, null); final Sheet sheet = new CreoleParser(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL).createSheet(label); this.tb = new SheetBlock2(new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()), new MyStencil(), new UStroke(1)); this.print = label.toString(); } final private String print; @Override public String toString() { return print; } public void drawU(UGraphic ug) { final Dimension2D dimTotal = calculateDimension(ug.getStringBounder()); final double widthTotal = dimTotal.getWidth(); final double heightTotal = dimTotal.getHeight(); final UDrawable rect = style.getUDrawable(widthTotal, heightTotal, skinParam().shadowing()); final HtmlColor borderColor = SkinParamUtils.getColor(skinParam, ColorParam.activityBorder, null); final HtmlColor backColor = SkinParamUtils.getColor(skinParam, ColorParam.activityBackground, null); ug = ug.apply(new UChangeColor(borderColor)).apply(new UChangeBackColor(backColor)).apply(getThickness()); rect.drawU(ug); tb.drawU(ug.apply(new UTranslate(MARGIN, MARGIN))); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final Dimension2D dim = tb.calculateDimension(stringBounder); return new FtileGeometry(Dimension2DDouble.delta(dim, 2 * MARGIN, 2 * MARGIN), dim.getWidth() / 2 + MARGIN, 0, dim.getHeight() + 2 * MARGIN); } public Collection getMyChildren() { return Collections.emptyList(); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java�0000664�0000000�0000000�00000007531�13126503031�0033257�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import java.util.Collection; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileCircleEnd extends AbstractFtile { private static final int SIZE = 20; private final HtmlColor backColor; private final Swimlane swimlane; @Override public Collection getMyChildren() { return Collections.emptyList(); } public FtileCircleEnd(ISkinParam skinParam, HtmlColor backColor, Swimlane swimlane) { super(skinParam); this.backColor = backColor; this.swimlane = swimlane; } public Set getSwimlanes() { if (swimlane == null) { return Collections.emptySet(); } return Collections.singleton(swimlane); } public Swimlane getSwimlaneIn() { return swimlane; } public Swimlane getSwimlaneOut() { return swimlane; } public void drawU(UGraphic ug) { double xTheoricalPosition = 0; double yTheoricalPosition = 0; xTheoricalPosition = Math.round(xTheoricalPosition); yTheoricalPosition = Math.round(yTheoricalPosition); final UEllipse circle = new UEllipse(SIZE, SIZE); if (skinParam().shadowing()) { circle.setDeltaShadow(3); } ug = ug.apply(new UChangeColor(backColor)); final double thickness = 2.5; ug.apply(new UChangeBackColor(HtmlColorUtils.WHITE)).apply(new UStroke(1.5)) .apply(new UTranslate(xTheoricalPosition, yTheoricalPosition)).draw(circle); final double size2 = (SIZE - thickness) / Math.sqrt(2); final double delta = (SIZE - size2) / 2; ug = ug.apply(new UStroke(thickness)); ug.apply(new UTranslate(delta, delta)).draw(new ULine(size2, size2)); ug.apply(new UTranslate(delta, SIZE - delta)).draw(new ULine(size2, -size2)); } public FtileGeometry calculateDimension(StringBounder stringBounder) { return new FtileGeometry(SIZE, SIZE, SIZE / 2, 0); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileCircleStart.java�������������������������������������������������������������������������������0000664�0000000�0000000�00000006045�13126503031�0033566�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import java.util.Collection; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; public class FtileCircleStart extends AbstractFtile { private static final int SIZE = 20; private final HtmlColor backColor; private final Swimlane swimlane; public FtileCircleStart(ISkinParam skinParam, HtmlColor backColor, Swimlane swimlane) { super(skinParam); this.backColor = backColor; this.swimlane = swimlane; } @Override public Collection getMyChildren() { return Collections.emptyList(); } public Set getSwimlanes() { if (swimlane == null) { return Collections.emptySet(); } return Collections.singleton(swimlane); } public Swimlane getSwimlaneIn() { return swimlane; } public Swimlane getSwimlaneOut() { return swimlane; } public void drawU(UGraphic ug) { final UEllipse circle = new UEllipse(SIZE, SIZE); if (skinParam().shadowing()) { circle.setDeltaShadow(3); } ug.apply(new UChangeColor(null)).apply(new UChangeBackColor(backColor)).draw(circle); } public FtileGeometry calculateDimension(StringBounder stringBounder) { return new FtileGeometry(SIZE, SIZE, SIZE / 2, 0, SIZE); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java0000664�0000000�0000000�00000007270�13126503031�0033476�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import java.util.Collection; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileCircleStop extends AbstractFtile { private static final int SIZE = 20; private final HtmlColor backColor; private final Swimlane swimlane; @Override public Collection getMyChildren() { return Collections.emptyList(); } public FtileCircleStop(ISkinParam skinParam, HtmlColor backColor, Swimlane swimlane) { super(skinParam); this.backColor = backColor; this.swimlane = swimlane; } public Set getSwimlanes() { if (swimlane == null) { return Collections.emptySet(); } return Collections.singleton(swimlane); } public Swimlane getSwimlaneIn() { return swimlane; } public Swimlane getSwimlaneOut() { return swimlane; } public void drawU(UGraphic ug) { double xTheoricalPosition = 0; double yTheoricalPosition = 0; xTheoricalPosition = Math.round(xTheoricalPosition); yTheoricalPosition = Math.round(yTheoricalPosition); final UEllipse circle = new UEllipse(SIZE, SIZE); if (skinParam().shadowing()) { circle.setDeltaShadow(3); } ug.apply(new UChangeColor(backColor)).apply(new UChangeBackColor(null)) .apply(new UTranslate(xTheoricalPosition, yTheoricalPosition)).draw(circle); final double delta = 4; final UEllipse circleSmall = new UEllipse(SIZE - delta * 2, SIZE - delta * 2); if (skinParam().shadowing()) { circleSmall.setDeltaShadow(3); } ug.apply(new UChangeColor(null)).apply(new UChangeBackColor(backColor)) .apply(new UTranslate(xTheoricalPosition + delta + .5, yTheoricalPosition + delta + .5)) .draw(circleSmall); } public FtileGeometry calculateDimension(StringBounder stringBounder) { return new FtileGeometry(SIZE, SIZE, SIZE / 2, 0); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDecorate.java��0000664�0000000�0000000�00000007432�13126503031�0033155�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public abstract class FtileDecorate extends AbstractTextBlock implements Ftile { final private Ftile ftile; public FtileDecorate(final Ftile ftile) { this.ftile = ftile; } @Override public String toString() { return "" + getClass() + " " + ftile; } public LinkRendering getOutLinkRendering() { return ftile.getOutLinkRendering(); } public LinkRendering getInLinkRendering() { return ftile.getInLinkRendering(); } public void drawU(UGraphic ug) { ftile.drawU(ug); } public FtileGeometry calculateDimension(StringBounder stringBounder) { return ftile.calculateDimension(stringBounder); } public Collection getInnerConnections() { return ftile.getInnerConnections(); } public Set getSwimlanes() { return ftile.getSwimlanes(); } public Swimlane getSwimlaneIn() { return ftile.getSwimlaneIn(); } public Swimlane getSwimlaneOut() { return ftile.getSwimlaneOut(); } public ISkinParam skinParam() { return ftile.skinParam(); } public UStroke getThickness() { return ftile.getThickness(); } protected final Ftile getFtileDelegated() { return ftile; } public List getWeldingPoints() { return ftile.getWeldingPoints(); } public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) { if (child == ftile) { return new UTranslate(); } return ftile.getTranslateFor(child, stringBounder); } public Collection getMyChildren() { if (this == ftile) { throw new IllegalStateException(); } return Collections.singleton(ftile); } public HorizontalAlignment arrowHorizontalAlignment() { return ftile.arrowHorizontalAlignment(); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDecorateIn.java0000664�0000000�0000000�00000003450�13126503031�0033440�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; public class FtileDecorateIn extends FtileDecorate { final private LinkRendering linkRendering; public FtileDecorateIn(final Ftile ftile, final LinkRendering linkRendering) { super(ftile); this.linkRendering = linkRendering; if (linkRendering == null) { throw new IllegalArgumentException(); } } public LinkRendering getInLinkRendering() { return linkRendering; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileDecorateOut.java�������������������������������������������������������������������������������0000664�0000000�0000000�00000003453�13126503031�0033565�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; public class FtileDecorateOut extends FtileDecorate { final private LinkRendering linkRendering; public FtileDecorateOut(final Ftile ftile, final LinkRendering linkRendering) { super(ftile); if (linkRendering == null) { throw new IllegalArgumentException(); } this.linkRendering = linkRendering; } public LinkRendering getOutLinkRendering() { return linkRendering; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileDecoratePointOut.java��������������������������������������������������������������������������0000664�0000000�0000000�00000004037�13126503031�0034576�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.graphic.StringBounder; public class FtileDecoratePointOut extends FtileDecorate { final private double dx; final private double dy; public FtileDecoratePointOut(final Ftile ftile, final double dx, double dy) { super(ftile); this.dx = dx; if (dx != 0) { throw new IllegalArgumentException(); } this.dy = dy; } @Override public FtileGeometry calculateDimension(StringBounder stringBounder) { final FtileGeometry geo = super.calculateDimension(stringBounder); return new FtileGeometry(geo.getWidth(), geo.getHeight(), geo.getLeft(), geo.getInY(), geo.getOutY() + dy); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamond.java���0000664�0000000�0000000�00000014255�13126503031�0033003�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import java.awt.geom.Dimension2D; import java.util.Collection; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Diamond; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileDiamond extends AbstractFtile { private final HtmlColor backColor; private final HtmlColor borderColor; private final Swimlane swimlane; private final TextBlock north; private final TextBlock south; private final TextBlock west1; private final TextBlock east1; public FtileDiamond(ISkinParam skinParam, HtmlColor backColor, HtmlColor borderColor, Swimlane swimlane) { this(skinParam, backColor, borderColor, swimlane, TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0)); } @Override public Collection getMyChildren() { return Collections.emptyList(); } public FtileDiamond withNorth(TextBlock north) { return new FtileDiamond(skinParam(), backColor, borderColor, swimlane, north, south, east1, west1); } public FtileDiamond withWest(TextBlock west1) { if (west1 == null) { return this; } return new FtileDiamond(skinParam(), backColor, borderColor, swimlane, north, south, east1, west1); } public FtileDiamond withEast(TextBlock east1) { if (east1 == null) { return this; } return new FtileDiamond(skinParam(), backColor, borderColor, swimlane, north, south, east1, west1); } public FtileDiamond withSouth(TextBlock south) { return new FtileDiamond(skinParam(), backColor, borderColor, swimlane, north, south, east1, west1); } private FtileDiamond(ISkinParam skinParam, HtmlColor backColor, HtmlColor borderColor, Swimlane swimlane, TextBlock north, TextBlock south, TextBlock east1, TextBlock west1) { super(skinParam); this.backColor = backColor; this.swimlane = swimlane; this.borderColor = borderColor; this.north = north; this.west1 = west1; this.east1 = east1; this.south = south; } public Set getSwimlanes() { if (swimlane == null) { return Collections.emptySet(); } return Collections.singleton(swimlane); } public Swimlane getSwimlaneIn() { return swimlane; } public Swimlane getSwimlaneOut() { return swimlane; } public void drawU(UGraphic ug) { final double suppY1 = north.calculateDimension(ug.getStringBounder()).getHeight(); ug = ug.apply(new UTranslate(0, suppY1)); ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor)) .draw(Diamond.asPolygon(skinParam().shadowing())); // final Dimension2D dimNorth = north.calculateDimension(ug.getStringBounder()); north.drawU(ug.apply(new UTranslate(Diamond.diamondHalfSize * 1.5, -suppY1))); // final Dimension2D dimSouth = south.calculateDimension(ug.getStringBounder()); south.drawU(ug.apply(new UTranslate(Diamond.diamondHalfSize * 1.5, 2 * Diamond.diamondHalfSize))); // south.drawU(ug.apply(new UTranslate(-(dimSouth.getWidth() - 2 * Diamond.diamondHalfSize) / 2, // 2 * Diamond.diamondHalfSize))); final Dimension2D dimWeat1 = west1.calculateDimension(ug.getStringBounder()); west1.drawU(ug.apply(new UTranslate(-dimWeat1.getWidth(), -dimWeat1.getHeight() + Diamond.diamondHalfSize))); final Dimension2D dimEast1 = east1.calculateDimension(ug.getStringBounder()); east1.drawU(ug.apply(new UTranslate(Diamond.diamondHalfSize * 2, -dimEast1.getHeight() + Diamond.diamondHalfSize))); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final double suppY1 = north.calculateDimension(stringBounder).getHeight(); final Dimension2D dim = new Dimension2DDouble(Diamond.diamondHalfSize * 2, Diamond.diamondHalfSize * 2 + suppY1); return new FtileGeometry(dim, dim.getWidth() / 2, suppY1, dim.getHeight()); } public Ftile withWestAndEast(TextBlock tb1, TextBlock tb2) { return withWest(tb1).withEast(tb2); } public double getEastLabelWidth(StringBounder stringBounder) { final Dimension2D dimEast = east1.calculateDimension(stringBounder); return dimEast.getWidth(); } public double getSouthLabelHeight(StringBounder stringBounder) { final Dimension2D dimSouth = south.calculateDimension(stringBounder); return dimSouth.getHeight(); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileDiamondFoo1.java�������������������������������������������������������������������������������0000664�0000000�0000000�00000013072�13126503031�0033445�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import java.awt.geom.Dimension2D; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Diamond; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileDiamondFoo1 extends AbstractFtile { private final HtmlColor backColor; private final HtmlColor borderColor; private final Swimlane swimlane; private final TextBlock label; private final TextBlock west; private final TextBlock east; private final TextBlock north; public FtileDiamondFoo1(ISkinParam skinParam, HtmlColor backColor, HtmlColor borderColor, Swimlane swimlane, TextBlock label) { this(skinParam, backColor, borderColor, swimlane, label, TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0)); } public FtileDiamondFoo1 withNorth(TextBlock north) { return new FtileDiamondFoo1(skinParam(), backColor, borderColor, swimlane, label, north, west, east); } public FtileDiamondFoo1 withWest(TextBlock west) { return new FtileDiamondFoo1(skinParam(), backColor, borderColor, swimlane, label, north, west, east); } public FtileDiamondFoo1 withEast(TextBlock east) { return new FtileDiamondFoo1(skinParam(), backColor, borderColor, swimlane, label, north, west, east); } private FtileDiamondFoo1(ISkinParam skinParam, HtmlColor backColor, HtmlColor borderColor, Swimlane swimlane, TextBlock label, TextBlock north, TextBlock west, TextBlock east) { super(skinParam); this.backColor = backColor; this.swimlane = swimlane; this.borderColor = borderColor; this.label = label; this.west = west; this.east = east; this.north = north; } public Set getSwimlanes() { if (swimlane == null) { return Collections.emptySet(); } return Collections.singleton(swimlane); } public Swimlane getSwimlaneIn() { return swimlane; } public Swimlane getSwimlaneOut() { return swimlane; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor)); ug.draw(Diamond.asPolygonFoo1(skinParam().shadowing(), dimTotal.getWidth(), dimTotal.getHeight())); north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight()))); final double lx = (dimTotal.getWidth() - dimLabel.getWidth()) / 2; final double ly = (dimTotal.getHeight() - dimLabel.getHeight()) / 2; label.drawU(ug.apply(new UTranslate(lx, ly))); final Dimension2D dimWeat = west.calculateDimension(stringBounder); west.drawU(ug.apply(new UTranslate(-dimWeat.getWidth(), -dimWeat.getHeight() + Diamond.diamondHalfSize))); final Dimension2D dimEast = east.calculateDimension(stringBounder); east.drawU(ug.apply(new UTranslate(dimTotal.getWidth(), -dimEast.getHeight() + Diamond.diamondHalfSize))); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final Dimension2D dim = calculateDimensionInternal(stringBounder); return new FtileGeometry(dim, dim.getWidth() / 2, 0, dim.getHeight()); } private Dimension2D calculateDimensionInternal(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); if (dimLabel.getWidth() == 0 || dimLabel.getHeight() == 0) { return new Dimension2DDouble(Diamond.diamondHalfSize * 2, Diamond.diamondHalfSize * 2); } Dimension2D result = dimLabel; result = Dimension2DDouble.delta(result, Diamond.diamondHalfSize * 2, Diamond.diamondHalfSize * 2); return result; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������FtileDiamondInside.java�����������������������������������������������������������������������������0000664�0000000�0000000�00000015760�13126503031�0034062�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import java.awt.geom.Dimension2D; import java.util.Collection; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Diamond; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileDiamondInside extends AbstractFtile { private final HtmlColor backColor; private final HtmlColor borderColor; private final Swimlane swimlane; private final TextBlock label; private final TextBlock west; private final TextBlock east; private final TextBlock north; private final TextBlock south; @Override public Collection getMyChildren() { return Collections.emptyList(); } public FtileDiamondInside(ISkinParam skinParam, HtmlColor backColor, HtmlColor borderColor, Swimlane swimlane, TextBlock label) { this(skinParam, backColor, borderColor, swimlane, label, TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0)); } public FtileDiamondInside withNorth(TextBlock north) { return new FtileDiamondInside(skinParam(), backColor, borderColor, swimlane, label, north, south, west, east); } public FtileDiamondInside withWest(TextBlock west) { return new FtileDiamondInside(skinParam(), backColor, borderColor, swimlane, label, north, south, west, east); } public FtileDiamondInside withEast(TextBlock east) { return new FtileDiamondInside(skinParam(), backColor, borderColor, swimlane, label, north, south, west, east); } public Ftile withWestAndEast(TextBlock tb1, TextBlock tb2) { return withWest(tb1).withEast(tb2); } public FtileDiamondInside withSouth(TextBlock south) { return new FtileDiamondInside(skinParam(), backColor, borderColor, swimlane, label, north, south, west, east); } private FtileDiamondInside(ISkinParam skinParam, HtmlColor backColor, HtmlColor borderColor, Swimlane swimlane, TextBlock label, TextBlock north, TextBlock south, TextBlock west, TextBlock east) { super(skinParam); this.backColor = backColor; this.swimlane = swimlane; this.borderColor = borderColor; this.label = label; this.west = west; this.east = east; this.north = north; this.south = south; } public Set getSwimlanes() { if (swimlane == null) { return Collections.emptySet(); } return Collections.singleton(swimlane); } public Swimlane getSwimlaneIn() { return swimlane; } public Swimlane getSwimlaneOut() { return swimlane; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimTotal = calculateDimensionAlone(stringBounder); ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor)); ug.draw(Diamond.asPolygon(skinParam().shadowing(), dimTotal.getWidth(), dimTotal.getHeight())); north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight()))); south.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight()))); final double lx = (dimTotal.getWidth() - dimLabel.getWidth()) / 2; final double ly = (dimTotal.getHeight() - dimLabel.getHeight()) / 2; label.drawU(ug.apply(new UTranslate(lx, ly))); final Dimension2D dimWest = west.calculateDimension(stringBounder); west.drawU(ug.apply(new UTranslate(-dimWest.getWidth(), -dimWest.getHeight() + dimTotal.getHeight() / 2))); final Dimension2D dimEast = east.calculateDimension(stringBounder); east.drawU(ug.apply(new UTranslate(dimTotal.getWidth(), -dimEast.getHeight() + dimTotal.getHeight() / 2))); } private FtileGeometry calculateDimensionAlone(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dim; if (dimLabel.getWidth() == 0 || dimLabel.getHeight() == 0) { dim = new Dimension2DDouble(Diamond.diamondHalfSize * 2, Diamond.diamondHalfSize * 2); } else { dim = Dimension2DDouble.delta( Dimension2DDouble.atLeast(dimLabel, Diamond.diamondHalfSize * 2, Diamond.diamondHalfSize * 2), Diamond.diamondHalfSize * 2, 0); } return new FtileGeometry(dim, dim.getWidth() / 2, 0, dim.getHeight()); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final FtileGeometry dimDiamonAlone = calculateDimensionAlone(stringBounder); final Dimension2D dimWest = west.calculateDimension(stringBounder); final Dimension2D dimEast = east.calculateDimension(stringBounder); final double northHeight = north.calculateDimension(stringBounder).getHeight(); return dimDiamonAlone.incHeight(northHeight); // return dimDiamonAlone.incHeight(northHeight).addMarginX(dimWest.getWidth(), dimEast.getWidth()); } public double getEastLabelWidth(StringBounder stringBounder) { final Dimension2D dimEast = east.calculateDimension(stringBounder); return dimEast.getWidth(); } public double getSouthLabelHeight(StringBounder stringBounder) { final Dimension2D dimSouth = south.calculateDimension(stringBounder); return dimSouth.getHeight(); } } ����������������FtileDiamondInside2.java����������������������������������������������������������������������������0000664�0000000�0000000�00000014553�13126503031�0034143�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import java.awt.geom.Dimension2D; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Diamond; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileDiamondInside2 extends AbstractFtile { private final HtmlColor backColor; private final HtmlColor borderColor; private final Swimlane swimlane; private final TextBlock label; private final TextBlock west; private final TextBlock east; private final TextBlock north; private final TextBlock south; public FtileDiamondInside2(ISkinParam skinParam, HtmlColor backColor, HtmlColor borderColor, Swimlane swimlane, TextBlock label) { this(skinParam, backColor, borderColor, swimlane, label, TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0)); } public FtileDiamondInside2 withNorth(TextBlock north) { return new FtileDiamondInside2(skinParam(), backColor, borderColor, swimlane, label, north, south, west, east); } public FtileDiamondInside2 withWest(TextBlock west) { return new FtileDiamondInside2(skinParam(), backColor, borderColor, swimlane, label, north, south, west, east); } public FtileDiamondInside2 withEast(TextBlock east) { return new FtileDiamondInside2(skinParam(), backColor, borderColor, swimlane, label, north, south, west, east); } public FtileDiamondInside2 withSouth(TextBlock south) { return new FtileDiamondInside2(skinParam(), backColor, borderColor, swimlane, label, north, south, west, east); } private FtileDiamondInside2(ISkinParam skinParam, HtmlColor backColor, HtmlColor borderColor, Swimlane swimlane, TextBlock label, TextBlock north, TextBlock south, TextBlock west, TextBlock east) { super(skinParam); this.backColor = backColor; this.swimlane = swimlane; this.borderColor = borderColor; this.label = label; this.west = west; this.east = east; this.north = north; this.south = south; } public Set getSwimlanes() { if (swimlane == null) { return Collections.emptySet(); } return Collections.singleton(swimlane); } public Swimlane getSwimlaneIn() { return swimlane; } public Swimlane getSwimlaneOut() { return swimlane; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimTotal = calculateDimensionAlone(stringBounder); ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor)); ug.draw(Diamond.asPolygon(skinParam().shadowing(), dimTotal.getWidth(), dimTotal.getHeight())); north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight()))); south.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight()))); final double lx = (dimTotal.getWidth() - dimLabel.getWidth()) / 2; final double ly = (dimTotal.getHeight() - dimLabel.getHeight()) / 2; label.drawU(ug.apply(new UTranslate(lx, ly))); final Dimension2D dimWeat = west.calculateDimension(stringBounder); west.drawU(ug.apply(new UTranslate(-dimWeat.getWidth(), -dimWeat.getHeight() + dimTotal.getHeight() / 2))); final Dimension2D dimEast = east.calculateDimension(stringBounder); east.drawU(ug.apply(new UTranslate(dimTotal.getWidth(), -dimEast.getHeight() + dimTotal.getHeight() / 2))); } private FtileGeometry calculateDimensionAlone(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dim; if (dimLabel.getWidth() == 0 || dimLabel.getHeight() == 0) { dim = new Dimension2DDouble(Diamond.diamondHalfSize * 2, Diamond.diamondHalfSize * 2); } else { dim = Dimension2DDouble.delta( Dimension2DDouble.atLeast(dimLabel, Diamond.diamondHalfSize * 2, Diamond.diamondHalfSize * 2), Diamond.diamondHalfSize * 2, 0); } return new FtileGeometry(dim, dim.getWidth() / 2, 0, dim.getHeight()); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final Dimension2D diamond = calculateDimensionAlone(stringBounder); final Dimension2D north = this.north.calculateDimension(stringBounder); final double height = diamond.getHeight() + north.getHeight(); final double left = diamond.getWidth() / 2; final double width = north.getWidth() > left ? left + north.getWidth() : diamond.getWidth(); return new FtileGeometry(width, height, left, 0, diamond.getHeight()); } } �����������������������������������������������������������������������������������������������������������������������������������������������������FtileDiamondInside3.java����������������������������������������������������������������������������0000664�0000000�0000000�00000016443�13126503031�0034144�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical����������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import java.awt.geom.Dimension2D; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.Diamond; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileOverpassing; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.utils.MathUtils; public class FtileDiamondInside3 extends AbstractFtile implements FtileOverpassing { private final HtmlColor backColor; private final HtmlColor borderColor; private final Swimlane swimlane; private final TextBlock label; private final TextBlock west; private final TextBlock east; private final TextBlock north; private final TextBlock south; public FtileDiamondInside3(ISkinParam skinParam, HtmlColor backColor, HtmlColor borderColor, Swimlane swimlane, TextBlock label) { this(skinParam, backColor, borderColor, swimlane, label, TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0)); } public FtileDiamondInside3 withNorth(TextBlock north) { return new FtileDiamondInside3(skinParam(), backColor, borderColor, swimlane, label, north, south, west, east); } public FtileDiamondInside3 withWest(TextBlock west) { return new FtileDiamondInside3(skinParam(), backColor, borderColor, swimlane, label, north, south, west, east); } public FtileDiamondInside3 withEast(TextBlock east) { return new FtileDiamondInside3(skinParam(), backColor, borderColor, swimlane, label, north, south, west, east); } public FtileDiamondInside3 withSouth(TextBlock south) { return new FtileDiamondInside3(skinParam(), backColor, borderColor, swimlane, label, north, south, west, east); } private FtileDiamondInside3(ISkinParam skinParam, HtmlColor backColor, HtmlColor borderColor, Swimlane swimlane, TextBlock label, TextBlock north, TextBlock south, TextBlock west, TextBlock east) { super(skinParam); this.backColor = backColor; this.swimlane = swimlane; this.borderColor = borderColor; this.label = label; this.west = west; this.east = east; this.north = north; this.south = south; } public Set getSwimlanes() { if (swimlane == null) { return Collections.emptySet(); } return Collections.singleton(swimlane); } public Swimlane getSwimlaneIn() { return swimlane; } public Swimlane getSwimlaneOut() { return swimlane; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimTotal = calculateDimensionAlone(stringBounder); ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor)); ug.draw(Diamond.asPolygon(skinParam().shadowing(), dimTotal.getWidth(), dimTotal.getHeight())); north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight()))); south.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight()))); final double lx = (dimTotal.getWidth() - dimLabel.getWidth()) / 2; final double ly = (dimTotal.getHeight() - dimLabel.getHeight()) / 2; label.drawU(ug.apply(new UTranslate(lx, ly))); final Dimension2D dimWeat = west.calculateDimension(stringBounder); west.drawU(ug.apply(new UTranslate(-dimWeat.getWidth(), -dimWeat.getHeight() + dimTotal.getHeight() / 2))); final Dimension2D dimEast = east.calculateDimension(stringBounder); east.drawU(ug.apply(new UTranslate(dimTotal.getWidth(), -dimEast.getHeight() + dimTotal.getHeight() / 2))); } private FtileGeometry calculateDimensionAlone(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dim; if (dimLabel.getWidth() == 0 || dimLabel.getHeight() == 0) { dim = new Dimension2DDouble(Diamond.diamondHalfSize * 2, Diamond.diamondHalfSize * 2); } else { dim = Dimension2DDouble.delta( Dimension2DDouble.atLeast(dimLabel, Diamond.diamondHalfSize * 2, Diamond.diamondHalfSize * 2), Diamond.diamondHalfSize * 2, 0); } return new FtileGeometry(dim, dim.getWidth() / 2, 0, dim.getHeight()); } public FtileGeometry calculateDimension(StringBounder stringBounder) { final Dimension2D diamond = calculateDimensionAlone(stringBounder); final Dimension2D north = this.north.calculateDimension(stringBounder); final double height = diamond.getHeight() + north.getHeight(); final double left = diamond.getWidth() / 2; // final double width = north.getWidth() > left ? left + north.getWidth() : diamond.getWidth(); final double width = diamond.getWidth(); return new FtileGeometry(width, height, left, 0, diamond.getHeight()); } public FtileGeometry getOverpassDimension(StringBounder stringBounder) { final Dimension2D total = calculateDimension(stringBounder); final Dimension2D north = this.north.calculateDimension(stringBounder); final Dimension2D east = this.east.calculateDimension(stringBounder); final Dimension2D west = this.west.calculateDimension(stringBounder); final double height = total.getHeight(); // + north.getHeight(); final double left = total.getWidth() / 2; final double supp = MathUtils.max(north.getWidth(), east.getWidth(), west.getWidth()); // final double width = supp > left ? left + supp : diamond.getWidth(); final double width = total.getWidth() + supp; return new FtileGeometry(width, height, left, 0, total.getHeight()); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileThinSplit.java�0000664�0000000�0000000�00000006233�13126503031�0033343�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; import java.util.Collections; import java.util.Set; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileThinSplit extends AbstractFtile { private double width; private double first; private double last; private final double height = 1.5; private final HtmlColor colorBar; private final Swimlane swimlane; public FtileThinSplit(ISkinParam skinParam, HtmlColor colorBar, Swimlane swimlane) { super(skinParam); this.colorBar = colorBar; this.swimlane = swimlane; } public void setGeom(double first, double last, double width) { this.width = width; this.first = first; this.last = last; } public FtileGeometry calculateDimension(StringBounder stringBounder) { return new FtileGeometry(width, height, width / 2, 0, height); } public void drawU(UGraphic ug) { // final URectangle rect = new URectangle(width, height); final UShape rect = new ULine(last - first, 0); ug = ug.apply(new UTranslate(first, 0)); ug.apply(new UChangeColor(colorBar)).apply(new UStroke(1.5)).draw(rect); } public Set getSwimlanes() { return Collections.singleton(swimlane); } public Swimlane getSwimlaneIn() { return swimlane; } public Swimlane getSwimlaneOut() { return swimlane; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/anim/�����������������������������������������������0000775�0000000�0000000�00000000000�13126503031�0022336�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/anim/AffineTransformation.java����������������������0000664�0000000�0000000�00000012412�13126503031�0027320�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.anim; import java.awt.geom.AffineTransform; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.StringTokenizer; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.ugraphic.MinMax; public class AffineTransformation { static private final Pattern rotate = Pattern.compile("rotate\\s+(-?\\d+\\.?\\d*)"); static private final Pattern shear = Pattern.compile("shear\\s+(-?\\d+\\.?\\d*)\\s+(-?\\d+\\.?\\d*)"); static private final Pattern translate = Pattern.compile("translate\\s+(-?\\d+\\.?\\d*)\\s+(-?\\d+\\.?\\d*)"); static private final Pattern scale = Pattern.compile("scale\\s+(-?\\d+\\.?\\d*)\\s+(-?\\d+\\.?\\d*)"); static private final Pattern color = Pattern.compile("color\\s+.*"); private final AffineTransform affineTransform; private Dimension2D dimension; private AffineTransformation(AffineTransform affineTransform) { this.affineTransform = affineTransform; if (affineTransform == null) { throw new IllegalArgumentException(); } } private AffineTransformation compose(AffineTransformation other) { final AffineTransform tmp = new AffineTransform(this.affineTransform); tmp.concatenate(other.affineTransform); return new AffineTransformation(tmp); } public static AffineTransformation from(AffineTransform affineTransform) { return new AffineTransformation(affineTransform); } static AffineTransformation create(String value) { final StringTokenizer st = new StringTokenizer(value, "|"); AffineTransformation result = null; while (st.hasMoreTokens()) { final String s = st.nextToken(); final AffineTransformation tmp = createSimple(s); if (tmp != null) { if (result == null) { result = tmp; } else { result = result.compose(tmp); } } } return result; } private static AffineTransformation createSimple(String value) { Matcher m = rotate.matcher(StringUtils.trin(value)); if (m.find()) { final double angle = Double.parseDouble(m.group(1)); return new AffineTransformation(AffineTransform.getRotateInstance(angle * Math.PI / 180.0)); } m = shear.matcher(value); if (m.find()) { final double shx = Double.parseDouble(m.group(1)); final double shy = Double.parseDouble(m.group(2)); return new AffineTransformation(AffineTransform.getShearInstance(shx, shy)); } m = translate.matcher(value); if (m.find()) { final double tx = Double.parseDouble(m.group(1)); final double ty = Double.parseDouble(m.group(2)); return new AffineTransformation(AffineTransform.getTranslateInstance(tx, ty)); } m = scale.matcher(value); if (m.find()) { final double scalex = Double.parseDouble(m.group(1)); final double scaley = Double.parseDouble(m.group(2)); return new AffineTransformation(AffineTransform.getScaleInstance(scalex, scaley)); } m = color.matcher(value); if (m.find()) { return new AffineTransformation(new AffineTransform()); } return null; } public final AffineTransform getAffineTransform() { return getAffineTransform(dimension); } private AffineTransform getAffineTransform(Dimension2D dimension) { if (dimension == null) { throw new IllegalStateException(); } final AffineTransform at = AffineTransform.getTranslateInstance(dimension.getWidth() / 2, dimension.getHeight() / 2); at.concatenate(affineTransform); at.translate(-dimension.getWidth() / 2, -dimension.getHeight() / 2); return at; } public void setDimension(Dimension2D dim) { this.dimension = dim; } public MinMax getMinMax(Dimension2D rect) { MinMax result = MinMax.getEmpty(false); final AffineTransform tmp = getAffineTransform(rect); result = result.addPoint(tmp.transform(new Point2D.Double(0, 0), null)); result = result.addPoint(tmp.transform(new Point2D.Double(0, rect.getHeight()), null)); result = result.addPoint(tmp.transform(new Point2D.Double(rect.getWidth(), 0), null)); result = result.addPoint(tmp.transform(new Point2D.Double(rect.getWidth(), rect.getHeight()), null)); return result; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/anim/Animation.java���������������������������������0000664�0000000�0000000�00000005375�13126503031�0025132�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.anim; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.ugraphic.MinMax; public class Animation { private final List all; private Animation(List all) { if (all.size() == 0) { throw new IllegalArgumentException(); } this.all = all; } public static Animation singleton(AffineTransformation affineTransformation) { if (affineTransformation == null) { return null; } return new Animation(Collections.singletonList(affineTransformation)); } public static Animation create(List descriptions) { final List all = new ArrayList(); for (String s : descriptions) { final AffineTransformation tmp = AffineTransformation.create(s); if (tmp != null) { all.add(tmp); } } return new Animation(all); } public Collection getAll() { return Collections.unmodifiableCollection(all); } public void setDimension(Dimension2D dim) { for (AffineTransformation affineTransform : all) { affineTransform.setDimension(dim); } } public AffineTransformation getFirst() { return all.get(0); } public MinMax getMinMax(Dimension2D dim) { MinMax result = MinMax.getEmpty(false); for (AffineTransformation affineTransform : all) { final MinMax m = affineTransform.getMinMax(dim); result = result.addMinMax(m); } return result; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/anim/AnimationDecoder.java��������������������������0000664�0000000�0000000�00000004642�13126503031�0026414�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.anim; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.StringTokenizer; import javax.script.ScriptException; public class AnimationDecoder { private final List result = new ArrayList(); public AnimationDecoder(Iterable data) throws ScriptException { for (final Iterator it = data.iterator(); it.hasNext();) { String line = it.next().toString(); if (line.matches("^\\s*\\[script\\]\\s*$")) { final StringBuilder scriptText = new StringBuilder(); while (true) { line = it.next().toString(); if (line.matches("^\\s*\\[/script\\]\\s*$")) { final AnimationScript script = new AnimationScript(); final String out = script.eval(scriptText.toString()); for (final StringTokenizer st = new StringTokenizer(out, "\n"); st.hasMoreTokens();) { result.add(st.nextToken()); } break; } else { scriptText.append(line); scriptText.append("\n"); } } } else { result.add(line); } } } public List decode() { return Collections.unmodifiableList(result); } } ����������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/anim/AnimationScript.java���������������������������0000664�0000000�0000000�00000005160�13126503031�0026307�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.anim; import java.io.PrintWriter; import java.io.StringWriter; import javax.script.ScriptContext; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.script.ScriptException; public class AnimationScript { private final ScriptEngine engine; public AnimationScript() { final ScriptEngineManager manager = new ScriptEngineManager(); engine = manager.getEngineByName("js"); // ScriptEngineManager manager = new ScriptEngineManager(); // List factories = manager.getEngineFactories(); // for (ScriptEngineFactory factory : factories) { // System.out.println("Name : " + factory.getEngineName()); // System.out.println("Version : " + factory.getEngineVersion()); // System.out.println("Language name : " + factory.getLanguageName()); // System.out.println("Language version : " + factory.getLanguageVersion()); // System.out.println("Extensions : " + factory.getExtensions()); // System.out.println("Mime types : " + factory.getMimeTypes()); // System.out.println("Names : " + factory.getNames()); // // } } public String eval(String line) throws ScriptException { final ScriptContext context = engine.getContext(); final StringWriter sw = new StringWriter(); context.setWriter(new PrintWriter(sw)); engine.eval(line, context); final String result = sw.toString(); return result; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/ant/������������������������������������������������0000775�0000000�0000000�00000000000�13126503031�0022174�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/ant/PlantUmlTask.java�������������������������������0000664�0000000�0000000�00000030014�13126503031�0025414�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ant; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.GeneratedImage; import net.sourceforge.plantuml.Option; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.SourceFileReader; import net.sourceforge.plantuml.Splash; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.stats.StatsUtils; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.Task; import org.apache.tools.ant.types.FileList; import org.apache.tools.ant.types.FileSet; // // // // // // // // // // Carriage Return in UTF-8 XML: // Line Feed in UTF-8 XML: public class PlantUmlTask extends Task { private String dir = null; private final Option option = new Option(); private List filesets = new ArrayList(); private List filelists = new ArrayList(); private AtomicInteger nbFiles = new AtomicInteger(0); private ExecutorService executorService; /** * Add a set of files to touch */ public void addFileset(FileSet set) { filesets.add(set); } /** * Add a filelist to touch */ public void addFilelist(FileList list) { filelists.add(list); } // The method executing the task @Override public void execute() throws BuildException { if (option.isSplash()) { Splash.createSplash(); } this.log("Starting PlantUML"); try { if (dir != null) { final File error = processingSingleDirectory(new File(dir)); eventuallyFailfast(error); } for (FileSet fileSet : filesets) { final File error = manageFileSet(fileSet); eventuallyFailfast(error); } for (FileList fileList : filelists) { final File error = manageFileList(fileList); eventuallyFailfast(error); } if (executorService != null) { executorService.shutdown(); executorService.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS); if (option.isSplash()) { Splash.disposeSplash(); } } this.log("Nb images generated: " + nbFiles.get()); } catch (IOException e) { e.printStackTrace(); throw new BuildException(e.toString()); } catch (InterruptedException e) { e.printStackTrace(); throw new BuildException(e.toString()); } } private void eventuallyFailfast(final File error) throws IOException { if (error != null && option.isFailfastOrFailfast2()) { this.log("Error in file " + error.getCanonicalPath()); throw new BuildException("Error in file " + error.getCanonicalPath()); } } private File manageFileList(FileList fl) throws IOException, InterruptedException { final File fromDir = fl.getDir(getProject()); final String[] srcFiles = fl.getFiles(getProject()); for (String src : srcFiles) { final File f = new File(fromDir, src); final boolean error = processingSingleFile(f); if (error) { return f; } } return null; } private File manageFileSet(FileSet fs) throws IOException, InterruptedException { final DirectoryScanner ds = fs.getDirectoryScanner(getProject()); final File fromDir = fs.getDir(getProject()); final String[] srcFiles = ds.getIncludedFiles(); final String[] srcDirs = ds.getIncludedDirectories(); for (String src : srcFiles) { final File f = new File(fromDir, src); final boolean error = processingSingleFile(f); if (error) { return f; } } for (String src : srcDirs) { final File dir = new File(fromDir, src); final File errorFile = processingSingleDirectory(dir); if (errorFile != null) { return errorFile; } } return null; } private boolean processingSingleFile(final File f) throws IOException, InterruptedException { if (OptionFlags.getInstance().isVerbose()) { this.log("Processing " + f.getAbsolutePath()); } final SourceFileReader sourceFileReader = new SourceFileReader(Defines.createWithFileName(f), f, option.getOutputDir(), option.getConfig(), option.getCharset(), option.getFileFormatOption()); if (option.isCheckOnly()) { return sourceFileReader.hasError(); } if (executorService == null) { return doFile(f, sourceFileReader); } Splash.incTotal(1); executorService.submit(new Callable() { public Boolean call() throws Exception { return doFile(f, sourceFileReader); } }); return false; } private boolean doFile(final File f, final SourceFileReader sourceFileReader) throws IOException, InterruptedException { final Collection result = sourceFileReader.getGeneratedImages(); boolean error = false; for (GeneratedImage g : result) { if (OptionFlags.getInstance().isVerbose()) { myLog(g + " " + g.getDescription()); } nbFiles.addAndGet(1); if (g.lineErrorRaw() != -1) { error = true; } } Splash.incDone(error); if (error) { myLog("Error: " + f.getCanonicalPath()); } if (error && option.isFailfastOrFailfast2()) { return true; } return false; } private synchronized void myLog(String s) { this.log(s); } private File processingSingleDirectory(File dir) throws IOException, InterruptedException { if (dir.exists() == false) { final String s = "The file " + dir.getAbsolutePath() + " does not exists."; this.log(s); throw new BuildException(s); } for (File f : dir.listFiles()) { if (f.isFile() == false) { continue; } if (fileToProcess(f.getName()) == false) { continue; } final boolean error = processingSingleFile(f); if (error) { return f; } } return null; } private boolean fileToProcess(String name) { return name.matches(Option.getPattern()); } public void setDir(String s) { this.dir = s; } public void setOutput(String s) { option.setOutputDir(new File(s)); } public void setCharset(String s) { option.setCharset(s); } public void setConfig(String s) { try { option.initConfig(s); } catch (IOException e) { log("Error reading " + s); } } public void setKeepTmpFiles(String s) { // Deprecated } public void setDebugSvek(String s) { if ("true".equalsIgnoreCase(s)) { option.setDebugSvek(true); } } public void setVerbose(String s) { if ("true".equalsIgnoreCase(s)) { OptionFlags.getInstance().setVerbose(true); } } public void setFormat(String s) { if ("scxml".equalsIgnoreCase(s)) { option.setFileFormatOption(new FileFormatOption(FileFormat.SCXML)); } if ("xmi".equalsIgnoreCase(s)) { option.setFileFormatOption(new FileFormatOption(FileFormat.XMI_STANDARD)); } if ("xmi:argo".equalsIgnoreCase(s)) { option.setFileFormatOption(new FileFormatOption(FileFormat.XMI_ARGO)); } if ("xmi:start".equalsIgnoreCase(s)) { option.setFileFormatOption(new FileFormatOption(FileFormat.XMI_STAR)); } if ("eps".equalsIgnoreCase(s)) { option.setFileFormatOption(new FileFormatOption(FileFormat.EPS)); } if ("braille".equalsIgnoreCase(s)) { option.setFileFormatOption(new FileFormatOption(FileFormat.BRAILLE_PNG)); } if ("pdf".equalsIgnoreCase(s)) { option.setFileFormatOption(new FileFormatOption(FileFormat.PDF)); } if ("latex".equalsIgnoreCase(s)) { option.setFileFormatOption(new FileFormatOption(FileFormat.LATEX)); } if ("latex:nopreamble".equalsIgnoreCase(s)) { option.setFileFormatOption(new FileFormatOption(FileFormat.LATEX_NO_PREAMBLE)); } if ("eps:text".equalsIgnoreCase(s)) { option.setFileFormatOption(new FileFormatOption(FileFormat.EPS_TEXT)); } if ("svg".equalsIgnoreCase(s)) { option.setFileFormatOption(new FileFormatOption(FileFormat.SVG)); } if ("txt".equalsIgnoreCase(s)) { option.setFileFormatOption(new FileFormatOption(FileFormat.ATXT)); } if ("utxt".equalsIgnoreCase(s)) { option.setFileFormatOption(new FileFormatOption(FileFormat.UTXT)); } } public void setGraphvizDot(String s) { GraphvizUtils.setDotExecutable(s); } public void setNbThread(String s) { if (s != null && s.matches("\\d+")) { option.setNbThreads(Integer.parseInt(s)); final int nbThreads = option.getNbThreads(); this.executorService = Executors.newFixedThreadPool(nbThreads); } if ("auto".equalsIgnoreCase(s)) { option.setNbThreads(Option.defaultNbThreads()); final int nbThreads = option.getNbThreads(); this.executorService = Executors.newFixedThreadPool(nbThreads); } } public void setNbThreads(String s) { setNbThread(s); } public void setSuggestEngine(String s) { OptionFlags.getInstance().setUseSuggestEngine( "true".equalsIgnoreCase(s) || "yes".equalsIgnoreCase(s) || "on".equalsIgnoreCase(s)); } public void setFailFast(String s) { final boolean flag = "true".equalsIgnoreCase(s) || "yes".equalsIgnoreCase(s) || "on".equalsIgnoreCase(s); option.setFailfast(flag); } public void setFailFast2(String s) { final boolean flag = "true".equalsIgnoreCase(s) || "yes".equalsIgnoreCase(s) || "on".equalsIgnoreCase(s); option.setFailfast2(flag); } public void setCheckOnly(String s) { final boolean flag = "true".equalsIgnoreCase(s) || "yes".equalsIgnoreCase(s) || "on".equalsIgnoreCase(s); option.setCheckOnly(flag); } public void setOverwrite(String s) { final boolean flag = "true".equalsIgnoreCase(s) || "yes".equalsIgnoreCase(s) || "on".equalsIgnoreCase(s); OptionFlags.getInstance().setOverwrite(flag); } public void setFileSeparator(String s) { OptionFlags.getInstance().setFileSeparator(s); } public void setHtmlStats(String s) { final boolean flag = "true".equalsIgnoreCase(s) || "yes".equalsIgnoreCase(s) || "on".equalsIgnoreCase(s); StatsUtils.setHtmlStats(flag); } public void setXmlStats(String s) { final boolean flag = "true".equalsIgnoreCase(s) || "yes".equalsIgnoreCase(s) || "on".equalsIgnoreCase(s); StatsUtils.setXmlStats(flag); } public void setRealTimeStats(String s) { final boolean flag = "true".equalsIgnoreCase(s) || "yes".equalsIgnoreCase(s) || "on".equalsIgnoreCase(s); StatsUtils.setRealTimeStats(flag); } public void setEnableStats(String s) { final boolean flag = "true".equalsIgnoreCase(s) || "yes".equalsIgnoreCase(s) || "on".equalsIgnoreCase(s); OptionFlags.getInstance().setEnableStats(flag); } public void setSplash(String s) { final boolean flag = "true".equalsIgnoreCase(s) || "yes".equalsIgnoreCase(s) || "on".equalsIgnoreCase(s); option.setSplash(flag); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/������������������������������������������������0000775�0000000�0000000�00000000000�13126503031�0022163�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/ApiWarning.java���������������������������������0000664�0000000�0000000�00000000553�13126503031�0025070�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������package net.sourceforge.plantuml.api; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target({ ElementType.CONSTRUCTOR, ElementType.METHOD }) public @interface ApiWarning { String willBeRemoved() default ""; } �����������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/CountRate.java����������������������������������0000664�0000000�0000000�00000004347�13126503031�0024742�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.api; public final class CountRate { private final MagicArray lastMinute = new MagicArray(60); private final MagicArray lastHour = new MagicArray(60); private final MagicArray lastDay = new MagicArray(140); public void increment() { final long now = System.currentTimeMillis(); lastMinute.incKey(now / 1000L); lastHour.incKey(now / (60 * 1000L)); lastDay.incKey(now / (10 * 60 * 1000L)); } public void increment(int value) { final long now = System.currentTimeMillis(); lastMinute.incKey(now / 1000L, value); lastHour.incKey(now / (60 * 1000L), value); lastDay.incKey(now / (10 * 60 * 1000L), value); } public long perMinute() { return lastMinute.getSum(); } public long perHour() { return lastHour.getSum(); } public long perDay() { return lastDay.getSum(); } public long perMinuteMax() { return lastMinute.getMaxSum(); } public long perHourMax() { return lastHour.getMaxSum(); } public long perDayMax() { return lastDay.getMaxSum(); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/INumberAnalyzed.java����������������������������0000664�0000000�0000000�00000002521�13126503031�0026057�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 Lesser General Public * License for more details. * * You should have received a copy of the GNU General Public * License aint with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. */ package net.sourceforge.plantuml.api; public interface INumberAnalyzed { public long getNb(); public long getSum(); public long getMin(); public long getMax(); public long getMean(); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/ImageDataComplex.java���������������������������0000664�0000000�0000000�00000004322�13126503031�0026173�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.api; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.CMapData; import net.sourceforge.plantuml.core.ImageData; public class ImageDataComplex implements ImageData { private final Dimension2D info; private final CMapData cmap; private final String warningOrError; // public ImageDataComplex(Dimension2D info, CMapData cmap) { // this(info, cmap, null); // } public ImageDataComplex(Dimension2D info, CMapData cmap, String warningOrError) { if (info==null) { throw new IllegalArgumentException(); } this.info = info; this.cmap = cmap; this.warningOrError = warningOrError; } public int getWidth() { return (int) info.getWidth(); } public int getHeight() { return (int) info.getHeight(); } public boolean containsCMapData() { return cmap != null && cmap.containsData(); } public String getCMapData(String nameId) { return cmap.asString(nameId); } public String getWarningOrError() { return warningOrError; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/ImageDataSimple.java����������������������������0000664�0000000�0000000�00000003751�13126503031�0026022�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.api; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.core.ImageData; public class ImageDataSimple implements ImageData { private final int width; private final int height; public ImageDataSimple(int width, int height) { this.width = width; this.height = height; } public ImageDataSimple() { this(0, 0); } public ImageDataSimple(Dimension2D dim) { this((int) dim.getWidth(), (int) dim.getHeight()); } public int getWidth() { return width; } public int getHeight() { return height; } public boolean containsCMapData() { return false; } public String getCMapData(String nameId) { throw new UnsupportedOperationException(); } public String getWarningOrError() { return null; } } �����������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/MagicArray.java���������������������������������0000664�0000000�0000000�00000004554�13126503031�0025055�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.api; public final class MagicArray { private final int data[]; private final int size; private long lastUpdatedKey = -1; private int lastUpdatedValue; private long sum; private long maxSum; public MagicArray(int size) { this.data = new int[size]; this.size = size; } synchronized public void incKey(long key) { incKey(key, 1); } synchronized public void incKey(long key, int delta) { if (key < lastUpdatedKey) { return; } if (key != lastUpdatedKey) { if (lastUpdatedKey != -1) { setValue(lastUpdatedKey, lastUpdatedValue); for (long i = lastUpdatedKey + 1; i < key; i++) { setValue(i, 0); } } lastUpdatedValue = 0; lastUpdatedKey = key; } lastUpdatedValue += delta; } private void setValue(long key, int value) { final int i = (int) (key % size); sum += value - data[i]; if (sum > maxSum) { maxSum = sum; } data[i] = value; } synchronized public long getSum() { return sum; } synchronized public long getMaxSum() { return maxSum; } private long getSumSlow() { long tmp = 0; for (int d : data) { tmp += d; } return tmp; } } ����������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/MyRunnable.java���������������������������������0000664�0000000�0000000�00000002570�13126503031�0025106�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.api; public interface MyRunnable { public void runJob() throws InterruptedException; public void cancelJob(); } ����������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/NiceNumber.java���������������������������������0000664�0000000�0000000�00000004010�13126503031�0025050�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.api; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Locale; public class NiceNumber { public static int getNicer(final int value) { if (value <= 18) { return value; } if (value < 93) { return ((value + 2) / 5) * 5; } if (value < 100) { return ((value + 5) / 10) * 10; } int m = 1; double head = value; while (head >= 100) { head = head / 10.0; m *= 10; } return getNicer((int) Math.round(head)) * m; } public static String format(final long v) { final DecimalFormat df = new DecimalFormat(); df.setDecimalFormatSymbols(new DecimalFormatSymbols(Locale.US)); df.setGroupingSize(3); df.setMaximumFractionDigits(0); final String t = df.format(v).replace(',', ' '); return t; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/NumberAnalyzed.java�����������������������������0000664�0000000�0000000�00000013506�13126503031�0025753�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 Lesser General Public * License for more details. * * You should have received a copy of the GNU General Public * License aint with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. */ package net.sourceforge.plantuml.api; import java.util.StringTokenizer; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import java.util.prefs.Preferences; import net.sourceforge.plantuml.Log; public class NumberAnalyzed implements INumberAnalyzed { private static final int SLIDING_WINDOW = 512; private long nb; private long sum; private long min; private long max; private long sumOfSquare; // See https://fossies.org/linux/haproxy/include/proto/freq_ctr.h private long sliddingSum; private final String name; private final Lock saveLock = new ReentrantLock(); public NumberAnalyzed(String name) { this.name = name; } public synchronized void reset() { this.nb = 0; this.sum = 0; this.min = 0; this.max = 0; this.sumOfSquare = 0; this.sliddingSum = 0; } public NumberAnalyzed() { this(""); } public final void save(Preferences prefs) { if (name.length() == 0) { throw new UnsupportedOperationException(); } if (saveLock.tryLock()) try { prefs.put(name + ".saved", getSavedString()); } finally { saveLock.unlock(); } } private String getSavedString() { final long nb1; final long sum1; final long min1; final long max1; final long sumOfSquare1; final long sliddingSum1; final String supp1; synchronized (this) { nb1 = nb; sum1 = sum; min1 = min; max1 = max; sumOfSquare1 = sumOfSquare; sliddingSum1 = sliddingSum; } supp1 = getSavedSupplementatyData(); return longToString(nb1) + ";" + longToString(sum1) + ";" + longToString(min1) + ";" + longToString(max1) + ";" + longToString(sumOfSquare1) + ";" + longToString(sliddingSum1) + ";" + supp1 + ";"; } protected String getSavedSupplementatyData() { return ""; } protected final String longToString(long val) { return Long.toString(val, 36); } public static NumberAnalyzed load(String name, Preferences prefs) { final String value = prefs.get(name + ".saved", ""); if (value.length() == 0) { Log.info("Cannot load " + name); return null; } try { final StringTokenizer st = new StringTokenizer(value, ";"); return new NumberAnalyzed(name, Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong( st.nextToken(), 36), Long.parseLong(st.nextToken(), 36)); } catch (Exception e) { e.printStackTrace(); Log.info("Error reading " + value); return null; } } @Override public synchronized String toString() { return "sum=" + sum + " nb=" + nb + " min=" + min + " max=" + max + " mean=" + getMean(); } protected NumberAnalyzed(String name, long nb, long sum, long min, long max, long sumOfSquare, long sliddingSum) { this(name); this.nb = nb; this.sum = sum; this.min = min; this.max = max; this.sumOfSquare = sumOfSquare; this.sliddingSum = sliddingSum; } public synchronized INumberAnalyzed getCopyImmutable() { final NumberAnalyzed copy = new NumberAnalyzed(name, nb, sum, min, max, sumOfSquare, sliddingSum); return copy; } public synchronized void addValue(long v) { nb++; if (nb == 1) { min = v; max = v; } else if (v > max) { max = v; } else if (v < min) { min = v; } sum += v; sumOfSquare += v * v; sliddingSum = sliddingSum * (SLIDING_WINDOW - 1) / SLIDING_WINDOW + v; } public void add(NumberAnalyzed other) { final long nb1; final long sum1; final long min1; final long max1; final long sumOfSquare1; final long sliddingSum1; synchronized (other) { nb1 = other.nb; sum1 = other.sum; min1 = other.min; max1 = other.max; sumOfSquare1 = other.sumOfSquare; sliddingSum1 = other.sliddingSum; } synchronized (this) { this.sum += sum1; this.nb += nb1; this.min = Math.min(this.min, min1); this.max = Math.max(this.max, max1); this.sumOfSquare += sumOfSquare1; // Not good! this.sliddingSum += sliddingSum1; } } synchronized public final long getNb() { return nb; } synchronized public final long getSum() { return sum; } synchronized public final long getMin() { return min; } synchronized public final long getMax() { return max; } synchronized public final long getMean() { if (nb == 0) { return 0; } return sum / nb; } public final long getStandardDeviation() { final long sum1; final long sumOfSquare1; final long nb1; synchronized (this) { sum1 = this.sum; sumOfSquare1 = this.sumOfSquare; nb1 = this.nb; } if (nb1 == 0) { return 0; } final long mean = sum1 / nb1; return Math.round(Math.sqrt(sumOfSquare1 / nb1 - mean * mean)); } final public String getName() { return name; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/NumberAnalyzed2.java����������������������������0000664�0000000�0000000�00000011470�13126503031�0026033�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 Lesser General Public * License for more details. * * You should have received a copy of the GNU General Public * License aint with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. */ package net.sourceforge.plantuml.api; import java.util.StringTokenizer; import java.util.concurrent.atomic.AtomicLong; import java.util.prefs.Preferences; import net.sourceforge.plantuml.Log; public class NumberAnalyzed2 implements INumberAnalyzed { private static final int SLIDING_WINDOW = 512; private final AtomicLong nb = new AtomicLong(); private final AtomicLong sum = new AtomicLong(); private final AtomicLong min = new AtomicLong(); private final AtomicLong max = new AtomicLong(); private final AtomicLong sumOfSquare = new AtomicLong(); // See https://fossies.org/linux/haproxy/include/proto/freq_ctr.h private final AtomicLong sliddingSum = new AtomicLong(); private final String name; public NumberAnalyzed2(String name) { this.name = name; } public void reset() { this.nb.set(0); this.sum.set(0); this.min.set(0); this.max.set(0); this.sumOfSquare.set(0); this.sliddingSum.set(0); } public NumberAnalyzed2() { this(""); } public final void save(Preferences prefs) { if (name.length() == 0) { throw new UnsupportedOperationException(); } prefs.put(name + ".saved", getSavedString()); } protected String getSavedString() { final String value = longToString(nb) + ";" + longToString(sum) + ";" + longToString(min) + ";" + longToString(max) + ";" + longToString(sumOfSquare) + ";" + longToString(sliddingSum); return value; } protected final String longToString(AtomicLong val) { return Long.toString(val.get(), 36); } public static NumberAnalyzed2 load(String name, Preferences prefs) { final String value = prefs.get(name + ".saved", ""); if (value.length() == 0) { System.err.println("Cannot load " + name); return null; } try { final StringTokenizer st = new StringTokenizer(value, ";"); return new NumberAnalyzed2(name, Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong( st.nextToken(), 36), Long.parseLong(st.nextToken(), 36)); } catch (Exception e) { e.printStackTrace(); Log.info("Error reading " + value); return null; } } @Override public String toString() { return "sum=" + sum + " nb=" + nb + " min=" + min + " max=" + max + " mean=" + getMean(); } protected NumberAnalyzed2(String name, long nb, long sum, long min, long max, long sumOfSquare, long sliddingSum) { this(name); this.nb.set(nb); this.sum.set(sum); this.min.set(min); this.max.set(max); this.sumOfSquare.set(sumOfSquare); this.sliddingSum.set(sliddingSum); } public INumberAnalyzed getCopyImmutable() { final NumberAnalyzed2 copy = new NumberAnalyzed2(name, nb.get(), sum.get(), min.get(), max.get(), sumOfSquare.get(), sliddingSum.get()); return copy; } public void addValue(long v) { nb.incrementAndGet(); if (nb.get() == 1) { min.set(v); max.set(v); } else if (v > max.get()) { max.set(v); } else if (v < min.get()) { min.set(v); } sum.addAndGet(v); sumOfSquare.addAndGet(v * v); sliddingSum.set(sliddingSum.get() * (SLIDING_WINDOW - 1) / SLIDING_WINDOW + v); } public void add(NumberAnalyzed2 other) { this.sum.addAndGet(other.sum.get()); this.nb.addAndGet(other.nb.get()); this.min.set(Math.min(this.min.get(), other.min.get())); this.max.set(Math.max(this.max.get(), other.max.get())); } public final long getNb() { return nb.get(); } public final long getSum() { return sum.get(); } public final long getMin() { return min.get(); } public final long getMax() { return max.get(); } public final long getMean() { if (nb.get() == 0) { return 0; } return sum.get() / nb.get(); } final public String getName() { return name; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/NumberAnalyzedDated.java������������������������0000664�0000000�0000000�00000007311�13126503031�0026712�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 Lesser General Public * License for more details. * * You should have received a copy of the GNU General Public * License aint with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. */ package net.sourceforge.plantuml.api; import java.util.StringTokenizer; import java.util.concurrent.atomic.AtomicLong; import java.util.prefs.Preferences; import net.sourceforge.plantuml.Log; public class NumberAnalyzedDated extends NumberAnalyzed { private final AtomicLong created = new AtomicLong(); private final AtomicLong modified = new AtomicLong(); private String comment; private NumberAnalyzedDated(String name, long nb, long sum, long min, long max, long sumOfSquare, long sliddingSum, long created, long modified, String comment) { super(name, nb, sum, min, max, sumOfSquare, sliddingSum); this.created.set(created); this.modified.set(modified); this.comment = comment; } @Override public synchronized void reset() { super.reset(); resetCreatedModifiedComment(); } public NumberAnalyzedDated() { super(); resetCreatedModifiedComment(); } public NumberAnalyzedDated(String name) { super(name); resetCreatedModifiedComment(); } private void resetCreatedModifiedComment() { final long now = System.currentTimeMillis(); this.created.set(now); this.modified.set(now); this.comment = " "; }; @Override public void addValue(long v) { super.addValue(v); this.modified.set(System.currentTimeMillis()); } @Override public void add(NumberAnalyzed other) { super.add(other); this.modified.set(System.currentTimeMillis()); } @Override protected String getSavedSupplementatyData() { return longToString(created.get()) + ";" + longToString(modified.get()) + ";" + comment; } public static NumberAnalyzedDated load(String name, Preferences prefs) { final String value = prefs.get(name + ".saved", ""); if (value.length() == 0) { Log.info("Cannot load " + name); return null; } try { final StringTokenizer st = new StringTokenizer(value, ";"); return new NumberAnalyzedDated(name, Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong( st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong( st.nextToken(), 36), st.nextToken()); } catch (Exception e) { e.printStackTrace(); Log.info("Error reading " + value); return null; } } final public long getCreationTime() { return created.get(); } final public long getModificationTime() { return modified.get(); } final public synchronized String getComment() { return comment; } final public synchronized void setComment(String comment) { this.comment = comment; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/PSystemFactory.java�����������������������������0000664�0000000�0000000�00000003011�13126503031�0025755�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.api; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; public interface PSystemFactory { Diagram createSystem(UmlSource source); DiagramType getDiagramType(); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/PlantumlUtils.java������������������������������0000664�0000000�0000000�00000003554�13126503031�0025652�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.api; import java.util.List; import net.sourceforge.plantuml.BlockUml; import net.sourceforge.plantuml.SourceStringReader; import net.sourceforge.plantuml.core.Diagram; public class PlantumlUtils { public static boolean hasCMapData(String uml) { List blocks = new SourceStringReader(uml).getBlocks(); if (blocks.size() == 0) { uml = "@startuml\n" + uml + "\n@enduml"; blocks = new SourceStringReader(uml).getBlocks(); if (blocks.size() == 0) { return false; } } final BlockUml block = blocks.get(0); final Diagram diagram = block.getDiagram(); return diagram.hasUrl(); } } ����������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/TimeoutExecutor.java����������������������������0000664�0000000�0000000�00000004407�13126503031�0026200�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.api; import java.util.concurrent.atomic.AtomicBoolean; public final class TimeoutExecutor { private final long ms; public TimeoutExecutor(long ms) { this.ms = ms; } public boolean executeNow(MyRunnable task) { final MyThread mainThread = new MyThread(task); boolean done = false; try { mainThread.start(); mainThread.join(ms); } catch (InterruptedException e) { System.err.println("TimeoutExecutorA " + e); e.printStackTrace(); return false; } finally { done = mainThread.done.get(); if (done == false) { task.cancelJob(); mainThread.interrupt(); } } return done; } class MyThread extends Thread { private final MyRunnable task; private final AtomicBoolean done = new AtomicBoolean(false); private MyThread(MyRunnable task) { this.task = task; } @Override public void run() { try { task.runJob(); done.set(true); } catch (InterruptedException e) { System.err.println("TimeoutExecutorB " + e); e.printStackTrace(); } } } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/doc-files/��������������������������������������0000775�0000000�0000000�00000000000�13126503031�0024030�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/doc-files/umls.html�����������������������������0000664�0000000�0000000�00000002255�13126503031�0025702�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ @startuml img1.png title API component API @enduml ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/mda/��������������������������������������������0000775�0000000�0000000�00000000000�13126503031�0022724�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/mda/option2/������������������������������������0000775�0000000�0000000�00000000000�13126503031�0024316�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/mda/option2/MDADiagram.java���������������������0000664�0000000�0000000�00000002601�13126503031�0027046�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.api.mda.option2; import java.util.Collection; public interface MDADiagram { public Collection getPackages(); } �������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/mda/option2/MDAEntity.java����������������������0000664�0000000�0000000�00000002517�13126503031�0026764�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.api.mda.option2; public interface MDAEntity { public String getName(); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/mda/option2/MDAPackage.java���������������������0000664�0000000�0000000�00000002635�13126503031�0027044�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.api.mda.option2; import java.util.Collection; public interface MDAPackage { public String getName(); public Collection getEntities(); } ���������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/mda/option2/MDAUtils.java�����������������������0000664�0000000�0000000�00000002747�13126503031�0026615�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.api.mda.option2; import net.sourceforge.plantuml.mda.MDADiagramImpl; public class MDAUtils { public static MDADiagram getMDADiagram(String plantumlDiagramSource) { return MDADiagramImpl.create(plantumlDiagramSource); } } �������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/mda/option3/������������������������������������0000775�0000000�0000000�00000000000�13126503031�0024317�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/mda/option3/MDAVisitor.java���������������������0000664�0000000�0000000�00000002465�13126503031�0027152�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.api.mda.option3; public interface MDAVisitor { } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/api/package.html������������������������������������0000664�0000000�0000000�00000002472�13126503031�0024451�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������

Public API for calling PlantUML from Java.

Overview

This package provides an API for generating UML diagram from Java application.

plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/000077500000000000000000000000001312650303100232115ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/AbstractComponentText.java000066400000000000000000000033661312650303100303570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Component; public abstract class AbstractComponentText implements Component { public final Dimension2D getPreferredDimension(StringBounder stringBounder) { final double w = getPreferredWidth(stringBounder); final double h = getPreferredHeight(stringBounder); return new Dimension2DDouble(w, h); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/AsciiShape.java000066400000000000000000000066371312650303100261010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; public enum AsciiShape { // int STICKMAN_HEIGHT = 5; // int STICKMAN_UNICODE_HEIGHT = 6; STICKMAN(3, 5), STICKMAN_UNICODE(3, 6), BOUNDARY(8, 3), DATABASE(10, 6); private final int width; private final int height; private AsciiShape(int width, int height) { this.width = width; this.height = height; } public void draw(BasicCharArea area, int x, int y) { if (this == STICKMAN) { drawStickMan(area, x, y); } else if (this == STICKMAN_UNICODE) { drawStickManUnicode(area, x, y); } else if (this == BOUNDARY) { drawBoundary(area, x, y); } else if (this == DATABASE) { drawDatabase(area, x, y); } } private void drawDatabase(BasicCharArea area, int x, int y) { area.drawStringLR(" ,.-^^-._", x, y++); area.drawStringLR("|-.____.-|", x, y++); area.drawStringLR("| |", x, y++); area.drawStringLR("| |", x, y++); area.drawStringLR("| |", x, y++); area.drawStringLR("'-.____.-'", x, y++); } private void drawDatabaseSmall(BasicCharArea area, int x, int y) { area.drawStringLR(" ,.-\"-._ ", x, y++); area.drawStringLR("|-.___.-|", x, y++); area.drawStringLR("| |", x, y++); area.drawStringLR("| |", x, y++); area.drawStringLR("| |", x, y++); area.drawStringLR("'-.___.-'", x, y++); } private void drawBoundary(BasicCharArea area, int x, int y) { area.drawStringLR("| ,-.", x, y++); area.drawStringLR("+--{ )", x, y++); area.drawStringLR("| `-'", x, y++); } private void drawStickMan(BasicCharArea area, int x, int y) { area.drawStringLR(",-.", x, y++); area.drawStringLR("`-'", x, y++); area.drawStringLR("/|\\", x, y++); area.drawStringLR(" | ", x, y++); area.drawStringLR("/ \\", x, y++); } private void drawStickManUnicode(BasicCharArea area, int x, int y) { area.drawStringLR("\u250c\u2500\u2510", x, y++); area.drawStringLR("\u2551\"\u2502", x, y++); area.drawStringLR("\u2514\u252c\u2518", x, y++); area.drawStringLR("\u250c\u253c\u2510", x, y++); area.drawStringLR(" \u2502 ", x, y++); area.drawStringLR("\u250c\u2534\u2510", x, y++); } public final int getHeight() { return height; } public final int getWidth() { return width; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/BasicCharArea.java000066400000000000000000000035541312650303100264730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.io.PrintStream; import java.util.List; public interface BasicCharArea { int getWidth(); int getHeight(); void drawChar(char c, int x, int y); void fillRect(char c, int x, int y, int width, int height); void drawStringLR(String string, int x, int y); void drawStringTB(String string, int x, int y); String getLine(int line); void print(PrintStream ps); List getLines(); void drawHLine(char c, int line, int col1, int col2); void drawHLine(char c, int line, int col1, int col2, char ifFound, char thenUse); void drawVLine(char c, int col, int line1, int line2); }plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/BasicCharAreaImpl.java000066400000000000000000000104331312650303100273070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.io.PrintStream; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class BasicCharAreaImpl implements BasicCharArea { private int charSize1 = 160; private int charSize2 = 160; private int width; private int height; private char chars[][]; public BasicCharAreaImpl() { this.chars = new char[charSize1][charSize2]; for (int i = 0; i < charSize1; i++) { for (int j = 0; j < charSize2; j++) { chars[i][j] = ' '; } } } public final int getWidth() { return width; } public final int getHeight() { return height; } public void drawChar(char c, int x, int y) { ensurePossible(x, y); chars[x][y] = c; if (x >= width) { width = x + 1; } if (y >= height) { height = y + 1; } } private void ensurePossible(int x, int y) { int newCharSize1 = charSize1; int newCharSize2 = charSize2; while (x >= newCharSize1) { newCharSize1 *= 2; } while (y >= newCharSize2) { newCharSize2 *= 2; } if (newCharSize1 != charSize1 || newCharSize2 != charSize2) { final char newChars[][] = new char[newCharSize1][newCharSize2]; for (int i = 0; i < newCharSize1; i++) { for (int j = 0; j < newCharSize2; j++) { char c = ' '; if (i < charSize1 && j < charSize2) { c = chars[i][j]; } newChars[i][j] = c; } } this.chars = newChars; this.charSize1 = newCharSize1; this.charSize2 = newCharSize2; } } public void drawStringLR(String string, int x, int y) { for (int i = 0; i < string.length(); i++) { drawChar(string.charAt(i), x + i, y); } } public void drawStringTB(String string, int x, int y) { for (int i = 0; i < string.length(); i++) { drawChar(string.charAt(i), x, y + i); } } public String getLine(int line) { final StringBuilder sb = new StringBuilder(charSize1); for (int x = 0; x < width; x++) { sb.append(chars[x][line]); } return sb.toString(); } public void print(PrintStream ps) { for (String s : getLines()) { ps.println(s); } } public List getLines() { final List result = new ArrayList(height); for (int y = 0; y < height; y++) { result.add(getLine(y)); } return Collections.unmodifiableList(result); } public void drawHLine(char c, int line, int col1, int col2) { for (int x = col1; x < col2; x++) { this.drawChar(c, x, line); } } public void drawHLine(char c, int line, int col1, int col2, char ifFound, char thenUse) { for (int x = col1; x < col2; x++) { ensurePossible(x, line); if (this.chars[x][line] == ifFound) { this.drawChar(thenUse, x, line); } else { this.drawChar(c, x, line); } } } public void drawVLine(char c, int col, int line1, int line2) { for (int y = line1; y < line2; y++) { this.drawChar(c, col, y); } } @Override public String toString() { return getLines().toString(); } public void fillRect(char c, int x, int y, int width, int height) { for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { drawChar(c, x + i, y + j); } } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextActiveLine.java000066400000000000000000000051261312650303100306330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextActiveLine extends AbstractComponentText { private final FileFormat fileFormat; public ComponentTextActiveLine(FileFormat fileFormat) { this.fileFormat = fileFormat; } public void drawU(UGraphic ug, Area area, Context2D context) { final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); final int height = (int) dimensionToUse.getHeight(); if (fileFormat == FileFormat.UTXT) { charArea.fillRect(' ', 0, 0, width, height); charArea.drawBoxSimpleUnicode(0, 0, width, height); charArea.drawChar('\u2534', width/2, 0); charArea.drawChar('\u252c', width/2, height-1); } else { charArea.fillRect('X', 0, 0, width, height); charArea.drawBoxSimple(0, 0, width, height); } } public double getPreferredHeight(StringBounder stringBounder) { return 0; } public double getPreferredWidth(StringBounder stringBounder) { return 3; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextActor.java000066400000000000000000000070561312650303100276640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextActor extends AbstractComponentText { private final ComponentType type; private final Display stringsToDisplay; private final FileFormat fileFormat; private final AsciiShape shape; public ComponentTextActor(ComponentType type, Display stringsToDisplay, FileFormat fileFormat, AsciiShape shape) { this.type = type; this.stringsToDisplay = stringsToDisplay; this.fileFormat = fileFormat; this.shape = shape; } public void drawU(UGraphic ug, Area area, Context2D context) { final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); final int height = (int) dimensionToUse.getHeight(); charArea.fillRect(' ', 0, 0, width, height); final int xman = width / 2 - 1; if (type == ComponentType.ACTOR_HEAD) { charArea.drawStringsLR(stringsToDisplay.as(), 1, getHeight()); if (fileFormat == FileFormat.UTXT) { charArea.drawShape(AsciiShape.STICKMAN_UNICODE, xman, 0); } else { charArea.drawShape(AsciiShape.STICKMAN, xman, 0); } } else if (type == ComponentType.ACTOR_TAIL) { charArea.drawStringsLR(stringsToDisplay.as(), 1, 0); if (fileFormat == FileFormat.UTXT) { charArea.drawShape(AsciiShape.STICKMAN_UNICODE, xman, 1); } else { charArea.drawShape(AsciiShape.STICKMAN, xman, 1); } } else { assert false; } } private int getHeight() { if (fileFormat == FileFormat.UTXT) { return AsciiShape.STICKMAN_UNICODE.getHeight(); } return AsciiShape.STICKMAN.getHeight(); } public double getPreferredHeight(StringBounder stringBounder) { return StringUtils.getHeight(stringsToDisplay) + getHeight(); } public double getPreferredWidth(StringBounder stringBounder) { return StringUtils.getWidth(stringsToDisplay) + 2; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextArrow.java000066400000000000000000000111201312650303100276710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.sequencediagram.MessageNumber; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.ArrowConfiguration; import net.sourceforge.plantuml.skin.ArrowDirection; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextArrow extends AbstractComponentText { private final ComponentType type; private final Display stringsToDisplay; private final FileFormat fileFormat; private final ArrowConfiguration config; private final int maxAsciiMessageLength; public ComponentTextArrow(ComponentType type, ArrowConfiguration config, Display stringsToDisplay, FileFormat fileFormat, int maxAsciiMessageLength) { this.maxAsciiMessageLength = maxAsciiMessageLength; this.type = type; this.config = config; this.stringsToDisplay = clean(stringsToDisplay); this.fileFormat = fileFormat; } private static Display clean(Display orig) { if (orig.size() == 0 || orig.get(0) instanceof MessageNumber == false) { return orig; } Display result = Display.empty(); for (int i = 0; i < orig.size(); i++) { CharSequence element = orig.get(i); if (i == 1) { element = removeTag(orig.get(0).toString()) + " " + element; } if (i != 0) { result = result.add(element); } } return result; } private static String removeTag(String s) { return s.replaceAll("\\<[^<>]+\\>", ""); } public void drawU(UGraphic ug, Area area, Context2D context) { if (config.isHidden()) { return; } final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); final int height = (int) dimensionToUse.getHeight(); final int textWidth = StringUtils.getWidth(stringsToDisplay); final int yarrow = height - 2; charArea.drawHLine(fileFormat == FileFormat.UTXT ? '\u2500' : '-', yarrow, 1, width); if (config.isDotted()) { for (int i = 1; i < width; i += 2) { charArea.drawChar(' ', i, yarrow); } } if (config.getArrowDirection() == ArrowDirection.LEFT_TO_RIGHT_NORMAL) { charArea.drawChar('>', width - 1, yarrow); } else if (config.getArrowDirection() == ArrowDirection.RIGHT_TO_LEFT_REVERSE) { charArea.drawChar('<', 1, yarrow); } else if (config.getArrowDirection() == ArrowDirection.BOTH_DIRECTION) { charArea.drawChar('>', width - 1, yarrow); charArea.drawChar('<', 1, yarrow); } else { throw new UnsupportedOperationException(); } // final int position = Math.max(0, (width - textWidth) / 2); charArea.drawStringsLR(stringsToDisplay.as(), (width - textWidth) / 2, 0); } public double getPreferredHeight(StringBounder stringBounder) { return StringUtils.getHeight(stringsToDisplay) + 2; } public double getPreferredWidth(StringBounder stringBounder) { final int width = StringUtils.getWidth(stringsToDisplay) + 2; if (maxAsciiMessageLength > 0) { return Math.min(maxAsciiMessageLength, width); } return width; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextDelay.java000066400000000000000000000053501312650303100276450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextDelay extends AbstractComponentText { private final Display stringsToDisplay; public ComponentTextDelay(ComponentType type, Display stringsToDisplay, FileFormat fileFormat) { this.stringsToDisplay = stringsToDisplay; } public void drawU(UGraphic ug, Area area, Context2D context) { final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); final int textWidth = StringUtils.getWidth(stringsToDisplay); final int textPos = (width - textWidth) / 2; if (stringsToDisplay.isWhite()) { return; } final String desc = stringsToDisplay.get(0).toString(); charArea.drawStringLR(desc, textPos, 1); } public double getPreferredHeight(StringBounder stringBounder) { return StringUtils.getHeight(stringsToDisplay) + 4; } public double getPreferredWidth(StringBounder stringBounder) { return StringUtils.getWidth(stringsToDisplay) + 2; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextDestroy.java000066400000000000000000000041241312650303100302360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextDestroy extends AbstractComponentText { public ComponentTextDestroy() { } public void drawU(UGraphic ug, Area area, Context2D context) { final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); charArea.drawStringLR("/", 2, 0); charArea.drawStringLR("\\", 0, 0); charArea.drawStringLR("X", 1, 1); charArea.drawStringLR("\\", 2, 2); charArea.drawStringLR("/", 0, 2); } public double getPreferredHeight(StringBounder stringBounder) { return 5; } public double getPreferredWidth(StringBounder stringBounder) { return 3; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextDivider.java000066400000000000000000000070621312650303100301770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextDivider extends AbstractComponentText { private final ComponentType type; private final Display stringsToDisplay; private final FileFormat fileFormat; public ComponentTextDivider(ComponentType type, Display stringsToDisplay, FileFormat fileFormat) { this.type = type; this.stringsToDisplay = stringsToDisplay; this.fileFormat = fileFormat; } public void drawU(UGraphic ug, Area area, Context2D context) { final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); final int textWidth = StringUtils.getWidth(stringsToDisplay); // final int height = (int) dimensionToUse.getHeight(); final int textPos = (width - textWidth - 1) / 2; final String desc = " " + stringsToDisplay.get(0).toString(); if (fileFormat == FileFormat.UTXT) { charArea.drawHLine('\u2550', 2, 0, width, '\u2502', '\u256a'); charArea.drawStringLR(desc, textPos, 2); charArea.drawHLine('\u2550', 1, textPos - 1, textPos + desc.length() + 1, '\u2502', '\u2567'); charArea.drawHLine('\u2550', 3, textPos - 1, textPos + desc.length() + 1, '\u2502', '\u2564'); charArea.drawStringTB("\u2554\u2563\u255a", textPos - 1, 1); charArea.drawStringTB("\u2557\u2560\u255d", textPos + desc.length(), 1); } else { charArea.drawHLine('=', 2, 0, width); charArea.drawStringLR(desc, textPos, 2); charArea.drawHLine('=', 1, textPos - 1, textPos + desc.length() + 1); charArea.drawHLine('=', 3, textPos - 1, textPos + desc.length() + 1); } } public double getPreferredHeight(StringBounder stringBounder) { return StringUtils.getHeight(stringsToDisplay) + 4; } public double getPreferredWidth(StringBounder stringBounder) { return StringUtils.getWidth(stringsToDisplay) + 2; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextGroupingBody.java000066400000000000000000000060241312650303100312160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import java.util.List; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextGroupingBody extends AbstractComponentText { private final ComponentType type; private final List stringsToDisplay; private final FileFormat fileFormat; public ComponentTextGroupingBody(ComponentType type, List stringsToDisplay, FileFormat fileFormat) { this.type = type; this.stringsToDisplay = stringsToDisplay; this.fileFormat = fileFormat; } public void drawU(UGraphic ug, Area area, Context2D context) { final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); final int height = (int) dimensionToUse.getHeight(); if (fileFormat == FileFormat.UTXT) { charArea.drawVLine('\u2551', 0, 0, height); charArea.drawVLine('\u2551', width - 1, 0, height); charArea.drawHLine('\u2550', height - 1, 1, width - 1, '\u2502', '\u256a'); charArea.drawChar('\u2560', 0, height - 1); charArea.drawChar('\u2563', width - 1, height - 1); } else { charArea.drawVLine('!', 0, 0, height); charArea.drawVLine('!', width - 1, 0, height); charArea.drawHLine('~', height - 1, 1, width - 1); } } public double getPreferredHeight(StringBounder stringBounder) { return 1; } public double getPreferredWidth(StringBounder stringBounder) { return 1; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextGroupingElse.java000066400000000000000000000056241312650303100312160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextGroupingElse extends AbstractComponentText { private final ComponentType type; private final Display stringsToDisplay; private final FileFormat fileFormat; public ComponentTextGroupingElse(ComponentType type, Display stringsToDisplay, FileFormat fileFormat) { this.type = type; this.stringsToDisplay = stringsToDisplay; this.fileFormat = fileFormat; } public void drawU(UGraphic ug, Area area, Context2D context) { final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); if (stringsToDisplay.get(0) != null) { charArea.drawStringLR("[" + stringsToDisplay.get(0) + "]", 2, 0); } if (fileFormat == FileFormat.UTXT) { charArea.drawChar('\u2560', 0, -1); charArea.drawChar('\u2563', width - 1, -1); charArea.drawHLine('\u2550', -1, 1, width - 1, '\u2502', '\u256a'); } else { charArea.drawHLine('~', -1, 1, width - 1); } // charArea.fillRect('E', 0, 0, width, height); } public double getPreferredHeight(StringBounder stringBounder) { return 1; } public double getPreferredWidth(StringBounder stringBounder) { return 1; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextGroupingHeader.java000066400000000000000000000100441312650303100315060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextGroupingHeader extends AbstractComponentText { private final ComponentType type; private final Display stringsToDisplay; private final FileFormat fileFormat; public ComponentTextGroupingHeader(ComponentType type, Display stringsToDisplay, FileFormat fileFormat) { this.type = type; this.stringsToDisplay = stringsToDisplay; this.fileFormat = fileFormat; } public void drawU(UGraphic ug, Area area, Context2D context) { final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); final int height = (int) dimensionToUse.getHeight(); // charArea.fillRect('G', 0, 0, width, height); final String text = stringsToDisplay.get(0).toString(); if (fileFormat == FileFormat.UTXT) { charArea.drawHLine('\u2550', 0, 1, width - 1, '\u2502', '\u256a'); charArea.drawStringLR(StringUtils.goUpperCase(text) + " /", 2, 1); charArea.drawHLine('\u2500', 2, 1, text.length() + 4); charArea.drawVLine('\u2551', 0, 1, height - 1); charArea.drawVLine('\u2551', width - 1, 1, height - 1); charArea.drawChar('\u255f', 0, 2); charArea.drawStringTB("\u2564\u2502\u2518", text.length() + 4, 0); charArea.drawChar('\u2554', 0, 0); charArea.drawChar('\u2557', width - 1, 0); charArea.drawHLine('\u2550', height - 1, 1, width - 1, '\u2502', '\u256a'); charArea.drawChar('\u255a', 0, height - 1); charArea.drawChar('\u255d', width - 1, height - 1); } else { charArea.drawHLine('_', 0, 0, width - 1); charArea.drawStringLR(StringUtils.goUpperCase(text) + " /", 2, 1); charArea.drawHLine('_', 2, 1, text.length() + 3); charArea.drawChar('/', text.length() + 3, 2); charArea.drawVLine('!', 0, 1, height); charArea.drawVLine('!', width - 1, 1, height); charArea.drawHLine('~', height - 1, 1, width - 1); } if (stringsToDisplay.size() > 1 && stringsToDisplay.get(1) != null) { final String comment = stringsToDisplay.get(1).toString(); charArea.drawStringLR(comment, text.length() + 7, 1); } } public double getPreferredHeight(StringBounder stringBounder) { return StringUtils.getHeight(stringsToDisplay) + 1; } public double getPreferredWidth(StringBounder stringBounder) { return StringUtils.getWidth(stringsToDisplay) + 2; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextGroupingTail.java000066400000000000000000000053641312650303100312200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import java.util.List; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextGroupingTail extends AbstractComponentText { private final ComponentType type; private final List stringsToDisplay; private final FileFormat fileFormat; public ComponentTextGroupingTail(ComponentType type, List stringsToDisplay, FileFormat fileFormat) { this.type = type; this.stringsToDisplay = stringsToDisplay; this.fileFormat = fileFormat; } public void drawU(UGraphic ug, Area area, Context2D context) { final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); final int height = (int) dimensionToUse.getHeight(); // charArea.fillRect('T', 0, 0, width, height); if (fileFormat == FileFormat.UTXT) { charArea.drawChar('\u255a', 0, height - 1); charArea.drawChar('\u255d', width - 1, height - 1); } } public double getPreferredHeight(StringBounder stringBounder) { return 1; } public double getPreferredWidth(StringBounder stringBounder) { return 1; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextLine.java000066400000000000000000000052631312650303100275010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextLine extends AbstractComponentText { private static final int MAGIC_NUMBER = -3; private char using; public ComponentTextLine(ComponentType type, FileFormat fileFormat) { if (fileFormat == FileFormat.UTXT) { using = '\u2502'; } else { using = '|'; } if (type == ComponentType.DELAY_LINE) { using = '.'; } } public void drawU(UGraphic ug, Area area, Context2D context) { final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); final int height = (int) dimensionToUse.getHeight(); charArea.drawVLine(using, (width - 1) / 2, MAGIC_NUMBER, height); // if (using == '.') { // charArea.drawVLine(using, (width - 1) / 2, -3, height); // } else { // charArea.drawVLine(using, (width - 1) / 2, 0, height); // } } public double getPreferredHeight(StringBounder stringBounder) { return 0; } public double getPreferredWidth(StringBounder stringBounder) { return 3; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextNewpage.java000066400000000000000000000045371312650303100302030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextNewpage extends AbstractComponentText { private final FileFormat fileFormat; public ComponentTextNewpage(FileFormat fileFormat) { this.fileFormat = fileFormat; } public void drawU(UGraphic ug, Area area, Context2D context) { final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); if (fileFormat == FileFormat.UTXT) { charArea.drawHLine('\u2550', 0, 0, width, '\u2502', '\u256a'); } else { charArea.drawHLine('=', 0, 0, width); } } public double getPreferredHeight(StringBounder stringBounder) { return 2; } public double getPreferredWidth(StringBounder stringBounder) { return 2; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextNote.java000066400000000000000000000062601312650303100275150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextNote extends AbstractComponentText { private final ComponentType type; private final Display stringsToDisplay; private final FileFormat fileFormat; public ComponentTextNote(ComponentType type, Display stringsToDisplay, FileFormat fileFormat) { this.type = type; this.stringsToDisplay = stringsToDisplay; this.fileFormat = fileFormat; } public void drawU(UGraphic ug, Area area, Context2D context) { final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth() - 1; final int height = (int) dimensionToUse.getHeight(); charArea.fillRect(' ', 2, 1, width - 3, height - 2); if (type == ComponentType.NOTE) { if (fileFormat == FileFormat.UTXT) { charArea.drawNoteSimpleUnicode(2, 0, width - 2, height); } else { charArea.drawNoteSimple(2, 0, width - 2, height); } } else if (type == ComponentType.NOTE_BOX) { if (fileFormat == FileFormat.UTXT) { charArea.drawBoxSimpleUnicode(2, 0, width - 2, height); } else { charArea.drawBoxSimple(2, 0, width - 2, height); } } charArea.drawStringsLR(stringsToDisplay.as(), 3, 1); } public double getPreferredHeight(StringBounder stringBounder) { return StringUtils.getHeight(stringsToDisplay) + 2; } public double getPreferredWidth(StringBounder stringBounder) { return StringUtils.getWidth(stringsToDisplay) + 7; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextParticipant.java000066400000000000000000000065311312650303100310670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextParticipant extends AbstractComponentText { private final ComponentType type; private final Display stringsToDisplay; private final FileFormat fileFormat; public ComponentTextParticipant(ComponentType type, Display stringsToDisplay, FileFormat fileFormat) { this.type = type; this.stringsToDisplay = stringsToDisplay; this.fileFormat = fileFormat; } public void drawU(UGraphic ug, Area area, Context2D context) { final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); final int height = (int) dimensionToUse.getHeight(); charArea.fillRect(' ', 0, 0, width, height); if (fileFormat == FileFormat.UTXT) { charArea.drawBoxSimpleUnicode(0, 0, width, height); if (type == ComponentType.PARTICIPANT_TAIL) { charArea.drawChar('\u2534', (width - 1) / 2, 0); } if (type == ComponentType.PARTICIPANT_HEAD) { charArea.drawChar('\u252c', (width - 1) / 2, height - 1); } } else { charArea.drawBoxSimple(0, 0, width, height); if (type == ComponentType.PARTICIPANT_TAIL) { charArea.drawChar('+', (width - 1) / 2, 0); } if (type == ComponentType.PARTICIPANT_HEAD) { charArea.drawChar('+', (width - 1) / 2, height - 1); } } charArea.drawStringsLR(stringsToDisplay.as(), 1, 1); } public double getPreferredHeight(StringBounder stringBounder) { return StringUtils.getHeight(stringsToDisplay) + 2; } public double getPreferredWidth(StringBounder stringBounder) { return StringUtils.getWidth(stringsToDisplay) + 2; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextSelfArrow.java000066400000000000000000000071751312650303100305220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.ArrowConfiguration; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextSelfArrow extends AbstractComponentText { private final ComponentType type; private final Display stringsToDisplay; private final FileFormat fileFormat; private final ArrowConfiguration config; public ComponentTextSelfArrow(ComponentType type, ArrowConfiguration config, Display stringsToDisplay, FileFormat fileFormat) { this.type = type; this.stringsToDisplay = stringsToDisplay; this.fileFormat = fileFormat; this.config = config; } public void drawU(UGraphic ug, Area area, Context2D context) { if (config.isHidden()) { return; } final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); final int height = (int) dimensionToUse.getHeight() - 1; charArea.fillRect(' ', 0, 0, width, height); if (fileFormat == FileFormat.UTXT) { if (config.isDotted()) { charArea.drawStringLR("\u2500 \u2500 \u2510", 0, 0); charArea.drawStringLR("|", 4, 1); charArea.drawStringLR("< \u2500 \u2518", 0, 2); } else { charArea.drawStringLR("\u2500\u2500\u2500\u2500\u2510", 0, 0); charArea.drawStringLR("\u2502", 4, 1); charArea.drawStringLR("<\u2500\u2500\u2500\u2518", 0, 2); } } else if (config.isDotted()) { charArea.drawStringLR("- - .", 0, 0); charArea.drawStringLR("|", 4, 1); charArea.drawStringLR("< - '", 0, 2); } else { charArea.drawStringLR("----.", 0, 0); charArea.drawStringLR("|", 4, 1); charArea.drawStringLR("<---'", 0, 2); } charArea.drawStringsLR(stringsToDisplay.as(), 6, 1); } public double getPreferredHeight(StringBounder stringBounder) { return StringUtils.getHeight(stringsToDisplay) + 3; } public double getPreferredWidth(StringBounder stringBounder) { return StringUtils.getWidth(stringsToDisplay) + 6; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextShape.java000066400000000000000000000057771312650303100276640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public class ComponentTextShape extends AbstractComponentText { private final ComponentType type; private final Display stringsToDisplay; private final AsciiShape shape; public ComponentTextShape(ComponentType type, Display stringsToDisplay, AsciiShape shape) { this.type = type; this.stringsToDisplay = stringsToDisplay; this.shape = shape; } public void drawU(UGraphic ug, Area area, Context2D context) { final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); final int height = (int) dimensionToUse.getHeight(); charArea.fillRect(' ', 0, 0, width, height); final int xman = width / 2 - shape.getWidth() / 2 + 1; if (type.name().endsWith("_HEAD")) { charArea.drawStringsLR(stringsToDisplay.as(), 1, getHeight()); charArea.drawShape(shape, xman, 0); } else { charArea.drawStringsLR(stringsToDisplay.as(), 1, 0); charArea.drawShape(shape, xman, 1); } } private int getHeight() { return shape.getHeight(); } public double getPreferredHeight(StringBounder stringBounder) { return StringUtils.getHeight(stringsToDisplay) + getHeight(); } public double getPreferredWidth(StringBounder stringBounder) { return StringUtils.getWidth(stringsToDisplay) + 2; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/TextSkin.java000066400000000000000000000116221312650303100256270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.skin.ArrowConfiguration; import net.sourceforge.plantuml.skin.ArrowDirection; import net.sourceforge.plantuml.skin.Component; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.Skin; import net.sourceforge.plantuml.skin.rose.ComponentRoseGroupingSpace; public class TextSkin implements Skin { private final FileFormat fileFormat; public TextSkin(FileFormat fileFormat) { this.fileFormat = fileFormat; } public Component createComponent(ComponentType type, ArrowConfiguration config, ISkinParam param, Display stringsToDisplay) { if (type == ComponentType.ACTOR_HEAD || type == ComponentType.ACTOR_TAIL) { return new ComponentTextActor(type, stringsToDisplay, fileFormat, fileFormat == FileFormat.UTXT ? AsciiShape.STICKMAN_UNICODE : AsciiShape.STICKMAN); } if (type == ComponentType.BOUNDARY_HEAD || type == ComponentType.BOUNDARY_TAIL) { return new ComponentTextShape(type, stringsToDisplay, AsciiShape.BOUNDARY); } if (type == ComponentType.DATABASE_HEAD || type == ComponentType.DATABASE_TAIL) { return new ComponentTextShape(type, stringsToDisplay, AsciiShape.DATABASE); } if (type.name().endsWith("_HEAD") || type.name().endsWith("_TAIL")) { return new ComponentTextParticipant(type, stringsToDisplay, fileFormat); } if (type.isArrow() && (config.getArrowDirection() == ArrowDirection.LEFT_TO_RIGHT_NORMAL || config.getArrowDirection() == ArrowDirection.RIGHT_TO_LEFT_REVERSE || config .getArrowDirection() == ArrowDirection.BOTH_DIRECTION)) { return new ComponentTextArrow(type, config, stringsToDisplay, fileFormat, param.maxAsciiMessageLength()); } if (type.isArrow() && config.isSelfArrow()) { return new ComponentTextSelfArrow(type, config, stringsToDisplay, fileFormat); } if (type == ComponentType.PARTICIPANT_LINE) { return new ComponentTextLine(type, fileFormat); } if (type == ComponentType.CONTINUE_LINE) { return new ComponentTextLine(type, fileFormat); } if (type == ComponentType.DELAY_LINE) { return new ComponentTextLine(type, fileFormat); } if (type == ComponentType.ALIVE_BOX_CLOSE_CLOSE) { return new ComponentTextActiveLine(fileFormat); } if (type == ComponentType.ALIVE_BOX_CLOSE_OPEN) { return new ComponentTextActiveLine(fileFormat); } if (type == ComponentType.ALIVE_BOX_OPEN_CLOSE) { return new ComponentTextActiveLine(fileFormat); } if (type == ComponentType.ALIVE_BOX_OPEN_OPEN) { return new ComponentTextActiveLine(fileFormat); } if (type == ComponentType.NOTE || type == ComponentType.NOTE_BOX) { return new ComponentTextNote(type, stringsToDisplay, fileFormat); } if (type == ComponentType.DIVIDER) { return new ComponentTextDivider(type, stringsToDisplay, fileFormat); } if (type == ComponentType.GROUPING_HEADER) { return new ComponentTextGroupingHeader(type, stringsToDisplay, fileFormat); } if (type == ComponentType.GROUPING_SPACE) { return new ComponentRoseGroupingSpace(1); } if (type == ComponentType.GROUPING_ELSE) { return new ComponentTextGroupingElse(type, stringsToDisplay, fileFormat); } if (type == ComponentType.NEWPAGE) { return new ComponentTextNewpage(fileFormat); } if (type == ComponentType.DELAY_TEXT) { return new ComponentTextDelay(type, stringsToDisplay, fileFormat); } if (type == ComponentType.DESTROY) { return new ComponentTextDestroy(); } throw new UnsupportedOperationException(type.toString()); } public Object getProtocolVersion() { return 1; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/TextStringBounder.java000066400000000000000000000032011312650303100275020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UFont; public class TextStringBounder implements StringBounder { public Dimension2D calculateDimension(UFont font, String text) { return new Dimension2DDouble(text.length(), 1); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/TranslatedCharArea.java000066400000000000000000000070531312650303100275510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.io.PrintStream; import java.util.Collection; import java.util.List; public class TranslatedCharArea implements UmlCharArea { private final int dx; private final int dy; private final UmlCharArea charArea; public TranslatedCharArea(UmlCharArea charArea, int dx, int dy) { this.charArea = charArea; this.dx = dx; this.dy = dy; } public void drawBoxSimple(int x, int y, int width, int height) { charArea.drawBoxSimple(x + dx, y + dy, width, height); } public void drawBoxSimpleUnicode(int x, int y, int width, int height) { charArea.drawBoxSimpleUnicode(x + dx, y + dy, width, height); } public void drawNoteSimple(int x, int y, int width, int height) { charArea.drawNoteSimple(x + dx, y + dy, width, height); } public void drawNoteSimpleUnicode(int x, int y, int width, int height) { charArea.drawNoteSimpleUnicode(x + dx, y + dy, width, height); } public void drawShape(AsciiShape shape, int x, int y) { charArea.drawShape(shape, x + dx, y + dy); } public void drawChar(char c, int x, int y) { charArea.drawChar(c, x + dx, y + dy); } public void drawHLine(char c, int line, int col1, int col2) { charArea.drawHLine(c, line + dy, col1 + dx, col2 + dx); } public void drawHLine(char c, int line, int col1, int col2, char ifFound, char thenUse) { charArea.drawHLine(c, line + dy, col1 + dx, col2 + dx, ifFound, thenUse); } public void drawStringLR(String string, int x, int y) { charArea.drawStringLR(string, x + dx, y + dy); } public void drawStringTB(String string, int x, int y) { charArea.drawStringTB(string, x + dx, y + dy); } public void drawVLine(char c, int col, int line1, int line2) { charArea.drawVLine(c, col + dx, line1 + dy, line2 + dy); } public int getHeight() { return charArea.getHeight(); } public int getWidth() { return charArea.getWidth(); } public String getLine(int line) { return charArea.getLine(line); } public List getLines() { return charArea.getLines(); } public void print(PrintStream ps) { charArea.print(ps); } public void drawStringsLR(Collection strings, int x, int y) { charArea.drawStringsLR(strings, x + dx, y + dy); } public void fillRect(char c, int x, int y, int width, int height) { charArea.fillRect(c, x + dx, y + dy, width, height); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/UmlCharArea.java000066400000000000000000000033411312650303100262010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.util.Collection; public interface UmlCharArea extends BasicCharArea { void drawBoxSimple(int x, int y, int width, int height); void drawBoxSimpleUnicode(int x, int y, int width, int height); void drawNoteSimple(int x, int y, int width, int height); void drawNoteSimpleUnicode(int x, int y, int width, int height); void drawShape(AsciiShape shape, int x, int y); void drawStringsLR(Collection strings, int x, int y); }plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/UmlCharAreaImpl.java000066400000000000000000000073031312650303100270250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.asciiart; import java.util.Collection; public class UmlCharAreaImpl extends BasicCharAreaImpl implements UmlCharArea { public void drawBoxSimple(int x, int y, int width, int height) { this.drawHLine('-', y, x + 1, x + width - 1); this.drawHLine('-', y + height - 1, x + 1, x + width - 1); this.drawVLine('|', x, y + 1, y + height - 1); this.drawVLine('|', x + width - 1, y + 1, y + height - 1); this.drawChar(',', x, y); this.drawChar('.', x + width - 1, y); this.drawChar('`', x, y + height - 1); this.drawChar('\'', x + width - 1, y + height - 1); } public void drawBoxSimpleUnicode(int x, int y, int width, int height) { this.drawHLine('\u2500', y, x + 1, x + width - 1); this.drawHLine('\u2500', y + height - 1, x + 1, x + width - 1); this.drawVLine('\u2502', x, y + 1, y + height - 1); this.drawVLine('\u2502', x + width - 1, y + 1, y + height - 1); this.drawChar('\u250c', x, y); this.drawChar('\u2510', x + width - 1, y); this.drawChar('\u2514', x, y + height - 1); this.drawChar('\u2518', x + width - 1, y + height - 1); } public void drawShape(AsciiShape shape, int x, int y) { shape.draw(this, x, y); } public void drawStringsLR(Collection strings, int x, int y) { int i = 0; if (x < 0) { x = 0; } for (CharSequence s : strings) { this.drawStringLR(s.toString(), x, y + i); i++; } } public void drawNoteSimple(int x, int y, int width, int height) { this.drawHLine('-', y, x + 1, x + width - 1); this.drawHLine('-', y + height - 1, x + 1, x + width - 1); this.drawVLine('|', x, y + 1, y + height - 1); this.drawVLine('|', x + width - 1, y + 1, y + height - 1); this.drawChar(',', x, y); this.drawStringLR("!. ", x + width - 3, y); this.drawStringLR("|_\\", x + width - 3, y + 1); this.drawChar('`', x, y + height - 1); this.drawChar('\'', x + width - 1, y + height - 1); } public void drawNoteSimpleUnicode(int x, int y, int width, int height) { this.drawChar('\u2591', x + width - 2, y + 1); this.drawHLine('\u2550', y, x + 1, x + width - 1, '\u2502', '\u2567'); this.drawHLine('\u2550', y + height - 1, x + 1, x + width - 1, '\u2502', '\u2564'); this.drawVLine('\u2551', x, y + 1, y + height - 1); this.drawVLine('\u2551', x + width - 1, y + 1, y + height - 1); this.drawChar('\u2554', x, y); this.drawChar('\u2557', x + width - 1, y); this.drawChar('\u255a', x, y + height - 1); this.drawChar('\u255d', x + width - 1, y + height - 1); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/000077500000000000000000000000001312650303100221705ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/AbstractConnectorPuzzle.java000066400000000000000000000037211312650303100276660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import java.util.EnumSet; import java.util.Set; abstract class AbstractConnectorPuzzle implements ConnectorPuzzle { private final EnumSet connections = EnumSet.noneOf(Where.class); public final boolean have(Where where) { return connections.contains(where); } public final void append(Where where) { this.connections.add(where); } public final void remove(Where where) { final boolean ok = connections.remove(where); if (ok == false) { throw new IllegalArgumentException(); } } public final void append(ConnectorPuzzle other) { this.connections.addAll(((AbstractConnectorPuzzle) other).connections); } protected final Set connections() { return connections; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/BpmBranch.java000066400000000000000000000037121312650303100246720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.bpm; public class BpmBranch { private final int uid; private int counter = 1; public BpmBranch(int uid) { this.uid = uid; } public int incAndGetCounter() { counter++; return counter; } private String getEntryId() { return "$branchA" + uid; } private String getExitId() { return "$branchB" + uid; } public BpmElement getEntryElement() { return new BpmElement(getEntryId(), BpmElementType.MERGE, null); } public BpmElement getElseElement() { return new BpmElement(getExitId(), BpmElementType.MERGE, null); } public BpmEvent getResumeEntryEvent() { return new BpmEventResume(getEntryId()); } public BpmEvent getGoToEndEvent() { return new BpmEventGoto(getExitId()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/BpmDiagram.java000066400000000000000000000142641312650303100250450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.bpm; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Deque; import java.util.List; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.SkinParam; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class BpmDiagram extends UmlDiagram { private void cleanGrid(Grid grid) { while (true) { final boolean v1 = new CleanerEmptyLine().clean(grid); final boolean v2 = new CleanerInterleavingLines().clean(grid); final boolean v3 = new CleanerMoveBlock().clean(grid); if (v1 == false && v2 == false && v3 == false) { return; } } } private final BpmElement start = new BpmElement(null, BpmElementType.START); private List events = new ArrayList(); private Deque branches = new ArrayDeque(); public DiagramDescription getDescription() { return new DiagramDescription("(Bpm Diagram)"); } @Override public UmlDiagramType getUmlDiagramType() { return UmlDiagramType.BPM; } @Override protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { final double dpiFactor = 1; final double margin = 10; final ImageBuilder imageBuilder = new ImageBuilder(getSkinParam(), dpiFactor, fileFormatOption.isWithMetadata() ? getMetadata() : null, getWarningOrError(), margin, margin, getAnimation()); imageBuilder.setUDrawable(getUDrawable()); return imageBuilder.writeImageTOBEMOVED(fileFormatOption, seed(), os); } private UDrawable getUDrawable() { final Grid grid = createGrid(); cleanGrid(grid); final GridArray gridArray = grid.toArray(SkinParam.create(getUmlDiagramType())); // gridArray.addEdges(edges); System.err.println("gridArray=" + gridArray); return gridArray; } public CommandExecutionResult addEvent(BpmEvent event) { this.events.add(event); return CommandExecutionResult.ok(); } private Coord current; private Cell last; private Grid createGrid() { final Grid grid = new Grid(); this.current = grid.getRoot(); // this.edges.clear(); last = grid.getCell(current); grid.getCell(current).setData(start); for (BpmEvent event : events) { if (event instanceof BpmEventAdd) { final BpmEventAdd tmp = (BpmEventAdd) event; addInGrid(grid, tmp.getElement()); } else if (event instanceof BpmEventResume) { final String idDestination = ((BpmEventResume) event).getId(); current = grid.getById(idDestination); last = grid.getCell(current); if (last == null) { throw new IllegalStateException(); } final Navigator nav = grid.linesOf(current); final Line newLine = new Line(); nav.insertAfter(newLine); final Col row = current.getCol(); current = new Coord(newLine, row); } else if (event instanceof BpmEventGoto) { final BpmEventGoto tmp = (BpmEventGoto) event; final String idDestination = tmp.getId(); current = grid.getById(idDestination); final Cell src = last; last = grid.getCell(current); if (last == null) { throw new IllegalStateException(); } final Navigator nav = grid.linesOf(current); final Line newLine = new Line(); nav.insertAfter(newLine); final Col row = current.getCol(); current = new Coord(newLine, row); src.addConnectionTo2(last.getData()); } else { throw new IllegalStateException(); } } grid.addConnections(); // for (GridEdge edge : edges) { // System.err.println("EDGE=" + edge.getEdgeDirection()); // edge.addLineIn(grid); // } // grid.addEdge(edges); return grid; } private void addInGrid(Grid grid, BpmElement element) { final Navigator nav = grid.colsOf(current); final Col newRow = new Col(); nav.insertAfter(newRow); current = new Coord(current.getLine(), newRow); grid.getCell(current).setData(element); last.addConnectionTo2(grid.getCell(current).getData()); last = grid.getCell(current); } public CommandExecutionResult newBranch() { final BpmBranch branch = new BpmBranch(events.size()); branches.addLast(branch); return addEvent(new BpmEventAdd(branch.getEntryElement())); } public CommandExecutionResult elseBranch() { final BpmBranch branch = branches.getLast(); final int counter = branch.incAndGetCounter(); if (counter == 2) { addEvent(new BpmEventAdd(branch.getElseElement())); return addEvent(branch.getResumeEntryEvent()); } addEvent(branch.getGoToEndEvent()); return addEvent(branch.getResumeEntryEvent()); } public CommandExecutionResult endBranch() { final BpmBranch branch = branches.removeLast(); return addEvent(branch.getGoToEndEvent()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/BpmDiagramFactory.java000066400000000000000000000041671312650303100263760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.UmlDiagramFactory; import net.sourceforge.plantuml.core.DiagramType; public class BpmDiagramFactory extends UmlDiagramFactory { public BpmDiagramFactory(DiagramType type) { super(DiagramType.BPM); } @Override protected List createCommands() { final List result = new ArrayList(); result.add(new CommandDockedEvent()); result.add(new CommandMerge()); result.add(new CommandResume()); result.add(new CommandGoto()); result.add(new CommandNewBranch()); result.add(new CommandElseBranch()); result.add(new CommandEndBranch()); return result; } @Override public AbstractPSystem createEmptyDiagram() { return new BpmDiagram(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/BpmElement.java000066400000000000000000000131561312650303100250710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.bpm; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileBox; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleStart; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDiamond; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; public class BpmElement extends AbstractConnectorPuzzle implements ConnectorPuzzle { private final String id; private final BpmElementType type; private final Display display; public BpmElement(String id, BpmElementType type, String label) { this.id = id; this.type = type; this.display = Display.getWithNewlines(label); } public BpmElement(String id, BpmElementType type) { this(id, type, null); } @Override public String toString() { if (id == null) { return type.toString() + "(" + display + ")"; } return type.toString() + "(" + id + ")"; } public BpmElementType getType() { return type; } public final Display getDisplay() { return display; } public TextBlock toTextBlock(ISkinParam skinParam) { final TextBlock raw = toTextBlockInternal(skinParam); return new TextBlock() { public void drawU(UGraphic ug) { raw.drawU(ug); ug = ug.apply(new UChangeColor(HtmlColorUtils.RED)); for (Where w : Where.values()) { if (have(w)) { drawLine(ug, w, raw.calculateDimension(ug.getStringBounder())); } } } public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { return raw.getInnerPosition(member, stringBounder, strategy); } public Dimension2D calculateDimension(StringBounder stringBounder) { return raw.calculateDimension(stringBounder); } }; } private void drawLine(UGraphic ug, Where w, Dimension2D total) { final double width = total.getWidth(); final double height = total.getHeight(); if (w == Where.WEST) { ug.apply(new UTranslate(-10, height / 2)).draw(new ULine(10, 0)); } if (w == Where.EAST) { ug.apply(new UTranslate(width, height / 2)).draw(new ULine(10, 0)); } if (w == Where.NORTH) { ug.apply(new UTranslate(width / 2, -10)).draw(new ULine(0, 10)); } if (w == Where.SOUTH) { ug.apply(new UTranslate(width / 2, height)).draw(new ULine(0, 10)); } } public TextBlock toTextBlockInternal(ISkinParam skinParam) { if (type == BpmElementType.START) { return new FtileCircleStart(skinParam, HtmlColorUtils.BLACK, null); } if (type == BpmElementType.MERGE) { final HtmlColor borderColor = SkinParamUtils.getColor(skinParam, ColorParam.activityBorder, null); final HtmlColor backColor = SkinParamUtils.getColor(skinParam, ColorParam.activityBackground, null); return new FtileDiamond(skinParam, backColor, borderColor, null); } if (type == BpmElementType.DOCKED_EVENT) { final UFont font = UFont.serif(14); return new FtileBox(skinParam, display, font, null, BoxStyle.PLAIN); } final UFont font = UFont.serif(14); final FontConfiguration fc = new FontConfiguration(font, HtmlColorUtils.RED, HtmlColorUtils.RED, false); if (Display.isNull(display)) { return Display.getWithNewlines(type.toString()).create(fc, HorizontalAlignment.LEFT, skinParam); } return display.create(fc, HorizontalAlignment.LEFT, skinParam); } private Dimension2D dimension; public Dimension2D getDimension(StringBounder stringBounder, ISkinParam skinParam) { if (dimension == null) { dimension = toTextBlock(skinParam).calculateDimension(stringBounder); } return dimension; } public final String getId() { return id; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/BpmElementType.java000066400000000000000000000025101312650303100257230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.bpm; public enum BpmElementType { START, END, MERGE, DOCKED_EVENT } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/BpmEvent.java000066400000000000000000000024441312650303100245570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.bpm; public interface BpmEvent { } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/BpmEventAdd.java000066400000000000000000000027421312650303100251710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.bpm; public class BpmEventAdd implements BpmEvent { private final BpmElement element; public BpmEventAdd(BpmElement element) { this.element = element; } public final BpmElement getElement() { return element; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/BpmEventGoto.java000066400000000000000000000026711312650303100254120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.bpm; public class BpmEventGoto implements BpmEvent { private final String id; public BpmEventGoto(String id) { this.id = id; } public final String getId() { return id; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/BpmEventResume.java000066400000000000000000000026751312650303100257460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.bpm; public class BpmEventResume implements BpmEvent { private final String id; public BpmEventResume(String id) { this.id = id; } public final String getId() { return id; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/Cell.java000066400000000000000000000040121312650303100237070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Cell { private Placeable data; private final List destinations = new ArrayList(); public final Placeable getData() { return data; } public final void setData(Placeable data) { this.data = data; } @Override public String toString() { if (data == null) { return super.toString(); } return super.toString() + " " + data; } public void addConnectionTo2(Placeable other) { // Should be an assert if (other instanceof BpmElement == false) { throw new IllegalArgumentException(); } this.destinations.add(other); } public List getDestinations2() { return Collections.unmodifiableList(destinations); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/Chain.java000066400000000000000000000027731312650303100240660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import java.util.Comparator; import java.util.List; public interface Chain extends Comparator { public Navigator navigator(O data); public boolean contains(O data); public List toList(); public boolean remove(O data); } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/ChainImpl.java000066400000000000000000000136211312650303100247020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import java.util.ArrayList; import java.util.Collections; import java.util.ConcurrentModificationException; import java.util.List; public class ChainImpl implements Chain { private final List positive = new ArrayList(); private final List negative = new ArrayList(); private int currentVersion; public boolean remove(O data) { updateStructuralVersion(); boolean result = positive.remove(data); if (result == false) { result = negative.remove(data); } return result; } public ChainImpl cloneMe() { final ChainImpl result = new ChainImpl(); result.currentVersion = this.currentVersion; result.positive.addAll(this.positive); result.negative.addAll(this.negative); return result; } public int compare(O a, O b) { if (a.equals(b)) { return 0; } for (int i = negative.size() - 1; i >= 0; i--) { if (a.equals(negative.get(i))) { return -1; } if (b.equals(negative.get(i))) { return 1; } } for (O cur : positive) { if (a.equals(cur)) { return -1; } if (b.equals(cur)) { return 1; } } throw new UnsupportedOperationException(); } public List toList() { final List result = new ArrayList(); for (O element : negative) { if (element != null) { result.add(0, element); } } for (O element : positive) { if (element != null) { result.add(element); } } return Collections.unmodifiableList(result); } private ChainImpl() { } public ChainImpl(O root) { if (root == null) { throw new IllegalArgumentException(); } this.positive.add(root); } private int updateStructuralVersion() { currentVersion++; return currentVersion; } public boolean contains(O data) { if (data == null) { throw new IllegalArgumentException(); } for (int i = 0; i < Math.max(positive.size(), negative.size()); i++) { if (i < positive.size() && data == positive.get(i)) { return true; } if (i < negative.size() && data == negative.get(i)) { return true; } } return false; } public Navigator navigator(O data) { if (data == null) { throw new IllegalArgumentException(); } for (int i = 0; i < Math.max(positive.size(), negative.size()); i++) { if (i < positive.size() && data == positive.get(i)) { final InternalNavigator result = new InternalNavigator(i, currentVersion); assert result.get() == data; return result; } if (i < negative.size() && data == negative.get(i)) { final InternalNavigator result = new InternalNavigator(-i - 1, currentVersion); assert result.get() == data; return result; } } throw new IllegalArgumentException(); } private O getInternal(int position) { ensure(position); if (position >= 0) { return positive.get(position); } else { return negative.get(-position - 1); } } private void setInternal(int position, O data) { if (data == null) { throw new IllegalArgumentException(); } ensure(position); if (position >= 0) { positive.set(position, data); } else { negative.set(-position - 1, data); } } private void insertInternal(int position, O data) { if (data == null) { throw new IllegalArgumentException(); } ensure(position); if (position >= 0) { positive.add(position, data); } else { negative.add(-position - 1, data); } } private void ensure(int position) { if (position >= 0) { ensureInternal(position, positive); } else { ensureInternal(-position - 1, negative); } } private void ensureInternal(int position, List list) { assert position >= 0 : "position=" + position; while (list.size() <= position) { list.add(null); } assert list.size() > position; // Just check that list.get(position) does not throw Exception assert list.get(position) != this; } class InternalNavigator implements Navigator { private int position = 0; private int version; private InternalNavigator(int position, int version) { this.position = position; this.version = version; } private void checkConsistency() { if (version != currentVersion) { throw new ConcurrentModificationException(); } } public O next() { checkConsistency(); position++; return get(); } public O previous() { checkConsistency(); position--; return get(); } public O get() { checkConsistency(); return getInternal(position); } public void set(O data) { checkConsistency(); setInternal(position, data); } public void insertBefore(O data) { version = updateStructuralVersion(); insertInternal(position, data); } public void insertAfter(O data) { version = updateStructuralVersion(); insertInternal(position + 1, data); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/CleanerEmptyLine.java000066400000000000000000000030431312650303100262330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; public class CleanerEmptyLine implements GridCleaner { public boolean clean(Grid grid) { boolean result = false; for (Line line : grid.lines().toList()) { if (grid.usedColsOf(line).isEmpty()) { grid.removeLine(line); result = true; } } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/CleanerInterleavingLines.java000066400000000000000000000116641312650303100277570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import net.sourceforge.plantuml.bpm.ConnectorPuzzle.Where; public class CleanerInterleavingLines implements GridCleaner { public boolean clean(Grid grid) { // System.err.println("running CleanerInterleavingLines"); boolean result = false; Line previous = null; for (Line line : grid.lines().toList()) { if (previous != null) { if (mergeable(grid, previous, line)) { // System.err.println("MERGEABLE! " + previous + " " + line); mergeLines(grid, previous, line); return true; } } previous = line; } return result; } private void mergeLines(Grid grid, Line line1, Line line2) { for (Col col : grid.cols().toList()) { final Cell cell1 = grid.getCell(line1, col); final Cell cell2 = grid.getCell(line2, col); cell1.setData(merge(cell1.getData(), cell2.getData())); cell2.setData(null); } grid.removeLine(line2); } private boolean mergeable(Grid grid, Line line1, Line line2) { // int c = 0; for (Col col : grid.cols().toList()) { // System.err.println("c=" + c); // c++; final Placeable cell1 = grid.getCell(line1, col).getData(); final Placeable cell2 = grid.getCell(line2, col).getData(); // System.err.println("cells=" + cell1 + " " + cell2 + " " + mergeable(cell1, cell2)); if (mergeable(cell1, cell2) == false) { return false; } } return true; } private Placeable merge(Placeable data1, Placeable data2) { if (data1 == null) { return data2; } if (data2 == null) { return data1; } assert data1 != null && data2 != null; if (data1 instanceof BpmElement) { return data1; } if (data2 instanceof BpmElement) { final ConnectorPuzzleEmpty puz1 = (ConnectorPuzzleEmpty) data1; if (puz1.checkDirections("SW")) { ((BpmElement) data2).remove(Where.NORTH); ((BpmElement) data2).append(Where.WEST); } return data2; } assert data1 instanceof ConnectorPuzzleEmpty && data2 instanceof ConnectorPuzzleEmpty; final ConnectorPuzzleEmpty puz1 = (ConnectorPuzzleEmpty) data1; final ConnectorPuzzleEmpty puz2 = (ConnectorPuzzleEmpty) data2; return puz2; } private boolean mergeable(Placeable data1, Placeable data2) { if (data1 == null || data2 == null) { return true; } assert data1 != null && data2 != null; if (data1 instanceof ConnectorPuzzleEmpty && data2 instanceof ConnectorPuzzleEmpty) { return mergeableCC((ConnectorPuzzleEmpty) data1, (ConnectorPuzzleEmpty) data2); } if (data1 instanceof ConnectorPuzzleEmpty && data2 instanceof BpmElement) { final boolean result = mergeablePuzzleSingle((ConnectorPuzzleEmpty) data1, (BpmElement) data2); // System.err.println("OTHER2=" + data2 + " " + data1 + " " + result); return result; } if (data2 instanceof ConnectorPuzzleEmpty && data1 instanceof BpmElement) { final boolean result = mergeablePuzzleSingle((BpmElement) data1, (ConnectorPuzzleEmpty) data2); // System.err.println("OTHER1=" + data1 + " " + data2 + " " + result); return result; } return false; } private boolean mergeablePuzzleSingle(ConnectorPuzzleEmpty data1, BpmElement data2) { if (data1.checkDirections("NS")) { return true; } if (data1.checkDirections("SW")) { return true; } return false; } private boolean mergeablePuzzleSingle(BpmElement data1, ConnectorPuzzleEmpty data2) { if (data2.checkDirections("NS")) { return true; } return false; } private boolean mergeableCC(ConnectorPuzzleEmpty puz1, ConnectorPuzzleEmpty puz2) { if (puz1.checkDirections("NS") && puz2.checkDirections("NS")) { return true; } if (puz1.checkDirections("NS") && puz2.checkDirections("NE")) { return true; } if (puz1.checkDirections("NS") && puz2.checkDirections("NW")) { return true; } return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/CleanerMoveBlock.java000066400000000000000000000052161312650303100262120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; public class CleanerMoveBlock implements GridCleaner { public boolean clean(Grid grid) { System.err.println("CleanerMoveBlock"); for (Line line : grid.lines().toList()) { tryGrid(grid, line); } return false; } private void tryGrid(Grid grid, Line line) { // System.err.println("TRYING LINE " + line); for (Col col1 : grid.cols().toList()) { final Placeable cell1 = grid.getCell(line, col1).getData(); if (cell1 instanceof ConnectorPuzzleEmpty == false) { continue; } final ConnectorPuzzleEmpty puzzle1 = (ConnectorPuzzleEmpty) cell1; if (puzzle1.checkDirections("NS") == false) { continue; } final Navigator it2 = grid.cols().navigator(col1); int cpt = 0; while (true) { final Col col2 = it2.next(); cpt++; if (col2 == null) { break; } if (col1 == col2) { continue; } final Placeable cell2 = grid.getCell(line, col2).getData(); if (cell2 == null) { continue; } if (cell2 instanceof ConnectorPuzzleEmpty == false) { break; } final ConnectorPuzzleEmpty puzzle2 = (ConnectorPuzzleEmpty) cell2; if (puzzle2.checkDirections("NS") == false) { continue; } if (cpt > 1) { tryBridge(line, col1, col2); } break; } } } private void tryBridge(Line line, Col col1, final Col col2) { System.err.println("LINE=" + line + " " + col1 + " " + col2 + " "); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/Col.java000066400000000000000000000024371312650303100235560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; public class Col { } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/CommandDockedEvent.java000066400000000000000000000043251312650303100265310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandDockedEvent extends SingleLineCommand2 { public CommandDockedEvent() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf(":"), // new RegexLeaf("LABEL", "(.*)"), // new RegexLeaf("STYLE", ";"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(BpmDiagram diagram, RegexResult arg) { final String label = arg.get("LABEL", 0); final BpmElement element = new BpmElement(null, BpmElementType.DOCKED_EVENT, label); final BpmEvent event = new BpmEventAdd(element); return diagram.addEvent(event); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/CommandElseBranch.java000066400000000000000000000037211312650303100263430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandElseBranch extends SingleLineCommand2 { public CommandElseBranch() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("else"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(BpmDiagram diagram, RegexResult arg) { return diagram.elseBranch(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/CommandEndBranch.java000066400000000000000000000037241312650303100261640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandEndBranch extends SingleLineCommand2 { public CommandEndBranch() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("end branch"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(BpmDiagram diagram, RegexResult arg) { return diagram.endBranch(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/CommandGoto.java000066400000000000000000000041251312650303100252440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandGoto extends SingleLineCommand2 { public CommandGoto() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("goto"), // new RegexLeaf("[%s]+"), // new RegexLeaf("ID", "([\\p{L}0-9_.@]+)"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(BpmDiagram diagram, RegexResult arg) { final BpmEvent event = new BpmEventGoto(arg.get("ID", 0)); return diagram.addEvent(event); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/CommandMerge.java000066400000000000000000000042041312650303100253710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandMerge extends SingleLineCommand2 { public CommandMerge() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("ID", "([\\p{L}0-9_.@]+)"), // new RegexLeaf(":?"), // new RegexLeaf("\\<\\+\\>"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(BpmDiagram diagram, RegexResult arg) { final BpmEvent event = new BpmEventAdd(new BpmElement(arg.get("ID", 0), BpmElementType.MERGE, null)); return diagram.addEvent(event); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/CommandNewBranch.java000066400000000000000000000037241312650303100262070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandNewBranch extends SingleLineCommand2 { public CommandNewBranch() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("new branch"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(BpmDiagram diagram, RegexResult arg) { return diagram.newBranch(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/CommandResume.java000066400000000000000000000041351312650303100255750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandResume extends SingleLineCommand2 { public CommandResume() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("resume"), // new RegexLeaf("[%s]+"), // new RegexLeaf("ID", "([\\p{L}0-9_.@]+)"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(BpmDiagram diagram, RegexResult arg) { final BpmEvent event = new BpmEventResume(arg.get("ID", 0)); return diagram.addEvent(event); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/ConnectorPuzzle.java000066400000000000000000000032631312650303100262030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; public interface ConnectorPuzzle extends Placeable { public static enum Where { NORTH(1), EAST(2), SOUTH(4), WEST(8); private int coding; private Where(int coding) { this.coding = coding; } String toShortString() { return name().substring(0, 1); } int getCoding() { return coding; } } public void append(Where where); public void remove(Where where); public boolean have(Where where); } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/ConnectorPuzzleEmpty.java000066400000000000000000000071121312650303100272170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; public class ConnectorPuzzleEmpty extends AbstractConnectorPuzzle implements Placeable, TextBlock, ConnectorPuzzle { public static ConnectorPuzzleEmpty get(String value) { final ConnectorPuzzleEmpty result = new ConnectorPuzzleEmpty(); for (Where w : Where.values()) { if (value.contains(w.toShortString())) { result.append(w); } } return result; } public boolean checkDirections(String directions) { return connections().equals(get(directions).connections()); } @Override public String toString() { if (connections().size() == 0) { return "NONE"; } return connections().toString(); } public Dimension2D getDimension(StringBounder stringBounder, ISkinParam skinParam) { return new Dimension2DDouble(20, 20); } public TextBlock toTextBlock(ISkinParam skinParam) { return this; } public String getId() { throw new UnsupportedOperationException(); } public void drawU(UGraphic ug) { // System.err.println("DRAWING " + toString()); ug = ug.apply(new UChangeColor(HtmlColorUtils.BLUE)); for (Where w : Where.values()) { if (have(w)) { drawLine(ug, w); } } } private void drawLine(UGraphic ug, Where w) { if (w == Where.WEST) { ug.apply(new UTranslate(0, 10)).draw(new ULine(10, 0)); } if (w == Where.EAST) { ug.apply(new UTranslate(10, 10)).draw(new ULine(10, 0)); } if (w == Where.NORTH) { ug.apply(new UTranslate(10, 0)).draw(new ULine(0, 10)); } if (w == Where.SOUTH) { ug.apply(new UTranslate(10, 10)).draw(new ULine(0, 10)); } } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(20, 20); } public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/Coord.java000066400000000000000000000036161312650303100241070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; public class Coord { private final Line line; private final Col col; public Coord(Line line, Col row) { if (line == null || row == null) { throw new IllegalArgumentException(); } this.line = line; this.col = row; } public final Col getCol() { return col; } @Override public String toString() { return "line=" + line + " col=" + col; } public final Line getLine() { return line; } @Override public int hashCode() { return line.hashCode() + col.hashCode(); } @Override public boolean equals(Object obj) { final Coord other = (Coord) obj; return this.line == other.line && this.col == other.col; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/FootPrint.java000066400000000000000000000026171312650303100247650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import java.util.HashSet; import java.util.Set; public class FootPrint { private final Set cells = new HashSet(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/Grid.java000066400000000000000000000307441312650303100237300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.bpm.ConnectorPuzzle.Where; public class Grid { private final Chain lines; private final Chain cols; private final Coord root; private final Map cells = new HashMap(); public Grid() { this.root = new Coord(new Line(), new Col()); this.lines = new ChainImpl(root.getLine()); this.cols = new ChainImpl(root.getCol()); this.cells.put(root, new Cell()); } private Grid(Grid other) { this.lines = ((ChainImpl) other.lines).cloneMe(); this.cols = ((ChainImpl) other.cols).cloneMe(); this.root = other.root; this.cells.putAll(other.cells); } public Grid cloneMe() { return new Grid(this); } public Cell getCell(Coord coord) { return getCell(coord.getLine(), coord.getCol()); } public Cell getCell(Line line, Col col) { if (lines.contains(line) == false) { throw new IllegalArgumentException(); } if (cols.contains(col) == false) { throw new IllegalArgumentException(); } final Coord coord = new Coord(line, col); Cell result = cells.get(coord); if (result == null) { result = new Cell(); cells.put(coord, result); } return result; } // private Set edgeWith(Cell someCell) { // // final Set result = new HashSet(); // // for (GridEdge edge : edges) { // // if (edge.match(someCell)) { // // result.add(edge); // // } // // } // // return Collections.unmodifiableSet(result); // throw new UnsupportedOperationException(); // // } // // private Collection getCellsConnectedTo(Cell someCell) { // final Set result = new HashSet(); // final Set myEdges = edgeWith(someCell); // for (Cell cell : cells.values()) { // for (GridEdge edge : myEdges) { // assert edge.match(someCell); // if (edge.match(cell)) { // result.add(cell); // } // } // } // return Collections.unmodifiableSet(result); // } // // private SortedSet getColsConnectedTo(Cell someCell) { // final SortedSet result = new TreeSet(cols); // final Set myEdges = edgeWith(someCell); // for (Map.Entry ent : cells.entrySet()) { // for (GridEdge edge : myEdges) { // assert edge.match(someCell); // if (edge.match(ent.getValue())) { // result.add(ent.getKey().getCol()); // } // } // } // return Collections.unmodifiableSortedSet(result); // } // public SortedSet colsConnectedTo(Line line) { // final SortedSet result = new TreeSet(cols); // for (Map.Entry ent : cells.entrySet()) { // final Cell cell = ent.getValue(); // if (cell == null || cell.getData() == null) { // continue; // } // if (ent.getKey().getLine() != line) { // continue; // } // result.addAll(getColsConnectedTo(ent.getValue())); // // } // return Collections.unmodifiableSortedSet(result); // } public Coord getById(String id) { for (Map.Entry ent : cells.entrySet()) { final Cell cell = ent.getValue(); if (cell == null || cell.getData() == null) { continue; } if (id.equals(cell.getData().getId())) { return ent.getKey(); } } return null; } public final Coord getRoot() { return root; } public final Chain lines() { return lines; } public final Chain cols() { return cols; } public final Coord getCoord(Cell cell) { for (Map.Entry ent : cells.entrySet()) { if (ent.getValue() == cell) { return ent.getKey(); } } throw new IllegalArgumentException(); } private Coord getCoord(Placeable placeable) { for (Map.Entry ent : cells.entrySet()) { if (ent.getValue().getData() == placeable) { return ent.getKey(); } } throw new IllegalArgumentException(); } public final Navigator linesOf(Coord coord) { return lines.navigator(coord.getLine()); } public final Navigator colsOf(Coord coord) { return cols.navigator(coord.getCol()); } public final Navigator linesOf(Cell cell) { return linesOf(getCoord(cell)); } public final Navigator colsOf(Cell cell) { return colsOf(getCoord(cell)); } public final GridArray toArray(ISkinParam skinParam) { final List lines = this.lines.toList(); final List cols = this.cols.toList(); final GridArray result = new GridArray(skinParam, lines.size(), cols.size()); for (Map.Entry ent : cells.entrySet()) { final int l = lines.indexOf(ent.getKey().getLine()); final int c = cols.indexOf(ent.getKey().getCol()); if (c == -1) { throw new IllegalStateException("col=" + ent.getKey().getCol()); } if (l == -1) { throw new IllegalStateException("line=" + ent.getKey().getLine()); } result.setData(l, c, ent.getValue().getData()); } return result; } // public boolean isRowEmpty(Col row) { // System.err.println("Testing Row " + row); // for (Map.Entry ent : cells.entrySet()) { // final Cell cell = ent.getValue(); // if (cell == null || cell.getData() == null) { // continue; // } // if (ent.getKey().getCol() == row) { // System.err.println("Not empty " + cell + " " + cell.getData()); // return false; // } // } // System.err.println("EMPTY!!!"); // return true; // } // public boolean isLineEmpty(Line line) { // for (Map.Entry ent : cells.entrySet()) { // final Cell cell = ent.getValue(); // if (cell == null || cell.getData() == null) { // continue; // } // if (ent.getKey().getLine() == line) { // return false; // } // } // return true; // } public Set usedColsOf(Line line) { final Set result = new HashSet(); for (Map.Entry ent : cells.entrySet()) { final Cell cell = ent.getValue(); if (cell == null || cell.getData() == null) { continue; } if (ent.getKey().getLine() == line) { result.add(ent.getKey().getCol()); } } return Collections.unmodifiableSet(result); } public void removeLine(Line line) { assert usedColsOf(line).isEmpty(); for (final Iterator> it = cells.entrySet().iterator(); it.hasNext();) { final Map.Entry ent = it.next(); if (ent.getKey().getLine() != line) { continue; } final Cell cell = ent.getValue(); if (cell == null || cell.getData() == null) { it.remove(); } else { throw new IllegalStateException(); } } final boolean done = lines.remove(line); if (done == false) { throw new IllegalArgumentException(); } } // public void addEdge(Collection other) { // this.edges.addAll(other); // } // public void mergeLines(Line line1, Line line2) { // final Map supp = new HashMap(); // // for (Iterator> it = cells.entrySet().iterator(); it.hasNext();) { // final Map.Entry ent = it.next(); // final Cell cell = ent.getValue(); // if (cell == null || cell.getData() == null) { // continue; // } // if (ent.getKey().getLine() == source) { // supp.put(new Coord(dest, ent.getKey().getCol()), cell); // it.remove(); // } // } // cells.putAll(supp); // removeLine(source); // } public void addConnections() { for (Map.Entry ent : new HashMap(cells).entrySet()) { final List dests2 = ent.getValue().getDestinations2(); final Coord src = ent.getKey(); for (int i = 0; i < dests2.size(); i++) { final Coord dest = getCoord(dests2.get(i)); final boolean startHorizontal = i == 0; if (startHorizontal) { // System.err.println("DrawingHorizontal " + ent.getValue() + " --> " + dests.get(i) + " " + i); drawStartHorizontal(src, dest); } else { drawStartVertical(src, dest); } } } } private void drawStartVertical(final Coord src, final Coord dest) { if (src.getLine() == dest.getLine() && src.getCol() == dest.getCol()) { throw new IllegalStateException(); } final BpmElement start = (BpmElement) getCell(src).getData(); final int compare = lines.compare(src.getLine(), dest.getLine()); if (compare == 0) { throw new IllegalStateException(); } start.append(compare < 0 ? Where.SOUTH : Where.NORTH); for (Navigator itLine = Navigators.iterate(lines, src.getLine(), dest.getLine()); itLine.get() != dest .getLine();) { final Line cur = itLine.next(); if (cur != dest.getLine()) { addPuzzle(cur, src.getCol(), "NS"); } } for (Navigator itCol = Navigators.iterate(cols, src.getCol(), dest.getCol()); itCol.get() != dest.getCol();) { final Col cur = itCol.next(); if (cur != dest.getCol()) { addPuzzle(dest.getLine(), cur, "EW"); } } final BpmElement end = (BpmElement) getCell(dest).getData(); if (src.getLine() == dest.getLine()) { end.append(compare < 0 ? Where.NORTH : Where.SOUTH); } if (src.getLine() != dest.getLine() && src.getCol() != dest.getCol()) { if (lines.compare(dest.getLine(), src.getLine()) > 0) { addPuzzle(dest.getLine(), src.getCol(), "N"); } else { addPuzzle(dest.getLine(), src.getCol(), "S"); } if (cols.compare(dest.getCol(), src.getCol()) > 0) { addPuzzle(dest.getLine(), src.getCol(), "E"); } else { addPuzzle(dest.getLine(), src.getCol(), "W"); } end.append(cols.compare(src.getCol(), dest.getCol()) > 0 ? Where.EAST : Where.WEST); } } private void drawStartHorizontal(final Coord src, final Coord dest) { if (src.getLine() == dest.getLine() && src.getCol() == dest.getCol()) { throw new IllegalStateException(); } final BpmElement start = (BpmElement) getCell(src).getData(); final int compare = cols.compare(src.getCol(), dest.getCol()); if (compare == 0) { throw new IllegalStateException(); } start.append(compare < 0 ? Where.EAST : Where.WEST); for (Navigator itCol = Navigators.iterate(cols, src.getCol(), dest.getCol()); itCol.get() != dest.getCol();) { final Col cur = itCol.next(); if (cur != dest.getCol()) { addPuzzle(src.getLine(), cur, "EW"); } } for (Navigator itLine = Navigators.iterate(lines, src.getLine(), dest.getLine()); itLine.get() != dest .getLine();) { final Line cur = itLine.next(); if (cur != dest.getLine()) { addPuzzle(cur, dest.getCol(), "NS"); } } final BpmElement end = (BpmElement) getCell(dest).getData(); if (src.getLine() == dest.getLine()) { end.append(compare < 0 ? Where.WEST : Where.EAST); } if (src.getLine() != dest.getLine() && src.getCol() != dest.getCol()) { if (cols.compare(dest.getCol(), src.getCol()) > 0) { addPuzzle(src.getLine(), dest.getCol(), "W"); } else { addPuzzle(src.getLine(), dest.getCol(), "E"); } if (lines.compare(dest.getLine(), src.getLine()) > 0) { addPuzzle(src.getLine(), dest.getCol(), "S"); } else { addPuzzle(src.getLine(), dest.getCol(), "N"); } end.append(lines.compare(src.getLine(), dest.getLine()) > 0 ? Where.SOUTH : Where.NORTH); } } private void addPuzzle(Line line, Col col, String direction) { final Cell cell = getCell(line, col); ConnectorPuzzleEmpty connector = (ConnectorPuzzleEmpty) cell.getData(); if (connector == null) { connector = new ConnectorPuzzleEmpty(); cell.setData(connector); } connector.append(ConnectorPuzzleEmpty.get(direction)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/GridArray.java000066400000000000000000000144061312650303100247240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; public class GridArray implements UDrawable { private final int lines; private final int cols; private final Placeable data[][]; private final ISkinParam skinParam; // private final List edges = new ArrayList(); public GridArray(ISkinParam skinParam, int lines, int cols) { this.skinParam = skinParam; this.lines = lines; this.cols = cols; this.data = new Placeable[lines][cols]; } @Override public String toString() { return "" + lines + "x" + cols; } public void setData(int l, int c, Placeable element) { data[l][c] = element; } public Placeable getData(int l, int c) { return data[l][c]; } public final int getRows() { return cols; } public final int getLines() { return lines; } private double getHeightOfLine(StringBounder stringBounder, int line) { double height = 0; for (int i = 0; i < cols; i++) { final Placeable cell = data[line][i]; if (cell == null) { continue; } height = Math.max(height, cell.getDimension(stringBounder, skinParam).getHeight()); } return height; } private double getWidthOfCol(StringBounder stringBounder, int col) { double width = 0; for (int i = 0; i < lines; i++) { final Placeable cell = data[i][col]; if (cell == null) { continue; } width = Math.max(width, cell.getDimension(stringBounder, skinParam).getWidth()); } return width; } private final double margin = 30; public void drawU(UGraphic ug) { // printMe(); final StringBounder stringBounder = ug.getStringBounder(); // for (GridEdge edge : edges) { // // System.err.println("Drawing " + edge); // final int from[] = getCoord(edge.getFrom()); // final int to[] = getCoord(edge.getTo()); // final Point2D pt1 = getCenterOf(stringBounder, from[0], from[1]); // final Point2D pt2 = getCenterOf(stringBounder, to[0], to[1]); // drawArrow(ug, pt1, pt2); // } double dy = 0; drawInternalGrid(ug); for (int l = 0; l < lines; l++) { double dx = 0; final double heightOfLine = getHeightOfLine(stringBounder, l); for (int r = 0; r < cols; r++) { final double widthOfCol = getWidthOfCol(stringBounder, r); final Placeable cell = data[l][r]; if (cell != null) { final Dimension2D dim = cell.getDimension(stringBounder, skinParam); cell.toTextBlock(skinParam).drawU( ug.apply(new UTranslate(dx + (widthOfCol + margin - dim.getWidth()) / 2, dy + (heightOfLine + margin - dim.getHeight()) / 2))); } dx += widthOfCol + margin; } dy += heightOfLine + margin; } } private void drawInternalGrid(UGraphic ug) { double heightMax = 0; for (int l = 0; l < lines; l++) { heightMax += getHeightOfLine(ug.getStringBounder(), l) + margin; } double widthMax = 0; for (int c = 0; c < cols; c++) { widthMax += getWidthOfCol(ug.getStringBounder(), c) + margin; } ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK)); double y = 0; for (int l = 0; l < lines; l++) { ug.apply(new UTranslate(0, y)).draw(new ULine(widthMax, 0)); y += getHeightOfLine(ug.getStringBounder(), l) + margin; } double x = 0; for (int c = 0; c < cols; c++) { ug.apply(new UTranslate(x, 0)).draw(new ULine(0, heightMax)); x += getWidthOfCol(ug.getStringBounder(), c) + margin; } } private void drawArrow(UGraphic ug, Point2D pt1, Point2D pt2) { ug = ug.apply(new UChangeColor(HtmlColorUtils.BLUE)); final ULine line = new ULine(pt2.getX() - pt1.getX(), pt2.getY() - pt1.getY()); ug.apply(new UTranslate(pt1)).draw(line); } private Point2D getCenterOf(StringBounder stringBounder, int c, int l) { double x = getWidthOfCol(stringBounder, c) / 2 + margin / 2; for (int i = 0; i < c; i++) { final double widthOfCol = getWidthOfCol(stringBounder, i); x += widthOfCol + margin; } double y = getHeightOfLine(stringBounder, l) / 2 + margin / 2; for (int i = 0; i < l; i++) { final double heightOfLine = getHeightOfLine(stringBounder, i); y += heightOfLine + margin; } return new Point2D.Double(x, y); } private int[] getCoord(Cell someCell) { for (int l = 0; l < lines; l++) { for (int c = 0; c < cols; c++) { final Placeable cell = data[l][c]; if (cell == someCell.getData()) { return new int[] { c, l }; } } } throw new IllegalArgumentException(); } private void printMe() { for (int l = 0; l < lines; l++) { for (int c = 0; c < cols; c++) { final Placeable cell = data[l][c]; System.err.print(cell); System.err.print(" ; "); } System.err.println(); } } // void addEdgesInternal(List edges) { // this.edges.addAll(edges); // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/GridCleaner.java000066400000000000000000000025161312650303100252160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; public interface GridCleaner { public boolean clean(Grid grid); } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/Line.java000066400000000000000000000024371312650303100237300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; public class Line { } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/Navigator.java000066400000000000000000000027121312650303100247670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; public interface Navigator { public O next(); public O previous(); public O get(); public void set(O data); public void insertBefore(O data); public void insertAfter(O data); } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/Navigators.java000066400000000000000000000040141312650303100251470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; public final class Navigators { private Navigators() { } public static Navigator iterate(final Chain orig, final O from, final O to) { if (orig.compare(from, to) <= 0) { return orig.navigator(from); } return reverse(orig.navigator(from)); } public static Navigator reverse(final Navigator orig) { return new Navigator() { public O next() { return orig.previous(); } public O previous() { return orig.next(); } public O get() { return orig.get(); } public void set(O data) { orig.set(data); } public void insertBefore(O data) { throw new UnsupportedOperationException(); } public void insertAfter(O data) { throw new UnsupportedOperationException(); } }; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/Placeable.java000066400000000000000000000032101312650303100246770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.bpm; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; public interface Placeable { public Dimension2D getDimension(StringBounder stringBounder, ISkinParam skinParam); public TextBlock toTextBlock(ISkinParam skinParam); public String getId(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/000077500000000000000000000000001312650303100230245ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/BrailleChar.java000066400000000000000000000107201312650303100260370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.braille; public class BrailleChar { private final int id; private BrailleChar(int id) { this.id = id; } public void draw(BrailleGrid grid, double xv, double yv) { final int x = grid.toInt(xv); final int y = grid.toInt(yv); drawOneSpot(grid, x + 0, y + 0, 1); drawOneSpot(grid, x + 0, y + 1, 2); drawOneSpot(grid, x + 0, y + 2, 4); drawOneSpot(grid, x + 1, y + 0, 8); drawOneSpot(grid, x + 1, y + 1, 16); drawOneSpot(grid, x + 1, y + 2, 32); } private void drawOneSpot(BrailleGrid grid, int x, int y, int check) { if ((id & check) != 0) { grid.setState(x, y, true); } } public static BrailleChar fromChar(char c) { if (c == 'a' || c == 'A' || c == '1') { return new BrailleChar(1); } if (c == 'b' || c == 'B' || c == '2') { return new BrailleChar(1 + 2); } if (c == 'c' || c == 'C' || c == '3') { return new BrailleChar(1 + 8); } if (c == 'd' || c == 'D' || c == '4') { return new BrailleChar(1 + 8 + 16); } if (c == 'e' || c == 'E' || c == '5') { return new BrailleChar(1 + 16); } if (c == 'f' || c == 'F' || c == '6') { return new BrailleChar(1 + 8 + 2); } if (c == 'g' || c == 'G' || c == '7') { return new BrailleChar(1 + 2 + 8 + 16); } if (c == 'h' || c == 'H' || c == '8') { return new BrailleChar(1 + 2 + 16); } if (c == 'i' || c == 'I' || c == '9') { return new BrailleChar(2 + 8); } if (c == 'j' || c == 'J' || c == '0') { return new BrailleChar(2 + 8 + 16); } if (c == 'k' || c == 'K') { return new BrailleChar(1 + 4); } if (c == 'l' || c == 'L') { return new BrailleChar(1 + 2 + 4); } if (c == 'm' || c == 'M') { return new BrailleChar(1 + 4 + 8); } if (c == 'n' || c == 'N') { return new BrailleChar(1 + 4 + 8 + 16); } if (c == 'o' || c == 'O') { return new BrailleChar(1 + 4 + 16); } if (c == 'p' || c == 'P') { return new BrailleChar(1 + 2 + 4 + 8); } if (c == 'q' || c == 'Q') { return new BrailleChar(1 + 2 + 4 + 8 + 16); } if (c == 'r' || c == 'R') { return new BrailleChar(1 + 2 + 4 + 16); } if (c == 's' || c == 'S') { return new BrailleChar(2 + 4 + 8); } if (c == 't' || c == 'T') { return new BrailleChar(2 + 4 + 8 + 16); } if (c == 'u' || c == 'U') { return new BrailleChar(1 + 4 + 32); } if (c == 'v' || c == 'V') { return new BrailleChar(1 + 2 + 4 + 32); } if (c == 'w' || c == 'W') { return new BrailleChar(2 + 8 + 16 + 32); } if (c == 'x' || c == 'X') { return new BrailleChar(1 + 4 + 8 + 32); } if (c == 'y' || c == 'Y') { return new BrailleChar(1 + 4 + 8 + 16 + 32); } if (c == 'z' || c == 'Z') { return new BrailleChar(1 + 4 + 16 + 32); } if (c == ' ') { return new BrailleChar(0); } if (c == '\'') { return new BrailleChar(2); } if (c == ';') { return new BrailleChar(2 + 4); } if (c == ':') { return new BrailleChar(2 + 16); } if (c == '!') { return new BrailleChar(2 + 4 + 16); } if (c == '(' || c == ')') { return new BrailleChar(2 + 4 + 16 + 32); } if (c == '?' || c == '.' || c == '\"') { return new BrailleChar(2 + 4 + 32); } if (c == ',') { return new BrailleChar(4); } if (c == '-') { return new BrailleChar(4 + 32); } return new BrailleChar(63); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/BrailleCharFactory.java000066400000000000000000000032121312650303100273650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.braille; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class BrailleCharFactory { public static List build(String s) { final List result = new ArrayList(); for (int i = 0; i < s.length(); i++) { result.add(BrailleChar.fromChar(s.charAt(i))); } return Collections.unmodifiableList(result); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/BrailleDrawer.java000066400000000000000000000056571312650303100264230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.braille; import net.sourceforge.plantuml.graphic.HtmlColorSetSimple; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; public class BrailleDrawer implements UDrawable { private final BrailleGrid grid; private final double step = 9; private final double spotSize = 5; public BrailleDrawer(BrailleGrid grid) { this.grid = grid; } public void drawU(UGraphic ug) { ug = ug.apply(new UChangeColor(new HtmlColorSetSimple().getColorIfValid("#F0F0F0"))); for (int x = grid.getMinX(); x <= grid.getMaxX(); x++) { ug.apply(new UTranslate(x * step + spotSize + 1, 0)).draw( new ULine(0, (grid.getMaxY() - grid.getMinY()) * step)); } for (int y = grid.getMinY(); y <= grid.getMaxY(); y++) { ug.apply(new UTranslate(0, y * step + spotSize + 1)).draw( new ULine((grid.getMaxX() - grid.getMinX()) * step, 0)); } ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(new UChangeBackColor(HtmlColorUtils.BLACK)); for (int x = grid.getMinX(); x <= grid.getMaxX(); x++) { for (int y = grid.getMinY(); y <= grid.getMaxY(); y++) { if (grid.getState(x, y)) { drawCircle(ug, x, y); } } } } private void drawCircle(UGraphic ug, int x, int y) { final double cx = x * step; final double cy = y * step; ug.apply(new UTranslate(cx, cy)).draw(new UEllipse(spotSize, spotSize)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/BrailleGrid.java000066400000000000000000000110061312650303100260450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.braille; import java.awt.geom.CubicCurve2D; import java.awt.geom.Point2D; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.posimo.DotPath; public class BrailleGrid { private int minX; private int minY; private int maxX; private int maxY; private final double quanta; private final Set on = new HashSet(); public BrailleGrid(double quanta) { this.quanta = quanta; } public boolean getState(int x, int y) { final Coords coords = new Coords(x, y); return on.contains(coords); } private void setStateDouble(double x, double y, boolean state) { setState(toInt(x), toInt(y), state); } public void setState(int x, int y, boolean state) { final Coords coords = new Coords(x, y); if (state) { on.add(coords); } else { on.remove(coords); } minX = Math.min(minX, x); maxX = Math.max(maxX, x); minY = Math.min(minY, y); maxY = Math.max(maxY, y); } public int getMinX() { return minX; } public int getMinY() { return minY; } public int getMaxX() { return maxX; } public int getMaxY() { return maxY; } public void rectangle(double x, double y, double width, double height) { hline(y, x, x + width); hline(y + height, x, x + width); vline(x, y, y + height); vline(x + width, y, y + height); } private void vline(double x, double y1, double y2) { final int i = toInt(x); final int j1 = toInt(y1); final int j2 = toInt(y2); for (int j = j1; j <= j2; j++) { setState(i, j, true); } } private void hline(double y, double x1, double x2) { final int j = toInt(y); final int i1 = toInt(x1); final int i2 = toInt(x2); for (int i = i1; i <= i2; i++) { setState(i, j, true); } } public int toInt(double value) { return (int) Math.round(value / quanta); } public void line(double x1, double y1, double x2, double y2) { if (x1 == x2) { vline(x1, y1, y2); } else if (y1 == y2) { hline(y1, x1, x2); } else { System.err.println("warning line"); } } public double getQuanta() { return quanta; } public void drawDotPath(double x, double y, DotPath shape) { for (CubicCurve2D.Double bez : shape.getBeziers()) { drawCubic(x, y, bez); } } private void drawCubic(double x, double y, CubicCurve2D.Double bez) { drawPointInternal(x, y, bez.getP1()); drawPointInternal(x, y, bez.getP2()); if (bez.getP1().distance(bez.getP2()) > quanta) { final CubicCurve2D.Double part1 = new CubicCurve2D.Double(); final CubicCurve2D.Double part2 = new CubicCurve2D.Double(); bez.subdivide(part1, part2); drawCubic(x, y, part1); drawCubic(x, y, part2); } } private void drawPointInternal(double x, double y, Point2D pt) { setStateDouble(x + pt.getX(), y + pt.getY(), true); } public void drawPolygon(List points) { for (int i = 0; i < points.size() - 1; i++) { drawLineInternal(points.get(i), points.get(i + 1)); } drawLineInternal(points.get(points.size() - 1), points.get(0)); } private void drawLineInternal(Point2D a, Point2D b) { drawPointInternal(0, 0, a); drawPointInternal(0, 0, b); if (a.distance(b) > quanta) { final Point2D middle = new Point2D.Double((a.getX() + b.getX()) / 2, (a.getY() + b.getY()) / 2); drawLineInternal(a, middle); drawLineInternal(middle, b); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/BrailleUtils.java000066400000000000000000000026551312650303100262720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.braille; public class BrailleUtils { public static boolean isBraille(char c) { return Character.UnicodeBlock.of(c) == Character.UnicodeBlock.BRAILLE_PATTERNS; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/Coords.java000066400000000000000000000033661312650303100251300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.braille; public class Coords { private final int x; private final int y; public Coords(int x, int y) { this.x = x; this.y = y; } @Override public boolean equals(Object obj) { final Coords other = (Coords) obj; return this.x == other.x && this.y == other.y; } @Override public int hashCode() { return x + y * 8192; } @Override public String toString() { return "( " + x + " ; " + y + " )"; } public int getX() { return x; } public int getY() { return y; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/DriverCenteredCharacterBraille.java000066400000000000000000000037231312650303100317110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.braille; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverCenteredCharacterBraille implements UDriver { public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, BrailleGrid grid) { final UCenteredCharacter characterCircled = (UCenteredCharacter) ushape; final double xpos = x; final double ypos = y; final BrailleChar bchar = BrailleCharFactory.build("" + characterCircled.getChar()).get(0); bchar.draw(grid, xpos, ypos); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/DriverDotPathBraille.java000066400000000000000000000034611312650303100277050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.braille; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverDotPathBraille implements UDriver { public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, BrailleGrid grid) { final DotPath shape = (DotPath) ushape; if (param.getColor() != null) { grid.drawDotPath(x, y, shape); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/DriverLineBraille.java000066400000000000000000000045311312650303100272300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.braille; import java.awt.geom.Line2D; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverLineBraille implements UDriver { private final ClipContainer clipContainer; public DriverLineBraille(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, BrailleGrid grid) { final ULine shape = (ULine) ushape; double x2 = x + shape.getDX(); double y2 = y + shape.getDY(); final UClip clip = clipContainer.getClip(); if (clip != null) { final Line2D.Double line = clip.getClippedLine(new Line2D.Double(x, y, x2, y2)); if (line == null) { return; } x = line.x1; y = line.y1; x2 = line.x2; y2 = line.y2; } grid.line(x, y, x2, y2); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/DriverNoneBraille.java000066400000000000000000000032111312650303100272320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.braille; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverNoneBraille implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, BrailleGrid object) { } } plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/DriverPolygonBraille.java000066400000000000000000000047321312650303100277730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.braille; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UTranslate; public class DriverPolygonBraille implements UDriver { private final ClipContainer clipContainer; public DriverPolygonBraille(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, BrailleGrid grid) { final UPolygon shape = (UPolygon) ushape; final List points = new ArrayList(); int i = 0; for (Point2D pt : shape.getPoints()) { points.add(new UTranslate(x, y).getTranslated(pt)); } final UClip clip = clipContainer.getClip(); if (clip != null) { for (Point2D pt : points) { if (clip.isInside(pt) == false) { return; } } } grid.drawPolygon(points); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/DriverRectangleBraille.java000066400000000000000000000063201312650303100302430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.braille; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverRectangleBraille implements UDriver { private final ClipContainer clipContainer; public DriverRectangleBraille(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, BrailleGrid grid) { final URectangle rect = (URectangle) ushape; // final double rx = rect.getRx(); // final double ry = rect.getRy(); double width = rect.getWidth(); double height = rect.getHeight(); // final String color = StringUtils.getAsSvg(mapper, param.getColor()); // final HtmlColor back = param.getBackcolor(); // if (back instanceof HtmlColorGradient) { // final HtmlColorGradient gr = (HtmlColorGradient) back; // final String id = svg.createSvgGradient(StringUtils.getAsHtml(mapper.getMappedColor(gr.getColor1())), // StringUtils.getAsHtml(mapper.getMappedColor(gr.getColor2())), gr.getPolicy()); // svg.setFillColor("url(#" + id + ")"); // svg.setStrokeColor(color); // } else { // final String backcolor = StringUtils.getAsSvg(mapper, back); // svg.setFillColor(backcolor); // svg.setStrokeColor(color); // } // // svg.setStrokeWidth(param.getStroke().getThickness(), param.getStroke().getDasharraySvg()); final UClip clip = clipContainer.getClip(); if (clip != null) { final Rectangle2D.Double r = clip.getClippedRectangle(new Rectangle2D.Double(x, y, width, height)); x = r.x; y = r.y; width = r.width; height = r.height; if (height <= 0) { return; } } grid.rectangle(x, y, width, height); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/DriverTextBraille.java000066400000000000000000000036731312650303100272730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.braille; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UText; public class DriverTextBraille implements UDriver { public DriverTextBraille() { } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, BrailleGrid grid) { final UText text = (UText) ushape; y -= grid.getQuanta() * 3; x += grid.getQuanta(); for (BrailleChar bchar : BrailleCharFactory.build(text.getText())) { bchar.draw(grid, x, y); x += grid.getQuanta() * 3; } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/UGraphicBraille.java000066400000000000000000000117371312650303100266750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.braille; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.ugraphic.AbstractCommonUGraphic; import net.sourceforge.plantuml.ugraphic.AbstractUGraphic; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic2; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UText; // https://www.branah.com/braille-translator public class UGraphicBraille extends AbstractUGraphic implements ClipContainer, UGraphic2 { public static final int QUANTA = 4; private final BrailleGrid grid; @Override protected AbstractCommonUGraphic copyUGraphic() { return new UGraphicBraille(this); } public UGraphicBraille(ColorMapper colorMapper, FileFormat fileFormat) { this(colorMapper, new BrailleGrid(QUANTA)); } private UGraphicBraille(UGraphicBraille other) { super(other); this.grid = other.grid; register(); } // public UGraphicBraille(ColorMapper colorMapper, String backcolor, boolean textAsPath, double scale, String // linkTarget) { // this(colorMapper, new SvgGraphics(backcolor, scale), textAsPath, linkTarget); // } // // public UGraphicBraille(ColorMapper colorMapper, boolean textAsPath, double scale, String linkTarget) { // this(colorMapper, new SvgGraphics(scale), textAsPath, linkTarget); // } // // public UGraphicBraille(ColorMapper mapper, HtmlColorGradient gr, boolean textAsPath, double scale, String // linkTarget) { // this(mapper, new SvgGraphics(scale), textAsPath, linkTarget); // // final SvgGraphics svg = getGraphicObject(); // svg.paintBackcolorGradient(mapper, gr); // } private UGraphicBraille(ColorMapper colorMapper, BrailleGrid grid) { super(colorMapper, grid); this.grid = grid; register(); } private void register() { registerDriver(URectangle.class, new DriverNoneBraille()); registerDriver(URectangle.class, new DriverRectangleBraille(this)); registerDriver(UText.class, new DriverTextBraille()); registerDriver(ULine.class, new DriverLineBraille(this)); registerDriver(UPolygon.class, new DriverPolygonBraille(this)); registerDriver(UEllipse.class, new DriverNoneBraille()); registerDriver(UImage.class, new DriverNoneBraille()); registerDriver(UPath.class, new DriverNoneBraille()); registerDriver(DotPath.class, new DriverDotPathBraille()); registerDriver(UCenteredCharacter.class, new DriverCenteredCharacterBraille()); } public StringBounder getStringBounder() { return FileFormat.BRAILLE_PNG.getDefaultStringBounder(); } public void startUrl(Url url) { } public void closeAction() { } public void writeImageTOBEMOVED(OutputStream os, String metadata, int dpi) throws IOException { final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, HtmlColorUtils.WHITE, metadata, null, 0, 0, null, false); imageBuilder.setUDrawable(new BrailleDrawer(getGraphicObject())); imageBuilder.writeImageTOBEMOVED(new FileFormatOption(FileFormat.PNG), 42, os); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/000077500000000000000000000000001312650303100240445ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/AbstractEntityDiagram.java000066400000000000000000000046131312650303100311400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; public abstract class AbstractEntityDiagram extends CucaDiagram { final protected List getDotStrings() { final List def = Arrays.asList("nodesep=.35;", "ranksep=0.8;", "edge [fontsize=11,labelfontsize=11];", "node [fontsize=11,height=.35,width=.55];"); if (getPragma().isDefine("graphattributes") == false) { return def; } final String attribute = getPragma().getValue("graphattributes"); final List result = new ArrayList(def); result.add(attribute); return Collections.unmodifiableList(result); } final public DiagramDescription getDescription() { final StringBuilder result = new StringBuilder("(" + getLeafssize() + " entities"); if (getSource() != null) { final String id = getSource().getId(); if (id != null) { result.append(", "); result.append(id); } } result.append(")"); return new DiagramDescription(result.toString()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java000066400000000000000000000206221312650303100272430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityUtils; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.objectdiagram.AbstractClassOrObjectDiagram; import net.sourceforge.plantuml.svek.image.EntityImageClass; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class ClassDiagram extends AbstractClassOrObjectDiagram { private String namespaceSeparator = "."; @Override public ILeaf getOrCreateLeaf(Code code, LeafType type, USymbol symbol) { if (namespaceSeparator != null) { code = code.withSeparator(namespaceSeparator); } if (type == null) { code = code.eventuallyRemoveStartingAndEndingDoubleQuote("\"([:"); if (namespaceSeparator == null) { return getOrCreateLeafDefault(code, LeafType.CLASS, symbol); } code = code.getFullyQualifiedCode(getCurrentGroup()); if (super.leafExist(code)) { return getOrCreateLeafDefault(code, LeafType.CLASS, symbol); } return createEntityWithNamespace(code, Display.getWithNewlines(code.getShortName(getLeafs())), LeafType.CLASS, symbol); } if (namespaceSeparator == null) { return getOrCreateLeafDefault(code, LeafType.CLASS, symbol); } code = code.getFullyQualifiedCode(getCurrentGroup()); if (super.leafExist(code)) { return getOrCreateLeafDefault(code, type, symbol); } return createEntityWithNamespace(code, Display.getWithNewlines(code.getShortName(getLeafs())), type, symbol); } public IGroup getOrCreateNamespace(Code namespace, Display display, GroupType type, IGroup parent) { if (namespaceSeparator != null) { namespace = namespace.withSeparator(namespaceSeparator).getFullyQualifiedCode(getCurrentGroup()); } final IGroup g = getOrCreateNamespaceInternal(namespace, display, type, parent); currentGroup = g; return g; } private IGroup getOrCreateNamespaceInternal(Code namespace, Display display, GroupType type, IGroup parent) { IGroup result = entityFactory.getGroups().get(namespace); if (result != null) { return result; } if (entityFactory.getLeafs().containsKey(namespace)) { result = entityFactory.muteToGroup(namespace, namespace, type, parent); result.setDisplay(display); } else { result = entityFactory.createGroup(namespace, display, namespace, type, parent, getHides(), getNamespaceSeparator()); } entityFactory.addGroup(result); return result; } @Override public ILeaf createLeaf(Code code, Display display, LeafType type, USymbol symbol) { if (namespaceSeparator != null) { code = code.withSeparator(namespaceSeparator); } if (type != LeafType.ABSTRACT_CLASS && type != LeafType.ANNOTATION && type != LeafType.CLASS && type != LeafType.INTERFACE && type != LeafType.ENUM && type != LeafType.LOLLIPOP && type != LeafType.NOTE) { return super.createLeaf(code, display, type, symbol); } if (namespaceSeparator == null) { return super.createLeaf(code, display, type, symbol); } code = code.getFullyQualifiedCode(getCurrentGroup()); if (super.leafExist(code)) { throw new IllegalArgumentException("Already known: " + code); } return createEntityWithNamespace(code, display, type, symbol); } private ILeaf createEntityWithNamespace(Code fullyCode, Display display, LeafType type, USymbol symbol) { IGroup group = getCurrentGroup(); final String namespace = getNamespace(fullyCode); if (namespace != null && (EntityUtils.groupRoot(group) || group.getCode().getFullName().equals(namespace) == false)) { final Code namespace2 = Code.of(namespace); group = getOrCreateNamespaceInternal(namespace2, Display.getWithNewlines(namespace), GroupType.PACKAGE, getRootGroup()); } return createLeafInternal( fullyCode, Display.isNull(display) ? Display.getWithNewlines(fullyCode.getShortName(getLeafs())).withCreoleMode( CreoleMode.SIMPLE_LINE) : display, type, group, symbol); } private final String getNamespace(Code fullyCode) { String name = fullyCode.getFullName(); do { final int x = name.lastIndexOf(namespaceSeparator); if (x == -1) { return null; } name = name.substring(0, x); } while (getLeafs().containsKey(Code.of(name, namespaceSeparator))); return name; } @Override public final boolean leafExist(Code code) { if (namespaceSeparator == null) { return super.leafExist(code); } code = code.withSeparator(namespaceSeparator); return super.leafExist(code.getFullyQualifiedCode(getCurrentGroup())); } @Override public UmlDiagramType getUmlDiagramType() { return UmlDiagramType.CLASS; } public void setNamespaceSeparator(String namespaceSeparator) { this.namespaceSeparator = namespaceSeparator; } public String getNamespaceSeparator() { return namespaceSeparator; } private boolean allowMixing; public void setAllowMixing(boolean allowMixing) { this.allowMixing = allowMixing; } public boolean isAllowMixing() { return allowMixing; } private int useLayoutExplicit = 0; public void layoutNewLine() { useLayoutExplicit++; incRawLayout(); } @Override final protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { if (useLayoutExplicit != 0) { return exportLayoutExplicit(os, index, fileFormatOption); } return super.exportDiagramInternal(os, index, fileFormatOption); } final protected ImageData exportLayoutExplicit(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { final FullLayout fullLayout = new FullLayout(); for (int i = 0; i <= useLayoutExplicit; i++) { final RowLayout rawLayout = getRawLayout(i); fullLayout.addRowLayout(rawLayout); } final ImageBuilder imageBuilder = new ImageBuilder(getSkinParam(), 1, null, null, 0, 10, null); imageBuilder.setUDrawable(fullLayout); return imageBuilder.writeImageTOBEMOVED(fileFormatOption, seed(), os); } private RowLayout getRawLayout(int raw) { final RowLayout rawLayout = new RowLayout(); for (ILeaf leaf : getLeafs().values()) { if (leaf.getRawLayout() == raw) { rawLayout.addLeaf(getEntityImageClass(leaf)); } } return rawLayout; } private TextBlock getEntityImageClass(ILeaf entity) { return new EntityImageClass(null, entity, getSkinParam(), this); } @Override public String checkFinalError() { for (Link link : this.getLinks()) { final int len = link.getLength(); if (len == 1) { for (Link link2 : this.getLinks()) { if (link2.sameConnections(link) && link2.getLength() != 1) { link2.setLength(1); } } } } this.applySingleStrategy(); return super.checkFinalError(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java000066400000000000000000000141501312650303100305720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.classdiagram.command.CommandAddMethod; import net.sourceforge.plantuml.classdiagram.command.CommandAllowMixing; import net.sourceforge.plantuml.classdiagram.command.CommandCreateClass; import net.sourceforge.plantuml.classdiagram.command.CommandCreateClassMultilines; import net.sourceforge.plantuml.classdiagram.command.CommandCreateElementFull2; import net.sourceforge.plantuml.classdiagram.command.CommandCreateElementFull2.Mode; import net.sourceforge.plantuml.classdiagram.command.CommandDiamondAssociation; import net.sourceforge.plantuml.classdiagram.command.CommandHideShowSpecificClass; import net.sourceforge.plantuml.classdiagram.command.CommandHideShowSpecificStereotype; import net.sourceforge.plantuml.classdiagram.command.CommandImport; import net.sourceforge.plantuml.classdiagram.command.CommandLayoutNewLine; import net.sourceforge.plantuml.classdiagram.command.CommandLinkClass; import net.sourceforge.plantuml.classdiagram.command.CommandLinkLollipop; import net.sourceforge.plantuml.classdiagram.command.CommandNamespaceSeparator; import net.sourceforge.plantuml.classdiagram.command.CommandStereotype; import net.sourceforge.plantuml.classdiagram.command.CommandUrl; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandEndPackage; import net.sourceforge.plantuml.command.CommandFootboxIgnored; import net.sourceforge.plantuml.command.CommandNamespace; import net.sourceforge.plantuml.command.CommandPackage; import net.sourceforge.plantuml.command.CommandPackageEmpty; import net.sourceforge.plantuml.command.CommandPage; import net.sourceforge.plantuml.command.CommandRankDir; import net.sourceforge.plantuml.command.UmlDiagramFactory; import net.sourceforge.plantuml.command.note.FactoryNoteCommand; import net.sourceforge.plantuml.command.note.FactoryNoteOnEntityCommand; import net.sourceforge.plantuml.command.note.FactoryNoteOnLinkCommand; import net.sourceforge.plantuml.command.note.FactoryTipOnEntityCommand; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.descdiagram.command.CommandNewpage; import net.sourceforge.plantuml.objectdiagram.command.CommandCreateEntityObject; import net.sourceforge.plantuml.objectdiagram.command.CommandCreateEntityObjectMultilines; public class ClassDiagramFactory extends UmlDiagramFactory { @Override public ClassDiagram createEmptyDiagram() { return new ClassDiagram(); } @Override protected List createCommands() { final List cmds = new ArrayList(); cmds.add(new CommandFootboxIgnored()); addCommonCommands(cmds); cmds.add(new CommandRankDir()); cmds.add(new CommandNewpage(this)); cmds.add(new CommandHideShowSpecificStereotype()); cmds.add(new CommandPage()); cmds.add(new CommandAddMethod()); cmds.add(new CommandCreateClass()); cmds.add(new CommandCreateEntityObject()); cmds.add(new CommandAllowMixing()); cmds.add(new CommandLayoutNewLine()); cmds.add(new CommandCreateElementFull2(Mode.NORMAL_KEYWORD)); cmds.add(new CommandCreateElementFull2(Mode.WITH_MIX_PREFIX)); final FactoryNoteCommand factoryNoteCommand = new FactoryNoteCommand(); cmds.add(factoryNoteCommand.createSingleLine()); cmds.add(new CommandPackage()); cmds.add(new CommandEndPackage()); cmds.add(new CommandPackageEmpty()); cmds.add(new CommandNamespace()); cmds.add(new CommandStereotype()); cmds.add(new CommandLinkClass(UmlDiagramType.CLASS)); cmds.add(new CommandLinkLollipop(UmlDiagramType.CLASS)); cmds.add(new CommandImport()); final FactoryTipOnEntityCommand factoryTipOnEntityCommand = new FactoryTipOnEntityCommand(new RegexLeaf( "ENTITY", "(" + CommandCreateClass.CODE_NO_DOTDOT + "|[%g][^%g]+[%g])::([%g][^%g]+[%g]|[^%s]+)")); cmds.add(factoryTipOnEntityCommand.createMultiLine(true)); cmds.add(factoryTipOnEntityCommand.createMultiLine(false)); final FactoryNoteOnEntityCommand factoryNoteOnEntityCommand = new FactoryNoteOnEntityCommand(new RegexLeaf( "ENTITY", "(" + CommandCreateClass.CODE + "|[%g][^%g]+[%g])")); cmds.add(factoryNoteOnEntityCommand.createSingleLine()); cmds.add(new CommandUrl()); cmds.add(factoryNoteOnEntityCommand.createMultiLine(true)); cmds.add(factoryNoteOnEntityCommand.createMultiLine(false)); cmds.add(factoryNoteCommand.createMultiLine(false)); cmds.add(new CommandCreateClassMultilines()); cmds.add(new CommandCreateEntityObjectMultilines()); final FactoryNoteOnLinkCommand factoryNoteOnLinkCommand = new FactoryNoteOnLinkCommand(); cmds.add(factoryNoteOnLinkCommand.createSingleLine()); cmds.add(factoryNoteOnLinkCommand.createMultiLine(false)); cmds.add(new CommandDiamondAssociation()); cmds.add(new CommandHideShowSpecificClass()); cmds.add(new CommandNamespaceSeparator()); return cmds; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/FullLayout.java000066400000000000000000000035621312650303100270150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FullLayout implements UDrawable { private final List all = new ArrayList(); public void addRowLayout(RowLayout rawLayout) { this.all.add(rawLayout); } public void drawU(UGraphic ug) { double y = 0; for (RowLayout rawLayout : all) { rawLayout.drawU(ug.apply(new UTranslate(0, y))); y += rawLayout.getHeight(ug.getStringBounder()) + 20; } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/RowLayout.java000066400000000000000000000042541312650303100266610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class RowLayout implements UDrawable { private final List all = new ArrayList(); public void addLeaf(TextBlock entityImageClass) { this.all.add(entityImageClass); } public double getHeight(StringBounder stringBounder) { double y = 0; for (TextBlock leaf : all) { y = Math.max(y, leaf.calculateDimension(stringBounder).getHeight()); } return y; } public void drawU(UGraphic ug) { double x = 0; for (TextBlock leaf : all) { leaf.drawU(ug.apply(new UTranslate(x, 0))); x += leaf.calculateDimension(ug.getStringBounder()).getWidth() + 20; } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/000077500000000000000000000000001312650303100254625ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/CommandAddMethod.java000066400000000000000000000043551312650303100314640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import java.util.List; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.skin.VisibilityModifier; public class CommandAddMethod extends SingleLineCommand { public CommandAddMethod() { super("(?i)^([\\p{L}0-9_.]+|[%g][^%g]+[%g])[%s]+:[%s]+(.*)$"); } @Override protected CommandExecutionResult executeArg(ClassDiagram system, List arg) { final IEntity entity = system.getOrCreateLeaf(Code.of(arg.get(0)), null, null); final String field = arg.get(1); if (field.length() > 0 && VisibilityModifier.isVisibilityCharacter(field)) { system.setVisibilityModifierPresent(true); } entity.getBodier().addFieldOrMethod(field, entity); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/CommandAllowMixing.java000066400000000000000000000041331312650303100320570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandAllowMixing extends SingleLineCommand2 { public CommandAllowMixing() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("allow_mixing"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(ClassDiagram diagram, RegexResult arg) { diagram.setAllowMixing(true); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java000066400000000000000000000171731312650303100320260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; public class CommandCreateClass extends SingleLineCommand2 { public static final String DISPLAY_WITH_GENERIC = "[%g](.+?)(?:\\<(" + GenericRegexProducer.PATTERN + ")\\>)?[%g]"; public static final String CODE = "[^%s{}%g<>]+"; public static final String CODE_NO_DOTDOT = "[^%s{}%g<>:]+"; enum Mode { EXTENDS, IMPLEMENTS }; public CommandCreateClass() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("TYPE", // "(interface|enum|annotation|abstract[%s]+class|abstract|class|entity|circle)[%s]+"), // new RegexOr(// new RegexConcat(// new RegexLeaf("DISPLAY1", DISPLAY_WITH_GENERIC), // new RegexLeaf("[%s]+as[%s]+"), // new RegexLeaf("CODE1", "(" + CODE + ")")), // new RegexConcat(// new RegexLeaf("CODE2", "(" + CODE + ")"), // new RegexLeaf("[%s]+as[%s]+"), // // new RegexLeaf("DISPLAY2", DISPLAY_WITH_GENERIC)), // new RegexLeaf("CODE3", "(" + CODE + ")"), // new RegexLeaf("CODE4", "[%g]([^%g]+)[%g]")), // new RegexLeaf("GENERIC", "(?:[%s]*\\<(" + GenericRegexProducer.PATTERN + ")\\>)?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("STEREO", "(\\<{2}.*\\>{2})?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("[%s]*"), // color().getRegex(), // new RegexLeaf("[%s]*"), // new RegexLeaf("LINECOLOR", "(?:##(?:\\[(dotted|dashed|bold)\\])?(\\w+)?)?"), // new RegexLeaf("EXTENDS", "([%s]+(extends)[%s]+(" + CommandCreateClassMultilines.CODES + "))?"), // new RegexLeaf("IMPLEMENTS", "([%s]+(implements)[%s]+(" + CommandCreateClassMultilines.CODES + "))?"), // new RegexLeaf("$")); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } @Override protected CommandExecutionResult executeArg(ClassDiagram diagram, RegexResult arg) { final LeafType type = LeafType.getLeafType(StringUtils.goUpperCase(arg.get("TYPE", 0))); final Code code = Code.of(arg.getLazzy("CODE", 0)).eventuallyRemoveStartingAndEndingDoubleQuote("\"([:"); final String display = arg.getLazzy("DISPLAY", 0); final String genericOption = arg.getLazzy("DISPLAY", 1); final String generic = genericOption != null ? genericOption : arg.get("GENERIC", 0); final String stereotype = arg.get("STEREO", 0); final ILeaf entity; if (diagram.leafExist(code)) { entity = diagram.getOrCreateLeaf(code, type, null); if (entity.muteToType(type, null) == false) { return CommandExecutionResult.error("Bad name"); } } else { entity = diagram.createLeaf(code, Display.getWithNewlines(display), type, null); } if (stereotype != null) { entity.setStereotype(new Stereotype(stereotype, diagram.getSkinParam().getCircledCharacterRadius(), diagram .getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER), diagram.getSkinParam() .getIHtmlColorSet())); } if (generic != null) { entity.setGeneric(generic); } final String urlString = arg.get("URL", 0); if (urlString != null) { final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); final Url url = urlBuilder.getUrl(urlString); entity.addUrl(url); } Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final HtmlColor lineColor = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("LINECOLOR", 1)); if (lineColor != null) { colors = colors.add(ColorType.LINE, lineColor); } if (arg.get("LINECOLOR", 0) != null) { colors = colors.addLegacyStroke(arg.get("LINECOLOR", 0)); } entity.setColors(colors); // entity.setSpecificColorTOBEREMOVED(ColorType.LINE, lineColor); // entity.setSpecificColorTOBEREMOVED(ColorType.HEADER, colors.getColor(ColorType.HEADER)); // // if (colors.getLineStyle() != null) { // entity.setSpecificLineStroke(LinkStyle.getStroke(colors.getLineStyle())); // } // // if (arg.get("LINECOLOR", 0) != null) { // entity.applyStroke(arg.get("LINECOLOR", 0)); // } // manageExtends(diagram, arg, entity); CommandCreateClassMultilines.manageExtends("EXTENDS", diagram, arg, entity); CommandCreateClassMultilines.manageExtends("IMPLEMENTS", diagram, arg, entity); return CommandExecutionResult.ok(); } // public static void manageExtends(ClassDiagram system, RegexResult arg, final IEntity entity) { // if (arg.get("EXTENDS", 1) != null) { // final Mode mode = arg.get("EXTENDS", 1).equalsIgnoreCase("extends") ? Mode.EXTENDS : Mode.IMPLEMENTS; // final Code other = Code.of(arg.get("EXTENDS", 2)); // LeafType type2 = LeafType.CLASS; // if (mode == Mode.IMPLEMENTS) { // type2 = LeafType.INTERFACE; // } // if (mode == Mode.EXTENDS && entity.getEntityType() == LeafType.INTERFACE) { // type2 = LeafType.INTERFACE; // } // final IEntity cl2 = system.getOrCreateLeaf(other, type2, null); // LinkType typeLink = new LinkType(LinkDecor.NONE, LinkDecor.EXTENDS); // if (type2 == LeafType.INTERFACE && entity.getEntityType() != LeafType.INTERFACE) { // typeLink = typeLink.getDashed(); // } // final Link link = new Link(cl2, entity, typeLink, null, 2, null, null, system.getLabeldistance(), // system.getLabelangle()); // system.addLink(link); // } // } } CommandCreateClassMultilines.java000066400000000000000000000227561312650303100340200ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.skin.VisibilityModifier; public class CommandCreateClassMultilines extends CommandMultilines2 { private static final String CODE = CommandLinkClass.getSeparator() + "?[\\p{L}0-9_]+" + "(?:" + CommandLinkClass.getSeparator() + "[\\p{L}0-9_]+)*"; public static final String CODES = CODE + "(?:\\s*,\\s*" + CODE + ")*"; enum Mode { EXTENDS, IMPLEMENTS }; public CommandCreateClassMultilines() { super(getRegexConcat(), MultilinesStrategy.REMOVE_STARTING_QUOTE); } @Override public String getPatternEnd() { return "(?i)^[%s]*\\}[%s]*$"; } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("VISIBILITY", "(" + VisibilityModifier.regexForVisibilityCharacterInClassName() + ")?"), // new RegexLeaf("TYPE", "(interface|enum|abstract[%s]+class|abstract|class|entity)[%s]+"), // new RegexOr(// new RegexConcat(// new RegexLeaf("DISPLAY1", CommandCreateClass.DISPLAY_WITH_GENERIC), // new RegexLeaf("[%s]+as[%s]+"), // new RegexLeaf("CODE1", "(" + CommandCreateClass.CODE + ")")), // new RegexConcat(// new RegexLeaf("CODE2", "(" + CommandCreateClass.CODE + ")"), // new RegexLeaf("[%s]+as[%s]+"), // // new RegexLeaf("DISPLAY2", CommandCreateClass.DISPLAY_WITH_GENERIC)), // new RegexLeaf("CODE3", "(" + CommandCreateClass.CODE + ")"), // new RegexLeaf("CODE4", "[%g]([^%g]+)[%g]")), // new RegexLeaf("GENERIC", "(?:[%s]*\\<(" + GenericRegexProducer.PATTERN + ")\\>)?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("STEREO", "(\\<\\<.+\\>\\>)?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("[%s]*"), // color().getRegex(), // new RegexLeaf("[%s]*"), // new RegexLeaf("LINECOLOR", "(?:##(?:\\[(dotted|dashed|bold)\\])?(\\w+)?)?"), // new RegexLeaf("EXTENDS", "([%s]+(extends)[%s]+(" + CODES + "))?"), // new RegexLeaf("IMPLEMENTS", "([%s]+(implements)[%s]+(" + CODES + "))?"), // new RegexLeaf("[%s]*\\{[%s]*$")); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } public CommandExecutionResult executeNow(ClassDiagram diagram, BlocLines lines) { lines = lines.trimSmart(1); lines = lines.removeComments(); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); final IEntity entity = executeArg0(diagram, line0); if (entity == null) { return CommandExecutionResult.error("No such entity"); } if (lines.size() > 1) { lines = lines.subExtract(1, 1); final Url url = null; // if (lines.size() > 0) { // final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); // url = urlBuilder.getUrl(lines.getFirst499().toString()); // } else { // url = null; // } // if (url != null) { // lines = lines.subExtract(1, 0); // } for (CharSequence s : lines) { if (s.length() > 0 && VisibilityModifier.isVisibilityCharacter(s)) { diagram.setVisibilityModifierPresent(true); } entity.getBodier().addFieldOrMethod(s.toString(), entity); } if (url != null) { entity.addUrl(url); } } manageExtends("EXTENDS", diagram, line0, entity); manageExtends("IMPLEMENTS", diagram, line0, entity); return CommandExecutionResult.ok(); } public static void manageExtends(String keyword, ClassDiagram system, RegexResult arg, final IEntity entity) { if (arg.get(keyword, 1) != null) { final Mode mode = arg.get(keyword, 1).equalsIgnoreCase("extends") ? Mode.EXTENDS : Mode.IMPLEMENTS; LeafType type2 = LeafType.CLASS; if (mode == Mode.IMPLEMENTS) { type2 = LeafType.INTERFACE; } if (mode == Mode.EXTENDS && entity.getLeafType() == LeafType.INTERFACE) { type2 = LeafType.INTERFACE; } final String codes = arg.get(keyword, 2); for (String s : codes.split(",")) { final Code other = Code.of(StringUtils.trin(s)); final IEntity cl2 = system.getOrCreateLeaf(other, type2, null); LinkType typeLink = new LinkType(LinkDecor.NONE, LinkDecor.EXTENDS); if (type2 == LeafType.INTERFACE && entity.getLeafType() != LeafType.INTERFACE) { typeLink = typeLink.getDashed(); } final Link link = new Link(cl2, entity, typeLink, Display.NULL, 2, null, null, system.getLabeldistance(), system.getLabelangle()); system.addLink(link); } } } private IEntity executeArg0(ClassDiagram diagram, RegexResult arg) { final LeafType type = LeafType.getLeafType(StringUtils.goUpperCase(arg.get("TYPE", 0))); final String visibilityString = arg.get("VISIBILITY", 0); VisibilityModifier visibilityModifier = null; if (visibilityString != null) { visibilityModifier = VisibilityModifier.getVisibilityModifier(visibilityString + "FOO", false); } final Code code = Code.of(arg.getLazzy("CODE", 0)).eventuallyRemoveStartingAndEndingDoubleQuote("\"([:"); final String display = arg.getLazzy("DISPLAY", 0); final String genericOption = arg.getLazzy("DISPLAY", 1); final String generic = genericOption != null ? genericOption : arg.get("GENERIC", 0); final String stereotype = arg.get("STEREO", 0); final ILeaf result; if (diagram.leafExist(code)) { result = diagram.getOrCreateLeaf(code, null, null); if (result.muteToType(type, null) == false) { return null; } } else { result = diagram.createLeaf(code, Display.getWithNewlines(display), type, null); } result.setVisibilityModifier(visibilityModifier); if (stereotype != null) { result.setStereotype(new Stereotype(stereotype, diagram.getSkinParam().getCircledCharacterRadius(), diagram .getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER), diagram.getSkinParam() .getIHtmlColorSet())); } final String urlString = arg.get("URL", 0); if (urlString != null) { final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); final Url url = urlBuilder.getUrl(urlString); result.addUrl(url); } Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final HtmlColor lineColor = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("LINECOLOR", 1)); if (lineColor != null) { colors = colors.add(ColorType.LINE, lineColor); } if (arg.get("LINECOLOR", 0) != null) { colors = colors.addLegacyStroke(arg.get("LINECOLOR", 0)); } result.setColors(colors); // result.setSpecificColorTOBEREMOVED(ColorType.BACK, // diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0))); // result.setSpecificColorTOBEREMOVED(ColorType.LINE, // diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("LINECOLOR", 1))); // result.applyStroke(arg.get("LINECOLOR", 0)); if (generic != null) { result.setGeneric(generic); } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateElementFull2.java000066400000000000000000000151131312650303100332470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.descdiagram.command.CommandCreateElementFull; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; public class CommandCreateElementFull2 extends SingleLineCommand2 { private final Mode mode; public static enum Mode { NORMAL_KEYWORD, WITH_MIX_PREFIX } public CommandCreateElementFull2(Mode mode) { super(getRegexConcat(mode)); this.mode = mode; } private static RegexConcat getRegexConcat(Mode mode) { // String regex = "(?:(actor|usecase|component)[%s]+)"; String regex = "(?:(state|" + CommandCreateElementFull.ALL_TYPES + ")[%s]+)"; if (mode == Mode.WITH_MIX_PREFIX) { regex = "mix_" + regex; } return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("SYMBOL", regex), // new RegexLeaf("[%s]*"), // new RegexOr(// new RegexLeaf("CODE1", CommandCreateElementFull.CODE_WITH_QUOTE), // new RegexConcat(// new RegexLeaf("DISPLAY2", CommandCreateElementFull.DISPLAY), // new RegexLeaf("STEREOTYPE2", "(?:[%s]+(\\<\\<.+\\>\\>))?"), // new RegexLeaf("[%s]*as[%s]+"), // new RegexLeaf("CODE2", CommandCreateElementFull.CODE)) // ), // new RegexLeaf("STEREOTYPE", "(?:[%s]*(\\<\\<.+\\>\\>))?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("[%s]*"), // ColorParser.exp1(), // new RegexLeaf("$")); } @Override final protected boolean isForbidden(CharSequence line) { if (line.toString().matches("^[\\p{L}0-9_.]+$")) { return true; } return false; } @Override protected CommandExecutionResult executeArg(ClassDiagram diagram, RegexResult arg) { if (mode == Mode.NORMAL_KEYWORD && diagram.isAllowMixing() == false) { return CommandExecutionResult .error("Use 'allow_mixing' if you want to mix classes and other UML elements."); } String codeRaw = arg.getLazzy("CODE", 0); final String displayRaw = arg.getLazzy("DISPLAY", 0); final char codeChar = getCharEncoding(codeRaw); final char codeDisplay = getCharEncoding(displayRaw); final String symbol; if (codeRaw.startsWith("()")) { symbol = "interface"; codeRaw = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(StringUtils.trin(codeRaw.substring(2))); } else if (codeChar == '(' || codeDisplay == '(') { symbol = "usecase"; } else if (codeChar == ':' || codeDisplay == ':') { symbol = "actor"; } else if (codeChar == '[' || codeDisplay == '[') { symbol = "component"; } else { symbol = arg.get("SYMBOL", 0); } final LeafType type; final USymbol usymbol; if (symbol == null) { type = LeafType.DESCRIPTION; usymbol = USymbol.ACTOR; } else if (symbol.equalsIgnoreCase("usecase")) { type = LeafType.USECASE; usymbol = null; } else if (symbol.equalsIgnoreCase("state")) { type = LeafType.STATE; usymbol = null; } else { type = LeafType.DESCRIPTION; usymbol = USymbol.getFromString(symbol, diagram.getSkinParam().useUml2ForComponent()); if (usymbol == null) { throw new IllegalStateException(); } } final Code code = Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(codeRaw)); String display = displayRaw; if (display == null) { display = code.getFullName(); } display = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(display); final String stereotype = arg.getLazzy("STEREOTYPE", 0); final IEntity entity = diagram.getOrCreateLeaf(code, type, usymbol); entity.setDisplay(Display.getWithNewlines(display)); entity.setUSymbol(usymbol); if (stereotype != null) { entity.setStereotype(new Stereotype(stereotype, diagram.getSkinParam().getCircledCharacterRadius(), diagram .getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER), diagram.getSkinParam() .getIHtmlColorSet())); } final String urlString = arg.get("URL", 0); if (urlString != null) { final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); final Url url = urlBuilder.getUrl(urlString); entity.addUrl(url); } entity.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0))); return CommandExecutionResult.ok(); } private char getCharEncoding(final String codeRaw) { return codeRaw != null && codeRaw.length() > 2 ? codeRaw.charAt(0) : 0; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/CommandDiamondAssociation.java000066400000000000000000000042441312650303100334000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import java.util.List; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.LeafType; public class CommandDiamondAssociation extends SingleLineCommand { public CommandDiamondAssociation() { super("(?i)^\\<\\>[%s]*([\\p{L}0-9_.]+)$"); } @Override protected CommandExecutionResult executeArg(ClassDiagram diagram, List arg) { final Code code = Code.of(arg.get(0)); if (diagram.leafExist(code)) { return CommandExecutionResult.error("Already existing : "+code.getFullName()); } diagram.createLeaf(code, Display.NULL, LeafType.ASSOCIATION, null); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShowByGender.java000066400000000000000000000207341312650303100327640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import java.util.EnumSet; import java.util.Set; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.EntityGender; import net.sourceforge.plantuml.cucadiagram.EntityGenderUtils; import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.EntityUtils; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.descdiagram.DescriptionDiagram; import net.sourceforge.plantuml.objectdiagram.AbstractClassOrObjectDiagram; import net.sourceforge.plantuml.sequencediagram.SequenceDiagram; public class CommandHideShowByGender extends SingleLineCommand2 { private static final EnumSet PORTION_METHOD = EnumSet. of(EntityPortion.METHOD); private static final EnumSet PORTION_MEMBER = EnumSet. of(EntityPortion.FIELD, EntityPortion.METHOD); private static final EnumSet PORTION_FIELD = EnumSet. of(EntityPortion.FIELD); public CommandHideShowByGender() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("COMMAND", "(hide|show)"), // new RegexLeaf("[%s]+"), // new RegexLeaf("GENDER", "(?:(class|object|interface|enum|annotation|abstract|[\\p{L}0-9_.]+|[%g][^%g]+[%g]|\\<\\<.*\\>\\>)[%s]+)*?"), // new RegexLeaf("EMPTY", "(?:(empty)[%s]+)?"), // new RegexLeaf("PORTION", "(members?|attributes?|fields?|methods?|circle\\w*|stereotypes?)"), // new RegexLeaf("$")); } private final EntityGender emptyByGender(Set portion) { if (portion == PORTION_METHOD) { return EntityGenderUtils.emptyMethods(); } if (portion == PORTION_FIELD) { return EntityGenderUtils.emptyFields(); } if (portion == PORTION_MEMBER) { throw new IllegalArgumentException(); // return EntityGenderUtils.emptyMembers(); } return EntityGenderUtils.all(); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, RegexResult arg) { if (diagram instanceof AbstractClassOrObjectDiagram) { return executeClassDiagram((AbstractClassOrObjectDiagram) diagram, arg); } if (diagram instanceof DescriptionDiagram) { return executeDescriptionDiagram((DescriptionDiagram) diagram, arg); } if (diagram instanceof SequenceDiagram) { return executeSequenceDiagram((SequenceDiagram) diagram, arg); } // Just ignored return CommandExecutionResult.ok(); } private CommandExecutionResult executeSequenceDiagram(SequenceDiagram diagram, RegexResult arg) { final Set portion = getEntityPortion(arg.get("PORTION", 0)); diagram.hideOrShow(portion, arg.get("COMMAND", 0).equalsIgnoreCase("show")); return CommandExecutionResult.ok(); } private CommandExecutionResult executeDescriptionDiagram(DescriptionDiagram diagram, RegexResult arg) { final Set portion = getEntityPortion(arg.get("PORTION", 0)); final EntityGender gender; final String arg1 = arg.get("GENDER", 0); if (arg1 == null) { gender = EntityGenderUtils.all(); } else if (arg1.equalsIgnoreCase("class")) { gender = EntityGenderUtils.byEntityType(LeafType.CLASS); } else if (arg1.equalsIgnoreCase("object")) { gender = EntityGenderUtils.byEntityType(LeafType.OBJECT); } else if (arg1.equalsIgnoreCase("interface")) { gender = EntityGenderUtils.byEntityType(LeafType.INTERFACE); } else if (arg1.equalsIgnoreCase("enum")) { gender = EntityGenderUtils.byEntityType(LeafType.ENUM); } else if (arg1.equalsIgnoreCase("abstract")) { gender = EntityGenderUtils.byEntityType(LeafType.ABSTRACT_CLASS); } else if (arg1.equalsIgnoreCase("annotation")) { gender = EntityGenderUtils.byEntityType(LeafType.ANNOTATION); } else if (arg1.startsWith("<<")) { gender = EntityGenderUtils.byStereotype(arg1); } else { final IEntity entity = diagram.getOrCreateLeaf(Code.of(arg1), null, null); gender = EntityGenderUtils.byEntityAlone(entity); } diagram.hideOrShow(gender, portion, arg.get("COMMAND", 0).equalsIgnoreCase("show")); return CommandExecutionResult.ok(); } private CommandExecutionResult executeClassDiagram(AbstractClassOrObjectDiagram classDiagram, RegexResult arg) { final Set portion = getEntityPortion(arg.get("PORTION", 0)); EntityGender gender = null; final String arg1 = arg.get("GENDER", 0); if (arg1 == null) { gender = EntityGenderUtils.all(); } else if (arg1.equalsIgnoreCase("class")) { gender = EntityGenderUtils.byEntityType(LeafType.CLASS); } else if (arg1.equalsIgnoreCase("object")) { gender = EntityGenderUtils.byEntityType(LeafType.OBJECT); } else if (arg1.equalsIgnoreCase("interface")) { gender = EntityGenderUtils.byEntityType(LeafType.INTERFACE); } else if (arg1.equalsIgnoreCase("enum")) { gender = EntityGenderUtils.byEntityType(LeafType.ENUM); } else if (arg1.equalsIgnoreCase("abstract")) { gender = EntityGenderUtils.byEntityType(LeafType.ABSTRACT_CLASS); } else if (arg1.equalsIgnoreCase("annotation")) { gender = EntityGenderUtils.byEntityType(LeafType.ANNOTATION); } else if (arg1.startsWith("<<")) { gender = EntityGenderUtils.byStereotype(arg1); } else { final IEntity entity = classDiagram.getOrCreateLeaf(Code.of(arg1), null, null); gender = EntityGenderUtils.byEntityAlone(entity); } if (gender != null) { final boolean empty = arg.get("EMPTY", 0) != null; final boolean emptyMembers = empty && portion == PORTION_MEMBER; if (empty == true && emptyMembers == false) { gender = EntityGenderUtils.and(gender, emptyByGender(portion)); } if (EntityUtils.groupRoot(classDiagram.getCurrentGroup()) == false) { gender = EntityGenderUtils.and(gender, EntityGenderUtils.byPackage(classDiagram.getCurrentGroup())); } if (emptyMembers) { classDiagram.hideOrShow(EntityGenderUtils.and(gender, emptyByGender(PORTION_FIELD)), PORTION_FIELD, arg .get("COMMAND", 0).equalsIgnoreCase("show")); classDiagram.hideOrShow(EntityGenderUtils.and(gender, emptyByGender(PORTION_METHOD)), PORTION_METHOD, arg.get("COMMAND", 0).equalsIgnoreCase("show")); } else { classDiagram.hideOrShow(gender, portion, arg.get("COMMAND", 0).equalsIgnoreCase("show")); } } return CommandExecutionResult.ok(); } private Set getEntityPortion(String s) { final String sub = StringUtils.goLowerCase(s.substring(0, 3)); if (sub.equals("met")) { return PORTION_METHOD; } if (sub.equals("mem")) { return PORTION_MEMBER; } if (sub.equals("att") || sub.equals("fie")) { return PORTION_FIELD; } if (sub.equals("cir")) { return EnumSet. of(EntityPortion.CIRCLED_CHARACTER); } if (sub.equals("ste")) { return EnumSet. of(EntityPortion.STEREOTYPE); } throw new IllegalArgumentException(); } } CommandHideShowByVisibility.java000066400000000000000000000122711312650303100336250ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import java.util.EnumSet; import java.util.Set; import java.util.StringTokenizer; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.skin.VisibilityModifier; public class CommandHideShowByVisibility extends SingleLineCommand2 { private static final EnumSet PORTION_METHOD = EnumSet. of(EntityPortion.METHOD); private static final EnumSet PORTION_MEMBER = EnumSet. of(EntityPortion.FIELD, EntityPortion.METHOD); private static final EnumSet PORTION_FIELD = EnumSet. of(EntityPortion.FIELD); public CommandHideShowByVisibility() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("COMMAND", "(hide|show)"), // new RegexLeaf("[%s]+"), // new RegexLeaf("VISIBILITY", "((?:public|private|protected|package)?(?:[,%s]+(?:public|private|protected|package))*)"), // new RegexLeaf("[%s]+"), // new RegexLeaf("PORTION", "(members?|attributes?|fields?|methods?)"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(UmlDiagram classDiagram, RegexResult arg) { if (classDiagram instanceof ClassDiagram) { return executeArgClass((ClassDiagram) classDiagram, arg); } // Just ignored return CommandExecutionResult.ok(); } private CommandExecutionResult executeArgClass(ClassDiagram classDiagram, RegexResult arg) { final Set portion = getEntityPortion(arg.get("PORTION", 0)); final Set visibilities = EnumSet. noneOf(VisibilityModifier.class); final StringTokenizer st = new StringTokenizer(StringUtils.goLowerCase(arg.get("VISIBILITY", 0)), " ,"); while (st.hasMoreTokens()) { addVisibilities(st.nextToken(), portion, visibilities); } classDiagram.hideOrShow(visibilities, arg.get("COMMAND", 0).equalsIgnoreCase("show")); return CommandExecutionResult.ok(); } private void addVisibilities(String token, Set portion, Set result) { if (token.equals("public") && portion.contains(EntityPortion.FIELD)) { result.add(VisibilityModifier.PUBLIC_FIELD); } if (token.equals("public") && portion.contains(EntityPortion.METHOD)) { result.add(VisibilityModifier.PUBLIC_METHOD); } if (token.equals("private") && portion.contains(EntityPortion.FIELD)) { result.add(VisibilityModifier.PRIVATE_FIELD); } if (token.equals("private") && portion.contains(EntityPortion.METHOD)) { result.add(VisibilityModifier.PRIVATE_METHOD); } if (token.equals("protected") && portion.contains(EntityPortion.FIELD)) { result.add(VisibilityModifier.PROTECTED_FIELD); } if (token.equals("protected") && portion.contains(EntityPortion.METHOD)) { result.add(VisibilityModifier.PROTECTED_METHOD); } if (token.equals("package") && portion.contains(EntityPortion.FIELD)) { result.add(VisibilityModifier.PACKAGE_PRIVATE_FIELD); } if (token.equals("package") && portion.contains(EntityPortion.METHOD)) { result.add(VisibilityModifier.PACKAGE_PRIVATE_METHOD); } } private Set getEntityPortion(String s) { final String sub = StringUtils.goLowerCase(s.substring(0, 3)); if (sub.equals("met")) { return PORTION_METHOD; } if (sub.equals("mem")) { return PORTION_MEMBER; } if (sub.equals("att") || sub.equals("fie")) { return PORTION_FIELD; } throw new IllegalArgumentException(); } } CommandHideShowSpecificClass.java000066400000000000000000000060511312650303100337150ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; public class CommandHideShowSpecificClass extends SingleLineCommand2 { public CommandHideShowSpecificClass() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("COMMAND", "(hide|show)"), // new RegexLeaf("[%s]+"), // new RegexLeaf("CODE", "(" + CommandCreateClass.CODE + ")"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(CucaDiagram diagram, RegexResult arg) { final String codeString = arg.get("CODE", 0); if (codeString.equals("class")) { diagram.hideOrShow(LeafType.CLASS, arg.get("COMMAND", 0).equalsIgnoreCase("show")); } else if (codeString.equals("interface")) { diagram.hideOrShow(LeafType.INTERFACE, arg.get("COMMAND", 0).equalsIgnoreCase("show")); } else { final Code code = Code.of(codeString); IEntity hidden = diagram.getEntityFactory().getLeafs().get(code); if (hidden == null) { hidden = diagram.getEntityFactory().getGroups().get(code); } if (hidden == null) { return CommandExecutionResult.error("Class/Package does not exist : " + code.getFullName()); } diagram.hideOrShow(hidden, arg.get("COMMAND", 0).equalsIgnoreCase("show")); } return CommandExecutionResult.ok(); } } CommandHideShowSpecificStereotype.java000066400000000000000000000045761312650303100350250ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.Stereotype; public class CommandHideShowSpecificStereotype extends SingleLineCommand2 { public CommandHideShowSpecificStereotype() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("COMMAND", "(hide|show)"), // new RegexLeaf("[%s]+"), // new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(CucaDiagram diagram, RegexResult arg) { final String stereotype = arg.get("STEREOTYPE", 0); diagram.hideOrShow(new Stereotype(stereotype), arg.get("COMMAND", 0).equalsIgnoreCase("show")); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/CommandImport.java000066400000000000000000000073141312650303100311030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import java.io.File; import java.io.IOException; import java.util.List; import net.sourceforge.plantuml.FileSystem; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; public class CommandImport extends SingleLineCommand { public CommandImport() { super("(?i)^import[%s]+[%g]?([^%g]+)[%g]?$"); } @Override protected CommandExecutionResult executeArg(ClassDiagram classDiagram, List arg) { final String arg0 = arg.get(0); try { final File f = FileSystem.getInstance().getFile(arg0); if (f.isFile()) { includeSimpleFile(classDiagram, f); } else if (f.isDirectory()) { includeDirectory(classDiagram, f); } } catch (IOException e) { e.printStackTrace(); return CommandExecutionResult.error("IO error " + e); } return CommandExecutionResult.ok(); } private void includeDirectory(ClassDiagram classDiagram, File dir) throws IOException { for (File f : dir.listFiles()) { includeSimpleFile(classDiagram, f); } } private void includeSimpleFile(ClassDiagram classDiagram, File f) throws IOException { if (StringUtils.goLowerCase(f.getName()).endsWith(".java")) { includeFileJava(classDiagram, f); } // if (f.getName().goLowerCase().endsWith(".sql")) { // includeFileSql(f); // } } private void includeFileJava(ClassDiagram classDiagram, final File f) throws IOException { final JavaFile javaFile = new JavaFile(f); for (JavaClass cl : javaFile.getJavaClasses()) { final Code name = Code.of(cl.getName()); final IEntity ent1 = classDiagram.getOrCreateLeaf(name, cl.getType(), null); for (String p : cl.getParents()) { final IEntity ent2 = classDiagram.getOrCreateLeaf(Code.of(p), cl.getParentType(), null); final Link link = new Link(ent2, ent1, new LinkType(LinkDecor.NONE, LinkDecor.EXTENDS), Display.NULL, 2); classDiagram.addLink(link); } } } // private void includeFileSql(final File f) throws IOException { // new SqlImporter(getSystem(), f).process(); // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/CommandLayoutNewLine.java000066400000000000000000000041351312650303100323660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandLayoutNewLine extends SingleLineCommand2 { public CommandLayoutNewLine() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("layout_new_line"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(ClassDiagram diagram, RegexResult arg) { diagram.layoutNewLine(); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/CommandLinkClass.java000066400000000000000000000500441312650303100315120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import java.util.StringTokenizer; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkArrow; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; import net.sourceforge.plantuml.graphic.HtmlColorSet; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.objectdiagram.AbstractClassOrObjectDiagram; final public class CommandLinkClass extends SingleLineCommand2 { private static final String SINGLE = "[.\\\\]{0,2}[\\p{L}0-9_]+(?:[.\\\\]{1,2}[\\p{L}0-9_]+)*"; private static final String COUPLE = "\\([%s]*(" + SINGLE + ")[%s]*,[%s]*(" + SINGLE + ")[%s]*\\)"; public CommandLinkClass(UmlDiagramType umlDiagramType) { super(getRegexConcat(umlDiagramType)); } static private RegexConcat getRegexConcat(UmlDiagramType umlDiagramType) { return new RegexConcat( new RegexLeaf("HEADER", "^(?:@([\\d.]+)[%s]+)?"), // new RegexOr( // new RegexLeaf("ENT1", getClassIdentifier()),// new RegexLeaf("COUPLE1", COUPLE)), new RegexLeaf("[%s]*"), // new RegexLeaf("FIRST_LABEL", "(?:[%g]([^%g]+)[%g])?"), // new RegexLeaf("[%s]*"), // new RegexConcat( // new RegexLeaf("ARROW_HEAD1", "([%s]+[ox]|[)#\\[<*+^}]|[<\\[]\\||\\}o|\\}\\||\\|o|\\|\\|)?"), // new RegexLeaf("ARROW_BODY1", "([-=.]+)"), // new RegexLeaf("ARROW_STYLE1", "(?:\\[((?:#\\w+|dotted|dashed|plain|bold|hidden|norank)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden|,norank)*)\\])?"), new RegexLeaf("ARROW_DIRECTION", "(left|right|up|down|le?|ri?|up?|do?)?"), // new RegexLeaf("INSIDE", "(?:(0|\\(0\\)|\\(0|0\\))(?=[-=.~]))?"), // new RegexLeaf("ARROW_STYLE2", "(?:\\[((?:#\\w+|dotted|dashed|plain|bold|hidden|norank)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden|,norank)*)\\])?"), new RegexLeaf("ARROW_BODY2", "([-=.]*)"), // new RegexLeaf("ARROW_HEAD2", "([ox][%s]+|[(#\\]>*+^\\{]|\\|[>\\]]|o\\{|\\|\\{|o\\||\\|\\|)?")), // new RegexLeaf("[%s]*"), // new RegexLeaf("SECOND_LABEL", "(?:[%g]([^%g]+)[%g])?"), new RegexLeaf("[%s]*"), // new RegexOr( // new RegexLeaf("ENT2", getClassIdentifier()), // new RegexLeaf("COUPLE2", COUPLE)), // new RegexLeaf("[%s]*"), // color().getRegex(), // new RegexLeaf("URL", "[%s]*(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("LABEL_LINK", "(?::[%s]*(.+))?"), // new RegexLeaf("$")); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.LINE); } private static String getClassIdentifier() { return "(" + getSeparator() + "?[\\p{L}0-9_$]+(?:" + getSeparator() + "[\\p{L}0-9_$]+)*|[%g][^%g]+[%g])"; } public static String getSeparator() { return "(?:\\.|::|\\\\|\\\\\\\\)"; } // private static String optionalKeywords(UmlDiagramType type) { // if (type == UmlDiagramType.CLASS) { // return "(interface|enum|annotation|abstract[%s]+class|abstract|class|object|entity)"; // } // if (type == UmlDiagramType.OBJECT) { // return "(object)"; // } // throw new IllegalArgumentException(); // } // // private LeafType getTypeIfObject(String type) { // if ("object".equalsIgnoreCase(type)) { // return LeafType.OBJECT; // } // return null; // } @Override protected CommandExecutionResult executeArg(AbstractClassOrObjectDiagram diagram, RegexResult arg) { Code ent1 = Code.of(arg.get("ENT1", 0)); Code ent2 = Code.of(arg.get("ENT2", 0)); if (ent1 == null) { return executeArgSpecial1(diagram, arg); } if (ent2 == null) { return executeArgSpecial2(diagram, arg); } ent1 = ent1.eventuallyRemoveStartingAndEndingDoubleQuote("\""); ent2 = ent2.eventuallyRemoveStartingAndEndingDoubleQuote("\""); if (isGroupButNotTheCurrentGroup(diagram, ent1) && isGroupButNotTheCurrentGroup(diagram, ent2)) { return executePackageLink(diagram, arg); } String port1 = null; String port2 = null; if (removeMemberPart(diagram, ent1) != null) { port1 = ent1.getPortMember(); ent1 = removeMemberPart(diagram, ent1); } if (removeMemberPart(diagram, ent2) != null) { port2 = ent2.getPortMember(); ent2 = removeMemberPart(diagram, ent2); } final IEntity cl1 = isGroupButNotTheCurrentGroup(diagram, ent1) ? diagram.getGroup(Code.of(StringUtils .eventuallyRemoveStartingAndEndingDoubleQuote(arg.get("ENT1", 0), "\""))) : diagram.getOrCreateLeaf( ent1, null, null); final IEntity cl2 = isGroupButNotTheCurrentGroup(diagram, ent2) ? diagram.getGroup(Code.of(StringUtils .eventuallyRemoveStartingAndEndingDoubleQuote(arg.get("ENT2", 0), "\""))) : diagram.getOrCreateLeaf( ent2, null, null); Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final LinkType linkType = getLinkType(arg); final Direction dir = getDirection(arg); final int queue; if (dir == Direction.LEFT || dir == Direction.RIGHT) { queue = 1; } else { queue = getQueueLength(arg); } String firstLabel = arg.get("FIRST_LABEL", 0); String secondLabel = arg.get("SECOND_LABEL", 0); String labelLink = null; if (arg.get("LABEL_LINK", 0) != null) { labelLink = arg.get("LABEL_LINK", 0); if (firstLabel == null && secondLabel == null) { final Pattern2 p1 = MyPattern.cmpile("^[%g]([^%g]+)[%g]([^%g]+)[%g]([^%g]+)[%g]$"); final Matcher2 m1 = p1.matcher(labelLink); if (m1.matches()) { firstLabel = m1.group(1); labelLink = StringUtils.trin(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote( StringUtils.trin(m1.group(2)), "\"")); secondLabel = m1.group(3); } else { final Pattern2 p2 = MyPattern.cmpile("^[%g]([^%g]+)[%g]([^%g]+)$"); final Matcher2 m2 = p2.matcher(labelLink); if (m2.matches()) { firstLabel = m2.group(1); labelLink = StringUtils.trin(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote( StringUtils.trin(m2.group(2)), "\"")); secondLabel = null; } else { final Pattern2 p3 = MyPattern.cmpile("^([^%g]+)[%g]([^%g]+)[%g]$"); final Matcher2 m3 = p3.matcher(labelLink); if (m3.matches()) { firstLabel = null; labelLink = StringUtils.trin(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote( StringUtils.trin(m3.group(1)), "\"")); secondLabel = m3.group(2); } } } } labelLink = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(labelLink, "\""); } LinkArrow linkArrow = LinkArrow.NONE; if ("<".equals(labelLink)) { linkArrow = LinkArrow.BACKWARD; labelLink = null; } else if (">".equals(labelLink)) { linkArrow = LinkArrow.DIRECT_NORMAL; labelLink = null; } else if (labelLink != null && labelLink.startsWith("< ")) { linkArrow = LinkArrow.BACKWARD; labelLink = StringUtils.trin(labelLink.substring(2)); } else if (labelLink != null && labelLink.startsWith("> ")) { linkArrow = LinkArrow.DIRECT_NORMAL; labelLink = StringUtils.trin(labelLink.substring(2)); } else if (labelLink != null && labelLink.endsWith(" >")) { linkArrow = LinkArrow.DIRECT_NORMAL; labelLink = StringUtils.trin(labelLink.substring(0, labelLink.length() - 2)); } else if (labelLink != null && labelLink.endsWith(" <")) { linkArrow = LinkArrow.BACKWARD; labelLink = StringUtils.trin(labelLink.substring(0, labelLink.length() - 2)); } Link link = new Link(cl1, cl2, linkType, Display.getWithNewlines(labelLink), queue, firstLabel, secondLabel, diagram.getLabeldistance(), diagram.getLabelangle()); if (arg.get("URL", 0) != null) { final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); final Url url = urlBuilder.getUrl(arg.get("URL", 0)); link.setUrl(url); } link.setPortMembers(port1, port2); if (dir == Direction.LEFT || dir == Direction.UP) { link = link.getInv(); } link.setLinkArrow(linkArrow); colors = applyStyle(arg.getLazzy("ARROW_STYLE", 0), link, colors); link.setColors(colors); addLink(diagram, link, arg.get("HEADER", 0)); return CommandExecutionResult.ok(); } private boolean isGroupButNotTheCurrentGroup(AbstractClassOrObjectDiagram diagram, Code code) { if (diagram.getCurrentGroup().getCode().equals(code)) { return false; } return diagram.isGroup(code); } private Code removeMemberPart(AbstractClassOrObjectDiagram diagram, Code code) { if (diagram.leafExist(code)) { return null; } final Code before = code.removeMemberPart(); if (before == null) { return null; } if (diagram.leafExist(before) == false) { return null; } return before; } // private CommandExecutionResult executeLinkFields(AbstractClassOrObjectDiagram diagram, RegexResult arg) { // System.err.println("field1=" + arg.get("ENT1", 1)); // System.err.println("field2=" + arg.get("ENT2", 1)); // return CommandExecutionResult.error("not working yet"); // } private void addLink(AbstractClassOrObjectDiagram diagram, Link link, String weight) { diagram.addLink(link); if (weight == null) { // final LinkType type = link.getType(); // --|> highest // --*, -->, --o normal // ..*, ..>, ..o lowest // if (type.isDashed() == false) { // if (type.contains(LinkDecor.EXTENDS)) { // link.setWeight(3); // } // if (type.contains(LinkDecor.ARROW) || // type.contains(LinkDecor.COMPOSITION) // || type.contains(LinkDecor.AGREGATION)) { // link.setWeight(2); // } // } } else { link.setWeight(Double.parseDouble(weight)); } } private CommandExecutionResult executePackageLink(AbstractClassOrObjectDiagram diagram, RegexResult arg) { final IEntity cl1 = diagram.getGroup(Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote( arg.get("ENT1", 0), "\""))); final IEntity cl2 = diagram.getGroup(Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote( arg.get("ENT2", 0), "\""))); final LinkType linkType = getLinkType(arg); final Direction dir = getDirection(arg); final int queue; if (dir == Direction.LEFT || dir == Direction.RIGHT) { queue = 1; } else { queue = getQueueLength(arg); } Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final Display labelLink = Display.getWithNewlines(arg.get("LABEL_LINK", 0)); final String firstLabel = arg.get("FIRST_LABEL", 0); final String secondLabel = arg.get("SECOND_LABEL", 0); final Link link = new Link(cl1, cl2, linkType, labelLink, queue, firstLabel, secondLabel, diagram.getLabeldistance(), diagram.getLabelangle()); diagram.resetPragmaLabel(); colors = applyStyle(arg.getLazzy("ARROW_STYLE", 0), link, colors); link.setColors(colors); addLink(diagram, link, arg.get("HEADER", 0)); return CommandExecutionResult.ok(); } private CommandExecutionResult executeArgSpecial1(AbstractClassOrObjectDiagram diagram, RegexResult arg) { final Code clName1 = Code.of(arg.get("COUPLE1", 0)); final Code clName2 = Code.of(arg.get("COUPLE1", 1)); if (diagram.leafExist(clName1) == false) { return CommandExecutionResult.error("No class " + clName1); } if (diagram.leafExist(clName2) == false) { return CommandExecutionResult.error("No class " + clName2); } final Code ent2 = Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get("ENT2", 0), "\"")); final IEntity cl2 = diagram.getOrCreateLeaf(ent2, null, null); final LinkType linkType = getLinkType(arg); final Display label = Display.getWithNewlines(arg.get("LABEL_LINK", 0)); // final int length = getQueueLength(arg); // final String weight = arg.get("HEADER").get(0); final boolean result = diagram.associationClass(1, clName1, clName2, cl2, linkType, label); if (result == false) { return CommandExecutionResult.error("Cannot have more than 2 assocications"); } return CommandExecutionResult.ok(); } private CommandExecutionResult executeArgSpecial2(AbstractClassOrObjectDiagram diagram, RegexResult arg) { final Code clName1 = Code.of(arg.get("COUPLE2", 0)); final Code clName2 = Code.of(arg.get("COUPLE2", 1)); if (diagram.leafExist(clName1) == false) { return CommandExecutionResult.error("No class " + clName1); } if (diagram.leafExist(clName2) == false) { return CommandExecutionResult.error("No class " + clName2); } final Code ent1 = Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get("ENT1", 0), "\"")); final IEntity cl1 = diagram.getOrCreateLeaf(ent1, null, null); final LinkType linkType = getLinkType(arg); final Display label = Display.getWithNewlines(arg.get("LABEL_LINK", 0)); // final int length = getQueueLength(arg); // final String weight = arg.get("HEADER").get(0); final boolean result = diagram.associationClass(2, clName1, clName2, cl1, linkType, label); if (result == false) { return CommandExecutionResult.error("Cannot have more than 2 assocications"); } return CommandExecutionResult.ok(); } private LinkDecor getDecors1(String s) { if (s == null) { return LinkDecor.NONE; } s = StringUtils.trin(s); if ("<|".equals(s)) { return LinkDecor.EXTENDS; } if ("}".equals(s)) { return LinkDecor.CROWFOOT; } if ("}o".equals(s)) { return LinkDecor.CIRCLE_CROWFOOT; } if ("}|".equals(s)) { return LinkDecor.LINE_CROWFOOT; } if ("|o".equals(s)) { return LinkDecor.CIRCLE_LINE; } if ("||".equals(s)) { return LinkDecor.DOUBLE_LINE; } if ("<".equals(s)) { return LinkDecor.ARROW; } if ("^".equals(s)) { return LinkDecor.EXTENDS; } if ("+".equals(s)) { return LinkDecor.PLUS; } if ("o".equals(s)) { return LinkDecor.AGREGATION; } if ("x".equals(s)) { return LinkDecor.NOT_NAVIGABLE; } if ("*".equals(s)) { return LinkDecor.COMPOSITION; } if ("#".equals(s)) { return LinkDecor.SQUARE; } if (")".equals(s)) { return LinkDecor.PARENTHESIS; } return LinkDecor.NONE; } private LinkDecor getDecors2(String s) { if (s == null) { return LinkDecor.NONE; } s = StringUtils.trin(s); if ("|>".equals(s)) { return LinkDecor.EXTENDS; } if (">".equals(s)) { return LinkDecor.ARROW; } if ("{".equals(s)) { return LinkDecor.CROWFOOT; } if ("o{".equals(s)) { return LinkDecor.CIRCLE_CROWFOOT; } if ("|{".equals(s)) { return LinkDecor.LINE_CROWFOOT; } if ("o|".equals(s)) { return LinkDecor.CIRCLE_LINE; } if ("||".equals(s)) { return LinkDecor.DOUBLE_LINE; } if ("^".equals(s)) { return LinkDecor.EXTENDS; } if ("+".equals(s)) { return LinkDecor.PLUS; } if ("o".equals(s)) { return LinkDecor.AGREGATION; } if ("x".equals(s)) { return LinkDecor.NOT_NAVIGABLE; } if ("*".equals(s)) { return LinkDecor.COMPOSITION; } if ("#".equals(s)) { return LinkDecor.SQUARE; } if ("(".equals(s)) { return LinkDecor.PARENTHESIS; } return LinkDecor.NONE; } private LinkType getLinkType(RegexResult arg) { final LinkDecor decors1 = getDecors1(arg.get("ARROW_HEAD1", 0)); final LinkDecor decors2 = getDecors2(arg.get("ARROW_HEAD2", 0)); LinkType result = new LinkType(decors2, decors1); if (arg.get("ARROW_BODY1", 0).contains(".") || arg.get("ARROW_BODY2", 0).contains(".")) { result = result.getDashed(); } final String middle = arg.get("INSIDE", 0); if ("0".equals(middle)) { result = result.withMiddleCircle(); } else if ("0)".equals(middle)) { result = result.withMiddleCircleCircled1(); } else if ("(0".equals(middle)) { result = result.withMiddleCircleCircled2(); } else if ("(0)".equals(middle)) { result = result.withMiddleCircleCircled(); } return result; } private int getQueueLength(RegexResult arg) { String s = getFullArrow(arg); s = s.replaceAll("[^-.=]", ""); return s.length(); } private Direction getDirection(RegexResult arg) { final LinkDecor decors1 = getDecors1(arg.get("ARROW_HEAD1", 0)); final LinkDecor decors2 = getDecors2(arg.get("ARROW_HEAD2", 0)); String s = getFullArrow(arg); s = s.replaceAll("[^-.=\\w]", ""); if (s.startsWith("o")) { s = s.substring(1); } if (s.endsWith("o")) { s = s.substring(0, s.length() - 1); } Direction result = StringUtils.getQueueDirection(s); if (isInversed(decors1, decors2) && s.matches(".*\\w.*")) { result = result.getInv(); } return result; } private String getFullArrow(RegexResult arg) { return notNull(arg.get("ARROW_HEAD1", 0)) + notNull(arg.get("ARROW_BODY1", 0)) + notNull(arg.get("ARROW_DIRECTION", 0)) + notNull(arg.get("ARROW_BODY2", 0)) + notNull(arg.get("ARROW_HEAD2", 0)); } public static String notNull(String s) { if (s == null) { return ""; } return s; } @Deprecated public static Colors applyStyle(String arrowStyle, Link link) { return applyStyle(arrowStyle, link, null); } public static Colors applyStyle(String arrowStyle, Link link, Colors colors) { if (arrowStyle == null) { return colors; } final StringTokenizer st = new StringTokenizer(arrowStyle, ","); while (st.hasMoreTokens()) { final String s = st.nextToken(); if (s.equalsIgnoreCase("dashed")) { link.goDashed(); } else if (s.equalsIgnoreCase("bold")) { link.goBold(); } else if (s.equalsIgnoreCase("dotted")) { link.goDotted(); } else if (s.equalsIgnoreCase("hidden")) { link.goHidden(); } else if (s.equalsIgnoreCase("plain")) { // Do nothing } else if (s.equalsIgnoreCase("norank")) { link.goNorank(); } else { link.setSpecificColor(s); if (colors != null) { colors = colors.add(ColorType.LINE, HtmlColorSet.getInstance().getColorIfValid(s)); } } } return colors; } private boolean isInversed(LinkDecor decors1, LinkDecor decors2) { if (decors1 == LinkDecor.ARROW && decors2 != LinkDecor.ARROW) { return true; } if (decors2 == LinkDecor.AGREGATION) { return true; } if (decors2 == LinkDecor.COMPOSITION) { return true; } if (decors2 == LinkDecor.PLUS) { return true; } // if (decors2 == LinkDecor.EXTENDS) { // return true; // } return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/CommandLinkLollipop.java000066400000000000000000000205371312650303100322430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; import net.sourceforge.plantuml.objectdiagram.AbstractClassOrObjectDiagram; import net.sourceforge.plantuml.utils.UniqueSequence; final public class CommandLinkLollipop extends SingleLineCommand2 { public CommandLinkLollipop(UmlDiagramType umlDiagramType) { super(getRegexConcat(umlDiagramType)); } static RegexConcat getRegexConcat(UmlDiagramType umlDiagramType) { return new RegexConcat(new RegexLeaf("HEADER", "^(?:@([\\d.]+)[%s]+)?"), // new RegexLeaf("ENT1", "(?:" + optionalKeywords(umlDiagramType) + "[%s]+)?" + "(\\.?[\\p{L}0-9_]+(?:\\.[\\p{L}0-9_]+)*|[%g][^%g]+[%g])[%s]*(\\<\\<.*\\>\\>)?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("FIRST_LABEL", "(?:[%g]([^%g]+)[%g])?"), // new RegexLeaf("[%s]*"), // new RegexOr(new RegexLeaf("LOL_THEN_ENT", "\\(\\)([-=.]+)"), // new RegexLeaf("ENT_THEN_LOL", "([-=.]+)\\(\\)")), // new RegexLeaf("[%s]*"), // new RegexLeaf("SECOND_LABEL", "(?:[%g]([^%g]+)[%g])?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("ENT2", "(?:" + optionalKeywords(umlDiagramType) + "[%s]+)?" + "(\\.?[\\p{L}0-9_]+(?:\\.[\\p{L}0-9_]+)*|[%g][^%g]+[%g])[%s]*(\\<\\<.*\\>\\>)?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("LABEL_LINK", "(?::[%s]*(.+))?"), // new RegexLeaf("$")); } private static String optionalKeywords(UmlDiagramType type) { if (type == UmlDiagramType.CLASS) { return "(interface|enum|annotation|abstract[%s]+class|abstract|class|entity)"; } if (type == UmlDiagramType.OBJECT) { return "(object)"; } throw new IllegalArgumentException(); } @Override protected CommandExecutionResult executeArg(AbstractClassOrObjectDiagram diagram, RegexResult arg) { final Code ent1 = Code.of(arg.get("ENT1", 1)); final Code ent2 = Code.of(arg.get("ENT2", 1)); final IEntity cl1; final IEntity cl2; final IEntity normalEntity; final String suffix = "lol" + UniqueSequence.getValue(); if (arg.get("LOL_THEN_ENT", 0) == null) { assert arg.get("ENT_THEN_LOL", 0) != null; cl1 = diagram.getOrCreateLeaf(ent1, null, null); cl2 = diagram.createLeaf(cl1.getCode().addSuffix(suffix), Display.getWithNewlines(ent2), LeafType.LOLLIPOP, null); normalEntity = cl1; } else { cl2 = diagram.getOrCreateLeaf(ent2, null, null); cl1 = diagram.createLeaf(cl2.getCode().addSuffix(suffix), Display.getWithNewlines(ent1), LeafType.LOLLIPOP, null); normalEntity = cl2; } final LinkType linkType = getLinkType(arg); final String queue = getQueue(arg); int length = queue.length(); if (length == 1 && diagram.getNbOfHozizontalLollipop(normalEntity) > 1) { length++; } String firstLabel = arg.get("FIRST_LABEL", 0); String secondLabel = arg.get("SECOND_LABEL", 0); String labelLink = null; if (arg.get("LABEL_LINK", 0) != null) { labelLink = arg.get("LABEL_LINK", 0); if (firstLabel == null && secondLabel == null) { final Pattern2 p1 = MyPattern.cmpile("^\"([^\"]+)\"([^\"]+)\"([^\"]+)\"$"); final Matcher2 m1 = p1.matcher(labelLink); if (m1.matches()) { firstLabel = m1.group(1); labelLink = StringUtils.trin(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(StringUtils .trin(m1.group(2)))); secondLabel = m1.group(3); } else { final Pattern2 p2 = MyPattern.cmpile("^\"([^\"]+)\"([^\"]+)$"); final Matcher2 m2 = p2.matcher(labelLink); if (m2.matches()) { firstLabel = m2.group(1); labelLink = StringUtils.trin(StringUtils .eventuallyRemoveStartingAndEndingDoubleQuote(StringUtils.trin(m2.group(2)))); secondLabel = null; } else { final Pattern2 p3 = MyPattern.cmpile("^([^\"]+)\"([^\"]+)\"$"); final Matcher2 m3 = p3.matcher(labelLink); if (m3.matches()) { firstLabel = null; labelLink = StringUtils.trin(StringUtils .eventuallyRemoveStartingAndEndingDoubleQuote(StringUtils.trin(m3.group(1)))); secondLabel = m3.group(2); } } } } labelLink = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(labelLink); } /* * else if (arg.get("LABEL_LINK_XT").get(0) != null || arg.get("LABEL_LINK_XT").get(1) != null || * arg.get("LABEL_LINK_XT").get(2) != null) { labelLink = arg.get("LABEL_LINK_XT").get(1); firstLabel = * merge(firstLabel, arg.get("LABEL_LINK_XT").get(0)); secondLabel = merge(arg.get("LABEL_LINK_XT").get(2), * secondLabel); } */ final Link link = new Link(cl1, cl2, linkType, Display.getWithNewlines(labelLink), length, firstLabel, secondLabel, diagram.getLabeldistance(), diagram.getLabelangle()); diagram.resetPragmaLabel(); addLink(diagram, link, arg.get("HEADER", 0)); return CommandExecutionResult.ok(); } // private String merge(String a, String b) { // if (a == null && b == null) { // return null; // } // if (a == null && b != null) { // return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(b); // } // if (b == null && a != null) { // return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(a); // } // return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(a) + // BackSlash.VV1 // + StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(b); // } private void addLink(AbstractClassOrObjectDiagram diagram, Link link, String weight) { diagram.addLink(link); if (weight == null) { // final LinkType type = link.getType(); // --|> highest // --*, -->, --o normal // ..*, ..>, ..o lowest // if (type.isDashed() == false) { // if (type.contains(LinkDecor.EXTENDS)) { // link.setWeight(3); // } // if (type.contains(LinkDecor.ARROW) || // type.contains(LinkDecor.COMPOSITION) // || type.contains(LinkDecor.AGREGATION)) { // link.setWeight(2); // } // } } else { link.setWeight(Double.parseDouble(weight)); } } private LinkType getLinkType(RegexResult arg) { return new LinkType(LinkDecor.NONE, LinkDecor.NONE); } private String getQueue(RegexResult arg) { if (arg.get("LOL_THEN_ENT", 0) != null) { return StringUtils.trin(arg.get("LOL_THEN_ENT", 0)); } if (arg.get("ENT_THEN_LOL", 0) != null) { return StringUtils.trin(arg.get("ENT_THEN_LOL", 0)); } throw new IllegalArgumentException(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/CommandNamespaceSeparator.java000066400000000000000000000037071312650303100334100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import java.util.List; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; public class CommandNamespaceSeparator extends SingleLineCommand { public CommandNamespaceSeparator() { super("(?i)^set[%s]namespaceseparator[%s](\\S+)$"); } @Override protected CommandExecutionResult executeArg(ClassDiagram diagram, List arg) { final String s = arg.get(0); if ("none".equalsIgnoreCase(s)) { diagram.setNamespaceSeparator(null); } else { diagram.setNamespaceSeparator(s); } return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/CommandStereotype.java000066400000000000000000000045531312650303100317760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import java.util.List; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.Stereotype; public class CommandStereotype extends SingleLineCommand { public CommandStereotype() { super("(?i)^([\\p{L}0-9_.]+|[%g][^%g]+[%g])[%s]*(\\<\\<.*\\>\\>)$"); } @Override protected CommandExecutionResult executeArg(ClassDiagram diagram, List arg) { final Code code = Code.of(arg.get(0)); final String stereotype = arg.get(1); final IEntity entity = diagram.getOrCreateLeaf(code, null, null); entity.setStereotype(new Stereotype(stereotype, diagram.getSkinParam().getCircledCharacterRadius(), diagram .getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER), diagram.getSkinParam().getIHtmlColorSet())); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/CommandUrl.java000066400000000000000000000052441312650303100303730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import java.util.List; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.IEntity; public class CommandUrl extends SingleLineCommand { public CommandUrl() { super("(?i)^url[%s]*(?:of|for)?[%s]+([\\p{L}0-9_.]+|[%g][^%g]+[%g])[%s]+(?:is)?[%s]*(" + UrlBuilder.getRegexp() + ")$"); } @Override protected CommandExecutionResult executeArg(AbstractEntityDiagram diagram, List arg) { final Code code = Code.of(arg.get(0)); final String urlString = arg.get(1); final IEntity entity; if (diagram.leafExist(code)) { entity = diagram.getOrCreateLeaf(code, null, null); } else if (diagram.isGroup(code)) { entity = diagram.getGroup(code); } else { return CommandExecutionResult.error(code + " does not exist"); } // final IEntity entity = diagram.getOrCreateLeaf(code, null); final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); final Url url = urlBuilder.getUrl(urlString); entity.addUrl(url); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/GenericRegexProducer.java000066400000000000000000000033521312650303100324030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; public class GenericRegexProducer { public final static String PATTERN = "[^\\<\\>/]" + getGenericRegex(4); // \<[^\<\>]([^\<\>]|\<\>)*\> static final private String part1 = "(?:[^\\<\\>/]|\\<"; static final private String part2 = "\\>)*"; static String getGenericRegex(int level) { if (level < 0) { throw new IllegalArgumentException(); } if (level == 0) { return part1 + part2; } return part1 + getGenericRegex(level - 1) + part2; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/JavaClass.java000066400000000000000000000047051312650303100302020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.StringTokenizer; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.LeafType; class JavaClass { private final String name; private final String javaPackage; private final List parents = new ArrayList(); private final LeafType type; private final LeafType parentType; public JavaClass(String javaPackage, String name, String p, LeafType type, LeafType parentType) { this.name = name; this.javaPackage = javaPackage; if (p == null) { p = ""; } final StringTokenizer st = new StringTokenizer(StringUtils.trin(p), ","); while (st.hasMoreTokens()) { this.parents.add(StringUtils.trin(st.nextToken()).replaceAll("\\<.*", "")); } this.type = type; this.parentType = parentType; } public final String getName() { return name; } public final LeafType getType() { return type; } public final List getParents() { return Collections.unmodifiableList(parents); } public final LeafType getParentType() { return parentType; } public final String getJavaPackage() { return javaPackage; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/classdiagram/command/JavaFile.java000066400000000000000000000070071312650303100300120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.classdiagram.command; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.cucadiagram.LeafType; class JavaFile { private static final Pattern2 classDefinition = MyPattern .cmpile("^(?:public[%s]+|abstract[%s]+|final[%s]+)*(class|interface|enum|annotation)[%s]+(\\w+)(?:.*\\b(extends|implements)[%s]+([\\w%s,]+))?"); private static final Pattern2 packageDefinition = MyPattern.cmpile("^package[%s]+([\\w+.]+)[%s]*;"); private final List all = new ArrayList(); public JavaFile(File f) throws IOException { BufferedReader br = null; try { br = new BufferedReader(new FileReader(f)); initFromReader(br); } finally { if (br != null) { br.close(); } } } private void initFromReader(BufferedReader br) throws IOException { String javaPackage = null; String s; while ((s = br.readLine()) != null) { s = StringUtils.trin(s); final Matcher2 matchPackage = packageDefinition.matcher(s); if (matchPackage.find()) { javaPackage = matchPackage.group(1); } else { final Matcher2 matchClassDefinition = classDefinition.matcher(s); if (matchClassDefinition.find()) { final String n = matchClassDefinition.group(2); final String p = matchClassDefinition.group(4); final LeafType type = LeafType.valueOf(StringUtils.goUpperCase(matchClassDefinition.group(1))); final LeafType parentType = getParentType(type, matchClassDefinition.group(3)); all.add(new JavaClass(javaPackage, n, p, type, parentType)); } } } } static LeafType getParentType(LeafType type, String extendsOrImplements) { if (extendsOrImplements == null) { return null; } if (type == LeafType.CLASS) { if (extendsOrImplements.equals("extends")) { return LeafType.CLASS; } return LeafType.INTERFACE; } return LeafType.INTERFACE; } public List getJavaClasses() { return Collections.unmodifiableList(all); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/code/000077500000000000000000000000001312650303100223245ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/code/ArobaseStringCompressor.java000066400000000000000000000070041312650303100300100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.code; import java.io.IOException; import java.io.StringReader; import net.sourceforge.plantuml.CharSequence2; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.preproc.ReadLine; import net.sourceforge.plantuml.preproc.ReadLineReader; import net.sourceforge.plantuml.preproc.UncommentReadLine; public class ArobaseStringCompressor implements StringCompressor { private final static Pattern2 p = MyPattern.cmpile("(?s)(?i)^[%s]*(@startuml[^\\n\\r]*)?[%s]*(.*?)[%s]*(@enduml)?[%s]*$"); public String compress(final String data) throws IOException { final ReadLine r = new UncommentReadLine(new ReadLineReader(new StringReader(data), "COMPRESS")); final StringBuilder sb = new StringBuilder(); final StringBuilder full = new StringBuilder(); CharSequence2 s = null; boolean startDone = false; while ((s = r.readLine()) != null) { append(full, s); if (s.toString2().startsWith("@startuml")) { startDone = true; } else if (s.toString2().startsWith("@enduml")) { return sb.toString(); } else if (startDone) { append(sb, s); } } if (startDone == false) { return compressOld(full.toString()); } return sb.toString(); } private void append(final StringBuilder sb, CharSequence2 s) { if (sb.length() > 0) { sb.append('\n'); } sb.append(s.toString2()); } private String compressOld(String s) throws IOException { final Matcher2 m = p.matcher(s); if (m.find()) { return clean(m.group(2)); } return ""; } public String decompress(String s) throws IOException { String result = clean(s); if (result.startsWith("@start")) { return result; } result = "@startuml\n" + result; if (result.endsWith("\n") == false) { result += "\n"; } result += "@enduml"; return result; } private String clean(String s) { s = StringUtils.trin(s); s = clean1(s); s = s.replaceAll("@enduml[^\\n\\r]*", ""); s = s.replaceAll("@startuml[^\\n\\r]*", ""); s = StringUtils.trin(s); return s; } private String clean1(String s) { final Matcher2 m = p.matcher(s); if (m.matches()) { return m.group(2); } return s; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/code/AsciiEncoder.java000066400000000000000000000066111312650303100255230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.code; public class AsciiEncoder implements URLEncoder { final private char encode6bit[] = new char[64]; final private byte decode6bit[] = new byte[128]; public AsciiEncoder() { for (byte b = 0; b < 64; b++) { encode6bit[b] = encode6bit(b); decode6bit[encode6bit[b]] = b; } } public String encode(byte data[]) { if (data == null) { return ""; } final StringBuilder resu = new StringBuilder((data.length * 4 + 2) / 3); for (int i = 0; i < data.length; i += 3) { append3bytes(resu, data[i] & 0xFF, i + 1 < data.length ? data[i + 1] & 0xFF : 0, i + 2 < data.length ? data[i + 2] & 0xFF : 0); } return resu.toString(); } public byte[] decode(String s) { if (s.length() % 4 != 0) { throw new IllegalArgumentException("Cannot decode " + s); } final byte data[] = new byte[(s.length() * 3 + 3) / 4]; int pos = 0; for (int i = 0; i < s.length(); i += 4) { decode3bytes(data, pos, s.charAt(i), s.charAt(i + 1), s.charAt(i + 2), s.charAt(i + 3)); pos += 3; } return data; } public int decode6bit(char c) { return decode6bit[c]; } public char encode6bit(byte b) { assert b >= 0 && b < 64; if (b < 10) { return (char) ('0' + b); } b -= 10; if (b < 26) { return (char) ('A' + b); } b -= 26; if (b < 26) { return (char) ('a' + b); } b -= 26; if (b == 0) { return '-'; } if (b == 1) { return '_'; } assert false; return '?'; } private void append3bytes(StringBuilder sb, int b1, int b2, int b3) { final int c1 = b1 >> 2; final int c2 = ((b1 & 0x3) << 4) | (b2 >> 4); final int c3 = ((b2 & 0xF) << 2) | (b3 >> 6); final int c4 = b3 & 0x3F; sb.append(encode6bit[c1 & 0x3F]); sb.append(encode6bit[c2 & 0x3F]); sb.append(encode6bit[c3 & 0x3F]); sb.append(encode6bit[c4 & 0x3F]); } private void decode3bytes(byte r[], int pos, char cc1, char cc2, char cc3, char cc4) { final int c1 = decode6bit[cc1]; final int c2 = decode6bit[cc2]; final int c3 = decode6bit[cc3]; final int c4 = decode6bit[cc4]; r[pos] = (byte) ((c1 << 2) | (c2 >> 4)); r[pos + 1] = (byte) (((c2 & 0x0F) << 4) | (c3 >> 2)); r[pos + 2] = (byte) (((c3 & 0x3) << 6) | c4); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/code/Base64Coder.java000066400000000000000000000261171312650303100251770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ // Copyright 2003-2010 Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland // www.source-code.biz, www.inventec.ch/chdh // // This module is multi-licensed and may be used under the terms // of any of the following licenses: // // EPL, Eclipse Public License, V1.0 or later, http://www.eclipse.org/legal // LGPL, GNU Lesser General Public License, V2.1 or later, http://www.gnu.org/licenses/lgpl.html // GPL, GNU General Public License, V2 or later, http://www.gnu.org/licenses/gpl.html // AGPL, GNU Affero General Public License V3 or later, http://www.gnu.org/licenses/agpl.html // AL, Apache License, V2.0 or later, http://www.apache.org/licenses // BSD, BSD License, http://www.opensource.org/licenses/bsd-license.php // MIT, MIT License, http://www.opensource.org/licenses/MIT // // Please contact the author if you need another license. // This module is provided "as is", without warranties of any kind. // // Project home page: www.source-code.biz/base64coder/java package net.sourceforge.plantuml.code; /** * A Base64 encoder/decoder. * *

* This class is used to encode and decode data in Base64 format as described in RFC 1521. *

* Project home page: www.source-code.biz/base64coder/java
* Author: Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland
* Multi-licensed: EPL / LGPL / GPL / AL / BSD / MIT. * * @author Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland, www.source-code.biz */ public class Base64Coder { // The line separator string of the operating system. private static final String systemLineSeparator = System.getProperty("line.separator"); // Mapping table from 6-bit nibbles to Base64 characters. private static final char[] map1 = new char[64]; static { int i = 0; for (char c = 'A'; c <= 'Z'; c++) map1[i++] = c; for (char c = 'a'; c <= 'z'; c++) map1[i++] = c; for (char c = '0'; c <= '9'; c++) map1[i++] = c; map1[i++] = '+'; map1[i++] = '/'; } // Mapping table from Base64 characters to 6-bit nibbles. private static final byte[] map2 = new byte[128]; static { for (int i = 0; i < map2.length; i++) map2[i] = -1; for (int i = 0; i < 64; i++) map2[map1[i]] = (byte) i; } /** * Encodes a string into Base64 format. No blanks or line breaks are inserted. * * @param s * A String to be encoded. * @return A String containing the Base64 encoded data. */ public static String encodeString(String s) { return new String(encode(s.getBytes())); } /** * Encodes a byte array into Base 64 format and breaks the output into lines of 76 characters. This method is * compatible with sun.misc.BASE64Encoder.encodeBuffer(byte[]). * * @param in * An array containing the data bytes to be encoded. * @return A String containing the Base64 encoded data, broken into lines. */ public static String encodeLines(byte[] in) { return encodeLines(in, 0, in.length, 76, systemLineSeparator); } /** * Encodes a byte array into Base 64 format and breaks the output into lines. * * @param in * An array containing the data bytes to be encoded. * @param iOff * Offset of the first byte in in to be processed. * @param iLen * Number of bytes to be processed in in, starting at iOff. * @param lineLen * Line length for the output data. Should be a multiple of 4. * @param lineSeparator * The line separator to be used to separate the output lines. * @return A String containing the Base64 encoded data, broken into lines. */ public static String encodeLines(byte[] in, int iOff, int iLen, int lineLen, String lineSeparator) { int blockLen = (lineLen * 3) / 4; if (blockLen <= 0) throw new IllegalArgumentException(); int lines = (iLen + blockLen - 1) / blockLen; int bufLen = ((iLen + 2) / 3) * 4 + lines * lineSeparator.length(); StringBuilder buf = new StringBuilder(bufLen); int ip = 0; while (ip < iLen) { int l = Math.min(iLen - ip, blockLen); buf.append(encode(in, iOff + ip, l)); buf.append(lineSeparator); ip += l; } return buf.toString(); } /** * Encodes a byte array into Base64 format. No blanks or line breaks are inserted in the output. * * @param in * An array containing the data bytes to be encoded. * @return A character array containing the Base64 encoded data. */ public static char[] encode(byte[] in) { return encode(in, 0, in.length); } /** * Encodes a byte array into Base64 format. No blanks or line breaks are inserted in the output. * * @param in * An array containing the data bytes to be encoded. * @param iLen * Number of bytes to process in in. * @return A character array containing the Base64 encoded data. */ public static char[] encode(byte[] in, int iLen) { return encode(in, 0, iLen); } /** * Encodes a byte array into Base64 format. No blanks or line breaks are inserted in the output. * * @param in * An array containing the data bytes to be encoded. * @param iOff * Offset of the first byte in in to be processed. * @param iLen * Number of bytes to process in in, starting at iOff. * @return A character array containing the Base64 encoded data. */ public static char[] encode(byte[] in, int iOff, int iLen) { int oDataLen = (iLen * 4 + 2) / 3; // output length without padding int oLen = ((iLen + 2) / 3) * 4; // output length including padding char[] out = new char[oLen]; int ip = iOff; int iEnd = iOff + iLen; int op = 0; while (ip < iEnd) { int i0 = in[ip++] & 0xff; int i1 = ip < iEnd ? in[ip++] & 0xff : 0; int i2 = ip < iEnd ? in[ip++] & 0xff : 0; int o0 = i0 >>> 2; int o1 = ((i0 & 3) << 4) | (i1 >>> 4); int o2 = ((i1 & 0xf) << 2) | (i2 >>> 6); int o3 = i2 & 0x3F; out[op++] = map1[o0]; out[op++] = map1[o1]; out[op] = op < oDataLen ? map1[o2] : '='; op++; out[op] = op < oDataLen ? map1[o3] : '='; op++; } return out; } /** * Decodes a string from Base64 format. No blanks or line breaks are allowed within the Base64 encoded input data. * * @param s * A Base64 String to be decoded. * @return A String containing the decoded data. * @throws IllegalArgumentException * If the input is not valid Base64 encoded data. */ public static String decodeString(String s) { return new String(decode(s)); } /** * Decodes a byte array from Base64 format and ignores line separators, tabs and blanks. CR, LF, Tab and Space * characters are ignored in the input data. This method is compatible with * sun.misc.BASE64Decoder.decodeBuffer(String). * * @param s * A Base64 String to be decoded. * @return An array containing the decoded data bytes. * @throws IllegalArgumentException * If the input is not valid Base64 encoded data. */ public static byte[] decodeLines(String s) { char[] buf = new char[s.length()]; int p = 0; for (int ip = 0; ip < s.length(); ip++) { char c = s.charAt(ip); if (c != ' ' && c != '\r' && c != '\n' && c != '\t') buf[p++] = c; } return decode(buf, 0, p); } /** * Decodes a byte array from Base64 format. No blanks or line breaks are allowed within the Base64 encoded input * data. * * @param s * A Base64 String to be decoded. * @return An array containing the decoded data bytes. * @throws IllegalArgumentException * If the input is not valid Base64 encoded data. */ public static byte[] decode(String s) { return decode(s.toCharArray()); } /** * Decodes a byte array from Base64 format. No blanks or line breaks are allowed within the Base64 encoded input * data. * * @param in * A character array containing the Base64 encoded data. * @return An array containing the decoded data bytes. * @throws IllegalArgumentException * If the input is not valid Base64 encoded data. */ public static byte[] decode(char[] in) { return decode(in, 0, in.length); } /** * Decodes a byte array from Base64 format. No blanks or line breaks are allowed within the Base64 encoded input * data. * * @param in * A character array containing the Base64 encoded data. * @param iOff * Offset of the first character in in to be processed. * @param iLen * Number of characters to process in in, starting at iOff. * @return An array containing the decoded data bytes. * @throws IllegalArgumentException * If the input is not valid Base64 encoded data. */ public static byte[] decode(char[] in, int iOff, int iLen) { if (iLen % 4 != 0) throw new IllegalArgumentException("Length of Base64 encoded input string is not a multiple of 4."); while (iLen > 0 && in[iOff + iLen - 1] == '=') iLen--; int oLen = (iLen * 3) / 4; byte[] out = new byte[oLen]; int ip = iOff; int iEnd = iOff + iLen; int op = 0; while (ip < iEnd) { int i0 = in[ip++]; int i1 = in[ip++]; int i2 = ip < iEnd ? in[ip++] : 'A'; int i3 = ip < iEnd ? in[ip++] : 'A'; if (i0 > 127 || i1 > 127 || i2 > 127 || i3 > 127) throw new IllegalArgumentException("Illegal character in Base64 encoded data."); int b0 = map2[i0]; int b1 = map2[i1]; int b2 = map2[i2]; int b3 = map2[i3]; if (b0 < 0 || b1 < 0 || b2 < 0 || b3 < 0) throw new IllegalArgumentException("Illegal character in Base64 encoded data."); int o0 = (b0 << 2) | (b1 >>> 4); int o1 = ((b1 & 0xf) << 4) | (b2 >>> 2); int o2 = ((b2 & 3) << 6) | b3; out[op++] = (byte) o0; if (op < oLen) out[op++] = (byte) o1; if (op < oLen) out[op++] = (byte) o2; } return out; } // Dummy constructor. private Base64Coder() { } } // end class Base64Coder plantuml-1.2017.15/src/net/sourceforge/plantuml/code/Compression.java000066400000000000000000000033671312650303100255010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.code; import java.io.IOException; public interface Compression { /** * Shrinks the given in array with length len * * @return a newly created array with the compressed data. */ byte[] compress(final byte[] in); /** * Grows the given in array with length len * compressed with the shrink method. * * @return a newly created array with the expanded data. */ byte[] decompress(byte[] in) throws IOException; }plantuml-1.2017.15/src/net/sourceforge/plantuml/code/CompressionGZip.java000066400000000000000000000046351312650303100262720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.code; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; public class CompressionGZip implements Compression { class MyGZIPOutputStream extends GZIPOutputStream { public MyGZIPOutputStream(OutputStream baos) throws IOException { super(baos); def.setLevel(9); } } public byte[] compress(byte[] in) { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { final GZIPOutputStream gz = new MyGZIPOutputStream(baos); gz.write(in); gz.close(); baos.close(); return baos.toByteArray(); } catch (IOException e) { throw new IllegalStateException(e.toString()); } } public byte[] decompress(byte[] in) throws IOException { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ByteArrayInputStream bais = new ByteArrayInputStream(in); final GZIPInputStream gz = new GZIPInputStream(bais); int read; while ((read = gz.read()) != -1) { baos.write(read); } gz.close(); bais.close(); baos.close(); return baos.toByteArray(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/code/CompressionHuffman.java000066400000000000000000000045631312650303100270050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.code; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.zip.Deflater; import java.util.zip.DeflaterOutputStream; import java.util.zip.InflaterInputStream; public class CompressionHuffman implements Compression { public byte[] compress(byte[] in) { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final Deflater deflater = new Deflater(Deflater.HUFFMAN_ONLY); deflater.setLevel(9); final DeflaterOutputStream gz = new DeflaterOutputStream(baos, deflater); try { gz.write(in); gz.close(); baos.close(); return baos.toByteArray(); } catch (IOException e) { throw new IllegalStateException(e.toString()); } } public byte[] decompress(byte[] in) throws IOException { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ByteArrayInputStream bais = new ByteArrayInputStream(in); final InflaterInputStream gz = new InflaterInputStream(bais); int read; while ((read = gz.read()) != -1) { baos.write(read); } gz.close(); bais.close(); baos.close(); return baos.toByteArray(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/code/CompressionNone.java000066400000000000000000000026611312650303100263150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.code; public class CompressionNone implements Compression { public byte[] compress(byte[] in) { return in; } public byte[] decompress(byte[] in) { return in; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/code/CompressionZlib.java000066400000000000000000000064541312650303100263220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.code; import java.io.IOException; import java.util.zip.DataFormatException; import java.util.zip.Deflater; import java.util.zip.Inflater; public class CompressionZlib implements Compression { private static final int COMPRESSION_LEVEL = 9; // private static final int COMPRESSION_LEVEL = 1; public byte[] compress(byte[] in) { if (in.length == 0) { return null; } int len = in.length * 2; if (len < 100) { len = 100; } byte[] result = null; while (result == null) { result = tryCompress(in, len); len *= 2; } return result; } private byte[] tryCompress(byte[] in, final int len) { // Compress the bytes final Deflater compresser = new Deflater(COMPRESSION_LEVEL, true); compresser.setInput(in); compresser.finish(); final byte[] output = new byte[len]; final int compressedDataLength = compresser.deflate(output); if (compresser.finished() == false) { return null; } final byte[] result = copyArray(output, compressedDataLength); return result; } public byte[] decompress(byte[] in) throws IOException { final byte in2[] = new byte[in.length + 256]; for (int i = 0; i < in.length; i++) { in2[i] = in[i]; } int len = in.length * 5; byte[] result = null; while (result == null) { result = tryDecompress(in2, len); len *= 2; } return result; } private byte[] tryDecompress(byte[] in, final int len) throws IOException { // Decompress the bytes final byte[] tmp = new byte[len]; final Inflater decompresser = new Inflater(true); decompresser.setInput(in); try { final int resultLength = decompresser.inflate(tmp); if (decompresser.finished() == false) { return null; } decompresser.end(); final byte[] result = copyArray(tmp, resultLength); return result; } catch (DataFormatException e) { // e.printStackTrace(); throw new IOException(e.toString()); } } private byte[] copyArray(final byte[] data, final int len) { final byte[] result = new byte[len]; for (int i = 0; i < result.length; i++) { result[i] = data[i]; } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/code/StringCompressor.java000066400000000000000000000026701312650303100265170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.code; import java.io.IOException; public interface StringCompressor { String compress(String s) throws IOException; String decompress(String compressed) throws IOException; }plantuml-1.2017.15/src/net/sourceforge/plantuml/code/StringCompressorNone.java000066400000000000000000000030201312650303100273250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.code; import java.io.IOException; public class StringCompressorNone implements StringCompressor { public String compress(String s) throws IOException { return s; } public String decompress(String stringAnnoted) throws IOException { return stringAnnoted; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/code/Transcoder.java000066400000000000000000000026671312650303100253060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.code; import java.io.IOException; public interface Transcoder { public String encode(String text) throws IOException; public String decode(String code) throws IOException; } plantuml-1.2017.15/src/net/sourceforge/plantuml/code/TranscoderImpl.java000066400000000000000000000047161312650303100261250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.code; import java.io.IOException; public class TranscoderImpl implements Transcoder { private final Compression compression; private final URLEncoder urlEncoder; private final StringCompressor stringCompressor; public TranscoderImpl() { this(new AsciiEncoder(), new StringCompressorNone(), new CompressionHuffman()); } public TranscoderImpl(URLEncoder urlEncoder, Compression compression) { this(urlEncoder, new ArobaseStringCompressor(), compression); } public TranscoderImpl(URLEncoder urlEncoder, StringCompressor stringCompressor, Compression compression) { this.compression = compression; this.urlEncoder = urlEncoder; this.stringCompressor = stringCompressor; } public String encode(String text) throws IOException { final String stringAnnoted = stringCompressor.compress(text); final byte[] data = stringAnnoted.getBytes("UTF-8"); final byte[] compressedData = compression.compress(data); return urlEncoder.encode(compressedData); } public String decode(String code) throws IOException { final byte compressedData[] = urlEncoder.decode(code); final byte data[] = compression.decompress(compressedData); return stringCompressor.decompress(new String(data, "UTF-8")); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/code/TranscoderSmart.java000066400000000000000000000034351312650303100263070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.code; import java.io.IOException; public class TranscoderSmart implements Transcoder { private final Transcoder oldOne = new TranscoderImpl(new AsciiEncoder(), new CompressionHuffman()); private final Transcoder zlib = new TranscoderImpl(new AsciiEncoder(), new CompressionZlib()); public String decode(String code) throws IOException { try { return zlib.decode(code); } catch (Exception ex) { return oldOne.decode(code); } } public String encode(String text) throws IOException { return zlib.encode(text); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/code/TranscoderUtil.java000066400000000000000000000026021312650303100261310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.code; public class TranscoderUtil { public static Transcoder getDefaultTranscoder() { return new TranscoderSmart(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/code/URLEncoder.java000066400000000000000000000025431312650303100251350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.code; public interface URLEncoder { String encode(byte data[]); byte[] decode(String s); }plantuml-1.2017.15/src/net/sourceforge/plantuml/command/000077500000000000000000000000001312650303100230305ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/command/BlocLines.java000066400000000000000000000156171312650303100255570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Iterator; import java.util.List; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.cucadiagram.Display; public class BlocLines implements Iterable { private List lines; @Override public String toString() { return lines.toString(); } private BlocLines(List lines) { this.lines = (List) Collections.unmodifiableList(lines); } public Display toDisplay() { return Display.create(lines); } public static BlocLines single(CharSequence single) { return new BlocLines(Arrays.asList(single)); } public static BlocLines getWithNewlines(CharSequence s) { return new BlocLines(BackSlash.getWithNewlines(s)); } public BlocLines() { this(new ArrayList()); } public BlocLines add2(CharSequence s) { final List copy = new ArrayList(lines); copy.add(s); return new BlocLines(copy); } public List getLines() { return lines; } public int size() { return lines.size(); } public CharSequence get499(int i) { return lines.get(i); } public CharSequence getFirst499() { return lines.get(0); } public CharSequence getLast499() { return lines.get(lines.size() - 1); } public BlocLines cleanList2(MultilinesStrategy strategy) { final List copy = new ArrayList(lines); strategy.cleanList(copy); return new BlocLines(copy); } public BlocLines trim(boolean removeEmptyLines) { final List copy = new ArrayList(lines); for (int i = 0; i < copy.size(); i++) { final CharSequence s = copy.get(i); copy.set(i, StringUtils.trin(s)); } if (removeEmptyLines) { for (final Iterator it = copy.iterator(); it.hasNext();) { if (it.next().length() == 0) { it.remove(); } } } return new BlocLines(copy); } public BlocLines removeEmptyColumns() { if (firstColumnRemovable(lines) == false) { return this; } final List copy = new ArrayList(lines); do { for (int i = 0; i < copy.size(); i++) { final CharSequence s = copy.get(i); if (s.length() > 0) { copy.set(i, s.subSequence(1, s.length())); } } } while (firstColumnRemovable(copy)); return new BlocLines(copy); } private static boolean firstColumnRemovable(List data) { boolean allEmpty = true; for (CharSequence s : data) { if (s.length() == 0) { continue; } allEmpty = false; final char c = s.charAt(0); if (c != ' ' && c != '\t') { return false; } } return allEmpty == false; } public char getLastChar() { final CharSequence s = lines.get(lines.size() - 1); return s.charAt(s.length() - 1); } public BlocLines removeStartingAndEnding2(String data) { if (lines.size() == 0) { return this; } final List copy = new ArrayList(lines); copy.set(0, data); final int n = copy.size() - 1; final CharSequence s = copy.get(n); copy.set(n, s.subSequence(0, s.length() - 1)); return new BlocLines(copy); } public BlocLines toSingleLineWithHiddenNewLine() { final StringBuilder sb = new StringBuilder(); for (CharSequence line : lines) { sb.append(line); sb.append(BackSlash.hiddenNewLine()); } return single(sb.substring(0, sb.length() - 1)); } public BlocLines trimSmart(int referenceLine) { if (lines.size() <= referenceLine) { return this; } final List copy = new ArrayList(lines); final int nbStartingSpace = nbStartingSpace(copy.get(referenceLine)); for (int i = referenceLine; i < copy.size(); i++) { final CharSequence s = copy.get(i); copy.set(i, removeStartingSpaces(s, nbStartingSpace)); } return new BlocLines(copy); } private static int nbStartingSpace(CharSequence s) { int nb = 0; while (nb < s.length() && isSpaceOrTab(s.charAt(nb))) { nb++; } return nb; } private static boolean isSpaceOrTab(char c) { return c == ' ' || c == '\t'; } private static CharSequence removeStartingSpaces(CharSequence arg, int nbStartingSpace) { if (arg.length() == 0) { return arg; } int i = 0; while (i < nbStartingSpace && i < arg.length() && isSpaceOrTab(arg.charAt(i))) { i++; } if (i == 0) { return arg; } return arg.subSequence(i, arg.length()); } public BlocLines subExtract(int start, int end) { List copy = new ArrayList(lines); copy = copy.subList(start, copy.size() - end); return new BlocLines(copy); } public Iterator iterator() { return lines.iterator(); } public BlocLines removeComments() { final List copy = new ArrayList(); boolean inComment = false; for (CharSequence cs : lines) { if (inComment == false && MyPattern.mtches(cs, CommandMultilinesComment.COMMENT_SINGLE_LINE)) { continue; } if (inComment == false && MyPattern.mtches(cs, CommandMultilinesComment.COMMENT_MULTILINE_START)) { inComment = true; continue; } if (inComment && MyPattern.mtches(cs, CommandMultilinesComment.COMMENT_MULTILINE_END)) { inComment = false; continue; } if (inComment == false) { copy.add(cs); } } return new BlocLines(copy); } public BlocLines removeInnerComments() { final List copy = new ArrayList(); for (CharSequence cs : lines) { copy.add(MyPattern.removeAll(cs, CommandMultilinesComment.INNER_COMMENT)); } return new BlocLines(copy); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/Command.java000066400000000000000000000027641312650303100252620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.core.Diagram; public interface Command { CommandExecutionResult execute(D diagram, BlocLines lines); CommandControl isValid(BlocLines lines); String[] getDescription(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandAffineTransform.java000066400000000000000000000034031312650303100302560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.UmlDiagram; public class CommandAffineTransform extends SingleLineCommand { public CommandAffineTransform() { super("(?i)^!transformation[%s]+([^{}]*)$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { final CharSequence value = arg.get(0); diagram.setAnimation(Collections.singletonList(value)); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandAffineTransformMultiline.java000066400000000000000000000034021312650303100321400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.UmlDiagram; public class CommandAffineTransformMultiline extends CommandMultilines { public CommandAffineTransformMultiline() { super("(?i)^!transformation[%s]+\\{[%s]*$"); } @Override public String getPatternEnd() { return "(?i)^[%s]*!\\}[%s]*$"; } public CommandExecutionResult execute(final UmlDiagram diagram, BlocLines lines) { lines = lines.subExtract(1, 1); diagram.setAnimation(lines); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandCaption.java000066400000000000000000000037771312650303100266050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.VerticalAlignment; public class CommandCaption extends SingleLineCommand { public CommandCaption() { super("(?i)^caption(?:[%s]*:[%s]*|[%s]+)(.*[\\p{L}0-9_.].*)$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { diagram.setCaption(new DisplayPositionned(Display.getWithNewlines(arg.get(0)), HorizontalAlignment.CENTER, VerticalAlignment.BOTTOM)); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandComment.java000066400000000000000000000031671312650303100266030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.core.Diagram; public class CommandComment extends SingleLineCommand { public CommandComment() { super(CommandMultilinesComment.COMMENT_SINGLE_LINE); } @Override protected CommandExecutionResult executeArg(Diagram diagram, List arg) { return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandControl.java000066400000000000000000000025061312650303100266150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; public enum CommandControl { OK, NOT_OK, OK_PARTIAL } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandDecoratorMultine.java000066400000000000000000000052041312650303100304530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.core.Diagram; public class CommandDecoratorMultine implements Command { private final SingleLineCommand2 cmd; private final boolean removeEmptyColumn; private final int nbMaxLines; public CommandDecoratorMultine(SingleLineCommand2 cmd, int nbMaxLines) { this(cmd, false, nbMaxLines); } public CommandDecoratorMultine(SingleLineCommand2 cmd, boolean removeEmptyColumn, int nbMaxLines) { this.cmd = cmd; this.removeEmptyColumn = removeEmptyColumn; this.nbMaxLines = nbMaxLines; } public CommandExecutionResult execute(D diagram, BlocLines lines) { if (removeEmptyColumn) { lines = lines.removeEmptyColumns(); } lines = lines.toSingleLineWithHiddenNewLine(); return cmd.execute(diagram, lines); } public CommandControl isValid(BlocLines lines) { if (cmd.isCommandForbidden()) { return CommandControl.NOT_OK; } lines = lines.toSingleLineWithHiddenNewLine(); if (cmd.isForbidden(lines.getFirst499())) { return CommandControl.NOT_OK; } final CommandControl tmp = cmd.isValid(lines); if (tmp == CommandControl.OK_PARTIAL) { throw new IllegalStateException(); } if (tmp == CommandControl.OK) { return tmp; } return CommandControl.OK_PARTIAL; } public String[] getDescription() { return cmd.getDescription(); } public int getNbMaxLines() { return nbMaxLines; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandEndPackage.java000066400000000000000000000037111312650303100271560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.cucadiagram.EntityUtils; import net.sourceforge.plantuml.cucadiagram.IGroup; public class CommandEndPackage extends SingleLineCommand { public CommandEndPackage() { super("(?i)^\\}$"); } @Override protected CommandExecutionResult executeArg(AbstractEntityDiagram diagram, List arg) { final IGroup currentPackage = diagram.getCurrentGroup(); if (EntityUtils.groupRoot(currentPackage)) { return CommandExecutionResult.error("No package or namespace defined"); } diagram.endGroup(); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandExecutionResult.java000066400000000000000000000063441312650303100303430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.AbstractPSystem; public class CommandExecutionResult { private final String error; private final AbstractPSystem newDiagram; private final List debugLines; private CommandExecutionResult(String error, AbstractPSystem newDiagram, List debugLines) { this.error = error; this.newDiagram = newDiagram; this.debugLines = debugLines; } public CommandExecutionResult withDiagram(AbstractPSystem newDiagram) { return new CommandExecutionResult(error, newDiagram, null); } @Override public String toString() { return super.toString() + " " + error; } public static CommandExecutionResult newDiagram(AbstractPSystem result) { return new CommandExecutionResult(null, result, null); } public static CommandExecutionResult ok() { return new CommandExecutionResult(null, null, null); } public static CommandExecutionResult error(String error) { return new CommandExecutionResult(error, null, null); } public static CommandExecutionResult error(String error, Throwable t) { return new CommandExecutionResult(error, null, getStackTrace(t)); } public static List getStackTrace(Throwable exception) { final List result = new ArrayList(); result.add(exception.toString()); for (StackTraceElement ste : exception.getStackTrace()) { result.add(" " + ste.toString()); } if (exception.getCause() != null) { final Throwable cause = exception.getCause(); result.add(" "); result.add("Caused by " + cause.toString()); for (StackTraceElement ste : cause.getStackTrace()) { result.add(" " + ste.toString()); } } return result; } public boolean isOk() { return error == null; } public String getError() { if (isOk()) { throw new IllegalStateException(); } return error; } public AbstractPSystem getNewDiagram() { return newDiagram; } public List getDebugLines() { return debugLines; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandFootboxIgnored.java000066400000000000000000000031731312650303100301260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.UmlDiagram; public class CommandFootboxIgnored extends SingleLineCommand { public CommandFootboxIgnored() { super("(?i)^(hide|show)?[%s]*footbox$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandFooter.java000066400000000000000000000041421312650303100264310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.VerticalAlignment; public class CommandFooter extends SingleLineCommand { public CommandFooter() { super("(?i)^(?:(left|right|center)?[%s]*)footer(?:[%s]*:[%s]*|[%s]+)(.*[\\p{L}0-9_.].*)$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { final String align = arg.get(0); diagram.setFooter(new DisplayPositionned(Display.getWithNewlines(arg.get(1)), HorizontalAlignment.fromString( align, HorizontalAlignment.CENTER), VerticalAlignment.BOTTOM)); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandHeader.java000066400000000000000000000041361312650303100263660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.VerticalAlignment; public class CommandHeader extends SingleLineCommand { public CommandHeader() { super("(?i)^(?:(left|right|center)?[%s]*)header(?:[%s]*:[%s]*|[%s]+)(.*[\\p{L}0-9_.].*)$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { final String align = arg.get(0); diagram.setHeader(new DisplayPositionned(Display.getWithNewlines(arg.get(1)), HorizontalAlignment.fromString( align, HorizontalAlignment.RIGHT), VerticalAlignment.TOP)); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandHideUnlinked.java000066400000000000000000000032741312650303100275430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.UmlDiagram; public class CommandHideUnlinked extends SingleLineCommand { public CommandHideUnlinked() { super("(?i)^(hide|show)[%s]+unlinked$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { diagram.setHideUnlinkedData(arg.get(0).equalsIgnoreCase("hide")); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandMinwidth.java000066400000000000000000000033001312650303100267510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.UmlDiagram; public class CommandMinwidth extends SingleLineCommand { public CommandMinwidth() { super("(?i)^minwidth[%s]+(\\d+)$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram system, List arg) { final int minwidth = Integer.parseInt(arg.get(0)); system.setMinwidth(minwidth); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandMultilines.java000066400000000000000000000054311312650303100273220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.core.Diagram; public abstract class CommandMultilines implements Command { private final Pattern2 starting; public CommandMultilines(String patternStart) { if (patternStart.startsWith("(?i)^") == false || patternStart.endsWith("$") == false) { throw new IllegalArgumentException("Bad pattern " + patternStart); } this.starting = MyPattern.cmpile(patternStart); } public abstract String getPatternEnd(); public String[] getDescription() { return new String[] { "START: " + starting.pattern(), "END: " + getPatternEnd() }; } final public CommandControl isValid(BlocLines lines) { if (isCommandForbidden()) { return CommandControl.NOT_OK; } Matcher2 m1 = starting.matcher(StringUtils.trin(lines.getFirst499())); if (m1.matches() == false) { return CommandControl.NOT_OK; } if (lines.size() == 1) { return CommandControl.OK_PARTIAL; } m1 = MyPattern.cmpile(getPatternEnd()).matcher(StringUtils.trin(lines.getLast499())); if (m1.matches() == false) { return CommandControl.OK_PARTIAL; } actionIfCommandValid(); return CommandControl.OK; } protected boolean isCommandForbidden() { return false; } protected void actionIfCommandValid() { } protected final Pattern2 getStartingPattern() { return starting; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandMultilines2.java000066400000000000000000000063121312650303100274030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.core.Diagram; public abstract class CommandMultilines2 implements Command { private final RegexConcat starting; private final MultilinesStrategy strategy; public CommandMultilines2(RegexConcat patternStart, MultilinesStrategy strategy) { if (patternStart.getPattern().startsWith("^") == false || patternStart.getPattern().endsWith("$") == false) { throw new IllegalArgumentException("Bad pattern " + patternStart.getPattern()); } this.strategy = strategy; this.starting = patternStart; } public abstract String getPatternEnd(); public String[] getDescription() { return new String[] { "START: " + starting.getPattern(), "END: " + getPatternEnd() }; } final public CommandControl isValid(BlocLines lines) { lines = lines.cleanList2(strategy); if (isCommandForbidden()) { return CommandControl.NOT_OK; } final boolean result1 = starting.match(StringUtils.trin(lines.getFirst499())); if (result1 == false) { return CommandControl.NOT_OK; } if (lines.size() == 1) { return CommandControl.OK_PARTIAL; } final Matcher2 m1 = MyPattern.cmpile(getPatternEnd()).matcher(StringUtils.trinNoTrace(lines.getLast499())); if (m1.matches() == false) { return CommandControl.OK_PARTIAL; } actionIfCommandValid(); return CommandControl.OK; } public final CommandExecutionResult execute(S system, BlocLines lines) { lines = lines.cleanList2(strategy); return executeNow(system, lines); } public abstract CommandExecutionResult executeNow(S system, BlocLines lines); protected boolean isCommandForbidden() { return false; } protected void actionIfCommandValid() { } protected final RegexConcat getStartingPattern() { return starting; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandMultilines3.java000066400000000000000000000061751312650303100274130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.core.Diagram; public abstract class CommandMultilines3 implements Command { private final RegexConcat starting; private final MultilinesStrategy strategy; public CommandMultilines3(RegexConcat patternStart, MultilinesStrategy strategy) { if (patternStart.getPattern().startsWith("^") == false || patternStart.getPattern().endsWith("$") == false) { throw new IllegalArgumentException("Bad pattern " + patternStart.getPattern()); } this.strategy = strategy; this.starting = patternStart; } public abstract RegexConcat getPatternEnd2(); public String[] getDescription() { return new String[] { "START: " + starting.getPattern(), "END: " + getPatternEnd2().getPattern() }; } final public CommandControl isValid(BlocLines lines) { lines = lines.cleanList2(strategy); if (isCommandForbidden()) { return CommandControl.NOT_OK; } final boolean result1 = starting.match(StringUtils.trin(lines.getFirst499())); if (result1 == false) { return CommandControl.NOT_OK; } if (lines.size() == 1) { return CommandControl.OK_PARTIAL; } final String potentialLast = StringUtils.trinNoTrace(lines.getLast499()); final boolean m1 = getPatternEnd2().match(potentialLast); if (m1 == false) { return CommandControl.OK_PARTIAL; } actionIfCommandValid(); return CommandControl.OK; } public final CommandExecutionResult execute(S system, BlocLines lines) { lines = lines.cleanList2(strategy); return executeNow(system, lines); } public abstract CommandExecutionResult executeNow(S system, BlocLines lines); protected boolean isCommandForbidden() { return false; } protected void actionIfCommandValid() { } protected final RegexConcat getStartingPattern() { return starting; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandMultilinesBracket.java000066400000000000000000000060511312650303100306150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.core.Diagram; public abstract class CommandMultilinesBracket implements Command { private final Pattern2 starting; public CommandMultilinesBracket(String patternStart) { if (patternStart.startsWith("(?i)^") == false || patternStart.endsWith("$") == false) { throw new IllegalArgumentException("Bad pattern " + patternStart); } this.starting = MyPattern.cmpile(patternStart); } protected boolean isCommandForbidden() { return false; } public String[] getDescription() { return new String[] { "BRACKET: " + starting.pattern() }; } protected void actionIfCommandValid() { } protected final Pattern2 getStartingPattern() { return starting; } final public CommandControl isValid(BlocLines lines) { if (isCommandForbidden()) { return CommandControl.NOT_OK; } final Matcher2 m1 = starting.matcher(StringUtils.trin(lines.getFirst499())); if (m1.matches() == false) { return CommandControl.NOT_OK; } if (lines.size() == 1) { return CommandControl.OK_PARTIAL; } int level = 1; for (CharSequence cs : lines.subExtract(1, 0)) { final String s = StringUtils.trin(cs); if (isLineConsistent(s, level) == false) { return CommandControl.NOT_OK; } if (s.endsWith("{")) { level++; } if (s.endsWith("}")) { level--; } if (level < 0) { return CommandControl.NOT_OK; } } if (level != 0) { return CommandControl.OK_PARTIAL; } actionIfCommandValid(); return CommandControl.OK; } protected abstract boolean isLineConsistent(String line, int level); } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandMultilinesComment.java000066400000000000000000000037571312650303100306560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.core.Diagram; public class CommandMultilinesComment extends CommandMultilines { public static final String COMMENT_MULTILINE_START = "(?i)^[%s]*/[%q]([^%q]|[%q][^/])*$"; public static final String COMMENT_MULTILINE_END = "(?i)^([^%q]|[%q][^/])*[%q]/[%s]*$"; public static final String COMMENT_SINGLE_LINE = "(?i)^[%s]*([%q].*||/[%q].*[%q]/[%s]*)$"; public static final String INNER_COMMENT = "/[%q].*?[%q]/"; public CommandMultilinesComment() { super(COMMENT_MULTILINE_START); } @Override public String getPatternEnd() { return COMMENT_MULTILINE_END; } public CommandExecutionResult execute(final Diagram diagram, BlocLines lines) { return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandMultilinesFooter.java000066400000000000000000000050511312650303100304770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.VerticalAlignment; public class CommandMultilinesFooter extends CommandMultilines { public CommandMultilinesFooter() { super("(?i)^(?:(left|right|center)?[%s]*)footer$"); } @Override public String getPatternEnd() { return "(?i)^end[%s]?footer$"; } public CommandExecutionResult execute(final UmlDiagram diagram, BlocLines lines) { lines = lines.trim(false); final Matcher2 m = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); if (m.find() == false) { throw new IllegalStateException(); } final String align = m.group(1); lines = lines.subExtract(1, 1); final Display strings = lines.toDisplay(); if (strings.size() > 0) { diagram.setFooter(new DisplayPositionned(strings, HorizontalAlignment.fromString(align, HorizontalAlignment.CENTER), VerticalAlignment.BOTTOM)); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("Empty footer"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandMultilinesHeader.java000066400000000000000000000050451312650303100304340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.VerticalAlignment; public class CommandMultilinesHeader extends CommandMultilines { public CommandMultilinesHeader() { super("(?i)^(?:(left|right|center)?[%s]*)header$"); } @Override public String getPatternEnd() { return "(?i)^end[%s]?header$"; } public CommandExecutionResult execute(final UmlDiagram diagram, BlocLines lines) { lines = lines.trim(false); final Matcher2 m = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); if (m.find() == false) { throw new IllegalStateException(); } final String align = m.group(1); lines = lines.subExtract(1, 1); final Display strings = lines.toDisplay(); if (strings.size() > 0) { diagram.setHeader(new DisplayPositionned(strings, HorizontalAlignment.fromString(align, HorizontalAlignment.RIGHT), VerticalAlignment.TOP)); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("Empty header"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandMultilinesLegend.java000066400000000000000000000062201312650303100304360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.VerticalAlignment; public class CommandMultilinesLegend extends CommandMultilines2 { public CommandMultilinesLegend() { super(getRegexConcat(), MultilinesStrategy.REMOVE_STARTING_QUOTE); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("legend"), // new RegexLeaf("VALIGN", "(?:[%s]+(top|bottom))?"), // new RegexLeaf("ALIGN", "(?:[%s]+(left|right|center))?"), // new RegexLeaf("$")); } @Override public String getPatternEnd() { return "(?i)^end[%s]?legend$"; } @Override public CommandExecutionResult executeNow(UmlDiagram diagram, BlocLines lines) { lines = lines.trimSmart(1); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); final String align = line0.get("ALIGN", 0); final String valign = line0.get("VALIGN", 0); lines = lines.subExtract(1, 1); lines = lines.removeEmptyColumns(); final Display strings = lines.toDisplay(); if (strings.size() > 0) { final VerticalAlignment valignment = VerticalAlignment.fromString(valign); HorizontalAlignment alignment = HorizontalAlignment.fromString(align); if (alignment == null) { alignment = HorizontalAlignment.CENTER; } diagram.setLegend(new DisplayPositionned(strings, alignment, valignment)); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("No legend defined"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandMultilinesTitle.java000066400000000000000000000042761312650303100303320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.VerticalAlignment; public class CommandMultilinesTitle extends CommandMultilines { public CommandMultilinesTitle() { super("(?i)^title$"); } @Override public String getPatternEnd() { return "(?i)^end[%s]?title$"; } public CommandExecutionResult execute(final UmlDiagram diagram, BlocLines lines) { lines = lines.subExtract(1, 1); lines = lines.removeEmptyColumns(); final Display strings = lines.toDisplay(); if (strings.size() > 0) { diagram.setTitle(new DisplayPositionned(strings, HorizontalAlignment.CENTER, VerticalAlignment.TOP)); return CommandExecutionResult.ok(); } return CommandExecutionResult.error("No title defined"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandNamespace.java000066400000000000000000000070721312650303100270740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; public class CommandNamespace extends SingleLineCommand2 { public CommandNamespace() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^namespace[%s]+"), // new RegexLeaf("NAME", "([\\p{L}0-9_][\\p{L}0-9_.:\\\\]*)"), // new RegexLeaf("[%s]*"), // new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("[%s]*"), // ColorParser.exp1(), // new RegexLeaf("[%s]*\\{$")); } @Override protected CommandExecutionResult executeArg(ClassDiagram diagram, RegexResult arg) { final Code code = Code.of(arg.get("NAME", 0)); final IGroup currentPackage = diagram.getCurrentGroup(); final IEntity p = diagram.getOrCreateNamespace(code, Display.getWithNewlines(code), GroupType.PACKAGE, currentPackage); final String stereotype = arg.get("STEREOTYPE", 0); if (stereotype != null) { p.setStereotype(new Stereotype(stereotype)); } final String urlString = arg.get("URL", 0); if (urlString != null) { final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); final Url url = urlBuilder.getUrl(urlString); p.addUrl(url); } final String color = arg.get("COLOR", 0); if (color != null) { p.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(color)); } return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandNope.java000066400000000000000000000031211312650303100260700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.core.Diagram; public class CommandNope extends SingleLineCommand { public CommandNope() { super("(?i)^[%s]*$"); } @Override protected CommandExecutionResult executeArg(Diagram diagram, List arg) { return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandPackage.java000066400000000000000000000110601312650303100265230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.utils.UniqueSequence; public class CommandPackage extends SingleLineCommand2 { public CommandPackage() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("TYPE", "(package|together)"), // new RegexLeaf("[%s]+"), // new RegexLeaf("NAME", "([%g][^%g]+[%g]|[^#%s{}]*)"), // new RegexLeaf("AS", "(?:[%s]+as[%s]+([\\p{L}0-9_.]+))?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("[%s]*"), // color().getRegex(), // new RegexLeaf("[%s]*\\{$")); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } @Override protected CommandExecutionResult executeArg(AbstractEntityDiagram diagram, RegexResult arg) { final Code code; final String display; final String name = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get("NAME", 0)); if (arg.get("AS", 0) == null) { if (name.length() == 0) { code = Code.of("##" + UniqueSequence.getValue()); display = null; } else { code = Code.of(name); display = code.getFullName(); } } else { display = name; code = Code.of(arg.get("AS", 0)); } final IGroup currentPackage = diagram.getCurrentGroup(); final IEntity p = diagram.getOrCreateGroup(code, Display.getWithNewlines(display), GroupType.PACKAGE, currentPackage); final String stereotype = arg.get("STEREOTYPE", 0); final USymbol type = USymbol.getFromString(arg.get("TYPE", 0)); if (type == USymbol.TOGETHER) { p.setUSymbol(type); } else if (stereotype != null) { final USymbol usymbol = USymbol.getFromString(stereotype); if (usymbol == null) { p.setStereotype(new Stereotype(stereotype)); } else { p.setUSymbol(usymbol); } } final String urlString = arg.get("URL", 0); if (urlString != null) { final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); final Url url = urlBuilder.getUrl(urlString); p.addUrl(url); } final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); p.setColors(colors); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandPackageEmpty.java000066400000000000000000000060471312650303100275530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.utils.UniqueSequence; public class CommandPackageEmpty extends SingleLineCommand { public CommandPackageEmpty() { super( "(?i)^package[%s]+([%g][^%g]+[%g]|[^#%s{}]*)(?:[%s]+as[%s]+([\\p{L}0-9_.]+))?[%s]*(#[0-9a-fA-F]{6}|#?\\w+)?[%s]*\\{[%s]*\\}$"); } @Override protected CommandExecutionResult executeArg(AbstractEntityDiagram diagram, List arg) { final Code code; final String display; if (arg.get(1) == null) { if (StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get(0)).length() == 0) { code = Code.of("##" + UniqueSequence.getValue()); display = null; } else { code = Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get(0))); display = code.getFullName(); } } else { display = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get(0)); code = Code.of(arg.get(1)); } final IGroup currentPackage = diagram.getCurrentGroup(); final IEntity p = diagram.getOrCreateGroup(code, Display.getWithNewlines(display), GroupType.PACKAGE, currentPackage); final String color = arg.get(2); if (color != null) { p.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(color)); } diagram.endGroup(); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandPage.java000066400000000000000000000037351312650303100260560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; public class CommandPage extends SingleLineCommand { public CommandPage() { super("(?i)^page[%s]+(\\d+)[%s]*x[%s]*(\\d+)$"); } @Override protected CommandExecutionResult executeArg(AbstractEntityDiagram classDiagram, List arg) { final int horizontal = Integer.parseInt(arg.get(0)); final int vertical = Integer.parseInt(arg.get(1)); if (horizontal <= 0 || vertical <= 0) { return CommandExecutionResult.error("Argument must be positive"); } classDiagram.setHorizontalPages(horizontal); classDiagram.setVerticalPages(vertical); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandPragma.java000066400000000000000000000040761312650303100264100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagram; public class CommandPragma extends SingleLineCommand { public CommandPragma() { super("(?i)^!pragma[%s]+([A-Za-z_][A-Za-z_0-9]*)(?:[%s]+(.*))?$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram system, List arg) { final String name = StringUtils.goLowerCase(arg.get(0)); final String value = arg.get(1); system.getPragma().define(name, value); if (name.equalsIgnoreCase("graphviz_dot") && value.equalsIgnoreCase("jdot")) { system.setUseJDot(true); } else if (name.equalsIgnoreCase("graphviz_dot")) { system.setDotExecutable(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(value)); } return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandRankDir.java000066400000000000000000000037431312650303100265330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.SkinParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.Rankdir; public class CommandRankDir extends SingleLineCommand { public CommandRankDir() { super("(?i)^(left[%s]to[%s]right|top[%s]to[%s]bottom)[%s]+direction$"); } @Override protected CommandExecutionResult executeArg(CucaDiagram diagram, List arg) { final String s = StringUtils.goUpperCase(arg.get(0)).replace(' ', '_'); ((SkinParam) diagram.getSkinParam()).setRankdir(Rankdir.valueOf(s)); // diagram.setRankdir(Rankdir.valueOf(s)); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandRotate.java000066400000000000000000000031701312650303100264310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.UmlDiagram; public class CommandRotate extends SingleLineCommand { public CommandRotate() { super("(?i)^rotate$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { diagram.setRotation(true); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandScale.java000066400000000000000000000035241312650303100262250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.ScaleSimple; import net.sourceforge.plantuml.UmlDiagram; public class CommandScale extends SingleLineCommand { public CommandScale() { super("(?i)^scale[%s]+([0-9.]+)(?:[%s]*/[%s]*([0-9.]+))?$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { double scale = Double.parseDouble(arg.get(0)); if (arg.get(1) != null) { scale /= Double.parseDouble(arg.get(1)); } diagram.setScale(new ScaleSimple(scale)); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandScaleMaxHeight.java000066400000000000000000000034421312650303100300230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.ScaleMaxHeight; import net.sourceforge.plantuml.UmlDiagram; public class CommandScaleMaxHeight extends SingleLineCommand { public CommandScaleMaxHeight() { super("(?i)^scale[%s]+max[%s]+([0-9.]+)[%s]+height$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { final double height = Double.parseDouble(arg.get(0)); diagram.setScale(new ScaleMaxHeight(height)); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandScaleMaxWidth.java000066400000000000000000000034331312650303100276720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.ScaleMaxWidth; import net.sourceforge.plantuml.UmlDiagram; public class CommandScaleMaxWidth extends SingleLineCommand { public CommandScaleMaxWidth() { super("(?i)^scale[%s]+max[%s]+([0-9.]+)[%s]+width$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { final double width = Double.parseDouble(arg.get(0)); diagram.setScale(new ScaleMaxWidth(width)); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandScaleMaxWidthAndHeight.java000066400000000000000000000036141312650303100314470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.ScaleMaxWidthAndHeight; import net.sourceforge.plantuml.UmlDiagram; public class CommandScaleMaxWidthAndHeight extends SingleLineCommand { public CommandScaleMaxWidthAndHeight() { super("(?i)^scale[%s]+max[%s]+([0-9.]+)[%s]*[*x][%s]*([0-9.]+)$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { final double width = Double.parseDouble(arg.get(0)); final double height = Double.parseDouble(arg.get(1)); diagram.setScale(new ScaleMaxWidthAndHeight(width, height)); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandScaleWidthAndHeight.java000066400000000000000000000035701312650303100310020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.ScaleWidthAndHeight; import net.sourceforge.plantuml.UmlDiagram; public class CommandScaleWidthAndHeight extends SingleLineCommand { public CommandScaleWidthAndHeight() { super("(?i)^scale[%s]+([0-9.]+)[%s]*[*x][%s]*([0-9.]+)$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { final double width = Double.parseDouble(arg.get(0)); final double height = Double.parseDouble(arg.get(1)); diagram.setScale(new ScaleWidthAndHeight(width, height)); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandScaleWidthOrHeight.java000066400000000000000000000037241312650303100306610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.ScaleHeight; import net.sourceforge.plantuml.ScaleWidth; import net.sourceforge.plantuml.UmlDiagram; public class CommandScaleWidthOrHeight extends SingleLineCommand { public CommandScaleWidthOrHeight() { super("(?i)^scale[%s]+([0-9.]+)[%s]+(width|height)$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { final double size = Double.parseDouble(arg.get(0)); final boolean width = "width".equalsIgnoreCase(arg.get(1)); if (width) { diagram.setScale(new ScaleWidth(size)); } else { diagram.setScale(new ScaleHeight(size)); } return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandSkinParam.java000066400000000000000000000033671312650303100270700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.UmlDiagram; public class CommandSkinParam extends SingleLineCommand { public CommandSkinParam() { super("(?i)^(skinparam|skinparamlocked)[%s]+([\\w.]*(?:\\<\\<.*\\>\\>)?[\\w.]*)[%s]+([^{}]*)$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { arg.get(0).endsWith("locked"); diagram.setParam(arg.get(1), arg.get(2)); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandSkinParamMultilines.java000066400000000000000000000073101312650303100311260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; public class CommandSkinParamMultilines extends CommandMultilinesBracket { static class Context { private List strings = new ArrayList(); public void push(String s) { strings.add(s); } public void pop() { strings.remove(strings.size() - 1); } public String getFullParam() { final StringBuilder sb = new StringBuilder(); for (String s : strings) { sb.append(s); } return sb.toString(); } } private final static Pattern2 p1 = MyPattern .cmpile("^([\\w.]*(?:\\<\\<.*\\>\\>)?[\\w.]*)[%s]+(?:(\\{)|(.*))$|^\\}?$"); public CommandSkinParamMultilines() { super("(?i)^skinparam[%s]*(?:[%s]+([\\w.]*(?:\\<\\<.*\\>\\>)?[\\w.]*))?[%s]*\\{$"); } @Override protected boolean isLineConsistent(String line, int level) { line = StringUtils.trin(line); if (hasStartingQuote(line)) { return true; } return p1.matcher(line).matches(); } private boolean hasStartingQuote(CharSequence line) { // return MyPattern.mtches(line, "[%s]*[%q].*"); return MyPattern.mtches(line, CommandMultilinesComment.COMMENT_SINGLE_LINE); } public CommandExecutionResult execute(UmlDiagram diagram, BlocLines lines) { final Context context = new Context(); final Matcher2 mStart = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); if (mStart.find() == false) { throw new IllegalStateException(); } if (mStart.group(1) != null) { context.push(mStart.group(1)); } lines = lines.subExtract(1, 1); lines = lines.removeComments(); lines = lines.trim(true); for (CharSequence s : lines) { assert s.length() > 0; // if (hasStartingQuote(s)) { // continue; // } if (s.toString().equals("}")) { context.pop(); continue; } final Matcher2 m = p1.matcher(s); if (m.find() == false) { throw new IllegalStateException(); } if (m.group(2) != null) { context.push(m.group(1)); } else if (m.group(3) != null) { final String key = context.getFullParam() + m.group(1); diagram.setParam(key, m.group(3)); } else { throw new IllegalStateException("." + s.toString() + "."); } } return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandSpriteFile.java000066400000000000000000000110541312650303100272410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import javax.imageio.ImageIO; import net.sourceforge.plantuml.FileSystem; import net.sourceforge.plantuml.FileUtils; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.ugraphic.sprite.Sprite; import net.sourceforge.plantuml.ugraphic.sprite.SpriteImage; import net.sourceforge.plantuml.ugraphic.sprite.SpriteSvg; public class CommandSpriteFile extends SingleLineCommand2 { public CommandSpriteFile() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("sprite[%s]+\\$?"), // new RegexLeaf("NAME", "([\\p{L}0-9_]+)[%s]*"), // new RegexLeaf("[%s]+"), // new RegexLeaf("FILE", "(.*)"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(UmlDiagram system, RegexResult arg) { final String src = arg.get("FILE", 0); final Sprite sprite; try { if (src.startsWith("jar:")) { final String inner = src.substring(4) + ".png"; final InputStream is = SpriteImage.getInternalSprite(inner); if (is == null) { return CommandExecutionResult.error("No such internal sprite: " + inner); } sprite = new SpriteImage(ImageIO.read(is)); } else if (src.contains("~")) { final int idx = src.lastIndexOf("~"); final File f = FileSystem.getInstance().getFile(src.substring(0, idx)); if (f.exists() == false) { return CommandExecutionResult.error("File does not exist: " + src); } final String name = src.substring(idx + 1); sprite = getImageFromZip(f, name); if (sprite == null) { return CommandExecutionResult.error("No image " + name + " in " + f.getAbsolutePath()); } } else { final File f = FileSystem.getInstance().getFile(src); if (f.exists() == false) { return CommandExecutionResult.error("File does not exist: " + src); } if (isSvg(f.getName())) { sprite = new SpriteSvg(f); } else { sprite = new SpriteImage(ImageIO.read(f)); } } } catch (IOException e) { Log.error("Error reading " + src + " " + e); return CommandExecutionResult.error("Cannot read: " + src); } system.addSprite(arg.get("NAME", 0), sprite); return CommandExecutionResult.ok(); } private Sprite getImageFromZip(File f, String name) throws IOException { ZipInputStream zis = null; try { zis = new ZipInputStream(new FileInputStream(f)); ZipEntry ze = zis.getNextEntry(); while (ze != null) { final String fileName = ze.getName(); if (ze.isDirectory()) { } else if (fileName.equals(name)) { if (isSvg(name)) { return new SpriteSvg(FileUtils.readSvg(zis)); } else { return new SpriteImage(ImageIO.read(zis)); } } ze = zis.getNextEntry(); } } finally { if (zis != null) { zis.closeEntry(); zis.close(); } } return null; } private boolean isSvg(String name) { return name.toLowerCase().endsWith(".svg"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/CommandTitle.java000066400000000000000000000037641312650303100262650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.VerticalAlignment; public class CommandTitle extends SingleLineCommand { public CommandTitle() { super("(?i)^title(?:[%s]*:[%s]*|[%s]+)(.*[\\p{L}0-9_.].*)$"); } @Override protected CommandExecutionResult executeArg(UmlDiagram diagram, List arg) { diagram.setTitle(new DisplayPositionned(Display.getWithNewlines(arg.get(0)), HorizontalAlignment.CENTER, VerticalAlignment.TOP)); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/FactorySpriteCommand.java000066400000000000000000000115421312650303100277730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.io.IOException; import java.util.Arrays; import java.util.List; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.command.note.SingleMultiFactoryCommand; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.ugraphic.sprite.Sprite; import net.sourceforge.plantuml.ugraphic.sprite.SpriteGrayLevel; public final class FactorySpriteCommand implements SingleMultiFactoryCommand { private RegexConcat getRegexConcatMultiLine() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("sprite[%s]+\\$?"), // new RegexLeaf("NAME", "([\\p{L}0-9_]+)[%s]*"), // new RegexLeaf("DIM", "(?:\\[(\\d+)x(\\d+)/(\\d+)(z)?\\])?"), // new RegexLeaf("[%s]*\\{"), // new RegexLeaf("$")); } private RegexConcat getRegexConcatSingleLine() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("sprite[%s]+\\$?"), // new RegexLeaf("NAME", "([\\p{L}0-9_]+)[%s]*"), // new RegexLeaf("DIM", "(?:\\[(\\d+)x(\\d+)/(\\d+)(z)\\])?"), // new RegexLeaf("[%s]+"), // new RegexLeaf("DATA", "([-_A-Za-z0-9]+)"), // new RegexLeaf("$")); } public Command createSingleLine() { return new SingleLineCommand2(getRegexConcatSingleLine()) { @Override protected CommandExecutionResult executeArg(final UmlDiagram system, RegexResult arg) { return executeInternal(system, arg, Arrays.asList((CharSequence) arg.get("DATA", 0))); } }; } public Command createMultiLine(boolean withBracket) { return new CommandMultilines2(getRegexConcatMultiLine(), MultilinesStrategy.REMOVE_STARTING_QUOTE) { @Override public String getPatternEnd() { return "(?i)^end[%s]?sprite|\\}$"; } public CommandExecutionResult executeNow(final UmlDiagram system, BlocLines lines) { lines = lines.trim(true); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); lines = lines.subExtract(1, 1); lines = lines.removeEmptyColumns(); if (lines.size() == 0) { return CommandExecutionResult.error("No sprite defined."); } return executeInternal(system, line0, lines.getLines()); } }; } private CommandExecutionResult executeInternal(UmlDiagram system, RegexResult line0, final List strings) { try { final Sprite sprite; if (line0.get("DIM", 0) == null) { sprite = SpriteGrayLevel.GRAY_16.buildSprite(-1, -1, strings); } else { final int width = Integer.parseInt(line0.get("DIM", 0)); final int height = Integer.parseInt(line0.get("DIM", 1)); final int nbColor = Integer.parseInt(line0.get("DIM", 2)); if (nbColor != 4 && nbColor != 8 && nbColor != 16) { return CommandExecutionResult.error("Only 4, 8 or 16 graylevel are allowed."); } final SpriteGrayLevel level = SpriteGrayLevel.get(nbColor); if (line0.get("DIM", 3) == null) { sprite = level.buildSprite(width, height, strings); } else { sprite = level.buildSpriteZ(width, height, concat(strings)); } } system.addSprite(line0.get("NAME", 0), sprite); return CommandExecutionResult.ok(); } catch (IOException e) { return CommandExecutionResult.error("Cannot decode sprite."); } } private String concat(final List strings) { final StringBuilder sb = new StringBuilder(); for (CharSequence s : strings) { sb.append(StringUtils.trin(s)); } return sb.toString(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/MultilinesStrategy.java000066400000000000000000000036471312650303100275550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.Iterator; import java.util.List; import net.sourceforge.plantuml.StringUtils; public enum MultilinesStrategy { REMOVE_STARTING_QUOTE, KEEP_STARTING_QUOTE; public void cleanList(List lines) { if (this == REMOVE_STARTING_QUOTE) { filterQuote(lines); } } private void filterQuote(List lines) { for (final Iterator it = lines.iterator(); it.hasNext();) { final CharSequence s = it.next(); if (hasStartingQuote(s)) { it.remove(); } } } private boolean hasStartingQuote(CharSequence s) { return StringUtils.trinNoTrace(s).startsWith("\'"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/PSystemAbstractFactory.java000066400000000000000000000050271312650303100303170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.ErrorUml; import net.sourceforge.plantuml.ErrorUmlType; import net.sourceforge.plantuml.LineLocation; import net.sourceforge.plantuml.PSystemError; import net.sourceforge.plantuml.api.PSystemFactory; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; public abstract class PSystemAbstractFactory implements PSystemFactory { private final DiagramType type; protected PSystemAbstractFactory(DiagramType type) { this.type = type; } final protected AbstractPSystem buildEmptyError(UmlSource source, LineLocation lineLocation) { final ErrorUml err = new ErrorUml(ErrorUmlType.SYNTAX_ERROR, "Empty description", /* 1, */lineLocation); final PSystemError result = new PSystemError(source, err, null); result.setSource(source); return result; } final protected PSystemError buildExecutionError(UmlSource source, String stringError, LineLocation lineLocation) { final ErrorUml err = new ErrorUml(ErrorUmlType.EXECUTION_ERROR, stringError, /* 1, */ lineLocation); final PSystemError result = new PSystemError(source, err, null); result.setSource(source); return result; } final public DiagramType getDiagramType() { return type; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/PSystemBasicFactory.java000066400000000000000000000061741312650303100276010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.CharSequence2; import net.sourceforge.plantuml.ErrorUml; import net.sourceforge.plantuml.ErrorUmlType; import net.sourceforge.plantuml.PSystemError; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.utils.StartUtils; import net.sourceforge.plantuml.version.IteratorCounter2; public abstract class PSystemBasicFactory

extends PSystemAbstractFactory { public PSystemBasicFactory(DiagramType diagramType) { super(diagramType); } public PSystemBasicFactory() { this(DiagramType.UML); } public abstract P executeLine(P system, String line); public P init(String startLine) { return null; } private boolean isEmptyLine(CharSequence2 result) { return result.trin().length() == 0; } final public Diagram createSystem(UmlSource source) { final IteratorCounter2 it = source.iterator2(); final CharSequence2 startLine = it.next(); P system = init(startLine.toString2()); boolean first = true; while (it.hasNext()) { final CharSequence2 s = it.next(); if (first && s != null && isEmptyLine(s)) { continue; } first = false; if (StartUtils.isArobaseEndDiagram(s)) { if (source.getTotalLineCount() == 2 && source.isStartDef() == false) { return buildEmptyError(source, s.getLocation()); } if (system != null) { system.setSource(source); } return system; } system = executeLine(system, s.toString2()); if (system == null) { final ErrorUml err = new ErrorUml(ErrorUmlType.SYNTAX_ERROR, "Syntax Error?", /* it.currentNum() - 1, */s.getLocation()); return new PSystemError(source, err, null); } } if (system != null) { system.setSource(source); } return system; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/PSystemSingleLineFactory.java000066400000000000000000000055761312650303100306160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.CharSequence2; import net.sourceforge.plantuml.ErrorUml; import net.sourceforge.plantuml.ErrorUmlType; import net.sourceforge.plantuml.PSystemError; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.utils.StartUtils; import net.sourceforge.plantuml.version.IteratorCounter2; public abstract class PSystemSingleLineFactory extends PSystemAbstractFactory { protected abstract AbstractPSystem executeLine(String line); protected PSystemSingleLineFactory() { super(DiagramType.UML); } final public Diagram createSystem(UmlSource source) { if (source.getTotalLineCount() != 3) { return null; } final IteratorCounter2 it = source.iterator2(); if (source.isEmpty()) { return buildEmptyError(source, it.peek().getLocation()); } final CharSequence2 startLine = it.next(); if (StartUtils.isArobaseStartDiagram(startLine) == false) { throw new UnsupportedOperationException(); } if (it.hasNext() == false) { return buildEmptyError(source, startLine.getLocation()); } final CharSequence2 s = it.next(); if (StartUtils.isArobaseEndDiagram(s)) { return buildEmptyError(source, s.getLocation()); } final AbstractPSystem sys = executeLine(s.toString2()); if (sys == null) { final ErrorUml err = new ErrorUml(ErrorUmlType.SYNTAX_ERROR, "Syntax Error?", /* it.currentNum() - 1, */s.getLocation()); return new PSystemError(source, err, null); } sys.setSource(source); return sys; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/Position.java000066400000000000000000000037741312650303100255120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.cucadiagram.Rankdir; public enum Position { RIGHT, LEFT, BOTTOM, TOP; public Position withRankdir(Rankdir rankdir) { if (rankdir == null) { throw new IllegalArgumentException(); } if (rankdir == Rankdir.TOP_TO_BOTTOM) { // Default return this; } if (this == RIGHT) { return BOTTOM; } if (this == LEFT) { return TOP; } if (this == BOTTOM) { return RIGHT; } if (this == TOP) { return LEFT; } throw new IllegalStateException(); } public Direction reverseDirection() { if (this == LEFT) { return Direction.RIGHT; } if (this == RIGHT) { return Direction.LEFT; } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/ProtectedCommand.java000066400000000000000000000044721312650303100271320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.version.Version; public class ProtectedCommand implements Command { private final Command cmd; public ProtectedCommand(Command cmd) { this.cmd = cmd; } public CommandExecutionResult execute(S system, BlocLines lines) { try { final CommandExecutionResult result = cmd.execute(system, lines); // if (result.isOk()) { // // TRACECOMMAND // System.err.println("CMD = " + cmd.getClass()); // } return result; } catch (Throwable t) { Log.error("Error " + t); t.printStackTrace(); String msg = "You should send a mail to plantuml@gmail.com or post to http://plantuml.com/qa with this log (V" + Version.versionString() + ")"; Log.error(msg); msg += " " + t.toString(); return CommandExecutionResult.error(msg, t); } } public CommandControl isValid(BlocLines lines) { return cmd.isValid(lines); } public String[] getDescription() { return cmd.getDescription(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/SingleLineCommand.java000066400000000000000000000065711312650303100272340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.List; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.core.Diagram; public abstract class SingleLineCommand implements Command { private final Pattern2 pattern; public SingleLineCommand(String pattern) { if (pattern == null) { throw new IllegalArgumentException(); } if (pattern.startsWith("(?i)^") == false || pattern.endsWith("$") == false) { throw new IllegalArgumentException("Bad pattern " + pattern); } this.pattern = MyPattern.cmpile(pattern); } public String[] getDescription() { return new String[] { pattern.pattern() }; } final public CommandControl isValid(BlocLines lines) { if (lines.size() != 1) { return CommandControl.NOT_OK; } lines = lines.removeInnerComments(); if (isCommandForbidden()) { return CommandControl.NOT_OK; } final String line = StringUtils.trin(lines.getFirst499()); final Matcher2 m = pattern.matcher(line); final boolean result = m.find(); if (result) { actionIfCommandValid(); } return result ? CommandControl.OK : CommandControl.NOT_OK; } protected boolean isCommandForbidden() { return false; } protected void actionIfCommandValid() { } public final CommandExecutionResult execute(S system, BlocLines lines) { if (lines.size() != 1) { throw new IllegalArgumentException(); } lines = lines.removeInnerComments(); final String line = StringUtils.trin(lines.getFirst499()); if (isForbidden(line)) { return CommandExecutionResult.error("Syntax error: " + line); } final List arg = getSplit(line); if (arg == null) { return CommandExecutionResult.error("Cannot parse line " + line); } return executeArg(system, arg); } protected boolean isForbidden(String line) { return false; } protected abstract CommandExecutionResult executeArg(S system, List arg); final public List getSplit(String line) { return StringUtils.getSplit(pattern, line); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/SingleLineCommand2.java000066400000000000000000000067261312650303100273200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import net.sourceforge.plantuml.PSystemError; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.core.Diagram; public abstract class SingleLineCommand2 implements Command { private final RegexConcat pattern; public SingleLineCommand2(RegexConcat pattern) { if (pattern == null) { throw new IllegalArgumentException(); } if (pattern.getPattern().startsWith("^") == false || pattern.getPattern().endsWith("$") == false) { throw new IllegalArgumentException("Bad pattern " + pattern.getPattern()); } this.pattern = pattern; } public String[] getDescription() { return new String[] { pattern.getPattern() }; } final public CommandControl isValid(BlocLines lines) { if (lines.size() != 1) { return CommandControl.NOT_OK; } lines = lines.removeInnerComments(); if (isCommandForbidden()) { return CommandControl.NOT_OK; } final String line = StringUtils.trin(lines.getFirst499()); final boolean result = pattern.match(line); if (result) { actionIfCommandValid(); } return result ? CommandControl.OK : CommandControl.NOT_OK; } protected boolean isCommandForbidden() { return false; } protected void actionIfCommandValid() { } public final CommandExecutionResult execute(S system, BlocLines lines) { if (lines.size() != 1) { throw new IllegalArgumentException(); } lines = lines.removeInnerComments(); final String line = StringUtils.trin(lines.getFirst499()); if (isForbidden(line)) { return CommandExecutionResult.error("Syntax error: " + line); } final RegexResult arg = pattern.matcher(line); if (arg == null) { return CommandExecutionResult.error("Cannot parse line " + line); } if (system instanceof PSystemError) { return CommandExecutionResult.error("PSystemError cannot be cast"); } // System.err.println("lines="+lines); // System.err.println("pattern="+pattern.getPattern()); return executeArg(system, arg); } protected boolean isForbidden(CharSequence line) { return false; } protected abstract CommandExecutionResult executeArg(S system, RegexResult arg); } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/UmlDiagramFactory.java000066400000000000000000000237051312650303100272540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.CharSequence2; import net.sourceforge.plantuml.ErrorUml; import net.sourceforge.plantuml.ErrorUmlType; import net.sourceforge.plantuml.NewpagedDiagram; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.PSystemError; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.classdiagram.command.CommandHideShowByGender; import net.sourceforge.plantuml.classdiagram.command.CommandHideShowByVisibility; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.suggest.SuggestEngine; import net.sourceforge.plantuml.suggest.SuggestEngineResult; import net.sourceforge.plantuml.suggest.SuggestEngineStatus; import net.sourceforge.plantuml.utils.StartUtils; import net.sourceforge.plantuml.version.IteratorCounter2; public abstract class UmlDiagramFactory extends PSystemAbstractFactory { private final List cmds; protected UmlDiagramFactory() { this(DiagramType.UML); } protected UmlDiagramFactory(DiagramType type) { super(type); cmds = createCommands(); } final public Diagram createSystem(UmlSource source) { final IteratorCounter2 it = source.iterator2(); final CharSequence2 startLine = it.next(); if (StartUtils.isArobaseStartDiagram(startLine) == false) { throw new UnsupportedOperationException(); } if (source.isEmpty()) { return buildEmptyError(source, startLine.getLocation()); } AbstractPSystem sys = createEmptyDiagram(); while (it.hasNext()) { if (StartUtils.isArobaseEndDiagram(it.peek())) { if (sys == null) { return null; } final String err = sys.checkFinalError(); if (err != null) { return buildExecutionError(source, err, it.peek().getLocation()); } if (source.getTotalLineCount() == 2) { return buildEmptyError(source, it.peek().getLocation()); } sys.makeDiagramReady(); if (sys.isOk() == false) { return null; } sys.setSource(source); return sys; } sys = executeOneLine(sys, source, it); if (sys instanceof PSystemError) { return sys; } } sys.setSource(source); return sys; } private AbstractPSystem executeOneLine(AbstractPSystem sys, UmlSource source, final IteratorCounter2 it) { final CommandControl commandControl = isValid2(it); if (commandControl == CommandControl.NOT_OK) { final ErrorUml err = new ErrorUml(ErrorUmlType.SYNTAX_ERROR, "Syntax Error?", /* it.currentNum(), */it.peek() .getLocation()); if (OptionFlags.getInstance().isUseSuggestEngine()) { final SuggestEngine engine = new SuggestEngine(source, this); final SuggestEngineResult result = engine.tryToSuggest(sys); if (result.getStatus() == SuggestEngineStatus.ONE_SUGGESTION) { err.setSuggest(result); } } sys = new PSystemError(source, err, null); } else if (commandControl == CommandControl.OK_PARTIAL) { final IteratorCounter2 saved = it.cloneMe(); final CommandExecutionResult result = manageMultiline2(it, sys); if (result.isOk() == false) { final ErrorUml err = new ErrorUml(ErrorUmlType.EXECUTION_ERROR, result.getError(), /* it.currentNum() - 1, */saved.next().getLocation()); sys = new PSystemError(source, err, null); } } else if (commandControl == CommandControl.OK) { final CharSequence line = it.next(); final BlocLines lines = BlocLines.single(line); Command cmd = getFirstCommandOkForLines(lines); final CommandExecutionResult result = sys.executeCommand(cmd, lines); if (result.isOk() == false) { final ErrorUml err = new ErrorUml(ErrorUmlType.EXECUTION_ERROR, result.getError(), /* it.currentNum() - 1, */((CharSequence2) line).getLocation()); sys = new PSystemError(source, err, result.getDebugLines()); } if (result.getNewDiagram() != null) { sys = result.getNewDiagram(); } } else { assert false; } return sys; } public CommandControl isValid2(final IteratorCounter2 it) { final BlocLines lines = BlocLines.single(it.peek()); for (Command cmd : cmds) { final CommandControl result = cmd.isValid(lines); if (result == CommandControl.OK) { return result; } if (result == CommandControl.OK_PARTIAL && isMultilineCommandOk(it.cloneMe(), cmd) != null) { return result; } } return CommandControl.NOT_OK; } public CommandControl goForwardMultiline(final IteratorCounter2 it) { final BlocLines lines = BlocLines.single(it.peek()); for (Command cmd : cmds) { final CommandControl result = cmd.isValid(lines); if (result == CommandControl.OK) { throw new IllegalStateException(); } if (result == CommandControl.OK_PARTIAL && isMultilineCommandOk(it, cmd) != null) { return result; } } return CommandControl.NOT_OK; // throw new IllegalStateException(); } private CommandExecutionResult manageMultiline2(IteratorCounter2 it, AbstractPSystem system) { for (Command cmd : cmds) { if (isMultilineCommandOk(it.cloneMe(), cmd) != null) { final BlocLines lines = isMultilineCommandOk(it, cmd); if (system instanceof NewpagedDiagram) { final NewpagedDiagram newpagedDiagram = (NewpagedDiagram) system; return cmd.execute(newpagedDiagram.getLastDiagram(), lines); } return cmd.execute(system, lines); } } return CommandExecutionResult.ok(); } private BlocLines isMultilineCommandOk(IteratorCounter2 it, Command cmd) { BlocLines lines = new BlocLines(); int nb = 0; while (it.hasNext()) { lines = addOneSingleLineManageEmbedded2(it, lines); final CommandControl result = cmd.isValid(lines); if (result == CommandControl.NOT_OK) { return null; } if (result == CommandControl.OK) { return lines; } nb++; if (cmd instanceof CommandDecoratorMultine && nb > ((CommandDecoratorMultine) cmd).getNbMaxLines()) { return null; } } return null; } private BlocLines addOneSingleLineManageEmbedded2(IteratorCounter2 it, BlocLines lines) { final CharSequence linetoBeAdded = it.next(); lines = lines.add2(linetoBeAdded); if (StringUtils.trinNoTrace(linetoBeAdded).equals("{{")) { while (it.hasNext()) { final CharSequence s = it.next(); lines = lines.add2(s); if (StringUtils.trinNoTrace(s).equals("}}")) { return lines; } } } return lines; } // ----------------------------------- final public CommandControl isValid(BlocLines lines) { for (Command cmd : cmds) { final CommandControl result = cmd.isValid(lines); if (result == CommandControl.OK) { return result; } if (result == CommandControl.OK_PARTIAL) { return result; } } return CommandControl.NOT_OK; } private Command getFirstCommandOkForLines(BlocLines lines) { for (Command cmd : cmds) { final CommandControl result = cmd.isValid(lines); if (result == CommandControl.OK) { return cmd; } } throw new IllegalArgumentException(); } protected abstract List createCommands(); public abstract AbstractPSystem createEmptyDiagram(); final protected void addCommonCommands(List cmds) { cmds.add(new CommandNope()); cmds.add(new CommandComment()); cmds.add(new CommandMultilinesComment()); cmds.add(new CommandPragma()); cmds.add(new CommandTitle()); cmds.add(new CommandCaption()); cmds.add(new CommandMultilinesTitle()); cmds.add(new CommandMultilinesLegend()); cmds.add(new CommandFooter()); cmds.add(new CommandMultilinesFooter()); cmds.add(new CommandHeader()); cmds.add(new CommandMultilinesHeader()); cmds.add(new CommandSkinParam()); cmds.add(new CommandSkinParamMultilines()); cmds.add(new CommandMinwidth()); cmds.add(new CommandRotate()); cmds.add(new CommandScale()); cmds.add(new CommandScaleWidthAndHeight()); cmds.add(new CommandScaleWidthOrHeight()); cmds.add(new CommandScaleMaxWidth()); cmds.add(new CommandScaleMaxHeight()); cmds.add(new CommandScaleMaxWidthAndHeight()); cmds.add(new CommandAffineTransform()); cmds.add(new CommandAffineTransformMultiline()); cmds.add(new CommandHideUnlinked()); final FactorySpriteCommand factorySpriteCommand = new FactorySpriteCommand(); cmds.add(factorySpriteCommand.createMultiLine(false)); cmds.add(factorySpriteCommand.createSingleLine()); cmds.add(new CommandSpriteFile()); cmds.add(new CommandHideShowByVisibility()); cmds.add(new CommandHideShowByGender()); } final public List getDescription() { final List result = new ArrayList(); for (Command cmd : createCommands()) { result.addAll(Arrays.asList(cmd.getDescription())); } return Collections.unmodifiableList(result); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/note/000077500000000000000000000000001312650303100237755ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/command/note/FactoryNoteActivityCommand.java000066400000000000000000000136751312650303100321250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.note; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.activitydiagram.ActivityDiagram; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.utils.UniqueSequence; public final class FactoryNoteActivityCommand implements SingleMultiFactoryCommand { private RegexConcat getRegexConcatMultiLine() { return new RegexConcat(new RegexLeaf("^[%s]*note[%s]+"), // new RegexLeaf("POSITION", "(right|left|top|bottom)[%s]*"), // ColorParser.exp1(), // new RegexLeaf("[%s]*"), // new RegexLeaf("$")); } private RegexConcat getRegexConcatSingleLine() { return new RegexConcat(new RegexLeaf("^[%s]*note[%s]+"), // new RegexLeaf("POSITION", "(right|left|top|bottom)[%s]*"), // ColorParser.exp1(), // new RegexLeaf("[%s]*:[%s]*"), // new RegexLeaf("NOTE", "(.*)"), // new RegexLeaf("$")); } public Command createMultiLine(boolean withBracket) { return new CommandMultilines2(getRegexConcatMultiLine(), MultilinesStrategy.KEEP_STARTING_QUOTE) { @Override public String getPatternEnd() { return "(?i)^[%s]*end[%s]?note$"; } public final CommandExecutionResult executeNow(final ActivityDiagram system, BlocLines lines) { // StringUtils.trim(lines, true); final RegexResult arg = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); lines = lines.subExtract(1, 1); lines = lines.removeEmptyColumns(); Display strings = lines.toDisplay(); Url url = null; if (strings.size() > 0) { final UrlBuilder urlBuilder = new UrlBuilder(system.getSkinParam().getValue("topurl"), ModeUrl.STRICT); url = urlBuilder.getUrl(strings.get(0).toString()); } if (url != null) { strings = strings.subList(1, strings.size()); } // final String s = StringUtils.getMergedLines(strings); final IEntity note = system.createLeaf(UniqueSequence.getCode("GMN"), strings, LeafType.NOTE, null); if (url != null) { note.addUrl(url); } return executeInternal(system, arg, note); } }; } public Command createSingleLine() { return new SingleLineCommand2(getRegexConcatSingleLine()) { @Override protected CommandExecutionResult executeArg(final ActivityDiagram system, RegexResult arg) { final IEntity note = system.createNote(UniqueSequence.getCode("GN"), Display.getWithNewlines(arg.get("NOTE", 0))); return executeInternal(system, arg, note); } }; } private CommandExecutionResult executeInternal(ActivityDiagram diagram, RegexResult arg, IEntity note) { note.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0))); IEntity activity = diagram.getLastEntityConsulted(); if (activity == null) { activity = diagram.getStart(); } final Link link; final Position position = Position.valueOf(StringUtils.goUpperCase(arg.get("POSITION", 0))).withRankdir( diagram.getSkinParam().getRankdir()); final LinkType type = new LinkType(LinkDecor.NONE, LinkDecor.NONE).getDashed(); if (position == Position.RIGHT) { link = new Link(activity, note, type, Display.NULL, 1); } else if (position == Position.LEFT) { link = new Link(note, activity, type, Display.NULL, 1); } else if (position == Position.BOTTOM) { link = new Link(activity, note, type, Display.NULL, 2); } else if (position == Position.TOP) { link = new Link(note, activity, type, Display.NULL, 2); } else { throw new IllegalArgumentException(); } diagram.addLink(link); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/note/FactoryNoteCommand.java000066400000000000000000000106611312650303100304000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.note; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; public final class FactoryNoteCommand implements SingleMultiFactoryCommand { private RegexConcat getRegexConcatMultiLine() { return new RegexConcat(new RegexLeaf("^[%s]*(note)[%s]+"), // new RegexLeaf("CODE", "as[%s]+([\\p{L}0-9_.]+)"), // new RegexLeaf("[%s]*"), // ColorParser.exp1(), // new RegexLeaf("$") // ); } private RegexConcat getRegexConcatSingleLine() { return new RegexConcat(new RegexLeaf("^[%s]*note[%s]+"), // new RegexLeaf("DISPLAY", "[%g]([^%g]+)[%g][%s]+as[%s]+"), // new RegexLeaf("CODE", "([\\p{L}0-9_.]+)[%s]*"), // ColorParser.exp1(), // new RegexLeaf("$") // ); } public Command createSingleLine() { return new SingleLineCommand2(getRegexConcatSingleLine()) { @Override protected CommandExecutionResult executeArg(final AbstractEntityDiagram system, RegexResult arg) { final String display = arg.get("DISPLAY", 0); return executeInternal(system, arg, BlocLines.getWithNewlines(display)); } }; } public Command createMultiLine(boolean withBracket) { return new CommandMultilines2(getRegexConcatMultiLine(), MultilinesStrategy.KEEP_STARTING_QUOTE) { @Override public String getPatternEnd() { return "(?i)^[%s]*end[%s]?note$"; } public CommandExecutionResult executeNow(final AbstractEntityDiagram system, BlocLines lines) { // StringUtils.trim(lines, false); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); lines = lines.subExtract(1, 1); lines = lines.removeEmptyColumns(); return executeInternal(system, line0, lines); } }; } private CommandExecutionResult executeInternal(AbstractEntityDiagram diagram, RegexResult arg, BlocLines display) { final Code code = Code.of(arg.get("CODE", 0)); if (diagram.leafExist(code)) { return CommandExecutionResult.error("Note already created: " + code.getFullName()); } final IEntity entity = diagram.createLeaf(code, display.toDisplay(), LeafType.NOTE, null); assert entity != null; entity.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0))); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/note/FactoryNoteOnEntityCommand.java000066400000000000000000000164041312650303100320730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.note; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.IRegex; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.utils.UniqueSequence; public final class FactoryNoteOnEntityCommand implements SingleMultiFactoryCommand { private final IRegex partialPattern; // private final boolean withBracket; public FactoryNoteOnEntityCommand(IRegex partialPattern/* , boolean withBracket */) { this.partialPattern = partialPattern; // this.withBracket = withBracket; } private RegexConcat getRegexConcatSingleLine(IRegex partialPattern) { return new RegexConcat(new RegexLeaf("^[%s]*note[%s]+"), // new RegexLeaf("POSITION", "(right|left|top|bottom)"), // new RegexOr(// new RegexConcat(new RegexLeaf("[%s]+of[%s]+"), partialPattern), // new RegexLeaf("")), // new RegexLeaf("[%s]*"), // color().getRegex(), // new RegexLeaf("URL", "[%s]*(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("[%s]*:[%s]*"), // new RegexLeaf("NOTE", "(.*)"), // new RegexLeaf("$") // ); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } private RegexConcat getRegexConcatMultiLine(IRegex partialPattern, final boolean withBracket) { return new RegexConcat(new RegexLeaf("^[%s]*note[%s]+"), // new RegexLeaf("POSITION", "(right|left|top|bottom)"), // new RegexOr(// new RegexConcat(new RegexLeaf("[%s]+of[%s]+"), partialPattern), // new RegexLeaf("")), // new RegexLeaf("[%s]*"), // color().getRegex(), // new RegexLeaf("URL", "[%s]*(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf(withBracket ? "[%s]*\\{" : "[%s]*"), // new RegexLeaf("$") // ); } public Command createSingleLine() { return new SingleLineCommand2(getRegexConcatSingleLine(partialPattern)) { @Override protected CommandExecutionResult executeArg(final AbstractEntityDiagram system, RegexResult arg) { final String s = arg.get("NOTE", 0); return executeInternal(arg, system, null, BlocLines.getWithNewlines(s)); } }; } public Command createMultiLine(final boolean withBracket) { return new CommandMultilines2(getRegexConcatMultiLine(partialPattern, withBracket), MultilinesStrategy.KEEP_STARTING_QUOTE) { @Override public String getPatternEnd() { if (withBracket) { return "(?i)^(\\})$"; } return "(?i)^[%s]*(end[%s]?note)$"; } public CommandExecutionResult executeNow(final AbstractEntityDiagram system, BlocLines lines) { // StringUtils.trim(lines, false); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); lines = lines.subExtract(1, 1); lines = lines.removeEmptyColumns(); Url url = null; if (line0.get("URL", 0) != null) { final UrlBuilder urlBuilder = new UrlBuilder(system.getSkinParam().getValue("topurl"), ModeUrl.STRICT); url = urlBuilder.getUrl(line0.get("URL", 0)); } return executeInternal(line0, system, url, lines); } }; } private CommandExecutionResult executeInternal(RegexResult line0, AbstractEntityDiagram diagram, Url url, BlocLines strings) { final String pos = line0.get("POSITION", 0); final Code code = Code.of(line0.get("ENTITY", 0)); final IEntity cl1; if (code == null) { cl1 = diagram.getLastEntity(); if (cl1 == null) { return CommandExecutionResult.error("Nothing to note to"); } } else if (diagram.isGroup(code)) { cl1 = diagram.getGroup(code); } else { cl1 = diagram.getOrCreateLeaf(code, null, null); } final IEntity note = diagram .createLeaf(UniqueSequence.getCode("GMN"), strings.toDisplay(), LeafType.NOTE, null); final Colors colors = color().getColor(line0, diagram.getSkinParam().getIHtmlColorSet()); note.setColors(colors); if (url != null) { note.addUrl(url); } final Position position = Position.valueOf(StringUtils.goUpperCase(pos)).withRankdir( diagram.getSkinParam().getRankdir()); final Link link; final LinkType type = new LinkType(LinkDecor.NONE, LinkDecor.NONE).getDashed(); if (position == Position.RIGHT) { link = new Link(cl1, note, type, Display.NULL, 1); link.setHorizontalSolitary(true); } else if (position == Position.LEFT) { link = new Link(note, cl1, type, Display.NULL, 1); link.setHorizontalSolitary(true); } else if (position == Position.BOTTOM) { link = new Link(cl1, note, type, Display.NULL, 2); } else if (position == Position.TOP) { link = new Link(note, cl1, type, Display.NULL, 2); } else { throw new IllegalArgumentException(); } diagram.addLink(link); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/note/FactoryNoteOnLinkCommand.java000066400000000000000000000116441312650303100315150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.note; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; public final class FactoryNoteOnLinkCommand implements SingleMultiFactoryCommand { private RegexConcat getRegexConcatSingleLine() { return new RegexConcat(new RegexLeaf("^[%s]*note[%s]+"), // new RegexLeaf("POSITION", "(right|left|top|bottom)?[%s]*on[%s]+link"), // new RegexLeaf("[%s]*"), // color().getRegex(), // new RegexLeaf("[%s]*:[%s]*"), // new RegexLeaf("NOTE", "(.*)"), // new RegexLeaf("$")); } private RegexConcat getRegexConcatMultiLine() { return new RegexConcat(new RegexLeaf("^[%s]*note[%s]+"), // new RegexLeaf("POSITION", "(right|left|top|bottom)?[%s]*on[%s]+link"), // new RegexLeaf("[%s]*"), // color().getRegex(), // new RegexLeaf("$")); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } public Command createMultiLine(boolean withBracket) { return new CommandMultilines2(getRegexConcatMultiLine(), MultilinesStrategy.KEEP_STARTING_QUOTE) { @Override public String getPatternEnd() { return "(?i)^[%s]*end[%s]?note$"; } public CommandExecutionResult executeNow(final CucaDiagram system, BlocLines lines) { final String line0 = lines.getFirst499().toString(); lines = lines.subExtract(1, 1); lines = lines.removeEmptyColumns(); if (lines.size() > 0) { final RegexResult arg = getStartingPattern().matcher(line0); return executeInternal(system, lines, arg); } return CommandExecutionResult.error("No note defined"); } }; } public Command createSingleLine() { return new SingleLineCommand2(getRegexConcatSingleLine()) { @Override protected CommandExecutionResult executeArg(final CucaDiagram system, RegexResult arg) { final BlocLines note = BlocLines.getWithNewlines(arg.get("NOTE", 0)); return executeInternal(system, note, arg); } }; } private CommandExecutionResult executeInternal(CucaDiagram diagram, BlocLines note, final RegexResult arg) { final Link link = diagram.getLastLink(); if (link == null) { return CommandExecutionResult.error("No link defined"); } Position position = Position.BOTTOM; if (arg.get("POSITION", 0) != null) { position = Position.valueOf(StringUtils.goUpperCase(arg.get("POSITION", 0))); } Url url = null; if (arg.get("URL", 0) != null) { final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); url = urlBuilder.getUrl(arg.get("URL", 0)); } final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); link.addNote(note.toDisplay(), position, colors); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/note/FactoryTipOnEntityCommand.java000066400000000000000000000131241312650303100317160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.note; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.command.regex.IRegex; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; import net.sourceforge.plantuml.graphic.color.ColorParser; public final class FactoryTipOnEntityCommand implements SingleMultiFactoryCommand { private final IRegex partialPattern; // private final boolean withBracket; public FactoryTipOnEntityCommand(IRegex partialPattern/* , boolean withBracket */) { this.partialPattern = partialPattern; // this.withBracket = withBracket; } private RegexConcat getRegexConcatMultiLine(IRegex partialPattern, final boolean withBracket) { return new RegexConcat(new RegexLeaf("^[%s]*note[%s]+"), // new RegexLeaf("POSITION", "(right|left)"), // new RegexLeaf("[%s]+of[%s]+"), partialPattern, // new RegexLeaf("[%s]*"), // ColorParser.exp1(), // new RegexLeaf("URL", "[%s]*(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf(withBracket ? "[%s]*\\{" : "[%s]*"), // new RegexLeaf("$") // ); } public Command createSingleLine() { throw new UnsupportedOperationException(); } public Command createMultiLine(final boolean withBracket) { return new CommandMultilines2(getRegexConcatMultiLine(partialPattern, withBracket), MultilinesStrategy.KEEP_STARTING_QUOTE) { @Override public String getPatternEnd() { if (withBracket) { return "(?i)^(\\})$"; } return "(?i)^[%s]*(end[%s]?note)$"; } public CommandExecutionResult executeNow(final AbstractEntityDiagram system, BlocLines lines) { // StringUtils.trim(lines, false); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); lines = lines.subExtract(1, 1); lines = lines.removeEmptyColumns(); Url url = null; if (line0.get("URL", 0) != null) { final UrlBuilder urlBuilder = new UrlBuilder(system.getSkinParam().getValue("topurl"), ModeUrl.STRICT); url = urlBuilder.getUrl(line0.get("URL", 0)); } return executeInternal(line0, system, url, lines); } }; } private CommandExecutionResult executeInternal(RegexResult line0, AbstractEntityDiagram diagram, Url url, BlocLines lines) { final String pos = line0.get("POSITION", 0); final Code code = Code.of(line0.get("ENTITY", 0)); final String member = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(line0.get("ENTITY", 1)); if (code == null) { return CommandExecutionResult.error("Nothing to note to"); } final IEntity cl1 = diagram.getOrCreateLeaf(code, null, null); final Position position = Position.valueOf(StringUtils.goUpperCase(pos)).withRankdir( diagram.getSkinParam().getRankdir()); final Code codeTip = code.addSuffix("$$$" + position.name()); IEntity tips = diagram.getLeafsget(codeTip); if (tips == null) { tips = diagram.getOrCreateLeaf(codeTip, LeafType.TIPS, null); final LinkType type = new LinkType(LinkDecor.NONE, LinkDecor.NONE).getInvisible(); final Link link; if (position == Position.RIGHT) { link = new Link(cl1, (IEntity) tips, type, Display.NULL, 1); } else { link = new Link((IEntity) tips, cl1, type, Display.NULL, 1); } diagram.addLink(link); } tips.putTip(member, lines.toDisplay()); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/note/SingleMultiFactoryCommand.java000066400000000000000000000030271312650303100317250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.note; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.core.Diagram; public interface SingleMultiFactoryCommand { public Command createSingleLine(); public Command createMultiLine(boolean withBracket); }plantuml-1.2017.15/src/net/sourceforge/plantuml/command/note/sequence/000077500000000000000000000000001312650303100256055ustar00rootroot00000000000000FactorySequenceNoteCommand.java000066400000000000000000000145271312650303100336270ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/command/note/sequence/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.note.sequence; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.note.SingleMultiFactoryCommand; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.Note; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteStyle; import net.sourceforge.plantuml.sequencediagram.Participant; import net.sourceforge.plantuml.sequencediagram.SequenceDiagram; public final class FactorySequenceNoteCommand implements SingleMultiFactoryCommand { private RegexConcat getRegexConcatMultiLine() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("VMERGE", "(/)?[%s]*"), // new RegexLeaf("STYLE", "(note|hnote|rnote)"), // new RegexLeaf("[%s]*"), // new RegexLeaf("STEREO", "(\\<{2}.*\\>{2})?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("POSITION", "(right|left|over)[%s]+"), // new RegexLeaf("PARTICIPANT", "(?:of[%s]+)?([\\p{L}0-9_.@]+|[%g][^%g]+[%g])[%s]*"), // color().getRegex(), // new RegexLeaf("URL", "[%s]*(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("$")); } private RegexConcat getRegexConcatSingleLine() { return new RegexConcat(// new RegexLeaf("^"), // new RegexLeaf("VMERGE", "(/)?[%s]*"), // new RegexLeaf("STYLE", "(note|hnote|rnote)"), // new RegexLeaf("[%s]*"), // new RegexLeaf("STEREO", "(\\<{2}.*\\>{2})?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("POSITION", "(right|left|over)[%s]+"), // new RegexLeaf("PARTICIPANT", "(?:of[%s])?([\\p{L}0-9_.@]+|[%g][^%g]+[%g])[%s]*"), // color().getRegex(), // new RegexLeaf("URL", "[%s]*(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("[%s]*:[%s]*"), // new RegexLeaf("NOTE", "(.*)"), // new RegexLeaf("$")); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } public Command createMultiLine(boolean withBracket) { return new CommandMultilines2(getRegexConcatMultiLine(), MultilinesStrategy.KEEP_STARTING_QUOTE) { @Override public String getPatternEnd() { return "(?i)^end[%s]?(note|hnote|rnote)$"; } public CommandExecutionResult executeNow(final SequenceDiagram system, BlocLines lines) { final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); lines = lines.subExtract(1, 1); lines = lines.removeEmptyColumns(); return executeInternal(system, line0, lines); } }; } public Command createSingleLine() { return new SingleLineCommand2(getRegexConcatSingleLine()) { @Override protected CommandExecutionResult executeArg(final SequenceDiagram system, RegexResult arg) { return executeInternal(system, arg, BlocLines.getWithNewlines(arg.get("NOTE", 0))); } }; } private CommandExecutionResult executeInternal(SequenceDiagram diagram, RegexResult arg, BlocLines strings) { final Participant p = diagram.getOrCreateParticipant(StringUtils .eventuallyRemoveStartingAndEndingDoubleQuote(arg.get("PARTICIPANT", 0))); final NotePosition position = NotePosition.valueOf(StringUtils.goUpperCase(arg.get("POSITION", 0))); if (strings.size() > 0) { final boolean tryMerge = arg.get("VMERGE", 0) != null; final Note note = new Note(p, position, strings.toDisplay()); Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final String stereotypeString = arg.get("STEREO", 0); if (stereotypeString != null) { final Stereotype stereotype = new Stereotype(stereotypeString); note.setStereotype(stereotype); colors = colors.applyStereotypeForNote(stereotype, diagram.getSkinParam(), FontParam.NOTE, ColorParam.noteBackground, ColorParam.noteBorder); } note.setColors(colors); note.setStyle(NoteStyle.getNoteStyle(arg.get("STYLE", 0))); if (arg.get("URL", 0) != null) { final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); final Url urlLink = urlBuilder.getUrl(arg.get("URL", 0)); note.setUrl(urlLink); } diagram.addNote(note, tryMerge); } return CommandExecutionResult.ok(); } } FactorySequenceNoteOnArrowCommand.java000066400000000000000000000123601312650303100351300ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/command/note/sequence/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.note.sequence; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.note.SingleMultiFactoryCommand; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.sequencediagram.AbstractMessage; import net.sourceforge.plantuml.sequencediagram.EventWithDeactivate; import net.sourceforge.plantuml.sequencediagram.GroupingLeaf; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteStyle; import net.sourceforge.plantuml.sequencediagram.SequenceDiagram; public final class FactorySequenceNoteOnArrowCommand implements SingleMultiFactoryCommand { private RegexConcat getRegexConcatMultiLine() { return new RegexConcat(new RegexLeaf("^[%s]*"), // new RegexLeaf("STYLE", "(note|hnote|rnote)"), // new RegexLeaf("[%s]+"), // new RegexLeaf("POSITION", "(right|left)[%s]*"), // ColorParser.exp1(), // new RegexLeaf("URL", "[%s]*(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("$")); } private RegexConcat getRegexConcatSingleLine() { return new RegexConcat(new RegexLeaf("^[%s]*"), // new RegexLeaf("STYLE", "(note|hnote|rnote)"), // new RegexLeaf("[%s]+"), // new RegexLeaf("POSITION", "(right|left)[%s]*"), // ColorParser.exp1(), // new RegexLeaf("URL", "[%s]*(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("[%s]*:[%s]*"), // new RegexLeaf("NOTE", "(.*)"), // new RegexLeaf("$")); } public Command createSingleLine() { return new SingleLineCommand2(getRegexConcatSingleLine()) { @Override protected CommandExecutionResult executeArg(final SequenceDiagram system, RegexResult arg) { return executeInternal(system, arg, BlocLines.getWithNewlines(arg.get("NOTE", 0))); } }; } public Command createMultiLine(boolean withBracket) { return new CommandMultilines2(getRegexConcatMultiLine(), MultilinesStrategy.KEEP_STARTING_QUOTE) { @Override public String getPatternEnd() { return "(?i)^[%s]*end[%s]?note$"; } public CommandExecutionResult executeNow(final SequenceDiagram system, BlocLines lines) { final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); lines = lines.subExtract(1, 1); lines = lines.removeEmptyColumns(); return executeInternal(system, line0, lines); } }; } private CommandExecutionResult executeInternal(SequenceDiagram system, final RegexResult line0, BlocLines lines) { final EventWithDeactivate m = system.getLastEventWithDeactivate(); if (m instanceof AbstractMessage || m instanceof GroupingLeaf) { final NotePosition position = NotePosition.valueOf(StringUtils.goUpperCase(line0.get("POSITION", 0))); Url url = null; if (line0.get("URL", 0) != null) { final UrlBuilder urlBuilder = new UrlBuilder(system.getSkinParam().getValue("topurl"), ModeUrl.STRICT); url = urlBuilder.getUrl(line0.get("URL", 0)); } final NoteStyle style = NoteStyle.getNoteStyle(line0.get("STYLE", 0)); if (m instanceof AbstractMessage) { ((AbstractMessage) m).setNote(lines.toDisplay(), position, style, line0.get("COLOR", 0), url); } else { ((GroupingLeaf) m).setNote(lines.toDisplay(), position, style, line0.get("COLOR", 0), url); } } return CommandExecutionResult.ok(); } } FactorySequenceNoteOverSeveralCommand.java000066400000000000000000000135131312650303100357770ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/command/note/sequence/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.note.sequence; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.note.SingleMultiFactoryCommand; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.Note; import net.sourceforge.plantuml.sequencediagram.NoteStyle; import net.sourceforge.plantuml.sequencediagram.Participant; import net.sourceforge.plantuml.sequencediagram.SequenceDiagram; public final class FactorySequenceNoteOverSeveralCommand implements SingleMultiFactoryCommand { private RegexConcat getRegexConcatMultiLine() { return new RegexConcat( // new RegexLeaf("^"), // new RegexLeaf("VMERGE", "(/)?[%s]*"), // new RegexLeaf("STYLE", "(note|hnote|rnote)[%s]+over[%s]+"), // new RegexLeaf("P1", "([\\p{L}0-9_.@]+|[%g][^%g]+[%g])[%s]*\\,[%s]*"), // new RegexLeaf("P2", "([\\p{L}0-9_.@]+|[%g][^%g]+[%g])[%s]*"), // color().getRegex(), // new RegexLeaf("URL", "[%s]*(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("$") // ); } private RegexConcat getRegexConcatSingleLine() { return new RegexConcat( // new RegexLeaf("^"), // new RegexLeaf("VMERGE", "(/)?[%s]*"), // new RegexLeaf("STYLE", "(note|hnote|rnote)[%s]+over[%s]+"), // new RegexLeaf("P1", "([\\p{L}0-9_.@]+|[%g][^%g]+[%g])[%s]*\\,[%s]*"), // new RegexLeaf("P2", "([\\p{L}0-9_.@]+|[%g][^%g]+[%g])[%s]*"), // color().getRegex(), // new RegexLeaf("URL", "[%s]*(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("[%s]*:[%s]*"), // new RegexLeaf("NOTE", "(.*)"), // new RegexLeaf("$")); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } public Command createSingleLine() { return new SingleLineCommand2(getRegexConcatSingleLine()) { @Override protected CommandExecutionResult executeArg(final SequenceDiagram system, RegexResult arg) { final BlocLines strings = BlocLines.getWithNewlines(arg.get("NOTE", 0)); return executeInternal(system, arg, strings); } }; } public Command createMultiLine(boolean withBracket) { return new CommandMultilines2(getRegexConcatMultiLine(), MultilinesStrategy.KEEP_STARTING_QUOTE) { @Override public String getPatternEnd() { return "(?i)^end[%s]?(note|hnote|rnote)$"; } public CommandExecutionResult executeNow(final SequenceDiagram system, BlocLines lines) { final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); lines = lines.subExtract(1, 1); lines = lines.removeEmptyColumns(); return executeInternal(system, line0, lines); } }; } private CommandExecutionResult executeInternal(SequenceDiagram diagram, final RegexResult line0, BlocLines lines) { final Participant p1 = diagram.getOrCreateParticipant(StringUtils .eventuallyRemoveStartingAndEndingDoubleQuote(line0.get("P1", 0))); final Participant p2 = diagram.getOrCreateParticipant(StringUtils .eventuallyRemoveStartingAndEndingDoubleQuote(line0.get("P2", 0))); if (lines.size() > 0) { final boolean tryMerge = line0.get("VMERGE", 0) != null; final Note note = new Note(p1, p2, lines.toDisplay()); final Colors colors = color().getColor(line0, diagram.getSkinParam().getIHtmlColorSet()); note.setColors(colors); // note.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(line0.get("COLOR", 0))); note.setStyle(NoteStyle.getNoteStyle(line0.get("STYLE", 0))); if (line0.get("URL", 0) != null) { final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); final Url urlLink = urlBuilder.getUrl(line0.get("URL", 0)); note.setUrl(urlLink); } diagram.addNote(note, tryMerge); } return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/regex/000077500000000000000000000000001312650303100241425ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/command/regex/IRegex.java000066400000000000000000000027471312650303100262020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.regex; import java.util.Iterator; import java.util.Map; public interface IRegex { public String getPattern(); public int count(); public Map createPartialMatch(Iterator it); }plantuml-1.2017.15/src/net/sourceforge/plantuml/command/regex/Matcher2.java000066400000000000000000000071121312650303100264530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.regex; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Matcher2 { private final static boolean INSTRUMENT = false; private final Matcher matcher; private final String id; private Matcher2(Matcher matcher, String id) { this.matcher = matcher; this.id = id; } public static Matcher2 build(Pattern pattern, CharSequence input) { final long now = System.currentTimeMillis(); final String id = pattern.pattern(); try { return new Matcher2(pattern.matcher(input), id); } finally { if (INSTRUMENT) { addTime(id, System.currentTimeMillis() - now); } } } public boolean matches() { final long now = System.currentTimeMillis(); try { return matcher.matches(); } finally { addTime(System.currentTimeMillis() - now); } } private void addTime(long duration) { if (INSTRUMENT == false) { return; } addTime(id, duration); } private static final Map durations = new HashMap(); private static synchronized void addTime(String id, long duration) { Long total = durations.get(id); if (total == null) { total = 0L; } total += duration; durations.put(id, total); if (total > 200) { System.err.println("foo " + total + " " + id); } } public String group(int n) { final long now = System.currentTimeMillis(); try { return matcher.group(n); } finally { addTime(System.currentTimeMillis() - now); } } public String group() { final long now = System.currentTimeMillis(); try { return matcher.group(); } finally { addTime(System.currentTimeMillis() - now); } } public int groupCount() { final long now = System.currentTimeMillis(); try { return matcher.groupCount(); } finally { addTime(System.currentTimeMillis() - now); } } public boolean find() { final long now = System.currentTimeMillis(); try { return matcher.find(); } finally { addTime(System.currentTimeMillis() - now); } } public int end() { final long now = System.currentTimeMillis(); try { return matcher.end(); } finally { addTime(System.currentTimeMillis() - now); } } public int start() { final long now = System.currentTimeMillis(); try { return matcher.start(); } finally { addTime(System.currentTimeMillis() - now); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/regex/MatcherIterator.java000066400000000000000000000032631312650303100301060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.regex; import java.util.Iterator; public class MatcherIterator implements Iterator { private int cpt = 1; private final Matcher2 matcher; MatcherIterator(Matcher2 matcher) { this.matcher = matcher; } public boolean hasNext() { return cpt <= matcher.groupCount(); } public String next() { return matcher.group(cpt++); } public void remove() { throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/regex/MyPattern.java000066400000000000000000000060301312650303100267270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.regex; import java.util.regex.Pattern; // Splitter.java to be finished public abstract class MyPattern { public static Pattern2 cmpile(String p) { p = transformAndCheck(p); return new Pattern2(Pattern.compile(p)); } public static Pattern2 cmpileNockeck(String p) { p = transform(p); return new Pattern2(Pattern.compile(p)); } public static Pattern2 cmpile(String p, int type) { p = transformAndCheck(p); return new Pattern2(Pattern.compile(p, type)); } public static Pattern2 cmpileNockeck(String p, int type) { p = transform(p); return new Pattern2(Pattern.compile(p, type)); } private static String transformAndCheck(String p) { // if (p.contains("\\s")) { // Thread.dumpStack(); // System.err.println(p); // System.exit(0); // } // if (p.contains("'")) { // Thread.dumpStack(); // System.err.println(p); // System.exit(0); // } // if (p.contains("\"")) { // Thread.dumpStack(); // System.err.println(p); // System.exit(0); // } p = transform(p); // if (p.contains(" ") || p.contains("%")) { // Thread.dumpStack(); // System.err.println(p); // System.exit(0); // } return p; } private static String transform(String p) { // Replace ReadLineReader.java p = p.replaceAll("%s", "\\\\s\u00A0"); // space p = p.replaceAll("%q", "'\u2018\u2019"); // quote p = p.replaceAll("%g", "\"\u201c\u201d\u00ab\u00bb"); // double quote return p; } // public static boolean mtches(String input, String regex) { // return cmpile(regex).matcher(input).matches(); // } // public static boolean mtches(CharSequence input, String regex) { return cmpile(regex).matcher(input).matches(); } public static CharSequence removeAll(CharSequence src, String regex) { return src.toString().replaceAll(transform(regex), ""); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/regex/Pattern2.java000066400000000000000000000031121312650303100265010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.regex; import java.util.regex.Pattern; public class Pattern2 { private final Pattern pattern; public Pattern2(Pattern pattern) { this.pattern = pattern; } public Matcher2 matcher(CharSequence input) { return Matcher2.build(pattern, input); } public String pattern() { return pattern.pattern(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/regex/RegexComposed.java000066400000000000000000000050741312650303100275570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.regex; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; public abstract class RegexComposed implements IRegex { private final List partials; abstract protected Pattern2 getFull(); public RegexComposed(IRegex... partial) { this.partials = Arrays.asList(partial); } public Map createPartialMatch(Iterator it) { final Map result = new HashMap(); for (IRegex r : partials) { result.putAll(r.createPartialMatch(it)); } return result; } final public int count() { int cpt = getStartCount(); for (IRegex r : partials) { cpt += r.count(); } return cpt; } protected int getStartCount() { return 0; } public RegexResult matcher(String s) { final Matcher2 matcher = getFull().matcher(s); if (matcher.find() == false) { throw new IllegalArgumentException(getClass()+" "+s); } final Iterator it = new MatcherIterator(matcher); return new RegexResult(createPartialMatch(it)); } final public boolean match(String s) { return getFull().matcher(s).find(); } final public String getPattern() { return getFull().pattern(); } final protected List getPartials() { return partials; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/regex/RegexConcat.java000066400000000000000000000033261312650303100272130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.regex; import java.util.regex.Pattern; public class RegexConcat extends RegexComposed implements IRegex { private final Pattern2 full; public RegexConcat(IRegex... partial) { super(partial); final StringBuilder sb = new StringBuilder(); for (IRegex p : partial) { sb.append(p.getPattern()); } this.full = MyPattern.cmpileNockeck(sb.toString(), Pattern.CASE_INSENSITIVE); } @Override protected Pattern2 getFull() { return full; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/regex/RegexLeaf.java000066400000000000000000000045451312650303100266570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.regex; import java.util.Collections; import java.util.Iterator; import java.util.Map; import java.util.regex.Pattern; public class RegexLeaf implements IRegex { private final Pattern2 pattern; private final String name; private int count = -1; public RegexLeaf(String regex) { this(null, regex); } public RegexLeaf(String name, String regex) { this.pattern = MyPattern.cmpile(regex, Pattern.CASE_INSENSITIVE); this.name = name; } @Override public String toString() { return super.toString() + " " + name + " " + pattern; } public String getName() { return name; } public String getPattern() { return pattern.pattern(); } public int count() { if (count == -1) { count = pattern.matcher("").groupCount(); } return count; } public Map createPartialMatch(Iterator it) { final RegexPartialMatch m = new RegexPartialMatch(name); for (int i = 0; i < count(); i++) { final String group = it.next(); m.add(group); } if (name == null) { return Collections.emptyMap(); } return Collections.singletonMap(name, m); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/regex/RegexOptional.java000066400000000000000000000033231312650303100275660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.regex; import java.util.regex.Pattern; public class RegexOptional extends RegexComposed implements IRegex { private final Pattern2 full; public RegexOptional(IRegex partial) { super(partial); final StringBuilder sb = new StringBuilder("(?:"); sb.append(partial.getPattern()); sb.append(")?"); this.full = MyPattern.cmpileNockeck(sb.toString(), Pattern.CASE_INSENSITIVE); } @Override protected Pattern2 getFull() { return full; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/regex/RegexOr.java000066400000000000000000000046701312650303100263670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.regex; import java.util.HashMap; import java.util.Iterator; import java.util.Map; public class RegexOr extends RegexComposed implements IRegex { private final Pattern2 full; private final String name; public RegexOr(IRegex... partial) { this(null, partial); } public RegexOr(String name, IRegex... partial) { super(partial); this.name = name; final StringBuilder sb = new StringBuilder("("); if (name == null) { sb.append("?:"); } for (IRegex p : partial) { sb.append(p.getPattern()); sb.append("|"); } sb.setLength(sb.length() - 1); sb.append(')'); this.full = MyPattern.cmpileNockeck(sb.toString()); } @Override protected Pattern2 getFull() { return full; } protected int getStartCount() { return 1; } final public Map createPartialMatch(Iterator it) { final Map result = new HashMap(); final String fullGroup = name == null ? null : it.next(); result.putAll(super.createPartialMatch(it)); if (name != null) { final RegexPartialMatch m = new RegexPartialMatch(name); m.add(fullGroup); result.put(name, m); } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/regex/RegexPartialMatch.java000066400000000000000000000035721312650303100303600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.regex; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; public class RegexPartialMatch implements Iterable { private final List data = new ArrayList(); public RegexPartialMatch(String name) { } public void add(String group) { data.add(group); } public int size() { return data.size(); } public String get(int i) { return data.get(i); } public Iterator iterator() { return Collections.unmodifiableCollection(data).iterator(); } @Override public String toString() { return "{" + data + "}"; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/command/regex/RegexResult.java000066400000000000000000000043411312650303100272600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.command.regex; import java.util.Collections; import java.util.Map; public class RegexResult { private final Map data; public RegexResult(Map data) { this.data = Collections.unmodifiableMap(data); } @Override public String toString() { return data.toString(); } public RegexPartialMatch get(String key) { return data.get(key); } public String get(String key, int num) { final RegexPartialMatch reg = data.get(key); if (reg == null) { return null; } return reg.get(num); } public String getLazzy(String key, int num) { for (Map.Entry ent : data.entrySet()) { if (ent.getKey().startsWith(key) == false) { continue; } final RegexPartialMatch match = ent.getValue(); if (num >= match.size()) { continue; } if (match.get(num) != null) { return ent.getValue().get(num); } } return null; } public int size() { return data.size(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/compositediagram/000077500000000000000000000000001312650303100247415ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/compositediagram/CompositeDiagram.java000066400000000000000000000040341312650303100310340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.compositediagram; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.graphic.USymbol; public class CompositeDiagram extends AbstractEntityDiagram { @Override public IEntity getOrCreateLeaf(Code code, LeafType type, USymbol symbol) { if (type == null) { if (isGroup(code)) { return getGroup(code); } return getOrCreateLeafDefault(code, LeafType.BLOCK, symbol); } return getOrCreateLeafDefault(code, type, symbol); } @Override public UmlDiagramType getUmlDiagramType() { return UmlDiagramType.COMPOSITE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/compositediagram/CompositeDiagramFactory.java000066400000000000000000000043261312650303100323700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.compositediagram; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.UmlDiagramFactory; import net.sourceforge.plantuml.compositediagram.command.CommandCreateBlock; import net.sourceforge.plantuml.compositediagram.command.CommandCreatePackageBlock; import net.sourceforge.plantuml.compositediagram.command.CommandEndPackageBlock; import net.sourceforge.plantuml.compositediagram.command.CommandLinkBlock; public class CompositeDiagramFactory extends UmlDiagramFactory { @Override protected List createCommands() { final List cmds = new ArrayList(); cmds.add(new CommandCreateBlock()); cmds.add(new CommandLinkBlock()); cmds.add(new CommandCreatePackageBlock()); cmds.add(new CommandEndPackageBlock()); addCommonCommands(cmds); return cmds; } @Override public CompositeDiagram createEmptyDiagram() { return new CompositeDiagram(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/compositediagram/command/000077500000000000000000000000001312650303100263575ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/compositediagram/command/CommandCreateBlock.java000066400000000000000000000043431312650303100327030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.compositediagram.command; import java.util.List; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; import net.sourceforge.plantuml.compositediagram.CompositeDiagram; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; public class CommandCreateBlock extends SingleLineCommand { public CommandCreateBlock() { super("(?i)^(?:block[%s]+)(?:[%g]([^%g]+)[%g][%s]+as[%s]+)?([\\p{L}0-9_.]+)$"); } @Override protected CommandExecutionResult executeArg(CompositeDiagram diagram, List arg) { String display = arg.get(0); final Code code = Code.of(arg.get(1)); if (display == null) { display = code.getFullName(); } final IEntity ent = diagram.getOrCreateLeaf(code, null, null); ent.setDisplay(Display.getWithNewlines(display)); return CommandExecutionResult.ok(); } } CommandCreatePackageBlock.java000066400000000000000000000045471312650303100341060ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/compositediagram/command/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.compositediagram.command; import java.util.List; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; import net.sourceforge.plantuml.compositediagram.CompositeDiagram; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IGroup; public class CommandCreatePackageBlock extends SingleLineCommand { public CommandCreatePackageBlock() { super("(?i)^block[%s]+(?:[%g]([^%g]+)[%g][%s]+as[%s]+)?([\\p{L}0-9_.]+)(?:[%s]*\\{|[%s]+begin)$"); } @Override protected CommandExecutionResult executeArg(CompositeDiagram diagram, List arg) { final IGroup currentPackage = diagram.getCurrentGroup(); String display = arg.get(0); final Code code = Code.of(arg.get(1)); if (display == null) { display = code.getFullName(); } diagram.getOrCreateGroup(code, Display.getWithNewlines(display), GroupType.PACKAGE, currentPackage); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/compositediagram/command/CommandEndPackageBlock.java000066400000000000000000000040251312650303100334570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.compositediagram.command; import java.util.List; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; import net.sourceforge.plantuml.compositediagram.CompositeDiagram; import net.sourceforge.plantuml.cucadiagram.IEntity; public class CommandEndPackageBlock extends SingleLineCommand { public CommandEndPackageBlock() { super("(?i)^(end[%s]?block|\\})$"); } @Override protected CommandExecutionResult executeArg(CompositeDiagram diagram, List arg) { final IEntity currentPackage = diagram.getCurrentGroup(); if (currentPackage == null) { return CommandExecutionResult.error("No inner block defined"); } diagram.endGroup(); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/compositediagram/command/CommandLinkBlock.java000066400000000000000000000056651312650303100324050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.compositediagram.command; import java.util.List; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; import net.sourceforge.plantuml.compositediagram.CompositeDiagram; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; public class CommandLinkBlock extends SingleLineCommand { public CommandLinkBlock() { super("(?i)^([\\p{L}0-9_.]+)[%s]*(\\[\\]|\\*\\))?([=-]+|\\.+)(\\[\\]|\\(\\*)?[%s]*([\\p{L}0-9_.]+)[%s]*(?::[%s]*(\\S*+))?$"); } @Override protected CommandExecutionResult executeArg(CompositeDiagram diagram, List arg) { final IEntity cl1 = diagram.getOrCreateLeaf(Code.of(arg.get(0)), null, null); final IEntity cl2 = diagram.getOrCreateLeaf(Code.of(arg.get(4)), null, null); final String deco1 = arg.get(1); final String deco2 = arg.get(3); LinkType linkType = new LinkType(getLinkDecor(deco1), getLinkDecor(deco2)); if ("*)".equals(deco1)) { linkType = linkType.getInterfaceProvider(); } else if ("(*".equals(deco2)) { linkType = linkType.getInterfaceUser(); } final String queue = arg.get(2); final Link link = new Link(cl1, cl2, linkType, Display.getWithNewlines(arg.get(5)), queue.length()); diagram.addLink(link); return CommandExecutionResult.ok(); } private LinkDecor getLinkDecor(String s) { if ("[]".equals(s)) { return LinkDecor.SQUARRE_toberemoved; } return LinkDecor.NONE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/core/000077500000000000000000000000001312650303100223425ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/core/Diagram.java000066400000000000000000000047701312650303100245610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.core; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.FileFormatOption; /** * Represents a single diagram. A Diagram could be a UML (sequence diagram, class diagram...) or an non-UML diagram. * * @author Arnaud Roques */ public interface Diagram { /** * Export the diagram as an image to some format. Note that a diagram could be drawn as several images (think about * new page for sequence diagram for example). * * @param os * where to write the image * @param num * usually 0 (index of the image to be exported for this diagram). * @param fileFormat * file format to use * * @return a description of the generated image * * @throws IOException */ ImageData exportDiagram(OutputStream os, int num, FileFormatOption fileFormat) throws IOException; /** * Number of images in this diagram (usually, 1) * * @return usually 1 */ int getNbImages(); DiagramDescription getDescription(); String getMetadata(); String getWarningOrError(); /** * The original source of the diagram * * @return */ UmlSource getSource(); /** * Check if the Diagram have some links. * * @return */ public boolean hasUrl(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/core/DiagramDescription.java000066400000000000000000000030461312650303100267600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.core; public class DiagramDescription { private final String description; public DiagramDescription(String description) { this.description = description; } public String getDescription() { return description; } @Override public String toString() { return description; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/core/DiagramType.java000066400000000000000000000052541312650303100254210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.core; import net.sourceforge.plantuml.utils.StartUtils; public enum DiagramType { UML, BPM, DITAA, DOT, PROJECT, JCCKIT, SALT, FLOW, CREOLE, JUNGLE, CUTE, MATH, LATEX, DEFINITION, UNKNOWN; static public DiagramType getTypeFromArobaseStart(String s) { s = s.toLowerCase(); // if (s.startsWith("@startuml2")) { // return UML2; // } if (StartUtils.startsWithSymbolAnd("startbpm", s)) { return BPM; } if (StartUtils.startsWithSymbolAnd("startuml", s)) { return UML; } if (StartUtils.startsWithSymbolAnd("startdot", s)) { return DOT; } if (StartUtils.startsWithSymbolAnd("startjcckit", s)) { return JCCKIT; } if (StartUtils.startsWithSymbolAnd("startditaa", s)) { return DITAA; } if (StartUtils.startsWithSymbolAnd("startproject", s)) { return PROJECT; } if (StartUtils.startsWithSymbolAnd("startsalt", s)) { return SALT; } if (StartUtils.startsWithSymbolAnd("startflow", s)) { return FLOW; } if (StartUtils.startsWithSymbolAnd("startcreole", s)) { return CREOLE; } if (StartUtils.startsWithSymbolAnd("starttree", s)) { return JUNGLE; } if (StartUtils.startsWithSymbolAnd("startcute", s)) { return CUTE; } if (StartUtils.startsWithSymbolAnd("startmath", s)) { return MATH; } if (StartUtils.startsWithSymbolAnd("startlatex", s)) { return LATEX; } if (StartUtils.startsWithSymbolAnd("startdef", s)) { return DEFINITION; } return UNKNOWN; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/core/ImageData.java000066400000000000000000000051031312650303100250200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.core; // Remove CmapData and Dimension2D // Merge CucaDiagramFileMakerResult /** * Information about a generated image for a diagram. * For some diagrams, there are some position information about elements * from the diagram. In that case, the method containsCMapData() returns * true and you can retrieve those information using * getCMapData() method. * * @author Arnaud Roques * */ public interface ImageData { /** * Width in pixel of the image. * @return */ public int getWidth(); /** * Height in pixel of the image. * @return */ public int getHeight(); /** * Indicates if the image has some position information. * @return true if the image has position information. */ public boolean containsCMapData(); /** * Return position information as a CMap formated string. * For example, if you call this method with nameId * set to "foo_map", you will get something like: * *

	 * <map id="foo_map" name="foo_map">
	 * <area shape="rect" id="..." href="..." title="..." alt="" coords="64,68,93,148"/>
	 * </map>
	 * 
* * @param nameId thie id to be used in the cmap data string. * @return */ public String getCMapData(String nameId); public String getWarningOrError(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/core/UmlSource.java000066400000000000000000000146371312650303100251360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.core; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.CharSequence2; import net.sourceforge.plantuml.CharSequence2Impl; import net.sourceforge.plantuml.LineLocation; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.utils.StartUtils; import net.sourceforge.plantuml.version.IteratorCounter2; import net.sourceforge.plantuml.version.IteratorCounter2Impl; /** * Represents the textual source of some diagram. The source should start with a @startfoo and end with * @endfoo. *

* So the diagram does not have to be a UML one. * * @author Arnaud Roques * */ final public class UmlSource { final private List source; final private List source2; // final private int startLine; // final private LineLocation startLocation; /** * Build the source from a text. * * @param source * the source of the diagram * @param checkEndingBackslash * true if an ending backslash means that a line has to be collapsed with the following one. * @param startLine */ public UmlSource(List source, boolean checkEndingBackslash, int startLine) { // this.startLocation = source.get(0).getLocation(); // this.startLine = startLine; final List tmp = new ArrayList(); final List tmp2 = new ArrayList(); if (checkEndingBackslash) { final StringBuilder pending = new StringBuilder(); for (CharSequence2 cs : source) { final String s = cs.toString2(); if (StringUtils.endsWithBackslash(s)) { pending.append(s.substring(0, s.length() - 1)); } else { pending.append(s); tmp.add(pending.toString()); tmp2.add(new CharSequence2Impl(pending.toString(), cs.getLocation())); pending.setLength(0); } } } else { for (CharSequence2 s : source) { tmp.add(s.toString2()); tmp2.add(s); } } this.source = Collections.unmodifiableList(tmp); this.source2 = Collections.unmodifiableList(tmp2); } /** * Retrieve the type of the diagram. This is based on the first line @startfoo. * * @return the type of the diagram. */ public DiagramType getDiagramType() { return DiagramType.getTypeFromArobaseStart(source.get(0)); } /** * Allows to iterator over the source. * * @return a iterator that allow counting line number. */ public IteratorCounter2 iterator2() { return new IteratorCounter2Impl(source2); } /** * Return the source as a single String with \n as line separator. * * @return the whole diagram source */ public String getPlainString() { final StringBuilder sb = new StringBuilder(); for (String s : source) { sb.append(s); sb.append('\r'); sb.append(BackSlash.CHAR_NEWLINE); } return sb.toString(); } public long seed() { long h = 1125899906842597L; // prime final String string = getPlainString(); final int len = string.length(); for (int i = 0; i < len; i++) { h = 31 * h + string.charAt(i); } return h; } /** * Return a specific line of the diagram description. * * @param n * line number, starting at 0 * @return */ private String getLine(int n) { if (n < 0 || n >= source.size()) { return ""; } return source.get(n); } public String getLine(LineLocation n) { for (CharSequence2 s : source2) { if (s.getLocation().compareTo(n) == 0) { return s.toString(); } } return null; } /** * Return the number of line in the diagram. * * @return */ public int getTotalLineCount() { return source.size(); } /** * Check if a source diagram description is empty. Does not take comment line into account. * * @return true if the diagram does not contain information. */ public boolean isEmpty() { for (String s : source) { if (StartUtils.isArobaseStartDiagram(s)) { continue; } if (StartUtils.isArobaseEndDiagram(s)) { continue; } if (s.matches("\\s*'.*")) { continue; } if (StringUtils.trin(s).length() != 0) { return false; } } return true; } /** * Retrieve the title, if defined in the diagram source. Never return null. * * @return */ public Display getTitle() { final Pattern2 p = MyPattern.cmpile("(?i)^[%s]*title[%s]+(.+)$"); for (String s : source) { final Matcher2 m = p.matcher(s); final boolean ok = m.matches(); if (ok) { return Display.create(m.group(1)); } } return Display.empty(); } public boolean isStartDef() { return source.get(0).startsWith("@startdef"); } public String getId() { final Pattern p = Pattern.compile("id=([\\w]+)\\b"); final Matcher m = p.matcher(source.get(0)); if (m.find()) { return m.group(1); } return null; } // public final int getStartLine() { // return startLine; // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/core/package.html000066400000000000000000000024661312650303100246330ustar00rootroot00000000000000

Core classes used by PlantUML.

Overview

This package the basic classes used by PlantUML.

Classes in this package are supposed to be quite stable over time. plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/000077500000000000000000000000001312650303100226635ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/Atom.java000066400000000000000000000032321312650303100244260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UShape; interface Atom extends UShape { public Dimension2D calculateDimension(StringBounder stringBounder); public double getStartingAltitude(StringBounder stringBounder); public void drawU(UGraphic ug); } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/AtomEmbededSystem.java000066400000000000000000000071351312650303100271070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.List; import javax.imageio.ImageIO; import net.sourceforge.plantuml.BlockUml; import net.sourceforge.plantuml.CharSequence2; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.EmbededDiagram; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UShape; class AtomEmbededSystem implements Atom { final private List lines2; public AtomEmbededSystem(EmbededDiagram sys) { this.lines2 = sys.getLines().as2(); } public double getStartingAltitude(StringBounder stringBounder) { return 0; } public Dimension2D calculateDimension(StringBounder stringBounder) { try { final BufferedImage im = getImage(); return new Dimension2DDouble(im.getWidth(), im.getHeight()); } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } return new Dimension2DDouble(42, 42); } public void drawU(UGraphic ug) { try { final BufferedImage im = getImage(); final UShape image = new UImage(im); ug.draw(image); } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } } private BufferedImage getImage() throws IOException, InterruptedException { final Diagram system = getSystem(); final ByteArrayOutputStream os = new ByteArrayOutputStream(); system.exportDiagram(os, 0, new FileFormatOption(FileFormat.PNG)); os.close(); final ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray()); final BufferedImage im = ImageIO.read(is); is.close(); return im; } // public HorizontalAlignment getHorizontalAlignment() { // return HorizontalAlignment.LEFT; // } // private Diagram getSystem() throws IOException, InterruptedException { final BlockUml blockUml = new BlockUml(lines2, 0, Defines.createEmpty()); return blockUml.getDiagram(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/AtomImg.java000066400000000000000000000116621312650303100250710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.Font; import java.awt.geom.Dimension2D; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import javax.imageio.ImageIO; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FileSystem; import net.sourceforge.plantuml.code.Base64Coder; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.ImgValign; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TileImageSvg; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; public class AtomImg implements Atom { private static final String DATA_IMAGE_PNG_BASE64 = "data:image/png;base64,"; private final BufferedImage image; private final double scale; private AtomImg(BufferedImage image, double scale) { this.image = image; this.scale = scale; } public static Atom create(String src, final ImgValign valign, final int vspace, final double scale) { final UFont font = UFont.monospaced(14); final FontConfiguration fc = FontConfiguration.blackBlueTrue(font); if (src.startsWith(DATA_IMAGE_PNG_BASE64)) { final String data = src.substring(DATA_IMAGE_PNG_BASE64.length(), src.length()); try { final byte bytes[] = Base64Coder.decode(data); return build(src, fc, bytes, scale); } catch (Exception e) { return AtomText.create("ERROR " + e.toString(), fc); } } try { final File f = FileSystem.getInstance().getFile(src); if (f.exists() == false) { // Check if valid URL if (src.startsWith("http:") || src.startsWith("https:")) { final byte image[] = getFile(src); return build(src, fc, image, scale); } return AtomText.create("(File not found: " + f + ")", fc); } if (f.getName().endsWith(".svg")) { return new AtomImgSvg(new TileImageSvg(f)); } final BufferedImage read = ImageIO.read(f); if (read == null) { return AtomText.create("(Cannot decode: " + f + ")", fc); } return new AtomImg(ImageIO.read(f), scale); } catch (IOException e) { return AtomText.create("ERROR " + e.toString(), fc); } } private static Atom build(String source, final FontConfiguration fc, final byte[] data, double scale) throws IOException { final BufferedImage read = ImageIO.read(new ByteArrayInputStream(data)); if (read == null) { return AtomText.create("(Cannot decode: " + source + ")", fc); } return new AtomImg(read, scale); } // Added by Alain Corbiere static byte[] getFile(String host) throws IOException { final ByteArrayOutputStream image = new ByteArrayOutputStream(); InputStream input = null; try { final URL url = new URL(host); final URLConnection connection = url.openConnection(); input = connection.getInputStream(); final byte[] buffer = new byte[1024]; int read; while ((read = input.read(buffer)) > 0) { image.write(buffer, 0, read); } image.close(); return image.toByteArray(); } finally { if (input != null) { input.close(); } } } // End public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(image.getWidth() * scale, image.getHeight() * scale); } public double getStartingAltitude(StringBounder stringBounder) { return 0; } public void drawU(UGraphic ug) { // final double h = calculateDimension(ug.getStringBounder()).getHeight(); ug.draw(new UImage(image, scale)); // tileImage.drawU(ug.apply(new UTranslate(0, -h))); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/AtomImgSvg.java000066400000000000000000000036261312650303100255520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TileImageSvg; import net.sourceforge.plantuml.ugraphic.UGraphic; public class AtomImgSvg implements Atom { private final TileImageSvg tileImageSvg; public AtomImgSvg(TileImageSvg tileImageSvg) { this.tileImageSvg = tileImageSvg; } public Dimension2D calculateDimension(StringBounder stringBounder) { return tileImageSvg.calculateDimension(stringBounder); } public double getStartingAltitude(StringBounder stringBounder) { return 0; } public void drawU(UGraphic ug) { tileImageSvg.drawU(ug); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/AtomMath.java000066400000000000000000000066001312650303100252420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.Color; import java.awt.geom.Dimension2D; import java.awt.image.BufferedImage; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.SvgString; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorSimple; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.math.ScientificEquationSafe; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UImageSvg; public class AtomMath implements Atom { private final double scale; private final ScientificEquationSafe math; private final HtmlColor foreground; private final HtmlColor background; public AtomMath(ScientificEquationSafe math, HtmlColor foreground, HtmlColor background, double scale) { this.math = math; this.foreground = foreground; this.background = background; this.scale = scale; } private Dimension2D calculateDimensionSlow(StringBounder stringBounder) { final BufferedImage image = math.getImage(scale, Color.BLACK, Color.WHITE); return new Dimension2DDouble(image.getWidth(), image.getHeight()); } private Dimension2D dim; public Dimension2D calculateDimension(StringBounder stringBounder) { if (dim == null) { dim = calculateDimensionSlow(stringBounder); } return dim; } public double getStartingAltitude(StringBounder stringBounder) { return 0; } public void drawU(UGraphic ug) { final boolean isSvg = ug.matchesProperty("SVG"); final Color back; if (isSvg && background == null) { back = null; } else { back = getColor(background == null ? ug.getParam().getBackcolor() : background, Color.WHITE); } final Color fore = getColor(foreground, Color.BLACK); if (isSvg) { final SvgString svg = math.getSvg(scale, fore, back); ug.draw(new UImageSvg(svg)); } else { ug.draw(new UImage(math.getImage(scale, fore, back))); } } private Color getColor(HtmlColor color, Color defaultValue) { if (color instanceof HtmlColorSimple) { return ((HtmlColorSimple) color).getColor999(); } return defaultValue; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/AtomOpenIcon.java000066400000000000000000000046321312650303100260660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.openiconic.OpenIcon; import net.sourceforge.plantuml.ugraphic.UGraphic; public class AtomOpenIcon implements Atom { private final OpenIcon openIcon; private final FontConfiguration fontConfiguration; private final double factor; public AtomOpenIcon(OpenIcon openIcon, FontConfiguration fontConfiguration) { this.openIcon = openIcon; this.fontConfiguration = fontConfiguration; this.factor = fontConfiguration.getSize2D() / 12; } private TextBlock asTextBlock() { return TextBlockUtils.withMargin(openIcon.asTextBlock(fontConfiguration.getColor(), factor), 1, 0); } public Dimension2D calculateDimension(StringBounder stringBounder) { return asTextBlock().calculateDimension(stringBounder); } public double getStartingAltitude(StringBounder stringBounder) { return -3 * factor; } public void drawU(UGraphic ug) { asTextBlock().drawU(ug); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/AtomSpace.java000066400000000000000000000036171312650303100254110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; public class AtomSpace implements Atom { private final double width; public static Atom create(double width) { return new AtomSpace(width); } private AtomSpace(double width) { this.width = width; } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, 1); } public double getStartingAltitude(StringBounder stringBounder) { return 0; } public void drawU(UGraphic ug) { } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/AtomSprite.java000066400000000000000000000040551312650303100256210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UGraphic; public class AtomSprite implements Atom { private final TextBlock sprite; private final FontConfiguration fontConfiguration; public AtomSprite(TextBlock sprite, FontConfiguration fontConfiguration) { this.sprite = sprite; this.fontConfiguration = fontConfiguration; } public Dimension2D calculateDimension(StringBounder stringBounder) { return sprite.calculateDimension(stringBounder); } public double getStartingAltitude(StringBounder stringBounder) { return -3; } public void drawU(UGraphic ug) { sprite.drawU(ug); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/AtomTable.java000066400000000000000000000170761312650303100254110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UTranslate; public class AtomTable implements Atom { class Line { private final List cells = new ArrayList(); private final List cellsBackColor = new ArrayList(); private final HtmlColor lineBackColor; private Line(HtmlColor lineBackColor) { this.lineBackColor = lineBackColor; } public void add(Atom cell, HtmlColor cellBackColor) { cells.add(cell); cellsBackColor.add(cellBackColor); } public int size() { return cells.size(); } @Override public String toString() { return super.toString() + " " + cells.size(); } } private final List lines = new ArrayList(); private final Map positions = new HashMap(); private final HtmlColor lineColor; public AtomTable(HtmlColor lineColor) { this.lineColor = lineColor; } public Dimension2D calculateDimension(StringBounder stringBounder) { initMap(stringBounder); final double width = getEndingX(getNbCols() - 1); final double height = getEndingY(getNbLines() - 1); return new Dimension2DDouble(width, height); } public double getStartingAltitude(StringBounder stringBounder) { return 0; } public void drawU(UGraphic ug) { initMap(ug.getStringBounder()); for (int i = 0; i < getNbLines(); i++) { final Line line = lines.get(i); if (line.lineBackColor != null) { final double y1 = getStartingY(i); final double y2 = getStartingY(i + 1); final double x1 = getStartingX(0); final double x2 = getStartingX(getNbCols()); ug.apply(new UChangeColor(null)).apply(new UChangeBackColor(line.lineBackColor)) .apply(new UTranslate(x1, y1)).draw(new URectangle(x2 - x1, y2 - y1)); } for (int j = 0; j < getNbCols(); j++) { if (j >= line.cells.size()) { continue; } final Atom cell = line.cells.get(j); HorizontalAlignment align = HorizontalAlignment.LEFT; if (cell instanceof SheetBlock1) { align = ((SheetBlock1) cell).getCellAlignment(); } final HtmlColor cellBackColor = line.cellsBackColor.get(j); final double x1 = getStartingX(j); final double x2 = getStartingX(j + 1); final double cellWidth = x2 - x1; if (cellBackColor != null) { final double y1 = getStartingY(i); final double y2 = getStartingY(i + 1); ug.apply(new UChangeColor(null)).apply(new UChangeBackColor(cellBackColor)) .apply(new UTranslate(x1, y1)).draw(new URectangle(x2 - x1, y2 - y1)); } final Position pos = positions.get(cell); final Dimension2D dimCell = cell.calculateDimension(ug.getStringBounder()); final double dx; if (align == HorizontalAlignment.RIGHT) { dx = cellWidth - dimCell.getWidth(); } else { dx = 0; } cell.drawU(ug.apply(pos.getTranslate().compose(new UTranslate(dx, 0)))); } } ug = ug.apply(new UChangeColor(lineColor)); final ULine hline = new ULine(getEndingX(getNbCols() - 1), 0); for (int i = 0; i <= getNbLines(); i++) { ug.apply(new UTranslate(0, getStartingY(i))).draw(hline); } final ULine vline = new ULine(0, getEndingY(getNbLines() - 1)); for (int i = 0; i <= getNbCols(); i++) { ug.apply(new UTranslate(getStartingX(i), 0)).draw(vline); } } private void initMap(StringBounder stringBounder) { if (positions.size() > 0) { return; } for (Line line : lines) { for (Atom cell : line.cells) { final Dimension2D dim = cell.calculateDimension(stringBounder); final Position pos = new Position(0, 0, dim); positions.put(cell, pos); } } for (int i = 0; i < lines.size(); i++) { for (int j = 0; j < lines.get(i).size(); j++) { final Atom cell = lines.get(i).cells.get(j); final Dimension2D dim = cell.calculateDimension(stringBounder); final double x = getStartingX(j); final double y = getStartingY(i); final Position pos = new Position(x, y, dim); positions.put(cell, pos); } } } private double getStartingX(int col) { double result = 0; for (int i = 0; i < col; i++) { result += getColWidth(i); } return result; } private double getEndingX(int col) { double result = 0; for (int i = 0; i <= col; i++) { result += getColWidth(i); } return result; } private double getStartingY(int line) { double result = 0; for (int i = 0; i < line; i++) { result += getLineHeight(i); } return result; } private double getEndingY(int line) { double result = 0; for (int i = 0; i <= line; i++) { result += getLineHeight(i); } return result; } private double getColWidth(int col) { double result = 0; for (int i = 0; i < getNbLines(); i++) { final Position position = getPosition(i, col); if (position == null) { continue; } final double width = position.getWidth(); result = Math.max(result, width); } return result; } private double getLineHeight(int line) { double result = 0; for (int i = 0; i < getNbCols(); i++) { final Position position = getPosition(line, i); if (position == null) { continue; } final double height = position.getHeight(); result = Math.max(result, height); } return result; } private Position getPosition(int line, int col) { if (line >= lines.size()) { return null; } final Line l = lines.get(line); if (col >= l.cells.size()) { return null; } final Atom atom = l.cells.get(col); return positions.get(atom); } private int getNbCols() { return lines.get(0).size(); } private int getNbLines() { return lines.size(); } private Line lastLine() { return lines.get(lines.size() - 1); } public void addCell(Atom cell, HtmlColor cellBackColor) { lastLine().add(cell, cellBackColor); positions.clear(); } public void newLine(HtmlColor lineBackColor) { lines.add(new Line(lineBackColor)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/AtomText.java000066400000000000000000000224511312650303100252770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.font.LineMetrics; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.StringTokenizer; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UText; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.utils.CharHidder; public class AtomText implements Atom { interface DelayedDouble { public double getDouble(StringBounder stringBounder); } private static DelayedDouble ZERO = new DelayedDouble() { public double getDouble(StringBounder stringBounder) { return 0; } }; private final FontConfiguration fontConfiguration; private final String text; private final DelayedDouble marginLeft; private final DelayedDouble marginRight; private final Url url; public static Atom create(String text, FontConfiguration fontConfiguration) { return new AtomText(text, fontConfiguration, null, ZERO, ZERO); } public static Atom createUrl(Url url, FontConfiguration fontConfiguration) { fontConfiguration = fontConfiguration.hyperlink(); final Display display = Display.getWithNewlines(url.getLabel()); if (display.size() > 1) { final List all = new ArrayList(); for (CharSequence s : display.as()) { all.add(new AtomText(s.toString(), fontConfiguration, url, ZERO, ZERO)); } return new AtomTexts(all); } return new AtomText(url.getLabel(), fontConfiguration, url, ZERO, ZERO); } public static AtomText createHeading(String text, FontConfiguration fontConfiguration, int order) { if (order == 0) { fontConfiguration = fontConfiguration.bigger(4).bold(); } else if (order == 1) { fontConfiguration = fontConfiguration.bigger(2).bold(); } else if (order == 2) { fontConfiguration = fontConfiguration.bigger(1).bold(); } else { fontConfiguration = fontConfiguration.italic(); } return new AtomText(text, fontConfiguration, null, ZERO, ZERO); } public static Atom createListNumber(final FontConfiguration fontConfiguration, final int order, int localNumber) { final DelayedDouble left = new DelayedDouble() { public double getDouble(StringBounder stringBounder) { final Dimension2D dim = stringBounder.calculateDimension(fontConfiguration.getFont(), "9. "); return dim.getWidth() * order; } }; final DelayedDouble right = new DelayedDouble() { public double getDouble(StringBounder stringBounder) { final Dimension2D dim = stringBounder.calculateDimension(fontConfiguration.getFont(), "."); return dim.getWidth(); } }; return new AtomText("" + (localNumber + 1) + ".", fontConfiguration, null, left, right); } @Override public String toString() { return text + " " + fontConfiguration; } private AtomText(String text, FontConfiguration style, Url url, DelayedDouble marginLeft, DelayedDouble marginRight) { if (text.contains("" + BackSlash.hiddenNewLine())) { throw new IllegalArgumentException(text); } this.marginLeft = marginLeft; this.marginRight = marginRight; // this.text = StringUtils.showComparatorCharacters(StringUtils.manageBackslash(text)); this.text = StringUtils.manageTildeArobaseStart(StringUtils.manageUnicodeNotationUplus(StringUtils .manageAmpDiese(StringUtils.showComparatorCharacters(CharHidder.unhide(text))))); this.fontConfiguration = style; this.url = url; } public FontConfiguration getFontConfiguration() { return fontConfiguration; } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D rect = stringBounder.calculateDimension(fontConfiguration.getFont(), text); Log.debug("g2d=" + rect); Log.debug("Size for " + text + " is " + rect); double h = rect.getHeight(); if (h < 10) { h = 10; } final double width = text.indexOf('\t') == -1 ? rect.getWidth() : getWidth(stringBounder); final double left = marginLeft.getDouble(stringBounder); final double right = marginRight.getDouble(stringBounder); return new Dimension2DDouble(width + left + right, h); } private double getDescent() { final LineMetrics fm = TextBlockUtils.getLineMetrics(fontConfiguration.getFont(), text); final double descent = fm.getDescent(); return descent; } public double getFontSize2D() { return fontConfiguration.getFont().getSize2D(); } public double getStartingAltitude(StringBounder stringBounder) { return fontConfiguration.getSpace(); } private double getTabSize(StringBounder stringBounder) { return stringBounder.calculateDimension(fontConfiguration.getFont(), tabString()).getWidth(); } private String tabString() { final int nb = fontConfiguration.getTabSize(); if (nb >= 1 && nb < 7) { return " ".substring(0, nb); } return " "; } public void drawU(UGraphic ug) { if (ug.matchesProperty("SPECIALTXT")) { ug.draw(this); return; } if (url != null) { ug.startUrl(url); } ug = ug.apply(new UChangeColor(fontConfiguration.getColor())); if (marginLeft != ZERO) { ug = ug.apply(new UTranslate(marginLeft.getDouble(ug.getStringBounder()), 0)); } final StringTokenizer tokenizer = new StringTokenizer(text, "\t", true); double x = 0; // final int ypos = fontConfiguration.getSpace(); final Dimension2D rect = ug.getStringBounder().calculateDimension(fontConfiguration.getFont(), text); final double descent = getDescent(); final double ypos = rect.getHeight() - descent; if (tokenizer.hasMoreTokens()) { final double tabSize = getTabSize(ug.getStringBounder()); while (tokenizer.hasMoreTokens()) { final String s = tokenizer.nextToken(); if (s.equals("\t")) { final double remainder = x % tabSize; x += tabSize - remainder; } else { final UText utext = new UText(s, fontConfiguration); final Dimension2D dim = ug.getStringBounder().calculateDimension(fontConfiguration.getFont(), s); ug.apply(new UTranslate(x, ypos)).draw(utext); x += dim.getWidth(); } } } if (url != null) { ug.closeAction(); } } private double getWidth(StringBounder stringBounder) { return getWidth(stringBounder, text); } private double getWidth(StringBounder stringBounder, String text) { final StringTokenizer tokenizer = new StringTokenizer(text, "\t", true); final double tabSize = getTabSize(stringBounder); double x = 0; while (tokenizer.hasMoreTokens()) { final String s = tokenizer.nextToken(); if (s.equals("\t")) { final double remainder = x % tabSize; x += tabSize - remainder; } else { final Dimension2D dim = stringBounder.calculateDimension(fontConfiguration.getFont(), s); x += dim.getWidth(); } } return x; } public List getSplitted(StringBounder stringBounder, LineBreakStrategy maxWidthAsString) { final double maxWidth = maxWidthAsString.getMathWidth(); final List result = new ArrayList(); final StringTokenizer st = new StringTokenizer(text, " ", true); final StringBuilder currentLine = new StringBuilder(); while (st.hasMoreTokens()) { final String token = st.nextToken(); final double w = getWidth(stringBounder, currentLine + token); if (w > maxWidth) { result.add(new AtomText(currentLine.toString(), fontConfiguration, url, marginLeft, marginRight)); currentLine.setLength(0); if (token.startsWith(" ") == false) { currentLine.append(token); } } else { currentLine.append(token); } } result.add(new AtomText(currentLine.toString(), fontConfiguration, url, marginLeft, marginRight)); return Collections.unmodifiableList(result); } public final String getText() { return text; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/AtomTexts.java000066400000000000000000000045451312650303100254660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import java.util.List; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class AtomTexts implements Atom { private final List all; public AtomTexts(List texts) { this.all = texts; } public Dimension2D calculateDimension(StringBounder stringBounder) { double width = 0; double height = 0; for (AtomText text : all) { final Dimension2D dim = text.calculateDimension(stringBounder); width = Math.max(width, dim.getWidth()); height += dim.getHeight(); } return new Dimension2DDouble(width, height); } public double getStartingAltitude(StringBounder stringBounder) { return all.get(0).getStartingAltitude(stringBounder); } public void drawU(UGraphic ug) { double y = 0; for (AtomText text : all) { final Dimension2D dim = text.calculateDimension(ug.getStringBounder()); text.drawU(ug.apply(new UTranslate(0, y))); y += dim.getHeight(); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/AtomTree.java000066400000000000000000000064761312650303100252630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.salt.element.Skeleton2; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class AtomTree implements Atom { private final HtmlColor lineColor; private final List cells = new ArrayList(); private final Map levels = new HashMap(); private final double margin = 2; public AtomTree(HtmlColor lineColor) { this.lineColor = lineColor; } public Dimension2D calculateDimension(StringBounder stringBounder) { final Skeleton2 skeleton = new Skeleton2(); double width = 0; double height = 0; for (Atom cell : cells) { final Dimension2D dim = cell.calculateDimension(stringBounder); height += dim.getHeight(); final int level = getLevel(cell); width = Math.max(width, skeleton.getXEndForLevel(level) + margin + dim.getWidth()); } return new Dimension2DDouble(width, height); } public double getStartingAltitude(StringBounder stringBounder) { return 0; } public void drawU(final UGraphic ugInit) { final Skeleton2 skeleton = new Skeleton2(); double y = 0; UGraphic ug = ugInit; for (Atom cell : cells) { final int level = getLevel(cell); cell.drawU(ug.apply(new UTranslate(margin + skeleton.getXEndForLevel(level), 0))); final Dimension2D dim = cell.calculateDimension(ug.getStringBounder()); skeleton.add(level, y + dim.getHeight() / 2); ug = ug.apply(new UTranslate(0, dim.getHeight())); y += dim.getHeight(); } skeleton.draw(ugInit.apply(new UChangeColor(this.lineColor))); } private int getLevel(Atom atom) { return levels.get(atom); } public void addCell(Atom cell, int level) { this.cells.add(cell); this.levels.put(cell, level); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/AtomWithMargin.java000066400000000000000000000042361312650303100264250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; class AtomWithMargin implements Atom { private final double marginY1; private final double marginY2; private final Atom atom; public AtomWithMargin(Atom atom, double marginY1, double marginY2) { this.atom = atom; this.marginY1 = marginY1; this.marginY2 = marginY2; } public Dimension2D calculateDimension(StringBounder stringBounder) { return Dimension2DDouble.delta(atom.calculateDimension(stringBounder), 0, marginY1 + marginY2); } public double getStartingAltitude(StringBounder stringBounder) { return atom.getStartingAltitude(stringBounder); } public void drawU(UGraphic ug) { atom.drawU(ug.apply(new UTranslate(0, marginY1))); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/Bullet.java000066400000000000000000000071331312650303100247610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Bullet implements Atom { private final FontConfiguration fontConfiguration; private final int order; public Bullet(FontConfiguration fontConfiguration, int order) { this.fontConfiguration = fontConfiguration; this.order = order; } private double getWidth(StringBounder stringBounder) { final Dimension2D dim = stringBounder.calculateDimension(fontConfiguration.getFont(), "W"); return dim.getWidth() * (order + 1); } public void drawU(UGraphic ug) { if (order == 0) { drawU0(ug); } else { drawU1(ug); } } public Dimension2D calculateDimension(StringBounder stringBounder) { if (order == 0) { return calculateDimension0(stringBounder); } return calculateDimension1(stringBounder); } private void drawU0(UGraphic ug) { final HtmlColor color = fontConfiguration.getColor(); ug = ug.apply(new UChangeColor(color)).apply(new UChangeBackColor(color)).apply(new UStroke(0)); // final double width = getWidth(ug.getStringBounder()); ug = ug.apply(new UTranslate(3, 0)); ug.draw(new UEllipse(5, 5)); } public double getStartingAltitude(StringBounder stringBounder) { return -5; } private Dimension2D calculateDimension0(StringBounder stringBounder) { return new Dimension2DDouble(getWidth(stringBounder), 5); } private void drawU1(UGraphic ug) { final HtmlColor color = fontConfiguration.getColor(); ug = ug.apply(new UChangeColor(color)).apply(new UChangeBackColor(color)).apply(new UStroke(0)); final double width = getWidth(ug.getStringBounder()); ug = ug.apply(new UTranslate(width - 5, 0)); ug.draw(new URectangle(3.5, 3.5)); } private Dimension2D calculateDimension1(StringBounder stringBounder) { return new Dimension2DDouble(getWidth(stringBounder), 3); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/Command.java000066400000000000000000000026361312650303100251130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; public interface Command { public int matchingSize(String line); public String executeAndGetRemaining(String line, StripeSimple stripe); } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleColorAndSizeChange.java000066400000000000000000000062001312650303100316170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorSet; public class CommandCreoleColorAndSizeChange implements Command { private final Pattern2 pattern; public static final String fontPattern = "\\"; public static Command create() { return new CommandCreoleColorAndSizeChange("^(?i)(" + fontPattern + "(.*?)\\)"); } public static Command createEol() { return new CommandCreoleColorAndSizeChange("^(?i)(" + fontPattern + "(.*))$"); } private CommandCreoleColorAndSizeChange(String p) { this.pattern = MyPattern.cmpile(p); } public int matchingSize(String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return 0; } return m.group(1).length(); } public String executeAndGetRemaining(String line, StripeSimple stripe) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } // for (int i = 1; i <= m.groupCount(); i++) { // System.err.println("i=" + i + " " + m.group(i)); // } final FontConfiguration fc1 = stripe.getActualFontConfiguration(); FontConfiguration fc2 = fc1; if (m.group(2) != null) { fc2 = fc2.changeSize(Integer.parseInt(m.group(2))); } if (m.group(3) != null) { final HtmlColor color = HtmlColorSet.getInstance().getColorIfValid(m.group(3)); fc2 = fc2.changeColor(color); } stripe.setActualFontConfiguration(fc2); stripe.analyzeAndAdd(m.group(4)); stripe.setActualFontConfiguration(fc1); return line.substring(m.group(1).length()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleColorChange.java000066400000000000000000000054511312650303100303500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorSet; import net.sourceforge.plantuml.graphic.Splitter; public class CommandCreoleColorChange implements Command { private final Pattern2 pattern; public static Command create() { return new CommandCreoleColorChange("^(?i)(" + Splitter.fontColorPattern2 + "(.*?)\\)"); } public static Command createEol() { return new CommandCreoleColorChange("^(?i)(" + Splitter.fontColorPattern2 + "(.*)$)"); } private CommandCreoleColorChange(String p) { this.pattern = MyPattern.cmpile(p); } public int matchingSize(String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return 0; } return m.group(2).length(); } public String executeAndGetRemaining(String line, StripeSimple stripe) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } final FontConfiguration fc1 = stripe.getActualFontConfiguration(); final HtmlColor color = HtmlColorSet.getInstance().getColorIfValid(m.group(2)); final FontConfiguration fc2 = fc1.changeColor(color); stripe.setActualFontConfiguration(fc2); stripe.analyzeAndAdd(m.group(3)); stripe.setActualFontConfiguration(fc1); return line.substring(m.group(1).length()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleExposantChange.java000066400000000000000000000055111312650303100310700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontPosition; public class CommandCreoleExposantChange implements Command { private final Pattern2 pattern; private final FontPosition position; private CommandCreoleExposantChange(String p, FontPosition position) { this.pattern = MyPattern.cmpile(p); this.position = position; } public static Command create(FontPosition position) { return new CommandCreoleExposantChange("^(?i)(" + "\\<" + position.getHtmlTag() + "\\>" + "(.*?)\\)", position); } // public static Command createLegacyEol(FontStyle style) { // return new CommandCreoleExposantChange("^(" + style.getActivationPattern() + "(.+))$", style); // } public int matchingSize(String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return 0; } return m.group(2).length(); } public String executeAndGetRemaining(String line, StripeSimple stripe) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } final FontConfiguration fc1 = stripe.getActualFontConfiguration(); final FontConfiguration fc2 = fc1.changeFontPosition(position); stripe.setActualFontConfiguration(fc2); stripe.analyzeAndAdd(m.group(2)); stripe.setActualFontConfiguration(fc1); return line.substring(m.group(1).length()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleFontFamilyChange.java000066400000000000000000000052471312650303100313450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.Splitter; public class CommandCreoleFontFamilyChange implements Command { private final Pattern2 pattern; public static Command create() { return new CommandCreoleFontFamilyChange("^(?i)(" + Splitter.fontFamilyPattern + "(.*?)\\)"); } public static Command createEol() { return new CommandCreoleFontFamilyChange("^(?i)(" + Splitter.fontFamilyPattern + "(.*)$)"); } private CommandCreoleFontFamilyChange(String p) { this.pattern = MyPattern.cmpile(p); } public int matchingSize(String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return 0; } return m.group(1).length(); } public String executeAndGetRemaining(String line, StripeSimple stripe) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } final FontConfiguration fc1 = stripe.getActualFontConfiguration(); final String family = m.group(2); final FontConfiguration fc2 = fc1.changeFamily(family); stripe.setActualFontConfiguration(fc2); stripe.analyzeAndAdd(m.group(3)); stripe.setActualFontConfiguration(fc1); return line.substring(m.group(1).length()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleImg.java000066400000000000000000000053751312650303100267050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.Splitter; public class CommandCreoleImg implements Command { private final Pattern2 pattern; private CommandCreoleImg(String p) { this.pattern = MyPattern.cmpile(p); } public static Command create() { return new CommandCreoleImg("^(?i)(" + Splitter.imgPatternNoSrcColon + ")"); } public int matchingSize(String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return 0; } return m.group(1).length(); } public String executeAndGetRemaining(String line, StripeSimple stripe) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } String src = m.group(2); final double scale = getScale(m.group(3)); if (src.toLowerCase().startsWith("src=")) { src = src.substring(4); } src = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(src, "\""); stripe.addImage(src, scale); return line.substring(m.group(1).length()); } public static double getScale(String s) { if (s == null) { return 1; } final Pattern p = Pattern.compile("scale=([0-9.]+)"); final Matcher m = p.matcher(s); if (m.find()) { return Double.parseDouble(m.group(1)); } return 1; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleLatex.java000066400000000000000000000046111312650303100272360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.Splitter; import net.sourceforge.plantuml.math.ScientificEquationSafe; public class CommandCreoleLatex implements Command { private final Pattern2 pattern; private final double scale; private CommandCreoleLatex(String p, double scale) { this.pattern = MyPattern.cmpile(p); this.scale = scale; } public static Command create(double scale) { return new CommandCreoleLatex("^(?i)(" + Splitter.latexPattern + ")", scale); } public int matchingSize(String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return 0; } return m.group(1).length(); } public String executeAndGetRemaining(String line, StripeSimple stripe) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } final String latex = m.group(2); stripe.addMath(ScientificEquationSafe.fromLatex(latex), scale); return line.substring(m.group(1).length()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleMath.java000066400000000000000000000046071312650303100270570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.Splitter; import net.sourceforge.plantuml.math.ScientificEquationSafe; public class CommandCreoleMath implements Command { private final Pattern2 pattern; private final double scale; private CommandCreoleMath(String p, double scale) { this.pattern = MyPattern.cmpile(p); this.scale = scale; } public static Command create(double scale) { return new CommandCreoleMath("^(?i)(" + Splitter.mathPattern + ")", scale); } public int matchingSize(String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return 0; } return m.group(1).length(); } public String executeAndGetRemaining(String line, StripeSimple stripe) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } final String math = m.group(2); stripe.addMath(ScientificEquationSafe.fromAsciiMath(math), scale); return line.substring(m.group(1).length()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleMonospaced.java000066400000000000000000000051631312650303100302540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.FontConfiguration; public class CommandCreoleMonospaced implements Command { public static final String MONOSPACED = "monospaced"; private final Pattern2 pattern; private final String monospacedFamily; public static Command create(String monospacedFamily) { return new CommandCreoleMonospaced("^(?i)([%g][%g](.*?)[%g][%g])", monospacedFamily); } private CommandCreoleMonospaced(String p, String monospacedFamily) { this.pattern = MyPattern.cmpile(p); this.monospacedFamily = monospacedFamily; } public int matchingSize(String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return 0; } return m.group(1).length(); } public String executeAndGetRemaining(String line, StripeSimple stripe) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } final FontConfiguration fc1 = stripe.getActualFontConfiguration(); final FontConfiguration fc2 = fc1.changeFamily(monospacedFamily); stripe.setActualFontConfiguration(fc2); stripe.analyzeAndAdd(m.group(2)); stripe.setActualFontConfiguration(fc1); return line.substring(m.group(1).length()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleOpenIcon.java000066400000000000000000000043331312650303100276740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.Splitter; public class CommandCreoleOpenIcon implements Command { private final Pattern2 pattern; private CommandCreoleOpenIcon(String p) { this.pattern = MyPattern.cmpile(p); } public static Command create() { return new CommandCreoleOpenIcon("^(?i)(" + Splitter.openiconPattern + ")"); } public int matchingSize(String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return 0; } return m.group(1).length(); } public String executeAndGetRemaining(String line, StripeSimple stripe) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } final String src = m.group(2); stripe.addOpenIcon(src); return line.substring(m.group(1).length()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleSizeChange.java000066400000000000000000000053371312650303100302070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.Splitter; public class CommandCreoleSizeChange implements Command { private final Pattern2 pattern; public static Command create() { return new CommandCreoleSizeChange("^(?i)(" + Splitter.fontSizePattern2 + "(.*?)\\)"); } public static Command createEol() { return new CommandCreoleSizeChange("^(?i)(" + Splitter.fontSizePattern2 + "(.*)$)"); } private CommandCreoleSizeChange(String p) { this.pattern = MyPattern.cmpile(p); } public int matchingSize(String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return 0; } return m.group(2).length(); } public String executeAndGetRemaining(String line, StripeSimple stripe) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } final int size = Integer.parseInt(m.group(2)); final FontConfiguration fc1 = stripe.getActualFontConfiguration(); final FontConfiguration fc2 = fc1.changeSize(size); // final FontConfiguration fc2 = new AddStyle(style, null).apply(fc1); stripe.setActualFontConfiguration(fc2); stripe.analyzeAndAdd(m.group(3)); stripe.setActualFontConfiguration(fc1); return line.substring(m.group(1).length()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleSpace.java000066400000000000000000000047301312650303100272160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; public class CommandCreoleSpace implements Command { private final Pattern2 pattern; private CommandCreoleSpace(String p) { this.pattern = MyPattern.cmpile(p); } public static Command create() { return new CommandCreoleSpace("^(?i)(\\)"); } public int matchingSize(String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return 0; } return m.group(1).length(); } public String executeAndGetRemaining(String line, StripeSimple stripe) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } // final int size = Integer.parseInt(m.group(2)); // final FontConfiguration fc1 = stripe.getActualFontConfiguration(); // final FontConfiguration fc2 = fc1.changeSize(size); // stripe.setActualFontConfiguration(fc2); // stripe.analyzeAndAdd(m.group(3)); final int size = Integer.parseInt(m.group(2)); stripe.addSpace(size); // stripe.setActualFontConfiguration(fc1); return line.substring(m.group(1).length()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleSprite.java000066400000000000000000000044271312650303100274340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.Splitter; public class CommandCreoleSprite implements Command { private final Pattern2 pattern; private CommandCreoleSprite(String p) { this.pattern = MyPattern.cmpile(p); } public static Command create() { return new CommandCreoleSprite("^(?i)(" + Splitter.spritePattern2 + ")"); } public int matchingSize(String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return 0; } return m.group(1).length(); } public String executeAndGetRemaining(String line, StripeSimple stripe) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } final String src = m.group(2); final double scale = CommandCreoleImg.getScale(m.group(3)); stripe.addSprite(src, scale); return line.substring(m.group(1).length()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleStyle.java000066400000000000000000000066301312650303100272640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.AddStyle; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontStyle; import net.sourceforge.plantuml.graphic.HtmlColor; public class CommandCreoleStyle implements Command { private final Pattern2 p; private final FontStyle style; private final boolean tryExtendedColor; public static CommandCreoleStyle createCreole(FontStyle style) { return new CommandCreoleStyle("^(" + style.getCreoleSyntax() + "(.+?)" + style.getCreoleSyntax() + ")", style, false); } public static Command createLegacy(FontStyle style) { return new CommandCreoleStyle("^((" + style.getActivationPattern() + ")(.+?)" + style.getDeactivationPattern() + ")", style, style.canHaveExtendedColor()); } public static Command createLegacyEol(FontStyle style) { return new CommandCreoleStyle("^((" + style.getActivationPattern() + ")(.+))$", style, style.canHaveExtendedColor()); } private CommandCreoleStyle(String p, FontStyle style, boolean tryExtendedColor) { this.p = MyPattern.cmpile(p); this.style = style; this.tryExtendedColor = tryExtendedColor; } private HtmlColor getExtendedColor(Matcher2 m) { if (tryExtendedColor) { return style.getExtendedColor(m.group(2)); } return null; } public String executeAndGetRemaining(final String line, StripeSimple stripe) { final Matcher2 m = p.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } final FontConfiguration fc1 = stripe.getActualFontConfiguration(); final FontConfiguration fc2 = new AddStyle(style, getExtendedColor(m)).apply(fc1); stripe.setActualFontConfiguration(fc2); final int groupCount = m.groupCount(); stripe.analyzeAndAdd(m.group(groupCount)); stripe.setActualFontConfiguration(fc1); return line.substring(m.group(1).length()); } public int matchingSize(String line) { final Matcher2 m = p.matcher(line); if (m.find() == false) { return 0; } return m.group(1).length(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleSvgAttributeChange.java000066400000000000000000000054601312650303100317150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.Splitter; import net.sourceforge.plantuml.graphic.SvgAttributes; public class CommandCreoleSvgAttributeChange implements Command { private final Pattern2 pattern; public static final String fontPattern = Splitter.svgAttributePattern; public static Command create() { return new CommandCreoleSvgAttributeChange("^(?i)(" + fontPattern + "(.*?)\\)"); } public static Command createEol() { return new CommandCreoleSvgAttributeChange("^(?i)(" + fontPattern + "(.*))$"); } private CommandCreoleSvgAttributeChange(String p) { this.pattern = MyPattern.cmpile(p); } public int matchingSize(String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return 0; } return m.group(1).length(); } public String executeAndGetRemaining(String line, StripeSimple stripe) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } final FontConfiguration fc1 = stripe.getActualFontConfiguration(); FontConfiguration fc2 = fc1; if (m.group(2) != null) { fc2 = fc2.changeAttributes(new SvgAttributes(m.group(2))); } stripe.setActualFontConfiguration(fc2); stripe.analyzeAndAdd(m.group(3)); stripe.setActualFontConfiguration(fc1); return line.substring(m.group(1).length()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CommandCreoleUrl.java000066400000000000000000000056451312650303100267330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; public class CommandCreoleUrl implements Command { private final Pattern2 pattern; private final ISkinSimple skinParam; public static Command create(ISkinSimple skinParam) { return new CommandCreoleUrl(skinParam, "^(" + UrlBuilder.getRegexp() + ")"); } private CommandCreoleUrl(ISkinSimple skinParam, String p) { this.pattern = MyPattern.cmpile(p); this.skinParam = skinParam; } public int matchingSize(String line) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { return 0; } return m.group(1).length(); } public String executeAndGetRemaining(String line, StripeSimple stripe) { final Matcher2 m = pattern.matcher(line); if (m.find() == false) { throw new IllegalStateException(); } final UrlBuilder urlBuilder = new UrlBuilder(skinParam.getValue("topurl"), ModeUrl.STRICT); final Url url = urlBuilder.getUrl(m.group(1)); stripe.addUrl(url); // final int size = Integer.parseInt(m.group(2)); // final FontConfiguration fc1 = stripe.getActualFontConfiguration(); // final FontConfiguration fc2 = fc1.changeSize(size); // // final FontConfiguration fc2 = new AddStyle(style, null).apply(fc1); // stripe.setActualFontConfiguration(fc2); // stripe.analyzeAndAdd("AZERTY"); // stripe.setActualFontConfiguration(fc1); return line.substring(m.group(1).length()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CreoleContext.java000066400000000000000000000033301312650303100263030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.util.ArrayList; import java.util.List; public class CreoleContext { private final List stack = new ArrayList(); public int getLocalNumber(int order) { ensureStackOk(order); final int n = stack.get(order); stack.set(order, n + 1); return n; } private void ensureStackOk(int order) { while (stack.size() <= order) { stack.add(0); } while (stack.size() > order + 1) { stack.remove(order + 1); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CreoleHorizontalLine.java000066400000000000000000000073671312650303100276360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UHorizontalLine; import net.sourceforge.plantuml.ugraphic.UTranslate; public class CreoleHorizontalLine implements Atom { private final FontConfiguration fontConfiguration; private final String line; private final char style; private final ISkinSimple skinParam; public static CreoleHorizontalLine create(FontConfiguration fontConfiguration, String line, char style, ISkinSimple skinParam) { return new CreoleHorizontalLine(fontConfiguration, line, style, skinParam); } private CreoleHorizontalLine(FontConfiguration fontConfiguration, String line, char style, ISkinSimple skinParam) { this.fontConfiguration = fontConfiguration; this.line = line; this.style = style; this.skinParam = skinParam; } private UHorizontalLine getHorizontalLine() { if (line.length() == 0) { return UHorizontalLine.infinite(0, 0, style); } final TextBlock tb = getTitle(); return UHorizontalLine.infinite(0, 0, tb, style); } private TextBlock getTitle() { if (line.length() == 0) { return TextBlockUtils.empty(0, 0); } final CreoleParser parser = new CreoleParser(fontConfiguration, HorizontalAlignment.LEFT, skinParam, CreoleMode.FULL); final Sheet sheet = parser.createSheet(Display.getWithNewlines(line)); final TextBlock tb = new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()); return tb; } public void drawU(UGraphic ug) { // ug = ug.apply(new UChangeColor(fontConfiguration.getColor())); final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = ug.apply(new UTranslate(0, dim.getHeight() / 2)); ug.draw(getHorizontalLine()); } public Dimension2D calculateDimension(StringBounder stringBounder) { if (line.length() == 0) { return new Dimension2DDouble(10, 10); } final TextBlock tb = getTitle(); return tb.calculateDimension(stringBounder); } public double getStartingAltitude(StringBounder stringBounder) { return 0; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CreoleMode.java000066400000000000000000000024751312650303100255540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; public enum CreoleMode { FULL, SIMPLE_LINE; } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CreoleParser.java000066400000000000000000000076711312650303100261270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.util.Arrays; import java.util.List; import net.sourceforge.plantuml.EmbededDiagram; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; public class CreoleParser { private final FontConfiguration fontConfiguration; private final ISkinSimple skinParam; private final HorizontalAlignment horizontalAlignment; private final CreoleMode modeSimpleLine; public CreoleParser(FontConfiguration fontConfiguration, HorizontalAlignment horizontalAlignment, ISkinSimple skinParam, CreoleMode modeSimpleLine) { this.modeSimpleLine = modeSimpleLine; this.fontConfiguration = fontConfiguration; this.skinParam = skinParam; if (skinParam == null) { throw new IllegalArgumentException(); } this.horizontalAlignment = horizontalAlignment; } private Stripe createStripe(String line, CreoleContext context, Stripe lastStripe) { if (lastStripe instanceof StripeTable && isTableLine(line)) { final StripeTable table = (StripeTable) lastStripe; table.analyzeAndAddNormal(line); return null; } else if (lastStripe instanceof StripeTree && isTreeStart(StringUtils.trinNoTrace(line))) { final StripeTree tree = (StripeTree) lastStripe; tree.analyzeAndAdd(line); return null; } else if (isTableLine(line)) { return new StripeTable(fontConfiguration, skinParam, line); } else if (isTreeStart(line)) { return new StripeTree(fontConfiguration, skinParam, line); } return new CreoleStripeSimpleParser(line, context, fontConfiguration, skinParam, modeSimpleLine) .createStripe(context); } private static boolean isTableLine(String line) { return line.matches("^(\\<#\\w+\\>)?\\|(\\=)?.*\\|$"); } public static boolean doesStartByColor(String line) { return line.matches("^(\\<#\\w+\\>).*"); } public static boolean isTreeStart(String line) { // return false; return line.startsWith("|_"); } public Sheet createSheet(Display display) { final Sheet sheet = new Sheet(horizontalAlignment); if (Display.isNull(display) == false) { final CreoleContext context = new CreoleContext(); for (CharSequence cs : display) { final Stripe stripe; if (cs instanceof EmbededDiagram) { final Atom atom = new AtomEmbededSystem((EmbededDiagram) cs); stripe = new Stripe() { public List getAtoms() { return Arrays.asList(atom); } }; } else { stripe = createStripe(cs.toString(), context, sheet.getLastStripe()); } if (stripe != null) { sheet.add(stripe); } } } return sheet; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/CreoleStripeSimpleParser.java000066400000000000000000000116631312650303100304640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.utils.CharHidder; public class CreoleStripeSimpleParser { final private String line; final private StripeStyle style; private final CreoleMode modeSimpleLine; private final FontConfiguration fontConfiguration; private final ISkinSimple skinParam; public CreoleStripeSimpleParser(String line, CreoleContext creoleContext, FontConfiguration fontConfiguration, ISkinSimple skinParam, CreoleMode modeSimpleLine) { if (line.contains("" + BackSlash.hiddenNewLine())) { throw new IllegalArgumentException(line); } this.fontConfiguration = fontConfiguration; this.modeSimpleLine = modeSimpleLine; this.skinParam = skinParam; if (skinParam == null) { throw new IllegalArgumentException(); } final Pattern2 p4 = MyPattern.cmpile("^--([^-]*)--$"); final Matcher2 m4 = p4.matcher(line); if (m4.find()) { this.line = m4.group(1); this.style = new StripeStyle(StripeStyleType.HORIZONTAL_LINE, 0, '-'); return; } final Pattern2 p5 = MyPattern.cmpile("^==([^=]*)==$"); final Matcher2 m5 = p5.matcher(line); if (m5.find()) { this.line = m5.group(1); this.style = new StripeStyle(StripeStyleType.HORIZONTAL_LINE, 0, '='); return; } final Pattern2 p5b = MyPattern.cmpile("^===*==$"); final Matcher2 m5b = p5b.matcher(line); if (m5b.find()) { this.line = ""; this.style = new StripeStyle(StripeStyleType.HORIZONTAL_LINE, 0, '='); return; } // if (modeSimpleLine == CreoleMode.FULL) { // final Pattern p6 = MyPattern.cmpile("^__([^_]*)__$"); // final Matcher m6 = p6.matcher(line); // if (m6.find()) { // this.line = m6.group(1); // this.style = new StripeStyle(StripeStyleType.HORIZONTAL_LINE, 0, '_'); // return; // } // } final Pattern2 p7 = MyPattern.cmpile("^\\.\\.([^\\.]*)\\.\\.$"); final Matcher2 m7 = p7.matcher(line); if (m7.find()) { this.line = m7.group(1); this.style = new StripeStyle(StripeStyleType.HORIZONTAL_LINE, 0, '.'); return; } if (modeSimpleLine == CreoleMode.FULL) { final Pattern2 p1 = MyPattern.cmpile("^(\\*+)([^*]+(?:[^*]|\\*\\*[^*]+\\*\\*)*)$"); final Matcher2 m1 = p1.matcher(line); if (m1.find()) { this.line = StringUtils.trin(m1.group(2)); final int order = m1.group(1).length() - 1; this.style = new StripeStyle(StripeStyleType.LIST_WITHOUT_NUMBER, order, '\0'); return; } } if (modeSimpleLine == CreoleMode.FULL) { final Pattern2 p2 = MyPattern.cmpile("^(#+)(.+)$"); final Matcher2 m2 = p2.matcher(CharHidder.hide(line)); if (m2.find()) { this.line = StringUtils.trin(CharHidder.unhide(m2.group(2))); final int order = CharHidder.unhide(m2.group(1)).length() - 1; this.style = new StripeStyle(StripeStyleType.LIST_WITH_NUMBER, order, '\0'); return; } } final Pattern2 p3 = MyPattern.cmpile("^(=+)(.+)$"); final Matcher2 m3 = p3.matcher(line); if (m3.find()) { this.line = StringUtils.trin(m3.group(2)); final int order = m3.group(1).length() - 1; this.style = new StripeStyle(StripeStyleType.HEADING, order, '\0'); return; } this.line = line; this.style = new StripeStyle(StripeStyleType.NORMAL, 0, '\0'); } public Stripe createStripe(CreoleContext context) { final StripeSimple result = new StripeSimple(fontConfiguration, style, context, skinParam, modeSimpleLine); result.analyzeAndAdd(line); return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/Fission.java000066400000000000000000000064421312650303100251460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.graphic.StringBounder; public class Fission { private final Stripe stripe; private final LineBreakStrategy maxWidth; public Fission(Stripe stripe, LineBreakStrategy maxWidth) { this.stripe = stripe; this.maxWidth = maxWidth; if (maxWidth == null) { throw new IllegalArgumentException(); } } public List getSplitted(StringBounder stringBounder) { final double valueMaxWidth = maxWidth.getMathWidth(); if (valueMaxWidth == 0) { return Arrays.asList(stripe); } final List result = new ArrayList(); StripeSimple current = new StripeSimple(); for (Atom atom : stripe.getAtoms()) { for (Atom atomSplitted : getSplitted(stringBounder, atom)) { final double width = atomSplitted.calculateDimension(stringBounder).getWidth(); if (current.totalWidth + width > valueMaxWidth) { result.add(current); current = new StripeSimple(); } current.addAtom(atomSplitted, width); } } if (current.totalWidth > 0) { result.add(current); } return Collections.unmodifiableList(result); } private Collection getSplitted(StringBounder stringBounder, Atom atom) { if (atom instanceof AtomText) { return ((AtomText) atom).getSplitted(stringBounder, maxWidth); } return Collections.singleton(atom); } private List getSplittedSimple() { final StripeSimple result = new StripeSimple(); for (Atom atom : stripe.getAtoms()) { result.addAtom(atom, 0); } return Arrays.asList((Stripe) result); } static class StripeSimple implements Stripe { private final List atoms = new ArrayList(); private double totalWidth; public List getAtoms() { return Collections.unmodifiableList(atoms); } private void addAtom(Atom atom, double width) { this.atoms.add(atom); this.totalWidth += width; } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/PSystemCreole.java000066400000000000000000000067361312650303100263000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.Font; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.SkinParam; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.ugraphic.UFont; public class PSystemCreole extends AbstractPSystem { private final List lines = new ArrayList(); public PSystemCreole() { } public DiagramDescription getDescription() { return new DiagramDescription("(Creole)"); } public void doCommandLine(String line) { lines.add(line); } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final Display display = Display.create(lines); final UFont font = UFont.serif(14); final FontConfiguration fontConfiguration = FontConfiguration.blackBlueTrue(font); final Sheet sheet = new CreoleParser(fontConfiguration, HorizontalAlignment.LEFT, SkinParam.create(UmlDiagramType.SEQUENCE), CreoleMode.FULL) .createSheet(display); final SheetBlock1 sheetBlock = new SheetBlock1(sheet, LineBreakStrategy.NONE, 0); final ImageBuilder builder = new ImageBuilder(new ColorMapperIdentity(), 1.0, null, null, null, 0, 0, null, false); builder.setUDrawable(sheetBlock); return builder.writeImageTOBEMOVED(fileFormat, seed, os); // final Dimension2D dim = TextBlockUtils.getDimension(sheetBlock); // final UGraphic2 ug = fileFormat.createUGraphic(new ColorMapperIdentity(), 1, dim, null, false); // // sheetBlock.drawU(ug.apply(new UTranslate(0, 10))); // sheetBlock.drawU(ug); // ug.writeImageTOBEMOVED(os, null, 96); // return new ImageDataSimple(dim); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/PSystemCreoleFactory.java000066400000000000000000000034541312650303100276220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.core.DiagramType; public class PSystemCreoleFactory extends PSystemBasicFactory { public PSystemCreoleFactory() { super(DiagramType.CREOLE); } public PSystemCreole init(String startLine) { if (getDiagramType() == DiagramType.CREOLE) { return new PSystemCreole(); } return null; } @Override public PSystemCreole executeLine(PSystemCreole system, String line) { system.doCommandLine(line); return system; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/Position.java000066400000000000000000000063061312650303100253370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Position { private final double x; private final double y; private final Dimension2D dim; public Position(double x, double y, Dimension2D dim) { this.x = x; this.y = y; this.dim = dim; // if (dim.getHeight() == 0) { // throw new IllegalArgumentException(); // } // if (dim.getWidth() == 0) { // throw new IllegalArgumentException(); // } } @Override public String toString() { return "x=" + x + " y=" + y + " dim=" + dim; } public Position align(double height) { final double dy = height - dim.getHeight(); return translateY(dy); } public final double getMinY() { return y; } public final double getMaxY() { return y + getHeight(); } public UGraphic translate(UGraphic ug) { return ug.apply(new UTranslate(x, y)); } public Position translateY(double dy) { return new Position(x, y + dy, dim); } public Position translateX(double dx) { return new Position(x + dx, y, dim); } public MinMax update(MinMax minMax) { return minMax.addPoint(x + dim.getWidth(), y + dim.getHeight()); } public void drawDebug(UGraphic ug) { // ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(new UChangeBackColor(HtmlColorUtils.LIGHT_GRAY)); ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(new UChangeBackColor(null)); ug = ug.apply(new UTranslate(x, y)); ug.draw(new URectangle(dim)); } public double getHeight() { return dim.getHeight(); } public double getWidth() { return dim.getWidth(); } public UTranslate getTranslate() { return new UTranslate(x, y); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/Sea.java000066400000000000000000000071571312650303100242500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import java.util.HashMap; import java.util.Map; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.MinMax; public class Sea { private double currentX; private final Map positions = new HashMap(); private final StringBounder stringBounder; public Sea(StringBounder stringBounder) { this.stringBounder = stringBounder; } public void add(Atom atom) { final Dimension2D dim = atom.calculateDimension(stringBounder); final double y = 0; final Position position = new Position(currentX, y, dim); positions.put(atom, position); currentX += dim.getWidth(); } public Position getPosition(Atom atom) { return positions.get(atom); } public void doAlign() { for (Map.Entry ent : new HashMap(positions).entrySet()) { final Position pos = ent.getValue(); final Atom atom = ent.getKey(); final double height = atom.calculateDimension(stringBounder).getHeight(); final Position newPos = pos.translateY(-height + atom.getStartingAltitude(stringBounder)); positions.put(atom, newPos); } } public void translateMinYto(double newValue) { final double delta = newValue - getMinY(); for (Map.Entry ent : new HashMap(positions).entrySet()) { final Position pos = ent.getValue(); final Atom atom = ent.getKey(); positions.put(atom, pos.translateY(delta)); } } public void exportAllPositions(Map destination) { destination.putAll(positions); } public double getMinY() { if (positions.size() == 0) { throw new IllegalStateException(); } double result = Double.MAX_VALUE; for (Position pos : positions.values()) { if (result > pos.getMinY()) { result = pos.getMinY(); } } return result; } public double getMaxY() { if (positions.size() == 0) { throw new IllegalStateException(); } double result = -Double.MAX_VALUE; for (Position pos : positions.values()) { if (result < pos.getMaxY()) { result = pos.getMaxY(); } } return result; } public double getHeight() { return getMaxY() - getMinY(); } public MinMax update(MinMax minMax) { for (Position position : positions.values()) { minMax = position.update(minMax); } return minMax; } public final double getWidth() { return currentX; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/Sheet.java000066400000000000000000000041571312650303100246050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import net.sourceforge.plantuml.graphic.HorizontalAlignment; public class Sheet implements Iterable { private final List stripes = new ArrayList(); private final HorizontalAlignment horizontalAlignment; public Sheet(HorizontalAlignment horizontalAlignment) { this.horizontalAlignment = horizontalAlignment; } @Override public String toString() { return stripes.toString(); } public void add(Stripe stripe) { stripes.add(stripe); } public Iterator iterator() { return stripes.iterator(); } public Stripe getLastStripe() { final int size = stripes.size(); if (size == 0) { return null; } return stripes.get(size - 1); } public final HorizontalAlignment getHorizontalAlignment() { return horizontalAlignment; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/SheetBlock1.java000066400000000000000000000126051312650303100256360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class SheetBlock1 extends AbstractTextBlock implements TextBlock, Atom, Stencil { private final Sheet sheet; private List stripes; private Map heights; private Map widths; private Map positions; private MinMax minMax; private final LineBreakStrategy maxWidth; private final double padding; public SheetBlock1(Sheet sheet, LineBreakStrategy maxWidth, double padding) { this.sheet = sheet; this.maxWidth = maxWidth; this.padding = padding; if (maxWidth == null) { throw new IllegalArgumentException(); } } @Override public String toString() { return sheet.toString(); } public HorizontalAlignment getCellAlignment() { if (stripes.size() != 1) { return HorizontalAlignment.LEFT; } final Stripe simple = stripes.get(0); if (simple instanceof StripeSimple) { return ((StripeSimple) simple).getCellAlignment(); } return HorizontalAlignment.LEFT; } private void initMap(StringBounder stringBounder) { if (positions != null) { return; } stripes = new ArrayList(); for (Stripe stripe : sheet) { stripes.addAll(new Fission(stripe, maxWidth).getSplitted(stringBounder)); } positions = new LinkedHashMap(); widths = new LinkedHashMap(); heights = new LinkedHashMap(); minMax = MinMax.getEmpty(true); double y = 0; for (Stripe stripe : stripes) { if (stripe.getAtoms().size() == 0) { continue; } final Sea sea = new Sea(stringBounder); for (Atom atom : stripe.getAtoms()) { sea.add(atom); } sea.doAlign(); sea.translateMinYto(y); sea.exportAllPositions(positions); final double width = sea.getWidth(); widths.put(stripe, width); minMax = sea.update(minMax); final double height = sea.getHeight(); heights.put(stripe, height); y += height; } final int coef; if (sheet.getHorizontalAlignment() == HorizontalAlignment.CENTER) { coef = 2; } else if (sheet.getHorizontalAlignment() == HorizontalAlignment.RIGHT) { coef = 1; } else { coef = 0; } if (coef != 0) { double maxWidth = 0; for (Double v : widths.values()) { if (v > maxWidth) { maxWidth = v; } } for (Map.Entry ent : widths.entrySet()) { final double diff = maxWidth - ent.getValue(); if (diff > 0) { for (Atom atom : ent.getKey().getAtoms()) { final Position pos = positions.get(atom); positions.put(atom, pos.translateX(diff / coef)); } } } } } public Dimension2D calculateDimension(StringBounder stringBounder) { initMap(stringBounder); return Dimension2DDouble.delta(minMax.getDimension(), 2 * padding); } @Override public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { return null; } public void drawU(UGraphic ug) { initMap(ug.getStringBounder()); if (padding > 0) { ug = ug.apply(new UTranslate(padding, padding)); } for (Stripe stripe : stripes) { for (Atom atom : stripe.getAtoms()) { final Position position = positions.get(atom); atom.drawU(position.translate(ug)); // position.drawDebug(ug); } } } public double getStartingAltitude(StringBounder stringBounder) { return 0; } public double getStartingX(StringBounder stringBounder, double y) { return 0; } public double getEndingX(StringBounder stringBounder, double y) { return calculateDimension(stringBounder).getWidth(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/SheetBlock2.java000066400000000000000000000053401312650303100256350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.UStroke; public class SheetBlock2 extends AbstractTextBlock implements TextBlock, Atom { private final SheetBlock1 block; private final UStroke defaultStroke; private final Stencil stencil; public SheetBlock2(SheetBlock1 block, Stencil stencil, UStroke defaultStroke) { this.block = block; this.stencil = stencil; this.defaultStroke = defaultStroke; if (stencil == null) { throw new IllegalArgumentException(); } } @Override public String toString() { return block.toString(); } public Dimension2D calculateDimension(StringBounder stringBounder) { return block.calculateDimension(stringBounder); } public void drawU(UGraphic ug) { if (stencil != null) { ug = UGraphicStencil.create(ug, stencil, defaultStroke); } block.drawU(ug); } public double getStartingAltitude(StringBounder stringBounder) { return 0; } @Override public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { return block.getInnerPosition(member, stringBounder, strategy); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/Stencil.java000066400000000000000000000027531312650303100251360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.graphic.StringBounder; public interface Stencil { public double getStartingX(StringBounder stringBounder, double y); public double getEndingX(StringBounder stringBounder, double y); } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/Stripe.java000066400000000000000000000025421312650303100247770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.util.List; public interface Stripe { public List getAtoms(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/StripeSimple.java000066400000000000000000000200751312650303100261520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontPosition; import net.sourceforge.plantuml.graphic.FontStyle; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.ImgValign; import net.sourceforge.plantuml.math.ScientificEquationSafe; import net.sourceforge.plantuml.openiconic.OpenIcon; import net.sourceforge.plantuml.ugraphic.sprite.Sprite; import net.sourceforge.plantuml.utils.CharHidder; public class StripeSimple implements Stripe { final private List atoms = new ArrayList(); final private List commands = new ArrayList(); private HorizontalAlignment align = HorizontalAlignment.LEFT; public void setCellAlignment(HorizontalAlignment align) { this.align = align; } public HorizontalAlignment getCellAlignment() { return align; } private FontConfiguration fontConfiguration; final private StripeStyle style; final private ISkinSimple skinParam; @Override public String toString() { return super.toString() + " " + atoms.toString(); } public StripeSimple(FontConfiguration fontConfiguration, StripeStyle style, CreoleContext context, ISkinSimple skinParam, CreoleMode modeSimpleLine) { this.fontConfiguration = fontConfiguration; this.style = style; this.skinParam = skinParam; // class Splitter this.commands.add(CommandCreoleStyle.createCreole(FontStyle.BOLD)); this.commands.add(CommandCreoleStyle.createLegacy(FontStyle.BOLD)); this.commands.add(CommandCreoleStyle.createLegacyEol(FontStyle.BOLD)); this.commands.add(CommandCreoleStyle.createCreole(FontStyle.ITALIC)); this.commands.add(CommandCreoleStyle.createLegacy(FontStyle.ITALIC)); this.commands.add(CommandCreoleStyle.createLegacyEol(FontStyle.ITALIC)); this.commands.add(CommandCreoleStyle.createLegacy(FontStyle.PLAIN)); this.commands.add(CommandCreoleStyle.createLegacyEol(FontStyle.PLAIN)); if (modeSimpleLine == CreoleMode.FULL) { this.commands.add(CommandCreoleStyle.createCreole(FontStyle.UNDERLINE)); } this.commands.add(CommandCreoleStyle.createLegacy(FontStyle.UNDERLINE)); this.commands.add(CommandCreoleStyle.createLegacyEol(FontStyle.UNDERLINE)); this.commands.add(CommandCreoleStyle.createCreole(FontStyle.STRIKE)); this.commands.add(CommandCreoleStyle.createLegacy(FontStyle.STRIKE)); this.commands.add(CommandCreoleStyle.createLegacyEol(FontStyle.STRIKE)); this.commands.add(CommandCreoleStyle.createCreole(FontStyle.WAVE)); this.commands.add(CommandCreoleStyle.createLegacy(FontStyle.WAVE)); this.commands.add(CommandCreoleStyle.createLegacyEol(FontStyle.WAVE)); this.commands.add(CommandCreoleStyle.createLegacy(FontStyle.BACKCOLOR)); this.commands.add(CommandCreoleStyle.createLegacyEol(FontStyle.BACKCOLOR)); this.commands.add(CommandCreoleSizeChange.create()); this.commands.add(CommandCreoleSizeChange.createEol()); this.commands.add(CommandCreoleColorChange.create()); this.commands.add(CommandCreoleColorChange.createEol()); this.commands.add(CommandCreoleColorAndSizeChange.create()); this.commands.add(CommandCreoleColorAndSizeChange.createEol()); this.commands.add(CommandCreoleExposantChange.create(FontPosition.EXPOSANT)); this.commands.add(CommandCreoleExposantChange.create(FontPosition.INDICE)); this.commands.add(CommandCreoleImg.create()); this.commands.add(CommandCreoleOpenIcon.create()); final double scale = skinParam.getDpi() / 96.0; this.commands.add(CommandCreoleMath.create(scale)); this.commands.add(CommandCreoleLatex.create(scale)); this.commands.add(CommandCreoleSprite.create()); this.commands.add(CommandCreoleSpace.create()); this.commands.add(CommandCreoleFontFamilyChange.create()); this.commands.add(CommandCreoleFontFamilyChange.createEol()); this.commands.add(CommandCreoleMonospaced.create(skinParam.getMonospacedFamily())); this.commands.add(CommandCreoleUrl.create(skinParam)); this.commands.add(CommandCreoleSvgAttributeChange.create()); final Atom header = style.getHeader(fontConfiguration, context); if (header != null) { atoms.add(header); } } public List getAtoms() { if (atoms.size() == 0) { atoms.add(AtomText.create(" ", fontConfiguration)); } return Collections.unmodifiableList(atoms); } public FontConfiguration getActualFontConfiguration() { return fontConfiguration; } public void setActualFontConfiguration(FontConfiguration fontConfiguration) { this.fontConfiguration = fontConfiguration; } public void analyzeAndAdd(String line) { if (line == null) { throw new IllegalArgumentException(); } if (line.contains("" + BackSlash.hiddenNewLine())) { throw new IllegalArgumentException(line); } line = CharHidder.hide(line); if (style.getType() == StripeStyleType.HEADING) { atoms.add(AtomText.createHeading(line, fontConfiguration, style.getOrder())); } else if (style.getType() == StripeStyleType.HORIZONTAL_LINE) { atoms.add(CreoleHorizontalLine.create(fontConfiguration, line, style.getStyle(), skinParam)); } else { modifyStripe(line); } } public void addImage(String src, double scale) { atoms.add(AtomImg.create(src, ImgValign.TOP, 0, scale)); } public void addSpace(int size) { atoms.add(AtomSpace.create(size)); } public void addUrl(Url url) { atoms.add(AtomText.createUrl(url, fontConfiguration)); } public void addSprite(String src, double scale) { final Sprite sprite = skinParam.getSprite(src); if (sprite != null) { atoms.add(new AtomSprite(sprite.asTextBlock(fontConfiguration.getColor(), scale), fontConfiguration)); } } public void addOpenIcon(String src) { final OpenIcon openIcon = OpenIcon.retrieve(src); if (openIcon != null) { atoms.add(new AtomOpenIcon(openIcon, fontConfiguration)); } } public void addMath(ScientificEquationSafe math, double scale) { atoms.add(new AtomMath(math, fontConfiguration.getColor(), fontConfiguration.getExtendedColor(), scale)); } private void modifyStripe(String line) { final StringBuilder pending = new StringBuilder(); while (line.length() > 0) { final Command cmd = searchCommand(line); if (cmd == null) { pending.append(line.charAt(0)); line = line.substring(1); } else { addPending(pending); line = cmd.executeAndGetRemaining(line, this); } } addPending(pending); } private void addPending(StringBuilder pending) { if (pending.length() == 0) { return; } atoms.add(AtomText.create(pending.toString(), fontConfiguration)); pending.setLength(0); } private Command searchCommand(String line) { for (Command cmd : commands) { final int i = cmd.matchingSize(line); if (i != 0) { return cmd; } } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/StripeStyle.java000066400000000000000000000041631312650303100260210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.graphic.FontConfiguration; public class StripeStyle { private final StripeStyleType type; private final int order; private final char style; public StripeStyle(StripeStyleType type, int order, char style) { this.type = type; this.order = order; this.style = style; } public final StripeStyleType getType() { return type; } public Atom getHeader(FontConfiguration fontConfiguration, CreoleContext context) { if (type == StripeStyleType.LIST_WITHOUT_NUMBER) { return new Bullet(fontConfiguration, order); } if (type == StripeStyleType.LIST_WITH_NUMBER) { final int localNumber = context.getLocalNumber(order); return AtomText.createListNumber(fontConfiguration, order, localNumber); } return null; } public final int getOrder() { return order; } public char getStyle() { return style; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/StripeStyleType.java000066400000000000000000000025741312650303100266670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; public enum StripeStyleType { NORMAL, HEADING, LIST_WITHOUT_NUMBER, LIST_WITH_NUMBER, HORIZONTAL_LINE, TREE } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/StripeTable.java000066400000000000000000000123501312650303100257450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.StringTokenizer; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; public class StripeTable implements Stripe { static enum Mode { HEADER, NORMAL }; private FontConfiguration fontConfiguration; final private ISkinSimple skinParam; final private AtomTable table; final private Atom marged; final private StripeStyle stripeStyle = new StripeStyle(StripeStyleType.NORMAL, 0, '\0'); public StripeTable(FontConfiguration fontConfiguration, ISkinSimple skinParam, String line) { this.fontConfiguration = fontConfiguration; this.skinParam = skinParam; this.table = new AtomTable(fontConfiguration.getColor()); this.marged = new AtomWithMargin(table, 2, 2); analyzeAndAddInternal(line, Mode.HEADER); } public List getAtoms() { return Collections. singletonList(marged); } static Atom asAtom(List cells, double padding) { final Sheet sheet = new Sheet(HorizontalAlignment.LEFT); for (StripeSimple cell : cells) { sheet.add(cell); } return new SheetBlock1(sheet, LineBreakStrategy.NONE, padding); } private HtmlColor getBackColor(String line) { if (CreoleParser.doesStartByColor(line)) { final int idx1 = line.indexOf('#'); final int idx2 = line.indexOf('>'); if (idx2 == -1) { throw new IllegalStateException(); } final String color = line.substring(idx1, idx2); return skinParam.getIHtmlColorSet().getColorIfValid(color); } return null; } private String withouBackColor(String line) { final int idx2 = line.indexOf('>'); if (idx2 == -1) { throw new IllegalStateException(); } return line.substring(idx2 + 1); } private void analyzeAndAddInternal(String line, Mode mode) { HtmlColor lineBackColor = getBackColor(line); if (lineBackColor != null) { line = withouBackColor(line); } table.newLine(lineBackColor); for (final StringTokenizer st = new StringTokenizer(line, "|"); st.hasMoreTokens();) { String v = st.nextToken(); HtmlColor cellBackColor = getBackColor(v); if (cellBackColor != null) { v = withouBackColor(v); } if (mode == Mode.HEADER && v.startsWith("=")) { v = v.substring(1); } final List lines = getWithNewlinesInternal(v); final List cells = new ArrayList(); for (String s : lines) { final StripeSimple cell = new StripeSimple(getFontConfiguration(mode), stripeStyle, new CreoleContext(), skinParam, CreoleMode.FULL); if (s.startsWith("")) { cell.setCellAlignment(HorizontalAlignment.RIGHT); s = s.substring("".length()); } cell.analyzeAndAdd(s); cells.add(cell); } table.addCell(asAtom(cells, skinParam.getPadding()), cellBackColor); } } static List getWithNewlinesInternal(String s) { final List result = new ArrayList(); final StringBuilder current = new StringBuilder(); for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); if (c == '\\' && i < s.length() - 1) { final char c2 = s.charAt(i + 1); i++; if (c2 == 'n') { result.add(current.toString()); current.setLength(0); } else if (c2 == '\\') { current.append(c2); } else { current.append(c); current.append(c2); } } else if (c == BackSlash.hiddenNewLine()) { result.add(current.toString()); current.setLength(0); } else { current.append(c); } } result.add(current.toString()); return result; } private FontConfiguration getFontConfiguration(Mode mode) { if (mode == Mode.NORMAL) { return fontConfiguration; } return fontConfiguration.bold(); } public void analyzeAndAddNormal(String line) { analyzeAndAddInternal(line, Mode.NORMAL); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/StripeTree.java000066400000000000000000000051211312650303100256130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.graphic.FontConfiguration; public class StripeTree implements Stripe { private FontConfiguration fontConfiguration; final private ISkinSimple skinParam; final private AtomTree tree; final private Atom marged; final private StripeStyle stripeStyle = new StripeStyle(StripeStyleType.TREE, 0, '\0'); public StripeTree(FontConfiguration fontConfiguration, ISkinSimple skinParam, String line) { this.fontConfiguration = fontConfiguration; this.skinParam = skinParam; this.tree = new AtomTree(fontConfiguration.getColor()); this.marged = new AtomWithMargin(tree, 2, 2); analyzeAndAdd(line); } public List getAtoms() { return Collections. singletonList(marged); } public void analyzeAndAdd(String line) { final List lines = StripeTable.getWithNewlinesInternal(line); for (String s : lines) { final StripeSimple cell = new StripeSimple(fontConfiguration, stripeStyle, new CreoleContext(), skinParam, CreoleMode.FULL); // EMTEC final String text = s.replaceFirst("^\\s*\\|_", ""); final int level = (s.length() - text.length()) / 2; cell.analyzeAndAdd(text); this.tree.addCell(StripeTable.asAtom(Collections.singletonList(cell), 0), level); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/creole/UCreole.java000066400000000000000000000025541312650303100250720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.creole; import net.sourceforge.plantuml.ugraphic.UShape; public interface UCreole extends UShape { } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/000077500000000000000000000000001312650303100236525ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/Bodier.java000066400000000000000000000154271312650303100257320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockLineBefore; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.skin.VisibilityModifier; public class Bodier { private final List rawBody = new ArrayList(); private final Set hides; private LeafType type; private List methodsToDisplay; private List fieldsToDisplay; private final boolean manageModifier; private ILeaf leaf; public void muteClassToObject() { methodsToDisplay = null; fieldsToDisplay = null; type = LeafType.OBJECT; } public Bodier(LeafType type, Set hides) { this.hides = hides; this.type = type; this.manageModifier = type == null ? false : type.manageModifier(); } public void addFieldOrMethod(String s, IEntity leaf) { if (leaf == null) { throw new IllegalArgumentException(); } // Empty cache methodsToDisplay = null; fieldsToDisplay = null; rawBody.add(s); if (leaf instanceof ILeaf) { if (this.leaf != null && this.leaf != leaf) { throw new IllegalArgumentException(); } this.leaf = (ILeaf) leaf; } } private boolean isBodyEnhanced() { for (String s : rawBody) { if (BodyEnhanced.isBlockSeparator(s)) { return true; } } return false; } private boolean isMethod(String s) { if (type == LeafType.ANNOTATION || type == LeafType.ABSTRACT_CLASS || type == LeafType.CLASS || type == LeafType.INTERFACE || type == LeafType.ENUM) { return MemberImpl.isMethod(s); } return false; } public List getMethodsToDisplay() { if (methodsToDisplay == null) { methodsToDisplay = new ArrayList(); for (int i = 0; i < rawBody.size(); i++) { final String s = rawBody.get(i); if (isMethod(i, rawBody) == false) { continue; } if (s.length() == 0 && methodsToDisplay.size() == 0) { continue; } final Member m = new MemberImpl(s, true, manageModifier); if (hides == null || hides.contains(m.getVisibilityModifier()) == false) { methodsToDisplay.add(m); } } removeFinalEmptyMembers(methodsToDisplay); } return Collections.unmodifiableList(methodsToDisplay); } private boolean isMethod(int i, List rawBody) { if (i > 0 && i < rawBody.size() - 1 && rawBody.get(i).length() == 0 && isMethod(rawBody.get(i - 1)) && isMethod(rawBody.get(i + 1))) { return true; } return isMethod(rawBody.get(i)); } public List getFieldsToDisplay() { if (fieldsToDisplay == null) { fieldsToDisplay = new ArrayList(); for (String s : rawBody) { if (isMethod(s) == true) { continue; } if (s.length() == 0 && fieldsToDisplay.size() == 0) { continue; } final Member m = new MemberImpl(s, false, manageModifier); if (hides == null || hides.contains(m.getVisibilityModifier()) == false) { fieldsToDisplay.add(m); } } removeFinalEmptyMembers(fieldsToDisplay); } return Collections.unmodifiableList(fieldsToDisplay); } private void removeFinalEmptyMembers(List result) { while (result.size() > 0 && StringUtils.trin(result.get(result.size() - 1).getDisplay(false)).length() == 0) { result.remove(result.size() - 1); } } public boolean hasUrl() { for (Member m : getFieldsToDisplay()) { if (m.hasUrl()) { return true; } } for (Member m : getMethodsToDisplay()) { if (m.hasUrl()) { return true; } } return true; } private List rawBodyWithoutHidden() { if (hides == null || hides.size() == 0) { return rawBody; } final List result = new ArrayList(); for (String s : rawBody) { final Member m = new MemberImpl(s, isMethod(s), manageModifier); if (hides.contains(m.getVisibilityModifier()) == false) { result.add(s); } } return result; } public TextBlock getBody(final FontParam fontParam, final ISkinParam skinParam, final boolean showMethods, final boolean showFields, Stereotype stereotype) { if (type.isLikeClass() && isBodyEnhanced()) { if (showMethods || showFields) { return new BodyEnhanced(rawBodyWithoutHidden(), fontParam, skinParam, manageModifier, stereotype, leaf); } return null; } final MethodsOrFieldsArea fields = new MethodsOrFieldsArea(getFieldsToDisplay(), fontParam, skinParam, stereotype, leaf); if (type == LeafType.OBJECT) { if (showFields == false) { return new TextBlockLineBefore(TextBlockUtils.empty(0, 0)); } return fields.asBlockMemberImpl(); } if (type.isLikeClass() == false) { throw new UnsupportedOperationException(); } final MethodsOrFieldsArea methods = new MethodsOrFieldsArea(getMethodsToDisplay(), fontParam, skinParam, stereotype, leaf); if (showFields && showMethods == false) { return fields.asBlockMemberImpl(); } else if (showMethods && showFields == false) { return methods.asBlockMemberImpl(); } else if (showFields == false && showMethods == false) { return TextBlockUtils.empty(0, 0); } final TextBlock bb1 = fields.asBlockMemberImpl(); final TextBlock bb2 = methods.asBlockMemberImpl(); return TextBlockUtils.mergeTB(bb1, bb2, HorizontalAlignment.LEFT); } public List getRawBody() { return Collections.unmodifiableList(rawBody); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced.java000066400000000000000000000200611312650303100270370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.ListIterator; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.CreoleParser; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockLineBefore; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.TextBlockVertical2; import net.sourceforge.plantuml.svek.Ports; import net.sourceforge.plantuml.svek.WithPorts; import net.sourceforge.plantuml.ugraphic.UGraphic; public class BodyEnhanced extends AbstractTextBlock implements TextBlock, WithPorts { private TextBlock area2; private final FontConfiguration titleConfig; private final List rawBody; private final FontParam fontParam; private final ISkinParam skinParam; private final boolean lineFirst; private final HorizontalAlignment align; private final boolean manageHorizontalLine; private final boolean manageModifier; private final List urls = new ArrayList(); private final Stereotype stereotype; private final ILeaf entity; public BodyEnhanced(List rawBody, FontParam fontParam, ISkinParam skinParam, boolean manageModifier, Stereotype stereotype, ILeaf entity) { this.rawBody = new ArrayList(rawBody); this.stereotype = stereotype; this.fontParam = fontParam; this.skinParam = skinParam; this.titleConfig = new FontConfiguration(skinParam, fontParam, stereotype); this.lineFirst = true; this.align = skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT); this.manageHorizontalLine = true; this.manageModifier = manageModifier; this.entity = entity; } public BodyEnhanced(Display display, FontParam fontParam, ISkinParam skinParam, HorizontalAlignment align, Stereotype stereotype, boolean manageHorizontalLine, boolean manageModifier, ILeaf entity) { this.entity = entity; this.stereotype = stereotype; this.rawBody = new ArrayList(); for (CharSequence s : display) { this.rawBody.add(s.toString()); } this.fontParam = fontParam; this.skinParam = skinParam; this.titleConfig = new FontConfiguration(skinParam, fontParam, stereotype); this.lineFirst = false; this.align = skinParam.getDefaultTextAlignment(align); this.manageHorizontalLine = manageHorizontalLine; this.manageModifier = manageModifier; } private TextBlock decorate(StringBounder stringBounder, TextBlock b, char separator, TextBlock title) { if (separator == 0) { return b; } if (title == null) { return new TextBlockLineBefore(TextBlockUtils.withMargin(b, 6, 4), separator); } final Dimension2D dimTitle = title.calculateDimension(stringBounder); final TextBlock raw = new TextBlockLineBefore(TextBlockUtils.withMargin(b, 6, 6, dimTitle.getHeight() / 2, 4), separator, title); return TextBlockUtils.withMargin(raw, 0, 0, dimTitle.getHeight() / 2, 0); } public Dimension2D calculateDimension(StringBounder stringBounder) { return getArea(stringBounder).calculateDimension(stringBounder); } private TextBlock getArea(StringBounder stringBounder) { if (area2 != null) { return area2; } urls.clear(); final List blocks = new ArrayList(); char separator = lineFirst ? '_' : 0; TextBlock title = null; List members = new ArrayList(); for (ListIterator it = rawBody.listIterator(); it.hasNext();) { final String s = it.next(); if (manageHorizontalLine && isBlockSeparator(s)) { blocks.add(decorate(stringBounder, new MethodsOrFieldsArea(members, fontParam, skinParam, align, stereotype, entity), separator, title)); separator = s.charAt(0); title = getTitle(s, skinParam); members = new ArrayList(); } else if (CreoleParser.isTreeStart(s)) { if (members.size() > 0) { blocks.add(decorate(stringBounder, new MethodsOrFieldsArea(members, fontParam, skinParam, align, stereotype, entity), separator, title)); } members = new ArrayList(); final List allTree = buildAllTree(s, it); final TextBlock bloc = Display.create(allTree).create(fontParam.getFontConfiguration(skinParam), align, skinParam, CreoleMode.FULL); blocks.add(bloc); } else { final Member m = new MemberImpl(s, MemberImpl.isMethod(s), manageModifier); members.add(m); if (m.getUrl() != null) { urls.add(m.getUrl()); } } } blocks.add(decorate(stringBounder, new MethodsOrFieldsArea(members, fontParam, skinParam, align, stereotype, entity), separator, title)); if (blocks.size() == 1) { this.area2 = blocks.get(0); } else { this.area2 = new TextBlockVertical2(blocks, align); } return area2; } private static List buildAllTree(String init, ListIterator it) { final List result = new ArrayList(); result.add(init); while (it.hasNext()) { final String s = it.next(); if (CreoleParser.isTreeStart(StringUtils.trinNoTrace(s))) { result.add(s); } else { it.previous(); return result; } } return result; } public static boolean isBlockSeparator(String s) { if (s.startsWith("--") && s.endsWith("--")) { return true; } if (s.startsWith("==") && s.endsWith("==")) { return true; } if (s.startsWith("..") && s.endsWith("..") && s.equals("...") == false) { return true; } if (s.startsWith("__") && s.endsWith("__")) { return true; } return false; } private TextBlock getTitle(String s, ISkinSimple spriteContainer) { if (s.length() <= 4) { return null; } s = StringUtils.trin(s.substring(2, s.length() - 2)); return Display.getWithNewlines(s).create(titleConfig, HorizontalAlignment.LEFT, spriteContainer); } public Ports getPorts(StringBounder stringBounder) { final TextBlock area = getArea(stringBounder); if (area instanceof WithPorts) { return ((WithPorts) area).getPorts(stringBounder); } return new Ports(); } public void drawU(UGraphic ug) { getArea(ug.getStringBounder()).drawU(ug); } public List getUrls() { return Collections.unmodifiableList(urls); } public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { return getArea(stringBounder).getInnerPosition(member, stringBounder, strategy); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced2.java000066400000000000000000000117141312650303100271260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockLineBefore; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.TextBlockVertical2; import net.sourceforge.plantuml.ugraphic.UGraphic; public class BodyEnhanced2 extends AbstractTextBlock implements TextBlock { private TextBlock area2; private final FontConfiguration titleConfig; private final Display rawBody2; private final ISkinSimple spriteContainer; private final HorizontalAlignment align; // private final List urls = new ArrayList(); public BodyEnhanced2(Display rawBody, FontParam fontParam, ISkinSimple spriteContainer, HorizontalAlignment align, FontConfiguration titleConfig) { this.rawBody2 = rawBody; this.spriteContainer = spriteContainer; this.titleConfig = titleConfig; this.align = align; } private TextBlock decorate(StringBounder stringBounder, TextBlock b, char separator, TextBlock title) { if (separator == 0) { return b; } if (title == null) { return new TextBlockLineBefore(TextBlockUtils.withMargin(b, 0, 4), separator); } final Dimension2D dimTitle = title.calculateDimension(stringBounder); final TextBlock raw = new TextBlockLineBefore(TextBlockUtils.withMargin(b, 0, 6, dimTitle.getHeight() / 2, 4), separator, title); return TextBlockUtils.withMargin(raw, 0, 0, dimTitle.getHeight() / 2, 0); } public Dimension2D calculateDimension(StringBounder stringBounder) { return getArea(stringBounder).calculateDimension(stringBounder); } private TextBlock getArea(StringBounder stringBounder) { if (area2 != null) { return area2; } // urls.clear(); final List blocks = new ArrayList(); char separator = 0; TextBlock title = null; Display members2 = Display.empty(); for (CharSequence s : rawBody2) { if (isBlockSeparator(s.toString())) { blocks.add(decorate(stringBounder, getTextBlock(members2, stringBounder), separator, title)); separator = s.charAt(0); title = getTitle(s.toString(), spriteContainer); members2 = Display.empty(); } else { members2 = members2.add(s); } } blocks.add(decorate(stringBounder, getTextBlock(members2, stringBounder), separator, title)); if (blocks.size() == 1) { this.area2 = blocks.get(0); } else { this.area2 = new TextBlockVertical2(blocks, align); } return area2; } private TextBlock getTextBlock(Display members2, StringBounder stringBounder) { final TextBlock result = members2.create(titleConfig, align, spriteContainer); return result; } public static boolean isBlockSeparator(String s) { if (s.startsWith("--") && s.endsWith("--")) { return true; } if (s.startsWith("==") && s.endsWith("==")) { return true; } if (s.startsWith("..") && s.endsWith("..")) { return true; } if (s.startsWith("__") && s.endsWith("__")) { return true; } return false; } private TextBlock getTitle(String s, ISkinSimple spriteContainer) { if (s.length() <= 4) { return null; } s = StringUtils.trin(s.substring(2, s.length() - 2)); return Display.getWithNewlines(s).create(titleConfig, HorizontalAlignment.LEFT, spriteContainer); } public void drawU(UGraphic ug) { getArea(ug.getStringBounder()).drawU(ug); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/Code.java000066400000000000000000000110341312650303100253660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.util.Map; import net.sourceforge.plantuml.StringUtils; public class Code implements Comparable { private final String fullName; private final String separator; private Code(String fullName, String separator) { if (fullName == null) { throw new IllegalArgumentException(); } this.fullName = fullName; this.separator = separator; } public Code removeMemberPart() { final int x = fullName.lastIndexOf("::"); if (x == -1) { return null; } return new Code(fullName.substring(0, x), separator); } public String getPortMember() { final int x = fullName.lastIndexOf("::"); if (x == -1) { return null; } return fullName.substring(x + 2); } // public String getNamespaceSeparator() { // return separator; // } public Code withSeparator(String separator) { if (separator == null) { throw new IllegalArgumentException(); } if (this.separator != null && this.separator.equals(separator) == false) { throw new IllegalStateException(); } return new Code(fullName, separator); } public static Code of(String code) { return of(code, null); } public static Code of(String code, String separator) { if (code == null) { return null; } return new Code(code, separator); } public final String getFullName() { return fullName; } @Override public String toString() { return fullName + "(" + separator + ")"; } @Override public int hashCode() { return fullName.hashCode(); } @Override public boolean equals(Object obj) { final Code other = (Code) obj; return this.fullName.equals(other.fullName); } public Code addSuffix(String suffix) { return new Code(fullName + suffix, separator); } public int compareTo(Code other) { return this.fullName.compareTo(other.fullName); } public Code eventuallyRemoveStartingAndEndingDoubleQuote(String format) { return Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(fullName, format), separator); } private final String getNamespace(Map leafs) { String name = this.getFullName(); if (separator == null) { throw new IllegalArgumentException(toString()); } do { final int x = name.lastIndexOf(separator); if (x == -1) { return null; } name = name.substring(0, x); } while (leafs.containsKey(Code.of(name, separator))); return name; } public final Code getShortName(Map leafs) { if (separator == null) { throw new IllegalArgumentException(); } final String code = this.getFullName(); final String namespace = getNamespace(leafs); if (namespace == null) { return Code.of(code, separator); } return Code.of(code.substring(namespace.length() + separator.length()), separator); } public final Code getFullyQualifiedCode(IGroup g) { if (separator == null) { throw new IllegalArgumentException(); } final String full = this.getFullName(); if (full.startsWith(separator)) { return Code.of(full.substring(separator.length()), separator); } if (full.contains(separator)) { return Code.of(full, separator); } if (EntityUtils.groupRoot(g)) { return Code.of(full, separator); } final Code namespace2 = g.getNamespace2(); if (namespace2 == null) { return Code.of(full, separator); } return Code.of(namespace2.fullName + separator + full, separator); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java000066400000000000000000000416261312650303100266660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.api.ImageDataSimple; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.dot.CucaDiagramTxtMaker; import net.sourceforge.plantuml.cucadiagram.entity.EntityFactory; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.jdot.CucaDiagramFileMakerJDot; import net.sourceforge.plantuml.skin.VisibilityModifier; import net.sourceforge.plantuml.statediagram.StateDiagram; import net.sourceforge.plantuml.svek.CucaDiagramFileMaker; import net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.xmi.CucaDiagramXmiMaker; import net.sourceforge.plantuml.xmlsc.StateDiagramScxmlMaker; public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, PortionShower { private int horizontalPages = 1; private int verticalPages = 1; private final Set hiddenType = new HashSet(); private final Set hiddenStereotype = new HashSet(); protected final EntityFactory entityFactory = new EntityFactory(hiddenType, hiddenStereotype); protected IGroup currentGroup = entityFactory.getRootGroup(); private boolean visibilityModifierPresent; public abstract IEntity getOrCreateLeaf(Code code, LeafType type, USymbol symbol); public String getNamespaceSeparator() { return null; } @Override public boolean hasUrl() { for (IEntity entity : getGroups(true)) { if (entity.hasUrl()) { return true; } } for (IEntity entity : getLeafs().values()) { if (entity.hasUrl()) { return true; } } for (Link link : getLinks()) { if (link.hasUrl()) { return true; } } return false; } // public ILeaf getOrCreateLeaf1(Code code, LeafType type) { // return getOrCreateLeaf1Default(code, type); // } final protected ILeaf getOrCreateLeafDefault(Code code, LeafType type, USymbol symbol) { if (type == null) { throw new IllegalArgumentException(); } ILeaf result = getLeafs().get(code); if (result == null) { result = createLeafInternal(code, Display.getWithNewlines(code), type, getCurrentGroup(), symbol); result.setUSymbol(symbol); } if (result.getLeafType() == LeafType.CLASS && type == LeafType.OBJECT) { if (result.muteToType(type, symbol) == false) { return null; } } this.lastEntity = result; return result; } public ILeaf createLeaf(Code code, Display display, LeafType type, USymbol symbol) { if (getLeafs().containsKey(code)) { throw new IllegalArgumentException("Already known: " + code); } return createLeafInternal(code, display, type, getCurrentGroup(), symbol); } final protected ILeaf createLeafInternal(Code code, Display display, LeafType type, IGroup group, USymbol symbol) { if (Display.isNull(display)) { display = Display.getWithNewlines(code); } final ILeaf leaf = entityFactory.createLeaf(code, display, type, group, getHides(), getNamespaceSeparator()); entityFactory.addLeaf(leaf); this.lastEntity = leaf; leaf.setUSymbol(symbol); return leaf; } public boolean leafExist(Code code) { return getLeafs().containsKey(code); } final public Collection getChildrenGroups(IGroup parent) { final Collection result = new ArrayList(); for (IGroup gg : getGroups(false)) { if (gg.getParentContainer() == parent) { result.add(gg); } } return Collections.unmodifiableCollection(result); } final public IGroup getOrCreateGroup(Code code, Display display, GroupType type, IGroup parent) { final IGroup g = getOrCreateGroupInternal(code, display, null, type, parent); currentGroup = g; return g; } private IGroup getOrCreateGroupInternal(Code code, Display display, Code namespace2, GroupType type, IGroup parent) { IGroup result = entityFactory.getGroups().get(code); if (result != null) { return result; } if (entityFactory.getLeafs().containsKey(code)) { result = entityFactory.muteToGroup(code, namespace2, type, parent); result.setDisplay(display); } else { result = entityFactory.createGroup(code, display, namespace2, type, parent, getHides(), getNamespaceSeparator()); } entityFactory.addGroup(result); return result; } public final IGroup getCurrentGroup() { return currentGroup; } public final IGroup getGroup(Code code) { final IGroup p = entityFactory.getGroups().get(code); if (p == null) { throw new IllegalArgumentException(); // return null; } return p; } public void endGroup() { if (EntityUtils.groupRoot(currentGroup)) { Log.error("No parent group"); return; } currentGroup = currentGroup.getParentContainer(); } public final boolean isGroup(Code code) { return leafExist(code) == false && entityFactory.getGroups().containsKey(code); } public final Collection getGroups(boolean withRootGroup) { if (withRootGroup == false) { return entityFactory.getGroups().values(); } final Collection result = new ArrayList(); result.add(getRootGroup()); result.addAll(entityFactory.getGroups().values()); return Collections.unmodifiableCollection(result); } public IGroup getRootGroup() { return entityFactory.getRootGroup(); } final protected Map getLeafs() { return entityFactory.getLeafs(); } public Collection getLeafsvalues() { return getLeafs().values(); } public final int getLeafssize() { return getLeafs().size(); } public final ILeaf getLeafsget(Code code) { return getLeafs().get(code); } final public void addLink(Link link) { entityFactory.addLink(link); } final protected void removeLink(Link link) { entityFactory.removeLink(link); } final public List getLinks() { return entityFactory.getLinks(); } final public int getHorizontalPages() { return horizontalPages; } final public void setHorizontalPages(int horizontalPages) { this.horizontalPages = horizontalPages; } final public int getVerticalPages() { return verticalPages; } final public void setVerticalPages(int verticalPages) { this.verticalPages = verticalPages; } // final public List createPng2(File pngFile) throws IOException, InterruptedException { // final CucaDiagramPngMaker3 maker = new CucaDiagramPngMaker3(this); // return maker.createPng(pngFile); // } // // final public void createPng2(OutputStream os) throws IOException { // final CucaDiagramPngMaker3 maker = new CucaDiagramPngMaker3(this); // maker.createPng(os); // } abstract protected List getDotStrings(); final public String[] getDotStringSkek() { final List result = new ArrayList(); for (String s : getDotStrings()) { if (s.startsWith("nodesep") || s.startsWith("ranksep")) { result.add(s); } } final String aspect = getPragma().getValue("aspect"); if (aspect != null) { result.add("aspect=" + aspect + ";"); } final String ratio = getPragma().getValue("ratio"); if (ratio != null) { result.add("ratio=" + ratio + ";"); } return result.toArray(new String[result.size()]); } private void createFilesXmi(OutputStream suggestedFile, FileFormat fileFormat) throws IOException { final CucaDiagramXmiMaker maker = new CucaDiagramXmiMaker(this, fileFormat); maker.createFiles(suggestedFile); } private void createFilesScxml(OutputStream suggestedFile) throws IOException { final StateDiagramScxmlMaker maker = new StateDiagramScxmlMaker((StateDiagram) this); maker.createFiles(suggestedFile); } @Override protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { final FileFormat fileFormat = fileFormatOption.getFileFormat(); if (fileFormat == FileFormat.ATXT || fileFormat == FileFormat.UTXT) { try { createFilesTxt(os, index, fileFormat); } catch (Throwable t) { t.printStackTrace(new PrintStream(os)); } return new ImageDataSimple(); } if (fileFormat.name().startsWith("XMI")) { createFilesXmi(os, fileFormat); return new ImageDataSimple(); } if (fileFormat == FileFormat.SCXML) { createFilesScxml(os); return new ImageDataSimple(); } if (getUmlDiagramType() == UmlDiagramType.COMPOSITE) { throw new UnsupportedOperationException(); } // final CucaDiagramFileMaker maker = OptionFlags.USE_HECTOR ? new CucaDiagramFileMakerHectorC1(this) // : new CucaDiagramFileMakerSvek(this); final CucaDiagramFileMaker maker = this.isUseJDot() ? new CucaDiagramFileMakerJDot(this, fileFormat.getDefaultStringBounder()) : new CucaDiagramFileMakerSvek(this); final ImageData result = maker.createFile(os, getDotStrings(), fileFormatOption); if (result == null) { return new ImageDataSimple(); } this.warningOrError = result.getWarningOrError(); return result; } private String warningOrError; @Override public String getWarningOrError() { final String generalWarningOrError = super.getWarningOrError(); if (warningOrError == null) { return generalWarningOrError; } if (generalWarningOrError == null) { return warningOrError; } return generalWarningOrError + BackSlash.NEWLINE + warningOrError; } private void createFilesTxt(OutputStream os, int index, FileFormat fileFormat) throws IOException { final CucaDiagramTxtMaker maker = new CucaDiagramTxtMaker(this, fileFormat); maker.createFiles(os, index); } // public final Rankdir getRankdir() { // return rankdir; // } // // public final void setRankdir(Rankdir rankdir) { // this.rankdir = rankdir; // } public boolean isAutarkic(IGroup g) { if (g.getGroupType() == GroupType.PACKAGE) { return false; } if (g.getGroupType() == GroupType.INNER_ACTIVITY) { return true; } if (g.getGroupType() == GroupType.CONCURRENT_ACTIVITY) { return true; } if (g.getGroupType() == GroupType.CONCURRENT_STATE) { return true; } if (getChildrenGroups(g).size() > 0) { return false; } for (Link link : getLinks()) { if (EntityUtils.isPureInnerLink3(g, link) == false) { return false; } } for (ILeaf leaf : g.getLeafsDirect()) { if (leaf.getEntityPosition() != EntityPosition.NORMAL) { return false; } } return true; } private static boolean isNumber(String s) { return s.matches("[+-]?(\\.?\\d+|\\d+\\.\\d*)"); } public void resetPragmaLabel() { getPragma().undefine("labeldistance"); getPragma().undefine("labelangle"); } public String getLabeldistance() { if (getPragma().isDefine("labeldistance")) { final String s = getPragma().getValue("labeldistance"); if (isNumber(s)) { return s; } } if (getPragma().isDefine("defaultlabeldistance")) { final String s = getPragma().getValue("defaultlabeldistance"); if (isNumber(s)) { return s; } } // Default in dot 1.0 return "1.7"; } public String getLabelangle() { if (getPragma().isDefine("labelangle")) { final String s = getPragma().getValue("labelangle"); if (isNumber(s)) { return s; } } if (getPragma().isDefine("defaultlabelangle")) { final String s = getPragma().getValue("defaultlabelangle"); if (isNumber(s)) { return s; } } // Default in dot -25 return "25"; } final public boolean isEmpty(IGroup gToTest) { for (IEntity gg : getGroups(false)) { if (gg == gToTest) { continue; } if (gg.getParentContainer() == gToTest) { return false; } } return gToTest.size() == 0; } public final boolean isVisibilityModifierPresent() { return visibilityModifierPresent; } public final void setVisibilityModifierPresent(boolean visibilityModifierPresent) { this.visibilityModifierPresent = visibilityModifierPresent; } public final boolean showPortion(EntityPortion portion, IEntity entity) { if (getSkinParam().strictUmlStyle() && portion == EntityPortion.CIRCLED_CHARACTER) { return false; } boolean result = true; for (HideOrShow cmd : hideOrShows) { if (cmd.portion == portion && cmd.gender.contains(entity)) { result = cmd.show; } } return result; } public final void hideOrShow(EntityGender gender, Set portions, boolean show) { for (EntityPortion portion : portions) { this.hideOrShows.add(new HideOrShow(gender, portion, show)); } } public void hideOrShow(Set visibilities, boolean show) { if (show) { hides.removeAll(visibilities); } else { hides.addAll(visibilities); } } public void hideOrShow(IEntity leaf, boolean show) { leaf.setRemoved(!show); } public void hideOrShow(Stereotype stereotype, boolean show) { if (show) { hiddenStereotype.remove(stereotype.getLabel(false)); } else { hiddenStereotype.add(stereotype.getLabel(false)); } } public void hideOrShow(LeafType leafType, boolean show) { if (show) { hiddenType.remove(leafType); } else { hiddenType.add(leafType); } } private final List hideOrShows = new ArrayList(); private final Set hides = new HashSet(); static class HideOrShow { private final EntityGender gender; private final EntityPortion portion; private final boolean show; public HideOrShow(EntityGender gender, EntityPortion portion, boolean show) { this.gender = gender; this.portion = portion; this.show = show; } } @Override public int getNbImages() { return this.horizontalPages * this.verticalPages; } public final Set getHides() { return Collections.unmodifiableSet(hides); } public ColorMapper getColorMapper() { return getSkinParam().getColorMapper(); } final public boolean isStandalone(IEntity ent) { for (final Link link : getLinks()) { if (link.getEntity1() == ent || link.getEntity2() == ent) { return false; } } return true; } final public Link getLastLink() { final List links = getLinks(); for (int i = links.size() - 1; i >= 0; i--) { final Link link = links.get(i); if (link.getEntity1().getLeafType() != LeafType.NOTE && link.getEntity2().getLeafType() != LeafType.NOTE) { return link; } } return null; } private ILeaf lastEntity = null; final public ILeaf getLastEntity() { // for (final Iterator it = getLeafs().values().iterator(); it.hasNext();) { // final ILeaf ent = it.next(); // if (it.hasNext() == false) { // return ent; // } // } // return null; return lastEntity; } final public EntityFactory getEntityFactory() { return entityFactory; } public void applySingleStrategy() { final MagmaList magmaList = new MagmaList(); for (IGroup g : getGroups(true)) { final List standalones = new ArrayList(); // final SingleStrategy singleStrategy = g.getSingleStrategy(); for (ILeaf ent : g.getLeafsDirect()) { if (isStandalone(ent)) { standalones.add(ent); } } if (standalones.size() < 3) { continue; } final Magma magma = new Magma(this, standalones); magma.putInSquare(); magmaList.add(magma); // for (Link link : singleStrategy.generateLinks(standalones)) { // addLink(link); // } } for (IGroup g : getGroups(true)) { final MagmaList magmas = magmaList.getMagmas(g); if (magmas.size() < 3) { continue; } magmas.putInSquare(); } } public boolean isHideEmptyDescriptionForState() { return false; } protected void incRawLayout() { entityFactory.incRawLayout(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/Display.java000066400000000000000000000365651312650303100261410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.CharSequence2; import net.sourceforge.plantuml.CharSequence2Impl; import net.sourceforge.plantuml.EmbededDiagram; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.LineLocationImpl; import net.sourceforge.plantuml.SpriteContainer; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.CreoleParser; import net.sourceforge.plantuml.creole.Sheet; import net.sourceforge.plantuml.creole.SheetBlock1; import net.sourceforge.plantuml.creole.SheetBlock2; import net.sourceforge.plantuml.graphic.CircledCharacter; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockSimple; import net.sourceforge.plantuml.graphic.TextBlockSprited; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.VerticalAlignment; import net.sourceforge.plantuml.sequencediagram.MessageNumber; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.sprite.Sprite; public class Display implements Iterable { private final List display; private final HorizontalAlignment naturalHorizontalAlignment; private final boolean isNull; private final CreoleMode defaultCreoleMode; public final static Display NULL = new Display(null, null, true, CreoleMode.FULL); public boolean isWhite() { return display.size() == 0 || (display.size() == 1 && display.get(0).toString().matches("\\s*")); } public static Display empty() { return new Display((HorizontalAlignment) null, false, CreoleMode.FULL); } public static Display create(CharSequence... s) { return create(Arrays.asList(s)); } public static Display create(Collection other) { return new Display(other, null, false, CreoleMode.FULL); } public static Display getWithNewlines(Code s) { return getWithNewlines(s.getFullName()); } public static Display getWithNewlines(String s) { if (s == null) { // Thread.dumpStack(); return NULL; } final List result = new ArrayList(); final StringBuilder current = new StringBuilder(); HorizontalAlignment naturalHorizontalAlignment = null; boolean rawMode = false; for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); final String sub = s.substring(i); if (sub.startsWith("") || sub.startsWith("") || sub.startsWith("[[")) { rawMode = true; } else if (sub.startsWith("") || sub.startsWith("") || sub.startsWith("]]")) { rawMode = false; } if (rawMode == false && c == '\\' && i < s.length() - 1) { final char c2 = s.charAt(i + 1); i++; if (c2 == 'n' || c2 == 'r' || c2 == 'l') { if (c2 == 'r') { naturalHorizontalAlignment = HorizontalAlignment.RIGHT; } else if (c2 == 'l') { naturalHorizontalAlignment = HorizontalAlignment.LEFT; } result.add(current.toString()); current.setLength(0); } else if (c2 == 't') { current.append('\t'); } else if (c2 == '\\') { current.append(c2); } else { current.append(c); current.append(c2); } } else if (c == BackSlash.hiddenNewLine()) { result.add(current.toString()); current.setLength(0); } else { current.append(c); } } result.add(current.toString()); return new Display(result, naturalHorizontalAlignment, false, CreoleMode.FULL); } private Display(Display other, CreoleMode mode) { this(other.naturalHorizontalAlignment, other.isNull, mode); this.display.addAll(other.display); } private Display(HorizontalAlignment naturalHorizontalAlignment, boolean isNull, CreoleMode defaultCreoleMode) { this.defaultCreoleMode = defaultCreoleMode; this.isNull = isNull; this.display = isNull ? null : new ArrayList(); this.naturalHorizontalAlignment = isNull ? null : naturalHorizontalAlignment; } private Display(Collection other, HorizontalAlignment naturalHorizontalAlignment, boolean isNull, CreoleMode defaultCreoleMode) { this(naturalHorizontalAlignment, isNull, defaultCreoleMode); if (isNull == false) { this.display.addAll(manageEmbededDiagrams2(other)); } } private static List manageEmbededDiagrams2(final Collection strings) { final List result = new ArrayList(); final Iterator it = strings.iterator(); while (it.hasNext()) { CharSequence s = it.next(); if (s != null && StringUtils.trin(s.toString()).equals("{{")) { final List other = new ArrayList(); other.add("@startuml"); while (it.hasNext()) { final CharSequence s2 = it.next(); if (s2 != null && StringUtils.trin(s2.toString()).equals("}}")) { break; } other.add(s2); } other.add("@enduml"); s = new EmbededDiagram(Display.create(other)); } result.add(s); } return result; } public Display manageGuillemet() { final List result = new ArrayList(); for (CharSequence line : display) { final String withGuillement = StringUtils.manageGuillemet(line.toString()); if (withGuillement.equals(line.toString())) { result.add(line); } else { result.add(withGuillement); } } return new Display(result, this.naturalHorizontalAlignment, this.isNull, this.defaultCreoleMode); } public Display underlined() { final List result = new ArrayList(); for (CharSequence line : display) { result.add("" + line); } return new Display(result, this.naturalHorizontalAlignment, this.isNull, this.defaultCreoleMode); } public Display withCreoleMode(CreoleMode mode) { if (isNull) { throw new IllegalArgumentException(); } return new Display(this, mode); } // private String asStringWithHiddenNewLine() { // final StringBuilder sb = new StringBuilder(); // for (int i = 0; i < display.size(); i++) { // sb.append(display.get(i)); // if (i < display.size() - 1) { // sb.append(BackSlash.hiddenNewLine()); // } // } // return sb.toString(); // } @Override public String toString() { if (isNull) { return "NULL"; } return display.toString(); } @Override public int hashCode() { return display.hashCode(); } @Override public boolean equals(Object other) { return this.display.equals(((Display) other).display); } public Display addAll(Display other) { final Display result = new Display(this, this.defaultCreoleMode); result.display.addAll(other.display); return result; } public Display addFirst(CharSequence s) { final Display result = new Display(this, this.defaultCreoleMode); result.display.add(0, s); return result; } public Display add(CharSequence s) { final Display result = new Display(this, this.defaultCreoleMode); result.display.add(s); return result; } public int size() { if (isNull) { return 0; } return display.size(); } public CharSequence get(int i) { return display.get(i); } public Iterator iterator() { return Collections.unmodifiableList(display).iterator(); } public Display subList(int i, int size) { return new Display(display.subList(i, size), this.naturalHorizontalAlignment, this.isNull, this.defaultCreoleMode); } public List as() { return Collections.unmodifiableList(display); } public List as2() { final List result = new ArrayList(); LineLocationImpl location = new LineLocationImpl("inner", null); for (CharSequence cs : display) { location = location.oneLineRead(); result.add(new CharSequence2Impl(cs, location)); } return Collections.unmodifiableList(result); } public boolean hasUrl() { final UrlBuilder urlBuilder = new UrlBuilder(null, ModeUrl.ANYWHERE); for (CharSequence s : this) { if (urlBuilder.getUrl(s.toString()) != null) { return true; } } return false; } public HorizontalAlignment getNaturalHorizontalAlignment() { return naturalHorizontalAlignment; } public List splitMultiline(Pattern2 separator) { final List result = new ArrayList(); Display pending = new Display(this.naturalHorizontalAlignment, this.isNull, this.defaultCreoleMode); result.add(pending); for (CharSequence line : display) { final Matcher2 m = separator.matcher(line); if (m.find()) { final CharSequence s1 = line.subSequence(0, m.start()); pending.display.add(s1); final CharSequence s2 = line.subSequence(m.end(), line.length()); pending = new Display(this.naturalHorizontalAlignment, this.isNull, this.defaultCreoleMode); result.add(pending); pending.display.add(s2); } else { pending.display.add(line); } } return Collections.unmodifiableList(result); } // ------ public static boolean isNull(Display display) { // if (display == null) { // throw new IllegalArgumentException(); // } return display == null || display.isNull; } public TextBlock create(FontConfiguration fontConfiguration, HorizontalAlignment horizontalAlignment, ISkinSimple spriteContainer) { return create(fontConfiguration, horizontalAlignment, spriteContainer, CreoleMode.FULL); } public TextBlock createWithNiceCreoleMode(FontConfiguration fontConfiguration, HorizontalAlignment horizontalAlignment, ISkinSimple spriteContainer) { return create(fontConfiguration, horizontalAlignment, spriteContainer, defaultCreoleMode); } public TextBlock create(FontConfiguration fontConfiguration, HorizontalAlignment horizontalAlignment, ISkinSimple spriteContainer, CreoleMode modeSimpleLine) { return create(fontConfiguration, horizontalAlignment, spriteContainer, LineBreakStrategy.NONE, modeSimpleLine, null, null); } public TextBlock create(FontConfiguration fontConfiguration, HorizontalAlignment horizontalAlignment, ISkinSimple spriteContainer, LineBreakStrategy maxMessageSize) { return create(fontConfiguration, horizontalAlignment, spriteContainer, maxMessageSize, defaultCreoleMode, null, null); } public TextBlock create(FontConfiguration fontConfiguration, HorizontalAlignment horizontalAlignment, ISkinSimple spriteContainer, LineBreakStrategy maxMessageSize, CreoleMode modeSimpleLine, UFont fontForStereotype, HtmlColor htmlColorForStereotype) { if (maxMessageSize == null) { throw new IllegalArgumentException(); } if (getNaturalHorizontalAlignment() != null) { horizontalAlignment = getNaturalHorizontalAlignment(); } if (size() > 0) { if (get(0) instanceof Stereotype) { return createStereotype(fontConfiguration, horizontalAlignment, spriteContainer, 0, fontForStereotype, htmlColorForStereotype); } if (get(size() - 1) instanceof Stereotype) { return createStereotype(fontConfiguration, horizontalAlignment, spriteContainer, size() - 1, fontForStereotype, htmlColorForStereotype); } if (get(0) instanceof MessageNumber) { return createMessageNumber(fontConfiguration, horizontalAlignment, spriteContainer, maxMessageSize); } } return getCreole(fontConfiguration, horizontalAlignment, spriteContainer, maxMessageSize, modeSimpleLine); } private TextBlock getCreole(FontConfiguration fontConfiguration, HorizontalAlignment horizontalAlignment, ISkinSimple spriteContainer, LineBreakStrategy maxMessageSize, CreoleMode modeSimpleLine) { final Sheet sheet = new CreoleParser(fontConfiguration, horizontalAlignment, spriteContainer, modeSimpleLine) .createSheet(this); final SheetBlock1 sheetBlock1 = new SheetBlock1(sheet, maxMessageSize, spriteContainer == null ? 0 : spriteContainer.getPadding()); return new SheetBlock2(sheetBlock1, sheetBlock1, new UStroke(1.5)); } private TextBlock createMessageNumber(FontConfiguration fontConfiguration, HorizontalAlignment horizontalAlignment, ISkinSimple spriteContainer, LineBreakStrategy maxMessageSize) { TextBlock tb1 = subList(0, 1).getCreole(fontConfiguration, horizontalAlignment, spriteContainer, maxMessageSize, CreoleMode.FULL); tb1 = TextBlockUtils.withMargin(tb1, 0, 4, 0, 0); final TextBlock tb2 = subList(1, size()).getCreole(fontConfiguration, horizontalAlignment, spriteContainer, maxMessageSize, CreoleMode.FULL); return TextBlockUtils.mergeLR(tb1, tb2, VerticalAlignment.CENTER); } private TextBlock createStereotype(FontConfiguration fontConfiguration, HorizontalAlignment horizontalAlignment, SpriteContainer spriteContainer, int position, UFont fontForStereotype, HtmlColor htmlColorForStereotype) { final Stereotype stereotype = (Stereotype) get(position); TextBlock circledCharacter = null; if (stereotype.isSpotted()) { circledCharacter = new CircledCharacter(stereotype.getCharacter(), stereotype.getRadius(), stereotype.getCircledFont(), stereotype.getHtmlColor(), null, fontConfiguration.getColor()); } else if (stereotype.getSprite() != null) { final Sprite tmp = spriteContainer.getSprite(stereotype.getSprite()); if (tmp != null) { circledCharacter = tmp.asTextBlock(stereotype.getHtmlColor(), 1); } } if (circledCharacter != null) { if (stereotype.getLabel(false) == null) { return new TextBlockSprited(circledCharacter, this.subList(1, this.size()), fontConfiguration, horizontalAlignment, spriteContainer); } return new TextBlockSprited(circledCharacter, this, fontConfiguration, horizontalAlignment, spriteContainer); } return new TextBlockSimple(this, fontConfiguration, horizontalAlignment, spriteContainer, 0, fontForStereotype, htmlColorForStereotype); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/DisplayPositionned.java000066400000000000000000000046551312650303100303500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.VerticalAlignment; public class DisplayPositionned { private final Display display; private final HorizontalAlignment horizontalAlignment; private final VerticalAlignment verticalAlignment; public DisplayPositionned(Display display, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment) { this.display = display; this.horizontalAlignment = horizontalAlignment; this.verticalAlignment = verticalAlignment; } public static DisplayPositionned none(HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment) { return new DisplayPositionned(Display.NULL, horizontalAlignment, verticalAlignment); } public final Display getDisplay() { return display; } public final HorizontalAlignment getHorizontalAlignment() { return horizontalAlignment; } public final VerticalAlignment getVerticalAlignment() { return verticalAlignment; } public static boolean isNull(DisplayPositionned data) { return data == null || Display.isNull(data.display); } public boolean hasUrl() { return display.hasUrl(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/Election.java000066400000000000000000000055361312650303100262700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; class Election { private final Map all = new HashMap(); public void addCandidate(String display, Member candidate) { all.put(display, candidate); } private Member getCandidate(String shortName) { List list = getAllCandidateContains(shortName); if (list.size() == 1) { return list.get(0); } list = getAllCandidateContainsStrict(shortName); if (list.size() == 1) { return list.get(0); } return null; } private List getAllCandidateContains(String shortName) { final List result = new ArrayList(); for (Map.Entry ent : all.entrySet()) { if (ent.getKey().contains(shortName)) { result.add(ent.getValue()); } } return result; } private List getAllCandidateContainsStrict(String shortName) { final List result = new ArrayList(); for (Map.Entry ent : all.entrySet()) { final String key = ent.getKey(); if (key.matches(".*\\b" + shortName + "\\b.*")) { result.add(ent.getValue()); } } return result; } public Map getAllElected(Collection shortNames) { final Map memberWithPort = new HashMap(); for (String shortName : shortNames) { final Member m = getCandidate(shortName); if (m != null) { memberWithPort.put(m, shortName); } } return Collections.unmodifiableMap(memberWithPort); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/EntityGender.java000066400000000000000000000025341312650303100271220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; public interface EntityGender { public boolean contains(IEntity test); } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/EntityGenderUtils.java000066400000000000000000000065521312650303100301470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; public class EntityGenderUtils { static public EntityGender byEntityType(final LeafType type) { return new EntityGender() { public boolean contains(IEntity test) { return test.getLeafType() == type; } }; } static public EntityGender byEntityAlone(final IEntity entity) { return new EntityGender() { public boolean contains(IEntity test) { return test.getUid().equals(entity.getUid()); } }; } static public EntityGender byStereotype(final String stereotype) { return new EntityGender() { public boolean contains(IEntity test) { if (test.getStereotype() == null) { return false; } return stereotype.equals(test.getStereotype().getLabel(false)); } }; } static public EntityGender byPackage(final IGroup group) { if (EntityUtils.groupRoot(group)) { throw new IllegalArgumentException(); } return new EntityGender() { public boolean contains(IEntity test) { if (EntityUtils.groupRoot(test.getParentContainer())) { return false; } if (group == test.getParentContainer()) { return true; } return false; } }; } static public EntityGender and(final EntityGender g1, final EntityGender g2) { return new EntityGender() { public boolean contains(IEntity test) { return g1.contains(test) && g2.contains(test); } }; } static public EntityGender all() { return new EntityGender() { public boolean contains(IEntity test) { return true; } }; } static public EntityGender emptyMethods() { return new EntityGender() { public boolean contains(IEntity test) { return test.getBodier().getMethodsToDisplay().size() == 0; } }; } static public EntityGender emptyFields() { return new EntityGender() { public boolean contains(IEntity test) { return test.getBodier().getFieldsToDisplay().size() == 0; } }; } // static public EntityGender emptyMembers() { // return new EntityGender() { // public boolean contains(IEntity test) { // return test.getBodier().getMethodsToDisplay().size() == 0 // && test.getBodier().getFieldsToDisplay().size() == 0; // } // }; // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/EntityPort.java000066400000000000000000000037321312650303100266430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; public class EntityPort { private final String uid; private final String portName; public EntityPort(String uid, String portName) { this.uid = uid; this.portName = portName; } public String getFullString() { if (portName != null) { return uid + ":" + portName; } return uid; } private boolean isShielded() { return uid.endsWith(":h"); } public String getPrefix() { if (isShielded()) { return uid.substring(0, uid.length() - 2); } return uid; } public boolean startsWith(String centerId) { return uid.startsWith(centerId); } public boolean equalsId(EntityPort other) { return this.uid.equals(other.uid); } private String getPortName() { return portName; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/EntityPortion.java000066400000000000000000000025621312650303100273510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; public enum EntityPortion { FIELD, METHOD, CIRCLED_CHARACTER, STEREOTYPE, LOLLIPOP, ENTIRELY } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/EntityPosition.java000066400000000000000000000126571312650303100275310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.EnumSet; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UTranslate; public enum EntityPosition { NORMAL, ENTRY_POINT, EXIT_POINT, INPUT_PIN, OUTPUT_PIN, EXPANSION_INPUT, EXPANSION_OUTPUT; public static final double RADIUS = 6; public void drawSymbol(UGraphic ug, Rankdir rankdir) { if (this == NORMAL) { throw new IllegalStateException(); } else if (this == ENTRY_POINT || this == EXIT_POINT) { final Shadowable circle = new UEllipse(RADIUS * 2, RADIUS * 2); ug.draw(circle); if (this == EntityPosition.EXIT_POINT) { final double xc = 0 + RADIUS + .5; final double yc = 0 + RADIUS + .5; final double radius = RADIUS - .5; drawLine(ug, getPointOnCircle(xc, yc, Math.PI / 4, radius), getPointOnCircle(xc, yc, Math.PI + Math.PI / 4, radius)); drawLine(ug, getPointOnCircle(xc, yc, -Math.PI / 4, radius), getPointOnCircle(xc, yc, Math.PI - Math.PI / 4, radius)); } } else if (this == INPUT_PIN || this == OUTPUT_PIN) { final Shadowable rectangle = new URectangle(RADIUS * 2, RADIUS * 2); ug.draw(rectangle); } else if (this == EXPANSION_INPUT || this == EXPANSION_OUTPUT) { if (rankdir == Rankdir.TOP_TO_BOTTOM) { final Shadowable rectangle = new URectangle(RADIUS * 2 * 4, RADIUS * 2); ug.draw(rectangle); final ULine vline = new ULine(0, RADIUS * 2); ug.apply(new UTranslate(RADIUS * 2, 0)).draw(vline); ug.apply(new UTranslate(RADIUS * 2 * 2, 0)).draw(vline); ug.apply(new UTranslate(RADIUS * 2 * 3, 0)).draw(vline); } else { final Shadowable rectangle = new URectangle(RADIUS * 2, RADIUS * 2 * 4); ug.apply(new UTranslate(0, 0)).draw(rectangle); final ULine hline = new ULine(RADIUS * 2, 0); ug.apply(new UTranslate(0, RADIUS * 2)).draw(hline); ug.apply(new UTranslate(0, RADIUS * 2 * 2)).draw(hline); ug.apply(new UTranslate(0, RADIUS * 2 * 3)).draw(hline); } } } public Dimension2D getDimension(Rankdir rankdir) { if (this == EXPANSION_INPUT || this == EXPANSION_OUTPUT) { if (rankdir == Rankdir.TOP_TO_BOTTOM) { return new Dimension2DDouble(EntityPosition.RADIUS * 2 * 4, EntityPosition.RADIUS * 2); } return new Dimension2DDouble(EntityPosition.RADIUS * 2, EntityPosition.RADIUS * 2 * 4); } return new Dimension2DDouble(EntityPosition.RADIUS * 2, EntityPosition.RADIUS * 2); } private Point2D getPointOnCircle(double xc, double yc, double angle, double radius) { final double x = xc + radius * Math.cos(angle); final double y = yc + radius * Math.sin(angle); return new Point2D.Double(x, y); } static private void drawLine(UGraphic ug, Point2D p1, Point2D p2) { final double dx = p2.getX() - p1.getX(); final double dy = p2.getY() - p1.getY(); ug.apply(new UTranslate(p1.getX(), p1.getY())).draw(new ULine(dx, dy)); } public ShapeType getShapeType() { if (this == NORMAL) { throw new IllegalStateException(); } if (this == ENTRY_POINT || this == EXIT_POINT) { return ShapeType.CIRCLE; } return ShapeType.RECTANGLE; } public static EntityPosition fromStereotype(String label) { if ("<>".equalsIgnoreCase(label)) { return ENTRY_POINT; } if ("<>".equalsIgnoreCase(label)) { return EXIT_POINT; } if ("<>".equalsIgnoreCase(label)) { return INPUT_PIN; } if ("<>".equalsIgnoreCase(label)) { return OUTPUT_PIN; } if ("<>".equalsIgnoreCase(label)) { return EXPANSION_INPUT; } if ("<>".equalsIgnoreCase(label)) { return EXPANSION_OUTPUT; } return EntityPosition.NORMAL; } public static EnumSet getInputs() { return EnumSet.of(ENTRY_POINT, INPUT_PIN, EXPANSION_INPUT); } public static EnumSet getOutputs() { return EnumSet.of(EXIT_POINT, OUTPUT_PIN, EXPANSION_OUTPUT); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/EntityUtils.java000066400000000000000000000054751312650303100270250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; public abstract class EntityUtils { public static boolean groupRoot(IGroup g) { if (g == null) { throw new IllegalStateException(); } return g instanceof GroupRoot; } private static boolean isParent(IGroup groupToBeTested, IGroup parentGroup) { if (groupToBeTested.isGroup() == false) { // Very strange! return false; } if (groupToBeTested.isGroup() == false) { throw new IllegalArgumentException(); } while (EntityUtils.groupRoot(groupToBeTested) == false) { if (groupToBeTested == parentGroup) { return true; } groupToBeTested = groupToBeTested.getParentContainer(); if (groupToBeTested.isGroup() == false) { throw new IllegalStateException(); } } return false; } public static boolean isPureInnerLink12(IGroup group, Link link) { if (group.isGroup() == false) { throw new IllegalArgumentException(); } final IEntity e1 = link.getEntity1(); final IEntity e2 = link.getEntity2(); final IGroup group1 = e1.getParentContainer(); final IGroup group2 = e2.getParentContainer(); if (isParent(group1, group) && isParent(group2, group)) { return true; } return false; } public static boolean isPureInnerLink3(IGroup group, Link link) { if (group.isGroup() == false) { throw new IllegalArgumentException(); } final IEntity e1 = link.getEntity1(); final IEntity e2 = link.getEntity2(); final IGroup group1 = e1.getParentContainer(); final IGroup group2 = e2.getParentContainer(); if (isParent(group2, group) == isParent(group1, group)) { return true; } return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/GroupHierarchy.java000066400000000000000000000026671312650303100274630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.util.Collection; public interface GroupHierarchy { public Collection getChildrenGroups(IGroup parent); public boolean isEmpty(IGroup g); } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/GroupPrinter.java000066400000000000000000000051301312650303100271540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.io.File; import java.io.IOException; import java.io.PrintWriter; public class GroupPrinter { private final PrintWriter pw; private GroupPrinter(PrintWriter pw) { this.pw = pw; } private void printGroup(IGroup group) { pw.println(""); pw.println(""); pw.println(""); pw.println(""); pw.println(""); if (group.getChildren().size() > 0) { pw.println(""); pw.println(""); pw.println(""); } pw.println("
"); pw.println(group.getCode()); pw.println("
"); if (group.getLeafsDirect().size() == 0) { pw.println("No direct leaf"); } else { for (ILeaf leaf : group.getLeafsDirect()) { pw.println("
    "); printLeaf(leaf); pw.println("
"); } } pw.println("
"); for (IGroup g : group.getChildren()) { pw.println("
"); printGroup(g); pw.println("
"); } pw.println("
"); } private void printLeaf(ILeaf leaf) { pw.println("

  • " + leaf.getCode()); } public static void print(File f, IGroup rootGroup) { try { final PrintWriter pw = new PrintWriter(f); pw.println(""); new GroupPrinter(pw).printGroup(rootGroup); pw.println(""); pw.close(); } catch (IOException e) { e.printStackTrace(); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/GroupRoot.java000066400000000000000000000141771312650303100264670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cucadiagram.entity.EntityFactory; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.svek.IEntityImage; import net.sourceforge.plantuml.svek.PackageStyle; import net.sourceforge.plantuml.svek.SingleStrategy; import net.sourceforge.plantuml.ugraphic.UStroke; public class GroupRoot implements IGroup { private final EntityFactory entityFactory; public GroupRoot(EntityFactory entityFactory) { this.entityFactory = entityFactory; } public Collection getLeafsDirect() { final List result = new ArrayList(); for (ILeaf ent : entityFactory.getLeafs().values()) { if (ent.getParentContainer() == this) { result.add(ent); } } return Collections.unmodifiableCollection(result); } public boolean isGroup() { return true; } public Display getDisplay() { throw new UnsupportedOperationException(); } public void setDisplay(Display display) { throw new UnsupportedOperationException(); } public LeafType getLeafType() { throw new UnsupportedOperationException(); } public String getUid() { throw new UnsupportedOperationException(); } public Url getUrl99() { return null; } public Stereotype getStereotype() { throw new UnsupportedOperationException(); } public void setStereotype(Stereotype stereotype) { throw new UnsupportedOperationException(); } public TextBlock getBody(PortionShower portionShower, FontParam fontParam, ISkinParam skinParam) { throw new UnsupportedOperationException(); } public Code getCode() { return Code.of("__ROOT__"); } public LongCode getLongCode() { return null; } public void addUrl(Url url) { throw new UnsupportedOperationException(); } public IGroup getParentContainer() { return null; } public boolean containsLeafRecurse(ILeaf entity) { throw new UnsupportedOperationException(); } public Collection getChildren() { final List result = new ArrayList(); for (IGroup ent : entityFactory.getGroups().values()) { if (ent.getParentContainer() == this) { result.add(ent); } } return Collections.unmodifiableCollection(result); } public void moveEntitiesTo(IGroup dest) { throw new UnsupportedOperationException(); } public int size() { throw new UnsupportedOperationException(); } public GroupType getGroupType() { return null; } public Code getNamespace2() { throw new UnsupportedOperationException(); } public PackageStyle getPackageStyle() { throw new UnsupportedOperationException(); } public void overrideImage(IEntityImage img, LeafType state) { throw new UnsupportedOperationException(); } public boolean isHidden() { return false; } public USymbol getUSymbol() { return null; // throw new UnsupportedOperationException(); } public void setUSymbol(USymbol symbol) { throw new UnsupportedOperationException(); } public SingleStrategy getSingleStrategy() { return SingleStrategy.SQUARRE; } public boolean isRemoved() { return false; } public boolean hasUrl() { return false; } public int getHectorLayer() { throw new UnsupportedOperationException(); } public void setHectorLayer(int layer) { throw new UnsupportedOperationException(); } public int getRawLayout() { throw new UnsupportedOperationException(); } public char getConcurrentSeparator() { throw new UnsupportedOperationException(); } public void setConcurrentSeparator(char separator) { // throw new UnsupportedOperationException(); } public void putTip(String member, Display display) { throw new UnsupportedOperationException(); } public Map getTips() { throw new UnsupportedOperationException(); } public Bodier getBodier() { throw new UnsupportedOperationException(); } public Colors getColors(ISkinParam skinParam) { return Colors.empty(); } public void setColors(Colors colors) { throw new UnsupportedOperationException(); } public void setSpecificColorTOBEREMOVED(ColorType type, HtmlColor color) { throw new UnsupportedOperationException(); } public void setSpecificLineStroke(UStroke specificLineStroke) { throw new UnsupportedOperationException(); } public FontConfiguration getFontConfigurationForTitle(ISkinParam skinParam) { throw new UnsupportedOperationException(); } public void setRemoved(boolean removed) { throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/GroupType.java000066400000000000000000000025651312650303100264630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; public enum GroupType { PACKAGE, STATE, CONCURRENT_STATE, INNER_ACTIVITY, CONCURRENT_ACTIVITY } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/IEntity.java000066400000000000000000000046441312650303100261120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.util.Map; import net.sourceforge.plantuml.Hideable; import net.sourceforge.plantuml.LineConfigurable; import net.sourceforge.plantuml.Removeable; import net.sourceforge.plantuml.SpecificBackcolorable; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.USymbol; public interface IEntity extends SpecificBackcolorable, Hideable, Removeable, LineConfigurable { public Code getCode(); public LongCode getLongCode(); public USymbol getUSymbol(); public void setUSymbol(USymbol symbol); public LeafType getLeafType(); public Display getDisplay(); public IGroup getParentContainer(); public void setDisplay(Display display); public String getUid(); public Url getUrl99(); public Stereotype getStereotype(); public void setStereotype(Stereotype stereotype); public Bodier getBodier(); public void addUrl(Url url); public boolean isGroup(); public boolean hasUrl(); public int getHectorLayer(); public void setHectorLayer(int layer); public int getRawLayout(); public void putTip(String member, Display display); public Map getTips(); public void setRemoved(boolean removed); } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/IGroup.java000066400000000000000000000042571312650303100257320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.util.Collection; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.svek.IEntityImage; import net.sourceforge.plantuml.svek.PackageStyle; import net.sourceforge.plantuml.svek.SingleStrategy; public interface IGroup extends IEntity { public boolean containsLeafRecurse(ILeaf entity); public Collection getLeafsDirect(); public Collection getChildren(); public void moveEntitiesTo(IGroup dest); public int size(); public GroupType getGroupType(); public Code getNamespace2(); public PackageStyle getPackageStyle(); public void overrideImage(IEntityImage img, LeafType state); public SingleStrategy getSingleStrategy(); public FontConfiguration getFontConfigurationForTitle(ISkinParam skinParam); public char getConcurrentSeparator(); public void setConcurrentSeparator(char separator); } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/ILeaf.java000066400000000000000000000046301312650303100255000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.util.Collection; import net.sourceforge.plantuml.cucadiagram.dot.Neighborhood; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.skin.VisibilityModifier; import net.sourceforge.plantuml.svek.IEntityImage; public interface ILeaf extends IEntity { public EntityPosition getEntityPosition(); public void setContainer(IGroup container); public boolean isTop(); public void setTop(boolean top); public boolean hasNearDecoration(); public void setNearDecoration(boolean nearDecoration); public int getXposition(); public void setXposition(int pos); public IEntityImage getSvekImage(); public String getGeneric(); public boolean muteToType(LeafType newType, USymbol newSymbol); public void setGeneric(String generic); public void setSvekImage(IEntityImage svekImage); public void setNeighborhood(Neighborhood neighborhood); public Neighborhood getNeighborhood(); public Collection getPortShortNames(); public void addPortShortName(String portShortName); public void setVisibilityModifier(VisibilityModifier visibility); public VisibilityModifier getVisibilityModifier(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/Ident.java000066400000000000000000000041001312650303100255530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import net.sourceforge.plantuml.StringUtils; public class Ident implements Comparable { private final String ident; private Ident(String ident) { if (ident == null) { throw new IllegalArgumentException(); } this.ident = ident; } public static Ident of(String code) { return new Ident(code); } @Override public String toString() { return ident; } @Override public int hashCode() { return ident.hashCode(); } @Override public boolean equals(Object obj) { final Ident other = (Ident) obj; return this.ident.equals(other.ident); } public int compareTo(Ident other) { return this.ident.compareTo(other.ident); } private Ident eventuallyRemoveStartingAndEndingDoubleQuote() { return Ident.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(ident)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/LeafType.java000066400000000000000000000047501312650303100262340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import net.sourceforge.plantuml.StringUtils; public enum LeafType { EMPTY_PACKAGE, ABSTRACT_CLASS, CLASS, INTERFACE, ANNOTATION, LOLLIPOP, NOTE, TIPS, OBJECT, ASSOCIATION, ENUM, CIRCLE, USECASE, DESCRIPTION, ARC_CIRCLE, ACTIVITY, BRANCH, SYNCHRO_BAR, CIRCLE_START, CIRCLE_END, POINT_FOR_ASSOCIATION, ACTIVITY_CONCURRENT, STATE, STATE_CONCURRENT, PSEUDO_STATE, STATE_CHOICE, STATE_FORK_JOIN, BLOCK, ENTITY, STILL_UNKNOWN; public static LeafType getLeafType(String type) { type = StringUtils.goUpperCase(type); if (type.startsWith("ABSTRACT")) { return LeafType.ABSTRACT_CLASS; } return LeafType.valueOf(type); } public boolean isLikeClass() { return this == LeafType.ANNOTATION || this == LeafType.ABSTRACT_CLASS || this == LeafType.CLASS || this == LeafType.INTERFACE || this == LeafType.ENUM || this == LeafType.ENTITY; } public String toHtml() { final String html = StringUtils.goLowerCase(toString().replace('_', ' ')); return StringUtils.capitalize(html); } public boolean manageModifier() { if (this == ANNOTATION || this == ABSTRACT_CLASS || this == CLASS || this == INTERFACE || this == ENUM || this == OBJECT || this == ENTITY) { return true; } return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/Link.java000066400000000000000000000332211312650303100254130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Hideable; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.Removeable; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorSet; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.USymbolInterface; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.svek.Bibliotekon; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.utils.UniqueSequence; public class Link implements Hideable, Removeable { final private IEntity cl1; final private IEntity cl2; private String port1; private String port2; private LinkType type; final private Display label; private int length; final private String qualifier1; final private String qualifier2; final private String uid = "LNK" + UniqueSequence.getValue(); private Display note; private Position notePosition; private Colors noteColors; private NoteLinkStrategy noteLinkStrategy; private boolean invis = false; private double weight = 1.0; private final String labeldistance; private final String labelangle; private HtmlColor specificColor; private boolean constraint = true; private boolean inverted = false; private LinkArrow linkArrow = LinkArrow.NONE; private boolean opale; private boolean horizontalSolitary; private String sametail; private Url url; public Link(IEntity cl1, IEntity cl2, LinkType type, Display label, int length) { this(cl1, cl2, type, label, length, null, null, null, null, null); } public Link(IEntity cl1, IEntity cl2, LinkType type, Display label, int length, String qualifier1, String qualifier2, String labeldistance, String labelangle) { this(cl1, cl2, type, label, length, qualifier1, qualifier2, labeldistance, labelangle, null); } public Link(IEntity cl1, IEntity cl2, LinkType type, Display label, int length, String qualifier1, String qualifier2, String labeldistance, String labelangle, HtmlColor specificColor) { if (length < 1) { throw new IllegalArgumentException(); } if (cl1 == null) { throw new IllegalArgumentException(); } if (cl2 == null) { throw new IllegalArgumentException(); } this.cl1 = cl1; this.cl2 = cl2; this.type = type; if (Display.isNull(label)) { this.label = Display.NULL; // } else if (doWeHaveToRemoveUrlAtStart(label)) { // this.url = label.initUrl(); // this.label = label.removeHeadingUrl(url).manageGuillemet(); } else { this.label = label.manageGuillemet(); } this.length = length; this.qualifier1 = qualifier1; this.qualifier2 = qualifier2; this.labeldistance = labeldistance; this.labelangle = labelangle; this.specificColor = specificColor; if (qualifier1 != null) { ((ILeaf) cl1).setNearDecoration(true); } if (qualifier2 != null) { ((ILeaf) cl2).setNearDecoration(true); } // if (type.getDecor2() == LinkDecor.EXTENDS) { // setSametail(cl1.getUid()); // } } // private static boolean doWeHaveToRemoveUrlAtStart(Display label) { // if (label.size() == 0) { // return false; // } // final String s = label.get(0).toString(); // if (s.matches("^\\[\\[\\S+\\]\\].+$")) { // return true; // } // return false; // } public Link getInv() { // if (getLength() == 1) { // final int x = cl1.getXposition(); // cl2.setXposition(x-1); // } final Link result = new Link(cl2, cl1, getType().getInversed(), label, length, qualifier2, qualifier1, labeldistance, labelangle, specificColor); result.inverted = true; result.port1 = this.port2; result.port2 = this.port1; return result; } public void goDashed() { type = type.getDashed(); } public void goDotted() { type = type.getDotted(); } private boolean hidden = false; public void goHidden() { this.hidden = true; } public void goNorank() { setConstraint(false); } public void goBold() { type = type.getBold(); } public String getLabeldistance() { // Default in dot 1.0 return labeldistance; } public String getLabelangle() { // Default in dot -25 return labelangle; } public String getUid() { return uid; } public final boolean isInvis() { if (type.isInvisible()) { return true; } return invis; } public final void setInvis(boolean invis) { this.invis = invis; } public boolean isBetween(IEntity cl1, IEntity cl2) { if (cl1.equals(this.cl1) && cl2.equals(this.cl2)) { return true; } if (cl1.equals(this.cl2) && cl2.equals(this.cl1)) { return true; } return false; } @Override public String toString() { return super.toString() + " {" + length + "} " + cl1 + "-->" + cl2; } public IEntity getEntity1() { return cl1; } public IEntity getEntity2() { return cl2; } public EntityPort getEntityPort1(Bibliotekon bibliotekon) { return new EntityPort(bibliotekon.getShapeUid((ILeaf) cl1), port1); } public EntityPort getEntityPort2(Bibliotekon bibliotekon) { return new EntityPort(bibliotekon.getShapeUid((ILeaf) cl2), port2); } public LinkType getType() { if (opale) { return new LinkType(LinkDecor.NONE, LinkDecor.NONE); } if (getSametail() != null) { return new LinkType(LinkDecor.NONE, LinkDecor.NONE); } LinkType result = type; if (OptionFlags.USE_INTERFACE_EYE1) { if (isLollipopInterfaceEye(cl1)) { type = type.withLollipopInterfaceEye1(); } if (isLollipopInterfaceEye(cl2)) { type = type.withLollipopInterfaceEye2(); } } return result; } private boolean isReallyGroup(IEntity ent) { if (ent.isGroup() == false) { return false; } final IGroup group = (IGroup) ent; return group.getChildren().size() + group.getLeafsDirect().size() > 0; } public LinkType getTypePatchCluster() { LinkType result = getType(); if (isReallyGroup(getEntity1())) { result = result.withoutDecors2(); } if (isReallyGroup(getEntity2())) { result = result.withoutDecors1(); } return result; } private LinkType getTypeSpecialForPrinting() { if (opale) { return new LinkType(LinkDecor.NONE, LinkDecor.NONE); } LinkType result = type; if (OptionFlags.USE_INTERFACE_EYE1) { if (isLollipopInterfaceEye(cl1)) { type = type.withLollipopInterfaceEye1(); } if (isLollipopInterfaceEye(cl2)) { type = type.withLollipopInterfaceEye2(); } } return result; } private boolean isLollipopInterfaceEye(IEntity ent) { return ent.getUSymbol() instanceof USymbolInterface; } public Display getLabel() { return label; } public int getLength() { return length; } public final void setLength(int length) { this.length = length; } public String getQualifier1() { return qualifier1; } public String getQualifier2() { return qualifier2; } public final double getWeight() { return weight; } public final void setWeight(double weight) { this.weight = weight; } public final Display getNote() { return note; } public final NoteLinkStrategy getNoteLinkStrategy() { return noteLinkStrategy; } public final Colors getNoteColors() { return noteColors; } public final Position getNotePosition() { return notePosition; } public final void addNote(Display note, Position position, Colors colors) { this.note = note; this.notePosition = position; this.noteColors = colors; this.noteLinkStrategy = NoteLinkStrategy.NORMAL; } public final void addNoteFrom(Link other, NoteLinkStrategy strategy) { this.note = other.note; this.notePosition = other.notePosition; this.noteColors = other.noteColors; this.noteLinkStrategy = strategy; } public boolean isAutoLinkOfAGroup() { if (getEntity1().isGroup() == false) { return false; } if (getEntity2().isGroup() == false) { return false; } if (getEntity1() == getEntity2()) { return true; } return false; } public boolean containsType(LeafType type) { if (getEntity1().getLeafType() == type || getEntity2().getLeafType() == type) { return true; } return false; } public boolean contains(IEntity entity) { if (getEntity1() == entity || getEntity2() == entity) { return true; } return false; } public IEntity getOther(IEntity entity) { if (getEntity1() == entity) { return getEntity2(); } if (getEntity2() == entity) { return getEntity1(); } throw new IllegalArgumentException(); } public double getMarginDecors1(StringBounder stringBounder, UFont fontQualif, ISkinSimple spriteContainer) { final double q = getQualifierMargin(stringBounder, fontQualif, qualifier1, spriteContainer); final LinkDecor decor = getType().getDecor1(); return decor.getMargin() + q; } public double getMarginDecors2(StringBounder stringBounder, UFont fontQualif, ISkinSimple spriteContainer) { final double q = getQualifierMargin(stringBounder, fontQualif, qualifier2, spriteContainer); final LinkDecor decor = getType().getDecor2(); return decor.getMargin() + q; } private double getQualifierMargin(StringBounder stringBounder, UFont fontQualif, String qualif, ISkinSimple spriteContainer) { if (qualif != null) { final TextBlock b = Display.create(qualif).create(FontConfiguration.blackBlueTrue(fontQualif), HorizontalAlignment.LEFT, spriteContainer); final Dimension2D dim = b.calculateDimension(stringBounder); return Math.max(dim.getWidth(), dim.getHeight()); } return 0; } public HtmlColor getSpecificColor() { return specificColor; } public void setSpecificColor(String s) { this.specificColor = HtmlColorSet.getInstance().getColorIfValid(s); } public final boolean isConstraint() { return constraint; } public final void setConstraint(boolean constraint) { this.constraint = constraint; } public void setOpale(boolean opale) { this.opale = opale; } public final void setHorizontalSolitary(boolean horizontalSolitary) { this.horizontalSolitary = horizontalSolitary; } public final boolean isHorizontalSolitary() { return horizontalSolitary; } public final LinkArrow getLinkArrow() { if (inverted) { return linkArrow.reverse(); } return linkArrow; } public final void setLinkArrow(LinkArrow linkArrow) { this.linkArrow = linkArrow; } public final boolean isInverted() { return inverted; } public boolean hasEntryPoint() { return (getEntity1().isGroup() == false && ((ILeaf) getEntity1()).getEntityPosition() != EntityPosition.NORMAL) || (getEntity2().isGroup() == false && ((ILeaf) getEntity2()).getEntityPosition() != EntityPosition.NORMAL); } public boolean hasTwoEntryPointsSameContainer() { return getEntity1().isGroup() == false && getEntity2().isGroup() == false && ((ILeaf) getEntity1()).getEntityPosition() != EntityPosition.NORMAL && ((ILeaf) getEntity2()).getEntityPosition() != EntityPosition.NORMAL && getEntity1().getParentContainer() == getEntity2().getParentContainer(); } public Url getUrl() { return url; } public void setUrl(Url url) { this.url = url; } public boolean isHidden() { return hidden || cl1.isHidden() || cl2.isHidden(); } public boolean sameConnections(Link other) { if (this.cl1 == other.cl1 && this.cl2 == other.cl2) { return true; } if (this.cl1 == other.cl2 && this.cl2 == other.cl1) { return true; } return false; } public boolean doesTouch(Link other) { if (this.cl1 == other.cl1) { return true; } if (this.cl1 == other.cl2) { return true; } if (this.cl2 == other.cl1) { return true; } if (this.cl2 == other.cl2) { return true; } return false; } public boolean isAutolink() { return cl1 == cl2; } public boolean isRemoved() { return cl1.isRemoved() || cl2.isRemoved(); } public boolean hasUrl() { if (Display.isNull(label) == false && label.hasUrl()) { return true; } return getUrl() != null; } public String getSametail() { return sametail; } public void setSametail(String sametail) { this.sametail = sametail; } private Colors colors; public void setColors(Colors colors) { this.colors = colors; } public final Colors getColors() { return colors; } public void setPortMembers(String port1, String port2) { this.port1 = port1; this.port2 = port2; if (port1 != null) { ((ILeaf) cl1).addPortShortName(port1); } if (port2 != null) { ((ILeaf) cl2).addPortShortName(port2); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/LinkArrow.java000066400000000000000000000027551312650303100264360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; public enum LinkArrow { NONE, DIRECT_NORMAL, BACKWARD; public LinkArrow reverse() { if (this == DIRECT_NORMAL) { return BACKWARD; } if (this == BACKWARD) { return DIRECT_NORMAL; } return NONE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/LinkDecor.java000066400000000000000000000123041312650303100263670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.svek.extremity.ExtremityFactory; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryArrow; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryArrowAndCircle; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryCircle; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryCircleConnect; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryCircleCross; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryCircleCrowfoot; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryCircleLine; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryCrowfoot; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryDiamond; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryDoubleLine; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryLineCrowfoot; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryNotNavigable; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryParenthesis; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryPlus; import net.sourceforge.plantuml.svek.extremity.ExtremityFactorySquarre; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryTriangle; public enum LinkDecor { NONE(2, false, 0), EXTENDS(30, false, 2), COMPOSITION(15, true, 1.3), AGREGATION(15, false, 1.3), NOT_NAVIGABLE(1, false, 0.5), CROWFOOT(10, true, 0.8), CIRCLE_CROWFOOT(14, false, 0.8), CIRCLE_LINE(10, false, 0.8), DOUBLE_LINE(7, false, 0.7), LINE_CROWFOOT(10, false, 0.8), ARROW(10, true, 0.5), ARROW_TRIANGLE(10, true, 0.8), ARROW_AND_CIRCLE(10, false, 0.5), CIRCLE(0, false, 0.5), CIRCLE_CONNECT(0, false, 0.5), PARENTHESIS(0, false, OptionFlags.USE_INTERFACE_EYE2 ? 0.5 : 1.0), SQUARE(0, false, 0.5), CIRCLE_CROSS(0, false, 0.5), PLUS(0, false, 1.5), SQUARRE_toberemoved(30, false, 0); private final double arrowSize; private final int margin; private final boolean fill; private LinkDecor(int margin, boolean fill, double arrowSize) { this.margin = margin; this.fill = fill; this.arrowSize = arrowSize; } public int getMargin() { return margin; } public boolean isFill() { return fill; } public double getArrowSize() { return arrowSize; } public ExtremityFactory getExtremityFactory(HtmlColor backgroundColor) { if (this == LinkDecor.PLUS) { return new ExtremityFactoryPlus(); } else if (this == LinkDecor.ARROW_TRIANGLE) { return new ExtremityFactoryTriangle(); } else if (this == LinkDecor.CROWFOOT) { return new ExtremityFactoryCrowfoot(); } else if (this == LinkDecor.CIRCLE_CROWFOOT) { return new ExtremityFactoryCircleCrowfoot(); } else if (this == LinkDecor.LINE_CROWFOOT) { return new ExtremityFactoryLineCrowfoot(); } else if (this == LinkDecor.CIRCLE_LINE) { return new ExtremityFactoryCircleLine(); } else if (this == LinkDecor.DOUBLE_LINE) { return new ExtremityFactoryDoubleLine(); } else if (this == LinkDecor.CIRCLE_CROSS) { return new ExtremityFactoryCircleCross(); } else if (this == LinkDecor.ARROW) { return new ExtremityFactoryArrow(); } else if (this == LinkDecor.ARROW_AND_CIRCLE) { return new ExtremityFactoryArrowAndCircle(); } else if (this == LinkDecor.NOT_NAVIGABLE) { return new ExtremityFactoryNotNavigable(); } else if (this == LinkDecor.AGREGATION) { return new ExtremityFactoryDiamond(false, backgroundColor); } else if (this == LinkDecor.COMPOSITION) { return new ExtremityFactoryDiamond(true, backgroundColor); } else if (this == LinkDecor.CIRCLE) { return new ExtremityFactoryCircle(); } else if (this == LinkDecor.SQUARE) { return new ExtremityFactorySquarre(); } else if (this == LinkDecor.PARENTHESIS) { return new ExtremityFactoryParenthesis(); } else if (this == LinkDecor.CIRCLE_CONNECT) { return new ExtremityFactoryCircleConnect(); } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/LinkHat.java000066400000000000000000000031061312650303100260470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; public enum LinkHat { NONE /*, SQUARE, CIRCLE, CIRCLE_CONNECT; public ExtremityFactory getExtremityFactory() { if (this == LinkHat.CIRCLE) { return new ExtremityFactoryCircle(); } if (this == LinkHat.CIRCLE_CONNECT) { return new ExtremityFactoryCircleConnect(); } return null; } */ } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/LinkMiddleDecor.java000066400000000000000000000041601312650303100275070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import net.sourceforge.plantuml.svek.extremity.MiddleCircleCircledMode; import net.sourceforge.plantuml.svek.extremity.MiddleFactory; import net.sourceforge.plantuml.svek.extremity.MiddleFactoryCircle; import net.sourceforge.plantuml.svek.extremity.MiddleFactoryCircleCircled; public enum LinkMiddleDecor { NONE, CIRCLE, CIRCLE_CIRCLED, CIRCLE_CIRCLED1, CIRCLE_CIRCLED2; public MiddleFactory getMiddleFactory() { if (this == CIRCLE) { return new MiddleFactoryCircle(); } if (this == CIRCLE_CIRCLED) { return new MiddleFactoryCircleCircled(MiddleCircleCircledMode.BOTH); } if (this == CIRCLE_CIRCLED1) { return new MiddleFactoryCircleCircled(MiddleCircleCircledMode.MODE1); } if (this == CIRCLE_CIRCLED2) { return new MiddleFactoryCircleCircled(MiddleCircleCircledMode.MODE2); } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/LinkStyle.java000066400000000000000000000042551312650303100264410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import net.sourceforge.plantuml.ugraphic.UStroke; public enum LinkStyle { NORMAL, DASHED, DOTTED, BOLD, INVISIBLE, DOUBLE_tobedone, __toremove_INTERFACE_PROVIDER, __toremove_INTERFACE_USER; public static UStroke getStroke(LinkStyle style) { return getStroke(style, 1); } public static UStroke getStroke(LinkStyle style, double thickness) { if (style == LinkStyle.DASHED) { return new UStroke(6, 6, thickness); } if (style == LinkStyle.DOTTED) { return new UStroke(1, 3, thickness); } if (style == LinkStyle.BOLD) { return new UStroke(2.5); } return new UStroke(); } public static LinkStyle fromString(String s) { if ("dashed".equalsIgnoreCase(s)) { return DASHED; } if ("dotted".equalsIgnoreCase(s)) { return DOTTED; } if ("bold".equalsIgnoreCase(s)) { return BOLD; } if ("hidden".equalsIgnoreCase(s)) { return INVISIBLE; } return LinkStyle.NORMAL; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/LinkType.java000066400000000000000000000157501312650303100262640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import net.sourceforge.plantuml.ugraphic.UStroke; public class LinkType { private final LinkHat hat1; private final LinkDecor decor1; private final LinkStyle style; private final LinkDecor decor2; private final LinkHat hat2; private final LinkMiddleDecor middleDecor; public LinkType(LinkDecor decor1, LinkDecor decor2) { this(LinkHat.NONE, decor1, decor2, LinkHat.NONE); } public LinkType(LinkHat hat1, LinkDecor decor1, LinkDecor decor2, LinkHat hat2) { this(hat1, decor1, LinkStyle.NORMAL, LinkMiddleDecor.NONE, decor2, hat2); } public LinkType withoutDecors1() { return new LinkType(hat1, LinkDecor.NONE, style, middleDecor, decor2, hat2); } public LinkType withoutDecors2() { return new LinkType(hat1, decor1, style, middleDecor, LinkDecor.NONE, hat2); } // public boolean contains(LinkDecor decors) { // return decor1 == decors || decor2 == decors; // } @Override public String toString() { return decor1 + "-" + style + "-" + decor2; } @Override public int hashCode() { return toString().hashCode(); } @Override public boolean equals(Object obj) { final LinkType other = (LinkType) obj; return this.decor1 == other.decor1 && this.decor2 == other.decor2 && this.style == other.style; } private LinkType(LinkHat hat1, LinkDecor decor1, LinkStyle style, LinkMiddleDecor middleDecor, LinkDecor decor2, LinkHat hat2) { this.decor1 = decor1; this.style = style; this.decor2 = decor2; this.middleDecor = middleDecor; this.hat1 = hat1; this.hat2 = hat2; } public boolean isDashed() { return style == LinkStyle.DASHED; } public boolean isDotted() { return style == LinkStyle.DOTTED; } public boolean isBold() { return style == LinkStyle.BOLD; } public boolean isInvisible() { return style == LinkStyle.INVISIBLE; } public LinkType getDashed() { return new LinkType(hat1, decor1, LinkStyle.DASHED, middleDecor, decor2, hat2); } public LinkType getDotted() { return new LinkType(hat1, decor1, LinkStyle.DOTTED, middleDecor, decor2, hat2); } public LinkType getBold() { return new LinkType(hat1, decor1, LinkStyle.BOLD, middleDecor, decor2, hat2); } public LinkType getInterfaceProvider() { return new LinkType(hat1, decor1, LinkStyle.__toremove_INTERFACE_PROVIDER, middleDecor, decor2, hat2); } public LinkType getInterfaceUser() { return new LinkType(hat1, decor1, LinkStyle.__toremove_INTERFACE_USER, middleDecor, decor2, hat2); } public LinkType getInversed() { return new LinkType(hat2, decor2, style, middleDecor, decor1, hat1); } public LinkType withMiddleCircle() { return new LinkType(hat1, decor1, style, LinkMiddleDecor.CIRCLE, decor2, hat2); } public LinkType withMiddleCircleCircled() { return new LinkType(hat1, decor1, style, LinkMiddleDecor.CIRCLE_CIRCLED, decor2, hat2); } public LinkType withMiddleCircleCircled1() { return new LinkType(hat1, decor1, style, LinkMiddleDecor.CIRCLE_CIRCLED1, decor2, hat2); } public LinkType withMiddleCircleCircled2() { return new LinkType(hat1, decor1, style, LinkMiddleDecor.CIRCLE_CIRCLED2, decor2, hat2); } public LinkType getInvisible() { return new LinkType(hat1, decor1, LinkStyle.INVISIBLE, middleDecor, decor2, hat2); } public String getSpecificDecorationSvek() { final StringBuilder sb = new StringBuilder(); final boolean isEmpty1 = decor1 == LinkDecor.NONE && hat1 == LinkHat.NONE; final boolean isEmpty2 = decor2 == LinkDecor.NONE && hat2 == LinkHat.NONE; if (isEmpty1 && isEmpty2) { sb.append("arrowtail=none"); sb.append(",arrowhead=none"); } else if (isEmpty1 == false && isEmpty2 == false) { sb.append("dir=both,"); sb.append("arrowtail=empty"); sb.append(",arrowhead=empty"); } else if (isEmpty1 && isEmpty2 == false) { sb.append("arrowtail=empty"); sb.append(",arrowhead=none"); sb.append(",dir=back"); // } else if (isEmpty1 == false && isEmpty2) { // sb.append("arrowtail=none"); // sb.append(",arrowhead=empty"); } final double arrowsize = Math.max(decor1.getArrowSize(), decor2.getArrowSize()); if (arrowsize > 0) { if (sb.length() > 0) { sb.append(","); } sb.append("arrowsize=" + arrowsize); } return sb.toString(); } public final LinkDecor getDecor1() { return decor1; } public final LinkStyle getStyle() { return style; } public final LinkDecor getDecor2() { return decor2; } public boolean isExtendsOrAggregationOrCompositionOrPlus() { return isExtends() || isAggregationOrComposition() || isPlus(); } private boolean isExtends() { return decor1 == LinkDecor.EXTENDS || decor2 == LinkDecor.EXTENDS; } private boolean isPlus() { return decor1 == LinkDecor.PLUS || decor2 == LinkDecor.PLUS; } private boolean isAggregationOrComposition() { return decor1 == LinkDecor.AGREGATION || decor2 == LinkDecor.AGREGATION || decor1 == LinkDecor.COMPOSITION || decor2 == LinkDecor.COMPOSITION; } public LinkType getPart1() { return new LinkType(hat1, decor1, style, middleDecor, LinkDecor.NONE, LinkHat.NONE); } public LinkType getPart2() { return new LinkType(LinkHat.NONE, LinkDecor.NONE, style, middleDecor, decor2, hat2); } public UStroke getStroke() { if (style == LinkStyle.DASHED) { return new UStroke(7, 7, 1); } if (style == LinkStyle.DOTTED) { return new UStroke(1, 3, 1); } if (style == LinkStyle.BOLD) { return new UStroke(2); } return new UStroke(); } public LinkMiddleDecor getMiddleDecor() { return middleDecor; } public LinkHat getHat1() { return hat1; } public LinkHat getHat2() { return hat2; } public LinkType withLollipopInterfaceEye2() { return new LinkType(hat1, LinkDecor.NONE, style, middleDecor, decor2, hat2); } public LinkType withLollipopInterfaceEye1() { return new LinkType(hat1, decor1, style, middleDecor, LinkDecor.NONE, hat2); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/LongCode.java000066400000000000000000000047201312650303100262120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import net.sourceforge.plantuml.StringUtils; public class LongCode implements Comparable { private final String fullName; private final String separator; private LongCode(String fullName, String separator) { if (fullName == null) { throw new IllegalArgumentException(); } this.fullName = fullName; this.separator = separator; } public String getNamespaceSeparator() { return separator; } public static LongCode of(String code, String separator) { if (code == null) { throw new IllegalStateException(); } return new LongCode(code, separator); } public final String getFullName() { return fullName; } @Override public String toString() { return fullName + "(" + separator + ")"; } @Override public int hashCode() { return fullName.hashCode(); } @Override public boolean equals(Object obj) { final LongCode other = (LongCode) obj; return this.fullName.equals(other.fullName); } public int compareTo(LongCode other) { return this.fullName.compareTo(other.fullName); } private LongCode eventuallyRemoveStartingAndEndingDoubleQuote() { return LongCode.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(fullName), separator); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/Magma.java000066400000000000000000000062011312650303100255360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.util.List; class Magma { private final CucaDiagram system; private final List standalones; private final LinkType linkType = new LinkType(LinkDecor.NONE, LinkDecor.NONE).getInvisible(); public Magma(CucaDiagram system, List standalones) { this.system = system; this.standalones = standalones; } public void putInSquare() { final SquareLinker linker = new SquareLinker() { public void topDown(ILeaf top, ILeaf down) { system.addLink(new Link(top, down, linkType, Display.NULL, 2)); } public void leftRight(ILeaf left, ILeaf right) { system.addLink(new Link(left, right, linkType, Display.NULL, 1)); } }; new SquareMaker().putInSquare(standalones, linker); } public IGroup getContainer() { final IGroup parent = standalones.get(0).getParentContainer(); if (parent == null) { return null; } return parent.getParentContainer(); } public boolean isComplete() { final IGroup parent = getContainer(); if (parent == null) { return false; } return parent.size() == standalones.size(); } private int squareSize() { return SquareMaker.computeBranch(standalones.size()); } private ILeaf getTopLeft() { return standalones.get(0); } private ILeaf getBottomLeft() { int result = SquareMaker.getBottomLeft(standalones.size()); return standalones.get(result); } private ILeaf getTopRight() { final int s = squareSize(); return standalones.get(s - 1); } @Override public String toString() { return standalones.get(0).getParentContainer() + " " + standalones.toString() + " " + isComplete(); } public void linkToDown(Magma down) { system.addLink(new Link(this.getBottomLeft(), down.getTopLeft(), linkType, Display.NULL, 2)); } public void linkToRight(Magma right) { system.addLink(new Link(this.getTopRight(), right.getTopLeft(), linkType, Display.NULL, 1)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/MagmaList.java000066400000000000000000000040011312650303100263660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.util.ArrayList; import java.util.List; class MagmaList { private final List all = new ArrayList(); public void add(Magma magma) { all.add(magma); } public MagmaList getMagmas(IGroup group) { final MagmaList result = new MagmaList(); for (Magma m : all) { if (m.getContainer() == group) { result.add(m); } } return result; } public int size() { return all.size(); } public void putInSquare() { final SquareLinker linker = new SquareLinker() { public void topDown(Magma top, Magma down) { top.linkToDown(down); } public void leftRight(Magma left, Magma right) { left.linkToRight(right); } }; new SquareMaker().putInSquare(all, linker); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/Member.java000066400000000000000000000031501312650303100257230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.skin.VisibilityModifier; public interface Member { public Url getUrl(); public String getDisplay(boolean withVisibilityChar); public boolean hasUrl(); public VisibilityModifier getVisibilityModifier(); public boolean isStatic(); public boolean isAbstract(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/MemberImpl.java000066400000000000000000000135031312650303100265500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.skin.VisibilityModifier; public class MemberImpl implements Member { private final String display; private final boolean staticModifier; private final boolean abstractModifier; private final Url url; private final boolean hasUrl; private final VisibilityModifier visibilityModifier; public MemberImpl(String tmpDisplay, boolean isMethod, boolean manageModifier) { tmpDisplay = tmpDisplay.replaceAll("(?i)\\{(method|field)\\}\\s*", ""); if (manageModifier) { final Pattern2 finalUrl = MyPattern.cmpile("^(.*?)(?:\\[(" + UrlBuilder.getRegexp() + ")\\])?$"); final Matcher2 matcher = finalUrl.matcher(tmpDisplay); if (matcher.matches() == false) { throw new IllegalStateException(); } tmpDisplay = matcher.group(1); final String urlString = matcher.group(2); if (urlString == null) { this.url = null; } else { this.url = new UrlBuilder(null, ModeUrl.STRICT).getUrl(urlString); } } else { this.url = null; } this.hasUrl = this.url != null; final String lower = StringUtils.goLowerCase(tmpDisplay); if (manageModifier) { this.staticModifier = lower.contains("{static}") || lower.contains("{classifier}"); this.abstractModifier = lower.contains("{abstract}"); String displayClean = tmpDisplay.replaceAll("(?i)\\{(static|classifier|abstract)\\}\\s*", "").trim(); if (displayClean.length() == 0) { displayClean = " "; } if (VisibilityModifier.isVisibilityCharacter(displayClean)) { visibilityModifier = VisibilityModifier.getVisibilityModifier(displayClean, isMethod == false); this.display = StringUtils.trin(StringUtils.manageGuillemet(displayClean.substring(1))); } else { this.display = StringUtils.manageGuillemet(displayClean); visibilityModifier = null; } } else { this.staticModifier = false; this.visibilityModifier = null; this.abstractModifier = false; tmpDisplay = StringUtils.trin(tmpDisplay); this.display = tmpDisplay.length() == 0 ? " " : StringUtils.manageGuillemet(StringUtils.trin(tmpDisplay)); } } public String getDisplay(boolean withVisibilityChar) { if (withVisibilityChar) { return getDisplayWithVisibilityChar(); } return getDisplayWithoutVisibilityChar(); } private String getDisplayWithoutVisibilityChar() { // assert display.length() == 0 || VisibilityModifier.isVisibilityCharacter(display.charAt(0)) == false; return display; } private String getDisplayWithVisibilityChar() { if (isPrivate()) { return "-" + display; } if (isPublic()) { return "+" + display; } if (isPackagePrivate()) { return "~" + display; } if (isProtected()) { return "#" + display; } if (isIEMandatory()) { return "*" + display; } return display; } @Override public boolean equals(Object obj) { final MemberImpl other = (MemberImpl) obj; return this.display.equals(other.display); } @Override public int hashCode() { return display.hashCode(); } public final boolean isStatic() { return staticModifier; } public final boolean isAbstract() { return abstractModifier; } private boolean isPrivate() { return visibilityModifier == VisibilityModifier.PRIVATE_FIELD || visibilityModifier == VisibilityModifier.PRIVATE_METHOD; } private boolean isProtected() { return visibilityModifier == VisibilityModifier.PROTECTED_FIELD || visibilityModifier == VisibilityModifier.PROTECTED_METHOD; } private boolean isPublic() { return visibilityModifier == VisibilityModifier.PUBLIC_FIELD || visibilityModifier == VisibilityModifier.PUBLIC_METHOD; } private boolean isPackagePrivate() { return visibilityModifier == VisibilityModifier.PACKAGE_PRIVATE_FIELD || visibilityModifier == VisibilityModifier.PACKAGE_PRIVATE_METHOD; } private boolean isIEMandatory() { return visibilityModifier == VisibilityModifier.IE_MANDATORY; } public final VisibilityModifier getVisibilityModifier() { return visibilityModifier; } public final Url getUrl() { return url; } public boolean hasUrl() { return hasUrl; } public static boolean isMethod(String s) { // s = UrlBuilder.purgeUrl(s); if (s.contains("{method}")) { return true; } if (s.contains("{field}")) { return false; } return s.contains("(") || s.contains(")"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/MethodsOrFieldsArea.java000066400000000000000000000224671312650303100303540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockLineBefore; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.TextBlockWidth; import net.sourceforge.plantuml.graphic.TextBlockWithUrl; import net.sourceforge.plantuml.skin.VisibilityModifier; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.svek.Ports; import net.sourceforge.plantuml.svek.WithPorts; import net.sourceforge.plantuml.ugraphic.PlacementStrategy; import net.sourceforge.plantuml.ugraphic.PlacementStrategyVisibility; import net.sourceforge.plantuml.ugraphic.PlacementStrategyY1Y2Center; import net.sourceforge.plantuml.ugraphic.PlacementStrategyY1Y2Left; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULayoutGroup; import net.sourceforge.plantuml.utils.CharHidder; public class MethodsOrFieldsArea extends AbstractTextBlock implements TextBlockWidth, TextBlock, WithPorts { public TextBlock asBlockMemberImpl() { return new TextBlockLineBefore(TextBlockUtils.withMargin(this, 6, 4)); } private final FontParam fontParam; private final ISkinParam skinParam; private final HtmlColor color; private final HtmlColor hyperlinkColor; private final boolean useUnderlineForHyperlink; private final Rose rose = new Rose(); private final List members = new ArrayList(); private final HorizontalAlignment align; private final Stereotype stereotype; private final ILeaf leaf; public MethodsOrFieldsArea(List members, FontParam fontParam, ISkinParam skinParam, Stereotype stereotype, ILeaf leaf) { this(members, fontParam, skinParam, HorizontalAlignment.LEFT, stereotype, leaf); } public MethodsOrFieldsArea(List members, FontParam fontParam, ISkinParam skinParam, HorizontalAlignment align, Stereotype stereotype, ILeaf leaf) { this.leaf = leaf; this.stereotype = stereotype; this.align = align; this.skinParam = skinParam; this.fontParam = fontParam; this.color = rose.getFontColor(skinParam, fontParam); this.hyperlinkColor = skinParam.getHyperlinkColor(); this.useUnderlineForHyperlink = skinParam.useUnderlineForHyperlink(); this.members.addAll(members); } private boolean hasSmallIcon() { if (skinParam.classAttributeIconSize() == 0) { return false; } for (Member m : members) { if (m.getVisibilityModifier() != null) { return true; } } return false; } public Dimension2D calculateDimension(StringBounder stringBounder) { double smallIcon = 0; if (hasSmallIcon()) { smallIcon = skinParam.getCircledCharacterRadius() + 3; } double x = 0; double y = 0; for (Member m : members) { final TextBlock bloc = createTextBlock(m); final Dimension2D dim = bloc.calculateDimension(stringBounder); x = Math.max(dim.getWidth(), x); y += dim.getHeight(); } x += smallIcon; return new Dimension2DDouble(x, y); } public Ports getPorts(StringBounder stringBounder) { final Ports result = new Ports(); double y = 0; final Election election = new Election(); for (Member m : members) { election.addCandidate(m.getDisplay(false), m); } final Map memberWithPort = election.getAllElected(leaf.getPortShortNames()); for (Member m : members) { final TextBlock bloc = createTextBlock(m); final Dimension2D dim = bloc.calculateDimension(stringBounder); final String port = memberWithPort.get(m); if (port != null) { result.add(port, y, dim.getHeight()); } y += dim.getHeight(); } return result; } private TextBlock createTextBlock(Member m) { final boolean withVisibilityChar = skinParam.classAttributeIconSize() == 0; String s = m.getDisplay(withVisibilityChar); if (withVisibilityChar && s.startsWith("#")) { s = CharHidder.addTileAtBegin(s); } FontConfiguration config = new FontConfiguration(skinParam, fontParam, stereotype); if (m.isAbstract()) { config = config.italic(); } if (m.isStatic()) { config = config.underline(); } TextBlock bloc = Display.getWithNewlines(s).create(config, align, skinParam, CreoleMode.SIMPLE_LINE); bloc = TextBlockUtils.fullInnerPosition(bloc, m.getDisplay(false)); return new TextBlockTracer(m, bloc); } static class TextBlockTracer extends AbstractTextBlock implements TextBlock { private final TextBlock bloc; private final Url url; public TextBlockTracer(Member m, TextBlock bloc) { this.bloc = bloc; this.url = m.getUrl(); } public void drawU(UGraphic ug) { if (url != null) { ug.startUrl(url); } bloc.drawU(ug); if (url != null) { ug.closeAction(); } } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dim = bloc.calculateDimension(stringBounder); return dim; } @Override public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { return bloc.getInnerPosition(member, stringBounder, strategy); } } private TextBlock getUBlock(final VisibilityModifier modifier, Url url) { if (modifier == null) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(1, 1); } }; } final HtmlColor back = modifier.getBackground() == null ? null : rose.getHtmlColor(skinParam, modifier.getBackground()); final HtmlColor fore = rose.getHtmlColor(skinParam, modifier.getForeground()); final TextBlock uBlock = modifier.getUBlock(skinParam.classAttributeIconSize(), fore, back, url != null); return TextBlockWithUrl.withUrl(uBlock, url); } public TextBlock asTextBlock(final double widthToUse) { return this; } public boolean contains(String member) { for (Member att : members) { if (att.getDisplay(false).startsWith(member)) { return true; } } return false; } @Override public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { final ULayoutGroup group = getLayout(stringBounder); final Dimension2D dim = calculateDimension(stringBounder); return group.getInnerPosition(member, dim.getWidth(), dim.getHeight(), stringBounder); } private ULayoutGroup getLayout(final StringBounder stringBounder) { final ULayoutGroup group; if (hasSmallIcon()) { group = new ULayoutGroup(new PlacementStrategyVisibility(stringBounder, skinParam.getCircledCharacterRadius() + 3)); for (Member att : members) { final TextBlock bloc = createTextBlock(att); final VisibilityModifier modifier = att.getVisibilityModifier(); group.add(getUBlock(modifier, att.getUrl())); group.add(bloc); } } else { final PlacementStrategy placementStrategy; if (align == HorizontalAlignment.LEFT) { placementStrategy = new PlacementStrategyY1Y2Left(stringBounder); } else if (align == HorizontalAlignment.CENTER) { placementStrategy = new PlacementStrategyY1Y2Center(stringBounder); } else { throw new IllegalStateException(); } group = new ULayoutGroup(placementStrategy); for (Member att : members) { final TextBlock bloc = createTextBlock(att); group.add(bloc); } } return group; } public void drawU(UGraphic ug) { final ULayoutGroup group = getLayout(ug.getStringBounder()); final Dimension2D dim = calculateDimension(ug.getStringBounder()); group.drawU(ug, dim.getWidth(), dim.getHeight()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/Namespace.java000066400000000000000000000036161312650303100264170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; public class Namespace { private final String namespace; private Namespace(String namespace) { if (namespace == null) { throw new IllegalArgumentException(); } this.namespace = namespace; } public final String getNamespace() { return namespace; } public static Namespace of(String namespace) { return new Namespace(namespace); } @Override public int hashCode() { return namespace.hashCode(); } @Override public boolean equals(Object obj) { final Namespace other = (Namespace) obj; return this.namespace.equals(other.namespace); } public boolean isMain() { return namespace.length() == 0; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/NoteLinkStrategy.java000066400000000000000000000033271312650303100277700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; public enum NoteLinkStrategy { NORMAL, HALF_PRINTED_FULL, HALF_NOT_PRINTED; public Dimension2D computeDimension(double width, double height) { if (this == HALF_PRINTED_FULL) { return new Dimension2DDouble(width / 2, height); } if (this == HALF_NOT_PRINTED) { return new Dimension2DDouble(0, 0); } return new Dimension2DDouble(width, height); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/PortionShower.java000066400000000000000000000025641312650303100273460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; public interface PortionShower { boolean showPortion(EntityPortion portion, IEntity entity); } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/Rankdir.java000066400000000000000000000025121312650303100261070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; public enum Rankdir { LEFT_TO_RIGHT, TOP_TO_BOTTOM; } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/RuleType.java000066400000000000000000000024671312650303100262770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; public enum RuleType { SHOW, HIDE } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/SquareLinker.java000066400000000000000000000026201312650303100271220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; interface SquareLinker { public void leftRight(O left, O right); public void topDown(O top, O down); } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/SquareMaker.java000066400000000000000000000044261312650303100267430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.util.List; class SquareMaker { public void putInSquare(List data, SquareLinker linker) { final int branch = computeBranch(data.size()); int headBranch = 0; for (int i = 1; i < data.size(); i++) { final int dist = i - headBranch; final O ent2 = data.get(i); if (dist == branch) { final O ent1 = data.get(headBranch); linker.topDown(ent1, ent2); headBranch = i; } else { final O ent1 = data.get(i - 1); linker.leftRight(ent1, ent2); } } } static int computeBranch(final int size) { final double sqrt = Math.sqrt(size); final int r = (int) sqrt; if (r * r == size) { return r; } return r + 1; } static int getBottomLeft(final int size) { final int s = computeBranch(size); final int line = (size - 1) / s; return line * s; } // static int getBottomLeft(final int size) { // final int s = computeBranch(size); // int result = s * (s - 1); // while (result >= size) { // result -= s; // } // return result; // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/Stereotype.java000066400000000000000000000162111312650303100266610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; import java.util.ArrayList; import java.util.Collections; import java.util.EnumSet; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sourceforge.plantuml.Hideable; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.IHtmlColorSet; import net.sourceforge.plantuml.svek.PackageStyle; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.sprite.SpriteUtils; public class Stereotype implements CharSequence, Hideable { private final static Pattern2 circleChar = MyPattern .cmpile("\\<\\<[%s]*\\(?(\\S)[%s]*,[%s]*(#[0-9a-fA-F]{6}|\\w+)[%s]*(?:[),](.*?))?\\>\\>"); private final static Pattern2 circleSprite = MyPattern.cmpile("\\<\\<[%s]*\\(?\\$(" + SpriteUtils.SPRITE_NAME + ")[%s]*(?:,[%s]*(#[0-9a-fA-F]{6}|\\w+))?[%s]*(?:[),](.*?))?\\>\\>"); private final double radius; private final UFont circledFont; private final boolean automaticPackageStyle; private String label; private HtmlColor htmlColor; private char character; private String sprite; public Stereotype(String label, double radius, UFont circledFont, IHtmlColorSet htmlColorSet) { this(label, radius, circledFont, true, htmlColorSet); } public Stereotype(String label, double radius, UFont circledFont, boolean automaticPackageStyle, IHtmlColorSet htmlColorSet) { if (label == null) { throw new IllegalArgumentException(); } if (label.startsWith("<<") == false || label.endsWith(">>") == false) { throw new IllegalArgumentException(label); } this.automaticPackageStyle = automaticPackageStyle; this.radius = radius; this.circledFont = circledFont; final StringBuilder tmpLabel = new StringBuilder(); final List list = cutLabels(label, false); for (String local : list) { final Matcher2 mCircleChar = circleChar.matcher(local); final Matcher2 mCircleSprite = circleSprite.matcher(local); if (mCircleSprite.find()) { if (StringUtils.isNotEmpty(mCircleSprite.group(3))) { local = "<<" + mCircleSprite.group(3) + ">>"; } else { local = null; } final String colName = mCircleSprite.group(2); final HtmlColor col = htmlColorSet.getColorIfValid(colName); this.htmlColor = col == null ? HtmlColorUtils.BLACK : col; this.sprite = mCircleSprite.group(1); this.character = '\0'; } else if (mCircleChar.find()) { if (StringUtils.isNotEmpty(mCircleChar.group(3))) { local = "<<" + mCircleChar.group(3) + ">>"; } else { local = null; } final String colName = mCircleChar.group(2); this.htmlColor = htmlColorSet.getColorIfValid(colName); this.character = mCircleChar.group(1).charAt(0); this.sprite = null; } if (local != null) { tmpLabel.append(local); } } if (tmpLabel.length() > 0) { this.label = tmpLabel.toString(); } } public Stereotype(String label) { this(label, true); } public Stereotype(String label, boolean automaticPackageStyle) { this.automaticPackageStyle = automaticPackageStyle; this.label = label; this.htmlColor = null; this.character = '\0'; this.radius = 0; this.circledFont = null; if (label.startsWith("<<$") && label.endsWith(">>")) { this.sprite = label.substring(3, label.length() - 2).trim(); } else { this.sprite = null; } } public HtmlColor getHtmlColor() { return htmlColor; } public char getCharacter() { return character; } public final String getSprite() { return sprite; } public boolean isWithOOSymbol() { return "<>".equalsIgnoreCase(label); } public List getMultipleLabels() { final List result = new ArrayList(); if (label != null) { final Pattern p = Pattern.compile("\\<\\<\\s?((?:\\<&\\w+\\>|[^<>])+?)\\s?\\>\\>"); final Matcher m = p.matcher(label); while (m.find()) { result.add(m.group(1)); } } return Collections.unmodifiableList(result); } public boolean isSpotted() { return character != 0; } @Override public String toString() { if (label == null) { return "" + character; } if (character == 0) { return label; } return character + " " + label; } public char charAt(int arg0) { return toString().charAt(arg0); } public int length() { return toString().length(); } public CharSequence subSequence(int arg0, int arg1) { return toString().subSequence(arg0, arg1); } public double getRadius() { return radius; } public final UFont getCircledFont() { return circledFont; } public String getLabel(boolean withGuillement) { assert label == null || label.length() > 0; if (isWithOOSymbol()) { return null; } if (withGuillement) { return StringUtils.manageGuillemet(label); } return label; } public List getLabels(boolean useGuillemet) { final String labelLocal = getLabel(false); if (labelLocal == null) { return null; } return cutLabels(labelLocal, useGuillemet); } private static List cutLabels(final String label, boolean useGuillemet) { final List result = new ArrayList(); final Pattern2 p = MyPattern.cmpile("\\<\\<.*?\\>\\>"); final Matcher2 m = p.matcher(label); while (m.find()) { if (useGuillemet) { result.add(StringUtils.manageGuillemetStrict(m.group())); } else { result.add(m.group()); } } return Collections.unmodifiableList(result); } public PackageStyle getPackageStyle() { if (automaticPackageStyle == false) { return null; } for (PackageStyle p : EnumSet.allOf(PackageStyle.class)) { if (("<<" + p + ">>").equalsIgnoreCase(label)) { return p; } } return null; } public boolean isHidden() { return "<>".equalsIgnoreCase(label); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/UnparsableGraphvizException.java000066400000000000000000000035151312650303100322070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram; public class UnparsableGraphvizException extends RuntimeException { private final String graphvizVersion; private final String svg; private final String diagramSource; public UnparsableGraphvizException(Exception cause, String graphvizVersion, String svg, String diagramSource) { super(cause); this.graphvizVersion = graphvizVersion; this.svg = svg; this.diagramSource = diagramSource; } public String getGraphvizVersion() { return graphvizVersion; } public final String getDebugData() { return "SVG=" + svg + "\r\nDIAGRAM=" + diagramSource; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/000077500000000000000000000000001312650303100244405ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/AbstractGraphviz.java000066400000000000000000000127351312650303100305710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.File; import java.io.OutputStream; import java.util.Arrays; import java.util.List; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.StringUtils; abstract class AbstractGraphviz implements Graphviz { private final File dotExe; private final String dotString; private final String[] type; private final ISkinParam skinParam; static boolean isWindows() { return File.separatorChar == '\\'; } AbstractGraphviz(ISkinParam skinParam, String dotString, String... type) { if (type == null) { throw new IllegalArgumentException(); } this.skinParam = skinParam; this.dotExe = searchDotExe(); this.dotString = dotString; this.type = type; } private File searchDotExe() { if (skinParam == null || skinParam.getDotExecutable() == null) { final String getenv = GraphvizUtils.getenvGraphvizDot(); if (getenv == null) { return specificDotExe(); } return new File(getenv); } return new File(skinParam.getDotExecutable()); } abstract protected File specificDotExe(); final public ProcessState createFile3(OutputStream os) { if (dotString == null) { throw new IllegalArgumentException(); } if (getExeState() != ExeState.OK) { // createPngNoGraphviz(os, new FileFormatOption(FileFormat.valueOf(type[0].goUpperCase()))); throw new IllegalStateException(); } final String cmd[] = getCommandLine(); ProcessRunner p = null; ProcessState state = null; try { Log.info("Starting Graphviz process " + Arrays.asList(cmd)); Log.info("DotString size: " + dotString.length()); p = new ProcessRunner(cmd); state = p.run(dotString.getBytes(), os); // if (state == ProcessState.TERMINATED_OK) { // result = true; // } Log.info("Ending process ok"); } catch (Throwable e) { e.printStackTrace(); Log.error("Error: " + e); Log.error("The command was " + cmd); Log.error(""); Log.error("Try java -jar plantuml.jar -testdot to figure out the issue"); Log.error(""); } finally { Log.info("Ending Graphviz process"); } if (OptionFlags.getInstance().isCheckDotError() && p != null && p.getError().length() > 0) { Log.error("GraphViz error stream : " + p.getError()); if (OptionFlags.getInstance().isCheckDotError()) { throw new IllegalStateException("Dot error " + p.getError()); } } if (OptionFlags.getInstance().isCheckDotError() && p != null && p.getOut().length() > 0) { Log.error("GraphViz out stream : " + p.getOut()); if (OptionFlags.getInstance().isCheckDotError()) { throw new IllegalStateException("Dot out " + p.getOut()); } } return state; } final public ExeState getExeState() { return ExeState.checkFile(dotExe); } final public String dotVersion() { final String cmd[] = getCommandLineVersion(); return executeCmd(cmd); } private String executeCmd(final String cmd[]) { final ProcessRunner p = new ProcessRunner(cmd); final ProcessState state = p.run(null, null); if (state.differs(ProcessState.TERMINATED_OK())) { return "?"; } final StringBuilder sb = new StringBuilder(); if (StringUtils.isNotEmpty(p.getOut())) { sb.append(p.getOut()); } if (StringUtils.isNotEmpty(p.getError())) { if (sb.length() > 0) { sb.append(' '); } sb.append(p.getError()); } return StringUtils.trin(sb.toString().replace('\n', ' ')); } final String[] getCommandLine() { if (OptionFlags.ADD_NICE_FOR_DOT) { final String[] result = new String[type.length + 1 + 3]; result[0] = "/bin/nice"; result[1] = "-n"; result[2] = "10"; result[3] = getDotExe().getAbsolutePath(); for (int i = 0; i < type.length; i++) { result[i + 4] = "-T" + type[i]; } return result; } final String[] result = new String[type.length + 1]; result[0] = getDotExe().getAbsolutePath(); for (int i = 0; i < type.length; i++) { result[i + 1] = "-T" + type[i]; } return result; } final String[] getCommandLineVersion() { return new String[] { getDotExe().getAbsolutePath(), "-V" }; } public final File getDotExe() { return dotExe; } public final String getDotString() { return dotString; } public final List getType() { return Arrays.asList(type); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramSimplifierActivity.java000066400000000000000000000062571312650303100332160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.svek.GroupPngMakerActivity; import net.sourceforge.plantuml.svek.IEntityImage; public final class CucaDiagramSimplifierActivity { private final CucaDiagram diagram; private final StringBounder stringBounder; public CucaDiagramSimplifierActivity(CucaDiagram diagram, List dotStrings, StringBounder stringBounder) throws IOException, InterruptedException { this.diagram = diagram; this.stringBounder = stringBounder; boolean changed; do { changed = false; final Collection groups = new ArrayList(diagram.getGroups(false)); for (IGroup g : groups) { if (diagram.isAutarkic(g)) { // final EntityType type; // if (g.zgetGroupType() == GroupType.INNER_ACTIVITY) { // type = EntityType.ACTIVITY; // } else if (g.zgetGroupType() == GroupType.CONCURRENT_ACTIVITY) { // type = EntityType.ACTIVITY_CONCURRENT; // } else { // throw new IllegalStateException(); // } final IEntityImage img = computeImage(g); g.overrideImage(img, LeafType.ACTIVITY); changed = true; } } } while (changed); } // private void computeImageGroup(EntityMutable g, EntityMutable proxy, List dotStrings) throws IOException, // InterruptedException { // final GroupPngMakerActivity maker = new GroupPngMakerActivity(diagram, g); // proxy.setSvekImage(maker.getImage()); // } private IEntityImage computeImage(IGroup g) throws IOException, InterruptedException { final GroupPngMakerActivity maker = new GroupPngMakerActivity(diagram, g, stringBounder); return maker.getImage(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramSimplifierState.java000066400000000000000000000071551312650303100325000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.LinkedHashSet; import java.util.List; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.GroupRoot; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.svek.GroupPngMakerState; import net.sourceforge.plantuml.svek.IEntityImage; public final class CucaDiagramSimplifierState { private final CucaDiagram diagram; private final StringBounder stringBounder; public CucaDiagramSimplifierState(CucaDiagram diagram, List dotStrings, StringBounder stringBounder) throws IOException, InterruptedException { this.diagram = diagram; this.stringBounder = stringBounder; boolean changed; do { changed = false; final Collection groups = getOrdered(diagram.getRootGroup()); for (IGroup g : groups) { if (diagram.isAutarkic(g)) { final IEntityImage img = computeImage(g); g.overrideImage(img, g.getGroupType() == GroupType.CONCURRENT_STATE ? LeafType.STATE_CONCURRENT : LeafType.STATE); changed = true; } } } while (changed); } private Collection getOrdered(IGroup root) { final Collection ordered = new LinkedHashSet(); ordered.add(root); int size = 1; while (true) { size = ordered.size(); addOneLevel(ordered); if (size == ordered.size()) { break; } } final List result = new ArrayList(); for (IGroup g : ordered) { if (g instanceof GroupRoot == false) { result.add(0, g); } } return result; } private void addOneLevel(Collection currents) { for (IGroup g : new ArrayList(currents)) { for (IGroup child : reverse(g.getChildren())) { currents.add(child); } } } private List reverse(Collection source) { final List result = new ArrayList(); for (IGroup g : source) { result.add(0, g); } return result; } private IEntityImage computeImage(IGroup g) throws IOException, InterruptedException { final GroupPngMakerState maker = new GroupPngMakerState(diagram, g, stringBounder); return maker.getImage(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/CucaDiagramTxtMaker.java000066400000000000000000000140161312650303100311250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.awt.geom.Point2D; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.Member; import net.sourceforge.plantuml.posimo.Block; import net.sourceforge.plantuml.posimo.Cluster; import net.sourceforge.plantuml.posimo.GraphvizSolverB; import net.sourceforge.plantuml.posimo.Path; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt; public final class CucaDiagramTxtMaker { // private final CucaDiagram diagram; private final FileFormat fileFormat; private final UGraphicTxt globalUg = new UGraphicTxt(); private static double getXPixelPerChar() { return 5; } private static double getYPixelPerChar() { return 10; } public CucaDiagramTxtMaker(CucaDiagram diagram, FileFormat fileFormat) throws IOException { // this.diagram = diagram; this.fileFormat = fileFormat; final Cluster root = new Cluster(null, 0, 0); int uid = 0; final Map blocks = new HashMap(); for (IEntity ent : diagram.getLeafsvalues()) { // printClass(ent); // ug.translate(0, getHeight(ent) + 1); final double width = getWidth(ent) * getXPixelPerChar(); final double height = getHeight(ent) * getYPixelPerChar(); final Block b = new Block(uid++, width, height, null); root.addBloc(b); blocks.put(ent, b); } final GraphvizSolverB solver = new GraphvizSolverB(); final Collection paths = new ArrayList(); for (Link link : diagram.getLinks()) { final Block b1 = blocks.get(link.getEntity1()); final Block b2 = blocks.get(link.getEntity2()); paths.add(new Path(b1, b2, null, link.getLength())); } solver.solve(root, paths); for (Path p : paths) { p.getDotPath().draw(globalUg.getCharArea(), getXPixelPerChar(), getYPixelPerChar()); } for (IEntity ent : diagram.getLeafsvalues()) { final Block b = blocks.get(ent); final Point2D p = b.getPosition(); printClass( ent, (UGraphicTxt) globalUg.apply(new UTranslate(p.getX() / getXPixelPerChar(), p.getY() / getYPixelPerChar()))); } } private void printClass(final IEntity ent, UGraphicTxt ug) { final int w = getWidth(ent); final int h = getHeight(ent); ug.getCharArea().drawBoxSimple(0, 0, w, h); ug.getCharArea().drawStringsLR(ent.getDisplay().as(), 1, 1); int y = 2; ug.getCharArea().drawHLine('-', y, 1, w - 1); y++; for (Member att : ent.getBodier().getFieldsToDisplay()) { final List disp = BackSlash.getWithNewlines(att.getDisplay(true)); ug.getCharArea().drawStringsLR(disp, 1, y); y += StringUtils.getHeight(disp); } ug.getCharArea().drawHLine('-', y, 1, w - 1); y++; for (Member att : ent.getBodier().getMethodsToDisplay()) { final List disp = BackSlash.getWithNewlines(att.getDisplay(true)); ug.getCharArea().drawStringsLR(disp, 1, y); y += StringUtils.getHeight(disp); } } public List createFiles(File suggestedFile) throws IOException { if (fileFormat == FileFormat.UTXT) { globalUg.getCharArea().print(new PrintStream(suggestedFile, "UTF-8")); } else { globalUg.getCharArea().print(new PrintStream(suggestedFile)); } return Collections.singletonList(suggestedFile); } private int getHeight(IEntity entity) { int result = StringUtils.getHeight(entity.getDisplay()); for (Member att : entity.getBodier().getMethodsToDisplay()) { result += StringUtils.getHeight(Display.getWithNewlines(att.getDisplay(true))); } for (Member att : entity.getBodier().getFieldsToDisplay()) { result += StringUtils.getHeight(Display.getWithNewlines(att.getDisplay(true))); } return result + 4; } private int getWidth(IEntity entity) { int result = StringUtils.getWidth(entity.getDisplay()); for (Member att : entity.getBodier().getMethodsToDisplay()) { final int w = StringUtils.getWidth(Display.getWithNewlines(att.getDisplay(true))); if (w > result) { result = w; } } for (Member att : entity.getBodier().getFieldsToDisplay()) { final int w = StringUtils.getWidth(Display.getWithNewlines(att.getDisplay(true))); if (w > result) { result = w; } } return result + 2; } public void createFiles(OutputStream os, int index) { globalUg.getCharArea().print(new PrintStream(os)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/DebugTrace.java000066400000000000000000000036711312650303100273170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; public class DebugTrace { private static final File out = new File("debug" + System.currentTimeMillis() + ".txt"); private static PrintWriter pw; private synchronized static PrintWriter getPrintWriter() { if (pw == null) { try { pw = new PrintWriter(out); } catch (FileNotFoundException e) { } } return pw; } public synchronized static void DEBUG(String s) { final PrintWriter pw = getPrintWriter(); pw.println(s); pw.flush(); } public synchronized static void DEBUG(String s, Throwable t) { DEBUG(s); t.printStackTrace(pw); pw.flush(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/DotData.java000066400000000000000000000155561312650303100266370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.Pragma; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.GroupHierarchy; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.PortionShower; import net.sourceforge.plantuml.cucadiagram.entity.EntityFactory; import net.sourceforge.plantuml.svek.DotMode; import net.sourceforge.plantuml.ugraphic.ColorMapper; final public class DotData implements PortionShower { final private List links; final private Collection leafs; final private UmlDiagramType umlDiagramType; final private ISkinParam skinParam; // final private Rankdir rankdir; final private GroupHierarchy groupHierarchy; final private IGroup topParent; final private PortionShower portionShower; final private boolean isHideEmptyDescriptionForState; final private DotMode dotMode; final private String namespaceSeparator; final private Pragma pragma; private final ColorMapper colorMapper; private final EntityFactory entityFactory; public DotData(IGroup topParent, List links, Collection leafs, UmlDiagramType umlDiagramType, ISkinParam skinParam, GroupHierarchy groupHierarchy, PortionShower portionShower, ColorMapper colorMapper, EntityFactory entityFactory, boolean isHideEmptyDescriptionForState, DotMode dotMode, String namespaceSeparator, Pragma pragma) { this.namespaceSeparator = namespaceSeparator; this.pragma = pragma; this.topParent = topParent; if (topParent == null) { throw new IllegalArgumentException(); } this.dotMode = dotMode; this.isHideEmptyDescriptionForState = isHideEmptyDescriptionForState; this.colorMapper = colorMapper; this.links = links; this.leafs = leafs; this.umlDiagramType = umlDiagramType; this.skinParam = skinParam; // this.rankdir = rankdir; this.groupHierarchy = groupHierarchy; this.portionShower = portionShower; this.entityFactory = entityFactory; } public DotData(IGroup topParent, List links, Collection leafs, UmlDiagramType umlDiagramType, ISkinParam skinParam, GroupHierarchy groupHierarchy, ColorMapper colorMapper, EntityFactory entityFactory, boolean isHideEmptyDescriptionForState, DotMode dotMode, String namespaceSeparator, Pragma pragma) { this(topParent, links, leafs, umlDiagramType, skinParam, groupHierarchy, new PortionShower() { public boolean showPortion(EntityPortion portion, IEntity entity) { return true; } }, colorMapper, entityFactory, isHideEmptyDescriptionForState, dotMode, namespaceSeparator, pragma); } public UmlDiagramType getUmlDiagramType() { return umlDiagramType; } public ISkinParam getSkinParam() { return skinParam; } public GroupHierarchy getGroupHierarchy() { return groupHierarchy; } public List getLinks() { return links; } public Collection getLeafs() { return leafs; } public final IGroup getTopParent() { return topParent; } public boolean isEmpty(IGroup g) { return groupHierarchy.isEmpty(g); } public boolean showPortion(EntityPortion portion, IEntity entity) { return portionShower.showPortion(portion, entity); } public final ColorMapper getColorMapper() { return colorMapper; } public IGroup getRootGroup() { return entityFactory.getRootGroup(); } public final boolean isHideEmptyDescriptionForState() { return isHideEmptyDescriptionForState; } public final DotMode getDotMode() { return dotMode; } public final String getNamespaceSeparator() { return namespaceSeparator; } public Pragma getPragma() { return pragma; } public void removeIrrelevantSametail() { final Map sametails = new HashMap(); for (Link link : links) { if (link.getType().getDecor2() == LinkDecor.EXTENDS) { link.setSametail(link.getEntity1().getUid()); } final String sametail = link.getSametail(); if (sametail == null) { continue; } final Integer value = sametails.get(sametail); sametails.put(sametail, value == null ? 1 : value + 1); } final Collection toremove = new HashSet(); final int limit = skinParam.groupInheritance(); for (Map.Entry ent : sametails.entrySet()) { final String key = ent.getKey(); if (ent.getValue() < limit) { toremove.add(key); } else { final List some = new ArrayList(); for (Link link : links) { if (key.equals(link.getSametail())) { some.add(link); } } final ILeaf leaf = getLeaf(key); final Neighborhood neighborhood = new Neighborhood(leaf, some, getLinksOfThisLeaf(leaf)); leaf.setNeighborhood(neighborhood); } } for (Link link : links) { final String sametail = link.getSametail(); if (sametail == null) { continue; } if (toremove.contains(sametail)) { link.setSametail(null); } } } private List getLinksOfThisLeaf(ILeaf leaf) { final List result = new ArrayList(); for (Link link : links) { if (link.contains(leaf)) { result.add(link); } } return result; } private ILeaf getLeaf(String key) { for (ILeaf entity : leafs) { if (entity.getUid().equals(key)) { return entity; } } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/DotMaker2.java000066400000000000000000000027271312650303100271030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; final public class DotMaker2 { private static boolean isJunit = false; public static void goJunit() { isJunit = true; } public static final boolean isJunit() { return isJunit; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/DotSplines.java000066400000000000000000000025141312650303100273710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; public enum DotSplines { POLYLINE, ORTHO, SPLINES } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/ExeState.java000066400000000000000000000054371312650303100270360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.File; public enum ExeState { NULL_UNDEFINED, OK, DOES_NOT_EXIST, IS_A_DIRECTORY, NOT_A_FILE, CANNOT_BE_READ; public static ExeState checkFile(File dotExe) { if (dotExe == null) { return NULL_UNDEFINED; } else if (dotExe.exists() == false) { return DOES_NOT_EXIST; } else if (dotExe.isDirectory()) { return IS_A_DIRECTORY; } else if (dotExe.isFile() == false) { return NOT_A_FILE; } else if (dotExe.canRead() == false) { return CANNOT_BE_READ; } return OK; } public String getTextMessage() { switch (this) { case OK: return "File OK"; case NULL_UNDEFINED: return "No dot executable found"; case DOES_NOT_EXIST: return "File does not exist"; case IS_A_DIRECTORY: return "It should be an executable, not a directory"; case NOT_A_FILE: return "Not a valid file"; case CANNOT_BE_READ: return "File cannot be read"; } throw new IllegalStateException(); } public String getTextMessage(File exe) { switch (this) { case OK: return "File " + exe.getAbsolutePath() + " OK"; case NULL_UNDEFINED: return NULL_UNDEFINED.getTextMessage(); case DOES_NOT_EXIST: return "File " + exe.getAbsolutePath() + " does not exist"; case IS_A_DIRECTORY: return "File " + exe.getAbsolutePath() + " should be an executable, not a directory"; case NOT_A_FILE: return "File " + exe.getAbsolutePath() + " is not a valid file"; case CANNOT_BE_READ: return "File " + exe.getAbsolutePath() + " cannot be read"; } throw new IllegalStateException(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/Graphviz.java000066400000000000000000000027311312650303100271000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.File; import java.io.OutputStream; public interface Graphviz { ProcessState createFile3(OutputStream os); File getDotExe(); String dotVersion(); ExeState getExeState(); }plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizLinux.java000066400000000000000000000033641312650303100301230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.File; import net.sourceforge.plantuml.ISkinParam; class GraphvizLinux extends AbstractGraphviz { GraphvizLinux(ISkinParam skinParam, String dotString, String... type) { super(skinParam, dotString, type); } @Override protected File specificDotExe() { final File usrLocalBinDot = new File("/usr/local/bin/dot"); if (usrLocalBinDot.exists()) { return usrLocalBinDot; } final File usrBinDot = new File("/usr/bin/dot"); return usrBinDot; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizUtils.java000066400000000000000000000172561312650303100301310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.vizjs.GraphvizJs; import net.sourceforge.plantuml.vizjs.VizJsEngine; public class GraphvizUtils { private static final String VIZJS = "vizjs"; private static int DOT_VERSION_LIMIT = 226; private static boolean isWindows() { return File.separatorChar == '\\'; } private static String dotExecutable; public static final String getDotExecutableForTest() { return dotExecutable; } public static final void setDotExecutable(String value) { dotExecutable = value; } public static Graphviz create(ISkinParam skinParam, String dotString, String... type) { if (useVizJs(skinParam)) { Log.info("Using " + VIZJS); return new GraphvizJs(dotString); } final AbstractGraphviz result; if (isWindows()) { result = new GraphvizWindows(skinParam, dotString, type); } else { result = new GraphvizLinux(skinParam, dotString, type); } if (result.getExeState() != ExeState.OK && VizJsEngine.isOk()) { Log.info("Error with file " + result.getDotExe() + ": " + result.getExeState().getTextMessage()); Log.info("Using " + VIZJS); return new GraphvizJs(dotString); } return result; } private static boolean useVizJs(ISkinParam skinParam) { if (skinParam != null && VIZJS.equalsIgnoreCase(skinParam.getDotExecutable()) && VizJsEngine.isOk()) { return true; } if (VIZJS.equalsIgnoreCase(getenvGraphvizDot()) && VizJsEngine.isOk()) { return true; } return false; } static public File getDotExe() { return create(null, "png").getDotExe(); } public static String getenvGraphvizDot() { if (StringUtils.isNotEmpty(dotExecutable)) { return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(dotExecutable); } final String env = System.getProperty("GRAPHVIZ_DOT"); if (StringUtils.isNotEmpty(env)) { return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(env); } final String getenv = System.getenv("GRAPHVIZ_DOT"); if (StringUtils.isNotEmpty(getenv)) { return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(getenv); } return null; } public static int getenvImageLimit() { final String env = System.getProperty("PLANTUML_LIMIT_SIZE"); if (StringUtils.isNotEmpty(env) && env.matches("\\d+")) { return Integer.parseInt(env); } final String getenv = System.getenv("PLANTUML_LIMIT_SIZE"); if (StringUtils.isNotEmpty(getenv) && getenv.matches("\\d+")) { return Integer.parseInt(getenv); } return 4096; } public static String getenvLogData() { final String env = System.getProperty("PLANTUML_LOGDATA"); if (StringUtils.isNotEmpty(env)) { return env; } return System.getenv("PLANTUML_LOGDATA"); } private static String dotVersion = null; public static String dotVersion() throws IOException, InterruptedException { if (dotVersion == null) { final File dotExe = GraphvizUtils.getDotExe(); final ExeState exeState = ExeState.checkFile(dotExe); if (exeState == ExeState.OK) { dotVersion = create(null, "png").dotVersion(); } else { dotVersion = "Error:" + exeState.getTextMessage(dotExe); } } return dotVersion; } public static int retrieveVersion(String s) { if (s == null) { return -1; } final Pattern p = Pattern.compile("\\s([12].\\d\\d)\\D"); final Matcher m = p.matcher(s); if (m.find() == false) { return -1; } return Integer.parseInt(m.group(1).replaceAll("\\.", "")); } public static int getDotVersion() throws IOException, InterruptedException { return retrieveVersion(dotVersion()); } static public List getTestDotStrings(boolean withRichText) { String red = ""; String bold = ""; if (withRichText) { red = ""; bold = ""; } final List result = new ArrayList(); if (useVizJs(null)) { result.add("VizJs library is used!"); try { final String err = getTestCreateSimpleFile(); if (err == null) { result.add(bold + "Installation seems OK. File generation OK"); } else { result.add(red + err); } } catch (Exception e) { result.add(red + e.toString()); e.printStackTrace(); } return Collections.unmodifiableList(result); } final String ent = GraphvizUtils.getenvGraphvizDot(); if (ent == null) { result.add("The environment variable GRAPHVIZ_DOT has not been set"); } else { result.add("The environment variable GRAPHVIZ_DOT has been set to " + ent); } final File dotExe = GraphvizUtils.getDotExe(); result.add("Dot executable is " + dotExe); final ExeState exeState = ExeState.checkFile(dotExe); if (exeState == ExeState.OK) { try { final String version = GraphvizUtils.dotVersion(); result.add("Dot version: " + version); final int v = GraphvizUtils.getDotVersion(); if (v == -1) { result.add("Warning : cannot determine dot version"); } else if (v < DOT_VERSION_LIMIT) { result.add(bold + "Warning : Your dot installation seems old"); result.add(bold + "Some diagrams may have issues"); } else { final String err = getTestCreateSimpleFile(); if (err == null) { result.add(bold + "Installation seems OK. File generation OK"); } else { result.add(red + err); } } } catch (Exception e) { result.add(red + e.toString()); e.printStackTrace(); } } else { result.add(red + "Error: " + exeState.getTextMessage()); result.add("Error: only sequence diagrams will be generated"); } return Collections.unmodifiableList(result); } static String getTestCreateSimpleFile() throws IOException { final Graphviz graphviz2 = GraphvizUtils.create(null, "digraph foo { test; }", "svg"); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ProcessState state = graphviz2.createFile3(baos); if (state.differs(ProcessState.TERMINATED_OK())) { return "Error: timeout " + state; } final byte data[] = baos.toByteArray(); if (data.length == 0) { return "Error: dot generates empty file. Check you dot installation."; } final String s = new String(data); if (s.indexOf(" 0) { sb.append(' '); } sb.append(p.getError()); } return StringUtils.trin(sb.toString().replace('\n', ' ')); } private String[] getCommandLine() { return new String[] { dotExe.getAbsolutePath(), "-V" }; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizVersions.java000066400000000000000000000041611312650303100306300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.File; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; public class GraphvizVersions { private final static GraphvizVersions singleton = new GraphvizVersions(); private final Map map = new ConcurrentHashMap(); private GraphvizVersions() { } public static GraphvizVersions getInstance() { return singleton; } public GraphvizVersion getVersion(File f) { if (f == null) { return null; } GraphvizVersion result = map.get(f); if (result != null) { return result; } result = checkVersionSlow(f.getAbsolutePath()); map.put(f, result); return result; } static GraphvizVersion checkVersionSlow(String pathExecutable) { final GraphvizVersionFinder finder = new GraphvizVersionFinder(new File(pathExecutable)); return finder.getVersion(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizWindows.java000066400000000000000000000055371312650303100304620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.File; import java.io.FileFilter; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.StringUtils; class GraphvizWindows extends AbstractGraphviz { @Override protected File specificDotExe() { final File result = searchInDir(new File("c:/Program Files")); if (result != null) { return result; } final File result86 = searchInDir(new File("c:/Program Files (x86)")); if (result86 != null) { return result86; } final File resultEclipse = searchInDir(new File("c:/eclipse/graphviz")); if (resultEclipse != null) { return resultEclipse; } return null; } private static File searchInDir(final File programFile) { if (programFile.exists() == false || programFile.isDirectory() == false) { return null; } final List dots = new ArrayList(); for (File f : programFile.listFiles(new FileFilter() { public boolean accept(File pathname) { return pathname.isDirectory() && StringUtils.goLowerCase(pathname.getName()).startsWith("graphviz"); } })) { final File result = new File(new File(f, "bin"), "dot.exe"); if (result.exists() && result.canRead()) { dots.add(result.getAbsoluteFile()); } } return higherVersion(dots); } static File higherVersion(List dots) { if (dots.size() == 0) { return null; } Collections.sort(dots, Collections.reverseOrder()); return dots.get(0); } GraphvizWindows(ISkinParam skinParam, String dotString, String... type) { super(skinParam, dotString, type); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/Neighborhood.java000066400000000000000000000146761312650303100277300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.svek.Bibliotekon; import net.sourceforge.plantuml.svek.Line; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Neighborhood { private final ILeaf leaf; private final List sametailLinks; private final List allButSametails; public Neighborhood(ILeaf leaf, List sametailLinks, List all) { this.leaf = leaf; this.sametailLinks = sametailLinks; this.allButSametails = new ArrayList(all); allButSametails.removeAll(sametailLinks); } public void drawU(UGraphic ug, double minX, double minY, Bibliotekon bibliotekon, Dimension2D shapeDim) { final Set contactPoints = new HashSet(); for (Link link : sametailLinks) { final Line line = bibliotekon.getLine(link); final Point2D contact = line.getStartContactPoint(); contactPoints.add(contact); } final Rectangle2D rect = new Rectangle2D.Double(minX, minY, shapeDim.getWidth(), shapeDim.getHeight()); final Point2D center = new Point2D.Double(rect.getCenterX(), rect.getCenterY()); for (Point2D pt : contactPoints) { final Point2D inter = intersection(rect, center, pt); if (inter == null) { // System.err.println("rect=" + rect); // System.err.println("center=" + center); // System.err.println("pt=" + pt); assert false; continue; } final double theta = Math.atan2(center.getX() - pt.getX(), -(center.getY() - pt.getY())); final Point2D middle = drawExtends(ug, inter, theta); drawLine(ug, middle, pt); } for (Link link : allButSametails) { final Line line = bibliotekon.getLine(link); final Point2D contact = link.getEntity1() == leaf ? line.getStartContactPoint() : line.getEndContactPoint(); if (contact == null) { assert false; continue; } final Point2D inter = intersection(rect, center, contact); if (inter == null) { assert false; continue; } drawLine(ug, inter, contact); } } private Point2D drawExtends(UGraphic ug, Point2D contact, double theta) { final UPolygon poly = new UPolygon(); poly.addPoint(0, 0); poly.addPoint(7, 20); poly.addPoint(-7, 20); poly.rotate(theta); final UTranslate translate = new UTranslate(contact); ug.apply(translate).draw(poly); final Point2D p1 = translate.getTranslated(poly.getPoints().get(1)); final Point2D p2 = translate.getTranslated(poly.getPoints().get(2)); return new Point2D.Double((p1.getX() + p2.getX()) / 2, (p1.getY() + p2.getY()) / 2); } static Point2D intersection(Rectangle2D rect, Point2D pt1, Point2D pt2) { Point2D p; p = intersection(new Point2D.Double(rect.getMinX(), rect.getMinY()), new Point2D.Double(rect.getMaxX(), rect.getMinY()), pt1, pt2); if (p != null) { return p; } p = intersection(new Point2D.Double(rect.getMinX(), rect.getMaxY()), new Point2D.Double(rect.getMaxX(), rect.getMaxY()), pt1, pt2); if (p != null) { return p; } p = intersection(new Point2D.Double(rect.getMinX(), rect.getMinY()), new Point2D.Double(rect.getMinX(), rect.getMaxY()), pt1, pt2); if (p != null) { return p; } p = intersection(new Point2D.Double(rect.getMaxX(), rect.getMinY()), new Point2D.Double(rect.getMaxX(), rect.getMaxY()), pt1, pt2); if (p != null) { return p; } return null; } static private Point2D intersection(Point2D pt1, Point2D pt2, Point2D pt3, Point2D pt4) { // System.err.println("Checking intersection of " + pt1 + "-" + pt2 + " and " + pt3 + "-" + pt4); return intersection(pt1.getX(), pt1.getY(), pt2.getX(), pt2.getY(), pt3.getX(), pt3.getY(), pt4.getX(), pt4.getY()); } private static final double epsilon = .001; static private Point2D intersection(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) { final double d = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4); if (d == 0) { return null; } final double xi = ((x3 - x4) * (x1 * y2 - y1 * x2) - (x1 - x2) * (x3 * y4 - y3 * x4)) / d; final double yi = ((y3 - y4) * (x1 * y2 - y1 * x2) - (y1 - y2) * (x3 * y4 - y3 * x4)) / d; final Point2D.Double p = new Point2D.Double(xi, yi); if (xi + epsilon < Math.min(x1, x2) || xi - epsilon > Math.max(x1, x2)) { return null; } if (xi + epsilon < Math.min(x3, x4) || xi - epsilon > Math.max(x3, x4)) { return null; } if (yi + epsilon < Math.min(y1, y2) || yi - epsilon > Math.max(y1, y2)) { return null; } if (yi + epsilon < Math.min(y3, y4) || yi - epsilon > Math.max(y3, y4)) { return null; } return p; } private void drawLine(UGraphic ug, Point2D pt1, Point2D pt2) { drawLine(ug, pt1.getX(), pt1.getY(), pt2.getX(), pt2.getY()); } private void drawLine(UGraphic ug, double x1, double y1, double x2, double y2) { final ULine line = new ULine(x2 - x1, y2 - y1); ug.apply(new UTranslate(x1, y1)).draw(line); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/ProcessRunner.java000066400000000000000000000156711312650303100301250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.api.MyRunnable; import net.sourceforge.plantuml.api.TimeoutExecutor; public class ProcessRunner { private final String[] cmd; private String error; private String out; private volatile ProcessState state = ProcessState.INIT(); private final Lock changeState = new ReentrantLock(); public ProcessRunner(String[] cmd) { this.cmd = cmd; } public ProcessState run(byte in[], OutputStream redirection) { return run(in, redirection, null); } public ProcessState run(byte in[], OutputStream redirection, File dir) { if (this.state.differs(ProcessState.INIT())) { throw new IllegalStateException(); } this.state = ProcessState.RUNNING(); final MainThread mainThread = new MainThread(cmd, dir, redirection, in); try { // http://steveliles.github.io/invoking_processes_from_java.html final long timeoutMs = OptionFlags.getInstance().getTimeoutMs(); final boolean done = new TimeoutExecutor(timeoutMs).executeNow(mainThread); } finally { changeState.lock(); try { if (state.equals(ProcessState.RUNNING())) { state = ProcessState.TIMEOUT(); // mainThread.cancel(); } } finally { changeState.unlock(); } } if (state.equals(ProcessState.TERMINATED_OK())) { assert mainThread != null; this.error = mainThread.getError(); this.out = mainThread.getOut(); } return state; } class MainThread implements MyRunnable { private final String[] cmd; private final File dir; private final OutputStream redirection; private final byte[] in; private volatile Process process; private volatile ThreadStream errorStream; private volatile ThreadStream outStream; public MainThread(String[] cmd, File dir, OutputStream redirection, byte[] in) { this.cmd = cmd; this.dir = dir; this.redirection = redirection; this.in = in; } public String getOut() { return outStream.getString(); } public String getError() { return errorStream.getString(); } public void runJob() throws InterruptedException { try { startThreads(); if (state.equals(ProcessState.RUNNING())) { final int result = joinInternal(); } } finally { changeState.lock(); try { if (state.equals(ProcessState.RUNNING())) { state = ProcessState.TERMINATED_OK(); } } finally { changeState.unlock(); } if (process != null) { process.destroy(); close(process.getErrorStream()); close(process.getOutputStream()); close(process.getInputStream()); } } } public void cancelJob() { // The changeState lock is ok // assert changeState.tryLock(); // assert state == ProcessState.TIMEOUT; if (process != null) { errorStream.cancel(); outStream.cancel(); process.destroy(); // interrupt(); close(process.getErrorStream()); close(process.getOutputStream()); close(process.getInputStream()); } } private void startThreads() { try { process = Runtime.getRuntime().exec(cmd, null, dir); } catch (IOException e) { e.printStackTrace(); changeState.lock(); try { state = ProcessState.IO_EXCEPTION1(e); } finally { changeState.unlock(); } e.printStackTrace(); return; } errorStream = new ThreadStream(process.getErrorStream(), null); outStream = new ThreadStream(process.getInputStream(), redirection); errorStream.start(); outStream.start(); if (in != null) { final OutputStream os = process.getOutputStream(); try { try { os.write(in); } finally { os.close(); } } catch (IOException e) { changeState.lock(); try { state = ProcessState.IO_EXCEPTION2(e); } finally { changeState.unlock(); } e.printStackTrace(); } } } public int joinInternal() throws InterruptedException { errorStream.join(); outStream.join(); final int result = process.waitFor(); return result; } } class ThreadStream extends Thread { private volatile InputStream streamToRead; private volatile OutputStream redirection; private volatile StringBuffer sb = new StringBuffer(); ThreadStream(InputStream streamToRead, OutputStream redirection) { this.streamToRead = streamToRead; this.redirection = redirection; } public String getString() { if (sb == null) { return ""; } return sb.toString(); } public void cancel() { assert state.equals(ProcessState.TIMEOUT()) || state.equals(ProcessState.RUNNING()) : state; this.interrupt(); sb = null; streamToRead = null; redirection = null; // Because of this, some NPE may occurs in run() method, but we do not care } @Override public void run() { int read = 0; try { while ((read = streamToRead.read()) != -1) { if (state.equals(ProcessState.TIMEOUT())) { return; } if (redirection == null) { sb.append((char) read); } else { redirection.write(read); } } } catch (Throwable e) { System.err.println("ProcessRunnerA " + e); e.printStackTrace(); sb.append('\n'); sb.append(e.toString()); } } } public final String getError() { return error; } public final String getOut() { return out; } private void close(InputStream is) { try { if (is != null) { is.close(); } } catch (IOException e) { e.printStackTrace(); } } private void close(OutputStream os) { try { if (os != null) { os.close(); } } catch (IOException e) { e.printStackTrace(); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/dot/ProcessState.java000066400000000000000000000053621312650303100277300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.IOException; public class ProcessState { private final String name; private final IOException cause; private ProcessState(String name, IOException cause) { this.name = name; this.cause = cause; } @Override public String toString() { if (cause == null) { return name; } return name + " " + cause.toString(); } private final static ProcessState INIT = new ProcessState("INIT", null); private final static ProcessState RUNNING = new ProcessState("RUNNING", null); private final static ProcessState TERMINATED_OK = new ProcessState("TERMINATED_OK", null); private final static ProcessState TIMEOUT = new ProcessState("TIMEOUT", null); // INIT, RUNNING, TERMINATED_OK, TIMEOUT, IO_EXCEPTION1, IO_EXCEPTION2; public static ProcessState INIT() { return INIT; } public static ProcessState RUNNING() { return RUNNING; } public static ProcessState TERMINATED_OK() { return TERMINATED_OK; } public static ProcessState TIMEOUT() { return TIMEOUT; } public static ProcessState IO_EXCEPTION1(IOException e) { return new ProcessState("IO_EXCEPTION1", e); } public static ProcessState IO_EXCEPTION2(IOException e) { return new ProcessState("IO_EXCEPTION2", e); } public boolean differs(ProcessState other) { return name.equals(other.name) == false; } @Override public boolean equals(Object o) { final ProcessState other = (ProcessState) o; return name.equals(other.name); } public Throwable getCause() { return cause; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/entity/000077500000000000000000000000001312650303100251665ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/entity/EntityFactory.java000066400000000000000000000160761312650303100306470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.entity; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.cucadiagram.Bodier; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupRoot; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LongCode; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.skin.VisibilityModifier; public class EntityFactory { private final Map leafs = new Protect(new LinkedHashMap()); private final List links = new ArrayList(); private final Map groups = new Protect(new LinkedHashMap()); private int rawLayout; private final IGroup rootGroup = new GroupRoot(this); private final Set hiddenTypes; private final Set hiddenStereotype; public EntityFactory(Set hiddenTypes, Set hiddenStereotype) { this.hiddenTypes = hiddenTypes; this.hiddenStereotype = hiddenStereotype; } public boolean isHidden(ILeaf leaf) { if (hiddenTypes.contains(leaf.getLeafType())) { return true; } final Stereotype stereotype = leaf.getStereotype(); if (stereotype != null && hiddenStereotype.contains(stereotype.getLabel(false))) { return true; } return false; } public ILeaf createLeaf(Code code, Display display, LeafType entityType, IGroup parentContainer, Set hides, String namespaceSeparator) { if (entityType == null) { throw new IllegalArgumentException(); } final Bodier bodier = new Bodier(entityType, hides); final LongCode longCode = getLongCode(code, namespaceSeparator); final EntityImpl result = new EntityImpl(this, code, bodier, parentContainer, entityType, longCode, namespaceSeparator, rawLayout); result.setDisplay(display); return result; } private LongCode getLongCode(Code code, String namespaceSeparator) { final LongCode result = LongCode.of(code.getFullName(), namespaceSeparator); // if (result.toString().equals(code.toString()) == false) { // System.err.println("result=" + result); // System.err.println(" code =" + code); // throw new UnsupportedOperationException(); // } return result; } public IGroup createGroup(Code code, Display display, Code namespace2, GroupType groupType, IGroup parentContainer, Set hides, String namespaceSeparator) { if (groupType == null) { throw new IllegalArgumentException(); } final Bodier bodier = new Bodier(null, hides); final LongCode longCode = getLongCode(code, namespaceSeparator); final EntityImpl result = new EntityImpl(this, code, bodier, parentContainer, groupType, namespace2, longCode, namespaceSeparator, rawLayout); if (Display.isNull(display) == false) { result.setDisplay(display); } return result; } public IGroup getRootGroup() { return rootGroup; } public final Map getLeafs() { return Collections.unmodifiableMap(leafs); } public void addLeaf(ILeaf entity) { leafs.put(entity.getCode(), entity); } public void incRawLayout() { rawLayout++; } void removeLeaf(Code code) { final IEntity removed = leafs.remove(code); if (removed == null) { throw new IllegalArgumentException(); } } public void addGroup(IGroup group) { groups.put(group.getCode(), group); } void removeGroup(Code code) { final IEntity removed = groups.remove(code); if (removed == null) { throw new IllegalArgumentException(); } } public final Map getGroups() { return Collections.unmodifiableMap(groups); } public final List getLinks() { return Collections.unmodifiableList(links); } public void addLink(Link link) { links.add(link); } public void removeLink(Link link) { final boolean ok = links.remove(link); if (ok == false) { throw new IllegalArgumentException(); } } public IGroup muteToGroup(Code code, Code namespace2, GroupType type, IGroup parent) { final ILeaf leaf = getLeafs().get(code); ((EntityImpl) leaf).muteToGroup(namespace2, type, parent); final IGroup result = (IGroup) leaf; removeLeaf(code); return result; } static class Protect implements Map { private final Map m; public Protect(Map data) { this.m = data; } public O remove(Object key) { if (key instanceof Code == false) { throw new IllegalArgumentException(); } return m.remove(key); } public O get(Object key) { if (key instanceof Code == false) { throw new IllegalArgumentException(); } return m.get(key); } public Set keySet() { return m.keySet(); } public void putAll(Map m) { this.m.putAll(m); } public boolean containsKey(Object key) { if (key instanceof Code == false) { throw new IllegalArgumentException(); } return m.containsKey(key); } public boolean isEmpty() { return m.isEmpty(); } public O put(Code key, O value) { if (key instanceof Code == false) { throw new IllegalArgumentException(); } return m.put(key, value); } public boolean containsValue(Object value) { return m.containsValue(value); } public Set> entrySet() { return m.entrySet(); } public Collection values() { return m.values(); } public void clear() { m.clear(); } public int size() { return m.size(); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cucadiagram/entity/EntityImpl.java000066400000000000000000000363101312650303100301320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cucadiagram.entity; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cucadiagram.Bodier; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityPosition; import net.sourceforge.plantuml.cucadiagram.EntityUtils; import net.sourceforge.plantuml.cucadiagram.GroupRoot; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LongCode; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.dot.Neighborhood; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.skin.VisibilityModifier; import net.sourceforge.plantuml.svek.IEntityImage; import net.sourceforge.plantuml.svek.PackageStyle; import net.sourceforge.plantuml.svek.SingleStrategy; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.utils.UniqueSequence; final class EntityImpl implements ILeaf, IGroup { private final EntityFactory entityFactory; // Entity private final Code code; private final LongCode longCode; private Url url; private final Bodier bodier; private final String uid = StringUtils.getUid("cl", UniqueSequence.getValue()); private Display display = Display.empty(); private LeafType leafType; private Stereotype stereotype; private String generic; private IGroup parentContainer; private boolean top; // Group private Code namespace2; private GroupType groupType; // Other private boolean nearDecoration = false; private final Collection portShortNames = new HashSet(); private int xposition; private IEntityImage svekImage; private boolean removed = false; private USymbol symbol; private final int rawLayout; private char concurrentSeparator; // Back to Entity public final boolean isTop() { checkNotGroup(); return top; } public final void setTop(boolean top) { checkNotGroup(); this.top = top; } private EntityImpl(EntityFactory entityFactory, Code code, Bodier bodier, IGroup parentContainer, LongCode longCode, String namespaceSeparator, int rawLayout) { if (code == null) { throw new IllegalArgumentException(); } this.entityFactory = entityFactory; this.bodier = bodier; this.code = code; this.parentContainer = parentContainer; this.longCode = longCode; this.rawLayout = rawLayout; } EntityImpl(EntityFactory entityFactory, Code code, Bodier bodier, IGroup parentContainer, LeafType leafType, LongCode longCode, String namespaceSeparator, int rawLayout) { this(entityFactory, code, bodier, parentContainer, longCode, namespaceSeparator, rawLayout); this.leafType = leafType; } EntityImpl(EntityFactory entityFactory, Code code, Bodier bodier, IGroup parentContainer, GroupType groupType, Code namespace2, LongCode longCode, String namespaceSeparator, int rawLayout) { this(entityFactory, code, bodier, parentContainer, longCode, namespaceSeparator, rawLayout); this.groupType = groupType; this.namespace2 = namespace2; } public void setContainer(IGroup container) { checkNotGroup(); if (container == null) { throw new IllegalArgumentException(); } this.parentContainer = container; } public LeafType getLeafType() { return leafType; } public boolean muteToType(LeafType newType, USymbol newSymbol) { checkNotGroup(); if (newType == null) { throw new IllegalArgumentException(); } if (leafType != LeafType.STILL_UNKNOWN) { if (leafType != LeafType.ANNOTATION && leafType != LeafType.ABSTRACT_CLASS && leafType != LeafType.CLASS && leafType != LeafType.ENUM && leafType != LeafType.INTERFACE) { return false; // throw new IllegalArgumentException("type=" + leafType); } if (newType != LeafType.ANNOTATION && newType != LeafType.ABSTRACT_CLASS && newType != LeafType.CLASS && newType != LeafType.ENUM && newType != LeafType.INTERFACE && newType != LeafType.OBJECT) { return false; // throw new IllegalArgumentException("newtype=" + newType); } } if (leafType == LeafType.CLASS && newType == LeafType.OBJECT) { bodier.muteClassToObject(); } this.leafType = newType; this.symbol = newSymbol; return true; } public Code getCode() { return code; } public Display getDisplay() { return display; } public void setDisplay(Display display) { this.display = display; } public String getUid() { return uid; } public Stereotype getStereotype() { return stereotype; } public final void setStereotype(Stereotype stereotype) { this.stereotype = stereotype; } public final IGroup getParentContainer() { if (parentContainer == null) { throw new IllegalArgumentException(); } return parentContainer; } @Override public String toString() { return code + " " + display + "(" + leafType + ") " + xposition + " " + getUid(); } public final Url getUrl99() { return url; } public boolean hasUrl() { if (Display.isNull(display) == false && display.hasUrl()) { return true; } if (bodier.hasUrl()) { return true; } return url != null; } public final void addUrl(Url url) { this.url = url; } public final boolean hasNearDecoration() { checkNotGroup(); return nearDecoration; } public final void setNearDecoration(boolean nearDecoration) { // checkNotGroup(); this.nearDecoration = nearDecoration; } public int getXposition() { checkNotGroup(); return xposition; } public void setXposition(int pos) { checkNotGroup(); xposition = pos; } public final IEntityImage getSvekImage() { checkNotGroup(); return svekImage; } public final void setSvekImage(IEntityImage svekImage) { checkNotGroup(); this.svekImage = svekImage; } public final void setGeneric(String generic) { checkNotGroup(); this.generic = generic; } public final String getGeneric() { checkNotGroup(); return generic; } public Bodier getBodier() { return bodier; } public EntityPosition getEntityPosition() { checkNotGroup(); if (leafType != LeafType.STATE) { return EntityPosition.NORMAL; } if (getParentContainer() instanceof GroupRoot) { return EntityPosition.NORMAL; } final Stereotype stereotype = getStereotype(); if (stereotype == null) { return EntityPosition.NORMAL; } return EntityPosition.fromStereotype(stereotype.getLabel(false)); } // ---------- private void checkGroup() { if (isGroup() == false) { throw new UnsupportedOperationException(); } } private void checkNotGroup() { if (isGroup()) { throw new UnsupportedOperationException(); } } public boolean containsLeafRecurse(ILeaf leaf) { if (leaf == null) { throw new IllegalArgumentException(); } if (leaf.isGroup()) { throw new IllegalArgumentException(); } checkGroup(); if (leaf.getParentContainer() == this) { return true; } for (IGroup child : getChildren()) { if (child.containsLeafRecurse(leaf)) { return true; } } return false; } public Collection getLeafsDirect() { checkGroup(); final List result = new ArrayList(); for (ILeaf ent : entityFactory.getLeafs().values()) { if (ent.isGroup()) { throw new IllegalStateException(); } if (ent.getParentContainer() == this) { result.add(ent); } } return Collections.unmodifiableCollection(result); } public Collection getChildren() { checkGroup(); final Collection result = new ArrayList(); for (IGroup g : entityFactory.getGroups().values()) { if (g != this && g.getParentContainer() == this) { result.add(g); } } return Collections.unmodifiableCollection(result); } public void moveEntitiesTo(IGroup dest) { checkGroup(); if (dest.isGroup() == false) { throw new UnsupportedOperationException(); } for (ILeaf ent : getLeafsDirect()) { ((EntityImpl) ent).parentContainer = dest; } for (IGroup g : dest.getChildren()) { // ((EntityImpl) g).parentContainer = dest; throw new IllegalStateException(); } for (IGroup g : getChildren()) { if (g == dest) { continue; } ((EntityImpl) g).parentContainer = dest; } } public int size() { checkGroup(); return getLeafsDirect().size(); } public GroupType getGroupType() { checkGroup(); return groupType; } public Code getNamespace2() { checkGroup(); return namespace2; } public PackageStyle getPackageStyle() { checkGroup(); if (stereotype == null) { return null; } return stereotype.getPackageStyle(); } public boolean isGroup() { if (groupType != null && leafType != null) { throw new IllegalStateException(); } if (groupType != null) { return true; } if (leafType != null) { return false; } throw new IllegalStateException(); } // ---- other public void overrideImage(IEntityImage img, LeafType leafType) { checkGroup(); this.svekImage = img; this.url = null; for (final Link link : new ArrayList(entityFactory.getLinks())) { if (EntityUtils.isPureInnerLink12(this, link)) { entityFactory.removeLink(link); } } entityFactory.removeGroup(this.getCode()); for (ILeaf ent : new ArrayList(entityFactory.getLeafs().values())) { if (this != ent && this == ent.getParentContainer()) { entityFactory.removeLeaf(ent.getCode()); } } entityFactory.addLeaf(this); this.groupType = null; this.leafType = leafType; } void muteToGroup(Code namespace2, GroupType groupType, IGroup parentContainer) { checkNotGroup(); if (parentContainer.isGroup() == false) { throw new IllegalArgumentException(); } this.namespace2 = namespace2; this.groupType = groupType; this.leafType = null; this.parentContainer = parentContainer; } public boolean isHidden() { if (entityFactory.isHidden(this)) { return true; } if (stereotype != null) { return stereotype.isHidden(); } return false; } public USymbol getUSymbol() { if (getLeafType() == LeafType.CIRCLE) { return USymbol.INTERFACE; } if (symbol != null && stereotype != null && stereotype.getSprite() != null) { return symbol.withStereoAlignment(HorizontalAlignment.RIGHT); } return symbol; } public void setUSymbol(USymbol symbol) { this.symbol = symbol; } public SingleStrategy getSingleStrategy() { return SingleStrategy.SQUARRE; } public boolean isRemoved() { if (isGroup()) { if (removed) { return true; } if (getLeafsDirect().size() == 0) { return false; } for (ILeaf leaf : getLeafsDirect()) { if (leaf.isRemoved() == false) { return false; } } for (IGroup g : getChildren()) { if (g.isRemoved() == false) { return false; } } return true; } return removed; } public void setRemoved(boolean removed) { this.removed = removed; } private int layer; public int getHectorLayer() { return layer; } public void setHectorLayer(int layer) { this.layer = layer; if (layer > 1000) { throw new IllegalArgumentException(); } } public LongCode getLongCode() { return longCode; } private FontParam getTitleFontParam() { if (symbol != null) { return symbol.getFontParam(); } return getGroupType() == GroupType.STATE ? FontParam.STATE : FontParam.PACKAGE; } public FontConfiguration getFontConfigurationForTitle(final ISkinParam skinParam) { final FontParam fontParam = getTitleFontParam(); final HtmlColor fontHtmlColor = skinParam.getFontHtmlColor(getStereotype(), fontParam, FontParam.PACKAGE); final UFont font = skinParam.getFont(getStereotype(), true, fontParam, FontParam.PACKAGE); final FontConfiguration fontConfiguration = new FontConfiguration(font, fontHtmlColor, skinParam.getHyperlinkColor(), skinParam.useUnderlineForHyperlink(), skinParam.getTabSize()); return fontConfiguration; } public final int getRawLayout() { return rawLayout; } public char getConcurrentSeparator() { return concurrentSeparator; } public void setConcurrentSeparator(char separator) { this.concurrentSeparator = separator; } private Neighborhood neighborhood; public void setNeighborhood(Neighborhood neighborhood) { this.neighborhood = neighborhood; } public Neighborhood getNeighborhood() { return neighborhood; } private final Map tips = new LinkedHashMap(); public void putTip(String member, Display display) { tips.put(member, display); } public Map getTips() { return Collections.unmodifiableMap(tips); } private Colors colors = Colors.empty(); public Colors getColors(ISkinParam skinParam) { return colors; } public void setColors(Colors colors) { this.colors = colors; } public void setSpecificColorTOBEREMOVED(ColorType type, HtmlColor color) { if (color != null) { this.colors = colors.add(type, color); } } // public void setSpecificLineStroke(UStroke specificLineStroke) { // colors = colors.addSpecificLineStroke(specificLineStroke); // } public Collection getPortShortNames() { checkNotGroup(); return Collections.unmodifiableCollection(portShortNames); } public void addPortShortName(String portShortName) { portShortNames.add(portShortName); } private VisibilityModifier visibility; public void setVisibilityModifier(VisibilityModifier visibility) { this.visibility = visibility; } public VisibilityModifier getVisibilityModifier() { return visibility; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/000077500000000000000000000000001312650303100223525ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/ApolloniusSolver.java000066400000000000000000000063031312650303100265370ustar00rootroot00000000000000package net.sourceforge.plantuml.cute; // http://rosettacode.org/wiki/Problem_of_Apollonius#Java public class ApolloniusSolver { static class Circle { public double[] center; public double radius; public Circle(double[] center, double radius) { this.center = center; this.radius = radius; } public String toString() { return String.format("Circle[x=%.2f,y=%.2f,r=%.2f]", center[0], center[1], radius); } } /** * Solves the Problem of Apollonius (finding a circle tangent to three other circles in the plane). The method uses * approximately 68 heavy operations (multiplication, division, square-roots). * * @param c1 * One of the circles in the problem * @param c2 * One of the circles in the problem * @param c3 * One of the circles in the problem * @param s1 * An indication if the solution should be externally or internally tangent (+1/-1) to c1 * @param s2 * An indication if the solution should be externally or internally tangent (+1/-1) to c2 * @param s3 * An indication if the solution should be externally or internally tangent (+1/-1) to c3 * @return The circle that is tangent to c1, c2 and c3. */ public static Circle solveApollonius(Circle c1, Circle c2, Circle c3, int s1, int s2, int s3) { double x1 = c1.center[0]; double y1 = c1.center[1]; double r1 = c1.radius; double x2 = c2.center[0]; double y2 = c2.center[1]; double r2 = c2.radius; double x3 = c3.center[0]; double y3 = c3.center[1]; double r3 = c3.radius; // Currently optimized for fewest multiplications. Should be optimized for // readability double v11 = 2 * x2 - 2 * x1; double v12 = 2 * y2 - 2 * y1; double v13 = x1 * x1 - x2 * x2 + y1 * y1 - y2 * y2 - r1 * r1 + r2 * r2; double v14 = 2 * s2 * r2 - 2 * s1 * r1; double v21 = 2 * x3 - 2 * x2; double v22 = 2 * y3 - 2 * y2; double v23 = x2 * x2 - x3 * x3 + y2 * y2 - y3 * y3 - r2 * r2 + r3 * r3; double v24 = 2 * s3 * r3 - 2 * s2 * r2; double w12 = v12 / v11; double w13 = v13 / v11; double w14 = v14 / v11; double w22 = v22 / v21 - w12; double w23 = v23 / v21 - w13; double w24 = v24 / v21 - w14; double P = -w23 / w22; double Q = w24 / w22; double M = -w12 * P - w13; double N = w14 - w12 * Q; double a = N * N + Q * Q - 1; double b = 2 * M * N - 2 * N * x1 + 2 * P * Q - 2 * Q * y1 + 2 * s1 * r1; double c = x1 * x1 + M * M - 2 * M * x1 + P * P + y1 * y1 - 2 * P * y1 - r1 * r1; // Find a root of a quadratic equation. This requires the circle centers not // to be e.g. colinear double D = b * b - 4 * a * c; double rs = (-b - Math.sqrt(D)) / (2 * a); double xs = M + N * rs; double ys = P + Q * rs; return new Circle(new double[] { xs, ys }, rs); } public static void main(final String[] args) { Circle c1 = new Circle(new double[] { 0, 0 }, 1); Circle c2 = new Circle(new double[] { 4, 0 }, 1); Circle c3 = new Circle(new double[] { 2, 4 }, 2); // Expects "Circle[x=2.00,y=2.10,r=3.90]" (green circle in image) System.out.println(solveApollonius(c1, c2, c3, 1, 1, 1)); // Expects "Circle[x=2.00,y=0.83,r=1.17]" (red circle in image) System.out.println(solveApollonius(c1, c2, c3, -1, -1, -1)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/ApolloniusSolver2.java000066400000000000000000000050611312650303100266210ustar00rootroot00000000000000package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; // http://rosettacode.org/wiki/Problem_of_Apollonius#Java public class ApolloniusSolver2 { /** * Solves the Problem of Apollonius (finding a circle tangent to three other circles in the plane). The method uses * approximately 68 heavy operations (multiplication, division, square-roots). * * @param c1 * One of the circles in the problem * @param c2 * One of the circles in the problem * @param c3 * One of the circles in the problem * @param s1 * An indication if the solution should be externally or internally tangent (+1/-1) to c1 * @param s2 * An indication if the solution should be externally or internally tangent (+1/-1) to c2 * @param s3 * An indication if the solution should be externally or internally tangent (+1/-1) to c3 * @return The circle that is tangent to c1, c2 and c3. */ public static Balloon solveApollonius(Balloon c1, Balloon c2, Balloon c3, int s1, int s2, int s3) { double x1 = c1.getCenter().getX(); double y1 = c1.getCenter().getY(); double r1 = c1.getRadius(); double x2 = c2.getCenter().getX(); double y2 = c2.getCenter().getY(); double r2 = c2.getRadius(); double x3 = c3.getCenter().getX(); double y3 = c3.getCenter().getY(); double r3 = c3.getRadius(); // Currently optimized for fewest multiplications. Should be optimized for // readability double v11 = 2 * x2 - 2 * x1; double v12 = 2 * y2 - 2 * y1; double v13 = x1 * x1 - x2 * x2 + y1 * y1 - y2 * y2 - r1 * r1 + r2 * r2; double v14 = 2 * s2 * r2 - 2 * s1 * r1; double v21 = 2 * x3 - 2 * x2; double v22 = 2 * y3 - 2 * y2; double v23 = x2 * x2 - x3 * x3 + y2 * y2 - y3 * y3 - r2 * r2 + r3 * r3; double v24 = 2 * s3 * r3 - 2 * s2 * r2; double w12 = v12 / v11; double w13 = v13 / v11; double w14 = v14 / v11; double w22 = v22 / v21 - w12; double w23 = v23 / v21 - w13; double w24 = v24 / v21 - w14; double P = -w23 / w22; double Q = w24 / w22; double M = -w12 * P - w13; double N = w14 - w12 * Q; double a = N * N + Q * Q - 1; double b = 2 * M * N - 2 * N * x1 + 2 * P * Q - 2 * Q * y1 + 2 * s1 * r1; double c = x1 * x1 + M * M - 2 * M * x1 + P * P + y1 * y1 - 2 * P * y1 - r1 * r1; // Find a root of a quadratic equation. This requires the circle centers not // to be e.g. colinear double D = b * b - 4 * a * c; double rs = (-b - Math.sqrt(D)) / (2 * a); double xs = M + N * rs; double ys = P + Q * rs; return new Balloon(new Point2D.Double(xs, ys), rs); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/Arc.java000066400000000000000000000056741312650303100237360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; public class Arc { private final Segment segment; private final Tension tension; public Tension getTension() { return tension; } public Arc(final MyPoint2D a, final MyPoint2D b) { this(a, b, Tension.none()); } private Arc(final MyPoint2D a, final MyPoint2D b, Tension tension) { this.segment = new Segment(a, b); this.tension = tension; } public MyPoint2D getA() { return (MyPoint2D) segment.getA(); } public MyPoint2D getB() { return (MyPoint2D) segment.getB(); } public Arc withNoTension() { return new Arc(getA(), getB(), Tension.none()); } public Arc withTension(String tensionString) { if (tensionString == null) { return this; } final double newTension = Double.parseDouble(tensionString); return new Arc(getA(), getB(), new Tension(newTension)); } public Arc rotateZoom(RotationZoom rotationZoom) { return new Arc(getA().rotateZoom(rotationZoom), getB().rotateZoom(rotationZoom), tension.rotateZoom(rotationZoom)); } // public void appendTo(UPath path) { // if (tension.isNone()) { // path.lineTo(getB()); // } else { // final double a = segment.getLength() / 2; // final double b = getTension().getValue(); // final double radius = (a * a + b * b) / 2 / b; // final int sweep_flag = 1; // path.arcTo(getB(), radius, 0, sweep_flag); // } // } public Point2D getTensionPoint() { if (tension.isNone()) { throw new IllegalArgumentException(); } return segment.getOrthoPoint(-tension.getValue()); } // public void appendTo(UPath path) { // if (path.isEmpty()) { // path.moveTo(getA()); // } // path.lineTo(getB()); // } public double getLength() { return segment.getLength(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/Balloon.java000066400000000000000000000077331312650303100246150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Balloon implements UDrawable { private final Point2D center; private final double radius; public Balloon(Point2D center, double radius) { if (radius < 0) { throw new IllegalArgumentException(); } this.center = center; this.radius = radius; } public static Balloon fromRadiusSegment(Segment centerToContact) { throw new UnsupportedOperationException(); } public Point2D getPointOnCircle(double a) { return new Point2D.Double(center.getX() + radius * Math.cos(a), center.getY() + radius * Math.sin(a)); } public Segment getSegmentCenterToPointOnCircle(double a) { return new Segment(center, getPointOnCircle(a)); } public Balloon translate(UTranslate translate) { return new Balloon(translate.getTranslated(center), radius); } public Balloon rotate(RotationZoom rotationZoom) { return new Balloon(rotationZoom.getPoint(center), rotationZoom.applyZoom(radius)); } @Override public String toString() { return "Balloon(" + center + "," + radius + ")"; } public Point2D getCenter() { return center; } public double getRadius() { return radius; } public void drawU(UGraphic ug) { UEllipse circle = new UEllipse(2 * radius, 2 * radius); ug.apply(new UTranslate(center.getX() - circle.getWidth() / 2, center.getY() - circle.getHeight() / 2)).draw( circle); } public Balloon getInsideTangentBalloon1(double angle, double curvation) { final double f = radius - curvation; final double e = (radius * radius - f * f) / 2 / radius; final RotationZoom rotation = RotationZoom.rotationInRadians(angle); final Point2D p1 = rotation.getPoint(f, e); final Point2D newCenter = new Point2D.Double(center.getX() + p1.getX(), center.getY() + p1.getY()); return new Balloon(newCenter, e); } public Balloon getInsideTangentBalloon2(double angle, double curvation) { final double f = radius - curvation; final double e = (radius * radius - f * f) / 2 / radius; final RotationZoom rotation = RotationZoom.rotationInRadians(angle); final Point2D p1 = rotation.getPoint(f, -e); final Point2D newCenter = new Point2D.Double(center.getX() + p1.getX(), center.getY() + p1.getY()); return new Balloon(newCenter, e); } public Point2D getPointOnCirclePassingByThisPoint(Point2D passingBy) { final Segment seg = new Segment(center, passingBy); return seg.getFromAtoB(radius); } public Point2D getPointOnCircleOppositeToThisPoint(Point2D passingBy) { final Segment seg = new Segment(center, passingBy); return seg.getFromAtoB(-radius); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/BetweenCorners.java000066400000000000000000000123271312650303100261470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPath; public class BetweenCorners { private final TriangleCorner corner1; private final TriangleCorner corner2; private final Tension tension; private Balloon inside1; private Balloon inside2; private Balloon contact; private Balloon apo; private Point2D apopt1; private Point2D apopt2; public BetweenCorners(TriangleCorner corner1, TriangleCorner corner2, Tension tension) { this.corner1 = corner1; this.corner2 = corner2; this.tension = tension; if (corner1.hasCurvation()) { inside1 = corner1.getBalloonInside(); } if (corner2.hasCurvation()) { inside2 = corner2.getBalloonInside(); } if (tension.isNone() == false) { contact = new Balloon(getTensionPoint(), getLength() / 1000.0); } if (inside1 != null && inside2 != null && contact != null) { apo = ApolloniusSolver2.solveApollonius(inside1, inside2, contact, 1, 1, 1); apopt1 = apo.getPointOnCirclePassingByThisPoint(inside1.getCenter()); apopt2 = apo.getPointOnCirclePassingByThisPoint(inside2.getCenter()); } } public Point2D getPointJ() { if (getCorner1().hasCurvation() == false) { return getCorner1().getO(); } if (tension.isNone()) { return getCorner1().getOnSegmentA(getCorner1().getCurvation()); } throw new UnsupportedOperationException(); } public Point2D getPointK() { if (getCorner1().hasCurvation() == false) { return getCorner1().getO(); } if (tension.isNone()) { return getCorner1().getOnSegmentB(getCorner1().getCurvation()); } throw new UnsupportedOperationException(); } private double getBalloonRadius() { return getCorner1().getBalloonInside().getRadius(); } public void initPath(UPath path) { if (apo != null) { path.moveTo(apopt2); } else { path.moveTo(getPointK()); } } public void addToPath(UPath path, int swepFlag) { if (apo != null) { path.arcTo(apopt1, getCorner1().getBalloonInside().getRadius(), 0, 1); path.arcTo(apopt2, apo.getRadius(), 0, 1); // } else if (getTension().isNone()) { // path.lineTo(getPointJ()); // if (getCorner2().hasCurvation()) { // path.arcTo(getPointK(), getBalloonRadius(), 0, swepFlag); // } // } else { // // final int sweep_flag = 1; // path.arcTo(getPointJ(), getRadiusFuzzy1(), 0, swepFlag); // if (getCorner2().hasCurvation()) { // path.arcTo(getPointK(), getBalloonRadius(), 0, swepFlag); // } // } } else { path.lineTo(getPointJ()); if (getCorner1().hasCurvation()) { path.arcTo(getPointK(), getBalloonRadius(), 0, swepFlag); } } } public void debugMe(UGraphic ug) { if (getCorner2().hasCurvation() == false) { return; } if (tension.isNone()) { return; } inside1.drawU(ug); inside2.drawU(ug); // getSegment().debugMe(ug); contact.drawU(ug); new Balloon(apopt1, 5).drawU(ug); new Balloon(apopt2, 5).drawU(ug); // getSegmentCross().debugMe(ug); apo.drawU(ug); // // final Point2D newCenter = getSegmentCross().getOrthoPoint(-50); // new Segment(newCenter, getCorner1().getBalloonInside().getCenter()).debugMe(ug); // new Segment(newCenter, getCorner2().getBalloonInside().getCenter()).debugMe(ug); } private double getRadiusFuzzy1() { final double a = getLength() / 2; final double b = getTension().getValue(); final double radius = (a * a + b * b) / 2 / b; return radius; } private Segment getSegment() { return new Segment(getCorner1().getO(), getCorner2().getO()); } private Point2D getTensionPoint() { return getSegment().getOrthoPoint(getTension().getValue()); } private Segment getSegmentCross() { return new Segment(getCorner1().getCornerOrBalloonCenter(), getCorner2().getCornerOrBalloonCenter()); } public Tension getTension() { return tension; } public TriangleCorner getCorner1() { return corner1; } public TriangleCorner getCorner2() { return corner2; } public double getLength() { return getSegment().getLength(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/Cheese.java000066400000000000000000000110401312650303100244050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPath; public class Cheese implements CuteShape { private final MyDouble radius; private final MyDouble startAngle; private final MyDouble endAngle; private final RotationZoom rotationZoom; public Cheese(VarArgs varArgs) { this.radius = varArgs.getAsMyDouble("radius"); this.startAngle = varArgs.getAsMyDouble("start").toRadians(); this.endAngle = varArgs.getAsMyDouble("end").toRadians(); this.rotationZoom = RotationZoom.none(); } public Cheese(MyDouble radius, MyDouble startAngle, MyDouble endAngle, RotationZoom rotation) { this.radius = radius; this.startAngle = startAngle; this.endAngle = endAngle; this.rotationZoom = rotation; } public void drawU(UGraphic ug) { final Balloon balloon = new Balloon(new Point2D.Double(), radius.getValue()) .rotate(rotationZoom); final double angle1 = rotationZoom.applyRotation(startAngle.getValue()); final double angle2 = rotationZoom.applyRotation(endAngle.getValue()); final Point2D ptA = balloon.getPointOnCircle(angle1); final Point2D ptB = balloon.getPointOnCircle(angle2); // balloon.drawU(ug.apply(new UChangeBackColor(null)).apply(new UChangeColor(HtmlColorUtils.BLACK))); final UPath path = new UPath(); final Point2D ptA0; if (radius.hasCurvation()) { ptA0 = balloon.getSegmentCenterToPointOnCircle(angle1).getFromAtoB(radius.getCurvation(0)); path.moveTo(ptA0); } else { ptA0 = null; path.moveTo(balloon.getCenter()); } final Balloon insideA; if (startAngle.hasCurvation()) { insideA = balloon.getInsideTangentBalloon1(angle1, startAngle.getCurvation(0)); final Point2D ptA1 = balloon.getSegmentCenterToPointOnCircle(angle1).getFromAtoB( radius.getValue() - startAngle.getCurvation(0)); final Point2D ptA2 = balloon.getPointOnCirclePassingByThisPoint(insideA.getCenter()); path.lineTo(ptA1); path.arcTo(ptA2, insideA.getRadius(), 0, 1); } else { insideA = null; path.lineTo(ptA); } final Balloon insideB; if (endAngle.hasCurvation()) { insideB = balloon.getInsideTangentBalloon2(angle2, endAngle.getCurvation(0)); final Point2D ptB1 = balloon.getPointOnCirclePassingByThisPoint(insideB.getCenter()); final Point2D ptB2 = balloon.getSegmentCenterToPointOnCircle(angle2).getFromAtoB( radius.getValue() - endAngle.getCurvation(0)); path.arcTo(ptB1, balloon.getRadius(), 0, 1); path.arcTo(ptB2, insideB.getRadius(), 0, 1); } else { insideB = null; path.arcTo(ptB, balloon.getRadius(), 0, 1); } if (radius.hasCurvation()) { final Point2D ptB0 = balloon.getSegmentCenterToPointOnCircle(angle2).getFromAtoB(radius.getCurvation(0)); path.lineTo(ptB0); path.arcTo(ptA0, radius.getCurvation(0), 0, 1); } else { path.lineTo(balloon.getCenter()); } path.closePath(); ug.draw(path); // if (startAngle.hasCurvation()) { // insideA.drawU(ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(new UChangeBackColor(null))); // } // if (endAngle.hasCurvation()) { // insideB.drawU(ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(new UChangeBackColor(null))); // } } public CuteShape rotateZoom(RotationZoom other) { return new Cheese(radius, startAngle, endAngle, rotationZoom.compose(other)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/Circle.java000066400000000000000000000036631312650303100244260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Circle implements CuteShape { private final double radius; public Circle(VarArgs varArgs) { this.radius = varArgs.getAsDouble("radius"); } private Circle(double radius) { this.radius = radius; } public void drawU(UGraphic ug) { ug = ug.apply(new UTranslate(-radius, -radius)); ug.draw(new UEllipse(2 * radius, 2 * radius)); } public Circle rotateZoom(RotationZoom rotationZoom) { if (rotationZoom.isNone()) { return this; } return new Circle(rotationZoom.applyZoom(radius)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/Corner.java000066400000000000000000000026131312650303100244470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; public class Corner { private final double curvation; public Corner(double curvation) { this.curvation = curvation; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/Crossing.java000066400000000000000000000037661312650303100250200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Crossing { private final Balloon balloon; private final InfiniteLine line; public Crossing(Balloon balloon, InfiniteLine line) { this.balloon = balloon; this.line = line; } public List intersection() { final List result = new ArrayList(); final UTranslate tr = new UTranslate(balloon.getCenter()); final UTranslate trInverse = tr.reverse(); final CrossingSimple simple = new CrossingSimple(balloon.getRadius(), line.translate(trInverse)); for (Point2D pt : simple.intersection()) { result.add(tr.getTranslated(pt)); } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/CrossingSegment.java000066400000000000000000000042441312650303100263330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.geom.LineSegmentDouble; import net.sourceforge.plantuml.ugraphic.UTranslate; public class CrossingSegment { private final Balloon balloon; private final LineSegmentDouble segment; public CrossingSegment(Balloon balloon, LineSegmentDouble segment) { this.balloon = balloon; this.segment = segment; } public List intersection() { final List result = new ArrayList(); final UTranslate tr = new UTranslate(balloon.getCenter()); final UTranslate trInverse = tr.reverse(); final CrossingSimple simple = new CrossingSimple(balloon.getRadius(), new InfiniteLine(segment).translate(trInverse)); for (Point2D pt : simple.intersection()) { pt = tr.getTranslated(pt); if (segment.isPointOnSegment(pt)) { result.add(pt); } } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/CrossingSimple.java000066400000000000000000000051331312650303100261600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; public class CrossingSimple { // http://mathworld.wolfram.com/Circle-LineIntersection.html private final double radius; private final InfiniteLine line; public CrossingSimple(double radius, InfiniteLine line) { this.radius = radius; this.line = line; } private double pow2(double x) { return x * x; } private double sgn(double x) { if (x < 0) { return -1; } return 1; } public List intersection() { final List result = new ArrayList(); final double delta = pow2(radius * line.getDr()) - pow2(line.getDiscriminant()); if (delta < 0) { return result; } double x; double y; x = (line.getDiscriminant() * line.getDeltaY() + sgn(line.getDeltaY()) * line.getDeltaX() * Math.sqrt(delta)) / pow2(line.getDr()); y = (-line.getDiscriminant() * line.getDeltaX() + Math.abs(line.getDeltaY()) * Math.sqrt(delta)) / pow2(line.getDr()); result.add(new Point2D.Double(x, y)); x = (line.getDiscriminant() * line.getDeltaY() - sgn(line.getDeltaY()) * line.getDeltaX() * Math.sqrt(delta)) / pow2(line.getDr()); y = (-line.getDiscriminant() * line.getDeltaX() - Math.abs(line.getDeltaY()) * Math.sqrt(delta)) / pow2(line.getDr()); result.add(new Point2D.Double(x, y)); return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/CutePath.java000066400000000000000000000120531312650303100247330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPath; public class CutePath { private final List arcs = new ArrayList(); public CutePath(String value) { MyPoint2D lastAdded = null; String tension = null; final StringTokenizer spl = new StringTokenizer(value, "~:", true); while (spl.hasMoreTokens()) { final String token = spl.nextToken(); if (token.equals(":")) { continue; } else if (token.equals("~")) { tension = spl.nextToken(); final String next = spl.nextToken(); if (next.equals("~") == false) { throw new IllegalArgumentException(); } } else { final StringTokenizer st = new StringTokenizer(token.replaceAll("[()]", ""), ",^"); final MyPoint2D current = new MyPoint2D(st); if (lastAdded != null) { add(new Arc(lastAdded, current).withTension(tension)); } lastAdded = current; tension = null; } } add(new Arc(lastAdded, arcs.get(0).getA()).withTension(tension)); } public CutePath() { } public void add(Arc arc) { if (arcs.size() > 0) { final Arc last = arcs.get(arcs.size() - 1); if (last.getB().equals(arc.getA()) == false) { throw new IllegalArgumentException("last=" + last.getB() + " arc=" + arc.getA()); } } this.arcs.add(arc); } private final MyPoint2D getMyPoint2D(int i) { return getArc(i).getA(); } private Arc getArc(int i) { if (i == -1) { return arcs.get(arcs.size() - 1); } if (i == arcs.size()) { return arcs.get(0); } if (i == arcs.size() + 1) { return arcs.get(1); } return arcs.get(i); } private UPath toUPath() { final TriangleCorner corner0 = new TriangleCorner(getMyPoint2D(0), getMyPoint2D(1), getMyPoint2D(2)); final int swepFlag = corner0.determinant() < 0 ? 0 : 1; final UPath path = new UPath(); final BetweenCorners betweenCornersLast = new BetweenCorners(getCorner(arcs.size() - 1), getCorner(arcs.size()), arcs.get(arcs.size() - 1).getTension()); betweenCornersLast.initPath(path); for (int i = 0; i < arcs.size(); i++) { // if (i == 0) { // if (getMyPoint2D(i).hasCurvation()) { // path.moveTo(getPointK(i)); // } else { // path.moveTo(arcs.get(i).getA()); // } // } final BetweenCorners betweenCorners = new BetweenCorners(getCorner(i), getCorner(i + 1), arcs.get(i) .getTension()); betweenCorners.addToPath(path, swepFlag); } path.closePath(); return path; } private void debugMe(UGraphic ug) { for (int i = 0; i < arcs.size(); i++) { final BetweenCorners betweenCorners = new BetweenCorners(getCorner(i), getCorner(i + 1), arcs.get(i) .getTension()); betweenCorners.debugMe(ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(new UChangeBackColor(null))); } } private Point2D getPointK(final int j) { if (getMyPoint2D(j).hasCurvation()) { return getCorner(j).getOnSegmentB(getMyPoint2D(j).getCurvation(0)); } return arcs.get(j - 1).getB(); } private TriangleCorner getCorner(int i) { return new TriangleCorner(getMyPoint2D(i), getMyPoint2D(i - 1), getMyPoint2D(i + 1)); } public void drawU(UGraphic ug) { final UPath path = toUPath(); ug.draw(path); // debugMe(ug); } public CutePath rotateZoom(RotationZoom rotationZoom) { final CutePath result = new CutePath(); for (Arc arc : arcs) { result.arcs.add(arc.rotateZoom(rotationZoom)); } return result; } public CutePath withNoTension() { final CutePath result = new CutePath(); for (Arc arc : arcs) { result.arcs.add(arc.withNoTension()); } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/CuteShape.java000066400000000000000000000026441312650303100251040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import net.sourceforge.plantuml.graphic.UDrawable; public interface CuteShape extends UDrawable { public UDrawable rotateZoom(RotationZoom other); } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/CuteShapeFactory.java000066400000000000000000000050641312650303100264330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.util.Map; import net.sourceforge.plantuml.StringUtils; public class CuteShapeFactory { private final Map groups; public CuteShapeFactory(Map groups) { this.groups = groups; } public Positionned createCuteShapePositionned(String data) { final VarArgs varArgs = new VarArgs(data); return new PositionnedImpl(createCuteShape(data), varArgs); } private CuteShape createCuteShape(String data) { data = StringUtils.trin(data.toLowerCase()); final VarArgs varArgs = new VarArgs(data); if (data.startsWith("circle ")) { return new Circle(varArgs); } if (data.startsWith("cheese ")) { return new Cheese(varArgs); } if (data.startsWith("stick ")) { return new Stick(varArgs); } if (data.startsWith("rectangle ") || data.startsWith("rect ")) { return new Rectangle(varArgs); } if (data.startsWith("triangle ")) { return new Triangle(varArgs); } final String first = data.split(" ")[0]; // System.err.println("Looking for group " + first + " in " + groups.keySet()); final Group group = groups.get(first); if (group == null) { throw new IllegalArgumentException("Cannot find group " + first + " in " + groups.keySet()); } // System.err.println("Found group " + first + " in " + groups.keySet()); return group; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/Group.java000066400000000000000000000065271312650303100243230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Group implements Positionned { private final String groupName; private final List shapes; private final Group parent; private final Map children; // private final List children = new ArrayList(); @Override public String toString() { return "Group " + groupName + " (" + shapes.size() + ") "; } // public static Group fromList(List shapes) { // return new Group("Automatic", shapes); // } public static Group createRoot() { return new Group(null, "ROOT"); } private Group(Group parent, String groupName) { this.parent = parent; this.groupName = groupName; this.shapes = new ArrayList(); this.children = new HashMap(); } private Group(Group parent, String groupName, List shapes) { this.parent = parent; this.groupName = groupName; this.shapes = shapes; this.children = null; } public Group createChild(String childName) { final Group result = new Group(this, childName); this.children.put(childName, result); return result; } public void drawU(UGraphic ug) { for (Positionned shape : shapes) { shape.drawU(ug); } } public void add(Positionned shape) { shapes.add(shape); } public String getName() { return groupName; } public Positionned rotateZoom(RotationZoom rotationZoom) { if (rotationZoom.isNone()) { return this; } final List result = new ArrayList(); for (Positionned shape : shapes) { result.add(shape.rotateZoom(rotationZoom)); } return new Group(parent, groupName + "->" + rotationZoom, result); } public Positionned translate(UTranslate translation) { throw new UnsupportedOperationException(); } public Group getParent() { return parent; } public Map getChildren() { return Collections.unmodifiableMap(children); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/InfiniteLine.java000066400000000000000000000042061312650303100255740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import net.sourceforge.plantuml.geom.AbstractLineSegment; import net.sourceforge.plantuml.ugraphic.UTranslate; public class InfiniteLine { private final Point2D a; private final Point2D b; public InfiniteLine(Point2D a, Point2D b) { this.a = a; this.b = b; } public InfiniteLine(AbstractLineSegment segment) { this(segment.getP1(), segment.getP2()); } @Override public String toString() { return "{" + a + ";" + b + "}"; } public double getDeltaX() { return b.getX() - a.getX(); } public double getDeltaY() { return b.getY() - a.getY(); } public double getDr() { return a.distance(b); } public double getDiscriminant() { return a.getX() * b.getY() - b.getX() * a.getY(); } public InfiniteLine translate(UTranslate translate) { return new InfiniteLine(translate.getTranslated(a), translate.getTranslated(b)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/MyDouble.java000066400000000000000000000050001312650303100247300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.util.StringTokenizer; public class MyDouble { private static final double NO_CURVE = java.lang.Double.MIN_VALUE; private final double value; private final double curvation; public MyDouble(String s) { final StringTokenizer st = new StringTokenizer(s, ","); this.value = java.lang.Double.parseDouble(st.nextToken()); if (st.hasMoreTokens()) { this.curvation = java.lang.Double.parseDouble(st.nextToken()); } else { this.curvation = NO_CURVE; } } @Override public String toString() { return value + "[" + curvation + "]"; } private MyDouble(double value, double curvation) { this.value = value; this.curvation = curvation; } public double getCurvation(double def) { if (curvation == NO_CURVE) { return def; } return curvation; } public double getValue() { return value; } public boolean hasCurvation() { return curvation != NO_CURVE; } public MyDouble rotateZoom(RotationZoom rotationZoom) { final double newValue = rotationZoom.applyZoom(value); final double curvation = this.curvation == NO_CURVE ? NO_CURVE : rotationZoom.applyZoom(this.curvation); return new MyDouble(newValue, curvation); } public MyDouble toRadians() { return new MyDouble(Math.toRadians(value), curvation); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/MyPoint2D.java000066400000000000000000000061751312650303100250130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import java.util.StringTokenizer; public class MyPoint2D extends Point2D { public static final double NO_CURVE = 0; private final double x; private final double y; private final double curvation; public MyPoint2D(StringTokenizer st) { this.x = java.lang.Double.parseDouble(st.nextToken()); this.y = java.lang.Double.parseDouble(st.nextToken()); if (st.hasMoreTokens()) { this.curvation = java.lang.Double.parseDouble(st.nextToken()); } else { this.curvation = NO_CURVE; } } @Override public boolean equals(Object arg0) { final MyPoint2D other = (MyPoint2D) arg0; return this.x == other.x && this.y == other.y && this.curvation == other.curvation; } public static MyPoint2D from(double x, double y) { return new MyPoint2D(x, y, NO_CURVE); } public MyPoint2D withCurvation(double curvation) { if (curvation == NO_CURVE) { return this; } return new MyPoint2D(x, y, curvation); } private MyPoint2D(Point2D p, double curvation) { this.x = p.getX(); this.y = p.getY(); this.curvation = curvation; } private MyPoint2D(double x, double y, double curvation) { this.x = x; this.y = y; this.curvation = curvation; } @Override public String toString() { return "(" + x + "," + y + ")"; } public double getCurvation(double def) { if (curvation == NO_CURVE) { return def; } return curvation; } public double getX() { return x; } public double getY() { return y; } public void setLocation(double arg0, double arg1) { throw new UnsupportedOperationException(); } public MyPoint2D rotateZoom(RotationZoom rotationZoom) { final Point2D p = rotationZoom.getPoint(x, y); final double curvation = this.curvation == NO_CURVE ? NO_CURVE : rotationZoom.applyZoom(this.curvation); return new MyPoint2D(p, curvation); } public boolean hasCurvation() { return curvation != NO_CURVE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/PSystemCute.java000066400000000000000000000061751312650303100254530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.io.IOException; import java.io.OutputStream; import java.util.StringTokenizer; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class PSystemCute extends AbstractPSystem { // private final List shapes = new ArrayList(); // private final Map groups = new HashMap(); private final Group root = Group.createRoot(); private Group currentGroup = root; public PSystemCute() { } public DiagramDescription getDescription() { return new DiagramDescription("(Cute)"); } public void doCommandLine(String line) { line = StringUtils.trin(line); if (line.length() == 0 || line.startsWith("'")) { return; } if (line.startsWith("group ")) { final StringTokenizer st = new StringTokenizer(line); st.nextToken(); final String groupName = st.nextToken(); currentGroup = currentGroup.createChild(groupName); } else if (line.startsWith("}")) { currentGroup = currentGroup.getParent(); } else { final Positionned shape = new CuteShapeFactory(currentGroup.getChildren()).createCuteShapePositionned(line); // if (currentGroup == null) { // shapes.add(shape); // } else { currentGroup.add(shape); // } } } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final ImageBuilder builder = new ImageBuilder(new ColorMapperIdentity(), 1.0, null, null, null, 10, 10, null, false); builder.setUDrawable(root); return builder.writeImageTOBEMOVED(fileFormat, seed, os); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/PSystemCuteFactory.java000066400000000000000000000034341312650303100267760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.core.DiagramType; public class PSystemCuteFactory extends PSystemBasicFactory { public PSystemCuteFactory(DiagramType type) { super(type); } public PSystemCute init(String startLine) { if (getDiagramType() == DiagramType.CUTE) { return new PSystemCute(); } return null; } @Override public PSystemCute executeLine(PSystemCute system, String line) { system.doCommandLine(line); return system; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/Positionned.java000066400000000000000000000027451312650303100255200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import net.sourceforge.plantuml.ugraphic.UTranslate; public interface Positionned extends CuteShape { public Positionned rotateZoom(RotationZoom rotation); public Positionned translate(UTranslate translation); } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/PositionnedImpl.java000066400000000000000000000067231312650303100263420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class PositionnedImpl implements Positionned { private final CuteShape cuteShape; private final HtmlColor color; private final UTranslate position; private final RotationZoom rotationZoom; @Override public String toString() { return "Positionned " + position + " " + cuteShape; } public PositionnedImpl(CuteShape cuteShape, VarArgs args) { this.cuteShape = cuteShape; this.color = args.getAsColor("color"); this.position = args.getPosition(); this.rotationZoom = RotationZoom.fromVarArgs(args); } private PositionnedImpl(CuteShape cuteShape, HtmlColor color, UTranslate position, RotationZoom rotationZoom) { this.cuteShape = cuteShape; this.color = color; this.position = position; this.rotationZoom = rotationZoom; } public PositionnedImpl(Group group, RotationZoom rotation) { this.cuteShape = group; this.color = HtmlColorUtils.BLACK; this.position = new UTranslate(); this.rotationZoom = rotation; } public PositionnedImpl(Group group, UTranslate translation) { this.cuteShape = group; this.color = HtmlColorUtils.BLACK; this.position = translation; this.rotationZoom = RotationZoom.none(); } private UGraphic applyColor(UGraphic ug) { return ug.apply(new UChangeBackColor(color)).apply(new UChangeColor(color)); } public void drawU(UGraphic ug) { ug = applyColor(ug); ug = ug.apply(position); final UDrawable tmp = rotationZoom.isNone() ? cuteShape : cuteShape.rotateZoom(rotationZoom); // System.err.println("rotationZoom=" + rotationZoom + " tmp=" + tmp); tmp.drawU(ug); } public Positionned rotateZoom(RotationZoom other) { return new PositionnedImpl(cuteShape, color, other.getUTranslate(position), rotationZoom.compose(other)); } public Positionned translate(UTranslate other) { return new PositionnedImpl(cuteShape, color, position.compose(other), rotationZoom); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/Rectangle.java000066400000000000000000000074741312650303100251350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPath; public class Rectangle implements CuteShape { private final double width; private final double height; private final RotationZoom rotationZoom; private final double curvation; public Rectangle(VarArgs varArgs) { final Point2D dim = varArgs.getAsPoint("dimension"); this.width = dim.getX(); this.height = dim.getY(); this.rotationZoom = RotationZoom.none(); this.curvation = varArgs.getAsDouble("curve", MyPoint2D.NO_CURVE); } private Rectangle(double width, double height, RotationZoom rotationZoom, double curvation) { this.width = width; this.height = height; this.rotationZoom = rotationZoom; this.curvation = curvation; } public void drawU(UGraphic ug) { CutePath cutePath = new CutePath(); cutePath.add(new Arc(MyPoint2D.from(0, 0).withCurvation(curvation), MyPoint2D.from(width, 0).withCurvation( curvation))); cutePath.add(new Arc(MyPoint2D.from(width, 0).withCurvation(curvation), MyPoint2D.from(width, height) .withCurvation(curvation))); cutePath.add(new Arc(MyPoint2D.from(width, height).withCurvation(curvation), MyPoint2D.from(0, height) .withCurvation(curvation))); cutePath.add(new Arc(MyPoint2D.from(0, height).withCurvation(curvation), MyPoint2D.from(0, 0).withCurvation( curvation))); cutePath = cutePath.rotateZoom(rotationZoom); cutePath.drawU(ug); } public void drawUOld(UGraphic ug) { final UPath path = new UPath(); if (curvation == MyPoint2D.NO_CURVE) { path.moveTo(rotationZoom.getPoint(0, 0)); path.lineTo(rotationZoom.getPoint(width, 0)); path.lineTo(rotationZoom.getPoint(width, height)); path.lineTo(rotationZoom.getPoint(0, height)); path.lineTo(rotationZoom.getPoint(0, 0)); } else { path.moveTo(rotationZoom.getPoint(width, curvation)); path.lineTo(rotationZoom.getPoint(width, height - curvation)); path.arcTo(rotationZoom.getPoint(width - curvation, height), curvation, 0, 1); path.lineTo(rotationZoom.getPoint(curvation, height)); path.arcTo(rotationZoom.getPoint(0, height - curvation), curvation, 0, 1); path.lineTo(rotationZoom.getPoint(0, curvation)); path.arcTo(rotationZoom.getPoint(curvation, 0), curvation, 0, 1); path.lineTo(rotationZoom.getPoint(width - curvation, 0)); path.arcTo(rotationZoom.getPoint(width, curvation), curvation, 0, 1); } path.closePath(); ug.draw(path); } public Rectangle rotateZoom(RotationZoom other) { return new Rectangle(width, height, rotationZoom.compose(other), curvation); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/RotationZoom.java000066400000000000000000000067251312650303100256730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UTranslate; public class RotationZoom { private final double angle; private final double zoom; private RotationZoom(double angle, double zoom) { if (zoom < 0) { throw new IllegalArgumentException(); } this.angle = angle; this.zoom = zoom; } public RotationZoom compose(RotationZoom other) { return new RotationZoom(this.angle + other.angle, this.zoom * other.zoom); } @Override public String toString() { return "Rotation=" + Math.toDegrees(angle) + " Zoom=" + zoom; } public static RotationZoom fromVarArgs(VarArgs varArgs) { final double radians = Math.toRadians(varArgs.getAsDouble("rotation", 0)); final double scale = varArgs.getAsDouble("scale", 1); return new RotationZoom(radians, scale); } public static RotationZoom rotationInDegrees(double angle) { return new RotationZoom(Math.toRadians(angle), 1); } public static RotationZoom rotationInRadians(double angle) { return new RotationZoom(angle, 1); } public static RotationZoom zoom(double zoom) { return new RotationZoom(0, zoom); } public RotationZoom inverse() { return new RotationZoom(-angle, 1 / zoom); } public double getAngleDegree() { return Math.toDegrees(angle); } static public RotationZoom builtRotationOnYaxis(Point2D toRotate) { final double a = Math.atan2(toRotate.getX(), toRotate.getY()); return new RotationZoom(a, 1); } public Point2D.Double getPoint(double x, double y) { if (angle == 0) { return new Point2D.Double(x * zoom, y * zoom); } final double x1 = Math.cos(angle) * x - Math.sin(angle) * y; final double y1 = Math.sin(angle) * x + Math.cos(angle) * y; return new Point2D.Double(x1 * zoom, y1 * zoom); } public Point2D getPoint(Point2D p) { return getPoint(p.getX(), p.getY()); } public UTranslate getUTranslate(UTranslate translate) { return new UTranslate(getPoint(translate.getDx(), translate.getDy())); } public static RotationZoom none() { return new RotationZoom(0, 1); } public boolean isNone() { return angle == 0 && zoom == 1; } public double applyZoom(double value) { return value * zoom; } public double applyRotation(double alpha) { return angle + alpha; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/Segment.java000066400000000000000000000060251312650303100246220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Segment { private final Point2D a; private final Point2D b; private final double length; public Segment(Point2D a, Point2D b) { this.a = a; this.b = b; this.length = a.distance(b); if (length < 0.0001) { throw new IllegalArgumentException(); } } public Point2D getFromAtoB(double dist) { final double dx = b.getX() - a.getX(); final double dy = b.getY() - a.getY(); final double coef = dist / length; final double x = dx * coef; final double y = dy * coef; return new Point2D.Double(a.getX() + x, a.getY() + y); } public Point2D getA() { return a; } public Point2D getB() { return b; } public Point2D getMiddle() { return new Point2D.Double((a.getX() + b.getX()) / 2, (a.getY() + b.getY()) / 2); } private Point2D orthoDirection() { final double dx = b.getX() - a.getX(); final double dy = b.getY() - a.getY(); return new Point2D.Double(-dy / length, dx / length); } public Point2D getOrthoPoint(double value) { final Point2D ortho = orthoDirection(); final double dx = -ortho.getX() * value; final double dy = -ortho.getY() * value; return new Point2D.Double((a.getX() + b.getX()) / 2 + dx, (a.getY() + b.getY()) / 2 + dy); } private boolean isLeft(Point2D point) { return ((b.getX() - a.getX()) * (point.getY() - a.getY()) - (b.getY() - a.getY()) * (point.getX() - a.getX())) > 0; } public double getLength() { return length; } public void debugMe(UGraphic ug) { final double dx = b.getX() - a.getX(); final double dy = b.getY() - a.getY(); ug = ug.apply(new UTranslate(a)); ug.draw(new ULine(dx, dy)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/Stick.java000066400000000000000000000060121312650303100242710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPath; public class Stick implements CuteShape { private final double width; private final double height; private final RotationZoom rotationZoom; public Stick(VarArgs varArgs) { final Point2D dim = varArgs.getAsPoint("dimension"); this.width = dim.getX(); this.height = dim.getY(); this.rotationZoom = RotationZoom.none(); } private Stick(double width, double height, RotationZoom rotation) { this.width = width; this.height = height; this.rotationZoom = rotation; } public void drawU(UGraphic ug) { if (width > height) { drawRotate1(ug); } else { drawRotate2(ug); } } private void drawRotate1(UGraphic ug) { assert width > height; final UPath path = new UPath(); final double small = height / 2; path.moveTo(rotationZoom.getPoint(small, 0)); path.lineTo(rotationZoom.getPoint(width - small, 0)); path.arcTo(rotationZoom.getPoint(width - small, height), small, 0, 1); path.lineTo(rotationZoom.getPoint(small, height)); path.arcTo(rotationZoom.getPoint(small, 0), small, 0, 1); path.closePath(); ug.draw(path); } private void drawRotate2(UGraphic ug) { assert height > width; final UPath path = new UPath(); final double small = width / 2; path.moveTo(rotationZoom.getPoint(width, small)); path.lineTo(rotationZoom.getPoint(width, height - small)); path.arcTo(rotationZoom.getPoint(0, height - small), small, 0, 1); path.lineTo(rotationZoom.getPoint(0, small)); path.arcTo(rotationZoom.getPoint(width, small), small, 0, 1); path.closePath(); ug.draw(path); } public Stick rotateZoom(RotationZoom other) { return new Stick(width, height, this.rotationZoom.compose(other)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/Tension.java000066400000000000000000000032351312650303100246370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; public class Tension { private final double tension; public Tension(double tension) { this.tension = tension; } public static Tension none() { return new Tension(0); } public Tension rotateZoom(RotationZoom rotationZoom) { return new Tension(rotationZoom.applyZoom(tension)); } public boolean isNone() { return tension == 0; } public double getValue() { return tension; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/Triangle.java000066400000000000000000000040561312650303100247670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import net.sourceforge.plantuml.ugraphic.UGraphic; public class Triangle implements CuteShape { private final CutePath cutePath; public Triangle(VarArgs varArgs) { this(varArgs.getPointList("points")); } private Triangle(CutePath cutePath) { this.cutePath = cutePath; // if (points.size() != 3) { // throw new IllegalArgumentException(); // } } public Triangle rotateZoom(final RotationZoom angle) { if (angle.isNone()) { return this; } return new Triangle(cutePath.rotateZoom(angle)); } public void drawU(UGraphic ug) { cutePath.drawU(ug); // ug = ug.apply(new UChangeBackColor(null)).apply(new UChangeColor(HtmlColorUtils.BLACK)); // cutePath.withNoTension().drawU( // ug.apply(new UChangeBackColor(null)).apply(new UChangeColor(HtmlColorUtils.BLACK))); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/TriangleCorner.java000066400000000000000000000076001312650303100261360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TriangleCorner { private final Point2D o; private final Point2D a; private final Point2D b; private final TriangleCornerSimple simple; private final UTranslate translateO; private final UTranslate translateOreverse; private final RotationZoom rotation; private final RotationZoom rotationInverse; @Override public String toString() { return "Corner " + o + " a=" + a + " b=" + b; } public boolean hasCurvation() { return ((MyPoint2D) o).hasCurvation(); } public double getCurvation() { if (hasCurvation() == false) { throw new IllegalStateException(); } return ((MyPoint2D) o).getCurvation(0); } public TriangleCorner(Point2D o, Point2D a, Point2D b) { this.o = o; this.a = a; this.b = b; this.translateO = new UTranslate(o); this.translateOreverse = translateO.reverse(); final Point2D a2 = translateOreverse.getTranslated(a); final Point2D b2 = translateOreverse.getTranslated((b)); final Point2D a3, b3; if (a2.getX() == 0) { a3 = a2; b3 = b2; this.rotation = RotationZoom.none(); this.rotationInverse = RotationZoom.none(); } else { this.rotation = RotationZoom.builtRotationOnYaxis(a2); this.rotationInverse = rotation.inverse(); a3 = rotation.getPoint(a2); b3 = rotation.getPoint(b2); } this.simple = new TriangleCornerSimple(a3, b3); } public Point2D getOnSegmentA(double dist) { final Segment seg = new Segment(o, a); return seg.getFromAtoB(dist); } public Point2D getOnSegmentB(double dist) { final Segment seg = new Segment(o, b); return seg.getFromAtoB(dist); } public Balloon getCenterWithFixedRadius(double radius) { final Point2D centerSimple = simple.getCenterWithFixedRadius(radius); return new Balloon(rotationInverse.getPoint(translateO.getTranslated(centerSimple)), radius); } private Balloon getBalloonWithFixedY(double y) { Balloon result = simple.getBalloonWithFixedY(y); result = result.rotate(rotationInverse); result = result.translate(translateO); return result; } public Point2D getCornerOrBalloonCenter() { if (hasCurvation()) { return getBalloonInside().getCenter(); } return getO(); } public double determinant() { final double ux = a.getX() - o.getX(); final double uy = a.getY() - o.getY(); final double vx = b.getX() - o.getX(); final double vy = b.getY() - o.getY(); return ux * vy - uy * vx; } public Point2D getO() { return o; } public Balloon getBalloonInside() { if (hasCurvation() == false) { throw new IllegalStateException(); } return getBalloonWithFixedY(getCurvation()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/TriangleCornerSimple.java000066400000000000000000000067141312650303100273150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; public class TriangleCornerSimple { private final Point2D a; private final Point2D b; @Override public String toString() { return "TriangleCornerSimple a=" + a + " " + Math.toDegrees(getAngleA()) + " b=" + b + " " + Math.toDegrees(getAngleB()); } public TriangleCornerSimple(Point2D a, Point2D b) { if (isZero(a.getX()) == false) { throw new IllegalArgumentException("a=" + a); } this.a = a; this.b = b; } private static boolean isZero(double v) { return Math.abs(v) < 0.0001; } double getAngleA() { return getAngle(a); } double getAngleB() { return getAngle(b); } double getAngle(Point2D pt) { final double dx = pt.getX(); final double dy = pt.getY(); return Math.atan2(dy, dx); } static double solveY(double alpha, double x) { if (alpha < 0 || alpha > Math.PI / 2) { throw new IllegalArgumentException(); } return x * Math.tan(alpha); } static double solveX(double alpha, double y) { if (alpha < -Math.PI / 2 || alpha > Math.PI / 2) { // throw new IllegalArgumentException("y=" + y + " alpha=" + Math.toDegrees(alpha)); } final double beta = Math.PI / 2 - alpha; // System.err.println("alpha1=" + Math.toDegrees(alpha)); // System.err.println("beta11=" + Math.toDegrees(beta)); // System.err.println("XX=" + y * Math.tan(beta)); return y * Math.tan(beta); } public Point2D getCenterWithFixedRadius(double radius) { final double alpha = (getAngleA() + getAngleB()) / 2; final double y = solveY(alpha, radius); return new Point2D.Double(radius, y); } public Balloon getBalloonWithFixedY(double y) { // System.err.println("TriangleCornerSimple::getCenterWithFixedY y=" + y); // System.err.println("a=" + a + " " + Math.toDegrees(getAngleA())); // System.err.println("b=" + b + " " + Math.toDegrees(getAngleB())); final double alpha = (getAngleA() + getAngleB()) / 2; // System.err.println("alpha=" + Math.toDegrees(alpha)); final double sign = Math.signum(a.getY()); // System.err.println("sgn=" + sign); final double x = solveX(alpha, y); final Balloon result = new Balloon(new Point2D.Double(x * sign, y * sign), Math.abs(x)); // System.err.println("result=" + result); return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/cute/VarArgs.java000066400000000000000000000071551312650303100245720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.cute; import java.awt.geom.Point2D; import java.util.HashMap; import java.util.Map; import java.util.StringTokenizer; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorSet; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.ugraphic.UTranslate; public class VarArgs { private final Map args = new HashMap(); public VarArgs(String data) { for (String s : data.split("\\s")) { if (s.contains("=")) { final StringTokenizer st = new StringTokenizer(s, "="); final String key = st.nextToken(); final String value = st.nextToken(); args.put(key, value); } } // System.err.println("arg=" + args); } @Override public String toString() { return args.toString(); } public double getAsDouble(String k, double def) { if (args.containsKey(k)) { return getAsDouble(k); } return def; } public double getAsDouble(String k) { final String value = args.get(k); if (value == null) { throw new IllegalArgumentException("no key " + k); } return Double.parseDouble(value); } public MyDouble getAsMyDouble(String k) { final String value = args.get(k); if (value == null) { throw new IllegalArgumentException("no key " + k); } return new MyDouble(value); } public HtmlColor getAsColor(String k) { final String value = args.get(k); if (value == null) { return HtmlColorUtils.BLACK; } final HtmlColor result = HtmlColorSet.getInstance().getColorIfValid(value); if (result == null) { return HtmlColorUtils.BLACK; } return result; } public Point2D getAsPoint(String k) { final String value = args.get(k); if (value == null) { throw new IllegalArgumentException("no key " + k); } final StringTokenizer st = new StringTokenizer(value.replaceAll("[()]", ""), ","); return new Point2D.Double(Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken())); } public Point2D getAsPoint(String k, Point2D def) { if (args.containsKey(k)) { return getAsPoint(k); } return def; } public CutePath getPointList(String k) { final String value = args.get(k); if (value == null) { throw new IllegalArgumentException("no key " + k); } return new CutePath(value); } public UTranslate getPosition() { return new UTranslate(getAsPoint("position", new Point2D.Double())); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/dedication/000077500000000000000000000000001312650303100235155ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/dedication/0.png000066400000000000000000000130131312650303100243600ustar00rootroot00000000000000HJr%JI a~ Z|rvh|3M3NViJvˠw$ BHXAQ&1G#0Xw|0Lv\$ZO/ŎVWνRZAppJ6zDa/UP;.<#VAw"5K{GΊ,GsѺSo}UۮŢ\T`sȻPC {#ÑZ}I?*@4̱JN-7Fub{k5ȼ镸Ux.XQZ@KKN@ UCWKϱ-i(#xx0?"iI)RkLr>z7{H^ðìSݡ?PՍ׋9wV:#bXO7})  x[ h ;L:C,8m11|9ÖqZڄ&ZͪH+4&` V㘡CYՕV#?kR.J~n&@_^-*(vI› 8+u w?ZCݙAETܰJc|]MJ|oo{9ReܰDEZs G(=ڻncI Ġ&1ϮyS0?%nLV+*Š60Ģ*.CXrRWE&M).UA_;z*9؉L UnӟqD }?؈4n|1_":%OKp%bB(F|U{$FTG j.vi&wxz𺤒 G)XJyh[`'(m}īAqЧ" j)'$ &x3(;/ FY &䞖^)י`t[D)SA?7x؃)E|k|ɇocx 0yEgreAՅ!y'u:zN3 ^ԱwvĻA=wVhŤJ%骡Cymbʟ8yfMTx m/,(o%sZHᗦx9"P8~[]:"wJ d-4O%n7~M# Xo4r5jY.]d6a{wI%?50nܵKys+IJB!BR̯n BրxE-w~ZbArխNԔ4U&ƻL*R8-Bm)<¾V4NrV_{wFPS5W)w1)'3:Hi@=!gr[)o>yh*J\h|/[b~X^Ҵr-.9żѾwI>"H/:NWʕ5mp“"ǝ@cKNP]M׭ϴ&,3z.(0G6-G`I-+kԜPGьee$^]oNSw0 jT3G#'v\>.H*4SXX )Rւe'KAR󦷌; n8j7VMZ5z·MBUЅA}pPhCvJvmݟ=&@iYX\շla$< WK?xHQ$ N*"; ^T8.DthaK?.<= .SLvYq?F¢$? |57.R  Q[ {,?rXB'cה O)٭V{B։AeVuIĩǘa!D .! \Cv ۋ 8/? ~ċn/IPEFYp*2b1wzьUΎceV2axA:N!:CZSe] QD)#Տ]LZ%_(ψXΫUcjO MxόXCtdG#`u[Yؠ(ϺDͬ (uq!Z .#j5 U>{VFF{x]x[?](gj4-hHvw$.%>Bxkd_b%"Ql[7c2J)I_.N |{D1BH@1˚I&$ 8 lu}->ǯUHEyvGg.f^itccB-ur\eBW6+m(O&-D1tJ /_^ M#VYV?,ר8!#?{@Yf{72lźaXw͠W2@]a@ ZQZ+r.qquwdBE BIN:*'m2ՑF1Hh[+i/Ǣ8dapL[g5EhSLPm'Y:hnH( Uo_œEn }`霯ٹJ qֹ1 4/6hM'BӾE-%E4f"ų0[g&"M%7 K)~i^S&SJd,[fyIx{1n7M b?W4h/p_nYCvT3զVo'cê&3Q^ٴ͡ 5Xm:0B*lwhS#T6A8RD451&[ߤ+ ?[PvIwnπGBc@^Lʲ˟=Ҳ9i5C;nRm>ciXnSrcMƉ%)}kwkъͮ]Bp}qGOXo7oLCܖ '1Vơc `0n/Z{ե-gRl!T9KYJ9qs ސDṟ/E%ZN#4ƺ_<->qAuN1Ziwj"@T ]0ƯH.wY=OE#Y=(s /:5c4S>xbj|':wuGܵ5` m{m l\ 9l^#pZ+%` 0\6D-aHAF}A3*:sq{J:.48:2H]q;(k jt93uѣ)COybzb}ޜ]o: S_!O$9fC51Ki\/Ng`Y"saYI)!Q$"Le v:k=G"6/ǮYOsPNB3" W{ÂM(0'џVǵKD1GUb]sU:Ca%ڽ}Lo"8^ awbp^@ŇCT }09i?E]cx7DK)Vv!&Bӂ#HEi5Bb, IaB䍈p @`i%sW;?IkDxgwc$nh逇*s~\2!\XZj̈Dk y- 9fdT|q8xlꩁ q[ I.\½kCMEl}&ÎV}AC|Ͽ iPQ%( q~g Κ;ƗxB33iI/ K3ey_'52uTVb%qtc&J-ܐtDm F?q* /u`9DMx>Ivzw&_Y֛&4Q9VDQ O@k`M0S>S$tY!kᡐB. ^Qa c}t4yR%ťl B}|)(?"Tу:\hVW_NaU44YJ ۞G682+/CsTz.?'|? #*v&eG't\ʟ`m D)oJE,?09TRx\n2Cbr-t;XO84W觭l£!Jw2!Ƞ+Mf2T;ZsQp*#~Q>|ctŹtPI%/,I̯"gC Ϩ XZwȵ|q&q|9E";ͬo RPh SYN]Zx".iĊ=V`ԍVne[;$6;+@,S?|Q|Gc92;i7&\Nu:!d RFX:̻&:{.B1aU.s%u̓a}c\eE+=hr& C'r]At>33b++O]Z;RߣՔN $;J @ֆiU U>C(ZQ! ~;EoB normal = new HashMap(); private static final Map crypted = new HashMap(); static { addNormal("Write your own dedication!", "dedication"); addNormal("linux_china", "linux_china"); addCrypted("0", "pOhci6rKgPXw32AeYXhOpSY0suoauHq5VUSwFqHLHsLYgSO6WaJ7BW5vtHBAoU6ePbcW7d8Flx99MWjPSKQTDm00"); } private static void addNormal(String sentence, String name) { normal.put(keepLetter(sentence), new Dedication(name)); } private static void addCrypted(String name, String contentKey) { crypted.put(contentKey, new Dedication(name)); } private Dedications() { } public static Dedication get(String line) { final String keepLetter = keepLetter(line); final Dedication result = normal.get(keepLetter); if (result != null) { return result; } for (Map.Entry ent : crypted.entrySet()) { final Dedication dedication = ent.getValue(); InputStream is = null; try { is = dedication.getInputStream(keepLetter); final String signature = SignatureUtils.getSignatureSha512(is); if (signature.equals(ent.getKey())) { return dedication; } } catch (IOException e) { e.printStackTrace(); } finally { try { if (is != null) is.close(); } catch (IOException e) { e.printStackTrace(); } } } return null; } public static String keepLetter(String s) { final StringBuilder sb = new StringBuilder(); for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); if (Character.isLetterOrDigit(c)) { sb.append(c); } } return sb.toString(); } } G-vlxV6y0ekXvg4jdrZhpVdo7lhOrgzdDMujAyww7DSmBwYMPUi9rNQVH44hebtYNePymublPiBIpRDwZGKrbG00.png000066400000000000000000000356561312650303100437520ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/dedication Zws V.b5Ƭ_7vbg/Б'sd4M=aOz]]ITؖH )~%3ZH]i |,jb*Jd`xxLI goJjhݱ"Ewú93*v=*'.-E{&61| ;^(DKpiʷ{*DoWߗ2ޟBCcuyw}k-NO[YR7.# ZSB7|fn{`^y?Yy`-b2ku;:GSgu Isu;6}W;jvvwJ@[DW\?D|hT¤V]]x*m,dEƤGG:et~hǾŋrEQTo9!{KS;HdYGq'q)3ߤj\e(\"_- \{*@ ̛Y6~PdӺYy ,ZZs>2Bҙ35+٭i~m;`Ȑhib",j7CTtdU~GD80Sh>eLrun`V }J ;7z1)zّJ[7)=ozd2-<~0Prw&nf?/^?wnŸtf3KBIk[ǟM)b@W7*Փd(H~H^TTd( ׯG{-zI^{/Jr0]_DXHvV5؇VF}\:$b揘 f'Bq5XucBW7c?m^D߾޳hCq-?3G)Mi܌E/^CwRQ![AܻƐݢnx\_'-/QHܑd1]DTjPwG#-tн#b%TP, kơ'ZT@r`zݢe{֛kl݋jkXhUŐUO#VѶ" w.5K_P_a\,8WCOlڔ\RٷV9`Mh5]uk( n"klV@K7.Qb>Jθ/ŸN`Ў'.eOGg8_'hֹ_bN vd#`utqKYϝZ  _Hg|ړӦ„v":u_*CEF X $>|'= Y^k & !mjrզfg-S@ϊvS."-&k"pm] X#H& KchД, $u"sK>M8{ ڙNoY1qⶉz)g_-R(fZC bTLR%aV^մ9l̸ &%"U96,d0x&Β׵&㥄lݮ1LcqK/)[ۦ._XR`;nR2#5DP$;Ed*A%7: bc.i%K*X$3kC\IܪY4HV/mAEդ&3p:ߛԏ4ZV]Ȧ+ohiRߎb@DȒdmty1,8K ygGc` ]@$kZ6 v?쁜hP1i6`MsG8HN*:m@2AP=|+#ɯ ZDDO’hN`qX]"Oz~BнLI+cߌd!#d#ee%[joup&_܌t\|v"nȷqj;Nݶ12 ĜyyP[`T$7jsٗ9{-e(3YcFydKޮ̢UOp|!E8<"{ iλ \z^: Ҟ:cXAR$L#^;izň> 3Nk묨Qe^m{3G3t~-|}].C,R1LdzKV`Y8K=U8ڔhԯ: I%ɖO6 b5ESެ4>$rJ[q&48 ?!|Iq!5jʅ#a* (fBpQ0zdJYD;mڰ_gxmR;jxqD4E pR&kr"kmw=D< ӅLΥ"/ I<>w*S͸K=hϧ`-ՖBqA]o[ÅFptuܛ|w])@/ߔ%$NժPkF9)Aց~7@%Yk AYcV'vUqO$]ؘ0%v6b"QT0=2? 78܎S+vgEn7n]Ñ_eݓÉZ*19 }I*1Gf]w3m;: cADZyG(eR7мaG1U3!"/"tr[{7Ls6e9,sCe߷7vTL[Lof} PN8s h/كjJ滸 ZD tfl(DVWfzV[+6^l(VL՜}Yu[P힉'K5As6:#4LG343: GBA͢!hF.Q\sm cpׅ׎olm/|I^S0OA0$(R#mLPyɊ; [dL uҔ f} +UcJoqna_RinC;oU]9r.5Dd Ww? X8)$dk(B]t@?1!C}:ڄWt]]sM/7sM޼ \LѪI)e4N:$"c kQx9o`Qà!ʧ$֡ۇg U i"HOY_qKw}$9/)@gzGgށS ( ;ɸ_g42`eu_1q4`%)i9A ZMm$|%EdX{'ԾuZp=H7HeS!!"a{8ȳ}#67hPF2oEb{%[f?Z40=: hV!!k[&KS:i*c?h=chI-%ȱHfb9&JLKj$ѤrW8U-ܲ™W t0J6SlKn'U7,4]EQxvϿrAbyK |l+ ejcvDu1*hA+#?K?=BhY6wuK.]1sNQ㒯DS bc/S>0]ąpcg["T-( p|gQE&2nF ZzSLtc'HB`ڢ=}pCU %*H*Dt+ 'o'pd UԨ| vӽ؃:]7SVLT)bZY 7]$SЁ,;;([WR*d8SpbJY(U NCMK~mn}FP l#nyxZIŃG[}V c!ŷ9dGu}h4ae@ҤTri^-мa (B__X逰HWF܏ĠW\X;C즻J<| Vtŗs5cm7^u'x[X"7n>q%%"ܨS"IrH~pn1 C1 ԧWPo- kqb)%A} Ox7ZI YiRG(]B(K_^>hSY^W.3P9QpYԕZ(+a J3p㹻[G'h-H%UivP:C qfpB: l 8^Vsr|z)7U 5E/hm=]pCTvֈ*!j5\`!(aD0.=|^'[kNS"ꯍ/OPs7[r\J%`DDeU_j!{5 GAr^ vc437%ɂ,=6`z^-Ar)}.(A;B6KˆA@7;:BƐKF &*n|x;HB@U^txĩ$Jx2}vVc [R;#(BivE,`zZ/U3FQp tx#J3WO%b> `נT4!;5tj6frn;d1i6~tfd4x5/IŽQbLjfrUbX {H[̪\\X;E)}8OD] Ghq8 E5y7P*˹RtST3fiUBaB9 4zdor#JS+QL[KaD'uBMP(|i"ШǟŃnzY&frcuudI/39+߫r􏦮,') Y~dzXC4#)UsHjtgճ4-rHA㐎‡b-)N)|GU*NXǘ4T{-v~d\d3e#<%dc3 i 9sMzZna w T\6ꀛ\_hչDuRwvy[ك"z|ϤMg1):{%?._6G̮K$hx]_"}G3G2bbTTJs /a]H-d+_f=gi3N0B,XٵvOWΑ"W+hl:ʞ"z剥p"̔c|6dNԜ,eU-m=a16 ˴|'n֠P櫏l8hWc(dH5ne~,J1?eCk\4O#E(Lo!$02Km>Y/$䑳y!'!Z!(>VOaD @;,_8$Xz;hfwBOnrHE+/s{^ dӗ+Txٲ섐qödެ? PT5?j{^Ab,z@Be70>E(2!9l>vmtj,613"7k 5cFKiu;u;n,$;2(&ہjWh+.qXput5x'={V>9uqdKZ"IM?Rf2}_VcKw͇\ QseRB{or2Z-A@1b6wQY9,iTX¯)E&)xQT$0A* !EU-:75M.aQ ¹pFze~Tu]8>CD{ \ z [!hSAdNH7jgIf>(&_U7A*֍Dvtfn˼Gh6pt$ox*_t;x 1^PIRshīOm:EQt)X+8!A,x0b {?Qkº6(V?vC^F{zNFCHmWx6HVGOEV2:BXtio(~/֗)dFy';_o5w4& z[% F} w+yPɿ̋.;m]8+ [9wueyYUɴԸqW E^4~`Mm^@2d,׭ u+k9d9{7 &LqUQK$JzueIj!Xr%W8.SqmeD? d\#BQ qHN+nUha&$,c]5yuXKH;$C:w퓔ݼ1;M,l-z"IY7@5KV4;z Zdb+zVl:4oRы=<.Au>~jʲ Js3 7^sckNYk]ˮNVT!i A??Ryg'gu4Tjc c JPE%6]B)ۏӊ"^ó÷ <4܊0MA͘unCzԱfM*I*3 0{Itq| iD*/uӱrg94ZP\Ate*#:%VL%CZ|$ _qkaJ?&۾ȵǡÑ/NӟT  @\m )U}BYLVOBqt駁dV>L ?xwE Hk%.YXA%Żʄb^5hyUҟyy0s} Ÿ $ױh, oBl#-``뙔VJ3urHzA&"f= *#;!3@&i3{`zRk);GabrӲb^^yhň:xXU$+P=Xz4xzV̫ß}W'\ %ݟ12O?4gھ jdȫy9IpnxCJ!wT.-ޑ$P&RmLPR$rqހ玣x79A k;zߖQ: gɜd^jvI+{LEg 9S @kS>S#";qJr}M$ȸNLuWҠIiVEW0Hr*9eZ\3 QfpO7領\?47gDj(V37I]7=TuU}-bHGHgs u/'nt$q5 ufe8U.i'6r?邻{&ݎh!osn- @Rqwg 3d3C2o馮)=e:z+~3JvU6uCFڏrڏ,}כ8^J)Eh| C$@>%TMZ8%2ٰ L<@X*pƱfs`Ll^T%Q O8Y 'PO, &ޯ^P,L{l:f#nHZ8)!3uPU`5JRY%F=%x(HfYp|`$bsYS;*@ݳBXZ D|/˸0>}VtJF^Rx2{/NKȬC v/NW0Jo1?\!v$lgZ34o {}Wh]ԵVLI_'TdDڲCp z%6[Px{|[W4 )5i{3p E 첑 YXCzK}YqI'LMӿi[ PLSFa@ul.9Yt{wPv 2RMq8!% Br?bj`Z;S"h~$I]Es"I87¹uq{&=[7 imAؖ<1O7tIVOBLt9~֡;!e!;L?h53\G[RL ՒԮ tbCE0o"ZO] 5 j:qpu*&$CƮ?Nf:bj=66p;-rXփ/_D`lh<+H^]CkJ3X& ],y.Ɛk0$-*Tj՗c >U> 훳 `!&x>1g/7ߘv׃RS`@?./aJ&W0mmi N;jC`iX)1&C\OouYMd`&nʰOZ%8~Asp /2 J]P7#jB [TO˲`"9:()v=]F6gq&2U[GpLEi۔+ v7x.X@n.>-x3E)[*5ъ}nG58L4 1怒x`{.IwQy%ŕ|8.HäU; "$>w[6* or^JR29!&:OT ~s1qXޭKY¼t჊-zxz{yj؛ڲf?7*\f 帺VP;*s@jHu$_mܲ\_!·::KSΪ/UƲo{MG\-#5{+diNYwA']ݕ6Avp&ש'{odx2!wn%ۅށE$_C>^Թ,"P'ꘚ㮥.;ioj8-oiFgZJ?p%vemAp$f]e.xsI(>c)}!T: a@o<.&~iJTMtQ%>KiS(:uQ ՠBRIGF)EV (D§MȍNj/LP%1A}\E! l e20.sgPh{n>!0 ~AU ; /%gZ<^5/o&YȮ+YB?;l@_dn&@_|"팸AS#XDȝWĽ,DG)̥Y3ܮ$|-r çר=(RQx#VhR ר54Jn6ĹS߈lն7<ء8dPL <_`3Sc0>U\plantuml-1.2017.15/src/net/sourceforge/plantuml/dedication/PSystemDedication.java000066400000000000000000000055371312650303100277620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.dedication; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; public class PSystemDedication extends AbstractPSystem { private final Dedication dedication; private final String keepLetter; public PSystemDedication(Dedication dedication, String keepLetter) { this.dedication = dedication; this.keepLetter = keepLetter; } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, HtmlColorUtils.WHITE, getMetadata(), null, 0, 0, null, false); imageBuilder.setUDrawable(new UDrawable() { public void drawU(UGraphic ug) { final BufferedImage bufferedImage = dedication.getBufferedImage(keepLetter); if (bufferedImage != null) { ug.draw(new UImage(bufferedImage)); } } }); return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os); } public DiagramDescription getDescription() { return new DiagramDescription("(Dedication)"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/dedication/PSystemDedicationFactory.java000066400000000000000000000033071312650303100313030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.dedication; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.command.PSystemSingleLineFactory; public class PSystemDedicationFactory extends PSystemSingleLineFactory { @Override protected AbstractPSystem executeLine(String line) { final Dedication dedication = Dedications.get(line); if (dedication != null) { return new PSystemDedication(dedication, Dedications.keepLetter(line)); } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/dedication/QBlock.java000066400000000000000000000047171312650303100255440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.dedication; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.math.BigInteger; public class QBlock { private final BigInteger big; public static QBlock read(InputStream source, int size) throws IOException { final byte[] block = new byte[size + 1]; for (int i = 0; i < size; i++) { final int read = source.read(); if (read == -1) { if (i == 0) { return null; } break; } block[i + 1] = (byte) read; } return new QBlock(new BigInteger(block)); } public QBlock(BigInteger number) { this.big = number; } public QBlock change(BigInteger E, BigInteger N) { final BigInteger changed = big.modPow(E, N); return new QBlock(changed); } public byte[] getData() { return big.toByteArray(); } @Override public String toString() { return big.toByteArray().length + " " + big.toString(); } public void write(OutputStream os, int size) throws IOException { final byte[] data = big.toByteArray(); final int start = data.length - size; if (start < 0) { for (int i = 0; i < -start; i++) { os.write(0); } } for (int i = Math.max(start, 0); i < data.length; i++) { int b = data[i]; os.write(b); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/dedication/QBlocks.java000066400000000000000000000053261312650303100257240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.dedication; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.code.AsciiEncoder; public class QBlocks { private final List all = new ArrayList(); private QBlocks() { } public static QBlocks readFrom(InputStream source, int size) throws IOException { final QBlocks result = new QBlocks(); while (true) { final QBlock block = QBlock.read(source, size); if (block == null) { return result; } result.all.add(block); } } public QBlocks change(BigInteger E, BigInteger N) { final QBlocks result = new QBlocks(); for (QBlock rsa : all) { result.all.add(rsa.change(E, N)); } return result; } public void writeTo(OutputStream os, int size) throws IOException { for (QBlock rsa : all) { rsa.write(os, size); } } public String encodeAscii() { final StringBuilder sb = new StringBuilder(); final AsciiEncoder encoder = new AsciiEncoder(); for (QBlock rsa : all) { sb.append(encoder.encode(rsa.getData())); sb.append("!"); } return sb.toString(); } public static QBlocks descodeAscii(String s) { final QBlocks result = new QBlocks(); final AsciiEncoder encoder = new AsciiEncoder(); for (String bl : s.split("!")) { final BigInteger bigInteger = new BigInteger(encoder.decode(bl)); result.all.add(new QBlock(bigInteger)); } return result; } } RyHcSMMTGTW-ZlDelq18AwlwfbZZdfo-Yo0ketavjyFxRAFoKx1mAI032reWO3p4Mog-AV6jFqjXfi8G6pKo7G00.png000066400000000000000000000124041312650303100427700ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/dedicationTG=ƞ u([2PHWjIq?9|:{LmF49HtEMEhPE[:wzÈa%t#od@/#ȉ;j~jLW-fB0漈Uᾦ*xz4%z'yKp2Nhy+1(wS$$ŔZNKM݊VXCYJ$K`C E]԰­ram`4%OV ^IC6sTBY̼omK(.<4M8S܂i9<}d^mΙ$T/m%(Ϸ\^>h&Q7=o8m 0B⦘و*TpaצvaMirQۄsFYBRt`}fS_ĐI.s`l5j2`\3~.^enF7^[ !Zx3={_:b:!l0O[{pgRL|7γt|ET|/\ui@"_ieh",9\GNphC[,(W_aT/[y@%D,UEʹ5KA;l%=xv(M ?X**VKY}amZ߸DӶöh#]̭׀#ԩ̈2f9CO@_3",!+K K3 @7`N6A"jh W3qn.Vf`،GIC7 r_\PLS6r^, }р5SVG{P˜ZVO9@N"/[ƌ@{`PxZn g_> ]L]6SkFkqx^8@S{r@DVlS`s7+Txݪʎ-si"b 8qˌ"h0OO1UriTk5!1Cgbp͝G4-(\-ifPT6N9y)8|1V+sJY>ݤ@D\ݧV-ށj=bu&Ր}So#:T`>9^nBɨfC-*8:Y==ʧv?%6}jπ! -Pٵi)"ҰDDŻ:$8N)LFBM{|4J8rjHݼvz@Ə ^ǵFk<ULKf:D(>؝v,"^Vq@Ũ>Ywܬ,=2j02W}XA؁SRңґZ+H<N_+31Bsθr+,q뜇/VOvC&RiE8CeO;l1Lo̎^G  fxCM4_ua=~ cx0=\h[@1/^$炓3tg$1ZZV|KXx_NY`M5Roh=q:WyLn\&TtTT,Bq] KVvG!n;. o q"n2CHaf zf@=tlV eK; \s"ښs]TJi8.!3VW)}_H1QAk bsˈf?sڶۨb}8 `|:ʆ]th?F/lj"Ykӗ|Nm1-J 6]|s?ưsڝKjmс_4@tž-}嶀%rOtOM FW]ZvZ(ObfDBn]ߕDxVB `m'B'/7qAiT"`arZZon6^dcIU7Zr ,W:|ܳ:Pb3@.THRP۰ޚSISO|`l(çdY* ۿR( qUfAb A70١۾(NVp04[becd8C$fXAFJ۞;aʁ/Gi4Vj}>bvJm;:d\M$R9"Lq_CH &}w?Jhk[ցMqT2K0g(Mml_. 4𕛛}㡀̯sN(4)_@($9cv=92sĦD, b!&{tCdKAk '#% + ޓ2Yլ$qs {-k: N>4>M50v (}~Nȧ h TÜD(9Ƨ_<2kI Tʂ?rgĊp+¢XXX! a}H8W]hZtZRuJ6@~/ t6w3ù) *cOԃ>¡#tOݍ惢-2J2 :_VP{dn t9(ck4>uYV&P;vVx tb=`G:J34.}{>Ki~*q<.{EB6iP:LF|g=bgbD[fUzǫ:$#dc,U շ `b@od] ]( [ӌGnm|&r"Ϊ#g.ĀPbLxVeT{[-kLm"0>NfbBjQY:Jc*ilieᩎĕf8ISH0v+!,t s? **pm3yQ){!؁ff :2pH#+0(ej94at !T.@u"ý1##ݾ?:KV;#/3ILB % pHվ}Sg?q;LGsʂ`kx =>}3'iSK@4ç3ی$t50YW;a| Bɳ{}Ucu5p2<{@^0>** Q=<) T%%ӓ%8 $ IƇ5OLoaN@6V&cS M''o $JdIql% Ssi'c_]JqMG30"6 W[2LG8H%߫K5Rwm0DžAF ͅZ!w)#?!GF*1][$1Uْķ'E)iQ$z!4Yӳ2JP 7v,c(z rq$~d09!D.u,;*>4#-vѹ+\L”rF ˛x2q#X\Қfn&F yc1ȡyyߗ D?AхKl@߷E-"/,Mu#OY}Z5bBsb?~4d=)A5[#mVޭm/!%+g0Ѭ}?t~Q7fNx  "WU*V!-ڴx X59Ia*>IZ?/'7|ݬ= key.length) { idx = 0; } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/dedication/dedication.png000066400000000000000000000370371312650303100263400ustar00rootroot00000000000000j@U9WOg@.D2O)Mk%m7Ľi >MB/OcN:͚HdPxVk^ɗN*_$TsQ4 [hk$k xI\r.΀_u"v=mH**ȰGe EۯV+*L]bmF6C o_Wc󨠌k2!NONEZ%-elXNk#7V:+"g$6@0Q'gYڽϹj;6Sa3L&bZr Yr ڝ.eQ?AI=ϡ-^$1p*l&Hzdxjb߂!#͉#.Ɠ_-;'肨N}(hAo .ycE660dk~I% PqWXˆI]Z^ѮDNw;1`uuQ?CSMvQV%譺/r3q5 ~JTvHޘ\ҴJE7G pkg++j!nEeh\FpO =I`,Q^ y5os*']I.@NXb !K7nkn 0b@MR.1dۺc(EorP蛍)4.9Ue)Vӎ/}|Vy'P<;p"+蟨c; upCqa7GsJx. C\C|+Ah*f9ѕv=/om8xZŁȍav'n[__Fc+v-ہ@%Ӻl([:mb6(d"G+͍ix-,o2K-JClkw)I0WÛL@V3%iHT@Ks -?$MNhgk*sIxfޓ&.Is26uTz5?_?? "[}w kwp'|vKD`i 6tox1}hy7!]jq y8pYbsp@4dMHda$S_hD]@#R^n}`9hHip3z 6>qT~tA>a*TedE Bgg~BLj !l%W^ch'{J ӻƎn5G[p{g1~kiY4z9#(} 沤HƲD-,M];-}6XijWB j".BqG_Y)bv/m6ԕltP>~] Ed~-S`aB2J$/Dz擸 BS] !QlA= 䱇(رH 8J c؆4!Q`Tnx!7*?\²|ǘq{= [#NN|lQ |4\?tqfڣ2.Q#2;_d+Dܣz}eP2YL2CBߵ>6B*CDG}Ҡ3RcRHm p޿C([(&&=#)}2K:ߩ;Аȯiek;!e2}pWZ3l62d W\bf$5cdx0q|oq;bs עi%${y/0|"E'1AYLh035Sl6ѵ>]Q>*޾lԣ.>TNdb9GtDRmK|B-Lo6)C($kaaYT|+M۳Gca oj@'|W"X]DN@m Q~3#~#P/p0G3)~]Ou$~DtwiYJܲ& ZhֹidNrS'[Se#]$tWhg!Hf^.,dow 8=lTg/%ї32*? `zL蜺1Wb[; [&W7-W?ỳt?2M6#0 'Щ4r.< ѧd҃ĀoIы-@GEk*U+3T(>mj70S٬"yέ@뎏TKG`t ~U@8ʫ.([TMA\\V6dNfKm8oܙ}/ zDK9r2X{jEYL KezliVg}SsePpjTq.OpJԎbz'eVb% x} H'$4Ӈ(K@P%iA:v_Koe MԆFe0O,clZ+Z$1ɫu+~d P6J7QUtY<_zGx$٨[c/5Mi=֦c!_}A VCrL͘ь4|$g{>)pcBRMW('GZOo(L7AW87(%AY[EhEHhS>N/M-hRKzOuk>dX+QL6a!_*lM-(ǖc)SOrE7f}SPKT&#ĐqWy[ڎaKD:壌R4a D!6I$#j   X9-sTȘu{q%(5S)$Ļ4r^=y>F:#b@jy1$d7跖zV=y&|V@zuz)ZӥxH3#+u*[-'f$@ɁL)+̷_\2.y@&K G߫O>oN `/H00" ~J@ȑhxyFGyՃ +"2rPW_f{0 S#Vzi±rE\FnWE _ 50P)V͏1^Cbb&bL)ȸ7NUشH v BoMO{&ɛec^7whbCBӐ;vL$oI*Ksȃ=Xr-Q6"qoܳ%P0!Ң>>%f,%kW1~7*VL©4Aͨd{{ڿvu!G9 (G: Vd RdX2\S{b}R&T|Q'*Cof!C^Եҙs>$ܦnWu+Ao82Pl c˶ڲ¸`!ܸ@vO›$ gdVQ4PÂO+^NWu9M 'Dc2 @:x"j?K9ilh?LjwZ#:?i'\?+TaZ%VU}41`z8"Ӿ}ǔ |6>jM8|%i WHsOJ+2MMtml||/J {h*q+o}CzD%ME>]es1:y%YIZ۹dn7;$odw/spdQw>9|}z;a 4o߹73' jȀWp) 6 23Tѩn;6=ض?>J޿c<~rAl\y׈ׅ#݈\AlAiY ⣖paP eucrϔeĢ:oU c$Ak4ON'ʹ8 qL}ۢ920xP0b Yms,[D)ٺĭU3HMAi=o\9:zIfK;p$!c?U;L;tzX(@M&zsm!s~UO3j'|b.%*:\)bKItN&x./:e\|9/8hKі( 76CD_Fl _w:cށe  ُO> [S(kx,Vup 3Xo0zEKԵ/GY&a?9T5؛ǡ88[.9Ne.7I~T<%#BCd6C,4.ޏY6<{3I*bx QݞPL!+0HwjSl1s >N<~:o_d=CE#yLgU_B1E "! r`-$$`3 >j!Va$L]Crm &V[;;-n8]iYVY"p>-Tb.J$#G@/yKg)-_ nE%X$ 7@BK 6P%p2焭;n.RU7 kx*Ý (|1,g/TN\3sCn|?Ј(_kxej0]vV ûpcw$"ͥs|6{Q %$-ͯ^}^bj/b b LRexHu\_R=>| ~~Z 1A0co;,&u/UWژw`O @qv("whB'N0C&nUhqq6]*ߎ Z]PO]FpBv!W8,si *5vxiԁ)3ѱy燰 CTAe(-￿yPhy2Cqsc~P :aU)%b̛DCY/Gsud@rЕ_~;9୤l#SA"Day.6Ar$ } p/wVpC^E0LV(ZEHAG__(+vTs6CrH~yqbeJqz|7.I24%ۯD.e,NɊwTL 3[V !s#'<5Gi"p3?MJa0\::\vhҨմ~$7pie~Sxws^{sRʬk-1^BU7SJUקK<TÐ cȃù[}7 k˭{'t_3~T'M9;M _ZkGcG&]o{BF!T~`mNTq2s[\F$#]NmkOp3.q~U9 Ǵ6tb|ׅ116);C&S2EdeA]/Ν;l!#r! (T}Ij<5cY *NfQj\.]W=Ð ܮjQ> vDY{\ yl/_?C2xp^4Ie'Ѵ!P}(&?[@&uv&$~}NBzU _0 ٔ//(vq _BG SE|]S@9oOS18IFu;pz<O| !$PV$7ɔ=( &?ÃN | =F0B_!IÀLŲ~~uG)PO(2ĮxT*/۳sDE@%6\(p:eY8B0QxϛLjM@OV}0ZH1[pw]حiD,`#a)BKu+Lž4u].TL5 ZHo3OAUc\Zw5e_욂rg ǎ{@3ТW]4n:]kՆzXxV^O#*08 !HOn/,*aWw+hKܦRVdiyLt\ok$ T&Vϕ$fɫv'G̾n\7oě' '%{6ׯ g`.};ְC0S[Eo7*cfdY7+#T@&YAqѶFӳn1bu`8nn9frmrxw.oO nC8K .Yo+ߩ]HۮaZNR2T%H;9cI+@\nxYW6 ʗ־~1[ӉH - $-?k3l.ҥ1kXɊw-0TKQh,"Tx-NZβRDᖺ,5 cწOo*Q+X%"Y yO?{Z~M-*)հ%sV9\e7H2!oP J"M9t=('$\#>kQx™OBMhnWY)gBm^ a-KOzo6K >Il.A)@n}[IrSԫL%|.$DߴPs/ pLsb[+t@H%p-ae_KhD:rdf@5< rw+*ZEĠNN )K_%D|;>SO@{A/4';|Zn))o1r+~ c ՜CP\HPBnLT XcKV\.؏W47LZM%`2E5$?_th'X^t4Y:3 W FF@uWmkjei''8|Gx\*)s ɡd@/YxO!OڇCaьhfgi$`(E /w(SrFDEaԤ-~_oJro@btmGӥ^ M3^-sG&e}]GË#Y<떮UlWW]ۙKG\~]@yK嵃̦<+f"#xr;1*ȿWCrN?oy9گ}]Mg* Px.QXz'p0\{L?X~yMbkϰIkhZ/Z"By+ G0+jUwfng qH<]q8G]a!IJQu-A\+HDXqd.ivN->~9кѲyk36U ):F=:A3s38@3c*Ծ?avZl|M_Pqu&zXӞa7g'AuB8eߚ,c UnUo nw;7y</ [SHSos8VHa'%Ϲ'Wŏc; B%]N/!$UxshHh'9dsXR(wpe3F[>݅>׳՚@*OFow~UY9-n/7u!VJPFE6_&| %hts"#JU&iYd0a8;0*^7_3W-+ҫ0gomS 5V*>gӌaHNE( R= O9 ʃ '7X <n ?K۔6m 4bc|~!Wk۲J:JVSӭm\5QadV52xCxU<=CyI=YB+9 >Fydb|qɟt[a {&5Z0{|":+1<)/s U#  <(ɗ5X(fī2$_(Im /UM$n#ؐOɥ$ܩTݢ:i;w>:[AǰXF%VGqFp\^v!HBT":`>%|ߧ–ew =l)_oa]ĭ2 #/pmi(&Ѽ 0R^DpbQ xړfUk,<*|nչ௼`(I)] 'hH{G ;'>uБ`Sur.V ȝ<`J@;֒bB7 2ʦ|v"my3 d?5cʧd;'ȆQ-ra-o@Y"cA(\$SIbR[yߊ &: l&Esٙښ댿pT]) jdsG0Œ䈙kDMϿnH*D%C$]h*6Vxu'ΛU1&1%2g88LyTo9 q$H^x).a* VVdmfww/ MStW Q2IkPOꛅ`=;̂Cd(1Fc]nkDž zך0 &C/Ke]벨}Q+0>45!g*#K+A8:d%} 5lq[J'2`vi>Scil/xo Ћ}6viun5`lX;--cJ2/pN!NvC=%ĖR$HM*?'G6A҂oL|fev{1Ey`ļ[^9oʿk@l ]P_)ELg'ZbUu_;G@esxv~hiNe܎qrR-xÑ +ߏ Yۘq"?hMi]U9D3+?.iF .`qץ($;x7E?Dq - vb"w  d!job u/M[Q.{b,VS m)ߪU"/次!됙|Ȩ;Ӎa+YJ1bö( MUkMͲ^>{7t64#fm0c" 98*"?_+ďWӹiwz 9_.l"eWhP'^Ĺ$Y=ƀ'x%Pdj8$RUؠ 8s0Mʦ\ch6TCw% 8 zQtPߍ:bHuMӽw3zoS;ΐ;醼Վ"Tzmƕ>Rg_l4Yt+);`!ZaE#I:rl4#BZC+4Z6RW/L䷸A-`¹ #QOc&mo! Q-ޗK`X=끃p(۰ė6e?O} (T|pjnzwOl+M< R#q1 j ? 3 :10-yy*.LJX zYt [;"_oK&X%#l_HC7k|52B:^ScoHp5ὬFXA O96V1cxEЋ[cڪAMA;5]>?XCp5 0>rs}vQl d#BԹ\nb_vٴATrθQ & ĉˋ2/` [V}sk-'?~.ㅪgZl`;`8#,꿴ItDZIL{#.z4YnWZR"\Kcxr,Cۚ9ɡ>P,}y"AqCK@젖(nT|Oʖ:ju%[zbR13-`T1zd=oe˘t+{;'NV ZgVxoCpMwK(ԔLv+a4,W X=Ѩ]rSxr«)UmF!ы)WӚb @Ot ,"W#x} S=_Vm_vHhuqй[40ݷU/Vl% P]3IK(áZ["lrmwWEhpqsƪ|Y9*z/OQ GbظDAX *z *Ltd8#E 'W>ezF{-:ũ`:0-0@Մ0軇o_+Igx9ģRwoe_QʝT& #蔵n^r_<揂DA*pnsa+=jJ{OH ^*agy$fao5bX*&-Kpeň{L,J8^xV8V#HnӜ`C詥 Zۙf^)̭)A{ T^'ӻ?0B~?@gԈ8uf9@B׮lNA^jr07V z RO!vx= zOyf*XmKEXX1ŵrhʹ!uFA"kafa ܺծuR_xM0>z~AŴ)pXK Eͨq B'. -dJA!N&[˰`< B:0y qXiR RbPB7W4Z(Sx^cj1{mîA u!S:kz[)(;B{< q[Fƶ9|_J ->bINQ|[s'vBC3&1ϭUwhF3 B-ܢrLel=|V#֋&ո2R(O'+9g$y⋔lO.vgIRh)40*}?Ex``St3[c87ZpΩP/,ߌ`\jԠ(PXPY8ΥXKi)% !\&C3ߘԖ{N Ȑ;J<\Cz.H' py.êНe$ A<)Bj.F 74ä+2w4)y O DN#b]g)1U3* S&;<+fwڜ/qWގ|<3#kmuʚ\ַfNkY ߥLVf4ЯNپ]H rז&]_L0J~n3B,0FzF;|Ѿ;qclE@վQ N*To,Tk&F7;}K Rxk/ d~_p5P SԼ雷2׋J;vg=[ @]%`+T)d{îSkf :$qW%Fbd2fEc%Kݢ=X0z|׵ E6 ci`j)mjl4嶇 i љk&EBvMQH~`>(E;ȘUqꟴy͎ ?ȣF}y/>@ `Xy(D./F [oR2$܄=m@3DZ%0$}&6Tu7G`n"'54N{>AyS3V# ނϳy4F Inz) felfefY_ GM #-oJS@hˆY$HJ? t}L_W 1E*l?>Ib~\9LǣGȹ| rȞq@9EDfNi4"T~m3TOj@p@J? Q{/9+r+ֵT<`V$6' WGCV0:" >mn~bDKUܰCRHO$x 32Ow(ȏIeZ ׼7x|vsl}Y3DL~qܣ"HK0̕%إƣ;q,# ^= `ƃ֝1W;Uf'W.19*K6.+?sx<}X/̩䳥\ΆY{]Ĉ]{QvL$)rjsoxQb[\55u{*QF1 A:Ď-9nkR$רv`s&S`T)Z*I嘡1֜(.V:H |:1 ~Bn tgxd@䒄TȦXInJ YBIkJ2Ac3~Qn;{(ߒI;z$an}I7.Ү2&-@d!usP)5+:Jn\W}"qLY+U;yoц!_ Dw'mDIdMۂ]cRun^Ɗ%!@X=0g 6&s80<wB_9zt ׯdHدs8DBFvf6I`)}vqC݀ P,<6{PEoxMet2C/z D7b:^To<ڔ2YDB"刍eKeG>>{ZoIx{"Zyrٚ+C:`3A:S|}8y;S[C/DYX27dZ+ɕPgʔnCl"'(o[F40ӇP1x;i-CX%0&h ?>xn~9 \3jrjPU'd$Ȣv8Hֽ!x+]UQ2Aa>HemRb]k9ciçhaǍr?Q)p6{u,fq~PIz!`ʠmf47rr6x ˀKkbQ-A;Vho$`\*窚5MaC (aTMX4e3W^ҙ"R}wQV!N+DR{ zw.Q53`GtKϐɐ^_uplantuml-1.2017.15/src/net/sourceforge/plantuml/definition/000077500000000000000000000000001312650303100235425ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/definition/PSystemDefinition.java000066400000000000000000000063111312650303100300230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.definition; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.SpriteContainerEmpty; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; public class PSystemDefinition extends AbstractPSystem implements UDrawable { private final List lines = new ArrayList(); private final String startLine; public PSystemDefinition(String startLine) { this.startLine = startLine; } public DiagramDescription getDescription() { return new DiagramDescription("(Definition)"); } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormatOption, long seed) throws IOException { final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1, null, "", "", 0, 0, null, false); imageBuilder.setUDrawable(this); return imageBuilder.writeImageTOBEMOVED(fileFormatOption, seed, os); } public void drawU(UGraphic ug) { final UFont font = UFont.sansSerif(14); final FontConfiguration fc = new FontConfiguration(font, HtmlColorUtils.BLACK, HtmlColorUtils.BLACK, false); Display.getWithNewlines(startLine).create(fc, HorizontalAlignment.LEFT, new SpriteContainerEmpty()).drawU(ug); } public void doCommandLine(String line) { this.lines.add(line); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/definition/PSystemDefinitionFactory.java000066400000000000000000000035341312650303100313570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.definition; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.core.DiagramType; public class PSystemDefinitionFactory extends PSystemBasicFactory { public PSystemDefinitionFactory() { super(DiagramType.DEFINITION); } public PSystemDefinition init(String startLine) { if (getDiagramType() == DiagramType.DEFINITION) { return new PSystemDefinition(startLine); } return null; } @Override public PSystemDefinition executeLine(PSystemDefinition system, String line) { system.doCommandLine(line); return system; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/descdiagram/000077500000000000000000000000001312650303100236555ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagram.java000066400000000000000000000124201312650303100302670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.descdiagram; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.graphic.USymbol; public class DescriptionDiagram extends AbstractEntityDiagram { private String namespaceSeparator = null; @Override public ILeaf getOrCreateLeaf(Code code, LeafType type, USymbol symbol) { if (namespaceSeparator != null) { code = code.withSeparator(namespaceSeparator); } if (namespaceSeparator != null && code.getFullName().contains(namespaceSeparator)) { // System.err.println("code=" + code); final Code fullyCode = code; // final String namespace = fullyCode.getNamespace(getLeafs()); // System.err.println("namespace=" + namespace); } if (type == null) { String code2 = code.getFullName(); if (code2.startsWith("[") && code2.endsWith("]")) { final USymbol sym = getSkinParam().useUml2ForComponent() ? USymbol.COMPONENT2 : USymbol.COMPONENT1; return getOrCreateLeafDefault(code.eventuallyRemoveStartingAndEndingDoubleQuote("\"([:"), LeafType.DESCRIPTION, sym); } if (code2.startsWith(":") && code2.endsWith(":")) { return getOrCreateLeafDefault(code.eventuallyRemoveStartingAndEndingDoubleQuote("\"([:"), LeafType.DESCRIPTION, USymbol.ACTOR); } if (code2.startsWith("()")) { code2 = StringUtils.trin(code2.substring(2)); code2 = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(code2); return getOrCreateLeafDefault(Code.of(code2), LeafType.DESCRIPTION, USymbol.INTERFACE); } code = code.eventuallyRemoveStartingAndEndingDoubleQuote("\"([:"); return getOrCreateLeafDefault(code, LeafType.STILL_UNKNOWN, symbol); } return getOrCreateLeafDefault(code, type, symbol); } // @Override // public ILeaf createLeaf(Code code, List display, LeafType type) { // if (type != LeafType.COMPONENT) { // return super.createLeaf(code, display, type); // } // code = code.getFullyQualifiedCode(getCurrentGroup()); // if (super.leafExist(code)) { // throw new IllegalArgumentException("Already known: " + code); // } // return createEntityWithNamespace(code, display, type); // } // private ILeaf createEntityWithNamespace(Code fullyCode, List display, LeafType type) { // IGroup group = getCurrentGroup(); // final String namespace = fullyCode.getNamespace(getLeafs()); // if (namespace != null && (EntityUtils.groupRoot(group) || group.getCode().equals(namespace) == false)) { // group = getOrCreateGroupInternal(Code.of(namespace), StringUtils.getWithNewlines(namespace), namespace, // GroupType.PACKAGE, getRootGroup()); // } // return createLeafInternal(fullyCode, // display == null ? StringUtils.getWithNewlines(fullyCode.getShortName(getLeafs())) : display, type, // group); // } private boolean isUsecase() { for (ILeaf leaf : getLeafsvalues()) { final LeafType type = leaf.getLeafType(); final USymbol usymbol = leaf.getUSymbol(); if (type == LeafType.USECASE || usymbol == USymbol.ACTOR) { return true; } } return false; } @Override public void makeDiagramReady() { super.makeDiagramReady(); final LeafType defaultType = isUsecase() ? LeafType.DESCRIPTION : LeafType.DESCRIPTION; final USymbol defaultSymbol = isUsecase() ? USymbol.ACTOR : USymbol.INTERFACE; for (ILeaf leaf : getLeafsvalues()) { if (leaf.getLeafType() == LeafType.STILL_UNKNOWN) { leaf.muteToType(defaultType, defaultSymbol); } } } @Override public String checkFinalError() { this.applySingleStrategy(); return super.checkFinalError(); } @Override public UmlDiagramType getUmlDiagramType() { return UmlDiagramType.DESCRIPTION; } public void setNamespaceSeparator(String namespaceSeparator) { this.namespaceSeparator = namespaceSeparator; } public String getNamespaceSeparator() { return namespaceSeparator; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagramFactory.java000066400000000000000000000110761312650303100316250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.descdiagram; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.classdiagram.command.CommandHideShowSpecificClass; import net.sourceforge.plantuml.classdiagram.command.CommandUrl; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.CommandEndPackage; import net.sourceforge.plantuml.command.CommandFootboxIgnored; import net.sourceforge.plantuml.command.CommandPage; import net.sourceforge.plantuml.command.CommandRankDir; import net.sourceforge.plantuml.command.UmlDiagramFactory; import net.sourceforge.plantuml.command.note.FactoryNoteCommand; import net.sourceforge.plantuml.command.note.FactoryNoteOnEntityCommand; import net.sourceforge.plantuml.command.note.FactoryNoteOnLinkCommand; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.descdiagram.command.CommandArchimate; import net.sourceforge.plantuml.descdiagram.command.CommandCreateElementFull; import net.sourceforge.plantuml.descdiagram.command.CommandCreateElementMultilines; import net.sourceforge.plantuml.descdiagram.command.CommandLinkElement; import net.sourceforge.plantuml.descdiagram.command.CommandNamespaceSeparator; import net.sourceforge.plantuml.descdiagram.command.CommandNewpage; import net.sourceforge.plantuml.descdiagram.command.CommandPackageWithUSymbol; public class DescriptionDiagramFactory extends UmlDiagramFactory { @Override public DescriptionDiagram createEmptyDiagram() { return new DescriptionDiagram(); } @Override protected List createCommands() { final List cmds = new ArrayList(); cmds.add(new CommandFootboxIgnored()); cmds.add(new CommandNamespaceSeparator()); cmds.add(new CommandRankDir()); cmds.add(new CommandNewpage(this)); addCommonCommands(cmds); cmds.add(new CommandPage()); cmds.add(new CommandLinkElement()); // cmds.add(new CommandPackageWithUSymbol()); cmds.add(new CommandEndPackage()); final FactoryNoteCommand factoryNoteCommand = new FactoryNoteCommand(); cmds.add(factoryNoteCommand.createMultiLine(false)); final FactoryNoteOnEntityCommand factoryNoteOnEntityCommand = new FactoryNoteOnEntityCommand(new RegexOr( "ENTITY", // new RegexLeaf("[\\p{L}0-9_.]+"), // new RegexLeaf("\\(\\)[%s]*[\\p{L}0-9_.]+"), // new RegexLeaf("\\(\\)[%s]*[%g][^%g]+[%g]"), // new RegexLeaf("\\[[^\\]*]+[^\\]]*\\]"), // new RegexLeaf("\\((?!\\*\\))[^\\)]+\\)"), // new RegexLeaf(":[^:]+:"), // new RegexLeaf("[%g][^%g]+[%g]") // )); cmds.add(factoryNoteOnEntityCommand.createSingleLine()); cmds.add(factoryNoteCommand.createSingleLine()); cmds.add(new CommandUrl()); cmds.add(new CommandCreateElementFull()); cmds.add(new CommandCreateElementMultilines(0)); cmds.add(new CommandCreateElementMultilines(1)); cmds.add(factoryNoteOnEntityCommand.createMultiLine(true)); cmds.add(factoryNoteOnEntityCommand.createMultiLine(false)); cmds.add(factoryNoteCommand.createMultiLine(false)); final FactoryNoteOnLinkCommand factoryNoteOnLinkCommand = new FactoryNoteOnLinkCommand(); cmds.add(factoryNoteOnLinkCommand.createSingleLine()); cmds.add(factoryNoteOnLinkCommand.createMultiLine(false)); cmds.add(new CommandHideShowSpecificClass()); cmds.add(new CommandArchimate()); return cmds; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/descdiagram/command/000077500000000000000000000000001312650303100252735ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java000066400000000000000000000116521312650303100313370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.descdiagram.command; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.descdiagram.DescriptionDiagram; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; public class CommandArchimate extends SingleLineCommand2 { public CommandArchimate() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("SYMBOL", "archimate"), // new RegexLeaf("[%s]+"), // color().getRegex(), // new RegexLeaf("[%s]+"), // new RegexOr(// new RegexLeaf("CODE1", CommandCreateElementFull.CODE_WITH_QUOTE), // new RegexConcat(// new RegexLeaf("DISPLAY2", CommandCreateElementFull.DISPLAY), // new RegexLeaf("STEREOTYPE2", "(?:[%s]+(?:\\<\\<([-\\w]+)\\>\\>))?"), // new RegexLeaf("[%s]*as[%s]+"), // new RegexLeaf("CODE2", CommandCreateElementFull.CODE)), // new RegexConcat(// new RegexLeaf("CODE3", CommandCreateElementFull.CODE), // new RegexLeaf("STEREOTYPE3", "(?:[%s]+(?:\\<\\<([-\\w]+)\\>\\>))?"), // new RegexLeaf("[%s]+as[%s]*"), // new RegexLeaf("DISPLAY3", CommandCreateElementFull.DISPLAY)), // new RegexConcat(// new RegexLeaf("DISPLAY4", CommandCreateElementFull.DISPLAY_WITHOUT_QUOTE), // new RegexLeaf("STEREOTYPE4", "(?:[%s]+(?:\\<\\<([-\\w]+)\\>\\>))?"), // new RegexLeaf("[%s]*as[%s]+"), // new RegexLeaf("CODE4", CommandCreateElementFull.CODE)) // ), // new RegexLeaf("[%s]*"), // new RegexLeaf("STEREOTYPE", "(?:[%s]*(?:\\<\\<([-\\w]+)\\>\\>))?"), // new RegexLeaf("$")); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } @Override protected CommandExecutionResult executeArg(DescriptionDiagram diagram, RegexResult arg) { final String codeRaw = arg.getLazzy("CODE", 0); final Code code = Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(codeRaw)); final String icon = arg.getLazzy("STEREOTYPE", 0); final IEntity entity = diagram.getOrCreateLeaf(code, LeafType.DESCRIPTION, USymbol.RECTANGLE); final String displayRaw = arg.getLazzy("DISPLAY", 0); String display = displayRaw; if (display == null) { display = code.getFullName(); } display = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(display); entity.setDisplay(Display.getWithNewlines(display)); entity.setUSymbol(USymbol.RECTANGLE); if (icon != null) { entity.setStereotype(new Stereotype("<<$archimate/" + icon + ">>", diagram.getSkinParam() .getCircledCharacterRadius(), diagram.getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER), diagram.getSkinParam().getIHtmlColorSet())); } Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); entity.setColors(colors); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/descdiagram/command/CommandCreateElementFull.java000066400000000000000000000207431312650303100330030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.descdiagram.command; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.descdiagram.DescriptionDiagram; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; public class CommandCreateElementFull extends SingleLineCommand2 { public static final String ALL_TYPES = "artifact|actor|folder|card|file|package|rectangle|node|frame|cloud|database|queue|stack|storage|agent|usecase|component|boundary|control|entity|interface|circle"; public CommandCreateElementFull() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("SYMBOL", "(?:(" + ALL_TYPES + "|\\(\\))[%s]+)?"), // color2().getRegex(), // new RegexLeaf("[%s]*"), // new RegexOr(// new RegexLeaf("CODE1", CODE_WITH_QUOTE), // new RegexConcat(// new RegexLeaf("DISPLAY2", DISPLAY), // new RegexLeaf("STEREOTYPE2", "(?:[%s]+(\\<\\<.+\\>\\>))?"), // new RegexLeaf("[%s]*as[%s]+"), // new RegexLeaf("CODE2", CODE)), // new RegexConcat(// new RegexLeaf("CODE3", CODE), // new RegexLeaf("STEREOTYPE3", "(?:[%s]+(\\<\\<.+\\>\\>))?"), // new RegexLeaf("[%s]+as[%s]*"), // new RegexLeaf("DISPLAY3", DISPLAY)), // new RegexConcat(// new RegexLeaf("DISPLAY4", DISPLAY_WITHOUT_QUOTE), // new RegexLeaf("STEREOTYPE4", "(?:[%s]+(\\<\\<.+\\>\\>))?"), // new RegexLeaf("[%s]*as[%s]+"), // new RegexLeaf("CODE4", CODE)) // ), // new RegexLeaf("STEREOTYPE", "(?:[%s]*(\\<\\<.+\\>\\>))?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("[%s]*"), // color().getRegex(), // new RegexLeaf("$")); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } private static ColorParser color2() { return ColorParser.simpleColor(ColorType.BACK, "COLOR2"); } private static final String CODE_CORE = "[\\p{L}0-9_.]+|\\(\\)[%s]*[\\p{L}0-9_.]+|\\(\\)[%s]*[%g][^%g]+[%g]|:[^:]+:|\\([^()]+\\)|\\[[^\\[\\]]+\\]"; public static final String CODE = "(" + CODE_CORE + ")"; public static final String CODE_WITH_QUOTE = "(" + CODE_CORE + "|[%g][^%g]+[%g])"; private static final String DISPLAY_CORE = "[%g][^%g]+[%g]|:[^:]+:|\\([^()]+\\)|\\[[^\\[\\]]+\\]"; public static final String DISPLAY = "(" + DISPLAY_CORE + ")"; public static final String DISPLAY_WITHOUT_QUOTE = "(" + DISPLAY_CORE + "|[\\p{L}0-9_.]+)"; @Override final protected boolean isForbidden(CharSequence line) { if (line.toString().matches("^[\\p{L}0-9_.]+$")) { return true; } return false; } @Override protected CommandExecutionResult executeArg(DescriptionDiagram diagram, RegexResult arg) { String codeRaw = arg.getLazzy("CODE", 0); final String displayRaw = arg.getLazzy("DISPLAY", 0); final char codeChar = getCharEncoding(codeRaw); final char codeDisplay = getCharEncoding(displayRaw); final String symbol; if (codeRaw.startsWith("()")) { symbol = "interface"; codeRaw = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(StringUtils.trin(codeRaw.substring(2))); } else if (codeChar == '(' || codeDisplay == '(') { symbol = "usecase"; } else if (codeChar == ':' || codeDisplay == ':') { symbol = "actor"; } else if (codeChar == '[' || codeDisplay == '[') { symbol = "component"; } else { symbol = arg.get("SYMBOL", 0); } final LeafType type; final USymbol usymbol; if (symbol == null) { type = LeafType.DESCRIPTION; usymbol = USymbol.ACTOR; } else if (symbol.equalsIgnoreCase("usecase")) { type = LeafType.USECASE; usymbol = null; } else if (symbol.equalsIgnoreCase("circle")) { type = LeafType.CIRCLE; usymbol = null; } else { type = LeafType.DESCRIPTION; usymbol = USymbol.getFromString(symbol, diagram.getSkinParam().useUml2ForComponent()); if (usymbol == null) { throw new IllegalStateException(); } } final Code code = Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(codeRaw)); if (diagram.isGroup(code)) { return CommandExecutionResult.error("This element (" + code.getFullName() + ") is already defined"); } String display = displayRaw; if (display == null) { display = code.getFullName(); } display = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(display); final String stereotype = arg.getLazzy("STEREOTYPE", 0); if (existsWithBadType(diagram, code, type, usymbol)) { return CommandExecutionResult.error("This element (" + code.getFullName() + ") is already defined"); } final IEntity entity = diagram.getOrCreateLeaf(code, type, usymbol); entity.setDisplay(Display.getWithNewlines(display)); entity.setUSymbol(usymbol); if (stereotype != null) { entity.setStereotype(new Stereotype(stereotype, diagram.getSkinParam().getCircledCharacterRadius(), diagram .getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER), diagram.getSkinParam() .getIHtmlColorSet())); } final String urlString = arg.get("URL", 0); if (urlString != null) { final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT); final Url url = urlBuilder.getUrl(urlString); entity.addUrl(url); } Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); final HtmlColor lineColor = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("LINECOLOR", 1)); if (lineColor != null) { colors = colors.add(ColorType.LINE, lineColor); } entity.setColors(colors); // entity.setSpecificColorTOBEREMOVED(ColorType.BACK, // diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0))); return CommandExecutionResult.ok(); } public static boolean existsWithBadType(DescriptionDiagram diagram, final Code code, LeafType type, USymbol usymbol) { if (diagram.leafExist(code) == false) { return false; } final ILeaf other = diagram.getLeafsget(code); if (other.getLeafType() != type) { return true; } if (other.getUSymbol() != usymbol) { return true; } return false; } private char getCharEncoding(final String codeRaw) { return codeRaw != null && codeRaw.length() > 2 ? codeRaw.charAt(0) : 0; } } CommandCreateElementMultilines.java000066400000000000000000000131021312650303100341360ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/descdiagram/command/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.descdiagram.command; import java.util.List; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.MultilinesStrategy; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.descdiagram.DescriptionDiagram; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; public class CommandCreateElementMultilines extends CommandMultilines2 { private final int type; enum Mode { EXTENDS, IMPLEMENTS }; public CommandCreateElementMultilines(int type) { super(getRegexConcat(type), MultilinesStrategy.REMOVE_STARTING_QUOTE); this.type = type; } @Override public String getPatternEnd() { if (type == 0) { return "(?i)^(.*)[%g]$"; } if (type == 1) { return "(?i)^(.*)\\]$"; } throw new IllegalArgumentException(); } private static RegexConcat getRegexConcat(int type) { if (type == 0) { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("TYPE", "(" + CommandCreateElementFull.ALL_TYPES + ")[%s]+"), // new RegexLeaf("CODE", "([\\p{L}0-9_.]+)"), // new RegexLeaf("[%s]*"), // new RegexLeaf("STEREO", "(\\<\\<.+\\>\\>)?"), // new RegexLeaf("[%s]*"), // ColorParser.exp1(), // new RegexLeaf("[%s]*"), // new RegexLeaf("DESC", "as[%s]*[%g](.*)$")); } if (type == 1) { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("TYPE", "(" + CommandCreateElementFull.ALL_TYPES + ")[%s]+"), // new RegexLeaf("CODE", "([\\p{L}0-9_.]+)"), // new RegexLeaf("[%s]*"), // new RegexLeaf("STEREO", "(\\<\\<.+\\>\\>)?"), // new RegexLeaf("[%s]*"), // ColorParser.exp1(), // new RegexLeaf("[%s]*"), // new RegexLeaf("DESC", "\\[(.*)$")); } throw new IllegalArgumentException(); } public CommandExecutionResult executeNow(DescriptionDiagram diagram, BlocLines lines) { lines = lines.trim(false); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); final String symbol = StringUtils.goUpperCase(line0.get("TYPE", 0)); final LeafType type; USymbol usymbol; if (symbol.equalsIgnoreCase("usecase")) { type = LeafType.USECASE; usymbol = null; } else { usymbol = USymbol.getFromString(symbol); if (usymbol == null) { throw new IllegalStateException(); } type = LeafType.DESCRIPTION; } final Code code = Code.of(line0.get("CODE", 0)); final List lineLast = StringUtils.getSplit(MyPattern.cmpile(getPatternEnd()), lines.getLast499() .toString()); lines = lines.subExtract(1, 1); Display display = lines.toDisplay(); final String descStart = line0.get("DESC", 0); if (StringUtils.isNotEmpty(descStart)) { display = display.addFirst(descStart); } if (StringUtils.isNotEmpty(lineLast.get(0))) { display = display.add(lineLast.get(0)); } final String stereotype = line0.get("STEREO", 0); if (CommandCreateElementFull.existsWithBadType(diagram, code, type, usymbol)) { return CommandExecutionResult.error("This element (" + code.getFullName() + ") is already defined"); } final ILeaf result = diagram.createLeaf(code, display, type, usymbol); result.setUSymbol(usymbol); if (stereotype != null) { result.setStereotype(new Stereotype(stereotype, diagram.getSkinParam().getCircledCharacterRadius(), diagram .getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER), diagram.getSkinParam() .getIHtmlColorSet())); } result.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(line0.get("COLOR", 0))); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/descdiagram/command/CommandLinkElement.java000066400000000000000000000303331312650303100316460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.descdiagram.command; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.classdiagram.command.CommandLinkClass; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.descdiagram.DescriptionDiagram; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; public class CommandLinkElement extends SingleLineCommand2 { public CommandLinkElement() { super(getRegexConcat()); } static RegexConcat getRegexConcat() { return new RegexConcat( new RegexLeaf("^"), // getGroup("ENT1"), // new RegexLeaf("[%s]*"), // new RegexLeaf("LABEL1", "(?:[%g]([^%g]+)[%g])?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("HEAD2", "(0\\)|<<|[<^*+#0)]|<\\||[%s]+o)?"), // new RegexLeaf("BODY1", "([-=.~]+)"), // new RegexLeaf("ARROW_STYLE1", "(?:\\[((?:#\\w+|dotted|dashed|plain|bold|hidden|norank)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden|,norank)*)\\])?"), new RegexLeaf("DIRECTION", "(?:(left|right|up|down|le?|ri?|up?|do?)(?=[-=.~0()]))?"), // new RegexLeaf("INSIDE", "(?:(0|\\(0\\)|\\(0|0\\))(?=[-=.~]))?"), // new RegexLeaf("ARROW_STYLE2", "(?:\\[((?:#\\w+|dotted|dashed|plain|bold|hidden|norank)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden|,norank)*)\\])?"), new RegexLeaf("BODY2", "([-=.~]*)"), // new RegexLeaf("HEAD1", "(\\(0|>>|[>^*+#0(]|\\|>|o[%s]+)?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("LABEL2", "(?:[%g]([^%g]+)[%g])?"), // new RegexLeaf("[%s]*"), // getGroup("ENT2"), // new RegexLeaf("[%s]*"), // color().getRegex(), // new RegexLeaf("[%s]*"), // new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("LABEL_LINK", "(?::[%s]*(.+))?$")); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.LINE); } private LinkType getLinkType(RegexResult arg) { final String head1 = trimAndLowerCase(arg.get("HEAD1", 0)); final String head2 = trimAndLowerCase(arg.get("HEAD2", 0)); LinkDecor d1 = LinkDecor.NONE; LinkDecor d2 = LinkDecor.NONE; if (head1.equals("(0")) { d1 = LinkDecor.CIRCLE_CONNECT; } else if (head1.equals("#")) { d1 = LinkDecor.SQUARE; } else if (head1.equals("0")) { d1 = LinkDecor.CIRCLE; } else if (head1.equals("(")) { d1 = LinkDecor.PARENTHESIS; } else if (head1.equals(">")) { d1 = LinkDecor.ARROW; } else if (head1.equals("*")) { d1 = LinkDecor.COMPOSITION; } else if (head1.equals("o")) { d1 = LinkDecor.AGREGATION; } else if (head1.equals("+")) { d1 = LinkDecor.PLUS; } else if (head1.equals(">>")) { d1 = LinkDecor.ARROW_TRIANGLE; } else if (head1.equals("^")) { d1 = LinkDecor.EXTENDS; } else if (head1.equals("|>")) { d1 = LinkDecor.EXTENDS; } if (head2.equals("0)")) { d2 = LinkDecor.CIRCLE_CONNECT; } else if (head2.equals("#")) { d2 = LinkDecor.SQUARE; } else if (head2.equals("0")) { d2 = LinkDecor.CIRCLE; } else if (head2.equals(")")) { d2 = LinkDecor.PARENTHESIS; } else if (head2.equals("<")) { d2 = LinkDecor.ARROW; } else if (head2.equals("*")) { d2 = LinkDecor.COMPOSITION; } else if (head2.equals("o")) { d2 = LinkDecor.AGREGATION; } else if (head2.equals("+")) { d2 = LinkDecor.PLUS; } else if (head2.equals("<<")) { d2 = LinkDecor.ARROW_TRIANGLE; } else if (head2.equals("^")) { d2 = LinkDecor.EXTENDS; } else if (head2.equals("<|")) { d2 = LinkDecor.EXTENDS; } LinkType result = new LinkType(d1, d2); final String queue = getQueue(arg); if (queue.contains(".")) { result = result.getDashed(); } else if (queue.contains("~")) { result = result.getDotted(); } else if (queue.contains("=")) { result = result.getBold(); } final String middle = arg.get("INSIDE", 0); if ("0".equals(middle)) { result = result.withMiddleCircle(); } else if ("0)".equals(middle)) { result = result.withMiddleCircleCircled1(); } else if ("(0".equals(middle)) { result = result.withMiddleCircleCircled2(); } else if ("(0)".equals(middle)) { result = result.withMiddleCircleCircled(); } return result; } private static String trimAndLowerCase(String s) { if (s == null) { return ""; } return StringUtils.goLowerCase(StringUtils.trin(s)); } private Direction getDirection(RegexResult arg) { final String dir = arg.get("DIRECTION", 0); if (dir == null) { return StringUtils.getQueueDirection(getQueue(arg)); // return Direction.DOWN; } return StringUtils.getQueueDirection(dir); } private String getQueue(RegexResult arg) { return arg.get("BODY1", 0) + arg.get("BODY2", 0); } private static RegexLeaf getGroup(String name) { return new RegexLeaf( name, "([\\p{L}0-9_.]+|\\(\\)[%s]*[\\p{L}0-9_.]+|\\(\\)[%s]*[%g][^%g]+[%g]|:[^:]+:|(?!\\[\\*\\])\\[[^\\[\\]]+\\]|\\((?!\\*\\))[^)]+\\))"); } static class Labels { private String firstLabel; private String secondLabel; private String labelLink; Labels(RegexResult arg) { firstLabel = arg.get("LABEL1", 0); secondLabel = arg.get("LABEL2", 0); labelLink = arg.get("LABEL_LINK", 0); if (labelLink != null) { if (firstLabel == null && secondLabel == null) { init(); } labelLink = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(labelLink); } } private void init() { final Pattern2 p1 = MyPattern.cmpile("^[%g]([^%g]+)[%g]([^%g]+)[%g]([^%g]+)[%g]$"); final Matcher2 m1 = p1.matcher(labelLink); if (m1.matches()) { firstLabel = m1.group(1); labelLink = StringUtils.trin(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(StringUtils .trin(m1.group(2)))); secondLabel = m1.group(3); return; } final Pattern2 p2 = MyPattern.cmpile("^[%g]([^%g]+)[%g]([^%g]+)$"); final Matcher2 m2 = p2.matcher(labelLink); if (m2.matches()) { firstLabel = m2.group(1); labelLink = StringUtils.trin(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(StringUtils .trin(m2.group(2)))); secondLabel = null; return; } final Pattern2 p3 = MyPattern.cmpile("^([^%g]+)[%g]([^%g]+)[%g]$"); final Matcher2 m3 = p3.matcher(labelLink); if (m3.matches()) { firstLabel = null; labelLink = StringUtils.trin(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(StringUtils .trin(m3.group(1)))); secondLabel = m3.group(2); } } } @Override protected CommandExecutionResult executeArg(DescriptionDiagram diagram, RegexResult arg) { final Code ent1 = Code.of(arg.get("ENT1", 0)); final Code ent2 = Code.of(arg.get("ENT2", 0)); if (diagram.isGroup(ent1) && diagram.isGroup(ent2)) { return executePackageLink(diagram, arg); } final IEntity cl1 = diagram.isGroup(ent1) ? diagram.getGroup(Code.of(arg.get("ENT1", 0))) : getOrCreateLeaf( diagram, ent1); final IEntity cl2 = diagram.isGroup(ent2) ? diagram.getGroup(Code.of(arg.get("ENT2", 0))) : getOrCreateLeaf( diagram, ent2); // if (arg.get("ENT1", 1) != null) { // cl1.setStereotype(new Stereotype(arg.get("ENT1", 1))); // } // if (arg.get("ENT2", 1) != null) { // cl2.setStereotype(new Stereotype(arg.get("ENT2", 1))); // } final LinkType linkType = getLinkType(arg); final Direction dir = getDirection(arg); final String queue; if (dir == Direction.LEFT || dir == Direction.RIGHT) { queue = "-"; } else { queue = getQueue(arg); } final Labels labels = new Labels(arg); Link link = new Link(cl1, cl2, linkType, Display.getWithNewlines(labels.labelLink), queue.length(), labels.firstLabel, labels.secondLabel, diagram.getLabeldistance(), diagram.getLabelangle()); if (dir == Direction.LEFT || dir == Direction.UP) { link = link.getInv(); } Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); colors = CommandLinkClass.applyStyle(arg.getLazzy("ARROW_STYLE", 0), link, colors); if (arg.get("STEREOTYPE", 0) != null) { final Stereotype stereotype = new Stereotype(arg.get("STEREOTYPE", 0)); colors = colors.applyStereotype(stereotype, diagram.getSkinParam(), ColorParam.arrow); } link.setColors(colors); diagram.addLink(link); return CommandExecutionResult.ok(); } private ILeaf getOrCreateLeaf(DescriptionDiagram diagram, final Code code2) { final String code = code2.getFullName(); if (code.startsWith("()")) { return diagram.getOrCreateLeaf(Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(StringUtils .trin(code.substring(2)))), LeafType.DESCRIPTION, USymbol.INTERFACE); } final char codeChar = code.length() > 2 ? code.charAt(0) : 0; if (codeChar == '(') { return diagram.getOrCreateLeaf(code2.eventuallyRemoveStartingAndEndingDoubleQuote("\"([:"), LeafType.USECASE, USymbol.USECASE); } else if (codeChar == ':') { return diagram.getOrCreateLeaf(code2.eventuallyRemoveStartingAndEndingDoubleQuote("\"([:"), LeafType.DESCRIPTION, USymbol.ACTOR); } else if (codeChar == '[') { final USymbol sym = diagram.getSkinParam().useUml2ForComponent() ? USymbol.COMPONENT2 : USymbol.COMPONENT1; return diagram.getOrCreateLeaf(code2.eventuallyRemoveStartingAndEndingDoubleQuote("\"([:"), LeafType.DESCRIPTION, sym); } return diagram.getOrCreateLeaf(code2, null, null); } private CommandExecutionResult executePackageLink(DescriptionDiagram diagram, RegexResult arg) { final IEntity cl1 = diagram.getGroup(Code.of(arg.get("ENT1", 0))); final IEntity cl2 = diagram.getGroup(Code.of(arg.get("ENT2", 0))); final LinkType linkType = getLinkType(arg); final Direction dir = getDirection(arg); final String queue; if (dir == Direction.LEFT || dir == Direction.RIGHT) { queue = "-"; } else { queue = getQueue(arg); } Link link = new Link(cl1, cl2, linkType, Display.getWithNewlines(arg.get("LABEL_LINK", 0)), queue.length()); if (dir == Direction.LEFT || dir == Direction.UP) { link = link.getInv(); } CommandLinkClass.applyStyle(arg.getLazzy("ARROW_STYLE", 0), link); diagram.addLink(link); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/descdiagram/command/CommandNamespaceSeparator.java000066400000000000000000000037271312650303100332230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.descdiagram.command; import java.util.List; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand; import net.sourceforge.plantuml.descdiagram.DescriptionDiagram; public class CommandNamespaceSeparator extends SingleLineCommand { public CommandNamespaceSeparator() { super("(?i)^set[%s]namespaceseparator[%s](\\S+)$"); } @Override protected CommandExecutionResult executeArg(DescriptionDiagram diagram, List arg) { final String s = arg.get(0); if ("none".equalsIgnoreCase(s)) { diagram.setNamespaceSeparator(null); } else { diagram.setNamespaceSeparator(s); } return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/descdiagram/command/CommandNewpage.java000066400000000000000000000046551312650303100310350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.descdiagram.command; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.NewpagedDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.UmlDiagramFactory; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandNewpage extends SingleLineCommand2 { private final UmlDiagramFactory factory; public CommandNewpage(UmlDiagramFactory factory) { super(getRegexConcat()); this.factory = factory; } static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("newpage"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(AbstractPSystem diagram, RegexResult arg) { NewpagedDiagram result = new NewpagedDiagram(diagram, factory.createEmptyDiagram()); // NewpagedDiagram result = NewpagedDiagram.newpage(diagram, factory.createEmptyDiagram()); return CommandExecutionResult.newDiagram(result); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/descdiagram/command/CommandPackageWithUSymbol.java000066400000000000000000000121221312650303100331350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.descdiagram.command; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.utils.UniqueSequence; public class CommandPackageWithUSymbol extends SingleLineCommand2 { public CommandPackageWithUSymbol() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("SYMBOL", "(package|rectangle|node|artifact|folder|file|frame|cloud|database|storage|component|card|together)"), // new RegexLeaf("[%s]+"), // new RegexOr(// new RegexConcat( // new RegexLeaf("DISPLAY1", "([%g][^%g]+[%g])"), // new RegexLeaf("STEREOTYPE1", "(?:[%s]+(\\<\\<.+\\>\\>))?"), // new RegexLeaf("[%s]*as[%s]+"), // new RegexLeaf("CODE1", "([^#%s{}]+)") // ), // new RegexConcat( // new RegexLeaf("CODE2", "([^#%s{}%g]+)"), // new RegexLeaf("STEREOTYPE2", "(?:[%s]+(\\<\\<.+\\>\\>))?"), // new RegexLeaf("[%s]*as[%s]+"), // new RegexLeaf("DISPLAY2", "([%g][^%g]+[%g])") // ), // new RegexConcat( // new RegexLeaf("DISPLAY3", "([^#%s{}%g]+)"), // new RegexLeaf("STEREOTYPE3", "(?:[%s]+(\\<\\<.+\\>\\>))?"), // new RegexLeaf("[%s]*as[%s]+"), // new RegexLeaf("CODE3", "([^#%s{}%g]+)") // ), // new RegexLeaf("CODE8", "([%g][^%g]+[%g])"), // new RegexLeaf("CODE9", "([^#%s{}%g]*)") // ), // new RegexLeaf("[%s]*"), // new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), // new RegexLeaf("[%s]*"), // new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("[%s]*"), // ColorParser.exp1(), // new RegexLeaf("[%s]*\\{$")); } @Override protected CommandExecutionResult executeArg(AbstractEntityDiagram diagram, RegexResult arg) { final String codeRaw = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.getLazzy("CODE", 0)); final String displayRaw = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.getLazzy("DISPLAY", 0)); final Code code; final String display; if (codeRaw.length() == 0) { code = UniqueSequence.getCode("##"); display = null; } else { code = Code.of(codeRaw); if (displayRaw == null) { display = code.getFullName(); } else { display = displayRaw; } } final IGroup currentPackage = diagram.getCurrentGroup(); final IEntity p = diagram.getOrCreateGroup(code, Display.getWithNewlines(display), GroupType.PACKAGE, currentPackage); p.setUSymbol(USymbol.getFromString(arg.get("SYMBOL", 0))); final String stereotype = arg.get("STEREOTYPE", 0); if (stereotype != null) { p.setStereotype(new Stereotype(stereotype, false)); } final String color = arg.get("COLOR", 0); if (color != null) { p.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(color)); } return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/directdot/000077500000000000000000000000001312650303100233735ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/directdot/PSystemDot.java000066400000000000000000000070761312650303100263230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.directdot; import java.io.IOException; import java.io.OutputStream; import java.util.Arrays; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.CounterOutputStream; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.api.ImageDataSimple; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.dot.ExeState; import net.sourceforge.plantuml.cucadiagram.dot.Graphviz; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils; import net.sourceforge.plantuml.cucadiagram.dot.ProcessState; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.UGraphicUtils; public class PSystemDot extends AbstractPSystem { private final String data; public PSystemDot(String data) { this.data = data; } public DiagramDescription getDescription() { return new DiagramDescription("(Dot)"); } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final Graphviz graphviz = GraphvizUtils.create(null, data, StringUtils.goLowerCase(fileFormat.getFileFormat().name())); if (graphviz.getExeState() != ExeState.OK) { final TextBlock result = GraphicStrings.createForError( Arrays.asList("There is an issue with your Dot/Graphviz installation"), false); UGraphicUtils.writeImage(os, null, fileFormat, seed(), new ColorMapperIdentity(), HtmlColorUtils.WHITE, result); return new ImageDataSimple(); } final CounterOutputStream counter = new CounterOutputStream(os); final ProcessState state = graphviz.createFile3(counter); if (state.differs(ProcessState.TERMINATED_OK())) { throw new IllegalStateException("Timeout1 " + state); } if (counter.getLength() == 0) { final TextBlock result = GraphicStrings.createForError(Arrays.asList("Graphivz has crashed"), false); UGraphicUtils.writeImage(os, null, fileFormat, seed(), new ColorMapperIdentity(), HtmlColorUtils.WHITE, result); } return new ImageDataSimple(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/directdot/PSystemDotFactory.java000066400000000000000000000040471312650303100276460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.directdot; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.core.DiagramType; public class PSystemDotFactory extends PSystemBasicFactory { private StringBuilder data; public PSystemDotFactory(DiagramType diagramType) { super(diagramType); } @Override public PSystemDot init(String startLine) { data = null; return null; } @Override public PSystemDot executeLine(PSystemDot system, String line) { if (system == null && line.matches("(strict\\s+)?(di)?graph\\s+\\w+\\s+\\{")) { data = new StringBuilder(line); data.append("\n"); return new PSystemDot(data.toString()); } if (data == null || system == null) { return null; } data.append(line); data.append("\n"); return new PSystemDot(data.toString()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ditaa/000077500000000000000000000000001312650303100224745ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ditaa/PSystemDitaa.java000066400000000000000000000071761312650303100257210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ditaa; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.OutputStream; import javax.imageio.ImageIO; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.api.ImageDataSimple; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import org.stathissideris.ascii2image.core.ConversionOptions; import org.stathissideris.ascii2image.core.ProcessingOptions; import org.stathissideris.ascii2image.graphics.BitmapRenderer; import org.stathissideris.ascii2image.graphics.Diagram; import org.stathissideris.ascii2image.text.TextGrid; public class PSystemDitaa extends AbstractPSystem { private final ProcessingOptions processingOptions = new ProcessingOptions(); private final boolean dropShadows; private final String data; private final float scale; public PSystemDitaa(String data, boolean performSeparationOfCommonEdges, boolean dropShadows, float scale) { this.data = data; this.dropShadows = dropShadows; this.processingOptions.setPerformSeparationOfCommonEdges(performSeparationOfCommonEdges); this.scale = scale; } PSystemDitaa add(String line) { return new PSystemDitaa(data + line + BackSlash.NEWLINE, processingOptions.performSeparationOfCommonEdges(), dropShadows, scale); } public DiagramDescription getDescription() { return new DiagramDescription("(Ditaa)"); } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { if (fileFormat.getFileFormat() == FileFormat.ATXT) { os.write(getSource().getPlainString().getBytes()); return new ImageDataSimple(); } // ditaa can only export png so file format is mostly ignored final ConversionOptions options = new ConversionOptions(); options.renderingOptions.setScale(scale); options.setDropShadows(dropShadows); final TextGrid grid = new TextGrid(); grid.initialiseWithText(data, null); final Diagram diagram = new Diagram(grid, options, processingOptions); final BufferedImage image = (BufferedImage) new BitmapRenderer().renderToImage(diagram, options.renderingOptions); ImageIO.write(image, "png", os); return new ImageDataSimple(image.getWidth(), image.getHeight()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ditaa/PSystemDitaaFactory.java000066400000000000000000000065771312650303100272550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ditaa; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sourceforge.plantuml.command.PSystemBasicFactory; import net.sourceforge.plantuml.core.DiagramType; public class PSystemDitaaFactory extends PSystemBasicFactory { // private StringBuilder data; // // -E,--no-separation // private boolean performSeparationOfCommonEdges; // // // -S,--no-shadows // private boolean dropShadows; public PSystemDitaaFactory(DiagramType diagramType) { super(diagramType); } public PSystemDitaa init(String startLine) { boolean performSeparationOfCommonEdges = true; if (startLine != null && (startLine.contains("-E") || startLine.contains("--no-separation"))) { performSeparationOfCommonEdges = false; } boolean dropShadows = true; if (startLine != null && (startLine.contains("-S") || startLine.contains("--no-shadows"))) { dropShadows = false; } final float scale = extractScale(startLine); if (getDiagramType() == DiagramType.UML) { return null; } else if (getDiagramType() == DiagramType.DITAA) { return new PSystemDitaa("", performSeparationOfCommonEdges, dropShadows, scale); } else { throw new IllegalStateException(getDiagramType().name()); } } @Override public PSystemDitaa executeLine(PSystemDitaa system, String line) { if (system == null && (line.equals("ditaa") || line.startsWith("ditaa("))) { boolean performSeparationOfCommonEdges = true; if (line.contains("-E") || line.contains("--no-separation")) { performSeparationOfCommonEdges = false; } boolean dropShadows = true; if (line.contains("-S") || line.contains("--no-shadows")) { dropShadows = false; } final float scale = extractScale(line); return new PSystemDitaa("", performSeparationOfCommonEdges, dropShadows, scale); } if (system == null) { return null; } return system.add(line); } private float extractScale(String line) { if (line == null) { return 1; } final Pattern p = Pattern.compile("scale=([\\d.]+)"); final Matcher m = p.matcher(line); if (m.find()) { final String number = m.group(1); return Float.parseFloat(number); } return 1; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/donors/000077500000000000000000000000001312650303100227165ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/donors/PSystemDonors.java000066400000000000000000000137011312650303100263540ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.donors; import java.awt.geom.Dimension2D; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.StringTokenizer; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.code.Transcoder; import net.sourceforge.plantuml.code.TranscoderImpl; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.version.PSystemVersion; public class PSystemDonors extends AbstractPSystem { public static final String DONORS = "UDfbL4jksp0GtSyfk1RIGoXsujI_17QQ0jcDvR75c29Tad8ghuBUe421hdk3eaKMHOjiUW7bHXsvbKcb" + "10oOud3clPdtcAhato8BL-J9YbHxeoLcS4r9MAQ0iGbRwo1jh-821ZOSKGLpMg3p4hMOcbn3gfV6Ye4X" + "lwVcxsh54MquQXXZL4XxwCjs8nMa8RNPmRmC42eOoAIxj85XYx9qCFUqpKcBdZ5RvjTlwv23KV7Ygh7G" + "CqfgCJEb8nYMBywJEyD4sirMmYH2ZKMyvLAfelUebzpENYuvwnfjnKndHzfw3TCOlT_3fP8xlj2NsOQH" + "7q-aXZDtJAqZ40djeBylfBUL66DkbWZ3fkctENBwA2uX5SR5QrDncpHwZcDyZ6lu5pnjEgpqahSsuvwS" + "uy9M6tFlDf8JARvsQRtSmqM8NXgOo2md9KvHgYfceFOn6ETWIAXV3J5xLv8J_N9XaMUf0jyRS-SfoyN8" + "eiC0QKqiqMXYzusoE4ICp4x6GZb8vKqWB15caNYR4Z7Fv8vlRoDPcKtJcLDZKQFQdeXRycYs3cPC4ErI" + "Z6GpMZXNnZRzdlp-fTHXw44GAX8dosbyb9F5jjlDrFCk8mTNsCfZ9Zk0KoN57779rh5h4cz9hycUY4bw" + "_NgU1cadHiE0EfQ9cUkC9LA86qRTPz6EGgIbPh9ibZ4HdErYvUyGfY495It89A8nA2NheYn8d9kIVEXl" + "vk0ydio1Ir23tiTjOxXJkMODpMKHBCY0sCchfjF8hev09qf1_Qb-ZDBNZ_KFwEKTQrTil79nU0YiPYzS" + "c0wS0PdLob8bfhBWmGtn_rTbXYjKOb8vnHwflzIFpm_rzwQKg3_NJ_NF-kdv0_yU-DCtEBEq5oDK1Jlh" + "8fvr8rTYlPwIQWvrD3Qk8gDNCKduaUooO87TqCj7AIaLlnij5G_pGqBdeVvOVpssX86nvqAUQxEG3AEF" + "jeXzoY8my0TY-gPS"; @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final UDrawable result = getGraphicStrings(); final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, HtmlColorUtils.WHITE, getMetadata(), null, 0, 0, null, false); imageBuilder.setUDrawable(result); return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os); } private UDrawable getGraphicStrings() throws IOException { final List cols = getCols(getDonors(), 4, 5); return new UDrawable() { public void drawU(UGraphic ug) { final TextBlockBackcolored header = GraphicStrings.createBlackOnWhite(Arrays .asList("Special thanks to our sponsors and donors !")); header.drawU(ug); final StringBounder stringBounder = ug.getStringBounder(); ug = ug.apply(new UTranslate(0, header.calculateDimension(stringBounder).getHeight())); double x = 0; double lastX = 0; double y = 0; for (TextBlock tb : cols) { final Dimension2D dim = tb.calculateDimension(stringBounder); tb.drawU(ug.apply(new UTranslate(x, 0))); lastX = x; x += dim.getWidth() + 10; y = Math.max(y, dim.getHeight()); } final UImage logo = new UImage(PSystemVersion.getPlantumlImage()); ug.apply(new UTranslate(lastX, y - logo.getHeight())).draw(logo); } }; } public static List getCols(List lines, final int nbCol, final int reserved) throws IOException { final List result = new ArrayList(); final int maxLine = (lines.size() + (nbCol - 1) + reserved) / nbCol; for (int i = 0; i < lines.size(); i += maxLine) { final List current = lines.subList(i, Math.min(lines.size(), i + maxLine)); result.add(GraphicStrings.createBlackOnWhite(current)); } return result; } private List getDonors() throws IOException { final List lines = new ArrayList(); final Transcoder t = new TranscoderImpl(); final String s = t.decode(DONORS).replace('*', '.'); final StringTokenizer st = new StringTokenizer(s, BackSlash.NEWLINE); while (st.hasMoreTokens()) { lines.add(st.nextToken()); } return lines; } public DiagramDescription getDescription() { return new DiagramDescription("(Donors)"); } public static PSystemDonors create() { return new PSystemDonors(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/donors/PSystemDonorsFactory.java000066400000000000000000000031571312650303100277100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.donors; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.command.PSystemSingleLineFactory; public class PSystemDonorsFactory extends PSystemSingleLineFactory { @Override protected AbstractPSystem executeLine(String line) { if (line.matches("(?i)^(donors)\\s*$")) { return PSystemDonors.create(); } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/000077500000000000000000000000001312650303100223375ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/EggUtils.java000066400000000000000000000053171312650303100247330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.math.BigInteger; import net.sourceforge.plantuml.StringUtils; public class EggUtils { public static String fromByteArrays(byte data[]) { final StringBuilder sb = new StringBuilder(); for (byte b : data) { final String hex = Integer.toHexString(b & 0xFF); if (hex.length() == 1) { sb.append('0'); } sb.append(hex); } return sb.toString(); } public static byte[] toByteArrays(String s) { final byte[] result = new byte[s.length() / 2]; for (int i = 0; i < result.length; i++) { result[i] = (byte) Integer.parseInt(s.substring(i * 2, i * 2 + 2), 16); } return result; } public static BigInteger fromSecretSentence(String s) { BigInteger result = BigInteger.ZERO; final BigInteger twentySix = BigInteger.valueOf(26); s = s.replace('\u00E9', 'e'); s = s.replace('\u00EA', 'e'); for (char c : s.toCharArray()) { final int num = convertChar(c); if (num != -1) { result = result.multiply(twentySix); result = result.add(BigInteger.valueOf(num)); } } return result; } private static int convertChar(char c) { c = StringUtils.goLowerCase(c); if (c >= 'a' && c <= 'z') { return c - 'a'; } return -1; } public static byte[] xor(byte data[], byte key[]) { final byte[] result = new byte[data.length]; int pos = 0; for (int i = 0; i < result.length; i++) { result[i] = (byte) (data[i] ^ key[pos++]); if (pos == key.length) { pos = 0; } } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/GraphicsPath.java000066400000000000000000000053631312650303100255660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.awt.Color; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.EmptyImageBuilder; import net.sourceforge.plantuml.api.ImageDataSimple; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.png.PngIO; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UMotif; import net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d; public class GraphicsPath { private final String path; private final ColorMapper colorMapper; public GraphicsPath(ColorMapper colorMapper, String path) { this.path = path; this.colorMapper = colorMapper; } public ImageData writeImage(OutputStream os) throws IOException { final BufferedImage im = createImage(); PngIO.write(im, os, 96); return new ImageDataSimple(im.getWidth(), im.getHeight()); } private BufferedImage createImage() { final EmptyImageBuilder builder = new EmptyImageBuilder(50, 50, Color.WHITE); final BufferedImage im = builder.getBufferedImage(); final Graphics2D g2d = builder.getGraphics2D(); final UGraphicG2d ug = new UGraphicG2d(colorMapper, g2d, 1.0); ug.setBufferedImage(im); final UMotif motif = new UMotif(path); motif.drawHorizontal(ug.apply(new UChangeColor(HtmlColorUtils.BLACK)), 20, 20, 1); g2d.dispose(); return im; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemAppleTwo.java000066400000000000000000002132271312650303100262710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import javax.imageio.ImageIO; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.graphic.GraphicPosition; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class PSystemAppleTwo extends AbstractPSystem { private final List strings = new ArrayList(); private final BufferedImage image; public PSystemAppleTwo() throws IOException { strings.add(" Apple //e for ever ! "); strings.add(" "); final InputStream is = new ByteArrayInputStream(imm); image = ImageIO.read(is); is.close(); } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final TextBlockBackcolored result = getGraphicStrings(); final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, result.getBackcolor(), getMetadata(), null, 0, 0, null, false); imageBuilder.setUDrawable(result); return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os); } private TextBlockBackcolored getGraphicStrings() throws IOException { // final UFont font = new UFont("SansSerif", Font.PLAIN, 12); final TextBlockBackcolored result = GraphicStrings.createBlackOnWhite(strings, image, GraphicPosition.BOTTOM); // final GraphicStrings result = new GraphicStrings(strings, font, HtmlColorUtils.BLACK, HtmlColorUtils.WHITE, // image, GraphicPosition.BOTTOM); // result.setMinWidth(200); return result; } public DiagramDescription getDescription() { return new DiagramDescription("(Apple //e)"); } private static final byte imm[] = new byte[] { (byte) 255, (byte) 216, (byte) 255, (byte) 224, (byte) 0, (byte) 16, (byte) 74, (byte) 70, (byte) 73, (byte) 70, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 96, (byte) 0, (byte) 96, (byte) 0, (byte) 0, (byte) 255, (byte) 219, (byte) 0, (byte) 67, (byte) 0, (byte) 10, (byte) 7, (byte) 7, (byte) 8, (byte) 7, (byte) 6, (byte) 10, (byte) 8, (byte) 8, (byte) 8, (byte) 11, (byte) 10, (byte) 10, (byte) 11, (byte) 14, (byte) 24, (byte) 16, (byte) 14, (byte) 13, (byte) 13, (byte) 14, (byte) 29, (byte) 21, (byte) 22, (byte) 17, (byte) 24, (byte) 35, (byte) 31, (byte) 37, (byte) 36, (byte) 34, (byte) 31, (byte) 34, (byte) 33, (byte) 38, (byte) 43, (byte) 55, (byte) 47, (byte) 38, (byte) 41, (byte) 52, (byte) 41, (byte) 33, (byte) 34, (byte) 48, (byte) 65, (byte) 49, (byte) 52, (byte) 57, (byte) 59, (byte) 62, (byte) 62, (byte) 62, (byte) 37, (byte) 46, (byte) 68, (byte) 73, (byte) 67, (byte) 60, (byte) 72, (byte) 55, (byte) 61, (byte) 62, (byte) 59, (byte) 255, (byte) 219, (byte) 0, (byte) 67, (byte) 1, (byte) 10, (byte) 11, (byte) 11, (byte) 14, (byte) 13, (byte) 14, (byte) 28, (byte) 16, (byte) 16, (byte) 28, (byte) 59, (byte) 40, (byte) 34, (byte) 40, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 255, (byte) 192, (byte) 0, (byte) 17, (byte) 8, (byte) 0, (byte) 136, (byte) 0, (byte) 200, (byte) 3, (byte) 1, (byte) 34, (byte) 0, (byte) 2, (byte) 17, (byte) 1, (byte) 3, (byte) 17, (byte) 1, (byte) 255, (byte) 196, (byte) 0, (byte) 31, (byte) 0, (byte) 0, (byte) 1, (byte) 5, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10, (byte) 11, (byte) 255, (byte) 196, (byte) 0, (byte) 181, (byte) 16, (byte) 0, (byte) 2, (byte) 1, (byte) 3, (byte) 3, (byte) 2, (byte) 4, (byte) 3, (byte) 5, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 0, (byte) 1, (byte) 125, (byte) 1, (byte) 2, (byte) 3, (byte) 0, (byte) 4, (byte) 17, (byte) 5, (byte) 18, (byte) 33, (byte) 49, (byte) 65, (byte) 6, (byte) 19, (byte) 81, (byte) 97, (byte) 7, (byte) 34, (byte) 113, (byte) 20, (byte) 50, (byte) 129, (byte) 145, (byte) 161, (byte) 8, (byte) 35, (byte) 66, (byte) 177, (byte) 193, (byte) 21, (byte) 82, (byte) 209, (byte) 240, (byte) 36, (byte) 51, (byte) 98, (byte) 114, (byte) 130, (byte) 9, (byte) 10, (byte) 22, (byte) 23, (byte) 24, (byte) 25, (byte) 26, (byte) 37, (byte) 38, (byte) 39, (byte) 40, (byte) 41, (byte) 42, (byte) 52, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) 131, (byte) 132, (byte) 133, (byte) 134, (byte) 135, (byte) 136, (byte) 137, (byte) 138, (byte) 146, (byte) 147, (byte) 148, (byte) 149, (byte) 150, (byte) 151, (byte) 152, (byte) 153, (byte) 154, (byte) 162, (byte) 163, (byte) 164, (byte) 165, (byte) 166, (byte) 167, (byte) 168, (byte) 169, (byte) 170, (byte) 178, (byte) 179, (byte) 180, (byte) 181, (byte) 182, (byte) 183, (byte) 184, (byte) 185, (byte) 186, (byte) 194, (byte) 195, (byte) 196, (byte) 197, (byte) 198, (byte) 199, (byte) 200, (byte) 201, (byte) 202, (byte) 210, (byte) 211, (byte) 212, (byte) 213, (byte) 214, (byte) 215, (byte) 216, (byte) 217, (byte) 218, (byte) 225, (byte) 226, (byte) 227, (byte) 228, (byte) 229, (byte) 230, (byte) 231, (byte) 232, (byte) 233, (byte) 234, (byte) 241, (byte) 242, (byte) 243, (byte) 244, (byte) 245, (byte) 246, (byte) 247, (byte) 248, (byte) 249, (byte) 250, (byte) 255, (byte) 196, (byte) 0, (byte) 31, (byte) 1, (byte) 0, (byte) 3, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10, (byte) 11, (byte) 255, (byte) 196, (byte) 0, (byte) 181, (byte) 17, (byte) 0, (byte) 2, (byte) 1, (byte) 2, (byte) 4, (byte) 4, (byte) 3, (byte) 4, (byte) 7, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 1, (byte) 2, (byte) 119, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 17, (byte) 4, (byte) 5, (byte) 33, (byte) 49, (byte) 6, (byte) 18, (byte) 65, (byte) 81, (byte) 7, (byte) 97, (byte) 113, (byte) 19, (byte) 34, (byte) 50, (byte) 129, (byte) 8, (byte) 20, (byte) 66, (byte) 145, (byte) 161, (byte) 177, (byte) 193, (byte) 9, (byte) 35, (byte) 51, (byte) 82, (byte) 240, (byte) 21, (byte) 98, (byte) 114, (byte) 209, (byte) 10, (byte) 22, (byte) 36, (byte) 52, (byte) 225, (byte) 37, (byte) 241, (byte) 23, (byte) 24, (byte) 25, (byte) 26, (byte) 38, (byte) 39, (byte) 40, (byte) 41, (byte) 42, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) 130, (byte) 131, (byte) 132, (byte) 133, (byte) 134, (byte) 135, (byte) 136, (byte) 137, (byte) 138, (byte) 146, (byte) 147, (byte) 148, (byte) 149, (byte) 150, (byte) 151, (byte) 152, (byte) 153, (byte) 154, (byte) 162, (byte) 163, (byte) 164, (byte) 165, (byte) 166, (byte) 167, (byte) 168, (byte) 169, (byte) 170, (byte) 178, (byte) 179, (byte) 180, (byte) 181, (byte) 182, (byte) 183, (byte) 184, (byte) 185, (byte) 186, (byte) 194, (byte) 195, (byte) 196, (byte) 197, (byte) 198, (byte) 199, (byte) 200, (byte) 201, (byte) 202, (byte) 210, (byte) 211, (byte) 212, (byte) 213, (byte) 214, (byte) 215, (byte) 216, (byte) 217, (byte) 218, (byte) 226, (byte) 227, (byte) 228, (byte) 229, (byte) 230, (byte) 231, (byte) 232, (byte) 233, (byte) 234, (byte) 242, (byte) 243, (byte) 244, (byte) 245, (byte) 246, (byte) 247, (byte) 248, (byte) 249, (byte) 250, (byte) 255, (byte) 218, (byte) 0, (byte) 12, (byte) 3, (byte) 1, (byte) 0, (byte) 2, (byte) 17, (byte) 3, (byte) 17, (byte) 0, (byte) 63, (byte) 0, (byte) 246, (byte) 106, (byte) 40, (byte) 162, (byte) 128, (byte) 10, (byte) 40, (byte) 162, (byte) 128, (byte) 43, (byte) 221, (byte) 92, (byte) 253, (byte) 153, (byte) 3, (byte) 121, (byte) 79, (byte) 41, (byte) 39, (byte) 133, (byte) 66, (byte) 185, (byte) 253, (byte) 72, (byte) 21, (byte) 145, (byte) 115, (byte) 173, (byte) 106, (byte) 157, (byte) 45, (byte) 180, (byte) 146, (byte) 191, (byte) 237, (byte) 73, (byte) 42, (byte) 31, (byte) 208, (byte) 55, (byte) 245, (byte) 173, (byte) 59, (byte) 225, (byte) 157, (byte) 159, (byte) 83, (byte) 92, (byte) 61, (byte) 182, (byte) 181, (byte) 169, (byte) 181, (byte) 149, (byte) 188, (byte) 243, (byte) 223, (byte) 91, (byte) 71, (byte) 44, (byte) 209, (byte) 171, (byte) 149, (byte) 54, (byte) 228, (byte) 129, (byte) 144, (byte) 9, (byte) 254, (byte) 44, (byte) 247, (byte) 245, (byte) 172, (byte) 165, (byte) 39, (byte) 114, (byte) 210, (byte) 69, (byte) 251, (byte) 155, (byte) 239, (byte) 19, (byte) 78, (byte) 113, (byte) 135, (byte) 133, (byte) 79, (byte) 240, (byte) 196, (byte) 168, (byte) 63, (byte) 92, (byte) 147, (byte) 250, (byte) 213, (byte) 80, (byte) 254, (byte) 34, (byte) 67, (byte) 129, (byte) 53, (byte) 222, (byte) 115, (byte) 221, (byte) 203, (byte) 127, (byte) 141, (byte) 52, (byte) 107, (byte) 183, (byte) 185, (byte) 192, (byte) 213, (byte) 180, (byte) 188, (byte) 142, (byte) 205, (byte) 106, (byte) 223, (byte) 252, (byte) 120, (byte) 84, (byte) 131, (byte) 90, (byte) 212, (byte) 63, (byte) 232, (byte) 41, (byte) 164, (byte) 127, (byte) 224, (byte) 51, (byte) 127, (byte) 241, (byte) 250, (byte) 139, (byte) 190, (byte) 229, (byte) 104, (byte) 39, (byte) 159, (byte) 226, (byte) 64, (byte) 120, (byte) 158, (byte) 232, (byte) 255, (byte) 0, (byte) 192, (byte) 88, (byte) 255, (byte) 0, (byte) 74, (byte) 67, (byte) 121, (byte) 226, (byte) 96, (byte) 121, (byte) 158, (byte) 243, (byte) 131, (byte) 198, (byte) 32, (byte) 110, (byte) 127, (byte) 241, (byte) 202, (byte) 144, (byte) 107, (byte) 119, (byte) 223, (byte) 244, (byte) 16, (byte) 210, (byte) 88, (byte) 250, (byte) 8, (byte) 136, (byte) 255, (byte) 0, (byte) 218, (byte) 198, (byte) 158, (byte) 53, (byte) 203, (byte) 220, (byte) 224, (byte) 73, (byte) 167, (byte) 183, (byte) 209, (byte) 138, (byte) 255, (byte) 0, (byte) 83, (byte) 74, (byte) 236, (byte) 44, (byte) 66, (byte) 53, (byte) 63, (byte) 18, (byte) 131, (byte) 180, (byte) 205, (byte) 121, (byte) 248, (byte) 218, (byte) 31, (byte) 254, (byte) 34, (byte) 156, (byte) 53, (byte) 143, (byte) 16, (byte) 142, (byte) 179, (byte) 207, (byte) 199, (byte) 247, (byte) 173, (byte) 64, (byte) 254, (byte) 105, (byte) 86, (byte) 6, (byte) 181, (byte) 169, (byte) 127, (byte) 207, (byte) 173, (byte) 131, (byte) 255, (byte) 0, (byte) 219, (byte) 211, (byte) 47, (byte) 254, (byte) 211, (byte) 52, (byte) 241, (byte) 172, (byte) 234, (byte) 196, (byte) 241, (byte) 166, (byte) 88, (byte) 48, (byte) 246, (byte) 191, (byte) 147, (byte) 255, (byte) 0, (byte) 140, (byte) 83, (byte) 187, (byte) 2, (byte) 161, (byte) 215, (byte) 181, (byte) 213, (byte) 25, (byte) 55, (byte) 79, (byte) 248, (byte) 194, (byte) 131, (byte) 255, (byte) 0, (byte) 101, (byte) 163, (byte) 254, (byte) 18, (byte) 61, (byte) 100, (byte) 114, (byte) 110, (byte) 112, (byte) 61, (byte) 227, (byte) 65, (byte) 253, (byte) 42, (byte) 231, (byte) 246, (byte) 206, (byte) 168, (byte) 57, (byte) 109, (byte) 46, (byte) 215, (byte) 254, (byte) 3, (byte) 122, (byte) 231, (byte) 255, (byte) 0, (byte) 104, (byte) 138, (byte) 81, (byte) 175, (byte) 95, (byte) 15, (byte) 189, (byte) 166, (byte) 1, (byte) 254, (byte) 237, (byte) 206, (byte) 127, (byte) 154, (byte) 138, (byte) 46, (byte) 251, (byte) 133, (byte) 151, (byte) 98, (byte) 160, (byte) 241, (byte) 54, (byte) 172, (byte) 188, (byte) 153, (byte) 227, (byte) 56, (byte) 245, (byte) 9, (byte) 82, (byte) 47, (byte) 136, (byte) 181, (byte) 210, (byte) 55, (byte) 36, (byte) 45, (byte) 34, (byte) 255, (byte) 0, (byte) 121, (byte) 45, (byte) 139, (byte) 143, (byte) 204, (byte) 86, (byte) 134, (byte) 153, (byte) 172, (byte) 46, (byte) 177, (byte) 101, (byte) 117, (byte) 34, (byte) 197, (byte) 36, (byte) 45, (byte) 4, (byte) 175, (byte) 4, (byte) 138, (byte) 236, (byte) 15, (byte) 204, (byte) 160, (byte) 19, (byte) 211, (byte) 168, (byte) 230, (byte) 132, (byte) 211, (byte) 165, (byte) 142, (byte) 118, (byte) 104, (byte) 239, (byte) 25, (byte) 119, (byte) 73, (byte) 189, (byte) 129, (byte) 81, (byte) 202, (byte) 231, (byte) 59, (byte) 126, (byte) 152, (byte) 226, (byte) 142, (byte) 103, (byte) 220, (byte) 44, (byte) 140, (byte) 209, (byte) 226, (byte) 173, (byte) 88, (byte) 16, (byte) 79, (byte) 144, (byte) 65, (byte) 231, (byte) 5, (byte) 63, (byte) 250, (byte) 249, (byte) 167, (byte) 127, (byte) 194, (byte) 95, (byte) 169, (byte) 47, (byte) 38, (byte) 43, (byte) 102, (byte) 3, (byte) 146, (byte) 54, (byte) 48, (byte) 255, (byte) 0, (byte) 217, (byte) 171, (byte) 50, (byte) 225, (byte) 118, (byte) 201, (byte) 34, (byte) 246, (byte) 87, (byte) 35, (byte) 167, (byte) 185, (byte) 170, (byte) 237, (byte) 83, (byte) 205, (byte) 46, (byte) 227, (byte) 178, (byte) 61, (byte) 58, (byte) 55, (byte) 89, (byte) 35, (byte) 87, (byte) 83, (byte) 149, (byte) 97, (byte) 144, (byte) 125, (byte) 69, (byte) 62, (byte) 178, (byte) 252, (byte) 61, (byte) 113, (byte) 246, (byte) 141, (byte) 14, (byte) 217, (byte) 179, (byte) 146, (byte) 139, (byte) 229, (byte) 159, (byte) 248, (byte) 9, (byte) 199, (byte) 242, (byte) 197, (byte) 106, (byte) 87, (byte) 74, (byte) 119, (byte) 70, (byte) 33, (byte) 69, (byte) 20, (byte) 83, (byte) 0, (byte) 162, (byte) 138, (byte) 40, (byte) 0, (byte) 162, (byte) 138, (byte) 40, (byte) 0, (byte) 162, (byte) 138, (byte) 40, (byte) 0, (byte) 162, (byte) 138, (byte) 40, (byte) 2, (byte) 181, (byte) 224, (byte) 253, (byte) 218, (byte) 253, (byte) 107, (byte) 202, (byte) 245, (byte) 112, (byte) 97, (byte) 142, (byte) 201, (byte) 84, (byte) 227, (byte) 98, (byte) 178, (byte) 140, (byte) 123, (byte) 96, (byte) 127, (byte) 74, (byte) 245, (byte) 91, (byte) 177, (byte) 152, (byte) 135, (byte) 177, (byte) 175, (byte) 46, (byte) 241, (byte) 26, (byte) 20, (byte) 158, (byte) 37, (byte) 56, (byte) 225, (byte) 229, (byte) 0, (byte) 99, (byte) 253, (byte) 161, (byte) 88, (byte) 207, (byte) 114, (byte) 227, (byte) 177, (byte) 199, (byte) 94, (byte) 11, (byte) 155, (byte) 251, (byte) 249, (byte) 101, (byte) 121, (byte) 164, (byte) 42, (byte) 174, (byte) 81, (byte) 20, (byte) 49, (byte) 194, (byte) 237, (byte) 249, (byte) 78, (byte) 7, (byte) 185, (byte) 6, (byte) 180, (byte) 52, (byte) 125, (byte) 58, (byte) 53, (byte) 156, (byte) 25, (byte) 162, (byte) 71, (byte) 207, (byte) 247, (byte) 192, (byte) 111, (byte) 231, (byte) 78, (byte) 181, (byte) 69, (byte) 49, (byte) 22, (byte) 199, (byte) 223, (byte) 146, (byte) 70, (byte) 252, (byte) 221, (byte) 143, (byte) 245, (byte) 171, (byte) 208, (byte) 29, (byte) 146, (byte) 2, (byte) 43, (byte) 101, (byte) 162, (byte) 49, (byte) 111, (byte) 83, (byte) 164, (byte) 131, (byte) 72, (byte) 181, (byte) 104, (byte) 195, (byte) 44, (byte) 17, (byte) 129, (byte) 140, (byte) 240, (byte) 130, (byte) 164, (byte) 146, (byte) 194, (byte) 203, (byte) 162, (byte) 194, (byte) 83, (byte) 28, (byte) 96, (byte) 128, (byte) 217, (byte) 231, (byte) 175, (byte) 229, (byte) 69, (byte) 133, (byte) 223, (byte) 238, (byte) 128, (byte) 207, (byte) 106, (byte) 145, (byte) 229, (byte) 6, (byte) 168, (byte) 30, (byte) 166, (byte) 117, (byte) 214, (byte) 159, (byte) 0, (byte) 145, (byte) 188, (byte) 164, (byte) 194, (byte) 103, (byte) 140, (byte) 129, (byte) 156, (byte) 126, (byte) 21, (byte) 151, (byte) 113, (byte) 96, (byte) 64, (byte) 37, (byte) 93, (byte) 212, (byte) 255, (byte) 0, (byte) 178, (byte) 228, (byte) 127, (byte) 90, (byte) 218, (byte) 185, (byte) 151, (byte) 142, (byte) 43, (byte) 53, (byte) 230, (byte) 39, (byte) 140, (byte) 210, (byte) 29, (byte) 236, (byte) 97, (byte) 77, (byte) 29, (byte) 228, (byte) 71, (byte) 228, (byte) 185, (byte) 153, (byte) 123, (byte) 242, (byte) 217, (byte) 254, (byte) 117, (byte) 99, (byte) 64, (byte) 188, (byte) 212, (byte) 134, (byte) 187, (byte) 107, (byte) 12, (byte) 215, (byte) 38, (byte) 104, (byte) 100, (byte) 44, (byte) 25, (byte) 89, (byte) 20, (byte) 17, (byte) 242, (byte) 147, (byte) 144, (byte) 64, (byte) 29, (byte) 197, (byte) 93, (byte) 145, (byte) 65, (byte) 228, (byte) 210, (byte) 105, (byte) 113, (byte) 168, (byte) 214, (byte) 109, (byte) 155, (byte) 28, (byte) 135, (byte) 63, (byte) 250, (byte) 9, (byte) 169, (byte) 146, (byte) 86, (byte) 8, (byte) 201, (byte) 220, (byte) 234, (byte) 124, (byte) 34, (byte) 127, (byte) 119, (byte) 173, (byte) 199, (byte) 233, (byte) 168, (byte) 74, (byte) 223, (byte) 154, (byte) 175, (byte) 248, (byte) 87, (byte) 79, (byte) 92, (byte) 199, (byte) 132, (byte) 191, (byte) 227, (byte) 243, (byte) 93, (byte) 143, (byte) 176, (byte) 187, (byte) 45, (byte) 215, (byte) 212, (byte) 176, (byte) 254, (byte) 149, (byte) 211, (byte) 175, (byte) 32, (byte) 31, (byte) 106, (byte) 230, (byte) 55, (byte) 56, (byte) 219, (byte) 209, (byte) 139, (byte) 139, (byte) 128, (byte) 58, (byte) 9, (byte) 152, (byte) 126, (byte) 166, (byte) 170, (byte) 53, (byte) 93, (byte) 212, (byte) 70, (byte) 46, (byte) 238, (byte) 127, (byte) 235, (byte) 187, (byte) 255, (byte) 0, (byte) 232, (byte) 77, (byte) 84, (byte) 24, (byte) 212, (byte) 148, (byte) 117, (byte) 126, (byte) 12, (byte) 184, (byte) 6, (byte) 11, (byte) 155, (byte) 98, (byte) 126, (byte) 235, (byte) 135, (byte) 25, (byte) 247, (byte) 24, (byte) 254, (byte) 131, (byte) 243, (byte) 174, (byte) 162, (byte) 184, (byte) 63, (byte) 10, (byte) 220, (byte) 121, (byte) 26, (byte) 226, (byte) 33, (byte) 56, (byte) 19, (byte) 163, (byte) 39, (byte) 63, (byte) 159, (byte) 244, (byte) 174, (byte) 238, (byte) 186, (byte) 105, (byte) 187, (byte) 196, (byte) 202, (byte) 75, (byte) 81, (byte) 104, (byte) 162, (byte) 138, (byte) 178, (byte) 66, (byte) 138, (byte) 40, (byte) 160, (byte) 2, (byte) 138, (byte) 40, (byte) 160, (byte) 2, (byte) 138, (byte) 40, (byte) 160, (byte) 2, (byte) 138, (byte) 40, (byte) 160, (byte) 10, (byte) 247, (byte) 127, (byte) 234, (byte) 9, (byte) 244, (byte) 34, (byte) 188, (byte) 215, (byte) 197, (byte) 75, (byte) 139, (byte) 248, (byte) 135, (byte) 253, (byte) 52, (byte) 148, (byte) 127, (byte) 227, (byte) 194, (byte) 189, (byte) 50, (byte) 228, (byte) 102, (byte) 221, (byte) 171, (byte) 205, (byte) 124, (byte) 87, (byte) 197, (byte) 236, (byte) 39, (byte) 254, (byte) 154, (byte) 74, (byte) 127, (byte) 85, (byte) 172, (byte) 103, (byte) 185, (byte) 113, (byte) 216, (byte) 229, (byte) 108, (byte) 159, (byte) 253, (byte) 10, (byte) 220, (byte) 250, (byte) 198, (byte) 191, (byte) 202, (byte) 174, (byte) 198, (byte) 220, (byte) 138, (byte) 205, (byte) 180, (byte) 56, (byte) 180, (byte) 128, (byte) 122, (byte) 32, (byte) 31, (byte) 149, (byte) 91, (byte) 141, (byte) 186, (byte) 86, (byte) 199, (byte) 59, (byte) 220, (byte) 232, (byte) 109, (byte) 37, (byte) 2, (byte) 33, (byte) 207, (byte) 52, (byte) 247, (byte) 185, (byte) 219, (byte) 222, (byte) 179, (byte) 160, (byte) 124, (byte) 39, (byte) 90, (byte) 116, (byte) 143, (byte) 129, (byte) 78, (byte) 227, (byte) 38, (byte) 146, (byte) 125, (byte) 245, (byte) 3, (byte) 250, (byte) 211, (byte) 21, (byte) 179, (byte) 77, (byte) 145, (byte) 248, (byte) 160, (byte) 67, (byte) 36, (byte) 147, (byte) 60, (byte) 84, (byte) 186, (byte) 79, (byte) 58, (byte) 189, (byte) 184, (byte) 245, (byte) 111, (byte) 232, (byte) 106, (byte) 163, (byte) 18, (byte) 77, (byte) 90, (byte) 210, (byte) 71, (byte) 252, (byte) 77, (byte) 109, (byte) 191, (byte) 223, (byte) 254, (byte) 148, (byte) 158, (byte) 195, (byte) 91, (byte) 157, (byte) 79, (byte) 132, (byte) 255, (byte) 0, (byte) 228, (byte) 51, (byte) 174, (byte) 175, (byte) 253, (byte) 54, (byte) 67, (byte) 249, (byte) 188, (byte) 191, (byte) 225, (byte) 93, (byte) 60, (byte) 99, (byte) 247, (byte) 106, (byte) 79, (byte) 112, (byte) 43, (byte) 150, (byte) 240, (byte) 153, (byte) 198, (byte) 187, (byte) 173, (byte) 251, (byte) 200, (byte) 191, (byte) 250, (byte) 28, (byte) 191, (byte) 227, (byte) 93, (byte) 76, (byte) 103, (byte) 247, (byte) 72, (byte) 48, (byte) 79, (byte) 202, (byte) 58, (byte) 125, (byte) 43, (byte) 152, (byte) 232, (byte) 103, (byte) 35, (byte) 170, (byte) 140, (byte) 94, (byte) 220, (byte) 15, (byte) 250, (byte) 106, (byte) 199, (byte) 245, (byte) 53, (byte) 154, (byte) 213, (byte) 161, (byte) 172, (byte) 200, (byte) 201, (byte) 172, (byte) 79, (byte) 27, (byte) 40, (byte) 40, (byte) 228, (byte) 237, (byte) 97, (byte) 215, (byte) 119, (byte) 4, (byte) 254, (byte) 24, (byte) 34, (byte) 179, (byte) 92, (byte) 212, (byte) 50, (byte) 209, (byte) 53, (byte) 140, (byte) 205, (byte) 14, (byte) 161, (byte) 109, (byte) 34, (byte) 156, (byte) 21, (byte) 153, (byte) 79, (byte) 235, (byte) 94, (byte) 159, (byte) 94, (byte) 79, (byte) 19, (byte) 133, (byte) 184, (byte) 141, (byte) 137, (byte) 198, (byte) 28, (byte) 28, (byte) 231, (byte) 222, (byte) 189, (byte) 96, (byte) 86, (byte) 244, (byte) 182, (byte) 51, (byte) 152, (byte) 180, (byte) 81, (byte) 69, (byte) 106, (byte) 64, (byte) 81, (byte) 69, (byte) 20, (byte) 0, (byte) 81, (byte) 69, (byte) 20, (byte) 0, (byte) 81, (byte) 69, (byte) 20, (byte) 0, (byte) 81, (byte) 69, (byte) 20, (byte) 1, (byte) 28, (byte) 195, (byte) 48, (byte) 191, (byte) 210, (byte) 188, (byte) 215, (byte) 198, (byte) 3, (byte) 253, (byte) 34, (byte) 31, (byte) 247, (byte) 165, (byte) 255, (byte) 0, (byte) 217, (byte) 107, (byte) 210, (byte) 228, (byte) 25, (byte) 141, (byte) 135, (byte) 168, (byte) 175, (byte) 55, (byte) 241, (byte) 136, (byte) 255, (byte) 0, (byte) 72, (byte) 132, (byte) 255, (byte) 0, (byte) 181, (byte) 39, (byte) 254, (byte) 201, (byte) 89, (byte) 79, (byte) 114, (byte) 226, (byte) 112, (byte) 240, (byte) 182, (byte) 17, (byte) 151, (byte) 251, (byte) 146, (byte) 200, (byte) 191, (byte) 147, (byte) 176, (byte) 171, (byte) 49, (byte) 190, (byte) 42, (byte) 175, (byte) 221, (byte) 185, (byte) 158, (byte) 62, (byte) 226, (byte) 82, (byte) 199, (byte) 254, (byte) 5, (byte) 134, (byte) 255, (byte) 0, (byte) 217, (byte) 170, (byte) 236, (byte) 54, (byte) 238, (byte) 216, (byte) 35, (byte) 161, (byte) 173, (byte) 86, (byte) 198, (byte) 13, (byte) 106, (byte) 93, (byte) 134, (byte) 76, (byte) 12, (byte) 158, (byte) 148, (byte) 231, (byte) 155, (byte) 119, (byte) 21, (byte) 25, (byte) 2, (byte) 40, (byte) 241, (byte) 222, (byte) 171, (byte) 249, (byte) 148, (byte) 192, (byte) 176, (byte) 37, (byte) 197, (byte) 33, (byte) 147, (byte) 53, (byte) 84, (byte) 189, (byte) 39, (byte) 155, (byte) 72, (byte) 46, (byte) 88, (byte) 105, (byte) 0, (byte) 171, (byte) 122, (byte) 83, (byte) 143, (byte) 237, (byte) 75, (byte) 111, (byte) 250, (byte) 232, (byte) 5, (byte) 101, (byte) 51, (byte) 213, (byte) 253, (byte) 24, (byte) 238, (byte) 213, (byte) 109, (byte) 6, (byte) 122, (byte) 201, (byte) 252, (byte) 129, (byte) 63, (byte) 210, (byte) 147, (byte) 216, (byte) 22, (byte) 231, (byte) 85, (byte) 225, (byte) 118, (byte) 199, (byte) 136, (byte) 245, (byte) 81, (byte) 234, (byte) 73, (byte) 252, (byte) 164, (byte) 111, (byte) 241, (byte) 174, (byte) 186, (byte) 48, (byte) 60, (byte) 181, (byte) 200, (byte) 228, (byte) 10, (byte) 227, (byte) 60, (byte) 52, (byte) 216, (byte) 241, (byte) 93, (byte) 242, (byte) 250, (byte) 199, (byte) 43, (byte) 126, (byte) 82, (byte) 175, (byte) 248, (byte) 215, (byte) 103, (byte) 23, (byte) 220, (byte) 252, (byte) 127, (byte) 173, (byte) 115, (byte) 35, (byte) 162, (byte) 71, (byte) 39, (byte) 173, (byte) 32, (byte) 26, (byte) 165, (byte) 219, (byte) 115, (byte) 146, (byte) 16, (byte) 117, (byte) 246, (byte) 83, (byte) 254, (byte) 126, (byte) 130, (byte) 177, (byte) 166, (byte) 32, (byte) 119, (byte) 226, (byte) 182, (byte) 124, (byte) 69, (byte) 32, (byte) 139, (byte) 81, (byte) 186, (byte) 245, (byte) 33, (byte) 14, (byte) 63, (byte) 5, (byte) 172, (byte) 24, (byte) 109, (byte) 47, (byte) 53, (byte) 55, (byte) 253, (byte) 218, (byte) 236, (byte) 132, (byte) 28, (byte) 25, (byte) 24, (byte) 113, (byte) 248, (byte) 122, (byte) 159, (byte) 242, (byte) 113, (byte) 72, (byte) 181, (byte) 177, (byte) 93, (byte) 167, (byte) 253, (byte) 224, (byte) 84, (byte) 203, (byte) 49, (byte) 56, (byte) 0, (byte) 117, (byte) 39, (byte) 210, (byte) 189, (byte) 58, (byte) 231, (byte) 196, (byte) 54, (byte) 176, (byte) 79, (byte) 229, (byte) 162, (byte) 60, (byte) 216, (byte) 234, (byte) 202, (byte) 64, (byte) 31, (byte) 175, (byte) 90, (byte) 229, (byte) 116, (byte) 253, (byte) 34, (byte) 11, (byte) 33, (byte) 242, (byte) 21, (byte) 18, (byte) 145, (byte) 204, (byte) 178, (byte) 2, (byte) 73, (byte) 250, (byte) 96, (byte) 112, (byte) 61, (byte) 191, (byte) 60, (byte) 213, (byte) 209, (byte) 106, (byte) 63, (byte) 231, (byte) 162, (byte) 49, (byte) 250, (byte) 31, (byte) 234, (byte) 42, (byte) 226, (byte) 218, (byte) 37, (byte) 171, (byte) 238, (byte) 110, (byte) 175, (byte) 136, (byte) 45, (byte) 207, (byte) 222, (byte) 133, (byte) 199, (byte) 210, (byte) 88, (byte) 207, (byte) 254, (byte) 205, (byte) 82, (byte) 13, (byte) 114, (byte) 212, (byte) 255, (byte) 0, (byte) 4, (byte) 191, (byte) 130, (byte) 134, (byte) 254, (byte) 68, (byte) 215, (byte) 62, (byte) 45, (byte) 155, (byte) 213, (byte) 63, (byte) 25, (byte) 20, (byte) 127, (byte) 51, (byte) 71, (byte) 217, (byte) 155, (byte) 217, (byte) 190, (byte) 142, (byte) 15, (byte) 245, (byte) 167, (byte) 207, (byte) 33, (byte) 114, (byte) 163, (byte) 164, (byte) 26, (byte) 189, (byte) 169, (byte) 237, (byte) 48, (byte) 250, (byte) 192, (byte) 255, (byte) 0, (byte) 225, (byte) 75, (byte) 253, (byte) 175, (byte) 99, (byte) 156, (byte) 25, (byte) 246, (byte) 159, (byte) 246, (byte) 145, (byte) 135, (byte) 243, (byte) 21, (byte) 203, (byte) 152, (byte) 121, (byte) 195, (byte) 46, (byte) 8, (byte) 235, (byte) 145, (byte) 72, (byte) 242, (byte) 164, (byte) 67, (byte) 229, (byte) 33, (byte) 219, (byte) 182, (byte) 41, (byte) 169, (byte) 177, (byte) 114, (byte) 163, (byte) 174, (byte) 183, (byte) 189, (byte) 182, (byte) 186, (byte) 37, (byte) 96, (byte) 157, (byte) 36, (byte) 101, (byte) 25, (byte) 32, (byte) 30, (byte) 69, (byte) 21, (byte) 129, (byte) 225, (byte) 167, (byte) 102, (byte) 212, (byte) 102, (byte) 220, (byte) 73, (byte) 38, (byte) 46, (byte) 191, (byte) 66, (byte) 63, (byte) 198, (byte) 138, (byte) 210, (byte) 46, (byte) 234, (byte) 228, (byte) 181, (byte) 99, (byte) 168, (byte) 162, (byte) 138, (byte) 42, (byte) 132, (byte) 20, (byte) 81, (byte) 69, (byte) 0, (byte) 53, (byte) 134, (byte) 65, (byte) 30, (byte) 162, (byte) 184, (byte) 63, (byte) 17, (byte) 216, (byte) 75, (byte) 125, (byte) 118, (byte) 60, (byte) 160, (byte) 27, (byte) 203, (byte) 39, (byte) 43, (byte) 144, (byte) 51, (byte) 144, (byte) 190, (byte) 191, (byte) 74, (byte) 239, (byte) 24, (byte) 133, (byte) 4, (byte) 146, (byte) 0, (byte) 3, (byte) 36, (byte) 154, (byte) 228, (byte) 117, (byte) 41, (byte) 188, (byte) 61, (byte) 125, (byte) 40, (byte) 55, (byte) 83, (byte) 72, (byte) 207, (byte) 16, (byte) 40, (byte) 36, (byte) 141, (byte) 102, (byte) 78, (byte) 255, (byte) 0, (byte) 222, (byte) 80, (byte) 1, (byte) 233, (byte) 235, (byte) 89, (byte) 84, (byte) 42, (byte) 39, (byte) 23, (byte) 123, (byte) 225, (byte) 171, (byte) 201, (byte) 231, (byte) 19, (byte) 165, (byte) 179, (byte) 68, (byte) 224, (byte) 96, (byte) 149, (byte) 145, (byte) 8, (byte) 108, (byte) 116, (byte) 200, (byte) 207, (byte) 63, (byte) 134, (byte) 63, (byte) 149, (byte) 39, (byte) 246, (byte) 118, (byte) 167, (byte) 18, (byte) 5, (byte) 22, (byte) 146, (byte) 57, (byte) 232, (byte) 74, (byte) 198, (byte) 216, (byte) 253, (byte) 51, (byte) 93, (byte) 71, (byte) 217, (byte) 124, (byte) 49, (byte) 252, (byte) 26, (byte) 244, (byte) 144, (byte) 158, (byte) 152, (byte) 125, (byte) 102, (byte) 81, (byte) 250, (byte) 59, (byte) 212, (byte) 145, (byte) 233, (byte) 118, (byte) 115, (byte) 241, (byte) 103, (byte) 226, (byte) 121, (byte) 219, (byte) 61, (byte) 60, (byte) 185, (byte) 160, (byte) 155, (byte) 255, (byte) 0, (byte) 66, (byte) 86, (byte) 169, (byte) 83, (byte) 104, (byte) 171, (byte) 38, (byte) 113, (byte) 83, (byte) 218, (byte) 223, (byte) 15, (byte) 191, (byte) 105, (byte) 34, (byte) 253, (byte) 84, (byte) 143, (byte) 253, (byte) 8, (byte) 10, (byte) 164, (byte) 203, (byte) 42, (byte) 253, (byte) 232, (byte) 219, (byte) 240, (byte) 32, (byte) 255, (byte) 0, (byte) 42, (byte) 244, (byte) 143, (byte) 248, (byte) 71, (byte) 245, (byte) 56, (byte) 190, (byte) 104, (byte) 245, (byte) 105, (byte) 95, (byte) 143, (byte) 249, (byte) 109, (byte) 111, (byte) 30, (byte) 63, (byte) 241, (byte) 213, (byte) 90, (byte) 67, (byte) 166, (byte) 107, (byte) 153, (byte) 255, (byte) 0, (byte) 143, (byte) 251, (byte) 22, (byte) 29, (byte) 54, (byte) 155, (byte) 103, (byte) 255, (byte) 0, (byte) 227, (byte) 148, (byte) 253, (byte) 161, (byte) 62, (byte) 205, (byte) 30, (byte) 108, (byte) 86, (byte) 99, (byte) 210, (byte) 9, (byte) 143, (byte) 210, (byte) 38, (byte) 255, (byte) 0, (byte) 10, (byte) 102, (byte) 38, (byte) 255, (byte) 0, (byte) 158, (byte) 19, (byte) 127, (byte) 223, (byte) 166, (byte) 255, (byte) 0, (byte) 10, (byte) 244, (byte) 71, (byte) 211, (byte) 117, (byte) 126, (byte) 127, (byte) 208, (byte) 52, (byte) 185, (byte) 207, (byte) 171, (byte) 59, (byte) 39, (byte) 254, (byte) 200, (byte) 213, (byte) 3, (byte) 216, (byte) 234, (byte) 73, (byte) 247, (byte) 252, (byte) 57, (byte) 167, (byte) 185, (byte) 207, (byte) 252, (byte) 177, (byte) 185, (byte) 25, (byte) 253, (byte) 98, (byte) 20, (byte) 253, (byte) 160, (byte) 189, (byte) 154, (byte) 56, (byte) 34, (byte) 179, (byte) 127, (byte) 207, (byte) 9, (byte) 191, (byte) 239, (byte) 211, (byte) 127, (byte) 133, (byte) 106, (byte) 248, (byte) 126, (byte) 25, (byte) 155, (byte) 92, (byte) 180, (byte) 38, (byte) 25, (byte) 2, (byte) 161, (byte) 102, (byte) 102, (byte) 101, (byte) 35, (byte) 31, (byte) 35, (byte) 122, (byte) 245, (byte) 231, (byte) 21, (byte) 209, (byte) 73, (byte) 107, (byte) 56, (byte) 255, (byte) 0, (byte) 91, (byte) 225, (byte) 75, (byte) 156, (byte) 122, (byte) 197, (byte) 60, (byte) 68, (byte) 127, (byte) 232, (byte) 98, (byte) 155, (byte) 11, (byte) 219, (byte) 90, (byte) 74, (byte) 37, (byte) 254, (byte) 195, (byte) 213, (byte) 33, (byte) 96, (byte) 15, (byte) 34, (byte) 35, (byte) 39, (byte) 111, (byte) 246, (byte) 93, (byte) 168, (byte) 117, (byte) 52, (byte) 26, (byte) 133, (byte) 152, (byte) 190, (byte) 26, (byte) 111, (byte) 248, (byte) 172, (byte) 46, (byte) 125, (byte) 224, (byte) 159, (byte) 255, (byte) 0, (byte) 70, (byte) 199, (byte) 93, (byte) 188, (byte) 127, (byte) 112, (byte) 253, (byte) 79, (byte) 243, (byte) 174, (byte) 19, (byte) 195, (byte) 2, (byte) 87, (byte) 241, (byte) 91, (byte) 74, (byte) 109, (byte) 174, (byte) 163, (byte) 83, (byte) 4, (byte) 191, (byte) 52, (byte) 182, (byte) 242, (byte) 70, (byte) 57, (byte) 116, (byte) 56, (byte) 249, (byte) 128, (byte) 231, (byte) 143, (byte) 210, (byte) 187, (byte) 57, (byte) 110, (byte) 227, (byte) 180, (byte) 143, (byte) 116, (byte) 188, (byte) 41, (byte) 220, (byte) 217, (byte) 200, (byte) 236, (byte) 195, (byte) 143, (byte) 215, (byte) 244, (byte) 172, (byte) 139, (byte) 145, (byte) 201, (byte) 248, (byte) 171, (byte) 82, (byte) 139, (byte) 79, (byte) 213, (byte) 247, (byte) 203, (byte) 100, (byte) 46, (byte) 132, (byte) 135, (byte) 104, (byte) 87, (byte) 144, (byte) 168, (byte) 27, (byte) 85, (byte) 14, (byte) 72, (byte) 193, (byte) 207, (byte) 222, (byte) 233, (byte) 237, (byte) 223, (byte) 60, (byte) 81, (byte) 79, (byte) 25, (byte) 67, (byte) 128, (byte) 26, (byte) 192, (byte) 160, (byte) 3, (byte) 133, (byte) 73, (byte) 65, (byte) 254, (byte) 130, (byte) 163, (byte) 248, (byte) 147, (byte) 58, (byte) 90, (byte) 223, (byte) 219, (byte) 187, (byte) 134, (byte) 101, (byte) 33, (byte) 219, (byte) 228, (byte) 93, (byte) 199, (byte) 145, (byte) 24, (byte) 254, (byte) 149, (byte) 196, (byte) 255, (byte) 0, (byte) 107, (byte) 91, (byte) 19, (byte) 203, (byte) 72, (byte) 163, (byte) 253, (byte) 168, (byte) 95, (byte) 252, (byte) 43, (byte) 120, (byte) 194, (byte) 45, (byte) 106, (byte) 67, (byte) 108, (byte) 239, (byte) 215, (byte) 198, (byte) 186, (byte) 104, (byte) 225, (byte) 237, (byte) 238, (byte) 198, (byte) 61, (byte) 21, (byte) 63, (byte) 248, (byte) 161, (byte) 82, (byte) 199, (byte) 227, (byte) 13, (byte) 33, (byte) 241, (byte) 151, (byte) 120, (byte) 243, (byte) 211, (byte) 112, (byte) 207, (byte) 254, (byte) 131, (byte) 154, (byte) 224, (byte) 132, (byte) 158, (byte) 110, (byte) 217, (byte) 85, (byte) 91, (byte) 100, (byte) 136, (byte) 25, (byte) 24, (byte) 169, (byte) 27, (byte) 128, (byte) 102, (byte) 25, (byte) 25, (byte) 247, (byte) 4, (byte) 126, (byte) 6, (byte) 131, (byte) 46, (byte) 196, (byte) 203, (byte) 182, (byte) 213, (byte) 4, (byte) 100, (byte) 147, (byte) 199, (byte) 90, (byte) 175, (byte) 103, (byte) 17, (byte) 115, (byte) 51, (byte) 209, (byte) 87, (byte) 196, (byte) 250, (byte) 43, (byte) 112, (byte) 47, (byte) 9, (byte) 63, (byte) 245, (byte) 198, (byte) 79, (byte) 234, (byte) 181, (byte) 98, (byte) 29, (byte) 91, (byte) 79, (byte) 185, (byte) 144, (byte) 71, (byte) 21, (byte) 204, (byte) 108, (byte) 228, (byte) 18, (byte) 23, (byte) 112, (byte) 207, (byte) 3, (byte) 39, (byte) 3, (byte) 169, (byte) 224, (byte) 19, (byte) 248, (byte) 87, (byte) 155, (byte) 69, (byte) 34, (byte) 56, (byte) 249, (byte) 27, (byte) 119, (byte) 161, (byte) 21, (byte) 167, (byte) 161, (byte) 182, (byte) 221, (byte) 102, (byte) 220, (byte) 247, (byte) 219, (byte) 40, (byte) 252, (byte) 227, (byte) 97, (byte) 253, (byte) 105, (byte) 58, (byte) 106, (byte) 195, (byte) 82, (byte) 103, (byte) 111, (byte) 52, (byte) 172, (byte) 252, (byte) 46, (byte) 85, (byte) 125, (byte) 61, (byte) 106, (byte) 12, (byte) 96, (byte) 99, (byte) 240, (byte) 169, (byte) 202, (byte) 212, (byte) 101, (byte) 107, (byte) 3, (byte) 67, (byte) 83, (byte) 195, (byte) 7, (byte) 254, (byte) 38, (byte) 50, (byte) 231, (byte) 254, (byte) 120, (byte) 159, (byte) 253, (byte) 8, (byte) 81, (byte) 75, (byte) 225, (byte) 180, (byte) 35, (byte) 82, (byte) 118, (byte) 231, (byte) 2, (byte) 18, (byte) 9, (byte) 199, (byte) 251, (byte) 75, (byte) 69, (byte) 111, (byte) 13, (byte) 140, (byte) 158, (byte) 231, (byte) 83, (byte) 69, (byte) 20, (byte) 85, (byte) 8, (byte) 41, (byte) 172, (byte) 202, (byte) 168, (byte) 89, (byte) 136, (byte) 10, (byte) 7, (byte) 36, (byte) 210, (byte) 59, (byte) 172, (byte) 104, (byte) 89, (byte) 206, (byte) 0, (byte) 234, (byte) 107, (byte) 50, (byte) 123, (byte) 212, (byte) 153, (byte) 202, (byte) 188, (byte) 37, (byte) 226, (byte) 237, (byte) 243, (byte) 17, (byte) 248, (byte) 241, (byte) 82, (byte) 221, (byte) 134, (byte) 149, (byte) 200, (byte) 239, (byte) 47, (byte) 26, (byte) 228, (byte) 152, (byte) 227, (byte) 202, (byte) 197, (byte) 233, (byte) 221, (byte) 170, (byte) 151, (byte) 151, (byte) 20, (byte) 201, (byte) 204, (byte) 104, (byte) 87, (byte) 28, (byte) 54, (byte) 7, (byte) 205, (byte) 255, (byte) 0, (byte) 214, (byte) 255, (byte) 0, (byte) 61, (byte) 58, (byte) 217, (byte) 117, (byte) 180, (byte) 158, (byte) 65, (byte) 31, (byte) 149, (byte) 60, (byte) 104, (byte) 6, (byte) 231, (byte) 97, (byte) 200, (byte) 62, (byte) 220, (byte) 245, (byte) 255, (byte) 0, (byte) 235, (byte) 115, (byte) 193, (byte) 230, (byte) 95, (byte) 46, (byte) 208, (byte) 253, (byte) 219, (byte) 163, (byte) 207, (byte) 170, (byte) 19, (byte) 89, (byte) 61, (byte) 77, (byte) 17, (byte) 158, (byte) 108, (byte) 237, (byte) 143, (byte) 88, (byte) 23, (byte) 240, (byte) 36, (byte) 127, (byte) 42, (byte) 175, (byte) 54, (byte) 143, (byte) 167, (byte) 78, (byte) 49, (byte) 37, (byte) 170, (byte) 48, (byte) 247, (byte) 231, (byte) 249, (byte) 230, (byte) 181, (byte) 205, (byte) 164, (byte) 103, (byte) 238, (byte) 221, (byte) 196, (byte) 126, (byte) 191, (byte) 45, (byte) 31, (byte) 96, (byte) 145, (byte) 190, (byte) 228, (byte) 145, (byte) 55, (byte) 209, (byte) 243, (byte) 253, (byte) 41, (byte) 89, (byte) 133, (byte) 209, (byte) 203, (byte) 220, (byte) 105, (byte) 30, (byte) 28, (byte) 177, (byte) 144, (byte) 44, (byte) 162, (byte) 218, (byte) 217, (byte) 200, (byte) 200, (byte) 201, (byte) 69, (byte) 63, (byte) 94, (byte) 153, (byte) 20, (byte) 244, (byte) 181, (byte) 211, (byte) 179, (byte) 182, (byte) 13, (byte) 126, (byte) 72, (byte) 200, (byte) 63, (byte) 118, (byte) 27, (byte) 246, (byte) 31, (byte) 160, (byte) 113, (byte) 90, (byte) 18, (byte) 120, (byte) 78, (byte) 79, (byte) 53, (byte) 230, (byte) 89, (byte) 239, (byte) 11, (byte) 200, (byte) 114, (byte) 205, (byte) 231, (byte) 1, (byte) 159, (byte) 110, (byte) 48, (byte) 106, (byte) 164, (byte) 158, (byte) 18, (byte) 186, (byte) 199, (byte) 55, (byte) 37, (byte) 143, (byte) 253, (byte) 52, (byte) 181, (byte) 14, (byte) 127, (byte) 70, (byte) 231, (byte) 252, (byte) 105, (byte) 217, (byte) 245, (byte) 27, (byte) 113, (byte) 182, (byte) 132, (byte) 137, (byte) 166, (byte) 94, (byte) 227, (byte) 117, (byte) 174, (byte) 175, (byte) 118, (byte) 71, (byte) 247, (byte) 153, (byte) 203, (byte) 255, (byte) 0, (byte) 232, (byte) 91, (byte) 169, (byte) 77, (byte) 182, (byte) 186, (byte) 135, (byte) 141, (byte) 105, (byte) 155, (byte) 31, (byte) 194, (byte) 97, (byte) 139, (byte) 255, (byte) 0, (byte) 141, (byte) 131, (byte) 250, (byte) 214, (byte) 115, (byte) 248, (byte) 70, (byte) 97, (byte) 255, (byte) 0, (byte) 44, (byte) 108, (byte) 206, (byte) 14, (byte) 114, (byte) 208, (byte) 24, (byte) 255, (byte) 0, (byte) 161, (byte) 173, (byte) 29, (byte) 39, (byte) 74, (byte) 26, (byte) 126, (byte) 247, (byte) 149, (byte) 209, (byte) 166, (byte) 147, (byte) 130, (byte) 35, (byte) 56, (byte) 69, (byte) 95, (byte) 65, (byte) 211, (byte) 63, (byte) 92, (byte) 127, (byte) 92, (byte) 161, (byte) 33, (byte) 124, (byte) 207, (byte) 17, (byte) 39, (byte) 11, (byte) 45, (byte) 148, (byte) 131, (byte) 214, (byte) 72, (byte) 73, (byte) 63, (byte) 163, (byte) 143, (byte) 229, (byte) 74, (byte) 47, (byte) 245, (byte) 216, (byte) 190, (byte) 245, (byte) 157, (byte) 180, (byte) 196, (byte) 127, (byte) 207, (byte) 48, (byte) 201, (byte) 253, (byte) 90, (byte) 180, (byte) 48, (byte) 126, (byte) 180, (byte) 224, (byte) 15, (byte) 231, (byte) 72, (byte) 101, (byte) 1, (byte) 173, (byte) 106, (byte) 163, (byte) 253, (byte) 102, (byte) 134, (byte) 20, (byte) 122, (byte) 173, (byte) 211, (byte) 31, (byte) 231, (byte) 24, (byte) 254, (byte) 116, (byte) 198, (byte) 215, (byte) 81, (byte) 198, (byte) 219, (byte) 173, (byte) 26, (byte) 241, (byte) 186, (byte) 224, (byte) 175, (byte) 150, (byte) 71, (byte) 39, (byte) 61, (byte) 75, (byte) 131, (byte) 255, (byte) 0, (byte) 234, (byte) 173, (byte) 46, (byte) 248, (byte) 252, (byte) 205, (byte) 57, (byte) 229, (byte) 16, (byte) 199, (byte) 187, (byte) 156, (byte) 14, (byte) 128, (byte) 127, (byte) 42, (byte) 5, (byte) 99, (byte) 138, (byte) 241, (byte) 77, (byte) 192, (byte) 212, (byte) 110, (byte) 32, (byte) 157, (byte) 109, (byte) 228, (byte) 137, (byte) 22, (byte) 63, (byte) 44, (byte) 9, (byte) 217, (byte) 50, (byte) 79, (byte) 83, (byte) 209, (byte) 142, (byte) 56, (byte) 199, (byte) 83, (byte) 216, (byte) 215, (byte) 57, (byte) 60, (byte) 16, (byte) 164, (byte) 139, (byte) 27, (byte) 199, (byte) 9, (byte) 103, (byte) 206, (byte) 54, (byte) 149, (byte) 113, (byte) 198, (byte) 123, (byte) 174, (byte) 64, (byte) 233, (byte) 252, (byte) 143, (byte) 66, (byte) 43, (byte) 168, (byte) 215, (byte) 230, (byte) 55, (byte) 183, (byte) 10, (byte) 3, (byte) 65, (byte) 186, (byte) 55, (byte) 70, (byte) 223, (byte) 59, (byte) 98, (byte) 54, (byte) 251, (byte) 223, (byte) 41, (byte) 245, (byte) 206, (byte) 56, (byte) 3, (byte) 168, (byte) 13, (byte) 233, (byte) 85, (byte) 103, (byte) 179, (byte) 188, (byte) 189, (byte) 71, (byte) 242, (byte) 116, (byte) 171, (byte) 50, (byte) 204, (byte) 191, (byte) 122, (byte) 198, (byte) 9, (byte) 64, (byte) 31, (byte) 48, (byte) 111, (byte) 226, (byte) 24, (byte) 29, (byte) 8, (byte) 227, (byte) 28, (byte) 55, (byte) 126, (byte) 49, (byte) 211, (byte) 77, (byte) 251, (byte) 166, (byte) 82, (byte) 90, (byte) 156, (byte) 133, (byte) 236, (byte) 12, (byte) 183, (byte) 150, (byte) 235, (byte) 109, (byte) 251, (byte) 165, (byte) 116, (byte) 145, (byte) 164, (byte) 218, (byte) 163, (byte) 230, (byte) 198, (byte) 192, (byte) 58, (byte) 143, (byte) 246, (byte) 169, (byte) 5, (byte) 169, (byte) 152, (byte) 136, (byte) 166, (byte) 145, (byte) 165, (byte) 141, (byte) 136, (byte) 12, (byte) 164, (byte) 46, (byte) 15, (byte) 62, (byte) 192, (byte) 86, (byte) 244, (byte) 186, (byte) 93, (byte) 228, (byte) 92, (byte) 203, (byte) 28, (byte) 113, (byte) 251, (byte) 60, (byte) 241, (byte) 131, (byte) 249, (byte) 110, (byte) 205, (byte) 71, (byte) 30, (byte) 159, (byte) 117, (byte) 47, (byte) 250, (byte) 171, (byte) 57, (byte) 165, (byte) 199, (byte) 59, (byte) 162, (byte) 132, (byte) 183, (byte) 234, (byte) 5, (byte) 105, (byte) 161, (byte) 55, (byte) 118, (byte) 51, (byte) 101, (byte) 209, (byte) 45, (byte) 47, (byte) 103, (byte) 6, (byte) 68, (byte) 105, (byte) 102, (byte) 147, (byte) 10, (byte) 25, (byte) 216, (byte) 51, (byte) 30, (byte) 138, (byte) 6, (byte) 79, (byte) 62, (byte) 128, (byte) 126, (byte) 21, (byte) 111, (byte) 64, (byte) 210, (byte) 109, (byte) 173, (byte) 53, (byte) 120, (byte) 37, (byte) 129, (byte) 202, (byte) 228, (byte) 227, (byte) 29, (byte) 71, (byte) 63, (byte) 141, (byte) 109, (byte) 233, (byte) 26, (byte) 129, (byte) 209, (byte) 94, (byte) 113, (byte) 117, (byte) 246, (byte) 155, (byte) 101, (byte) 152, (byte) 47, (byte) 42, (byte) 160, (byte) 19, (byte) 130, (byte) 120, (byte) 33, (byte) 177, (byte) 235, (byte) 80, (byte) 45, (byte) 228, (byte) 55, (byte) 94, (byte) 35, (byte) 89, (byte) 161, (byte) 152, (byte) 202, (byte) 178, (byte) 93, (byte) 33, (byte) 220, (byte) 196, (byte) 100, (byte) 229, (byte) 134, (byte) 123, (byte) 250, (byte) 231, (byte) 30, (byte) 216, (byte) 168, (byte) 247, (byte) 155, (byte) 105, (byte) 173, (byte) 7, (byte) 100, (byte) 146, (byte) 119, (byte) 215, (byte) 177, (byte) 214, (byte) 176, (byte) 228, (byte) 213, (byte) 121, (byte) 164, (byte) 218, (byte) 226, (byte) 56, (byte) 212, (byte) 201, (byte) 41, (byte) 25, (byte) 10, (byte) 14, (byte) 49, (byte) 238, (byte) 79, (byte) 97, (byte) 254, (byte) 7, (byte) 0, (byte) 224, (byte) 225, (byte) 210, (byte) 76, (byte) 242, (byte) 187, (byte) 69, (byte) 109, (byte) 141, (byte) 192, (byte) 225, (byte) 229, (byte) 35, (byte) 33, (byte) 61, (byte) 135, (byte) 171, (byte) 126, (byte) 131, (byte) 190, (byte) 113, (byte) 180, (byte) 190, (byte) 24, (byte) 86, (byte) 8, (byte) 202, (byte) 140, (byte) 156, (byte) 156, (byte) 150, (byte) 39, (byte) 37, (byte) 142, (byte) 7, (byte) 39, (byte) 215, (byte) 255, (byte) 0, (byte) 172, (byte) 43, (byte) 152, (byte) 216, (byte) 185, (byte) 225, (byte) 200, (byte) 60, (byte) 173, (byte) 87, (byte) 204, (byte) 119, (byte) 50, (byte) 74, (byte) 209, (byte) 48, (byte) 45, (byte) 140, (byte) 0, (byte) 50, (byte) 188, (byte) 1, (byte) 216, (byte) 127, (byte) 128, (byte) 201, (byte) 39, (byte) 154, (byte) 42, (byte) 93, (byte) 12, (byte) 255, (byte) 0, (byte) 196, (byte) 208, (byte) 127, (byte) 184, (byte) 194, (byte) 138, (byte) 214, (byte) 27, (byte) 25, (byte) 189, (byte) 206, (byte) 158, (byte) 152, (byte) 238, (byte) 168, (byte) 165, (byte) 152, (byte) 224, (byte) 10, (byte) 29, (byte) 213, (byte) 20, (byte) 179, (byte) 28, (byte) 1, (byte) 89, (byte) 151, (byte) 51, (byte) 180, (byte) 242, (byte) 99, (byte) 149, (byte) 3, (byte) 166, (byte) 123, (byte) 127, (byte) 245, (byte) 255, (byte) 0, (byte) 207, (byte) 213, (byte) 202, (byte) 86, (byte) 4, (byte) 174, (byte) 54, (byte) 230, (byte) 225, (byte) 238, (byte) 31, (byte) 28, (byte) 170, (byte) 131, (byte) 211, (byte) 211, (byte) 255, (byte) 0, (byte) 175, (byte) 254, (byte) 126, (byte) 180, (byte) 53, (byte) 43, (byte) 248, (byte) 244, (byte) 219, (byte) 38, (byte) 153, (byte) 204, (byte) 69, (byte) 254, (byte) 236, (byte) 105, (byte) 38, (byte) 62, (byte) 118, (byte) 244, (byte) 232, (byte) 79, (byte) 191, (byte) 3, (byte) 160, (byte) 53, (byte) 120, (byte) 0, (byte) 56, (byte) 3, (byte) 35, (byte) 182, (byte) 43, (byte) 151, (byte) 214, (byte) 32, (byte) 186, (byte) 184, (byte) 251, (byte) 68, (byte) 177, (byte) 45, (byte) 203, (byte) 179, (byte) 137, (byte) 4, (byte) 34, (byte) 9, (byte) 140, (byte) 160, (byte) 28, (byte) 124, (byte) 167, (byte) 98, (byte) 18, (byte) 6, (byte) 62, (byte) 92, (byte) 241, (byte) 233, (byte) 156, (byte) 214, (byte) 90, (byte) 189, (byte) 77, (byte) 52, (byte) 71, (byte) 63, (byte) 172, (byte) 107, (byte) 115, (byte) 107, (byte) 22, (byte) 242, (byte) 51, (byte) 181, (byte) 178, (byte) 136, (byte) 207, (byte) 151, (byte) 19, (byte) 67, (byte) 41, (byte) 92, (byte) 177, (byte) 56, (byte) 222, (byte) 20, (byte) 156, (byte) 119, (byte) 199, (byte) 174, (byte) 51, (byte) 239, (byte) 78, (byte) 142, (byte) 246, (byte) 255, (byte) 0, (byte) 251, (byte) 68, (byte) 132, (byte) 184, (byte) 188, (byte) 40, (byte) 97, (byte) 12, (byte) 203, (byte) 21, (byte) 217, (byte) 113, (byte) 184, (byte) 177, (byte) 231, (byte) 61, (byte) 73, (byte) 249, (byte) 72, (byte) 252, (byte) 61, (byte) 14, (byte) 40, (byte) 184, (byte) 211, (byte) 210, (byte) 214, (byte) 91, (byte) 85, (byte) 197, (byte) 223, (byte) 151, (byte) 2, (byte) 54, (byte) 67, (byte) 68, (byte) 9, (byte) 83, (byte) 133, (byte) 11, (byte) 213, (byte) 112, (byte) 6, (byte) 55, (byte) 113, (byte) 236, (byte) 181, (byte) 71, (byte) 201, (byte) 141, (byte) 173, (byte) 164, (byte) 6, (byte) 72, (byte) 196, (byte) 211, (byte) 92, (byte) 130, (byte) 223, (byte) 185, (byte) 31, (byte) 42, (byte) 121, (byte) 157, (byte) 114, (byte) 15, (byte) 63, (byte) 39, (byte) 59, (byte) 70, (byte) 59, (byte) 129, (byte) 72, (byte) 11, (byte) 208, (byte) 107, (byte) 186, (byte) 180, (byte) 80, (byte) 89, (byte) 187, (byte) 92, (byte) 207, (byte) 153, (byte) 78, (byte) 11, (byte) 60, (byte) 10, (byte) 251, (byte) 151, (byte) 4, (byte) 228, (byte) 119, (byte) 35, (byte) 145, (byte) 201, (byte) 237, (byte) 223, (byte) 140, (byte) 84, (byte) 237, (byte) 226, (byte) 205, (byte) 66, (byte) 56, (byte) 238, (byte) 143, (byte) 155, (byte) 4, (byte) 173, (byte) 9, (byte) 253, (byte) 216, (byte) 146, (byte) 50, (byte) 9, (byte) 24, (byte) 29, (byte) 74, (byte) 225, (byte) 122, (byte) 231, (byte) 211, (byte) 159, (byte) 65, (byte) 129, (byte) 84, (byte) 163, (byte) 130, (byte) 36, (byte) 189, (byte) 105, (byte) 35, (byte) 104, (byte) 22, (byte) 59, (byte) 120, (byte) 151, (byte) 203, (byte) 0, (byte) 186, (byte) 6, (byte) 56, (byte) 108, (byte) 237, (byte) 4, (byte) 17, (byte) 156, (byte) 96, (byte) 115, (byte) 237, (byte) 239, (byte) 76, (byte) 91, (byte) 105, (byte) 222, (byte) 210, (byte) 218, (byte) 220, (byte) 202, (byte) 210, (byte) 53, (byte) 227, (byte) 111, (byte) 153, (byte) 86, (byte) 225, (byte) 91, (byte) 113, (byte) 10, (byte) 9, (byte) 220, (byte) 27, (byte) 1, (byte) 79, (byte) 11, (byte) 199, (byte) 177, (byte) 29, (byte) 133, (byte) 49, (byte) 155, (byte) 145, (byte) 120, (byte) 190, (byte) 228, (byte) 92, (byte) 172, (byte) 97, (byte) 108, (byte) 217, (byte) 36, (byte) 66, (byte) 200, (byte) 233, (byte) 33, (byte) 64, (byte) 57, (byte) 28, (byte) 100, (byte) 245, (byte) 56, (byte) 201, (byte) 237, (byte) 248, (byte) 98, (byte) 172, (byte) 65, (byte) 227, (byte) 137, (byte) 140, (byte) 16, (byte) 74, (byte) 246, (byte) 115, (byte) 42, (byte) 203, (byte) 32, (byte) 143, (byte) 11, (byte) 114, (byte) 25, (byte) 129, (byte) 44, (byte) 71, (byte) 76, (byte) 122, (byte) 14, (byte) 228, (byte) 117, (byte) 252, (byte) 107, (byte) 157, (byte) 144, (byte) 92, (byte) 43, (byte) 222, (byte) 223, (byte) 58, (byte) 22, (byte) 22, (byte) 160, (byte) 196, (byte) 26, (byte) 72, (byte) 17, (byte) 151, (byte) 43, (byte) 134, (byte) 195, (byte) 31, (byte) 169, (byte) 198, (byte) 125, (byte) 198, (byte) 15, (byte) 81, (byte) 81, (byte) 53, (byte) 160, (byte) 133, (byte) 45, (byte) 237, (byte) 36, (byte) 72, (byte) 198, (byte) 73, (byte) 146, (byte) 67, (byte) 36, (byte) 82, (byte) 70, (byte) 207, (byte) 131, (byte) 247, (byte) 88, (byte) 117, (byte) 193, (byte) 207, (byte) 233, (byte) 138, (byte) 44, (byte) 35, (byte) 179, (byte) 143, (byte) 199, (byte) 10, (byte) 30, (byte) 84, (byte) 146, (byte) 43, (byte) 196, (byte) 120, (byte) 66, (byte) 153, (byte) 23, (byte) 201, (byte) 86, (byte) 218, (byte) 8, (byte) 39, (byte) 57, (byte) 207, (byte) 160, (byte) 255, (byte) 0, (byte) 12, (byte) 243, (byte) 86, (byte) 35, (byte) 241, (byte) 197, (byte) 131, (byte) 136, (byte) 183, (byte) 220, (byte) 5, (byte) 89, (byte) 64, (byte) 43, (byte) 230, (byte) 196, (byte) 70, (byte) 114, (byte) 51, (byte) 142, (byte) 7, (byte) 167, (byte) 225, (byte) 232, (byte) 77, (byte) 112, (byte) 161, (byte) 227, (byte) 243, (byte) 47, (byte) 38, (byte) 85, (byte) 82, (byte) 71, (byte) 238, (byte) 149, (byte) 97, (byte) 148, (byte) 118, (byte) 249, (byte) 115, (byte) 176, (byte) 142, (byte) 65, (byte) 36, (byte) 30, (byte) 123, (byte) 103, (byte) 165, (byte) 77, (byte) 30, (byte) 200, (byte) 18, (byte) 218, (byte) 216, (byte) 153, (byte) 62, (byte) 210, (byte) 177, (byte) 147, (byte) 27, (byte) 9, (byte) 183, (byte) 34, (byte) 54, (byte) 210, (byte) 48, (byte) 48, (byte) 64, (byte) 3, (byte) 57, (byte) 29, (byte) 248, (byte) 35, (byte) 182, (byte) 40, (byte) 11, (byte) 30, (byte) 133, (byte) 105, (byte) 173, (byte) 217, (byte) 95, (byte) 150, (byte) 16, (byte) 165, (byte) 188, (byte) 204, (byte) 167, (byte) 5, (byte) 76, (byte) 101, (byte) 24, (byte) 113, (byte) 232, (byte) 220, (byte) 254, (byte) 149, (byte) 108, (byte) 205, (byte) 22, (byte) 15, (byte) 250, (byte) 24, (byte) 83, (byte) 219, (byte) 14, (byte) 71, (byte) 242, (byte) 172, (byte) 15, (byte) 11, (byte) 104, (byte) 247, (byte) 54, (byte) 22, (byte) 242, (byte) 94, (byte) 94, (byte) 51, (byte) 139, (byte) 155, (byte) 189, (byte) 164, (byte) 198, (byte) 78, (byte) 54, (byte) 168, (byte) 233, (byte) 145, (byte) 221, (byte) 185, (byte) 231, (byte) 250, (byte) 115, (byte) 157, (byte) 226, (byte) 63, (byte) 217, (byte) 95, (byte) 251, (byte) 228, (byte) 127, (byte) 133, (byte) 23, (byte) 21, (byte) 134, (byte) 198, (byte) 246, (byte) 113, (byte) 68, (byte) 136, (byte) 240, (byte) 200, (byte) 48, (byte) 48, (byte) 88, (byte) 177, (byte) 228, (byte) 250, (byte) 253, (byte) 127, (byte) 198, (byte) 178, (byte) 53, (byte) 235, (byte) 216, (byte) 6, (byte) 32, (byte) 183, (byte) 82, (byte) 175, (byte) 143, (byte) 152, (byte) 150, (byte) 206, (byte) 1, (byte) 254, (byte) 167, (byte) 249, (byte) 84, (byte) 154, (byte) 165, (byte) 202, (byte) 136, (byte) 252, (byte) 161, (byte) 134, (byte) 207, (byte) 64, (byte) 123, (byte) 251, (byte) 214, (byte) 20, (byte) 185, (byte) 98, (byte) 89, (byte) 137, (byte) 44, (byte) 78, (byte) 73, (byte) 39, (byte) 169, (byte) 160, (byte) 102, (byte) 7, (byte) 138, (byte) 142, (byte) 52, (byte) 66, (byte) 115, (byte) 130, (byte) 110, (byte) 98, (byte) 239, (byte) 232, (byte) 178, (byte) 255, (byte) 0, (byte) 241, (byte) 85, (byte) 201, (byte) 196, (byte) 98, (byte) 126, (byte) 89, (byte) 85, (byte) 143, (byte) 184, (byte) 174, (byte) 195, (byte) 196, (byte) 177, (byte) 121, (byte) 186, (byte) 28, (byte) 153, (byte) 255, (byte) 0, (byte) 150, (byte) 114, (byte) 43, (byte) 244, (byte) 247, (byte) 11, (byte) 255, (byte) 0, (byte) 179, (byte) 87, (byte) 22, (byte) 150, (byte) 11, (byte) 213, (byte) 102, (byte) 157, (byte) 125, (byte) 196, (byte) 135, (byte) 250, (byte) 154, (byte) 222, (byte) 27, (byte) 25, (byte) 200, (byte) 212, (byte) 183, (byte) 185, (byte) 184, (byte) 135, (byte) 30, (byte) 69, (byte) 204, (byte) 208, (byte) 143, (byte) 250, (byte) 98, (byte) 251, (byte) 127, (byte) 149, (byte) 91, (byte) 254, (byte) 209, (byte) 191, (byte) 63, (byte) 52, (byte) 151, (byte) 215, (byte) 19, (byte) 96, (byte) 103, (byte) 247, (byte) 242, (byte) 180, (byte) 159, (byte) 204, (byte) 226, (byte) 178, (byte) 213, (byte) 150, (byte) 217, (byte) 34, (byte) 71, (byte) 18, (byte) 76, (byte) 207, (byte) 38, (byte) 208, (byte) 217, (byte) 203, (byte) 156, (byte) 140, (byte) 128, (byte) 121, (byte) 0, (byte) 1, (byte) 180, (byte) 246, (byte) 207, (byte) 60, (byte) 231, (byte) 140, (byte) 77, (byte) 43, (byte) 19, (byte) 19, (byte) 132, (byte) 141, (byte) 214, (byte) 77, (byte) 135, (byte) 104, (byte) 32, (byte) 156, (byte) 156, (byte) 113, (byte) 156, (byte) 86, (byte) 150, (byte) 68, (byte) 154, (byte) 209, (byte) 107, (byte) 26, (byte) 132, (byte) 35, (byte) 17, (byte) 204, (byte) 136, (byte) 63, (byte) 217, (byte) 130, (byte) 32, (byte) 127, (byte) 61, (byte) 185, (byte) 253, (byte) 106, (byte) 253, (byte) 134, (byte) 181, (byte) 117, (byte) 115, (byte) 168, (byte) 90, (byte) 219, (byte) 204, (byte) 161, (byte) 214, (byte) 73, (byte) 146, (byte) 51, (byte) 151, (byte) 144, (byte) 99, (byte) 115, (byte) 1, (byte) 192, (byte) 12, (byte) 6, (byte) 121, (byte) 244, (byte) 197, (byte) 114, (byte) 210, (byte) 182, (byte) 162, (byte) 187, (byte) 124, (byte) 152, (byte) 226, (byte) 101, (byte) 11, (byte) 243, (byte) 229, (byte) 246, (byte) 252, (byte) 222, (byte) 221, (byte) 120, (byte) 171, (byte) 218, (byte) 20, (byte) 215, (byte) 103, (byte) 95, (byte) 211, (byte) 146, (byte) 107, (byte) 95, (byte) 45, (byte) 126, (byte) 215, (byte) 15, (byte) 204, (byte) 31, (byte) 112, (byte) 255, (byte) 0, (byte) 88, (byte) 190, (byte) 194, (byte) 165, (byte) 164, (byte) 23, (byte) 61, (byte) 49, (byte) 34, (byte) 72, (byte) 163, (byte) 84, (byte) 69, (byte) 10, (byte) 160, (byte) 96, (byte) 40, (byte) 24, (byte) 0, (byte) 82, (byte) 17, (byte) 252, (byte) 234, (byte) 96, (byte) 50, (byte) 128, (byte) 251, (byte) 85, (byte) 123, (byte) 169, (byte) 225, (byte) 182, (byte) 129, (byte) 230, (byte) 158, (byte) 69, (byte) 138, (byte) 40, (byte) 198, (byte) 89, (byte) 152, (byte) 224, (byte) 10, (byte) 230, (byte) 53, (byte) 47, (byte) 104, (byte) 132, (byte) 13, (byte) 81, (byte) 51, (byte) 221, (byte) 88, (byte) 15, (byte) 202, (byte) 138, (byte) 161, (byte) 225, (byte) 221, (byte) 62, (byte) 255, (byte) 0, (byte) 87, (byte) 212, (byte) 33, (byte) 213, (byte) 231, (byte) 243, (byte) 44, (byte) 244, (byte) 248, (byte) 78, (byte) 235, (byte) 104, (byte) 72, (byte) 195, (byte) 206, (byte) 113, (byte) 141, (byte) 205, (byte) 232, (byte) 190, (byte) 131, (byte) 243, (byte) 246, (byte) 43, (byte) 88, (byte) 232, (byte) 181, (byte) 33, (byte) 157, (byte) 85, (byte) 237, (byte) 220, (byte) 22, (byte) 216, (byte) 251, (byte) 66, (byte) 72, (byte) 83, (byte) 25, (byte) 222, (byte) 177, (byte) 150, (byte) 11, (byte) 245, (byte) 199, (byte) 74, (byte) 170, (byte) 154, (byte) 158, (byte) 143, (byte) 41, (byte) 194, (byte) 222, (byte) 70, (byte) 173, (byte) 220, (byte) 59, (byte) 21, (byte) 35, (byte) 240, (byte) 61, (byte) 43, (byte) 86, (byte) 177, (byte) 117, (byte) 63, (byte) 13, (byte) 165, (byte) 235, (byte) 249, (byte) 182, (byte) 183, (byte) 114, (byte) 88, (byte) 200, (byte) 78, (byte) 91, (byte) 98, (byte) 171, (byte) 163, (byte) 127, (byte) 192, (byte) 72, (byte) 224, (byte) 253, (byte) 49, (byte) 78, (byte) 200, (byte) 69, (byte) 216, (byte) 141, (byte) 165, (byte) 193, (byte) 255, (byte) 0, (byte) 71, (byte) 186, (byte) 142, (byte) 67, (byte) 219, (byte) 99, (byte) 131, (byte) 252, (byte) 169, (byte) 205, (byte) 103, (byte) 201, (byte) 109, (byte) 192, (byte) 177, (byte) 234, (byte) 72, (byte) 228, (byte) 215, (byte) 51, (byte) 55, (byte) 133, (byte) 181, (byte) 193, (byte) 247, (byte) 47, (byte) 244, (byte) 251, (byte) 128, (byte) 58, (byte) 9, (byte) 173, (byte) 221, (byte) 79, (byte) 232, (byte) 216, (byte) 253, (byte) 42, (byte) 31, (byte) 236, (byte) 175, (byte) 18, (byte) 218, (byte) 255, (byte) 0, (byte) 171, (byte) 211, (byte) 173, (byte) 155, (byte) 31, (byte) 197, (byte) 109, (byte) 122, (byte) 99, (byte) 63, (byte) 150, (byte) 223, (byte) 235, (byte) 71, (byte) 42, (byte) 29, (byte) 217, (byte) 208, (byte) 79, (byte) 161, (byte) 199, (byte) 60, (byte) 134, (byte) 82, (byte) 89, (byte) 93, (byte) 186, (byte) 178, (byte) 185, (byte) 244, (byte) 199, (byte) 126, (byte) 59, (byte) 85, (byte) 89, (byte) 60, (byte) 58, (byte) 88, (byte) 96, (byte) 79, (byte) 43, (byte) 15, (byte) 250, (byte) 106, (byte) 21, (byte) 135, (byte) 233, (byte) 138, (byte) 199, (byte) 55, (byte) 190, (byte) 35, (byte) 182, (byte) 63, (byte) 61, (byte) 142, (byte) 176, (byte) 152, (byte) 234, (byte) 35, (byte) 242, (byte) 231, (byte) 95, (byte) 204, (byte) 146, (byte) 105, (byte) 195, (byte) 197, (byte) 247, (byte) 86, (byte) 223, (byte) 241, (byte) 242, (byte) 215, (byte) 49, (byte) 30, (byte) 255, (byte) 0, (byte) 104, (byte) 177, (byte) 112, (byte) 63, (byte) 48, (byte) 160, (byte) 126, (byte) 180, (byte) 185, (byte) 16, (byte) 249, (byte) 153, (byte) 106, (byte) 79, (byte) 11, (byte) 47, (byte) 95, (byte) 46, (byte) 217, (byte) 207, (byte) 253, (byte) 123, (byte) 108, (byte) 253, (byte) 121, (byte) 170, (byte) 146, (byte) 120, (byte) 85, (byte) 59, (byte) 219, (byte) 64, (byte) 73, (byte) 254, (byte) 228, (byte) 207, (byte) 159, (byte) 200, (byte) 224, (byte) 85, (byte) 136, (byte) 188, (byte) 117, (byte) 1, (byte) 225, (byte) 174, (byte) 244, (byte) 246, (byte) 99, (byte) 252, (byte) 38, (byte) 79, (byte) 44, (byte) 254, (byte) 68, (byte) 154, (byte) 209, (byte) 139, (byte) 196, (byte) 194, (byte) 84, (byte) 207, (byte) 216, (byte) 252, (byte) 193, (byte) 216, (byte) 67, (byte) 40, (byte) 124, (byte) 254, (byte) 96, (byte) 15, (byte) 214, (byte) 151, (byte) 32, (byte) 115, (byte) 28, (byte) 228, (byte) 190, (byte) 18, (byte) 5, (byte) 24, (byte) 27, (byte) 107, (byte) 133, (byte) 82, (byte) 48, (byte) 64, (byte) 146, (byte) 50, (byte) 63, (byte) 46, (byte) 77, (byte) 55, (byte) 73, (byte) 240, (byte) 230, (byte) 172, (byte) 111, (byte) 110, (byte) 110, (byte) 103, (byte) 185, (byte) 48, (byte) 172, (byte) 108, (byte) 241, (byte) 192, (byte) 38, (byte) 82, (byte) 204, (byte) 232, (byte) 72, (byte) 231, (byte) 253, (byte) 145, (byte) 242, (byte) 143, (byte) 199, (byte) 61, (byte) 59, (byte) 245, (byte) 81, (byte) 248, (byte) 130, (byte) 193, (byte) 254, (byte) 253, (byte) 172, (byte) 209, (byte) 99, (byte) 174, (byte) 228, (byte) 94, (byte) 63, (byte) 34, (byte) 106, (byte) 117, (byte) 213, (byte) 180, (byte) 167, (byte) 255, (byte) 0, (byte) 150, (byte) 165, (byte) 127, (byte) 222, (byte) 71, (byte) 31, (byte) 210, (byte) 151, (byte) 35, (byte) 31, (byte) 49, (byte) 206, (byte) 71, (byte) 225, (byte) 235, (byte) 232, (byte) 99, (byte) 49, (byte) 175, (byte) 216, (byte) 221, (byte) 76, (byte) 143, (byte) 38, (byte) 30, (byte) 70, (byte) 234, (byte) 204, (byte) 91, (byte) 166, (byte) 223, (byte) 124, (byte) 126, (byte) 21, (byte) 47, (byte) 135, (byte) 188, (byte) 48, (byte) 154, (byte) 76, (byte) 179, (byte) 93, (byte) 207, (byte) 181, (byte) 238, (byte) 100, (byte) 118, (byte) 217, (byte) 180, (byte) 252, (byte) 177, (byte) 169, (byte) 61, (byte) 184, (byte) 228, (byte) 145, (byte) 140, (byte) 159, (byte) 192, (byte) 119, (byte) 39, (byte) 163, (byte) 91, (byte) 189, (byte) 57, (byte) 248, (byte) 75, (byte) 216, (byte) 24, (byte) 158, (byte) 194, (byte) 85, (byte) 205, (byte) 76, (byte) 45, (byte) 209, (byte) 134, (byte) 84, (byte) 130, (byte) 15, (byte) 124, (byte) 102, (byte) 151, (byte) 43, (byte) 14, (byte) 100, (byte) 84, (byte) 219, (byte) 207, (byte) 184, (byte) 170, (byte) 151, (byte) 247, (byte) 43, (byte) 12, (byte) 100, (byte) 117, (byte) 61, (byte) 14, (byte) 63, (byte) 149, (byte) 106, (byte) 61, (byte) 190, (byte) 216, (byte) 216, (byte) 134, (byte) 3, (byte) 3, (byte) 60, (byte) 10, (byte) 229, (byte) 238, (byte) 93, (byte) 166, (byte) 148, (byte) 147, (byte) 156, (byte) 3, (byte) 128, (byte) 42, (byte) 90, (byte) 177, (byte) 73, (byte) 220, (byte) 169, (byte) 41, (byte) 105, (byte) 92, (byte) 187, (byte) 117, (byte) 53, (byte) 3, (byte) 165, (byte) 91, (byte) 43, (byte) 219, (byte) 244, (byte) 172, (byte) 248, (byte) 228, (byte) 187, (byte) 214, (byte) 47, (byte) 26, (byte) 195, (byte) 68, (byte) 69, (byte) 145, (byte) 208, (byte) 226, (byte) 107, (byte) 182, (byte) 25, (byte) 138, (byte) 15, (byte) 254, (byte) 41, (byte) 189, (byte) 191, (byte) 62, (byte) 132, (byte) 80, (byte) 149, (byte) 193, (byte) 153, (byte) 186, (byte) 246, (byte) 211, (byte) 164, (byte) 94, (byte) 219, (byte) 161, (byte) 221, (byte) 57, (byte) 133, (byte) 29, (byte) 34, (byte) 31, (byte) 120, (byte) 129, (byte) 52, (byte) 121, (byte) 56, (byte) 244, (byte) 255, (byte) 0, (byte) 3, (byte) 88, (byte) 87, (byte) 54, (byte) 90, (byte) 91, (byte) 70, (byte) 162, (byte) 29, (byte) 118, (byte) 25, (byte) 153, (byte) 3, (byte) 62, (byte) 193, (byte) 98, (byte) 97, (byte) 125, (byte) 193, (byte) 51, (byte) 140, (byte) 224, (byte) 100, (byte) 18, (byte) 161, (byte) 112, (byte) 79, (byte) 4, (byte) 231, (byte) 28, (byte) 147, (byte) 94, (byte) 181, (byte) 166, (byte) 120, (byte) 67, (byte) 75, (byte) 177, (byte) 179, (byte) 120, (byte) 102, (byte) 139, (byte) 237, (byte) 147, (byte) 79, (byte) 131, (byte) 61, (byte) 196, (byte) 220, (byte) 188, (byte) 135, (byte) 235, (byte) 216, (byte) 123, (byte) 10, (byte) 124, (byte) 222, (byte) 19, (byte) 211, (byte) 93, (byte) 54, (byte) 196, (byte) 247, (byte) 80, (byte) 127, (byte) 185, (byte) 59, (byte) 17, (byte) 244, (byte) 195, (byte) 100, (byte) 126, (byte) 149, (byte) 180, (byte) 116, (byte) 86, (byte) 51, (byte) 111, (byte) 83, (byte) 197, (byte) 26, (byte) 12, (byte) 188, (byte) 108, (byte) 73, (byte) 83, (byte) 27, (byte) 110, (byte) 7, (byte) 29, (byte) 240, (byte) 71, (byte) 245, (byte) 171, (byte) 34, (byte) 95, (byte) 246, (byte) 114, (byte) 58, (byte) 115, (byte) 197, (byte) 122, (byte) 140, (byte) 190, (byte) 2, (byte) 183, (byte) 111, (byte) 185, (byte) 120, (byte) 157, (byte) 115, (byte) 137, (byte) 44, (byte) 45, (byte) 219, (byte) 245, (byte) 8, (byte) 15, (byte) 235, (byte) 84, (byte) 102, (byte) 248, (byte) 124, (byte) 255, (byte) 0, (byte) 193, (byte) 253, (byte) 157, (byte) 39, (byte) 185, (byte) 142, (byte) 116, (byte) 63, (byte) 248, (byte) 236, (byte) 184, (byte) 253, (byte) 42, (byte) 249, (byte) 137, (byte) 177, (byte) 196, (byte) 232, (byte) 250, (byte) 116, (byte) 26, (byte) 133, (byte) 196, (byte) 177, (byte) 207, (byte) 36, (byte) 232, (byte) 171, (byte) 30, (byte) 71, (byte) 145, (byte) 24, (byte) 115, (byte) 156, (byte) 129, (byte) 158, (byte) 189, (byte) 6, (byte) 106, (byte) 118, (byte) 183, (byte) 142, (byte) 203, (byte) 197, (byte) 22, (byte) 241, (byte) 195, (byte) 191, (byte) 202, (byte) 23, (byte) 49, (byte) 58, (byte) 110, (byte) 77, (byte) 188, (byte) 22, (byte) 7, (byte) 212, (byte) 156, (byte) 3, (byte) 145, (byte) 215, (byte) 181, (byte) 116, (byte) 167, (byte) 193, (byte) 23, (byte) 246, (byte) 239, (byte) 190, (byte) 11, (byte) 82, (byte) 174, (byte) 58, (byte) 61, (byte) 174, (byte) 163, (byte) 229, (byte) 159, (byte) 195, (byte) 116, (byte) 68, (byte) 255, (byte) 0, (byte) 227, (byte) 213, (byte) 93, (byte) 188, (byte) 35, (byte) 173, (byte) 155, (byte) 184, (byte) 238, (byte) 166, (byte) 183, (byte) 184, (byte) 118, (byte) 71, (byte) 83, (byte) 243, (byte) 92, (byte) 164, (byte) 206, (byte) 66, (byte) 158, (byte) 57, (byte) 37, (byte) 106, (byte) 44, (byte) 249, (byte) 249, (byte) 175, (byte) 167, (byte) 99, (byte) 75, (byte) 195, (byte) 146, (byte) 214, (byte) 215, (byte) 189, (byte) 255, (byte) 0, (byte) 67, (byte) 110, (byte) 238, (byte) 242, (byte) 223, (byte) 79, (byte) 178, (byte) 251, (byte) 69, (byte) 204, (byte) 155, (byte) 16, (byte) 0, (byte) 56, (byte) 25, (byte) 44, (byte) 79, (byte) 64, (byte) 7, (byte) 114, (byte) 125, (byte) 41, (byte) 52, (byte) 127, (byte) 14, (byte) 220, (byte) 106, (byte) 247, (byte) 17, (byte) 234, (byte) 154, (byte) 236, (byte) 94, (byte) 92, (byte) 40, (byte) 119, (byte) 91, (byte) 88, (byte) 30, (byte) 139, (byte) 232, (byte) 242, (byte) 122, (byte) 183, (byte) 183, (byte) 111, (byte) 207, (byte) 55, (byte) 52, (byte) 95, (byte) 13, (byte) 204, (byte) 247, (byte) 73, (byte) 171, (byte) 107, (byte) 155, (byte) 94, (byte) 237, (byte) 127, (byte) 212, (byte) 91, (byte) 41, (byte) 204, (byte) 118, (byte) 163, (byte) 219, (byte) 213, (byte) 189, (byte) 91, (byte) 250, (byte) 99, (byte) 29, (byte) 53, (byte) 76, (byte) 99, (byte) 97, (byte) 54, (byte) 0, (byte) 1, (byte) 192, (byte) 224, (byte) 81, (byte) 75, (byte) 69, (byte) 89, (byte) 33, (byte) 69, (byte) 20, (byte) 80, (byte) 1, (byte) 73, (byte) 69, (byte) 20, (byte) 0, (byte) 180, (byte) 152, (byte) 207, (byte) 90, (byte) 40, (byte) 160, (byte) 10, (byte) 243, (byte) 88, (byte) 89, (byte) 220, (byte) 12, (byte) 77, (byte) 105, (byte) 4, (byte) 128, (byte) 255, (byte) 0, (byte) 122, (byte) 48, (byte) 107, (byte) 54, (byte) 111, (byte) 7, (byte) 120, (byte) 114, (byte) 115, (byte) 185, (byte) 244, (byte) 123, (byte) 96, (byte) 222, (byte) 168, (byte) 155, (byte) 79, (byte) 233, (byte) 69, (byte) 20, (byte) 1, (byte) 89, (byte) 188, (byte) 17, (byte) 165, (byte) 143, (byte) 248, (byte) 247, (byte) 184, (byte) 212, (byte) 45, (byte) 135, (byte) 101, (byte) 138, (byte) 241, (byte) 246, (byte) 143, (byte) 192, (byte) 146, (byte) 42, (byte) 7, (byte) 240, (byte) 93, (byte) 194, (byte) 255, (byte) 0, (byte) 199, (byte) 182, (byte) 191, (byte) 118, (byte) 163, (byte) 178, (byte) 205, (byte) 20, (byte) 114, (byte) 126, (byte) 187, (byte) 115, (byte) 69, (byte) 20, (byte) 92, (byte) 8, (byte) 31, (byte) 194, (byte) 254, (byte) 32, (byte) 143, (byte) 136, (byte) 181, (byte) 27, (byte) 9, (byte) 215, (byte) 210, (byte) 88, (byte) 29, (byte) 79, (byte) 232, (byte) 216, (byte) 253, (byte) 42, (byte) 164, (byte) 154, (byte) 39, (byte) 136, (byte) 225, (byte) 231, (byte) 251, (byte) 54, (byte) 218, (byte) 95, (byte) 246, (byte) 173, (byte) 175, (byte) 154, (byte) 35, (byte) 255, (byte) 0, (byte) 160, (byte) 231, (byte) 245, (byte) 162, (byte) 138, (byte) 119, (byte) 1, (byte) 26, (byte) 125, (byte) 122, (byte) 216, (byte) 98, (byte) 77, (byte) 47, (byte) 88, (byte) 140, (byte) 142, (byte) 134, (byte) 23, (byte) 89, (byte) 64, (byte) 252, (byte) 11, (byte) 16, (byte) 127, (byte) 21, (byte) 52, (byte) 209, (byte) 173, (byte) 100, (byte) 236, (byte) 187, (byte) 211, (byte) 111, (byte) 195, (byte) 147, (byte) 247, (byte) 163, (byte) 178, (byte) 144, (byte) 17, (byte) 245, (byte) 24, (byte) 193, (byte) 247, (byte) 32, (byte) 253, (byte) 5, (byte) 20, (byte) 82, (byte) 105, (byte) 49, (byte) 167, (byte) 97, (byte) 214, (byte) 218, (byte) 62, (byte) 163, (byte) 226, (byte) 89, (byte) 74, (byte) 186, (byte) 207, (byte) 167, (byte) 105, (byte) 32, (byte) 225, (byte) 153, (byte) 148, (byte) 164, (byte) 247, (byte) 62, (byte) 192, (byte) 117, (byte) 69, (byte) 253, (byte) 79, (byte) 183, (byte) 34, (byte) 187, (byte) 75, (byte) 13, (byte) 62, (byte) 211, (byte) 75, (byte) 179, (byte) 142, (byte) 210, (byte) 202, (byte) 4, (byte) 130, (byte) 24, (byte) 198, (byte) 21, (byte) 84, (byte) 81, (byte) 69, (byte) 36, (byte) 172, (byte) 13, (byte) 220, (byte) 181, (byte) 69, (byte) 20, (byte) 83, (byte) 16, (byte) 81, (byte) 69, (byte) 20, (byte) 0, (byte) 148, (byte) 81, (byte) 69, (byte) 0, (byte) 45, (byte) 20, (byte) 81, (byte) 64, (byte) 5, (byte) 20, (byte) 81, (byte) 64, (byte) 31, (byte) 255, (byte) 217 }; } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemAppleTwoFactory.java000066400000000000000000000036651312650303100276240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.io.IOException; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.command.PSystemSingleLineFactory; public class PSystemAppleTwoFactory extends PSystemSingleLineFactory { @Override protected AbstractPSystem executeLine(String line) { if (line.equalsIgnoreCase("apple //e") || line.equalsIgnoreCase("apple ][") || line.equalsIgnoreCase("apple II") || line.equalsIgnoreCase("Steve Jobs") || line.equalsIgnoreCase("Steve Wozniak")) { try { return new PSystemAppleTwo(); } catch (IOException e) { Log.error("Error " + e); e.printStackTrace(); } } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemCharlie.java000066400000000000000000000052711312650303100261030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.eggs; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.version.PSystemVersion; public class PSystemCharlie extends AbstractPSystem { private BufferedImage image; PSystemCharlie() { image = PSystemVersion.getCharlieImage(); } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, HtmlColorUtils.BLACK, getMetadata(), null, 0, 0, null, false); imageBuilder.setUDrawable(new UDrawable() { public void drawU(UGraphic ug) { final UImage im = new UImage(image); ug.draw(im); } }); return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os); } public DiagramDescription getDescription() { return new DiagramDescription("(Je Suis Charlie)"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemCharlieFactory.java000066400000000000000000000032241312650303100274270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.command.PSystemSingleLineFactory; public class PSystemCharlieFactory extends PSystemSingleLineFactory { @Override protected AbstractPSystem executeLine(String line) { if (line.equalsIgnoreCase("charlie") || line.equalsIgnoreCase("jesuischarlie")) { return new PSystemCharlie(); } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemColors.java000066400000000000000000000236541312650303100260020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.Iterator; import java.util.List; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.SpriteContainerEmpty; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorSetSimple; import net.sourceforge.plantuml.graphic.HtmlColorSimple; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UTranslate; // http://www.redblobgames.com/grids/hexagons/ public class PSystemColors extends AbstractPSystem implements UDrawable { private final double rectangleHeight = 28; private final double rectangleWidth = 175; private final HtmlColorSetSimple colors = new HtmlColorSetSimple(); private final String paletteCentralColor; private final double size = 60; public PSystemColors(String option) { if (option == null) { this.paletteCentralColor = null; } else { this.paletteCentralColor = option.replaceAll("\\#", ""); } } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, HtmlColorUtils.WHITE, getMetadata(), null, 0, 0, null, false); imageBuilder.setUDrawable(this); return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os); } public DiagramDescription getDescription() { return new DiagramDescription("(Colors)"); } public void drawU(UGraphic ug) { if (colors.getColorIfValid(paletteCentralColor) instanceof HtmlColorSimple) { drawPalette(ug); } else { drawFull(ug); } } private void drawPalette(UGraphic ug) { double x = (centerHexa(2, 0).getX() + centerHexa(3, 0).getX()) / 2; double y = centerHexa(0, 2).getY() + corner(1).getY(); ug = ug.apply(new UTranslate(x, y)); final UPolygon hexa = getHexa(); final List friends = getColorsCloseTo(paletteCentralColor); int idx = 0; drawOneHexa(ug, friends.get(idx++), 0, 0, hexa); drawOneHexa(ug, friends.get(idx++), 1, 0, hexa); drawOneHexa(ug, friends.get(idx++), 0, 1, hexa); drawOneHexa(ug, friends.get(idx++), -1, 1, hexa); drawOneHexa(ug, friends.get(idx++), -1, 0, hexa); drawOneHexa(ug, friends.get(idx++), -1, -1, hexa); drawOneHexa(ug, friends.get(idx++), 0, -1, hexa); drawOneHexa(ug, friends.get(idx++), 2, 0, hexa); drawOneHexa(ug, friends.get(idx++), 1, 1, hexa); drawOneHexa(ug, friends.get(idx++), 1, 2, hexa); drawOneHexa(ug, friends.get(idx++), 0, 2, hexa); drawOneHexa(ug, friends.get(idx++), -1, 2, hexa); drawOneHexa(ug, friends.get(idx++), -2, 1, hexa); drawOneHexa(ug, friends.get(idx++), -2, 0, hexa); drawOneHexa(ug, friends.get(idx++), -2, -1, hexa); drawOneHexa(ug, friends.get(idx++), -1, -2, hexa); drawOneHexa(ug, friends.get(idx++), 0, -2, hexa); drawOneHexa(ug, friends.get(idx++), 1, -2, hexa); drawOneHexa(ug, friends.get(idx++), 1, -1, hexa); } private Point2D centerHexa(int i, int j) { final double width = getWidth(); final double x = width * i + (j % 2 == 0 ? 0 : width / 2); final double y = size * j * 1.5; return new Point2D.Double(x, y); } private double getWidth() { return Math.sqrt(3) / 2 * 2 * size; } private void drawOneHexa(UGraphic ug, String colorName, int i, int j, UPolygon hexa) { final HtmlColorSimple color = (HtmlColorSimple) colors.getColorIfValid(colorName); ug = applyColor(ug, color); ug = ug.apply(new UTranslate(centerHexa(i, j))); ug.draw(hexa); final UFont font = UFont.sansSerif(14).bold(); TextBlock tt = getTextName(font, colorName, color); Dimension2D dimText = tt.calculateDimension(ug.getStringBounder()); if (dimText.getWidth() > getWidth()) { tt = getTextName(font, findShortest(ug.getStringBounder(), font, colorName), color); dimText = tt.calculateDimension(ug.getStringBounder()); } tt.drawU(ug.apply(new UTranslate(-dimText.getWidth() / 2, -dimText.getHeight() / 2))); } private String findShortest(StringBounder stringBounder, UFont font, String colorName) { String result = null; double min = Double.MAX_VALUE; for (int i = 1; i < colorName.length() - 1; i++) { if (Character.isLowerCase(colorName.charAt(i))) { continue; } final String candidat = colorName.substring(0, i) + BackSlash.BS_BS_N + colorName.substring(i); final TextBlock tt = getTextName(font, candidat, (HtmlColorSimple) HtmlColorUtils.BLACK); final double width = tt.calculateDimension(stringBounder).getWidth(); if (width < min) { result = candidat; min = width; } } return result; } private UGraphic applyColor(UGraphic ug, HtmlColor color) { return ug.apply(new UChangeColor(color)).apply(new UChangeBackColor(color)); } private Point2D corner(int i) { double angle_deg = 60 * i + 30; double angle_rad = Math.PI / 180 * angle_deg; return new Point2D.Double(size * Math.cos(angle_rad), size * Math.sin(angle_rad)); } private UPolygon getHexa() { final UPolygon result = new UPolygon(); for (int i = 0; i < 6; i++) { result.addPoint(corner(i)); } return result; } private List getColorsCloseTo(String other) { final List result = new ArrayList(colors.names()); for (Iterator it = result.iterator(); it.hasNext();) { final String candidat = it.next(); final String similar = candidat.replaceAll("Gray", "Grey"); if (candidat.equals(similar)) { continue; } if (result.contains(similar)) { it.remove(); } } if (containsCaseInsensitive(result, other) == false) { result.add(other); } Collections.sort(result, closeComparator(paletteCentralColor)); return result; } private boolean containsCaseInsensitive(Collection source, String target) { for (String s : source) { if (s.equalsIgnoreCase(target)) { return true; } } return false; } private Comparator closeComparator(String center) { final HtmlColorSimple centerColor = (HtmlColorSimple) colors.getColorIfValid(center); return new Comparator() { public int compare(String col1, String col2) { final double dist1 = centerColor.distance((HtmlColorSimple) colors.getColorIfValid(col1)); final double dist2 = centerColor.distance((HtmlColorSimple) colors.getColorIfValid(col2)); return (int) Math.signum(dist1 - dist2); } }; } private void drawFull(UGraphic ug) { final UFont font = UFont.sansSerif(14).bold(); ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK)); int i = 0; int j = 0; for (String name : colors.names()) { UGraphic tmp = getPositioned(ug, i, j); final HtmlColorSimple color = (HtmlColorSimple) colors.getColorIfValid(name); applyColor(tmp, color).draw(new URectangle(rectangleWidth, rectangleHeight)); final TextBlock tt = getTextName(font, name, color); final Dimension2D dimText = tt.calculateDimension(ug.getStringBounder()); final double dy = (rectangleHeight - dimText.getHeight()) / 2; final double dx = (rectangleWidth - dimText.getWidth()) / 2; tt.drawU(tmp.apply(new UTranslate(dx, dy))); if (j++ == 20) { j = 0; i++; } } } private TextBlock getTextName(final UFont font, String name, final HtmlColorSimple color) { final HtmlColorSimple opposite = color.opposite(); final FontConfiguration fc = new FontConfiguration(font, opposite, HtmlColorUtils.BLUE, true); final TextBlock tt = Display.getWithNewlines(name).create(fc, HorizontalAlignment.CENTER, new SpriteContainerEmpty()); return tt; } private UGraphic getPositioned(UGraphic ug, int i, int j) { return ug.apply(new UTranslate(rectangleWidth * i, rectangleHeight * j)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemColorsFactory.java000066400000000000000000000034441312650303100273250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.command.PSystemSingleLineFactory; public class PSystemColorsFactory extends PSystemSingleLineFactory { @Override protected AbstractPSystem executeLine(String line) { final Pattern pattern = Pattern.compile("^colors?\\s*(#?\\w+)?\\s*$"); final Matcher matcher = pattern.matcher(line); if (matcher.matches()) { return new PSystemColors(matcher.group(1)); } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemEgg.java000066400000000000000000000054361312650303100252410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class PSystemEgg extends AbstractPSystem { private final List strings = new ArrayList(); PSystemEgg(String sentence) { final StringTokenizer st = new StringTokenizer(sentence, "|"); while (st.hasMoreTokens()) { strings.add(st.nextToken()); } } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final TextBlockBackcolored result = getGraphicStrings(); final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, result.getBackcolor(), getMetadata(), null, 0, 0, null, false); imageBuilder.setUDrawable(result); return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os); } private TextBlockBackcolored getGraphicStrings() throws IOException { return GraphicStrings.createBlackOnWhite(strings); } public DiagramDescription getDescription() { return new DiagramDescription("(Easter Eggs)"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemEggFactory.java000066400000000000000000000045541312650303100265710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.io.UnsupportedEncodingException; import java.util.Arrays; import java.util.List; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.command.PSystemSingleLineFactory; public class PSystemEggFactory extends PSystemSingleLineFactory { final static private List all = Arrays .asList(EggUtils .toByteArrays("56092d35fce86a0dd88047a766c1d6541a7c5fd5ba212fa02db9a32a463422febd71a75a934eb135dec7d6c6325ddd17fd2fa437eba863462b28e3e92514998306a72790d93501335ed6b1262ea46ab79573142c28f8e92508978255a533d9cf7903394f9ab73a33b230a2b273033633adf16044888243b92f9bd8351f3d4f9aa2302fb264afa37546368424fa6a07919152bd2990d935092e49d9a02038b437aeb528"), EggUtils.toByteArrays("421e5b773c5df733a1194f716f18e8842155196b3b")); @Override protected AbstractPSystem executeLine(String line) { try { for (byte[] crypted : all) { final SentenceDecoder decoder = new SentenceDecoder(line, crypted); if (decoder.isOk()) { return new PSystemEgg(decoder.getSecret()); } } } catch (UnsupportedEncodingException e) { return null; } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemLost.java000066400000000000000000000052461312650303100254570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class PSystemLost extends AbstractPSystem { private final List strings = new ArrayList(); public PSystemLost() { strings.add("Thank you for choosing Oceanic Airlines."); } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final TextBlockBackcolored result = getGraphicStrings(); final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, result.getBackcolor(), getMetadata(), null, 0, 0, null, false); imageBuilder.setUDrawable(result); return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os); } private TextBlockBackcolored getGraphicStrings() throws IOException { return GraphicStrings.createBlackOnWhite(strings); } public DiagramDescription getDescription() { return new DiagramDescription("(Lost)"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemLostFactory.java000066400000000000000000000031631312650303100270030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.command.PSystemSingleLineFactory; public class PSystemLostFactory extends PSystemSingleLineFactory { @Override protected AbstractPSystem executeLine(String line) { if (line.matches("^4\\D+8\\D+15\\D+16\\D+23\\D+42")) { return new PSystemLost(); } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemPath.java000066400000000000000000000040331312650303100254230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; public class PSystemPath extends AbstractPSystem { private final GraphicsPath path; public PSystemPath(String s) { this.path = new GraphicsPath(new ColorMapperIdentity(), s); } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { return path.writeImage(os); } public DiagramDescription getDescription() { return new DiagramDescription("(Path)"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemPathFactory.java000066400000000000000000000036051312650303100267570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.command.PSystemSingleLineFactory; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; public class PSystemPathFactory extends PSystemSingleLineFactory { final private static Pattern2 p = MyPattern.cmpile("(?i)^path[%s]+([0-9A-Za-z]+)$"); @Override protected AbstractPSystem executeLine(String line) { final Matcher2 m = p.matcher(line); if (m.find() == false) { return null; } return new PSystemPath(m.group(1)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemRIP.java000066400000000000000000001223511312650303100251650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import javax.imageio.ImageIO; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.graphic.GraphicPosition; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class PSystemRIP extends AbstractPSystem { private final List strings = new ArrayList(); private final BufferedImage image; public PSystemRIP() throws IOException { strings.add(" To my Grandfather,"); strings.add(" A mon grand-pere,"); strings.add(" "); strings.add(" Jean CANOUET"); strings.add(" "); strings.add(" 31-OCT-1921 (Neuilly-Sur-Seine, France)"); strings.add(" 15-SEP-2009 (Nanterre, France)"); strings.add(" "); strings.add(" Requiescat In Pace"); strings.add(" "); final InputStream is = new ByteArrayInputStream(imm); image = ImageIO.read(is); is.close(); } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final TextBlockBackcolored result = getGraphicStrings(); final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, result.getBackcolor(), getMetadata(), null, 0, 0, null, false); imageBuilder.setUDrawable(result); return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os); } private TextBlockBackcolored getGraphicStrings() throws IOException { return GraphicStrings.createBlackOnWhite(strings, image, GraphicPosition.BOTTOM); } public DiagramDescription getDescription() { return new DiagramDescription("(RIP)"); } private static final byte imm[] = new byte[] { (byte) 255, (byte) 216, (byte) 255, (byte) 224, (byte) 0, (byte) 16, (byte) 74, (byte) 70, (byte) 73, (byte) 70, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 88, (byte) 2, (byte) 88, (byte) 0, (byte) 0, (byte) 255, (byte) 219, (byte) 0, (byte) 67, (byte) 0, (byte) 13, (byte) 9, (byte) 10, (byte) 11, (byte) 10, (byte) 8, (byte) 13, (byte) 11, (byte) 10, (byte) 11, (byte) 14, (byte) 14, (byte) 13, (byte) 15, (byte) 19, (byte) 32, (byte) 21, (byte) 19, (byte) 18, (byte) 18, (byte) 19, (byte) 39, (byte) 28, (byte) 30, (byte) 23, (byte) 32, (byte) 46, (byte) 41, (byte) 49, (byte) 48, (byte) 46, (byte) 41, (byte) 45, (byte) 44, (byte) 51, (byte) 58, (byte) 74, (byte) 62, (byte) 51, (byte) 54, (byte) 70, (byte) 55, (byte) 44, (byte) 45, (byte) 64, (byte) 87, (byte) 65, (byte) 70, (byte) 76, (byte) 78, (byte) 82, (byte) 83, (byte) 82, (byte) 50, (byte) 62, (byte) 90, (byte) 97, (byte) 90, (byte) 80, (byte) 96, (byte) 74, (byte) 81, (byte) 82, (byte) 79, (byte) 255, (byte) 219, (byte) 0, (byte) 67, (byte) 1, (byte) 14, (byte) 14, (byte) 14, (byte) 19, (byte) 17, (byte) 19, (byte) 38, (byte) 21, (byte) 21, (byte) 38, (byte) 79, (byte) 53, (byte) 45, (byte) 53, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 79, (byte) 255, (byte) 192, (byte) 0, (byte) 17, (byte) 8, (byte) 0, (byte) 135, (byte) 0, (byte) 162, (byte) 3, (byte) 1, (byte) 34, (byte) 0, (byte) 2, (byte) 17, (byte) 1, (byte) 3, (byte) 17, (byte) 1, (byte) 255, (byte) 196, (byte) 0, (byte) 31, (byte) 0, (byte) 0, (byte) 1, (byte) 5, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10, (byte) 11, (byte) 255, (byte) 196, (byte) 0, (byte) 181, (byte) 16, (byte) 0, (byte) 2, (byte) 1, (byte) 3, (byte) 3, (byte) 2, (byte) 4, (byte) 3, (byte) 5, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 0, (byte) 1, (byte) 125, (byte) 1, (byte) 2, (byte) 3, (byte) 0, (byte) 4, (byte) 17, (byte) 5, (byte) 18, (byte) 33, (byte) 49, (byte) 65, (byte) 6, (byte) 19, (byte) 81, (byte) 97, (byte) 7, (byte) 34, (byte) 113, (byte) 20, (byte) 50, (byte) 129, (byte) 145, (byte) 161, (byte) 8, (byte) 35, (byte) 66, (byte) 177, (byte) 193, (byte) 21, (byte) 82, (byte) 209, (byte) 240, (byte) 36, (byte) 51, (byte) 98, (byte) 114, (byte) 130, (byte) 9, (byte) 10, (byte) 22, (byte) 23, (byte) 24, (byte) 25, (byte) 26, (byte) 37, (byte) 38, (byte) 39, (byte) 40, (byte) 41, (byte) 42, (byte) 52, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) 131, (byte) 132, (byte) 133, (byte) 134, (byte) 135, (byte) 136, (byte) 137, (byte) 138, (byte) 146, (byte) 147, (byte) 148, (byte) 149, (byte) 150, (byte) 151, (byte) 152, (byte) 153, (byte) 154, (byte) 162, (byte) 163, (byte) 164, (byte) 165, (byte) 166, (byte) 167, (byte) 168, (byte) 169, (byte) 170, (byte) 178, (byte) 179, (byte) 180, (byte) 181, (byte) 182, (byte) 183, (byte) 184, (byte) 185, (byte) 186, (byte) 194, (byte) 195, (byte) 196, (byte) 197, (byte) 198, (byte) 199, (byte) 200, (byte) 201, (byte) 202, (byte) 210, (byte) 211, (byte) 212, (byte) 213, (byte) 214, (byte) 215, (byte) 216, (byte) 217, (byte) 218, (byte) 225, (byte) 226, (byte) 227, (byte) 228, (byte) 229, (byte) 230, (byte) 231, (byte) 232, (byte) 233, (byte) 234, (byte) 241, (byte) 242, (byte) 243, (byte) 244, (byte) 245, (byte) 246, (byte) 247, (byte) 248, (byte) 249, (byte) 250, (byte) 255, (byte) 196, (byte) 0, (byte) 31, (byte) 1, (byte) 0, (byte) 3, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10, (byte) 11, (byte) 255, (byte) 196, (byte) 0, (byte) 181, (byte) 17, (byte) 0, (byte) 2, (byte) 1, (byte) 2, (byte) 4, (byte) 4, (byte) 3, (byte) 4, (byte) 7, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 1, (byte) 2, (byte) 119, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 17, (byte) 4, (byte) 5, (byte) 33, (byte) 49, (byte) 6, (byte) 18, (byte) 65, (byte) 81, (byte) 7, (byte) 97, (byte) 113, (byte) 19, (byte) 34, (byte) 50, (byte) 129, (byte) 8, (byte) 20, (byte) 66, (byte) 145, (byte) 161, (byte) 177, (byte) 193, (byte) 9, (byte) 35, (byte) 51, (byte) 82, (byte) 240, (byte) 21, (byte) 98, (byte) 114, (byte) 209, (byte) 10, (byte) 22, (byte) 36, (byte) 52, (byte) 225, (byte) 37, (byte) 241, (byte) 23, (byte) 24, (byte) 25, (byte) 26, (byte) 38, (byte) 39, (byte) 40, (byte) 41, (byte) 42, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) 130, (byte) 131, (byte) 132, (byte) 133, (byte) 134, (byte) 135, (byte) 136, (byte) 137, (byte) 138, (byte) 146, (byte) 147, (byte) 148, (byte) 149, (byte) 150, (byte) 151, (byte) 152, (byte) 153, (byte) 154, (byte) 162, (byte) 163, (byte) 164, (byte) 165, (byte) 166, (byte) 167, (byte) 168, (byte) 169, (byte) 170, (byte) 178, (byte) 179, (byte) 180, (byte) 181, (byte) 182, (byte) 183, (byte) 184, (byte) 185, (byte) 186, (byte) 194, (byte) 195, (byte) 196, (byte) 197, (byte) 198, (byte) 199, (byte) 200, (byte) 201, (byte) 202, (byte) 210, (byte) 211, (byte) 212, (byte) 213, (byte) 214, (byte) 215, (byte) 216, (byte) 217, (byte) 218, (byte) 226, (byte) 227, (byte) 228, (byte) 229, (byte) 230, (byte) 231, (byte) 232, (byte) 233, (byte) 234, (byte) 242, (byte) 243, (byte) 244, (byte) 245, (byte) 246, (byte) 247, (byte) 248, (byte) 249, (byte) 250, (byte) 255, (byte) 218, (byte) 0, (byte) 12, (byte) 3, (byte) 1, (byte) 0, (byte) 2, (byte) 17, (byte) 3, (byte) 17, (byte) 0, (byte) 63, (byte) 0, (byte) 180, (byte) 48, (byte) 6, (byte) 69, (byte) 84, (byte) 212, (byte) 135, (byte) 250, (byte) 49, (byte) 235, (byte) 214, (byte) 174, (byte) 116, (byte) 246, (byte) 170, (byte) 154, (byte) 144, (byte) 205, (byte) 153, (byte) 61, (byte) 121, (byte) 21, (byte) 200, (byte) 246, (byte) 61, (byte) 8, (byte) 124, (byte) 72, (byte) 202, (byte) 94, (byte) 7, (byte) 29, (byte) 233, (byte) 24, (byte) 100, (byte) 127, (byte) 58, (byte) 114, (byte) 99, (byte) 181, (byte) 4, (byte) 113, (byte) 222, (byte) 176, (byte) 59, (byte) 8, (byte) 226, (byte) 228, (byte) 103, (byte) 29, (byte) 41, (byte) 177, (byte) 227, (byte) 127, (byte) 20, (byte) 228, (byte) 198, (byte) 211, (byte) 206, (byte) 41, (byte) 163, (byte) 137, (byte) 61, (byte) 168, (byte) 1, (byte) 95, (byte) 168, (byte) 232, (byte) 42, (byte) 212, (byte) 24, (byte) 242, (byte) 151, (byte) 57, (byte) 224, (byte) 246, (byte) 170, (byte) 210, (byte) 18, (byte) 112, (byte) 42, (byte) 205, (byte) 191, (byte) 250, (byte) 159, (byte) 188, (byte) 122, (byte) 211, (byte) 20, (byte) 182, (byte) 36, (byte) 7, (byte) 23, (byte) 72, (byte) 115, (byte) 220, (byte) 113, (byte) 90, (byte) 135, (byte) 238, (byte) 140, (byte) 117, (byte) 205, (byte) 100, (byte) 183, (byte) 19, (byte) 171, (byte) 99, (byte) 161, (byte) 28, (byte) 85, (byte) 249, (byte) 174, (byte) 226, (byte) 133, (byte) 112, (byte) 207, (byte) 207, (byte) 160, (byte) 173, (byte) 32, (byte) 99, (byte) 81, (byte) 55, (byte) 107, (byte) 22, (byte) 20, (byte) 117, (byte) 233, (byte) 214, (byte) 148, (byte) 116, (byte) 108, (byte) 250, (byte) 214, (byte) 83, (byte) 106, (byte) 172, (byte) 14, (byte) 35, (byte) 143, (byte) 143, (byte) 122, (byte) 106, (byte) 106, (byte) 115, (byte) 110, (byte) 249, (byte) 163, (byte) 4, (byte) 103, (byte) 165, (byte) 105, (byte) 116, (byte) 79, (byte) 179, (byte) 145, (byte) 179, (byte) 143, (byte) 148, (byte) 99, (byte) 138, (byte) 204, (byte) 214, (byte) 135, (byte) 203, (byte) 23, (byte) 63, (byte) 197, (byte) 82, (byte) 195, (byte) 168, (byte) 71, (byte) 39, (byte) 13, (byte) 149, (byte) 57, (byte) 232, (byte) 106, (byte) 13, (byte) 93, (byte) 131, (byte) 197, (byte) 27, (byte) 43, (byte) 103, (byte) 230, (byte) 235, (byte) 69, (byte) 197, (byte) 20, (byte) 212, (byte) 181, (byte) 28, (byte) 169, (byte) 38, (byte) 6, (byte) 8, (byte) 198, (byte) 61, (byte) 41, (byte) 205, (byte) 20, (byte) 196, (byte) 13, (byte) 178, (byte) 1, (byte) 248, (byte) 81, (byte) 24, (byte) 118, (byte) 81, (byte) 243, (byte) 246, (byte) 167, (byte) 180, (byte) 76, (byte) 64, (byte) 196, (byte) 173, (byte) 159, (byte) 76, (byte) 212, (byte) 131, (byte) 96, (byte) 177, (byte) 200, (byte) 62, (byte) 83, (byte) 43, (byte) 123, (byte) 226, (byte) 164, (byte) 17, (byte) 156, (byte) 99, (byte) 123, (byte) 126, (byte) 117, (byte) 24, (byte) 140, (byte) 175, (byte) 222, (byte) 118, (byte) 231, (byte) 190, (byte) 105, (byte) 193, (byte) 71, (byte) 77, (byte) 199, (byte) 241, (byte) 52, (byte) 196, (byte) 72, (byte) 34, (byte) 83, (byte) 213, (byte) 155, (byte) 39, (byte) 142, (byte) 180, (byte) 162, (byte) 36, (byte) 201, (byte) 201, (byte) 63, (byte) 157, (byte) 51, (byte) 9, (byte) 158, (byte) 88, (byte) 115, (byte) 239, (byte) 78, (byte) 81, (byte) 24, (byte) 39, (byte) 230, (byte) 20, (byte) 132, (byte) 39, (byte) 151, (byte) 31, (byte) 181, (byte) 20, (byte) 252, (byte) 197, (byte) 234, (byte) 40, (byte) 160, (byte) 46, (byte) 76, (byte) 7, (byte) 168, (byte) 170, (byte) 218, (byte) 128, (byte) 255, (byte) 0, (byte) 67, (byte) 127, (byte) 194, (byte) 174, (byte) 1, (byte) 199, (byte) 61, (byte) 42, (byte) 190, (byte) 160, (byte) 191, (byte) 232, (byte) 114, (byte) 96, (byte) 83, (byte) 123, (byte) 10, (byte) 59, (byte) 163, (byte) 13, (byte) 6, (byte) 6, (byte) 41, (byte) 89, (byte) 72, (byte) 247, (byte) 52, (byte) 168, (byte) 164, (byte) 119, (byte) 193, (byte) 167, (byte) 50, (byte) 156, (byte) 26, (byte) 231, (byte) 108, (byte) 236, (byte) 34, (byte) 140, (byte) 114, (byte) 221, (byte) 51, (byte) 81, (byte) 168, (byte) 30, (byte) 103, (byte) 34, (byte) 165, (byte) 139, (byte) 134, (byte) 61, (byte) 233, (byte) 164, (byte) 226, (byte) 83, (byte) 199, (byte) 90, (byte) 10, (byte) 65, (byte) 42, (byte) 227, (byte) 233, (byte) 86, (byte) 109, (byte) 128, (byte) 48, (byte) 231, (byte) 112, (byte) 94, (byte) 123, (byte) 213, (byte) 121, (byte) 58, (byte) 116, (byte) 233, (byte) 79, (byte) 50, (byte) 8, (byte) 236, (byte) 152, (byte) 224, (byte) 18, (byte) 125, (byte) 104, (byte) 90, (byte) 147, (byte) 45, (byte) 136, (byte) 238, (byte) 231, (byte) 253, (byte) 246, (byte) 200, (byte) 136, (byte) 220, (byte) 58, (byte) 181, (byte) 49, (byte) 85, (byte) 187, (byte) 245, (byte) 61, (byte) 205, (byte) 71, (byte) 2, (byte) 28, (byte) 100, (byte) 247, (byte) 171, (byte) 208, (byte) 71, (byte) 131, (byte) 156, (byte) 113, (byte) 90, (byte) 109, (byte) 161, (byte) 73, (byte) 13, (byte) 138, (byte) 14, (byte) 121, (byte) 228, (byte) 85, (byte) 143, (byte) 32, (byte) 40, (byte) 199, (byte) 74, (byte) 181, (byte) 111, (byte) 16, (byte) 61, (byte) 112, (byte) 125, (byte) 51, (byte) 83, (byte) 203, (byte) 26, (byte) 4, (byte) 31, (byte) 39, (byte) 228, (byte) 105, (byte) 1, (byte) 143, (byte) 44, (byte) 56, (byte) 233, (byte) 154, (byte) 169, (byte) 59, (byte) 72, (byte) 19, (byte) 110, (byte) 114, (byte) 1, (byte) 200, (byte) 21, (byte) 181, (byte) 34, (byte) 140, (byte) 30, (byte) 0, (byte) 250, (byte) 86, (byte) 124, (byte) 241, (byte) 130, (byte) 50, (byte) 71, (byte) 229, (byte) 66, (byte) 97, (byte) 107, (byte) 133, (byte) 165, (byte) 202, (byte) 200, (byte) 161, (byte) 93, (byte) 176, (byte) 122, (byte) 114, (byte) 106, (byte) 198, (byte) 3, (byte) 30, (byte) 95, (byte) 233, (byte) 205, (byte) 99, (byte) 74, (byte) 165, (byte) 36, (byte) 201, (byte) 30, (byte) 226, (byte) 181, (byte) 45, (byte) 36, (byte) 134, (byte) 120, (byte) 182, (byte) 202, (byte) 16, (byte) 17, (byte) 222, (byte) 180, (byte) 49, (byte) 156, (byte) 109, (byte) 169, (byte) 58, (byte) 136, (byte) 192, (byte) 193, (byte) 97, (byte) 249, (byte) 212, (byte) 170, (byte) 177, (byte) 131, (byte) 156, (byte) 138, (byte) 114, (byte) 8, (byte) 66, (byte) 241, (byte) 183, (byte) 138, (byte) 148, (byte) 24, (byte) 123, (byte) 117, (byte) 250, (byte) 80, (byte) 101, (byte) 113, (byte) 170, (byte) 98, (byte) 235, (byte) 149, (byte) 247, (byte) 226, (byte) 156, (byte) 101, (byte) 128, (byte) 1, (byte) 128, (byte) 51, (byte) 158, (byte) 160, (byte) 82, (byte) 230, (byte) 48, (byte) 49, (byte) 131, (byte) 207, (byte) 160, (byte) 163, (byte) 204, (byte) 78, (byte) 56, (byte) 63, (byte) 247, (byte) 205, (byte) 50, (byte) 70, (byte) 249, (byte) 145, (byte) 255, (byte) 0, (byte) 181, (byte) 255, (byte) 0, (byte) 124, (byte) 209, (byte) 78, (byte) 243, (byte) 71, (byte) 247, (byte) 91, (byte) 242, (byte) 162, (byte) 150, (byte) 131, (byte) 47, (byte) 99, (byte) 143, (byte) 173, (byte) 87, (byte) 191, (byte) 81, (byte) 246, (byte) 73, (byte) 51, (byte) 233, (byte) 87, (byte) 48, (byte) 14, (byte) 122, (byte) 213, (byte) 123, (byte) 209, (byte) 254, (byte) 137, (byte) 39, (byte) 166, (byte) 41, (byte) 189, (byte) 136, (byte) 142, (byte) 232, (byte) 231, (byte) 208, (byte) 102, (byte) 158, (byte) 220, (byte) 28, (byte) 10, (byte) 106, (byte) 227, (byte) 138, (byte) 151, (byte) 4, (byte) 142, (byte) 245, (byte) 204, (byte) 118, (byte) 144, (byte) 32, (byte) 204, (byte) 135, (byte) 53, (byte) 27, (byte) 224, (byte) 75, (byte) 199, (byte) 173, (byte) 74, (byte) 56, (byte) 147, (byte) 6, (byte) 152, (byte) 227, (byte) 247, (byte) 216, (byte) 52, (byte) 13, (byte) 4, (byte) 131, (byte) 229, (byte) 206, (byte) 42, (byte) 180, (byte) 161, (byte) 152, (byte) 172, (byte) 125, (byte) 135, (byte) 38, (byte) 174, (byte) 74, (byte) 0, (byte) 66, (byte) 7, (byte) 165, (byte) 64, (byte) 235, (byte) 209, (byte) 179, (byte) 205, (byte) 84, (byte) 55, (byte) 6, (byte) 75, (byte) 12, (byte) 125, (byte) 1, (byte) 206, (byte) 49, (byte) 82, (byte) 77, (byte) 113, (byte) 228, (byte) 97, (byte) 81, (byte) 55, (byte) 53, (byte) 62, (byte) 220, (byte) 101, (byte) 50, (byte) 8, (byte) 233, (byte) 82, (byte) 89, (byte) 36, (byte) 127, (byte) 104, (byte) 221, (byte) 112, (byte) 192, (byte) 51, (byte) 30, (byte) 51, (byte) 218, (byte) 173, (byte) 110, (byte) 13, (byte) 216, (byte) 91, (byte) 75, (byte) 240, (byte) 236, (byte) 18, (byte) 96, (byte) 87, (byte) 60, (byte) 100, (byte) 138, (byte) 213, (byte) 16, (byte) 130, (byte) 157, (byte) 141, (byte) 23, (byte) 246, (byte) 118, (byte) 182, (byte) 234, (byte) 140, (byte) 204, (byte) 24, (byte) 48, (byte) 4, (byte) 48, (byte) 82, (byte) 42, (byte) 72, (byte) 118, (byte) 199, (byte) 18, (byte) 146, (byte) 202, (byte) 85, (byte) 135, (byte) 20, (byte) 89, (byte) 18, (byte) 165, (byte) 116, (byte) 103, (byte) 94, (byte) 98, (byte) 221, (byte) 119, (byte) 177, (byte) 206, (byte) 122, (byte) 10, (byte) 200, (byte) 123, (byte) 208, (byte) 220, (byte) 52, (byte) 100, (byte) 15, (byte) 90, (byte) 222, (byte) 146, (byte) 15, (byte) 58, (byte) 38, (byte) 157, (byte) 212, (byte) 178, (byte) 47, (byte) 124, (byte) 116, (byte) 172, (byte) 233, (byte) 252, (byte) 150, (byte) 66, (byte) 172, (byte) 128, (byte) 46, (byte) 113, (byte) 144, (byte) 59, (byte) 209, (byte) 161, (byte) 92, (byte) 198, (byte) 93, (byte) 202, (byte) 228, (byte) 43, (byte) 1, (byte) 197, (byte) 45, (byte) 140, (byte) 209, (byte) 37, (byte) 198, (byte) 37, (byte) 25, (byte) 83, (byte) 198, (byte) 49, (byte) 82, (byte) 204, (byte) 134, (byte) 37, (byte) 10, (byte) 72, (byte) 62, (byte) 135, (byte) 218, (byte) 170, (byte) 194, (byte) 234, (byte) 147, (byte) 169, (byte) 35, (byte) 60, (byte) 250, (byte) 85, (byte) 33, (byte) 61, (byte) 81, (byte) 209, (byte) 164, (byte) 208, (byte) 237, (byte) 218, (byte) 128, (byte) 227, (byte) 217, (byte) 77, (byte) 60, (byte) 72, (byte) 167, (byte) 162, (byte) 177, (byte) 255, (byte) 0, (byte) 128, (byte) 154, (byte) 72, (byte) 231, (byte) 27, (byte) 70, (byte) 17, (byte) 200, (byte) 199, (byte) 101, (byte) 169, (byte) 145, (byte) 201, (byte) 255, (byte) 0, (byte) 150, (byte) 111, (byte) 84, (byte) 114, (byte) 49, (byte) 155, (byte) 207, (byte) 64, (byte) 173, (byte) 255, (byte) 0, (byte) 124, (byte) 208, (byte) 95, (byte) 166, (byte) 99, (byte) 111, (byte) 202, (byte) 165, (byte) 220, (byte) 199, (byte) 164, (byte) 109, (byte) 75, (byte) 185, (byte) 207, (byte) 30, (byte) 89, (byte) 252, (byte) 233, (byte) 8, (byte) 103, (byte) 154, (byte) 223, (byte) 243, (byte) 204, (byte) 254, (byte) 84, (byte) 83, (byte) 240, (byte) 255, (byte) 0, (byte) 243, (byte) 207, (byte) 245, (byte) 162, (byte) 139, (byte) 129, (byte) 108, (byte) 142, (byte) 106, (byte) 43, (byte) 197, (byte) 205, (byte) 164, (byte) 131, (byte) 167, (byte) 202, (byte) 106, (byte) 206, (byte) 61, (byte) 122, (byte) 212, (byte) 87, (byte) 35, (byte) 54, (byte) 210, (byte) 103, (byte) 251, (byte) 166, (byte) 155, (byte) 216, (byte) 148, (byte) 245, (byte) 57, (byte) 164, (byte) 83, (byte) 145, (byte) 215, (byte) 138, (byte) 148, (byte) 1, (byte) 154, (byte) 106, (byte) 14, (byte) 112, (byte) 106, (byte) 80, (byte) 56, (byte) 237, (byte) 154, (byte) 229, (byte) 103, (byte) 109, (byte) 202, (byte) 216, (byte) 253, (byte) 233, (byte) 166, (byte) 203, (byte) 254, (byte) 180, (byte) 26, (byte) 148, (byte) 2, (byte) 37, (byte) 250, (byte) 211, (byte) 102, (byte) 95, (byte) 222, (byte) 140, (byte) 154, (byte) 16, (byte) 192, (byte) 168, (byte) 96, (byte) 42, (byte) 213, (byte) 212, (byte) 17, (byte) 164, (byte) 33, (byte) 112, (byte) 8, (byte) 198, (byte) 106, (byte) 187, (byte) 175, (byte) 203, (byte) 212, (byte) 226, (byte) 172, (byte) 135, (byte) 13, (byte) 102, (byte) 197, (byte) 190, (byte) 241, (byte) 92, (byte) 125, (byte) 106, (byte) 224, (byte) 50, (byte) 188, (byte) 16, (byte) 70, (byte) 223, (byte) 42, (byte) 147, (byte) 130, (byte) 123, (byte) 28, (byte) 84, (byte) 255, (byte) 0, (byte) 101, (byte) 119, (byte) 159, (byte) 129, (byte) 140, (byte) 112, (byte) 42, (byte) 27, (byte) 77, (byte) 194, (byte) 69, (byte) 29, (byte) 171, (byte) 106, (byte) 37, (byte) 87, (byte) 56, (byte) 12, (byte) 1, (byte) 199, (byte) 122, (byte) 173, (byte) 68, (byte) 244, (byte) 27, (byte) 112, (byte) 215, (byte) 18, (byte) 90, (byte) 195, (byte) 28, (byte) 164, (byte) 58, (byte) 196, (byte) 48, (byte) 6, (byte) 59, (byte) 85, (byte) 41, (byte) 110, (byte) 30, (byte) 17, (byte) 177, (byte) 85, (byte) 126, (byte) 113, (byte) 223, (byte) 156, (byte) 86, (byte) 156, (byte) 144, (byte) 21, (byte) 66, (byte) 210, (byte) 55, (byte) 3, (byte) 144, (byte) 23, (byte) 189, (byte) 101, (byte) 198, (byte) 130, (byte) 123, (byte) 163, (byte) 185, (byte) 130, (byte) 250, (byte) 3, (byte) 218, (byte) 158, (byte) 251, (byte) 132, (byte) 82, (byte) 38, (byte) 180, (byte) 184, (byte) 157, (byte) 108, (byte) 165, (byte) 137, (byte) 27, (byte) 247, (byte) 114, (byte) 12, (byte) 50, (byte) 213, (byte) 9, (byte) 163, (byte) 85, (byte) 93, (byte) 170, (byte) 8, (byte) 238, (byte) 125, (byte) 234, (byte) 218, (byte) 68, (byte) 233, (byte) 118, (byte) 99, (byte) 71, (byte) 24, (byte) 60, (byte) 143, (byte) 66, (byte) 105, (byte) 243, (byte) 71, (byte) 34, (byte) 130, (byte) 90, (byte) 62, (byte) 71, (byte) 189, (byte) 14, (byte) 227, (byte) 178, (byte) 76, (byte) 206, (byte) 146, (byte) 47, (byte) 58, (byte) 84, (byte) 80, (byte) 6, (byte) 91, (byte) 214, (byte) 179, (byte) 221, (byte) 190, (byte) 207, (byte) 119, (byte) 141, (byte) 155, (byte) 130, (byte) 55, (byte) 74, (byte) 189, (byte) 44, (byte) 158, (byte) 84, (byte) 193, (byte) 240, (byte) 1, (byte) 0, (byte) 145, (byte) 143, (byte) 90, (byte) 207, (byte) 11, (byte) 52, (byte) 243, (byte) 240, (byte) 187, (byte) 153, (byte) 143, (byte) 65, (byte) 84, (byte) 132, (byte) 246, (byte) 58, (byte) 107, (byte) 121, (byte) 76, (byte) 145, (byte) 171, (byte) 136, (byte) 142, (byte) 8, (byte) 233, (byte) 154, (byte) 156, (byte) 23, (byte) 255, (byte) 0, (byte) 158, (byte) 120, (byte) 252, (byte) 106, (byte) 59, (byte) 88, (byte) 231, (byte) 72, (byte) 85, (byte) 10, (byte) 32, (byte) 192, (byte) 171, (byte) 24, (byte) 151, (byte) 31, (byte) 193, (byte) 154, (byte) 163, (byte) 141, (byte) 140, (byte) 5, (byte) 241, (byte) 247, (byte) 7, (byte) 231, (byte) 74, (byte) 60, (byte) 206, (byte) 161, (byte) 71, (byte) 231, (byte) 78, (byte) 219, (byte) 47, (byte) 251, (byte) 20, (byte) 170, (byte) 178, (byte) 231, (byte) 239, (byte) 47, (byte) 229, (byte) 64, (byte) 134, (byte) 252, (byte) 222, (byte) 139, (byte) 249, (byte) 209, (byte) 82, (byte) 121, (byte) 114, (byte) 255, (byte) 0, (byte) 121, (byte) 104, (byte) 164, (byte) 23, (byte) 44, (byte) 149, (byte) 39, (byte) 165, (byte) 71, (byte) 58, (byte) 159, (byte) 33, (byte) 198, (byte) 63, (byte) 132, (byte) 212, (byte) 248, (byte) 7, (byte) 138, (byte) 108, (byte) 171, (byte) 251, (byte) 166, (byte) 250, (byte) 98, (byte) 171, (byte) 161, (byte) 11, (byte) 115, (byte) 150, (byte) 140, (byte) 124, (byte) 220, (byte) 84, (byte) 219, (byte) 121, (byte) 166, (byte) 42, (byte) 146, (byte) 216, (byte) 29, (byte) 141, (byte) 78, (byte) 163, (byte) 154, (byte) 228, (byte) 123, (byte) 157, (byte) 197, (byte) 82, (byte) 15, (byte) 152, (byte) 41, (byte) 179, (byte) 175, (byte) 206, (byte) 9, (byte) 169, (byte) 153, (byte) 79, (byte) 154, (byte) 41, (byte) 147, (byte) 174, (byte) 25, (byte) 73, (byte) 206, (byte) 40, (byte) 24, (byte) 99, (byte) 9, (byte) 142, (byte) 105, (byte) 208, (byte) 32, (byte) 101, (byte) 37, (byte) 219, (byte) 104, (byte) 3, (byte) 34, (byte) 159, (byte) 183, (byte) 40, (byte) 112, (byte) 57, (byte) 237, (byte) 87, (byte) 108, (byte) 236, (byte) 100, (byte) 40, (byte) 124, (byte) 193, (byte) 141, (byte) 195, (byte) 165, (byte) 105, (byte) 74, (byte) 46, (byte) 79, (byte) 66, (byte) 39, (byte) 53, (byte) 21, (byte) 118, (byte) 80, (byte) 183, (byte) 31, (byte) 48, (byte) 30, (byte) 245, (byte) 173, (byte) 110, (byte) 152, (byte) 249, (byte) 143, (byte) 65, (byte) 84, (byte) 163, (byte) 128, (byte) 195, (byte) 115, (byte) 176, (byte) 245, (byte) 7, (byte) 154, (byte) 211, (byte) 141, (byte) 51, (byte) 149, (byte) 238, (byte) 106, (byte) 154, (byte) 177, (byte) 92, (byte) 221, (byte) 72, (byte) 46, (byte) 238, (byte) 55, (byte) 28, (byte) 100, (byte) 243, (byte) 85, (byte) 226, (byte) 183, (byte) 93, (byte) 187, (byte) 152, (byte) 114, (byte) 122, (byte) 123, (byte) 83, (byte) 117, (byte) 8, (byte) 38, (byte) 102, (byte) 45, (byte) 19, (byte) 99, (byte) 29, (byte) 133, (byte) 85, (byte) 84, (byte) 185, (byte) 85, (byte) 206, (byte) 72, (byte) 230, (byte) 132, (byte) 104, (byte) 147, (byte) 104, (byte) 89, (byte) 3, (byte) 67, (byte) 117, (byte) 149, (byte) 99, (byte) 128, (byte) 106, (byte) 244, (byte) 178, (byte) 9, (byte) 34, (byte) 221, (byte) 237, (byte) 89, (byte) 66, (byte) 41, (byte) 158, (byte) 113, (byte) 184, (byte) 182, (byte) 220, (byte) 242, (byte) 107, (byte) 96, (byte) 162, (byte) 139, (byte) 124, (byte) 142, (byte) 167, (byte) 138, (byte) 24, (byte) 164, (byte) 236, (byte) 97, (byte) 94, (byte) 129, (byte) 146, (byte) 9, (byte) 193, (byte) 199, (byte) 21, (byte) 14, (byte) 155, (byte) 230, (byte) 11, (byte) 164, (byte) 219, (byte) 183, (byte) 35, (byte) 212, (byte) 113, (byte) 79, (byte) 212, (byte) 207, (byte) 250, (byte) 70, (byte) 220, (byte) 227, (byte) 2, (byte) 173, (byte) 104, (byte) 214, (byte) 141, (byte) 33, (byte) 105, (byte) 3, (byte) 225, (byte) 151, (byte) 167, (byte) 28, (byte) 85, (byte) 35, (byte) 57, (byte) 187, (byte) 35, (byte) 106, (byte) 53, (byte) 159, (byte) 3, (byte) 123, (byte) 174, (byte) 125, (byte) 133, (byte) 60, (byte) 71, (byte) 38, (byte) 57, (byte) 113, (byte) 159, (byte) 165, (byte) 34, (byte) 197, (byte) 40, (byte) 31, (byte) 52, (byte) 205, (byte) 159, (byte) 165, (byte) 56, (byte) 198, (byte) 248, (byte) 229, (byte) 216, (byte) 211, (byte) 57, (byte) 67, (byte) 99, (byte) 224, (byte) 130, (byte) 252, (byte) 253, (byte) 41, (byte) 66, (byte) 201, (byte) 221, (byte) 248, (byte) 250, (byte) 81, (byte) 229, (byte) 147, (byte) 140, (byte) 187, (byte) 82, (byte) 136, (byte) 207, (byte) 247, (byte) 219, (byte) 31, (byte) 90, (byte) 96, (byte) 46, (byte) 195, (byte) 255, (byte) 0, (byte) 61, (byte) 13, (byte) 20, (byte) 121, (byte) 63, (byte) 237, (byte) 55, (byte) 231, (byte) 69, (byte) 23, (byte) 21, (byte) 139, (byte) 152, (byte) 201, (byte) 247, (byte) 164, (byte) 117, (byte) 249, (byte) 79, (byte) 166, (byte) 41, (byte) 195, (byte) 20, (byte) 132, (byte) 124, (byte) 164, (byte) 85, (byte) 16, (byte) 115, (byte) 32, (byte) 126, (byte) 240, (byte) 129, (byte) 235, (byte) 82, (byte) 117, (byte) 224, (byte) 83, (byte) 74, (byte) 226, (byte) 118, (byte) 235, (byte) 212, (byte) 212, (byte) 161, (byte) 79, (byte) 28, (byte) 243, (byte) 92, (byte) 143, (byte) 115, (byte) 182, (byte) 229, (byte) 121, (byte) 0, (byte) 14, (byte) 50, (byte) 41, (byte) 207, (byte) 3, (byte) 202, (byte) 192, (byte) 39, (byte) 62, (byte) 167, (byte) 210, (byte) 174, (byte) 195, (byte) 100, (byte) 101, (byte) 96, (byte) 207, (byte) 144, (byte) 61, (byte) 43, (byte) 78, (byte) 27, (byte) 116, (byte) 81, (byte) 133, (byte) 0, (byte) 98, (byte) 183, (byte) 167, (byte) 69, (byte) 189, (byte) 89, (byte) 140, (byte) 235, (byte) 168, (byte) 236, (byte) 83, (byte) 176, (byte) 177, (byte) 0, (byte) 130, (byte) 252, (byte) 227, (byte) 214, (byte) 180, (byte) 210, (byte) 60, (byte) 47, (byte) 35, (byte) 156, (byte) 212, (byte) 144, (byte) 198, (byte) 20, (byte) 142, (byte) 42, (byte) 114, (byte) 163, (byte) 56, (byte) 29, (byte) 235, (byte) 174, (byte) 49, (byte) 81, (byte) 86, (byte) 71, (byte) 28, (byte) 230, (byte) 228, (byte) 238, (byte) 204, (byte) 125, (byte) 86, (byte) 216, (byte) 161, (byte) 89, (byte) 194, (byte) 251, (byte) 54, (byte) 59, (byte) 84, (byte) 105, (byte) 40, (byte) 40, (byte) 174, (byte) 189, (byte) 71, (byte) 167, (byte) 90, (byte) 223, (byte) 186, (byte) 183, (byte) 89, (byte) 160, (byte) 42, (byte) 195, (byte) 130, (byte) 48, (byte) 107, (byte) 154, (byte) 8, (byte) 246, (byte) 183, (byte) 13, (byte) 4, (byte) 199, (byte) 31, (byte) 221, (byte) 61, (byte) 136, (byte) 172, (byte) 106, (byte) 199, (byte) 170, (byte) 58, (byte) 104, (byte) 78, (byte) 234, (byte) 204, (byte) 149, (byte) 8, (byte) 147, (byte) 118, (byte) 72, (byte) 235, (byte) 154, (byte) 99, (byte) 40, (byte) 42, (byte) 113, (byte) 131, (byte) 138, (byte) 35, (byte) 27, (byte) 36, (byte) 200, (byte) 28, (byte) 19, (byte) 79, (byte) 102, (byte) 11, (byte) 209, (byte) 125, (byte) 248, (byte) 172, (byte) 108, (byte) 117, (byte) 166, (byte) 85, (byte) 224, (byte) 238, (byte) 35, (byte) 29, (byte) 42, (byte) 1, (byte) 57, (byte) 84, (byte) 62, (byte) 220, (byte) 1, (byte) 235, (byte) 83, (byte) 207, (byte) 242, (byte) 41, (byte) 218, (byte) 58, (byte) 251, (byte) 209, (byte) 97, (byte) 109, (byte) 188, (byte) 153, (byte) 88, (byte) 12, (byte) 3, (byte) 133, (byte) 250, (byte) 250, (byte) 213, (byte) 70, (byte) 23, (byte) 100, (byte) 212, (byte) 154, (byte) 138, (byte) 185, (byte) 3, (byte) 104, (byte) 13, (byte) 112, (byte) 158, (byte) 107, (byte) 204, (byte) 86, (byte) 86, (byte) 228, (byte) 140, (byte) 112, (byte) 42, (byte) 75, (byte) 125, (byte) 60, (byte) 89, (byte) 194, (byte) 82, (byte) 89, (byte) 93, (byte) 73, (byte) 63, (byte) 120, (byte) 30, (byte) 43, (byte) 105, (byte) 27, (byte) 229, (byte) 7, (byte) 20, (byte) 247, (byte) 69, (byte) 117, (byte) 33, (byte) 128, (byte) 32, (byte) 245, (byte) 205, (byte) 110, (byte) 233, (byte) 163, (byte) 139, (byte) 219, (byte) 73, (byte) 238, (byte) 103, (byte) 36, (byte) 42, (byte) 121, (byte) 243, (byte) 73, (byte) 255, (byte) 0, (byte) 129, (byte) 84, (byte) 130, (byte) 20, (byte) 35, (byte) 33, (byte) 219, (byte) 254, (byte) 250, (byte) 172, (byte) 251, (byte) 203, (byte) 83, (byte) 167, (byte) 75, (byte) 231, (byte) 196, (byte) 187, (byte) 161, (byte) 39, (byte) 230, (byte) 83, (byte) 218, (byte) 174, (byte) 91, (byte) 205, (byte) 105, (byte) 60, (byte) 97, (byte) 208, (byte) 168, (byte) 227, (byte) 167, (byte) 165, (byte) 100, (byte) 213, (byte) 141, (byte) 58, (byte) 93, (byte) 18, (byte) 249, (byte) 49, (byte) 255, (byte) 0, (byte) 120, (byte) 243, (byte) 254, (byte) 213, (byte) 30, (byte) 84, (byte) 93, (byte) 50, (byte) 127, (byte) 239, (byte) 170, (byte) 81, (byte) 228, (byte) 15, (byte) 238, (byte) 81, (byte) 254, (byte) 142, (byte) 23, (byte) 248, (byte) 41, (byte) 8, (byte) 60, (byte) 168, (byte) 127, (byte) 188, (byte) 127, (byte) 239, (byte) 170, (byte) 41, (byte) 63, (byte) 209, (byte) 255, (byte) 0, (byte) 216, (byte) 162, (byte) 141, (byte) 7, (byte) 115, (byte) 67, (byte) 29, (byte) 232, (byte) 199, (byte) 81, (byte) 235, (byte) 79, (byte) 160, (byte) 138, (byte) 163, (byte) 51, (byte) 152, (byte) 117, (byte) 38, (byte) 233, (byte) 148, (byte) 15, (byte) 226, (byte) 34, (byte) 180, (byte) 173, (byte) 237, (byte) 48, (byte) 1, (byte) 97, (byte) 255, (byte) 0, (byte) 214, (byte) 169, (byte) 160, (byte) 176, (byte) 219, (byte) 44, (byte) 147, (byte) 75, (byte) 221, (byte) 142, (byte) 209, (byte) 87, (byte) 226, (byte) 139, (byte) 208, (byte) 126, (byte) 116, (byte) 233, (byte) 210, (byte) 183, (byte) 188, (byte) 199, (byte) 86, (byte) 173, (byte) 215, (byte) 42, (byte) 35, (byte) 142, (byte) 53, (byte) 94, (byte) 49, (byte) 83, (byte) 249, (byte) 67, (byte) 32, (byte) 140, (byte) 84, (byte) 137, (byte) 22, (byte) 57, (byte) 53, (byte) 32, (byte) 94, (byte) 245, (byte) 185, (byte) 206, (byte) 49, (byte) 83, (byte) 10, (byte) 24, (byte) 118, (byte) 52, (byte) 253, (byte) 185, (byte) 96, (byte) 77, (byte) 57, (byte) 70, (byte) 65, (byte) 200, (byte) 169, (byte) 54, (byte) 240, (byte) 41, (byte) 12, (byte) 16, (byte) 238, (byte) 5, (byte) 79, (byte) 81, (byte) 84, (byte) 53, (byte) 61, (byte) 60, (byte) 93, (byte) 33, (byte) 3, (byte) 135, (byte) 31, (byte) 116, (byte) 214, (byte) 134, (byte) 222, (byte) 132, (byte) 83, (byte) 156, (byte) 110, (byte) 92, (byte) 142, (byte) 162, (byte) 144, (byte) 211, (byte) 105, (byte) 221, (byte) 28, (byte) 121, (byte) 183, (byte) 185, (byte) 137, (byte) 138, (byte) 156, (byte) 241, (byte) 237, (byte) 71, (byte) 152, (byte) 234, (byte) 62, (byte) 97, (byte) 205, (byte) 116, (byte) 146, (byte) 91, (byte) 164, (byte) 255, (byte) 0, (byte) 49, (byte) 24, (byte) 35, (byte) 140, (byte) 138, (byte) 161, (byte) 45, (byte) 178, (byte) 36, (byte) 152, (byte) 35, (byte) 154, (byte) 194, (byte) 81, (byte) 104, (byte) 236, (byte) 133, (byte) 85, (byte) 35, (byte) 13, (byte) 163, (byte) 121, (byte) 166, (byte) 85, (byte) 60, (byte) 100, (byte) 214, (byte) 196, (byte) 80, (byte) 4, (byte) 9, (byte) 26, (byte) 224, (byte) 119, (byte) 168, (byte) 4, (byte) 5, (byte) 175, (byte) 14, (byte) 209, (byte) 192, (byte) 239, (byte) 90, (byte) 98, (byte) 220, (byte) 44, (byte) 91, (byte) 137, (byte) 201, (byte) 29, (byte) 42, (byte) 233, (byte) 167, (byte) 185, (byte) 157, (byte) 121, (byte) 105, (byte) 98, (byte) 154, (byte) 41, (byte) 85, (byte) 83, (byte) 219, (byte) 161, (byte) 169, (byte) 151, (byte) 142, (byte) 61, (byte) 63, (byte) 149, (byte) 72, (byte) 209, (byte) 0, (byte) 132, (byte) 122, (byte) 115, (byte) 81, (byte) 99, (byte) 24, (byte) 173, (byte) 142, (byte) 113, (byte) 110, (byte) 33, (byte) 73, (byte) 237, (byte) 200, (byte) 97, (byte) 199, (byte) 67, (byte) 244, (byte) 174, (byte) 94, (byte) 214, (byte) 69, (byte) 176, (byte) 212, (byte) 222, (byte) 7, (byte) 251, (byte) 164, (byte) 227, (byte) 165, (byte) 117, (byte) 145, (byte) 99, (byte) 12, (byte) 167, (byte) 21, (byte) 205, (byte) 248, (byte) 146, (byte) 31, (byte) 42, (byte) 120, (byte) 231, (byte) 69, (byte) 231, (byte) 161, (byte) 250, (byte) 138, (byte) 206, (byte) 162, (byte) 208, (byte) 214, (byte) 139, (byte) 215, (byte) 151, (byte) 185, (byte) 171, (byte) 190, (byte) 35, (byte) 252, (byte) 56, (byte) 252, (byte) 40, (byte) 221, (byte) 22, (byte) 51, (byte) 183, (byte) 255, (byte) 0, (byte) 29, (byte) 168, (byte) 236, (byte) 174, (byte) 60, (byte) 251, (byte) 84, (byte) 125, (byte) 135, (byte) 36, (byte) 96, (byte) 212, (byte) 197, (byte) 184, (byte) 255, (byte) 0, (byte) 86, (byte) 213, (byte) 137, (byte) 67, (byte) 124, (byte) 216, (byte) 191, (byte) 186, (byte) 127, (byte) 239, (byte) 154, (byte) 41, (byte) 124, (byte) 207, (byte) 250, (byte) 100, (byte) 223, (byte) 149, (byte) 20, (byte) 12, (byte) 209, (byte) 198, (byte) 120, (byte) 169, (byte) 35, (byte) 143, (byte) 113, (byte) 246, (byte) 20, (byte) 152, (byte) 61, (byte) 106, (byte) 196, (byte) 73, (byte) 182, (byte) 44, (byte) 250, (byte) 214, (byte) 145, (byte) 87, (byte) 102, (byte) 82, (byte) 118, (byte) 34, (byte) 88, (byte) 183, (byte) 201, (byte) 147, (byte) 208, (byte) 118, (byte) 171, (byte) 11, (byte) 31, (byte) 124, (byte) 83, (byte) 97, (byte) 24, (byte) 82, (byte) 125, (byte) 77, (byte) 90, (byte) 3, (byte) 3, (byte) 21, (byte) 165, (byte) 204, (byte) 200, (byte) 74, (byte) 99, (byte) 154, (byte) 66, (byte) 184, (byte) 197, (byte) 78, (byte) 87, (byte) 62, (byte) 244, (byte) 214, (byte) 92, (byte) 227, (byte) 210, (byte) 139, (byte) 136, (byte) 131, (byte) 163, (byte) 98, (byte) 165, (byte) 2, (byte) 145, (byte) 151, (byte) 231, (byte) 252, (byte) 42, (byte) 80, (byte) 56, (byte) 161, (byte) 140, (byte) 140, (byte) 112, (byte) 219, (byte) 79, (byte) 122, (byte) 90, (byte) 71, (byte) 24, (byte) 193, (byte) 29, (byte) 169, (byte) 123, (byte) 231, (byte) 214, (byte) 129, (byte) 145, (byte) 178, (byte) 158, (byte) 171, (byte) 138, (byte) 169, (byte) 120, (byte) 141, (byte) 144, (byte) 248, (byte) 233, (byte) 214, (byte) 175, (byte) 16, (byte) 122, (byte) 83, (byte) 72, (byte) 12, (byte) 118, (byte) 176, (byte) 224, (byte) 138, (byte) 26, (byte) 186, (byte) 176, (byte) 70, (byte) 78, (byte) 46, (byte) 230, (byte) 84, (byte) 17, (byte) 147, (byte) 48, (byte) 53, (byte) 121, (byte) 211, (byte) 10, (byte) 5, (byte) 71, (byte) 111, (byte) 9, (byte) 75, (byte) 135, (byte) 95, (byte) 238, (byte) 244, (byte) 171, (byte) 18, (byte) 142, (byte) 71, (byte) 214, (byte) 148, (byte) 21, (byte) 145, (byte) 85, (byte) 37, (byte) 205, (byte) 34, (byte) 177, (byte) 4, (byte) 231, (byte) 138, (byte) 132, (byte) 175, (byte) 31, (byte) 90, (byte) 182, (byte) 87, (byte) 4, (byte) 212, (byte) 44, (byte) 160, (byte) 49, (byte) 21, (byte) 68, (byte) 21, (byte) 199, (byte) 202, (byte) 224, (byte) 254, (byte) 117, (byte) 71, (byte) 196, (byte) 16, (byte) 249, (byte) 154, (byte) 116, (byte) 140, (byte) 163, (byte) 37, (byte) 112, (byte) 195, (byte) 250, (byte) 214, (byte) 139, (byte) 167, (byte) 28, (byte) 117, (byte) 166, (byte) 74, (byte) 162, (byte) 88, (byte) 25, (byte) 8, (byte) 206, (byte) 84, (byte) 138, (byte) 77, (byte) 93, (byte) 21, (byte) 23, (byte) 102, (byte) 153, (byte) 207, (byte) 104, (byte) 55, (byte) 18, (byte) 24, (byte) 90, (byte) 61, (byte) 160, (byte) 224, (byte) 250, (byte) 214, (byte) 182, (byte) 249, (byte) 127, (byte) 184, (byte) 63, (byte) 58, (byte) 231, (byte) 52, (byte) 150, (byte) 150, (byte) 45, (byte) 65, (byte) 145, (byte) 72, (byte) 29, (byte) 143, (byte) 21, (byte) 209, (byte) 126, (byte) 255, (byte) 0, (byte) 213, (byte) 115, (byte) 88, (byte) 29, (byte) 19, (byte) 90, (byte) 134, (byte) 249, (byte) 255, (byte) 0, (byte) 184, (byte) 159, (byte) 157, (byte) 20, (byte) 126, (byte) 251, (byte) 213, (byte) 127, (byte) 42, (byte) 40, (byte) 185, (byte) 54, (byte) 53, (byte) 209, (byte) 114, (byte) 192, (byte) 26, (byte) 179, (byte) 39, (byte) 220, (byte) 0, (byte) 81, (byte) 69, (byte) 109, (byte) 29, (byte) 140, (byte) 36, (byte) 245, (byte) 31, (byte) 18, (byte) 141, (byte) 192, (byte) 122, (byte) 10, (byte) 177, (byte) 138, (byte) 40, (byte) 160, (byte) 66, (byte) 116, (byte) 56, (byte) 161, (byte) 128, (byte) 234, (byte) 40, (byte) 162, (byte) 129, (byte) 12, (byte) 97, (byte) 215, (byte) 233, (byte) 73, (byte) 25, (byte) 36, (byte) 81, (byte) 69, (byte) 3, (byte) 7, (byte) 25, (byte) 28, (byte) 83, (byte) 87, (byte) 238, (byte) 224, (byte) 209, (byte) 69, (byte) 48, (byte) 23, (byte) 60, (byte) 82, (byte) 48, (byte) 252, (byte) 232, (byte) 162, (byte) 128, (byte) 19, (byte) 0, (byte) 190, (byte) 238, (byte) 132, (byte) 140, (byte) 26, (byte) 107, (byte) 140, (byte) 156, (byte) 122, (byte) 81, (byte) 69, (byte) 2, (byte) 68, (byte) 108, (byte) 188, (byte) 212, (byte) 110, (byte) 189, (byte) 40, (byte) 162, (byte) 129, (byte) 145, (byte) 55, (byte) 99, (byte) 81, (byte) 72, (byte) 187, (byte) 64, (byte) 97, (byte) 235, (byte) 69, (byte) 20, (byte) 193, (byte) 28, (byte) 124, (byte) 136, (byte) 209, (byte) 235, (byte) 178, (byte) 5, (byte) 114, (byte) 191, (byte) 188, (byte) 61, (byte) 43, (byte) 162, (byte) 242, (byte) 164, (byte) 219, (byte) 254, (byte) 185, (byte) 191, (byte) 33, (byte) 69, (byte) 21, (byte) 206, (byte) 247, (byte) 58, (byte) 166, (byte) 244, (byte) 66, (byte) 249, (byte) 18, (byte) 255, (byte) 0, (byte) 207, (byte) 193, (byte) 255, (byte) 0, (byte) 190, (byte) 104, (byte) 162, (byte) 138, (byte) 68, (byte) 159, (byte) 255, (byte) 217 }; } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemRIPFactory.java000066400000000000000000000034131312650303100265120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.io.IOException; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.command.PSystemSingleLineFactory; public class PSystemRIPFactory extends PSystemSingleLineFactory { @Override protected AbstractPSystem executeLine(String line) { if (line.equalsIgnoreCase("jean canouet")) { try { return new PSystemRIP(); } catch (IOException e) { Log.error("Error " + e); e.printStackTrace(); } } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemWelcome.java000066400000000000000000000073271312650303100261330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.graphic.GraphicPosition; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.version.PSystemVersion; public class PSystemWelcome extends AbstractPSystem { private final List strings = new ArrayList(); private final GraphicPosition position; public PSystemWelcome(GraphicPosition position) { this.position = position; strings.add("Welcome to PlantUML!"); strings.add(" "); strings.add("If you use this software, you accept its license."); strings.add("(details by typing \"\"license\"\" keyword)"); strings.add(" "); strings.add("You can start with a simple UML Diagram like:"); strings.add(" "); strings.add("\"\"Bob->Alice: Hello\"\""); strings.add(" "); strings.add("Or"); strings.add(" "); strings.add("\"\"class Example\"\""); strings.add(" "); strings.add("You will find more information about PlantUML syntax on http://plantuml.com"); if (position == GraphicPosition.BACKGROUND_CORNER_BOTTOM_RIGHT) { strings.add(" "); strings.add(" "); strings.add(" "); strings.add(" "); } } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final TextBlockBackcolored result = getGraphicStrings(); final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, result.getBackcolor(), getMetadata(), null, 0, 0, null, false); imageBuilder.setUDrawable(result); // imageBuilder.setUDrawable(TextBlockUtils.withMargin(result, 4, 4)); return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os); } public TextBlockBackcolored getGraphicStrings() throws IOException { if (position != null) { return GraphicStrings.createBlackOnWhite(strings, PSystemVersion.getPlantumlImage(), position); } return GraphicStrings.createBlackOnWhite(strings); } public DiagramDescription getDescription() { return new DiagramDescription("(Empty)"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/PSystemWelcomeFactory.java000066400000000000000000000035171312650303100274600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import net.sourceforge.plantuml.api.PSystemFactory; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.core.DiagramType; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.graphic.GraphicPosition; public class PSystemWelcomeFactory implements PSystemFactory { public Diagram createSystem(UmlSource source) { if (source.getTotalLineCount() == 2) { return new PSystemWelcome(GraphicPosition.BACKGROUND_CORNER_BOTTOM_RIGHT); } return null; } public DiagramType getDiagramType() { return DiagramType.UML; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/SentenceDecoder.java000066400000000000000000000036731312650303100262450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.io.UnsupportedEncodingException; public class SentenceDecoder { private final String secret; public SentenceDecoder(String sentence1, byte[] crypted) throws UnsupportedEncodingException { final byte[] key = EggUtils.fromSecretSentence(sentence1).toByteArray(); final byte[] sen2 = EggUtils.xor(crypted, key); this.secret = new String(sen2, "UTF-8"); } public boolean isOk() { for (char c : secret.toCharArray()) { if ((int) c > 256) { return false; } if (Character.isDefined(c) == false) { return false; } if (Character.isISOControl(c)) { return false; } } return true; } public String getSecret() { return secret; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eggs/SentenceProducer.java000066400000000000000000000033661312650303100264620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eggs; import java.io.UnsupportedEncodingException; public class SentenceProducer { private final String secret; public SentenceProducer(String sentence1, String sentence2) throws UnsupportedEncodingException { final byte[] key = EggUtils.fromSecretSentence(sentence1).toByteArray(); final byte[] sen2 = sentence2.getBytes("UTF-8"); final byte[] crypted = EggUtils.xor(sen2, key); this.secret = EggUtils.fromByteArrays(crypted); } public String getSecret() { return secret; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eps/000077500000000000000000000000001312650303100222015ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/eps/EpsGraphics.java000066400000000000000000000574231312650303100252670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eps; import java.awt.Color; import java.awt.geom.PathIterator; import java.awt.image.BufferedImage; import java.util.Locale; import java.util.StringTokenizer; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.ShadowManager; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.USegment; import net.sourceforge.plantuml.ugraphic.USegmentType; import net.sourceforge.plantuml.version.Version; public class EpsGraphics { public static final String END_OF_FILE = "%plantuml done"; // http://www.linuxfocus.org/Francais/May1998/article43.html // http://www.tailrecursive.org/postscript/text.html private final StringBuilder body = new StringBuilder(); private final StringBuilder header = new StringBuilder(); private Color color = Color.BLACK; private Color fillcolor = Color.BLACK; private String strokeWidth = "1"; // private String strokeDasharray = null; private final PostScriptCommandMacro setcolorgradient = new PostScriptCommandMacro("setcolorgradient"); private final PostScriptCommandMacro simplerect = new PostScriptCommandMacro("simplerect"); private final PostScriptCommandMacro roundrect = new PostScriptCommandMacro("roundrect"); private boolean setcolorgradientUsed = false; private boolean simplerectUsed = false; private boolean roundrectUsed = false; public EpsGraphics() { header.append("%!PS-Adobe-3.0 EPSF-3.0\n"); header.append("%%Creator: PlantUML v" + Version.versionString(15) + BackSlash.NEWLINE); header.append("%%Title: noTitle\n"); // header.append("%%CreationDate: " + new Date() + BackSlash.BS_N); setcolorgradient.add(new PostScriptCommandRaw("3 index 7 index sub 1 index mul 7 index add", true)); setcolorgradient.add(new PostScriptCommandRaw("3 index 7 index sub 2 index mul 7 index add", true)); setcolorgradient.add(new PostScriptCommandRaw("3 index 7 index sub 3 index mul 7 index add", true)); setcolorgradient.add(new PostScriptCommandRaw("setrgbcolor", true)); // setcolorgradient.add(new PostScriptCommandRaw("0 7 1 {pop} for")); setcolorgradient.add(new PostScriptCommandRaw("pop pop pop pop pop pop pop ", true)); simplerect.add(new PostScriptCommandRaw("newpath moveto 1 index 0 rlineto", true)); simplerect.add(new PostScriptCommandRaw("0 exch rlineto", true)); simplerect.add(new PostScriptCommandRaw("neg 0 rlineto", true)); roundrect.add(new PostScriptCommandRaw("newpath", true)); roundrect.add(new PostScriptCommandRaw("dup 3 index add 2 index 2 index add 2 index 180 270 arc", true)); roundrect.add(new PostScriptCommandRaw("2 index 5 index add 1 index sub 2 index 2 index add 2 index 270 0 arc", true)); roundrect.add(new PostScriptCommandRaw( "2 index 5 index add 1 index sub 2 index 5 index add 2 index sub 2 index 0 90 arc", true)); roundrect.add(new PostScriptCommandRaw("dup 3 index add 2 index 5 index add 2 index sub 2 index 90 180 arc", true)); roundrect.add(new PostScriptCommandRaw("pop pop pop pop pop ", true)); } private boolean closeDone = false; private int maxX = 10; private int maxY = 10; final protected void ensureVisible(double x, double y) { if (x > maxX) { maxX = (int) (x + 1); } if (y > maxY) { maxY = (int) (y + 1); } if (urlArea != null) { urlArea.ensureVisible((int) Math.round(x), (int) Math.round(y)); } } protected final Color getColor() { return color; } public void close() { checkCloseDone(); header.append("%%BoundingBox: 0 0 " + maxX + " " + maxY + BackSlash.NEWLINE); // header.append("%%DocumentData: Clean7Bit\n"); // header.append("%%DocumentProcessColors: Black\n"); header.append("%%ColorUsage: Color\n"); header.append("%%Origin: 0 0\n"); header.append("%%EndComments\n\n"); header.append("gsave\n"); header.append("0 " + maxY + " translate\n"); header.append("1 -1 scale\n"); if (setcolorgradientUsed) { header.append(setcolorgradient.getPostStringDefinition()); } if (simplerectUsed) { header.append(simplerect.getPostStringDefinition()); } if (roundrectUsed) { header.append(roundrect.getPostStringDefinition()); } append("grestore", true); // if(isClipSet()) // writer.write("grestore\n"); append("showpage", true); append(END_OF_FILE, true); append("%%EOF", true); closeDone = true; } private void checkCloseDone() { if (closeDone) { throw new IllegalStateException(); } } public String getEPSCode() { if (closeDone == false) { close(); } return header.toString() + getBodyString(); } protected String getBodyString() { return body.toString(); } public final void setStrokeColor(Color c) { checkCloseDone(); this.color = c; } public void setFillColor(Color c) { checkCloseDone(); this.fillcolor = c; } public final void setStrokeWidth(String strokeWidth, double dashVisible, double dashSpace) { checkCloseDone(); this.strokeWidth = strokeWidth; this.dashVisible = dashVisible; this.dashSpace = dashSpace; } private double dashVisible = 0; private double dashSpace = 0; public void newpathDot() { final boolean dashed = dashVisible != 0 || dashSpace != 0; checkCloseDone(); append(strokeWidth + " setlinewidth", true); appendColor(color); if (dashed) { append("[9 9] 0 setdash", true); } append("newpath", true); } public void closepathDot() { final boolean dashed = dashVisible != 0 || dashSpace != 0; append("stroke", true); if (dashed) { append("[] 0 setdash", true); } } public void epsLine(double x1, double y1, double x2, double y2) { ensureVisible(x1, y1); ensureVisible(x2, y2); checkCloseDone(); append(strokeWidth + " setlinewidth", true); appendColor(color); append("newpath", true); if (dashVisible == 0 || dashSpace == 0) { append(format(x1) + " " + format(y1) + " moveto", true); append(format(x2 - x1) + " " + format(y2 - y1) + " rlineto", true); } else if (x1 == x2) { epsHLine(x1, Math.min(y1, y2), Math.max(y1, y2)); } else if (y1 == y2) { epsVLine(y1, Math.min(x1, x2), Math.max(x1, x2)); } append("stroke", true); ensureVisible(Math.max(x1, x2), Math.max(y1, y2)); } protected void epsHLine(double x, double ymin, double ymax) { append(format(x) + " " + format(ymin) + " moveto", true); for (double y = ymin; y < ymax; y += dashVisible + dashSpace) { final double v; if (y + dashVisible > ymax) { v = y - ymax; } else { v = dashSpace; } append("0 " + format(v) + " rlineto", true); append("0 " + format(dashSpace) + " rmoveto", true); } } protected void epsVLine(double y, double xmin, double xmax) { append(format(xmin) + " " + format(y) + " moveto", true); for (double x = xmin; x < xmax; x += dashVisible + dashSpace) { final double v; if (x + dashVisible > xmax) { v = x - xmax; } else { v = dashSpace; } append(format(v) + " 0 rlineto", true); append(format(dashSpace) + " 0 rmoveto", true); } } public void epsPath(double x, double y, UPath path) { checkCloseDone(); if (fillcolor != null) { appendColor(fillcolor); append("newpath", true); for (USegment seg : path) { final USegmentType type = seg.getSegmentType(); final double coord[] = seg.getCoord(); if (type == USegmentType.SEG_MOVETO) { movetoNoMacro(coord[0] + x, coord[1] + y); } else if (type == USegmentType.SEG_LINETO) { linetoNoMacro(coord[0] + x, coord[1] + y); } else if (type == USegmentType.SEG_QUADTO) { throw new UnsupportedOperationException(); } else if (type == USegmentType.SEG_CUBICTO) { curvetoNoMacro(coord[0] + x, coord[1] + y, coord[2] + x, coord[3] + y, coord[4] + x, coord[5] + y); } else if (type == USegmentType.SEG_CLOSE) { // Nothing } else { Log.println("unknown " + seg); } } append("closepath eofill", true); } if (color != null) { append(strokeWidth + " setlinewidth", true); appendColor(color); append("newpath", true); for (USegment seg : path) { final USegmentType type = seg.getSegmentType(); final double coord[] = seg.getCoord(); if (type == USegmentType.SEG_MOVETO) { movetoNoMacro(coord[0] + x, coord[1] + y); } else if (type == USegmentType.SEG_LINETO) { linetoNoMacro(coord[0] + x, coord[1] + y); } else if (type == USegmentType.SEG_QUADTO) { throw new UnsupportedOperationException(); } else if (type == USegmentType.SEG_CUBICTO) { curvetoNoMacro(coord[0] + x, coord[1] + y, coord[2] + x, coord[3] + y, coord[4] + x, coord[5] + y); } else if (type == USegmentType.SEG_CLOSE) { // Nothing } else { Log.println("unknown " + seg); } } append("stroke", true); } } public void epsPolygon(HtmlColorGradient gr, ColorMapper mapper, double... points) { setFillColor(mapper.getMappedColor(gr.getColor1())); epsPolygon(points); } public void epsPolygon(double... points) { checkCloseDone(); double lastX = 0; double lastY = 0; if (fillcolor != null) { appendColor(fillcolor); append("newpath", true); for (int i = 0; i < points.length; i += 2) { ensureVisible(points[i], points[i + 1]); if (i == 0) { append(format(points[i]) + " " + format(points[i + 1]) + " moveto", true); } else { append(format(points[i] - lastX) + " " + format(points[i + 1] - lastY) + " rlineto", true); } lastX = points[i]; lastY = points[i + 1]; } append(format(points[0]) + " " + format(points[1]) + " lineto", true); append("closepath eofill", true); } if (color != null) { append(strokeWidth + " setlinewidth", true); appendColor(color); append("newpath", true); for (int i = 0; i < points.length; i += 2) { ensureVisible(points[i], points[i + 1]); if (i == 0) { append(format(points[i]) + " " + format(points[i + 1]) + " moveto", true); } else { append(format(points[i] - lastX) + " " + format(points[i + 1] - lastY) + " rlineto", true); } lastX = points[i]; lastY = points[i + 1]; } append(format(points[0]) + " " + format(points[1]) + " lineto", true); append("closepath stroke", true); } } public void epsRectangle(double x, double y, double width, double height, double rx, double ry) { checkCloseDone(); ensureVisible(x, y); ensureVisible(x + width, y + height); if (fillcolor != null) { appendColor(fillcolor); epsRectangleInternal(x, y, width, height, rx, ry, true); append("closepath eofill", true); } if (color != null) { append(strokeWidth + " setlinewidth", true); appendColor(color); epsRectangleInternal(x, y, width, height, rx, ry, false); append("closepath stroke", true); } } public void epsRectangle(double x, double y, double width, double height, double rx, double ry, HtmlColorGradient gr, ColorMapper mapper) { checkCloseDone(); ensureVisible(x, y); ensureVisible(x + width, y + height); setcolorgradientUsed = true; if (rx == 0 && ry == 0) { simplerectUsed = true; appendColorShort(mapper.getMappedColor(gr.getColor1())); appendColorShort(mapper.getMappedColor(gr.getColor2())); append(format(width) + " " + format(height) + " " + format(x) + " " + format(y), true); append("100 -1 1 {", true); append("100 div", true); append("newpath", true); append("2 index 2 index moveto", true); append("dup 5 index mul 2 mul dup 0 rlineto", true); append("neg 4 index 2 index mul 2 mul rlineto", true); append("closepath eoclip", true); append("10 index 10 index 10 index", true); append("10 index 10 index 10 index", true); append("6 index setcolorgradient", true); append("4 index 4 index 4 index 4 index simplerect", true); append("closepath eofill", true); append("pop", true); append("} for", true); append("pop pop pop pop", true); append("pop pop pop", true); append("pop pop pop", true); append("initclip", true); } else { roundrectUsed = true; appendColorShort(mapper.getMappedColor(gr.getColor1())); appendColorShort(mapper.getMappedColor(gr.getColor2())); append(format(width) + " " + format(height) + " " + format(x) + " " + format(y) + " " + format((rx + ry) / 2), true); append("100 -1 1 {", true); append("100 div", true); append("newpath", true); append("3 index 3 index moveto", true); append("dup 6 index mul 2 mul dup 0 rlineto", true); append("neg 5 index 2 index mul 2 mul rlineto", true); append("closepath eoclip", true); append("11 index 11 index 11 index", true); append("11 index 11 index 11 index", true); append("6 index setcolorgradient", true); append("5 index 5 index 5 index 5 index 5 index roundrect", true); append("closepath eofill", true); append("pop", true); append("} for", true); append("pop pop pop pop pop", true); append("pop pop pop", true); append("pop pop pop", true); append("initclip", true); } } private void epsRectangleInternal(double x, double y, double width, double height, double rx, double ry, boolean fill) { if (rx == 0 && ry == 0) { simpleRectangle(x, y, width, height, fill); } else { roundRectangle(x, y, width, height, rx, ry); } } private void roundRectangle(double x, double y, double width, double height, double rx, double ry) { append(format(width) + " " + format(height) + " " + format(x) + " " + format(y) + " " + format((rx + ry) / 2) + " roundrect", true); roundrectUsed = true; } private void simpleRectangle(double x, double y, double width, double height, boolean fill) { if ((dashSpace == 0 && dashVisible == 0) || fill) { append(format(width) + " " + format(height) + " " + format(x) + " " + format(y) + " simplerect", true); simplerectUsed = true; } else { epsVLine(y, x, x + width); epsVLine(y + height, x, x + width); epsHLine(x, y, y + height); epsHLine(x + width, y, y + height); } } public void epsEllipse(double x, double y, double xRadius, double yRadius, double start, double extend) { checkCloseDone(); ensureVisible(x + xRadius, y + yRadius); double scale = 1; if (xRadius != yRadius) { scale = yRadius / xRadius; append("gsave", true); append("1 " + format(scale) + " scale", true); } // if (fillcolor != null) { // appendColor(fillcolor); // append("newpath", true); // append(format(x) + " " + format(y / scale) + " " + format(xRadius) + " 0 360 arc", true); // append("closepath eofill", true); // } if (color != null) { append(strokeWidth + " setlinewidth", true); appendColor(color); append("newpath", true); final double a1 = -start + 180 + 5; final double a2 = -start - extend + 180 - 5; append(format(x) + " " + format(y / scale) + " " + format(xRadius) + " " + format(a1) + " " + format(a2) + " arc", true); append("stroke", true); } if (scale != 1) { append("grestore", true); } } public void epsEllipse(double x, double y, double xRadius, double yRadius) { checkCloseDone(); ensureVisible(x + xRadius, y + yRadius); double scale = 1; if (xRadius != yRadius) { scale = yRadius / xRadius; append("gsave", true); append("1 " + format(scale) + " scale", true); } if (fillcolor != null) { appendColor(fillcolor); append("newpath", true); append(format(x) + " " + format(y / scale) + " " + format(xRadius) + " 0 360 arc", true); append("closepath eofill", true); } if (color != null) { append(strokeWidth + " setlinewidth", true); appendColor(color); append("newpath", true); append(format(x) + " " + format(y / scale) + " " + format(xRadius) + " 0 360 arc", true); append("closepath stroke", true); } if (scale != 1) { append("grestore", true); } } protected void appendColor(Color c) { if (c == null) { return; } final double r = c.getRed() / 255.0; final double g = c.getGreen() / 255.0; final double b = c.getBlue() / 255.0; append(format(r) + " " + format(g) + " " + format(b) + " setrgbcolor", true); } protected void appendColorShort(Color c) { if (c == null) { return; } final double r = c.getRed() / 255.0; final double g = c.getGreen() / 255.0; final double b = c.getBlue() / 255.0; append(format(r) + " " + format(g) + " " + format(b), true); } public static String format(double x) { if (x == 0) { return "0"; } String s = String.format(Locale.US, "%1.4f", x); s = s.replaceAll("(\\.\\d*?)0+$", "$1"); if (s.endsWith(".")) { s = s.substring(0, s.length() - 1); } return s; } protected void append(String s, boolean checkConsistence) { if (checkConsistence && s.indexOf(" ") != -1) { throw new IllegalArgumentException(s); } body.append(s + BackSlash.NEWLINE); } final public void linetoNoMacro(double x1, double y1) { append(format(x1) + " " + format(y1) + " lineto", true); ensureVisible(x1, y1); } final public void movetoNoMacro(double x1, double y1) { append(format(x1) + " " + format(y1) + " moveto", true); ensureVisible(x1, y1); } final public void curvetoNoMacro(double x1, double y1, double x2, double y2, double x3, double y3) { append(format(x1) + " " + format(y1) + " " + format(x2) + " " + format(y2) + " " + format(x3) + " " + format(y3) + " curveto", true); ensureVisible(x1, y1); ensureVisible(x2, y2); ensureVisible(x3, y3); } // FONT public void moveto(double x1, double y1) { append(format(x1) + " " + format(y1) + " moveto", true); ensureVisible(x1, y1); } public void lineto(double x1, double y1) { append(format(x1) + " " + format(y1) + " lineto", true); ensureVisible(x1, y1); } public void curveto(double x1, double y1, double x2, double y2, double x3, double y3) { append(format(x1) + " " + format(y1) + " " + format(x2) + " " + format(y2) + " " + format(x3) + " " + format(y3) + " curveto", true); ensureVisible(x1, y1); ensureVisible(x2, y2); ensureVisible(x3, y3); } public void quadto(double x1, double y1, double x2, double y2) { append(format(x1) + " " + format(y1) + " " + format(x1) + " " + format(y1) + " " + format(x2) + " " + format(y2) + " curveto", true); ensureVisible(x1, y1); ensureVisible(x2, y2); } public void newpath() { append("0 setlinewidth", true); appendColor(color); append("newpath", true); } public void closepath() { append("closepath", true); } public void fill(int windingRule) { append("%fill", true); if (windingRule == PathIterator.WIND_EVEN_ODD) { append("eofill", true); } else if (windingRule == PathIterator.WIND_NON_ZERO) { append("fill", true); } } public void drawImage(BufferedImage image, double x, double y) { final int width = image.getWidth(); final int height = image.getHeight(); append("gsave", true); append(format(x) + " " + format(y) + " translate", true); append(format(width) + " " + format(height) + " scale", true); append("" + width + " " + height + " 8 [" + width + " 0 0 -" + height + " 0 " + height + "]", true); // append("" + width + " " + height + " 8 [0 0 0 0 0 0]"); append("{<", true); final StringBuilder sb = new StringBuilder(); for (int j = height - 1; j >= 0; j--) { for (int i = 0; i < width; i++) { final String hexString = getRgb(image.getRGB(i, j)); assert hexString.length() == 6; sb.append(hexString); } } append(sb.toString(), true); // append(">} image"); append(">} false 3 colorimage", true); ensureVisible(x + width, y + height); append("grestore", true); } static String getRgb(int x) { final String s = "000000" + Integer.toHexString(x); return s.substring(s.length() - 6); } public void drawEps(String eps, double x, double y) { final int idx = eps.indexOf("%%BoundingBox:"); if (idx == -1) { throw new IllegalArgumentException(); } final StringTokenizer st = new StringTokenizer(eps.substring(idx + "%%BoundingBox:".length()), " \n\t\r"); final int x1 = Integer.parseInt(st.nextToken()); final int y1 = Integer.parseInt(st.nextToken()); final int x2 = Integer.parseInt(st.nextToken()); final int y2 = Integer.parseInt(st.nextToken()); assert x2 >= x1; assert y2 >= y1; append("gsave", true); final double dx = x - x1; final double dy = y + y2; append(format(dx) + " " + format(dy) + " translate", true); append("1 -1 scale", true); append(eps, false); ensureVisible(x + (x2 - x1), y + (y2 - y1)); append("grestore", true); } protected final double getDashVisible() { return dashVisible; } protected final double getDashSpace() { return dashSpace; } static class UrlArea { private final String url; private int xmin = Integer.MAX_VALUE; private int xmax = Integer.MIN_VALUE; private int ymin = Integer.MAX_VALUE; private int ymax = Integer.MIN_VALUE; UrlArea(String url) { this.url = url; } void ensureVisible(int x, int y) { if (x < xmin) { xmin = x; } if (x > xmax) { xmax = x; } if (y < ymin) { ymin = y; } if (y > ymax) { ymax = y; } } } private UrlArea urlArea; public void closeLink() { if (urlArea != null && urlArea.xmin != Integer.MAX_VALUE) { final int width = urlArea.xmax - urlArea.xmin; final int height = urlArea.ymax - urlArea.ymin; assert width >= 0 && height >= 0; epsUrlLink(urlArea.xmin, urlArea.ymin, width, height, urlArea.url); } this.urlArea = null; } public void epsUrlLink(int x, int y, int width, int height, String url) { append("[ /Rect [ " + x + " " + y + " " + (x + width) + " " + (y + height) + " ]", true); append("/Border [ 0 0 0 ]", true); append("/Action << /Subtype /URI /URI (" + url + ") >>", true); append("/Subtype /Link", true); append("/ANN pdfmark", true); } public void openLink(String url) { this.urlArea = new UrlArea(url); } // Shadow final private ShadowManager shadowManager = new ShadowManager(50, 200); public void epsRectangleShadow(double x, double y, double width, double height, double rx, double ry, double deltaShadow) { setStrokeColor(null); for (double i = 0; i <= deltaShadow; i += 0.5) { setFillColor(shadowManager.getColor(i, deltaShadow)); final double diff = i; epsRectangle(x + deltaShadow + diff, y + deltaShadow + diff, width - 2 * diff, height - 2 * diff, rx + 1, ry + 1); } } public void epsPolygonShadow(double deltaShadow, double... points) { setStrokeColor(null); for (double i = 0; i <= deltaShadow; i += 0.5) { setFillColor(shadowManager.getColor(i, deltaShadow)); final double diff = i; epsPolygon(shadowManager.getShadowDeltaPoints(deltaShadow, diff, points)); } } public void epsEllipseShadow(double x, double y, double xRadius, double yRadius, double deltaShadow) { setStrokeColor(null); for (double i = 0; i <= deltaShadow; i += 0.5) { setFillColor(shadowManager.getColor(i, deltaShadow)); final double diff = i; epsEllipse(x + deltaShadow, y + deltaShadow, xRadius - diff, yRadius - diff); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eps/EpsGraphicsMacro.java000066400000000000000000000136021312650303100262400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eps; import java.awt.geom.PathIterator; import java.util.HashMap; import java.util.Map; public class EpsGraphicsMacro extends EpsGraphics { private final PostScriptData data = new PostScriptData(); private final PostScriptCommandMacro rquadto = new PostScriptCommandMacro("rquadto"); public EpsGraphicsMacro() { super(); rquadto.add(new PostScriptCommandRaw("3 index 3 index 4 2 roll rcurveto", true)); } @Override protected void append(String s, boolean checkConsistence) { if (checkConsistence && s.indexOf(" ") != -1) { throw new IllegalArgumentException(s); } data.add(new PostScriptCommandRaw(s, checkConsistence)); } @Override protected String getBodyString() { final StringBuilder sb = new StringBuilder(); sb.append(rquadto.getPostStringDefinition()); for (PostScriptCommandMacro macro : macros.keySet()) { sb.append(macro.getPostStringDefinition()); } sb.append(data.toPostString()); return sb.toString(); } // FONT private double posX; private double posY; private int macroCpt; private final Map macros = new HashMap(); @Override public void newpath() { append("0 setlinewidth", true); append("[] 0 setdash", true); appendColor(getColor()); append("newpath", true); } @Override public void closepath() { macroInProgress.add(new PostScriptCommandRaw("closepath", true)); closeMacro(); } @Override public void fill(int windingRule) { if (macroInProgress != null) { closeMacro(); } if (windingRule == PathIterator.WIND_EVEN_ODD) { append("eofill", true); } else if (windingRule == PathIterator.WIND_NON_ZERO) { append("fill", true); } } private PostScriptCommandMacro macroInProgress = null; @Override public void moveto(double x1, double y1) { data.add(new PostScriptCommandMoveTo(x1, y1)); this.posX = x1; this.posY = y1; openMacro(); ensureVisible(x1, y1); } @Override public void lineto(double x1, double y1) { final PostScriptCommand cmd = new PostScriptCommandLineTo(x1 - posX, y1 - posY); macroInProgress.add(cmd); this.posX = x1; this.posY = y1; ensureVisible(x1, y1); } @Override public void curveto(double x1, double y1, double x2, double y2, double x3, double y3) { final PostScriptCommandCurveTo cmd = new PostScriptCommandCurveTo(x1 - posX, y1 - posY, x2 - posX, y2 - posY, x3 - posX, y3 - posY); macroInProgress.add(cmd); this.posX = x3; this.posY = y3; ensureVisible(x1, y1); ensureVisible(x2, y2); ensureVisible(x3, y3); } @Override public void quadto(double x1, double y1, double x2, double y2) { final PostScriptCommandQuadTo cmd = new PostScriptCommandQuadTo(x1 - posX, y1 - posY, x2 - posX, y2 - posY); macroInProgress.add(cmd); this.posX = x2; this.posY = y2; ensureVisible(x1, y1); ensureVisible(x2, y2); } private void openMacro() { if (macroInProgress != null) { throw new IllegalStateException(); } macroInProgress = new PostScriptCommandMacro(macroName()); } private String macroName() { return "P$" + Integer.toString(macroCpt, 36); } private void closeMacro() { if (macroInProgress == null) { throw new IllegalStateException(); } final String existingName = macros.get(macroInProgress); if (existingName == null) { macros.put(macroInProgress, macroInProgress.getName()); append(macroName(), true); macroCpt++; } else { append(existingName, true); } macroInProgress = null; } @Override protected void epsHLine(double x, double ymin, double ymax) { append(format(x) + " " + format(ymin) + " moveto", true); int nb = (int) ((ymax - ymin) / (getDashVisible() + getDashSpace())); final double lastY = ymin + nb * (getDashVisible() + getDashSpace()); double v = ymax - lastY; if (v > getDashVisible()) { v = getDashVisible(); nb++; v = 0; } append(nb + "{", true); append("0 " + format(getDashVisible()) + " rlineto", true); append("0 " + format(getDashSpace()) + " rmoveto", true); append("} repeat", true); if (v > 0) { append("0 " + format(v) + " rlineto", true); } } @Override protected void epsVLine(double y, double xmin, double xmax) { append(format(xmin) + " " + format(y) + " moveto", true); int nb = (int) ((xmax - xmin) / (getDashVisible() + getDashSpace())); final double lastX = xmin + nb * (getDashVisible() + getDashSpace()); double v = xmax - lastX; if (v > getDashVisible()) { v = getDashVisible(); nb++; v = 0; } append(nb + "{", true); append(format(getDashVisible()) + " 0 rlineto", true); append(format(getDashSpace()) + " 0 rmoveto", true); append("} repeat", true); if (v > 0) { append(format(v) + " 0 rlineto", true); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eps/EpsGraphicsMacroAndText.java000066400000000000000000000066371312650303100275420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eps; import java.io.UnsupportedEncodingException; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UFontContext; public class EpsGraphicsMacroAndText extends EpsGraphicsMacro { public void drawText(String text, FontConfiguration fontConfiguration, double x, double y) { append(format(x) + " " + format(y) + " moveto", true); appendColor(getColor()); final UFont font = fontConfiguration.getFont(); final int size = font.getSize(); append("/" + getPSName(fontConfiguration) + " findfont " + size + " scalefont setfont", true); append("1 -1 scale", true); append("(" + getTextAsEps(text) + ") show", false); append("1 -1 scale", true); } private String getPSName(FontConfiguration fontConfiguration) { final UFont font = fontConfiguration.getFont(); final StringBuilder sb = new StringBuilder(font.getFamily(UFontContext.EPS)); // final int style = fontConfiguration.getFont().getStyle(); // final boolean bold = (style & Font.BOLD) != 0 || fontConfiguration.containsStyle(FontStyle.BOLD); // final boolean italic = (style & Font.ITALIC) != 0 || fontConfiguration.containsStyle(FontStyle.ITALIC); // if (bold && italic) { // sb.append("-BoldItalic"); // } else if (bold) { // sb.append("-Bold"); // } else if (italic) { // sb.append("-Italic"); // } return sb.toString(); } private String getTextAsEps(String text) { final StringBuilder sb = new StringBuilder(); for (int i = 0; i < text.length(); i++) { final char c = text.charAt(i); if (c == '\\') { sb.append("\\\\"); } else if (c == '(') { sb.append("\\("); } else if (c == ')') { sb.append("\\)"); } else if (c < ' ') { sb.append("?"); } else if (c >= ' ' && c <= 127) { sb.append(c); } else { final String s = "" + c; try { final byte b[] = s.getBytes("ISO-8859-1"); if (b.length == 1) { final int code = b[0] & 0xFF; sb.append("\\" + Integer.toOctalString(code)); } else { sb.append('?'); } } catch (UnsupportedEncodingException e) { sb.append('?'); } } } return sb.toString(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eps/EpsStrategy.java000066400000000000000000000033021312650303100253140ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eps; public enum EpsStrategy { VERY_SIMPLE, WITH_MACRO, WITH_MACRO_AND_TEXT; public EpsGraphics creatEpsGraphics() { if (this == VERY_SIMPLE) { return new EpsGraphics(); } if (this == WITH_MACRO) { return new EpsGraphicsMacro(); } if (this == WITH_MACRO_AND_TEXT) { return new EpsGraphicsMacroAndText(); } throw new IllegalArgumentException(); } public static EpsStrategy getDefault2() { return WITH_MACRO; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eps/PostScriptCommand.java000066400000000000000000000025131312650303100264560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eps; public interface PostScriptCommand { String toPostString(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/eps/PostScriptCommandCurveTo.java000066400000000000000000000036521312650303100277730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eps; public class PostScriptCommandCurveTo implements PostScriptCommand { private final double x1; private final double y1; private final double x2; private final double y2; private final double x3; private final double y3; public PostScriptCommandCurveTo(double x1, double y1, double x2, double y2, double x3, double y3) { this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; this.x3 = x3; this.y3 = y3; } public String toPostString() { return EpsGraphics.format(x1) + " " + EpsGraphics.format(y1) + " " + EpsGraphics.format(x2) + " " + EpsGraphics.format(y2) + " " + EpsGraphics.format(x3) + " " + EpsGraphics.format(y3) + " rcurveto"; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eps/PostScriptCommandLineTo.java000066400000000000000000000031121312650303100275650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eps; public class PostScriptCommandLineTo implements PostScriptCommand { private final double x; private final double y; public PostScriptCommandLineTo(double x, double y) { this.x = x; this.y = y; } public String toPostString() { return EpsGraphics.format(x) + " " + EpsGraphics.format(y) + " rlineto"; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eps/PostScriptCommandMacro.java000066400000000000000000000041601312650303100274400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eps; public class PostScriptCommandMacro implements PostScriptCommand { final private String name; final private PostScriptData data = new PostScriptData(); public PostScriptCommandMacro(String name) { this.name = name; } public String getName() { return name; } public void add(PostScriptCommand cmd) { data.add(cmd); } public String toPostString() { return name; } public String getPostStringDefinition() { final StringBuilder sb = new StringBuilder(); sb.append("/" + name + " {\n"); sb.append(data.toPostString()); sb.append("} def\n"); return sb.toString(); } @Override public int hashCode() { return data.toPostString().hashCode(); } @Override public boolean equals(Object obj) { final PostScriptCommandMacro other = (PostScriptCommandMacro) obj; return this.data.toPostString().equals(other.data.toPostString()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eps/PostScriptCommandMoveTo.java000066400000000000000000000031071312650303100276100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eps; public class PostScriptCommandMoveTo implements PostScriptCommand { private final double x; private final double y; public PostScriptCommandMoveTo(double x, double y) { this.x = x; this.y = y; } public String toPostString() { return EpsGraphics.format(x) + " " + EpsGraphics.format(y) + " moveto"; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eps/PostScriptCommandQuadTo.java000066400000000000000000000033771312650303100276050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eps; public class PostScriptCommandQuadTo implements PostScriptCommand { private final double x1; private final double y1; private final double x2; private final double y2; public PostScriptCommandQuadTo(double x1, double y1, double x2, double y2) { this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; } public String toPostString() { return EpsGraphics.format(x1) + " " + EpsGraphics.format(y1) + " " + EpsGraphics.format(x2) + " " + EpsGraphics.format(y2) + " rquadto"; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eps/PostScriptCommandRaw.java000066400000000000000000000031341312650303100271300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eps; public class PostScriptCommandRaw implements PostScriptCommand { final private String cmd; public PostScriptCommandRaw(String cmd, boolean checkConsistence) { if (checkConsistence && cmd.indexOf('\n') != -1) { throw new IllegalArgumentException(cmd); } this.cmd = cmd; } public String toPostString() { return cmd; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/eps/PostScriptData.java000066400000000000000000000035741312650303100257610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.eps; import java.util.ArrayList; import java.util.List; public class PostScriptData { private final List data = new ArrayList(); private String toString; public String toPostString() { if (this.toString == null) { this.toString = toPostStringSlow(); } return this.toString; } private String toPostStringSlow() { final StringBuilder sb = new StringBuilder(); for (PostScriptCommand cmd : data) { sb.append(cmd.toPostString()); sb.append('\n'); } return sb.toString(); } public void add(PostScriptCommand cmd) { data.add(cmd); this.toString = null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/flashcode/000077500000000000000000000000001312650303100233425ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/flashcode/FlashCodeFactory.java000066400000000000000000000033751312650303100273750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.flashcode; public class FlashCodeFactory { public static FlashCodeUtils getFlashCodeUtils() { final String name = "net.sourceforge.plantuml.flashcode.FlashCodeUtilsZxing"; try { final Class cl = Class.forName(name); return (FlashCodeUtils) cl.newInstance(); } catch (ClassNotFoundException e) { return new FlashCodeUtilsNone(); } catch (InstantiationException e) { return new FlashCodeUtilsNone(); } catch (IllegalAccessException e) { return new FlashCodeUtilsNone(); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/flashcode/FlashCodeUtils.java000066400000000000000000000026141312650303100270610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.flashcode; import java.awt.image.BufferedImage; public interface FlashCodeUtils { public BufferedImage exportFlashcode(String s); } plantuml-1.2017.15/src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsNone.java000066400000000000000000000026711312650303100277040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.flashcode; import java.awt.image.BufferedImage; public class FlashCodeUtilsNone implements FlashCodeUtils { public BufferedImage exportFlashcode(String s) { return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsZxing.java000066400000000000000000000044641312650303100301060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.flashcode; import java.awt.image.BufferedImage; import java.util.Hashtable; import net.sourceforge.plantuml.Log; import com.google.zxing.BarcodeFormat; import com.google.zxing.EncodeHintType; import com.google.zxing.WriterException; import com.google.zxing.client.j2se.MatrixToImageWriter; import com.google.zxing.common.BitMatrix; import com.google.zxing.qrcode.QRCodeWriter; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; public class FlashCodeUtilsZxing implements FlashCodeUtils { public BufferedImage exportFlashcode(String s) { try { final QRCodeWriter writer = new QRCodeWriter(); final Hashtable hints = new Hashtable(); hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L); hints.put(EncodeHintType.CHARACTER_SET, "UTF8"); final int multiple = 1; final BitMatrix bit = writer.encode(s, BarcodeFormat.QR_CODE, multiple, hints); return MatrixToImageWriter.toBufferedImage(bit); } catch (WriterException e) { Log.debug("Cannot create flashcode " + e); // e.printStackTrace(); return null; } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/flowdiagram/000077500000000000000000000000001312650303100237065ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/flowdiagram/ActivityBox.java000066400000000000000000000073531312650303100270260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.flowdiagram; import java.awt.Font; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.SpriteContainerEmpty; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.golem.Tile; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class ActivityBox extends AbstractTextBlock { private static final int CORNER = 25; private static final int MARGIN = 10; private final Tile tile; private final String id; private final String label; private final TextBlock tb; public ActivityBox(Tile tile, String id, String label) { this.tile = tile; this.id = id; this.label = label; final UFont font = UFont.serif(14); final FontConfiguration fc = FontConfiguration.blackBlueTrue(font); tb = Display.create(label).create(fc, HorizontalAlignment.LEFT, new SpriteContainerEmpty()); } public Tile getTile() { return tile; } public String getId() { return id; } public String getLabel() { return label; } public void drawU(UGraphic ug) { final Dimension2D dimTotal = calculateDimension(ug.getStringBounder()); // final Dimension2D dimDesc = tb.calculateDimension(ug.getStringBounder()); final double widthTotal = dimTotal.getWidth(); final double heightTotal = dimTotal.getHeight(); final Shadowable rect = new URectangle(widthTotal, heightTotal, CORNER, CORNER); ug = ug.apply(new UChangeColor(HtmlColorUtils.MY_RED)); ug = ug.apply(new UChangeBackColor(HtmlColorUtils.MY_YELLOW)); ug.apply(new UStroke(1.5)).draw(rect); tb.drawU(ug.apply(new UTranslate(MARGIN, MARGIN))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dim = tb.calculateDimension(stringBounder); return Dimension2DDouble.delta(dim, 2 * MARGIN, 2 * MARGIN); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/flowdiagram/CommandLineSimple.java000066400000000000000000000050241312650303100301120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.flowdiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.golem.TileGeometry; public class CommandLineSimple extends SingleLineCommand2 { public CommandLineSimple() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("ORIENTATION", "(?:([nsew])[%s]+)?"), // new RegexLeaf("ID_DEST", "(\\w+)"), // new RegexLeaf("[%s]+"), // new RegexLeaf("LABEL", "[%g](.*)[%g]"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(FlowDiagram diagram, RegexResult arg) { final String idDest = arg.get("ID_DEST", 0); final String label = arg.get("LABEL", 0); final String orientationString = arg.get("ORIENTATION", 0); TileGeometry orientation = TileGeometry.SOUTH; if (orientationString != null) { orientation = TileGeometry.fromString(orientationString); } diagram.lineSimple(orientation, idDest, label); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/flowdiagram/CommandLink.java000066400000000000000000000046051312650303100267520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.flowdiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.golem.TileGeometry; public class CommandLink extends SingleLineCommand2 { public CommandLink() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("ORIENTATION", "(?:([nsew])[%s]+)?"), // new RegexLeaf("ID_DEST", "(\\w+)"), // new RegexLeaf("$")); } @Override protected CommandExecutionResult executeArg(FlowDiagram system, RegexResult arg) { final String idDest = arg.get("ID_DEST", 0); final String orientationString = arg.get("ORIENTATION", 0); TileGeometry orientation = TileGeometry.SOUTH; if (orientationString != null) { orientation = TileGeometry.fromString(orientationString); } system.linkSimple(orientation, idDest); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/flowdiagram/FlowDiagram.java000066400000000000000000000165601312650303100267550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.flowdiagram; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.io.IOException; import java.io.OutputStream; import java.util.HashMap; import java.util.Map; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.api.ImageDataSimple; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.golem.MinMaxGolem; import net.sourceforge.plantuml.golem.Path; import net.sourceforge.plantuml.golem.Position; import net.sourceforge.plantuml.golem.Tile; import net.sourceforge.plantuml.golem.TileArea; import net.sourceforge.plantuml.golem.TileGeometry; import net.sourceforge.plantuml.golem.TilesField; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicUtils; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UTranslate; public class FlowDiagram extends UmlDiagram implements TextBlock { private static double SINGLE_SIZE_X = 100; private static double SINGLE_SIZE_Y = 35; private TilesField field; private final Map tilesBoxes = new HashMap(); private Tile lastTile; public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { throw new UnsupportedOperationException(); } public DiagramDescription getDescription() { return new DiagramDescription("Flow Diagram"); } @Override public UmlDiagramType getUmlDiagramType() { return UmlDiagramType.FLOW; } public void lineSimple(TileGeometry orientation, String idDest, String label) { final Tile newTile; if (field == null) { field = new TilesField(); tilesBoxes.clear(); newTile = field.getRoot(); } else { newTile = field.createTile(lastTile, orientation); } final ActivityBox box = new ActivityBox(newTile, idDest, label); tilesBoxes.put(newTile, box); lastTile = newTile; return; } public void linkSimple(TileGeometry orientation, String idDest) { final Tile tile = getTileById(idDest); field.addPath(lastTile, tile, orientation); } private Tile getTileById(String id) { for (Map.Entry ent : tilesBoxes.entrySet()) { if (ent.getValue().getId().equals(id)) { return ent.getKey(); } } throw new IllegalArgumentException(id); } @Override protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { UGraphicUtils.writeImage(os, null, fileFormatOption, seed(), new ColorMapperIdentity(), HtmlColorUtils.WHITE, this); return new ImageDataSimple(); } public void drawU(UGraphic ug) { double x = 0; double y = 0; final MinMaxGolem minMax = getMinMax(); x -= minMax.getMinX() * SINGLE_SIZE_X; y -= minMax.getMinY() * SINGLE_SIZE_Y; final StringBounder stringBounder = ug.getStringBounder(); for (Map.Entry ent : tilesBoxes.entrySet()) { final Tile tile = ent.getKey(); final Position pos = field.getPosition(tile); final int xmin = pos.getXmin(); final int ymin = pos.getYmin(); final ActivityBox box = ent.getValue(); final Dimension2D dimBox = box.calculateDimension(stringBounder); final double deltaX = SINGLE_SIZE_X * 2 - dimBox.getWidth(); final double deltaY = SINGLE_SIZE_Y * 2 - dimBox.getHeight(); box.drawU(ug.apply(new UTranslate((x + xmin * SINGLE_SIZE_X + deltaX / 2), (y + ymin * SINGLE_SIZE_Y + deltaY / 2)))); } ug = ug.apply(new UChangeColor(HtmlColorUtils.MY_RED)); ug = ug.apply(new UChangeBackColor(HtmlColorUtils.MY_RED)); final UShape arrow = new UEllipse(7, 7); for (Path p : field.getPaths()) { final TileArea start = p.getStart(); final TileArea dest = p.getDest(); final Point2D pStart = movePoint(getCenter(start), start.getTile(), start.getGeometry(), stringBounder); final Point2D pDest = movePoint(getCenter(dest), dest.getTile(), dest.getGeometry(), stringBounder); final ULine line = new ULine(pDest.getX() - pStart.getX(), pDest.getY() - pStart.getY()); ug.apply(new UTranslate(x + pStart.getX(), y + pStart.getY())).draw(line); ug.apply(new UTranslate(x + pDest.getX() - 3, y + pDest.getY() - 3)).draw(arrow); } } private Point2D getCenter(TileArea area) { final Tile tile = area.getTile(); final Position position = field.getPosition(tile); final double x = position.getCenterX(); final double y = position.getCenterY(); return new Point2D.Double(x * SINGLE_SIZE_X, y * SINGLE_SIZE_Y); } private Point2D movePoint(Point2D pt, Tile tile, TileGeometry tileGeometry, StringBounder stringBounder) { final Dimension2D dim = tilesBoxes.get(tile).calculateDimension(stringBounder); final double width = dim.getWidth(); final double height = dim.getHeight(); double x = pt.getX(); double y = pt.getY(); switch (tileGeometry) { case SOUTH: y += height / 2; break; case NORTH: y -= height / 2; break; case EAST: x += width / 2; break; case WEST: x -= width / 2; break; default: throw new IllegalStateException(); } return new Point2D.Double(x, y); } private MinMaxGolem getMinMax() { final MinMaxGolem minMax = new MinMaxGolem(); for (Tile tile : tilesBoxes.keySet()) { minMax.manage(field.getPosition(tile)); } return minMax; } public Dimension2D calculateDimension(StringBounder stringBounder) { final MinMaxGolem minMax = getMinMax(); return new Dimension2DDouble(minMax.getWidth() * SINGLE_SIZE_X, minMax.getHeight() * SINGLE_SIZE_Y); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/flowdiagram/FlowDiagramFactory.java000066400000000000000000000035741312650303100303060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.flowdiagram; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.UmlDiagramFactory; import net.sourceforge.plantuml.core.DiagramType; public class FlowDiagramFactory extends UmlDiagramFactory { public FlowDiagramFactory() { super(DiagramType.FLOW); } @Override public FlowDiagram createEmptyDiagram() { return new FlowDiagram(); } @Override protected List createCommands() { final List cmds = new ArrayList(); cmds.add(new CommandLineSimple()); cmds.add(new CommandLink()); return cmds; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/font/000077500000000000000000000000001312650303100223605ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/font/PSystemListFonts.java000066400000000000000000000062421312650303100265010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.font; import java.awt.GraphicsEnvironment; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class PSystemListFonts extends AbstractPSystem { private final List strings = new ArrayList(); public PSystemListFonts(String text) { strings.add(" Fonts available:"); strings.add(" "); // final Font fonts[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); // for (Font f : fonts) { // strings.add("f=" + f + "/" + f.getPSName() + "/" + f.getName() + "/" + f.getFontName() + "/" // + f.getFamily()); // } final String name[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); for (String n : name) { strings.add(n + " : " + text); } } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final TextBlockBackcolored result = getGraphicStrings(); final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, result.getBackcolor(), getMetadata(), null, 0, 0, null, false); imageBuilder.setUDrawable(result); return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os); } private TextBlockBackcolored getGraphicStrings() throws IOException { return GraphicStrings.createBlackOnWhite(strings); } public DiagramDescription getDescription() { return new DiagramDescription("(List fonts)"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/font/PSystemListFontsFactory.java000066400000000000000000000036531312650303100300340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.font; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.PSystemSingleLineFactory; public class PSystemListFontsFactory extends PSystemSingleLineFactory { @Override protected AbstractPSystem executeLine(String line) { final String lineLower = StringUtils.goLowerCase(line); if (lineLower.equals("listfont") || lineLower.equals("listfonts") || lineLower.startsWith("listfont ") || lineLower.startsWith("listfonts ")) { final int idx = line.indexOf(' '); return new PSystemListFonts(idx == -1 ? "This is a test" : StringUtils.trin(line.substring(idx))); } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ftp/000077500000000000000000000000001312650303100222035ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ftp/FtpConnexion.java000066400000000000000000000136451312650303100254710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ftp; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.BlockUml; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.SourceStringReader; import net.sourceforge.plantuml.core.DiagramDescription; public class FtpConnexion { private final String user; private final Map incoming = new HashMap(); private final Map outgoing = new HashMap(); private final Set futureOutgoing = new HashSet(); private FileFormat fileFormat; public FtpConnexion(String user, FileFormat defaultfileFormat) { this.user = user; this.fileFormat = defaultfileFormat; } public synchronized void addIncoming(String fileName, String data) { if (fileName.startsWith("/")) { throw new IllegalArgumentException(); } incoming.put(fileName, data); } public synchronized void futureOutgoing(String fileName) { outgoing.remove(fileName); futureOutgoing.add(fileName); } public synchronized Collection getFiles() { final List result = new ArrayList(incoming.keySet()); result.addAll(outgoing.keySet()); result.addAll(futureOutgoing); return Collections.unmodifiableCollection(result); } public synchronized boolean willExist(String fileName) { if (incoming.containsKey(fileName)) { return true; } if (outgoing.containsKey(fileName)) { return true; } if (futureOutgoing.contains(fileName)) { return true; } return false; } public synchronized boolean doesExist(String fileName) { if (incoming.containsKey(fileName)) { return true; } if (outgoing.containsKey(fileName)) { return true; } return false; } public synchronized byte[] getData(String fileName) throws InterruptedException { if (fileName.startsWith("/")) { throw new IllegalArgumentException(); } final String data = incoming.get(fileName); if (data != null) { return data.getBytes(); } // do { // if (willExist(fileName) == false) { // return null; // } final byte data2[] = outgoing.get(fileName); if (data2 == null) { return new byte[1]; } // if (data2 != null) { return data2; // } // Thread.sleep(200L); // } while (true); } public synchronized int getSize(String fileName) { if (fileName.startsWith("/")) { throw new IllegalArgumentException(); } final String data = incoming.get(fileName); if (data != null) { return data.length(); } final byte data2[] = outgoing.get(fileName); if (data2 != null) { return data2.length; } return 0; } public void processImage(String fileName) throws IOException { if (fileName.startsWith("/")) { throw new IllegalArgumentException(); } final String pngFileName = getFutureFileName(fileName); boolean done = false; try { final SourceStringReader sourceStringReader = new SourceStringReader(incoming.get(fileName)); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final FileFormat format = getFileFormat(); final DiagramDescription desc = sourceStringReader.generateDiagramDescription(new FileFormatOption(format)); final List blocks = sourceStringReader.getBlocks(); if (blocks.size() > 0) { blocks.get(0).getDiagram().exportDiagram(baos, 0, new FileFormatOption(format)); } final String errorFileName = pngFileName.substring(0, pngFileName.length() - 4) + ".err"; synchronized (this) { outgoing.remove(pngFileName); futureOutgoing.remove(pngFileName); outgoing.remove(errorFileName); if (desc != null && desc.getDescription() != null) { outgoing.put(pngFileName, baos.toByteArray()); done = true; if (desc.getDescription().startsWith("(Error)")) { final ByteArrayOutputStream errBaos = new ByteArrayOutputStream(); sourceStringReader.outputImage(errBaos, new FileFormatOption(FileFormat.ATXT)); errBaos.close(); outgoing.put(errorFileName, errBaos.toByteArray()); } } } } finally { if (done == false) { outgoing.put(pngFileName, new byte[0]); } } } public String getFutureFileName(String fileName) { return getFileFormat().changeName(fileName, 0); } private FileFormat getFileFormat() { return fileFormat; } public synchronized void delete(String fileName) { incoming.remove(fileName); outgoing.remove(fileName); futureOutgoing.add(fileName); } public void setFileFormat(FileFormat fileFormat) { this.fileFormat = fileFormat; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ftp/FtpLoop.java000066400000000000000000000237151312650303100244410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ftp; // server // FtpServer.java import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.net.ServerSocket; import java.net.Socket; import java.net.UnknownHostException; import java.util.Collection; import java.util.StringTokenizer; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileUtils; import net.sourceforge.plantuml.StringUtils; class FtpLoop implements Runnable { enum Mode { ACTIF, PASSIF }; final private Socket incoming; final private FtpServer ftpServer; final private BufferedReader br; final private PrintWriter pw; private FtpConnexion connexion; private String ipClient = null; private int port = -1; private Mode mode; public FtpLoop(Socket socket, FtpServer ftpServer) throws IOException { this.incoming = socket; this.ftpServer = ftpServer; this.br = new BufferedReader(new InputStreamReader(incoming.getInputStream(), ftpServer.getCharset())); this.pw = new PrintWriter(incoming.getOutputStream(), true); } // http://www.ncftp.com/libncftp/doc/ftp_overview.html // http://www.nsftools.com/tips/RawFTP.htm // http://www.commentcamarche.net/contents/internet/ftp.php3 // http://en.wikipedia.org/wiki/List_of_FTP_server_return_codes // http://www.freefire.org/articles/ftpexample.php // http://forum.hardware.fr/hfr/Programmation/VB-VBA-VBS/transfert-sujet_59989_1.htm // http://www.excel-downloads.com/forum/104130-telechargement-ftp-via-vba.html // http://www.pcreview.co.uk/forums/ftp-vba-macro-t949945.html private void runInternal() throws IOException, InterruptedException { localLog("Starting Loop"); myOut("220 PlantUML"); while (true) { final String s = br.readLine(); localLog("s=" + s); if (s == null) { pw.close(); br.close(); return; } final boolean finish = manage(s); if (finish) { return; } } } private boolean manage(final String cmd) throws UnknownHostException, IOException, InterruptedException { final String upper = StringUtils.goUpperCase(cmd); if (upper.startsWith("USER")) { myOut("331 Password required"); final String user = cmd.substring("USER ".length()); connexion = ftpServer.getFtpConnexion(user); } else if (upper.startsWith("PASS")) { myOut("230 Logged in."); } else if (upper.startsWith("PWD")) { // myOut("/"); // myOut("200 OK /"); myOut("257 \"/\" is current directory."); } else if (upper.startsWith("CWD")) { final String dir = cmd.substring("CWD ".length()); myOut("250 \"" + dir + "\" is new working directory.."); } else if (upper.startsWith("TYPE")) { myOut("200 Command okay."); // localLog("type=" + s); } else if (upper.startsWith("PORT")) { mode = Mode.ACTIF; final StringTokenizer st = new StringTokenizer(cmd, " ,"); st.nextToken(); ipClient = st.nextToken() + "." + st.nextToken() + "." + st.nextToken() + "." + st.nextToken(); port = Integer.parseInt(st.nextToken()) * 256 + Integer.parseInt(st.nextToken()); // localLog("ipClient=" + ipClient); // localLog("port=" + port); myOut("200 Command okay."); } else if (upper.startsWith("LIST")) { if (mode == Mode.ACTIF) { listActif(); } else { listPassif(); } } else if (upper.startsWith("STOR")) { if (mode == Mode.ACTIF) { storActif(cmd); } else { storPassif(cmd); } } else if (upper.startsWith("PASV")) { mode = Mode.PASSIF; port = ftpServer.getFreePort(); final int p1 = port / 256; final int p2 = port % 256; assert port == p1 * 256 + p2; localLog("adr=" + incoming.getInetAddress().getHostAddress()); final String ipServer = ftpServer.getIpServer(); localLog("server=" + ipServer); myOut("227 Entering Passive Mode (" + ipServer.replace('.', ',') + "," + p1 + "," + p2 + ")."); ipClient = ipServer; } else if (upper.startsWith("RETR")) { if (mode == Mode.ACTIF) { retrActif(cmd); } else { retrPassif(cmd); } } else if (upper.startsWith("DELE")) { final String file = cmd.substring("DELE ".length()); connexion.delete(file); myOut("200 Command okay."); } else if (upper.startsWith("QUIT")) { myOut("221 Goodbye."); return true; } else if (upper.startsWith("SYST")) { myOut("215 UNIX Type: L8."); } else { myOut("502 Command not implemented."); } return false; } private void localLog(String s) { } private void retr(final String fileName, Socket soc) throws UnknownHostException, IOException, InterruptedException { final OutputStream os = soc.getOutputStream(); final byte[] data = connexion.getData(fileName); if (data != null) { os.write(data); } os.flush(); os.close(); soc.close(); myOut("226 Transfer complete."); } private void retrPassif(final String s) throws UnknownHostException, IOException, InterruptedException { String fileName = s.substring("STOR ".length()); fileName = removeStartingsSlash(fileName); if (connexion.willExist(fileName) == false) { myOut("550 No such file."); return; } myOut("150 Opening"); waitForMe(fileName); final ServerSocket ss = new ServerSocket(port); final Socket incoming = ss.accept(); retr(fileName, incoming); ss.close(); } private void waitForMe(String fileName) throws InterruptedException { do { if (connexion.doesExist(fileName)) { return; } Thread.sleep(200L); } while (true); } private void retrActif(final String s) throws UnknownHostException, IOException, InterruptedException { String fileName = s.substring("STOR ".length()); fileName = removeStartingsSlash(fileName); if (connexion.willExist(fileName) == false) { myOut("550 No such file."); return; } myOut("150 Opening"); waitForMe(fileName); final Socket soc = new Socket(ipClient, port); retr(fileName, soc); } private void storActif(final String s) throws IOException { final String fileName = removeStartingsSlash(s.substring("STOR ".length())); myOut("150 FILE: " + fileName); final Socket soc = new Socket(ipClient, port); stor(fileName, soc); } private void storPassif(final String s) throws IOException { final String fileName = removeStartingsSlash(s.substring("STOR ".length())); myOut("150 FILE: " + fileName); final ServerSocket ss = new ServerSocket(port); final Socket incoming = ss.accept(); stor(fileName, incoming); ss.close(); } private String removeStartingsSlash(String fileName) { while (fileName.startsWith("/")) { fileName = fileName.substring(1); } return fileName; } private void stor(String fileName, Socket socket) throws UnknownHostException, IOException { final InputStream is = socket.getInputStream(); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); FileUtils.copyToStream(is, baos); myOut("226 Transfer complete."); if ("png".equalsIgnoreCase(fileName)) { connexion.setFileFormat(FileFormat.PNG); } else if ("svg".equalsIgnoreCase(fileName)) { connexion.setFileFormat(FileFormat.SVG); } else if ("eps".equalsIgnoreCase(fileName)) { connexion.setFileFormat(FileFormat.EPS); } if (fileName.length() > 3) { final String data = new String(baos.toByteArray(), ftpServer.getCharset()); final String pngFileName = connexion.getFutureFileName(fileName); connexion.futureOutgoing(pngFileName); connexion.addIncoming(fileName, data); ftpServer.processImage(connexion, fileName); } } private void listActif() throws UnknownHostException, IOException { myOut("150 Opening ASCII mode data"); final Socket soc = new Socket(ipClient, port); list(soc); } private void listPassif() throws UnknownHostException, IOException { myOut("150 Opening ASCII mode data"); final ServerSocket ss = new ServerSocket(port); final Socket incoming = ss.accept(); list(incoming); ss.close(); } private void list(final Socket soc) throws IOException { final PrintWriter listing = new PrintWriter(soc.getOutputStream(), true); final Collection files = connexion.getFiles(); if (files.size() > 0) { int total = 0; for (String n : files) { total += (connexion.getSize(n) + 511) / 512; } listing.println("total " + total); // localLog(total); for (String n : files) { final String ls = String.format("%10s %4d %-8s %-8s %8d %3s %2s %5s %s", "-rw-rw-r--", 1, "plantuml", "plantuml", connexion.getSize(n), "Sep", 28, 2006, n); listing.println(ls); // localLog(ls); } } listing.flush(); listing.close(); soc.close(); myOut("226 Listing completed."); } private void myOut(String s) { if (s.indexOf('\t') != -1) { throw new IllegalArgumentException(); } pw.println(s); pw.flush(); } public void run() { try { runInternal(); } catch (Throwable t) { t.printStackTrace(); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ftp/FtpServer.java000066400000000000000000000074461312650303100250010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ftp; // server // FtpServer.java import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; import java.util.Map; import java.util.TreeMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import net.sourceforge.plantuml.FileFormat; public class FtpServer { private final Map datas = new TreeMap(); private final ExecutorService exeImage = Executors.newFixedThreadPool(2); private final String charset = "UTF-8"; private final int listenPort; private int portFree = 10042; private String ip; private final FileFormat defaultfileFormat; public FtpServer(int listenPort, FileFormat defaultfileFormat) { this.listenPort = listenPort; this.defaultfileFormat = defaultfileFormat == null ? FileFormat.PNG : defaultfileFormat; } public synchronized int getFreePort() { portFree++; // Log.println("port=" + portFree); return portFree; } public void go() throws IOException { final ServerSocket s = new ServerSocket(listenPort); final ExecutorService exe = Executors.newCachedThreadPool(); while (true) { final Socket incoming = s.accept(); ip = incoming.getLocalAddress().getHostAddress(); System.out.println("New Client Connected from " + incoming.getInetAddress().getHostName() + "... "); exe.submit(new FtpLoop(incoming, this)); } } public String getIpServer() { return ip; } public synchronized FtpConnexion getFtpConnexion(String user) { if (user == null) { throw new IllegalArgumentException(); } FtpConnexion data = datas.get(user); if (data == null) { data = new FtpConnexion(user, defaultfileFormat); datas.put(user, data); } return data; } public static void main(String[] args) throws IOException { System.out.println("****************************** ************************************************** "); System.out.println("****************************** FTP SERVER***********************************"); System.out.println("****************************** ************************************************** "); System.out.println("Server Started..."); System.out.println("Waiting for connections..."); System.out.println(" "); new FtpServer(4242, FileFormat.PNG).go(); } public void processImage(final FtpConnexion connexion, final String name) { exeImage.submit(new Runnable() { public void run() { try { connexion.processImage(name); } catch (IOException e) { e.printStackTrace(); } } }); } public final String getCharset() { return charset; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/000077500000000000000000000000001312650303100222025ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/IconLoader.java000066400000000000000000000057641312650303100251000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.fun; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import javax.imageio.ImageIO; public class IconLoader { private static final int NUMBER_OF_ICONS = 21; private final static Map all = new ConcurrentHashMap(); public static BufferedImage getRandom() { // return addTransparent(getIcon("sprite013.png")); return addTransparent(getIcon(getSomeQuote())); } private static String getSomeQuote() { final int v = (int) (System.currentTimeMillis() / 1000L); final int n = v % NUMBER_OF_ICONS; return "sprite" + String.format("%03d", n) + ".png"; } private static BufferedImage getIcon(String name) { BufferedImage result = all.get(name); if (result == null) { result = getIconSlow(name); if (result != null) { all.put(name, result); } } return result; } private static BufferedImage getIconSlow(String name) { try { final InputStream is = IconLoader.class.getResourceAsStream(name); if (is == null) { return null; } final BufferedImage image = ImageIO.read(is); is.close(); return image; } catch (IOException e) { e.printStackTrace(); } return null; } private static BufferedImage addTransparent(BufferedImage ico) { if (ico == null) { return null; } final BufferedImage transparentIcon = new BufferedImage(ico.getWidth(), ico.getHeight(), BufferedImage.TYPE_INT_ARGB_PRE); for (int i = 0; i < ico.getWidth(); i++) { for (int j = 0; j < ico.getHeight(); j++) { final int col = ico.getRGB(i, j); if (col != ico.getRGB(0, 0)) { transparentIcon.setRGB(i, j, col); } } } return transparentIcon; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite000.png000066400000000000000000000003371312650303100244410ustar00rootroot00000000000000PNG  IHDR?sRGBgAMA a pHYs+tIDAT8Oc TLP*m  tP oc`SG0#Uh< 5\ f @ n(Ua:6uDؼ2 f hLIENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite001.png000066400000000000000000000003451312650303100244410ustar00rootroot00000000000000PNG  IHDR0(sRGBgAMA a cHRMz&u0`:pQ<cIDAT8Oc`dspDzHЏKD $O`Y3.a-[tOvP'0dJsCIPHIENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite002.png000066400000000000000000000003431312650303100244400ustar00rootroot00000000000000PNG  IHDR*`"sRGBgAMA a pHYs+xIDATHKcd``ă0AAFJm0dJqf e֭H$;T:hRہ耐 :݁0i-p:ztS !bAdg&BCC LCġ )3KIENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite003.png000066400000000000000000000004651312650303100244460ustar00rootroot00000000000000PNG  IHDR''bgAMA aIDATXGA yV}Xc[ZRf8P)CB -4x7ȯ)sGf`q}83<ӁV^zb5HowGGEOqgz#*ytԫ1YT1ϥZԑ~dSտO9T>'Ҿbzպ qswHu(eP1ZlgZ~^yf>w^v/?g-IENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite004.png000066400000000000000000000003541312650303100244440ustar00rootroot00000000000000PNG  IHDR2{sRGBgAMA a pHYsodIDATXG 0 D;v7s:QSӄFKB$,q^=Q ,} L25սK@Fjq0#-^gZ\8vjHjYHynN*;]s9IENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite005.png000066400000000000000000000003301312650303100244370ustar00rootroot00000000000000PNG  IHDRsRGBgAMA a pHYs(JmIDATHK 0E}52i>t^&2W̢T&̫V"M+ k`՚x'Q+&YpL,pԿNEjmH|bI@8WbIENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite006.png000066400000000000000000000003711312650303100244450ustar00rootroot00000000000000PNG  IHDR!0sRGBgAMA a cHRMz&u0`:pQ<wIDAT8O M|CqDFaSORrIhh4"\ d+s˿g' d ZTL#,yc qe:裭*󈕜{Ou7CIENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite007.png000066400000000000000000000005221312650303100244440ustar00rootroot00000000000000PNG  IHDR VόsRGBgAMA a cHRMz&u0`:pQ< pHYs+IDATXG10 ENB{pv) 7#"o(+"hkO{xLJ4iN?:%O$!HHJ"Kؙ!3ֱr >7&`=%߃sL؊؛ 4g78yIENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite008.png000066400000000000000000000010261312650303100244450ustar00rootroot00000000000000PNG  IHDRtUjD݇gAMA a0PLTE{IDATX= ӱU:N:v|i@Ir;͍vV m4Ya7CTuq5n3 D⡯𑢃\1& rE?ix/ AշSW˩1N8 q0qUusuZPHD@w95Zʙ4x|yOI''mjJU5)ЮOE.ZvwmrPdmh(GOxNzD{!-GRg٧ˇq< ^R l @jcÇ\N8608R)1q3opRZp[TQ.IENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite010.png000066400000000000000000000003601312650303100244360ustar00rootroot00000000000000PNG  IHDRޕ%sRGBgAMA a pHYs(JIDATHKc tLP.edUX@H=]}FT\+6Fa`B|8>C̥|K݇3r>j%M  *t>!@H3tJ]B`Z`mSsU?IENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite011.png000066400000000000000000000004351312650303100244420ustar00rootroot00000000000000PNG  IHDRɓsRGBgAMA a cHRMz&u0`:pQ<0PLTE{_IDAT(ύб 0 f%* ) !%'1(pNJelQ:@SԱ2fV3!4r UN0N/Ӽ/"\!R~IENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite012.png000066400000000000000000000060501312650303100244420ustar00rootroot00000000000000PNG  IHDR6( 6sRGBgAMA a pHYs(J IDAThCYkP~`,X,w6\B I$+hQ::5cl;δN3Nt:ښTsӘD! wr.KXsBnB2f}ssy :VKZ׿pe{d k"*.YΣ m1ߖ>pw%FdnMfDZZB~t ȹFƵƺN6e'v/1$${eeerNKYBLHZ?|U ΞḆDUC-;Z^g/zP_Wn` Ϛ Maa[,VIlHŁ{3F+Αa\ 8rn 517;zG/m5bmj˾7&p<]!\uHQB/^ME9;U%Py\aC:BP\~YHQ`0b#1ܫ _|vVoWn,Dr׉IygcC|ej2ɑ]wkI s84[r"VD[z6 9/'DŊķ R4zAHL(af\ol@o+jڅ\rhimeb$I8\.4Bb36cED&oqSCXhKH7.VP cht|4|N2"6 ;?kR[-VllLJ_/G{p\0΃`4b56Q]0>ۥww3>1((6k *=cgbr4݉*רwѕ^y!EUO5JAW=+xNtKN\e:Jb,2%}Z] J |7<=sB)`eMp5tMRUPP:hs8`onn 1CNTJKpyجSسcRSyחFgx6p\q6xUb]s[.WXg['Mg$Խ&N[ں$x1Ue[Nϔ|czRVɕyH[ǃq[Brd[!/%Jeyq\PmcWr߫.cgeY$/IGԬXvCK*an4I%xJ7ʗD2%}0V?N||얜 D:YD8Ѕ.ٜ 'b-\/eՎ+1-]6geSJlL|a:d&wfc'pK|YYY=ĴYj,V)IhE/-_cB m'_:TC0|fT6{yvo31ۢ|z(ձ$US Y _BK_Ctyßݣ7ZFtq=lb7FvaUƵ^_{_'=&ߓΜL>IL1huӸY4CfAF0#%;]۷"~ttNghc!q9*H0'YU#cE+Ș`'ڪP7cՉicWv!ѕkUV4[c~37fg$)DaةjEFLe%򪽻MHro Ih-1m=q%Ճ-IҊs>F)ɳLcwNsEJ'44hvQ^IENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite013.png000066400000000000000000000005031312650303100244400ustar00rootroot00000000000000PNG  IHDRkIsRGBgAMA a pHYs+IDAT8Oݓ= 1_,B[ "V[y"xx +/"Z͘ M&va{e:[/oBok=5~-bcl1!2Y-pw {lҰ/4(ڊ|}* 8,*+B61f Td!y*N1P,>+GFE:)*E+Y3 !]hW!DPMI.NIENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite014.png000066400000000000000000000004071312650303100244440ustar00rootroot00000000000000PNG  IHDR')BusRGBgAMA a pHYs(JIDATXG Et:lT AY2a?qJS%pRnZkjsm[z!YgMEC\chi_J̤oۻB p;8sm+PAsj+Rbf^[K C<{bs_d%IENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite015.png000066400000000000000000000003651312650303100244500ustar00rootroot00000000000000PNG  IHDR-sRGBgAMA a pHYs+IDAT8O͒ EmGr`?5{ /BD6wrޙA0#&Xg†x/2Nк!ǘ8o3PR*Iwc$Zp{ Bn,ꑉ|W{a]zk$k=̩IENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite016.png000066400000000000000000000003741312650303100244510ustar00rootroot00000000000000PNG  IHDRoUtsRGBgAMA a pHYs+IDAT8O E}R/f9mL1%0_k=\ӡe|1A ͚RIN?m a`žX4Nfr؞z9Xl2UV{ޙC*fEC44!:fV(MIENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite017.png000066400000000000000000000003421312650303100244450ustar00rootroot00000000000000PNG  IHDR1JsRGBgAMA a pHYs(JwIDATHKݑ Egtu + /=nl!F G4,K:,Lٹ3L1EP{-u>poE1ܙ;̞ ef K0>vi} LLd]Z4E+IENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite018.png000066400000000000000000000004201312650303100244430ustar00rootroot00000000000000PNG  IHDR0]gAMA aIDATXGA@0 En,90N e5:]U$FwQ}&(p*Q4"=Vi59[d" Bd]iLH[!Q/>Vr 6A80M*rZkвxmP^t8\&͉6d|ZkumԆuȟSf-ߋK~WzIENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite019.png000066400000000000000000000007111312650303100244470ustar00rootroot00000000000000PNG  IHDRk./*sRGBgAMA a pHYs+^IDATx^QJ1 p# >n T@{?-CgZ8d(i+ Da(,F}r1ZYzff+Y ,,kfDYauZU5ua*U3NִQX eatguZI,dO: Da uQX Dal?>(2F?^slL>QX eaYu|{Mu_Wu); δꩩj~Q,r$,{-ܕ]3v짊_Wu) 7_5'Z=ê: DauQX 㺾|A;)NIENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/fun/sprite020.png000066400000000000000000000004051312650303100244370ustar00rootroot00000000000000PNG  IHDRAs/sggAMA a pHYs+IDATXGֱ 0@Q9uLcM~qpE\"!5Bn>Fm[LS=˿3\׌#8\Gl4FZzݞ1SeM`M`/u]cJ3b0㙖sFJ)Y-[(:VIENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/000077500000000000000000000000001312650303100223415ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/AbstractFigure.java000066400000000000000000000235651312650303100261240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.Log; abstract class AbstractFigure { private final Set segments = new HashSet(); @Override public String toString() { return segments.toString(); } @Override final public boolean equals(Object obj) { final AbstractFigure other = (AbstractFigure) obj; return segments.equals(other.segments); } @Override final public int hashCode() { return segments.hashCode(); } protected boolean knowThisPoint(Point2DInt p) { for (LineSegmentInt seg : segments) { if (seg.getP1().equals(p) || seg.getP2().equals(p)) { return true; } } return false; } LineSegmentInt existingSegment(Point2DInt p1, Point2DInt p2) { for (LineSegmentInt seg : segments) { if (seg.getP1().equals(p1) && seg.getP2().equals(p2)) { return seg; } if (seg.getP1().equals(p2) && seg.getP2().equals(p1)) { return seg; } } return null; } Collection getSegmentsWithExtremity(Point2DInt extremity, Collection exceptions) { final Collection result = new HashSet(); for (LineSegmentInt seg : segments) { if (exceptions.contains(seg)) { continue; } if (seg.getP1().equals(extremity) || seg.getP2().equals(extremity)) { result.add(seg); } } return Collections.unmodifiableCollection(result); } public void addSegment(LineSegmentInt seg) { segments.add(seg); } protected final Set getSegments() { return Collections.unmodifiableSet(segments); } @Deprecated public Polyline addPath(Point2DInt start, Point2DInt end) { if (knowThisPoint(start) && knowThisPoint(end)) { return getPath(start, end); } final LineSegmentInt direct = new LineSegmentInt(start, end); addSegment(direct); return new PolylineImpl(start, end); } public Polyline addDirectLink(Point2DInt start, Point2DInt end) { final LineSegmentInt direct = new LineSegmentInt(start, end); addSegment(direct); Log.println("AbstractFigure::addDirectLink " + direct); return new PolylineImpl(start, end); } public boolean isSimpleSegmentPossible(Point2DInt start, Point2DInt end) { final LineSegmentInt direct = new LineSegmentInt(start, end); return hasIntersectionStrict(direct) == false; } public Polyline getPath(Pointable start, Pointable end) { if (knowThisPoint(start.getPosition()) == false) { throw new IllegalArgumentException(); } if (knowThisPoint(end.getPosition()) == false) { throw new IllegalArgumentException("" + end.getPosition()); } if (isSimpleSegmentPossible(start.getPosition(), end.getPosition())) { throw new IllegalArgumentException(); // return new PolylineImpl(start, end); } if (arePointsConnectable(start.getPosition(), end.getPosition()) == false) { return null; } return findBestPath(start, end); } private Polyline findBestPath(Pointable start, Pointable end) { Log.println("start=" + start.getPosition()); Log.println("end=" + end.getPosition()); final Set points = getAllPoints(); if (points.contains(start.getPosition()) == false || points.contains(end.getPosition()) == false) { throw new IllegalArgumentException(); } points.remove(start.getPosition()); points.remove(end.getPosition()); final List neighborhoods = new ArrayList(); for (Point2DInt p : points) { neighborhoods.addAll(getSingularity(p).getNeighborhoods()); } for (int i = 0; i < neighborhoods.size(); i++) { Log.println("N" + (i + 1) + " " + neighborhoods.get(i)); } final Dijkstra dijkstra = new Dijkstra(neighborhoods.size() + 2); Log.println("size=" + dijkstra.getSize()); for (int i = 0; i < neighborhoods.size(); i++) { if (isConnectable(start.getPosition(), neighborhoods.get(i))) { dijkstra.addLink(0, i + 1, distance(start.getPosition(), neighborhoods.get(i).getCenter())); } } for (int i = 0; i < neighborhoods.size(); i++) { for (int j = 0; j < neighborhoods.size(); j++) { if (i == j) { continue; } if (isConnectable(neighborhoods.get(i), neighborhoods.get(j))) { dijkstra.addLink(i + 1, j + 1, distance(neighborhoods.get(i).getCenter(), neighborhoods.get(j) .getCenter())); } } } for (int i = 0; i < neighborhoods.size(); i++) { if (isConnectable(end.getPosition(), neighborhoods.get(i))) { dijkstra.addLink(i + 1, neighborhoods.size() + 1, distance(end.getPosition(), neighborhoods.get(i) .getCenter())); } } final List path = dijkstra.getBestPath(); if (path.get(path.size() - 1) != neighborhoods.size() + 1) { throw new IllegalStateException("No Path"); } assert path.size() > 2; Log.println("PATH=" + path); final List usedNeighborhoods = new ArrayList(); for (int i = 1; i < path.size() - 1; i++) { final int idx = path.get(i) - 1; usedNeighborhoods.add(neighborhoods.get(idx)); } return findApproximatePath(start, end, usedNeighborhoods); } private Polyline findApproximatePath(Pointable start, Pointable end, final List neighborhoods) { System.err .println("findApproximatePath " + start.getPosition() + " " + end.getPosition() + " " + neighborhoods); final PolylineImpl result = new PolylineImpl(start, end); for (Neighborhood n : neighborhoods) { Log.println("Neighborhood =" + n); final double d = getProximaDistance(n.getCenter()) / 2; final double a = n.getMiddle(); Log.println("d=" + d); Log.println("a=" + a * 180 / Math.PI); final double deltaX = d * Math.cos(a); final double deltaY = d * Math.sin(a); assert d > 0; Log.println("Result = " + n.getCenter().translate((int) deltaX, (int) deltaY)); result.addIntermediate(n.getCenter().translate((int) deltaX, (int) deltaY)); } return result; } private double getProximaDistance(Point2DInt center) { double result = Double.MAX_VALUE; for (Point2DInt p : getAllPoints()) { if (center.equals(p)) { continue; } final double cur = new LineSegmentInt(p, center).getLength(); result = Math.min(result, cur); } return result; } static private double distance(Point2DInt p1, Point2DInt p2) { return new LineSegmentInt(p1, p2).getLength(); } public boolean isConnectable(Point2DInt p, Neighborhood n) { final LineSegmentInt seg = new LineSegmentInt(n.getCenter(), p); if (hasIntersectionStrict(seg)) { return false; } final double angle = Singularity.convertAngle(seg.getAngle()); return n.isInAngleLarge(angle); } public boolean isConnectable(Neighborhood n1, Neighborhood n2) { final boolean result = isConnectableInternal(n1, n2); assert result == isConnectableInternal(n2, n1); return result; } private boolean isConnectableInternal(Neighborhood n1, Neighborhood n2) { if (n1.getCenter().equals(n2.getCenter())) { return false; } final LineSegmentInt seg1 = new LineSegmentInt(n1.getCenter(), n2.getCenter()); if (hasIntersectionStrict(seg1)) { return false; } final double angle1 = Singularity.convertAngle(seg1.getAngle()); final double angle2 = Singularity.convertAngle(seg1.getOppositeAngle()); assert angle2 == Singularity.convertAngle(new LineSegmentInt(n2.getCenter(), n1.getCenter()).getAngle()); if (n1.isInAngleStrict(angle1) && n2.isInAngleStrict(angle2)) { return true; } if (n1.isAngleLimit(angle1) && n2.isAngleLimit(angle2)) { if (n1.is360() || n2.is360()) { return true; } final Orientation o1 = n1.getOrientationFrom(angle1); final Orientation o2 = n2.getOrientationFrom(angle2); return o1 != o2; } return false; } private boolean hasIntersectionStrict(LineSegmentInt direct) { for (LineSegmentInt seg : getSegments()) { if (seg.atLeastOneCommonExtremities(direct)) { continue; } if (seg.doesIntersect(direct)) { Log.println("seg=" + seg); Log.println("direct=" + direct); Log.println("AbstractFigure::hasIntersectionStrict true"); return true; } } Log.println("AbstractFigure::hasIntersectionStrict false"); return false; } public Singularity getSingularity(Point2DInt center) { final Singularity singularity = new Singularity(center); for (LineSegmentInt seg : getSegments()) { if (seg.containsPoint(center)) { singularity.addLineSegment(seg); } } return singularity; } private Set getAllPoints() { final Set result = new HashSet(); for (LineSegmentInt seg : segments) { result.add(seg.getP1()); result.add(seg.getP2()); } return result; } abstract boolean arePointsConnectable(Point2DInt p1, Point2DInt p2); } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/AbstractLineSegment.java000066400000000000000000000202101312650303100270750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; public abstract class AbstractLineSegment extends Line2D { @Override final public boolean equals(Object obj) { final AbstractLineSegment other = (AbstractLineSegment) obj; return this.getP1().equals(other.getP1()) && getP2().equals(other.getP2()); } @Override final public int hashCode() { int result = 7; final int multiplier = 17; result = result * multiplier + getP1().hashCode(); result = result * multiplier + getP2().hashCode(); return result; } final public double getLength() { return Math.sqrt((getP2().getX() - getP1().getX()) * (getP2().getX() - getP1().getX()) + (getP2().getY() - getP1().getY()) * (getP2().getY() - getP1().getY())); } final protected Point2D.Double getPoint2D(double u) { final double x = getP1().getX() + u * (getP2().getX() - getP1().getX()); final double y = getP1().getY() + u * (getP2().getY() - getP1().getY()); return new Point2D.Double(x, y); } final public double getDistance(Point2D f) { return this.ptSegDist(f); } public Point2D getSegIntersection(AbstractLineSegment other) { final double u; if (other.isVertical()) { u = getIntersectionVertical(other.getP1().getX()); } else if (other.isHorizontal()) { u = getIntersectionHorizontal(other.getP1().getY()); } else { return getDichoIntersection(other); } if (java.lang.Double.isNaN(u) || u < 0 || u > 1) { return null; } final Point2D.Double result = getPoint2D(u); if (isBetween(result, other.getP1(), other.getP2())) { return result; } return null; } private Point2D getDichoIntersection(AbstractLineSegment other) { if (doesIntersect(other) == false) { return null; } if (other.getLength() < 0.01) { return other.getMiddle(); } final LineSegmentDouble p1 = new LineSegmentDouble(other.getP1(), other.getMiddle()); final LineSegmentDouble p2 = new LineSegmentDouble(other.getMiddle(), other.getP2()); if (doesIntersect(p1)) { return getDichoIntersection(p1); } if (doesIntersect(p2)) { return getDichoIntersection(p2); } throw new IllegalStateException(); } private Point2D.Double getMiddle() { return getPoint2D(0.5); } private static boolean isBetween(double value, double v1, double v2) { if (v1 < v2) { return value >= v1 && value <= v2; } assert v2 <= v1; return value >= v2 && value <= v1; } static boolean isBetween(Point2D toTest, Point2D pos1, Point2D pos2) { return isBetween(toTest.getX(), pos1.getX(), pos2.getX()) && isBetween(toTest.getY(), pos1.getY(), pos2.getY()); } public double getIntersectionVertical(double xOther) { final double coef = getP2().getX() - getP1().getX(); if (coef == 0) { return java.lang.Double.NaN; } return (xOther - getP1().getX()) / coef; } public double getIntersectionHorizontal(double yOther) { final double coef = getP2().getY() - getP1().getY(); if (coef == 0) { return java.lang.Double.NaN; } return (yOther - getP1().getY()) / coef; } // Line2D @Override final public void setLine(double x1, double y1, double x2, double y2) { throw new UnsupportedOperationException(); } final public Rectangle2D getBounds2D() { final double x; final double w; if (getX1() < getX2()) { x = getX1(); w = getX2() - getX1(); } else { x = getX2(); w = getX1() - getX2(); } final double y; final double h; if (getY1() < getY2()) { y = getY1(); h = getY2() - getY1(); } else { y = getY2(); h = getY1() - getY2(); } return new Rectangle2D.Double(x, y, w, h); } final public boolean isHorizontal() { return getP1().getY() == getP2().getY(); } final public boolean isVertical() { return getP1().getX() == getP2().getX(); } final public double getDistance(AbstractLineSegment other) { final double result = getDistanceInternal(other); assert equals(result, other.getDistanceInternal(this)); return result; } private boolean equals(double a1, double a2) { return Math.abs(a1 - a2) < 0.0001; } public boolean isPointOnSegment(Point2D pt) { return equals(pt.distance(getP1()) + pt.distance(getP2()), getLength()); } private double getDistanceInternal(AbstractLineSegment other) { double result = this.getDistance(other.getP1()); result += this.getDistance(other.getP2()); result += other.getDistance(this.getP1()); result += other.getDistance(this.getP2()); return result; } final public double getAngle() { return Math.atan2(getP2().getY() - getP1().getY(), getP2().getX() - getP1().getX()); } final public double getOppositeAngle() { return Math.atan2(getP1().getY() - getP2().getY(), getP1().getX() - getP2().getX()); } final public Point2D.Double startTranslatedAsVector(double u) { final double pour = 1.0 * u / 100.0; final double x = getP1().getX() + pour * (getP2().getX() - getP1().getX()); final double y = getP1().getY() + pour * (getP2().getY() - getP1().getY()); return new Point2D.Double(x, y); } public boolean doesIntersect(AbstractLineSegment other) { final boolean result = doesIntersectInternal(other); assert result == other.doesIntersectInternal(this); return result; } private boolean doesIntersectInternal(AbstractLineSegment other) { final double d1 = direction(other.getP1(), other.getP2(), this.getP1()); final double d2 = direction(other.getP1(), other.getP2(), this.getP2()); final double d3 = direction(this.getP1(), this.getP2(), other.getP1()); final double d4 = direction(this.getP1(), this.getP2(), other.getP2()); if (d1 == 0 && isBetween(this.getP1(), other.getP1(), other.getP2())) { return true; } if (d2 == 0 && isBetween(this.getP2(), other.getP1(), other.getP2())) { return true; } if (d3 == 0 && isBetween(other.getP1(), this.getP1(), this.getP2())) { return true; } if (d4 == 0 && isBetween(other.getP2(), this.getP1(), this.getP2())) { return true; } final boolean result = signDiffers(d1, d2) && signDiffers(d3, d4); assert this.intersectsLine(other) == result; return result; } private static double direction(Point2D origin, Point2D point1, Point2D point2) { return determinant(point2.getX() - origin.getX(), point2.getY() - origin.getY(), point1.getX() - origin.getX(), point1.getY() - origin.getY()); } private static boolean signDiffers(double a, double b) { if (a > 0 && b < 0) { return true; } if (a < 0 && b > 0) { return true; } return false; } public double determinant(AbstractLineSegment other) { return determinant(this.getP1().getX() - this.getP2().getX(), this.getP1().getY() - this.getP2().getY(), other .getP1().getX() - other.getP2().getX(), other.getP1().getY() - other.getP2().getY()); } private static double determinant(double x1, double y1, double x2, double y2) { return x1 * y2 - x2 * y1; } public double side(Point2D point) { // assert Math.signum(direction(p1, p2, point)) == // this.relativeCCW(point); return direction(getP1(), getP2(), point); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/AbstractPolyline.java000066400000000000000000000121651312650303100264700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.awt.geom.GeneralPath; abstract class AbstractPolyline implements Polyline { private final Pointable start; private final Pointable end; public AbstractPolyline(Pointable start, Pointable end) { this.start = start; this.end = end; } @Override final public String toString() { return segments().toString(); } final public boolean doesTouch(Polyline other) { final boolean result = doesTouchInternal(other); assert result == ((AbstractPolyline) other).doesTouchInternal(this); return result; } private boolean doesTouchInternal(Polyline other) { for (int i = 0; i < nbSegments(); i++) { final LineSegmentInt seg1 = segments().get(i); for (int j = 0; j < other.nbSegments(); j++) { final LineSegmentInt seg2 = other.segments().get(j); final boolean ignoreExtremities = i == 0 || i == nbSegments() - 1 || j == 0 || j == other.nbSegments() - 1; if (ignoreExtremities == false && seg1.doesIntersect(seg2)) { return true; } if (ignoreExtremities && seg1.doesIntersectButNotSameExtremity(seg2)) { return true; } } } return false; } final public LineSegmentInt getFirst() { return segments().get(0); } final public LineSegmentInt getLast() { return segments().get(nbSegments() - 1); } final public double getLength() { double result = 0; for (LineSegmentInt seg : segments()) { result += seg.getLength(); } return result; } final public Point2DInt clipStart(Box box) { assert box.doesIntersect(segments().get(0)); final Point2DInt inter[] = box.intersect(segments().get(0)); assert inter.length == 1; segments().set( 0, new LineSegmentInt(inter[0].getXint(), inter[0].getYint(), segments().get(0).getP2().getXint(), segments().get(0).getP2().getYint())); return inter[0]; } final public Point2DInt clipEnd(Box box) { final int last = nbSegments() - 1; if (last == -1) { return null; } assert box.doesIntersect(segments().get(last)); final Point2DInt inter[] = box.intersect(segments().get(last)); assert inter.length == 1; segments().set( last, new LineSegmentInt(segments().get(last).getP1().getXint(), segments().get(last).getP1().getYint(), inter[0].getXint(), inter[0].getYint())); return inter[0]; } final public boolean intersectBox(Box b) { for (LineSegmentInt seg : segments()) { if (b.doesIntersect(seg)) { return true; } } return false; } final public double getDistance(Box b) { double result = Double.MAX_VALUE; for (LineSegmentInt seg : segments()) { if (b.doesIntersect(seg)) { result = Math.min(result, seg.getDistance(b.getCenterPoint())); } } return result; } final public double getDistance(Polyline other) { double result = 0; for (LineSegmentInt seg1 : segments()) { for (LineSegmentInt seg2 : other.segments()) { result += seg1.getDistance(seg2); } } return result; } final public GeneralPath asGeneralPath() { final GeneralPath generalPath = new GeneralPath(); for (LineSegmentInt seg : segments()) { generalPath.append(seg, false); } return generalPath; } final public int getMinX() { int result = Integer.MAX_VALUE; for (LineSegmentInt seg : segments()) { result = Math.min(result, seg.getMinX()); } return result; } final public int getMinY() { int result = Integer.MAX_VALUE; for (LineSegmentInt seg : segments()) { result = Math.min(result, seg.getMinY()); } return result; } final public int getMaxX() { int result = Integer.MIN_VALUE; for (LineSegmentInt seg : segments()) { result = Math.max(result, seg.getMaxX()); } return result; } final public int getMaxY() { int result = Integer.MIN_VALUE; for (LineSegmentInt seg : segments()) { result = Math.max(result, seg.getMaxY()); } return result; } public final Pointable getStart() { return start; } public final Pointable getEnd() { return end; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/Box.java000066400000000000000000000133661312650303100237450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; public class Box implements XMoveable, Pointable { private int x; private int y; final private int width; final private int height; public Box(int x, int y, int width, int height) { if (width <= 0 || height <= 0) { throw new IllegalArgumentException(); } this.x = x; this.y = y; this.width = width; this.height = height; } @Override public String toString() { return "Box [" + x + "," + y + "] " + width + "," + height; } public Point2DInt[] getCorners() { final Point2DInt p1 = new Point2DInt(getX(), getY()); final Point2DInt p2 = new Point2DInt(getX() + getWidth(), getY()); final Point2DInt p3 = new Point2DInt(getX() + getWidth(), getY() + getHeight()); final Point2DInt p4 = new Point2DInt(getX(), getY() + getHeight()); return new Point2DInt[] { p1, p2, p3, p4 }; } public Point2DInt[] getCornersOfOneSide(LineSegmentInt seg, int sgn) { final Point2DInt[] corners = getCorners(); final double sgn0 = seg.side(corners[0]); final double sgn1 = seg.side(corners[1]); final double sgn2 = seg.side(corners[2]); final double sgn3 = seg.side(corners[3]); int nb = 0; if (Math.signum(sgn0) == sgn) { nb++; } if (Math.signum(sgn1) == sgn) { nb++; } if (Math.signum(sgn2) == sgn) { nb++; } if (Math.signum(sgn3) == sgn) { nb++; } final Point2DInt[] result = new Point2DInt[nb]; int i = 0; if (Math.signum(sgn0) == sgn) { result[i++] = corners[0]; } if (Math.signum(sgn1) == sgn) { result[i++] = corners[1]; } if (Math.signum(sgn2) == sgn) { result[i++] = corners[2]; } if (Math.signum(sgn3) == sgn) { result[i++] = corners[3]; } assert nb == i; return result; } public boolean doesIntersect(LineSegmentInt seg) { return intersect(seg).length > 0; } public Point2DInt[] intersect(LineSegmentInt seg) { if (seg.side(this) != 0) { return new Point2DInt[0]; } // Log.println("THIS=" + this); // Log.println("LineSegment=" + seg); final Point2DInt corners[] = getCorners(); final LineSegmentInt seg1 = new LineSegmentInt(corners[0], corners[1]); final LineSegmentInt seg2 = new LineSegmentInt(corners[1], corners[2]); final LineSegmentInt seg3 = new LineSegmentInt(corners[2], corners[3]); final LineSegmentInt seg4 = new LineSegmentInt(corners[3], corners[0]); final Point2DInt i1 = seg.getSegIntersection(seg1); Point2DInt i2 = seg.getSegIntersection(seg2); Point2DInt i3 = seg.getSegIntersection(seg3); Point2DInt i4 = seg.getSegIntersection(seg4); // Log.println("i1="+i1); // Log.println("i2="+i2); // Log.println("i3="+i3); // Log.println("i4="+i4); if (i2 != null && i2.equals(i1)) { i2 = null; } if (i3 != null && (i3.equals(i1) || i3.equals(i2))) { i3 = null; } if (i4 != null && (i4.equals(i1) || i4.equals(i2) || i4.equals(i3))) { i4 = null; } final int nb = countNotNull(i1, i2, i3, i4); assert nb >= 0 && nb <= 3 : nb; int i = 0; final Point2DInt result[] = new Point2DInt[nb]; if (i1 != null) { result[i++] = i1; } if (i2 != null) { result[i++] = i2; } if (i3 != null) { result[i++] = i3; } if (i4 != null) { result[i++] = i4; } assert i == nb; assert getCornersOfOneSide(seg, 0).length + getCornersOfOneSide(seg, 1).length + getCornersOfOneSide(seg, -1).length == 4; return result; } private int countNotNull(Point2DInt i1, Point2DInt i2, Point2DInt i3, Point2DInt i4) { int n = 0; if (i1 != null) { n++; } if (i2 != null) { n++; } if (i3 != null) { n++; } if (i4 != null) { n++; } return n; } public Box outerBox(int margin) { return new Box(x - margin, y - margin, width + 2 * margin, height + 2 * margin); } public Point2DInt getCenterPoint() { return new Point2DInt(x + width / 2, y + height / 2); } public void moveX(int delta) { this.x += delta; } public boolean intersectBox(Box other) { return other.x + other.width > this.x && other.y + other.height > this.y && other.x < this.x + this.width && other.y < this.y + this.height; } public final int getX() { return x; } public final int getY() { return y; } public final int getWidth() { return width; } public final int getHeight() { return height; } public int getMinX() { return x; } public int getMinY() { return y; } public int getMaxX() { return x + width; } public int getMaxY() { return y + height; } public int getCenterX() { return x + width / 2; } public int getCenterY() { return y + height / 2; } public Point2DInt getPosition() { return getCenterPoint(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/ClosedArea.java000066400000000000000000000157051312650303100252160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.util.ArrayList; import java.util.HashSet; import java.util.List; public class ClosedArea extends AbstractFigure { private final List points = new ArrayList(); private final List segmentsList = new ArrayList(); private int minY = Integer.MAX_VALUE; private int minX = Integer.MAX_VALUE; private int maxX = Integer.MIN_VALUE; private int maxY = Integer.MIN_VALUE; public ClosedArea() { assert isConsistent(); } @Override public String toString() { return points.toString(); } public boolean contains(Point2DInt point) { return contains(point.getXint(), point.getYint()); } private boolean contains(int x, int y) { if (points.size() <= 2) { return false; } if (x > maxX) { return false; } if (x < minX) { return false; } if (y > maxY) { return false; } if (y < minY) { return false; } if (isOnFrontier(new Point2DInt(x, y))) { return true; } int hits = 0; int lastx = getLastPoint().getXint(); int lasty = getLastPoint().getYint(); int curx; int cury; // Walk the edges of the polygon for (int i = 0; i < points.size(); lastx = curx, lasty = cury, i++) { curx = points.get(i).getXint(); cury = points.get(i).getYint(); if (cury == lasty) { continue; } final int leftx; if (curx < lastx) { if (x >= lastx) { continue; } leftx = curx; } else { if (x >= curx) { continue; } leftx = lastx; } final double test1; final double test2; if (cury < lasty) { if (y < cury || y >= lasty) { continue; } if (x < leftx) { hits++; continue; } test1 = x - curx; test2 = y - cury; } else { if (y < lasty || y >= cury) { continue; } if (x < leftx) { hits++; continue; } test1 = x - lastx; test2 = y - lasty; } if (test1 < test2 / (lasty - cury) * (lastx - curx)) { hits++; } } return (hits & 1) != 0; } private boolean isConsistent() { assert getSegments().size() == segmentsList.size(); assert getSegments().equals(new HashSet(segmentsList)); if (getSegments().size() > 0) { assert getSegments().size() + 1 == points.size() : "points=" + points + " getSegment()=" + getSegments(); } for (int i = 0; i < segmentsList.size(); i++) { final LineSegmentInt seg = segmentsList.get(i); if (seg.sameExtremities(new LineSegmentInt(points.get(i), points.get(i + 1))) == false) { return false; } } return true; } public boolean isOnFrontier(Point2DInt point) { for (LineSegmentInt seg : segmentsList) { if (seg.containsPoint(point)) { return true; } } return false; } public boolean isClosed() { if (getSegments().size() < 3) { return false; } if (getFirstSegment().atLeastOneCommonExtremities(getLastSegment())) { return true; } return false; } ClosedArea append(LineSegmentInt other) { if (isClosed()) { throw new IllegalStateException(); } if (getSegments().contains(other)) { throw new IllegalArgumentException(); } final ClosedArea result = new ClosedArea(); for (LineSegmentInt seg : segmentsList) { result.addSegment(seg); } if (result.getSegments().size() > 0 && result.getLastSegment().atLeastOneCommonExtremities(other) == false) { throw new IllegalArgumentException(); } if (points.contains(other.getP1()) && points.contains(other.getP2()) && other.getP1().equals(getFirstPoint()) == false && other.getP2().equals(getFirstPoint()) == false) { return null; } result.addSegment(other); assert result.isConsistent(); return result; } @Override public void addSegment(LineSegmentInt seg) { super.addSegment(seg); minY = Math.min(minY, seg.getMinY()); maxY = Math.max(maxY, seg.getMaxY()); minX = Math.min(minX, seg.getMinX()); maxX = Math.max(maxX, seg.getMaxX()); segmentsList.add(seg); if (points.size() == 0) { assert getSegments().size() == 1; points.add(seg.getP1()); points.add(seg.getP2()); } else if (points.size() == 2) { assert segmentsList.size() == 2; final LineSegmentInt seg0 = segmentsList.get(0); final LineSegmentInt seg1 = segmentsList.get(1); points.clear(); final Point2DInt common = seg0.getCommonExtremities(seg1); if (common == null) { throw new IllegalArgumentException(); } assert common.equals(seg1.getCommonExtremities(seg0)); points.add(seg0.getOtherExtremity(common)); points.add(common); points.add(seg1.getOtherExtremity(common)); } else { final Point2DInt lastPoint = getLastPoint(); points.add(seg.getOtherExtremity(lastPoint)); } assert isConsistent(); } private Point2DInt getLastPoint() { return points.get(points.size() - 1); } private Point2DInt getFirstPoint() { return points.get(0); } public LineSegmentInt getLastSegment() { return segmentsList.get(segmentsList.size() - 1); } private LineSegmentInt getFirstSegment() { return segmentsList.get(0); } public Point2DInt getFreePoint() { if (isClosed()) { throw new IllegalStateException(); } return getLastPoint(); } public int getMinY() { return minY; } public int getMinX() { return minX; } public int getMaxY() { return maxY; } public int getMaxX() { return maxX; } public boolean contains(ClosedArea other) { if (isClosed() == false) { throw new IllegalStateException(); } for (Point2DInt point : other.points) { if (this.contains(point) == false) { return false; } } return true; } @Override boolean arePointsConnectable(Point2DInt p1, Point2DInt p2) { if (isOnFrontier(p1) || isOnFrontier(p2)) { return true; } final boolean pos1 = contains(p1); final boolean pos2 = contains(p2); return pos1 == pos2; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/CollectionUtils.java000066400000000000000000000051671312650303100263310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; public class CollectionUtils { public static Collection> selectUpTo(List original, int nb) { final List> result = new ArrayList>(); for (int i = 1; i <= nb; i++) { result.addAll(selectExactly(original, i)); } return Collections.unmodifiableList(result); } public static Collection> selectExactly(List original, int nb) { if (nb < 0) { throw new IllegalArgumentException(); } if (nb == 0) { return Collections.emptyList(); } if (nb == 1) { final List> result = new ArrayList>(); for (E element : original) { result.add(Collections.singletonList(element)); } return result; } if (nb > original.size()) { return Collections.emptyList(); } if (nb == original.size()) { return Collections.singletonList(original); } final List> result = new ArrayList>(); for (List subList : selectExactly(original.subList(1, original.size()), nb - 1)) { final List newList = new ArrayList(); newList.add(original.get(0)); newList.addAll(subList); result.add(Collections.unmodifiableList(newList)); } result.addAll(selectExactly(original.subList(1, original.size()), nb)); return Collections.unmodifiableList(result); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/Dijkstra.java000066400000000000000000000061641312650303100247660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; public class Dijkstra { final private double basic[][]; final private double dist[]; final private int previous[]; final private Set q = new HashSet(); final private int size; public Dijkstra(int size) { this.size = size; this.basic = new double[size][size]; this.dist = new double[size]; this.previous = new int[size]; for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { this.basic[i][j] = i == j ? 0 : Double.MAX_VALUE; } } } public void addLink(int n1, int n2, double d) { // Log.println("Adding " + n1 + " " + n2 + " " + d); if (n1 == n2) { throw new IllegalArgumentException(); } basic[n1][n2] = d; basic[n2][n1] = d; } private void init() { for (int i = 0; i < size; i++) { this.dist[i] = Double.MAX_VALUE; this.previous[i] = -1; this.q.add(i); } this.dist[0] = 0; } private void computePrevious() { init(); while (q.size() > 0) { final int u = smallest(); if (dist[u] == Double.MAX_VALUE) { return; } q.remove(u); for (int v = 0; v < size; v++) { if (basic[u][v] == Double.MAX_VALUE) { continue; } final double alt = dist[u] + basic[u][v]; if (alt < dist[v]) { dist[v] = alt; previous[v] = u; } } } } public List getBestPath() { final List result = new ArrayList(); computePrevious(); int u = size - 1; while (previous[u] >= 0) { result.add(0, u); u = previous[u]; } result.add(0, 0); return Collections.unmodifiableList(result); } private int smallest() { int result = -1; for (Integer i : q) { if (result == -1 || dist[i] < dist[result]) { result = i; } } return result; } public final int getSize() { return size; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/InflateData.java000066400000000000000000000034771312650303100253730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; public class InflateData implements Comparable { private final int pos; private final int inflation; public InflateData(int pos, int inflation) { if (inflation % 2 != 0) { throw new IllegalArgumentException(); } this.pos = pos; this.inflation = inflation; } public final int getPos() { return pos; } public final int getInflation() { return inflation; } public int compareTo(InflateData other) { return -(this.pos - other.pos); } @Override public String toString() { return "" + pos + " (" + inflation + ")"; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/InflationTransform.java000066400000000000000000000140531312650303100270260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.ListIterator; import java.util.SortedSet; import java.util.TreeSet; class Point2DIntComparatorDistance implements Comparator { private final Point2DInt center; public Point2DIntComparatorDistance(Point2DInt center) { this.center = center; } public int compare(Point2DInt p1, Point2DInt p2) { return (int) Math.signum(p1.distance(center) - p2.distance(center)); } } public class InflationTransform { private final List inflateX = new ArrayList(); private final List inflateY = new ArrayList(); public void addInflationX(int xpos, int inflation) { add(inflateX, xpos, inflation); } @Override public String toString() { return "inflateX = " + inflateX + " inflateY = " + inflateY; } public void addInflationY(int ypos, int inflation) { add(inflateY, ypos, inflation); } static private void add(List list, int ypos, int inflation) { for (final ListIterator it = list.listIterator(); it.hasNext();) { final InflateData cur = it.next(); if (cur.getPos() == ypos) { it.set(new InflateData(ypos, Math.max(inflation, cur.getInflation()))); return; } } list.add(new InflateData(ypos, inflation)); Collections.sort(list); } Collection cutPoints(LineSegmentInt original) { // Log.println("original=" + original); // Log.println("inflateX=" + inflateX); // Log.println("inflateY=" + inflateY); final SortedSet result = new TreeSet(new Point2DIntComparatorDistance(original.getP1())); if (original.isHorizontal() == false) { for (InflateData x : inflateX) { final LineSegmentInt vertical = new LineSegmentInt(x.getPos(), original.getMinY(), x.getPos(), original .getMaxY()); final Point2DInt inter = original.getSegIntersection(vertical); if (inter != null) { result.add(inter); } } } if (original.isVertical() == false) { for (InflateData y : inflateY) { final LineSegmentInt horizontal = new LineSegmentInt(original.getMinX(), y.getPos(), original.getMaxX(), y.getPos()); final Point2DInt inter = original.getSegIntersection(horizontal); if (inter != null) { result.add(inter); } } } return result; } Collection cutSegments(LineSegmentInt original) { final List result = new ArrayList(); Point2DInt cur = original.getP1(); final Collection cutPoints = cutPoints(original); for (Point2DInt inter : cutPoints) { if (cur.equals(inter)) { continue; } result.add(new LineSegmentInt(cur, inter)); cur = inter; } if (cur.equals(original.getP2()) == false) { result.add(new LineSegmentInt(cur, original.getP2())); } return result; } Collection cutSegments(Collection segments) { final List result = new ArrayList(); for (LineSegmentInt seg : segments) { result.addAll(cutSegments(seg)); } return result; } private LineSegmentInt inflateSegment(LineSegmentInt seg) { if (isOnGrid(seg.getP1()) || isOnGrid(seg.getP2())) { return new LineSegmentInt(inflatePoint2DInt(seg.getP1()), inflatePoint2DInt(seg.getP2())); } for (InflateData x : inflateX) { seg = seg.inflateXAlpha(x); } for (InflateData y : inflateY) { seg = seg.inflateYAlpha(y); } return seg; } private boolean isOnGrid(Point2DInt point) { boolean onGrid = false; for (InflateData x : inflateX) { if (point.getX() == x.getPos()) { onGrid = true; } } if (onGrid == false) { return false; } for (InflateData y : inflateY) { if (point.getY() == y.getPos()) { return true; } } return false; } public Point2DInt inflatePoint2DInt(Point2DInt point) { for (InflateData x : inflateX) { point = point.inflateX(x); } for (InflateData y : inflateY) { point = point.inflateY(y); } return point; } List inflateSegmentCollection(Collection segments) { final List result = new ArrayList(); for (LineSegmentInt seg : segments) { result.add(inflateSegment(seg)); } return result; } public List inflate(Collection segments) { final List result = new ArrayList(); LineSegmentInt last = null; final Collection cutSegments = cutSegments(segments); for (LineSegmentInt seg : inflateSegmentCollection(cutSegments)) { if (last != null && last.getP2().equals(seg.getP1()) == false) { result.add(new LineSegmentInt(last.getP2(), seg.getP1())); } result.add(seg); last = seg; } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/Kingdom.java000066400000000000000000000067031312650303100246020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.Set; public class Kingdom extends AbstractFigure { private Set buildClosedArea(ClosedArea area) { if (area.isClosed()) { throw new IllegalArgumentException(); } final Set result = new HashSet(); for (LineSegmentInt seg : getSegmentsWithExtremity(area.getFreePoint(), area.getSegments())) { final ClosedArea newArea = area.append(seg); if (newArea != null) { result.add(newArea); } } return Collections.unmodifiableSet(result); } private void grow(Set areas) { for (ClosedArea area : new HashSet(areas)) { if (area.isClosed() == false) { areas.addAll(buildClosedArea(area)); } } } public Set getAllClosedArea() { final Set result = new HashSet(); for (LineSegmentInt seg : getSegments()) { result.add(new ClosedArea().append(seg)); } int lastSize; do { lastSize = result.size(); grow(result); } while (result.size() != lastSize); for (final Iterator it = result.iterator(); it.hasNext();) { final ClosedArea area = it.next(); if (area.isClosed() == false) { it.remove(); } } return Collections.unmodifiableSet(result); } // public Set getAllSmallClosedArea() { // final Set all = getAllClosedArea(); // final Set result = new HashSet(all); // // for (final Iterator it = result.iterator(); it.hasNext();) { // final ClosedArea area = it.next(); // if (containsAnotherArea(area, all)) { // it.remove(); // } // } // // return Collections.unmodifiableSet(result); // } // static private boolean containsAnotherArea(ClosedArea area, // Set all) { // for (ClosedArea another : all) { // if (another == area) { // continue; // } // if (area.contains(another)) { // return true; // } // } // return false; // } @Override public boolean arePointsConnectable(Point2DInt p1, Point2DInt p2) { for (ClosedArea area : getAllClosedArea()) { if (area.arePointsConnectable(p1, p2) == false) { return false; } } return true; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/LineSegmentDouble.java000066400000000000000000000060051312650303100265520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.awt.geom.CubicCurve2D; import java.awt.geom.Point2D; import java.util.Locale; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; public class LineSegmentDouble extends AbstractLineSegment { private final Point2D p1; private final Point2D p2; @Override public String toString() { return String.format(Locale.US, "( %.2f,%.2f - %.2f,%.2f )", getP1().getX(), getP1().getY(), getP2().getX(), getP2().getY()); } public LineSegmentDouble(double x1, double y1, double x2, double y2) { this(new Point2D.Double(x1, y1), new Point2D.Double(x2, y2)); } public LineSegmentDouble(Point2D p1, Point2D p2) { this.p1 = p1; this.p2 = p2; if (p1.equals(p2)) { throw new IllegalArgumentException(); } assert p1 != null && p2 != null; assert getLength() > 0; assert this.getDistance(this) == 0; } public LineSegmentDouble(CubicCurve2D.Double curve) { this(curve.getP1(), curve.getP2()); } public LineSegmentDouble translate(UTranslate translate) { return new LineSegmentDouble(translate.getTranslated(getP1()), translate.getTranslated(getP2())); } @Override public Point2D getP1() { return p1; } @Override public Point2D getP2() { return p2; } @Override public double getX1() { return p1.getX(); } @Override public double getX2() { return p2.getX(); } @Override public double getY1() { return p1.getY(); } @Override public double getY2() { return p2.getY(); } public void draw(UGraphic ug) { final double x1 = p1.getX(); final double y1 = p1.getY(); final double x2 = p2.getX(); final double y2 = p2.getY(); ug = ug.apply(new UTranslate(x1, y1)); ug.draw(new ULine(x2 - x1, y2 - y1)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/LineSegmentInt.java000066400000000000000000000153741312650303100261030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.awt.geom.Point2D; import java.util.Locale; public class LineSegmentInt extends AbstractLineSegment { private final Point2DInt p1; private final Point2DInt p2; @Override public String toString() { return String.format(Locale.US, "( %d,%d - %d,%d )", p1.getXint(), p1.getYint(), p2.getXint(), p2.getYint()); } public LineSegmentInt(int x1, int y1, int x2, int y2) { this(new Point2DInt(x1, y1), new Point2DInt(x2, y2)); } public LineSegmentInt(Point2DInt p1, Point2DInt p2) { this.p1 = p1; this.p2 = p2; if (p1.equals(p2)) { throw new IllegalArgumentException(); } assert p1 != null && p2 != null; assert getLength() > 0; assert this.getDistance(this) == 0; } public boolean containsPoint(Point2D point) { return side(point) == 0 && isBetween(point, p1, p2); } public double side(Box box) { final Point2DInt corners[] = box.getCorners(); final double s0 = side(corners[0]); final double s1 = side(corners[1]); final double s2 = side(corners[2]); final double s3 = side(corners[3]); if (s0 > 0 && s1 > 0 && s2 > 0 && s3 > 0) { return 1; } if (s0 < 0 && s1 < 0 && s2 < 0 && s3 < 0) { return -1; } return 0; } public boolean doesIntersectButNotSameExtremity(LineSegmentInt other) { // assert sameExtremities(other) == false; if (doesIntersect(other) == false) { return false; } if (atLeastOneCommonExtremities(other)) { return false; } return true; } public boolean sameExtremities(LineSegmentInt other) { if (p1.equals(other.p1) && p2.equals(other.p2)) { return true; } if (p1.equals(other.p2) && p2.equals(other.p1)) { return true; } return false; } public boolean atLeastOneCommonExtremities(LineSegmentInt other) { if (p1.equals(other.p1)) { return true; } if (p1.equals(other.p2)) { return true; } if (p2.equals(other.p1)) { return true; } if (p2.equals(other.p2)) { return true; } return false; } public Point2DInt getCommonExtremities(LineSegmentInt other) { if (p1.equals(other.p1)) { return p1; } if (p1.equals(other.p2)) { return p1; } if (p2.equals(other.p1)) { return p2; } if (p2.equals(other.p2)) { return p2; } return null; } public Point2DInt getOtherExtremity(Point2DInt extremity1) { if (extremity1 == null) { throw new IllegalArgumentException(); } if (extremity1.equals(p1)) { return p2; } if (extremity1.equals(p2)) { return p1; } throw new IllegalArgumentException(); } // Line2D @Override public Point2DInt getP1() { return p1; } @Override public Point2DInt getP2() { return p2; } @Override public double getX1() { return p1.getXint(); } @Override public double getX2() { return p2.getXint(); } @Override public double getY1() { return p1.getYint(); } @Override public double getY2() { return p2.getYint(); } public Point2DInt getTranslatedPoint(Point2DInt pointToBeTranslated) { final int x = p2.getXint() - p1.getXint(); final int y = p2.getYint() - p1.getYint(); return new Point2DInt(pointToBeTranslated.getXint() + x, pointToBeTranslated.getYint() + y); } public Point2DInt getCenter() { return new Point2DInt((p1.getXint() + p2.getXint()) / 2, (p1.getYint() + p2.getYint()) / 2); } public int getMinX() { return Math.min(p1.getXint(), p2.getXint()); } public int getMaxX() { return Math.max(p1.getXint(), p2.getXint()); } public int getMinY() { return Math.min(p1.getYint(), p2.getYint()); } public int getMaxY() { return Math.max(p1.getYint(), p2.getYint()); } public Point2DInt ortho(Point2D.Double orig, double d) { final double vectX = p2.getY() - p1.getY(); final double vectY = -(p2.getX() - p1.getX()); final double pour = 1.0 * d / 100.0; final double x = orig.x + vectX * pour; final double y = orig.y + vectY * pour; return new Point2DInt((int) Math.round(x), (int) Math.round(y)); } public LineSegmentInt translate(int deltaX, int deltaY) { return new LineSegmentInt(p1.translate(deltaX, deltaY), p2.translate(deltaX, deltaY)); } public LineSegmentInt inflateXAlpha(InflateData inflateData) { final int xpos = inflateData.getPos(); final int inflation = inflateData.getInflation(); if (isHorizontal()) { return new LineSegmentInt(p1.inflateX(inflateData), p2.inflateX(inflateData)); } if (getP1().getXint() == xpos && getP2().getXint() == xpos) { return this.translate(inflation / 2, 0); } if (getP1().getXint() <= xpos && getP2().getXint() <= xpos) { return this; } if (getP1().getXint() >= xpos && getP2().getXint() >= xpos) { return this.translate(inflation, 0); } throw new UnsupportedOperationException(toString() + " " + inflateData); } public LineSegmentInt inflateYAlpha(InflateData inflateData) { final int ypos = inflateData.getPos(); final int inflation = inflateData.getInflation(); if (isVertical()) { return new LineSegmentInt(p1.inflateY(inflateData), p2.inflateY(inflateData)); } if (getP1().getYint() == ypos && getP2().getYint() == ypos) { return this.translate(0, inflation / 2); } if (getP1().getYint() <= ypos && getP2().getYint() <= ypos) { return this; } if (getP1().getYint() >= ypos && getP2().getYint() >= ypos) { return this.translate(0, inflation); } throw new UnsupportedOperationException(); } @Override public Point2DInt getSegIntersection(AbstractLineSegment other) { final Point2D result = super.getSegIntersection(other); if (result == null) { return null; } return new Point2DInt((int) Math.round(result.getX()), (int) Math.round(result.getY())); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/Neighborhood.java000066400000000000000000000060251312650303100256160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; public class Neighborhood { final private double angle1; final private double angle2; final private Point2DInt center; public Neighborhood(Point2DInt center) { this(center, 0, 0); } public boolean is360() { return angle1 == angle2; } public Neighborhood(Point2DInt center, double angle1, double angle2) { this.center = center; this.angle1 = angle1; this.angle2 = angle2; } @Override public String toString() { final int a1 = (int) (angle1 * 180 / Math.PI); final int a2 = (int) (angle2 * 180 / Math.PI); return center + " " + a1 + " " + a2; } public final Point2DInt getCenter() { return center; } public final double getMiddle() { if (is360()) { return angle1 + Math.PI; } double result = (angle1 + angle2) / 2; if (angle2 < angle1) { result += Math.PI; } return result; } public boolean isInAngleStrict(double angle) { if (angle < 0) { throw new IllegalArgumentException(); } if (angle2 > angle1) { return angle > angle1 && angle < angle2; } return angle > angle1 || angle < angle2; } public boolean isInAngleLarge(double angle) { if (angle < 0) { throw new IllegalArgumentException(); } if (angle2 > angle1) { return angle >= angle1 && angle <= angle2; } return angle >= angle1 || angle <= angle2; } public boolean isAngleLimit(double angle) { return angle == angle1 || angle == angle2; } public Orientation getOrientationFrom(double angle) { if (angle1 == angle2) { throw new IllegalStateException(); } if (angle != angle1 && angle != angle2) { throw new IllegalArgumentException("this=" + this + " angle=" + (int) (angle * 180 / Math.PI)); } assert angle == angle1 || angle == angle2; if (angle == angle1) { return Orientation.MATH; } return Orientation.CLOCK; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/Orientation.java000066400000000000000000000024651312650303100255060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; public enum Orientation { CLOCK, MATH }plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/Point2DInt.java000066400000000000000000000055301312650303100251410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.awt.geom.Point2D; public class Point2DInt extends Point2D implements Pointable { private final int x; private final int y; @Override public String toString() { return "(" + x + "," + y + ")"; } public Point2DInt(int x, int y) { this.x = x; this.y = y; } public int getXint() { return x; } public int getYint() { return y; } @Override public double getX() { return x; } @Override public double getY() { return y; } @Override public void setLocation(double x, double y) { throw new UnsupportedOperationException(); } public Point2DInt getPosition() { return this; } public Point2DInt translate(int deltaX, int deltaY) { return new Point2DInt(x + deltaX, y + deltaY); } public Point2DInt inflateX(int xpos, int inflation) { if (inflation % 2 != 0) { throw new IllegalArgumentException(); } if (x < xpos) { return this; } if (x == xpos) { // throw new IllegalArgumentException(); return translate(inflation / 2, 0); } return translate(inflation, 0); } public Point2DInt inflateX(InflateData inflateData) { return inflateX(inflateData.getPos(), inflateData.getInflation()); } public Point2DInt inflateY(InflateData inflateData) { return inflateY(inflateData.getPos(), inflateData.getInflation()); } public Point2DInt inflateY(int ypos, int inflation) { if (inflation % 2 != 0) { throw new IllegalArgumentException(); } if (y < ypos) { return this; } if (y == ypos) { // throw new IllegalArgumentException(); return translate(0, inflation / 2); } return translate(0, inflation); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/Pointable.java000066400000000000000000000025051312650303100251230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; public interface Pointable { Point2DInt getPosition(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/Polyline.java000066400000000000000000000026641312650303100250070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.util.List; public interface Polyline { List segments(); int nbSegments(); boolean doesTouch(Polyline other); double getLength(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/PolylineBreakeable.java000066400000000000000000000103621312650303100267370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class PolylineBreakeable extends AbstractPolyline implements Polyline { static class Breakure { private int d; private int u; public Breakure(int u, int d) { this.u = u; this.d = d; } } private final List breakures = new ArrayList(); public PolylineBreakeable copy(Pointable newStart, Pointable newEnd) { final PolylineBreakeable result = new PolylineBreakeable(newStart, newEnd); result.breakures.addAll(this.breakures); return result; } public PolylineBreakeable(Pointable start, Pointable end) { super(start, end); } public List segments() { if (breakures.size() == 0) { return Collections.singletonList(new LineSegmentInt(getStart().getPosition(), getEnd().getPosition())); } final List result = new ArrayList(); Point2DInt cur = getStart().getPosition(); for (Breakure breakure : breakures) { final Point2DInt next = getBreakurePoint(breakure); result.add(new LineSegmentInt(cur, next)); cur = next; } result.add(new LineSegmentInt(cur, getEnd().getPosition())); assert nbSegments() == result.size(); return Collections.unmodifiableList(result); } private Point2DInt getBreakurePoint(Breakure breakure) { final LineSegmentInt seg = new LineSegmentInt(getStart().getPosition(), getEnd().getPosition()); return seg.ortho(seg.startTranslatedAsVector(breakure.u), breakure.d); } public int nbSegments() { return breakures.size() + 1; } public List getFreedoms() { final List allFreedom = new ArrayList(); for (final Breakure breakure : breakures) { allFreedom.add(new XMoveable() { @Override public String toString() { return super.toString() + " " + PolylineBreakeable.this.toString() + "(d)"; } public void moveX(int delta) { breakure.d += delta; } }); allFreedom.add(new XMoveable() { @Override public String toString() { return super.toString() + " " + PolylineBreakeable.this.toString() + "(u)"; } public void moveX(int delta) { breakure.u += delta; } }); allFreedom.add(new XMoveable() { @Override public String toString() { return super.toString() + " " + PolylineBreakeable.this.toString() + "(ud)"; } public void moveX(int delta) { breakure.u += delta; breakure.d += delta; } }); allFreedom.add(new XMoveable() { @Override public String toString() { return super.toString() + " " + PolylineBreakeable.this.toString() + "(dud)"; } public void moveX(int delta) { breakure.u += delta; breakure.d -= delta; } }); } return Collections.unmodifiableList(allFreedom); } public void insertBetweenPoint(int u, int d) { breakures.add(new Breakure(u, d)); } private void breakMore() { if (breakures.size() == 1) { final Breakure b = breakures.get(0); insertBetweenPoint(b.u / 2, 0); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/PolylineImpl.java000066400000000000000000000061241312650303100256240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; public class PolylineImpl extends AbstractPolyline implements Polyline { final private List intermediates = new ArrayList(); public PolylineImpl(Pointable start, Pointable end) { super(start, end); } public int nbSegments() { return intermediates.size() + 1; } public List segments() { final List result = new ArrayList(); Point2DInt cur = getStart().getPosition(); for (Point2DInt intermediate : intermediates) { result.add(new LineSegmentInt(cur, intermediate)); cur = intermediate; } result.add(new LineSegmentInt(cur, getEnd().getPosition())); return Collections.unmodifiableList(result); } public void addIntermediate(Point2DInt intermediate) { assert intermediates.contains(intermediate) == false; intermediates.add(intermediate); } public void inflate(InflationTransform transform) { // final List segments = segments(); // if (segments.size() == 1) { // return; // } // intermediates.clear(); // if (segments.size() == 2) { // final Point2DInt p = segments.get(0).getP2(); // intermediates.add(transform.inflatePoint2DInt(p)); // } else { // final List segmentsT = transform.inflate(segments); // for (int i = 0; i < segmentsT.size() - 2; i++) { // intermediates.add(segmentsT.get(i).getP2()); // } // // } final List segments = transform.inflate(this.segments()); // Log.println("segments="+segments); intermediates.clear(); for (int i = 1; i < segments.size() - 1; i++) { addIntermediate(segments.get(i).getP1()); } } public final Collection getIntermediates() { return Collections.unmodifiableCollection(intermediates); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/Singularity.java000066400000000000000000000103741312650303100255230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.TreeSet; public class Singularity { private final TreeSet angles = new TreeSet(); final private Point2DInt center; public Singularity(Point2DInt center) { this.center = center; } @Override public String toString() { final StringBuilder sb = new StringBuilder(center.toString()); for (Double a : angles) { final int degree = (int) (a * 180 / Math.PI); sb.append(' '); sb.append(degree); } return sb.toString(); } public void addLineSegment(LineSegmentInt seg) { if (seg.getP1().equals(center)) { angles.add(convertAngle(seg.getAngle())); } else if (seg.getP2().equals(center)) { angles.add(convertAngle(seg.getOppositeAngle())); } else { assert seg.side(center) == 0 : "side=" + seg.side(center) + " center=" + center + " seg=" + seg; assert LineSegmentInt.isBetween(center, seg.getP1(), seg.getP2()); addLineSegment(new LineSegmentInt(center, seg.getP1())); addLineSegment(new LineSegmentInt(center, seg.getP2())); } assert betweenZeroAndTwoPi(); } static double convertAngle(double a) { if (a < 0) { return a + 2 * Math.PI; } return a; } private boolean betweenZeroAndTwoPi() { for (Double d : angles) { assert d >= 0; assert d < 2 * Math.PI; } return true; } List getAngles() { return new ArrayList(angles); } public boolean crossing(Point2DInt direction1, Point2DInt direction2) { final boolean result = crossingInternal(direction1, direction2); assert result == crossingInternal(direction2, direction1); return result; } private boolean crossingInternal(Point2DInt direction1, Point2DInt direction2) { if (angles.size() < 2) { return false; } final double angle1 = convertAngle(new LineSegmentInt(center, direction1).getAngle()); final double angle2 = convertAngle(new LineSegmentInt(center, direction2).getAngle()); Double last = null; for (Double current : angles) { if (last != null) { assert last < current; if (isBetween(angle1, last, current) && isBetween(angle2, last, current)) { return false; } } last = current; } final double first = angles.first(); if ((angle1 <= first || angle1 >= last) && (angle2 <= first || angle2 >= last)) { return false; } return true; } private boolean isBetween(double test, double v1, double v2) { assert v1 < v2; return test >= v1 && test <= v2; } protected final Point2DInt getCenter() { return center; } public void merge(Singularity other) { this.angles.addAll(other.angles); } public List getNeighborhoods() { if (angles.size() == 0) { return Collections.singletonList(new Neighborhood(center)); } final List result = new ArrayList(); double last = angles.last(); for (Double currentAngle : angles) { result.add(new Neighborhood(center, last, currentAngle)); last = currentAngle; } return Collections.unmodifiableList(result); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/SpiderWeb.java000066400000000000000000000126661312650303100251030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; import java.util.ArrayList; import java.util.Collection; import java.util.List; import net.sourceforge.plantuml.Log; public class SpiderWeb { private final int pointsInCircle = 16; private int nbRow; private int nbCol; final private int widthCell; final private int heightCell; final private int xMargin = 50; final private int yMargin = 50; private final List lines = new ArrayList(); public SpiderWeb(int widthCell, int heightCell) { Log.info("widthCell=" + widthCell + " heightCell=" + heightCell); this.widthCell = widthCell; this.heightCell = heightCell; } public Point2DInt getMainPoint(int row, int col) { return new Point2DInt(col * (widthCell + xMargin), row * (heightCell + yMargin)); } public Collection getHangPoints(int row, int col) { // final double dist = Math.pow(1.6, -row - 10) + Math.pow(1.5, -col - // 10); assert pointsInCircle % 4 == 0; final List result = new ArrayList(); final int dist = (int) Math.round(Math.sqrt(widthCell * widthCell + heightCell * heightCell) / 10); for (int i = 0; i < pointsInCircle; i++) { final Point2DInt main = getMainPoint(row, col); final int x = main.getXint(); final int y = main.getYint(); if (i == 0) { result.add(new Point2DInt(x + dist, y)); } else if (i == pointsInCircle / 4) { result.add(new Point2DInt(x, y + dist)); } else if (i == 2 * pointsInCircle / 4) { result.add(new Point2DInt(x - dist, y)); } else if (i == 3 * pointsInCircle / 4) { result.add(new Point2DInt(x, y - dist)); } else { final double angle = Math.PI * 2.0 * i / pointsInCircle; final double x1 = x + dist * Math.cos(angle); final double y1 = y + dist * Math.sin(angle); result.add(new Point2DInt((int) Math.round(x1), (int) Math.round(y1))); } } // Log.println("getHangPoints="+result); return result; } public PolylineBreakeable addPolyline(int row1, int col1, int row2, int col2) { // Log.println("SpiderWeb : adding " + row1 + "," + col1 + " - " // + row2 + "," + col2); final PolylineBreakeable result = computePolyline(row1, col1, row2, col2); // Log.println("SpiderWeb : adding " + result); if (result != null) { lines.add(result); } return result; } private PolylineBreakeable computePolyline(int row1, int col1, int row2, int col2) { if (row1 > nbRow) { nbRow = row1; } if (row2 > nbRow) { nbRow = row2; } if (col1 > nbCol) { nbCol = col1; } if (col2 > nbCol) { nbCol = col2; } if (directLinkPossibleForGeometry(row1, col1, row2, col2)) { // Log.println("Geom OK"); final PolylineBreakeable direct = new PolylineBreakeable(getMainPoint(row1, col1), getMainPoint(row2, col2)); if (isCompatible(direct)) { // Log.println("Direct OK"); return direct; } } return bestLevel1Line(row1, col1, row2, col2); } private boolean isCompatible(PolylineBreakeable toTest) { for (PolylineBreakeable p : lines) { if (p.doesTouch(toTest)) { return false; } } return true; } private PolylineBreakeable bestLevel1Line(int row1, int col1, int row2, int col2) { PolylineBreakeable result = null; for (int u = 5; u <= 95; u += 5) { for (int d = -200; d <= 200; d += 5) { final PolylineBreakeable cur = new PolylineBreakeable(getMainPoint(row1, col1), getMainPoint(row2, col2)); cur.insertBetweenPoint(u, d); if ((result == null || cur.getLength() < result.getLength()) && isCompatible(cur)) { result = cur; } } } return result; } boolean directLinkPossibleForGeometry(int row1, int col1, int row2, int col2) { final int rowMin = Math.min(row1, row2); final int rowMax = Math.max(row1, row2); final int colMin = Math.min(col1, col2); final int colMax = Math.max(col1, col2); final LineSegmentInt seg = new LineSegmentInt(col1, row1, col2, row2); for (int r = rowMin; r <= rowMax; r++) { for (int c = colMin; c <= colMax; c++) { if (r == row1 && c == col1) { continue; } if (r == row2 && c == col2) { continue; } if (seg.containsPoint(new Point2DInt(c, r))) { return false; } } } return true; } final int getPointsInCircle() { return pointsInCircle; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/XMoveable.java000066400000000000000000000025031312650303100250660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom; public interface XMoveable { void moveX(int delta); }plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/kinetic/000077500000000000000000000000001312650303100237675ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/kinetic/Frame.java000066400000000000000000000054631312650303100256740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom.kinetic; import java.awt.geom.Point2D; import net.sourceforge.plantuml.geom.LineSegmentDouble; public class Frame { private double x; private double y; private final int width; private final int height; public Frame(double x, double y, int width, int height) { this.x = x; this.y = y; this.width = width; this.height = height; } LineSegmentDouble getSide1() { return new LineSegmentDouble(x, y, x, y + height); } LineSegmentDouble getSide2() { return new LineSegmentDouble(x, y, x + width, y); } LineSegmentDouble getSide3() { return new LineSegmentDouble(x + width, y, x + width, y + height); } LineSegmentDouble getSide4() { return new LineSegmentDouble(x, y + height, x + width, y + height); } public Point2D getFrontierPointViewBy(Point2D point) { final LineSegmentDouble seg = new LineSegmentDouble(point, getCenter()); Point2D p = seg.getSegIntersection(getSide1()); if (p != null) { return p; } p = seg.getSegIntersection(getSide2()); if (p != null) { return p; } p = seg.getSegIntersection(getSide3()); if (p != null) { return p; } p = seg.getSegIntersection(getSide4()); if (p != null) { return p; } return null; } private Point2D getCenter() { return new Point2D.Double(x + width / 2.0, y + height / 2.0); } public Point2D getMainCorner() { return new Point2D.Double(x, y); } public final double getX() { return x; } public final double getY() { return y; } public final int getWidth() { return width; } public final int getHeight() { return height; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/kinetic/MoveObserver.java000066400000000000000000000025451312650303100272560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom.kinetic; public interface MoveObserver { public void pointMoved(Point2DCharge point); } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/kinetic/Path.java000066400000000000000000000116701312650303100255330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom.kinetic; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; public class Path { private final Frame frame1; private final Frame frame2; private final List points1 = new ArrayList(); // private final Map points2 = new // HashMap(1000, (float).01); private final Map points2 = new HashMap(); public Path(Frame f1, Frame f2) { if (f1 == null || f2 == null) { throw new IllegalArgumentException(); } this.frame1 = f1; this.frame2 = f2; updateCharges(); } @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append(frame1.getMainCorner()); for (Point2DCharge p : points1) { sb.append(' '); sb.append(p); } sb.append(frame2.getMainCorner()); return sb.toString(); } private void updateCharges() { for (Point2DCharge pt : points1) { // pt.setCharge(1.0 / points1.size()); pt.setCharge(1.0); } } private static final double MINDIST = 30; public void renderContinue() { final List newPoints = new ArrayList(); Point2D cur = frame1.getMainCorner(); for (Point2DCharge pc : points1) { final SegmentCutter segmentCutter = new SegmentCutter(cur, pc, MINDIST); newPoints.addAll(segmentCutter.intermediates()); cur = pc; } final SegmentCutter segmentCutter = new SegmentCutter(cur, frame2.getMainCorner(), MINDIST); final List in = segmentCutter.intermediates(); newPoints.addAll(in.subList(0, in.size() - 1)); points1.clear(); points2.clear(); for (Point2D pt : newPoints) { addIntermediate(new Point2DCharge(pt.getX(), pt.getY())); } } public List segments() { final List result = new ArrayList(); Point2D cur = frame1.getMainCorner(); for (Point2D pt : points1) { result.add(new Line2D.Double(cur, pt)); cur = pt; } result.add(new Line2D.Double(cur, frame2.getMainCorner())); return Collections.unmodifiableList(result); } public void addIntermediate(Point2DCharge point) { assert points1.size() == points2.size(); assert points1.contains(point) == false; assert points2.containsKey(point) == false; assert containsPoint2DCharge(point) == false; points1.add(point); points2.put(point, points2.size()); assert points1.size() == points2.size(); assert points1.contains(point); assert points2.containsKey(point); assert containsPoint2DCharge(point); updateCharges(); } public VectorForce getElasticForce(Point2DCharge point) { final int idx = points1.indexOf(point); if (idx == -1) { throw new UnsupportedOperationException(); } final Point2D before = getPosition(idx - 1); final Point2D after = getPosition(idx + 1); final VectorForce f1 = new VectorForce(point, before); final VectorForce f2 = new VectorForce(point, after); return f1.plus(f2).multiply(0.2); // return new VectorForce(0, 0); } private Point2D getPosition(int idx) { if (idx == -1) { return frame1.getMainCorner(); } if (idx == points1.size()) { return frame2.getMainCorner(); } return points1.get(idx); } public boolean containsPoint2DCharge(Point2DCharge p) { assert points1.contains(p) == points2.containsKey(p) : "p=" + p + "v1=" + points1.contains(p) + "v2=" + points2.containsKey(p) + " points1=" + points1 + " points2=" + points2; return points2.containsKey(p); } public final Collection getPoints() { assert points1.size() == points2.size(); return Collections.unmodifiableCollection(points1); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/kinetic/Point2DCharge.java000066400000000000000000000050731312650303100272300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom.kinetic; import java.awt.geom.Point2D; import net.sourceforge.plantuml.Log; public class Point2DCharge extends Point2D.Double { private double charge = 1.0; private MoveObserver moveObserver = null; public Point2DCharge(double x, double y) { super(x, y); } public Point2DCharge(Point2D pt, double ch) { super(pt.getX(), pt.getY()); this.charge = ch; } public void apply(VectorForce value) { Log.println("Applying " + value); x += value.getX(); y += value.getY(); if (moveObserver != null) { moveObserver.pointMoved(this); } } @Override final public void setLocation(double x, double y) { throw new UnsupportedOperationException(); } @Override final public void setLocation(Point2D p) { throw new UnsupportedOperationException(); } @Override public String toString() { return System.identityHashCode(this) + " " + String.format("[%8.2f %8.2f]", x, y); } public final double getCharge() { return charge; } public final void setCharge(double charge) { this.charge = charge; } private final int hash = System.identityHashCode(this); @Override public int hashCode() { return hash; } @Override public boolean equals(Object obj) { return this == obj; } public final void setMoveObserver(MoveObserver moveObserver) { this.moveObserver = moveObserver; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/kinetic/Quadrant.java000066400000000000000000000044131312650303100264130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom.kinetic; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; public class Quadrant { static final private int SIZE = 100; private final int x; private final int y; public Quadrant(int x, int y) { this.x = x; this.y = y; } public Quadrant(Point2DCharge pt) { this((int) pt.getX() / SIZE, (int) pt.getY() / SIZE); } @Override public boolean equals(Object obj) { final Quadrant other = (Quadrant) obj; return x == other.x && y == other.y; } @Override public int hashCode() { return x * 3571 + y; } @Override public String toString() { return "" + x + "-" + y; } public Collection neighbourhood() { final Collection result = Arrays.asList(new Quadrant(x - 1, y - 1), new Quadrant(x, y - 1), new Quadrant(x + 1, y - 1), new Quadrant(x - 1, y), this, new Quadrant(x + 1, y), new Quadrant(x - 1, y + 1), new Quadrant(x, y + 1), new Quadrant(x + 1, y + 1)); assert new HashSet(result).size() == 9; return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/kinetic/QuadrantMapper.java000066400000000000000000000065231312650303100275640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom.kinetic; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; public class QuadrantMapper { private final Map quadrants = new HashMap(); private final Map> setOfPoints = new HashMap>(); public void addPoint(Point2DCharge pt) { if (quadrants.containsKey(pt)) { throw new IllegalArgumentException(); } final Quadrant q = new Quadrant(pt); quadrants.put(pt, q); getSetOfPoints(q).add(pt); assert getSetOfPoints(q).contains(pt); assert getSetOfPoints(new Quadrant(pt)).contains(pt); } public Set getAllPoints(Quadrant qt) { return Collections.unmodifiableSet(getSetOfPoints(qt)); } public Set getAllPoints() { assert quadrants.keySet().equals(mergeOfSetOfPoints()); return Collections.unmodifiableSet(quadrants.keySet()); } private Set mergeOfSetOfPoints() { final Set result = new HashSet(); for (Set set : setOfPoints.values()) { assert Collections.disjoint(set, result); result.addAll(set); } return result; } public void updatePoint(Point2DCharge pt) { final Quadrant newQ = new Quadrant(pt); final Quadrant old = quadrants.get(pt); assert getSetOfPoints(old).contains(pt); if (old.equals(newQ) == false) { assert getSetOfPoints(newQ).contains(pt) == false; assert getSetOfPoints(old).contains(pt); final boolean remove = getSetOfPoints(old).remove(pt); assert remove; final boolean add = getSetOfPoints(newQ).add(pt); assert add; assert getSetOfPoints(newQ).contains(pt); assert getSetOfPoints(old).contains(pt) == false; quadrants.put(pt, newQ); } assert getSetOfPoints(new Quadrant(pt)).contains(pt); } private HashSet getSetOfPoints(Quadrant q) { HashSet result = setOfPoints.get(q); if (result == null) { result = new HashSet(); setOfPoints.put(q, result); } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/kinetic/SegmentCutter.java000066400000000000000000000041111312650303100274200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom.kinetic; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collections; import java.util.List; class SegmentCutter { private final List intermediates = new ArrayList(); public SegmentCutter(Point2D start, Point2D end, double maxDistance) { final double d = end.distance(start); if (d <= maxDistance) { intermediates.add(end); return; } int nb = 2; while (d / nb > maxDistance) { nb++; } final double deltaX = end.getX() - start.getX(); final double deltaY = end.getY() - start.getY(); for (int i = 1; i < nb; i++) { intermediates.add(new Point2D.Double(start.getX() + i * deltaX / nb, start.getY() + i * deltaY / nb)); } intermediates.add(end); } public List intermediates() { return Collections.unmodifiableList(intermediates); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/kinetic/VectorForce.java000066400000000000000000000051361312650303100270600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom.kinetic; import java.awt.geom.Point2D; public class VectorForce { private final double x; private final double y; public VectorForce(double x, double y) { if (Double.isNaN(x) || Double.isNaN(y) || Double.isInfinite(x) || Double.isInfinite(y)) { throw new IllegalArgumentException(); } this.x = x; this.y = y; } public VectorForce(Point2D src, Point2D dest) { this(dest.getX() - src.getX(), dest.getY() - src.getY()); } public VectorForce plus(VectorForce other) { return new VectorForce(this.x + other.x, this.y + other.y); } public VectorForce multiply(double v) { return new VectorForce(x * v, y * v); } @Override public String toString() { return String.format("{%8.2f %8.2f}", x, y); } public VectorForce negate() { return new VectorForce(-x, -y); } public double length() { return Math.sqrt(x * x + y * y); } public VectorForce normaliseTo(double newLength) { if (Double.isInfinite(newLength) || Double.isNaN(newLength)) { throw new IllegalArgumentException(); } final double actualLength = length(); if (actualLength == 0) { return this; } final double f = newLength / actualLength; return new VectorForce(x * f, y * f); } public final double getX() { return x; } public final double getY() { return y; } public double getLength() { return Math.sqrt(x * x + y * y); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/geom/kinetic/World.java000066400000000000000000000121201312650303100257150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.geom.kinetic; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; public class World implements MoveObserver { private final List paths = new ArrayList(); private final Map pathOfPoints = new HashMap(); private final List frames = new ArrayList(); public void addFrame(Frame frame) { this.frames.add(frame); } public void addPath(Path path) { this.paths.add(path); } public VectorForce getElectricForce(Point2DCharge point) { VectorForce result = new VectorForce(0, 0); final Quadrant quadrant = new Quadrant(point); for (Quadrant q : quadrant.neighbourhood()) { for (Point2DCharge pc2 : quadrantMapper.getAllPoints(q)) { final Path path = pathOfPoints.get(pc2); if (path.containsPoint2DCharge(point)) { continue; } result = result.plus(getElectricForce(point, pc2)); } } return result; } private VectorForce getElectricForceSlow(Point2DCharge point) { VectorForce result = new VectorForce(0, 0); for (Path path : paths) { if (path.containsPoint2DCharge(point)) { continue; } for (Point2DCharge pc2 : path.getPoints()) { result = result.plus(getElectricForce(point, pc2)); } } return result; } static private VectorForce getElectricForce(Point2DCharge onThis, Point2DCharge byThis) { final double dist = onThis.distance(byThis); if (dist == 0) { return new VectorForce(0, 0); } final VectorForce result = new VectorForce(byThis.getX() - onThis.getX(), byThis.getY() - onThis.getY()); final double v = 100.0 * onThis.getCharge() * byThis.getCharge() / dist / dist; return result.normaliseTo(v); } static private VectorForce getAtomicForce(Point2DCharge onThis, Point2DCharge byThis) { final double dist = onThis.distance(byThis); if (dist == 0) { return new VectorForce(0, 0); } final VectorForce result = new VectorForce(byThis.getX() - onThis.getX(), byThis.getY() - onThis.getY()); double v = 1000 / dist / dist / dist; if (v > 5) { v = 5; } return result.normaliseTo(v); } Map getForces() { final Map result = new LinkedHashMap(); for (Path path : paths) { for (Point2DCharge pt : path.getPoints()) { // final VectorForce elastic = new VectorForce(0, 0); // final VectorForce elect = new VectorForce(0, 0); final VectorForce elastic = path.getElasticForce(pt); final VectorForce elect = getElectricForce(pt); VectorForce force = elastic.plus(elect); for (Frame f : frames) { final Point2D inter = f.getFrontierPointViewBy(pt); if (inter != null) { final Point2DCharge pchar = new Point2DCharge(inter, 1); force = force.plus(getAtomicForce(pt, pchar)); } } result.put(pt, force); } } return result; } public double onePass() { double result = 0; final Map forces = getForces(); for (Map.Entry ent : forces.entrySet()) { final VectorForce force = ent.getValue(); result += force.getLength(); ent.getKey().apply(force); } return result; } public final Collection getPaths() { return Collections.unmodifiableCollection(paths); } private QuadrantMapper quadrantMapper; public void renderContinue() { quadrantMapper = new QuadrantMapper(); pathOfPoints.clear(); for (Path path : paths) { path.renderContinue(); } for (Path path : paths) { for (Point2DCharge pt : path.getPoints()) { pt.setMoveObserver(this); quadrantMapper.addPoint(pt); pathOfPoints.put(pt, path); } } } public void pointMoved(Point2DCharge point) { quadrantMapper.updatePoint(point); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/golem/000077500000000000000000000000001312650303100225155ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/golem/Magnet.java000066400000000000000000000024441312650303100245770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.golem; public class Magnet { } plantuml-1.2017.15/src/net/sourceforge/plantuml/golem/MinMaxDouble.java000066400000000000000000000036711312650303100257130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.golem; public class MinMaxDouble { private double minX = Double.MAX_VALUE; private double minY = Double.MAX_VALUE; private double maxX = -Double.MAX_VALUE; private double maxY = -Double.MAX_VALUE; public void manage(double x, double y) { if (x < minX) { minX = x; } if (y < minY) { minY = y; } if (x > maxX) { maxX = x; } if (y > maxY) { maxY = y; } } public double getMinX() { return minX; } public double getMinY() { return minY; } public double getMaxX() { return maxX; } public double getMaxY() { return maxY; } public double getWidth() { return maxX - minX + 1; } public double getHeight() { return maxY - minY + 1; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/golem/MinMaxGolem.java000066400000000000000000000037211312650303100255400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.golem; public class MinMaxGolem { private int minX = Integer.MAX_VALUE; private int minY = Integer.MAX_VALUE; private int maxX = Integer.MIN_VALUE; private int maxY = Integer.MIN_VALUE; public void manage(int x, int y) { if (x < minX) { minX = x; } if (y < minY) { minY = y; } if (x > maxX) { maxX = x; } if (y > maxY) { maxY = y; } } public void manage(Position position) { manage(position.getXmin(), position.getYmin()); manage(position.getXmax(), position.getYmax()); } public int getMinX() { return minX; } public int getMinY() { return minY; } public int getWidth() { return maxX - minX + 1; } public int getHeight() { return maxY - minY + 1; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/golem/Path.java000066400000000000000000000033201312650303100242520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.golem; import java.util.ArrayList; import java.util.List; public class Path { private final List all = new ArrayList(); public static Path build(TileArea start, TileArea dest) { return new Path(start, dest); } private Path(TileArea start, TileArea dest) { this.all.add(start); this.all.add(dest); } public TileArea getStart() { return all.get(0); } public TileArea getDest() { return all.get(all.size() - 1); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/golem/Position.java000066400000000000000000000056741312650303100252000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.golem; public class Position { private final int xmin; private final int ymin; private final int xmax; private final int ymax; public Position(int xmin, int ymin, int xmax, int ymax) { this.xmin = xmin; this.ymin = ymin; this.xmax = xmax; this.ymax = ymax; } @Override public boolean equals(Object o) { final Position other = (Position) o; return this.xmin == other.xmin && this.xmax == other.xmax && this.ymin == other.ymin && this.ymax == other.ymax; } @Override public int hashCode() { return xmin + ymin << 8 + xmax << 16 + ymax << 24; } @Override public String toString() { return "(" + xmin + "," + ymin + ")-(" + xmax + "," + ymax + ")"; } public Position move(TileGeometry position, int sizeMove) { if (position == null || position == TileGeometry.CENTER) { throw new IllegalArgumentException(); } switch (position) { case NORTH: return new Position(xmin, ymin - sizeMove, xmax, ymax - sizeMove); case SOUTH: return new Position(xmin, ymin + sizeMove, xmax, ymax + sizeMove); case WEST: return new Position(xmin - sizeMove, ymin, xmax - sizeMove, ymax); case EAST: return new Position(xmin + sizeMove, ymin, xmax + sizeMove, ymax); default: throw new IllegalStateException(); } } public int getXmin() { return xmin; } public int getXmax() { return xmax; } public int getYmin() { return ymin; } public int getYmax() { return ymax; } public int getCenterX() { if ((xmin + xmax + 1) % 2 != 0) { throw new IllegalStateException(); } return (xmin + xmax + 1) / 2; } public int getCenterY() { if ((ymin + ymax + 1) % 2 != 0) { throw new IllegalStateException(); } return (ymin + ymax + 1) / 2; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/golem/Square.java000066400000000000000000000024441312650303100246240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.golem; public class Square { } plantuml-1.2017.15/src/net/sourceforge/plantuml/golem/Tile.java000066400000000000000000000075111312650303100242610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.golem; import java.awt.Font; import java.awt.geom.Dimension2D; import java.util.Collections; import java.util.EnumMap; import java.util.Map; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.SpriteContainerEmpty; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Tile extends AbstractTextBlock implements TextBlock { private static double SIZE = 40; private final int num; private final UFont numberFont = UFont.monospaced(11); private final FontConfiguration fc = FontConfiguration.blackBlueTrue(numberFont); private final Map geometries; Tile(int num) { this.num = num; final Map tmp = new EnumMap(TileGeometry.class); for (TileGeometry g : TileGeometry.values()) { tmp.put(g, new TileArea(this, g)); } this.geometries = Collections.unmodifiableMap(tmp); } public TileArea getArea(TileGeometry geometry) { return this.geometries.get(geometry); } public void drawU(UGraphic ug) { ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK)); final TextBlock n = Display.create("" + num).create(fc, HorizontalAlignment.LEFT, new SpriteContainerEmpty()); final Dimension2D dimNum = n.calculateDimension(ug.getStringBounder()); final Dimension2D dimTotal = calculateDimension(ug.getStringBounder()); final double diffx = dimTotal.getWidth() - dimNum.getWidth(); final double diffy = dimTotal.getHeight() - dimNum.getHeight(); final double radius = Math.max(dimNum.getWidth(), dimNum.getHeight()); final double diffx2 = dimTotal.getWidth() - radius; final double diffy2 = dimTotal.getHeight() - radius; n.drawU(ug.apply(new UTranslate((diffx / 2), (diffy / 2)))); ug.draw(new URectangle(SIZE, SIZE)); ug.apply(new UTranslate(diffx2 / 2, diffy2 / 2)).draw(new UEllipse(radius, radius)); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(SIZE, SIZE); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/golem/TileArea.java000066400000000000000000000030611312650303100250460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.golem; public class TileArea { private final Tile tile; private final TileGeometry position; TileArea(Tile tile, TileGeometry position) { this.tile = tile; this.position = position; } public Tile getTile() { return tile; } public TileGeometry getGeometry() { return position; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/golem/TileGeometry.java000066400000000000000000000036361312650303100260010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.golem; import net.sourceforge.plantuml.StringUtils; public enum TileGeometry { NORTH, SOUTH, EAST, WEST, CENTER; public TileGeometry opposite() { switch (this) { case NORTH: return SOUTH; case SOUTH: return NORTH; case EAST: return WEST; case WEST: return EAST; case CENTER: default: throw new UnsupportedOperationException(); } } public static TileGeometry fromString(String s) { final char c = StringUtils.goUpperCase(s.charAt(0)); switch (c) { case 'N': return NORTH; case 'S': return SOUTH; case 'E': return EAST; case 'W': return WEST; default: throw new IllegalArgumentException(); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/golem/TilesField.java000066400000000000000000000214151312650303100254070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.golem; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TilesField extends AbstractTextBlock implements TextBlock { private int size = 1; private final Tile root = new Tile(0); private final Map positions = new HashMap(); private final List paths = new ArrayList(); public TilesField() { positions.put(root, new Position(0, 0, 1, 1)); } public Tile getRoot() { return root; } public Tile createTile(Tile start, TileGeometry position) { final Tile result = new Tile(size++); final Position p = getFreePosition(start, position); positions.put(result, p); paths.add(buildPath(start.getArea(position), result.getArea(position.opposite()))); return result; } public void addPath(Tile start, Tile dest, TileGeometry startDirection) { paths.add(buildPath(start.getArea(startDirection), dest.getArea(startDirection.opposite()))); } private Path buildPath(TileArea tileArea1, TileArea tileArea2) { if (isAdjoining(tileArea1, tileArea2)) { return Path.build(tileArea1, tileArea2); } final Tile tile1 = tileArea1.getTile(); final Tile tile2 = tileArea2.getTile(); final Position pos1 = getPosition(tile1); final Position pos2 = getPosition(tile2); final TileGeometry geom1 = tileArea1.getGeometry(); final TileGeometry geom2 = tileArea2.getGeometry(); if (pos1.getYmin() == pos2.getYmin() && pos1.getYmax() == pos2.getYmax() && geom1 == TileGeometry.WEST && geom2 == TileGeometry.EAST) { return Path.build(tileArea1, tileArea2); } throw new IllegalArgumentException(); } private boolean isAdjoining(TileArea tileArea1, TileArea tileArea2) { final Tile tile1 = tileArea1.getTile(); final Tile tile2 = tileArea2.getTile(); final Position pos1 = getPosition(tile1); final Position pos2 = getPosition(tile2); final TileGeometry geom1 = tileArea1.getGeometry(); final TileGeometry geom2 = tileArea2.getGeometry(); if (pos1.equals(pos2)) { assert tile1 == tile2; if (geom1 == geom2) { throw new IllegalArgumentException(); } return true; } if (geom1.equals(geom2.opposite()) == false) { return false; } switch (geom1) { case EAST: return pos1.getYmin() == pos2.getYmin() && pos1.getYmax() == pos2.getYmax() && pos1.getXmax() + 1 == pos2.getXmin(); case WEST: return pos1.getYmin() == pos2.getYmin() && pos1.getYmax() == pos2.getYmax() && pos1.getXmin() == pos2.getXmax() + 1; case SOUTH: return pos1.getXmin() == pos2.getXmin() && pos1.getXmax() == pos2.getXmax() && pos1.getYmax() + 1 == pos2.getYmin(); case NORTH: return pos1.getXmin() == pos2.getXmin() && pos1.getXmax() == pos2.getXmax() && pos1.getYmin() == pos2.getYmax() + 1; case CENTER: return false; default: throw new IllegalStateException(); } } private Tile getTileAt(Position p) { for (Map.Entry ent : positions.entrySet()) { if (p.equals(ent.getValue())) { return ent.getKey(); } } return null; } private Position getFreePosition(Tile start, TileGeometry position) { final Position p = getPosition(start).move(position, 2); while (isOccuped(p)) { // p = p.move(TileGeometry.EAST, 2); moveAllToEast(p); } return p; } private void moveAllToEast(Position startingPosition) { final List toMove = new ArrayList(); for (Position p : positions.values()) { if (p.getXmax() < startingPosition.getXmin()) { continue; } if (p.getYmax() < startingPosition.getYmin()) { continue; } toMove.add(p); } for (Position p : toMove) { positions.put(getTileAt(p), p.move(TileGeometry.EAST, 2)); } } private boolean isOccuped(Position test) { for (Position p : positions.values()) { if (p.equals(test)) { return true; } } return false; } public Position getPosition(Tile tile) { final Position result = positions.get(tile); if (result == null) { throw new IllegalArgumentException(); } return result; } private int getXmin() { int result = Integer.MAX_VALUE; for (Position p : positions.values()) { final int v = p.getXmin(); if (v < result) { result = v; } } return result; } private int getYmin() { int result = Integer.MAX_VALUE; for (Position p : positions.values()) { final int v = p.getYmin(); if (v < result) { result = v; } } return result; } private int getXmax() { int result = Integer.MIN_VALUE; for (Position p : positions.values()) { final int v = p.getXmax(); if (v > result) { result = v; } } return result; } private int getYmax() { int result = Integer.MIN_VALUE; for (Position p : positions.values()) { final int v = p.getYmax(); if (v > result) { result = v; } } return result; } public List getPaths() { return Collections.unmodifiableList(paths); } // ----------- public void drawU(UGraphic ug) { double x = 0; double y = 0; final int xmin = getXmin(); final int ymin = getYmin(); final Dimension2D dimSingle = root.calculateDimension(ug.getStringBounder()); x -= xmin * dimSingle.getWidth() / 2; y -= ymin * dimSingle.getHeight() / 2; for (Map.Entry ent : positions.entrySet()) { final Position p = ent.getValue(); final Tile t = ent.getKey(); final double xt = p.getXmin() * dimSingle.getWidth() / 2; final double yt = p.getYmin() * dimSingle.getHeight() / 2; t.drawU(ug.apply(new UTranslate((x + xt), (y + yt)))); } ug = ug.apply(new UChangeColor(HtmlColorUtils.RED)); for (Path p : paths) { final TileArea start = p.getStart(); final TileArea dest = p.getDest(); final Point2D pstart = getPoint2D(dimSingle, start); final Point2D pdest = getPoint2D(dimSingle, dest); ug.apply(new UTranslate(x + pstart.getX(), y + pstart.getY())).draw(new ULine(pdest.getX() - pstart.getX(), pdest.getY() - pstart.getY())); } } private Point2D getPoint2D(Dimension2D dimSingle, TileArea area) { final Position p = getPosition(area.getTile()); double xt = p.getXmin() * dimSingle.getWidth() / 2; double yt = p.getYmin() * dimSingle.getHeight() / 2; xt += dimSingle.getWidth() / 2; yt += dimSingle.getHeight() / 2; final double coef = 0.33; switch (area.getGeometry()) { case NORTH: yt -= dimSingle.getHeight() * coef; break; case SOUTH: yt += dimSingle.getHeight() * coef; break; case EAST: xt += dimSingle.getWidth() * coef; break; case WEST: xt -= dimSingle.getWidth() * coef; break; default: throw new IllegalStateException(); } return new Point2D.Double(xt, yt); } public Dimension2D calculateDimension(StringBounder stringBounder) { final int xmin = getXmin(); final int xmax = getXmax(); final int ymin = getYmin(); final int ymax = getYmax(); final int width = (xmax - xmin) / 2 + 1; final int height = (ymax - ymin) / 2 + 1; final Dimension2D dimSingle = root.calculateDimension(stringBounder); return new Dimension2DDouble(width * dimSingle.getWidth(), height * dimSingle.getHeight()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/000077500000000000000000000000001312650303100225135ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/ALink.java000066400000000000000000000026061312650303100243600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; public interface ALink { int getDiffHeight(); ANode getNode1(); ANode getNode2(); public Object getUserData(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/ALinkImpl.java000066400000000000000000000036021312650303100251770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; public class ALinkImpl implements ALink { private final ANode node1; private final ANode node2; private final Object userData; private final int diffHeight; @Override public String toString() { return "" + node1 + " -> " + node2; } public ALinkImpl(ANode n1, ANode n2, int diffHeight, Object userData) { this.node1 = n1; this.node2 = n2; this.userData = userData; this.diffHeight = diffHeight; } public int getDiffHeight() { return diffHeight; } public ANode getNode1() { return node1; } public ANode getNode2() { return node2; } public final Object getUserData() { return userData; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/ANode.java000066400000000000000000000026031312650303100243450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; public interface ANode { void setRow(int row); int getRow(); String getCode(); public Object getUserData(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/ANodeImpl.java000066400000000000000000000035601312650303100251720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; public class ANodeImpl implements ANode { private int row = Integer.MIN_VALUE; private final String code; private Object userData; public ANodeImpl(String code) { this.code = code; } @Override public int hashCode() { return code.hashCode(); } public int getRow() { return row; } public void setRow(int row) { this.row = row; } public final String getCode() { return code; } @Override public String toString() { return code + " " + getRow(); } public Object getUserData() { return userData; } public void setUserData(Object userData) { this.userData = userData; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/AbstractEntityImage.java000066400000000000000000000061731312650303100272700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.awt.Font; import java.awt.Graphics2D; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UFont; abstract class AbstractEntityImage { private final IEntity entity; final private HtmlColor red = HtmlColorUtils.MY_RED; final private HtmlColor yellow = HtmlColorUtils.MY_YELLOW; private final HtmlColor yellowNote = HtmlColorUtils.COL_FBFB77; final private UFont font14 = UFont.sansSerif(14); final private UFont font17 = UFont.courier(17).bold(); final private HtmlColor green = HtmlColorUtils.COL_ADD1B2; final private HtmlColor violet = HtmlColorUtils.COL_B4A7E5; final private HtmlColor blue = HtmlColorUtils.COL_A9DCDF; final private HtmlColor rose = HtmlColorUtils.COL_EB937F; public AbstractEntityImage(IEntity entity) { if (entity == null) { throw new IllegalArgumentException("entity null"); } this.entity = entity; } public abstract Dimension2D getDimension(StringBounder stringBounder); public abstract void draw(ColorMapper colorMapper, Graphics2D g2d); protected final IEntity getEntity() { return entity; } protected final HtmlColor getRed() { return red; } protected final HtmlColor getYellow() { return yellow; } protected final UFont getFont17() { return font17; } protected final UFont getFont14() { return font14; } protected final HtmlColor getGreen() { return green; } protected final HtmlColor getViolet() { return violet; } protected final HtmlColor getBlue() { return blue; } protected final HtmlColor getRose() { return rose; } protected final HtmlColor getYellowNote() { return yellowNote; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/Board.java000066400000000000000000000157321312650303100244150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; public class Board { private final List links; private final Map initialDirection; private final Map nodesCols = new LinkedHashMap(); private int hashcodeValue; private boolean hashcodeComputed = false; private Board(Board old) { this.links = old.links; this.initialDirection = old.initialDirection; this.nodesCols.putAll(old.nodesCols); } public Comparator getLinkComparator() { return new LenghtLinkComparator(nodesCols); } public boolean equals(Object o) { final Board other = (Board) o; if (this.links != other.links) { return false; } final Iterator it1 = this.nodesCols.values().iterator(); final Iterator it2 = other.nodesCols.values().iterator(); assert this.nodesCols.size() == other.nodesCols.size(); while (it1.hasNext()) { if (it1.next().equals(it2.next()) == false) { return false; } } return true; } @Override public int hashCode() { if (this.hashcodeComputed) { return this.hashcodeValue; } this.hashcodeValue = 13; for (Integer i : nodesCols.values()) { this.hashcodeValue = this.hashcodeValue * 17 + i; } this.hashcodeComputed = true; return this.hashcodeValue; } public void normalize() { int minRow = Integer.MAX_VALUE; int minCol = Integer.MAX_VALUE; int maxRow = Integer.MIN_VALUE; int maxCol = Integer.MIN_VALUE; for (Map.Entry ent : nodesCols.entrySet()) { minRow = Math.min(minRow, ent.getKey().getRow()); maxRow = Math.max(maxRow, ent.getKey().getRow()); minCol = Math.min(minCol, ent.getValue()); maxCol = Math.max(maxCol, ent.getValue()); } for (Map.Entry ent : nodesCols.entrySet()) { if (minRow != 0) { ent.getKey().setRow(ent.getKey().getRow() - minRow); } if (minCol != 0) { ent.setValue(ent.getValue() - minCol); } } } private void normalizeCol() { final int minCol = Collections.min(nodesCols.values()); if (minCol != 0) { for (Map.Entry ent : nodesCols.entrySet()) { ent.setValue(ent.getValue() - minCol); } } } void internalMove(String code, int newCol) { hashcodeComputed = false; for (ANode n : nodesCols.keySet()) { if (n.getCode().equals(code)) { nodesCols.put(n, newCol); return; } } } public Board copy() { return new Board(this); } public Board(List nodes, List links) { for (ANode n : nodes) { addInRow(n); } this.links = Collections.unmodifiableList(new ArrayList(links)); this.initialDirection = new HashMap(); for (ALink link : links) { this.initialDirection.put(link, getDirection(link)); } } public int getInitialDirection(ALink link) { return initialDirection.get(link); } public int getDirection(ALink link) { return getCol(link.getNode2()) - getCol(link.getNode1()); } private void addInRow(ANode n) { hashcodeComputed = false; int col = 0; while (true) { if (getNodeAt(n.getRow(), col) == null) { nodesCols.put(n, col); assert getNodeAt(n.getRow(), col) == n; return; } col++; } } public Collection getNodes() { return Collections.unmodifiableCollection(nodesCols.keySet()); } public Collection getNodesInRow(int row) { final List result = new ArrayList(); for (ANode n : nodesCols.keySet()) { if (n.getRow() == row) { result.add(n); } } return Collections.unmodifiableCollection(result); } public final List getLinks() { return Collections.unmodifiableList(links); } public int getCol(ANode n) { return nodesCols.get(n); } public void applyMove(Move move) { final ANode piece = getNodeAt(move.getRow(), move.getCol()); if (piece == null) { throw new IllegalArgumentException(); } final ANode piece2 = getNodeAt(move.getRow(), move.getNewCol()); nodesCols.put(piece, move.getNewCol()); if (piece2 != null) { nodesCols.put(piece2, move.getCol()); } normalizeCol(); hashcodeComputed = false; } public Collection getAllPossibleMoves() { final List result = new ArrayList(); for (Map.Entry ent : nodesCols.entrySet()) { final int row = ent.getKey().getRow(); final int col = ent.getValue(); result.add(new Move(row, col, -1)); result.add(new Move(row, col, 1)); } return result; } public ANode getNodeAt(int row, int col) { for (Map.Entry ent : nodesCols.entrySet()) { if (ent.getKey().getRow() == row && ent.getValue().intValue() == col) { return ent.getKey(); } } return null; } public Set getConnectedNodes(ANode root, int level) { if (level < 0) { throw new IllegalArgumentException(); } if (level == 0) { return Collections.singleton(root); } final Set result = new HashSet(); if (level == 1) { for (ALink link : links) { if (link.getNode1() == root) { result.add(link.getNode2()); } else if (link.getNode2() == root) { result.add(link.getNode1()); } } } else { for (ANode n : getConnectedNodes(root, level - 1)) { result.addAll(getConnectedNodes(n, 1)); } } return Collections.unmodifiableSet(result); } public Set getAllLinks(Set nodes) { final Set result = new HashSet(); for (ALink link : links) { if (nodes.contains(link.getNode1()) || nodes.contains(link.getNode2())) { result.add(link); } } return Collections.unmodifiableSet(result); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/BoardCollection.java000066400000000000000000000060141312650303100264220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.util.ArrayList; import java.util.List; public class BoardCollection { static class Entry implements Comparable { final private Board board; final private double cost; private boolean explored; public Entry(Board b, CostComputer costComputer) { this.board = b; if (costComputer == null) { this.cost = 0; } else { this.cost = costComputer.getCost(b); } } public int compareTo(Entry other) { return (int) Math.signum(this.cost - other.cost); } @Override public boolean equals(Object obj) { final Entry other = (Entry) obj; return board.equals(other.board); } @Override public int hashCode() { return board.hashCode(); } } private final SortedCollection all = new SortedCollectionArrayList(); private final CostComputer costComputer; public BoardCollection(CostComputer costComputer) { this.costComputer = costComputer; } public int size() { return all.size(); } public Board getAndSetExploredSmallest() { for (Entry ent : all) { if (ent.explored == false) { ent.explored = true; assert costComputer.getCost(ent.board) == ent.cost; // Log.println("Peeking " + ent.cost); return ent.board; } } return null; } public double getBestCost() { for (Entry ent : all) { return ent.cost; } return 0; } public Board getBestBoard() { for (Entry ent : all) { return ent.board; } return null; } public List getCosts() { final List result = new ArrayList(); for (Entry ent : all) { result.add(costComputer.getCost(ent.board)); } return result; } public void add(Board b) { all.add(new Entry(b, costComputer)); } public boolean contains(Board b) { return all.contains(new Entry(b, null)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/BoardExplorer.java000066400000000000000000000043201312650303100261250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.util.HashSet; import java.util.Set; public class BoardExplorer { private final BoardCollection all = new BoardCollection(new KenavoCostComputer()); public BoardExplorer(Board init) { all.add(init); } public double getBestCost() { return all.getBestCost(); } public Board getBestBoard() { return all.getBestBoard(); } public int collectionSize() { return all.size(); } public boolean onePass() { final Board smallest = all.getAndSetExploredSmallest(); if (smallest == null) { return true; } final Set moves = nextBoards(smallest); for (Board newBoard : moves) { if (all.contains(newBoard)) { continue; } all.add(newBoard); } return false; } public Set nextBoards(Board board) { final Set result = new HashSet(); for (Move m : board.getAllPossibleMoves()) { final Board copy = board.copy(); copy.applyMove(m); result.add(copy); } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/CostComputer.java000066400000000000000000000025151312650303100260100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; public interface CostComputer { double getCost(Board board); }plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/ElectricCharge.java000066400000000000000000000036441312650303100262310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.awt.geom.Point2D; public class ElectricCharge { private boolean moveable; private final Point2D position; private final double charge; public ElectricCharge(double x, double y, double charge) { this.position = new Point2D.Double(x, y); this.charge = charge; } public Point2D getPosition() { return position; } public double getCharge() { return charge; } public final boolean isMoveable() { return moveable; } public final void setMoveable(boolean moveable) { this.moveable = moveable; } public void move(double deltax, double deltay) { position.setLocation(position.getX() + deltax, position.getY() + deltay); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/ElectricWord.java000066400000000000000000000035411312650303100257470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.Collection; import java.util.List; public class ElectricWord { private List charges = new ArrayList(); public ElectricWord(Rectangle2D playingZone) { } public void addGlueArea(Rectangle2D glue) { } public void addCharge(ElectricCharge charge) { } public void addCharges(Collection charges) { } public Point2D getForceAt(Point2D position, double charge, Collection ignoredCharges) { return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/EntityImageActivityBar.java000066400000000000000000000040071312650303100277400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.awt.Color; import java.awt.Graphics2D; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.ColorMapper; class EntityImageActivityBar extends AbstractEntityImage { private final int width = 100; private final int height = 8; public EntityImageActivityBar(IEntity entity) { super(entity); } @Override public Dimension2D getDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } @Override public void draw(ColorMapper colorMapper, Graphics2D g2d) { g2d.setColor(Color.BLACK); g2d.fillRect(0, 0, width, height); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/EntityImageActivityBranch.java000066400000000000000000000043141312650303100304320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.awt.Graphics2D; import java.awt.Polygon; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.ColorMapper; class EntityImageActivityBranch extends AbstractEntityImage { private final int size = 10; public EntityImageActivityBranch(IEntity entity) { super(entity); } @Override public Dimension2D getDimension(StringBounder stringBounder) { return new Dimension2DDouble(size * 2, size * 2); } @Override public void draw(ColorMapper colorMapper, Graphics2D g2d) { final Polygon p = new Polygon(); p.addPoint(size, 0); p.addPoint(size * 2, size); p.addPoint(size, size * 2); p.addPoint(0, size); g2d.setColor(colorMapper.getMappedColor(getYellow())); g2d.fill(p); g2d.setColor(colorMapper.getMappedColor(getRed())); g2d.draw(p); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/EntityImageActivityCircle.java000066400000000000000000000045151312650303100304410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.awt.Color; import java.awt.Graphics2D; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.ColorMapper; class EntityImageActivityCircle extends AbstractEntityImage { private final int diameterExternal; private final int diameterInternal; public EntityImageActivityCircle(IEntity entity, int diameterExternal, int diameterInternal) { super(entity); this.diameterExternal = diameterExternal; this.diameterInternal = diameterInternal; } @Override public Dimension2D getDimension(StringBounder stringBounder) { return new Dimension2DDouble(diameterExternal, diameterExternal); } @Override public void draw(ColorMapper colorMapper, Graphics2D g2d) { g2d.setColor(Color.BLACK); final int delta = diameterExternal - diameterInternal + 1; g2d.drawOval(0, 0, diameterExternal, diameterExternal); g2d.fillOval(delta / 2, delta / 2, diameterInternal, diameterInternal); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/EntityImageCircleInterface.java000066400000000000000000000070631312650303100305460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.awt.Graphics2D; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.SpriteContainerEmpty; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.skin.CircleInterface; import net.sourceforge.plantuml.ugraphic.ColorMapper; class EntityImageCircleInterface extends AbstractEntityImage { final private TextBlock name; final private CircleInterface circleInterface; public EntityImageCircleInterface(IEntity entity) { super(entity); this.name = entity.getDisplay().create(FontConfiguration.blackBlueTrue(getFont14()), HorizontalAlignment.CENTER, new SpriteContainerEmpty()); this.circleInterface = new CircleInterface(getYellow(), getRed()); } @Override public Dimension2D getDimension(StringBounder stringBounder) { final Dimension2D nameDim = name.calculateDimension(stringBounder); final double manWidth = circleInterface.getPreferredWidth(stringBounder); final double manHeight = circleInterface.getPreferredHeight(stringBounder); return new Dimension2DDouble(Math.max(manWidth, nameDim.getWidth()), manHeight + nameDim.getHeight()); } @Override public void draw(ColorMapper colorMapper, Graphics2D g2d) { throw new UnsupportedOperationException(); // final Dimension2D dimTotal = getDimension(StringBounderUtils.asStringBounder(g2d)); // final Dimension2D nameDim = name.calculateDimension(StringBounderUtils.asStringBounder(g2d)); // // final double manWidth = circleInterface.getPreferredWidth(StringBounderUtils.asStringBounder(g2d)); // final double manHeight = circleInterface.getPreferredHeight(StringBounderUtils.asStringBounder(g2d)); // // final double manX = (dimTotal.getWidth() - manWidth) / 2; // // g2d.setColor(Color.WHITE); // g2d.fill(new Rectangle2D.Double(0, 0, dimTotal.getWidth(), dimTotal.getHeight())); // // g2d.translate(manX, 0); // circleInterface.draw(g2d); // g2d.translate(-manX, 0); // // g2d.setColor(Color.BLACK); // name.drawTOBEREMOVED(g2d, (dimTotal.getWidth() - nameDim.getWidth()) / 2, manHeight); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/Galaxy4.java000066400000000000000000000053171312650303100246750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.geom.Point2DInt; import net.sourceforge.plantuml.geom.PolylineBreakeable; import net.sourceforge.plantuml.geom.SpiderWeb; public class Galaxy4 { final private Board board; final private Map lines = new LinkedHashMap(); final private SpiderWeb spiderWeb; public Galaxy4(Board board, int widthCell, int heightCell) { this.spiderWeb = new SpiderWeb(widthCell, heightCell); this.board = board; } public Point2DInt getMainPoint(int row, int col) { return spiderWeb.getMainPoint(row, col); } public PolylineBreakeable getPolyline(ALink link) { return lines.get(link); } public void addLink(ALink link) { final int rowStart = link.getNode1().getRow(); final int rowEnd = link.getNode2().getRow(); final int colStart = board.getCol(link.getNode1()); final int colEnd = board.getCol(link.getNode2()); final PolylineBreakeable polyline = spiderWeb.addPolyline(rowStart, colStart, rowEnd, colEnd); Log.info("link=" + link + " polyline=" + polyline); if (polyline == null) { Log.info("PENDING " + link + " " + polyline); } else { lines.put(link, polyline); } } public final Board getBoard() { return board; } public final Map getLines() { return Collections.unmodifiableMap(lines); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/GeneralPathFactory.java000066400000000000000000000130701312650303100271010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.awt.Polygon; import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.GeneralPath; import java.awt.geom.Point2D; import net.sourceforge.plantuml.cucadiagram.LinkType; import net.sourceforge.plantuml.geom.Box; import net.sourceforge.plantuml.geom.LineSegmentInt; import net.sourceforge.plantuml.geom.PolylineBreakeable; public class GeneralPathFactory { private final LinkType linkType; public GeneralPathFactory(LinkType linkType) { this.linkType = linkType; } public Shape getLink(PolylineBreakeable polyline, Box b1, Box b2) { final LineSegmentInt directSegment = new LineSegmentInt(b1.getCenterX(), b1.getCenterY(), b2.getCenterX(), b2 .getCenterY()); assert b1.intersect(directSegment).length == 1; assert b2.intersect(directSegment).length == 1; // final Point2D.Double start = polyline.clipStart(b1); // final Point2D.Double end = polyline.clipEnd(b2); final GeneralPath generalPath = polyline.asGeneralPath(); // addSymbol(generalPath, start, polyline.getFirst(), end, // polyline.getLast()); return generalPath; } private void addSymbol(GeneralPath generalPath, Point2D.Double firstPoint, LineSegmentInt firstSeg, Point2D.Double lastPoint, LineSegmentInt lastSeg) { // if (linkType.equals(LinkType.AGREGATION) || linkType.equals(LinkType.COMPOSITION)) { // addSymbolDiamond(generalPath, lastPoint, lastSeg); // } else if (linkType.equals(LinkType.AGREGATION_INV) || linkType.equals(LinkType.COMPOSITION_INV)) { // addSymbolDiamondInv(generalPath, firstPoint, firstSeg); // } else if (linkType.equals(LinkType.NAVASSOC) || linkType.equals(LinkType.NAVASSOC_DASHED)) { // addSymbolNavasoc(generalPath, lastPoint, lastSeg); // } else if (linkType.equals(LinkType.NAVASSOC_INV) || linkType.equals(LinkType.NAVASSOC_DASHED_INV)) { // addSymbolNavasocInv(generalPath, firstPoint, firstSeg); // } else if (linkType.equals(LinkType.EXTENDS_INV) || linkType.equals(LinkType.IMPLEMENTS_INV)) { // addSymbolExtends(generalPath, firstPoint, firstSeg); // } else if (linkType.equals(LinkType.EXTENDS) || linkType.equals(LinkType.IMPLEMENTS)) { // addSymbolExtendsInv(generalPath, lastPoint, lastSeg); // } else { // assert linkType.equals(LinkType.ASSOCIED) || linkType.equals(LinkType.ASSOCIED_DASHED); // } } private void addSymbolDiamond(GeneralPath generalPath, Point2D.Double point, LineSegmentInt seg) { final Polygon arrow = new Polygon(); arrow.addPoint(0, 0); arrow.addPoint(-10, 6); arrow.addPoint(-20, 0); arrow.addPoint(-10, -6); appendAndRotate(generalPath, point, seg, arrow); } private void addSymbolDiamondInv(GeneralPath generalPath, Point2D.Double point, LineSegmentInt seg) { final Polygon arrow = new Polygon(); arrow.addPoint(0, 0); arrow.addPoint(10, 6); arrow.addPoint(20, 0); arrow.addPoint(10, -6); appendAndRotate(generalPath, point, seg, arrow); } private void addSymbolNavasocInv(GeneralPath generalPath, Point2D.Double point, LineSegmentInt seg) { final Polygon arrow = new Polygon(); arrow.addPoint(0, 0); arrow.addPoint(13, -8); arrow.addPoint(6, 0); arrow.addPoint(13, 8); appendAndRotate(generalPath, point, seg, arrow); } private void addSymbolNavasoc(GeneralPath generalPath, Point2D.Double point, LineSegmentInt seg) { final Polygon arrow = new Polygon(); arrow.addPoint(0, 0); arrow.addPoint(-13, -8); arrow.addPoint(-6, 0); arrow.addPoint(-13, 8); appendAndRotate(generalPath, point, seg, arrow); } private void addSymbolExtends(GeneralPath generalPath, Point2D.Double point, LineSegmentInt seg) { final Polygon arrow = new Polygon(); arrow.addPoint(0, 0); arrow.addPoint(25, 7); arrow.addPoint(25, -7); appendAndRotate(generalPath, point, seg, arrow); } private void addSymbolExtendsInv(GeneralPath generalPath, Point2D.Double point, LineSegmentInt seg) { final Polygon arrow = new Polygon(); arrow.addPoint(0, 0); arrow.addPoint(-25, 7); arrow.addPoint(-25, -7); appendAndRotate(generalPath, point, seg, arrow); } private void appendAndRotate(GeneralPath generalPath, Point2D.Double point, LineSegmentInt seg, final Shape shape) { final AffineTransform at = AffineTransform.getTranslateInstance(point.x, point.y); final double theta = seg.getAngle(); at.rotate(theta); final Shape r = at.createTransformedShape(shape); generalPath.append(r, false); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/Graph1.java000066400000000000000000000046771312650303100245160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.awt.Color; import java.awt.Graphics2D; import java.awt.image.BufferedImage; public class Graph1 { private final Board board; private final int widthCell = 40; private final int heightCell = 40; public Graph1(Board board) { this.board = board; } public BufferedImage createBufferedImage() { final BufferedImage im = new BufferedImage(widthCell * 15, heightCell * 15, BufferedImage.TYPE_INT_RGB); final Graphics2D g2d = im.createGraphics(); g2d.setColor(Color.WHITE); g2d.fillRect(0, 0, im.getWidth(), im.getHeight()); g2d.setColor(Color.BLACK); for (ANode n : board.getNodes()) { final int x = board.getCol(n) * widthCell; final int y = n.getRow() * heightCell; g2d.drawString(n.getCode(), x + 5, y + heightCell / 2 - 5); g2d.drawOval(x, y, widthCell / 2, heightCell / 2); } for (ALink link : board.getLinks()) { final ANode n1 = link.getNode1(); final ANode n2 = link.getNode2(); final int x1 = 10 + board.getCol(n1) * widthCell; final int y1 = 10 + n1.getRow() * heightCell; final int x2 = 10 + board.getCol(n2) * widthCell; final int y2 = 10 + n2.getRow() * heightCell; g2d.drawLine(x1, y1, x2, y2); } return im; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/Heap.java000066400000000000000000000156171312650303100242450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; public class Heap { private final Map nodes = new LinkedHashMap(); private final Map> directChildren = new LinkedHashMap>(); private final List links = new ArrayList(); public boolean isEmpty() { if (links.isEmpty()) { assert nodes.isEmpty(); assert directChildren.isEmpty(); return true; } return false; } public void importing(ANode under, ANode otherRoot, Heap otherHeap, int diffHeight, Object userData) { assert this.directChildren.keySet().contains(under); assert this.nodes.values().contains(under); assert otherHeap.nodes.values().contains(otherRoot); assert otherHeap.directChildren.keySet().contains(otherRoot); assert this.nodes.values().contains(otherRoot) == false; assert this.directChildren.keySet().contains(otherRoot) == false; assert otherHeap.directChildren.keySet().contains(under) == false; final int oldSize = this.nodes.size(); assert oldSize == this.directChildren.size(); this.nodes.putAll(otherHeap.nodes); this.directChildren.putAll(otherHeap.directChildren); final ALinkImpl link = new ALinkImpl(under, otherRoot, diffHeight, userData); this.links.add(link); this.links.addAll(otherHeap.links); assert oldSize + otherHeap.nodes.size() == this.nodes.size(); assert oldSize + otherHeap.directChildren.size() == this.directChildren.size(); addUnderMe(under, otherRoot, link); } public void computeRows() { for (ANode n : nodes.values()) { n.setRow(Integer.MIN_VALUE); } nodes.values().iterator().next().setRow(0); boolean changed; do { onePass(); changed = false; for (ANode n : nodes.values()) { if (n.getRow() != Integer.MIN_VALUE) { continue; } final Map.Entry smallestRowOfChildren = getSmallestRowOfChildren(n); if (smallestRowOfChildren != null) { n.setRow(getStartingRow(smallestRowOfChildren)); } changed = true; } } while (changed); minToZero(); } private int getStartingRow(Map.Entry ent) { assert ent.getValue().getNode2() == ent.getKey(); return ent.getValue().getNode2().getRow() - ent.getValue().getDiffHeight(); } private void minToZero() { int min = Integer.MAX_VALUE; for (ANode n : nodes.values()) { min = Math.min(min, n.getRow()); } if (min == Integer.MIN_VALUE) { throw new IllegalStateException(); } if (min != 0) { for (ANode n : nodes.values()) { n.setRow(n.getRow() - min); } } } private Map.Entry getSmallestRowOfChildren(ANode n) { assert n.getRow() == Integer.MIN_VALUE; Map.Entry result = null; for (Map.Entry ent : directChildren.get(n).entrySet()) { final ANode child = ent.getKey(); if (child.getRow() == Integer.MIN_VALUE) { continue; } if (result == null || getStartingRow(ent) < getStartingRow(result)) { result = ent; } } // assert result != null; return result; } private void onePass() { boolean changed; do { changed = false; for (ANode n : nodes.values()) { final int row = n.getRow(); if (row == Integer.MIN_VALUE) { continue; } for (Map.Entry ent : directChildren.get(n).entrySet()) { final ANode child = ent.getKey(); final int diffHeight = ent.getValue().getDiffHeight(); if (child.getRow() == Integer.MIN_VALUE || child.getRow() < row + diffHeight) { child.setRow(row + diffHeight); changed = true; } } } } while (changed); } private ANode getNode(String code) { ANode result = nodes.get(code); if (result == null) { result = createNewNode(code); } return result; } private ANode createNewNode(String code) { final ANode result = new ANodeImpl(code); directChildren.put(result, new LinkedHashMap()); nodes.put(code, result); assert directChildren.size() == nodes.size(); return result; } public ANode getExistingNode(String code) { return nodes.get(code); } public List getLinks() { return Collections.unmodifiableList(links); } public List getNodes() { return Collections.unmodifiableList(new ArrayList(nodes.values())); } HashSet getAllChildren(ANode n) { final HashSet result = new HashSet(directChildren.get(n).keySet()); int size = 0; do { size = result.size(); for (ANode other : new HashSet(result)) { result.addAll(getAllChildren(other)); } } while (result.size() != size); return result; } public void addLink(String stringLink, int diffHeight, Object userData) { final LinkString l = new LinkString(stringLink); final ANode n1 = getNode(l.getNode1()); final ANode n2 = getNode(l.getNode2()); if (n1 == n2) { return; } final ALinkImpl link = new ALinkImpl(n1, n2, diffHeight, userData); links.add(link); if (getAllChildren(n2).contains(n1)) { addUnderMe(n2, n1, link); } else { addUnderMe(n1, n2, link); } } public ANode addNode(String code) { if (nodes.containsKey(code)) { throw new IllegalArgumentException(); } return createNewNode(code); } private void addUnderMe(final ANode n1, final ANode n2, final ALinkImpl link) { assert getAllChildren(n2).contains(n1) == false; directChildren.get(n1).put(n2, link); assert getAllChildren(n1).contains(n2); assert getAllChildren(n2).contains(n1) == false; } public int getRowMax() { int max = Integer.MIN_VALUE; for (ANode n : nodes.values()) { max = Math.max(max, n.getRow()); } return max; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/KenavoCostComputer.java000066400000000000000000000046671312650303100271660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import net.sourceforge.plantuml.geom.LineSegmentInt; public class KenavoCostComputer implements CostComputer { public double getCost(Board board) { double result = 0; for (ALink link1 : board.getLinks()) { for (ALink link2 : board.getLinks()) { result += getCost(board, link1, link2); } } return result; } LineSegmentInt getLineSegment(Board board, ALink link) { final ANode n1 = link.getNode1(); final ANode n2 = link.getNode2(); return new LineSegmentInt(board.getCol(n1), n1.getRow(), board.getCol(n2), n2.getRow()); } private double getCost(Board board, ALink link1, ALink link2) { final LineSegmentInt seg1 = getLineSegment(board, link1); final LineSegmentInt seg2 = getLineSegment(board, link2); final double len1 = getLength(link1, seg1, board); final double len2 = getLength(link2, seg2, board); return len1 * len2 * Math.exp(-seg1.getDistance(seg2)); } private double getLength(ALink link, final LineSegmentInt seg, Board board) { double coef = 1; if (link.getNode1().getRow() == link.getNode2().getRow() && board.getDirection(link) != board.getInitialDirection(link)) { coef = 1.1; } return seg.getLength() * coef; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/LenghtLinkComparator.java000066400000000000000000000036021312650303100274460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.util.Comparator; import java.util.Map; public class LenghtLinkComparator implements Comparator { private final Map cols; public LenghtLinkComparator(Map cols) { this.cols = cols; } public int compare(ALink link1, ALink link2) { return (int) Math.signum(getLenght(link1) - getLenght(link2)); } private double getLenght(ALink link) { final ANode n1 = link.getNode1(); final ANode n2 = link.getNode2(); final int deltaRow = n2.getRow() - n1.getRow(); final int deltaCol = cols.get(n2) - cols.get(n1); return deltaRow * deltaRow + deltaCol * deltaCol; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/LinkString.java000066400000000000000000000035761312650303100254550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; public class LinkString { final private static Pattern2 p = MyPattern.cmpile("(.*)->(.*)"); final private String node1; final private String node2; public LinkString(String desc) { final Matcher2 m = p.matcher(desc); if (m.find() == false) { throw new IllegalArgumentException(); } node1 = m.group(1); node2 = m.group(2); } public final String getNode1() { return node1; } public final String getNode2() { return node2; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/MethodsOrFieldsArea.java000066400000000000000000000062151312650303100272060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.SpriteContainerEmpty; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Member; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.skin.VisibilityModifier; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class MethodsOrFieldsArea { private final UFont font; private final List strings = new ArrayList(); public MethodsOrFieldsArea(List attributes, UFont font) { this.font = font; for (Member att : attributes) { this.strings.add(att.getDisplay(false)); } } public VisibilityModifier getVisibilityModifier() { throw new UnsupportedOperationException(); } public Dimension2D calculateDimension(StringBounder stringBounder) { double x = 0; double y = 0; for (String s : strings) { final TextBlock bloc = createTextBlock(s); final Dimension2D dim = bloc.calculateDimension(stringBounder); y += dim.getHeight(); x = Math.max(dim.getWidth(), x); } return new Dimension2DDouble(x, y); } private TextBlock createTextBlock(String s) { return Display.create(s).create(FontConfiguration.blackBlueTrue(font), HorizontalAlignment.LEFT, new SpriteContainerEmpty()); } public void draw(UGraphic ug, double x, double y) { for (String s : strings) { final TextBlock bloc = createTextBlock(s); bloc.drawU(ug.apply(new UTranslate(x, y))); y += bloc.calculateDimension(ug.getStringBounder()).getHeight(); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/Move.java000066400000000000000000000036211312650303100242660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; public class Move { private final int row; private final int col; private final int delta; @Override public String toString() { return row + "." + col + "->" + row + "." + (col + delta); } public Move(int row, int col, int delta) { if (delta != 1 && delta != -1) { throw new IllegalArgumentException(); } this.row = row; this.col = col; this.delta = delta; } public int getRow() { return row; } public int getCol() { return col; } public int getNewCol() { return col + delta; } public int getDelta() { return delta; } public Move getBackMove() { return new Move(row, col + delta, -delta); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/Oven.java000066400000000000000000000054111312650303100242660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.util.Random; public class Oven { final private double temp; final private CostComputer costComputer; public Oven(double temp, CostComputer costComputer) { this.temp = temp; this.costComputer = costComputer; } public Board longTic(int nbTic, Board board, Random rnd) { double best = costComputer.getCost(board); Board bestBoard = board.copy(); for (int i = 0; i < nbTic; i++) { final double current = tic(board, rnd); // Log.println("current=" + current + " best=" + best); if (current < best) { best = current; bestBoard = board.copy(); } } return bestBoard; } public double tic(Board board, Random rnd) { // Log.println("Oven::tic"); final double costBefore = costComputer.getCost(board); final Move move = null; // board.getRandomMove(rnd); board.applyMove(move); final double costAfter = costComputer.getCost(board); final double delta = costAfter - costBefore; // Log.println("delta=" + delta); if (delta <= 0) { return costAfter; } assert delta > 0; assert costAfter > costBefore; // Log.println("temp=" + temp); if (temp > 0) { final double probability = Math.exp(-delta / temp); final double dice = rnd.nextDouble(); // Log.println("probability=" + probability + " dice=" + // dice); if (dice < probability) { // Log.println("We keep it"); return costAfter; } } // Log.println("Roolback"); board.applyMove(move.getBackMove()); assert costBefore == costComputer.getCost(board); return costBefore; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/SimpleCostComputer.java000066400000000000000000000035401312650303100271610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; public class SimpleCostComputer implements CostComputer { /* * (non-Javadoc) * * @see net.sourceforge.plantuml.graph.CostComputer#getCost(net.sourceforge.plantuml.graph.Board) */ public double getCost(Board board) { double result = 0; for (ALink link : board.getLinks()) { final ANode n1 = link.getNode1(); final ANode n2 = link.getNode2(); final int x1 = board.getCol(n1); final int y1 = n1.getRow(); final int x2 = board.getCol(n2); final int y2 = n2.getRow(); result += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/SortedCollection.java000066400000000000000000000026401312650303100266340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; public interface SortedCollection> extends Iterable { int size(); void add(S entry); boolean contains(S entry); } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/SortedCollectionArrayList.java000066400000000000000000000045241312650303100304720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; public class SortedCollectionArrayList> implements SortedCollection { private final List allAsList = new ArrayList(); private final Set allAsSet = new HashSet(); public Iterator iterator() { return allAsList.iterator(); } public void add(S newEntry) { final int r = Collections.binarySearch(allAsList, newEntry); if (r >= 0) { allAsList.add(r, newEntry); } else { allAsList.add(-1 - r, newEntry); } allAsSet.add(newEntry); assert isSorted(); } public int size() { assert allAsSet.size() == allAsList.size(); return allAsList.size(); } List toList() { return new ArrayList(allAsList); } boolean isSorted() { S before = null; for (S ent : allAsList) { if (before != null && ent.compareTo(before) < 0) { return false; } before = ent; } return true; } public boolean contains(S entry) { return allAsSet.contains(entry); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/SortedCollectionLinked.java000066400000000000000000000043651312650303100277710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.ListIterator; public class SortedCollectionLinked> implements SortedCollection { private final List all = new LinkedList(); public Iterator iterator() { return all.iterator(); } public void add(S newEntry) { for (final ListIterator it = all.listIterator(); it.hasNext();) { final S cur = it.next(); if (cur.compareTo(newEntry) >= 0) { it.previous(); it.add(newEntry); assert isSorted(); return; } } all.add(newEntry); assert isSorted(); } public int size() { return all.size(); } List toList() { return new ArrayList(all); } boolean isSorted() { S before = null; for (S ent : all) { if (before != null && ent.compareTo(before) < 0) { return false; } before = ent; } return true; } public boolean contains(S entry) { return all.contains(entry); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/Zoda1.java000066400000000000000000000100361312650303100243340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; /** * @deprecated * */ public class Zoda1 { private final Map nodes = new LinkedHashMap(); private final List links = new ArrayList(); public ANodeImpl getNode(String code) { ANodeImpl result = nodes.get(code); if (result == null) { result = new ANodeImpl(code); nodes.put(code, result); } return result; } public ANodeImpl getExistingNode(String code) { return nodes.get(code); } public List getLinks() { return Collections.unmodifiableList(links); } public List getNodes() { return Collections.unmodifiableList(new ArrayList(nodes.values())); } public void addLink(String link) { final LinkString l = new LinkString(link); final ANodeImpl n1 = getNode(l.getNode1()); final ANodeImpl n2 = getNode(l.getNode2()); links.add(new ALinkImpl(n1, n2, 1, null)); } public void computeRows() { getNodes().get(0).setRow(0); for (int i = 0; i < links.size(); i++) { oneStep1(); oneStep2(); } removeUnplacedNodes(); } private void removeUnplacedNodes() { for (final Iterator it = nodes.values().iterator(); it.hasNext();) { final ANodeImpl n = it.next(); if (n.getRow() == Integer.MIN_VALUE) { removeLinksOf(n); it.remove(); } } } private void removeLinksOf(ANodeImpl n) { for (final Iterator it = links.iterator(); it.hasNext();) { final ALink link = it.next(); if (link.getNode1() == n || link.getNode2() == n) { it.remove(); } } } public int getRowMax() { int max = 0; for (ANode n : getNodes()) { if (n.getRow() == Integer.MIN_VALUE) { return Integer.MIN_VALUE; } if (n.getRow() > max) { max = n.getRow(); } } return max; } private void oneStep1() { for (ALink link : links) { final ANode n1 = link.getNode1(); if (n1.getRow() == Integer.MIN_VALUE) { continue; } final ANode n2 = link.getNode2(); if (n2.getRow() == Integer.MIN_VALUE) { n2.setRow(n1.getRow() + 1); } else if (n2.getRow() < n1.getRow() + 1) { n2.setRow(n1.getRow() + 1); } } } private void oneStep2() { for (ALink link : links) { final ANode n1 = link.getNode1(); final ANode n2 = link.getNode2(); if (n1.getRow() == Integer.MIN_VALUE && n2.getRow() != Integer.MIN_VALUE) { if (n2.getRow() == 0) { allDown(); } final int row = n2.getRow() - 1; if (row == -1) { throw new UnsupportedOperationException(); } n1.setRow(row); } } } private void allDown() { for (ANodeImpl n : nodes.values()) { if (n.getRow() != Integer.MIN_VALUE) { n.setRow(n.getRow() + 1); } } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph/Zoda2.java000066400000000000000000000067031312650303100243430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; public class Zoda2 { private final Map heaps = new LinkedHashMap(); public ANode getNode(String code) { for (ANode n : heaps.keySet()) { if (n.getCode().equals(code)) { return n; } } return null; } public ANode createAloneNode(String code) { if (getNode(code) != null) { throw new IllegalArgumentException(); } final Heap h = new Heap(); final ANode n = h.addNode(code); heaps.put(n, h); return n; } public List getNodes() { return Collections.unmodifiableList(new ArrayList(heaps.keySet())); } public Set getHeaps() { return new HashSet(heaps.values()); } public void addLink(String link, int diffHeight, Object userData) { final LinkString l; try { l = new LinkString(link); } catch (IllegalArgumentException e) { e.printStackTrace(); return; } final ANode n1 = getNode(l.getNode1()); final ANode n2 = getNode(l.getNode2()); final Heap h1 = n1 == null ? null : heaps.get(n1); final Heap h2 = n2 == null ? null : heaps.get(n2); assert h1 == null || h1.isEmpty() == false; assert h2 == null || h2.isEmpty() == false; if (h1 == null && h2 == null) { final Heap h = new Heap(); h.addLink(link, diffHeight, userData); recordHeap(h); } else if (h1 == h2) { assert h1 != null && h2 != null; h1.addLink(link, diffHeight, userData); } else if (h1 == null) { h2.addLink(link, diffHeight, userData); recordHeap(h2); } else if (h2 == null) { h1.addLink(link, diffHeight, userData); recordHeap(h1); } else { assert h1 != null && h2 != null; assert h1.getNodes().contains(n1); h1.importing(n1, n2, h2, diffHeight, userData); recordHeap(h1); assert heapMerged(h1, h2); } } private boolean heapMerged(final Heap destination, final Heap source) { for (ANode n : source.getNodes()) { assert heaps.get(n) == destination; } return true; } private void recordHeap(final Heap h) { for (ANode n : h.getNodes()) { heaps.put((ANodeImpl) n, h); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/000077500000000000000000000000001312650303100225755ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/CubicCurveFactory.java000066400000000000000000000064371312650303100270340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.awt.geom.CubicCurve2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; public class CubicCurveFactory { private final Point2D.Double start; private final Point2D.Double end; private final RectanglesCollection forbiddenRect = new RectanglesCollection(); private final List forbiddenCurves = new ArrayList(); public CubicCurveFactory(Point2D start, Point2D end) { this.start = new Point2D.Double(start.getX(), start.getY()); this.end = new Point2D.Double(end.getX(), end.getY()); } public void addForbidden(Rectangle2D.Double rect) { forbiddenRect.add(rect); } public void addForbidden(MyCurve curve) { forbiddenCurves.add(curve); } public MyCurve getCubicCurve2D() { MyCurve result = new MyCurve(new CubicCurve2D.Double(start.getX(), start.getY(), start.getX(), start.getY(), end.getX(), end.getY(), end.getX(), end.getY())); if (result.intersects(forbiddenRect) || result.intersects(forbiddenCurves)) { final Set all = new HashSet(); all.addAll(MagicPointsFactory.get(start, end)); for (Rectangle2D.Double rect : forbiddenRect) { all.addAll(MagicPointsFactory.get(rect)); } // Log.println("s1 " + all.size()); // final long t1 = System.currentTimeMillis(); double min = Double.MAX_VALUE; for (Point2D.Double p1 : all) { for (Point2D.Double p2 : all) { final MyCurve me = new MyCurve(new CubicCurve2D.Double(start.getX(), start.getY(), p1.getX(), p1 .getY(), p2.getX(), p2.getY(), end.getX(), end.getY())); if (me.getLenght() < min && me.intersects(forbiddenRect) == false && me.intersects(forbiddenCurves) == false) { result = me; min = me.getLenght(); } } } // final long t2 = System.currentTimeMillis() - t1; // Log.println("s2 = " + t2); // Log.println("TPS1 = " + RectanglesCollection.TPS1); // Log.println("TPS2 = " + RectanglesCollection.TPS2); } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/Dijkstra.java000066400000000000000000000115431312650303100252170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; /* * Copyright (c) 2009 the authors listed at the following URL, and/or the * authors of referenced articles or incorporated external code: * http://en.literateprograms.org/Dijkstra's_algorithm_(Java)?action=history&offset=20081113161332 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * Retrieved from: * http://en.literateprograms.org/Dijkstra's_algorithm_(Java)?oldid=15444 */ // http://www.google.fr/search?hl=fr&source=hp&q=A+star+java&btnG=Recherche+Google&meta=&aq=f&oq= // http://www.edenwaith.com/products/pige/tutorials/a-star.php import java.util.ArrayList; import java.util.List; import java.util.PriorityQueue; public class Dijkstra { static class Vertex implements Comparable { private final Object data; private final List adjacencies = new ArrayList(); private double minDistance = Double.POSITIVE_INFINITY; private Vertex previous; Vertex(Object data) { this.data = data; } public void addAdjacencies(Vertex target, double dist) { if (target == null) { throw new IllegalArgumentException(); } adjacencies.add(new Edge(target, dist)); } public String toString() { return "[ " + data.toString() + " (" + minDistance + ") ] "; } public int compareTo(Vertex other) { return Double.compare(minDistance, other.minDistance); } public final Object getData() { return data; } } static class Edge { private final Vertex target; private final double weight; Edge(Vertex argTarget, double argWeight) { target = argTarget; weight = argWeight; } } private final List vertices = new ArrayList(); public Vertex addVertex(Object data) { final Vertex v = new Vertex(data); vertices.add(v); return v; } private void computePaths(Vertex source) { source.minDistance = 0.; final PriorityQueue vertexQueue = new PriorityQueue(); vertexQueue.add(source); while (vertexQueue.isEmpty() == false) { final Vertex u = vertexQueue.poll(); // Visit each edge exiting u for (Edge e : u.adjacencies) { final Vertex v = e.target; final double weight = e.weight; final double distanceThroughU = u.minDistance + weight; if (distanceThroughU < v.minDistance) { vertexQueue.remove(v); v.minDistance = distanceThroughU; v.previous = u; vertexQueue.add(v); } } } } public List getShortestPathTo(Vertex source, Vertex target) { computePaths(source); final List path = new ArrayList(); for (Vertex vertex = target; vertex != null; vertex = vertex.previous) { path.add(0, vertex); } return path; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/GeomUtils.java000066400000000000000000000111011312650303100253420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.awt.Graphics2D; import java.awt.geom.Line2D; import java.awt.geom.Point2D; public class GeomUtils { public static Point2D translate(Point2D pt, double deltaX, double deltaY) { return new Point2D.Double(pt.getX() + deltaX, pt.getY() + deltaY); } static public boolean isHorizontal(Line2D.Double seg) { return seg.getP1().getY() == seg.getP2().getY(); } static public boolean isVertical(Line2D.Double seg) { return seg.getP1().getX() == seg.getP2().getX(); } static public double getMinX(Line2D.Double seg) { return Math.min(seg.x1, seg.x2); } static public double getMaxX(Line2D.Double seg) { return Math.max(seg.x1, seg.x2); } static public double getMinY(Line2D.Double seg) { return Math.min(seg.y1, seg.y2); } static public double getMaxY(Line2D.Double seg) { return Math.max(seg.y1, seg.y2); } static public Point2D.Double getPoint2D(Line2D.Double line, double u) { final double x = line.x1 + u * (line.x2 - line.x1); final double y = line.y1 + u * (line.y2 - line.y1); return new Point2D.Double(x, y); } private static boolean isBetween(double value, double v1, double v2) { if (v1 < v2) { return value >= v1 && value <= v2; } assert v2 <= v1; return value >= v2 && value <= v1; } static boolean isBetween(Point2D toTest, Point2D pos1, Point2D pos2) { return isBetween(toTest.getX(), pos1.getX(), pos2.getX()) && isBetween(toTest.getY(), pos1.getY(), pos2.getY()); } static private double getIntersectionVertical(Line2D.Double line, double xOther) { final double coef = line.x2 - line.x1; if (coef == 0) { return java.lang.Double.NaN; } return (xOther - line.x1) / coef; } static private double getIntersectionHorizontal(Line2D.Double line, double yOther) { final double coef = line.y2 - line.y1; if (coef == 0) { return java.lang.Double.NaN; } return (yOther - line.y1) / coef; } static public Point2D.Double getSegIntersection(Line2D.Double line1, Line2D.Double line2) { final double u; if (isVertical(line2)) { u = getIntersectionVertical(line1, line2.getP1().getX()); } else if (isHorizontal(line2)) { u = getIntersectionHorizontal(line1, line2.getP1().getY()); } else { throw new UnsupportedOperationException(); } if (java.lang.Double.isNaN(u) || u < 0 || u > 1) { return null; } final Point2D.Double result = getPoint2D(line1, u); if (isBetween(result, line2.getP1(), line2.getP2())) { return result; } return null; } public static String toString(Line2D line) { // return line.getP1() + "-" + line.getP2(); return toString(line.getP1()) + "-" + toString(line.getP2()); } public static String toString(Point2D pt) { return "[" + pt.getX() + "," + pt.getY() + "]"; } public static Point2D.Double getCenter(Line2D.Double l) { final double x = (l.getX1() + l.getX2()) / 2; final double y = (l.getY1() + l.getY2()) / 2; return new Point2D.Double(x, y); } public static void fillPoint2D(Graphics2D g2d, Point2D pt) { final int x = (int) pt.getX() - 1; final int y = (int) pt.getY() - 1; g2d.fillOval(x, y, 3, 3); } public static double getOrthoDistance(Line2D.Double seg, Point2D pt) { if (isHorizontal(seg)) { return Math.abs(seg.getP1().getY() - pt.getY()); } if (isVertical(seg)) { return Math.abs(seg.getP1().getX() - pt.getX()); } throw new IllegalArgumentException(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/IInflationTransform.java000066400000000000000000000032721312650303100273740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.util.Collection; import java.util.List; public interface IInflationTransform { void addInflationX(double xpos, double inflation); void addInflationY(double ypos, double inflation); double getTotalInflationX(); double getTotalInflationY(); Point2D inflatePoint2D(Point2D point); List inflate(Collection segments); }plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/IdentityInflationTransform.java000066400000000000000000000036251312650303100307770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collection; import java.util.List; public class IdentityInflationTransform implements IInflationTransform { public void addInflationX(double xpos, double inflation) { } public void addInflationY(double ypos, double inflation) { } public double getTotalInflationX() { return 0; } public double getTotalInflationY() { return 0; } public Point2D inflatePoint2D(Point2D point) { return point; } public List inflate(Collection segments) { return new ArrayList(segments); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/InflateData2.java000066400000000000000000000067731312650303100257130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; public class InflateData2 implements Comparable { private final double pos; private final double inflation; public InflateData2(double pos, double inflation) { this.pos = pos; this.inflation = inflation; } public final double getPos() { return pos; } public final double getInflation() { return inflation; } public int compareTo(InflateData2 other) { return -Double.compare(this.pos, other.pos); } // public Point2D inflateX(Point2D pt) { // if (pt.getX() < pos) { // return pt; // } // if (pt.getX() == pos) { // return GeomUtils.translate(pt, inflation / 2, 0); // } // return GeomUtils.translate(pt, inflation, 0); // } // public double inflateAt(double v) { if (v == pos) { return inflation / 2; } if (v < pos) { return 0; } return inflation; } // public Line2D.Double inflateXAlpha(Line2D.Double line) { // // if (GeomUtils.isHorizontal(line)) { // return new Line2D.Double(inflateX(line.getP1()), inflateX(line.getP2())); // } // if (line.x1 == pos && line.x2 == pos) { // return new Line2D.Double(GeomUtils.translate(line.getP1(), inflation / 2, // 0), GeomUtils.translate(line // .getP2(), inflation / 2, 0)); // } // if (line.x1 <= pos && line.x2 <= pos) { // return line; // } // if (line.x1 >= pos && line.x2 >= pos) { // return new Line2D.Double(GeomUtils.translate(line.getP1(), inflation, 0), // GeomUtils.translate(line.getP2(), // inflation, 0)); // } // throw new UnsupportedOperationException(); // } // // public Line2D.Double inflateYAlpha(Line2D.Double line) { // if (GeomUtils.isVertical(line)) { // return new Line2D.Double(inflateY(line.getP1()), inflateY(line.getP2())); // } // if (line.y1 == pos && line.y2 == pos) { // return new Line2D.Double(GeomUtils.translate(line.getP1(), 0, inflation / // 2), GeomUtils.translate(line // .getP2(), 0, inflation / 2)); // } // if (line.y1 <= pos && line.y2 <= pos) { // return line; // } // if (line.y1 >= pos && line.y2 >= pos) { // return new Line2D.Double(GeomUtils.translate(line.getP1(), 0, inflation), // GeomUtils.translate(line.getP2(), // 0, inflation)); // } // throw new UnsupportedOperationException(); // } @Override public String toString() { return "" + pos + " (" + inflation + ")"; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/InflationTransform2.java000066400000000000000000000161231312650303100273440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.awt.geom.AffineTransform; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.ListIterator; import java.util.SortedSet; import java.util.TreeSet; class Point2DComparatorDistance implements Comparator { private final Point2D center; public Point2DComparatorDistance(Point2D center) { this.center = center; } public int compare(Point2D p1, Point2D p2) { return Double.compare(p1.distance(center), p2.distance(center)); } } public class InflationTransform2 implements IInflationTransform { private final List inflateX = new ArrayList(); private final List inflateY = new ArrayList(); public void addInflationX(double xpos, double inflation) { add(inflateX, xpos, inflation); } @Override public String toString() { return "inflateX = " + inflateX + " inflateY = " + inflateY; } public void addInflationY(double ypos, double inflation) { add(inflateY, ypos, inflation); } public double getTotalInflationX() { return sumInflation(inflateX); } public double getTotalInflationY() { return sumInflation(inflateY); } static private double sumInflation(List list) { double result = 0; for (InflateData2 data : list) { result += data.getInflation(); } return result; } static private void add(List list, double ypos, double inflation) { for (final ListIterator it = list.listIterator(); it.hasNext();) { final InflateData2 cur = it.next(); if (cur.getPos() == ypos) { it.set(new InflateData2(ypos, Math.max(inflation, cur.getInflation()))); return; } } list.add(new InflateData2(ypos, inflation)); Collections.sort(list); } Collection cutPoints(Line2D.Double original) { final SortedSet result = new TreeSet(new Point2DComparatorDistance(original .getP1())); if (GeomUtils.isHorizontal(original) == false) { for (InflateData2 x : inflateX) { final Line2D.Double vertical = new Line2D.Double(x.getPos(), GeomUtils.getMinY(original), x.getPos(), GeomUtils.getMaxY(original)); final Point2D.Double inter = GeomUtils.getSegIntersection(original, vertical); if (inter != null) { result.add(inter); } } } if (GeomUtils.isVertical(original) == false) { for (InflateData2 y : inflateY) { final Line2D.Double horizontal = new Line2D.Double(GeomUtils.getMinX(original), y.getPos(), GeomUtils .getMaxX(original), y.getPos()); final Point2D.Double inter = GeomUtils.getSegIntersection(original, horizontal); if (inter != null) { result.add(inter); } } } return result; } Collection cutSegments(Line2D.Double original) { final List result = new ArrayList(); Point2D.Double cur = (Point2D.Double) original.getP1(); final Collection cutPoints = cutPoints(original); for (Point2D.Double inter : cutPoints) { if (cur.equals(inter)) { continue; } result.add(new Line2D.Double(cur, inter)); cur = inter; } if (cur.equals(original.getP2()) == false) { result.add(new Line2D.Double(cur, original.getP2())); } return result; } Collection cutSegments(Collection segments) { final List result = new ArrayList(); for (Line2D.Double seg : segments) { result.addAll(cutSegments(seg)); } return result; } // private Line2D.Double inflateSegment(Line2D.Double seg) { // // if (isOnGrid(seg.getP1()) && isOnGrid(seg.getP2())) { // // return new Line2D.Double(inflatePoint2D(seg.getP1()), // inflatePoint2D(seg.getP2())); // // } // // for (InflateData2 x : inflateX) { // // seg = x.inflateXAlpha(seg); // // } // // for (InflateData2 y : inflateY) { // // seg = y.inflateYAlpha(seg); // // } // // return seg; // return new Line2D.Double(inflatePoint2D(seg.getP1()), // inflatePoint2D(seg.getP2())); // } // private boolean isOnGrid(Point2D point) { // boolean onGrid = false; // for (InflateData2 x : inflateX) { // if (point.getX() == x.getPos()) { // onGrid = true; // } // } // if (onGrid == false) { // return false; // } // for (InflateData2 y : inflateY) { // if (point.getY() == y.getPos()) { // return true; // } // } // return false; // // } public Point2D inflatePoint2D(Point2D point) { return getAffineTransformAt(point).transform(point, null); } AffineTransform getAffineTransformAt(Point2D point) { double deltaX = 0; for (InflateData2 x : inflateX) { deltaX += x.inflateAt(point.getX()); } double deltaY = 0; for (InflateData2 y : inflateY) { deltaY += y.inflateAt(point.getY()); } return AffineTransform.getTranslateInstance(deltaX, deltaY); } List inflateSegmentCollection(Collection segments) { final List result = new ArrayList(); for (Line2D.Double seg : segments) { final AffineTransform at = getAffineTransformAt(new Point2D.Double((seg.x1 + seg.x2) / 2, (seg.y1 + seg.y2) / 2)); result.add(new Line2D.Double(at.transform(seg.getP1(), null), at.transform(seg.getP2(), null))); } return result; } public List inflate(Collection segments) { final Collection cutSegments = cutSegments(segments); Line2D.Double last = null; final List inflated = inflateSegmentCollection(cutSegments); final List result = new ArrayList(); for (Line2D.Double seg : inflated) { if (last != null && last.getP2().equals(seg.getP1()) == false) { result.add(new Line2D.Double(last.getP2(), seg.getP1())); } result.add(seg); last = seg; } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/MagicPointsFactory.java000066400000000000000000000053721312650303100272140ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.List; public class MagicPointsFactory { private MagicPointsFactory() { } public static List get(Rectangle2D.Double rect) { final List result = new ArrayList(); result.add(new Point2D.Double(rect.x - rect.width, rect.y - rect.height)); result.add(new Point2D.Double(rect.x, rect.y - rect.height)); result.add(new Point2D.Double(rect.x + rect.width, rect.y - rect.height)); result.add(new Point2D.Double(rect.x + 2 * rect.width, rect.y - rect.height)); result.add(new Point2D.Double(rect.x - rect.width, rect.y)); result.add(new Point2D.Double(rect.x + 2 * rect.width, rect.y)); result.add(new Point2D.Double(rect.x - rect.width, rect.y + rect.height)); result.add(new Point2D.Double(rect.x + 2 * rect.width, rect.y + rect.height)); result.add(new Point2D.Double(rect.x - rect.width, rect.y + 2 * rect.height)); result.add(new Point2D.Double(rect.x, rect.y + 2 * rect.height)); result.add(new Point2D.Double(rect.x + rect.width, rect.y + 2 * rect.height)); result.add(new Point2D.Double(rect.x + 2 * rect.width, rect.y + 2 * rect.height)); return result; } public static List get(Point2D.Double p1, Point2D.Double p2) { final List result = new ArrayList(); result.add(new Point2D.Double(p1.x, p2.y)); result.add(new Point2D.Double(p2.x, p1.y)); return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/MagicPointsFactory2.java000066400000000000000000000043221312650303100272700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; public class MagicPointsFactory2 { private final Point2D.Double p1; private final Point2D.Double p2; private final List result = new ArrayList(); public MagicPointsFactory2(Point2D.Double p1, Point2D.Double p2) { this.p1 = p1; this.p2 = p2; final double dx = p2.x - p1.x; final double dy = p2.y - p1.y; final int interv = 5; final int intervAngle = 10; final double theta = Math.PI * 2 / intervAngle; for (int a = 0; a < 10; a++) { final AffineTransform at = AffineTransform.getRotateInstance(theta * a, p1.x, p1.y); for (int i = 0; i < interv * 2; i++) { final Point2D.Double p = new Point2D.Double(p1.x + dx * i / interv, p1.y + dy * i / interv); result.add((Point2D.Double) at.transform(p, null)); } } } public List get() { return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/Measurer.java000066400000000000000000000025071312650303100252270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; public interface Measurer { int getMeasure(V data); } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/MyCurve.java000066400000000000000000000112371312650303100250360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Graphics2D; import java.awt.geom.CubicCurve2D; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.List; public class MyCurve { private final CubicCurve2D.Double curve; private final List lines = new ArrayList(); private final List linesForInters = new ArrayList(); private Color color = Color.GREEN; private double lenght = 0; public MyCurve(CubicCurve2D.Double curve) { this.curve = curve; addCurve(curve); if (lenght <= 0) { throw new IllegalStateException(); } for (Line2D.Double line : lines) { linesForInters.add(change(line, curve.getP1(), curve.getP2())); } } private Line2D.Double change(Line2D.Double line, Point2D p1, Point2D p2) { if (line.getP1().equals(p1) == false && line.getP2().equals(p2) == false) { return line; } final double dx = line.x2 - line.x1; final double dy = line.y2 - line.y1; if (line.getP1().equals(p1)) { p1 = new Point2D.Double(line.x1 + dx / 10, line.y1 + dy / 10); } else { p1 = line.getP1(); } if (line.getP2().equals(p2)) { p2 = new Point2D.Double(line.x2 - dx / 10, line.y2 - dy / 10); } else { p2 = line.getP2(); } return new Line2D.Double(p1, p2); } public final double getLenght() { return lenght; } private void addCurve(CubicCurve2D.Double peace) { final Rectangle2D bounds = peace.getBounds2D(); final double flat = peace.getFlatness(); if (flat < 10) { lines.add(new Line2D.Double(peace.getP1(), peace.getP2())); lenght += Math.sqrt(bounds.getWidth() * bounds.getWidth() + bounds.getHeight() * bounds.getHeight()); return; } final CubicCurve2D.Double left = new CubicCurve2D.Double(); final CubicCurve2D.Double right = new CubicCurve2D.Double(); peace.subdivide(left, right); addCurve(left); addCurve(right); } public void drawDebug(Graphics2D g2d) { for (Line2D r : linesForInters) { g2d.setColor(color); g2d.draw(r); } g2d.setColor(Color.BLACK); // g2d.draw(curve); } public void draw(Graphics2D g2d) { g2d.setStroke(new BasicStroke((float) 1.5)); g2d.draw(curve); g2d.setStroke(new BasicStroke()); } public final void setColor(Color color) { this.color = color; } public boolean intersects(List others) { for (MyCurve other : others) { if (this.intersects(other)) { return true; } } return false; } private boolean intersects(MyCurve other) { for (Line2D.Double l1 : this.linesForInters) { for (Line2D.Double l2 : other.linesForInters) { if (l1.intersectsLine(l2)) { return true; } } } return false; } public boolean intersects(RectanglesCollection forbidden) { for (Rectangle2D.Double r : forbidden) { for (Line2D.Double line : lines) { if (r.intersectsLine(line)) { return true; } } } return false; } // public static long TPS6; // // public RectanglesCollection unrecoveredBy(RectanglesCollection allFrames) // { // final long start = System.currentTimeMillis(); // try { // final RectanglesCollection result = new RectanglesCollection(); // for (Rectangle2D.Double r : areas) { // if (allFrames.intersect(new RectanglesCollection(r)) == false) { // result.add(r); // } // } // return result; // } finally { // TPS6 += System.currentTimeMillis() - start; // } // } // } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/Neighborhood2.java000066400000000000000000000126261312650303100261400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import net.sourceforge.plantuml.geom.Orientation; public class Neighborhood2 { final private double angle1; final private double angle2; final private Point2D.Double center; public Neighborhood2(Point2D.Double center) { this(center, 0, 0); } public boolean is360() { return angle1 == angle2; } public Neighborhood2(Point2D.Double center, double angle1, double angle2) { this.center = center; this.angle1 = angle1; this.angle2 = angle2; } @Override public boolean equals(Object obj) { final Neighborhood2 other = (Neighborhood2) obj; return angle1 == other.angle1 && angle2 == other.angle2 && center.equals(other.center); } @Override public int hashCode() { return center.hashCode() * 17 + new Point2D.Double(angle1, angle2).hashCode(); } @Override public String toString() { final int a1 = (int) (angle1 * 180 / Math.PI); final int a2 = (int) (angle2 * 180 / Math.PI); return center + " " + a1 + " " + a2; } public final Point2D.Double getCenter() { return center; } // private double getMiddle() { // if (is360()) { // return angle1 + 2 * Math.PI / 3; // } // double result = (angle1 + angle2) / 2; // if (angle2 < angle1) { // result += Math.PI; // } // return result; // } // public Point2D.Double getPointInNeighborhood(double dist, Point2D p1, Point2D p2) { if (p1 == null || p2 == null) { throw new IllegalArgumentException(); } if (dist <= 0) { throw new IllegalArgumentException(); } final double v1 = Singularity2.convertAngle(Singularity2.getAngle(new Line2D.Double(center, p1)) - angle1); final double v2 = Singularity2.convertAngle(Singularity2.getAngle(new Line2D.Double(center, p2)) - angle1); if (v1 < 0) { throw new IllegalStateException(); } if (v2 < 0) { throw new IllegalStateException(); } final double middle = (v1 + v2) / 2 + angle1; return new Point2D.Double(center.x + dist * Math.cos(middle), center.y + dist * Math.sin(middle)); } public boolean isInAngleStrict(double angle) { if (angle < 0) { throw new IllegalArgumentException(); } if (angle2 > angle1) { return angle > angle1 && angle < angle2; } return angle > angle1 || angle < angle2; } public boolean isInAngleLarge(double angle) { if (angle < 0) { throw new IllegalArgumentException(); } if (angle2 > angle1) { return angle >= angle1 && angle <= angle2; } return angle >= angle1 || angle <= angle2; } public boolean isAngleLimit(double angle) { return angle == angle1 || angle == angle2; } public Orientation getOrientationFrom(double angle) { if (angle1 == angle2) { throw new IllegalStateException(); } if (angle != angle1 && angle != angle2) { throw new IllegalArgumentException("this=" + this + " angle=" + (int) (angle * 180 / Math.PI)); } assert angle == angle1 || angle == angle2; if (angle == angle1) { return Orientation.MATH; } return Orientation.CLOCK; } public boolean isConnectable(Neighborhood2 other) { assert isConnectableInternal(other) == other.isConnectableInternal(this); return isConnectableInternal(other); } private boolean isConnectableInternal(Neighborhood2 other) { if (getCenter().equals(other.getCenter())) { throw new IllegalArgumentException("Same center"); } final Line2D.Double seg1 = new Line2D.Double(getCenter(), other.getCenter()); final double angle1 = Singularity2.convertAngle(Singularity2.getAngle(seg1)); final double angle2 = Singularity2.convertAngle(Singularity2.getOppositeAngle(seg1)); assert angle2 == Singularity2.convertAngle(Singularity2.getAngle(new Line2D.Double(other.getCenter(), getCenter()))); if (isInAngleStrict(angle1) && other.isInAngleStrict(angle2)) { return true; } if (isInAngleStrict(angle1) && other.isInAngleLarge(angle2)) { return true; } if (isInAngleLarge(angle1) && other.isInAngleStrict(angle2)) { return true; } if (isAngleLimit(angle1) && other.isAngleLimit(angle2)) { if (is360() || other.is360()) { return true; } final Orientation o1 = getOrientationFrom(angle1); final Orientation o2 = other.getOrientationFrom(angle2); return o1 != o2; } return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/Plan.java000066400000000000000000000173401312650303100243370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collection; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.graph2.Dijkstra.Vertex; public class Plan { private final Map points = new LinkedHashMap(); private final Collection lines = new ArrayList(); public void addPoint2D(Point2D.Double point) { if (points.containsKey(point)) { throw new IllegalArgumentException(); } points.put(point, new Singularity2(point)); } public void debugPrint() { Log.println("PLAN PRINT"); for (Singularity2 s : points.values()) { Log.println("s="+s); } for (Line2D.Double l : lines) { Log.println(GeomUtils.toString(l)); } } public void createLink(Point2D p1, Point2D p2) { final Singularity2 s1 = points.get(p1); final Singularity2 s2 = points.get(p2); if (s1 == null || s2 == null) { throw new IllegalArgumentException(); } final Line2D.Double line = new Line2D.Double(p1, p2); s1.addLineSegment(line); s2.addLineSegment(line); lines.add(line); } Singularity2 getSingularity(Point2D pt) { final Singularity2 result = points.get(pt); if (result == null) { throw new IllegalArgumentException(); } return result; } List getShortestPathToInternal(Point2D start, Point2D end) { final Dijkstra dijkstra = new Dijkstra(); if (points.containsKey(start) == false || points.containsKey(end) == false) { throw new IllegalArgumentException(); } final Vertex vStart = dijkstra.addVertex(start); final Vertex vEnd = dijkstra.addVertex(end); final Map vertexes = new LinkedHashMap(); for (Singularity2 s : points.values()) { for (Neighborhood2 n : s.getNeighborhoods()) { final Vertex v = dijkstra.addVertex(n); vertexes.put(n, v); if (n.getCenter().equals(start)) { vStart.addAdjacencies(v, 0.01); } if (n.getCenter().equals(end)) { v.addAdjacencies(vEnd, 0.01); } } } for (Vertex v1 : vertexes.values()) { for (Vertex v2 : vertexes.values()) { final Neighborhood2 n1 = (Neighborhood2) v1.getData(); final Neighborhood2 n2 = (Neighborhood2) v2.getData(); if (n1.getCenter().equals(n2.getCenter())) { continue; } final Line2D.Double line = new Line2D.Double(n1.getCenter(), n2.getCenter()); if (isStrictCrossing(line)) { continue; } if (n1.isConnectable(n2) == false) { continue; } final double dist = n1.getCenter().distance(n2.getCenter()); v1.addAdjacencies(v2, dist); v2.addAdjacencies(v1, dist); // Log.println("=(" + n1 + ") (" + n2 + ") " + dist); } } final List list = dijkstra.getShortestPathTo(vStart, vEnd); if (list.size() < 2) { throw new IllegalStateException("list=" + list); } final List result = new ArrayList(); for (Vertex v : list.subList(1, list.size() - 1)) { result.add((Neighborhood2) v.getData()); } return result; } public List getIntermediatePoints(Point2D start, Point2D end) { // Log.println("start=" + start + " end=" + end); final List result = new ArrayList(); final List list = getShortestPathToInternal(start, end); // Log.println("Neighborhood2 = " + list); for (int i = 1; i < list.size() - 1; i++) { final Neighborhood2 n = list.get(i); final Point2D.Double before = list.get(i - 1).getCenter(); final Point2D.Double after = list.get(i + 1).getCenter(); // Log.println("before="+before); // Log.println("after="+after); // Log.println("n.getCenter()="+n.getCenter()); // Log.println("getMindist(n.getCenter())="+getMindist(n.getCenter())); final Point2D.Double pointInNeighborhood = n.getPointInNeighborhood(getMindist(n.getCenter()) / 2, before, after); // Log.println("pointInNeighborhood="+pointInNeighborhood); result.add(pointInNeighborhood); } return result; } private boolean isStrictCrossing(Line2D.Double line) { for (Line2D.Double l : lines) { if (intersectsLineStrict(l, line)) { return true; } } return false; } public static boolean intersectsLineStrict(Line2D.Double l1, Line2D.Double l2) { assert intersectsLineStrictInternal(l1, l2) == intersectsLineStrictInternal(l2, l1); assert intersectsLineStrictInternal(l1, l2) == intersectsLineStrictInternal(inverse(l1), l2); assert intersectsLineStrictInternal(l1, l2) == intersectsLineStrictInternal(l1, inverse(l2)); assert intersectsLineStrictInternal(l1, l2) == intersectsLineStrictInternal(inverse(l1), inverse(l2)); return intersectsLineStrictInternal(l1, l2); } private static Line2D.Double inverse(Line2D.Double line) { return new Line2D.Double(line.getP2(), line.getP1()); } private static boolean intersectsLineStrictInternal(Line2D.Double l1, Line2D.Double l2) { if (l1.intersectsLine(l2) == false) { return false; } assert l1.intersectsLine(l2); Point2D.Double l1a = (Point2D.Double) l1.getP1(); Point2D.Double l1b = (Point2D.Double) l1.getP2(); Point2D.Double l2a = (Point2D.Double) l2.getP1(); Point2D.Double l2b = (Point2D.Double) l2.getP2(); if (l1a.equals(l2a) == false && l1a.equals(l2b) == false && l1b.equals(l2a) == false && l1b.equals(l2b) == false) { return true; } if (l1a.equals(l2b)) { final Point2D.Double tmp = l2a; l2a = l2b; l2b = tmp; } else if (l2a.equals(l1b)) { final Point2D.Double tmp = l1a; l1a = l1b; l1b = tmp; } else if (l1b.equals(l2b)) { Point2D.Double tmp = l2a; l2a = l2b; l2b = tmp; tmp = l1a; l1a = l1b; l1b = tmp; } assert l1a.equals(l2a); return false; } final double getMindist(Point2D.Double pt) { double result = Double.MAX_VALUE; for (Point2D p : points.keySet()) { if (pt.equals(p)) { continue; } final double v = p.distance(pt); if (v < 1E-4) { throw new IllegalStateException(); } result = Math.min(result, v); } for (Line2D line : lines) { if (line.getP1().equals(pt) || line.getP2().equals(pt)) { continue; } final double v = line.ptSegDist(pt); if (result < 1E-4) { throw new IllegalStateException("pt=" + pt + " line=" + GeomUtils.toString(line)); } result = Math.min(result, v); } if (result == 0) { throw new IllegalStateException(); } // Log.println("getMindist=" + result); return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/Polyline2.java000066400000000000000000000063451312650303100253250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.awt.Color; import java.awt.Graphics2D; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.awt.geom.QuadCurve2D; import java.util.ArrayList; import java.util.List; public class Polyline2 { private final List lines = new ArrayList(); private Point2D lastCurrent; private final Point2D end; public Polyline2(Point2D start, Point2D end) { lastCurrent = start; this.end = end; } public void addLine(Line2D.Double newLine) { // Log.println("# Polyline2::addLine " + // GeomUtils.toString(newLine)); if (lastCurrent.equals(newLine.getP1()) == false) { lines.add(new Line2D.Double(lastCurrent, newLine.getP1())); } lines.add(newLine); lastCurrent = newLine.getP2(); } private boolean debug = false; public void draw(Graphics2D g2d) { close(); if (debug) { g2d.setColor(Color.GREEN); drawDebug(g2d); } g2d.setColor(Color.BLUE); final List centers = new ArrayList(); for (Line2D.Double l : lines) { centers.add(GeomUtils.getCenter(l)); } g2d.draw(new Line2D.Double(lines.get(0).getP1(), centers.get(0))); g2d.draw(new Line2D.Double(centers.get(centers.size() - 1), end)); for (int i = 0; i < lines.size() - 1; i++) { final Point2D c1 = centers.get(i); final Point2D c2 = centers.get(i + 1); final Point2D ctrl = lines.get(i).getP2(); assert ctrl.equals(lines.get(i + 1).getP1()); final QuadCurve2D.Double quad = new QuadCurve2D.Double(c1.getX(), c1.getY(), ctrl.getX(), ctrl.getY(), c2 .getX(), c2.getY()); g2d.draw(quad); } if (debug) { for (Point2D.Double c : centers) { GeomUtils.fillPoint2D(g2d, c); } } } private void drawDebug(Graphics2D g2d) { for (Line2D.Double l : lines) { g2d.draw(l); GeomUtils.fillPoint2D(g2d, l.getP1()); GeomUtils.fillPoint2D(g2d, l.getP2()); } } private void close() { if (lastCurrent.equals(end) == false) { lines.add(new Line2D.Double(lastCurrent, end)); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/RectanglesCollection.java000066400000000000000000000125531312650303100275510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class RectanglesCollection implements Iterable { private final List areas = new ArrayList(); private final SortedListImpl sortedX1; private final SortedListImpl sortedX2; private final SortedListImpl sortedY1; private final SortedListImpl sortedY2; private Rectangle2D.Double max = null; public RectanglesCollection() { sortedX1 = new SortedListImpl(new Measurer() { public int getMeasure(Rectangle2D.Double data) { return (int) data.x; } }); sortedX2 = new SortedListImpl(new Measurer() { public int getMeasure(Rectangle2D.Double data) { return (int) (data.x + data.width); } }); sortedY1 = new SortedListImpl(new Measurer() { public int getMeasure(Rectangle2D.Double data) { return (int) data.y; } }); sortedY2 = new SortedListImpl(new Measurer() { public int getMeasure(Rectangle2D.Double data) { return (int) (data.y + data.height); } }); } public RectanglesCollection(Rectangle2D.Double rect) { this(); add(rect); } public double getSurf() { if (max == null) { return 0; } return max.getWidth() * max.getHeight(); } public void add(Rectangle2D.Double rect) { areas.add(rect); // sortedX1.add(rect); // sortedX2.add(rect); // sortedY1.add(rect); // sortedY2.add(rect); if (max == null) { max = rect; } else { max = (Rectangle2D.Double) max.createUnion(rect); } } public Iterator iterator() { return areas.iterator(); } public boolean intersect(RectanglesCollection other) { if (this.size() > other.size()) { return intersectSeveral(this, other); } return intersectSeveral(other, this); } static private long TPS1; static private long TPS2; private static boolean intersectSeveral(RectanglesCollection large, RectanglesCollection compact) { assert large.size() >= compact.size(); final long start = System.currentTimeMillis(); try { for (Rectangle2D.Double r : compact) { if (large.intersectSimple(r)) { return true; } } return false; } finally { TPS2 += System.currentTimeMillis() - start; } } private boolean intersectSimple(Rectangle2D.Double rect) { final long start = System.currentTimeMillis(); try { if (max == null || max.intersects(rect) == false) { return false; } for (Rectangle2D.Double r : areas) { if (rect.intersects(r)) { return true; } } return false; } finally { TPS1 += System.currentTimeMillis() - start; } } private boolean intersectSimpleOld(Rectangle2D.Double rect) { final long start = System.currentTimeMillis(); try { if (max == null || max.intersects(rect) == false) { return false; } final List lX1 = sortedX1.lesserOrEquals((int) (rect.x + rect.width)); List lmin = lX1; if (lX1.size() == 0) { return false; } final List lX2 = sortedX2.biggerOrEquals((int) rect.x); if (lX2.size() == 0) { return false; } if (lX2.size() < lmin.size()) { lmin = lX2; } final List lY1 = sortedY1.lesserOrEquals((int) (rect.y + rect.height)); if (lY1.size() == 0) { return false; } if (lY1.size() < lmin.size()) { lmin = lY1; } final List lY2 = sortedY2.biggerOrEquals((int) rect.y); if (lY2.size() == 0) { return false; } if (lY2.size() < lmin.size()) { lmin = lY2; } for (Rectangle2D.Double r : lmin) { if (rect.intersects(r)) { return true; } } return false; } finally { TPS1 += System.currentTimeMillis() - start; } } public int size() { return areas.size(); } public void addAll(RectanglesCollection other) { for (Rectangle2D.Double r : other.areas) { this.add(r); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/Singularity2.java000066400000000000000000000110001312650303100260240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.TreeSet; public class Singularity2 { private final TreeSet angles = new TreeSet(); final private Point2D.Double center; public Singularity2(Point2D.Double center) { this.center = center; } @Override public String toString() { final StringBuilder sb = new StringBuilder(center.toString()); for (Double a : angles) { final int degree = (int) (a * 180 / Math.PI); sb.append(' '); sb.append(degree); } return sb.toString(); } public void addLineSegment(Line2D.Double seg) { if (seg.getP1().equals(center)) { angles.add(convertAngle(getAngle(seg))); } else if (seg.getP2().equals(center)) { angles.add(convertAngle(getOppositeAngle(seg))); } else { throw new IllegalArgumentException(); } assert betweenZeroAndTwoPi(); } static final double getAngle(Line2D.Double line) { if (line.getP1().equals(line.getP2())) { throw new IllegalArgumentException(); } return Math.atan2(line.getP2().getY() - line.getP1().getY(), line.getP2().getX() - line.getP1().getX()); } static final double getOppositeAngle(Line2D.Double line) { return Math.atan2(line.getP1().getY() - line.getP2().getY(), line.getP1().getX() - line.getP2().getX()); } static double convertAngle(double a) { while (a < 0) { a += 2 * Math.PI; } return a; } private boolean betweenZeroAndTwoPi() { for (Double d : angles) { assert d >= 0; assert d < 2 * Math.PI; } return true; } List getAngles() { return new ArrayList(angles); } public boolean crossing(Point2D.Double direction1, Point2D.Double direction2) { final boolean result = crossingInternal(direction1, direction2); assert result == crossingInternal(direction2, direction1); return result; } private boolean crossingInternal(Point2D.Double direction1, Point2D.Double direction2) { if (angles.size() < 2) { return false; } final double angle1 = convertAngle(getAngle(new Line2D.Double(center, direction1))); final double angle2 = convertAngle(getAngle(new Line2D.Double(center, direction2))); Double last = null; for (Double current : angles) { if (last != null) { assert last < current; if (isBetween(angle1, last, current) && isBetween(angle2, last, current)) { return false; } } last = current; } final double first = angles.first(); if ((angle1 <= first || angle1 >= last) && (angle2 <= first || angle2 >= last)) { return false; } return true; } private boolean isBetween(double test, double v1, double v2) { assert v1 < v2; return test >= v1 && test <= v2; } protected final Point2D.Double getCenter() { return center; } public void merge(Singularity2 other) { this.angles.addAll(other.angles); } public List getNeighborhoods() { if (angles.size() == 0) { return Collections.singletonList(new Neighborhood2(center)); } final List result = new ArrayList(); double last = angles.last(); for (Double currentAngle : angles) { result.add(new Neighborhood2(center, last, currentAngle)); last = currentAngle; } return Collections.unmodifiableList(result); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/SortedList.java000066400000000000000000000027061312650303100255410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.util.List; public interface SortedList extends Iterable { public void add(V data); public List lesserOrEquals(int v); public List biggerOrEquals(int v); } plantuml-1.2017.15/src/net/sourceforge/plantuml/graph2/SortedListImpl.java000066400000000000000000000066521312650303100263670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graph2; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Iterator; import java.util.List; public class SortedListImpl implements SortedList { static class NullableAndEvenMeasurer implements Measurer { private final Measurer wrapped; private final int valueForNull; NullableAndEvenMeasurer(Measurer wrapped, int valueForNull, boolean plus) { this.wrapped = wrapped; if (plus) { this.valueForNull = valueForNull * 2 + 1; } else { this.valueForNull = valueForNull * 2 - 1; } } public int getMeasure(V data) { if (data == null) { return valueForNull; } return wrapped.getMeasure(data) * 2; } } private final Measurer measurer; private final List all = new ArrayList(); private final Comparator comparator; public SortedListImpl(Measurer m) { this.measurer = m; this.comparator = new Comparator() { public int compare(V o1, V o2) { final int v1 = measurer.getMeasure(o1); final int v2 = measurer.getMeasure(o2); return v1 - v2; } }; } public void add(V data) { final int pos = Collections.binarySearch(all, data, comparator); if (pos >= 0) { all.add(pos, data); } else { all.add(-pos - 1, data); } assert isSorted(); } private int getPos(int v, boolean plus) { final Measurer m = new NullableAndEvenMeasurer(measurer, v, plus); final Comparator myComp = new Comparator() { public int compare(V o1, V o2) { final int v1 = m.getMeasure(o1); final int v2 = m.getMeasure(o2); return v1 - v2; } }; final int pos = Collections.binarySearch(all, null, myComp); assert pos < 0; return -pos - 1; } public List lesserOrEquals(int v) { return all.subList(0, getPos(v, true)); } public List biggerOrEquals(int v) { return all.subList(getPos(v, false), all.size()); } private boolean isSorted() { for (int i = 0; i < all.size() - 1; i++) { final int v1 = measurer.getMeasure(all.get(i)); final int v2 = measurer.getMeasure(all.get(i + 1)); if (v1 > v2) { return false; } } return true; } public Iterator iterator() { return all.iterator(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/000077500000000000000000000000001312650303100230275ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/AbstractTextBlock.java000066400000000000000000000030751312650303100272620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Rectangle2D; public abstract class AbstractTextBlock implements TextBlock { public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { throw new UnsupportedOperationException("member=" + member + " " + getClass().toString()); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/AddStyle.java000066400000000000000000000035001312650303100254010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; public class AddStyle implements FontChange { private final FontStyle style; private final HtmlColor extendedColor; public AddStyle(FontStyle style, HtmlColor extendedColor) { this.style = style; this.extendedColor = extendedColor; } public AddStyle(String s) { this(FontStyle.getStyle(s), FontStyle.getStyle(s).getExtendedColor(s)); } public FontConfiguration apply(FontConfiguration initial) { initial = initial.add(style); if (extendedColor != null) { initial = initial.changeExtendedColor(extendedColor); } return initial; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/CircledCharacter.java000066400000000000000000000074731312650303100270670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class CircledCharacter extends AbstractTextBlock implements TextBlock { private final String c; private final UFont font; private final HtmlColor innerCircle; private final HtmlColor circle; private final HtmlColor fontColor; private final double radius; public CircledCharacter(char c, double radius, UFont font, HtmlColor innerCircle, HtmlColor circle, HtmlColor fontColor) { this.c = "" + c; this.radius = radius; this.font = font; this.innerCircle = innerCircle; this.circle = circle; this.fontColor = fontColor; } // public void draw(ColorMapper colorMapper, Graphics2D g2d, int x, int y, double dpiFactor) { // drawU(new UGraphicG2d(colorMapper, g2d, null, 1.0), x, y); // } public void drawU(UGraphic ug) { if (circle != null) { ug = ug.apply(new UChangeColor(circle)); } // final HtmlColor back = ug.getParam().getBackcolor(); ug = ug.apply(new UChangeBackColor(innerCircle)); ug.draw(new UEllipse(radius * 2, radius * 2)); ug = ug.apply(new UChangeColor(fontColor)); ug = ug.apply(new UTranslate(radius, radius)); ug.draw(new UCenteredCharacter(c.charAt(0), font)); } final public double getPreferredWidth(StringBounder stringBounder) { return 2 * radius; } final public double getPreferredHeight(StringBounder stringBounder) { return 2 * radius; } // private PathIterator getPathIteratorCharacter(FontRenderContext frc) { // final TextLayout textLayout = new TextLayout(c, font.getFont(), frc); // final Shape s = textLayout.getOutline(null); // return s.getPathIterator(null); // } // // private UPath getUPath(FontRenderContext frc) { // final UPath result = new UPath(); // // final PathIterator path = getPathIteratorCharacter(frc); // // final double coord[] = new double[6]; // while (path.isDone() == false) { // final int code = path.currentSegment(coord); // result.add(coord, USegmentType.getByCode(code)); // path.next(); // } // // return result; // } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(getPreferredWidth(stringBounder), getPreferredHeight(stringBounder)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/ColorAndSizeChange.java000066400000000000000000000047121312650303100273400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; class ColorAndSizeChange implements FontChange { static final Pattern2 colorPattern = MyPattern.cmpile("(?i)color\\s*=\\s*[%g]?(#[0-9a-fA-F]{6}|\\w+)[%g]?"); static final Pattern2 sizePattern = MyPattern.cmpile("(?i)size\\s*=\\s*[%g]?(\\d+)[%g]?"); private final HtmlColor color; private final Integer size; ColorAndSizeChange(String s) { final Matcher2 matcherColor = colorPattern.matcher(s); if (matcherColor.find()) { color = HtmlColorSet.getInstance().getColorIfValid(matcherColor.group(1)); } else { color = null; } final Matcher2 matcherSize = sizePattern.matcher(s); if (matcherSize.find()) { size = new Integer(matcherSize.group(1)); } else { size = null; } } HtmlColor getColor() { return color; } Integer getSize() { return size; } public FontConfiguration apply(FontConfiguration initial) { FontConfiguration result = initial; if (color != null) { result = result.changeColor(color); } if (size != null) { result = result.changeSize(size); } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/ColorChange.java000066400000000000000000000037711312650303100260660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; class ColorChange implements FontChange { static private final Pattern2 colorPattern = MyPattern.cmpile("(?i)" + Splitter.fontColorPattern2); private final HtmlColor color; ColorChange(String s) { final Matcher2 matcherColor = colorPattern.matcher(s); if (matcherColor.find() == false) { throw new IllegalArgumentException(); } this.color = HtmlColorSet.getInstance().getColorIfValid(matcherColor.group(1)); } HtmlColor getColor() { return color; } public FontConfiguration apply(FontConfiguration initial) { return initial.changeColor(color); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/DateEventUtils.java000066400000000000000000000201551312650303100265750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; public class DateEventUtils { // private static final String PARIS = "A thought for those who died in Paris the 13th November 2015."; // // private static TextBlock addEvent(final TextBlock textBlock, final HtmlColor color) { // try { // final String today = new SimpleDateFormat("MM-dd", Locale.US).format(new Date()); // if ("11-05".equals(today)) { // final List asList = Arrays.asList("November 5th, 1955", // "Doc Brown's discovery of the Flux Capacitor, that makes time-travel possible."); // return TextBlockUtils.mergeTB(textBlock, getComment(asList, color), HorizontalAlignment.LEFT); // } else if ("08-29".equals(today)) { // final List asList = Arrays.asList("August 29th, 1997", // "Skynet becomes self-aware at 02:14 AM Eastern Time."); // return TextBlockUtils.mergeTB(textBlock, getComment(asList, color), HorizontalAlignment.LEFT); // } else if ("06-29".equals(today)) { // final List asList = Arrays.asList("June 29th, 1975", // "\"It was the first time in history that anyone had typed", // "a character on a keyboard and seen it show up on their", // "own computer's screen right in front of them.\"", "\t\t\t\t\t\t\t\t\t\tSteve Wozniak"); // return TextBlockUtils.mergeTB(textBlock, getComment(asList, color), HorizontalAlignment.LEFT); // } else if ("01-07".equals(today) || ("01-08".equals(today) && getDayOfWeek() == Calendar.MONDAY)) { // return addCharlie(textBlock); // } else if ("11-13".equals(today) || ("11-14".equals(today) && getDayOfWeek() == Calendar.MONDAY)) { // return addMemorial(textBlock, color); // } // } catch (Throwable t) { // Log.debug("Error " + t); // } // return textBlock; // } // // private synchronized static int getDayOfWeek() { // return Calendar.getInstance().get(Calendar.DAY_OF_WEEK); // } // // private static TextBlock addMemorial(TextBlock textBlock, HtmlColor color) { // final Portrait portrait = Portraits.getOne(); // if (portrait == null) { // return textBlock; // } // final BufferedImage im = portrait.getBufferedImage(); // if (im == null) { // return textBlock; // } // // final String name = portrait.getName(); // final String quote = portrait.getQuote(); // final String age = "" + portrait.getAge() + " years old"; // final UFont font12 = new UFont("SansSerif", Font.BOLD, 12); // TextBlock comment = Display.create(name, age, quote).create( // new FontConfiguration(font12, color, HtmlColorUtils.BLUE, true), HorizontalAlignment.LEFT, // new SpriteContainerEmpty()); // comment = TextBlockUtils.withMinWidth(TextBlockUtils.withMargin(comment, 4, 4), 800, HorizontalAlignment.LEFT); // // final TextBlock bottom0 = getComment(Arrays.asList(PARIS), color); // final TextBlock bottom1 = new AbstractTextBlock() { // private double margin = 10; // // public void drawU(UGraphic ug) { // ug = ug.apply(new UTranslate(0, margin)); // ug.draw(new UImage(im)); // if (ug instanceof LimitFinder) { // return; // } // Portraits.nextOne(); // } // // public Dimension2D calculateDimension(StringBounder stringBounder) { // return new Dimension2DDouble(im.getWidth(), margin + im.getHeight()); // } // }; // final TextBlock bottom = TextBlockUtils.mergeTB(bottom0, // TextBlockUtils.mergeLR(bottom1, comment, VerticalAlignment.CENTER), HorizontalAlignment.LEFT); // final TextBlock mergeTB = TextBlockUtils.mergeTB(textBlock, bottom, HorizontalAlignment.LEFT); // return addMajesty(mergeTB, color); // } // // public static TextBlock addMajesty(TextBlock block, HtmlColor color) { // final UFont font12 = new UFont("SansSerif", Font.BOLD, 12); // final String arabic1 = "\u0625\u0646 \u0627\u0644\u0625\u0631\u0647\u0627\u0628\u064A\u064A\u0646 \u0628\u0627\u0633\u0645 \u0627\u0644\u0625\u0633\u0644\u0627\u0645 \u0644\u064A\u0633\u0648\u0627 \u0645\u0633\u0644\u0645\u064A\u0646\u060C \u0648\u0644\u0627 \u064A\u0631\u0628\u0637\u0647\u0645 \u0628\u0627\u0644\u0625\u0633\u0644\u0627\u0645 \u0625\u0644\u0627 \u0627\u0644\u062F\u0648\u0627\u0641\u0639 \u0627\u0644\u062A\u064A \u064A\u0631\u0643\u0628\u0648\u0646 \u0639\u0644\u064A\u0647\u0627 \u0644\u062A\u0628\u0631\u064A\u0631 \u062C\u0631\u0627\u0626\u0645\u0647\u0645 \u0648\u062D\u0645\u0627\u0642\u0627\u062A\u0647\u0645."; // final String arabic2 = "\u0641\u0647\u0645 \u0642\u0648\u0645 \u0636\u0627\u0644\u0648\u0646\u060C \u0645\u0635\u064A\u0631\u0647\u0645 \u062C\u0647\u0646\u0645 \u062E\u0627\u0644\u062F\u064A\u0646 \u0641\u064A\u0647\u0627 \u0623\u0628\u062F\u0627."; // final String english1 = "Those who engage in terrorism, in the name of Islam, are not Muslims."; // final String english2 = "Their only link to Islam is the pretexts they use to justify their crimes and their folly."; // final String english3 = "They have strayed from the right path, and their fate is to dwell forever in hell."; // final TextBlock arabic = Display // .create(" ", // arabic1, // arabic2, // "\u0635\u0627\u062D\u0628 \u0627\u0644\u062C\u0644\u0627\u0644\u0629 \u0627\u0644\u0645\u0644\u0643 \u0645\u062D\u0645\u062F \u0627\u0644\u0633\u0627\u062F\u0633 \u0623\u0645\u064A\u0631 \u0627\u0644\u0645\u0624\u0645\u0646\u064A\u0646 \u0646\u0635\u0631\u0647 \u0627\u0644\u0644\u0647") // .create(new FontConfiguration(font12, color, HtmlColorUtils.BLUE, true), HorizontalAlignment.RIGHT, // new SpriteContainerEmpty()); // final TextBlock english = Display.create(english1, english2, english3, // "-- His Majesty the King Mohammed the Sixth, Commander of the Faithful").create( // new FontConfiguration(font12, color, HtmlColorUtils.BLUE, true), HorizontalAlignment.LEFT, // new SpriteContainerEmpty()); // return TextBlockUtils.mergeTB(block, TextBlockUtils.mergeTB(arabic, english, HorizontalAlignment.LEFT), // HorizontalAlignment.LEFT); // } // // private static TextBlock addCharlie(TextBlock textBlock) { // final TextBlock charlie = new AbstractTextBlock() { // private final BufferedImage charlie = PSystemVersion.getCharlieImage(); // // public void drawU(UGraphic ug) { // ug.draw(new UImage(charlie)); // } // // public Dimension2D calculateDimension(StringBounder stringBounder) { // return new Dimension2DDouble(charlie.getWidth(), charlie.getHeight()); // } // }; // return TextBlockUtils.mergeTB(charlie, textBlock, HorizontalAlignment.LEFT); // // } // // public static TextBlock getComment(final List asList, HtmlColor color) { // final UFont font = UFont.sansSerif(14).bold(); // TextBlock comment = Display.create(asList).create( // new FontConfiguration(font, color, HtmlColorUtils.BLUE, true), HorizontalAlignment.LEFT, // new SpriteContainerEmpty()); // comment = TextBlockUtils.withMargin(comment, 4, 4); // comment = new SimpleTextBlockBordered(comment, color); // comment = TextBlockUtils.withMargin(comment, 10, 10); // return comment; // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/DisplayUtils.java000066400000000000000000000034721312650303100263260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.SpriteContainer; import net.sourceforge.plantuml.cucadiagram.Display; public class DisplayUtils { private static Display breakLines(Display texts, FontConfiguration fontConfiguration, SpriteContainer spriteContainer, double maxWidth) { if (texts.size() != 1) { return texts; } final CharSequence s = texts.get(0); Display result = Display.empty(); final int nb = s.length() / 2; result = result.add(s.subSequence(0, nb)); result = result.add(s.subSequence(nb + 1, s.length())); return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/EmbededSystemLine.java000066400000000000000000000067431312650303100272460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.List; import javax.imageio.ImageIO; import net.sourceforge.plantuml.BlockUml; import net.sourceforge.plantuml.CharSequence2; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.EmbededDiagram; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.preproc.Defines; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UShape; class EmbededSystemLine extends AbstractTextBlock implements Line { final private List lines2; public EmbededSystemLine(EmbededDiagram sys) { this.lines2 = sys.getLines().as2(); } public Dimension2D calculateDimension(StringBounder stringBounder) { try { final BufferedImage im = getImage(); return new Dimension2DDouble(im.getWidth(), im.getHeight()); } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } return new Dimension2DDouble(42, 42); } public void drawU(UGraphic ug) { try { final BufferedImage im = getImage(); final UShape image = new UImage(im); ug.draw(image); } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } } private BufferedImage getImage() throws IOException, InterruptedException { final Diagram system = getSystem(); final ByteArrayOutputStream os = new ByteArrayOutputStream(); system.exportDiagram(os, 0, new FileFormatOption(FileFormat.PNG)); os.close(); final ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray()); final BufferedImage im = ImageIO.read(is); is.close(); return im; } public HorizontalAlignment getHorizontalAlignment() { return HorizontalAlignment.LEFT; } private Diagram getSystem() throws IOException, InterruptedException { final BlockUml blockUml = new BlockUml(lines2, 0, Defines.createEmpty()); return blockUml.getDiagram(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/ExposantChange.java000066400000000000000000000030631312650303100266030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; class ExposantChange implements FontChange { private final FontPosition fontPosition; ExposantChange(FontPosition fontPosition) { this.fontPosition = fontPosition; } public FontConfiguration apply(FontConfiguration initial) { return initial.changeFontPosition(fontPosition); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/FontChange.java000066400000000000000000000025701312650303100257120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; public interface FontChange extends HtmlCommand { FontConfiguration apply(FontConfiguration initial); } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/FontConfiguration.java000066400000000000000000000222321312650303100273310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.util.EnumSet; import java.util.Map; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.ugraphic.UFont; public class FontConfiguration { private final EnumSet styles; private final UFont currentFont; private final UFont motherFont; private final HtmlColor motherColor; private final HtmlColor hyperlinkColor; private final HtmlColor currentColor; private final HtmlColor extendedColor; private final FontPosition fontPosition; private final SvgAttributes svgAttributes; private final boolean hyperlink; private final boolean useUnderlineForHyperlink; private final int tabSize; public FontConfiguration(UFont font, HtmlColor color, HtmlColor hyperlinkColor, boolean useUnderlineForHyperlink) { this(font, color, hyperlinkColor, useUnderlineForHyperlink, 8); } public FontConfiguration(UFont font, HtmlColor color, HtmlColor hyperlinkColor, boolean useUnderlineForHyperlink, int tabSize) { this(getStyles(font), font, color, font, color, null, FontPosition.NORMAL, new SvgAttributes(), false, hyperlinkColor, useUnderlineForHyperlink, tabSize); } public static FontConfiguration blackBlueTrue(UFont font) { return new FontConfiguration(font, HtmlColorUtils.BLACK, HtmlColorUtils.BLUE, true, 8); } public FontConfiguration(ISkinParam skinParam, FontParam fontParam, Stereotype stereo) { this(SkinParamUtils.getFont(skinParam, fontParam, stereo), SkinParamUtils.getFontColor(skinParam, fontParam, stereo), skinParam.getHyperlinkColor(), skinParam.useUnderlineForHyperlink(), skinParam.getTabSize()); } // --- public final boolean useUnderlineForHyperlink() { return useUnderlineForHyperlink; } public final HtmlColor getHyperlinkColor() { return hyperlinkColor; } // --- private static EnumSet getStyles(UFont font) { final boolean bold = font.isBold(); final boolean italic = font.isItalic(); if (bold && italic) { return EnumSet.of(FontStyle.ITALIC, FontStyle.BOLD); } if (bold) { return EnumSet.of(FontStyle.BOLD); } if (italic) { return EnumSet.of(FontStyle.ITALIC); } return EnumSet.noneOf(FontStyle.class); } @Override public String toString() { return styles.toString() + " " + currentColor; } private FontConfiguration(EnumSet styles, UFont motherFont, HtmlColor motherColor, UFont currentFont, HtmlColor currentColor, HtmlColor extendedColor, FontPosition fontPosition, SvgAttributes svgAttributes, boolean hyperlink, HtmlColor hyperlinkColor, boolean useUnderlineForHyperlink, int tabSize) { this.styles = styles; this.currentFont = currentFont; this.motherFont = motherFont; this.currentColor = currentColor; this.motherColor = motherColor; this.extendedColor = extendedColor; this.fontPosition = fontPosition; this.svgAttributes = svgAttributes; this.hyperlink = hyperlink; this.hyperlinkColor = hyperlinkColor; this.useUnderlineForHyperlink = useUnderlineForHyperlink; this.tabSize = tabSize; } public FontConfiguration forceFont(UFont newFont, HtmlColor htmlColorForStereotype) { if (newFont == null) { return add(FontStyle.ITALIC); } FontConfiguration result = new FontConfiguration(styles, newFont, motherColor, newFont, currentColor, extendedColor, fontPosition, svgAttributes, hyperlink, hyperlinkColor, useUnderlineForHyperlink, tabSize); if (htmlColorForStereotype != null) { result = result.changeColor(htmlColorForStereotype); } return result; } public FontConfiguration changeAttributes(SvgAttributes toBeAdded) { return new FontConfiguration(styles, motherFont, motherColor, currentFont, currentColor, extendedColor, fontPosition, svgAttributes.add(toBeAdded), hyperlink, hyperlinkColor, useUnderlineForHyperlink, tabSize); } private FontConfiguration withHyperlink() { return new FontConfiguration(styles, motherFont, motherColor, currentFont, currentColor, extendedColor, fontPosition, svgAttributes, true, hyperlinkColor, useUnderlineForHyperlink, tabSize); } public FontConfiguration changeColor(HtmlColor htmlColor) { return new FontConfiguration(styles, motherFont, motherColor, currentFont, htmlColor, extendedColor, fontPosition, svgAttributes, hyperlink, hyperlinkColor, useUnderlineForHyperlink, tabSize); } public FontConfiguration mute(Colors colors) { if (colors == null) { throw new IllegalArgumentException(); } final HtmlColor color = colors.getColor(ColorType.TEXT); if (color == null) { return this; } return changeColor(color); } FontConfiguration changeExtendedColor(HtmlColor newExtendedColor) { return new FontConfiguration(styles, motherFont, motherColor, currentFont, currentColor, newExtendedColor, fontPosition, svgAttributes, hyperlink, hyperlinkColor, useUnderlineForHyperlink, tabSize); } public FontConfiguration changeSize(float size) { return new FontConfiguration(styles, motherFont, motherColor, currentFont.withSize(size), currentColor, extendedColor, fontPosition, svgAttributes, hyperlink, hyperlinkColor, useUnderlineForHyperlink, tabSize); } public FontConfiguration bigger(double delta) { return changeSize((float) (currentFont.getSize() + delta)); } public FontConfiguration changeFontPosition(FontPosition fontPosition) { return new FontConfiguration(styles, motherFont, motherColor, currentFont, currentColor, extendedColor, fontPosition, svgAttributes, hyperlink, hyperlinkColor, useUnderlineForHyperlink, tabSize); } public FontConfiguration changeFamily(String family) { return new FontConfiguration(styles, motherFont, motherColor, new UFont(family, currentFont.getStyle(), currentFont.getSize()), currentColor, extendedColor, fontPosition, svgAttributes, hyperlink, hyperlinkColor, useUnderlineForHyperlink, tabSize); } public FontConfiguration resetFont() { return new FontConfiguration(styles, motherFont, motherColor, motherFont, motherColor, null, FontPosition.NORMAL, new SvgAttributes(), hyperlink, hyperlinkColor, useUnderlineForHyperlink, tabSize); } FontConfiguration add(FontStyle style) { final EnumSet r = styles.clone(); if (style == FontStyle.PLAIN) { r.clear(); } r.add(style); return new FontConfiguration(r, motherFont, motherColor, currentFont, currentColor, extendedColor, fontPosition, svgAttributes, hyperlink, hyperlinkColor, useUnderlineForHyperlink, tabSize); } public FontConfiguration italic() { return add(FontStyle.ITALIC); } public FontConfiguration bold() { return add(FontStyle.BOLD); } public FontConfiguration underline() { return add(FontStyle.UNDERLINE); } public FontConfiguration hyperlink() { if (useUnderlineForHyperlink) { return add(FontStyle.UNDERLINE).withHyperlink(); } return withHyperlink(); } FontConfiguration remove(FontStyle style) { final EnumSet r = styles.clone(); r.remove(style); return new FontConfiguration(r, motherFont, motherColor, currentFont, currentColor, extendedColor, fontPosition, svgAttributes, hyperlink, hyperlinkColor, useUnderlineForHyperlink, tabSize); } public UFont getFont() { UFont result = currentFont; for (FontStyle style : styles) { result = style.mutateFont(result); } return fontPosition.mute(result); } public HtmlColor getColor() { if (hyperlink) { return hyperlinkColor; } return currentColor; } public HtmlColor getExtendedColor() { return extendedColor; } public boolean containsStyle(FontStyle style) { return styles.contains(style); } public int getSpace() { return fontPosition.getSpace(); } public Map getAttributes() { return svgAttributes.attributes(); } public double getSize2D() { return currentFont.getSize2D(); } public int getTabSize() { return tabSize; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/FontFamilyChange.java000066400000000000000000000037531312650303100270600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; class FontFamilyChange implements FontChange { static private final Pattern2 colorPattern = MyPattern.cmpile("(?i)" + Splitter.fontFamilyPattern); private final String family; FontFamilyChange(String s) { final Matcher2 matcherColor = colorPattern.matcher(s); if (matcherColor.find() == false) { throw new IllegalArgumentException(); } this.family = StringUtils.trin(matcherColor.group(1)); } public FontConfiguration apply(FontConfiguration initial) { return initial.changeFamily(family); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/FontPosition.java000066400000000000000000000035341312650303100263320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.ugraphic.UFont; public enum FontPosition { NORMAL, EXPOSANT, INDICE; public int getSpace() { if (this == EXPOSANT) { return -6; } if (this == INDICE) { return 3; } return 0; } public UFont mute(UFont font) { if (this == NORMAL) { return font; } int size = font.getSize() - 3; if (size < 2) { size = 2; } return font.withSize((float) size); } public String getHtmlTag() { if (this == EXPOSANT) { return "sup"; } if (this == INDICE) { return "sub"; } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/FontStyle.java000066400000000000000000000102141312650303100256170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.Font; import java.util.EnumSet; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.ugraphic.UFont; public enum FontStyle { PLAIN, ITALIC, BOLD, UNDERLINE, STRIKE, WAVE, BACKCOLOR; public UFont mutateFont(UFont font) { if (this == PLAIN) { return font.withStyle(Font.PLAIN); } if (this == ITALIC) { return font.withStyle(font.getStyle() | Font.ITALIC); } if (this == BOLD) { return font.withStyle(font.getStyle() | Font.BOLD); } return font; } public String getActivationPattern() { if (this == PLAIN) { return "\\<[pP][lL][aA][iI][nN]\\>"; } if (this == ITALIC) { return "\\<[iI]\\>"; } if (this == BOLD) { return "\\<[bB]\\>"; } if (this == UNDERLINE) { return "\\<[uU](?::(#[0-9a-fA-F]{6}|\\w+))?\\>"; } if (this == WAVE) { return "\\<[wW](?::(#[0-9a-fA-F]{6}|\\w+))?\\>"; } if (this == BACKCOLOR) { // return "\\<[bB][aA][cC][kK](?::(#[0-9a-fA-F]{6}|\\w+))?\\>"; return "\\<[bB][aA][cC][kK](?::(#?\\w+(?:[-\\\\|/]#?\\w+)?))?\\>"; } if (this == STRIKE) { return "\\<(?:s|S|strike|STRIKE|del|DEL)(?::(#[0-9a-fA-F]{6}|\\w+))?\\>"; } return null; } public boolean canHaveExtendedColor() { if (this == UNDERLINE) { return true; } if (this == WAVE) { return true; } if (this == BACKCOLOR) { return true; } if (this == STRIKE) { return true; } return false; } public String getCreoleSyntax() { if (this == ITALIC) { return "//"; } if (this == BOLD) { return "\\*\\*"; } if (this == UNDERLINE) { return "__"; } if (this == WAVE) { return "~~"; } if (this == STRIKE) { return "--"; } throw new UnsupportedOperationException(); } public HtmlColor getExtendedColor(String s) { final Matcher2 m = MyPattern.cmpile(getActivationPattern()).matcher(s); if (m.find() == false || m.groupCount() != 1) { return null; } final String color = m.group(1); if (HtmlColorSet.getInstance().getColorIfValid(color) != null) { return HtmlColorSet.getInstance().getColorIfValid(color); } return null; } public String getDeactivationPattern() { if (this == PLAIN) { return "\\"; } if (this == ITALIC) { return "\\"; } if (this == BOLD) { return "\\"; } if (this == UNDERLINE) { return "\\"; } if (this == WAVE) { return "\\"; } if (this == BACKCOLOR) { return "\\"; } if (this == STRIKE) { return "\\"; } return null; } public static FontStyle getStyle(String line) { for (FontStyle style : EnumSet.allOf(FontStyle.class)) { if (line.matches(style.getActivationPattern()) || line.matches(style.getDeactivationPattern())) { return style; } } throw new IllegalArgumentException(line); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/GraphicPosition.java000066400000000000000000000025651312650303100270040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; public enum GraphicPosition { BOTTOM, BACKGROUND_CORNER_BOTTOM_RIGHT, BACKGROUND_CORNER_TOP_RIGHT } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/GraphicStrings.java000066400000000000000000000144261312650303100266300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.Font; import java.awt.geom.Dimension2D; import java.awt.image.BufferedImage; import java.util.List; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.SpriteContainerEmpty; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.svek.IEntityImage; import net.sourceforge.plantuml.svek.Margins; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UTranslate; public class GraphicStrings extends AbstractTextBlock implements IEntityImage { private final double margin = 5; private final HtmlColor background; private final UFont font; private final HtmlColor maincolor; private final HtmlColor hyperlinkColor = HtmlColorUtils.BLUE; private final boolean useUnderlineForHyperlink = true; private final List strings; private final BufferedImage image; private final GraphicPosition position; public static IEntityImage createForError(List strings, boolean useRed) { if (useRed) { return new GraphicStrings(strings, UFont.sansSerif(14).bold(), HtmlColorUtils.BLACK, HtmlColorUtils.RED_LIGHT, null, null); } return new GraphicStrings(strings, UFont.sansSerif(14).bold(), HtmlColorSet.getInstance().getColorIfValid( "#33FF02"), HtmlColorUtils.BLACK, null, null); } public static TextBlockBackcolored createGreenOnBlackMonospaced(List strings) { return new GraphicStrings(strings, monospaced14(), HtmlColorUtils.GREEN, HtmlColorUtils.BLACK, null, null); } public static TextBlockBackcolored createBlackOnWhite(List strings) { return new GraphicStrings(strings, sansSerif12(), HtmlColorUtils.BLACK, HtmlColorUtils.WHITE, null, null); } public static TextBlockBackcolored createBlackOnWhiteMonospaced(List strings) { return new GraphicStrings(strings, monospaced14(), HtmlColorUtils.BLACK, HtmlColorUtils.WHITE, null, null); } public static TextBlockBackcolored createBlackOnWhite(List strings, BufferedImage image, GraphicPosition position) { return new GraphicStrings(strings, sansSerif12(), HtmlColorUtils.BLACK, HtmlColorUtils.WHITE, image, position); } private static UFont sansSerif12() { return UFont.sansSerif(12); } private static UFont monospaced14() { return UFont.monospaced(14); } private GraphicStrings(List strings, UFont font, HtmlColor maincolor, HtmlColor background, BufferedImage image, GraphicPosition position) { this.strings = strings; this.font = font; this.maincolor = maincolor; this.background = background; this.image = image; this.position = position; } private TextBlock getTextBlock() { TextBlock result = null; result = Display.create(strings).create( new FontConfiguration(font, maincolor, hyperlinkColor, useUnderlineForHyperlink), HorizontalAlignment.LEFT, new SpriteContainerEmpty()); // result = DateEventUtils.addEvent(result, green); return result; } public void drawU(UGraphic ug) { ug = ug.apply(new UTranslate(margin, margin)); final Dimension2D size = calculateDimensionInternal(ug.getStringBounder()); getTextBlock().drawU(ug.apply(new UChangeColor(maincolor))); if (image != null) { if (position == GraphicPosition.BOTTOM) { ug.apply(new UTranslate((size.getWidth() - image.getWidth()) / 2, size.getHeight() - image.getHeight())) .draw(new UImage(image)); } else if (position == GraphicPosition.BACKGROUND_CORNER_BOTTOM_RIGHT) { ug.apply(new UTranslate(size.getWidth() - image.getWidth(), size.getHeight() - image.getHeight())) .draw(new UImage(image)); } else if (position == GraphicPosition.BACKGROUND_CORNER_TOP_RIGHT) { ug.apply(new UTranslate(size.getWidth() - image.getWidth() - 1, 1)).draw(new UImage(image)); } } } public Dimension2D calculateDimension(StringBounder stringBounder) { return Dimension2DDouble.delta(calculateDimensionInternal(stringBounder), 2 * margin); } private Dimension2D calculateDimensionInternal(StringBounder stringBounder) { Dimension2D dim = getTextBlock().calculateDimension(stringBounder); if (image != null) { if (position == GraphicPosition.BOTTOM) { dim = new Dimension2DDouble(dim.getWidth(), dim.getHeight() + image.getHeight()); } else if (position == GraphicPosition.BACKGROUND_CORNER_BOTTOM_RIGHT) { dim = new Dimension2DDouble(dim.getWidth() + image.getWidth(), dim.getHeight()); } else if (position == GraphicPosition.BACKGROUND_CORNER_TOP_RIGHT) { dim = new Dimension2DDouble(dim.getWidth() + image.getWidth(), dim.getHeight()); } } return dim; } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } public HtmlColor getBackcolor() { return background; } public Margins getShield(StringBounder stringBounder) { return Margins.NONE; } public boolean isHidden() { return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/HorizontalAlignment.java000066400000000000000000000037661312650303100276760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.StringUtils; public enum HorizontalAlignment { LEFT, CENTER, RIGHT; public static HorizontalAlignment fromString(String s) { if (LEFT.name().equalsIgnoreCase(s)) { return LEFT; } if (CENTER.name().equalsIgnoreCase(s)) { return CENTER; } if (RIGHT.name().equalsIgnoreCase(s)) { return RIGHT; } return null; } public static HorizontalAlignment fromString(String s, HorizontalAlignment defaultValue) { if (defaultValue == null) { throw new IllegalArgumentException(); } if (s == null) { return defaultValue; } s = StringUtils.goUpperCase(s); final HorizontalAlignment result = fromString(s); if (result == null) { return defaultValue; } return result; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/HtmlColor.java000066400000000000000000000024601312650303100255770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; public interface HtmlColor { } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/HtmlColorAndStyle.java000066400000000000000000000055731312650303100272530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.LinkStyle; import net.sourceforge.plantuml.skin.rose.Rose; public class HtmlColorAndStyle { private final static Rose rose = new Rose(); private final HtmlColor color; private final LinkStyle style; @Override public String toString() { return color + " " + style; } public static Rainbow fromColor(HtmlColor color) { if (color == null) { return Rainbow.none(); } return Rainbow.build(new HtmlColorAndStyle(color)); } public static Rainbow build(ISkinParam skinParam) { return fromColor(rose.getHtmlColor(skinParam, ColorParam.arrow)); } private HtmlColorAndStyle(HtmlColor color) { this(color, LinkStyle.NORMAL); } public HtmlColorAndStyle(HtmlColor color, LinkStyle style) { if (color == null) { throw new IllegalArgumentException(); } this.color = color; this.style = style; } public HtmlColor getColor() { return color; } public LinkStyle getStyle() { return style; } public static HtmlColorAndStyle build(ISkinParam skinParam, String definition) { HtmlColor color = build(skinParam).getColors().get(0).color; LinkStyle style = LinkStyle.NORMAL; final IHtmlColorSet set = skinParam.getIHtmlColorSet(); for (String s : definition.split(",")) { final LinkStyle tmpStyle = LinkStyle.fromString(s); if (tmpStyle != LinkStyle.NORMAL) { style = tmpStyle; continue; } final HtmlColor tmpColor = set.getColorIfValid(s); if (tmpColor != null) { color = tmpColor; } } return new HtmlColorAndStyle(color, style); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/HtmlColorGradient.java000066400000000000000000000047661312650303100272700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.graphic; import java.awt.Color; import net.sourceforge.plantuml.ugraphic.ColorMapper; public class HtmlColorGradient implements HtmlColor { private final HtmlColor color1; private final HtmlColor color2; private final char policy; public HtmlColorGradient(HtmlColor color1, HtmlColor color2, char policy) { if (color1 == null || color2 == null) { throw new IllegalArgumentException(); } this.color1 = color1; this.color2 = color2; this.policy = policy; } public final HtmlColor getColor1() { return color1; } public final HtmlColor getColor2() { return color2; } public final Color getColor(ColorMapper mapper, double coeff) { if (coeff > 1 || coeff < 0) { throw new IllegalArgumentException("c=" + coeff); } final Color c1 = mapper.getMappedColor(color1); final Color c2 = mapper.getMappedColor(color2); final int vred = c2.getRed() - c1.getRed(); final int vgreen = c2.getGreen() - c1.getGreen(); final int vblue = c2.getBlue() - c1.getBlue(); final int red = c1.getRed() + (int) (coeff * vred); final int green = c1.getGreen() + (int) (coeff * vgreen); final int blue = c1.getBlue() + (int) (coeff * vblue); return new Color(red, green, blue); } public final char getPolicy() { return policy; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/HtmlColorSet.java000066400000000000000000000026751312650303100262630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; public class HtmlColorSet { private final static IHtmlColorSet singleton = new HtmlColorSetSimple(); public static IHtmlColorSet getInstance() { return singleton; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/HtmlColorSetSimple.java000066400000000000000000000230161312650303100274250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.Color; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.TreeSet; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; public class HtmlColorSetSimple implements IHtmlColorSet { private final Map htmlNames; private final Set names; public Collection names() { return Collections.unmodifiableSet(names); } public HtmlColor getColorIfValid(String s) { return getColorIfValid(s, false); } public HtmlColor getColorIfValid(String s, boolean acceptTransparent) { if (s == null) { return null; } final Matcher2 m = MyPattern.cmpile("[-\\\\|/]").matcher(s); if (m.find()) { final char sep = m.group(0).charAt(0); final int idx = s.indexOf(sep); final String s1 = s.substring(0, idx); final String s2 = s.substring(idx + 1); if (isValid(s1, false) == false || isValid(s2, false) == false) { return null; } return new HtmlColorGradient(build(s1), build(s2), sep); // return getColorIfValid(s2); } if (isValid(s, acceptTransparent) == false) { return new HtmlColorUserDef(); } return build(s); } public HtmlColorSetSimple() { // Taken from http://perl.wikipedia.com/wiki/Named_colors ? // http://www.w3schools.com/HTML/html_colornames.asp htmlNames = new HashMap(); names = new TreeSet(); register("AliceBlue", "#F0F8FF"); register("AntiqueWhite", "#FAEBD7"); register("Aqua", "#00FFFF"); register("Aquamarine", "#7FFFD4"); register("Azure", "#F0FFFF"); register("Beige", "#F5F5DC"); register("Bisque", "#FFE4C4"); register("Black", "#000000"); register("BlanchedAlmond", "#FFEBCD"); register("Blue", "#0000FF"); register("BlueViolet", "#8A2BE2"); register("Brown", "#A52A2A"); register("BurlyWood", "#DEB887"); register("CadetBlue", "#5F9EA0"); register("Chartreuse", "#7FFF00"); register("Chocolate", "#D2691E"); register("Coral", "#FF7F50"); register("CornflowerBlue", "#6495ED"); register("Cornsilk", "#FFF8DC"); register("Crimson", "#DC143C"); register("Cyan", "#00FFFF"); register("DarkBlue", "#00008B"); register("DarkCyan", "#008B8B"); register("DarkGoldenRod", "#B8860B"); register("DarkGray", "#A9A9A9"); register("DarkGrey", "#A9A9A9"); register("DarkGreen", "#006400"); register("DarkKhaki", "#BDB76B"); register("DarkMagenta", "#8B008B"); register("DarkOliveGreen", "#556B2F"); register("Darkorange", "#FF8C00"); register("DarkOrchid", "#9932CC"); register("DarkRed", "#8B0000"); register("DarkSalmon", "#E9967A"); register("DarkSeaGreen", "#8FBC8F"); register("DarkSlateBlue", "#483D8B"); register("DarkSlateGray", "#2F4F4F"); register("DarkSlateGrey", "#2F4F4F"); register("DarkTurquoise", "#00CED1"); register("DarkViolet", "#9400D3"); register("DeepPink", "#FF1493"); register("DeepSkyBlue", "#00BFFF"); register("DimGray", "#696969"); register("DimGrey", "#696969"); register("DodgerBlue", "#1E90FF"); register("FireBrick", "#B22222"); register("FloralWhite", "#FFFAF0"); register("ForestGreen", "#228B22"); register("Fuchsia", "#FF00FF"); register("Gainsboro", "#DCDCDC"); register("GhostWhite", "#F8F8FF"); register("Gold", "#FFD700"); register("GoldenRod", "#DAA520"); register("Gray", "#808080"); register("Grey", "#808080"); register("Green", "#008000"); register("GreenYellow", "#ADFF2F"); register("HoneyDew", "#F0FFF0"); register("HotPink", "#FF69B4"); register("IndianRed", "#CD5C5C"); register("Indigo", "#4B0082"); register("Ivory", "#FFFFF0"); register("Khaki", "#F0E68C"); register("Lavender", "#E6E6FA"); register("LavenderBlush", "#FFF0F5"); register("LawnGreen", "#7CFC00"); register("LemonChiffon", "#FFFACD"); register("LightBlue", "#ADD8E6"); register("LightCoral", "#F08080"); register("LightCyan", "#E0FFFF"); register("LightGoldenRodYellow", "#FAFAD2"); register("LightGray", "#D3D3D3"); register("LightGrey", "#D3D3D3"); register("LightGreen", "#90EE90"); register("LightPink", "#FFB6C1"); register("LightSalmon", "#FFA07A"); register("LightSeaGreen", "#20B2AA"); register("LightSkyBlue", "#87CEFA"); register("LightSlateGray", "#778899"); register("LightSlateGrey", "#778899"); register("LightSteelBlue", "#B0C4DE"); register("LightYellow", "#FFFFE0"); register("Lime", "#00FF00"); register("LimeGreen", "#32CD32"); register("Linen", "#FAF0E6"); register("Magenta", "#FF00FF"); register("Maroon", "#800000"); register("MediumAquaMarine", "#66CDAA"); register("MediumBlue", "#0000CD"); register("MediumOrchid", "#BA55D3"); register("MediumPurple", "#9370D8"); register("MediumSeaGreen", "#3CB371"); register("MediumSlateBlue", "#7B68EE"); register("MediumSpringGreen", "#00FA9A"); register("MediumTurquoise", "#48D1CC"); register("MediumVioletRed", "#C71585"); register("MidnightBlue", "#191970"); register("MintCream", "#F5FFFA"); register("MistyRose", "#FFE4E1"); register("Moccasin", "#FFE4B5"); register("NavajoWhite", "#FFDEAD"); register("Navy", "#000080"); register("OldLace", "#FDF5E6"); register("Olive", "#808000"); register("OliveDrab", "#6B8E23"); register("Orange", "#FFA500"); register("OrangeRed", "#FF4500"); register("Orchid", "#DA70D6"); register("PaleGoldenRod", "#EEE8AA"); register("PaleGreen", "#98FB98"); register("PaleTurquoise", "#AFEEEE"); register("PaleVioletRed", "#D87093"); register("PapayaWhip", "#FFEFD5"); register("PeachPuff", "#FFDAB9"); register("Peru", "#CD853F"); register("Pink", "#FFC0CB"); register("Plum", "#DDA0DD"); register("PowderBlue", "#B0E0E6"); register("Purple", "#800080"); register("Red", "#FF0000"); register("RosyBrown", "#BC8F8F"); register("RoyalBlue", "#4169E1"); register("SaddleBrown", "#8B4513"); register("Salmon", "#FA8072"); register("SandyBrown", "#F4A460"); register("SeaGreen", "#2E8B57"); register("SeaShell", "#FFF5EE"); register("Sienna", "#A0522D"); register("Silver", "#C0C0C0"); register("SkyBlue", "#87CEEB"); register("SlateBlue", "#6A5ACD"); register("SlateGray", "#708090"); register("SlateGrey", "#708090"); register("Snow", "#FFFAFA"); register("SpringGreen", "#00FF7F"); register("SteelBlue", "#4682B4"); register("Tan", "#D2B48C"); register("Teal", "#008080"); register("Thistle", "#D8BFD8"); register("Tomato", "#FF6347"); register("Turquoise", "#40E0D0"); register("Violet", "#EE82EE"); register("Wheat", "#F5DEB3"); register("White", "#FFFFFF"); register("WhiteSmoke", "#F5F5F5"); register("Yellow", "#FFFF00"); register("YellowGreen", "#9ACD32"); // Archimate register("BUSINESS", "#FFFF00"); register("APPLICATION", "#A9DCDF"); register("MOTIVATION", "#B19CD9"); register("STRATEGY", "#F6E4CC"); register("TECHNOLOGY", "#90EE90"); register("PHYSICAL", "#CCFFCC"); register("IMPLEMENTATION", "#FFA6BF"); } private void register(String s, String color) { htmlNames.put(StringUtils.goLowerCase(s), color); names.add(s); } private HtmlColor build(String s) { s = removeFirstDieseAndgoLowerCase(s); final Color color; if (s.equalsIgnoreCase("transparent")) { return new HtmlColorTransparent(); } else if (s.matches("[0-9A-Fa-f]{3}")) { s = "" + s.charAt(0) + s.charAt(0) + s.charAt(1) + s.charAt(1) + s.charAt(2) + s.charAt(2); color = new Color(Integer.parseInt(s, 16)); } else if (s.matches("[0-9A-Fa-f]{6}")) { color = new Color(Integer.parseInt(s, 16)); } else { final String value = htmlNames.get(s); if (value == null) { throw new IllegalArgumentException(s); } color = new Color(Integer.parseInt(value.substring(1), 16)); } return new HtmlColorSimple(color, false); } private boolean isValid(String s, boolean acceptTransparent) { s = removeFirstDieseAndgoLowerCase(s); if (s.matches("[0-9A-Fa-f]{3}")) { return true; } if (s.matches("[0-9A-Fa-f]{6}")) { return true; } if (acceptTransparent && s.equalsIgnoreCase("transparent")) { return true; } if (htmlNames.containsKey(s)) { return true; } return false; } private String removeFirstDieseAndgoLowerCase(String s) { s = StringUtils.goLowerCase(s); if (s.startsWith("#")) { s = s.substring(1); } return s; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/HtmlColorSimple.java000066400000000000000000000052361312650303100267550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.Color; import net.sourceforge.plantuml.ugraphic.ColorChangerMonochrome; public class HtmlColorSimple implements HtmlColor { private final Color color; private final boolean monochrome; @Override public int hashCode() { return color.hashCode(); } @Override public boolean equals(Object other) { if (other instanceof HtmlColorSimple == false) { return false; } return this.color.equals(((HtmlColorSimple) other).color); } public HtmlColorSimple(Color c, boolean monochrome) { this.color = c; this.monochrome = monochrome; } public Color getColor999() { return color; } public HtmlColorSimple asMonochrome() { if (monochrome) { throw new IllegalStateException(); } return new HtmlColorSimple(new ColorChangerMonochrome().getChangedColor(color), true); } public HtmlColorSimple opposite() { final Color mono = new ColorChangerMonochrome().getChangedColor(color); final int grayScale = 255 - mono.getGreen() > 127 ? 255 : 0; return new HtmlColorSimple(new Color(grayScale, grayScale, grayScale), true); } public double distance(HtmlColorSimple other) { final int diffRed = Math.abs(this.color.getRed() - other.color.getRed()); final int diffGreen = Math.abs(this.color.getGreen() - other.color.getGreen()); final int diffBlue = Math.abs(this.color.getBlue() - other.color.getBlue()); return diffRed * .3 + diffGreen * .59 + diffBlue * .11; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/HtmlColorTransparent.java000066400000000000000000000025061312650303100300220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.graphic; public class HtmlColorTransparent implements HtmlColor { } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/HtmlColorUserDef.java000066400000000000000000000025061312650303100270560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; public class HtmlColorUserDef implements HtmlColor { } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/HtmlColorUtils.java000066400000000000000000000104171312650303100266210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; public class HtmlColorUtils { public static final HtmlColor BLACK; public static final HtmlColor WHITE; public static final HtmlColor RED_LIGHT; public static final HtmlColor RED_DARK; public static final HtmlColor RED; public static final HtmlColor GREEN; public static final HtmlColor BLUE; public static final HtmlColor GRAY; public static final HtmlColor LIGHT_GRAY; public static final HtmlColor MY_YELLOW; public static final HtmlColor MY_RED; public static final HtmlColor COL_C82930; public static final HtmlColor COL_F24D5C; public static final HtmlColor COL_1963A0; public static final HtmlColor COL_4177AF; public static final HtmlColor COL_B38D22; public static final HtmlColor COL_FFFF44; public static final HtmlColor COL_038048; public static final HtmlColor COL_84BE84; public static final HtmlColor COL_DDDDDD; public static final HtmlColor COL_EEEEEE; public static final HtmlColor COL_FBFB77; public static final HtmlColor COL_ADD1B2; public static final HtmlColor COL_A9DCDF; public static final HtmlColor COL_E3664A; public static final HtmlColor COL_EB937F; public static final HtmlColor COL_B4A7E5; public static final HtmlColor COL_527BC6; public static final HtmlColor COL_D1DBEF; public static final HtmlColor COL_D7E0F2; public static final HtmlColor COL_989898; public static final HtmlColor COL_BBBBBB; static { final IHtmlColorSet set = new HtmlColorSetSimple(); BLACK = set.getColorIfValid("black"); WHITE = set.getColorIfValid("white"); RED_LIGHT = set.getColorIfValid("#FEF6F3"); RED_DARK = set.getColorIfValid("#CD0A0A"); RED = set.getColorIfValid("#FF0000"); GREEN = set.getColorIfValid("#00FF00"); BLUE = set.getColorIfValid("#0000FF"); GRAY = set.getColorIfValid("#808080"); LIGHT_GRAY = set.getColorIfValid("#C0C0C0"); MY_YELLOW = set.getColorIfValid("#FEFECE"); MY_RED = set.getColorIfValid("#A80036"); COL_C82930 = set.getColorIfValid("#C82930"); COL_F24D5C = set.getColorIfValid("#F24D5C"); COL_1963A0 = set.getColorIfValid("#1963A0"); COL_4177AF = set.getColorIfValid("#4177AF"); COL_B38D22 = set.getColorIfValid("#B38D22"); COL_FFFF44 = set.getColorIfValid("#FFFF44"); COL_038048 = set.getColorIfValid("#038048"); COL_84BE84 = set.getColorIfValid("#84BE84"); COL_DDDDDD = set.getColorIfValid("#DDDDDD"); COL_EEEEEE = set.getColorIfValid("#EEEEEE"); COL_FBFB77 = set.getColorIfValid("#FBFB77"); COL_ADD1B2 = set.getColorIfValid("#ADD1B2"); COL_A9DCDF = set.getColorIfValid("#A9DCDF"); COL_E3664A = set.getColorIfValid("#E3664A"); COL_EB937F = set.getColorIfValid("#EB937F"); COL_B4A7E5 = set.getColorIfValid("#B4A7E5"); COL_527BC6 = set.getColorIfValid("#527BC6"); COL_D1DBEF = set.getColorIfValid("#D1DBEF"); COL_D7E0F2 = set.getColorIfValid("#D7E0F2"); COL_989898 = set.getColorIfValid("#989898"); COL_BBBBBB = set.getColorIfValid("#BBBBBB"); } public static HtmlColor noGradient(HtmlColor color) { if (color instanceof HtmlColorGradient) { return ((HtmlColorGradient) color).getColor1(); } return color; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/HtmlCommand.java000066400000000000000000000024571312650303100261050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; public interface HtmlCommand { } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/HtmlCommandFactory.java000066400000000000000000000077031312650303100274340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.util.EnumSet; import java.util.regex.Pattern; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.UrlBuilder; import net.sourceforge.plantuml.UrlBuilder.ModeUrl; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; class HtmlCommandFactory { static final Pattern2 addStyle; static final Pattern2 removeStyle; static { final StringBuilder sbAddStyle = new StringBuilder(); final StringBuilder sbRemoveStyle = new StringBuilder(); for (FontStyle style : EnumSet.allOf(FontStyle.class)) { if (sbAddStyle.length() > 0) { sbAddStyle.append('|'); sbRemoveStyle.append('|'); } sbAddStyle.append(style.getActivationPattern()); sbRemoveStyle.append(style.getDeactivationPattern()); } addStyle = MyPattern.cmpile(sbAddStyle.toString(), Pattern.CASE_INSENSITIVE); removeStyle = MyPattern.cmpile(sbRemoveStyle.toString(), Pattern.CASE_INSENSITIVE); } private Pattern2 htmlTag = MyPattern.cmpile(Splitter.htmlTag, Pattern.CASE_INSENSITIVE); HtmlCommand getHtmlCommand(String s) { if (htmlTag.matcher(s).matches() == false) { return new Text(s); } if (MyPattern.mtches(s, Splitter.imgPattern)) { return Img.getInstance(s, true); } if (MyPattern.mtches(s, Splitter.imgPatternNoSrcColon)) { return Img.getInstance(s, false); } if (addStyle.matcher(s).matches()) { return new AddStyle(s); } if (removeStyle.matcher(s).matches()) { return new RemoveStyle(FontStyle.getStyle(s)); } if (MyPattern.mtches(s, Splitter.fontPattern)) { return new ColorAndSizeChange(s); } if (MyPattern.mtches(s, Splitter.fontColorPattern2)) { return new ColorChange(s); } if (MyPattern.mtches(s, Splitter.fontSizePattern2)) { return new SizeChange(s); } if (MyPattern.mtches(s, Splitter.fontSup)) { return new ExposantChange(FontPosition.EXPOSANT); } if (MyPattern.mtches(s, Splitter.fontSub)) { return new ExposantChange(FontPosition.INDICE); } if (MyPattern.mtches(s, Splitter.endFontPattern)) { return new ResetFont(); } if (MyPattern.mtches(s, Splitter.endSupSub)) { return new ExposantChange(FontPosition.NORMAL); } if (MyPattern.mtches(s, Splitter.fontFamilyPattern)) { return new FontFamilyChange(s); } if (MyPattern.mtches(s, Splitter.spritePattern)) { return new SpriteCommand(s); } if (MyPattern.mtches(s, Splitter.linkPattern)) { final UrlBuilder urlBuilder = new UrlBuilder(null, ModeUrl.STRICT); final Url url = urlBuilder.getUrl(s); url.setMember(true); return new TextLink(url); } if (MyPattern.mtches(s, Splitter.svgAttributePattern)) { return new SvgAttributesChange(s); } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/IHtmlColorSet.java000066400000000000000000000027541312650303100263720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.util.Collection; public interface IHtmlColorSet { public Collection names(); public HtmlColor getColorIfValid(String s); public HtmlColor getColorIfValid(String s, boolean acceptTransparent); } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/Img.java000066400000000000000000000114151312650303100244100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import javax.imageio.ImageIO; import net.sourceforge.plantuml.FileSystem; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; public class Img implements HtmlCommand { final static private Pattern2 srcPattern = MyPattern.cmpile("(?i)src[%s]*=[%s]*[\"%q]?([^%s\">]+)[\"%q]?"); final static private Pattern2 vspacePattern = MyPattern.cmpile("(?i)vspace[%s]*=[%s]*[\"%q]?(\\d+)[\"%q]?"); final static private Pattern2 valignPattern = MyPattern.cmpile("(?i)valign[%s]*=[%s]*[\"%q]?(top|bottom|middle)[\"%q]?"); final static private Pattern2 noSrcColonPattern = MyPattern.cmpile("(?i)" + Splitter.imgPatternNoSrcColon); private final TextBlock tileImage; private Img(TextBlock image) { this.tileImage = image; } static int getVspace(String html) { final Matcher2 m = vspacePattern.matcher(html); if (m.find() == false) { return 0; } return Integer.parseInt(m.group(1)); } static ImgValign getValign(String html) { final Matcher2 m = valignPattern.matcher(html); if (m.find() == false) { return ImgValign.TOP; } return ImgValign.valueOf(StringUtils.goUpperCase(m.group(1))); } static HtmlCommand getInstance(String html, boolean withSrc) { if (withSrc) { final Matcher2 m = srcPattern.matcher(html); final int vspace = getVspace(html); final ImgValign valign = getValign(html); return build(m, valign, vspace); } final Matcher2 m = noSrcColonPattern.matcher(html); return build(m, ImgValign.TOP, 0); } private static HtmlCommand build(final Matcher2 m, final ImgValign valign, final int vspace) { if (m.find() == false) { return new Text("(SYNTAX ERROR)"); } final String src = m.group(1); try { final File f = FileSystem.getInstance().getFile(src); if (f.exists() == false) { // Check if valid URL if (src.startsWith("http:") || src.startsWith("https:")) { final byte image[] = getFile(src); final BufferedImage read = ImageIO.read(new ByteArrayInputStream(image)); if (read == null) { return new Text("(Cannot decode: " + src + ")"); } return new Img(new TileImage(read, valign, vspace)); } return new Text("(File not found: " + f + ")"); } if (f.getName().endsWith(".svg")) { return new Img(new TileImageSvg(f)); } final BufferedImage read = ImageIO.read(f); if (read == null) { return new Text("(Cannot decode: " + f + ")"); } return new Img(new TileImage(ImageIO.read(f), valign, vspace)); } catch (IOException e) { return new Text("ERROR " + e.toString()); } } public TextBlock createMonoImage() { return tileImage; } // Added by Alain Corbiere static byte[] getFile(String host) throws IOException { final ByteArrayOutputStream image = new ByteArrayOutputStream(); InputStream input = null; try { final URL url = new URL(host); final URLConnection connection = url.openConnection(); input = connection.getInputStream(); final byte[] buffer = new byte[1024]; int read; while ((read = input.read(buffer)) > 0) { image.write(buffer, 0, read); } image.close(); return image.toByteArray(); } finally { if (input != null) { input.close(); } } } // End } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/ImgValign.java000066400000000000000000000024751312650303100255570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; public enum ImgValign { TOP, BOTTOM, MIDDLE } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/InnerStrategy.java000066400000000000000000000030431312650303100264700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; public enum InnerStrategy { STRICT, LAZZY; public boolean check(final String data, String candidate) { if (this == STRICT) { return data.startsWith(candidate); } if (this == LAZZY) { return data.contains(candidate); } throw new IllegalStateException(); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/Line.java000066400000000000000000000025431312650303100245650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; interface Line extends TextBlock { HorizontalAlignment getHorizontalAlignment(); }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/QuoteUtils.java000066400000000000000000000321521312650303100260130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.util.Arrays; import java.util.List; public class QuoteUtils { static private final List quotes = Arrays .asList("Ur'f qrnq, Wvz.", "Ol Tenogune'f unzzre, ol gur fbaf bs Jbeina, lbh funyy or niratrq.", "Ebnqf? Jurer jr'er tbvat, jr qba'g arrq ebnqf.", "Gur gvzr vf bhg bs wbvag.", "P'rfg phevrhk purm yrf znevaf pr orfbva qr snver qrf cuenfrf.", "V'z gnyxvat nobhg gur bgure Crgre, gur bar ba gur bgure fvqr.", "Znl gur Sbepr or jvgu lbh!", "Arire tvir hc, arire fheeraqre...", "Unfgn yn ivfgn, onol.", "Url, Qbp, jr orggre onpx hc. Jr qba'g unir rabhtu ebnq gb trg hc gb 88.", "Terrgvatf, Cebsrffbe Snyxra. Funyy jr cynl n tnzr?", "V pna'g punatr gur ynj bs culfvpf!", "N fgenatr tnzr. Gur bayl jvaavat zbir vf abg gb cynl.", "V'z gur Tngrxrrcre, ner lbh gur Xrlznfgre?", "V nz gur Znfgre Pbageby Cebtenz. Ab bar Hfre jebgr zr.", "Yvsr? Qba'g gnyx gb zr nobhg yvsr.", "V nyjnlf gubhtug fbzrguvat jnf shaqnzragnyyl jebat jvgu gur havirefr.", "N ebobg znl abg vawher n uhzna orvat be, guebhtu vanpgvba, nyybj n uhzna orvat gb pbzr gb unez.", "Fheeraqre znl or bhe bayl bcgvba.", "Fvk ol avar. Sbegl gjb.", "Vg'f yvsr, Wvz, ohg abg nf jr xabj vg.", "Qba'g Cnavp!", "Jung qb lbh zrna? Na Nsevpna be Rhebcrna fjnyybj?", "V arrq lbhe obbgf lbhe pybgurf naq lbhe zbgbeplpyr", "Lbh sbetbg gb fnl cyrnfr...", "Lbh unir qvrq bs qlfragrel.", "Jbhyqa'g lbh cersre n avpr tnzr bs purff?", "Jura lbh unir ryvzvangrq gur vzcbffvoyr, jungrire erznvaf, ubjrire vzcebonoyr, zhfg or gur gehgu.", "V xabj abj jul lbh pel. Ohg vg'f fbzrguvat V pna arire qb.", "Erfvfgnapr vf shgvyr. Lbh jvyy or nffvzvyngrq.", "Nalguvat qvssrerag vf tbbq.", "Penpxrq ol Nyqb Erfrg naq Ynherag Ehrvy.", "V'z obgu. V'z n pryroevgl va na rzretrapl.", "Qb lbh xabj guvf terng terng cbyvfu npgbe, Wbfrcu Ghen?", "Gb vasvavgl naq orlbaq!", "Fcnpr: gur svany sebagvre...", "Fhe zba ovyyrg, grarm, l n rpevg Fnvag-Ynmner, p'rfg zrf lrhk bh dhbv ?", "Gur obl vf vzcbegnag. Ur unf gb yvir.", "Bapr hcba n gvzr va n tnynkl sne, sne njnl...", "Naq lbh xabj gurer'f n ybat ybat jnl nurnq bs lbh...", "Na nyyretl gb bkltra? Ryz oyvtug?", "Ohg nybef lbh ner Serapu!", "A'nv-wr qbap gnag irph dhr cbhe prggr vasnzvr?", "Fbzrguvat vf ebggra va gur Fgngr bs Qraznex.", "Url, jung qb lbh jnag? Zvenpyrf?", "1.21 tvtnjnggf! 1.21 tvtnjnggf. Terng Fpbgg! ", "Jung gur uryy vf n tvtnjngg?", "V arrq n inpngvba.", "Ba qrienvg wnznvf dhvggre Zbagnhona.", "Zl sbepr vf n cyngsbez gung lbh pna pyvzo ba...", "Gurer'f fbzrguvat jrveq, naq vg qba'g ybbx tbbq...", "Rg evra ienvzrag ar punatr znvf gbhg rfg qvssrerag", "Ornz zr hc, Fpbggl.", "Gurer vf ab fcbba.", "Sbyybj gur juvgr enoovg.", "Arire fraq n uhzna gb qb n znpuvar'f wbo.", "Theh zrqvgngvba. Cerff yrsg zbhfr ohggba gb pbagvahr.", "V qba'g guvax jr'er va Xnafnf nalzber.", "Yhxr, V nz lbhe sngure.", "Oybbq, Fjrng naq Grnef", "Ubhfgba, jr unir n ceboyrz.", "Xrlobneq snvyher, cerff nal xrl gb pbagvahr", "Ovt zvfgnxr!", "Ubj znal HZY qrfvtaref qbrf vg gnxr gb punatr n yvtugohyo ?", "Qb lbh yvxr zbivrf nobhg tynqvngbef ?", "Gur fcvevg bs yrneavat vf n ynfgvat sebagvre.", "Vg vf phevbhf sbe fnvybef guvf arrq sbe znxvat fragraprf.", "Ubcvat sbe gur orfg, ohg rkcrpgvat gur jbefg", "Gur jvyy gb tb ba jura V'z uheg qrrc vafvqr.", "Vs vg oyrrqf, jr pna xvyy vg.", "Ubhfgba, V unir n onq srryvat nobhg guvf zvffvba.", "Znzn nyjnlf fnvq yvsr jnf yvxr n obk bs pubpbyngrf. Lbh arire xabj jung lbh'er tbaan trg.", "Ol gur jnl, vf gurer nalbar ba obneq jub xabjf ubj gb syl n cynar?", "Qnir, guvf pbairefngvba pna freir ab checbfr nalzber. Tbbqolr.", "Vg pna bayl or nggevohgnoyr gb uhzna reebe.", "Ybbxf yvxr V cvpxrq gur jebat jrrx gb dhvg fzbxvat.", "Lbh uhznaf npg fb fgenatr. Rirelguvat lbh perngr vf hfrq gb qrfgebl.", "Jurer qvq lbh yrnea ubj gb artbgvngr yvxr gung?", "Fve, ner lbh pynffvsvrq nf uhzna?", "Jr'er abg tbaan znxr vg, ner jr?", "Vg'f va lbhe angher gb qrfgebl lbhefryirf.", "Gur zber pbagnpg V unir jvgu uhznaf, gur zber V yrnea.", "Jbhyq vg fnir lbh n ybg bs gvzr vs V whfg tnir hc naq jrag znq abj?", "Ernyvgl vf serdhragyl vanpphengr.", "Qba'g oryvrir nalguvat lbh ernq ba gur arg. Rkprcg guvf. Jryy, vapyhqvat guvf, V fhccbfr.", "N phc bs grn jbhyq erfgber zl abeznyvgl.", "Nalguvat gung guvaxf ybtvpnyyl pna or sbbyrq ol fbzrguvat ryfr gung guvaxf ng yrnfg nf ybtvpnyyl nf vg qbrf.", "Va na vasvavgr Havirefr nalguvat pna unccra.", "Fbzrgvzrf vs lbh erprvirq na nafjre, gur dhrfgvba zvtug or gnxra njnl.", "Cyrnfr pnyy zr Rqqvr vs vg jvyy uryc lbh gb erynk.", "V qba'g oryvrir vg. Cebir vg gb zr naq V fgvyy jba'g oryvrir vg.", "Gbgnyyl znq, hggre abafrafr. Ohg jr'yy qb vg orpnhfr vg'f oevyyvnag abafrafr.", "Guvf fragrapr vf abg gehr.", "V jbhyq engure qvr fgnaqvat guna yvir ba zl xarrf.", "Lbh ner orvat jngpurq.", "Qvq lbh srrq gurz nsgre zvqavtug?", "Ubj qb lbh rkcynva fpubby gb uvture vagryyvtrapr?", "Crbcyr fbzrgvzrf znxr zvfgnxrf.", "Ybbx, V qba'g unir gvzr sbe n pbairefngvba evtug abj.", "Nyy ceboyrzf va pbzchgre fpvrapr pna or fbyirq ol nabgure yriry bs vaqverpgvba", "...rkprcg sbe gur ceboyrz bs gbb znal yriryf bs vaqverpgvba", "V xabj orpnhfr V ohvyg vg", "Rira gur fznyyrfg crefba pna punatr gur pbhefr bs gur shgher.", "Vs lbh ner n sevraq, lbh fcrnx gur cnffjbeq, naq gur qbbef jvyy bcra.", "Lbh Funyy Abg Cnff", "73.6% Bs Nyy Fgngvfgvpf Ner Znqr Hc", "Jr pna arvgure pbasvez abe qral gung guvf vf penfuvat", "Jura gur orngvat bs lbhe urneg rpubrf gur orngvat bs gur qehzf", "Arire gehfg n pbzchgre lbh pna'g guebj bhg n jvaqbj", "Lrnu, V'z pnyz. V'z n pnyz crefba. Vf gurer fbzr ernfba V fubhyqa'g or pnyz?", "Rirelobql whfg fgnl pnyz. Gur fvghngvba vf haqre pbageby.", "Uvccl, lbh guvax rirelguvat vf n pbafcvenpl.", "Gurfr thlf ner nobhg nf zhpu sha nf n gnk nhqvg.", "Gurer vf fbzrguvat qbja gurer! Fbzrguvat abg hf.", "V fnj n tyvzcfr bs zl shgher naq rirelguvat'f punatrq sbe zr abj.", "Va fcnpr ab bar pna urne lbh fpernz", "V pna'g yvr gb lbh nobhg lbhe punaprf, ohg... lbh unir zl flzcnguvrf.", "Gurer vf na rkcynangvba sbe guvf, lbh xabj.", "V'z nsenvq V unir fbzr onq arjf.", "Qb zr n snibhe. Qvfpbaarpg zr. V pbhyq or erjbexrq, ohg V'yy arire or gbc bs gur yvar ntnva.", "Gnxr vg rnfl, qba'g chfu gur yvggyr ohggba ba gur wblfgvpx!", "V'z n irel cevingr crefba.", "Gb fphycg na ryrcunag sebz n ovt oybpx bs zneoyr, whfg xabpx njnl nyy gur ovgf gung qba'g ybbx yvxr na ryrcunag.", "Jub fnvq lbh pbhyq gnyx gb zr? Unir V tbg fbzrguvat ba zl snpr ?", "Jr'ir orra guebhtu jbefg", "Havgrq jr fgnaq", "Jr funyy arire fheeraqre", "Nofbyhgr ubarfgl vfa'g nyjnlf gur zbfg qvcybzngvp abe gur fnsrfg sbez bs pbzzhavpngvba jvgu rzbgvbany orvatf.", "Vg'f... pbzcyvpngrq.", "Qb abg bcra hagvy 1985", "V fgvyy zrff hc ohg V'yy whfg fgneg ntnva", "V jba'g tvir hc, ab V jba'g tvir va; Gvyy V ernpu gur raq; Naq gura V'yy fgneg ntnva", "V jnaan gel rira gubhtu V pbhyq snvy", "Fbzrgvzrf jr pbzr ynfg ohg jr qvq bhe orfg", "Vs lbh frr fbzrguvat, fnl fbzrguvat", "Va gurbel gurer vf ab qvssrerapr orgjrra gurbel naq cenpgvpr. Ohg, va cenpgvpr, gurer vf.", "Qnlyvtug, V zhfg jnvg sbe gur fhaevfr. V zhfg guvax bs n arj yvsr. Naq V zhfga'g tvir va.", "Vs V pnaabg oevat lbh pbzsbeg gura ng yrnfg V oevat lbh ubcr", "Jr nyy zhfg yrnea sebz fznyy zvfsbeghar, pbhag gur oyrffvatf gung ner erny", "Cercner Guerr Frnyrq Rairybcrf...", "Lbh xabj gung guvat lbh whfg qvq? Qba'g qb gung", "Vg gbbx zr n ybat gvzr gb haqrefgnaq gung vs lbh jnag gb qb guvf wbo jryy lbh unir gb fgnl qrgnpurq.", "Qb lbh yvxr lbhe zbeavat grn jrnx be fgebat ?", "Jvagre vf pbzvat", "Jung sbbyf gurfr zbegnyf or!", "Fbzrguvat jvpxrq guvf jnl pbzrf.", "V guvax V trg vg, jung jnf vg? Cbxre Avtug? Onpurybe Cnegl?", "Vg'f nyevtug gb or fpnerq. Erzrzore, gurer vf ab pbhentr jvgubhg srne.", "Guebhtu ernqvarff naq qvfpvcyvar jr ner znfgref bs bhe sngr.", "Jvgu terng cbjre pbzrf terng erfcbafvovyvgl", "Vs n znpuvar pna yrnea gur inyhr bs uhzna yvsr, znlor jr pna gbb ?", "Bayl tbvat sbejneq 'pnhfr jr pna'g svaq erirefr.", "Jr'er abg tbaan fvg va fvyrapr, jr'er abg tbaan yvir jvgu srne", "Oba, qnaf qvk zvahgrf wr abhf pbafvqrer pbzzr qrsvavgvirzrag creqhf.", "Pn fren fherzrag ovra dhnaq pn fren svav.", "Vg'f gur ynfg cvrpr bs gur chmmyr ohg lbh whfg pna'g znxr vg svg", "Qbpgbe fnlf lbh'er pherq ohg lbh fgvyy srry gur cnva", "Vf negvsvpvny vagryyvtrapr gur rknpg bccbfvgr bs angheny fghcvqvgl ?", "Sbeprzrag, pn qrcraq, pn qrcnffr...", "Gurer'f orra n cnggrea bs vafhobeqvangr orunivbe erpragyl.", "Ab. Jr ner abg na rssrpgvir grnz.", "Bhe wbo vf abg gb erzrzore... erzrzore?", "Guvf vf zvffvba pbageby. Ubj ner lbh nyy qbvat guvf ybiryl zbeavat?", "Vs lbh pbhyq frr lbhe jubyr yvsr ynvq bhg va sebag bs lbh, jbhyq lbh punatr guvatf?", "Vf guvf n aba-mreb-fhz tnzr?", "Abj gung'f n cebcre vagebqhpgvba.", "Rirelguvat unf punatrq naq vg jba'g fgbc punatvat nalgvzr fbba.", "Jung znxrf lbh qvssrerag znxrf lbh qnatrebhf", "Qviretrapr vf rkgerzryl qnatrebhf", "V'z Qviretrag. Naq V pna'g or pbagebyyrq", "Znl gur bqqf or rire va lbhe snibe", "Ab WninFpevcg senzrjbexf jrer perngrq qhevat gur jevgvat bs guvf zrffntr.", "P'rfg cerffr-cherr dhv g'nf vagreebtr ?", "Ybbx, nygreangvir snpgf ner abg snpgf. Gurl'er snyfrubbqf", "Guvf vf abg n penfu, guvf vf zber bs na nygreangvir erfhyg.", "Lbh yrnearq gb cebtenz va SBEGENA qvqa'g lbh?", "Guvf oht vf n srngher nf qrfpevorq ol gur znexrgvat qrcnegzrag.", "Abg rirelobql haqrefgnaqf gur uhzbe bs cebtenzzref.", "Vs lbh yvir na beqvanel yvsr, nyy lbh'yy unir ner beqvanel fgbevrf.", "Pbzr jvgu zr vs lbh jnag gb yvir", "Gh y'nf gebhir bh pryhv-yn ?", "Qb lbh ernyyl guvax lbh unir n punapr ntnvafg hf, Ze. Pbjobl?", "Nggragvba, jubrire lbh ner, guvf punaary vf erfreirq sbe rzretrapl pnyyf bayl.", "Qbrf vg fbhaq yvxr V'z beqrevat n cvmmn? ", "Jr'er tbaan arrq fbzr zber SOV thlf, V thrff.", "Trg ernql sbe ehfu ubhe", "V unir gb jnea lbh, V'ir urneq eryngvbafuvcf onfrq ba vagrafr rkcrevraprf arire jbex.", "Nalguvat ryfr ohg gur onfrzrag gung'yy xrrc guvf ryringbe sebz snyyvat?", "Vf guvf grfgvat jurgure V'z n ercyvpnag be n yrfovna, Ze. Qrpxneq? ", "V'ir qbar... dhrfgvbanoyr guvatf", "Jbhyq lbh... yvxr gb or hctenqrq?", "Snhg erpbaanvger... p'rfg qh oehgny!", "Fv ba oevpbynvg cyhf fbhirag, ba nhenvg zbvaf yn grgr nhk orgvfrf.", "Wr invf yhv snver har beqbaanapr, rg har frirer...", "Znvf vy pbaanvg cnf Enbhy, pr zrp! vy in nibve ha erirvy cravoyr.", "W'nv ibhyh rger qvcybzngr n pnhfr qr ibhf gbhf, rivgre dhr yr fnat pbhyr.", "Vtabenapr oevatf punbf, abg xabjyrqtr.", "Yrneavat vf nyjnlf n cnvashy cebprff.", "V'z fbeel, ner lbh sebz gur cnfg ?", "Unir lbh gevrq gheavat vg bss naq ba ntnva ?", "Vs lbh qba'g xabj jurer lbh ner tbvat nal ebnq pna gnxr lbh gurer", "Ortva ng gur ortvaavat, naq tb ba gvyy lbh pbzr gb gur raq: gura fgbc", "Xrrc pnyz naq cerff Pgey-Nyg-Qry", "Vs lbh glcr Tbbtyr vagb Tbbtyr, lbh pna oernx gur Vagrearg.", "V unir cneg bs n cyna.", "V'z cerggl fher gur nafjre vf: V nz Tebbg.", "Nalguvat gung pna cbffvoyl tb jebat, qbrf", "Cyhf pn engr, cyhf ba n qr punapr dhr pn znepur"); private QuoteUtils() { } public static String getSomeQuote() { final int v = (int) (System.currentTimeMillis() / 1000L); return quotes.get(v % quotes.size()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/Rainbow.java000066400000000000000000000054121312650303100252750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.ISkinParam; public class Rainbow { private final List colors = new ArrayList(); private final int colorArrowSeparationSpace; private Rainbow(int colorArrowSeparationSpace) { this.colorArrowSeparationSpace = colorArrowSeparationSpace; } @Override public String toString() { return colors.toString(); } public static Rainbow none() { return new Rainbow(0); } public Rainbow withDefault(Rainbow defaultColor) { if (this.size() == 0) { return defaultColor; } return this; } public static Rainbow build(HtmlColorAndStyle color) { if (color == null) { throw new IllegalArgumentException(); } final Rainbow result = new Rainbow(0); result.colors.add(color); return result; } public static Rainbow build(ISkinParam skinParam, String colorString, int colorArrowSeparationSpace) { if (colorString == null) { return Rainbow.none(); } final Rainbow result = new Rainbow(colorArrowSeparationSpace); for (String s : colorString.split(";")) { result.colors.add(HtmlColorAndStyle.build(skinParam, s)); } return result; } public List getColors() { return Collections.unmodifiableList(colors); } public HtmlColor getColor() { return colors.get(0).getColor(); } public int getColorArrowSeparationSpace() { return colorArrowSeparationSpace; } public int size() { return colors.size(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/RemoveStyle.java000066400000000000000000000027671312650303100261640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; class RemoveStyle implements FontChange { private final FontStyle style; RemoveStyle(FontStyle style) { this.style = style; } public FontConfiguration apply(FontConfiguration initial) { return initial.remove(style); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/ResetFont.java000066400000000000000000000026301312650303100256040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; class ResetFont implements FontChange { public FontConfiguration apply(FontConfiguration initial) { return initial.resetFont(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/SimpleTextBlockBordered.java000066400000000000000000000044171312650303100304200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UTranslate; class SimpleTextBlockBordered extends AbstractTextBlock implements TextBlock { private final TextBlock textBlock; private final HtmlColor color; public SimpleTextBlockBordered(TextBlock textBlock, HtmlColor color) { this.textBlock = textBlock; this.color = color; } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dim = textBlock.calculateDimension(stringBounder); return Dimension2DDouble.delta(dim, 1, 1); } public void drawU(UGraphic ug) { final Dimension2D dim = textBlock.calculateDimension(ug.getStringBounder()); textBlock.drawU(ug.apply(new UTranslate(1, 1))); ug.apply(new UChangeColor(color)).draw(new URectangle(dim.getWidth(), dim.getHeight())); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/SingleLine.java000066400000000000000000000116401312650303100257250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.SpriteContainer; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.sprite.Sprite; class SingleLine extends AbstractTextBlock implements Line { private final List blocs = new ArrayList(); private final HorizontalAlignment horizontalAlignment; public SingleLine(String text, FontConfiguration fontConfiguration, HorizontalAlignment horizontalAlignment, SpriteContainer spriteContainer) { if (text.length() == 0) { text = " "; } this.horizontalAlignment = horizontalAlignment; final Splitter lineSplitter = new Splitter(text); for (HtmlCommand cmd : lineSplitter.getHtmlCommands(false)) { if (cmd instanceof Text) { final String s = ((Text) cmd).getText(); blocs.add(new TileText(s, fontConfiguration, null)); } else if (cmd instanceof TextLink) { final String s = ((TextLink) cmd).getText(); final Url url = ((TextLink) cmd).getUrl(); // blocs.add(new TileText(s, fontConfiguration.add(FontStyle.UNDERLINE), url)); blocs.add(new TileText(s, fontConfiguration, url)); } else if (cmd instanceof Img) { blocs.add(((Img) cmd).createMonoImage()); } else if (cmd instanceof SpriteCommand) { final Sprite sprite = spriteContainer.getSprite(((SpriteCommand) cmd).getSprite()); if (sprite != null) { blocs.add(sprite.asTextBlock(fontConfiguration.getColor(), 1)); } } else if (cmd instanceof FontChange) { fontConfiguration = ((FontChange) cmd).apply(fontConfiguration); } } } public Dimension2D calculateDimension(StringBounder stringBounder) { double width = 0; double height = 0; for (TextBlock b : blocs) { final Dimension2D size2D = b.calculateDimension(stringBounder); width += size2D.getWidth(); height = Math.max(height, size2D.getHeight()); } return new Dimension2DDouble(width, height); } // private double maxDeltaY(Graphics2D g2d) { // double result = 0; // final Dimension2D dim = calculateDimension(StringBounderUtils.asStringBounder(g2d)); // for (TextBlock b : blocs) { // if (b instanceof TileText == false) { // continue; // } // final Dimension2D dimBloc = b.calculateDimension(StringBounderUtils.asStringBounder(g2d)); // final double deltaY = dim.getHeight() - dimBloc.getHeight() + ((TileText) b).getFontSize2D(); // result = Math.max(result, deltaY); // } // return result; // } private double maxDeltaY(UGraphic ug) { double result = 0; final Dimension2D dim = calculateDimension(ug.getStringBounder()); for (TextBlock b : blocs) { if (b instanceof TileText == false) { continue; } final Dimension2D dimBloc = b.calculateDimension(ug.getStringBounder()); final double deltaY = dim.getHeight() - dimBloc.getHeight() + ((TileText) b).getFontSize2D(); result = Math.max(result, deltaY); } return result; } public void drawU(UGraphic ug) { final double deltaY = maxDeltaY(ug); final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dim = calculateDimension(stringBounder); double x = 0; for (TextBlock b : blocs) { if (b instanceof TileText) { b.drawU(ug.apply(new UTranslate(x, deltaY))); } else { final double dy = dim.getHeight() - b.calculateDimension(stringBounder).getHeight(); b.drawU(ug.apply(new UTranslate(x, dy))); } x += b.calculateDimension(stringBounder).getWidth(); } } public HorizontalAlignment getHorizontalAlignment() { return horizontalAlignment; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/SizeChange.java000066400000000000000000000037031312650303100257150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; class SizeChange implements FontChange { static private final Pattern2 sizePattern = MyPattern.cmpile("(?i)" + Splitter.fontSizePattern2); private final Integer size; SizeChange(String s) { final Matcher2 matcherSize = sizePattern.matcher(s); if (matcherSize.find() == false) { throw new IllegalArgumentException(); } size = new Integer(matcherSize.group(1)); } Integer getSize() { return size; } public FontConfiguration apply(FontConfiguration initial) { return initial.changeSize(size); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/SkinParameter.java000066400000000000000000000152751312650303100264510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.ugraphic.UStroke; public class SkinParameter { public static final SkinParameter DATABASE = new SkinParameter("DATABASE", ColorParam.databaseBackground, ColorParam.databaseBorder, FontParam.DATABASE, FontParam.DATABASE_STEREOTYPE); public static final SkinParameter ARTIFACT = new SkinParameter("ARTIFACT", ColorParam.artifactBackground, ColorParam.artifactBorder, FontParam.ARTIFACT, FontParam.ARTIFACT_STEREOTYPE); public static final SkinParameter COMPONENT1 = new SkinParameter("COMPONENT1", ColorParam.componentBackground, ColorParam.componentBorder, FontParam.COMPONENT, FontParam.COMPONENT_STEREOTYPE); public static final SkinParameter NODE = new SkinParameter("NODE", ColorParam.nodeBackground, ColorParam.nodeBorder, FontParam.NODE, FontParam.NODE_STEREOTYPE); public static final SkinParameter STORAGE = new SkinParameter("STORAGE", ColorParam.storageBackground, ColorParam.storageBorder, FontParam.STORAGE, FontParam.STORAGE_STEREOTYPE); public static final SkinParameter QUEUE = new SkinParameter("QUEUE", ColorParam.queueBackground, ColorParam.queueBorder, FontParam.QUEUE, FontParam.QUEUE_STEREOTYPE); public static final SkinParameter STACK = new SkinParameter("STACK", ColorParam.stackBackground, ColorParam.stackBorder, FontParam.STACK, FontParam.STACK_STEREOTYPE); public static final SkinParameter CLOUD = new SkinParameter("CLOUD", ColorParam.cloudBackground, ColorParam.cloudBorder, FontParam.CLOUD, FontParam.CLOUD_STEREOTYPE); public static final SkinParameter FRAME = new SkinParameter("FRAME", ColorParam.frameBackground, ColorParam.frameBorder, FontParam.FRAME, FontParam.FRAME_STEREOTYPE); public static final SkinParameter COMPONENT2 = new SkinParameter("COMPONENT2", ColorParam.componentBackground, ColorParam.componentBorder, FontParam.COMPONENT, FontParam.COMPONENT_STEREOTYPE); public static final SkinParameter AGENT = new SkinParameter("AGENT", ColorParam.agentBackground, ColorParam.agentBorder, FontParam.AGENT, FontParam.AGENT_STEREOTYPE); public static final SkinParameter FOLDER = new SkinParameter("FOLDER", ColorParam.folderBackground, ColorParam.folderBorder, FontParam.FOLDER, FontParam.FOLDER_STEREOTYPE); public static final SkinParameter FILE = new SkinParameter("FILE", ColorParam.fileBackground, ColorParam.fileBorder, FontParam.FILE, FontParam.FILE_STEREOTYPE); public static final SkinParameter PACKAGE = new SkinParameter("PACKAGE", ColorParam.packageBackground, ColorParam.packageBorder, FontParam.FOLDER, FontParam.FOLDER_STEREOTYPE); public static final SkinParameter CARD = new SkinParameter("CARD", ColorParam.rectangleBackground, ColorParam.rectangleBorder, FontParam.RECTANGLE, FontParam.RECTANGLE_STEREOTYPE); public static final SkinParameter RECTANGLE = new SkinParameter("RECTANGLE", ColorParam.rectangleBackground, ColorParam.rectangleBorder, FontParam.RECTANGLE, FontParam.RECTANGLE_STEREOTYPE); public static final SkinParameter ACTOR = new SkinParameter("ACTOR", ColorParam.actorBackground, ColorParam.actorBorder, FontParam.ACTOR, FontParam.ACTOR_STEREOTYPE); public static final SkinParameter BOUNDARY = new SkinParameter("BOUNDARY", ColorParam.boundaryBackground, ColorParam.boundaryBorder, FontParam.BOUNDARY, FontParam.BOUNDARY_STEREOTYPE); public static final SkinParameter CONTROL = new SkinParameter("CONTROL", ColorParam.controlBackground, ColorParam.controlBorder, FontParam.CONTROL, FontParam.CONTROL_STEREOTYPE); public static final SkinParameter ENTITY_DOMAIN = new SkinParameter("ENTITY_DOMAIN", ColorParam.entityBackground, ColorParam.entityBorder, FontParam.ENTITY, FontParam.ENTITY_STEREOTYPE); public static final SkinParameter INTERFACE = new SkinParameter("INTERFACE", ColorParam.interfaceBackground, ColorParam.interfaceBorder, FontParam.INTERFACE, FontParam.INTERFACE_STEREOTYPE); private final ColorParam colorParamBorder; private final ColorParam colorParamBack; private final FontParam fontParam; private final FontParam fontParamStereotype; private final String name; private SkinParameter(String name, ColorParam colorParamBack, ColorParam colorParamBorder, FontParam fontParam, FontParam fontParamStereotype) { this.name = name; this.colorParamBack = colorParamBack; this.colorParamBorder = colorParamBorder; this.fontParam = fontParam; this.fontParamStereotype = fontParamStereotype; } public String getUpperCaseName() { if (name.endsWith("1") || name.endsWith("2")) { return name.substring(0, name.length() - 1); } return name; } public ColorParam getColorParamBorder() { return colorParamBorder; } public ColorParam getColorParamBack() { return colorParamBack; } public FontParam getFontParam() { return fontParam; } public FontParam getFontParamStereotype() { return fontParamStereotype; } public double getRoundCorner(ISkinParam skinParam, Stereotype stereotype) { return skinParam.getRoundCorner(name.toLowerCase(), stereotype); } public UStroke getStroke(ISkinParam skinParam, Stereotype stereotype) { UStroke result = null; if (name.equals("RECTANGLE")) { result = skinParam.getThickness(LineParam.rectangleBorder, stereotype); } if (result == null) { result = new UStroke(1.5); } return result; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/Splitter.java000066400000000000000000000127521312650303100255070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.EnumSet; import java.util.List; import java.util.regex.Pattern; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.ugraphic.sprite.SpriteUtils; public class Splitter { static final String endFontPattern = "\\|\\|\\|\\"; static final String endSupSub = "\\|\\"; public static final String fontPattern = "\\"; public static final String fontColorPattern2 = "\\"; public static final String fontSizePattern2 = "\\"; static final String fontSup = "\\"; static final String fontSub = "\\"; static final String imgPattern = "\\]+[%q%g]?[%s]*|vspace\\s*=\\s*[%q%g]?\\d+[%q%g]?\\s*|valign[%s]*=[%s]*[%q%g]?(top|middle|bottom)[%q%g]?[%s]*)+\\>"; public static final String imgPatternNoSrcColon = "\\{}]+)" + "(\\{scale=(?:[0-9.]+)\\})?" + "\\>"; public static final String fontFamilyPattern = "\\]+)/?\\>"; public static final String svgAttributePattern = "\\]+)/?\\>"; public static final String openiconPattern = "\\<&([-\\w]+)\\>"; public static final String spritePattern = "\\<\\$" + SpriteUtils.SPRITE_NAME + "(?:\\{scale=(?:[0-9.]+)\\})?" + "\\>"; public static final String spritePattern2 = "\\<\\$(" + SpriteUtils.SPRITE_NAME + ")" + "(\\{scale=(?:[0-9.]+)\\})?" + "\\>"; static final String htmlTag; static final String linkPattern = "\\[\\[([^\\[\\]]+)\\]\\]"; public static final String mathPattern = "\\(.+?)\\"; public static final String latexPattern = "\\(.+?)\\"; private static final Pattern2 tagOrText; static { final StringBuilder sb = new StringBuilder("(?i)"); for (FontStyle style : EnumSet.allOf(FontStyle.class)) { sb.append(style.getActivationPattern()); sb.append('|'); sb.append(style.getDeactivationPattern()); sb.append('|'); } sb.append(fontPattern); sb.append('|'); sb.append(fontColorPattern2); sb.append('|'); sb.append(fontSizePattern2); sb.append('|'); sb.append(fontSup); sb.append('|'); sb.append(fontSub); sb.append('|'); sb.append(endFontPattern); sb.append('|'); sb.append(endSupSub); sb.append('|'); sb.append(imgPattern); sb.append('|'); sb.append(imgPatternNoSrcColon); sb.append('|'); sb.append(fontFamilyPattern); sb.append('|'); // sb.append(spritePattern); // sb.append('|'); sb.append(linkPattern); sb.append('|'); sb.append(svgAttributePattern); htmlTag = sb.toString(); tagOrText = MyPattern.cmpile(htmlTag + "|.+?(?=" + htmlTag + ")|.+$", Pattern.CASE_INSENSITIVE); } private final List splitted = new ArrayList(); public Splitter(String s) { final Matcher2 matcher = tagOrText.matcher(s); while (matcher.find()) { String part = matcher.group(0); part = StringUtils.showComparatorCharacters(part); splitted.add(part); } } List getSplittedInternal() { return splitted; } public List getHtmlCommands(boolean newLineAlone) { final HtmlCommandFactory factory = new HtmlCommandFactory(); final List result = new ArrayList(); for (String s : getSplittedInternal()) { final HtmlCommand cmd = factory.getHtmlCommand(s); if (newLineAlone && cmd instanceof Text) { result.addAll(splitText((Text) cmd)); } else { result.add(cmd); } } return Collections.unmodifiableList(result); } private Collection splitText(Text cmd) { String s = cmd.getText(); final Collection result = new ArrayList(); while (true) { final int x = s.indexOf(Text.TEXT_BS_BS_N.getText()); if (x == -1) { result.add(new Text(s)); return result; } if (x > 0) { result.add(new Text(s.substring(0, x))); } result.add(Text.TEXT_BS_BS_N); s = s.substring(x + 2); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/SpriteCommand.java000066400000000000000000000034431312650303100264430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.StringUtils; public class SpriteCommand implements HtmlCommand { private final String sprite; SpriteCommand(String sprite) { if (sprite == null) { throw new IllegalArgumentException(); } if (sprite.startsWith("<$") == false) { throw new IllegalArgumentException(); } if (sprite.endsWith(">") == false) { throw new IllegalArgumentException(); } this.sprite = StringUtils.trin(sprite.substring(2, sprite.length() - 1)); } public String getSprite() { return sprite; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/StringBounder.java000066400000000000000000000027111312650303100264600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ugraphic.UFont; public interface StringBounder { public Dimension2D calculateDimension(UFont font, String text); } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/SvgAttributes.java000066400000000000000000000047751312650303100265150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.util.Collections; import java.util.Map; import java.util.TreeMap; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; public class SvgAttributes { private final Map attributes = new TreeMap(); public SvgAttributes() { } private SvgAttributes(SvgAttributes other) { this.attributes.putAll(other.attributes); } public SvgAttributes(String args) { final Pattern2 p = MyPattern.cmpile("(\\w+)\\s*=\\s*([%g][^%g]*[%g]|(?:\\w+))"); final Matcher2 m = p.matcher(args); while (m.find()) { attributes.put(m.group(1), StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(m.group(2))); } } public Map attributes() { return Collections.unmodifiableMap(attributes); } public SvgAttributes add(String key, String value) { final SvgAttributes result = new SvgAttributes(this); result.attributes.put(key, value); return result; } public SvgAttributes add(SvgAttributes toBeAdded) { final SvgAttributes result = new SvgAttributes(this); result.attributes.putAll(toBeAdded.attributes); return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/SvgAttributesChange.java000066400000000000000000000036311312650303100276110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; class SvgAttributesChange implements FontChange { static final Pattern2 pattern = MyPattern.cmpile(Splitter.svgAttributePattern); private final SvgAttributes attributes; SvgAttributesChange(String s) { final Matcher2 m = pattern.matcher(s); if (m.find() == false) { throw new IllegalStateException(); } attributes = new SvgAttributes(m.group(1)); } public FontConfiguration apply(FontConfiguration initial) { return initial.changeAttributes(attributes); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/SymbolContext.java000066400000000000000000000077171312650303100265200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; public class SymbolContext { private final HtmlColor backColor; private final HtmlColor foreColor; private final UStroke stroke; private final boolean shadowing; private final double deltaShadow; private final double roundCorner; private SymbolContext(HtmlColor backColor, HtmlColor foreColor, UStroke stroke, boolean shadowing, double deltaShadow, double roundCorner) { this.backColor = backColor; this.foreColor = foreColor; this.stroke = stroke; this.shadowing = shadowing; this.deltaShadow = deltaShadow; this.roundCorner = roundCorner; // if (backColor instanceof HtmlColorTransparent) { // throw new UnsupportedOperationException(); // } } @Override public String toString() { return super.toString() + " backColor=" + backColor + " foreColor=" + foreColor; } final public UGraphic apply(UGraphic ug) { return applyStroke(applyColors(ug)); } public UGraphic applyColors(UGraphic ug) { return ug.apply(new UChangeColor(foreColor)).apply(new UChangeBackColor(backColor)); } public UGraphic applyStroke(UGraphic ug) { return ug.apply(stroke); } public SymbolContext(HtmlColor backColor, HtmlColor foreColor) { this(backColor, foreColor, new UStroke(), false, 0, 0); } public SymbolContext withShadow(boolean newShadow) { return new SymbolContext(backColor, foreColor, stroke, newShadow, deltaShadow, roundCorner); } public SymbolContext withDeltaShadow(double deltaShadow) { return new SymbolContext(backColor, foreColor, stroke, shadowing, deltaShadow, roundCorner); } public SymbolContext withStroke(UStroke newStroke) { return new SymbolContext(backColor, foreColor, newStroke, shadowing, deltaShadow, roundCorner); } public SymbolContext withBackColor(HtmlColor backColor) { return new SymbolContext(backColor, foreColor, stroke, shadowing, deltaShadow, roundCorner); } public SymbolContext withForeColor(HtmlColor foreColor) { return new SymbolContext(backColor, foreColor, stroke, shadowing, deltaShadow, roundCorner); } public SymbolContext withRoundCorner(double roundCorner) { return new SymbolContext(backColor, foreColor, stroke, shadowing, deltaShadow, roundCorner); } public HtmlColor getBackColor() { return backColor; } public HtmlColor getForeColor() { return foreColor; } public UStroke getStroke() { return stroke; } public boolean isShadowing() { return shadowing || deltaShadow > 0; } public double getDeltaShadow() { return deltaShadow; } public double getRoundCorner() { return roundCorner; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/Text.java000066400000000000000000000035551312650303100246260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.BackSlash; public class Text implements HtmlCommand { private final String text; public static final Text TEXT_BS_BS_N = new Text(BackSlash.BS_BS_N); Text(String text) { this.text = text.replaceAll("\\\\\\[", "[").replaceAll("\\\\\\]", "]"); if (text.indexOf(BackSlash.CHAR_NEWLINE) != -1) { throw new IllegalArgumentException(); } if (text.length() == 0) { throw new IllegalArgumentException(); } } public String getText() { assert text.length() > 0; return text; } public boolean isNewline() { return text.equals(BackSlash.BS_BS_N); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlock.java000066400000000000000000000031611312650303100255720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.ugraphic.UShape; public interface TextBlock extends UDrawable, UShape { public Dimension2D calculateDimension(StringBounder stringBounder); public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy); }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockArrow.java000066400000000000000000000071311312650303100266060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TextBlockArrow extends AbstractTextBlock implements TextBlock { private final double size; private final Direction arrow; private final HtmlColor color; public TextBlockArrow(Direction arrow, FontConfiguration fontConfiguration) { if (arrow == null) { throw new IllegalArgumentException(); } this.arrow = arrow; // this.size = fontConfiguration.getFont().getSize2D() * 0 + 30; this.size = fontConfiguration.getFont().getSize2D(); this.color = fontConfiguration.getColor(); } public void drawU(UGraphic ug) { ug = ug.apply(new UChangeBackColor(color)); ug = ug.apply(new UChangeColor(color)); int triSize = (int) (size * .8 - 3); if (triSize % 2 == 1) { triSize--; } final UPolygon triangle = getTriangle(triSize); if (arrow == Direction.RIGHT || arrow == Direction.LEFT) { ug.apply(new UTranslate(2, (size - triSize) - 2)).draw(triangle); } else { ug.apply(new UTranslate(2, (size - triSize) - 2)).draw(triangle); } } private UPolygon getTriangle(int triSize) { final UPolygon triangle = new UPolygon(); if (arrow == Direction.RIGHT) { triangle.addPoint(0, 0); triangle.addPoint(triSize, triSize / 2); triangle.addPoint(0, triSize); triangle.addPoint(0, 0); } else if (arrow == Direction.LEFT) { triangle.addPoint(triSize, 0); triangle.addPoint(0, triSize / 2); triangle.addPoint(triSize, triSize); triangle.addPoint(triSize, 0); } else if (arrow == Direction.UP) { triangle.addPoint(0, triSize); triangle.addPoint(triSize / 2, 0); triangle.addPoint(triSize, triSize); triangle.addPoint(0, triSize); } else if (arrow == Direction.DOWN) { triangle.addPoint(0, 0); triangle.addPoint(triSize / 2, triSize); triangle.addPoint(triSize, 0); triangle.addPoint(0, 0); } else { throw new IllegalStateException(); } return triangle; } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(size, size); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockBordered.java000066400000000000000000000075231312650303100272470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TextBlockBordered extends AbstractTextBlock implements TextBlock { private final double cornersize; private final HtmlColor backgroundColor; private final HtmlColor borderColor; private final int marginX = 6; private final int marginY = 5; private final UStroke stroke; private final boolean withShadow; private final TextBlock textBlock; TextBlockBordered(TextBlock textBlock, UStroke stroke, HtmlColor borderColor, HtmlColor backgroundColor, double cornersize) { this.cornersize = cornersize; this.textBlock = textBlock; this.withShadow = false; this.stroke = stroke; this.borderColor = borderColor; this.backgroundColor = backgroundColor; } private double getTextHeight(StringBounder stringBounder) { final Dimension2D size = textBlock.calculateDimension(stringBounder); return size.getHeight() + 2 * marginY; } private double getPureTextWidth(StringBounder stringBounder) { final Dimension2D size = textBlock.calculateDimension(stringBounder); return size.getWidth(); } private double getTextWidth(StringBounder stringBounder) { return getPureTextWidth(stringBounder) + 2 * marginX; } public Dimension2D calculateDimension(StringBounder stringBounder) { final double height = getTextHeight(stringBounder); final double width = getTextWidth(stringBounder); return new Dimension2DDouble(width + 1, height + 1); } private UGraphic applyStroke(UGraphic ug) { if (stroke == null) { return ug; } return ug.apply(stroke); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Shadowable polygon = getPolygonNormal(stringBounder); if (withShadow) { polygon.setDeltaShadow(4); } ug = ug.apply(new UChangeBackColor(backgroundColor)).apply(new UChangeColor(borderColor)); ug = applyStroke(ug); ug.draw(polygon); textBlock.drawU(ug.apply(new UTranslate(marginX, marginY))); } private Shadowable getPolygonNormal(final StringBounder stringBounder) { final double height = getTextHeight(stringBounder); final double width = getTextWidth(stringBounder); return new URectangle(width, height, cornersize, cornersize); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockCompressed.java000066400000000000000000000054361312650303100276260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.CompressionTransform; import net.sourceforge.plantuml.ugraphic.SlotFinder; import net.sourceforge.plantuml.ugraphic.SlotSet; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicCompress; public class TextBlockCompressed extends AbstractTextBlock implements TextBlock { private final TextBlock textBlock; public TextBlockCompressed(TextBlock textBlock) { this.textBlock = textBlock; } public void drawU(final UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final CompressionTransform compressionTransform = getCompressionTransform(stringBounder); textBlock.drawU(new UGraphicCompress(ug, compressionTransform)); } private CompressionTransform getCompressionTransform(final StringBounder stringBounder) { final SlotFinder slotFinder = new SlotFinder(stringBounder); textBlock.drawU(slotFinder); final SlotSet ysSlotSet = slotFinder.getYSlotSet().reverse().smaller(5.0); final CompressionTransform compressionTransform = new CompressionTransform(ysSlotSet); return compressionTransform; } public Dimension2D calculateDimension(StringBounder stringBounder) { final CompressionTransform compressionTransform = getCompressionTransform(stringBounder); final Dimension2D dim = textBlock.calculateDimension(stringBounder); return new Dimension2DDouble(dim.getWidth(), compressionTransform.transform(dim.getHeight())); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockCompressed2.java000066400000000000000000000043351312650303100277050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.CompressionTransform; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicCompress2; public class TextBlockCompressed2 extends AbstractTextBlock implements TextBlock { private final TextBlock textBlock; private final CompressionTransform compressionTransform; public TextBlockCompressed2(TextBlock textBlock, CompressionTransform compressionTransform) { this.textBlock = textBlock; this.compressionTransform = compressionTransform; } public void drawU(final UGraphic ug) { textBlock.drawU(new UGraphicCompress2(ug, compressionTransform)); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dim = textBlock.calculateDimension(stringBounder); return new Dimension2DDouble(compressionTransform.transform(dim.getWidth()), dim.getHeight()); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockEmpty.java000066400000000000000000000042061312650303100266120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; public class TextBlockEmpty extends AbstractTextBlock implements TextBlockWidth, TextBlock { private final double width; private final double height; public TextBlockEmpty(double width, double height) { this.width = width; this.height = height; } public TextBlockEmpty() { this(0, 0); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } public void drawU(UGraphic ug) { } public TextBlock asTextBlock(final double widthToUse) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { } public Dimension2D calculateDimension(StringBounder stringBounder) { return TextBlockEmpty.this.calculateDimension(stringBounder); } }; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockGeneric.java000066400000000000000000000046061312650303100270740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; public class TextBlockGeneric extends AbstractTextBlock implements TextBlock { private final TextBlock textBlock; private final HtmlColor background; private final HtmlColor border; public TextBlockGeneric(TextBlock textBlock, HtmlColor background, HtmlColor border) { this.textBlock = textBlock; this.border = border; this.background = background; } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dim = textBlock.calculateDimension(stringBounder); return dim; } public void drawU(UGraphic ug) { ug = ug.apply(new UChangeBackColor(background)); ug = ug.apply(new UChangeColor(border)); final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug.apply(new UStroke(2, 2, 1)).draw(new URectangle(dim.getWidth(), dim.getHeight())); textBlock.drawU(ug); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockHorizontal.java000066400000000000000000000055241312650303100276510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TextBlockHorizontal extends AbstractTextBlock implements TextBlock { private final List blocks = new ArrayList(); private final VerticalAlignment alignment; TextBlockHorizontal(TextBlock b1, TextBlock b2, VerticalAlignment alignment) { this.blocks.add(b1); this.blocks.add(b2); this.alignment = alignment; } public TextBlockHorizontal(List all, VerticalAlignment alignment) { if (all.size() < 2) { throw new IllegalArgumentException(); } this.blocks.addAll(all); this.alignment = alignment; } public Dimension2D calculateDimension(StringBounder stringBounder) { Dimension2D dim = blocks.get(0).calculateDimension(stringBounder); for (int i = 1; i < blocks.size(); i++) { dim = Dimension2DDouble.mergeLR(dim, blocks.get(i).calculateDimension(stringBounder)); } return dim; } public void drawU(UGraphic ug) { double x = 0; final Dimension2D dimtotal = calculateDimension(ug.getStringBounder()); for (TextBlock block : blocks) { final Dimension2D dimb = block.calculateDimension(ug.getStringBounder()); if (alignment == VerticalAlignment.CENTER) { final double dy = (dimtotal.getHeight() - dimb.getHeight()) / 2; block.drawU(ug.apply(new UTranslate(x, dy))); } else { block.drawU(ug.apply(new UTranslate(x, 0))); } x += dimb.getWidth(); } } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockLineBefore.java000066400000000000000000000062111312650303100275240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.svek.Ports; import net.sourceforge.plantuml.svek.WithPorts; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UHorizontalLine; public class TextBlockLineBefore extends AbstractTextBlock implements TextBlock, WithPorts { private final TextBlock textBlock; private final char separator; private final TextBlock title; public TextBlockLineBefore(TextBlock textBlock, char separator, TextBlock title) { this.textBlock = textBlock; this.separator = separator; this.title = title; } public TextBlockLineBefore(TextBlock textBlock, char separator) { this(textBlock, separator, null); } public TextBlockLineBefore(TextBlock textBlock) { this(textBlock, '\0'); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dim = textBlock.calculateDimension(stringBounder); if (title != null) { final Dimension2D dimTitle = title.calculateDimension(stringBounder); return Dimension2DDouble.atLeast(dim, dimTitle.getWidth() + 8, dimTitle.getHeight()); } return dim; } public void drawU(UGraphic ug) { final HtmlColor color = ug.getParam().getColor(); if (title == null) { UHorizontalLine.infinite(1, 1, separator).drawMe(ug); } textBlock.drawU(ug); ug = ug.apply(new UChangeColor(color)); if (title != null) { UHorizontalLine.infinite(1, 1, title, separator).drawMe(ug); } } @Override public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { return textBlock.getInnerPosition(member, stringBounder, strategy); } public Ports getPorts(StringBounder stringBounder) { return ((WithPorts) textBlock).getPorts(stringBounder); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockMarged.java000066400000000000000000000054151312650303100267160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.svek.Ports; import net.sourceforge.plantuml.svek.WithPorts; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; class TextBlockMarged extends AbstractTextBlock implements TextBlock, WithPorts { private final TextBlock textBlock; private final double x1; private final double x2; private final double y1; private final double y2; TextBlockMarged(TextBlock textBlock, double x1, double x2, double y1, double y2) { this.textBlock = textBlock; this.x1 = x1; this.x2 = x2; this.y1 = y1; this.y2 = y2; } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dim = textBlock.calculateDimension(stringBounder); return Dimension2DDouble.delta(dim, x1 + x2, y1 + y2); } public void drawU(UGraphic ug) { final UTranslate translate = new UTranslate(x1, y1); textBlock.drawU(ug.apply(translate)); } @Override public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { final Rectangle2D parent = textBlock.getInnerPosition(member, stringBounder, strategy); if (parent == null) { return null; } final UTranslate translate = new UTranslate(x1, y1); return translate.apply(parent); } public Ports getPorts(StringBounder stringBounder) { return ((WithPorts) textBlock).getPorts(stringBounder).translateY(y1); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockMinWidth.java000066400000000000000000000047401312650303100272420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; class TextBlockMinWidth extends AbstractTextBlock implements TextBlock { private final TextBlock textBlock; private final double minWidth; private final HorizontalAlignment horizontalAlignment; TextBlockMinWidth(TextBlock textBlock, double minWidth, HorizontalAlignment horizontalAlignment) { this.textBlock = textBlock; this.minWidth = minWidth; this.horizontalAlignment = horizontalAlignment; } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dim = textBlock.calculateDimension(stringBounder); return Dimension2DDouble.atLeast(dim, minWidth, 0); } public void drawU(UGraphic ug) { if (horizontalAlignment == HorizontalAlignment.LEFT) { textBlock.drawU(ug); } else if (horizontalAlignment == HorizontalAlignment.RIGHT) { final Dimension2D dim = textBlock.calculateDimension(ug.getStringBounder()); final double diffx = minWidth - dim.getWidth(); textBlock.drawU(ug.apply(new UTranslate(diffx, 0))); } else { throw new UnsupportedOperationException(); } } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockRecentred.java000066400000000000000000000043111312650303100274240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TextBlockRecentred extends AbstractTextBlock implements TextBlockBackcolored { private final TextBlock textBlock; public TextBlockRecentred(TextBlock textBlock) { this.textBlock = textBlock; } public void drawU(final UGraphic ug) { final MinMax minMax = TextBlockUtils.getMinMax(textBlock, ug.getStringBounder()); textBlock.drawU(ug.apply(new UTranslate(-minMax.getMinX(), -minMax.getMinY()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final MinMax minMax = TextBlockUtils.getMinMax(textBlock, stringBounder); return minMax.getDimension(); } public HtmlColor getBackcolor() { return ((TextBlockBackcolored) textBlock).getBackcolor(); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockSimple.java000066400000000000000000000164021312650303100267460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.StringTokenizer; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.EmbededDiagram; import net.sourceforge.plantuml.SpriteContainer; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TextBlockSimple extends AbstractTextBlock implements TextBlock { private List lines2; private final Display texts; private final FontConfiguration fontConfiguration; private final UFont fontForStereotype; private final HorizontalAlignment horizontalAlignment; private final SpriteContainer spriteContainer; private final double maxMessageSize; private final HtmlColor htmlColorForStereotype; protected TextBlockSimple(Display texts, FontConfiguration fontConfiguration, HorizontalAlignment horizontalAlignment, SpriteContainer spriteContainer, double maxMessageSize) { this(texts, fontConfiguration, horizontalAlignment, spriteContainer, maxMessageSize, null, null); } public TextBlockSimple(Display texts, FontConfiguration fontConfiguration, HorizontalAlignment horizontalAlignment, SpriteContainer spriteContainer, double maxMessageSize, UFont fontForStereotype, HtmlColor htmlColorForStereotype) { this.texts = texts; this.fontConfiguration = fontConfiguration; this.horizontalAlignment = horizontalAlignment; this.spriteContainer = spriteContainer; this.maxMessageSize = maxMessageSize; this.fontForStereotype = fontForStereotype; this.htmlColorForStereotype = htmlColorForStereotype; } private List getLines(StringBounder stringBounder) { if (lines2 == null) { if (stringBounder == null) { throw new IllegalStateException(); } this.lines2 = new ArrayList(); for (CharSequence s : texts) { if (s instanceof Stereotype) { lines2.addAll(createLinesForStereotype( fontConfiguration.forceFont(fontForStereotype, htmlColorForStereotype), (Stereotype) s, horizontalAlignment, spriteContainer)); } else if (s instanceof EmbededDiagram) { lines2.add(new EmbededSystemLine((EmbededDiagram) s)); } else { addInLines(stringBounder, s.toString()); } } } return lines2; } private void addInLines(StringBounder stringBounder, String s) { if (maxMessageSize == 0) { addSingleLine(s); } else if (maxMessageSize > 0) { final StringTokenizer st = new StringTokenizer(s, " ", true); final StringBuilder currentLine = new StringBuilder(); while (st.hasMoreTokens()) { final String token = st.nextToken(); final double w = getTextWidth(stringBounder, currentLine + token); if (w > maxMessageSize) { addSingleLineNoSpace(currentLine.toString()); currentLine.setLength(0); if (token.startsWith(" ") == false) { currentLine.append(token); } } else { currentLine.append(token); } } addSingleLineNoSpace(currentLine.toString()); } else if (maxMessageSize < 0) { final StringBuilder currentLine = new StringBuilder(); for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); final double w = getTextWidth(stringBounder, currentLine.toString() + c); if (w > -maxMessageSize) { addSingleLineNoSpace(currentLine.toString()); currentLine.setLength(0); if (c != ' ') { currentLine.append(c); } } else { currentLine.append(c); } } addSingleLineNoSpace(currentLine.toString()); } } private void addSingleLineNoSpace(String s) { if (s.length() == 0 || MyPattern.mtches(s, "^[%s]*$ ")) { return; } lines2.add(new SingleLine(s, fontConfiguration, horizontalAlignment, spriteContainer)); } private void addSingleLine(String s) { lines2.add(new SingleLine(s, fontConfiguration, horizontalAlignment, spriteContainer)); } private double getTextWidth(StringBounder stringBounder, String s) { final Line line = new SingleLine(s, fontConfiguration, horizontalAlignment, spriteContainer); return line.calculateDimension(stringBounder).getWidth(); } private List createLinesForStereotype(FontConfiguration fontConfiguration, Stereotype s, HorizontalAlignment horizontalAlignment, SpriteContainer spriteContainer) { assert s.getLabel(false) != null; final List result = new ArrayList(); for (String st : s.getLabels(spriteContainer.useGuillemet())) { result.add(new SingleLine(st, fontConfiguration, horizontalAlignment, spriteContainer)); } return Collections.unmodifiableList(result); } public Dimension2D calculateDimension(StringBounder stringBounder) { return getTextDimension(stringBounder); } protected final Dimension2D getTextDimension(StringBounder stringBounder) { double width = 0; double height = 0; for (Line line : getLines(stringBounder)) { final Dimension2D size2D = line.calculateDimension(stringBounder); height += size2D.getHeight(); width = Math.max(width, size2D.getWidth()); } return new Dimension2DDouble(width, height); } public void drawU(UGraphic ug) { double y = 0; final Dimension2D dimText = getTextDimension(ug.getStringBounder()); for (Line line : getLines(ug.getStringBounder())) { final HorizontalAlignment lineHorizontalAlignment = line.getHorizontalAlignment(); double deltaX = 0; if (lineHorizontalAlignment == HorizontalAlignment.CENTER) { final double diff = dimText.getWidth() - line.calculateDimension(ug.getStringBounder()).getWidth(); deltaX = diff / 2.0; } else if (lineHorizontalAlignment == HorizontalAlignment.RIGHT) { final double diff = dimText.getWidth() - line.calculateDimension(ug.getStringBounder()).getWidth(); deltaX = diff; } line.drawU(ug.apply(new UTranslate(deltaX, y))); y += line.calculateDimension(ug.getStringBounder()).getHeight(); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockSprited.java000066400000000000000000000054541312650303100271340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.SpriteContainer; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TextBlockSprited extends TextBlockSimple { private final TextBlock sprite; public TextBlockSprited(TextBlock sprite, Display texts, FontConfiguration fontConfiguration, HorizontalAlignment horizontalAlignment, SpriteContainer spriteContainer) { super(texts, fontConfiguration, horizontalAlignment, spriteContainer, 0); this.sprite = sprite; } @Override public Dimension2D calculateDimension(StringBounder stringBounder) { final double widthCircledCharacter = getCircledCharacterWithAndMargin(stringBounder); final double heightCircledCharacter = sprite.calculateDimension(stringBounder).getHeight(); final Dimension2D dim = super.calculateDimension(stringBounder); return new Dimension2DDouble(dim.getWidth() + widthCircledCharacter, Math.max(heightCircledCharacter, dim.getHeight())); } private double getCircledCharacterWithAndMargin(StringBounder stringBounder) { return sprite.calculateDimension(stringBounder).getWidth() + 6.0; } @Override public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); sprite.drawU(ug); final double widthCircledCharacter = getCircledCharacterWithAndMargin(stringBounder); super.drawU(ug.apply(new UTranslate(widthCircledCharacter, 0))); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockTitle.java000066400000000000000000000052751312650303100266040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TextBlockTitle implements TextBlock { private final double outMargin = 2; private final TextBlock textBlock; TextBlockTitle(FontConfiguration font, Display stringsToDisplay, ISkinSimple spriteContainer) { if (stringsToDisplay.size() == 1 && stringsToDisplay.get(0).length() == 0) { throw new IllegalArgumentException(); } textBlock = stringsToDisplay.create(font, HorizontalAlignment.CENTER, spriteContainer, LineBreakStrategy.NONE, CreoleMode.FULL, null, null); } public final void drawU(UGraphic ug) { textBlock.drawU(ug.apply(new UTranslate(outMargin, 0))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D textDim = textBlock.calculateDimension(stringBounder); final double width = textDim.getWidth() + outMargin * 2; final double height = textDim.getHeight(); return new Dimension2DDouble(width, height); } public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockUtils.java000066400000000000000000000142551312650303100266210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics2D; import java.awt.font.FontRenderContext; import java.awt.font.LineMetrics; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.posimo.Positionable; import net.sourceforge.plantuml.posimo.PositionableImpl; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.ugraphic.LimitFinder; import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; public class TextBlockUtils { public static TextBlock bordered(TextBlock textBlock, UStroke stroke, HtmlColor borderColor, HtmlColor backgroundColor, double cornersize) { return new TextBlockBordered(textBlock, stroke, borderColor, backgroundColor, cornersize); } public static TextBlock title(FontConfiguration font, Display stringsToDisplay, ISkinParam skinParam) { UStroke stroke = skinParam.getThickness(LineParam.titleBorder, null); final Rose rose = new Rose(); HtmlColor borderColor = rose.getHtmlColor(skinParam, ColorParam.titleBorder); final HtmlColor backgroundColor = rose.getHtmlColor(skinParam, ColorParam.titleBackground); final TextBlockTitle result = new TextBlockTitle(font, stringsToDisplay, skinParam); if (stroke == null && borderColor == null) { return result; } if (stroke == null) { stroke = new UStroke(1.5); } if (borderColor == null) { borderColor = HtmlColorUtils.BLACK; } final double corner = skinParam.getRoundCorner("titleBorder", null); return withMargin(bordered(result, stroke, borderColor, backgroundColor, corner), 2, 2); } public static TextBlock withMargin(TextBlock textBlock, double marginX, double marginY) { return new TextBlockMarged(textBlock, marginX, marginX, marginY, marginY); } public static TextBlock withMargin(TextBlock textBlock, double marginX1, double marginX2, double marginY1, double marginY2) { return new TextBlockMarged(textBlock, marginX1, marginX2, marginY1, marginY2); } public static TextBlock withMinWidth(TextBlock textBlock, double minWidth, HorizontalAlignment horizontalAlignment) { return new TextBlockMinWidth(textBlock, minWidth, horizontalAlignment); } public static TextBlock empty(final double width, final double height) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } }; } public static Positionable asPositionable(TextBlock textBlock, StringBounder stringBounder, Point2D pt) { return new PositionableImpl(pt, textBlock.calculateDimension(stringBounder)); } public static TextBlock mergeLR(TextBlock b1, TextBlock b2, VerticalAlignment verticallAlignment) { return new TextBlockHorizontal(b1, b2, verticallAlignment); } public static TextBlock mergeTB(TextBlock b1, TextBlock b2, HorizontalAlignment horizontalAlignment) { return new TextBlockVertical2(b1, b2, horizontalAlignment); } public static MinMax getMinMax(TextBlock tb, StringBounder stringBounder) { final LimitFinder limitFinder = new LimitFinder(stringBounder, false); tb.drawU(limitFinder); return limitFinder.getMinMax(); } private static final Graphics2D gg; static { final BufferedImage imDummy = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB); gg = imDummy.createGraphics(); } public static boolean isEmpty(TextBlock text, StringBounder dummyStringBounder) { if (text == null) { return true; } final Dimension2D dim = text.calculateDimension(dummyStringBounder); return dim.getHeight() == 0 && dim.getWidth() == 0; } public static FontRenderContext getFontRenderContext() { return gg.getFontRenderContext(); } public static LineMetrics getLineMetrics(UFont font, String text) { return font.getLineMetrics(gg, text); } public static FontMetrics getFontMetrics(Font font) { return gg.getFontMetrics(font); } public static TextBlock fullInnerPosition(final TextBlock bloc, final String display) { return new TextBlock() { public void drawU(UGraphic ug) { bloc.drawU(ug); } public Dimension2D calculateDimension(StringBounder stringBounder) { return bloc.calculateDimension(stringBounder); } public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { if (strategy.check(display, member)) { final Dimension2D dim = calculateDimension(stringBounder); return new Rectangle2D.Double(0, 0, dim.getWidth(), dim.getHeight()); } return null; } }; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockVertical2.java000066400000000000000000000116061312650303100273510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.svek.Ports; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.svek.WithPorts; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TextBlockVertical2 extends AbstractTextBlock implements TextBlock, WithPorts { private final List blocks = new ArrayList(); private final HorizontalAlignment horizontalAlignment; TextBlockVertical2(TextBlock b1, TextBlock b2, HorizontalAlignment horizontalAlignment) { this.blocks.add(b1); this.blocks.add(b2); this.horizontalAlignment = horizontalAlignment; } public TextBlockVertical2(List all, HorizontalAlignment horizontalAlignment) { if (all.size() < 2) { throw new IllegalArgumentException(); } this.blocks.addAll(all); this.horizontalAlignment = horizontalAlignment; } public Dimension2D calculateDimension(StringBounder stringBounder) { Dimension2D dim = blocks.get(0).calculateDimension(stringBounder); for (int i = 1; i < blocks.size(); i++) { dim = Dimension2DDouble.mergeTB(dim, blocks.get(i).calculateDimension(stringBounder)); } return dim; } public void drawU(UGraphic ug) { double y = 0; final Dimension2D dimtotal = calculateDimension(ug.getStringBounder()); // if (backColor != null) { // ug.apply(new UChangeColor(backColor)).apply(new UChangeBackColor(backColor)).draw(new URectangle(dimtotal)); // } for (TextBlock block : blocks) { final Dimension2D dimb = block.calculateDimension(ug.getStringBounder()); if (block instanceof TextBlockBackcolored) { final HtmlColor back = ((TextBlockBackcolored) block).getBackcolor(); if (back != null) { ug.apply(new UTranslate(0, y)).apply(new UChangeColor(back)).apply(new UChangeBackColor(back)) .draw(new URectangle(dimtotal.getWidth(), dimb.getHeight())); } } if (horizontalAlignment == HorizontalAlignment.LEFT) { block.drawU(ug.apply(new UTranslate(0, y))); } else if (horizontalAlignment == HorizontalAlignment.CENTER) { final double dx = (dimtotal.getWidth() - dimb.getWidth()) / 2; block.drawU(ug.apply(new UTranslate(dx, y))); } else if (horizontalAlignment == HorizontalAlignment.RIGHT) { final double dx = dimtotal.getWidth() - dimb.getWidth(); block.drawU(ug.apply(new UTranslate(dx, y))); } else { throw new UnsupportedOperationException(); } y += dimb.getHeight(); } } public Ports getPorts(StringBounder stringBounder) { double y = 0; // final Dimension2D dimtotal = calculateDimension(stringBounder); final Ports result = new Ports(); for (TextBlock block : blocks) { final Dimension2D dimb = block.calculateDimension(stringBounder); final Ports tmp = ((WithPorts) block).getPorts(stringBounder).translateY(y); result.addThis(tmp); y += dimb.getHeight(); } return result; } @Override public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { double y = 0; for (TextBlock block : blocks) { final Dimension2D dimb = block.calculateDimension(stringBounder); final Rectangle2D result = block.getInnerPosition(member, stringBounder, strategy); if (result != null) { return new UTranslate(0, y).apply(result); } y += dimb.getHeight(); } return null; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockWidth.java000066400000000000000000000026771312650303100266050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; public interface TextBlockWidth { Dimension2D calculateDimension(StringBounder stringBounder); TextBlock asTextBlock(double widthToUse); }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockWidthAdapter.java000066400000000000000000000035651312650303100301030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ugraphic.UGraphic; public class TextBlockWidthAdapter implements TextBlockWidth { private final TextBlock textBlock; private final double width; public TextBlockWidthAdapter(TextBlock textBlock, double widthToUse) { this.textBlock = textBlock; this.width = widthToUse; } public void drawU(UGraphic ug) { textBlock.drawU(ug); } public Dimension2D calculateDimension(StringBounder stringBounder) { return textBlock.calculateDimension(stringBounder); } public TextBlock asTextBlock(double widthToUse) { return textBlock; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextBlockWithUrl.java000066400000000000000000000042431312650303100271130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.ugraphic.UGraphic; public class TextBlockWithUrl implements TextBlock { private final TextBlock block; private final Url url; public static TextBlock withUrl(TextBlock block, Url url) { if (url == null) { return block; } return new TextBlockWithUrl(block, url); } private TextBlockWithUrl(TextBlock block, Url url) { this.block = block; this.url = url; } public void drawU(UGraphic ug) { ug.startUrl(url); block.drawU(ug); ug.closeAction(); } public Dimension2D calculateDimension(StringBounder stringBounder) { return block.calculateDimension(stringBounder); } public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { return block.getInnerPosition(member, stringBounder, strategy); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TextLink.java000066400000000000000000000031151312650303100254340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.Url; public class TextLink implements HtmlCommand { private final Url url; TextLink(Url url) { if (url == null) { throw new IllegalArgumentException(); } this.url = url; } public String getText() { return url.getLabel(); } public Url getUrl() { return url; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TileImage.java000066400000000000000000000041541312650303100255360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import java.awt.image.BufferedImage; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TileImage extends AbstractTextBlock implements TextBlock { private final BufferedImage image; private final int vspace; public TileImage(BufferedImage image, ImgValign valign, int vspace) { if (image == null) { throw new IllegalArgumentException(); } this.image = image; this.vspace = vspace; } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(image.getWidth(), image.getHeight() + 2 * vspace); } public void drawU(UGraphic ug) { ug.apply(new UTranslate(0, vspace)).draw(new UImage(image)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TileImageSvg.java000066400000000000000000000041501312650303100262120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import java.io.File; import java.io.IOException; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FileUtils; import net.sourceforge.plantuml.SvgString; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImageSvg; public class TileImageSvg extends AbstractTextBlock implements TextBlock { private final UImageSvg svg; public TileImageSvg(File svgFile) throws IOException { this.svg = createSvg(svgFile); } private UImageSvg createSvg(File svgFile) throws IOException { return new UImageSvg(new SvgString(FileUtils.readSvg(svgFile), 1)); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(svg.getWidth(), svg.getHeight()); } public void drawU(UGraphic ug) { ug.draw(svg); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/TileText.java000066400000000000000000000103761312650303100254430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import java.util.StringTokenizer; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UText; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TileText extends AbstractTextBlock implements TextBlock { private final String text; private final FontConfiguration fontConfiguration; private final Url url; public TileText(String text, FontConfiguration fontConfiguration, Url url) { this.fontConfiguration = fontConfiguration; this.text = text; this.url = url; } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D rect = stringBounder.calculateDimension(fontConfiguration.getFont(), text); final int spaceBottom = Math.abs(fontConfiguration.getSpace()); Log.debug("g2d=" + rect); Log.debug("Size for " + text + " is " + rect); double h = rect.getHeight(); if (h < 10) { h = 10; } final double width = text.indexOf('\t') == -1 ? rect.getWidth() : getWidth(stringBounder); return new Dimension2DDouble(width, h + spaceBottom); } public double getFontSize2D() { return fontConfiguration.getFont().getSize2D(); } double getTabSize(StringBounder stringBounder) { return stringBounder.calculateDimension(fontConfiguration.getFont(), " ").getWidth(); } public void drawU(UGraphic ug) { double x = 0; if (url != null) { ug.startUrl(url); } ug = ug.apply(new UChangeColor(fontConfiguration.getColor())); final StringTokenizer tokenizer = new StringTokenizer(text, "\t", true); if (tokenizer.hasMoreTokens()) { final double tabSize = getTabSize(ug.getStringBounder()); while (tokenizer.hasMoreTokens()) { final String s = tokenizer.nextToken(); if (s.equals("\t")) { final double remainder = x % tabSize; x += tabSize - remainder; } else { final UText utext = new UText(s, fontConfiguration); final Dimension2D dim = ug.getStringBounder().calculateDimension(fontConfiguration.getFont(), s); final int space = fontConfiguration.getSpace(); final double ypos; if (space < 0) { ypos = space /*- getFontSize2D() - space*/; } else { ypos = space; } ug.apply(new UTranslate(x, ypos)).draw(utext); x += dim.getWidth(); } } } if (url != null) { ug.closeAction(); } } double getWidth(StringBounder stringBounder) { final StringTokenizer tokenizer = new StringTokenizer(text, "\t", true); final double tabSize = getTabSize(stringBounder); double x = 0; while (tokenizer.hasMoreTokens()) { final String s = tokenizer.nextToken(); if (s.equals("\t")) { final double remainder = x % tabSize; x += tabSize - remainder; } else { final Dimension2D dim = stringBounder.calculateDimension(fontConfiguration.getFont(), s); x += dim.getWidth(); } } return x; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/UDrawable.java000066400000000000000000000026031312650303100255410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.ugraphic.UGraphic; public interface UDrawable { public void drawU(UGraphic ug); }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/UDrawableUtils.java000066400000000000000000000031561312650303100265660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class UDrawableUtils { public static UDrawable move(final UDrawable orig, final double dx, final double dy) { return new UDrawable() { public void drawU(UGraphic ug) { orig.drawU(ug.apply(new UTranslate(dx, dy))); } }; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/UGraphicDelegator.java000066400000000000000000000043321312650303100272250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public abstract class UGraphicDelegator implements UGraphic { final private UGraphic ug; public final boolean matchesProperty(String propertyName) { return ug.matchesProperty(propertyName); } public UGraphicDelegator(UGraphic ug) { this.ug = ug; } public StringBounder getStringBounder() { return ug.getStringBounder(); } public UParam getParam() { return ug.getParam(); } public void draw(UShape shape) { ug.draw(shape); } public ColorMapper getColorMapper() { return ug.getColorMapper(); } public void startUrl(Url url) { ug.startUrl(url); } public void closeAction() { ug.closeAction(); } protected UGraphic getUg() { return ug; } public void flushUg() { ug.flushUg(); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/UGraphicInterceptorUDrawable.java000066400000000000000000000035351312650303100314100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UShape; public class UGraphicInterceptorUDrawable extends UGraphicDelegator { public UGraphicInterceptorUDrawable(UGraphic ug) { super(ug); } public void draw(UShape shape) { if (shape instanceof UDrawable) { final UDrawable drawable = (UDrawable) shape; drawable.drawU(this); } else { getUg().draw(shape); } } public UGraphic apply(UChange change) { return new UGraphicInterceptorUDrawable(getUg().apply(change)); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbol.java000066400000000000000000000203231312650303100252640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import java.util.HashMap; import java.util.Map; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.creole.Stencil; public abstract class USymbol { private static final Map all = new HashMap(); public final static USymbol STORAGE = record("STORAGE", SkinParameter.STORAGE, new USymbolStorage()); public final static USymbol DATABASE = record("DATABASE", SkinParameter.DATABASE, new USymbolDatabase()); public final static USymbol CLOUD = record("CLOUD", SkinParameter.CLOUD, new USymbolCloud()); public final static USymbol CARD = record("CARD", SkinParameter.CARD, new USymbolCard(SkinParameter.CARD)); public final static USymbol FRAME = record("FRAME", SkinParameter.FRAME, new USymbolFrame()); public final static USymbol NODE = record("NODE", SkinParameter.NODE, new USymbolNode()); public final static USymbol ARTIFACT = record("ARTIFACT", SkinParameter.ARTIFACT, new USymbolArtifact()); public final static USymbol PACKAGE = record("PACKAGE", SkinParameter.PACKAGE, new USymbolFolder( SkinParameter.PACKAGE)); public final static USymbol FOLDER = record("FOLDER", SkinParameter.FOLDER, new USymbolFolder(SkinParameter.FOLDER)); public final static USymbol FILE = record("FILE", SkinParameter.FILE, new USymbolFile()); public final static USymbol RECTANGLE = record("RECTANGLE", SkinParameter.RECTANGLE, new USymbolRect( SkinParameter.RECTANGLE, HorizontalAlignment.CENTER)); public final static USymbol AGENT = record("AGENT", SkinParameter.AGENT, new USymbolRect(SkinParameter.AGENT, HorizontalAlignment.CENTER)); public final static USymbol ACTOR = record("ACTOR", SkinParameter.ACTOR, new USymbolActor()); public final static USymbol USECASE = null; public final static USymbol COMPONENT1 = record("COMPONENT1", SkinParameter.COMPONENT1, new USymbolComponent1()); public final static USymbol COMPONENT2 = record("COMPONENT2", SkinParameter.COMPONENT2, new USymbolComponent2()); public final static USymbol BOUNDARY = record("BOUNDARY", SkinParameter.BOUNDARY, new USymbolBoundary()); public final static USymbol ENTITY_DOMAIN = record("ENTITY_DOMAIN", SkinParameter.ENTITY_DOMAIN, new USymbolEntityDomain(2)); public final static USymbol CONTROL = record("CONTROL", SkinParameter.CONTROL, new USymbolControl(2)); public final static USymbol INTERFACE = record("INTERFACE", SkinParameter.INTERFACE, new USymbolInterface()); public final static USymbol QUEUE = record("QUEUE", SkinParameter.QUEUE, new USymbolQueue()); public final static USymbol STACK = record("STACK", SkinParameter.STACK, new USymbolStack()); public final static USymbol TOGETHER = record("TOGETHER", SkinParameter.QUEUE, new USymbolTogether()); abstract public SkinParameter getSkinParameter(); public USymbol withStereoAlignment(HorizontalAlignment alignment) { return this; } public FontParam getFontParam() { return getSkinParameter().getFontParam(); } public FontParam getFontParamStereotype() { return getSkinParameter().getFontParamStereotype(); } public ColorParam getColorParamBack() { return getSkinParameter().getColorParamBack(); } public ColorParam getColorParamBorder() { return getSkinParameter().getColorParamBorder(); } public static USymbol getFromString(String s) { if (s == null) { return null; } final USymbol result = all.get(StringUtils.goUpperCase(s.replaceAll("\\W", ""))); if (result == null) { if (s.equalsIgnoreCase("component")) { return COMPONENT2; } if (s.equalsIgnoreCase("entity")) { return ENTITY_DOMAIN; } return null; } return result; } private static USymbol record(String code, SkinParameter skinParameter, USymbol symbol) { all.put(StringUtils.goUpperCase(code), symbol); return symbol; } public abstract TextBlock asSmall(TextBlock name, TextBlock label, TextBlock stereotype, SymbolContext symbolContext); public abstract TextBlock asBig(TextBlock label, TextBlock stereotype, double width, double height, SymbolContext symbolContext); static class Margin { private final double x1; private final double x2; private final double y1; private final double y2; Margin(double x1, double x2, double y1, double y2) { this.x1 = x1; this.x2 = x2; this.y1 = y1; this.y2 = y2; } double getWidth() { return x1 + x2; } double getHeight() { return y1 + y2; } public Dimension2D addDimension(Dimension2D dim) { return new Dimension2DDouble(dim.getWidth() + x1 + x2, dim.getHeight() + y1 + y2); } public double getX1() { return x1; } public double getY1() { return y1; } } public boolean manageHorizontalLine() { return false; } public int suppHeightBecauseOfShape() { return 0; } public int suppWidthBecauseOfShape() { return 0; } final Stencil getRectangleStencil(final Dimension2D dim) { return new Stencil() { public double getStartingX(StringBounder stringBounder, double y) { return 0; } public double getEndingX(StringBounder stringBounder, double y) { return dim.getWidth(); } }; } public static USymbol getFromString(String symbol, boolean useUml2ForComponent) { USymbol usymbol = null; if (symbol.equalsIgnoreCase("artifact")) { usymbol = USymbol.ARTIFACT; } else if (symbol.equalsIgnoreCase("folder")) { usymbol = USymbol.FOLDER; } else if (symbol.equalsIgnoreCase("file")) { usymbol = USymbol.FILE; } else if (symbol.equalsIgnoreCase("package")) { usymbol = USymbol.PACKAGE; } else if (symbol.equalsIgnoreCase("rectangle")) { usymbol = USymbol.RECTANGLE; } else if (symbol.equalsIgnoreCase("node")) { usymbol = USymbol.NODE; } else if (symbol.equalsIgnoreCase("frame")) { usymbol = USymbol.FRAME; } else if (symbol.equalsIgnoreCase("cloud")) { usymbol = USymbol.CLOUD; } else if (symbol.equalsIgnoreCase("database")) { usymbol = USymbol.DATABASE; } else if (symbol.equalsIgnoreCase("queue")) { usymbol = USymbol.QUEUE; } else if (symbol.equalsIgnoreCase("stack")) { usymbol = USymbol.STACK; } else if (symbol.equalsIgnoreCase("storage")) { usymbol = USymbol.STORAGE; } else if (symbol.equalsIgnoreCase("agent")) { usymbol = USymbol.AGENT; } else if (symbol.equalsIgnoreCase("actor")) { usymbol = USymbol.ACTOR; } else if (symbol.equalsIgnoreCase("component")) { usymbol = useUml2ForComponent ? USymbol.COMPONENT2 : USymbol.COMPONENT1; } else if (symbol.equalsIgnoreCase("boundary")) { usymbol = USymbol.BOUNDARY; } else if (symbol.equalsIgnoreCase("control")) { usymbol = USymbol.CONTROL; } else if (symbol.equalsIgnoreCase("entity")) { usymbol = USymbol.ENTITY_DOMAIN; } else if (symbol.equalsIgnoreCase("card")) { usymbol = USymbol.CARD; } else if (symbol.equalsIgnoreCase("interface")) { usymbol = USymbol.INTERFACE; } else if (symbol.equalsIgnoreCase("()")) { usymbol = USymbol.INTERFACE; } return usymbol; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolActor.java000066400000000000000000000033601312650303100262570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.skin.StickMan; import net.sourceforge.plantuml.ugraphic.UStroke; class USymbolActor extends USymbolSimpleAbstract { @Override public SkinParameter getSkinParameter() { return SkinParameter.ACTOR; } @Override protected TextBlock getDrawing(SymbolContext symbolContext) { final double deltaShadow = symbolContext.isShadowing() ? 4.0 : 0.0; return new StickMan(symbolContext.withDeltaShadow(deltaShadow).withStroke(new UStroke(2))); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolArtifact.java000066400000000000000000000116741312650303100267530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class USymbolArtifact extends USymbol { @Override public SkinParameter getSkinParameter() { return SkinParameter.ARTIFACT; } private void drawArtifact(UGraphic ug, double widthTotal, double heightTotal, boolean shadowing) { final URectangle form = new URectangle(widthTotal, heightTotal); if (shadowing) { form.setDeltaShadow(4); } ug.draw(form); final UPolygon polygon = new UPolygon(); polygon.addPoint(0, 0); final double heightSymbol = 14; polygon.addPoint(0, heightSymbol); final double widthSymbol = 12; polygon.addPoint(widthSymbol, heightSymbol); final int cornersize = 6; polygon.addPoint(widthSymbol, cornersize); polygon.addPoint(widthSymbol - cornersize, 0); polygon.addPoint(0, 0); // if (shadowing) { // polygon.setDeltaShadow(3.0); // } final double xSymbol = widthTotal - widthSymbol - 5; final double ySymbol = 5; ug.apply(new UTranslate(xSymbol, ySymbol)).draw(polygon); ug.apply(new UTranslate(xSymbol + widthSymbol - cornersize, ySymbol)).draw(new ULine(0, cornersize)); ug.apply(new UTranslate(xSymbol + widthSymbol, ySymbol + cornersize)).draw(new ULine(-cornersize, 0)); } private Margin getMargin() { return new Margin(10, 10 + 10, 10 + 3, 10); } public boolean manageHorizontalLine() { return true; } public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = UGraphicStencil.create(ug, getRectangleStencil(dim), new UStroke()); ug = symbolContext.apply(ug); drawArtifact(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER); tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); return getMargin().addDimension(Dimension2DDouble.mergeTB(dimStereo, dimLabel)); } }; } public TextBlock asBig(final TextBlock title, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = symbolContext.apply(ug); drawArtifact(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); final Dimension2D dimStereo = stereotype.calculateDimension(ug.getStringBounder()); final double posStereo = (width - dimStereo.getWidth()) / 2; stereotype.drawU(ug.apply(new UTranslate(posStereo, 2))); final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); final double posTitle = (width - dimTitle.getWidth()) / 2; title.drawU(ug.apply(new UTranslate(posTitle, 2 + dimStereo.getHeight()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } }; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolBoundary.java000066400000000000000000000033261312650303100267740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.svek.Boundary; import net.sourceforge.plantuml.ugraphic.UStroke; class USymbolBoundary extends USymbolSimpleAbstract { @Override public SkinParameter getSkinParameter() { return SkinParameter.BOUNDARY; } @Override protected TextBlock getDrawing(final SymbolContext symbolContext) { return new Boundary(symbolContext.withDeltaShadow(symbolContext.isShadowing() ? 4.0 : 0.0).withStroke( new UStroke(2))); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolCard.java000066400000000000000000000101621312650303100260560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UTranslate; class USymbolCard extends USymbol { private final SkinParameter skinParameter; public USymbolCard(SkinParameter skinParameter) { this.skinParameter = skinParameter; } @Override public SkinParameter getSkinParameter() { return skinParameter; } private void drawRect(UGraphic ug, double width, double height, boolean shadowing, double top) { final URectangle shape = new URectangle(width, height); if (shadowing) { shape.setDeltaShadow(3.0); } ug.draw(shape); if (top != 0) { ug.apply(new UTranslate(0, top)).draw(new ULine(width, 0)); } } private Margin getMargin() { return new Margin(10, 10, 3, 3); } public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = symbolContext.apply(ug); drawRect(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing(), 0); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER); tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); return getMargin().addDimension(Dimension2DDouble.mergeTB(dimStereo, dimLabel)); } }; } public TextBlock asBig(final TextBlock title, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = symbolContext.apply(ug); final Dimension2D dimStereo = stereotype.calculateDimension(ug.getStringBounder()); final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); drawRect(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing(), dimTitle.getHeight() + dimStereo.getHeight() + 4); final double posStereo = (width - dimStereo.getWidth()) / 2; stereotype.drawU(ug.apply(new UTranslate(posStereo, 2))); final double posTitle = (width - dimTitle.getWidth()) / 2; title.drawU(ug.apply(new UTranslate(posTitle, 2 + dimStereo.getHeight()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } }; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolCloud.java000066400000000000000000000117221312650303100262560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class USymbolCloud extends USymbol { @Override public SkinParameter getSkinParameter() { return SkinParameter.CLOUD; } private void drawCloud(UGraphic ug, double width, double height, boolean shadowing) { final UPath shape = getSpecificFrontierForCloud(width, height); if (shadowing) { shape.setDeltaShadow(3.0); } ug.apply(new UTranslate(3, -3)).draw(shape); } private UPath getSpecificFrontierForCloud(double width, double height) { final UPath path = new UPath(); path.moveTo(0, 10); double x = 0; for (int i = 0; i < width - 9; i += 10) { path.cubicTo(i, -3 + 10, 2 + i, -5 + 10, 5 + i, -5 + 10); path.cubicTo(8 + i, -5 + 10, 10 + i, -3 + 10, 10 + i, 10); x = i + 10; } double y = 0; for (int j = 10; j < height - 9; j += 10) { path.cubicTo(x + 3, j, x + 5, 2 + j, x + 5, 5 + j); path.cubicTo(x + 5, 8 + j, x + 3, 10 + j, x, 10 + j); y = j + 10; } for (int i = 0; i < width - 9; i += 10) { path.cubicTo(x - i, y + 3, x - 3 - i, y + 5, x - 5 - i, y + 5); path.cubicTo(x - 8 - i, y + 5, x - 10 - i, y + 3, x - 10 - i, y); } for (int j = 0; j < height - 9 - 10; j += 10) { path.cubicTo(-3, y - j, -5, y - 2 - j, -5, y - 5 - j); path.cubicTo(-5, y - 8 - j, -3, y - 10 - j, 0, y - 10 - j); } return path; } private Margin getMargin() { return new Margin(10, 10, 10, 10); } public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = UGraphicStencil.create(ug, getRectangleStencil(dim), new UStroke()); ug = symbolContext.apply(ug); drawCloud(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER); tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); return getMargin().addDimension(Dimension2DDouble.mergeTB(dimStereo, dimLabel)); } }; } public TextBlock asBig(final TextBlock title, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = symbolContext.apply(ug); drawCloud(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); final Dimension2D dimStereo = stereotype.calculateDimension(ug.getStringBounder()); final double posStereo = (width - dimStereo.getWidth()) / 2; stereotype.drawU(ug.apply(new UTranslate(posStereo, 13))); final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); final double posTitle = (width - dimTitle.getWidth()) / 2; title.drawU(ug.apply(new UTranslate(posTitle, 13 + dimStereo.getHeight()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } }; } @Override public boolean manageHorizontalLine() { return true; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolComponent1.java000066400000000000000000000071351312650303100272360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class USymbolComponent1 extends USymbol { @Override public SkinParameter getSkinParameter() { return SkinParameter.COMPONENT1; } private void drawNode(UGraphic ug, double widthTotal, double heightTotal, boolean shadowing) { final URectangle form = new URectangle(widthTotal, heightTotal); if (shadowing) { form.setDeltaShadow(4); } ug.draw(form); final UShape small = new URectangle(10, 5); // UML 1 Component Notation ug.apply(new UTranslate(-5, 5)).draw(small); ug.apply(new UTranslate(-5, heightTotal - 10)).draw(small); } private Margin getMargin() { return new Margin(10, 10, 10, 10); } public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimTotal = calculateDimension(stringBounder); ug = UGraphicStencil.create(ug, getRectangleStencil(dimTotal), new UStroke()); ug = symbolContext.apply(ug); drawNode(ug, dimTotal.getWidth(), dimTotal.getHeight(), symbolContext.isShadowing()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER); tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); return getMargin().addDimension(Dimension2DDouble.mergeTB(dimStereo, dimLabel)); } }; } public TextBlock asBig(final TextBlock title, TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { throw new UnsupportedOperationException(); } @Override public boolean manageHorizontalLine() { return true; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolComponent2.java000066400000000000000000000110021312650303100272230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class USymbolComponent2 extends USymbol { @Override public SkinParameter getSkinParameter() { return SkinParameter.COMPONENT2; } private void drawNode(UGraphic ug, double widthTotal, double heightTotal, boolean shadowing) { final URectangle form = new URectangle(widthTotal, heightTotal); if (shadowing) { form.setDeltaShadow(4); } final UShape small = new URectangle(15, 10); final UShape tiny = new URectangle(4, 2); ug.draw(form); // UML 2 Component Notation ug.apply(new UTranslate(widthTotal - 20, 5)).draw(small); ug.apply(new UTranslate(widthTotal - 22, 7)).draw(tiny); ug.apply(new UTranslate(widthTotal - 22, 11)).draw(tiny); } private Margin getMargin() { return new Margin(10 + 5, 20 + 5, 15 + 5, 5 + 5); } public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = UGraphicStencil.create(ug, getRectangleStencil(dim), new UStroke()); ug = symbolContext.apply(ug); drawNode(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER); tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1()))); // label.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); return getMargin().addDimension(Dimension2DDouble.mergeTB(dimStereo, dimLabel)); } }; } public TextBlock asBig(final TextBlock title, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = symbolContext.apply(ug); drawNode(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); final Dimension2D dimStereo = stereotype.calculateDimension(ug.getStringBounder()); final double posStereo = (width - dimStereo.getWidth()) / 2; stereotype.drawU(ug.apply(new UTranslate(posStereo, 13))); final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); final double posTitle = (width - dimTitle.getWidth()) / 2; title.drawU(ug.apply(new UTranslate(posTitle, 13 + dimStereo.getHeight()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } }; } @Override public boolean manageHorizontalLine() { return true; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolControl.java000066400000000000000000000035131312650303100266270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.svek.Control; import net.sourceforge.plantuml.ugraphic.UStroke; class USymbolControl extends USymbolSimpleAbstract { private final double thickness; public USymbolControl(double thickness) { this.thickness = thickness; } @Override public SkinParameter getSkinParameter() { return SkinParameter.CONTROL; } @Override protected TextBlock getDrawing(final SymbolContext symbolContext) { return new Control(symbolContext.withDeltaShadow(symbolContext.isShadowing() ? 4.0 : 0.0).withStroke( new UStroke(thickness))); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolDatabase.java000066400000000000000000000131401312650303100267100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.AbstractUGraphicHorizontalLine; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UHorizontalLine; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UTranslate; class USymbolDatabase extends USymbol { @Override public SkinParameter getSkinParameter() { return SkinParameter.DATABASE; } private void drawDatabase(UGraphic ug, double width, double height, boolean shadowing) { final UPath shape = new UPath(); if (shadowing) { shape.setDeltaShadow(3.0); } shape.moveTo(0, 10); shape.cubicTo(0, 0, width / 2, 0, width / 2, 0); shape.cubicTo(width / 2, 0, width, 0, width, 10); shape.lineTo(width, height - 10); shape.cubicTo(width, height, width / 2, height, width / 2, height); shape.cubicTo(width / 2, height, 0, height, 0, height - 10); shape.lineTo(0, 10); ug.draw(shape); final UPath closing = getClosingPath(width); ug.apply(new UChangeBackColor(null)).draw(closing); } private UPath getClosingPath(double width) { final UPath closing = new UPath(); closing.moveTo(0, 10); closing.cubicTo(0, 20, width / 2, 20, width / 2, 20); closing.cubicTo(width / 2, 20, width, 20, width, 10); return closing; } class MyUGraphicDatabase extends AbstractUGraphicHorizontalLine { private final double endingX; @Override protected AbstractUGraphicHorizontalLine copy(UGraphic ug) { return new MyUGraphicDatabase(ug, endingX); } public MyUGraphicDatabase(UGraphic ug, double endingX) { super(ug); this.endingX = endingX; } @Override protected void drawHline(UGraphic ug, UHorizontalLine line, UTranslate translate) { final UPath closing = getClosingPath(endingX); ug = ug.apply(translate); ug.apply(line.getStroke()).apply(new UChangeBackColor(null)).apply(new UTranslate(0, -15)).draw(closing); if (line.isDouble()) { ug.apply(line.getStroke()).apply(new UChangeBackColor(null)).apply(new UTranslate(0, -15 + 2)) .draw(closing); } line.drawTitleInternal(ug, 0, endingX, 0, true); } } private Margin getMargin() { return new Margin(10, 10, 24, 5); } public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = symbolContext.apply(ug); drawDatabase(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER); final UGraphic ug2 = new MyUGraphicDatabase(ug, dim.getWidth()); tb.drawU(ug2.apply(new UTranslate(margin.getX1(), margin.getY1()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); return getMargin().addDimension(Dimension2DDouble.mergeTB(dimStereo, dimLabel)); } }; } public TextBlock asBig(final TextBlock title, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = symbolContext.apply(ug); drawDatabase(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); final Dimension2D dimStereo = stereotype.calculateDimension(ug.getStringBounder()); final double posStereo = (width - dimStereo.getWidth()) / 2; stereotype.drawU(ug.apply(new UTranslate(posStereo, 0))); final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); final double posTitle = (width - dimTitle.getWidth()) / 2; title.drawU(ug.apply(new UTranslate(posTitle, 21))); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } }; } public boolean manageHorizontalLine() { return true; } @Override public int suppHeightBecauseOfShape() { return 15; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolEntityDomain.java000066400000000000000000000035441312650303100276170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.svek.EntityDomain; import net.sourceforge.plantuml.ugraphic.UStroke; class USymbolEntityDomain extends USymbolSimpleAbstract { private final double thickness; public USymbolEntityDomain(double thickness) { this.thickness = thickness; } @Override public SkinParameter getSkinParameter() { return SkinParameter.ENTITY_DOMAIN; } @Override protected TextBlock getDrawing(final SymbolContext symbolContext) { return new EntityDomain(symbolContext.withDeltaShadow(symbolContext.isShadowing() ? 4.0 : 0.0).withStroke( new UStroke(thickness))); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolFile.java000066400000000000000000000115021312650303100260630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class USymbolFile extends USymbol { private final HorizontalAlignment stereotypeAlignement = HorizontalAlignment.CENTER; @Override public SkinParameter getSkinParameter() { return SkinParameter.FILE; } private void drawFile(UGraphic ug, double width, double height, boolean shadowing) { final UPolygon polygon = new UPolygon(); final int cornersize = 10; polygon.addPoint(0, 0); polygon.addPoint(0, height); polygon.addPoint(width, height); polygon.addPoint(width, cornersize); polygon.addPoint(width - cornersize, 0); polygon.addPoint(0, 0); if (shadowing) { polygon.setDeltaShadow(3.0); } ug.draw(polygon); final UPath path = new UPath(); path.moveTo(width - cornersize, 0); path.lineTo(width - cornersize, cornersize); path.lineTo(width, cornersize); ug.draw(path); } private Margin getMargin() { return new Margin(10, 10, 10, 10); } public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = UGraphicStencil.create(ug, getRectangleStencil(dim), new UStroke()); ug = symbolContext.apply(ug); drawFile(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER); tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); return getMargin().addDimension(Dimension2DDouble.mergeTB(dimStereo, dimLabel)); } }; } public TextBlock asBig(final TextBlock title, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = symbolContext.apply(ug); drawFile(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); final Dimension2D dimStereo = stereotype.calculateDimension(ug.getStringBounder()); final double posStereoX; final double posStereoY; if (stereotypeAlignement == HorizontalAlignment.RIGHT) { posStereoX = width - dimStereo.getWidth() - getMargin().getX1() / 2; posStereoY = getMargin().getY1() / 2; } else { posStereoX = (width - dimStereo.getWidth()) / 2; posStereoY = 2; } stereotype.drawU(ug.apply(new UTranslate(posStereoX, posStereoY))); final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); final double posTitle = (width - dimTitle.getWidth()) / 2; title.drawU(ug.apply(new UTranslate(posTitle, 2 + dimStereo.getHeight()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } }; } @Override public boolean manageHorizontalLine() { return true; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolFolder.java000066400000000000000000000130371312650303100264240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class USymbolFolder extends USymbol { private final static int marginTitleX1 = 3; private final static int marginTitleX2 = 3; private final static int marginTitleX3 = 7; private final static int marginTitleY0 = 0; private final static int marginTitleY1 = 3; private final static int marginTitleY2 = 3; private final SkinParameter skinParameter; public USymbolFolder(SkinParameter skinParameter) { this.skinParameter = skinParameter; } @Override public SkinParameter getSkinParameter() { return skinParameter; } private void drawFolder(UGraphic ug, double width, double height, Dimension2D dimTitle, boolean shadowing) { final double wtitle; if (dimTitle.getWidth() == 0) { wtitle = Math.max(30, width / 4); } else { wtitle = dimTitle.getWidth() + marginTitleX1 + marginTitleX2; } final double htitle = getHTitle(dimTitle); final UPolygon shape = new UPolygon(); shape.addPoint(0, 0); shape.addPoint(wtitle, 0); shape.addPoint(wtitle + marginTitleX3, htitle); shape.addPoint(width, htitle); shape.addPoint(width, height); shape.addPoint(0, height); shape.addPoint(0, 0); if (shadowing) { shape.setDeltaShadow(3.0); } ug.draw(shape); ug.apply(new UTranslate(0, htitle)).draw(new ULine(wtitle + marginTitleX3, 0)); } private double getHTitle(Dimension2D dimTitle) { final double htitle; if (dimTitle.getWidth() == 0) { htitle = 10; } else { htitle = dimTitle.getHeight() + marginTitleY1 + marginTitleY2; } return htitle; } private Margin getMargin() { return new Margin(10, 10 + 10, 10 + 3, 10); } public TextBlock asSmall(final TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { if (name == null) { throw new IllegalArgumentException(); } return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = UGraphicStencil.create(ug, getRectangleStencil(dim), new UStroke()); ug = symbolContext.apply(ug); final Dimension2D dimName = name.calculateDimension(ug.getStringBounder()); drawFolder(ug, dim.getWidth(), dim.getHeight(), dimName, symbolContext.isShadowing()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER); name.drawU(ug.apply(new UTranslate(4, 3))); tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1() + dimName.getHeight()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimName = name.calculateDimension(stringBounder); final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); return getMargin().addDimension(Dimension2DDouble.mergeTB(dimName, dimStereo, dimLabel)); } }; } public TextBlock asBig(final TextBlock title, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dim = calculateDimension(stringBounder); ug = symbolContext.apply(ug); final Dimension2D dimTitle = title.calculateDimension(stringBounder); drawFolder(ug, dim.getWidth(), dim.getHeight(), dimTitle, symbolContext.isShadowing()); title.drawU(ug.apply(new UTranslate(4, 2))); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); final double posStereo = (width - dimStereo.getWidth()) / 2; stereotype.drawU(ug.apply(new UTranslate(4 + posStereo, 2 + getHTitle(dimTitle)))); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } }; } @Override public boolean manageHorizontalLine() { return true; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolFrame.java000066400000000000000000000115301312650303100262370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class USymbolFrame extends USymbol { @Override public SkinParameter getSkinParameter() { return SkinParameter.FRAME; } private void drawFrame(UGraphic ug, double width, double height, Dimension2D dimTitle, boolean shadowing) { final URectangle shape = new URectangle(width, height); if (shadowing) { shape.setDeltaShadow(3.0); } ug.draw(shape); final double textWidth; final int cornersize; if (dimTitle.getWidth() == 0) { textWidth = width / 3; cornersize = 7; } else { textWidth = dimTitle.getWidth() + 10; cornersize = 10; } final double textHeight = getYpos(dimTitle); final UPath polygon = new UPath(); polygon.moveTo(textWidth, 1); polygon.lineTo(textWidth, textHeight - cornersize); polygon.lineTo(textWidth - cornersize, textHeight); polygon.lineTo(0, textHeight); ug.apply(new UChangeBackColor(null)).draw(polygon); } private double getYpos(Dimension2D dimTitle) { if (dimTitle.getWidth() == 0) { return 12; } return dimTitle.getHeight() + 3; } private Margin getMargin() { return new Margin(10 + 5, 20 + 5, 15 + 5, 5 + 5); } public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = UGraphicStencil.create(ug, getRectangleStencil(dim), new UStroke()); ug = symbolContext.apply(ug); drawFrame(ug, dim.getWidth(), dim.getHeight(), new Dimension2DDouble(0, 0), symbolContext.isShadowing()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER); tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); return getMargin().addDimension(Dimension2DDouble.mergeTB(dimStereo, dimLabel)); } }; } public TextBlock asBig(final TextBlock title, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dim = calculateDimension(stringBounder); ug = symbolContext.apply(ug); final Dimension2D dimTitle = title.calculateDimension(stringBounder); drawFrame(ug, dim.getWidth(), dim.getHeight(), dimTitle, symbolContext.isShadowing()); title.drawU(ug.apply(new UTranslate(3, 1))); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); final double posStereo = (width - dimStereo.getWidth()) / 2; stereotype.drawU(ug.apply(new UTranslate(4 + posStereo, 2 + getYpos(dimTitle)))); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } }; } @Override public boolean manageHorizontalLine() { return true; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolInterface.java000066400000000000000000000032711312650303100271100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import net.sourceforge.plantuml.svek.CircleInterface2; public class USymbolInterface extends USymbolSimpleAbstract { @Override public SkinParameter getSkinParameter() { return SkinParameter.INTERFACE; } @Override protected TextBlock getDrawing(SymbolContext symbolContext) { return new CircleInterface2(symbolContext.getBackColor(), symbolContext.getForeColor(), symbolContext.isShadowing() ? 4.0 : 0.0); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolNode.java000066400000000000000000000131371312650303100260770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.AbstractUGraphicHorizontalLine; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UHorizontalLine; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UTranslate; class USymbolNode extends USymbol { @Override public SkinParameter getSkinParameter() { return SkinParameter.NODE; } private void drawNode(UGraphic ug, double width, double height, boolean shadowing) { final UPolygon shape = new UPolygon(); shape.addPoint(0, 10); shape.addPoint(10, 0); shape.addPoint(width, 0); shape.addPoint(width, height - 10); shape.addPoint(width - 10, height); shape.addPoint(0, height); shape.addPoint(0, 10); if (shadowing) { shape.setDeltaShadow(2); } ug.draw(shape); ug.apply(new UTranslate(width - 10, 10)).draw(new ULine(9, -9)); ug.apply(new UTranslate(0, 10)).draw(new ULine(width - 10, 0)); ug.apply(new UTranslate(width - 10, 10)).draw(new ULine(0, height - 10)); } class MyUGraphicNode extends AbstractUGraphicHorizontalLine { private final double endingX; @Override protected AbstractUGraphicHorizontalLine copy(UGraphic ug) { return new MyUGraphicNode(ug, endingX); } public MyUGraphicNode(UGraphic ug, double endingX) { super(ug); this.endingX = endingX; } @Override protected void drawHline(UGraphic ug, UHorizontalLine line, UTranslate translate) { ug = ug.apply(translate); drawHlineInternal(ug, line); if (line.isDouble()) { drawHlineInternal(ug.apply(new UTranslate(0, 2)), line); } line.drawTitleInternal(ug, 0, endingX - 10, 0, true); } private void drawHlineInternal(UGraphic ug, UHorizontalLine line) { ug = ug.apply(line.getStroke()).apply(new UChangeBackColor(null)); ug.draw(new ULine(endingX - 10, 0)); ug.apply(new UTranslate(endingX - 10, 0)).draw(new ULine(10, -10)); } } private Margin getMargin() { return new Margin(10 + 5, 20 + 5, 15 + 5, 5 + 5); } public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = symbolContext.apply(ug); drawNode(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER); final UGraphic ug2 = new MyUGraphicNode(ug, dim.getWidth()); tb.drawU(ug2.apply(new UTranslate(margin.getX1(), margin.getY1()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); return getMargin().addDimension(Dimension2DDouble.mergeTB(dimStereo, dimLabel)); } }; } public TextBlock asBig(final TextBlock title, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = symbolContext.apply(ug); drawNode(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); ug = ug.apply(new UTranslate(-4, 11)); final Dimension2D dimStereo = stereotype.calculateDimension(ug.getStringBounder()); final double posStereo = (width - dimStereo.getWidth()) / 2; stereotype.drawU(ug.apply(new UTranslate(posStereo, 2))); final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); final double posTitle = (width - dimTitle.getWidth()) / 2; title.drawU(ug.apply(new UTranslate(posTitle, 2 + dimStereo.getHeight()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } }; } public boolean manageHorizontalLine() { return true; } @Override public int suppHeightBecauseOfShape() { return 5; } @Override public int suppWidthBecauseOfShape() { return 60; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolQueue.java000066400000000000000000000140221312650303100262700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.ugraphic.AbstractUGraphicHorizontalLine; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UHorizontalLine; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UTranslate; class USymbolQueue extends USymbol { @Override public SkinParameter getSkinParameter() { return SkinParameter.QUEUE; } private final double dx = 5; private void drawQueue(UGraphic ug, double width, double height, boolean shadowing) { final UPath shape = new UPath(); if (shadowing) { shape.setDeltaShadow(3.0); } shape.moveTo(dx, 0); shape.lineTo(width - dx, 0); shape.cubicTo(width, 0, width, height / 2, width, height / 2); shape.cubicTo(width, height / 2, width, height, width - dx, height); shape.lineTo(dx, height); shape.cubicTo(0, height, 0, height / 2, 0, height / 2); shape.cubicTo(0, height / 2, 0, 0, dx, 0); ug.draw(shape); final UPath closing = getClosingPath(width, height); ug.apply(new UChangeBackColor(null)).draw(closing); } private UPath getClosingPath(double width, double height) { final UPath closing = new UPath(); closing.moveTo(width - dx, 0); closing.cubicTo(width - dx * 2, 0, width - dx * 2, height / 2, width - dx * 2, height / 2); closing.cubicTo(width - dx * 2, height, width - dx, height, width - dx, height); return closing; } class MyUGraphicQueue extends AbstractUGraphicHorizontalLine implements Stencil { private final double x1; private final double x2; private final double fullHeight; @Override protected AbstractUGraphicHorizontalLine copy(UGraphic ug) { return new MyUGraphicQueue(ug, x1, x2, fullHeight); } public MyUGraphicQueue(UGraphic ug, double x1, double x2, double fullHeight) { super(ug); this.x1 = x1; this.x2 = x2; this.fullHeight = fullHeight; } @Override protected void drawHline(UGraphic ug, UHorizontalLine line, UTranslate translate) { line.drawLineInternal(ug, this, translate.getDy(), line.getStroke()); } public double getStartingX(StringBounder stringBounder, double y) { return 0; } public double getEndingX(StringBounder stringBounder, double y) { final double factor2; final double halfHeight = fullHeight / 2; if (y <= halfHeight) { factor2 = 1 - (y / halfHeight); } else { factor2 = (y - halfHeight) / halfHeight; } return (x2 - x1) * factor2 + x1; } } private Margin getMargin() { return new Margin(5, 15, 5, 5); } public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = symbolContext.apply(ug); drawQueue(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER); final UGraphic ug2 = new MyUGraphicQueue(ug, dim.getWidth() - 2 * dx, dim.getWidth() - dx, dim.getHeight()); tb.drawU(ug2.apply(new UTranslate(margin.getX1(), margin.getY1()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); return getMargin().addDimension(Dimension2DDouble.mergeTB(dimStereo, dimLabel)); } }; } public TextBlock asBig(final TextBlock title, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { throw new UnsupportedOperationException(); // return new TextBlock() { // // public void drawU(UGraphic ug) { // final Dimension2D dim = calculateDimension(ug.getStringBounder()); // ug = symbolContext.apply(ug); // drawDatabase(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); // final Dimension2D dimStereo = stereotype.calculateDimension(ug.getStringBounder()); // final double posStereo = (width - dimStereo.getWidth()) / 2; // stereotype.drawU(ug.apply(new UTranslate(posStereo, 0))); // // final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); // final double posTitle = (width - dimTitle.getWidth()) / 2; // title.drawU(ug.apply(new UTranslate(posTitle, 21))); // } // // public Dimension2D calculateDimension(StringBounder stringBounder) { // return new Dimension2DDouble(width, height); // } // }; } public boolean manageHorizontalLine() { return true; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolRect.java000066400000000000000000000115161312650303100261060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class USymbolRect extends USymbol { private final SkinParameter skinParameter; private final HorizontalAlignment stereotypeAlignement; public USymbolRect(SkinParameter skinParameter, HorizontalAlignment stereotypeAlignement) { this.skinParameter = skinParameter; this.stereotypeAlignement = stereotypeAlignement; } @Override public USymbol withStereoAlignment(HorizontalAlignment alignment) { return new USymbolRect(skinParameter, alignment); } @Override public SkinParameter getSkinParameter() { return skinParameter; } private void drawRect(UGraphic ug, double width, double height, boolean shadowing, double roundCorner) { final URectangle shape = new URectangle(width, height, roundCorner, roundCorner); if (shadowing) { shape.setDeltaShadow(3.0); } ug.draw(shape); } private Margin getMargin() { return new Margin(10, 10, 10, 10); } public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = UGraphicStencil.create(ug, getRectangleStencil(dim), new UStroke()); ug = symbolContext.apply(ug); drawRect(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing(), symbolContext.getRoundCorner()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, stereotypeAlignement); tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); return getMargin().addDimension(Dimension2DDouble.mergeTB(dimStereo, dimLabel)); } }; } public TextBlock asBig(final TextBlock title, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = symbolContext.apply(ug); drawRect(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing(), symbolContext.getRoundCorner()); final Dimension2D dimStereo = stereotype.calculateDimension(ug.getStringBounder()); final double posStereoX; final double posStereoY; if (stereotypeAlignement == HorizontalAlignment.RIGHT) { posStereoX = width - dimStereo.getWidth() - getMargin().getX1() / 2; posStereoY = getMargin().getY1() / 2; } else { posStereoX = (width - dimStereo.getWidth()) / 2; posStereoY = 2; } stereotype.drawU(ug.apply(new UTranslate(posStereoX, posStereoY))); final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); final double posTitle = (width - dimTitle.getWidth()) / 2; title.drawU(ug.apply(new UTranslate(posTitle, 2 + dimStereo.getHeight()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } }; } @Override public boolean manageHorizontalLine() { return true; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolSimpleAbstract.java000066400000000000000000000066461312650303100301360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; abstract class USymbolSimpleAbstract extends USymbol { public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { if (stereotype == null) { throw new IllegalArgumentException(); } final TextBlock stickman = getDrawing(symbolContext); return new AbstractTextBlock() { public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimName = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); final Dimension2D dimStickMan = stickman.calculateDimension(stringBounder); final Dimension2D dimTotal = calculateDimension(stringBounder); final double stickmanX = (dimTotal.getWidth() - dimStickMan.getWidth()) / 2; final double stickmanY = dimStereo.getHeight(); ug = symbolContext.apply(ug); stickman.drawU(ug.apply(new UTranslate(stickmanX, stickmanY))); final double labelX = (dimTotal.getWidth() - dimName.getWidth()) / 2; final double labelY = dimStickMan.getHeight() + dimStereo.getHeight(); label.drawU(ug.apply(new UTranslate(labelX, labelY))); final double stereoX = (dimTotal.getWidth() - dimStereo.getWidth()) / 2; stereotype.drawU(ug.apply(new UTranslate(stereoX, 0))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimName = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); final Dimension2D dimActor = stickman.calculateDimension(stringBounder); return Dimension2DDouble.mergeLayoutT12B3(dimStereo, dimActor, dimName); } }; } abstract protected TextBlock getDrawing(final SymbolContext symbolContext); public TextBlock asBig(final TextBlock title, TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { throw new UnsupportedOperationException(); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolStack.java000066400000000000000000000075631312650303100262650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class USymbolStack extends USymbol { @Override public SkinParameter getSkinParameter() { return SkinParameter.STACK; } private void drawQueue(UGraphic ug, double width, double height, boolean shadowing, double roundCorner) { final double border = 15; final URectangle rect = new URectangle(width - 2 * border, height, roundCorner, roundCorner); if (shadowing) { rect.setDeltaShadow(3.0); } ug.apply(new UChangeColor(null)).apply(new UTranslate(border, 0)).draw(rect); final UPath path = new UPath(); path.moveTo(0, 0); path.lineTo(border, 0); path.lineTo(border, height); path.lineTo(width - border, height); path.lineTo(width - border, 0); path.lineTo(width, 0); ug.apply(new UChangeBackColor(null)).draw(path); } private Margin getMargin() { return new Margin(25, 25, 10, 10); } public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = UGraphicStencil.create(ug, getRectangleStencil(dim), new UStroke()); ug = symbolContext.apply(ug); drawQueue(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing(), symbolContext.getRoundCorner()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER); tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); return getMargin().addDimension(Dimension2DDouble.mergeTB(dimStereo, dimLabel)); } }; } public TextBlock asBig(final TextBlock title, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { throw new UnsupportedOperationException(); } @Override public boolean manageHorizontalLine() { return true; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolStorage.java000066400000000000000000000100731312650303100266120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class USymbolStorage extends USymbol { @Override public SkinParameter getSkinParameter() { return SkinParameter.STORAGE; } private void drawStorage(UGraphic ug, double width, double height, boolean shadowing) { final URectangle shape = new URectangle(width, height, 70, 70); if (shadowing) { shape.setDeltaShadow(3.0); } ug.draw(shape); } private Margin getMargin() { return new Margin(10, 10, 10, 10); } public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = UGraphicStencil.create(ug, getRectangleStencil(dim), new UStroke()); ug = symbolContext.apply(ug); drawStorage(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); final Margin margin = getMargin(); final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER); tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimLabel = label.calculateDimension(stringBounder); final Dimension2D dimStereo = stereotype.calculateDimension(stringBounder); return getMargin().addDimension(Dimension2DDouble.mergeTB(dimStereo, dimLabel)); } }; } public TextBlock asBig(final TextBlock title, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug = symbolContext.apply(ug); drawStorage(ug, dim.getWidth(), dim.getHeight(), symbolContext.isShadowing()); final Dimension2D dimStereo = stereotype.calculateDimension(ug.getStringBounder()); final double posStereo = (width - dimStereo.getWidth()) / 2; stereotype.drawU(ug.apply(new UTranslate(posStereo, 5))); final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); final double posTitle = (width - dimTitle.getWidth()) / 2; title.drawU(ug.apply(new UTranslate(posTitle, 7 + dimStereo.getHeight()))); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } }; } @Override public boolean manageHorizontalLine() { return true; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/USymbolTogether.java000066400000000000000000000040751312650303100267740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ugraphic.UGraphic; class USymbolTogether extends USymbol { @Override public SkinParameter getSkinParameter() { return SkinParameter.STORAGE; } public TextBlock asSmall(TextBlock name, final TextBlock label, final TextBlock stereotype, final SymbolContext symbolContext) { return TextBlockUtils.empty(10, 10); } public TextBlock asBig(final TextBlock title, final TextBlock stereotype, final double width, final double height, final SymbolContext symbolContext) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(width, height); } }; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/UnusedSpace.java000066400000000000000000000105301312650303100261100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.ugraphic.UFont; public class UnusedSpace { static class Point { final private double x; final private double y; Point(double x, double y) { this.x = x; this.y = y; } public double getDistSq(Point other) { final double dx = this.x - other.x; final double dy = this.y - other.y; return dx * dx + dy * dy; } } private static final int HALF_SIZE = 20; private double meanX2; private double meanY2; private final List points = new ArrayList(); final private static Map cache = new HashMap(); public static UnusedSpace getUnusedSpace(UFont font, char c) { final Object key = Arrays.asList(font, c); UnusedSpace result = cache.get(key); if (result == null) { result = new UnusedSpace(font, c); cache.put(key, result); } return result; } private UnusedSpace(UFont font, char c) { final BufferedImage im = new BufferedImage(2 * HALF_SIZE, 2 * HALF_SIZE, BufferedImage.TYPE_INT_RGB); final Graphics2D g2d = im.createGraphics(); g2d.setFont(font.getFont()); g2d.drawString("" + c, HALF_SIZE, HALF_SIZE); int minI = Integer.MAX_VALUE; int minJ = Integer.MAX_VALUE; int maxI = Integer.MIN_VALUE; int maxJ = Integer.MIN_VALUE; for (int i = 0; i < im.getWidth(); i++) { for (int j = 0; j < im.getHeight(); j++) { if (isPoint(im, i, j)) { if (i < minI) { minI = i; } if (j < minJ) { minJ = j; } if (i > maxI) { maxI = i; } if (j > maxJ) { maxJ = j; } points.add(new Point(i, j)); } } } double min = Double.MAX_VALUE; for (int i = minI * 4; i <= maxI * 4; i++) { for (int j = minJ * 4; j < maxJ * 4; j++) { final Point p = new Point(i / 4.0, j / 4.0); final double d = biggestDistSqFromPoint(p); if (d < min) { min = d; this.meanX2 = i / 4.0 - HALF_SIZE; this.meanY2 = j / 4.0 - HALF_SIZE; } } } // g2d.setColor(Color.RED); // g2d.draw(new Line2D.Double(meanX2 + HALF_SIZE - 1, meanY2 + HALF_SIZE // - 1, meanX2 + HALF_SIZE + 1, meanY2 // + HALF_SIZE + 1)); // g2d.draw(new Line2D.Double(meanX2 + HALF_SIZE + 1, meanY2 + HALF_SIZE // - 1, meanX2 + HALF_SIZE - 1, meanY2 // + HALF_SIZE + 1)); // int cpt = 1; // try { // ImageIO.write(im, "png", new File("c:/img" + cpt + ".png")); // cpt++; // } catch (IOException e) { // e.printStackTrace(); // } } private double biggestDistSqFromPoint(Point p) { double result = 0; for (Point other : points) { final double d = p.getDistSq(other); if (d > result) { result = d; } } return result; } private static boolean isPoint(BufferedImage im, int x, int y) { final int color = im.getRGB(x, y) & 0x00FFFFFF; if (color == 0) { return false; } return true; } public double getCenterX() { return meanX2; } public double getCenterY() { return meanY2; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/VerticalAlignment.java000066400000000000000000000031271312650303100273050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; public enum VerticalAlignment { TOP, CENTER, BOTTOM; public static VerticalAlignment fromString(String s) { if (TOP.name().equalsIgnoreCase(s)) { return TOP; } // if (CENTER.name().equalsIgnoreCase(s)) { // return CENTER; // } if (BOTTOM.name().equalsIgnoreCase(s)) { return BOTTOM; } return BOTTOM; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/VerticalPosition.java000066400000000000000000000024751312650303100272000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic; public enum VerticalPosition { TOP, BOTTOM }plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/color/000077500000000000000000000000001312650303100241455ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/color/ColorParser.java000066400000000000000000000071771312650303100272570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic.color; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.graphic.IHtmlColorSet; public class ColorParser { private static final String COLOR_REGEXP = "#\\w+[-\\\\|/]?\\w+"; private static final String PART2 = "#(?:\\w+[-\\\\|/]?\\w+;)?(?:(?:text|back|header|line|line\\.dashed|line\\.dotted|line\\.bold|shadowing)(?::\\w+[-\\\\|/]?\\w+)?(?:;|(?![\\w;:.])))+"; private static final String COLORS_REGEXP = "(?:" + PART2 + ")|(?:" + COLOR_REGEXP + ")"; private final RegexLeaf regex; private final String name; private final ColorType mainType; private ColorParser(String name, RegexLeaf regex, ColorType mainType) { this.regex = regex; this.name = name; this.mainType = mainType; } public Colors getColor(RegexResult arg, IHtmlColorSet set) { if (mainType == null) { throw new IllegalStateException(); } final String data = arg.getLazzy(name, 0); if (data == null) { return Colors.empty(); } return new Colors(data, set, mainType); // return result.getColor(type); } // New Parsers public static ColorParser simpleColor(ColorType mainType) { return simpleColor(mainType, "COLOR"); } public static ColorParser simpleColor(ColorType mainType, String id) { return new ColorParser(id, new RegexLeaf(id, "(" + COLORS_REGEXP + ")?"), mainType); } public static ColorParser mandatoryColor(ColorType mainType) { return new ColorParser("COLOR", new RegexLeaf("COLOR", "(" + COLORS_REGEXP + ")"), mainType); } public static ColorParser simpleColor(String optPrefix, ColorType mainType) { return new ColorParser("COLOR", new RegexLeaf("COLOR", "(?:" + optPrefix + " (" + COLORS_REGEXP + "))?"), mainType); } // Old Parsers public static RegexLeaf exp1() { return simpleColor(null).regex; } public static RegexLeaf exp2() { return new RegexLeaf("BACKCOLOR", "(" + COLOR_REGEXP + ")?"); } public static RegexLeaf exp3() { return new RegexLeaf("BACKCOLOR2", "(" + COLOR_REGEXP + ")?"); } public static RegexLeaf exp4() { return new RegexLeaf("COLOR", "(?:(" + COLOR_REGEXP + "):)?"); } public static RegexLeaf exp6() { return new RegexLeaf("COLOR", "(?:(" + COLOR_REGEXP + ")\\|)?"); } public static RegexLeaf exp7() { return new RegexLeaf("COLOR", "(?:(" + COLOR_REGEXP + "))?"); } public RegexLeaf getRegex() { return regex; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/color/ColorType.java000066400000000000000000000030321312650303100267260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic.color; public enum ColorType { TEXT, LINE, BACK, HEADER, ARROW; public static ColorType getType(String s) { final int x = s.indexOf('.'); if (x != -1) { s = s.substring(0, x); } final ColorType key = ColorType.valueOf(s.toUpperCase()); return key; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/graphic/color/Colors.java000066400000000000000000000150221312650303100262510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.graphic.color; import java.util.EnumMap; import java.util.Map; import java.util.StringTokenizer; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamColors; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.LinkStyle; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.IHtmlColorSet; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; public class Colors { private final Map map = new EnumMap(ColorType.class); private LinkStyle lineStyle = null; private Boolean shadowing = null; @Override public String toString() { return map.toString() + " " + lineStyle; } public static Colors empty() { return new Colors(); } public boolean isEmpty() { return map.isEmpty(); } private Colors copy() { final Colors result = new Colors(); result.map.putAll(this.map); result.lineStyle = this.lineStyle; return result; } private Colors() { } public Colors(String data, IHtmlColorSet set, ColorType mainType) { data = StringUtils.goLowerCase(data); for (final StringTokenizer st = new StringTokenizer(data, "#;"); st.hasMoreTokens();) { final String s = st.nextToken(); final int x = s.indexOf(':'); if (x == -1) { if (s.contains(".") == false) { map.put(mainType, set.getColorIfValid(s)); } } else { final String name = s.substring(0, x); final String value = s.substring(x + 1); if (name.equalsIgnoreCase("shadowing")) { this.shadowing = value.equalsIgnoreCase("true"); } else { final ColorType key = ColorType.getType(name); final HtmlColor color = set.getColorIfValid(value); map.put(key, color); } } } if (data.contains("line.dashed")) { lineStyle = LinkStyle.DASHED; } else if (data.contains("line.dotted")) { lineStyle = LinkStyle.DOTTED; } else if (data.contains("line.bold")) { lineStyle = LinkStyle.BOLD; } } public HtmlColor getColor(ColorType key) { if (key == null) { throw new IllegalArgumentException(); } return map.get(key); } public HtmlColor getColor(ColorType key1, ColorType key2) { final HtmlColor result = getColor(key1); if (result != null) { return result; } return getColor(key2); } public UStroke getSpecificLineStroke() { if (lineStyle == null) { return null; } return LinkStyle.getStroke(lineStyle); } // public Colors addSpecificLineStroke(UStroke specificStroke) { // final Colors result = copy(); // result.specificStroke = specificStroke; // return result; // } public Colors add(ColorType type, HtmlColor color) { if (color == null) { return this; } final Colors result = copy(); result.map.put(type, color); return result; } private Colors add(ColorType colorType, Colors other) { final Colors result = copy(); result.map.putAll(other.map); if (other.lineStyle != null) { result.lineStyle = other.lineStyle; } return result; } public final LinkStyle getLineStyle() { return lineStyle; } public ISkinParam mute(ISkinParam skinParam) { return new SkinParamColors(skinParam, this); } public Colors addLegacyStroke(String s) { if (s == null) { throw new IllegalArgumentException(); } final Colors result = copy(); result.lineStyle = LinkStyle.valueOf(StringUtils.goUpperCase(s)); return result; } public static UGraphic applyStroke(UGraphic ug, Colors colors) { if (colors == null) { return ug; } if (colors.lineStyle == null) { return ug; } return ug.apply(LinkStyle.getStroke(colors.lineStyle)); } public Colors applyStereotype(Stereotype stereotype, ISkinParam skinParam, ColorParam param) { if (stereotype == null) { throw new IllegalArgumentException(); } if (param == null) { throw new IllegalArgumentException(); } final ColorType colorType = param.getColorType(); if (colorType == null) { throw new IllegalArgumentException(); } if (getColor(colorType) != null) { return this; } final Colors colors = skinParam.getColors(param, stereotype); return add(colorType, colors); } private Colors applyFontParamStereotype(Stereotype stereotype, ISkinParam skinParam, FontParam param) { if (stereotype == null) { throw new IllegalArgumentException(); } if (param == null) { return this; } final ColorType colorType = ColorType.TEXT; if (getColor(colorType) != null) { return this; } final HtmlColor col = skinParam.getFontHtmlColor(stereotype, param); return add(colorType, col); } public Colors applyStereotypeForNote(Stereotype stereotype, ISkinParam skinParam, FontParam fontParam, ColorParam... params) { if (stereotype == null) { throw new IllegalArgumentException(); } if (params == null) { throw new IllegalArgumentException(); } Colors result = this; for (ColorParam param : params) { result = result.applyStereotype(stereotype, skinParam, param); } result = result.applyFontParamStereotype(stereotype, skinParam, fontParam); result.shadowing = skinParam.shadowingForNote(stereotype); return result; } public Boolean getShadowing() { return shadowing; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/000077500000000000000000000000001312650303100226765ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/Box2D.java000066400000000000000000000044031312650303100244600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.geom.LineSegmentDouble; public class Box2D { final private double x1; final private double y1; final private double x2; final private double y2; private Box2D(double x1, double y1, double x2, double y2) { this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; } public static Box2D create(double x, double y, Dimension2D dim) { return new Box2D(x, y, x + dim.getWidth(), y + dim.getHeight()); } @Override public String toString() { return "Box [" + x1 + "," + y1 + "] [" + x2 + "," + y2 + "]"; } public boolean doesIntersect(LineSegmentDouble seg) { if (seg.doesIntersect(new LineSegmentDouble(x1, y1, x2, y1))) { return true; } if (seg.doesIntersect(new LineSegmentDouble(x2, y1, x2, y2))) { return true; } if (seg.doesIntersect(new LineSegmentDouble(x2, y2, x1, y2))) { return true; } if (seg.doesIntersect(new LineSegmentDouble(x1, y2, x1, y1))) { return true; } return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/CucaDiagramFileMakerHectorB1.java000066400000000000000000000136611312650303100310200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; import java.awt.geom.Dimension2D; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.svek.CucaDiagramFileMaker; import net.sourceforge.plantuml.svek.DotDataImageBuilder; import net.sourceforge.plantuml.svek.IEntityImage; import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic2; import net.sourceforge.plantuml.ugraphic.UTranslate; public class CucaDiagramFileMakerHectorB1 implements CucaDiagramFileMaker { private final CucaDiagram diagram; private SkeletonConfiguration configuration; // private double singleWidth; // private double singleHeight; private double nodeMargin = 40; public CucaDiagramFileMakerHectorB1(CucaDiagram diagram) { this.diagram = diagram; } // final private Map images = new LinkedHashMap(); // final private Map boxes = new LinkedHashMap(); final private Map links = new LinkedHashMap(); // final private List forbidden = new ArrayList(); private double getX(Pin pin) { return nodeMargin * configuration.getCol(pin); } private double getY(Pin pin) { return nodeMargin * pin.getRow(); } // private double getCenterX(Pin pin) { // return singleWidth * configuration.getCol(pin) + singleWidth / 2.0; // } // // private double getCenterY(Pin pin) { // return singleHeight * pin.getRow() + singleHeight / 2.0; // } public ImageData createFile(OutputStream os, List dotStrings, FileFormatOption fileFormatOption) throws IOException { final PinFactory pinFactory = new PinFactory(); final SkeletonBuilder skeletonBuilder = new SkeletonBuilder(); links.clear(); for (Link link : diagram.getLinks()) { final PinLink pinLink = pinFactory.createPinLink(link); links.put(link, pinLink); skeletonBuilder.add(pinLink); } final Skeleton skeleton = skeletonBuilder.createSkeletons().get(0); this.configuration = SkeletonConfigurationUtils.getBest(skeleton); MinMax minMax = MinMax.getEmpty(false); for (Pin pin : skeleton.getPins()) { minMax = minMax.addPoint(getX(pin), getY(pin)); } final double borderMargin = 10; final Dimension2D dimTotal = new Dimension2DDouble(2 * borderMargin + minMax.getMaxX(), 2 * borderMargin + minMax.getMaxY()); UGraphic2 ug = null;// fileFormatOption.createUGraphic(diagram.getColorMapper(), diagram.getDpiFactor(fileFormatOption), // dimTotal, null, false); ug = (UGraphic2) ug.apply(new UTranslate(borderMargin, borderMargin)); for (PinLink pinLink : skeleton.getPinLinks()) { drawPinLink(ug, pinLink); } for (Pin pin : skeleton.getPins()) { drawPin(ug, pin); } // ug.writeImageTOBEMOVED(os, null, diagram.getDpi(fileFormatOption)); // return new ImageDataSimple(dimTotal); throw new UnsupportedOperationException(); } private void drawPin(UGraphic ug, Pin pin) { final double x = getX(pin); final double y = getY(pin); final UEllipse circle = new UEllipse(6, 6); ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(new UChangeBackColor(HtmlColorUtils.BLACK)) .apply(new UTranslate(x - 3, y - 3)).draw(circle); } private void drawPinLink(UGraphic ug, PinLink pinLink) { final double x1 = getX(pinLink.getPin1()); final double y1 = getY(pinLink.getPin1()); final double x2 = getX(pinLink.getPin2()); final double y2 = getY(pinLink.getPin2()); final Rose rose = new Rose(); final HtmlColor color = rose.getHtmlColor(diagram.getSkinParam(), ColorParam.arrow); final List b = new ArrayList(); final SmartConnection connection = new SmartConnection(x1, y1, x2, y2, b); connection.draw(ug, color); } private IEntityImage computeImage(final ILeaf leaf) { final IEntityImage image = DotDataImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(), false, diagram, null, null, null, diagram.getLinks()); return image; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/GrowingTree.java000066400000000000000000000115071312650303100260010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; public class GrowingTree { private final List all = new ArrayList(); private final Map> directlyAfter = new HashMap>(); public Skeleton createSkeleton() { final Set pins = new LinkedHashSet(); for (PinLink link : all) { pins.add(link.getPin1()); pins.add(link.getPin2()); } normalizeRowToZero(pins); return new Skeleton(new ArrayList(pins), new ArrayList(all)); } private void normalizeRowToZero(Collection pins) { int minRow = Integer.MAX_VALUE; for (Pin p : pins) { final int r = p.getRow(); if (r == Integer.MAX_VALUE) { throw new IllegalStateException(); } if (r < minRow) { minRow = r; } } for (Pin p : pins) { p.push(-minRow); } } public boolean canBeAdded(PinLink candidat) { if (all.size() == 0) { return true; } final Pin p1 = candidat.getPin1(); final Pin p2 = candidat.getPin2(); if (p1.getRow() == Integer.MAX_VALUE && p2.getRow() == Integer.MAX_VALUE) { return false; } return true; } public void add(PinLink newPinLink) { final Pin p1 = newPinLink.getPin1(); final Pin p2 = newPinLink.getPin2(); if (all.size() == 0) { newPinLink.getPin1().setRow(0); simpleRowComputation(newPinLink); } else if (isPartiallyNew(newPinLink)) { simpleRowComputation(newPinLink); } else if (p1.getRow() != Integer.MAX_VALUE && p2.getRow() != Integer.MAX_VALUE) { final int actualRowDiff = p2.getRow() - p1.getRow(); final int neededPushForP2 = newPinLink.getLengthStandard() - actualRowDiff; push(p2, neededPushForP2); } else { throw new IllegalArgumentException(); } all.add(newPinLink); getDirectlyAfter(p1).add(p2); } private List getDirectlyAfter(Pin p) { ArrayList result = directlyAfter.get(p); if (result == null) { result = new ArrayList(); directlyAfter.put(p, result); } return result; } private Collection getIndirectlyAfter(Pin pin) { final Set result = new HashSet(getDirectlyAfter(pin)); int lastSize = result.size(); while (true) { for (Pin p : new ArrayList(result)) { result.addAll(getDirectlyAfter(p)); } if (result.size() == lastSize) { return result; } lastSize = result.size(); } } private void push(Pin p, int push) { if (push <= 0) { return; } final Collection after = getIndirectlyAfter(p); if (after.contains(p)) { throw new IllegalStateException(); } p.push(push); for (Pin pp : after) { pp.push(push); } } private void simpleRowComputation(PinLink link) { final Pin p1 = link.getPin1(); final Pin p2 = link.getPin2(); if (p1.getRow() == Integer.MAX_VALUE && p2.getRow() != Integer.MAX_VALUE) { p1.setRow(p2.getRow() - link.getLengthStandard()); } else if (p1.getRow() != Integer.MAX_VALUE && p2.getRow() == Integer.MAX_VALUE) { p2.setRow(p1.getRow() + link.getLengthStandard()); } else { throw new IllegalArgumentException(); } } private boolean isPartiallyNew(PinLink link) { final Pin p1 = link.getPin1(); final Pin p2 = link.getPin2(); if (p1.getRow() == Integer.MAX_VALUE && p2.getRow() != Integer.MAX_VALUE) { return true; } else if (p1.getRow() != Integer.MAX_VALUE && p2.getRow() == Integer.MAX_VALUE) { return true; } else { return false; } } public void normalizeRowToZero() { // TODO Auto-generated method stub } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/HectorPath.java000066400000000000000000000041711312650303100256050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.geom.LineSegmentDouble; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; public class HectorPath { private final List segments = new ArrayList(); public void add(LineSegmentDouble seg) { this.segments.add(seg); } public void add(Point2D p1, Point2D p2) { add(new LineSegmentDouble(p1, p2)); } @Override public String toString() { return segments.toString(); } public void draw(UGraphic ug, HtmlColor color) { ug = ug.apply(new UChangeColor(color)).apply(new UStroke(1.5)); for (LineSegmentDouble seg : segments) { seg.draw(ug); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/Pin.java000066400000000000000000000034721312650303100242750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; public class Pin { private int row; private int uid = -1; private final Object userData; public Pin(int row, Object userData) { this.row = row; this.userData = userData; } public void setUid(int uid) { if (this.uid != -1) { throw new IllegalStateException(); } this.uid = uid; } public int getRow() { return row; } public int getUid() { return uid; } public Object getUserData() { return userData; } public void setRow(int row) { this.row = row; } public void push(int push) { setRow(getRow() + push); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/PinFactory.java000066400000000000000000000037351312650303100256270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; import java.util.HashMap; import java.util.Map; import net.sourceforge.plantuml.cucadiagram.Link; public class PinFactory { private final Map pins = new HashMap(); Pin create(Object userData) { return create(Integer.MAX_VALUE, userData); } public Pin create(int row, Object userData) { if (userData == null) { return new Pin(row, userData); } Pin result = pins.get(userData); if (result == null) { result = new Pin(row, userData); pins.put(userData, result); } return result; } public PinLink createPinLink(Link link) { final PinLink result = new PinLink(create(link.getEntity1()), create(link.getEntity2()), link.getLength(), link); return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/PinLink.java000066400000000000000000000037561312650303100251200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; public class PinLink { private final Pin pin1; private final Pin pin2; private final Object userData; private final int length; public PinLink(Pin pin1, Pin pin2, int length, Object userData) { if (length < 1) { throw new IllegalArgumentException(); } this.pin1 = pin1; this.pin2 = pin2; this.userData = userData; this.length = length; } public boolean contains(Pin pin) { return pin == pin1 || pin == pin2; } public boolean doesTouch(PinLink other) { return other.contains(pin1) || other.contains(pin2); } public Pin getPin1() { return pin1; } public Pin getPin2() { return pin2; } public int getLengthDot() { return length; } public int getLengthStandard() { return length - 1; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/PinLinksContinuousSet.java000066400000000000000000000053171312650303100300410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; public class PinLinksContinuousSet { private final Collection all = new ArrayList(); public Skeleton createSkeleton() { final GrowingTree tree = new GrowingTree(); final Collection pendings = new ArrayList(all); while (pendings.size() > 0) { for (Iterator it = pendings.iterator(); it.hasNext();) { final PinLink candidat = it.next(); if (tree.canBeAdded(candidat)) { tree.add(candidat); it.remove(); } } } return tree.createSkeleton(); } public void add(PinLink newPinLink) { if (all.size() == 0) { all.add(newPinLink); return; } if (all.contains(newPinLink)) { throw new IllegalArgumentException("already"); } for (PinLink aLink : all) { if (newPinLink.doesTouch(aLink)) { all.add(newPinLink); return; } } throw new IllegalArgumentException("not connex"); } public void addAll(PinLinksContinuousSet other) { if (doesTouch(other) == false) { throw new IllegalArgumentException(); } this.all.addAll(other.all); } public boolean doesTouch(PinLink other) { for (PinLink aLink : all) { if (other.doesTouch(aLink)) { return true; } } return false; } public boolean doesTouch(PinLinksContinuousSet otherSet) { for (PinLink otherLink : otherSet.all) { if (doesTouch(otherLink)) { return true; } } return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/Skeleton.java000066400000000000000000000042261312650303100253310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; import java.util.Collection; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; public class Skeleton { private final List pins; private final List pinLinks; private final SortedSet rows = new TreeSet(); public Skeleton(List pins, List pinLinks) { this.pins = pins; this.pinLinks = pinLinks; int uid = 0; for (Pin pin : pins) { pin.setUid(uid++); rows.add(pin.getRow()); } } public SortedSet getRows() { return rows; } public List getPins() { return pins; } public Collection getPinsOfRow(int row) { final Set result = new LinkedHashSet(); for (Pin pin : pins) { if (pin.getRow() == row) { result.add(pin); } } return result; } public List getPinLinks() { return pinLinks; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/SkeletonBuilder.java000066400000000000000000000044451312650303100266430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class SkeletonBuilder { private List sets = new ArrayList(); public void add(PinLink pinLink) { addInternal(pinLink); merge(); } private void merge() { for (int i = 0; i < sets.size() - 1; i++) { for (int j = i + 1; j < sets.size(); j++) { if (sets.get(i).doesTouch(sets.get(j))) { sets.get(i).addAll(sets.get(j)); sets.remove(j); return; } } } } private void addInternal(PinLink pinLink) { for (PinLinksContinuousSet set : sets) { if (set.doesTouch(pinLink)) { set.add(pinLink); return; } } final PinLinksContinuousSet newSet = new PinLinksContinuousSet(); newSet.add(pinLink); sets.add(newSet); } public List createSkeletons() { final List result = new ArrayList(); for (PinLinksContinuousSet set : sets) { result.add(set.createSkeleton()); } return Collections.unmodifiableList(result); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/SkeletonConfiguration.java000066400000000000000000000150421312650303100300570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; public class SkeletonConfiguration { private final int position[]; private final Skeleton skeleton; public static SkeletonConfiguration getDefault(Skeleton skeleton) { final Collection rows = skeleton.getRows(); final Map free = new HashMap(); for (Integer i : rows) { free.put(i, 0); } final Collection pins = skeleton.getPins(); final int position[] = new int[pins.size()]; for (Pin pin : pins) { final int f = free.get(pin.getRow()); position[pin.getUid()] = f; free.put(pin.getRow(), f + 1); } return new SkeletonConfiguration(skeleton, position); } @Override public int hashCode() { int result = 0; for (int v : position) { result = result * 37 + v; } return result; } @Override public boolean equals(Object other) { final SkeletonConfiguration this2 = (SkeletonConfiguration) other; if (this.skeleton != this2.skeleton) { throw new IllegalArgumentException(); } if (this.position.length != this2.position.length) { throw new IllegalArgumentException(); } for (int i = 0; i < position.length; i++) { if (this.position[i] != this2.position[i]) { return false; } } return true; } @Override public String toString() { final int minRow = skeleton.getRows().first(); final int maxRow = skeleton.getRows().last(); int minCol = Integer.MAX_VALUE; int maxCol = Integer.MIN_VALUE; for (int c : position) { if (c > maxCol) { maxCol = c; } if (c < minCol) { minCol = c; } } final StringBuilder result = new StringBuilder(); for (int r = minRow; r <= maxRow; r++) { appendRow(result, r, minCol, maxCol); if (r < maxRow) { result.append(" "); } } return result.toString(); } private void appendRow(StringBuilder result, int row, int minCol, int maxCol) { result.append("("); boolean first = true; for (int c = minCol; c <= maxCol; c++) { if (first == false) { result.append("-"); } final Pin pin = getPin(row, c); if (pin == null) { result.append("."); } else { result.append(pin.getUid()); } first = false; } result.append(")"); } private Pin getPin(int row, int col) { for (Pin p : skeleton.getPinsOfRow(row)) { if (getCol(p) == col) { return p; } } return null; } public int getCol(Pin pin) { return position[pin.getUid()]; } private SkeletonConfiguration(Skeleton skeleton, int position[]) { this.position = position; this.skeleton = skeleton; } class Switch implements SkeletonMutation { private final SkeletonConfiguration newConfiguration; public Switch(Pin pin1, Pin pin2) { if (pin1 == pin2) { throw new IllegalArgumentException(); } final int copy[] = new int[position.length]; for (int i = 0; i < position.length; i++) { if (i == pin1.getUid()) { copy[i] = position[pin2.getUid()]; } else if (i == pin2.getUid()) { copy[i] = position[pin1.getUid()]; } else { copy[i] = position[i]; } } this.newConfiguration = new SkeletonConfiguration(skeleton, copy); } public SkeletonConfiguration mutate() { return newConfiguration; } } class Move implements SkeletonMutation { private final SkeletonConfiguration newConfiguration; public Move(Pin pin, int deltaX) { final int copy[] = new int[position.length]; for (int i = 0; i < position.length; i++) { if (i == pin.getUid()) { copy[i] = position[i] + deltaX; } else { copy[i] = position[i]; } } this.newConfiguration = new SkeletonConfiguration(skeleton, copy); } public SkeletonConfiguration mutate() { return newConfiguration; } } private Collection getMutationForRow(int row) { final Collection pins = skeleton.getPinsOfRow(row); final Collection usedCols = new HashSet(); for (Pin pin : pins) { usedCols.add(getCol(pin)); } final Collection result = new ArrayList(); for (Pin pin1 : pins) { final int c = getCol(pin1); if (usedCols.contains(c + 1) == false) { result.add(new Move(pin1, 1)); } if (usedCols.contains(c - 1) == false) { result.add(new Move(pin1, -1)); } for (Pin pin2 : pins) { if (pin1 == pin2) { continue; } if (getCol(pin1) > getCol(pin2)) { continue; } if (getCol(pin1) == getCol(pin2)) { throw new IllegalStateException(); } result.add(new Switch(pin1, pin2)); } } return result; } public Set getSomeMuteds() { final Set result = new HashSet(); for (Integer row : skeleton.getRows()) { for (SkeletonMutation mutation : getMutationForRow(row)) { result.add(mutation.mutate()); } } return result; } public List getPinLinks() { return skeleton.getPinLinks(); } public double getLength(PinLink link) { final double x1 = getCol(link.getPin1()); final double y1 = link.getPin1().getRow(); final double x2 = getCol(link.getPin2()); final double y2 = link.getPin2().getRow(); final double dx = x2 - x1; final double dy = y2 - y1; return Math.sqrt(dx * dx + dy * dy); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/SkeletonConfigurationComparator.java000066400000000000000000000035151312650303100321110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; import java.util.Comparator; public class SkeletonConfigurationComparator implements Comparator { private final SkeletonConfigurationEvaluator evaluator; public SkeletonConfigurationComparator(SkeletonConfigurationEvaluator evaluator) { this.evaluator = evaluator; } public int compare(SkeletonConfiguration sc1, SkeletonConfiguration sc2) { final double price1 = evaluator.getPrice(sc1); final double price2 = evaluator.getPrice(sc2); if (price1 > price2) { return 1; } if (price1 < price2) { return -1; } return 0; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/SkeletonConfigurationEvaluator.java000066400000000000000000000026011312650303100317370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; public interface SkeletonConfigurationEvaluator { public double getPrice(SkeletonConfiguration configuration); } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/SkeletonConfigurationEvaluatorLineLenght.java000066400000000000000000000031001312650303100337040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; public class SkeletonConfigurationEvaluatorLineLenght implements SkeletonConfigurationEvaluator { public double getPrice(SkeletonConfiguration configuration) { double result = 0; for (PinLink link : configuration.getPinLinks()) { result += configuration.getLength(link); } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/SkeletonConfigurationSet.java000066400000000000000000000050311312650303100305300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; public class SkeletonConfigurationSet implements Iterable { private final List all; private final SkeletonConfigurationComparator comparator; private final int limitSize; public SkeletonConfigurationSet(int limitSize, SkeletonConfigurationEvaluator evaluator) { this.comparator = new SkeletonConfigurationComparator(evaluator); this.all = new ArrayList(); this.limitSize = limitSize; } public void add(SkeletonConfiguration skeletonConfiguration) { this.all.add(skeletonConfiguration); sortAndTruncate(); } public void addAll(Collection others) { all.addAll(others); sortAndTruncate(); } private void sortAndTruncate() { Collections.sort(all, comparator); while (all.size() > limitSize) { all.remove(all.size() - 1); } } @Override public String toString() { return all.toString(); } public int size() { return all.size(); } public Iterator iterator() { return new ArrayList(all).iterator(); } public SkeletonConfiguration first() { return all.get(0); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/SkeletonConfigurationUtils.java000066400000000000000000000035251312650303100311030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; public class SkeletonConfigurationUtils { public static SkeletonConfiguration getBest(Skeleton skeleton) { SkeletonConfiguration config = SkeletonConfiguration.getDefault(skeleton); final SkeletonConfigurationSet set = new SkeletonConfigurationSet(200, new SkeletonConfigurationEvaluatorLineLenght()); set.add(config); for (int i = 0; i < 10; i++) { System.err.println("before size=" + set.size()); for (SkeletonConfiguration sk : set) { set.addAll(sk.getSomeMuteds()); } System.err.println("after size=" + set.size()); } return set.first(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/SkeletonConfigurations.java000066400000000000000000000024661312650303100302500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; public class SkeletonConfigurations { } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/SkeletonMutation.java000066400000000000000000000025261312650303100270530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; interface SkeletonMutation { public SkeletonConfiguration mutate(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/SmartConnection.java000066400000000000000000000066051312650303100266560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; import java.awt.geom.Point2D; import java.util.List; import net.sourceforge.plantuml.geom.LineSegmentDouble; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UStroke; class SmartConnection { private final double x1; private final double y1; private final double x2; private final double y2; private final List forbidden; public SmartConnection(double x1, double y1, double x2, double y2, List forbidden) { this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; this.forbidden = forbidden; } public SmartConnection(Point2D p1, Point2D p2, List b) { this(p1.getX(), p1.getY(), p2.getX(), p2.getY(), b); } public void draw(UGraphic ug, HtmlColor color) { final LineSegmentDouble seg = new LineSegmentDouble(x1, y1, x2, y2); boolean clash = intersect(seg); if (clash) { ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(new UStroke(1.0)); } else { ug = ug.apply(new UChangeColor(color)).apply(new UStroke(1.5)); } seg.draw(ug); } private boolean intersect(LineSegmentDouble seg) { for (Box2D box : forbidden) { if (box.doesIntersect(seg)) { return true; } } return false; } public void drawEx1(UGraphic ug, HtmlColor color) { ug = ug.apply(new UChangeColor(color)).apply(new UStroke(1.5)); final double orthoX = -(y2 - y1); final double orthoY = x2 - x1; for (int i = -10; i <= 10; i++) { for (int j = -10; j <= 10; j++) { final double d1x = orthoX * i / 10.0; final double d1y = orthoY * i / 10.0; final double c1x = (x1 + x2) / 2 + d1x; final double c1y = (y1 + y2) / 2 + d1y; final double d2x = orthoX * j / 10.0; final double d2y = orthoY * j / 10.0; final double c2x = (x1 + x2) / 2 + d2x; final double c2y = (y1 + y2) / 2 + d2y; final UPath path = new UPath(); path.moveTo(x1, y1); path.cubicTo(c1x, c1y, c2x, c2y, x2, y2); ug.draw(path); } } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/UnlinarCompressedPlan.java000066400000000000000000000121061312650303100300110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; import java.awt.geom.Point2D; import net.sourceforge.plantuml.geom.LineSegmentDouble; import net.sourceforge.plantuml.hector.UnlinearCompression.Rounding; class UnlinarCompressedPlan { private final UnlinearCompression compX; private final UnlinearCompression compY; public UnlinarCompressedPlan(double inner, double outer) { this(inner, outer, inner, outer); } public UnlinarCompressedPlan(double innerx, double outerx, double innery, double outery) { this.compX = new UnlinearCompression(innerx, outerx); this.compY = new UnlinearCompression(innery, outery); } public double getInnerX() { return compX.innerSize(); } public double getInnerY() { return compY.innerSize(); } public HectorPath uncompressSegmentSimple(Point2D pp1, Point2D pp2) { final HectorPath result = new HectorPath(); result.add(new LineSegmentDouble(uncompress(pp1, UnlinearCompression.Rounding.CENTRAL), uncompress(pp2, UnlinearCompression.Rounding.CENTRAL))); return result; } public HectorPath uncompressSegment(Point2D pp1, Point2D pp2) { double x1 = pp1.getX(); double y1 = pp1.getY(); final double x2 = pp2.getX(); final double y2 = pp2.getY(); final HectorPath result = new HectorPath(); final double y[] = compY.encounteredSingularities(y1, y2); if (y.length == 0 || x1 == x2) { result.add(new LineSegmentDouble(uncompress(pp1, UnlinearCompression.Rounding.CENTRAL), uncompress(pp2, UnlinearCompression.Rounding.CENTRAL))); return result; } System.err.println("len=" + y.length); final LineSegmentDouble segment = new LineSegmentDouble(pp1, pp2); for (int i = 0; i < y.length; i++) { final double x = segment.getIntersectionHorizontal(y[i]); final Rounding r = i == 0 ? UnlinearCompression.Rounding.CENTRAL : UnlinearCompression.Rounding.BORDER_2; result.add(uncompress(x1, y1, r), uncompress(x, y[i], UnlinearCompression.Rounding.BORDER_1)); x1 = x; y1 = y[i]; } result.add(uncompress(x1, y1, UnlinearCompression.Rounding.BORDER_2), uncompress(x2, y2, UnlinearCompression.Rounding.CENTRAL)); return result; } public HectorPath uncompress(LineSegmentDouble segment) { double x1 = segment.getX1(); double y1 = segment.getY1(); final double x2 = segment.getX2(); final double y2 = segment.getY2(); final HectorPath result = new HectorPath(); final double x[] = compX.encounteredSingularities(x1, x2); if (x.length == 0) { result.add(getUncompressedSegment(x1, y1, x2, y2, UnlinearCompression.Rounding.BORDER_2)); return result; } for (int i = 0; i < x.length; i++) { final double y = segment.getIntersectionVertical(x[i]); result.add(getUncompressedSegment(x1, y1, x[i], y, UnlinearCompression.Rounding.BORDER_2)); x1 = x[i]; y1 = y; } result.add(getUncompressedSegment(x1, y1, x2, y2, UnlinearCompression.Rounding.BORDER_2)); return result; } public Point2D uncompress(Point2D pt, UnlinearCompression.Rounding rounding) { return uncompress(pt.getX(), pt.getY(), rounding); } public Point2D uncompress(double x, double y, UnlinearCompression.Rounding rounding) { return new Point2D.Double(compX.uncompress(x, rounding), compY.uncompress(y, rounding)); } private LineSegmentDouble getUncompressedSegment(final double x1, final double y1, final double x2, final double y2, UnlinearCompression.Rounding rounding) { final LineSegmentDouble un1 = new LineSegmentDouble(compX.uncompress(x1, rounding), compY.uncompress(y1, rounding), compX.uncompress(x2, rounding), compY.uncompress(y2, rounding)); return un1; } // private LineSegmentDouble getUncompressedSegmentRoundBefore(final double // x1, final double y1, final double x2, // final double y2) { // final LineSegmentDouble un1 = new LineSegmentDouble(compX.uncompress(x1), // compY.uncompress(y1), // compX.uncompress(x2) - compX.innerSize(), compY.uncompress(y2)); // return un1; // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector/UnlinearCompression.java000066400000000000000000000057111312650303100275440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector; class UnlinearCompression { static enum Rounding { BORDER_1, CENTRAL, BORDER_2; } private final double inner; private final double outer; public UnlinearCompression(double inner, double outer) { this.inner = inner; this.outer = outer; } public double compress(double x) { final double pour = x / (inner + outer); final double pourInter = Math.floor(pour); x -= pourInter * (inner + outer); if (x < inner) { return pourInter * outer; } return x - inner + pourInter * outer; } public double uncompress(double x, Rounding rounding) { final int pourInter = nbOuterBefore(x); final boolean onBorder = equals(x, pourInter * outer); if (onBorder && rounding == Rounding.BORDER_1) { // Nothing } else if (onBorder && rounding == Rounding.CENTRAL) { x += inner / 2.0; } else { x += inner; } x += pourInter * inner; return x; } private static boolean equals(double d1, double d2) { return Math.abs(d1 - d2) < .001; } private int nbOuterBefore(double x) { final double pour = x / outer; final int pourInter = (int) Math.floor(pour); return pourInter; } public double[] encounteredSingularities(double from, double to) { final int outer1 = nbOuterBefore(from) + 1; int outer2 = nbOuterBefore(to) + 1; if (equals(to, (outer2 - 1) * outer)) { outer2--; } final double result[]; if (from <= to) { result = new double[outer2 - outer1]; for (int i = 0; i < result.length; i++) { result[i] = (outer1 + i) * outer; } } else { result = new double[outer1 - outer2]; for (int i = 0; i < result.length; i++) { result[i] = (outer1 - 1 - i) * outer; } } return result; } public double innerSize() { return inner; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/000077500000000000000000000000001312650303100227605ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/MinMax.java000066400000000000000000000045611312650303100250220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector2; import java.util.Collection; public class MinMax { private final int min; private final int max; private MinMax(int min, int max) { if (max < min) { throw new IllegalArgumentException(); } this.min = min; this.max = max; } private MinMax(int value) { this(value, value); } public MinMax add(int value) { final int newMin = Math.min(min, value); final int newMax = Math.max(max, value); if (min == newMin && max == newMax) { return this; } return new MinMax(newMin, newMax); } public MinMax add(MinMax other) { final int newMin = Math.min(min, other.min); final int newMax = Math.max(max, other.max); if (min == newMin && max == newMax) { return this; } return new MinMax(newMin, newMax); } public final int getMin() { return min; } public final int getMax() { return max; } public static MinMax from(Collection values) { MinMax result = null; for (Integer i : values) { if (result == null) { result = new MinMax(i); } else { result = result.add(i); } } return result; } public int getDiff() { return max - min; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/continuity/000077500000000000000000000000001312650303100251655ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/continuity/Skeleton.java000066400000000000000000000110771312650303100276220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector2.continuity; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.Link; public class Skeleton { private final Set entities = new HashSet(); private final List links = new ArrayList(); private Set getDirectChildren(IEntity parent) { final Set result = new HashSet(); for (Link link : links) { if (link.isAutolink()) { continue; } if (link.getEntity1() == parent) { result.add(link.getEntity2()); } } return Collections.unmodifiableSet(result); } @Override public String toString() { return "skeleton " + links; } private Set getIndirectChildren(IEntity parent) { final Set result = new HashSet(getDirectChildren(parent)); int currentSize = result.size(); while (true) { for (IEntity ent : new HashSet(result)) { result.addAll(getDirectChildren(ent)); } if (result.contains(parent) || result.size() == currentSize) { return Collections.unmodifiableSet(result); } currentSize = result.size(); } } private boolean hasCycle() { for (IEntity ent : entities) { if (getIndirectChildren(ent).contains(ent)) { return true; } } return false; } public Skeleton removeCycle() { final Skeleton result = new Skeleton(); for (Link link : links) { result.add(link); if (result.hasCycle()) { result.links.remove(link); } } return result; } public void add(Link link) { if (links.contains(link)) { throw new IllegalArgumentException(); } if (link.getEntity1().isGroup()) { throw new IllegalArgumentException(); } if (link.getEntity2().isGroup()) { throw new IllegalArgumentException(); } links.add(link); entities.add(link.getEntity1()); entities.add(link.getEntity2()); } public void addAll(Skeleton other) { for (Link otherLink : other.links) { this.add(otherLink); } } public boolean doesTouch(Link other) { for (Link link : links) { if (link.doesTouch(other)) { return true; } } return false; } public boolean doesTouch(Skeleton other) { for (Link link : links) { if (other.doesTouch(link)) { return true; } } return false; } public void computeLayers() { if (hasCycle()) { throw new UnsupportedOperationException(); } for (IEntity ent : entities) { ent.setHectorLayer(0); } boolean changed; do { changed = false; for (Link link : links) { if (ensureLayer(link)) { changed = true; } } } while (changed); } private boolean ensureLayer(Link link) { final int lenght = link.getLength(); final int l1 = link.getEntity1().getHectorLayer(); final int l2 = link.getEntity2().getHectorLayer(); if (lenght == 1) { if (l1 < l2) { link.getEntity1().setHectorLayer(l2); return true; } else if (l2 < l1) { link.getEntity2().setHectorLayer(l1); return true; } } else { final int l2theoric = l1 + lenght - 1; if (l2 < l2theoric) { link.getEntity2().setHectorLayer(l2theoric); return true; } } return false; } public Collection entities() { return Collections.unmodifiableCollection(entities); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/continuity/SkeletonBuilder.java000066400000000000000000000043761312650303100311350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector2.continuity; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.cucadiagram.Link; public class SkeletonBuilder { private List all = new ArrayList(); public void add(Link link) { addInternal(link); do { final boolean changed = merge(); if (changed == false) { return; } } while (true); } private boolean merge() { for (int i = 0; i < all.size() - 1; i++) { for (int j = i + 1; j < all.size(); j++) { if (all.get(i).doesTouch(all.get(j))) { all.get(i).addAll(all.get(j)); all.remove(j); return true; } } } return false; } private void addInternal(Link link) { for (Skeleton skeleton : all) { if (skeleton.doesTouch(link)) { skeleton.add(link); return; } } final Skeleton newSkeleton = new Skeleton(); newSkeleton.add(link); all.add(newSkeleton); } public List getSkeletons() { return Collections.unmodifiableList(all); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/graphic/000077500000000000000000000000001312650303100243755ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/graphic/Foo1.java000066400000000000000000000046451312650303100260550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector2.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.hector2.layering.Layer; import net.sourceforge.plantuml.svek.DotDataImageBuilder; import net.sourceforge.plantuml.svek.IEntityImage; public class Foo1 { public static Dimension2D getMaxCellDimension(StringBounder stringBounder, Layer layer, CucaDiagram diagram) { Dimension2D result = new Dimension2DDouble(0, 0); for (IEntity ent : layer.entities()) { final IEntityImage image = computeImage((ILeaf) ent, diagram); final Dimension2D dim = image.calculateDimension(stringBounder); result = Dimension2DDouble.max(result, dim); } return result; } private static IEntityImage computeImage(final ILeaf leaf, CucaDiagram diagram) { final IEntityImage image = DotDataImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(), false, diagram, null, null, null, diagram.getLinks()); return image; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/graphic/Foo2.java000066400000000000000000000100641312650303100260460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector2.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.hector2.MinMax; import net.sourceforge.plantuml.hector2.layering.Layer; import net.sourceforge.plantuml.hector2.mpos.Distribution; import net.sourceforge.plantuml.svek.DotDataImageBuilder; import net.sourceforge.plantuml.svek.IEntityImage; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Foo2 extends AbstractTextBlock implements TextBlock { private final Distribution distribution; private final CucaDiagram diagram; public Foo2(Distribution distribution, CucaDiagram diagram) { this.distribution = distribution; this.diagram = diagram; } public Dimension2D getMaxCellDimension(StringBounder stringBounder) { Dimension2D result = new Dimension2DDouble(0, 0); for (Layer layer : distribution.getLayers()) { final Dimension2D dim = Foo1.getMaxCellDimension(stringBounder, layer, diagram); result = Dimension2DDouble.max(result, dim); } return result; } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D cell = getMaxCellDimension(stringBounder); final MinMax longitudes = distribution.getMinMaxLongitudes(); final double width = (longitudes.getDiff() + 2) * cell.getWidth() / 2; final double height = cell.getHeight() * distribution.getNbLayers(); return new Dimension2DDouble(width, height); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D cell = getMaxCellDimension(stringBounder); for (Layer layer : distribution.getLayers()) { drawLayer(ug, layer, cell.getWidth(), cell.getHeight()); ug = ug.apply(new UTranslate(0, cell.getHeight())); } } private void drawLayer(UGraphic ug, Layer layer, double w, double h) { for (IEntity ent : layer.entities()) { final IEntityImage image = computeImage((ILeaf) ent); final int longitude = layer.getLongitude(ent); final Dimension2D dimImage = image.calculateDimension(ug.getStringBounder()); final double diffx = w - dimImage.getWidth(); final double diffy = h - dimImage.getHeight(); image.drawU(ug.apply(new UTranslate(w * longitude / 2 + diffx / 2, diffy / 2))); } } private IEntityImage computeImage(final ILeaf leaf) { final IEntityImage image = DotDataImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(), false, diagram, null, null, null, diagram.getLinks()); return image; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/layering/000077500000000000000000000000001312650303100245725ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/layering/Layer.java000066400000000000000000000063771312650303100265260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector2.layering; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.hector2.MinMax; import net.sourceforge.plantuml.hector2.mpos.MutationLayer; import net.sourceforge.plantuml.hector2.mpos.MutationLayerMove; public class Layer { private final int id; private final Map entities = new HashMap(); public Layer(int id) { this.id = id; } public Layer duplicate() { final Layer result = new Layer(id); result.entities.putAll(this.entities); return result; } public List getPossibleMutations() { final List result = new ArrayList(); for (Map.Entry ent : entities.entrySet()) { final IEntity entity = ent.getKey(); final int longitude = ent.getValue(); if (isLongitudeFree(longitude + 2)) { result.add(new MutationLayerMove(this, entity, longitude + 2)); } if (isLongitudeFree(longitude - 2)) { result.add(new MutationLayerMove(this, entity, longitude - 2)); } } return Collections.unmodifiableList(result); } private boolean isLongitudeFree(int longitude) { return entities.values().contains(longitude) == false; } public void put(IEntity ent, int longitude) { if (entities.containsKey(ent) == false) { throw new IllegalArgumentException(); } this.entities.put(ent, longitude); } public void add(IEntity ent) { final int pos = entities.size() * 2; this.entities.put(ent, pos); } public Collection entities() { return Collections.unmodifiableCollection(entities.keySet()); } public int getLongitude(IEntity ent) { return entities.get(ent); } public MinMax getMinMaxLongitudes() { return MinMax.from(entities.values()); } @Override public String toString() { return "layer " + id + " " + entities; } public final int getId() { return id; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/layering/LayerFactory.java000066400000000000000000000041101312650303100300350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector2.layering; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.hector2.continuity.Skeleton; public class LayerFactory { public List getLayers(Skeleton skeleton) { skeleton = skeleton.removeCycle(); skeleton.computeLayers(); final List result = new ArrayList(); for (IEntity ent : skeleton.entities()) { ensureLayer(result, ent.getHectorLayer()); } for (IEntity ent : skeleton.entities()) { final int layer = ent.getHectorLayer(); result.get(layer).add(ent); } return Collections.unmodifiableList(result); } private void ensureLayer(List result, int layerToAdd) { while (result.size() <= layerToAdd) { result.add(new Layer(result.size())); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/mpos/000077500000000000000000000000001312650303100237365ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/mpos/Distribution.java000066400000000000000000000063431312650303100272660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector2.mpos; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.hector2.MinMax; import net.sourceforge.plantuml.hector2.layering.Layer; public class Distribution { private final List layers; public Distribution(List layers) { this.layers = new ArrayList(layers); } public Distribution mute(MutationLayer mutation) { final Distribution result = new Distribution(this.layers); final int idx = result.layers.indexOf(mutation.getOriginal()); if (idx == -1) { throw new IllegalArgumentException(); } result.layers.set(idx, mutation.mute()); return result; } public double cost(Collection links) { double result = 0; for (Link link : links) { result += getLength(link); } return result; } private double getLength(Link link) { final IEntity ent1 = link.getEntity1(); final IEntity ent2 = link.getEntity2(); final int y1 = ent1.getHectorLayer(); final int x1 = layers.get(y1).getLongitude(ent1); final int y2 = ent2.getHectorLayer(); final int x2 = layers.get(y2).getLongitude(ent2); final int dx = x2 - x1; final int dy = y2 - y1; return Math.sqrt(dx * dx + dy * dy); } public List getPossibleMutations() { final List result = new ArrayList(); for (Layer layer : layers) { result.addAll(layer.getPossibleMutations()); } return Collections.unmodifiableList(result); } public final List getLayers() { return Collections.unmodifiableList(layers); } public MinMax getMinMaxLongitudes() { MinMax result = null; for (Layer layer : layers) { if (result == null) { result = layer.getMinMaxLongitudes(); } else { result = result.add(layer.getMinMaxLongitudes()); } } return result; } public double getNbLayers() { return layers.size(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/mpos/MutationLayer.java000066400000000000000000000026451312650303100274050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector2.mpos; import net.sourceforge.plantuml.hector2.layering.Layer; public interface MutationLayer { public Layer getOriginal(); public Layer mute(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/hector2/mpos/MutationLayerMove.java000066400000000000000000000037341312650303100302340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector2.mpos; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.hector2.layering.Layer; public class MutationLayerMove implements MutationLayer { private final Layer layer; private final IEntity entity; private final int newLongitude; public MutationLayerMove(Layer layer, IEntity entity, int newLongitude) { this.layer = layer; this.entity = entity; this.newLongitude = newLongitude; } public Layer mute() { final Layer result = layer.duplicate(); result.put(entity, newLongitude); return result; } public Layer getOriginal() { return layer; } @Override public String toString() { return "{" + layer.getId() + "} " + entity + " moveto " + newLongitude; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/html/000077500000000000000000000000001312650303100223565ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/html/CucaDiagramHtmlMaker.java000066400000000000000000000154611312650303100271750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.html; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.FileImageData; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.Member; import net.sourceforge.plantuml.cucadiagram.Stereotype; public final class CucaDiagramHtmlMaker { private final CucaDiagram diagram; private final File dir; public CucaDiagramHtmlMaker(CucaDiagram diagram, File dir) { this.diagram = diagram; this.dir = dir; } public List create() throws IOException { dir.mkdirs(); if (dir.exists() == false) { throw new IOException("Cannot create " + dir); } final File f = new File(dir, "index.html"); final PrintWriter pw = new PrintWriter(f); pw.println(""); printAllType(pw, LeafType.ENUM); printAllType(pw, LeafType.INTERFACE); printAllType(pw, LeafType.ANNOTATION); printAllType(pw, LeafType.ABSTRACT_CLASS); printAllType(pw, LeafType.CLASS); htmlClose(pw); return Arrays.asList(new FileImageData(dir, null)); } private void printAllType(final PrintWriter pw, LeafType type) throws IOException { if (hasSome(type)) { pw.println("

    " + type.toHtml() + "

    "); for (final IEntity ent : diagram.getLeafsvalues()) { if (ent.getLeafType() != type) { continue; } export(ent); pw.println("
  • "); pw.println(LinkHtmlPrinter.htmlLink(ent)); pw.println("
  • "); } // for (Map.Entry ent : new TreeMap(diagram.getLeafs()).entrySet()) { // if (ent.getValue().getEntityType() != type) { // continue; // } // export(ent.getValue()); // pw.println("
  • "); // pw.println(LinkHtmlPrinter.htmlLink(ent.getValue())); // pw.println("
  • "); // } } } private boolean hasSome(final LeafType type) { for (IEntity ent : diagram.getLeafsvalues()) { if (ent.getLeafType() == type) { return true; } } return false; } private void export(IEntity entity) throws IOException { final File f = new File(dir, LinkHtmlPrinter.urlOf(entity)); final PrintWriter pw = new PrintWriter(f); pw.println(""); pw.println("" + StringUtils.unicodeForHtml(entity.getCode().getFullName()) + ""); pw.println("

    " + entity.getLeafType().toHtml() + "

    "); for (CharSequence s : entity.getDisplay()) { pw.println(StringUtils.unicodeForHtml(s.toString())); pw.println("
    "); } final Stereotype stereotype = entity.getStereotype(); if (stereotype != null) { pw.println("
    "); pw.println("

    Stereotype

    "); for (String s : stereotype.getLabels(diagram.getSkinParam().useGuillemet())) { pw.println(s); pw.println("
    "); } } pw.println("
    "); if (entity.getBodier().getFieldsToDisplay().size() == 0) { pw.println("

    No fields

    "); } else { pw.println("

    Fields:

    "); pw.println("
      "); for (Member m : entity.getBodier().getFieldsToDisplay()) { pw.println("
    • "); pw.println(StringUtils.unicodeForHtml(m.getDisplay(true))); pw.println("
    • "); } pw.println("
    "); } pw.println("
    "); if (entity.getBodier().getMethodsToDisplay().size() == 0) { pw.println("

    No methods

    "); } else { pw.println("

    Methods:

    "); pw.println("
      "); for (Member m : entity.getBodier().getMethodsToDisplay()) { pw.println("
    • "); pw.println(StringUtils.unicodeForHtml(m.getDisplay(true))); pw.println("
    • "); } pw.println("
    "); } pw.println("
    "); final Collection links = getLinksButNotes(entity); if (links.size() == 0) { pw.println("

    No links

    "); } else { pw.println("

    Links:

    "); pw.println("
      "); for (Link l : links) { pw.println("
    • "); new LinkHtmlPrinter(l, entity).printLink(pw); pw.println("
    • "); } pw.println("
    "); } final Collection notes = getNotes(entity); if (notes.size() > 0) { pw.println("
    "); pw.println("

    Notes:

    "); pw.println("
      "); for (IEntity note : notes) { pw.println("
    • "); for (CharSequence s : note.getDisplay()) { pw.println(StringUtils.unicodeForHtml(s.toString())); pw.println("
      "); } pw.println("
    • "); } pw.println("
    "); } htmlClose(pw); } private void htmlClose(final PrintWriter pw) { pw.println("
    "); pw.println("
    Back to index"); pw.println(""); pw.close(); } private Collection getNotes(IEntity ent) { final List result = new ArrayList(); for (Link link : diagram.getLinks()) { if (link.contains(ent) == false) { continue; } if (link.getEntity1().getLeafType() == LeafType.NOTE || link.getEntity2().getLeafType() == LeafType.NOTE) { result.add(link.getOther(ent)); } } return Collections.unmodifiableList(result); } private Collection getLinksButNotes(IEntity ent) { final List result = new ArrayList(); for (Link link : diagram.getLinks()) { if (link.contains(ent) == false) { continue; } if (link.getEntity1().getLeafType() == LeafType.NOTE || link.getEntity2().getLeafType() == LeafType.NOTE) { continue; } result.add(link); } return Collections.unmodifiableList(result); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/html/LinkHtmlPrinter.java000066400000000000000000000134621312650303100263150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.html; import java.io.PrintWriter; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; public final class LinkHtmlPrinter { private final Link link; // private final Entity entity; private final boolean chiral; public LinkHtmlPrinter(Link link, IEntity entity) { this.link = link; if (link.getEntity1() == entity) { this.chiral = false; } else if (link.getEntity2() == entity) { this.chiral = true; } else { throw new IllegalArgumentException(); } } void printLink(PrintWriter pw) { final String ent1h; final String ent2h; if (chiral) { ent1h = htmlLink(link.getEntity1()); ent2h = "" + StringUtils.unicodeForHtml(link.getEntity2().getCode().getFullName()) + ""; } else { ent1h = "" + StringUtils.unicodeForHtml(link.getEntity1().getCode().getFullName()) + ""; ent2h = htmlLink(link.getEntity2()); } String label = link.getLabel() == null ? null : StringUtils.unicodeForHtml(link.getLabel()); String ent1 = ent1h; String ent2 = ent2h; if (link.getQualifier1() != null) { ent1 = ent1 + " (" + link.getQualifier1() + ")"; if (label != null) { label = "(" + link.getQualifier1() + " " + ent1h + ") " + label; } } if (link.getQualifier2() != null) { ent2 = ent2 + " (" + link.getQualifier2() + ")"; if (label != null) { label = label + " (" + link.getQualifier2() + " " + ent2h + ")"; } } if (chiral) { pw.println(getHtmlChiral(ent1, ent2)); } else { pw.println(getHtml(ent1, ent2)); } if (label != null) { pw.println(" : "); pw.println(label); } } private String getHtml(String ent1, String ent2) { final LinkDecor decor1 = link.getType().getDecor1(); final LinkDecor decor2 = link.getType().getDecor2(); if (decor1 == LinkDecor.NONE && decor2 == LinkDecor.NONE) { return ent1 + " is linked to " + ent2; } if (decor1 == LinkDecor.NONE && decor2 == LinkDecor.EXTENDS) { return ent1 + " is extended by " + ent2; } if (decor1 == LinkDecor.EXTENDS && decor2 == LinkDecor.NONE) { return ent1 + " extends " + ent2; } if (decor2 == LinkDecor.AGREGATION) { return ent1 + " is aggregated by " + ent2; } if (decor1 == LinkDecor.AGREGATION) { return ent1 + " aggregates " + ent2; } if (decor2 == LinkDecor.COMPOSITION) { return ent1 + " is composed by " + ent2; } if (decor1 == LinkDecor.COMPOSITION) { return ent1 + " composes " + ent2; } if (decor1 == LinkDecor.NONE && decor2 == LinkDecor.ARROW) { return ent1 + " is navigable from " + ent2; } if (decor1 == LinkDecor.ARROW && decor2 == LinkDecor.NONE) { return ent1 + " navigates to " + ent2; } return ent1 + " " + decor1 + "-" + decor2 + " " + ent2; } private String getHtmlChiral(String ent1, String ent2) { final LinkDecor decor1 = link.getType().getDecor1(); final LinkDecor decor2 = link.getType().getDecor2(); if (decor1 == LinkDecor.NONE && decor2 == LinkDecor.NONE) { return ent2 + " is linked to " + ent1; } if (decor1 == LinkDecor.NONE && decor2 == LinkDecor.EXTENDS) { return ent2 + " extends " + ent1; } if (decor1 == LinkDecor.EXTENDS && decor2 == LinkDecor.NONE) { return ent2 + " is extended by " + ent1; } if (decor2 == LinkDecor.AGREGATION) { return ent2 + " aggregates " + ent1; } if (decor1 == LinkDecor.AGREGATION) { return ent2 + " is aggregated by " + ent1; } if (decor2 == LinkDecor.COMPOSITION) { return ent2 + " composes " + ent1; } if (decor1 == LinkDecor.COMPOSITION) { return ent2 + " is composed by " + ent1; } if (decor1 == LinkDecor.NONE && decor2 == LinkDecor.ARROW) { return ent2 + " navigates to " + ent1; } if (decor1 == LinkDecor.ARROW && decor2 == LinkDecor.NONE) { return ent2 + " is navigable from " + ent1; } return ent1 + " " + decor1 + "-" + decor2 + " " + ent2; } static String htmlLink(IEntity ent) { final StringBuilder sb = new StringBuilder(); sb.append(""); sb.append(StringUtils.unicodeForHtml(ent.getCode().getFullName())); sb.append(""); return sb.toString(); } static String urlOf(IEntity ent) { if (ent.getLeafType() == LeafType.NOTE) { throw new IllegalArgumentException(); } if (ent.getCode().getFullName().matches("[-\\w_ .]+")) { return StringUtils.unicodeForHtml(ent.getCode().getFullName()) + ".html"; } return StringUtils.unicodeForHtml(ent.getUid()) + ".html"; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/jasic/000077500000000000000000000000001312650303100225035ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/jasic/Jasic.java000066400000000000000000001006231312650303100244010ustar00rootroot00000000000000package net.sourceforge.plantuml.jasic; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * This defines a single class that contains an entire interpreter for a * language very similar to the original BASIC. Everything is here (albeit in * very simplified form): tokenizing, parsing, and interpretation. The file is * organized in phases, with each appearing roughly in the order that they * occur when a program is run. You should be able to read this top-down to walk * through the entire process of loading and running a program. * * Jasic language syntax * --------------------- * * Comments start with ' and proceed to the end of the line: * * print "hi there" ' this is a comment * * Numbers and strings are supported. Strings should be in "double quotes", and * only positive integers can be parsed (though numbers are double internally). * * Variables are identified by name which must start with a letter and can * contain letters or numbers. Case is significant for names and keywords. * * Each statement is on its own line. Optionally, a line may have a label before * the statement. A label is a name that ends with a colon: * * foo: * * * The following statements are supported: * * = * Evaluates the expression and assigns the result to the given named * variable. All variables are globally scoped. * * pi = (314159 / 10000) * * print * Evaluates the expression and prints the result. * * print "hello, " + "world" * * input * Reads in a line of input from the user and stores it in the variable with * the given name. * * input guess * * goto

    "); printTableHtml(result, stats.getAllByFormat()); result.append(""); return result.toString(); } private void printTableHtml(StringBuilder result, StatsTable table) { final Collection headers = table.getColumnHeaders(); result.append(""); result.append(getHtmlHeader(headers)); final List lines = table.getLines(); for (int i = 0; i < lines.size(); i++) { final StatsLine line = lines.get(i); final boolean bold = i == lines.size() - 1; result.append(getCreoleLine(headers, line, bold)); } result.append("
    "); } private String getCreoleLine(Collection headers, StatsLine line, boolean bold) { final StringBuilder result = new StringBuilder(); if (bold) { result.append(""); } else { result.append(""); } for (StatsColumn col : headers) { final Object v = line.getValue(col); if (v instanceof Long || v instanceof HumanDuration) { result.append(""); } else { result.append(""); } if (bold) { result.append(""); } if (v instanceof Long) { result.append(String.format("%,d", v)); } else if (v instanceof Date) { result.append(formatter.format(v)); } else if (v == null || v.toString().length() == 0) { result.append(" "); } else { result.append(v.toString()); } if (bold) { result.append(""); } result.append(""); } result.append(""); return result.toString(); } private String getHtmlHeader(Collection headers) { final StringBuilder sb = new StringBuilder(); sb.append(""); for (StatsColumn col : headers) { sb.append(""); sb.append(col.getTitle().replace(BackSlash.BS_BS_N, "
    ")); sb.append("
    "); } sb.append(""); return sb.toString(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/stats/api/000077500000000000000000000000001312650303100233215ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/stats/api/Stats.java000066400000000000000000000030121312650303100252560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.stats.api; public interface Stats { public StatsTable getLastSessions(); public StatsTable getCurrentSessionByDiagramType(); public StatsTable getCurrentSessionByFormat(); public StatsTable getAllByDiagramType(); public StatsTable getAllByFormat(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/stats/api/StatsColumn.java000066400000000000000000000037321312650303100264450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.stats.api; public enum StatsColumn { SESSION_ID("Session ID"), DIAGRAM_TYPE("Diagram type"), FORMAT("Format"), VERSION("Version"), STARTING("Starting"), LAST( "Last"), DURATION_STRING("Duration"), PARSED_COUNT("# Parsed"), PARSED_MEAN_TIME( "Mean parsing\\ntime (ms)"), PARSED_STANDARD_DEVIATION("Standard\\ndeviation (ms)"), PARSED_MAX_TIME( "Max parsing\\ntime (ms)"), GENERATED_COUNT("# Generated"), GENERATED_MEAN_TIME( "Mean generation\\ntime (ms)"), GENERATED_STANDARD_DEVIATION("Standard\\ndeviation (ms)"), GENERATED_MAX_TIME( "Max generation\\ntime (ms)"); private final String title; private StatsColumn(String title) { this.title = title; } public String getTitle() { return title; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/stats/api/StatsLine.java000066400000000000000000000026601312650303100260760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.stats.api; import java.util.Collection; public interface StatsLine { public Collection getColumnHeaders(); public Object getValue(StatsColumn column); } plantuml-1.2017.15/src/net/sourceforge/plantuml/stats/api/StatsTable.java000066400000000000000000000027321312650303100262360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.stats.api; import java.util.Collection; import java.util.List; public interface StatsTable { public String getName(); public Collection getColumnHeaders(); public List getLines(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/sudoku/000077500000000000000000000000001312650303100227245ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/sudoku/DLXEngine.java000066400000000000000000000570571312650303100253620ustar00rootroot00000000000000/**************************************************************************** * DLXEngine.java * * Created on den 30 december 2005, 01:04 * * DLXEngine * Sudoku puzzle generator and solver based on the suexg and suexk by * Gunter Stertenbrink. Suexg and suexk are C implementations of the * Dancing Links algorithm by Donald Knuth and optimized for performance * which means that certain cleanup work has been done. There is still * lots of these activities left to do, however, the code is nasty and * hard to read - but extremely efficient. * * The code is public domain so feel free to use it. *****************************************************************************/ package net.sourceforge.plantuml.sudoku; import java.io.FileOutputStream; import java.io.IOException; import java.util.Random; /******************************************************************************* * dlx_solver solve any Sudoku in a fraction of a second. Input is a string of * dots and digits representing the puzzle to solve and output is the solved * puzzle. * * @author Rolf Sandberg ******************************************************************************/ class dlx_solver { static final int M = 8; // change this for larger grids. Use symbols as in // L[] below static final int M2 = M * M; static final int M4 = M2 * M2; /** Pseudo-random number generator */ long MWC() { return random.nextLong(); } int A0[][] = new int[M2 + 9][M2 + 9], A[][] = new int[M2 + 9][M2 + 9], Rows[] = new int[4 * M4 + 9], Cols[] = new int[M2 * M4 + 9], Row[][] = new int[4 * M4 + 9][M2 + 9]; int Col[][] = new int[M2 * M4 + 9][5], Ur[] = new int[M2 * M4 + 9], Uc[] = new int[4 * M4 + 9], V[] = new int[M2 * M4 + 9]; int C[] = new int[M4 + 9], I[] = new int[M4 + 9], T[] = new int[M2 * M4 + 9], P[] = new int[M2 * M4 + 9]; int Mr[] = { 0, 1, 63, 1023, 4095, 16383, 46655, 131071, 262143 }; int Mc[] = { 0, 1, 63, 511, 1023, 4095, 8191, 16383, 16383 }; int Mw[] = { 0, 1, 3, 15, 15, 31, 63, 63, 63 }; int nocheck = 0, max, _try_; final int rnd = 0; int min, clues, gu, tries; long Node[] = new long[M4 + 9]; long nodes, tnodes, solutions, vmax, smax, time0, time1, t1, x1; double xx, yy; int q, a, p, i, i1, j, k, l, r, r1, c, c1, c2, n, N = 0, N2, N4, m, m0, m1, x, y, s; char L[] = { '.', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '#', '*', '~' }; /** State machine states */ static final int M6 = 10; static final int M7 = 11; static final int RESTART = 12; static final int M22 = 13; static final int M3 = 14; static final int M44 = 15; static final int NEXT_TRY = 16; static final int END = 30; /** * Solver function. Input parameter: A puzzle to solve Output: The solved * puzzle */ String solve(String puzzle) { String result = new String(); int STATE = M6; vmax = 4000000; smax = 25; p = 1; q = 0; if (q > 0) { vmax = 99999999; smax = 99999999; } N = 3; N2 = N * N; N4 = N2 * N2; m = 4 * N4; n = N2 * N4; if (puzzle.length() < N4) { return "Error, puzzle incomplete"; } while (STATE != END) { switch (STATE) { case M6: clues = 0; i = 0; for (x = 0; x < N2; x++) for (y = 0; y < N2; y++) { c = puzzle.charAt(x * N2 + y); j = 0; if (c == '-' || c == '.' || c == '0' || c == '*') { A0[x][y] = j; i++; } else { while (L[j] != c && j <= N2) j++; if (j <= N2) { A0[x][y] = j; if (j > 0) clues++; i++; } } } if (clues == N4) { clues--; A0[1][1] = 0; } if (p < 8) { for (i = 0; i <= N4; i++) Node[i] = 0; } tnodes = 0; case RESTART: r = 0; for (x = 1; x <= N2; x++) for (y = 1; y <= N2; y++) for (s = 1; s <= N2; s++) { r++; Cols[r] = 4; Col[r][1] = x * N2 - N2 + y; Col[r][4] = (N * ((x - 1) / N) + (y - 1) / N) * N2 + s + N4; Col[r][3] = x * N2 - N2 + s + N4 * 2; Col[r][2] = y * N2 - N2 + s + N4 * 3; } for (c = 1; c <= m; c++) Rows[c] = 0; for (r = 1; r <= n; r++) for (c = 1; c <= Cols[r]; c++) { x = Col[r][c]; Rows[x]++; Row[x][Rows[x]] = r; } for (x = 0; x < N2; x++) for (y = 0; y < N2; y++) A[x][y] = A0[x][y]; for (i = 0; i <= n; i++) Ur[i] = 0; for (i = 0; i <= m; i++) Uc[i] = 0; solutions = 0; for (x = 1; x <= N2; x++) for (y = 1; y <= N2; y++) if (A[x - 1][y - 1] > 0) { r = x * N4 - N4 + y * N2 - N2 + A[x - 1][y - 1]; for (j = 1; j <= Cols[r]; j++) { c1 = Col[r][j]; if (Uc[c1] > 0 && nocheck == 0) { STATE = NEXT_TRY; break; } Uc[c1]++; for (k = 1; k <= Rows[c1]; k++) { r1 = Row[c1][k]; Ur[r1]++; } } if (STATE == NEXT_TRY) break; } if (STATE == NEXT_TRY) break; if (rnd > 0 && rnd != 17 && rnd != 18) shuffle(); for (c = 1; c <= m; c++) { V[c] = 0; for (r = 1; r <= Rows[c]; r++) if (Ur[Row[c][r]] == 0) V[c]++; } i = clues; nodes = 0; m0 = 0; m1 = 0; gu = 0; solutions = 0; case M22: i++; I[i] = 0; min = n + 1; if (i > N4 || m0 > 0) { STATE = M44; break; } if (m1 > 0) { C[i] = m1; STATE = M3; break; } for (c = 1; c <= m; c++) if (Uc[c] == 0) { if (V[c] <= min) c1 = c; if (V[c] < min) { min = V[c]; C[i] = c; if (min < 2) { STATE = M3; break; } } } if (STATE == M3) break; gu++; if (min > 2) { STATE = M3; break; } if ((rnd & 255) == 18) if ((nodes & 1) > 0) { c = m + 1; c--; while (Uc[c] > 0 || V[c] != 2) c--; C[i] = c; } if ((rnd & 255) == 17) { c1 = (int) (MWC() & Mc[N]); while (c1 >= m) c1 = (int) (MWC() & Mc[N]); c1++; for (c = c1; c <= m; c++) if (Uc[c] == 0) if (V[c] == 2) { C[i] = c; STATE = M3; break; } for (c = 1; c < c1; c++) if (Uc[c] == 0) if (V[c] == 2) { C[i] = c; STATE = M3; break; } } case M3: c = C[i]; I[i]++; if (I[i] > Rows[c]) { STATE = M44; break; } r = Row[c][I[i]]; if (Ur[r] > 0) { STATE = M3; break; } m0 = 0; m1 = 0; if (q > 0 && i > 32 && i < 65) if ((MWC() & 127) < q) { STATE = M3; break; } k = N4; x = (r - 1) / k + 1; y = ((r - 1) % k) / j + 1; s = (r - 1) % j + 1; if ((p & 1) > 0) { j = N2; k = N4; x = (r - 1) / k + 1; y = ((r - 1) % k) / j + 1; s = (r - 1) % j + 1; A[x - 1][y - 1] = s; if (i == k) { for (x = 0; x < j; x++) for (y = 0; y < j; y++) result = result.concat(String.valueOf(L[A[x][y]])); result = result.concat(" #\n"); } } for (j = 1; j <= Cols[r]; j++) { c1 = Col[r][j]; Uc[c1]++; } for (j = 1; j <= Cols[r]; j++) { c1 = Col[r][j]; for (k = 1; k <= Rows[c1]; k++) { r1 = Row[c1][k]; Ur[r1]++; if (Ur[r1] == 1) for (l = 1; l <= Cols[r1]; l++) { c2 = Col[r1][l]; V[c2]--; if (Uc[c2] + V[c2] < 1) m0 = c2; if (Uc[c2] == 0 && V[c2] < 2) m1 = c2; } } } Node[i]++; tnodes++; nodes++; if (rnd > 99 && nodes > rnd) { STATE = RESTART; break; } if (i == N4) solutions++; if (solutions >= smax) { System.out.println("smax xolutions found"); if (_try_ == 1) System.out.print("+"); STATE = NEXT_TRY; break; } if (tnodes > vmax) { if (_try_ == 1) System.out.print("-"); STATE = NEXT_TRY; break; } STATE = M22; break; case M44: i--; c = C[i]; r = Row[c][I[i]]; if (i == clues) { STATE = NEXT_TRY; break; } for (j = 1; j <= Cols[r]; j++) { c1 = Col[r][j]; Uc[c1]--; for (k = 1; k <= Rows[c1]; k++) { r1 = Row[c1][k]; Ur[r1]--; if (Ur[r1] == 0) for (l = 1; l <= Cols[r1]; l++) { c2 = Col[r1][l]; V[c2]++; } } } if (p > 0) { j = N2; k = N4; x = (r - 1) / k + 1; y = ((r - 1) % k) / j + 1; s = (r - 1) % j + 1; A[x - 1][y - 1] = 0; } if (i > clues) { STATE = M3; break; } case NEXT_TRY: time1 = System.currentTimeMillis(); x1 = time1 - time0; time0 = time1; if (q > 0) { xx = 128; yy = 128 - q; xx = xx / yy; yy = solutions; for (i = 1; i < 33; i++) yy = yy * xx; System.out.println("clues: " + clues + " estimated solutions:" + yy + " time " + x1 + "ms"); STATE = END; break; } if ((p == 0 || p == 1) && tnodes <= 999999) { if (solutions >= smax) result = result.concat("More than " + solutions + " solutions ( bad sudoku!! ), rating " + (100 * tnodes / solutions) + ", time " + x1 + " ms"); else if (solutions == 1) result = result.concat(solutions + " solution, rating " + (100 * tnodes) + ", time " + x1 + " ms"); else if (solutions == 0) result = result.concat("0 solutions, no rating possible, time " + x1 + " ms"); else result = result.concat(solutions + " solutions ( bad sudoku!! ), rating " + (100 * tnodes / solutions) + ", time " + x1 + " ms"); STATE = END; break; } if (p == 6) { System.out.println(solutions); STATE = END; break; } if (p == 0 || p == 1) { System.out.println(solutions + " solution(s), rating " + (100 * tnodes) + ", time " + x1 + "ms"); } if (p > 5) { x = 0; for (i = 1; i <= N4; i++) { x += Node[i]; System.out.print(Node[i]); if (i % 9 == 0) System.out.println(); } System.out.println(x); } STATE = END; break; } // end of switch statement } // end of while loop return result; } /** * Helper function. */ int shuffle() { for (i = 1; i <= m; i++) { a = (int) ((MWC() >> 8) & Mc[N]); while (a >= i) a = (int) ((MWC() >> 8) & Mc[N]); a++; P[i] = P[a]; P[a] = i; } for (c = 1; c <= m; c++) { Rows[c] = 0; T[c] = Uc[c]; } for (c = 1; c <= m; c++) Uc[P[c]] = T[c]; for (r = 1; r <= n; r++) for (i = 1; i <= Cols[r]; i++) { c = P[Col[r][i]]; Col[r][i] = c; Rows[c]++; Row[c][Rows[c]] = r; } for (i = 1; i <= n; i++) { a = (int) ((MWC() >> 8) & Mr[N]); while (a >= i) a = (int) ((MWC() >> 8) & Mr[N]); a++; P[i] = P[a]; P[a] = i; } for (r = 1; r <= n; r++) { Cols[r] = 0; T[r] = Ur[r]; } for (r = 1; r <= n; r++) Ur[P[r]] = T[r]; for (c = 1; c <= m; c++) for (i = 1; i <= Rows[c]; i++) { r = P[Row[c][i]]; Row[c][i] = r; Cols[r]++; Col[r][Cols[r]] = c; } for (r = 1; r <= n; r++) { for (i = 1; i <= Cols[r]; i++) { a = (int) ((MWC() >> 8) & 7); while (a >= i) a = (int) ((MWC() >> 8) & 7); a++; P[i] = P[a]; P[a] = i; } for (i = 1; i <= Cols[r]; i++) T[i] = Col[r][P[i]]; for (i = 1; i <= Cols[r]; i++) Col[r][i] = T[i]; } for (c = 1; c <= m; c++) { for (i = 1; i <= Rows[c]; i++) { a = (int) ((MWC() >> 8) & Mw[N]); while (a >= i) a = (int) ((MWC() >> 8) & Mw[N]); a++; P[i] = P[a]; P[a] = i; } for (i = 1; i <= Rows[c]; i++) T[i] = Row[c][P[i]]; for (i = 1; i <= Rows[c]; i++) Row[c][i] = T[i]; } return 0; } private final Random random; /** Creates a new instance of dlx_solver */ public dlx_solver(Random random) { this.random = random; } } /******************************************************************************* * dlx_generator generate single solution locally minimized Sudoku puzzles. * Locally minimized means that all keys that can be removed without creating a * degenerate Sudoku (multiple solutions) are removed. ******************************************************************************/ class dlx_generator { long MWC() { return random.nextLong(); } int Rows[] = new int[325], Cols[] = new int[730], Row[][] = new int[325][10], Col[][] = new int[730][5], Ur[] = new int[730], Uc[] = new int[325], V[] = new int[325], W[] = new int[325]; int P[] = new int[88], A[] = new int[88], C[] = new int[88], I[] = new int[88], Two[] = new int[888]; char B[] = { '0', '1', '1', '1', '2', '2', '2', '3', '3', '3', '1', '1', '1', '2', '2', '2', '3', '3', '3', '1', '1', '1', '2', '2', '2', '3', '3', '3', '4', '4', '4', '5', '5', '5', '6', '6', '6', '4', '4', '4', '5', '5', '5', '6', '6', '6', '4', '4', '4', '5', '5', '5', '6', '6', '6', '7', '7', '7', '8', '8', '8', '9', '9', '9', '7', '7', '7', '8', '8', '8', '9', '9', '9', '7', '7', '7', '8', '8', '8', '9', '9', '9' }; char H[][] = new char[326][7]; long c2, w; int b, f, s1, m0, c1, r1, l, i1, m1, m2, a, p, i, j, k, r, c, d, n = 729, m = 324, x, y, s, z, fi; int mi1, mi2, q7, part, nt, rate, nodes, solutions, min, samples, sam1, clues; char L[] = { '.', '1', '2', '3', '4', '5', '6', '7', '8', '9' }; /** State machine states */ static final int M0S = 10; static final int M0 = 11; static final int MR1 = 12; static final int MR3 = 13; static final int MR4 = 14; static final int M2 = 15; static final int M3 = 16; static final int M4 = 17; static final int M9 = 18; static final int MR = 19; static final int END = 20; static final int M6 = 21; /** Set to true to generate debug output */ boolean DBG = false; /** Output trace messages */ void dbg(String s) { if (DBG) System.out.println(s); } private final Random random; public dlx_generator(Random random) { dbg("In constructor"); this.random = random; } /** * Save the generated Sudoku to a file. */ void saveSudokuToFile(String s) { FileOutputStream FO = null; byte[] buffer = new byte[s.length() + 1]; int i = 0; while (i < s.length()) { buffer[i] = (byte) s.charAt(i); i++; } try { FO = new FileOutputStream("generated_sudoku.sdk"); FO.write(buffer); FO.close(); } catch (IOException IOE) { // Well, well, well.... return; } } /** * Initialization code for both generate() and rate() */ void initialize() { for (i = 0; i < 888; i++) { j = 1; while (j <= i) j += j; Two[i] = j - 1; } r = 0; for (x = 1; x <= 9; x++) for (y = 1; y <= 9; y++) for (s = 1; s <= 9; s++) { r++; Cols[r] = 4; Col[r][1] = x * 9 - 9 + y; Col[r][2] = (B[x * 9 - 9 + y] - 48) * 9 - 9 + s + 81; Col[r][3] = x * 9 - 9 + s + 81 * 2; Col[r][4] = y * 9 - 9 + s + 81 * 3; } for (c = 1; c <= m; c++) Rows[c] = 0; for (r = 1; r <= n; r++) for (c = 1; c <= Cols[r]; c++) { a = Col[r][c]; Rows[a]++; Row[a][Rows[a]] = r; } c = 0; for (x = 1; x <= 9; x++) for (y = 1; y <= 9; y++) { c++; H[c][0] = 'r'; H[c][1] = L[x]; H[c][2] = 'c'; H[c][3] = L[y]; H[c][4] = 0; } c = 81; for (b = 1; b <= 9; b++) for (s = 1; s <= 9; s++) { c++; H[c][0] = 'b'; H[c][1] = L[b]; H[c][2] = 's'; H[c][3] = L[s]; H[c][4] = 0; } c = 81 * 2; for (x = 1; x <= 9; x++) for (s = 1; s <= 9; s++) { c++; H[c][0] = 'r'; H[c][1] = L[x]; H[c][2] = 's'; H[c][3] = L[s]; H[c][4] = 0; } c = 81 * 3; for (y = 1; y <= 9; y++) for (s = 1; s <= 9; s++) { c++; H[c][0] = 'c'; H[c][1] = L[y]; H[c][2] = 's'; H[c][3] = L[s]; H[c][4] = 0; } } /* * Rating function */ public long rate(String puzzle) { int STATE = M6; int Solutions; z = 100; fi = 0; rate = 1; for (i = 0; i < 88; i++) A[i] = 0; initialize(); while (STATE != END) { switch (STATE) { case M6: clues = 0; for (i = 1; i <= 81; i++) { c = puzzle.charAt(i - 1); j = 0; if (c == '-' || c == '.' || c == '0' || c == '*') { A[i] = j; } else { while (L[j] != c && j <= 9) j++; if (j <= 9) { A[i] = j; } } } if (clues == 81) { clues--; A[1] = 0; } nt = 0; mi1 = 9999; for (f = 0; f < z; f++) { Solutions = solve(); if (Solutions != 1) { if (Solutions > 1) nt = -1 * Solutions; STATE = END; break; } nt += nodes; if (nodes < mi1) { mi1 = nodes; mi2 = C[clues]; } } if (STATE == END) break; if (fi > 0) if ((nt / z) > fi) { for (i = 1; i <= 81; i++) System.out.println(L[A[i]]); System.out.println(); STATE = M6; break; } if (fi > 0) { STATE = M6; break; } if ((z & 1) > 0) { System.out.println(nt / z); STATE = M6; break; } if (rate > 1) System.out.println("hint: " + H[mi2]); STATE = END; break; } // End of switch statement } // End of while loop return (nt); } public String[] generate(int Samples, int Rate) { int STATE = M0S; String result[] = new String[Samples]; dbg("Entering generate"); samples = 1000; if (Samples > 0) samples = Samples; for (i = 0; i < samples; i++) result[i] = new String(); // Set to 1 for rating, set to 2 for rating and hint rate = 0; if (Rate > 0) rate = Rate; if (rate > 2) rate = 2; initialize(); dbg("Entering state machine"); sam1 = -1; while (STATE != END) { switch (STATE) { case M0S: sam1++; if (sam1 >= samples) { STATE = END; break; } case M0: for (i = 1; i <= 81; i++) A[i] = 0; part = 0; q7 = 0; case MR1: i1 = (int) ((MWC() >> 8) & 127); if (i1 > 80) { STATE = MR1; break; } i1++; if (A[i1] > 0) { STATE = MR1; break; } case MR3: s = (int) ((MWC() >> 9) & 15); if (s > 8) { STATE = MR3; break; } s++; A[i1] = s; m2 = solve(); q7++; if (m2 < 1) A[i1] = 0; if (m2 != 1) { STATE = MR1; break; } part++; if (solve() != 1) { STATE = M0; break; } case MR4: for (i = 1; i <= 81; i++) { x = (int) ((MWC() >> 8) & 127); while (x >= i) { x = (int) ((MWC() >> 8) & 127); } x++; P[i] = P[x]; P[x] = i; } for (i1 = 1; i1 <= 81; i1++) { s1 = A[P[i1]]; A[P[i1]] = 0; if (solve() > 1) A[P[i1]] = s1; } if (rate > 0) { nt = 0; mi1 = 9999; for (f = 0; f < 100; f++) { solve(); nt += nodes; if (nodes < mi1) { mi1 = nodes; mi2 = C[clues]; } } result[sam1] = result[sam1].concat("Rating:" + nt + "# "); if (rate > 1) { result[sam1] = result[sam1].concat("hint: " + String.valueOf(H[mi2]).substring(0, 4) + " #\n"); } else result[sam1] = result[sam1].concat("\n"); } for (i = 1; i <= 81; i++) { result[sam1] = result[sam1].concat(String.valueOf(L[A[i]])); if (i % 9 == 0) { result[sam1] = result[sam1].concat("\n"); } } result[sam1] = result[sam1].concat("\n"); default: dbg("Default case. New state M0S"); STATE = M0S; break; } // end of switch statement } // end of while loop return result; } int solve() {// returns 0 (no solution), 1 (unique sol.), 2 (more than // one sol.) int STATE = M2; for (i = 0; i <= n; i++) Ur[i] = 0; for (i = 0; i <= m; i++) Uc[i] = 0; clues = 0; for (i = 1; i <= 81; i++) if (A[i] > 0) { clues++; r = i * 9 - 9 + A[i]; for (j = 1; j <= Cols[r]; j++) { d = Col[r][j]; if (Uc[d] > 0) return 0; Uc[d]++; for (k = 1; k <= Rows[d]; k++) { Ur[Row[d][k]]++; } } } for (c = 1; c <= m; c++) { V[c] = 0; for (r = 1; r <= Rows[c]; r++) if (Ur[Row[c][r]] == 0) V[c]++; } i = clues; m0 = 0; m1 = 0; solutions = 0; nodes = 0; dbg("Solve: Entering state machine"); while (STATE != END) { switch (STATE) { case M2: i++; I[i] = 0; min = n + 1; if ((i > 81) || (m0 > 0)) { STATE = M4; break; } if (m1 > 0) { C[i] = m1; STATE = M3; break; } w = 0; for (c = 1; c <= m; c++) if (Uc[c] == 0) { if (V[c] < 2) { C[i] = c; STATE = M3; break; } if (V[c] <= min) { w++; W[(int) w] = c; } ; if (V[c] < min) { w = 1; W[(int) w] = c; min = V[c]; } } if (STATE == M3) { // break in for loop detected, continue breaking break; } case MR: c2 = (MWC() & Two[(int) w]); while (c2 >= w) { c2 = (MWC() & Two[(int) w]); } C[i] = W[(int) c2 + 1]; case M3: c = C[i]; I[i]++; if (I[i] > Rows[c]) { STATE = M4; break; } r = Row[c][I[i]]; if (Ur[r] > 0) { STATE = M3; break; } m0 = 0; m1 = 0; nodes++; for (j = 1; j <= Cols[r]; j++) { c1 = Col[r][j]; Uc[c1]++; } for (j = 1; j <= Cols[r]; j++) { c1 = Col[r][j]; for (k = 1; k <= Rows[c1]; k++) { r1 = Row[c1][k]; Ur[r1]++; if (Ur[r1] == 1) for (l = 1; l <= Cols[r1]; l++) { c2 = Col[r1][l]; V[(int) c2]--; if (Uc[(int) c2] + V[(int) c2] < 1) m0 = (int) c2; if (Uc[(int) c2] == 0 && V[(int) c2] < 2) m1 = (int) c2; } } } if (i == 81) solutions++; if (solutions > 1) { STATE = M9; break; } STATE = M2; break; case M4: i--; if (i == clues) { STATE = M9; break; } c = C[i]; r = Row[c][I[i]]; for (j = 1; j <= Cols[r]; j++) { c1 = Col[r][j]; Uc[c1]--; for (k = 1; k <= Rows[c1]; k++) { r1 = Row[c1][k]; Ur[r1]--; if (Ur[r1] == 0) for (l = 1; l <= Cols[r1]; l++) { c2 = Col[r1][l]; V[(int) c2]++; } } } if (i > clues) { STATE = M3; break; } case M9: STATE = END; break; default: STATE = END; break; } // end of switch statement } // end of while statement return solutions; } } /** * * @author Rolf Sandberg */ public class DLXEngine { dlx_generator generator; dlx_solver solver; public DLXEngine(Random random) { generator = new dlx_generator(random); solver = new dlx_solver(random); } String generate(int minrating, int maxrating) { // Date t = new Date(); // long start = t.getTime(); // int tries = 0, i, samples = 5; // long rating = 0; String ss[] = generator.generate(1, 0); return ss[0]; // Generator: // First arg: rand seed // Second arg: #samples, ignored if <= 0 // Third arg: rating and hints, ignored if <= 0 // Task: Find a Sudoku with a rating in a specified interval. // Do it by generating samples and examine them // Continue until an appropriate puzzle is found. // while(tries < 9999999) { // tries++; // t = new Date(); // ss = generator.generate(samples, 0); // for(i = 0; i < samples; i++) { // rating = generator.rate(ss[i].replace("\n","").trim()); // if(rating > minrating && rating < maxrating) { // return ss[i]; // } // } // System.out.println(minrating + ", " + maxrating + ", " + rating + ", // looping"); // } // return ss[0]; } long rate(String s) { return generator.rate(s); } String solve(String s) { String result = solver.solve(s); return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/sudoku/GraphicsSudoku.java000066400000000000000000000120041312650303100265170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.sudoku; import java.awt.Color; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.EmptyImageBuilder; import net.sourceforge.plantuml.SpriteContainerEmpty; import net.sourceforge.plantuml.api.ImageDataSimple; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.png.PngIO; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d; public class GraphicsSudoku { private final ISudoku sudoku; private final UFont numberFont = UFont.sansSerif(20).bold(); private final UFont font = UFont.sansSerif(11); public GraphicsSudoku(ISudoku sudoku) { this.sudoku = sudoku; } public ImageData writeImage(OutputStream os) throws IOException { final BufferedImage im = createImage(); PngIO.write(im, os, 96); return new ImageDataSimple(im.getWidth(), im.getHeight()); } final private int xOffset = 5; final private int yOffset = 5; final private int cellWidth = 30; final private int cellHeight = 32; final private int numberxOffset = 10; final private int numberyOffset = 5; final private int textTotalHeight = 50; private BufferedImage createImage() { final int boldWidth = 3; final int sudoHeight = 9 * cellHeight + 2 * yOffset + boldWidth; final int sudoWidth = 9 * cellWidth + 2 * xOffset + boldWidth; final EmptyImageBuilder builder = new EmptyImageBuilder(sudoWidth, sudoHeight + textTotalHeight, Color.WHITE); final BufferedImage im = builder.getBufferedImage(); final Graphics2D g3d = builder.getGraphics2D(); UGraphic ug = new UGraphicG2d(new ColorMapperIdentity(), g3d, 1.0); ug = ug.apply(new UTranslate(xOffset, yOffset)); for (int x = 0; x < 9; x++) { for (int y = 0; y < 9; y++) { final int num = sudoku.getGiven(x, y); if (num > 0) { final TextBlock text = Display.create("" + num).create(FontConfiguration.blackBlueTrue(numberFont), HorizontalAlignment.CENTER, new SpriteContainerEmpty()); text.drawU(ug.apply(new UTranslate((numberxOffset + x * cellWidth), (numberyOffset + y * cellHeight)))); } } } ug = ug.apply(new UChangeBackColor(HtmlColorUtils.BLACK)).apply(new UChangeColor(null)); for (int i = 0; i < 10; i++) { final boolean bold = i % boldWidth == 0; final int w = bold ? boldWidth : 1; ug.apply(new UTranslate(0, i * cellHeight)).draw(new URectangle(9 * cellWidth + boldWidth, w)); } for (int i = 0; i < 10; i++) { final boolean bold = i % boldWidth == 0; final int w = bold ? boldWidth : 1; ug.apply(new UTranslate(i * cellWidth, 0)).draw(new URectangle(w, 9 * cellHeight + boldWidth)); } ug = ug.apply(new UTranslate(0, sudoHeight)); final List texts = new ArrayList(); texts.add("http://plantuml.com"); texts.add("Seed " + Long.toString(sudoku.getSeed(), 36)); texts.add("Difficulty " + sudoku.getRatting()); final TextBlock textBlock = Display.create(texts).create(FontConfiguration.blackBlueTrue(font), HorizontalAlignment.LEFT, new SpriteContainerEmpty()); textBlock.drawU(ug); g3d.dispose(); return im; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/sudoku/ISudoku.java000066400000000000000000000025571312650303100251630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.sudoku; public interface ISudoku { int getGiven(int x, int y); long getRatting(); long getSeed(); }plantuml-1.2017.15/src/net/sourceforge/plantuml/sudoku/PSystemSudoku.java000066400000000000000000000037331312650303100263740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.sudoku; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; public class PSystemSudoku extends AbstractPSystem { final private ISudoku sudoku; @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { return new GraphicsSudoku(sudoku).writeImage(os); } public DiagramDescription getDescription() { return new DiagramDescription("(Sudoku)"); } public PSystemSudoku(Long seed) { sudoku = new SudokuDLX(seed); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/sudoku/PSystemSudokuFactory.java000066400000000000000000000040651312650303100277230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.sudoku; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.PSystemSingleLineFactory; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; public class PSystemSudokuFactory extends PSystemSingleLineFactory { final private static Pattern2 p = MyPattern.cmpile("(?i)^sudoku(?:[%s]+([0-9a-zA-Z]+))?[%s]*$"); @Override protected AbstractPSystem executeLine(String line) { final Matcher2 m = p.matcher(line); if (m.find() == false) { return null; } if (m.group(1) == null) { return new PSystemSudoku(null); } return new PSystemSudoku(Long.parseLong(StringUtils.goLowerCase(m.group(1)), 36)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/sudoku/SudokuDLX.java000066400000000000000000000046051312650303100254160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.sudoku; import java.util.Random; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.StringUtils; public class SudokuDLX implements ISudoku { private final String tab[]; private final long seed; private final long rate; public SudokuDLX(Long seed) { if (seed == null) { this.seed = Math.abs(new Random().nextLong()); } else { this.seed = Math.abs(seed.longValue()); } final DLXEngine engine = new DLXEngine(new Random(this.seed)); final String s = engine.generate(10000, 100000); rate = engine.rate(s.replace("\n", "").trim()); tab = s.split("\\s"); } public long getRatting() { return rate; } public long getSeed() { return seed; } public int getGiven(int x, int y) { final char c = tab[x].charAt(y); if (c == '.') { return 0; } return c - '0'; } public void print() { for (String s : tab) { Log.println(s); } Log.println("Rate=" + rate); Log.println("Seed=" + StringUtils.goUpperCase(Long.toString(seed, 36))); } public static void main(String[] args) { for (int i = 0; i < 1; i++) { final SudokuDLX sudoku = new SudokuDLX(null); sudoku.print(); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/suggest/000077500000000000000000000000001312650303100230735ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/suggest/SuggestEngine.java000066400000000000000000000130321312650303100265040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.suggest; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.CharSequence2; import net.sourceforge.plantuml.CharSequence2Impl; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.CommandControl; import net.sourceforge.plantuml.command.UmlDiagramFactory; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.utils.StartUtils; import net.sourceforge.plantuml.version.IteratorCounter2; import net.sourceforge.plantuml.version.IteratorCounter2Impl; final public class SuggestEngine { private static final int LIMIT = 120; private final UmlDiagramFactory systemFactory; private final IteratorCounter2 it99; public SuggestEngine(UmlSource source, UmlDiagramFactory systemFactory) { this.systemFactory = systemFactory; this.it99 = source.iterator2(); final CharSequence startLine = it99.next(); if (StartUtils.isArobaseStartDiagram(startLine) == false) { throw new UnsupportedOperationException(); } } public SuggestEngineResult tryToSuggest(AbstractPSystem system) { return executeUmlCommand(system); } private SuggestEngineResult executeUmlCommand(AbstractPSystem system) { while (it99.hasNext()) { if (StartUtils.isArobaseEndDiagram(it99.peek())) { return SuggestEngineResult.SYNTAX_OK; } final SuggestEngineResult check = checkAndCorrect(); if (check.getStatus() != SuggestEngineStatus.SYNTAX_OK) { return check; } final CommandControl commandControl = systemFactory.isValid2(it99); if (commandControl == CommandControl.OK_PARTIAL) { systemFactory.goForwardMultiline(it99); // if (ok == false) { // return SuggestEngineResult.CANNOT_CORRECT; // } } else if (commandControl == CommandControl.OK) { it99.next(); // final Command cmd = new ProtectedCommand(systemFactory.createCommand(Arrays.asList(s))); // final CommandExecutionResult result = cmd.execute(system, Arrays.asList(s)); // if (result.isOk() == false) { // return SuggestEngineResult.CANNOT_CORRECT; // } } else { return SuggestEngineResult.CANNOT_CORRECT; } } return SuggestEngineResult.CANNOT_CORRECT; // throw new IllegalStateException(); } SuggestEngineResult checkAndCorrect() { final String incorrectLine = it99.peek().toString(); if (incorrectLine.length() > LIMIT) { return SuggestEngineResult.CANNOT_CORRECT; } final CommandControl commandControl = systemFactory.isValid2(it99); if (commandControl != CommandControl.NOT_OK) { return SuggestEngineResult.SYNTAX_OK; } if (StringUtils.trin(incorrectLine).startsWith("{") && systemFactory.isValid(BlocLines.single(it99.peekPrevious() + " {")) != CommandControl.NOT_OK) { return new SuggestEngineResult(it99.peekPrevious() + " {"); } final Collection> all = new ArrayList>(); all.add(new VariatorRemoveOneChar(incorrectLine)); all.add(new VariatorSwapLetter(incorrectLine)); // all.add(new VariatorAddOneCharBetweenWords(incorrectLine, ':')); all.add(new VariatorAddOneCharBetweenWords(incorrectLine, '-')); all.add(new VariatorAddOneCharBetweenWords(incorrectLine, ' ')); // all.add(new VariatorAddTwoChar(incorrectLine, '\"')); for (Iterator it2 : all) { final SuggestEngineResult result = tryThis(it2); if (result != null) { return result; } } return SuggestEngineResult.CANNOT_CORRECT; } private SuggestEngineResult tryThis(Iterator it2) { while (it2.hasNext()) { final String newS = it2.next(); if (StringUtils.trin(newS).length() == 0) { continue; } final CommandControl commandControl = systemFactory.isValid2(replaceFirstLine(newS)); if (commandControl == CommandControl.OK) { return new SuggestEngineResult(newS); } } return null; } private IteratorCounter2 replaceFirstLine(String s) { final List tmp = new ArrayList(); tmp.add(new CharSequence2Impl(s, null)); final Iterator it3 = it99.cloneMe(); if (it3.hasNext()) { it3.next(); } while (it3.hasNext()) { tmp.add(new CharSequence2Impl(it3.next(), null)); } return new IteratorCounter2Impl(tmp); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/suggest/SuggestEngineResult.java000066400000000000000000000055061312650303100277120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.suggest; import net.sourceforge.plantuml.StringUtils; public class SuggestEngineResult { private final SuggestEngineStatus status; private final String suggestedLine; public static final SuggestEngineResult CANNOT_CORRECT = new SuggestEngineResult(SuggestEngineStatus.CANNOT_CORRECT); public static final SuggestEngineResult SYNTAX_OK = new SuggestEngineResult(SuggestEngineStatus.SYNTAX_OK); private SuggestEngineResult(SuggestEngineStatus status) { if (status == SuggestEngineStatus.ONE_SUGGESTION) { throw new IllegalArgumentException(); } this.status = status; this.suggestedLine = null; } @Override public String toString() { return status + " " + suggestedLine; } @Override public int hashCode() { return status.hashCode() + (suggestedLine == null ? 0 : suggestedLine.hashCode()); } @Override public boolean equals(Object obj) { final SuggestEngineResult this2 = (SuggestEngineResult) obj; return status.equals(this2.status) && sameString(suggestedLine, this2.suggestedLine); } private static boolean sameString(String a, String b) { if (a == null && b == null) { return true; } if (a != null || b != null) { return false; } return a.equals(b); } public SuggestEngineResult(String suggestedLine) { if (StringUtils.trin(suggestedLine).length() == 0) { throw new IllegalArgumentException(); } this.status = SuggestEngineStatus.ONE_SUGGESTION; this.suggestedLine = suggestedLine; } public final SuggestEngineStatus getStatus() { return status; } public final String getSuggestedLine() { return suggestedLine; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/suggest/SuggestEngineStatus.java000066400000000000000000000025351312650303100277160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.suggest; public enum SuggestEngineStatus { SYNTAX_OK, CANNOT_CORRECT, ONE_SUGGESTION } plantuml-1.2017.15/src/net/sourceforge/plantuml/suggest/Variator.java000066400000000000000000000025221312650303100255260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.suggest; public interface Variator { String getData(); void nextStep(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/suggest/VariatorAddOneChar.java000066400000000000000000000034041312650303100273770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.suggest; public class VariatorAddOneChar extends VariatorIteratorAdaptor { private final String data; private final char toAdd; private int i; public VariatorAddOneChar(String data, char toAdd) { this.data = data; this.toAdd = toAdd; } @Override Variator getVariator() { return new Variator() { public String getData() { if (i > data.length()) { return null; } return data.substring(0, i) + toAdd + data.substring(i); } public void nextStep() { i++; } }; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/suggest/VariatorAddOneCharBetweenWords.java000066400000000000000000000040761312650303100317360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.suggest; public class VariatorAddOneCharBetweenWords extends VariatorIteratorAdaptor { private final String data; private final char toAdd; private int i; public VariatorAddOneCharBetweenWords(String data, char toAdd) { this.data = data; this.toAdd = toAdd; i++; ensureBetweenWords(); } private void ensureBetweenWords() { while (i < data.length() && inWord()) { i++; } } private boolean inWord() { return Character.isLetterOrDigit(data.charAt(i - 1)) && Character.isLetterOrDigit(data.charAt(i)); } @Override Variator getVariator() { return new Variator() { public String getData() { if (i > data.length() - 1) { return null; } return data.substring(0, i) + toAdd + data.substring(i); } public void nextStep() { i++; ensureBetweenWords(); } }; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/suggest/VariatorAddTwoChar.java000066400000000000000000000035651312650303100274370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.suggest; public class VariatorAddTwoChar extends VariatorIteratorAdaptor { private final String data; private final char toAdd; private int i; private int j = 1; public VariatorAddTwoChar(String data, char toAdd) { this.data = data; this.toAdd = toAdd; } @Override Variator getVariator() { return new Variator() { public String getData() { if (i >= data.length()) { return null; } return data.substring(0, i) + toAdd + data.substring(i, j) + toAdd + data.substring(j); } public void nextStep() { j++; if (j > data.length()) { i++; j = i + 1; } } }; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/suggest/VariatorIteratorAdaptor.java000066400000000000000000000035661312650303100305640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.suggest; import java.util.Iterator; import java.util.NoSuchElementException; public abstract class VariatorIteratorAdaptor implements Iterator { private final Variator variator; abstract Variator getVariator(); public VariatorIteratorAdaptor() { this.variator = getVariator(); } public boolean hasNext() { return variator.getData() != null; } public String next() { final String result = variator.getData(); if (result == null) { throw new NoSuchElementException(); } this.variator.nextStep(); return result; } public void remove() { throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/suggest/VariatorRemoveOneChar.java000066400000000000000000000033121312650303100301420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.suggest; public class VariatorRemoveOneChar extends VariatorIteratorAdaptor { private final String data; private int i; public VariatorRemoveOneChar(String data) { this.data = data; } @Override Variator getVariator() { return new Variator() { public String getData() { if (i >= data.length()) { return null; } return data.substring(0, i) + data.substring(i + 1); } public void nextStep() { i++; } }; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/suggest/VariatorSwapChar.java000066400000000000000000000033521312650303100271610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.suggest; public class VariatorSwapChar extends VariatorIteratorAdaptor { private final String data; private int i; public VariatorSwapChar(String data) { this.data = data; } @Override Variator getVariator() { return new Variator() { public String getData() { if (i >= data.length() - 1) { return null; } return data.substring(0, i) + data.charAt(i + 1) + data.charAt(i) + data.substring(i + 2); } public void nextStep() { i++; } }; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/suggest/VariatorSwapLetter.java000066400000000000000000000040151312650303100275400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.suggest; public class VariatorSwapLetter extends VariatorIteratorAdaptor { private final String data; private int i; public VariatorSwapLetter(String data) { this.data = data; ensureTwoLetters(); } private void ensureTwoLetters() { while (i < data.length() - 1 && areTwoLetters() == false) { i++; } } private boolean areTwoLetters() { return Character.isLetter(data.charAt(i)) && Character.isLetter(data.charAt(i + 1)); } @Override Variator getVariator() { return new Variator() { public String getData() { if (i >= data.length() - 1) { return null; } return data.substring(0, i) + data.charAt(i + 1) + data.charAt(i) + data.substring(i + 2); } public void nextStep() { i++; ensureTwoLetters(); } }; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/000077500000000000000000000000001312650303100223625ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/AbstractEntityImage.java000066400000000000000000000046421312650303100271360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; public abstract class AbstractEntityImage extends AbstractTextBlock implements IEntityImage { private final IEntity entity; private final ISkinParam skinParam; public AbstractEntityImage(IEntity entity, ISkinParam skinParam) { // System.err.println("Creating abstractEntityImage "+getClass()); if (entity == null) { throw new IllegalArgumentException("entity null"); } this.entity = entity; this.skinParam = skinParam; } public boolean isHidden() { return entity.isHidden(); } protected final IEntity getEntity() { return entity; } protected final ISkinParam getSkinParam() { return skinParam; } public final HtmlColor getBackcolor() { return null; } protected final Stereotype getStereo() { return entity.getStereotype(); } public Margins getShield(StringBounder stringBounder) { return Margins.NONE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/AbstractExtremityFactory.java000066400000000000000000000034571312650303100302440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.extremity.ExtremityFactory; public abstract class AbstractExtremityFactory implements ExtremityFactory { public UDrawable createUDrawable(Point2D p0, double angle, Side side) { throw new UnsupportedOperationException(getClass().toString()); } protected double atan2(Point2D p1, Point2D p0) { double a = Math.atan2(p1.getY() - p0.getY(), p1.getX() - p0.getX()); if (a < 0) { a += Math.PI * 2; } return a; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/ArithmeticStrategy.java000066400000000000000000000025371312650303100270500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; public interface ArithmeticStrategy { void eat(double v); double getResult(); }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/ArithmeticStrategyMax.java000066400000000000000000000027271312650303100275170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; public class ArithmeticStrategyMax implements ArithmeticStrategy { private double max; public void eat(double v) { if (v > max) { max = v; } } public double getResult() { return max; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/ArithmeticStrategySum.java000066400000000000000000000027021312650303100275270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; public class ArithmeticStrategySum implements ArithmeticStrategy { private double sum; public void eat(double v) { sum += v; } public double getResult() { return sum; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/Bibliotekon.java000066400000000000000000000130561312650303100254730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Link; public class Bibliotekon { private final List allCluster = new ArrayList(); private final Map shapeMap = new LinkedHashMap();; private final List lines0 = new ArrayList(); private final List lines1 = new ArrayList(); private final List allLines = new ArrayList(); public void putShape(ILeaf ent, Shape shape) { shapeMap.put(ent, shape); } public Cluster getCluster(IGroup ent) { for (Cluster cl : allCluster) { if (cl.getGroup() == ent) { return cl; } } return null; } public void addLine(Line line) { allLines.add(line); if (first(line)) { if (line.hasNoteLabelText()) { // lines0.add(0, line); for (int i = 0; i < lines0.size(); i++) { final Line other = lines0.get(i); if (other.hasNoteLabelText() == false && line.sameConnections(other)) { lines0.add(i, line); return; } } lines0.add(line); } else { lines0.add(line); } } else { lines1.add(line); } } private static boolean first(Line line) { final int length = line.getLength(); if (length == 1) { return true; } return false; } public void addCluster(Cluster current) { allCluster.add(current); } public Shape getShape(IEntity ent) { return shapeMap.get(ent); } public String getShapeUid(ILeaf ent) { final Shape result = getShape(ent); if (result != null) { String uid = result.getUid(); if (result.isShielded()) { uid = uid + ":h"; } return uid; } assert result == null; if (ent.isGroup()) { for (IEntity i : shapeMap.keySet()) { if (ent.getCode().equals(i.getCode())) { return getShape(i).getUid(); } } return Cluster.getSpecialPointId(ent); } throw new IllegalStateException(); } public String getWarningOrError(int warningOrError) { final StringBuilder sb = new StringBuilder(); for (Map.Entry ent : shapeMap.entrySet()) { final Shape sh = ent.getValue(); final double maxX = sh.getMinX() + sh.getWidth(); if (maxX > warningOrError) { final IEntity entity = ent.getKey(); sb.append(entity.getCode() + " is overpassing the width limit."); sb.append("\n"); } } return sb.length() == 0 ? "" : sb.toString(); } public Map getMaxX() { final Map result = new HashMap(); for (Map.Entry ent : shapeMap.entrySet()) { final Shape sh = ent.getValue(); final double maxX = sh.getMinX() + sh.getWidth(); final IEntity entity = ent.getKey(); result.put(entity.getCode(), maxX); } return Collections.unmodifiableMap(result); } public List allLines() { return Collections.unmodifiableList(allLines); } public List lines0() { return Collections.unmodifiableList(lines0); } public List lines1() { return Collections.unmodifiableList(lines1); } public List allCluster() { return Collections.unmodifiableList(allCluster); } public Collection allShapes() { return Collections.unmodifiableCollection(shapeMap.values()); } public List getAllLineConnectedTo(IEntity leaf) { final List result = new ArrayList(); for (Line line : allLines) { if (line.isLinkFromOrTo(leaf)) { result.add(line); } } return Collections.unmodifiableList(result); } public Line getLine(Link link) { for (Line line : allLines) { if (line.isLink(link)) { return line; } } throw new IllegalArgumentException(); } public IEntity getOnlyOther(IEntity entity) { for (Line line : allLines) { final IEntity other = line.getOther(entity); if (other != null) { return other; } } return null; } public ILeaf getLeaf(Shape shape) { for (Map.Entry ent : shapeMap.entrySet()) { if (ent.getValue() == shape) { return ent.getKey(); } } throw new IllegalArgumentException(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/Boundary.java000066400000000000000000000061611312650303100250140ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Boundary extends AbstractTextBlock { private final double margin = 4; private final double radius = 12; private final double left = 17; private final SymbolContext symbolContext; public Boundary(SymbolContext symbolContext) { this.symbolContext = symbolContext; } public void drawU(UGraphic ug) { double x = 0; double y = 0; x += margin; y += margin; ug = symbolContext.apply(ug); final UEllipse circle = new UEllipse(radius * 2, radius * 2); circle.setDeltaShadow(symbolContext.getDeltaShadow()); final UPath path1 = new UPath(); path1.moveTo(0, 0); path1.lineTo(0, radius * 2); path1.setDeltaShadow(symbolContext.getDeltaShadow()); final UPath path = new UPath(); path.moveTo(0, 0); path.lineTo(0, radius * 2); path.moveTo(0, radius); path.lineTo(left, radius); path.setDeltaShadow(symbolContext.getDeltaShadow()); ug.apply(new UTranslate(x, y)).draw(path); // final ULine line1 = new ULine(0, radius * 2); // line1.setDeltaShadow(deltaShadow); // ug.apply(new UTranslate(x, y)).draw(line1); // final ULine line2 = new ULine(left, 0); // line2.setDeltaShadow(deltaShadow); // ug.apply(new UTranslate(x, y + radius)).draw(line2); ug.apply(new UTranslate(x + left, y)).draw(circle); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(radius * 2 + left + 2 * margin, radius * 2 + 2 * margin); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/CircleAndArrow.java000066400000000000000000000064751312650303100261000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UTranslate; class CircleAndArrow implements UDrawable { private final AffineTransform at; private final AffineTransform at2; private int radius; private final Point2D center; private final Point2D p1; private final Point2D p2; private Point2D p3; private Point2D p4; public CircleAndArrow(Point2D p1, Point2D p2) { this.center = new Point2D.Double((p1.getX() + p2.getX()) / 2, (p1.getY() + p2.getY()) / 2); at = AffineTransform.getTranslateInstance(-center.getX(), -center.getY()); at2 = AffineTransform.getTranslateInstance(center.getX(), center.getY()); radius = (int) (p1.distance(p2) / 2); if (radius % 2 == 0) { radius--; } this.p1 = putOnCircle(p1); this.p2 = putOnCircle(p2); this.p3 = at.transform(this.p1, null); this.p3 = new Point2D.Double(p3.getY(), -p3.getX()); this.p3 = at2.transform(p3, null); this.p4 = at.transform(this.p2, null); this.p4 = new Point2D.Double(p4.getY(), -p4.getX()); this.p4 = at2.transform(p4, null); } private Point2D putOnCircle(Point2D p) { p = at.transform(p, null); final double coef = p.distance(new Point2D.Double()) / radius; p = new Point2D.Double(p.getX() / coef, p.getY() / coef); return at2.transform(p, null); } public void drawU(UGraphic ug) { final UShape circle = new UEllipse(radius * 2, radius * 2); ug.apply(new UTranslate(center.getX() - radius, center.getY() - radius)).draw(circle); // drawLine(ug, x, y, p1, p2); // drawLine(ug, x, y, p3, p4); } static private void drawLine(UGraphic ug, double x, double y, Point2D p1, Point2D p2) { final double dx = p2.getX() - p1.getX(); final double dy = p2.getY() - p1.getY(); ug.apply(new UTranslate(x + p1.getX(), y + p1.getY())).draw(new ULine(dx, dy)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/CircleInterface2.java000066400000000000000000000056461312650303100263440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class CircleInterface2 extends AbstractTextBlock implements TextBlock { private final double margin = 1; private final double radius = 8; private final HtmlColor backgroundColor; private final HtmlColor foregroundColor; private final float thickness = 2; private final double deltaShadow; public CircleInterface2(HtmlColor backgroundColor, HtmlColor foregroundColor, double deltaShadow) { this.backgroundColor = backgroundColor; this.foregroundColor = foregroundColor; this.deltaShadow = deltaShadow; } public void drawU(UGraphic ug) { double x = 0; double y = 0; x += margin; y += margin; ug = ug.apply(new UStroke(thickness)).apply(new UChangeBackColor(backgroundColor)) .apply(new UChangeColor(foregroundColor)); final UEllipse circle = new UEllipse(radius * 2, radius * 2); circle.setDeltaShadow(deltaShadow); ug.apply(new UTranslate(x, y)).draw(circle); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(radius * 2 + 2 * margin, radius * 2 + 2 * margin); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/Cluster.java000066400000000000000000000646371312650303100246660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cucadiagram.EntityPosition; import net.sourceforge.plantuml.cucadiagram.EntityUtils; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.Member; import net.sourceforge.plantuml.cucadiagram.MethodsOrFieldsArea; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizVersion; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorTransparent; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockEmpty; import net.sourceforge.plantuml.graphic.TextBlockWidth; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.posimo.Moveable; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.svek.image.EntityImageState; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UComment; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.utils.UniqueSequence; public class Cluster implements Moveable { private final Cluster parent; private final IGroup group; private final List shapes = new ArrayList(); private final List children = new ArrayList(); private final int color; private final int colorTitle; private final ISkinParam skinParam; private int titleAndAttributeWidth; private int titleAndAttributeHeight; private TextBlock ztitle; private TextBlock zstereo; private double xTitle; private double yTitle; private double minX; private double minY; private double maxX; private double maxY; public void moveSvek(double deltaX, double deltaY) { this.xTitle += deltaX; this.minX += deltaX; this.maxX += deltaX; this.yTitle += deltaY; this.minY += deltaY; this.maxY += deltaY; } private boolean hasEntryOrExitPoint() { for (Shape sh : shapes) { if (sh.getEntityPosition() != EntityPosition.NORMAL) { return true; } } return false; } public Cluster(ColorSequence colorSequence, ISkinParam skinParam, IGroup root) { this(null, root, colorSequence, skinParam); } private ColorParam border; private Cluster(Cluster parent, IGroup group, ColorSequence colorSequence, ISkinParam skinParam) { if (group == null) { throw new IllegalStateException(); } this.parent = parent; this.group = group; if (group.getUSymbol() != null) { border = group.getUSymbol().getColorParamBorder(); } this.color = colorSequence.getValue(); this.colorTitle = colorSequence.getValue(); this.skinParam = group.getColors(skinParam).mute(skinParam); } @Override public String toString() { return super.toString() + " " + group; } public final Cluster getParent() { return parent; } public void addShape(Shape sh) { if (sh == null) { throw new IllegalArgumentException(); } this.shapes.add(sh); sh.setCluster(this); } public final List getShapes() { return Collections.unmodifiableList(shapes); } private List getShapesOrderedTop(Collection lines) { final List firsts = new ArrayList(); final Set tops = new HashSet(); final Map shs = new HashMap(); for (final Iterator it = shapes.iterator(); it.hasNext();) { final Shape sh = it.next(); shs.put(sh.getUid(), sh); if (sh.isTop() && sh.getEntityPosition() == EntityPosition.NORMAL) { firsts.add(sh); tops.add(sh.getUid()); } } for (Line l : lines) { if (tops.contains(l.getStartUidPrefix())) { final Shape sh = shs.get(l.getEndUidPrefix()); if (sh != null && sh.getEntityPosition() == EntityPosition.NORMAL) { firsts.add(0, sh); } } if (l.isInverted()) { final Shape sh = shs.get(l.getStartUidPrefix()); if (sh != null && sh.getEntityPosition() == EntityPosition.NORMAL) { firsts.add(0, sh); } } } return firsts; } private List getShapesEntryExit(EnumSet positions) { final List result = new ArrayList(); for (final Iterator it = shapes.iterator(); it.hasNext();) { final Shape sh = it.next(); if (positions.contains(sh.getEntityPosition())) { result.add(sh); } } return result; } private List getShapesOrderedWithoutTop(Collection lines) { final List all = new ArrayList(shapes); final Set tops = new HashSet(); final Map shs = new HashMap(); for (final Iterator it = all.iterator(); it.hasNext();) { final Shape sh = it.next(); if (sh.getEntityPosition() != EntityPosition.NORMAL) { it.remove(); continue; } shs.put(sh.getUid(), sh); if (sh.isTop()) { tops.add(sh.getUid()); it.remove(); } } for (Line l : lines) { if (tops.contains(l.getStartUidPrefix())) { final Shape sh = shs.get(l.getEndUidPrefix()); if (sh != null) { all.remove(sh); } } if (l.isInverted()) { final Shape sh = shs.get(l.getStartUidPrefix()); if (sh != null) { all.remove(sh); } } } return all; } public final List getChildren() { return Collections.unmodifiableList(children); } public Cluster createChild(IGroup g, int titleAndAttributeWidth, int titleAndAttributeHeight, TextBlock title, TextBlock stereo, ColorSequence colorSequence, ISkinParam skinParam) { final Cluster child = new Cluster(this, g, colorSequence, skinParam); child.titleAndAttributeWidth = titleAndAttributeWidth; child.titleAndAttributeHeight = titleAndAttributeHeight; child.ztitle = title; child.zstereo = stereo; this.children.add(child); return child; } public final IGroup getGroup() { return group; } public final int getTitleAndAttributeWidth() { return titleAndAttributeWidth; } public final int getTitleAndAttributeHeight() { return titleAndAttributeHeight; } public double getWidth() { return maxX - minX; } public double getMinX() { return minX; } public ClusterPosition getClusterPosition() { return new ClusterPosition(minX, minY, maxX, maxY); } public void setTitlePosition(double x, double y) { this.xTitle = x; this.yTitle = y; } private static HtmlColor getColor(ColorParam colorParam, ISkinParam skinParam, Stereotype stereotype) { return SkinParamUtils.getColor(skinParam, colorParam, stereotype); } public void drawU(UGraphic ug, UStroke stroke, final UmlDiagramType umlDiagramType, final ISkinParam skinParam2) { ug.draw(new UComment("cluster " + group.getCode().getFullName())); final Stereotype stereotype = group.getStereotype(); HtmlColor borderColor; if (umlDiagramType == UmlDiagramType.STATE) { borderColor = getColor(ColorParam.stateBorder, skinParam, stereotype); } else if (umlDiagramType == UmlDiagramType.ACTIVITY) { borderColor = getColor(ColorParam.packageBorder, skinParam, stereotype); } else { borderColor = getColor(ColorParam.packageBorder, skinParam, stereotype); } final Url url = group.getUrl99(); if (url != null) { ug.startUrl(url); } try { if (hasEntryOrExitPoint()) { manageEntryExitPoint(ug.getStringBounder()); } if (skinParam.useSwimlanes(umlDiagramType)) { drawSwinLinesState(ug, borderColor); return; } final boolean isState = umlDiagramType == UmlDiagramType.STATE; if (isState) { if (group.getColors(skinParam).getSpecificLineStroke() != null) { stroke = group.getColors(skinParam).getSpecificLineStroke(); } if (group.getColors(skinParam).getColor(ColorType.LINE) != null) { borderColor = group.getColors(skinParam).getColor(ColorType.LINE); } drawUState(ug, borderColor, skinParam2, stroke, umlDiagramType); return; } PackageStyle style = group.getPackageStyle(); if (style == null) { style = skinParam2.getPackageStyle(); } if (border != null) { final HtmlColor tmp = skinParam2.getHtmlColor(border, group.getStereotype(), false); if (tmp != null) { borderColor = tmp; } } if (ztitle != null || zstereo != null) { final HtmlColor back = getBackColor(getBackColor(umlDiagramType), skinParam2, group.getStereotype()); final double roundCorner = group.getUSymbol() == null ? 0 : group.getUSymbol().getSkinParameter() .getRoundCorner(skinParam, stereotype); final ClusterDecoration decoration = new ClusterDecoration(style, group.getUSymbol(), ztitle, zstereo, minX, minY, maxX, maxY, getStroke(skinParam2, group.getStereotype())); decoration.drawU(ug, back, borderColor, skinParam2.shadowing(), roundCorner); return; } final URectangle rect = new URectangle(maxX - minX, maxY - minY); if (skinParam2.shadowing()) { rect.setDeltaShadow(3.0); } final HtmlColor backColor = getBackColor(getBackColor(umlDiagramType), skinParam2, group.getStereotype()); ug = ug.apply(new UChangeBackColor(backColor)).apply(new UChangeColor(borderColor)); ug.apply(new UStroke(2)).apply(new UTranslate(minX, minY)).draw(rect); } finally { if (url != null) { ug.closeAction(); } } } private UStroke getStroke(ISkinParam skinParam, Stereotype stereo) { UStroke stroke = skinParam.getThickness(LineParam.packageBorder, stereo); if (stroke == null) { stroke = new UStroke(2.0); } return stroke; } public void manageEntryExitPoint(StringBounder stringBounder) { final Collection insides = new ArrayList(); final List points = new ArrayList(); for (Shape sh : shapes) { if (sh.getEntityPosition() == EntityPosition.NORMAL) { insides.add(sh.getClusterPosition()); } else { points.add(sh.getClusterPosition().getPointCenter()); } } for (Cluster in : children) { insides.add(in.getClusterPosition()); } final FrontierCalculator frontierCalculator = new FrontierCalculator(getClusterPosition(), insides, points); if (titleAndAttributeHeight > 0 && titleAndAttributeWidth > 0) { frontierCalculator.ensureMinWidth(titleAndAttributeWidth + 10); } final ClusterPosition forced = frontierCalculator.getSuggestedPosition(); xTitle += ((forced.getMinX() - minX) + (forced.getMaxX() - maxX)) / 2; minX = forced.getMinX(); minY = forced.getMinY(); maxX = forced.getMaxX(); maxY = forced.getMaxY(); yTitle = minY + IEntityImage.MARGIN; final double widthTitle = ztitle.calculateDimension(stringBounder).getWidth(); xTitle = minX + ((maxX - minX - widthTitle) / 2); } private void drawSwinLinesState(UGraphic ug, HtmlColor borderColor) { if (ztitle != null) { ztitle.drawU(ug.apply(new UTranslate(xTitle, 0))); } final ULine line = new ULine(0, maxY - minY); ug = ug.apply(new UChangeColor(borderColor)); ug.apply(new UTranslate(minX, 0)).draw(line); ug.apply(new UTranslate(maxX, 0)).draw(line); } private HtmlColor getColor(ISkinParam skinParam, ColorParam colorParam, Stereotype stereo) { return new Rose().getHtmlColor(skinParam, colorParam, stereo); } private void drawUState(UGraphic ug, HtmlColor borderColor, ISkinParam skinParam2, UStroke stroke, UmlDiagramType umlDiagramType) { final Dimension2D total = new Dimension2DDouble(maxX - minX, maxY - minY); final double suppY; if (ztitle == null) { suppY = 0; } else { suppY = ztitle.calculateDimension(ug.getStringBounder()).getHeight() + IEntityImage.MARGIN + IEntityImage.MARGIN_LINE; } HtmlColor stateBack = getBackColor(umlDiagramType); if (stateBack == null) { stateBack = getColor(skinParam2, ColorParam.stateBackground, group.getStereotype()); } final HtmlColor background = getColor(skinParam2, ColorParam.background, null); final TextBlockWidth attribute = getTextBlockAttribute(skinParam2); final double attributeHeight = attribute.calculateDimension(ug.getStringBounder()).getHeight(); final RoundedContainer r = new RoundedContainer(total, suppY, attributeHeight + (attributeHeight > 0 ? IEntityImage.MARGIN : 0), borderColor, stateBack, background, stroke); r.drawU(ug.apply(new UTranslate(minX, minY)), skinParam2.shadowing()); if (ztitle != null) { ztitle.drawU(ug.apply(new UTranslate(xTitle, yTitle))); } if (attributeHeight > 0) { attribute.asTextBlock(total.getWidth()).drawU( ug.apply(new UTranslate(minX + IEntityImage.MARGIN, minY + suppY + IEntityImage.MARGIN / 2.0))); } final Stereotype stereotype = group.getStereotype(); final boolean withSymbol = stereotype != null && stereotype.isWithOOSymbol(); if (withSymbol) { EntityImageState.drawSymbol(ug.apply(new UChangeColor(borderColor)), maxX, maxY); } } private TextBlockWidth getTextBlockAttribute(ISkinParam skinParam) { final TextBlockWidth attribute; final List members = group.getBodier().getFieldsToDisplay(); if (members.size() == 0) { attribute = new TextBlockEmpty(); } else { attribute = new MethodsOrFieldsArea(members, FontParam.STATE_ATTRIBUTE, skinParam, group.getStereotype(), null); } return attribute; } public void setPosition(double minX, double minY, double maxX, double maxY) { this.minX = minX; this.maxX = maxX; this.minY = minY; this.maxY = maxY; } private boolean isThereALinkFromOrToGroup(Collection lines) { for (Line line : lines) { if (line.isLinkFromOrTo(group)) { return true; } } return false; } public void printCluster1(StringBuilder sb, Collection lines, StringBounder stringBounder) { for (Shape sh : getShapesOrderedTop(lines)) { sh.appendShape(sb, stringBounder); } } private List addProtection(List entries, double width) { final List result = new ArrayList(); result.add(entries.get(0)); for (int i = 1; i < entries.size(); i++) { result.add(new ShapePseudoImpl("psd" + UniqueSequence.getValue(), width, 5)); result.add(entries.get(i)); } return result; } private double getMaxWidthFromLabelForEntryExit(List entries, StringBounder stringBounder) { double result = -Double.MAX_VALUE; for (Shape shape : entries) { final double w = getMaxWidthFromLabelForEntryExit(shape, stringBounder); if (w > result) { result = w; } } return result; } private double getMaxWidthFromLabelForEntryExit(Shape shape, StringBounder stringBounder) { return shape.getMaxWidthFromLabelForEntryExit(stringBounder); } public void printClusterEntryExit(StringBuilder sb, StringBounder stringBounder) { final List shapesEntryExitList = getShapesEntryExit(EntityPosition.getInputs()); final double maxWith = getMaxWidthFromLabelForEntryExit(shapesEntryExitList, stringBounder); final double naturalSpace = 70; final List entries; if (maxWith > naturalSpace) { entries = addProtection(shapesEntryExitList, maxWith - naturalSpace); } else { entries = shapesEntryExitList; } if (entries.size() > 0) { sb.append("{rank=source;"); for (IShapePseudo sh : entries) { sb.append(sh.getUid() + ";"); } sb.append("}"); for (IShapePseudo sh : entries) { sh.appendShape(sb, stringBounder); } } final List exits = getShapesEntryExit(EntityPosition.getOutputs()); if (exits.size() > 0) { sb.append("{rank=sink;"); for (Shape sh : exits) { sb.append(sh.getUid() + ";"); } sb.append("}"); for (Shape sh : exits) { sh.appendShape(sb, stringBounder); } } } public boolean printCluster2(StringBuilder sb, Collection lines, StringBounder stringBounder, DotMode dotMode, GraphvizVersion graphvizVersion, UmlDiagramType type) { // Log.println("Cluster::printCluster " + this); boolean added = false; for (Shape sh : getShapesOrderedWithoutTop(lines)) { sh.appendShape(sb, stringBounder); added = true; } if (skinParam.useRankSame() && dotMode != DotMode.NO_LEFT_RIGHT_AND_XLABEL) { appendRankSame(sb, lines); } for (Cluster child : getChildren()) { child.printInternal(sb, lines, stringBounder, dotMode, graphvizVersion, type); } return added; } private void appendRankSame(StringBuilder sb, Collection lines) { for (String same : getRankSame(lines)) { sb.append(same); SvekUtils.println(sb); } } private Set getRankSame(Collection lines) { final Set rankSame = new HashSet(); for (Line l : lines) { if (l.hasEntryPoint()) { continue; } final String startUid = l.getStartUidPrefix(); final String endUid = l.getEndUidPrefix(); if (isInCluster(startUid) && isInCluster(endUid)) { final String same = l.rankSame(); if (same != null) { rankSame.add(same); } } } return rankSame; } public void fillRankMin(Set rankMin) { for (Shape sh : getShapes()) { if (sh.isTop()) { rankMin.add(sh.getUid()); } } for (Cluster child : getChildren()) { child.fillRankMin(rankMin); } } private boolean isInCluster(String uid) { for (Shape sh : shapes) { if (sh.getUid().equals(uid)) { return true; } } return false; } public String getClusterId() { return "cluster" + color; } public static String getSpecialPointId(IEntity group) { return CENTER_ID + group.getUid(); } public final static String CENTER_ID = "za"; private boolean protection0(UmlDiagramType type) { if (skinParam.useSwimlanes(type)) { return false; } return true; } private boolean protection1(UmlDiagramType type) { if (group.getUSymbol() == USymbol.NODE) { return true; } if (skinParam.useSwimlanes(type)) { return false; } return true; } public String getMinPoint(UmlDiagramType type) { if (skinParam.useSwimlanes(type)) { return "minPoint" + color; } return null; } public String getMaxPoint(UmlDiagramType type) { if (skinParam.useSwimlanes(type)) { return "maxPoint" + color; } return null; } private String getSourceInPoint(UmlDiagramType type) { if (skinParam.useSwimlanes(type)) { return "sourceIn" + color; } return null; } private String getSinkInPoint(UmlDiagramType type) { if (skinParam.useSwimlanes(type)) { return "sinkIn" + color; } return null; } private void printInternal(StringBuilder sb, Collection lines, StringBounder stringBounder, DotMode dotMode, GraphvizVersion graphvizVersion, UmlDiagramType type) { final boolean thereALinkFromOrToGroup2 = isThereALinkFromOrToGroup(lines); boolean thereALinkFromOrToGroup1 = thereALinkFromOrToGroup2; final boolean useProtectionWhenThereALinkFromOrToGroup = graphvizVersion .useProtectionWhenThereALinkFromOrToGroup(); if (useProtectionWhenThereALinkFromOrToGroup == false) { thereALinkFromOrToGroup1 = false; } // final boolean thereALinkFromOrToGroup1 = false; if (thereALinkFromOrToGroup1) { subgraphCluster(sb, "a"); } final boolean hasEntryOrExitPoint = hasEntryOrExitPoint(); if (hasEntryOrExitPoint) { for (Line line : lines) { if (line.isLinkFromOrTo(group)) { line.setProjectionCluster(this); } } } boolean protection0 = protection0(type); boolean protection1 = protection1(type); if (hasEntryOrExitPoint || useProtectionWhenThereALinkFromOrToGroup == false) { protection0 = false; protection1 = false; } // if (graphvizVersion.modeSafe()) { // protection0 = false; // protection1 = false; // } if (protection0) { subgraphCluster(sb, "p0"); } sb.append("subgraph " + getClusterId() + " {"); sb.append("style=solid;"); sb.append("color=\"" + StringUtils.getAsHtml(color) + "\";"); final String label; if (isLabel()) { final StringBuilder sblabel = new StringBuilder("<"); Line.appendTable(sblabel, getTitleAndAttributeWidth(), getTitleAndAttributeHeight() - 5, colorTitle); sblabel.append(">"); label = sblabel.toString(); } else { label = "\"\""; } if (hasEntryOrExitPoint) { printClusterEntryExit(sb, stringBounder); subgraphCluster(sb, "ee", label); } else { sb.append("label=" + label + ";"); SvekUtils.println(sb); } // if (hasEntryOrExitPoint) { // printClusterEntryExit(sb); // subgraphCluster(sb, "ee"); // } if (thereALinkFromOrToGroup2) { sb.append(getSpecialPointId(group) + " [shape=point,width=.01,label=\"\"];"); } if (thereALinkFromOrToGroup1) { subgraphCluster(sb, "i"); } if (protection1) { subgraphCluster(sb, "p1"); } if (skinParam.useSwimlanes(type)) { sb.append("{rank = source; "); sb.append(getSourceInPoint(type)); sb.append(" [shape=point,width=.01,label=\"\"];"); sb.append(getMinPoint(type) + "->" + getSourceInPoint(type) + " [weight=999];"); sb.append("}"); SvekUtils.println(sb); sb.append("{rank = sink; "); sb.append(getSinkInPoint(type)); sb.append(" [shape=point,width=.01,label=\"\"];"); sb.append("}"); sb.append(getSinkInPoint(type) + "->" + getMaxPoint(type) + " [weight=999];"); SvekUtils.println(sb); } SvekUtils.println(sb); printCluster1(sb, lines, stringBounder); final boolean added = printCluster2(sb, lines, stringBounder, dotMode, graphvizVersion, type); if (hasEntryOrExitPoint && added == false) { final String empty = "empty" + color; sb.append(empty + " [shape=point,width=.01,label=\"\"];"); } sb.append("}"); if (protection1) { sb.append("}"); } if (thereALinkFromOrToGroup1) { sb.append("}"); sb.append("}"); } if (hasEntryOrExitPoint) { sb.append("}"); } if (protection0) { sb.append("}"); } SvekUtils.println(sb); } public boolean isLabel() { return getTitleAndAttributeHeight() > 0 && getTitleAndAttributeWidth() > 0; } private void subgraphCluster(StringBuilder sb, String id) { subgraphCluster(sb, id, "\"\""); } private void subgraphCluster(StringBuilder sb, String id, String label) { final String uid = getClusterId() + id; sb.append("subgraph " + uid + " {"); sb.append("label=" + label + ";"); } public int getColor() { return color; } public int getTitleColor() { return colorTitle; } private final HtmlColor getBackColor(final UmlDiagramType umlDiagramType) { if (EntityUtils.groupRoot(group)) { return null; } final HtmlColor result = group.getColors(skinParam).getColor(ColorType.BACK); if (result != null) { return result; } final Stereotype stereo = group.getStereotype(); final USymbol sym = group.getUSymbol() == null ? USymbol.PACKAGE : group.getUSymbol(); final ColorParam backparam = umlDiagramType == UmlDiagramType.ACTIVITY ? ColorParam.partitionBackground : sym .getColorParamBack(); final HtmlColor c1 = skinParam.getHtmlColor(backparam, stereo, false); if (c1 != null) { return c1; } if (parent == null) { return null; } return parent.getBackColor(umlDiagramType); } public boolean isClusterOf(IEntity ent) { if (ent.isGroup() == false) { return false; } return group == ent; } public static HtmlColor getBackColor(HtmlColor backColor, ISkinParam skinParam, Stereotype stereotype) { if (backColor == null) { backColor = skinParam.getHtmlColor(ColorParam.packageBackground, stereotype, false); } if (backColor == null) { backColor = skinParam.getHtmlColor(ColorParam.background, stereotype, false); } if (backColor == null /* || stateBack instanceof HtmlColorTransparent */) { backColor = new HtmlColorTransparent(); } return backColor; } public double checkFolderPosition(Point2D pt, StringBounder stringBounder) { if (getClusterPosition().isPointJustUpper(pt)) { if (ztitle == null) { return 0; } final Dimension2D dimTitle = ztitle.calculateDimension(stringBounder); if (pt.getX() < getClusterPosition().getMinX() + dimTitle.getWidth()) { return 0; } return getClusterPosition().getMinY() - pt.getY() + dimTitle.getHeight(); } return 0; } // public Point2D projection(double x, double y) { // final double v1 = Math.abs(minX - x); // final double v2 = Math.abs(maxX - x); // final double v3 = Math.abs(minY - y); // final double v4 = Math.abs(maxY - y); // if (v1 <= v2 && v1 <= v3 && v1 <= v4) { // return new Point2D.Double(minX, y); // } // if (v2 <= v1 && v2 <= v3 && v2 <= v4) { // return new Point2D.Double(maxX, y); // } // if (v3 <= v1 && v3 <= v2 && v3 <= v4) { // return new Point2D.Double(x, minY); // } // if (v4 <= v1 && v4 <= v1 && v4 <= v3) { // return new Point2D.Double(x, maxY); // } // throw new IllegalStateException(); // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/ClusterDecoration.java000066400000000000000000000213601312650303100266600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * Modified by : Arno Peterson * * */ package net.sourceforge.plantuml.svek; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class ClusterDecoration { private final UStroke defaultStroke;// = new UStroke(2); final private USymbol symbol; final private TextBlock title; final private TextBlock stereo; final private double minX; final private double minY; final private double maxX; final private double maxY; public ClusterDecoration(PackageStyle style, USymbol symbol, TextBlock title, TextBlock stereo, double minX, double minY, double maxX, double maxY, UStroke stroke) { this.symbol = guess(symbol, style); this.stereo = stereo; this.title = title; this.minX = minX; this.minY = minY; this.maxX = maxX; this.maxY = maxY; this.defaultStroke = stroke; // if (stateBack instanceof HtmlColorTransparent) { // throw new UnsupportedOperationException(); // } } private static USymbol guess(USymbol symbol, PackageStyle style) { if (symbol != null) { return symbol; } return style.toUSymbol(); } public final static int marginTitleX1 = 3; public final static int marginTitleX2 = 3; public final static int marginTitleX3 = 7; public final static int marginTitleY0 = 0; public final static int marginTitleY1 = 3; public final static int marginTitleY2 = 3; public void drawU(UGraphic ug, HtmlColor backColor, HtmlColor borderColor, boolean shadowing, double roundCorner) { final SymbolContext biColor = new SymbolContext(backColor, borderColor); if (symbol == null) { throw new UnsupportedOperationException(); } final SymbolContext symbolContext = biColor.withShadow(shadowing).withStroke(defaultStroke) .withRoundCorner(roundCorner); symbol.asBig(title, stereo, maxX - minX, maxY - minY, symbolContext) .drawU(ug.apply(new UTranslate(minX, minY))); // return; // } // if (style == PackageStyle.NODE) { // drawWithTitleNode(ug, biColor, shadowing); // } else if (style == PackageStyle.CARD) { // drawWithTitleCard(ug, biColor, shadowing); // } else if (style == PackageStyle.DATABASE) { // drawWithTitleDatabase(ug, biColor, shadowing); // } else if (style == PackageStyle.CLOUD) { // drawWithTitleCloud(ug, biColor, shadowing); // } else if (style == PackageStyle.FRAME) { // drawWithTitleFrame(ug, biColor, shadowing); // } else if (style == PackageStyle.RECT) { // drawWithTitleRect(ug, biColor, shadowing); // } else { // throw new UnsupportedOperationException(); // // drawWithTitleFolder(ug, biColor, shadowing); // } } // // Cloud // private void drawWithTitleCloud(UGraphic ug, SymbolContext biColor, boolean shadowing) { // final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); // final double width = maxX - minX; // final double height = maxY - minY; // ug = biColor.applyColors(ug); // ug = ug.apply(defaultStroke); // PackageStyle.CLOUD.drawU(ug.apply(new UTranslate(minX, minY)), new Dimension2DDouble(width, height), dimTitle, // shadowing); // ug = ug.apply(new UStroke()); // title.drawU(ug.apply(new UTranslate(minX + (width - dimTitle.getWidth()) / 2, minY + 10))); // // } // // // Database // private void drawWithTitleDatabase(UGraphic ug, SymbolContext biColor, boolean shadowing) { // final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); // final double width = maxX - minX; // final double height = maxY - minY; // ug = ug.apply(defaultStroke); // ug = biColor.applyColors(ug); // PackageStyle.DATABASE.drawU(ug.apply(new UTranslate(minX, minY - 10)), // new Dimension2DDouble(width, height + 10), dimTitle, shadowing); // ug = ug.apply(new UStroke()); // title.drawU(ug.apply(new UTranslate(minX + marginTitleX1, minY + 10))); // // } // // // Corner // private void drawWithTitleFrame(UGraphic ug, SymbolContext biColor, boolean shadowing) { // final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); // final double width = maxX - minX; // final double height = maxY - minY; // ug = biColor.applyColors(ug); // ug = ug.apply(defaultStroke); // PackageStyle.FRAME.drawU(ug.apply(new UTranslate(minX, minY)), new Dimension2DDouble(width, height), dimTitle, // shadowing); // ug = ug.apply(new UStroke()); // title.drawU(ug.apply(new UTranslate(minX + marginTitleX1, minY))); // // } // // // Card // private void drawWithTitleCard(UGraphic ug, SymbolContext biColor, boolean shadowing) { // final double width = maxX - minX; // final double height = maxY - minY; // final SymbolContext ctx = biColor.withStroke(defaultStroke).withShadow(shadowing); // USymbol.CARD.asBig(title, TextBlockUtils.empty(0, 0), width + 10, height, ctx).drawU( // ug.apply(new UTranslate(minX, minY))); // } // // // Node // private void drawWithTitleNode(UGraphic ug, SymbolContext biColor, boolean shadowing) { // final double width = maxX - minX; // final double height = maxY - minY; // final SymbolContext ctx = biColor.withStroke(defaultStroke).withShadow(shadowing); // USymbol.NODE.asBig(title, TextBlockUtils.empty(0, 0), width + 10, height, ctx).drawU( // ug.apply(new UTranslate(minX, minY))); // } // // // Folder // private UPolygon getSpecificFrontierForFolder(StringBounder stringBounder) { // final double width = maxX - minX; // final double height = maxY - minY; // final Dimension2D dimTitle = title.calculateDimension(stringBounder); // final double wtitle = dimTitle.getWidth() + marginTitleX1 + marginTitleX2; // final double htitle = dimTitle.getHeight() + marginTitleY1 + marginTitleY2; // final UPolygon shape = new UPolygon(); // shape.addPoint(0, 0); // shape.addPoint(wtitle, 0); // shape.addPoint(wtitle + marginTitleX3, htitle); // shape.addPoint(width, htitle); // shape.addPoint(width, height); // shape.addPoint(0, height); // shape.addPoint(0, 0); // return shape; // } // // private void drawWithTitleFolder(UGraphic ug, SymbolContext biColor, boolean shadowing) { // final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); // final double wtitle = dimTitle.getWidth() + marginTitleX1 + marginTitleX2; // final double htitle = dimTitle.getHeight() + marginTitleY1 + marginTitleY2; // final UPolygon shape = getSpecificFrontierForFolder(ug.getStringBounder()); // if (shadowing) { // shape.setDeltaShadow(3.0); // } // // ug = biColor.applyColors(ug); // ug = ug.apply(defaultStroke); // ug.apply(new UTranslate(minX, minY)).draw(shape); // ug.apply(new UTranslate(minX, minY + htitle)).draw(new ULine(wtitle + marginTitleX3, 0)); // ug = ug.apply(new UStroke()); // title.drawU(ug.apply(new UTranslate(minX + marginTitleX1, minY + marginTitleY1))); // } // // // Rect // private void drawWithTitleRect(UGraphic ug, SymbolContext biColor, boolean shadowing) { // final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); // final double width = maxX - minX; // final double height = maxY - minY; // final URectangle shape = new URectangle(width, height); // if (shadowing) { // shape.setDeltaShadow(3.0); // } // // ug = biColor.applyColors(ug); // ug = ug.apply(defaultStroke); // // ug.apply(new UTranslate(minX, minY)).draw(shape); // ug = ug.apply(new UStroke()); // final double deltax = width - dimTitle.getWidth(); // title.drawU(ug.apply(new UTranslate(minX + deltax / 2, minY + 5))); // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/ClusterPosition.java000066400000000000000000000137371312650303100264060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.CubicCurve2D; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.posimo.BezierUtils; public class ClusterPosition { private final double minX; private final double minY; private final double maxX; private final double maxY; public ClusterPosition(double minX, double minY, double maxX, double maxY) { this.minX = minX; this.minY = minY; this.maxX = maxX; this.maxY = maxY; } public boolean contains(double x, double y) { return x >= minX && x < maxX && y >= minY && y < maxY; } public ClusterPosition merge(ClusterPosition other) { return new ClusterPosition(Math.min(this.minX, other.minX), Math.min(this.minY, other.minY), Math.max( this.maxX, other.maxX), Math.max(this.maxY, other.maxY)); } public ClusterPosition merge(Point2D point) { final double x = point.getX(); final double y = point.getY(); return new ClusterPosition(Math.min(this.minX, x), Math.min(this.minY, y), Math.max(this.maxX, x), Math.max( this.maxY, y)); } public boolean contains(Point2D p) { return contains(p.getX(), p.getY()); } @Override public String toString() { return "minX=" + minX + " maxX=" + maxX + " minY=" + minY + " maxY=" + maxY; } public final double getMinX() { return minX; } public final double getMinY() { return minY; } public final double getMaxX() { return maxX; } public final double getMaxY() { return maxY; } public PointDirected getIntersection(CubicCurve2D.Double bez) { if (contains(bez.x1, bez.y1) == contains(bez.x2, bez.y2)) { return null; } final double dist = bez.getP1().distance(bez.getP2()); if (dist < 2) { final double angle = BezierUtils.getStartingAngle(bez); return new PointDirected(bez.getP1(), angle); } final CubicCurve2D.Double left = new CubicCurve2D.Double(); final CubicCurve2D.Double right = new CubicCurve2D.Double(); bez.subdivide(left, right); final PointDirected int1 = getIntersection(left); if (int1 != null) { return int1; } final PointDirected int2 = getIntersection(right); if (int2 != null) { return int2; } throw new IllegalStateException(); } public Point2D getPointCenter() { return new Point2D.Double((minX + maxX) / 2, (minY + maxY) / 2); } public ClusterPosition withMinX(double d) { return new ClusterPosition(d, minY, maxX, maxY); } public ClusterPosition withMaxX(double d) { return new ClusterPosition(minX, minY, d, maxY); } public ClusterPosition addMaxX(double d) { return new ClusterPosition(minX, minY, maxX + d, maxY); } public ClusterPosition addMaxY(double d) { return new ClusterPosition(minX, minY, maxX, maxY + d); } public ClusterPosition addMinX(double d) { return new ClusterPosition(minX + d, minY, maxX, maxY); } public ClusterPosition addMinY(double d) { return new ClusterPosition(minX, minY + d, maxX, maxY); } public ClusterPosition withMinY(double d) { return new ClusterPosition(minX, d, maxX, maxY); } public ClusterPosition withMaxY(double d) { return new ClusterPosition(minX, minY, maxX, d); } public Point2D getProjectionOnFrontier(Point2D pt) { final double x = pt.getX(); final double y = pt.getY(); if (x > maxX && y >= minY && y <= maxY) { return new Point2D.Double(maxX - 1, y); } if (x < minX && y >= minY && y <= maxY) { return new Point2D.Double(minX + 1, y); } if (y > maxY && x >= minX && x <= maxX) { return new Point2D.Double(x, maxY - 1); } if (y < minY && x >= minX && x <= maxX) { return new Point2D.Double(x, minY + 1); } return new Point2D.Double(x, y); } public ClusterPosition delta(double m1, double m2) { return new ClusterPosition(minX, minY, maxX + m1, maxY + m2); } public Dimension2D getDimension() { return new Dimension2DDouble(maxX - minX, maxY - minY); } public boolean isPointJustUpper(Point2D pt) { if (pt.getX() >= minX && pt.getX() <= maxX && pt.getY() <= minY) { return true; } return false; } public Side getClosestSide(Point2D pt) { final double distNorth = Math.abs(minY - pt.getY()); final double distSouth = Math.abs(maxY - pt.getY()); final double distWest = Math.abs(minX - pt.getX()); final double distEast = Math.abs(maxX - pt.getX()); if (isSmallerThan(distNorth, distWest, distEast, distSouth)) { return Side.NORTH; } if (isSmallerThan(distSouth, distNorth, distWest, distEast)) { return Side.SOUTH; } if (isSmallerThan(distEast, distNorth, distWest, distSouth)) { return Side.EAST; } if (isSmallerThan(distWest, distNorth, distEast, distSouth)) { return Side.WEST; } return null; } private boolean isSmallerThan(double value, double a, double b, double c) { return value <= a && value <= b && value <= c; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/ColorSequence.java000066400000000000000000000027211312650303100257760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.util.concurrent.atomic.AtomicInteger; public class ColorSequence { private final AtomicInteger cpt = new AtomicInteger(1); public int getValue() { return cpt.addAndGet(1); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/ConcurrentStateImage.java000066400000000000000000000115471312650303100273230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import java.util.ArrayList; import java.util.Collection; import java.util.List; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public final class ConcurrentStateImage extends AbstractTextBlock implements IEntityImage { private final List inners = new ArrayList(); private final Separator separator; private final ISkinParam skinParam; private final HtmlColor backColor; static enum Separator { VERTICAL, HORIZONTAL; static Separator fromChar(char sep) { if (sep == '|') { return VERTICAL; } if (sep == '-') { return HORIZONTAL; } throw new IllegalArgumentException(); } UTranslate move(Dimension2D dim) { if (this == VERTICAL) { return new UTranslate(dim.getWidth(), 0); } return new UTranslate(0, dim.getHeight()); } Dimension2D add(Dimension2D orig, Dimension2D other) { if (this == VERTICAL) { return new Dimension2DDouble(orig.getWidth() + other.getWidth(), Math.max(orig.getHeight(), other.getHeight())); } return new Dimension2DDouble(Math.max(orig.getWidth(), other.getWidth()), orig.getHeight() + other.getHeight()); } void drawSeparator(UGraphic ug, Dimension2D dimTotal) { final double THICKNESS_BORDER = 1.5; final int DASH = 8; ug = ug.apply(new UStroke(DASH, 10, THICKNESS_BORDER)); if (this == VERTICAL) { ug.draw(new ULine(0, dimTotal.getHeight() + DASH)); } else { ug.draw(new ULine(dimTotal.getWidth() + DASH, 0)); } } } private HtmlColor getColor(ColorParam colorParam) { return new Rose().getHtmlColor(skinParam, colorParam); } public ConcurrentStateImage(Collection images, char concurrentSeparator, ISkinParam skinParam, HtmlColor backColor) { this.separator = Separator.fromChar(concurrentSeparator); this.skinParam = skinParam; this.backColor = skinParam.getBackgroundColor(); this.inners.addAll(images); } public void drawU(UGraphic ug) { System.err.println("drawing " + inners.size()); final HtmlColor dotColor = getColor(ColorParam.stateBorder); final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimTotal = calculateDimension(stringBounder); for (int i = 0; i < inners.size(); i++) { final IEntityImage inner = inners.get(i); inner.drawU(ug); final Dimension2D dim = inner.calculateDimension(stringBounder); ug = ug.apply(separator.move(dim)); if (i < inners.size() - 1) { separator.drawSeparator(ug.apply(new UChangeColor(dotColor)), dimTotal); } } } public Dimension2D calculateDimension(StringBounder stringBounder) { Dimension2D result = new Dimension2DDouble(0, 0); for (IEntityImage inner : inners) { final Dimension2D dim = inner.calculateDimension(stringBounder); result = separator.add(result, dim); } return result; } public HtmlColor getBackcolor() { return backColor; } public boolean isHidden() { return false; } public Margins getShield(StringBounder stringBounder) { return Margins.NONE; } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/ConditionStyle.java000066400000000000000000000031221312650303100261720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * Modified by : Arno Peterson * * */ package net.sourceforge.plantuml.svek; import java.util.EnumSet; public enum ConditionStyle { DIAMOND, INSIDE, FOO1; public static ConditionStyle fromString(String value) { for (ConditionStyle p : EnumSet.allOf(ConditionStyle.class)) { if (p.toString().equalsIgnoreCase(value)) { return p; } } return null; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/Control.java000066400000000000000000000060361312650303100246520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Control extends AbstractTextBlock implements TextBlock { private final double margin = 4; private final double radius = 12; private final SymbolContext symbolContext; public Control(SymbolContext symbolContext) { this.symbolContext = symbolContext; } public void drawU(UGraphic ug) { double x = 0; double y = 0; x += margin; y += margin; ug = symbolContext.apply(ug); final UEllipse circle = new UEllipse(radius * 2, radius * 2); circle.setDeltaShadow(symbolContext.getDeltaShadow()); ug.apply(new UTranslate(x, y)).draw(circle); ug = ug.apply(new UStroke()); ug = ug.apply(new UChangeBackColor(symbolContext.getForeColor())); final UPolygon polygon = new UPolygon(); polygon.addPoint(0, 0); final int xWing = 6; final int yAperture = 5; polygon.addPoint(xWing, -yAperture); final int xContact = 4; polygon.addPoint(xContact, 0); polygon.addPoint(xWing, yAperture); polygon.addPoint(0, 0); ug.apply(new UTranslate(x + radius - xContact, y)).draw(polygon); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(radius * 2 + 2 * margin, radius * 2 + 2 * margin); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/CucaDiagramFileMaker.java000066400000000000000000000031531312650303100271470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.io.IOException; import java.io.OutputStream; import java.util.List; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.ImageData; public interface CucaDiagramFileMaker { public ImageData createFile(OutputStream os, List dotStrings, FileFormatOption fileFormatOption) throws IOException; } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek.java000066400000000000000000000142311312650303100277770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.AnnotatedWorker; import net.sourceforge.plantuml.BaseFile; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.NamedOutputStream; import net.sourceforge.plantuml.Scale; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.dot.CucaDiagramSimplifierActivity; import net.sourceforge.plantuml.cucadiagram.dot.CucaDiagramSimplifierState; import net.sourceforge.plantuml.cucadiagram.dot.DotData; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public final class CucaDiagramFileMakerSvek implements CucaDiagramFileMaker { private final CucaDiagram diagram; public CucaDiagramFileMakerSvek(CucaDiagram diagram) throws IOException { this.diagram = diagram; } public ImageData createFile(OutputStream os, List dotStrings, FileFormatOption fileFormatOption) throws IOException { try { return createFileInternal(os, dotStrings, fileFormatOption); } catch (InterruptedException e) { e.printStackTrace(); throw new IOException(e); } } private DotDataImageBuilder createDotDataImageBuilder(DotMode dotMode, StringBounder stringBounder) { final DotData dotData = new DotData(diagram.getEntityFactory().getRootGroup(), getOrderedLinks(), diagram.getLeafsvalues(), diagram.getUmlDiagramType(), diagram.getSkinParam(), diagram, diagram, diagram.getColorMapper(), diagram.getEntityFactory(), diagram.isHideEmptyDescriptionForState(), dotMode, diagram.getNamespaceSeparator(), diagram.getPragma()); return new DotDataImageBuilder(dotData, diagram.getEntityFactory(), diagram.getSource(), diagram.getPragma(), stringBounder); } private ImageData createFileInternal(OutputStream os, List dotStrings, FileFormatOption fileFormatOption) throws IOException, InterruptedException { if (diagram.getUmlDiagramType() == UmlDiagramType.ACTIVITY) { new CucaDiagramSimplifierActivity(diagram, dotStrings, fileFormatOption.getDefaultStringBounder()); } else if (diagram.getUmlDiagramType() == UmlDiagramType.STATE) { new CucaDiagramSimplifierState(diagram, dotStrings, fileFormatOption.getDefaultStringBounder()); } // System.err.println("FOO11 type=" + os.getClass()); DotDataImageBuilder svek2 = createDotDataImageBuilder(DotMode.NORMAL, fileFormatOption.getDefaultStringBounder()); BaseFile basefile = null; if (fileFormatOption.isDebugSvek() && os instanceof NamedOutputStream) { basefile = ((NamedOutputStream) os).getBasefile(); } // System.err.println("FOO11 basefile=" + basefile); TextBlockBackcolored result = svek2.buildImage(basefile, diagram.getDotStringSkek()); if (result instanceof GraphvizCrash) { svek2 = createDotDataImageBuilder(DotMode.NO_LEFT_RIGHT_AND_XLABEL, fileFormatOption.getDefaultStringBounder()); result = svek2.buildImage(basefile, diagram.getDotStringSkek()); } result = new AnnotatedWorker(diagram, diagram.getSkinParam()).addAdd(result); final String widthwarning = diagram.getSkinParam().getValue("widthwarning"); String warningOrError = null; if (widthwarning != null && widthwarning.matches("\\d+")) { warningOrError = svek2.getWarningOrError(Integer.parseInt(widthwarning)); } final Dimension2D dim = result.calculateDimension(fileFormatOption.getDefaultStringBounder()); final double scale = getScale(fileFormatOption, dim); final ImageBuilder imageBuilder = new ImageBuilder(diagram.getSkinParam(), scale, fileFormatOption.isWithMetadata() ? diagram.getMetadata() : null, warningOrError, 0, 10, diagram.getAnimation(), result.getBackcolor()); imageBuilder.setUDrawable(result); return imageBuilder.writeImageTOBEMOVED(fileFormatOption, diagram.seed(), os); } private List getOrderedLinks() { final List result = new ArrayList(); for (Link l : diagram.getLinks()) { addLinkNew(result, l); } return result; } private void addLinkNew(List result, Link link) { for (int i = 0; i < result.size(); i++) { final Link other = result.get(i); if (other.sameConnections(link)) { while (i < result.size() && result.get(i).sameConnections(link)) { i++; } if (i == result.size()) { result.add(link); } else { result.add(i, link); } return; } } result.add(link); } private double getScale(FileFormatOption fileFormatOption, final Dimension2D dim) { final double scale; final Scale diagScale = diagram.getScale(); if (diagScale == null) { scale = diagram.getDpiFactor(fileFormatOption); } else { scale = diagScale.getScale(dim.getWidth(), dim.getHeight()); } return scale; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek2InternalImage.java000066400000000000000000000112351312650303100325220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import java.util.List; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public final class CucaDiagramFileMakerSvek2InternalImage extends AbstractTextBlock implements IEntityImage { private final List inners; private final Separator separator; private final ISkinParam skinParam; static enum Separator { VERTICAL, HORIZONTAL; static Separator fromChar(char sep) { if (sep == '|') { return VERTICAL; } if (sep == '-') { return HORIZONTAL; } throw new IllegalArgumentException(); } UTranslate move(Dimension2D dim) { if (this == VERTICAL) { return new UTranslate(dim.getWidth(), 0); } return new UTranslate(0, dim.getHeight()); } Dimension2D add(Dimension2D orig, Dimension2D other) { if (this == VERTICAL) { return new Dimension2DDouble(orig.getWidth() + other.getWidth(), Math.max(orig.getHeight(), other.getHeight())); } return new Dimension2DDouble(Math.max(orig.getWidth(), other.getWidth()), orig.getHeight() + other.getHeight()); } void drawSeparator(UGraphic ug, Dimension2D dimTotal) { final double THICKNESS_BORDER = 1.5; final int DASH = 8; ug = ug.apply(new UStroke(DASH, 10, THICKNESS_BORDER)); if (this == VERTICAL) { ug.draw(new ULine(0, dimTotal.getHeight() + DASH)); } else { ug.draw(new ULine(dimTotal.getWidth() + DASH, 0)); } } } private HtmlColor getColor(ColorParam colorParam) { return new Rose().getHtmlColor(skinParam, colorParam); } public CucaDiagramFileMakerSvek2InternalImage(List inners, char concurrentSeparator, ISkinParam skinParam) { this.separator = Separator.fromChar(concurrentSeparator); this.skinParam = skinParam; this.inners = inners; } public void drawU(UGraphic ug) { final HtmlColor dotColor = getColor(ColorParam.stateBorder); final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimTotal = calculateDimension(stringBounder); for (int i = 0; i < inners.size(); i++) { final IEntityImage inner = inners.get(i); inner.drawU(ug); final Dimension2D dim = inner.calculateDimension(stringBounder); ug = ug.apply(separator.move(dim)); if (i < inners.size() - 1) { separator.drawSeparator(ug.apply(new UChangeColor(dotColor)), dimTotal); } } } public Dimension2D calculateDimension(StringBounder stringBounder) { Dimension2D result = new Dimension2DDouble(0, 0); for (IEntityImage inner : inners) { final Dimension2D dim = inner.calculateDimension(stringBounder); result = separator.add(result, dim); } return result; } public HtmlColor getBackcolor() { return skinParam.getBackgroundColor(); } public boolean isHidden() { return false; } public Margins getShield(StringBounder stringBounder) { return Margins.NONE; } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/DecorateEntityImage.java000066400000000000000000000127231312650303100271200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.VerticalAlignment; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class DecorateEntityImage extends AbstractTextBlock implements TextBlockBackcolored { private final TextBlock original; private final HorizontalAlignment horizontal1; private final TextBlock text1; private final HorizontalAlignment horizontal2; private final TextBlock text2; private double deltaX; private double deltaY; public static DecorateEntityImage addTop(TextBlock original, TextBlock text, HorizontalAlignment horizontal) { return new DecorateEntityImage(original, text, horizontal, null, null); } public static DecorateEntityImage addBottom(TextBlock original, TextBlock text, HorizontalAlignment horizontal) { return new DecorateEntityImage(original, null, null, text, horizontal); } public static DecorateEntityImage add(TextBlock original, TextBlock text, HorizontalAlignment horizontal, VerticalAlignment verticalAlignment) { if (verticalAlignment == VerticalAlignment.TOP) { return addTop(original, text, horizontal); } return addBottom(original, text, horizontal); } public DecorateEntityImage(TextBlock original, TextBlock text1, HorizontalAlignment horizontal1, TextBlock text2, HorizontalAlignment horizontal2) { this.original = original; this.horizontal1 = horizontal1; this.text1 = text1; this.horizontal2 = horizontal2; this.text2 = text2; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimOriginal = original.calculateDimension(stringBounder); final Dimension2D dimText1 = getTextDim(text1, stringBounder); final Dimension2D dimText2 = getTextDim(text2, stringBounder); final Dimension2D dimTotal = calculateDimension(stringBounder); final double yImage = dimText1.getHeight(); final double yText2 = yImage + dimOriginal.getHeight(); final double xImage = (dimTotal.getWidth() - dimOriginal.getWidth()) / 2; if (text1 != null) { final double xText1 = getTextX(dimText1, dimTotal, horizontal1); text1.drawU(ug.apply(new UTranslate(xText1, 0))); } original.drawU(ug.apply(new UTranslate(xImage, yImage))); deltaX = xImage; deltaY = yImage; if (text2 != null) { final double xText2 = getTextX(dimText2, dimTotal, horizontal2); text2.drawU(ug.apply(new UTranslate(xText2, yText2))); } } private Dimension2D getTextDim(TextBlock text, StringBounder stringBounder) { if (text == null) { return new Dimension2DDouble(0, 0); } return text.calculateDimension(stringBounder); } private double getTextX(final Dimension2D dimText, final Dimension2D dimTotal, HorizontalAlignment h) { if (h == HorizontalAlignment.CENTER) { return (dimTotal.getWidth() - dimText.getWidth()) / 2; } else if (h == HorizontalAlignment.LEFT) { return 0; } else if (h == HorizontalAlignment.RIGHT) { return dimTotal.getWidth() - dimText.getWidth(); } else { throw new IllegalStateException(); } } public HtmlColor getBackcolor() { if (original instanceof TextBlockBackcolored) { return ((TextBlockBackcolored) original).getBackcolor(); } throw new UnsupportedOperationException(); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimOriginal = original.calculateDimension(stringBounder); final Dimension2D dimText = Dimension2DDouble.mergeTB(getTextDim(text1, stringBounder), getTextDim(text2, stringBounder)); return Dimension2DDouble.mergeTB(dimOriginal, dimText); } public final double getDeltaX() { if (original instanceof DecorateEntityImage) { return deltaX + ((DecorateEntityImage) original).deltaX; } return deltaX; } public final double getDeltaY() { if (original instanceof DecorateEntityImage) { return deltaY + ((DecorateEntityImage) original).deltaY; } return deltaY; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/DecorateEntityImage3.java000066400000000000000000000041131312650303100271750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UGraphic; public class DecorateEntityImage3 extends AbstractTextBlock implements TextBlockBackcolored { private final TextBlock original; private final HtmlColor color; public DecorateEntityImage3(TextBlock original, HtmlColor color) { this.original = original; this.color = color; } public Dimension2D calculateDimension(StringBounder stringBounder) { return original.calculateDimension(stringBounder); } public void drawU(UGraphic ug) { original.drawU(ug); } public HtmlColor getBackcolor() { return color; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/DotDataImageBuilder.java000066400000000000000000000530411312650303100270220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sourceforge.plantuml.BaseFile; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.Pragma; import net.sourceforge.plantuml.SkinParamForecolored; import net.sourceforge.plantuml.SkinParamSameClassWidth; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.cucadiagram.Code; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.EntityPosition; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.Member; import net.sourceforge.plantuml.cucadiagram.MethodsOrFieldsArea; import net.sourceforge.plantuml.cucadiagram.PortionShower; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.UnparsableGraphvizException; import net.sourceforge.plantuml.cucadiagram.dot.DotData; import net.sourceforge.plantuml.cucadiagram.dot.ExeState; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizVersion; import net.sourceforge.plantuml.cucadiagram.dot.Neighborhood; import net.sourceforge.plantuml.cucadiagram.entity.EntityFactory; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockEmpty; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.TextBlockWidth; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.USymbolInterface; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.svek.image.EntityImageActivity; import net.sourceforge.plantuml.svek.image.EntityImageArcCircle; import net.sourceforge.plantuml.svek.image.EntityImageAssociation; import net.sourceforge.plantuml.svek.image.EntityImageAssociationPoint; import net.sourceforge.plantuml.svek.image.EntityImageBranch; import net.sourceforge.plantuml.svek.image.EntityImageCircleEnd; import net.sourceforge.plantuml.svek.image.EntityImageCircleStart; import net.sourceforge.plantuml.svek.image.EntityImageClass; import net.sourceforge.plantuml.svek.image.EntityImageDescription; import net.sourceforge.plantuml.svek.image.EntityImageEmptyPackage; import net.sourceforge.plantuml.svek.image.EntityImageGroup; import net.sourceforge.plantuml.svek.image.EntityImageLollipopInterface; import net.sourceforge.plantuml.svek.image.EntityImageLollipopInterfaceEye1; import net.sourceforge.plantuml.svek.image.EntityImageLollipopInterfaceEye2; import net.sourceforge.plantuml.svek.image.EntityImageNote; import net.sourceforge.plantuml.svek.image.EntityImageObject; import net.sourceforge.plantuml.svek.image.EntityImagePseudoState; import net.sourceforge.plantuml.svek.image.EntityImageState; import net.sourceforge.plantuml.svek.image.EntityImageState2; import net.sourceforge.plantuml.svek.image.EntityImageStateBorder; import net.sourceforge.plantuml.svek.image.EntityImageStateEmptyDescription; import net.sourceforge.plantuml.svek.image.EntityImageSynchroBar; import net.sourceforge.plantuml.svek.image.EntityImageTips; import net.sourceforge.plantuml.svek.image.EntityImageUseCase; import net.sourceforge.plantuml.ugraphic.sprite.Sprite; public final class DotDataImageBuilder { private final DotData dotData; private final EntityFactory entityFactory; private final UmlSource source; private final Pragma pragma; private Map maxX; private final StringBounder stringBounder; public DotDataImageBuilder(DotData dotData, EntityFactory entityFactory, UmlSource source, Pragma pragma, StringBounder stringBounder) { this.dotData = dotData; this.entityFactory = entityFactory; this.source = source; this.pragma = pragma; this.stringBounder = stringBounder; } public IEntityImage buildImage(BaseFile basefile, String dotStrings[]) { dotData.removeIrrelevantSametail(); final DotStringFactory dotStringFactory = new DotStringFactory(stringBounder, dotData); printGroups(dotStringFactory, dotData.getRootGroup()); printEntities(dotStringFactory, getUnpackagedEntities()); for (Link link : dotData.getLinks()) { if (link.isRemoved()) { continue; } try { final ISkinParam skinParam = dotData.getSkinParam(); final FontConfiguration labelFont = new FontConfiguration(skinParam, FontParam.ARROW, null); final Line line = new Line(link, dotStringFactory.getColorSequence(), skinParam, stringBounder, labelFont, dotStringFactory.getBibliotekon(), dotData.getPragma()); dotStringFactory.getBibliotekon().addLine(line); if (link.getEntity1().isGroup() == false && link.getEntity1().getLeafType() == LeafType.NOTE && onlyOneLink(link.getEntity1())) { final Shape shape = dotStringFactory.getBibliotekon().getShape(link.getEntity1()); final Shape other = dotStringFactory.getBibliotekon().getShape(link.getEntity2()); if (other != null) { ((EntityImageNote) shape.getImage()).setOpaleLine(line, shape, other); line.setOpale(true); } } else if (link.getEntity2().isGroup() == false && link.getEntity2().getLeafType() == LeafType.NOTE && onlyOneLink(link.getEntity2())) { final Shape shape = dotStringFactory.getBibliotekon().getShape(link.getEntity2()); final Shape other = dotStringFactory.getBibliotekon().getShape(link.getEntity1()); if (other != null) { ((EntityImageNote) shape.getImage()).setOpaleLine(line, shape, other); line.setOpale(true); } } } catch (IllegalStateException e) { e.printStackTrace(); } } if (dotStringFactory.illegalDotExe()) { return error(dotStringFactory.getDotExe()); } // final boolean trace = OptionFlags.getInstance().isKeepTmpFiles() || OptionFlags.TRACE_DOT || isSvekTrace(); // option.isDebugSvek // System.err.println("FOO11 svekDebug=" + svekDebug); if (basefile == null && isSvekTrace()) { basefile = new BaseFile(); } // System.err.println("FOO11 basefile=" + basefile); final String svg; try { svg = dotStringFactory.getSvg(basefile, dotStrings); } catch (IOException e) { return new GraphvizCrash(source.getPlainString()); } if (svg.length() == 0) { return new GraphvizCrash(source.getPlainString()); } final String graphvizVersion = extractGraphvizVersion(svg); try { final ClusterPosition position = dotStringFactory.solve(svg).delta(10, 10); final double minY = position.getMinY(); final double minX = position.getMinX(); if (minX > 0 || minY > 0) { throw new IllegalStateException(); } final SvekResult result = new SvekResult(position, dotData, dotStringFactory); result.moveSvek(6 - minX, -minY); this.maxX = dotStringFactory.getBibliotekon().getMaxX(); return result; } catch (Exception e) { Log.error("Exception " + e); throw new UnparsableGraphvizException(e, graphvizVersion, svg, source.getPlainString()); } } private boolean isSvekTrace() { final String value = pragma.getValue("svek_trace"); return "true".equalsIgnoreCase(value) || "on".equalsIgnoreCase(value); } private String extractGraphvizVersion(String svg) { final Pattern pGraph = Pattern.compile("(?mi)!-- generated by graphviz(.*)"); final Matcher mGraph = pGraph.matcher(svg); if (mGraph.find()) { return StringUtils.trin(mGraph.group(1)); } return null; } private boolean onlyOneLink(IEntity ent) { int nb = 0; for (Link link : dotData.getLinks()) { if (link.isInvis()) { continue; } if (link.contains(ent)) { nb++; } if (nb > 1) { return false; } } return nb == 1; } private IEntityImage error(File dotExe) { final List msg = new ArrayList(); msg.add("Dot Executable: " + dotExe); final ExeState exeState = ExeState.checkFile(dotExe); msg.add(exeState.getTextMessage()); msg.add("Cannot find Graphviz. You should try"); msg.add(" "); msg.add("@startuml"); msg.add("testdot"); msg.add("@enduml"); msg.add(" "); msg.add(" or "); msg.add(" "); msg.add("java -jar plantuml.jar -testdot"); msg.add(" "); return GraphicStrings.createForError(msg, false); } private void printEntities(DotStringFactory dotStringFactory, Collection entities2) { for (ILeaf ent : entities2) { if (ent.isRemoved()) { continue; } printEntity(dotStringFactory, ent); } } private void printEntity(DotStringFactory dotStringFactory, ILeaf ent) { if (ent.isRemoved()) { throw new IllegalStateException(); } final IEntityImage image = printEntityInternal(dotStringFactory, ent); final Dimension2D dim = image.calculateDimension(stringBounder); final Shape shape = new Shape(image, image.getShapeType(), dim.getWidth(), dim.getHeight(), dotStringFactory.getColorSequence(), ent.isTop(), image.getShield(stringBounder), ent.getEntityPosition()); dotStringFactory.addShape(shape); dotStringFactory.getBibliotekon().putShape(ent, shape); } private IEntityImage printEntityInternal(DotStringFactory dotStringFactory, ILeaf ent) { if (ent.isRemoved()) { throw new IllegalStateException(); } if (ent.getSvekImage() == null) { ISkinParam skinParam = dotData.getSkinParam(); if (skinParam.sameClassWidth()) { final double width = getMaxWidth(dotStringFactory); skinParam = new SkinParamSameClassWidth(skinParam, width); } return createEntityImageBlock(ent, skinParam, dotData.isHideEmptyDescriptionForState(), dotData, dotStringFactory.getBibliotekon(), dotStringFactory.getGraphvizVersion(), dotData.getUmlDiagramType(), dotData.getLinks()); } return ent.getSvekImage(); } private double getMaxWidth(DotStringFactory dotStringFactory) { double result = 0; for (ILeaf ent : dotData.getLeafs()) { if (ent.getLeafType().isLikeClass() == false) { continue; } final IEntityImage im = new EntityImageClass(dotStringFactory.getGraphvizVersion(), ent, dotData.getSkinParam(), dotData); final double w = im.calculateDimension(stringBounder).getWidth(); if (w > result) { result = w; } } return result; } public static IEntityImage createEntityImageBlock(ILeaf leaf, ISkinParam skinParam, boolean isHideEmptyDescriptionForState, PortionShower portionShower, Bibliotekon bibliotekon, GraphvizVersion graphvizVersion, UmlDiagramType umlDiagramType, Collection links) { if (leaf.isRemoved()) { throw new IllegalStateException(); } if (leaf.getLeafType().isLikeClass()) { final EntityImageClass entityImageClass = new EntityImageClass(graphvizVersion, (ILeaf) leaf, skinParam, portionShower); final Neighborhood neighborhood = leaf.getNeighborhood(); if (neighborhood != null) { return new EntityImageProtected(entityImageClass, 20, neighborhood, bibliotekon); } return entityImageClass; } if (leaf.getLeafType() == LeafType.NOTE) { return new EntityImageNote(leaf, skinParam); } if (leaf.getLeafType() == LeafType.ACTIVITY) { return new EntityImageActivity(leaf, skinParam, bibliotekon); } if (leaf.getLeafType() == LeafType.STATE) { if (leaf.getEntityPosition() != EntityPosition.NORMAL) { final Cluster stateParent = bibliotekon.getCluster(leaf.getParentContainer()); return new EntityImageStateBorder(leaf, skinParam, stateParent, bibliotekon); } if (isHideEmptyDescriptionForState && leaf.getBodier().getFieldsToDisplay().size() == 0) { return new EntityImageStateEmptyDescription(leaf, skinParam); } if (leaf.getStereotype() != null && "<>".equals(leaf.getStereotype().getLabel(false))) { return new EntityImageState2(leaf, skinParam); } return new EntityImageState(leaf, skinParam); } if (leaf.getLeafType() == LeafType.CIRCLE_START) { ColorParam param = ColorParam.activityStart; if (umlDiagramType == UmlDiagramType.STATE) { param = ColorParam.stateStart; } return new EntityImageCircleStart(leaf, skinParam, param); } if (leaf.getLeafType() == LeafType.CIRCLE_END) { ColorParam param = ColorParam.activityEnd; if (umlDiagramType == UmlDiagramType.STATE) { param = ColorParam.stateEnd; } return new EntityImageCircleEnd(leaf, skinParam, param); } if (leaf.getLeafType() == LeafType.BRANCH || leaf.getLeafType() == LeafType.STATE_CHOICE) { return new EntityImageBranch(leaf, skinParam); } if (leaf.getLeafType() == LeafType.LOLLIPOP) { return new EntityImageLollipopInterface(leaf, skinParam); } if (leaf.getLeafType() == LeafType.CIRCLE) { return new EntityImageDescription(leaf, skinParam, portionShower, links); } if (leaf.getLeafType() == LeafType.DESCRIPTION) { if (OptionFlags.USE_INTERFACE_EYE1 && leaf.getUSymbol() instanceof USymbolInterface) { return new EntityImageLollipopInterfaceEye1(leaf, skinParam, bibliotekon); } else if (OptionFlags.USE_INTERFACE_EYE2 && leaf.getUSymbol() instanceof USymbolInterface) { return new EntityImageLollipopInterfaceEye2(leaf, skinParam, portionShower); } else { return new EntityImageDescription(leaf, skinParam, portionShower, links); } } if (leaf.getLeafType() == LeafType.USECASE) { return new EntityImageUseCase(leaf, skinParam); } // if (leaf.getEntityType() == LeafType.CIRCLE_INTERFACE) { // return new EntityImageCircleInterface(leaf, skinParam); // } if (leaf.getLeafType() == LeafType.OBJECT) { return new EntityImageObject(leaf, skinParam, portionShower); } if (leaf.getLeafType() == LeafType.SYNCHRO_BAR || leaf.getLeafType() == LeafType.STATE_FORK_JOIN) { return new EntityImageSynchroBar(leaf, skinParam); } if (leaf.getLeafType() == LeafType.ARC_CIRCLE) { return new EntityImageArcCircle(leaf, skinParam); } if (leaf.getLeafType() == LeafType.POINT_FOR_ASSOCIATION) { return new EntityImageAssociationPoint(leaf, skinParam); } if (leaf.isGroup()) { return new EntityImageGroup(leaf, skinParam); } if (leaf.getLeafType() == LeafType.EMPTY_PACKAGE) { if (leaf.getUSymbol() != null) { return new EntityImageDescription(leaf, new SkinParamForecolored(skinParam, HtmlColorUtils.BLACK), portionShower, links); } return new EntityImageEmptyPackage(leaf, skinParam, portionShower); } if (leaf.getLeafType() == LeafType.ASSOCIATION) { return new EntityImageAssociation(leaf, skinParam); } if (leaf.getLeafType() == LeafType.PSEUDO_STATE) { return new EntityImagePseudoState(leaf, skinParam); } if (leaf.getLeafType() == LeafType.TIPS) { return new EntityImageTips(leaf, skinParam, bibliotekon); } throw new UnsupportedOperationException(leaf.getLeafType().toString()); } private Collection getUnpackagedEntities() { final List result = new ArrayList(); for (ILeaf ent : dotData.getLeafs()) { if (dotData.getTopParent() == ent.getParentContainer()) { result.add(ent); } } return result; } private void printGroups(DotStringFactory dotStringFactory, IGroup parent) { for (IGroup g : dotData.getGroupHierarchy().getChildrenGroups(parent)) { if (g.isRemoved()) { continue; } if (dotData.isEmpty(g) && g.getGroupType() == GroupType.PACKAGE) { final ILeaf folder = entityFactory.createLeaf(g.getCode(), g.getDisplay(), LeafType.EMPTY_PACKAGE, g.getParentContainer(), null, dotData.getNamespaceSeparator()); final USymbol symbol = g.getUSymbol(); folder.setUSymbol(symbol); folder.setStereotype(g.getStereotype()); if (g.getUrl99() != null) { folder.addUrl(g.getUrl99()); } if (g.getColors(dotData.getSkinParam()).getColor(ColorType.BACK) == null) { final ColorParam param = symbol == null ? ColorParam.packageBackground : symbol.getColorParamBack(); final HtmlColor c1 = dotData.getSkinParam().getHtmlColor(param, g.getStereotype(), false); folder.setSpecificColorTOBEREMOVED(ColorType.BACK, c1 == null ? dotData.getSkinParam() .getBackgroundColor() : c1); } else { folder.setSpecificColorTOBEREMOVED(ColorType.BACK, g.getColors(dotData.getSkinParam()).getColor(ColorType.BACK)); } printEntity(dotStringFactory, folder); } else { printGroup(dotStringFactory, g); } } } private void printGroup(DotStringFactory dotStringFactory, IGroup g) { if (g.getGroupType() == GroupType.CONCURRENT_STATE) { return; } int titleAndAttributeWidth = 0; int titleAndAttributeHeight = 0; final TextBlock title = getTitleBlock(g); final TextBlock stereo = getStereoBlock(g); final TextBlock stereoAndTitle = TextBlockUtils.mergeTB(stereo, title, HorizontalAlignment.CENTER); final Dimension2D dimLabel = stereoAndTitle.calculateDimension(stringBounder); if (dimLabel.getWidth() > 0) { final List members = ((IEntity) g).getBodier().getFieldsToDisplay(); final TextBlockWidth attribute; if (members.size() == 0) { attribute = new TextBlockEmpty(); } else { attribute = new MethodsOrFieldsArea(members, FontParam.STATE_ATTRIBUTE, dotData.getSkinParam(), g.getStereotype(), null); } final Dimension2D dimAttribute = attribute.calculateDimension(stringBounder); final double attributeHeight = dimAttribute.getHeight(); final double attributeWidth = dimAttribute.getWidth(); final double marginForFields = attributeHeight > 0 ? IEntityImage.MARGIN : 0; final USymbol uSymbol = g.getUSymbol(); final int suppHeightBecauseOfShape = uSymbol == null ? 0 : uSymbol.suppHeightBecauseOfShape(); final int suppWidthBecauseOfShape = uSymbol == null ? 0 : uSymbol.suppWidthBecauseOfShape(); titleAndAttributeWidth = (int) Math.max(dimLabel.getWidth(), attributeWidth) + suppWidthBecauseOfShape; titleAndAttributeHeight = (int) (dimLabel.getHeight() + attributeHeight + marginForFields + suppHeightBecauseOfShape); } dotStringFactory.openCluster(g, titleAndAttributeWidth, titleAndAttributeHeight, title, stereo); this.printEntities(dotStringFactory, g.getLeafsDirect()); printGroups(dotStringFactory, g); dotStringFactory.closeCluster(); } private TextBlock getTitleBlock(IGroup g) { final Display label = g.getDisplay(); if (label == null) { return TextBlockUtils.empty(0, 0); } final ISkinParam skinParam = dotData.getSkinParam(); final FontConfiguration fontConfiguration = g.getFontConfigurationForTitle(skinParam); return label.create(fontConfiguration, HorizontalAlignment.CENTER, skinParam); } private TextBlock getStereoBlock(IGroup g) { final Stereotype stereotype = g.getStereotype(); if (stereotype == null) { return TextBlockUtils.empty(0, 0); } if (stereotype.getSprite() != null) { final Sprite tmp = dotData.getSkinParam().getSprite(stereotype.getSprite()); if (tmp != null) { return tmp.asTextBlock(stereotype.getHtmlColor(), 1); } } final List stereos = stereotype.getLabels(dotData.getSkinParam().useGuillemet()); if (stereos == null) { return TextBlockUtils.empty(0, 0); } final boolean show = dotData.showPortion(EntityPortion.STEREOTYPE, g); if (show == false) { return TextBlockUtils.empty(0, 0); } final FontParam fontParam = FontParam.PACKAGE_STEREOTYPE; return Display.create(stereos).create(new FontConfiguration(dotData.getSkinParam(), fontParam, stereotype), HorizontalAlignment.CENTER, dotData.getSkinParam()); } public String getWarningOrError(int warningOrError) { if (maxX == null) { return ""; } final StringBuilder sb = new StringBuilder(); for (Map.Entry ent : maxX.entrySet()) { if (ent.getValue() > warningOrError) { sb.append(ent.getKey() + " is overpassing the width limit."); sb.append("\n"); } } return sb.length() == 0 ? "" : sb.toString(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/DotMode.java000066400000000000000000000025061312650303100245630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; public enum DotMode { NORMAL, NO_LEFT_RIGHT_AND_XLABEL } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/DotStringFactory.java000066400000000000000000000366421312650303100265050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Point2D; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sourceforge.plantuml.BaseFile; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.Rankdir; import net.sourceforge.plantuml.cucadiagram.dot.DotData; import net.sourceforge.plantuml.cucadiagram.dot.DotSplines; import net.sourceforge.plantuml.cucadiagram.dot.Graphviz; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizVersion; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizVersions; import net.sourceforge.plantuml.cucadiagram.dot.ProcessState; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.posimo.Moveable; import net.sourceforge.plantuml.vizjs.GraphvizJs; import net.sourceforge.plantuml.vizjs.GraphvizJsRuntimeException; public class DotStringFactory implements Moveable { private final Bibliotekon bibliotekon = new Bibliotekon(); final private Set rankMin = new HashSet(); private final ColorSequence colorSequence; private final Cluster root; private Cluster current; private final UmlDiagramType umlDiagramType; private final ISkinParam skinParam; private final DotMode dotMode; private final StringBounder stringBounder; public DotStringFactory(StringBounder stringBounder, DotData dotData) { this.skinParam = dotData.getSkinParam(); this.umlDiagramType = dotData.getUmlDiagramType(); this.dotMode = dotData.getDotMode(); this.colorSequence = new ColorSequence(); this.stringBounder = stringBounder; this.root = new Cluster(colorSequence, skinParam, dotData.getRootGroup()); this.current = root; } public DotStringFactory(StringBounder stringBounder, CucaDiagram diagram) { this.skinParam = diagram.getSkinParam(); this.umlDiagramType = diagram.getUmlDiagramType(); this.dotMode = DotMode.NORMAL; this.colorSequence = new ColorSequence(); this.stringBounder = stringBounder; this.root = new Cluster(colorSequence, skinParam, diagram.getEntityFactory().getRootGroup()); this.current = root; } public void addShape(Shape shape) { current.addShape(shape); } private void printMinRanking(StringBuilder sb) { if (rankMin.size() == 0) { return; } sb.append("{ rank = min;"); for (String id : rankMin) { sb.append(id); sb.append(";"); } sb.append("}"); } private double getHorizontalDzeta() { double max = 0; for (Line l : bibliotekon.allLines()) { final double c = l.getHorizontalDzeta(stringBounder); if (c > max) { max = c; } } return max / 10; } private double getVerticalDzeta() { double max = 0; for (Line l : bibliotekon.allLines()) { final double c = l.getVerticalDzeta(stringBounder); if (c > max) { max = c; } } return max / 10; } String createDotString(String... dotStrings) { final StringBuilder sb = new StringBuilder(); double nodesep = getHorizontalDzeta(); if (nodesep < getMinNodeSep()) { nodesep = getMinNodeSep(); } if (skinParam.getNodesep() != 0) { nodesep = skinParam.getNodesep(); } final String nodesepInches = SvekUtils.pixelToInches(nodesep); // Log.println("nodesep=" + nodesepInches); double ranksep = getVerticalDzeta(); if (ranksep < getMinRankSep()) { ranksep = getMinRankSep(); } if (skinParam.getRanksep() != 0) { ranksep = skinParam.getRanksep(); } final String ranksepInches = SvekUtils.pixelToInches(ranksep); // Log.println("ranksep=" + ranksepInches); sb.append("digraph unix {"); SvekUtils.println(sb); for (String s : dotStrings) { if (s.startsWith("ranksep")) { sb.append("ranksep=" + ranksepInches + ";"); } else if (s.startsWith("nodesep")) { sb.append("nodesep=" + nodesepInches + ";"); } else { sb.append(s); } SvekUtils.println(sb); } // sb.append("newrank=true;"); // SvekUtils.println(sb); sb.append("remincross=true;"); SvekUtils.println(sb); sb.append("searchsize=500;"); SvekUtils.println(sb); // if (OptionFlags.USE_COMPOUND) { // sb.append("compound=true;"); // SvekUtils.println(sb); // } final DotSplines dotSplines = skinParam.getDotSplines(); if (dotSplines == DotSplines.POLYLINE) { sb.append("splines=polyline;"); SvekUtils.println(sb); } else if (dotSplines == DotSplines.ORTHO) { sb.append("splines=ortho;"); SvekUtils.println(sb); } if (skinParam.getRankdir() == Rankdir.LEFT_TO_RIGHT) { sb.append("rankdir=LR;"); SvekUtils.println(sb); } manageMinMaxCluster(sb); root.printCluster1(sb, bibliotekon.allLines(), stringBounder); for (Line line : bibliotekon.lines0()) { line.appendLine(getGraphvizVersion(), sb, dotMode); } root.fillRankMin(rankMin); root.printCluster2(sb, bibliotekon.allLines(), stringBounder, dotMode, getGraphvizVersion(), umlDiagramType); printMinRanking(sb); for (Line line : bibliotekon.lines1()) { line.appendLine(getGraphvizVersion(), sb, dotMode); } SvekUtils.println(sb); sb.append("}"); return sb.toString(); } private void manageMinMaxCluster(final StringBuilder sb) { final List minPointCluster = new ArrayList(); final List maxPointCluster = new ArrayList(); for (Cluster cluster : bibliotekon.allCluster()) { final String minPoint = cluster.getMinPoint(umlDiagramType); if (minPoint != null) { minPointCluster.add(minPoint); } final String maxPoint = cluster.getMaxPoint(umlDiagramType); if (maxPoint != null) { maxPointCluster.add(maxPoint); } } if (minPointCluster.size() > 0) { sb.append("{rank=min;"); for (String s : minPointCluster) { sb.append(s); sb.append(" [shape=point,width=.01,label=\"\"]"); sb.append(";"); } sb.append("}"); SvekUtils.println(sb); } if (maxPointCluster.size() > 0) { sb.append("{rank=max;"); for (String s : maxPointCluster) { sb.append(s); sb.append(" [shape=point,width=.01,label=\"\"]"); sb.append(";"); } sb.append("}"); SvekUtils.println(sb); } } private int getMinRankSep() { if (umlDiagramType == UmlDiagramType.ACTIVITY) { // return 29; return 40; } return 60; } private int getMinNodeSep() { if (umlDiagramType == UmlDiagramType.ACTIVITY) { // return 15; return 20; } return 35; } private GraphvizVersion graphvizVersion; public GraphvizVersion getGraphvizVersion() { if (graphvizVersion == null) { graphvizVersion = getGraphvizVersionInternal(); } return graphvizVersion; } private GraphvizVersion getGraphvizVersionInternal() { final Graphviz graphviz = GraphvizUtils.create(skinParam, "foo;", "svg"); if (graphviz instanceof GraphvizJs) { return GraphvizJs.getGraphvizVersion(false); } final File f = graphviz.getDotExe(); return GraphvizVersions.getInstance().getVersion(f); } public String getSvg(BaseFile basefile, String[] dotOptions) throws IOException { String dotString = createDotString(dotOptions); if (basefile != null) { final File f = basefile.getTraceFile("svek.dot"); SvekUtils.traceString(f, dotString); } Graphviz graphviz = GraphvizUtils.create(skinParam, dotString, "svg"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { final ProcessState state = graphviz.createFile3(baos); baos.close(); if (state.differs(ProcessState.TERMINATED_OK())) { throw new IllegalStateException("Timeout4 " + state, state.getCause()); } } catch (GraphvizJsRuntimeException e) { System.err.println("GraphvizJsRuntimeException"); graphvizVersion = GraphvizJs.getGraphvizVersion(true); dotString = createDotString(dotOptions); graphviz = GraphvizUtils.create(skinParam, dotString, "svg"); baos = new ByteArrayOutputStream(); final ProcessState state = graphviz.createFile3(baos); baos.close(); if (state.differs(ProcessState.TERMINATED_OK())) { throw new IllegalStateException("Timeout4 " + state, state.getCause()); } } final byte[] result = baos.toByteArray(); final String s = new String(result, "UTF-8"); if (basefile != null) { final File f = basefile.getTraceFile("svek.svg"); SvekUtils.traceString(f, s); } return s; } public boolean illegalDotExe() { final Graphviz graphviz = GraphvizUtils.create(skinParam, "svg"); if (graphviz instanceof GraphvizJs) { return false; } final File dotExe = graphviz.getDotExe(); return dotExe == null || dotExe.isFile() == false || dotExe.canRead() == false; } public File getDotExe() { final Graphviz graphviz = GraphvizUtils.create(skinParam, "svg"); return graphviz.getDotExe(); } public ClusterPosition solve(String svg) throws IOException, InterruptedException { if (svg.length() == 0) { throw new EmptySvgException(); } final Pattern pGraph = Pattern.compile("(?m)\\" + sh.getUid() + ""); if (sh.getType() == ShapeType.RECTANGLE || sh.getType() == ShapeType.RECTANGLE_HTML_FOR_PORTS || sh.getType() == ShapeType.FOLDER || sh.getType() == ShapeType.DIAMOND) { final List points = SvekUtils.extractPointsList(svg, idx, fullHeight); final double minX = SvekUtils.getMinX(points); final double minY = SvekUtils.getMinY(points); corner1.manage(minX, minY); sh.moveSvek(minX, minY); } else if (sh.getType() == ShapeType.ROUND_RECTANGLE) { final int idx2 = svg.indexOf("d=\"", idx + 1); idx = svg.indexOf("points=\"", idx + 1); final List points; if (idx2 != -1 && (idx == -1 || idx2 < idx)) { // GraphViz 2.30 points = SvekUtils.extractD(svg, idx2, fullHeight); } else { points = SvekUtils.extractPointsList(svg, idx, fullHeight); for (int i = 0; i < 3; i++) { idx = svg.indexOf("points=\"", idx + 1); points.addAll(SvekUtils.extractPointsList(svg, idx, fullHeight)); } } final double minX = SvekUtils.getMinX(points); final double minY = SvekUtils.getMinY(points); corner1.manage(minX, minY); sh.moveSvek(minX, minY); } else if (sh.getType() == ShapeType.OCTAGON) { idx = svg.indexOf("points=\"", idx + 1); final List points = SvekUtils.extractPointsList(svg, idx, fullHeight); final double minX = SvekUtils.getMinX(points); final double minY = SvekUtils.getMinY(points); corner1.manage(minX, minY); sh.moveSvek(minX, minY); sh.setOctagon(minX, minY, points); } else if (sh.getType() == ShapeType.CIRCLE || sh.getType() == ShapeType.CIRCLE_IN_RECT || sh.getType() == ShapeType.OVAL) { final double cx = SvekUtils.getValue(svg, idx, "cx"); final double cy = SvekUtils.getValue(svg, idx, "cy") + fullHeight; final double rx = SvekUtils.getValue(svg, idx, "rx"); final double ry = SvekUtils.getValue(svg, idx, "ry"); sh.moveSvek(cx - rx, cy - ry); } else { throw new IllegalStateException(sh.getType().toString() + " " + sh.getUid()); } } for (Cluster cluster : bibliotekon.allCluster()) { int idx = getClusterIndex(svg, cluster.getColor()); final List points = SvekUtils.extractPointsList(svg, idx, fullHeight); final double minX = SvekUtils.getMinX(points); final double minY = SvekUtils.getMinY(points); final double maxX = SvekUtils.getMaxX(points); final double maxY = SvekUtils.getMaxY(points); cluster.setPosition(minX, minY, maxX, maxY); corner1.manage(minX, minY); if (cluster.getTitleAndAttributeWidth() == 0 || cluster.getTitleAndAttributeHeight() == 0) { continue; } idx = getClusterIndex(svg, cluster.getTitleColor()); final List pointsTitle = SvekUtils.extractPointsList(svg, idx, fullHeight); final double minXtitle = SvekUtils.getMinX(pointsTitle); final double minYtitle = SvekUtils.getMinY(pointsTitle); cluster.setTitlePosition(minXtitle, minYtitle); } for (Line line : bibliotekon.allLines()) { line.solveLine(svg, fullHeight, corner1); } for (Line line : bibliotekon.allLines()) { line.manageCollision(bibliotekon.allShapes()); } corner1.manage(0, 0); return new ClusterPosition(corner1.getMinX(), corner1.getMinY(), fullWidth, fullHeight); // return new ClusterPosition(0, 0, fullWidth, fullHeight); } private int getClusterIndex(final String svg, int colorInt) { final String colorString = StringUtils.goLowerCase(StringUtils.getAsHtml(colorInt)); final String keyTitle1 = "=\"" + colorString + "\""; int idx = svg.indexOf(keyTitle1); if (idx == -1) { final String keyTitle2 = "stroke:" + colorString + ";"; idx = svg.indexOf(keyTitle2); } if (idx == -1) { throw new IllegalStateException("Cannot find color " + colorString); } return idx; } public void openCluster(IGroup g, int titleAndAttributeWidth, int titleAndAttributeHeight, TextBlock title, TextBlock stereo) { this.current = current.createChild(g, titleAndAttributeWidth, titleAndAttributeHeight, title, stereo, colorSequence, skinParam); bibliotekon.addCluster(this.current); } public void closeCluster() { if (current.getParent() == null) { throw new IllegalStateException(); } this.current = current.getParent(); } public void moveSvek(double deltaX, double deltaY) { for (Shape sh : bibliotekon.allShapes()) { sh.moveSvek(deltaX, deltaY); } for (Line line : bibliotekon.allLines()) { line.moveSvek(deltaX, deltaY); } for (Cluster cl : bibliotekon.allCluster()) { cl.moveSvek(deltaX, deltaY); } } public final Bibliotekon getBibliotekon() { return bibliotekon; } public ColorSequence getColorSequence() { return colorSequence; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/EmptySvgException.java000066400000000000000000000025101312650303100266600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; public class EmptySvgException extends RuntimeException { } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/EntityDomain.java000066400000000000000000000051471312650303100256400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityDomain extends AbstractTextBlock implements TextBlock { private final double margin = 4; private final double radius = 12; private final double suppY = 2; private final SymbolContext symbolContext; public EntityDomain(SymbolContext symbolContext) { this.symbolContext = symbolContext; } public void drawU(UGraphic ug) { double x = 0; double y = 0; x += margin; y += margin; ug = symbolContext.apply(ug); final UEllipse circle = new UEllipse(radius * 2, radius * 2); circle.setDeltaShadow(symbolContext.getDeltaShadow()); ug.apply(new UTranslate(x, y)).draw(circle); ug.apply(new UTranslate(x, y + 2 * radius + suppY)).draw(new ULine(2 * radius, 0)); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(radius * 2 + 2 * margin, radius * 2 + 2 * margin); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/EntityImageProtected.java000066400000000000000000000062171312650303100273240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.cucadiagram.dot.Neighborhood; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageProtected extends AbstractTextBlock implements IEntityImage, Untranslated { private final IEntityImage orig; private final double border; private final Bibliotekon bibliotekon; private final Neighborhood neighborhood; public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { throw new UnsupportedOperationException(); } public EntityImageProtected(IEntityImage orig, double border, Neighborhood neighborhood, Bibliotekon bibliotekon) { this.orig = orig; this.border = border; this.bibliotekon = bibliotekon; this.neighborhood = neighborhood; } public boolean isHidden() { return orig.isHidden(); } public HtmlColor getBackcolor() { return orig.getBackcolor(); } public Dimension2D calculateDimension(StringBounder stringBounder) { return Dimension2DDouble.delta(orig.calculateDimension(stringBounder), 2 * border); } public void drawU(UGraphic ug) { orig.drawU(ug.apply(new UTranslate(border, border))); } public void drawUntranslated(UGraphic ug, double minX, double minY) { final Dimension2D dim = orig.calculateDimension(ug.getStringBounder()); neighborhood.drawU(ug, minX + border, minY + border, bibliotekon, dim); } public ShapeType getShapeType() { return orig.getShapeType(); } public Margins getShield(StringBounder stringBounder) { return orig.getShield(stringBounder); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/FrontierCalculator.java000066400000000000000000000111331312650303100270260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Point2D; import java.util.Collection; import net.sourceforge.plantuml.cucadiagram.EntityPosition; public class FrontierCalculator { private static final double DELTA = 3 * EntityPosition.RADIUS; private ClusterPosition core; private final ClusterPosition initial; public FrontierCalculator(final ClusterPosition initial, Collection insides, Collection points) { this.initial = initial; for (ClusterPosition in : insides) { if (core == null) { core = in; } else { core = core.merge(in); } } if (core == null) { final Point2D center = initial.getPointCenter(); core = new ClusterPosition(center.getX() - 1, center.getY() - 1, center.getX() + 1, center.getY() + 1); } for (Point2D p : points) { core = core.merge(p); } boolean touchMinX = false; boolean touchMaxX = false; boolean touchMinY = false; boolean touchMaxY = false; for (Point2D p : points) { if (p.getX() == core.getMinX()) { touchMinX = true; } if (p.getX() == core.getMaxX()) { touchMaxX = true; } if (p.getY() == core.getMinY()) { touchMinY = true; } if (p.getY() == core.getMaxY()) { touchMaxY = true; } } if (touchMinX == false) { core = core.withMinX(initial.getMinX()); } if (touchMaxX == false) { core = core.withMaxX(initial.getMaxX()); } if (touchMinY == false) { core = core.withMinY(initial.getMinY()); } if (touchMaxY == false) { core = core.withMaxY(initial.getMaxY()); } boolean pushMinX = false; boolean pushMaxX = false; boolean pushMinY = false; boolean pushMaxY = false; for (Point2D p : points) { if (p.getY() == core.getMinY() || p.getY() == core.getMaxY()) { if (Math.abs(p.getX() - core.getMaxX()) < DELTA) { pushMaxX = true; } if (Math.abs(p.getX() - core.getMinX()) < DELTA) { pushMinX = true; } } if (p.getX() == core.getMinX() || p.getX() == core.getMaxX()) { if (Math.abs(p.getY() - core.getMaxY()) < DELTA) { pushMaxY = true; } if (Math.abs(p.getY() - core.getMinY()) < DELTA) { pushMinY = true; } } } for (Point2D p : points) { // if (p.getX() == core.getMinX() && (p.getY() == core.getMinY() || p.getY() == core.getMaxY())) { // pushMinX = false; // } // if (p.getX() == core.getMaxX() && (p.getY() == core.getMinY() || p.getY() == core.getMaxY())) { // pushMaxX = false; // } if (p.getY() == core.getMinY() && (p.getX() == core.getMinX() || p.getX() == core.getMaxX())) { pushMinY = false; } if (p.getY() == core.getMaxY() && (p.getX() == core.getMinX() || p.getX() == core.getMaxX())) { pushMaxY = false; } } if (pushMaxX) { core = core.addMaxX(DELTA); } if (pushMinX) { core = core.addMinX(-DELTA); } if (pushMaxY) { core = core.addMaxY(DELTA); } if (pushMinY) { core = core.addMinY(-DELTA); } } public ClusterPosition getSuggestedPosition() { return core; } public void ensureMinWidth(double minWidth) { final double delta = core.getMaxX() - core.getMinX() - minWidth; if (delta < 0) { double newMinX = core.getMinX() + delta / 2; double newMaxX = core.getMaxX() - delta / 2; final double error = newMinX - initial.getMinX(); if (error < 0) { newMinX -= error; newMaxX -= error; } core = core.withMinX(newMinX); core = core.withMaxX(newMaxX); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/GraphvizCrash.java000066400000000000000000000152221312650303100260020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.OptionPrint; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils; import net.sourceforge.plantuml.flashcode.FlashCodeFactory; import net.sourceforge.plantuml.flashcode.FlashCodeUtils; import net.sourceforge.plantuml.fun.IconLoader; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.GraphicPosition; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.QuoteUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.version.Version; public class GraphvizCrash extends AbstractTextBlock implements IEntityImage { private final TextBlockBackcolored graphicStrings; private final BufferedImage flashCode; private final String text; public GraphvizCrash(String text) { this.text = text; final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils(); this.flashCode = utils.exportFlashcode(text); this.graphicStrings = GraphicStrings.createBlackOnWhite(init(), IconLoader.getRandom(), GraphicPosition.BACKGROUND_CORNER_TOP_RIGHT); } public static List anErrorHasOccured(Throwable exception, String text) { final List strings = new ArrayList(); if (exception == null) { strings.add("An error has occured!"); } else { strings.add("An error has occured : " + exception); } final String quote = StringUtils.rot(QuoteUtils.getSomeQuote()); strings.add("" + quote); strings.add(" "); strings.add("Diagram size: " + lines(text) + " lines / " + text.length() + " characters."); strings.add(" "); return strings; } private static int lines(String text) { int result = 0; for (int i = 0; i < text.length(); i++) { if (text.charAt(i) == BackSlash.CHAR_NEWLINE) { result++; } } return result; } public static void checkOldVersionWarning(final List strings) { final long days = (System.currentTimeMillis() - Version.compileTime()) / 1000L / 3600 / 24; if (days >= 90) { strings.add("This version of PlantUML is " + days + " days old, so you should"); strings.add(" consider upgrading from http://plantuml.com/download"); } } public static void pleaseGoTo(final List strings) { strings.add(" "); strings.add("Please go to http://plantuml.com/graphviz-dot to check your GraphViz version."); strings.add(" "); } public static void youShouldSendThisDiagram(final List strings) { strings.add("You should send this diagram and this image to plantuml@gmail.com or"); strings.add("post to http://plantuml.com/qa to solve this issue."); strings.add("You can try to turn arround this issue by simplifing your diagram."); } public static void thisMayBeCaused(final List strings) { strings.add("This may be caused by :"); strings.add(" - a bug in PlantUML"); strings.add(" - a problem in GraphViz"); } private List init() { final List strings = anErrorHasOccured(null, text); strings.add("For some reason, dot/Graphviz has crashed."); strings.add("This has been generated with PlantUML (" + Version.versionString() + ")."); checkOldVersionWarning(strings); strings.add(" "); addProperties(strings); strings.add(" "); try { final String dotVersion = GraphvizUtils.dotVersion(); strings.add("Default dot version: " + dotVersion); } catch (Throwable e) { strings.add("Cannot determine dot version: " + e.toString()); } pleaseGoTo(strings); youShouldSendThisDiagram(strings); if (flashCode != null) { addDecodeHint(strings); } return strings; } public static void addDecodeHint(final List strings) { strings.add(" "); strings.add(" Diagram source: (Use http://zxing.org/w/decode.jspx to decode the flashcode)"); } public static void addProperties(final List strings) { strings.addAll(OptionPrint.interestingProperties()); strings.addAll(OptionPrint.interestingValues()); } // private static void addTextProperty(final List strings, String prop) { // strings.add(prop + ": " + System.getProperty(prop)); // } public boolean isHidden() { return false; } public HtmlColor getBackcolor() { return HtmlColorUtils.WHITE; } public Dimension2D calculateDimension(StringBounder stringBounder) { Dimension2D result = graphicStrings.calculateDimension(stringBounder); if (flashCode != null) { result = Dimension2DDouble.mergeTB(result, new Dimension2DDouble(flashCode.getWidth(), flashCode.getHeight())); } return result; } public void drawU(UGraphic ug) { graphicStrings.drawU(ug); if (flashCode != null) { final double h = graphicStrings.calculateDimension(ug.getStringBounder()).getHeight(); ug = ug.apply(new UTranslate(0, h)); ug.draw(new UImage(flashCode)); } } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } public Margins getShield(StringBounder stringBounder) { return Margins.NONE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/GroupPngMakerActivity.java000066400000000000000000000127001312650303100274630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.EntityUtils; import net.sourceforge.plantuml.cucadiagram.GroupHierarchy; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.dot.DotData; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.svek.image.EntityImageState; import net.sourceforge.plantuml.ugraphic.UFont; public final class GroupPngMakerActivity { private final CucaDiagram diagram; private final IGroup group; private final StringBounder stringBounder; class InnerGroupHierarchy implements GroupHierarchy { public Collection getChildrenGroups(IGroup parent) { if (EntityUtils.groupRoot(parent)) { return diagram.getChildrenGroups(group); } return diagram.getChildrenGroups(parent); } public boolean isEmpty(IGroup g) { return diagram.isEmpty(g); } } public GroupPngMakerActivity(CucaDiagram diagram, IGroup group, StringBounder stringBounder) { this.diagram = diagram; this.group = group; this.stringBounder = stringBounder; } private List getPureInnerLinks() { final List result = new ArrayList(); for (Link link : diagram.getLinks()) { final IEntity e1 = (IEntity) link.getEntity1(); final IEntity e2 = (IEntity) link.getEntity2(); if (e1.getParentContainer() == group && e1.isGroup() == false && e2.getParentContainer() == group && e2.isGroup() == false) { result.add(link); } } return result; } public IEntityImage getImage() throws IOException, InterruptedException { // final List display = group.getDisplay(); // final TextBlock title = Display.create(display, new FontConfiguration( // getFont(FontParam.STATE), HtmlColorUtils.BLACK), HorizontalAlignment.CENTER, diagram.getSkinParam()); if (group.size() == 0) { return new EntityImageState(group, diagram.getSkinParam()); } final List links = getPureInnerLinks(); final ISkinParam skinParam = diagram.getSkinParam(); // if (OptionFlags.PBBACK && group.getSpecificBackColor() != null) { // skinParam = new SkinParamBackcolored(skinParam, null, group.getSpecificBackColor()); // } final DotData dotData = new DotData(group, links, group.getLeafsDirect(), diagram.getUmlDiagramType(), skinParam, new InnerGroupHierarchy(), diagram.getColorMapper(), diagram.getEntityFactory(), false, DotMode.NORMAL, diagram.getNamespaceSeparator(), diagram.getPragma()); final DotDataImageBuilder svek2 = new DotDataImageBuilder(dotData, diagram.getEntityFactory(), diagram.getSource(), diagram.getPragma(), stringBounder); if (group.getGroupType() == GroupType.INNER_ACTIVITY) { final Stereotype stereo = group.getStereotype(); final HtmlColor borderColor = getColor(ColorParam.activityBorder, stereo); final HtmlColor backColor = group.getColors(skinParam).getColor(ColorType.BACK) == null ? getColor( ColorParam.background, stereo) : group.getColors(skinParam).getColor(ColorType.BACK); return new InnerActivity(svek2.buildImage(null, new String[0]), borderColor, backColor, skinParam.shadowing()); } throw new UnsupportedOperationException(group.getGroupType().toString()); } private UFont getFont(FontParam fontParam) { final ISkinParam skinParam = diagram.getSkinParam(); return skinParam.getFont(null, false, fontParam); } private final Rose rose = new Rose(); protected final HtmlColor getColor(ColorParam colorParam, Stereotype stereo) { final ISkinParam skinParam = diagram.getSkinParam(); return rose.getHtmlColor(skinParam, colorParam, stereo); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/GroupPngMakerState.java000066400000000000000000000170301312650303100267500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.util.ArrayList; import java.util.Collection; import java.util.List; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityUtils; import net.sourceforge.plantuml.cucadiagram.GroupHierarchy; import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.dot.DotData; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockEmpty; import net.sourceforge.plantuml.graphic.TextBlockWidth; import net.sourceforge.plantuml.graphic.TextBlockWidthAdapter; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.svek.image.EntityImageState; import net.sourceforge.plantuml.ugraphic.UStroke; public final class GroupPngMakerState { private final CucaDiagram diagram; private final IGroup group; private final StringBounder stringBounder; class InnerGroupHierarchy implements GroupHierarchy { public Collection getChildrenGroups(IGroup parent) { if (EntityUtils.groupRoot(parent)) { return diagram.getChildrenGroups(group); } return diagram.getChildrenGroups(parent); } public boolean isEmpty(IGroup g) { return diagram.isEmpty(g); } } public GroupPngMakerState(CucaDiagram diagram, IGroup group, StringBounder stringBounder) { this.diagram = diagram; this.stringBounder = stringBounder; this.group = group; if (group.isGroup() == false) { throw new IllegalArgumentException(); } } private List getPureInnerLinks() { final List result = new ArrayList(); for (Link link : diagram.getLinks()) { if (EntityUtils.isPureInnerLink12(group, link)) { result.add(link); } } return result; } public IEntityImage getImage() { final Display display = group.getDisplay(); final ISkinParam skinParam = diagram.getSkinParam(); final TextBlock title = display.create( new FontConfiguration(skinParam, FontParam.STATE, group.getStereotype()), HorizontalAlignment.CENTER, diagram.getSkinParam()); if (group.size() == 0 && group.getChildren().size() == 0) { return new EntityImageState(group, diagram.getSkinParam()); } final List links = getPureInnerLinks(); final DotData dotData = new DotData(group, links, group.getLeafsDirect(), diagram.getUmlDiagramType(), skinParam, new InnerGroupHierarchy(), diagram.getColorMapper(), diagram.getEntityFactory(), diagram.isHideEmptyDescriptionForState(), DotMode.NORMAL, diagram.getNamespaceSeparator(), diagram.getPragma()); final DotDataImageBuilder svek2 = new DotDataImageBuilder(dotData, diagram.getEntityFactory(), diagram.getSource(), diagram.getPragma(), stringBounder); if (group.getGroupType() == GroupType.CONCURRENT_STATE) { // return new InnerStateConcurrent(svek2.createFile()); return svek2.buildImage(null, new String[0]); } if (group.getGroupType() != GroupType.STATE) { throw new UnsupportedOperationException(group.getGroupType().toString()); } HtmlColor borderColor = group.getColors(skinParam).getColor(ColorType.LINE); if (borderColor == null) { borderColor = getColor(ColorParam.stateBorder, group.getStereotype()); } final Stereotype stereo = group.getStereotype(); final HtmlColor backColor = group.getColors(skinParam).getColor(ColorType.BACK) == null ? getColor( ColorParam.stateBackground, stereo) : group.getColors(skinParam).getColor(ColorType.BACK); final TextBlockWidth attribute = getAttributes(skinParam); final Stereotype stereotype = group.getStereotype(); final boolean withSymbol = stereotype != null && stereotype.isWithOOSymbol(); final boolean containsOnlyConcurrentStates = containsOnlyConcurrentStates(dotData); final IEntityImage image = containsOnlyConcurrentStates ? buildImageForConcurrentState(dotData) : svek2 .buildImage(null, new String[0]); UStroke stroke = group.getColors(skinParam).getSpecificLineStroke(); if (stroke == null) { stroke = new UStroke(1.5); } return new InnerStateAutonom(image, title, attribute, borderColor, backColor, skinParam.shadowing(), group.getUrl99(), withSymbol, stroke); } private TextBlockWidth getAttributes(final ISkinParam skinParam) { final List details = ((IEntity) group).getBodier().getRawBody(); if (details.size() == 0) { return new TextBlockEmpty(); } final FontConfiguration fontConfiguration = new FontConfiguration(skinParam, FontParam.STATE_ATTRIBUTE, null); final Display display = details.size() == 1 ? Display.getWithNewlines(details.get(0)) : Display.create(details); final TextBlock result = display.create(fontConfiguration, HorizontalAlignment.LEFT, skinParam); return new TextBlockWidthAdapter(result, 0); } private IEntityImage buildImageForConcurrentState(DotData dotData) { final List inners = new ArrayList(); for (ILeaf inner : dotData.getLeafs()) { inners.add(inner.getSvekImage()); } return new CucaDiagramFileMakerSvek2InternalImage(inners, dotData.getTopParent().getConcurrentSeparator(), dotData.getSkinParam()); } private boolean containsOnlyConcurrentStates(DotData dotData) { for (ILeaf leaf : dotData.getLeafs()) { if (leaf instanceof IGroup == false) { return false; } if (((IGroup) leaf).getLeafType() != LeafType.STATE_CONCURRENT) { return false; } } return true; } private final Rose rose = new Rose(); private HtmlColor getColor(ColorParam colorParam, Stereotype stereo) { final ISkinParam skinParam = diagram.getSkinParam(); return rose.getHtmlColor(skinParam, colorParam, stereo); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/HeaderLayout.java000066400000000000000000000111301312650303100256070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockEmpty; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.utils.MathUtils; public class HeaderLayout { final private TextBlock name; final private TextBlock stereo; final private TextBlock generic; final private TextBlock circledCharacter; public HeaderLayout(TextBlock circledCharacter, TextBlock stereo, TextBlock name, TextBlock generic) { this.circledCharacter = protectAgaintNull(circledCharacter); this.stereo = protectAgaintNull(stereo); this.name = protectAgaintNull(name); this.generic = protectAgaintNull(generic); } private static TextBlock protectAgaintNull(TextBlock block) { if (block == null) { return new TextBlockEmpty(); } return block; } public Dimension2D getDimension(StringBounder stringBounder) { final Dimension2D nameDim = name.calculateDimension(stringBounder); final Dimension2D genericDim = generic.calculateDimension(stringBounder); final Dimension2D stereoDim = stereo.calculateDimension(stringBounder); final Dimension2D circleDim = circledCharacter.calculateDimension(stringBounder); final double width = circleDim.getWidth() + Math.max(stereoDim.getWidth(), nameDim.getWidth()) + genericDim.getWidth(); final double height = MathUtils.max(circleDim.getHeight(), stereoDim.getHeight() + nameDim.getHeight() + 10, genericDim.getHeight()); return new Dimension2DDouble(width, height); } public void drawU(UGraphic ug, double width, double height) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D nameDim = name.calculateDimension(stringBounder); final Dimension2D genericDim = generic.calculateDimension(stringBounder); final Dimension2D stereoDim = stereo.calculateDimension(stringBounder); final Dimension2D circleDim = circledCharacter.calculateDimension(stringBounder); final double widthStereoAndName = Math.max(stereoDim.getWidth(), nameDim.getWidth()); final double suppWith = width - circleDim.getWidth() - widthStereoAndName - genericDim.getWidth(); assert suppWith >= 0; final double h2 = Math.min(circleDim.getWidth() / 4, suppWith * 0.1); final double h1 = (suppWith - h2) / 2; assert h1 >= 0; assert h2 >= 0; final double xCircle = h1; final double yCircle = (height - circleDim.getHeight()) / 2; circledCharacter.drawU(ug.apply(new UTranslate(xCircle, yCircle))); final double diffHeight = height - stereoDim.getHeight() - nameDim.getHeight(); final double xStereo = circleDim.getWidth() + (widthStereoAndName - stereoDim.getWidth()) / 2 + h1 + h2; final double yStereo = diffHeight / 2; stereo.drawU(ug.apply(new UTranslate(xStereo, yStereo))); final double xName = circleDim.getWidth() + (widthStereoAndName - nameDim.getWidth()) / 2 + h1 + h2; final double yName = diffHeight / 2 + stereoDim.getHeight(); name.drawU(ug.apply(new UTranslate(xName, yName))); if (genericDim.getWidth() > 0) { final double delta = 4; final double xGeneric = width - genericDim.getWidth() + delta; final double yGeneric = -delta; generic.drawU(ug.apply(new UTranslate(xGeneric, yGeneric))); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/IEntityImage.java000066400000000000000000000031721312650303100255600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import net.sourceforge.plantuml.Hideable; import net.sourceforge.plantuml.graphic.StringBounder; public interface IEntityImage extends Hideable, TextBlockBackcolored { public static final int CORNER = 25; public static final int MARGIN = 5; public static final int MARGIN_LINE = 5; ShapeType getShapeType(); Margins getShield(StringBounder stringBounder); }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/IShapePseudo.java000066400000000000000000000026741312650303100255670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import net.sourceforge.plantuml.graphic.StringBounder; public interface IShapePseudo { String getUid(); void appendShape(StringBuilder sb, StringBounder stringBounder); } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/InnerActivity.java000066400000000000000000000061541312650303100260230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; public final class InnerActivity extends AbstractTextBlock implements IEntityImage { private final IEntityImage im; private final HtmlColor borderColor; private final boolean shadowing; private final HtmlColor backColor; public InnerActivity(final IEntityImage im, HtmlColor borderColor, HtmlColor backColor, boolean shadowing) { this.im = im; this.backColor = backColor; this.borderColor = borderColor; this.shadowing = shadowing; } public final static double THICKNESS_BORDER = 1.5; public void drawU(UGraphic ug) { final Dimension2D total = calculateDimension(ug.getStringBounder()); ug = ug.apply(new UChangeBackColor(backColor)).apply(new UChangeColor(borderColor)) .apply(new UStroke(THICKNESS_BORDER)); final URectangle rect = new URectangle(total.getWidth(), total.getHeight(), IEntityImage.CORNER, IEntityImage.CORNER); if (shadowing) { rect.setDeltaShadow(4); } ug.draw(rect); ug = ug.apply(new UStroke()); im.drawU(ug); } public HtmlColor getBackcolor() { return im.getBackcolor(); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D img = im.calculateDimension(stringBounder); return img; } public ShapeType getShapeType() { return ShapeType.ROUND_RECTANGLE; } public Margins getShield(StringBounder stringBounder) { return Margins.NONE; } public boolean isHidden() { return im.isHidden(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/InnerStateAutonom.java000066400000000000000000000125031312650303100266450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockWidth; import net.sourceforge.plantuml.svek.image.EntityImageState; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public final class InnerStateAutonom extends AbstractTextBlock implements IEntityImage { private final IEntityImage im; private final TextBlock title; private final TextBlockWidth attribute; private final HtmlColor borderColor; private final HtmlColor backColor; private final boolean shadowing; private final Url url; private final boolean withSymbol; private final UStroke stroke; public InnerStateAutonom(final IEntityImage im, final TextBlock title, TextBlockWidth attribute, HtmlColor borderColor, HtmlColor backColor, boolean shadowing, Url url, boolean withSymbol, UStroke stroke) { this.im = im; this.withSymbol = withSymbol; this.title = title; this.borderColor = borderColor; this.backColor = backColor; this.shadowing = shadowing; this.attribute = attribute; this.url = url; this.stroke = stroke; } public void drawU(UGraphic ug) { final Dimension2D text = title.calculateDimension(ug.getStringBounder()); final Dimension2D attr = attribute.calculateDimension(ug.getStringBounder()); final Dimension2D total = calculateDimension(ug.getStringBounder()); final double marginForFields = attr.getHeight() > 0 ? IEntityImage.MARGIN : 0; final double titreHeight = IEntityImage.MARGIN + text.getHeight() + IEntityImage.MARGIN_LINE; final RoundedContainer r = new RoundedContainer(total, titreHeight, attr.getHeight() + marginForFields, borderColor, backColor, im.getBackcolor(), stroke); if (url != null) { ug.startUrl(url); } r.drawU(ug, shadowing); title.drawU(ug.apply(new UTranslate((total.getWidth() - text.getWidth()) / 2, IEntityImage.MARGIN))); attribute.asTextBlock(total.getWidth()).drawU( ug.apply(new UTranslate(0 + IEntityImage.MARGIN, IEntityImage.MARGIN + text.getHeight() + IEntityImage.MARGIN))); final double spaceYforURL = getSpaceYforURL(ug.getStringBounder()); im.drawU(ug.apply(new UTranslate(IEntityImage.MARGIN, spaceYforURL))); if (withSymbol) { EntityImageState.drawSymbol(ug.apply(new UChangeColor(borderColor)), total.getWidth(), total.getHeight()); } if (url != null) { ug.closeAction(); } } private double getSpaceYforURL(StringBounder stringBounder) { final Dimension2D text = title.calculateDimension(stringBounder); final Dimension2D attr = attribute.calculateDimension(stringBounder); final double marginForFields = attr.getHeight() > 0 ? IEntityImage.MARGIN : 0; final double titreHeight = IEntityImage.MARGIN + text.getHeight() + IEntityImage.MARGIN_LINE; final double suppY = titreHeight + marginForFields + attr.getHeight(); return suppY + IEntityImage.MARGIN_LINE; } public HtmlColor getBackcolor() { return null; } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D img = im.calculateDimension(stringBounder); final Dimension2D text = title.calculateDimension(stringBounder); final Dimension2D attr = attribute.calculateDimension(stringBounder); final Dimension2D dim = Dimension2DDouble.mergeTB(text, attr, img); final double marginForFields = attr.getHeight() > 0 ? IEntityImage.MARGIN : 0; final Dimension2D result = Dimension2DDouble.delta(dim, IEntityImage.MARGIN * 2 + 2 * IEntityImage.MARGIN_LINE + marginForFields); return result; } public ShapeType getShapeType() { return ShapeType.ROUND_RECTANGLE; } public Margins getShield(StringBounder stringBounder) { return Margins.NONE; } public boolean isHidden() { return im.isHidden(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/Line.java000066400000000000000000000726231312650303100241260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.Collection; import java.util.List; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.Hideable; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.Pragma; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityPort; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkArrow; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkMiddleDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; import net.sourceforge.plantuml.cucadiagram.NoteLinkStrategy; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizVersion; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockArrow; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.graphic.USymbolFolder; import net.sourceforge.plantuml.graphic.VerticalAlignment; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.posimo.BezierUtils; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.posimo.Moveable; import net.sourceforge.plantuml.posimo.Positionable; import net.sourceforge.plantuml.posimo.PositionableUtils; import net.sourceforge.plantuml.svek.SvekUtils.PointListIterator; import net.sourceforge.plantuml.svek.extremity.Extremity; import net.sourceforge.plantuml.svek.extremity.ExtremityFactory; import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryExtends; import net.sourceforge.plantuml.svek.image.EntityImageNoteLink; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UComment; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Line implements Moveable, Hideable { private final Cluster ltail; private final Cluster lhead; private final Link link; private final EntityPort startUid; private final EntityPort endUid; private final TextBlock startTailText; private final TextBlock endHeadText; private final TextBlock labelText; private boolean divideLabelWidthByTwo = false; private final int lineColor; private final int noteLabelColor; private final int startTailColor; private final int endHeadColor; private final StringBounder stringBounder; private final Bibliotekon bibliotekon; private DotPath dotPath; private Positionable startTailLabelXY; private Positionable endHeadLabelXY; private Positionable labelXY; private UDrawable extremity2; private UDrawable extremity1; private double dx; private double dy; private boolean opale; private Cluster projectionCluster; private final Pragma pragma; private final HtmlColor backgroundColor; private final boolean useRankSame; @Override public String toString() { return super.toString() + " color=" + lineColor; } class DirectionalTextBlock extends AbstractTextBlock implements TextBlock { private final TextBlock right; private final TextBlock left; private final TextBlock up; private final TextBlock down; DirectionalTextBlock(TextBlock right, TextBlock left, TextBlock up, TextBlock down) { this.right = right; this.left = left; this.up = up; this.down = down; } public void drawU(UGraphic ug) { Direction dir = getDirection(); if (getLinkArrow() == LinkArrow.BACKWARD) { dir = dir.getInv(); } switch (dir) { case RIGHT: right.drawU(ug); break; case LEFT: left.drawU(ug); break; case UP: up.drawU(ug); break; case DOWN: down.drawU(ug); break; default: throw new UnsupportedOperationException(); } } public Dimension2D calculateDimension(StringBounder stringBounder) { return right.calculateDimension(stringBounder); } private Direction getDirection() { if (isAutolink()) { final double startAngle = dotPath.getStartAngle(); return Direction.LEFT; } final Point2D start = dotPath.getStartPoint(); final Point2D end = dotPath.getEndPoint(); final double ang = Math.atan2(end.getX() - start.getX(), end.getY() - start.getY()); if (ang > -Math.PI / 4 && ang < Math.PI / 4) { return Direction.DOWN; } if (ang > Math.PI * 3 / 4 || ang < -Math.PI * 3 / 4) { return Direction.UP; } return end.getX() > start.getX() ? Direction.RIGHT : Direction.LEFT; } } private Cluster getCluster2(Bibliotekon bibliotekon, IEntity entityMutable) { for (Cluster cl : bibliotekon.allCluster()) { if (entityMutable == cl.getGroup()) { return cl; } } throw new IllegalArgumentException(); } public Line(Link link, ColorSequence colorSequence, ISkinParam skinParam, StringBounder stringBounder, FontConfiguration labelFont, Bibliotekon bibliotekon, Pragma pragma) { if (link == null) { throw new IllegalArgumentException(); } this.useRankSame = skinParam.useRankSame(); this.startUid = link.getEntityPort1(bibliotekon); this.endUid = link.getEntityPort2(bibliotekon); Cluster ltail = null; if (startUid.startsWith(Cluster.CENTER_ID)) { ltail = getCluster2(bibliotekon, link.getEntity1()); } Cluster lhead = null; if (endUid.startsWith(Cluster.CENTER_ID)) { lhead = getCluster2(bibliotekon, link.getEntity2()); } if (link.getColors() != null) { skinParam = link.getColors().mute(skinParam); labelFont = labelFont.mute(link.getColors()); } this.backgroundColor = skinParam.getBackgroundColor(); this.pragma = pragma; this.bibliotekon = bibliotekon; this.stringBounder = stringBounder; this.link = link; this.ltail = ltail; this.lhead = lhead; this.lineColor = colorSequence.getValue(); this.noteLabelColor = colorSequence.getValue(); this.startTailColor = colorSequence.getValue(); this.endHeadColor = colorSequence.getValue(); final TextBlock labelOnly; if (Display.isNull(link.getLabel())) { if (getLinkArrow() == LinkArrow.NONE) { labelOnly = null; } else { final TextBlockArrow right = new TextBlockArrow(Direction.RIGHT, labelFont); final TextBlockArrow left = new TextBlockArrow(Direction.LEFT, labelFont); final TextBlockArrow up = new TextBlockArrow(Direction.UP, labelFont); final TextBlockArrow down = new TextBlockArrow(Direction.DOWN, labelFont); labelOnly = new DirectionalTextBlock(right, left, up, down); } } else { final double marginLabel = startUid.equalsId(endUid) ? 6 : 1; final TextBlock label = TextBlockUtils.withMargin( link.getLabel().create(labelFont, skinParam.getDefaultTextAlignment(HorizontalAlignment.CENTER), skinParam, skinParam.maxMessageSize()), marginLabel, marginLabel); if (getLinkArrow() == LinkArrow.NONE) { labelOnly = label; } else { TextBlock right = new TextBlockArrow(Direction.RIGHT, labelFont); right = TextBlockUtils.mergeLR(label, right, VerticalAlignment.CENTER); TextBlock left = new TextBlockArrow(Direction.LEFT, labelFont); left = TextBlockUtils.mergeLR(left, label, VerticalAlignment.CENTER); TextBlock up = new TextBlockArrow(Direction.UP, labelFont); up = TextBlockUtils.mergeTB(up, label, HorizontalAlignment.CENTER); TextBlock down = new TextBlockArrow(Direction.DOWN, labelFont); down = TextBlockUtils.mergeTB(label, down, HorizontalAlignment.CENTER); labelOnly = new DirectionalTextBlock(right, left, up, down); } } final TextBlock noteOnly; if (link.getNote() == null) { noteOnly = null; } else { noteOnly = new EntityImageNoteLink(link.getNote(), link.getNoteColors(), skinParam); if (link.getNoteLinkStrategy() == NoteLinkStrategy.HALF_NOT_PRINTED || link.getNoteLinkStrategy() == NoteLinkStrategy.HALF_PRINTED_FULL) { divideLabelWidthByTwo = true; } } if (labelOnly != null && noteOnly != null) { if (link.getNotePosition() == Position.LEFT) { labelText = TextBlockUtils.mergeLR(noteOnly, labelOnly, VerticalAlignment.CENTER); } else if (link.getNotePosition() == Position.RIGHT) { labelText = TextBlockUtils.mergeLR(labelOnly, noteOnly, VerticalAlignment.CENTER); } else if (link.getNotePosition() == Position.TOP) { labelText = TextBlockUtils.mergeTB(noteOnly, labelOnly, HorizontalAlignment.CENTER); } else { labelText = TextBlockUtils.mergeTB(labelOnly, noteOnly, HorizontalAlignment.CENTER); } } else if (labelOnly != null) { labelText = labelOnly; } else if (noteOnly != null) { labelText = noteOnly; } else { labelText = null; } if (link.getQualifier1() == null) { startTailText = null; } else { startTailText = Display.getWithNewlines(link.getQualifier1()).create(labelFont, HorizontalAlignment.CENTER, skinParam); } if (link.getQualifier2() == null) { endHeadText = null; } else { endHeadText = Display.getWithNewlines(link.getQualifier2()).create(labelFont, HorizontalAlignment.CENTER, skinParam); } } public boolean hasNoteLabelText() { return labelText != null; } private LinkArrow getLinkArrow() { return link.getLinkArrow(); } public void appendLine(GraphvizVersion graphvizVersion, StringBuilder sb, DotMode dotMode) { // Log.println("inverted=" + isInverted()); // if (isInverted()) { // sb.append(endUid); // sb.append("->"); // sb.append(startUid); // } else { sb.append(startUid.getFullString()); sb.append("->"); sb.append(endUid.getFullString()); // } sb.append("["); final LinkType linkType = link.getTypePatchCluster(); String decoration = linkType.getSpecificDecorationSvek(); if (decoration.length() > 0 && decoration.endsWith(",") == false) { decoration += ","; } sb.append(decoration); int length = link.getLength(); // if (graphvizVersion == GraphvizVersion.V2_34_0 && length == 1) { // length = 2; // } if (useRankSame) { if (pragma.horizontalLineBetweenDifferentPackageAllowed() || link.isInvis() || length != 1) { // if (graphvizVersion.isJs() == false) { sb.append("minlen=" + (length - 1)); sb.append(","); // } } } else { sb.append("minlen=" + (length - 1)); sb.append(","); } sb.append("color=\"" + StringUtils.getAsHtml(lineColor) + "\""); if (labelText != null) { sb.append(","); if (graphvizVersion.modeSafe() || dotMode == DotMode.NO_LEFT_RIGHT_AND_XLABEL) { sb.append("xlabel=<"); } else { sb.append("label=<"); } appendTable(sb, eventuallyDivideByTwo(labelText.calculateDimension(stringBounder)), noteLabelColor, graphvizVersion); sb.append(">"); // sb.append(",labelfloat=true"); } if (startTailText != null) { sb.append(","); sb.append("taillabel=<"); appendTable(sb, startTailText.calculateDimension(stringBounder), startTailColor, graphvizVersion); sb.append(">"); // sb.append(",labelangle=0"); } if (endHeadText != null) { sb.append(","); sb.append("headlabel=<"); appendTable(sb, endHeadText.calculateDimension(stringBounder), endHeadColor, graphvizVersion); sb.append(">"); // sb.append(",labelangle=0"); } if (link.isInvis()) { sb.append(","); sb.append("style=invis"); } if (link.isConstraint() == false || link.hasTwoEntryPointsSameContainer()) { sb.append(",constraint=false"); } if (link.getSametail() != null) { sb.append(",sametail=" + link.getSametail()); } sb.append("];"); SvekUtils.println(sb); } private Dimension2D eventuallyDivideByTwo(Dimension2D dim) { if (divideLabelWidthByTwo) { return new Dimension2DDouble(dim.getWidth() / 2, dim.getHeight()); } return dim; } public String rankSame() { // if (graphvizVersion == GraphvizVersion.V2_34_0) { // return null; // } if (pragma.horizontalLineBetweenDifferentPackageAllowed() == false && link.getLength() == 1 /* && graphvizVersion.isJs() == false */) { return "{rank=same; " + getStartUidPrefix() + "; " + getEndUidPrefix() + "}"; } return null; } public static void appendTable(StringBuilder sb, Dimension2D dim, int col, GraphvizVersion graphvizVersion) { final int w = (int) dim.getWidth(); final int h = (int) dim.getHeight(); appendTable(sb, w, h, col); } public static void appendTable(StringBuilder sb, int w, int h, int col) { sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append("
    "); } public final String getStartUidPrefix() { return startUid.getPrefix(); } public final String getEndUidPrefix() { return endUid.getPrefix(); } private UDrawable getExtremity(LinkDecor decor, PointListIterator pointListIterator, final Point2D center, double angle, Cluster cluster, Shape shapeContact) { final ExtremityFactory extremityFactory = decor.getExtremityFactory(backgroundColor); if (cluster != null) { if (extremityFactory != null) { // System.err.println("angle=" + angle * 180 / Math.PI); return extremityFactory.createUDrawable(center, angle, null); } if (decor == LinkDecor.EXTENDS) { return new ExtremityFactoryExtends(backgroundColor).createUDrawable(center, angle, null); } return null; } if (extremityFactory != null) { final List points = pointListIterator.next(); if (points.size() == 0) { return extremityFactory.createUDrawable(center, angle, null); } final Point2D p0 = points.get(0); final Point2D p1 = points.get(1); final Point2D p2 = points.get(2); Side side = null; if (shapeContact != null) { side = shapeContact.getClusterPosition().getClosestSide(p1); } return extremityFactory.createUDrawable(p0, p1, p2, side); } else if (decor == LinkDecor.NONE) { final UPolygon sh = new UPolygon(pointListIterator.cloneMe().next()); final Point2D contact = sh.checkMiddleContactForSpecificTriangle(center); if (contact != null) { return new UDrawable() { public void drawU(UGraphic ug) { ULine line = new ULine(contact.getX() - center.getX(), contact.getY() - center.getY()); ug = ug.apply(new UTranslate(center)); ug.draw(line); } }; } } else if (decor != LinkDecor.NONE) { final UShape sh = new UPolygon(pointListIterator.next()); return new UDrawable() { public void drawU(UGraphic ug) { ug.draw(sh); } }; } return null; } public void solveLine(final String svg, final int fullHeight, MinFinder corner1) { if (this.link.isInvis()) { return; } int idx = SvekUtils.getIndexFromColor(svg, this.lineColor); if (idx == -1) { return; // throw new IllegalStateException(); } idx = svg.indexOf("d=\"", idx); if (idx == -1) { throw new IllegalStateException(); } final int end = svg.indexOf("\"", idx + 3); final String path = svg.substring(idx + 3, end); if (DotPath.isPathConsistent(path) == false) { return; } dotPath = new DotPath(path, fullHeight); if (projectionCluster != null) { // System.err.println("Line::solveLine1 projectionCluster=" + projectionCluster.getClusterPosition()); projectionCluster.manageEntryExitPoint(stringBounder); // System.err.println("Line::solveLine2 projectionCluster=" + projectionCluster.getClusterPosition()); // if (lhead != null) // System.err.println("Line::solveLine ltail=" + lhead.getClusterPosition()); // if (ltail != null) // System.err.println("Line::solveLine ltail=" + ltail.getClusterPosition()); } dotPath = dotPath.simulateCompound(lhead, ltail); PointListIterator pointListIterator = PointListIterator.create(svg.substring(end), fullHeight, lineColor); final LinkType linkType = link.getType(); this.extremity1 = getExtremity(linkType.getDecor2(), pointListIterator, dotPath.getStartPoint(), dotPath.getStartAngle() + Math.PI, ltail, bibliotekon.getShape(link.getEntity1())); this.extremity2 = getExtremity(linkType.getDecor1(), pointListIterator, dotPath.getEndPoint(), dotPath.getEndAngle(), lhead, bibliotekon.getShape(link.getEntity2())); if (extremity1 instanceof Extremity && extremity2 instanceof Extremity) { final Point2D p1 = ((Extremity) extremity1).somePoint(); final Point2D p2 = ((Extremity) extremity2).somePoint(); if (p1 != null && p2 != null) { // http://plantuml.sourceforge.net/qa/?qa=4240/some-relations-point-wrong-direction-when-the-linetype-ortho final double dist1start = p1.distance(dotPath.getStartPoint()); final double dist1end = p1.distance(dotPath.getEndPoint()); final double dist2start = p2.distance(dotPath.getStartPoint()); final double dist2end = p2.distance(dotPath.getEndPoint()); if (dist1start > dist1end && dist2end > dist2start) { pointListIterator = PointListIterator.create(svg.substring(end), fullHeight, lineColor); this.extremity2 = getExtremity(linkType.getDecor1(), pointListIterator, dotPath.getEndPoint(), dotPath.getEndAngle(), lhead, bibliotekon.getShape(link.getEntity2())); this.extremity1 = getExtremity(linkType.getDecor2(), pointListIterator, dotPath.getStartPoint(), dotPath.getStartAngle() + Math.PI, ltail, bibliotekon.getShape(link.getEntity1())); } } } if (this.labelText != null) { final Point2D pos = getXY(svg, this.noteLabelColor, fullHeight); if (pos != null) { corner1.manage(pos); this.labelXY = TextBlockUtils.asPositionable(labelText, stringBounder, pos); } } if (this.startTailText != null) { final Point2D pos = getXY(svg, this.startTailColor, fullHeight); if (pos != null) { corner1.manage(pos); this.startTailLabelXY = TextBlockUtils.asPositionable(startTailText, stringBounder, pos); } } if (this.endHeadText != null) { final Point2D pos = getXY(svg, this.endHeadColor, fullHeight); if (pos != null) { corner1.manage(pos); this.endHeadLabelXY = TextBlockUtils.asPositionable(endHeadText, stringBounder, pos); corner1.manage(pos.getX() - 15, pos.getY()); } } if (isOpalisable() == false) { setOpale(false); } } private boolean isOpalisable() { return dotPath.getBeziers().size() <= 1; } private Point2D.Double getXY(String svg, int color, int height) { final int idx = SvekUtils.getIndexFromColor(svg, color); if (idx == -1) { return null; } return SvekUtils.getMinXY(SvekUtils.extractPointsList(svg, idx, height)); } public void drawU(UGraphic ug, HtmlColor color) { if (opale) { return; } ug.draw(new UComment("link " + link.getEntity1().getCode().getFullName() + " to " + link.getEntity2().getCode().getFullName())); double x = 0; double y = 0; final Url url = link.getUrl(); if (url != null) { ug.startUrl(url); } if (link.isAutoLinkOfAGroup()) { final Cluster cl = bibliotekon.getCluster((IGroup) link.getEntity1()); if (cl != null) { x += cl.getWidth(); x -= dotPath.getStartPoint().getX() - cl.getMinX(); } } x += dx; y += dy; if (link.isInvis()) { return; } if (this.link.getColors() != null) { final HtmlColor newColor = this.link.getColors().getColor(ColorType.ARROW, ColorType.LINE); if (newColor != null) { color = newColor; } } else if (this.link.getSpecificColor() != null) { color = this.link.getSpecificColor(); } ug = ug.apply(new UChangeBackColor(null)).apply(new UChangeColor(color)); final LinkType linkType = link.getType(); UStroke stroke = linkType.getStroke(); if (link.getColors() != null && link.getColors().getSpecificLineStroke() != null) { stroke = link.getColors().getSpecificLineStroke(); } ug = ug.apply(stroke); double moveEndY = 0; if (dotPath == null) { Log.info("DotPath is null for " + this); return; } DotPath todraw = dotPath; if (link.getEntity2().isGroup() && link.getEntity2().getUSymbol() instanceof USymbolFolder) { final Cluster endCluster = bibliotekon.getCluster((IGroup) link.getEntity2()); if (endCluster != null) { final double deltaFolderH = endCluster .checkFolderPosition(dotPath.getEndPoint(), ug.getStringBounder()); todraw = new DotPath(dotPath); todraw.moveEndPoint(0, deltaFolderH); moveEndY = deltaFolderH; } } todraw.setComment(link.getEntity1().getCode().getFullName() + "-" + link.getEntity2().getCode().getFullName()); ug.apply(new UTranslate(x, y)).draw(todraw); ug = ug.apply(new UStroke()).apply(new UChangeColor(color)); if (this.extremity2 != null) { UGraphic ug2 = ug; if (linkType.getDecor1().isFill()) { ug2 = ug2.apply(new UChangeBackColor(color)); } else { ug2 = ug2.apply(new UChangeBackColor(null)); } // System.err.println("Line::draw EXTREMITY1"); this.extremity2.drawU(ug2.apply(new UTranslate(x, y))); } if (this.extremity1 != null) { UGraphic ug2 = ug; if (linkType.getDecor2().isFill()) { ug2 = ug2.apply(new UChangeBackColor(color)); } else { ug2 = ug2.apply(new UChangeBackColor(null)); } // System.err.println("Line::draw EXTREMITY2"); this.extremity1.drawU(ug2.apply(new UTranslate(x, y))); } if (this.labelText != null && this.labelXY != null && link.getNoteLinkStrategy() != NoteLinkStrategy.HALF_NOT_PRINTED) { this.labelText.drawU(ug.apply(new UTranslate(x + this.labelXY.getPosition().getX(), y + this.labelXY.getPosition().getY()))); } if (this.startTailText != null && this.startTailLabelXY != null && this.startTailLabelXY.getPosition() != null) { this.startTailText.drawU(ug.apply(new UTranslate(x + this.startTailLabelXY.getPosition().getX(), y + this.startTailLabelXY.getPosition().getY()))); } if (this.endHeadText != null && this.endHeadLabelXY != null && this.endHeadLabelXY.getPosition() != null) { this.endHeadText.drawU(ug.apply(new UTranslate(x + this.endHeadLabelXY.getPosition().getX(), y + this.endHeadLabelXY.getPosition().getY()))); } if (linkType.getMiddleDecor() != LinkMiddleDecor.NONE) { final PointAndAngle middle = dotPath.getMiddle(); final double angleRad = middle.getAngle(); final double angleDeg = -angleRad * 180.0 / Math.PI; final UDrawable mi = linkType.getMiddleDecor().getMiddleFactory().createUDrawable(angleDeg - 45); mi.drawU(ug.apply(new UTranslate(x + middle.getX(), y + middle.getY()))); } if (url != null) { ug.closeAction(); } } public boolean isInverted() { return link.isInverted(); } private double getDecorDzeta() { final LinkType linkType = link.getType(); final int size1 = linkType.getDecor1().getMargin(); final int size2 = linkType.getDecor2().getMargin(); return size1 + size2; } public double getHorizontalDzeta(StringBounder stringBounder) { if (startUid.equalsId(endUid)) { return getDecorDzeta(); } final ArithmeticStrategy strategy; if (isHorizontal()) { strategy = new ArithmeticStrategySum(); } else { return 0; } if (labelText != null) { strategy.eat(labelText.calculateDimension(stringBounder).getWidth()); } if (startTailText != null) { strategy.eat(startTailText.calculateDimension(stringBounder).getWidth()); } if (endHeadText != null) { strategy.eat(endHeadText.calculateDimension(stringBounder).getWidth()); } return strategy.getResult() + getDecorDzeta(); } private boolean isHorizontal() { return link.getLength() == 1; } public double getVerticalDzeta(StringBounder stringBounder) { if (startUid.equalsId(endUid)) { return getDecorDzeta(); } if (isHorizontal()) { return 0; } final ArithmeticStrategy strategy = new ArithmeticStrategySum(); if (labelText != null) { strategy.eat(labelText.calculateDimension(stringBounder).getHeight()); } if (startTailText != null) { strategy.eat(startTailText.calculateDimension(stringBounder).getHeight()); } if (endHeadText != null) { strategy.eat(endHeadText.calculateDimension(stringBounder).getHeight()); } return strategy.getResult() + getDecorDzeta(); } public void manageCollision(Collection allShapes) { for (Shape sh : allShapes) { final Positionable cl = PositionableUtils.addMargin(sh, 8, 8); if (startTailText != null && startTailLabelXY != null && PositionableUtils.intersect(cl, startTailLabelXY)) { startTailLabelXY = PositionableUtils.moveAwayFrom(cl, startTailLabelXY); } if (endHeadText != null && endHeadLabelXY != null && PositionableUtils.intersect(cl, endHeadLabelXY)) { endHeadLabelXY = PositionableUtils.moveAwayFrom(cl, endHeadLabelXY); } } // final Positionable start = getStartTailPositionnable(); // if (start != null) { // for (Shape sh : allShapes) { // if (cut(start, sh)) { // avoid(startTailLabelXY, start, sh); // } // } // } // // final Positionable end = getEndHeadPositionnable(); // if (end != null) { // for (Shape sh : allShapes) { // if (cut(end, sh)) { // avoid(endHeadLabelXY, end, sh); // } // } // } } private void avoid(Point2D.Double move, Positionable pos, Shape sh) { final Oscillator oscillator = new Oscillator(); final Point2D.Double orig = new Point2D.Double(move.x, move.y); while (cut(pos, sh)) { final Point2D.Double m = oscillator.nextPosition(); move.setLocation(orig.x + m.x, orig.y + m.y); } } private boolean cut(Positionable pos, Shape sh) { return BezierUtils.intersect(pos, sh) || tooClose(pos); } private boolean tooClose(Positionable pos) { final double dist = dotPath.getMinDist(BezierUtils.getCenter(pos)); final Dimension2D dim = pos.getSize(); // Log.println("dist=" + dist); return dist < (dim.getWidth() / 2 + 2) || dist < (dim.getHeight() / 2 + 2); } public void moveSvek(double deltaX, double deltaY) { this.dx += deltaX; this.dy += deltaY; } public final DotPath getDotPath() { final DotPath result = new DotPath(dotPath); result.moveSvek(dx, dy); return result; } public int getLength() { return link.getLength(); } public void setOpale(boolean opale) { this.link.setOpale(opale); this.opale = opale; } public boolean isOpale() { return opale; } public boolean isHorizontalSolitary() { return link.isHorizontalSolitary(); } public boolean isLinkFromOrTo(IEntity group) { return link.getEntity1() == group || link.getEntity2() == group; } public boolean hasEntryPoint() { return link.hasEntryPoint(); } public void setProjectionCluster(Cluster cluster) { this.projectionCluster = cluster; } public boolean isHidden() { return link.isHidden(); } public boolean sameConnections(Line other) { return link.sameConnections(other.link); } private boolean isAutolink() { return link.getEntity1() == link.getEntity2(); } public Point2D getMyPoint(IEntity entity) { if (link.getEntity1() == entity) { return moveDelta(dotPath.getStartPoint()); } if (link.getEntity2() == entity) { return moveDelta(dotPath.getEndPoint()); } throw new IllegalArgumentException(); } private Point2D moveDelta(Point2D pt) { return new Point2D.Double(pt.getX() + dx, pt.getY() + dy); } public boolean isLink(Link link) { return this.link == link; } public Point2D getStartContactPoint() { final Point2D start = dotPath.getStartPoint(); if (start == null) { return null; } return new Point2D.Double(dx + start.getX(), dy + start.getY()); } public Point2D getEndContactPoint() { final Point2D end = dotPath.getEndPoint(); if (end == null) { return null; } return new Point2D.Double(dx + end.getX(), dy + end.getY()); } public IEntity getOther(IEntity entity) { if (link.contains(entity)) { return link.getOther(entity); } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/Margins.java000066400000000000000000000042301312650303100246240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; public class Margins { private final double x1; private final double x2; private final double y1; private final double y2; static public Margins NONE = new Margins(0, 0, 0, 0); public static Margins uniform(double value) { return new Margins(value, value, value, value); } @Override public String toString() { return "MARGIN[" + x1 + "," + x2 + "," + y1 + "," + y2 + "]"; } public Margins(double x1, double x2, double y1, double y2) { this.x1 = x1; this.x2 = x2; this.y1 = y1; this.y2 = y2; } public boolean isZero() { return x1 == 0 && x2 == 0 && y1 == 0 && y2 == 0; } public final double getX1() { return x1; } public final double getX2() { return x2; } public final double getY1() { return y1; } public final double getY2() { return y2; } public double getTotalWidth() { return x1 + x2; } public double getTotalHeight() { return y1 + y2; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/MinFinder.java000066400000000000000000000036171312650303100251070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Point2D; public class MinFinder { private double minX = Double.MAX_VALUE; private double minY = Double.MAX_VALUE; public void manage(double x, double y) { if (x < minX) { minX = x; } if (y < minY) { minY = y; } } public void manage(Point2D p) { if (p == null) { throw new IllegalArgumentException(); } manage(p.getX(), p.getY()); } public void manage(MinFinder other) { manage(other.minX, other.minY); } @Override public String toString() { return "minX=" + minX + " minY=" + minY; } public double getMinX() { return minX; } public double getMinY() { return minY; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/Oscillator.java000066400000000000000000000041561312650303100253460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Point2D; public class Oscillator { private int n = 3; private int i = 0; private char seg = 'A'; private int x = -1; private int y = -1; public Point2D.Double nextPosition() { assert n % 2 == 1; final int halfN = (n - 1) / 2; final Point2D.Double result = new Point2D.Double(x, y); i++; if (seg == 'A') { x++; if (x > halfN) { seg = 'B'; x = halfN; y = -halfN + 1; } } else if (seg == 'B') { y++; if (y > halfN) { seg = 'C'; x = halfN - 1; y = halfN; } } else if (seg == 'C') { x--; if (x < -halfN) { seg = 'D'; x = -halfN; y = halfN - 1; } } else if (seg == 'D') { y--; if (y == -halfN) { n += 2; i = 0; x = -((n - 1) / 2); y = x; seg = 'A'; } } else { throw new UnsupportedOperationException(); } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/PackageStyle.java000066400000000000000000000234611312650303100256070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * Modified by : Arno Peterson * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import java.util.EnumSet; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UTranslate; public enum PackageStyle { FOLDER, RECTANGLE, NODE, FRAME, CLOUD, DATABASE, AGENT, STORAGE, COMPONENT1, COMPONENT2, ARTIFACT, CARD; public static PackageStyle fromString(String value) { for (PackageStyle p : EnumSet.allOf(PackageStyle.class)) { if (p.toString().equalsIgnoreCase(value)) { return p; } } if ("rect".equalsIgnoreCase(value)) { return RECTANGLE; } return null; } public USymbol toUSymbol() { if (this == NODE) { return USymbol.NODE; } if (this == CARD) { return USymbol.CARD; } if (this == DATABASE) { return USymbol.DATABASE; } if (this == CLOUD) { return USymbol.CLOUD; } if (this == FRAME) { return USymbol.FRAME; } if (this == RECTANGLE) { return USymbol.RECTANGLE; } if (this == FOLDER) { return USymbol.FOLDER; } return null; } public void drawU(UGraphic ug, Dimension2D dim, Dimension2D titleDim, boolean shadowing) { if (titleDim == null) { titleDim = new Dimension2DDouble(0, 0); } final double width = dim.getWidth(); final double height = dim.getHeight(); if (this == DATABASE) { drawDatabase(ug, width, height, shadowing); } else if (this == FOLDER) { drawFolder(ug, width, height, shadowing); } else if (this == FRAME) { drawFrame(ug, width, height, titleDim, shadowing); } else if (this == CLOUD) { drawCloud(ug, width, height, shadowing); } else if (this == RECTANGLE) { drawRect(ug, width, height, shadowing); } else if (this == COMPONENT1) { drawComponent1(ug, width, height, shadowing); } else if (this == COMPONENT2) { drawComponent2(ug, width, height, shadowing); } else if (this == STORAGE) { drawStorage(ug, width, height, shadowing); } else if (this == AGENT) { drawRect(ug, width, height, shadowing); } else if (this == ARTIFACT) { drawArtifact(ug, width, height, shadowing); } else { // drawNode(ug, xTheoricalPosition, yTheoricalPosition, width, height, shadowing); throw new UnsupportedOperationException(); } } private void drawArtifact(UGraphic ug, double width, double height, boolean shadowing) { final UPolygon polygon = new UPolygon(); polygon.addPoint(0, 0); polygon.addPoint(0, height); polygon.addPoint(width, height); final int cornersize = 10; polygon.addPoint(width, cornersize); polygon.addPoint(width - cornersize, 0); polygon.addPoint(0, 0); if (shadowing) { polygon.setDeltaShadow(3.0); } ug.draw(polygon); ug.apply(new UTranslate(width - cornersize, 0)).draw(new ULine(0, cornersize)); ug.apply(new UTranslate(width, cornersize)).draw(new ULine(-cornersize, 0)); } private void drawStorage(UGraphic ug, double width, double height, boolean shadowing) { final URectangle shape = new URectangle(width, height, 70, 70); if (shadowing) { shape.setDeltaShadow(3.0); } ug.draw(shape); } private void drawComponent1(UGraphic ug, double widthTotal, double heightTotal, boolean shadowing) { final URectangle form = new URectangle(widthTotal, heightTotal); if (shadowing) { form.setDeltaShadow(4); } final UShape small = new URectangle(10, 5); ug.draw(form); // UML 1 Component Notation ug.apply(new UTranslate(-5, 5)).draw(small); ug.apply(new UTranslate(-5, heightTotal - 10)).draw(small); } private void drawComponent2(UGraphic ug, double widthTotal, double heightTotal, boolean shadowing) { final URectangle form = new URectangle(widthTotal, heightTotal); if (shadowing) { form.setDeltaShadow(4); } final UShape small = new URectangle(15, 10); final UShape tiny = new URectangle(4, 2); ug.draw(form); // UML 2 Component Notation ug.apply(new UTranslate(widthTotal - 20, 5)).draw(small); ug.apply(new UTranslate(widthTotal - 22, 7)).draw(tiny); ug.apply(new UTranslate(widthTotal - 22, 11)).draw(tiny); } private void drawRect(UGraphic ug, double width, double height, boolean shadowing) { final URectangle shape = new URectangle(width, height); if (shadowing) { shape.setDeltaShadow(3.0); } ug.draw(shape); } private void drawCloud(UGraphic ug, double width, double height, boolean shadowing) { final UPath shape = getSpecificFrontierForCloud(width, height); if (shadowing) { shape.setDeltaShadow(3.0); } ug.apply(new UTranslate(3, -3)).draw(shape); } private UPath getSpecificFrontierForCloud(double width, double height) { final UPath path = new UPath(); path.moveTo(0, 10); double x = 0; for (int i = 0; i < width - 9; i += 10) { path.cubicTo(i, -3 + 10, 2 + i, -5 + 10, 5 + i, -5 + 10); path.cubicTo(8 + i, -5 + 10, 10 + i, -3 + 10, 10 + i, 10); x = i + 10; } double y = 0; for (int j = 10; j < height - 9; j += 10) { path.cubicTo(x + 3, j, x + 5, 2 + j, x + 5, 5 + j); path.cubicTo(x + 5, 8 + j, x + 3, 10 + j, x, 10 + j); y = j + 10; } for (int i = 0; i < width - 9; i += 10) { path.cubicTo(x - i, y + 3, x - 3 - i, y + 5, x - 5 - i, y + 5); path.cubicTo(x - 8 - i, y + 5, x - 10 - i, y + 3, x - 10 - i, y); } for (int j = 0; j < height - 9 - 10; j += 10) { path.cubicTo(-3, y - j, -5, y - 2 - j, -5, y - 5 - j); path.cubicTo(-5, y - 8 - j, -3, y - 10 - j, 0, y - 10 - j); } return path; } private void drawFrame(UGraphic ug, double width, double height, Dimension2D dimTitle, boolean shadowing) { final URectangle shape = new URectangle(width, height); if (shadowing) { shape.setDeltaShadow(3.0); } ug.draw(shape); final double textWidth; final double textHeight; final int cornersize; if (dimTitle.getWidth() == 0) { textWidth = width / 3; textHeight = 12; cornersize = 7; } else { textWidth = dimTitle.getWidth() + 10; textHeight = dimTitle.getHeight() + 3; cornersize = 10; } final UPath polygon = new UPath(); polygon.moveTo(textWidth, 1); polygon.lineTo(textWidth, textHeight - cornersize); polygon.lineTo(textWidth - cornersize, textHeight); polygon.lineTo(0, textHeight); ug.draw(polygon); } private void drawFolder(UGraphic ug, double width, double height, boolean shadowing) { final double wtitle = Math.max(30, width / 4); final UPolygon shape = new UPolygon(); shape.addPoint(0, 0); shape.addPoint(wtitle, 0); final double htitle = 10; final double marginTitleX3 = 7; shape.addPoint(wtitle + marginTitleX3, htitle); shape.addPoint(width, htitle); shape.addPoint(width, height); shape.addPoint(0, height); shape.addPoint(0, 0); if (shadowing) { shape.setDeltaShadow(3.0); } ug.draw(shape); ug.apply(new UTranslate(0, htitle)).draw(new ULine(wtitle + marginTitleX3, 0)); } private void drawDatabase(UGraphic ug, double width, double height, boolean shadowing) { final UPath shape = new UPath(); if (shadowing) { shape.setDeltaShadow(3.0); } shape.moveTo(0, 10); shape.cubicTo(10, 0, width / 2 - 10, 0, width / 2, 0); shape.cubicTo(width / 2 + 10, 0, width - 10, 0, width, 10); shape.lineTo(width, height - 10); shape.cubicTo(width - 10, height, width / 2 - 10, height, width / 2, height); shape.cubicTo(width / 2 + 10, height, 10, height, 0, height - 10); shape.lineTo(0, 10); ug.draw(shape); final UPath closing = new UPath(); closing.moveTo(0, 10); closing.cubicTo(10, 20, width / 2 - 10, 20, width / 2, 20); closing.cubicTo(width / 2 + 10, 20, width - 10, 20, width, 10); ug.draw(closing); } private void drawNode(UGraphic ug, double xTheoricalPosition, double yTheoricalPosition, double width, double height, boolean shadowing) { final UPolygon shape = new UPolygon(); shape.addPoint(0, 10); shape.addPoint(10, 0); shape.addPoint(width, 0); shape.addPoint(width, height - 10); shape.addPoint(width - 10, height); shape.addPoint(0, height); shape.addPoint(0, 10); if (shadowing) { shape.setDeltaShadow(2); } ug.apply(new UTranslate(xTheoricalPosition, yTheoricalPosition)).draw(shape); ug.apply(new UTranslate(xTheoricalPosition + width - 10, yTheoricalPosition + 10)).draw(new ULine(9, -9)); final UPath path = new UPath(); path.moveTo(0, 0); path.lineTo(width - 10, 0); path.lineTo(width - 10, height - 10); ug.apply(new UTranslate(xTheoricalPosition, yTheoricalPosition + 10)).draw(path); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/PointAndAngle.java000066400000000000000000000032321312650303100257100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Point2D; public class PointAndAngle { private final Point2D pt; private final double angle; public PointAndAngle(Point2D pt, double angle) { this.pt = pt; this.angle = angle; } public Point2D getPt() { return pt; } public double getAngle() { return angle; } public double getX() { return pt.getX(); } public double getY() { return pt.getY(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/PointDirected.java000066400000000000000000000032211312650303100257600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Point2D; public class PointDirected { final private double x; final private double y; final private double angle; public PointDirected(Point2D p, double angle) { this.x = p.getX(); this.y = p.getY(); this.angle = angle; } public final Point2D getPoint2D() { return new Point2D.Double(x, y); } public final double getAngle() { return angle; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/PortGeometry.java000066400000000000000000000035031312650303100256660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; public class PortGeometry { private final double position; private final double height; public PortGeometry(double position, double height) { this.position = position; this.height = height; } public PortGeometry translateY(double deltaY) { return new PortGeometry(position + deltaY, height); } @Override public String toString() { return "pos=" + position + " height=" + height; } public double getHeight() { return height; } public double getPosition() { return position; } public double getLastY() { return position + height; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/Ports.java000066400000000000000000000040521312650303100243350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.util.LinkedHashMap; import java.util.Map; public class Ports { private final Map all = new LinkedHashMap(); public void addThis(Ports other) { all.putAll(other.all); } @Override public String toString() { return all.toString(); } public Ports translateY(double deltaY) { final Ports result = new Ports(); for (Map.Entry ent : all.entrySet()) { result.all.put(ent.getKey(), ent.getValue().translateY(deltaY)); } return result; } public void add(String portName, double position, double height) { if (portName == null) { throw new IllegalArgumentException(); } all.put(portName, new PortGeometry(position, height)); } public Map getAll() { return all; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/RoundedContainer.java000066400000000000000000000066671312650303100265070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public final class RoundedContainer { private final Dimension2D dim; private final double titleHeight; private final double attributeHeight; private final HtmlColor borderColor; private final HtmlColor backColor; private final HtmlColor imgBackcolor; private final UStroke stroke; public RoundedContainer(Dimension2D dim, double titleHeight, double attributeHeight, HtmlColor borderColor, HtmlColor backColor, HtmlColor imgBackcolor, UStroke stroke) { this.dim = dim; this.imgBackcolor = imgBackcolor; this.titleHeight = titleHeight; this.borderColor = borderColor; this.backColor = backColor; this.attributeHeight = attributeHeight; this.stroke = stroke; } public void drawU(UGraphic ug, boolean shadowing) { ug = ug.apply(new UChangeBackColor(backColor)).apply(new UChangeColor(borderColor)); final URectangle rect = new URectangle(dim.getWidth(), dim.getHeight(), IEntityImage.CORNER, IEntityImage.CORNER); if (shadowing) { rect.setDeltaShadow(3.0); } ug.apply(stroke).draw(rect); final double yLine = titleHeight + attributeHeight; ug = ug.apply(new UChangeBackColor(imgBackcolor)); final double thickness = stroke.getThickness(); final URectangle inner = new URectangle(dim.getWidth() - 4 * thickness, dim.getHeight() - titleHeight - 4 * thickness - attributeHeight, IEntityImage.CORNER, IEntityImage.CORNER); ug.apply(new UChangeColor(imgBackcolor)).apply(new UTranslate(2 * thickness, yLine + 2 * thickness)) .draw(inner); if (titleHeight > 0) { ug.apply(stroke).apply(new UTranslate(0, yLine)).draw(new ULine(dim.getWidth(), 0)); } if (attributeHeight > 0) { ug.apply(stroke).apply(new UTranslate(0, yLine - attributeHeight)).draw(new ULine(dim.getWidth(), 0)); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/Shape.java000066400000000000000000000225661312650303100243000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Hideable; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.cucadiagram.EntityPosition; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.posimo.Positionable; import net.sourceforge.plantuml.svek.image.EntityImageDescription; import net.sourceforge.plantuml.svek.image.EntityImageStateBorder; import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.UPolygon; public class Shape implements Positionable, IShapePseudo, Hideable { private final ShapeType type; private final double width; private final double height; private final String uid; private final int color; private double minX; private double minY; private final Margins shield; private final EntityPosition entityPosition; private final IEntityImage image; public EntityPosition getEntityPosition() { return entityPosition; } private Cluster cluster; private final boolean top; public final Cluster getCluster() { return cluster; } public final void setCluster(Cluster cluster) { this.cluster = cluster; } @Override public String toString() { return super.toString() + " " + image + " " + type; } public Shape(IEntityImage image, ShapeType type, double width, double height, ColorSequence colorSequence, boolean top, Margins shield, EntityPosition entityPosition) { this.entityPosition = entityPosition; this.image = image; this.top = top; this.type = type; this.width = width; this.height = height; this.color = colorSequence.getValue(); this.uid = String.format("sh%04d", color); this.shield = shield; if (shield.isZero() == false && type != ShapeType.RECTANGLE && type != ShapeType.RECTANGLE_HTML_FOR_PORTS) { throw new IllegalArgumentException(); } } public final ShapeType getType() { return type; } public final double getWidth() { return width; } public final double getHeight() { return height; } public void appendShape(StringBuilder sb, StringBounder stringBounder) { if (type == ShapeType.RECTANGLE_HTML_FOR_PORTS) { appendLabelHtmlSpecialForLink(sb, stringBounder); return; } if (type == ShapeType.RECTANGLE && shield.isZero() == false) { appendHtml(sb); return; } sb.append(uid); sb.append(" ["); appendShapeInternal(sb); sb.append(","); sb.append("label=\"\""); sb.append(","); sb.append("width=" + SvekUtils.pixelToInches(getWidth())); sb.append(","); sb.append("height=" + SvekUtils.pixelToInches(getHeight())); sb.append(","); sb.append("color=\"" + StringUtils.getAsHtml(color) + "\""); sb.append("];"); SvekUtils.println(sb); } private void appendHtml(StringBuilder sb) { sb.append(uid); sb.append(" ["); sb.append("shape=plaintext,"); sb.append("label=<"); appendLabelHtml(sb); sb.append(">"); sb.append("];"); SvekUtils.println(sb); } private void appendLabelHtml(StringBuilder sb) { // Log.println("shield=" + shield); sb.append(""); sb.append(""); appendTd(sb); appendTd(sb, 1, shield.getY1()); appendTd(sb); sb.append(""); sb.append(""); appendTd(sb, shield.getX1(), 1); sb.append(""); appendTd(sb, shield.getX2(), 1); sb.append(""); sb.append(""); appendTd(sb); appendTd(sb, 1, shield.getY2()); appendTd(sb); sb.append(""); sb.append("
    "); sb.append("
    "); } private void appendLabelHtmlSpecialForLink(StringBuilder sb, StringBounder stringBounder) { final Ports ports = ((WithPorts) this.image).getPorts(stringBounder); sb.append(uid); sb.append(" ["); sb.append("shape=plaintext,"); // sb.append("color=\"" + StringUtils.getAsHtml(color) + "\","); sb.append("label=<"); sb.append(""); double position = 0; for (Map.Entry ent : ports.getAll().entrySet()) { final String portName = ent.getKey(); final PortGeometry geom = ent.getValue(); final double missing = geom.getPosition() - position; appendTr(sb, null, missing); appendTr(sb, portName, geom.getHeight()); position = geom.getLastY(); } appendTr(sb, null, getHeight() - position); sb.append("
    "); sb.append(">"); sb.append("];"); SvekUtils.println(sb); } private void appendTr(StringBuilder sb, final String portName, final double height) { if (height <= 0) { return; } sb.append(""); sb.append(""); sb.append(""); sb.append(""); } private void appendTd(StringBuilder sb, double w, double h) { sb.append(""); sb.append(""); } private void appendTd(StringBuilder sb) { sb.append(""); sb.append(""); } private void appendShapeInternal(StringBuilder sb) { if (type == ShapeType.RECTANGLE && shield.isZero() == false) { throw new UnsupportedOperationException(); } else if (type == ShapeType.RECTANGLE || type == ShapeType.FOLDER) { sb.append("shape=rect"); } else if (type == ShapeType.RECTANGLE_HTML_FOR_PORTS) { throw new UnsupportedOperationException(); } else if (type == ShapeType.OCTAGON) { sb.append("shape=octagon"); } else if (type == ShapeType.DIAMOND) { sb.append("shape=diamond"); } else if (type == ShapeType.CIRCLE) { sb.append("shape=circle"); } else if (type == ShapeType.CIRCLE_IN_RECT) { sb.append("shape=circle"); } else if (type == ShapeType.OVAL) { sb.append("shape=ellipse"); } else if (type == ShapeType.ROUND_RECTANGLE) { sb.append("shape=rect,style=rounded"); } else { throw new IllegalStateException(type.toString()); } } public final String getUid() { if (uid == null) { throw new IllegalStateException(); } return uid; } public final double getMinX() { return minX; } public final double getMinY() { return minY; } public IEntityImage getImage() { return image; } public final boolean isTop() { return top; } public Point2D getPosition() { return new Point2D.Double(minX, minY); } public Dimension2D getSize() { return new Dimension2DDouble(width, height); } public ClusterPosition getClusterPosition() { return new ClusterPosition(minX, minY, minX + width, minY + height); } public boolean isShielded() { return shield.isZero() == false; } public void moveSvek(double deltaX, double deltaY) { this.minX += deltaX; this.minY += deltaY; } public double getMaxWidthFromLabelForEntryExit(StringBounder stringBounder) { final EntityImageStateBorder im = (EntityImageStateBorder) image; return im.getMaxWidthFromLabelForEntryExit(stringBounder); } public boolean isHidden() { return image.isHidden(); } private Shadowable octagon; public void setOctagon(double minX, double minY, List points) { this.octagon = new UPolygon(points).translate(-minX, -minY); } public Shadowable getOctagon() { return octagon; } public Point2D getPoint2D(double x, double y) { return new Point2D.Double(minX + x, minY + y); } public Point2D projection(Point2D pt, StringBounder stringBounder) { if (getType() != ShapeType.FOLDER) { return pt; } final ClusterPosition clusterPosition = new ClusterPosition(minX, minY, minX + width, minY + height); if (clusterPosition.isPointJustUpper(pt)) { final Dimension2D dimName = ((EntityImageDescription) image).getNameDimension(stringBounder); if (pt.getX() < minX + dimName.getWidth()) { return pt; } return new Point2D.Double(pt.getX(), pt.getY() + dimName.getHeight() + 4); } return pt; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/ShapePseudoImpl.java000066400000000000000000000036121312650303100262710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import net.sourceforge.plantuml.graphic.StringBounder; public class ShapePseudoImpl implements IShapePseudo { private final String uid; private final double width; private final double height; public ShapePseudoImpl(String uid, double width, double height) { this.uid = uid; this.width = width; this.height = height; } public String getUid() { return uid; } public void appendShape(StringBuilder sb, StringBounder stringBounder) { sb.append(uid + " [shape=rect,label=\"\""); sb.append(",width=" + SvekUtils.pixelToInches(width)); sb.append(",height=" + SvekUtils.pixelToInches(height)); sb.append("];"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/ShapeType.java000066400000000000000000000026251312650303100251340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; public enum ShapeType { RECTANGLE, RECTANGLE_HTML_FOR_PORTS, ROUND_RECTANGLE, CIRCLE, CIRCLE_IN_RECT, OVAL, DIAMOND, OCTAGON, FOLDER } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/Side.java000066400000000000000000000024741312650303100241200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; public enum Side { NORTH, EAST, SOUTH, WEST } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/SingleStrategy.java000066400000000000000000000054731312650303100262020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * Modified by : Arno Peterson * * */ package net.sourceforge.plantuml.svek; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; public enum SingleStrategy { SQUARRE, HLINE, VLINE; public Collection generateLinks(List standalones) { return putInSquare(standalones); } private Collection putInSquare(List standalones) { final List result = new ArrayList(); final LinkType linkType = new LinkType(LinkDecor.NONE, LinkDecor.NONE).getInvisible(); final int branch = computeBranch(standalones.size()); int headBranch = 0; for (int i = 1; i < standalones.size(); i++) { final int dist = i - headBranch; final IEntity ent2 = standalones.get(i); final Link link; if (dist == branch) { final IEntity ent1 = standalones.get(headBranch); link = new Link(ent1, ent2, linkType, Display.NULL, 2); headBranch = i; } else { final IEntity ent1 = standalones.get(i - 1); link = new Link(ent1, ent2, linkType, Display.NULL, 1); } result.add(link); } return Collections.unmodifiableCollection(result); } static int computeBranch(int size) { final double sqrt = Math.sqrt(size); final int r = (int) sqrt; if (r * r == size) { return r; } return r + 1; } }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/SvekResult.java000066400000000000000000000110741312650303100253370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.cucadiagram.dot.DotData; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.posimo.Moveable; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UHidden; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public final class SvekResult extends AbstractTextBlock implements IEntityImage, Moveable { private final Rose rose = new Rose(); private ClusterPosition dim; private final DotData dotData; private final DotStringFactory dotStringFactory; public SvekResult(ClusterPosition dim, DotData dotData, DotStringFactory dotStringFactory) { this.dim = dim; this.dotData = dotData; this.dotStringFactory = dotStringFactory; } public void drawU(UGraphic ug) { for (Cluster cluster : dotStringFactory.getBibliotekon().allCluster()) { cluster.drawU(ug, new UStroke(1.5), dotData.getUmlDiagramType(), dotData.getSkinParam()); } final HtmlColor color = HtmlColorUtils.noGradient(rose.getHtmlColor(dotData.getSkinParam(), getArrowColorParam(), null)); for (Shape shape : dotStringFactory.getBibliotekon().allShapes()) { final double minX = shape.getMinX(); final double minY = shape.getMinY(); final UGraphic ug2 = shape.isHidden() ? ug.apply(UHidden.HIDDEN) : ug; final IEntityImage image = shape.getImage(); image.drawU(ug2.apply(new UTranslate(minX, minY))); if (image instanceof Untranslated) { ((Untranslated) image).drawUntranslated(ug.apply(new UChangeColor(color)), minX, minY); } // shape.getImage().drawNeighborhood(ug2, minX, minY); } for (Line line : dotStringFactory.getBibliotekon().allLines()) { final UGraphic ug2 = line.isHidden() ? ug.apply(UHidden.HIDDEN) : ug; line.drawU(ug2, color); } } private ColorParam getArrowColorParam() { if (dotData.getUmlDiagramType() == UmlDiagramType.CLASS) { return ColorParam.arrow; } else if (dotData.getUmlDiagramType() == UmlDiagramType.OBJECT) { return ColorParam.arrow; } else if (dotData.getUmlDiagramType() == UmlDiagramType.DESCRIPTION) { return ColorParam.arrow; } else if (dotData.getUmlDiagramType() == UmlDiagramType.ACTIVITY) { return ColorParam.arrow; } else if (dotData.getUmlDiagramType() == UmlDiagramType.STATE) { return ColorParam.arrow; } throw new IllegalStateException(); } public HtmlColor getBackcolor() { return dotData.getSkinParam().getBackgroundColor(); } public Dimension2D calculateDimension(StringBounder stringBounder) { return dim.getDimension(); } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } public Margins getShield(StringBounder stringBounder) { return Margins.NONE; } public void moveSvek(double deltaX, double deltaY) { dotStringFactory.moveSvek(deltaX, deltaY); dim = dim.delta(deltaX > 0 ? deltaX : 0, deltaY > 0 ? deltaY : 0); } public boolean isHidden() { return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/SvekUtils.java000066400000000000000000000154671312650303100251730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.awt.geom.Point2D; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.StringTokenizer; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.StringUtils; public class SvekUtils { static public void traceString(final File f, String text) throws IOException { PrintWriter pw = null; try { Log.info("Creating intermediate file " + f.getAbsolutePath()); pw = new PrintWriter(new FileWriter(f)); pw.print(text); } finally { if (pw != null) { pw.close(); } } } static class PointListIterator implements Iterator> { private final String text; private final double yDelta; private int pos = 0; public static PointListIterator create(String text, double yDelta, int lineColor) { final PointListIterator result = new PointListIterator(text, yDelta); final int idx = getIndexFromColor(text, lineColor); if (idx == -1) { result.pos = -1; } return result; } public PointListIterator cloneMe() { final PointListIterator result = new PointListIterator(text, yDelta); result.pos = this.pos; return result; } private PointListIterator(String text, double yDelta) { this.text = text; this.yDelta = yDelta; } public boolean hasNext() { return true; } public List next() { if (pos == -1) { return Collections.emptyList(); } try { final List result = extractPointsList(text, pos, yDelta); pos = text.indexOf(pointsString, pos) + pointsString.length() + 1; return result; } catch (StringIndexOutOfBoundsException e) { Log.error("Error " + e); return Collections.emptyList(); } } public void remove() { throw new UnsupportedOperationException(); } } final private static String pointsString = "points=\""; public static List extractPointsList(final String svg, final int starting, double yDelta) { final int p2 = svg.indexOf(pointsString, starting); final int p3 = svg.indexOf("\"", p2 + pointsString.length()); final String points = svg.substring(p2 + pointsString.length(), p3); final List pointsList = getPoints(points, yDelta); return pointsList; } public static List extractD(final String svg, final int starting, double yDelta) { final int p2 = svg.indexOf("d=\"", starting); final int p3 = svg.indexOf("\"", p2 + "d=\"".length()); final String points = svg.substring(p2 + "d=\"".length(), p3); final List pointsList = getPoints(points, yDelta); return pointsList; } public static int getIndexFromColor(String svg, int color) { String s = "stroke=\"" + StringUtils.goLowerCase(StringUtils.getAsHtml(color)) + "\""; int idx = svg.indexOf(s); if (idx != -1) { return idx; } s = ";stroke:" + StringUtils.goLowerCase(StringUtils.getAsHtml(color)) + ";"; idx = svg.indexOf(s); if (idx != -1) { return idx; } s = "fill=\"" + StringUtils.goLowerCase(StringUtils.getAsHtml(color)) + "\""; idx = svg.indexOf(s); if (idx != -1) { return idx; } // Log.info("Cannot find color=" + color + " " + StringUtils.goLowerCase(StringUtils.getAsHtml(color))); return -1; } static public double getValue(String svg, int starting, String varName) { final String varNameString = varName + "=\""; int p1 = svg.indexOf(varNameString, starting); if (p1 == -1) { throw new IllegalStateException(); } p1 += varNameString.length(); final int p2 = svg.indexOf('\"', p1); return Double.parseDouble(svg.substring(p1, p2)); } public static double getMaxX(List points) { double result = points.get(0).x; for (int i = 1; i < points.size(); i++) { if (points.get(i).x > result) { result = points.get(i).x; } } return result; } public static double getMinX(List points) { double result = points.get(0).x; for (int i = 1; i < points.size(); i++) { if (points.get(i).x < result) { result = points.get(i).x; } } return result; } public static Point2D.Double getMinXY(List points) { return new Point2D.Double(getMinX(points), getMinY(points)); } public static double getMaxY(List points) { double result = points.get(0).y; for (int i = 1; i < points.size(); i++) { if (points.get(i).y > result) { result = points.get(i).y; } } return result; } public static double getMinY(List points) { double result = points.get(0).y; for (int i = 1; i < points.size(); i++) { if (points.get(i).y < result) { result = points.get(i).y; } } return result; } static private List getPoints(String points, double yDelta) { try { final List result = new ArrayList(); final StringTokenizer st = new StringTokenizer(points, " MC"); while (st.hasMoreTokens()) { final String t = st.nextToken(); final StringTokenizer st2 = new StringTokenizer(t, ","); final double x = Double.parseDouble(st2.nextToken()); final double y = Double.parseDouble(st2.nextToken()) + yDelta; result.add(new Point2D.Double(x, y)); } return result; } catch (NumberFormatException e) { return Collections.emptyList(); } } public static void println(StringBuilder sb) { sb.append('\n'); } public static String pixelToInches(double pixel) { final double v = pixel / 72.0; return String.format(Locale.US, "%6.6f", v); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/TextBlockBackcolored.java000066400000000000000000000027121312650303100272570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.TextBlock; public interface TextBlockBackcolored extends TextBlock { HtmlColor getBackcolor(); }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/UGraphicForSnake.java000066400000000000000000000103521312650303100263610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.graphic.UGraphicDelegator; import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UTranslate; public class UGraphicForSnake extends UGraphicDelegator { private final double dx; private final double dy; private final List snakes; public UTranslate getTranslation() { return new UTranslate(dx, dy); } static class PendingSnake { private final Snake snake; private final UGraphic ug; private final double dx; private final double dy; private PendingSnake(Snake snake, UGraphic ug, double dx, double dy) { this.snake = snake; this.ug = ug; this.dx = dx; this.dy = dy; } public void drawInternal() { snake.drawInternal(ug); } public void removeEndDecorationIfTouches(List snakes) { for (PendingSnake other : snakes) { if (moved().touches(other.moved())) { this.snake.removeEndDecoration(); return; } } } private Snake moved() { return snake.move(dx, dy); } @Override public String toString() { return "dx=" + dx + " dy=" + dy + " " + snake.move(dx, dy).toString(); } public PendingSnake merge(PendingSnake newItem) { // if (snake.isMergeable() == false || newItem.snake.isMergeable() == false) { // return null; // } final Snake s1 = snake.move(dx, dy); final Snake s2 = newItem.snake.move(newItem.dx, newItem.dy); final Snake merge = s1.merge(s2, ug.getStringBounder()); if (merge == null) { return null; } return new PendingSnake(merge.move(-dx, -dy), ug, dx, dy); } } public UGraphicForSnake(UGraphic ug) { this(ug, 0, 0, new ArrayList()); } private UGraphicForSnake(UGraphic ug, double dx, double dy, List snakes) { super(ug); this.dx = dx; this.dy = dy; this.snakes = snakes; } public void draw(UShape shape) { if (shape instanceof Snake) { final Snake snake = (Snake) shape; addPendingSnake(snake); } else { getUg().draw(shape); } } private void addPendingSnake(final Snake snake) { final PendingSnake newItem = new PendingSnake(snake, getUg(), dx, dy); for (int pos = 0; pos < snakes.size(); pos++) { final PendingSnake merge = snakes.get(pos).merge(newItem); if (merge != null) { snakes.set(pos, merge); return; } } snakes.add(newItem); } @Override public void flushUg() { for (PendingSnake snake : snakes) { snake.removeEndDecorationIfTouches(snakes); snake.drawInternal(); } snakes.clear(); } public UGraphic apply(UChange change) { double newdx = dx; double newdy = dy; if (change instanceof UTranslate) { newdx += ((UTranslate) change).getDx(); newdy += ((UTranslate) change).getDy(); } return new UGraphicForSnake(getUg().apply(change), newdx, newdy, snakes); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/Untranslated.java000066400000000000000000000026751312650303100257030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import net.sourceforge.plantuml.ugraphic.UGraphic; public interface Untranslated extends IEntityImage { public void drawUntranslated(UGraphic ug, double minX, double minY); }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/WithPorts.java000066400000000000000000000026211312650303100251710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek; import net.sourceforge.plantuml.graphic.StringBounder; public interface WithPorts { Ports getPorts(StringBounder stringBounder); }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/000077500000000000000000000000001312650303100244145ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/Extremity.java000066400000000000000000000037641312650303100272630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; public abstract class Extremity implements UDrawable { protected double manageround(double angle) { final double deg = angle * 180.0 / Math.PI; if (isCloseToo(0, deg)) { return 0; } if (isCloseToo(90, deg)) { return 90.0 * Math.PI / 180.0; } if (isCloseToo(180, deg)) { return 180.0 * Math.PI / 180.0; } if (isCloseToo(270, deg)) { return 270.0 * Math.PI / 180.0; } if (isCloseToo(360, deg)) { return 0; } return angle; } private boolean isCloseToo(double value, double variable) { if (Math.abs(value - variable) < 0.05) { return true; } return false; } public abstract Point2D somePoint(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityArrow.java000066400000000000000000000057261312650303100302760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityArrow extends Extremity { private UPolygon polygon = new UPolygon(); private final ULine line; private final Point2D contact; @Override public Point2D somePoint() { return contact; } public ExtremityArrow(Point2D p1, double angle, Point2D center) { angle = manageround(angle); final int xContact = buildPolygon(); polygon.rotate(angle + Math.PI / 2); polygon = polygon.translate(p1.getX(), p1.getY()); contact = new Point2D.Double(p1.getX() - xContact * Math.cos(angle + Math.PI / 2), p1.getY() - xContact * Math.sin(angle + Math.PI / 2)); this.line = new ULine(center.getX() - contact.getX(), center.getY() - contact.getY()); } public ExtremityArrow(Point2D p0, double angle) { this.line = null; angle = manageround(angle); buildPolygon(); polygon.rotate(angle); polygon = polygon.translate(p0.getX(), p0.getY()); contact = p0; } private int buildPolygon() { polygon.addPoint(0, 0); final int xWing = 9; final int yAperture = 4; polygon.addPoint(-xWing, -yAperture); final int xContact = 5; polygon.addPoint(-xContact, 0); polygon.addPoint(-xWing, yAperture); polygon.addPoint(0, 0); return xContact; } public void drawU(UGraphic ug) { ug = ug.apply(new UChangeBackColor(ug.getParam().getColor())); ug.draw(polygon); if (line != null && line.getLength() > 2) { ug.apply(new UTranslate(contact.getX(), contact.getY())).draw(line); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityArrowAndCircle.java000066400000000000000000000057541312650303100320440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityArrowAndCircle extends Extremity { private UPolygon polygon = new UPolygon(); private final Point2D contact; private final Point2D dest; private final double radius = 5; @Override public Point2D somePoint() { return contact; } public ExtremityArrowAndCircle(Point2D p1, double angle, Point2D center) { angle = manageround(angle); polygon.addPoint(0, 0); this.dest = new Point2D.Double(p1.getX(), p1.getY()); final int xWing = 9; final int yAperture = 4; polygon.addPoint(-xWing, -yAperture); final int xContact = 5; polygon.addPoint(-xContact, 0); polygon.addPoint(-xWing, yAperture); polygon.addPoint(0, 0); polygon.rotate(angle + Math.PI / 2); polygon = polygon.translate(p1.getX() + radius * Math.sin(angle), p1.getY() - radius * Math.cos(angle)); contact = new Point2D.Double(p1.getX() - xContact * Math.cos(angle + Math.PI / 2), p1.getY() - xContact * Math.sin(angle + Math.PI / 2)); // this.line = new ULine(center.getX() - contact.getX(), center.getY() - contact.getY()); } public void drawU(UGraphic ug) { ug.apply(new UChangeBackColor(ug.getParam().getColor())).draw(polygon); ug.apply(new UStroke(1.5)).apply(new UChangeBackColor(HtmlColorUtils.WHITE)).apply(new UTranslate(dest.getX() - radius, dest.getY() - radius)).draw(new UEllipse(radius * 2, radius * 2)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityCircle.java000066400000000000000000000041431312650303100303750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityCircle extends Extremity { private final Point2D dest; private final double radius = 6; @Override public Point2D somePoint() { return dest; } public ExtremityCircle(Point2D p1) { this.dest = new Point2D.Double(p1.getX(), p1.getY()); } public void drawU(UGraphic ug) { ug.apply(new UStroke(1.5)).apply(new UChangeBackColor(HtmlColorUtils.WHITE)).apply(new UTranslate(dest.getX() - radius, dest.getY() - radius)).draw(new UEllipse(radius * 2, radius * 2)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityCircleConnect.java000066400000000000000000000060141312650303100317060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityCircleConnect extends Extremity { private final double px; private final double py; private final Point2D dest; private final double radius = 6; private final double radius2 = 10; private final double ortho; @Override public Point2D somePoint() { return dest; } public ExtremityCircleConnect(Point2D p1, double ortho) { this.px = p1.getX() - radius; this.py = p1.getY() - radius; this.dest = new Point2D.Double(p1.getX(), p1.getY()); this.ortho = ortho; } public void drawU(UGraphic ug) { ug = ug.apply(new UStroke(1.5)).apply(new UChangeBackColor(HtmlColorUtils.WHITE)); ug.apply(new UTranslate(dest.getX() - radius, dest.getY() - radius)).draw(new UEllipse(radius * 2, radius * 2)); final double deg = -ortho * 180 / Math.PI + 90 - 45; final UEllipse arc1 = new UEllipse(2 * radius2, 2 * radius2, deg, 90); ug.apply(new UTranslate(dest.getX() - radius2, dest.getY() - radius2)).draw(arc1); } // private Point2D getPointOnCircle(double angle) { // final double x = px + radius + radius2 * Math.cos(angle); // final double y = py + radius + radius2 * Math.sin(angle); // return new Point2D.Double(x, y); // } // // static private void drawLine(UGraphic ug, double x, double y, Point2D p1, Point2D p2) { // final double dx = p2.getX() - p1.getX(); // final double dy = p2.getY() - p1.getY(); // ug.draw(x + p1.getX(), y + p1.getY(), new ULine(dx, dy)); // // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityCircleCross.java000066400000000000000000000056561312650303100314210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityCircleCross extends Extremity { private final double px; private final double py; private final Point2D dest; private final double radius = 7; @Override public Point2D somePoint() { return dest; } public ExtremityCircleCross(Point2D p1) { this.px = p1.getX() - radius; this.py = p1.getY() - radius; this.dest = new Point2D.Double(p1.getX(), p1.getY()); } public void drawU(UGraphic ug) { ug = ug.apply(new UChangeBackColor(HtmlColorUtils.WHITE)); ug.apply(new UStroke(1.5)).apply(new UTranslate(dest.getX() - radius, dest.getY() - radius)).draw(new UEllipse(radius * 2, radius * 2)); drawLine(ug, 0, 0, getPointOnCircle(Math.PI / 4), getPointOnCircle(Math.PI + Math.PI / 4)); drawLine(ug, 0, 0, getPointOnCircle(-Math.PI / 4), getPointOnCircle(Math.PI - Math.PI / 4)); } private Point2D getPointOnCircle(double angle) { final double x = px + radius + radius * Math.cos(angle); final double y = py + radius + radius * Math.sin(angle); return new Point2D.Double(x, y); } static private void drawLine(UGraphic ug, double x, double y, Point2D p1, Point2D p2) { final double dx = p2.getX() - p1.getX(); final double dy = p2.getY() - p1.getY(); ug.apply(new UTranslate(x + p1.getX(), y + p1.getY())).draw(new ULine(dx, dy)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityCircleCrowfoot.java000066400000000000000000000060651312650303100321250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityCircleCrowfoot extends Extremity { private final Point2D contact; private final double angle; private final double radius = 4; @Override public Point2D somePoint() { return contact; } public ExtremityCircleCrowfoot(Point2D p1, double angle) { this.contact = new Point2D.Double(p1.getX(), p1.getY()); this.angle = manageround(angle + Math.PI / 2); } public void drawU(UGraphic ug) { final int xWing = 8; final int yAperture = 6; final AffineTransform rotate = AffineTransform.getRotateInstance(this.angle); Point2D middle = new Point2D.Double(0, 0); Point2D left = new Point2D.Double(0, -yAperture); Point2D base = new Point2D.Double(-xWing, 0); Point2D right = new Point2D.Double(0, yAperture); Point2D circleBase = new Point2D.Double(-xWing-radius-2, 0); rotate.transform(left, left); rotate.transform(base, base); rotate.transform(right, right); rotate.transform(circleBase, circleBase); drawLine(ug, contact.getX(), contact.getY(), base, left); drawLine(ug, contact.getX(), contact.getY(), base, right); drawLine(ug, contact.getX(), contact.getY(), base, middle); ug.apply(new UTranslate(contact.getX()+circleBase.getX()-radius, contact.getY()+circleBase.getY()-radius)).draw(new UEllipse(2*radius, 2*radius)); } static private void drawLine(UGraphic ug, double x, double y, Point2D p1, Point2D p2) { final double dx = p2.getX() - p1.getX(); final double dy = p2.getY() - p1.getY(); ug.apply(new UTranslate(x + p1.getX(), y + p1.getY())).draw(new ULine(dx, dy)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityCircleLine.java000066400000000000000000000060611312650303100312060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityCircleLine extends Extremity { private final Point2D contact; private final double angle; private final double radius = 4; private final double lineHeight = 4; @Override public Point2D somePoint() { return contact; } public ExtremityCircleLine(Point2D p1, double angle) { this.contact = new Point2D.Double(p1.getX(), p1.getY()); this.angle = manageround(angle + Math.PI / 2); } public void drawU(UGraphic ug) { final int xWing = 4; final AffineTransform rotate = AffineTransform.getRotateInstance(this.angle); Point2D middle = new Point2D.Double(0, 0); Point2D base = new Point2D.Double(-xWing-radius-3, 0); Point2D circleBase = new Point2D.Double(-xWing-radius-3, 0); Point2D lineTop = new Point2D.Double(-xWing, -lineHeight); Point2D lineBottom = new Point2D.Double(-xWing, lineHeight); rotate.transform(lineTop, lineTop); rotate.transform(lineBottom, lineBottom); rotate.transform(base, base); rotate.transform(circleBase, circleBase); drawLine(ug, contact.getX(), contact.getY(), base, middle); ug.apply(new UTranslate(contact.getX()+circleBase.getX()-radius, contact.getY()+circleBase.getY()-radius)).draw(new UEllipse(2*radius, 2*radius)); drawLine(ug, contact.getX(), contact.getY(), lineTop, lineBottom); } static private void drawLine(UGraphic ug, double x, double y, Point2D p1, Point2D p2) { final double dx = p2.getX() - p1.getX(); final double dy = p2.getY() - p1.getY(); ug.apply(new UTranslate(x + p1.getX(), y + p1.getY())).draw(new ULine(dx, dy)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityCrowfoot.java000066400000000000000000000061431312650303100310000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import net.sourceforge.plantuml.svek.Side; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityCrowfoot extends Extremity { private final Point2D contact; private double angle; private final Side side; @Override public Point2D somePoint() { return contact; } public ExtremityCrowfoot(Point2D p1, double angle, Side side) { this.contact = new Point2D.Double(p1.getX(), p1.getY()); this.angle = manageround(angle + Math.PI / 2); this.side = side; } public void drawU(UGraphic ug) { final int xWing = 8; final int yAperture = 8; final AffineTransform rotate = AffineTransform.getRotateInstance(this.angle); Point2D middle = new Point2D.Double(0, 0); Point2D left = new Point2D.Double(0, -yAperture); Point2D base = new Point2D.Double(-xWing, 0); Point2D right = new Point2D.Double(0, yAperture); rotate.transform(left, left); rotate.transform(base, base); rotate.transform(right, right); if (side == Side.WEST || side == Side.EAST) { left.setLocation(middle.getX(), left.getY()); right.setLocation(middle.getX(), right.getY()); } if (side == Side.SOUTH || side == Side.NORTH) { left.setLocation(left.getX(), middle.getY()); right.setLocation(right.getX(), middle.getY()); } drawLine(ug, contact.getX(), contact.getY(), base, left); drawLine(ug, contact.getX(), contact.getY(), base, right); drawLine(ug, contact.getX(), contact.getY(), base, middle); } static private void drawLine(UGraphic ug, double x, double y, Point2D p1, Point2D p2) { final double dx = p2.getX() - p1.getX(); final double dy = p2.getY() - p1.getY(); ug.apply(new UTranslate(x + p1.getX(), y + p1.getY())).draw(new ULine(dx, dy)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityDiamond.java000066400000000000000000000050111312650303100305420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; class ExtremityDiamond extends Extremity { private UPolygon polygon = new UPolygon(); private final boolean fill; private final Point2D contact; private final HtmlColor backgroundColor; @Override public Point2D somePoint() { return contact; } public ExtremityDiamond(Point2D p1, double angle, boolean fill, HtmlColor backgroundColor) { this.fill = fill; this.backgroundColor = backgroundColor; this.contact = new Point2D.Double(p1.getX(), p1.getY()); angle = manageround(angle); polygon.addPoint(0, 0); final int xWing = 6; final int yAperture = 4; polygon.addPoint(-xWing, -yAperture); polygon.addPoint(-xWing * 2, 0); polygon.addPoint(-xWing, yAperture); polygon.addPoint(0, 0); polygon.rotate(angle + Math.PI / 2); polygon = polygon.translate(p1.getX(), p1.getY()); } public void drawU(UGraphic ug) { if (fill) { ug = ug.apply(new UChangeBackColor(ug.getParam().getColor())); } else { ug = ug.apply(new UChangeBackColor(backgroundColor)); } ug.draw(polygon); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityDoubleLine.java000066400000000000000000000061541312650303100312220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityDoubleLine extends Extremity { private final Point2D contact; private final double angle; private final double lineHeight = 4; @Override public Point2D somePoint() { return contact; } public ExtremityDoubleLine(Point2D p1, double angle) { this.contact = new Point2D.Double(p1.getX(), p1.getY()); this.angle = manageround(angle + Math.PI / 2); } public void drawU(UGraphic ug) { final int xWing = 4; final AffineTransform rotate = AffineTransform.getRotateInstance(this.angle); Point2D firstLineTop = new Point2D.Double(-xWing, -lineHeight); Point2D firstLineBottom = new Point2D.Double(-xWing, lineHeight); Point2D secondLineTop = new Point2D.Double(-xWing - 3, -lineHeight); Point2D secondLineBottom = new Point2D.Double(-xWing - 3, lineHeight); Point2D middle = new Point2D.Double(0, 0); Point2D base = new Point2D.Double(-xWing - 4, 0); rotate.transform(middle, middle); rotate.transform(base, base); rotate.transform(firstLineTop, firstLineTop); rotate.transform(firstLineBottom, firstLineBottom); rotate.transform(secondLineTop, secondLineTop); rotate.transform(secondLineBottom, secondLineBottom); drawLine(ug, contact.getX(), contact.getY(), firstLineTop, firstLineBottom); drawLine(ug, contact.getX(), contact.getY(), secondLineTop, secondLineBottom); drawLine(ug, contact.getX(), contact.getY(), base, middle); } static private void drawLine(UGraphic ug, double x, double y, Point2D p1, Point2D p2) { final double dx = p2.getX() - p1.getX(); final double dy = p2.getY() - p1.getY(); ug.apply(new UTranslate(x + p1.getX(), y + p1.getY())).draw(new ULine(dx, dy)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityExtends.java000066400000000000000000000045031312650303100306060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; class ExtremityExtends extends Extremity { private UPolygon polygon = new UPolygon(); private final HtmlColor fill; private final Point2D contact; @Override public Point2D somePoint() { return contact; } public ExtremityExtends(Point2D p1, double angle, HtmlColor backgroundColor) { this.fill = backgroundColor; this.contact = new Point2D.Double(p1.getX(), p1.getY()); angle = manageround(angle); polygon.addPoint(0, 0); final double xWing = 19;// 8 * 2.4; final double yAperture = 7;// 3 * 2.4; polygon.addPoint(-xWing, -yAperture); polygon.addPoint(-xWing, yAperture); polygon.addPoint(0, 0); polygon.rotate(angle + Math.PI / 2); polygon = polygon.translate(p1.getX(), p1.getY()); } public void drawU(UGraphic ug) { ug = ug.apply(new UChangeBackColor(fill)); ug.draw(polygon); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactory.java000066400000000000000000000031271312650303100306040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.Side; public interface ExtremityFactory { public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side); public UDrawable createUDrawable(Point2D p0, double angle, Side side); } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryArrow.java000066400000000000000000000037131312650303100316200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryArrow extends AbstractExtremityFactory implements ExtremityFactory { @Override public UDrawable createUDrawable(Point2D p0, double angle, Side side) { return new ExtremityArrow(p0, angle); } public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { final double ortho = atan2(p0, p2); final Point2D center = new Point2D.Double((p0.getX() + p2.getX()) / 2, (p0.getY() + p2.getY()) / 2); return new ExtremityArrow(p1, ortho, center); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryArrowAndCircle.java000066400000000000000000000035341312650303100333660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryArrowAndCircle extends AbstractExtremityFactory implements ExtremityFactory { public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { final double ortho = atan2(p0, p2); final Point2D center = new Point2D.Double((p0.getX() + p2.getX()) / 2, (p0.getY() + p2.getY()) / 2); return new ExtremityArrowAndCircle(p1, ortho, center); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryCircle.java000066400000000000000000000033321312650303100317240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryCircle extends AbstractExtremityFactory implements ExtremityFactory { public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { // final double ortho = atan2(p0, p2); return new ExtremityCircle(p1); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryCircleConnect.java000066400000000000000000000036141312650303100332410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryCircleConnect extends AbstractExtremityFactory implements ExtremityFactory { @Override public UDrawable createUDrawable(Point2D p0, double angle, Side side) { angle -= Math.PI / 2; return new ExtremityCircleConnect(p0, angle); } public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { final double ortho = atan2(p0, p2); return new ExtremityCircleConnect(p1, ortho); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryCircleCross.java000066400000000000000000000033441312650303100327410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryCircleCross extends AbstractExtremityFactory implements ExtremityFactory { public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { // final double ortho = atan2(p0, p2); return new ExtremityCircleCross(p1); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryCircleCrowfoot.java000066400000000000000000000033571312650303100334560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryCircleCrowfoot extends AbstractExtremityFactory implements ExtremityFactory { public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { final double ortho = atan2(p0, p2); return new ExtremityCircleCrowfoot(p1, ortho); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryCircleLine.java000066400000000000000000000033451312650303100325400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryCircleLine extends AbstractExtremityFactory implements ExtremityFactory { public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { final double ortho = atan2(p0, p2); return new ExtremityCircleLine(p1, ortho); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryCrowfoot.java000066400000000000000000000033461312650303100323320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryCrowfoot extends AbstractExtremityFactory implements ExtremityFactory { public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { final double ortho = atan2(p0, p2); return new ExtremityCrowfoot(p1, ortho, side); } }plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryDiamond.java000066400000000000000000000042461312650303100321030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryDiamond extends AbstractExtremityFactory implements ExtremityFactory { private final boolean fill; private final HtmlColor backgroundColor; @Override public UDrawable createUDrawable(Point2D p0, double angle, Side side) { return new ExtremityDiamond(p0, angle - Math.PI / 2, fill, backgroundColor); } public ExtremityFactoryDiamond(boolean fill, HtmlColor backgroundColor) { this.fill = fill; this.backgroundColor = backgroundColor; } public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { final double ortho = atan2(p0, p2); return new ExtremityDiamond(p1, ortho, fill, backgroundColor); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryDoubleLine.java000066400000000000000000000033451312650303100325510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryDoubleLine extends AbstractExtremityFactory implements ExtremityFactory { public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { final double ortho = atan2(p0, p2); return new ExtremityDoubleLine(p1, ortho); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryExtends.java000066400000000000000000000042031312650303100321330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryExtends extends AbstractExtremityFactory implements ExtremityFactory { private final HtmlColor backgroundColor; public ExtremityFactoryExtends(HtmlColor backgroundColor) { this.backgroundColor = backgroundColor; } @Override public UDrawable createUDrawable(Point2D p0, double angle, Side side) { return new ExtremityExtends(p0, angle - Math.PI / 2, backgroundColor); } public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { throw new UnsupportedOperationException(); // final double ortho = atan2(p0, p2); // return new ExtremityExtends(p1, ortho, true); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryLineCrowfoot.java000066400000000000000000000033511312650303100331360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryLineCrowfoot extends AbstractExtremityFactory implements ExtremityFactory { public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { final double ortho = atan2(p0, p2); return new ExtremityLineCrowfoot(p1, ortho); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryNotNavigable.java000066400000000000000000000035771312650303100331070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryNotNavigable extends AbstractExtremityFactory implements ExtremityFactory { @Override public UDrawable createUDrawable(Point2D p0, double angle, Side side) { return new ExtremityNotNavigable(p0, angle - Math.PI / 2); } public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { final double ortho = atan2(p0, p2); return new ExtremityNotNavigable(p1, ortho); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryParenthesis.java000066400000000000000000000041651312650303100330150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryParenthesis extends AbstractExtremityFactory implements ExtremityFactory { @Override public UDrawable createUDrawable(Point2D p0, double angle, Side side) { return new ExtremityParenthesis(p0, angle - Math.PI / 2); } public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { final double ortho = atan2(p0, p2); if (OptionFlags.USE_INTERFACE_EYE2) { final Point2D center = new Point2D.Double((p0.getX() + p2.getX()) / 2, (p0.getY() + p2.getY()) / 2); return new ExtremityParenthesis2(center, ortho, p1); } return new ExtremityParenthesis(p1, ortho); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryPlus.java000066400000000000000000000035651312650303100314560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryPlus extends AbstractExtremityFactory implements ExtremityFactory { @Override public UDrawable createUDrawable(Point2D center, double angle, Side side) { return ExtremityPlus.create(center, angle - Math.PI / 2); } public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { final double ortho = atan2(p0, p2); return ExtremityPlus.create(p1, ortho); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactorySquarre.java000066400000000000000000000035301312650303100321450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactorySquarre extends AbstractExtremityFactory implements ExtremityFactory { @Override public UDrawable createUDrawable(Point2D p0, double angle, Side side) { return new ExtremitySquarre(p0); } public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { // final double ortho = atan2(p0, p2); return new ExtremitySquarre(p1); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityFactoryTriangle.java000066400000000000000000000036001312650303100322660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svek.AbstractExtremityFactory; import net.sourceforge.plantuml.svek.Side; public class ExtremityFactoryTriangle extends AbstractExtremityFactory implements ExtremityFactory { @Override public UDrawable createUDrawable(Point2D p0, double angle, Side side) { return new ExtremityTriangle(p0, angle - Math.PI / 2, false); } public UDrawable createUDrawable(Point2D p0, Point2D p1, Point2D p2, Side side) { final double ortho = atan2(p0, p2); return new ExtremityTriangle(p1, ortho, true); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityLineCrowfoot.java000066400000000000000000000060331312650303100316060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityLineCrowfoot extends Extremity { private final Point2D contact; private final double angle; private final double lineHeight = 4; @Override public Point2D somePoint() { return contact; } public ExtremityLineCrowfoot(Point2D p1, double angle) { this.contact = new Point2D.Double(p1.getX(), p1.getY()); this.angle = manageround(angle + Math.PI / 2); } public void drawU(UGraphic ug) { final int xWing = 8; final int yAperture = 6; final AffineTransform rotate = AffineTransform.getRotateInstance(this.angle); Point2D middle = new Point2D.Double(0, 0); Point2D left = new Point2D.Double(0, -yAperture); Point2D base = new Point2D.Double(-xWing, 0); Point2D lineTop = new Point2D.Double(-xWing-2, -lineHeight); Point2D lineBottom = new Point2D.Double(-xWing-2, lineHeight); Point2D right = new Point2D.Double(0, yAperture); rotate.transform(left, left); rotate.transform(base, base); rotate.transform(right, right); rotate.transform(lineTop, lineTop); rotate.transform(lineBottom, lineBottom); drawLine(ug, contact.getX(), contact.getY(), base, left); drawLine(ug, contact.getX(), contact.getY(), base, right); drawLine(ug, contact.getX(), contact.getY(), base, middle); drawLine(ug, contact.getX(), contact.getY(), lineTop, lineBottom); } static private void drawLine(UGraphic ug, double x, double y, Point2D p1, Point2D p2) { final double dx = p2.getX() - p1.getX(); final double dy = p2.getY() - p1.getY(); ug.apply(new UTranslate(x + p1.getX(), y + p1.getY())).draw(new ULine(dx, dy)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityNotNavigable.java000066400000000000000000000040671312650303100315520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPath; class ExtremityNotNavigable extends Extremity { private UPath path = new UPath(); private final Point2D contact; @Override public Point2D somePoint() { return contact; } public ExtremityNotNavigable(Point2D p1, double angle) { this.contact = new Point2D.Double(p1.getX(), p1.getY()); angle = manageround(angle); final double size = 4; final double move = 5; path.moveTo(-size, 0); path.lineTo(size, 2 * size); path.moveTo(size, 0); path.lineTo(-size, 2 * size); path = path.translate(0, move); path = path.rotate(angle + Math.PI); path = path.translate(p1.getX(), p1.getY()); } public void drawU(UGraphic ug) { ug.draw(path); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityParenthesis.java000066400000000000000000000042251312650303100314620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityParenthesis extends Extremity { private final Point2D dest; private final double radius2 = 9; private final double ortho; private final double ang = 70; public ExtremityParenthesis(Point2D p1, double ortho) { this.dest = new Point2D.Double(p1.getX(), p1.getY()); this.ortho = ortho; } @Override public Point2D somePoint() { return dest; } public void drawU(UGraphic ug) { final double deg = -ortho * 180 / Math.PI + 90 - ang; final UEllipse arc1 = new UEllipse(2 * radius2, 2 * radius2, deg, 2 * ang); ug.apply(new UStroke(1.5)).apply(new UTranslate(dest.getX() - radius2, dest.getY() - radius2)).draw(arc1); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityParenthesis2.java000066400000000000000000000064401312650303100315450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.svek.image.EntityImageLollipopInterfaceEye2; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityParenthesis2 extends Extremity { private final Point2D contact; private final Point2D center; private final double ortho; private final double ang = 30; public ExtremityParenthesis2(Point2D contact, double ortho, Point2D p1) { this.contact = new Point2D.Double(contact.getX(), contact.getY()); this.ortho = ortho; final double dx = p1.getX() - contact.getX(); final double dy = p1.getY() - contact.getY(); final double distance1 = Math.round(contact.distance(p1)); // System.err.println("distance=" + distance1); final double len = Math.round(distance1 + EntityImageLollipopInterfaceEye2.SIZE / 2); this.center = new Point2D.Double(contact.getX() + dx / distance1 * len, contact.getY() + dy / distance1 * len); } @Override public Point2D somePoint() { return contact; } public void drawU(UGraphic ug) { final double deg = -ortho * 180 / Math.PI + 90 - ang; // final Point2D other = new Point2D.Double(contact.getX() + 10 * Math.cos(deg), contact.getY() + 10 // * Math.sin(deg)); // final ULine line = new ULine(1, 1); // ug.apply(new UChangeColor(HtmlColorUtils.GREEN)).apply(new UTranslate(contact.getX(), contact.getY())) // .draw(line); // ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(new UTranslate(center.getX(), // center.getY())).draw(line); // // final UEllipse arc1 = new UEllipse(2 * radius2, 2 * radius2, deg, 2 * ang); // // ug.apply(new UStroke(1.5)).apply(new UTranslate(dest.getX() - radius2, dest.getY() - radius2)).draw(arc1); // final double size = Math.round(contact.distance(center)); // System.err.println("size=" + size); final UEllipse circle = new UEllipse(size * 2, size * 2, deg, 2 * ang); ug.apply(new UTranslate(center.getX() - size, center.getY() - size)).draw(circle); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityPlus.java000066400000000000000000000061621312650303100301220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityPlus extends Extremity { private final UEllipse circle; private final double px; private final double py; private static final double radius = 8; private final double angle; private ExtremityPlus(double x, double y, double angle) { this.angle = angle; this.circle = new UEllipse(2 * radius, 2 * radius); this.px = x; this.py = y; } @Override public Point2D somePoint() { return new Point2D.Double(px, py); } public static UDrawable create(Point2D p1, double angle) { final double x = p1.getX() - radius + radius * Math.sin(angle); final double y = p1.getY() - radius - radius * Math.cos(angle); return new ExtremityPlus(x, y, angle); } public void drawU(UGraphic ug) { ug.apply(new UChangeBackColor(HtmlColorUtils.WHITE)).apply(new UTranslate(px + 0, py + 0)).draw(circle); drawLine(ug, 0, 0, getPointOnCircle(angle - Math.PI / 2), getPointOnCircle(angle + Math.PI / 2)); drawLine(ug, 0, 0, getPointOnCircle(angle), getPointOnCircle(angle + Math.PI)); } private Point2D getPointOnCircle(double angle) { final double x = px + radius + radius * Math.cos(angle); final double y = py + radius + radius * Math.sin(angle); return new Point2D.Double(x, y); } static private void drawLine(UGraphic ug, double x, double y, Point2D p1, Point2D p2) { final double dx = p2.getX() - p1.getX(); final double dy = p2.getY() - p1.getY(); ug.apply(new UTranslate(x + p1.getX(), y + p1.getY())).draw(new ULine(dx, dy)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremitySquarre.java000066400000000000000000000041511312650303100306150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremitySquarre extends Extremity { private final Point2D dest; private final double radius = 5; @Override public Point2D somePoint() { return dest; } public ExtremitySquarre(Point2D p1) { this.dest = new Point2D.Double(p1.getX(), p1.getY()); } public void drawU(UGraphic ug) { ug.apply(new UStroke(1.5)).apply(new UChangeBackColor(HtmlColorUtils.WHITE)).apply(new UTranslate(dest.getX() - radius, dest.getY() - radius)).draw(new URectangle(radius * 2, radius * 2)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityStateLine1.java000066400000000000000000000070651312650303100311530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityStateLine1 extends Extremity { private UPolygon polygon = new UPolygon(); private final Point2D dest; private final double radius = 7; private final double angle; @Override public Point2D somePoint() { return dest; } public ExtremityStateLine1(double angle, Point2D center) { this.angle = manageround(angle); polygon.addPoint(0, 0); this.dest = new Point2D.Double(center.getX(), center.getY()); final int xWing = 9; final int yAperture = 4; polygon.addPoint(-xWing, -yAperture); final int xContact = 5; polygon.addPoint(-xContact, 0); polygon.addPoint(-xWing, yAperture); polygon.addPoint(0, 0); polygon.rotate(this.angle); polygon = polygon.translate(center.getX(), center.getY()); } public void drawU(UGraphic ug) { ug.apply(new UChangeBackColor(ug.getParam().getColor())).apply(new UTranslate(-radius * Math.cos(angle), -radius * Math.sin(angle))).draw(polygon); ug = ug.apply(new UChangeBackColor(HtmlColorUtils.WHITE)); ug.apply(new UStroke(1.5)).apply(new UTranslate(dest.getX() - radius, dest.getY() - radius)).draw(new UEllipse(radius * 2, radius * 2)); drawLine(ug, getPointOnCircle(dest.getX(), dest.getY(), Math.PI / 4), getPointOnCircle(dest.getX(), dest.getY(), Math.PI + Math.PI / 4)); drawLine(ug, getPointOnCircle(dest.getX(), dest.getY(), -Math.PI / 4), getPointOnCircle(dest.getX(), dest.getY(), Math.PI - Math.PI / 4)); } private Point2D getPointOnCircle(double centerX, double centerY, double angle) { final double x = centerX + radius * Math.cos(angle); final double y = centerY + radius * Math.sin(angle); return new Point2D.Double(x, y); } static private void drawLine(UGraphic ug, Point2D p1, Point2D p2) { final double dx = p2.getX() - p1.getX(); final double dy = p2.getY() - p1.getY(); ug.apply(new UTranslate(p1.getX(), p1.getY())).draw(new ULine(dx, dy)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityStateLine2.java000066400000000000000000000054101312650303100311440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class ExtremityStateLine2 extends Extremity { private UPolygon polygon = new UPolygon(); private final Point2D dest; private final double radius = 5; private final double angle; @Override public Point2D somePoint() { return dest; } public ExtremityStateLine2(double angle, Point2D center) { this.angle = manageround(angle); polygon.addPoint(0, 0); this.dest = new Point2D.Double(center.getX(), center.getY()); final int xWing = 9; final int yAperture = 4; polygon.addPoint(-xWing, -yAperture); final int xContact = 5; polygon.addPoint(-xContact, 0); polygon.addPoint(-xWing, yAperture); polygon.addPoint(0, 0); polygon.rotate(this.angle); polygon = polygon.translate(center.getX(), center.getY()); } public void drawU(UGraphic ug) { ug.apply(new UChangeBackColor(ug.getParam().getColor())).apply(new UTranslate(-radius * Math.cos(angle), -radius * Math.sin(angle))).draw(polygon); ug.apply(new UStroke(1.5)).apply(new UChangeBackColor(HtmlColorUtils.WHITE)).apply(new UTranslate(dest.getX() - radius, dest.getY() - radius)).draw(new UEllipse(radius * 2, radius * 2)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/ExtremityTriangle.java000066400000000000000000000044041312650303100307410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; class ExtremityTriangle extends Extremity { private UPolygon polygon = new UPolygon(); private final boolean fill; private final Point2D contact; @Override public Point2D somePoint() { return contact; } public ExtremityTriangle(Point2D p1, double angle, boolean fill) { this.fill = fill; this.contact = new Point2D.Double(p1.getX(), p1.getY()); angle = manageround(angle); polygon.addPoint(0, 0); final int xWing = 8; final int yAperture = 3; polygon.addPoint(-xWing, -yAperture); polygon.addPoint(-xWing, yAperture); polygon.addPoint(0, 0); polygon.rotate(angle + Math.PI / 2); polygon = polygon.translate(p1.getX(), p1.getY()); } public void drawU(UGraphic ug) { if (fill) { ug = ug.apply(new UChangeBackColor(ug.getParam().getColor())); } ug.draw(polygon); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/MiddleCircle.java000066400000000000000000000037621312650303100276070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class MiddleCircle extends Extremity { private final double radius = 6; private final UEllipse circle = new UEllipse(2 * radius, 2 * radius); @Override public Point2D somePoint() { return null; } public void drawU(UGraphic ug) { ug.apply(new UChangeBackColor(HtmlColorUtils.WHITE)).apply(new UStroke(1.5)).apply(new UTranslate(-radius, -radius)).draw(circle); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/MiddleCircleCircled.java000066400000000000000000000060231312650303100310660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; class MiddleCircleCircled extends Extremity { private final double angle; private final MiddleCircleCircledMode mode; private final double radius1 = 6; private final UEllipse circle = new UEllipse(2 * radius1, 2 * radius1); private final double radius2 = 10; private final UEllipse bigcircle = new UEllipse(2 * radius2, 2 * radius2); public MiddleCircleCircled(double angle, MiddleCircleCircledMode mode) { this.angle = angle; this.mode = mode; } @Override public Point2D somePoint() { return null; } public void drawU(UGraphic ug) { ug = ug.apply(new UChangeBackColor(HtmlColorUtils.WHITE)); if (mode == MiddleCircleCircledMode.BOTH) { ug.apply(new UChangeColor(HtmlColorUtils.WHITE)).apply(new UTranslate(-radius2, -radius2)).draw(bigcircle); } ug = ug.apply(new UStroke(1.5)); final double d = 0; if (mode == MiddleCircleCircledMode.MODE1 || mode == MiddleCircleCircledMode.BOTH) { final UEllipse arc1 = new UEllipse(2 * radius2, 2 * radius2, angle, 90); ug.apply(new UTranslate(-radius2 + d, -radius2 + d)).draw(arc1); } if (mode == MiddleCircleCircledMode.MODE2 || mode == MiddleCircleCircledMode.BOTH) { final UEllipse arc2 = new UEllipse(2 * radius2, 2 * radius2, angle + 180, 90); ug.apply(new UTranslate(-radius2 + d, -radius2 + d)).draw(arc2); } ug.apply(new UTranslate(-radius1, -radius1)).draw(circle); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/MiddleCircleCircledMode.java000066400000000000000000000025231312650303100316740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; public enum MiddleCircleCircledMode { BOTH, MODE1, MODE2 } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/MiddleFactory.java000066400000000000000000000026371312650303100300150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import net.sourceforge.plantuml.graphic.UDrawable; public interface MiddleFactory { public UDrawable createUDrawable(double angle); } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/MiddleFactoryCircle.java000066400000000000000000000027331312650303100311340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import net.sourceforge.plantuml.graphic.UDrawable; public class MiddleFactoryCircle implements MiddleFactory { public UDrawable createUDrawable(double angle) { return new MiddleCircle(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/extremity/MiddleFactoryCircleCircled.java000066400000000000000000000031751312650303100324230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.extremity; import net.sourceforge.plantuml.graphic.UDrawable; public class MiddleFactoryCircleCircled implements MiddleFactory { private final MiddleCircleCircledMode mode; public MiddleFactoryCircleCircled(MiddleCircleCircledMode mode) { this.mode = mode; } public UDrawable createUDrawable(double angle) { return new MiddleCircleCircled(angle, mode); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/000077500000000000000000000000001312650303100234445ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/Circle.java000066400000000000000000000054211312650303100255120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Point2D; public class Circle { private Point2D center; private double radius; public Circle() { this(new Point2D.Double()); } public Circle(Point2D center) { this.center = center; this.radius = 0; } public Circle(Point2D p1, Point2D p2) { center = new Point2D.Double((p1.getX() + p2.getX()) / 2, (p1.getY() + p2.getY()) / 2); radius = p1.distance(center); } public static Circle getCircle(Point2D p1, Point2D p2, Point2D p3) { if (p3.getY() != p2.getY()) { return new Circle(p1, p2, p3); } return new Circle(p2, p1, p3); } private Circle(Point2D p1, Point2D p2, Point2D p3) { final double num1 = p3.getX() * p3.getX() * (p1.getY() - p2.getY()) + (p1.getX() * p1.getX() + (p1.getY() - p2.getY()) * (p1.getY() - p3.getY())) * (p2.getY() - p3.getY()) + p2.getX() * p2.getX() * (-p1.getY() + p3.getY()); final double den1 = 2 * (p3.getX() * (p1.getY() - p2.getY()) + p1.getX() * (p2.getY() - p3.getY()) + p2.getX() * (-p1.getY() + p3.getY())); final double x = num1 / den1; final double den2 = p3.getY() - p2.getY(); final double y = (p2.getY() + p3.getY()) / 2 - (p3.getX() - p2.getX()) / den2 * (x - (p2.getX() + p3.getX()) / 2); center = new Point2D.Double(x, y); radius = center.distance(p1); } public Point2D getCenter() { return center; } public double getRadius() { return radius; } public boolean isOutside(Point2D point) { final double d = center.distance(point); if (d > radius) { return true; } return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/ConnectedCircle.java000066400000000000000000000056131312650303100273400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class ConnectedCircle implements UDrawable { private final double radius; private final List angles = new ArrayList(); private final List points = new ArrayList(); public ConnectedCircle(double radius) { this.radius = radius; } public void drawU(UGraphic ug) { final UEllipse circle = new UEllipse(2 * radius, 2 * radius); // ug.draw(circle); for (Double angle : angles) { final double delta = 30; final UEllipse part = new UEllipse(2 * radius, 2 * radius, angle - delta, 2 * delta); ug.draw(part); } ug = ug.apply(new UChangeColor(HtmlColorUtils.GREEN)).apply(new UChangeBackColor(HtmlColorUtils.GREEN)); for (Point2D pt : points) { final UTranslate tr = new UTranslate(pt); // ug.apply(tr).draw(new UEllipse(2, 2)); } } public void addSecondaryConnection(Point2D pt) { points.add(pt); // double angle = Math.atan2(pt.getY() - radius, pt.getX() - radius); // double angle = Math.atan2(pt.getX() - radius, pt.getY() - radius); double angle = Math.atan2(radius - pt.getY(), pt.getX() - radius); angle = angle * 180.0 / Math.PI; System.err.println("pt1=" + pt + " " + angle); angles.add(angle); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/ContainingEllipse.java000066400000000000000000000046341312650303100277250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UEllipse; public class ContainingEllipse { private final SmallestEnclosingCircle sec = new SmallestEnclosingCircle(); private final YTransformer ytransformer; @Override public String toString() { return "ContainingEllipse " + getWidth() + " " + getHeight(); } public ContainingEllipse(double coefY) { ytransformer = new YTransformer(coefY); } public void append(Point2D pt) { pt = ytransformer.getReversePoint2D(pt); sec.append(pt); } public void append(double x, double y) { append(new Point2D.Double(x, y)); } public double getWidth() { return 2 * sec.getCircle().getRadius(); } public double getHeight() { return 2 * sec.getCircle().getRadius() * ytransformer.getAlpha(); } public Point2D getCenter() { return ytransformer.getPoint2D(sec.getCircle().getCenter()); } public UEllipse asUEllipse() { final UEllipse ellipse = new UEllipse(getWidth(), getHeight()); ellipse.setDeltaShadow(deltaShadow); return ellipse; } private double deltaShadow; public void setDeltaShadow(double deltaShadow) { this.deltaShadow = deltaShadow; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageActivity.java000066400000000000000000000124051312650303100302450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.Bibliotekon; import net.sourceforge.plantuml.svek.Shape; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageActivity extends AbstractEntityImage { public static final int CORNER = 25; final private TextBlock desc; final private static int MARGIN = 10; final private Url url; private final Bibliotekon bibliotekon; public EntityImageActivity(ILeaf entity, ISkinParam skinParam, Bibliotekon bibliotekon) { super(entity, skinParam); this.bibliotekon = bibliotekon; final Stereotype stereotype = entity.getStereotype(); this.desc = entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.ACTIVITY, stereotype), HorizontalAlignment.CENTER, skinParam); this.url = entity.getUrl99(); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dim = desc.calculateDimension(stringBounder); return Dimension2DDouble.delta(dim, MARGIN * 2); } final public void drawU(UGraphic ug) { if (url != null) { ug.startUrl(url); } if (getShapeType() == ShapeType.ROUND_RECTANGLE) { ug = drawNormal(ug); } else if (getShapeType() == ShapeType.OCTAGON) { ug = drawOctagon(ug); } else { throw new UnsupportedOperationException(); } if (url != null) { ug.closeAction(); } } private UGraphic drawOctagon(UGraphic ug) { final Shape shape = bibliotekon.getShape(getEntity()); final Shadowable octagon = shape.getOctagon(); if (getSkinParam().shadowing()) { octagon.setDeltaShadow(4); } ug = applyColors(ug); ug.apply(new UStroke(1.5)).draw(octagon); desc.drawU(ug.apply(new UTranslate(MARGIN, MARGIN))); return ug; } private UGraphic drawNormal(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimTotal = calculateDimension(stringBounder); final double widthTotal = dimTotal.getWidth(); final double heightTotal = dimTotal.getHeight(); final Shadowable rect = new URectangle(widthTotal, heightTotal, CORNER, CORNER); if (getSkinParam().shadowing()) { rect.setDeltaShadow(4); } ug = applyColors(ug); ug.apply(new UStroke(1.5)).draw(rect); desc.drawU(ug.apply(new UTranslate(MARGIN, MARGIN))); return ug; } private UGraphic applyColors(UGraphic ug) { ug = ug.apply(new UChangeColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.activityBorder, getStereo()))); HtmlColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK); if (backcolor == null) { backcolor = SkinParamUtils.getColor(getSkinParam(), ColorParam.activityBackground, getStereo()); } ug = ug.apply(new UChangeBackColor(backcolor)); return ug; } public ShapeType getShapeType() { final Stereotype stereotype = getStereo(); if (getSkinParam().useOctagonForActivity(stereotype)) { return ShapeType.OCTAGON; } return ShapeType.ROUND_RECTANGLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageArcCircle.java000066400000000000000000000100421312650303100302730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageArcCircle extends AbstractEntityImage { // private static final int SIZE = 16; private final TextBlock name; private final TextBlock stereo; public EntityImageArcCircle(ILeaf entity, ISkinParam skinParam) { super(entity, skinParam); final Stereotype stereotype = entity.getStereotype(); this.name = entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.COMPONENT, stereotype), HorizontalAlignment.CENTER, skinParam); if (stereotype == null || stereotype.getLabel(false) == null) { this.stereo = null; } else { this.stereo = Display.getWithNewlines(stereotype.getLabel(getSkinParam().useGuillemet())).create( new FontConfiguration(getSkinParam(), FontParam.COMPONENT_STEREOTYPE, stereotype), HorizontalAlignment.CENTER, skinParam); } } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimName = name.calculateDimension(stringBounder); final Dimension2D dimStereo = getStereoDimension(stringBounder); // final Dimension2D circle = new Dimension2DDouble(SIZE, SIZE); return Dimension2DDouble.mergeTB(dimStereo, dimName); } private Dimension2D getStereoDimension(StringBounder stringBounder) { if (stereo == null) { return new Dimension2DDouble(0, 0); } return stereo.calculateDimension(stringBounder); } final public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimStereo = getStereoDimension(stringBounder); final Dimension2D dimTotal = calculateDimension(stringBounder); final Dimension2D dimName = name.calculateDimension(stringBounder); final double nameX = (dimTotal.getWidth() - dimName.getWidth()) / 2; final double nameY = dimStereo.getHeight(); name.drawU(ug.apply(new UTranslate(nameX, nameY))); if (stereo != null) { final double stereoX = (dimTotal.getWidth() - dimStereo.getWidth()) / 2; stereo.drawU(ug.apply(new UTranslate(stereoX, 0))); } } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageAssociation.java000066400000000000000000000056271312650303100307350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UStroke; public class EntityImageAssociation extends AbstractEntityImage { final private static int SIZE = 12; public EntityImageAssociation(ILeaf entity, ISkinParam skinParam) { super(entity, skinParam); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(SIZE * 2, SIZE * 2); } final public void drawU(UGraphic ug) { final UPolygon diams = new UPolygon(); if (getSkinParam().shadowing()) { diams.setDeltaShadow(5); } diams.addPoint(SIZE, 0); diams.addPoint(SIZE * 2, SIZE); diams.addPoint(SIZE, SIZE * 2); diams.addPoint(0, SIZE); diams.addPoint(SIZE, 0); ug.apply(new UChangeColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.classBorder, getStereo()))) .apply(new UChangeBackColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.classBackground, getStereo()))).apply(new UStroke(1.5)).draw(diams); } public ShapeType getShapeType() { return ShapeType.DIAMOND; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageAssociationPoint.java000066400000000000000000000047731312650303100317500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UShape; public class EntityImageAssociationPoint extends AbstractEntityImage { private static final int SIZE = 4; public EntityImageAssociationPoint(ILeaf entity, ISkinParam skinParam) { super(entity, skinParam); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(SIZE, SIZE); } final public void drawU(UGraphic ug) { final UShape circle = new UEllipse(SIZE, SIZE); ug.apply(new UChangeColor(null)).apply(new UChangeBackColor(HtmlColorUtils.BLACK)).draw(circle); } public ShapeType getShapeType() { return ShapeType.CIRCLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageBranch.java000066400000000000000000000056231312650303100276520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UStroke; public class EntityImageBranch extends AbstractEntityImage { final private static int SIZE = 12; public EntityImageBranch(ILeaf entity, ISkinParam skinParam) { super(entity, skinParam); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(SIZE * 2, SIZE * 2); } final public void drawU(UGraphic ug) { final UPolygon diams = new UPolygon(); if (getSkinParam().shadowing()) { diams.setDeltaShadow(5); } diams.addPoint(SIZE, 0); diams.addPoint(SIZE * 2, SIZE); diams.addPoint(SIZE, SIZE * 2); diams.addPoint(0, SIZE); diams.addPoint(SIZE, 0); ug.apply(new UChangeColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.activityBorder, getStereo()))) .apply(new UChangeBackColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.activityBackground, getStereo()))).apply(new UStroke(1.5)).draw(diams); } public ShapeType getShapeType() { return ShapeType.DIAMOND; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageCircleEnd.java000066400000000000000000000060641312650303100303050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageCircleEnd extends AbstractEntityImage { private static final int SIZE = 20; private final ColorParam param; public EntityImageCircleEnd(ILeaf entity, ISkinParam skinParam, ColorParam param) { super(entity, skinParam); this.param = param; } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(SIZE, SIZE); } final public void drawU(UGraphic ug) { final UEllipse circle = new UEllipse(SIZE, SIZE); if (getSkinParam().shadowing()) { circle.setDeltaShadow(3); } ug.apply(new UChangeBackColor(null)) .apply(new UChangeColor(SkinParamUtils.getColor(getSkinParam(), param, getStereo()))) .draw(circle); final double delta = 4; final UShape circleSmall = new UEllipse(SIZE - delta * 2, SIZE - delta * 2); ug.apply(new UChangeBackColor(SkinParamUtils.getColor(getSkinParam(), param, getStereo()))) .apply(new UChangeColor(null)).apply(new UTranslate(delta + 0.5, delta + 0.5)).draw(circleSmall); } public ShapeType getShapeType() { return ShapeType.CIRCLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageCircleStart.java000066400000000000000000000053311312650303100306700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; public class EntityImageCircleStart extends AbstractEntityImage { private static final int SIZE = 20; private final ColorParam colorParam; // = ColorParam.activityStart; public EntityImageCircleStart(ILeaf entity, ISkinParam skinParam, ColorParam colorParam) { super(entity, skinParam); this.colorParam = colorParam; } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(SIZE, SIZE); } final public void drawU(UGraphic ug) { final UEllipse circle = new UEllipse(SIZE, SIZE); if (getSkinParam().shadowing()) { circle.setDeltaShadow(3); } ug.apply(new UChangeBackColor(SkinParamUtils.getColor(getSkinParam(), colorParam, getStereo()))) .apply(new UChangeColor(null)).draw(circle); } public ShapeType getShapeType() { return ShapeType.CIRCLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java000066400000000000000000000200511312650303100275120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineConfigurable; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.PortionShower; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizVersion; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.Margins; import net.sourceforge.plantuml.svek.Ports; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.svek.WithPorts; import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UComment; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageClass extends AbstractEntityImage implements Stencil, WithPorts { final private TextBlock body; final private Margins shield; final private EntityImageClassHeader2 header; final private Url url; final private double roundCorner; final private LineConfigurable lineConfig; public EntityImageClass(GraphvizVersion version, ILeaf entity, ISkinParam skinParam, PortionShower portionShower) { super(entity, entity.getColors(skinParam).mute(skinParam)); this.lineConfig = entity; this.roundCorner = getSkinParam().getRoundCorner("", null); this.shield = version != null && version.useShield() && entity.hasNearDecoration() ? Margins.uniform(16) : Margins.NONE; final boolean showMethods = portionShower.showPortion(EntityPortion.METHOD, entity); final boolean showFields = portionShower.showPortion(EntityPortion.FIELD, entity); this.body = entity.getBodier().getBody(FontParam.CLASS_ATTRIBUTE, getSkinParam(), showMethods, showFields, entity.getStereotype()); header = new EntityImageClassHeader2(entity, getSkinParam(), portionShower); this.url = entity.getUrl99(); } // private int marginEmptyFieldsOrMethod = 13; public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimHeader = header.calculateDimension(stringBounder); final Dimension2D dimBody = body == null ? new Dimension2DDouble(0, 0) : body.calculateDimension(stringBounder); double width = Math.max(dimBody.getWidth(), dimHeader.getWidth()); if (width < getSkinParam().minClassWidth()) { width = getSkinParam().minClassWidth(); } final double height = dimBody.getHeight() + dimHeader.getHeight(); return new Dimension2DDouble(width, height); } @Override public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { final Rectangle2D result = body.getInnerPosition(member, stringBounder, strategy); if (result == null) { return result; } final Dimension2D dimHeader = header.calculateDimension(stringBounder); final UTranslate translate = new UTranslate(0, dimHeader.getHeight()); return translate.apply(result); } final public void drawU(UGraphic ug) { ug.draw(new UComment("class " + getEntity().getCode().getFullName())); if (url != null) { ug.startUrl(url); } drawInternal(ug); if (url != null) { ug.closeAction(); } } private void drawInternal(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimTotal = calculateDimension(stringBounder); final Dimension2D dimHeader = header.calculateDimension(stringBounder); final double widthTotal = dimTotal.getWidth(); final double heightTotal = dimTotal.getHeight(); final Shadowable rect = new URectangle(widthTotal, heightTotal, roundCorner, roundCorner, getEntity().getCode().getFullName()); if (getSkinParam().shadowing()) { rect.setDeltaShadow(4); } HtmlColor classBorder = lineConfig.getColors(getSkinParam()).getColor(ColorType.LINE); if (classBorder == null) { classBorder = SkinParamUtils.getColor(getSkinParam(), ColorParam.classBorder, getStereo()); } ug = ug.apply(new UChangeColor(classBorder)); HtmlColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK); if (backcolor == null) { backcolor = SkinParamUtils.getColor(getSkinParam(), ColorParam.classBackground, getStereo()); } ug = ug.apply(new UChangeBackColor(backcolor)); final UStroke stroke = getStroke(); ug.apply(stroke).draw(rect); HtmlColor headerBackcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.HEADER); if (headerBackcolor == null) { headerBackcolor = getSkinParam().getHtmlColor(ColorParam.classHeaderBackground, getStereo(), false); } if (headerBackcolor != null) { final Shadowable rect2 = new URectangle(widthTotal, dimHeader.getHeight()); ug.apply(new UChangeBackColor(headerBackcolor)).apply(stroke).draw(rect2); } header.drawU(ug, dimTotal.getWidth(), dimHeader.getHeight()); if (body != null) { final UGraphic ug2 = UGraphicStencil.create(ug, this, stroke); final UTranslate translate = new UTranslate(0, dimHeader.getHeight()); body.drawU(ug2.apply(translate)); } } public Ports getPorts(StringBounder stringBounder) { final Dimension2D dimHeader = header.calculateDimension(stringBounder); return ((WithPorts) body).getPorts(stringBounder).translateY(dimHeader.getHeight()); } private UStroke getStroke() { UStroke stroke = lineConfig.getColors(getSkinParam()).getSpecificLineStroke(); if (stroke == null) { stroke = getSkinParam().getThickness(LineParam.classBorder, getStereo()); } if (stroke == null) { stroke = new UStroke(1.5); } return stroke; } public ShapeType getShapeType() { if (((ILeaf) getEntity()).getPortShortNames().size() > 0) { return ShapeType.RECTANGLE_HTML_FOR_PORTS; } return ShapeType.RECTANGLE; } @Override public Margins getShield(StringBounder stringBounder) { return shield; } public double getStartingX(StringBounder stringBounder, double y) { return 0; } public double getEndingX(StringBounder stringBounder, double y) { return calculateDimension(stringBounder).getWidth(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageClassHeader2.java000066400000000000000000000215551312650303100307170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.PortionShower; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.CircledCharacter; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockGeneric; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.VerticalAlignment; import net.sourceforge.plantuml.skin.VisibilityModifier; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.HeaderLayout; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; public class EntityImageClassHeader2 extends AbstractEntityImage { final private HeaderLayout headerLayout; public EntityImageClassHeader2(ILeaf entity, ISkinParam skinParam, PortionShower portionShower) { super(entity, skinParam); final boolean italic = entity.getLeafType() == LeafType.ABSTRACT_CLASS || entity.getLeafType() == LeafType.INTERFACE; // final HtmlColor color = SkinParamUtils.getFontColor(getSkinParam(), FontParam.CLASS, getStereo()); final Stereotype stereotype = entity.getStereotype(); final String generic = entity.getGeneric(); FontConfiguration fontConfigurationName = new FontConfiguration(getSkinParam(), FontParam.CLASS, stereotype); if (italic) { fontConfigurationName = fontConfigurationName.italic(); } TextBlock name = entity.getDisplay().createWithNiceCreoleMode(fontConfigurationName, HorizontalAlignment.CENTER, skinParam); final VisibilityModifier modifier = entity.getVisibilityModifier(); if (modifier == null) { name = TextBlockUtils.withMargin(name, 3, 3, 0, 0); } else { final Rose rose = new Rose(); final HtmlColor back = rose.getHtmlColor(skinParam, modifier.getBackground()); final HtmlColor fore = rose.getHtmlColor(skinParam, modifier.getForeground()); final TextBlock uBlock = modifier.getUBlock(skinParam.classAttributeIconSize(), fore, back, false); name = TextBlockUtils.mergeLR(uBlock, name, VerticalAlignment.CENTER); name = TextBlockUtils.withMargin(name, 3, 3, 0, 0); } final TextBlock stereo; if (stereotype == null || stereotype.getLabel(false) == null || portionShower.showPortion(EntityPortion.STEREOTYPE, entity) == false) { stereo = null; } else { stereo = TextBlockUtils.withMargin( Display.create(stereotype.getLabels(skinParam.useGuillemet())).create( new FontConfiguration(getSkinParam(), FontParam.CLASS_STEREOTYPE, stereotype), HorizontalAlignment.CENTER, skinParam), 1, 0); } TextBlock genericBlock; if (generic == null) { genericBlock = null; } else { genericBlock = Display.getWithNewlines(generic).create( new FontConfiguration(getSkinParam(), FontParam.CLASS_STEREOTYPE, stereotype), HorizontalAlignment.CENTER, skinParam); genericBlock = TextBlockUtils.withMargin(genericBlock, 1, 1); final HtmlColor classBackground = SkinParamUtils .getColor(getSkinParam(), ColorParam.background, stereotype); // final HtmlColor classBorder = getColor(ColorParam.classBorder, stereotype); final HtmlColor classBorder = SkinParamUtils.getFontColor(getSkinParam(), FontParam.CLASS_STEREOTYPE, stereotype); genericBlock = new TextBlockGeneric(genericBlock, classBackground, classBorder); genericBlock = TextBlockUtils.withMargin(genericBlock, 1, 1); } final TextBlock circledCharacter; if (portionShower.showPortion(EntityPortion.CIRCLED_CHARACTER, (ILeaf) getEntity())) { circledCharacter = TextBlockUtils.withMargin(getCircledCharacter(entity, skinParam), 4, 0, 5, 5); } else { circledCharacter = null; } this.headerLayout = new HeaderLayout(circledCharacter, stereo, name, genericBlock); } private TextBlock getCircledCharacter(ILeaf entity, ISkinParam skinParam) { final Stereotype stereotype = entity.getStereotype(); if (stereotype != null && stereotype.getSprite() != null) { return skinParam.getSprite(stereotype.getSprite()).asTextBlock(stereotype.getHtmlColor(), 1); } final UFont font = SkinParamUtils.getFont(getSkinParam(), FontParam.CIRCLED_CHARACTER, null); final HtmlColor classBorder = SkinParamUtils.getColor(getSkinParam(), ColorParam.classBorder, stereotype); if (stereotype != null && stereotype.getCharacter() != 0) { return new CircledCharacter(stereotype.getCharacter(), getSkinParam().getCircledCharacterRadius(), font, stereotype.getHtmlColor(), classBorder, SkinParamUtils.getFontColor(getSkinParam(), FontParam.CIRCLED_CHARACTER, null)); } if (entity.getLeafType() == LeafType.ANNOTATION) { return new CircledCharacter('@', getSkinParam().getCircledCharacterRadius(), font, SkinParamUtils.getColor( getSkinParam(), ColorParam.stereotypeNBackground, stereotype), classBorder, SkinParamUtils.getFontColor(getSkinParam(), FontParam.CIRCLED_CHARACTER, null)); } if (entity.getLeafType() == LeafType.ABSTRACT_CLASS) { return new CircledCharacter('A', getSkinParam().getCircledCharacterRadius(), font, SkinParamUtils.getColor( getSkinParam(), ColorParam.stereotypeABackground, stereotype), classBorder, SkinParamUtils.getFontColor(getSkinParam(), FontParam.CIRCLED_CHARACTER, null)); } if (entity.getLeafType() == LeafType.CLASS) { return new CircledCharacter('C', getSkinParam().getCircledCharacterRadius(), font, SkinParamUtils.getColor( getSkinParam(), ColorParam.stereotypeCBackground, stereotype), classBorder, SkinParamUtils.getFontColor(getSkinParam(), FontParam.CIRCLED_CHARACTER, null)); } if (entity.getLeafType() == LeafType.INTERFACE) { return new CircledCharacter('I', getSkinParam().getCircledCharacterRadius(), font, SkinParamUtils.getColor( getSkinParam(), ColorParam.stereotypeIBackground, stereotype), classBorder, SkinParamUtils.getFontColor(getSkinParam(), FontParam.CIRCLED_CHARACTER, null)); } if (entity.getLeafType() == LeafType.ENUM) { return new CircledCharacter('E', getSkinParam().getCircledCharacterRadius(), font, SkinParamUtils.getColor( getSkinParam(), ColorParam.stereotypeEBackground, stereotype), classBorder, SkinParamUtils.getFontColor(getSkinParam(), FontParam.CIRCLED_CHARACTER, null)); } if (entity.getLeafType() == LeafType.ENTITY) { return new CircledCharacter('E', getSkinParam().getCircledCharacterRadius(), font, SkinParamUtils.getColor( getSkinParam(), ColorParam.stereotypeCBackground, stereotype), classBorder, SkinParamUtils.getFontColor(getSkinParam(), FontParam.CIRCLED_CHARACTER, null)); } assert false; return null; } public Dimension2D calculateDimension(StringBounder stringBounder) { return headerLayout.getDimension(stringBounder); } final public void drawU(UGraphic ug) { throw new UnsupportedOperationException(); } public void drawU(UGraphic ug, double width, double height) { headerLayout.drawU(ug, width, height); } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageDescription.java000066400000000000000000000203231312650303100307320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * Modified by : Arno Peterson * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import java.util.Collection; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cucadiagram.BodyEnhanced; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.PortionShower; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.USymbolFolder; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.Margins; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UComment; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.utils.MathUtils; public class EntityImageDescription extends AbstractEntityImage { private final ShapeType shapeType; final private Url url; private final TextBlock asSmall; private final TextBlock name; private final TextBlock desc; private TextBlock stereo; private final boolean hideText; private final Collection links; private final boolean useRankSame; public EntityImageDescription(ILeaf entity, ISkinParam skinParam, PortionShower portionShower, Collection links) { super(entity, entity.getColors(skinParam).mute(skinParam)); this.useRankSame = skinParam.useRankSame(); this.links = links; final Stereotype stereotype = entity.getStereotype(); USymbol symbol = getUSymbol(entity); this.shapeType = symbol == USymbol.FOLDER ? ShapeType.FOLDER : ShapeType.RECTANGLE; this.hideText = symbol == USymbol.INTERFACE; final Display codeDisplay = Display.getWithNewlines(entity.getCode()); desc = (entity.getDisplay().equals(codeDisplay) && symbol instanceof USymbolFolder) || entity.getDisplay().isWhite() ? TextBlockUtils.empty(0, 0) : new BodyEnhanced(entity.getDisplay(), symbol.getFontParam(), getSkinParam(), HorizontalAlignment.LEFT, stereotype, symbol.manageHorizontalLine(), false, entity); this.url = entity.getUrl99(); HtmlColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK); if (backcolor == null) { backcolor = SkinParamUtils.getColor(getSkinParam(), symbol.getColorParamBack(), getStereo()); } assert getStereo() == stereotype; final HtmlColor forecolor = SkinParamUtils.getColor(getSkinParam(), symbol.getColorParamBorder(), stereotype); final double roundCorner = symbol.getSkinParameter().getRoundCorner(getSkinParam(), stereotype); final UStroke stroke = symbol.getSkinParameter().getStroke(getSkinParam(), stereotype); final SymbolContext ctx = new SymbolContext(backcolor, forecolor).withStroke(stroke) .withShadow(getSkinParam().shadowing2(symbol.getSkinParameter())).withRoundCorner(roundCorner); stereo = TextBlockUtils.empty(0, 0); if (stereotype != null && stereotype.getSprite() != null && getSkinParam().getSprite(stereotype.getSprite()) != null) { symbol = symbol.withStereoAlignment(HorizontalAlignment.RIGHT); stereo = getSkinParam().getSprite(stereotype.getSprite()).asTextBlock(stereotype.getHtmlColor(), 1); } else if (stereotype != null && stereotype.getLabel(false) != null && portionShower.showPortion(EntityPortion.STEREOTYPE, entity)) { stereo = Display.getWithNewlines(stereotype.getLabel(getSkinParam().useGuillemet())).create( new FontConfiguration(getSkinParam(), symbol.getFontParamStereotype(), stereotype), HorizontalAlignment.CENTER, getSkinParam()); } name = new BodyEnhanced(codeDisplay, symbol.getFontParam(), getSkinParam(), HorizontalAlignment.CENTER, stereotype, symbol.manageHorizontalLine(), false, entity); if (hideText) { asSmall = symbol.asSmall(TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0), TextBlockUtils.empty(0, 0), ctx); } else { asSmall = symbol.asSmall(name, desc, stereo, ctx); } } private USymbol getUSymbol(ILeaf entity) { final USymbol result = entity.getUSymbol() == null ? (getSkinParam().useUml2ForComponent() ? USymbol.COMPONENT2 : USymbol.COMPONENT1) : entity.getUSymbol(); if (result == null) { throw new IllegalArgumentException(); } return result; } public Dimension2D getNameDimension(StringBounder stringBounder) { if (hideText) { return new Dimension2DDouble(0, 0); } return name.calculateDimension(stringBounder); } public Dimension2D calculateDimension(StringBounder stringBounder) { return asSmall.calculateDimension(stringBounder); } @Override public Margins getShield(StringBounder stringBounder) { if (hideText && (useRankSame == false || hasSomeHorizontalLink((ILeaf) getEntity(), links) == false)) { final Dimension2D dimStereo = stereo.calculateDimension(stringBounder); final Dimension2D dimDesc = desc.calculateDimension(stringBounder); final Dimension2D dimSmall = asSmall.calculateDimension(stringBounder); final double x = Math.max(dimStereo.getWidth(), dimDesc.getWidth()); double suppX = x - dimSmall.getWidth(); if (suppX < 1) { suppX = 1; } final double y = MathUtils.max(1, dimDesc.getHeight(), dimStereo.getHeight()); return new Margins(suppX / 2, suppX / 2, y, y); } return Margins.NONE; } private boolean hasSomeHorizontalLink(ILeaf leaf, Collection links) { for (Link link : links) { if (link.getLength() == 1 && link.contains(leaf)) { return true; } } return false; } final public void drawU(UGraphic ug) { ug.draw(new UComment("entity " + getEntity().getCode().getFullName())); if (url != null) { ug.startUrl(url); } asSmall.drawU(ug); if (hideText) { final double space = 8; final Dimension2D dimSmall = asSmall.calculateDimension(ug.getStringBounder()); final Dimension2D dimDesc = desc.calculateDimension(ug.getStringBounder()); desc.drawU(ug.apply(new UTranslate((dimSmall.getWidth() - dimDesc.getWidth()) / 2, space + dimSmall.getHeight()))); final Dimension2D dimStereo = stereo.calculateDimension(ug.getStringBounder()); stereo.drawU(ug.apply(new UTranslate((dimSmall.getWidth() - dimStereo.getWidth()) / 2, -space - dimStereo.getHeight()))); } if (url != null) { ug.closeAction(); } } public ShapeType getShapeType() { return shapeType; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java000066400000000000000000000123641312650303100310270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.PortionShower; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.Cluster; import net.sourceforge.plantuml.svek.ClusterDecoration; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; public class EntityImageEmptyPackage extends AbstractEntityImage { private final TextBlock desc; private final static int MARGIN = 10; private final HtmlColor specificBackColor; private final ISkinParam skinParam; private final Stereotype stereotype; private final TextBlock stereoBlock; private final Url url; public EntityImageEmptyPackage(ILeaf entity, ISkinParam skinParam, PortionShower portionShower) { super(entity, skinParam); this.skinParam = skinParam; this.specificBackColor = entity.getColors(skinParam).getColor(ColorType.BACK); this.stereotype = entity.getStereotype(); this.desc = entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.PACKAGE, stereotype), HorizontalAlignment.CENTER, skinParam); this.url = entity.getUrl99(); if (stereotype == null || stereotype.getLabel(false) == null || portionShower.showPortion(EntityPortion.STEREOTYPE, entity) == false) { stereoBlock = TextBlockUtils.empty(0, 0); } else { stereoBlock = TextBlockUtils.withMargin( Display.create(stereotype.getLabels(skinParam.useGuillemet())).create( new FontConfiguration(getSkinParam(), FontParam.PACKAGE_STEREOTYPE, stereotype), HorizontalAlignment.CENTER, skinParam), 1, 0); } } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimDesc = desc.calculateDimension(stringBounder); Dimension2D dim = TextBlockUtils.mergeTB(desc, stereoBlock, HorizontalAlignment.LEFT).calculateDimension( stringBounder); dim = Dimension2DDouble.atLeast(dim, 0, 2 * dimDesc.getHeight()); return Dimension2DDouble.delta(dim, MARGIN * 2, MARGIN * 2); } private UStroke getStroke() { UStroke stroke = getSkinParam().getThickness(LineParam.packageBorder, getStereo()); if (stroke == null) { stroke = new UStroke(2.0); } return stroke; } final public void drawU(UGraphic ug) { if (url != null) { ug.startUrl(url); } final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimTotal = calculateDimension(stringBounder); final double widthTotal = dimTotal.getWidth(); final double heightTotal = dimTotal.getHeight(); final HtmlColor back = Cluster.getBackColor(specificBackColor, skinParam, stereotype); final double roundCorner = 0; final ClusterDecoration decoration = new ClusterDecoration(getSkinParam().getPackageStyle(), null, desc, stereoBlock, 0, 0, widthTotal, heightTotal, getStroke()); decoration.drawU(ug, back, SkinParamUtils.getColor(getSkinParam(), ColorParam.packageBorder, getStereo()), getSkinParam().shadowing(), roundCorner); if (url != null) { ug.closeAction(); } } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageGroup.java000066400000000000000000000044501312650303100275460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UGraphic; public class EntityImageGroup extends AbstractEntityImage { // final private TextBlock desc; // final private static int MARGIN = 10; public EntityImageGroup(ILeaf entity, ISkinParam skinParam) { super(entity, skinParam); // this.desc = Display.create(StringUtils.getWithNewlines(entity.getDisplay()), new FontConfiguration( // getFont(FontParam.ACTIVITY), HtmlColorUtils.BLACK), HorizontalAlignment.CENTER); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(30, 30); } final public void drawU(UGraphic ug) { } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterface.java000066400000000000000000000074751312650303100320770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageLollipopInterface extends AbstractEntityImage { private static final int SIZE = 10; private final TextBlock desc; final private Url url; public EntityImageLollipopInterface(ILeaf entity, ISkinParam skinParam) { super(entity, skinParam); final Stereotype stereotype = entity.getStereotype(); this.desc = entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.CLASS, stereotype), HorizontalAlignment.CENTER, skinParam); this.url = entity.getUrl99(); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(SIZE, SIZE); } final public void drawU(UGraphic ug) { final UEllipse circle = new UEllipse(SIZE, SIZE); if (getSkinParam().shadowing()) { circle.setDeltaShadow(4); } ug = ug.apply( new UChangeBackColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.classBackground, getStereo()))) .apply(new UChangeColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.classBorder, getStereo()))); if (url != null) { ug.startUrl(url); } ug.apply(new UStroke(1.5)).draw(circle); final Dimension2D dimDesc = desc.calculateDimension(ug.getStringBounder()); final double widthDesc = dimDesc.getWidth(); // final double totalWidth = Math.max(widthDesc, SIZE); final double x = SIZE / 2 - widthDesc / 2; final double y = SIZE; desc.drawU(ug.apply(new UTranslate(x, y))); if (url != null) { ug.closeAction(); } } public ShapeType getShapeType() { return ShapeType.CIRCLE_IN_RECT; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye1.java000066400000000000000000000114061312650303100326100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.List; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.Bibliotekon; import net.sourceforge.plantuml.svek.Line; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageLollipopInterfaceEye1 extends AbstractEntityImage { private static final int SIZE = 24; private final TextBlock desc; private final Bibliotekon bibliotekon; final private Url url; public EntityImageLollipopInterfaceEye1(ILeaf entity, ISkinParam skinParam, Bibliotekon bibliotekon) { super(entity, skinParam); this.bibliotekon = bibliotekon; final Stereotype stereotype = entity.getStereotype(); this.desc = entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.CLASS, stereotype), HorizontalAlignment.CENTER, skinParam); this.url = entity.getUrl99(); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(SIZE, SIZE); } final public void drawU(UGraphic ug) { ug = ug.apply(new UChangeColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.classBorder, getStereo()))); ug = ug.apply(new UChangeBackColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.classBackground, getStereo()))); if (url != null) { ug.startUrl(url); } final double sizeSmall = 14; final double diff = (SIZE - sizeSmall) / 2; final UEllipse circle1 = new UEllipse(sizeSmall, sizeSmall); if (getSkinParam().shadowing()) { // circle.setDeltaShadow(4); } ug.apply(new UStroke(1.5)).apply(new UTranslate(diff, diff)).draw(circle1); ug = ug.apply(new UChangeBackColor(null)); Point2D pos = bibliotekon.getShape(getEntity()).getPosition(); final List lines = bibliotekon.getAllLineConnectedTo(getEntity()); final UTranslate reverse = new UTranslate(pos).reverse(); final ConnectedCircle connectedCircle = new ConnectedCircle(SIZE / 2); for (Line line : lines) { Point2D pt = line.getMyPoint(getEntity()); pt = reverse.getTranslated(pt); connectedCircle.addSecondaryConnection(pt); } // connectedCircle.drawU(ug.apply(new UStroke(1.5))); connectedCircle.drawU(ug); // // final Dimension2D dimDesc = desc.calculateDimension(ug.getStringBounder()); // final double widthDesc = dimDesc.getWidth(); // // final double totalWidth = Math.max(widthDesc, SIZE); // // final double x = SIZE / 2 - widthDesc / 2; // final double y = SIZE; // desc.drawU(ug.apply(new UTranslate(x, y))); if (url != null) { ug.closeAction(); } } public ShapeType getShapeType() { return ShapeType.CIRCLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye2.java000066400000000000000000000123661312650303100326170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cucadiagram.BodyEnhanced; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.PortionShower; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageLollipopInterfaceEye2 extends AbstractEntityImage { public static final double SIZE = 14; private final TextBlock desc; private final TextBlock stereo; private final SymbolContext ctx; final private Url url; public EntityImageLollipopInterfaceEye2(ILeaf entity, ISkinParam skinParam, PortionShower portionShower) { super(entity, skinParam); final Stereotype stereotype = entity.getStereotype(); final USymbol symbol = entity.getUSymbol() == null ? (skinParam.useUml2ForComponent() ? USymbol.COMPONENT2 : USymbol.COMPONENT1) : entity.getUSymbol(); if (symbol == null) { throw new IllegalArgumentException(); } this.desc = new BodyEnhanced(entity.getDisplay(), symbol.getFontParam(), skinParam, HorizontalAlignment.CENTER, stereotype, symbol.manageHorizontalLine(), false, entity); this.url = entity.getUrl99(); HtmlColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK); if (backcolor == null) { backcolor = SkinParamUtils.getColor(getSkinParam(), symbol.getColorParamBack(), getStereo()); } // backcolor = HtmlColorUtils.BLUE; final HtmlColor forecolor = SkinParamUtils.getColor(getSkinParam(), symbol.getColorParamBorder(), getStereo()); this.ctx = new SymbolContext(backcolor, forecolor).withStroke(new UStroke(1.5)).withShadow( getSkinParam().shadowing()); if (stereotype != null && stereotype.getLabel(false) != null && portionShower.showPortion(EntityPortion.STEREOTYPE, entity)) { stereo = Display.getWithNewlines(stereotype.getLabel(getSkinParam().useGuillemet())).create( new FontConfiguration(getSkinParam(), symbol.getFontParamStereotype(), stereotype), HorizontalAlignment.CENTER, skinParam); } else { stereo = TextBlockUtils.empty(0, 0); } } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(SIZE, SIZE); } final public void drawU(UGraphic ug) { if (url != null) { ug.startUrl(url); } final UEllipse circle = new UEllipse(SIZE, SIZE); if (getSkinParam().shadowing()) { circle.setDeltaShadow(4); } ctx.apply(ug).draw(circle); final Dimension2D dimDesc = desc.calculateDimension(ug.getStringBounder()); final double x1 = SIZE / 2 - dimDesc.getWidth() / 2; final double y1 = SIZE * 1.4; desc.drawU(ug.apply(new UTranslate(x1, y1))); final Dimension2D dimStereo = stereo.calculateDimension(ug.getStringBounder()); final double x2 = SIZE / 2 - dimStereo.getWidth() / 2; final double y2 = -dimStereo.getHeight(); stereo.drawU(ug.apply(new UTranslate(x2, y2))); if (url != null) { ug.closeAction(); } } public ShapeType getShapeType() { return ShapeType.CIRCLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageNote.java000066400000000000000000000261531312650303100273630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.SkinParamBackcolored; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.cucadiagram.BodyEnhanced2; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graph2.GeomUtils; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockEmpty; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.Line; import net.sourceforge.plantuml.svek.Shape; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageNote extends AbstractEntityImage implements Stencil { private final int cornersize = 10; private final HtmlColor noteBackgroundColor; private final HtmlColor borderColor; private final int marginX1 = 6; private final int marginX2 = 15; private final int marginY = 5; private final boolean withShadow; private final ISkinParam skinParam; private final TextBlock textBlock; public EntityImageNote(ILeaf entity, ISkinParam skinParam) { super(entity, getSkin(getISkinParam(skinParam, entity), entity)); this.skinParam = getISkinParam(skinParam, entity); this.withShadow = getSkinParam().shadowing(); final Display strings = entity.getDisplay(); final Rose rose = new Rose(); if (entity.getColors(getSkinParam()).getColor(ColorType.BACK) == null) { noteBackgroundColor = rose.getHtmlColor(getSkinParam(), ColorParam.noteBackground); } else { noteBackgroundColor = entity.getColors(getSkinParam()).getColor(ColorType.BACK); } // this.borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder); this.borderColor = SkinParamUtils.getColor(getSkinParam(), ColorParam.noteBorder, null); // final HtmlColor fontColor = rose.getFontColor(getSkinParam(), FontParam.NOTE); // final UFont fontNote = getSkinParam().getFont(FontParam.NOTE, null, false); if (strings.size() == 1 && strings.get(0).length() == 0) { textBlock = new TextBlockEmpty(); } else { textBlock = new BodyEnhanced2(strings, FontParam.NOTE, getSkinParam(), HorizontalAlignment.LEFT, new FontConfiguration(getSkinParam(), FontParam.NOTE, null)); } } private static ISkinParam getISkinParam(ISkinParam skinParam, IEntity entity) { if (entity.getColors(skinParam) != null) { return entity.getColors(skinParam).mute(skinParam); } return skinParam; } static ISkinParam getSkin(ISkinParam skinParam, IEntity entity) { final Stereotype stereotype = entity.getStereotype(); HtmlColor back = entity.getColors(skinParam).getColor(ColorType.BACK); if (back != null) { return new SkinParamBackcolored(skinParam, back); } back = getColorStatic(skinParam, ColorParam.noteBackground, stereotype); if (back != null) { return new SkinParamBackcolored(skinParam, back); } return skinParam; } private static HtmlColor getColorStatic(ISkinParam skinParam, ColorParam colorParam, Stereotype stereo) { final Rose rose = new Rose(); return rose.getHtmlColor(skinParam, colorParam, stereo); } final public double getPreferredWidth(StringBounder stringBounder) { final double result = getTextWidth(stringBounder); return result; } final public double getPreferredHeight(StringBounder stringBounder) { return getTextHeight(stringBounder); } private Dimension2D getSize(StringBounder stringBounder, final TextBlock textBlock) { return textBlock.calculateDimension(stringBounder); } final protected double getTextHeight(StringBounder stringBounder) { final TextBlock textBlock = getTextBlock(); final Dimension2D size = getSize(stringBounder, textBlock); return size.getHeight() + 2 * marginY; } final protected TextBlock getTextBlock() { return textBlock; } final protected double getPureTextWidth(StringBounder stringBounder) { final TextBlock textBlock = getTextBlock(); final Dimension2D size = getSize(stringBounder, textBlock); return size.getWidth(); } final public double getTextWidth(StringBounder stringBounder) { return getPureTextWidth(stringBounder) + marginX1 + marginX2; } public Dimension2D calculateDimension(StringBounder stringBounder) { final double height = getPreferredHeight(stringBounder); final double width = getPreferredWidth(stringBounder); return new Dimension2DDouble(width, height); } final public void drawU(UGraphic ug) { final Url url = getEntity().getUrl99(); if (url != null) { ug.startUrl(url); } final UGraphic ug2 = UGraphicStencil.create(ug, this, new UStroke()); if (opaleLine == null || opaleLine.isOpale() == false) { drawNormal(ug2); } else { final StringBounder stringBounder = ug.getStringBounder(); DotPath path = opaleLine.getDotPath(); path.moveSvek(-shape.getMinX(), -shape.getMinY()); Point2D p1 = path.getStartPoint(); Point2D p2 = path.getEndPoint(); final double textWidth = getTextWidth(stringBounder); final double textHeight = getTextHeight(stringBounder); final Point2D center = new Point2D.Double(textWidth / 2, textHeight / 2); if (p1.distance(center) > p2.distance(center)) { path = path.reverse(); p1 = path.getStartPoint(); // p2 = path.getEndPoint(); } final Direction strategy = getOpaleStrategy(textWidth, textHeight, p1); final Point2D pp1 = path.getStartPoint(); final Point2D pp2 = path.getEndPoint(); final Point2D newRefpp2 = move(pp2, shape.getMinX(), shape.getMinY()); final Point2D projection = move(other.projection(newRefpp2, stringBounder), -shape.getMinX(), -shape.getMinY()); final Opale opale = new Opale(borderColor, noteBackgroundColor, textBlock, skinParam.shadowing(), true); opale.setOpale(strategy, pp1, projection); final UGraphic stroked = applyStroke(ug2); opale.drawU(Colors.applyStroke(stroked, getEntity().getColors(skinParam))); } if (url != null) { ug.closeAction(); } } private static Point2D move(Point2D pt, double dx, double dy) { return new Point2D.Double(pt.getX() + dx, pt.getY() + dy); } private void drawNormal(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final UPolygon polygon = getPolygonNormal(stringBounder); if (withShadow) { polygon.setDeltaShadow(4); } ug = ug.apply(new UChangeBackColor(noteBackgroundColor)).apply(new UChangeColor(borderColor)); final UGraphic stroked = applyStroke(ug); stroked.draw(polygon); stroked.apply(new UTranslate(getTextWidth(stringBounder) - cornersize, 0)).draw(new ULine(0, cornersize)); stroked.apply(new UTranslate(getTextWidth(stringBounder), cornersize)).draw(new ULine(-cornersize, 0)); getTextBlock().drawU(ug.apply(new UTranslate(marginX1, marginY))); } private UGraphic applyStroke(UGraphic ug) { final UStroke stroke = skinParam.getThickness(LineParam.noteBorder, null); if (stroke == null) { return ug; } return ug.apply(stroke); } private UPolygon getPolygonNormal(final StringBounder stringBounder) { final UPolygon polygon = new UPolygon(); polygon.addPoint(0, 0); polygon.addPoint(0, getTextHeight(stringBounder)); polygon.addPoint(getTextWidth(stringBounder), getTextHeight(stringBounder)); polygon.addPoint(getTextWidth(stringBounder), cornersize); polygon.addPoint(getTextWidth(stringBounder) - cornersize, 0); polygon.addPoint(0, 0); return polygon; } private Direction getOpaleStrategy(double width, double height, Point2D pt) { final double d1 = GeomUtils.getOrthoDistance(new Line2D.Double(width, 0, width, height), pt); final double d2 = GeomUtils.getOrthoDistance(new Line2D.Double(0, height, width, height), pt); final double d3 = GeomUtils.getOrthoDistance(new Line2D.Double(0, 0, 0, height), pt); final double d4 = GeomUtils.getOrthoDistance(new Line2D.Double(0, 0, width, 0), pt); if (d3 <= d1 && d3 <= d2 && d3 <= d4) { return Direction.LEFT; } if (d1 <= d2 && d1 <= d3 && d1 <= d4) { return Direction.RIGHT; } if (d4 <= d1 && d4 <= d2 && d4 <= d3) { return Direction.UP; } if (d2 <= d1 && d2 <= d3 && d2 <= d4) { return Direction.DOWN; } return null; } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } private Line opaleLine; private Shape shape; private Shape other; public void setOpaleLine(Line line, Shape shape, Shape other) { if (other == null) { throw new IllegalArgumentException(); } this.opaleLine = line; this.shape = shape; this.other = other; } public double getStartingX(StringBounder stringBounder, double y) { return 0; } public double getEndingX(StringBounder stringBounder, double y) { return calculateDimension(stringBounder).getWidth(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageNoteLink.java000066400000000000000000000060411312650303100301730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.skin.Area; import net.sourceforge.plantuml.skin.Component; import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.skin.SimpleContext2D; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.svek.IEntityImage; import net.sourceforge.plantuml.svek.Margins; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UGraphic; public class EntityImageNoteLink extends AbstractTextBlock implements IEntityImage { private final Component comp; public EntityImageNoteLink(Display note, Colors colors, ISkinParam skinParam) { final Rose skin = new Rose(); comp = skin.createComponent(ComponentType.NOTE, null, colors.mute(skinParam), note); } public Dimension2D calculateDimension(StringBounder stringBounder) { final double height = comp.getPreferredHeight(stringBounder); final double width = comp.getPreferredWidth(stringBounder); return new Dimension2DDouble(width, height); } public void drawU(UGraphic ug) { comp.drawU(ug, new Area(calculateDimension(ug.getStringBounder())), new SimpleContext2D(false)); } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } public HtmlColor getBackcolor() { return null; } public Margins getShield(StringBounder stringBounder) { return Margins.NONE; } public boolean isHidden() { return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java000066400000000000000000000176651312650303100276740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineConfigurable; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.PortionShower; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockEmpty; import net.sourceforge.plantuml.graphic.TextBlockLineBefore; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.PlacementStrategyY1Y2; import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.ULayoutGroup; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageObject extends AbstractEntityImage implements Stencil { final private TextBlock name; final private TextBlock stereo; final private TextBlock fields; final private Url url; final private double roundCorner; final private LineConfigurable lineConfig; public EntityImageObject(ILeaf entity, ISkinParam skinParam, PortionShower portionShower) { super(entity, skinParam); this.lineConfig = entity; final Stereotype stereotype = entity.getStereotype(); this.roundCorner = skinParam.getRoundCorner("", null); this.name = TextBlockUtils.withMargin( entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.OBJECT, stereotype), HorizontalAlignment.CENTER, skinParam), 2, 2); if (stereotype == null || stereotype.getLabel(false) == null || portionShower.showPortion(EntityPortion.STEREOTYPE, entity) == false) { this.stereo = null; } else { this.stereo = Display.create(stereotype.getLabels(skinParam.useGuillemet())).create( new FontConfiguration(getSkinParam(), FontParam.OBJECT_STEREOTYPE, stereotype), HorizontalAlignment.CENTER, skinParam); } // final boolean showMethods = portionShower.showPortion(EntityPortion.METHOD, entity); final boolean showFields = portionShower.showPortion(EntityPortion.FIELD, entity); if (entity.getBodier().getFieldsToDisplay().size() == 0) { this.fields = new TextBlockLineBefore(new TextBlockEmpty(10, 16)); } else { this.fields = entity.getBodier().getBody(FontParam.OBJECT_ATTRIBUTE, skinParam, false, showFields, entity.getStereotype()); } this.url = entity.getUrl99(); } private int marginEmptyFieldsOrMethod = 13; public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dimTitle = getTitleDimension(stringBounder); final Dimension2D dimFields = fields.calculateDimension(stringBounder); final double width = Math.max(dimFields.getWidth(), dimTitle.getWidth() + 2 * xMarginCircle); final double height = getMethodOrFieldHeight(dimFields) + dimTitle.getHeight(); return new Dimension2DDouble(width, height); } final public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimTotal = calculateDimension(stringBounder); final Dimension2D dimTitle = getTitleDimension(stringBounder); final double widthTotal = dimTotal.getWidth(); final double heightTotal = dimTotal.getHeight(); final Shadowable rect = new URectangle(widthTotal, heightTotal, roundCorner, roundCorner); if (getSkinParam().shadowing()) { rect.setDeltaShadow(4); } ug = ug.apply(new UChangeColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.objectBorder, getStereo()))); HtmlColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK); if (backcolor == null) { backcolor = SkinParamUtils.getColor(getSkinParam(), ColorParam.objectBackground, getStereo()); } ug = ug.apply(new UChangeBackColor(backcolor)); if (url != null) { ug.startUrl(url); } final UStroke stroke = getStroke(); ug.apply(stroke).draw(rect); final ULayoutGroup header = new ULayoutGroup(new PlacementStrategyY1Y2(ug.getStringBounder())); if (stereo != null) { header.add(stereo); } header.add(name); header.drawU(ug, dimTotal.getWidth(), dimTitle.getHeight()); final UGraphic ug2 = UGraphicStencil.create(ug, this, stroke); fields.drawU(ug2.apply(new UTranslate(0, dimTitle.getHeight()))); if (url != null) { ug.closeAction(); } } private UStroke getStroke() { UStroke stroke = lineConfig.getColors(getSkinParam()).getSpecificLineStroke(); if (stroke == null) { stroke = getSkinParam().getThickness(LineParam.objectBorder, getStereo()); } if (stroke == null) { stroke = new UStroke(1.5); } return stroke; } private double getMethodOrFieldHeight(final Dimension2D dim) { final double fieldsHeight = dim.getHeight(); if (fieldsHeight == 0) { return marginEmptyFieldsOrMethod; } return fieldsHeight; } private int xMarginCircle = 5; private Dimension2D getTitleDimension(StringBounder stringBounder) { return getNameAndSteretypeDimension(stringBounder); } private Dimension2D getNameAndSteretypeDimension(StringBounder stringBounder) { final Dimension2D nameDim = name.calculateDimension(stringBounder); final Dimension2D stereoDim = stereo == null ? new Dimension2DDouble(0, 0) : stereo .calculateDimension(stringBounder); final Dimension2D nameAndStereo = new Dimension2DDouble(Math.max(nameDim.getWidth(), stereoDim.getWidth()), nameDim.getHeight() + stereoDim.getHeight()); return nameAndStereo; } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } public double getStartingX(StringBounder stringBounder, double y) { return 0; } public double getEndingX(StringBounder stringBounder, double y) { return calculateDimension(stringBounder).getWidth(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImagePseudoState.java000066400000000000000000000073301312650303100307120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImagePseudoState extends AbstractEntityImage { private static final int SIZE = 22; private final TextBlock desc; public EntityImagePseudoState(ILeaf entity, ISkinParam skinParam) { super(entity, skinParam); final Stereotype stereotype = entity.getStereotype(); this.desc = Display.create("H").create(new FontConfiguration(getSkinParam(), FontParam.STATE, stereotype), HorizontalAlignment.CENTER, skinParam); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(SIZE, SIZE); } final public void drawU(UGraphic ug) { final UEllipse circle = new UEllipse(SIZE, SIZE); if (getSkinParam().shadowing()) { circle.setDeltaShadow(4); } ug = ug.apply(new UStroke(1.5)); ug = ug.apply( new UChangeBackColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.stateBackground, getStereo()))) .apply(new UChangeColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.stateBorder, getStereo()))); ug.draw(circle); ug = ug.apply(new UStroke()); final Dimension2D dimDesc = desc.calculateDimension(ug.getStringBounder()); final double widthDesc = dimDesc.getWidth(); final double heightDesc = dimDesc.getHeight(); final double x = (SIZE - widthDesc) / 2; final double y = (SIZE - heightDesc) / 2; desc.drawU(ug.apply(new UTranslate(x, y))); } public ShapeType getShapeType() { return ShapeType.CIRCLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageState.java000066400000000000000000000156401312650303100275350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineConfigurable; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.Member; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageState extends AbstractEntityImage { final private TextBlock desc; final private TextBlock fields; final private Url url; final private static int MIN_WIDTH = 50; final private static int MIN_HEIGHT = 50; final private boolean withSymbol; final static private double smallRadius = 3; final static private double smallLine = 3; final static private double smallMarginX = 7; final static private double smallMarginY = 4; final private LineConfigurable lineConfig; public EntityImageState(IEntity entity, ISkinParam skinParam) { super(entity, skinParam); this.lineConfig = entity; final Stereotype stereotype = entity.getStereotype(); this.withSymbol = stereotype != null && stereotype.isWithOOSymbol(); this.desc = entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.STATE, stereotype), HorizontalAlignment.CENTER, skinParam); Display list = Display.empty(); for (Member att : entity.getBodier().getFieldsToDisplay()) { list = list.addAll(Display.getWithNewlines(att.getDisplay(true))); } this.url = entity.getUrl99(); this.fields = list.create(new FontConfiguration(getSkinParam(), FontParam.STATE_ATTRIBUTE, stereotype), HorizontalAlignment.LEFT, skinParam); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dim = Dimension2DDouble.mergeTB(desc.calculateDimension(stringBounder), fields.calculateDimension(stringBounder)); double heightSymbol = 0; if (withSymbol) { heightSymbol += 2 * smallRadius + smallMarginY; } final Dimension2D result = Dimension2DDouble.delta(dim, MARGIN * 2 + 2 * MARGIN_LINE + heightSymbol); return Dimension2DDouble.atLeast(result, MIN_WIDTH, MIN_HEIGHT); } final public void drawU(UGraphic ug) { if (url != null) { ug.startUrl(url); } final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimTotal = calculateDimension(stringBounder); final Dimension2D dimDesc = desc.calculateDimension(stringBounder); final double widthTotal = dimTotal.getWidth(); final double heightTotal = dimTotal.getHeight(); final Shadowable rect = new URectangle(widthTotal, heightTotal, CORNER, CORNER); if (getSkinParam().shadowing()) { rect.setDeltaShadow(4); } HtmlColor classBorder = lineConfig.getColors(getSkinParam()).getColor(ColorType.LINE); if (classBorder == null) { classBorder = SkinParamUtils.getColor(getSkinParam(), ColorParam.stateBorder, getStereo()); } ug = ug.apply(getStroke()).apply(new UChangeColor(classBorder)); HtmlColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK); if (backcolor == null) { backcolor = SkinParamUtils.getColor(getSkinParam(), ColorParam.stateBackground, getStereo()); } ug = ug.apply(new UChangeBackColor(backcolor)); ug.draw(rect); final double yLine = MARGIN + dimDesc.getHeight() + MARGIN_LINE; ug.apply(new UTranslate(0, yLine)).draw(new ULine(widthTotal, 0)); ug = ug.apply(new UStroke()); if (withSymbol) { final double xSymbol = dimTotal.getWidth(); final double ySymbol = dimTotal.getHeight(); drawSymbol(ug, xSymbol, ySymbol); } final double xDesc = (widthTotal - dimDesc.getWidth()) / 2; final double yDesc = MARGIN; desc.drawU(ug.apply(new UTranslate(xDesc, yDesc))); final double xFields = MARGIN; final double yFields = yLine + MARGIN_LINE; fields.drawU(ug.apply(new UTranslate(xFields, yFields))); if (url != null) { ug.closeAction(); } } private UStroke getStroke() { UStroke stroke = lineConfig.getColors(getSkinParam()).getSpecificLineStroke(); if (stroke == null) { stroke = new UStroke(1.5); } return stroke; } public static void drawSymbol(UGraphic ug, double xSymbol, double ySymbol) { xSymbol -= 4 * smallRadius + smallLine + smallMarginX; ySymbol -= 2 * smallRadius + smallMarginY; final UEllipse small = new UEllipse(2 * smallRadius, 2 * smallRadius); ug.apply(new UTranslate(xSymbol, ySymbol)).draw(small); ug.apply(new UTranslate(xSymbol + smallLine + 2 * smallRadius, ySymbol)).draw(small); ug.apply(new UTranslate(xSymbol + 2 * smallRadius, ySymbol + smallLine)).draw(new ULine(smallLine, 0)); } public ShapeType getShapeType() { return ShapeType.ROUND_RECTANGLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageState2.java000066400000000000000000000101211312650303100276040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineConfigurable; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cucadiagram.BodyEnhanced; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Member; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; public class EntityImageState2 extends AbstractEntityImage { final private Url url; final private LineConfigurable lineConfig; private final TextBlock asSmall; public EntityImageState2(ILeaf entity, ISkinParam skinParam) { super(entity, skinParam); this.lineConfig = entity; final Stereotype stereotype = entity.getStereotype(); Display list = Display.empty(); for (Member att : entity.getBodier().getFieldsToDisplay()) { list = list.addAll(Display.getWithNewlines(att.getDisplay(true))); } final USymbol symbol = USymbol.FRAME; HtmlColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK); if (backcolor == null) { backcolor = SkinParamUtils.getColor(getSkinParam(), symbol.getColorParamBack(), getStereo()); } // backcolor = HtmlColorUtils.BLUE; final HtmlColor forecolor = SkinParamUtils.getColor(getSkinParam(), symbol.getColorParamBorder(), getStereo()); final SymbolContext ctx = new SymbolContext(backcolor, forecolor).withStroke(new UStroke(1.5)).withShadow( getSkinParam().shadowing()); this.url = entity.getUrl99(); TextBlock stereo = TextBlockUtils.empty(0, 0); final TextBlock desc = new BodyEnhanced(entity.getDisplay(), symbol.getFontParam(), skinParam, HorizontalAlignment.CENTER, stereotype, symbol.manageHorizontalLine(), false, entity); asSmall = symbol.asSmall(null, desc, stereo, ctx); } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } public Dimension2D calculateDimension(StringBounder stringBounder) { return asSmall.calculateDimension(stringBounder); } final public void drawU(UGraphic ug) { if (url != null) { ug.startUrl(url); } asSmall.drawU(ug); if (url != null) { ug.closeAction(); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageStateBorder.java000066400000000000000000000114671312650303100306760ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.cucadiagram.EntityPosition; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Rankdir; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.Bibliotekon; import net.sourceforge.plantuml.svek.Cluster; import net.sourceforge.plantuml.svek.Shape; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageStateBorder extends AbstractEntityImage { private final TextBlock desc; private final Cluster stateParent; private final EntityPosition entityPosition; private final Bibliotekon bibliotekon; private final Rankdir rankdir; public EntityImageStateBorder(ILeaf leaf, ISkinParam skinParam, Cluster stateParent, final Bibliotekon bibliotekon) { super(leaf, skinParam); this.bibliotekon = bibliotekon; this.rankdir = skinParam.getRankdir(); this.entityPosition = leaf.getEntityPosition(); if (entityPosition == EntityPosition.NORMAL) { throw new IllegalArgumentException(); } this.stateParent = stateParent; final Stereotype stereotype = leaf.getStereotype(); this.desc = leaf.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.STATE, stereotype), HorizontalAlignment.CENTER, skinParam); } private boolean upPosition() { final Point2D clusterCenter = stateParent.getClusterPosition().getPointCenter(); final Shape sh = bibliotekon.getShape(getEntity()); return sh.getMinY() < clusterCenter.getY(); } public Dimension2D calculateDimension(StringBounder stringBounder) { return entityPosition.getDimension(rankdir); } public double getMaxWidthFromLabelForEntryExit(StringBounder stringBounder) { final Dimension2D dimDesc = desc.calculateDimension(stringBounder); return dimDesc.getWidth(); } final public void drawU(UGraphic ug) { double y = 0; final Dimension2D dimDesc = desc.calculateDimension(ug.getStringBounder()); final double x = 0 - (dimDesc.getWidth() - 2 * EntityPosition.RADIUS) / 2; if (upPosition()) { y -= 2 * EntityPosition.RADIUS + dimDesc.getHeight(); } else { y += 2 * EntityPosition.RADIUS; } desc.drawU(ug.apply(new UTranslate(x, y))); ug = ug.apply(new UStroke(1.5)).apply( new UChangeColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.stateBorder, getStereo()))); HtmlColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK); if (backcolor == null) { backcolor = SkinParamUtils.getColor(getSkinParam(), ColorParam.stateBackground, getStereo()); } ug = ug.apply(new UChangeBackColor(backcolor)); entityPosition.drawSymbol(ug, rankdir); } public ShapeType getShapeType() { return entityPosition.getShapeType(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageStateEmptyDescription.java000066400000000000000000000114721312650303100327570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.Member; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageStateEmptyDescription extends AbstractEntityImage { final private TextBlock desc; final private Url url; final private static int MIN_WIDTH = 50; final private static int MIN_HEIGHT = 40; public EntityImageStateEmptyDescription(IEntity entity, ISkinParam skinParam) { super(entity, skinParam); final Stereotype stereotype = entity.getStereotype(); this.desc = entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.STATE, stereotype), HorizontalAlignment.CENTER, skinParam); Display list = Display.empty(); for (Member att : entity.getBodier().getFieldsToDisplay()) { list = list.addAll(Display.getWithNewlines(att.getDisplay(true))); } this.url = entity.getUrl99(); } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dim = desc.calculateDimension(stringBounder); final Dimension2D result = Dimension2DDouble.delta(dim, MARGIN * 2); return Dimension2DDouble.atLeast(result, MIN_WIDTH, MIN_HEIGHT); } final public void drawU(UGraphic ug) { if (url != null) { ug.startUrl(url); } final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimTotal = calculateDimension(stringBounder); final Dimension2D dimDesc = desc.calculateDimension(stringBounder); final double widthTotal = dimTotal.getWidth(); final double heightTotal = dimTotal.getHeight(); final Shadowable rect = new URectangle(widthTotal, heightTotal, CORNER, CORNER); if (getSkinParam().shadowing()) { rect.setDeltaShadow(4); } ug = ug.apply(new UStroke(1.5)).apply( new UChangeColor(SkinParamUtils.getColor(getSkinParam(), ColorParam.stateBorder, getStereo()))); HtmlColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK); if (backcolor == null) { backcolor = SkinParamUtils.getColor(getSkinParam(), ColorParam.stateBackground, getStereo()); } ug = ug.apply(new UChangeBackColor(backcolor)); ug.draw(rect); final double xDesc = (widthTotal - dimDesc.getWidth()) / 2; final double yDesc = (heightTotal - dimDesc.getHeight()) / 2; desc.drawU(ug.apply(new UTranslate(xDesc, yDesc))); if (url != null) { ug.closeAction(); } } public ShapeType getShapeType() { return ShapeType.ROUND_RECTANGLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageSynchroBar.java000066400000000000000000000055641312650303100305330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Rankdir; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; public class EntityImageSynchroBar extends AbstractEntityImage { public EntityImageSynchroBar(ILeaf entity, ISkinParam skinParam) { super(entity, skinParam); } public Dimension2D calculateDimension(StringBounder stringBounder) { if (getSkinParam().getRankdir() == Rankdir.LEFT_TO_RIGHT) { return new Dimension2DDouble(8, 80); } return new Dimension2DDouble(80, 8); } final public void drawU(UGraphic ug) { final Dimension2D dim = calculateDimension(ug.getStringBounder()); final Shadowable rect = new URectangle(dim.getWidth(), dim.getHeight()); if (getSkinParam().shadowing()) { rect.setDeltaShadow(4); } ug.apply(new UChangeColor(null)) .apply(new UChangeBackColor(SkinParamUtils .getColor(getSkinParam(), ColorParam.activityBar, getStereo()))).draw(rect); } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageTips.java000066400000000000000000000142231312650303100273700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.util.Map; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.cucadiagram.BodyEnhanced2; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.Bibliotekon; import net.sourceforge.plantuml.svek.Shape; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageTips extends AbstractEntityImage { final private Rose rose = new Rose(); private final ISkinParam skinParam; private final HtmlColor noteBackgroundColor; private final HtmlColor borderColor; private final Bibliotekon bibliotekon; private final double ySpacing = 10; public EntityImageTips(ILeaf entity, ISkinParam skinParam, Bibliotekon bibliotekon) { super(entity, EntityImageNote.getSkin(skinParam, entity)); this.skinParam = skinParam; this.bibliotekon = bibliotekon; if (entity.getColors(skinParam).getColor(ColorType.BACK) == null) { noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground); } else { noteBackgroundColor = entity.getColors(skinParam).getColor(ColorType.BACK); } this.borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder); } private Position getPosition() { if (getEntity().getCode().getFullName().endsWith(Position.RIGHT.name())) { return Position.RIGHT; } return Position.LEFT; } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } public Dimension2D calculateDimension(StringBounder stringBounder) { double width = 0; double height = 0; for (Map.Entry ent : getEntity().getTips().entrySet()) { final Display display = ent.getValue(); final Dimension2D dim = getOpale(display).calculateDimension(stringBounder); height += dim.getHeight(); height += ySpacing; width = Math.max(width, dim.getWidth()); } return new Dimension2DDouble(width, height); } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final IEntity other = bibliotekon.getOnlyOther(getEntity()); final Shape shapeMe = bibliotekon.getShape(getEntity()); final Shape shapeOther = bibliotekon.getShape(other); final Point2D positionMe = shapeMe.getPosition(); final Point2D positionOther = shapeOther.getPosition(); bibliotekon.getShape(getEntity()); final Position position = getPosition(); Direction direction = position.reverseDirection(); double height = 0; for (Map.Entry ent : getEntity().getTips().entrySet()) { final Display display = ent.getValue(); final Rectangle2D memberPosition = shapeOther.getImage().getInnerPosition(ent.getKey(), stringBounder, InnerStrategy.STRICT); if (memberPosition == null) { return; } final Opale opale = getOpale(display); final Dimension2D dim = opale.calculateDimension(stringBounder); final Point2D pp1 = new Point2D.Double(0, dim.getHeight() / 2); double x = positionOther.getX() - positionMe.getX(); if (direction == Direction.RIGHT && x < 0) { direction = direction.getInv(); } if (direction == Direction.LEFT) { x += memberPosition.getMaxX(); } else { x += 4; } final double y = positionOther.getY() - positionMe.getY() - height + memberPosition.getCenterY(); final Point2D pp2 = new Point2D.Double(x, y); opale.setOpale(direction, pp1, pp2); opale.drawU(ug); ug = ug.apply(new UTranslate(0, dim.getHeight() + ySpacing)); height += dim.getHeight(); height += ySpacing; } } private Opale getOpale(final Display display) { // final HtmlColor fontColor = rose.getFontColor(skinParam, FontParam.NOTE); // final UFont fontNote = skinParam.getFont(FontParam.NOTE, null, false); final TextBlock textBlock = new BodyEnhanced2(display, FontParam.NOTE, skinParam, HorizontalAlignment.LEFT, new FontConfiguration(skinParam, FontParam.NOTE, null)); final Opale opale = new Opale(borderColor, noteBackgroundColor, textBlock, skinParam.shadowing(), true); return opale; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/EntityImageUseCase.java000066400000000000000000000152761312650303100300120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.cucadiagram.BodyEnhanced; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.AbstractUGraphicHorizontalLine; import net.sourceforge.plantuml.ugraphic.TextBlockInEllipse; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UHorizontalLine; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class EntityImageUseCase extends AbstractEntityImage { final private TextBlock desc; final private Url url; public EntityImageUseCase(ILeaf entity, ISkinParam skinParam) { super(entity, skinParam); final Stereotype stereotype = entity.getStereotype(); final TextBlock tmp = new BodyEnhanced(entity.getDisplay(), FontParam.USECASE, skinParam, HorizontalAlignment.CENTER, stereotype, true, false, entity); if (stereotype == null || stereotype.getLabel(false) == null) { this.desc = tmp; } else { final TextBlock stereo = Display.getWithNewlines(stereotype.getLabel(getSkinParam().useGuillemet())) .create(new FontConfiguration(getSkinParam(), FontParam.USECASE_STEREOTYPE, stereotype), HorizontalAlignment.CENTER, skinParam); this.desc = TextBlockUtils.mergeTB(stereo, tmp, HorizontalAlignment.CENTER); } this.url = entity.getUrl99(); } private UStroke getStroke() { UStroke stroke = getSkinParam().getThickness(LineParam.usecaseBorder, getStereo()); if (stroke == null) { stroke = new UStroke(1.5); } return stroke; } public Dimension2D calculateDimension(StringBounder stringBounder) { return new TextBlockInEllipse(desc, stringBounder).calculateDimension(stringBounder); } final public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final TextBlockInEllipse ellipse = new TextBlockInEllipse(desc, stringBounder); if (getSkinParam().shadowing()) { ellipse.setDeltaShadow(3); } if (url != null) { ug.startUrl(url); } ug = ug.apply(getStroke()); HtmlColor linecolor = getEntity().getColors(getSkinParam()).getColor(ColorType.LINE); if (linecolor == null) { linecolor = SkinParamUtils.getColor(getSkinParam(), ColorParam.usecaseBorder, getStereo()); } ug = ug.apply(new UChangeColor(linecolor)); HtmlColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK); if (backcolor == null) { backcolor = SkinParamUtils.getColor(getSkinParam(), ColorParam.usecaseBackground, getStereo()); } ug = ug.apply(new UChangeBackColor(backcolor)); final UGraphic ug2 = new MyUGraphicEllipse(ug, 0, 0, ellipse.getUEllipse()); ellipse.drawU(ug2); if (url != null) { ug.closeAction(); } } public ShapeType getShapeType() { return ShapeType.OVAL; } static class MyUGraphicEllipse extends AbstractUGraphicHorizontalLine { private final double startingX; private final double yTheoricalPosition; private final UEllipse ellipse; @Override protected AbstractUGraphicHorizontalLine copy(UGraphic ug) { return new MyUGraphicEllipse(ug, startingX, yTheoricalPosition, ellipse); } MyUGraphicEllipse(UGraphic ug, double startingX, double yTheoricalPosition, UEllipse ellipse) { super(ug); this.startingX = startingX; this.ellipse = ellipse; this.yTheoricalPosition = yTheoricalPosition; } private double getNormalized(double y) { if (y < yTheoricalPosition) { throw new IllegalArgumentException(); } y = y - yTheoricalPosition; if (y > ellipse.getHeight()) { throw new IllegalArgumentException(); } return y; } private double getStartingXInternal(double y) { return startingX + ellipse.getStartingX(getNormalized(y)); } private double getEndingXInternal(double y) { return startingX + ellipse.getEndingX(getNormalized(y)); } private Stencil getStencil2(UTranslate translate) { final double dy = translate.getDy(); return new Stencil() { public double getStartingX(StringBounder stringBounder, double y) { return getStartingXInternal(y + dy); } public double getEndingX(StringBounder stringBounder, double y) { return getEndingXInternal(y + dy); } }; } @Override protected void drawHline(UGraphic ug, UHorizontalLine line, UTranslate translate) { final UStroke stroke = new UStroke(1.5); line.drawLineInternal(ug.apply(translate), getStencil2(translate), 0, stroke); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/Footprint.java000066400000000000000000000122501312650303100262730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UHorizontalLine; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UParamNull; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UText; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Footprint { private final StringBounder stringBounder; public Footprint(StringBounder stringBounder) { this.stringBounder = stringBounder; } class MyUGraphic implements UGraphic { private final UTranslate translate; private final List all; private MyUGraphic(List all, UTranslate translate) { this.all = all; this.translate = translate; } public boolean matchesProperty(String propertyName) { return false; } public MyUGraphic() { this(new ArrayList(), new UTranslate()); } public UGraphic apply(UChange change) { if (change instanceof UTranslate) { return new MyUGraphic(all, translate.compose((UTranslate) change)); } else if (change instanceof UStroke || change instanceof UChangeColor) { return new MyUGraphic(all, translate); } throw new UnsupportedOperationException(); } public StringBounder getStringBounder() { return stringBounder; } public UParam getParam() { return new UParamNull(); } public void draw(UShape shape) { final double x = translate.getDx(); final double y = translate.getDy(); if (shape instanceof UText) { drawText(x, y, (UText) shape); } else if (shape instanceof UHorizontalLine) { // Definitively a Horizontal line } else if (shape instanceof ULine) { // Probably a Horizontal line } else if (shape instanceof UImage) { drawImage(x, y, (UImage) shape); } else { throw new UnsupportedOperationException(shape.getClass().toString()); } } public ColorMapper getColorMapper() { return new ColorMapperIdentity(); } public void startUrl(Url url) { } public void closeAction() { } private void addPoint(double x, double y) { all.add(new Point2D.Double(x, y)); } private void drawText(double x, double y, UText text) { final Dimension2D dim = stringBounder.calculateDimension(text.getFontConfiguration().getFont(), text.getText()); y -= dim.getHeight() - 1.5; addPoint(x, y); addPoint(x, y + dim.getHeight()); addPoint(x + dim.getWidth(), y); addPoint(x + dim.getWidth(), y + dim.getHeight()); } private void drawImage(double x, double y, UImage image) { addPoint(x, y); addPoint(x, y + image.getHeight()); addPoint(x + image.getWidth(), y); addPoint(x + image.getWidth(), y + image.getHeight()); } public void flushUg() { } } public ContainingEllipse getEllipse(UDrawable drawable, double alpha) { final MyUGraphic ug = new MyUGraphic(); drawable.drawU(ug); final List all = ug.all; final ContainingEllipse circle = new ContainingEllipse(alpha); for (Point2D pt : all) { circle.append(pt); } return circle; } // public void drawDebug(UGraphic ug, double dx, double dy, TextBlock text) { // final MyUGraphic mug = new MyUGraphic(); // text.drawU(mug, dx, dy); // for (Point2D pt : mug.all) { // ug.draw(pt.getX(), pt.getY(), new URectangle(1, 1)); // } // // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/Opale.java000066400000000000000000000175441312650303100253620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.utils.MathUtils; public class Opale extends AbstractTextBlock implements TextBlock { private final int cornersize = 10; private final HtmlColor noteBackgroundColor; private final HtmlColor borderColor; private final int marginX1 = 6; private final int marginX2 = 15; private final int marginY = 5; private final boolean withShadow; private Direction strategy; private Point2D pp1; private Point2D pp2; private final boolean withLink; private final TextBlock textBlock; public Opale(HtmlColor borderColor, HtmlColor noteBackgroundColor, TextBlock textBlock, boolean withShadow, boolean withLink) { this.noteBackgroundColor = noteBackgroundColor; this.withLink = withLink; this.withShadow = withShadow; this.borderColor = borderColor; this.textBlock = textBlock; } public void setOpale(Direction strategy, Point2D pp1, Point2D pp2) { this.strategy = strategy; this.pp1 = pp1; this.pp2 = pp2; } final private double getWidth(StringBounder stringBounder) { return textBlock.calculateDimension(stringBounder).getWidth() + marginX1 + marginX2; } final private double getHeight(StringBounder stringBounder) { final Dimension2D size = textBlock.calculateDimension(stringBounder); return size.getHeight() + 2 * marginY; } public Dimension2D calculateDimension(StringBounder stringBounder) { final double height = getHeight(stringBounder); final double width = getWidth(stringBounder); return new Dimension2DDouble(width, height); } final public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final UPolygon polygon = getPolygonNormal(stringBounder); if (withShadow) { polygon.setDeltaShadow(4); } ug = ug.apply(new UChangeBackColor(noteBackgroundColor)).apply(new UChangeColor(borderColor)); ug.draw(polygon); if (withLink) { final UShape polygonOpale; if (strategy == Direction.LEFT) { polygonOpale = getPolygonLeft(stringBounder, pp1, pp2); } else if (strategy == Direction.RIGHT) { polygonOpale = getPolygonRight(stringBounder, pp1, pp2); } else if (strategy == Direction.UP) { polygonOpale = getPolygonUp(stringBounder, pp1, pp2); } else if (strategy == Direction.DOWN) { polygonOpale = getPolygonDown(stringBounder, pp1, pp2); } else { throw new IllegalArgumentException(); } ug.draw(polygonOpale); } ug.apply(new UTranslate(getWidth(stringBounder) - cornersize, 0)).draw(new ULine(0, cornersize)); ug.apply(new UTranslate(getWidth(stringBounder), cornersize)).draw(new ULine(-cornersize, 0)); textBlock.drawU(ug.apply(new UTranslate(marginX1, marginY))); } private UPolygon getPolygonNormal(final StringBounder stringBounder) { final UPolygon polygon = new UPolygon(); polygon.addPoint(0, 0); polygon.addPoint(0, getHeight(stringBounder)); polygon.addPoint(getWidth(stringBounder), getHeight(stringBounder)); polygon.addPoint(getWidth(stringBounder), cornersize); polygon.addPoint(getWidth(stringBounder) - cornersize, 0); polygon.addPoint(0, 0); return polygon; } private final double delta = 4; private UPolygon getPolygonLeft(final StringBounder stringBounder, final Point2D pp1, final Point2D pp2) { final UPolygon polygon = new UPolygon(); polygon.addPoint(0, 0); double y1 = pp1.getY() - delta; y1 = MathUtils.limitation(y1, 0, getHeight(stringBounder) - 2 * delta); polygon.addPoint(0, y1); polygon.addPoint(pp2.getX(), pp2.getY()); polygon.addPoint(0, y1 + 2 * delta); polygon.addPoint(0, getHeight(stringBounder)); polygon.addPoint(getWidth(stringBounder), getHeight(stringBounder)); polygon.addPoint(getWidth(stringBounder), cornersize); polygon.addPoint(getWidth(stringBounder) - cornersize, 0); polygon.addPoint(0, 0); return polygon; } private UPolygon getPolygonRight(final StringBounder stringBounder, final Point2D pp1, final Point2D pp2) { final UPolygon polygon = new UPolygon(); polygon.addPoint(0, 0); polygon.addPoint(0, getHeight(stringBounder)); polygon.addPoint(getWidth(stringBounder), getHeight(stringBounder)); double y1 = pp1.getY() - delta; y1 = MathUtils.limitation(y1, cornersize, getHeight(stringBounder) - 2 * delta); polygon.addPoint(getWidth(stringBounder), y1 + 2 * delta); polygon.addPoint(pp2.getX(), pp2.getY()); polygon.addPoint(getWidth(stringBounder), y1); polygon.addPoint(getWidth(stringBounder), cornersize); polygon.addPoint(getWidth(stringBounder) - cornersize, 0); polygon.addPoint(0, 0); return polygon; } private UPolygon getPolygonUp(final StringBounder stringBounder, final Point2D pp1, final Point2D pp2) { final UPolygon polygon = new UPolygon(); polygon.addPoint(0, 0); polygon.addPoint(0, getHeight(stringBounder)); polygon.addPoint(getWidth(stringBounder), getHeight(stringBounder)); polygon.addPoint(getWidth(stringBounder), cornersize); polygon.addPoint(getWidth(stringBounder) - cornersize, 0); double x1 = pp1.getX() - delta; x1 = MathUtils.limitation(x1, 0, getWidth(stringBounder) - cornersize); polygon.addPoint(x1 + 2 * delta, 0); polygon.addPoint(pp2.getX(), pp2.getY()); polygon.addPoint(x1, 0); polygon.addPoint(0, 0); return polygon; } private UPolygon getPolygonDown(final StringBounder stringBounder, final Point2D pp1, final Point2D pp2) { final UPolygon polygon = new UPolygon(); polygon.addPoint(0, 0); polygon.addPoint(0, getHeight(stringBounder)); double x1 = pp1.getX() - delta; x1 = MathUtils.limitation(x1, 0, getWidth(stringBounder)); polygon.addPoint(x1, getHeight(stringBounder)); polygon.addPoint(pp2.getX(), pp2.getY()); polygon.addPoint(x1 + 2 * delta, getHeight(stringBounder)); polygon.addPoint(getWidth(stringBounder), getHeight(stringBounder)); polygon.addPoint(getWidth(stringBounder), cornersize); polygon.addPoint(getWidth(stringBounder) - cornersize, 0); polygon.addPoint(0, 0); return polygon; } public final int getMarginX1() { return marginX1; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/SmallestEnclosingCircle.java000066400000000000000000000045501312650303100310630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; public class SmallestEnclosingCircle { private final List all = new ArrayList(); private Circle lastSolution; public void append(Point2D pt) { if (all.contains(pt) == false) { all.add(pt); } this.lastSolution = null; } public Circle getCircle() { if (lastSolution == null) { lastSolution = findSec(all.size(), all, 0, new ArrayList(all)); } return lastSolution; } private Circle findSec(int n, List p, int m, List b) { Circle sec = new Circle(); // Compute the Smallest Enclosing Circle defined by B if (m == 1) { sec = new Circle(b.get(0)); } else if (m == 2) { sec = new Circle(b.get(0), b.get(1)); } else if (m == 3) { return Circle.getCircle(b.get(0), b.get(1), b.get(2)); } // Check if all the points in p are enclosed for (int i = 0; i < n; i++) { if (sec.isOutside(p.get(i))) { // Compute B <--- B union P[i]. b.set(m, p.get(i)); // Recurse sec = findSec(i, p, m + 1, b); } } return sec; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svek/image/YTransformer.java000066400000000000000000000032631312650303100267460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Point2D; public class YTransformer { private final double alpha; public YTransformer(double alpha) { this.alpha = alpha; } public Point2D getPoint2D(Point2D pt) { return new Point2D.Double(pt.getX(), pt.getY() * alpha); } public Point2D getReversePoint2D(Point2D pt) { return new Point2D.Double(pt.getX(), pt.getY() / alpha); } public double getAlpha() { return alpha; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/svg/000077500000000000000000000000001312650303100222115ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/svg/SvgData.java000066400000000000000000000104221312650303100244040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svg; import java.util.StringTokenizer; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sourceforge.plantuml.StringUtils; public final class SvgData { private String svg; private double startX; private double startY; private double width; private double height; public static SvgData fromGraphViz(String s) { return new SvgData(removeSvgXmlHeader1(s)); } private SvgData(String svg) { this.svg = svg; init(); } private SvgData() { } private static String removeSvgXmlHeader1(String svg) { final String newString = ""; svg = svg.replaceFirst("(?i)]*>", newString); return svg; } public SvgData mutateFromSvgTitler(String newSvg, double suppHeight, double suppWidth) { final SvgData result = new SvgData(); result.svg = newSvg; result.startX = this.startX - suppWidth / 2; result.startY = this.startY; result.width = this.width + suppWidth; result.height = this.height + suppHeight; return result; } public final String getSvg() { return modifiedSvgXmlHeader(); } private void init() { final Pattern p = Pattern.compile("(?i)]*points=\"([^\"]+)\""); final Matcher m = p.matcher(svg); double minX = Double.MAX_VALUE; double minY = Double.MAX_VALUE; double maxX = -Double.MAX_VALUE; double maxY = -Double.MAX_VALUE; if (m.find() == false) { return; } final String points = m.group(1); final StringTokenizer st = new StringTokenizer(points, " "); while (st.hasMoreTokens()) { final String token = st.nextToken(); final StringTokenizer st2 = new StringTokenizer(token, ","); final double x = Double.parseDouble(StringUtils.trin(st2.nextToken())); final double y = Double.parseDouble(StringUtils.trin(st2.nextToken())); if (x < minX) { minX = x; } if (y < minY) { minY = y; } if (x > maxX) { maxX = x; } if (y > maxY) { maxY = y; } } this.width = maxX - minX; this.height = maxY - minY; } private String modifiedSvgXmlHeader() { final StringBuilder newString = new StringBuilder( ""); return svg.replaceFirst("(?i)]*>", newString.toString()); } public double getWidth() { return width; } public double getHeight() { return height; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/svg/SvgGraphics.java��������������������������������0000664�0000000�0000000�00000064617�13126503031�0025312�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.svg; import java.awt.geom.Dimension2D; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.imageio.ImageIO; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.SvgString; import net.sourceforge.plantuml.code.Base64Coder; import net.sourceforge.plantuml.eps.EpsGraphics; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.USegment; import net.sourceforge.plantuml.ugraphic.USegmentType; import org.w3c.dom.CDATASection; import org.w3c.dom.Comment; import org.w3c.dom.Document; import org.w3c.dom.Element; public class SvgGraphics { // http://tutorials.jenkov.com/svg/index.html // http://www.svgbasics.com/ // http://apike.ca/prog_svg_text.html // http://www.w3.org/TR/SVG11/shapes.html // http://en.wikipedia.org/wiki/Scalable_Vector_Graphics // Animation: // http://srufaculty.sru.edu/david.dailey/svg/ // Shadow: // http://www.svgbasics.com/filters3.html // http://www.w3schools.com/svg/svg_feoffset.asp // http://www.adobe.com/svg/demos/samples.html final private Document document; final private Element root; final private Element defs; final private Element gRoot; private String fill = "black"; private String stroke = "black"; private String strokeWidth; private String strokeDasharray = null; private final String backcolor; private int maxX = 10; private int maxY = 10; private final double scale; private final String filterUid; private final String shadowId; private final String gradientId; final protected void ensureVisible(double x, double y) { if (x > maxX) { maxX = (int) (x + 1); } if (y > maxY) { maxY = (int) (y + 1); } } public SvgGraphics(Dimension2D minDim, double scale, String hover, long seed) { this(minDim, null, scale, hover, seed); } public SvgGraphics(Dimension2D minDim, String backcolor, double scale, String hover, long seed) { try { this.scale = scale; this.document = getDocument(); this.backcolor = backcolor; ensureVisible(minDim.getWidth(), minDim.getHeight()); this.root = getRootNode(); // Create a node named defs, which will be the parent // for a pair of linear gradient definitions. defs = simpleElement("defs"); gRoot = simpleElement("g"); strokeWidth = "" + scale; this.filterUid = "b" + getSeed(seed); this.shadowId = "f" + getSeed(seed); this.gradientId = "g" + getSeed(seed); if (hover != null) { defs.appendChild(getPathHover(hover)); } } catch (ParserConfigurationException e) { e.printStackTrace(); throw new IllegalStateException(e); } } private Element getPathHover(String hover) { final Element style = simpleElement("style"); final CDATASection cdata = document.createCDATASection("path:hover { stroke: " + hover + " !important;}"); style.setAttribute("type", "text/css"); style.appendChild(cdata); return style; } private static String getSeed(final long seed) { return Long.toString(Math.abs(seed), 36); } private Element pendingBackground; public void paintBackcolorGradient(ColorMapper mapper, HtmlColorGradient gr) { final String id = createSvgGradient(StringUtils.getAsHtml(mapper.getMappedColor(gr.getColor1())), StringUtils.getAsHtml(mapper.getMappedColor(gr.getColor2())), gr.getPolicy()); setFillColor("url(#" + id + ")"); setStrokeColor(null); pendingBackground = createRectangleInternal(0, 0, 0, 0); getG().appendChild(pendingBackground); } // This method returns a reference to a simple XML // element node that has no attributes. private Element simpleElement(String type) { final Element theElement = (Element) document.createElement(type); root.appendChild(theElement); return theElement; } private Document getDocument() throws ParserConfigurationException { final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); final DocumentBuilder builder = factory.newDocumentBuilder(); final Document document = builder.newDocument(); document.setXmlStandalone(true); return document; } // This method returns a reference to a root node that // has already been appended to the document. private Element getRootNode() { // Create the root node named svg and append it to // the document. final Element svg = (Element) document.createElement("svg"); document.appendChild(svg); // Set some attributes on the root node that are // required for proper rendering. Note that the // approach used here is somewhat different from the // approach used in the earlier program named Svg01, // particularly with regard to the style. svg.setAttribute("xmlns", "http://www.w3.org/2000/svg"); svg.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"); svg.setAttribute("version", "1.1"); return svg; } public void svgEllipse(double x, double y, double xRadius, double yRadius, double deltaShadow) { manageShadow(deltaShadow); if (hidden == false) { final Element elt = (Element) document.createElement("ellipse"); elt.setAttribute("cx", format(x)); elt.setAttribute("cy", format(y)); elt.setAttribute("rx", format(xRadius)); elt.setAttribute("ry", format(yRadius)); elt.setAttribute("fill", fill); elt.setAttribute("style", getStyle()); addFilterShadowId(elt, deltaShadow); getG().appendChild(elt); } ensureVisible(x + xRadius + deltaShadow * 2, y + yRadius + deltaShadow * 2); } public void svgArcEllipse(double rx, double ry, double x1, double y1, double x2, double y2) { if (hidden == false) { final String path = "M" + format(x1) + "," + format(y1) + " A" + format(rx) + "," + format(ry) + " 0 0 0 " + format(x2) + " " + format(y2); final Element elt = (Element) document.createElement("path"); elt.setAttribute("d", path); elt.setAttribute("fill", fill); elt.setAttribute("style", getStyle()); getG().appendChild(elt); } ensureVisible(x1, y1); ensureVisible(x2, y2); } private Map, String> gradients = new HashMap, String>(); public String createSvgGradient(String color1, String color2, char policy) { final List key = Arrays.asList((Object) color1, color2, policy); String id = gradients.get(key); if (id == null) { final Element elt = (Element) document.createElement("linearGradient"); if (policy == '|') { elt.setAttribute("x1", "0%"); elt.setAttribute("y1", "50%"); elt.setAttribute("x2", "100%"); elt.setAttribute("y2", "50%"); } else if (policy == '\\') { elt.setAttribute("x1", "0%"); elt.setAttribute("y1", "100%"); elt.setAttribute("x2", "100%"); elt.setAttribute("y2", "0%"); } else if (policy == '-') { elt.setAttribute("x1", "50%"); elt.setAttribute("y1", "0%"); elt.setAttribute("x2", "50%"); elt.setAttribute("y2", "100%"); } else { elt.setAttribute("x1", "0%"); elt.setAttribute("y1", "0%"); elt.setAttribute("x2", "100%"); elt.setAttribute("y2", "100%"); } id = gradientId + gradients.size(); gradients.put(key, id); elt.setAttribute("id", id); final Element stop1 = (Element) document.createElement("stop"); stop1.setAttribute("stop-color", color1); stop1.setAttribute("offset", "0%"); final Element stop2 = (Element) document.createElement("stop"); stop2.setAttribute("stop-color", color2); stop2.setAttribute("offset", "100%"); elt.appendChild(stop1); elt.appendChild(stop2); defs.appendChild(elt); } return id; } public final void setFillColor(String fill) { this.fill = fill == null ? "none" : fill; } public final void setStrokeColor(String stroke) { this.stroke = stroke == null ? "none" : stroke; } public final void setStrokeWidth(double strokeWidth, String strokeDasharray) { this.strokeWidth = "" + (scale * strokeWidth); this.strokeDasharray = strokeDasharray; } public void closeLink() { if (pendingLink2.size() > 0) { final Element element = pendingLink2.get(0); pendingLink2.remove(0); getG().appendChild(element); } } private final List pendingLink2 = new ArrayList(); public void openLink(String url, String title, String target) { if (url == null) { throw new IllegalArgumentException(); } if (pendingLink2.size() > 0) { closeLink(); } pendingLink2.add(0, (Element) document.createElement("a")); pendingLink2.get(0).setAttribute("target", target); pendingLink2.get(0).setAttribute("xlink:href", url); pendingLink2.get(0).setAttribute("xlink:type", "simple"); pendingLink2.get(0).setAttribute("xlink:actuate", "onRequest"); pendingLink2.get(0).setAttribute("xlink:show", "new"); if (title == null) { pendingLink2.get(0).setAttribute("xlink:title", url); } else { title = title.replaceAll("\\\\n", "\n"); pendingLink2.get(0).setAttribute("xlink:title", title); } } public final Element getG() { if (pendingLink2.size() == 0) { return gRoot; } return pendingLink2.get(0); } public void svgRectangle(double x, double y, double width, double height, double rx, double ry, double deltaShadow, String id) { if (height <= 0 || width <= 0) { throw new IllegalArgumentException(); } manageShadow(deltaShadow); if (hidden == false) { final Element elt = createRectangleInternal(x, y, width, height); addFilterShadowId(elt, deltaShadow); if (rx > 0 && ry > 0) { elt.setAttribute("rx", format(rx)); elt.setAttribute("ry", format(ry)); } if (id != null) { elt.setAttribute("id", id); } getG().appendChild(elt); } ensureVisible(x + width + 2 * deltaShadow, y + height + 2 * deltaShadow); } private Element createRectangleInternal(double x, double y, double width, double height) { final Element elt = (Element) document.createElement("rect"); elt.setAttribute("x", format(x)); elt.setAttribute("y", format(y)); elt.setAttribute("width", format(width)); elt.setAttribute("height", format(height)); elt.setAttribute("fill", fill); elt.setAttribute("style", getStyle()); return elt; } public void svgLine(double x1, double y1, double x2, double y2, double deltaShadow) { manageShadow(deltaShadow); if (hidden == false) { final Element elt = (Element) document.createElement("line"); elt.setAttribute("x1", format(x1)); elt.setAttribute("y1", format(y1)); elt.setAttribute("x2", format(x2)); elt.setAttribute("y2", format(y2)); elt.setAttribute("style", getStyle()); addFilterShadowId(elt, deltaShadow); getG().appendChild(elt); } ensureVisible(x1 + 2 * deltaShadow, y1 + 2 * deltaShadow); ensureVisible(x2 + 2 * deltaShadow, y2 + 2 * deltaShadow); } private String getStyle() { return getStyleInternal(stroke, strokeWidth, strokeDasharray); } private static String getStyleInternal(String color, String strokeWidth, String strokeDasharray) { final StringBuilder style = new StringBuilder("stroke: " + color + "; stroke-width: " + strokeWidth + ";"); if (strokeDasharray != null) { style.append(" stroke-dasharray: " + strokeDasharray + ";"); } return style.toString(); } public void svgPolygon(double deltaShadow, double... points) { manageShadow(deltaShadow); if (hidden == false) { final Element elt = (Element) document.createElement("polygon"); final StringBuilder sb = new StringBuilder(); for (double coord : points) { if (sb.length() > 0) { sb.append(","); } sb.append(format(coord)); } elt.setAttribute("points", sb.toString()); elt.setAttribute("fill", fill); elt.setAttribute("style", getStyle()); addFilterShadowId(elt, deltaShadow); getG().appendChild(elt); } for (int i = 0; i < points.length; i += 2) { ensureVisible(points[i] + 2 * deltaShadow, points[i + 1] + 2 * deltaShadow); } } public void text(String text, double x, double y, String fontFamily, int fontSize, String fontWeight, String fontStyle, String textDecoration, double textLength, Map attributes, String textBackColor) { if (hidden == false) { final Element elt = (Element) document.createElement("text"); // required for web-kit based browsers // elt.setAttribute("text-rendering", "geometricPrecision"); elt.setAttribute("x", format(x)); elt.setAttribute("y", format(y)); elt.setAttribute("fill", fill); elt.setAttribute("font-size", format(fontSize)); // elt.setAttribute("text-anchor", "middle"); elt.setAttribute("lengthAdjust", "spacingAndGlyphs"); elt.setAttribute("textLength", format(textLength)); if (fontWeight != null) { elt.setAttribute("font-weight", fontWeight); } if (fontStyle != null) { elt.setAttribute("font-style", fontStyle); } if (textDecoration != null) { elt.setAttribute("text-decoration", textDecoration); } if (fontFamily != null) { // http://plantuml.sourceforge.net/qa/?qa=5432/svg-monospace-output-has-wrong-font-family if ("monospaced".equalsIgnoreCase(fontFamily)) { fontFamily = "monospace"; } elt.setAttribute("font-family", fontFamily); if (fontFamily.equalsIgnoreCase("monospace") || fontFamily.equalsIgnoreCase("courier")) { text = text.replace(' ', (char) 160); } } if (textBackColor != null) { final String backFilterId = getFilterBackColor(textBackColor); elt.setAttribute("filter", "url(#" + backFilterId + ")"); } for (Map.Entry ent : attributes.entrySet()) { elt.setAttribute(ent.getKey(), ent.getValue()); } elt.setTextContent(text); getG().appendChild(elt); if (textDecoration != null && textDecoration.contains("underline")) { final double delta = 2; final Element elt2 = (Element) document.createElement("line"); elt2.setAttribute("x1", format(x)); elt2.setAttribute("y1", format(y + delta)); elt2.setAttribute("x2", format(x + textLength)); elt2.setAttribute("y2", format(y + delta)); elt2.setAttribute("style", getStyleInternal(fill, "1.0", null)); getG().appendChild(elt2); } } ensureVisible(x, y); ensureVisible(x + textLength, y); } private final Map filterBackColor = new HashMap(); private String getIdFilterBackColor(String color) { String result = filterBackColor.get(color); if (result == null) { result = filterUid + filterBackColor.size(); filterBackColor.put(color, result); } return result; } private String getFilterBackColor(String color) { String id = filterBackColor.get(color); if (id != null) { return id; } id = getIdFilterBackColor(color); final Element filter = (Element) document.createElement("filter"); filter.setAttribute("id", id); filter.setAttribute("x", "0"); filter.setAttribute("y", "0"); filter.setAttribute("width", "1"); filter.setAttribute("height", "1"); addFilter(filter, "feFlood", "flood-color", color, "result", "flood"); addFilter(filter, "feComposite", "in", "SourceGraphic", "in2", "flood", "operator", "over"); defs.appendChild(filter); return id; } private Transformer getTransformer() throws TransformerException { // Get a TransformerFactory object. TransformerFactory xformFactory = null; try { final Class factoryClass = Class .forName("com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl"); xformFactory = (TransformerFactory) factoryClass.newInstance(); } catch (Exception e) { xformFactory = TransformerFactory.newInstance(); } Log.info("TransformerFactory=" + xformFactory.getClass()); // Get an XSL Transformer object. final Transformer transformer = xformFactory.newTransformer(); Log.info("Transformer=" + transformer.getClass()); // // Sets the standalone property in the first line of // // the output file. transformer.setOutputProperty(OutputKeys.STANDALONE, "no"); // transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, "SVG 1.1"); // transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); return transformer; } public void createXml(OutputStream os) throws TransformerException, IOException { if (images.size() == 0) { createXmlInternal(os); return; } final ByteArrayOutputStream baos = new ByteArrayOutputStream(); createXmlInternal(baos); String s = new String(baos.toByteArray()); for (Map.Entry ent : images.entrySet()) { final String k = "\\<" + ent.getKey() + "/\\>"; s = s.replaceAll(k, ent.getValue()); } os.write(s.getBytes()); } private void createXmlInternal(OutputStream os) throws TransformerException { // // Add lines // for (Line l : lines) { // l.drawNow(); // } // Get a DOMSource object that represents the // Document object final DOMSource source = new DOMSource(document); final int maxXscaled = (int) (maxX * scale); final int maxYscaled = (int) (maxY * scale); String style = "width:" + maxXscaled + "px;height:" + maxYscaled + "px;"; if (backcolor != null) { style += "background:" + backcolor + ";"; } root.setAttribute("style", style); root.setAttribute("width", format(maxX) + "px"); root.setAttribute("height", format(maxY) + "px"); root.setAttribute("viewBox", "0 0 " + maxXscaled + " " + maxYscaled); root.setAttribute("zoomAndPan", "magnify"); root.setAttribute("preserveAspectRatio", "none"); root.setAttribute("contentScriptType", "application/ecmascript"); root.setAttribute("contentStyleType", "text/css"); if (pendingBackground != null) { pendingBackground.setAttribute("width", format(maxX)); pendingBackground.setAttribute("height", format(maxY)); } // Get a StreamResult object that points to the // screen. Then transform the DOM sending XML to // the screen. final StreamResult scrResult = new StreamResult(os); getTransformer().transform(source, scrResult); } public void svgPath(double x, double y, UPath path, double deltaShadow) { manageShadow(deltaShadow); ensureVisible(x, y); final StringBuilder sb = new StringBuilder(); for (USegment seg : path) { final USegmentType type = seg.getSegmentType(); final double coord[] = seg.getCoord(); if (type == USegmentType.SEG_MOVETO) { sb.append("M" + format(coord[0] + x) + "," + format(coord[1] + y) + " "); ensureVisible(coord[0] + x + 2 * deltaShadow, coord[1] + y + 2 * deltaShadow); } else if (type == USegmentType.SEG_LINETO) { sb.append("L" + format(coord[0] + x) + "," + format(coord[1] + y) + " "); ensureVisible(coord[0] + x + 2 * deltaShadow, coord[1] + y + 2 * deltaShadow); } else if (type == USegmentType.SEG_QUADTO) { sb.append("Q" + format(coord[0] + x) + "," + format(coord[1] + y) + " " + format(coord[2] + x) + "," + format(coord[3] + y) + " "); ensureVisible(coord[0] + x + 2 * deltaShadow, coord[1] + y + 2 * deltaShadow); ensureVisible(coord[2] + x + 2 * deltaShadow, coord[3] + y + 2 * deltaShadow); } else if (type == USegmentType.SEG_CUBICTO) { sb.append("C" + format(coord[0] + x) + "," + format(coord[1] + y) + " " + format(coord[2] + x) + "," + format(coord[3] + y) + " " + format(coord[4] + x) + "," + format(coord[5] + y) + " "); ensureVisible(coord[0] + x + 2 * deltaShadow, coord[1] + y + 2 * deltaShadow); ensureVisible(coord[2] + x + 2 * deltaShadow, coord[3] + y + 2 * deltaShadow); ensureVisible(coord[4] + x + 2 * deltaShadow, coord[5] + y + 2 * deltaShadow); } else if (type == USegmentType.SEG_ARCTO) { sb.append("A" + format(coord[0]) + "," + format(coord[1]) + " " + format(coord[2]) + "," + format(coord[3]) + " " + format(coord[4]) + "," + format(coord[5] + x) + "," + format(coord[6] + y) + " "); ensureVisible(coord[5] + coord[0] + x + 2 * deltaShadow, coord[6] + coord[1] + y + 2 * deltaShadow); } else if (type == USegmentType.SEG_CLOSE) { // Nothing } else { Log.println("unknown " + seg); } } if (hidden == false) { final Element elt = (Element) document.createElement("path"); elt.setAttribute("d", sb.toString()); elt.setAttribute("style", getStyle()); elt.setAttribute("fill", fill); final String id = path.getComment(); if (id != null) { elt.setAttribute("id", id); } addFilterShadowId(elt, deltaShadow); getG().appendChild(elt); } } private void addFilterShadowId(final Element elt, double deltaShadow) { if (deltaShadow > 0) { elt.setAttribute("filter", "url(#" + shadowId + ")"); } } private StringBuilder currentPath = null; public void newpath() { currentPath = new StringBuilder(); } public void moveto(double x, double y) { currentPath.append("M" + format(x) + "," + format(y) + " "); ensureVisible(x, y); } public void lineto(double x, double y) { currentPath.append("L" + format(x) + "," + format(y) + " "); ensureVisible(x, y); } public void closepath() { currentPath.append("Z "); } public void curveto(double x1, double y1, double x2, double y2, double x3, double y3) { currentPath.append("C" + format(x1) + "," + format(y1) + " " + format(x2) + "," + format(y2) + " " + format(x3) + "," + format(y3) + " "); ensureVisible(x1, y1); ensureVisible(x2, y2); ensureVisible(x3, y3); } public void quadto(double x1, double y1, double x2, double y2) { currentPath.append("Q" + format(x1) + "," + format(y1) + " " + format(x2) + "," + format(y2) + " "); ensureVisible(x1, y1); ensureVisible(x2, y2); } private String format(double x) { return EpsGraphics.format(x * scale); } public void fill(int windingRule) { if (hidden == false) { final Element elt = (Element) document.createElement("path"); elt.setAttribute("d", currentPath.toString()); // elt elt.setAttribute("style", getStyle()); getG().appendChild(elt); } currentPath = null; } public void svgImage(BufferedImage image, double x, double y) throws IOException { if (hidden == false) { final Element elt = (Element) document.createElement("image"); elt.setAttribute("width", format(image.getWidth())); elt.setAttribute("height", format(image.getHeight())); elt.setAttribute("x", format(x)); elt.setAttribute("y", format(y)); final String s = toBase64(image); elt.setAttribute("xlink:href", "data:image/png;base64," + s); getG().appendChild(elt); } ensureVisible(x, y); ensureVisible(x + image.getWidth(), y + image.getHeight()); } private final Map images = new HashMap(); public void svgImage(SvgString image, double x, double y) { if (hidden == false) { String svg = manageScale(image); final String pos = ""; svg = pos + svg.substring(5); final String key = "imagesvginlined" + images.size(); final Element elt = (Element) document.createElement(key); getG().appendChild(elt); images.put(key, svg); } ensureVisible(x, y); ensureVisible(x + image.getData("width"), y + image.getData("height")); } private String manageScale(SvgString svg) { final double svgScale = svg.getScale(); if (svgScale * scale == 1) { return svg.getSvg(); } final String s1 = "\\ final Element filter = (Element) document.createElement("filter"); filter.setAttribute("id", shadowId); filter.setAttribute("x", "-1"); filter.setAttribute("y", "-1"); filter.setAttribute("width", "300%"); filter.setAttribute("height", "300%"); addFilter(filter, "feGaussianBlur", "result", "blurOut", "stdDeviation", "" + (2 * scale)); addFilter(filter, "feColorMatrix", "type", "matrix", "in", "blurOut", "result", "blurOut2", "values", "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"); addFilter(filter, "feOffset", "result", "blurOut3", "in", "blurOut2", "dx", "" + (4 * scale), "dy", "" + (4 * scale)); addFilter(filter, "feBlend", "in", "SourceGraphic", "in2", "blurOut3", "mode", "normal"); defs.appendChild(filter); } withShadow = true; } } private void addFilter(Element filter, String name, String... data) { final Element elt = (Element) document.createElement(name); for (int i = 0; i < data.length; i += 2) { elt.setAttribute(data[i], data[i + 1]); } filter.appendChild(elt); } private boolean hidden; public void setHidden(boolean hidden) { this.hidden = hidden; } public void addComment(String comment) { final Comment commentElement = document.createComment(comment); getG().appendChild(commentElement); } } �����������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/swing/����������������������������������������������0000775�0000000�0000000�00000000000�13126503031�0022541�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plantuml-1.2017.15/src/net/sourceforge/plantuml/swing/AboutWindow.java������������������������������0000664�0000000�0000000�00000011220�13126503031�0025642�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.swing; import java.awt.BorderLayout; import java.awt.Font; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.List; import javax.swing.BorderFactory; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.WindowConstants; import javax.swing.border.BevelBorder; import javax.swing.border.CompoundBorder; import net.sourceforge.plantuml.version.PSystemVersion; import net.sourceforge.plantuml.version.Version; class AboutWindow extends JFrame { /* * - the PlantUML version - the Dot version - the PlantUML authors - the PlantUML license */ public AboutWindow() { super(); setIconImage(PSystemVersion.getPlantumlSmallIcon2()); this.setTitle("About PlantUML (" + Version.versionString() + ")"); final JPanel panel1 = new JPanel(new GridLayout(2, 1)); panel1.add(getInfoVersion()); panel1.add(getInfoAuthors()); getContentPane().add(getNorthLabel(), BorderLayout.NORTH); getContentPane().add(panel1, BorderLayout.CENTER); getContentPane().add(getSouthLabel(), BorderLayout.SOUTH); pack(); this.setLocationRelativeTo(this.getParent()); setVisible(true); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); } private JComponent getNorthLabel() { final JLabel text = new JLabel("PlantUML (" + Version.versionString() + ")"); final Font font = text.getFont().deriveFont(Font.BOLD, (float) 20.0); text.setFont(font); final JPanel ptext = new JPanel(); ptext.add(text); final JLabel icon = new JLabel(new ImageIcon(PSystemVersion.getPlantumlImage())); final JPanel result = new JPanel(new BorderLayout()); result.add(ptext, BorderLayout.CENTER); result.add(icon, BorderLayout.EAST); return result; } private JComponent getSouthLabel() { final JPanel result = new JPanel(); final JButton license = new JButton("License"); license.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { new LicenseWindow(); } }); final JButton ok = new JButton("OK"); ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { dispose(); } }); result.add(license); result.add(ok); return result; } private JComponent getInfoVersion() { final PSystemVersion p1 = PSystemVersion.createShowVersion(); return getJComponent(skip(p1.getLines())); } private JComponent getInfoAuthors() { final PSystemVersion p1 = PSystemVersion.createShowAuthors(); return getJComponent(skip(p1.getLines())); } private List skip(List lines) { return lines.subList(2, lines.size()); } private JComponent getJComponent(List lines) { final StringBuilder sb = new StringBuilder(""); for (String s : lines) { sb.append(s + "
    "); sb.append("
    "); } sb.append(""); final JEditorPane text = new JEditorPane("text/html", sb.toString()); text.setEditable(false); CompoundBorder border = new CompoundBorder(BorderFactory.createEtchedBorder(BevelBorder.RAISED), BorderFactory.createEmptyBorder(5, 5, 5, 5)); border = new CompoundBorder(BorderFactory.createMatteBorder(5, 5, 5, 5, getBackground()), border); text.setBorder(border); return text; } public static void main(String arg[]) { new AboutWindow(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/swing/ImageHelper.java000066400000000000000000000133361312650303100255740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Zane D. Purvis * * */ package net.sourceforge.plantuml.swing; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.Image; import java.awt.RenderingHints; import java.awt.Transparency; import java.awt.image.BufferedImage; /** * A collection of methods to help with processing images. A majority of this code was originally found online. */ public class ImageHelper { /** * Returns a scaled instance of a {@code BufferedImage}. * * Modified from: https://today.java.net/pub/a/today/2007/04/03/perils-of-image-getscaledinstance.html * * @param img * the original image to be scaled * @param targetDim * the desired dimensions of the scaled instance, in pixels * @param hint * RenderingHints used when scaling the image * @param higherQuality * if true, this method will use a multi-step scaling technique that provides higher quality than the * usual one-step technique (only useful in downscaling cases, targetDim is smaller than the original * dimensions, and generally only when the {@code BILINEAR} hint is specified) * @return a scaled version of the original {@code BufferedImage} */ public static BufferedImage getScaledInstance(BufferedImage img, Dimension targetDim, RenderingHints hints, boolean higherQuality) { final int targetWidth = targetDim.width; final int targetHeight = targetDim.height; final int type = (img.getTransparency() == Transparency.OPAQUE) ? BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB; BufferedImage ret = (BufferedImage) img; int w; int h; if (higherQuality) { // Use multi-step technique: start with original size, then // scale down in multiple passes with drawImage() // until the target size is reached w = img.getWidth(); h = img.getHeight(); } else { // Use one-step technique: scale directly from original // size to target size with a single drawImage() call w = targetWidth; h = targetHeight; } do { if (higherQuality && w > targetWidth) { w /= 2; if (w < targetWidth) { w = targetWidth; } } if (higherQuality && h > targetHeight) { h /= 2; if (h < targetHeight) { h = targetHeight; } } final BufferedImage tmp = new BufferedImage(w, h, type); final Graphics2D g2 = tmp.createGraphics(); g2.setRenderingHints(hints); g2.drawImage(ret, 0, 0, w, h, null); g2.dispose(); ret = tmp; } while (w != targetWidth || h != targetHeight); return ret; } /** * Converts an Image to a BufferedImage. * * From: http://stackoverflow.com/questions/13605248/java-converting-image-to-bufferedimage */ public static BufferedImage toBufferedImage(Image img) { if (img instanceof BufferedImage) { return (BufferedImage) img; } // Create a buffered image with transparency final BufferedImage bimage = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_ARGB); // Draw the image on to the buffered image final Graphics2D bGr = bimage.createGraphics(); bGr.drawImage(img, 0, 0, null); bGr.dispose(); return bimage; } /** * Calculates the dimensions of a scaled image given the dimensions of an image and the area it is to be drawn in * while preserving aspect ratio. * * From: http://stackoverflow.com/questions/10245220/java-image-resize-maintain-aspect-ratio * * @param imgSize * dimensions of the original image. * @param boundary * dimensions of the area the image is to be drawn in. */ public static Dimension getScaledDimension(Dimension imgSize, Dimension boundary) { final int originalWidth = imgSize.width; final int originaHeight = imgSize.height; final int boundWidth = boundary.width; final int boundHeight = boundary.height; int newWidth = originalWidth; int newHeight = originaHeight; // first check if we need to scale width if (originalWidth > boundWidth) { // scale width to fit newWidth = boundWidth; // scale height to maintain aspect ratio newHeight = (newWidth * originaHeight) / originalWidth; } // then check if we need to scale even with the new height if (newHeight > boundHeight) { // scale height to fit instead newHeight = boundHeight; // scale width to maintain aspect ratio newWidth = (newHeight * originalWidth) / originaHeight; } return new Dimension(newWidth, newHeight); } public static Dimension getScaledDimension(Dimension dim, double zoom) { return new Dimension((int) (dim.getWidth() * zoom), (int) (dim.getHeight() * zoom)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/swing/ImageWindow2.java000066400000000000000000000326151312650303100257070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.swing; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Image; import java.awt.RenderingHints; import java.awt.Toolkit; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionAdapter; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.prefs.Preferences; import javax.imageio.ImageIO; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollBar; import javax.swing.JScrollPane; import javax.swing.ListModel; import javax.swing.SwingUtilities; import javax.swing.WindowConstants; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.GeneratedImage; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.version.PSystemVersion; class ImageWindow2 extends JFrame { private final static Preferences prefs = Preferences.userNodeForPackage(ImageWindow2.class); private final static String KEY_ZOOM_FIT = "zoomfit"; private SimpleLine2 simpleLine2; private final JScrollPane scrollPane; private final JButton next = new JButton("Next"); private final JButton copy = new JButton("Copy"); private final JButton previous = new JButton("Previous"); private final JCheckBox zoomFitButt = new JCheckBox("Zoom fit"); private final JButton zoomMore = new JButton("+"); private final JButton zoomLess = new JButton("-"); private final MainWindow2 main; private final ListModel listModel; private int index; private int zoomFactor = 0; private enum SizeMode { FULL_SIZE, ZOOM_FIT }; private SizeMode sizeMode = SizeMode.FULL_SIZE; private int startX, startY; public ImageWindow2(SimpleLine2 simpleLine, final MainWindow2 main, ListModel listModel, int index) { super(simpleLine.toString()); setIconImage(PSystemVersion.getPlantumlSmallIcon2()); this.simpleLine2 = simpleLine; this.listModel = listModel; this.index = index; this.main = main; final JPanel north = new JPanel(); north.add(previous); north.add(copy); north.add(next); north.add(zoomFitButt); north.add(zoomMore); north.add(zoomLess); copy.setFocusable(false); copy.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { copy(); } }); next.setFocusable(false); next.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { next(); } }); previous.setFocusable(false); previous.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { previous(); } }); zoomFitButt.setFocusable(false); zoomFitButt.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { zoomFit(); } }); zoomMore.setFocusable(false); zoomMore.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { zoomFactor++; refreshImage(false); } }); zoomLess.setFocusable(false); zoomLess.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { zoomFactor--; refreshImage(false); } }); scrollPane = new JScrollPane(buildScrollablePicture()); getContentPane().add(north, BorderLayout.NORTH); getContentPane().add(scrollPane, BorderLayout.CENTER); setSize(640, 400); this.setLocationRelativeTo(this.getParent()); setVisible(true); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { super.windowClosing(e); main.closing(ImageWindow2.this); } }); this.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentResized(java.awt.event.ComponentEvent e) { super.componentResized(e); refreshImage(false); } }); final boolean zoomChecked = prefs.getBoolean(KEY_ZOOM_FIT, false); zoomFitButt.setSelected(zoomChecked); if (zoomChecked) { sizeMode = SizeMode.ZOOM_FIT; } this.setFocusable(true); this.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent evt) { if (evt.isControlDown() && evt.getKeyCode() == KeyEvent.VK_RIGHT) { next(); } else if (evt.isControlDown() && evt.getKeyCode() == KeyEvent.VK_LEFT) { previous(); } else if (evt.isAltDown() && evt.getKeyCode() == KeyEvent.VK_RIGHT) { next(); } else if (evt.isAltDown() && evt.getKeyCode() == KeyEvent.VK_LEFT) { previous(); } else if (evt.getKeyCode() == KeyEvent.VK_RIGHT) { imageRight(); } else if (evt.getKeyCode() == KeyEvent.VK_LEFT) { imageLeft(); } else if (evt.getKeyCode() == KeyEvent.VK_DOWN) { imageDown(); } else if (evt.getKeyCode() == KeyEvent.VK_UP) { imageUp(); } else if (evt.getKeyCode() == KeyEvent.VK_C) { copy(); } else if (evt.getKeyCode() == KeyEvent.VK_Z) { zoomFitButt.setSelected(!zoomFitButt.isSelected()); zoomFit(); } } }); } private void next() { index++; updateSimpleLine(); } private void previous() { index--; updateSimpleLine(); } private void imageDown() { final JScrollBar bar = scrollPane.getVerticalScrollBar(); bar.setValue(bar.getValue() + bar.getBlockIncrement()); } private void imageUp() { final JScrollBar bar = scrollPane.getVerticalScrollBar(); bar.setValue(bar.getValue() - bar.getBlockIncrement()); } private void imageLeft() { final JScrollBar bar = scrollPane.getHorizontalScrollBar(); bar.setValue(bar.getValue() - bar.getBlockIncrement()); } private void imageRight() { final JScrollBar bar = scrollPane.getHorizontalScrollBar(); bar.setValue(bar.getValue() + bar.getBlockIncrement()); } private void zoomFit() { final boolean selected = zoomFitButt.isSelected(); prefs.putBoolean(KEY_ZOOM_FIT, selected); zoomFactor = 0; if (selected) { sizeMode = SizeMode.ZOOM_FIT; } else { sizeMode = SizeMode.FULL_SIZE; } refreshImage(false); } private void updateSimpleLine() { if (index < 0) { index = 0; } if (index > listModel.getSize() - 1) { index = listModel.getSize() - 1; } simpleLine2 = (SimpleLine2) listModel.getElementAt(index); setTitle(simpleLine2.toString()); refreshImage(false); } private void refreshSimpleLine() { for (SimpleLine2 line : main.getCurrentDirectoryListing2()) { if (line.getFile().equals(simpleLine2.getFile())) { simpleLine2 = line; setTitle(simpleLine2.toString()); } } } private ScrollablePicture buildScrollablePicture() { final GeneratedImage generatedImage = simpleLine2.getGeneratedImage(); if (generatedImage == null) { return null; } final File png = generatedImage.getPngFile(); BufferedImage image = null; try { image = ImageIO.read(new File(png.getAbsolutePath())); if (sizeMode == SizeMode.ZOOM_FIT) { final Dimension imageDim = new Dimension(image.getWidth(), image.getHeight()); final Dimension newImgDim = ImageHelper .getScaledDimension(imageDim, scrollPane.getViewport().getSize()); image = ImageHelper.getScaledInstance(image, newImgDim, getHints(), true); } else if (zoomFactor != 0) { final Dimension imageDim = new Dimension(image.getWidth(), image.getHeight()); final Dimension newImgDim = ImageHelper.getScaledDimension(imageDim, getZoom()); image = ImageHelper.getScaledInstance(image, newImgDim, getHints(), false); } } catch (IOException ex) { final String msg = "Error reading file: " + ex.toString(); final TextBlockBackcolored error = GraphicStrings.createForError(Arrays.asList(msg), false); final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, error.getBackcolor(), null, null, 0, 0, null, false); imageBuilder.setUDrawable(error); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { imageBuilder.writeImageTOBEMOVED(new FileFormatOption(FileFormat.PNG), 42, baos); baos.close(); image = ImageIO.read(new ByteArrayInputStream(baos.toByteArray())); } catch (IOException e) { e.printStackTrace(); } } final ImageIcon imageIcon = new ImageIcon(image, simpleLine2.toString()); final ScrollablePicture scrollablePicture = new ScrollablePicture(imageIcon, 1); scrollablePicture.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent me) { super.mousePressed(me); startX = me.getX(); startY = me.getY(); } }); scrollablePicture.addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(MouseEvent me) { super.mouseDragged(me); final int diffX = me.getX() - startX; final int diffY = me.getY() - startY; final JScrollBar hbar = scrollPane.getHorizontalScrollBar(); hbar.setValue(hbar.getValue() - diffX); final JScrollBar vbar = scrollPane.getVerticalScrollBar(); vbar.setValue(vbar.getValue() - diffY); } }); return scrollablePicture; } private RenderingHints getHints() { final RenderingHints hints = new RenderingHints(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); hints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); return hints; } private double getZoom() { // if (zoomFactor <= -10) { // return 0.05; // } // return 1.0 + zoomFactor / 10.0; return Math.pow(1.1, zoomFactor); } private void copy() { final GeneratedImage generatedImage = simpleLine2.getGeneratedImage(); if (generatedImage == null) { return; } final File png = generatedImage.getPngFile(); final Image image = Toolkit.getDefaultToolkit().createImage(png.getAbsolutePath()); final ImageSelection imgSel = new ImageSelection(image); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(imgSel, null); } public SimpleLine2 getSimpleLine() { return simpleLine2; } private int v1; private int v2; public void refreshImage(boolean external) { final JScrollBar bar1 = scrollPane.getVerticalScrollBar(); final JScrollBar bar2 = scrollPane.getHorizontalScrollBar(); if (external && isError() == false) { v1 = bar1.getValue(); v2 = bar2.getValue(); } scrollPane.setViewportView(buildScrollablePicture()); force(); if (external) { SwingUtilities.invokeLater(new Runnable() { public void run() { refreshSimpleLine(); if (isError() == false) { bar1.setValue(v1); bar2.setValue(v2); } } }); } } private boolean isError() { return simpleLine2.getGeneratedImage() != null && simpleLine2.getGeneratedImage().lineErrorRaw() != -1; } private void force() { // setVisible(true); repaint(); // validate(); // getContentPane().validate(); // getContentPane().setVisible(true); // getContentPane().repaint(); // scrollPane.validate(); // scrollPane.setVisible(true); // scrollPane.repaint(); } } // This class is used to hold an image while on the clipboard. class ImageSelection implements Transferable { private Image image; public ImageSelection(Image image) { this.image = image; } // Returns supported flavors public DataFlavor[] getTransferDataFlavors() { return new DataFlavor[] { DataFlavor.imageFlavor }; } // Returns true if flavor is supported public boolean isDataFlavorSupported(DataFlavor flavor) { return DataFlavor.imageFlavor.equals(flavor); } // Returns image public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { if (!DataFlavor.imageFlavor.equals(flavor)) { throw new UnsupportedFlavorException(flavor); } return image; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/swing/LicenseWindow.java000066400000000000000000000106411312650303100261600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.swing; import java.awt.BorderLayout; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.List; import javax.swing.BorderFactory; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.WindowConstants; import javax.swing.border.BevelBorder; import javax.swing.border.CompoundBorder; import net.sourceforge.plantuml.version.License; import net.sourceforge.plantuml.version.PSystemVersion; import net.sourceforge.plantuml.version.Version; class LicenseWindow extends JFrame { /* * - the PlantUML version - the Dot version - the PlantUML authors - the PlantUML license */ public LicenseWindow() { super(); setIconImage(PSystemVersion.getPlantumlSmallIcon2()); this.setTitle("Licence PlantUML (" + Version.versionString() + ")"); getContentPane().add(getNorthLabel(), BorderLayout.NORTH); final List list = new ArrayList(License.getCurrent().getText()); getContentPane().add(getJComponent(list), BorderLayout.CENTER); getContentPane().add(getSouthLabel(), BorderLayout.SOUTH); setSize(800, 600); this.setLocationRelativeTo(this.getParent()); setVisible(true); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); } private JComponent getNorthLabel() { final JLabel text = new JLabel("PlantUML (" + Version.versionString() + ")"); final Font font = text.getFont().deriveFont(Font.BOLD, (float) 20.0); text.setFont(font); final JPanel ptext = new JPanel(); ptext.add(text); final JLabel icon = new JLabel(new ImageIcon(PSystemVersion.getPlantumlImage())); final JPanel result = new JPanel(new BorderLayout()); result.add(ptext, BorderLayout.CENTER); result.add(icon, BorderLayout.EAST); return result; } private JComponent getSouthLabel() { final JPanel result = new JPanel(); final JButton ok = new JButton("OK"); ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { dispose(); } }); result.add(ok); return result; } private JComponent getJComponent(List lines) { final StringBuilder sb = new StringBuilder(""); for (String s : lines) { sb.append(s + "
    "); sb.append("
    "); } sb.append(""); final JEditorPane text = new JEditorPane("text/html", sb.toString()); text.setEditable(false); CompoundBorder border = new CompoundBorder(BorderFactory.createEtchedBorder(BevelBorder.RAISED), BorderFactory.createEmptyBorder(5, 5, 5, 5)); border = new CompoundBorder(BorderFactory.createMatteBorder(5, 5, 5, 5, getBackground()), border); text.setBorder(border); final JScrollPane jScrollPane = new JScrollPane(text, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { jScrollPane.getVerticalScrollBar().setValue(0); } }); return jScrollPane; } public static void main(String arg[]) { new LicenseWindow(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/swing/MainWindow2.java000066400000000000000000000304321312650303100255440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.swing; import java.awt.BorderLayout; import java.awt.Frame; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.Vector; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.prefs.Preferences; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JFileChooser; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextField; import javax.swing.ListModel; import javax.swing.SwingUtilities; import javax.swing.Timer; import javax.swing.border.CompoundBorder; import net.sourceforge.plantuml.DirWatcher2; import net.sourceforge.plantuml.GeneratedImage; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.Option; import net.sourceforge.plantuml.version.PSystemVersion; public class MainWindow2 extends JFrame { final private static Preferences prefs = Preferences.userNodeForPackage(MainWindow2.class); final private static String KEY_DIR = "cur"; final private static String KEY_PATTERN = "pat"; private final JList jList1 = new JList(); private final JScrollPane scrollPane; private final JButton changeDirButton = new JButton("Change Directory"); private final JTextField extensions = new JTextField(); private final int period = 300; final private List currentDirectoryListing2 = new ArrayList(); final private Set openWindows2 = new HashSet(); final private Option option; private DirWatcher2 dirWatcher; private String getExtensions() { return prefs.get(KEY_PATTERN, getDefaultFileExtensions()); } private String getDefaultFileExtensions() { return "txt, tex, java, htm, html, c, h, cpp, apt, pu, puml"; } private void changeExtensions(String ext) { if (ext.equals(getExtensions())) { return; } final Pattern p = Pattern.compile("\\w+"); final Matcher m = p.matcher(ext); final StringBuilder sb = new StringBuilder(); while (m.find()) { final String value = m.group(); if (sb.length() > 0) { sb.append(", "); } sb.append(value); } ext = sb.toString(); if (ext.length() == 0) { ext = getDefaultFileExtensions(); } extensions.setText(ext); prefs.put(KEY_PATTERN, ext); changeDir(dirWatcher.getDir()); } private String getRegexpPattern(String ext) { final Pattern p = Pattern.compile("\\w+"); final Matcher m = p.matcher(ext); final StringBuilder filePattern = new StringBuilder("(?i)^.*\\.("); while (m.find()) { final String value = m.group(); if (filePattern.toString().endsWith("(") == false) { filePattern.append("|"); } filePattern.append(value); } if (filePattern.toString().endsWith("(") == false) { filePattern.append(")$"); return filePattern.toString(); } return Option.getPattern(); } public MainWindow2(Option option, File arg) { super(getDirectory(arg).getAbsolutePath()); final File dir = getDirectory(arg); setIconImage(PSystemVersion.getPlantumlSmallIcon2()); this.option = option; dirWatcher = new DirWatcher2(dir, option, getRegexpPattern(getExtensions())); Log.info("Showing MainWindow"); scrollPane = new JScrollPane(jList1); scrollPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); final JPanel south = new JPanel(new BorderLayout()); final JLabel labelFileExtensions = new JLabel("File extensions: "); extensions.setText(getExtensions()); labelFileExtensions.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); CompoundBorder border = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10), BorderFactory.createEtchedBorder()); border = BorderFactory.createCompoundBorder(border, BorderFactory.createEmptyBorder(5, 5, 5, 5)); south.setBorder(border); south.add(labelFileExtensions, BorderLayout.WEST); south.add(extensions, BorderLayout.CENTER); south.add(changeDirButton, BorderLayout.SOUTH); getContentPane().add(south, BorderLayout.SOUTH); getContentPane().add(scrollPane, BorderLayout.CENTER); final MouseListener mouseListener = new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { try { if (e.getClickCount() == 2) { final int index = jList1.locationToIndex(e.getPoint()); doubleClick((SimpleLine2) jList1.getModel().getElementAt(index), jList1.getModel(), index); } } catch (Exception ex) { } } }; jList1.addMouseListener(mouseListener); changeDirButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.err.println("Opening Directory Window"); displayDialogChangeDir(); } }); jList1.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) { final int index = jList1.getSelectedIndex(); doubleClick((SimpleLine2) jList1.getModel().getElementAt(index), jList1.getModel(), index); } } }); extensions.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { changeExtensions(extensions.getText()); } }); extensions.addFocusListener(new FocusListener() { public void focusGained(FocusEvent e) { } public void focusLost(FocusEvent e) { changeExtensions(extensions.getText()); } }); final JMenuBar menuBar = new JMenuBar(); final JMenu mFile = new JMenu("File"); menuBar.add(mFile); setJMenuBar(menuBar); final JMenuItem sprite = new JMenuItem("Open Sprite Window"); mFile.add(sprite); sprite.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new SpriteWindow(); } }); final JMenuItem about = new JMenuItem("About"); mFile.add(about); about.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new AboutWindow(); } }); final JMenuItem exit = new JMenuItem("Exit"); mFile.add(exit); exit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.exit(0); } }); setSize(640, 400); this.setLocationRelativeTo(this.getParent()); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); startTimer(); } private static File getDirectory(File arg) { if (arg != null && arg.exists() && arg.isDirectory()) { return arg; } return new File(prefs.get(KEY_DIR, ".")); } private void startTimer() { Log.info("Init done"); final Timer timer = new Timer(period, new ActionListener() { public void actionPerformed(ActionEvent e) { tick(); } }); timer.setInitialDelay(0); timer.start(); Log.info("Timer started"); } private void displayDialogChangeDir() { final JFileChooser chooser = new JFileChooser(); chooser.setDialogType(JFileChooser.CUSTOM_DIALOG); chooser.setDialogTitle("Directory to watch:"); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); chooser.setAcceptAllFileFilterUsed(false); final String currentPath = prefs.get(KEY_DIR, "."); chooser.setCurrentDirectory(new File(currentPath)); Log.info("Showing OpenDialog"); final int returnVal = chooser.showOpenDialog(this); Log.info("Closing OpenDialog"); if (returnVal == JFileChooser.APPROVE_OPTION) { final File dir = chooser.getSelectedFile(); changeDir(dir); } } private void changeDir(File dir) { prefs.put(KEY_DIR, dir.getAbsolutePath()); dirWatcher.cancel(); dirWatcher = new DirWatcher2(dir, option, getRegexpPattern(getExtensions())); setTitle(dir.getAbsolutePath()); Log.info("Creating DirWatcher"); currentDirectoryListing2.clear(); jList1.setListData(new Vector(currentDirectoryListing2)); jList1.setVisible(true); } private void doubleClick(SimpleLine2 simpleLine, ListModel listModel, int index) { for (ImageWindow2 win : openWindows2) { if (win.getSimpleLine().equals(simpleLine)) { win.setVisible(true); win.setExtendedState(Frame.NORMAL); return; } } if (simpleLine.getGeneratedImage() != null) { openWindows2.add(new ImageWindow2(simpleLine, this, listModel, index)); } } private void tick() { SwingUtilities.invokeLater(new Runnable() { public void run() { try { final boolean changed = refreshDir(); if (changed) { jList1.setListData(new Vector(currentDirectoryListing2)); jList1.setVisible(true); } } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } } }); } private boolean refreshDir() throws IOException, InterruptedException, ExecutionException { final Map>> createdFiles2 = dirWatcher.buildCreatedFiles(); boolean changed = false; for (Map.Entry>> ent : createdFiles2.entrySet()) { final File file = ent.getKey(); removeAllThatUseThisFile(file); final Future> future = ent.getValue(); final SimpleLine2 simpleLine = SimpleLine2.fromFuture(file, future); currentDirectoryListing2.add(simpleLine); changed = true; } for (SimpleLine2 line : new ArrayList(currentDirectoryListing2)) { if (line.pendingAndFinished()) { currentDirectoryListing2.remove(line); changed = true; final Future> future = line.getFuture(); for (GeneratedImage im : future.get()) { mayRefreshImageWindow(im.getPngFile()); final SimpleLine2 simpleLine = SimpleLine2.fromGeneratedImage(line.getFile(), im); currentDirectoryListing2.add(simpleLine); } } } Collections.sort(currentDirectoryListing2); return changed; } private void removeAllThatUseThisFile(File file) { for (final Iterator it = currentDirectoryListing2.iterator(); it.hasNext();) { final SimpleLine2 line = it.next(); if (line.getFile().equals(file)) { it.remove(); } } } private void mayRefreshImageWindow(File pngFile) { for (ImageWindow2 win : openWindows2) { if (win.getSimpleLine().getGeneratedImage() == null) { continue; } if (pngFile.equals(win.getSimpleLine().getGeneratedImage().getPngFile())) { win.refreshImage(true); } } } public void closing(ImageWindow2 imageWindow) { final boolean ok = openWindows2.remove(imageWindow); if (ok == false) { throw new IllegalStateException(); } } public List getCurrentDirectoryListing2() { return Collections.unmodifiableList(currentDirectoryListing2); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/swing/ScrollablePicture.java000066400000000000000000000074461312650303100270350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.swing; import java.awt.Color; import java.awt.Dimension; import java.awt.Rectangle; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.Scrollable; import javax.swing.SwingConstants; class ScrollablePicture extends JLabel implements Scrollable, MouseMotionListener { private int maxUnitIncrement = 1; private boolean missingPicture = false; public ScrollablePicture(ImageIcon i, int m) { super(i); if (i == null) { missingPicture = true; setText("No picture found."); setHorizontalAlignment(CENTER); setOpaque(true); setBackground(Color.white); } maxUnitIncrement = m; // Let the user scroll by dragging to outside the window. setAutoscrolls(true); // enable synthetic drag events addMouseMotionListener(this); // handle mouse drags } // Methods required by the MouseMotionListener interface: public void mouseMoved(MouseEvent e) { } public void mouseDragged(MouseEvent e) { // The user is dragging us, so scroll! Rectangle r = new Rectangle(e.getX(), e.getY(), 1, 1); scrollRectToVisible(r); } @Override public Dimension getPreferredSize() { if (missingPicture) { return new Dimension(320, 480); } else { return super.getPreferredSize(); } } public Dimension getPreferredScrollableViewportSize() { return getPreferredSize(); } public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { // Get the current position. int currentPosition = 0; if (orientation == SwingConstants.HORIZONTAL) { currentPosition = visibleRect.x; } else { currentPosition = visibleRect.y; } // Return the number of pixels between currentPosition // and the nearest tick mark in the indicated direction. if (direction < 0) { int newPosition = currentPosition - (currentPosition / maxUnitIncrement) * maxUnitIncrement; return (newPosition == 0) ? maxUnitIncrement : newPosition; } else { return ((currentPosition / maxUnitIncrement) + 1) * maxUnitIncrement - currentPosition; } } public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) { if (orientation == SwingConstants.HORIZONTAL) { return visibleRect.width - maxUnitIncrement; } else { return visibleRect.height - maxUnitIncrement; } } public boolean getScrollableTracksViewportWidth() { return false; } public boolean getScrollableTracksViewportHeight() { return false; } public void setMaxUnitIncrement(int pixels) { maxUnitIncrement = pixels; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/swing/SimpleLine2.java000066400000000000000000000053111312650303100255270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.swing; import java.io.File; import java.util.List; import java.util.concurrent.Future; import net.sourceforge.plantuml.GeneratedImage; class SimpleLine2 implements Comparable { private final File file; private final GeneratedImage generatedImage; private final Future> future; public static SimpleLine2 fromFuture(File file, Future> future) { return new SimpleLine2(file, null, future); } public static SimpleLine2 fromGeneratedImage(File file, GeneratedImage generatedImage) { return new SimpleLine2(file, generatedImage, null); } private SimpleLine2(File file, GeneratedImage generatedImage, Future> future) { this.generatedImage = generatedImage; this.file = file; this.future = future; } public File getFile() { return file; } public boolean pendingAndFinished() { return generatedImage == null && future.isDone(); } @Override public String toString() { if (generatedImage == null) { return file.getName() + " (...pending...)"; } final StringBuilder sb = new StringBuilder(generatedImage.getPngFile().getName()); sb.append(" "); sb.append(generatedImage.getDescription()); return sb.toString(); } public Future> getFuture() { return future; } public int compareTo(SimpleLine2 other) { return toString().compareTo(other.toString()); } public GeneratedImage getGeneratedImage() { return generatedImage; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/swing/SpriteWindow.java000066400000000000000000000111711312650303100260430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.swing; import java.awt.BorderLayout; import java.awt.Font; import java.awt.Toolkit; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.image.BufferedImage; import java.io.IOException; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.SwingUtilities; import javax.swing.Timer; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.ugraphic.sprite.SpriteGrayLevel; import net.sourceforge.plantuml.ugraphic.sprite.SpriteUtils; import net.sourceforge.plantuml.version.PSystemVersion; public class SpriteWindow extends JFrame { // private final JButton encode = new JButton("Encode"); private final JTextArea area = new JTextArea(); public SpriteWindow() { super("SpriteWindows"); setIconImage(PSystemVersion.getPlantumlSmallIcon2()); // encode.addActionListener(new ActionListener() { // public void actionPerformed(ActionEvent ae) { // encode(); // } // }); area.setFont(new Font("Courier", Font.PLAIN, 14)); area.setText("Copy an image to the clipboard.\nIt will be converted inside this window.\n"); final JScrollPane scroll = new JScrollPane(area); // getContentPane().add(encode, BorderLayout.SOUTH); getContentPane().add(scroll, BorderLayout.CENTER); setSize(400, 320); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); startTimer(); } private void startTimer() { Log.info("Init done"); final Timer timer = new Timer(10000, new ActionListener() { public void actionPerformed(ActionEvent e) { tick(); } }); timer.setInitialDelay(0); timer.start(); Log.info("Timer started"); } private void tick() { SwingUtilities.invokeLater(new Runnable() { public void run() { encode(); } }); } private void encode() { final BufferedImage img = getClipboard(); if (img == null) { return; } final StringBuilder sb = new StringBuilder(); encode(img, SpriteGrayLevel.GRAY_16, sb); encodeCompressed(img, SpriteGrayLevel.GRAY_16, sb); encode(img, SpriteGrayLevel.GRAY_8, sb); encodeCompressed(img, SpriteGrayLevel.GRAY_8, sb); encode(img, SpriteGrayLevel.GRAY_4, sb); encodeCompressed(img, SpriteGrayLevel.GRAY_4, sb); printData(sb.toString()); } private void encodeCompressed(BufferedImage img, SpriteGrayLevel level, StringBuilder sb) { sb.append("\n"); sb.append(SpriteUtils.encodeCompressed(img, "demo", level)); } private void encode(BufferedImage img, SpriteGrayLevel level, StringBuilder sb) { sb.append("\n"); sb.append(SpriteUtils.encode(img, "demo", level)); } private String last; private void printData(final String s) { if (s.equals(last) == false) { area.setText(s); last = s; } } public static BufferedImage getClipboard() { final Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null); try { if (t != null && t.isDataFlavorSupported(DataFlavor.imageFlavor)) { final BufferedImage text = (BufferedImage) t.getTransferData(DataFlavor.imageFlavor); return text; } } catch (UnsupportedFlavorException e) { Log.error(e.toString()); } catch (IOException e) { Log.error(e.toString()); } return null; } public static void main(String[] args) { new SpriteWindow(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/syntax/000077500000000000000000000000001312650303100227405ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java000066400000000000000000000113731312650303100273720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.syntax; import java.io.PrintStream; import java.util.Collection; import java.util.Set; import java.util.TreeSet; import net.sourceforge.plantuml.SkinParam; import net.sourceforge.plantuml.graphic.HtmlColorSetSimple; public class LanguageDescriptor { private final Set type = new TreeSet(); private final Set keyword = new TreeSet(); private final Set preproc = new TreeSet(); public LanguageDescriptor() { type.add("actor"); type.add("participant"); type.add("usecase"); type.add("class"); type.add("interface"); type.add("abstract"); type.add("enum"); type.add("component"); type.add("state"); type.add("object"); type.add("artifact"); type.add("folder"); type.add("rectangle"); type.add("node"); type.add("frame"); type.add("cloud"); type.add("database"); type.add("storage"); type.add("agent"); type.add("stack"); type.add("boundary"); type.add("control"); type.add("entity"); type.add("card"); type.add("file"); type.add("package"); type.add("queue"); type.add("archimate"); keyword.add("@startuml"); keyword.add("@enduml"); keyword.add("@startdot"); keyword.add("@enddot"); keyword.add("@startsalt"); keyword.add("@endsalt"); keyword.add("as"); keyword.add("also"); keyword.add("autonumber"); keyword.add("caption"); keyword.add("title"); keyword.add("newpage"); keyword.add("box"); keyword.add("alt"); keyword.add("else"); keyword.add("opt"); keyword.add("loop"); keyword.add("par"); keyword.add("break"); keyword.add("critical"); keyword.add("note"); keyword.add("rnote"); keyword.add("hnote"); keyword.add("legend"); keyword.add("group"); keyword.add("left"); keyword.add("right"); keyword.add("of"); keyword.add("on"); keyword.add("link"); keyword.add("over"); keyword.add("end"); keyword.add("activate"); keyword.add("deactivate"); keyword.add("destroy"); keyword.add("create"); keyword.add("footbox"); keyword.add("hide"); keyword.add("show"); keyword.add("skinparam"); keyword.add("skin"); keyword.add("top"); keyword.add("bottom"); keyword.add("top to bottom direction"); keyword.add("package"); keyword.add("namespace"); keyword.add("page"); keyword.add("up"); keyword.add("down"); keyword.add("if"); keyword.add("else"); keyword.add("elseif"); keyword.add("endif"); keyword.add("partition"); keyword.add("footer"); keyword.add("header"); keyword.add("center"); keyword.add("rotate"); keyword.add("ref"); keyword.add("return"); keyword.add("is"); keyword.add("repeat"); keyword.add("start"); keyword.add("stop"); keyword.add("while"); keyword.add("endwhile"); keyword.add("fork"); keyword.add("again"); keyword.add("kill"); preproc.add("!include"); preproc.add("!pragma"); preproc.add("!define"); preproc.add("!undef"); preproc.add("!if"); preproc.add("!ifdef"); preproc.add("!endif"); preproc.add("!ifndef"); preproc.add("!else"); preproc.add("!definelong"); preproc.add("!enddefinelong"); } public void print(PrintStream ps) { print(ps, "type", type); print(ps, "keyword", keyword); print(ps, "preprocessor", preproc); print(ps, "skinparameter", SkinParam.getPossibleValues()); print(ps, "color", new HtmlColorSetSimple().names()); ps.println(";EOF"); } private static void print(PrintStream ps, String name, Collection data) { ps.println(";"+name); ps.println(";" + data.size()); for (String k : data) { ps.println(k); } ps.println(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/syntax/SyntaxChecker.java000066400000000000000000000136501312650303100263630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.syntax; import java.util.Arrays; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.BlockUml; import net.sourceforge.plantuml.ErrorUml; import net.sourceforge.plantuml.LineLocation; import net.sourceforge.plantuml.LineLocationImpl; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.PSystemError; import net.sourceforge.plantuml.SourceStringReader; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.core.Diagram; import net.sourceforge.plantuml.preproc.Defines; public class SyntaxChecker { public static SyntaxResult checkSyntax(List source) { final StringBuilder sb = new StringBuilder(); for (String s : source) { sb.append(s); sb.append(BackSlash.NEWLINE); } return checkSyntax(sb.toString()); } public static SyntaxResult checkSyntax(String source) { OptionFlags.getInstance().setQuiet(true); final SyntaxResult result = new SyntaxResult(); if (source.startsWith("@startuml\n") == false) { result.setError(true); result.setLineLocation(new LineLocationImpl(null, null).oneLineRead()); // result.setErrorLinePosition(0); result.addErrorText("No @startuml found"); result.setSuggest(Arrays.asList("Did you mean:", "@startuml")); return result; } if (source.endsWith("@enduml\n") == false && source.endsWith("@enduml") == false) { result.setError(true); result.setLineLocation(lastLineNumber2(source)); // result.setErrorLinePosition(lastLineNumber(source)); result.addErrorText("No @enduml found"); result.setSuggest(Arrays.asList("Did you mean:", "@enduml")); return result; } final SourceStringReader sourceStringReader = new SourceStringReader(Defines.createEmpty(), source, Collections. emptyList()); final List blocks = sourceStringReader.getBlocks(); if (blocks.size() == 0) { result.setError(true); result.setLineLocation(lastLineNumber2(source)); // result.setErrorLinePosition(lastLineNumber(source)); result.addErrorText("No @enduml found"); result.setSuggest(Arrays.asList("Did you mean:", "@enduml")); return result; } final Diagram system = blocks.get(0).getDiagram(); result.setCmapData(system.hasUrl()); if (system instanceof UmlDiagram) { result.setUmlDiagramType(((UmlDiagram) system).getUmlDiagramType()); result.setDescription(system.getDescription().getDescription()); } else if (system instanceof PSystemError) { result.setError(true); final PSystemError sys = (PSystemError) system; // result.setErrorLinePosition(sys.getHigherErrorPosition()); result.setLineLocation(sys.getLineLocation()); result.setSystemError(sys); for (ErrorUml er : sys.getErrorsUml()) { result.addErrorText(er.getError()); } result.setSuggest(sys.getSuggest()); } else { result.setDescription(system.getDescription().getDescription()); } return result; } public static SyntaxResult checkSyntaxFair(String source) { final SyntaxResult result = new SyntaxResult(); final SourceStringReader sourceStringReader = new SourceStringReader(Defines.createEmpty(), source, Collections. emptyList()); final List blocks = sourceStringReader.getBlocks(); if (blocks.size() == 0) { result.setError(true); result.setLineLocation(lastLineNumber2(source)); result.addErrorText("No @enduml found"); result.setSuggest(Arrays.asList("Did you mean:", "@enduml")); return result; } final Diagram system = blocks.get(0).getDiagram(); result.setCmapData(system.hasUrl()); if (system instanceof UmlDiagram) { result.setUmlDiagramType(((UmlDiagram) system).getUmlDiagramType()); result.setDescription(system.getDescription().getDescription()); } else if (system instanceof PSystemError) { result.setError(true); final PSystemError sys = (PSystemError) system; // result.setErrorLinePosition(sys.getHigherErrorPosition()); result.setLineLocation(sys.getLineLocation()); for (ErrorUml er : sys.getErrorsUml()) { result.addErrorText(er.getError()); } result.setSystemError(sys); result.setSuggest(sys.getSuggest()); } else { result.setDescription(system.getDescription().getDescription()); } return result; } private static int lastLineNumber(String source) { int result = 0; for (int i = 0; i < source.length(); i++) { if (source.charAt(i) == '\n') { result++; } } return result; } private static LineLocation lastLineNumber2(String source) { LineLocationImpl result = new LineLocationImpl(null, null).oneLineRead(); for (int i = 0; i < source.length(); i++) { if (source.charAt(i) == '\n') { result = result.oneLineRead(); } } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/syntax/SyntaxResult.java000066400000000000000000000070441312650303100262750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.syntax; import java.io.IOException; import java.io.OutputStream; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.TreeSet; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.LineLocation; import net.sourceforge.plantuml.PSystemError; import net.sourceforge.plantuml.UmlDiagramType; public class SyntaxResult { private UmlDiagramType umlDiagramType; private boolean isError; private String description; // private int errorLinePosition; private Collection errors = new TreeSet(); private List suggest; private boolean hasCmapData; private PSystemError systemError; private LineLocation lineLocation; public UmlDiagramType getUmlDiagramType() { return umlDiagramType; } public boolean isError() { return isError; } public String getDescription() { return description; } // public int getErrorLinePosition() { // return errorLinePosition; // } public List getSuggest() { return suggest; } public Collection getErrors() { return Collections.unmodifiableCollection(errors); } public void setUmlDiagramType(UmlDiagramType umlDiagramType) { this.umlDiagramType = umlDiagramType; } public void setError(boolean isError) { this.isError = isError; } public void setDescription(String description) { this.description = description; } // public void setErrorLinePosition(int errorLinePosition) { // this.errorLinePosition = errorLinePosition; // } public void addErrorText(String error) { this.errors.add(error); } public void setSuggest(List suggest) { this.suggest = suggest; } public final boolean hasCmapData() { return hasCmapData; } public final void setCmapData(boolean hasCmapData) { this.hasCmapData = hasCmapData; } public void setSystemError(PSystemError systemError) { this.systemError = systemError; } public void generateDiagramDescriptionForError(OutputStream os, FileFormatOption fileFormatOption) throws IOException { if (systemError == null) { throw new IllegalStateException(); } systemError.exportDiagram(os, 0, fileFormatOption); } public void setLineLocation(LineLocation lineLocation) { this.lineLocation = lineLocation; } public LineLocation getLineLocation() { return lineLocation; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/telnet/000077500000000000000000000000001312650303100227055ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/telnet/AcceptTelnetClient.java000066400000000000000000000051721312650303100272670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.telnet; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.Socket; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.SourceStringReader; class AcceptTelnetClient extends Thread { final private Socket clientSocket; final private BufferedReader br; final private OutputStream os; AcceptTelnetClient(Socket socket) throws Exception { clientSocket = socket; System.out.println("Client Connected ..."); br = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); os = clientSocket.getOutputStream(); start(); } public String runInternal() throws IOException { final StringBuilder sb = new StringBuilder(); while (true) { final String s = br.readLine(); if (s == null) { return sb.toString(); } Log.println("S=" + s); sb.append(s); sb.append('\n'); if (s.equalsIgnoreCase("@enduml")) { return sb.toString(); } } } public void run() { try { final String uml = runInternal(); Log.println("UML=" + uml); final SourceStringReader s = new SourceStringReader(uml); s.outputImage(os, new FileFormatOption(FileFormat.ATXT)); os.close(); br.close(); } catch (IOException e) { e.printStackTrace(); } } }plantuml-1.2017.15/src/net/sourceforge/plantuml/telnet/TelnetServer.java000066400000000000000000000030711312650303100261730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.telnet; import java.net.ServerSocket; import java.net.Socket; public class TelnetServer { public static void main(String args[]) throws Exception { final ServerSocket server = new ServerSocket(4242); while (true) { final Socket socket = server.accept(); new AcceptTelnetClient(socket); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/tikz/000077500000000000000000000000001312650303100223735ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/tikz/TikzGraphics.java000066400000000000000000000357621312650303100256550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.tikz; import java.awt.Color; import java.awt.geom.PathIterator; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.eps.EpsGraphics; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.USegment; import net.sourceforge.plantuml.ugraphic.USegmentType; import net.sourceforge.plantuml.version.Version; public class TikzGraphics { // https://www.sharelatex.com/blog/2013/08/27/tikz-series-pt1.html // http://cremeronline.com/LaTeX/minimaltikz.pdf private final List cmd = new ArrayList(); private final boolean withPreamble; private Color color = Color.BLACK; private Color fillcolor = Color.BLACK; private double thickness = 1.0; private final double scale; private String dash = null; private final Map colornames = new LinkedHashMap(); public TikzGraphics(double scale, boolean withPreamble) { this.withPreamble = withPreamble; this.scale = scale; } private String getColorName(Color c) { if (c.equals(Color.WHITE)) { return "white"; } if (c.equals(Color.BLACK)) { return "black"; } final String result = colornames.get(c); if (result == null) { throw new IllegalArgumentException(); } return result; } public void createData(OutputStream os) throws IOException { if (withPreamble) { out(os, "\\documentclass{article}"); out(os, "\\usepackage{tikz}"); out(os, "\\usepackage{aeguill}"); if (hasUrl) { out(os, "\\usetikzlibrary{calc}"); out(os, "\\usepackage{hyperref}"); } out(os, "\\begin{document}"); } out(os, "% generated by Plantuml " + Version.versionString(15)); if (hasUrl && withPreamble) { out(os, "\\tikzset{"); out(os, " href node/.style={"); out(os, " alias=sourcenode,"); out(os, " append after command={"); out(os, " let \\p1 = (sourcenode.north west),"); out(os, " \\p2=(sourcenode.south east),"); out(os, " \\n1={\\x2-\\x1},"); out(os, " \\n2={\\y2-\\y1} in"); out(os, " node [inner sep=0pt, outer sep=0pt,anchor=north west,at=(\\p1)] {\\href{#1}{\\XeTeXLinkBox{\\phantom{\\rule{\\n1}{\\n2}}}}}"); out(os, " %xelatex needs \\XeTeXLinkBox, won't create a link unless it"); out(os, " %finds text --- rules don't work without \\XeTeXLinkBox."); out(os, " %Still builds correctly with pdflatex and lualatex"); out(os, " }"); out(os, " }"); out(os, "}"); out(os, "\\tikzset{"); out(os, " hyperref node/.style={"); out(os, " alias=sourcenode,"); out(os, " append after command={"); out(os, " let \\p1 = (sourcenode.north west),"); out(os, " \\p2=(sourcenode.south east),"); out(os, " \\n1={\\x2-\\x1},"); out(os, " \\n2={\\y2-\\y1} in"); out(os, " node [inner sep=0pt, outer sep=0pt,anchor=north west,at=(\\p1)] {\\hyperref [#1]{\\XeTeXLinkBox{\\phantom{\\rule{\\n1}{\\n2}}}}}"); out(os, " %xelatex needs \\XeTeXLinkBox, won't create a link unless it"); out(os, " %finds text --- rules don't work without \\XeTeXLinkBox."); out(os, " %Still builds correctly with pdflatex and lualatex"); out(os, " }"); out(os, " }"); out(os, "}"); } for (Map.Entry ent : colornames.entrySet()) { out(os, definecolor(ent.getValue(), ent.getKey())); } if (scale != 1) { out(os, "\\scalebox{" + format(scale) + "}{"); } out(os, "\\begin{tikzpicture}[yscale=-1]"); for (String s : cmd) { out(os, s); } out(os, "\\end{tikzpicture}"); if (scale != 1) { out(os, "}"); } if (withPreamble) { out(os, "\\end{document}"); } } private String definecolor(String name, Color color) { return "\\definecolor{" + name + "}{RGB}{" + color.getRed() + "," + color.getGreen() + "," + color.getBlue() + "}"; } public void rectangle(double x, double y, double width, double height) { final StringBuilder sb = new StringBuilder(); if (pendingUrl == null) { sb.append("\\draw["); if (color != null) { sb.append("color=" + getColorName(color) + ","); } if (fillcolor != null) { sb.append("fill=" + getColorName(fillcolor) + ","); if (color == null) { sb.append("color=" + getColorName(fillcolor) + ","); } } sb.append("line width=" + thickness + "pt] "); sb.append(couple(x, y) + " rectangle " + couple(x + width, y + height)); sb.append(";"); } else { sb.append("\\node at " + couple(x, y) + "[draw, "); if (color != null) { sb.append("color=" + getColorName(color) + ","); } if (fillcolor != null) { sb.append("fill=" + getColorName(fillcolor) + ","); if (color == null) { sb.append("color=" + getColorName(fillcolor) + ","); } } sb.append("line width=" + thickness + "pt,"); sb.append("below right,"); sb.append("inner sep=2ex,"); sb.append("minimum width=" + format(width) + "pt,"); sb.append("minimum height=" + format(height) + "pt,"); if (Url.isLatex(pendingUrl)) { sb.append("hyperref node=" + extractInternalHref(pendingUrl)); } else { sb.append("href node=" + pendingUrl); } sb.append("] "); sb.append(" {};"); urlIgnoreText = true; } cmd.add(sb.toString()); } private String couple(double x, double y) { return "(" + format(x) + "pt," + format(y) + "pt)"; } private String format(double x) { return EpsGraphics.format(x); } private void out(OutputStream os, String s) throws IOException { os.write(s.getBytes()); os.write("\n".getBytes()); } public void text(double x, double y, String text) { final StringBuilder sb = new StringBuilder("\\node at " + couple(x, y) + "[below right]{"); if (pendingUrl == null || urlIgnoreText) { sb.append(protectText(text)); } else { appendPendingUrl(sb); sb.append("{"); sb.append(protectText(text)); sb.append("}"); } sb.append("};"); cmd.add(sb.toString()); } private void appendPendingUrl(final StringBuilder sb) { if (Url.isLatex(pendingUrl)) { sb.append("\\hyperref["); sb.append(extractInternalHref(pendingUrl)); sb.append("]"); } else { sb.append("\\href{"); sb.append(pendingUrl); sb.append("}"); } } private static String extractInternalHref(String pendingUrl) { if (Url.isLatex(pendingUrl) == false) { throw new IllegalArgumentException(); } return pendingUrl.substring("latex://".length()); } private String protectText(String text) { text = text.replaceAll("_", "\\\\_"); text = text.replaceAll("\u00AB", "\\\\guillemotleft "); text = text.replaceAll("\u00BB", "\\\\guillemotright "); text = text.replaceAll("<", "\\\\textless "); text = text.replaceAll(">", "\\\\textgreater "); return text; } public void line(double x1, double y1, double x2, double y2) { final StringBuilder sb = new StringBuilder(); sb.append("\\draw["); if (color != null) { sb.append("color=" + getColorName(color) + ","); } sb.append("line width=" + thickness + "pt"); if (dash != null) { sb.append(",dash pattern=" + dash); } sb.append("] "); sb.append(couple(x1, y1)); sb.append(" -- "); sb.append(couple(x2, y2)); sb.append(";"); cmd.add(sb.toString()); } public void polygon(double[] points) { final StringBuilder sb = new StringBuilder("\\draw["); if (color != null) { sb.append("color=" + getColorName(color) + ","); } if (fillcolor != null) { sb.append("fill=" + getColorName(fillcolor) + ","); } sb.append("line width=" + thickness + "pt]"); sb.append(" "); for (int i = 0; i < points.length; i += 2) { sb.append(couple(points[i], points[i + 1])); sb.append(" -- "); } sb.append("cycle;"); cmd.add(sb.toString()); } private void round(double r, double[] points) { final StringBuilder sb = new StringBuilder("\\draw["); if (color != null) { sb.append("color=" + getColorName(color) + ","); } if (fillcolor != null) { sb.append("fill=" + getColorName(fillcolor) + ","); } sb.append("line width=" + thickness + "pt]"); sb.append(" "); int i = 0; sb.append(couple(points[i++], points[i++])); sb.append(" arc (180:270:" + format(r) + "pt) -- "); sb.append(couple(points[i++], points[i++])); sb.append(" -- "); sb.append(couple(points[i++], points[i++])); sb.append(" arc (270:360:" + format(r) + "pt) -- "); sb.append(couple(points[i++], points[i++])); sb.append(" -- "); sb.append(couple(points[i++], points[i++])); sb.append(" arc (0:90:" + format(r) + "pt) -- "); sb.append(couple(points[i++], points[i++])); sb.append(" -- "); sb.append(couple(points[i++], points[i++])); sb.append(" arc (90:180:" + format(r) + "pt) -- "); sb.append(couple(points[i++], points[i++])); sb.append(" -- "); sb.append("cycle;"); cmd.add(sb.toString()); } public void rectangleRound(double x, double y, double width, double height, double r) { double[] points = new double[8 * 2]; points[0] = x; points[1] = y + r; points[2] = x + r; points[3] = y; points[4] = x + width - r; points[5] = y; points[6] = x + width; points[7] = y + r; points[8] = x + width; points[9] = y + height - r; points[10] = x + width - r; points[11] = y + height; points[12] = x + r; points[13] = y + height; points[14] = x; points[15] = y + height - r; round(r, points); } public void upath(double x, double y, UPath path) { final StringBuilder sb = new StringBuilder("\\draw[color=" + getColorName(color) + ",line width=" + thickness + "pt] "); for (USegment seg : path) { final USegmentType type = seg.getSegmentType(); final double coord[] = seg.getCoord(); if (type == USegmentType.SEG_MOVETO) { sb.append(couple(coord[0] + x, coord[1] + y)); } else if (type == USegmentType.SEG_LINETO) { sb.append(" -- "); sb.append(couple(coord[0] + x, coord[1] + y)); } else if (type == USegmentType.SEG_QUADTO) { throw new UnsupportedOperationException(); } else if (type == USegmentType.SEG_CUBICTO) { // curvetoNoMacro(coord[0] + x, coord[1] + y, coord[2] + x, coord[3] + y, coord[4] + x, coord[5] + y); sb.append(" ..controls "); sb.append(couple(coord[0] + x, coord[1] + y)); sb.append(" and "); sb.append(couple(coord[2] + x, coord[3] + y)); sb.append(" .. "); sb.append(couple(coord[4] + x, coord[5] + y)); } else if (type == USegmentType.SEG_CLOSE) { // Nothing } else { Log.println("unknown " + seg); } } sb.append(";"); cmd.add(sb.toString()); } public void ellipse(double x, double y, double width, double height) { final StringBuilder sb = new StringBuilder(); sb.append("\\draw["); if (color != null) { sb.append("color=" + getColorName(color) + ","); } if (fillcolor != null) { sb.append("fill=" + getColorName(fillcolor) + ","); } sb.append("line width=" + thickness + "pt] " + couple(x, y) + " ellipse (" + format(width) + "pt and " + format(height) + "pt);"); cmd.add(sb.toString()); } public void drawPathIterator(double x, double y, PathIterator path) { final StringBuilder sb = new StringBuilder("\\draw[color=" + getColorName(color) + ",fill=" + getColorName(color) + "] "); final double coord[] = new double[6]; while (path.isDone() == false) { final int code = path.currentSegment(coord); if (code == PathIterator.SEG_MOVETO) { sb.append(couple(coord[0] + x, coord[1] + y)); } else if (code == PathIterator.SEG_LINETO) { sb.append(" -- "); sb.append(couple(coord[0] + x, coord[1] + y)); } else if (code == PathIterator.SEG_CLOSE) { sb.append(";"); cmd.add(sb.toString()); sb.setLength(0); sb.append("\\draw "); } else if (code == PathIterator.SEG_CUBICTO) { sb.append(" ..controls "); sb.append(couple(coord[0] + x, coord[1] + y)); sb.append(" and "); sb.append(couple(coord[2] + x, coord[3] + y)); sb.append(" .. "); sb.append(couple(coord[4] + x, coord[5] + y)); } else if (code == PathIterator.SEG_QUADTO) { sb.append(" ..controls "); sb.append(couple(coord[0] + x, coord[1] + y)); sb.append(" .. "); sb.append(couple(coord[2] + x, coord[3] + y)); } else { throw new UnsupportedOperationException("code=" + code); } path.next(); } // eps.fill(path.getWindingRule()); } public void setFillColor(Color c) { // if (c == null) { // c = Color.WHITE; // } this.fillcolor = c; addColor(c); } public void setStrokeColor(Color c) { // if (c == null) { // throw new IllegalArgumentException(); // } this.color = c; addColor(c); } private void addColor(Color c) { if (c == null) { return; } if (colornames.containsKey(c)) { return; } final String name = "plantucolor" + String.format("%04d", colornames.size()); colornames.put(c, name); } public void setStrokeWidth(double thickness, String dash) { this.thickness = thickness; this.dash = dash; } private String pendingUrl = null; private boolean urlIgnoreText = false; private boolean hasUrl = false; public void openLink(String url, String title) { if (url == null) { throw new IllegalArgumentException(); } this.hasUrl = true; this.urlIgnoreText = false; this.pendingUrl = url; // // if (pendingLink2.size() > 0) { // closeLink(); // } // // pendingLink2.add(0, (Element) document.createElement("a")); // pendingLink2.get(0).setAttribute("target", target); // pendingLink2.get(0).setAttribute("xlink:href", url); // if (title == null) { // pendingLink2.get(0).setAttribute("xlink:title", url); // } else { // pendingLink2.get(0).setAttribute("xlink:title", title); // } } public void closeLink() { this.pendingUrl = null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/000077500000000000000000000000001312650303100242265ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/ChangeState.java000066400000000000000000000055411312650303100272640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.ugraphic.UStroke; public class ChangeState implements Comparable { private final TimeTick when; private final String state; private final String comment; private final Colors colors; public ChangeState(TimeTick when, String state, String comment, Colors colors) { this.when = when; this.state = state; this.comment = comment; this.colors = colors; } public int compareTo(ChangeState other) { return this.when.compareTo(other.when); } public final TimeTick getWhen() { return when; } public final String getState() { return state; } public String getComment() { return comment; } private final HtmlColor getBackColor() { if (colors == null || colors.getColor(ColorType.BACK) == null) { return HtmlColorUtils.COL_D7E0F2; } return colors.getColor(ColorType.BACK); } private final HtmlColor getLineColor() { if (colors == null || colors.getColor(ColorType.LINE) == null) { return HtmlColorUtils.COL_038048; } return colors.getColor(ColorType.LINE); } public SymbolContext getContext() { return new SymbolContext(getBackColor(), getLineColor()).withStroke(new UStroke(1.5)); } public final boolean isBlank() { return state.equals("{...}"); } public final boolean isCompletelyHidden() { return state.equals("{hidden}"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/Clock.java000066400000000000000000000025101312650303100261220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; public interface Clock { public TimeTick getNow(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/CommandAtPlayer.java000066400000000000000000000044261312650303100301170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandAtPlayer extends SingleLineCommand2 { public CommandAtPlayer() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("@"), // new RegexLeaf("PLAYER", CommandTimeMessage.PLAYER_CODE), // new RegexLeaf("[%s]*$")); } @Override final protected CommandExecutionResult executeArg(TimingDiagram diagram, RegexResult arg) { final String code = arg.get("PLAYER", 0); final Player player = diagram.getPlayer(code); if (player == null) { return CommandExecutionResult.error("No such participant " + code); } diagram.setLastPlayer(player); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/CommandAtTime.java000066400000000000000000000041741312650303100275610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandAtTime extends SingleLineCommand2 { public CommandAtTime() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // TimeTickBuilder.expressionAtWithArobase("TIME"), // new RegexLeaf("[%s]*$")); } @Override final protected CommandExecutionResult executeArg(TimingDiagram diagram, RegexResult arg) { final TimeTick timeTick = TimeTickBuilder.parseTimeTick("TIME", arg, diagram); diagram.addTime(timeTick); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/CommandChangeStateByPlayerCode.java000066400000000000000000000066031312650303100330260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.IRegex; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; public class CommandChangeStateByPlayerCode extends SingleLineCommand2 { private static final String STATE_CODE = "([\\p{L}0-9_][\\p{L}0-9_.]*)"; public CommandChangeStateByPlayerCode() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("CODE", CommandTimeMessage.PLAYER_CODE), // new RegexLeaf("[%s]*is[%s]*"), // getStateOrHidden(), // new RegexLeaf("[%s]*"), // color().getRegex(), // new RegexLeaf("[%s]*"), // new RegexLeaf("COMMENT", "(?:[%s]*:[%s]*(.*?))?"), // new RegexLeaf("[%s]*$")); } static IRegex getStateOrHidden() { return new RegexOr(// new RegexLeaf("STATE1", "[%g]([^%g]+)[%g]"), // new RegexLeaf("STATE2", STATE_CODE), // new RegexLeaf("STATE3", "(\\{hidden\\})"), // new RegexLeaf("STATE4", "(\\{\\.\\.\\.\\})") // ); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } @Override final protected CommandExecutionResult executeArg(TimingDiagram diagram, RegexResult arg) { final String code = arg.get("CODE", 0); final Player player = diagram.getPlayer(code); if (player == null) { return CommandExecutionResult.error("Unkown \"" + code + "\""); } final String comment = arg.get("COMMENT", 0); final TimeTick now = diagram.getNow(); final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); player.setState(now, arg.getLazzy("STATE", 0), comment, colors); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/CommandChangeStateByTime.java000066400000000000000000000060061312650303100316720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; public class CommandChangeStateByTime extends SingleLineCommand2 { public CommandChangeStateByTime() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("[%s]*"), // TimeTickBuilder.expressionAtWithoutArobase("TIME"), // new RegexLeaf("[%s]*is[%s]*"), // CommandChangeStateByPlayerCode.getStateOrHidden(), // new RegexLeaf("[%s]*"), // color().getRegex(), // new RegexLeaf("[%s]*"), // new RegexLeaf("COMMENT", "(?:[%s]*:[%s]*(.*?))?"), // new RegexLeaf("[%s]*$")); } private static ColorParser color() { return ColorParser.simpleColor(ColorType.BACK); } @Override final protected CommandExecutionResult executeArg(TimingDiagram diagram, RegexResult arg) { final Player player = diagram.getLastPlayer(); if (player == null) { return CommandExecutionResult.error("Missing @ line before this"); } final TimeTick tick = TimeTickBuilder.parseTimeTick("TIME", arg, diagram); final String comment = arg.get("COMMENT", 0); final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); player.setState(tick, arg.getLazzy("STATE", 0), comment, colors); diagram.addTime(tick); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/CommandConstraint.java000066400000000000000000000055711312650303100305240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandConstraint extends SingleLineCommand2 { public CommandConstraint() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("PART1", "(" + CommandTimeMessage.PLAYER_CODE + ")?"), // TimeTickBuilder.expressionAtWithArobase("TIME1"), // new RegexLeaf("[%s]*"), // new RegexLeaf("ARROW", "\\<(-+)\\>"), // new RegexLeaf("[%s]*"), // TimeTickBuilder.expressionAtWithArobase("TIME2"), // new RegexLeaf("[%s]*"), // new RegexLeaf("MESSAGE", "(?::[%s]*(.*))?"), // new RegexLeaf("[%s]*$")); } @Override final protected CommandExecutionResult executeArg(TimingDiagram diagram, RegexResult arg) { final String part1 = arg.get("PART1", 0); final Player player1; if (part1 == null) { player1 = diagram.getLastPlayer(); if (player1 == null) { return CommandExecutionResult.error("You have to provide a participant"); } } else { player1 = diagram.getPlayer(part1); } final TimeTick tick1 = TimeTickBuilder.parseTimeTick("TIME1", arg, diagram); diagram.updateNow(tick1); final TimeTick tick2 = TimeTickBuilder.parseTimeTick("TIME2", arg, diagram); player1.createConstraint(tick1, tick2, arg.get("MESSAGE", 0)); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/CommandLifeLine.java000066400000000000000000000045621312650303100300660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandLifeLine extends SingleLineCommand2 { public CommandLifeLine() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("TYPE", // "(robust|concise)[%s]+"), // new RegexLeaf("FULL", "[%g]([^%g]+)[%g]"), // new RegexLeaf("[%s]+as[%s]+"), // new RegexLeaf("CODE", "([\\p{L}0-9_.@]+)"), // new RegexLeaf("$")); } @Override final protected CommandExecutionResult executeArg(TimingDiagram diagram, RegexResult arg) { final String code = arg.get("CODE", 0); final String full = arg.get("FULL", 0); final TimingStyle type = TimingStyle.valueOf(arg.get("TYPE", 0).toUpperCase()); diagram.createLifeLine(code, full, type); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/CommandScalePixel.java000066400000000000000000000045211312650303100304230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandScalePixel extends SingleLineCommand2 { public CommandScalePixel() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("scale"), // new RegexLeaf("[%s]+"), // new RegexLeaf("TICK", "(\\d+)"), // new RegexLeaf("[%s]+as[%s]+"), // new RegexLeaf("PIXEL", "(\\d+)"), // new RegexLeaf("[%s]+pixels?"), // new RegexLeaf("[%s]*$")); } @Override final protected CommandExecutionResult executeArg(TimingDiagram diagram, RegexResult arg) { final long tick = Long.parseLong(arg.get("TICK", 0)); final long pixel = Long.parseLong(arg.get("PIXEL", 0)); diagram.scaleInPixels(tick, pixel); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/CommandTimeMessage.java000066400000000000000000000054611312650303100306010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.SingleLineCommand2; import net.sourceforge.plantuml.command.regex.RegexConcat; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class CommandTimeMessage extends SingleLineCommand2 { public static final String PLAYER_CODE = "([\\p{L}_][\\p{L}0-9_.]*)"; public CommandTimeMessage() { super(getRegexConcat()); } private static RegexConcat getRegexConcat() { return new RegexConcat(new RegexLeaf("^"), // new RegexLeaf("PART1", PLAYER_CODE), // TimeTickBuilder.optionalExpressionAtWithArobase("TIME1"), // new RegexLeaf("[%s]*"), // new RegexLeaf("ARROW", "(-+)\\>"), // new RegexLeaf("[%s]*"), // new RegexLeaf("PART2", PLAYER_CODE), // TimeTickBuilder.optionalExpressionAtWithArobase("TIME2"), // new RegexLeaf("[%s]*"), // new RegexLeaf("MESSAGE", "(?::[%s]*(.*))?"), // new RegexLeaf("[%s]*$")); } @Override final protected CommandExecutionResult executeArg(TimingDiagram diagram, RegexResult arg) { final Player player1 = diagram.getPlayer(arg.get("PART1", 0)); final Player player2 = diagram.getPlayer(arg.get("PART2", 0)); final TimeTick tick1 = TimeTickBuilder.parseTimeTick("TIME1", arg, diagram); final TimeTick tick2 = TimeTickBuilder.parseTimeTick("TIME2", arg, diagram); diagram.createTimeMessage(player1, tick1, player2, tick2, arg.get("MESSAGE", 0)); return CommandExecutionResult.ok(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/HexaShape.java000066400000000000000000000044221312650303100267410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; public class HexaShape implements UDrawable { private final double width; private final double height; private final SymbolContext context; private final double delta = 12; private HexaShape(double width, double height, SymbolContext context) { this.width = width; this.height = height; this.context = context; } public static HexaShape create(double width, double height, SymbolContext context) { return new HexaShape(width, height, context); } public void drawU(UGraphic ug) { ug = context.apply(ug); final UPolygon polygon = new UPolygon(); polygon.addPoint(delta, 0); polygon.addPoint(width - delta, 0); polygon.addPoint(width, height / 2); polygon.addPoint(width - delta, height); polygon.addPoint(delta, height); polygon.addPoint(0, height / 2); ug.draw(polygon); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/Histogram.java000066400000000000000000000223071312650303100270320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.awt.geom.Point2D.Double; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Histogram implements TimeDrawing { private final List changes = new ArrayList(); private final List constraints = new ArrayList(); private List allStates = new ArrayList(); private final double stepHeight = 20; private final ISkinParam skinParam; private final TimingRuler ruler; private String initialState; public Histogram(TimingRuler ruler, ISkinParam skinParam) { this.ruler = ruler; this.skinParam = skinParam; } public IntricatedPoint getTimeProjection(StringBounder stringBounder, TimeTick tick) { final double x = ruler.getPosInPixel(tick); final List states = getStatesAt(tick); if (states.size() == 0) { return null; } if (states.size() == 1) { final double y = getStateYFor(states.get(0)); return new IntricatedPoint(new Point2D.Double(x, y), new Point2D.Double(x, y)); } assert states.size() == 2; final double y1 = getStateYFor(states.get(0)); final double y2 = getStateYFor(states.get(1)); assert y1 != y2; return new IntricatedPoint(new Point2D.Double(x, y1), new Point2D.Double(x, y2)); } private double getStateYFor(String state) { return (allStates.size() - 1 - allStates.indexOf(state)) * stepHeight; } private List getStatesAt(TimeTick tick) { if (changes.size() == 0) { return Collections.emptyList(); } for (int i = 0; i < changes.size(); i++) { if (changes.get(i).getWhen().compareTo(tick) == 0) { if (i == 0 && initialState == null) { return Arrays.asList(changes.get(i).getState()); } if (i == 0 && initialState != null) { return Arrays.asList(initialState, changes.get(i).getState()); } return Arrays.asList(changes.get(i - 1).getState(), changes.get(i).getState()); } if (changes.get(i).getWhen().compareTo(tick) > 0) { return Collections.singletonList(changes.get(i - 1).getState()); } } return Collections.singletonList(changes.get(changes.size() - 1).getState()); } public void addChange(ChangeState change) { final String state = change.getState(); if (allStates.contains(state) == false) { allStates.add(state); } changes.add(change); } private Point2D getPoint(int i) { final ChangeState change = changes.get(i); final double x = ruler.getPosInPixel(change.getWhen()); return new Point2D.Double(x, yOfState(change.getState())); } private double yOfState(String state) { return -stepHeight * allStates.indexOf(state); } private SymbolContext getContext() { return new SymbolContext(HtmlColorUtils.COL_D7E0F2, HtmlColorUtils.COL_038048).withStroke(new UStroke(1.5)); } public void drawU(UGraphic ug) { ug = getContext().apply(ug); final UTranslate deltaY = new UTranslate(0, getFullDeltaY()); if (changes.size() == 0) { return; } if (initialState != null) { final Point2D pt = getPoint(0); drawHLine(ug, getInitialPoint(), getInitialWidth() + pt.getX()); } for (int i = 0; i < changes.size() - 1; i++) { final Point2D pt = getPoint(i); final Point2D pt2 = getPoint(i + 1); final double len = pt2.getX() - pt.getX(); drawHLine(ug, pt, len); } final Point2D pt = getPoint(changes.size() - 1); final double len = ruler.getWidth() - pt.getX(); drawHLine(ug, pt, len); if (initialState != null) { final Point2D before = getInitialPoint(); final Point2D current = getPoint(0); ug.apply(new UTranslate(current).compose(deltaY)).draw(new ULine(0, before.getY() - current.getY())); } for (int i = 1; i < changes.size(); i++) { final Point2D before = getPoint(i - 1); final Point2D current = getPoint(i); ug.apply(new UTranslate(current).compose(deltaY)).draw(new ULine(0, before.getY() - current.getY())); } for (int i = 0; i < changes.size(); i++) { final Point2D ptLabel = getPoint(i); final String comment = changes.get(i).getComment(); if (comment == null) { continue; } final TextBlock label = getTextBlock(comment); final Dimension2D dim = label.calculateDimension(ug.getStringBounder()); label.drawU(ug.apply(new UTranslate(ptLabel).compose(deltaY).compose(new UTranslate(2, -dim.getHeight())))); } for (TimeConstraint constraint : constraints) { final String state1 = last(getStatesAt(constraint.getTick1())); final String state2 = getStatesAt(constraint.getTick2()).get(0); final double y1 = getStateYFor(state1); final double y2 = getStateYFor(state2); constraint.drawU(ug.apply(new UTranslate(0, y1 - stepHeight / 2)), ruler, skinParam); } } private static String last(List list) { return list.get(list.size() - 1); } private Double getInitialPoint() { return new Point2D.Double(-getInitialWidth(), yOfState(initialState)); } private void drawHLine(UGraphic ug, final Point2D pt, final double len) { final UTranslate deltaY = new UTranslate(0, getFullDeltaY()); final UTranslate pos = new UTranslate(pt).compose(deltaY); ug = ug.apply(pos); // final SymbolContext context = getContext(); // final double height = -pt.getY(); // if (height > 0) { // context.withForeColor(context.getBackColor()).apply(ug).draw(new URectangle(len, height)); // } ug.draw(new ULine(len, 0)); } private double getFullDeltaY() { return stepHeight * (allStates.size() - 1); } private FontConfiguration getFontConfiguration() { return new FontConfiguration(skinParam, FontParam.ACTIVITY, null); } private TextBlock getTextBlock(String value) { final Display display = Display.getWithNewlines(value); return display.create(getFontConfiguration(), HorizontalAlignment.LEFT, skinParam); } public double getHeight() { return stepHeight * allStates.size() + 10; } public TextBlock getWidthHeader(StringBounder stringBounder) { return new TextBlock() { public void drawU(UGraphic ug) { for (String state : allStates) { final TextBlock label = getTextBlock(state); final Dimension2D dim = label.calculateDimension(ug.getStringBounder()); label.drawU(ug.apply(new UTranslate(0, getFullDeltaY() + yOfState(state) - dim.getHeight()))); } } public Dimension2D calculateDimension(StringBounder stringBounder) { double width = 0; for (String state : allStates) { final TextBlock label = getTextBlock(state); final Dimension2D dim = label.calculateDimension(stringBounder); width = Math.max(width, dim.getWidth()); } if (initialState != null) { width += getInitialWidth(); } return new Dimension2DDouble(width, getFullDeltaY()); } public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { return null; } }; } public void setInitialState(String initialState, Colors initialColors) { this.initialState = initialState; if (initialState != null) { allStates.add(initialState); } } private double getInitialWidth() { return stepHeight * 2; } public void addConstraint(TimeConstraint constraint) { this.constraints.add(constraint); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/IntricatedPoint.java000066400000000000000000000034411312650303100301730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UTranslate; public class IntricatedPoint { private final Point2D pta; private final Point2D ptb; public IntricatedPoint(Point2D pta, Point2D ptb) { this.pta = pta; this.ptb = ptb; } public final Point2D getPointA() { return pta; } public final Point2D getPointB() { return ptb; } public IntricatedPoint translated(UTranslate translate) { return new IntricatedPoint(translate.getTranslated(pta), translate.getTranslated(ptb)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/PentaAShape.java000066400000000000000000000050271312650303100272260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UPolygon; public class PentaAShape implements UDrawable { private final double width; private final double height; private final SymbolContext context; private final double delta = 12; private PentaAShape(double width, double height, SymbolContext context) { this.width = width; this.height = height; this.context = context; } public static PentaAShape create(double width, double height, SymbolContext context) { return new PentaAShape(width, height, context); } public void drawU(UGraphic ug) { final UPolygon polygon = new UPolygon(); polygon.addPoint(0, 0); polygon.addPoint(width - delta, 0); polygon.addPoint(width, height / 2); polygon.addPoint(width - delta, height); polygon.addPoint(0, height); context.withForeColor(context.getBackColor()).apply(ug).draw(polygon); final UPath path = new UPath(); path.moveTo(0, 0); path.lineTo(width - delta, 0); path.lineTo(width, height / 2); path.lineTo(width - delta, height); path.lineTo(0, height); context.apply(ug).draw(path); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/PentaBShape.java000066400000000000000000000047761312650303100272410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UPolygon; public class PentaBShape implements UDrawable { private final double width; private final double height; private final SymbolContext context; private final double delta = 12; private PentaBShape(double width, double height, SymbolContext context) { this.width = width; this.height = height; this.context = context; } public static PentaBShape create(double width, double height, SymbolContext context) { return new PentaBShape(width, height, context); } public void drawU(UGraphic ug) { final UPolygon polygon = new UPolygon(); polygon.addPoint(delta, 0); polygon.addPoint(width, 0); polygon.addPoint(width, height); polygon.addPoint(delta, height); polygon.addPoint(0, height / 2); context.withForeColor(context.getBackColor()).apply(ug).draw(polygon); final UPath path = new UPath(); path.moveTo(width, 0); path.lineTo(delta, 0); path.lineTo(0, height / 2); path.lineTo(delta, height); path.lineTo(width, height); context.apply(ug).draw(path); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/Player.java000066400000000000000000000150051312650303100263260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.TreeSet; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Player implements TextBlock, TimeProjected { private final String code; private final Display full; private final TimingStyle type; private final ISkinParam skinParam; private final TimingRuler ruler; private String initialState; private final Set changes = new TreeSet(); private final List constraints = new ArrayList(); public Player(String code, String full, TimingStyle type, ISkinParam skinParam, TimingRuler ruler) { this.code = code; this.full = Display.getWithNewlines(full); this.type = type; this.skinParam = skinParam; this.ruler = ruler; } private FontConfiguration getFontConfiguration() { return new FontConfiguration(skinParam, FontParam.ACTIVITY, null); } public void drawU(UGraphic ug) { final TextBlock title = getTitle(); title.drawU(ug); final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); drawLine(ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(new UStroke(1.0)), -TimingDiagram.marginX1, dimTitle.getHeight() + 1, dimTitle.getWidth() + 1, dimTitle.getHeight() + 1, dimTitle.getWidth() + 1 + 10, 0); } public void drawContent(UGraphic ug) { ug = ug.apply(getTranslateForTimeDrawing(ug.getStringBounder())); getTimeDrawing().drawU(ug); } public void drawWidthHeader(UGraphic ug) { ug = ug.apply(getTranslateForTimeDrawing(ug.getStringBounder())); getTimeDrawing().getWidthHeader(ug.getStringBounder()).drawU(ug); } public double getGetWidthHeader(StringBounder stringBounder) { return getTimeDrawing().getWidthHeader(stringBounder).calculateDimension(stringBounder).getWidth(); } private void drawLine(UGraphic ug, double... coord) { for (int i = 0; i < coord.length - 2; i += 2) { final double x1 = coord[i]; final double y1 = coord[i + 1]; final double x2 = coord[i + 2]; final double y2 = coord[i + 3]; ug.apply(new UTranslate(x1, y1)).draw(new ULine(x2 - x1, y2 - y1)); } } private UTranslate getTranslateForTimeDrawing(StringBounder stringBounder) { final TextBlock title = getTitle(); return new UTranslate(0, title.calculateDimension(stringBounder).getHeight() * 2); } private TextBlock getTitle() { return full.create(getFontConfiguration(), HorizontalAlignment.LEFT, skinParam); } private TimeDrawing cached; private Colors initialColors; private TimeDrawing getTimeDrawing() { if (cached == null) { cached = computeTimeDrawing(); } return cached; } private TimeDrawing computeTimeDrawing() { final TimeDrawing result; if (type == TimingStyle.CONCISE) { result = new Ribbon(ruler, skinParam); } else if (type == TimingStyle.ROBUST) { result = new Histogram(ruler, skinParam); } else { throw new IllegalStateException(); } result.setInitialState(initialState, initialColors); for (ChangeState change : changes) { result.addChange(change); } for (TimeConstraint constraint : constraints) { result.addConstraint(constraint); } return result; } public Dimension2D calculateDimension(StringBounder stringBounder) { final TextBlock title = getTitle(); final double width = ruler.getWidth(); final double zoneHeight = getZoneHeight(); return new Dimension2DDouble(width, title.calculateDimension(stringBounder).getHeight() * 2 + zoneHeight); } private double getZoneHeight() { return getTimeDrawing().getHeight(); } public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { return null; } public void setState(TimeTick now, String state, String comment, Colors color) { if (now == null) { this.initialState = state; this.initialColors = color; } else { if (state == null) { throw new IllegalArgumentException(); } this.changes.add(new ChangeState(now, state, comment, color)); } } public IntricatedPoint getTimeProjection(StringBounder stringBounder, TimeTick tick) { final IntricatedPoint point = getTimeDrawing().getTimeProjection(stringBounder, tick); if (point == null) { return null; } final UTranslate translation = getTranslateForTimeDrawing(stringBounder); return point.translated(translation); } public void createConstraint(TimeTick tick1, TimeTick tick2, String message) { this.constraints.add(new TimeConstraint(tick1, tick2, message)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/Ribbon.java000066400000000000000000000170061312650303100263100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class Ribbon implements TimeDrawing { private final List changes = new ArrayList(); private final List constraints = new ArrayList(); private final double delta = 12; private final ISkinParam skinParam; private final TimingRuler ruler; private String initialState; private Colors initialColors; public Ribbon(TimingRuler ruler, ISkinParam skinParam) { this.ruler = ruler; this.skinParam = skinParam; } public IntricatedPoint getTimeProjection(StringBounder stringBounder, TimeTick tick) { final double x = ruler.getPosInPixel(tick); final double y = delta * 0.5 + getHeightForConstraints(); for (ChangeState change : changes) { if (change.getWhen().compareTo(tick) == 0) { return new IntricatedPoint(new Point2D.Double(x, y), new Point2D.Double(x, y)); } } return new IntricatedPoint(new Point2D.Double(x, y - delta), new Point2D.Double(x, y + delta)); } public void addChange(ChangeState change) { this.changes.add(change); } private double getPosInPixel(ChangeState change) { return ruler.getPosInPixel(change.getWhen()); } private FontConfiguration getFontConfiguration() { return new FontConfiguration(skinParam, FontParam.ACTIVITY, null); } private TextBlock getTextBlock(String value) { final Display display = Display.getWithNewlines(value); return display.create(getFontConfiguration(), HorizontalAlignment.LEFT, skinParam); } public void drawU(UGraphic ug) { UGraphic ugDown = ug.apply(new UTranslate(0, getHeightForConstraints())); final TextBlock inital; final StringBounder stringBounder = ugDown.getStringBounder(); if (initialState == null) { inital = null; } else { inital = getTextBlock(initialState); final double a = getPosInPixel(changes.get(0)); drawPentaA(ugDown.apply(new UTranslate(-getInitialWidth(stringBounder), -delta / 2)), getInitialWidth(stringBounder) + a, changes.get(0)); } for (int i = 0; i < changes.size() - 1; i++) { final double a = getPosInPixel(changes.get(i)); final double b = getPosInPixel(changes.get(i + 1)); assert b > a; if (changes.get(i).isCompletelyHidden() == false) { drawHexa(ugDown.apply(new UTranslate(a, -delta / 2)), b - a, changes.get(i)); } } if (changes.size() >= 1) { final ChangeState last = changes.get(changes.size() - 1); final double a = getPosInPixel(last); if (last.isCompletelyHidden() == false) { drawPentaB(ugDown.apply(new UTranslate(a, -delta / 2)), ruler.getWidth() - a, last); } } ugDown = ugDown.apply(new UTranslate(0, delta / 2)); if (inital != null) { final Dimension2D dimInital = inital.calculateDimension(stringBounder); inital.drawU(ugDown.apply(new UTranslate(-getDelta() - dimInital.getWidth(), -dimInital.getHeight() / 2))); } for (int i = 0; i < changes.size(); i++) { final ChangeState change = changes.get(i); final double x = ruler.getPosInPixel(change.getWhen()); if (change.isBlank() == false && change.isCompletelyHidden() == false) { final TextBlock state = getTextBlock(change.getState()); final Dimension2D dim = state.calculateDimension(stringBounder); final double xtext; if (i == changes.size() - 1) { xtext = x + getDelta(); } else { final double x2 = ruler.getPosInPixel(changes.get(i + 1).getWhen()); xtext = (x + x2) / 2 - dim.getWidth() / 2; } state.drawU(ugDown.apply(new UTranslate(xtext, -dim.getHeight() / 2))); } final String commentString = change.getComment(); if (commentString != null) { final TextBlock comment = getTextBlock(commentString); final Dimension2D dimComment = comment.calculateDimension(stringBounder); comment.drawU(ugDown.apply(new UTranslate(x + getDelta(), -delta - dimComment.getHeight()))); } } for (TimeConstraint constraint : constraints) { constraint.drawU(ug.apply(new UTranslate(0, 15)), ruler, skinParam); } } private double getInitialWidth(final StringBounder stringBounder) { return getTextBlock(initialState).calculateDimension(stringBounder).getWidth() + 2 * delta; } private void drawHexa(UGraphic ug, double len, ChangeState change) { final HexaShape shape = HexaShape.create(len, 2 * delta, change.getContext()); shape.drawU(ug); } private void drawPentaB(UGraphic ug, double len, ChangeState change) { final PentaBShape shape = PentaBShape.create(len, 2 * delta, change.getContext()); shape.drawU(ug); } private void drawPentaA(UGraphic ug, double len, ChangeState change) { SymbolContext context = change.getContext(); final HtmlColor back = initialColors.getColor(ColorType.BACK); if (back != null) { context = context.withBackColor(back); } final PentaAShape shape = PentaAShape.create(len, 2 * delta, context); shape.drawU(ug); } private double getHeightForConstraints() { if (constraints.size() == 0) { return 0; } return 30; } public double getHeight() { return 3 * delta + getHeightForConstraints(); } public double getDelta() { return delta; } public TextBlock getWidthHeader(StringBounder stringBounder) { if (initialState != null) { return TextBlockUtils.empty(getInitialWidth(stringBounder), 2 * delta); } return TextBlockUtils.empty(0, 0); } public void setInitialState(String initialState, Colors initialColors) { this.initialState = initialState; this.initialColors = initialColors; } public void addConstraint(TimeConstraint constraint) { this.constraints.add(constraint); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/TickInPlayer.java000066400000000000000000000030771312650303100274360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; public class TickInPlayer { private final Player player; private final TimeTick tick; public TickInPlayer(Player player, TimeTick tick) { this.player = player; this.tick = tick; } public final Player getPlayer() { return player; } public final TimeTick getTick() { return tick; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/TimeArrow.java000066400000000000000000000126231312650303100270060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import java.awt.Font; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TimeArrow implements UDrawable { private final Point2D start; private final Point2D end; private final Display label; private final ISkinSimple spriteContainer; public static TimeArrow create(IntricatedPoint pt1, IntricatedPoint pt2, Display label, ISkinSimple spriteContainer) { final TimeArrow arrow1 = new TimeArrow(pt1.getPointA(), pt2.getPointA(), label, spriteContainer); final TimeArrow arrow2 = new TimeArrow(pt1.getPointA(), pt2.getPointB(), label, spriteContainer); final TimeArrow arrow3 = new TimeArrow(pt1.getPointB(), pt2.getPointA(), label, spriteContainer); final TimeArrow arrow4 = new TimeArrow(pt1.getPointB(), pt2.getPointB(), label, spriteContainer); return shorter(arrow1, arrow2, arrow3, arrow4); } private TimeArrow(Point2D start, Point2D end, Display label, ISkinSimple spriteContainer) { this.start = start; this.end = end; this.label = label; this.spriteContainer = spriteContainer; } private double getAngle() { return Math.atan2(end.getX() - start.getX(), end.getY() - start.getY()); } private static TimeArrow shorter(TimeArrow arrow1, TimeArrow arrow2) { if (arrow1.len() < arrow2.len()) { return arrow1; } return arrow2; } private static TimeArrow shorter(TimeArrow arrow1, TimeArrow arrow2, TimeArrow arrow3, TimeArrow arrow4) { return shorter(shorter(arrow1, arrow2), shorter(arrow3, arrow4)); } private double len() { return start.distance(end); } public TimeArrow translate(UTranslate translate) { return new TimeArrow(translate.getTranslated(start), translate.getTranslated(end), label, spriteContainer); } public static Point2D onCircle(Point2D pt, double alpha) { final double radius = 8; final double x = pt.getX() - Math.sin(alpha) * radius; final double y = pt.getY() - Math.cos(alpha) * radius; return new Point2D.Double(x, y); } private FontConfiguration getFontConfiguration() { final UFont font = UFont.serif(14); return new FontConfiguration(font, HtmlColorUtils.BLUE, HtmlColorUtils.BLUE, false); } public void drawU(UGraphic ug) { final double angle = getAngle(); ug = ug.apply(new UChangeColor(HtmlColorUtils.BLUE)).apply(new UStroke()); final ULine line = new ULine(end.getX() - start.getX(), end.getY() - start.getY()); ug.apply(new UTranslate(start)).draw(line); final double delta = 20.0 * Math.PI / 180.0; final Point2D pt1 = onCircle(end, angle + delta); final Point2D pt2 = onCircle(end, angle - delta); final UPolygon polygon = new UPolygon(); polygon.addPoint(pt1.getX(), pt1.getY()); polygon.addPoint(pt2.getX(), pt2.getY()); polygon.addPoint(end.getX(), end.getY()); ug = ug.apply(new UChangeBackColor(HtmlColorUtils.BLUE)); ug.draw(polygon); final TextBlock textLabel = label.create(getFontConfiguration(), HorizontalAlignment.LEFT, spriteContainer); double xText = (pt1.getX() + pt2.getX()) / 2; double yText = (pt1.getY() + pt2.getY()) / 2; if (start.getY() < end.getY()) { final Dimension2D dimLabel = textLabel.calculateDimension(ug.getStringBounder()); yText -= dimLabel.getHeight(); } textLabel.drawU(ug.apply(new UTranslate(xText, yText))); // final double radius = 4; // final UTranslate forCirle = new UTranslate(end.getX() - radius, end.getY() - radius); // ug.apply(forCirle).draw(new UEllipse(2 * radius, 2 * radius)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/TimeConstraint.java000066400000000000000000000100261312650303100300330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import java.awt.Font; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TimeConstraint { private final TimeTick tick1; private final TimeTick tick2; private final Display label; public TimeConstraint(TimeTick tick1, TimeTick tick2, String label) { this.tick1 = tick1; this.tick2 = tick2; this.label = Display.getWithNewlines(label); } public final TimeTick getTick1() { return tick1; } public final TimeTick getTick2() { return tick2; } public final Display getLabel() { return label; } private TextBlock getTextBlock(Display display, ISkinParam skinParam) { return display.create(getFontConfiguration(), HorizontalAlignment.LEFT, skinParam); } private FontConfiguration getFontConfiguration() { final UFont font = UFont.serif(14); return new FontConfiguration(font, HtmlColorUtils.BLACK, HtmlColorUtils.BLUE, false); } public void drawU(UGraphic ug, TimingRuler ruler, ISkinParam skinParam) { ug = ug.apply(new UChangeColor(HtmlColorUtils.RED)).apply(new UChangeBackColor(HtmlColorUtils.RED)); final double x1 = ruler.getPosInPixel(tick1); final double x2 = ruler.getPosInPixel(tick2); final ULine line = new ULine(x2 - x1, 0); ug = ug.apply(new UTranslate(x1, 0)); ug.draw(line); ug.draw(getPolygon(-Math.PI / 2, new Point2D.Double(0, 0))); ug.draw(getPolygon(Math.PI / 2, new Point2D.Double(x2 - x1, 0))); final TextBlock text = getTextBlock(label, skinParam); final Dimension2D dimText = text.calculateDimension(ug.getStringBounder()); final double x = (x2 - x1 - dimText.getWidth()) / 2; final UTranslate tr = new UTranslate(x, -5 - dimText.getHeight()); text.drawU(ug.apply(tr)); } private UPolygon getPolygon(final double angle, final Point2D end) { final double delta = 20.0 * Math.PI / 180.0; final Point2D pt1 = TimeArrow.onCircle(end, angle + delta); final Point2D pt2 = TimeArrow.onCircle(end, angle - delta); final UPolygon polygon = new UPolygon(); polygon.addPoint(pt1.getX(), pt1.getY()); polygon.addPoint(pt2.getX(), pt2.getY()); polygon.addPoint(end.getX(), end.getY()); return polygon; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/TimeDrawing.java000066400000000000000000000034631312650303100273110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.graphic.color.Colors; public interface TimeDrawing extends TimeProjected, UDrawable { public double getHeight(); public void addChange(ChangeState change); public TextBlock getWidthHeader(StringBounder stringBounder); public void setInitialState(String initialState, Colors initialColors); public void addConstraint(TimeConstraint constraint); } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/TimeMessage.java000066400000000000000000000040271312650303100272770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.cucadiagram.Display; public class TimeMessage { private final TickInPlayer tickInPlayer1; private final TickInPlayer tickInPlayer2; private final Display label; public TimeMessage(TickInPlayer tickInPlayer1, TickInPlayer tickInPlayer2, String label) { this.tickInPlayer1 = tickInPlayer1; this.tickInPlayer2 = tickInPlayer2; this.label = Display.getWithNewlines(label); } public final Player getPlayer1() { return tickInPlayer1.getPlayer(); } public final Player getPlayer2() { return tickInPlayer2.getPlayer(); } public final TimeTick getTick1() { return tickInPlayer1.getTick(); } public final TimeTick getTick2() { return tickInPlayer2.getTick(); } public final Display getLabel() { return label; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/TimeProjected.java000066400000000000000000000027041312650303100276320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import net.sourceforge.plantuml.graphic.StringBounder; public interface TimeProjected { public IntricatedPoint getTimeProjection(StringBounder stringBounder, TimeTick tick); } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/TimeTick.java000066400000000000000000000031241312650303100266020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import java.math.BigDecimal; public class TimeTick implements Comparable { private final BigDecimal time; public TimeTick(BigDecimal time) { this.time = time; } public final BigDecimal getTime() { return time; } public int compareTo(TimeTick other) { return this.time.compareTo(other.time); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/TimeTickBuilder.java000066400000000000000000000045021312650303100301120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import java.math.BigDecimal; import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexResult; public class TimeTickBuilder { private static final String WITHOUT_AROBASE = "(\\+?)(\\d+\\.?\\d*)"; private static final String WITH_AROBASE = "@" + WITHOUT_AROBASE; public static RegexLeaf expressionAtWithoutArobase(String name) { return new RegexLeaf(name, WITHOUT_AROBASE); } public static RegexLeaf expressionAtWithArobase(String name) { return new RegexLeaf(name, WITH_AROBASE); } public static RegexLeaf optionalExpressionAtWithArobase(String name) { return new RegexLeaf(name, "(?:" + WITH_AROBASE + ")?"); } public static TimeTick parseTimeTick(String name, RegexResult arg, Clock clock) { final String number = arg.get(name, 1); if (number == null) { return clock.getNow(); } final boolean isRelative = "+".equals(arg.get(name, 0)); BigDecimal value = new BigDecimal(number); if (isRelative) { value = clock.getNow().getTime().add(value); } return new TimeTick(value); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java000066400000000000000000000161031312650303100276060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import java.awt.geom.Dimension2D; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TimingDiagram extends UmlDiagram implements Clock { private final Map players = new LinkedHashMap(); private final List messages = new ArrayList(); private final TimingRuler ruler = new TimingRuler(getSkinParam()); private TimeTick now; private Player lastPlayer; public DiagramDescription getDescription() { return new DiagramDescription("(Timing Diagram)"); } @Override public UmlDiagramType getUmlDiagramType() { return UmlDiagramType.TIMING; } @Override protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException { final double dpiFactor = 1; final double margin = 10; final ImageBuilder imageBuilder = new ImageBuilder(getSkinParam(), dpiFactor, fileFormatOption.isWithMetadata() ? getMetadata() : null, getWarningOrError(), margin, margin, getAnimation()); imageBuilder.setUDrawable(getUDrawable()); return imageBuilder.writeImageTOBEMOVED(fileFormatOption, seed(), os); } private UDrawable getUDrawable() { return new UDrawable() { public void drawU(UGraphic ug) { drawInternal(ug); } }; } public static final double marginX1 = 5; private final double marginX2 = 5; private void drawInternal(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final UTranslate lastTranslate = getUTranslateForPlayer(null, stringBounder); final double withBeforeRuler = getWithBeforeRuler(stringBounder); final double totalWith = withBeforeRuler + ruler.getWidth() + marginX1 + marginX2; final ULine border = new ULine(0, lastTranslate.getDy()); final UStroke borderStroke = new UStroke(1.7); ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(borderStroke).draw(border); ug.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(borderStroke).apply(new UTranslate(totalWith, 0)) .draw(border); ug = ug.apply(new UTranslate(marginX1, 0)); for (Player player : players.values()) { final UGraphic playerUg = ug.apply(getUTranslateForPlayer(player, stringBounder)); player.drawU(playerUg); player.drawContent(playerUg.apply(new UTranslate(withBeforeRuler, 0))); player.drawWidthHeader(playerUg); playerUg.apply(new UChangeColor(HtmlColorUtils.BLACK)).apply(borderStroke) .apply(new UTranslate(-marginX1, 0)).draw(new ULine(totalWith, 0)); } ug = ug.apply(new UTranslate(withBeforeRuler, 0)); ruler.draw(ug.apply(lastTranslate)); for (TimeMessage timeMessage : messages) { drawMessages(ug, timeMessage); } } private double getWithBeforeRuler(StringBounder stringBounder) { double width = 0; for (Player player : players.values()) { width = Math.max(width, player.getGetWidthHeader(stringBounder)); } return width; } private void drawMessages(UGraphic ug, TimeMessage message) { final Player player1 = message.getPlayer1(); final Player player2 = message.getPlayer2(); final UTranslate translate1 = getUTranslateForPlayer(player1, ug.getStringBounder()); final UTranslate translate2 = getUTranslateForPlayer(player2, ug.getStringBounder()); final IntricatedPoint pt1 = player1.getTimeProjection(ug.getStringBounder(), message.getTick1()); final IntricatedPoint pt2 = player2.getTimeProjection(ug.getStringBounder(), message.getTick2()); if (pt1 == null || pt2 == null) { return; } final TimeArrow timeArrow = TimeArrow.create(pt1.translated(translate1), pt2.translated(translate2), message.getLabel(), getSkinParam()); timeArrow.drawU(ug); } public UTranslate getUTranslateForPlayer(Player candidat, StringBounder stringBounder) { double y = 0; for (Player player : players.values()) { final Dimension2D dim = player.calculateDimension(stringBounder); if (candidat == player) { return new UTranslate(0, y); } y += dim.getHeight(); } if (candidat == null) { return new UTranslate(0, y); } throw new IllegalArgumentException(); } public void createLifeLine(String code, String full, TimingStyle type) { final Player player = new Player(code, full, type, getSkinParam(), ruler); players.put(code, player); lastPlayer = player; } public void createTimeMessage(Player player1, TimeTick time1, Player player2, TimeTick time2, String label) { final TimeMessage message = new TimeMessage(new TickInPlayer(player1, time1), new TickInPlayer(player2, time2), label); messages.add(message); } public void addTime(TimeTick time) { this.now = time; ruler.addTime(time); } public void updateNow(TimeTick time) { this.now = time; } public Player getPlayer(String code) { return players.get(code); } public TimeTick getNow() { // if (now == null) { // throw new IllegalStateException(); // } return now; } public void setLastPlayer(Player player) { this.lastPlayer = player; } public Player getLastPlayer() { return lastPlayer; } public void scaleInPixels(long tick, long pixel) { ruler.scaleInPixels(tick, pixel); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/TimingDiagramFactory.java000066400000000000000000000040451312650303100311400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.timingdiagram; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.command.Command; import net.sourceforge.plantuml.command.UmlDiagramFactory; public class TimingDiagramFactory extends UmlDiagramFactory { @Override public TimingDiagram createEmptyDiagram() { return new TimingDiagram(); } @Override protected List createCommands() { final List cmds = new ArrayList(); addCommonCommands(cmds); cmds.add(new CommandLifeLine()); cmds.add(new CommandChangeStateByPlayerCode()); cmds.add(new CommandChangeStateByTime()); cmds.add(new CommandAtTime()); cmds.add(new CommandAtPlayer()); cmds.add(new CommandTimeMessage()); cmds.add(new CommandConstraint()); cmds.add(new CommandScalePixel()); return cmds; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/TimingRuler.java000066400000000000000000000122631312650303100273360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; import java.awt.geom.Dimension2D; import java.math.BigDecimal; import java.util.Collection; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public class TimingRuler { private final SortedSet times = new TreeSet(); private long highestCommonFactor = -1; private final ISkinParam skinParam; private long tickIntervalInPixels = 50; private long tickUnitary; public void scaleInPixels(long tick, long pixel) { this.tickIntervalInPixels = pixel; this.tickUnitary = tick; } private long tickUnitary() { if (tickUnitary == 0) { return highestCommonFactor; } return tickUnitary; } private int getNbTick() { return (int) (1 + getMax().getTime().longValue() / tickUnitary()); } public double getWidth() { return getPosInPixel(new BigDecimal((getNbTick()) * tickUnitary())); } private double getPosInPixel(double time) { return time / tickUnitary() * tickIntervalInPixels; } public TimingRuler(ISkinParam skinParam) { this.skinParam = skinParam; } public void addTime(TimeTick time) { final boolean added = times.add(time); if (added) { long tick = time.getTime().longValue(); if (tick > 0) { if (highestCommonFactor == -1) { highestCommonFactor = time.getTime().longValue(); } else { highestCommonFactor = computeHighestCommonFactor(highestCommonFactor, time.getTime().longValue()); } } } } private FontConfiguration getFontConfiguration() { return new FontConfiguration(skinParam, FontParam.ACTIVITY, null); } private TextBlock getTimeTextBlock(long time) { final Display display = Display.getWithNewlines("" + time); return display.create(getFontConfiguration(), HorizontalAlignment.LEFT, skinParam); } public void draw(UGraphic ug) { ug = ug.apply(new UStroke(2.0)).apply(new UChangeColor(HtmlColorUtils.BLACK)); final double tickHeight = 5; final ULine line = new ULine(0, tickHeight); final int nb = getNbTick(); for (int i = 0; i <= nb; i++) { ug.apply(new UTranslate(tickIntervalInPixels * i, 0)).draw(line); } ug.draw(new ULine(nb * tickIntervalInPixels, 0)); for (long round : roundValues()) { final TextBlock text = getTimeTextBlock(round); final Dimension2D dim = text.calculateDimension(ug.getStringBounder()); text.drawU(ug.apply(new UTranslate(getPosInPixel(round) - dim.getWidth() / 2, tickHeight + 1))); } } private Collection roundValues() { final Set result = new TreeSet(); if (tickUnitary == 0) { for (TimeTick tick : times) { final long round = tick.getTime().longValue(); result.add(round); } } else { final int nb = getNbTick(); for (int i = 0; i <= nb; i++) { final long round = tickUnitary * i; result.add(round); } } return result; } private TimeTick getMax() { if (times.size() == 0) { throw new IllegalStateException("Empty list!"); } return times.last(); } private static long computeHighestCommonFactor(long a, long b) { long r = a; while (r != 0) { r = a % b; a = b; b = r; } return (Math.abs(a)); } public final double getPosInPixel(BigDecimal time) { return getPosInPixel(time.doubleValue()); } public final double getPosInPixel(TimeTick when) { return getPosInPixel(when.getTime()); } public final double getMaxPosInPixel() { return getPosInPixel(getMax()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/timingdiagram/TimingStyle.java000066400000000000000000000024771312650303100273530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.timingdiagram; public enum TimingStyle { ROBUST, CONCISE } plantuml-1.2017.15/src/net/sourceforge/plantuml/turing/000077500000000000000000000000001312650303100227225ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/turing/BFMachine.java000066400000000000000000000061301312650303100253410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.turing; public class BFMachine { private final char cells[] = new char[30000]; private final BFToken prg[]; private int prgPointer; private int pointer; private final StringBuilder output = new StringBuilder(); private final String input; private int inputPointer; public BFMachine(String program, String input) { prg = new BFToken[program.length() + 1]; int i = 0; for (int n = 0; n < program.length(); n++) { final BFToken token = BFToken.getToken(program.charAt(n)); if (token != null) { prg[i++] = token; } } this.input = input; } public boolean run() { for (int i = 0; i < 10000000; i++) { if (prg[prgPointer] == null) { return true; } interpret(prg[prgPointer]); prgPointer++; } return false; } private void interpret(BFToken token) { switch (token) { case NEXT: pointer++; break; case PREVIOUS: pointer--; break; case PLUS: cells[pointer]++; break; case MINUS: cells[pointer]--; break; case OUTPUT: output(cells[pointer]); break; case INPUT: final int read = input(); if (read != -1) { cells[pointer] = (char) read; } break; case BRACKET_LEFT: if (cells[pointer] == 0) { int i = 1; while (i > 0) { BFToken c2 = prg[++prgPointer]; if (c2 == BFToken.BRACKET_LEFT) i++; else if (c2 == BFToken.BRACKET_RIGHT) i--; } } break; case BRACKET_RIGHT: int i = 1; while (i > 0) { BFToken c2 = prg[--prgPointer]; if (c2 == BFToken.BRACKET_LEFT) i--; else if (c2 == BFToken.BRACKET_RIGHT) i++; } prgPointer--; break; } } private int input() { if (inputPointer < input.length()) { return input.charAt(inputPointer++); } return -1; } private void output(char c) { output.append(c); } public String getOutput() { return output.toString(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/turing/BFToken.java000066400000000000000000000035351312650303100250630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.turing; public enum BFToken { NEXT('>'), PREVIOUS('<'), PLUS('+'), MINUS('-'), OUTPUT('.'), INPUT(','), BRACKET_LEFT('['), BRACKET_RIGHT(']'); private final char c; private BFToken(char c) { this.c = c; } public char toChar() { return c; } public static BFToken getToken(char c) { switch (c) { case '>': return NEXT; case '<': return PREVIOUS; case '+': return PLUS; case '-': return MINUS; case '.': return OUTPUT; case ',': return INPUT; case '[': return BRACKET_LEFT; case ']': return BRACKET_RIGHT; default: return null; } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/000077500000000000000000000000001312650303100232145ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/AbstractCommonUGraphic.java000066400000000000000000000077201312650303100304240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import net.sourceforge.plantuml.graphic.HtmlColor; public abstract class AbstractCommonUGraphic implements UGraphic { private UStroke stroke = new UStroke(); private UPattern pattern = UPattern.FULL; private boolean hidden = false; private HtmlColor backColor = null; private HtmlColor color = null; private UTranslate translate = new UTranslate(); private final ColorMapper colorMapper; private UClip clip; private double scale = 1; public UGraphic apply(UChange change) { final AbstractCommonUGraphic copy = copyUGraphic(); if (change instanceof UTranslate) { copy.translate = ((UTranslate) change).scaled(scale).compose(copy.translate); } else if (change instanceof UClip) { copy.clip = (UClip) change; copy.clip = copy.clip.translate(getTranslateX(), getTranslateY()); } else if (change instanceof UStroke) { copy.stroke = (UStroke) change; } else if (change instanceof UPattern) { copy.pattern = (UPattern) change; } else if (change instanceof UHidden) { copy.hidden = change == UHidden.HIDDEN; } else if (change instanceof UChangeBackColor) { copy.backColor = ((UChangeBackColor) change).getBackColor(); } else if (change instanceof UChangeColor) { copy.color = ((UChangeColor) change).getColor(); } else if (change instanceof UScale) { final double factor = ((UScale) change).getScale(); copy.scale = scale * factor; } return copy; } final public UClip getClip() { return clip; } public AbstractCommonUGraphic(ColorMapper colorMapper) { this.colorMapper = colorMapper; } protected AbstractCommonUGraphic(AbstractCommonUGraphic other) { this.colorMapper = other.colorMapper; this.translate = other.translate; this.clip = other.clip; this.stroke = other.stroke; this.pattern = other.pattern; this.hidden = other.hidden; this.color = other.color; this.backColor = other.backColor; this.scale = other.scale; } protected abstract AbstractCommonUGraphic copyUGraphic(); final public UParam getParam() { return new UParam() { public boolean isHidden() { return hidden; } public UStroke getStroke() { return stroke; } public HtmlColor getColor() { return color; } public HtmlColor getBackcolor() { return backColor; } public UPattern getPattern() { return pattern; } public double getScale() { return scale; } }; } final protected double getTranslateX() { return translate.getDx(); } final protected double getTranslateY() { return translate.getDy(); } final public ColorMapper getColorMapper() { return new ColorMapperTransparentWrapper(colorMapper); } public void flushUg() { } public boolean matchesProperty(String propertyName) { return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/AbstractPlacementStrategy.java000066400000000000000000000061701312650303100312020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; public abstract class AbstractPlacementStrategy implements PlacementStrategy { private final StringBounder stringBounder; private final Map dimensions = new LinkedHashMap(); public AbstractPlacementStrategy(StringBounder stringBounder) { this.stringBounder = stringBounder; } public void add(TextBlock block) { this.dimensions.put(block, block.calculateDimension(stringBounder)); } protected Map getDimensions() { return dimensions; } protected double getSumWidth() { return getSumWidth(dimensions.values().iterator()); } protected double getSumHeight() { return getSumHeight(dimensions.values().iterator()); } protected double getMaxHeight() { return getMaxHeight(dimensions.values().iterator()); } protected double getMaxWidth() { return getMaxWidth(dimensions.values().iterator()); } protected double getSumWidth(Iterator it) { double result = 0; while (it.hasNext()) { result += it.next().getWidth(); } return result; } protected double getSumHeight(Iterator it) { double result = 0; while (it.hasNext()) { result += it.next().getHeight(); } return result; } protected double getMaxWidth(Iterator it) { double result = 0; while (it.hasNext()) { result = Math.max(result, it.next().getWidth()); } return result; } protected double getMaxHeight(Iterator it) { double result = 0; while (it.hasNext()) { result = Math.max(result, it.next().getHeight()); } return result; } protected final StringBounder getStringBounder() { return stringBounder; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/AbstractShadowable.java000066400000000000000000000027761312650303100276300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; abstract class AbstractShadowable implements Shadowable { private double deltaShadow; public double getDeltaShadow() { return deltaShadow; } public void setDeltaShadow(double deltaShadow) { this.deltaShadow = deltaShadow; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/AbstractUGraphic.java000066400000000000000000000057011312650303100272500ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.util.HashMap; import java.util.Map; public abstract class AbstractUGraphic extends AbstractCommonUGraphic { private final O graphic; private final Map, UDriver> drivers = new HashMap, UDriver>(); public AbstractUGraphic(ColorMapper colorMapper, O graphic) { super(colorMapper); this.graphic = graphic; } protected AbstractUGraphic(AbstractUGraphic other) { super(other); this.graphic = other.graphic; // this.drivers.putAll(other.drivers); } protected final O getGraphicObject() { return graphic; } protected boolean manageHiddenAutomatically() { return true; } final protected void registerDriver(Class cl, UDriver driver) { this.drivers.put(cl, driver); } public final void draw(UShape shape) { if (shape instanceof UEmpty) { return; } if (shape instanceof UComment) { drawComment((UComment) shape); return; } final UDriver driver = drivers.get(shape.getClass()); if (driver == null) { throw new UnsupportedOperationException(shape.getClass().toString() + " " + this.getClass()); } if (getParam().isHidden() && manageHiddenAutomatically()) { return; } beforeDraw(); if (shape instanceof Scalable) { final double scale = getParam().getScale(); shape = ((Scalable) shape).getScaled(scale); driver.draw(shape, getTranslateX(), getTranslateY(), getColorMapper(), getParam(), graphic); } else { driver.draw(shape, getTranslateX(), getTranslateY(), getColorMapper(), getParam(), graphic); } afterDraw(); } protected void drawComment(UComment shape) { } protected void beforeDraw() { } protected void afterDraw() { } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/AbstractUGraphicHorizontalLine.java000066400000000000000000000043561312650303100321370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import net.sourceforge.plantuml.graphic.UGraphicDelegator; public abstract class AbstractUGraphicHorizontalLine extends UGraphicDelegator { private UTranslate translate = new UTranslate(); public UGraphic apply(UChange change) { final AbstractUGraphicHorizontalLine result; if (change instanceof UTranslate) { result = copy(getUg()); result.translate = this.translate.compose((UTranslate) change); } else { result = copy(getUg().apply(change)); result.translate = this.translate; } return result; } protected abstract AbstractUGraphicHorizontalLine copy(UGraphic ug); protected AbstractUGraphicHorizontalLine(UGraphic ug) { super(ug); } protected abstract void drawHline(UGraphic ug, UHorizontalLine line, UTranslate translate); public void draw(UShape shape) { if (shape instanceof UHorizontalLine) { drawHline(getUg(), (UHorizontalLine) shape, new UTranslate(0, translate.getDy())); } else { getUg().apply(translate).draw(shape); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/ClipContainer.java000066400000000000000000000025071312650303100266150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic; public interface ClipContainer { public UClip getClip(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/ColorChangerMonochrome.java000066400000000000000000000031041312650303100304520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.Color; public class ColorChangerMonochrome { public Color getChangedColor(Color color) { if (color==null) { return null; } final int grayScale = (int) (color.getRed() * .3 + color.getGreen() * .59 + color.getBlue() * .11); return new Color(grayScale, grayScale, grayScale); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/ColorMapper.java000066400000000000000000000026451312650303100263110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.Color; import net.sourceforge.plantuml.graphic.HtmlColor; public interface ColorMapper { Color getMappedColor(HtmlColor color); } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/ColorMapperIdentity.java000066400000000000000000000036271312650303100300240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.Color; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorSimple; import net.sourceforge.plantuml.graphic.HtmlColorTransparent; import net.sourceforge.plantuml.graphic.HtmlColorUserDef; public class ColorMapperIdentity implements ColorMapper { public Color getMappedColor(HtmlColor color) { if (color == null) { return null; } if (color instanceof HtmlColorTransparent) { throw new UnsupportedOperationException(); } if (color instanceof HtmlColorUserDef) { // Impact on JCCKIT return Color.WHITE; } return ((HtmlColorSimple) color).getColor999(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/ColorMapperMonochrome.java000066400000000000000000000036051312650303100303350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.Color; import net.sourceforge.plantuml.graphic.HtmlColor; public class ColorMapperMonochrome implements ColorMapper { private final boolean reverse; public ColorMapperMonochrome(boolean reverse) { this.reverse = reverse; } public Color getMappedColor(HtmlColor htmlColor) { if (htmlColor == null) { return null; } final Color color = new ColorMapperIdentity().getMappedColor(htmlColor); int grayScale = (int) (color.getRed() * .3 + color.getGreen() * .59 + color.getBlue() * .11); if (reverse) { grayScale = 255 - grayScale; } return new Color(grayScale, grayScale, grayScale); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/ColorMapperReverse.java000066400000000000000000000034471312650303100276460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.Color; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorSimple; public class ColorMapperReverse implements ColorMapper { private final ColorOrder order; public ColorMapperReverse(ColorOrder order) { this.order = order; } public Color getMappedColor(HtmlColor color) { if (color == null) { return null; } return getReverse(((HtmlColorSimple) color).getColor999()); } private Color getReverse(Color color) { return order.getReverse(color); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/ColorMapperTransparentWrapper.java000066400000000000000000000035611312650303100320720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.Color; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorTransparent; public class ColorMapperTransparentWrapper implements ColorMapper { private final ColorMapper mapper; public ColorMapperTransparentWrapper(ColorMapper mapper) { if (mapper == null) { throw new IllegalArgumentException(); } this.mapper = mapper; } public Color getMappedColor(HtmlColor color) { if (color == null) { return null; } if (color instanceof HtmlColorTransparent) { return Color.WHITE; } return mapper.getMappedColor(color); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/ColorOrder.java000066400000000000000000000044761312650303100261440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.Color; public enum ColorOrder { RGB, RBG, GRB, GBR, BRG, BGR; public Color getColor(Color color) { if (this == RGB) { return new Color(color.getRed(), color.getGreen(), color.getBlue()); } if (this == RBG) { return new Color(color.getRed(), color.getBlue(), color.getGreen()); } if (this == GRB) { return new Color(color.getGreen(), color.getRed(), color.getBlue()); } if (this == GBR) { return new Color(color.getGreen(), color.getBlue(), color.getRed()); } if (this == BRG) { return new Color(color.getBlue(), color.getRed(), color.getGreen()); } if (this == BGR) { return new Color(color.getBlue(), color.getGreen(), color.getRed()); } throw new IllegalStateException(); } public Color getReverse(Color color) { color = this.getColor(color); return new Color(255 - color.getRed(), 255 - color.getGreen(), 255 - color.getBlue()); } public static ColorOrder fromString(String order) { try { return ColorOrder.valueOf(order.toUpperCase()); } catch (Exception e) { return null; } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/CompressionTransform.java000066400000000000000000000034201312650303100302530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.util.List; public class CompressionTransform { private final List all; public CompressionTransform(SlotSet slotSet) { this.all = slotSet.getSlots(); } public double transform(double v) { return v - getCompressDelta(v); } private double getCompressDelta(double v) { double result = 0; for (Slot s : all) { if (s.getStart() > v) { continue; } if (v > s.getEnd()) { result += s.size(); } else { result += v - s.getStart(); } } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/FontChecker.java000066400000000000000000000200021312650303100262440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.Font; import java.awt.GraphicsEnvironment; import java.awt.Shape; import java.awt.font.TextLayout; import java.awt.geom.PathIterator; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.Arrays; import java.util.HashSet; import java.util.Random; import java.util.Set; import javax.imageio.ImageIO; import javax.xml.transform.TransformerException; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.svg.SvgGraphics; public class FontChecker { final private UFont font; private static final Set SQUARRE = new HashSet(Arrays.asList("MI=I=XM=I=IX", "MI=I=XM=I=IXMI=I=XM=I=IX")); public FontChecker(UFont font) { this.font = font; } public boolean isCharOk(char c) { return SQUARRE.contains(getCharDesc(c)) == false; } static private String getType(int type, double oldX, double oldY, double x, double y) { if (type == PathIterator.SEG_CLOSE) { return "X"; } if (type == PathIterator.SEG_LINETO) { if (oldX == x) { return "I"; } if (oldY == y) { return "="; } return "L"; } if (type == PathIterator.SEG_MOVETO) { return "M"; } if (type == PathIterator.SEG_QUADTO) { return "Q"; } if (type == PathIterator.SEG_CUBICTO) { return "C"; } throw new IllegalArgumentException(); } public String getCharDesc(char c) { final TextLayout t = new TextLayout("" + c, font.getFont(), TextBlockUtils.getFontRenderContext()); final Shape sh = t.getOutline(null); final double current[] = new double[6]; final PathIterator it = sh.getPathIterator(null); int sum = 0; final StringBuilder result = new StringBuilder(); while (it.isDone() == false) { final double oldX = current[0]; final double oldY = current[1]; final int nb = it.currentSegment(current); sum += nb; result.append(getType(nb, oldX, oldY, current[0], current[1])); it.next(); } return result.toString(); } public String getCharDescVerbose(char c) { final TextLayout t = new TextLayout("" + c, font.getFont(), TextBlockUtils.getFontRenderContext()); final Shape sh = t.getOutline(null); final double current[] = new double[6]; final PathIterator it = sh.getPathIterator(null); int sum = 0; final StringBuilder result = new StringBuilder(); while (it.isDone() == false) { final double oldX = current[0]; final double oldY = current[1]; final int nb = it.currentSegment(current); sum += nb; result.append(getType(nb, oldX, oldY, current[0], current[1])); appendValue(result, current); it.next(); } return result.toString(); } private void appendValue(StringBuilder result, double[] current) { for (double v : current) { final int i = (int) (v * 100); result.append(i); result.append(":"); } } public void printChar(final PrintWriter pw, char c) throws IOException, TransformerException { pw.println("

    "); final int ascii = (int) c; pw.println(ascii + " - " + Integer.toHexString(ascii) + " - "); pw.println("&#" + ascii + ";"); final String svg = getSvgImage(c); pw.println(svg); } private String getSvgImage(char c) throws IOException, TransformerException { final SvgGraphics svg = new SvgGraphics(new Dimension2DDouble(0, 0), 1.0, null, 42); svg.setStrokeColor("black"); svg.svgImage(getBufferedImage(c), 0, 0); final ByteArrayOutputStream os = new ByteArrayOutputStream(); svg.createXml(os); os.close(); return new String(os.toByteArray()); } public BufferedImage getBufferedImage(final char c) throws IOException { assert c != '\t'; final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1, null, null, null, 0, 0, null, false); final double dim = 20; imageBuilder.setUDrawable(new UDrawable() { public void drawU(UGraphic ug) { ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK)); ug.draw(new URectangle(dim - 1, dim - 1)); if (ug instanceof UGraphic2) { ug = (UGraphic2) ug.apply(new UTranslate(dim / 3, 2 * dim / 3)); final UText text = new UText("" + c, FontConfiguration.blackBlueTrue(font)); ug.draw(text); } } }); final ByteArrayOutputStream os = new ByteArrayOutputStream(); imageBuilder.writeImageTOBEMOVED(new FileFormatOption(FileFormat.PNG), 42, os); os.close(); return ImageIO.read(new ByteArrayInputStream(os.toByteArray())); } // public BufferedImage getBufferedImageOld(char c) throws IOException { // final double dim = 20; // UGraphic2 ug = new FileFormatOption(FileFormat.PNG).createUGraphic(new Dimension2DDouble(dim, dim)); // ug = (UGraphic2) ug.apply(new UChangeColor(HtmlColorUtils.BLACK)); // ug.draw(new URectangle(dim - 1, dim - 1)); // ug = (UGraphic2) ug.apply(new UTranslate(dim / 3, 2 * dim / 3)); // final UText text = new UText("" + c, new FontConfiguration(font, HtmlColorUtils.BLACK)); // ug.draw(text); // final ByteArrayOutputStream os = new ByteArrayOutputStream(); // ug.writeImageTOBEMOVED(os, null, 96); // os.close(); // return ImageIO.read(new ByteArrayInputStream(os.toByteArray())); // } public static void main(String[] args) throws IOException, TransformerException { final String name = args[0]; final int size = Integer.parseInt(args[1]); final int v1 = Integer.parseInt(args[2]); final int v2 = Integer.parseInt(args[3]); final File f = new File("fontchecker-" + name + "-" + v1 + "-" + v2 + ".html"); final FontChecker fc = new FontChecker(new UFont(name, Font.PLAIN, size)); final PrintWriter pw = new PrintWriter(f); pw.println(""); pw.println("

    PROBLEM

    "); for (int i = v1; i <= v2; i++) { final char c = (char) i; final boolean ok = fc.isCharOk(c); if (ok == false) { fc.printChar(pw, c); pw.println("

    "); } } pw.println("

    OK

    "); final String allFontNames[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); for (int i = v1; i <= v2; i++) { final char c = (char) i; final boolean ok = fc.isCharOk(c); if (ok) { fc.printChar(pw, c); final String desc = fc.getCharDescVerbose(c); for (String n : allFontNames) { final FontChecker other = new FontChecker(new UFont(n, Font.PLAIN, size)); final String descOther = other.getCharDescVerbose(c); if (desc.equals(descOther)) { pw.println(" "); pw.println(n); } } pw.println("

    "); } } pw.println(""); pw.close(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java000066400000000000000000000372721312650303100264230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Image; import java.awt.geom.AffineTransform; import java.awt.geom.Dimension2D; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.util.Set; import java.util.concurrent.Semaphore; import javax.imageio.ImageIO; import javax.swing.ImageIcon; import net.sourceforge.plantuml.AnimatedGifEncoder; import net.sourceforge.plantuml.CMapData; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.EmptyImageBuilder; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.FileUtils; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.anim.AffineTransformation; import net.sourceforge.plantuml.anim.Animation; import net.sourceforge.plantuml.api.ImageDataComplex; import net.sourceforge.plantuml.api.ImageDataSimple; import net.sourceforge.plantuml.braille.UGraphicBraille; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.eps.EpsStrategy; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.graphic.HtmlColorSimple; import net.sourceforge.plantuml.graphic.HtmlColorTransparent; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.mjpeg.MJPEGGenerator; import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.ugraphic.crossing.UGraphicCrossing; import net.sourceforge.plantuml.ugraphic.eps.UGraphicEps; import net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d; import net.sourceforge.plantuml.ugraphic.hand.UGraphicHandwritten; import net.sourceforge.plantuml.ugraphic.html5.UGraphicHtml5; import net.sourceforge.plantuml.ugraphic.svg.UGraphicSvg; import net.sourceforge.plantuml.ugraphic.tikz.UGraphicTikz; import net.sourceforge.plantuml.ugraphic.visio.UGraphicVdx; public class ImageBuilder { private final ColorMapper colorMapper; private final double dpiFactor; private final HtmlColor mybackcolor; private final String metadata; private final String warningOrError; private final double margin1; private final double margin2; private final Animation animation; private final boolean useHandwritten; private UDrawable udrawable; private final double externalMargin1; private final double externalMargin2; private UStroke borderStroke; private HtmlColor borderColor; private double borderCorner; public ImageBuilder(ColorMapper colorMapper, double dpiFactor, HtmlColor mybackcolor, String metadata, String warningOrError, double margin1, double margin2, Animation animation, boolean useHandwritten) { this.colorMapper = colorMapper; this.dpiFactor = dpiFactor; this.mybackcolor = mybackcolor; this.metadata = metadata; this.warningOrError = warningOrError; this.margin1 = margin1; this.margin2 = margin2; this.animation = animation; this.useHandwritten = useHandwritten; this.externalMargin1 = 0; this.externalMargin2 = 0; this.borderStroke = null; this.borderColor = null; this.borderCorner = 0; } public ImageBuilder(ISkinParam skinParam, double dpiFactor, String metadata, String warningOrError, double margin1, double margin2, Animation animation) { this(skinParam, dpiFactor, metadata, warningOrError, margin1, margin2, animation, skinParam .getBackgroundColor()); } public ImageBuilder(ISkinParam skinParam, double dpiFactor, String metadata, String warningOrError, double margin1, double margin2, Animation animation, HtmlColor backColor) { final Rose rose = new Rose(); this.borderColor = rose.getHtmlColor(skinParam, ColorParam.diagramBorder); this.borderStroke = skinParam.getThickness(LineParam.diagramBorder, null); this.borderCorner = skinParam.getRoundCorner("diagramBorder", null); if (borderStroke == null && borderColor != null) { this.borderStroke = new UStroke(); } this.colorMapper = skinParam.getColorMapper(); this.dpiFactor = dpiFactor; this.mybackcolor = backColor; this.metadata = metadata; this.warningOrError = warningOrError; this.margin1 = margin1; this.margin2 = margin2; this.animation = animation; this.useHandwritten = skinParam.handwritten(); this.externalMargin1 = 0; this.externalMargin2 = 0; } public void setUDrawable(UDrawable udrawable) { this.udrawable = udrawable; } public ImageData writeImageTOBEMOVED(FileFormatOption fileFormatOption, long seed, OutputStream os) throws IOException { final FileFormat fileFormat = fileFormatOption.getFileFormat(); if (fileFormat == FileFormat.MJPEG) { return writeImageMjpeg(os, fileFormat.getDefaultStringBounder()); } else if (fileFormat == FileFormat.ANIMATED_GIF) { return writeImageAnimatedGif(os, fileFormat.getDefaultStringBounder()); } return writeImageInternal(fileFormatOption, seed, os, animation); } private static Semaphore SEMAPHORE_SMALL; private static Semaphore SEMAPHORE_BIG; private static int MAX_PRICE = 0; public static void setMaxPixel(int max) { MAX_PRICE = max / 2; SEMAPHORE_SMALL = new Semaphore(MAX_PRICE, true); SEMAPHORE_BIG = new Semaphore(MAX_PRICE, true); } private int getPrice(FileFormatOption fileFormatOption, Dimension2D dim) { // if (fileFormatOption.getFileFormat() != FileFormat.PNG) { // return 0; // } if (MAX_PRICE == 0) { return 0; } final int price = Math.min(MAX_PRICE, ((int) (dim.getHeight() * dpiFactor)) * ((int) (dim.getWidth() * dpiFactor))); return price; } private Semaphore getSemaphore(int price) { if (price == 0) { return null; } if (price == MAX_PRICE) { return SEMAPHORE_BIG; } return SEMAPHORE_SMALL; } private ImageData writeImageInternal(FileFormatOption fileFormatOption, long seed, OutputStream os, Animation animationArg) throws IOException { Dimension2D dim = getFinalDimension(fileFormatOption.getDefaultStringBounder()); double dx = 0; double dy = 0; if (animationArg != null) { final MinMax minmax = animation.getMinMax(dim); animationArg.setDimension(dim); dim = minmax.getDimension(); dx = -minmax.getMinX(); dy = -minmax.getMinY(); } final int price = getPrice(fileFormatOption, dim); final Semaphore semaphore = getSemaphore(price); if (semaphore != null) { try { semaphore.acquire(price); } catch (InterruptedException e) { e.printStackTrace(); throw new IOException(e); } } try { final UGraphic2 ug = createUGraphic(fileFormatOption, seed, dim, animationArg, dx, dy); UGraphic ug2 = ug; if (externalMargin1 > 0) { ug2 = ug2.apply(new UTranslate(externalMargin1, externalMargin1)); } if (borderStroke != null) { final HtmlColor color = borderColor == null ? HtmlColorUtils.BLACK : borderColor; final URectangle shape = new URectangle( dim.getWidth() - externalMargin() - borderStroke.getThickness(), dim.getHeight() - externalMargin() - borderStroke.getThickness(), borderCorner, borderCorner); ug2.apply(new UChangeColor(color)).apply(borderStroke).draw(shape); } if (externalMargin1 > 0) { ug2 = ug2.apply(new UTranslate(externalMargin2, externalMargin2)); } ug2 = ug2.apply(new UTranslate(margin1, margin1)); final UGraphic ugDecored = handwritten(ug2); udrawable.drawU(ugDecored); ugDecored.flushUg(); ug.writeImageTOBEMOVED(os, metadata, 96); os.flush(); if (ug instanceof UGraphicG2d) { final Set urls = ((UGraphicG2d) ug).getAllUrlsEncountered(); if (urls.size() > 0) { final CMapData cmap = CMapData.cmapString(urls, dpiFactor); return new ImageDataComplex(dim, cmap, warningOrError); } } return new ImageDataSimple(dim); } finally { if (semaphore != null) { semaphore.release(price); } } } private double externalMargin() { return 2 * (externalMargin1 + externalMargin2); } public Dimension2D getFinalDimension(StringBounder stringBounder) { final LimitFinder limitFinder = new LimitFinder(stringBounder, true); udrawable.drawU(limitFinder); Dimension2D dim = new Dimension2DDouble(limitFinder.getMaxX() + 1 + margin1 + margin2 + externalMargin(), limitFinder.getMaxY() + 1 + margin1 + margin2 + externalMargin()); return dim; } private UGraphic handwritten(UGraphic ug) { if (useHandwritten) { return new UGraphicHandwritten(ug); } if (OptionFlags.OMEGA_CROSSING) { return new UGraphicCrossing(ug); } else { return ug; } } private ImageData writeImageMjpeg(OutputStream os, StringBounder stringBounder) throws IOException { final LimitFinder limitFinder = new LimitFinder(stringBounder, true); udrawable.drawU(limitFinder); final Dimension2D dim = new Dimension2DDouble(limitFinder.getMaxX() + 1 + margin1 + margin2, limitFinder.getMaxY() + 1 + margin1 + margin2); final File f = new File("c:/tmp.avi"); final int nbframe = 100; final MJPEGGenerator m = new MJPEGGenerator(f, getAviImage(null).getWidth(null), getAviImage(null).getHeight( null), 12.0, nbframe); for (int i = 0; i < nbframe; i++) { // AffineTransform at = AffineTransform.getRotateInstance(1.0); AffineTransform at = AffineTransform.getTranslateInstance(dim.getWidth() / 2, dim.getHeight() / 2); at.rotate(90.0 * Math.PI / 180.0 * i / 100); at.translate(-dim.getWidth() / 2, -dim.getHeight() / 2); // final AffineTransform at = AffineTransform.getTranslateInstance(i, 0); // final ImageIcon ii = new ImageIcon(getAviImage(at)); // m.addImage(ii.getImage()); throw new UnsupportedOperationException(); } m.finishAVI(); FileUtils.copyToStream(f, os); return new ImageDataSimple(dim); } private ImageData writeImageAnimatedGif(OutputStream os, StringBounder stringBounder) throws IOException { final LimitFinder limitFinder = new LimitFinder(stringBounder, true); udrawable.drawU(limitFinder); final Dimension2D dim = new Dimension2DDouble(limitFinder.getMaxX() + 1 + margin1 + margin2, limitFinder.getMaxY() + 1 + margin1 + margin2); final MinMax minmax = animation.getMinMax(dim); final AnimatedGifEncoder e = new AnimatedGifEncoder(); // e.setQuality(1); e.setRepeat(0); e.start(os); // e.setDelay(1000); // 1 frame per sec // e.setDelay(100); // 10 frame per sec e.setDelay(60); // 16 frame per sec // e.setDelay(50); // 20 frame per sec for (AffineTransformation at : animation.getAll()) { final ImageIcon ii = new ImageIcon(getAviImage(at)); e.addFrame((BufferedImage) ii.getImage()); } e.finish(); return new ImageDataSimple(dim); } private Image getAviImage(AffineTransformation affineTransform) throws IOException { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); writeImageInternal(new FileFormatOption(FileFormat.PNG), 42, baos, Animation.singleton(affineTransform)); baos.close(); final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); final Image im = ImageIO.read(bais); bais.close(); return im; } private UGraphic2 createUGraphic(FileFormatOption fileFormatOption, long seed, final Dimension2D dim, Animation animationArg, double dx, double dy) { final FileFormat fileFormat = fileFormatOption.getFileFormat(); switch (fileFormat) { case PNG: return createUGraphicPNG(colorMapper, dpiFactor, dim, mybackcolor, animationArg, dx, dy); case SVG: return createUGraphicSVG(colorMapper, dpiFactor, dim, mybackcolor, fileFormatOption.getSvgLinkTarget(), fileFormatOption.getHoverColor(), seed); case EPS: return new UGraphicEps(colorMapper, EpsStrategy.getDefault2()); case EPS_TEXT: return new UGraphicEps(colorMapper, EpsStrategy.WITH_MACRO_AND_TEXT); case HTML5: return new UGraphicHtml5(colorMapper); case VDX: return new UGraphicVdx(colorMapper); case LATEX: return new UGraphicTikz(colorMapper, dpiFactor, true); case LATEX_NO_PREAMBLE: return new UGraphicTikz(colorMapper, dpiFactor, false); case BRAILLE_PNG: return new UGraphicBraille(colorMapper, fileFormat); default: throw new UnsupportedOperationException(fileFormat.toString()); } } private UGraphic2 createUGraphicSVG(ColorMapper colorMapper, double scale, Dimension2D dim, HtmlColor mybackcolor, String svgLinkTarget, String hover, long seed) { Color backColor = Color.WHITE; if (mybackcolor instanceof HtmlColorSimple) { backColor = colorMapper.getMappedColor(mybackcolor); } final UGraphicSvg ug; if (mybackcolor instanceof HtmlColorGradient) { ug = new UGraphicSvg(dim, colorMapper, (HtmlColorGradient) mybackcolor, false, scale, svgLinkTarget, hover, seed); } else if (backColor == null || backColor.equals(Color.WHITE)) { ug = new UGraphicSvg(dim, colorMapper, false, scale, svgLinkTarget, hover, seed); } else { ug = new UGraphicSvg(dim, colorMapper, StringUtils.getAsHtml(backColor), false, scale, svgLinkTarget, hover, seed); } return ug; } private UGraphic2 createUGraphicPNG(ColorMapper colorMapper, double dpiFactor, final Dimension2D dim, HtmlColor mybackcolor, Animation affineTransforms, double dx, double dy) { Color backColor = Color.WHITE; if (mybackcolor instanceof HtmlColorSimple) { backColor = colorMapper.getMappedColor(mybackcolor); } else if (mybackcolor instanceof HtmlColorTransparent) { backColor = null; } /* * if (rotation) { builder = new EmptyImageBuilder((int) (dim.getHeight() * dpiFactor), (int) (dim.getWidth() * * dpiFactor), backColor); graphics2D = builder.getGraphics2D(); graphics2D.rotate(-Math.PI / 2); * graphics2D.translate(-builder.getBufferedImage().getHeight(), 0); } else { */ final EmptyImageBuilder builder = new EmptyImageBuilder((int) (dim.getWidth() * dpiFactor), (int) (dim.getHeight() * dpiFactor), backColor); final Graphics2D graphics2D = builder.getGraphics2D(); // } final UGraphicG2d ug = new UGraphicG2d(colorMapper, graphics2D, dpiFactor, affineTransforms == null ? null : affineTransforms.getFirst(), dx, dy); ug.setBufferedImage(builder.getBufferedImage()); final BufferedImage im = ((UGraphicG2d) ug).getBufferedImage(); if (mybackcolor instanceof HtmlColorGradient) { ug.apply(new UChangeBackColor(mybackcolor)).draw(new URectangle(im.getWidth(), im.getHeight())); } return ug; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/InflaterSet.java000066400000000000000000000035321312650303100263020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.util.ArrayList; import java.util.List; public class InflaterSet { static class Inflater { private final double start; private final double size; private Inflater(double start, double size) { this.start = start; this.size = size; } } private final List all = new ArrayList(); public void addInflater(double start, double size) { all.add(new Inflater(start, size)); } public double inflate(double v) { double result = v; for (Inflater in : all) { if (v > in.start) { result += in.size; } } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/LimitFinder.java000066400000000000000000000157611312650303100262770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.posimo.DotPath; public class LimitFinder implements UGraphic { public boolean matchesProperty(String propertyName) { return false; } public UGraphic apply(UChange change) { if (change instanceof UTranslate) { return new LimitFinder(stringBounder, minmax, translate.compose((UTranslate) change), clip); } else if (change instanceof UStroke) { return new LimitFinder(this); } else if (change instanceof UChangeBackColor) { return new LimitFinder(this); } else if (change instanceof UChangeColor) { return new LimitFinder(this); } else if (change instanceof UHidden) { return new LimitFinder(this); } else if (change instanceof UAntiAliasing) { return new LimitFinder(this); } else if (change instanceof UClip) { final LimitFinder copy = new LimitFinder(this); copy.clip = (UClip) change; copy.clip = copy.clip.translate(translate); return copy; } throw new UnsupportedOperationException(change.getClass().toString()); } private final StringBounder stringBounder; private final UTranslate translate; private final MinMaxMutable minmax; private UClip clip; public LimitFinder(StringBounder stringBounder, boolean initToZero) { this(stringBounder, MinMaxMutable.getEmpty(initToZero), new UTranslate(), null); } private LimitFinder(StringBounder stringBounder, MinMaxMutable minmax, UTranslate translate, UClip clip) { this.stringBounder = stringBounder; this.minmax = minmax; this.translate = translate; this.clip = clip; } private LimitFinder(LimitFinder other) { this(other.stringBounder, other.minmax, other.translate, other.clip); } public StringBounder getStringBounder() { return stringBounder; } public UParam getParam() { return new UParamNull(); } private void addPoint(double x, double y) { if (clip == null || clip.isInside(x, y)) { minmax.addPoint(x, y); } } public void draw(UShape shape) { final double x = translate.getDx(); final double y = translate.getDy(); if (shape instanceof UText) { drawText(x, y, (UText) shape); } else if (shape instanceof ULine) { drawULine(x, y, (ULine) shape); } else if (shape instanceof UEllipse) { drawEllipse(x, y, (UEllipse) shape); } else if (shape instanceof UPolygon) { drawUPolygon(x, y, (UPolygon) shape); } else if (shape instanceof UPath) { drawUPath(x, y, (UPath) shape); } else if (shape instanceof URectangle) { drawRectangle(x, y, (URectangle) shape); } else if (shape instanceof DotPath) { drawDotPath(x, y, (DotPath) shape); } else if (shape instanceof UImage) { drawImage(x, y, (UImage) shape); } else if (shape instanceof UImageSvg) { drawImageSvg(x, y, (UImageSvg) shape); } else if (shape instanceof UComment) { } else if (shape instanceof UEmpty) { drawEmpty(x, y, (UEmpty) shape); } else if (shape instanceof TextBlock) { final TextBlock tb = (TextBlock) shape; tb.drawU(this); } else if (shape instanceof UCenteredCharacter) { // To be done } else if (shape instanceof UPixel) { addPoint(x, y); } else { throw new UnsupportedOperationException(shape.getClass().getName()); } } private void drawEmpty(double x, double y, UEmpty shape) { addPoint(x, y); addPoint(x + shape.getWidth(), y + shape.getHeight()); } private void drawUPath(double x, double y, UPath shape) { addPoint(x + shape.getMinX(), y + shape.getMinY()); addPoint(x + shape.getMaxX(), y + shape.getMaxY()); } private final static double HACK_X_FOR_POLYGON = 10; private void drawUPolygon(double x, double y, UPolygon shape) { if (shape.getPoints().size() == 0) { return; } addPoint(x + shape.getMinX() - HACK_X_FOR_POLYGON, y + shape.getMinY()); addPoint(x + shape.getMaxX() + HACK_X_FOR_POLYGON, y + shape.getMaxY()); } private void drawULine(double x, double y, ULine shape) { addPoint(x, y); addPoint(x + shape.getDX(), y + shape.getDY()); } private void drawRectangle(double x, double y, URectangle shape) { addPoint(x, y); addPoint(x + shape.getWidth() - 1, y + shape.getHeight() - 1); } private void drawDotPath(double x, double y, DotPath shape) { final MinMax shapeMinMax = shape.getMinMax(); addPoint(x + shapeMinMax.getMinX(), y + shapeMinMax.getMinY()); addPoint(x + shapeMinMax.getMaxX(), y + shapeMinMax.getMaxY()); } private void drawImage(double x, double y, UImage shape) { addPoint(x, y); addPoint(x + shape.getWidth() - 1, y + shape.getHeight() - 1); } private void drawImageSvg(double x, double y, UImageSvg shape) { addPoint(x, y); addPoint(x + shape.getWidth() - 1, y + shape.getHeight() - 1); } private void drawEllipse(double x, double y, UEllipse shape) { addPoint(x, y); addPoint(x + shape.getWidth() - 1, y + shape.getHeight() - 1); } private void drawText(double x, double y, UText text) { final Dimension2D dim = stringBounder.calculateDimension(text.getFontConfiguration().getFont(), text.getText()); y -= dim.getHeight() - 1.5; addPoint(x, y); addPoint(x, y + dim.getHeight()); addPoint(x + dim.getWidth(), y); addPoint(x + dim.getWidth(), y + dim.getHeight()); } public ColorMapper getColorMapper() { return new ColorMapperIdentity(); } public void startUrl(Url url) { } public void closeAction() { } public double getMaxX() { return minmax.getMaxX(); } public double getMaxY() { return minmax.getMaxY(); } public double getMinX() { return minmax.getMinX(); } public double getMinY() { return minmax.getMinY(); } public MinMax getMinMax() { if (minmax.isInfinity()) { return MinMax.getEmpty(true); } return MinMax.fromMutable(minmax); } public void flushUg() { } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/MinMax.java000066400000000000000000000073151312650303100252560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; public class MinMax { private final double maxX; private final double maxY; private final double minX; private final double minY; public static MinMax getEmpty(boolean initToZero) { if (initToZero) { return new MinMax(0, 0, 0, 0); } return new MinMax(Double.MAX_VALUE, Double.MAX_VALUE, -Double.MAX_VALUE, -Double.MAX_VALUE); } @Override public String toString() { return "(" + minX + "," + minY + ")->(" + maxX + "," + maxY + ")"; } public static MinMax fromMutable(MinMaxMutable minmax) { return new MinMax(minmax.getMinX(), minmax.getMinY(), minmax.getMaxX(), minmax.getMaxY()); } private MinMax(double minX, double minY, double maxX, double maxY) { this.minX = minX; this.minY = minY; this.maxX = maxX; this.maxY = maxY; } public MinMax addPoint(Point2D pt) { return addPoint(pt.getX(), pt.getY()); } public MinMax addPoint(double x, double y) { return new MinMax(Math.min(x, minX), Math.min(y, minY), Math.max(x, maxX), Math.max(y, maxY)); } public MinMax addMinMax(MinMax other) { return new MinMax(Math.min(other.minX, minX), Math.min(other.minY, minY), Math.max(other.maxX, maxX), Math.max(other.maxY, maxY)); } public static MinMax fromMax(double maxX, double maxY) { return MinMax.getEmpty(true).addPoint(maxX, maxY); } public static MinMax fromDim(Dimension2D dim) { return fromMax(dim.getWidth(), dim.getHeight()); } public final double getMaxX() { return maxX; } public final double getMaxY() { return maxY; } public final double getMinX() { return minX; } public final double getMinY() { return minY; } public double getHeight() { return maxY - minY; } public double getWidth() { return maxX - minX; } public Dimension2D getDimension() { return new Dimension2DDouble(maxX - minX, maxY - minY); } public void drawGrey(UGraphic ug) { final HtmlColor color = HtmlColorUtils.GRAY; ug = ug.apply(new UChangeColor(color)).apply(new UChangeBackColor(color)); ug = ug.apply(new UTranslate(minX, minY)); ug.draw(new URectangle(getWidth(), getHeight())); } public MinMax translate(UTranslate translate) { final double dx = translate.getDx(); final double dy = translate.getDy(); return new MinMax(minX + dx, minY + dy, maxX + dx, maxY + dy); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/MinMaxMutable.java000066400000000000000000000052601312650303100265650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; public class MinMaxMutable { private double maxX; private double maxY; private double minX; private double minY; public static MinMaxMutable getEmpty(boolean initToZero) { if (initToZero) { return new MinMaxMutable(0, 0, 0, 0); } return new MinMaxMutable(Double.MAX_VALUE, Double.MAX_VALUE, -Double.MAX_VALUE, -Double.MAX_VALUE); } public boolean isInfinity() { return minX == Double.MAX_VALUE; } @Override public String toString() { return "X=" + minX + " " + maxX + " Y=" + minY + " " + maxY; } private MinMaxMutable(double minX, double minY, double maxX, double maxY) { this.minX = minX; this.minY = minY; this.maxX = maxX; this.maxY = maxY; } public void addPoint(double x, double y) { this.maxX = Math.max(x, maxX); this.maxY = Math.max(y, maxY); this.minX = Math.min(x, minX); this.minY = Math.min(y, minY); } public static MinMaxMutable fromMax(double maxX, double maxY) { final MinMaxMutable result = MinMaxMutable.getEmpty(true); result.addPoint(maxX, maxY); return result; } public final double getMaxX() { return maxX; } public final double getMaxY() { return maxY; } public final double getMinX() { return minX; } public final double getMinY() { return minY; } public Dimension2D getDimension() { return new Dimension2DDouble(maxX - minX, maxY - minY); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/PlacementStrategy.java000066400000000000000000000030201312650303100275050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Point2D; import java.util.Map; import net.sourceforge.plantuml.graphic.TextBlock; public interface PlacementStrategy { public void add(TextBlock block); public Map getPositions(double width, double height); } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/PlacementStrategyVisibility.java000066400000000000000000000050221312650303100315610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; public class PlacementStrategyVisibility extends AbstractPlacementStrategy { private final int col2; public PlacementStrategyVisibility(StringBounder stringBounder, int col2) { super(stringBounder); this.col2 = col2; } public Map getPositions(double width, double height) { final Map result = new LinkedHashMap(); double y = 0; for (final Iterator> it = getDimensions().entrySet().iterator(); it.hasNext();) { final Map.Entry ent1 = it.next(); final Map.Entry ent2 = it.next(); final double height1 = ent1.getValue().getHeight(); final double height2 = ent2.getValue().getHeight(); final double maxHeight = Math.max(height1, height2); result.put(ent1.getKey(), new Point2D.Double(0, 2 + y + (maxHeight - height1) / 2)); result.put(ent2.getKey(), new Point2D.Double(col2, y + (maxHeight - height2) / 2)); y += maxHeight; } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/PlacementStrategyX1X2.java000066400000000000000000000043521312650303100301410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.LinkedHashMap; import java.util.Map; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; public class PlacementStrategyX1X2 extends AbstractPlacementStrategy { public PlacementStrategyX1X2(StringBounder stringBounder) { super(stringBounder); } public Map getPositions(double width, double height) { final double usedWidth = getSumWidth(); //double maxHeight = getMaxHeight(); final double space = (width - usedWidth) / (getDimensions().size() + 1); final Map result = new LinkedHashMap(); double x = space; for (Map.Entry ent : getDimensions().entrySet()) { final double y = (height - ent.getValue().getHeight()) / 2; result.put(ent.getKey(), new Point2D.Double(x, y)); x += ent.getValue().getWidth() + space; } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/PlacementStrategyX1Y2Y3.java000066400000000000000000000060171312650303100303560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; public class PlacementStrategyX1Y2Y3 extends AbstractPlacementStrategy { public PlacementStrategyX1Y2Y3(StringBounder stringBounder) { super(stringBounder); } public Map getPositions(double width, double height) { final Dimension2D first = getDimensions().values().iterator().next(); final double maxWidthButFirst = getMaxWidth(butFirst()); final double sumHeightButFirst = getSumHeight(butFirst()); final double space = (width - first.getWidth() - maxWidthButFirst) / 3; final Map result = new LinkedHashMap(); // double x = space * 2; final Iterator> it = getDimensions().entrySet().iterator(); final Map.Entry ent = it.next(); double y = (height - ent.getValue().getHeight()) / 2; result.put(ent.getKey(), new Point2D.Double(space, y)); // x += ent.getValue().getWidth() + space; y = (height - sumHeightButFirst) / 2; while (it.hasNext()) { final Map.Entry ent2 = it.next(); final TextBlock textBlock = ent2.getKey(); final Dimension2D dim = getDimensions().get(textBlock); final double x = 2 * space + first.getWidth() + (maxWidthButFirst - dim.getWidth()) / 2; result.put(textBlock, new Point2D.Double(x, y)); y += ent2.getValue().getHeight(); } return result; } private Iterator butFirst() { final Iterator iterator = getDimensions().values().iterator(); iterator.next(); return iterator; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/PlacementStrategyY1Y2.java000066400000000000000000000043531312650303100301440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.LinkedHashMap; import java.util.Map; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; public class PlacementStrategyY1Y2 extends AbstractPlacementStrategy { public PlacementStrategyY1Y2(StringBounder stringBounder) { super(stringBounder); } public Map getPositions(double width, double height) { final double usedHeight = getSumHeight(); //double maxWidth = getMaxWidth(); final double space = (height - usedHeight) / (getDimensions().size() + 1); final Map result = new LinkedHashMap(); double y = space; for (Map.Entry ent : getDimensions().entrySet()) { final double x = (width - ent.getValue().getWidth()) / 2; result.put(ent.getKey(), new Point2D.Double(x, y)); y += ent.getValue().getHeight() + space; } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/PlacementStrategyY1Y2Center.java000066400000000000000000000043701312650303100313040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.LinkedHashMap; import java.util.Map; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; public class PlacementStrategyY1Y2Center extends AbstractPlacementStrategy { public PlacementStrategyY1Y2Center(StringBounder stringBounder) { super(stringBounder); } public Map getPositions(double width, double height) { final double usedHeight = getSumHeight(); // double maxWidth = getMaxWidth(); final double space = (height - usedHeight) / (getDimensions().size() + 1); final Map result = new LinkedHashMap(); double y = space; for (Map.Entry ent : getDimensions().entrySet()) { final double x = (width - ent.getValue().getWidth()) / 2; result.put(ent.getKey(), new Point2D.Double(x, y)); y += ent.getValue().getHeight() + space; } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/PlacementStrategyY1Y2Left.java000066400000000000000000000043151312650303100307550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.LinkedHashMap; import java.util.Map; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; public class PlacementStrategyY1Y2Left extends AbstractPlacementStrategy { public PlacementStrategyY1Y2Left(StringBounder stringBounder) { super(stringBounder); } public Map getPositions(double width, double height) { final double usedHeight = getSumHeight(); //double maxWidth = getMaxWidth(); final double space = (height - usedHeight) / (getDimensions().size() + 1); final Map result = new LinkedHashMap(); double y = space; for (Map.Entry ent : getDimensions().entrySet()) { final double x = 0; result.put(ent.getKey(), new Point2D.Double(x, y)); y += ent.getValue().getHeight() + space; } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/Scalable.java000066400000000000000000000025261312650303100255720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; public interface Scalable { public UShape getScaled(double scale); } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/ShadowManager.java000066400000000000000000000044241312650303100266030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.Color; public class ShadowManager { // http://www.w3schools.com/svg/svg_feoffset.asp private final int c1; private final int c2; public ShadowManager(int c1, int c2) { this.c1 = c1; this.c2 = c2; } public double[] getShadowDeltaPoints(double deltaShadow, double diff, double[] points) { double cx = 0; double cy = 0; for (int i = 0; i < points.length; i += 2) { cx += points[i]; cy += points[i + 1]; } final int nbPoints = points.length / 2; cx = cx / nbPoints; cy = cy / nbPoints; final double[] result = new double[points.length]; for (int i = 0; i < result.length; i += 2) { final double diffx = points[i] > cx ? -diff : diff; final double diffy = points[i + 1] > cy ? -diff : diff; result[i] = points[i] + diffx + deltaShadow; result[i + 1] = points[i + 1] + diffy + deltaShadow; } return result; } public Color getColor(double delta, double total) { final int c = (int) (c2 + 1.0 * delta / total * (c1 - c2)); return new Color(c, c, c); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/Shadowable.java000066400000000000000000000026171312650303100261360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic; public interface Shadowable extends UShape { public void setDeltaShadow(double deltaShadow); public double getDeltaShadow(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/Slot.java000066400000000000000000000047041312650303100250050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; public class Slot implements Comparable { private final double start; private final double end; public Slot(double start, double end) { if (start >= end) { throw new IllegalArgumentException(); } this.start = start; this.end = end; } @Override public String toString() { return "(" + start + "," + end + ")"; } public double getStart() { return start; } public double getEnd() { return end; } public double size() { return end - start; } public boolean contains(double v) { return v >= start && v <= end; } public boolean intersect(Slot other) { return contains(other.start) || contains(other.end) || other.contains(start) || other.contains(end); } public Slot merge(Slot other) { return new Slot(Math.min(start, other.start), Math.max(end, other.end)); } public Slot intersect(double otherStart, double otherEnd) { if (otherStart >= end) { return null; } if (otherEnd <= start) { return null; } return new Slot(Math.max(start, otherStart), Math.min(end, otherEnd)); } public int compareTo(Slot other) { if (this.start < other.start) { return -1; } if (this.start > other.start) { return 1; } return 0; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/SlotFinder.java000066400000000000000000000077211312650303100261370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.StringBounder; public class SlotFinder implements UGraphic { public boolean matchesProperty(String propertyName) { return false; } public UGraphic apply(UChange change) { if (change instanceof UTranslate) { return new SlotFinder(stringBounder, yslot, translate.compose((UTranslate) change)); } else if (change instanceof UStroke) { return new SlotFinder(this); } else if (change instanceof UChangeBackColor) { return new SlotFinder(this); } else if (change instanceof UChangeColor) { return new SlotFinder(this); } throw new UnsupportedOperationException(); } private final SlotSet yslot; private final StringBounder stringBounder; private final UTranslate translate; public SlotFinder(StringBounder stringBounder) { this(stringBounder, new SlotSet(), new UTranslate()); } private SlotFinder(StringBounder stringBounder, SlotSet yslot, UTranslate translate) { this.stringBounder = stringBounder; this.yslot = yslot; this.translate = translate; } private SlotFinder(SlotFinder other) { this(other.stringBounder, other.yslot, other.translate); } public StringBounder getStringBounder() { return stringBounder; } public UParam getParam() { return new UParamNull(); } public void draw(UShape shape) { final double x = translate.getDx(); final double y = translate.getDy(); if (shape instanceof URectangle) { drawRectangle(x, y, (URectangle) shape); } else if (shape instanceof UPolygon) { drawPolygon(x, y, (UPolygon) shape); } else if (shape instanceof UEllipse) { drawEllipse(x, y, (UEllipse) shape); } else if (shape instanceof UText) { drawText(x, y, (UText) shape); } else if (shape instanceof UEmpty) { drawEmpty(x, y, (UEmpty) shape); } } private void drawEmpty(double x, double y, UEmpty shape) { yslot.addSlot(y, y + shape.getHeight()); } private void drawText(double x, double y, UText shape) { final TextLimitFinder finder = new TextLimitFinder(stringBounder, false); finder.apply(new UTranslate(x, y)).draw(shape); yslot.addSlot(finder.getMinY(), finder.getMaxY()); } private void drawEllipse(double x, double y, UEllipse shape) { yslot.addSlot(y, y + shape.getHeight()); } private void drawPolygon(double x, double y, UPolygon shape) { yslot.addSlot(y + shape.getMinY(), y + shape.getMaxY()); } private void drawRectangle(double x, double y, URectangle shape) { yslot.addSlot(y, y + shape.getHeight()); } public ColorMapper getColorMapper() { return new ColorMapperIdentity(); } public void startUrl(Url url) { } public void closeAction() { } public SlotSet getYSlotSet() { return yslot; } public void flushUg() { } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/SlotFinderX.java000066400000000000000000000105411312650303100262610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.StringBounder; public class SlotFinderX implements UGraphic { public boolean matchesProperty(String propertyName) { return false; } public UGraphic apply(UChange change) { if (change instanceof UTranslate) { return new SlotFinderX(stringBounder, xslot, yslot, translate.compose((UTranslate) change)); } else if (change instanceof UStroke) { return new SlotFinderX(this); } else if (change instanceof UChangeBackColor) { return new SlotFinderX(this); } else if (change instanceof UChangeColor) { return new SlotFinderX(this); } throw new UnsupportedOperationException(); } private final SlotSet xslot; private final SlotSet yslot; private final StringBounder stringBounder; private final UTranslate translate; public SlotFinderX(StringBounder stringBounder) { this(stringBounder, new SlotSet(), new SlotSet(), new UTranslate()); } private SlotFinderX(StringBounder stringBounder, SlotSet xslot, SlotSet yslot, UTranslate translate) { this.stringBounder = stringBounder; this.xslot = xslot; this.yslot = yslot; this.translate = translate; } private SlotFinderX(SlotFinderX other) { this(other.stringBounder, other.xslot, other.yslot, other.translate); } public StringBounder getStringBounder() { return stringBounder; } public UParam getParam() { return new UParamNull(); } public void draw(UShape shape) { final double x = translate.getDx(); final double y = translate.getDy(); if (shape instanceof URectangle) { drawRectangle(x, y, (URectangle) shape); } else if (shape instanceof UPolygon) { drawPolygon(x, y, (UPolygon) shape); } else if (shape instanceof UEllipse) { drawEllipse(x, y, (UEllipse) shape); } else if (shape instanceof UText) { drawText(x, y, (UText) shape); } else if (shape instanceof UEmpty) { drawEmpty(x, y, (UEmpty) shape); } } private void drawEmpty(double x, double y, UEmpty shape) { xslot.addSlot(x, x + shape.getWidth()); yslot.addSlot(y, y + shape.getHeight()); } private void drawText(double x, double y, UText shape) { final TextLimitFinder finder = new TextLimitFinder(stringBounder, false); finder.apply(new UTranslate(x, y)).draw(shape); xslot.addSlot(finder.getMinX(), finder.getMaxX()); yslot.addSlot(finder.getMinY(), finder.getMaxY()); } private void drawEllipse(double x, double y, UEllipse shape) { xslot.addSlot(x, x + shape.getWidth()); yslot.addSlot(y, y + shape.getHeight()); } private void drawPolygon(double x, double y, UPolygon shape) { xslot.addSlot(x + shape.getMinX(), x + shape.getMaxX()); yslot.addSlot(y + shape.getMinY(), y + shape.getMaxY()); } private void drawRectangle(double x, double y, URectangle shape) { xslot.addSlot(x, x + shape.getWidth()); yslot.addSlot(y, y + shape.getHeight()); } public ColorMapper getColorMapper() { return new ColorMapperIdentity(); } public void startUrl(Url url) { } public void closeAction() { } public SlotSet getXSlotSet() { return xslot; } public SlotSet getYSlotSet() { return yslot; } public void flushUg() { } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/SlotSet.java000066400000000000000000000062031312650303100254550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; public class SlotSet implements Iterable { private final List all = new ArrayList(); public SlotSet filter(double start, double end) { final SlotSet result = new SlotSet(); for (Slot slot : all) { final Slot intersec = slot.intersect(start, end); if (intersec != null) { result.all.add(intersec); } } return result; } public void addAll(SlotSet other) { this.all.addAll(other.all); } public void addSlot(double start, double end) { final List collisions = new ArrayList(); Slot newSlot = new Slot(start, end); for (final Iterator it = all.iterator(); it.hasNext();) { final Slot s = it.next(); if (s.intersect(newSlot)) { it.remove(); collisions.add(s); } } for (Slot s : collisions) { newSlot = newSlot.merge(s); } all.add(newSlot); } public SlotSet smaller(double margin) { final SlotSet result = new SlotSet(); for (Slot sl : all) { if (sl.size() <= 2 * margin) { continue; } result.addSlot(sl.getStart() + margin, sl.getEnd() - margin); } return result; } @Override public String toString() { return all.toString(); } public List getSlots() { return Collections.unmodifiableList(all); } public Iterator iterator() { return getSlots().iterator(); } public SlotSet reverse() { final SlotSet result = new SlotSet(); Collections.sort(all); Slot last = null; for (Slot slot : all) { if (last != null) { result.addSlot(last.getEnd(), slot.getStart()); } last = slot; } return result; } public void drawDebugX(UGraphic ug, double size) { for (Slot slot : all) { final URectangle rect = new URectangle(slot.getEnd() - slot.getStart(), size); ug.apply(new UTranslate(slot.getStart(), 0)).draw(rect); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/TextBlockInEllipse.java000066400000000000000000000053711312650303100275710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.svek.image.ContainingEllipse; import net.sourceforge.plantuml.svek.image.Footprint; public class TextBlockInEllipse extends AbstractTextBlock implements TextBlock { private final TextBlock text; private final ContainingEllipse ellipse; public TextBlockInEllipse(TextBlock text, StringBounder stringBounder) { this.text = text; final Dimension2D textDim = text.calculateDimension(stringBounder); double alpha = textDim.getHeight() / textDim.getWidth(); if (alpha < .2) { alpha = .2; } else if (alpha > .8) { alpha = .8; } final Footprint footprint = new Footprint(stringBounder); ellipse = footprint.getEllipse(text, alpha); } public UEllipse getUEllipse() { return ellipse.asUEllipse().bigger(6); } public void drawU(UGraphic ug) { final UEllipse sh = getUEllipse(); final Point2D center = ellipse.getCenter(); final double dx = sh.getWidth() / 2 - center.getX(); final double dy = sh.getHeight() / 2 - center.getY(); ug.draw(sh); text.drawU(ug.apply(new UTranslate(dx, (dy - 2)))); } public Dimension2D calculateDimension(StringBounder stringBounder) { return getUEllipse().getDimension(); } public void setDeltaShadow(double deltaShadow) { ellipse.setDeltaShadow(deltaShadow); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/TextLimitFinder.java000066400000000000000000000072151312650303100271370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.StringBounder; public class TextLimitFinder implements UGraphic { public boolean matchesProperty(String propertyName) { return false; } public UGraphic apply(UChange change) { if (change instanceof UTranslate) { return new TextLimitFinder(stringBounder, minmax, translate.compose((UTranslate) change)); } else if (change instanceof UStroke) { return new TextLimitFinder(this); } else if (change instanceof UChangeBackColor) { return new TextLimitFinder(this); } else if (change instanceof UChangeColor) { return new TextLimitFinder(this); } throw new UnsupportedOperationException(); } private final StringBounder stringBounder; private final UTranslate translate; private final MinMaxMutable minmax; public TextLimitFinder(StringBounder stringBounder, boolean initToZero) { this(stringBounder, MinMaxMutable.getEmpty(initToZero), new UTranslate()); } private TextLimitFinder(StringBounder stringBounder, MinMaxMutable minmax, UTranslate translate) { this.stringBounder = stringBounder; this.minmax = minmax; this.translate = translate; } private TextLimitFinder(TextLimitFinder other) { this(other.stringBounder, other.minmax, other.translate); } public StringBounder getStringBounder() { return stringBounder; } public UParam getParam() { return new UParamNull(); } public void draw(UShape shape) { if (shape instanceof UText) { final double x = translate.getDx(); final double y = translate.getDy(); drawText(x, y, (UText) shape); } } public ColorMapper getColorMapper() { throw new UnsupportedOperationException(); } public void startUrl(Url url) { } public void closeAction() { } private void drawText(double x, double y, UText text) { final Dimension2D dim = stringBounder.calculateDimension(text.getFontConfiguration().getFont(), text.getText()); y -= dim.getHeight() - 1.5; minmax.addPoint(x, y); minmax.addPoint(x, y + dim.getHeight()); minmax.addPoint(x + dim.getWidth(), y); minmax.addPoint(x + dim.getWidth(), y + dim.getHeight()); } public double getMaxX() { return minmax.getMaxX(); } public double getMaxY() { return minmax.getMaxY(); } public double getMinX() { return minmax.getMinX(); } public double getMinY() { return minmax.getMinY(); } public void flushUg() { } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UAntiAliasing.java000066400000000000000000000032671312650303100265570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic; import java.awt.Graphics2D; import java.awt.RenderingHints; public enum UAntiAliasing implements UChange { ANTI_ALIASING_ON, ANTI_ALIASING_OFF; public void apply(Graphics2D g2d) { if (this == ANTI_ALIASING_ON) { g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } else { g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UCenteredCharacter.java000066400000000000000000000030461312650303100275550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; public class UCenteredCharacter implements UShape { private final char c; private final UFont font; public UCenteredCharacter(char c, UFont font) { this.c = c; this.font = font; } public char getChar() { return c; } public UFont getFont() { return font; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UChange.java000066400000000000000000000024601312650303100253730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; public interface UChange { } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UChangeBackColor.java000066400000000000000000000032671312650303100271610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import net.sourceforge.plantuml.graphic.HtmlColor; public class UChangeBackColor implements UChange { private final HtmlColor color; public UChangeBackColor(HtmlColor color) { this.color = color; } public HtmlColor getBackColor() { return color; } // private HtmlColor color = null; // private HtmlColor backcolor = null; // private UStroke stroke = new UStroke(1); // private boolean hidden = false; } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UChangeColor.java000066400000000000000000000030121312650303100263640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import net.sourceforge.plantuml.graphic.HtmlColor; public class UChangeColor implements UChange { private final HtmlColor color; public UChangeColor(HtmlColor color) { this.color = color; } public HtmlColor getColor() { return color; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UClip.java000066400000000000000000000104061312650303100250740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; public class UClip implements UChange { private final double x; private final double y; private final double width; private final double height; public UClip(double x, double y, double width, double height) { this.x = x; this.y = y; this.width = width; this.height = height; } @Override public String toString() { return "CLIP x=" + x + " y=" + y + " w=" + width + " h=" + height; } public UClip translate(double dx, double dy) { return new UClip(x + dx, y + dy, width, height); } public UClip translate(UTranslate translate) { return translate(translate.getDx(), translate.getDy()); } public final double getX() { return x; } public final double getY() { return y; } public final double getWidth() { return width; } public final double getHeight() { return height; } public boolean isInside(Point2D pt) { return isInside(pt.getX(), pt.getY()); } public boolean isInside(double xp, double yp) { if (xp < x) { assert getClippedX(xp) != xp; return false; } if (xp > x + width) { assert getClippedX(xp) != xp; return false; } if (yp < y) { assert getClippedY(yp) != yp; return false; } if (yp > y + height) { assert getClippedY(yp) != yp; return false; } assert getClippedX(xp) == xp; assert getClippedY(yp) == yp; return true; } public Rectangle2D.Double getClippedRectangle(Rectangle2D.Double r) { return (Rectangle2D.Double) r.createIntersection(new Rectangle2D.Double(x, y, width, height)); } public Line2D.Double getClippedLine(Line2D.Double line) { if (isInside(line.x1, line.y1) && isInside(line.x2, line.y2)) { return line; } if (isInside(line.x1, line.y1) == false && isInside(line.x2, line.y2) == false) { if (line.x1 == line.x2) { final double newy1 = getClippedY(line.y1); final double newy2 = getClippedY(line.y2); if (newy1 != newy2) { return new Line2D.Double(line.x1, newy1, line.x2, newy2); } } return null; } if (line.x1 != line.x2 && line.y1 != line.y2) { return null; } assert line.x1 == line.x2 || line.y1 == line.y2; if (line.y1 == line.y2) { final double newx1 = getClippedX(line.x1); final double newx2 = getClippedX(line.x2); return new Line2D.Double(newx1, line.y1, newx2, line.y2); } if (line.x1 == line.x2) { final double newy1 = getClippedY(line.y1); final double newy2 = getClippedY(line.y2); return new Line2D.Double(line.x1, newy1, line.x2, newy2); } throw new IllegalStateException(); } private double getClippedX(double xp) { if (xp < x) { return x; } if (xp > x + width) { return x + width; } return xp; } private double getClippedY(double yp) { if (yp < y) { return y; } if (yp > y + height) { return y + height; } return yp; } public boolean isInside(double x, double y, UPath shape) { return isInside(x + shape.getMinX(), y + shape.getMinY()) && isInside(x + shape.getMaxX(), y + shape.getMaxY()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UComment.java000066400000000000000000000027201312650303100256070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; public class UComment implements UShape { private final String comment; public UComment(String comment) { this.comment = comment; } public String getComment() { return comment; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UDriver.java000066400000000000000000000026211312650303100254400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; public interface UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, O object); } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UEllipse.java000066400000000000000000000054231312650303100256050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; public class UEllipse extends AbstractShadowable implements Scalable { private final double width; private final double height; private final double start; private final double extend; public UShape getScaled(double scale) { if (scale == 1) { return this; } final AbstractShadowable result = new UEllipse(width * scale, height * scale, start, extend); result.setDeltaShadow(this.getDeltaShadow()); return result; } public UEllipse(double width, double height) { this(width, height, 0, 0); } public UEllipse(double width, double height, double start, double extend) { this.width = width; this.height = height; this.start = start; this.extend = extend; } public double getWidth() { return width; } public double getHeight() { return height; } public final double getStart() { return start; } public final double getExtend() { return extend; } public Dimension2D getDimension() { return new Dimension2DDouble(width, height); } public UEllipse bigger(double more) { final UEllipse result = new UEllipse(width + more, height + more); result.setDeltaShadow(getDeltaShadow()); return result; } public double getStartingX(double y) { y = y / height * 2; final double x = 1 - Math.sqrt(1 - (y - 1) * (y - 1)); return x * width / 2; } public double getEndingX(double y) { y = y / height * 2; final double x = 1 + Math.sqrt(1 - (y - 1) * (y - 1)); return x * width / 2; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UEmpty.java000066400000000000000000000031651312650303100253070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic; public class UEmpty implements UShape { private final double width; private final double height; public UEmpty(double width, double height) { if (width == 0) { throw new IllegalArgumentException(); } this.width = width; this.height = height; } public double getWidth() { return width; } public double getHeight() { return height; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UFont.java000066400000000000000000000106341312650303100251160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics2D; import java.awt.font.FontRenderContext; import java.awt.font.LineMetrics; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.TextBlockUtils; public class UFont { private final Font font; private final String family; public UFont(String fontFamily, int fontStyle, int fontSize) { this(new Font(fontFamily, fontStyle, fontSize), fontFamily); } public static UFont serif(int size) { return new UFont("Serif", Font.PLAIN, size); } public static UFont sansSerif(int size) { return new UFont("SansSerif", Font.PLAIN, size); } public static UFont courier(int size) { return new UFont("Courier", Font.PLAIN, size); } public static UFont byDefault(int size) { return sansSerif(12); } public static UFont monospaced(int size) { return new UFont("Monospaced", Font.PLAIN, size); } private UFont(Font font, String family) { this.font = font; this.family = family; } public final Font getFont() { return font; } public FontConfiguration toFont2(HtmlColor color, boolean useUnderlineForHyperlink, HtmlColor hyperlinkColor, int tabSize) { return new FontConfiguration(this, color, hyperlinkColor, useUnderlineForHyperlink, tabSize); } public UFont scaled(double scale) { if (scale == 1) { return this; } final float current = font.getSize2D(); return withSize((float) (current * scale)); } public UFont withSize(float size) { return new UFont(font.deriveFont(size), family); } public UFont withStyle(int style) { return new UFont(font.deriveFont(style), family); } public UFont bold() { return withStyle(Font.BOLD); } public UFont italic() { return withStyle(Font.ITALIC); } public int getStyle() { return font.getStyle(); } public int getSize() { return font.getSize(); } public double getSize2D() { return font.getSize2D(); } public boolean isBold() { return font.isBold(); } public boolean isItalic() { return font.isItalic(); } public String getFamily(UFontContext context) { if (context == UFontContext.EPS) { if (family == null) { return "Times-Roman"; } return font.getPSName(); } if (context == UFontContext.SVG) { if (family.equalsIgnoreCase("sansserif")) { return "sans-serif"; } return family; } return family; } @Override public String toString() { return font.toString()/* + " " + font.getPSName() */; } @Override public int hashCode() { return font.hashCode(); } @Override public boolean equals(Object obj) { if (obj instanceof UFont == false) { return false; } return this.font.equals(((UFont) obj).font); } @Deprecated public static UFont getCurrentFont(Graphics2D g2d) { // return new UFont(g2d.getFont(), g2d.getFont().getFontName()); throw new UnsupportedOperationException(); } public LineMetrics getLineMetrics(Graphics2D gg, String text) { final FontRenderContext frc = gg.getFontRenderContext(); return font.getLineMetrics(text, frc); } public FontMetrics getFontMetrics() { return TextBlockUtils.getFontMetrics(getFont()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UFontContext.java000066400000000000000000000025161312650303100264630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; public enum UFontContext { JAVA, EPS, SVG, DOT, SYSTEM, PNG } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UFontUser.java000066400000000000000000000024641312650303100257570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; public enum UFontUser { JAVA, DOT } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UGraphic.java000066400000000000000000000033211312650303100255600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.StringBounder; public interface UGraphic { public StringBounder getStringBounder(); public UParam getParam(); public void draw(UShape shape); public UGraphic apply(UChange change); public ColorMapper getColorMapper(); public void startUrl(Url url); public void closeAction(); public void flushUg(); public boolean matchesProperty(String propertyName); } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UGraphic2.java000066400000000000000000000027321312650303100256470ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.io.IOException; import java.io.OutputStream; public interface UGraphic2 extends UGraphic { public void writeImageTOBEMOVED(OutputStream os, String metadata, int dpi) throws IOException; } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UGraphicCompress.java000066400000000000000000000063121312650303100272770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import net.sourceforge.plantuml.graphic.UGraphicDelegator; public class UGraphicCompress extends UGraphicDelegator { public UGraphic apply(UChange change) { if (change instanceof UTranslate) { return new UGraphicCompress(getUg(), compressionTransform, translate.compose((UTranslate) change)); } else if (change instanceof UStroke || change instanceof UChangeBackColor || change instanceof UChangeColor) { return new UGraphicCompress(getUg().apply(change), compressionTransform, translate); } throw new UnsupportedOperationException(); } private final CompressionTransform compressionTransform; private final UTranslate translate; public UGraphicCompress(UGraphic ug, CompressionTransform compressionTransform) { this(ug, compressionTransform, new UTranslate()); } private UGraphicCompress(UGraphic ug, CompressionTransform compressionTransform, UTranslate translate) { super(ug); this.compressionTransform = compressionTransform; this.translate = translate; } public void draw(UShape shape) { final double x = translate.getDx(); final double y = translate.getDy(); if (shape instanceof ULine) { drawLine(x, y, (ULine) shape); } else { getUg().apply(new UTranslate(x, ct(y))).draw(shape); } } private void drawLine(double x, double y, ULine shape) { drawLine(x, ct(y), x + shape.getDX(), ct(y + shape.getDY())); } private double ct(double v) { return compressionTransform.transform(v); } private void drawLine(double x1, double y1, double x2, double y2) { if (y1 > y2) { drawLine(x2, y2, x1, y1); return; } assert y1 <= y2; final double xmin = Math.min(x1, x2); final double xmax = Math.max(x1, x2); final double ymin = Math.min(y1, y2); final double ymax = Math.max(y1, y2); if (x2 >= x1) { getUg().apply(new UTranslate(xmin, ymin)).draw(new ULine(xmax - xmin, ymax - ymin)); } else { getUg().apply(new UTranslate(xmax, ymin)).draw(new ULine(-(xmax - xmin), ymax - ymin)); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UGraphicCompress2.java000066400000000000000000000065121312650303100273630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.graphic.UGraphicDelegator; public class UGraphicCompress2 extends UGraphicDelegator { public UGraphic apply(UChange change) { if (change instanceof UTranslate) { return new UGraphicCompress2(getUg(), compressionTransform, translate.compose((UTranslate) change)); } else if (change instanceof UStroke || change instanceof UChangeBackColor || change instanceof UChangeColor) { return new UGraphicCompress2(getUg().apply(change), compressionTransform, translate); } throw new UnsupportedOperationException(); } private final CompressionTransform compressionTransform; private final UTranslate translate; public UGraphicCompress2(UGraphic ug, CompressionTransform compressionTransform) { this(ug, compressionTransform, new UTranslate()); } private UGraphicCompress2(UGraphic ug, CompressionTransform compressionTransform, UTranslate translate) { super(ug); this.compressionTransform = compressionTransform; this.translate = translate; } public void draw(UShape shape) { final double x = translate.getDx(); final double y = translate.getDy(); if (shape instanceof ULine) { drawLine(x, y, (ULine) shape); } else if (shape instanceof Snake) { drawSnake(x, y, (Snake) shape); } else { getUg().apply(new UTranslate(ct(x), y)).draw(shape); } } private void drawSnake(double x, double y, Snake shape) { final Snake transformed = shape.translate(new UTranslate(x, y)).transformX(compressionTransform); getUg().draw(transformed); } private void drawLine(double x, double y, ULine shape) { drawLine(ct(x), y, ct(x + shape.getDX()), y + shape.getDY()); } private double ct(double v) { return compressionTransform.transform(v); } private void drawLine(double x1, double y1, double x2, double y2) { final double xmin = Math.min(x1, x2); final double xmax = Math.max(x1, x2); final double ymin = Math.min(y1, y2); final double ymax = Math.max(y1, y2); getUg().apply(new UTranslate(xmin, ymin)).draw(new ULine(xmax - xmin, ymax - ymin)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UGraphicFilter.java000066400000000000000000000035111312650303100267270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.util.Arrays; import java.util.Collection; import net.sourceforge.plantuml.graphic.UGraphicDelegator; public class UGraphicFilter extends UGraphicDelegator { public UGraphic apply(UChange translate) { throw new UnsupportedOperationException(); } private final Collection> toprint; public UGraphicFilter(UGraphic ug, Class... toprint) { super(ug); this.toprint = Arrays.asList(toprint); } public void draw(UShape shape) { if (toprint.contains(shape.getClass())) { getUg().draw(shape); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UGraphicNull.java000066400000000000000000000042221312650303100264140ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.EnsureVisible; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.StringBounder; public class UGraphicNull extends AbstractUGraphic implements EnsureVisible, UGraphic2 { @Override protected AbstractCommonUGraphic copyUGraphic() { return new UGraphicNull(this); } private UGraphicNull(UGraphicNull other) { super(other); } public UGraphicNull() { super(new ColorMapperIdentity(), "foo"); } public StringBounder getStringBounder() { return FileFormat.PNG.getDefaultStringBounder(); } public void startUrl(Url url) { } public void closeAction() { } public void writeImageTOBEMOVED(OutputStream os, String metadata, int dpi) throws IOException { } public void ensureVisible(double x, double y) { } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UGraphicStencil.java000066400000000000000000000043661312650303100271140ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import net.sourceforge.plantuml.creole.Stencil; public class UGraphicStencil extends AbstractUGraphicHorizontalLine { private final Stencil stencil; private final UStroke defaultStroke; public static UGraphic create(UGraphic ug, Stencil stencil, UStroke defaultStroke) { return new UGraphicStencil(ug, stencil, defaultStroke); } private UGraphicStencil(UGraphic ug, Stencil stencil, UStroke defaultStroke) { super(ug); this.stencil = stencil; this.defaultStroke = defaultStroke; } @Override protected AbstractUGraphicHorizontalLine copy(UGraphic ug) { return new UGraphicStencil(ug, stencil, defaultStroke); } @Override protected void drawHline(UGraphic ug, UHorizontalLine line, UTranslate translate) { line.drawLineInternal(ug, stencil, translate.getDy(), defaultStroke); // final UDrawable ud = stencil.convert(line, ug.getStringBounder()); // ud.drawU(ug.apply(translate)); // line.drawLine(ug.apply(translate), startingX, endingX, 0, defaultStroke); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UGraphicUtils.java000066400000000000000000000104451312650303100266060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.Graphics2D; import java.awt.geom.Dimension2D; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.EmptyImageBuilder; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.eps.EpsStrategy; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.png.PngIO; import net.sourceforge.plantuml.ugraphic.eps.UGraphicEps; import net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d; import net.sourceforge.plantuml.ugraphic.svg.UGraphicSvg; public abstract class UGraphicUtils { public static void writeImage(OutputStream os, String metadata, FileFormatOption fileFormatOption, long seed, ColorMapper colorMapper, HtmlColor background, TextBlock image) throws IOException { final FileFormat fileFormat = fileFormatOption.getFileFormat(); if (fileFormat == FileFormat.PNG) { final BufferedImage im = createImage(colorMapper, background, image); PngIO.write(im, os, fileFormatOption.isWithMetadata() ? metadata : null, 96); } else if (fileFormat == FileFormat.SVG) { final Dimension2D size = computeSize(colorMapper, background, image); final UGraphicSvg svg = new UGraphicSvg(size, colorMapper, StringUtils.getAsHtml(colorMapper .getMappedColor(background)), false, 1.0, fileFormatOption.getSvgLinkTarget(), fileFormatOption.getHoverColor(), seed); image.drawU(svg); svg.createXml(os, fileFormatOption.isWithMetadata() ? metadata : null); } else if (fileFormat == FileFormat.EPS) { final UGraphicEps ug = new UGraphicEps(colorMapper, EpsStrategy.getDefault2()); image.drawU(ug); os.write(ug.getEPSCode().getBytes()); } else if (fileFormat == FileFormat.EPS_TEXT) { final UGraphicEps ug = new UGraphicEps(colorMapper, EpsStrategy.WITH_MACRO_AND_TEXT); image.drawU(ug); os.write(ug.getEPSCode().getBytes()); } else { throw new UnsupportedOperationException(); } } private static BufferedImage createImage(ColorMapper colorMapper, HtmlColor background, TextBlock image) { final Dimension2D size = computeSize(colorMapper, background, image); final EmptyImageBuilder builder = new EmptyImageBuilder(size.getWidth(), size.getHeight(), colorMapper.getMappedColor(background)); final BufferedImage im = builder.getBufferedImage(); final Graphics2D g2d = builder.getGraphics2D(); final UGraphicG2d ug = new UGraphicG2d(colorMapper, g2d, 1.0); image.drawU(ug); g2d.dispose(); return im; } private static Dimension2D computeSize(ColorMapper colorMapper, HtmlColor background, TextBlock image) { final EmptyImageBuilder builder = new EmptyImageBuilder(10, 10, colorMapper.getMappedColor(background)); final Graphics2D g2d = builder.getGraphics2D(); final UGraphicG2d tmp = new UGraphicG2d(colorMapper, g2d, 1.0); final Dimension2D size = image.calculateDimension(tmp.getStringBounder()); g2d.dispose(); return size; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UHidden.java000066400000000000000000000025171312650303100254040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic; public enum UHidden implements UChange { NORMAL_SHOWN, HIDDEN; } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UHorizontalLine.java000066400000000000000000000137501312650303100271530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; public class UHorizontalLine implements UShape { private final double skipAtStart; private final double skipAtEnd; private final TextBlock title; private final boolean blankTitle; private final char style; private UHorizontalLine(double skipAtStart, double skipAtEnd, TextBlock title, boolean blankTitle, char style) { this.skipAtEnd = skipAtEnd; this.skipAtStart = skipAtStart; this.title = title; this.blankTitle = blankTitle; this.style = style; } public static UHorizontalLine infinite(double skipAtStart, double skipAtEnd, char style) { return new UHorizontalLine(skipAtStart, skipAtEnd, null, false, style); } public static UHorizontalLine infinite(double skipAtStart, double skipAtEnd, TextBlock title, char style) { return new UHorizontalLine(skipAtStart, skipAtEnd, title, false, style); } public boolean isDouble() { return style == '='; } // static public UHorizontalLine infinite(UStroke stroke) { // return new UHorizontalLine(0, 0, null, false, stroke); // } public void drawLineInternal(final UGraphic ug, Stencil stencil, double y, UStroke defaultStroke) { stencil = addSkip(stencil); final UStroke strokeToUse = style == '\0' ? defaultStroke : getStroke(); final UGraphic ugStroke = ug.apply(strokeToUse); if (title == null) { drawHLine(stencil, y, ugStroke); return; } final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); drawHLine(firstHalf(stencil, dimTitle.getWidth()), y, ugStroke); final double startingX = stencil.getStartingX(ug.getStringBounder(), y); final double endingX = stencil.getEndingX(ug.getStringBounder(), y); drawTitleInternal(ug, startingX, endingX, y, false); drawHLine(secondHalf(stencil, dimTitle.getWidth()), y, ugStroke); } private Stencil addSkip(final Stencil stencil) { return new Stencil() { public double getStartingX(StringBounder stringBounder, double y) { return stencil.getStartingX(stringBounder, y) + skipAtStart; } public double getEndingX(StringBounder stringBounder, double y) { return stencil.getEndingX(stringBounder, y) - skipAtEnd; } }; } private static Stencil firstHalf(final Stencil stencil, final double widthTitle) { return new Stencil() { public double getStartingX(StringBounder stringBounder, double y) { return stencil.getStartingX(stringBounder, y); } public double getEndingX(StringBounder stringBounder, double y) { final double start = stencil.getStartingX(stringBounder, y); final double end = stencil.getEndingX(stringBounder, y); final double len = (end - start - widthTitle) / 2; return start + len; } }; } private static Stencil secondHalf(final Stencil stencil, final double widthTitle) { return new Stencil() { public double getStartingX(StringBounder stringBounder, double y) { final double start = stencil.getStartingX(stringBounder, y); final double end = stencil.getEndingX(stringBounder, y); final double len = (end - start - widthTitle) / 2; return end - len; } public double getEndingX(StringBounder stringBounder, double y) { return stencil.getEndingX(stringBounder, y); } }; } private void drawHLine(Stencil stencil, double y, final UGraphic ug) { drawSimpleHline(ug, stencil, y); if (style == '=') { drawSimpleHline(ug, stencil, y + 2); } } private static void drawSimpleHline(UGraphic ug, Stencil stencil, double y) { final double startingX = stencil.getStartingX(ug.getStringBounder(), y); final double endingX = stencil.getEndingX(ug.getStringBounder(), y); ug.apply(new UTranslate(startingX, y)).draw(new ULine(endingX - startingX, 0)); } public void drawTitleInternal(UGraphic ug, double startingX, double endingX, double y, boolean clearArea) { if (title == null || blankTitle) { return; } final double widthToUse = endingX - startingX; final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder()); final double space = (widthToUse - dimTitle.getWidth()) / 2; final double x1 = startingX + space; final double y1 = y - dimTitle.getHeight() / 2 - 0.5; ug = ug.apply(new UTranslate(x1, y1)); if (clearArea) { ug.apply(getStroke()).draw(new URectangle(dimTitle)); } title.drawU(ug); } public void drawMe(UGraphic ug) { ug.draw(this); } public UStroke getStroke() { if (style == '\0') { throw new IllegalStateException(); // return null; } else if (style == '=') { return new UStroke(); } else if (style == '.') { return new UStroke(1, 2, 1); } else if (style == '-') { return new UStroke(); } else { return new UStroke(1.5); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UImage.java000066400000000000000000000044561312650303100252370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.AffineTransform; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; public class UImage implements UShape { private final BufferedImage image; public UImage(BufferedImage image) { this.image = image; } public UImage(BufferedImage before, double scale) { if (scale == 1) { this.image = before; return; } final int w = (int) Math.round(before.getWidth() * scale); final int h = (int) Math.round(before.getHeight() * scale); final BufferedImage after = new BufferedImage(w, h, before.getType()); final AffineTransform at = new AffineTransform(); at.scale(scale, scale); final AffineTransformOp scaleOp = new AffineTransformOp(at, AffineTransformOp.TYPE_BILINEAR); this.image = scaleOp.filter(before, after); } public UImage scale(double scale) { return new UImage(image, scale); } public final BufferedImage getImage() { return image; } public double getWidth() { return image.getWidth()-1; } public double getHeight() { return image.getHeight()-1; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UImageSvg.java000066400000000000000000000031601312650303100257060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import net.sourceforge.plantuml.SvgString; public class UImageSvg implements UShape { private final SvgString svg; public UImageSvg(SvgString tmp) { this.svg = tmp; } public final SvgString getSvg() { return svg; } public int getHeight() { return svg.getData("height"); } public int getWidth() { return svg.getData("width"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/ULayoutGroup.java000066400000000000000000000057431312650303100265070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; public class ULayoutGroup { private final PlacementStrategy placementStrategy; public ULayoutGroup(PlacementStrategy placementStrategy) { this.placementStrategy = placementStrategy; } public void drawU(UGraphic ug, double width, double height) { for (Map.Entry ent : placementStrategy.getPositions(width, height).entrySet()) { final TextBlock block = ent.getKey(); final Point2D pos = ent.getValue(); block.drawU(ug.apply(new UTranslate(pos))); } } public void add(TextBlock block) { placementStrategy.add(block); } public Rectangle2D getInnerPosition(String member, double width, double height, StringBounder stringBounder) { final Set> all = placementStrategy.getPositions(width, height).entrySet(); Rectangle2D result = tryOne(all, member, stringBounder, InnerStrategy.STRICT); if (result == null) { result = tryOne(all, member, stringBounder, InnerStrategy.LAZZY); } return result; } private Rectangle2D tryOne(final Set> all, String member, StringBounder stringBounder, InnerStrategy mode) { for (Map.Entry ent : all) { final TextBlock block = ent.getKey(); final Rectangle2D result = block.getInnerPosition(member, stringBounder, mode); if (result != null) { final UTranslate translate = new UTranslate(ent.getValue()); return translate.apply(result); } } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/ULine.java000066400000000000000000000036421312650303100251000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; public class ULine extends AbstractShadowable implements Scalable { private final double dx; private final double dy; public UShape getScaled(double scale) { if (scale == 1) { return this; } final AbstractShadowable result = new ULine(dx * scale, dy * scale); result.setDeltaShadow(this.getDeltaShadow()); return result; } public ULine(double dx, double dy) { this.dx = dx; this.dy = dy; } @Override public String toString() { return "ULine dx=" + dx + " dy=" + dy; } public double getDX() { return dx; } public double getDY() { return dy; } public double getLength() { return Math.sqrt(dx * dx + dy * dy); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UMotif.java000066400000000000000000000113241312650303100252630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.CubicCurve2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.posimo.DotPath; public class UMotif { private final List points = new ArrayList(); public UMotif(int... data) { for (int i = 0; i < data.length; i += 2) { points.add(new Point2D.Double(data[i], data[i + 1])); } } public UMotif(String s) { final Point2D last = new Point2D.Double(); for (int i = 0; i < s.length(); i++) { final Point2D read = convertPoint(s.charAt(i)); last.setLocation(last.getX() + read.getX(), last.getY() + read.getY()); points.add(new Point2D.Double(last.getX(), last.getY())); } } double getLength() { return points.get(0).distance(points.get(points.size() - 1)); } List getPoints() { return Collections.unmodifiableList(points); } public DotPath getRectangle(double width, double height) { final double len = getLength(); final int nb1 = (int) (width / len); DotPath h1 = drawHorizontal(0, 0, nb1); final int nb2 = (int) (height / len); final DotPath v1 = drawVertical(h1.getEndPoint().getX(), h1.getEndPoint().getY(), nb2); h1 = h1.addAfter(v1); return h1; } static Point2D convertPoint(char c) { final int v = convertFromChar(c); final int x = v % 7; final int y = v / 7; return new Point2D.Double(x - 3, y - 3); } static int convertFromChar(char c) { if (c >= 'A' && c <= 'Z') { return c - 'A'; } if (c >= 'a' && c <= 'w') { return c - 'a' + 26; } throw new IllegalArgumentException(); } // public void drawOld(UGraphic ug, double x, double y) { // final UPath path = new UPath(); // path.add(new double[] { x, y }, USegmentType.SEG_MOVETO); // for (Point2D p : points) { // path.add(new double[] { x + p.getX(), y + p.getY() }, // USegmentType.SEG_LINETO); // } // ug.draw(0, 0, path); // } public void drawHorizontal(UGraphic ug, double x, double y, int nb) { final DotPath path = drawHorizontal(x, y, nb); ug.draw(path); } public void drawVertical(UGraphic ug, double x, double y, int nb) { final DotPath path = drawVertical(x, y, nb); ug.draw(path); } DotPath drawHorizontal(double x, double y, int nb) { DotPath path = new DotPath(); for (int i = 0; i < nb; i++) { path = addHorizontal(x, y, path); x = path.getEndPoint().getX(); y = path.getEndPoint().getY(); } return path; } DotPath drawVertical(double x, double y, int nb) { DotPath path = new DotPath(); for (int i = 0; i < nb; i++) { path = addVertical(x, y, path); x = path.getEndPoint().getX(); y = path.getEndPoint().getY(); } return path; } private DotPath addHorizontal(double x, double y, DotPath path) { double lastx = 0; double lasty = 0; for (Point2D p : points) { final double x1 = lastx + x; final double y1 = lasty + y; final double x2 = p.getX() + x; final double y2 = p.getY() + y; path = path.addAfter(new CubicCurve2D.Double(x1, y1, x1, y1, x2, y2, x2, y2)); lastx = p.getX(); lasty = p.getY(); } return path; } private DotPath addVertical(double x, double y, DotPath path) { double lastx = 0; double lasty = 0; for (Point2D p : points) { final double x1 = lastx + x; final double y1 = lasty + y; final double x2 = p.getY() + x; final double y2 = p.getX() + y; path = path.addAfter(new CubicCurve2D.Double(x1, y1, x1, y1, x2, y2, x2, y2)); lastx = p.getY(); lasty = p.getX(); } return path; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UParam.java000066400000000000000000000030311312650303100252410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import net.sourceforge.plantuml.graphic.HtmlColor; public interface UParam { public HtmlColor getColor(); public HtmlColor getBackcolor(); public UStroke getStroke(); public boolean isHidden(); public UPattern getPattern(); public double getScale(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UParamNull.java000066400000000000000000000032571312650303100261060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import net.sourceforge.plantuml.graphic.HtmlColor; public class UParamNull implements UParam { public HtmlColor getColor() { return null; } public HtmlColor getBackcolor() { return null; } public UStroke getStroke() { return new UStroke(); } public boolean isHidden() { return false; } public UPattern getPattern() { return UPattern.FULL; } public double getScale() { return 1; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UPath.java000066400000000000000000000112611312650303100251010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class UPath extends AbstractShadowable implements Iterable { private final String comment; private final List segments = new ArrayList(); private MinMax minmax = MinMax.getEmpty(false); private boolean isOpenIconic; public UPath(String comment) { this.comment = comment; } public UPath() { this(null); } public void add(double[] coord, USegmentType pathType) { addInternal(new USegment(coord, pathType)); } private void addInternal(USegment segment) { segments.add(segment); final double coord[] = segment.getCoord(); if (segment.getSegmentType() == USegmentType.SEG_ARCTO) { minmax = minmax.addPoint(coord[5], coord[6]); // minmax = minmax.addPoint(coord[5] + coord[0], coord[6] + coord[1]); // minmax = minmax.addPoint(coord[5] - coord[0], coord[6] - coord[1]); } else { for (int i = 0; i < coord.length; i += 2) { minmax = minmax.addPoint(coord[i], coord[i + 1]); } } } public UPath translate(double dx, double dy) { final UPath result = new UPath(comment); for (USegment seg : segments) { result.addInternal(seg.translate(dx, dy)); } return result; } public UPath rotate(double theta) { final UPath result = new UPath(comment); for (USegment seg : segments) { result.addInternal(seg.rotate(theta)); } return result; } public void moveTo(Point2D pt) { moveTo(pt.getX(), pt.getY()); } public void lineTo(Point2D pt) { lineTo(pt.getX(), pt.getY()); } public void moveTo(double x, double y) { add(new double[] { x, y }, USegmentType.SEG_MOVETO); } public void lineTo(double x, double y) { add(new double[] { x, y }, USegmentType.SEG_LINETO); } public void cubicTo(double ctrlx1, double ctrly1, double ctrlx2, double ctrly2, double x2, double y2) { add(new double[] { ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2 }, USegmentType.SEG_CUBICTO); } public void quadTo(double ctrlx, double ctrly, double x2, double y2) { add(new double[] { ctrlx, ctrly, ctrlx, ctrly, x2, y2 }, USegmentType.SEG_CUBICTO); } public void quadTo(Point2D ctrl, Point2D pt) { quadTo(ctrl.getX(), ctrl.getY(), pt.getX(), pt.getY()); } public void arcTo(double rx, double ry, double x_axis_rotation, double large_arc_flag, double sweep_flag, double x, double y) { add(new double[] { rx, ry, x_axis_rotation, large_arc_flag, sweep_flag, x, y }, USegmentType.SEG_ARCTO); // lineTo(x, y); } public void arcTo(Point2D pt, double radius, double large_arc_flag, double sweep_flag) { add(new double[] { radius, radius, 0, large_arc_flag, sweep_flag, pt.getX(), pt.getY() }, USegmentType.SEG_ARCTO); // lineTo(x, y); } public void closePath() { // System.err.println("CLOSE_PATH"); } public double getMaxX() { return minmax.getMaxX(); } public double getMaxY() { return minmax.getMaxY(); } public double getMinX() { return minmax.getMinX(); } public double getMinY() { return minmax.getMinY(); } @Override public String toString() { return segments.toString(); } public Iterator iterator() { return segments.iterator(); } public boolean isOpenIconic() { return isOpenIconic; } public void setOpenIconic(boolean isOpenIconic) { this.isOpenIconic = isOpenIconic; } public final String getComment() { return comment; } // public boolean isEmpty() { // return segments.size() == 0; // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UPattern.java000066400000000000000000000025651312650303100256310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; public enum UPattern implements UChange { FULL, HORIZONTAL_STRIPE, VERTICAL_STRIPE, SMALL_CIRCLE } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UPixel.java000066400000000000000000000024711312650303100252710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; public class UPixel implements UShape { } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UPolygon.java000066400000000000000000000074251312650303100256430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; public class UPolygon extends AbstractShadowable { private final List all = new ArrayList(); private final String name; private MinMax minmax = MinMax.getEmpty(false); public UPolygon() { this((String) null); } public UPolygon(List points) { this((String) null); all.addAll(points); for (Point2D.Double pt : all) { manageMinMax(pt.getX(), pt.getY()); } } public UPolygon(String name) { this.name = name; } public Point2D checkMiddleContactForSpecificTriangle(Point2D center) { for (int i = 0; i < all.size() - 1; i++) { final Point2D.Double pt1 = all.get(i); final Point2D.Double pt2 = all.get(i + 1); final Point2D.Double middle = new Point2D.Double((pt1.getX() + pt2.getX()) / 2, (pt1.getY() + pt2.getY()) / 2); final double delta = middle.distance(center); if (delta < 1) { return all.get((i - 1) % all.size()); } } return null; } public void addPoint(double x, double y) { all.add(new Point2D.Double(x, y)); manageMinMax(x, y); } public void addPoint(Point2D point) { addPoint(point.getX(), point.getY()); } private void manageMinMax(double x, double y) { minmax = minmax.addPoint(x, y); } public List getPoints() { return all; } public UPolygon translate(double dx, double dy) { final UPolygon result = new UPolygon(); for (Point2D.Double pt : all) { result.addPoint(pt.x + dx, pt.y + dy); } return result; } public void rotate(double theta) { final AffineTransform rotate = AffineTransform.getRotateInstance(theta); for (Point2D.Double pt : all) { rotate.transform(pt, pt); } } @Override public String toString() { if (name != null) { return name; } return super.toString() + " " + all; } public double getHeight() { return minmax.getHeight(); } public double getWidth() { return minmax.getWidth(); } public double getMinX() { return minmax.getMinX(); } public double getMinY() { return minmax.getMinY(); } public double getMaxX() { return minmax.getMaxX(); } public double getMaxY() { return minmax.getMaxY(); } public MinMax getMinMax() { return minmax; } public double[] getPointArray(double x, double y) { final double points[] = new double[getPoints().size() * 2]; int i = 0; for (Point2D pt : getPoints()) { points[i++] = pt.getX() + x; points[i++] = pt.getY() + y; } return points; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/URectangle.java000066400000000000000000000055151312650303100261160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Dimension2D; public class URectangle extends AbstractShadowable implements Scalable { private final double width; private final double height; private final double rx; private final double ry; private final String comment; public UShape getScaled(double scale) { if (scale == 1) { return this; } final AbstractShadowable result = new URectangle(width * scale, height * scale, rx * scale, ry * scale, comment); result.setDeltaShadow(this.getDeltaShadow()); return result; } public URectangle(double width, double height) { this(width, height, 0, 0, null); } public URectangle(double width, double height, double rx, double ry) { this(width, height, rx, ry, null); } public URectangle(double width, double height, double rx, double ry, String comment) { // if (height == 0) { // throw new IllegalArgumentException(); // } if (width == 0) { throw new IllegalArgumentException(); } this.comment = comment; this.width = width; this.height = height; this.rx = rx; this.ry = ry; } public URectangle(Dimension2D dim) { this(dim.getWidth(), dim.getHeight()); } @Override public String toString() { return "width=" + width + " height=" + height; } public double getWidth() { return width; } public double getHeight() { return height; } public double getRx() { return rx; } public double getRy() { return ry; } public URectangle clip(UClip clip) { return this; } public MinMax getMinMax() { return MinMax.fromMax(width, height); } public final String getComment() { return comment; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UScale.java000066400000000000000000000032541312650303100252370ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; public class UScale implements UChange { private final double scale; @Override public String toString() { return "scale scale=" + scale; } public UScale(double scale) { this.scale = scale; } public double getScale() { return scale; } // public Point2D getTranslated(Point2D p) { // if (p == null) { // return null; // } // return new Point2D.Double(p.getX() + dx, p.getY() + dy); // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/USegment.java000066400000000000000000000046271312650303100256170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import java.util.Arrays; public class USegment { private final double coord[]; private final USegmentType pathType; public USegment(double[] coord, USegmentType pathType) { this.coord = coord.clone(); this.pathType = pathType; } @Override public String toString() { return pathType.toString() + " " + Arrays.toString(coord); } public final double[] getCoord() { return coord; } public final USegmentType getSegmentType() { return pathType; } public USegment translate(double dx, double dy) { if (coord.length != 2) { throw new UnsupportedOperationException(); } Point2D p1 = new Point2D.Double(coord[0] + dx, coord[1] + dy); return new USegment(new double[] { p1.getX(), p1.getY() }, pathType); } public USegment rotate(double theta) { if (coord.length != 2) { throw new UnsupportedOperationException(); } Point2D p1 = new Point2D.Double(coord[0], coord[1]); final AffineTransform rotate = AffineTransform.getRotateInstance(theta); rotate.transform(p1, p1); return new USegment(new double[] { p1.getX(), p1.getY() }, pathType); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/USegmentType.java000066400000000000000000000036671312650303100264640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.PathIterator; import java.util.EnumSet; import net.sourceforge.plantuml.ugraphic.arc.ExtendedPathIterator; public enum USegmentType { SEG_MOVETO(PathIterator.SEG_MOVETO), SEG_LINETO(PathIterator.SEG_LINETO), SEG_QUADTO(PathIterator.SEG_QUADTO), SEG_CUBICTO( PathIterator.SEG_CUBICTO), SEG_CLOSE(PathIterator.SEG_CLOSE), SEG_ARCTO(ExtendedPathIterator.SEG_ARCTO); private final int code; private USegmentType(int code) { this.code = code; } public static USegmentType getByCode(int code) { for (USegmentType p : EnumSet.allOf(USegmentType.class)) { if (p.code == code) { return p; } } throw new IllegalArgumentException(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UShape.java000066400000000000000000000024541312650303100252510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; public interface UShape { } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UStroke.java000066400000000000000000000045511312650303100254600ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; public class UStroke implements UChange { private final double dashVisible; private final double dashSpace; private final double thickness; @Override public String toString() { return "" + dashVisible + "-" + dashSpace + "-" + thickness; } public UStroke(double dashVisible, double dashSpace, double thickness) { this.dashVisible = dashVisible; this.dashSpace = dashSpace; this.thickness = thickness; } public UStroke(double thickness) { this(0, 0, thickness); } public UStroke() { this(1.0); } public double getDashVisible() { return dashVisible; } public double getDashSpace() { return dashSpace; } public double getThickness() { return thickness; } public String getDasharraySvg() { if (dashVisible == 0) { return null; } return "" + dashVisible + "," + dashSpace; } public String getDashTikz() { if (dashVisible == 0) { return null; } return "on " + dashVisible + "pt off " + dashSpace + "pt"; } // public String getDasharrayEps() { // if (dashVisible == 0) { // return null; // } // return "" + dashVisible + " " + dashSpace; // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UText.java000066400000000000000000000040061312650303100251300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.font.LineMetrics; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.TextBlockUtils; public class UText implements UShape { private final String text; private final FontConfiguration font; @Override public String toString() { return "UText[" + text + "]"; } public UText(String text, FontConfiguration font) { assert text.indexOf('\t') == -1; this.text = text; this.font = font; } public String getText() { return text; } public FontConfiguration getFontConfiguration() { return font; } public double getDescent() { final LineMetrics fm = TextBlockUtils.getLineMetrics(font.getFont(), text); final double descent = fm.getDescent(); return descent; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/UTranslate.java000066400000000000000000000050241312650303100261420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; public class UTranslate implements UChange { private final double dx; private final double dy; @Override public String toString() { return "translate dx=" + dx + " dy=" + dy; } public UTranslate(double dx, double dy) { this.dx = dx; this.dy = dy; } public UTranslate(Point2D p) { this(p.getX(), p.getY()); } public UTranslate() { this(0, 0); } public double getDx() { return dx; } public double getDy() { return dy; } public boolean isAlmostSame(UTranslate other) { return this.dx == other.dx || this.dy == other.dy; } public Point2D getTranslated(Point2D p) { if (p == null) { return null; } return new Point2D.Double(p.getX() + dx, p.getY() + dy); } public UTranslate scaled(double scale) { return new UTranslate(dx * scale, dy * scale); } public UTranslate compose(UTranslate other) { return new UTranslate(dx + other.dx, dy + other.dy); } public UTranslate reverse() { return new UTranslate(-dx, -dy); } public Rectangle2D apply(Rectangle2D rect) { return new Rectangle2D.Double(rect.getX() + dx, rect.getY() + dy, rect.getWidth(), rect.getHeight()); } public UTranslate multiplyBy(double v) { return new UTranslate(dx * v, dy * v); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/arc/000077500000000000000000000000001312650303100237615ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/arc/ExtendedGeneralPath.java000066400000000000000000000502131312650303100305000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Thierry Kormann * * */ package net.sourceforge.plantuml.ugraphic.arc; /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ import java.awt.Rectangle; import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.Arc2D; import java.awt.geom.GeneralPath; import java.awt.geom.PathIterator; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.util.Arrays; /** * The ExtendedGeneralPath class represents a geometric path constructed from straight lines, quadratic and * cubic (Bezier) curves and elliptical arc. This class delegates lines and curves to an enclosed * GeneralPath. Elliptical arc is implemented using an Arc2D in double precision. * *

    * Warning : An elliptical arc may be composed of several path segments. For further details, see the SVG * Appendix F.6 * * @author Thierry Kormann * @version $Id: ExtendedGeneralPath.java 594018 2007-11-12 04:17:41Z cam $ */ public class ExtendedGeneralPath implements Shape, Cloneable { /** The enclosed general path. */ private GeneralPath path; private int numVals = 0; private int numSeg = 0; private double[] values = null; private int[] types = null; private double mx; private double my; private double cx; private double cy; /** * Constructs a new ExtendedGeneralPath. */ public ExtendedGeneralPath() { path = new GeneralPath(); } /** * Constructs a new ExtendedGeneralPath with the specified winding rule to control operations that * require the interior of the path to be defined. */ public ExtendedGeneralPath(int rule) { path = new GeneralPath(rule); } /** * Constructs a new ExtendedGeneralPath object with the specified winding rule and the specified * initial capacity to store path coordinates. */ public ExtendedGeneralPath(int rule, int initialCapacity) { path = new GeneralPath(rule, initialCapacity); } /** * Constructs a new ExtendedGeneralPath object from an arbitrary Shape object. */ public ExtendedGeneralPath(Shape s) { this(); append(s, false); } /** * Adds an elliptical arc, defined by two radii, an angle from the x-axis, a flag to choose the large arc or not, a * flag to indicate if we increase or decrease the angles and the final point of the arc. * * @param rx * the x radius of the ellipse * @param ry * the y radius of the ellipse * * @param angle * the angle from the x-axis of the current coordinate system to the x-axis of the ellipse in degrees. * * @param largeArcFlag * the large arc flag. If true the arc spanning less than or equal to 180 degrees is chosen, otherwise * the arc spanning greater than 180 degrees is chosen * * @param sweepFlag * the sweep flag. If true the line joining center to arc sweeps through decreasing angles otherwise it * sweeps through increasing angles * * @param x * the absolute x coordinate of the final point of the arc. * @param y * the absolute y coordinate of the final point of the arc. */ public void arcTo(double rx, double ry, double angle, boolean largeArcFlag, boolean sweepFlag, double x, double y) { // Ensure radii are valid if (rx == 0 || ry == 0) { lineTo(x, y); return; } checkMoveTo(); // check if prev command was moveto // Get the current (x, y) coordinates of the path final double x0 = cx; final double y0 = cy; if (x0 == x && y0 == y) { // If the endpoints (x, y) and (x0, y0) are identical, then this // is equivalent to omitting the elliptical arc segment entirely. return; } final Arc2D arc = computeArc(x0, y0, rx, ry, angle, largeArcFlag, sweepFlag, x, y); if (arc == null) { return; } final AffineTransform t = AffineTransform.getRotateInstance(Math.toRadians(angle), arc.getCenterX(), arc.getCenterY()); final Shape s = t.createTransformedShape(arc); path.append(s, true); makeRoom(7); types[numSeg++] = ExtendedPathIterator.SEG_ARCTO; values[numVals++] = rx; values[numVals++] = ry; values[numVals++] = angle; values[numVals++] = largeArcFlag ? 1 : 0; values[numVals++] = sweepFlag ? 1 : 0; cx = values[numVals++] = x; cy = values[numVals++] = y; } /** * This constructs an unrotated Arc2D from the SVG specification of an Elliptical arc. To get the final arc you need * to apply a rotation transform such as: * * AffineTransform.getRotateInstance (angle, arc.getX()+arc.getWidth()/2, arc.getY()+arc.getHeight()/2); */ public static Arc2D computeArc(double x0, double y0, double rx, double ry, double angle, boolean largeArcFlag, boolean sweepFlag, double x, double y) { // // Elliptical arc implementation based on the SVG specification notes // // Compute the half distance between the current and the final point final double dx2 = (x0 - x) / 2.0; final double dy2 = (y0 - y) / 2.0; // Convert angle from degrees to radians angle = Math.toRadians(angle % 360.0); final double cosAngle = Math.cos(angle); final double sinAngle = Math.sin(angle); // // Step 1 : Compute (x1, y1) // final double x1 = cosAngle * dx2 + sinAngle * dy2; final double y1 = -sinAngle * dx2 + cosAngle * dy2; // Ensure radii are large enough rx = Math.abs(rx); ry = Math.abs(ry); double prx = rx * rx; double pry = ry * ry; final double px1 = x1 * x1; final double py1 = y1 * y1; // check that radii are large enough final double radiiCheck = px1 / prx + py1 / pry; if (radiiCheck > 1) { rx = Math.sqrt(radiiCheck) * rx; ry = Math.sqrt(radiiCheck) * ry; prx = rx * rx; pry = ry * ry; } // // Step 2 : Compute (cx1, cy1) // double sign = (largeArcFlag == sweepFlag) ? -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 * ((rx * y1) / ry); final double cy1 = coef * -((ry * x1) / rx); // // Step 3 : Compute (cx, cy) from (cx1, cy1) // final double sx2 = (x0 + x) / 2.0; final double sy2 = (y0 + y) / 2.0; final double cx = sx2 + (cosAngle * cx1 - sinAngle * cy1); final double cy = sy2 + (sinAngle * cx1 + cosAngle * cy1); // // Step 4 : Compute the angleStart (angle1) and the angleExtent (dangle) // final double ux = (x1 - cx1) / rx; final double uy = (y1 - cy1) / ry; final double vx = (-x1 - cx1) / rx; final double vy = (-y1 - cy1) / ry; // Compute the angle start double n = Math.sqrt((ux * ux) + (uy * uy)); double p = ux; // (1 * ux) + (0 * uy) sign = (uy < 0) ? -1.0 : 1.0; 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.0 : 1.0; double angleExtent = Math.toDegrees(sign * Math.acos(p / n)); if (!sweepFlag && angleExtent > 0) { angleExtent -= 360f; } else if (sweepFlag && angleExtent < 0) { angleExtent += 360f; } angleExtent %= 360f; angleStart %= 360f; // // We can now build the resulting Arc2D in double precision // final Arc2D.Double arc = new Arc2D.Double(); arc.x = cx - rx; arc.y = cy - ry; arc.width = rx * 2.0; arc.height = ry * 2.0; arc.start = -angleStart; arc.extent = -angleExtent; return arc; } /** * Delegates to the enclosed GeneralPath. */ public void moveTo(double x, double y) { // Don't add moveto to general path unless there is a reason. makeRoom(2); types[numSeg++] = PathIterator.SEG_MOVETO; cx = mx = values[numVals++] = x; cy = my = values[numVals++] = y; } /** * Delegates to the enclosed GeneralPath. */ public void lineTo(double x, double y) { checkMoveTo(); // check if prev command was moveto path.lineTo(x, y); makeRoom(2); types[numSeg++] = PathIterator.SEG_LINETO; cx = values[numVals++] = x; cy = values[numVals++] = y; } /** * Delegates to the enclosed GeneralPath. */ public void quadTo(double x1, double y1, double x2, double y2) { checkMoveTo(); // check if prev command was moveto path.quadTo(x1, y1, x2, y2); makeRoom(4); types[numSeg++] = PathIterator.SEG_QUADTO; values[numVals++] = x1; values[numVals++] = y1; cx = values[numVals++] = x2; cy = values[numVals++] = y2; } /** * Delegates to the enclosed GeneralPath. */ public void curveTo(double x1, double y1, double x2, double y2, double x3, double y3) { checkMoveTo(); // check if prev command was moveto path.curveTo(x1, y1, x2, y2, x3, y3); makeRoom(6); types[numSeg++] = PathIterator.SEG_CUBICTO; values[numVals++] = x1; values[numVals++] = y1; values[numVals++] = x2; values[numVals++] = y2; cx = values[numVals++] = x3; cy = values[numVals++] = y3; } /** * Delegates to the enclosed GeneralPath. */ public void closePath() { // Don't double close path. if (numSeg != 0 && types[numSeg - 1] == PathIterator.SEG_CLOSE) { return; } // Only close path if the previous command wasn't a moveto if (numSeg != 0 && types[numSeg - 1] != PathIterator.SEG_MOVETO) { path.closePath(); } makeRoom(0); types[numSeg++] = PathIterator.SEG_CLOSE; cx = mx; cy = my; } /** * Checks if previous command was a moveto command, skipping a close command (if present). */ protected void checkMoveTo() { if (numSeg == 0) { return; } switch (types[numSeg - 1]) { case PathIterator.SEG_MOVETO: path.moveTo(values[numVals - 2], values[numVals - 1]); break; case PathIterator.SEG_CLOSE: if (numSeg == 1) { return; } if (types[numSeg - 2] == PathIterator.SEG_MOVETO) { path.moveTo(values[numVals - 2], values[numVals - 1]); } break; default: break; } } /** * Delegates to the enclosed GeneralPath. */ public void append(Shape s, boolean connect) { append(s.getPathIterator(new AffineTransform()), connect); } /** * Delegates to the enclosed GeneralPath. */ public void append(PathIterator pi, boolean connect) { final double[] vals = new double[6]; while (!pi.isDone()) { Arrays.fill(vals, 0); int type = pi.currentSegment(vals); pi.next(); if (connect && numVals != 0) { if (type == PathIterator.SEG_MOVETO) { final double x = vals[0]; final double y = vals[1]; if (x != cx || y != cy) { // Change MOVETO to LINETO. type = PathIterator.SEG_LINETO; } else { // Redundant segment (move to current loc) drop it... if (pi.isDone()) { break; // Nothing interesting } type = pi.currentSegment(vals); pi.next(); } } connect = false; } switch (type) { case PathIterator.SEG_CLOSE: closePath(); break; case PathIterator.SEG_MOVETO: moveTo(vals[0], vals[1]); break; case PathIterator.SEG_LINETO: lineTo(vals[0], vals[1]); break; case PathIterator.SEG_QUADTO: quadTo(vals[0], vals[1], vals[2], vals[3]); break; case PathIterator.SEG_CUBICTO: curveTo(vals[0], vals[1], vals[2], vals[3], vals[4], vals[5]); break; } } } /** * Delegates to the enclosed GeneralPath. */ public void append(ExtendedPathIterator epi, boolean connect) { final double[] vals = new double[7]; while (!epi.isDone()) { Arrays.fill(vals, 0); int type = epi.currentSegment(vals); epi.next(); if (connect && numVals != 0) { if (type == PathIterator.SEG_MOVETO) { final double x = vals[0]; final double y = vals[1]; if ((x != cx) || (y != cy)) { // Change MOVETO to LINETO. type = PathIterator.SEG_LINETO; } else { // Redundant segment (move to current loc) drop it... if (epi.isDone()) { break; // Nothing interesting } type = epi.currentSegment(vals); epi.next(); } } connect = false; } switch (type) { case PathIterator.SEG_CLOSE: closePath(); break; case PathIterator.SEG_MOVETO: moveTo(vals[0], vals[1]); break; case PathIterator.SEG_LINETO: lineTo(vals[0], vals[1]); break; case PathIterator.SEG_QUADTO: quadTo(vals[0], vals[1], vals[2], vals[3]); break; case PathIterator.SEG_CUBICTO: curveTo(vals[0], vals[1], vals[2], vals[3], vals[4], vals[5]); break; case ExtendedPathIterator.SEG_ARCTO: arcTo(vals[0], vals[1], vals[2], vals[3] != 0, vals[4] != 0, vals[5], vals[6]); break; } } } /** * Delegates to the enclosed GeneralPath. */ public int getWindingRule() { return path.getWindingRule(); } /** * Delegates to the enclosed GeneralPath. */ public void setWindingRule(int rule) { path.setWindingRule(rule); } /** * get the current position or null. */ public Point2D getCurrentPoint() { if (numVals == 0) { return null; } return new Point2D.Double(cx, cy); } /** * Delegates to the enclosed GeneralPath. */ public void reset() { path.reset(); numSeg = 0; numVals = 0; values = null; types = null; } /** * Delegates to the enclosed GeneralPath. */ public void transform(AffineTransform at) { if (at.getType() != AffineTransform.TYPE_IDENTITY) { throw new IllegalArgumentException("ExtendedGeneralPaths can not be transformed"); } } /** * Delegates to the enclosed GeneralPath. */ public Shape createTransformedShape(AffineTransform at) { return path.createTransformedShape(at); } /** * Delegates to the enclosed GeneralPath. */ public Rectangle getBounds() { return path.getBounds(); } /** * Delegates to the enclosed GeneralPath. */ public Rectangle2D getBounds2D() { return path.getBounds2D(); } /** * Delegates to the enclosed GeneralPath. */ public boolean contains(double x, double y) { return path.contains(x, y); } /** * Delegates to the enclosed GeneralPath. */ public boolean contains(Point2D p) { return path.contains(p); } /** * Delegates to the enclosed GeneralPath. */ public boolean contains(double x, double y, double w, double h) { return path.contains(x, y, w, h); } /** * Delegates to the enclosed GeneralPath. */ public boolean contains(Rectangle2D r) { return path.contains(r); } /** * Delegates to the enclosed GeneralPath. */ public boolean intersects(double x, double y, double w, double h) { return path.intersects(x, y, w, h); } /** * Delegates to the enclosed GeneralPath. */ public boolean intersects(Rectangle2D r) { return path.intersects(r); } /** * Delegates to the enclosed GeneralPath. */ public PathIterator getPathIterator(AffineTransform at) { return path.getPathIterator(at); } /** * Delegates to the enclosed GeneralPath. */ public PathIterator getPathIterator(AffineTransform at, double flatness) { return path.getPathIterator(at, flatness); } /** * Delegates to the enclosed GeneralPath. */ public ExtendedPathIterator getExtendedPathIterator() { return new EPI(); } class EPI implements ExtendedPathIterator { private int segNum = 0; private int valsIdx = 0; public int currentSegment() { return types[segNum]; } public int currentSegment(double[] coords) { final int ret = types[segNum]; switch (ret) { case SEG_CLOSE: break; case SEG_MOVETO: case SEG_LINETO: coords[0] = values[valsIdx]; coords[1] = values[valsIdx + 1]; break; case SEG_QUADTO: coords[0] = values[valsIdx]; coords[1] = values[valsIdx + 1]; coords[2] = values[valsIdx + 2]; coords[3] = values[valsIdx + 3]; break; case SEG_CUBICTO: coords[0] = values[valsIdx]; coords[1] = values[valsIdx + 1]; coords[2] = values[valsIdx + 2]; coords[3] = values[valsIdx + 3]; coords[4] = values[valsIdx + 4]; coords[5] = values[valsIdx + 5]; break; case SEG_ARCTO: coords[0] = values[valsIdx]; coords[1] = values[valsIdx + 1]; coords[2] = values[valsIdx + 2]; coords[3] = values[valsIdx + 3]; coords[4] = values[valsIdx + 4]; coords[5] = values[valsIdx + 5]; coords[6] = values[valsIdx + 6]; break; } return ret; } public int getWindingRule() { return path.getWindingRule(); } public boolean isDone() { return segNum == numSeg; } public void next() { final int type = types[segNum++]; switch (type) { case SEG_CLOSE: break; case SEG_MOVETO: // fallthrough is intended case SEG_LINETO: valsIdx += 2; break; case SEG_QUADTO: valsIdx += 4; break; case SEG_CUBICTO: valsIdx += 6; break; case SEG_ARCTO: valsIdx += 7; break; } } } /** * Delegates to the enclosed GeneralPath. */ public Object clone() { try { final ExtendedGeneralPath result = (ExtendedGeneralPath) super.clone(); result.path = (GeneralPath) path.clone(); if (values != null) { result.values = new double[values.length]; System.arraycopy(values, 0, result.values, 0, values.length); } result.numVals = numVals; if (types != null) { result.types = new int[types.length]; System.arraycopy(types, 0, result.types, 0, types.length); } result.numSeg = numSeg; return result; } catch (CloneNotSupportedException ex) { ex.printStackTrace(); } return null; } /** * Make sure, that the requested number of slots in vales[] are available. Must be called even for numValues = 0, * because it is also used for initialization of those arrays. * * @param numValues * number of requested coordinates */ private void makeRoom(int numValues) { if (values == null) { values = new double[2 * numValues]; types = new int[2]; numVals = 0; numSeg = 0; return; } final int newSize = numVals + numValues; if (newSize > values.length) { int nlen = values.length * 2; if (nlen < newSize) { nlen = newSize; } final double[] nvals = new double[nlen]; System.arraycopy(values, 0, nvals, 0, numVals); values = nvals; } if (numSeg == types.length) { final int[] ntypes = new int[types.length * 2]; System.arraycopy(types, 0, ntypes, 0, types.length); types = ntypes; } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/arc/ExtendedPathIterator.java000066400000000000000000000130131312650303100307110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Thomas DeWeese * * */ package net.sourceforge.plantuml.ugraphic.arc; import java.awt.geom.PathIterator; /* * * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ /** * The ExtendedPathIterator class represents a geometric path constructed from straight lines, quadratic * and cubic (Bezier) curves and elliptical arcs. This interface is identical to that of PathIterator except it can * return SEG_ARCTO from currentSegment, also the array of values passed to currentSegment must be of length 7 or an * error will be thrown. * * This does not extend PathIterator as it would break the interface contract for that class. * * @author Thomas DeWeese * @version $Id: ExtendedPathIterator.java 475477 2006-11-15 22:44:28Z cam $ */ public interface ExtendedPathIterator { /** * The segment type constant that specifies that the preceding subpath should be closed by appending a line segment * back to the point corresponding to the most recent SEG_MOVETO. */ int SEG_CLOSE = PathIterator.SEG_CLOSE; /** * The segment type constant for a point that specifies the end point of a line to be drawn from the most recently * specified point. */ int SEG_MOVETO = PathIterator.SEG_MOVETO; /** * The segment type constant for a point that specifies the end point of a line to be drawn from the most recently * specified point. */ int SEG_LINETO = PathIterator.SEG_LINETO; /** * The segment type constant for the pair of points that specify a quadratic parametric curve to be drawn from the * most recently specified point. The curve is interpolated by solving the parametric control equation in the range * (t=[0..1]) using the most recently specified (current) point (CP), the first control point (P1), and the final * interpolated control point (P2). */ int SEG_QUADTO = PathIterator.SEG_QUADTO; /** * The segment type constant for the set of 3 points that specify a cubic parametric curve to be drawn from the most * recently specified point. The curve is interpolated by solving the parametric control equation in the range * (t=[0..1]) using the most recently specified (current) point (CP), the first control point (P1), the second * control point (P2), and the final interpolated control point (P3). */ int SEG_CUBICTO = PathIterator.SEG_CUBICTO; /** * The segment type constant for an elliptical arc. This consists of Seven values [rx, ry, angle, largeArcFlag, * sweepFlag, x, y]. rx, ry are the radious of the ellipse. angle is angle of the x axis of the ellipse. * largeArcFlag is zero if the smaller of the two arcs are to be used. sweepFlag is zero if the 'left' branch is * taken one otherwise. x and y are the destination for the ellipse. */ int SEG_ARCTO = 4321; /** * The winding rule constant for specifying an even-odd rule for determining the interior of a path. The even-odd * rule specifies that a point lies inside the path if a ray drawn in any direction from that point to infinity is * crossed by path segments an odd number of times. */ int WIND_EVEN_ODD = PathIterator.WIND_EVEN_ODD; /** * The winding rule constant for specifying a non-zero rule for determining the interior of a path. The non-zero * rule specifies that a point lies inside the path if a ray drawn in any direction from that point to infinity is * crossed by path segments a different number of times in the counter-clockwise direction than the clockwise * direction. */ int WIND_NON_ZERO = PathIterator.WIND_NON_ZERO; int currentSegment(); int currentSegment(double[] coords); int getWindingRule(); boolean isDone(); void next(); }plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/crossing/000077500000000000000000000000001312650303100250435ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/crossing/UGraphicCrossing.java000066400000000000000000000130571312650303100311260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Adrian Vogt * */ package net.sourceforge.plantuml.ugraphic.crossing; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cute.Balloon; import net.sourceforge.plantuml.cute.CrossingSegment; import net.sourceforge.plantuml.geom.LineSegmentDouble; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UTranslate; public class UGraphicCrossing implements UGraphic { private final UGraphic ug; private final List lines; private final UTranslate translate; static class Pending { final UGraphic ug; final LineSegmentDouble segment; final UTranslate translate; Pending(UGraphic ug, UTranslate translate, LineSegmentDouble segment) { this.ug = ug; this.segment = segment; this.translate = translate; } void drawNow(HtmlColor color) { if (color == null) { segment.draw(ug); } else { segment.draw(ug.apply(new UChangeColor(color))); } } List getCollisionsWith(List others) { final List result = new ArrayList(); for (Pending other : others) { if (isClose(segment.getP1(), other.segment.getP1()) || isClose(segment.getP1(), other.segment.getP2()) || isClose(segment.getP2(), other.segment.getP1()) || isClose(segment.getP2(), other.segment.getP2())) { continue; } final Point2D inter = segment.getSegIntersection(other.segment); if (inter != null) { result.add(inter); } } return result; } } public UGraphicCrossing(UGraphic ug) { this(ug, new UTranslate(), new ArrayList()); } private static boolean isClose(Point2D p1, Point2D p2) { return p1.distance(p2) < 0.1; } private UGraphicCrossing(UGraphic ug, UTranslate translate, List lines) { this.ug = ug; this.translate = translate; this.lines = lines; } public StringBounder getStringBounder() { return ug.getStringBounder(); } public UParam getParam() { return ug.getParam(); } public void draw(UShape shape) { if (shape instanceof DotPath) { drawDotPath((DotPath) shape); } else { ug.draw(shape); } } private void drawDotPath(DotPath dotPath) { if (dotPath.isLine()) { for (LineSegmentDouble seg : dotPath.getLineSegments()) { lines.add(new Pending(ug.apply(translate.reverse()), translate, seg.translate(translate))); } } else { ug.draw(dotPath); } } public UGraphic apply(UChange change) { if (change instanceof UTranslate) { return new UGraphicCrossing(ug.apply(change), translate.compose((UTranslate) change), lines); } else { return new UGraphicCrossing(ug.apply(change), translate, lines); } } public ColorMapper getColorMapper() { return ug.getColorMapper(); } public void startUrl(Url url) { ug.startUrl(url); } public void closeAction() { ug.closeAction(); } public void flushUg() { final List pendings = new ArrayList(); final List balloons = new ArrayList(); for (Pending p : lines) { final List tmp = p.getCollisionsWith(lines); for (Point2D pt : tmp) { balloons.add(new Balloon(pt, 5)); } // if (tmp.size() == 0) { // p.drawNow(null); // } else { // pendings.add(p); // } } for (Balloon b : balloons) { b.drawU(ug.apply(new UChangeBackColor(HtmlColorUtils.GREEN)).apply(new UChangeColor(HtmlColorUtils.GREEN))); } for (Pending p : lines) { for (Balloon b : balloons) { List pts = new CrossingSegment(b, p.segment).intersection(); for (Point2D pt : pts) { final Balloon s2 = new Balloon(pt, 2); s2.drawU(ug.apply(new UChangeBackColor(HtmlColorUtils.BLUE)).apply(new UChangeColor(HtmlColorUtils.BLUE))); } } } ug.flushUg(); } public boolean matchesProperty(String propertyName) { return ug.matchesProperty(propertyName); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/eps/000077500000000000000000000000001312650303100240035ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/eps/DriverCenteredCharacterEps.java000066400000000000000000000050301312650303100320360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.eps; import java.awt.font.TextLayout; import net.sourceforge.plantuml.eps.EpsGraphics; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.UnusedSpace; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverCenteredCharacterEps implements UDriver { public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, EpsGraphics eps) { final UCenteredCharacter centeredCharacter = (UCenteredCharacter) ushape; final char c = centeredCharacter.getChar(); final UFont font = centeredCharacter.getFont(); final UnusedSpace unusedSpace = UnusedSpace.getUnusedSpace(font, c); final double xpos = x - unusedSpace.getCenterX() - 0.5; final double ypos = y - unusedSpace.getCenterY() - 0.5; final TextLayout t = new TextLayout("" + c, font.getFont(), TextBlockUtils.getFontRenderContext()); eps.setStrokeColor(mapper.getMappedColor(param.getColor())); DriverTextEps.drawPathIterator(eps, xpos, ypos, t.getOutline(null)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/eps/DriverDotPathEps.java000066400000000000000000000041201312650303100300320ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.eps; import net.sourceforge.plantuml.eps.EpsGraphics; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverDotPathEps implements UDriver { public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, EpsGraphics eps) { final DotPath shape = (DotPath) ushape; //DriverLineG2d.manageStroke(param, g2d); if (param.getColor() != null) { eps.setStrokeColor(mapper.getMappedColor(param.getColor())); eps.setStrokeWidth("" + param.getStroke().getThickness(), param.getStroke().getDashVisible(), param.getStroke() .getDashSpace()); shape.draw(eps, x, y); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/eps/DriverEllipseEps.java000066400000000000000000000057261312650303100301010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.eps; import net.sourceforge.plantuml.eps.EpsGraphics; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverEllipseEps implements UDriver { private final ClipContainer clipContainer; public DriverEllipseEps(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, EpsGraphics eps) { final UEllipse shape = (UEllipse) ushape; final double width = shape.getWidth(); final double height = shape.getHeight(); final UClip clip = clipContainer.getClip(); if (clip != null) { if (clip.isInside(x, y) == false) { return; } if (clip.isInside(x + width, y + height) == false) { return; } } // Shadow if (shape.getDeltaShadow() != 0) { eps.epsEllipseShadow(x + width / 2, y + height / 2, width / 2, height / 2, shape.getDeltaShadow()); } eps.setFillColor(mapper.getMappedColor(param.getBackcolor())); eps.setStrokeColor(mapper.getMappedColor(param.getColor())); eps.setStrokeWidth("" + param.getStroke().getThickness(), param.getStroke().getDashVisible(), param.getStroke() .getDashSpace()); if (shape.getStart() == 0 && shape.getExtend() == 0) { eps.epsEllipse(x + width / 2, y + height / 2, width / 2, height / 2); } else { eps.epsEllipse(x + width / 2, y + height / 2, width / 2, height / 2, shape.getStart(), shape.getExtend()); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/eps/DriverImageEps.java000066400000000000000000000044231312650303100275170ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.eps; import net.sourceforge.plantuml.eps.EpsGraphics; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverImageEps implements UDriver { private final ClipContainer clipContainer; public DriverImageEps(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, EpsGraphics eps) { final UImage shape = (UImage) ushape; final UClip clip = clipContainer.getClip(); if (clip != null) { if (clip.isInside(x, y) == false) { return; } if (clip.isInside(x + shape.getWidth(), y + shape.getHeight()) == false) { return; } } eps.drawImage(shape.getImage(), x, y); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/eps/DriverLineEps.java000066400000000000000000000051171312650303100273650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.eps; import java.awt.geom.Line2D; import net.sourceforge.plantuml.eps.EpsGraphics; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverLineEps implements UDriver { private final ClipContainer clipContainer; public DriverLineEps(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, EpsGraphics eps) { final ULine shape = (ULine) ushape; double x2 = x + shape.getDX(); double y2 = y + shape.getDY(); final UClip clip = clipContainer.getClip(); if (clip != null) { final Line2D.Double line = clip.getClippedLine(new Line2D.Double(x, y, x2, y2)); if (line == null) { return; } x = line.x1; y = line.y1; x2 = line.x2; y2 = line.y2; } eps.setStrokeColor(mapper.getMappedColor(param.getColor())); eps.setStrokeWidth("" + param.getStroke().getThickness(), param.getStroke().getDashVisible(), param.getStroke() .getDashSpace()); eps.epsLine(x, y, x2, y2); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/eps/DriverPathEps.java000066400000000000000000000040651312650303100273730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.eps; import net.sourceforge.plantuml.eps.EpsGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverPathEps implements UDriver { public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, EpsGraphics eps) { final UPath shape = (UPath) ushape; eps.setStrokeColor(mapper.getMappedColor(param.getColor())); eps.setFillColor(mapper.getMappedColor(param.getBackcolor())); eps.setStrokeWidth("" + param.getStroke().getThickness(), param.getStroke().getDashVisible(), param .getStroke().getDashSpace()); eps.epsPath(x, y, shape); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/eps/DriverPolygonEps.java000066400000000000000000000060031312650303100301200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.eps; import java.awt.geom.Point2D; import net.sourceforge.plantuml.eps.EpsGraphics; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverPolygonEps implements UDriver { private final ClipContainer clipContainer; public DriverPolygonEps(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, EpsGraphics eps) { final UPolygon shape = (UPolygon) ushape; final double points[] = new double[shape.getPoints().size() * 2]; int i = 0; for (Point2D pt : shape.getPoints()) { points[i++] = pt.getX() + x; points[i++] = pt.getY() + y; } final UClip clip = clipContainer.getClip(); if (clip != null) { for (int j = 0; j < points.length; j += 2) { if (clip.isInside(points[j], points[j + 1]) == false) { return; } } } if (shape.getDeltaShadow() != 0) { eps.epsPolygonShadow(shape.getDeltaShadow(), points); } final HtmlColor back = param.getBackcolor(); if (back instanceof HtmlColorGradient) { eps.setStrokeColor(mapper.getMappedColor(param.getColor())); eps.epsPolygon((HtmlColorGradient) back, mapper, points); } else { eps.setFillColor(mapper.getMappedColor(back)); eps.setStrokeColor(mapper.getMappedColor(param.getColor())); eps.epsPolygon(points); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/eps/DriverRectangleEps.java000066400000000000000000000065231312650303100304040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.eps; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.eps.EpsGraphics; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverRectangleEps implements UDriver { private final ClipContainer clipContainer; public DriverRectangleEps(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, EpsGraphics eps) { final URectangle rect = (URectangle) ushape; double width = rect.getWidth(); double height = rect.getHeight(); final UClip clip = clipContainer.getClip(); if (clip != null) { final Rectangle2D.Double orig = new Rectangle2D.Double(x, y, width, height); final Rectangle2D.Double r = clip.getClippedRectangle(orig); if (r.height < 0) { return; } x = r.x; y = r.y; width = r.width; height = r.height; } final double rx = rect.getRx(); final double ry = rect.getRy(); // Shadow if (rect.getDeltaShadow() != 0) { eps.epsRectangleShadow(x, y, width, height, rx / 2, ry / 2, rect.getDeltaShadow()); } final HtmlColor back = param.getBackcolor(); if (back instanceof HtmlColorGradient) { eps.setStrokeColor(mapper.getMappedColor(param.getColor())); eps.epsRectangle(x, y, width, height, rx / 2, ry / 2, (HtmlColorGradient) back, mapper); } else { eps.setStrokeColor(mapper.getMappedColor(param.getColor())); eps.setFillColor(mapper.getMappedColor(param.getBackcolor())); eps.setStrokeWidth("" + param.getStroke().getThickness(), param.getStroke().getDashVisible(), param .getStroke().getDashSpace()); eps.epsRectangle(x, y, width, height, rx / 2, ry / 2); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/eps/DriverTextEps.java000066400000000000000000000237071312650303100274270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.eps; import java.awt.Color; import java.awt.Shape; import java.awt.font.FontRenderContext; import java.awt.font.TextLayout; import java.awt.geom.PathIterator; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.eps.EpsGraphics; import net.sourceforge.plantuml.eps.EpsGraphicsMacroAndText; import net.sourceforge.plantuml.eps.EpsStrategy; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontStyle; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UText; public class DriverTextEps implements UDriver { private final StringBounder stringBounder; private final ClipContainer clipContainer; private final FontRenderContext fontRenderContext; private final EpsStrategy strategy; public DriverTextEps(ClipContainer clipContainer, EpsStrategy strategy) { this.stringBounder = FileFormat.PNG.getDefaultStringBounder(); this.clipContainer = clipContainer; this.fontRenderContext = TextBlockUtils.getFontRenderContext(); this.strategy = strategy; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, EpsGraphics eps) { final UClip clip = clipContainer.getClip(); if (clip != null && clip.isInside(x, y) == false) { return; } final UText shape = (UText) ushape; if (strategy == EpsStrategy.WITH_MACRO_AND_TEXT) { drawAsText(shape, x, y, param, eps, mapper); return; } final FontConfiguration fontConfiguration = shape.getFontConfiguration(); final UFont font = fontConfiguration.getFont(); final TextLayout textLayout = new TextLayout(shape.getText(), font.getFont(), fontRenderContext); // System.err.println("text=" + shape.getText()); MinMax dim = null; if (fontConfiguration.containsStyle(FontStyle.BACKCOLOR)) { final Color extended = mapper.getMappedColor(fontConfiguration.getExtendedColor()); if (extended != null) { eps.setStrokeColor(extended); eps.setFillColor(extended); eps.setStrokeWidth("1", 0, 0); if (dim == null) { dim = getMinMax(x, y, getOutline(textLayout).getPathIterator(null)); } eps.epsRectangle(dim.getMinX() - 1, dim.getMinY() - 1, dim.getWidth() + 2, dim.getHeight() + 2, 0, 0); } } eps.setStrokeColor(mapper.getMappedColor(fontConfiguration.getColor())); drawPathIterator(eps, x, y, getOutline(textLayout)); if (fontConfiguration.containsStyle(FontStyle.UNDERLINE)) { final HtmlColor extended = fontConfiguration.getExtendedColor(); if (extended != null) { eps.setStrokeColor(mapper.getMappedColor(extended)); } if (dim == null) { dim = getMinMax(x, y, getOutline(textLayout).getPathIterator(null)); } eps.setStrokeWidth("1.1", 0, 0); eps.epsLine(x, y + 1.5, x + dim.getWidth(), y + 1.5); eps.setStrokeWidth("1", 0, 0); } if (fontConfiguration.containsStyle(FontStyle.WAVE)) { if (dim == null) { dim = getMinMax(x, y, getOutline(textLayout).getPathIterator(null)); } final int ypos = (int) (y + 2.5) - 1; final HtmlColor extended = fontConfiguration.getExtendedColor(); if (extended != null) { eps.setStrokeColor(mapper.getMappedColor(extended)); } eps.setStrokeWidth("1.1", 0, 0); for (int i = (int) x; i < x + dim.getWidth() - 5; i += 6) { eps.epsLine(i, ypos - 0, i + 3, ypos + 1); eps.epsLine(i + 3, ypos + 1, i + 6, ypos - 0); } eps.setStrokeWidth("1", 0, 0); } if (fontConfiguration.containsStyle(FontStyle.STRIKE)) { final HtmlColor extended = fontConfiguration.getExtendedColor(); if (extended != null) { eps.setStrokeColor(mapper.getMappedColor(extended)); } if (dim == null) { dim = getMinMax(x, y, getOutline(textLayout).getPathIterator(null)); } // final FontMetrics fm = font.getFontMetrics(); final double ypos = (dim.getMinY() + dim.getMaxY() * 2) / 3; eps.setStrokeWidth("1.3", 0, 0); eps.epsLine(x, ypos, x + dim.getWidth(), ypos); eps.setStrokeWidth("1", 0, 0); } } private Shape getOutline(final TextLayout textLayout) { return textLayout.getOutline(null); } private void drawAsText(UText shape, double x, double y, UParam param, EpsGraphics eps, ColorMapper mapper) { final FontConfiguration fontConfiguration = shape.getFontConfiguration(); // final FontMetrics fm = g2dummy.getFontMetrics(fontConfiguration.getFont().getFont()); // final double ypos = y - fm.getDescent() + 0.5; final double ypos = y - 1; eps.setStrokeColor(mapper.getMappedColor(fontConfiguration.getColor())); ((EpsGraphicsMacroAndText) eps).drawText(shape.getText(), fontConfiguration, x, ypos); } static void drawPathIterator(EpsGraphics eps, double x, double y, Shape shape) { final List breaks = analyze(shape); if (breaks.size() == 0) { final PathIterator path = shape.getPathIterator(null); drawSingle(eps, x, y, path); return; } // System.err.println("breaks=" + breaks); final PathIterator path = new PathIteratorLimited(shape, 0, breaks.get(0)); drawSingle(eps, x, y, path); for (int i = 0; i < breaks.size() - 1; i++) { final PathIterator path2 = new PathIteratorLimited(shape, breaks.get(i) + 1, breaks.get(i + 1)); drawSingle(eps, x, y, path2); } final PathIterator path3 = new PathIteratorLimited(shape, breaks.get(breaks.size() - 1) + 1, Integer.MAX_VALUE); drawSingle(eps, x, y, path3); } private static void drawSingle(EpsGraphics eps, double x, double y, final PathIterator path) { eps.newpath(); final double coord[] = new double[6]; while (path.isDone() == false) { final int code = path.currentSegment(coord); if (code == PathIterator.SEG_MOVETO) { eps.moveto(coord[0] + x, coord[1] + y); } else if (code == PathIterator.SEG_LINETO) { eps.lineto(coord[0] + x, coord[1] + y); } else if (code == PathIterator.SEG_CLOSE) { eps.closepath(); } else if (code == PathIterator.SEG_CUBICTO) { eps.curveto(coord[0] + x, coord[1] + y, coord[2] + x, coord[3] + y, coord[4] + x, coord[5] + y); } else if (code == PathIterator.SEG_QUADTO) { eps.quadto(coord[0] + x, coord[1] + y, coord[2] + x, coord[3] + y); } else { throw new UnsupportedOperationException("code=" + code); } path.next(); } eps.fill(path.getWindingRule()); } private static List analyze(Shape shape) { int count = PathIteratorLimited.count(shape); final List closings = getClosings(shape.getPathIterator(null)); final List result = new ArrayList(); for (Integer cl : closings) { if (cl + 2 >= count) { break; } final PathIterator path1 = new PathIteratorLimited(shape, 0, cl); final PathIterator path2 = new PathIteratorLimited(shape, cl + 1, Integer.MAX_VALUE); final double max1 = getMinMax(0, 0, path1).getMaxX(); final double min2 = getMinMax(0, 0, path2).getMinX(); if (min2 > max1) { result.add(cl); } } return result; } private static List getClosings(PathIterator path) { final List result = new ArrayList(); int current = 0; final double coord[] = new double[6]; while (path.isDone() == false) { final int code = path.currentSegment(coord); if (code == PathIterator.SEG_CLOSE) { result.add(current); } current++; path.next(); } return result; } static private MinMax getMinMax(double x, double y, PathIterator path) { MinMax result = MinMax.getEmpty(false); final double coord[] = new double[6]; while (path.isDone() == false) { final int code = path.currentSegment(coord); if (code == PathIterator.SEG_MOVETO) { result = result.addPoint(coord[0] + x, coord[1] + y); } else if (code == PathIterator.SEG_LINETO) { result = result.addPoint(coord[0] + x, coord[1] + y); } else if (code == PathIterator.SEG_CLOSE) { } else if (code == PathIterator.SEG_CUBICTO) { result = result.addPoint(coord[0] + x, coord[1] + y); result = result.addPoint(coord[2] + x, coord[3] + y); result = result.addPoint(coord[4] + x, coord[5] + y); } else if (code == PathIterator.SEG_QUADTO) { result = result.addPoint(coord[0] + x, coord[1] + y); result = result.addPoint(coord[2] + x, coord[3] + y); } else { throw new UnsupportedOperationException("code=" + code); } path.next(); } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/eps/PathIteratorLimited.java000066400000000000000000000043621312650303100305710ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.eps; import java.awt.Shape; import java.awt.geom.PathIterator; public class PathIteratorLimited implements PathIterator { private final PathIterator path; private final int limit; private int current = 0; public static int count(Shape source) { int result = 0; final PathIterator path = source.getPathIterator(null); while (path.isDone() == false) { result++; path.next(); } return result; } public PathIteratorLimited(Shape source, int start, int limit) { this.path = source.getPathIterator(null); this.limit = limit; for (int i = 0; i < start; i++) { this.next(); } } public int currentSegment(float[] arg0) { return path.currentSegment(arg0); } public int currentSegment(double[] arg0) { return path.currentSegment(arg0); } public int getWindingRule() { return path.getWindingRule(); } public boolean isDone() { if (current >= limit) { return true; } return path.isDone(); } public void next() { path.next(); current++; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/eps/UGraphicEps.java000066400000000000000000000112541312650303100270230ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.eps; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.eps.EpsGraphics; import net.sourceforge.plantuml.eps.EpsStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.ugraphic.AbstractCommonUGraphic; import net.sourceforge.plantuml.ugraphic.AbstractUGraphic; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic2; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UText; public class UGraphicEps extends AbstractUGraphic implements ClipContainer, UGraphic2 { private final StringBounder stringBounder; private final EpsStrategy strategyTOBEREMOVED; @Override protected AbstractCommonUGraphic copyUGraphic() { return new UGraphicEps(this); } protected UGraphicEps(UGraphicEps other) { super(other); this.stringBounder = other.stringBounder; this.strategyTOBEREMOVED = other.strategyTOBEREMOVED; register(strategyTOBEREMOVED); } public UGraphicEps(ColorMapper colorMapper, EpsStrategy strategy) { this(colorMapper, strategy, strategy.creatEpsGraphics()); } private UGraphicEps(ColorMapper colorMapper, EpsStrategy strategy, EpsGraphics eps) { super(colorMapper, eps); this.strategyTOBEREMOVED = strategy; this.stringBounder = FileFormat.PNG.getDefaultStringBounder(); register(strategy); } private void register(EpsStrategy strategy) { registerDriver(URectangle.class, new DriverRectangleEps(this)); registerDriver(UText.class, new DriverTextEps(this, strategy)); registerDriver(ULine.class, new DriverLineEps(this)); registerDriver(UPolygon.class, new DriverPolygonEps(this)); registerDriver(UEllipse.class, new DriverEllipseEps(this)); registerDriver(UImage.class, new DriverImageEps(this)); registerDriver(UPath.class, new DriverPathEps()); registerDriver(DotPath.class, new DriverDotPathEps()); registerDriver(UCenteredCharacter.class, new DriverCenteredCharacterEps()); } public void close() { getEpsGraphics().close(); } public String getEPSCode() { return getEpsGraphics().getEPSCode(); } public EpsGraphics getEpsGraphics() { return this.getGraphicObject(); } public StringBounder getStringBounder() { return stringBounder; } public void drawEps(String eps, double x, double y) { this.getGraphicObject().drawEps(eps, x, y); } static public String getEpsString(ColorMapper colorMapper, EpsStrategy epsStrategy, UDrawable udrawable) throws IOException { final UGraphicEps ug = new UGraphicEps(colorMapper, epsStrategy); udrawable.drawU(ug); return ug.getEPSCode(); } public void startUrl(Url url) { getGraphicObject().openLink(url.getUrl()); } public void closeAction() { getGraphicObject().closeLink(); } public void writeImageTOBEMOVED(OutputStream os, String metadata, int dpi) throws IOException { os.write(getEPSCode().getBytes()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/000077500000000000000000000000001312650303100236705ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/DriverCenteredCharacterG2d.java000066400000000000000000000045041312650303100316150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.Graphics2D; import net.sourceforge.plantuml.graphic.UnusedSpace; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverCenteredCharacterG2d implements UDriver { public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, Graphics2D g2d) { final UCenteredCharacter characterCircled = (UCenteredCharacter) ushape; final char c = characterCircled.getChar(); final UFont font = characterCircled.getFont(); final UnusedSpace unusedSpace = UnusedSpace.getUnusedSpace(font, c); g2d.setColor(mapper.getMappedColor(param.getColor())); final double xpos = x - unusedSpace.getCenterX(); final double ypos = y - unusedSpace.getCenterY() - 0.5; g2d.setFont(font.getFont()); g2d.drawString("" + c, (float) xpos, (float) ypos); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/DriverDotPathG2d.java000066400000000000000000000041731312650303100276140ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.Graphics2D; import net.sourceforge.plantuml.EnsureVisible; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverDotPathG2d implements UDriver { private final EnsureVisible visible; public DriverDotPathG2d(EnsureVisible visible) { this.visible = visible; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, Graphics2D g2d) { final DotPath shape = (DotPath) ushape; DriverLineG2d.manageStroke(param, g2d); if (param.getColor() != null) { g2d.setColor(mapper.getMappedColor(param.getColor())); shape.draw(g2d, x, y); shape.manageEnsureVisible(x, y, visible); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/DriverEllipseG2d.java000066400000000000000000000122601312650303100276420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.BasicStroke; import java.awt.GradientPaint; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.Arc2D; import java.awt.geom.Ellipse2D; import net.sourceforge.plantuml.EnsureVisible; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverEllipseG2d extends DriverShadowedG2d implements UDriver { private final double dpiFactor; private final EnsureVisible visible; public DriverEllipseG2d(double dpiFactor, EnsureVisible visible) { this.dpiFactor = dpiFactor; this.visible = visible; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, Graphics2D g2d) { final UEllipse shape = (UEllipse) ushape; g2d.setStroke(new BasicStroke((float) param.getStroke().getThickness())); visible.ensureVisible(x, y); visible.ensureVisible(x + shape.getWidth(), y + shape.getHeight()); if (shape.getStart() == 0 && shape.getExtend() == 0) { final Shape ellipse = new Ellipse2D.Double(x, y, shape.getWidth(), shape.getHeight()); // Shadow if (shape.getDeltaShadow() != 0) { drawShadow(g2d, ellipse, shape.getDeltaShadow(), dpiFactor); } final HtmlColor back = param.getBackcolor(); if (back instanceof HtmlColorGradient) { final GradientPaint paint = getPaintGradient(x, y, mapper, shape, back); g2d.setPaint(paint); g2d.fill(ellipse); if (param.getColor() != null) { g2d.setColor(mapper.getMappedColor(param.getColor())); DriverLineG2d.manageStroke(param, g2d); g2d.draw(ellipse); } } else { if (back != null) { g2d.setColor(mapper.getMappedColor(param.getBackcolor())); DriverRectangleG2d.managePattern(param, g2d); g2d.fill(ellipse); } if (param.getColor() != null && param.getColor().equals(param.getBackcolor()) == false) { g2d.setColor(mapper.getMappedColor(param.getColor())); DriverLineG2d.manageStroke(param, g2d); g2d.draw(ellipse); } } } else { final Shape arc = new Arc2D.Double(x, y, shape.getWidth(), shape.getHeight(), round(shape.getStart()), round(shape.getExtend()), Arc2D.OPEN); if (param.getColor() != null) { g2d.setColor(mapper.getMappedColor(param.getColor())); g2d.draw(arc); } } } private GradientPaint getPaintGradient(double x, double y, ColorMapper mapper, final UEllipse shape, final HtmlColor back) { final HtmlColorGradient gr = (HtmlColorGradient) back; final char policy = gr.getPolicy(); final GradientPaint paint; if (policy == '|') { paint = new GradientPaint((float) x, (float) (y + shape.getHeight()) / 2, mapper.getMappedColor(gr .getColor1()), (float) (x + shape.getWidth()), (float) (y + shape.getHeight()) / 2, mapper.getMappedColor(gr.getColor2())); } else if (policy == '\\') { paint = new GradientPaint((float) x, (float) (y + shape.getHeight()), mapper.getMappedColor(gr .getColor1()), (float) (x + shape.getWidth()), (float) y, mapper.getMappedColor(gr.getColor2())); } else if (policy == '-') { paint = new GradientPaint((float) (x + shape.getWidth()) / 2, (float) y, mapper.getMappedColor(gr .getColor1()), (float) (x + shape.getWidth()) / 2, (float) (y + shape.getHeight()), mapper.getMappedColor(gr.getColor2())); } else { // for / paint = new GradientPaint((float) x, (float) y, mapper.getMappedColor(gr.getColor1()), (float) (x + shape.getWidth()), (float) (y + shape.getHeight()), mapper.getMappedColor(gr .getColor2())); } return paint; } private static final double ROU = 5.0; static double round(double value) { return value; // final int v = (int) Math.round(value / ROU); // return v * ROU; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/DriverImageG2d.java000066400000000000000000000042551312650303100272740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.Graphics2D; import net.sourceforge.plantuml.EnsureVisible; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UImageSvg; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverImageG2d implements UDriver { private final EnsureVisible visible; public DriverImageG2d(EnsureVisible visible) { this.visible = visible; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, Graphics2D g2d) { if (ushape instanceof UImageSvg) { return; } final UImage shape = (UImage) ushape; visible.ensureVisible(x, y); visible.ensureVisible(x + shape.getWidth(), y + shape.getHeight()); g2d.drawImage(shape.getImage(), (int) x, (int) y, null); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/DriverLineG2d.java000066400000000000000000000055261312650303100271430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.BasicStroke; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.Line2D; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UStroke; public class DriverLineG2d extends DriverShadowedG2d implements UDriver { private final double dpiFactor; public DriverLineG2d(double dpiFactor) { this.dpiFactor = dpiFactor; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, Graphics2D g2d) { final ULine shape = (ULine) ushape; final Shape line = new Line2D.Double(x, y, x + shape.getDX(), y + shape.getDY()); manageStroke(param, g2d); // Shadow if (shape.getDeltaShadow() != 0) { drawShadow(g2d, line, shape.getDeltaShadow(), dpiFactor); } g2d.setColor(mapper.getMappedColor(param.getColor())); g2d.draw(line); } static void manageStroke(UParam param, Graphics2D g2d) { final UStroke stroke = param.getStroke(); final float thickness = (float) (stroke.getThickness() * param.getScale()); if (stroke.getDashVisible() == 0) { g2d.setStroke(new BasicStroke(thickness)); } else { final float dash1 = (float) stroke.getDashVisible(); final float dash2 = (float) stroke.getDashSpace(); final float[] style = { dash1, dash2 }; g2d.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.0f, style, 0)); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/DriverPathG2d.java000066400000000000000000000132221312650303100271400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.GradientPaint; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.Line2D; import net.sourceforge.plantuml.golem.MinMaxDouble; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.USegment; import net.sourceforge.plantuml.ugraphic.USegmentType; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.arc.ExtendedGeneralPath; public class DriverPathG2d extends DriverShadowedG2d implements UDriver { private final double dpiFactor; public DriverPathG2d(double dpiFactor) { this.dpiFactor = dpiFactor; } public void draw(UShape ushape, final double x, final double y, ColorMapper mapper, UParam param, Graphics2D g2d) { final UPath shape = (UPath) ushape; DriverLineG2d.manageStroke(param, g2d); final ExtendedGeneralPath p = new ExtendedGeneralPath(); final MinMaxDouble minMax = new MinMaxDouble(); minMax.manage(x, y); boolean hasBezier = false; for (USegment seg : shape) { final USegmentType type = seg.getSegmentType(); final double coord[] = seg.getCoord(); if (type == USegmentType.SEG_MOVETO) { p.moveTo(x + coord[0], y + coord[1]); minMax.manage(x + coord[0], y + coord[1]); } else if (type == USegmentType.SEG_LINETO) { p.lineTo(x + coord[0], y + coord[1]); minMax.manage(x + coord[0], y + coord[1]); } else if (type == USegmentType.SEG_CUBICTO) { p.curveTo(x + coord[0], y + coord[1], x + coord[2], y + coord[3], x + coord[4], y + coord[5]); minMax.manage(x + coord[4], y + coord[5]); hasBezier = true; } else if (type == USegmentType.SEG_ARCTO) { p.arcTo(coord[0], coord[1], coord[2], coord[3] != 0, coord[4] != 0, x + coord[5], y + coord[6]); } else { throw new UnsupportedOperationException(); } } if (shape.isOpenIconic()) { p.closePath(); g2d.setColor(mapper.getMappedColor(param.getColor())); g2d.fill(p); return; } // Shadow if (shape.getDeltaShadow() != 0) { if (hasBezier) { drawShadow(g2d, p, shape.getDeltaShadow(), dpiFactor); } else { double lastX = 0; double lastY = 0; for (USegment seg : shape) { final USegmentType type = seg.getSegmentType(); final double coord[] = seg.getCoord(); // Cast float for Java 1.5 if (type == USegmentType.SEG_MOVETO) { lastX = x + coord[0]; lastY = y + coord[1]; } else if (type == USegmentType.SEG_LINETO) { final Shape line = new Line2D.Double(lastX, lastY, x + coord[0], y + coord[1]); drawShadow(g2d, line, shape.getDeltaShadow(), dpiFactor); lastX = x + coord[0]; lastY = y + coord[1]; } else { throw new UnsupportedOperationException(); } } } } final HtmlColor back = param.getBackcolor(); if (back instanceof HtmlColorGradient) { final HtmlColorGradient gr = (HtmlColorGradient) back; final char policy = gr.getPolicy(); final GradientPaint paint; if (policy == '|') { paint = new GradientPaint((float) minMax.getMinX(), (float) minMax.getMaxY() / 2, mapper.getMappedColor(gr.getColor1()), (float) minMax.getMaxX(), (float) minMax.getMaxY() / 2, mapper.getMappedColor(gr.getColor2())); } else if (policy == '\\') { paint = new GradientPaint((float) minMax.getMinX(), (float) minMax.getMaxY(), mapper.getMappedColor(gr .getColor1()), (float) minMax.getMaxX(), (float) minMax.getMinY(), mapper.getMappedColor(gr .getColor2())); } else if (policy == '-') { paint = new GradientPaint((float) minMax.getMaxX() / 2, (float) minMax.getMinY(), mapper.getMappedColor(gr.getColor1()), (float) minMax.getMaxX() / 2, (float) minMax.getMaxY(), mapper.getMappedColor(gr.getColor2())); } else { // for / paint = new GradientPaint((float) x, (float) y, mapper.getMappedColor(gr.getColor1()), (float) minMax.getMaxX(), (float) minMax.getMaxY(), mapper.getMappedColor(gr.getColor2())); } g2d.setPaint(paint); g2d.fill(p); } else if (back != null) { g2d.setColor(mapper.getMappedColor(back)); g2d.fill(p); } if (param.getColor() != null) { g2d.setColor(mapper.getMappedColor(param.getColor())); g2d.draw(p); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/DriverPathG2dLegacy.java000066400000000000000000000127301312650303100302700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.GradientPaint; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.Line2D; import java.awt.geom.Path2D; import net.sourceforge.plantuml.golem.MinMaxDouble; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.USegment; import net.sourceforge.plantuml.ugraphic.USegmentType; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverPathG2dLegacy extends DriverShadowedG2d implements UDriver { private final double dpiFactor; public DriverPathG2dLegacy(double dpiFactor) { this.dpiFactor = dpiFactor; } public void draw(UShape ushape, final double x, final double y, ColorMapper mapper, UParam param, Graphics2D g2d) { final UPath shape = (UPath) ushape; DriverLineG2d.manageStroke(param, g2d); final Path2D.Double p = new Path2D.Double(); boolean hasBezier = false; final MinMaxDouble minMax = new MinMaxDouble(); minMax.manage(x, y); for (USegment seg : shape) { final USegmentType type = seg.getSegmentType(); final double coord[] = seg.getCoord(); if (type == USegmentType.SEG_MOVETO) { p.moveTo(x + coord[0], y + coord[1]); minMax.manage(x + coord[0], y + coord[1]); } else if (type == USegmentType.SEG_LINETO) { p.lineTo(x + coord[0], y + coord[1]); minMax.manage(x + coord[0], y + coord[1]); } else if (type == USegmentType.SEG_CUBICTO) { p.curveTo(x + coord[0], y + coord[1], x + coord[2], y + coord[3], x + coord[4], y + coord[5]); minMax.manage(x + coord[4], y + coord[5]); hasBezier = true; } else { throw new UnsupportedOperationException(); } } if (shape.isOpenIconic()) { p.closePath(); g2d.setColor(mapper.getMappedColor(param.getColor())); g2d.fill(p); return; } // Shadow if (shape.getDeltaShadow() != 0) { if (hasBezier) { drawShadow(g2d, p, shape.getDeltaShadow(), dpiFactor); } else { double lastX = 0; double lastY = 0; for (USegment seg : shape) { final USegmentType type = seg.getSegmentType(); final double coord[] = seg.getCoord(); // Cast float for Java 1.5 if (type == USegmentType.SEG_MOVETO) { lastX = x + coord[0]; lastY = y + coord[1]; } else if (type == USegmentType.SEG_LINETO) { final Shape line = new Line2D.Double(lastX, lastY, x + coord[0], y + coord[1]); drawShadow(g2d, line, shape.getDeltaShadow(), dpiFactor); lastX = x + coord[0]; lastY = y + coord[1]; } else { throw new UnsupportedOperationException(); } } } } final HtmlColor back = param.getBackcolor(); if (back instanceof HtmlColorGradient) { final HtmlColorGradient gr = (HtmlColorGradient) back; final char policy = gr.getPolicy(); final GradientPaint paint; if (policy == '|') { paint = new GradientPaint((float) minMax.getMinX(), (float) minMax.getMaxY() / 2, mapper.getMappedColor(gr.getColor1()), (float) minMax.getMaxX(), (float) minMax.getMaxY() / 2, mapper.getMappedColor(gr.getColor2())); } else if (policy == '\\') { paint = new GradientPaint((float) minMax.getMinX(), (float) minMax.getMaxY(), mapper.getMappedColor(gr .getColor1()), (float) minMax.getMaxX(), (float) minMax.getMinY(), mapper.getMappedColor(gr .getColor2())); } else if (policy == '-') { paint = new GradientPaint((float) minMax.getMaxX() / 2, (float) minMax.getMinY(), mapper.getMappedColor(gr.getColor1()), (float) minMax.getMaxX() / 2, (float) minMax.getMaxY(), mapper.getMappedColor(gr.getColor2())); } else { // for / paint = new GradientPaint((float) x, (float) y, mapper.getMappedColor(gr.getColor1()), (float) minMax.getMaxX(), (float) minMax.getMaxY(), mapper.getMappedColor(gr.getColor2())); } g2d.setPaint(paint); g2d.fill(p); } else if (back != null) { g2d.setColor(mapper.getMappedColor(back)); g2d.fill(p); } if (param.getColor() != null) { g2d.setColor(mapper.getMappedColor(param.getColor())); g2d.draw(p); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/DriverPathOldG2d.java000066400000000000000000000132411312650303100276000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.GradientPaint; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.GeneralPath; import java.awt.geom.Line2D; import net.sourceforge.plantuml.golem.MinMaxDouble; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.USegment; import net.sourceforge.plantuml.ugraphic.USegmentType; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverPathOldG2d extends DriverShadowedG2d implements UDriver { private final double dpiFactor; public DriverPathOldG2d(double dpiFactor) { this.dpiFactor = dpiFactor; } public void draw(UShape ushape, final double x, final double y, ColorMapper mapper, UParam param, Graphics2D g2d) { final UPath shape = (UPath) ushape; DriverLineG2d.manageStroke(param, g2d); final GeneralPath p = new GeneralPath(); boolean hasBezier = false; final MinMaxDouble minMax = new MinMaxDouble(); minMax.manage(x, y); for (USegment seg : shape) { final USegmentType type = seg.getSegmentType(); final double coord[] = seg.getCoord(); // Cast float for Java 1.5 if (type == USegmentType.SEG_MOVETO) { p.moveTo((float) (x + coord[0]), (float) (y + coord[1])); minMax.manage(x + coord[0], y + coord[1]); } else if (type == USegmentType.SEG_LINETO) { p.lineTo((float) (x + coord[0]), (float) (y + coord[1])); minMax.manage(x + coord[0], y + coord[1]); } else if (type == USegmentType.SEG_CUBICTO) { p.curveTo((float) (x + coord[0]), (float) (y + coord[1]), (float) (x + coord[2]), (float) (y + coord[3]), (float) (x + coord[4]), (float) (y + coord[5])); minMax.manage(x + coord[4], y + coord[5]); hasBezier = true; } else { throw new UnsupportedOperationException(); } // bez = new CubicCurve2D.Double(x + bez.x1, y + bez.y1, x + // bez.ctrlx1, y + bez.ctrly1, x + bez.ctrlx2, y // + bez.ctrly2, x + bez.x2, y + bez.y2); // p.append(bez, true); } // p.closePath(); // Shadow if (shape.getDeltaShadow() != 0) { if (hasBezier) { drawShadow(g2d, p, shape.getDeltaShadow(), dpiFactor); } else { double lastX = 0; double lastY = 0; for (USegment seg : shape) { final USegmentType type = seg.getSegmentType(); final double coord[] = seg.getCoord(); // Cast float for Java 1.5 if (type == USegmentType.SEG_MOVETO) { lastX = x + coord[0]; lastY = y + coord[1]; } else if (type == USegmentType.SEG_LINETO) { final Shape line = new Line2D.Double(lastX, lastY, x + coord[0], y + coord[1]); drawShadow(g2d, line, shape.getDeltaShadow(), dpiFactor); lastX = x + coord[0]; lastY = y + coord[1]; } else { throw new UnsupportedOperationException(); } } } } final HtmlColor back = param.getBackcolor(); if (back instanceof HtmlColorGradient) { final HtmlColorGradient gr = (HtmlColorGradient) back; final char policy = gr.getPolicy(); final GradientPaint paint; if (policy == '|') { paint = new GradientPaint((float) minMax.getMinX(), (float) minMax.getMaxY() / 2, mapper.getMappedColor(gr.getColor1()), (float) minMax.getMaxX(), (float) minMax.getMaxY() / 2, mapper.getMappedColor(gr.getColor2())); } else if (policy == '\\') { paint = new GradientPaint((float) minMax.getMinX(), (float) minMax.getMaxY(), mapper.getMappedColor(gr .getColor1()), (float) minMax.getMaxX(), (float) minMax.getMinY(), mapper.getMappedColor(gr .getColor2())); } else if (policy == '-') { paint = new GradientPaint((float) minMax.getMaxX() / 2, (float) minMax.getMinY(), mapper.getMappedColor(gr.getColor1()), (float) minMax.getMaxX() / 2, (float) minMax.getMaxY(), mapper.getMappedColor(gr.getColor2())); } else { // for / paint = new GradientPaint((float) x, (float) y, mapper.getMappedColor(gr.getColor1()), (float) minMax.getMaxX(), (float) minMax.getMaxY(), mapper.getMappedColor(gr.getColor2())); } g2d.setPaint(paint); g2d.fill(p); } else if (back != null) { g2d.setColor(mapper.getMappedColor(back)); g2d.fill(p); } if (param.getColor() != null) { g2d.setColor(mapper.getMappedColor(param.getColor())); g2d.draw(p); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/DriverPixelG2d.java000066400000000000000000000034111312650303100273240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.Graphics2D; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverPixelG2d implements UDriver { public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, Graphics2D g2d) { g2d.setColor(mapper.getMappedColor(param.getColor())); g2d.fillRect((int) x, (int) y, 1, 1); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/DriverPolygonG2d.java000066400000000000000000000106431312650303100276770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.BasicStroke; import java.awt.GradientPaint; import java.awt.Graphics2D; import java.awt.geom.GeneralPath; import java.awt.geom.Point2D; import net.sourceforge.plantuml.EnsureVisible; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverPolygonG2d extends DriverShadowedG2d implements UDriver { private final double dpiFactor; private final EnsureVisible visible; public DriverPolygonG2d(double dpiFactor, EnsureVisible visible) { this.dpiFactor = dpiFactor; this.visible = visible; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, Graphics2D g2d) { final UPolygon shape = (UPolygon) ushape; g2d.setStroke(new BasicStroke((float) param.getStroke().getThickness())); final GeneralPath path = new GeneralPath(); boolean first = true; for (Point2D pt : shape.getPoints()) { final double xp = pt.getX() + x; final double yp = pt.getY() + y; visible.ensureVisible(xp, yp); if (first) { path.moveTo((float) xp, (float) yp); } else { path.lineTo((float) xp, (float) yp); } first = false; } if (first == false) { path.closePath(); } if (shape.getDeltaShadow() != 0) { drawShadow(g2d, path, shape.getDeltaShadow(), dpiFactor); } final HtmlColor back = param.getBackcolor(); if (back instanceof HtmlColorGradient) { final HtmlColorGradient gr = (HtmlColorGradient) back; final char policy = gr.getPolicy(); final GradientPaint paint; // final Rectangle2D bound = path.getBounds(); if (policy == '|') { paint = new GradientPaint((float) x, (float) (y + shape.getHeight()) / 2, mapper.getMappedColor(gr .getColor1()), (float) (x + shape.getWidth()), (float) (y + shape.getHeight()) / 2, mapper.getMappedColor(gr.getColor2())); } else if (policy == '\\') { paint = new GradientPaint((float) x, (float) (y + shape.getHeight()), mapper.getMappedColor(gr .getColor1()), (float) (x + shape.getWidth()), (float) y, mapper.getMappedColor(gr.getColor2())); } else if (policy == '-') { paint = new GradientPaint((float) (x + shape.getWidth()) / 2, (float) y, mapper.getMappedColor(gr .getColor1()), (float) (x + shape.getWidth()) / 2, (float) (y + shape.getHeight()), mapper.getMappedColor(gr.getColor2())); } else { // for / paint = new GradientPaint((float) x, (float) y, mapper.getMappedColor(gr.getColor1()), (float) (x + shape.getWidth()), (float) (y + shape.getHeight()), mapper.getMappedColor(gr .getColor2())); } g2d.setPaint(paint); g2d.fill(path); } else if (back!=null) { g2d.setColor(mapper.getMappedColor(back)); DriverRectangleG2d.managePattern(param, g2d); g2d.fill(path); } if (param.getColor() != null) { g2d.setColor(mapper.getMappedColor(param.getColor())); DriverLineG2d.manageStroke(param, g2d); g2d.draw(path); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/DriverRectangleG2d.java000066400000000000000000000153601312650303100301550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.BasicStroke; import java.awt.GradientPaint; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.Shape; import java.awt.TexturePaint; import java.awt.geom.Rectangle2D; import java.awt.geom.RoundRectangle2D; import java.awt.image.BufferedImage; import net.sourceforge.plantuml.EnsureVisible; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.graphic.HtmlColorSimple; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPattern; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverRectangleG2d extends DriverShadowedG2d implements UDriver { private final double dpiFactor; private final EnsureVisible visible; public DriverRectangleG2d(double dpiFactor, EnsureVisible visible) { this.dpiFactor = dpiFactor; this.visible = visible; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, Graphics2D g2d) { g2d.setStroke(new BasicStroke((float) param.getStroke().getThickness())); final URectangle shape = (URectangle) ushape; final double rx = shape.getRx(); final double ry = shape.getRy(); final Shape rect; if (rx == 0 && ry == 0) { rect = new Rectangle2D.Double(x, y, shape.getWidth(), shape.getHeight()); } else { rect = new RoundRectangle2D.Double(x, y, shape.getWidth(), shape.getHeight(), rx, ry); } visible.ensureVisible(x, y); visible.ensureVisible(x + shape.getWidth(), y + shape.getHeight()); // Shadow if (shape.getDeltaShadow() != 0) { drawShadow(g2d, rect, shape.getDeltaShadow(), dpiFactor); } final HtmlColor back = param.getBackcolor(); if (back instanceof HtmlColorGradient) { final GradientPaint paint = getPaintGradient(x, y, mapper, shape, back); g2d.setPaint(paint); g2d.fill(rect); if (param.getColor() != null && param.getColor() instanceof HtmlColorGradient == false) { g2d.setColor(mapper.getMappedColor(param.getColor())); DriverLineG2d.manageStroke(param, g2d); g2d.draw(rect); } } else { if (param.getBackcolor() != null) { g2d.setColor(mapper.getMappedColor(param.getBackcolor())); DriverLineG2d.manageStroke(param, g2d); managePattern(param, g2d); g2d.fill(rect); } if (param.getColor() != null && param.getColor().equals(param.getBackcolor()) == false) { g2d.setColor(mapper.getMappedColor(param.getColor())); DriverLineG2d.manageStroke(param, g2d); g2d.draw(rect); } } } private GradientPaint getPaintGradient(double x, double y, ColorMapper mapper, final URectangle shape, final HtmlColor back) { final double width = shape.getWidth(); final double height = shape.getHeight(); return getPaintGradient(x, y, mapper, width, height, back); } public static GradientPaint getPaintGradient(double x, double y, ColorMapper mapper, double width, double height, final HtmlColor back) { final HtmlColorGradient gr = (HtmlColorGradient) back; final char policy = gr.getPolicy(); final GradientPaint paint; if (policy == '|') { paint = new GradientPaint((float) x, (float) (y + height) / 2, mapper.getMappedColor(gr.getColor1()), (float) (x + width), (float) (y + height) / 2, mapper.getMappedColor(gr.getColor2())); } else if (policy == '\\') { paint = new GradientPaint((float) x, (float) (y + height), mapper.getMappedColor(gr.getColor1()), (float) (x + width), (float) y, mapper.getMappedColor(gr.getColor2())); } else if (policy == '-') { paint = new GradientPaint((float) (x + width) / 2, (float) y, mapper.getMappedColor(gr.getColor1()), (float) (x + width) / 2, (float) (y + height), mapper.getMappedColor(gr.getColor2())); } else { // for / paint = new GradientPaint((float) x, (float) y, mapper.getMappedColor(gr.getColor1()), (float) (x + width), (float) (y + height), mapper.getMappedColor(gr.getColor2())); } return paint; } public static void managePattern(UParam param, Graphics2D g2d) { final UPattern pattern = param.getPattern(); if (pattern == UPattern.VERTICAL_STRIPE) { final BufferedImage bi = new BufferedImage(4, 4, BufferedImage.TYPE_INT_ARGB); final Rectangle r = new Rectangle(0, 0, 4, 4); final int rgb = ((HtmlColorSimple) param.getBackcolor()).getColor999().getRGB(); for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (i == 0 || i == 1) { bi.setRGB(i, j, rgb); } } } g2d.setPaint(new TexturePaint(bi, r)); } else if (pattern == UPattern.HORIZONTAL_STRIPE) { final BufferedImage bi = new BufferedImage(4, 4, BufferedImage.TYPE_INT_ARGB); final Rectangle r = new Rectangle(0, 0, 4, 4); final int rgb = ((HtmlColorSimple) param.getBackcolor()).getColor999().getRGB(); for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (j == 0 || j == 1) { bi.setRGB(i, j, rgb); } } } g2d.setPaint(new TexturePaint(bi, r)); } else if (pattern == UPattern.SMALL_CIRCLE) { final BufferedImage bi = new BufferedImage(4, 4, BufferedImage.TYPE_INT_ARGB); final Rectangle r = new Rectangle(0, 0, 4, 4); final int rgb = ((HtmlColorSimple) param.getBackcolor()).getColor999().getRGB(); bi.setRGB(0, 1, rgb); bi.setRGB(1, 0, rgb); bi.setRGB(1, 1, rgb); bi.setRGB(1, 2, rgb); bi.setRGB(2, 1, rgb); g2d.setPaint(new TexturePaint(bi, r)); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/DriverShadowedG2d.java000066400000000000000000000076061312650303100300130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.Line2D; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.awt.image.ConvolveOp; import java.awt.image.Kernel; import net.sourceforge.plantuml.Log; public class DriverShadowedG2d { private ConvolveOp getConvolveOp(int blurRadius, double dpiFactor) { blurRadius = (int) (blurRadius * dpiFactor); final int blurRadius2 = blurRadius * blurRadius; final float blurRadius2F = blurRadius2; // final float weight = (float) (1.0 / blurRadius2F / dpiFactor); final float weight = (float) (1.0 / blurRadius2F); final float[] elements = new float[blurRadius2]; for (int k = 0; k < blurRadius2; k++) { elements[k] = weight; } final Kernel myKernel = new Kernel(blurRadius, blurRadius, elements); // if EDGE_NO_OP is not selected, EDGE_ZERO_FILL is the default which // creates a black border return new ConvolveOp(myKernel, ConvolveOp.EDGE_NO_OP, null); } private final Color color = new Color(170, 170, 170); private final Color colorLine = new Color(30, 30, 30); protected void drawShadow(Graphics2D g2d, Shape shape, double deltaShadow, double dpiFactor) { if (dpiFactor < 1) { dpiFactor = 1; } // dpiFactor = 1; // Shadow final Rectangle2D bounds = shape.getBounds2D(); final double ww = bounds.getMaxX() - bounds.getMinX(); final double hh = bounds.getMaxY() - bounds.getMinY(); final double w = (ww + deltaShadow * 2 + 6) * dpiFactor; final double h = (hh + deltaShadow * 2 + 6) * dpiFactor; BufferedImage destination = null; try { destination = new BufferedImage((int) w, (int) h, BufferedImage.TYPE_INT_ARGB); final Graphics2D gg = destination.createGraphics(); gg.scale(dpiFactor, dpiFactor); gg.translate(deltaShadow - bounds.getMinX(), deltaShadow - bounds.getMinY()); final boolean isLine = shape instanceof Line2D.Double; if (isLine) { gg.setColor(colorLine); gg.draw(shape); } else { gg.setColor(color); gg.fill(shape); } gg.dispose(); final ConvolveOp simpleBlur = getConvolveOp(6, dpiFactor); destination = simpleBlur.filter(destination, null); } catch (OutOfMemoryError error) { Log.info("Warning: Cannot draw shadow, image too big."); } catch (Exception e) { Log.info("Warning: Cannot draw shadow: " + e); } if (destination != null) { final AffineTransform at = g2d.getTransform(); g2d.scale(1 / dpiFactor, 1 / dpiFactor); g2d.drawImage(destination, (int) (bounds.getMinX() * dpiFactor), (int) (bounds.getMinY() * dpiFactor), null); g2d.setTransform(at); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/DriverTextAsPathG2d.java000066400000000000000000000136011312650303100302720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.BasicStroke; import java.awt.Color; import java.awt.FontMetrics; import java.awt.Graphics2D; import java.awt.GraphicsEnvironment; import java.awt.font.FontRenderContext; import java.awt.font.TextLayout; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.EnsureVisible; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontStyle; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UText; public class DriverTextAsPathG2d implements UDriver { private final EnsureVisible visible; private final FontRenderContext fontRenderContext; public DriverTextAsPathG2d(EnsureVisible visible, FontRenderContext fontRenderContext) { this.visible = visible; this.fontRenderContext = fontRenderContext; } private static void printFont() { final GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); final String fontNames[] = ge.getAvailableFontFamilyNames(); final int j = fontNames.length; for (int i = 0; i < j; i++) { Log.info("Available fonts: " + fontNames[i]); } } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, Graphics2D g2d) { final UText shape = (UText) ushape; final FontConfiguration fontConfiguration = shape.getFontConfiguration(); final UFont font = fontConfiguration.getFont().scaled(param.getScale()); final Dimension2D dimBack = calculateDimension(FileFormat.PNG.getDefaultStringBounder(), font, shape.getText()); if (fontConfiguration.containsStyle(FontStyle.BACKCOLOR)) { final Color extended = mapper.getMappedColor(fontConfiguration.getExtendedColor()); if (extended != null) { g2d.setColor(extended); g2d.setBackground(extended); g2d.fill(new Rectangle2D.Double(x, y - dimBack.getHeight() + 1.5, dimBack.getWidth(), dimBack .getHeight())); } } visible.ensureVisible(x, y - dimBack.getHeight() + 1.5); visible.ensureVisible(x + dimBack.getWidth(), y + 1.5); g2d.setFont(font.getFont()); g2d.setColor(mapper.getMappedColor(fontConfiguration.getColor())); final TextLayout t = new TextLayout(shape.getText(), font.getFont(), fontRenderContext); g2d.translate(x, y); g2d.fill(t.getOutline(null)); g2d.translate(-x, -y); if (fontConfiguration.containsStyle(FontStyle.UNDERLINE)) { final HtmlColor extended = fontConfiguration.getExtendedColor(); if (extended != null) { g2d.setColor(mapper.getMappedColor(extended)); } final Dimension2D dim = calculateDimension(FileFormat.PNG.getDefaultStringBounder(), font, shape.getText()); final int ypos = (int) (y + 2.5); g2d.setStroke(new BasicStroke((float) 1)); g2d.drawLine((int) x, ypos, (int) (x + dim.getWidth()), ypos); g2d.setStroke(new BasicStroke()); } if (fontConfiguration.containsStyle(FontStyle.WAVE)) { final Dimension2D dim = calculateDimension(FileFormat.PNG.getDefaultStringBounder(), font, shape.getText()); final int ypos = (int) (y + 2.5) - 1; final HtmlColor extended = fontConfiguration.getExtendedColor(); if (extended != null) { g2d.setColor(mapper.getMappedColor(extended)); } for (int i = (int) x; i < x + dim.getWidth() - 5; i += 6) { g2d.drawLine(i, ypos - 0, i + 3, ypos + 1); g2d.drawLine(i + 3, ypos + 1, i + 6, ypos - 0); } } if (fontConfiguration.containsStyle(FontStyle.STRIKE)) { final Dimension2D dim = calculateDimension(FileFormat.PNG.getDefaultStringBounder(), font, shape.getText()); final FontMetrics fm = g2d.getFontMetrics(font.getFont()); final int ypos = (int) (y - fm.getDescent() - 0.5); final HtmlColor extended = fontConfiguration.getExtendedColor(); if (extended != null) { g2d.setColor(mapper.getMappedColor(extended)); } g2d.setStroke(new BasicStroke((float) 1.5)); g2d.drawLine((int) x, ypos, (int) (x + dim.getWidth()), ypos); g2d.setStroke(new BasicStroke()); } } static public Dimension2D calculateDimension(StringBounder stringBounder, UFont font, String text) { final Dimension2D rect = stringBounder.calculateDimension(font, text); double h = rect.getHeight(); if (h < 10) { h = 10; } return new Dimension2DDouble(rect.getWidth(), h); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/DriverTextG2d.java000066400000000000000000000134231312650303100271730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.BasicStroke; import java.awt.Color; import java.awt.FontMetrics; import java.awt.GradientPaint; import java.awt.Graphics2D; import java.awt.GraphicsEnvironment; import java.awt.geom.Dimension2D; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.EnsureVisible; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontStyle; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UText; public class DriverTextG2d implements UDriver { private final EnsureVisible visible; public DriverTextG2d(EnsureVisible visible) { this.visible = visible; } private static void printFont() { final GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); final String fontNames[] = ge.getAvailableFontFamilyNames(); final int j = fontNames.length; for (int i = 0; i < j; i++) { Log.info("Available fonts: " + fontNames[i]); } } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, Graphics2D g2d) { final UText shape = (UText) ushape; final FontConfiguration fontConfiguration = shape.getFontConfiguration(); final UFont font = fontConfiguration.getFont().scaled(param.getScale()); final Dimension2D dimBack = calculateDimension(FileFormat.PNG.getDefaultStringBounder(), font, shape.getText()); final HtmlColor extended = fontConfiguration.getExtendedColor(); if (fontConfiguration.containsStyle(FontStyle.BACKCOLOR)) { final Rectangle2D.Double area = new Rectangle2D.Double(x, y - dimBack.getHeight() + 1.5, dimBack.getWidth(), dimBack.getHeight()); if (extended instanceof HtmlColorGradient) { final GradientPaint paint = DriverRectangleG2d.getPaintGradient(x, y, mapper, dimBack.getWidth(), dimBack.getHeight(), extended); g2d.setPaint(paint); g2d.fill(area); } else { final Color backColor = mapper.getMappedColor(extended); if (backColor != null) { g2d.setColor(backColor); g2d.setBackground(backColor); g2d.fill(area); } } } visible.ensureVisible(x, y - dimBack.getHeight() + 1.5); visible.ensureVisible(x + dimBack.getWidth(), y + 1.5); g2d.setFont(font.getFont()); g2d.setColor(mapper.getMappedColor(fontConfiguration.getColor())); g2d.drawString(shape.getText(), (float) x, (float) y); if (fontConfiguration.containsStyle(FontStyle.UNDERLINE)) { if (extended != null) { g2d.setColor(mapper.getMappedColor(extended)); } final Dimension2D dim = calculateDimension(FileFormat.PNG.getDefaultStringBounder(), font, shape.getText()); final int ypos = (int) (y + 2.5); g2d.setStroke(new BasicStroke((float) 1)); g2d.drawLine((int) x, ypos, (int) (x + dim.getWidth()), ypos); g2d.setStroke(new BasicStroke()); } if (fontConfiguration.containsStyle(FontStyle.WAVE)) { final Dimension2D dim = calculateDimension(FileFormat.PNG.getDefaultStringBounder(), font, shape.getText()); final int ypos = (int) (y + 2.5) - 1; if (extended != null) { g2d.setColor(mapper.getMappedColor(extended)); } for (int i = (int) x; i < x + dim.getWidth() - 5; i += 6) { g2d.drawLine(i, ypos - 0, i + 3, ypos + 1); g2d.drawLine(i + 3, ypos + 1, i + 6, ypos - 0); } } if (fontConfiguration.containsStyle(FontStyle.STRIKE)) { final Dimension2D dim = calculateDimension(FileFormat.PNG.getDefaultStringBounder(), font, shape.getText()); final FontMetrics fm = g2d.getFontMetrics(font.getFont()); final int ypos = (int) (y - fm.getDescent() - 0.5); if (extended != null) { g2d.setColor(mapper.getMappedColor(extended)); } g2d.setStroke(new BasicStroke((float) 1.5)); g2d.drawLine((int) x, ypos, (int) (x + dim.getWidth()), ypos); g2d.setStroke(new BasicStroke()); } } static public Dimension2D calculateDimension(StringBounder stringBounder, UFont font, String text) { final Dimension2D rect = stringBounder.calculateDimension(font, text); double h = rect.getHeight(); if (h < 10) { h = 10; } return new Dimension2DDouble(rect.getWidth(), h); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/g2d/UGraphicG2d.java000066400000000000000000000157721312650303100266060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.g2d; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sourceforge.plantuml.EnsureVisible; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.anim.AffineTransformation; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.png.PngIO; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.ugraphic.AbstractCommonUGraphic; import net.sourceforge.plantuml.ugraphic.AbstractUGraphic; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UAntiAliasing; import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic2; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UImageSvg; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UPixel; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UText; public class UGraphicG2d extends AbstractUGraphic implements EnsureVisible, UGraphic2 { private BufferedImage bufferedImage; private final double dpiFactor; private UAntiAliasing antiAliasing = UAntiAliasing.ANTI_ALIASING_ON; private/* final */List urls = new ArrayList(); private Set allUrls = new HashSet(); private final boolean hasAffineTransform; public final Set getAllUrlsEncountered() { return Collections.unmodifiableSet(allUrls); } @Override public UGraphic apply(UChange change) { final UGraphicG2d copy = (UGraphicG2d) super.apply(change); if (change instanceof UAntiAliasing) { copy.antiAliasing = (UAntiAliasing) change; } return copy; } @Override protected AbstractCommonUGraphic copyUGraphic() { return new UGraphicG2d(this); } private UGraphicG2d(UGraphicG2d other) { super(other); this.hasAffineTransform = other.hasAffineTransform; this.dpiFactor = other.dpiFactor; this.bufferedImage = other.bufferedImage; this.urls = other.urls; this.allUrls = other.allUrls; this.antiAliasing = other.antiAliasing; register(dpiFactor); } public UGraphicG2d(ColorMapper colorMapper, Graphics2D g2d, double dpiFactor) { this(colorMapper, g2d, dpiFactor, null, 0, 0); } public UGraphicG2d(ColorMapper colorMapper, Graphics2D g2d, double dpiFactor, AffineTransformation affineTransform, double dx, double dy) { super(colorMapper, g2d); this.hasAffineTransform = affineTransform != null; this.dpiFactor = dpiFactor; if (dpiFactor != 1.0) { g2d.scale(dpiFactor, dpiFactor); } if (this.hasAffineTransform) { if (dx != 0 || dy != 0) { getGraphicObject().transform(AffineTransform.getTranslateInstance(dx, dy)); } getGraphicObject().transform(affineTransform.getAffineTransform()); } register(dpiFactor); } private void register(double dpiFactor) { registerDriver(URectangle.class, new DriverRectangleG2d(dpiFactor, this)); if (this.hasAffineTransform || dpiFactor != 1.0) { registerDriver(UText.class, new DriverTextAsPathG2d(this, TextBlockUtils.getFontRenderContext())); } else { registerDriver(UText.class, new DriverTextG2d(this)); } registerDriver(ULine.class, new DriverLineG2d(dpiFactor)); registerDriver(UPixel.class, new DriverPixelG2d()); registerDriver(UPolygon.class, new DriverPolygonG2d(dpiFactor, this)); registerDriver(UEllipse.class, new DriverEllipseG2d(dpiFactor, this)); registerDriver(UImageSvg.class, new DriverImageG2d(this)); registerDriver(UImage.class, new DriverImageG2d(this)); registerDriver(DotPath.class, new DriverDotPathG2d(this)); registerDriver(UPath.class, new DriverPathG2d(dpiFactor)); registerDriver(UCenteredCharacter.class, new DriverCenteredCharacterG2d()); } public StringBounder getStringBounder() { // if (hasAffineTransform) { // return TextBlockUtils.getDummyStringBounder(); // } return FileFormat.PNG.getDefaultStringBounder(); } @Override protected void beforeDraw() { super.beforeDraw(); applyClip(); antiAliasing.apply(getGraphicObject()); } private void applyClip() { final UClip uclip = getClip(); if (uclip == null) { getGraphicObject().setClip(null); } else { final Shape clip = new Rectangle2D.Double(uclip.getX(), uclip.getY(), uclip.getWidth(), uclip.getHeight()); getGraphicObject().setClip(clip); } } protected final double getDpiFactor() { return dpiFactor; } public void startUrl(Url url) { if (url == null) { throw new IllegalArgumentException(); } urls.add(url); allUrls.add(url); } public void closeAction() { urls.remove(urls.size() - 1); } public void ensureVisible(double x, double y) { for (Url u : urls) { u.ensureVisible(x, y); } } public BufferedImage getBufferedImage() { return bufferedImage; } public void setBufferedImage(BufferedImage bufferedImage) { this.bufferedImage = bufferedImage; } public Graphics2D getGraphics2D() { return getGraphicObject(); } public void writeImageTOBEMOVED(OutputStream os, String metadata, int dpi) throws IOException { final BufferedImage im = getBufferedImage(); PngIO.write(im, os, metadata, dpi); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/hand/000077500000000000000000000000001312650303100241265ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/hand/HandJiggle.java000066400000000000000000000105221312650303100267650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Adrian Vogt * */ package net.sourceforge.plantuml.ugraphic.hand; import java.awt.geom.CubicCurve2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collection; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UPolygon; public class HandJiggle { private final Collection points = new ArrayList(); private double startX; private double startY; private final double defaultVariation; public HandJiggle(double startX, double startY, double defaultVariation) { this.startX = startX; this.startY = startY; this.defaultVariation = defaultVariation; points.add(new Point2D.Double(startX, startY)); } public HandJiggle(Point2D start, double defaultVariation) { this(start.getX(), start.getY(), defaultVariation); } public void lineTo(Point2D end) { lineTo(end.getX(), end.getY()); } public void arcTo(double angle0, double angle1, double centerX, double centerY, double rx, double ry) { lineTo(pointOnCircle(centerX, centerY, (angle0 + angle1) / 2, rx, ry)); lineTo(pointOnCircle(centerX, centerY, angle1, rx, ry)); } private static Point2D pointOnCircle(double centerX, double centerY, double angle, double rx, double ry) { final double x = centerX + Math.cos(angle) * rx; final double y = centerY + Math.sin(angle) * ry; return new Point2D.Double(x, y); } public void lineTo(final double endX, final double endY) { final double diffX = Math.abs(endX - startX); final double diffY = Math.abs(endY - startY); final double distance = Math.sqrt(diffX * diffX + diffY * diffY); if (distance < 0.001) { return; } int segments = (int) Math.round(distance / 10); double variation = defaultVariation; if (segments < 5) { segments = 5; variation /= 3; } final double stepX = Math.signum(endX - startX) * diffX / segments; final double stepY = Math.signum(endY - startY) * diffY / segments; final double fx = diffX / distance; final double fy = diffY / distance; for (int s = 0; s < segments; s++) { double x = stepX * s + startX; double y = stepY * s + startY; final double offset = (Math.random() - 0.5) * variation; points.add(new Point2D.Double(x - offset * fy, y - offset * fx)); } points.add(new Point2D.Double(endX, endY)); this.startX = endX; this.startY = endY; } public void curveTo(CubicCurve2D curve) { final double flatness = curve.getFlatness(); final double dist = curve.getP1().distance(curve.getP2()); if (flatness > 0.1 && dist > 20) { final CubicCurve2D left = new CubicCurve2D.Double(); final CubicCurve2D right = new CubicCurve2D.Double(); curve.subdivide(left, right); curveTo(left); curveTo(right); return; } lineTo(curve.getP2()); } public UPolygon toUPolygon() { final UPolygon result = new UPolygon(); for (Point2D p : points) { result.addPoint(p.getX(), p.getY()); } return result; } public UPath toUPath() { UPath path = null; for (Point2D p : points) { if (path == null) { path = new UPath(); path.moveTo(p); } else { path.lineTo(p); } } if (path == null) { throw new IllegalStateException(); } return path; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/hand/UDotPathHand.java000066400000000000000000000033541312650303100272610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Adrian Vogt * */ package net.sourceforge.plantuml.ugraphic.hand; import java.awt.geom.CubicCurve2D; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.ugraphic.UPath; public class UDotPathHand { private final UPath path; public UDotPathHand(DotPath source) { final HandJiggle jiggle = new HandJiggle(source.getStartPoint(), 2.0); for (CubicCurve2D curve : source.getBeziers()) { jiggle.curveTo(curve); } this.path = jiggle.toUPath(); } public UPath getHanddrawn() { return this.path; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/hand/UEllipseHand.java000066400000000000000000000054661312650303100273210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Adrian Vogt * */ package net.sourceforge.plantuml.ugraphic.hand; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UPolygon; public class UEllipseHand { private Shadowable poly; public UEllipseHand(UEllipse source) { if (source.getStart() != 0 || source.getExtend() != 0) { this.poly = source; return; } poly = new UPolygon(); final double width = source.getWidth(); final double height = source.getHeight(); double angle = 0; if (width == height) { while (angle < Math.PI * 2) { angle += (10 + Math.random() * 10) * Math.PI / 180; final double variation = 1 + (Math.random() - 0.5) / 8; final double x = width / 2 + Math.cos(angle) * width * variation / 2; final double y = height / 2 + Math.sin(angle) * height * variation / 2; // final Point2D.Double p = new Point2D.Double(x, y); ((UPolygon) poly).addPoint(x, y); } } else { while (angle < Math.PI * 2) { angle += Math.PI / 20; final Point2D pt = getPoint(width, height, angle); ((UPolygon) poly).addPoint(pt.getX(), pt.getY()); } } this.poly.setDeltaShadow(source.getDeltaShadow()); } private Point2D getPoint(double width, double height, double angle) { final double x = width / 2 + Math.cos(angle) * width / 2; final double y = height / 2 + Math.sin(angle) * height / 2; final double variation = (Math.random() - 0.5) / 50; return new Point2D.Double(x + variation * width, y + variation * height); } public Shadowable getHanddrawn() { return this.poly; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/hand/UGraphicHandwritten.java000066400000000000000000000077401312650303100307130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Adrian Vogt * */ package net.sourceforge.plantuml.ugraphic.hand; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UShape; public class UGraphicHandwritten implements UGraphic { private final UGraphic ug; public UGraphicHandwritten(UGraphic ug) { this.ug = ug; } public StringBounder getStringBounder() { return ug.getStringBounder(); } public UParam getParam() { return ug.getParam(); } public void draw(UShape shape) { // http://www.ufonts.com/fonts/felt-tip-roman.html // http://webdesignledger.com/freebies/20-amazing-free-handwritten-fonts-for-your-designs if (shape instanceof ULine) { drawHand((ULine) shape); } else if (shape instanceof URectangle) { drawHand((URectangle) shape); } else if (shape instanceof UPolygon) { drawHand((UPolygon) shape); } else if (shape instanceof UEllipse) { drawHand((UEllipse) shape); } else if (shape instanceof DotPath) { drawHand((DotPath) shape); } else if (shape instanceof UPath) { drawHand((UPath) shape); } else { ug.draw(shape); } } private void drawHand(UPath shape) { final UPathHand uline = new UPathHand(shape); ug.draw(uline.getHanddrawn()); } private void drawHand(DotPath shape) { final UDotPathHand uline = new UDotPathHand(shape); ug.draw(uline.getHanddrawn()); } private void drawHand(UPolygon shape) { final UPolygonHand hand = new UPolygonHand(shape); ug.draw(hand.getHanddrawn()); } private void drawHand(URectangle shape) { final URectangleHand hand = new URectangleHand(shape); ug.draw(hand.getHanddrawn()); } private void drawHand(ULine shape) { final ULineHand uline = new ULineHand(shape); ug.draw(uline.getHanddrawn()); } private void drawHand(UEllipse shape) { final UEllipseHand uline = new UEllipseHand(shape); ug.draw(uline.getHanddrawn()); } public UGraphic apply(UChange change) { return new UGraphicHandwritten(ug.apply(change)); } public ColorMapper getColorMapper() { return ug.getColorMapper(); } public void startUrl(Url url) { ug.startUrl(url); } public void closeAction() { ug.closeAction(); } public void flushUg() { ug.flushUg(); } public boolean matchesProperty(String propertyName) { return ug.matchesProperty(propertyName); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/hand/ULineHand.java000066400000000000000000000032721312650303100266040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Adrian Vogt * */ package net.sourceforge.plantuml.ugraphic.hand; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPath; public class ULineHand { private UPath path; public ULineHand(ULine line) { final double endX = line.getDX(); final double endY = line.getDY(); final HandJiggle jiggle = new HandJiggle(0, 0, 2.0); jiggle.lineTo(endX, endY); this.path = jiggle.toUPath(); } public UPath getHanddrawn() { return this.path; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/hand/UPathHand.java000066400000000000000000000050511312650303100266060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Adrian Vogt * */ package net.sourceforge.plantuml.ugraphic.hand; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.USegment; import net.sourceforge.plantuml.ugraphic.USegmentType; public class UPathHand { private final UPath path; private final double defaultVariation = 4.0; public UPathHand(UPath source) { final UPath jigglePath = new UPath(); Point2D last = new Point2D.Double(); for (USegment segment : source) { final USegmentType type = segment.getSegmentType(); if (type == USegmentType.SEG_MOVETO) { final double x = segment.getCoord()[0]; final double y = segment.getCoord()[1]; jigglePath.moveTo(x, y); last = new Point2D.Double(x, y); } else if (type == USegmentType.SEG_LINETO) { final double x = segment.getCoord()[0]; final double y = segment.getCoord()[1]; final HandJiggle jiggle = new HandJiggle(last.getX(), last.getY(), defaultVariation); jiggle.lineTo(x, y); for (USegment seg2 : jiggle.toUPath()) { if (seg2.getSegmentType() == USegmentType.SEG_LINETO) { jigglePath.lineTo(seg2.getCoord()[0], seg2.getCoord()[1]); } } last = new Point2D.Double(x, y); } else { this.path = source; return; } } this.path = jigglePath; } public UPath getHanddrawn() { return this.path; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/hand/UPolygonHand.java000066400000000000000000000037041312650303100273440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Adrian Vogt * */ package net.sourceforge.plantuml.ugraphic.hand; import java.awt.geom.Point2D; import java.util.List; import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.UPolygon; public class UPolygonHand { private final UPolygon poly; public UPolygonHand(UPolygon source) { final List pt = source.getPoints(); if (pt.size() == 0) { poly = new UPolygon(); return; } final HandJiggle jiggle = new HandJiggle(pt.get(0), 1.5); for (int i = 1; i < pt.size(); i++) { jiggle.lineTo(pt.get(i)); } jiggle.lineTo(pt.get(0)); this.poly = jiggle.toUPolygon(); this.poly.setDeltaShadow(source.getDeltaShadow()); } public Shadowable getHanddrawn() { return this.poly; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/hand/URectangleHand.java000066400000000000000000000051031312650303100276140ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Adrian Vogt * */ package net.sourceforge.plantuml.ugraphic.hand; import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.URectangle; public class URectangleHand { final private UPolygon poly; public URectangleHand(URectangle rectangle) { final double width = rectangle.getWidth(); final double height = rectangle.getHeight(); final HandJiggle jiggle; final double rx = Math.min(rectangle.getRx() / 2, width / 2); final double ry = Math.min(rectangle.getRy() / 2, height / 2); // System.err.println("rx=" + rx + " ry=" + ry); if (rx == 0 && ry == 0) { jiggle = new HandJiggle(0, 0, 1.5); jiggle.lineTo(width, 0); jiggle.lineTo(width, height); jiggle.lineTo(0, height); jiggle.lineTo(0, 0); } else { jiggle = new HandJiggle(rx, 0, 1.5); jiggle.lineTo(width - rx, 0); jiggle.arcTo(-Math.PI / 2, 0, width - rx, ry, rx, ry); jiggle.lineTo(width, height - ry); jiggle.arcTo(0, Math.PI / 2, width - rx, height - ry, rx, ry); jiggle.lineTo(rx, height); jiggle.arcTo(Math.PI / 2, Math.PI, rx, height - ry, rx, ry); jiggle.lineTo(0, ry); jiggle.arcTo(Math.PI, 3 * Math.PI / 2, rx, ry, rx, ry); } this.poly = jiggle.toUPolygon(); this.poly.setDeltaShadow(rectangle.getDeltaShadow()); } public Shadowable getHanddrawn() { return this.poly; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/html5/000077500000000000000000000000001312650303100242455ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/html5/DriverLineHtml5.java000066400000000000000000000052721312650303100300730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.html5; import java.awt.geom.Line2D; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverLineHtml5 implements UDriver { private final ClipContainer clipContainer; public DriverLineHtml5(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, Html5Drawer html) { final ULine shape = (ULine) ushape; double x2 = x + shape.getDX(); double y2 = y + shape.getDY(); final UClip clip = clipContainer.getClip(); if (clip != null) { final Line2D.Double line = clip.getClippedLine(new Line2D.Double(x, y, x2, y2)); if (line == null) { return; } x = line.x1; y = line.y1; x2 = line.x2; y2 = line.y2; } final String color = param.getColor() == null ? null : StringUtils.getAsHtml(mapper.getMappedColor(param .getColor())); html.setStrokeColor(color); // html.setStrokeWidth("" + param.getStroke().getThickness(), param.getStroke().getDashVisible(), param.getStroke() // .getDashSpace()); html.htmlLine(x, y, x2, y2, 0); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/html5/DriverNopHtml5.java000066400000000000000000000032131312650303100277310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.html5; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverNopHtml5 implements UDriver { public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, Html5Drawer html) { } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/html5/DriverRectangleHtml5.java000066400000000000000000000067361312650303100311160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.html5; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverRectangleHtml5 implements UDriver { private final ClipContainer clipContainer; public DriverRectangleHtml5(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, Html5Drawer html) { final URectangle rect = (URectangle) ushape; double width = rect.getWidth(); double height = rect.getHeight(); final UClip clip = clipContainer.getClip(); if (clip != null) { final Rectangle2D.Double r = clip.getClippedRectangle(new Rectangle2D.Double(x, y, width, height)); x = r.x; y = r.y; width = r.width; height = r.height; } final double rx = rect.getRx(); final double ry = rect.getRy(); // // Shadow // if (rect.getDeltaShadow() != 0) { // eps.epsRectangleShadow(x, y, width, height, rx / 2, ry / 2, rect.getDeltaShadow()); // } final HtmlColor back = param.getBackcolor(); if (back instanceof HtmlColorGradient) { // eps.setStrokeColor(mapper.getMappedColor(param.getColor())); // eps.epsRectangle(x, y, width, height, rx / 2, ry / 2, (HtmlColorGradient) back, mapper); } else { final String color = param.getColor() == null ? null : StringUtils.getAsHtml(mapper.getMappedColor(param .getColor())); final String backcolor = param.getColor() == null ? null : StringUtils.getAsHtml(mapper.getMappedColor(param .getBackcolor())); html.setStrokeColor(color); html.setFillColor(backcolor); // eps.setStrokeWidth("" + param.getStroke().getThickness(), param.getStroke().getDashVisible(), param // .getStroke().getDashSpace()); html.htmlRectangle(x, y, width, height, rx / 2, ry / 2); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/html5/Html5Drawer.java000066400000000000000000000100431312650303100272440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.html5; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.eps.EpsGraphics; public class Html5Drawer { private int maxX = 10; private int maxY = 10; private String strokeStyle = "black"; private String fillStyle = "black"; private List data = new ArrayList(); final protected void ensureVisible(double x, double y) { if (x > maxX) { maxX = (int) (x + 1); } if (y > maxY) { maxY = (int) (y + 1); } } private static String format(double x) { return EpsGraphics.format(x); } public final void setStrokeColor(String stroke) { this.strokeStyle = stroke; } public final void setFillColor(String fill) { this.fillStyle = fill; } public String generateHtmlCode() { final StringBuilder sb = new StringBuilder(); ap(sb, ""); ap(sb, ""); ap(sb, ""); ap(sb, ""); ap(sb, ""); ap(sb, ""); return sb.toString(); } private void ap(StringBuilder sb, String s) { sb.append(s); sb.append('\n'); } public void htmlRectangle(double x, double y, double width, double height, double rx, double ry) { ensureVisible(x, y); ensureVisible(x + width, y + height); // if (fillcolor != null) { // appendColor(fillcolor); // epsRectangleInternal(x, y, width, height, rx, ry, true); // append("closepath eofill", true); // } // // if (color != null) { // append(strokeWidth + " setlinewidth", true); // appendColor(color); // epsRectangleInternal(x, y, width, height, rx, ry, false); // append("closepath stroke", true); // } data.add("//RECT"); data.add("ctx.strokeStyle='" + strokeStyle + "';"); data.add("ctx.fillStyle='" + fillStyle + "';"); data.add("ctx.rect(" + format(x) + "," + format(y) + "," + format(width) + "," + format(height) + ");"); data.add("ctx.fill();"); data.add("ctx.stroke();"); } public void htmlLine(double x1, double y1, double x2, double y2, double deltaShadow) { ensureVisible(x1 + 2 * deltaShadow, y1 + 2 * deltaShadow); ensureVisible(x2 + 2 * deltaShadow, y2 + 2 * deltaShadow); data.add("ctx.strokeStyle='" + strokeStyle + "';"); data.add("ctx.beginPath();"); data.add("ctx.moveTo(" + format(x1) + "," + format(y1) + ");"); data.add("ctx.lineTo(" + format(x2) + "," + format(y2) + ");"); data.add("ctx.stroke();"); data.add("ctx.closePath();"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/html5/UGraphicHtml5.java000066400000000000000000000115571312650303100275350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.html5; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.AbstractCommonUGraphic; import net.sourceforge.plantuml.ugraphic.AbstractUGraphic; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UGraphic2; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UText; public class UGraphicHtml5 extends AbstractUGraphic implements ClipContainer, UGraphic2 { private final StringBounder stringBounder; @Override protected AbstractCommonUGraphic copyUGraphic() { return this; } public UGraphicHtml5(ColorMapper colorMapper) { super(colorMapper, new Html5Drawer()); stringBounder = FileFormat.PNG.getDefaultStringBounder(); registerDriver(URectangle.class, new DriverRectangleHtml5(this)); // registerDriver(UText.class, new DriverTextEps(imDummy, this, strategy)); registerDriver(UText.class, new DriverNopHtml5()); registerDriver(ULine.class, new DriverLineHtml5(this)); // registerDriver(UPolygon.class, new DriverPolygonEps(this)); registerDriver(UPolygon.class, new DriverNopHtml5()); // registerDriver(UEllipse.class, new DriverEllipseEps()); // registerDriver(UImage.class, new DriverImageEps()); // registerDriver(UPath.class, new DriverPathEps()); // registerDriver(DotPath.class, new DriverDotPathEps()); } public StringBounder getStringBounder() { return stringBounder; } public void startUrl(Url url) { // throw new UnsupportedOperationException(); } public void closeAction() { // throw new UnsupportedOperationException(); } // public void close() { // getEpsGraphics().close(); // } public String generateHtmlCode() { return getGraphicObject().generateHtmlCode(); } public void writeImageTOBEMOVED(OutputStream os, String metadata, int dpi) throws IOException { os.write(generateHtmlCode().getBytes()); } // public void centerChar(double x, double y, char c, UFont font) { // final UnusedSpace unusedSpace = UnusedSpace.getUnusedSpace(font, c); // // final double xpos = x - unusedSpace.getCenterX() - 0.5; // final double ypos = y - unusedSpace.getCenterY() - 0.5; // // final TextLayout t = new TextLayout("" + c, font.getFont(), imDummy.getFontRenderContext()); // getGraphicObject().setStrokeColor(getColorMapper().getMappedColor(getParam().getColor())); // DriverTextEps.drawPathIterator(getGraphicObject(), xpos + getTranslateX(), ypos + getTranslateY(), t // .getOutline(null).getPathIterator(null)); // // } // // static public String getEpsString(ColorMapper colorMapper, EpsStrategy epsStrategy, UDrawable udrawable) // throws IOException { // final UGraphicHtml5 ug = new UGraphicHtml5(colorMapper, epsStrategy); // udrawable.drawU(ug); // return ug.getEPSCode(); // } // // static public void copyEpsToFile(ColorMapper colorMapper, UDrawable udrawable, File f) throws IOException { // final PrintWriter pw = new PrintWriter(f); // final EpsStrategy epsStrategy = EpsStrategy.getDefault2(); // pw.print(UGraphicHtml5.getEpsString(colorMapper, epsStrategy, udrawable)); // pw.close(); // } // // public void setAntiAliasing(boolean trueForOn) { // } // // public void startUrl(String url, String tooltip) { // getGraphicObject().openLink(url); // } // // public void closeAction() { // getGraphicObject().closeLink(); // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/sprite/000077500000000000000000000000001312650303100245225ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/sprite/PSystemListInternalSprites.java000066400000000000000000000065701312650303100327040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.sprite; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.donors.PSystemDonors; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockHorizontal; import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.graphic.VerticalAlignment; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class PSystemListInternalSprites extends AbstractPSystem { @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final UDrawable result = getGraphicStrings(); final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, HtmlColorUtils.WHITE, getMetadata(), null, 0, 0, null, false); imageBuilder.setUDrawable(result); return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os); } private UDrawable getGraphicStrings() throws IOException { final List lines = new ArrayList(); lines.add("List Current Sprits"); lines.add("Credit to"); lines.add("http://www.archimatetool.com"); lines.add(" "); for (String folder : RessourcesUtils.getJarFile("sprites", true)) { lines.add("" + folder + " :"); lines.add(" "); for (String png : RessourcesUtils.getJarFile("sprites/" + folder, false)) { if (png.endsWith(".png")) { final String spriteName = png.substring(0, png.length() - 4); lines.add("<$archimate/" + spriteName + "> " + spriteName); } } } final List cols = PSystemDonors.getCols(lines, 4, 0); return new TextBlockHorizontal(cols, VerticalAlignment.TOP); } public DiagramDescription getDescription() { return new DiagramDescription("(Sprites)"); } } PSystemListInternalSpritesFactory.java000066400000000000000000000033661312650303100341550ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/sprite/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.sprite; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.PSystemSingleLineFactory; public class PSystemListInternalSpritesFactory extends PSystemSingleLineFactory { @Override protected AbstractPSystem executeLine(String line) { final String lineLower = StringUtils.goLowerCase(line); if (lineLower.startsWith("listsprite")) { return new PSystemListInternalSprites(); } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/sprite/RessourcesUtils.java000066400000000000000000000074641312650303100305560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.sprite; import java.io.File; import java.io.IOException; import java.net.URISyntaxException; import java.net.URL; import java.net.URLDecoder; import java.util.Collections; import java.util.Enumeration; import java.util.Set; import java.util.TreeSet; import java.util.jar.JarEntry; import java.util.jar.JarFile; import net.sourceforge.plantuml.version.Version; public class RessourcesUtils { public static Set getJarFile(String path, boolean folder) throws IOException { if (path.startsWith("/") || path.endsWith("/")) { throw new IllegalArgumentException(); } final URL resource = Version.class.getClassLoader().getResource("net/sourceforge/plantuml/version/logo.png"); final String protocol = resource.getProtocol(); if ("file".equals(protocol)) { final URL local = Version.class.getClassLoader().getResource(path); try { return listEntry(new File(local.toURI())); } catch (URISyntaxException e) { e.printStackTrace(); return null; } } if ("jar".equals(protocol)) { final String classFile = Version.class.getName().replace(".", "/") + ".class"; final URL versionURL = Version.class.getClassLoader().getResource(classFile); final String jarPath = versionURL.getPath().substring(5, versionURL.getPath().indexOf("!")); if (folder) { return listFolders(new JarFile(URLDecoder.decode(jarPath, "UTF-8")), path + "/"); } else { return listFiles(new JarFile(URLDecoder.decode(jarPath, "UTF-8")), path + "/"); } } return Collections. emptySet(); } private static Set listFiles(JarFile jarFile, String path) { final Enumeration entries = jarFile.entries(); final Set result = new TreeSet(); while (entries.hasMoreElements()) { final String name = entries.nextElement().getName(); if (name.startsWith(path)) { result.add(name.substring(path.length())); } } return result; } private static Set listFolders(JarFile jarFile, String path) { final Enumeration entries = jarFile.entries(); final Set result = new TreeSet(); while (entries.hasMoreElements()) { final String name = entries.nextElement().getName(); if (name.startsWith(path)) { final String folder = name.substring(path.length()); final int x = folder.indexOf('/'); if (x != -1) { result.add(folder.substring(0, x)); } } } return result; } private static Set listEntry(File dir) { final Set result = new TreeSet(); for (String n : dir.list()) { result.add(n); } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/sprite/Sprite.java000066400000000000000000000027401312650303100266360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.sprite; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.TextBlock; public interface Sprite { public TextBlock asTextBlock(final HtmlColor color, double scale); } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/sprite/SpriteGrayLevel.java000066400000000000000000000207311312650303100304510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.sprite; import java.awt.Color; import java.awt.image.BufferedImage; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.code.AsciiEncoder; import net.sourceforge.plantuml.code.CompressionZlib; import net.sourceforge.plantuml.ugraphic.ColorChangerMonochrome; public enum SpriteGrayLevel { GRAY_16(16), GRAY_8(8), GRAY_4(4); private final int nbColor; private static final ColorChangerMonochrome mono = new ColorChangerMonochrome(); private SpriteGrayLevel(int nbColor) { this.nbColor = nbColor; } public static SpriteGrayLevel get(int n) { if (n == 4) { return SpriteGrayLevel.GRAY_4; } if (n == 8) { return SpriteGrayLevel.GRAY_8; } if (n == 16) { return SpriteGrayLevel.GRAY_16; } throw new UnsupportedOperationException(); } public int getNbColor() { return nbColor; } public List encode(BufferedImage img) { if (this == GRAY_16) { return encode16(img); } if (this == GRAY_8) { return encode8(img); } if (this == GRAY_4) { return encode4(img); } throw new UnsupportedOperationException(); } private List encode16(BufferedImage img) { final int width = img.getWidth(); final int height = img.getHeight(); // final int type = img.getType(); final List result = new ArrayList(); for (int y = 0; y < height; y++) { final StringBuilder sb = new StringBuilder(); for (int x = 0; x < width; x++) { final int level = getGrayOn16(img, x, y); final char code = "0123456789ABCDEF".charAt(level); sb.append(code); } result.add(sb.toString()); } return Collections.unmodifiableList(result); } private List encode8(BufferedImage img) { final int width = img.getWidth(); final int height = img.getHeight(); // final int type = img.getType(); final List result = new ArrayList(); final AsciiEncoder encoder = new AsciiEncoder(); for (int y = 0; y < height; y += 2) { final StringBuilder sb = new StringBuilder(); for (int x = 0; x < width; x++) { final int level1 = getGrayOn16(img, x, y) / 2; assert level1 >= 0 && level1 <= 7; final int level2 = getGrayOn16(img, x, y + 1) / 2; assert level2 >= 0 && level2 <= 7; final int v = level1 * 8 + level2; sb.append(encoder.encode6bit((byte) v)); } result.add(sb.toString()); } return Collections.unmodifiableList(result); } private List encode4(BufferedImage img) { final int width = img.getWidth(); final int height = img.getHeight(); // final int type = img.getType(); final List result = new ArrayList(); final AsciiEncoder encoder = new AsciiEncoder(); for (int y = 0; y < height; y += 3) { final StringBuilder sb = new StringBuilder(); for (int x = 0; x < width; x++) { final int level1 = getGrayOn16(img, x, y) / 4; assert level1 >= 0 && level1 <= 3; final int level2 = getGrayOn16(img, x, y + 1) / 4; assert level2 >= 0 && level2 <= 3; final int level3 = getGrayOn16(img, x, y + 2) / 4; assert level3 >= 0 && level3 <= 3; final int v = level1 * 16 + level2 * 4 + level3; sb.append(encoder.encode6bit((byte) v)); } result.add(sb.toString()); } return Collections.unmodifiableList(result); } private int getGrayOn16(BufferedImage img, int x, int y) { if (x >= img.getWidth()) { return 0; } if (y >= img.getHeight()) { return 0; } final Color g = mono.getChangedColor(new Color(img.getRGB(x, y))); final int grey = 255 - g.getRed(); return grey / 16; } public Sprite buildSprite(int width, int height, List strings) { if (this == SpriteGrayLevel.GRAY_16) { return buildSprite16(strings); } if (this == SpriteGrayLevel.GRAY_8) { return buildSprite8(width, height, strings); } if (this == SpriteGrayLevel.GRAY_4) { return buildSprite4(width, height, strings); } throw new UnsupportedOperationException(toString()); } private Sprite buildSprite16(List strings) { final SpriteMonochrome result = new SpriteMonochrome(strings.get(0).length(), strings.size(), 16); for (int col = 0; col < result.getWidth(); col++) { for (int line = 0; line < result.getHeight(); line++) { if (col >= strings.get(line).length()) { continue; } if (strings.get(line).charAt(col) != '0') { final String s = "" + strings.get(line).charAt(col); final int x = Integer.parseInt(StringUtils.goUpperCase(s), 16); result.setPixel(col, line, x); } } } return result; } private Sprite buildSprite8(int width, int height, List strings) { final AsciiEncoder encoder = new AsciiEncoder(); final SpriteMonochrome result = new SpriteMonochrome(width, height, 8); for (int col = 0; col < result.getWidth(); col++) { for (int line = 0; line < strings.size(); line++) { if (col >= strings.get(line).length()) { continue; } final int v = encoder.decode6bit(strings.get(line).charAt(col)); final int w1 = v / 8; final int w2 = v % 8; result.setPixel(col, line * 2, w1); result.setPixel(col, line * 2 + 1, w2); } } return result; } private Sprite buildSprite4(int width, int height, List strings) { final AsciiEncoder encoder = new AsciiEncoder(); final SpriteMonochrome result = new SpriteMonochrome(width, height, 4); for (int col = 0; col < result.getWidth(); col++) { for (int line = 0; line < strings.size(); line++) { if (col >= strings.get(line).length()) { continue; } int v = encoder.decode6bit(strings.get(line).charAt(col)); final int w1 = v / 16; v = v % 16; final int w2 = v / 4; final int w3 = v % 4; result.setPixel(col, line * 3, w1); result.setPixel(col, line * 3 + 1, w2); result.setPixel(col, line * 3 + 2, w3); } } return result; } public List encodeZ(BufferedImage img) { final int width = img.getWidth(); final int height = img.getHeight(); final byte raw[] = new byte[width * height]; final BufferedImage grayImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); int cpt = 0; final int coef = 16 / nbColor; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { final int color = getGrayOn16(img, x, y) / coef; raw[cpt++] = (byte) color; grayImg.setRGB(x, y, color * coef); } } final byte[] comp = new CompressionZlib().compress(raw); return cut(new AsciiEncoder().encode(comp)); } private List cut(String s) { final List result = new ArrayList(); for (int i = 0; i < s.length(); i += 120) { final int j = Math.min(i + 120, s.length()); result.add(s.substring(i, j)); } return Collections.unmodifiableList(result); } public Sprite buildSpriteZ(int width, int height, String compressed) throws IOException { final byte comp[] = new AsciiEncoder().decode(compressed); final byte img[] = new CompressionZlib().decompress(comp); final SpriteMonochrome result = new SpriteMonochrome(width, height, nbColor); int cpt = 0; for (int line = 0; line < result.getHeight(); line++) { for (int col = 0; col < result.getWidth(); col++) { result.setPixel(col, line, img[cpt++]); } } return result; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/sprite/SpriteImage.java000066400000000000000000000055051312650303100276030ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.sprite; import java.awt.geom.Dimension2D; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; import javax.imageio.ImageIO; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; public class SpriteImage implements Sprite { private final UImage img; public SpriteImage(BufferedImage img) { this.img = new UImage(img); } public TextBlock asTextBlock(final HtmlColor color, final double scale) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { ug.draw(img.scale(scale)); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(img.getWidth() * scale, img.getHeight() * scale); } }; } public static Sprite fromInternal(String name) { if (name.endsWith(".png")) { throw new IllegalArgumentException(); } final InputStream is = getInternalSprite(name + ".png"); if (is == null) { return null; } try { return new SpriteImage(ImageIO.read(is)); } catch (IOException e) { e.printStackTrace(); return null; } } public static InputStream getInternalSprite(final String inner) { final String path = "/sprites/" + inner; final InputStream is = SpriteImage.class.getResourceAsStream(path); return is; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/sprite/SpriteMonochrome.java000066400000000000000000000074731312650303100306750ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.sprite; import java.awt.Color; import java.awt.geom.Dimension2D; import java.awt.image.BufferedImage; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImage; public class SpriteMonochrome implements Sprite { private final int width; private final int height; private final int grayLevel; private final int pixels[][]; SpriteMonochrome(int width, int height, int grayLevel) { if (grayLevel != 2 && grayLevel != 4 && grayLevel != 8 && grayLevel != 16) { throw new IllegalArgumentException(); } this.width = width; this.height = height; this.grayLevel = grayLevel; this.pixels = new int[height][width]; } void setPixel(int x, int y, int level) { if (x < 0 || x >= width) { return; } if (y < 0 || y >= height) { return; } if (level < 0 || level >= grayLevel) { throw new IllegalArgumentException("level=" + level + " grayLevel=" + grayLevel); } pixels[y][x] = level; } public int getHeight() { return height; } int getWidth() { return width; } public UImage toUImage(ColorMapper colorMapper, HtmlColor backcolor, HtmlColor color) { final BufferedImage im = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); if (backcolor == null) { backcolor = HtmlColorUtils.WHITE; } if (color == null) { color = HtmlColorUtils.BLACK; } final HtmlColorGradient gradient = new HtmlColorGradient(backcolor, color, '\0'); for (int col = 0; col < width; col++) { for (int line = 0; line < height; line++) { final double coef = 1.0 * pixels[line][col] / (grayLevel - 1); final Color c = gradient.getColor(colorMapper, coef); im.setRGB(col, line, c.getRGB()); } } return new UImage(im); } public TextBlock asTextBlock(final HtmlColor color, final double scale) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { final UImage image = toUImage(ug.getColorMapper(), ug.getParam().getBackcolor(), color); ug.draw(image.scale(scale)); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(getWidth() * scale, getHeight() * scale); } }; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/sprite/SpriteSvg.java000066400000000000000000000047761312650303100273310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.sprite; import java.awt.geom.Dimension2D; import java.io.File; import java.io.IOException; import java.io.InputStream; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FileUtils; import net.sourceforge.plantuml.SvgString; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UImageSvg; public class SpriteSvg implements Sprite { private final UImageSvg img; public SpriteSvg(String svg) { this.img = new UImageSvg(new SvgString(svg, 1)); } public SpriteSvg(File svgFile) throws IOException { this(FileUtils.readSvg(svgFile)); } public SpriteSvg(InputStream is) throws IOException { this(FileUtils.readSvg(is)); } public TextBlock asTextBlock(final HtmlColor color, final double scale) { return new AbstractTextBlock() { public void drawU(UGraphic ug) { ug.draw(img); } public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(img.getWidth() * scale, img.getHeight() * scale); } }; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/sprite/SpriteUtils.java000066400000000000000000000047341312650303100276640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.sprite; import java.awt.image.BufferedImage; import java.util.List; import net.sourceforge.plantuml.BackSlash; public class SpriteUtils { public static final String SPRITE_NAME = "[-\\p{L}0-9_/]+"; private SpriteUtils() { } public static String encode(BufferedImage img, String name, SpriteGrayLevel level) { final StringBuilder sb = new StringBuilder(); sb.append("sprite $" + name + " [" + img.getWidth() + "x" + img.getHeight() + "/" + level.getNbColor() + "] {\n"); final List result = level.encode(img); for (String s : result) { sb.append(s); sb.append(BackSlash.NEWLINE); } sb.append("}\n"); return sb.toString(); } public static String encodeCompressed(BufferedImage img, String name, SpriteGrayLevel level) { final StringBuilder sb = new StringBuilder(); sb.append("sprite $" + name + " [" + img.getWidth() + "x" + img.getHeight() + "/" + level.getNbColor() + "z] "); final List list = level.encodeZ(img); if (list.size() == 1) { sb.append(list.get(0)); sb.append(BackSlash.NEWLINE); } else { sb.append("{\n"); for (String s : list) { sb.append(s); sb.append(BackSlash.NEWLINE); } sb.append("}\n"); } return sb.toString(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/svg/000077500000000000000000000000001312650303100240135ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/svg/DriverCenteredCharacterSvg.java000066400000000000000000000051641312650303100320660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.svg; import java.awt.font.TextLayout; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.UnusedSpace; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverCenteredCharacterSvg implements UDriver { public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, SvgGraphics svg) { final UCenteredCharacter characterCircled = (UCenteredCharacter) ushape; final char c = characterCircled.getChar(); final UFont font = characterCircled.getFont(); final UnusedSpace unusedSpace = UnusedSpace.getUnusedSpace(font, c); final double xpos = x - unusedSpace.getCenterX() - 0.5; final double ypos = y - unusedSpace.getCenterY() - 0.5; final TextLayout t = new TextLayout("" + c, font.getFont(), TextBlockUtils.getFontRenderContext()); svg.setStrokeColor(StringUtils.getAsHtml(mapper.getMappedColor(param.getColor()))); DriverTextAsPathSvg.drawPathIterator(svg, xpos, ypos, t.getOutline(null).getPathIterator(null)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/svg/DriverDotPathSvg.java000066400000000000000000000042441312650303100300610ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.svg; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverDotPathSvg implements UDriver { public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, SvgGraphics svg) { final DotPath shape = (DotPath) ushape; // DriverLineG2d.manageStroke(param, g2d); if (param.getColor() != null) { final String color = StringUtils.getAsSvg(mapper, param.getColor()); svg.setStrokeColor(color); svg.setFillColor(null); svg.setStrokeWidth(param.getStroke().getThickness(), param.getStroke().getDasharraySvg()); svg.svgPath(x, y, shape.toUPath(), 0); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/svg/DriverEllipseSvg.java000066400000000000000000000101261312650303100301070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.svg; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.graphic.HtmlColorTransparent; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverEllipseSvg implements UDriver { private final ClipContainer clipContainer; public DriverEllipseSvg(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, SvgGraphics svg) { final UEllipse shape = (UEllipse) ushape; final double width = shape.getWidth(); final double height = shape.getHeight(); final UClip clip = clipContainer.getClip(); if (clip != null) { if (clip.isInside(x, y) == false) { return; } if (clip.isInside(x + width, y + height) == false) { return; } } final HtmlColor back = param.getBackcolor(); if (back instanceof HtmlColorGradient) { final HtmlColorGradient gr = (HtmlColorGradient) back; final String id = svg.createSvgGradient(StringUtils.getAsHtml(mapper.getMappedColor(gr.getColor1())), StringUtils.getAsHtml(mapper.getMappedColor(gr.getColor2())), gr.getPolicy()); svg.setFillColor("url(#" + id + ")"); } else if (back == null || back instanceof HtmlColorTransparent) { svg.setFillColor("none"); } else { final String backcolor = StringUtils.getAsSvg(mapper, back); svg.setFillColor(backcolor); } final String color = StringUtils.getAsSvg(mapper, param.getColor()); svg.setStrokeColor(color); svg.setStrokeWidth(param.getStroke().getThickness(), param.getStroke().getDasharraySvg()); double start = shape.getStart(); final double extend = shape.getExtend(); final double cx = x + width / 2; final double cy = y + height / 2; if (start == 0 && extend == 0) { svg.svgEllipse(cx, cy, width / 2, height / 2, shape.getDeltaShadow()); } else { // http://www.itk.ilstu.edu/faculty/javila/SVG/SVG_drawing1/elliptical_curve.htm start = start + 90; final double x1 = cx + Math.sin(start * Math.PI / 180.) * width / 2; final double y1 = cy + Math.cos(start * Math.PI / 180.) * height / 2; final double x2 = cx + Math.sin((start + extend) * Math.PI / 180.) * width / 2; final double y2 = cy + Math.cos((start + extend) * Math.PI / 180.) * height / 2; // svg.svgEllipse(x1, y1, 1, 1, 0); // svg.svgEllipse(x2, y2, 1, 1, 0); svg.svgArcEllipse(width / 2, height / 2, x1, y1, x2, y2); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/svg/DriverImagePng.java000066400000000000000000000046501312650303100275260ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.svg; import java.io.IOException; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverImagePng implements UDriver { private final ClipContainer clipContainer; public DriverImagePng(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, SvgGraphics svg) { final UImage image = (UImage) ushape; final UClip clip = clipContainer.getClip(); if (clip != null) { if (clip.isInside(x, y) == false) { return; } if (clip.isInside(x + image.getWidth(), y + image.getHeight()) == false) { return; } } try { svg.svgImage(image.getImage(), x, y); } catch (IOException e) { Log.error("Error in svg for image " + e); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/svg/DriverImageSvgSvg.java000066400000000000000000000035041312650303100302160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.svg; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UImageSvg; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverImageSvgSvg implements UDriver { public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, SvgGraphics svg) { final UImageSvg image = (UImageSvg) ushape; svg.svgImage(image.getSvg(), x, y); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/svg/DriverLineSvg.java000066400000000000000000000055371312650303100274130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.svg; import java.awt.geom.Line2D; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverLineSvg implements UDriver { private final ClipContainer clipContainer; public DriverLineSvg(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, SvgGraphics svg) { final ULine shape = (ULine) ushape; double x2 = x + shape.getDX(); double y2 = y + shape.getDY(); final UClip clip = clipContainer.getClip(); if (clip != null) { final Line2D.Double line = clip.getClippedLine(new Line2D.Double(x, y, x2, y2)); if (line == null) { return; } x = line.x1; y = line.y1; x2 = line.x2; y2 = line.y2; } // // Shadow // if (shape.getDeltaShadow() != 0) { // svg.svgLineShadow(x, y, x2, y2, shape.getDeltaShadow()); // } // svg.setStroke(new BasicStroke((float) // param.getStroke().getThickness())); final String color = StringUtils.getAsSvg(mapper, param.getColor()); svg.setStrokeColor(color); svg.setStrokeWidth(param.getStroke().getThickness(), param.getStroke().getDasharraySvg()); svg.svgLine(x, y, x2, y2, shape.getDeltaShadow()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/svg/DriverNoneSvg.java000066400000000000000000000032731312650303100274160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.svg; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverNoneSvg implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, SvgGraphics object) { } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/svg/DriverPathSvg.java000066400000000000000000000063411312650303100274120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.svg; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.g2d.DriverShadowedG2d; public class DriverPathSvg extends DriverShadowedG2d implements UDriver { private final ClipContainer clipContainer; public DriverPathSvg(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, SvgGraphics svg) { final UPath shape = (UPath) ushape; final UClip clip = clipContainer.getClip(); if (clip != null && clip.isInside(x, y, shape) == false) { return; } final String color = StringUtils.getAsSvg(mapper, param.getColor()); if (shape.isOpenIconic()) { svg.setFillColor(color); svg.setStrokeColor(""); svg.setStrokeWidth(0, ""); } else { final HtmlColor back = param.getBackcolor(); if (back instanceof HtmlColorGradient) { final HtmlColorGradient gr = (HtmlColorGradient) back; final String id = svg.createSvgGradient(StringUtils.getAsHtml(mapper.getMappedColor(gr.getColor1())), StringUtils.getAsHtml(mapper.getMappedColor(gr.getColor2())), gr.getPolicy()); svg.setFillColor("url(#" + id + ")"); } else { final String backcolor = StringUtils.getAsSvg(mapper, back); svg.setFillColor(backcolor); } svg.setStrokeColor(color); svg.setStrokeWidth(param.getStroke().getThickness(), param.getStroke().getDasharraySvg()); } svg.svgPath(x, y, shape, shape.getDeltaShadow()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/svg/DriverPolygonSvg.java000066400000000000000000000062311312650303100301430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.svg; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverPolygonSvg implements UDriver { private final ClipContainer clipContainer; public DriverPolygonSvg(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, SvgGraphics svg) { final UPolygon shape = (UPolygon) ushape; final double points[] = shape.getPointArray(x, y); final UClip clip = clipContainer.getClip(); if (clip != null) { for (int j = 0; j < points.length; j += 2) { if (clip.isInside(points[j], points[j + 1]) == false) { return; } } } final String color = StringUtils.getAsSvg(mapper, param.getColor()); final HtmlColor back = param.getBackcolor(); if (back instanceof HtmlColorGradient) { final HtmlColorGradient gr = (HtmlColorGradient) back; final String id = svg.createSvgGradient(StringUtils.getAsHtml(mapper.getMappedColor(gr.getColor1())), StringUtils.getAsHtml(mapper.getMappedColor(gr.getColor2())), gr.getPolicy()); svg.setFillColor("url(#" + id + ")"); } else { final String backcolorString = StringUtils.getAsSvg(mapper, back); svg.setFillColor(backcolorString); } svg.setStrokeColor(color); svg.setStrokeWidth(param.getStroke().getThickness(), param.getStroke().getDasharraySvg()); svg.svgPolygon(shape.getDeltaShadow(), points); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/svg/DriverRectangleSvg.java000066400000000000000000000066521312650303100304270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.svg; import java.awt.geom.Rectangle2D; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverRectangleSvg implements UDriver { private final ClipContainer clipContainer; public DriverRectangleSvg(ClipContainer clipContainer) { this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, SvgGraphics svg) { final URectangle rect = (URectangle) ushape; final double rx = rect.getRx(); final double ry = rect.getRy(); double width = rect.getWidth(); double height = rect.getHeight(); final String color = StringUtils.getAsSvg(mapper, param.getColor()); final HtmlColor back = param.getBackcolor(); if (back instanceof HtmlColorGradient) { final HtmlColorGradient gr = (HtmlColorGradient) back; final String id = svg.createSvgGradient(StringUtils.getAsHtml(mapper.getMappedColor(gr.getColor1())), StringUtils.getAsHtml(mapper.getMappedColor(gr.getColor2())), gr.getPolicy()); svg.setFillColor("url(#" + id + ")"); svg.setStrokeColor(color); } else { final String backcolor = StringUtils.getAsSvg(mapper, back); svg.setFillColor(backcolor); svg.setStrokeColor(color); } svg.setStrokeWidth(param.getStroke().getThickness(), param.getStroke().getDasharraySvg()); final UClip clip = clipContainer.getClip(); if (clip != null) { final Rectangle2D.Double r = clip.getClippedRectangle(new Rectangle2D.Double(x, y, width, height)); x = r.x; y = r.y; width = r.width; height = r.height; if (height <= 0) { return; } } svg.svgRectangle(x, y, width, height, rx / 2, ry / 2, rect.getDeltaShadow(), rect.getComment()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/svg/DriverTextAsPathSvg.java000066400000000000000000000072031312650303100305410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.svg; import java.awt.font.FontRenderContext; import java.awt.font.TextLayout; import java.awt.geom.PathIterator; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UText; public class DriverTextAsPathSvg implements UDriver { private final FontRenderContext fontRenderContext; private final ClipContainer clipContainer; public DriverTextAsPathSvg(FontRenderContext fontRenderContext, ClipContainer clipContainer) { this.fontRenderContext = fontRenderContext; this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, SvgGraphics svg) { final UClip clip = clipContainer.getClip(); if (clip != null && clip.isInside(x, y) == false) { return; } final UText shape = (UText) ushape; final FontConfiguration fontConfiguration = shape.getFontConfiguration(); final UFont font = fontConfiguration.getFont(); final TextLayout t = new TextLayout(shape.getText(), font.getFont(), fontRenderContext); drawPathIterator(svg, x, y, t.getOutline(null).getPathIterator(null)); } static void drawPathIterator(SvgGraphics svg, double x, double y, PathIterator path) { svg.newpath(); final double coord[] = new double[6]; while (path.isDone() == false) { final int code = path.currentSegment(coord); if (code == PathIterator.SEG_MOVETO) { svg.moveto(coord[0] + x, coord[1] + y); } else if (code == PathIterator.SEG_LINETO) { svg.lineto(coord[0] + x, coord[1] + y); } else if (code == PathIterator.SEG_CLOSE) { svg.closepath(); } else if (code == PathIterator.SEG_CUBICTO) { svg.curveto(coord[0] + x, coord[1] + y, coord[2] + x, coord[3] + y, coord[4] + x, coord[5] + y); } else if (code == PathIterator.SEG_QUADTO) { svg.quadto(coord[0] + x, coord[1] + y, coord[2] + x, coord[3] + y); } else { throw new UnsupportedOperationException("code=" + code); } path.next(); } svg.fill(path.getWindingRule()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/svg/DriverTextSvg.java000066400000000000000000000112371312650303100274420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.svg; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontStyle; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UClip; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UFontContext; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UText; public class DriverTextSvg implements UDriver { private final StringBounder stringBounder; private final ClipContainer clipContainer; public DriverTextSvg(StringBounder stringBounder, ClipContainer clipContainer) { this.stringBounder = stringBounder; this.clipContainer = clipContainer; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, SvgGraphics svg) { final UClip clip = clipContainer.getClip(); if (clip != null && clip.isInside(x, y) == false) { return; } final UText shape = (UText) ushape; final FontConfiguration fontConfiguration = shape.getFontConfiguration(); final UFont font = fontConfiguration.getFont(); String fontWeight = null; if (fontConfiguration.containsStyle(FontStyle.BOLD) || font.isBold()) { fontWeight = "bold"; } String fontStyle = null; if (fontConfiguration.containsStyle(FontStyle.ITALIC) || font.isItalic()) { fontStyle = "italic"; } String textDecoration = null; if (fontConfiguration.containsStyle(FontStyle.UNDERLINE)) { textDecoration = "underline"; } else if (fontConfiguration.containsStyle(FontStyle.STRIKE)) { textDecoration = "line-through"; } String text = shape.getText(); if (text.startsWith(" ")) { final double space = stringBounder.calculateDimension(font, " ").getWidth(); while (text.startsWith(" ")) { x += space; text = text.substring(1); } } text = StringUtils.trin(text); final Dimension2D dim = stringBounder.calculateDimension(font, text); String backColor = null; final double width = dim.getWidth(); final double height = dim.getHeight(); if (fontConfiguration.containsStyle(FontStyle.BACKCOLOR)) { final HtmlColor back = fontConfiguration.getExtendedColor(); if (back instanceof HtmlColorGradient) { final HtmlColorGradient gr = (HtmlColorGradient) back; final String id = svg.createSvgGradient(StringUtils.getAsHtml(mapper.getMappedColor(gr.getColor1())), StringUtils.getAsHtml(mapper.getMappedColor(gr.getColor2())), gr.getPolicy()); svg.setFillColor("url(#" + id + ")"); svg.setStrokeColor(null); final double deltaPatch = 2; svg.svgRectangle(x, y - height + deltaPatch, width, height, 0, 0, 0, null); } else { backColor = StringUtils.getAsHtml(mapper.getMappedColor(back)); } } svg.setFillColor(StringUtils.getAsHtml(mapper.getMappedColor(fontConfiguration.getColor()))); svg.text(text, x, y, font.getFamily(UFontContext.SVG), font.getSize(), fontWeight, fontStyle, textDecoration, width, fontConfiguration.getAttributes(), backColor); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/svg/UGraphicSvg.java000066400000000000000000000147311312650303100270460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.svg; import java.awt.geom.Dimension2D; import java.io.IOException; import java.io.OutputStream; import javax.xml.transform.TransformerException; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.HtmlColorGradient; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.svg.SvgGraphics; import net.sourceforge.plantuml.ugraphic.AbstractCommonUGraphic; import net.sourceforge.plantuml.ugraphic.AbstractUGraphic; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; import net.sourceforge.plantuml.ugraphic.UComment; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic2; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UImageSvg; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UText; public class UGraphicSvg extends AbstractUGraphic implements ClipContainer, UGraphic2 { private final StringBounder stringBounder; private final boolean textAsPath2; private final String target; @Override protected AbstractCommonUGraphic copyUGraphic() { return new UGraphicSvg(this); } private UGraphicSvg(UGraphicSvg other) { super(other); this.stringBounder = other.stringBounder; this.textAsPath2 = other.textAsPath2; this.target = other.target; register(); } public UGraphicSvg(Dimension2D minDim, ColorMapper colorMapper, String backcolor, boolean textAsPath, double scale, String linkTarget, String hover, long seed) { this(minDim, colorMapper, new SvgGraphics(minDim, backcolor, scale, hover, seed), textAsPath, linkTarget); } public UGraphicSvg(Dimension2D minDim, ColorMapper colorMapper, boolean textAsPath, double scale, String linkTarget, String hover, long seed) { this(minDim, colorMapper, new SvgGraphics(minDim, scale, hover, seed), textAsPath, linkTarget); } public UGraphicSvg(Dimension2D minDim, ColorMapper mapper, HtmlColorGradient gr, boolean textAsPath, double scale, String linkTarget, String hover, long seed) { this(minDim, mapper, new SvgGraphics(minDim, scale, hover, seed), textAsPath, linkTarget); final SvgGraphics svg = getGraphicObject(); svg.paintBackcolorGradient(mapper, gr); } @Override protected boolean manageHiddenAutomatically() { return false; } @Override protected void beforeDraw() { getGraphicObject().setHidden(getParam().isHidden()); } @Override protected void afterDraw() { getGraphicObject().setHidden(false); } private UGraphicSvg(Dimension2D minDim, ColorMapper colorMapper, SvgGraphics svg, boolean textAsPath, String linkTarget) { super(colorMapper, svg); this.stringBounder = FileFormat.PNG.getDefaultStringBounder(); this.textAsPath2 = textAsPath; this.target = linkTarget; register(); } private void register() { registerDriver(URectangle.class, new DriverRectangleSvg(this)); if (textAsPath2) { registerDriver(UText.class, new DriverTextAsPathSvg(TextBlockUtils.getFontRenderContext(), this)); } else { registerDriver(UText.class, new DriverTextSvg(getStringBounder(), this)); } registerDriver(ULine.class, new DriverLineSvg(this)); registerDriver(UPolygon.class, new DriverPolygonSvg(this)); registerDriver(UEllipse.class, new DriverEllipseSvg(this)); registerDriver(UImage.class, new DriverImagePng(this)); registerDriver(UImageSvg.class, new DriverImageSvgSvg()); registerDriver(UPath.class, new DriverPathSvg(this)); registerDriver(DotPath.class, new DriverDotPathSvg()); registerDriver(UCenteredCharacter.class, new DriverCenteredCharacterSvg()); } public SvgGraphics getSvgGraphics() { return this.getGraphicObject(); } public StringBounder getStringBounder() { return stringBounder; } public void createXml(OutputStream os, String metadata) throws IOException { try { if (metadata != null) { getGraphicObject().addComment("\n" + metadata); } getGraphicObject().createXml(os); } catch (TransformerException e) { throw new IOException(e.toString()); } } public void startUrl(Url url) { getGraphicObject().openLink(url.getUrl(), url.getTooltip(), target); } public void closeAction() { getGraphicObject().closeLink(); } public void writeImageTOBEMOVED(OutputStream os, String metadata, int dpi) throws IOException { createXml(os, metadata); } @Override protected void drawComment(UComment comment) { getGraphicObject().addComment(comment.getComment()); } @Override public boolean matchesProperty(String propertyName) { if (propertyName.equalsIgnoreCase("SVG")) { return true; } return super.matchesProperty(propertyName); } // @Override // public String startHiddenGroup() { // getGraphicObject().startHiddenGroup(); // return null; // } // // @Override // public String closeHiddenGroup() { // getGraphicObject().closeHiddenGroup(); // return null; // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/tikz/000077500000000000000000000000001312650303100241755ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/tikz/DriverAtomTextTikz.java000066400000000000000000000035031312650303100306240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.tikz; import net.sourceforge.plantuml.creole.AtomText; import net.sourceforge.plantuml.tikz.TikzGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverAtomTextTikz implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, TikzGraphics tikz) { final AtomText text = (AtomText) shape; tikz.text(x, y, text.getText()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/tikz/DriverCenteredCharacterTikz.java000066400000000000000000000050501312650303100324240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.tikz; import java.awt.font.TextLayout; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.UnusedSpace; import net.sourceforge.plantuml.tikz.TikzGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverCenteredCharacterTikz implements UDriver { public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, TikzGraphics tikz) { final UCenteredCharacter centeredCharacter = (UCenteredCharacter) ushape; final char c = centeredCharacter.getChar(); final UFont font = centeredCharacter.getFont(); final UnusedSpace unusedSpace = UnusedSpace.getUnusedSpace(font, c); final double xpos = x - unusedSpace.getCenterX() - 0.5; final double ypos = y - unusedSpace.getCenterY() - 0.5; final TextLayout t = new TextLayout("" + c, font.getFont(), TextBlockUtils.getFontRenderContext()); tikz.setStrokeColor(mapper.getMappedColor(param.getColor())); tikz.drawPathIterator(xpos, ypos, t.getOutline(null).getPathIterator(null)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/tikz/DriverDotPathTikz.java000066400000000000000000000037301312650303100304240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.tikz; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.tikz.TikzGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverDotPathTikz implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, TikzGraphics tikz) { final DotPath path = (DotPath) shape; tikz.setStrokeColor(mapper.getMappedColor(param.getColor())); tikz.setStrokeWidth(param.getStroke().getThickness(), param.getStroke().getDashTikz()); tikz.upath(x, y, path.toUPath()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/tikz/DriverEllipseTikz.java000066400000000000000000000057001312650303100304550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.tikz; import net.sourceforge.plantuml.tikz.TikzGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverEllipseTikz implements UDriver { public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, TikzGraphics tikz) { final UEllipse shape = (UEllipse) ushape; final double width = shape.getWidth(); final double height = shape.getHeight(); double start = shape.getStart(); final double extend = shape.getExtend(); final double cx = x + width / 2; final double cy = y + height / 2; tikz.setFillColor(mapper.getMappedColor(param.getBackcolor())); tikz.setStrokeColor(mapper.getMappedColor(param.getColor())); tikz.setStrokeWidth(param.getStroke().getThickness(), param.getStroke().getDashTikz()); if (start == 0 && extend == 0) { tikz.ellipse(cx, cy, width / 2, height / 2); } else { throw new UnsupportedOperationException(); // // http://www.itk.ilstu.edu/faculty/javila/SVG/SVG_drawing1/elliptical_curve.htm // start = start + 90; // final double x1 = cx + Math.sin(start * Math.PI / 180.) * width / 2; // final double y1 = cy + Math.cos(start * Math.PI / 180.) * height / 2; // final double x2 = cx + Math.sin((start + extend) * Math.PI / 180.) * width / 2; // final double y2 = cy + Math.cos((start + extend) * Math.PI / 180.) * height / 2; // // svg.svgEllipse(x1, y1, 1, 1, 0); // // svg.svgEllipse(x2, y2, 1, 1, 0); // svg.svgArcEllipse(width / 2, height / 2, x1, y1, x2, y2); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/tikz/DriverLineTikz.java000066400000000000000000000040111312650303100277410ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.tikz; import net.sourceforge.plantuml.tikz.TikzGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverLineTikz implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, TikzGraphics tikz) { final ULine line = (ULine) shape; double x2 = x + line.getDX(); double y2 = y + line.getDY(); tikz.setStrokeColor(mapper.getMappedColor(param.getColor())); tikz.setStrokeWidth(param.getStroke().getThickness(), param.getStroke().getDashTikz()); tikz.line(x, y, x2, y2); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/tikz/DriverNoneTikz.java000066400000000000000000000033011312650303100277520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.tikz; import net.sourceforge.plantuml.tikz.TikzGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverNoneTikz implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, TikzGraphics object) { } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/tikz/DriverPolygonTikz.java000066400000000000000000000041111312650303100305020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.tikz; import net.sourceforge.plantuml.tikz.TikzGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverPolygonTikz implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, TikzGraphics tikz) { final UPolygon poly = (UPolygon) shape; final double points[] = poly.getPointArray(x, y); tikz.setFillColor(mapper.getMappedColor(param.getBackcolor())); tikz.setStrokeColor(mapper.getMappedColor(param.getColor())); tikz.setStrokeWidth(param.getStroke().getThickness(), param.getStroke().getDashTikz()); tikz.polygon(points); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/tikz/DriverRectangleTikz.java000066400000000000000000000045241312650303100307670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.tikz; import net.sourceforge.plantuml.tikz.TikzGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.utils.MathUtils; public class DriverRectangleTikz implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, TikzGraphics tikz) { final URectangle rect = (URectangle) shape; final double width = rect.getWidth(); final double height = rect.getHeight(); final double r = MathUtils.min(rect.getRx(), rect.getRy(), width / 2, height / 2); tikz.setFillColor(mapper.getMappedColor(param.getBackcolor())); tikz.setStrokeColor(mapper.getMappedColor(param.getColor())); tikz.setStrokeWidth(param.getStroke().getThickness(), param.getStroke().getDashTikz()); if (r == 0) { tikz.rectangle(x, y, width, height); } else { tikz.rectangleRound(x, y, width, height, r); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/tikz/DriverUPathTikz.java000066400000000000000000000037101312650303100301000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.tikz; import net.sourceforge.plantuml.tikz.TikzGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverUPathTikz implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, TikzGraphics tikz) { final UPath path = (UPath) shape; tikz.setStrokeColor(mapper.getMappedColor(param.getColor())); tikz.setStrokeWidth(param.getStroke().getThickness(), param.getStroke().getDashTikz()); tikz.upath(x, y, path); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/tikz/DriverUTextTikz.java000066400000000000000000000034711312650303100301340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.tikz; import net.sourceforge.plantuml.tikz.TikzGraphics; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UText; public class DriverUTextTikz implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, TikzGraphics tikz) { final UText text = (UText) shape; tikz.text(x, y, text.getText()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/tikz/UGraphicTikz.java000066400000000000000000000104431312650303100274060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.tikz; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.creole.AtomText; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.tikz.TikzGraphics; import net.sourceforge.plantuml.ugraphic.AbstractCommonUGraphic; import net.sourceforge.plantuml.ugraphic.AbstractUGraphic; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic2; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UImageSvg; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UText; public class UGraphicTikz extends AbstractUGraphic implements ClipContainer, UGraphic2 { private final StringBounder stringBounder; private UGraphicTikz(ColorMapper colorMapper, TikzGraphics tikz) { super(colorMapper, tikz); this.stringBounder = FileFormat.PNG.getDefaultStringBounder(); register(); } public UGraphicTikz(ColorMapper colorMapper, double scale, boolean withPreamble) { this(colorMapper, new TikzGraphics(scale, withPreamble)); } @Override protected AbstractCommonUGraphic copyUGraphic() { return new UGraphicTikz(this); } private UGraphicTikz(UGraphicTikz other) { super(other); this.stringBounder = other.stringBounder; register(); } private void register() { registerDriver(URectangle.class, new DriverRectangleTikz()); registerDriver(UText.class, new DriverUTextTikz()); registerDriver(AtomText.class, new DriverAtomTextTikz()); registerDriver(ULine.class, new DriverLineTikz()); registerDriver(UPolygon.class, new DriverPolygonTikz()); registerDriver(UEllipse.class, new DriverEllipseTikz()); registerDriver(UImage.class, new DriverNoneTikz()); registerDriver(UImageSvg.class, new DriverNoneTikz()); registerDriver(UPath.class, new DriverUPathTikz()); registerDriver(DotPath.class, new DriverDotPathTikz()); registerDriver(UCenteredCharacter.class, new DriverCenteredCharacterTikz()); } public StringBounder getStringBounder() { return stringBounder; } public void startUrl(Url url) { getGraphicObject().openLink(url.getUrl(), url.getTooltip()); } public void closeAction() { getGraphicObject().closeLink(); } public void writeImageTOBEMOVED(OutputStream os, String metadata, int dpi) throws IOException { createTikz(os); } public void createTikz(OutputStream os) throws IOException { getGraphicObject().createData(os); } @Override public boolean matchesProperty(String propertyName) { if ("SPECIALTXT".equalsIgnoreCase(propertyName)) { return true; } return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/txt/000077500000000000000000000000001312650303100240335ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/txt/UGraphicTxt.java000066400000000000000000000067461312650303100271150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.txt; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.asciiart.TextStringBounder; import net.sourceforge.plantuml.asciiart.TranslatedCharArea; import net.sourceforge.plantuml.asciiart.UmlCharArea; import net.sourceforge.plantuml.asciiart.UmlCharAreaImpl; import net.sourceforge.plantuml.graphic.FontStyle; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.AbstractCommonUGraphic; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UText; public class UGraphicTxt extends AbstractCommonUGraphic implements ClipContainer { private final UmlCharArea charArea; @Override protected AbstractCommonUGraphic copyUGraphic() { return new UGraphicTxt(this); } private UGraphicTxt(UGraphicTxt other) { super(other); this.charArea = other.charArea; } public UGraphicTxt() { super(new ColorMapperIdentity()); this.charArea = new UmlCharAreaImpl(); } public StringBounder getStringBounder() { return new TextStringBounder(); } public void draw(UShape shape) { // final UClip clip = getClip(); if (shape instanceof UText) { final UText txt = (UText) shape; final int y = ((int) (getTranslateY() + txt.getDescent())) / 10; if (txt.getFontConfiguration().containsStyle(FontStyle.WAVE)) { charArea.drawHLine('^', y, getDx(), txt.getText().length()); charArea.drawStringLR(txt.getText(), 0, y + 1); } else { charArea.drawStringLR(txt.getText(), 0, y); } return; } else if (shape instanceof UImage) { return; } throw new UnsupportedOperationException("cl=" + shape.getClass()); } public final UmlCharArea getCharArea() { return new TranslatedCharArea(charArea, getDx(), getDy()); } private int getDy() { return (int) getTranslateY(); } private int getDx() { return (int) getTranslateX(); } public void startUrl(Url url) { } public void closeAction() { } public Dimension2D getDimension() { return new Dimension2DDouble(0, 0); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/visio/000077500000000000000000000000001312650303100243455ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/visio/DriverDotPathVdx.java000066400000000000000000000034171312650303100304160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.visio; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverDotPathVdx implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, VisioGraphics visio) { final DotPath path = (DotPath) shape; visio.upath(x, y, path.toUPath()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/visio/DriverLineVdx.java000066400000000000000000000035161312650303100277420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.visio; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverLineVdx implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, VisioGraphics visio) { final ULine line = (ULine) shape; final double dx = line.getDX(); final double dy = line.getDY(); visio.line(x, y, x + dx, y + dy); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/visio/DriverNoneVdx.java000066400000000000000000000032201312650303100277420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.visio; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverNoneVdx implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, VisioGraphics object) { } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/visio/DriverPolygonVdx.java000066400000000000000000000034261312650303100305020ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.visio; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverPolygonVdx implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, VisioGraphics visio) { final UPolygon poly = (UPolygon) shape; visio.polygon(poly.translate(x, y)); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/visio/DriverRectangleVdx.java000066400000000000000000000035641312650303100307620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.visio; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverRectangleVdx implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, VisioGraphics visio) { final URectangle rect = (URectangle) shape; final double width = rect.getWidth(); final double height = rect.getHeight(); visio.rectangle(x, y, width, height); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/visio/DriverTextVdx.java000066400000000000000000000054301312650303100277740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.visio; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UFontContext; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UText; public class DriverTextVdx implements UDriver { private final StringBounder stringBounder; public DriverTextVdx(StringBounder stringBounder) { this.stringBounder = stringBounder; } public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, VisioGraphics visio) { final UText shape = (UText) ushape; Thread.dumpStack(); final FontConfiguration fontConfiguration = shape.getFontConfiguration(); final UFont font = fontConfiguration.getFont(); String text = shape.getText(); if (text.startsWith(" ")) { final double space = stringBounder.calculateDimension(font, " ").getWidth(); while (text.startsWith(" ")) { x += space; text = text.substring(1); } } text = StringUtils.trin(text); final Dimension2D dim = stringBounder.calculateDimension(font, text); visio.text(text, x, y, font.getFamily(UFontContext.SVG), font.getSize(), dim.getWidth(), dim.getHeight(), fontConfiguration.getAttributes()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/visio/DriverUPathVdx.java000066400000000000000000000034011312650303100300650ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.visio; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UDriver; import net.sourceforge.plantuml.ugraphic.UParam; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UShape; public class DriverUPathVdx implements UDriver { public void draw(UShape shape, double x, double y, ColorMapper mapper, UParam param, VisioGraphics visio) { final UPath path = (UPath) shape; visio.upath(x, y, path); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/visio/UGraphicVdx.java000066400000000000000000000101021312650303100273660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.ugraphic.visio; import java.io.IOException; import java.io.OutputStream; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.creole.AtomText; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.posimo.DotPath; import net.sourceforge.plantuml.ugraphic.AbstractCommonUGraphic; import net.sourceforge.plantuml.ugraphic.AbstractUGraphic; import net.sourceforge.plantuml.ugraphic.ClipContainer; import net.sourceforge.plantuml.ugraphic.ColorMapper; import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; import net.sourceforge.plantuml.ugraphic.UEllipse; import net.sourceforge.plantuml.ugraphic.UGraphic2; import net.sourceforge.plantuml.ugraphic.UImage; import net.sourceforge.plantuml.ugraphic.UImageSvg; import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UText; public class UGraphicVdx extends AbstractUGraphic implements ClipContainer, UGraphic2 { private final StringBounder stringBounder; private UGraphicVdx(ColorMapper colorMapper, VisioGraphics visio) { super(colorMapper, visio); this.stringBounder = FileFormat.PNG.getDefaultStringBounder(); register(); } public UGraphicVdx(ColorMapper colorMapper) { this(colorMapper, new VisioGraphics()); } @Override protected AbstractCommonUGraphic copyUGraphic() { return new UGraphicVdx(this); } private UGraphicVdx(UGraphicVdx other) { super(other); this.stringBounder = other.stringBounder; register(); } private void register() { registerDriver(URectangle.class, new DriverRectangleVdx()); registerDriver(UText.class, new DriverTextVdx(stringBounder)); registerDriver(AtomText.class, new DriverNoneVdx()); registerDriver(ULine.class, new DriverLineVdx()); registerDriver(UPolygon.class, new DriverPolygonVdx()); registerDriver(UEllipse.class, new DriverNoneVdx()); registerDriver(UImage.class, new DriverNoneVdx()); registerDriver(UImageSvg.class, new DriverNoneVdx()); registerDriver(UPath.class, new DriverUPathVdx()); registerDriver(DotPath.class, new DriverDotPathVdx()); registerDriver(UCenteredCharacter.class, new DriverNoneVdx()); } public StringBounder getStringBounder() { return stringBounder; } public void startUrl(Url url) { } public void closeAction() { } public void writeImageTOBEMOVED(OutputStream os, String metadata, int dpi) throws IOException { createVsd(os); } public void createVsd(OutputStream os) throws IOException { getGraphicObject().createVsd(os); } @Override public boolean matchesProperty(String propertyName) { if ("SPECIALTXT".equalsIgnoreCase(propertyName)) { return true; } return false; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/visio/VisioGraphics.java000066400000000000000000000142221312650303100277630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.visio; import java.awt.geom.Point2D; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.golem.MinMaxDouble; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.USegment; import net.sourceforge.plantuml.ugraphic.USegmentType; public class VisioGraphics { private final List shapes = new ArrayList(); private final MinMaxDouble limits = new MinMaxDouble(); public void createVsd(OutputStream os) throws IOException { final double width = toInches(limits.getMaxX()); final double height = toInches(limits.getMaxY()); out(os, ""); out(os, ""); out(os, ""); out(os, "PlantUML"); out(os, ""); out(os, ""); out(os, ""); out(os, ""); out(os, ""); out(os, ""); out(os, ""); out(os, ""); out(os, "" + width + ""); out(os, "" + height + ""); out(os, "1"); out(os, "2"); // change for scale out(os, "3"); out(os, "0"); out(os, "0"); out(os, ""); out(os, ""); out(os, ""); for (VisioShape sh : shapes) { sh.yReverse(height).print(os); // sh.print(os); } out(os, ""); out(os, ""); out(os, ""); out(os, ""); } private void out(OutputStream os, String s) throws IOException { os.write(s.getBytes()); os.write("\n".getBytes()); } private double toInches(double val) { return val / 72.0; } private void ensureVisible(double x, double y) { limits.manage(x, y); } public void rectangle(double x, double y, double width, double height) { ensureVisible(x, y); ensureVisible(x + width, y + height); final VisioRectangle rect = VisioRectangle.createInches(shapes.size() + 1, x, y, width, height); shapes.add(rect); } public void text(String text, double x, double y, String family, int fontSize, double width, double height, Map attributes) { // System.err.println("x=" + x); // System.err.println("y=" + y); // System.err.println("text=" + text); // System.err.println("family=" + family); // System.err.println("fontSize=" + fontSize); // System.err.println("width=" + width); // System.err.println("attributes=" + attributes); ensureVisible(x, y); final VisioText txt = VisioText.createInches(shapes.size() + 1, text, fontSize, x, y, width, height); shapes.add(txt); } public void line(double x1, double y1, double x2, double y2) { ensureVisible(x1, y1); if (x1 == x2 && y1 == y2) { return; } ensureVisible(x2, y2); final VisioLine line = VisioLine.createInches(shapes.size() + 1, x1, y1, x2, y2); shapes.add(line); } private void line(Point2D p1, Point2D p2) { line(p1.getX(), p1.getY(), p2.getX(), p2.getY()); } public void upath(final double x, final double y, UPath path) { double lx = x; double ly = y; for (USegment seg : path) { final USegmentType type = seg.getSegmentType(); final double coord[] = seg.getCoord(); if (type == USegmentType.SEG_MOVETO) { lx = coord[0] + x; ly = coord[1] + y; } else if (type == USegmentType.SEG_LINETO) { line(lx, ly, coord[0] + x, coord[1] + y); lx = coord[0] + x; ly = coord[1] + y; } else if (type == USegmentType.SEG_QUADTO) { line(lx, ly, coord[2] + x, coord[3] + y); lx = coord[2] + x; ly = coord[3] + y; } else if (type == USegmentType.SEG_CUBICTO) { line(lx, ly, coord[4] + x, coord[5] + y); // linePoint(lx, ly, coord[0] + x, coord[1] + y); // linePoint(coord[0] + x, coord[1] + y, coord[2] + x, coord[3] + y); // linePoint(coord[2] + x, coord[3] + y, coord[4] + x, coord[5] + y); lx = coord[4] + x; ly = coord[5] + y; } else if (type == USegmentType.SEG_CLOSE) { // Nothing } else { Log.println("unknown " + seg); } } } public void polygon(UPolygon poly) { Point2D last = null; for (Point2D pt : poly.getPoints()) { if (last != null) { line(last, pt); } last = pt; } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/visio/VisioLine.java000066400000000000000000000073631312650303100271220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.visio; import java.io.IOException; import java.io.OutputStream; public class VisioLine implements VisioShape { private final int id; private final double x1; private final double y1; private final double x2; private final double y2; public static VisioLine createInches(int id, double x1, double y1, double x2, double y2) { return new VisioLine(id, toInches(x1), toInches(y1), toInches(x2), toInches(y2)); } private VisioLine(int id, double x1, double y1, double x2, double y2) { if (x1 < 0 || y1 < 0 || x2 < 0 || y2 < 0) { throw new IllegalArgumentException(); } this.id = id; this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; } public VisioShape yReverse(double maxY) { return new VisioLine(id, x1, maxY - y1, x2, maxY - y2); } private static double toInches(double val) { return val / 72.0; } public void print(OutputStream os) throws IOException { out(os, ""); out(os, ""); final double ddx = x2 - x1; final double ddy = y2 - y1; out(os, "" + ((x1 + x2) / 2) + ""); out(os, "" + ((y1 + y2) / 2) + ""); final double len = Math.sqrt(ddx * ddx + ddy * ddy); out(os, "" + len + ""); out(os, "0"); out(os, "" + (len / 2) + ""); out(os, "0"); final double atan2 = Math.atan2(ddy, ddx); out(os, "" + atan2 + ""); out(os, "0"); out(os, "0"); out(os, "0"); out(os, ""); out(os, ""); out(os, "" + x1 + ""); out(os, "" + y1 + ""); out(os, "" + x2 + ""); out(os, "" + y2 + ""); out(os, ""); out(os, ""); out(os, "1"); out(os, "0"); out(os, "0"); out(os, "0"); out(os, ""); out(os, "0"); out(os, "0"); out(os, ""); out(os, ""); out(os, "" + len + ""); out(os, "0"); out(os, ""); out(os, ""); out(os, ""); } private void out(OutputStream os, String s) throws IOException { os.write(s.getBytes()); os.write("\n".getBytes()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/visio/VisioRectangle.java000066400000000000000000000075261312650303100301400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.visio; import java.io.IOException; import java.io.OutputStream; public class VisioRectangle implements VisioShape { private final int id; private final double x; private final double y; private final double width; private final double height; public static VisioRectangle createInches(int id, double x, double y, double width, double height) { return new VisioRectangle(id, toInches(x), toInches(y), toInches(width), toInches(height)); } private VisioRectangle(int id, double x, double y, double width, double height) { if (x < 0 || y < 0 || width < 0 || height < 0) { // throw new IllegalArgumentException(); } this.id = id; this.x = x; this.y = y; this.width = width; this.height = height; } public VisioShape yReverse(double maxY) { final double y2 = maxY - (y + height); return new VisioRectangle(id, x, y2, width, height); } private static double toInches(double val) { return val / 72.0; } public void print(OutputStream os) throws IOException { out(os, ""); out(os, ""); out(os, "" + (x + width / 2) + ""); out(os, "" + (y + height / 2) + ""); out(os, "" + width + ""); out(os, "" + height + ""); // out(os, "" + (x + width / 2) + ""); // out(os, "" + (y + height / 2) + ""); out(os, "0"); out(os, "0"); out(os, "0"); out(os, "0"); out(os, ""); out(os, ""); out(os, "0"); out(os, "0"); out(os, "0"); out(os, "0"); out(os, ""); out(os, "0"); out(os, "0"); out(os, ""); out(os, ""); out(os, "" + width + ""); out(os, "0"); out(os, ""); out(os, ""); out(os, "" + width + ""); out(os, "" + height + ""); out(os, ""); out(os, ""); out(os, "0"); out(os, "" + height + ""); out(os, ""); out(os, ""); out(os, "0"); out(os, "0"); out(os, ""); out(os, ""); out(os, ""); } private void out(OutputStream os, String s) throws IOException { os.write(s.getBytes()); os.write("\n".getBytes()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/visio/VisioShape.java000066400000000000000000000027241312650303100272670ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.visio; import java.io.IOException; import java.io.OutputStream; public interface VisioShape { public void print(OutputStream os) throws IOException; public VisioShape yReverse(double maxY); } plantuml-1.2017.15/src/net/sourceforge/plantuml/ugraphic/visio/VisioText.java000066400000000000000000000101311312650303100271420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic.visio; import java.io.IOException; import java.io.OutputStream; public class VisioText implements VisioShape { private final int id; private final String text; private final int fontSize; private final double x; private final double y; private final double width; private final double height; private final double coefFont = 150.0; public static VisioText createInches(int id, String text, int fontSize, double x, double y, double width, double height) { final double coef = 1.8; return new VisioText(id, text, fontSize, toInches(x), toInches(y + 2.5), toInches(width * coef), toInches(height * coef)); } private static double toInches(double val) { return val / 72.0; } private VisioText(int id, String text, int fontSize, double x, double y, double width, double height) { this.id = id; this.text = text; this.x = x; this.y = y; this.height = height; this.width = width; this.fontSize = fontSize; } public void print(OutputStream os) throws IOException { out(os, ""); out(os, ""); out(os, "" + x + ""); out(os, "" + y + ""); out(os, "" + width + ""); out(os, "" + height + ""); // out(os, "1.0625"); // out(os, "1.9375"); out(os, "0"); out(os, "0"); out(os, "0"); out(os, "0"); out(os, "0"); out(os, "0"); out(os, ""); out(os, ""); out(os, "0"); out(os, ""); out(os, ""); out(os, "0"); out(os, "0"); out(os, ""); out(os, "0"); out(os, "0"); out(os, "1"); out(os, "0"); out(os, "" + fontSize / coefFont + ""); out(os, "0"); out(os, "0"); out(os, "0"); out(os, "0"); out(os, "0"); out(os, "0"); out(os, ""); out(os, ""); out(os, "0"); out(os, ""); out(os, "" + text + ""); out(os, ""); } public VisioShape yReverse(double maxY) { final double y2 = maxY - y; return new VisioText(id, text, fontSize, x, y2, width, height); } private void out(OutputStream os, String s) throws IOException { os.write(s.getBytes()); os.write("\n".getBytes()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/utils/000077500000000000000000000000001312650303100225525ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/utils/CharHidder.java000066400000000000000000000052121312650303100254120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.utils; public class CharHidder { public static String addTileAtBegin(String s) { return "~" + s; } public static String hide(String s) { // System.err.println("hide " + s); final StringBuilder result = new StringBuilder(); for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); if (c == '~' && i + 1 < s.length()) { i++; final char c2 = s.charAt(i); if (isToBeHidden(c2)) { result.append(hideChar(c2)); } else { result.append(c); result.append(c2); } } else { result.append(c); } } // System.err.println("---> " + result); return result.toString(); } private static boolean isToBeHidden(final char c) { if (c == '_' || c == '-' || c == '\"' || c == '#' || c == ']' || c == '[' || c == '*' || c == '.' || c == '/' || c == '<') { return true; } return false; } private static char hideChar(char c) { if (c > 255) { throw new IllegalArgumentException(); } return (char) ('\uE000' + c); } private static char unhideChar(char c) { if (c >= '\uE000' && c <= '\uE0FF') { return (char) (c - '\uE000'); } return c; } public static String unhide(String s) { final StringBuilder result = new StringBuilder(); for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); result.append(unhideChar(c)); } // System.err.println("unhide " + result); return result.toString(); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/utils/MathUtils.java000066400000000000000000000046001312650303100253270ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.utils; public class MathUtils { public static double max(double a, double b) { return Math.max(a, b); } public static double max(double a, double b, double c) { return max(max(a, b), c); } public static double max(double a, double b, double c, double d) { return max(max(a, b), max(c, d)); } public static double max(double a, double b, double c, double d, double e) { return max(max(a, b, c), max(d, e)); } public static double min(double a, double b) { return Math.min(a, b); } public static double min(double a, double b, double c) { return min(min(a, b), c); } public static double min(double a, double b, double c, double d) { return min(min(a, b), min(c, d)); } public static double min(double a, double b, double c, double d, double e) { return min(min(a, b, c), min(d, e)); } public static double limitation(double v, double min, double max) { if (min >= max) { // assert false : "min="+min+" max="+max+" v="+v; return v; // throw new IllegalArgumentException("min="+min+" max="+max+" v="+v); } if (v < min) { return min; } if (v > max) { return max; } return v; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/utils/StartUtils.java000066400000000000000000000076661312650303100255520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.utils; import net.sourceforge.plantuml.CharSequence2; import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.command.regex.Matcher2; import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; import net.sourceforge.plantuml.core.DiagramType; public class StartUtils { public static final Pattern2 patternFilename = MyPattern .cmpile("^[@\\\\]start[^%s{}%g]+[%s{][%s%g]*([^%g]*?)[%s}%g]*$"); public static final String PAUSE_PATTERN = "(?i)((?:\\W|\\<[^<>]*\\>)*)[@\\\\]unpause"; public static final String START_PATTERN = "(?i)((?:[^\\w~]|\\<[^<>]*\\>)*)[@\\\\]start"; public static String beforeStartUml(final CharSequence2 result) { boolean inside = false; for (int i = 0; i < result.length(); i++) { final CharSequence2 tmp = result.subSequence(i, result.length()); if (startsWithSymbolAnd("start", tmp)) { return result.subSequence(0, i).toString(); } final String single = result.subSequence(i, i + 1).toString(); if (inside) { if (single.equals(">")) { inside = false; } continue; } if (single.equals("<")) { inside = true; } else if (single.matches("[\\w~]")) { return null; } } return null; // final Matcher m = MyPattern.cmpile(START_PATTERN).matcher(result); // if (m.find()) { // return m.group(1); // } // return null; } public static boolean isArobaseStartDiagram(CharSequence s) { final String s2 = StringUtils.trinNoTrace(s); return DiagramType.getTypeFromArobaseStart(s2) != DiagramType.UNKNOWN; } public static boolean startsWithSymbolAnd(String value, final CharSequence2 tmp) { return tmp.startsWith("@" + value) || tmp.startsWith("\\" + value); } public static boolean startsWithSymbolAnd(String value, final String tmp) { return tmp.startsWith("@" + value) || tmp.startsWith("\\" + value); } public static boolean isArobaseEndDiagram(CharSequence s) { final String s2 = StringUtils.trinNoTrace(s); return startsWithSymbolAnd("end", s2); } public static boolean isArobasePauseDiagram(CharSequence s) { final String s2 = StringUtils.trinNoTrace(s); return startsWithSymbolAnd("pause", s2); } public static boolean isArobaseUnpauseDiagram(CharSequence s) { final String s2 = StringUtils.trinNoTrace(s); return startsWithSymbolAnd("unpause", s2); } private static final Pattern2 append = MyPattern.cmpile("^\\W*[@\\\\]append"); public static CharSequence2 getPossibleAppend(CharSequence2 s) { final Matcher2 m = append.matcher(s); if (m.find()) { return s.subSequence(m.group(0).length(), s.length()).trin(); // return StringUtils.trin(s.toString().substring(m.group(0).length())); } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/utils/UniqueSequence.java000066400000000000000000000032341312650303100263560ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.utils; import java.util.concurrent.atomic.AtomicInteger; import net.sourceforge.plantuml.cucadiagram.Code; public class UniqueSequence { private static final AtomicInteger cpt = new AtomicInteger(1); public static void reset() { cpt.set(0); } public static int getValue() { return cpt.addAndGet(1); } public static Code getCode(String prefix) { return Code.of(prefix + getValue()); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/version/000077500000000000000000000000001312650303100230775ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/version/IteratorCounter2.java000066400000000000000000000030431312650303100271550ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.version; import java.util.Iterator; import net.sourceforge.plantuml.CharSequence2; public interface IteratorCounter2 extends Iterator { public int currentNum(); public IteratorCounter2 cloneMe(); public CharSequence2 peek(); public CharSequence2 peekPrevious(); } plantuml-1.2017.15/src/net/sourceforge/plantuml/version/IteratorCounter2Impl.java000066400000000000000000000041571312650303100300060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.version; import java.util.List; import net.sourceforge.plantuml.CharSequence2; public class IteratorCounter2Impl implements IteratorCounter2 { private final List data; private int nb; public IteratorCounter2Impl(List data) { this(data, 0); } private IteratorCounter2Impl(List data, int nb) { this.data = data; this.nb = nb; } public int currentNum() { return nb; } public boolean hasNext() { return nb < data.size(); } public CharSequence2 next() { return data.get(nb++); } public CharSequence2 peek() { return data.get(nb); } public CharSequence2 peekPrevious() { if (nb == 0) { return null; } return data.get(nb - 1); } public void remove() { throw new UnsupportedOperationException(); } public IteratorCounter2 cloneMe() { return new IteratorCounter2Impl(data, nb); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/version/License.java000066400000000000000000000576261312650303100253440ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.version; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.OptionFlags; public enum License { GPL, GPLV2, LGPL, APACHE, EPL, MIT, BSD; public static License getCurrent() { return GPL; } private void addMit(final List text) { text.add("PlantUML is free software; you can redistribute it and/or modify it"); text.add("under the terms of the MIT License."); text.add(""); text.add("See http://opensource.org/licenses/MIT"); text.add(""); text.add("Permission is hereby granted, free of charge, to any person obtaining"); text.add("a copy of this software and associated documentation files (the \"Software\"),"); text.add("to deal in the Software without restriction, including without limitation"); text.add("the rights to use, copy, modify, merge, publish, distribute, sublicense,"); text.add("and/or sell copies of the Software, and to permit persons to whom the"); text.add("Software is furnished to do so, subject to the following conditions:"); text.add(""); text.add("The above copyright notice and this permission notice shall be included"); text.add("in all copies or substantial portions of the Software."); text.add(""); text.add("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS"); text.add("OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,"); text.add("FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE"); text.add("AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,"); text.add("WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR"); text.add("IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."); text.add(""); addSupplementary(text); text.add("the MIT License."); text.add(""); text.add("The generated images can then be used without any reference to the MIT License."); text.add("It is not even necessary to stipulate that they have been generated with PlantUML,"); text.add("also this will be appreciate by PlantUML team."); text.add(""); text.add("There is an exception : if the textual description in PlantUML language is also covered"); text.add("by a license (like the MIT), then the generated images are logically covered"); text.add("by the very same license."); } private void addEpl(final List text) { text.add("PlantUML is free software; you can redistribute it and/or modify it"); text.add("under the terms of the Eclipse Public License."); text.add(""); text.add("THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC"); text.add("LICENSE (\"AGREEMENT\"). [Eclipse Public License - v 1.0]"); text.add(""); text.add("ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES"); text.add("RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT."); text.add(""); text.add("You may obtain a copy of the License at"); text.add(""); text.add("http://www.eclipse.org/legal/epl-v10.html"); text.add(""); text.add("Unless required by applicable law or agreed to in writing, software"); text.add("distributed under the License is distributed on an \"AS IS\" BASIS,"); text.add("WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied."); text.add("See the License for the specific language governing permissions and"); text.add("limitations under the License."); text.add(""); addSupplementary(text); text.add("the Eclipse Public License."); text.add(""); text.add("The generated images can then be used without any reference to the Eclipse Public License."); text.add("It is not even necessary to stipulate that they have been generated with PlantUML,"); text.add("also this will be appreciate by PlantUML team."); text.add(""); text.add("There is an exception : if the textual description in PlantUML language is also covered"); text.add("by a license (like the EPL), then the generated images are logically covered"); text.add("by the very same license."); } private void addBsd(final List text) { text.add("PlantUML is free software; you can redistribute it and/or modify it"); text.add("under the terms of the Revised BSD License."); text.add(""); text.add("All rights reserved."); text.add("Redistribution and use in source and binary forms, with or without"); text.add("modification, are permitted provided that the following conditions are met:"); text.add(""); text.add("* Redistributions of source code must retain the above copyright"); text.add(" notice, this list of conditions and the following disclaimer."); text.add("* Redistributions in binary form must reproduce the above copyright"); text.add(" notice, this list of conditions and the following disclaimer in the"); text.add(" documentation and/or other materials provided with the distribution."); text.add("* Neither the name of the University of California, Berkeley nor the"); text.add(" names of its contributors may be used to endorse or promote products"); text.add(" derived from this software without specific prior written permission."); text.add(""); text.add("THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY"); text.add("EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED"); text.add("WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE"); text.add("DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY"); text.add("DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES"); text.add("(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;"); text.add("LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND"); text.add("ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT"); text.add("(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS"); text.add("SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."); text.add(""); addSupplementary(text); text.add("the Eclipse Public License."); text.add(""); text.add("The generated images can then be used without any reference to the Eclipse Public License."); text.add("It is not even necessary to stipulate that they have been generated with PlantUML,"); text.add("also this will be appreciate by PlantUML team."); text.add(""); text.add("There is an exception : if the textual description in PlantUML language is also covered"); text.add("by a license (like the BSD), then the generated images are logically covered"); text.add("by the very same license."); } private void addApache(final List text) { text.add("PlantUML is free software; you can redistribute it and/or modify it"); text.add("under the terms of the Apache Software License."); text.add(""); text.add("Licensed under the Apache License, Version 2.0 (the \"License\");"); text.add("you may not use this file except in compliance with the License."); text.add("You may obtain a copy of the License at"); text.add(""); text.add("http://www.apache.org/licenses/LICENSE-2.0"); text.add(""); text.add("Unless required by applicable law or agreed to in writing, software"); text.add("distributed under the License is distributed on an \"AS IS\" BASIS,"); text.add("WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied."); text.add("See the License for the specific language governing permissions and"); text.add("limitations under the License."); text.add(""); addSupplementary(text); text.add("the Apache license."); text.add(""); text.add("The generated images can then be used without any reference to the Apache license."); text.add("It is not even necessary to stipulate that they have been generated with PlantUML,"); text.add("also this will be appreciate by PlantUML team."); text.add(""); text.add("There is an exception : if the textual description in PlantUML language is also covered"); text.add("by a license (like the Apache), then the generated images are logically covered"); text.add("by the very same license."); } private void addGpl(final List text) { text.add("PlantUML is free software; you can redistribute it and/or modify it"); text.add("under the terms of the GNU General Public License as published by"); text.add("the Free Software Foundation, either version 3 of the License, or"); text.add("(at your option) any later version."); text.add(""); text.add("PlantUML distributed in the hope that it will be useful, but"); text.add("WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY"); text.add("or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public"); text.add("License for more details."); text.add(""); text.add("You should have received a copy of the GNU General Public"); text.add("License along with this library; if not, write to the Free Software"); text.add("Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,"); text.add("USA."); text.add(""); addSupplementary(text); text.add("the GPL license."); text.add(""); text.add("The generated images can then be used without any reference to the GPL license."); text.add("It is not even necessary to stipulate that they have been generated with PlantUML,"); text.add("also this will be appreciate by PlantUML team."); text.add(""); text.add("There is an exception : if the textual description in PlantUML language is also covered"); text.add("by a license (like the GPL), then the generated images are logically covered"); text.add("by the very same license."); } private void addGplV2(final List text) { text.add("PlantUML is free software; you can redistribute it and/or modify it"); text.add("under the terms of the GNU General Public License as published by"); text.add("the Free Software Foundation, either version 2 of the License, or"); text.add("(at your option) any later version."); text.add(""); text.add("PlantUML distributed in the hope that it will be useful, but"); text.add("WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY"); text.add("or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public"); text.add("License for more details."); text.add(""); text.add("You should have received a copy of the GNU General Public"); text.add("License along with this library; if not, write to the Free Software"); text.add("Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,"); text.add("USA."); text.add(""); addSupplementary(text); text.add("the GPL license."); text.add(""); text.add("The generated images can then be used without any reference to the GPL license."); text.add("It is not even necessary to stipulate that they have been generated with PlantUML,"); text.add("also this will be appreciate by PlantUML team."); text.add(""); text.add("There is an exception : if the textual description in PlantUML language is also covered"); text.add("by a license (like the GPL), then the generated images are logically covered"); text.add("by the very same license."); } private void addLgpl(final List text) { text.add("PlantUML is free software; you can redistribute it and/or modify it"); text.add("under the terms of the GNU Lesser General Public License as published by"); text.add("the Free Software Foundation, either version 3 of the License, or"); text.add("(at your option) any later version."); text.add(""); text.add("PlantUML distributed in the hope that it will be useful, but"); text.add("WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY"); text.add("or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public"); text.add("License for more details."); text.add(""); text.add("You should have received a copy of the GNU Lesser General Public"); text.add("License along with this library; if not, write to the Free Software"); text.add("Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,"); text.add("USA."); text.add(""); addSupplementary(text); text.add("the LGPL license."); text.add(""); text.add("The generated images can then be used without any reference to the LGPL license."); text.add("It is not even necessary to stipulate that they have been generated with PlantUML,"); text.add("although this will be appreciate by PlantUML team."); text.add(""); text.add("There is an exception : if the textual description in PlantUML language is also covered"); text.add("by a license (like the LGPL), then the generated images are logically covered"); text.add("by the very same license."); } private void addSupplementary(final List text) { text.add("PlantUML can occasionally display sponsored or advertising messages. Those"); text.add("messages are usually generated on welcome or error images and never on"); text.add("functional diagrams."); text.add(" "); text.add("Images (whatever their format : PNG, SVG, EPS...) generated by running PlantUML"); text.add("are owned by the author of their corresponding sources code (that is, their"); text.add("textual description in PlantUML language). Those images are not covered by"); } private List getHeaderStart() { final List text = new ArrayList(); text.add("========================================================================"); text.add("PlantUML : a free UML diagram generator"); text.add("========================================================================"); text.add(""); text.add("(C) Copyright 2009-2017, Arnaud Roques"); text.add(""); text.add("Project Info: http://plantuml.com"); text.add(""); text.add("If you like this project or if you find it useful, you can support us at:"); text.add(""); text.add("http://plantuml.com/patreon (only 1$ per month!)"); text.add("http://plantuml.com/paypal"); text.add(""); return text; } public List getJavaHeader() { final List h = new ArrayList(); h.add("/* ========================================================================"); h.add(" * PlantUML : a free UML diagram generator"); h.add(" * ========================================================================"); h.add(" *"); h.add(" * (C) Copyright 2009-2017, Arnaud Roques"); h.add(" *"); h.add(" * Project Info: http://plantuml.com"); h.add(" * "); h.add(" * If you like this project or if you find it useful, you can support us at:"); h.add(" * "); h.add(" * http://plantuml.com/patreon (only 1$ per month!)"); h.add(" * http://plantuml.com/paypal"); h.add(" * "); h.add(" * This file is part of PlantUML."); h.add(" *"); if (this == License.LGPL) { h.add(" * PlantUML is free software; you can redistribute it and/or modify it"); h.add(" * under the terms of the GNU Lesser General Public License as published by"); h.add(" * the Free Software Foundation, either version 3 of the License, or"); h.add(" * (at your option) any later version."); h.add(" *"); h.add(" * PlantUML distributed in the hope that it will be useful, but"); h.add(" * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY"); h.add(" * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public"); h.add(" * License for more details."); h.add(" *"); h.add(" * You should have received a copy of the GNU Lesser General Public"); h.add(" * License along with this library; if not, write to the Free Software"); h.add(" * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,"); h.add(" * USA."); h.add(" *"); } else if (this == License.GPLV2) { h.add(" * PlantUML is free software; you can redistribute it and/or modify it"); h.add(" * under the terms of the GNU General Public License as published by"); h.add(" * the Free Software Foundation, either version 2 of the License, or"); h.add(" * (at your option) any later version."); h.add(" *"); h.add(" * PlantUML distributed in the hope that it will be useful, but"); h.add(" * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY"); h.add(" * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public"); h.add(" * License for more details."); h.add(" *"); h.add(" * You should have received a copy of the GNU General Public"); h.add(" * License along with this library; if not, write to the Free Software"); h.add(" * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,"); h.add(" * USA."); h.add(" *"); } else if (this == License.APACHE) { h.add(" * Licensed under the Apache License, Version 2.0 (the \"License\");"); h.add(" * you may not use this file except in compliance with the License."); h.add(" * You may obtain a copy of the License at"); h.add(" * "); h.add(" * http://www.apache.org/licenses/LICENSE-2.0"); h.add(" * "); h.add(" * Unless required by applicable law or agreed to in writing, software"); h.add(" * distributed under the License is distributed on an \"AS IS\" BASIS,"); h.add(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied."); h.add(" * See the License for the specific language governing permissions and"); h.add(" * limitations under the License."); h.add(" *"); } else if (this == License.EPL) { h.add(" * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC"); h.add(" * LICENSE (\"AGREEMENT\"). [Eclipse Public License - v 1.0]"); h.add(" * "); h.add(" * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES"); h.add(" * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT."); h.add(" * "); h.add(" * You may obtain a copy of the License at"); h.add(" * "); h.add(" * http://www.eclipse.org/legal/epl-v10.html"); h.add(" * "); h.add(" * Unless required by applicable law or agreed to in writing, software"); h.add(" * distributed under the License is distributed on an \"AS IS\" BASIS,"); h.add(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied."); h.add(" * See the License for the specific language governing permissions and"); h.add(" * limitations under the License."); h.add(" * "); } else if (this == License.BSD) { h.add(" * Licensed under the Revised BSD License (the Revised Berkeley Software Distribution)"); h.add(" * "); h.add(" * Redistribution and use in source and binary forms, with or without"); h.add(" * modification, are permitted provided that the following conditions are met:"); h.add(" * "); h.add(" * * Redistributions of source code must retain the above copyright"); h.add(" * notice, this list of conditions and the following disclaimer."); h.add(" * * Redistributions in binary form must reproduce the above copyright"); h.add(" * notice, this list of conditions and the following disclaimer in the"); h.add(" * documentation and/or other materials provided with the distribution."); h.add(" * * Neither the name of the University of California, Berkeley nor the"); h.add(" * names of its contributors may be used to endorse or promote products"); h.add(" * derived from this software without specific prior written permission."); h.add(" * "); h.add(" * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY"); h.add(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED"); h.add(" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE"); h.add(" * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY"); h.add(" * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES"); h.add(" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;"); h.add(" * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND"); h.add(" * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT"); h.add(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS"); h.add(" * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."); h.add(" * "); } else if (this == License.MIT) { h.add(" * Licensed under The MIT License (Massachusetts Institute of Technology License)"); h.add(" * "); h.add(" * See http://opensource.org/licenses/MIT"); h.add(" * "); h.add(" * Permission is hereby granted, free of charge, to any person obtaining"); h.add(" * a copy of this software and associated documentation files (the \"Software\"),"); h.add(" * to deal in the Software without restriction, including without limitation"); h.add(" * the rights to use, copy, modify, merge, publish, distribute, sublicense,"); h.add(" * and/or sell copies of the Software, and to permit persons to whom the"); h.add(" * Software is furnished to do so, subject to the following conditions:"); h.add(" * "); h.add(" * The above copyright notice and this permission notice shall be included"); h.add(" * in all copies or substantial portions of the Software."); h.add(" * "); h.add(" * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS"); h.add(" * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,"); h.add(" * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE"); h.add(" * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,"); h.add(" * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR"); h.add(" * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."); h.add(" * "); } h.add(" *"); h.add(" * Original Author: Arnaud Roques"); h.add(" */"); return Collections.unmodifiableList(h); } public List getText() { final List text = getHeaderStart(); if (this == License.GPL) { addGpl(text); } else if (this == License.GPLV2) { addGplV2(text); } else if (this == License.MIT) { addMit(text); } else if (this == License.EPL) { addEpl(text); } else if (this == License.BSD) { addBsd(text); } else if (this == License.APACHE) { addApache(text); } else if (this == License.LGPL) { addLgpl(text); } else { throw new IllegalStateException(); } if (OptionFlags.getInstance().isEnableStats()) { text.add(""); text.add("This version of PlantUML records general local statistics about usage."); text.add("(more info on http://plantuml.com/statistics-report)"); } text.add(""); text.add("Icons provided by OpenIconic : https://useiconic.com/open"); text.add("Archimate sprites provided by Archi : http://www.archimatetool.com"); text.add("ASCIIMathML (c) Peter Jipsen http://www.chapman.edu/~jipsen"); text.add("ASCIIMathML (c) David Lippman http://www.pierce.ctc.edu/dlippman"); text.add(""); return text; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/version/PSystemLicense.java000066400000000000000000000054201312650303100266520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.version; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class PSystemLicense extends AbstractPSystem { private final List strings = new ArrayList(); PSystemLicense() throws IOException { strings.addAll(License.getCurrent().getText()); } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final TextBlockBackcolored result = getGraphicStrings(); final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, result.getBackcolor(), getMetadata(), null, 0, 0, null, false); imageBuilder.setUDrawable(result); return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os); } public static PSystemLicense create() throws IOException { return new PSystemLicense(); } private TextBlockBackcolored getGraphicStrings() throws IOException { return GraphicStrings.createBlackOnWhite(strings); } public DiagramDescription getDescription() { return new DiagramDescription("(License)"); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/version/PSystemLicenseFactory.java000066400000000000000000000033771312650303100302130ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.version; import java.io.IOException; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.command.PSystemSingleLineFactory; public class PSystemLicenseFactory extends PSystemSingleLineFactory { @Override protected AbstractPSystem executeLine(String line) { try { if (line.matches("(?i)^li[sc][ea]n[sc]e\\s*$")) { return PSystemLicense.create(); } } catch (IOException e) { Log.error("Error " + e); } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/version/PSystemVersion.java000066400000000000000000000251651312650303100267250ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.version; import java.awt.image.BufferedImage; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.imageio.ImageIO; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.FileSystem; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.OptionPrint; import net.sourceforge.plantuml.Run; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils; import net.sourceforge.plantuml.graphic.GraphicPosition; import net.sourceforge.plantuml.graphic.GraphicStrings; import net.sourceforge.plantuml.preproc.Preprocessor; import net.sourceforge.plantuml.preproc.PreprocessorInclude; import net.sourceforge.plantuml.svek.TextBlockBackcolored; import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity; import net.sourceforge.plantuml.ugraphic.ImageBuilder; public class PSystemVersion extends AbstractPSystem { private final List strings = new ArrayList(); private BufferedImage image; PSystemVersion(boolean withImage, List args) { strings.addAll(args); if (withImage) { image = getPlantumlImage(); } } public static BufferedImage getPlantumlImage() { try { final InputStream is = PSystemVersion.class.getResourceAsStream("logo.png"); final BufferedImage image = ImageIO.read(is); is.close(); return image; } catch (IOException e) { e.printStackTrace(); } return new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); } public static BufferedImage getCharlieImage() { try { final InputStream is = PSystemVersion.class.getResourceAsStream("charlie.png"); final BufferedImage image = ImageIO.read(is); is.close(); return image; } catch (IOException e) { e.printStackTrace(); } return new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); } public static BufferedImage getTime() { try { final InputStream is = PSystemVersion.class.getResourceAsStream("time00.png"); final BufferedImage image = ImageIO.read(is); is.close(); return image; } catch (IOException e) { e.printStackTrace(); } return new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); } public static BufferedImage getPlantumlSmallIcon() { try { final InputStream is = PSystemVersion.class.getResourceAsStream("favicon.png"); final BufferedImage image = ImageIO.read(is); is.close(); return image; } catch (IOException e) { e.printStackTrace(); } return new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); } private static BufferedImage transparentIcon; public static BufferedImage getPlantumlSmallIcon2() { if (transparentIcon != null) { return transparentIcon; } final BufferedImage ico = getPlantumlSmallIcon(); if (ico == null) { return new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); } transparentIcon = new BufferedImage(ico.getWidth(), ico.getHeight(), BufferedImage.TYPE_INT_ARGB_PRE); for (int i = 0; i < ico.getWidth(); i++) { for (int j = 0; j < ico.getHeight(); j++) { final int col = ico.getRGB(i, j); if (col != ico.getRGB(0, 0)) { transparentIcon.setRGB(i, j, col); } } } return transparentIcon; } @Override final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) throws IOException { final TextBlockBackcolored result = GraphicStrings.createBlackOnWhite(strings, image, GraphicPosition.BACKGROUND_CORNER_BOTTOM_RIGHT); final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, result.getBackcolor(), getMetadata(), null, 0, 0, null, false); imageBuilder.setUDrawable(result); return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os); } public static PSystemVersion createShowVersion() { final List strings = new ArrayList(); strings.add("PlantUML version " + Version.versionString() + " (" + Version.compileTimeString() + ")"); strings.add("(" + License.getCurrent() + " source distribution)"); strings.add("Loaded from " + Version.getJarPath()); if (OptionFlags.getInstance().isWord()) { strings.add("Word Mode"); strings.add("Command Line: " + Run.getCommandLine()); strings.add("Current Dir: " + FileSystem.getInstance().getCurrentDir().getAbsolutePath()); strings.add("plantuml.include.path: " + PreprocessorInclude.getenv("plantuml.include.path")); } strings.add(" "); strings.addAll(GraphvizUtils.getTestDotStrings(true)); strings.add(" "); for (String name : OptionPrint.interestingProperties()) { strings.add(name); } for (String v : OptionPrint.interestingValues()) { strings.add(v); } return new PSystemVersion(true, strings); } public static PSystemVersion createShowAuthors() { // Duplicate in OptionPrint final List strings = getAuthorsStrings(true); return new PSystemVersion(true, strings); } public static List getAuthorsStrings(boolean withTag) { final List strings = new ArrayList(); add(strings, "PlantUML version " + Version.versionString() + " (" + Version.compileTimeString() + ")", withTag); add(strings, "(" + License.getCurrent() + " source distribution)", withTag); add(strings, " ", withTag); add(strings, "Original idea: Arnaud Roques", withTag); add(strings, "Word Macro: Alain Bertucat & Matthieu Sabatier", withTag); add(strings, "Word Add-in: Adriaan van den Brand", withTag); add(strings, "J2V8 & viz.js integration: Andreas Studer", withTag); add(strings, "Official Eclipse Plugin: Hallvard Tr\u00E6tteberg", withTag); add(strings, "Original Eclipse Plugin: Claude Durif & Anne Pecoil", withTag); add(strings, "Servlet & XWiki: Maxime Sinclair", withTag); add(strings, "Site design: Raphael Cotisson", withTag); add(strings, "Logo: Benjamin Croizet", withTag); add(strings, " ", withTag); add(strings, "http://plantuml.com", withTag); add(strings, " ", withTag); return strings; } private static void add(List result, String s, boolean withTag) { if (withTag == false) { s = s.replaceAll("\\", ""); } result.add(s); } public static PSystemVersion createCheckVersions(String host, String port) { final List strings = new ArrayList(); strings.add("PlantUML version " + Version.versionString() + " (" + Version.compileTimeString() + ")"); final int lastversion = extractDownloadableVersion(host, port); int lim = 7; if (lastversion == -1) { strings.add("Error"); strings.add("Cannot connect to http://plantuml.com/"); strings.add("Maybe you should set your proxy ?"); strings.add("@startuml"); strings.add("checkversion(proxy=myproxy.com,port=8080)"); strings.add("@enduml"); lim = 9; } else if (lastversion == 0) { strings.add("Error"); strings.add("Cannot retrieve last version from http://plantuml.com/"); } else { strings.add("Last available version for download : " + lastversion); strings.add(" "); if (Version.version() >= lastversion) { strings.add("Your version is up to date."); } else { strings.add("A newer version is available for download."); } } while (strings.size() < lim) { strings.add(" "); } return new PSystemVersion(true, strings); } public static int extractDownloadableVersion(String host, String port) { if (host != null && port != null) { System.setProperty("http.proxyHost", host); System.setProperty("http.proxyPort", port); } try { final URL url = new URL("http://plantuml.com/download"); final HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setUseCaches(false); urlConnection.connect(); if (urlConnection.getResponseCode() == HttpURLConnection.HTTP_OK) { final BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); final int lastversion = extractVersion(in); in.close(); urlConnection.disconnect(); return lastversion; } } catch (IOException e) { Log.error(e.toString()); } return -1; } private static int extractVersion(BufferedReader in) throws IOException { String s; final Pattern p = Pattern.compile(".*\\.([1-9]\\d?)\\.(20\\d\\d)\\.([1-9]?\\d)\\..*"); while ((s = in.readLine()) != null) { final Matcher m = p.matcher(s); if (m.matches()) { final String a = m.group(1); final String b = m.group(2); final String c = m.group(3); return Integer.parseInt(a) * 1000000 + Integer.parseInt(b) * 100 + Integer.parseInt(c); } } return 0; } public static PSystemVersion createTestDot() throws IOException { final List strings = new ArrayList(); strings.addAll(GraphvizUtils.getTestDotStrings(true)); return new PSystemVersion(false, strings); } public DiagramDescription getDescription() { return new DiagramDescription("(Version)"); } public List getLines() { return Collections.unmodifiableList(strings); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/version/PSystemVersionFactory.java000066400000000000000000000052631312650303100302520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.version; import java.io.IOException; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sourceforge.plantuml.AbstractPSystem; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.command.PSystemSingleLineFactory; public class PSystemVersionFactory extends PSystemSingleLineFactory { @Override protected AbstractPSystem executeLine(String line) { try { if (line.matches("(?i)^(authors?|about)\\s*$")) { return PSystemVersion.createShowAuthors(); } if (line.matches("(?i)^version\\s*$")) { return PSystemVersion.createShowVersion(); } if (line.matches("(?i)^testdot\\s*$")) { return PSystemVersion.createTestDot(); } if (line.matches("(?i)^checkversion\\s*$")) { return PSystemVersion.createCheckVersions(null, null); } final Pattern p1 = Pattern.compile("(?i)^checkversion\\(proxy=([\\w.]+),port=(\\d+)\\)$"); final Matcher m1 = p1.matcher(line); if (m1.matches()) { final String host = m1.group(1); final String port = m1.group(2); return PSystemVersion.createCheckVersions(host, port); } final Pattern p2 = Pattern.compile("(?i)^checkversion\\(proxy=([\\w.]+)\\)$"); final Matcher m2 = p2.matcher(line); if (m2.matches()) { final String host = m2.group(1); final String port = "80"; return PSystemVersion.createCheckVersions(host, port); } } catch (IOException e) { Log.error("Error " + e); } return null; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/version/Professionnal.java000066400000000000000000000067211312650303100265720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package net.sourceforge.plantuml.version; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Date; import java.util.prefs.Preferences; import net.sourceforge.plantuml.OptionPrint; import net.sourceforge.plantuml.dedication.DecoderInputStream; import net.sourceforge.plantuml.dedication.Dedication; import net.sourceforge.plantuml.dedication.QBlocks; public class Professionnal { final private static Preferences prefs = Preferences.userNodeForPackage(Professionnal.class); private final String hostname; private final String organization; private final String mail; private final Date date1; private final Date date2; private Professionnal(String hostname, String organization, String mail, int date1, int date2) { this.hostname = hostname; this.organization = organization; this.mail = mail; this.date1 = new Date(date1 * 1000L); this.date2 = new Date(date2 * 1000L); } public static Professionnal decodeNow(final String license) throws IOException { final QBlocks data = QBlocks.descodeAscii(license); final QBlocks decrypted = data.change(Dedication.E, Dedication.N); ByteArrayOutputStream baos = new ByteArrayOutputStream(); decrypted.writeTo(baos, Dedication.SIZE); baos.close(); final String hostname = OptionPrint.getHostName(); InputStream source1 = null; try { source1 = new DecoderInputStream(new ByteArrayInputStream(baos.toByteArray()), hostname); final DataInputStream src = new DataInputStream(source1); final int version = src.readByte(); if (version != 42) { throw new IOException(); } final String host1 = src.readUTF(); final String organization = src.readUTF(); final String mail = src.readUTF(); final int date1 = src.readInt(); final int date2 = src.readInt(); return new Professionnal(host1, organization, mail, date1, date2); } finally { if (source1 != null) { source1.close(); } } } public String getHostname() { return hostname; } public String getMail() { return mail; } public String getOrganization() { return organization; } public Date getDate1() { return date1; } public Date getDate2() { return date2; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/version/Version.java000066400000000000000000000061331312650303100253720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.version; import java.net.URL; import java.util.Date; public class Version { private static final int MAJOR_SEPARATOR = 1000000; public static int version() { return 1201715; } public static int versionPatched() { if (beta() != 0) { return version() + 1; } return version(); } public static String versionString() { if (beta() != 0) { return dotted(version() + 1) + "beta" + beta(); } return dotted(version()); } private static String dotted(int nb) { final String minor = "" + nb % MAJOR_SEPARATOR; final String major = "" + nb / MAJOR_SEPARATOR; return major + "." + minor.substring(0, 4) + "." + minor.substring(4); } public static String versionString(int size) { final StringBuilder sb = new StringBuilder(versionString()); while (sb.length() < size) { sb.append(' '); } return sb.toString(); } public static int beta() { final int beta = 0; return beta; } public static String etag() { return Integer.toString(version() % MAJOR_SEPARATOR - 201670, 36) + Integer.toString(beta(), 36); } public static String turningId() { return etag(); } public static long compileTime() { return 1499100334843L; } public static String compileTimeString() { if (beta() != 0) { return "Unknown compile time"; } return new Date(Version.compileTime()).toString(); } public static String getJarPath() { try { final ClassLoader loader = Version.class.getClassLoader(); if (loader == null) { return "No ClassLoader?"; } final URL url = loader.getResource("net/sourceforge/plantuml/version/Version.class"); if (url == null) { return "No URL?"; } String fullpath = url.toString(); fullpath = fullpath.replaceAll("net/sourceforge/plantuml/version/Version\\.class", ""); return fullpath; } catch (Throwable t) { t.printStackTrace(); return t.toString(); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/version/charlie.png000066400000000000000000000276121312650303100252240ustar00rootroot00000000000000PNG  IHDRB\rsRGBgAMA a pHYsod/IDATx^ TյTꁆni(5^D4F4Ѽx38)g<>Gp5*"(*=w g[{>-Q/qkdD A,G,X,r_ O1GD"8&u;}/`Kt"k YWHPcn馡Cj袋ȇ*d2RAA'Br+\~} شi矏S`wWc@:U]h'ԩS=ͻJjӸmh"G]Lȡ3aʕ+E]%!CD{FwW<_7|3(ڮEiK##AjK>j9-LjJMM@* 1ÀD'~A ||Ȟ"zxnvZIhEt饗m*( u⨣R.t `+---ᄏ & cP|`{챬3*GCzs樃<0`!kF,A`C[O=dTX?~1 *I!` nڴ.Z'W^Yb0Wgyw=j>|? ۄz:*PPH(cڵw>ٮ\5˗/'dRwW03*|ZKI]jGD"$НK(d"oSGrsB*3tj`2c_^Gщ>rJkiU$먧Mƕ^Gi`.\"=_:QNtg7x]hʴ@%/_ v'?dP|Ү}E% ~Ȑ!z)dy.:_}U @%HWV;FsN:g}v= >.v!n~?+٨3S({!D к ȑ#'Lׯg9p@}OFI yVU3EK$/ttvnUN:=cĈFֿJ!=( |.GA~734_| 4ki߃O o,~̘1|R= c .QagyF GLBe"߰aCP -UWCC;&ARqM4i͚5D[OxAMѩ K[4(EPЉ_=(8 .Zm?O5;B"VVi>Xn]P )HtҽBX|9u9G[2yf`L]MMM3dmݦE!j򕑊AǡTImz 7o>8NȄC7|MI\veAY Rǟs9AY'TQJwX|@w\P}#S?1csGL,TA[[ZZۃ@BX=s̯|+D r EQ| mF*ܹs>`;O׷:/8h.zC=T3ѯM,´iӈS+'[z"•T@|NP8gn7;TTf0Gw˖- PEw @PJX]'6yР֨T1М."5_W*BV2 W9C3{BYթ7 0%^tDʡ)NW%m?蠃PRtIAA=Xl-TFAJ/(auXk,v/̓:K.[3Q#0BﮄAt:uǍ_R@$DH|Rѱ#'1k, A@@Qk Kw]Һ*JHE; 6h)a?A5k{(bZ;C')"W^yTW[oua-P:='GP0aµ^{uz5\C@|wjW/r AnXdt @H. 3a_~! Yg_2Ixkp|3f ɓO@i x뭷 #CاOG5}PDEv>ҥK0Wo t"AV;ض%Sglt 燮 bwQ!X" 4vUӚ $㇖n6PZW}ִ&k \5^Tkӝhf"RX`B mYٍ@3Z0id+9\UFQa ӥaBh>0P堋TL ;&$_0TKAp (4^eBJ*QcevcwzzRsM;FD} h" RS qrWpsj?X.xP}0eQ)ߩbKw7r6sc֐_MM hPm4pHuU 2mv2^]]Y,֭-6!;5nm.QfUqKB2>t/#~4Q* 6Ʀ/]5J$#7шB6*b tÊbV:#OZuX}oo'RI;o{Yt473X\ȻَlĩT:KS[K['Ts.Zy Ν5a8u.ߞL-^s!m} 5͛d^Mq̏Eݢd݂S8ܞ)w{7JPwomo{,~`^ ҟDkY2(b*uٶ\GS[kkMO,ܸm|-|=k/ЇF\}k 67nݴֶvY"Ԣ ςW_ǔL:x| Y~+LD:Yܜj.εY_`(u0aP2u{%.cb,E|XM@C0~G2i+6&5D*Ne* ,;S͊E?Ov[6/멯*N?1;`˲a! !$U=WcD۱ Z#TUȭXT2f{)fbJh4bM4|9jmiQ7Q(3olHw[ 0łޗ0<". d,Q3`9#1חgUQt-"#6# sAdz1ˏG\l.ILU;2Bl}D[ph(Z{jN%b %YYCÀӾ]H\$k+,7/tG7:1F Џx9+ ޲,Y'Kub!Sp]ɵ Ww@E<܍2EyX*ܾK\3$Rt]\r(L9HB:1&&6|*%_Ż EBR,meH&@,+*eI8q䡋4-fD9]&.c +FDIlQSNA/yA]i*~ZO:bT#cX35J&)t}4-p咁&&C싊4FnlqǔgL$Hacb4LL4xwJ*DxGjĸ:*#cH6b8b xkMc4D`pRLmm?b!Hos ]!+dOLu\ :_ r]s̡nM ye&CC P&MO!Q -&r$ۚlf `& 20AK$IVUVL_MݴIzz9]f"9; SNAa,v'][[n\$-]9D-f]JK >f@~X A\'pMtn]QjZPvl}!N9uT*{O~$[q49uT`EN2;d@WqĪVkҖ<O$mnJ&S.XpŕW\uՕwu}?o;餓T1 ʘi+8hxne;;fe˖:??u ~qI"*p\pɉ% By=B9!v[b܊4oiE4Ghц;Q۔(x& aְD`!igl;d,El9sWXzםO2LE*nX+RIk(H\lUU2 %#K:QJc12Y?T SLg"Z:&L&b:뮿 ϟV*_+z;k Yu$.׼_c=k֬_~!% aB @}ᤉt?ӣU(75_h}NlN3i[~ƌq(A: B\pߓX]wUHhbyyjS !v.yզ&xrA:]!j0!=L`M"45i^1sI41di|ُN[yJ-H0%D_zAJc7h@e@11S$L!y\׭[wq[]x5+K?SnC y]tbe<IKF;ӧ 2a?#'yk#Qpu\gƌ2b&G\:rR)maC1?I!"4hq9GSG7/0SQ!C2{3. Ϡ`&%fkc6S#O$G@YG@Qt;vUѰ<^(7 αē65xaيh !8ž/KR\{8(;=eCb#F!:%7/y:iZKK3R$CoT$hF'WmBcbL%pdIX"QVn,+L4Vfٻ2ʪھ5 ={6>)ʀUUU+\7{p 91 }B)4ǟ pyc^e !iE>a@\YYoF׮YCDؙiLHH_]?^^<XpZZZ۬U(ߡu6g.s~<%X^;mF ڴdȔɢ+T-gǼ%7w7VQb؃B-[Vee_juzDНT?4|2yIY tF]L$YUg>~@Dnu*h.>X 4u gU.E\v睇yPfIyI'LhO J 9.J0W/:8@֐I ps͜``%Ϝus8j"e7@wYVBirDtWLɀGNX bI 8?u-)0t ^&bCyE0$UE{>}_~q㥔aP=?%ήq!O.[eY(9ak%N7ozG>O8}ީƊ/X P#z?ݣ7Ɠ'l_ $8к>uD;iI5 $[/zſx~suUoDZ FGA."bߖo>ܹec@(HZo?Qh'N)F&ۍ!V?kޒ0_X?3g"M$34ji1-9ʻ_A $ ,]zN|@ʛatB^H==w\W^Zt/x+$P eO믯b e2}LFl}|qKL(!$K&۹lk׮0dsA[,(=zt#l09#q&l#$7Ocdr{$P.A5&)?Əq8p>b $׊%4G(9r$`$Sl"Ŝ仪.$zF N `>9GIJUwiI+nAFnBsǏORֹ REGá_"4 %#GlcHՌI@Z,3-9-;vb7tp8x(`%ͻN{㨣~ǟyE}c 8^9+1*o,7傚haGL&E]ƎGES4M#<1%Ce8/2#Qd odj1WB+khh6rK.|xP%ԥ*,!L~nSO &7 6DMbf „h+|QYHM,^T:l М&4t%J.R0/ҝ7 3+Zl8zT0(4% H|9_myʪJ&Z'Hld!UYSL+bɔP_c/ȓ %ŤMXαk<0NAGJlb)ϚuI=eE:iŲrX/([˞][﹛*Z:F'V9tp+0l?9ҐH:|W\ӟΚ;wqwbT3gD,|[t?߭uNf1Oz}=rpD)D,UD*i\Kߤ+ _w_y RB$\j_ƪUoYB Ą"&ީ{Й*+yHQZSvI0Uxu#3g?܋,bT:Ǝ)S8Ǭ'sJa\s5bw^WTF4i2uɶ3L1!)>nAZNFc Bwͷ <7nk ~MU2pY\#֖L6oܷo_N#z; T5%|mT +Ҭ H|@%A2,hߐcZ@.؎M8^$HvH_|E-M!D-4~B̶h->vꖝDo0.O؎GaX7D+^AgPeՒ-r@/}43`+F 7yPvjGޙ.|OMU3 g*yt?p y\jʏ܈17'C`Nus5V3đ#G:D{GbKt1ێQ Qb6x78"E{/Z. JS$o.`hTkrŗTW h|u62yӧ#`Sr(}^'c!c9)8 P;!^FߙljIYĻCV Fc=OD,Ĺ3-;8&R ,GzG1ӌ{g%,1߯~} ^O@UUUv2YΰSYIWTU_ׯTpF'|){|5JftРA\!rbIc^2Ȥҩ8U8\@\ѠDśv-y- }4?I `2e2i+t;O`B='wq`H=XAŻQKY~}Q:dC]6r˰QaTA""(h/O0.` ̈U$&gvf̘%S)N ek;W\qĉ s~7U0uoΞ=&oE'\lmJQ'gϟ^M#Fu FbBN>Gоah$?uƦF55dϹ?ɲ>؂[=D-IxO'Sw}&rSQ #!_j5j~ljm3|rcCv}f@/!OUlXf{mMUu5G ћΠ}Ödom3߿)S6l؀5:2eOwZC,ߒcD\# I=5$L> Chi#&6 (F#@Y\  L"a9F[ᖆ*P3zL1*D7З+mnD&SQׯߛl a9jin=,F _]ݬ#g8l\*k#5i'2$ӁCy> Vr; #4+9*10<CZA]ݹj&WHRn"`r.pJ T*ON! Ha0@s$?81_)B rpcֱ"Ds@ \A,7ّ(2㏘ln6UrF,o6;.8 c)u)w6X & w.Tn=>~VQu [Á=.EzP>8uƀqƊ#8y!֝w*ij fS2P5m hp*ѫz_ Z!ć ' Tj3cP0^NU*!+NLyW gP,qԌ]btuۇ0fU ~|d EQ;{9Dk,$IoH(jCP(ܧ$ JOf\Re P8Q3-,*okIENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/version/logo.png000066400000000000000000000034351312650303100245520ustar00rootroot00000000000000PNG  IHDRPG0PLTEϧ7˙9:9oSË9-.8~¾i򱱱+k۔7PuD\Ձޚ89ס񶴵VW569A1!J5>풒ɬu =97+3ngyxz1.Ԧą7۵3Nu'CVMbǸtu./LMGHn~c[p@5T+EŹTfsk=i.ɴ&?:ߪEο BԪ[NCblH.[LhΤVJ-1xɅ0%Dx2=—nvAKF>Ztrv2(MVE\yab[\<=?@RSϛ:YlE\|qɖx:n˺I,/ݦ=g9V2Ef=t$z9eQRrccNOrq_IDATxѷ!DїVg '9'3\kUuЄh}hrG(+dWX塍QYh=ڪDY(ϸ{,[tԸ7l'ԧ"wnR~2.X@/  3B#.=@7DeֺH6"ɲmF׶57y7uo䗹F|6X,5Jf) L 2 s>AyQ&v~`Q[NJT[>XX zGa@ي2"#@(ɾ! ͝'%~4)yȡwPM~A~ŖO/-{<xAr PgT?8AEZxӇ>~ϔ{-]SxR-|>7 Z M x‹\Y8˂8|=(GIrD l7`./ ؊13bGپQ/. X3](Px\׽xk ʽyw mQs60&;Sms,Bˁ7q>a+ʰp %cAм*8EZ"PRyH,& D1O ('k,ldHdr 9 :*T~ I ]TI 1%# G0h].0?  ͎-~7iIENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/version/out.png000066400000000000000000006351221312650303100244250ustar00rootroot00000000000000l Alban Denuit @Il était très minutieux, n’a jamais versé dans la facilitéAmine Ibnolmobarak0Il avait une joyeuse énergie qui nous étonnaitAnna Pétard Lieffrig1Un humour décapant, débridé, parfois burlesque Anne Guyomard/Tuer le temps en écrivant n’est pas un crimeAnne-Laure Arruebo$ To the End Antoine Mary"GToujours la petite phrase drôle pour remettre les choses à leur placeAriane TheillerJRêveuse, lectrice du bout de la nuit et conteuse d’histoires dessinéesArmelle Pumir Anticevic.2Vous allez halluciner, de voir comme elle est gaieAurélie de Peretti!:Elle est lumineuse, flamboyante, généreuse, épicurienneBertrand Navarret&C’était un homme juste, qui avait des facultés intellectuelles hors normes, un grand sens de l’écoute et un sens de l’humour tout à luiCaroline Prénat7On l’appelait les beaux yeux et notre rayon de soleil Cécile Misse QÇa, c’était Cécile, la fidélité, l’amitié, la joie de vivre. Un sourire Cédric Gomet4Ouvert au monde, bien dans sa vie, bien dans sa peauCédric Mauduit)1Ne jamais perdre espoir. Avoir foi en ses projetsCharlotte Meaud2Elle s’investissait à 200 % dans chaque actionChloë Boissinot2Elle n’aurait pas aimé qu’on se recroquevilleChristophe Foultier'3Quelqu’un d’aimable, au sens premier du terme Christophe Lellouche!tC’était un vrai charmeur, il séduisait rapidement les gens, également parce qu’il était très à l’écoute"Christopher Neuet-Shalter-Bodineau'`Un homme « pétillant, lumineux, coquet, pudique », doté de « la sagesse du samouraï »Ciprian Calciu JIl aimait l’ambiance des cafés parisiens, les brasseries, l’échange. Claire Camax"_Elle était d’une générosité, d’une bienveillance et d’une disponibilité incroyables.Claire Maitrot-TapprestUn esprit distingué.David Perchirin)bD’une agilité intellectuelle rare. D’une curiosité sans fin envers les choses et les êtres. Djalal SebaaJC’était un bon frère, un bon gars. Un garçon gentil qui aimait la vie Djamila Houd)Sois fort pour Tess Elif Dogan`René était un vrai gentil, au sens le plus noble du terme. Il aimait les gens, tout simplementRichard Rammant6wLes bonnes vibrations, celles du rock’n’roll, du blues, et surtout les grands éclats de rire des « déconnades » Romain Didier aTour à tour finaud, tour à tour polisson, tour à tour gangster, mais tour à tour généreux  Romain Dunet5Il ne faut pas avoir peur, il faut aller de l’avantRomain FeuilladeDRomain avait la rigueur tranquille et le soin des choses bien faitesSalah Emad El-GebalyhIl a un cœur pur. C’est quelqu’un de très gentil, calme, qui n’a jamais fait de mal à quiconqueSébastien Proisy%oIl incarnait le Parisien par excellence : joyeux et superficiel, profond et intellectuel, charmeur et charmant Stella Verry%GElle donnait sans compter, à fond, et sans retour, en toute humilité Stéphane Albertini'BPour Léon, son père est monté au ciel, « dans une fusée ».Stéphane Hache43Un vrai gentleman, qui transpirait la gentillesse Suzon GarrigueslElle laisse à ses camarades le souvenir de la plus généreuse, la plus altruiste, la plus drôle des amiesSven Alejandro Silva Perugini[Toujours d’accord pour aller ici ou là. Vraiment pas le genre à faire des complicationsThierry Hardouin)\Il aimait rigoler, ça fait du bien dans notre métier qui n’est pas simple tous les jours Thomas Ayad $« C’est sympa d’être passé »Thomas Duperron)Il était toujours plein d’enthousiasmeValentin Ribet@Un vrai doux, qui obtenait tout par l’humour et la dérision Valeria Solesin2Ses amis l’appelaient Il Sole, « le soleil »Véronique Geoffroy de Bourgies65C’était une solaire, une tonique, une magnifique. Victor Muñoz@Fan de séries, de blagues nulles, celles qui font le plus rire. Vincent Detoc&8Il suffisait d’être près de lui pour se sentir bien.Yannick Minvielle'$Le plus grand déconneur de la TerreL#*xx>\O){90 ik ]V g < v0SǨrBxSuAP^)hrkK H-At#ύ g^] o9qfreAS7qr9KwiN_JnK+]]}CD2(S-Wa5,&^#!ZhW%0r$PژH(EMKN@K͆f4U`6+~{*hf._P#(#x.كR #=AR^wՖǙܢ _y4 {;X;ނiWg xiRbIGYNhWK;hrlC@K(Dʯ>Yb:y.JtR(v<x?7HS@9ް-\=?L6|3ߢjk卅o*]HZd$Կ.: %}yծNqDBWhW_5^>€W􉉿 qPU?em:gdm۲v^$tB:*bdZL0'{N%r!W?]`Y|XHWd=9DKQwW2|~yYHzDH,A`cߴ^΄m˺Lz+pC\ɭ"jW4߇L'۲20U 5^|7;*Ӵ?L3`::NHustU >VM)#-;Y0 b!7=/6368ӗ8;`OzõAŽ Q [].J()0^POhy=q3|,*;Ԇ}\M^ Mb`A\0o5e]W8QKJfhq{om[%Y/*r QQ- ǣTwTL5;,GQ}L__hFwY'T kvq:=f.݇&R#8p1Ka;R&❣㞃B`3?83"U-ѵdF?9 . Wf;/7dF)t"@+wMgjrjTa-zs}IEG3$xj1qD&{]HBc&0ɂsI4u$ha!OIR:AGǃ.~(FKfۍVѸOu%oh3m޳-^3Li V|ni!%዆5Z'z{^)c?Ap$,yt5A8Dp@P"x)M>ctS.aw[ٝ(u(%69N @0Y`*I}P j,\6z(Jhȸv0u4 n<_N%ߑ!%}oPJ[glƲΥe*W=0{fmu0z(f[i{XH`O 5yRSѳ/!fҒL+ّ@v5 j2jT}Dsw)- a7%`MEHnOyUi,֩y528[?ו3yǐ<30gz\Dc)t\]d6-[:Es|_ˑd: {´|dI+SPBi0 50h'~_^fQ,zޝ=<}Wsȹ<`v/HRzX= ~Ajo"(uOn ;s1WO(0T['} \p>SEDħJ /N۞BQ3Φ[FCnػ%Tgm[_Jm-"hjrK`ޘ]?iPl)*9J7U ]nNEpe O"Nu@/f@&\ 2Jp21HF- ZW*jgq*(|dJv6mg7eh"mVH?U}q߿^ޫeDYm|0^@&&y]>!JT 9W~ԔppObèPOؿcuot7^n.ͦIgd~KAg5h\3F=: {Mna%%.buM!6s_ 6Ege-x}{nU盕 3&p"S3mmP޷7LmR'1glwZv?|D6 Y4sDIg5 tށrҧbm/vJ*qߠ;snGi*n7MAlȨ,=?GaΡaW&Z^ǐ'Wxij~_͋j/֒?d\.1s-GmmG8o嵊,5 !1bF01}( {y P)t7T/zPÊgVN<ٹ 8,Ǡ#Sư`HzlEPQݕ9ɷ]S?m:$<,m;A ?5.E;m!5KM VdG&x^@g2uE\~n7.Χ~wAQsե# &{3Srs!k߅1+CEXiiP H dCscݴVijʖX;};GxuR#A"uC3m5|!W?ۖNEPb]#"M?jSg$$% j:ΰ5'EioB6"% /2.8X^{ץ@Wl1 ?3YT9x@c1("8)8<.~7[VÄ(*xx>XL)$".]0 bɀ_5\EaJQYB/AkSGXwmÊOo~Tx{1qbD>X P̪Zp;F@tJ+y6( bP0\>k3In gM9?CV|ԪKROL4eƢ/.I\ z:~or~{TM{pi!DbGZ&O943=W2h)ҳ,B:md,ppHꯞR*]JH+~T<0(sQ6%U~j1r9D;j?nGe 'x_ #ͼ#G<o+: yQXVˑC"JKT94~~YUժ.W"3qy౏IBP(S< '볮|$ɢS!;"b^&>۳DX.g:P6=MALXeo:Jw7jbE6kbג⳰|n* rȨ0ʂFwrƾEՇYE޲#1rA *AJY:x#`85tRKZM)<'dG&}٭ Yb9# qM@9#Ś{wcZb^ou|9;ʂ͒B\=6 Kulw;Xqsdg8y?G\yZ!<Y#su~|GB}7K 2ى 쾠zaZ{#(-jvJ֢ !^^Z 3'PuE^Xw4YxjˡY{ Sz/OKCX?WO3TWs7 n0%#/*7]pa4 nr}vD*ڦr2xlTM%g0d\1KC`&F.Y`b H|216EW/@K>h$2>2GE>_/ieRN$'F?ÍO?&7ĸ g9 ?QyQpJ(98I- YA|Zj6s!ϮLi,6},8dN0 H.)E1-r^Ct9Ojg-cH1f JH/M &O*Z0(*xx>\N)" 0 eT,q2@ip?XW/^/P0d;oڄrc9$y䗰 Mc%XdBps3<*~*̽,XLŽ>i =]]&>l晜4]y"_ΈIxetWaB CUmQg3B|ѮYljE/P<n[J˱@R7E+c0zm-[<$̢ 4:+J#3avL'qb#qfŢ>z SݐkPrј5=Pl7@7n1 B2Y_~ơ {O:KMȭUM7nҝqD2u>`1%Eu|„-tdS@I5iicF9QwuZG++ǒG60aX >1ǁ] dϸ&5h('s|O:Vd/Pc0 LaGEkoP_kԏNj6-P7,J F4F.+=Ta 1c!<RrQoZMR&RnʟZrWZ _3^sU%mM5eg*2RSN:7SC^S1a|DtF;j.hI+.k%Ss"G}|`$|Z2-sır%pLNuI g\_r:F7Suy1~u)G8yljn}29Lj[ 4f`Ъ<+*xx>\O0 @ّ[fo\C|h*kvV؃gY@XfWxL [8>Y\C Y?^Cqr 67ă0I$INUl JA5s")cHđ= $U?C @5 X֢*" \yJ í-b*9:\D^Ps/I^ eØW?3#; ـ޿37re:XxN{D5uu/tu3C S/BYEծd};b?&ŗS|#K+شt<`=hZn:oN .S> `WjtZY8= ش%+%ZT)&|utgx,şw dW0`TGۨ4&hVWQE,Y̭ |ku(:~e9 m6;Ge^Gt5),;kX ƣ Ӌ$.YP_/)2tc`A\daf֑.uމӲ"ayjqGtWXOr BMf tԒ9_q`J,=NQxXb9`/_EhtTPi'?!>4*mbr)!yҩMqJ74AtK g{ =r#KA#̠esg})lhZws9Ue佘l-EC'OίĻšzx>ӓ.Ӟ*?PRQBd5v:V6ͷ ɥWzk =";mAqh^Kx8y ێB)}D&EϏ і 4RK&DOY(D7^&6^n>.r&R6@ʡPY"Ƴ+3dd6x7ۨ_IN nc~R \c2GlAEKZ-(ط~lxpa7S8KF/$2 2 ?Þ5 ~ԲIG諟Uԉ߾j!XldHT=.tˆH=^-$;OjvhКּ:3Qͼ`M%DBX? QVngBHViI$̃Pq!P![STUZ[6q>\W"k$ L^7jI7Eķx724N.y_r$/,g,>cagpjZF̬#͵j@{$!i]BN]a|+ZYSk;1fT+lmh7a\JŒB5 z:'~$*xx>XK-@N 4}i wv"-4]7y^/{c!Kv9{$$饕aJ;-DX(:GP08Boзsv3k4nzh5Agm^TՀ6q0ft1Qcm.e3O Z5[CF@i~@eÇR0Cró^HY\I;_ U߹SL"-КY!mqPRJ¾ c{=V!Gb73||e'jHM;>PXm un(˯7偠O٢vBLw, [EoAtmD)Ue NBM vƾ2M6jNئA\<LDԉO x_O ̺0]8 "rQuOd> U@< >DU8WONˎ?S\tJ}ySfi);~$H@߶.2F S{W(8> O]}h>.`r,hexB;"l:&$ N3Llrctׯh^ Y=4{I.p\rsQ'Uz(LRS er=|:|ȏ'hd TqBs$=Rn%%Y4g+vŠa{i3q\$?YZߜSgB VQE>v GQdQ^$>EM+;4V Qդ#unoXL#.ͱ0 i3KgC83YE_qؙ]f !W7C7IOtP2TKwʯpNa:+?G0] U? 4G!$(M3-;G 745y#԰$ '|"bw(9`J2dXvJ f%%UgEְ8qG& ǔ 渤+1q4~C@%wzd<&1/;~#Wt;7̏S֠h & Qz>#ݳUӿ .ӕT|0PEd3kFaGcl-`!C_z`V[[.o%l@_UĔ Z2A@=#D@+WQRs(OBӎ z 2wfio0!~a[3 miN~7P9*!ޚd=~l5x_DH}FPisǽFМ7XH| vU柡jw'ʝbW ܹui&R+zJ{ q9++E eL;Bc:/0[-EOPK/:ܹƥ?1oeW tfvQNf;~~ `"ROJo\\Tɼtzl屳 X7YUƼ=6WN0m&X.t]ag3ȁX}djE,s:䬜r',Lm QC'֣ݧROWnB[!5Nn_ _l2笼(q H)PWz5n aPEs[ `j@.'=mSnݲKdh~Io@r8ҷt 3B:niwQx0$4$p=q|MAntl)^^?,3֩W4j=i1  Bx]*GݰAΝS.o S܋\k#8%YQPḜ6T,D^6T{ڧiZ| Ocf´qPTxv544=&{>*27NΖ^qH8<~K#e+,Ytü+P[g"C(N ^S2,j!YdC,|L}F oxQGy#k80eO-e +agnؙ:隄fsE~5b0bmFKAG*Q}#h4]5OC}IE͖W\CzX#l2wM#5c2Aԇ@5Ϡ8'7^ w›KY‡{:E>%΂L_4ǽ7! kTrBKi&6!kXcN^Y84fRL&%[EH8oSZ 'GYgSyV7_gL7y7}94AjoȤ>F6ZJޫ@0!*xx>VL$"/ 0 i;8Ii",IzXL:-8}jΗ=Q5iȫDJJAw; h^-x-j6zC_XQWd 3"SB$.y21 w]'X f5Cʪa? !jZx*~޽_q|gYbP>lDYF5F]Y! -ƐL 8BfR0?QߙI(&^Ux>F`&JfvJz]1˪T,EW]m׆Jt9Fy!,؜8?fv[ZOX}P 4~#Ė?1a/'ٞ߀S. 7:Y2YKbӕҞl5P ?  I]wN(Ewt Ms=^+ 9>1:q@xjY"tL!ޞLg't`Z~ Kz@NJ|G>YL򲃈tGKBnW\(!=?'ȉ$.yLyl|7gT㼥̈́ը-2+BKĔeb"*xx>bO% 0 cj](`~~0&L,ztY< ڴKHH<=AHMdSy`|'Y_QB+G9a;b?ȱgt:n<$awF$[-WM0n02sr->9C+Fl/ q^cMfTh֙gj :cj0'-mp<7qNȍ͹S*/`׭==V4ĔjJ- Rh:0pz`0Ιky3b6r D>cn&¡SjFaȅR.}Ki"e40 :ic[Q5HI[,?eC̄nfC< 5 Qfڄw>UW}]DJ˸m??,XAy0Ls+op}x"y<3!NOUYn)p>!Vxu1?j\4FCs(K<{?0BuCBfka[6{1HZgM.3yYDƶƦFcb˜;bPܜjCjwq&}64h0dڽNδuOLiF‡M\x f]hlNz l_2XVkҧI=z (W{x=‚V=OyK8\qlGN ݽUM^j-f LÀ mXR u|:,%Ñ\f1MGX]\ H%*xx>`O)\0 ibI HXE9PE-w7dƸ?KET?PLUdp3Ly jޝq(#` 65XYsPހS a%ֲ&ӯG+xS'L'}v] ʧX2u,#ƣQ J/J̩Фc)D_ 7uKyqb1}9q% d>Ǘ*8!,y. OU,B{/}wP_;084э)b&NöA k^3!69ǒtIlj9 SP8$O>])תVnKny,kO7Ѧ.U |0$\=_P`y2ʏOP0c M t!rѵFq93^oqm B6d_ ߉Cgrc=1aq5˜ Ǽy`V5QZܥUL[t͜R A:[@_CFkF`E*y9UBsjtym56<̬[nܵCgcN3)j4jkI:]!LkK2=,cX-Gϡne6>Șq֛5u pNp{˅d' &_8e"~ޛ5l'-hgN|G]ky/rȱ6ߺ>Ӄ TK MYhNJ*o1i&|{Z"ⷚT$!¸d!|qbFze /krLV=88/|8nP5خdW@-*xx>TM)#/0 L k_ ̪>mp-AM*~B9^ޥ57]sCAn%-'6k- 2i34Ӗu#nʝP;eؙY#a/!yo)0y0&n"[%G]jLF} b[1)5#3k0^`S3M@N|XgÛit$y yŞPv%Fn 2 4|8m~vMD<-:/<3.$b \wÕgcu6)UGEr t~8J |a ny"+$dA[@vej0qڸIL,ޘ/'m'Dwx͏voӼM8-ċ%^6 ^̈́VWe(1o_9݄+{y#YQhèؘ .U: @ S`g%톖w!>%(a0939\˟-I;n¸ ,۴eUFB4l.]U:%H*klB<ʺBұ6M%0~JKk0pO@ Z!}dҲ\Y߭ K:Ъ ;Lzq(g0n TVHڸz(wPua8x]mA-]{'a1Xw\*[TOde w;¬\4Q%(z1)XdVPoLȁZALF a'5ͫ}YDQeA{՘!oxl݀Iѳs;VX0f +PkvZ\˯g2uФ@[ Nr "S"CHCe 8vc,db帴̢7NIRDĤyk+1F},H@^0XCbզF* b<Jc]tBq(pֿ#0ѕ:{;Ա?sIaӟ*G:=F8b}}Jo[O&{ObM:t_# }7HrxEeyPiMwB A#}r?!O[1xui_#>Z8Bނ^މTq=DCyoplJ6S: hu;q`}c[ N/JE)[ջ:EJ0`qtH3q@cvL٪s K4CTZc%UWt"ؒPes{|DBOKc<"!`=Ү- t_75w!zΆE͉׭^~u#DұOPL7/ t3^} V 0b%N()e+ͳddqF)v?) Ԩa*/Z.. 㦚\}$tSLW&@>CM7%};gSڴ x$s=o<wQ-GBQq]VfO_D9] UW&]v3a#\>d-<#lcO<ՒEA~8(؜GI bh룵1/ s1`3R5[9&E1sx]ZӓgF@bEIAt*/mܩ}6 n PU+7H5=9gd۶#jxյ6E)Zb Pl#Ygs#ȱRvz/lEB ^A$EGީg%}MԌ}9*>kpuy&>BŔ8 !VmQ%ksyIĝ:9Jv#Z(iD@EyZnIuΖV\ܹla|]c0X0U/]9tO5J #hORݛ\Ewt홬kKQ/%.R hOpOϡ~ e"#H' X w{[*XV g?G:$*xx>\M$"*ܡ0 e{1wC4&#jgM6QRx-z  >JNSt U2;=°=KgFӴ@uđQ'uqznqt۩N^$DDЗط1&8NUD\@;M@BaO7Eh Cۄ'n<;|84VP |tYK+g'*:]*6Q5J}`ݫ]p3x\W= y*u`PI_7\ޥ|riF-ng7w}Q`RYFY.j v&NimW y23mrpD_x.E)DJt ;^~oNvՁrK8U0~&Q|.N0_J%q˖m ̅FV%q:;FSpkݖ3b/9m& xƆ#tF֎h]Y~Bv#s‹8~E/"_3O 'tKxBkNi2EpXAm$6>A.?`&OWj&$ebΈfN3e?[ăUCKgY!=mPV5-}zBj r lJHS I~'i( yр,0`޺7ڮI*8nY97wĺR$ =; &#q-YSxbX4$fۥ#n3e\4%O00^pIf4Hg}lg7W^-0Odg(T+C?Np|LQ9ŹM,5Xr+|Ɵ2YW bm˹D GI]N&f_!PHWU e6ds2Mߜ*iU7tg6N@h?)ikKYlR d$15ϣkų>Z­8YLؕfNUm9xSpjd(t3;*`ʂKTxiY[E<eZ7($ƔCj`aNq ?ڶoaZz6{_?XM *Xoz[h*e|sP;lq*Ƒ$wxf|Fy6_!8S5$2y ANfްl$k0 []eu-P{DbbYcDgCTڈ =Y;hP.0y#@P,*kyΦвi5U{>mo>]ZƋQ9#Wq57?…n7jz[=Iz!h-P˪ejUI)Dlj@.tuAZίN<ԇWfR%R9M_^Hl C?qU?юQ210 wn 1`υ[%q= Qfn' IK9#VxXjN'44 B*xx>ZN0 iĴ$\g:jXiJ.TևzOadíٹMH$ήj⚦fVHU\(kDƏ7m$LQf>QevQнZb 95,%P iQB ş~ ħU6 .9c7qInI"Njk돢\Ck"TU5rA/)QxG5bf2x[lmߠc1=Vi˩ 8kؼ`[,1he!]|_-˗{Gg=EnUxUڌ þt|OBp Z"CG-jwkի;jO@&sMD2eBOc2Н{eFUY,F"2ކol 7ZRpc`[;N>=qq|V?rð1Ŕk4C #Fg{;z}a .-*g% =LOsJcᓠr4噻̅6 ?D|ʐ&1N ONׂMtKZIB_LX]{0I Œ9cLDjbNb蔄! 0vbLG3F^ xw 5Ȱ]/ZO1<*mXf='gknƝL[Z?x;MJ#/i&VbDsZka $HkQ~PXRJY;~7aPLhtY KW]&Vj;2"PˆF#dH |X[g<͚4͋,دGrVqv-aH{?׿h3nޅiiDxE?mFT~#ꃱ<bUCnWf,0  m`q ܝN#\x`j2`,rlE5IJ& N\2 ;#Y0F!1:M;}XL"*0 e|7*^ ̷bKҴ6Dׅ0+!酀p?!=m~ϗc9mHokWpSW*9'suQ?p a~ړ3˪SkŜnvgx_fnٸtB+iA8|_4΂[zTz1꫓pk7W}ZG%"|^ԗu!z`ok@M_C2ұԵrCu=;} 2V0Ȁ31@'͖7+c24:4lˮO L8`Jc꫇)VVjEpA"6 ӛaQ0[%'eI(>ÚH\ɒy4(_}(攬5w4~o[!Tit~=v稂nG"b5~:b4a[nR] <غuQ~M]de ¼idFX,ƥ~z.5bƟA^=JүUCxnos#27㽿Y'ƘV9Җ "b|6l=got?{+,H^w>q|aJÁ71l<Fd_ ,9V|CIGLbC:>*(hQ |})XC]FjGnYU5UUƘ][(CdMU>YP,r Dz3TBxx@H; '!F|'ݰk r^OVPFQ3v=@{#9NqNPqo~/MZ! ౵~& ']}wHӨ rC$[Qɧƣg ~OjK9Kk(ي\O)*A0 @a(9ݍVݹ@Dhp__r/wnqn{dkGdon0s\kcc<^MkJd0?cVl-+8t!k^ MpA"9>#gQe" q]$L dퟕy0,u 13$Q.Y9]+;+S[ܗ{8Չm,>L0!9jD}my48#iA$v@6t9FT! 8ڡԜЕlŒlJ1M^Zr/`22ZP;WJ>ZXM"*N0 e'AueշQFBzKCLVLMh ^.WzFKҪr,+bHCdq n8a6?wݜ->ay"7җlJZhpL Eho-C(v @zt&Tl_G[7hP:.!U/-<˗4塵9}4}.CĜ-u fbhfKK- \ +b"#MQ)C1IV ҸSRtҾi!qwNQR/qEbڕTр.g:BԷ,VHmSftF^v& ;8 f xva|t*ἾM1:a+%`U8gtS+/Bͫ)d X:nē%.oAy~rYYM N)А9A\%\ivgrn(ms_Bz DN]RBk%(?V[*M\[y S]p| Um^^ =0Wfuh?GQrR0Obw @0:ǾO4j\Bt#| x:Y2sWqfKQǿ/?ڒGj@eh9ed]'rǮMmŽԒՇ/nhsf>i9W'-jH4RlzL":ͰJ}wy-mm\,^[όhAP_`ΩkCn((+ ciĽy[At%{jkDpfK2s6=8+͞kշ]GX<&[a"~f~l EN:wA1[D'{D;kj=GH]}"1_ 2^{qT]?0)-^Le|:RՕk TNkqy+]v~fVI#CIXA]|W3̹@@zHDT!ǭd|u dx R`hJv|X r깂;ZkFѫ*S`´׬bූQzeq[gFCD ۬ðxde+HaU/G e(si%_I#͋:XS5ݞqY~箠T?9ƤoZ2"qF7[X\{#/Q"阗"jUXܪ2PkFj!u6[xi l6Fl{L66ׂ9^O |6*xx>NK"1yQ l'ge/"=opG#>LVvh\XݨO V&=IrUpM)ێ3yҲ4 _׿.zBs9Cs@BxY?){v |28o*yX8o3=+!5v"xo!ls<s_3O@L01b0c:FEΤӦT'.kN8m]GD='+/^vI4,1~ $*}KL'Ҍמ>LO]ǖ+s,,āx$Y<"rwGf`a݆-nNMwq#R=vl>h^=Scm4?hG7]?q|kkA`a\sF'h`ȽmGw"CUk:rAdBEX&$$YMU4Hu |ױY0G9@!W2LQ~bT2GP9gOVey;6Q rpqpfGs;\}_$ޫo/(Q7?FĢʪcZwDn * ҙdž0nB/!@T%u~Ob\ma^b&ye0m~_E Jd;ovLiTM1bgG<4vE4ZO,LzVժvtk,%vfeW/]0 ֢;m4~g<~AE5wo鮤QUl sqլ>yU` seXeXw8qhQ+ʀe}!SB;6- GEf }{Pw'qxi|,M̗_Z˾/S*Z[OHttW5\@aL3=_BSftT_x`xx>#R{;o{i/;FrU`riBۙ,)In`ifٱHT]:|Rgc3"7 !œ:ޫ?Uu7!i5 W̜=(@PCx_T64zqS-hXeYV֭}wL{122Ϙm494q?%-JZ!lGX*wYߣ^v 6'%*ɠyD%٥&}l-&dƥY{!AKӥR|LHgjZK x _>i Db 0:E~<ize"oD\ *8q2s?mjfl&K3"5|{?%տLhZ2ft K4  <kǭ0HƟAA "2+NG>dap`괪Sv~%H]F3vӍU|dl/Q +.چ d@4I3vǠv2cL8 kFXʝQ N/S#wRhۛ =Z\Kܨmh9j8&5aPuYNqfHQ!l= p(_g 5ڽVOഈc370@~]}D,)1]Q,|l0*U,\x @ ݣ[.9kχa)FJE"Hw)LJ/UVk:}K; m)}O8DsctwF?EXrNt2({^W8o?@'[<%J 5E>h >Qr4._vk;{d:|5*VɒɃ$<2rXK ^ls!CYG2^P -{w) %ee8+q!s]Ep So,ZHZsi Y ;+g/& ӗ 1,ϡ30t{WF:ƭՖh '⒎m4hEm:KW|L]mY%4Ғ_e$k nϜBgjJt)ɾA!FL-x|]&duteȪKpKRQmU$rsJ;)M/ܸ,7O[kgSEBqѯg󶪾.olk͚>H9 tUjj1/#1)[H٧{ O=,I;(&PEiOl?)G ,Id;8(4/[GX9@Ʀ-vks/*xx>^O)z0 e)ܠ%x ۝:bډ{:(!c^u]忥@!&RXoq!VD`\zc adq)}X}a*LPs@.0^i֍۞ yxpsd LsC6S8e}>d8Bo2PA"7©Rs!ȍ=NoI-E 5OPd}~/Ÿ)X?1" -թ\G[=lA#s+a%IvcIy?JLB}N Q/DoY@{J@CmSױ)c kFk]dODD%认Hߺ֝3]B+J&0Os~E~`Y!)Vݍ 5kP0qkN>\G)EGw[ThpZ~yBZ 5Us3qԟ758)hFSi'xgqAL1 rН3P]ΈAk6?>mG6Œn0T3hj q@ls#M%(jLpa?6@ۢ2 hեLL8B۝AϯgC/ z-(?;z)0G)F:C<7߈ݫ%m+<MuA b%!d8\֐Dѧ,!T؉ɼ.(uvqz,#^av}Te֞e pf2+shߟnM\UF!o=p',C7#Dt0SvA˹)x3LjʃPb&O}O-4: *ȥ _Sn Wax (_` »ƊmxPHmf=,k__Ag 4ڧpB)ioi%[G.M`W3Í{VǵjTK c`nu%ZQbȎ_$Ex*Vdn9wp$hXڳHcZ<"ޠ`3Dz$?׭\SYOR\1o=6}g2Dctz9Q 4?'?wkK*XI(6J X$XVHÄWb_/&iIqBޤq:>gDIV><[DY31BGcrs7$ܲ'=NƚDq>pK>~|[h$ˇʨz)tZhfO + 6DuMC#4GK{M-6-8+kogmM x+5Z?''ʀz_Ch5jO(6I˚Q%fa(f ِ/3yTxzv>lý0A88W\p|=RTl[)؁qK)+=v; k>3'8kfBn6rm[5HDGZ˺vMS#}5EB/ztG*p1 K'۔HĬ~y;'8S*haϩ*iqw?BA(Mi$#~qkò߀t/=hB|$f@<㟐h˹cSJ?Û KF%ըUN{E{; $]͂CzNm)짹^W; mm*$9 7<ҀSNЀ&DFIZ#؝"X(O[T1'HHaۄyib^L*SĘ &&YB"vǹlOJ ͆NRAKd#쒾ykz:ڿ xѮ8p_7lذ\NKiJA5JP.*xx>ZM)$"*]0 btԼ)yS{;WDQB7|kH׉ttptJz2L7ҳT%\A)z[q\m8j>޽R.>(Q^ &^4AၠsWڿ27/WG9VբN~XM^24d$;?Ut1f:wFU^s&A>B }S$)ȁN|z6xt4cRBzX<8UƧRЌj@uSBB,at/l偯3>Y^C'rgÊstL#cNEx;7L.ILpp?F ,`Lĭ%kK\EGHY|yoŦF!aE8OH '6^82SE"FƘn=cƘ<YH ҼQkĪd⭆Y puTX2H12,w(mՆA4@%v946|9}ڶ.M.=1:O^?ޯ4/N2HJ 5\q/VwX(1pJ?,Qo:re"l1cÝdfB c H lpnP`1@ĔF0]KPs$>%ho)q@P y:Vcb;ʸ:r!G4:*.}#~&8w?l4B"畮jYz9/ypϤs7~Ja)C&ۄXL9CI@-MC/KbV!.)|ƄFabw(\gĒXy 4_(ǣRh@fj[ *K2Rc.V5v޷gbu%: *苛BaMn9pc8D\L~3CZʤ2h"1Nvy K1!9R~ Xݵv a O55M+weКw6JLP/O[aq/iq@yHiwW/JkGΖ.Js ԉ%fbgHY7|mZ*5 {eܶHPS=q\0*<#3jO-=LֈklveSE0CjWMMyF(9[6nƭ󵴏ZW2<.=Nvx Di韹1]}~Pa^B8ai U:bZ:!GCzUXb>wy- Mv%xf"̺mzR(E.w4%r# 9pBV9d"&ǟ نm;R5 /,z+,|RsIjNYP8CӲdF!9$RaNM9zM%9?S^ WDNrtU M  'H"Ҋo6KY ˫kS/A#Ag{e`HXSBq9'tk&H QROx>T!DT2LN l0X g<R Fr, D߳cIk; ݨe20 LX/`3 P]tT7d+ BLTHUti {?UfA(Dt S|n?9h#H2kv~;DŤg|LJ&>t/m]Ô_FLIsҢFkewx\,Pޔ~[>e (/s @/*xx>TL#10 Fp ZAo9کKMhLE @u GS-FSlf%O>e0ea%!RnW$`ml[k_KԿn5Ͷ0µJbWW!BLm\ZiD5QZ1k[hD$ k,zgIVɘƘC93BK$'~0ר$c % VE/ sS#P[wx19sqKecM6dra$ml Oۥ؄olJ_WuVx}Pp 3-w <㭆.O㶃"r|oNv&םFB#nt*g(hb`rWY){HQca\0{r:"[5`N™DD}C;Kjgep]fJ`? 0zJo@ړ ^BYfA¢"{*~=V/*R^r=yr}}GO7̖y@`W)Ӯ/|4L3,T"낍WH/ߓh @fҠ2{LrHvoJ?tʦ_0e:v`vP,jY[kiqnZ!n툷3CBG @ohm'Rۮ\eA~\ C̈xkD庽2LTI`FZC'P8BfxMxi֕Cv>R39mhWgY3kSf''6Xo҅CKָ;=*o&5vw>md&k]#^y&ZFSJuf6Н_`{ZCKELsZ氲Dz2bl_1g.S;&bCs,ܿYŁJ44qF&e_XK،zHȻ3HMˮsR0PSOL7-;)Z3B|H}yr>bp166=) d6|~/ w*-xA52'JF:_6.3H0 ,*xw>VM#.y0 i]"bx㊧R]5>V-;2 C[c /rFxv` fzI"Wql: k q;{R# ={1ʗˇ]nb#iC*'pA_Σ 7'&uoItEImg0L.:4*:}ryw q!C9詽QP5c^Yp&bAc%lj94QDTN?<"=d́'gl]CXu~T)_ 7ڛrV0ꞹ}c8>l)P]GF=H9iBXNh%ZpêjsϳC[$K4ޓD+K1 pnrHTHU˫gʹc*  2 h<;d'.dߥ)X_:0-D/vwtm?V`Ma_£2ٕI$02''p˱9(Fc7`A;4=/۞ɕ%\>O *<={_;_LTo'YGʒv% Xv2XS^6ȉJGaXv6eM6 Rf#A1V):FhaM׎>3rL8gir`<[0}og սd3yF^$)95X'}`>:#i/"mԏZ` ʖH$_N炮9>9Lqgr*,B (,s<@<58o H3",AG`^cߒMLˁ6‰BwHϰխXި-A|[sr|`QYްϤ[`:HyHC Y1 q#p"Wܿw^tl;AL$)%_{juadkNk{Eٱ!£bA'[=5͘g~B pK}YҘ3X /`#'W*S]9l)ɴnwk\T1R={ai2vo}rGuyke9XW(7crXq##5c5U?$~ @bB˾mmmhȕ6}9Tu 7)͐seJ_d{"CX9q{E?\'| !KS,5g+;}~4% G}R޶٠pyY(Wf׉U+?p@pwK϶{LjIu2D5dѠ/dF~2($ѻr,nwEC?ltq4 8v([nw1t䏵u T +V$-~&WX$,Ф8ZM護tfx:x;XTX2ܦhJ֝lW򷿙W-A-G4$tj- |Uodl #<g[@<: ]pB2P2tއ=? 3l[gK=Qks信,ve9.(3֣o8 Dil>WSQ ߕKrWS; s>uG sMb[DC6dZfi(?_I>GbQ䡌0׳)ȐF\w9 ^B*?s a@|L>2$ZP.*xx>ZM)"* 0 @8|''AO;v>1<9ts_.?c;Ɵ|4P;jO ,zP8ىijrjKv-aF-[I;.S_3IK/)54@ɰH2$D2qgGSA )j9GGx.9~Kg.;"\n kTz `_v~aglB$+fOV:YSeoq ,_ h3b'GswmȜk|2I+rQ CQ}9:wNt}*M=ɊMl-":0ltڷq@x"n1p[m}r245&ZbSZ8Q8kS Ge .ʹ Mo)")0EQbiΉRq0'#c}h~oFrwmӄ<;O`MænP~E`T@PTC%&:w)+ɀŔPh(;}*gGOYHZ4Z|mCw½xE 02pgiǻ !fqspq34wIP4Yz@_'[~w&bc݃E^Mg}jG'Wя72?`,W+|qnun+X aF [BS(ߠR^K9!uA:ކ&&uիc% }jRupc~pALঃ,erCTٔS.crw<( u`_hx <:Qsw1g84:va-֧+NTY[ש%~VmV:U%{(ѯ` {,mMm<_\kFڐO>-?/W pPNOQP`LH ?SSUϗi϶ZJKlG)w)/][a& Ux *,}v{}|e( *= SDPdX5#O8fQn&2"ldF/`K-4<`b/Խ[*Ǘ}$"N[,@=s GF^PyĦ*?JDNbHm*L._㞩עg=K(=Z ϱ1/r3 tpFt*ܿY:YuYM|8d^ -1QwB$sfO#hd2=O%~8S¯?!oF rJ\-e>B3 l1҄=(|/ ;WIJ9Z7;$a3FdZ4ʹlE~ޫy |Ԁ+*xx>ZO)10 c`ːndqu#'<\l@ј%홻@㮁W?Q  4/dPC{{XO͚' k=58ZG+J7rNFD$ &e'Edi]^:|p8S?UOե"MB<%P'9r@P̮ bDrOѯ)FH6Y쇾Whg)k$P•ae57Y$J?D4hyLƘ_Ua e Z0i{}N{Ө(҈ e;$q7|k*v>&g*4U-f%&$kU'~ׯƤn}r CЏ{7Bc;:q09uCv NPQɗ ?=}/l2.<yY+d9% 5QM|#ul^u q^m9Kwdgk8 O?\N~1}MbUy{9垯Á gZ.B!Ǎg5$9Wļ[qMJ4@t#5 xQHbRcNKN) )Ƕ&_6ǘ"30a!IFBx7c?ɌΊޑ 7_ԥ"`jzaw/O=k|6XIp$n,=N= `Xś9 DeIy>Ȭ~d[܉:\%t +׿x\ +)r ;݌ܷS<S3&H9xi%hwD 9 SL #Z:freW5ҁJw\R/M(A٠?2" Rّ 1ZQP*liǢ3ôp.47NɐJ%{ǓW(nK{8ޢ *@b%L5lGy`k^`!*d 'Xk|ٴVZ9n 854t Q%wDM^oA0y.Ƌ|$Tcs mީ/fkyHw'\.˄BۚEC'B8b!wkDu8fSǽHot$.O(vs+Ot]_d'd;Y'a(ط&U5kV.-S~􋇍0db L1D|U~C%t}u|ꎋ':8E+ɧT4n#"e{4L)NT7&X3"*o˜t**[/)Zt͹$8x7<[羙Lr-EX:~j-akSFܜ @q}atQ{e|4:veG}|:np6ɗ8RD8V|ېdVJbѭ'nQ-1A3KЦ?u[JS@໭ 9xHW7[^+!ZoMՎlSiH>Qח>i5!QyT웩` |DT,z*-CPah 2[몫mK\74e ipq %HKH . v3 ̂)b{)r d`)i橕וQtH]Eֈ UlPVV0Uec%aE{۔д>1~T`A=>XOrkSMA0$ D.m"W3pP O#\{BiG~0u~p!*xx>RK2x1 e s͗C+'Fc'AHPª[eUv曻84Z EXWX$68<ΏbOpO@&|$0 8Twm3%W<{=Iפyp ?̕MY^o ʼn@5#őCN#) /6M)wSd3ĄѮ,Y]o0 VXG}dҦ|VA )UƿE eMO!CeP\0*Wa;#!' GjxU69a 3!e&::1QK7ݢԚTDIυ-S)$V~܄r&+va(κ&5pI43UѐN칏Mݮ>QSΣ+iޫ,KImM%8SBk4]77rxb~龱N-DWY9r[Hvl^ٜpi J ~ݐ6U<-D~\GQMPhA3\vlqQacraCji#%U;UpQ^)!% bq+\a `45KyƜ'hi'ɗ**?braK2nh3RKx 8CD}OMHªVq^7|NTW޾&ǘ FJ[KC0N3PAk?.~N Vi&3ׁ>zArbcIe{pfg!gUc`583 뺚-oshce;O b!f&핤r&*xx>bP$'#L0 c='j~.Cy? В}c @ D*MZG^Z+x?|TkPc˸U!nfCVqXO/ݛPҳ'ox1c b]I̶!wMmOb6 ~=);f2**__2Ji3pX8+9; ,O,/cEn -׭f$>R>o0C% :X#d'h#,,Hum\3I3%%?XEf\}Q+2~t<'MRnStZv13HX1K5y,5^?ٺFil~[XY#Z΋#›=豙wic _ioQlO7a.n|:ůV gQ!h KJ8r`C M?)0DY6Ь XʢSpݧ% ,m[maYD|!Xb0.*xx>VL$"-q0 d+Y^?Bɾ󰽷ᴊ>Cה0b9^r}ryͦ5e dހξd>׭y"{bzʼҐč89QC57`Ohg>GtiM $y,n ?FVJLTJVѰ~Wd.Yŋyݜ.OMߜA٢"Ico&qY)Wd߉9k5C g&&0T)Yn{mr򥋞~Hod Bz0MC.4lIXCγZ1H$ӜMJ2ꇡ[n\P I?m)MEJXǠسSk ~ø5'N%ѕlnUKR@s{g=sdNCR.(:N4/Fs8!sRF<]QR%UC;ӱϩ܄R6Ҡ\|yZ$ZQߣakYg@,.K)聎2:ib e[$PW564 "Z _#E8ʔ~fNa̙FΟR?hyL.1(K Zԃ0cڋl]=^Eo~S+{%.Y%ӡ?uo*+KPB;l&0d3H{BNlݐS+60#"VO&V :hRerfW"hd{5!Q0b7[iu?&'B]A^H^UҀwzj֠~Fr9G<+o_w[B1JЃNP"7ersifr\XmrBD^_{} d -Ç~3:dd b;l͔O^ݺڝ\i°N NLUa n'̵@ه"Ad 1JW2gD&cjVfh%ٟEv5gy;RT~ xFb0+B M-v], bԳʅ Aݿ8;[kB%|I$EU`GocݥFu*&ΩZ_ߝoR2 :EM_!{ Jkb&ÏUzuOX,ӥrmO9m|po5(hrm_H6m#>.A4 mZMEz;jw򲚅@t@?7,3ļ}R'nPӮmDd,k`O)#{0 Mi pꈮCrNuKm$p3l!i%bx4`+:6UUv\EGUclFWTi\i7eS7WR`[|(F5:xlu1tu K)أl$n.c.Fl72s eYح\0TŅIkJ%*wTwC{0%LoGs3ST v)G|6Q̓<O2AFjYj?I )aw±Sc]6 twFØsCuiZЍ dT"rll'K:6A0m*mwLetw >M) c}};Z~u es11Iox6>Y `(0)GڍOti !6ɪA rǔ>y1bRS|˜*nZ;;|Ab @okXufC(ɲO.*JwԜj߫rΡ=sqq=4&%b\X<;V7*emͥCFQtKÌc}G.cZG쭚Q7\4Dx>,JBVi3nOCzYHGRzz;[o]zIyQ|?OސO-LtDĽN1w*{t&.JuEilU|*vaRoܟc!:OR樈K$׭ʾeSW˨B@#/{)OEhh+s /IϵJÈ5M\sg 2{$v ?:z}:ys$BU)yq!d(&}qCM\3U39Bm6ٺrHVJn,:H +af,|J`#\oteAjZ}Ҳh=O9f'l=SÛM՞MuÚ5<lfVcN|<%oV_O1L`$V7ic6ތOOL X&wt[Sda 7/2 n_?\]3P,wBZgl3VT&K||j嗰VqZ+C 6dU-2+*|5# avg"f[<(*xx>ZL)# A0 g{uoC43_ 9AZqOS?psU]G&  ?>ׄ ɟ%(9`(=ʏZ̓0TON,CA@@,^0XEN5i.=|"x۴]815cf}F_:KLMl[~oLwM'cZ"(BRhCFPl;?w4Pl1z^(:@vkgL"Sb3PQ$Xݗ[}n|mݸ {sD^Jř}Yj!iwd|O 3%:FFז_@`lr_8Njq(5ni"ab AgL؍T@'AyÛ)"F4š*+Hc%̨cuRDxy2k&Xkpw'9geUB/{e-'nI S/-Nd*\k?]AަMJy;ʜ ./O33bOxš2 w| OYdNbNjh BJ\8㭁f$Oa;s"` ^y{xH8sx$KĜac'"0Ukc$7I[J ]GnV_<+]L e)D Qۺ ך%Rar~a}Frűj 2c~5Gke҄W8sx@0đP*;Ϣ,b?2r?,F?-_, kۋ'/7͠1pۍahXdۧռT&’k z3"JVa.Bi+݁¦II͒N@f݄ĺ%]gj)q E4Dm=dk(ހSn^ÒI>$753.NsgoK/:E?䌥Wxy'q݆9TۼMڞ"}[=Ⱥ2oVf!dr}]1M{J,ERXHi}|-Μuij>p啠}ٿ.ˍWҏJwԢM 2yv|(شEį2P|iF4CVXYNG/m|Sf/|z M4*J)evyÍp{Aq&9*È k|kA7|J4}ml*tf! #PWe5LiX 2vP&&#j$PeÐ(ESs=g6A;6(>H"5D:yPYo|χ`3i=#a&}uI7l)+k^/tX{ImoEL!Lq:!2`q4zJYp1~e:P#rșoG ]@Eyh||mlewHADߚRy^ HB$wg\{͈P<2Q@ 9ElԪH7,ݭ0+*xx>XM))0 @ G{SڢlS={ I ea腺}~ȡ4 s'8eЖE"kȇvH^Iv]U]Y/z4+.I-ݫM2Lִv z%q֟R|Hm[j0sz3{'o(5Sa©p*sڮ(1H:YB.ovmT"V.[ƗbKF>79á̓qS[-ĤB`8P.bq5>=֚ڕ$aaGD̏#+28ɑ~n7?G?`CPN.D@EƕbF&o*N]YZ`I.Hvll(5kAƛFzqt2a&,μՉGT)3̀Cr2F#Ic b9e骻ȇ ,Ƌ% 94yc^Ym *^>3@! cqyn wh{`y$lMA =Dmᦦ-S_|BdVEdpd d#KH}D{BA(vG%}kZE*UG}\8I#F?t* f34#+اh;.Ezk {JV&6qvwj;⊢R4%gl&P8|tqGA!i TdyAgp GH~>.QFb47&PB#Dpc폱2'7*֐ma%W/'1vǷs4REo  ew4,PzF ~xǪ$9[""S.|$ĎaEi#؊4ž8 DɱE.}ڒc0=h1t+xi8nONժlC!"W *cf46q\a =vG墷ँ/(! ʱrfGdblKtY@[y+G@]pM#^T&#p1;!8pvqwX6]ۅPqlZ<5BG%`O .ß'aN%%V۲"B v9fv0HD*\vg,_zL, -RF:=QC <@6J*u;]rC.2d;~Gh#LNZ ?mKŝg8"N -!2#M~ȩ.L@O?68̲>_YZ TD%l@\ Xĕ(z`2!*xx>XM"+K0 c/T7 7 6< m_Clˡ.:BwXP~S .V 7_W&SF=Sv8 /0{"l<< %!>ßukkOoP[ª‰ߏ0P"[O%.M+ =x2_Kԃ))A.P::TҡU|<ש_Ε'B:5oLuY> U>zt81A@ٸg`T1%mUS{_z[X`_55IT/B=qFޑ8~t o{Y.JZd݌&P5Gńk˪%CP?;#;1\  ܎y y:c[o lqߵYOJN^=Oh2Z@LJr7wHWFH3쭮cW ?*D8OPqO҂? C4f+uUffb!#Oa¾kXJ'Gdq]tw2XC 0B6tldD1qLsVmJ9Xzm$5K:O嬰z5DUt|w7;펉|`lZr|'j."|P&eM&Q!8N\&$߱MN h#C&='}p'DZ]=3Vy'ZuX?U2{شNMԅ̡'qoZSKSg,3>NtI$6Sw'rds[[ˈF|\< vن{.e4x^@*xx>^O)":0 M+.NƼE [Y@e?by[ƒZY7&X`]ZL7B6Wm>g}JG+ے8$gw֕8OxZ>l Lim%,{B=J;ٶrlFn,oz'{h9H;? 4t9kPRH\<esp%V;RՍ^Gɻ>epI3=ytQjN/wiNi"2u֝q5hp0OCY '`$B4n*PR?_;!B1HOb}bJ{z{FA@INBerwD 1J@)lvϡ9}^+"YpKs exTl4#Y6="Hի.KBp*6rv{k~භ -CyNѠ|7[c@BHs M|C[3T,9w r)"ra1@tA``'VL)-<0 hgLɮq[Y_L mCoxhAxiVR0QX]s6[l҉|Z?+b)D8ob"ЦikH,.ZDjmSzQI"Zȁ(-7JuA?g`5-u&^O/ _MCÐC둸ٰUc25ue5 U= *jpou^ݿҨ} l\IڼgˇMf?}#&r0ֲ{ l:ZЀ6%@]$D?>oki>dˈlWNffߞ{"*sĩ# е&Nvp;uKցq.T3s".@uGҽߦ'!tަh·vݙ9,>pl[W{FmhU$ȢERkIR&+ c?j~<˶p7Nj{땎{Gl?7Jo;t왭?M6 ":PY4CnE=W: ҁ (- 3|tծJ sŕsߜ疓1UO16 4x-{U<Η$QdY}&%sFtEjp#j+^~-ʲxw b,Wed~ɻ:y!>n5MQ[T6Xj\C QNu:au".Om&Φ'S\8v4o~ ;,>#~~p[f^hlAʰKeYZfQ if OA7: NT@1F䐃 ЕTBSHDSՑpchð;5 XNr? J,3>&tK`"nS USaҒ"h-[r̈ꋱ{+vWd'Д_8dS:,_M[e;}-޽yC=B4/ntFeҢhb1mV?h׮:b27ޠtnJa T;]<]?u#-x3*(D5P{84s4<ِ*EW, +*]0y3^VJLȗHtu(S.;C!R_yʐ=?E~UxN@/PgK2'- =Qᗎ"d D.`A\yA0 ":߆!u{~hf-bf9$McحlGw$ bhA_\ϞzL CC1fZ>c%' `C%;=U1R 1Ƹ,HmG5lɚJSE=Ei<;/FS>G 2Mh%T+D'>xXtw ZutkPHw+ʒ:}.'qlWpdi on>E6#RJV㈴F<9QX +g f |)@u盃gTǀF6&0™b`0.*xx>TK1u d#ǎ2ql5\%#e!THxޥxDpJxTM:/{>֐тT0^8oѧd.ePԨ=ٚTgV@ ydB>.S*:dn4k8}'??+iV)RqPR 8.-b`umx}LqAt@! +CZ.u VE#+7U*e;ΞqSrvG yO,,NPpTLurxϱ0IedVB޴S*'h5C8W} x |kT={NVm(n<4yiG~瞊l$M|~ d}"^ t4]8LTqTEZyk:S'4؃XEX|yt4/t1%y'yPD!fo\ʻ 7  W_r)HG Bʚ*.CW>q,4171EÍuj,\rlFq+2DOLZޣBP/-6 '9y85]E(#dσ^sľb!jH\9c |5vzZ]+t٢jIn7LֶNc)$RW9JNe({[gݽ=~wHt)abap&:w@f@ߌ{q3xD EtN%][mLEOcE6a{C@~՗ǥ=Uz#?^@W4GP%mzLٝ?Ԙ#Up,>M<U$iHZL^oS N)PjC$2V:/aPa}*=9Qs>=HgԊ8vغCC{.h,8AAA q ?jd$ڹz(o5/y۔Z2˜F;D.gC3mOMCx|&Vq<7p2G%+9>'ug:H/e{FZ8R4L%I_$~ZLQI>JXQ؟30+m2q>ъ:Mzd]&{kА.nyLZx ܳM"[mzTC7םU;\Q!%vU׉j|l?v32ߴHag@WS.q|1g%MTbjn߈\S('1,8qziBR%"ΧvJ/o{ītw `fr_=Qveh3wUX!^`WoH?y{ݞ:λ&rJvʹ\qX(@ nݬOL a6P{7?/bBySBZH_׽Iy\e3!Cr[\FZb'6@9d"92lkQwgK?Y, bm6^VZ X'?v]hTܮf][zՐ~gl5NhS^. hijgdhawqJtf-|o=Ť;HBm%` 펑V@2VPvIL8ݾ囏ǖ;9lsAh::($SFL+t=R@+F%3Y)bDGd'sq4 Վ& XrxBСʑYy(Ù - <r{,yTH* M eXO ICƅz$*xx>TK2 @H ?ٌ&UZC0IPӽFxA8f)N68$U`>~(kNI9 W/p;-D2o\$,@2eQ \dIخlX? wd/{!Bb ]Oq z_=<9y.p&R=H^GZHD,R gp\cwfșaWݲ uRkn%5&MmfrZ,ͮWE|)geڷo1 hs(%Qf[|[[^=8"y[KdTU8{bqs( 0  (gteV7O"U+YJ%}!P&#m}~Hq^ y Q.mîԽ @ʊ(VWe2~{T/n]3+օU: ХUfU8`sɑ}qnC{6aP 9X sD |1Z7C Yu`/`mOwrl x>IzCwv+V43:KJ,Z) ߲ G(ߦSf+/৕ff5D#ԅo]0&p%-}wt\f,){ʅF: VeG/Fg Y%Y!a ރ&̂ k߳8~0X[\l _q>1FhG(be 9{fsq71h2eF |@sy4B?9*^5%GBZ^莫T߬+ t P0`iuL>`E.гMi+"?;j6x+ GXnmT<侀m&+ T@ÏuA@ 2W%8=qqh wv˶kIT1Ҟz "uDL1Š4b],Ѭk9pxATcζ|/e1G/Kꚓ0v.wg1R+MBë\䡿q*>p 4v,>9 xCfߓGqL}k>'-|,`} f(5Ƽ(]-D*j;e-T0wpz"Ofye K`ւ28sۏ.q vTUiA2[k;x hJ#00 yρ5R)b =6W/NϓmVDuL[АvhX$ ?~C2Gl+/v&PDF0'*xx>ZM#)m0 @{ +>[ִ`q!4cɟnG=ye:&)"QȿHH_Āflcqg9\mDZh$d+.*1Wܸ7 Bn[x)7#z jFh8:0 H7`cnD I$VkbcI7_iQdPXcC0 ƣ;fSu@O9dId l"nA ,uMW.vDi&GBX)Pnz XT9;vV%] %VJFx~W N~$1q߾u ]veS(襰(X>4`?Jw_Փx̧[ڊdC]r =3͓Pnߦ6{}*-$5%AhT j^[7$(~Kcbv=27z 4R#{˿(CC؇w">H t-AƶvM @u%WiA[9Z~ wx^ws yX6TtS}.;:ꚐQ1G:q7=z߸t6ﲝM?߾1z7;?A}.!\|txq#~"!O2tgb~V$K#tpIp?y84Bw!ݜM4\FhK븐[.2>=22^cTQ7\ ɺ=W>&Q`"YtBJvL43b7ZϪPtms`W2#|,B 0@eH]v/6wIAsаu*|:/Ng*K'$^3ZLfg1KC;E'"yg81Uʞ[[JXApp玹 焺$gt1%sE0&Hʜ@o <4&ck)yT_Il'NlQDsoZN.L<3,X1A AQ= Yx$jӬlL^$g-Fm,E;[!q W*Xd|s!gC嚣@Q u\ G5@5cq^Ďi\wd[q s" ƶp(mL`o<9+@@]^Eeͨb:.錚.rRf>=CFGAY1tuzh |</o)6\*s~ð.ÍXS%M(/b MDL}j }aR:;iI#Y|w1? ̈́C|z7xo|3&^ۂHP 05"S(>CS|Qhtf/'6N`9aMZN]3ͲX(Cj5?}#@ P1*xx>TK#.]0 bLh <]# @b,3ڷ}qxREZ<,YWVD]-,^wBXF?-x뛫^+I:!|K80\,Wf-hE*2*"%~>iߠ#,Vbyl'K~bŁrLK!PIߘq3{AH-@yQZ*+]s~^vB%aq=['DETIW2X*4Ys3H,%VQTD =+b#S,6#uY~d)#]1мW M#~ې]f0"[EүҠpWsXU !CNRnffvv9N֦[}Dfmll36^uHLScc ,!}e@H}b"T2f}@mMύPi,{Gܶ9`QphFN ]I`;;*kV;Qz|h8/Wn1aPK/h,R&xa|dȠB+9G\;My^~ĎM vGm'L M"E&DyU/# rn]s~E&M$*@Cl35&rah7}I3ƒ͸xfas\.ԩ<\fO/Fi' gIAgKUTL#3;=?6J](TԘ0衬m>8>e1($IEAhԷ#O,kH64Mi98:`'A})G(gNa[)K*:tݲg*l,b>$۰'v"KHS2Fn}[.̝me<3 $Vki>Km(~mC4ۙ4a[KEUi{׿Xy-lDK]3?+"W8^MOt䫸Y$`5YlFn٢d&yɝTjOpp9z(D.fiPĞ/OW߰a ]{@.y+_kͫ#ha6wQxS R أ@Z˓ MR,KÑY-A'6sSV@_͐yLŻLYoU B=! ǝ>}x"n?^/HRliTnӏ'aP (S2~O$<tS]L)DJ[ l 0 wnH,v`O/≐zUo)ZrzѩkxBQ.9 F)iDZI E!KtCB.nzͳӅ6KT(s:z^lT1OPmCfiҌ#R)bwEkϗXT~\%cMUAAbЩuW? &Lԣ(VE&{qϓSd|SXx;[]-jI*5zcT=~dIsA'o1!õ,ً}՞H*(ɆM~e+C2{dL^ 6g;[\YTP)k90Ask gDRUس fԣ) ʆgbX勉-XJGVWq7dѓZvSJ7g}+9/hPnmz5vUD {Ų4 wJw|T=r٬6b|& p@*e()(YhX?yG 04䩒6/oQ(qlj\%KrS}D˃2zUC<l]ecgXͥ7ꚏr7Gest*G+E\=̪#ZQ 7^CUp!XQVn wbk|` 0/*xx>VN)#",0 @?pƁla'[ xeMsJ 7-[bZk]1бpK Ԁϲj`ʈd0gF&ϲCJ 75<T:å-5JNkٳ >xH*&$P;`VMtlmzN;ŠcZe  CP\u֠TH\LՉPpRduI%m\KMZ !vj[z}gM^_ɵ&?3Ԫ D~XBcKﺎ[{gY4iӡD$#I"k[,蓖D*J.7 \l8lh9u^!;RQu 5k-1lЅnPu@Z}%->{th)J]D ֦cҋ^Ym:Xvd>O˨X 蔟z=_+B7urt@"_G0 ޥ`_rC~ wwNGZݩ{ANPϰ%7^4-Dp^up86wqOA~յS4ZKA5 u]r(ł.m]P0=)`.& &C.cD0F/e50zUN݃gS<-‡Nou\Ls-U7z ̿A$ @MlfI:TLkE,j4y?O+j b_c q>xg w]T$_d駱p^qؒ}ki\;[ONl@GP굨;筈EGn\dm D$ ma"Yq/Z|בּVRcǑD{qZrk j|I#i.=KIU\"Ǔ.GPt?cDXw(1/R U[jZFir[/ChW) ^h$@Yl@7mcّZle0TңnA dvDSg];2I/"5:1df?I٥bM2**۠$!";Iu6 SkGD'?,MU[% u31>"iRQ=-R*}pؔ%6Qտ\6L!h粔DDPdXA2f0 YhA83v>eף^\ Xnk^]%33@N#bg-A,jٱ/M敊Y!fmfX+-(aaIGex`Z:Ǣ$y;53s96΋?rP,8"`5\) [BħOg4n,4AЈoM}6f˒\"g˿<%Z`z`-$@HV5 u=X-dK1/fcu .H ko[k5񲈈7n4z)-tS4WsZ¹KZ Ϯ> P|e! )cnRA^1 gYz 95/җ"6=97P=O>K4Ox~FBFMYskWs(ˈm03eL?J7wEK̫WY;: "v79[t",ʽESeֵݵE%rD8Us&8 2 ѾmaOt è/^椩pAZc-!gj75{EV˼0+7fB(?iKL!#rhD[uډk~aD6Mݻ bcu~pR"iހCq//RME`9( L,*xx>bO$" 0 ii.f ДFR@1d2x #q[2E5hm^w\GTk ^m$t)l;5Hep{2TJ9FՌs,i 6D;hQH.oEG2:!_&@VڽJDc[b2_ pԫڿ*ӧ3Rbg\*d\EhSGs/˓ '%ZtЍF8Eg/azKeЩcI,ݛ؍atxheWV|NϞύflCehմ +սWk9 Tabw/MUR5 7nENm[IZ\ %7ϔFzRE 4LVG0%2B!Zf+W:Gr\-Ya\tU l)5 dT?퓔 Y6zmBNb%E mЎ$9zbnhn ! 7< :y?Ycj~:`+?xM+?<(~mcz 5Ҋ&k]>`ngRFX݋G*?\A",P8v4Jj03Ii${r²E_V6+y "Y.lV-J dU%q@[Ut֊HAV[r\*`{oXq}2V"&1a: HD$~Du, l}rR6"Ė49g Dz?ՖE fIb3yy`r_VJg L:gig͌jc|xylFJJi,zݺO kyӍmR,UU슡-Ȥ΍qNBv/h3d& Cu_֔Ŭؓ o_lmf=4# doKQ=M]1p·jsEq;y f~ݕ rĺV ]҉0( v]+0r.2tUxv^v gֶT;Rmp7g&'Ah}B'rضf7j V@ tj+mg=K7F;ES1 x[7o}U7H[ v4&x*aߩV*HPI%G=+c^ǿ!,!7/0PP EY(K쎋 +='lfʿᶀ>.4eQh$0w~iK=u.f7 ٻ7l5呞o{eI[LkHy4IZ<ԗaU>3[qaê" "FV  ?1Y«HX]EQ}JCSyob%n V.J "&fY -*xx>RK}yeWl)6)Ӽ*h1 -lOL7Ԅԧr,JOp NIm-{}8,IR܊x*/9qrTD6tCBB~|Ԯ6R;ˡ1*$w`g *xaMh;⒒Cd[EXq+)ۋtZRne{|$UbzֹSߙ-ɳ t[V{e v&K", ʆm[mU<jgdRo ppƬtkV]W,X1ؽ_EȤB j 4Rr~ɘG^$+ﳆ\ɘ\)z'2vrYӹ(~ 5ap}56h7BM9 K(F #F^4I>6 ~ZRX^g:^_n#Z X \M иla"RXA P5A=?{a|< 3h 4ܹ|hBMFVI$lطІh`)Ixʱ&To-[b0=ڋt$]P;>A5XQ .U&?Oe;|V9z|*ޥL.f0wLCTA!30'Vg"ڞ~A5]yFvF(o- ݍ۹q>\>uʶ3tN&j|݋}4) _65E.s"6S߅?pQ:Rn_#tS_j$mPq ۈ}H cn!n6] jP-Fe\ffĂ9o˳g8:G=4HF'z '2ZЮۏhC\ ?EG~"KZ89&Zf(Jp!0ة³c:deq([vf=ܲmRذYMf5Z+LOHj@g%`(} _ԲQ);K*;C[.;J{}6A=礩jJ%09s$SsOBNHQk0Amlls\;'h)SRQ3Ʀaee7?T)5cz,@FHFs*!qoF_tkKR6: 8$fzc>W<^1_@;4}_r)5i#2C`]ߑsYXiU{$+? ۂ :^ϸo9ﮤ ;2gٛ|2$- _>я+ $QX՟{i7鑈ҙ  D%@危k[b=9ݭA:".tV(nihɐ`n!J4rH8lAӽ'mQW_'\6\LB_O[ĢN=/c՜j()tQBtJסg3f}KBʹ-ytz v&DCݍ6Cwx?UZڨ%C'7 |)D( ,Ѕ#ҵL #ZɺU]gPC꘎fyu-KR }$y[Ij^C#g8vƫQi(Cr+KDff8*0R8|"@Uܹ8-K@;<ãҷ*.g$B+8~;]!bjhi˦8qW ؏ 17l~#֭bɜk$!AegfƖQ.I}SCsd?/1_=poUGmTakSoK_Z}HWK=j=F(mdS''gz{RIb_X,0ePvT1{SE"U$[Pk\2m :oM 3A vw2OUg *gY9J4KbR適IGd[wj)fxH5QzXv1R!ekVLXR!6y<, K'! o[dWxAT-*9]͉aO*+P0y:w1z+6fǾi':VP'-ilxMQNX977PE4NŠf]b/jK^fB`:Waddxa{!eP:*xx>TL#- 0 bx%Kzuºӎގ/j,ZI7~xC7h ɛ&`{ gvgX4Y^99@FYk@68ڗ?+W98n_o~.4s}l`u-CjS AľJ-*P^ &vtD;'IwI{+NuP%S/ot ь$Q/^AyRAkz̼+o춌PG9Tb{I->L3i_$%Xt~k,Ml-&q,JycA-`s3F 7dwSr z[B8UT ꞝ^".UxꪟpvF54a-2W E|1.dr.OyJځSƚ+͵7䲝+4fj$MOm`ݙ8Q@SmRw!HOu49Vc×(yuc,4r߁1}cd7qZ% ^WCa Tsvulku.Z?x=j5_)蓳Х$XDDK/0$aHN&PC5`(]XT5Z6, F!Nl&&4$9lQѓL 1\'Yn%#x`brbQ|}8P{gA<2S<2ǝ )4#Hm2 Љyk["uƍ::; HBhêe[8-۞830iۿ4g%fm{R]E^΋^v?d) LE{9#cDVՑ|.9gL%18C5 .8.a1 H.M*e'n<>וReN{q~Cyzt5Ő.36'm~$puH8LXo*0<@Tos-2j\vs@bt,L-V`=NhǮBd1y_0.z&/ P0%T 0i(lsN󌑬gfVEiΓӳ]rZLCE"~գNΦ :y 0ṫgУA i &xGde];$p33RД(X8ֆ3_Π's*IS!JXC9h,:ZY֝$Z Ѿ0f#6RQ Z|gD۫`8?p7Ar"N)E#s"H}b˸ 9'xh[ ר.EAvE63O$HecV9+im &_fR+/;Xy\óv^Zt{fp { 0qtPoetl?}ws̒a{fMJ-/6k+k%y ɩpgwy @D!7*tA< k:dgzs)0wm D#wO&Sdej\8bzGhtլf} r:e'߾MiX=Fӕ&og`a=l2`ϞC5+hnP!ߑF=eZ?=Rt:uߜ؊JGF?8+K(Pʟ7i @ԔASۘW޵J,AIBȏە9` p@|h~hOHûAq-b8TɭpS0L&o_ 9!fhO[FA5]Y[#ULn&ײ׮yHrUqi*.잉:fB9L-HWǯH6"2ia: S GS5ĕ#ׁs뛆% 6lW?h"ca*0KOjشъ^PUѤ5Yr?']" p7bÐ:\J!-o90$(<<4Y#Ov4PX*! Sbn`R1UV}{7&Ds~-F_zbǀ8UFY\HmsZrt y6&8_ۧ_L2D-s7҉CD TWbFǫ&YV@eXASGvOW0 jo?ASbNS I$V! ] "R{ʯ㘒J@]*J:^" V!o6e}4ݗ&N A\kٝ`Jl}]`~&EixuC(~f ݺՌLX_&"Gp}X&6\'PMQX\Xߒk\VO6҉("1PvbfU_rIsk,m0 RmZX$,bs2&ekHd]R*` ޘ^~*_PCx5ALz9}{x[89 ?5 L[6변ThJR[8,80$/š7VUm>^4& -d<I܈'-|+?eٻ };d;n{/f(p |1"&īGG~l\3{LdL 2\~B@!NcCp1n G6DP2( OB  h`9&O=8hɝܻu[#<B%Fj";{؋o[l6@;Yh:HܕߗsSYnJy5)xtb:)^.U*fW }VZ%ע.>BbiQ|zvLDQ˄U 6{j:ǔjl8AF_LegU1`"A8OIؙ|L'1_s7Z &pF/{E>_Q AX[K94??T$v]';IK'O*T?0b]Ǵ:Q ^:S+"ZőΒW!qp*?+O]jdyl$'A ')Jk_,>O/PX>%~K8CF}fD-^pHV ΌR^~#dVV꿊AYU1b>*KYtx-3uK{ F[. 3*xx>\NJ0 dư_dyvS>{4ݽ:(6 D&x&Q.BKl)lQ{ $TʗONK*0-o1x@Z(SE6mΒ"]]4*M+'vF"~i XM~ -61J>E ѳ@4"{'c %ٷ9ĸH^뎞ng?lΕ( ,|X,ڡk,dsV~x5,mz7qtEkDӃr>7 |Dܩ˥]`%siKjRwS:+G[mCƨ`df%s퀰K1l@w:KqPg.-ƶD)#5%zf_Xn!ȹ1>us4WSy#sL=0!B G^wl~?% +?ocPR 8PaͥY ^-Vwr8(- jSYB\ΚPhvPme 1f[[ު U&؈RJGsC#vezf*p9)~+2!4HlCNk79 zm"dō+!-`(c:_<`O#(;>o2S&9_;,9wXU7pDd4q**|()]N~զ&&m\bG5}&Ʉ]i*gtl| r5x\ p-JO)9D1B0WW'˳@F +o.ZȎ6 G?n6@FWND]%p e7ׂ.qt$qͥ/۠Qd[ӨD2˷_g.++sM_&F:ɏ9bvPRmgxԚ`go =ȝ SpPtzj$wrvzuo1:@R`K$euMp-u]%u댈#rY\䳢S{ Qu =a#_ʚ kDP.IBEa4 dfGJAuՂ Dq'k-i# ퟯV*q*hgk:I=.e4[{z'<}.bJNU8Q:m]Ӓҡq|hU>NY*W >3ϼ8$tr=lxӵ}iAGuI£hzl>/._vuo@NC$LRH淊8tAf ÑzyCvӷبpWߩ0q\.gH-x?̶n-kUlNI_bT6 [g\mң‹s,o; :jYSz3z:B_KD2vzP8Asp5E]]7S̼ą=O.Q.{g,hۿXb X =7 Ƚ>Z!j^/_jd7 Ω%Uw("+V[hʻ=dֿ4=OL g~gԷI+E(vr`<5$nS% G?FES 2嗢sDI{Mh"phu_!OdNuL;bRP7?x݀b6!B( %* 3cIM ܈%{0 XVj6"!hWgv"JVE GW~!B.h*Kꡆ[W^O<|C2dЬg# V R~ק ҕ}Ҙl<؏jsM=|*e?~JIF+@Ε˳9 ʈKfcj pD_210PE8,W B/?rQ:F12E]BJI\ }^X$ucױysgP @.j/18E^gRp/vɢWKkUˈ3i~& I\ 4*xx>TL)#.m0 dLM^|;ϕ!h q>=9z%Z pnrfZ__ & ?H1Ch-S-}s|Q]vptndNe3Ex+=ob*7CdR[6+1Q'vU/sjӒ1PM2 gѓnSЛ8فZWb gl TzƉˊ [ }S+rXZPcmv7s3A1h7zL Y4~e']R)4ٔHO/1@[q)H1b. ݗ+0-;(,NjE ~̴5  4e$M>jO|{}< T\ڜu^M -պdZ,c:#^ٯL<٩q66Q #%u58!)+dSTX+>DD&٪(]7Im=J[֙1|-'<P%ice,Z_VZvOn/K0S|gGK!i K >nvJ CǸ{N&**zѮf㶛$ȥJ% /=Ej~yjz]2.f޴tS26.w&SMzjN$G(mn3C J2Z{n3ߌ.*D)s `ccY"Pڭ(_œ鋌̴j^l+J:{b驽d OI7eއQ}~^ q ,ǃ?s$\a1\\9MМdЌLM_RWٷa iܪa#9!X2CL׉039OJp#"RAo|r< ϔ<2h"Q2=|x!rI.!&Z*#dB&سIR.J^.kTb`r ~Q'h_mvZ_J94uAc'Sh>r-@OZ[gL 5z +B@kw* Vrerџ +ڛjR >H >C+ bR41I Eë4) VwEb-XX% XUSCpO)z <ь4ȇ^[cd1qtDėUYR^cCw.CpȈCgQy7T N ʴ_"?(JBPN (8>6fS`cx5std>Nܞ9ҝ6(yXW2pTnC4 ^@|hl f@ê& Wo?qVO+݉@k"oE8qcXOKub^%=x|2Q+liBDpaP~/Ur)`xA$K'SA5 zbaVz 2")sEaȻ}&GŠgmt,5E{e@f$/։ 2;ukiKX#`d=Of!۬p8.0fNF+L!5fԏ _Hwybw-^ Wp%*xx>\O) Y0 ie H]A#9ZZ +ٔ7/˰ neɟ-h͙MrʲC#}ILHijּD@P>|70z*8R#,qh\޳fF#mihg7fE [=6E}M%PY#]: {fmL>"% f-82$dvez*z4 dP!d>} }-MuU^.Ղ[_ 'e7) B26mvT #(s]R 7x1ǀ3 _`$̨=qu<@J zÐmbkh6Q{i&, 'iB(z S.J8 ^,B2${y?W {RBnF?7Mc]&(jzE0x_NŤN Fkqro⼁,׊f٣9#*L +Um()Slt%noW7 zyϧQ'{"8 3f*]&>->G1R  8ܾ\U'!m_UJƜpq]u$Bm[~8` SwYuXCp! !/]K:,A19s7<:_d3)p8ՒZ $M>~^ W0k0y=ʤ>/?mEtU>` %"/ e:Q֭yWOsΧ`N@TGVgҌs8^<0AɕfEzD'n?m҇aǿ?`i ƶH[n;Qmuu3c{, 'QS-lca&̰M!=*C$bxн 0f7wƑ.Խ*jԇ\P:7Pd uz] rjj4- q|XL$"] 0 A}A0 r:=[KgRҿJ˙z%3I5ЯykR"paJ+Jfҍ`Mr84f|Dpk->5ú(jE{ХR_J;'}&2+H^ D (d:bԭ01 ,59#Ee8OuJ G+EAG5ڡwrvz;`bA4#Th%ڽ\t3[7t yILP-[JgeitgVs2zcr̗Ce'Z@YRx*Y_$${J&nS_aKM伇:-d {Ć_ X Pg` P} N^o44e7 CCL7v12rbO?鵉-TS Kundj NJ}Q%Xj5Oh&۱Z]'cwENm?הh*a@xTᇓ߯Xa%c%tHoT딒.^~\=;c[b$:͌TuVaRV>SЂwl0ɭO$F!O Ѵ6X"K߽7[ E1eXvϳ!myFhtȨL F P`,ؽJ920@ߘī!89u7ibB.Ё>”pe*Q9KP %'P=֬,\N)"Q0 iX?@Oա#楼Jj J=] \x|^!Sݬn]FDiֲrܷ0TzCkciXU,itE_2dĮ8 Dx|kS(|E| zkSTP?fzH}1E!,%k׆@םa'K{en씱S+%ʰ/ƟoO\AY`"&h(&8DZ7w]a;1V+elb;`^{/C c@=jh" gl oh\N&9e|9giq)# [?ʡMV_u:v0 @t~#a,?@󢆖sdN2m.튮p<+B&94 (ZOU"dFqsۜbbV&fin%85m*w _y Ԫf'EW&}^\n'k)2/TnyV,D$]=, [l$n*#[&t}@\j+b#X$[oc0R=4.) ` A*$vb1."+yCA2V>kS^UXr N VQkkhOq9@[bnM& Lnu$)jE[|nN\>}top'\*"*@'*xx>ZN)"0 @IHAkr1JcV24{OZ9Tt @՞E gE|PXX[kq?bI-^ ĺn`>3,<]{Cjk oٲ6 <@0/=/@6O( ­#5jhXdh/!9TUqX>B;eq6FK ],ariIᯠqSG qlq): ;4y{ݜ]M #A'SYC7dn l۝:m)zi_Vps" sN20)=03\NjW>eCL7\-<(ՙ^z߄]|zgKVj6jӋU"j2#5^D+9-m!KsLu@g8߃Œ;W}Jrj9٧̈́P]2#\/V'>X׭\B6ڜV ܃\{VuH^*^ix,ak\<>Kӽyd'YnWїֲ}]gn ehˬkf{' 8iW)P%7gsm(}XV=pMBt\1`@lR_j='>8{^$:z YOH)X$@6i8#K!t$/8F,l /)edF=rΉ,&DKQiۇ]s Y_CGt) CmR仮ys_.b_n=`524?tǰC -!|ȘW&qy `{< Հ P'*xx>XM)0 cpOᕓj@ւy|6L?`T1&3+TWwH?.꺥qŧPZhJQӛRn#[r2aW~}WnlIg]@1MJ^w4*ܠ!Szx eYr\6@E/{hNEIaK(P<~hϟXm^ ?wʾ:~aJ Ï6&* `;SIr]DޕxAZgHn4ho"Ab,$3:JcMݳv*Z[^{zIg/ rl*%j).G,dH.Zݘ"[$mx &ʼndO{~k^9._s7ڢ "<6*_ UJZv 0 u=+4+]ŒK aX㕏Xn|~H_XoF c."00aG3ٹ()xm6_5Q$=ē&$'}_k !'r ,W"5c.zАسf{X_,>H=296 L_Oɀ۹Mw5a2L"&FKj[۴S~$6b@cE#ry$}>MiiZ.[: rgcâeh=sPF1&2}fӫCc6*vH6asTv(V]2!iӏ(^ǩ=!H+JH9V]|6n*J1+Ue2]cN;[#P`40M(9N߸Yj.iL[_X-i(& docXDxbI&/I,6ԉ6b#ؒ'<ʾ>9 PQ2DZV8Q*"L(NlɺȺ(ff[)XJ'onɈkLXݎjY|VbXvԢ7N^m>"`gtS[dx[MOZ> eY>,}j w*0 ^(%k[x26ĆU{Cp{nJK|m|V-i[Blx+HDO †"E].F| \icLDtaO &w}g|~p gVM/VW'A~6},H08^[Z*<Əht"go z=A<-0o"6*k~'KKR~A3o @ezᕄZJpֲ+S#U/%Ku5΢O:a5R**xx>XO)#0 b!;BI?6Z$.Qh+y]x-]Eێp #{(- ˹gE򶟔MKQL**GORWH@iIN-KC a 1d%= p\bSn("rϬ\M\XW /wӶ#͙Šx d`(R̸e͑n2\-K6uqMnX|1+P65qZ#9cb_.=.D]=yԽ1ȍ[~t4Rc\Hj8]?@W̏s?BRe|orBbu?nMU 'zI"|;3J`$#fr.ZRW pyyԐ[axO3,BY:0TjB s=v˧Ul4A8- xbf9yK?AsiBH̀j{h8b,"+)m`50ٸ촸d?\Ypw˦>FĶ$&-li6I$UZ{FLf;`F 텙K0 MӲmŅ6%:)2ȉ|YGFoX4I|AßAiD/֋ fT.zUM}cGVˡ`b)[ڡ04 5io{9uq9>Q3'g0 sGNڐr }@M4rߡVÇ+^'+Kp+mGc{35Cч4(41zLJ0PC9,GC\:M 4ǯVs:,Km4xT.ʜSkqA\A/Ոf-m57P czUL1r|)p/1Ic\![G72`heȅX|A7tVJ\ tWڸ iWࣱUkίBfF&l^[|ߏqTCsMa0B#TMZ}ts9+aKވy**Us֫XcY'36X9kCC9c̆H|)7JxyNyӁNAEBi^|꣞0&*~~>ZN)"0 iBAWaOѼ}nw0 PV!XfD}9r@bLG'uF$Y쮶:xumʉނjP&rP YkqҨjjY =W'sO7jy;d0a* i,My3ѥΊb_i;JVX"J+`pj~!,$(qdٝ< .F)=/XcfEpP, Pw̰7

    W,W:fc!J I876k?E:*!+NJ$c}]v:z@ynֲ4xDj8[`!o$pz9L)S0>^Ȥb}*E-wlX_gC@4!ee@J> =kF u׵lduK١B*6vu⺺%PJ2rHJ)vteq%tHI8㣹)#)#xܡ0@f bWܴU^fah .'dF^&35)1%WmZN)"A0 M\k`~0;NfXuN0+]ZNoddOm/)p=fXk4ͫJTIޅTy>n9msECP0JK+p0 jqwuKG+K5=|ߏC-F]--2rO˧Cŗ͹L7A8l0p9Dy.Nݽf H\?$}у$$pE,8n6%Egt< mP"0; YḢ:nUlb>Щ('C0$%ي+WWvgEbG̪}"XFSmrGE<2tVF`Eɣ'͏(Mg즫EdP zS@GVثm.nn[.W>a,b'ye׃n}sL:g8ZYgn(b*b "DY΀TAt$X(G>d j%ח=byv/&im Zrfk7,Δތ:',pKKF?Qa(i# S,:2PK8o>c`AaC[9"h^7W5=d=2/4#BQ%}7q/չ?} ۏwMFDuo,FGW?d \Y1)cpQmb[NgkpW &g!DKRߘ?<͓_jd`AV@2{QřLveZCĵoSH)ytO5]w0pyTh[azeǭKXelOc;~"(Z@-_a.w0GV>ZǼkt}H9סBλs,1bk~WX]XȫuL{f<9f`4fk_'L\ޒ gc@ HHRJZ^7}Fǘz*ԭVgၠvGk(VÜ83k >O$> }Q.I#跞 7MKB`weJ^䭃vuKpq[s/RޑN6bslio9۟ѓ( ¿tì̞'"L 7.>z=ly]%AL^Vgn@aݤwKu\)wS/(zUZedclo6igWڕ߄k<7#ڔ*p&w Χ~ "z*/8{涥O[}F&N+@-TT,6 H 0JI/R9iQrlzT|0x9ٲq9 n &:>֒;C]$-De҃@ƟR-}4Z|;wj$V)Z#0಩A45M7u8=a̶&he*!hYM1ע\m~C[kr@ J OVL#,7{܂%z"q gIr3U;](:k>k^ bxQ/-GƊ @5ٽni(qrTJgc;,ؠ_ẉ֥@-3m4$(ZrCQLO>p\=/k 8 ,REML銅}cÁ"@l+*xx>TK.a0 c"b[ ;s,W׎5#S3"FT9Bʮ?+Bi/ZO% <}ſ{8nWo20nF)uӘTeoJK_jށ4& Ih$Rwڨ ųxڑbb4}$MehmUg.9W'Nv`+kjQl9Ck(|cźZx˛xFHVo FsU0UUdDnǤRd{Gui##a'^0]iOѦ\{,gHasnjDRa+('R:pֿfS/X9Xcߕ<0ߥy'@eQ%K f=Bhh/۾q]#O{T\VkK=Y !_*7؁ 0uOC|r+$έ;mt}!x ut裎RuƵr.O O%LAXP ^#چ#|s(ǩAӱm%2_zD&w ]>)q)Br=+V!1%LWx A/ uJSx6(քU,>5}_dgrqil,-$V㘨őθ DGywO&Kۭ!F謍9G2s-l,AyU^5T׃ 0^ڢ:mP<@^ J) dza﫸=@7g%+~ɫ"Bk00yX}A>\e:78R'T>wTDm9`pťE*۝ z#:$kTP]sv~ЩԙgJs[׊N3L~ %auL5y&<< ⚤H9d`%Bǫ"ei4“~8`Am{nDV&8.KfsE.:pp5(=PM,ܺzL聸?{,YZ;F8zԥtMWж&% YB3iK2٢-Kqj2pA6Gg=.Zo),>X-. !-J~38E0-u☧e3u ՜cB0p"ٛo 904,XԕFpdlnh} O*^J^3읖f:0_ . _+dy闸p|m&n j \sг  eQjJM ok,!,Fвig\4(.=$ʳN\ P2*xx>ZO)90 i}_@>ʽ̰ܯv6/+ZC '=]VİH'Cr W>{hb}7"gi5kv8l 0ֿM ṙ YCœ2m;_\h+H=fE>3D lfU+gmpngrhPZ toqΘK0a)Ɂ_y+SxIHk'UÉϪnK4lf0ZCh37"1 CeO?PwV/V'([5ECiz҄I=Kiq(Ƈd&gqr̙SY@ T d߈v}L;ng[X~`"r/j^rGmBę|,VJ=:hi:g 45IΗj[LxΠ_K'jɆ#HCI/;jw VV"\!(ڒ- RSMw)E5<JAOybvwTUPPDfԞh *4}4Fގƚpzo58tb6g3@EhgeZ=` l,^2?D@32elEL2; v޶_S] F1ș8bqU P]~|<`FyGK&&Ԏy~<[EDAC;EW:Nk5Tr$ZH".](ͲNbmB气&g? 0z,(L'H1G%"|$Y:DT"[degv(ʳ< [+ד ?SIɝɲ3*a(ǘ.6~IE/-u[pЖ:ۚJ ,Afɂ63xMIӒO5A}Uo(M.- Uam M(\Ze! ڶkhzc=Ň28`pξjYR)<>~bo+jx*ޤQGK:#gQ Iw|X1yPݐFNd3XaOuJG9_'ғiݩf5P9XCz)7" 检BzG(L8(l1C܅?3qjM{9owl]*&V(2,eōRka4=՟$eJ^##qQd8oH9Oo'/fr5uLq\=4Uũ6UiFR.VXP%}PLKmh(G$T'cx|`^WFVs1ϛ9iY݋NjF/Xo-g?k;>ݣ%P!^H#klr"8a~0CtJ #%sE}pqhܝb}&cITp*xx>ZM)$"-[0 eTo:( >)\]0?7[IPoQjYk}DG}EnXeh̴yv4v",%~'Qԍ&G0d᥄妍~{q:ͺE٧i A\0uak>|R Q]RUF,:9g?vD 2x=#jh1/ %2 4mKbǒ?WM?Җ Sr̔I:*'qJ"]üX^35Ӓ)-p!F!=jwǓ quƑV"W+M-"ikh+oęr܎kx4O$?mhJY*:#HdǦiBX/(Twx ;[ z>2LVyIPZO|u4!lO43eJ!7T}[*?/L )*xx>TKs @(As p☪?wU%|GdrE#%,@Ռ|ZoIa]<H҅*`nL=,4H6b:O2Gn ;q&ĔZ Pu}'fM/"nfաC(oc>b%G'o>e4fޥ= [U?KP G7uiЄJgytܾһ荶b=TK^/t΄t5}o}B>'\r6bG7qfGw.@gJ7xEO{>I[-tpU;{PaGg^ rVJ]1et|7~YF@ƔP-6$3%8;CܶUX䣔P??w0Ѻ$vKeџDb4,:d@p?`*NID?dv5lo>:%3@WG%"p2:VjIj&lA˜,Ud~_ʈDŽ!n!3X[CG8L9(摒 tΎ% f!@vJz#oJ,97L(0㩹7 vM6I2‘p1ܻazsmeYO97*$ʹfFOᒘWk+ZT`xgwv !v1ͧ A sA?gRp#VAٕm )f,Eƽ,55?+M6R'i҈nY3nН.mjўHSRLΧvͬg#T ^KyD$Hnj3HyNԚWm8ʖV!rc.dY Xm,ͦHMP Ɉ;%0a)R,q9a"7KzUw{'{b%A_5h=so87Nz`p|]9䪈-EƋrL@^)fF'X^^N$#& a0 bΨSMF4H XR T ?N2VZ k [[Xhf*!|t_ⲠjS^;8:UuH/i +hk5n>b۫w @mQgqUoCg.1 *;czK.LiUǞ4lIJpY@ @f: ]xgDDL/%D{*ȱDOj\N!`W9U?Y)г#&IA2ՄR2VvR&\a:}W7ym@zCܺ!ndFPϱoizΓAb&/(aٹu>63,#Tc_ ¦xW|bb!t"N(E ّThYQ=xKe:d_;1?HZ%lۘZmʑU?%p*GGzPI_̔=qSEGa-QIء^fw0|헖HLD?FG_8DN0|_h >_dLS~3V&dPy*ֱ8ol8QkXŨ%s9'^پ3nBߐ P ; dύ7zewXar>3mT/Q]JTRސ3ѧ/P[m}*~$9+_|gr( i3l{ɖsDrވ3̞NϺ^:u><䣕^Ί}MG- Ua'wE}qo8fp6+iHNj:yD 딴,Ga^RF깶D""ڛuz">r="ĸjquEt!"(|w1S@1ؼ%I}T^LVEӧUg J9 ĹEaݘVXryht7g |=-`vRC1#N8x_VDB\N.i0 itdLLcWݸ]K#2KA:hd ^~GU|(B3s|"m=K1*'V@Dۓ>]n,zyc_>}n2&Sqgu+㽓OxR^+(zm ,)L ȌW. 7izB\蛮eK'uHaݪb9Ҍ9/X(bn|Јv:P$뇕h<opS[л:rnr|mݳ凜Cu+uL!y $[Y\wRV%y;M7Ud30 ̳Q4/yc%XXRV OmJupFkfs[(`mf06_7W+t"k8Ha"ҊӃ~|Ϳ鯅JuMLwSCa6!|;R%v=œ+3:Oed5ȼ#} }yH$P'悇urt tDxR|%v%yb|Ff6N8O/&}g+dupPYK .gEJpR?7eR:N(xJ{ЅX:&CNz/i{z)_` %eޭoV3UII]ٺ{J~Ĩx)ZIe0ҹM C(c)hceBԔc #iۀ5!Lol7a@DY0qsa=,bF _DbjgxD@q=xh;s^dz%CI.{G~}pu1tB۫CB)͹+#vQ|lЁxJ|>_ݧMbݪVHc#|rB4}<-RQtoM._BvhJ^PaBƵ 65IJv{zѥZNS_ّ7KHs޼cr?1'X-O(FZӷkB.C80 y<؂u}$?WlqOՄ%Ĕ v^S-~qk1*BiՀ]:'HPhr_l[ -*xx>TL)#-a0 f͸ NZB : @ OzQ$ljdmRH;;l]E-&.fJ r=N(y:Ykǂ"{IMF"xsVvqv{57lbG۾(Z;m,k/@R@ Bc߭ݕ;L6lԾoR,T 7Ъ9E/QbڐhM;z!%n 8 bKN6tZ3>*0eل7CF]supa*63z;7k^fxCV*T" Fm-Yz*2Mpȼi(#dsv,D B_S8Eכ=e ?-cØՓINJ7 >~X8zAWn58u*2ĘM(s1gtL[ݘF'_ngw(wMs̏wO]ˍvd\y37w#+]֎@o̫ k8zr5lY&-ufֆKU9x$ND?\Ȧ-/vYmXN^v&V=eV/=:\˼$es9QUb% wn .Aex$ωr]_[LI߯*'9&.\9e.1`Us*^7/B;n#pW|yHWvCJ^$mVx|gO'i\|qɻ+WW^?G[ؾ'Ug.o H?}ˠ߀AM}^udxSx=- ښ5d-ՙ~RkZ)p$ҽzA.QϬ>D116?,S>9#eBx̡ADZ&91`g~}5z[: #W'.&wց\ӵAI([*^ 9@ R:zhod/r[djjG+8MX've| e|O3D!׻=fi-XF"'NzNASBiN( {Le23mfV$򿸔 owǼSL/^lhωO ] h.\fd:`Y\!U))`gŔ/lFeZ/pk w^S75>}LBQ+fYo(ktjHVEa˽ 2pr^rP l5u+[(},젺A-0lq/ ̂ũɜ(tS존1-CT?5UفS_wJEW<"5#ˮNP[SlmUZI4^qy)D?;yw&3cX.o&x`+ިؿB؜뀲~V^߾]6 ?vf,8d|]GֆxK 5ڗBP>IW5UAŝnt s 烕-vҍKJ2H6־U'tlJS&]v9V5?Np؄uƯӮhfHmoȠPcggV '{qAFІb_!0ڔκ's߯4&"i QFur 2jX??~ڬ;tRfsc)Mk%nOO,GmM@S7 aۊe}QNrǗ NlEtU|МHAKE ZM^nFLSn>,}I36Q t<x$h~/qjPmi@3_0DgڸM$ݗRMa" sFҸjXb@(+ )yn囏ya8Uj"칮Ԑ)*xx>ZNk0 biV+7k&v׺Fى¦ uY<3+*B R[oX]Js e?m7yNv dؽ:<0J_i6rc#t2ŭP Y2;qpdӷNʵqcP\*XOD-fhw1(xqOGw-OBLCs(.<`>zUuq$Tc2c`=x!WRqWqlC;(hYp WfjUGl;s'^"6ޭ==ޔhx~>d aAŞY=!dz{TF2v:Uosas(j{x&#~~"7rcΜzI3# _h y~^ssB󯙴%&o|W]– 洋6:cNe 7Z5ca.6~)n \Xu{jB5BƣU K#Uظ[UUg:N07'?N'93ͧpH@Փ'p K&ٮil>OsmڐK"%ztۭ*]-k?JtoI5  4,~2c1ݏ)8$b>.JԊĂWT,KIYqGK┖39T Aps4|`UQL5֯|kwBQ #z%t!!:l*Dm eg6x5|y ܌m-9Q1ޜXZTt:8eE;Vպ@S\{`> hNT!q lWϖ](:e kư!_iJXkC{\+W=-QlHA7bHxOxLAⲫo,om3K B-d$l>$&m;f5C"aR/-}WH.YVF/g#*317Wv:m\^z;HACѪb$[PUX1ŀ"Y)B.gW^?Y1AsqIgLK%#;s if˖P ʈ!g#玔kͳ/|xV6'e ~ iXIFDwm}m | =ƫCh)܂(a$`g 觷[Ϻ\RҜq{rke.MO= h"❻['6h[>H9]?C`圂D)6}ҡEeAܲt v.QC?_ MgC~, hiu|[agMoO!⼕6~Pq'yv}ͧ3ɐlEtaߧ|smUY ,RSX߼]*aVtjՈ Dn@5⠩wj=9j4+E ՙ?LfP7Z.Q1hcUUJ5`<&RZ!X2( ܊L3c*Y=2,S$Jp3[7`cCr"у ᑂVXf \O)0 i:2͂[j2\ 8;h0Vd-&#YMZnu@#(ɫ${aGizZ cӵSvȆE5lv2~=WKz7Hx _p̾qtCÈ nm#X3 ]ͶSOTeA9n":\]/Qeomݭ9H+]qwg''cRa)֣X뙔̞+eU|Y.:#Y?$ ?]zЫH1l$uV(pqBC|T\sg9̸vᱠci@.g41GA$j7!@[Ug{ |o-ɂALP'H}/?gs Uer&|,SQšo:lֹqVFS-SZ9tm烮¢H!rB[m21r󸊧49U-K4m3ނQ>_ $`4?ʰ=tH!mݿfoDZ :s7svYGCI@[p` ۟+g;Z:ֽ;St{Y͓]iJ1t3;eovD7LꞑY:1fCz:ըJL{`Ęd"Vp(#?I <;c0H2ڟ/>ҋV-ަE QgO~|DITշ] k"x?iڮzAW*#~ TPZٞU=_Rؖ=GՂL^y-D>ul-aҢm CV 6}_n-h"_"#T)2^}ߺrA1>$012닳0wW,K>˙xY}r BmҜ*2A*dҎY52֗hi|iF1:Q4U[aʣU{jՉl3%X6Jل:pZhB̻6UOcu_o=;;1'fa5|Qǧ q伫)OjíVU믁U_76rxfdVʼ;{[qD0[[IzRo;NU3fOg ~b.;S/!4Q1N F2/͖93H_ >9"fֺ+J4XV,0гa+moHszAoW# 8r3yAqg^W$Z_*1VMe!*-uV%}@%f+ua||Rä>Q\"WL=CrgRhdw䫹vJ^J/bQ)*[w L3KŢog-WB4?,3eLr$d MX"B'l4ĪYsV=vsj~څ ѹ<˞v_)=y7r2|lڛ/OdV8[w;Bwk‰Juo»p$pj +A_^HGd5 +CWAk$l &U¨)~m"4?@s&^hvtD=4 u3ή}')B++gؽ'6+llŘH!5'Ae\î*ehn$pi# S!D`NCѬz FVS@%;do$Ui)d#x~ψ%40o&FzD 'm{5ְO1Aj*,#-lpVoStih.(SKRufrDu{VW=;m{[u1o$ޯ L)=9f7cJ)rC9;׻ lLl ;HK&ngMl2LIåwKKﲃXdk_M. ; PZXވLP-2\N0 itegx߲ٕNH H̻VDdڬ':%zW*K'0DaFm0{{'_)Mm_WNĸ\LŇޱgl o` 9Y@gt/ C)O6|0g@[:L^?]r:LMpamSXpؚ"1.OV}^wQ>fqa}yUƒlle g״<'8\5E9/SP/,Sq^:&NTFOgI|c3["%Ơ|}`{b:+)xvܒ60 `_8`A %NM[{9߳Dv'~@z&_9ؼ`X+P6@|j3c OۭDuJb ?#pM✶Pg*<djTVúvY.Bܶ`c Q[`N9ޠXLB?w9uI`i9M>I9pxBL`Ӎ3~(l"(Y/`W3λgS* BԢM-\FRmp-*<^Ooj@Pς֝"xP,%0 E?F+$нk,+|2Ub;I,=/{U#&IF?xp#9oyB&J2_0E[6?Mh-ݕK,d?iS"V3=Fx{7,l,shP C} ~woag3\zDAN"汒 5[\w%%+A-hH3/w -lF(K8X@2bѮ.d\#"O g*9uωXjl*+p2邫5Nk+EYƹ$ I6Tg)ACŲ26LL[t@kJNjjM9cmN+/{)4KkԽ~}춀zVn:T,󅟅 PEVFYĭFRٛ; LBwoG3i 9F]Do0߼aW6?F K(H @{gd njW\}I }iMS)-r[}zVt.]pj$Pn:4?&H,L&\ VSP1. FIZ(|*GsubĞD?0|^k G?MY-F{w(*9 OzbtcY#دӺ._UEѪpg!<ئ9Ƹ[JN4I2I,|\yWݻ0Pe,!xΏiAClz71F%7"p,*xx>^P#%i0 e0Ө\V֛iJ0>2,;r6e>v"{š,j7Od(/W]jCqFx2R(FQʗnkCmLqIV>5 iq66U \ r=̛l]/]%'2MbB>}uihhKCne0]NNM _~Kh 6Ny;)=!7b@r$U̙64@9 2$f[aOV 0*d, Yl%+&f/Gmtd ]j[~~C߅ tjoN%hw)̒uoX|B,\U骨<<׍odp WOdX8tWMBV6P?svVP? ;K:Es]bĻ\W(_3Q[p}[JVSMjJ3DP^7߹Gk#; N.4gmϴ(,\nf!8ue)JN/=v(Q}\ 6 A? %'qa"_"1t4^"c[ā~yH*Fk[YXS屶k(&_GumhʶtQ)]~}|i mɮ=Ah unMk^ LG,P3B 0Gռ恆,/a9 U-7(kf$ Q;$s;"{ -5*^tIluQġ(Cps*g/# ]ĉ !sʈI"qx9"t_:+Qo֝&6P#6Td`3_]0u[1 hl.&,h[1?W?O\v'DXu ]M2ή6 l䋘 ] tx(B-e2h"B 1tzː4MiF]pOBH^gېpP2@uʺ=9ڇ|> V6S"Nq"%<`i ։+,&ON&}f[n* 4OϗkÀjs7\ 4P,KsD¯Nl`nYrJr74Vr) Oi:[qi?3ԥ*x@vjLŠy;рrx^ if\3sL#!`FĀ!}c&.e>)v1+GK"XL8 970x=7t#r)~5i]k(Q:aF?Qufjm)mBs R~ ]8Lp_ȿ֔2W2fYV I5٥H4 Fyne=C\YFC0o.T,vxyNQMYk<<,xrPhP Zӹo (s}{$_v!F/J®۔ޓL{LV !Xd%ZupT Aa|Fsq} T.*xx>VM)#-0 ekaK$-6wEOc63b$q_ltvs+퇄a2_^6?WD:0M6&V]n~Cn?)ESNpbj`Kl ` Ϊ雙2Mbx~֥ AuVt'0ʢA쩺vF@jaʈ]y0GqhX)F+W+Zn1EkuX4x<)zR[3(aq"%~[H,\D%(aP4ѽ8D{qC?sT8OבڿY mղľ}@.-1v"4D_ avJPqv̠]<╌P R5hA7ɭCS5۪I˵+LT봹 TcL^ r-7^y$T)A/Z@yd. Kf/um@j 24Iz E ,L߷-u? #gQ*[!+BPT!ٺ;\[e.Q琦}KD% MxTʸJ/`77armSj?)jYa5$mXbvt).lOG;r{k~k ̙$:SC9prlV%ϴ#i詐]7XJ%lKo7*Fsͩe.''DMMx;}D/B`ByB*>P?tg[b]R'6D0JMGSi%_Z6/%hۓS]ԙ.&&^3*E%["9{/Gc!YfkPz9`¯n4*3nƍt#<4- Z 9 c:=SO]?)0" E."CYS䝂T,c LO]Ax~DYABZIb`'s ć=Q@'Tx@aslwt甇ɻ,xNؼ"k>EK?leRVwA%Pb{U炯ޏrv~(FXj{cڨ.N$67b8Hl_TULedȧەXw\U9^^6=c2? cjFE_BUS%1p;l^?J r/P02't]Y tF]mX[*kS{W],BѰn"MXgXܲftDz×ھ>%r7SJֆr:5؁34~A]"nCiSѷ3]V=-HR'x:J) -fiEm"Xpf9BXE>qn\h+ Y-O?䜴~`c@EaOwHUc0"!mD\0l[<tӖ{ S>IOujaRL_Id*9g&cJ>FX(2OG2(QJÌ_{O<|bk\gj;g9d<ٜܨg׊B& h̷xPa)/]LN(,p[3ad)؁#B|gJb'aF 1ee!CR~MNz9֣p3_\X0=dT$sJagGa]q37,Ձ6W&\[;< l86q)*xx>PK"2 i2jF䀿U֓\hq|לYl֘׋gJ5e_V(1;) gvƿVW(+ ch:趡"v(S}}9 \e] ڗl<:)ES@A2N@ćKg8h k!^7-Isop%[IϠ7wD#2Yɵ|ڙf0#S4kD2{6-پS˷a7+UwZx1KXq>Ѱd^tr6J#G{0{T LLRHHm\K5~`f*ƹ;LՐKfەVs7,_&+ ^mm0UNcn?hg8p1,mrhԹB/J"~;ף۶cDgQ\[t⷟/B8[M\}"`CNW|Gj")N4,2o<5quUQ^Xh.䬸z wor.Cۍ9IU|FK{O TvF=σ#]Pnw?;ń}3Tq>-,XiUw"lQ19hfYvd)B%/JYXkģZQ:vt }ΈSē>A[IO~'.KlsTTƜ0% 8ɥ"i4*a~Pw'mvלuG+E@0PwwH[턤%@]!ї$| a!iX`aE\DڥnhŧFO Tm 1( n-sD+8ZZBK?5=%TX(PUx A$}7/9*޲-d)ah˂Ĕh#V\xiMy$^IVG4i|v:!@6>\,c`]aY(,WFվY:i5uڧoDHb_m($JAǏJJ<5 ѨiΚ6(U8X"ki"l  P3GŞW:;ɐ~yxS1b1eqȵ=2 Go&&>upX ''UY>#>LKQ_fI=Ǟ,gWZ :p1*xx>TN)",0 @.4a}5n-fk]@Ɇ^yk~p/ɲ:Eݮ[f"zꤑ4Pv@lUCzw?M3+kkf \H.t^buHcs'4Fqsc /*zmq}z(J_`=oOŲ(A{c n+z𞳷0V!?"4'TK`b!׺V.BuBQ8Y{fS@2U{J_HQ1꾰AΜ3`D9e<ΰ#MŘv*9 BX2#YER YC-8_hdI/7ᆭLbQL.|._|L!F`2@djȰb_KyX[sCZYߡ1qPH?qdyK4YD|Fi`IT>ܝ!Ul1HNK2Ƹw)Lq S6E4ҋV3f(/4b`* ̻YMt_|j<)@MyhOCafҌUfpu)x$"SVl@}LMUq*W,7e(Kc]k%Pt7Y%_59|n [N &g Fu=}%u7z!os{Ke`"1_Ι׷Iپ֖Voy뀠Uo_a$-bzN#5S!'Wqmj?Woߚu`.0eqCAO f's@;vz1n Tq)%/Q/hBx춡pRL2ҧE UaA;=bʙ:y ݳWK՜TBMʋf= \ cGW'Zy0Օ59 e>#Dfw5xfQUx`jGR5ɇ\0uQ)~^^}X֊xeJ TmI{L~$u-`WM&#~/Ǖ Ɠ4RL R K ˃KW][n##@]Rl_XnK`{"QI"8k7])F_C8J')H M Jx5i-#oS} dj 5rFv]6zu&ڄBom- °1*xx>VN)#"A0 b0L_m;ttd(N;#RSAm*s碡HkNT ql#ft:ȯyRߊ0`]mw%uxHl!`\:mV[A质|&|Uj.BcE 3qs)QJp`ff8JRKU8%Y_ltVZDCdy! f|IDd4x&ACDX]전/98G,ߔ 4h?\Aeg$z"?Bׁ m|_~o!-ON%/q$J{t?嬿tߺs) ;Zۤa~T|@Z}ыK$}V'C`P_ֵM0+?reگIG (':A601]+밬D D 8[EYڀu}<)皂yҗQH ~_!soc5)cwk+ʝ3S4~1J%_E}oCVHñ\^]M}D?S;2"2~rZ ;B2 Oμ7)e?K7RC, c8 xqhWdI-tuKzq^k޻Va˂mVݧaD0PX湺b KǒkṴ4 6FX[8\RfFg A8#S!xRDZlQv(}e{k\̘ҩ/EC᷃:兙 +:dF~&plE( a!㿼 페Ǿ< uo!; N\ 8Κ+eŽ턜[L>L+Q"(53;K|BA*Ϧaf=.n4/ګ&$D'#kvn;y}(SS(zi{vWE F N}0؈+zQ!<7PK1ͫr [(}F%LPje~G$fk;+kGKNazr(,Q;FY{uՐPڂ?~m@n:a_b1ۻ@#KͺhyDJWryg{@SY+Bu1PwA8&?0Ɇ~Jl&U^2x (`3K5WwYAҍ6B},_4Hrɧ߉*{9Hrh/4سفP/{XNVP1Lx?[ⴏu3`vp|{JH"54/b{~ |(]Vֽͅ ?x⁴c[/C{gPɹ_{(RќU\[/G9.<^A@> a#ct4jPK#+8Vэ_-IU)鬬I6jfCkPG cYO{i8.8ƛAq Ϙ*V!IȳB ӁKgu;ץB.<ִ2ŗϠ8U{zaptGtx{ [ԸvЌG:I1 ^1㬴FxwB3$v|R@I{k)c*P lB˄W6ֳpN)lnzKxdj>4]w@)nC%q OR\C/Aw=}m7 wc%Y=MsR&q!Ŕ3rLZ,p}̣3iHBTJ¥\^бX~L-NN?z҈SgSˤې f 7Ȭ?dz@(+hECpy»_}NcEe{{+JKEWagvuwpjGs @_F|\47AРcU\瞒4oiQ6TbCl_子e.Z%ª.m41BS U0HP0|M[.g;Lů>>sW5TU.^ تxh1ɕ0(*xx>`O)#'z0 iu k}/Ye1ڝ5ϟ]V쒊:G^X߭ $°\``JRdxO`ħm/{m%= !y-u'?{mYm>8!`xrXZ>)v-}HIÝ{$o8ukҩs>Ï+_ޫ_+o(r;VڼoK;DҦիzX 97j'+F9rT2^igRh'U|K0ޭ;_*Nw9W4l @c f)"2\ÒHHRp`9 ,yVurd_'b"UUӞ~W<I7P^3=u.;ۣ S#̗1ņ4dhlSZǪ {^cLCDlљjs2be״vF6DW=%KݢքӷrjV%ڌ`W(fyCIh a1(rqoD,!aV t儍'Z*q| $k1#?Ưuk(X5ozbgR#*+^9s,&Eq"zFZ ~gv]8w}ft:|F4اZtk-S,Z9 >e8K̃8>fu@7/P\tE홾WOGs%VpDP8G /exIܯ44[Q[Th9[.`,-0i *&Gv@}Pf eAk/FmOA3/ p6*xx>\M$"*+0 h @F R0MwIsn ,ڇ"B#N]JِU(DӲIR>h|~l!ih034Kg ;G!央+-aN.c#b~vH$%}wPn%UFqL(.B;X-zkg.Rr%h*tuu[pDggA*O_GvzU5y<~D/ޒL&߫p| xtg&ѻUh;1R辢 u+@ⱬA/$e?/R}{0*q"ˇ3R=⚠;V-v!v3=\R8<6Zٜ_R V+Z*p oUXٔIqHs5vB$zHg(I2$wDrCЋ,4  e05lfSKfmec<~z|tA=.lf,V"݁<}Fhe᩼!##_v l7:B_VM:lvAGtƷ=$ @*؉ #_,U˦N4̀70q!jd"%Uu}E|keԹݬŮ9ŏ#r }6 =Zhv'܆r&`kuG[Hbͨd[LGߥߞ}\/RoNQK:Է[TOn~Lab,r+ۮ,p[+]_#FRȻu*gʼ AWSC0gMmF۶.Ur-%d?gBaXpAzNQjP|^ )3j/lZCH_?q j#d$ϧw+_XzNL5T2i Xf7d?bTGաD;'lerogh&I\R %3vJ[{fDQLڷNP=\Z?M@Yíe,+$*VX҂"5`Y)\A܃ oo:DPD2lq]`j2|aN e|cשZ]'򟬓QU497y`vц]OyaZ8){T7~HxUN^QFMΙӂu pR?G#cHۄiD g:?! i҈M  k)RsKkwf0q1݄byl:2 HwL-3K87HpP ];;肹<]>tspxHB}AnsLH jSb:0 ;CB)Ȁ4gTSԛ$[9TL8`"##^||YDE%ES4tAN!wb"*525,4i6՟ Љi7/ %gL='VL*y"ᚺ^I Q\~]%ȑb ZQ\"XVYCQQ*Ca-P|IXi_\}59BPNS 4L:fq1AE#p)\(~iFVl϶^]@1xg0'Z+yQa2z ؀9 zwiaI( wZ>ƒV )!hQN^{œ̪nF0)2Fj5~S6hŠ)D$1Jq1Pxɰ 4A#QRkC<5tqrs(_{SZQ,[:uM^@c w>,տv3 82<f΍imYʱ4~϶d|B&R^YvYʻoE [T٫|lӅ ;xt6_`~0yYǶHLfA~#x%$nZYAOmj.1,1U>O&\Rm8+E2ۺ @8.i܌,ɫ9dsP0a |dmG99 ^Qk(IL!- wHGE/g?9ww*Hjz & |qu(eڪ '*xx>PM-.0 @3z#]F~R 'MdF`,IӋ rK8I<'~Tު=RFy|N۷1s[\!A-5SVGq'N*OP?usp޶/_^JR_ }[]8[x^z-n bze޽lZzfzi1Va&G%RT$9cKe:m+y(BEkS9GGTNF IEM G?wi)s"KS' tϿצ2SQ[Ahآ íK}8 EՈedzU<BvuvKK_I>ǸF{nZO~V<3ZGvZ#!­MGs[|ݣmk_^zšS%҈@N7Bqi( d`_(1rJa ˟CLtW r[-}u(cQӆ I2xŎVhp͍]2ėo#M a+Zya{R:谑#^hfZ$'dɓzW9Ąq*p}#" tnr7i18Z̥=-d|~1NHVZ )kA.ϾL5Vwη1(/io-vT1WwV Tu̘=:exw9)olwMH\k+όDMIc_s^0cq̞%bq.Dd2%8c%VNmd4YPh0n[zb.?⭪'=Ni<\9OCҶ b#Z`̿ "W*mpДy+~vAozc_\(>l"XUo̙Ʊ:j Ǔz~Ϧ`ZCE/.m_DH#PM\[e5滐SRK#2q0 @)?}5u%B{4}&_ɝ/7cֻ#D5⡲yog밷l.uؚ h>O{[Ɋ|d3i5qnݐdjb8;t i=kl'N>DFdOr)4O:ebP>U1yE p})0/^Ao_*.Ɇx"srd7]~J/O5)omȷ3>P]`vMJpjPʭ ?%5w"N@XH٠fiUيVRM5uCW7bgl!\ ~^6ncVzޫma.*Wӂ{+ MeM b%zĖ T9).nW{ŕ;R{>F"EFl-,1k:Y%x)ySb>̓9a, *O;_2`j7E`}#}?eQ6GX,/ +nɬ1>lJ+69_3U3 _#Q)(FLNh\nIY;U|3uj$2pHİcM*.]q_POO{~gw?hn)]itݗ.C<gˬvA3I YY6z@1ϳW[ؑN唡i٦1(yJ쑵R CSU\ N ց$9be)߫XA4qȕL6{^ݾm*-֗0^>hT;~aP 3BўXyo_0Qv_bNΜ)$yn+s l@oϡ~> &v 9PbaF(( \O0 il KR2ځG6đ0n^媰бe"FS[>z.3\fZt1FIY['/^8MEazŜ;3{TNwrYC$&6s([G_4i-qmԂJ Le$Raě:ʐ W&j2-K%2jvM&Z\)]G#hU^Du;3Ε'L}IH%wW6K6V/_@*7j(֑2<Bŋxd1=(8 }3T+x8 }NawWV>^'6Dl{ZCV|˺T{zƚz]IWԭz6֞ݏ1Yљz]{7ۣ2/j3m5iΓ\_s<&}ޏ:42P2K &5Nߵ9q>ʹ݆| oQ&<$.IEg-ɞ"<3گNrJ`WeЖ|Imnd;޲}8((crfk V=-=m%|QyA7& 5xT.*N^`vmtUY'Mz$9NV^}pZIHo.YIe3V?Z\=HV_<oO8R bL~KόG}V-eXә.Np%*xx>\N#&0 @r' j@ =|IrM-ʹQ7{ÈG.7BZ"V%lC[>{yZ3O݇QFEm И  Ųeu %trĽ|M(a$zK>/3)b%}얥ZeKte0_r{VN adysˆw>4Ы s<荢"]3,/X@!=aζƲ 4̽Dcx)Qc<oFׯg&:0,k9/ QX>Ʉ㵘kRL=Z~oslN:8JB6, A~T'_fS={RRZM ƵTXj/`T[4}0XPx% ?jr]ހw:lZYudB6KSLyCogٷ҆nB+;),z$?@ q޸Yt*(&+*J8dwL j DG RƢ/:X/\Ѽ+LJ=v_7!_b38Ib,[D5IK9,W_\İMTs:\1VKx@&u%>R-HݟHu٨\! 7k{r3#~`n!9Fr2p8CNC{?l:C9XlxeUo$zʀ X\@WOx$04}z+5>ZwܛMJ`e6v"1MU:ݗ~Eod֢xnyobD3(Ft⋬IN ]S?Soqw`<^t"#jϿc?1<2TR`1ΙO9xVN @PIYFϱ}*קP?m~Js`c4Md ɔg0N3֒ɋF(^$j#QAd/~Ld&|l280PcwӴH^3"1 ۩0aXGMD4I1EAݵ. $YZ W-d%m]`0W=kE]8^)CxBpdR£3ܿ劚][=7X尗o&Ur[ V8iŞjB@;w=Ѥ LŬ?uv"M=qDW; ~ "64K%6<M !"(xl89_aٯ^3=Yc|oSAc]ʼV\򒑹>lUE>kJ^I/CW6T^iJ%󈃹Ժ=_8 #D&Jޙ9fkbRҩ$imEMx@<+"$7 yA4#rFK99b2 qdO-\|p$~WY,4[? z3uәwۄ㒰y"țAMÕ[vYy05P* XGVLDi/6E\^YCCx,+P|uYKb 3(0 `L.8A? ?kWCBueFh@ЛbA_nGͽcE^5g HP**x>ZN))V0 c\p2nZObPN:=A@!>k |}цe[Ȍ-85~5usR| ]4b bҷꯜK{O$5<ƾϮ M]Qr۲e@`bM {uC׎Q^:h`4O~ۜ3 *x/E11/;q9 X419<_O*w@uai [G"8T^+"Ypp"qGcPay9weP4gʃnLGtZO8O[fD6D3eį^tҟS:'N83W}X=+P~oT LKQm B`&`')`$:KtоgP+=Ji&8`Q4o)UM8>@:wҽR# L=a  +U :C*hM_wū:uf\ytČÎϕOuv=Y+TPUr!"QwS~٣͟@Q Ђ ?`dplc/%=vwY! У+Id_F`d Uc8…!LTUko٢+qt]g)l?R1ꎯfmV mĈ([Nh[?B,n!s| ekOn#~pT*4z`a2v}8}f|og| 0Y8*ÅqؔXքГe-!1JBKr 4H! a;R˜QMJ=16\0"ybam1xoE)J4w]M, GIeWSg6>ٻ)vZpnD⅛etcPh 3I5Gt:'+xjf֤glj1uiNc2DUB-z$ĐƴVso6mYwF%̒G* 䅲 ԗ #?~Y]bئ*&3N5Q ?Jc<%DYA4=h_CS'|#f/AQ㝥cL7FUI;yuUbQIerod{ s /WϠ#*Ye]GR LQX_kZ##8Gjh{ "tKbO0 i]Cl(]_%۽ F=m+a!^B_v<(Ap]1'jNAfC.`D{K}{.,h3J*$<m #O0 s×oY] "i˴Ri8dB KXr7Ɗq>(O\4suLl'pe;-Wſy_ .u%Fiz!?] u]]xx{ vGW - 14`bPj xo;:,4}0+n 6Ǜ5sPw sϹk ($B^NsS"7}&Sd= A_d}:rDP%Iв/S ! W[Q!{nb^PyN{@r(-UzN\d!Y@G*0Mˁj ETl9:7"_U 48`ROƔiK#uI_KU8^d8`p@<!_ | Hu|{kŋŵK s  euZlc k̼ }4E'TDH\6PԾS,[ ˣ>e5 &*~0L=F⽲>w_#G7e}=jAA4'8KnW ޡTWJ `/I ڦ~vܘcSAѨܘ nGOF}zi&73/e*I~QpnL 4v0$v,GSޓOW(iS{CDkq:C+G`#ر/P@i yR+ֿμ 3*?5[BWX=G3qu+a9 kXlh!lА2vz?!IvCgfAU+xXWUeSd]@hB^:4 π"/meʅ`cLĚ\0mÈOJx18(H)1V[V2t7(hQnɱ̚68 JTWC{1ȰkWQ# Iy+|fg :;T@Z:fZ8K<$2۷9w$_aztY :xl2"_`xX@ԗr ma"!x^Nšk);EF%7bQC2SXVP&LsJjsP?<qT\fr"PCM'*xx>VL)0 0 @&JɒÕuY\hn'.JnEsIJ>P+6} =Q`'/L<u@ٛ ڌfC-ZZ$deY5$׈=oab[d=yrI SH4 ]uHxx2CӔc6=_GwŇ>q%xpY6X/g(Bns%o+)!/ \?\Ñb{vw5DJqgJN:zqv>V !} I x:NLEg) t*R02H`dDP}ȝW&$zD,J-|_HZǻQp[>* [ NCHp*ǞXu)3 XN)0 @OIEzUQ iv"s>A_qqMn?mn{Ϊ*0#`CrEOLiG;(*V"edd6ô,t5S F8AQcb6~)+έVvE73;ÏJN߲IIKG:=Ou b4ȕ@ VZ}K(aDb宬^\r!'t2) &T᧙^zn2->p-H8v-ҾLtPQ6]773Օdݶ]jx?/3<_ohUERocJD7HUzfk]l>SFKil޴Q8V>E9_MP:J4B/zXY5D:q~⣻ֈ`P{G.x.ҥ9,SHG'ț47](\_cj>6M<3\&52yaxuF[~Ky+>0 N-=ov>( q͋P ̝/ $\me֫|e4cύG! ,O#8/|Y͋+0Zn׏aΗe=ÕhQ{_W;Bf7D >\^yEkh00mg΋9V8 }/D:vB Dj:vk.[IoqNGKSm @LaפƉ=;[mwXnBfYs~3e= =DZD3:Y+T]Ainw&3(Q5HeϏF݉G=#64qZH+a M`t+F2Ԭ3g}.xslN>66cJ9Vl,_4:+8Qnt$C1ٲ#!f0$ԘSJS==GCx&IIOg؆<^d}#V[9 e܏dҕǵ'J6"~>Kt_`sWPkQEɞS(ɵti>؎K6*}_I>-c5Fl"o+u^6 fmhTY@p`VX/T7c`gIp{MݻI$Ȯ$ɬR nhmij:LPǕ(: nLuex6;ێks.s{73vRmzч[JW~֞30yYʑ:Yqkj+{~Ͽ #FEeOjl.Jb>:()Lե8Xjvrhut)RrH~mRo/ Dl ;Tw"hҋ,p|q8**vY݅n5&B0*$vcU#:vAOuVbEHm`F@&r:qeI(4PJS(h`Z Z"HT`* ?{\]m%wΖ8ÐAyj  'F.9S8P@o2T5HđJ6NxY'aw0N<ԍ;DLi)=X0<0 n&"];.<뫔1)C_GEW[P5r&߿8|~[D|PUx 6gy'm<1Q3VV$&HipvwG @;KtvUv;f+s%JFqR?YUw7HJ ˌ{F"&Q$Ղ:z6.42lk]Zte/ Ve@2]0PExU0,*xx>ZM.0 i߆k6"n]Sx0 h=`# 0vњt"7; l:8ӕʷ 1s:5ұ.H. L5>r0Z7$n@j5Աyd ,tV6L25NYhȃRx%:`9#>"AV8As|ÚaISHYxS/N pn_&E,@ձ6i} FgL3~O h7OSP-Yjqqk2ft>/laCUcvXm|YxotWOs*״ B!?J;#bfku4 'E)vIBV0y9vU#t݇ҍk77G}Y  |۽Da-^|@;pw#ZCg4/;BZ؞Kڍ64ڀaf\9LTӦK Pmƪ|nEaGΚhrhM V1׸xPi&7aEV^gLQ͊X۟w ̓^FMƨsjRaFW}Ds*92[㚽!AgÕ8uR{ўh4AD@>.JJ?b=]#fȜ)H=nPtdy0ȿLg#XEgѼ9*^ۃZJr$KG3@=%&$8[%w6'ܱzDQj^_U,=E`iKI1K:ž;禿ƧL cdDzC >фץp#uЖՁ$[/3Uc Vz'!#0^o>dL/]8PK5u @{ILq8ni7 NJqQ6UYh 65M6g Aݶ4~6hln0V˗jQ]IqFy6}W"Z&zNuao|Pi'n>&Xw;2$y V.t 5xLF63;@/z?B{xdma%WAtVB;'2 tb7yt'=8# <dտ>//6tC~<M/{ρfh߇'׺'SYV΂E \L.|*wa. hxP n* C_aqÎ˳YJgT"J)1IEл_JCDcryL)gx3!7ᚡB, `yGPgho毻O,x1$zNt_cp yj[sDb))Ti\=]6%yGT6ŽRyfes<񇲐mX_MCCUI OPc⳪r"|:YȺQF`+fUf ѿ[AFe< M@Qv-~-MGk(d>C* #@]*Jず]5ZugH'Y]RUK\,꼤`ڹjp-/Pk iR '*xx>VM#", 0 inh=Hn -ϘDësuhO`T"0{PQĈRAwaݮ8qt,|>^bT?&ؤ01u2:d|Q&Z1 ZD|04ݪAi]]aOwO[jlU@>?>$NeWg3˼Z2iT(>$d0M5S딤g.UQ< H 6Do[㧶ȸ5[l'vuYsxS'p94m]1*GAd'N8.*j7 J`eH:܇s]?ɶ/#bӭ&j0}ľ g7덼vHh޹K[Gb5NJ&bcMߝ>(#xd}{tǫ g@PU!gt.>UGrt5+`aasTj>;x\mAIu J1\e#JbV?3BOvggV7滤Зts JP4i`:A#-Œ'<^NŠwYP6e^\4p@tBD1`w|zfrЋY5"\GO0^z=|<VsNw At+k\o%,ӑ"Cg:AC ^b<^TrZ!W%$  |I2ߢ0,||yM Gz@!FKqT0Iz`G)-qq HgKoAY/%E|Uq%6凃K:Vq0g9(nC&@3ͶYTđ{l?Dy=ԣ0uvHJ'CHDn/幢2rr.+ ץ`49n j;ֱAjX#l} !;<'Nn:䌒ĊVv^o\r:}-D CM8 喥[7ߎUG||n)0b4*[6o.> $BR|ҽuj|%xN@R|4@m" EŪ]iaA~Xfl4N]G !Aq{߾낖c2q֗1O\e,R;{EA_ǰK70ξXK %Pya''xg $ F3L8 Ut]Q1lbucL?ϼڌ" 3a,eGP\:(kӺck޸GRpι!GヨYE2kH=2Th9y륨w,\k$*xx>^O)'0 @2 h]N;4 A ɉdjB4·v<;B3&Kf19n悔 G-Ga"w?4@ Yxx*d[QX)lp23狝M0C\81nćN >*ɤ^>K:/qmo'Ƥl_UL0f ;+8!2sCV `r9g:Tp4dJ'CgOg͸&GpdXҀ+vݧ!K&䊍LZs:<\U.پd vLߋ`4*x`q?Hs3Sﳀe~[~ƛ2NΈ?YOCHkwI־e(AErfq4nԒ}Ab2c- "I9+\t+QĆAwʕTŸuzLٓؓa BPP:[yb'鈥pϞ^ ܁ }TOȖ{*h&8x_4=/k{C |N'KkYHn_ `VuN'pNҫqP~l?VLvh:z8m<9lfUikK G7sB-cZ?Ք /0AĚ'AgME?_ Yn[y%{X&gii^a2n1CFCPбqYE%T GcZhG1LM>MXPBlCicrI5|OdVQ" Ό=slTxaׅ6jEClWI ՔeYHb>AHx&%kUo[G.V ̘ɻG~QZ {7Y2MO4AY r _1Ŭp2-ǘz*dPnuImaX󧬍W:=GLvTPp7}KM*o*i׬YAdvr`<}/xГs&N&-5:zPsB7ȸLQA5 ~7ΑQZ.x/=PV,%eOskK {htDz՜$0 ʪFi^m2o\,;{WXqI m?:N3uyد q "jN?`>GH2쌮8bmhϥ!ca~2I\CFcEO^zǖv5 <ŋWd4eE>&%v5e$/&UpHe7+L،gk t67BGC"oskk)%ˏ=} Dq( Q5NxÆ!ELrHrm#.+ ~kkl4 a?-eLP/]Мڬ7$QX.*~~>VM#.0 @ 2ݕuP#WnTv d́np T:] Zt(apb2@dēK{[.Bdt A=^Z x/ E XqmZxC2Ppti`w<~`I~c7D.lJgP)ŇLYl5&h *sҊz⣴0ִrڅ]r{ ǡZBG7v,yZ>͉FeYOb^Ue^z@wP^V|/0P" dc# zɊQVxDQߌ$yo9nG0kFaXS"c]12թŴ4^ϋ]@2`]`(0>/t3jb ėE<#I.Oc߹R^N5Ch3|9O#08مdnCQ{91,xL"@(0Z&j"PrDr=(̵kƤ3wa@a9HYk E Нcʤٺp-F餶?n4UM#vDRuxʜW`jฦ7h쐥n"jb?7,R1N.k`%2Al<} {A6)ǡ>$q7d|w5$[3@rƑLZRWF`IAp]yVim.CB}yW (dᆤM41'v;0VB;jWfŔ'ƢsD"O&oa S9D~wF\GZmI{ 8fJj'c )+ Kz F?,YO}} uF>-ߚw34$4.͢ ZAd(4kɍǚ?<#MMv5-[*@ ],9QNІ-x1tx_"]>a]cz`=o$&kUK_Nqq Bf~'D{a'NDk)j7d^*H/Uw*>xo , -QlËXy6po ZdFMk})Q`](SV?_*'$BPp\0w-*Nᘱ+rfc^-"#Ӹ q*pWo([' g0eNΩJp&D@Zh~,'IB>1$\Dv;(bˈQP f.zL2ZX7woEW?: 0r:XK.cG@A܏,u?v0na*|b[Oa=I\m/pw0ݎ@,RV183Y2^Ib -fgۥzA~@1-`cS_w+c})2-RR#vcr(dy9B F5kS /*xx>^N:0 i~¿=iN/N`l{0G!++G^tpxBV!t[hzf~[*J|xʩL^!82Ŏ9˛Ԏ|\5e?_=$Xo~R.8o/p{e2,l(_1=EyE]t E3wpjv7w_˽;h ~w.4Fs܈+ 'E" 㶴dzlyǷ9e-rիE[-cߠ)"sA%|Ly3Cf,!6Yϑ [] 2 >Laڵ|6)0do_߯%6jW9̻ypf胿zhj*@Dϥy 3w ZZPkkZ ADˆ ӒB{b ,20XfK'ZfH,@ϳ|`GN;leԠ-+Xt<1f`cIވ"qms}:g`ڃ`d~Ca͘I6[7'ߧL Hϻ3'xw%VzJK);Iz DO_3JgIk(>Q.uN./hk7ʮ!ݬd֦ѮVfHƻc&0UcU&'Ȋwlmhy_6&=ädC'.(tt /m1|[jĿ@+xD4dPaPOΛqL{Q9 0M$G0+G=,y1NE88yq"ߑx5lיs|oyj? N'> OOѣ_jUAvuŵ4 +b7IgsSKPF8#N=BqUպc<kv뤐̾iwPA/?Wz # D/ȼrQuGx玐FyNI&fY 9KrgdX+=1łNbCוf홬#_V2|n,PcWwJf;YugCWuuƗ.`!03H #:Mw'yoJ!Ckϭ"6g9">a B ;)k|{@^Cv 9l1=#e+͋ʴߞL#Id+B)bta2p~ ꥋ.gKgDZkBNPk# 6)o}EEV6SB,yA} vAֈΥV "e8UIP zv  P#q5Έܜy@o`fh1KS exŔy ίB[6`S(50q%{4_iH=*N󏠫! 㶁Ot![!L%Fi7`4ܩXB[ŇרbJڀ][bq`ٳG]9Y,<ڻ%{>p&(.$޼Njzΰ{)Œ ØzhMK 2{E [k&Ōm,x'oxleϦhyj9i%#umc{܁H˪>giNM&  mrShk0%z4: p%s  D/pUu'ֶp>؊%>׊> U-g\M$"+KQ0 e n.,4j/.~A(us|٬-xPC¶Usg4 ڽ]3>_wx-r=%K1td 53TPWDYG~Rq:8' g=J<ef`^498TM`hջna HoECn} .3To- nhsPn}Ht-pa¢ooؖuRiQ \oÚeԜw0Ed;ؚw%|,,1"ؘlhQ,7b#3q6C8bNKӔE^H-#Fe83\mlujnFy6) 8 ͌Cj~ 94j,fXM?C|?$D6fĚ2C y@Ԁ$+G{}XPz,.yʳO/ÆzN[әƾϬd(Cqkv zP딢Bp_šn ӮD*RvX6f|%񗺭k6*<=a/ LJ"::K 6pS}Y {V z[h61SP:R /'`?ǪqحOVk p5jv æY.;`l$<J*xx>^N#lA0 cUM/<e2Z&<NN$ qwgdٱ=|egB⽇  yz ny6h"F`ƅSqU2_Fe\[R/bB6_>3_5T_Su/\n$ON2²_g9Ăck+VJKB6(Ytjp _ГGO递մ̀Ђ eѭQM(sv@NNΚ~]@ACd ks?lDFqͶ遻'l|GzqBTR ۏ(IS]&(Vu]S 8pyh@ ¼OkLU d\9t'^C Z!lmVǸ kXorjNlS%͵ȾaYmc)w£Iz>8A *meřrɃx`A>m]w1̹(IZ?/Ѱ ~j;}bPFiN\" %J]F0'ۦdžƾf1̸/(-\Q]<Z?Puص 9;>~\k~ ko-NNjEH"^aH6?Q^2K1+9S`1'%dZq\{<.%0@C|MYe7Rd҅LqttM*{DP!}R M/ o ]@<:rU|h%0*0yS?m4zAt~3|d~g:nֈBa <9;o;}LAxPJ@>lxxPI-b=' c `q0*?Kh5KWJ[HvZ)[|efg2ӚPib8) aEk,A%9v*&?7C䈦B@zW1{8)e Z t(m$ _o7ǎ Bul a.uMx'Xى?UYB悢9mU1 l>cفDNf̍@R+*xx>NK2v~ @Jˋ߶h='ҹQ|4 C_XS{O&*l@$lCE g\A67s-iqu!=*{Pe @*.2{3eL/) \ŕ;9/.KS5fSH9@lpӛ0sA+3Cjmba؃#c|I_MMѻ56i Nuynû冭oԙA 9Im䍮/OS4Hxg(}_B7i7Kw)Q7;&LiZ=!܂%&-&Yf9箇4GP .MMOĎ[vuް+8sC1}ۦ\%'LA |XBj^.2jm) 8j-sH)QjA"π(՚zzNeIYsR $ G6xy2Shh}`Ň)nOWp}\BQ".s# ''uA}_qiIU瓊#M'n|0Q,h^@5K P=V`G0efiH*w WWnByt'hJ'|G.rubޥ^1:&k6Z; beC6E^9x%4HE0=6eg (HWz%v_WB[Ke5m1hAL{wUOTw/`Eoԓ6JgiDjYW%͗K/qcqg]+nUt2:I鼙$hzn[.\]EZнӹqѱ_cAՖotu䯒O@ǔ6TS oͤDZ:更d>e*@Qlpe\╵&Ϩz`kX^P%qCN?:?5KM6XтlIT4+iV =bgo,qd3?7[-wucצ85:K0(\E Ϙ>2@3 Y_We+iĽdCutdDz9]r$S(yaN2] |2$LG5;GL)_m$ĺ)0~<M;My$!5iгXצ<6^-gɷ{UB8ǂѹM4|5B"X556iTNbwV 4O{r7MR|ղ`έ4u5ڱss{qvaUs q8q~V5\Q?c\(h z0*xx>XM)",Z0 it 77iU?OKMM!c_17uDnmTQ"g/G̣_BKcLs& oUvRj'l~•GnE<Àhip5 ]eы#.\mr_Lj ?ί패yJ4){DhB$t L`E 7J)a tj%^߂dG1lq傃n ޵ԽAٚ̑Nʫ?u0!Nm\Hi3+CxNL,Del8闭T->mkV.P`Ek[6s SJFA(֬Ah6P2(>&L)-Mc_-M1AMX(;7۟yI0x pFv5tuKЪE(I+a|FݚyyiΝ6ʴ1=D6E?[ČvX]:cK4NWXy#Re{Ls{hl*z?l%lS u# i  q_o D]X.imְm@ ݙ޽:šIןCL\x"lY2@ MEZCzrN'xF,EwLv(YZ?y3رK&(L5l3~)pvqEQEJԞP>v0: .wôA9$wQxlˋ\Au`O!ɲ["Ωl-SR6X]ei ag1yL?_my4t?/yojO@[^yz_hnҶ=Q48U/Y)v0 J'T,U@4m!ꘕrBA kNB{ XMCN|2'B\uޮ`s'4<( meWHIu+v0 Ͻ 8H֤_f҃TƷ oTR]#cuS^QΘp7/dY0D0RPG)A+}iqBvo61 gɎ{Kg< /we(RMlf1RϼMts$Rq>^gZ]0LEp~MXNgwR$.Zt˃_H&כ:~+W?/L7OYRW3jbxR`ܹQtO02XM)"=0 e|Gl/Ծ13-JO*p;|݄( -Ա f5FN%m(mtn޴ (7Wq=)&[ziˋ7n/bnlBSs:kVVCuqM1L ,IQYBE.SD)iD4[< 0#'&haw!`Ƌb18ZBZJn%_@%~?ʿ m ¦DbKwRx]+V,-`8L.W,P"5@&s^ 4-إ?.V#ʠީp   ɾgBfwxXߘS;hNb<'tqv-K'd郲=#稂qcNuBdBj0ւ-mKEIThFy P3J%=\X[q[O_rPjh&lR xKUʇo^r.*[ ; f?騕Npa0Qmi -4XD̦ X]?w 0[Ƚ臲b43Šx0{nˆiw f8oCz<$jS̑_>ue &OLVFK&5u5z?u,4>ԎU 6zBH~Bgj 9+IJ4a=#x܆5 gqLMb;һfiٝs&n`c[.z䛈/EoPbP zBnY6W^/!F-WAȱCAj8ꭤ `MаݗPL qeA%F^[PbQ1u,'@x?_`PI JMf_l.g=q&ܥqN>D  FxnmxIone8)#Cnr|_;j_q"\M#)0 cMGR5{>CC08#ʟpK;/q-YFB%#?רGK}XPjc&b2D7`tGִ9w;-1Qj996jгo _>ټp$CI3X7~_=YZl,WE5GS!'QN)MO,BN}gm7IY9 APW=' $tx˨T5S'l*Jv|cC0:<~-4K'A )C6/jbh@ws٨CAK1-7Gzf-+ mJtJq'YsYQ%.Hǁ.#1fN[mV,HsdoW<*3feL Kw1DR."Ļ 7psi5jY̰Sw~.QŤ|@}T6V`;!7TޮYz5|4=Sl%=OɈ %\9/&|jᆊܑywcԍ dvLBBU+:Dp ;rᔸFfېpA^%{!_11ݺ7bO]LL$[>CN&kh O 1 `qRF}+0y2ַ yyۇ>g.Ӆ,R\A3e?c. w>&xi?j%W$ig*b*'L_We/04ׯ!qPbԟWt͛1zo;FBQZ|ujNʕg?}2+fGv0ǑxFܜ} -^e^{vvQCC4!0kV7U"aoQ 0ny=u=7X|mҊ&[WɘD&>O. nd i )H`BF>0EZTGM~8- 2Z^-!wmQ)c&o$mi5DRE 1{'WQ5PjUpX(N¡ Isڒ" RLXНelsOycݨ"#[G6ykAh- H6 !i$ILFrJ6꒓Ji]0]S y[ aj5ž%+`(ck;s|/cXx' CHeiFWx#(ϣ|>vK#\M i.UosB`{tzL^L؅ +П2[z`T+\7,y$p \s4j :Wҳ*'YT}Mx{Ö ;%(E|N{EgQ*EsC M|p]˝|L uCR8]luxv, ?)臔Uٛ_BRNoB nS8sw.H-P^i{:x9z#73E\T(F4fAؙ-dM4{K޸-ʧp)({Z+&#*xx>\M$"*\0 i?'yKOu j4+L].Ų]Q^TDlN[?NVe@[g caH[\3BvHs41%0t(53/ȗt* Șv(D_tzR8Hn%Mwl$8+R8+-}=hy"PjEBoaiܞ[\= 2@s&f¶{~Yd)X=$.Z/7%>Қ@‘TMJ))~zɦxoRog]KA/Mѐ vJ: `Mog) sm9u7uo0FG5ͿOKnlzh-Cz/$(p{!3P -O ^3T,6^>?ͭP:F ^ic:F3(ԭWHYv&C2(v/V=kD7&@&IOZmH_8! Z"t! ,\l wc$3f)jSOĭ~raq#]K64 ILA$O#%,*T.3,l_2EvLKS>#C͐L0 )!y P~jy|s<08-Hz{|OE'dpXW s\\@ݽ*QN2Э\-_α.{ۼǚe|miU-]~ϥ:t.]4^r, t$ Iۊ)7Λ2& Hti B8Q , K0*J8oukNPz_T1&1ČeYnz6Pwj̴U= ;,KXh4IQPgשvpóƐh7]?4<0(p~ x-uVN~4""v ʀ[4*5Ph}ֹxHJM,{Q]Yi(zs^)c6ZN)#*;q0 h4i,mo7<Λ_V2*Hj$4DZu 6Ԅ=c0V˿ %)5jWG#sypmAt)ٱy,٣58Z"~ 5|nIFq9a JSe'P>b< &8Y,1uܡg2ɛ]LvVmg!f8]oݡ0a§+NڈOD%׽9h~P~/z /hLeL#4Ë4?`Ťz@58czнe`;O =SpJv[[T;!:!dӟW/Bڻa`m:x\0gfCrSf@qBpdȡMw`ޔ~o:±-gb9aIs2e%Jw.t*:aeCt`uC$q`ɾ{ҞJ*đlu@ $/f, 9|611E#E W+kLN]&z7EѰG,;X%2ZJm0s{lU3@lZû1{ %k bcJd,j* /b:yv4ky&< tcn1I}hӝy 咯=  K.;,ނC0b.ao&00Ju9FGd>`5hKSxGYՆ kջ@cF#zhA**bجVΑ"FD. ?ƹ}4{}a7?!ZT j^>eh2 _)!~}~r#䶹5UPg0uNq |' l'_xR3d" gP2mil^2}vɪK9\ˇ_ , M ++>.d?ͭh ,~Uz3Nc&Jؚ{#$d{W\^Sq|pCY5ʸ(yF(<$"Y-5OL,VIH$O;9sZ+L~jz7oe\c!MThY~$4Z#]J2qa}CSh.YjGdDou_7CޑƍG[ֽuP,_wsK W$_rl?_x4&mQYu,Ux:kpLBGHX?>N8|s.KCN̄X|5uxyZB@T? ͽ()vcsҟ(۹Fs|C!v܎JY?s3vNho/PJc§#淦+_гc w[ Sm-> RSZq7TP)PyFM,NY-ifkxͶ-N}>x)MQ4TE asa~vRÚ$Ԕg~f+sirn÷͡`|wݑo @**xx>^P)#'90 e\`nu'gt$%llԇ$vvMs%& gQ[:MԢq+fN˼sҵBUW&wNshὶXDH"QEiC'dk4D1UBw aIo嫅4AU\$96M 'G҃5>P",\t'윹Ѱ1 .bQپ%H:$~nW9O~4&N-}gR GG~]\ `xZ ]Laz]VV{QP” zn SkTgmOpd&KxwVo+AaS{'рn)ۗj:u̯G^D{4%2}|a|wk.n:'<3_kM~]8nTן%sX+!`?&Pf95|Ikmt_ 9JͫQr{g Msi"\QW~QaSYl_jŞ5= &*EVS ~{&{܍X~>p'NNx齵+0t)pVBbo@%O0&*xx>^N)$"Mi0 e ?lµ59yB ѴBH /1o3`H<{ߑǗ x^6jn採XeNj} aYP7"ܘXqLK ¶Ewi{eѫ*pⴱktU)Xmg^4*K[{ t󨨩XGV yQ_Hn/+>Y&UrtBȡRnم0jrgQzTAk}Iɿ)Av3>nN5q oL< =1hBE_% =FՀ&O3O㕩-}i89 ^e^'ۏkRQT8/H-EZI@rJĝ6(띋ln+߶;C~mz4vv ͏ZUӴ/3+2MɊf&,'B]eK/n~qy``p'R:@"F6_Q/ߝ&zK Ei} -Pű<Wř^eĠ]d30o(@/ (􇏉d?RxC^A6BzQ1rtİ㄀v8a׮̘W9p%QjPOkVB'XznוK{QEM~5pV[f/ȫ$ }z@N~k AAuNn:.c+u¥d![,]2_68o eX˽T:z좫mQy#o:ͧ:]*AI=uJ}!M. ?h|5mHc p/w>jmo4"B(J.h\p%LgQĈbtKc2N=ط,e92E&Om= =B5ZqAtG'Jx0RށSulLv%D[('p8oN&`p?UV5REajr|*:׫)7UgeeWUeqkw!? 9vA%f^ND7EB: R='_v}%@yla0T; _`h#/CAaz]#{-YA,56g1ɒo7 ._L=KWO[Ra(`(uĨzsr~| x_Z ƪ;ƕk-2/XVK*úc+5/]dͤhaP7>+Kv}y銘!AP xZzy| P3]CMa 1ψ嫾NyU\|5}uJ;SoO'JToAYriQC؟^EV)/?RPn4hj1d]G6R&EЊO2 C^5=zNөPEE|vmWI][HX$mXϿ0|࿙hzqNpO$lp$Ķg2Mp M?\A?(;ɼޟ2ױB^"@=T*DM9( *xx>\N)")0 @x/4Q}6PZub[ ԰c& g{sYcQwyUub>%coÛ]@S< ;Ipnv]^(b`!\i&mu٢t &h}|6:~Ycݏo {k:OrD!|}{vtDndHxP)E[!ܧObc'QAJdL' E[l+)|Ǫk*:PM'mByB;(,%o< (AVʘ͎COġpFNV iE+_@_(,Ptj]}䝔ƇNWr*Ѧ]H̢_K(Ƴˇ:'=T<.MHP8{։4=mD7CK<0`AHEm՞ n]@lwAɃO3Z-pNKayL$!;;]sKu7-4myylЊ/ vXh65P3,1m݈p)ڇ.퍽ۘЬxejgy~8NA=ˌF!F@O~zB@E< d/vdKho(:O6V#ղ}Z[K"6Onb hB!U* >GsAf| v"*{_8ҢL[#R {{VBs h#@+96 '4PkѠ`:G/)YkDl"D$] Ow*?qN#AngC nFRT@V f0M3ZϲSW>Dଡe$:n˧p^Ձi8Ǻ~x]n(+  b̌PG;zaEs:;3#9g^= ûs*'žX kvEtR5ϲW!pg^i H|VuN!B}gw: CoP9H lFK\8ۊ p9Z۲,V sSIv&|ۦEtރ83ݖY pY l) LT"ID] Io Ϥr/t.wSWgj"ܞg)Kϧ\N^10 cưLmdklGn1{ l>9.\[Cf#(X9LrGpVX~w嘕OGa3ZFQQ6m܀.'o:ߐO C+-Ra,nBo]Ee@xԵHr9 2)JJ_yGYVdK|b*Ț  w0!m#u]F T;*ëjC[$GpZÓߘ3fc Jvu!y, q'Pӗ te%,_F=oMmٝ[,Q<e4!wu';\ QYuɼ?t<+&\%9ȃ7,/2˟J;_DZ9&Jo6VU[ !g>-j7L7e N5vϳ[<*ܾ Pa5v&kKNab,[`10faFI[׃l"g^At-Ve',S೿cH (˷f句g"BC }qM+t88v$n0I@)%(N)[2,ׅjŸ2<HgX`k)/1˷9mtL-Ѝ#d1$*xx>TK1-ii߿-8zifo|X ۇe}?m8a `婭2#ؽ՝ !QԜ_CKR˜10lPJxG(XL A=E)FJbI!e~=Isx'P<uJVme(5\ۙ]g:x7$.:_eRp{tB%jaEвiwFU; z#,"qޚ 0ᖝqvees<Sh 1rC6R\-9߉PpmMaV1z؆Ý׆r7n~q|,I` JĤ^ck[77 ;kAe! c'S[yy|!qЋM -cL4 I]B)2%!ty( :66C(FZ.bKR[I-Jԛ'm e Yp^Hi R!)(Cv( ݾZ]㯂pB":.A|'^eEhd/a"= T0V,ɻ5ᅨEpB$ Pv[Pn]e T)MP4Wgéߋ> K\#.S_ZDdbQԭ);Lr'xg_b IZ)SڍWVҾ5Hm BxP8 >ǨlQ˜d$FÐe$D4iV1UЎ('yÑ̤I+3x}|wΗ% A +v*}W&Kg8-;ez,v N5tSnT}{wB?^$sN!:Ět"A:w침O/D}`1'Pwtm~э^m$Tvg}c u8;]|E$H_y֎}s P}]fL'er"9zѨzw[v_[+n[&d()`/nӿ<{15uϹnfd2؏|⚖=,ML^% xd6åx X:_^y,>vf^'iwH?nKni @$P/f֏D!SU]/3S :[Vhv|XEèIJ-a6roM"t%ر,-Ҟ3k+K]aJngXո‹gYxCCvKEc6Ռn)PSǗ~AT7R/2П$;ʰ]V0.s2-&SQ-f΄6̾~:ްp[Ayjh,jo;12zJy:hÓi8#``z[4!Dr:caaVcEih7zPt\*4 %4hIțՆ3CS@-*xx>VN)#+y0 @(c.ξc4e@DŽnu} a8i+O y* & C7ĥ[8qS>=A"8-PBlYZ ;MejǰSߴa&zVSc]jJe^ǸHBJ/A6A^H}][ yXp(5GPߋ% T`@Ka6~/F*o#$[C0ЕHG꫷>Ԇ5jԢJǥuHݽ XK{}[aQ eG^Z$;GL6&.ơe" pF ѦG0pjɢbV, uq ta '+{h)Ya%^BnU"/@5=]VV6jhD)/Bw08'jYYcDZ.LF~h&lv ez0 T|6 0"U%+&` EwoLDċ /->zƬՙ7ר"8 ĶDhx>;,y՚BC=f!Ywa_8wYLe +QNd"7qPu_<}f\ MZZBߟu@o\tZ/ M/mч+I~Z!(`{~BZvDze4NF?yު@狠sn4ԣD[֔q E4ǪPߊԈ -\M!(\0/ȗ5ѵ#=͗R{P<&DIM>V`c+irvyB~ZKz_5x= uGX.m#(\q'Im䬚V@*Z8a U%wnV?B_Ѐ9gy/bٳ:naB=*st j<0hXngW?>-m"Ok?&mI# 3M!57%Iڂ(ɟ9E|ykO%KM+];5kT*_ǓϺt5oe-+Us 5_S)cbӅ? JapK۞|&U)߀,>*On)HQ #CtGkȻd߇:J_2c8Zčzt_}jVTNCMM%;[Pk>eFl3ZIpO?3E2t"/f duK[3BZhACWpEW;Fr*-ں{iL _h5T]\lf"kWTر$;>lUz r/7Pįg[r3F@z,:_[/@[ 4`H[_BUbGBTJ7 Q/02M53IGq{ZJf-wɑm샕v/&)3,upDDIHD7纘yN9\pRxGC`džWN#KG 6Z0YV kk0CNޅ^ 4Nnjl5*h O}+ "d7HNڧkLeX*_z}Ɗ= ҉en%?W{ǀŔHVoBOxNRz],#& |mQgyB+ӈ/qOpg+|,9o_s.).tƀGhpnDgf7 z6W?`YmfXnlu}~l.|1aF=8Yo( NH:G%ӕD1炾t*V1>W߯=oF~ڬٗZXR"`'y$k6@WzuXפ&ؒe{^{φ|w)Y~f!I1@jYդw+ehɗD.@`Bݼ/lǏ qb$2 2QP@e&TRJnGY-a|`욭nǛ]#NO ÁqpwfpDNPo[E%9= p.@L@p$*xx>ZL$"i0 d? $?F:*Ó4 ҹW츺U3['$[3fm bJ,Pq-!C/"yr*fC ô_Cw~(^bnFl;HYl2ώm=z <_.X/VZ⍌iNSfs'4Ӗ;O';KX F&ęWbHfcQ*5kڀzFMύ@ߔ,$[.ұN"șvCz0Ъz\:~i1¦]Юg%hD 69/${p8_匌NvָB6ͱ'i7JE'4zY+at9Ph@;V-zv)'Q;aA2&AQ>8FHߝn m(J-T!E/;Ց*eZ,~ZB;)xl3D RXn&=WxĒXCY.>}f9i Y#nY!r姊+.l}ג. eH pIc-t ~_Ղ0f)'S0`]+cu0\fuQ.ތ5ZJsx:D2@byT(89d)*XXo>rCC>=<8ֻWА,<'x49QO F-E(rMy}-"X-uЪz uy.ESliHCmA59)2oA4 %X2ęB'j?8D9(VtE׻zoX`qU,p{~[7<&@҄,2Kk04op2L*!*xx>XO)#,LI0 @2ݚ \C|XW)3*vz)78&\sdR:If'Ha1?^u8kyЀc6ÚzGX{[o&_ CdLͲ]_IM_8zO6cܭT8X@lXr9v!iݒRKm n}jByi>ٝJX^q6'Φ mpsQc:RW76V;u/RϢhtl|z(̇}Eb5%f t.lRY(-P4ޤC +zT@JYbdhOlNmtbxԭ6NKm67 ǥ̀o4n Fdeg0вOg ".Vׁ5Q/ N$xkC 2{J7kA :s7&d %hEDh"b&}lXHmggŧpս" 壘dx<@ZrYcU I2mdI IF$d8RK%s*=E58( UӦĀm{clmQv "'!A`3DE$>$)K?Ax H B@ը$7볪ϧl,;r8cW}[r)05t =r[߸؆%5E=x0u}l< !nUf?)8Z0Ḿ.tғ8@PBF6$B^Iܰ~"2tI=֛)/$nBcZ-bq0.QBsf9 ^%@g8fE$2J7/Ҿvkm Wѯ]5lLhAI}%..4B& 2hx`hp#h)e.#nHjKy]cNdxe.&as`@ׂc;6G9Mw wcR0{V [FKx@;^x;k HNyt"QIW跇8\;tBaW,g(ڼULqsd)vîQ|ReU*|PId 6;Jq7rf V=*\KYd^/ad XShh3)A$\lLJ `iU\Yvnd] Al?i/6y HUP%n*;գqϧs|ͤ۲TeILSO'h<_{;p0l(,AWT,!'fȭ{w\ף',X9YX:">`@d#3֒O\Oj}8X5 "8 H(*~~>PK#1 0 gF>w:π܄Rfr < `XS"^o ~rMFt4 K_魲N~vpy(!ӱ/g䭕3U[u}YG<5șBWz|潜oB԰O@&".,r$z/~5s_jiOCͽ!,Rji&sy :kSBAޔ>/qɉ=u#utH5@8Nu>K%1ǻYi5@?sχlḐ~q"_X8uۮƐ'Hj彌JJ<6oTʁo|f{Z]7O'SkeN ]`mqpCMP dGU+WCooP/pF Z LGna<|=TDFBk uy>gg9s5%?6<~Z3͉*d)kUT7 ƖzlbŒ$BvHTy%}ޮ`IQuѯϬ}vb}o 9A^rnnKO5-.ZʿH8lA/mnX@QieģP`x9JTKiܸ-26ᖆCQ~޶p f`1W@Uy Ǟ[H~oض0H;H~'9_GZ yͅ)3/Gbg~VSYn4܄a-3MCh $]P~abULL{K>%FRwY.зW.5l){٩Vzt7Sw~}2.j@"K'f:ک5WYyx^YV.Tp m% lu}Y $,Q4nfkB]5_eZK@6  ?Ha$Ct;dq$X A"+*C$̞-Ņ "=/F>rtfϕݳ`FŊ.W/D2"@GiU)L`ߕUQ^sPʈ#XQ: q" cmaOY2G+ }u?f9]^5NFԇ< 9wi4XS3z(c݊ >O1^ @k0bϏ[OKp4]:^PۍU:03T+5"d$:_7ELht6њ ._zlɑjٽ>/ tzjdBkiqURhviNyDY@YeNs8e=Aa{r,[2Gk="핈#>%訹\-ץaI1kT@-ntU QՖ\[^J{)Q]V|g9ec[?S3ʑZ12a62 zi>Ha=7J}Jxو,~z&`A}CGva/씷r Bfn$,OU89ȖsRcOA`ZZMidcwّ^9Ybb!COﮂf$CQ 5S㾘p3C"rH `b_2i.%É|/XO*@qs9o/ia9N\Qx6-h>=mYڭ8u0LO~GjOv0W@G(V$*xx>\O)#& 0 i mq[[=Knx {S:Z"3yHҗ(4)'gDQR86\_SV.=ux߮p9oIZr׋px,O}%!|%e3ٍ 6{%F*Gl$Cq(:ۦr&F|^]}cP 2+uF < wj;jTWHr&wIp9c>%UsGU3%B.C*Om Kt-7WZoxz71YKg.m4Eƕ  Z/w"r_!2MѼT6d*4Φ;pޝQUŋc :gh: ~/UӲ* 3MܣijDA$uZ鯩{+-N~RD`צW,OzVO/FcbܓuĴlϒ>M`Msx88҆+Gs#͚Q5N}7<$꜑2uK1*aW}UmEcjۃl2_:Y};H=ft TE.+-/I5}l' j VS*e#$)UoƐC% Bm7ne{.]/ 6i:Xq2A[%rZD%hݞFJiu}WNEL$ | E > NE-ؾ/S5ʢ5>B6I//O$fL YRl.$i_L}aR8NqvCΨn$cZ ][(G#_uN:bD 3f9Zz0O̗&+)*֟"#Wut_͙W!C.ɘW'mԤF"*˕CgMppo6NKhکNXN ZXV &/'=\!ljq ()KS+ Ӟ$8>"'BNm̚#,$zSDL r|aa5ݐ)»n0AQ_d)xi"d Vw?5هaXr% LU5eڣ[In'Y05!7f[/LB*Zc_ ~<JiNkIdЬnGO<)J Ml\ 1*xx>RK#00 dcӎىwGχei3/x[aM]`ìu5alyFv<)L$!ި= W^G5O8 /)0/<fx3fBo{VTo>ji {\]8ENe ZG+ޣ,zfok\/ 9@qt!$ ]sMMRB{APζ3Ǜ)s]U vXxV &(Π\Ql hLHz&$l}yŸԈP4ŨY9eA$U0or]a4qJ48*4nU0xZJIz*- kj/H[̍u9m<s14jb( לs ,7Kk8M:v~?b$~ 7+HV:(컨Hv\%W@?JeKkx2WJ]7q6#T/~&$SޏI=9o3m`<1hב5|(D2iqY|'ʝ*!_lNP=N@pGx1^v*vGY} g6DibiIN `9bFGsڟqgT<_$"̢CRYhK[9Ċ7;0>NHP7gs)>9n2Z4&ѯh T1J|g-]Ts4' |5`#`L1~ vŕqZE1O̰WLsBl!|FxC*ξ#m[__F!8; x_Sp+_0V} \ Me!8>< ` Iv֞P#%FsBҘN+p"&h"?tqem!fʭRu8Oر" }8޷ދ*xuGQϖg!B>̆]bO-RV'ݙFu\1Jl:H &w4:mJk.qAX]0}T\rN+mo)X!q0G$΁3p*#:3eYsDv97P;L&H+CS\ܥK?#9*Dk[(Kb W)#X~UF0{U0)%YlNZh,b:3q~ٺaڎp? (n1\EYQ(5e;B Dq ^ZL%7௙91L}3?dګиZ*;@݅&&M3ڦ:?zRL)9NMϔ_k Hp@& *u-~u#ӤߣKJӪɮ W~3UUE+8ltPoI>Bj\PrMP} $,Z!;iWqHnnW>v&7QlV"WDɿcp5&"pb;, Zo0^1-g9ja 3KuSВ"b[_AUӯ\NZh)MuS7|a(I/aV&=x:DllN+4p v}-08Dc'1bD/8 ` p4*xx>\N0 @@PqzcO0}JMX'ޒb.0Ixk_]8 rxcy]TElৠk&*(BXLě }pljӏ4&k!Lp`P') S%Cӗu~D .>=/@~-h+V&;1h@H{멤.cő(-S #jf*M%0"{X(KAzaș(&죚8Zeb!^ҏ8 +닃9TV߅p77E蠥GR@V)( l^+OLax*#1u=?HOGK}3eIv, gh 'BdZ&2mМ0C6DaJY8=%F8bz>>l84k0==x7XGg84&~b)Z8bK*5#N ټ}Y, ֵgH-u+d53ci(E"gb9 LхfJ?rȡ֔^6KUh9.H<[BHgA& Sf24.aea)ٿ0\TN/#Hc37a@!'I?oT|tͷ٭EEcZC2Z Ԙz PL~=hI~V~r.2e4zJs7BJ0\7udtF|awE7țXnZILk[yY٣fɡeW*-6Ǩ{%0\  0fˠA|t0˔=Y( d !hu_`,G6]0BLêjEقߡ}=e+e"P&Iv@eG8 1`Nĩ ׀KjA q: ?Ψǵ貣$3u3OUo /lb3z$Uf{_|V6υrݩ#{B2NRuIusoQPgDTrVL_= u_MS8*{v *d>ZKf݇Y?m%*kӎ-B{\ù )=AMcG/%\p Z[ͻѨ[#кRw=(dK>m`:SOZ,ϏmD(햄5E@V8iFX8{?]2UP\6Sҝ5=t R2:i>9bܠҺ,"2(+ 3;^ejmƩ_&U7=rE؋y>SxvFU)_Ϫ:v3'2Hr%q_/;0>PGu6(j"Ic,.jS<*e;t[3ޖmL+¯mv>_(X+ଐTLfEA3 @pHyT:ic Ĉˀd")S̉ -Q fWM~waP(ILb)<?uKT{zE h 8rT </?isN )=!~"~/6Ds\%4f<|]7,}8Oq%dɽzrbY ਔF$i[vG:4nP>Thۯk+;JQwb;˦6} AA/^˫N kP9$O,Lռh qNh_+秴O1=lw7TBUA.f](07NsBLOSoUoG<<,J^.ed?II'ΫksQ0i*-$[Rsd(?1ݐ|.="BCq)&ݦ; !W$G׮,VE@C(|Xk2IQqA\O#,0 cxD6cc헆|'PxU^mIAW^[s_@463:k΂Fq)B9&yH[A|kA!U8\ ѺU$sխ"xbQ˜cid_' 4a+<؞+(Q "nĭ"̶勒{=?oxgᅣZyWt⿅ k HcuwN7DX )QoFezz}i|nft];Re,2K^Q.x$ayf,⶜V˦s]RG[de)˹.틮\`|^GTvt?y;eCJsio?;MɝiZ `DoI m=zzu,?Š=+N2Yï㬰{ C.R+DaG+`41<ӎS DSe!+@`Hx\tӷΘiKFm޷~E;$pu[.8ŏ\ M]$M?a.! .eakvx3WP ZVp "'ɇOH7HE2')'W!3G-B`[~ɵNp\a.]Uֹ&v3q=7A`S 654I>_אHL 2 zM65lbd5dV8DHzJ#SXcǂRyI YO.LkJoajv;{e鮜QFp0yhi Ec]GMxWm4s. zP+MNbk('%I%J;NLƄb&okׯ~F2غ Nx ՐK=h+>ɉĨ1ti@zazxl#tR<]Cй}N@ajptsLU1`.W^Yn#~׊6"ÉFBE{at{Z×ңcĸ`@I1nSAu%|EUftq'R{X$þc&]]d _L.q[%ufGfU1vHV6oat;*Dw $ou8~|5Hܣ ս3\Q> :.R0;+#zɿ? mFi q4-\]3ηQL1]9Bҕ'}!p dXE5 Bİ6燐5Å`[}Ds21F%:%炷Ч? !3ҟ ݧȟ5)!a5m!FNE zp0ޮ+$Fprs3֝NM4P- ]Y\<ØILyE$8,GNA4 vRFz}ȀW>0#BJnG(p.*xx>VM#/0 i~߿a '0#4⯮N] 2+@_.DQc+4rѝ1O-p/cY)FiP [#Ve,VY:+:*cOk y|+9s&Afd|Ѐt fDzKmCvue$b߅H.Nթ8U0e铅7!qR/c@&Od#ʱ޺";Wt$z>9 _\CuȮGⶓ8_<{i=sp?Rl*8ƾvgƅ/eoAt0Av}ť"OKޕ &8,)ڌV Wdžxc>LyG\K/ȑǺe&᠌;C˫ 0u1WC *t ضvM^$/x!WՌ. 0TtZ+;mi}瘾8'jub{y?Ȑ)7FSogg{2' ٹUwS؝yuԳ~&JێM BoFI'BKl-6g:년_ZXL 5 DD.霜U$UdF/Mr%gE`l{#qD ϭ}_ivr"%qN,rhPO7e`1N찋rz"sWX#&\6(Z+ Υ&F$uzxriP8M Ft擊t:43KF4d_ħ[Nm'!OAj|P=^{7w󭥬ɐx&3qaw9 W43ޛ14X8}[&?NЮpVk WU;+|{b _1sq:~֐;l'&S.dm'lyS+D-KtPR-SgJ(їqdvZC }a׺K3 qՀ3eZ5Z_;fX}M:hطb;y6a+8+Ax,L[EيwwM+K}.ѣvc5J[YW)p,_ /"௅S%vV b{0QgN+P.hLஸ[T47%J_yBAfYV{(Fidb ga Y%%hGdb]-Rtsh4es0nY Lįb:/._ rSpe{cuPBZE 7İ„^> q\p=Rvqp < ĭݬa*ҽGgQ ?nYCKq{I(wu&;^8~Znf4Y6wur*HbN"<90 cH}| 2űxw:#7™=Ӱ0A FEi.W. X2cAG˲2}ֶ :@Ͽ8Y` \v@Ձ!5 gX_-Ou ෰n|7 =Obg;v/$f-o!={|n5i0*c=;%i4ݯ|CJؐ<).P!?Ш%ǣѾ PѼ6Z 'LGmg/j;ij6(V :Wt-~ADkza7s5#)oz_&nPAmƵ}@JtB#n eos;ճփzR?m0BO7Mo@$#t4ub-O!B(Ʒ`"Z@4VOC'HpQ?~{$Lj9]G7biWEdx{לғsT>P}lb&5&Pjv=?ۍqzh}DD-ʴp&|Q U>u~;1;35LXqݧDr$Սh1^ׄN%׬ӽf]NuVɃ*zE`ev {(j"L?q^r2.٤\?|`^.HT2|@+mͅi-xNDig6hOD~n(u0S^- ]z4'-[(ePo8@-ao^q['#/Ueg4E-}iC-f.!ckńGNЫ +y=20 "L%bk: 4hKsAEYxw9 m>c?$i~'o'(ʆ^"X$MH:,VxWlI'3{op[' y%,9I_+4t2o).b^kynj@ Dj vxc-ƼFݡ Ͽh|fy=e |<^=j.t+DF{mwXSN[)N6$0x"Ń xj6< Wo^!s>(ϙ4}8/{;gbs%dpwKѡP&KkYlG7,y$cu@H\3 ?򊓬ߩݵ{ ׆Ո};?iΫ_B5LEg hn}3"jz΋Z7%!IE[%&Ŀ (_oU~UkMϞ̏z0])Ѣ:& *9 *<K/W5KݦKh1&🮌>+*p2ZL$",y0 hҌt}AyjzxޡgkÚjݰY9NFUC)XS{YʹP%{D&upqž/e) V)!lf=La-KQQ×/%Ȁ9%`5N2JGJPipttUb/jO_0ߓtwuI N`jN)6'M^?~}I#-\굁qlE+#"?WFrùoU*p> T/BV΋7ҋe>{;qBErKO_ Hpn \Hf!A؋/Xg+lm,O%=-l$n̼G;)S='Z)B 6kF/9<< [S80ɬP~ߥb'dF9p|xa7ά8\].^O;cki1yM$%bYƄy$M14aքrq7K5{C q \x敩 ٵ4i+Z*6'we6s;|MMi4I*Ď[釉_ 9)  jYbz62 L4Pd:UO8裢 B5=41'[Ll"PF*g>P9Yq8P0ɍo8D_6G`&á[~8~ -AL%$ULƩZmRO_AsG!קF->ioH#[v=d1ֽ1W]߽xd/~7D(Mp vaMtߡ\Vhh1G9QuqyD8ޤ$\;ڴ}Af6 f1(C\CpQ۱Ou4L$Pbp` Bt3ޥ,[ ZޙOPI%/!bՐl`@DcҠ_<,ٻ T2:@'-2ıX ZM캀Rz k85"eI|o[H`u}2ٜz„-a8ïX%mbhgṓ P@8;B.CC2[q(sU9g%(G=;ɦ޸go4OSf ZM]$w~VMc82'Zok.gt_BE/ {:0{Y2 v߶bQL #1Ґؕ% y@ߒN{eEkXcs \ȠQW`+0 f21nnI(rYҜxk9PůG6N'Z*~9Sx댑QtAƱUm!SWJ[ PTj{ ?u%I^K0GmNZѧ0آD m`vUl=X$ys-}Me9ONoz{kR,3wڕ,O  Tn*hwH!G< 8=e*݃xF,|3xu(a ?r'}vibb`P#%|0 i#xWZǽLD+'nc)}1Z֖]$ky3 (g3lW#WS KBi(QWb53e9ߧĚ__mT/)z?ׅ=X3L[Y΁oDL5S35 Q˅./2bH.Dp(fJx6]vt> 2Xݖ*`F'H=i2J Cdh=kUV >š[UlzֹYেyu QRX̠PKNNseۡQp. x{=ȶmadjzb T^ `Wg~Q4 ʼ^\CDZ3ڿ?MB9c9݄Sx<Ͽf ޭueKFEIz]ߜ:q*! tLt&l:s N\^f}2X$.i3_}ljhS% ЖBS7Mm w U>|qXkuО`[,_I9E2sԅ+|pGÊO+&_!BSK͊3~ Lch}C8  ՊYFs?#st {+JnL ϴܝ6:PBsGuE) Pa?F"GEL$6hJklJ?i d<yβ_L2#ʎO~:*d{> E~(rS<o~6 ]=OGSi j!pܞYTf)>G֑[o7(B,v A¡] PȴiK}CM\KfbW(־N!2` T~<}d}.{|*RSg 8-Fxz!TLe5ƬFFӪ]3Ҏ"iD+$(S$Y #Q.ħحU8 WJ),lfS*L8As-plantuml-1.2017.15/src/net/sourceforge/plantuml/version/time00.png000066400000000000000000000064051312650303100247100ustar00rootroot00000000000000PNG  IHDR5PLTE\B\lz\l\Bz\\ W\[Sr0G[ HWY XUY Y R[ KZ SNPRJLWOTT\BIHHJVKbQP̹\l̹̹DTRHMFYNð泙Ls;VH䫍zlzzBlLsK`NF]墁hR帡FS_Jm1踠몉JOs1T ųyDg'o4yBZ 澪^^Nj+]^Pq:MBwu=|BT橉rhg(oǷȶYj-~G[︜X _{u6Sd#l3庥M魏YUs;詊|r1o3]a{GX;LHf#CV̓b IDATxW,IA &߶m<۶m:۶ mO:UT\?N#^VʬZg#Fνvګ!^? &3gN7g%}])uI/y ͣ~@eқvت_Sο2:*٭2Ihx4TuS*),˰Ѽz/Ukwɕr!1LvBɚD b %A^)3Q77apѷ&1œ~l i2p|Is*Um۶Qm۶ٶm6Lf_4:;g{R`;s!=SwЬM&F-yŏuዖYz)I/H 8RCuҳmɈ~ h8 ږa +f?f[y0C:1ڥ7?Pp#` \h:x6ՇS\#|G^<u6jAtyȣ+{Z <<u6ݎnW.Aci-_ګPkx!GJ]C}t{>Ő [❯0YmQI޴ѵْ_R8kuCP}; %-uաw}ޤ^?8tR{=Gk~pxM}x ɡMSxjRƳxBQhIݸ=MNhG?x3A@Lg\~,P4pOK5W$]!qL6h,I,WHT, D(@_R^WJ}psc,s,-d)OEC;ҩ|”Ñ@_R^Wwh3KAd M:PW) ڃ|a.2JOmDMrw]Psho=3EX1$+iRYݔCʔh bIy}OIENDB`plantuml-1.2017.15/src/net/sourceforge/plantuml/vizjs/000077500000000000000000000000001312650303100225575ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/vizjs/GraphvizJs.java000066400000000000000000000070661312650303100255220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.vizjs; import java.io.File; import java.io.OutputStream; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.ThreadFactory; import net.sourceforge.plantuml.cucadiagram.dot.ExeState; import net.sourceforge.plantuml.cucadiagram.dot.Graphviz; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizVersion; import net.sourceforge.plantuml.cucadiagram.dot.ProcessState; public class GraphvizJs implements Graphviz { private final static ExecutorService executorService = Executors .newSingleThreadScheduledExecutor(new ThreadFactory() { public Thread newThread(Runnable runnable) { return new JsThread(runnable); } }); static class JsThread extends Thread { private final Runnable runnable; private VizJsEngine engine; public JsThread(Runnable runnable) { this.runnable = runnable; } @Override public void run() { if (engine == null) { try { this.engine = new VizJsEngine(); } catch (Exception e) { e.printStackTrace(); } } runnable.run(); } } private final String dotString; public GraphvizJs(String dotString) { this.dotString = dotString; } public ProcessState createFile3(OutputStream os) { try { final String svg = submitJob().get(); os.write(svg.getBytes()); return ProcessState.TERMINATED_OK(); } catch (Exception e) { e.printStackTrace(); throw new GraphvizJsRuntimeException(e); } } private Future submitJob() { return executorService.submit(new Callable() { public String call() throws Exception { final JsThread th = (JsThread) Thread.currentThread(); final VizJsEngine engine = th.engine; return engine.execute(dotString); } }); } public File getDotExe() { return null; } public String dotVersion() { return "VizJs"; } public ExeState getExeState() { return ExeState.OK; } public static GraphvizVersion getGraphvizVersion(final boolean modeSafe) { return new GraphvizVersion() { public boolean useShield() { return true; } public boolean useProtectionWhenThereALinkFromOrToGroup() { return true; } public boolean modeSafe() { return modeSafe; } public boolean isVizjs() { return true; } }; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/vizjs/GraphvizJsRuntimeException.java000066400000000000000000000026241312650303100307400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.vizjs; public class GraphvizJsRuntimeException extends RuntimeException { public GraphvizJsRuntimeException(Exception e) { super(e); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/vizjs/VizJsEngine.java000066400000000000000000000043251312650303100256210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.vizjs; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; public class VizJsEngine { public static boolean isOk() { try { final Class classVizJS = Class.forName("ch.braincell.viz.VizJS"); return true; } catch (Exception e) { return false; } } private final Object viz; private final Method mExecute; public VizJsEngine() throws ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { final Class classVizJS = Class.forName("ch.braincell.viz.VizJS"); final Method mCreate = classVizJS.getMethod("create"); mExecute = classVizJS.getMethod("execute", String.class); this.viz = mCreate.invoke(null); System.err.println("Creating one engine"); } public String execute(String dot) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { return (String) mExecute.invoke(viz, dot); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/000077500000000000000000000000001312650303100223475ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/BoolDecoder.java000066400000000000000000000067741312650303100254110ustar00rootroot00000000000000/* This file is part of javavp8decoder. javavp8decoder is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. javavp8decoder 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 javavp8decoder. If not, see . */ package net.sourceforge.plantuml.webp; import java.io.IOException; import javax.imageio.stream.ImageInputStream; public class BoolDecoder { int bit_count; /* # of bits shifted out of value, at most 7 */ ImageInputStream data; private long offset; /* pointer to next compressed data byte */ private int range; /* always identical to encoder's range */ private int value; /* contains at least 24 significant bits */ BoolDecoder(ImageInputStream frame, long offset) throws IOException { this.data = frame; this.offset = offset; initBoolDecoder(); } private void initBoolDecoder() throws IOException { value = 0; /* value = first 16 input bits */ data.seek(offset); value = data.readUnsignedByte() << 8; // value = (data[offset]) << 8; offset++; range = 255; /* initial range is full */ bit_count = 0; /* have not yet shifted out any bits */ } public int readBit() throws IOException { return readBool(128); } public int readBool(int probability) throws IOException { int bit = 0; int split; int bigsplit; int range = this.range; int value = this.value; split = 1 + (((range - 1) * probability) >> 8); bigsplit = (split << 8); range = split; if (value >= bigsplit) { range = this.range - split; value = value - bigsplit; bit = 1; } { int count = this.bit_count; int shift = Globals.vp8dxBitreaderNorm[range]; range <<= shift; value <<= shift; count -= shift; if (count <= 0) { // data.seek(offset); value |= data.readUnsignedByte() << (-count); // value |= data[offset] << (-count); offset++; count += 8; } this.bit_count = count; } this.value = value; this.range = range; return bit; } /* * Convenience function reads a "literal", that is, a "num_bits" wide * unsigned value whose bits come high- to low-order, with each bit encoded * at probability 128 (i.e., 1/2). */ public int readLiteral(int num_bits) throws IOException { int v = 0; while (num_bits-- > 0) v = (v << 1) + readBool(128); return v; } int readTree(int t[], /* tree specification */ int p[] /* corresponding interior node probabilities */ ) throws IOException { int i = 0; /* begin at root */ /* Descend tree until leaf is reached */ while ((i = t[i + readBool(p[i >> 1])]) > 0) { } return -i; /* return value is negation of nonpositive index */ } int readTreeSkip(int t[], /* tree specification */ int p[], /* corresponding interior node probabilities */ int skip_branches) throws IOException { int i = skip_branches * 2; /* begin at root */ /* Descend tree until leaf is reached */ while ((i = t[i + readBool(p[i >> 1])]) > 0) { } return -i; /* return value is negation of nonpositive index */ } public void seek() throws IOException { data.seek(offset); } public String toString() { return "bc: " + value; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/DeltaQ.java000066400000000000000000000014631312650303100243700ustar00rootroot00000000000000/* This file is part of javavp8decoder. javavp8decoder is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. javavp8decoder 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 javavp8decoder. If not, see . */ package net.sourceforge.plantuml.webp; public class DeltaQ { public boolean update = false; public int v = 0; } plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/Globals.java000066400000000000000000000714551312650303100246110ustar00rootroot00000000000000/* This file is part of javavp8decoder. javavp8decoder is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. javavp8decoder 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 javavp8decoder. If not, see . */ package net.sourceforge.plantuml.webp; public class Globals { public static final int DC_PRED = 0; /* * predict DC using row above and column * to the left */ public static final int V_PRED = 1; /* predict rows using row above */ public static final int H_PRED = 2; /* * predict columns using column to the * left */ public static final int TM_PRED = 3; /* * propagate second differences a la * "true motion" */ public static final int B_PRED = 4; /* * each Y subblock is independently * predicted */ public static String getModeAsString(int mode) { switch (mode) { case DC_PRED: return "DC_PRED"; case V_PRED: return "V_PRED"; case H_PRED: return "H_PRED"; case TM_PRED: return "TM_PRED"; case B_PRED: return "B_PRED"; } return "not found"; } /* intra_bmode */ public static final int B_DC_PRED = 0; /* * predict DC using row above and * column to the left */ public static final int B_TM_PRED = 1; /* * propagate second differences a la * "true motion" */ public static final int B_VE_PRED = 2; /* predict rows using row above */ public static final int B_HE_PRED = 3; /* * predict columns using column to * the left */ public static final int B_LD_PRED = 4; /* * southwest (left and down) 45 * degree diagonal prediction */ public static final int B_RD_PRED = 5; /* southeast (right and down) "" */ public static final int B_VR_PRED = 6; /* * SSE (vertical right) diagonal * prediction */ public static final int B_VL_PRED = 7; /* SSW (vertical left) "" */ public static final int B_HD_PRED = 8; /* ESE (horizontal down) "" */ public static final int B_HU_PRED = 9; /* ENE (horizontal up) "" */ public static String getSubBlockModeAsString(int mode) { switch (mode) { case B_DC_PRED: return "B_DC_PRED"; case B_TM_PRED: return "B_TM_PRED"; case B_VE_PRED: return "B_VE_PRED"; case B_HE_PRED: return "B_HE_PRED"; case B_LD_PRED: return "B_LD_PRED"; case B_RD_PRED: return "B_RD_PRED"; case B_VR_PRED: return "B_VR_PRED"; case B_VL_PRED: return "B_VL_PRED"; case B_HD_PRED: return "B_HD_PRED"; case B_HU_PRED: return "B_HU_PRED"; } return "not found"; } public static final int MAX_MB_SEGMENTS = 4; public static final int MB_LVL_MAX = 2; public static int[] vp8MacroBlockFeatureDataBits = { 7, 6 }; public static final int MB_FEATURE_TREE_PROBS = 3; public static int macroBlockSegmentTree[] = { 2, 4, /* root: "0", "1" subtrees */ -0, -1, /* "00" = 0th value, "01" = 1st value */ -2, -3 /* "10" = 2nd value, "11" = 3rd value */ }; public static int vp8KeyFrameYModeTree[] = { -B_PRED, 2, 4, 6, -DC_PRED, -V_PRED, -H_PRED, -TM_PRED }; public static int vp8SubBlockModeTree[] = { -B_DC_PRED, 2, /* * B_DC_PRED = * "0" */ -B_TM_PRED, 4, /* B_TM_PRED = "10" */ -B_VE_PRED, 6, /* B_VE_PRED = "110" */ 8, 12, -B_HE_PRED, 10, /* B_HE_PRED = "1110" */ -B_RD_PRED, -B_VR_PRED, /* B_RD_PRED = "111100", B_VR_PRED = "111101" */ -B_LD_PRED, 14, /* B_LD_PRED = "111110" */ -B_VL_PRED, 16, /* B_VL_PRED = "1111110" */ -B_HD_PRED, -B_HU_PRED /* HD = "11111110", HU = "11111111" */ }; public static int vp8KeyFrameYModeProb[] = { 145, 156, 163, 128 }; // uv public static int vp8UVModeTree[] = { -DC_PRED, 2, /* * root: DC_PRED = "0", * "1" subtree */ -V_PRED, 4, /* "1" subtree: V_PRED = "10", "11" subtree */ -H_PRED, -TM_PRED /* "11" subtree: H_PRED = "110", TM_PRED = "111" */ }; public static int vp8KeyFrameUVModeProb[] = { 142, 114, 183 }; public static int vp8KeyFrameSubBlockModeProb[][][] = { { { 231, 120, 48, 89, 115, 113, 120, 152, 112 }, { 152, 179, 64, 126, 170, 118, 46, 70, 95 }, { 175, 69, 143, 80, 85, 82, 72, 155, 103 }, { 56, 58, 10, 171, 218, 189, 17, 13, 152 }, { 144, 71, 10, 38, 171, 213, 144, 34, 26 }, { 114, 26, 17, 163, 44, 195, 21, 10, 173 }, { 121, 24, 80, 195, 26, 62, 44, 64, 85 }, { 170, 46, 55, 19, 136, 160, 33, 206, 71 }, { 63, 20, 8, 114, 114, 208, 12, 9, 226 }, { 81, 40, 11, 96, 182, 84, 29, 16, 36 } }, { { 134, 183, 89, 137, 98, 101, 106, 165, 148 }, { 72, 187, 100, 130, 157, 111, 32, 75, 80 }, { 66, 102, 167, 99, 74, 62, 40, 234, 128 }, { 41, 53, 9, 178, 241, 141, 26, 8, 107 }, { 104, 79, 12, 27, 217, 255, 87, 17, 7 }, { 74, 43, 26, 146, 73, 166, 49, 23, 157 }, { 65, 38, 105, 160, 51, 52, 31, 115, 128 }, { 87, 68, 71, 44, 114, 51, 15, 186, 23 }, { 47, 41, 14, 110, 182, 183, 21, 17, 194 }, { 66, 45, 25, 102, 197, 189, 23, 18, 22 } }, { { 88, 88, 147, 150, 42, 46, 45, 196, 205 }, { 43, 97, 183, 117, 85, 38, 35, 179, 61 }, { 39, 53, 200, 87, 26, 21, 43, 232, 171 }, { 56, 34, 51, 104, 114, 102, 29, 93, 77 }, { 107, 54, 32, 26, 51, 1, 81, 43, 31 }, { 39, 28, 85, 171, 58, 165, 90, 98, 64 }, { 34, 22, 116, 206, 23, 34, 43, 166, 73 }, { 68, 25, 106, 22, 64, 171, 36, 225, 114 }, { 34, 19, 21, 102, 132, 188, 16, 76, 124 }, { 62, 18, 78, 95, 85, 57, 50, 48, 51 } }, { { 193, 101, 35, 159, 215, 111, 89, 46, 111 }, { 60, 148, 31, 172, 219, 228, 21, 18, 111 }, { 112, 113, 77, 85, 179, 255, 38, 120, 114 }, { 40, 42, 1, 196, 245, 209, 10, 25, 109 }, { 100, 80, 8, 43, 154, 1, 51, 26, 71 }, { 88, 43, 29, 140, 166, 213, 37, 43, 154 }, { 61, 63, 30, 155, 67, 45, 68, 1, 209 }, { 142, 78, 78, 16, 255, 128, 34, 197, 171 }, { 41, 40, 5, 102, 211, 183, 4, 1, 221 }, { 51, 50, 17, 168, 209, 192, 23, 25, 82 } }, { { 125, 98, 42, 88, 104, 85, 117, 175, 82 }, { 95, 84, 53, 89, 128, 100, 113, 101, 45 }, { 75, 79, 123, 47, 51, 128, 81, 171, 1 }, { 57, 17, 5, 71, 102, 57, 53, 41, 49 }, { 115, 21, 2, 10, 102, 255, 166, 23, 6 }, { 38, 33, 13, 121, 57, 73, 26, 1, 85 }, { 41, 10, 67, 138, 77, 110, 90, 47, 114 }, { 101, 29, 16, 10, 85, 128, 101, 196, 26 }, { 57, 18, 10, 102, 102, 213, 34, 20, 43 }, { 117, 20, 15, 36, 163, 128, 68, 1, 26 } }, { { 138, 31, 36, 171, 27, 166, 38, 44, 229 }, { 67, 87, 58, 169, 82, 115, 26, 59, 179 }, { 63, 59, 90, 180, 59, 166, 93, 73, 154 }, { 40, 40, 21, 116, 143, 209, 34, 39, 175 }, { 57, 46, 22, 24, 128, 1, 54, 17, 37 }, { 47, 15, 16, 183, 34, 223, 49, 45, 183 }, { 46, 17, 33, 183, 6, 98, 15, 32, 183 }, { 65, 32, 73, 115, 28, 128, 23, 128, 205 }, { 40, 3, 9, 115, 51, 192, 18, 6, 223 }, { 87, 37, 9, 115, 59, 77, 64, 21, 47 } }, { { 104, 55, 44, 218, 9, 54, 53, 130, 226 }, { 64, 90, 70, 205, 40, 41, 23, 26, 57 }, { 54, 57, 112, 184, 5, 41, 38, 166, 213 }, { 30, 34, 26, 133, 152, 116, 10, 32, 134 }, { 75, 32, 12, 51, 192, 255, 160, 43, 51 }, { 39, 19, 53, 221, 26, 114, 32, 73, 255 }, { 31, 9, 65, 234, 2, 15, 1, 118, 73 }, { 88, 31, 35, 67, 102, 85, 55, 186, 85 }, { 56, 21, 23, 111, 59, 205, 45, 37, 192 }, { 55, 38, 70, 124, 73, 102, 1, 34, 98 } }, { { 102, 61, 71, 37, 34, 53, 31, 243, 192 }, { 69, 60, 71, 38, 73, 119, 28, 222, 37 }, { 68, 45, 128, 34, 1, 47, 11, 245, 171 }, { 62, 17, 19, 70, 146, 85, 55, 62, 70 }, { 75, 15, 9, 9, 64, 255, 184, 119, 16 }, { 37, 43, 37, 154, 100, 163, 85, 160, 1 }, { 63, 9, 92, 136, 28, 64, 32, 201, 85 }, { 86, 6, 28, 5, 64, 255, 25, 248, 1 }, { 56, 8, 17, 132, 137, 255, 55, 116, 128 }, { 58, 15, 20, 82, 135, 57, 26, 121, 40 } }, { { 164, 50, 31, 137, 154, 133, 25, 35, 218 }, { 51, 103, 44, 131, 131, 123, 31, 6, 158 }, { 86, 40, 64, 135, 148, 224, 45, 183, 128 }, { 22, 26, 17, 131, 240, 154, 14, 1, 209 }, { 83, 12, 13, 54, 192, 255, 68, 47, 28 }, { 45, 16, 21, 91, 64, 222, 7, 1, 197 }, { 56, 21, 39, 155, 60, 138, 23, 102, 213 }, { 85, 26, 85, 85, 128, 128, 32, 146, 171 }, { 18, 11, 7, 63, 144, 171, 4, 4, 246 }, { 35, 27, 10, 146, 174, 171, 12, 26, 128 } }, { { 190, 80, 35, 99, 180, 80, 126, 54, 45 }, { 85, 126, 47, 87, 176, 51, 41, 20, 32 }, { 101, 75, 128, 139, 118, 146, 116, 128, 85 }, { 56, 41, 15, 176, 236, 85, 37, 9, 62 }, { 146, 36, 19, 30, 171, 255, 97, 27, 20 }, { 71, 30, 17, 119, 118, 255, 17, 18, 138 }, { 101, 38, 60, 138, 55, 70, 43, 26, 142 }, { 138, 45, 61, 62, 219, 1, 81, 188, 64 }, { 32, 41, 20, 117, 151, 142, 20, 21, 163 }, { 112, 19, 12, 61, 195, 128, 48, 4, 24 } } }; static int vp8CoefUpdateProbs[][][][] = new int[][][][] { { { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, { 249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, { 234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255 }, { 250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255 }, { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } }, { { { 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255 }, { 234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255 } }, { { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } }, { { { 186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255 }, { 234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255 }, { 251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255 } }, { { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255 } }, { { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } }, { { { 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255 }, { 248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, { 246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, { 252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255 } }, { { 255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, { 248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, { 253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, { 252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, { { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } } }; public static int[][][][] getDefaultCoefProbs() { int r[][][][] = new int[vp8DefaultCoefProbs.length][vp8DefaultCoefProbs[0].length][vp8DefaultCoefProbs[0][0].length][vp8DefaultCoefProbs[0][0][0].length]; for (int i = 0; i < vp8DefaultCoefProbs.length; i++) for (int j = 0; j < vp8DefaultCoefProbs[0].length; j++) for (int k = 0; k < vp8DefaultCoefProbs[0][0].length; k++) for (int l = 0; l < vp8DefaultCoefProbs[0][0][0].length; l++) r[i][j][k][l] = vp8DefaultCoefProbs[i][j][k][l]; return r; } private static int vp8DefaultCoefProbs[][][][] = new int[][][][] { { { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } }, { { 253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128 }, { 189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128 }, { 106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128 } }, { { 1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128 }, { 181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128 }, { 78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128 } }, { { 1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128 }, { 184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128 }, { 77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128 } }, { { 1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128 }, { 170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128 }, { 37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128 } }, { { 1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128 }, { 207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128 }, { 102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128 } }, { { 1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128 }, { 177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128 }, { 80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128 } }, { { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, { 246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, { 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } } }, { { { 198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62 }, { 131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1 }, { 68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128 } }, { { 1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128 }, { 184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128 }, { 81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128 } }, { { 1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128 }, { 99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128 }, { 23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128 } }, { { 1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128 }, { 109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128 }, { 44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128 } }, { { 1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128 }, { 94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128 }, { 22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128 } }, { { 1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128 }, { 124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128 }, { 35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128 } }, { { 1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128 }, { 121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128 }, { 45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128 } }, { { 1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128 }, { 203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, { 137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128 } } }, { { { 253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128 }, { 175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128 }, { 73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128 } }, { { 1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128 }, { 239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128 }, { 155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128 } }, { { 1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128 }, { 201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128 }, { 69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128 } }, { { 1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128 }, { 223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128 }, { 141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128 } }, { { 1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, { 190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128 }, { 149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 } }, { { 1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, { 247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, { 240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128 } }, { { 1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128 }, { 213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128 }, { 55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128 } }, { { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } } }, { { { 202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255 }, { 126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128 }, { 61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128 } }, { { 1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128 }, { 166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128 }, { 39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128 } }, { { 1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128 }, { 124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128 }, { 24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128 } }, { { 1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128 }, { 149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128 }, { 28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128 } }, { { 1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128 }, { 123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128 }, { 20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128 } }, { { 1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128 }, { 168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128 }, { 47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128 } }, { { 1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128 }, { 141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128 }, { 42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128 } }, { { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, { 244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, { 238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 } } } }; public static final int DCT_0 = 0; /* value 0 */ public static final int DCT_1 = 1; /* 1 */ public static final int DCT_2 = 2; /* 2 */ public static final int DCT_3 = 3; /* 3 */ public static final int DCT_4 = 4; /* 4 */ public static final int dct_cat1 = 5; /* range 5 - 6 (size 2) */ public static final int dct_cat2 = 6; /* 7 - 10 (4) */ public static final int dct_cat3 = 7; /* 11 - 18 (8) */ public static final int dct_cat4 = 8; /* 19 - 34 (16) */ public static final int dct_cat5 = 9; /* 35 - 66 (32) */ public static final int dct_cat6 = 10; /* 67 - 2048 (1982) */ public static final int dct_eob = 11; /* end of block */ public static final int vp8CoefTree[] = { -dct_eob, 2, /* eob = "0" */ -DCT_0, 4, /* 0 = "10" */ -DCT_1, 6, /* 1 = "110" */ 8, 12, -DCT_2, 10, /* 2 = "11100" */ -DCT_3, -DCT_4, /* 3 = "111010", 4 = "111011" */ 14, 16, -dct_cat1, -dct_cat2, /* cat1 = "111100", cat2 = "111101" */ 18, 20, -dct_cat3, -dct_cat4, /* cat3 = "1111100", cat4 = "1111101" */ -dct_cat5, -dct_cat6 /* cat4 = "1111110", cat4 = "1111111" */ }; public static final int vp8CoefTreeNoEOB[] = { // -dct_eob, 2, /* eob = "0" */ -DCT_0, 4, /* 0 = "10" */ -DCT_1, 6, /* 1 = "110" */ 8, 12, -DCT_2, 10, /* 2 = "11100" */ -DCT_3, -DCT_4, /* 3 = "111010", 4 = "111011" */ 14, 16, -dct_cat1, -dct_cat2, /* cat1 = "111100", cat2 = "111101" */ 18, 20, -dct_cat3, -dct_cat4, /* cat3 = "1111100", cat4 = "1111101" */ -dct_cat5, -dct_cat6 /* cat4 = "1111110", cat4 = "1111111" */ }; public final static int Pcat1[] = { 159, 0 }; public final static int Pcat2[] = { 165, 145, 0 }; public final static int Pcat3[] = { 173, 148, 140, 0 }; public final static int Pcat4[] = { 176, 155, 140, 135, 0 }; public final static int Pcat5[] = { 180, 157, 141, 134, 130, 0 }; public final static int Pcat6[] = { 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0 }; public static final int vp8CoefBands[] = { 0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7 }; public static final int vp8defaultZigZag1d[] = { 0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15, }; public static final int vp8dxBitreaderNorm[] = { 0, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; public static final int vp8DcQLookup[] = { 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 17, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 25, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 93, 95, 96, 98, 100, 101, 102, 104, 106, 108, 110, 112, 114, 116, 118, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 143, 145, 148, 151, 154, 157, }; public static final int vp8AcQLookup[] = { 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 119, 122, 125, 128, 131, 134, 137, 140, 143, 146, 149, 152, 155, 158, 161, 164, 167, 170, 173, 177, 181, 185, 189, 193, 197, 201, 205, 209, 213, 217, 221, 225, 229, 234, 239, 245, 249, 254, 259, 264, 269, 274, 279, 284, }; public static String toHex(int c) { String r = new String(); r = String.format("%1$#x ", c); return r; } // clamp between 0 and value public static int clamp(int input, int value) { int r = input; if (r > value) r = value; if (r < 0) r = 0; return r; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/IDCT.java000066400000000000000000000073771312650303100237530ustar00rootroot00000000000000/* This file is part of javavp8decoder. javavp8decoder is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. javavp8decoder 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 javavp8decoder. If not, see . */ package net.sourceforge.plantuml.webp; public class IDCT { /* IDCT implementation */ private static final int cospi8sqrt2minus1 = 20091; private static final int sinpi8sqrt2 = 35468; public static int[][] idct4x4llm(int input[]) { int i; int a1, b1, c1, d1; int offset = 0; int[] output = new int[16]; int temp1, temp2; for (i = 0; i < 4; i++) { a1 = input[offset + 0] + input[offset + 8]; b1 = input[offset + 0] - input[offset + 8]; temp1 = (input[offset + 4] * sinpi8sqrt2) >> 16; temp2 = input[offset + 12] + ((input[offset + 12] * cospi8sqrt2minus1) >> 16); c1 = temp1 - temp2; temp1 = input[offset + 4] + ((input[offset + 4] * cospi8sqrt2minus1) >> 16); temp2 = (input[offset + 12] * sinpi8sqrt2) >> 16; d1 = temp1 + temp2; output[offset + (0 * 4)] = a1 + d1; output[offset + (3 * 4)] = a1 - d1; output[offset + (1 * 4)] = b1 + c1; output[offset + (2 * 4)] = b1 - c1; offset++; } int diffo = 0; int diff[][] = new int[4][4]; offset = 0; for (i = 0; i < 4; i++) { a1 = output[(offset * 4) + 0] + output[(offset * 4) + 2]; b1 = output[(offset * 4) + 0] - output[(offset * 4) + 2]; temp1 = (output[(offset * 4) + 1] * sinpi8sqrt2) >> 16; temp2 = output[(offset * 4) + 3] + ((output[(offset * 4) + 3] * cospi8sqrt2minus1) >> 16); c1 = temp1 - temp2; temp1 = output[(offset * 4) + 1] + ((output[(offset * 4) + 1] * cospi8sqrt2minus1) >> 16); temp2 = (output[(offset * 4) + 3] * sinpi8sqrt2) >> 16; d1 = temp1 + temp2; output[(offset * 4) + 0] = (a1 + d1 + 4) >> 3; output[(offset * 4) + 3] = (a1 - d1 + 4) >> 3; output[(offset * 4) + 1] = (b1 + c1 + 4) >> 3; output[(offset * 4) + 2] = (b1 - c1 + 4) >> 3; diff[0][diffo] = (a1 + d1 + 4) >> 3; diff[3][diffo] = (a1 - d1 + 4) >> 3; diff[1][diffo] = (b1 + c1 + 4) >> 3; diff[2][diffo] = (b1 - c1 + 4) >> 3; offset++; diffo++; } return diff; } public static int[][] iwalsh4x4(int input[]) { int i; int a1, b1, c1, d1; int a2, b2, c2, d2; int[] output = new int[16]; int diff[][] = new int[4][4]; int offset = 0; for (i = 0; i < 4; i++) { a1 = input[offset + 0] + input[offset + 12]; b1 = input[offset + 4] + input[offset + 8]; c1 = input[offset + 4] - input[offset + 8]; d1 = input[offset + 0] - input[offset + 12]; output[offset + 0] = a1 + b1; output[offset + 4] = c1 + d1; output[offset + 8] = a1 - b1; output[offset + 12] = d1 - c1; offset++; } offset = 0; for (i = 0; i < 4; i++) { a1 = output[offset + 0] + output[offset + 3]; b1 = output[offset + 1] + output[offset + 2]; c1 = output[offset + 1] - output[offset + 2]; d1 = output[offset + 0] - output[offset + 3]; a2 = a1 + b1; b2 = c1 + d1; c2 = a1 - b1; d2 = d1 - c1; output[offset + 0] = (a2 + 3) >> 3; output[offset + 1] = (b2 + 3) >> 3; output[offset + 2] = (c2 + 3) >> 3; output[offset + 3] = (d2 + 3) >> 3; diff[0][i] = (a2 + 3) >> 3; diff[1][i] = (b2 + 3) >> 3; diff[2][i] = (c2 + 3) >> 3; diff[3][i] = (d2 + 3) >> 3; offset += 4; } return diff; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/LoopFilter.java000066400000000000000000000474311312650303100253020ustar00rootroot00000000000000/* This file is part of javavp8decoder. javavp8decoder is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. javavp8decoder 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 javavp8decoder. If not, see . */ package net.sourceforge.plantuml.webp; public class LoopFilter { private static int abs(int v) { return v < 0 ? -v : v; } private static int c(int v) { // return (int) (v < -128 ? -128 : (v > 127 ? v : 127)); int r = v; if (v < -128) r = -128; if (v > 127) r = 127; return r; } private static int common_adjust(boolean use_outer_taps, /* * filter is 2 or 4 * taps wide */ Segment seg) { int p1 = u2s(seg.P1); /* retrieve and convert all 4 pixels */ int p0 = u2s(seg.P0); int q0 = u2s(seg.Q0); int q1 = u2s(seg.Q1); /* * Disregarding clamping, when "use_outer_taps" is false, "a" is * 3*(q0-p0). Since we are about to divide "a" by 8, in this case we end * up multiplying the edge difference by 5/8. When "use_outer_taps" is * true (as for the simple filter), "a" is p1 - 3*p0 + 3*q0 - q1, which * can be thought of as a refinement of 2*(q0 - p0) and the adjustment * is something like (q0 - p0)/4. */ int a = c((use_outer_taps ? c(p1 - q1) : 0) + 3 * (q0 - p0)); /* * b is used to balance the rounding of a/8 in the case where the * "fractional" part "f" of a/8 is exactly 1/2. */ int b = (c(a + 3)) >> 3; /* * Divide a by 8, rounding up when f >= 1/2. Although not strictly part * of the "C" language, the right-shift is assumed to propagate the sign * bit. */ a = c(a + 4) >> 3; /* Subtract "a" from q0, "bringing it closer" to p0. */ seg.Q0 = s2u(q0 - a); /* * Add "a" (with adjustment "b") to p0, "bringing it closer" to q0. The * clamp of "a+b", while present in the reference decoder, is * superfluous; we have -16 <= a <= 15 at this point. */ seg.P0 = s2u(p0 + b); return a; } /* * All functions take (among other things) a segment (of length at most 4 + * 4 = 8) symmetrically straddling an edge. The pixel values (or pointers) * are always given in order, from the "beforemost" to the "aftermost". So, * for a horizontal edge (written "|"), an 8-pixel segment would be ordered * p3 p2 p1 p0 | q0 q1 q2 q3. */ /* * Filtering is disabled if the difference between any two adjacent * "interior" pixels in the 8-pixel segment exceeds the relevant threshold * (I). A more complex thresholding calculation is done for the group of * four pixels that straddle the edge, in line with the calculation in * simple_segment() above. */ public static boolean filter_yes(int I, /* limit on interior differences */ int E, /* limit at the edge */ int p3, int p2, int p1, int p0, /* pixels before edge */ int q0, int q1, int q2, int q3 /* pixels after edge */ ) { return (abs(p0 - q0) * 2 + abs(p1 - q1) / 2) <= E && abs(p3 - p2) <= I && abs(p2 - p1) <= I && abs(p1 - p0) <= I && abs(q3 - q2) <= I && abs(q2 - q1) <= I && abs(q1 - q0) <= I; } private static Segment getSegH(SubBlock rsb, SubBlock lsb, int a) { Segment seg = new Segment(); int[][] rdest = rsb.getDest(); int[][] ldest = lsb.getDest(); seg.P0 = ldest[3][a]; seg.P1 = ldest[2][a]; seg.P2 = ldest[1][a]; seg.P3 = ldest[0][a]; seg.Q0 = rdest[0][a]; seg.Q1 = rdest[1][a]; seg.Q2 = rdest[2][a]; seg.Q3 = rdest[3][a]; return seg; } private static Segment getSegV(SubBlock bsb, SubBlock tsb, int a) { Segment seg = new Segment(); int[][] bdest = bsb.getDest(); int[][] tdest = tsb.getDest(); seg.P0 = tdest[a][3]; seg.P1 = tdest[a][2]; seg.P2 = tdest[a][1]; seg.P3 = tdest[a][0]; seg.Q0 = bdest[a][0]; seg.Q1 = bdest[a][1]; seg.Q2 = bdest[a][2]; seg.Q3 = bdest[a][3]; return seg; } /* * Filtering is altered if (at least) one of the differences on either side * of the edge exceeds a threshold (we have "high edge variance"). */ public static boolean hev(int threshold, int p1, int p0, /* * pixels before * edge */ int q0, int q1 /* pixels after edge */ ) { return abs(p1 - p0) > threshold || abs(q1 - q0) > threshold; } public static void loopFilter(VP8Frame frame) { frame.fireLFProgressUpdate(0); if (frame.getFilterType() == 2) { loopFilterUV(frame); frame.fireLFProgressUpdate(50); loopFilterY(frame); } else if (frame.getFilterType() == 1) { loopFilterSimple(frame); } frame.fireLFProgressUpdate(100); } public static void loopFilterSimple(VP8Frame frame) { for (int y = 0; y < frame.getMacroBlockRows(); y++) { frame.fireLFProgressUpdate((100.0f * ((float) (y + 1) / (float) (frame .getMacroBlockRows())))); for (int x = 0; x < frame.getMacroBlockCols(); x++) { // System.out.println("x: "+x+" y: "+y); MacroBlock rmb = frame.getMacroBlock(x, y); MacroBlock bmb = frame.getMacroBlock(x, y); int loop_filter_level = rmb.getFilterLevel(); if(loop_filter_level!=0) { int interior_limit = rmb.getFilterLevel(); int sharpnessLevel = frame.getSharpnessLevel(); if (sharpnessLevel > 0) { interior_limit >>= sharpnessLevel > 4 ? 2 : 1; if (interior_limit > 9 - sharpnessLevel) interior_limit = 9 - sharpnessLevel; } if (interior_limit == 0) interior_limit = 1; /* Luma and Chroma use the same inter-subblock edge limit */ int sub_bedge_limit = (loop_filter_level * 2) + interior_limit; if(sub_bedge_limit < 1) sub_bedge_limit = 1; /* Luma and Chroma use the same inter-macroblock edge limit */ int mbedge_limit = sub_bedge_limit+4; // left if (x > 0) { MacroBlock lmb = frame.getMacroBlock(x - 1, y); for (int b = 0; b < 4; b++) { SubBlock rsb = rmb.getSubBlock(SubBlock.PLANE.Y1, 0, b); SubBlock lsb = lmb.getSubBlock(SubBlock.PLANE.Y1, 3, b); for (int a = 0; a < 4; a++) { Segment seg = getSegH(rsb, lsb, a); // MBfilter(hev_threshold, interior_limit, // mbedge_limit, seg); // System.out.println(mbedge_limit); simple_segment(mbedge_limit, seg); setSegH(rsb, lsb, seg, a); } } } // sb left if (!rmb.isSkip_inner_lf()) { for (int a = 1; a < 4; a++) { for (int b = 0; b < 4; b++) { SubBlock lsb = rmb.getSubBlock(SubBlock.PLANE.Y1, a - 1, b); SubBlock rsb = rmb.getSubBlock(SubBlock.PLANE.Y1, a, b); for (int c = 0; c < 4; c++) { // System.out.println("sbleft a:"+a+" b:"+b+" c:"+c); Segment seg = getSegH(rsb, lsb, c); simple_segment(sub_bedge_limit, seg); // System.out.println(sub_bedge_limit); // subblock_filter(hev_threshold,interior_limit,sub_bedge_limit, // seg); setSegH(rsb, lsb, seg, c); } } } } // top if (y > 0) { MacroBlock tmb = frame.getMacroBlock(x, y - 1); for (int b = 0; b < 4; b++) { SubBlock tsb = tmb.getSubBlock(SubBlock.PLANE.Y1, b, 3); SubBlock bsb = bmb.getSubBlock(SubBlock.PLANE.Y1, b, 0); for (int a = 0; a < 4; a++) { Segment seg = getSegV(bsb, tsb, a); simple_segment(mbedge_limit, seg); // System.out.println(mbedge_limit); // MBfilter(hev_threshold, interior_limit, // mbedge_limit, seg); setSegV(bsb, tsb, seg, a); } } } // sb top if (!rmb.isSkip_inner_lf()) { for (int a = 1; a < 4; a++) { for (int b = 0; b < 4; b++) { SubBlock tsb = bmb.getSubBlock(SubBlock.PLANE.Y1, b, a - 1); SubBlock bsb = bmb.getSubBlock(SubBlock.PLANE.Y1, b, a); for (int c = 0; c < 4; c++) { // System.out.println("sbtop"); Segment seg = getSegV(bsb, tsb, c); simple_segment(sub_bedge_limit, seg); // System.out.println(sub_bedge_limit); // subblock_filter(hev_threshold,interior_limit,sub_bedge_limit, // seg); setSegV(bsb, tsb, seg, c); } } } } } } } } public static void loopFilterUV(VP8Frame frame) { for (int y = 0; y < frame.getMacroBlockRows(); y++) { frame.fireLFProgressUpdate((100.0f * ((float) (y + 1) / (float) (frame .getMacroBlockRows()))) / 2); for (int x = 0; x < frame.getMacroBlockCols(); x++) { MacroBlock rmb = frame.getMacroBlock(x, y); MacroBlock bmb = frame.getMacroBlock(x, y); int sharpnessLevel = frame.getSharpnessLevel(); int loop_filter_level = rmb.getFilterLevel(); if(loop_filter_level!=0) { int interior_limit = rmb.getFilterLevel(); if (sharpnessLevel > 0) { interior_limit >>= sharpnessLevel > 4 ? 2 : 1; if (interior_limit > 9 - sharpnessLevel) interior_limit = 9 - sharpnessLevel; } if (interior_limit == 0) interior_limit = 1; int hev_threshold = 0; if (frame.getFrameType() == 0) /* current frame is a key frame */ { if (loop_filter_level >= 40) hev_threshold = 2; else if (loop_filter_level >= 15) hev_threshold = 1; } else /* current frame is an interframe */ { if (loop_filter_level >= 40) hev_threshold = 3; else if (loop_filter_level >= 20) hev_threshold = 2; else if (loop_filter_level >= 15) hev_threshold = 1; } /* Luma and Chroma use the same inter-macroblock edge limit */ int mbedge_limit = ((loop_filter_level + 2) * 2) + interior_limit; /* Luma and Chroma use the same inter-subblock edge limit */ int sub_bedge_limit = (loop_filter_level * 2) + interior_limit; if (x > 0) { MacroBlock lmb = frame.getMacroBlock(x - 1, y); for (int b = 0; b < 2; b++) { SubBlock rsbU = rmb.getSubBlock(SubBlock.PLANE.U, 0, b); SubBlock lsbU = lmb.getSubBlock(SubBlock.PLANE.U, 1, b); SubBlock rsbV = rmb.getSubBlock(SubBlock.PLANE.V, 0, b); SubBlock lsbV = lmb.getSubBlock(SubBlock.PLANE.V, 1, b); for (int a = 0; a < 4; a++) { Segment seg = getSegH(rsbU, lsbU, a); MBfilter(hev_threshold, interior_limit, mbedge_limit, seg); setSegH(rsbU, lsbU, seg, a); seg = getSegH(rsbV, lsbV, a); MBfilter(hev_threshold, interior_limit, mbedge_limit, seg); setSegH(rsbV, lsbV, seg, a); } } } // sb left if (!rmb.isSkip_inner_lf()) { for (int a = 1; a < 2; a++) { for (int b = 0; b < 2; b++) { SubBlock lsbU = rmb.getSubBlock(SubBlock.PLANE.U, a - 1, b); SubBlock rsbU = rmb.getSubBlock(SubBlock.PLANE.U, a, b); SubBlock lsbV = rmb.getSubBlock(SubBlock.PLANE.V, a - 1, b); SubBlock rsbV = rmb.getSubBlock(SubBlock.PLANE.V, a, b); for (int c = 0; c < 4; c++) { Segment seg = getSegH(rsbU, lsbU, c); subblock_filter(hev_threshold, interior_limit, sub_bedge_limit, seg); setSegH(rsbU, lsbU, seg, c); seg = getSegH(rsbV, lsbV, c); subblock_filter(hev_threshold, interior_limit, sub_bedge_limit, seg); setSegH(rsbV, lsbV, seg, c); } } } } // top if (y > 0) { MacroBlock tmb = frame.getMacroBlock(x, y - 1); for (int b = 0; b < 2; b++) { SubBlock tsbU = tmb.getSubBlock(SubBlock.PLANE.U, b, 1); SubBlock bsbU = bmb.getSubBlock(SubBlock.PLANE.U, b, 0); SubBlock tsbV = tmb.getSubBlock(SubBlock.PLANE.V, b, 1); SubBlock bsbV = bmb.getSubBlock(SubBlock.PLANE.V, b, 0); for (int a = 0; a < 4; a++) { // System.out.println("l"); Segment seg = getSegV(bsbU, tsbU, a); MBfilter(hev_threshold, interior_limit, mbedge_limit, seg); setSegV(bsbU, tsbU, seg, a); seg = getSegV(bsbV, tsbV, a); MBfilter(hev_threshold, interior_limit, mbedge_limit, seg); setSegV(bsbV, tsbV, seg, a); } } } // sb top if (!rmb.isSkip_inner_lf()) { for (int a = 1; a < 2; a++) { for (int b = 0; b < 2; b++) { SubBlock tsbU = bmb.getSubBlock(SubBlock.PLANE.U, b, a - 1); SubBlock bsbU = bmb.getSubBlock(SubBlock.PLANE.U, b, a); SubBlock tsbV = bmb.getSubBlock(SubBlock.PLANE.V, b, a - 1); SubBlock bsbV = bmb.getSubBlock(SubBlock.PLANE.V, b, a); for (int c = 0; c < 4; c++) { Segment seg = getSegV(bsbU, tsbU, c); subblock_filter(hev_threshold, interior_limit, sub_bedge_limit, seg); setSegV(bsbU, tsbU, seg, c); seg = getSegV(bsbV, tsbV, c); subblock_filter(hev_threshold, interior_limit, sub_bedge_limit, seg); setSegV(bsbV, tsbV, seg, c); } } } } } } } } public static void loopFilterY(VP8Frame frame) { for (int y = 0; y < frame.getMacroBlockRows(); y++) { frame.fireLFProgressUpdate(50 + (100.0f * ((float) (y + 1) / (float) (frame .getMacroBlockRows()))) / 2); for (int x = 0; x < frame.getMacroBlockCols(); x++) { MacroBlock rmb = frame.getMacroBlock(x, y); MacroBlock bmb = frame.getMacroBlock(x, y); int sharpnessLevel = frame.getSharpnessLevel(); int loop_filter_level = rmb.getFilterLevel(); if(loop_filter_level!=0) { int interior_limit = rmb.getFilterLevel(); if (sharpnessLevel > 0) { interior_limit >>= sharpnessLevel > 4 ? 2 : 1; if (interior_limit > 9 - sharpnessLevel) interior_limit = 9 - sharpnessLevel; } if (interior_limit == 0) interior_limit = 1; int hev_threshold = 0; if (frame.getFrameType() == 0) /* current frame is a key frame */ { if (loop_filter_level >= 40) hev_threshold = 2; else if (loop_filter_level >= 15) hev_threshold = 1; } else /* current frame is an interframe */ { if (loop_filter_level >= 40) hev_threshold = 3; else if (loop_filter_level >= 20) hev_threshold = 2; else if (loop_filter_level >= 15) hev_threshold = 1; } /* Luma and Chroma use the same inter-macroblock edge limit */ int mbedge_limit = ((loop_filter_level + 2) * 2) + interior_limit; /* Luma and Chroma use the same inter-subblock edge limit */ int sub_bedge_limit = (loop_filter_level * 2) + interior_limit; // left if (x > 0) { MacroBlock lmb = frame.getMacroBlock(x - 1, y); for (int b = 0; b < 4; b++) { SubBlock rsb = rmb.getSubBlock(SubBlock.PLANE.Y1, 0, b); SubBlock lsb = lmb.getSubBlock(SubBlock.PLANE.Y1, 3, b); for (int a = 0; a < 4; a++) { Segment seg = getSegH(rsb, lsb, a); MBfilter(hev_threshold, interior_limit, mbedge_limit, seg); setSegH(rsb, lsb, seg, a); } } } // sb left if (!rmb.isSkip_inner_lf()) { for (int a = 1; a < 4; a++) { for (int b = 0; b < 4; b++) { SubBlock lsb = rmb.getSubBlock(SubBlock.PLANE.Y1, a - 1, b); SubBlock rsb = rmb.getSubBlock(SubBlock.PLANE.Y1, a, b); for (int c = 0; c < 4; c++) { // System.out.println("sbleft a:"+a+" b:"+b+" c:"+c); Segment seg = getSegH(rsb, lsb, c); subblock_filter(hev_threshold, interior_limit, sub_bedge_limit, seg); setSegH(rsb, lsb, seg, c); } } } } // top if (y > 0) { MacroBlock tmb = frame.getMacroBlock(x, y - 1); for (int b = 0; b < 4; b++) { SubBlock tsb = tmb.getSubBlock(SubBlock.PLANE.Y1, b, 3); SubBlock bsb = bmb.getSubBlock(SubBlock.PLANE.Y1, b, 0); for (int a = 0; a < 4; a++) { Segment seg = getSegV(bsb, tsb, a); MBfilter(hev_threshold, interior_limit, mbedge_limit, seg); setSegV(bsb, tsb, seg, a); } } } // sb top if (!rmb.isSkip_inner_lf()) { for (int a = 1; a < 4; a++) { for (int b = 0; b < 4; b++) { SubBlock tsb = bmb.getSubBlock(SubBlock.PLANE.Y1, b, a - 1); SubBlock bsb = bmb.getSubBlock(SubBlock.PLANE.Y1, b, a); for (int c = 0; c < 4; c++) { Segment seg = getSegV(bsb, tsb, c); subblock_filter(hev_threshold, interior_limit, sub_bedge_limit, seg); setSegV(bsb, tsb, seg, c); } } } } } } } } static void MBfilter(int hev_threshold, /* detect high edge variance */ int interior_limit, /* possibly disable filter */ int edge_limit, Segment seg) { int p3 = u2s(seg.P3), p2 = u2s(seg.P2), p1 = u2s(seg.P1), p0 = u2s(seg.P0); int q0 = u2s(seg.Q0), q1 = u2s(seg.Q1), q2 = u2s(seg.Q2), q3 = u2s(seg.Q3); if (filter_yes(interior_limit, edge_limit, q3, q2, q1, q0, p0, p1, p2, p3)) { if (!hev(hev_threshold, p1, p0, q0, q1)) { // Same as the initial calculation in "common_adjust", // w is something like twice the edge difference int w = c(c(p1 - q1) + 3 * (q0 - p0)); // 9/64 is approximately 9/63 = 1/7 and 1<<7 = 128 = 2*64. // So this a, used to adjust the pixels adjacent to the edge, // is something like 3/7 the edge difference. int a = (27 * w + 63) >> 7; seg.Q0 = s2u(q0 - a); seg.P0 = s2u(p0 + a); // Next two are adjusted by 2/7 the edge difference a = (18 * w + 63) >> 7; // System.out.println("a: "+a); seg.Q1 = s2u(q1 - a); seg.P1 = s2u(p1 + a); // Last two are adjusted by 1/7 the edge difference a = (9 * w + 63) >> 7; seg.Q2 = s2u(q2 - a); seg.P2 = s2u(p2 + a); } else // if hev, do simple filter common_adjust(true, seg); // using outer taps } } /* Clamp, then convert signed number back to pixel value. */ private static int s2u(int v) { return (int) (c(v) + 128); } private static void setSegH(SubBlock rsb, SubBlock lsb, Segment seg, int a) { int[][] rdest = rsb.getDest(); int[][] ldest = lsb.getDest(); ldest[3][a] = seg.P0; ldest[2][a] = seg.P1; ldest[1][a] = seg.P2; ldest[0][a] = seg.P3; rdest[0][a] = seg.Q0; rdest[1][a] = seg.Q1; rdest[2][a] = seg.Q2; rdest[3][a] = seg.Q3; } private static void setSegV(SubBlock bsb, SubBlock tsb, Segment seg, int a) { int[][] bdest = bsb.getDest(); int[][] tdest = tsb.getDest(); tdest[a][3] = seg.P0; tdest[a][2] = seg.P1; tdest[a][1] = seg.P2; tdest[a][0] = seg.P3; bdest[a][0] = seg.Q0; bdest[a][1] = seg.Q1; bdest[a][2] = seg.Q2; bdest[a][3] = seg.Q3; } private static void simple_segment(int edge_limit, /* * do nothing if edge * difference exceeds * limit */ Segment seg) { if ((abs(seg.P0 - seg.Q0) * 2 + abs(seg.P1 - seg.Q1) / 2) <= edge_limit) { common_adjust(true, seg); /* use outer taps */ } else { } } public static void subblock_filter(int hev_threshold, /* * detect high edge * variance */ int interior_limit, /* possibly disable filter */ int edge_limit, Segment seg) { int p3 = u2s(seg.P3), p2 = u2s(seg.P2), p1 = u2s(seg.P1), p0 = u2s(seg.P0); int q0 = u2s(seg.Q0), q1 = u2s(seg.Q1), q2 = u2s(seg.Q2), q3 = u2s(seg.Q3); if (filter_yes(interior_limit, edge_limit, q3, q2, q1, q0, p0, p1, p2, p3)) { boolean hv = hev(hev_threshold, p1, p0, q0, q1); int a = (common_adjust(hv, seg) + 1) >> 1; if (!hv) { seg.Q1 = s2u(q1 - a); seg.P1 = s2u(p1 + a); } } else { } } /* Convert pixel value (0 <= v <= 255) to an 8-bit signed number. */ private static int u2s(int v) { return (int) (v - 128); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/MacroBlock.java000066400000000000000000000445011312650303100252320ustar00rootroot00000000000000/* This file is part of javavp8decoder. javavp8decoder is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. javavp8decoder 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 javavp8decoder. If not, see . */ package net.sourceforge.plantuml.webp; import java.io.IOException; public class MacroBlock { private int filterLevel; private boolean keepDebugInfo = false; private int segmentId; private int skipCoeff; private boolean skipInnerLoopFilter; SubBlock[][] uSubBlocks; private int uVFilterLevel; private int uvMode; SubBlock[][] vSubBlocks; private int x, y; SubBlock y2SubBlock; private int yMode; SubBlock[][] ySubBlocks; MacroBlock(int x, int y, boolean keepDebugInfo) { this.x = x - 1; this.y = y - 1; this.keepDebugInfo = keepDebugInfo; ySubBlocks = new SubBlock[4][4]; uSubBlocks = new SubBlock[2][2]; vSubBlocks = new SubBlock[2][2]; SubBlock above = null; SubBlock left = null; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { left = null; above = null; if (j > 0) left = ySubBlocks[j - 1][i]; if (i > 0) above = ySubBlocks[j][i - 1]; ySubBlocks[j][i] = new SubBlock(this, above, left, SubBlock.PLANE.Y1); } } for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { left = null; above = null; if (j > 0) left = uSubBlocks[j - 1][i]; if (i > 0) above = uSubBlocks[j][i - 1]; uSubBlocks[j][i] = new SubBlock(this, above, left, SubBlock.PLANE.U); } } for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { left = null; above = null; if (j > 0) left = vSubBlocks[j - 1][i]; if (i > 0) above = vSubBlocks[j][i - 1]; vSubBlocks[j][i] = new SubBlock(this, above, left, SubBlock.PLANE.V); } } y2SubBlock = new SubBlock(this, null, null, SubBlock.PLANE.Y2); } public void decodeMacroBlock(VP8Frame frame) throws IOException { MacroBlock mb = this; if (mb.getSkipCoeff() > 0) { if (mb.getYMode() != Globals.B_PRED) mb.skipInnerLoopFilter = true; } else if (mb.getYMode() != Globals.B_PRED) { decodeMacroBlockTokens(frame, true); } else { decodeMacroBlockTokens(frame, false); } } private void decodeMacroBlockTokens(VP8Frame frame, boolean withY2) throws IOException { skipInnerLoopFilter = false; if (withY2) { skipInnerLoopFilter = skipInnerLoopFilter | decodePlaneTokens(frame, 1, SubBlock.PLANE.Y2, false); } skipInnerLoopFilter = skipInnerLoopFilter | decodePlaneTokens(frame, 4, SubBlock.PLANE.Y1, withY2); skipInnerLoopFilter = skipInnerLoopFilter | decodePlaneTokens(frame, 2, SubBlock.PLANE.U, false); skipInnerLoopFilter = skipInnerLoopFilter | decodePlaneTokens(frame, 2, SubBlock.PLANE.V, false); skipInnerLoopFilter = !skipInnerLoopFilter; } private boolean decodePlaneTokens(VP8Frame frame, int dimentions, SubBlock.PLANE plane, boolean withY2) throws IOException { MacroBlock mb = this; boolean r = false; for (int y = 0; y < dimentions; y++) { for (int x = 0; x < dimentions; x++) { int L = 0; int A = 0; int lc = 0; SubBlock sb = mb.getSubBlock(plane, x, y); SubBlock left = frame.getLeftSubBlock(sb, plane); SubBlock above = frame.getAboveSubBlock(sb, plane); if (left.hasNoZeroToken()) { L = 1; } lc += L; if (above.hasNoZeroToken()) { A = 1; } lc += A; sb.decodeSubBlock(frame.getTokenBoolDecoder(), frame.getCoefProbs(), lc, SubBlock.planeToType(plane, withY2), withY2); r = r | sb.hasNoZeroToken(); } } return r; } public void dequantMacroBlock(VP8Frame frame) { MacroBlock mb = this; if (mb.getYMode() != Globals.B_PRED) { SubBlock sb = mb.getY2SubBlock(); int acQValue = frame.getSegmentQuants().getSegQuants()[this.getSegmentId()] .getY2ac_delta_q(); int dcQValue = frame.getSegmentQuants().getSegQuants()[this.getSegmentId()].getY2dc(); int input[] = new int[16]; input[0] = sb.getTokens()[0] * dcQValue; for (int x = 1; x < 16; x++) input[x] = sb.getTokens()[x] * acQValue; sb.setDiff(IDCT.iwalsh4x4(input)); for (int j = 0; j < 4; j++) { for (int i = 0; i < 4; i++) { SubBlock ysb = mb.getYSubBlock(i, j); ysb.dequantSubBlock(frame, sb.getDiff()[i][j]); } } mb.predictY(frame); mb.predictUV(frame); for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { SubBlock uvsb = mb.getUSubBlock(j, i); uvsb.dequantSubBlock(frame, null); uvsb = mb.getVSubBlock(i, j); uvsb.dequantSubBlock(frame, null); } } mb.recon_mb(); } else { for (int j = 0; j < 4; j++) { for (int i = 0; i < 4; i++) { SubBlock sb = mb.getYSubBlock(i, j); sb.dequantSubBlock(frame, null); sb.predict(frame); sb.reconstruct(); } } mb.predictUV(frame); for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { SubBlock sb = mb.getUSubBlock(j, i); sb.dequantSubBlock(frame, null); sb.reconstruct(); } } for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { SubBlock sb = mb.getVSubBlock(j, i); sb.dequantSubBlock(frame, null); sb.reconstruct(); } } } } public void drawDebug() { for (int j = 0; j < 4; j++) for (int i = 0; i < 4; i++) { SubBlock sb = ySubBlocks[i][0]; sb.drawDebugH(); sb = ySubBlocks[0][j]; sb.drawDebugV(); } } public SubBlock getBottomSubBlock(int x, SubBlock.PLANE plane) { if (plane == SubBlock.PLANE.Y1) { return ySubBlocks[x][3]; } else if (plane == SubBlock.PLANE.U) { return uSubBlocks[x][1]; } else if (plane == SubBlock.PLANE.V) { return vSubBlocks[x][1]; } else if (plane == SubBlock.PLANE.Y2) { return y2SubBlock; } return null; } public String getDebugString() { String r = new String(); r = r + " YMode: " + Globals.getModeAsString(yMode); r = r + "\n UVMode: " + Globals.getModeAsString(uvMode); r = r + "\n SegmentID: " + segmentId; r = r + "\n Filter Level: " + filterLevel; r = r + "\n UV Filter Level: " + uVFilterLevel; r = r + "\n Skip Coeff: " + skipCoeff; return r; } public int getFilterLevel() { return this.filterLevel; } public SubBlock getLeftSubBlock(int y, SubBlock.PLANE plane) { if (plane == SubBlock.PLANE.Y1) { return ySubBlocks[0][y]; } else if (plane == SubBlock.PLANE.V) { return vSubBlocks[0][y]; } if (plane == SubBlock.PLANE.Y2) { return y2SubBlock; } else if (plane == SubBlock.PLANE.U) { return uSubBlocks[0][y]; } return null; } public SubBlock getRightSubBlock(int y, SubBlock.PLANE plane) { if (plane == SubBlock.PLANE.Y1) { return ySubBlocks[3][y]; } else if (plane == SubBlock.PLANE.U) { return uSubBlocks[1][y]; } else if (plane == SubBlock.PLANE.V) { return vSubBlocks[1][y]; } else if (plane == SubBlock.PLANE.Y2) { return y2SubBlock; } return null; } public int getSkipCoeff() { return skipCoeff; } public SubBlock getSubBlock(SubBlock.PLANE plane, int i, int j) { switch (plane) { case Y1: return getYSubBlock(i, j); case U: return getUSubBlock(i, j); case V: return getVSubBlock(i, j); case Y2: return getY2SubBlock(); } return null; } public int getSubblockX(SubBlock sb) { if (sb.getPlane() == SubBlock.PLANE.Y1) { for (int y = 0; y < 4; y++) for (int x = 0; x < 4; x++) if (ySubBlocks[x][y] == sb) return x; } else if (sb.getPlane() == SubBlock.PLANE.U) { for (int y = 0; y < 2; y++) for (int x = 0; x < 2; x++) if (uSubBlocks[x][y] == sb) return x; } else if (sb.getPlane() == SubBlock.PLANE.V) { for (int y = 0; y < 2; y++) for (int x = 0; x < 2; x++) if (vSubBlocks[x][y] == sb) return x; } else if (sb.getPlane() == SubBlock.PLANE.Y2) { return 0; } return -100; } public int getSubblockY(SubBlock sb) { if (sb.getPlane() == SubBlock.PLANE.Y1) { for (int y = 0; y < 4; y++) for (int x = 0; x < 4; x++) if (ySubBlocks[x][y] == sb) return y; } else if (sb.getPlane() == SubBlock.PLANE.U) { for (int y = 0; y < 2; y++) for (int x = 0; x < 2; x++) if (uSubBlocks[x][y] == sb) return y; } else if (sb.getPlane() == SubBlock.PLANE.V) { for (int y = 0; y < 2; y++) for (int x = 0; x < 2; x++) if (vSubBlocks[x][y] == sb) return y; } else if (sb.getPlane() == SubBlock.PLANE.Y2) { return 0; } return -100; } public SubBlock getUSubBlock(int i, int j) { return uSubBlocks[i][j]; } public int getUVFilterLevel() { return this.uVFilterLevel; } public int getUvMode() { return uvMode; } public SubBlock getVSubBlock(int i, int j) { return vSubBlocks[i][j]; } public int getX() { return x; } public int getY() { return y; } public SubBlock getY2SubBlock() { return y2SubBlock; } public int getYMode() { return yMode; } public SubBlock getYSubBlock(int i, int j) { return ySubBlocks[i][j]; } public boolean isKeepDebugInfo() { return keepDebugInfo; } public boolean isSkip_inner_lf() { return skipInnerLoopFilter; } public void predictUV(VP8Frame frame) { MacroBlock aboveMb = frame.getMacroBlock(x, y - 1); MacroBlock leftMb = frame.getMacroBlock(x - 1, y); switch (this.uvMode) { case Globals.DC_PRED: // System.out.println("UV DC_PRED"); boolean up_available = false; boolean left_available = false; int Uaverage = 0; int Vaverage = 0; int expected_udc = 0; int expected_vdc = 0; if (x > 0) left_available = true; if (y > 0) up_available = true; if (up_available || left_available) { if (up_available) { for (int j = 0; j < 2; j++) { SubBlock usb = aboveMb.getUSubBlock(j, 1); SubBlock vsb = aboveMb.getVSubBlock(j, 1); for (int i = 0; i < 4; i++) { Uaverage += usb.getDest()[i][3]; Vaverage += vsb.getDest()[i][3]; } } } if (left_available) { for (int j = 0; j < 2; j++) { SubBlock usb = leftMb.getUSubBlock(1, j); SubBlock vsb = leftMb.getVSubBlock(1, j); for (int i = 0; i < 4; i++) { Uaverage += usb.getDest()[3][i]; Vaverage += vsb.getDest()[3][i]; } } } int shift = 2; if (up_available) shift++; if (left_available) shift++; expected_udc = (Uaverage + (1 << (shift - 1))) >> shift; expected_vdc = (Vaverage + (1 << (shift - 1))) >> shift; } else { expected_udc = 128; expected_vdc = 128; } int ufill[][] = new int[4][4]; for (int y = 0; y < 4; y++) for (int x = 0; x < 4; x++) ufill[x][y] = expected_udc; int vfill[][] = new int[4][4]; for (int y = 0; y < 4; y++) for (int x = 0; x < 4; x++) vfill[x][y] = expected_vdc; for (int y = 0; y < 2; y++) for (int x = 0; x < 2; x++) { SubBlock usb = uSubBlocks[x][y]; SubBlock vsb = vSubBlocks[x][y]; usb.setPredict(ufill); vsb.setPredict(vfill); } break; case Globals.V_PRED: // System.out.println("UV V_PRED"); SubBlock[] aboveUSb = new SubBlock[2]; SubBlock[] aboveVSb = new SubBlock[2]; for (int x = 0; x < 2; x++) { aboveUSb[x] = aboveMb.getUSubBlock(x, 1); aboveVSb[x] = aboveMb.getVSubBlock(x, 1); } for (int y = 0; y < 2; y++) for (int x = 0; x < 2; x++) { SubBlock usb = uSubBlocks[y][x]; SubBlock vsb = vSubBlocks[y][x]; int ublock[][] = new int[4][4]; int vblock[][] = new int[4][4]; for (int j = 0; j < 4; j++) for (int i = 0; i < 4; i++) { ublock[j][i] = aboveUSb[y] .getMacroBlockPredict(Globals.V_PRED)[j][3]; vblock[j][i] = aboveVSb[y] .getMacroBlockPredict(Globals.V_PRED)[j][3]; } usb.setPredict(ublock); vsb.setPredict(vblock); } break; case Globals.H_PRED: // System.out.println("UV H_PRED"); SubBlock[] leftUSb = new SubBlock[2]; SubBlock[] leftVSb = new SubBlock[2]; for (int x = 0; x < 2; x++) { leftUSb[x] = leftMb.getUSubBlock(1, x); leftVSb[x] = leftMb.getVSubBlock(1, x); } for (int y = 0; y < 2; y++) for (int x = 0; x < 2; x++) { SubBlock usb = uSubBlocks[x][y]; SubBlock vsb = vSubBlocks[x][y]; int ublock[][] = new int[4][4]; int vblock[][] = new int[4][4]; for (int j = 0; j < 4; j++) for (int i = 0; i < 4; i++) { ublock[i][j] = leftUSb[y] .getMacroBlockPredict(Globals.H_PRED)[3][j]; vblock[i][j] = leftVSb[y] .getMacroBlockPredict(Globals.H_PRED)[3][j]; } usb.setPredict(ublock); vsb.setPredict(vblock); } break; case Globals.TM_PRED: // TODO: // System.out.println("UV TM_PRED MB"); MacroBlock ALMb = frame.getMacroBlock(x - 1, y - 1); SubBlock ALUSb = ALMb.getUSubBlock(1, 1); int alu = ALUSb.getDest()[3][3]; SubBlock ALVSb = ALMb.getVSubBlock(1, 1); int alv = ALVSb.getDest()[3][3]; aboveUSb = new SubBlock[2]; leftUSb = new SubBlock[2]; aboveVSb = new SubBlock[2]; leftVSb = new SubBlock[2]; for (int x = 0; x < 2; x++) { aboveUSb[x] = aboveMb.getUSubBlock(x, 1); leftUSb[x] = leftMb.getUSubBlock(1, x); aboveVSb[x] = aboveMb.getVSubBlock(x, 1); leftVSb[x] = leftMb.getVSubBlock(1, x); } for (int b = 0; b < 2; b++) { for (int a = 0; a < 4; a++) { for (int d = 0; d < 2; d++) { for (int c = 0; c < 4; c++) { int upred = leftUSb[b].getDest()[3][a] + aboveUSb[d].getDest()[c][3] - alu; upred = Globals.clamp(upred, 255); uSubBlocks[d][b].setPixel(c, a, upred); int vpred = leftVSb[b].getDest()[3][a] + aboveVSb[d].getDest()[c][3] - alv; vpred = Globals.clamp(vpred, 255); vSubBlocks[d][b].setPixel(c, a, vpred); } } } } break; default: System.out.println("TODO predict_mb_uv: " + this.yMode); System.exit(0); } } public void predictY(VP8Frame frame) { MacroBlock aboveMb = frame.getMacroBlock(x, y - 1); MacroBlock leftMb = frame.getMacroBlock(x - 1, y); switch (this.yMode) { case Globals.DC_PRED: // System.out.println("DC_PRED"); boolean up_available = false; boolean left_available = false; int average = 0; int expected_dc = 0; if (x > 0) left_available = true; if (y > 0) up_available = true; if (up_available || left_available) { if (up_available) { for (int j = 0; j < 4; j++) { SubBlock sb = aboveMb.getYSubBlock(j, 3); for (int i = 0; i < 4; i++) { average += sb.getDest()[i][3]; } } } if (left_available) { for (int j = 0; j < 4; j++) { SubBlock sb = leftMb.getYSubBlock(3, j); for (int i = 0; i < 4; i++) { average += sb.getDest()[3][i]; } } } int shift = 3; if (up_available) shift++; if (left_available) shift++; expected_dc = (average + (1 << (shift - 1))) >> shift; } else { expected_dc = 128; } int fill[][] = new int[4][4]; for (int y = 0; y < 4; y++) for (int x = 0; x < 4; x++) fill[x][y] = expected_dc; for (int y = 0; y < 4; y++) for (int x = 0; x < 4; x++) { SubBlock sb = ySubBlocks[x][y]; sb.setPredict(fill); } break; case Globals.V_PRED: // System.out.println("V_PRED"); SubBlock[] aboveYSb = new SubBlock[4]; for (int x = 0; x < 4; x++) aboveYSb[x] = aboveMb.getYSubBlock(x, 3); for (int y = 0; y < 4; y++) { for (int x = 0; x < 4; x++) { SubBlock sb = ySubBlocks[x][y]; int block[][] = new int[4][4]; for (int j = 0; j < 4; j++) for (int i = 0; i < 4; i++) { block[i][j] = aboveYSb[x].getPredict( Globals.B_VE_PRED, false)[i][3]; } sb.setPredict(block); } } break; case Globals.H_PRED: // System.out.println("H_PRED"); SubBlock[] leftYSb = new SubBlock[4]; for (int x = 0; x < 4; x++) leftYSb[x] = leftMb.getYSubBlock(3, x); for (int y = 0; y < 4; y++) for (int x = 0; x < 4; x++) { SubBlock sb = ySubBlocks[x][y]; int block[][] = new int[4][4]; for (int j = 0; j < 4; j++) for (int i = 0; i < 4; i++) { block[i][j] = leftYSb[y].getPredict( Globals.B_DC_PRED, true)[3][j]; } sb.setPredict(block); } SubBlock[] leftUSb = new SubBlock[2]; for (int x = 0; x < 2; x++) leftUSb[x] = leftMb.getYSubBlock(1, x); break; case Globals.TM_PRED: // System.out.println("TM_PRED MB"); MacroBlock ALMb = frame.getMacroBlock(x - 1, y - 1); SubBlock ALSb = ALMb.getYSubBlock(3, 3); int al = ALSb.getDest()[3][3]; aboveYSb = new SubBlock[4]; leftYSb = new SubBlock[4]; for (int x = 0; x < 4; x++) aboveYSb[x] = aboveMb.getYSubBlock(x, 3); for (int x = 0; x < 4; x++) leftYSb[x] = leftMb.getYSubBlock(3, x); fill = new int[4][4]; for (int b = 0; b < 4; b++) { for (int a = 0; a < 4; a++) { for (int d = 0; d < 4; d++) { for (int c = 0; c < 4; c++) { int pred = leftYSb[b].getDest()[3][a] + aboveYSb[d].getDest()[c][3] - al; ySubBlocks[d][b].setPixel(c, a, Globals.clamp(pred, 255)); } } } } break; default: System.out.println("TODO predict_mb_y: " + this.yMode); System.exit(0); } } public void recon_mb() { for (int j = 0; j < 4; j++) for (int i = 0; i < 4; i++) { SubBlock sb = ySubBlocks[i][j]; sb.reconstruct(); } for (int j = 0; j < 2; j++) for (int i = 0; i < 2; i++) { SubBlock sb = uSubBlocks[i][j]; sb.reconstruct(); } for (int j = 0; j < 2; j++) for (int i = 0; i < 2; i++) { SubBlock sb = vSubBlocks[i][j]; sb.reconstruct(); } } public void setFilterLevel(int value) { this.filterLevel = value; } public void setSegmentId(int value) { this.segmentId = value; } public void setSkipCoeff(int mbSkipCoeff) { skipCoeff = mbSkipCoeff; } public void setUVFilterLevel(int value) { this.uVFilterLevel = value; } public void setUvMode(int mode) { this.uvMode = mode; } public void setYMode(int yMode) { this.yMode = yMode; } public String toString() { return "x: " + x + "y: " + y; } public int getSegmentId() { return segmentId; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/Portrait.java000066400000000000000000000044311312650303100250200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.webp; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import javax.imageio.ImageIO; import javax.imageio.stream.ImageInputStream; public class Portrait { private final String name; private final int age; private final String quote; private final byte webp[]; public Portrait(String name, int age, String quote, byte webp[]) throws IOException { this.name = name; this.quote = quote; this.age = age; this.webp = webp; } public BufferedImage getBufferedImage() { try { final InputStream is = new ByteArrayInputStream(webp); final ImageInputStream iis = ImageIO.createImageInputStream(is); final VP8Decoder vp8Decoder = new VP8Decoder(); vp8Decoder.decodeFrame(iis, false); iis.close(); return vp8Decoder.getFrame().getBufferedImage(); } catch (IOException e) { return null; } } public String getName() { return name; } public int getAge() { return age; } public String getQuote() { return quote; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/Portraits.java000066400000000000000000000102741312650303100252050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.webp; import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream; import java.text.Normalizer; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Locale; import java.util.concurrent.atomic.AtomicInteger; import java.util.regex.Pattern; import net.sourceforge.plantuml.version.PSystemVersion; public class Portraits { private final static List all = new ArrayList(); private final static AtomicInteger current = new AtomicInteger(); private static InputStream getInputStream() { return PSystemVersion.class.getResourceAsStream("out.png"); } static { final InputStream is = getInputStream(); if (is != null) { try { read(is); } catch (IOException e) { e.printStackTrace(); } finally { try { is.close(); } catch (IOException e) { e.printStackTrace(); } } } } private static void read(InputStream is) throws IOException { final DataInputStream dis = new DataInputStream(is); final int nb = dis.readShort(); final List names = new ArrayList(); final List ages = new ArrayList(); final List quotes = new ArrayList(); for (int i = 0; i < nb; i++) { names.add(dis.readUTF()); ages.add((int) dis.readByte()); quotes.add(dis.readUTF()); } for (int i = 0; i < nb; i++) { final int len = dis.readShort(); final byte data[] = new byte[len]; dis.readFully(data); all.add(new Portrait(names.get(i), ages.get(i), quotes.get(i), data)); } Collections.shuffle(all); } public static Portrait getOne() { if (all.size() == 0) { return null; } final int nb = current.get() % all.size(); return all.get(nb); } public static void nextOne() { current.getAndIncrement(); } public static Portrait getOne(String line) { Portrait candidat = null; for (Portrait p : all) { final int dist = similar(p.getName(), line); if (dist <= 3) { if (candidat != null && dist < similar(candidat.getName(), line)) { continue; } candidat = p; } } return candidat; } public static int similar(String s1, String s2) { final int[] tab1 = countLetter(s1); final int[] tab2 = countLetter(s2); int result = 0; for (int i = 0; i < tab1.length; i++) { result += Math.abs(tab1[i] - tab2[i]); } return result; } private static String noAccent(String str) { final String nfdNormalizedString = Normalizer.normalize(str, Normalizer.Form.NFD); final Pattern pattern = Pattern.compile("\\p{InCombiningDiacriticalMarks}+"); return pattern.matcher(nfdNormalizedString).replaceAll(""); } private static int[] countLetter(String s) { s = noAccent(s).toLowerCase(Locale.US); final int[] result = new int[26]; for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); if (c >= 'a' && c <= 'z') { result[c - 'a']++; } } return result; } static final List getAll() { return all; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/Segment.java000066400000000000000000000020551312650303100246160ustar00rootroot00000000000000/* This file is part of javavp8decoder. javavp8decoder is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. javavp8decoder 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 javavp8decoder. If not, see . */ package net.sourceforge.plantuml.webp; public class Segment { int P0, P1, P2, P3; int Q0, Q1, Q2, Q3; public String toString() { return "" + Globals.toHex(P3) + " " + Globals.toHex(P2) + " " + Globals.toHex(P1) + " " + Globals.toHex(P0) + " " + Globals.toHex(Q0) + " " + Globals.toHex(Q1) + " " + Globals.toHex(Q2) + " " + Globals.toHex(Q3); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/SegmentQuant.java000066400000000000000000000044311312650303100256270ustar00rootroot00000000000000/* This file is part of javavp8decoder. javavp8decoder is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. javavp8decoder 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 javavp8decoder. If not, see . */ package net.sourceforge.plantuml.webp; public class SegmentQuant { private int filterStrength; private int Qindex; private int uvac; private int uvdc; private int y1ac; private int y1dc; private int y2ac; private int y2dc; private int clip(int val, int max) { int r = val; if (val > max) r = max; if (r < 0) r = 0; return r; } public int getQindex() { return Qindex; } public int getUvac_delta_q() { return uvac; } public int getUvdc_delta_q() { return uvdc; } public int getY1ac() { return y1ac; } public int getY1dc() { return y1dc; } public int getY2ac_delta_q() { return y2ac; } public int getY2dc() { return y2dc; } public void setFilterStrength(int value) { this.filterStrength = value; } public void setQindex(int qindex) { Qindex = qindex; } public void setUvac_delta_q(int uvac_delta_q) { this.uvac = Globals.vp8AcQLookup[clip(Qindex + uvac_delta_q, 127)]; } public void setUvdc_delta_q(int uvdc_delta_q) { this.uvdc = Globals.vp8DcQLookup[clip(Qindex + uvdc_delta_q, 127)]; } public void setY1ac() { this.y1ac = Globals.vp8AcQLookup[clip(Qindex, 127)]; } public void setY1dc(int y1dc) { this.y1dc = Globals.vp8DcQLookup[clip(Qindex + y1dc, 127)]; this.setY1ac(); } public void setY2ac_delta_q(int y2ac_delta_q) { this.y2ac = Globals.vp8AcQLookup[clip(Qindex + y2ac_delta_q, 127)] * 155 / 100; if (this.y2ac < 8) this.y2ac = 8; } public void setY2dc(int y2dc_delta_q) { this.y2dc = Globals.vp8DcQLookup[clip(Qindex + y2dc_delta_q, 127)] * 2; } public int getFilterStrength() { return filterStrength; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/SegmentQuants.java000066400000000000000000000050321312650303100260100ustar00rootroot00000000000000/* This file is part of javavp8decoder. javavp8decoder is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. javavp8decoder 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 javavp8decoder. If not, see . */ package net.sourceforge.plantuml.webp; import java.io.IOException; public class SegmentQuants { private static DeltaQ get_delta_q(BoolDecoder bc, int prev) throws IOException { DeltaQ ret = new DeltaQ(); ret.v = 0; ret.update = false; if (bc.readBit() > 0) { ret.v = bc.readLiteral(4); if (bc.readBit() > 0) ret.v = -ret.v; } /* Trigger a quantizer update if the delta-q value has changed */ if (ret.v != prev) ret.update = true; return ret; } private int qIndex; private SegmentQuant[] segQuants = new SegmentQuant[Globals.MAX_MB_SEGMENTS]; public SegmentQuants() { for (int x = 0; x < Globals.MAX_MB_SEGMENTS; x++) segQuants[x] = new SegmentQuant(); } public int getqIndex() { return qIndex; } public SegmentQuant[] getSegQuants() { return segQuants; } public void parse(BoolDecoder bc, boolean segmentation_enabled, boolean mb_segement_abs_delta) throws IOException { qIndex = bc.readLiteral(7); boolean q_update = false; DeltaQ v = get_delta_q(bc, 0); int y1dc_delta_q = v.v; q_update = q_update || v.update; v = get_delta_q(bc, 0); int y2dc_delta_q = v.v; q_update = q_update || v.update; v = get_delta_q(bc, 0); int y2ac_delta_q = v.v; q_update = q_update || v.update; v = get_delta_q(bc, 0); int uvdc_delta_q = v.v; q_update = q_update || v.update; v = get_delta_q(bc, 0); int uvac_delta_q = v.v; q_update = q_update || v.update; for (SegmentQuant s : segQuants) { if (!segmentation_enabled) { s.setQindex(qIndex); } else if (!mb_segement_abs_delta) { s.setQindex(s.getQindex() + qIndex); } s.setY1dc(y1dc_delta_q); s.setY2dc(y2dc_delta_q); s.setY2ac_delta_q(y2ac_delta_q); s.setUvdc_delta_q(uvdc_delta_q); s.setUvac_delta_q(uvac_delta_q); } } public void setSegQuants(SegmentQuant[] segQuants) { this.segQuants = segQuants; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/SubBlock.java000066400000000000000000000352771312650303100247340ustar00rootroot00000000000000/* This file is part of javavp8decoder. javavp8decoder is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. javavp8decoder 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 javavp8decoder. If not, see . */ package net.sourceforge.plantuml.webp; import java.io.IOException; public class SubBlock { public static enum PLANE { U, V, Y1, Y2 }; public static final int UV = 2; public static final int Y = 3; public static final int Y_AFTER_Y2 = 0; public static final int Y2 = 1; public static int planeToType(PLANE plane, Boolean withY2) { switch (plane) { case Y2: return 1; case Y1: if (withY2) return 0; else return 3; case U: return 2; case V: return 2; } return -1; } private SubBlock above; private int[][] dest; private int[][] diff; private boolean hasNoZeroToken; private SubBlock left; private MacroBlock macroBlock; private int mode; private PLANE plane; private int predict[][]; private int tokens[]; public SubBlock(MacroBlock macroBlock, SubBlock above, SubBlock left, SubBlock.PLANE plane) { this.macroBlock = macroBlock; this.plane = plane; this.above = above; this.left = left; mode = 0; tokens = new int[16]; for (int z = 0; z < 16; z++) tokens[z] = 0; } private int DCTextra(BoolDecoder bc2, int p[]) throws IOException { int v = 0; int offset = 0; do { v += v + bc2.readBool(p[offset]); offset++; } while (p[offset] > 0); return v; } public void decodeSubBlock(BoolDecoder bc2, int[][][][] coef_probs, int ilc, int type, boolean withY2) throws IOException { SubBlock sb = this; int startAt = 0; if (withY2) startAt = 1; int lc = ilc; int c = 0; int v = 1; boolean skip = false; while (!(v == Globals.dct_eob) && c + startAt < 16) { if (!skip) v = bc2.readTree(Globals.vp8CoefTree, coef_probs[type][Globals.vp8CoefBands[c + startAt]][lc]); else v = bc2.readTreeSkip( Globals.vp8CoefTree, coef_probs[type][Globals.vp8CoefBands[c + startAt]][lc], 1); int dv = decodeToken(bc2, v); lc = 0; skip = false; if (dv == 1 || dv == -1) lc = 1; else if (dv > 1 || dv < -1) lc = 2; else if (dv == Globals.DCT_0) skip = true; int tokens[] = sb.getTokens(); if (v != Globals.dct_eob) tokens[Globals.vp8defaultZigZag1d[c + startAt]] = dv; c++; } hasNoZeroToken = false; for (int x = 0; x < 16; x++) if (tokens[x] != 0) hasNoZeroToken = true; } private int decodeToken(BoolDecoder bc2, int v) throws IOException { int r = v; if (v == Globals.dct_cat1) { r = 5 + DCTextra(bc2, Globals.Pcat1); } if (v == Globals.dct_cat2) { r = 7 + DCTextra(bc2, Globals.Pcat2); } if (v == Globals.dct_cat3) { r = 11 + DCTextra(bc2, Globals.Pcat3); } if (v == Globals.dct_cat4) { r = 19 + DCTextra(bc2, Globals.Pcat4); } if (v == Globals.dct_cat5) { r = 35 + DCTextra(bc2, Globals.Pcat5); } if (v == Globals.dct_cat6) { r = 67 + DCTextra(bc2, Globals.Pcat6); } if (v != Globals.DCT_0 && v != Globals.dct_eob) { if (bc2.readBit() > 0) r = -r; } return r; } public void dequantSubBlock(VP8Frame frame, Integer Dc) { SubBlock sb = this; int[] adjustedValues = new int[16]; for (int i = 0; i < 16; i++) { int QValue; if (plane == PLANE.U || plane == PLANE.V) { QValue = frame.getSegmentQuants().getSegQuants()[this.getMacroBlock().getSegmentId()] .getUvac_delta_q(); if (i == 0) QValue = frame.getSegmentQuants().getSegQuants()[this.getMacroBlock().getSegmentId()] .getUvdc_delta_q(); } else { QValue = frame.getSegmentQuants().getSegQuants()[this.getMacroBlock().getSegmentId()].getY1ac(); if (i == 0) QValue = frame.getSegmentQuants().getSegQuants()[this.getMacroBlock().getSegmentId()] .getY1dc(); } int inputValue = sb.getTokens()[i]; adjustedValues[i] = inputValue * QValue; } if (Dc != null) adjustedValues[0] = Dc; int[][] diff = IDCT.idct4x4llm(adjustedValues); sb.setDiff(diff); } public void drawDebug() { if (dest != null) { dest[0][0] = 128; dest[1][0] = 128; dest[2][0] = 128; dest[3][0] = 128; dest[0][0] = 128; dest[0][1] = 128; dest[0][2] = 128; dest[0][3] = 128; } } public void drawDebugH() { if (dest != null) { dest[0][0] = 0; dest[1][0] = 0; dest[2][0] = 0; dest[3][0] = 0; } } public void drawDebugV() { if (dest != null) { dest[0][0] = 0; dest[0][1] = 0; dest[0][2] = 0; dest[0][3] = 0; } } public SubBlock getAbove() { return above; } public String getDebugString() { String r = new String(); r = r + " " + plane; if (getMacroBlock().getYMode() == Globals.B_PRED && plane == SubBlock.PLANE.Y1) r = r + "\n " + Globals.getSubBlockModeAsString(mode); return r; } public int[][] getDest() { if (dest != null) return dest; else return new int[4][4]; } public int[][] getDiff() { return diff; } public SubBlock getLeft() { return left; } public MacroBlock getMacroBlock() { return macroBlock; } public int[][] getMacroBlockPredict(int intra_mode) { if (dest != null) return dest; else { int rv = 127; if (intra_mode == Globals.H_PRED) rv = 129; int r[][] = new int[4][4]; for (int j = 0; j < 4; j++) for (int i = 0; i < 4; i++) r[i][j] = rv; return r; } } public int getMode() { return mode; } public PLANE getPlane() { return plane; } public int[][] getPredict() { if (predict != null) return predict; return getPredict(Globals.B_DC_PRED, false); } public int[][] getPredict(int intra_bmode, boolean left) { if (dest != null) return dest; if (predict != null) return predict; else { int rv = 127; if ((intra_bmode == Globals.B_TM_PRED || intra_bmode == Globals.B_DC_PRED || intra_bmode == Globals.B_VE_PRED || intra_bmode == Globals.B_HE_PRED || intra_bmode == Globals.B_VR_PRED || intra_bmode == Globals.B_RD_PRED || intra_bmode == Globals.B_HD_PRED) && left) rv = 129; int r[][] = new int[4][4]; for (int j = 0; j < 4; j++) for (int i = 0; i < 4; i++) r[i][j] = rv; return r; } } int[] getTokens() { return tokens; } public boolean hasNoZeroToken() { return hasNoZeroToken; } public boolean isDest() { if (dest == null) return false; return true; } public void predict(VP8Frame frame) { SubBlock sb = this; SubBlock aboveSb = frame.getAboveSubBlock(sb, sb.getPlane()); SubBlock leftSb = frame.getLeftSubBlock(sb, sb.getPlane()); int[] above = new int[4]; int[] left = new int[4]; above[0] = aboveSb.getPredict(sb.getMode(), false)[0][3]; above[1] = aboveSb.getPredict(sb.getMode(), false)[1][3]; above[2] = aboveSb.getPredict(sb.getMode(), false)[2][3]; above[3] = aboveSb.getPredict(sb.getMode(), false)[3][3]; left[0] = leftSb.getPredict(sb.getMode(), true)[3][0]; left[1] = leftSb.getPredict(sb.getMode(), true)[3][1]; left[2] = leftSb.getPredict(sb.getMode(), true)[3][2]; left[3] = leftSb.getPredict(sb.getMode(), true)[3][3]; SubBlock AL = frame.getLeftSubBlock(aboveSb, sb.getPlane()); // for above left if left and above is null use left (129?) else use // above (127?) int al; if (!leftSb.isDest() && !aboveSb.isDest()) { al = AL.getPredict(sb.getMode(), false)[3][3]; } else if (!aboveSb.isDest()) { al = AL.getPredict(sb.getMode(), false)[3][3]; } else al = AL.getPredict(sb.getMode(), true)[3][3]; SubBlock AR = frame.getAboveRightSubBlock(sb, sb.plane); int ar[] = new int[4]; ar[0] = AR.getPredict(sb.getMode(), false)[0][3]; ar[1] = AR.getPredict(sb.getMode(), false)[1][3]; ar[2] = AR.getPredict(sb.getMode(), false)[2][3]; ar[3] = AR.getPredict(sb.getMode(), false)[3][3]; int[][] p = new int[4][4]; int pp[]; switch (sb.getMode()) { case Globals.B_DC_PRED: // System.out.println("B_DC_PRED"); int expected_dc = 0; for (int i = 0; i < 4; i++) { expected_dc += above[i]; expected_dc += left[i]; } expected_dc = (expected_dc + 4) >> 3; for (int y = 0; y < 4; y++) for (int x = 0; x < 4; x++) p[x][y] = expected_dc; break; case Globals.B_TM_PRED: // System.out.println("B_TM_PRED"); // prediction similar to true_motion prediction for (int r = 0; r < 4; r++) { for (int c = 0; c < 4; c++) { int pred = above[c] - al + left[r]; if (pred < 0) pred = 0; if (pred > 255) pred = 255; p[c][r] = pred; } } break; case Globals.B_VE_PRED: // System.out.println("B_VE_PRED"); int ap[] = new int[4]; ap[0] = (al + 2 * above[0] + above[1] + 2) >> 2; ap[1] = (above[0] + 2 * above[1] + above[2] + 2) >> 2; ap[2] = (above[1] + 2 * above[2] + above[3] + 2) >> 2; ap[3] = (above[2] + 2 * above[3] + ar[0] + 2) >> 2; for (int r = 0; r < 4; r++) { for (int c = 0; c < 4; c++) { p[c][r] = ap[c]; } } break; case Globals.B_HE_PRED: // System.out.println("B_HE_PRED"); int lp[] = new int[4]; lp[0] = (al + 2 * left[0] + left[1] + 2) >> 2; lp[1] = (left[0] + 2 * left[1] + left[2] + 2) >> 2; lp[2] = (left[1] + 2 * left[2] + left[3] + 2) >> 2; lp[3] = (left[2] + 2 * left[3] + left[3] + 2) >> 2; for (int r = 0; r < 4; r++) { for (int c = 0; c < 4; c++) { p[c][r] = lp[r]; } } break; case Globals.B_LD_PRED: // System.out.println("B_LD_PRED"); p[0][0] = (above[0] + above[1] * 2 + above[2] + 2) >> 2; p[1][0] = p[0][1] = (above[1] + above[2] * 2 + above[3] + 2) >> 2; p[2][0] = p[1][1] = p[0][2] = (above[2] + above[3] * 2 + ar[0] + 2) >> 2; p[3][0] = p[2][1] = p[1][2] = p[0][3] = (above[3] + ar[0] * 2 + ar[1] + 2) >> 2; p[3][1] = p[2][2] = p[1][3] = (ar[0] + ar[1] * 2 + ar[2] + 2) >> 2; p[3][2] = p[2][3] = (ar[1] + ar[2] * 2 + ar[3] + 2) >> 2; p[3][3] = (ar[2] + ar[3] * 2 + ar[3] + 2) >> 2; break; case Globals.B_RD_PRED: // System.out.println("B_RD_PRED"); pp = new int[9]; pp[0] = left[3]; pp[1] = left[2]; pp[2] = left[1]; pp[3] = left[0]; pp[4] = al; pp[5] = above[0]; pp[6] = above[1]; pp[7] = above[2]; pp[8] = above[3]; p[0][3] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2; p[1][3] = p[0][2] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2; p[2][3] = p[1][2] = p[0][1] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2; p[3][3] = p[2][2] = p[1][1] = p[0][0] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2; p[3][2] = p[2][1] = p[1][0] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2; p[3][1] = p[2][0] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2; p[3][0] = (pp[6] + pp[7] * 2 + pp[8] + 2) >> 2; break; case Globals.B_VR_PRED: // System.out.println("B_VR_PRED"); pp = new int[9]; pp[0] = left[3]; pp[1] = left[2]; pp[2] = left[1]; pp[3] = left[0]; pp[4] = al; pp[5] = above[0]; pp[6] = above[1]; pp[7] = above[2]; pp[8] = above[3]; p[0][3] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2; p[0][2] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2; p[1][3] = p[0][1] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2; p[1][2] = p[0][0] = (pp[4] + pp[5] + 1) >> 1; p[2][3] = p[1][1] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2; p[2][2] = p[1][0] = (pp[5] + pp[6] + 1) >> 1; p[3][3] = p[2][1] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2; p[3][2] = p[2][0] = (pp[6] + pp[7] + 1) >> 1; p[3][1] = (pp[6] + pp[7] * 2 + pp[8] + 2) >> 2; p[3][0] = (pp[7] + pp[8] + 1) >> 1; break; case Globals.B_VL_PRED: // System.out.println("B_VL_PRED"); p[0][0] = (above[0] + above[1] + 1) >> 1; p[0][1] = (above[0] + above[1] * 2 + above[2] + 2) >> 2; p[0][2] = p[1][0] = (above[1] + above[2] + 1) >> 1; p[1][1] = p[0][3] = (above[1] + above[2] * 2 + above[3] + 2) >> 2; p[1][2] = p[2][0] = (above[2] + above[3] + 1) >> 1; p[1][3] = p[2][1] = (above[2] + above[3] * 2 + ar[0] + 2) >> 2; p[3][0] = p[2][2] = (above[3] + ar[0] + 1) >> 1; p[3][1] = p[2][3] = (above[3] + ar[0] * 2 + ar[1] + 2) >> 2; p[3][2] = (ar[0] + ar[1] * 2 + ar[2] + 2) >> 2; p[3][3] = (ar[1] + ar[2] * 2 + ar[3] + 2) >> 2; break; case Globals.B_HD_PRED: // System.out.println("B_HD_PRED"); pp = new int[9]; pp[0] = left[3]; pp[1] = left[2]; pp[2] = left[1]; pp[3] = left[0]; pp[4] = al; pp[5] = above[0]; pp[6] = above[1]; pp[7] = above[2]; pp[8] = above[3]; p[0][3] = (pp[0] + pp[1] + 1) >> 1; p[1][3] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2; p[0][2] = p[2][3] = (pp[1] + pp[2] + 1) >> 1; p[1][2] = p[3][3] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2; p[2][2] = p[0][1] = (pp[2] + pp[3] + 1) >> 1; p[3][2] = p[1][1] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2; p[2][1] = p[0][0] = (pp[3] + pp[4] + 1) >> 1; p[3][1] = p[1][0] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2; p[2][0] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2; p[3][0] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2; break; case Globals.B_HU_PRED: // System.out.println("B_HU_PRED"); p[0][0] = (left[0] + left[1] + 1) >> 1; p[1][0] = (left[0] + left[1] * 2 + left[2] + 2) >> 2; p[2][0] = p[0][1] = (left[1] + left[2] + 1) >> 1; p[3][0] = p[1][1] = (left[1] + left[2] * 2 + left[3] + 2) >> 2; p[2][1] = p[0][2] = (left[2] + left[3] + 1) >> 1; p[3][1] = p[1][2] = (left[2] + left[3] * 2 + left[3] + 2) >> 2; p[2][2] = p[3][2] = p[0][3] = p[1][3] = p[2][3] = p[3][3] = left[3]; break; default: System.out.println("TODO: " + sb.getMode()); System.exit(0); break; } sb.setPredict(p); } public void reconstruct() { SubBlock sb = this; int r, c; int p[][] = sb.getPredict(1, false); int dest[][] = new int[4][4]; int diff[][] = sb.getDiff(); for (r = 0; r < 4; r++) { for (c = 0; c < 4; c++) { int a = diff[r][c] + p[r][c]; if (a < 0) a = 0; if (a > 255) a = 255; dest[r][c] = a; } } sb.setDest(dest); if (!this.getMacroBlock().isKeepDebugInfo()) { sb.diff = null; sb.predict = null; sb.tokens = null; } } public void setDest(int[][] dest) { this.dest = dest; } public void setDiff(int[][] diff) { this.diff = diff; } public void setMode(int mode) { this.mode = mode; } public void setPixel(int x, int y, int p) { if (dest == null) { dest = new int[4][4]; } dest[x][y] = p; } public void setPredict(int[][] predict) { this.predict = predict; } public String toString() { String r = "["; for (int x = 0; x < 16; x++) r = r + tokens[x] + " "; r = r + "]"; return r; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/VP8Decoder.java000066400000000000000000000101021312650303100251070ustar00rootroot00000000000000/* This file is part of javavp8decoder. javavp8decoder is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. javavp8decoder 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 javavp8decoder. If not, see . */ package net.sourceforge.plantuml.webp; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import javax.imageio.stream.ImageInputStream; public class VP8Decoder { private int[][][][] coefProbs; VP8Frame f; private int frameCount = 0; public VP8Decoder() { coefProbs = Globals.getDefaultCoefProbs(); } public void decodeFrame(ImageInputStream stream, boolean debug) throws IOException { coefProbs = Globals.getDefaultCoefProbs(); f = new VP8Frame(stream, coefProbs); if (f.decodeFrame(debug)) { } frameCount++; } public VP8Frame getFrame() { return f; } public int getHeight() { return f.getHeight(); } public int getWidth() { return f.getWidth(); } @SuppressWarnings("unused") private void writeFile(int[][] data) { FileOutputStream out; try { out = new FileOutputStream("outagain.raw"); for (int y = 0; y < data[0].length; y++) for (int x = 0; x < data.length; x++) { out.write(data[x][y]); out.write(data[x][y]); out.write(data[x][y]); } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } public void writePGMFile(String fileName, VP8Frame frame) { FileOutputStream out; try { int[][] yData = frame.getYBuffer(); int[][] uData = frame.getUBuffer(); int[][] vData = frame.getVBuffer(); int outStride = (f.getWidth()+1)& ~1; int uvHeight = (f.getHeight() +1) / 2; out = new FileOutputStream(fileName); out.write((byte) 'P'); out.write((byte) '5'); out.write((byte) 0x0a); out.write(("" + outStride).getBytes()); out.write((byte) ' '); out.write(("" + (f.getHeight() + uvHeight)).getBytes()); out.write((byte) 0x0a); out.write(("255").getBytes()); out.write((byte) 0xa); for (int y = 0; y < f.getHeight(); y++) { for (int x = 0; x < f.getWidth(); x++) { out.write(yData[x][y]); } if((f.getWidth() & 1)==1) out.write(0x0); } for (int y = 0; y < (f.getHeight() + 1) / 2; y++) { for (int x = 0; x < (f.getWidth() + 1) / 2; x++) { out.write(uData[x][y]); } for (int x = 0; x < (f.getWidth() + 1) / 2; x++) { out.write(vData[x][y]); } } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } public void writeYV12File(String fileName, VP8Frame frame) { FileOutputStream out; try { int[][] yData = frame.getYBuffer(); int[][] uData = frame.getUBuffer(); int[][] vData = frame.getVBuffer(); out = new FileOutputStream(fileName); out.write((byte) 'P'); out.write((byte) '5'); out.write((byte) 0x0a); out.write(("" + f.getWidth()).getBytes()); out.write((byte) ' '); out.write(("" + (f.getHeight() * 3 / 2)).getBytes()); out.write((byte) 0x0a); out.write(("255").getBytes()); out.write((byte) 0xa); for (int y = 0; y < f.getHeight(); y++) { for (int x = 0; x < f.getWidth(); x++) { out.write(yData[x][y]); } } for (int y = 0; y < (f.getHeight() + 1) / 2; y++) for (int x = 0; x < (f.getWidth() + 1) / 2; x++) { out.write(uData[x][y]); } for (int y = 0; y < (f.getHeight() + 1) / 2; y++) for (int x = 0; x < (f.getWidth() + 1) / 2; x++) { out.write(vData[x][y]); } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/webp/VP8Frame.java000066400000000000000000000736051312650303100246150ustar00rootroot00000000000000/* This file is part of javavp8decoder. javavp8decoder is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. javavp8decoder 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 javavp8decoder. If not, see . */ package net.sourceforge.plantuml.webp; import java.awt.image.BufferedImage; import java.awt.image.WritableRaster; import java.io.IOException; import java.util.ArrayList; import java.util.Vector; import javax.imageio.event.IIOReadProgressListener; import javax.imageio.stream.ImageInputStream; public class VP8Frame { private static int BLOCK_TYPES = 4; private static int COEF_BANDS = 8; private static int MAX_ENTROPY_TOKENS = 12; private static int MAX_MODE_LF_DELTAS = 4; private static int MAX_REF_LF_DELTAS = 4; private static int PREV_COEF_CONTEXTS = 3; private ArrayList _listeners = new ArrayList(); private int bufferCount; private int buffersToCreate=1; private int[][][][] coefProbs; private boolean debug=false; private int filterLevel; private int filterType; private ImageInputStream frame; private int frameType; private int height; private int macroBlockCols; private int macroBlockNoCoeffSkip; private int macroBlockRows; private MacroBlock[][] macroBlocks; private int macroBlockSegementAbsoluteDelta; private int[] macroBlockSegmentTreeProbs; private int[] modeLoopFilterDeltas = new int[MAX_MODE_LF_DELTAS]; private int modeRefLoopFilterDeltaEnabled; private int modeRefLoopFilterDeltaUpdate; private int multiTokenPartition = 0; private long offset; private int[] refLoopFilterDeltas = new int[MAX_REF_LF_DELTAS]; private int refreshEntropyProbs; private int refreshLastFrame; private int segmentationIsEnabled; private SegmentQuants segmentQuants; private int sharpnessLevel; private int simpleFilter; private BoolDecoder tokenBoolDecoder; private Vector tokenBoolDecoders; private int updateMacroBlockSegmentationMap; private int updateMacroBlockSegmentatonData; private int width; public VP8Frame(ImageInputStream stream) throws IOException { this.frame = stream; offset = frame.getStreamPosition(); this.coefProbs=Globals.getDefaultCoefProbs(); tokenBoolDecoders = new Vector(); } public VP8Frame(ImageInputStream stream, int[][][][] coefProbs) throws IOException { this.frame = stream; offset = frame.getStreamPosition(); this.coefProbs=coefProbs; tokenBoolDecoders = new Vector(); } public void addIIOReadProgressListener(IIOReadProgressListener listener) { _listeners.add(listener); } private void createMacroBlocks() { macroBlocks = new MacroBlock[macroBlockCols+2][macroBlockRows+2]; for(int x=0; x> 4; macroBlockCols=tWidth >> 4; createMacroBlocks(); BoolDecoder bc = new BoolDecoder(frame, offset); if (frameType == 0) { int clr_type = bc.readBit(); int clamp_type = bc.readBit(); } segmentationIsEnabled = bc.readBit(); if (segmentationIsEnabled > 0) { updateMacroBlockSegmentationMap = bc.readBit(); updateMacroBlockSegmentatonData = bc.readBit(); if(updateMacroBlockSegmentatonData > 0 ) { macroBlockSegementAbsoluteDelta = bc.readBit(); /* For each segmentation feature (Quant and loop filter level) */ for (int i = 0; i < Globals.MAX_MB_SEGMENTS; i++) { int value =0; if (bc.readBit() > 0) { value = bc.readLiteral(Globals.vp8MacroBlockFeatureDataBits[0]); if(bc.readBit()>0) value=-value; } this.segmentQuants.getSegQuants()[i].setQindex(value); } for (int i = 0; i < Globals.MAX_MB_SEGMENTS; i++) { int value = 0; if (bc.readBit() > 0) { value = bc.readLiteral(Globals.vp8MacroBlockFeatureDataBits[1]); if(bc.readBit()>0) value=-value; } this.segmentQuants.getSegQuants()[i].setFilterStrength(value); } if(updateMacroBlockSegmentationMap > 0) { macroBlockSegmentTreeProbs = new int[Globals.MB_FEATURE_TREE_PROBS]; for (int i = 0; i < Globals.MB_FEATURE_TREE_PROBS; i++) { int value=255; if (bc.readBit()>0) { value = bc.readLiteral(8); } else value = 255; macroBlockSegmentTreeProbs[i] = value; } } } } simpleFilter = bc.readBit(); filterLevel = bc.readLiteral(6); sharpnessLevel = bc.readLiteral(3); modeRefLoopFilterDeltaEnabled = bc.readBit(); if (modeRefLoopFilterDeltaEnabled > 0) { // Do the deltas need to be updated modeRefLoopFilterDeltaUpdate = bc.readBit(); if (modeRefLoopFilterDeltaUpdate > 0) { for (int i = 0; i < MAX_REF_LF_DELTAS; i++) { if (bc.readBit() > 0) { refLoopFilterDeltas[i] = bc.readLiteral(6); if (bc.readBit() > 0) // Apply sign refLoopFilterDeltas[i] = refLoopFilterDeltas[i] * -1; } } for (int i = 0; i < MAX_MODE_LF_DELTAS; i++) { if (bc.readBit() > 0) { modeLoopFilterDeltas[i] = bc.readLiteral(6); if (bc.readBit() > 0) // Apply sign modeLoopFilterDeltas[i] = modeLoopFilterDeltas[i] * -1; } } } } filterType = (filterLevel == 0) ? 0 : (simpleFilter>0) ? 1 : 2; setupTokenDecoder(bc, firstPartitionLengthInBytes, offset); bc.seek(); segmentQuants.parse(bc, segmentationIsEnabled==1, macroBlockSegementAbsoluteDelta==1); // Determine if the golden frame or ARF buffer should be updated and // how. // For all non key frames the GF and ARF refresh flags and sign bias // flags must be set explicitly. if (frameType != 0) { throw new IllegalArgumentException("bad input: not intra"); } refreshEntropyProbs = bc.readBit(); if (refreshEntropyProbs > 0) { } refreshLastFrame = 0; if (frameType == 0) refreshLastFrame = 1; else refreshLastFrame = bc.readBit(); for (int i = 0; i < BLOCK_TYPES; i++) for (int j = 0; j < COEF_BANDS; j++) for (int k = 0; k < PREV_COEF_CONTEXTS; k++) for (int l = 0; l < MAX_ENTROPY_TOKENS - 1; l++) { if (bc.readBool(Globals.vp8CoefUpdateProbs[i][j][k][l]) > 0) { int newp = bc.readLiteral(8); this.coefProbs[i][j][k][l] = newp; } } // Read the mb_no_coeff_skip flag macroBlockNoCoeffSkip = (int) bc.readBit(); if (frameType == 0) { readModes(bc); } else { throw new IllegalArgumentException("bad input: not intra"); } int ibc = 0; int num_part = 1 << multiTokenPartition; for (int mb_row = 0; mb_row < macroBlockRows; mb_row++) { if (num_part > 1) { tokenBoolDecoder = tokenBoolDecoders.elementAt(ibc); tokenBoolDecoder.seek(); decodeMacroBlockRow(mb_row); ibc++; if(ibc==num_part) ibc=0; } else decodeMacroBlockRow(mb_row); fireProgressUpdate(mb_row); } if(this.getFilterType()>0 && this.getFilterLevel()!=0) this.loopFilter(); return true; } private void decodeMacroBlockRow(int mbRow) throws IOException { for (int mbCol = 0; mbCol < macroBlockCols; mbCol++) { MacroBlock mb = getMacroBlock(mbCol, mbRow); mb.decodeMacroBlock(this); mb.dequantMacroBlock(this); } } public void fireLFProgressUpdate(float p) { java.util.Iterator listeners = _listeners.iterator(); while( listeners.hasNext() ) { ( (IIOReadProgressListener)listeners.next() ).imageProgress( null, (100/buffersToCreate)+(p/buffersToCreate)); } } private void fireProgressUpdate(int mb_row) { java.util.Iterator listeners = _listeners.iterator(); while( listeners.hasNext() ) { ( (IIOReadProgressListener)listeners.next() ).imageProgress( null, (100.0f*((float)(mb_row+1)/(float)getMacroBlockRows()))/buffersToCreate); } } public void fireRGBProgressUpdate(float p) { java.util.Iterator listeners = _listeners.iterator(); while( listeners.hasNext() ) { ( (IIOReadProgressListener)listeners.next() ).imageProgress( null, ((bufferCount+4)*(100/buffersToCreate))+(p/buffersToCreate)); } } public SubBlock getAboveRightSubBlock(SubBlock sb, SubBlock.PLANE plane) { // this might break at right edge SubBlock r; MacroBlock mb = sb.getMacroBlock(); int x = mb.getSubblockX(sb); int y = mb.getSubblockY(sb); if(plane==SubBlock.PLANE.Y1) { // top row if(y==0 && x<3) { MacroBlock mb2=this.getMacroBlock(mb.getX(), mb.getY()-1); r = mb2.getSubBlock(plane, x+1, 3); return r; } //top right else if(y==0 && x==3) { MacroBlock mb2=this.getMacroBlock(mb.getX()+1, mb.getY()-1); r = mb2.getSubBlock(plane, 0, 3); if(mb2.getX()==this.getMacroBlockCols()) { int dest[][] = new int [4][4]; for(int b=0; b<4; b++) for(int a=0; a<4; a++) { if(mb2.getY()<0) dest[a][b]=127; else dest[a][b]=this.getMacroBlock(mb.getX(), mb.getY()-1).getSubBlock(SubBlock.PLANE.Y1, 3, 3).getDest()[3][3]; } r=new SubBlock(mb2,null, null, SubBlock.PLANE.Y1); r.setDest(dest); } return r; } //not right edge or top row else if(y>0 && x<3) { r = mb.getSubBlock(plane, x+1, y-1); return r; } //else use top right else { SubBlock sb2 = mb.getSubBlock(sb.getPlane(), 3, 0); return this.getAboveRightSubBlock(sb2, plane); } } else { throw new IllegalArgumentException("bad input: getAboveRightSubBlock()"); } } public SubBlock getAboveSubBlock(SubBlock sb, SubBlock.PLANE plane) { SubBlock r = sb.getAbove(); if(r==null) { MacroBlock mb = sb.getMacroBlock(); int x = mb.getSubblockX(sb); MacroBlock mb2 = getMacroBlock(mb.getX(), mb.getY()-1); //TODO: SPLIT while(plane==SubBlock.PLANE.Y2 && mb2.getYMode()== Globals.B_PRED) { mb2 = getMacroBlock(mb2.getX(), mb2.getY()-1); } r = mb2.getBottomSubBlock(x, sb.getPlane()); } return r; } private boolean getBit(int data, int bit) { int r = data & (1 << bit); if (r > 0) return true; return false; } private int getBitAsInt(int data, int bit) { int r = data & (1 << bit); if (r > 0) return 1; return 0; } public BufferedImage getBufferedImage() { BufferedImage bi = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); useBufferedImage(bi); bufferCount++; return bi; } public int[][][][] getCoefProbs() { return coefProbs; } public BufferedImage getDebugImageDiff() { BufferedImage bi = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); WritableRaster imRas = bi.getWritableTile(0, 0); for(int x = 0; x< getWidth(); x++) { for(int y = 0; y< getHeight(); y++) { int c[] = new int[3]; int yy, u, v; yy = 127+this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.Y1, (x%16)/4, (y%16)/4).getDiff()[x%4][y%4]; u = 127+this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.U, ((x/2)%8)/4, ((y/2)%8)/4).getDiff()[(x/2)%4][(y/2)%4]; v = 127+this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.V, ((x/2)%8)/4, ((y/2)%8)/4).getDiff()[(x/2)%4][(y/2)%4]; c[0] = (int)( 1.164*(yy-16)+1.596*(v-128) ); c[1] = (int)( 1.164*(yy-16)-0.813*(v-128)-0.391*(u-128) ); c[2] = (int)( 1.164*(yy-16)+2.018*(u-128) ); for(int z=0; z<3; z++) { if(c[z]<0) c[z]=0; if(c[z]>255) c[z]=255; } imRas.setPixel(x, y, c); } fireRGBProgressUpdate(100.0F*x/getWidth()); } bufferCount++; return bi; } public BufferedImage getDebugImagePredict() { BufferedImage bi = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); WritableRaster imRas = bi.getWritableTile(0, 0); for(int x = 0; x< getWidth(); x++) { for(int y = 0; y< getHeight(); y++) { int c[] = new int[3]; int yy, u, v; yy = this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.Y1, (x%16)/4, (y%16)/4).getPredict()[x%4][y%4]; u = this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.U, ((x/2)%8)/4, ((y/2)%8)/4).getPredict()[(x/2)%4][(y/2)%4]; v = this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.V, ((x/2)%8)/4, ((y/2)%8)/4).getPredict()[(x/2)%4][(y/2)%4]; c[0] = (int)( 1.164*(yy-16)+1.596*(v-128) ); c[1] = (int)( 1.164*(yy-16)-0.813*(v-128)-0.391*(u-128) ); c[2] = (int)( 1.164*(yy-16)+2.018*(u-128) ); for(int z=0; z<3; z++) { if(c[z]<0) c[z]=0; if(c[z]>255) c[z]=255; } imRas.setPixel(x, y, c); } fireRGBProgressUpdate(100.0F*x/getWidth()); } bufferCount++; return bi; } public BufferedImage getDebugImageUBuffer() { BufferedImage bi = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); WritableRaster imRas = bi.getWritableTile(0, 0); for(int x = 0; x< getWidth(); x++) { for(int y = 0; y< getHeight(); y++) { int c[] = new int[3]; int u; u = this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.U, ((x/2)%8)/4, ((y/2)%8)/4).getDest()[(x/2)%4][(y/2)%4]; c[0] = u; c[1] = u; c[2] = u; for(int z=0; z<3; z++) { if(c[z]<0) c[z]=0; if(c[z]>255) c[z]=255; } imRas.setPixel(x, y, c); } fireRGBProgressUpdate(100.0F*x/getWidth()); } bufferCount++; return bi; } public BufferedImage getDebugImageUDiffBuffer() { BufferedImage bi = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); WritableRaster imRas = bi.getWritableTile(0, 0); for(int x = 0; x< getWidth(); x++) { for(int y = 0; y< getHeight(); y++) { int c[] = new int[3]; int u; u = 127+this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.U, ((x/2)%8)/4, ((y/2)%8)/4).getDiff()[(x/2)%4][(y/2)%4]; c[0] = u; c[1] = u; c[2] = u; for(int z=0; z<3; z++) { if(c[z]<0) c[z]=0; if(c[z]>255) c[z]=255; } imRas.setPixel(x, y, c); } fireRGBProgressUpdate(100.0F*x/getWidth()); } bufferCount++; return bi; } public BufferedImage getDebugImageUPredBuffer() { BufferedImage bi = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); WritableRaster imRas = bi.getWritableTile(0, 0); for(int x = 0; x< getWidth(); x++) { for(int y = 0; y< getHeight(); y++) { int c[] = new int[3]; int u; u = this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.U, ((x/2)%8)/4, ((y/2)%8)/4).getPredict()[(x/2)%4][(y/2)%4]; c[0] = u; c[1] = u; c[2] = u; for(int z=0; z<3; z++) { if(c[z]<0) c[z]=0; if(c[z]>255) c[z]=255; } imRas.setPixel(x, y, c); } fireRGBProgressUpdate(100.0F*x/getWidth()); } bufferCount++; return bi; } public BufferedImage getDebugImageVBuffer() { BufferedImage bi = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); WritableRaster imRas = bi.getWritableTile(0, 0); for(int x = 0; x< getWidth(); x++) { for(int y = 0; y< getHeight(); y++) { int c[] = new int[3]; int v; v = this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.V, ((x/2)%8)/4, ((y/2)%8)/4).getDest()[(x/2)%4][(y/2)%4]; c[0] = v; c[1] = v; c[2] = v; for(int z=0; z<3; z++) { if(c[z]<0) c[z]=0; if(c[z]>255) c[z]=255; } imRas.setPixel(x, y, c); } fireRGBProgressUpdate(100.0F*x/getWidth()); } bufferCount++; return bi; } public BufferedImage getDebugImageVDiffBuffer() { BufferedImage bi = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); WritableRaster imRas = bi.getWritableTile(0, 0); for(int x = 0; x< getWidth(); x++) { for(int y = 0; y< getHeight(); y++) { int c[] = new int[3]; int v; v = 127+this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.V, ((x/2)%8)/4, ((y/2)%8)/4).getDiff()[(x/2)%4][(y/2)%4]; c[0] = v; c[1] = v; c[2] = v; for(int z=0; z<3; z++) { if(c[z]<0) c[z]=0; if(c[z]>255) c[z]=255; } imRas.setPixel(x, y, c); } fireRGBProgressUpdate(100.0F*x/getWidth()); } bufferCount++; return bi; } public BufferedImage getDebugImageVPredBuffer() { BufferedImage bi = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); WritableRaster imRas = bi.getWritableTile(0, 0); for(int x = 0; x< getWidth(); x++) { for(int y = 0; y< getHeight(); y++) { int c[] = new int[3]; int v; v = this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.V, ((x/2)%8)/4, ((y/2)%8)/4).getPredict()[(x/2)%4][(y/2)%4]; c[0] = v; c[1] = v; c[2] = v; for(int z=0; z<3; z++) { if(c[z]<0) c[z]=0; if(c[z]>255) c[z]=255; } imRas.setPixel(x, y, c); } fireRGBProgressUpdate(100.0F*x/getWidth()); } bufferCount++; return bi; } public BufferedImage getDebugImageYBuffer() { BufferedImage bi = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); WritableRaster imRas = bi.getWritableTile(0, 0); for(int x = 0; x< getWidth(); x++) { for(int y = 0; y< getHeight(); y++) { int c[] = new int[3]; int yy; yy = this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.Y1, (x%16)/4, (y%16)/4).getDest()[x%4][y%4]; c[0] = yy; c[1] = yy; c[2] = yy; for(int z=0; z<3; z++) { if(c[z]<0) c[z]=0; if(c[z]>255) c[z]=255; } imRas.setPixel(x, y, c); } fireRGBProgressUpdate(100.0F*x/getWidth()); } bufferCount++; return bi; } public BufferedImage getDebugImageYDiffBuffer() { BufferedImage bi = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); WritableRaster imRas = bi.getWritableTile(0, 0); for(int x = 0; x< getWidth(); x++) { for(int y = 0; y< getHeight(); y++) { int c[] = new int[3]; int yy; yy = 127+this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.Y1, (x%16)/4, (y%16)/4).getDiff()[x%4][y%4]; c[0] = yy; c[1] = yy; c[2] = yy; for(int z=0; z<3; z++) { if(c[z]<0) c[z]=0; if(c[z]>255) c[z]=255; } imRas.setPixel(x, y, c); } fireRGBProgressUpdate(100.0F*x/getWidth()); } bufferCount++; return bi; } public BufferedImage getDebugImageYPredBuffer() { BufferedImage bi = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); WritableRaster imRas = bi.getWritableTile(0, 0); for(int x = 0; x< getWidth(); x++) { for(int y = 0; y< getHeight(); y++) { int c[] = new int[3]; int yy; yy = this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.Y1, (x%16)/4, (y%16)/4).getPredict()[x%4][y%4]; c[0] = yy; c[1] = yy; c[2] = yy; for(int z=0; z<3; z++) { if(c[z]<0) c[z]=0; if(c[z]>255) c[z]=255; } imRas.setPixel(x, y, c); } fireRGBProgressUpdate(100.0F*x/getWidth()); } bufferCount++; return bi; } public int getFilterLevel() { return filterLevel; } public int getFilterType() { return filterType; } public int getFrameType() { return frameType; } public int getHeight() { return height; } public SubBlock getLeftSubBlock(SubBlock sb, SubBlock.PLANE plane) { SubBlock r = sb.getLeft(); if(r==null) { MacroBlock mb = sb.getMacroBlock(); int y = mb.getSubblockY(sb); MacroBlock mb2 = getMacroBlock(mb.getX()-1, mb.getY()); //TODO: SPLIT while(plane==SubBlock.PLANE.Y2 && mb2.getYMode()== Globals.B_PRED) mb2 = getMacroBlock(mb2.getX()-1, mb2.getY()); r = mb2.getRightSubBlock(y, sb.getPlane()); } return r; } public MacroBlock getMacroBlock(int mbCol, int mbRow) { return macroBlocks[mbCol+1][mbRow+1]; } public int getMacroBlockCols() { return macroBlockCols; } public String getMacroBlockDebugString(int mbx, int mby, int sbx, int sby) { String r = new String(); if(mbx 0) { prob_skip_false = bc.readLiteral(8); } while (++mb_row < macroBlockRows) { int mb_col = -1; while (++mb_col < macroBlockCols) { //if (this.segmentation_enabled > 0) { // logger.log(Level.SEVERE, "TODO:"); // throw new IllegalArgumentException("bad input: segmentation_enabled()"); //} // Read the macroblock coeff skip flag if this feature is in // use, else default to 0 MacroBlock mb = getMacroBlock(mb_col, mb_row); if ((segmentationIsEnabled >0) &&( updateMacroBlockSegmentationMap > 0)) { int value = bc.readTree(Globals.macroBlockSegmentTree, this.macroBlockSegmentTreeProbs); mb.setSegmentId(value); } if(modeRefLoopFilterDeltaEnabled > 0) { int level = filterLevel; level = level + refLoopFilterDeltas[0]; level = (level < 0) ? 0 : (level > 63) ? 63 : level; mb.setFilterLevel(level); } else { mb.setFilterLevel(segmentQuants.getSegQuants()[mb.getSegmentId()].getFilterStrength()); // logger.error("TODO:"); } int mb_skip_coeff = 0; if (macroBlockNoCoeffSkip > 0) mb_skip_coeff = bc.readBool(prob_skip_false); else mb_skip_coeff = 0; mb.setSkipCoeff(mb_skip_coeff); int y_mode = readYMode(bc); mb.setYMode(y_mode); if (y_mode == Globals.B_PRED) { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { SubBlock sb = mb.getYSubBlock(j, i); SubBlock A = getAboveSubBlock(sb, SubBlock.PLANE.Y1); SubBlock L = getLeftSubBlock(sb, SubBlock.PLANE.Y1); int mode = readSubBlockMode(bc, A.getMode(), L.getMode()); sb.setMode(mode); } } if(modeRefLoopFilterDeltaEnabled > 0) { int level = mb.getFilterLevel(); level = level + this.modeLoopFilterDeltas[0]; level = (level < 0) ? 0 : (level > 63) ? 63 : level; mb.setFilterLevel(level); } } else { int BMode; switch (y_mode) { case Globals.DC_PRED: BMode = Globals.B_DC_PRED; break; case Globals.V_PRED: BMode = Globals.B_VE_PRED; break; case Globals.H_PRED: BMode = Globals.B_HE_PRED; break; case Globals.TM_PRED: BMode = Globals.B_TM_PRED; break; default: BMode = Globals.B_DC_PRED; break; } for (int x = 0; x < 4; x++) { for (int y = 0; y < 4; y++) { SubBlock sb = mb.getYSubBlock(x, y); sb.setMode(BMode); } } } int mode = readUvMode(bc); mb.setUvMode(mode); } } } private int readPartitionSize(long l) throws IOException { frame.seek(l); int size =frame.readUnsignedByte() + (frame.readUnsignedByte() << 8) + (frame.readUnsignedByte() << 16); return size; } private int readSubBlockMode(BoolDecoder bc, int A, int L) throws IOException { int i = bc.readTree(Globals.vp8SubBlockModeTree, Globals.vp8KeyFrameSubBlockModeProb[A][L]); return i; } private int readUvMode(BoolDecoder bc) throws IOException { int i = bc.readTree(Globals.vp8UVModeTree, Globals.vp8KeyFrameUVModeProb); return i; } private int readYMode(BoolDecoder bc) throws IOException { int i = bc.readTree(Globals.vp8KeyFrameYModeTree, Globals.vp8KeyFrameYModeProb); return i; } public void removeIIOReadProgressListener(IIOReadProgressListener listener) { _listeners.remove(listener); } public void setBuffersToCreate (int count) { this.buffersToCreate = 3+count; this.bufferCount=0; } private void setupTokenDecoder(BoolDecoder bc, int first_partition_length_in_bytes, long offset) throws IOException { long partitionSize = 0; long partitionsStart = offset+first_partition_length_in_bytes; long partition = partitionsStart; multiTokenPartition = bc.readLiteral(2); int num_part = 1 << multiTokenPartition; if (num_part > 1) { partition += 3 * (num_part - 1); } for (int i = 0; i < num_part; i++) { /* * Calculate the length of this partition. The last partition size * is implicit. */ if (i < num_part - 1) { partitionSize = readPartitionSize(partitionsStart+(i*3)); bc.seek(); } else { partitionSize = frame.length() - partition; } tokenBoolDecoders.add(new BoolDecoder(frame, partition)); partition+=partitionSize; } tokenBoolDecoder = tokenBoolDecoders.elementAt(0); } public void useBufferedImage(BufferedImage dst) { WritableRaster imRas = dst.getWritableTile(0, 0); for(int x = 0; x< getWidth(); x++) { for(int y = 0; y< getHeight(); y++) { int c[] = new int[3]; int yy, u, v; yy = this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.Y1, (x%16)/4, (y%16)/4).getDest()[x%4][y%4]; u = this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.U, ((x/2)%8)/4, ((y/2)%8)/4).getDest()[(x/2)%4][(y/2)%4]; v = this.getMacroBlock(x/16, y/16).getSubBlock(SubBlock.PLANE.V, ((x/2)%8)/4, ((y/2)%8)/4).getDest()[(x/2)%4][(y/2)%4]; c[0] = (int)( 1.164*(yy-16)+1.596*(v-128) ); c[1] = (int)( 1.164*(yy-16)-0.813*(v-128)-0.391*(u-128) ); c[2] = (int)( 1.164*(yy-16)+2.018*(u-128) ); for(int z=0; z<3; z++) { if(c[z]<0) c[z]=0; if(c[z]>255) c[z]=255; } imRas.setPixel(x, y, c); } fireRGBProgressUpdate(100.0F*x/getWidth()); } } public void setFrame(ImageInputStream frame) { try { this.frame.flush(); this.frame.close(); this.frame = frame; offset = frame.getStreamPosition(); this.coefProbs=Globals.getDefaultCoefProbs(); tokenBoolDecoders = new Vector(); } catch (IOException e) { e.printStackTrace(); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/xmi/000077500000000000000000000000001312650303100222075ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/xmi/CucaDiagramXmiMaker.java000066400000000000000000000061771312650303100266630ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.xmi; import java.io.IOException; import java.io.OutputStream; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.UmlDiagram; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.descdiagram.DescriptionDiagram; import net.sourceforge.plantuml.statediagram.StateDiagram; public final class CucaDiagramXmiMaker { private final CucaDiagram diagram; private final FileFormat fileFormat; public CucaDiagramXmiMaker(CucaDiagram diagram, FileFormat fileFormat) throws IOException { this.diagram = diagram; this.fileFormat = fileFormat; } public static String getModel(UmlDiagram classDiagram) { return "model1"; } public void createFiles(OutputStream fos) throws IOException { try { final IXmiClassDiagram xmi; if (diagram instanceof StateDiagram) { xmi = new XmiStateDiagram((StateDiagram) diagram); } else if (diagram instanceof DescriptionDiagram) { xmi = new XmiDescriptionDiagram((DescriptionDiagram) diagram); } else if (fileFormat == FileFormat.XMI_STANDARD) { xmi = new XmiClassDiagramStandard((ClassDiagram) diagram); } else if (fileFormat == FileFormat.XMI_ARGO) { xmi = new XmiClassDiagramArgo((ClassDiagram) diagram); } else if (fileFormat == FileFormat.XMI_STAR) { xmi = new XmiClassDiagramStar((ClassDiagram) diagram); } else { throw new UnsupportedOperationException(); } xmi.transformerXml(fos); } catch (ParserConfigurationException e) { Log.error(e.toString()); e.printStackTrace(); throw new IOException(e.toString()); } catch (TransformerException e) { Log.error(e.toString()); e.printStackTrace(); throw new IOException(e.toString()); } } } plantuml-1.2017.15/src/net/sourceforge/plantuml/xmi/IXmiClassDiagram.java000066400000000000000000000030311312650303100261700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.xmi; import java.io.OutputStream; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; public interface IXmiClassDiagram { void transformerXml(OutputStream os) throws TransformerException, ParserConfigurationException; } plantuml-1.2017.15/src/net/sourceforge/plantuml/xmi/XmiClassDiagramAbstract.java000066400000000000000000000176001312650303100275520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.xmi; import java.io.OutputStream; import java.util.HashSet; import java.util.Set; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.OutputKeys; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.LongCode; import net.sourceforge.plantuml.cucadiagram.Member; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.skin.VisibilityModifier; import net.sourceforge.plantuml.utils.UniqueSequence; import org.w3c.dom.Document; import org.w3c.dom.Element; abstract class XmiClassDiagramAbstract implements IXmiClassDiagram { // https://www.ibm.com/developerworks/library/x-wxxm24/ // http://pierre.ree7.fr/blog/?p=5 protected final ClassDiagram classDiagram; protected final Document document; protected Element ownedElement; protected final Set done = new HashSet(); public XmiClassDiagramAbstract(ClassDiagram classDiagram) throws ParserConfigurationException { this.classDiagram = classDiagram; final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); final DocumentBuilder builder = factory.newDocumentBuilder(); this.document = builder.newDocument(); document.setXmlVersion("1.0"); document.setXmlStandalone(true); final Element xmi = document.createElement("XMI"); xmi.setAttribute("xmi.version", "1.1"); xmi.setAttribute("xmlns:UML", "href://org.omg/UML/1.3"); document.appendChild(xmi); final Element header = document.createElement("XMI.header"); xmi.appendChild(header); final Element metamodel = document.createElement("XMI.metamodel"); metamodel.setAttribute("xmi.name", "UML"); metamodel.setAttribute("xmi.version", "1.3"); header.appendChild(metamodel); final Element content = document.createElement("XMI.content"); xmi.appendChild(content); // final Element model = document.createElement("UML:Model"); model.setAttribute("xmi.id", CucaDiagramXmiMaker.getModel(classDiagram)); model.setAttribute("name", "PlantUML"); content.appendChild(model); // this.ownedElement = document.createElement("UML:Namespace.ownedElement"); model.appendChild(ownedElement); } final protected String forXMI(String s) { return s.replace(':', ' '); } final protected String forXMI(Display s) { if (Display.isNull(s)) { return ""; } return s.get(0).toString().replace(':', ' '); } final public void transformerXml(OutputStream os) throws TransformerException, ParserConfigurationException { final Source source = new DOMSource(document); final Result resultat = new StreamResult(os); final TransformerFactory fabrique = TransformerFactory.newInstance(); final Transformer transformer = fabrique.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); // transformer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1"); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); // tf.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); transformer.transform(source, resultat); } final protected Element createEntityNode(IEntity entity) { // final Element cla = document.createElement("UML:Class"); if (entity.getLeafType() == LeafType.NOTE) { return null; } cla.setAttribute("xmi.id", entity.getUid()); cla.setAttribute("name", entity.getDisplay().get(0).toString()); final LongCode parentCode = entity.getParentContainer().getLongCode(); if (parentCode == null) { cla.setAttribute("namespace", CucaDiagramXmiMaker.getModel(classDiagram)); } else { cla.setAttribute("namespace", parentCode.getFullName()); } final Stereotype stereotype = entity.getStereotype(); if (stereotype != null) { final Element stereo = document.createElement("UML:ModelElement.stereotype"); for (String s : stereotype.getMultipleLabels()) { final Element name = document.createElement("UML:Stereotype"); name.setAttribute("name", s); stereo.appendChild(name); } cla.appendChild(stereo); } final LeafType type = entity.getLeafType(); if (type == LeafType.ABSTRACT_CLASS) { cla.setAttribute("isAbstract", "true"); } else if (type == LeafType.INTERFACE) { cla.setAttribute("isInterface", "true"); } final Element feature = document.createElement("UML:Classifier.feature"); cla.appendChild(feature); for (Member m : entity.getBodier().getFieldsToDisplay()) { // final Element attribute = document.createElement("UML:Attribute"); attribute.setAttribute("xmi.id", "att" + UniqueSequence.getValue()); attribute.setAttribute("name", m.getDisplay(false)); final VisibilityModifier visibility = m.getVisibilityModifier(); if (visibility != null) { attribute.setAttribute("visibility", visibility.getXmiVisibility()); } feature.appendChild(attribute); } for (Member m : entity.getBodier().getMethodsToDisplay()) { // final Element operation = document.createElement("UML:Operation"); operation.setAttribute("xmi.id", "att" + UniqueSequence.getValue()); operation.setAttribute("name", m.getDisplay(false)); final VisibilityModifier visibility = m.getVisibilityModifier(); if (visibility != null) { operation.setAttribute("visibility", visibility.getXmiVisibility()); } feature.appendChild(operation); } return cla; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/xmi/XmiClassDiagramArgo.java000066400000000000000000000125561312650303100267040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.xmi; import javax.xml.parsers.ParserConfigurationException; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.utils.UniqueSequence; import org.w3c.dom.Element; public class XmiClassDiagramArgo extends XmiClassDiagramAbstract implements IXmiClassDiagram { public XmiClassDiagramArgo(ClassDiagram classDiagram) throws ParserConfigurationException { super(classDiagram); for (final IEntity ent : classDiagram.getLeafsvalues()) { if (classDiagram.isStandalone(ent) == false) { continue; } final Element cla = createEntityNode(ent); if (cla == null) { continue; } ownedElement.appendChild(cla); done.add(ent); } // if (fileFormat != FileFormat.XMI_STANDARD) { for (final Link link : classDiagram.getLinks()) { addLink(link); } // } } private void addLink(Link link) { final String assId = "ass" + UniqueSequence.getValue(); // if ((link.getType().getDecor1() == LinkDecor.EXTENDS || link.getType().getDecor2() == LinkDecor.EXTENDS) // && fileFormat == FileFormat.XMI_STAR) { // addExtension(link, assId); // return; // } final Element association = document.createElement("UML:Association"); association.setAttribute("xmi.id", assId); association.setAttribute("namespace", CucaDiagramXmiMaker.getModel(classDiagram)); if (link.getLabel() != null) { association.setAttribute("name", forXMI(link.getLabel())); } final Element connection = document.createElement("UML:Association.connection"); final Element end1 = document.createElement("UML:AssociationEnd"); end1.setAttribute("xmi.id", "end" + UniqueSequence.getValue()); end1.setAttribute("association", assId); end1.setAttribute("type", link.getEntity1().getUid()); if (link.getQualifier1() != null) { end1.setAttribute("name", forXMI(link.getQualifier1())); } final Element endparticipant1 = document.createElement("UML:AssociationEnd.participant"); // if (fileFormat == FileFormat.XMI_ARGO) { if (done.contains(link.getEntity1())) { endparticipant1.appendChild(createEntityNodeRef(link.getEntity1())); } else { final Element element = createEntityNode(link.getEntity1()); if (element == null) { return; } endparticipant1.appendChild(element); done.add(link.getEntity1()); } // } else if (fileFormat == FileFormat.XMI_STAR) { // if (link.getType().getDecor2() == LinkDecor.COMPOSITION) { // end1.setAttribute("aggregation", "composite"); // } // if (link.getType().getDecor2() == LinkDecor.AGREGATION) { // end1.setAttribute("aggregation", "aggregate"); // } // } end1.appendChild(endparticipant1); connection.appendChild(end1); final Element end2 = document.createElement("UML:AssociationEnd"); end2.setAttribute("xmi.id", "end" + UniqueSequence.getValue()); end2.setAttribute("association", assId); end2.setAttribute("type", link.getEntity2().getUid()); if (link.getQualifier2() != null) { end2.setAttribute("name", forXMI(link.getQualifier2())); } final Element endparticipant2 = document.createElement("UML:AssociationEnd.participant"); // if (fileFormat == FileFormat.XMI_ARGO) { if (done.contains(link.getEntity2())) { endparticipant2.appendChild(createEntityNodeRef(link.getEntity2())); } else { final Element element = createEntityNode(link.getEntity2()); if (element == null) { return; } endparticipant2.appendChild(element); done.add(link.getEntity2()); } // } else if (fileFormat == FileFormat.XMI_STAR) { // if (link.getType().getDecor1() == LinkDecor.COMPOSITION) { // end2.setAttribute("aggregation", "composite"); // } // if (link.getType().getDecor1() == LinkDecor.AGREGATION) { // end2.setAttribute("aggregation", "aggregate"); // } // } end2.appendChild(endparticipant2); connection.appendChild(end2); association.appendChild(connection); ownedElement.appendChild(association); } private Element createEntityNodeRef(IEntity entity) { final Element cla = document.createElement("UML:Class"); cla.setAttribute("xmi.idref", entity.getUid()); return cla; } } plantuml-1.2017.15/src/net/sourceforge/plantuml/xmi/XmiClassDiagramStandard.java000066400000000000000000000045121312650303100275450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.xmi; import javax.xml.parsers.ParserConfigurationException; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.cucadiagram.IEntity; import org.w3c.dom.Element; public class XmiClassDiagramStandard extends XmiClassDiagramAbstract implements IXmiClassDiagram { public XmiClassDiagramStandard(ClassDiagram classDiagram) throws ParserConfigurationException { super(classDiagram); for (final IEntity ent : classDiagram.getLeafsvalues()) { // if (fileFormat == FileFormat.XMI_ARGO && isStandalone(ent) == false) { // continue; // } final Element cla = createEntityNode(ent); if (cla == null) { continue; } ownedElement.appendChild(cla); done.add(ent); } // if (fileFormat != FileFormat.XMI_STANDARD) { // for (final Link link : classDiagram.getLinks()) { // addLink(link); // } // } } // private boolean isStandalone(IEntity ent) { // for (final Link link : classDiagram.getLinks()) { // if (link.getEntity1() == ent || link.getEntity2() == ent) { // return false; // } // } // return true; // } } plantuml-1.2017.15/src/net/sourceforge/plantuml/xmi/XmiClassDiagramStar.java000066400000000000000000000142501312650303100267160ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.xmi; import javax.xml.parsers.ParserConfigurationException; import net.sourceforge.plantuml.classdiagram.ClassDiagram; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.utils.UniqueSequence; import org.w3c.dom.Element; public class XmiClassDiagramStar extends XmiClassDiagramAbstract implements IXmiClassDiagram { public XmiClassDiagramStar(ClassDiagram classDiagram) throws ParserConfigurationException { super(classDiagram); for (final IEntity ent : classDiagram.getLeafsvalues()) { // if (fileFormat == FileFormat.XMI_ARGO && isStandalone(ent) == false) { // continue; // } final Element cla = createEntityNode(ent); if (cla == null) { continue; } ownedElement.appendChild(cla); done.add(ent); } // if (fileFormat != FileFormat.XMI_STANDARD) { for (final Link link : classDiagram.getLinks()) { addLink(link); } // } } // private boolean isStandalone(IEntity ent) { // for (final Link link : classDiagram.getLinks()) { // if (link.getEntity1() == ent || link.getEntity2() == ent) { // return false; // } // } // return true; // } private void addLink(Link link) { final String assId = "ass" + UniqueSequence.getValue(); if (link.getType().getDecor1() == LinkDecor.EXTENDS || link.getType().getDecor2() == LinkDecor.EXTENDS) { addExtension(link, assId); return; } final Element association = document.createElement("UML:Association"); association.setAttribute("xmi.id", assId); association.setAttribute("namespace", CucaDiagramXmiMaker.getModel(classDiagram)); if (Display.isNull(link.getLabel()) == false) { association.setAttribute("name", forXMI(link.getLabel())); } final Element connection = document.createElement("UML:Association.connection"); final Element end1 = document.createElement("UML:AssociationEnd"); end1.setAttribute("xmi.id", "end" + UniqueSequence.getValue()); end1.setAttribute("association", assId); end1.setAttribute("type", link.getEntity1().getUid()); if (link.getQualifier1() != null) { end1.setAttribute("name", forXMI(link.getQualifier1())); } final Element endparticipant1 = document.createElement("UML:AssociationEnd.participant"); // if (fileFormat == FileFormat.XMI_ARGO) { // if (done.contains(link.getEntity1())) { // endparticipant1.appendChild(createEntityNodeRef(link.getEntity1())); // } else { // endparticipant1.appendChild(createEntityNode(link.getEntity1())); // done.add(link.getEntity1()); // } // } else if (fileFormat == FileFormat.XMI_STAR) { if (link.getType().getDecor2() == LinkDecor.COMPOSITION) { end1.setAttribute("aggregation", "composite"); } if (link.getType().getDecor2() == LinkDecor.AGREGATION) { end1.setAttribute("aggregation", "aggregate"); } // } end1.appendChild(endparticipant1); connection.appendChild(end1); final Element end2 = document.createElement("UML:AssociationEnd"); end2.setAttribute("xmi.id", "end" + UniqueSequence.getValue()); end2.setAttribute("association", assId); end2.setAttribute("type", link.getEntity2().getUid()); if (link.getQualifier2() != null) { end2.setAttribute("name", forXMI(link.getQualifier2())); } final Element endparticipant2 = document.createElement("UML:AssociationEnd.participant"); // if (fileFormat == FileFormat.XMI_ARGO) { // if (done.contains(link.getEntity2())) { // endparticipant2.appendChild(createEntityNodeRef(link.getEntity2())); // } else { // endparticipant2.appendChild(createEntityNode(link.getEntity2())); // done.add(link.getEntity2()); // } // } else if (fileFormat == FileFormat.XMI_STAR) { if (link.getType().getDecor1() == LinkDecor.COMPOSITION) { end2.setAttribute("aggregation", "composite"); } if (link.getType().getDecor1() == LinkDecor.AGREGATION) { end2.setAttribute("aggregation", "aggregate"); } // } end2.appendChild(endparticipant2); connection.appendChild(end2); association.appendChild(connection); ownedElement.appendChild(association); } private void addExtension(Link link, String assId) { final Element association = document.createElement("UML:Generalization"); association.setAttribute("xmi.id", assId); association.setAttribute("namespace", CucaDiagramXmiMaker.getModel(classDiagram)); if (link.getLabel() != null) { association.setAttribute("name", forXMI(link.getLabel())); } if (link.getType().getDecor1() == LinkDecor.EXTENDS) { association.setAttribute("child", link.getEntity1().getUid()); association.setAttribute("parent", link.getEntity2().getUid()); } else if (link.getType().getDecor2() == LinkDecor.EXTENDS) { association.setAttribute("child", link.getEntity2().getUid()); association.setAttribute("parent", link.getEntity1().getUid()); } else { throw new IllegalStateException(); } ownedElement.appendChild(association); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/xmi/XmiDescriptionDiagram.java000066400000000000000000000211161312650303100273010ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.xmi; import java.io.OutputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.OutputKeys; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupRoot; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.Member; import net.sourceforge.plantuml.descdiagram.DescriptionDiagram; import net.sourceforge.plantuml.utils.UniqueSequence; import net.sourceforge.plantuml.version.Version; import org.w3c.dom.Document; import org.w3c.dom.Element; public class XmiDescriptionDiagram implements IXmiClassDiagram { private final DescriptionDiagram diagram; private final Document document; private final Element ownedElement; public XmiDescriptionDiagram(DescriptionDiagram diagram) throws ParserConfigurationException { this.diagram = diagram; final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); final DocumentBuilder builder = factory.newDocumentBuilder(); this.document = builder.newDocument(); document.setXmlVersion("1.0"); document.setXmlStandalone(true); final Element xmi = document.createElement("XMI"); xmi.setAttribute("xmi.version", "1.1"); xmi.setAttribute("xmlns:UML", "href://org.omg/UML/1.3"); document.appendChild(xmi); final Element header = document.createElement("XMI.header"); xmi.appendChild(header); final Element metamodel = document.createElement("XMI.metamodel"); metamodel.setAttribute("xmi.name", "UML"); metamodel.setAttribute("xmi.version", "1.3"); header.appendChild(metamodel); final Element content = document.createElement("XMI.content"); xmi.appendChild(content); // final Element model = document.createElement("UML:Model"); model.setAttribute("xmi.id", CucaDiagramXmiMaker.getModel(diagram)); model.setAttribute("name", "PlantUML "+Version.versionString()); content.appendChild(model); // this.ownedElement = document.createElement("UML:Namespace.ownedElement"); model.appendChild(ownedElement); for (final IGroup gr : diagram.getGroups(false)) { if (gr.getParentContainer() instanceof GroupRoot) { addState(gr, ownedElement); } } for (final IEntity ent : diagram.getLeafsvalues()) { if (ent.getParentContainer() instanceof GroupRoot) { addState(ent, ownedElement); } } for (final Link link : diagram.getLinks()) { addLink(link); } } private void addState(final IEntity tobeAdded, Element container) { final Element elementState = createEntityNode(tobeAdded); container.appendChild(elementState); for (final IEntity ent : diagram.getGroups(false)) { if (ent.getParentContainer() == tobeAdded) { addState(ent, elementState); } } for (final IEntity ent : diagram.getLeafsvalues()) { if (ent.getParentContainer() == tobeAdded) { addState(ent, elementState); } } } public static String forXMI(String s) { return s.replace(':', ' '); } public static String forXMI(Display s) { return s.get(0).toString().replace(':', ' '); } private void addLink(Link link) { final String assId = "ass" + UniqueSequence.getValue(); final Element association = document.createElement("UML:Association"); association.setAttribute("xmi.id", assId); association.setAttribute("namespace", CucaDiagramXmiMaker.getModel(diagram)); if (Display.isNull(link.getLabel()) == false) { association.setAttribute("name", forXMI(link.getLabel())); } final Element connection = document.createElement("UML:Association.connection"); final Element end1 = document.createElement("UML:AssociationEnd"); end1.setAttribute("xmi.id", "end" + UniqueSequence.getValue()); end1.setAttribute("association", assId); end1.setAttribute("type", link.getEntity1().getUid()); if (link.getQualifier1() != null) { end1.setAttribute("name", forXMI(link.getQualifier1())); } final Element endparticipant1 = document.createElement("UML:AssociationEnd.participant"); if (link.getType().getDecor2() == LinkDecor.COMPOSITION) { end1.setAttribute("aggregation", "composite"); } if (link.getType().getDecor2() == LinkDecor.AGREGATION) { end1.setAttribute("aggregation", "aggregate"); } // } end1.appendChild(endparticipant1); connection.appendChild(end1); final Element end2 = document.createElement("UML:AssociationEnd"); end2.setAttribute("xmi.id", "end" + UniqueSequence.getValue()); end2.setAttribute("association", assId); end2.setAttribute("type", link.getEntity2().getUid()); if (link.getQualifier2() != null) { end2.setAttribute("name", forXMI(link.getQualifier2())); } final Element endparticipant2 = document.createElement("UML:AssociationEnd.participant"); if (link.getType().getDecor1() == LinkDecor.COMPOSITION) { end2.setAttribute("aggregation", "composite"); } if (link.getType().getDecor1() == LinkDecor.AGREGATION) { end2.setAttribute("aggregation", "aggregate"); } // } end2.appendChild(endparticipant2); connection.appendChild(end2); association.appendChild(connection); ownedElement.appendChild(association); } private Element createEntityNode(IEntity entity) { final Element cla = document.createElement("UML:Component"); cla.setAttribute("xmi.id", entity.getUid()); cla.setAttribute("name", entity.getDisplay().get(0).toString()); cla.setAttribute("namespace", CucaDiagramXmiMaker.getModel(diagram)); final Element feature = document.createElement("UML:Classifier.feature"); cla.appendChild(feature); for (Member m : entity.getBodier().getFieldsToDisplay()) { final Element attribute = document.createElement("UML:Attribute"); attribute.setAttribute("xmi.id", "att" + UniqueSequence.getValue()); attribute.setAttribute("name", m.getDisplay(false)); feature.appendChild(attribute); } for (Member m : entity.getBodier().getMethodsToDisplay()) { final Element operation = document.createElement("UML:Operation"); operation.setAttribute("xmi.id", "att" + UniqueSequence.getValue()); operation.setAttribute("name", m.getDisplay(false)); feature.appendChild(operation); } return cla; } public void transformerXml(OutputStream os) throws TransformerException, ParserConfigurationException { final Source source = new DOMSource(document); final Result resultat = new StreamResult(os); final TransformerFactory fabrique = TransformerFactory.newInstance(); final Transformer transformer = fabrique.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); // transformer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1"); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); // tf.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); transformer.transform(source, resultat); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/xmi/XmiStateDiagram.java000066400000000000000000000224271312650303100261040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.xmi; import java.io.OutputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.OutputKeys; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.GroupRoot; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.Member; import net.sourceforge.plantuml.statediagram.StateDiagram; import net.sourceforge.plantuml.utils.UniqueSequence; import net.sourceforge.plantuml.version.Version; import org.w3c.dom.Document; import org.w3c.dom.Element; public class XmiStateDiagram implements IXmiClassDiagram { private final StateDiagram diagram; private final Document document; private final Element ownedElement; public XmiStateDiagram(StateDiagram diagram) throws ParserConfigurationException { this.diagram = diagram; final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); final DocumentBuilder builder = factory.newDocumentBuilder(); this.document = builder.newDocument(); document.setXmlVersion("1.0"); document.setXmlStandalone(true); final Element xmi = document.createElement("XMI"); xmi.setAttribute("xmi.version", "1.1"); xmi.setAttribute("xmlns:UML", "href://org.omg/UML/1.3"); document.appendChild(xmi); final Element header = document.createElement("XMI.header"); xmi.appendChild(header); final Element metamodel = document.createElement("XMI.metamodel"); metamodel.setAttribute("xmi.name", "UML"); metamodel.setAttribute("xmi.version", "1.3"); header.appendChild(metamodel); final Element content = document.createElement("XMI.content"); xmi.appendChild(content); // final Element model = document.createElement("UML:Model"); model.setAttribute("xmi.id", CucaDiagramXmiMaker.getModel(diagram)); model.setAttribute("name", "PlantUML "+Version.versionString()); content.appendChild(model); // this.ownedElement = document.createElement("UML:Namespace.ownedElement"); model.appendChild(ownedElement); for (final IGroup gr : diagram.getGroups(false)) { if (gr.getParentContainer() instanceof GroupRoot) { addState(gr, ownedElement); } } for (final IEntity ent : diagram.getLeafsvalues()) { if (ent.getParentContainer() instanceof GroupRoot) { addState(ent, ownedElement); } } for (final Link link : diagram.getLinks()) { addLink(link); } } private void addState(final IEntity tobeAdded, Element container) { final Element elementState = createEntityNode(tobeAdded); container.appendChild(elementState); for (final IEntity ent : diagram.getGroups(false)) { if (ent.getParentContainer() == tobeAdded) { addState(ent, elementState); } } for (final IEntity ent : diagram.getLeafsvalues()) { if (ent.getParentContainer() == tobeAdded) { addState(ent, elementState); } } } public static String forXMI(String s) { return s.replace(':', ' '); } public static String forXMI(Display s) { return s.get(0).toString().replace(':', ' '); } private void addLink(Link link) { final String assId = "ass" + UniqueSequence.getValue(); final Element association = document.createElement("UML:Association"); association.setAttribute("xmi.id", assId); association.setAttribute("namespace", CucaDiagramXmiMaker.getModel(diagram)); if (Display.isNull(link.getLabel()) == false) { association.setAttribute("name", forXMI(link.getLabel())); } final Element connection = document.createElement("UML:Association.connection"); final Element end1 = document.createElement("UML:AssociationEnd"); end1.setAttribute("xmi.id", "end" + UniqueSequence.getValue()); end1.setAttribute("association", assId); end1.setAttribute("type", link.getEntity1().getUid()); if (link.getQualifier1() != null) { end1.setAttribute("name", forXMI(link.getQualifier1())); } final Element endparticipant1 = document.createElement("UML:AssociationEnd.participant"); if (link.getType().getDecor2() == LinkDecor.COMPOSITION) { end1.setAttribute("aggregation", "composite"); } if (link.getType().getDecor2() == LinkDecor.AGREGATION) { end1.setAttribute("aggregation", "aggregate"); } // } end1.appendChild(endparticipant1); connection.appendChild(end1); final Element end2 = document.createElement("UML:AssociationEnd"); end2.setAttribute("xmi.id", "end" + UniqueSequence.getValue()); end2.setAttribute("association", assId); end2.setAttribute("type", link.getEntity2().getUid()); if (link.getQualifier2() != null) { end2.setAttribute("name", forXMI(link.getQualifier2())); } final Element endparticipant2 = document.createElement("UML:AssociationEnd.participant"); if (link.getType().getDecor1() == LinkDecor.COMPOSITION) { end2.setAttribute("aggregation", "composite"); } if (link.getType().getDecor1() == LinkDecor.AGREGATION) { end2.setAttribute("aggregation", "aggregate"); } // } end2.appendChild(endparticipant2); connection.appendChild(end2); association.appendChild(connection); ownedElement.appendChild(association); } private Element createEntityNode(IEntity entity) { // final Element cla = document.createElement("UML:State"); cla.setAttribute("xmi.id", entity.getUid()); cla.setAttribute("name", entity.getDisplay().get(0).toString()); cla.setAttribute("namespace", CucaDiagramXmiMaker.getModel(diagram)); final Element feature = document.createElement("UML:Classifier.feature"); cla.appendChild(feature); for (Member m : entity.getBodier().getFieldsToDisplay()) { // final Element attribute = document.createElement("UML:Attribute"); attribute.setAttribute("xmi.id", "att" + UniqueSequence.getValue()); attribute.setAttribute("name", m.getDisplay(false)); feature.appendChild(attribute); } for (Member m : entity.getBodier().getMethodsToDisplay()) { // final Element operation = document.createElement("UML:Operation"); operation.setAttribute("xmi.id", "att" + UniqueSequence.getValue()); operation.setAttribute("name", m.getDisplay(false)); feature.appendChild(operation); } return cla; } public void transformerXml(OutputStream os) throws TransformerException, ParserConfigurationException { final Source source = new DOMSource(document); final Result resultat = new StreamResult(os); final TransformerFactory fabrique = TransformerFactory.newInstance(); final Transformer transformer = fabrique.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); // transformer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1"); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); // tf.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); transformer.transform(source, resultat); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/xmlsc/000077500000000000000000000000001312650303100225405ustar00rootroot00000000000000plantuml-1.2017.15/src/net/sourceforge/plantuml/xmlsc/ScxmlStateDiagramStandard.java000066400000000000000000000107311312650303100304420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.xmlsc; import java.io.OutputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.OutputKeys; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.statediagram.StateDiagram; import org.w3c.dom.Document; import org.w3c.dom.Element; public class ScxmlStateDiagramStandard { private final StateDiagram diagram; private final Document document; public ScxmlStateDiagramStandard(StateDiagram diagram) throws ParserConfigurationException { this.diagram = diagram; final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); final DocumentBuilder builder = factory.newDocumentBuilder(); this.document = builder.newDocument(); document.setXmlVersion("1.0"); document.setXmlStandalone(true); final Element scxml = document.createElement("scxml"); scxml.setAttribute("xmlns", "http://www.w3.org/2005/07/scxml"); scxml.setAttribute("version", "1.0"); final String initial = getInitial(); if (initial != null) { scxml.setAttribute("initial", initial); } document.appendChild(scxml); for (final IEntity ent : diagram.getLeafsvalues()) { scxml.appendChild(createState(ent)); } } private String getInitial() { for (final IEntity ent : diagram.getLeafsvalues()) { if (ent.getLeafType() == LeafType.CIRCLE_START) { return getId(ent); } } return null; } private Element createState(IEntity entity) { final Element state = document.createElement("state"); state.setAttribute("id", getId(entity)); for (final Link link : diagram.getLinks()) { if (link.getEntity1() == entity) { addLink(state, link); } } return state; } private void addLink(Element state, Link link) { final Element transition = document.createElement("transition"); final Display label = link.getLabel(); if (Display.isNull(label) == false) { final String event = label.get(0).toString(); transition.setAttribute("event", event); } transition.setAttribute("target", getId(link.getEntity2())); state.appendChild(transition); } private String getId(IEntity entity) { String result = entity.getDisplay().get(0).toString(); result = result.replaceAll("\\*", ""); return result; } public void transformerXml(OutputStream os) throws TransformerException, ParserConfigurationException { final Source source = new DOMSource(document); final Result resultat = new StreamResult(os); final TransformerFactory fabrique = TransformerFactory.newInstance(); final Transformer transformer = fabrique.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); transformer.transform(source, resultat); } } plantuml-1.2017.15/src/net/sourceforge/plantuml/xmlsc/StateDiagramScxmlMaker.java000066400000000000000000000042341312650303100277420ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.xmlsc; import java.io.IOException; import java.io.OutputStream; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.statediagram.StateDiagram; public final class StateDiagramScxmlMaker { private final StateDiagram diagram; public StateDiagramScxmlMaker(StateDiagram diagram) throws IOException { this.diagram = diagram; } public void createFiles(OutputStream fos) throws IOException { try { final ScxmlStateDiagramStandard xmi; xmi = new ScxmlStateDiagramStandard(diagram); xmi.transformerXml(fos); } catch (ParserConfigurationException e) { Log.error(e.toString()); e.printStackTrace(); throw new IOException(e.toString()); } catch (TransformerException e) { Log.error(e.toString()); e.printStackTrace(); throw new IOException(e.toString()); } } } plantuml-1.2017.15/src/org/000077500000000000000000000000001312650303100152345ustar00rootroot00000000000000plantuml-1.2017.15/src/org/stathissideris/000077500000000000000000000000001312650303100202765ustar00rootroot00000000000000plantuml-1.2017.15/src/org/stathissideris/ascii2image/000077500000000000000000000000001312650303100224535ustar00rootroot00000000000000plantuml-1.2017.15/src/org/stathissideris/ascii2image/core/000077500000000000000000000000001312650303100234035ustar00rootroot00000000000000plantuml-1.2017.15/src/org/stathissideris/ascii2image/core/ConfigurationParser.java000066400000000000000000000143011312650303100302310ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.core; import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.HashMap; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.stathissideris.ascii2image.graphics.CustomShapeDefinition; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; public class ConfigurationParser { private static final boolean DEBUG = false; private static final String INLCUDE_TAG_NAME = "include"; private static final String SHAPE_TAG_NAME = "shape"; private static final String SHAPE_GROUP_TAG_NAME = "shapes"; private String currentDir = ""; private File configFile; private HashMap shapeDefinitions = new HashMap(); public Collection getShapeDefinitions() { return shapeDefinitions.values(); } public HashMap getShapeDefinitionsHash() { return shapeDefinitions; } public void parseFile(File file) throws ParserConfigurationException, SAXException, IOException { configFile = file; DefaultHandler handler = new XMLHandler(); // Use the default (non-validating) parser SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser saxParser = factory.newSAXParser(); saxParser.parse(file, handler); } private class XMLHandler extends DefaultHandler{ public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if(qName.equals(SHAPE_GROUP_TAG_NAME)){ if(attributes.getLength() == 1){ currentDir = attributes.getValue(0).trim(); if(currentDir.equals("")) currentDir = configFile.getParentFile().getAbsolutePath(); } else { //the dir that contains the config file: currentDir = configFile.getParentFile().getAbsolutePath(); } } if(qName.equals(SHAPE_TAG_NAME)){ CustomShapeDefinition definition = new CustomShapeDefinition(); int len = attributes.getLength(); for(int i = 0; i < len; i++){ String name = attributes.getQName(i); String value = attributes.getValue(i); if(name.equals("tag")){ definition.setTag(value); } else if(name.equals("stretch")){ definition.setStretches(getBooleanFromAttributeValue(value)); } else if(name.equals("border")){ definition.setHasBorder(getBooleanFromAttributeValue(value)); } else if(name.equals("shadow")){ definition.setDropsShadow(getBooleanFromAttributeValue(value)); } else if(name.equals("comment")){ definition.setComment(value); } else if(name.equals("filename")){ File file = new File(value); if(file.isAbsolute()){ definition.setFilename(value); } else { //relative to the location of the config file or to the group's base dir definition.setFilename(createFilename(currentDir, value)); } } } if(shapeDefinitions.containsKey(definition.getTag())){ CustomShapeDefinition oldDef = shapeDefinitions.get(definition.getTag()); System.err.println( "*** Warning: shape \""+oldDef.getTag()+"\" (file: " +oldDef.getFilename()+") has been redefined as file: " +definition.getFilename() ); } File file = new File(definition.getFilename()); if(file.exists()){ shapeDefinitions.put(definition.getTag(), definition); if(DEBUG) System.out.println(definition); } else { System.err.println("File "+file+" does not exist, skipping tag "+definition.getTag()); } } if(qName.equals(INLCUDE_TAG_NAME)){ if(attributes.getLength() == 1){ File includedFile = new File(attributes.getValue(0).trim()); if(!includedFile.isAbsolute()){ includedFile = new File( createFilename( configFile.getParentFile().getAbsolutePath(), includedFile.getPath())); } if(!includedFile.exists()){ System.err.println("Included file "+includedFile+" does not exist, skipping"); return; } ConfigurationParser configParser = new ConfigurationParser(); try { configParser.parseFile(includedFile); } catch (ParserConfigurationException e) { e.printStackTrace(); } catch (SAXException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } HashMap shapes = configParser.getShapeDefinitionsHash(); shapeDefinitions.putAll(shapes); } } } } private String createFilename(String baseDir, String filename){ if(baseDir == null || baseDir.trim().equals("")){ return filename; } if(baseDir.endsWith(File.separator)){ return baseDir + filename; } return baseDir + File.separator + filename; } private boolean getBooleanFromAttributeValue(String value){ value = value.toLowerCase(); if("no".equals(value)) return false; if("false".equals(value)) return false; if("yes".equals(value)) return true; if("true".equals(value)) return true; throw new IllegalArgumentException("value "+value+" cannot be interpreted as a boolean"); } public static void main(String argv[]) throws ParserConfigurationException, SAXException, IOException { ConfigurationParser parser = new ConfigurationParser(); parser.parseFile(new File("config.xml")); parser.getShapeDefinitions(); } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/core/ConversionOptions.java000066400000000000000000000131541312650303100277530ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.core; /** * * @author Efstathios Sideris */ public class ConversionOptions { // public ProcessingOptions processingOptions = // new ProcessingOptions(); public RenderingOptions renderingOptions = new RenderingOptions(); public void setDebug(boolean value){ // processingOptions.setPrintDebugOutput(value); renderingOptions.setRenderDebugLines(value); } public ConversionOptions(){} public void setDropShadows(boolean dropShadows) { renderingOptions.setDropShadows(dropShadows); } // public ConversionOptions(CommandLine cmdLine) throws UnsupportedEncodingException{ // // processingOptions.setVerbose(cmdLine.hasOption("verbose")); // renderingOptions.setDropShadows(!cmdLine.hasOption("no-shadows")); // this.setDebug(cmdLine.hasOption("debug")); // processingOptions.setOverwriteFiles(cmdLine.hasOption("overwrite")); // // if(cmdLine.hasOption("scale")){ // Float scale = Float.parseFloat(cmdLine.getOptionValue("scale")); // renderingOptions.setScale(scale.floatValue()); // } // // processingOptions.setAllCornersAreRound(cmdLine.hasOption("round-corners")); // processingOptions.setPerformSeparationOfCommonEdges(!cmdLine.hasOption("no-separation")); // renderingOptions.setAntialias(!cmdLine.hasOption("no-antialias")); // // // // if(cmdLine.hasOption("tabs")){ // Integer tabSize = Integer.parseInt(cmdLine.getOptionValue("tabs")); // int tabSizeValue = tabSize.intValue(); // if(tabSizeValue < 0) tabSizeValue = 0; // processingOptions.setTabSize(tabSizeValue); // } // // String encoding = (String) cmdLine.getOptionValue("encoding"); // if(encoding != null){ // new String(new byte[2], encoding); // processingOptions.setCharacterEncoding(encoding); // } // // ConfigurationParser configParser = new ConfigurationParser(); // try { // for (Option curOption : cmdLine.getOptions()) { // if(curOption.getLongOpt().equals("config")) { // String configFilename = curOption.getValue(); // System.out.println("Parsing configuration file "+configFilename); // File file = new File(configFilename); // if(file.exists()){ // configParser.parseFile(file); // HashMap shapes = configParser.getShapeDefinitionsHash(); // processingOptions.putAllInCustomShapes(shapes); // } else { // System.err.println("File "+file+" does not exist, skipping"); // } // } // } // } catch (ParserConfigurationException e) { // // TODO Auto-generated catch block // e.printStackTrace(); // } catch (SAXException e) { // // TODO Auto-generated catch block // e.printStackTrace(); // } catch (IOException e) { // // TODO Auto-generated catch block // e.printStackTrace(); // } // } } // may be supported at a later date: //String exportFormat = (String) cmdLine.getOptionValue("format"); //if(exportFormat != null){ // exportFormat = exportFormat.toLowerCase(); // if(exportFormat == "jpeg" || exportFormat == "jpg"){ // processingOptions.setExportFormat(ProcessingOptions.FORMAT_JPEG); // } else if(exportFormat == "png"){ // processingOptions.setExportFormat(ProcessingOptions.FORMAT_PNG); // } else if(exportFormat == "gif"){ // processingOptions.setExportFormat(ProcessingOptions.FORMAT_GIF); // } //} // //String colorCodeMode = (String) cmdLine.getOptionValue("color-codes"); //if(colorCodeMode != null){ // if(colorCodeMode.equals("use")) // processingOptions.setColorCodesProcessingMode(ProcessingOptions.USE_COLOR_CODES); // else if(colorCodeMode.equals("ignore")) // processingOptions.setColorCodesProcessingMode(ProcessingOptions.IGNORE_COLOR_CODES); // else if(colorCodeMode.equals("render")) // processingOptions.setColorCodesProcessingMode(ProcessingOptions.RENDER_COLOR_CODES); //} // //String tagsMode = (String) cmdLine.getOptionValue("tags"); //if(tagsMode != null){ // if(tagsMode.equals("use")) // processingOptions.setTagProcessingMode(ProcessingOptions.USE_TAGS); // else if(tagsMode.equals("ignore")) // processingOptions.setTagProcessingMode(ProcessingOptions.IGNORE_TAGS); // else if(tagsMode.equals("render")) // processingOptions.setTagProcessingMode(ProcessingOptions.RENDER_TAGS); //} // // //String markupMode = (String) cmdLine.getOptionValue("markup"); //if(markupMode != null){ // if(markupMode.equals("use")){ // processingOptions.setColorCodesProcessingMode(ProcessingOptions.USE_COLOR_CODES); // processingOptions.setTagProcessingMode(ProcessingOptions.USE_TAGS); // } else if(markupMode.equals("ignore")){ // processingOptions.setColorCodesProcessingMode(ProcessingOptions.IGNORE_COLOR_CODES); // processingOptions.setTagProcessingMode(ProcessingOptions.IGNORE_TAGS); // } else if(markupMode.equals("render")){ // processingOptions.setColorCodesProcessingMode(ProcessingOptions.RENDER_COLOR_CODES); // processingOptions.setTagProcessingMode(ProcessingOptions.RENDER_TAGS); // } //}plantuml-1.2017.15/src/org/stathissideris/ascii2image/core/DebugUtils.java000066400000000000000000000002661312650303100263210ustar00rootroot00000000000000package org.stathissideris.ascii2image.core; public class DebugUtils { public static int getLineNumber() { return Thread.currentThread().getStackTrace()[2].getLineNumber(); } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/core/DocBookConverter.java000066400000000000000000000041421312650303100274570ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.core; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.XMLReader; import org.xml.sax.helpers.DefaultHandler; import org.xml.sax.helpers.XMLReaderFactory; // using SAX public class DocBookConverter { class HowToHandler extends DefaultHandler { boolean title = false; boolean url = false; public void startElement( String nsURI, String strippedName, String tagName, Attributes attributes) throws SAXException { if (tagName.equalsIgnoreCase("title")) title = true; if (tagName.equalsIgnoreCase("url")) url = true; } public void characters(char[] ch, int start, int length) { if (title) { System.out.println("Title: " + new String(ch, start, length)); title = false; } else if (url) { System.out.println("Url: " + new String(ch, start,length)); url = false; } } } public void list( ) throws Exception { XMLReader parser = XMLReaderFactory.createXMLReader ("org.apache.crimson.parser.XMLReaderImpl"); parser.setContentHandler(new HowToHandler( )); parser.parse("howto.xml"); } public static void main(String[] args) throws Exception { new DocBookConverter().list( ); } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/core/FileUtils.java000066400000000000000000000104711312650303100261510ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.core; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; /** * * @author Efstathios Sideris */ public class FileUtils { //private static final public static String makeTargetPathname(String sourcePathname, String extension, boolean overwrite){ return makeTargetPathname(sourcePathname, extension, "", overwrite); } public static String makeTargetPathname(String sourcePathname, String extension, String postfix, boolean overwrite){ File sourceFile = new File(sourcePathname); String path = ""; if(sourceFile.getParentFile() != null){ path = sourceFile.getParentFile().getAbsolutePath(); if(!path.endsWith(File.separator)) path += File.separator; } String baseName = getBaseName(sourceFile.getName()); String targetName = path + baseName + postfix + "." + extension; if(new File(targetName).exists() && !overwrite) targetName = makeAlternativePathname(targetName); return targetName; } public static String makeAlternativePathname(String pathName){ int limit = 100; for(int i = 2; i <= limit; i++){ String alternative = getBaseName(pathName)+"_"+i; String extension = getExtension(pathName); if(extension != null) alternative += "."+extension; if(!(new File(alternative).exists())) return alternative; } return null; } public static String getExtension(String pathName){ if(pathName.lastIndexOf('.') == -1) return null; return pathName.substring(pathName.lastIndexOf('.') + 1); } public static String getBaseName(String pathName){ if(pathName.lastIndexOf('.') == -1) return pathName; return pathName.substring(0, pathName.lastIndexOf('.')); } public static String readFile(File file) throws IOException { return readFile(file, null); } public static String readFile(File file, String encoding) throws IOException { InputStream is = new FileInputStream(file); long length = file.length(); if (length > Integer.MAX_VALUE) { // File is too large // TODO: we need some feedback for the case of the file being too large } // Create the byte array to hold the data byte[] bytes = new byte[(int)length]; // Read in the bytes int offset = 0; int numRead = 0; while (offset < bytes.length && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) { offset += numRead; } // Ensure all the bytes have been read in if (offset < bytes.length) { throw new IOException("Could not completely read file "+file.getName()); } // Close the input stream and return bytes is.close(); if(encoding == null){ return new String(bytes); } else { return new String(bytes, encoding); } } public static void main(String[] args){ System.out.println(makeTargetPathname("C:\\Files\\papar.txt", "jpg", false)); System.out.println(makeTargetPathname("C:\\Files\\papar", "jpg", false)); System.out.println(makeTargetPathname("papar.txt", "jpg", false)); System.out.println(makeTargetPathname("/home/sideris/tsourekia/papar.txt", "jpg", false)); System.out.println(makeTargetPathname("D:\\diagram.max", "jpg", false)); System.out.println(makeAlternativePathname("C:\\Files\\papar.txt")); System.out.println(makeAlternativePathname("C:\\Files\\papar")); System.out.println(getExtension("pipi.jpeg")); System.out.println(getExtension("pipi")); } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/core/Pair.java000066400000000000000000000003011312650303100251330ustar00rootroot00000000000000package org.stathissideris.ascii2image.core; public class Pair { public T first; public K second; public Pair(T first, K second) { this.first = first; this.second = second; } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/core/ProcessingOptions.java000066400000000000000000000113071312650303100277400ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.core; import java.util.HashMap; import org.stathissideris.ascii2image.graphics.CustomShapeDefinition; /** * @author Efstathios Sideris * */ public class ProcessingOptions { private HashMap customShapes = new HashMap(); private boolean beVerbose = false; private boolean printDebugOutput = false; private boolean overwriteFiles = false; private boolean performSeparationOfCommonEdges = true; private boolean allCornersAreRound = false; public static final int USE_TAGS = 0; public static final int RENDER_TAGS = 1; public static final int IGNORE_TAGS = 2; private int tagProcessingMode = USE_TAGS; public static final int USE_COLOR_CODES = 0; public static final int RENDER_COLOR_CODES = 1; public static final int IGNORE_COLOR_CODES = 2; private int colorCodesProcessingMode = USE_COLOR_CODES; public static final int FORMAT_JPEG = 0; public static final int FORMAT_PNG = 1; public static final int FORMAT_GIF = 2; private int exportFormat = FORMAT_PNG; public static final int DEFAULT_TAB_SIZE = 8; private int tabSize = DEFAULT_TAB_SIZE; private String inputFilename; private String outputFilename; private String characterEncoding = null; /** * @return */ public boolean areAllCornersRound() { return allCornersAreRound; } /** * @return */ public int getColorCodesProcessingMode() { return colorCodesProcessingMode; } /** * @return */ public int getExportFormat() { return exportFormat; } /** * @return */ public boolean performSeparationOfCommonEdges() { return performSeparationOfCommonEdges; } /** * @return */ public int getTagProcessingMode() { return tagProcessingMode; } /** * @param b */ public void setAllCornersAreRound(boolean b) { allCornersAreRound = b; } /** * @param i */ public void setColorCodesProcessingMode(int i) { colorCodesProcessingMode = i; } /** * @param i */ public void setExportFormat(int i) { exportFormat = i; } /** * @param b */ public void setPerformSeparationOfCommonEdges(boolean b) { performSeparationOfCommonEdges = b; } /** * @param i */ public void setTagProcessingMode(int i) { tagProcessingMode = i; } /** * @return */ public String getInputFilename() { return inputFilename; } /** * @return */ public String getOutputFilename() { return outputFilename; } /** * @param string */ public void setInputFilename(String string) { inputFilename = string; } /** * @param string */ public void setOutputFilename(String string) { outputFilename = string; } /** * @return */ public boolean verbose() { return beVerbose; } /** * @return */ public boolean printDebugOutput() { return printDebugOutput; } /** * @param b */ public void setVerbose(boolean b) { beVerbose = b; } /** * @param b */ public void setPrintDebugOutput(boolean b) { printDebugOutput = b; } /** * @return */ public boolean overwriteFiles() { return overwriteFiles; } /** * @param b */ public void setOverwriteFiles(boolean b) { overwriteFiles = b; } /** * @return */ public int getTabSize() { return tabSize; } /** * @param i */ public void setTabSize(int i) { tabSize = i; } public String getCharacterEncoding() { return characterEncoding; } public void setCharacterEncoding(String characterEncoding) { this.characterEncoding = characterEncoding; } public HashMap getCustomShapes() { return customShapes; } public void setCustomShapes(HashMap customShapes) { this.customShapes = customShapes; } public void putAllInCustomShapes(HashMap customShapes) { this.customShapes.putAll(customShapes); } public CustomShapeDefinition getFromCustomShapes(String tagName){ return customShapes.get(tagName); } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/core/RenderingOptions.java000066400000000000000000000041621312650303100275420ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.core; import java.util.HashMap; import org.stathissideris.ascii2image.graphics.CustomShapeDefinition; /** * * @author Efstathios Sideris */ public class RenderingOptions { private HashMap customShapes; private boolean dropShadows = true; private boolean renderDebugLines = false; private boolean antialias = true; private int cellWidth = 10; private int cellHeight = 14; private float scale = 1; /** * @return */ public int getCellHeight() { return cellHeight; } /** * @return */ public int getCellWidth() { return cellWidth; } /** * @return */ public boolean dropShadows() { return dropShadows; } /** * @return */ public boolean renderDebugLines() { return renderDebugLines; } /** * @return */ public float getScale() { return scale; } /** * @param b */ public void setDropShadows(boolean b) { dropShadows = b; } /** * @param b */ public void setRenderDebugLines(boolean b) { renderDebugLines = b; } /** * @param f */ public void setScale(float f) { scale = f; cellWidth *= scale; cellHeight *= scale; } /** * @return */ public boolean performAntialias() { return antialias; } /** * @param b */ public void setAntialias(boolean b) { antialias = b; } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/core/Shape3DOrderingComparator.java000066400000000000000000000031751312650303100312250ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.core; import java.util.Comparator; import org.stathissideris.ascii2image.graphics.DiagramShape; /** * * @author Efstathios Sideris */ public class Shape3DOrderingComparator implements Comparator { /** * Puts diagram shapes in pseudo-3d order starting from back to front * */ public int compare(Object object1, Object object2) { if(!(object1 instanceof DiagramShape) || !(object2 instanceof DiagramShape)) throw new RuntimeException("This comparator can only compare DiagramShapeS"); DiagramShape shape1 = (DiagramShape) object1; DiagramShape shape2 = (DiagramShape) object2; double y1 = shape1.makeIntoPath().getBounds().getCenterY(); double y2 = shape2.makeIntoPath().getBounds().getCenterY(); if(y1 > y2) return -1; if(y1 < y2) return 1; return 0; } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/graphics/000077500000000000000000000000001312650303100242535ustar00rootroot00000000000000plantuml-1.2017.15/src/org/stathissideris/ascii2image/graphics/BitmapRenderer.java000066400000000000000000000355321312650303100300310ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.graphics; import java.awt.BasicStroke; import java.awt.Canvas; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Rectangle; import java.awt.RenderingHints; import java.awt.Stroke; import java.awt.geom.AffineTransform; import java.awt.geom.GeneralPath; import java.awt.image.BufferedImage; import java.awt.image.ConvolveOp; import java.awt.image.Kernel; import java.awt.image.RenderedImage; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import javax.imageio.ImageIO; import org.stathissideris.ascii2image.core.RenderingOptions; import org.stathissideris.ascii2image.core.Shape3DOrderingComparator; /** * * @author Efstathios Sideris */ public class BitmapRenderer { private static final boolean DEBUG = false; private static final String IDREGEX = "^.+_vfill$"; Stroke normalStroke; Stroke dashStroke; // public static void main(String[] args) throws Exception { // // // long startTime = System.currentTimeMillis(); // // ConversionOptions options = new ConversionOptions(); // // TextGrid grid = new TextGrid(); // // String filename = "dak_orgstruktur_vs_be.ditaa.OutOfMemoryError.edit.txt"; // // grid.loadFrom("tests/text/"+filename); // // Diagram diagram = new Diagram(grid, options); // new BitmapRenderer().renderToPNG(diagram, "tests/images/"+filename+".png", options.renderingOptions); // long endTime = System.currentTimeMillis(); // long totalTime = (endTime - startTime) / 1000; // System.out.println("Done in "+totalTime+"sec"); // // File workDir = new File("tests/images"); // //Process p = Runtime.getRuntime().exec("display "+filename+".png", null, workDir); // } private boolean renderToPNG(Diagram diagram, String filename, RenderingOptions options){ RenderedImage image = renderToImage(diagram, options); try { File file = new File(filename); ImageIO.write(image, "png", file); } catch (IOException e) { //e.printStackTrace(); System.err.println("Error: Cannot write to file "+filename); return false; } return true; } public RenderedImage renderToImage(Diagram diagram, RenderingOptions options){ BufferedImage image = new BufferedImage( diagram.getWidth(), diagram.getHeight(), BufferedImage.TYPE_INT_RGB); return render(diagram, image, options); } public RenderedImage render(Diagram diagram, BufferedImage image, RenderingOptions options){ RenderedImage renderedImage = image; Graphics2D g2 = image.createGraphics(); Object antialiasSetting = RenderingHints.VALUE_ANTIALIAS_OFF; if(options.performAntialias()) antialiasSetting = RenderingHints.VALUE_ANTIALIAS_ON; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, antialiasSetting); g2.setColor(Color.white); //TODO: find out why the next line does not work g2.fillRect(0, 0, image.getWidth()+10, image.getHeight()+10); /*for(int y = 0; y < diagram.getHeight(); y ++) g2.drawLine(0, y, diagram.getWidth(), y);*/ g2.setStroke(new BasicStroke(1, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_ROUND)); ArrayList shapes = diagram.getAllDiagramShapes(); if(DEBUG) System.out.println("Rendering "+shapes.size()+" shapes (groups flattened)"); Iterator shapesIt; if(options.dropShadows()){ //render shadows shapesIt = shapes.iterator(); while(shapesIt.hasNext()){ DiagramShape shape = (DiagramShape) shapesIt.next(); if(shape.getPoints().isEmpty()) continue; //GeneralPath path = shape.makeIntoPath(); GeneralPath path; path = shape.makeIntoRenderPath(diagram); float offset = diagram.getMinimumOfCellDimension() / 3.333f; if(path != null && shape.dropsShadow() && shape.getType() != DiagramShape.TYPE_CUSTOM){ GeneralPath shadow = new GeneralPath(path); AffineTransform translate = new AffineTransform(); translate.setToTranslation(offset, offset); shadow.transform(translate); g2.setColor(new Color(150,150,150)); g2.fill(shadow); } } //blur shadows if(true) { int blurRadius = 6; int blurRadius2 = blurRadius * blurRadius; float blurRadius2F = blurRadius2; float weight = 1.0f / blurRadius2F; float[] elements = new float[blurRadius2]; for (int k = 0; k < blurRadius2; k++) elements[k] = weight; Kernel myKernel = new Kernel(blurRadius, blurRadius, elements); //if EDGE_NO_OP is not selected, EDGE_ZERO_FILL is the default which creates a black border ConvolveOp simpleBlur = new ConvolveOp(myKernel, ConvolveOp.EDGE_NO_OP, null); BufferedImage destination = new BufferedImage( image.getWidth(), image.getHeight(), image.getType()); simpleBlur.filter(image, (BufferedImage) destination); //destination = destination.getSubimage(blurRadius/2, blurRadius/2, image.getWidth(), image.getHeight()); g2 = (Graphics2D) destination.getGraphics(); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, antialiasSetting); renderedImage = (RenderedImage) destination; } } //fill and stroke float dashInterval = Math.min(diagram.getCellWidth(), diagram.getCellHeight()) / 2; //Stroke normalStroke = g2.getStroke(); float strokeWeight = diagram.getMinimumOfCellDimension() / 10; normalStroke = new BasicStroke( strokeWeight, //10, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND ); dashStroke = new BasicStroke( strokeWeight, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND, 0, new float[] {dashInterval}, 0 ); //TODO: at this stage we should draw the open shapes first in order to make sure they are at the bottom (this is useful for the {mo} shape) //find storage shapes ArrayList storageShapes = new ArrayList(); shapesIt = shapes.iterator(); while(shapesIt.hasNext()){ DiagramShape shape = (DiagramShape) shapesIt.next(); if(shape.getType() == DiagramShape.TYPE_STORAGE) { storageShapes.add(shape); continue; } } //render storage shapes //special case since they are '3d' and should be //rendered bottom to top //TODO: known bug: if a storage object is within a bigger normal box, it will be overwritten in the main drawing loop //(BUT this is not possible since tags are applied to all shapes overlaping shapes) Collections.sort(storageShapes, new Shape3DOrderingComparator()); g2.setStroke(normalStroke); shapesIt = storageShapes.iterator(); while(shapesIt.hasNext()){ DiagramShape shape = (DiagramShape) shapesIt.next(); GeneralPath path; path = shape.makeIntoRenderPath(diagram); if(!shape.isStrokeDashed()) { if(shape.getFillColor() != null) g2.setColor(shape.getFillColor()); else g2.setColor(Color.white); g2.fill(path); } if(shape.isStrokeDashed()) g2.setStroke(dashStroke); else g2.setStroke(normalStroke); g2.setColor(shape.getStrokeColor()); g2.draw(path); } //render the rest of the shapes ArrayList pointMarkers = new ArrayList(); shapesIt = shapes.iterator(); while(shapesIt.hasNext()){ DiagramShape shape = (DiagramShape) shapesIt.next(); if(shape.getType() == DiagramShape.TYPE_POINT_MARKER) { pointMarkers.add(shape); continue; } if(shape.getType() == DiagramShape.TYPE_STORAGE) { continue; } if(shape.getType() == DiagramShape.TYPE_CUSTOM){ renderCustomShape(shape, g2); continue; } if(shape.getPoints().isEmpty()) continue; int size = shape.getPoints().size(); GeneralPath path; path = shape.makeIntoRenderPath(diagram); //fill if(path != null && shape.isClosed() && !shape.isStrokeDashed()){ if(shape.getFillColor() != null) g2.setColor(shape.getFillColor()); else g2.setColor(Color.white); g2.fill(path); } //draw if(shape.getType() != DiagramShape.TYPE_ARROWHEAD){ g2.setColor(shape.getStrokeColor()); if(shape.isStrokeDashed()) g2.setStroke(dashStroke); else g2.setStroke(normalStroke); g2.draw(path); } } //render point markers g2.setStroke(normalStroke); shapesIt = pointMarkers.iterator(); while(shapesIt.hasNext()){ DiagramShape shape = (DiagramShape) shapesIt.next(); //if(shape.getType() != DiagramShape.TYPE_POINT_MARKER) continue; GeneralPath path; path = shape.makeIntoRenderPath(diagram); g2.setColor(Color.white); g2.fill(path); g2.setColor(shape.getStrokeColor()); g2.draw(path); } //handle text //g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); //renderTextLayer(diagram.getTextObjects().iterator()); Iterator textIt = diagram.getTextObjects().iterator(); while(textIt.hasNext()){ DiagramText text = (DiagramText) textIt.next(); g2.setFont(text.getFont()); if(text.hasOutline()){ g2.setColor(text.getOutlineColor()); g2.drawString(text.getText(), text.getXPos() + 1, text.getYPos()); g2.drawString(text.getText(), text.getXPos() - 1, text.getYPos()); g2.drawString(text.getText(), text.getXPos(), text.getYPos() + 1); g2.drawString(text.getText(), text.getXPos(), text.getYPos() - 1); } g2.setColor(text.getColor()); g2.drawString(text.getText(), text.getXPos(), text.getYPos()); } if(options.renderDebugLines() || DEBUG){ Stroke debugStroke = new BasicStroke( 1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND ); g2.setStroke(debugStroke); g2.setColor(new Color(170, 170, 170)); g2.setXORMode(Color.white); for(int x = 0; x < diagram.getWidth(); x += diagram.getCellWidth()) g2.drawLine(x, 0, x, diagram.getHeight()); for(int y = 0; y < diagram.getHeight(); y += diagram.getCellHeight()) g2.drawLine(0, y, diagram.getWidth(), y); } g2.dispose(); return renderedImage; } private RenderedImage renderTextLayer(ArrayList textObjects, int width, int height){ TextCanvas canvas = new TextCanvas(textObjects); Image image = canvas.createImage(width, height); Graphics g = image.getGraphics(); canvas.paint(g); return (RenderedImage) image; } private class TextCanvas extends Canvas { ArrayList textObjects; public TextCanvas(ArrayList textObjects){ this.textObjects = textObjects; } public void paint(Graphics g){ Graphics g2 = (Graphics2D) g; Iterator textIt = textObjects.iterator(); while(textIt.hasNext()){ DiagramText text = (DiagramText) textIt.next(); g2.setFont(text.getFont()); if(text.hasOutline()){ g2.setColor(text.getOutlineColor()); g2.drawString(text.getText(), text.getXPos() + 1, text.getYPos()); g2.drawString(text.getText(), text.getXPos() - 1, text.getYPos()); g2.drawString(text.getText(), text.getXPos(), text.getYPos() + 1); g2.drawString(text.getText(), text.getXPos(), text.getYPos() - 1); } g2.setColor(text.getColor()); g2.drawString(text.getText(), text.getXPos(), text.getYPos()); } } } private void renderCustomShape(DiagramShape shape, Graphics2D g2){ CustomShapeDefinition definition = shape.getDefinition(); Rectangle bounds = shape.getBounds(); if(definition.hasBorder()){ g2.setColor(shape.getStrokeColor()); if(shape.isStrokeDashed()) g2.setStroke(dashStroke); else g2.setStroke(normalStroke); g2.drawLine(bounds.x, bounds.y, bounds.x + bounds.width, bounds.y); g2.drawLine(bounds.x + bounds.width, bounds.y, bounds.x + bounds.width, bounds.y + bounds.height); g2.drawLine(bounds.x, bounds.y + bounds.height, bounds.x + bounds.width, bounds.y + bounds.height); g2.drawLine(bounds.x, bounds.y, bounds.x, bounds.y + bounds.height); // g2.drawRect(bounds.x, bounds.y, bounds.width, bounds.height); //looks different! } //TODO: custom shape distintion relies on filename extension. Make this more intelligent if(definition.getFilename().endsWith(".png")){ renderCustomPNGShape(shape, g2); } else if(definition.getFilename().endsWith(".svg")){ // renderCustomSVGShape(shape, g2); throw new UnsupportedOperationException(); } } // private void renderCustomSVGShape(DiagramShape shape, Graphics2D g2){ // CustomShapeDefinition definition = shape.getDefinition(); // Rectangle bounds = shape.getBounds(); // Image graphic; // try { // if(shape.getFillColor() == null) { // graphic = ImageHandler.instance().renderSVG( // definition.getFilename(), bounds.width, bounds.height, definition.stretches()); // } else { // graphic = ImageHandler.instance().renderSVG( // definition.getFilename(), bounds.width, bounds.height, definition.stretches(), IDREGEX, shape.getFillColor()); // } // g2.drawImage(graphic, bounds.x, bounds.y, null); // } catch (IOException e) { // e.printStackTrace(); // } // } private void renderCustomPNGShape(DiagramShape shape, Graphics2D g2){ CustomShapeDefinition definition = shape.getDefinition(); Rectangle bounds = shape.getBounds(); Image graphic = ImageHandler.instance().loadImage(definition.getFilename()); int xPos, yPos, width, height; if(definition.stretches()){ //occupy all available space xPos = bounds.x; yPos = bounds.y; width = bounds.width; height = bounds.height; } else { //decide how to fit int newHeight = bounds.width * graphic.getHeight(null) / graphic.getWidth(null); if(newHeight < bounds.height){ //expand to fit width height = newHeight; width = bounds.width; xPos = bounds.x; yPos = bounds.y + bounds.height / 2 - graphic.getHeight(null) / 2; } else { //expand to fit height width = graphic.getWidth(null) * bounds.height / graphic.getHeight(null); height = bounds.height; xPos = bounds.x + bounds.width / 2 - graphic.getWidth(null) / 2; yPos = bounds.y; } } g2.drawImage(graphic, xPos, yPos, width, height, null); } public static boolean isColorDark(Color color){ int brightness = Math.max(color.getRed(), color.getGreen()); brightness = Math.max(color.getBlue(), brightness); if(brightness < 200) { if(DEBUG) System.out.println("Color "+color+" is dark"); return true; } if(DEBUG) System.out.println("Color "+color+" is not dark"); return false; } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/graphics/CompositeDiagramShape.java000066400000000000000000000221331312650303100313270ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.graphics; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.stathissideris.ascii2image.core.DebugUtils; import org.stathissideris.ascii2image.text.CellSet; import org.stathissideris.ascii2image.text.TextGrid; /** * * @author Efstathios Sideris */ public class CompositeDiagramShape extends DiagramComponent { private static final boolean DEBUG = false; private ArrayList shapes = new ArrayList(); public static void main(String[] args) { } public static DiagramComponent createFromBoundaryCells( final TextGrid grid, final CellSet boundaryCells, final int cellWidth, final int cellHeight) { return createOpenFromBoundaryCells( grid, boundaryCells, cellWidth, cellHeight, false); } public static DiagramComponent createOpenFromBoundaryCells( final TextGrid grid, final CellSet boundaryCells, final int cellWidth, final int cellHeight, boolean allRound) { if(boundaryCells.getType(grid) != CellSet.TYPE_OPEN) throw new IllegalArgumentException("This shape is closed and cannot be handled by this method"); if(boundaryCells.size() == 0) return null; CompositeDiagramShape compositeShape = new CompositeDiagramShape(); TextGrid workGrid = new TextGrid(grid.getWidth(), grid.getHeight()); grid.copyCellsTo(boundaryCells, workGrid); if(DEBUG) { System.out.println("Making composite shape from grid:"); workGrid.printDebug(); } CellSet visitedCells = new CellSet(); List shapes = new ArrayList(100); for(TextGrid.Cell cell : boundaryCells) { if(workGrid.isLinesEnd(cell)) { CellSet nextCells = workGrid.followCell(cell); shapes.addAll(growEdgesFromCell(workGrid, cellWidth, cellHeight, allRound, nextCells.getFirst(), cell, visitedCells)); break; } } //dashed shapes should "infect" the rest of the shapes boolean dashedShapeExists = false; for(DiagramShape shape : shapes) if(shape.isStrokeDashed()) dashedShapeExists = true; for(DiagramShape shape : shapes) { if(dashedShapeExists) shape.setStrokeDashed(true); compositeShape.addToShapes(shape); } return compositeShape; } private static List growEdgesFromCell( TextGrid workGrid, final int cellWidth, final int cellHeight, boolean allRound, TextGrid.Cell cell, TextGrid.Cell previousCell, CellSet visitedCells) { List result = new ArrayList(50); visitedCells.add(previousCell); DiagramShape shape = new DiagramShape(); shape.addToPoints(makePointForCell(previousCell, workGrid, cellWidth, cellHeight, allRound)); if(DEBUG) System.out.println("point at "+previousCell+" (call from line: "+DebugUtils.getLineNumber()+")"); if(workGrid.cellContainsDashedLineChar(previousCell)) shape.setStrokeDashed(true); boolean finished = false; while(!finished) { visitedCells.add(cell); if(workGrid.isPointCell(cell)) { if(DEBUG) System.out.println("point at "+cell+" (call from line: "+DebugUtils.getLineNumber()+")"); shape.addToPoints(makePointForCell(cell, workGrid, cellWidth, cellHeight, allRound)); } if(workGrid.cellContainsDashedLineChar(cell)) shape.setStrokeDashed(true); if(workGrid.isLinesEnd(cell)){ finished = true; if(DEBUG) System.out.println("finished shape"); } CellSet nextCells = workGrid.followCell(cell, previousCell); if(nextCells.size() == 1) { previousCell = cell; cell = (TextGrid.Cell) nextCells.getFirst(); } else if(nextCells.size() > 1) {//3- or 4- way intersection finished = true; if(DEBUG) System.out.println("finished shape"); for(TextGrid.Cell nextCell : nextCells) result.addAll(growEdgesFromCell(workGrid, cellWidth, cellHeight, allRound, nextCell, cell, visitedCells)); } } result.add(shape); return result; } /** * Returns a new diagram component with the lines of * this CompositeDiagramShape connected. It can a composite * or simple shape * * @return */ public DiagramComponent connectLines(){ CompositeDiagramShape result = new CompositeDiagramShape(); //find all lines ArrayList lines = new ArrayList(); Iterator it = shapes.iterator(); while(it.hasNext()){ DiagramShape shape = (DiagramShape) it.next(); if(shape.getPoints().size() == 2){ lines.add(shape); } } it = lines.iterator(); while(it.hasNext()){ DiagramShape line1 = (DiagramShape) it.next(); Iterator it2 = lines.iterator(); while(it2.hasNext()){ DiagramShape line2 = (DiagramShape) it.next(); ShapePoint commonPoint = null; ShapePoint line1UncommonPoint = null; ShapePoint line2UncommonPoint = null; if(line1.getPoint(0).equals(line2.getPoint(0))){ commonPoint = line1.getPoint(0); line1UncommonPoint = line1.getPoint(1); line2UncommonPoint = line2.getPoint(1); } if(line1.getPoint(0).equals(line2.getPoint(1))){ commonPoint = line1.getPoint(0); line1UncommonPoint = line1.getPoint(1); line2UncommonPoint = line2.getPoint(0); } if(line1.getPoint(1).equals(line2.getPoint(0))){ commonPoint = line1.getPoint(1); line1UncommonPoint = line1.getPoint(0); line2UncommonPoint = line2.getPoint(1); } if(line1.getPoint(1).equals(line2.getPoint(1))){ commonPoint = line1.getPoint(1); line1UncommonPoint = line1.getPoint(0); line2UncommonPoint = line2.getPoint(0); } if(commonPoint != null){ } } } return result; } public void connectEndsToAnchors(TextGrid grid, Diagram diagram){ Iterator it = shapes.iterator(); while (it.hasNext()) { DiagramShape shape = (DiagramShape) it.next(); if(!shape.isClosed()){ shape.connectEndsToAnchors(grid, diagram); } } } private static DiagramShape makeLine(TextGrid grid, TextGrid.Cell start, TextGrid.Cell end, int cellWidth, int cellHeight){ DiagramShape line = new DiagramShape(); if(grid.isHorizontalLine(start)){ if(start.isWestOf(end)){ line.addToPoints(new ShapePoint( Diagram.getCellMinX(start, cellWidth), Diagram.getCellMidY(start, cellHeight))); } else { line.addToPoints(new ShapePoint( Diagram.getCellMaxX(start, cellWidth), Diagram.getCellMidY(start, cellHeight))); } } else if(grid.isVerticalLine(start)){ if(start.isNorthOf(end)){ line.addToPoints(new ShapePoint( Diagram.getCellMidX(start, cellWidth), Diagram.getCellMinY(start, cellHeight))); } else { line.addToPoints(new ShapePoint( Diagram.getCellMidX(start, cellWidth), Diagram.getCellMaxY(start, cellHeight))); } } else { //corner if(DEBUG) System.out.println("Corner"); int type = (grid.isRoundCorner(start))?ShapePoint.TYPE_ROUND:ShapePoint.TYPE_NORMAL; line.addToPoints(new ShapePoint( Diagram.getCellMidX(start, cellWidth), Diagram.getCellMidY(start, cellHeight), type)); } if(grid.isHorizontalLine(end)){ if(start.isWestOf(start)){ line.addToPoints(new ShapePoint( Diagram.getCellMinX(end, cellWidth), Diagram.getCellMidY(end, cellHeight))); } else { line.addToPoints(new ShapePoint( Diagram.getCellMaxX(end, cellWidth), Diagram.getCellMidY(end, cellHeight))); } } else if(grid.isVerticalLine(end)){ if(start.isNorthOf(start)){ line.addToPoints(new ShapePoint( Diagram.getCellMidX(end, cellWidth), Diagram.getCellMinY(end, cellHeight))); } else { line.addToPoints(new ShapePoint( Diagram.getCellMidX(end, cellWidth), Diagram.getCellMaxY(end, cellHeight))); } } else { //corner int type = (grid.isRoundCorner(end))?ShapePoint.TYPE_ROUND:ShapePoint.TYPE_NORMAL; if(DEBUG) System.out.println("Corner"); line.addToPoints(new ShapePoint( Diagram.getCellMidX(end, cellWidth), Diagram.getCellMidY(end, cellHeight), type)); } return line; } public void addToShapes(DiagramShape shape){ shapes.add(shape); } private Iterator getShapesIterator(){ return shapes.iterator(); } public void scale(float factor){ Iterator it = getShapesIterator(); while(it.hasNext()){ DiagramShape shape = (DiagramShape) it.next(); shape.scale(factor); } } /** * @return */ public ArrayList getShapes() { return shapes; } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/graphics/CustomShapeDefinition.java000066400000000000000000000040721312650303100313650ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.graphics; public class CustomShapeDefinition { private String tag; private boolean stretch = false; private boolean dropShadow = true; private boolean hasBorder = false; private String filename; private String comment; public boolean dropsShadow() { return dropShadow; } public void setDropsShadow(boolean dropShadow) { this.dropShadow = dropShadow; } public String getFilename() { return filename; } public void setFilename(String filename) { this.filename = filename; } public boolean stretches() { return stretch; } public void setStretches(boolean stretch) { this.stretch = stretch; } public boolean hasBorder() { return hasBorder; } public void setHasBorder(boolean hasBorder) { this.hasBorder = hasBorder; } public String getTag() { return tag; } public void setTag(String tag) { this.tag = tag; } public String getComment() { return comment; } public void setComment(String comment) { this.comment = comment; } public String toString(){ return "Custom shape: \""+getTag()+"\":\n" +"\tfile: "+getFilename()+"\n" +"\tstretches: "+stretches()+"\n" +"\thas border: "+hasBorder()+"\n" +"\tdrops shadow: "+dropsShadow()+"\n" +"\tcomment: "+getComment()+"\n" ; } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/graphics/Diagram.java000066400000000000000000000731501312650303100264700ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.graphics; import java.awt.Color; import java.awt.Font; import java.util.ArrayList; import java.util.Iterator; import org.stathissideris.ascii2image.core.ConversionOptions; import org.stathissideris.ascii2image.core.Pair; import org.stathissideris.ascii2image.core.ProcessingOptions; import org.stathissideris.ascii2image.text.AbstractionGrid; import org.stathissideris.ascii2image.text.CellSet; import org.stathissideris.ascii2image.text.TextGrid; /** * * @author Efstathios Sideris */ public class Diagram { private static final boolean DEBUG = false; private static final boolean VERBOSE_DEBUG = false; private ArrayList shapes = new ArrayList(); private ArrayList compositeShapes = new ArrayList(); private ArrayList textObjects = new ArrayList(); private int width, height; private int cellWidth, cellHeight; /** * *

    An outline of the inner workings of this very important (and monstrous) * constructor is presented here. Boundary processing is the first step * of the process:

    * *
      *
    1. Copy the grid into a work grid and remove all type-on-line * and point markers from the work grid
    2. *
    3. Split grid into distinct shapes by plotting the grid * onto an AbstractionGrid and its getDistinctShapes() method.
    4. *
    5. Find all the possible boundary sets of each of the * distinct shapes. This can produce duplicate shapes (if the boundaries * are the same when filling from the inside and the outside).
    6. *
    7. Remove duplicate boundaries.
    8. *
    9. Remove obsolete boundaries. Obsolete boundaries are the ones that are * the sum of their parts when plotted as filled shapes. (see method * removeObsoleteShapes())
    10. *
    11. Seperate the found boundary sets to open, closed or mixed * (See CellSet class on how its done).
    12. *
    13. Are there any closed boundaries? *
        *
      • YES. Subtract all the closed boundaries from each of the * open ones. That should convert the mixed shapes into open.
      • *
      • NO. In this (harder) case, we use the method * breakTrulyMixedBoundaries() of CellSet to break boundaries * into open and closed shapes (would work in any case, but it's * probably slower than the other method). This method is based * on tracing from the lines' ends and splitting when we get to * an intersection.
      • *
      *
    14. *
    15. If we had to eliminate any mixed shapes, we seperate the found * boundary sets again to open, closed or mixed.
    16. *
    * *

    At this stage, the boundary processing is all complete and we * proceed with using those boundaries to create the shapes:

    * *
      *
    1. Create closed shapes.
    2. *
    3. Create open shapes. That's when the line end corrections are * also applied, concerning the positioning of the ends of lines * see methods connectEndsToAnchors() and moveEndsToCellEdges() of * DiagramShape.
    4. *
    5. Assign color codes to closed shapes.
    6. *
    7. Assing extended markup tags to closed shapes.

      *
    8. Create arrowheads.

      *
    9. Create point markers.

      *
    * *

    Finally, the text processing occurs: [pending]

    * * @param grid * @param cellWidth * @param cellHeight */ public Diagram(TextGrid grid, ConversionOptions options, ProcessingOptions processingOptions) { this.cellWidth = options.renderingOptions.getCellWidth(); this.cellHeight = options.renderingOptions.getCellHeight(); width = grid.getWidth() * cellWidth; height = grid.getHeight() * cellHeight; TextGrid workGrid = new TextGrid(grid); workGrid.replaceTypeOnLine(); workGrid.replacePointMarkersOnLine(); if(DEBUG) workGrid.printDebug(); int width = grid.getWidth(); int height = grid.getHeight(); //split distinct shapes using AbstractionGrid AbstractionGrid temp = new AbstractionGrid(workGrid, workGrid.getAllBoundaries()); ArrayList boundarySetsStep1 = temp.getDistinctShapes(); if(DEBUG){ System.out.println("******* Distinct shapes found using AbstractionGrid *******"); Iterator dit = boundarySetsStep1.iterator(); while (dit.hasNext()) { CellSet set = (CellSet) dit.next(); set.printAsGrid(); } System.out.println("******* Same set of shapes after processing them by filling *******"); } //Find all the boundaries by using the special version of the filling method //(fills in a different buffer than the buffer it reads from) ArrayList boundarySetsStep2 = new ArrayList(); Iterator boundarySetIt = boundarySetsStep1.iterator(); while (boundarySetIt.hasNext()) { CellSet set = (CellSet) boundarySetIt.next(); //the fill buffer keeps track of which cells have been //filled already TextGrid fillBuffer = new TextGrid(width * 3, height * 3); for(int yi = 0; yi < height * 3; yi++){ for(int xi = 0; xi < width * 3; xi++){ if(fillBuffer.isBlank(xi, yi)){ TextGrid copyGrid = new AbstractionGrid(workGrid, set).getCopyOfInternalBuffer(); CellSet boundaries = copyGrid .findBoundariesExpandingFrom(copyGrid.new Cell(xi, yi)); if(boundaries.size() == 0) continue; //i'm not sure why these occur boundarySetsStep2.add(boundaries.makeScaledOneThirdEquivalent()); copyGrid = new AbstractionGrid(workGrid, set).getCopyOfInternalBuffer(); CellSet filled = copyGrid .fillContinuousArea(copyGrid.new Cell(xi, yi), '*'); fillBuffer.fillCellsWith(filled, '*'); fillBuffer.fillCellsWith(boundaries, '-'); if(DEBUG){ //System.out.println("Fill buffer:"); //fillBuffer.printDebug(); boundaries.makeScaledOneThirdEquivalent().printAsGrid(); System.out.println("-----------------------------------"); } } } } } if (DEBUG) System.out.println("******* Removed duplicates *******"); boundarySetsStep2 = CellSet.removeDuplicateSets(boundarySetsStep2); if(DEBUG){ Iterator dit = boundarySetsStep2.iterator(); while (dit.hasNext()) { CellSet set = (CellSet) dit.next(); set.printAsGrid(); } } int originalSize = boundarySetsStep2.size(); boundarySetsStep2 = CellSet.removeDuplicateSets(boundarySetsStep2); if(DEBUG) { System.out.println( "******* Removed duplicates: there were " +originalSize +" shapes and now there are " +boundarySetsStep2.size()); } //split boundaries to open, closed and mixed if (DEBUG) System.out.println("******* First evaluation of openess *******"); ArrayList open = new ArrayList(); ArrayList closed = new ArrayList(); ArrayList mixed = new ArrayList(); Iterator sets = boundarySetsStep2.iterator(); while(sets.hasNext()){ CellSet set = (CellSet) sets.next(); int type = set.getType(workGrid); if(type == CellSet.TYPE_CLOSED) closed.add(set); else if(type == CellSet.TYPE_OPEN) open.add(set); else if(type == CellSet.TYPE_MIXED) mixed.add(set); if(DEBUG){ if(type == CellSet.TYPE_CLOSED) System.out.println("Closed boundaries:"); else if(type == CellSet.TYPE_OPEN) System.out.println("Open boundaries:"); else if(type == CellSet.TYPE_MIXED) System.out.println("Mixed boundaries:"); set.printAsGrid(); } } boolean hadToEliminateMixed = false; if(mixed.size() > 0 && closed.size() > 0) { // mixed shapes can be eliminated by // subtracting all the closed shapes from them if (DEBUG) System.out.println("******* Eliminating mixed shapes (basic algorithm) *******"); hadToEliminateMixed = true; //subtract from each of the mixed sets all the closed sets sets = mixed.iterator(); while(sets.hasNext()){ CellSet set = (CellSet) sets.next(); Iterator closedSets = closed.iterator(); while(closedSets.hasNext()){ CellSet closedSet = (CellSet) closedSets.next(); set.subtractSet(closedSet); } // this is necessary because some mixed sets produce // several distinct open sets after you subtract the // closed sets from them if(set.getType(workGrid) == CellSet.TYPE_OPEN) { boundarySetsStep2.remove(set); boundarySetsStep2.addAll(set.breakIntoDistinctBoundaries(workGrid)); } } } else if(mixed.size() > 0 && closed.size() == 0) { // no closed shape exists, will have to // handle mixed shape on its own // an example of this case is the following: // +-----+ // | A |C B // + ---+------------------- // | | // +-----+ hadToEliminateMixed = true; if (DEBUG) System.out.println("******* Eliminating mixed shapes (advanced algorithm for truly mixed shapes) *******"); sets = mixed.iterator(); while(sets.hasNext()){ CellSet set = (CellSet) sets.next(); boundarySetsStep2.remove(set); boundarySetsStep2.addAll(set.breakTrulyMixedBoundaries(workGrid)); } } else { if (DEBUG) System.out.println("No mixed shapes found. Skipped mixed shape elimination step"); } if(hadToEliminateMixed){ if (DEBUG) System.out.println("******* Second evaluation of openess *******"); //split boundaries again to open, closed and mixed open = new ArrayList(); closed = new ArrayList(); mixed = new ArrayList(); sets = boundarySetsStep2.iterator(); while(sets.hasNext()){ CellSet set = (CellSet) sets.next(); int type = set.getType(workGrid); if(type == CellSet.TYPE_CLOSED) closed.add(set); else if(type == CellSet.TYPE_OPEN) open.add(set); else if(type == CellSet.TYPE_MIXED) mixed.add(set); if(DEBUG){ if(type == CellSet.TYPE_CLOSED) System.out.println("Closed boundaries:"); else if(type == CellSet.TYPE_OPEN) System.out.println("Open boundaries:"); else if(type == CellSet.TYPE_MIXED) System.out.println("Mixed boundaries:"); set.printAsGrid(); } } } boolean removedAnyObsolete = removeObsoleteShapes(workGrid, closed); boolean allCornersRound = false; if(processingOptions.areAllCornersRound()) allCornersRound = true; //make shapes from the boundary sets //make closed shapes ArrayList closedShapes = new ArrayList(); sets = closed.iterator(); while(sets.hasNext()){ CellSet set = (CellSet) sets.next(); DiagramComponent shape = DiagramComponent.createClosedFromBoundaryCells(workGrid, set, cellWidth, cellHeight, allCornersRound); if(shape != null){ if(shape instanceof DiagramShape){ addToShapes((DiagramShape) shape); closedShapes.add(shape); } else if(shape instanceof CompositeDiagramShape) addToCompositeShapes((CompositeDiagramShape) shape); } } if(processingOptions.performSeparationOfCommonEdges()) separateCommonEdges(closedShapes); //make open shapes sets = open.iterator(); while(sets.hasNext()){ CellSet set = (CellSet) sets.next(); if(set.size() == 1){ //single cell "shape" TextGrid.Cell cell = (TextGrid.Cell) set.getFirst(); if(!grid.cellContainsDashedLineChar(cell)) { DiagramShape shape = DiagramShape.createSmallLine(workGrid, cell, cellWidth, cellHeight); if(shape != null) { addToShapes(shape); shape.connectEndsToAnchors(workGrid, this); } } } else { //normal shape DiagramComponent shape = CompositeDiagramShape .createOpenFromBoundaryCells( workGrid, set, cellWidth, cellHeight, allCornersRound); if(shape != null){ if(shape instanceof CompositeDiagramShape){ addToCompositeShapes((CompositeDiagramShape) shape); ((CompositeDiagramShape) shape).connectEndsToAnchors(workGrid, this); } else if(shape instanceof DiagramShape) { addToShapes((DiagramShape) shape); ((DiagramShape) shape).connectEndsToAnchors(workGrid, this); ((DiagramShape) shape).moveEndsToCellEdges(grid, this); } } } } //assign color codes to shapes //TODO: text on line should not change its color //TODO: each color tag should be assigned to the smallest containing shape (like shape tags) Iterator cellColorPairs = grid.findColorCodes().iterator(); while(cellColorPairs.hasNext()){ TextGrid.CellColorPair pair = (TextGrid.CellColorPair) cellColorPairs.next(); ShapePoint point = new ShapePoint(getCellMidX(pair.cell), getCellMidY(pair.cell)); Iterator shapes = getShapes().iterator(); while(shapes.hasNext()){ DiagramShape shape = (DiagramShape) shapes.next(); if(shape.contains(point)) shape.setFillColor(pair.color); } } //assign markup to shapes Iterator cellTagPairs = grid.findMarkupTags().iterator(); while(cellTagPairs.hasNext()){ TextGrid.CellTagPair pair = (TextGrid.CellTagPair) cellTagPairs.next(); ShapePoint point = new ShapePoint(getCellMidX(pair.cell), getCellMidY(pair.cell)); //find the smallest shape that contains the tag DiagramShape containingShape = null; Iterator shapes = getShapes().iterator(); while(shapes.hasNext()){ DiagramShape shape = (DiagramShape) shapes.next(); if(shape.contains(point)){ if(containingShape == null){ containingShape = shape; } else { if(shape.isSmallerThan(containingShape)){ containingShape = shape; } } } } //this tag is not within a shape, skip if(containingShape == null) continue; //TODO: the code below could be a lot more concise if(pair.tag.equals("d")){ CustomShapeDefinition def = processingOptions.getFromCustomShapes("d"); if(def == null) containingShape.setType(DiagramShape.TYPE_DOCUMENT); else { containingShape.setType(DiagramShape.TYPE_CUSTOM); containingShape.setDefinition(def); } } else if(pair.tag.equals("s")){ CustomShapeDefinition def = processingOptions.getFromCustomShapes("s"); if(def == null) containingShape.setType(DiagramShape.TYPE_STORAGE); else { containingShape.setType(DiagramShape.TYPE_CUSTOM); containingShape.setDefinition(def); } } else if(pair.tag.equals("io")){ CustomShapeDefinition def = processingOptions.getFromCustomShapes("io"); if(def == null) containingShape.setType(DiagramShape.TYPE_IO); else { containingShape.setType(DiagramShape.TYPE_CUSTOM); containingShape.setDefinition(def); } } else if(pair.tag.equals("c")){ CustomShapeDefinition def = processingOptions.getFromCustomShapes("c"); if(def == null) containingShape.setType(DiagramShape.TYPE_DECISION); else { containingShape.setType(DiagramShape.TYPE_CUSTOM); containingShape.setDefinition(def); } } else if(pair.tag.equals("mo")){ CustomShapeDefinition def = processingOptions.getFromCustomShapes("mo"); if(def == null) containingShape.setType(DiagramShape.TYPE_MANUAL_OPERATION); else { containingShape.setType(DiagramShape.TYPE_CUSTOM); containingShape.setDefinition(def); } } else if(pair.tag.equals("tr")){ CustomShapeDefinition def = processingOptions.getFromCustomShapes("tr"); if(def == null) containingShape.setType(DiagramShape.TYPE_TRAPEZOID); else { containingShape.setType(DiagramShape.TYPE_CUSTOM); containingShape.setDefinition(def); } } else if(pair.tag.equals("o")){ CustomShapeDefinition def = processingOptions.getFromCustomShapes("o"); if(def == null) containingShape.setType(DiagramShape.TYPE_ELLIPSE); else { containingShape.setType(DiagramShape.TYPE_CUSTOM); containingShape.setDefinition(def); } } else { CustomShapeDefinition def = processingOptions.getFromCustomShapes(pair.tag); containingShape.setType(DiagramShape.TYPE_CUSTOM); containingShape.setDefinition(def); } } //make arrowheads Iterator arrowheadCells = workGrid.findArrowheads().iterator(); while(arrowheadCells.hasNext()){ TextGrid.Cell cell = (TextGrid.Cell) arrowheadCells.next(); DiagramShape arrowhead = DiagramShape.createArrowhead(workGrid, cell, cellWidth, cellHeight); if(arrowhead != null) addToShapes(arrowhead); else System.err.println("Could not create arrowhead shape. Unexpected error."); } //make point markers Iterator markersIt = grid.getPointMarkersOnLine().iterator(); while (markersIt.hasNext()) { TextGrid.Cell cell = (TextGrid.Cell) markersIt.next(); DiagramShape mark = new DiagramShape(); mark.addToPoints(new ShapePoint( getCellMidX(cell), getCellMidY(cell) )); mark.setType(DiagramShape.TYPE_POINT_MARKER); mark.setFillColor(Color.white); shapes.add(mark); } removeDuplicateShapes(); if(DEBUG) System.out.println("Shape count: "+shapes.size()); if(DEBUG) System.out.println("Composite shape count: "+compositeShapes.size()); //copy again workGrid = new TextGrid(grid); workGrid.removeNonText(); // ****** handle text ******* //break up text into groups TextGrid textGroupGrid = new TextGrid(workGrid); CellSet gaps = textGroupGrid.getAllBlanksBetweenCharacters(); //kludge textGroupGrid.fillCellsWith(gaps, '|'); CellSet nonBlank = textGroupGrid.getAllNonBlank(); ArrayList textGroups = nonBlank.breakIntoDistinctBoundaries(); if(DEBUG) System.out.println(textGroups.size()+" text groups found"); Font font = FontMeasurer.instance().getFontFor(cellHeight); Iterator textGroupIt = textGroups.iterator(); while(textGroupIt.hasNext()){ CellSet textGroupCellSet = (CellSet) textGroupIt.next(); TextGrid isolationGrid = new TextGrid(width, height); workGrid.copyCellsTo(textGroupCellSet, isolationGrid); ArrayList strings = isolationGrid.findStrings(); Iterator it = strings.iterator(); while(it.hasNext()){ TextGrid.CellStringPair pair = (TextGrid.CellStringPair) it.next(); TextGrid.Cell cell = pair.cell; String string = pair.string; if (DEBUG) System.out.println("Found string "+string); TextGrid.Cell lastCell = isolationGrid.new Cell(cell.x + string.length() - 1, cell.y); int minX = getCellMinX(cell); int y = getCellMaxY(cell); int maxX = getCellMaxX(lastCell); DiagramText textObject; if(FontMeasurer.instance().getWidthFor(string, font) > maxX - minX){ //does not fit horizontally Font lessWideFont = FontMeasurer.instance().getFontFor(maxX - minX, string); textObject = new DiagramText(minX, y, string, lessWideFont); } else textObject = new DiagramText(minX, y, string, font); textObject.centerVerticallyBetween(getCellMinY(cell), getCellMaxY(cell)); //TODO: if the strings start with bullets they should be aligned to the left //position text correctly int otherStart = isolationGrid.otherStringsStartInTheSameColumn(cell); int otherEnd = isolationGrid.otherStringsEndInTheSameColumn(lastCell); if(0 == otherStart && 0 == otherEnd) { textObject.centerHorizontallyBetween(minX, maxX); } else if(otherEnd > 0 && otherStart == 0) { textObject.alignRightEdgeTo(maxX); } else if(otherEnd > 0 && otherStart > 0){ if(otherEnd > otherStart){ textObject.alignRightEdgeTo(maxX); } else if(otherEnd == otherStart){ textObject.centerHorizontallyBetween(minX, maxX); } } addToTextObjects(textObject); } } if (DEBUG) System.out.println("Positioned text"); //correct the color of the text objects according //to the underlying color Iterator shapes = this.getAllDiagramShapes().iterator(); while(shapes.hasNext()){ DiagramShape shape = (DiagramShape) shapes.next(); Color fillColor = shape.getFillColor(); if(shape.isClosed() && shape.getType() != DiagramShape.TYPE_ARROWHEAD && fillColor != null && BitmapRenderer.isColorDark(fillColor)){ Iterator textObjects = getTextObjects().iterator(); while(textObjects.hasNext()){ DiagramText textObject = (DiagramText) textObjects.next(); if(shape.intersects(textObject.getBounds())){ textObject.setColor(Color.white); } } } } //set outline to true for test within custom shapes shapes = this.getAllDiagramShapes().iterator(); while(shapes.hasNext()){ DiagramShape shape = (DiagramShape) shapes.next(); if(shape.getType() == DiagramShape.TYPE_CUSTOM){ Iterator textObjects = getTextObjects().iterator(); while(textObjects.hasNext()){ DiagramText textObject = (DiagramText) textObjects.next(); textObject.setHasOutline(true); textObject.setColor(DiagramText.DEFAULT_COLOR); } } } if (DEBUG) System.out.println("Corrected color of text according to underlying color"); } /** * Returns a list of all DiagramShapes in the Diagram, including * the ones within CompositeDiagramShapes * * @return */ public ArrayList getAllDiagramShapes(){ ArrayList shapes = new ArrayList(); shapes.addAll(this.getShapes()); Iterator shapesIt = this.getCompositeShapes().iterator(); while(shapesIt.hasNext()){ CompositeDiagramShape compShape = (CompositeDiagramShape) shapesIt.next(); shapes.addAll(compShape.getShapes()); } return shapes; } /** * Removes the sets from setsthat are the sum of their parts * when plotted as filled shapes. * * @return true if it removed any obsolete. * */ private boolean removeObsoleteShapes(TextGrid grid, ArrayList sets){ if (DEBUG) System.out.println("******* Removing obsolete shapes *******"); boolean removedAny = false; ArrayList filledSets = new ArrayList(); Iterator it; if(VERBOSE_DEBUG) { System.out.println("******* Sets before *******"); it = sets.iterator(); while(it.hasNext()){ CellSet set = (CellSet) it.next(); set.printAsGrid(); } } //make filled versions of all the boundary sets it = sets.iterator(); while(it.hasNext()){ CellSet set = (CellSet) it.next(); set = set.getFilledEquivalent(grid); if(set == null){ return false; } else filledSets.add(set); } ArrayList toBeRemovedIndices = new ArrayList(); it = filledSets.iterator(); while(it.hasNext()){ CellSet set = (CellSet) it.next(); if(VERBOSE_DEBUG){ System.out.println("*** Deciding if the following should be removed:"); set.printAsGrid(); } //find the other sets that have common cells with set ArrayList common = new ArrayList(); common.add(set); Iterator it2 = filledSets.iterator(); while(it2.hasNext()){ CellSet set2 = (CellSet) it2.next(); if(set != set2 && set.hasCommonCells(set2)){ common.add(set2); } } //it only makes sense for more than 2 sets if(common.size() == 2) continue; //find largest set CellSet largest = set; it2 = common.iterator(); while(it2.hasNext()){ CellSet set2 = (CellSet) it2.next(); if(set2.size() > largest.size()){ largest = set2; } } if(VERBOSE_DEBUG){ System.out.println("Largest:"); largest.printAsGrid(); } //see if largest is sum of others common.remove(largest); //make the sum set of the small sets on a grid TextGrid gridOfSmalls = new TextGrid(largest.getMaxX() + 2, largest.getMaxY() + 2); CellSet sumOfSmall = new CellSet(); it2 = common.iterator(); while(it2.hasNext()){ CellSet set2 = (CellSet) it2.next(); if(VERBOSE_DEBUG){ System.out.println("One of smalls:"); set2.printAsGrid(); } gridOfSmalls.fillCellsWith(set2, '*'); } if(VERBOSE_DEBUG){ System.out.println("Sum of smalls:"); gridOfSmalls.printDebug(); } TextGrid gridLargest = new TextGrid(largest.getMaxX() + 2, largest.getMaxY() + 2); gridLargest.fillCellsWith(largest, '*'); int index = filledSets.indexOf(largest); if(gridLargest.equals(gridOfSmalls) && !toBeRemovedIndices.contains(new Integer(index))) { toBeRemovedIndices.add(new Integer(index)); if (DEBUG){ System.out.println("Decided to remove set:"); largest.printAsGrid(); } } else if (DEBUG){ System.out.println("This set WILL NOT be removed:"); largest.printAsGrid(); } //if(gridLargest.equals(gridOfSmalls)) toBeRemovedIndices.add(new Integer(index)); } ArrayList setsToBeRemoved = new ArrayList(); it = toBeRemovedIndices.iterator(); while(it.hasNext()){ int i = ((Integer) it.next()).intValue(); setsToBeRemoved.add(sets.get(i)); } it = setsToBeRemoved.iterator(); while(it.hasNext()){ CellSet set = (CellSet) it.next(); removedAny = true; sets.remove(set); } if(VERBOSE_DEBUG) { System.out.println("******* Sets after *******"); it = sets.iterator(); while(it.hasNext()){ CellSet set = (CellSet) it.next(); set.printAsGrid(); } } return removedAny; } public float getMinimumOfCellDimension(){ return Math.min(getCellWidth(), getCellHeight()); } private void separateCommonEdges(ArrayList shapes){ float offset = getMinimumOfCellDimension() / 5; ArrayList edges = new ArrayList(); //get all adges Iterator it = shapes.iterator(); while (it.hasNext()) { DiagramShape shape = (DiagramShape) it.next(); edges.addAll(shape.getEdges()); } //group edges into pairs of touching edges ArrayList> listOfPairs = new ArrayList>(); it = edges.iterator(); //all-against-all touching test for the edges int startIndex = 1; //skip some to avoid duplicate comparisons and self-to-self comparisons while(it.hasNext()){ ShapeEdge edge1 = (ShapeEdge) it.next(); for(int k = startIndex; k < edges.size(); k++) { ShapeEdge edge2 = edges.get(k); if(edge1.touchesWith(edge2)) { listOfPairs.add(new Pair(edge1, edge2)); } } startIndex++; } ArrayList movedEdges = new ArrayList(); //move equivalent edges inwards it = listOfPairs.iterator(); while(it.hasNext()){ Pair pair = (Pair) it.next(); if(!movedEdges.contains(pair.first)) { pair.first.moveInwardsBy(offset); movedEdges.add(pair.first); } if(!movedEdges.contains(pair.second)) { pair.second.moveInwardsBy(offset); movedEdges.add(pair.second); } } } //TODO: removes more than it should private void removeDuplicateShapes() { ArrayList originalShapes = new ArrayList(); Iterator shapesIt = getShapesIterator(); while(shapesIt.hasNext()){ DiagramShape shape = (DiagramShape) shapesIt.next(); boolean isOriginal = true; Iterator originals = originalShapes.iterator(); while(originals.hasNext()){ DiagramShape originalShape = (DiagramShape) originals.next(); if(shape.equals(originalShape)){ isOriginal = false; } } if(isOriginal) originalShapes.add(shape); } shapes.clear(); shapes.addAll(originalShapes); } private void addToTextObjects(DiagramText shape){ textObjects.add(shape); } private void addToCompositeShapes(CompositeDiagramShape shape){ compositeShapes.add(shape); } private void addToShapes(DiagramShape shape){ shapes.add(shape); } public Iterator getShapesIterator(){ return shapes.iterator(); } /** * @return */ public int getHeight() { return height; } /** * @return */ public int getWidth() { return width; } /** * @return */ public int getCellWidth() { return cellWidth; } /** * @return */ public int getCellHeight() { return cellHeight; } /** * @return */ public ArrayList getCompositeShapes() { return compositeShapes; } /** * @return */ public ArrayList getShapes() { return shapes; } public int getCellMinX(TextGrid.Cell cell){ return getCellMinX(cell, cellWidth); } public static int getCellMinX(TextGrid.Cell cell, int cellXSize){ return cell.x * cellXSize; } public int getCellMidX(TextGrid.Cell cell){ return getCellMidX(cell, cellWidth); } public static int getCellMidX(TextGrid.Cell cell, int cellXSize){ return cell.x * cellXSize + cellXSize / 2; } public int getCellMaxX(TextGrid.Cell cell){ return getCellMaxX(cell, cellWidth); } public static int getCellMaxX(TextGrid.Cell cell, int cellXSize){ return cell.x * cellXSize + cellXSize; } public int getCellMinY(TextGrid.Cell cell){ return getCellMinY(cell, cellHeight); } public static int getCellMinY(TextGrid.Cell cell, int cellYSize){ return cell.y * cellYSize; } public int getCellMidY(TextGrid.Cell cell){ return getCellMidY(cell, cellHeight); } public static int getCellMidY(TextGrid.Cell cell, int cellYSize){ return cell.y * cellYSize + cellYSize / 2; } public int getCellMaxY(TextGrid.Cell cell){ return getCellMaxY(cell, cellHeight); } public static int getCellMaxY(TextGrid.Cell cell, int cellYSize){ return cell.y * cellYSize + cellYSize; } public TextGrid.Cell getCellFor(ShapePoint point){ if(point == null) throw new IllegalArgumentException("ShapePoint cannot be null"); //TODO: the fake grid is a problem TextGrid g = new TextGrid(); return g.new Cell((int) point.x / cellWidth, (int) point.y / cellHeight); } /** * @return */ public ArrayList getTextObjects() { return textObjects; } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/graphics/DiagramComponent.java000066400000000000000000000104011312650303100303410ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.graphics; import org.stathissideris.ascii2image.text.CellSet; import org.stathissideris.ascii2image.text.TextGrid; /** * * @author Efstathios Sideris */ public abstract class DiagramComponent { private static final boolean DEBUG = false; protected static ShapePoint makePointForCell(TextGrid.Cell cell, TextGrid grid, int cellWidth, int cellHeight, boolean allRound){ if (DEBUG) System.out.println("Found point at cell "+cell); if(grid.isCorner(cell) && allRound){ return new ShapePoint( cell.x * cellWidth + cellWidth/2, cell.y * cellHeight + cellHeight/2, ShapePoint.TYPE_ROUND ); } else if(grid.isNormalCorner(cell)){ return new ShapePoint( cell.x * cellWidth + cellWidth/2, cell.y * cellHeight + cellHeight/2, ShapePoint.TYPE_NORMAL ); } else if(grid.isRoundCorner(cell)){ return new ShapePoint( cell.x * cellWidth + cellWidth/2, cell.y * cellHeight + cellHeight/2, ShapePoint.TYPE_ROUND ); } else if(grid.isLinesEnd(cell)){ return new ShapePoint( cell.x * cellWidth + cellWidth/2, cell.y * cellHeight + cellHeight/2, ShapePoint.TYPE_NORMAL ); } else if(grid.isIntersection(cell)){ return new ShapePoint( cell.x * cellWidth + cellWidth/2, cell.y * cellHeight + cellHeight/2, ShapePoint.TYPE_NORMAL ); } throw new RuntimeException("Cannot make point for cell "+cell); } public static DiagramComponent createClosedFromBoundaryCells(TextGrid grid, CellSet cells, int cellWidth, int cellHeight){ return createClosedFromBoundaryCells(grid, cells, cellWidth, cellHeight, false); } public static DiagramComponent createClosedFromBoundaryCells(TextGrid grid, CellSet cells, int cellWidth, int cellHeight, boolean allRound){ if(cells.getType(grid) == CellSet.TYPE_OPEN) throw new IllegalArgumentException("CellSet is closed and cannot be handled by this method"); if(cells.size() < 2) return null; DiagramShape shape = new DiagramShape(); shape.setClosed(true); if(grid.containsAtLeastOneDashedLine(cells)) shape.setStrokeDashed(true); TextGrid workGrid = new TextGrid(grid.getWidth(), grid.getHeight()); grid.copyCellsTo(cells, workGrid); if (DEBUG){ System.out.println("Making closed shape from buffer:"); workGrid.printDebug(); } TextGrid.Cell start = (TextGrid.Cell) cells.getFirst(); if(workGrid.isCorner(start)) shape.addToPoints(makePointForCell(start, workGrid, cellWidth, cellHeight, allRound)); TextGrid.Cell previous = start; TextGrid.Cell cell = null; CellSet nextCells = workGrid.followCell(previous); if(nextCells.size() == 0) return null; cell = (TextGrid.Cell) nextCells.getFirst(); if(workGrid.isCorner(cell)) shape.addToPoints(makePointForCell(cell, workGrid, cellWidth, cellHeight, allRound)); while(!cell.equals(start)){ nextCells = workGrid.followCell(cell, previous); if(nextCells.size() == 1) { previous = cell; cell = (TextGrid.Cell) nextCells.getFirst(); if(!cell.equals(start) && workGrid.isCorner(cell)) shape.addToPoints(makePointForCell(cell, workGrid, cellWidth, cellHeight, allRound)); } else if(nextCells.size() > 1) { return null; } else { throw new RuntimeException("cannot create closed shape from boundary cells, nowhere to go from " + cell + " coming from " + previous + " in grid:\n" + grid +"\nmaybe you have an edge pointing nowhere?"); } } return shape; } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/graphics/DiagramShape.java000066400000000000000000000715651312650303100274610ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.graphics; import java.awt.Color; import java.awt.Rectangle; import java.awt.geom.Ellipse2D; import java.awt.geom.GeneralPath; import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import org.stathissideris.ascii2image.text.TextGrid; /** * * @author Efstathios Sideris */ public class DiagramShape extends DiagramComponent { private static final boolean DEBUG = false; public static final int TYPE_SIMPLE = 0; public static final int TYPE_ARROWHEAD = 1; public static final int TYPE_POINT_MARKER = 2; public static final int TYPE_DOCUMENT = 3; public static final int TYPE_STORAGE = 4; public static final int TYPE_IO = 5; public static final int TYPE_DECISION = 6; public static final int TYPE_MANUAL_OPERATION = 7; // upside-down trapezoid public static final int TYPE_TRAPEZOID = 8; // rightside-up trapezoid public static final int TYPE_ELLIPSE = 9; public static final int TYPE_CUSTOM = 9999; protected int type = TYPE_SIMPLE; private Color fillColor = null; private Color strokeColor = Color.black; private boolean isClosed = false; private boolean isStrokeDashed = false; protected ArrayList points = new ArrayList(); CustomShapeDefinition definition = null; public static void main(String[] args) { } public static DiagramShape createArrowhead(TextGrid grid, TextGrid.Cell cell, int cellXSize, int cellYSize) { if(!grid.isArrowhead(cell)) return null; if(grid.isNorthArrowhead(cell)) return createNorthArrowhead(grid, cell, cellXSize, cellYSize); if(grid.isSouthArrowhead(cell)) return createSouthArrowhead(grid, cell, cellXSize, cellYSize); if(grid.isWestArrowhead(cell)) return createWestArrowhead(grid, cell, cellXSize, cellYSize); if(grid.isEastArrowhead(cell)) return createEastArrowhead(grid, cell, cellXSize, cellYSize); return null; } private static DiagramShape createNorthArrowhead(TextGrid grid, TextGrid.Cell cell, int cellXSize, int cellYSize) { if(!grid.isNorthArrowhead(cell)) return null; DiagramShape shape = new DiagramShape(); shape.addToPoints(new ShapePoint( Diagram.getCellMidX(cell,cellXSize), Diagram.getCellMinY(cell,cellYSize))); shape.addToPoints(new ShapePoint( Diagram.getCellMinX(cell,cellXSize), Diagram.getCellMaxY(cell,cellYSize))); shape.addToPoints(new ShapePoint( Diagram.getCellMaxX(cell,cellXSize), Diagram.getCellMaxY(cell,cellYSize))); shape.setClosed(true); shape.setFillColor(Color.black); shape.setStrokeColor(Color.black); shape.setType(TYPE_ARROWHEAD); return shape; } private static DiagramShape createSouthArrowhead(TextGrid grid, TextGrid.Cell cell, int cellXSize, int cellYSize) { if(!grid.isSouthArrowhead(cell)) return null; DiagramShape shape = new DiagramShape(); shape.addToPoints(new ShapePoint( Diagram.getCellMinX(cell,cellXSize), Diagram.getCellMinY(cell,cellYSize))); shape.addToPoints(new ShapePoint( Diagram.getCellMidX(cell,cellXSize), Diagram.getCellMaxY(cell,cellYSize))); shape.addToPoints(new ShapePoint( Diagram.getCellMaxX(cell,cellXSize), Diagram.getCellMinY(cell,cellYSize))); shape.setClosed(true); shape.setFillColor(Color.black); shape.setStrokeColor(Color.black); shape.setType(TYPE_ARROWHEAD); return shape; } private static DiagramShape createWestArrowhead(TextGrid grid, TextGrid.Cell cell, int cellXSize, int cellYSize) { if(!grid.isWestArrowhead(cell)) return null; DiagramShape shape = new DiagramShape(); shape.addToPoints(new ShapePoint( Diagram.getCellMaxX(cell,cellXSize), Diagram.getCellMinY(cell,cellYSize))); shape.addToPoints(new ShapePoint( Diagram.getCellMinX(cell,cellXSize), Diagram.getCellMidY(cell,cellYSize))); shape.addToPoints(new ShapePoint( Diagram.getCellMaxX(cell,cellXSize), Diagram.getCellMaxY(cell,cellYSize))); shape.setClosed(true); shape.setFillColor(Color.black); shape.setStrokeColor(Color.black); shape.setType(TYPE_ARROWHEAD); return shape; } private static DiagramShape createEastArrowhead(TextGrid grid, TextGrid.Cell cell, int cellXSize, int cellYSize) { if(!grid.isEastArrowhead(cell)) return null; DiagramShape shape = new DiagramShape(); shape.addToPoints(new ShapePoint( Diagram.getCellMinX(cell,cellXSize), Diagram.getCellMinY(cell,cellYSize))); shape.addToPoints(new ShapePoint( Diagram.getCellMaxX(cell,cellXSize), Diagram.getCellMidY(cell,cellYSize))); shape.addToPoints(new ShapePoint( Diagram.getCellMinX(cell,cellXSize), Diagram.getCellMaxY(cell,cellYSize))); shape.setClosed(true); shape.setFillColor(Color.black); shape.setStrokeColor(Color.black); shape.setType(TYPE_ARROWHEAD); return shape; } public static DiagramShape createSmallLine(TextGrid grid, TextGrid.Cell cell, int cellXSize, int cellYSize) { if (grid.isLine(cell)) { DiagramShape shape = new DiagramShape(); if (grid.isHorizontalLine(cell)) { shape.addToPoints( new ShapePoint( cell.x * cellXSize, cell.y * cellYSize + cellYSize / 2)); shape.addToPoints( new ShapePoint( cell.x * cellXSize + cellXSize - 1, cell.y * cellYSize + cellYSize / 2)); } else if (grid.isVerticalLine(cell)) { shape.addToPoints( new ShapePoint( cell.x * cellXSize + cellXSize / 2, cell.y * cellYSize)); shape.addToPoints( new ShapePoint( cell.x * cellXSize + cellXSize / 2, cell.y * cellYSize + cellYSize - 1)); } //the -1 above, make a difference: the second point //should not fall into the next cell, because this //results in a failure of a proper end-of-line //plotting correction return shape; } return null; } public void addToPoints(ShapePoint point){ points.add(point); } public Iterator getPointsIterator(){ return points.iterator(); } public void scale(float factor){ Iterator it = getPointsIterator(); while(it.hasNext()){ ShapePoint point = (ShapePoint) it.next(); point.x *= factor; point.y *= factor; } } public boolean isEmpty(){ return points.isEmpty(); } public boolean isFilled(){ return (fillColor != null); } public void setIsNotFilled(){ fillColor = null; } public boolean isPointLinesEnd(ShapePoint point){ if(isClosed()) return false; //no line-ends in closed shapes! if(point == points.get(0)) return true; if(point == points.get(points.size() - 1)) return true; return false; } //TODO: method in development: isRectangle() public boolean isRectangle(){ if(points.size() != 4) return false; ShapePoint p1 = (ShapePoint) points.get(0); ShapePoint p2 = (ShapePoint) points.get(1); ShapePoint p3 = (ShapePoint) points.get(2); ShapePoint p4 = (ShapePoint) points.get(3); if(p1.isInLineWith(p2) && p2.isInLineWith(p3) && p3.isInLineWith(p4) && p4.isInLineWith(p1)) return true; return false; } /** * Crude way to determine which of the two shapes is smaller, * based just on their bounding boxes. Used in markup * assignment precendence. * * @param other * @return */ public boolean isSmallerThan(DiagramShape other){ Rectangle bounds = getBounds(); Rectangle otherBounds = other.getBounds(); int area = bounds.height * bounds.width; int otherArea = otherBounds.height * otherBounds.width; if(area < otherArea) { return true; } return false; } /** * @return */ public Color getFillColor() { return fillColor; } /** * @return */ public Color getStrokeColor() { return strokeColor; } /** * @param color */ public void setFillColor(Color color) { fillColor = color; } /** * @param color */ public void setStrokeColor(Color color) { strokeColor = color; } /** * @return */ public boolean isClosed() { return isClosed; } /** * @param b */ public void setClosed(boolean b) { isClosed = b; } public void printDebug(){ System.out.print("DiagramShape: "); System.out.println(points.size()+" points"); } /** * @return */ public ArrayList getPoints() { return points; } public ShapePoint getPoint(int i) { return (ShapePoint) points.get(i); } public void setPoint(int i, ShapePoint point) { points.set(i, point); } public boolean equals(Object object){ DiagramShape shape = null; if(!(object instanceof DiagramShape)) { return false; } else shape = (DiagramShape) object; if(getPoints().size() != shape.getPoints().size()) return false; if(DEBUG) System.out.println("comparing shapes:"); if(DEBUG) System.out.println("points1: "); HashMap points1 = new HashMap(); Iterator it = getPointsIterator(); while(it.hasNext()){ ShapePoint point = (ShapePoint) it.next(); points1.put( ""+((int) point.x)+","+((int) point.y), null); if(DEBUG) System.out.println(((int) point.x)+", "+((int) point.y)); } if(DEBUG) System.out.println("points2: "); HashMap points2 = new HashMap(); it = shape.getPointsIterator(); while(it.hasNext()){ ShapePoint point = (ShapePoint) it.next(); points2.put( ""+((int) point.x)+","+((int) point.y), null); if(DEBUG) System.out.println(((int) point.x)+", "+((int) point.y)); } it = points1.keySet().iterator(); while(it.hasNext()){ String key = (String) it.next(); if(!points2.containsKey(key)) { if (DEBUG) System.out.println("\tare not equal"); return false; } } if (DEBUG) System.out.println("\tare equal"); return true; } public GeneralPath makeIntoPath() { int size = getPoints().size(); if(size < 2) return null; GeneralPath path = new GeneralPath(); ShapePoint point = (ShapePoint) getPoints().get(0); path.moveTo((int) point.x, (int) point.y); for(int i = 1; i < size; i++){ point = (ShapePoint) getPoints().get(i); path.lineTo((int) point.x, (int) point.y); } if(isClosed() && size > 2){ path.closePath(); } return path; } public GeneralPath makeMarkerPath(Diagram diagram){ if(points.size() != 1) return null; ShapePoint center = (ShapePoint) this.getPoint(0); float diameter = (float) 0.7 * Math.min(diagram.getCellWidth(), diagram.getCellHeight()); return new GeneralPath(new Ellipse2D.Float( center.x - diameter/2, center.y - diameter/2, diameter, diameter)); } public Rectangle getBounds(){ Rectangle bounds = makeIntoPath().getBounds(); return bounds; } public GeneralPath makeIntoRenderPath(Diagram diagram) { int size = getPoints().size(); if(getType() == TYPE_POINT_MARKER){ return makeMarkerPath(diagram); } if(getType() == TYPE_DOCUMENT && points.size() == 4){ return makeDocumentPath(diagram); } if(getType() == TYPE_STORAGE && points.size() == 4){ return makeStoragePath(diagram); } if(getType() == TYPE_IO && points.size() == 4){ return makeIOPath(diagram); } if(getType() == TYPE_DECISION && points.size() == 4){ return makeDecisionPath(diagram); } if(getType() == TYPE_MANUAL_OPERATION && points.size() == 4){ return makeTrapezoidPath(diagram, true); } if(getType() == TYPE_TRAPEZOID && points.size() == 4){ return makeTrapezoidPath(diagram, false); } if(getType() == TYPE_ELLIPSE && points.size() == 4){ return makeEllipsePath(diagram); } if(size < 2) return null; GeneralPath path = new GeneralPath(); ShapePoint point = (ShapePoint) getPoints().get(0); TextGrid.Cell cell = diagram.getCellFor(point); //path.moveTo((int) point.x, (int) point.y); ShapePoint previous = (ShapePoint) getPoints().get(size - 1); ShapePoint next = (ShapePoint) getPoints().get(1); ShapePoint entryPoint; ShapePoint exitPoint; if(point.getType() == ShapePoint.TYPE_NORMAL){ //if(isClosed()){ path.moveTo((int) point.x, (int) point.y); /*} else { ShapePoint projectionPoint = getCellEdgeProjectionPointBetween(point, next, diagram); path.moveTo((int) projectionPoint.x, (int) projectionPoint.y); }*/ } else if(point.getType() == ShapePoint.TYPE_ROUND){ entryPoint = getCellEdgePointBetween(point, previous, diagram); exitPoint = getCellEdgePointBetween(point, next, diagram); path.moveTo(entryPoint.x, entryPoint.y); path.quadTo(point.x, point.y, exitPoint.x, exitPoint.y); } for(int i = 1; i < size; i++){ previous = point; point = (ShapePoint) getPoints().get(i); if(i < size - 1) next = (ShapePoint) getPoints().get(i + 1); else next = (ShapePoint) getPoints().get(0); cell = diagram.getCellFor(point); if(point.getType() == ShapePoint.TYPE_NORMAL) //if(!isPointLinesEnd(point)) path.lineTo((int) point.x, (int) point.y); /*else { //it is line's end, so we plot it at the projected intersection of the line with the cell's edge ShapePoint projectionPoint = getCellEdgeProjectionPointBetween(point, previous, diagram); path.lineTo((int) projectionPoint.x, (int) projectionPoint.y); }*/ else if(point.getType() == ShapePoint.TYPE_ROUND){ entryPoint = getCellEdgePointBetween(point, previous, diagram); exitPoint = getCellEdgePointBetween(point, next, diagram); path.lineTo(entryPoint.x, entryPoint.y); path.quadTo(point.x, point.y, exitPoint.x, exitPoint.y); //if(!isPointLinesEnd(next)){ if(next.getType() == ShapePoint.TYPE_NORMAL) path.lineTo(next.x, next.y); else if(next.getType() == ShapePoint.TYPE_ROUND){ entryPoint = getCellEdgePointBetween(next, point, diagram); path.lineTo(entryPoint.x, entryPoint.y); } /*} else { entryPoint = getCellEdgeProjectionPointBetween(next, point, diagram); path.lineTo(entryPoint.x, entryPoint.y); }*/ } } //TODO: this shouldn't be needed, but it is! if(isClosed() && size > 2){ path.closePath(); } return path; } public ArrayList getEdges(){ ArrayList edges = new ArrayList(); if(this.points.size() == 1) return edges; int noOfPoints = points.size(); for(int i = 0; i < noOfPoints - 1; i++){ ShapePoint startPoint = (ShapePoint) points.get(i); ShapePoint endPoint = (ShapePoint) points.get(i + 1); ShapeEdge edge = new ShapeEdge(startPoint, endPoint, this); edges.add(edge); } //if it is closed return edge that connects the //last point to the first if(this.isClosed()){ ShapePoint firstPoint = (ShapePoint) points.get(0); ShapePoint lastPoint = (ShapePoint) points.get(points.size() - 1); ShapeEdge edge = new ShapeEdge(lastPoint, firstPoint, this); edges.add(edge); } return edges; } /** * Finds the point that represents the intersection between the cell edge * that contains pointInCell and the line connecting pointInCell and * otherPoint. * * Returns C, if A is point in cell and B is otherPoint: *
    	 *     Cell
    	 *    +-----+
    	 *    |  A  |C                 B
    	 *    |  *--*------------------*
    	 *    |     |
    	 *    +-----+
    	 *
    * * @param pointInCell * @param otherPoint * @return */ public ShapePoint getCellEdgePointBetween(ShapePoint pointInCell, ShapePoint otherPoint, Diagram diagram){ if(pointInCell == null || otherPoint == null || diagram == null) throw new IllegalArgumentException("None of the parameters can be null"); if(pointInCell.equals(otherPoint)) throw new IllegalArgumentException("The two points cannot be the same"); ShapePoint result = null; TextGrid.Cell cell = diagram.getCellFor(pointInCell); if(cell == null) throw new RuntimeException("Upexpected error, cannot find cell corresponding to point "+pointInCell+" for diagram "+diagram); if(otherPoint.isNorthOf(pointInCell)) result = new ShapePoint(pointInCell.x, diagram.getCellMinY(cell)); else if(otherPoint.isSouthOf(pointInCell)) result = new ShapePoint(pointInCell.x, diagram.getCellMaxY(cell)); else if(otherPoint.isWestOf(pointInCell)) result = new ShapePoint(diagram.getCellMinX(cell), pointInCell.y); else if(otherPoint.isEastOf(pointInCell)) result = new ShapePoint(diagram.getCellMaxX(cell), pointInCell.y); if(result == null) throw new RuntimeException("Upexpected error, cannot find cell edge point for points "+pointInCell+" and "+otherPoint+" for diagram "+diagram); return result; } /** * * Returns C, if A is point in cell and B is otherPoint: * *
    	 *     Cell
    	 *    +-----+
    	 *    |  A  |                  B
    	 *  C *--*--+------------------*
    	 *    |     |
    	 *    +-----+
    	 * 
    * * @param pointInCell * @param otherPoint * @param diagram * @return */ public ShapePoint getCellEdgeProjectionPointBetween(ShapePoint pointInCell, ShapePoint otherPoint, Diagram diagram){ if(pointInCell == null || otherPoint == null || diagram == null) throw new IllegalArgumentException("None of the parameters can be null"); if(pointInCell.equals(otherPoint)) throw new IllegalArgumentException("The two points cannot be the same: "+pointInCell+" and "+otherPoint+" passed"); ShapePoint result = null; TextGrid.Cell cell = diagram.getCellFor(pointInCell); if(cell == null) throw new RuntimeException("Upexpected error, cannot find cell corresponding to point "+pointInCell+" for diagram "+diagram); if(otherPoint.isNorthOf(pointInCell)) result = new ShapePoint(pointInCell.x, diagram.getCellMaxY(cell)); else if(otherPoint.isSouthOf(pointInCell)) result = new ShapePoint(pointInCell.x, diagram.getCellMinY(cell)); else if(otherPoint.isWestOf(pointInCell)) result = new ShapePoint(diagram.getCellMaxX(cell), pointInCell.y); else if(otherPoint.isEastOf(pointInCell)) result = new ShapePoint(diagram.getCellMinX(cell), pointInCell.y); if(result == null) throw new RuntimeException("Upexpected error, cannot find cell edge point for points "+pointInCell+" and "+otherPoint+" for diagram "+diagram); return result; } public boolean contains(ShapePoint point){ GeneralPath path = makeIntoPath(); if(path != null) return path.contains(point); return false; } public boolean contains(Rectangle2D rect){ GeneralPath path = makeIntoPath(); if(path != null) return path.contains(rect); return false; } public boolean intersects(Rectangle2D rect){ GeneralPath path = makeIntoPath(); if(path != null) return path.intersects(rect); return false; } public boolean dropsShadow(){ return (isClosed() && getType() != DiagramShape.TYPE_ARROWHEAD && getType() != DiagramShape.TYPE_POINT_MARKER && !isStrokeDashed()); } /** * @return */ public int getType() { return type; } /** * @param i */ public void setType(int i) { type = i; } public void moveEndsToCellEdges(TextGrid grid, Diagram diagram){ if(isClosed()) return; ShapePoint linesEnd = (ShapePoint) points.get(0); ShapePoint nextPoint = (ShapePoint) points.get(1); ShapePoint projectionPoint = getCellEdgeProjectionPointBetween(linesEnd, nextPoint, diagram); linesEnd.moveTo(projectionPoint); linesEnd = (ShapePoint) points.get(points.size() - 1); nextPoint = (ShapePoint) points.get(points.size() - 2); projectionPoint = getCellEdgeProjectionPointBetween(linesEnd, nextPoint, diagram); linesEnd.moveTo(projectionPoint); } public void connectEndsToAnchors(TextGrid grid, Diagram diagram){ if(isClosed()) return; ShapePoint linesEnd; ShapePoint nextPoint; linesEnd = (ShapePoint) points.get(0); nextPoint = (ShapePoint) points.get(1); connectEndToAnchors(grid, diagram, nextPoint, linesEnd); linesEnd = (ShapePoint) points.get(points.size() - 1); nextPoint = (ShapePoint) points.get(points.size() - 2); connectEndToAnchors(grid, diagram, nextPoint, linesEnd); } //TODO: improve connect Ends To Arrowheads to take direction into account private void connectEndToAnchors( TextGrid grid, Diagram diagram, ShapePoint nextPoint, ShapePoint linesEnd){ if(isClosed()) return; TextGrid.Cell anchorCell; anchorCell = getPossibleAnchorCell(linesEnd, nextPoint, diagram); if(grid.isArrowhead(anchorCell)){ linesEnd.x = diagram.getCellMidX(anchorCell); linesEnd.y = diagram.getCellMidY(anchorCell); linesEnd.setLocked(true); } else if (grid.isCorner(anchorCell) || grid.isIntersection(anchorCell)){ linesEnd.x = diagram.getCellMidX(anchorCell); linesEnd.y = diagram.getCellMidY(anchorCell); linesEnd.setLocked(true); } } /** * Given the end of a line, the next point and a Diagram, it * returns the cell that may contain intersections or arrowheads * to which the line's end should be connected * * @param linesEnd * @param nextPoint * @param diagram * @return */ private static TextGrid.Cell getPossibleAnchorCell( ShapePoint linesEnd, ShapePoint nextPoint, Diagram diagram ){ ShapePoint cellPoint = null; if(nextPoint.isNorthOf(linesEnd)) cellPoint = new ShapePoint(linesEnd.x, linesEnd.y + diagram.getCellHeight()); if(nextPoint.isSouthOf(linesEnd)) cellPoint = new ShapePoint(linesEnd.x, linesEnd.y - diagram.getCellHeight()); if(nextPoint.isWestOf(linesEnd)) cellPoint = new ShapePoint(linesEnd.x + diagram.getCellWidth(), linesEnd.y); if(nextPoint.isEastOf(linesEnd)) cellPoint = new ShapePoint(linesEnd.x - diagram.getCellWidth(), linesEnd.y); return diagram.getCellFor(cellPoint); } public String toString(){ String s = "DiagramShape, "+points.size()+" points: "; Iterator it = getPointsIterator(); while(it.hasNext()){ ShapePoint point = (ShapePoint) it.next(); s += point; if(it.hasNext()) s += " "; } return s; } /** * @return */ public boolean isStrokeDashed() { return isStrokeDashed; } /** * @param b */ public void setStrokeDashed(boolean b) { isStrokeDashed = b; } private GeneralPath makeStoragePath(Diagram diagram) { if(points.size() != 4) return null; Rectangle bounds = makeIntoPath().getBounds(); ShapePoint point1 = new ShapePoint((float)bounds.getMinX(), (float)bounds.getMinY()); ShapePoint point2 = new ShapePoint((float)bounds.getMaxX(), (float)bounds.getMinY()); ShapePoint point3 = new ShapePoint((float)bounds.getMaxX(), (float)bounds.getMaxY()); ShapePoint point4 = new ShapePoint((float)bounds.getMinX(), (float)bounds.getMaxY()); ShapePoint pointMidTop = new ShapePoint((float)bounds.getCenterX(), (float)bounds.getMinY()); ShapePoint pointMidBottom = new ShapePoint((float)bounds.getCenterX(), (float)bounds.getMaxY()); float diameterX = bounds.width; float diameterY = 0.75f * diagram.getCellHeight(); //control point offset X, and Y float cpOffsetX = bounds.width / 6; float cpOffsetYTop = diagram.getCellHeight() / 2; float cpOffsetYBottom = 10 * diagram.getCellHeight() / 14; //float cpOffsetYBottom = cpOffsetYTop; GeneralPath path = new GeneralPath(); //top of cylinder path.moveTo(point1.x, point1.y); path.curveTo( point1.x + cpOffsetX, point1.y + cpOffsetYTop, point2.x - cpOffsetX, point2.y + cpOffsetYTop, point2.x, point2.y ); path.curveTo( point2.x - cpOffsetX, point2.y - cpOffsetYTop, point1.x + cpOffsetX, point1.y - cpOffsetYTop, point1.x, point1.y ); //side of cylinder path.moveTo(point1.x, point1.y); path.lineTo(point4.x, point4.y); path.curveTo( point4.x + cpOffsetX, point4.y + cpOffsetYBottom, point3.x - cpOffsetX, point3.y + cpOffsetYBottom, point3.x, point3.y ); path.lineTo(point2.x, point2.y); return path; } private GeneralPath makeDocumentPath(Diagram diagram) { if(points.size() != 4) return null; Rectangle bounds = makeIntoPath().getBounds(); ShapePoint point1 = new ShapePoint((float)bounds.getMinX(), (float)bounds.getMinY()); ShapePoint point2 = new ShapePoint((float)bounds.getMaxX(), (float)bounds.getMinY()); ShapePoint point3 = new ShapePoint((float)bounds.getMaxX(), (float)bounds.getMaxY()); ShapePoint point4 = new ShapePoint((float)bounds.getMinX(), (float)bounds.getMaxY()); ShapePoint pointMid = new ShapePoint((float)bounds.getCenterX(), (float)bounds.getMaxY()); GeneralPath path = new GeneralPath(); path.moveTo(point1.x, point1.y); path.lineTo(point2.x, point2.y); path.lineTo(point3.x, point3.y); //int controlDX = diagram.getCellWidth(); //int controlDY = diagram.getCellHeight() / 2; int controlDX = bounds.width / 6; int controlDY = bounds.height / 8; path.quadTo(pointMid.x + controlDX, pointMid.y - controlDY, pointMid.x, pointMid.y); path.quadTo(pointMid.x - controlDX, pointMid.y + controlDY, point4.x, point4.y); path.closePath(); return path; } // to draw a circle with 4 Bezier curves, set the control points at this ratio of // the radius above & below the side points // thanks to G. Adam Stanislav, http://whizkidtech.redprince.net/bezier/circle/ private static final float KAPPA = 4f * ((float) Math.sqrt(2) - 1) / 3f; private GeneralPath makeEllipsePath(Diagram diagram) { if(points.size() != 4) return null; Rectangle bounds = makeIntoPath().getBounds(); float xOff = (float) bounds.getWidth() * 0.5f * KAPPA; float yOff = (float) bounds.getHeight() * 0.5f * KAPPA; ShapePoint pointMid = new ShapePoint((float)bounds.getCenterX(), (float)bounds.getCenterY()); ShapePoint left = new ShapePoint((float)bounds.getMinX(), (float)pointMid.getY()); ShapePoint right = new ShapePoint((float)bounds.getMaxX(), (float)pointMid.getY()); ShapePoint top = new ShapePoint((float)pointMid.getX(), (float)bounds.getMinY()); ShapePoint bottom = new ShapePoint((float)pointMid.getX(), (float)bounds.getMaxY()); GeneralPath path = new GeneralPath(); path.moveTo(top.x, top.y); path.curveTo(top.x + xOff, top.y, right.x, right.y - yOff, right.x, right.y); path.curveTo(right.x, right.y + yOff, bottom.x + xOff, bottom.y, bottom.x, bottom.y); path.curveTo(bottom.x - xOff, bottom.y, left.x, left.y + yOff, left.x, left.y); path.curveTo(left.x, left.y - yOff, top.x - xOff, top.y, top.x, top.y); path.closePath(); return path; } private GeneralPath makeTrapezoidPath(Diagram diagram, boolean inverted) { if(points.size() != 4) return null; Rectangle bounds = makeIntoPath().getBounds(); float offset = 0.7f * diagram.getCellWidth(); // fixed slope if (inverted) offset = -offset; ShapePoint ul = new ShapePoint((float)bounds.getMinX() + offset, (float)bounds.getMinY()); ShapePoint ur = new ShapePoint((float)bounds.getMaxX() - offset, (float)bounds.getMinY()); ShapePoint br = new ShapePoint((float)bounds.getMaxX() + offset, (float)bounds.getMaxY()); ShapePoint bl = new ShapePoint((float)bounds.getMinX() - offset, (float)bounds.getMaxY()); ShapePoint pointMid = new ShapePoint((float)bounds.getCenterX(), (float)bounds.getMaxY()); GeneralPath path = new GeneralPath(); path.moveTo(ul.x, ul.y); path.lineTo(ur.x, ur.y); path.lineTo(br.x, br.y); path.lineTo(bl.x, bl.y); path.closePath(); return path; } private GeneralPath makeDecisionPath(Diagram diagram) { if(points.size() != 4) return null; Rectangle bounds = makeIntoPath().getBounds(); ShapePoint pointMid = new ShapePoint((float)bounds.getCenterX(), (float)bounds.getCenterY()); ShapePoint left = new ShapePoint((float)bounds.getMinX(), (float)pointMid.getY()); ShapePoint right = new ShapePoint((float)bounds.getMaxX(), (float)pointMid.getY()); ShapePoint top = new ShapePoint((float)pointMid.getX(), (float)bounds.getMinY()); ShapePoint bottom = new ShapePoint((float)pointMid.getX(), (float)bounds.getMaxY()); GeneralPath path = new GeneralPath(); path.moveTo(left.x, left.y); path.lineTo(top.x, top.y); path.lineTo(right.x, right.y); path.lineTo(bottom.x, bottom.y); path.closePath(); return path; } private GeneralPath makeIOPath(Diagram diagram) { if(points.size() != 4) return null; Rectangle bounds = makeIntoPath().getBounds(); ShapePoint point1 = new ShapePoint((float)bounds.getMinX(), (float)bounds.getMinY()); ShapePoint point2 = new ShapePoint((float)bounds.getMaxX(), (float)bounds.getMinY()); ShapePoint point3 = new ShapePoint((float)bounds.getMaxX(), (float)bounds.getMaxY()); ShapePoint point4 = new ShapePoint((float)bounds.getMinX(), (float)bounds.getMaxY()); float offset = diagram.getCellWidth() / 2; GeneralPath path = new GeneralPath(); path.moveTo(point1.x + offset, point1.y); path.lineTo(point2.x + offset, point2.y); path.lineTo(point3.x - offset, point3.y); path.lineTo(point4.x - offset, point4.y); path.closePath(); return path; } public CustomShapeDefinition getDefinition() { return definition; } public void setDefinition(CustomShapeDefinition definition) { this.definition = definition; } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/graphics/DiagramText.java000066400000000000000000000076431312650303100273410ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.graphics; import java.awt.Color; import java.awt.Font; import java.awt.geom.Rectangle2D; /** * * @author Efstathios Sideris */ public class DiagramText extends DiagramComponent { public static final Color DEFAULT_COLOR = Color.black; private String text; private Font font; private int xPos, yPos; private Color color = Color.black; private boolean isTextOnLine = false; private boolean hasOutline = false; private Color outlineColor = Color.white; public DiagramText(int x, int y, String text, Font font){ if(text == null) throw new IllegalArgumentException("DiagramText cannot be initialised with a null string"); if(font == null) throw new IllegalArgumentException("DiagramText cannot be initialised with a null font"); this.xPos = x; this.yPos = y; this.text = text; this.font = font; } public void centerInBounds(Rectangle2D bounds){ centerHorizontallyBetween((int) bounds.getMinX(), (int) bounds.getMaxX()); centerVerticallyBetween((int) bounds.getMinY(), (int) bounds.getMaxY()); } public void centerHorizontallyBetween(int minX, int maxX){ int width = FontMeasurer.instance().getWidthFor(text, font); int center = Math.abs(maxX - minX) / 2; xPos += Math.abs(center - width / 2); } public void centerVerticallyBetween(int minY, int maxY){ int zHeight = FontMeasurer.instance().getZHeight(font); int center = Math.abs(maxY - minY) / 2; yPos -= Math.abs(center - zHeight / 2); } public void alignRightEdgeTo(int x){ int width = FontMeasurer.instance().getWidthFor(text, font); xPos = x - width; } /** * @return */ public Color getColor() { return color; } /** * @return */ public Font getFont() { return font; } /** * @return */ public String getText() { return text; } /** * @return */ public int getXPos() { return xPos; } /** * @return */ public int getYPos() { return yPos; } /** * @param color */ public void setColor(Color color) { this.color = color; } /** * @param font */ public void setFont(Font font) { this.font = font; } /** * @param string */ public void setText(String string) { text = string; } /** * @param i */ public void setXPos(int i) { xPos = i; } /** * @param i */ public void setYPos(int i) { yPos = i; } public Rectangle2D getBounds(){ Rectangle2D bounds = FontMeasurer.instance().getBoundsFor(text, font); bounds.setRect( bounds.getMinX() + xPos, bounds.getMinY() + yPos, bounds.getWidth(), bounds.getHeight()); return bounds; } public String toString(){ return "DiagramText, at ("+xPos+", "+yPos+"), within "+getBounds()+" '"+text+"', "+color+" "+font; } /** * @return */ public boolean isTextOnLine() { return isTextOnLine; } /** * @param b */ public void setTextOnLine(boolean b) { isTextOnLine = b; } public boolean hasOutline() { return hasOutline; } public void setHasOutline(boolean hasOutline) { this.hasOutline = hasOutline; } public Color getOutlineColor() { return outlineColor; } public void setOutlineColor(Color outlineColor) { this.outlineColor = outlineColor; } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/graphics/FontMeasurer.java000066400000000000000000000137011312650303100275320ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.graphics; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics2D; import java.awt.font.FontRenderContext; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.util.Locale; /** * * @author Efstathios Sideris */ public class FontMeasurer { private static final String fontFamilyName = "Dialog"; //private static final String fontFamilyName = "Helvetica"; private static final boolean DEBUG = false; private static final FontMeasurer instance = new FontMeasurer(); FontRenderContext fakeRenderContext; Graphics2D fakeGraphics; { BufferedImage image = new BufferedImage(1,1, BufferedImage.TYPE_INT_RGB); fakeGraphics = image.createGraphics(); if (DEBUG) System.out.println("Locale: "+Locale.getDefault()); fakeRenderContext = fakeGraphics.getFontRenderContext(); } public int getWidthFor(String str, int pixelHeight){ Font font = getFontFor(pixelHeight); Rectangle2D rectangle = font.getStringBounds(str, fakeRenderContext); return (int) rectangle.getWidth(); } public int getHeightFor(String str, int pixelHeight){ Font font = getFontFor(pixelHeight); Rectangle2D rectangle = font.getStringBounds(str, fakeRenderContext); return (int) rectangle.getHeight(); } public int getWidthFor(String str, Font font){ Rectangle2D rectangle = font.getStringBounds(str, fakeRenderContext); return (int) rectangle.getWidth(); } public int getHeightFor(String str, Font font){ Rectangle2D rectangle = font.getStringBounds(str, fakeRenderContext); return (int) rectangle.getHeight(); } public Rectangle2D getBoundsFor(String str, Font font){ return font.getStringBounds(str, fakeRenderContext); } public Font getFontFor(int pixelHeight){ BufferedImage image = new BufferedImage(1,1, BufferedImage.TYPE_INT_RGB); Graphics2D g2 = image.createGraphics(); return getFontFor(pixelHeight, fakeRenderContext); } public int getAscent(Font font){ fakeGraphics.setFont(font); FontMetrics metrics = fakeGraphics.getFontMetrics(); if(DEBUG) System.out.println("Ascent: "+metrics.getAscent()); return metrics.getAscent(); } public int getZHeight(Font font){ int height = (int) font.createGlyphVector(fakeRenderContext, "Z").getOutline().getBounds().getHeight(); if(DEBUG) System.out.println("Z height: "+height); return height; } public Font getFontFor(int maxWidth, String string){ float size = 12; Font currentFont = new Font(fontFamilyName, Font.BOLD, (int) size); //ascent is the distance between the baseline and the tallest character int width = getWidthFor(string, currentFont); int direction; //direction of size change (towards smaller or bigger) if(width > maxWidth){ currentFont = currentFont.deriveFont(size - 1); size--; direction = -1; } else { currentFont = currentFont.deriveFont(size + 1); size++; direction = 1; } while(size > 0){ currentFont = currentFont.deriveFont(size); //rectangle = currentFont.getStringBounds(testString, frc); width = getWidthFor(string, currentFont); if(direction == 1){ if(width > maxWidth){ size = size - 1; return currentFont.deriveFont(size); } else size = size + 1; } else { if(width < maxWidth) return currentFont; else size = size - 1; } } return null; } public Font getFontFor(int pixelHeight, FontRenderContext frc){ float size = 12; Font currentFont = new Font(fontFamilyName, Font.BOLD, (int) size); // Font currentFont = new Font("Times", Font.BOLD, (int) size); if (DEBUG) System.out.println(currentFont.getFontName()); //ascent is the distance between the baseline and the tallest character int ascent = getAscent(currentFont); int direction; //direction of size change (towards smaller or bigger) if(ascent > pixelHeight){ currentFont = currentFont.deriveFont(size - 1); size--; direction = -1; } else { currentFont = currentFont.deriveFont(size + 1); size++; direction = 1; } while(size > 0){ currentFont = currentFont.deriveFont(size); //rectangle = currentFont.getStringBounds(testString, frc); ascent = getAscent(currentFont); if(direction == 1){ if(ascent > pixelHeight){ size = size - 0.5f; return currentFont.deriveFont(size); } else size = size + 0.5f; } else { if(ascent < pixelHeight) return currentFont; else size = size - 0.5f; } } return null; } public static FontMeasurer instance(){ return instance; } public FontMeasurer(){ } public static void main(String[] args) { //FontMeasurer.instance().getFontFor(7); float size = 12; Font currentFont = new Font("Sans", Font.BOLD, (int) size); System.out.println(currentFont.getSize()); currentFont = currentFont.deriveFont(--size); System.out.println(currentFont.getSize()); currentFont = currentFont.deriveFont(--size); System.out.println(currentFont.getSize()); currentFont = currentFont.deriveFont(--size); System.out.println(currentFont.getSize()); currentFont = currentFont.deriveFont(--size); System.out.println(currentFont.getSize()); currentFont = currentFont.deriveFont(--size); System.out.println(currentFont.getSize()); } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/graphics/ImageHandler.java000066400000000000000000000046461312650303100274500ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.graphics; import java.awt.Image; import java.awt.MediaTracker; import java.awt.Toolkit; import java.net.URL; import javax.swing.JLabel; public class ImageHandler { // private static OffScreenSVGRenderer svgRenderer = // new OffScreenSVGRenderer(); private static ImageHandler instance = new ImageHandler(); public static ImageHandler instance(){ return instance; } private static final MediaTracker tracker = new MediaTracker(new JLabel()); public Image loadImage(String filename){ URL url = ClassLoader.getSystemResource(filename); Image result = null; if(url != null) result = Toolkit.getDefaultToolkit().getImage(url); else result = Toolkit.getDefaultToolkit().getImage(filename); // result = null; //wait for the image to load before returning tracker.addImage(result, 0); try { tracker.waitForID(0); } catch (InterruptedException e) { System.err.println("Failed to load image "+filename); e.printStackTrace(); } tracker.removeImage(result, 0); return result; } // public BufferedImage renderSVG(String filename, int width, int height, boolean stretch) throws IOException { // File file = new File(filename); // URI uri = file.toURI(); // return svgRenderer.renderToImage(uri.toString(), width, height, stretch, null, null); // } // // public BufferedImage renderSVG(String filename, int width, int height, boolean stretch, String idRegex, Color color) throws IOException { // File file = new File(filename); // URI uri = file.toURI(); // return svgRenderer.renderToImage(uri.toString(), width, height, stretch, idRegex, color); // } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/graphics/ShapeEdge.java000066400000000000000000000143051312650303100267460ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.graphics; import java.awt.geom.GeneralPath; /** * * @author Efstathios Sideris */ public class ShapeEdge { private static final boolean DEBUG = false; private static final int TYPE_HORIZONTAL = 0; private static final int TYPE_VERTICAL = 1; private static final int TYPE_SLOPED = 2; private DiagramShape owner; private ShapePoint startPoint; private ShapePoint endPoint; public ShapeEdge(ShapePoint start, ShapePoint end, DiagramShape owner){ this.startPoint = start; this.endPoint = end; this.owner = owner; } public ShapeEdge(ShapeEdge other){ this( new ShapePoint(other.startPoint), new ShapePoint(other.endPoint), other.owner ); } private float getDistanceFromOrigin() { int type = this.getType(); if(type == TYPE_SLOPED) throw new RuntimeException("Cannot calculate distance of sloped edge from origin"); if(type == TYPE_HORIZONTAL) return startPoint.y; return startPoint.x; //vertical } //TODO: moveInwardsBy() not implemented public void moveInwardsBy(float offset){ int type = this.getType(); if(type == TYPE_SLOPED) throw new RuntimeException("Cannot move a sloped egde inwards: "+this); float xOffset = 0; float yOffset = 0; ShapePoint middle = getMiddle(); GeneralPath path = owner.makeIntoPath(); if(type == TYPE_HORIZONTAL){ xOffset = 0; ShapePoint up = new ShapePoint(middle.x, middle.y - 0.05f); ShapePoint down = new ShapePoint(middle.x, middle.y + 0.05f); if(path.contains(up)) yOffset = -offset; else if(path.contains(down)) yOffset = offset; } else if(type == TYPE_VERTICAL){ yOffset = 0; ShapePoint left = new ShapePoint(middle.x - 0.05f, middle.y); ShapePoint right = new ShapePoint(middle.x + 0.05f, middle.y); if(path.contains(left)) xOffset = -offset; else if(path.contains(right)) xOffset = offset; } if(DEBUG) System.out.println("Moved edge "+this+" by "+xOffset+", "+yOffset); translate(xOffset, yOffset); } public void translate(float dx, float dy){ startPoint.x += dx; startPoint.y += dy; endPoint.x += dx; endPoint.y += dy; } public ShapePoint getMiddle(){ return new ShapePoint( (startPoint.x + endPoint.x) / 2, (startPoint.y + endPoint.y) / 2 ); } /** * Returns the type of the edge * (TYPE_HORIZONTAL, TYPE_VERTICAL, TYPE_SLOPED). * * @return */ private int getType(){ if(isVertical()) return TYPE_VERTICAL; if(isHorizontal()) return TYPE_HORIZONTAL; return TYPE_SLOPED; } /** * @return */ public ShapePoint getEndPoint() { return endPoint; } /** * @return */ public ShapePoint getStartPoint() { return startPoint; } /** * @param point */ public void setEndPoint(ShapePoint point) { endPoint = point; } /** * @param point */ public void setStartPoint(ShapePoint point) { startPoint = point; } /** * @return */ public DiagramShape getOwner() { return owner; } /** * @param shape */ public void setOwner(DiagramShape shape) { owner = shape; } public boolean equals(Object object){ if(!(object instanceof ShapeEdge)) return false; ShapeEdge edge = (ShapeEdge) object; if(startPoint.equals(edge.getStartPoint()) && endPoint.equals(edge.getEndPoint())) return true; if(startPoint.equals(edge.getEndPoint()) && endPoint.equals(edge.getStartPoint())) return true; return false; } public boolean touchesWith(ShapeEdge other){ if(this.equals(other)) return true; if(this.isHorizontal() && other.isVertical()) return false; if(other.isHorizontal() && this.isVertical()) return false; if(this.getDistanceFromOrigin() != other.getDistanceFromOrigin()) return false; //covering this corner case (should produce false): // --------- // --------- ShapeEdge first = new ShapeEdge(this); ShapeEdge second = new ShapeEdge(other); if(first.isVertical()) { first.changeAxis(); second.changeAxis(); } first.fixDirection(); second.fixDirection(); if(first.startPoint.x > second.startPoint.x) { ShapeEdge temp = first; first = second; second = temp; } if(first.endPoint.equals(second.startPoint)) return false; // case 1: // ---------- // ----------- // case 2: // ------ // ----------------- if(this.startPoint.isWithinEdge(other) || this.endPoint.isWithinEdge(other)) return true; if(other.startPoint.isWithinEdge(this) || other.endPoint.isWithinEdge(this)) return true; return false; } private void changeAxis(){ ShapePoint temp = new ShapePoint(startPoint); startPoint = new ShapePoint(endPoint.y, endPoint.x); endPoint = new ShapePoint(temp.y, temp.x); } /** * if horizontal flips start and end points so that start is left of end * if verical flips start and end points so that start is over of end * */ private void fixDirection(){ if(isHorizontal()) { if(startPoint.x > endPoint.x) flipDirection(); } else if(isVertical()) { if(startPoint.y > endPoint.y) flipDirection(); } else { throw new RuntimeException("Cannot fix direction of sloped egde"); } } private void flipDirection(){ ShapePoint temp = startPoint; startPoint = endPoint; endPoint = temp; } public boolean isHorizontal(){ if(startPoint.y == endPoint.y) return true; return false; } public boolean isVertical(){ if(startPoint.x == endPoint.x) return true; return false; } public String toString(){ return startPoint+" -> "+endPoint; } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/graphics/ShapePoint.java000066400000000000000000000057371312650303100272040ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.graphics; /** * * @author Efstathios Sideris */ public class ShapePoint extends java.awt.geom.Point2D.Float { public static final int TYPE_NORMAL = 0; public static final int TYPE_ROUND = 1; private boolean locked = false; private int type = 0; public ShapePoint() { super(); } public ShapePoint(float x, float y) { super(x, y); this.type = TYPE_NORMAL; } public ShapePoint(float x, float y, int type) { super(x, y); this.type = type; } public ShapePoint(ShapePoint other){ this(other.x, other.y, other.type); } /** * @return */ public int getType() { return type; } /** * @param i */ public void setType(int i) { type = i; } public boolean isInLineWith(ShapePoint point){ if(this.x == point.x) return true; if(this.y == point.y) return true; return false; } public boolean isWithinEdge(ShapeEdge edge) { if(edge.isHorizontal()) { if(x >= edge.getStartPoint().x && x <= edge.getEndPoint().x) return true; if(x >= edge.getEndPoint().x && x <= edge.getStartPoint().x) return true; return false; } else if(edge.isVertical()) { if(y >= edge.getStartPoint().y && y <= edge.getEndPoint().y) return true; if(y >= edge.getEndPoint().y && y <= edge.getStartPoint().y) return true; return false; } throw new RuntimeException("Cannot calculate is ShapePoint is within sloped edge"); } public boolean isNorthOf(ShapePoint point){ return (this.y < point.y); } public boolean isSouthOf(ShapePoint point){ return (this.y > point.y); } public boolean isWestOf(ShapePoint point){ return (this.x < point.x); } public boolean isEastOf(ShapePoint point){ return (this.x > point.x); } public String toString(){ return "("+x+", "+y+")"; } public void assign(ShapePoint point){ this.x = point.x; this.y = point.y; } /** * Does the same as assign, but respects the * locked attribute * * @param point */ public void moveTo(ShapePoint point){ if(locked) return; this.x = point.x; this.y = point.y; } /** * @return */ public boolean isLocked() { return locked; } /** * @param b */ public void setLocked(boolean b) { locked = b; } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/text/000077500000000000000000000000001312650303100234375ustar00rootroot00000000000000plantuml-1.2017.15/src/org/stathissideris/ascii2image/text/AbstractCell.java000066400000000000000000000057331312650303100266550ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.text; /** * * @author Efstathios Sideris */ public class AbstractCell { public int rows[][] = new int[3][3]; { for(int y = 0; y < 3; y++) for(int x = 0; x < 3; x++) rows[x][y] = 0; } static AbstractCell makeHorizontalLine(){ AbstractCell result = new AbstractCell(); result.rows[0][1] = 1; result.rows[1][1] = 1; result.rows[2][1] = 1; return result; } static AbstractCell makeVerticalLine(){ AbstractCell result = new AbstractCell(); result.rows[1][0] = 1; result.rows[1][1] = 1; result.rows[1][2] = 1; return result; } static AbstractCell makeCorner1(){ AbstractCell result = new AbstractCell(); result.rows[1][1] = 1; result.rows[1][2] = 1; result.rows[2][1] = 1; return result; } static AbstractCell makeCorner2(){ AbstractCell result = new AbstractCell(); result.rows[0][1] = 1; result.rows[1][1] = 1; result.rows[1][2] = 1; return result; } static AbstractCell makeCorner3(){ AbstractCell result = new AbstractCell(); result.rows[0][1] = 1; result.rows[1][1] = 1; result.rows[1][0] = 1; return result; } static AbstractCell makeCorner4(){ AbstractCell result = new AbstractCell(); result.rows[2][1] = 1; result.rows[1][1] = 1; result.rows[1][0] = 1; return result; } static AbstractCell makeT(){ AbstractCell result = AbstractCell.makeHorizontalLine(); result.rows[1][2] = 1; return result; } static AbstractCell makeInverseT(){ AbstractCell result = AbstractCell.makeHorizontalLine(); result.rows[1][0] = 1; return result; } static AbstractCell makeK(){ AbstractCell result = AbstractCell.makeVerticalLine(); result.rows[2][1] = 1; return result; } static AbstractCell makeInverseK(){ AbstractCell result = AbstractCell.makeVerticalLine(); result.rows[0][1] = 1; return result; } static AbstractCell makeCross(){ AbstractCell result = AbstractCell.makeVerticalLine(); result.rows[0][1] = 1; result.rows[2][1] = 1; return result; } static AbstractCell makeStar(){ AbstractCell result = AbstractCell.makeVerticalLine(); for(int y = 0; y < 3; y++) for(int x = 0; x < 3; x++) result.rows[x][y] = 1; return result; } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/text/AbstractionGrid.java000066400000000000000000000123641312650303100273670ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.text; import java.util.ArrayList; import java.util.Iterator; /** * * @author Efstathios Sideris */ public class AbstractionGrid { private static final boolean DEBUG = false; private TextGrid grid; /** * Makes an AbstractionGrid using internalGrid as * its internal buffer * * @param internalGrid * @return */ public static AbstractionGrid makeUsingBuffer(TextGrid internalGrid){ if(internalGrid.getWidth() % 3 != 0 || internalGrid.getHeight() % 3 != 0) throw new IllegalArgumentException("Passed TextGrid must have dimensions that are divisible by 3."); AbstractionGrid result = new AbstractionGrid(internalGrid.getWidth() / 3, internalGrid.getHeight() / 3); result.setInternalBuffer(internalGrid); return result; } /** * Makes an AbstractionGrid using the cellSet * of textGrid. * * @param textGrid * @param cellSet */ public AbstractionGrid(TextGrid textGrid, CellSet cellSet){ this(textGrid.getWidth(), textGrid.getHeight()); /*this(cellSet.getWidth(), cellSet.getHeight()); cellSet = new CellSet(cellSet); cellSet.translate( - cellSet.getMinX(), - cellSet.getMinY());*/ if(DEBUG){ System.out.println("Making AbstractionGrid using buffer:"); textGrid.printDebug(); System.out.println("...and the following CellSet:"); cellSet.printAsGrid(); } Iterator it = cellSet.iterator(); while(it.hasNext()){ TextGrid.Cell cell = (TextGrid.Cell) it.next(); if(textGrid.isBlank(cell)) continue; if(textGrid.isCross(cell)){ set(cell.x, cell.y, AbstractCell.makeCross()); } else if(textGrid.isT(cell)){ set(cell.x, cell.y, AbstractCell.makeT()); } else if(textGrid.isK(cell)){ set(cell.x, cell.y, AbstractCell.makeK()); } else if(textGrid.isInverseT(cell)){ set(cell.x, cell.y, AbstractCell.makeInverseT()); } else if(textGrid.isInverseK(cell)){ set(cell.x, cell.y, AbstractCell.makeInverseK()); } else if(textGrid.isCorner1(cell)){ set(cell.x, cell.y, AbstractCell.makeCorner1()); } else if(textGrid.isCorner2(cell)){ set(cell.x, cell.y, AbstractCell.makeCorner2()); } else if(textGrid.isCorner3(cell)){ set(cell.x, cell.y, AbstractCell.makeCorner3()); } else if(textGrid.isCorner4(cell)){ set(cell.x, cell.y, AbstractCell.makeCorner4()); } else if(textGrid.isHorizontalLine(cell)){ set(cell.x, cell.y, AbstractCell.makeHorizontalLine()); } else if(textGrid.isVerticalLine(cell)){ set(cell.x, cell.y, AbstractCell.makeVerticalLine()); } else if(textGrid.isCrossOnLine(cell)){ set(cell.x, cell.y, AbstractCell.makeCross()); } else if(textGrid.isStarOnLine(cell)){ set(cell.x, cell.y, AbstractCell.makeStar()); } } if(DEBUG){ System.out.println("...the resulting AbstractionGrid is:"); grid.printDebug(); } } private AbstractionGrid(int width, int height){ grid = new TextGrid(width*3, height*3); } public TextGrid getCopyOfInternalBuffer(){ return new TextGrid(grid); } private void setInternalBuffer(TextGrid grid){ this.grid = grid; } public int getWidth(){ return grid.getWidth() / 3; } public int getHeight(){ return grid.getHeight() / 3; } public TextGrid getAsTextGrid(){ TextGrid result = new TextGrid(getWidth(), getHeight()); for(int y = 0; y < grid.getHeight(); y++){ for(int x = 0; x < grid.getWidth(); x++){ TextGrid.Cell cell = grid.new Cell(x, y); if(!grid.isBlank(cell)) result.set(x/3, y/3, '*'); } } if (DEBUG){ System.out.println("Getting AbstractionGrid as textGrid.\nAbstractionGrid:"); grid.printDebug(); System.out.println("...as text grid:"); result.printDebug(); } return result; } public ArrayList getDistinctShapes(){ ArrayList result = new ArrayList(); CellSet nonBlank = grid.getAllNonBlank(); ArrayList distinct = nonBlank.breakIntoDistinctBoundaries(); Iterator it = distinct.iterator(); while (it.hasNext()) { CellSet set = (CellSet) it.next(); AbstractionGrid temp = new AbstractionGrid(this.getWidth(), this.getHeight()); temp.fillCells(set); result.add(temp.getAsTextGrid().getAllNonBlank()); } return result; } protected void fillCells(CellSet cells){ grid.fillCellsWith(cells, '*'); } public void set(int xPos, int yPos, AbstractCell cell){ xPos *= 3; yPos *= 3; for(int y = 0; y < 3; y++){ for(int x = 0; x < 3; x++){ if(cell.rows[x][y] == 1){ grid.set(xPos + x, yPos + y, '*'); } } } } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/text/CellSet.java000066400000000000000000000424331312650303100256430ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.text; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.Set; /** * * @author Efstathios Sideris */ public class CellSet implements Iterable { private static final boolean DEBUG = false; private static final boolean VERBOSE_DEBUG = false; public static final int TYPE_CLOSED = 0; public static final int TYPE_OPEN = 1; public static final int TYPE_MIXED = 2; public static final int TYPE_HAS_CLOSED_AREA = 3; public static final int TYPE_UNDETERMINED = 4; Set internalSet = new HashSet(); private int type = TYPE_UNDETERMINED; private boolean typeIsValid = false; private static final Object FAKE = new Object(); public CellSet(){ } public CellSet(CellSet other){ addAll(other); } public Iterator iterator(){ return internalSet.iterator(); } public Object add(TextGrid.Cell cell){ return internalSet.add(cell); } public void addAll(CellSet set){ internalSet.addAll(set.internalSet); } void clear(){ internalSet.clear(); } public int size() { return internalSet.size(); } public TextGrid.Cell getFirst(){ //return internalSet.get(0); return (TextGrid.Cell) internalSet.iterator().next(); } public void printAsGrid(){ TextGrid grid = new TextGrid(getMaxX()+2, getMaxY()+2); grid.fillCellsWith(this, '*'); grid.printDebug(); } public void printDebug(){ Iterator it = iterator(); while(it.hasNext()){ TextGrid.Cell cell = it.next(); System.out.print(cell); if(it.hasNext()) System.out.print(" "); } System.out.println(); } public String getCellsAsString(){ StringBuffer str = new StringBuffer(); Iterator it = iterator(); while(it.hasNext()){ str.append(it.next().toString()); if(it.hasNext()) str.append("/"); } return str.toString(); } public String toString(){ TextGrid grid = new TextGrid(getMaxX()+2, getMaxY()+2); grid.fillCellsWith(this, '*'); return grid.getDebugString(); } /** * Deep copy * * @param set * @return */ public static CellSet copyCellSet(CellSet set) { TextGrid grid = new TextGrid(); CellSet newSet = new CellSet(); Iterator it = set.iterator(); while (it.hasNext()) { TextGrid.Cell cell = (TextGrid.Cell) it.next(); TextGrid.Cell newCell = grid.new Cell(cell); newSet.add(newCell); } return newSet; } /*public BoundarySet(BoundarySet set) { Iterator it = set.iterator(); while(it.hasNext()){ TextGrid.Cell cell = (TextGrid.Cell) it.next(); add(new TextGrid.Cell(cell)); } }*/ public int getType(TextGrid grid) { if(typeIsValid) return type; typeIsValid = true; if(size() == 1) { type = TYPE_OPEN; return TYPE_OPEN; } int typeTrace = getTypeAccordingToTraceMethod(grid); if(DEBUG){ System.out.println("trace: "+typeTrace); } if(typeTrace == TYPE_OPEN) { type = TYPE_OPEN; return TYPE_OPEN; } if(typeTrace == TYPE_CLOSED) { type = TYPE_CLOSED; return TYPE_CLOSED; } if(typeTrace == TYPE_UNDETERMINED) { int typeFill = getTypeAccordingToFillMethod(grid); if(typeFill == TYPE_HAS_CLOSED_AREA){ type = TYPE_MIXED; return TYPE_MIXED; } else if(typeFill == TYPE_OPEN){ type = TYPE_OPEN; return TYPE_OPEN; } } //in the case that both return undetermined: type = TYPE_UNDETERMINED; return TYPE_UNDETERMINED; } private int getTypeAccordingToTraceMethod(TextGrid grid) { if(size() < 2) return TYPE_OPEN; TextGrid workGrid = TextGrid.makeSameSizeAs(grid); grid.copyCellsTo(this, workGrid); //start with a line end if it exists or with a "random" cell if not TextGrid.Cell start = null; for(TextGrid.Cell cell : this) if(workGrid.isLinesEnd(cell)) start = cell; if(start == null) start = (TextGrid.Cell) getFirst(); if (DEBUG) System.out.println("Tracing:\nStarting at "+start+" ("+grid.getCellTypeAsString(start)+")"); TextGrid.Cell previous = start; TextGrid.Cell cell = null; CellSet nextCells = workGrid.followCell(previous); if(nextCells.size() == 0) return TYPE_OPEN; cell = (TextGrid.Cell) nextCells.getFirst(); if (DEBUG) System.out.println("\tat cell "+cell+" ("+grid.getCellTypeAsString(cell)+")"); while(!cell.equals(start)){ nextCells = workGrid.followCell(cell, previous); if(nextCells.size() == 0) { if (DEBUG) System.out.println("-> Found dead-end, shape is open"); return TYPE_OPEN; } if(nextCells.size() == 1) { previous = cell; cell = (TextGrid.Cell) nextCells.getFirst(); if (DEBUG) System.out.println("\tat cell "+cell+" ("+grid.getCellTypeAsString(cell)+")"); } else if(nextCells.size() > 1) { if (DEBUG) System.out.println("-> Found intersection at cell "+cell); return TYPE_UNDETERMINED; } } if (DEBUG) System.out.println("-> Arrived back to start, shape is closed"); return TYPE_CLOSED; // boolean hasMoved = false; // // CellSet workSet; // workSet = new CellSet(this); // // TextGrid.Cell start = (TextGrid.Cell) get(0); // // workSet.remove(start); // TextGrid.Cell cell = workSet.findCellNextTo(start); // // while(true && cell != null){ // // hasMoved = true; // workSet.remove(cell); // // CellSet setOfNeighbours = workSet.findCellsNextTo(cell); // // if(setOfNeighbours.isEmpty()) break; // // TextGrid.Cell c = null; // if(setOfNeighbours.size() == 1) c = (TextGrid.Cell) setOfNeighbours.get(0); // if(setOfNeighbours.size() > 1) return TYPE_UNDETERMINED; // if(c == null) break; // else cell = c; // } // if(cell != null && start.isNextTo(cell) && hasMoved) return TYPE_CLOSED; // else return TYPE_OPEN; } private int getTypeAccordingToFillMethod(TextGrid grid){ if(size() == 0) return TYPE_OPEN; CellSet tempSet = copyCellSet(this); tempSet.translate( -this.getMinX() + 1, -this.getMinY() + 1); TextGrid subGrid = grid.getSubGrid(getMinX() - 1, getMinY() - 1, getWidth() + 3, getHeight() + 3); AbstractionGrid abstraction = new AbstractionGrid(subGrid, tempSet); TextGrid temp = abstraction.getCopyOfInternalBuffer(); TextGrid.Cell cell1 = null; TextGrid.Cell cell2 = null; int width = temp.getWidth(); int height = temp.getHeight(); TextGrid.Cell fillCell = null; for(int y = 0; y < height; y++){ for(int x = 0; x < width; x++){ TextGrid.Cell cCell = temp.new Cell(x, y); if(temp.isBlank(cCell)){ fillCell = cCell; break; } } } if(fillCell == null){ System.err.println("Unexpected error: fill method cannot fill anywhere"); return TYPE_UNDETERMINED; } temp.fillContinuousArea(fillCell, '*'); if(VERBOSE_DEBUG) {System.out.println("Buffer after filling:"); temp.printDebug();} if(temp.hasBlankCells()) return TYPE_HAS_CLOSED_AREA; else return TYPE_OPEN; } public void translate(int dx, int dy){ typeIsValid = false; Iterator it = iterator(); while(it.hasNext()){ TextGrid.Cell cCell = (TextGrid.Cell) it.next(); cCell.x += dx; cCell.y += dy; } } public TextGrid.Cell find(TextGrid.Cell cell){ Iterator it = iterator(); while(it.hasNext()){ TextGrid.Cell cCell = it.next(); if(cCell.equals(cell)) return cCell; } return null; } public boolean contains(TextGrid.Cell cell){ if(cell == null) return false; return internalSet.contains(cell); } // public boolean contains(TextGrid.Cell cell){ // Iterator it = iterator(); // while(it.hasNext()){ // TextGrid.Cell cCell = it.next(); // if(cCell.equals(cell)) return true; // } // return false; // } public void addSet(CellSet set){ typeIsValid = false; this.addAll(set); } public boolean hasCommonCells(CellSet otherSet){ Iterator it = iterator(); while(it.hasNext()){ TextGrid.Cell cell = it.next(); if(otherSet.contains(cell)) return true; } return false; } public TextGrid.Cell find(int x, int y){ Iterator it = iterator(); while(it.hasNext()){ TextGrid.Cell cCell = (TextGrid.Cell) it.next(); if(cCell.x == x && cCell.y == y) return cCell; } return null; } public CellSet getFilledEquivalent(TextGrid textGrid){ if(this.getType(textGrid) == CellSet.TYPE_OPEN) return new CellSet(this); TextGrid grid = new TextGrid(getMaxX()+2, getMaxY()+2); grid.fillCellsWith(this, '*'); //find a cell that has a blank both on the east and the west TextGrid.Cell cell = null; boolean finished = false; for(int y = 0; y < grid.getHeight() && !finished; y++){ for(int x = 0; x < grid.getWidth() && !finished; x++){ cell = grid.new Cell(x, y); if(!grid.isBlank(cell) && grid.isBlank(cell.getEast()) && grid.isBlank(cell.getWest())){ finished = true; } } } if(cell != null){ cell = cell.getEast(); if(grid.isOutOfBounds(cell)) return new CellSet(this); grid.fillContinuousArea(cell, '*'); return grid.getAllNonBlank(); } System.err.println("Unexpected error, cannot find the filled equivalent of CellSet"); return null; } /** * Returns the first cell that is found to be next to cell. * * @param cell * @return */ public TextGrid.Cell findCellNextTo(TextGrid.Cell cell){ Iterator it = iterator(); while(it.hasNext()){ TextGrid.Cell cCell = (TextGrid.Cell) it.next(); if(cCell.isNextTo(cell)) return cCell; } return null; } /** * Returns all the cells that are found to be next to cell. * * @param cell * @return */ public CellSet findCellsNextTo(TextGrid.Cell cell){ if(cell == null) throw new IllegalArgumentException("cell cannot be null"); CellSet set = new CellSet(); Iterator it = iterator(); while(it.hasNext()){ TextGrid.Cell cCell = (TextGrid.Cell) it.next(); if(cCell.isNextTo(cell)) set.add(cCell); } return set; } public void appendSet(CellSet set){ typeIsValid = false; Iterator it = set.iterator(); while(it.hasNext()){ TextGrid.Cell cell = (TextGrid.Cell) it.next(); if(find(cell) == null) add(cell); } } public void subtractSet(CellSet set){ typeIsValid = false; Iterator it = set.iterator(); while(it.hasNext()){ TextGrid.Cell cell = (TextGrid.Cell) it.next(); TextGrid.Cell thisCell = find(cell); if(thisCell != null) remove(thisCell); } } public int getWidth(){ return getMaxX() - getMinX(); } public int getHeight(){ return getMaxY() - getMinY(); } public int getMaxX(){ int result = 0; Iterator it = iterator(); while(it.hasNext()){ TextGrid.Cell cell = (TextGrid.Cell) it.next(); if(cell.x > result) result = cell.x; } return result; } public int getMinX(){ int result = Integer.MAX_VALUE; Iterator it = iterator(); while(it.hasNext()){ TextGrid.Cell cell = (TextGrid.Cell) it.next(); if(cell.x < result) result = cell.x; } return result; } public int getMaxY(){ int result = 0; Iterator it = iterator(); while(it.hasNext()){ TextGrid.Cell cell = (TextGrid.Cell) it.next(); if(cell.y > result) result = cell.y; } return result; } public int getMinY(){ int result = Integer.MAX_VALUE; Iterator it = iterator(); while(it.hasNext()){ TextGrid.Cell cell = (TextGrid.Cell) it.next(); if(cell.y < result) result = cell.y; } return result; } public Object remove(TextGrid.Cell cell){ typeIsValid = false; cell = find(cell); if(cell != null) return internalSet.remove(cell); else return null; } public boolean equals(Object o){ CellSet otherSet = (CellSet) o; return internalSet.equals(otherSet.internalSet); } public static ArrayList removeDuplicateSets(ArrayList list) { ArrayList uniqueSets = new ArrayList(); Iterator it = list.iterator(); while(it.hasNext()){ CellSet set = (CellSet) it.next(); boolean isOriginal = true; Iterator uniquesIt = uniqueSets.iterator(); while(uniquesIt.hasNext()){ CellSet uniqueSet = (CellSet) uniquesIt.next(); if(set.equals(uniqueSet)){ isOriginal = false; } } if(isOriginal) uniqueSets.add(set); } return uniqueSets; } /** * Takes into account character info from the grid * * @return ArrayList of distinct BoundarySetS */ public ArrayList breakIntoDistinctBoundaries(TextGrid grid){ ArrayList result; AbstractionGrid temp = new AbstractionGrid(grid, this); result = temp.getDistinctShapes(); return result; } /** * * @return ArrayList of distinct BoundarySetS */ public ArrayList breakIntoDistinctBoundaries(){ ArrayList result = new ArrayList(); //CellSet tempSet = copyCellSet(this); //tempSet.translate( - this.getMinX() + 1, - this.getMinY() + 1); // TextGrid boundaryGrid = new TextGrid(tempSet.getMaxX()+2, tempSet.getMaxY()+2); // boundaryGrid.fillCellsWith(tempSet, '*'); TextGrid boundaryGrid = new TextGrid(getMaxX()+2, getMaxY()+2); boundaryGrid.fillCellsWith(this, '*'); Iterator it = iterator(); while(it.hasNext()){ TextGrid.Cell cell = (TextGrid.Cell) it.next(); if(boundaryGrid.isBlank(cell.x, cell.y)) continue; CellSet boundarySet = boundaryGrid.fillContinuousArea(cell.x, cell.y, ' '); //boundarySet.translate( this.getMinX() - 1, this.getMinY() - 1); result.add(boundarySet); } return result; } /** * * Breaks that: *
    	 *  +-----+
    	 *  |     |
    	 *  +  ---+-------------------
    	 *  |     |
    	 *  +-----+
    	 * 
    * * into the following 3: * *
    	 *  +-----+
    	 *  |     |
    	 *  +     +
    	 *  |     |
    	 *  +-----+
    	 * 
    	 *     ---
    	 *         -------------------
    	 * 
    * * @param grid * @return a list of boundaries that are either open or closed but not mixed * and they are equivalent to the this */ public ArrayList breakTrulyMixedBoundaries(TextGrid grid){ ArrayList result = new ArrayList(); CellSet visitedEnds = new CellSet(); TextGrid workGrid = TextGrid.makeSameSizeAs(grid); grid.copyCellsTo(this, workGrid); if (DEBUG){ System.out.println("Breaking truly mixed boundaries below:"); workGrid.printDebug(); } Iterator it = iterator(); while(it.hasNext()){ TextGrid.Cell start = (TextGrid.Cell) it.next(); if(workGrid.isLinesEnd(start) && !visitedEnds.contains(start)){ if (DEBUG) System.out.println("Starting new subshape:"); CellSet set = new CellSet(); set.add(start); if(DEBUG) System.out.println("Added boundary "+start); TextGrid.Cell previous = start; TextGrid.Cell cell = null; CellSet nextCells = workGrid.followCell(previous); if(nextCells.size() == 0) throw new IllegalArgumentException("This shape is either open but multipart or has only one cell, and cannot be processed by this method"); cell = (TextGrid.Cell) nextCells.getFirst(); set.add(cell); if(DEBUG) System.out.println("Added boundary "+cell); boolean finished = false; if(workGrid.isLinesEnd(cell)){ visitedEnds.add(cell); finished = true; } while(!finished){ nextCells = workGrid.followCell(cell, previous); if(nextCells.size() == 1) { set.add(cell); if(DEBUG) System.out.println("Added boundary " + cell); previous = cell; cell = (TextGrid.Cell) nextCells.getFirst(); //if(!cell.equals(start) && grid.isPointCell(cell)) // s.addToPoints(makePointForCell(cell, workGrid, cellWidth, cellHeight, allRound)); if(workGrid.isLinesEnd(cell)){ visitedEnds.add(cell); finished = true; } } else if(nextCells.size() > 1) { finished = true; } } result.add(set); } } //substract all boundary sets from this CellSet CellSet whatsLeft = new CellSet(this); it = result.iterator(); while (it.hasNext()) { CellSet set = (CellSet) it.next(); whatsLeft.subtractSet(set); if(DEBUG) set.printAsGrid(); } result.add(whatsLeft); if(DEBUG) whatsLeft.printAsGrid(); return result; } public TextGrid makeIntoGrid(){ TextGrid grid = new TextGrid(getMaxX()+2, getMaxY()+2); grid.fillCellsWith(this, '*'); return grid; } public CellSet makeScaledOneThirdEquivalent(){ TextGrid gridBig = this.makeIntoGrid(); gridBig.fillCellsWith(this, '*'); if (VERBOSE_DEBUG){ System.out.println("---> making ScaledOneThirdEquivalent of:"); gridBig.printDebug(); } TextGrid gridSmall = new TextGrid((getMaxX() + 2) / 3, (getMaxY() + 2) / 3); for(int y = 0; y < gridBig.getHeight(); y++){ for(int x = 0; x < gridBig.getWidth(); x++){ TextGrid.Cell cell = gridBig.new Cell(x, y); if(!gridBig.isBlank(cell)) gridSmall.set(x/3, y/3, '*'); } } if (VERBOSE_DEBUG){ System.out.println("---> made into grid:"); gridSmall.printDebug(); } return gridSmall.getAllNonBlank(); } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/text/GridPattern.java000066400000000000000000000215251312650303100265320ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.text; import java.util.ArrayList; import java.util.Iterator; import java.util.regex.Pattern; /** * This is a TextGrid (usually 3x3) that contains the equivalent of a * 2D reqular expression (which uses custom syntax to make things more * visual, but standard syntax is also possible). * * The custom syntax is: * . means anything * b means any boundary (any of - = / \ + | :) * ! means not boundary (none of - = / \ + | :) * - means - or = * | means | or : * [ means not | nor : * ~ means not - nor = * ^ means a boundary but not - nor = * ( means a boundary but not | nor : * s means a straight boundary (one of - = + | :) * S means not a straight boundary (none of - = + | :) * * 1 means a cell that has entry point 1 * 2 means a cell that has entry point 2 * 3 means a cell that has entry point 3 etc. up to number 8 * * %1 means a cell that does not have entry point 1 etc. * * See below for an explanation of entry points * * +, \, / and the space are literal (as is any other character) * * * Entry points * *
     * 1   2   3
     *  *--*--*
     *  |     |
     * 8*     *4
     *  |     |
     *  *--*--*
     * 7   6   5
     * 
    * * We number the entry points for each cell as in the diagram * above. If a cell is occupied by a character, we define as * entry points the points of the above diagram that the character * can touch with the end of its lines. For example - has * entry points 8 and 4, | and : have entry points 2 and 6, * / has 3 and 7, \ has 1 and 5, + has 2, 6, 8 and 4 etc. * * * @author Efstathios Sideris */ public class GridPattern extends TextGrid { private ArrayList regExps = new ArrayList(); //TODO optimise: store as PatternS private boolean regExpsAreValid = false; private static final boolean DEBUG = false; private boolean usesStandardSyntax = false; public GridPattern(){ super(3, 3); } public GridPattern(String row1, String row2, String row3){ super(Math.max(Math.max(row1.length(), row2.length()), row3.length()), 3); setTo(row1, row2, row3); regExpsAreValid = false; } public boolean usesStandardSyntax() { return usesStandardSyntax; } public void setUsesStandardSyntax(boolean b) { usesStandardSyntax = b; regExpsAreValid = false; } public boolean isMatchedBy(TextGrid grid){ /*if(grid.getHeight() != this.getHeight() || grid.getWidth() != this.getWidth()) return false;*/ if(!regExpsAreValid) prepareRegExps(); for(int i = 0; i < grid.getHeight(); i++) { String row = grid.getRow(i).toString(); Pattern regexp = regExps.get(i); if(!regexp.matcher(row).matches()) { if(DEBUG) System.out.println(row+" does not match "+regexp); return false; } } return true; } private void prepareRegExps(){ regExpsAreValid = true; regExps.clear(); if (DEBUG) System.out.println("Trying to match:"); if(!usesStandardSyntax){ Iterator it = getRows().iterator(); while (it.hasNext()) { String row = it.next().toString(); regExps.add(Pattern.compile(makeRegExp(row))); if(DEBUG) System.out.println(row+" becomes "+makeRegExp(row)); } } else { Iterator it = getRows().iterator(); while (it.hasNext()) { String row = it.next().toString(); regExps.add(Pattern.compile(row)); } } } private String makeRegExp(String pattern){ StringBuilder result = new StringBuilder(); int tokensHandled = 0; for(int i = 0; i < pattern.length() && tokensHandled < 3; i++){ char c = pattern.charAt(i); if(c == '[') { result.append("[^|:]"); } else if(c == '|') { result.append("[|:]"); } else if(c == '-') { result.append("-"); } else if(c == '!') { result.append("[^-=\\/\\\\+|:]"); } else if(c == 'b') { result.append("[-=\\/\\\\+|:]"); } else if(c == '^') { result.append("[\\/\\\\+|:]"); } else if(c == '(') { result.append("[-=\\/\\\\+]"); } else if(c == '~') { result.append("."); } else if(c == '+') { result.append("\\+"); } else if(c == '\\') { result.append("\\\\"); } else if(c == 's') { result.append("[-=+|:]"); } else if(c == 'S') { result.append("[\\/\\\\]"); } else if(c == '*') { result.append("\\*"); //entry points } else if(c == '1') { result.append("[\\\\]"); } else if(c == '2') { result.append("[|:+\\/\\\\]"); } else if(c == '3') { result.append("[\\/]"); } else if(c == '4') { result.append("[-=+\\/\\\\]"); } else if(c == '5') { result.append("[\\\\]"); } else if(c == '6') { result.append("[|:+\\/\\\\]"); } else if(c == '7') { result.append("[\\/]"); } else if(c == '8') { result.append("[-=+\\/\\\\]"); //entry point negations } else if(c == '%') { if(i+1 > pattern.length()){ throw new RuntimeException("Invalid pattern, found % at the end"); } c = pattern.charAt(++i); if(c == '1') { result.append("[^\\\\]"); } else if(c == '2') { result.append("[^|:+\\/\\\\]"); } else if(c == '3') { result.append("[^\\/]"); } else if(c == '4') { result.append("[^-=+\\/\\\\]"); } else if(c == '5') { result.append("[^\\\\]"); } else if(c == '6') { result.append("[^|:+\\/\\\\]"); } else if(c == '7') { result.append("[^\\/]"); } else if(c == '8') { result.append("[^-=+\\/\\\\]"); } } else result.append(String.valueOf(c)); tokensHandled++; } return result.toString(); } public void setTo(String row1, String row2, String row3){ if(getHeight() != 3) throw new RuntimeException("This method can only be called for GridPatternS with height 3"); regExpsAreValid = false; writeStringTo(0, 0, row1); writeStringTo(0, 1, row2); writeStringTo(0, 2, row3); //don't use setRow() here! } public static void main(String[] args) { TextGrid grid = new TextGrid(3, 3); // grid.setRow(0, " "); // grid.setRow(1, "-\\ "); // grid.setRow(2, " | "); // // if(GridPatternGroup.corner2Criteria.isAnyMatchedBy(grid)){ // System.out.println("Grid is corner 2"); // } else { // System.out.println("Grid is not corner 2"); // } // // if(grid.isCorner2(grid.new Cell(1,1))){ // System.out.println("Grid is corner 2"); // } else { // System.out.println("Grid is not corner 2"); // } // // // grid.setRow(0, "-+ "); // grid.setRow(1, " | "); // grid.setRow(2, "-+ "); // // if(GridPatternGroup.cornerCriteria.isAnyMatchedBy(grid)){ // System.out.println("Grid is corner"); // } else { // System.out.println("Grid is not corner"); // } // // if(grid.isCorner(grid.new Cell(1,1))){ // System.out.println("Grid is corner"); // } else { // System.out.println("Grid is not corner"); // } grid.setRow(0, "---"); grid.setRow(1, " / "); grid.setRow(2, "---"); grid.printDebug(); if(GridPatternGroup.loneDiagonalCriteria.isAnyMatchedBy(grid)){ System.out.println("Grid is lone diagonal"); } else { System.out.println("Grid is not lone diagonal"); } grid.setRow(0, "--/"); grid.setRow(1, " / "); grid.setRow(2, "---"); grid.printDebug(); if(GridPatternGroup.loneDiagonalCriteria.isAnyMatchedBy(grid)){ System.out.println("Grid is lone diagonal"); } else { System.out.println("Grid is not lone diagonal"); } grid.setRow(0, "-- "); grid.setRow(1, " \\ "); grid.setRow(2, "---"); grid.printDebug(); if(GridPatternGroup.loneDiagonalCriteria.isAnyMatchedBy(grid)){ System.out.println("Grid is lone diagonal"); } else { System.out.println("Grid is not lone diagonal"); } grid.setRow(0, "-- "); grid.setRow(1, " \\ "); grid.setRow(2, "--\\"); grid.printDebug(); if(GridPatternGroup.loneDiagonalCriteria.isAnyMatchedBy(grid)){ System.out.println("Grid is lone diagonal"); } else { System.out.println("Grid is not lone diagonal"); } grid.setRow(0, " "); grid.setRow(1, "-\\/"); grid.setRow(2, " ||"); grid.printDebug(); if(GridPatternGroup.loneDiagonalCriteria.isAnyMatchedBy(grid)){ System.out.println("Grid is lone diagonal"); } else { System.out.println("Grid is not lone diagonal"); } } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/text/GridPatternGroup.java000066400000000000000000000265441312650303100275550ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.text; import java.util.ArrayList; import java.util.Iterator; /** * * @author Efstathios Sideris */ public class GridPatternGroup extends ArrayList { public boolean areAllMatchedBy(TextGrid grid){ Iterator it = iterator(); while (it.hasNext()) { GridPattern pattern = it.next(); if(!pattern.isMatchedBy(grid)) return false; } return true; } public boolean isAnyMatchedBy(TextGrid grid){ Iterator it = iterator(); while (it.hasNext()) { GridPattern pattern = it.next(); if(pattern.isMatchedBy(grid)) return true; } return false; } public void add(GridPattern... patterns) { for(GridPattern p : patterns) add(p); } //TODO: define criteria for on-line type? public static final GridPatternGroup cornerCriteria = new GridPatternGroup(); public static final GridPatternGroup normalCornerCriteria = new GridPatternGroup(); public static final GridPatternGroup roundCornerCriteria = new GridPatternGroup(); public static final GridPatternGroup corner1Criteria = new GridPatternGroup(); public static final GridPatternGroup corner2Criteria = new GridPatternGroup(); public static final GridPatternGroup corner3Criteria = new GridPatternGroup(); public static final GridPatternGroup corner4Criteria = new GridPatternGroup(); public static final GridPatternGroup normalCorner1Criteria = new GridPatternGroup(); public static final GridPatternGroup normalCorner2Criteria = new GridPatternGroup(); public static final GridPatternGroup normalCorner3Criteria = new GridPatternGroup(); public static final GridPatternGroup normalCorner4Criteria = new GridPatternGroup(); public static final GridPatternGroup roundCorner1Criteria = new GridPatternGroup(); public static final GridPatternGroup roundCorner2Criteria = new GridPatternGroup(); public static final GridPatternGroup roundCorner3Criteria = new GridPatternGroup(); public static final GridPatternGroup roundCorner4Criteria = new GridPatternGroup(); public static final GridPatternGroup intersectionCriteria = new GridPatternGroup(); public static final GridPatternGroup TCriteria = new GridPatternGroup(); public static final GridPatternGroup inverseTCriteria = new GridPatternGroup(); public static final GridPatternGroup KCriteria = new GridPatternGroup(); public static final GridPatternGroup inverseKCriteria = new GridPatternGroup(); public static final GridPatternGroup crossCriteria = new GridPatternGroup(); public static final GridPatternGroup stubCriteria = new GridPatternGroup(); public static final GridPatternGroup verticalLinesEndCriteria = new GridPatternGroup(); public static final GridPatternGroup horizontalLinesEndCriteria = new GridPatternGroup(); public static final GridPatternGroup linesEndCriteria = new GridPatternGroup(); public static final GridPatternGroup crossOnLineCriteria = new GridPatternGroup(); public static final GridPatternGroup horizontalCrossOnLineCriteria = new GridPatternGroup(); public static final GridPatternGroup verticalCrossOnLineCriteria = new GridPatternGroup(); public static final GridPatternGroup starOnLineCriteria = new GridPatternGroup(); public static final GridPatternGroup horizontalStarOnLineCriteria = new GridPatternGroup(); public static final GridPatternGroup verticalStarOnLineCriteria = new GridPatternGroup(); public static final GridPatternGroup loneDiagonalCriteria = new GridPatternGroup(); static { GridPattern crossPattern1 = new GridPattern( ".6.", "4+8", ".2." ); crossCriteria.add(crossPattern1); GridPattern KPattern1 = new GridPattern( ".6.", "%4+8", ".2." ); KCriteria.add(KPattern1); GridPattern inverseKPattern1 = new GridPattern( ".6.", "4+%8", ".2." ); inverseKCriteria.add(inverseKPattern1); GridPattern TPattern1 = new GridPattern( ".%6.", "4+8", ".2." ); TCriteria.add(TPattern1); GridPattern inverseTPattern1 = new GridPattern( ".6.", "4+8", ".%2." ); inverseTCriteria.add(inverseTPattern1); // ****** normal corners ******* GridPattern normalCorner1Pattern1 = new GridPattern( ".[.", "~+(", ".^." ); normalCorner1Criteria.add(normalCorner1Pattern1); GridPattern normalCorner2Pattern1 = new GridPattern( ".[.", "(+~", ".^." ); normalCorner2Criteria.add(normalCorner2Pattern1); GridPattern normalCorner3Pattern1 = new GridPattern( ".^.", "(+~", ".[." ); normalCorner3Criteria.add(normalCorner3Pattern1); GridPattern normalCorner4Pattern1 = new GridPattern( ".^.", "~+(", ".[." ); normalCorner4Criteria.add(normalCorner4Pattern1); // ******* round corners ******* GridPattern roundCorner1Pattern1 = new GridPattern( ".[.", "~/4", ".2." ); roundCorner1Criteria.add(roundCorner1Pattern1); GridPattern roundCorner2Pattern1 = new GridPattern( ".[.", "4\\~", ".2." ); roundCorner2Criteria.add(roundCorner2Pattern1); GridPattern roundCorner3Pattern1 = new GridPattern( ".6.", "4/~", ".[." ); roundCorner3Criteria.add(roundCorner3Pattern1); GridPattern roundCorner4Pattern1 = new GridPattern( ".6.", "~\\8", ".[." ); roundCorner4Criteria.add(roundCorner4Pattern1); //stubs GridPattern stubPattern1 = new GridPattern( "!^!", "!+!", ".!." ); stubCriteria.add(stubPattern1); GridPattern stubPattern2 = new GridPattern( "!^!", "!+!", ".-." ); stubCriteria.add(stubPattern2); GridPattern stubPattern3 = new GridPattern( "!!.", "(+!", "!!." ); stubCriteria.add(stubPattern3); GridPattern stubPattern4 = new GridPattern( "!!.", "(+|", "!!." ); stubCriteria.add(stubPattern4); GridPattern stubPattern5 = new GridPattern( ".!.", "!+!", "!^!" ); stubCriteria.add(stubPattern5); GridPattern stubPattern6 = new GridPattern( ".-.", "!+!", "!^!" ); stubCriteria.add(stubPattern6); GridPattern stubPattern7 = new GridPattern( ".!!", "!+(", ".!!" ); stubCriteria.add(stubPattern7); GridPattern stubPattern8 = new GridPattern( ".!!", "|+(", ".!!" ); stubCriteria.add(stubPattern8); // ****** ends of lines ****** GridPattern verticalLinesEndPattern1 = new GridPattern( ".^.", ".|.", ".!." ); verticalLinesEndCriteria.add(verticalLinesEndPattern1); GridPattern verticalLinesEndPattern2 = new GridPattern( ".^.", ".|.", ".-." ); verticalLinesEndCriteria.add(verticalLinesEndPattern2); GridPattern horizontalLinesEndPattern3 = new GridPattern( "...", "(-!", "..." ); horizontalLinesEndCriteria.add(horizontalLinesEndPattern3); GridPattern horizontalLinesEndPattern4 = new GridPattern( "...", "(-|", "..." ); horizontalLinesEndCriteria.add(horizontalLinesEndPattern4); GridPattern verticalLinesEndPattern5 = new GridPattern( ".!.", ".|.", ".^." ); verticalLinesEndCriteria.add(verticalLinesEndPattern5); GridPattern verticalLinesEndPattern6 = new GridPattern( ".-.", ".|.", ".^." ); verticalLinesEndCriteria.add(verticalLinesEndPattern6); GridPattern horizontalLinesEndPattern7 = new GridPattern( "...", "!-(", "..." ); horizontalLinesEndCriteria.add(horizontalLinesEndPattern7); GridPattern horizontalLinesEndPattern8 = new GridPattern( "...", "|-(", "..." ); horizontalLinesEndCriteria.add(horizontalLinesEndPattern8); // ****** others ******* GridPattern horizontalCrossOnLinePattern1 = new GridPattern( "...", "(+(", "..." ); horizontalCrossOnLineCriteria.add(horizontalCrossOnLinePattern1); GridPattern verticalCrossOnLinePattern1 = new GridPattern( ".^.", ".+.", ".^." ); verticalCrossOnLineCriteria.add(verticalCrossOnLinePattern1); GridPattern horizontalStarOnLinePattern1 = new GridPattern( "...", "(*(", "..." ); horizontalStarOnLineCriteria.add(horizontalStarOnLinePattern1); GridPattern horizontalStarOnLinePattern2 = new GridPattern( "...", "!*(", "..." ); horizontalStarOnLineCriteria.add(horizontalStarOnLinePattern2); GridPattern horizontalStarOnLinePattern3 = new GridPattern( "...", "(*!", "..." ); horizontalStarOnLineCriteria.add(horizontalStarOnLinePattern3); GridPattern verticalStarOnLinePattern1 = new GridPattern( ".^.", ".*.", ".^." ); verticalStarOnLineCriteria.add(verticalStarOnLinePattern1); GridPattern verticalStarOnLinePattern2 = new GridPattern( ".!.", ".*.", ".^." ); verticalStarOnLineCriteria.add(verticalStarOnLinePattern2); GridPattern verticalStarOnLinePattern3 = new GridPattern( ".^.", ".*.", ".!." ); verticalStarOnLineCriteria.add(verticalStarOnLinePattern3); GridPattern loneDiagonalPattern1 = new GridPattern( ".%6%7", "%4/%8", "%3%2." ); loneDiagonalCriteria.add(loneDiagonalPattern1); GridPattern loneDiagonalPattern2 = new GridPattern( "%1%6.", "%4\\%8", ".%2%5" ); loneDiagonalCriteria.add(loneDiagonalPattern2); //groups intersectionCriteria.addAll(crossCriteria); intersectionCriteria.addAll(KCriteria); intersectionCriteria.addAll(TCriteria); intersectionCriteria.addAll(inverseKCriteria); intersectionCriteria.addAll(inverseTCriteria); normalCornerCriteria.addAll(normalCorner1Criteria); normalCornerCriteria.addAll(normalCorner2Criteria); normalCornerCriteria.addAll(normalCorner3Criteria); normalCornerCriteria.addAll(normalCorner4Criteria); roundCornerCriteria.addAll(roundCorner1Criteria); roundCornerCriteria.addAll(roundCorner2Criteria); roundCornerCriteria.addAll(roundCorner3Criteria); roundCornerCriteria.addAll(roundCorner4Criteria); corner1Criteria.addAll(normalCorner1Criteria); corner1Criteria.addAll(roundCorner1Criteria); corner2Criteria.addAll(normalCorner2Criteria); corner2Criteria.addAll(roundCorner2Criteria); corner3Criteria.addAll(normalCorner3Criteria); corner3Criteria.addAll(roundCorner3Criteria); corner4Criteria.addAll(normalCorner4Criteria); corner4Criteria.addAll(roundCorner4Criteria); cornerCriteria.addAll(normalCornerCriteria); cornerCriteria.addAll(roundCornerCriteria); crossOnLineCriteria.addAll(horizontalCrossOnLineCriteria); crossOnLineCriteria.addAll(verticalCrossOnLineCriteria); starOnLineCriteria.addAll(horizontalStarOnLineCriteria); starOnLineCriteria.addAll(verticalStarOnLineCriteria); linesEndCriteria.addAll(horizontalLinesEndCriteria); linesEndCriteria.addAll(verticalLinesEndCriteria); linesEndCriteria.addAll(stubCriteria); } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/text/StringUtils.java000066400000000000000000000114271312650303100265760ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.text; /** * @author sideris * * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments */ public class StringUtils { /** * The indexOf idiom * * @param big * @param fragment * @return */ public static boolean contains(String big, String fragment){ return (big.indexOf(fragment) != -1); } public static String repeatString(String string, int repeats){ if(repeats == 0) return ""; String buffer = ""; for(int i=0; i < repeats; i++){ buffer += string; } return buffer; } /*public static String repeatString(String string, int repeats){ if(repeats == 0) return ""; StringBuffer buffer = new StringBuffer(""); for(int i=0; i < repeats; i++){ buffer.append(string); } return buffer.toString(); }*/ public static boolean isBlank(String s){ return (s.length() == 0 || s.matches("^\\s*$")); } /** * * Converts the first character of string into a capital letter * * @param string * @return */ public static String firstToUpper(String string){ return string.substring(0,1).toUpperCase()+string.substring(1); } public static String insertSpaceAtCaps(String string){ int uppers = 0; //first we count for(int i=0; i < string.length(); i++){ if(Character.isUpperCase(string.charAt(i))) uppers++; } int[] indexes = null; if(Character.isUpperCase(string.charAt(0))){ indexes = new int[uppers]; } else { indexes = new int[++uppers]; } indexes[0] = 0; int k = 1; //then we find the indexes (we have ckecked the first char already) for(int j =1; j < string.length(); j++){ if(Character.isUpperCase(string.charAt(j))) indexes[k++] = j; } StringBuffer buffer = new StringBuffer(""); //and finally we breakup the String for(int i =0; i < indexes.length; i++){ if(i+1 < indexes.length){ buffer.append(string.substring(indexes[i], indexes[i+1])); buffer.append(" "); } else { buffer.append(string.substring(indexes[i])); } } return buffer.toString(); } public static boolean isOneOf(char c, char[] group){ for(int i = 0; i < group.length; i++) if(c == group[i]) return true; return false; } public static boolean isOneOf(String str, String[] group){ for(int i = 0; i < group.length; i++) if(str.equals(group[i])) return true; return false; } public static String getPath(String fullPath){ if(fullPath.lastIndexOf("\\") != -1) return fullPath.substring(0, fullPath.lastIndexOf("\\")); else return ""; } public static String getBaseFilename(String fullPath){ if(fullPath.lastIndexOf(".") != -1 && fullPath.lastIndexOf("\\") != -1) return fullPath.substring(fullPath.lastIndexOf("\\") + 1, fullPath.lastIndexOf(".")); else return fullPath; } public static String getExtension(String fullPath){ if(fullPath.lastIndexOf(".") != -1) return fullPath.substring(fullPath.lastIndexOf(".") + 1); else return ""; } public static void main(String[] args){ System.out.println("1 "+StringUtils.firstToUpper("testing")); System.out.println("2 "+StringUtils.firstToUpper(" testing")); System.out.println("3 "+StringUtils.firstToUpper("_testing")); System.out.println("4 "+StringUtils.firstToUpper("Testing")); System.out.println("5 "+StringUtils.firstToUpper("ttesting")); String path = "C:\\Files\\test.txt"; System.out.println(path); System.out.println(StringUtils.getPath(path)); System.out.println(StringUtils.getBaseFilename(path)); System.out.println(StringUtils.getExtension(path)); path = "test.txt"; System.out.println(path); System.out.println(StringUtils.getPath(path)); System.out.println(StringUtils.getBaseFilename(path)); System.out.println(StringUtils.getExtension(path)); path = "test"; System.out.println(path); System.out.println("path: "+StringUtils.getPath(path)); System.out.println("base: "+StringUtils.getBaseFilename(path)); System.out.println(" ext: "+StringUtils.getExtension(path)); } } plantuml-1.2017.15/src/org/stathissideris/ascii2image/text/TextGrid.java000066400000000000000000001353531312650303100260460ustar00rootroot00000000000000/* * DiTAA - Diagrams Through Ascii Art * * Copyright (C) 2004 Efstathios Sideris * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.stathissideris.ascii2image.text; import java.awt.Color; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Stack; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.stathissideris.ascii2image.core.FileUtils; import org.stathissideris.ascii2image.core.ProcessingOptions; /** * * @author Efstathios Sideris */ public class TextGrid { private static final boolean DEBUG = false; private ArrayList rows; private static char[] boundaries = {'/', '\\', '|', '-', '*', '=', ':'}; private static char[] undisputableBoundaries = {'|', '-', '*', '=', ':'}; private static char[] horizontalLines = {'-', '='}; private static char[] verticalLines = {'|', ':'}; private static char[] arrowHeads = {'<', '>', '^', 'v', 'V'}; private static char[] cornerChars = {'\\', '/', '+'}; private static char[] pointMarkers = {'*'}; private static char[] dashedLines = {':', '~', '='}; private static char[] entryPoints1 = {'\\'}; private static char[] entryPoints2 = {'|', ':', '+', '\\', '/'}; private static char[] entryPoints3 = {'/'}; private static char[] entryPoints4 = {'-', '=', '+', '\\', '/'}; private static char[] entryPoints5 = {'\\'}; private static char[] entryPoints6 = {'|', ':', '+', '\\', '/'}; private static char[] entryPoints7 = {'/'}; private static char[] entryPoints8 = {'-', '=', '+', '\\', '/'}; private static HashMap humanColorCodes = new HashMap(); static { humanColorCodes.put("GRE", "9D9"); humanColorCodes.put("BLU", "55B"); humanColorCodes.put("PNK", "FAA"); humanColorCodes.put("RED", "E32"); humanColorCodes.put("YEL", "FF3"); humanColorCodes.put("BLK", "000"); } private static HashSet markupTags = new HashSet(); static { markupTags.add("d"); markupTags.add("s"); markupTags.add("io"); markupTags.add("c"); markupTags.add("mo"); markupTags.add("tr"); markupTags.add("o"); } public void addToMarkupTags(Collection tags){ markupTags.addAll(tags); } public static void main(String[] args) throws Exception { TextGrid grid = new TextGrid(); grid.loadFrom("tests/text/art10.txt"); grid.writeStringTo(grid.new Cell(28, 1), "testing"); grid.findMarkupTags(); grid.printDebug(); //System.out.println(grid.fillContinuousArea(0, 0, '-').size()+" cells filled"); //grid.fillContinuousArea(4, 4, '-'); //grid.getSubGrid(1,1,3,3).printDebug(); //grid.printDebug(); } public TextGrid(){ rows = new ArrayList(); } public TextGrid(int width, int height){ String space = StringUtils.repeatString(" ", width); rows = new ArrayList(); for(int i = 0; i < height; i++) rows.add(new StringBuffer(space)); } public static TextGrid makeSameSizeAs(TextGrid grid){ return new TextGrid(grid.getWidth(), grid.getHeight()); } public TextGrid(TextGrid otherGrid){ rows = new ArrayList(); for(StringBuffer row : otherGrid.getRows()) { rows.add(new StringBuffer(row)); } } public void clear(){ String blank = StringUtils.repeatString(" ", getWidth()); int height = getHeight(); rows.clear(); for(int i = 0; i < height; i++) rows.add(new StringBuffer(blank)); } // duplicated code due to lots of hits to this function public char get(int x, int y){ if(x > getWidth() - 1 || y > getHeight() - 1 || x < 0 || y < 0) return 0; return rows.get(y).charAt(x); } //duplicated code due to lots of hits to this function public char get(Cell cell){ if(cell.x > getWidth() - 1 || cell.y > getHeight() - 1 || cell.x < 0 || cell.y < 0) return 0; return rows.get(cell.y).charAt(cell.x); } public StringBuffer getRow(int y){ return rows.get(y); } public TextGrid getSubGrid(int x, int y, int width, int height){ TextGrid grid = new TextGrid(width, height); for(int i = 0; i < height; i++){ grid.setRow(i, new StringBuffer(getRow(y + i).subSequence(x, x + width))); } return grid; } public TextGrid getTestingSubGrid(Cell cell){ return getSubGrid(cell.x - 1, cell.y - 1, 3, 3); } public String getStringAt(int x, int y, int length){ return getStringAt(new Cell(x, y), length); } public String getStringAt(Cell cell, int length){ int x = cell.x; int y = cell.y; if(x > getWidth() - 1 || y > getHeight() - 1 || x < 0 || y < 0) return null; return rows.get(y).substring(x, x + length); } public char getNorthOf(int x, int y){ return get(x, y - 1); } public char getSouthOf(int x, int y){ return get(x, y + 1); } public char getEastOf(int x, int y){ return get(x + 1, y); } public char getWestOf(int x, int y){ return get(x - 1, y); } public char getNorthOf(Cell cell){ return getNorthOf(cell.x, cell.y); } public char getSouthOf(Cell cell){ return getSouthOf(cell.x, cell.y); } public char getEastOf(Cell cell){ return getEastOf(cell.x, cell.y); } public char getWestOf(Cell cell){ return getWestOf(cell.x, cell.y); } public void writeStringTo(int x, int y, String str){ writeStringTo(new Cell(x, y), str); } public void writeStringTo(Cell cell, String str){ if(isOutOfBounds(cell)) return; rows.get(cell.y).replace(cell.x, cell.x + str.length(), str); } public void set(Cell cell, char c){ set(cell.x, cell.y, c); } public void set(int x, int y, char c){ if(x > getWidth() - 1 || y > getHeight() - 1) return; StringBuffer row = rows.get(y); row.setCharAt(x, c); } public void setRow(int y, String row){ if(y > getHeight() || row.length() != getWidth()) throw new IllegalArgumentException("setRow out of bounds or string wrong size"); rows.set(y, new StringBuffer(row)); } public void setRow(int y, StringBuffer row){ if(y > getHeight() || row.length() != getWidth()) throw new IllegalArgumentException("setRow out of bounds or string wrong size"); rows.set(y, row); } public int getWidth(){ if(rows.size() == 0) return 0; //empty buffer return rows.get(0).length(); } public int getHeight(){ return rows.size(); } public void printDebug(){ Iterator it = rows.iterator(); int i = 0; System.out.println( " " +StringUtils.repeatString("0123456789", (int) Math.floor(getWidth()/10)+1)); while(it.hasNext()){ String row = it.next().toString(); String index = new Integer(i).toString(); if(i < 10) index = " "+index; System.out.println(index+" ("+row+")"); i++; } } public String getDebugString(){ StringBuffer buffer = new StringBuffer(); Iterator it = rows.iterator(); int i = 0; buffer.append( " " +StringUtils.repeatString("0123456789", (int) Math.floor(getWidth()/10)+1)+"\n"); while(it.hasNext()){ String row = it.next().toString(); String index = new Integer(i).toString(); if(i < 10) index = " "+index; row = row.replaceAll("\n", "\\\\n"); row = row.replaceAll("\r", "\\\\r"); buffer.append(index+" ("+row+")\n"); i++; } return buffer.toString(); } public String toString(){ return getDebugString(); } /** * Adds grid to this. Space characters in this grid * are replaced with the corresponding contents of * grid, otherwise the contents are unchanged. * * @param grid * @return false if the grids are of different size */ public boolean add(TextGrid grid){ if(getWidth() != grid.getWidth() || getHeight() != grid.getHeight()) return false; int width = getWidth(); int height = getHeight(); for(int yi = 0; yi < height; yi++){ for(int xi = 0; xi < width; xi++){ if(get(xi, yi) == ' ') set(xi, yi, grid.get(xi, yi)); } } return true; } /** * Replaces letters or numbers that are on horizontal or vertical * lines, with the appropriate character that will make the line * continuous (| for vertical and - for horizontal lines) * */ public void replaceTypeOnLine(){ int width = getWidth(); int height = getHeight(); for(int yi = 0; yi < height; yi++){ for(int xi = 0; xi < width; xi++){ char c = get(xi, yi); if(Character.isLetterOrDigit(c)) { boolean isOnHorizontalLine = isOnHorizontalLine(xi, yi); boolean isOnVerticalLine = isOnVerticalLine(xi, yi); if(isOnHorizontalLine && isOnVerticalLine){ set(xi, yi, '+'); if(DEBUG) System.out.println("replaced type on line '"+c+"' with +"); } else if(isOnHorizontalLine){ set(xi, yi, '-'); if(DEBUG) System.out.println("replaced type on line '"+c+"' with -"); } else if(isOnVerticalLine){ set(xi, yi, '|'); if(DEBUG) System.out.println("replaced type on line '"+c+"' with |"); } } } } } public void replacePointMarkersOnLine(){ int width = getWidth(); int height = getHeight(); for(int yi = 0; yi < height; yi++){ for(int xi = 0; xi < width; xi++){ char c = get(xi, yi); Cell cell = new Cell(xi, yi); if(StringUtils.isOneOf(c, pointMarkers) && isStarOnLine(cell)){ boolean isOnHorizontalLine = false; if(StringUtils.isOneOf(get(cell.getEast()), horizontalLines)) isOnHorizontalLine = true; if(StringUtils.isOneOf(get(cell.getWest()), horizontalLines)) isOnHorizontalLine = true; boolean isOnVerticalLine = false; if(StringUtils.isOneOf(get(cell.getNorth()), verticalLines)) isOnVerticalLine = true; if(StringUtils.isOneOf(get(cell.getSouth()), verticalLines)) isOnVerticalLine = true; if(isOnHorizontalLine && isOnVerticalLine){ set(xi, yi, '+'); if(DEBUG) System.out.println("replaced marker on line '"+c+"' with +"); } else if(isOnHorizontalLine){ set(xi, yi, '-'); if(DEBUG) System.out.println("replaced marker on line '"+c+"' with -"); } else if(isOnVerticalLine){ set(xi, yi, '|'); if(DEBUG) System.out.println("replaced marker on line '"+c+"' with |"); } } } } } public CellSet getPointMarkersOnLine(){ CellSet result = new CellSet(); int width = getWidth(); int height = getHeight(); for(int yi = 0; yi < height; yi++){ for(int xi = 0; xi < width; xi++){ char c = get(xi, yi); if(StringUtils.isOneOf(c, pointMarkers) && isStarOnLine(new Cell(xi, yi))){ result.add(new Cell(xi, yi)); } } } return result; } public void replaceHumanColorCodes(){ int height = getHeight(); for(int y = 0; y < height; y++){ String row = rows.get(y).toString(); Iterator it = humanColorCodes.keySet().iterator(); while(it.hasNext()){ String humanCode = (String) it.next(); String hexCode = (String) humanColorCodes.get(humanCode); if(hexCode != null){ humanCode = "c" + humanCode; hexCode = "c" + hexCode; row = row.replaceAll(humanCode, hexCode); rows.set(y, new StringBuffer(row)); //TODO: this is not the most efficient way to do this row = rows.get(y).toString(); } } } } /** * Replace all occurences of c1 with c2 * * @param c1 * @param c2 */ public void replaceAll(char c1, char c2){ int width = getWidth(); int height = getHeight(); for(int yi = 0; yi < height; yi++){ for(int xi = 0; xi < width; xi++){ char c = get(xi, yi); if(c == c1) set(xi, yi, c2); } } } public boolean hasBlankCells(){ CellSet set = new CellSet(); int width = getWidth(); int height = getHeight(); for(int y = 0; y < height; y++){ for(int x = 0; x < width; x++){ Cell cell = new Cell(x, y); if(isBlank(cell)) return true; } } return false; } public CellSet getAllNonBlank(){ CellSet set = new CellSet(); int width = getWidth(); int height = getHeight(); for(int y = 0; y < height; y++){ for(int x = 0; x < width; x++){ Cell cell = new Cell(x, y); if(!isBlank(cell)) set.add(cell); } } return set; } public CellSet getAllBoundaries(){ CellSet set = new CellSet(); int width = getWidth(); int height = getHeight(); for(int y = 0; y < height; y++){ for(int x = 0; x < width; x++){ Cell cell = new Cell(x, y); if(isBoundary(cell)) set.add(cell); } } return set; } public CellSet getAllBlanksBetweenCharacters(){ CellSet set = new CellSet(); int width = getWidth(); int height = getHeight(); for(int y = 0; y < height; y++){ for(int x = 0; x < width; x++){ Cell cell = new Cell(x, y); if(isBlankBetweenCharacters(cell)) set.add(cell); } } return set; } /** * Returns an ArrayList of CellStringPairs that * represents all the continuous (non-blank) Strings * in the grid. Used on buffers that contain only * type, in order to find the positions and the * contents of the strings. * * @return */ public ArrayList findStrings(){ ArrayList result = new ArrayList(); int width = getWidth(); int height = getHeight(); for(int y = 0; y < height; y++){ for(int x = 0; x < width; x++){ if(!isBlank(x, y)){ Cell start = new Cell(x, y); String str = String.valueOf(get(x,y)); char c = get(++x, y); boolean finished = false; //while(c != ' '){ while(!finished){ str += String.valueOf(c); c = get(++x, y); char next = get(x + 1, y); if((c == ' ' || c == 0) && (next == ' ' || next == 0)) finished = true; } result.add(new CellStringPair(start, str)); } } } return result; } /** * This is done in a bit of a messy way, should be impossible * to go out of sync with corresponding GridPatternGroup. * * @param cell * @param entryPointId * @return */ public boolean hasEntryPoint(Cell cell, int entryPointId){ String result = ""; char c = get(cell); if(entryPointId == 1) { return StringUtils.isOneOf(c, entryPoints1); } else if(entryPointId == 2) { return StringUtils.isOneOf(c, entryPoints2); } else if(entryPointId == 3) { return StringUtils.isOneOf(c, entryPoints3); } else if(entryPointId == 4) { return StringUtils.isOneOf(c, entryPoints4); } else if(entryPointId == 5) { return StringUtils.isOneOf(c, entryPoints5); } else if(entryPointId == 6) { return StringUtils.isOneOf(c, entryPoints6); } else if(entryPointId == 7) { return StringUtils.isOneOf(c, entryPoints7); } else if(entryPointId == 8) { return StringUtils.isOneOf(c, entryPoints8); } return false; } /** * true if cell is blank and the east and west cells are not * (used to find gaps between words) * * @param cell * @return */ public boolean isBlankBetweenCharacters(Cell cell){ return (isBlank(cell) && !isBlank(cell.getEast()) && !isBlank(cell.getWest())); } /** * Makes blank all the cells that contain non-text * elements. */ public void removeNonText(){ //the following order is significant //since the south-pointing arrowheads //are determined based on the surrounding boundaries removeArrowheads(); removeColorCodes(); removeBoundaries(); removeMarkupTags(); } public void removeArrowheads(){ int width = getWidth(); int height = getHeight(); for(int yi = 0; yi < height; yi++){ for(int xi = 0; xi < width; xi++){ Cell cell = new Cell(xi, yi); if(isArrowhead(cell)) set(cell, ' '); } } } public void removeColorCodes(){ Iterator cells = findColorCodes().iterator(); while(cells.hasNext()){ Cell cell = ((CellColorPair) cells.next()).cell; set(cell, ' '); cell = cell.getEast(); set(cell, ' '); cell = cell.getEast(); set(cell, ' '); cell = cell.getEast(); set(cell, ' '); } } public void removeBoundaries(){ ArrayList toBeRemoved = new ArrayList(); int width = getWidth(); int height = getHeight(); for(int yi = 0; yi < height; yi++){ for(int xi = 0; xi < width; xi++){ Cell cell = new Cell(xi, yi); if(isBoundary(cell)) toBeRemoved.add(cell); } } //remove in two stages, because decision of //isBoundary depends on contants of surrounding //cells Iterator it = toBeRemoved.iterator(); while(it.hasNext()){ Cell cell = (Cell) it.next(); set(cell, ' '); } } public ArrayList findArrowheads(){ ArrayList result = new ArrayList(); int width = getWidth(); int height = getHeight(); for(int yi = 0; yi < height; yi++){ for(int xi = 0; xi < width; xi++){ Cell cell = new Cell(xi, yi); if(isArrowhead(cell)) result.add(cell); } } if(DEBUG) System.out.println(result.size()+" arrowheads found"); return result; } public ArrayList findColorCodes(){ Pattern colorCodePattern = Pattern.compile("c[A-F0-9]{3}"); ArrayList result = new ArrayList(); int width = getWidth(); int height = getHeight(); for(int yi = 0; yi < height; yi++){ for(int xi = 0; xi < width - 3; xi++){ Cell cell = new Cell(xi, yi); String s = getStringAt(cell, 4); Matcher matcher = colorCodePattern.matcher(s); if(matcher.matches()){ char cR = s.charAt(1); char cG = s.charAt(2); char cB = s.charAt(3); int r = Integer.valueOf(String.valueOf(cR), 16).intValue() * 17; int g = Integer.valueOf(String.valueOf(cG), 16).intValue() * 17; int b = Integer.valueOf(String.valueOf(cB), 16).intValue() * 17; result.add(new CellColorPair(cell, new Color(r, g, b))); } } } if(DEBUG) System.out.println(result.size()+" color codes found"); return result; } public ArrayList findMarkupTags(){ Pattern tagPattern = Pattern.compile("\\{(.+?)\\}"); ArrayList result = new ArrayList(); int width = getWidth(); int height = getHeight(); for(int y = 0; y < height; y++){ for(int x = 0; x < width - 3; x++){ Cell cell = new Cell(x, y); char c = get(cell); if(c == '{'){ String rowPart = rows.get(y).substring(x); Matcher matcher = tagPattern.matcher(rowPart); if(matcher.find()){ String tagName = matcher.group(1); if(markupTags.contains(tagName)){ if(DEBUG) System.out.println("found tag "+tagName+" at "+x+", "+y); result.add(new CellTagPair(new Cell(x, y), tagName)); } } } } } return result; } public void removeMarkupTags(){ Iterator it = findMarkupTags().iterator(); while (it.hasNext()) { CellTagPair pair = (CellTagPair) it.next(); String tagName = pair.tag; if(tagName == null) continue; int length = 2 + tagName.length(); writeStringTo(pair.cell, StringUtils.repeatString(" ", length)); } } public boolean matchesAny(GridPatternGroup criteria){ return criteria.isAnyMatchedBy(this); } public boolean matchesAll(GridPatternGroup criteria){ return criteria.areAllMatchedBy(this); } public boolean matches(GridPattern criteria){ return criteria.isMatchedBy(this); } public boolean isOnHorizontalLine(Cell cell){ return isOnHorizontalLine(cell.x, cell.y); } private boolean isOnHorizontalLine(int x, int y){ char c1 = get(x - 1, y); char c2 = get(x + 1, y); if(isHorizontalLine(c1) && isHorizontalLine(c2)) return true; return false; } public boolean isOnVerticalLine(Cell cell){ return isOnVerticalLine(cell.x, cell.y); } private boolean isOnVerticalLine(int x, int y){ char c1 = get(x, y - 1); char c2 = get(x, y + 1); if(isVerticalLine(c1) && isVerticalLine(c2)) return true; return false; } public static boolean isBoundary(char c){ return StringUtils.isOneOf(c, boundaries); } public boolean isBoundary(int x, int y){ return isBoundary(new Cell(x, y)); } public boolean isBoundary(Cell cell){ char c = get(cell.x, cell.y); if(0 == c) return false; if('+' == c || '\\' == c || '/' == c){ // System.out.print(""); if( isIntersection(cell) || isCorner(cell) || isStub(cell) || isCrossOnLine(cell)){ return true; } else return false; } //return StringUtils.isOneOf(c, undisputableBoundaries); if(StringUtils.isOneOf(c, boundaries) && !isLoneDiagonal(cell)){ return true; } return false; } public boolean isLine(Cell cell){ return isHorizontalLine(cell) || isVerticalLine(cell); } public static boolean isHorizontalLine(char c){ return StringUtils.isOneOf(c, horizontalLines); } public boolean isHorizontalLine(Cell cell){ return isHorizontalLine(cell.x, cell.y); } public boolean isHorizontalLine(int x, int y){ char c = get(x, y); if(0 == c) return false; return StringUtils.isOneOf(c, horizontalLines); } public static boolean isVerticalLine(char c){ return StringUtils.isOneOf(c, verticalLines); } public boolean isVerticalLine(Cell cell){ return isVerticalLine(cell.x, cell.y); } public boolean isVerticalLine(int x, int y){ char c = get(x, y); if(0 == c) return false; return StringUtils.isOneOf(c, verticalLines); } public boolean isLinesEnd(int x, int y){ return isLinesEnd(new Cell(x, y)); } /** * Stubs are also considered end of lines * * @param cell * @return */ public boolean isLinesEnd(Cell cell){ return matchesAny(cell, GridPatternGroup.linesEndCriteria); } public boolean isVerticalLinesEnd(Cell cell){ return matchesAny(cell, GridPatternGroup.verticalLinesEndCriteria); } public boolean isHorizontalLinesEnd(Cell cell){ return matchesAny(cell, GridPatternGroup.horizontalLinesEndCriteria); } public boolean isPointCell(Cell cell){ return ( isCorner(cell) || isIntersection(cell) || isStub(cell) || isLinesEnd(cell)); } public boolean containsAtLeastOneDashedLine(CellSet set){ Iterator it = set.iterator(); while(it.hasNext()) { Cell cell = (Cell) it.next(); if(StringUtils.isOneOf(get(cell), dashedLines)) return true; } return false; } public boolean exactlyOneNeighbourIsBoundary(Cell cell) { int howMany = 0; if(isBoundary(cell.getNorth())) howMany++; if(isBoundary(cell.getSouth())) howMany++; if(isBoundary(cell.getEast())) howMany++; if(isBoundary(cell.getWest())) howMany++; return (howMany == 1); } /** * * A stub looks like that: * *
    	 * 
    	 * +- or -+ or + or + or /- or -/ or / (you get the point)
    	 *             |    |                |
    	 * 
    	 * 
    * * @param cell * @return */ public boolean isStub(Cell cell){ return matchesAny(cell, GridPatternGroup.stubCriteria); } public boolean isCrossOnLine(Cell cell){ return matchesAny(cell, GridPatternGroup.crossOnLineCriteria); } public boolean isHorizontalCrossOnLine(Cell cell){ return matchesAny(cell, GridPatternGroup.horizontalCrossOnLineCriteria); } public boolean isVerticalCrossOnLine(Cell cell){ return matchesAny(cell, GridPatternGroup.verticalCrossOnLineCriteria); } public boolean isStarOnLine(Cell cell){ return matchesAny(cell, GridPatternGroup.starOnLineCriteria); } public boolean isLoneDiagonal(Cell cell){ return matchesAny(cell, GridPatternGroup.loneDiagonalCriteria); } public boolean isHorizontalStarOnLine(Cell cell){ return matchesAny(cell, GridPatternGroup.horizontalStarOnLineCriteria); } public boolean isVerticalStarOnLine(Cell cell){ return matchesAny(cell, GridPatternGroup.verticalStarOnLineCriteria); } public boolean isArrowhead(Cell cell){ return (isNorthArrowhead(cell) || isSouthArrowhead(cell) || isWestArrowhead(cell) || isEastArrowhead(cell)); } public boolean isNorthArrowhead(Cell cell){ return get(cell) == '^'; } public boolean isEastArrowhead(Cell cell){ return get(cell) == '>'; } public boolean isWestArrowhead(Cell cell){ return get(cell) == '<'; } public boolean isSouthArrowhead(Cell cell){ return (get(cell) == 'v' || get(cell) == 'V') && isVerticalLine(cell.getNorth()); } // unicode for bullets // // 2022 bullet // 25CF black circle // 25AA black circle (small) // 25A0 black square // 25A1 white square // 25CB white circle // 25BA black right-pointing pointer public boolean isBullet(int x, int y){ return isBullet(new Cell(x, y)); } public boolean isBullet(Cell cell){ char c = get(cell); if((c == 'o' || c == '*') && isBlank(cell.getEast()) && isBlank(cell.getWest()) && Character.isLetterOrDigit(get(cell.getEast().getEast())) ) return true; return false; } public void replaceBullets(){ int width = getWidth(); int height = getHeight(); for(int yi = 0; yi < height; yi++){ for(int xi = 0; xi < width; xi++){ Cell cell = new Cell(xi, yi); if(isBullet(cell)){ set(cell, ' '); set(cell.getEast(), '\u2022'); } } } } /** * true if the cell is not blank * but the previous (west) is * * @param cell * @return */ public boolean isStringsStart(Cell cell){ return (!isBlank(cell) && isBlank(cell.getWest())); } /** * true if the cell is not blank * but the next (east) is * * @param cell * @return */ public boolean isStringsEnd(Cell cell){ return (!isBlank(cell) //&& (isBlank(cell.getEast()) || get(cell.getEast()) == 0)); && isBlank(cell.getEast())); } public int otherStringsStartInTheSameColumn(Cell cell){ if(!isStringsStart(cell)) return 0; int result = 0; int height = getHeight(); for(int y = 0; y < height; y++){ Cell cCell = new Cell(cell.x, y); if(!cCell.equals(cell) && isStringsStart(cCell)){ result++; } } return result; } public int otherStringsEndInTheSameColumn(Cell cell){ if(!isStringsEnd(cell)) return 0; int result = 0; int height = getHeight(); for(int y = 0; y < height; y++){ Cell cCell = new Cell(cell.x, y); if(!cCell.equals(cell) && isStringsEnd(cCell)){ result++; } } return result; } public boolean isColumnBlank(int x){ int height = getHeight(); for(int y = 0; y < height; y++){ if(!isBlank(x, y)) return false; } return true; } public CellSet followLine(int x, int y){ return followLine(new Cell(x, y)); } public CellSet followIntersection(Cell cell){ return followIntersection(cell, null); } public CellSet followIntersection(Cell cell, Cell blocked){ if(!isIntersection(cell)) return null; CellSet result = new CellSet(); Cell cN = cell.getNorth(); Cell cS = cell.getSouth(); Cell cE = cell.getEast(); Cell cW = cell.getWest(); if(hasEntryPoint(cN, 6)) result.add(cN); if(hasEntryPoint(cS, 2)) result.add(cS); if(hasEntryPoint(cE, 8)) result.add(cE); if(hasEntryPoint(cW, 4)) result.add(cW); if(result.contains(blocked)) result.remove(blocked); return result; } /** * Returns the neighbours of a line-cell that are boundaries * (0 to 2 cells are returned) * * @param cell * @return null if the cell is not a line */ public CellSet followLine(Cell cell){ if(isHorizontalLine(cell)){ CellSet result = new CellSet(); if(isBoundary(cell.getEast())) result.add(cell.getEast()); if(isBoundary(cell.getWest())) result.add(cell.getWest()); return result; } else if (isVerticalLine(cell)){ CellSet result = new CellSet(); if(isBoundary(cell.getNorth())) result.add(cell.getNorth()); if(isBoundary(cell.getSouth())) result.add(cell.getSouth()); return result; } return null; } public CellSet followLine(Cell cell, Cell blocked){ CellSet nextCells = followLine(cell); if(nextCells.contains(blocked)) nextCells.remove(blocked); return nextCells; } public CellSet followCorner(Cell cell){ return followCorner(cell, null); } public CellSet followCorner(Cell cell, Cell blocked){ if(!isCorner(cell)) return null; if(isCorner1(cell)) return followCorner1(cell, blocked); if(isCorner2(cell)) return followCorner2(cell, blocked); if(isCorner3(cell)) return followCorner3(cell, blocked); if(isCorner4(cell)) return followCorner4(cell, blocked); return null; } public CellSet followCorner1(Cell cell){ return followCorner1(cell, null); } public CellSet followCorner1(Cell cell, Cell blocked){ if(!isCorner1(cell)) return null; CellSet result = new CellSet(); if(!cell.getSouth().equals(blocked)) result.add(cell.getSouth()); if(!cell.getEast().equals(blocked)) result.add(cell.getEast()); return result; } public CellSet followCorner2(Cell cell){ return followCorner2(cell, null); } public CellSet followCorner2(Cell cell, Cell blocked){ if(!isCorner2(cell)) return null; CellSet result = new CellSet(); if(!cell.getSouth().equals(blocked)) result.add(cell.getSouth()); if(!cell.getWest().equals(blocked)) result.add(cell.getWest()); return result; } public CellSet followCorner3(Cell cell){ return followCorner3(cell, null); } public CellSet followCorner3(Cell cell, Cell blocked){ if(!isCorner3(cell)) return null; CellSet result = new CellSet(); if(!cell.getNorth().equals(blocked)) result.add(cell.getNorth()); if(!cell.getWest().equals(blocked)) result.add(cell.getWest()); return result; } public CellSet followCorner4(Cell cell){ return followCorner4(cell, null); } public CellSet followCorner4(Cell cell, Cell blocked){ if(!isCorner4(cell)) return null; CellSet result = new CellSet(); if(!cell.getNorth().equals(blocked)) result.add(cell.getNorth()); if(!cell.getEast().equals(blocked)) result.add(cell.getEast()); return result; } public CellSet followStub(Cell cell){ return followStub(cell, null); } public CellSet followStub(Cell cell, Cell blocked){ if(!isStub(cell)) return null; CellSet result = new CellSet(); if(isBoundary(cell.getEast())) result.add(cell.getEast()); else if(isBoundary(cell.getWest())) result.add(cell.getWest()); else if(isBoundary(cell.getNorth())) result.add(cell.getNorth()); else if(isBoundary(cell.getSouth())) result.add(cell.getSouth()); if(result.contains(blocked)) result.remove(blocked); return result; } public CellSet followCell(Cell cell){ return followCell(cell, null); } public CellSet followCell(Cell cell, Cell blocked){ if(isIntersection(cell)) return followIntersection(cell, blocked); if(isCorner(cell)) return followCorner(cell, blocked); if(isLine(cell)) return followLine(cell, blocked); if(isStub(cell)) return followStub(cell, blocked); if(isCrossOnLine(cell)) return followCrossOnLine(cell, blocked); System.err.println("Umbiguous input at position "+cell+":"); TextGrid subGrid = getTestingSubGrid(cell); subGrid.printDebug(); throw new RuntimeException("Cannot follow cell "+cell+": cannot determine cell type"); } public String getCellTypeAsString(Cell cell){ if(isK(cell)) return "K"; if(isT(cell)) return "T"; if(isInverseK(cell)) return "inverse K"; if(isInverseT(cell)) return "inverse T"; if(isCorner1(cell)) return "corner 1"; if(isCorner2(cell)) return "corner 2"; if(isCorner3(cell)) return "corner 3"; if(isCorner4(cell)) return "corner 4"; if(isLine(cell)) return "line"; if(isStub(cell)) return "stub"; if(isCrossOnLine(cell)) return "crossOnLine"; return "unrecognisable type"; } public CellSet followCrossOnLine(Cell cell, Cell blocked){ CellSet result = new CellSet(); if(isHorizontalCrossOnLine(cell)){ result.add(cell.getEast()); result.add(cell.getWest()); } else if(isVerticalCrossOnLine(cell)){ result.add(cell.getNorth()); result.add(cell.getSouth()); } if(result.contains(blocked)) result.remove(blocked); return result; } public boolean isOutOfBounds(Cell cell){ if(cell.x > getWidth() - 1 || cell.y > getHeight() - 1 || cell.x < 0 || cell.y < 0) return true; return false; } public boolean isOutOfBounds(int x, int y){ char c = get(x, y); if(0 == c) return true; return false; } public boolean isBlank(Cell cell){ char c = get(cell); if(0 == c) return false; return c == ' '; } public boolean isBlank(int x, int y){ char c = get(x, y); if(0 == c) return true; return c == ' '; } public boolean isCorner(Cell cell){ return isCorner(cell.x, cell.y); } public boolean isCorner(int x, int y){ return (isNormalCorner(x,y) || isRoundCorner(x,y)); } public boolean matchesAny(Cell cell, GridPatternGroup criteria){ TextGrid subGrid = getTestingSubGrid(cell); return subGrid.matchesAny(criteria); } public boolean isCorner1(Cell cell){ return matchesAny(cell, GridPatternGroup.corner1Criteria); } public boolean isCorner2(Cell cell){ return matchesAny(cell, GridPatternGroup.corner2Criteria); } public boolean isCorner3(Cell cell){ return matchesAny(cell, GridPatternGroup.corner3Criteria); } public boolean isCorner4(Cell cell){ return matchesAny(cell, GridPatternGroup.corner4Criteria); } public boolean isCross(Cell cell){ return matchesAny(cell, GridPatternGroup.crossCriteria); } public boolean isK(Cell cell){ return matchesAny(cell, GridPatternGroup.KCriteria); } public boolean isInverseK(Cell cell){ return matchesAny(cell, GridPatternGroup.inverseKCriteria); } public boolean isT(Cell cell){ return matchesAny(cell, GridPatternGroup.TCriteria); } public boolean isInverseT(Cell cell){ return matchesAny(cell, GridPatternGroup.inverseTCriteria); } public boolean isNormalCorner(Cell cell){ return matchesAny(cell, GridPatternGroup.normalCornerCriteria); } public boolean isNormalCorner(int x, int y){ return isNormalCorner(new Cell(x, y)); } public boolean isRoundCorner(Cell cell){ return matchesAny(cell, GridPatternGroup.roundCornerCriteria); } public boolean isRoundCorner(int x, int y){ return isRoundCorner(new Cell(x, y)); } public boolean isIntersection(Cell cell){ return matchesAny(cell, GridPatternGroup.intersectionCriteria); } public boolean isIntersection(int x, int y){ return isIntersection(new Cell(x, y)); } public void copyCellsTo(CellSet cells, TextGrid grid){ Iterator it = cells.iterator(); while(it.hasNext()){ Cell cell = (Cell) it.next(); grid.set(cell, this.get(cell)); } } public boolean equals(TextGrid grid){ if(grid.getHeight() != this.getHeight() || grid.getWidth() != this.getWidth() ){ return false; } int height = grid.getHeight(); for(int i = 0; i < height; i++){ String row1 = this.getRow(i).toString(); String row2 = grid.getRow(i).toString(); if(!row1.equals(row2)) return false; } return true; } // @Override // public int hashCode() { // int h = 0; // for(StringBuffer row : rows) { // h += row.hashCode(); // } // return h; // } /** * Fills all the cells in cells with c * * @param cells * @param c */ public void fillCellsWith(Iterable cells, char c){ Iterator it = cells.iterator(); while(it.hasNext()){ Cell cell = it.next(); set(cell.x, cell.y, c); } } /** * * Fills the continuous area with if c1 characters with c2, * flooding from cell x, y * * @param x * @param y * @param c1 the character to replace * @param c2 the character to replace c1 with * @return the list of cells filled */ // public CellSet fillContinuousArea(int x, int y, char c1, char c2){ // CellSet cells = new CellSet(); // //fillContinuousArea_internal(x, y, c1, c2, cells); // seedFill(new Cell(x, y), c1, c2); // return cells; // } public CellSet fillContinuousArea(int x, int y, char c){ return fillContinuousArea(new Cell(x, y), c); } public CellSet fillContinuousArea(Cell cell, char c){ if(isOutOfBounds(cell)) throw new IllegalArgumentException("Attempted to fill area out of bounds: "+cell); return seedFillOld(cell, c); } private CellSet seedFill(Cell seed, char newChar){ CellSet cellsFilled = new CellSet(); char oldChar = get(seed); if(oldChar == newChar) return cellsFilled; if(isOutOfBounds(seed)) return cellsFilled; Stack stack = new Stack(); stack.push(seed); while(!stack.isEmpty()){ Cell cell = (Cell) stack.pop(); //set(cell, newChar); cellsFilled.add(cell); Cell nCell = cell.getNorth(); Cell sCell = cell.getSouth(); Cell eCell = cell.getEast(); Cell wCell = cell.getWest(); if(get(nCell) == oldChar && !cellsFilled.contains(nCell)) stack.push(nCell); if(get(sCell) == oldChar && !cellsFilled.contains(sCell)) stack.push(sCell); if(get(eCell) == oldChar && !cellsFilled.contains(eCell)) stack.push(eCell); if(get(wCell) == oldChar && !cellsFilled.contains(wCell)) stack.push(wCell); } return cellsFilled; } private CellSet seedFillOld(Cell seed, char newChar){ CellSet cellsFilled = new CellSet(); char oldChar = get(seed); if(oldChar == newChar) return cellsFilled; if(isOutOfBounds(seed)) return cellsFilled; Stack stack = new Stack(); stack.push(seed); while(!stack.isEmpty()){ Cell cell = (Cell) stack.pop(); set(cell, newChar); cellsFilled.add(cell); Cell nCell = cell.getNorth(); Cell sCell = cell.getSouth(); Cell eCell = cell.getEast(); Cell wCell = cell.getWest(); if(get(nCell) == oldChar) stack.push(nCell); if(get(sCell) == oldChar) stack.push(sCell); if(get(eCell) == oldChar) stack.push(eCell); if(get(wCell) == oldChar) stack.push(wCell); } return cellsFilled; } /** * * Locates and returns the '*' boundaries that we would * encounter if we did a flood-fill at seed. * * @param seed * @return */ public CellSet findBoundariesExpandingFrom(Cell seed){ CellSet boundaries = new CellSet(); char oldChar = get(seed); if(isOutOfBounds(seed)) return boundaries; char newChar = 1; //TODO: kludge Stack stack = new Stack(); stack.push(seed); while(!stack.isEmpty()){ Cell cell = (Cell) stack.pop(); set(cell, newChar); Cell nCell = cell.getNorth(); Cell sCell = cell.getSouth(); Cell eCell = cell.getEast(); Cell wCell = cell.getWest(); if(get(nCell) == oldChar) stack.push(nCell); else if(get(nCell) == '*') boundaries.add(nCell); if(get(sCell) == oldChar) stack.push(sCell); else if(get(sCell) == '*') boundaries.add(sCell); if(get(eCell) == oldChar) stack.push(eCell); else if(get(eCell) == '*') boundaries.add(eCell); if(get(wCell) == oldChar) stack.push(wCell); else if(get(wCell) == '*') boundaries.add(wCell); } return boundaries; } //TODO: incomplete method seedFillLine() private CellSet seedFillLine(Cell cell, char newChar){ CellSet cellsFilled = new CellSet(); Stack stack = new Stack(); char oldChar = get(cell); if(oldChar == newChar) return cellsFilled; if(isOutOfBounds(cell)) return cellsFilled; stack.push(new LineSegment(cell.x, cell.x, cell.y, 1)); stack.push(new LineSegment(cell.x, cell.x, cell.y + 1, -1)); int left; while(!stack.isEmpty()){ LineSegment segment = (LineSegment) stack.pop(); int x; //expand to the left for( x = segment.x1; x >= 0 && get(x, segment.y) == oldChar; --x){ set(x, segment.y, newChar); cellsFilled.add(new Cell(x, segment.y)); } left = cell.getEast().x; boolean skip = (x > segment.x1)? true : false; if(left < segment.x1){ //leak on left? //TODO: i think the first param should be x stack.push( //new LineSegment(segment.y, left, segment.x1 - 1, -segment.dy)); new LineSegment(x, left, segment.y - 1, -segment.dy)); } x = segment.x1 + 1; do { if(!skip) { for( ; x < getWidth() && get(x, segment.y) == oldChar; ++x){ set(x, segment.y, newChar); cellsFilled.add(new Cell(x, segment.y)); } stack.push(new LineSegment(left, x - 1, segment.y, segment.dy)); if(x > segment.x2 + 1) //leak on right? stack.push(new LineSegment(segment.x2 + 1, x - 1, segment.y, -segment.dy)); } skip = false; //skip only once for(++x; x <= segment.x2 && get(x, segment.y) != oldChar; ++x){;} left = x; } while( x < segment.x2); } return cellsFilled; } public boolean cellContainsDashedLineChar(Cell cell){ char c = get(cell); return StringUtils.isOneOf(c, dashedLines); } public boolean loadFrom(String filename) throws FileNotFoundException, IOException { return loadFrom(filename, null); } public boolean loadFrom(String filename, ProcessingOptions options) throws IOException { String encoding = (options == null) ? null : options.getCharacterEncoding(); ArrayList lines = new ArrayList(); String[] linesArray = FileUtils.readFile(new File(filename), encoding).split("(\r)?\n"); for(int i = 0; i < linesArray.length; i++) lines.add(new StringBuffer(linesArray[i])); return initialiseWithLines(lines, options); } public boolean initialiseWithText(String text, ProcessingOptions options) throws UnsupportedEncodingException { ArrayList lines = new ArrayList(); String[] linesArray = text.split("(\r)?\n"); for(int i = 0; i < linesArray.length; i++) lines.add(new StringBuffer(linesArray[i])); return initialiseWithLines(lines, options); } public boolean initialiseWithLines(ArrayList lines, ProcessingOptions options) throws UnsupportedEncodingException { //remove blank rows at the bottom boolean done = false; int i; for(i = lines.size() - 1; !done; i--){ StringBuffer row = lines.get(i); if(!StringUtils.isBlank(row.toString())) done = true; } rows = new ArrayList(lines.subList(0, i + 2)); if(options != null) fixTabs(options.getTabSize()); else fixTabs(options.DEFAULT_TAB_SIZE); // make all lines of equal length // add blank outline around the buffer to prevent fill glitch // convert tabs to spaces (or remove them if setting is 0) int blankBorderSize = 2; int maxLength = 0; int index = 0; String encoding = null; //if(options != null) encoding = options.getCharacterEncoding(); Iterator it = rows.iterator(); while(it.hasNext()){ String row = it.next().toString(); if(encoding != null){ byte[] bytes = row.getBytes(); row = new String(bytes, encoding); } if(row.length() > maxLength) maxLength = row.length(); rows.set(index, new StringBuffer(row)); index++; } it = rows.iterator(); ArrayList newRows = new ArrayList(); //TODO: make the following depend on blankBorderSize StringBuffer topBottomRow = new StringBuffer(StringUtils.repeatString(" ", maxLength + blankBorderSize * 2)); newRows.add(topBottomRow); newRows.add(topBottomRow); while(it.hasNext()){ StringBuffer row = it.next(); if(row.length() < maxLength) { String borderString = StringUtils.repeatString(" ", blankBorderSize); StringBuffer newRow = new StringBuffer(); newRow.append(borderString); newRow.append(row); newRow.append(StringUtils.repeatString(" ", maxLength - row.length())); newRow.append(borderString); newRows.add(newRow); } else { //TODO: why is the following line like that? newRows.add(new StringBuffer(" ").append(row).append(" ")); } } //TODO: make the following depend on blankBorderSize newRows.add(topBottomRow); newRows.add(topBottomRow); rows = newRows; replaceBullets(); replaceHumanColorCodes(); return true; } private void fixTabs(int tabSize){ int rowIndex = 0; Iterator it = rows.iterator(); while(it.hasNext()){ String row = it.next().toString(); StringBuffer newRow = new StringBuffer(); char[] chars = row.toCharArray(); for(int i = 0; i < chars.length; i++){ if(chars[i] == '\t'){ int spacesLeft = tabSize - newRow.length() % tabSize; if(DEBUG){ System.out.println("Found tab. Spaces left: "+spacesLeft); } String spaces = StringUtils.repeatString(" ", spacesLeft); newRow.append(spaces); } else { String character = Character.toString(chars[i]); newRow.append(character); } } rows.set(rowIndex, newRow); rowIndex++; } } /** * @return */ protected ArrayList getRows() { return rows; } public class CellColorPair{ public CellColorPair(Cell cell, Color color){ this.cell = cell; this.color = color; } public Color color; public Cell cell; } public class CellStringPair{ public CellStringPair(Cell cell, String string){ this.cell = cell; this.string = string; } public Cell cell; public String string; } public class CellTagPair{ public CellTagPair(Cell cell, String tag){ this.cell = cell; this.tag = tag; } public Cell cell; public String tag; } public class Cell{ public int x, y; public Cell(Cell cell){ this(cell.x, cell.y); } public Cell(int x, int y){ this.x = x; this.y = y; } public Cell getNorth(){ return new Cell(x, y - 1); } public Cell getSouth(){ return new Cell(x, y + 1); } public Cell getEast(){ return new Cell(x + 1, y); } public Cell getWest(){ return new Cell(x - 1, y); } public Cell getNW(){ return new Cell(x - 1, y - 1); } public Cell getNE(){ return new Cell(x + 1, y - 1); } public Cell getSW(){ return new Cell(x - 1, y + 1); } public Cell getSE(){ return new Cell(x + 1, y + 1); } public CellSet getNeighbours4(){ CellSet result = new CellSet(); result.add(getNorth()); result.add(getSouth()); result.add(getWest()); result.add(getEast()); return result; } public CellSet getNeighbours8(){ CellSet result = new CellSet(); result.add(getNorth()); result.add(getSouth()); result.add(getWest()); result.add(getEast()); result.add(getNW()); result.add(getNE()); result.add(getSW()); result.add(getSE()); return result; } public boolean isNorthOf(Cell cell){ if(this.y < cell.y) return true; return false; } public boolean isSouthOf(Cell cell){ if(this.y > cell.y) return true; return false; } public boolean isWestOf(Cell cell){ if(this.x < cell.x) return true; return false; } public boolean isEastOf(Cell cell){ if(this.x > cell.x) return true; return false; } public boolean equals(Object o){ Cell cell = (Cell) o; if(cell == null) return false; if(x == cell.x && y == cell.y) return true; else return false; } public int hashCode() { return (x << 16) | y; } public boolean isNextTo(int x2, int y2){ if(Math.abs(x2 - x) == 1 && Math.abs(y2 - y) == 1) return false; if(Math.abs(x2 - x) == 1 && y2 == y) return true; if(Math.abs(y2 - y) == 1 && x2 == x) return true; return false; } public boolean isNextTo(Cell cell){ if(cell == null) throw new IllegalArgumentException("cell cannot be null"); return this.isNextTo(cell.x, cell.y); } public String toString(){ return "("+x+", "+y+")"; } public void scale(int s){ x = x * s; y = y * s; } } private class LineSegment{ int x1, x2, y, dy; public LineSegment(int x1, int x2, int y, int dy){ this.x1 = x1; this.x2 = x2; this.y = y; this.dy = dy; } } } plantuml-1.2017.15/src/overview.html000066400000000000000000000044251312650303100172060ustar00rootroot00000000000000

    PlantUML is an open-source component used to draw UML diagrams from their textual description.

    Overview

    This documentation will not describe the PlantUML language description. Please refer to PlantUML site for that.

    Here, some information about how PlantUML is implemented will be provided to help the integration of PlantUML with other programs.

    Unfortunately, here, we have to raise a warning:
    While PlantUML language description remains stable over version and follow ascending compatibility, the implementation of PlantUML changes very often over time.

    So if you use classes described in this documentation, it's very likely that you will have an issue someday, because those class may change without any notice. They could even be deleted.

    It used to happen more often than you think over years, because we try to constantly improve the general design of PlantUML, and this imply a continuous refactoring.

    The only exception is the net.sourceforge.plantuml package, that we will keep as stable as possible over time.

    plantuml-1.2017.15/src/smetana/000077500000000000000000000000001312650303100160755ustar00rootroot00000000000000plantuml-1.2017.15/src/smetana/core/000077500000000000000000000000001312650303100170255ustar00rootroot00000000000000plantuml-1.2017.15/src/smetana/core/ACCESS.java000066400000000000000000000026161312650303100206360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; public interface ACCESS { O get(); void set(O obj); } plantuml-1.2017.15/src/smetana/core/AllH.java000066400000000000000000000041251312650303100205120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import h.*; public interface AllH extends Agraph_s, Agobj_s, Agrec_s, Agdesc_s, Agmemdisc_s, Agclos_s, Agiddisc_s, _dtmethod_s, _dtdisc_s, _dt_s, _dtdata_s, refstr_t, _dtlink_s, Agdatadict_s, Agattr_s, Agsubnode_s, Agnode_s, Agtag_s, Agedge_s, Agedgepair_s, Agsym_s, GVC_s, gvlayout_features_t, gvlayout_engine_s, gvplugin_installed_t, pointf, pack_info, aspect_t, fontinfo, shape_functions, polygon_t, shape_desc, textlabel_t, IMapEntry_t, textspan_t, textfont_t, point, port, elist, Dtmemory_f, nlist_t, nodequeue, Agnodeinfo_t, Agedgeinfo_t, spline_info_t, splineInfo, path, pathend_t, boxf, Ppoly_t, pointnlink_t, deque_t, triangle_t, tna_t, Pedge_t, splines, bezier, inside_t, arrowdir_t, arrowtype_t, label_params_t, object_t, xlabel_t, adjmatrix_t { } plantuml-1.2017.15/src/smetana/core/Bucket.java000066400000000000000000000302341312650303100211070ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Bucket { final public String name; final public CType ctype; final private boolean inlineStruct; private Bucket addPrefix(String prefix) { return new Bucket(prefix + "." + name, ctype, inlineStruct); } public static Bucket buildEnum(String name, List definition) { return new Bucket(name, new CType("enum"), false); } Bucket(String name, String type, boolean inlineStruct) { this(name, new CType(type), inlineStruct); } private Bucket(String name, CType ctype, boolean inlineStruct) { this.name = name; this.ctype = ctype; this.inlineStruct = inlineStruct; } @Override public String toString() { return "[" + ctype + "==" + name + "]"; } public boolean inlineStruct() { return inlineStruct; } public boolean functionPointer() { if (ctype == null) { return false; } return ctype.functionPointer(); } public static Map buildSome(Iterator it) { String def = it.next(); JUtils.LOG("DEF1=" + def); def = def.replaceAll("unsigned int", "int"); def = def.replaceAll("unsigned long", "int"); def = def.replaceAll("unsigned short", "short"); def = def.replaceAll("unsigned char", "char"); def = def.replaceAll("const ", ""); def = def.replaceAll("struct ", ""); def = def.replaceAll("\\[\\s*[+]1\\s*[+]1\\s*[+]1\\s*[+]1\\s*[+]1\\s*\\]", "[5]"); // JUtils.LOG("DEF2=" + def); // int foo if (def.equals("union")) { return createStruct(it); } else if (def.equals("struct")) { return createStruct(it); } final Map result = new LinkedHashMap(); // Dummy foo; Pattern p1 = Pattern.compile("^(\\w+)\\s+(\\w+)$"); Matcher m1 = p1.matcher(def); if (m1.find()) { final String type = m1.group(1); final boolean inline = CType.isPrimitive(type) == false; result.put(m1.group(2), new Bucket(m1.group(2), type, inline)); return result; } // Dummy A, B p1 = Pattern.compile("^(\\w+)\\s+(\\w+),\\s*(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { final String type = m1.group(1); final boolean inline = CType.isPrimitive(type) == false; result.put(m1.group(2), new Bucket(m1.group(2), type, inline)); result.put(m1.group(3), new Bucket(m1.group(3), type, inline)); return result; } // Dummy A, B, C p1 = Pattern.compile("^(\\w+)\\s+(\\w+),\\s*(\\w+),\\s*(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { final String type = m1.group(1); final boolean inline = CType.isPrimitive(type) == false; result.put(m1.group(2), new Bucket(m1.group(2), type, inline)); result.put(m1.group(3), new Bucket(m1.group(3), type, inline)); result.put(m1.group(4), new Bucket(m1.group(4), type, inline)); return result; } // Dummy A, B, C, D p1 = Pattern.compile("^(\\w+)\\s+(\\w+),\\s*(\\w+),\\s*(\\w+),\\s*(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { final String type = m1.group(1); final boolean inline = CType.isPrimitive(type) == false; result.put(m1.group(2), new Bucket(m1.group(2), type, inline)); result.put(m1.group(3), new Bucket(m1.group(3), type, inline)); result.put(m1.group(4), new Bucket(m1.group(4), type, inline)); result.put(m1.group(5), new Bucket(m1.group(5), type, inline)); return result; } // Dummy A, B, C, D, E p1 = Pattern.compile("^(\\w+)\\s+(\\w+),\\s*(\\w+),\\s*(\\w+),\\s*(\\w+),\\s*(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { final String type = m1.group(1); final boolean inline = CType.isPrimitive(type) == false; result.put(m1.group(2), new Bucket(m1.group(2), type, inline)); result.put(m1.group(3), new Bucket(m1.group(3), type, inline)); result.put(m1.group(4), new Bucket(m1.group(4), type, inline)); result.put(m1.group(5), new Bucket(m1.group(5), type, inline)); result.put(m1.group(6), new Bucket(m1.group(6), type, inline)); return result; } // int (*foo)() p1 = Pattern.compile("^.*(\\(\\*(\\w+)\\)).*$"); m1 = p1.matcher(def); if (m1.find()) { result.put(m1.group(1), new Bucket(m1.group(2), def, false)); return result; } // void *data p1 = Pattern.compile("^(void)\\s+\\*(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { result.put(m1.group(2), new Bucket(m1.group(2), "void*", false)); return result; } // char *data p1 = Pattern.compile("^(char)\\s+\\*(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { result.put(m1.group(2), new Bucket(m1.group(2), "CString", false)); return result; } // int *data p1 = Pattern.compile("^(int)\\s+\\*(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { result.put(m1.group(2), new Bucket(m1.group(2), "int*", false)); return result; } // char **data p1 = Pattern.compile("^(char)\\s+\\*\\*(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { result.put(m1.group(2), new Bucket(m1.group(2), "CString[]", false)); return result; } // void* foo p1 = Pattern.compile("^(void)(\\s+\\*|\\*\\s+)(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { final String type = "void*"; // final Class cl = CType.getClassFrom(type); result.put(m1.group(3), new Bucket(m1.group(3), type, false)); return result; } // dummy* foo p1 = Pattern.compile("^(\\w+)(\\s+\\*|\\*\\s+)(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { final String type = m1.group(1); // final Class cl = CType.getClassFrom(type); result.put(m1.group(3), new Bucket(m1.group(3), type, false)); return result; } // foo *A, *B p1 = Pattern.compile("^(\\w+)\\s+\\*(\\w+),\\s*\\*(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { final String type = m1.group(1); // final Class cl = CType.getClassFrom(type); result.put(m1.group(2), new Bucket(m1.group(2), type, false)); result.put(m1.group(3), new Bucket(m1.group(3), type, false)); return result; } // foo *A, *B, *C p1 = Pattern.compile("^(\\w+)\\s+\\*(\\w+),\\s*\\*(\\w+),\\s*\\*(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { final String type = m1.group(1); // final Class cl = CType.getClassFrom(type); result.put(m1.group(2), new Bucket(m1.group(2), type, false)); result.put(m1.group(3), new Bucket(m1.group(3), type, false)); result.put(m1.group(4), new Bucket(m1.group(4), type, false)); return result; } // foo *A, *B, *C, *D p1 = Pattern.compile("^(\\w+)\\s+\\*(\\w+),\\s*\\*(\\w+),\\s*\\*(\\w+),\\s*\\*(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { final String type = m1.group(1); // final Class cl = CType.getClassFrom(type); result.put(m1.group(2), new Bucket(m1.group(2), type, false)); result.put(m1.group(3), new Bucket(m1.group(3), type, false)); result.put(m1.group(4), new Bucket(m1.group(4), type, false)); result.put(m1.group(5), new Bucket(m1.group(5), type, false)); return result; } p1 = Pattern.compile("^(unsigned|int)\\s+(\\w+):([-sizeof ntunsged()0-9*]+)$"); m1 = p1.matcher(def); if (m1.find()) { result.put(m1.group(2), new Bucket(m1.group(2), "int", false)); return result; } // Dummy foo[3] p1 = Pattern.compile("^(\\w+)\\s+(\\w+)\\[\\d+\\]$"); m1 = p1.matcher(def); if (m1.find()) { result.put(m1.group(1), new Bucket(m1.group(2), def, true)); return result; } // Dummy *foo[3] p1 = Pattern.compile("^(\\w+)\\s+\\*(\\w+)\\[\\d+\\]$"); m1 = p1.matcher(def); if (m1.find()) { final Bucket tmp = new Bucket(m1.group(2), def, false); JUtils.LOG("size=" + tmp.getArrayLength()); result.put(m1.group(1), tmp); return result; } // graph_t **clust p1 = Pattern.compile("^(\\w+)\\s+\\*\\*(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { final String type = m1.group(1) + "*"; result.put(m1.group(2), new Bucket(m1.group(2), type, false)); return result; } // node_t **store, **limit, **head, **tail p1 = Pattern.compile("^(\\w+)\\s+\\*\\*(\\w+),\\s*\\*\\*(\\w+),\\s*\\*\\*(\\w+),\\s*\\*\\*(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { final String type = m1.group(1) + "*"; result.put(m1.group(2), new Bucket(m1.group(2), type, false)); result.put(m1.group(3), new Bucket(m1.group(3), type, false)); result.put(m1.group(4), new Bucket(m1.group(4), type, false)); result.put(m1.group(5), new Bucket(m1.group(5), type, false)); return result; } // foo *A, **B p1 = Pattern.compile("^(\\w+)\\s+\\*(\\w+),\\s*\\*\\*(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { final String type = m1.group(1); result.put(m1.group(2), new Bucket(m1.group(2), type, false)); result.put(m1.group(3), new Bucket(m1.group(3), type + "*", false)); return result; } // foo **B p1 = Pattern.compile("^(\\w+)\\*\\*\\s+(\\w+)$"); m1 = p1.matcher(def); if (m1.find()) { final String type = m1.group(1) + "*"; result.put(m1.group(2), new Bucket(m1.group(2), type, false)); return result; } if (def.equals("double **dist, **spring, **sum_t, ***t")) { // Let's skip this one... return result; } if (def.equals("double *pos, dist")) { result.put("pos", new Bucket("pos", "double*", false)); result.put("dist", new Bucket("dist", "double", false)); return result; } // p1 = Pattern.compile("^unsigned\\s+long\\s+(\\w+)$"); // m1 = p1.matcher(def); // if (m1.find()) { // mem.put(m1.group(1), new Bucket(m1.group(1), "int", false, 4, false)); // return; // } JUtils.LOG("def=" + def); throw new UnsupportedOperationException(def); } private static Map createStruct(Iterator it) { String current = it.next(); if (current.equals("{") == false) { throw new UnsupportedOperationException("current=" + current); } final Map tmp = new LinkedHashMap(); final List inner = new ArrayList(); while (true) { current = it.next(); if (current.equals("union") || current.equals("struct")) { Map internal = createStruct(it); JUtils.LOG("internal=" + internal); tmp.putAll(internal); } else if (current.endsWith("}")) { final String name = it.next(); JUtils.LOG("name=" + name); JUtils.LOG("inner=" + inner); // final Map some = new LinkedHashMap(); final Iterator innerIt = inner.iterator(); while (innerIt.hasNext()) { tmp.putAll(buildSome(innerIt)); } final Map result = new LinkedHashMap(); for (Map.Entry ent : tmp.entrySet()) { final String n = ent.getKey(); final Bucket bucket = ent.getValue().addPrefix(name); JUtils.LOG("n=" + n); JUtils.LOG("bucket=" + bucket); result.put(name + "." + n, bucket); } return result; } else { inner.add(current); } } // JUtils.LOG("some=" + some); // throw new UnsupportedOperationException(); } public int getArrayLength() { if (ctype == null) { return 0; } return ctype.getArrayLength(); } } plantuml-1.2017.15/src/smetana/core/CEnumInterpretor.java000066400000000000000000000054731312650303100231460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import java.util.ArrayList; import java.util.List; public class CEnumInterpretor { private final List keys = new ArrayList(); private String keyRef; private int valueRef; public CEnumInterpretor(Class enumClass) { List def = CType.getDefinition(enumClass); JUtils.LOG("def1=" + def); if (def.get(0).equals("typedef enum") == false) { throw new IllegalArgumentException(); } if (def.get(1).equals("{") == false) { throw new IllegalArgumentException(); } if (def.get(def.size() - 2).equals("}") == false) { throw new IllegalArgumentException(); } def = def.subList(2, def.size() - 2); JUtils.LOG("def2=" + def); for (String s1 : def) { for (String s2 : s1.split(",")) { s2 = s2.trim(); final int idx = s2.indexOf('='); final String k = idx == -1 ? s2 : s2.substring(0, idx); keys.add(k.trim()); if (idx == -1) { continue; } if (keyRef != null) { throw new IllegalStateException(); } keyRef = k.trim(); valueRef = Integer.parseInt(s2.substring(idx + 1).trim()); } } JUtils.LOG("keys=" + keys); } public int valueOf(String name) { JUtils.LOG("keys=" + keys); final int idx = keys.indexOf(name); if (idx == -1) { throw new IllegalArgumentException(name + " is no enum value"); } if (keyRef == null) { return idx; } final int keyRefIndex = keys.indexOf(keyRef); if (keyRefIndex == -1) { throw new IllegalStateException(); } return idx - keyRefIndex + valueRef; } } plantuml-1.2017.15/src/smetana/core/CFunction.java000066400000000000000000000027301312650303100215620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import h.*; public interface CFunction extends __ptr__, Dtmemory_f, Dtcompar_f, Dtsearch_f { public Object exe(Object... args); } plantuml-1.2017.15/src/smetana/core/CFunctionImpl.java000066400000000000000000000056211312650303100224060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import smetana.core.amiga.Area; public class CFunctionImpl extends UnsupportedC implements CFunction, Area { private final Class codingClass; private final String name; private final Method method; public static CFunctionImpl create(Class codingClass, String name) { return new CFunctionImpl(codingClass, name); } private CFunctionImpl(Class codingClass, String name) { this.codingClass = codingClass; this.name = name; for (Method m : codingClass.getMethods()) { if (m.getName().equals(name)) { this.method = m; return; } } JUtils.LOG("CANNOT FIND METHOD " + name + " IN " + codingClass); throw new IllegalStateException("codingClass=" + codingClass + " name=" + name); } @Override public String toString() { return codingClass.getName() + "::" + name; } public Object exe(Object... args) { JUtils.LOG("-------"); for (Object arg : args) { JUtils.LOG("arg=" + arg); } JUtils.LOG("method="+method); try { return this.method.invoke(null, args); } catch (InvocationTargetException e) { e.printStackTrace(); throw new UnsupportedOperationException(toString()); } catch (IllegalArgumentException e) { e.printStackTrace(); throw new UnsupportedOperationException(toString()); } catch (IllegalAccessException e) { e.printStackTrace(); throw new UnsupportedOperationException(toString()); } } public String getName() { return name; } public void memcopyFrom(Area source) { throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/smetana/core/CObject.java000066400000000000000000000041671312650303100212110ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import java.util.ArrayList; import java.util.List; import smetana.core.amiga.Area; public class CObject implements Area { private static int ID; private final int size; private int id = ++ID; public CObject(int size, Class tobeAllocated) { this.size = size; } @Override public String toString() { return super.toString() + " id=" + id; } public List convertToListOfCString() { final ArrayList result = new ArrayList(); for (int i = 0; i < size; i++) { result.add(null); } return result; } // public AreaArray convertToAreaArray() { // return new AreaArray(size, new BuilderArea() { // public Area createArea() { // return null; // } // }); // } public void memcopyFrom(Area source) { throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/smetana/core/CString.java000066400000000000000000000134341312650303100212460ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import java.util.ArrayList; import java.util.List; import smetana.core.amiga.Area; import smetana.core.amiga.StarStruct; public class CString extends UnsupportedC implements __ptr__, Area { private static int UID = 100; private final Throwable creation = new Throwable(); private final List data2; private final int currentStart; private final List<__ptr__> fathers = new ArrayList<__ptr__>(); private final int uid; public boolean isSameThan(CString other) { if (this.data2 != other.data2) { throw new UnsupportedOperationException(); } return this.currentStart == other.currentStart; } public void memcopyFrom(Area source) { final CString other = (CString) source; this.data2.clear(); this.data2.addAll(other.data2); } public CString(String string) { this(new ArrayList(), 0); for (int i = 0; i < string.length(); i++) { data2.add(string.charAt(i)); } data2.add('\0'); } public CString duplicate() { // return this; return new CString(new ArrayList(this.data2), currentStart); // final CString result = new CString(this.data.size()); // for (int i = 0; i < result.data.size(); i++) { // result.data.set(i, this.data.get(i)); // } // return result; } public CString strdup() { return duplicate(); } public CString(int size) { this(new ArrayList(), 0); for (int i = 0; i < size; i++) { data2.add('\0'); } } private CString(List data2, int currentStart) { this.data2 = data2; this.currentStart = currentStart; this.uid = UID; UID+=2; creation.fillInStackTrace(); } public __ptr__ addVirtualBytes(int bytes) { JUtils.LOG("CString::addVirtualBytes " + bytes); JUtils.LOG("AM " + this); if (bytes < 0) { OFFSET offset = OFFSET.fromInt(-bytes); JUtils.LOG("offset=" + offset); for (__ptr__ f : fathers) { JUtils.LOG("f=" + f); if (f instanceof StarStruct && ((StarStruct) f).getRealClass() == offset.getTheClass()) { JUtils.LOG("FOUND1!!"); if (f.getPtr(offset.getField()).equals(this)) { JUtils.LOG("FOUND2!!"); return f; } } } } else { JUtils.LOG("father=" + fathers); JUtils.LOG("CString created on the following place:"); creation.printStackTrace(); } throw new UnsupportedOperationException(); } @Override public CString plus(int pointerMove) { return new CString(data2, currentStart + pointerMove); } @Override public String toString() { final StringBuilder sb = new StringBuilder(); for (Character c : getData()) { if (c == '\0') { sb.append("(0)"); } else { sb.append(c); } } return "CString:" + sb; } private List getData() { return data2.subList(currentStart, data2.size()); } public String getContent() { final StringBuilder sb = new StringBuilder(); for (Character c : getData()) { if (c == '\0') { return sb.toString(); } else { sb.append(c); } } throw new UnsupportedOperationException(); } public char charAt(int i) { if (i >= getData().size()) { return '\0'; } return getData().get(i); } public char setCharAt(int i, char c) { getData().set(i, c); return c; } public int length() { int len = 0; for (Character c : getData()) { if (c == '\0') { return len; } len++; } throw new IllegalStateException(); } public int compareTo(CString other) { for (int i = 0; i < data2.size() - currentStart; i++) { final int diff = this.charAt(i) - other.charAt(i); if (this.charAt(i) == '\0' || diff != 0) { return diff; } } throw new IllegalStateException(); } public int compareTo(CString other, int num) { for (int i = 0; i < data2.size() - currentStart && i def = CType.getDefinition(cl); JUtils.LOG("def3=" + def); if (def.get(0).equals("typedef enum")) { return true; } return false; } @Override public String toString() { return "CTYPE:" + type; } public Class getTypeClass() { if (isPrimitive()) { return null; } if (type.equals("Ppolyline_t")) { return Ppoly_t.class; } return getClassFrom(type); } public static Class getClassFrom(String type) { if (type == null) { throw new IllegalArgumentException(); } if (type.equals("h.pointf_s")) { return pointf.class; } if (type.equals("pointf_s")) { return pointf.class; } if (type.endsWith("htmllabel_t")) { return htmllabel_t.class; } try { final Class result = Class.forName("h." + type); final List definition = getDefinition(result); if (definition.size() != 1) { return result; } final String single = definition.get(0); final Pattern p1 = Pattern.compile("^typedef\\s+struct\\s+(\\w+)\\s+(\\w+)$"); final Matcher m1 = p1.matcher(single); if (m1.find() == false) { // return null; throw new IllegalStateException(single); } if (m1.group(2).equals(type) == false) { throw new IllegalStateException(single); } return getClassFrom(m1.group(1)); } catch (Exception e) { e.printStackTrace(); return null; } } private List getDefinition() { return getDefinition(getTypeClass()); } static List getDefinition(Class inter) { try { // JUtils.LOG("TR1=" + inter); if (inter == null) { return null; } final Field field = inter.getField("DEFINITION"); return (List) field.get(null); } catch (NoSuchFieldException e) { System.err.println("inter=" + inter); e.printStackTrace(); throw new UnsupportedOperationException(); } catch (SecurityException e) { e.printStackTrace(); throw new UnsupportedOperationException(); } catch (IllegalArgumentException e) { e.printStackTrace(); throw new UnsupportedOperationException(); } catch (IllegalAccessException e) { e.printStackTrace(); throw new UnsupportedOperationException(); } } public boolean functionPointer() { // int (*foo)() if (isPrimitive()) { return false; } boolean result = type.matches("^.*(\\(\\*(\\w+)\\)).*$"); if (result == true) { return true; } try { final List definition = getDefinition(Class.forName("h." + type)); JUtils.LOG("def=" + definition); if (definition.size() != 1) { return false; } assert definition.size() == 1; result = definition.get(0).matches("^.*(\\(\\*(\\w+)\\)).*$"); JUtils.LOG("checking " + type + " " + result); return result; } catch (ClassNotFoundException e) { JUtils.LOG("typeXXX=" + type); return false; } } public static boolean isPrimitive(String type) { if (type.equals("char") || type.equals("long") || type.equals("int") || type.equals("packval_t") || type.equals("boolean") || type.equals("double") || type.equals("float") || type.equals("short")) { return true; } return false; } public boolean isPrimitive() { return isPrimitive(type); } public Class getClassFrom() { return getClassFrom(type); } public int getArrayLength() { final Pattern p = Pattern.compile(".*\\[(\\d+)\\]$"); final Matcher m = p.matcher(type); if (m.find() == false) { return 0; } return Integer.parseInt(m.group(1)); } public boolean isIntStar() { return "int*".equals(type); } public boolean isDoubleStar() { return "double*".equals(type); } public boolean isVoidStar() { return "void*".equals(type); } public String getType() { return type; } public boolean isCString() { return type.equals("CString"); } public boolean isArrayOfCString() { return type.equals("CString[]"); } public boolean containsStar() { return type.contains("*"); } } plantuml-1.2017.15/src/smetana/core/HardcodedStruct.java000066400000000000000000000026461312650303100227620ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; public interface HardcodedStruct { public void copyDataFrom(__struct__ newData); } plantuml-1.2017.15/src/smetana/core/JUtils.java000066400000000000000000000324041312650303100211050ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import h.Agdesc_s; import h.Agedge_s; import h.Agedgeinfo_t; import h.Agiddisc_s; import h.Agmemdisc_s; import h.Agtag_s; import h.ST_Agdesc_s; import h.ST_Agiddisc_s; import h.ST_Agmemdisc_s; import h.ST_Agtag_s; import h.ST_arrowname_t; import h.ST_arrowtype_t; import h.ST_boxf; import h.ST_dtdisc_s; import h.ST_dtmethod_s; import h.ST_elist; import h.ST_nlist_t; import h.ST_pointf; import h.ST_port; import h._dtdisc_s; import h._dtmethod_s; import h.arrowname_t; import h.arrowtype_t; import h.bezier; import h.boxf; import h.elist; import h.nlist_t; import h.pointf; import h.port; import h.splines; import smetana.core.amiga.StarArrayOfInteger; import smetana.core.amiga.StarArrayOfPtr; import smetana.core.amiga.StarArrayOfStruct; import smetana.core.amiga.StarStar; import smetana.core.amiga.StarStruct; import smetana.core.amiga.StarStructImpl; // http://docs.oracle.com/javase/specs/jls/se5.0/html/expressions.html#15.7.4 // http://www.jbox.dk/sanos/source/lib/string.c.html public class JUtils { public static int USHRT_MAX = 65535; public static size_t sizeof(Class cl) { return new size_t_struct(cl); } public static size_t sizeof(__ptr__ element) { return new size_t_of_element(element); } public static size_t sizeof(String name, int sz) { if (name.equals("char*")) { return new size_t_array_of_charstars(sz); } throw new UnsupportedOperationException(); } public static size_t sizeof(Class cl, int nb) { return new size_t_array_of_something(cl, nb); } public static size_t size_t_array_of_integer(int nb) { return new size_t_array_of_integer(nb); } public static size_t sizeof_starstar_empty(Class cl, int nb) { return new size_t_array_of_array_of_something_empty(cl, nb); } public static int strcmp(CString s1, CString s2) { return s1.compareTo(s2); } public static int strncmp(CString s1, CString s2, int n) { return s1.compareTo(s2, n); } public static CString strstr(CString s1, CString s2) { throw new UnsupportedOperationException("s1=" + s1 + " s2=" + s2); } public static void strncpy(CString destination, CString source, int nb) { destination.copyFrom(source, nb); } public static CString strchr(CString str, char c) { return str.strchr(c); } public static int strtol(CString str, CString[] endptr, int base) { if (base != 10) { throw new IllegalArgumentException(); } CString end = str; int result = Integer.parseInt(end.getContent()); endptr[0] = end.plus(("" + result).length()); return result; } public static double strtod(CString str, CString[] endptr) { final double result = Double.parseDouble(str.getContent()); return result; } public static double atof(CString str) { return Double.parseDouble(str.getContent()); } public static int memcmp(__ptr__ s1, __ptr__ s2, int sz) { throw new UnsupportedOperationException("s1=" + s1 + " s2=" + s2 + " sz=" + sz); } public static void memset(__ptr__ obj, int value, size_t nbytes) { if (value != 0) { throw new UnsupportedOperationException(); } } public static int strlen(CString s) { return s.length(); } public static double abs(double x) { return Math.abs(x); } public static double cos(double x) { return Math.cos(x); } public static double sin(double x) { return Math.sin(x); } public static double sqrt(double x) { return Math.sqrt(x); } public static double atan2(double a, double b) { return Math.atan2(a, b); } public static double pow(double a, double b) { return Math.pow(a, b); } public static boolean isdigit(char c) { return Character.isDigit(c); } public static int atoi(CString s) { return Integer.parseInt(s.getContent()); } public static char tolower(char c) { return Character.toLowerCase(c); } public static CFunction function(Class codingClass, String name) { return CFunctionImpl.create(codingClass, name); } public static int enumAsInt(Class enumClass, String name) { CEnumInterpretor interpretor = new CEnumInterpretor(enumClass); final int result = interpretor.valueOf(name); JUtils.LOG("result for " + name + " is " + result); return result; } public static CString getenv(CString var) { return null; } public static void LOG(String s) { // System.err.println(s); } public static void LOG2(String s) { // System.err.println(s); } public static boolean EQ(Object o1, Object o2) { if (o1 == o2) { return true; } if (o1 == null && o2 != null) { return false; } if (o2 == null && o1 != null) { return false; } // if (o1 instanceof AreaArray && o2 instanceof AreaArray) { // return ((AreaArray) o1).isSameThan((AreaArray) o2); // } if (o1 instanceof StarStruct && o2 instanceof StarStruct) { return ((StarStruct) o1).isSameThan((StarStruct) o2); } if (o1 instanceof CString && o2 instanceof CString) { return ((CString) o1).isSameThan((CString) o2); } if (o1 instanceof StarArrayOfPtr && o2 instanceof StarArrayOfPtr) { return ((StarArrayOfPtr) o1).isSameThan((StarArrayOfPtr) o2); } if (o1 instanceof StarStar && o2 instanceof StarStruct) { __ptr__ o1b = ((StarStar) o1).getPtr(); if (((StarStruct) o1b).getRealClass() != ((StarStruct) o2).getRealClass()) { throw new UnsupportedOperationException(); } return EQ(o1b, o2); } if (o1 instanceof StarStruct && o2 instanceof StarArrayOfPtr) { __ptr__ o2b = ((StarArrayOfPtr) o2).getPtrForEquality(); if (((StarStruct) o1).getRealClass() != ((StarStruct) o2b).getRealClass()) { throw new UnsupportedOperationException(); } return EQ(o1, o2b); } if (o1 instanceof StarStruct && o2 instanceof StarArrayOfStruct) { __ptr__ o2b = ((StarArrayOfStruct) o2).getPtrForEquality(); if (((StarStruct) o1).getRealClass() != ((StarStruct) o2b).getRealClass()) { throw new UnsupportedOperationException(); } return EQ(o1, o2b); } if (o1 instanceof StarStar && o2 instanceof StarArrayOfPtr) { __ptr__ o1b = ((StarStar) o1).getPtr(); __ptr__ o2b = ((StarArrayOfPtr) o2).getPtr(); if (((StarStruct) o1b).getRealClass() != ((StarStruct) o2b).getRealClass()) { throw new UnsupportedOperationException(); } return EQ(o1b, o2b); } if (o1 instanceof StarArrayOfStruct && o2 instanceof StarArrayOfStruct) { StarArrayOfStruct oo1 = (StarArrayOfStruct) o1; StarArrayOfStruct oo2 = (StarArrayOfStruct) o2; return oo1.isSameThan(oo2); } if (o1 instanceof StarArrayOfPtr && o2 instanceof StarArrayOfStruct) { StarArrayOfPtr oo1 = (StarArrayOfPtr) o1; StarArrayOfStruct oo2 = (StarArrayOfStruct) o2; __struct__ s1 = oo1.getStruct(); __struct__ s2 = oo2.getStruct(); boolean result = s1.getInternalData().isSameThan(s2.getInternalData()); return result; } System.err.println("o1=" + o1.getClass() + " " + o1); System.err.println("o2=" + o2.getClass() + " " + o2); throw new UnsupportedOperationException(); } public static boolean NEQ(Object o1, Object o2) { return EQ(o1, o2) == false; } public static void qsort(__ptr__ array, int nb, size_t size, CFunction compare) { if (nb <= 1) { return; } JUtils.LOG("array=" + array); JUtils.LOG("nb=" + nb); JUtils.LOG("size=" + size); JUtils.LOG("compare=" + compare); boolean change; do { change = false; for (int i = 0; i < nb - 1; i++) { __ptr__ element1 = array.plus(i); __ptr__ element2 = array.plus(i + 1); Integer cmp = (Integer) compare.exe(element1, element2); JUtils.LOG("cmp=" + cmp); if (cmp.intValue() > 0) { change = true; if (array instanceof StarArrayOfInteger) { ((StarArrayOfInteger) array).swap(i, i + 1); } else { ((StarStar) array).swap(i, i + 1); } } } } while (change); for (int i = 0; i < nb - 1; i++) { __ptr__ element1 = array.plus(i); __ptr__ element2 = array.plus(i + 1); JUtils.LOG("element1=" + element1); JUtils.LOG("element2=" + element2); Integer cmp = (Integer) compare.exe(element1, element2); JUtils.LOG("cmp=" + cmp); if (cmp.intValue() > 0) { throw new IllegalStateException(); } } } static public int setjmp(jmp_buf jmp) { // if (jmp.hasBeenCalled()) { // throw new UnsupportedOperationException(); // } jmp.saveCallingEnvironment(); return 0; } // DEBUG public static void printDebugEdge(Agedge_s e) { System.err.println("*********** PRINT EDGE ********** "); final Agedgeinfo_t data = (Agedgeinfo_t) Macro.AGDATA(e).castTo(Agedgeinfo_t.class); final splines splines = (splines) data.getPtr("spl"); __struct__ bb = splines.getStruct("bb"); final bezier list = (bezier) splines.getPtr("list"); System.err.println("splines.size=" + splines.getInt("size")); System.err.println("bb.LL=" + pointftoString(bb.getStruct("LL"))); System.err.println("bb.UR=" + pointftoString(bb.getStruct("UR"))); printDebugBezier((bezier) splines.getPtr("list").getPtr()); } private static String pointftoString(__struct__ point) { final StringBuilder sb = new StringBuilder(); sb.append("("); sb.append(point.getDouble("x")); sb.append(" ; "); sb.append(point.getDouble("y")); sb.append(")"); return sb.toString(); } private static void printDebugBezier(bezier bezier) { System.err.println("bezier.size=" + bezier.getInt("size")); System.err.println("bezier.sflag=" + bezier.getInt("sflag")); System.err.println("splines.eflag=" + bezier.getInt("eflag")); System.err.println("bezier.sp=" + pointftoString(bezier.getStruct("sp"))); System.err.println("bezier.ep=" + pointftoString(bezier.getStruct("ep"))); for (int i = 0; i < bezier.getInt("size"); i++) { final __ptr__ pt = bezier.getPtr("list").plus(i).getPtr(); System.err.println("pt=" + pointftoString(pt)); } } private static String pointftoString(__ptr__ point) { final StringBuilder sb = new StringBuilder(); sb.append("("); sb.append(point.getDouble("x")); sb.append(" ; "); sb.append(point.getDouble("y")); sb.append(")"); return sb.toString(); } public static __struct__ from(Class theClass) { if (theClass == _dtmethod_s.class) { return new ST_dtmethod_s(); } if (theClass == _dtdisc_s.class) { return new ST_dtdisc_s(); } if (theClass == Agdesc_s.class) { return new ST_Agdesc_s(); } if (theClass == Agtag_s.class) { return new ST_Agtag_s(); } if (theClass == Agiddisc_s.class) { return new ST_Agiddisc_s(); } if (theClass == Agmemdisc_s.class) { return new ST_Agmemdisc_s(); } if (theClass == nlist_t.class) { return new ST_nlist_t(); } if (theClass == arrowname_t.class) { return new ST_arrowname_t(); } if (theClass == arrowtype_t.class) { return new ST_arrowtype_t(); } if (theClass == elist.class) { return new ST_elist(); } if (theClass == pointf.class) { return new ST_pointf(); } if (theClass == boxf.class) { return new ST_boxf(); } if (theClass == port.class) { return new ST_port(); } return new __struct_impl__(theClass); } public static StarStruct create(Class theClass, StarStruct parent) { if (theClass == _dtmethod_s.class) { throw new IllegalArgumentException(theClass.toString()); } if (theClass == _dtdisc_s.class) { return new ST_dtdisc_s(parent); } if (theClass == Agdesc_s.class) { return new ST_Agdesc_s(parent); } if (theClass == Agtag_s.class) { return new ST_Agtag_s(parent); } if (theClass == Agiddisc_s.class) { throw new IllegalArgumentException(theClass.toString()); } if (theClass == Agmemdisc_s.class) { throw new IllegalArgumentException(theClass.toString()); } if (theClass == nlist_t.class) { return new ST_nlist_t(parent); } if (theClass == arrowname_t.class) { throw new IllegalArgumentException(theClass.toString()); } if (theClass == arrowtype_t.class) { throw new IllegalArgumentException(theClass.toString()); } if (theClass == elist.class) { return new ST_elist(parent); } if (theClass == pointf.class) { return new ST_pointf(parent); } if (theClass == boxf.class) { return new ST_boxf(parent); } if (theClass == port.class) { return new ST_port(parent); } return new StarStructImpl(theClass, parent); } } plantuml-1.2017.15/src/smetana/core/JUtilsDebug.java000066400000000000000000000032421312650303100220520ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import smetana.core.debug.Debug; public class JUtilsDebug { private final static Debug debug = new Debug(); static public void ENTERING(String signature, String methodName) { debug.entering(signature, methodName); } static public void LEAVING(String signature, String methodName) { debug.leaving(signature, methodName); } } plantuml-1.2017.15/src/smetana/core/Macro.java000066400000000000000000001360661312650303100207450ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import h.Agedge_s; import h.Agedgeinfo_t; import h.Agnode_s; import h.Agnodeinfo_t; import h.Agobj_s; import h.Agraph_s; import h.Agraphinfo_t; import h.GVC_s; import h.ST_Agtag_s; import h.ST_boxf; import h.ST_elist; import h.ST_nlist_t; import h.ST_pointf; import h.ST_port; import h.elist; // http://docs.oracle.com/javase/specs/jls/se5.0/html/expressions.html#15.7.4 // http://www.jbox.dk/sanos/source/lib/string.c.html import h.pointf; import h.port; import h.splines; import h.textlabel_t; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Macro { public static O F(O result, Object... dummy) { return result; } public static int ASINT(boolean v) { return v ? 1 : 0; } public static boolean N(boolean v) { return v == false; } public static boolean N(int i) { return i == 0; } public static boolean N(char c) { return c == 0; } public static boolean N(Object o) { if (o instanceof Boolean) { throw new IllegalArgumentException(); } if (o instanceof Integer) { throw new IllegalArgumentException(); } return o == null; } public static boolean NOT(boolean v) { return v == false; } public static boolean NOT(int i) { return i == 0; } public static boolean NOT(char c) { return c == 0; } public static boolean NOT(Object o) { return o == null; } public static void TRACE(String functionName) { // System.err.println(functionName); } public static __ptr__ UNSUPPORTED(String comment) { throw new UnsupportedOperationException(comment); } public static int UNSUPPORTED_INT(String comment) { throw new UnsupportedOperationException(comment); } // Graphviz // #define AGRAPH 0 /* can't exceed 2 bits. see Agtag_t. */ // #define AGNODE 1 // #define AGOUTEDGE 2 // #define AGINEDGE 3 /* (1 << 1) indicates an edge tag. */ // #define AGEDGE AGOUTEDGE /* synonym in object kind args */ public final static int AGRAPH = 0; public final static int AGNODE = 1; public final static int AGOUTEDGE = 2; public final static int AGINEDGE = 3; public final static int AGEDGE = AGOUTEDGE; // #define AGTAG(obj) (((Agobj_t*)(obj))->tag) public static ST_Agtag_s AGTAG(__ptr__ obj) { return (ST_Agtag_s) obj.castTo(Agobj_s.class).getStruct("tag"); } // #define AGTYPE(obj) (AGTAG(obj).objtype) public static int AGTYPE(__ptr__ obj) { return AGTAG(obj).objtype; } public static void AGTYPE(__ptr__ obj, int v) { AGTAG(obj).objtype = v; } // #define AGID(obj) (AGTAG(obj).id) public static int AGID(__ptr__ obj) { return AGTAG(obj).id; } public static void AGID(__ptr__ obj, int v) { AGTAG(obj).id = v; } // #define AGSEQ(obj) (AGTAG(obj).seq) public static int AGSEQ(__ptr__ obj) { return AGTAG(obj).seq; } public static void AGSEQ(__ptr__ obj, int v) { AGTAG(obj).seq = v; } // #define AGATTRWF(obj) (AGTAG(obj).attrwf) // #define AGDATA(obj) (((Agobj_t*)(obj))->data) public static __ptr__ AGDATA(__ptr__ obj) { return obj.castTo(Agobj_s.class).getPtr("data"); } public static void AGDATA(__ptr__ obj, __ptr__ v) { obj.castTo(Agobj_s.class).setPtr("data", v); } // #define AGIN2OUT(e) ((e)-1) public static __ptr__ AGIN2OUT(__ptr__ e) { return e.plus(-1); } // #define AGOUT2IN(e) ((e)+1) public static __ptr__ AGOUT2IN(__ptr__ e) { return e.plus(1); } // #define AGOPP(e) ((AGTYPE(e)==AGINEDGE)?AGIN2OUT(e):AGOUT2IN(e)) public static Agedge_s AGOPP(Agedge_s e) { return (Agedge_s) (AGTYPE(e) == AGINEDGE ? AGIN2OUT(e) : AGOUT2IN(e)); } // #define AGMKOUT(e) (AGTYPE(e) == AGOUTEDGE? (e): AGIN2OUT(e)) public static Agedge_s AGMKOUT(__ptr__ e) { return (Agedge_s) (AGTYPE(e) == AGOUTEDGE ? (e) : AGIN2OUT(e)); } // #define AGMKIN(e) (AGTYPE(e) == AGINEDGE? (e): AGOUT2IN(e)) public static Agedge_s AGMKIN(__ptr__ e) { return (Agedge_s) (AGTYPE(e) == AGINEDGE ? (e) : AGOUT2IN(e)); } // #define AGTAIL(e) (AGMKIN(e)->node) public static Agnode_s AGTAIL(__ptr__ e) { return (Agnode_s) AGMKIN(e).getPtr("node"); } public static Agnode_s agtail(__ptr__ e) { return (Agnode_s) AGMKIN(e).getPtr("node"); } public static void agtail(Agedge_s e, __ptr__ v) { AGMKIN(e).setPtr("node", v); } // #define AGHEAD(e) (AGMKOUT(e)->node) public static Agnode_s AGHEAD(__ptr__ e) { return (Agnode_s) AGMKOUT(e).getPtr("node"); } private static Agnode_s aghead(Agedge_s e) { return (Agnode_s) AGMKOUT(e).getPtr("node"); } public static void aghead(Agedge_s e, __ptr__ v) { AGMKOUT(e).setPtr("node", v); } // #define agtail(e) AGTAIL(e) // #define aghead(e) AGHEAD(e) // #define agopp(e) AGOPP(e) // #define ageqedge(e,f) (AGMKOUT(e) == AGMKOUT(f)) // #define AGHEADPOINTER(g) ((Agnoderef_t*)(g->n_seq->data->hh._head)) // #define AGRIGHTPOINTER(rep) ((Agnoderef_t*)((rep)->seq_link.right?((void*)((rep)->seq_link.right) - // offsetof(Agsubnode_t,seq_link)):0)) // #define AGLEFTPOINTER(rep) ((Agnoderef_t*)((rep)->seq_link.hl._left?((void*)((rep)->seq_link.hl._left) - // offsetof(Agsubnode_t,seq_link)):0)) // // #define FIRSTNREF(g) (agflatten(g,1), AGHEADPOINTER(g)) // // #define NEXTNREF(g,rep) (AGRIGHTPOINTER(rep) == AGHEADPOINTER(g)?0:AGRIGHTPOINTER(rep)) // // #define PREVNREF(g,rep) (((rep)==AGHEADPOINTER(g))?0:(AGLEFTPOINTER(rep))) // // #define LASTNREF(g) (agflatten(g,1), AGHEADPOINTER(g)?AGLEFTPOINTER(AGHEADPOINTER(g)):0) // #define NODEOF(rep) ((rep)->node) // // #define FIRSTOUTREF(g,sn) (agflatten(g,1), (sn)->out_seq) // #define LASTOUTREF(g,sn) (agflatten(g,1), (Agedgeref_t*)dtlast(sn->out_seq)) // #define FIRSTINREF(g,sn) (agflatten(g,1), (sn)->in_seq) // #define NEXTEREF(g,rep) ((rep)->right) // #define PREVEREF(g,rep) ((rep)->hl._left) // /* this is expedient but a bit slimey because it "knows" that dict entries of both nodes // and edges are embedded in main graph objects but allocated separately in subgraphs */ // #define AGSNMAIN(sn) ((sn)==(&((sn)->node->mainsub))) // #define EDGEOF(sn,rep) (AGSNMAIN(sn)?((Agedge_t*)((unsigned char*)(rep) - offsetof(Agedge_t,seq_link))) : // ((Dthold_t*)(rep))->obj) // #define LENGTH(e) (ND_rank(aghead(e)) - ND_rank(agtail(e))) public static int LENGTH(Agedge_s e) { return ND_rank(aghead(e)) - ND_rank(agtail(e)); } // #define SLACK(e) (LENGTH(e) - ED_minlen(e)) public static int SLACK(Agedge_s e) { return LENGTH(e) - ED_minlen(e); } // #define SEQ(a,b,c) (((a) <= (b)) && ((b) <= (c))) public static boolean SEQ(int a, int b, int c) { return (((a) <= (b)) && ((b) <= (c))); } // #define TREE_EDGE(e) (ED_tree_index(e) >= 0) public static boolean TREE_EDGE(Agedge_s e) { return ED_tree_index(e) >= 0; } // #define GD_parent(g) (((Agraphinfo_t*)AGDATA(g))->parent) public static __ptr__ GD_parent(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("parent"); } public static void GD_parent(Agraph_s g, __ptr__ v) { AGDATA(g).castTo(Agraphinfo_t.class).setPtr("parent", v); } // #define GD_level(g) (((Agraphinfo_t*)AGDATA(g))->level) // #define GD_drawing(g) (((Agraphinfo_t*)AGDATA(g))->drawing) public static __ptr__ GD_drawing(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("drawing"); } public static void GD_drawing(Agraph_s g, __ptr__ v) { AGDATA(g).castTo(Agraphinfo_t.class).setPtr("drawing", v); } // #define GD_bb(g) (((Agraphinfo_t*)AGDATA(g))->bb) public static ST_boxf GD_bb(__ptr__ g) { return (ST_boxf) AGDATA(g).castTo(Agraphinfo_t.class).getStruct("bb"); } // #define GD_gvc(g) (((Agraphinfo_t*)AGDATA(g))->gvc) public static GVC_s GD_gvc(Agraph_s g) { return (GVC_s) AGDATA(g).castTo(Agraphinfo_t.class).getPtr("gvc"); } public static void GD_gvc(Agraph_s g, GVC_s v) { AGDATA(g).castTo(Agraphinfo_t.class).setPtr("gvc", v); } // #define GD_cleanup(g) (((Agraphinfo_t*)AGDATA(g))->cleanup) public static __ptr__ GD_cleanup(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("cleanup"); } // #define GD_dist(g) (((Agraphinfo_t*)AGDATA(g))->dist) // #define GD_alg(g) (((Agraphinfo_t*)AGDATA(g))->alg) // #define GD_border(g) (((Agraphinfo_t*)AGDATA(g))->border) public static __array_of_struct__ GD_border(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getArrayOfStruct("border"); } // #define GD_cl_cnt(g) (((Agraphinfo_t*)AGDATA(g))->cl_nt) // #define GD_clust(g) (((Agraphinfo_t*)AGDATA(g))->clust) public static __ptr__ GD_clust(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("clust"); } public static void GD_clust(Agraph_s g, __ptr__ v) { AGDATA(g).castTo(Agraphinfo_t.class).setPtr("clust", v); } // #define GD_dotroot(g) (((Agraphinfo_t*)AGDATA(g))->dotroot) public static Agraph_s GD_dotroot(Agraph_s g) { return (Agraph_s) AGDATA(g).castTo(Agraphinfo_t.class).getPtr("dotroot"); } public static void GD_dotroot(Agraph_s g, __ptr__ v) { AGDATA(g).castTo(Agraphinfo_t.class).setPtr("dotroot", v); } // #define GD_comp(g) (((Agraphinfo_t*)AGDATA(g))->comp) public static ST_nlist_t GD_comp(Agraph_s g) { return (ST_nlist_t) AGDATA(g).castTo(Agraphinfo_t.class).getStruct("comp"); } // #define GD_exact_ranksep(g) (((Agraphinfo_t*)AGDATA(g))->exact_ranksep) public static int GD_exact_ranksep(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("exact_ranksep"); } public static void GD_exact_ranksep(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("exact_ranksep", v); } // #define GD_expanded(g) (((Agraphinfo_t*)AGDATA(g))->expanded) public static boolean GD_expanded(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getBoolean("expanded"); } public static void GD_expanded(Agraph_s g, boolean v) { AGDATA(g).castTo(Agraphinfo_t.class).setBoolean("expanded", v); } // #define GD_flags(g) (((Agraphinfo_t*)AGDATA(g))->flags) public static int GD_flags(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("flags"); } public static void GD_flags(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("flags", v); } // #define GD_gui_state(g) (((Agraphinfo_t*)AGDATA(g))->gui_state) // #define GD_charset(g) (((Agraphinfo_t*)AGDATA(g))->charset) public static int GD_charset(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("charset"); } public static void GD_charset(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("charset", v); } // #define GD_has_labels(g) (((Agraphinfo_t*)AGDATA(g))->has_labels) public static int GD_has_labels(__ptr__ g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("has_labels"); } public static void GD_has_labels(__ptr__ g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("has_labels", v); } // #define GD_has_images(g) (((Agraphinfo_t*)AGDATA(g))->has_images) // #define GD_has_flat_edges(g) (((Agraphinfo_t*)AGDATA(g))->has_flat_edges) public static int GD_has_flat_edges(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("has_flat_edges"); } public static void GD_has_flat_edges(Agraph_s g, boolean v) { AGDATA(g).castTo(Agraphinfo_t.class).setBoolean("has_flat_edges", v); } // #define GD_has_sourcerank(g) (((Agraphinfo_t*)AGDATA(g))->has_sourcerank) // #define GD_has_sinkrank(g) (((Agraphinfo_t*)AGDATA(g))->has_sinkrank) // #define GD_ht1(g) (((Agraphinfo_t*)AGDATA(g))->ht1) public static double GD_ht1(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getDouble("ht1"); } public static void GD_ht1(Agraph_s g, double v) { AGDATA(g).castTo(Agraphinfo_t.class).setDouble("ht1", v); } // #define GD_ht2(g) (((Agraphinfo_t*)AGDATA(g))->ht2) public static double GD_ht2(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getDouble("ht2"); } public static void GD_ht2(Agraph_s g, double v) { AGDATA(g).castTo(Agraphinfo_t.class).setDouble("ht2", v); } // #define GD_inleaf(g) (((Agraphinfo_t*)AGDATA(g))->inleaf) // #define GD_installed(g) (((Agraphinfo_t*)AGDATA(g))->installed) public static int GD_installed(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("installed"); } public static void GD_installed(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("installed", v); } // #define GD_label(g) (((Agraphinfo_t*)AGDATA(g))->label) public static textlabel_t GD_label(__ptr__ g) { return (textlabel_t) AGDATA(g).castTo(Agraphinfo_t.class).getPtr("label"); } public static void GD_label(__ptr__ g, __ptr__ v) { AGDATA(g).castTo(Agraphinfo_t.class).setPtr("label", v); } // #define GD_leader(g) (((Agraphinfo_t*)AGDATA(g))->leader) public static Agnode_s GD_leader(Agraph_s g) { return (Agnode_s) AGDATA(g).castTo(Agraphinfo_t.class).getPtr("leader"); } public static void GD_leader(Agraph_s g, __ptr__ v) { AGDATA(g).castTo(Agraphinfo_t.class).setPtr("leader", v); } // #define GD_rankdir2(g) (((Agraphinfo_t*)AGDATA(g))->rankdir) public static int GD_rankdir2(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("rankdir"); } public static void GD_rankdir2(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("rankdir", v); } // #define GD_rankdir(g) (((Agraphinfo_t*)AGDATA(g))->rankdir & 0x3) public static int GD_rankdir(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("rankdir") & 0x3; } // #define GD_flip(g) (GD_rankdir(g) & 1) public static int GD_flip(Agraph_s g) { return GD_rankdir(g) & 1; } // #define GD_realrankdir(g) ((((Agraphinfo_t*)AGDATA(g))->rankdir) >> 2) // #define GD_realflip(g) (GD_realrankdir(g) & 1) // #define GD_ln(g) (((Agraphinfo_t*)AGDATA(g))->ln) public static Agnode_s GD_ln(Agraph_s g) { return (Agnode_s) AGDATA(g).castTo(Agraphinfo_t.class).getPtr("ln"); } public static void GD_ln(Agraph_s g, __ptr__ v) { AGDATA(g).castTo(Agraphinfo_t.class).setPtr("ln", v); } // #define GD_maxrank(g) (((Agraphinfo_t*)AGDATA(g))->maxrank) public static int GD_maxrank(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("maxrank"); } public static void GD_maxrank(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("maxrank", v); } // #define GD_maxset(g) (((Agraphinfo_t*)AGDATA(g))->maxset) public static __ptr__ GD_maxset(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("maxset"); } // #define GD_minrank(g) (((Agraphinfo_t*)AGDATA(g))->minrank) public static int GD_minrank(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("minrank"); } public static void GD_minrank(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("minrank", v); } // #define GD_minset(g) (((Agraphinfo_t*)AGDATA(g))->minset) public static __ptr__ GD_minset(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("minset"); } // #define GD_minrep(g) (((Agraphinfo_t*)AGDATA(g))->minrep) // #define GD_maxrep(g) (((Agraphinfo_t*)AGDATA(g))->maxrep) // #define GD_move(g) (((Agraphinfo_t*)AGDATA(g))->move) // #define GD_n_cluster(g) (((Agraphinfo_t*)AGDATA(g))->n_cluster) public static int GD_n_cluster(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("n_cluster"); } public static void GD_n_cluster(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("n_cluster", v); } // #define GD_n_nodes(g) (((Agraphinfo_t*)AGDATA(g))->n_nodes) public static int GD_n_nodes(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("n_nodes"); } public static void GD_n_nodes(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("n_nodes", v); } // #define GD_ndim(g) (((Agraphinfo_t*)AGDATA(g))->ndim) // #define GD_odim(g) (((Agraphinfo_t*)AGDATA(g))->odim) // #define GD_neato_nlist(g) (((Agraphinfo_t*)AGDATA(g))->neato_nlist) // #define GD_nlist(g) (((Agraphinfo_t*)AGDATA(g))->nlist) public static Agnode_s GD_nlist(Agraph_s g) { return (Agnode_s) AGDATA(g).castTo(Agraphinfo_t.class).getPtr("nlist"); } public static void GD_nlist(Agraph_s g, __ptr__ v) { AGDATA(g).castTo(Agraphinfo_t.class).setPtr("nlist", v); } // #define GD_nodesep(g) (((Agraphinfo_t*)AGDATA(g))->nodesep) public static int GD_nodesep(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("nodesep"); } public static void GD_nodesep(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("nodesep", v); } // #define GD_outleaf(g) (((Agraphinfo_t*)AGDATA(g))->outleaf) // #define GD_rank(g) (((Agraphinfo_t*)AGDATA(g))->rank) public static __ptr__ GD_rank(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("rank"); } public static void GD_rank(Agraph_s g, __ptr__ v) { AGDATA(g).castTo(Agraphinfo_t.class).setPtr("rank", v); } // #define GD_rankleader(g) (((Agraphinfo_t*)AGDATA(g))->rankleader) public static __ptr__ GD_rankleader(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("rankleader"); } public static void GD_rankleader(Agraph_s g, __ptr__ v) { AGDATA(g).castTo(Agraphinfo_t.class).setPtr("rankleader", v); } // #define GD_ranksep(g) (((Agraphinfo_t*)AGDATA(g))->ranksep) public static int GD_ranksep(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("ranksep"); } public static void GD_ranksep(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("ranksep", v); } // #define GD_rn(g) (((Agraphinfo_t*)AGDATA(g))->rn) public static Agnode_s GD_rn(Agraph_s g) { return (Agnode_s) AGDATA(g).castTo(Agraphinfo_t.class).getPtr("rn"); } public static void GD_rn(Agraph_s g, __ptr__ v) { AGDATA(g).castTo(Agraphinfo_t.class).setPtr("rn", v); } // #define GD_set_type(g) (((Agraphinfo_t*)AGDATA(g))->set_type) public static int GD_set_type(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("set_type"); } public static void GD_set_type(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("set_type", v); } // #define GD_label_pos(g) (((Agraphinfo_t*)AGDATA(g))->label_pos) public static int GD_label_pos(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("label_pos"); } public static void GD_label_pos(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("label_pos", v); } // #define GD_showboxes(g) (((Agraphinfo_t*)AGDATA(g))->showboxes) public static int GD_showboxes(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("showboxes"); } public static void GD_showboxes(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("showboxes", v); } // #define GD_fontnames(g) (((Agraphinfo_t*)AGDATA(g))->fontnames) public static int GD_fontnames(Agraph_s g) { return AGDATA(g).castTo(Agraphinfo_t.class).getInt("fontnames"); } public static void GD_fontnames(Agraph_s g, int v) { AGDATA(g).castTo(Agraphinfo_t.class).setInt("fontnames", v); } // #define GD_spring(g) (((Agraphinfo_t*)AGDATA(g))->spring) // #define GD_sum_t(g) (((Agraphinfo_t*)AGDATA(g))->sum_t) // #define GD_t(g) (((Agraphinfo_t*)AGDATA(g))->t) // #define ND_id(n) (((Agnodeinfo_t*)AGDATA(n))->id) public static int ND_id(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("id"); } // #define ND_alg(n) (((Agnodeinfo_t*)AGDATA(n))->alg) public static __ptr__ ND_alg(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("alg"); } public static void ND_alg(Agnode_s n, __ptr__ value) { AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("alg", value); } // #define ND_UF_parent(n) (((Agnodeinfo_t*)AGDATA(n))->UF_parent) public static Agnode_s ND_UF_parent(__ptr__ n) { return (Agnode_s) AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("UF_parent"); } public static void ND_UF_parent(__ptr__ n, __ptr__ v) { AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("UF_parent", v); } // #define ND_set(n) (((Agnodeinfo_t*)AGDATA(n))->set) // #define ND_UF_size(n) (((Agnodeinfo_t*)AGDATA(n))->UF_size) public static int ND_UF_size(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("UF_size"); } public static void ND_UF_size(Agnode_s n, int v) { AGDATA(n).castTo(Agnodeinfo_t.class).setInt("UF_size", v); } // #define ND_bb(n) (((Agnodeinfo_t*)AGDATA(n))->bb) // #define ND_clust(n) (((Agnodeinfo_t*)AGDATA(n))->clust) public static Agraph_s ND_clust(__ptr__ n) { return (Agraph_s) AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("clust"); } public static void ND_clust(Agnode_s n, __ptr__ v) { AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("clust", v); } // #define ND_coord(n) (((Agnodeinfo_t*)AGDATA(n))->coord) public static ST_pointf ND_coord(__ptr__ n) { return (ST_pointf) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("coord"); } // #define ND_dist(n) (((Agnodeinfo_t*)AGDATA(n))->dist) // #define ND_flat_in(n) (((Agnodeinfo_t*)AGDATA(n))->flat_in) public static ST_elist ND_flat_in(Agnode_s n) { return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("flat_in"); } // #define ND_flat_out(n) (((Agnodeinfo_t*)AGDATA(n))->flat_out) public static ST_elist ND_flat_out(Agnode_s n) { return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("flat_out"); } // #define ND_gui_state(n) (((Agnodeinfo_t*)AGDATA(n))->gui_state) // #define ND_has_port(n) (((Agnodeinfo_t*)AGDATA(n))->has_port) public static boolean ND_has_port(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getBoolean("has_port"); } // #define ND_rep(n) (((Agnodeinfo_t*)AGDATA(n))->rep) // #define ND_heapindex(n) (((Agnodeinfo_t*)AGDATA(n))->heapindex) // #define ND_height(n) (((Agnodeinfo_t*)AGDATA(n))->height) public static double ND_height(__ptr__ n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getDouble("height"); } public static void ND_height(Agnode_s n, double v) { AGDATA(n).castTo(Agnodeinfo_t.class).setDouble("height", v); } // #define ND_hops(n) (((Agnodeinfo_t*)AGDATA(n))->hops) // #define ND_ht(n) (((Agnodeinfo_t*)AGDATA(n))->ht) public static double ND_ht(__ptr__ n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getDouble("ht"); } public static void ND_ht(Agnode_s n, double v) { AGDATA(n).castTo(Agnodeinfo_t.class).setDouble("ht", v); } // #define ND_in(n) (((Agnodeinfo_t*)AGDATA(n))->in) public static ST_elist ND_in(Agnode_s n) { return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("in"); } public static void ND_in(__ptr__ n, __struct__ v) { AGDATA(n).castTo(Agnodeinfo_t.class).setStruct("in", v); } // #define ND_inleaf(n) (((Agnodeinfo_t*)AGDATA(n))->inleaf) public static __ptr__ ND_inleaf(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("inleaf"); } // #define ND_label(n) (((Agnodeinfo_t*)AGDATA(n))->label) public static textlabel_t ND_label(Agnode_s n) { return (textlabel_t) AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("label"); } public static void ND_label(Agnode_s n, __ptr__ v) { AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("label", v); } // #define ND_xlabel(n) (((Agnodeinfo_t*)AGDATA(n))->xlabel) public static __ptr__ ND_xlabel(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("xlabel"); } // #define ND_lim(n) (((Agnodeinfo_t*)AGDATA(n))->lim) public static int ND_lim(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("lim"); } public static void ND_lim(Agnode_s n, int v) { AGDATA(n).castTo(Agnodeinfo_t.class).setInt("lim", v); } // #define ND_low(n) (((Agnodeinfo_t*)AGDATA(n))->low) public static int ND_low(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("low"); } public static void ND_low(Agnode_s n, int v) { AGDATA(n).castTo(Agnodeinfo_t.class).setInt("low", v); } // #define ND_lw(n) (((Agnodeinfo_t*)AGDATA(n))->lw) public static double ND_lw(__ptr__ n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getDouble("lw"); } public static void ND_lw(Agnode_s n, double v) { AGDATA(n).castTo(Agnodeinfo_t.class).setDouble("lw", v); } // #define ND_mark(n) (((Agnodeinfo_t*)AGDATA(n))->mark) public static int ND_mark(__ptr__ n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("mark"); } public static void ND_mark(__ptr__ n, int v) { AGDATA(n).castTo(Agnodeinfo_t.class).setInt("mark", v); } public static void ND_mark(__ptr__ n, boolean v) { AGDATA(n).castTo(Agnodeinfo_t.class).setBoolean("mark", v); } // #define ND_mval(n) (((Agnodeinfo_t*)AGDATA(n))->mval) public static double ND_mval(__ptr__ n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getDouble("mval"); } public static void ND_mval(Agnode_s n, double v) { AGDATA(n).castTo(Agnodeinfo_t.class).setDouble("mval", v); } // #define ND_n_cluster(n) (((Agnodeinfo_t*)AGDATA(n))->n_cluster) // #define ND_next(n) (((Agnodeinfo_t*)AGDATA(n))->next) public static Agnode_s ND_next(Agnode_s n) { return (Agnode_s) AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("next"); } public static void ND_next(__ptr__ n, __ptr__ v) { AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("next", v); } // #define ND_node_type(n) (((Agnodeinfo_t*)AGDATA(n))->node_type) public static int ND_node_type(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("node_type"); } public static void ND_node_type(Agnode_s n, int v) { AGDATA(n).castTo(Agnodeinfo_t.class).setInt("node_type", v); } // #define ND_onstack(n) (((Agnodeinfo_t*)AGDATA(n))->onstack) public static boolean ND_onstack(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getBoolean("onstack"); } public static void ND_onstack(Agnode_s n, int v) { AGDATA(n).castTo(Agnodeinfo_t.class).setInt("onstack", v); } public static void ND_onstack(Agnode_s n, boolean v) { AGDATA(n).castTo(Agnodeinfo_t.class).setBoolean("onstack", v); } // #define ND_order(n) (((Agnodeinfo_t*)AGDATA(n))->order) public static int ND_order(__ptr__ n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("order"); } public static void ND_order(__ptr__ n, int v) { AGDATA(n).castTo(Agnodeinfo_t.class).setInt("order", v); } // #define ND_other(n) (((Agnodeinfo_t*)AGDATA(n))->other) public static ST_elist ND_other(Agnode_s n) { return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("other"); } // #define ND_out(n) (((Agnodeinfo_t*)AGDATA(n))->out) public static ST_elist ND_out(__ptr__ n) { return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("out"); } public static void ND_out(__ptr__ n, __struct__ v) { AGDATA(n).castTo(Agnodeinfo_t.class).setStruct("out", v); } // #define ND_outleaf(n) (((Agnodeinfo_t*)AGDATA(n))->outleaf) public static __ptr__ ND_outleaf(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("outleaf"); } // #define ND_par(n) (((Agnodeinfo_t*)AGDATA(n))->par) public static Agedge_s ND_par(Agnode_s n) { return (Agedge_s) AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("par"); } public static void ND_par(Agnode_s n, __ptr__ v) { AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("par", v); } // #define ND_pinned(n) (((Agnodeinfo_t*)AGDATA(n))->pinned) // #define ND_pos(n) (((Agnodeinfo_t*)AGDATA(n))->pos) // #define ND_prev(n) (((Agnodeinfo_t*)AGDATA(n))->prev) public static __ptr__ ND_prev(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("prev"); } public static void ND_prev(Agnode_s n, __ptr__ v) { AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("prev", v); } // #define ND_priority(n) (((Agnodeinfo_t*)AGDATA(n))->priority) public static int ND_priority(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("priority"); } public static void ND_priority(Agnode_s n, int v) { AGDATA(n).castTo(Agnodeinfo_t.class).setInt("priority", v); } // #define ND_rank(n) (((Agnodeinfo_t*)AGDATA(n))->rank) public static int ND_rank(__ptr__ n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("rank"); } public static void ND_rank(__ptr__ n, int v) { AGDATA(n).castTo(Agnodeinfo_t.class).setInt("rank", v); } // #define ND_ranktype(n) (((Agnodeinfo_t*)AGDATA(n))->ranktype) public static int ND_ranktype(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("ranktype"); } public static void ND_ranktype(Agnode_s n, int v) { AGDATA(n).castTo(Agnodeinfo_t.class).setInt("ranktype", v); } // #define ND_rw(n) (((Agnodeinfo_t*)AGDATA(n))->rw) public static double ND_rw(__ptr__ n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getDouble("rw"); } public static void ND_rw(Agnode_s n, double v) { AGDATA(n).castTo(Agnodeinfo_t.class).setDouble("rw", v); } // #define ND_save_in(n) (((Agnodeinfo_t*)AGDATA(n))->save_in) public static ST_elist ND_save_in(Agnode_s n) { return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("save_in"); } public static void ND_save_in(Agnode_s n, __struct__ v) { AGDATA(n).castTo(Agnodeinfo_t.class).setStruct("save_in", v); } // #define ND_save_out(n) (((Agnodeinfo_t*)AGDATA(n))->save_out) public static ST_elist ND_save_out(Agnode_s n) { return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("save_out"); } public static void ND_save_out(Agnode_s n, __struct__ v) { AGDATA(n).castTo(Agnodeinfo_t.class).setStruct("save_out", v); } // #define ND_shape(n) (((Agnodeinfo_t*)AGDATA(n))->shape) public static __ptr__ ND_shape(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("shape"); } public static void ND_shape(Agnode_s n, __ptr__ v) { AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("shape", v); } // #define ND_shape_info(n) (((Agnodeinfo_t*)AGDATA(n))->shape_info) public static __ptr__ ND_shape_info(__ptr__ n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("shape_info"); } // #define ND_showboxes(n) (((Agnodeinfo_t*)AGDATA(n))->showboxes) public static int ND_showboxes(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("showboxes"); } public static void ND_showboxes(Agnode_s n, int v) { AGDATA(n).castTo(Agnodeinfo_t.class).setInt("showboxes", v); } // #define ND_state(n) (((Agnodeinfo_t*)AGDATA(n))->state) // #define ND_clustnode(n) (((Agnodeinfo_t*)AGDATA(n))->clustnode) // #define ND_tree_in(n) (((Agnodeinfo_t*)AGDATA(n))->tree_in) public static ST_elist ND_tree_in(Agnode_s n) { return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("tree_in"); } // #define ND_tree_out(n) (((Agnodeinfo_t*)AGDATA(n))->tree_out) public static ST_elist ND_tree_out(Agnode_s n) { return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("tree_out"); } // #define ND_weight_class(n) (((Agnodeinfo_t*)AGDATA(n))->weight_class) public static int ND_weight_class(Agnode_s n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("weight_class"); } public static void ND_weight_class(Agnode_s n, int v) { AGDATA(n).castTo(Agnodeinfo_t.class).setInt("weight_class", v); } // #define ND_width(n) (((Agnodeinfo_t*)AGDATA(n))->width) public static double ND_width(__ptr__ n) { return AGDATA(n).castTo(Agnodeinfo_t.class).getDouble("width"); } public static void ND_width(Agnode_s n, double v) { AGDATA(n).castTo(Agnodeinfo_t.class).setDouble("width", v); } // #define ND_xsize(n) (ND_lw(n)+ND_rw(n)) // #define ND_ysize(n) (ND_ht(n)) // #define ED_alg(e) (((Agedgeinfo_t*)AGDATA(e))->alg) // #define ED_conc_opp_flag(e) (((Agedgeinfo_t*)AGDATA(e))->conc_opp_flag) public static boolean ED_conc_opp_flag(Agedge_s e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getBoolean("conc_opp_flag"); } public static void ED_conc_opp_flag(Agedge_s e, boolean v) { AGDATA(e).castTo(Agedgeinfo_t.class).setInt("conc_opp_flag", v ? 1 : 0); } // #define ED_count(e) (((Agedgeinfo_t*)AGDATA(e))->count) public static int ED_count(__ptr__ e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("count"); } public static void ED_count(__ptr__ e, int v) { AGDATA(e).castTo(Agedgeinfo_t.class).setInt("count", v); } // #define ED_cutvalue(e) (((Agedgeinfo_t*)AGDATA(e))->cutvalue) public static int ED_cutvalue(Agedge_s e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("cutvalue"); } public static void ED_cutvalue(Agedge_s e, int v) { AGDATA(e).castTo(Agedgeinfo_t.class).setInt("cutvalue", v); } // #define ED_edge_type(e) (((Agedgeinfo_t*)AGDATA(e))->edge_type) // #define ED_adjacent(e) (((Agedgeinfo_t*)AGDATA(e))->adjacent) public static int ED_adjacent(__ptr__ e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("adjacent"); } public static void ED_adjacent(Agedge_s e, int v) { AGDATA(e).castTo(Agedgeinfo_t.class).setInt("adjacent", v); } // #define ED_factor(e) (((Agedgeinfo_t*)AGDATA(e))->factor) // #define ED_gui_state(e) (((Agedgeinfo_t*)AGDATA(e))->gui_state) // #define ED_head_label(e) (((Agedgeinfo_t*)AGDATA(e))->head_label) public static __ptr__ ED_head_label(Agedge_s e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getPtr("head_label"); } // #define ED_head_port(e) (((Agedgeinfo_t*)AGDATA(e))->head_port) public static ST_port ED_head_port(__ptr__ e) { return (ST_port) AGDATA(e).castTo(Agedgeinfo_t.class).getStruct("head_port"); } public static void ED_head_port(Agedge_s e, __struct__ v) { AGDATA(e).castTo(Agedgeinfo_t.class).setStruct("head_port", v); } // #define ED_label(e) (((Agedgeinfo_t*)AGDATA(e))->label) public static textlabel_t ED_label(__ptr__ e) { return (textlabel_t) AGDATA(e).castTo(Agedgeinfo_t.class).getPtr("label"); } public static void ED_label(Agedge_s e, __ptr__ v) { AGDATA(e).castTo(Agedgeinfo_t.class).setPtr("label", v); } // #define ED_xlabel(e) (((Agedgeinfo_t*)AGDATA(e))->xlabel) public static __ptr__ ED_xlabel(Agedge_s e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getPtr("xlabel"); } // #define ED_label_ontop(e) (((Agedgeinfo_t*)AGDATA(e))->label_ontop) public static boolean ED_label_ontop(Agedge_s e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getBoolean("label_ontop"); } public static void ED_label_ontop(Agedge_s e, boolean v) { AGDATA(e).castTo(Agedgeinfo_t.class).setBoolean("label_ontop", v); } // #define ED_minlen(e) (((Agedgeinfo_t*)AGDATA(e))->minlen) public static int ED_minlen(Agedge_s e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("minlen"); } public static void ED_minlen(Agedge_s e, int v) { AGDATA(e).castTo(Agedgeinfo_t.class).setInt("minlen", v); } // #define ED_path(e) (((Agedgeinfo_t*)AGDATA(e))->path) // #define ED_showboxes(e) (((Agedgeinfo_t*)AGDATA(e))->showboxes) public static int ED_showboxes(Agedge_s e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("showboxes"); } public static void ED_showboxes(Agedge_s e, int v) { AGDATA(e).castTo(Agedgeinfo_t.class).setInt("showboxes", v); } // #define ED_spl(e) (((Agedgeinfo_t*)AGDATA(e))->spl) public static splines ED_spl(Agedge_s e) { return (splines) AGDATA(e).castTo(Agedgeinfo_t.class).getPtr("spl"); } public static void ED_spl(Agedge_s e, __ptr__ v) { AGDATA(e).castTo(Agedgeinfo_t.class).setPtr("spl", v); } // #define ED_tail_label(e) (((Agedgeinfo_t*)AGDATA(e))->tail_label) public static __ptr__ ED_tail_label(Agedge_s e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getPtr("tail_label"); } // #define ED_tail_port(e) (((Agedgeinfo_t*)AGDATA(e))->tail_port) public static ST_port ED_tail_port(__ptr__ e) { return (ST_port) AGDATA(e).castTo(Agedgeinfo_t.class).getStruct("tail_port"); } public static void ED_tail_port(Agedge_s e, ST_port v) { AGDATA(e).castTo(Agedgeinfo_t.class).setStruct("tail_port", v); } // #define ED_to_orig(e) (((Agedgeinfo_t*)AGDATA(e))->to_orig) public static Agedge_s ED_to_orig(__ptr__ e) { return (Agedge_s) AGDATA(e).castTo(Agedgeinfo_t.class).getPtr("to_orig"); } public static void ED_to_orig(Agedge_s e, __ptr__ v) { AGDATA(e).castTo(Agedgeinfo_t.class).setPtr("to_orig", v); } // #define ED_to_virt(e) (((Agedgeinfo_t*)AGDATA(e))->to_virt) public static Agedge_s ED_to_virt(Agedge_s e) { return (Agedge_s) AGDATA(e).castTo(Agedgeinfo_t.class).getPtr("to_virt"); } public static void ED_to_virt(Agedge_s e, __ptr__ v) { AGDATA(e).castTo(Agedgeinfo_t.class).setPtr("to_virt", v); } // #define ED_tree_index(e) (((Agedgeinfo_t*)AGDATA(e))->tree_index) public static int ED_tree_index(__ptr__ e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("tree_index"); } public static void ED_tree_index(__ptr__ e, int v) { AGDATA(e).castTo(Agedgeinfo_t.class).setInt("tree_index", v); } // #define ED_xpenalty(e) (((Agedgeinfo_t*)AGDATA(e))->xpenalty) public static int ED_xpenalty(__ptr__ e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("xpenalty"); } public static void ED_xpenalty(Agedge_s e, int v) { AGDATA(e).castTo(Agedgeinfo_t.class).setInt("xpenalty", v); } // #define ED_dist(e) (((Agedgeinfo_t*)AGDATA(e))->dist) public static double ED_dist(Agedge_s e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getDouble("dist"); } public static void ED_dist(Agedge_s e, double v) { AGDATA(e).castTo(Agedgeinfo_t.class).setDouble("dist", v); } // #define ED_weight(e) (((Agedgeinfo_t*)AGDATA(e))->weight) public static int ED_weight(Agedge_s e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("weight"); } public static void ED_weight(Agedge_s e, int v) { AGDATA(e).castTo(Agedgeinfo_t.class).setInt("weight", v); } // // #define ED_alg(e) (((Agedgeinfo_t*)AGDATA(e))->alg) // #define ED_conc_opp_flag(e) (((Agedgeinfo_t*)AGDATA(e))->conc_opp_flag) // #define ED_count(e) (((Agedgeinfo_t*)AGDATA(e))->count) // #define ED_cutvalue(e) (((Agedgeinfo_t*)AGDATA(e))->cutvalue) // #define ED_edge_type(e) (((Agedgeinfo_t*)AGDATA(e))->edge_type) public static int ED_edge_type(Agedge_s e) { return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("edge_type"); } public static void ED_edge_type(Agedge_s e, int v) { AGDATA(e).castTo(Agedgeinfo_t.class).setInt("edge_type", v); } // #define ED_adjacent(e) (((Agedgeinfo_t*)AGDATA(e))->adjacent) // #define ED_factor(e) (((Agedgeinfo_t*)AGDATA(e))->factor) // #define ED_gui_state(e) (((Agedgeinfo_t*)AGDATA(e))->gui_state) // #define ED_head_label(e) (((Agedgeinfo_t*)AGDATA(e))->head_label) // #define ED_head_port(e) (((Agedgeinfo_t*)AGDATA(e))->head_port) // #define ED_label(e) (((Agedgeinfo_t*)AGDATA(e))->label) // #define ED_xlabel(e) (((Agedgeinfo_t*)AGDATA(e))->xlabel) // #define ED_label_ontop(e) (((Agedgeinfo_t*)AGDATA(e))->label_ontop) // #define ED_minlen(e) (((Agedgeinfo_t*)AGDATA(e))->minlen) // #define ED_path(e) (((Agedgeinfo_t*)AGDATA(e))->path) // #define ED_showboxes(e) (((Agedgeinfo_t*)AGDATA(e))->showboxes) // #define ED_spl(e) (((Agedgeinfo_t*)AGDATA(e))->spl) // #define ED_tail_label(e) (((Agedgeinfo_t*)AGDATA(e))->tail_label) // #define ED_tail_port(e) (((Agedgeinfo_t*)AGDATA(e))->tail_port) // #define ED_to_orig(e) (((Agedgeinfo_t*)AGDATA(e))->to_orig) // #define ED_to_virt(e) (((Agedgeinfo_t*)AGDATA(e))->to_virt) // #define ED_tree_index(e) (((Agedgeinfo_t*)AGDATA(e))->tree_index) // #define ED_xpenalty(e) (((Agedgeinfo_t*)AGDATA(e))->xpenalty) // #define ED_dist(e) (((Agedgeinfo_t*)AGDATA(e))->dist) // #define ED_weight(e) (((Agedgeinfo_t*)AGDATA(e))->weight) // #define elist_fastapp(item,L) do {L.list[L.size++] = item; L.list[L.size] = NULL;} while(0) // #define ALLOC(size,ptr,type) (ptr? (type*)realloc(ptr,(size)*sizeof(type)):(type*)malloc((size)*sizeof(type))) public static __ptr__ ALLOC_empty(int size, __ptr__ ptr, Class type) { return (__ptr__) (ptr != null ? JUtils.sizeof_starstar_empty(type, size).realloc(ptr) : JUtils .sizeof_starstar_empty(type, size).malloc()); } public static __ptr__ ALLOC_allocated2(int size, __ptr__ ptr, Class type) { return (__ptr__) (ptr != null ? JUtils.sizeof(type, size).realloc(ptr) : JUtils.sizeof(type, size).malloc()); } public static __ptr__ ALLOC_INT(int size, __ptr__ ptr) { return (__ptr__) (ptr != null ? JUtils.size_t_array_of_integer(size).realloc(ptr) : JUtils .size_t_array_of_integer(size).malloc()); } // #define RALLOC(size,ptr,type) ((type*)realloc(ptr,(size)*sizeof(type))) public static __ptr__ RALLOC(int nb, __ptr__ ptr, Class type) { throw new UnsupportedOperationException(); } public static __ptr__ ALLOC(int nb, __ptr__ ptr, Class type) { if (ptr == null) { return (__ptr__) JUtils.sizeof(type, nb).malloc(); } return (__ptr__) JUtils.sizeof(type, nb).realloc(ptr); } // #define elist_append(item,L) do {L.list = ALLOC(L.size + 2,L.list,edge_t*); L.list[L.size++] = item; // L.list[L.size] = NULL;} while(0) public static void elist_append(__ptr__ item, ST_elist L) { // L.setPtr("list", ALLOC_empty(L.getInt("size") + 2, L.getPtr("list"), Agedge_s.class)); L.realloc(L.size + 2); L.setInList(L.size, item); L.size = 1 + L.size; L.setInList(L.size, null); } // #define alloc_elist(n,L) do {L.size = 0; L.list = N_NEW(n + 1,edge_t*); } while (0) public static void alloc_elist(int n, ST_elist L, Class cl) { L.size = 0; L.mallocEmpty(cl, n + 1); // L.setPtr("list", (__ptr__) JUtils.sizeof_starstar_empty(cl, n + 1).malloc()); } // #define free_list(L) do {if (L.list) free(L.list);} while (0) public static void free_list(ST_elist L) { if (L.listNotNull()) L.free(); // Memory.free(L.getPtr("list")); } public static double ABS(double a) { return Math.abs(a); } public static int ABS(int a) { return Math.abs(a); } public static double MAX(double a, double b) { return Math.max(a, b); } public static int MAX(int a, int b) { return Math.max(a, b); } public static double MIN(double a, double b) { return Math.min(a, b); } public static int MIN(int a, int b) { return Math.min(a, b); } // #define BETWEEN(a,b,c) (((a) <= (b)) && ((b) <= (c))) public static boolean BETWEEN(double a, double b, double c) { return (((a) <= (b)) && ((b) <= (c))); } public static boolean BETWEEN(int a, int b, int c) { return (((a) <= (b)) && ((b) <= (c))); } // #define ROUND(f) ((f>=0)?(int)(f + .5):(int)(f - .5)) public static int ROUND(double f) { return ((f >= 0) ? (int) (f + .5) : (int) (f - .5)); } // #define MAKEFWDEDGE(new, old) { \ // edge_t *newp; \ // Agedgeinfo_t *info; \ // newp = new; \ // info = (Agedgeinfo_t*)newp->base.data; \ // *info = *(Agedgeinfo_t*)old->base.data; \ // *newp = *old; \ // newp->base.data = (Agrec_t*)info; \ // AGTAIL(newp) = AGHEAD(old); \ // AGHEAD(newp) = AGTAIL(old); \ // ED_tail_port(newp) = ED_head_port(old); \ // ED_head_port(newp) = ED_tail_port(old); \ // ED_edge_type(newp) = VIRTUAL; \ // ED_to_orig(newp) = old; \ public static void MAKEFWDEDGE(__ptr__ new_, __ptr__ old) { Agedge_s newp; Agedgeinfo_t info; newp = (Agedge_s) new_; info = (Agedgeinfo_t) newp.getStruct("base").getPtr("data"); info.copyDataFrom(old.getStruct("base").getPtr("data").castTo(Agedgeinfo_t.class).getStruct()); newp.copyDataFrom(old); newp.getStruct("base").setPtr("data", info); agtail(newp, AGHEAD(old)); aghead(newp, AGTAIL(old)); ED_tail_port(newp, ED_head_port(old)); ED_head_port(newp, ED_tail_port(old)); ED_edge_type(newp, VIRTUAL); ED_to_orig(newp, old); } // #define VIRTUAL 1 /* virtual nodes in long edge chains */ public static final int VIRTUAL = 1; // #define ZALLOC(size,ptr,type,osize) (ptr? // (type*)zrealloc(ptr,size,sizeof(type),osize):(type*)zmalloc((size)*sizeof(type))) public static __ptr__ ZALLOC(int size, __ptr__ ptr, Class type, int osize) { if (ptr != null) { return Memory.realloc(ptr, JUtils.sizeof(type, size)); } return (__ptr__) JUtils.sizeof(type, size).malloc(); } public static final int MAXSHORT = 0x7fff; public static final int INT_MAX = Integer.MAX_VALUE; // #define INT_MIN (-INT_MAX - 1) public static final int INT_MIN = Integer.MIN_VALUE; static { if (INT_MIN != -INT_MAX - 1) { throw new IllegalStateException(); } } public static final double HUGE_VAL = Double.POSITIVE_INFINITY; public static double fabs(double x) { return Math.abs(x); } public static double hypot(double x, double y) { double t; x = Math.abs(x); y = Math.abs(y); t = Math.min(x, y); x = Math.max(x, y); t = t / x; return x * Math.sqrt(1 + t * t); } // #define SQR(a) ((a) * (a)) public static double SQR(double a) { return a * a; } // #define MILLIPOINT .001 // #define MICROPOINT .000001 public static double MILLIPOINT = .001; public static double MICROPOINT = .000001; // #define APPROXEQPT(p,q,tol) (DIST2((p),(q)) < SQR(tol)) public static boolean APPROXEQPT(__ptr__ p, __ptr__ q, double tol) { return (DIST2((p), (q)) < SQR(tol)); } // #define LEN2(a,b) (SQR(a) + SQR(b)) public static double LEN2(double a, double b) { return (SQR(a) + SQR(b)); } // #define LEN(a,b) (sqrt(LEN2((a),(b)))) public static double LEN(double a, double b) { return (Math.sqrt(LEN2((a), (b)))); } // // #define DIST2(p,q) (LEN2(((p).x - (q).x),((p).y - (q).y))) public static double DIST2(__ptr__ p, __ptr__ q) { return (LEN2(((p).getDouble("x") - (q).getDouble("x")), ((p).getDouble("y") - (q).getDouble("y")))); } public static double DIST2(__struct__ p, __ptr__ q) { return (LEN2(((p).getDouble("x") - (q).getDouble("x")), ((p).getDouble("y") - (q).getDouble("y")))); } // #define DIST(p,q) (sqrt(DIST2((p),(q)))) // #define INSIDE(p,b) (BETWEEN((b).LL.x,(p).x,(b).UR.x) && BETWEEN((b).LL.y,(p).y,(b).UR.y)) public static boolean INSIDE(__struct__ b, __struct__ p) { return (BETWEEN(b.getStruct("LL").getDouble("x"), p.getDouble("x"), b.getStruct("UR").getDouble("x")) && BETWEEN( b.getStruct("LL").getDouble("y"), p.getDouble("y"), b.getStruct("UR").getDouble("y"))); } public static final double M_PI = Math.PI; // #define SQRT2 1.41421356237309504880 public static final double SQRT2 = Math.sqrt(2); // #define RADIANS(deg) ((deg)/180.0 * M_PI) public static double RADIANS(double deg) { return ((deg) / 180.0 * M_PI); } // #define DISTSQ(a, b) ( \ // (((a).x - (b).x) * ((a).x - (b).x)) + (((a).y - (b).y) * ((a).y - (b).y)) \ // ) public static double DISTSQ(__struct__ a, __struct__ b) { return (((a).getDouble("x") - (b).getDouble("x")) * ((a).getDouble("x") - (b).getDouble("x"))) + (((a).getDouble("y") - (b).getDouble("y")) * ((a).getDouble("y") - (b).getDouble("y"))); } public static void hackInitDimensionFromLabel(__struct__ size, String label) { if (label.matches("_dim_\\d+_\\d+_")) { Pattern p = Pattern.compile("_dim_(\\d+)_(\\d+)_"); Matcher m = p.matcher(label); if (m.matches() == false) { throw new IllegalStateException(); } int ww = Integer.parseInt(m.group(1)); int hh = Integer.parseInt(m.group(2)); size.setDouble("x", ww); size.setDouble("y", hh); JUtils.LOG2("Hacking dimension to width=" + ww + " height=" + hh); } } public static CString createHackInitDimensionFromLabel(int width, int height) { return new CString("_dim_" + width + "_" + height + "_"); } } plantuml-1.2017.15/src/smetana/core/Memory.java000066400000000000000000000057631312650303100211530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import h.Agdesc_s; import h.Agiddisc_s; import h.Agmemdisc_s; import h.Agtag_s; import h.ST_Agtag_s; import h._dtdisc_s; import h._dtmethod_s; import h.nlist_t; import smetana.core.amiga.StarArrayOfPtr; import smetana.core.amiga.StarStar; public class Memory { public static __ptr__ malloc(Class theClass) { JUtils.LOG("MEMORY::malloc " + theClass); return JUtils.create(theClass, null); } public static __ptr__ malloc(size_t size) { return (__ptr__) size.malloc(); } public static __ptr__ realloc(__ptr__ old, size_t size) { if (old instanceof StarArrayOfPtr) { ((StarArrayOfPtr) old).realloc(((size_t_array_of_something) size).getNb()); return old; } if (old instanceof StarStar) { ((StarStar) old).realloc(((size_t_array_of_array_of_something_empty) size).getNb()); return old; } throw new UnsupportedOperationException(); } public static void free(Object arg) { } public static int identityHashCode(CString data) { if (data == null) { return 0; } // int result = 2 * System.identityHashCode(data); int result = data.getUid(); Z.z().all.put(result, data); // System.err.println("Memory::identityHashCode data=" + data); // System.err.println("Memory::identityHashCode result=" + result + " " + Z.z().all.size()); return result; } public static Object fromIdentityHashCode(int hash) { // System.err.println("Memory::fromIdentityHashCode hash=" + hash); if (hash % 2 != 0) { throw new IllegalArgumentException(); } Object result = Z.z().all.get(hash); // System.err.println("Memory::fromIdentityHashCode result=" + result); if (result == null) { throw new UnsupportedOperationException(); } return result; } } plantuml-1.2017.15/src/smetana/core/MutableDouble.java000066400000000000000000000032671312650303100224240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; public class MutableDouble { private double value; public MutableDouble(double init) { this.value = init; } public double getValue() { return value; } public void setValue(double value) { this.value = value; } public __ptr__ amp() { return new MutableDoublePtr(this); } @Override public String toString() { return "" + value; } } plantuml-1.2017.15/src/smetana/core/MutableDoublePtr.java000066400000000000000000000033101312650303100230770ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import smetana.core.amiga.Area; public class MutableDoublePtr extends UnsupportedC implements Area { private final MutableDouble value; public MutableDoublePtr(MutableDouble value) { this.value = value; } public void memcopyFrom(Area source) { throw new UnsupportedOperationException(); } @Override public double getDouble() { return value.getValue(); } } plantuml-1.2017.15/src/smetana/core/OFFSET.java000066400000000000000000000051411312650303100206570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import java.util.Arrays; import java.util.HashMap; import java.util.Map; public class OFFSET { private static int CPT = 10000; private static Map byID = new HashMap(); private static Map primaryKey = new HashMap(); private final Class cl; private final String field; private final int id; private OFFSET(Class cl, String field) { this.cl = cl; this.field = field; this.id = CPT++; JUtils.LOG("REAL CREATING OF " + this); } @Override public String toString() { return cl.getName() + "::" + field; } public static OFFSET create(Class cl, String field) { final Object key = Arrays.asList(cl, field); JUtils.LOG("getting OFFSET " + key); OFFSET result = primaryKey.get(key); if (result != null) { JUtils.LOG("FOUND!"); return result; } result = new OFFSET(cl, field); byID.put(result.id, result); primaryKey.put(key, result); return result; } public int toInt() { return id; } public static OFFSET fromInt(int value) { final OFFSET result = byID.get(value); if (result == null) { throw new IllegalArgumentException("value=" + value); } return result; } public final Class getTheClass() { return cl; } public final String getField() { return field; } } plantuml-1.2017.15/src/smetana/core/Ppolyline_t.java000066400000000000000000000026251312650303100221730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import h.Ppoly_t; public interface Ppolyline_t extends Ppoly_t { } plantuml-1.2017.15/src/smetana/core/STARSTAR.java000066400000000000000000000032511312650303100211340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; public class STARSTAR { private final ACCESS getAndSet; private STARSTAR(ACCESS getAndSet) { this.getAndSet = getAndSet; } public static STARSTAR amp(ACCESS getAndSet) { return new STARSTAR(getAndSet); } public O getMe() { return getAndSet.get(); } public void setMe(O obj) { getAndSet.set(obj); } } plantuml-1.2017.15/src/smetana/core/StructureDefinition.java000066400000000000000000000114471312650303100237100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; public class StructureDefinition { private static final Map all = new HashMap(); public static StructureDefinition from(Class cl) { if (cl == null) { throw new IllegalArgumentException(); } StructureDefinition result = all.get(cl); if (result == null) { result = new StructureDefinition(cl); all.put(cl, result); } return result; } private final Class cl; private Map buckets; // = new LinkedHashMap(); private StructureDefinition(Class cl) { // JUtils.LOG("BUIDLING StructureDefinition " + cl); this.cl = cl; } public String toString() { return (cl == null ? "NO_CLASS" : cl.getName()) + " " + buckets; } private Map buckets() { if (buckets == null) { final List definition = CType.getDefinition(cl); JUtils.LOG("StructureDefinition::run for " + cl); JUtils.LOG("def=" + definition); JUtils.LOG("first=" + definition.get(0)); buckets = new LinkedHashMap(); if (definition.get(0).equals("typedef enum")) { final String last = definition.get(definition.size() - 1); if (last.matches("\\w+") == false) { throw new UnsupportedOperationException(); } buckets.put(last, Bucket.buildEnum(last, definition)); return buckets; } if (definition.get(0).equals("typedef struct gvplugin_active_textlayout_s") == false && definition.get(0).equals("typedef struct color_s") == false && definition.get(0).equals("typedef struct") == false && definition.get(0).equals("typedef struct pointf_s") == false && definition.get(0).equals("typedef struct gvplugin_active_layout_s") == false && definition.get(0).equals("typedef struct GVCOMMON_s") == false && definition.get(0).equals("struct " + cl.getSimpleName()) == false && definition.get(0).equals("typedef struct " + cl.getSimpleName()) == false && definition.get(0).equals("typedef struct " + cl.getSimpleName().replaceFirst("_t", "_s")) == false && definition.get(0).equals("typedef union " + cl.getSimpleName()) == false) { throw new IllegalStateException(" VERSUS <" + definition.get(0) + ">"); } if (definition.get(1).equals("{") == false) { throw new IllegalStateException(); } int last = definition.size() - 1; if (definition.get(definition.size() - 2).equals("}") && definition.get(definition.size() - 1).equals(cl.getSimpleName())) { last--; } if (definition.get(last).equals("}") == false) { throw new IllegalStateException(); } for (Iterator it = definition.subList(2, last).iterator(); it.hasNext();) { buckets.putAll(Bucket.buildSome(it)); } } return buckets; } public Set getFields() { return buckets().keySet(); } public Collection getBuckets() { return buckets().values(); } public Map getBucketsMap() { return buckets(); } public Bucket getBucket(String field) { final Bucket result = buckets().get(field); if (result == null) { throw new IllegalArgumentException(field); } return result; } public Class getTheClass() { return cl; } public boolean containsFieldName(String fieldName) { return buckets().keySet().contains(fieldName); } } plantuml-1.2017.15/src/smetana/core/UnsupportedArrayOfPtr.java000066400000000000000000000156371312650303100242060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import smetana.core.amiga.Area; import smetana.core.amiga.StarStruct; public class UnsupportedArrayOfPtr implements __array_of_ptr__ { public __ptr__ unsupported() { throw new UnsupportedOperationException(getClass().toString()); } public int comparePointer(__ptr__ other) { throw new UnsupportedOperationException(getClass().toString()); } public int minus(__ptr__ other) { throw new UnsupportedOperationException(getClass().toString()); } public int getInt() { throw new UnsupportedOperationException(getClass().toString()); } public void setInt(int value) { throw new UnsupportedOperationException(getClass().toString()); } public double getDouble() { throw new UnsupportedOperationException(getClass().toString()); } public void setDouble(double value) { throw new UnsupportedOperationException(getClass().toString()); } public __ptr__ getPtr() { throw new UnsupportedOperationException(getClass().toString()); } public void setPtr(__ptr__ value) { throw new UnsupportedOperationException(getClass().toString()); } public boolean isSameThan(StarStruct other) { throw new UnsupportedOperationException(getClass().toString()); } public Class getRealClass() { throw new UnsupportedOperationException(getClass().toString()); } public __struct__ getStruct() { throw new UnsupportedOperationException(getClass().toString()); } public Area getArea(String name) { throw new UnsupportedOperationException(name + " " + getClass().toString()); } public String getUID36() { throw new UnsupportedOperationException(getClass().toString()); } public String getDebug(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public void setInt(String fieldName, int data) { throw new UnsupportedOperationException(getClass().toString()); } public void setBoolean(String fieldName, boolean data) { throw new UnsupportedOperationException(getClass().toString()); } public void setDouble(String fieldName, double data) { throw new UnsupportedOperationException(getClass().toString()); } public int getInt(String fieldName) { throw new UnsupportedOperationException(fieldName + " " + getClass().toString()); } public double getDouble(String fieldName) { throw new UnsupportedOperationException(fieldName + " " + getClass().toString()); } public boolean getBoolean(String fieldName) { throw new UnsupportedOperationException(fieldName + " " + getClass().toString()); } public CString getCString(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_struct__ getArrayOfStruct(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_ptr__ getArrayOfPtr(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_cstring__ getArrayOfCString(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_integer__ getArrayOfInteger(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __struct__ getStruct(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __ptr__ getPtr(String fieldName) { throw new UnsupportedOperationException(fieldName + " " + getClass().toString()); } public void setStruct(String fieldName, __struct__ newData) { throw new UnsupportedOperationException(getClass().toString()); } public void setCString(String fieldName, CString newData) { throw new UnsupportedOperationException(getClass().toString()); } public __ptr__ setPtr(String fieldName, __ptr__ newData) { throw new UnsupportedOperationException(getClass().toString()); } public void memcopyFrom(Area source) { throw new UnsupportedOperationException(getClass().toString()); } public void copyDataFrom(__struct__ other) { throw new UnsupportedOperationException(getClass().toString()); } public void setStruct(__struct__ value) { throw new UnsupportedOperationException(getClass().toString()); } public void copyDataFrom(__ptr__ arg) { throw new UnsupportedOperationException(getClass().toString()); } public Object call(String fieldName, Object... args) { throw new UnsupportedOperationException(fieldName + " " + getClass().toString()); } public __ptr__ castTo(Class dest) { throw new UnsupportedOperationException(getClass().toString()); } public Object addVirtualBytes(int virtualBytes) { throw new UnsupportedOperationException(getClass().toString()); } public void swap(int i, int j) { throw new UnsupportedOperationException(getClass().toString()); } public void realloc(int nb) { throw new UnsupportedOperationException(getClass().toString()); } public __ptr__ asPtr() { throw new UnsupportedOperationException(getClass().toString()); } public int comparePointerInternal(__array_of_ptr__ other) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_ptr__ move(int delta) { throw new UnsupportedOperationException(getClass().toString()); } public Area getInternal(int idx) { throw new UnsupportedOperationException(getClass().toString()); } public void setInternalByIndex(int idx, Area value) { throw new UnsupportedOperationException(getClass().toString()); } public CString getCString() { throw new UnsupportedOperationException(getClass().toString()); } public void setCString(CString value) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_ptr__ plus(int delta) { throw new UnsupportedOperationException(getClass().toString()); } } plantuml-1.2017.15/src/smetana/core/UnsupportedC.java000066400000000000000000000125371312650303100223330ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; public class UnsupportedC implements __ptr__ { public int getInt() { throw new UnsupportedOperationException(getClass().toString()); } public void setInt(int value) { throw new UnsupportedOperationException(getClass().toString()); } public void setCString(String fieldName, CString value) { throw new UnsupportedOperationException(getClass().toString()); } public int minus(__ptr__ other) { throw new UnsupportedOperationException(getClass().toString()); } public double getDouble() { throw new UnsupportedOperationException(getClass().toString()); } public void setDouble(double value) { throw new UnsupportedOperationException(getClass().toString()); } public __ptr__ getPtr() { throw new UnsupportedOperationException(getClass().toString()); } public void setPtr(__ptr__ value) { throw new UnsupportedOperationException(getClass().toString()); } public __ptr__ getPtr(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __struct__ getStruct() { throw new UnsupportedOperationException(getClass().toString()); } public void setStruct(__struct__ value) { throw new UnsupportedOperationException(getClass().toString()); } // public __array__ getArray(String fieldName) { // throw new UnsupportedOperationException(getClass().toString()); // } public __array_of_integer__ getArrayOfInteger(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_struct__ getArrayOfStruct(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_ptr__ getArrayOfPtr(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_cstring__ getArrayOfCString(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __struct__ getStruct(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public boolean getBoolean(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public double getDouble(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public CString getCString(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public int getInt(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __ptr__ setPtr(String fieldName, __ptr__ data) { throw new UnsupportedOperationException(getClass().toString()); } public void setStruct(String fieldName, __struct__ data) { throw new UnsupportedOperationException(getClass().toString()); } public void setInt(String fieldName, int data) { throw new UnsupportedOperationException(getClass().toString()); } public void setBoolean(String fieldName, boolean data) { throw new UnsupportedOperationException(getClass().toString()); } public void setDouble(String fieldName, double data) { throw new UnsupportedOperationException(getClass().toString()); } public __ptr__ castTo(Class dest) { throw new UnsupportedOperationException(getClass().toString()); } public Object call(String name, Object... args) { throw new UnsupportedOperationException(getClass().toString()); } public Object addVirtualBytes(int bytes) { throw new UnsupportedOperationException(getClass().toString()); } final public __ptr__ unsupported() { throw new UnsupportedOperationException(getClass().toString()); } public __ptr__ plus(int pointerMove) { throw new UnsupportedOperationException(getClass().toString()); } public int comparePointer(__ptr__ other) { throw new UnsupportedOperationException(getClass().toString()); } public String getDebug(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public void copyDataFrom(__ptr__ other) { throw new UnsupportedOperationException(getClass().toString()); } public void copyDataFrom(__struct__ other) { throw new UnsupportedOperationException(getClass().toString()); } } plantuml-1.2017.15/src/smetana/core/UnsupportedStarStruct.java000066400000000000000000000137601312650303100242660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import smetana.core.amiga.Area; import smetana.core.amiga.StarStruct; public class UnsupportedStarStruct implements StarStruct { public __ptr__ unsupported() { throw new UnsupportedOperationException(getClass().toString()); } public int comparePointer(__ptr__ other) { throw new UnsupportedOperationException(getClass().toString()); } public int minus(__ptr__ other) { throw new UnsupportedOperationException(getClass().toString()); } public int getInt() { throw new UnsupportedOperationException(getClass().toString()); } public void setInt(int value) { throw new UnsupportedOperationException(getClass().toString()); } public double getDouble() { throw new UnsupportedOperationException(getClass().toString()); } public void setDouble(double value) { throw new UnsupportedOperationException(getClass().toString()); } public __ptr__ getPtr() { throw new UnsupportedOperationException(getClass().toString()); } public void setPtr(__ptr__ value) { throw new UnsupportedOperationException(getClass().toString()); } public boolean isSameThan(StarStruct other) { throw new UnsupportedOperationException(getClass().toString()); } public Class getRealClass() { throw new UnsupportedOperationException(getClass().toString()); } public __struct__ getStruct() { throw new UnsupportedOperationException(getClass().toString()); } public Area getArea(String name) { throw new UnsupportedOperationException(name + " " + getClass().toString()); } public String getUID36() { throw new UnsupportedOperationException(getClass().toString()); } public String getDebug(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public void setInt(String fieldName, int data) { throw new UnsupportedOperationException(fieldName + " " + getClass().toString()); } public void setBoolean(String fieldName, boolean data) { throw new UnsupportedOperationException(fieldName + " " + getClass().toString()); } public void setDouble(String fieldName, double data) { throw new UnsupportedOperationException(fieldName + " " + getClass().toString()); } public int getInt(String fieldName) { throw new UnsupportedOperationException(fieldName + " " + getClass().toString()); } public double getDouble(String fieldName) { throw new UnsupportedOperationException(fieldName + " " + getClass().toString()); } public boolean getBoolean(String fieldName) { throw new UnsupportedOperationException(fieldName + " " + getClass().toString()); } public __ptr__ plus(int pointerMove) { throw new UnsupportedOperationException(getClass().toString()); } public CString getCString(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_struct__ getArrayOfStruct(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_ptr__ getArrayOfPtr(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_cstring__ getArrayOfCString(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_integer__ getArrayOfInteger(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __struct__ getStruct(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __ptr__ getPtr(String fieldName) { throw new UnsupportedOperationException(fieldName + " " + getClass().toString()); } public void setStruct(String fieldName, __struct__ newData) { throw new UnsupportedOperationException(getClass().toString()); } public void setCString(String fieldName, CString newData) { throw new UnsupportedOperationException(getClass().toString()); } public __ptr__ setPtr(String fieldName, __ptr__ newData) { throw new UnsupportedOperationException(getClass().toString()); } public void memcopyFrom(Area source) { throw new UnsupportedOperationException(getClass().toString()); } public void copyDataFrom(__struct__ other) { throw new UnsupportedOperationException(getClass().toString()); } public void setStruct(__struct__ value) { throw new UnsupportedOperationException(getClass().toString()); } public void copyDataFrom(__ptr__ arg) { throw new UnsupportedOperationException(getClass().toString()); } public Object call(String fieldName, Object... args) { throw new UnsupportedOperationException(fieldName + " " + getClass().toString()); } public __ptr__ castTo(Class dest) { throw new UnsupportedOperationException(getClass().toString()); } public Object addVirtualBytes(int virtualBytes) { throw new UnsupportedOperationException(getClass().toString()); } } plantuml-1.2017.15/src/smetana/core/UnsupportedStruct.java000066400000000000000000000102061312650303100234240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import smetana.core.amiga.Area; import smetana.core.amiga.StarStruct; public class UnsupportedStruct implements __struct__ { public __ptr__ getPtr(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __struct__ getStruct(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public boolean getBoolean(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public double getDouble(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public CString getCString(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public int getInt(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __ptr__ setPtr(String fieldName, __ptr__ value) { throw new UnsupportedOperationException(getClass().toString()); } public void setCString(String fieldName, CString value) { throw new UnsupportedOperationException(getClass().toString()); } public void setStruct(String fieldName, __struct__ value) { throw new UnsupportedOperationException(getClass().toString()); } public void setInt(String fieldName, int value) { throw new UnsupportedOperationException(getClass().toString()); } public void setBoolean(String fieldName, boolean value) { throw new UnsupportedOperationException(getClass().toString()); } public void setDouble(String fieldName, double value) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_integer__ getArrayOfInteger(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_struct__ getArrayOfStruct(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_ptr__ getArrayOfPtr(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public __array_of_cstring__ getArrayOfCString(String fieldName) { throw new UnsupportedOperationException(getClass().toString()); } public void memcopyFrom(Area source) { throw new UnsupportedOperationException(getClass().toString()); } public __struct__ copy() { throw new UnsupportedOperationException(getClass().toString()); } public void ___(__struct__ other) { throw new UnsupportedOperationException(getClass().toString()); } public void ____(__ptr__ other) { throw new UnsupportedOperationException(getClass().toString()); } public StarStruct amp() { throw new UnsupportedOperationException(getClass().toString()); } public StarStruct getInternalData() { throw new UnsupportedOperationException(getClass().toString()); } public Object call(String name, Object... args) { throw new UnsupportedOperationException(getClass().toString()); } } plantuml-1.2017.15/src/smetana/core/UnsupportedStructAndPtr.java000066400000000000000000000037411312650303100245430ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import smetana.core.amiga.StarStruct; public class UnsupportedStructAndPtr extends UnsupportedStarStruct implements __struct__, __ptr__ { public __struct__ copy() { throw new UnsupportedOperationException(getClass().toString()); } public void ___(__struct__ other) { throw new UnsupportedOperationException(getClass().toString()); } public void ____(__ptr__ other) { throw new UnsupportedOperationException(getClass().toString()); } public StarStruct amp() { throw new UnsupportedOperationException(getClass().toString()); } public StarStruct getInternalData() { throw new UnsupportedOperationException(getClass().toString()); } } plantuml-1.2017.15/src/smetana/core/Z.java000066400000000000000000000407201312650303100201040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import static smetana.core.JUtils.function; import gen.lib.cdt.dttree__c; import gen.lib.cgraph.attr__c; import gen.lib.cgraph.edge__c; import gen.lib.cgraph.graph__c; import gen.lib.cgraph.id__c; import gen.lib.cgraph.mem__c; import gen.lib.cgraph.node__c; import gen.lib.cgraph.utils__c; import gen.lib.common.arrows__c; import gen.lib.common.shapes__c; import gen.lib.dotgen.dotsplines__c; import h.Agedge_s; import h.Agnode_s; import h.Agraph_s; import h.Agsubnode_s; import h.Agsym_s; import h.Agtag_s; import h.ST_Agdesc_s; import h.ST_Agiddisc_s; import h.ST_Agmemdisc_s; import h.ST_arrowname_t; import h.ST_arrowtype_t; import h.ST_dtdisc_s; import h.ST_dtmethod_s; import h.ST_elist; import h.ST_nlist_t; import h.ST_pointf; import h.ST_port; import h._dt_s; import h._dtmethod_s; import h.arrowname_t; import h.arrowtype_t; import h.boxf; import h.deque_t; import h.pointf; import h.pointnlink_t; import h.polygon_t; import h.refstr_t; import h.shape_desc; import h.shape_functions; import h.splineInfo; import h.textfont_t; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; public class Z { private static final ThreadLocal> instances2 = new ThreadLocal>(); public final Map all = new HashMap(); public final ST_dtmethod_s _Dttree = new ST_dtmethod_s(); public final _dtmethod_s Dttree = _Dttree.amp(); public final ST_dtdisc_s AgDataDictDisc = new ST_dtdisc_s(); public final ST_Agdesc_s ProtoDesc = new ST_Agdesc_s(); public Agraph_s ProtoGraph; public final __struct__ Tag = JUtils.from(Agtag_s.class); public final ST_dtdisc_s Ag_mainedge_seq_disc = new ST_dtdisc_s(); public final ST_dtdisc_s Ag_subedge_seq_disc = new ST_dtdisc_s(); public final ST_dtdisc_s Ag_subedge_id_disc = new ST_dtdisc_s(); public final ST_dtdisc_s Ag_subgraph_id_disc = new ST_dtdisc_s(); public final ST_Agiddisc_s AgIdDisc = new ST_Agiddisc_s(); public final ST_Agmemdisc_s AgMemDisc = new ST_Agmemdisc_s(); public final ST_dtdisc_s Ag_subnode_id_disc = new ST_dtdisc_s(); public final ST_dtdisc_s Ag_subnode_seq_disc = new ST_dtdisc_s(); public int HTML_BIT; public int CNT_BITS; public final ST_dtdisc_s Refstrdisc = new ST_dtdisc_s(); public _dt_s Refdict_default; public Agraph_s Ag_dictop_G; public final __array_of_struct__ Arrowsynonyms = __array_of_struct__.malloc(arrowname_t.class, 1); public final __array_of_struct__ Arrownames = __array_of_struct__.malloc(arrowname_t.class, 3); public final __array_of_struct__ Arrowmods = __array_of_struct__.malloc(arrowname_t.class, 1); public final __array_of_struct__ Arrowtypes = __array_of_struct__.malloc(arrowtype_t.class, 9); public __ptr__ Show_boxes; public int CL_type; public boolean Concentrate; public int MaxIter; public int State; public int EdgeLabelsDone; public double Initial_dist; public Agsym_s G_activepencolor, G_activefillcolor, G_selectedpencolor, G_selectedfillcolor, G_visitedpencolor, G_visitedfillcolor, G_deletedpencolor, G_deletedfillcolor, G_ordering, G_peripheries, G_penwidth, G_gradientangle, G_margin; public Agsym_s N_height, N_width, N_shape, N_color, N_fillcolor, N_activepencolor, N_activefillcolor, N_selectedpencolor, N_selectedfillcolor, N_visitedpencolor, N_visitedfillcolor, N_deletedpencolor, N_deletedfillcolor, N_fontsize, N_fontname, N_fontcolor, N_margin, N_label, N_xlabel, N_nojustify, N_style, N_showboxes, N_sides, N_peripheries, N_ordering, N_orientation, N_skew, N_distortion, N_fixed, N_imagescale, N_layer, N_group, N_comment, N_vertices, N_z, N_penwidth, N_gradientangle; public Agsym_s E_weight, E_minlen, E_color, E_fillcolor, E_activepencolor, E_activefillcolor, E_selectedpencolor, E_selectedfillcolor, E_visitedpencolor, E_visitedfillcolor, E_deletedpencolor, E_deletedfillcolor, E_fontsize, E_fontname, E_fontcolor, E_label, E_xlabel, E_dir, E_style, E_decorate, E_showboxes, E_arrowsz, E_constr, E_layer, E_comment, E_label_float, E_samehead, E_sametail, E_arrowhead, E_arrowtail, E_headlabel, E_taillabel, E_labelfontsize, E_labelfontname, E_labelfontcolor, E_labeldistance, E_labelangle, E_tailclip, E_headclip, E_penwidth; public int N_nodes, N_edges; public int Minrank, Maxrank; public int S_i; public int Search_size; public final ST_nlist_t Tree_node = new ST_nlist_t(); public final ST_elist Tree_edge = new ST_elist(); public Agedge_s Enter; public int Low, Lim, Slack; public int Rankdir; public boolean Flip; public final ST_pointf Offset = new ST_pointf(); public int nedges, nboxes; public int routeinit; public __ptr__ ps; public int maxpn; public __ptr__ polypoints; public int polypointn; public __ptr__ edges; public int edgen; public __array_of_struct__ boxes = __array_of_struct__.malloc(boxf.class, 1000); public int MinQuit; public double Convergence; public Agraph_s Root; public int GlobalMinRank, GlobalMaxRank; public boolean ReMincross; public __ptr__ TE_list; public __ptr__ TI_list; public Agnode_s Last_node_decomp; public Agnode_s Last_node_rank; public char Cmark; public int trin, tril; public __ptr__ tris; public int pnln, pnll; public pointnlink_t pnls; public __ptr__ pnlps; public final ST_port Center = new ST_port(); public final __struct__ p_ellipse = JUtils.from(polygon_t.class); public final __struct__ p_box = JUtils.from(polygon_t.class); public final __struct__ poly_fns = JUtils.from(shape_functions.class); public __ptr__ tnas; public int tnan; public final shape_desc Shapes[] = { __Shapes__("box", poly_fns.amp(), p_box.amp()), __Shapes__("ellipse", poly_fns.amp(), p_ellipse.amp()), __Shapes__(null, null, null) }; public final ST_dtdisc_s Ag_mainedge_id_disc = new ST_dtdisc_s(); public final __struct__ dq = JUtils.from(deque_t.class); public final ST_Agdesc_s Agdirected = new ST_Agdesc_s(); public final __struct__ sinfo = JUtils.from(splineInfo.class); public Agnode_s lastn; /* last node argument */ public polygon_t poly; public int last, outp, sides; public final __struct__ O = JUtils.from(pointf.class); /* point (0,0) */ public pointf vertex; public double xsize, ysize, scalex, scaley, box_URx, box_URy; public final __struct__ tf = JUtils.from(textfont_t.class); public __ptr__ pointfs; public __ptr__ pointfs2; public int numpts; public int numpts2; public __ptr__ Count; public int C; public int ctr = 1; public __struct__ template = JUtils.from(Agsubnode_s.class); public __struct__ dummy = JUtils.from(Agnode_s.class); public Agraph_s G_ns; public Agraph_s G_decomp; public int opl; public int opn_route; public int opn_shortest; public __ptr__ ops_route; public __ptr__ ops_shortest; public static Z z() { return instances2.get().peekFirst(); } public static void open() { LinkedList list = instances2.get(); if (list == null) { list = new LinkedList(); instances2.set(list); } list.addFirst(new Z()); } public static void close() { instances2.get().removeFirst(); } private shape_desc __Shapes__(String s, shape_functions shape_functions, polygon_t polygon) { shape_desc result = (shape_desc) Memory.malloc(shape_desc.class); result.setPtr("name", s == null ? null : new CString(s)); result.setPtr("fns", shape_functions); result.setPtr("polygon", polygon); return result; } private final static __struct__ createArrowtypes(int type, double lenfact, CFunction function) { final ST_arrowtype_t result = new ST_arrowtype_t(); result.type = type; result.lenfact = lenfact; result.gen = function; return result; } private final static __struct__ create_arrowname_t(String name, int type) { final ST_arrowname_t result = new ST_arrowname_t(); result.name = name == null ? null : new CString(name); result.type = type; return result; } private Z() { _Dttree.searchf = function(dttree__c.class, "dttree"); _Dttree.type = 0000004; AgDataDictDisc.key = OFFSET.create(Agsym_s.class, "name").toInt(); AgDataDictDisc.size = -1; AgDataDictDisc.link = OFFSET.create(Agsym_s.class, "link").toInt(); AgDataDictDisc.makef = null; AgDataDictDisc.freef = function(attr__c.class, "freesym"); AgDataDictDisc.comparf = null; AgDataDictDisc.hashf = null; ProtoDesc.directed = 1; ProtoDesc.strict = 0; ProtoDesc.no_loop = 1; ProtoDesc.maingraph = 0; ProtoDesc.flatlock = 1; ProtoDesc.no_write = 1; Ag_mainedge_seq_disc.key = 0; Ag_mainedge_seq_disc.size = 0; Ag_mainedge_seq_disc.link = OFFSET.create(Agedge_s.class, "seq_link").toInt(); // seq_link is the third // field in Agedge_t Ag_mainedge_seq_disc.makef = null; Ag_mainedge_seq_disc.freef = null; Ag_mainedge_seq_disc.comparf = function(edge__c.class, "agedgeseqcmpf"); Ag_mainedge_seq_disc.hashf = null; Ag_mainedge_seq_disc.memoryf = function(utils__c.class, "agdictobjmem"); Ag_mainedge_seq_disc.eventf = null; Ag_subedge_seq_disc.key = 0; Ag_subedge_seq_disc.size = 0; Ag_subedge_seq_disc.link = -1; Ag_subedge_seq_disc.makef = null; Ag_subedge_seq_disc.freef = null; Ag_subedge_seq_disc.comparf = function(edge__c.class, "agedgeseqcmpf"); Ag_subedge_seq_disc.hashf = null; Ag_subedge_seq_disc.memoryf = function(utils__c.class, "agdictobjmem"); Ag_subedge_seq_disc.eventf = null; Ag_subedge_id_disc.key = 0; Ag_subedge_id_disc.size = 0; Ag_subedge_id_disc.link = -1; Ag_subedge_id_disc.makef = null; Ag_subedge_id_disc.freef = null; Ag_subedge_id_disc.comparf = function(edge__c.class, "agedgeidcmpf"); Ag_subedge_id_disc.hashf = null; Ag_subedge_id_disc.memoryf = function(utils__c.class, "agdictobjmem"); Ag_subedge_id_disc.eventf = null; Ag_subgraph_id_disc.key = 0; Ag_subgraph_id_disc.size = 0; Ag_subgraph_id_disc.link = OFFSET.create(Agraph_s.class, "link").toInt(); // link is the third field in // Agraph_t Ag_subgraph_id_disc.makef = null; Ag_subgraph_id_disc.freef = null; Ag_subgraph_id_disc.comparf = function(graph__c.class, "agraphidcmpf"); Ag_subgraph_id_disc.hashf = null; Ag_subgraph_id_disc.memoryf = function(utils__c.class, "agdictobjmem"); Ag_subgraph_id_disc.eventf = null; AgIdDisc.open = function(id__c.class, "idopen"); AgIdDisc.map = function(id__c.class, "idmap"); AgIdDisc.alloc = function(id__c.class, "idalloc"); AgIdDisc.free = function(id__c.class, "idfree"); AgIdDisc.print = function(id__c.class, "idprint"); AgIdDisc.close = function(id__c.class, "idclose"); AgIdDisc.idregister = function(id__c.class, "idregister"); AgMemDisc.open = function(mem__c.class, "memopen"); AgMemDisc.alloc = function(mem__c.class, "memalloc"); AgMemDisc.resize = function(mem__c.class, "memresize"); AgMemDisc.free = function(mem__c.class, "memfree"); AgMemDisc.close = null; Ag_subnode_id_disc.key = 0; Ag_subnode_id_disc.size = 0; Ag_subnode_id_disc.link = OFFSET.create(Agsubnode_s.class, "id_link").toInt(); // id_link is the second // field in Agsubnode_t Ag_subnode_id_disc.makef = null; Ag_subnode_id_disc.freef = null; Ag_subnode_id_disc.comparf = function(node__c.class, "agsubnodeidcmpf"); Ag_subnode_id_disc.hashf = null; Ag_subnode_id_disc.memoryf = function(utils__c.class, "agdictobjmem"); Ag_subnode_id_disc.eventf = null; Ag_subnode_seq_disc.key = 0; Ag_subnode_seq_disc.size = 0; Ag_subnode_seq_disc.link = OFFSET.create(Agsubnode_s.class, "seq_link").toInt(); // link is the first // field in // Agsubnode_t Ag_subnode_seq_disc.makef = null; Ag_subnode_seq_disc.freef = function(node__c.class, "free_subnode"); Ag_subnode_seq_disc.comparf = function(node__c.class, "agsubnodeseqcmpf"); Ag_subnode_seq_disc.hashf = null; Ag_subnode_seq_disc.memoryf = function(utils__c.class, "agdictobjmem"); Ag_subnode_seq_disc.eventf = null; Refstrdisc.key = OFFSET.create(refstr_t.class, "s").toInt(); // *s is the third field in refstr_t Refstrdisc.size = -1; Refstrdisc.link = 0; Refstrdisc.makef = null; Refstrdisc.freef = function(utils__c.class, "agdictobjfree"); Refstrdisc.comparf = null; Refstrdisc.hashf = null; Refstrdisc.memoryf = function(utils__c.class, "agdictobjmem"); Refstrdisc.eventf = null; Arrowsynonyms.plus(0).setStruct(create_arrowname_t(null, 0)); Arrownames.plus(0).setStruct(create_arrowname_t("normal", 1)); Arrownames.plus(1).setStruct(create_arrowname_t("none", 8)); Arrownames.plus(2).setStruct(create_arrowname_t(null, 0)); Arrowmods.plus(0).setStruct(create_arrowname_t(null, 0)); Arrowtypes.plus(0).setStruct(createArrowtypes(1, 1.0, function(arrows__c.class, "arrow_type_normal"))); Arrowtypes.plus(1).setStruct(createArrowtypes(2, 1.0, function(arrows__c.class, "arrow_type_crow"))); Arrowtypes.plus(2).setStruct(createArrowtypes(3, 0.5, function(arrows__c.class, "arrow_type_tee"))); Arrowtypes.plus(3).setStruct(createArrowtypes(4, 1.0, function(arrows__c.class, "arrow_type_box"))); Arrowtypes.plus(4).setStruct(createArrowtypes(5, 1.2, function(arrows__c.class, "arrow_type_diamond"))); Arrowtypes.plus(5).setStruct(createArrowtypes(6, 0.8, function(arrows__c.class, "arrow_type_dot"))); Arrowtypes.plus(6).setStruct(createArrowtypes(7, 1.0, function(arrows__c.class, "arrow_type_curve"))); Arrowtypes.plus(7).setStruct(createArrowtypes(8, 0.5, function(arrows__c.class, "arrow_type_gap"))); Arrowtypes.plus(8).setStruct(createArrowtypes(0, 0.0, null)); Center.p.x = 0; Center.p.y = 0; Center.theta = -1; Center.bp = null; Center.defined = 0; Center.constrained = 0; Center.clip = 1; Center.dyna = 0; Center.order = 0; Center.side = 0; p_ellipse.setInt("regular", 0); p_ellipse.setInt("peripheries", 1); p_ellipse.setInt("sides", 1); p_ellipse.setDouble("orientation", 0.); p_ellipse.setDouble("distortion", 0.); p_ellipse.setDouble("skew", 0.); p_box.setInt("regular", 0); p_box.setInt("peripheries", 1); p_box.setInt("sides", 4); p_box.setDouble("orientation", 0.); p_box.setDouble("distortion", 0.); p_box.setDouble("skew", 0.); poly_fns.setPtr("initfn", function(shapes__c.class, "poly_init")); poly_fns.setPtr("freefn", function(shapes__c.class, "poly_free")); poly_fns.setPtr("portfn", function(shapes__c.class, "poly_port")); poly_fns.setPtr("insidefn", function(shapes__c.class, "poly_inside")); poly_fns.setPtr("pboxfn", function(shapes__c.class, "poly_path")); poly_fns.setPtr("codefn", function(shapes__c.class, "poly_gencode")); Ag_mainedge_id_disc.key = 0; Ag_mainedge_id_disc.size = 0; Ag_mainedge_id_disc.link = OFFSET.create(Agedge_s.class, "id_link").toInt(); // id_link is the second // field in Agedge_t Ag_mainedge_id_disc.makef = null; Ag_mainedge_id_disc.freef = null; Ag_mainedge_id_disc.comparf = function(edge__c.class, "agedgeidcmpf"); Ag_mainedge_id_disc.hashf = null; Ag_mainedge_id_disc.memoryf = function(utils__c.class, "agdictobjmem"); Ag_mainedge_id_disc.eventf = null; Agdirected.directed = 1; Agdirected.strict = 0; Agdirected.no_loop = 0; Agdirected.maingraph = 1; sinfo.setPtr("swapEnds", function(dotsplines__c.class, "swap_ends_p")); sinfo.setPtr("splineMerge", function(dotsplines__c.class, "spline_merge")); } } plantuml-1.2017.15/src/smetana/core/__array_of_cstring__.java000066400000000000000000000075011312650303100240220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import java.util.ArrayList; import java.util.List; import smetana.core.amiga.Area; import smetana.core.amiga.BuilderArea; import smetana.core.amiga.StarStructImpl; public class __array_of_cstring__ implements Area { private final List data; private final int currentPos; private final int UID = StarStructImpl.CPT++; public String getUID36() { return Integer.toString(UID, 36); } public void swap(int i, int j) { Area e1 = data.get(i); Area e2 = data.get(j); data.set(i, e2); data.set(j, e1); } @Override public String toString() { if (data.get(0) != null) { return "__array__ " + getUID36() + " " + currentPos + "/" + data.size() + " " + data.get(0).toString(); } return "__array__ " + getUID36() + " " + currentPos + "/" + data.size(); } public void realloc(int nb) { while (data.size() < nb + currentPos) { data.add(null); } } // public __ptr__ asPtr() { // return new StarArray(this); // } public int comparePointerInternal(__array_of_cstring__ other) { if (this.data != other.data) { throw new IllegalArgumentException(); } return this.currentPos - other.currentPos; } public static __array_of_cstring__ mallocStarChar(int nb) { return new __array_of_cstring__(nb, new BuilderArea() { public Area createArea() { return null; } }); } private __array_of_cstring__(List data, int currentPos) { this.data = data; this.currentPos = currentPos; check(); } private __array_of_cstring__(int size, BuilderArea builder) { this.data = new ArrayList(); this.currentPos = 0; for (int i = 0; i < size; i++) { final Area tmp = builder.createArea(); data.add(tmp); } check(); } private void check() { if (getUID36().equals("194")) { JUtils.LOG("It's me"); } } public __array_of_cstring__ move(int delta) { return new __array_of_cstring__(data, currentPos + delta); } public __array_of_cstring__ plus(int delta) { return move(delta); } public Area getInternal(int idx) { return data.get(idx + currentPos); } public void setInternalByIndex(int idx, Area value) { if (value == this) { throw new IllegalArgumentException(); } if (value instanceof __array_of_cstring__) { throw new IllegalArgumentException(); } data.set(idx + currentPos, value); } public void memcopyFrom(Area source) { throw new UnsupportedOperationException(); } // public CString getCString() { return (CString) getInternal(0); } public void setCString(CString value) { setInternalByIndex(0, value); } } plantuml-1.2017.15/src/smetana/core/__array_of_double__.java000066400000000000000000000067671312650303100236400ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import java.util.ArrayList; import java.util.List; import smetana.core.amiga.Area; import smetana.core.amiga.AreaInt; import smetana.core.amiga.BuilderArea; import smetana.core.amiga.StarStruct; import smetana.core.amiga.StarStructImpl; public class __array_of_double__ implements Area { private final List data; private final int currentPos; private final int UID = StarStructImpl.CPT++; public String getUID36() { return Integer.toString(UID, 36); } public void swap(int i, int j) { Area e1 = data.get(i); Area e2 = data.get(j); data.set(i, e2); data.set(j, e1); } @Override public String toString() { if (data.get(0) != null) { return "__array__ " + getUID36() + " " + currentPos + "/" + data.size() + " " + data.get(0).toString(); } return "__array__ " + getUID36() + " " + currentPos + "/" + data.size(); } public void realloc(int nb) { while (data.size() < nb + currentPos) { data.add(null); } } // public __ptr__ asPtr() { // return new StarArray(this); // } public int comparePointerInternal(__array_of_double__ other) { if (this.data != other.data) { throw new IllegalArgumentException(); } return this.currentPos - other.currentPos; } public static __array_of_double__ mallocDouble(int nb) { return new __array_of_double__(nb, new BuilderArea() { public Area createArea() { return new AreaInt(); } }); } private __array_of_double__(List data, int currentPos) { this.data = data; this.currentPos = currentPos; check(); } private __array_of_double__(int size, BuilderArea builder) { this.data = new ArrayList(); this.currentPos = 0; for (int i = 0; i < size; i++) { final Area tmp = builder.createArea(); data.add(tmp); } check(); } private void check() { if (getUID36().equals("194")) { JUtils.LOG("It's me"); } } public __array_of_double__ move(int delta) { return new __array_of_double__(data, currentPos + delta); } public __array_of_double__ plus(int delta) { return move(delta); } public Area getInternal(int idx) { return data.get(idx + currentPos); } public void memcopyFrom(Area source) { throw new UnsupportedOperationException(); } // } plantuml-1.2017.15/src/smetana/core/__array_of_integer__.java000066400000000000000000000072561312650303100240150ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import java.util.ArrayList; import java.util.List; import smetana.core.amiga.Area; import smetana.core.amiga.AreaInt; import smetana.core.amiga.BuilderArea; import smetana.core.amiga.StarStruct; import smetana.core.amiga.StarStructImpl; public class __array_of_integer__ implements Area { private final List data; private final int currentPos; private final int UID = StarStructImpl.CPT++; public String getUID36() { return Integer.toString(UID, 36); } public void swap(int i, int j) { Area e1 = data.get(i); Area e2 = data.get(j); data.set(i, e2); data.set(j, e1); } @Override public String toString() { if (data.get(0) != null) { return "__array__ " + getUID36() + " " + currentPos + "/" + data.size() + " " + data.get(0).toString(); } return "__array__ " + getUID36() + " " + currentPos + "/" + data.size(); } public void realloc(int nb) { while (data.size() < nb + currentPos) { data.add(new AreaInt()); } } // public __ptr__ asPtr() { // return new StarArray(this); // } public int comparePointerInternal(__array_of_integer__ other) { if (this.data != other.data) { throw new IllegalArgumentException(); } return this.currentPos - other.currentPos; } public static __array_of_integer__ mallocInteger(int nb) { return new __array_of_integer__(nb, new BuilderArea() { public Area createArea() { return new AreaInt(); } }); } private __array_of_integer__(List data, int currentPos) { this.data = data; this.currentPos = currentPos; check(); } private __array_of_integer__(int size, BuilderArea builder) { this.data = new ArrayList(); this.currentPos = 0; for (int i = 0; i < size; i++) { final Area tmp = builder.createArea(); data.add(tmp); } check(); } private void check() { if (getUID36().equals("194")) { JUtils.LOG("It's me"); } } public __array_of_integer__ move(int delta) { return new __array_of_integer__(data, currentPos + delta); } public __array_of_integer__ plus(int delta) { return move(delta); } public Area getInternal(int idx) { return data.get(idx + currentPos); } public void memcopyFrom(Area source) { throw new UnsupportedOperationException(); } // public int getInt() { return ((AreaInt) getInternal(0)).getInternal(); } public void setInt(int value) { ((AreaInt) getInternal(0)).setInternal(value); } } plantuml-1.2017.15/src/smetana/core/__array_of_ptr__.java000066400000000000000000000043251312650303100231570ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import smetana.core.amiga.Area; public interface __array_of_ptr__ extends Area { public String getUID36(); public void memcopyFrom(Area source); public void swap(int i, int j); public void realloc(int nb); public __ptr__ asPtr(); public int comparePointerInternal(__array_of_ptr__ other); public __array_of_ptr__ move(int delta); public __array_of_ptr__ plus(int delta); public Area getInternal(int idx); public void setInternalByIndex(int idx, Area value); public int getInt(); public CString getCString(); public __ptr__ getPtr(); public __struct__ getStruct(); public void setInt(int value); public void setCString(CString value); public void setPtr(__ptr__ value); public void setStruct(__struct__ value); public double getDouble(String fieldName); public void setDouble(String fieldName, double value); public __struct__ getStruct(String fieldName); } plantuml-1.2017.15/src/smetana/core/__array_of_ptr_impl__.java000066400000000000000000000137361312650303100242060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import h.ST_boxf; import java.util.ArrayList; import java.util.List; import smetana.core.amiga.Area; import smetana.core.amiga.AreaInt; import smetana.core.amiga.BuilderArea; import smetana.core.amiga.StarArrayOfPtr; import smetana.core.amiga.StarStruct; import smetana.core.amiga.StarStructImpl; public class __array_of_ptr_impl__ implements __array_of_ptr__ { private final List data; private final int currentPos; private final BuilderArea builder; private final int UID = StarStructImpl.CPT++; public String getUID36() { return Integer.toString(UID, 36); } public void memcopyFrom(Area source) { __array_of_ptr_impl__ other = (__array_of_ptr_impl__) source; System.err.println("sizeMe=" + this.data.size()); System.err.println("sizeOt=" + other.data.size()); throw new UnsupportedOperationException(); } public void swap(int i, int j) { Area e1 = data.get(i); Area e2 = data.get(j); data.set(i, e2); data.set(j, e1); } @Override public String toString() { if (data.get(0) != null) { return "__array__ " + getUID36() + " " + currentPos + "/" + data.size() + " " + data.get(0).toString(); } return "__array__ " + getUID36() + " " + currentPos + "/" + data.size(); } public void realloc(int nb) { while (data.size() < nb + currentPos) { data.add(builder.createArea()); } } public __ptr__ asPtr() { return new StarArrayOfPtr(this); } public int comparePointerInternal(__array_of_ptr__ other2) { final __array_of_ptr_impl__ other = (__array_of_ptr_impl__) other2; if (this.data != other.data) { throw new IllegalArgumentException(); } return this.currentPos - other.currentPos; } public static __array_of_ptr__ malloc_allocated(final Class cl, int nb) { return new __array_of_ptr_impl__(nb, new BuilderArea() { public Area createArea() { return JUtils.create(cl, null); } }); } public static __array_of_ptr__ malloc_empty(int nb) { return new __array_of_ptr_impl__(nb, new BuilderArea() { public Area createArea() { return null; } }); } private __array_of_ptr_impl__(List data, int currentPos, BuilderArea builderArea) { this.data = data; this.currentPos = currentPos; this.builder = builderArea; check(); } private __array_of_ptr_impl__(int size, BuilderArea builder) { this.data = new ArrayList(); this.builder = builder; this.currentPos = 0; for (int i = 0; i < size; i++) { data.add(builder.createArea()); } check(); } private void check() { if (getUID36().equals("194")) { JUtils.LOG("It's me"); } } public __array_of_ptr_impl__ move(int delta) { return new __array_of_ptr_impl__(data, currentPos + delta, builder); } public __array_of_ptr_impl__ plus(int delta) { return move(delta); } public Area getInternal(int idx) { return data.get(idx + currentPos); } public void setInternalByIndex(int idx, Area value) { if (value == this) { throw new IllegalArgumentException(); } if (value instanceof __array_of_ptr_impl__) { throw new IllegalArgumentException(); } data.set(idx + currentPos, value); } // public int getInt() { return ((AreaInt) getInternal(0)).getInternal(); } public CString getCString() { return (CString) getInternal(0); } public __ptr__ getPtr() { if (getInternal(0) instanceof __struct__) { return ((__struct__) getInternal(0)).amp(); } return (__ptr__) getInternal(0); } public __struct__ getStruct() { if (getInternal(0) instanceof __ptr__) { return getPtr().getStruct(); } return (__struct__) getInternal(0); } public void setInt(int value) { ((AreaInt) getInternal(0)).setInternal(value); } public void setCString(CString value) { setInternalByIndex(0, value); } public void setPtr(__ptr__ value) { setInternalByIndex(0, (Area) value); } public void setStruct(__struct__ value) { final Area area = getInternal(0); if (area instanceof StarStruct) { ((StarStruct) area).copyDataFrom(value); } else if (area instanceof StarArrayOfPtr) { ((StarArrayOfPtr) area).copyDataFrom(value); } else { ((__struct__) area).___(value); } } public double getDouble(String fieldName) { final Area tmp1 = getInternal(0); return ((StarStruct) tmp1).getDouble(fieldName); } public void setDouble(String fieldName, double value) { final Area tmp1 = getInternal(0); if (tmp1 instanceof __struct__) { ((__struct__) tmp1).setDouble(fieldName, value); return; } ((StarStruct) tmp1).setDouble(fieldName, value); } public __struct__ getStruct(String fieldName) { final StarStruct TMP = (StarStruct) getInternal(0); if (TMP instanceof ST_boxf) { return ((ST_boxf) TMP).getStructInternal(fieldName); } return TMP.getStruct(fieldName); } } plantuml-1.2017.15/src/smetana/core/__array_of_struct__.java000066400000000000000000000106761312650303100237040ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import java.util.ArrayList; import java.util.List; import smetana.core.amiga.Area; import smetana.core.amiga.BuilderArea; import smetana.core.amiga.StarArrayOfStruct; import smetana.core.amiga.StarStruct; import smetana.core.amiga.StarStructImpl; public class __array_of_struct__ implements Area { private final List data; private final int currentPos; private final int UID = StarStructImpl.CPT++; public String getUID36() { return Integer.toString(UID, 36); } public void swap(int i, int j) { Area e1 = data.get(i); Area e2 = data.get(j); data.set(i, e2); data.set(j, e1); } @Override public String toString() { if (data.get(0) != null) { return "__array_of_struct__ " + getUID36() + " " + currentPos + "/" + data.size() + " " + data.get(0).toString(); } return "__array_of_struct__ " + getUID36() + " " + currentPos + "/" + data.size(); } public void realloc(int nb) { while (data.size() < nb + currentPos) { data.add(null); } } public __ptr__ asPtr() { return new StarArrayOfStruct(this); } public int comparePointerInternal(__array_of_struct__ other) { if (this.data != other.data) { throw new IllegalArgumentException(); } return this.currentPos - other.currentPos; } public static __array_of_struct__ malloc(final Class cl, int nb) { return new __array_of_struct__(nb, new BuilderArea() { public Area createArea() { return JUtils.from(cl); } }); } private __array_of_struct__(List data, int currentPos) { this.data = data; this.currentPos = currentPos; check(); } public __array_of_struct__(int size, BuilderArea builder) { this.data = new ArrayList(); this.currentPos = 0; for (int i = 0; i < size; i++) { final Area tmp = builder.createArea(); data.add(tmp); } check(); } private void check() { if (getUID36().equals("194")) { JUtils.LOG("It's me"); } } public __array_of_struct__ move(int delta) { return new __array_of_struct__(data, currentPos + delta); } public __array_of_struct__ plus(int delta) { return move(delta); } public Area getInternal(int idx) { return data.get(idx + currentPos); } public void setInternalByIndex(int idx, Area value) { if (value == this) { throw new IllegalArgumentException(); } if (value instanceof __array_of_struct__) { throw new IllegalArgumentException(); } data.set(idx + currentPos, value); } public void memcopyFrom(Area source) { throw new UnsupportedOperationException(); } // public __ptr__ getPtr() { return ((__struct__) getInternal(0)).amp(); } public __struct__ getStruct() { return (__struct__) getInternal(0); } public void setStruct(__struct__ value) { final Area area = getInternal(0); ((__struct__) area).___(value); } public double getDouble(String fieldName) { final Area tmp1 = getInternal(0); return ((__struct__) tmp1).getDouble(fieldName); } public void setDouble(String fieldName, double value) { final Area tmp1 = getInternal(0); ((__struct__) tmp1).setDouble(fieldName, value); } public __struct__ getStruct(String fieldName) { return ((StarStruct) getInternal(0)).getStruct(fieldName); } } plantuml-1.2017.15/src/smetana/core/__c__fields.java000066400000000000000000000044051312650303100221000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; public interface __c__fields { public __ptr__ getPtr(String fieldName); public __struct__ getStruct(String fieldName); public boolean getBoolean(String fieldName); public double getDouble(String fieldName); public CString getCString(String fieldName); public int getInt(String fieldName); public __ptr__ setPtr(String fieldName, __ptr__ value); public void setCString(String fieldName, CString value); public void setStruct(String fieldName, __struct__ value); public void setInt(String fieldName, int value); public void setBoolean(String fieldName, boolean value); public void setDouble(String fieldName, double value); // public __array__ getArray(String fieldName); public __array_of_integer__ getArrayOfInteger(String fieldName); public __array_of_struct__ getArrayOfStruct(String fieldName); public __array_of_ptr__ getArrayOfPtr(String fieldName); public __array_of_cstring__ getArrayOfCString(String fieldName); } plantuml-1.2017.15/src/smetana/core/__ptr__.java000066400000000000000000000040431312650303100212720ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; public interface __ptr__ extends __c__fields { public __ptr__ castTo(Class dest); public Object addVirtualBytes(int bytes); public __ptr__ unsupported(); public __ptr__ plus(int pointerMove); public int comparePointer(__ptr__ other); public int minus(__ptr__ other); public String getDebug(String fieldName); public void copyDataFrom(__ptr__ other); public void copyDataFrom(__struct__ other); public int getInt(); public void setInt(int value); public double getDouble(); public void setDouble(double value); public __ptr__ getPtr(); public void setPtr(__ptr__ value); public __struct__ getStruct(); public void setStruct(__struct__ value); public Object call(String name, Object... args); } plantuml-1.2017.15/src/smetana/core/__struct__.java000066400000000000000000000033041312650303100220100ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import smetana.core.amiga.Area; import smetana.core.amiga.StarStruct; public interface __struct__ extends __c__fields, Area { public __struct__ copy(); public void ___(__struct__ other); public void ____(__ptr__ other); public StarStruct amp(); public StarStruct getInternalData(); public Object call(String name, Object... args); } plantuml-1.2017.15/src/smetana/core/__struct_impl__.java000066400000000000000000000106701312650303100230350ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import smetana.core.amiga.Area; import smetana.core.amiga.StarArrayOfPtr; import smetana.core.amiga.StarArrayOfStruct; import smetana.core.amiga.StarStruct; public class __struct_impl__ implements __struct__ { final private StarStruct data; public __struct_impl__(Class cl) { this.data = (StarStruct) Memory.malloc(cl); } @Override public String toString() { return super.toString() + " " + data.getUID36(); } public __struct_impl__(StarStruct data) { this.data = data; } public __struct_impl__ copy() { final __struct_impl__ result = new __struct_impl__(data.getRealClass()); if (result.data.getRealClass() != this.data.getRealClass()) { throw new IllegalStateException(); } result.___(this); return result; } public void ___(__struct__ other) { data.copyDataFrom(other); } public void ____(__ptr__ other) { if (other instanceof StarArrayOfPtr) { ___(((StarArrayOfPtr) other).getStruct()); return; } if (other instanceof StarStruct) { memcopyFrom((StarStruct) other); return; } if (other instanceof StarArrayOfStruct) { StarArrayOfStruct array = (StarArrayOfStruct) other; memcopyFrom(array.getStruct()); return; } throw new UnsupportedOperationException(); } public void memcopyFrom(Area source) { data.memcopyFrom(source); } public StarStruct amp() { return data; } public StarStruct getInternalData() { return data; } public __ptr__ getPtr(String fieldName) { return data.getPtr(fieldName); } public __struct__ getStruct(String fieldName) { return data.getStruct(fieldName); } public boolean getBoolean(String fieldName) { return data.getBoolean(fieldName); } public double getDouble(String fieldName) { return data.getDouble(fieldName); } public void setCString(String fieldName, CString value) { data.setCString(fieldName, value); } public CString getCString(String fieldName) { return data.getCString(fieldName); } public int getInt(String fieldName) { return data.getInt(fieldName); } public __ptr__ setPtr(String fieldName, __ptr__ value) { return data.setPtr(fieldName, value); } public void setStruct(String fieldName, __struct__ value) { data.setStruct(fieldName, value); } public void setDouble(String fieldName, double value) { data.setDouble(fieldName, value); } public void setInt(String fieldName, int value) { data.setInt(fieldName, value); } public void setBoolean(String fieldName, boolean value) { data.setBoolean(fieldName, value); } public Object call(String name, Object... args) { return data.call(name, args); } // public __array__ getArray(String fieldName) { // return data.getArray(fieldName); // } public __array_of_integer__ getArrayOfInteger(String fieldName) { throw new UnsupportedOperationException(); } public __array_of_struct__ getArrayOfStruct(String fieldName) { return data.getArrayOfStruct(fieldName); } public __array_of_ptr__ getArrayOfPtr(String fieldName) { return data.getArrayOfPtr(fieldName); } public __array_of_cstring__ getArrayOfCString(String fieldName) { throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/smetana/core/amiga/000077500000000000000000000000001312650303100201035ustar00rootroot00000000000000plantuml-1.2017.15/src/smetana/core/amiga/Area.java000066400000000000000000000026221312650303100216200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core.amiga; public interface Area { void memcopyFrom(Area source); } plantuml-1.2017.15/src/smetana/core/amiga/AreaDouble.java000066400000000000000000000033311312650303100227510ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core.amiga; public class AreaDouble implements Area { private double data = 0; public void memcopyFrom(Area source) { AreaDouble other = (AreaDouble) source; this.data = other.data; } public void setInternal(double newData) { this.data = newData; } public double getInternal() { return data; } @Override public String toString() { return super.toString() + " " + data; } } plantuml-1.2017.15/src/smetana/core/amiga/AreaInt.java000066400000000000000000000041441312650303100222740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core.amiga; public class AreaInt implements Area { private int data = 0; private final int UID = StarStructImpl.CPT++; private String getUID36() { return Integer.toString(UID, 36); } @Override public String toString() { return "AreaArray " + getUID36() + " " + data; } public void memcopyFrom(Area source) { AreaInt other = (AreaInt) source; this.data = other.data; } public void setInternal(int data) { this.data = data; if (trace()) { System.err.println("set I AM " + this); } } private boolean trace() { return false; //return getUID36().equals("2z7"); } public int getInternal() { if (trace()) { // System.err.println("get I AM " + this); } return data; } // public void incInternal(int increment) { // data += increment; // // } } plantuml-1.2017.15/src/smetana/core/amiga/BucketToAreaFactory.java000066400000000000000000000123121312650303100246060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core.amiga; import smetana.core.Bucket; import smetana.core.CType; import smetana.core.JUtils; import smetana.core.__array_of_double__; import smetana.core.__array_of_integer__; import smetana.core.__array_of_ptr_impl__; import smetana.core.__array_of_struct__; public class BucketToAreaFactory { public static Area createArea(Bucket bucket, StarStruct parent) { if (bucket.ctype.getArrayLength() != 0) { return createAreaArray(bucket, bucket.ctype.getArrayLength()); } if (bucket.ctype.functionPointer()) { // return PointerToNull.nullPointerTo(); // return new AreaFunctionPointer(); return null; } if (bucket.ctype.isIntStar()) { return null; } if (bucket.ctype.isDoubleStar()) { return null; } if (bucket.ctype.isVoidStar()) { return null; // return PointerToNull.nullPointerTo(); // return new AreaVoidStar(); } if (bucket.ctype.containsStar()) { final String type = bucket.ctype.getType(); if (type.matches("\\w+\\*")) { final Class theClass = CType.getClassFrom(type.substring(0, type.length() - 1)); JUtils.LOG("theClass=" + theClass); // return PointerToNull.nullPointerTo(); return null; } throw new UnsupportedOperationException(bucket.toString()); } if (bucket.ctype.isEnum()) { return new AreaInt(); } if (bucket.ctype.isPrimitive()) { if (bucket.ctype.isInteger()) { return new AreaInt(); } if (bucket.ctype.isChar()) { return new AreaInt(); } if (bucket.ctype.isShort()) { return new AreaInt(); } if (bucket.ctype.isLong()) { return new AreaInt(); } if (bucket.ctype.isBoolean()) { return new AreaInt(); } if (bucket.ctype.isDoubleOrFloat()) { return new AreaDouble(); } throw new UnsupportedOperationException(); } if (bucket.inlineStruct()) { final Class theClass = bucket.ctype.getTypeClass(); return JUtils.create(theClass, parent); } if (bucket.ctype.isArrayOfCString()) { return null; } if (bucket.ctype.isCString()) { // return new AreaCString(); // return PointerToNull.nullPointerTo(); return null; } final Class theClass = bucket.ctype.getTypeClass(); if (theClass != null) { return null; // return PointerToNull.nullPointerTo(); } JUtils.LOG("BucketToAreaFactory:: theClass = " + theClass); JUtils.LOG("BucketToAreaFactory:: bucket=" + bucket); JUtils.LOG("BucketToAreaFactory:: bucket.ctype=" + bucket.ctype); throw new UnsupportedOperationException(); } private static Area createAreaArray(Bucket bucket, int arrayLength) { JUtils.LOG("BucketToAreaFactory:createAreaArray: bucket=" + bucket); JUtils.LOG("BucketToAreaFactory:createAreaArray: arrayLength=" + arrayLength); JUtils.LOG("BucketToAreaFactory:createAreaArray: type=" + bucket.ctype); if (bucket.ctype.getType().matches("char \\w+\\[\\d+\\]")) { // Array of char return __array_of_integer__.mallocInteger(arrayLength); } if (bucket.ctype.getType().matches("int \\w+\\[\\d+\\]")) { // Array of int return __array_of_integer__.mallocInteger(arrayLength); } if (bucket.ctype.getType().matches("double \\w+\\[\\d+\\]")) { // Array of double return __array_of_double__.mallocDouble(arrayLength); } if (bucket.ctype.getType().matches("\\w+ \\*\\w+\\[\\d+\\]")) { // Array of pointer final String element = bucket.ctype.getType().split(" ")[0]; JUtils.LOG("element=" + element); final Class theClass = CType.getClassFrom(element); JUtils.LOG("theClass=" + theClass); return __array_of_ptr_impl__.malloc_empty(arrayLength); } if (bucket.ctype.getType().matches("\\w+ \\w+\\[\\d+\\]")) { // Array of Struct final String element = bucket.ctype.getType().split(" ")[0]; JUtils.LOG("element=" + element); final Class theClass = CType.getClassFrom(element); JUtils.LOG("theClass=" + theClass); return __array_of_struct__.malloc(theClass, arrayLength); } throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/smetana/core/amiga/BuilderArea.java000066400000000000000000000026241312650303100231310ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core.amiga; public interface BuilderArea { public Area createArea(); } plantuml-1.2017.15/src/smetana/core/amiga/InternalData.java000066400000000000000000000026341312650303100233210ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core.amiga; public interface InternalData { public Area getArea(String name); } plantuml-1.2017.15/src/smetana/core/amiga/StarArrayOfCString.java000066400000000000000000000040501312650303100244340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core.amiga; import smetana.core.AllH; import smetana.core.UnsupportedC; import smetana.core.__array_of_cstring__; import smetana.core.__ptr__; public class StarArrayOfCString extends UnsupportedC implements Area, AllH { private final __array_of_cstring__ array; public StarArrayOfCString(__array_of_cstring__ array) { this.array = array; } public void realloc(int nb) { array.realloc(nb); } public String getUID36() { return array.getUID36(); } public void memcopyFrom(Area source) { throw new UnsupportedOperationException(); } public final __array_of_cstring__ getInternalArray() { return array; } public __ptr__ plus(int pointerMove) { return new StarArrayOfCString(array.move(pointerMove)); } } plantuml-1.2017.15/src/smetana/core/amiga/StarArrayOfInteger.java000066400000000000000000000044231312650303100244640ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core.amiga; import smetana.core.AllH; import smetana.core.UnsupportedC; import smetana.core.__array_of_integer__; import smetana.core.__array_of_ptr__; import smetana.core.__ptr__; public class StarArrayOfInteger extends UnsupportedC implements Area, AllH { private final __array_of_integer__ array; public StarArrayOfInteger(__array_of_integer__ array) { this.array = array; } public void realloc(int nb) { array.realloc(nb); } public String getUID36() { return array.getUID36(); } public void memcopyFrom(Area source) { throw new UnsupportedOperationException(); } public final __array_of_integer__ getInternalArray() { return array; } public __ptr__ plus(int pointerMove) { return new StarArrayOfInteger(array.move(pointerMove)); } public void setInt(int value) { array.setInt(value); } public int getInt() { return array.getInt(); } public void swap(int i, int j) { ((__array_of_integer__) array).swap(i, j); } } plantuml-1.2017.15/src/smetana/core/amiga/StarArrayOfPtr.java000066400000000000000000000122041312650303100236300ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core.amiga; import h.ST_boxf; import smetana.core.AllH; import smetana.core.UnsupportedC; import smetana.core.__array_of_ptr__; import smetana.core.__array_of_struct__; import smetana.core.__ptr__; import smetana.core.__struct__; public class StarArrayOfPtr extends UnsupportedC implements Area, AllH { private final __array_of_ptr__ array; public StarArrayOfPtr(__array_of_ptr__ array) { this.array = array; } public void realloc(int nb) { array.realloc(nb); } public String getUID36() { return array.getUID36(); } public void memcopyFrom(Area source) { ((StarStruct) array.getInternal(0)).memcopyFrom(source); } public final __array_of_ptr__ getInternalArray() { return array; } public __ptr__ plus(int pointerMove) { return new StarArrayOfPtr(array.move(pointerMove)); } public void setInt(int value) { array.setInt(value); } public int getInt() { return array.getInt(); } public __struct__ getStruct() { return array.getStruct(); } public void copyDataFrom(__struct__ other) { ((StarStruct) array.getInternal(0)).copyDataFrom(other); } public void setPtr(__ptr__ value) { array.setPtr(value); } public int minus(__ptr__ other) { StarArrayOfPtr other2 = (StarArrayOfPtr) other; int res = array.comparePointerInternal(other2.array); return res; } public void setStruct(__struct__ value) { array.setStruct(value); } public __ptr__ getPtr() { return array.getPtr(); } public __ptr__ getPtrForEquality() { return array.getStruct().amp(); } public int comparePointer(__ptr__ other) { return array.comparePointerInternal(((StarArrayOfPtr) other).array); } public boolean isSameThan(StarArrayOfPtr other) { return array.comparePointerInternal(other.array) == 0; } // Fieldname public void setStruct(String fieldName, __struct__ data) { ((__ptr__) array.getInternal(0)).setStruct(fieldName, data); } public __ptr__ setPtr(String fieldName, __ptr__ data) { final Area tmp1 = array.getInternal(0); if (tmp1 instanceof __struct__) { return ((__struct__) tmp1).setPtr(fieldName, data); } return ((__ptr__) tmp1).setPtr(fieldName, data); } public void setInt(String fieldName, int data) { ((__ptr__) array.getInternal(0)).setInt(fieldName, data); } public __ptr__ getPtr(String fieldName) { final Area tmp1 = array.getInternal(0); if (tmp1 instanceof __struct__) { return ((__struct__) tmp1).getPtr(fieldName); } return ((__ptr__) tmp1).getPtr(fieldName); } public __struct__ getStruct(String fieldName) { __ptr__ TMP = (__ptr__) array.getInternal(0); if (TMP instanceof ST_boxf) { return ((ST_boxf) TMP).getStructInternal(fieldName); } return TMP.getStruct(fieldName); } public void setDouble(String fieldName, double data) { ((__ptr__) array.getInternal(0)).setDouble(fieldName, data); } public int getInt(String fieldName) { final Area tmp1 = array.getInternal(0); if (tmp1 instanceof __struct__) { return ((__struct__) tmp1).getInt(fieldName); } return ((__ptr__) tmp1).getInt(fieldName); } public __array_of_struct__ getArrayOfStruct(String fieldName) { return ((__ptr__) array.getInternal(0)).getArrayOfStruct(fieldName); } public __array_of_ptr__ getArrayOfPtr(String fieldName) { return ((__ptr__) array.getInternal(0)).getArrayOfPtr(fieldName); } public boolean getBoolean(String fieldName) { return ((__ptr__) array.getInternal(0)).getBoolean(fieldName); } public void setBoolean(String fieldName, boolean value) { ((__ptr__) array.getInternal(0)).setBoolean(fieldName, value); } public __ptr__ castTo(Class dest) { return ((__ptr__) array.getInternal(0)).castTo(dest); } public double getDouble(String fieldName) { final Area tmp1 = array.getInternal(0); if (tmp1 instanceof __struct__) { return ((__struct__) tmp1).getDouble(fieldName); } return ((__ptr__) tmp1).getDouble(fieldName); } } plantuml-1.2017.15/src/smetana/core/amiga/StarArrayOfStruct.java000066400000000000000000000067001312650303100243530ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core.amiga; import smetana.core.AllH; import smetana.core.UnsupportedC; import smetana.core.__array_of_struct__; import smetana.core.__ptr__; import smetana.core.__struct__; public class StarArrayOfStruct extends UnsupportedC implements Area, AllH { private final __array_of_struct__ array; public StarArrayOfStruct(__array_of_struct__ array) { this.array = array; } public void realloc(int nb) { array.realloc(nb); } public String getUID36() { return array.getUID36(); } public void memcopyFrom(Area source) { throw new UnsupportedOperationException(); } public final __array_of_struct__ getInternalArray() { return array; } public __ptr__ plus(int pointerMove) { return new StarArrayOfStruct(array.move(pointerMove)); } public __struct__ getStruct() { return array.getStruct(); } public __ptr__ getPtr() { return array.getPtr(); } public int minus(__ptr__ other) { StarArrayOfStruct other2 = (StarArrayOfStruct) other; int res = array.comparePointerInternal(other2.array); return res; } public void setStruct(__struct__ value) { array.setStruct(value); } public __ptr__ getPtrForEquality() { return array.getStruct().amp(); } public int comparePointer(__ptr__ other) { return array.comparePointerInternal(((StarArrayOfStruct) other).array); } public boolean isSameThan(StarArrayOfStruct other) { return array.comparePointerInternal(other.array) == 0; } // Fieldname public __ptr__ setPtr(String fieldName, __ptr__ data) { final Area tmp1 = array.getInternal(0); return ((__struct__) tmp1).setPtr(fieldName, data); } public __ptr__ getPtr(String fieldName) { final Area tmp1 = array.getInternal(0); return ((__struct__) tmp1).getPtr(fieldName); } public int getInt(String fieldName) { final Area tmp1 = array.getInternal(0); return ((__struct__) tmp1).getInt(fieldName); } public double getDouble(String fieldName) { final Area tmp1 = array.getInternal(0); return ((__struct__) tmp1).getDouble(fieldName); } public void setDouble(String fieldName, double data) { final Area tmp1 = array.getInternal(0); ((__struct__) tmp1).setDouble(fieldName, data); } } plantuml-1.2017.15/src/smetana/core/amiga/StarStar.java000066400000000000000000000061371312650303100225200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core.amiga; import smetana.core.UnsupportedC; import smetana.core.__array_of_ptr__; import smetana.core.__array_of_ptr_impl__; import smetana.core.__ptr__; public class StarStar extends UnsupportedC implements Area { private Area area; StarStar(Area area) { this.area = area; } public static StarStar array_of_array_of_something_empty(final Class cl, int nb) { return new StarStar(__array_of_ptr_impl__.malloc_empty(nb)); } public String toString() { return "->" + area; } Area getArea() { return area; } public void swap(int i, int j) { ((__array_of_ptr__) area).swap(i, j); } public void memcopyFrom(Area source) { StarStar other = (StarStar) source; this.area = other.area; } // public __ptr__ getBracket(int idx) { // return ((AreaArray) area).getBracket(idx); // } // public void realloc(int nb) { ((__array_of_ptr__) area).realloc(nb); } // // // __c__ // public void setBracket(int idx, Object data) { // ((AreaArray) area).setBracket(idx, data); // } // // public __ptr__ plus(int pointerMove) { // return ((AreaArray) area).plus(pointerMove); // } public __ptr__ plus(int pointerMove) { return new StarStar(((__array_of_ptr__) area).move(pointerMove)); } public __ptr__ getPtr(String fieldName) { return ((__array_of_ptr__) area).asPtr().getPtr(fieldName); } public __ptr__ getPtr() { return (__ptr__) ((__array_of_ptr__) area).getInternal(0); } public void setPtr(__ptr__ value) { ((__array_of_ptr__) area).setInternalByIndex(0, (Area) value); } public void setDouble(String fieldName, double data) { throw new UnsupportedOperationException(getClass().toString()); } public int comparePointer(__ptr__ other) { return ((__array_of_ptr__) area).comparePointerInternal(((__array_of_ptr__) ((StarStar) other).area)); } } plantuml-1.2017.15/src/smetana/core/amiga/StarStruct.java000066400000000000000000000060651312650303100230730ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core.amiga; import smetana.core.AllH; import smetana.core.CString; import smetana.core.__array_of_cstring__; import smetana.core.__array_of_integer__; import smetana.core.__array_of_ptr__; import smetana.core.__array_of_struct__; import smetana.core.__ptr__; import smetana.core.__struct__; public interface StarStruct extends Area, AllH, InternalData { public boolean isSameThan(StarStruct other); public Class getRealClass(); public __struct__ getStruct(); public String getUID36(); public String getDebug(String fieldName); public void setInt(String fieldName, int data); public void setBoolean(String fieldName, boolean data); public void setDouble(String fieldName, double data); public int getInt(String fieldName); public double getDouble(String fieldName); public boolean getBoolean(String fieldName); public __ptr__ plus(int pointerMove); public CString getCString(String fieldName); public __array_of_struct__ getArrayOfStruct(String fieldName); public __array_of_ptr__ getArrayOfPtr(String fieldName); public __array_of_cstring__ getArrayOfCString(String fieldName); public __array_of_integer__ getArrayOfInteger(String fieldName); public __struct__ getStruct(String fieldName); public __ptr__ getPtr(String fieldName); public void setStruct(String fieldName, __struct__ newData); public void setCString(String fieldName, CString newData); public __ptr__ setPtr(String fieldName, __ptr__ newData); public void memcopyFrom(Area source); public void copyDataFrom(__struct__ other); public void setStruct(__struct__ value); public void copyDataFrom(__ptr__ arg); public Object call(String fieldName, Object... args); public __ptr__ castTo(Class dest); public Object addVirtualBytes(int virtualBytes); } plantuml-1.2017.15/src/smetana/core/amiga/StarStructImpl.java000066400000000000000000000406221312650303100237120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core.amiga; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; import java.util.TreeSet; import smetana.core.Bucket; import smetana.core.CFunction; import smetana.core.CFunctionImpl; import smetana.core.CString; import smetana.core.HardcodedStruct; import smetana.core.JUtils; import smetana.core.MutableDoublePtr; import smetana.core.OFFSET; import smetana.core.StructureDefinition; import smetana.core.UnsupportedC; import smetana.core.__array_of_cstring__; import smetana.core.__array_of_integer__; import smetana.core.__array_of_ptr__; import smetana.core.__array_of_struct__; import smetana.core.__ptr__; import smetana.core.__struct__; import smetana.core.__struct_impl__; public class StarStructImpl extends UnsupportedC implements StarStruct { public static int CPT = 0; private final int UID = CPT++; private final Map fields; private final Set inlineFields = new HashSet(); private final StarStruct parent; private final Class theClass; public boolean isSameThan(StarStruct other) { return this.UID == ((StarStructImpl) other).UID; } @Override public String toString() { return "StarStruct " + getUID36() + " " + theClass + " " + fields.keySet() + " {parent=" + parent + "}"; } public Class getRealClass() { return theClass; } private int getIndexOf(Area searched) { int i = 0; for (Area a : fields.values()) { if (a == searched) { return i; } i++; } throw new IllegalArgumentException(); } private Area getAreaByIndex(int idx) { int i = 0; for (Area a : fields.values()) { if (i == idx) { return a; } i++; } throw new IllegalArgumentException(); } public __struct__ getStruct() { return new __struct_impl__(this); } public StarStructImpl(Class theClass, StarStruct parent) { this.parent = parent; this.theClass = theClass; this.fields = new LinkedHashMap(); JUtils.LOG("Creation Struct " + getUID36()); if (getUID36().equals("2tg")) { JUtils.LOG("It's me"); } final StructureDefinition structureDefinition = StructureDefinition.from(theClass); final Map bucketsMap = structureDefinition.getBucketsMap(); JUtils.LOG("FIELDS = " + theClass + " " + bucketsMap.keySet()); for (Map.Entry ent : bucketsMap.entrySet()) { // JUtils.LOG("AreaStruct entrie=" + ent.getKey()); final Bucket bucket = ent.getValue(); fields.put(bucket.name, BucketToAreaFactory.createArea(bucket, this)); if (bucket.inlineStruct() && bucket.functionPointer() == false) { inlineFields.add(bucket.name); } } } public Area getArea(String name) { if (fields.containsKey(name) == false) { System.err.println("fields=" + fields.keySet()); throw new IllegalArgumentException("No such field " + name); } final Area result = fields.get(name); return result; } public String getUID36() { return Integer.toString(UID, 36); } // __c__ public String getDebug(String fieldName) { throw new UnsupportedOperationException(); } public void setInt(String fieldName, int data) { final AreaInt area = (AreaInt) getArea(fieldName); area.setInternal(data); } public void setBoolean(String fieldName, boolean data) { final AreaInt area = (AreaInt) getArea(fieldName); area.setInternal(data ? 1 : 0); } public void setDouble(String fieldName, double data) { // if (fieldName.equals("x") && Math.round(data) == 54) { // System.err.println("setDoubleTrace 54!!"); // } final AreaDouble area = (AreaDouble) getArea(fieldName); area.setInternal(data); } public int getInt(String fieldName) { final AreaInt area = (AreaInt) getArea(fieldName); return area.getInternal(); } public double getDouble(String fieldName) { final AreaDouble area = (AreaDouble) getArea(fieldName); return area.getInternal(); } public boolean getBoolean(String fieldName) { final AreaInt area = (AreaInt) getArea(fieldName); if (area == null) { return false; } return area.getInternal() != 0; } public __ptr__ plus(int pointerMove) { JUtils.LOG("******************* plus =" + pointerMove); JUtils.LOG("me=" + this); if (parent != null) { int idx = ((StarStructImpl) parent).getIndexOf(this); JUtils.LOG("idx=" + idx); idx += pointerMove; final Area result = ((StarStructImpl) parent).getAreaByIndex(idx); JUtils.LOG("result=" + result); return (__ptr__) result; } throw new UnsupportedOperationException(getClass().toString()); } public CString getCString(String fieldName) { return (CString) getArea(fieldName); } public __array_of_struct__ getArrayOfStruct(String fieldName) { Area area = getArea(fieldName); if (area instanceof StarArrayOfStruct) { return ((StarArrayOfStruct) area).getInternalArray(); } return (__array_of_struct__) area; } public __array_of_ptr__ getArrayOfPtr(String fieldName) { Area area = getArea(fieldName); if (area instanceof StarStar) { return (__array_of_ptr__) ((StarStar) area).getArea(); } if (area instanceof StarArrayOfPtr) { return (__array_of_ptr__) ((StarArrayOfPtr) area).getInternalArray(); } return (__array_of_ptr__) area; } public __array_of_cstring__ getArrayOfCString(String fieldName) { Area area = getArea(fieldName); if (area instanceof StarArrayOfCString) { return ((StarArrayOfCString) area).getInternalArray(); } return (__array_of_cstring__) area; } public __array_of_integer__ getArrayOfInteger(String fieldName) { Area area = getArea(fieldName); if (area instanceof StarArrayOfInteger) { return ((StarArrayOfInteger) area).getInternalArray(); } return (__array_of_integer__) area; } public __struct__ getStruct(String fieldName) { // if (getArea(fieldName) instanceof __array__) { // return ((__array__) getArea(fieldName)).getStruct(0); // } if (getArea(fieldName) != null && getArea(fieldName) instanceof __ptr__ == false) { throw new IllegalArgumentException("Issue in getStruct with " + fieldName + " " + getArea(fieldName).getClass()); } final __ptr__ area = (__ptr__) getArea(fieldName); // if (area instanceof StarArray) { // final __array__ array = ((StarArray) area).getInternalArray(); // return new __struct__<__ptr__>((StarStruct) array.getInternal(0)); // } if (area instanceof HardcodedStruct) { return (__struct__) area; } if (area instanceof StarStructImpl == false) { throw new IllegalStateException(fieldName + " " + area.getClass().toString()); } if (area instanceof StarStructImpl && this.inlineFields.contains(fieldName) == false) { throw new IllegalArgumentException(fieldName + " is NOT inline!"); } return new __struct_impl__<__ptr__>((StarStructImpl) area); } public __ptr__ getPtr(String fieldName) { if (getArea(fieldName) != null && getArea(fieldName) instanceof __ptr__ == false) { throw new IllegalArgumentException("Issue in getStruct with " + fieldName + " " + getArea(fieldName).getClass()); } final __ptr__ area = (__ptr__) getArea(fieldName); if (area == null) { return null; } if (area instanceof StarStruct == false && area instanceof CFunctionImpl == false && area instanceof CString == false && area instanceof StarStar == false && area instanceof StarArrayOfPtr == false && area instanceof StarArrayOfStruct == false && area instanceof StarArrayOfInteger == false && area instanceof MutableDoublePtr == false /* && area instanceof AreaArray == false */) { throw new IllegalStateException(area.getClass().toString()); } if (area instanceof StarStructImpl && this.inlineFields.contains(fieldName)) { throw new IllegalArgumentException(fieldName + " is inline!"); } return area; } public void setStruct(String fieldName, __struct__ newData) { if (newData == null) { throw new IllegalArgumentException(); } if (inlineFields.contains(fieldName) == false) { throw new UnsupportedOperationException("IMPOSSIBLE2 " + fieldName); } final Area area = fields.get(fieldName); if (area == null) { throw new UnsupportedOperationException("IMPOSSIBLE3 " + fieldName); } if (area instanceof HardcodedStruct) { ((HardcodedStruct) area).copyDataFrom(newData); } else { final StarStructImpl existing = (StarStructImpl) area; existing.copyDataFrom(newData); } } public void setCString(String fieldName, CString newData) { if (newData == null) { fields.put(fieldName, null); } else { fields.put(fieldName, (Area) newData); ((CString) newData).setMyFather(this); } } public __ptr__ setPtr(String fieldName, __ptr__ newData) { if (newData instanceof CFunction) { fields.put(fieldName, (Area) newData); return newData; } if (inlineFields.contains(fieldName)) { throw new UnsupportedOperationException("IMPOSSIBLE5 " + fieldName); } if (newData == null) { fields.put(fieldName, null); return null; } if (newData instanceof StarStruct) { if (inlineFields.contains(fieldName)) { throw new UnsupportedOperationException("IMPOSSIBLE1"); } else { fields.put(fieldName, (Area) newData); } return newData; } if (newData instanceof CString) { fields.put(fieldName, (Area) newData); ((CString) newData).setMyFather(this); return newData; } if (newData instanceof StarArrayOfPtr) { fields.put(fieldName, (Area) newData); return newData; } if (newData instanceof StarArrayOfStruct) { fields.put(fieldName, (Area) newData); return newData; } if (newData instanceof StarStar) { fields.put(fieldName, (Area) newData); return newData; } if (newData instanceof StarArrayOfCString) { fields.put(fieldName, (Area) newData); return newData; } if (newData instanceof MutableDoublePtr) { fields.put(fieldName, (Area) newData); return newData; } if (newData instanceof StarArrayOfInteger) { fields.put(fieldName, (Area) newData); return newData; } // if (newData instanceof AreaArray) { // fields.put(fieldName, (Area) newData); // return newData; // } throw new UnsupportedOperationException("en cours1 ! " + newData.getClass()); } public void memcopyFrom(Area source) { if (source instanceof StarArrayOfPtr) { final __array_of_ptr__ array = ((StarArrayOfPtr) source).getInternalArray(); copyDataFrom((StarStructImpl) array.getInternal(0)); } else if (source instanceof __struct__) { copyDataFrom((__struct__) source); } else { copyDataFrom((StarStructImpl) source); } } public void copyDataFrom(__struct__ other) { copyDataFrom(other.getInternalData()); } public void setStruct(__struct__ value) { copyDataFrom(value); } public void copyDataFrom(__ptr__ arg) { JUtils.LOG("copyDataFrom I AM " + this); JUtils.LOG("other=" + arg); JUtils.LOG("FIELDS=" + fields.keySet()); if (arg instanceof InternalData) { copyDataFromInternal((InternalData) arg); return; } if (this.getClass() != arg.getClass()) { throw new UnsupportedOperationException(getClass().toString()); } StarStructImpl other = (StarStructImpl) arg; if (fields.keySet().equals(other.fields.keySet()) == false) { throw new IllegalStateException(); } copyDataFromInternal(other); } private void copyDataFromInternal(InternalData other) { for (String fieldName : new TreeSet(fields.keySet())) { Area field = fields.get(fieldName); final Area otherField = other.getArea(fieldName); if (field == null && otherField == null) { continue; } if (field == null) { if (otherField instanceof StarStructImpl && inlineFields.contains(fieldName) == false) { fields.put(fieldName, otherField); } else if (otherField instanceof CString) { fields.put(fieldName, otherField); } else if (otherField instanceof StarStar) { fields.put(fieldName, otherField); } else if (otherField instanceof StarArrayOfPtr) { fields.put(fieldName, otherField); } else if (otherField instanceof CFunction) { fields.put(fieldName, otherField); } else if (otherField instanceof StarArrayOfStruct) { fields.put(fieldName, otherField); } else { System.err.println("XX otherField = " + otherField); throw new UnsupportedOperationException(otherField.getClass().toString()); } } else if (field instanceof AreaInt) { field.memcopyFrom(otherField); } else if (field instanceof AreaDouble) { field.memcopyFrom(otherField); } else if (field instanceof CString) { field.memcopyFrom(otherField); } else if (field instanceof StarStar) { if (otherField == null) { fields.put(fieldName, null); } else { field.memcopyFrom(otherField); } } else if (field instanceof StarStructImpl && inlineFields.contains(fieldName)) { field.memcopyFrom(otherField); } else if (field instanceof StarStructImpl && inlineFields.contains(fieldName) == false) { fields.put(fieldName, otherField); } else if (field instanceof StarArrayOfPtr) { field.memcopyFrom(otherField); } else if (field instanceof HardcodedStruct) { field.memcopyFrom(otherField); } else { System.err.println("fieldName=" + fieldName + " " + field); System.err.println("otherField = " + otherField); throw new UnsupportedOperationException(field.getClass().toString()); } } } public Object call(String fieldName, Object... args) { final CFunction area = (CFunction) getArea(fieldName); return area.exe(args); } public __ptr__ castTo(Class dest) { JUtils.LOG("******************* castTo =" + dest); JUtils.LOG("me=" + this); if (theClass == dest) { return this; } if (parent != null && ((StarStructImpl) parent).theClass == dest) { JUtils.LOG("IT's my father!"); return parent; } final Area first = fields.values().iterator().next(); JUtils.LOG("first=" + first); if (first instanceof StarStructImpl) { final StarStructImpl first2 = (StarStructImpl) first; JUtils.LOG("first.parent=" + first2.parent); if (first2.parent != this) { throw new IllegalStateException(); } if (dest == first2.theClass) { return first2; } } throw new UnsupportedOperationException(); } public Object addVirtualBytes(int virtualBytes) { JUtils.LOG("#### addVirtualBytes " + virtualBytes); if (virtualBytes == 0) { return this; } JUtils.LOG("this=" + toString()); if (virtualBytes < 0) { final OFFSET offset = OFFSET.fromInt(-virtualBytes); JUtils.LOG("OFFSET1=" + offset); if (parent == null) { throw new UnsupportedOperationException("No father! How to go back?"); } JUtils.LOG("father=" + parent); if (((StarStructImpl) parent).theClass != offset.getTheClass()) { throw new UnsupportedOperationException("Bad class matching1!"); } final Object checking = parent.addVirtualBytes(-virtualBytes); JUtils.LOG("checking=" + checking); if (checking != this) { throw new UnsupportedOperationException("Cheking fail!"); } return parent; } final OFFSET offset = OFFSET.fromInt(virtualBytes); JUtils.LOG("OFFSET2=" + offset); final String field = offset.getField(); JUtils.LOG("field=" + field); JUtils.LOG("fields=" + fields.keySet()); final Area result = fields.get(field); if (result == null && parent != null) { return parent.addVirtualBytes(virtualBytes); } if (result == null) { throw new UnsupportedOperationException(); } return result; } // __c__ } plantuml-1.2017.15/src/smetana/core/debug/000077500000000000000000000000001312650303100201135ustar00rootroot00000000000000plantuml-1.2017.15/src/smetana/core/debug/Debug.java000066400000000000000000000026261312650303100220120ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * */ package smetana.core.debug; public class Debug { public void entering(String signature, String methodName) { } public void leaving(String signature, String methodName) { } } plantuml-1.2017.15/src/smetana/core/gvformatter_engine_s.java000066400000000000000000000026121312650303100241000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; public interface gvformatter_engine_s extends __ptr__ { } plantuml-1.2017.15/src/smetana/core/jmp_buf.java000066400000000000000000000031111312650303100213060ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; public class jmp_buf { private boolean hasBeenCalled; public boolean hasBeenCalled() { return hasBeenCalled; } public void saveCallingEnvironment() { // System.err.println("jmp_buf::saveCallingEnvironment"); hasBeenCalled = true; } } plantuml-1.2017.15/src/smetana/core/pointf_s.java000066400000000000000000000027661312650303100215240ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; public interface pointf_s extends __ptr__ { // typedef struct pointf_s // { // double x, y // } // pointf } // typedef struct pointf_s { double x, y; } pointf; plantuml-1.2017.15/src/smetana/core/size_t.java000066400000000000000000000030351312650303100211660ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; public interface size_t { Object malloc(); Object realloc(Object old); size_t negate(); size_t plus(int length); boolean isStrictPositive(); boolean isStrictNegative(); boolean isZero(); } plantuml-1.2017.15/src/smetana/core/size_t_array_of_array_of_something_allocated.java000066400000000000000000000041521312650303100310200ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; public class size_t_array_of_array_of_something_allocated implements size_t { final private int nb; final private Class cl; public size_t_array_of_array_of_something_allocated(Class cl, int nb) { this.nb = nb; this.cl = cl; } public boolean isZero() { return nb == 0; } public __ptr__ realloc(Object old) { throw new UnsupportedOperationException(); } public __array_of_struct__ malloc() { return __array_of_struct__.malloc(cl, nb); } public size_t negate() { throw new UnsupportedOperationException(); } public size_t plus(int length) { throw new UnsupportedOperationException(); } public boolean isStrictPositive() { throw new UnsupportedOperationException(); } public boolean isStrictNegative() { throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/smetana/core/size_t_array_of_array_of_something_empty.java000066400000000000000000000044371312650303100302340ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import smetana.core.amiga.StarStar; public class size_t_array_of_array_of_something_empty implements size_t { final private int nb; final private Class cl; public size_t_array_of_array_of_something_empty(Class cl, int nb) { this.nb = nb; this.cl = cl; } public boolean isZero() { return nb == 0; } public __ptr__ realloc(Object old) { JUtils.LOG("realloc old1=" + old); if (nb == 0) { return null; } final StarStar data = (StarStar) old; data.realloc(nb); return data; } public __ptr__ malloc() { return StarStar.array_of_array_of_something_empty(cl, nb); } public size_t negate() { throw new UnsupportedOperationException(); } public size_t plus(int length) { throw new UnsupportedOperationException(); } public boolean isStrictPositive() { throw new UnsupportedOperationException(); } public boolean isStrictNegative() { throw new UnsupportedOperationException(); } public final int getNb() { return nb; } } plantuml-1.2017.15/src/smetana/core/size_t_array_of_charstars.java000066400000000000000000000043041312650303100251220ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import smetana.core.amiga.StarArrayOfCString; public class size_t_array_of_charstars implements size_t { final private int size; public size_t_array_of_charstars(int size) { this.size = size; } public boolean isZero() { return size == 0; } public __ptr__ malloc() { return new StarArrayOfCString(__array_of_cstring__.mallocStarChar(size)); // return new StarArray(__array__.mallocStarChar(size)); // return AreaArray.mallocStarChar(size); } public size_t negate() { throw new UnsupportedOperationException(); } public size_t plus(int length) { throw new UnsupportedOperationException(); } public boolean isStrictPositive() { throw new UnsupportedOperationException(); } public boolean isStrictNegative() { throw new UnsupportedOperationException(); } public __ptr__ realloc(Object old) { throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/smetana/core/size_t_array_of_integer.java000066400000000000000000000044601312650303100245700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import smetana.core.amiga.StarArrayOfInteger; /** * "Pseudo size" of a C structure. In C, this is the actual size of the structure. In Java, this is an indication to * know which structure we are going to allocate. * * @author Arnaud Roques * */ public class size_t_array_of_integer implements size_t { final private int nb; public size_t_array_of_integer(int nb) { this.nb = nb; } public boolean isZero() { return nb == 0; } public __ptr__ malloc() { return new StarArrayOfInteger(__array_of_integer__.mallocInteger(nb)); } public size_t negate() { throw new UnsupportedOperationException(); } public size_t plus(int length) { throw new UnsupportedOperationException(); } public boolean isStrictPositive() { throw new UnsupportedOperationException(); } public boolean isStrictNegative() { throw new UnsupportedOperationException(); } public __ptr__ realloc(Object old) { ((StarArrayOfInteger) old).realloc(nb); return (__ptr__) old; } } plantuml-1.2017.15/src/smetana/core/size_t_array_of_something.java000066400000000000000000000044751312650303100251360ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; import smetana.core.amiga.StarArrayOfPtr; import smetana.core.amiga.StarStar; public class size_t_array_of_something implements size_t { final private int nb; final private Class cl; public size_t_array_of_something(Class cl, int nb) { this.nb = nb; this.cl = cl; } public boolean isZero() { return nb == 0; } public __ptr__ malloc() { return new StarArrayOfPtr(__array_of_ptr_impl__.malloc_allocated(cl, nb)); } public size_t negate() { throw new UnsupportedOperationException(); } public size_t plus(int length) { throw new UnsupportedOperationException(); } public boolean isStrictPositive() { throw new UnsupportedOperationException(); } public boolean isStrictNegative() { throw new UnsupportedOperationException(); } public __ptr__ realloc(Object old) { if (old instanceof StarStar) { ((StarStar) old).realloc(nb); return (__ptr__) old; } ((StarArrayOfPtr) old).realloc(nb); return (__ptr__) old; } public int getNb() { return nb; } } plantuml-1.2017.15/src/smetana/core/size_t_of_element.java000066400000000000000000000042731312650303100233700ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; /** * "Pseudo size" of a C structure. In C, this is the actual size of the structure. In Java, this is an indication to * know which structure we are going to allocate. * * @author Arnaud Roques * */ public class size_t_of_element implements size_t { public size_t_of_element(Object foo) { } public __ptr__ malloc() { throw new UnsupportedOperationException(); } public __ptr__ realloc(Object old) { throw new UnsupportedOperationException(); } public size_t negate() { throw new UnsupportedOperationException(); } public size_t plus(int length) { throw new UnsupportedOperationException(); } public boolean isStrictPositive() { throw new UnsupportedOperationException(); } public boolean isStrictNegative() { throw new UnsupportedOperationException(); } public boolean isZero() { throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/smetana/core/size_t_struct.java000066400000000000000000000102731312650303100225740ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; /** * "Pseudo size" of a C structure. In C, this is the actual size of the structure. In Java, this is an indication to * know which structure we are going to allocate. * * @author Arnaud Roques * */ public class size_t_struct implements size_t { public final Class tobeAllocated; // public final int bytes; private boolean positive = true; public size_t_struct(Class tobeAllocated) { this.tobeAllocated = tobeAllocated; } // public size_t_struct(Class tobeAllocated, int arraySize) { // this.tobeAllocated = tobeAllocated; // this.bytes = 1; // this.arraySize = arraySize; // JUtils.LOG("building " + this); // // Thread.dumpStack(); // } // public size_t_struct negate() { final size_t_struct result = new size_t_struct(tobeAllocated); result.positive = !result.positive; return result; } // private size_t_struct(int bytes) { // this.tobeAllocated = null; // this.arraySize = 0; // this.bytes = bytes; // JUtils.LOG("building " + this); // // Thread.dumpStack(); // } public size_t_struct multiply(int sz) { // if (tobeAllocated == null && arraySize == 0) { // return new size_t_struct(bytes * sz); // } throw new UnsupportedOperationException(); } // public static final size_t_struct MINUS_ONE = new size_t_struct(-1); // @Override // public String toString() { // return super.toString() + " size_t(" + tobeAllocated + "*" + arraySize + ", bytes=" + bytes + ")"; // } public boolean isStrictPositive() { return positive; } public boolean isStrictNegative() { return !positive; } // public boolean isStrictNegative() { // return false; // } // public static boolean isStrictNegative(size_t_struct v) { // if (v == null) { // return false; // } // return v.bytes < 0; // } // // public static boolean isNegativeOrNull(size_t_struct v) { // if (v == null) { // return true; // } // return v.bytes <= 0; // } public final Class getTobeAllocated() { return tobeAllocated; } public __ptr__ malloc() { if (tobeAllocated != null) { return Memory.malloc(tobeAllocated); } return (__ptr__) new CObject(-1, tobeAllocated); } public size_t_struct plus(int strlen) { // throw new UnsupportedOperationException(); JUtils.LOG("adding " + strlen + " to " + this); return this; } public boolean isZero() { return false; } // public boolean isStrictLessThan(int v) { // return false; // } // public void setTo(int v) { // throw new UnsupportedOperationException(); // } // public size_t_struct multiplyBySizeofStarChar() { // throw new UnsupportedOperationException(); // } // public static size_t_struct fromInt(int bytes) { // return new size_t_struct(bytes); // } // public int getSizeInBytes() { // return bytes; // } // // /** // * @return the arraySize // */ // public int getArraySize() { // return arraySize; // } public __ptr__ realloc(Object old) { throw new UnsupportedOperationException(); } } plantuml-1.2017.15/src/smetana/core/tms.java000066400000000000000000000025711312650303100205000ustar00rootroot00000000000000/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program. * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package smetana.core; public interface tms extends __ptr__ { } plantuml-1.2017.15/src/sprites/000077500000000000000000000000001312650303100161365ustar00rootroot00000000000000plantuml-1.2017.15/src/sprites/archimate/000077500000000000000000000000001312650303100200735ustar00rootroot00000000000000plantuml-1.2017.15/src/sprites/archimate/access.png000066400000000000000000000003221312650303100220370ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 15 Feb 2010 10:59:37 -0000+w)tIME 1 pHYs B4gAMA a)IDATxc`0?DFj]@5ϣ6j)8"jQIENDB`plantuml-1.2017.15/src/sprites/archimate/activity.png000066400000000000000000000003261312650303100224360ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME1"{Ӧ pHYs B4gAMA a-IDATxc`?S$"D ?.0@hdƑcIENDB`plantuml-1.2017.15/src/sprites/archimate/actor.png000066400000000000000000000003671312650303100217170ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME 8. pHYs B4gAMA aNIDATxcd #H IҌWTQÀHCH63?)sG#űD@3# QSUB`IENDB`plantuml-1.2017.15/src/sprites/archimate/aggregation.png000066400000000000000000000003401312650303100230650ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 15 Feb 2010 10:59:37 -0000+w)tIME 9+i" pHYs B4gAMA a7IDATxc`0?~&J-&׀d#_pH@1I?>V@n:,8{p oIENDB`plantuml-1.2017.15/src/sprites/archimate/application-collaboration.png000066400000000000000000000003731312650303100257350ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME" +5 pHYs B4gAMA aRIDATxc`hE?0k֛"M n"B2 F&j^ Qxa(J {0kIENDB`plantuml-1.2017.15/src/sprites/archimate/application-component.png000066400000000000000000000003661312650303100251110ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 15 Feb 2010 10:59:37 -0000+w)tIME &a/N pHYs B4gAMA aMIDATxc`0O~\2[7Ûb7) d )D62YBàL$[Im( :r)iIENDB`plantuml-1.2017.15/src/sprites/archimate/application-data-object.png000066400000000000000000000003271312650303100252610ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME. pHYs B4gAMA a.IDATxc`hO~děi PK E]IENDB`plantuml-1.2017.15/src/sprites/archimate/application-function.png000066400000000000000000000004121312650303100247240ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME * pHYs B4gAMA aaIDATxڝ 0 Ǽ?bߵ@Jh'9v`'a+ Sx%"I{uM')wR20J4Q\i"zDIENDB`plantuml-1.2017.15/src/sprites/archimate/application-interaction.png000066400000000000000000000004021312650303100254150ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME K pHYs B4gAMA aYIDATxc`0bE?.=L蚷I?.cӈ dC `e;6WPFoFF5A2R Dv )/ <Q ުIENDB`plantuml-1.2017.15/src/sprites/archimate/application-interface.png000066400000000000000000000003671312650303100250500ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME _ pHYs B4gAMA aNIDATxc`J?F"52lȈa F&J8mGv !qQ@D t@  ۨIENDB`plantuml-1.2017.15/src/sprites/archimate/application-service.png000066400000000000000000000003351312650303100245430ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 16:13:23 -0000#tIME F pHYs B4gAMA a4IDATxc`H{3B3&J` J Y8 //  IENDB`plantuml-1.2017.15/src/sprites/archimate/assessment-filled.png000066400000000000000000000003711312650303100242240ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME%#5 pHYs B4gAMA aPIDATxc` bHFg zMQ2?L#Hvȱ4uph$J3?!M4N^<[20IENDB`plantuml-1.2017.15/src/sprites/archimate/assessment.png000066400000000000000000000003421312650303100227650ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME$ j pHYs B4gAMA a9IDATxc` bF OH'Qv>aH p>kr#SIENDB`plantuml-1.2017.15/src/sprites/archimate/assignment.png000066400000000000000000000003131312650303100227460ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 15 Feb 2010 10:59:37 -0000+w)tIME '+ pHYs  ~gAMA a"IDATxc` Qͣi?$/ PIENDB`plantuml-1.2017.15/src/sprites/archimate/association.png000066400000000000000000000002771312650303100231230ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 15 Feb 2010 10:59:37 -0000+w)tIME sn pHYs B4gAMA aIDATxc`@TQ̓ xIENDB`plantuml-1.2017.15/src/sprites/archimate/business-activity.png000066400000000000000000000003631312650303100242700ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME ,K pHYs B4gAMA aJIDATxc`?x42zliP 1E~DwNq.0HLH>IENDB`plantuml-1.2017.15/src/sprites/archimate/business-actor.png000066400000000000000000000004011312650303100235350ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME , pHYs B4gAMA aXIDATx͑Q C;_"`*%E g@h3Z.u zHۊ鸉m7%WA!;0ܽAhlIENDB`plantuml-1.2017.15/src/sprites/archimate/business-collaboration.png000066400000000000000000000003731312650303100252650ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME , pHYs B4gAMA aRIDATxc`hE?0k+BћL/dE001d6ALT" P B"K05OIENDB`plantuml-1.2017.15/src/sprites/archimate/business-contract.png000066400000000000000000000003271312650303100242510ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME , pHYs B4gAMA a.IDATxc`h+i:4ӨF J@9mN IENDB`plantuml-1.2017.15/src/sprites/archimate/business-event.png000066400000000000000000000003741312650303100235570ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME +9y0&h pHYs B4gAMA aSIDATxc`0Vܺ113`3:<@r # M+(vM0H. R" ( Y8IENDB`plantuml-1.2017.15/src/sprites/archimate/business-function.png000066400000000000000000000004121312650303100242540ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME +3v pHYs B4gAMA aaIDATxڝI@ /r2m*t'i3/*{*ap )IDATxc`hO~d[ (¨bY(42bG'B kIENDB`plantuml-1.2017.15/src/sprites/archimate/business-role.png000066400000000000000000000003721312650303100233750ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:31:52 -0000ZutIME ).- pHYs B4gAMA aQIDATxc`T}ߊ[7\Ć 3&R3ZF0rL x h8 )`0H3< ]-.@# uIENDB`plantuml-1.2017.15/src/sprites/archimate/business-service.png000066400000000000000000000003351312650303100240730ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 16:13:23 -0000#tIME ) pHYs B4gAMA a4IDATxc`HfPhF60x0@V4// &IENDB`plantuml-1.2017.15/src/sprites/archimate/business-value.png000066400000000000000000000003761312650303100235540ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME ) j pHYs B4gAMA aUIDATxŒA ݾ{{2Ѱk;hD#]xsۋ&'!w!a- ,%|Y"J3Nɲ$dnb:Wv+IENDB`plantuml-1.2017.15/src/sprites/archimate/collaboration.png000066400000000000000000000003501312650303100234270ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME  pHYs B4gAMA a?IDATxc`hE?'S SM <5x(vU@i&(CԉIENDB`plantuml-1.2017.15/src/sprites/archimate/communication-path.png000066400000000000000000000003501312650303100243760ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME 2# pHYs B4gAMA a?IDATxc`?+ !b4TKf =Lx lS$ڕ!O.ԑIENDB`plantuml-1.2017.15/src/sprites/archimate/component.png000066400000000000000000000003471312650303100226070ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 15 Feb 2010 10:59:37 -0000+w)tIME1(0> pHYs B4gAMA a>IDATxc`0O~ a &4>6x]BbRhLD,xLïIENDB`plantuml-1.2017.15/src/sprites/archimate/composition.png000066400000000000000000000003301312650303100231400ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 15 Feb 2010 10:59:37 -0000+w)tIME mw pHYs B4gAMA a/IDATxc`0?~&J-&׀d#_pH@1tBn4'j <_IENDB`plantuml-1.2017.15/src/sprites/archimate/constraint-filled.png000066400000000000000000000003661312650303100242270ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME2ξ pHYs B4gAMA aMIDATxc`J  B #2u:H3d; e;Y.@fٶL") TZIENDB`plantuml-1.2017.15/src/sprites/archimate/constraint.png000066400000000000000000000003421312650303100227640ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME27ƮZ pHYs B4gAMA a9IDATxc`J OBHDN g;$R㝑D IENDB`plantuml-1.2017.15/src/sprites/archimate/contract.png000066400000000000000000000003231312650303100224140ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME-:E pHYs B4gAMA a*IDATxc`hS,z( 䂁¨) C&IENDB`plantuml-1.2017.15/src/sprites/archimate/deliverable-filled.png000066400000000000000000000003601312650303100243130ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME'X(K pHYs B4gAMA aGIDATxc`hi:4^5`0B"Xzza!F"ł#1")BOΌ C 9'IENDB`plantuml-1.2017.15/src/sprites/archimate/device.png000066400000000000000000000003351312650303100220410ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME B pHYs B4gAMA a4IDATxc`hO>4e Pb OfjIьBC(( RIENDB`plantuml-1.2017.15/src/sprites/archimate/driver-filled.png000066400000000000000000000004621312650303100233330ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:31:52 -0000ZutIMEC pHYs B4gAMA aIDATxڥ [ߴ`Pa˙h.lK nX]e<#9]8YMW~'/زBHIDATxc`00b\CP I0Ѯ4"选 @ռ00p[IENDB`plantuml-1.2017.15/src/sprites/archimate/flow.png000066400000000000000000000003001312650303100215410ustar00rootroot00000000000000PNG  IHDRa pHYs B4rIDAT8A NejzpNz% ADır.W թ4X36z PB̬5w*nJbzC ש'`4BR+&h:>jaflIDATxc`0bE?=X5Ʃ&80,BO F#![qyj) IENDB`plantuml-1.2017.15/src/sprites/archimate/interface-required.png000066400000000000000000000003311312650303100243540ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME  3dw pHYs B4gAMA a0IDATxc`J?O#1hgQB@DvռC@%P +:IENDB`plantuml-1.2017.15/src/sprites/archimate/interface-symmetric.png000066400000000000000000000003341312650303100245530ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME  *d pHYs B4gAMA a3IDATxc`J?Sd30X TCȶp4-ALIENDB`plantuml-1.2017.15/src/sprites/archimate/interface.png000066400000000000000000000003341312650303100225410ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME - f pHYs B4gAMA a3IDATxc`J?S$c a!7`J>m";0PC ·^IENDB`plantuml-1.2017.15/src/sprites/archimate/junction-and.png000066400000000000000000000003531312650303100231730ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME 5QO pHYs B4gAMA aBIDATxc`0BXĈLjfr H2Ceԕ<^d0Kf @NIENDB`plantuml-1.2017.15/src/sprites/archimate/junction-or.png000066400000000000000000000003621312650303100230510ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME (nU pHYs B4gAMA aIIDATxc`0BXĈLjfr H2Ce!ptc!W,O.O0 V3Ag H_oAIENDB`plantuml-1.2017.15/src/sprites/archimate/junction.png000066400000000000000000000003541312650303100224340ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME ^ pHYs B4gAMA aCIDATxc`0BXĈLjfr H2 F"4cSf. : u>,% r?IENDB`plantuml-1.2017.15/src/sprites/archimate/location.png000066400000000000000000000003571312650303100224160ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME A pHYs B4gAMA aFIDATxcd ccd 'Q$E)ьX?@0 C&^eVWȶ 8ts^r[IENDB`plantuml-1.2017.15/src/sprites/archimate/meaning.png000066400000000000000000000004041312650303100222150ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIMEF pHYs B4gAMA a[IDATxڥS A.0!ceNphN%2cn5bxPM;h__&Aetd^cAp?5;GIENDB`plantuml-1.2017.15/src/sprites/archimate/motivation-outcome.png000066400000000000000000000004521312650303100244440ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME ( 9 pHYs B4gAMA aIDATxڝ t$0M)J}FCZSقd-@U1lyO uDDO䑣N\@G %z"d:ѕw[Aǰۿ|@ uhUBr'IENDB`plantuml-1.2017.15/src/sprites/archimate/network.png000066400000000000000000000003701312650303100222720ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME " pHYs B4gAMA aOIDATxc`0#?8հp EQNFWDL%E.+8  IENDB`plantuml-1.2017.15/src/sprites/archimate/node.png000066400000000000000000000003601312650303100215250ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 16:13:23 -0000#tIME6y"^ pHYs B4gAMA aGIDATxc`0bOhT` ^B <zPB d$fE&: ykͺIENDB`plantuml-1.2017.15/src/sprites/archimate/object.png000066400000000000000000000003231312650303100220450ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME)X=' pHYs B4gAMA a*IDATxc`hO~ g ,L% F l``0 T4IENDB`plantuml-1.2017.15/src/sprites/archimate/physical-distribution-network.png000066400000000000000000000003471312650303100266250ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 15 Feb 2010 10:59:37 -0000+w)tIME  - ŗD pHYs B4gAMA a>IDATxc`?r)@WHf 0|$撞`hF6*.( ɱ@R]9"_()h[IENDB`plantuml-1.2017.15/src/sprites/archimate/physical-equipment.png000066400000000000000000000005071312650303100244240ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 15 Feb 2010 10:59:37 -0000+w)tIME  74] pHYs B4gAMA aIDATxڭS Opgpbgp %&Mqk=ّKC}T"JX*QDe%ZTBt"N>LLhh ' CQ\sD# "[!yIENDB`plantuml-1.2017.15/src/sprites/archimate/physical-material.png000066400000000000000000000004551312650303100242150ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 15 Feb 2010 10:59:37 -0000+w)tIME  Ad pHYs B4gAMA aIDATxڥ M3tbg$#҄~j!^PK9hyUܷKمoidF  #(n YhJ xCXj?#I$)2 4P f^IENDB`plantuml-1.2017.15/src/sprites/archimate/plateau.png000066400000000000000000000003221312650303100222310ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME) pHYs B4gAMA a)IDATxc`Xb@ $9wpx,{a ҞIENDB`plantuml-1.2017.15/src/sprites/archimate/principle-filled.png000066400000000000000000000003511312650303100240220ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME;뺎 pHYs B4gAMA a@IDATxc`0ـgĄBbĀQ` >Ib@qf<3 2~IENDB`plantuml-1.2017.15/src/sprites/archimate/principle.png000066400000000000000000000003371312650303100225710ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME+ pHYs B4gAMA a6IDATxc`0$(jP`BP t@cSIENDB`plantuml-1.2017.15/src/sprites/archimate/process.png000066400000000000000000000003441312650303100222600ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME +m pHYs B4gAMA a;IDATxc`*?. &jBf CI0Y-#$Ozv€XɎh!6p@bIENDB`plantuml-1.2017.15/src/sprites/archimate/product.png000066400000000000000000000003301312650303100222550ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME1N;W pHYs B4gAMA a/IDATxc`hS3Q"l"Fr  t0%=lIENDB`plantuml-1.2017.15/src/sprites/archimate/realisation.png000066400000000000000000000002551312650303100231150ustar00rootroot00000000000000PNG  IHDRatIME'9 pHYs B4gAMA a)7=pIENDB`plantuml-1.2017.15/src/sprites/archimate/technology-communication-path.png000066400000000000000000000003711312650303100265520ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME 28u+s pHYs B4gAMA aPIDATxc`?%΄8M%|jьS-)1`Apf#l)TOѮ$)%WyIENDB`plantuml-1.2017.15/src/sprites/archimate/technology-device.png000066400000000000000000000003611312650303100242110ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME 'zx pHYs B4gAMA aHIDATxc`hO>d|(撞pLza*@q:`A!i JHjF7na$IENDB`plantuml-1.2017.15/src/sprites/archimate/technology-function.png000066400000000000000000000004221312650303100245750ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME:$`qg pHYs B4gAMA aiIDATxڝ 0 l$$ Dvo}(R#xxduRٷBJfp% 'I*Bߤ5XSINL%I'-ú.گ)$z IENDB`plantuml-1.2017.15/src/sprites/archimate/technology-infra-interface.png000066400000000000000000000003701312650303100260070ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME $K;k pHYs B4gAMA aOIDATxc`J?F"52|1DKȀ0j##[X(w xW: `Mye \S\IENDB`plantuml-1.2017.15/src/sprites/archimate/technology-infra-service.png000066400000000000000000000003401312650303100255040ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 16:13:23 -0000#tIME &D pHYs B4gAMA a7IDATxc`H$6g$G3!L@@q00 KIENDB`plantuml-1.2017.15/src/sprites/archimate/technology-network.png000066400000000000000000000004061312650303100244430ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME ":/X pHYs B4gAMA a]IDATxc`0êYϷ9撞X-@WB 4$;]H3udAV L@T p JZIENDB`plantuml-1.2017.15/src/sprites/archimate/technology-node.png000066400000000000000000000004001312650303100236710ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 16:13:23 -0000#tIME +%* pHYs B4gAMA aWIDATxc`0bOWIPt0DfZ Hr6L3 ۉl.g"J0j@Md 'HL 3!yH6 IENDB`plantuml-1.2017.15/src/sprites/archimate/technology-system-software.png000066400000000000000000000004341312650303100261270ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME :1:p pHYs B4gAMA asIDATxc`hH3qə`:<C#.'o Kzb3]3F LԐ`%H@ (69 `6.@@DprS"qI~e(}3IENDB`plantuml-1.2017.15/src/sprites/archimate/triggering.png000066400000000000000000000003311312650303100227370ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 15 Feb 2010 10:59:37 -0000+w)tIME 9sEs pHYs  ~gAMA a0IDATxc`0?6LZFX !Հ$zoD3E6j)p &sIENDB`plantuml-1.2017.15/src/sprites/archimate/used-by.png000066400000000000000000000003271312650303100221530ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 15 Feb 2010 10:59:37 -0000+w)tIME #g pHYs B4gAMA a.IDATxc`0?1 Ofr MVd<44)HIENDB`plantuml-1.2017.15/src/sprites/archimate/value.png000066400000000000000000000003461312650303100217200ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:14:55 -0000h~tIME;2 pHYs B4gAMA a=IDATxc`hG?1jh"EJ4c!G3\/` $( ZIyL}ՒIENDB`plantuml-1.2017.15/src/sprites/archimate/workpackage-filled.png000066400000000000000000000003431312650303100243340ustar00rootroot00000000000000PNG  IHDRa,tEXtCreation TimeMon 25 Jan 2010 12:31:52 -0000ZutIME ' pHYs B4gAMA a:IDATxc`hTPLhFDi0h % RLIRP4 IENDB`